)]}' {"version":3,"file":"Q_APPBuilder_1_0_135.js","sources":["C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/tms_1_0_135.js","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/rtl_1_0_135.js","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/system.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/rtlconsts.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/types.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/js.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/sysutils.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/typinfo.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/web.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/p2jsres.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/simplelinkedlist.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/classes.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/UITypes.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.Consts.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.Dialogs.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.Controls.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.Graphics.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/math.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/rtti.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.JSON.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.Storage.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.REST.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.Utils.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.WebTools.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/contnrs.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.Modules.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.Lang.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.Menus.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.ClientConnector.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/Rtl.BrowserLoadHelper.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.Forms.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.StdCtrls.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.ExtCtrls.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.TreeNodes.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.ComCtrls.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.Buttons.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.WebCtrls.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/TimeSpan.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/generics.defaults.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/generics.strings.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/generics.collections.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/dateutils.helper.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/dateutils.pas","C:/DelphiComponent/TMS FNC Core/WEBLib.TMSFNCUtils.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/variants.pas","C:/DelphiComponent/TMS FNC Core/WEBLib.TMSFNCJSONReader.pas","C:/DelphiComponent/TMS FNC Core/WEBLib.TMSFNCJSONWriter.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/strutils.pas","C:/DelphiComponent/TMS FNC Core/WEBLib.TMSFNCPersistence.pas","C:/DelphiComponent/TMS FNC Core/WEBLib.TMSFNCTypes.pas","C:/DelphiComponent/TMS FNC Core/WEBLib.TMSFNCGraphicsTypes.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.DesignIntf.pas","C:/DelphiComponent/TMS FNC Core/WEBLib.TMSFNCCustomComponent.pas","C:/DelphiComponent/TMS FNC Core/WEBLib.TMSFNCGraphics.pas","C:/DelphiComponent/TMS FNC Core/WEBLib.TMSFNCBitmapContainer.pas","C:/DelphiComponent/TMS FNC Core/WEBLib.TMSFNCHTMLEngine.pas","C:/DelphiComponent/TMS FNC Core/WEBLib.TMSFNCGraphics.General.pas","C:/DelphiComponent/TMS FNC Core/WEBLib.TMSFNCGraphics.WEB.pas","C:/DelphiComponent/TMS FNC Core/WEBLib.TMSFNCStyles.pas","C:/DelphiComponent/TMS FNC Core/WEBLib.TMSFNCUndo.pas","C:/DelphiComponent/TMS FNC Core/WEBLib.TMSFNCCustomControl.pas","C:/DelphiComponent/TMS FNC UI Pack/WEBLib.TMSFNCHTMLText.pas","C:/DelphiComponent/TMS FNC Core/WEBLib.TMSFNCScrollBar.pas","C:/DelphiComponent/TMS FNC UI Pack/WEBLib.TMSFNCTreeViewBase.pas","C:/DelphiComponent/TMS FNC UI Pack/WEBLib.TMSFNCTreeViewData.pas","C:/DelphiComponent/TMS FNC Core/WEBLib.TMSFNCPopup.pas","C:/DelphiComponent/TMS FNC UI Pack/WEBLib.TMSFNCImage.pas","C:/DelphiComponent/TMS FNC UI Pack/WEBLib.TMSFNCCustomTreeView.pas","C:/DelphiComponent/TMS FNC UI Pack/WEBLib.TMSFNCCustomSelector.pas","C:/DelphiComponent/TMS FNC UI Pack/WEBLib.TMSFNCCustomPicker.pas","C:/DelphiComponent/TMS FNC UI Pack/WEBLib.TMSFNCControlPicker.pas","C:/DelphiComponent/TMS FNC UI Pack/WEBLib.TMSFNCTreeView.pas","C:/DelphiComponent/TMS FNC UI Pack/WEBLib.TMSFNCListBox.pas","C:/DelphiComponent/TMS FNC UI Pack/WEBLib.TMSFNCCheckedListBox.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/libcalendar.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.Calendar.pas","C:/DelphiComponent/TMS FNC UI Pack/WEBLib.TMSFNCSwitch.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.ContinuousScroll.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.Lists.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.Imaging.gifimg.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.Imaging.pngImage.pas","C:/DelphiComponent/TMS Busines Core Library/source/core/common/Bcl.Rtti.Common.pas","C:/DelphiComponent/TMS Busines Core Library/source/core/common/Bcl.Json.Common.pas","C:/DelphiComponent/TMS Busines Core Library/source/core/common/Bcl.Collections.Common.pas","C:/DelphiComponent/TMS Busines Core Library/source/core/common/Bcl.SysUtils.pas","C:/DelphiComponent/TMS Busines Core Library/source/core/common/Bcl.Utils.pas","C:/DelphiComponent/TMS XData/source/core/common/XData.Model.Types.pas","C:/DelphiComponent/TMS XData/source/core/common/XData.Types.Converters.pas","C:/DelphiComponent/TMS XData/source/core/common/XData.Utils.pas","C:/DelphiComponent/TMS XData/source/core/common/XData.Model.Classes.pas","C:/DelphiComponent/TMS XData/source/core/web/XData.Web.Headers.pas","C:/DelphiComponent/TMS XData/source/core/web/XData.Web.Request.pas","C:/DelphiComponent/TMS XData/source/core/web/XData.Web.Response.pas","C:/DelphiComponent/TMS Busines Core Library/source/core/common/Bcl.TypInfo.Common.pas","C:/DelphiComponent/TMS XData/source/core/common/XData.Model.Deserializer.pas","C:/DelphiComponent/TMS XData/source/core/web/XData.Web.Connection.pas","C:/DelphiComponent/TMS XData/source/core/web/XData.Bind.Converter.pas","C:/DelphiComponent/TMS XData/source/core/web/XData.Web.Client.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.Mask.pas","C:/DelphiComponent/TMS FNC UI Pack/WEBLib.TMSFNCDigitalTimeSelector.pas","C:/DelphiComponent/TMS FNC UI Pack/WEBLib.TMSFNCDigitalTimePicker.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/libjquery.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/jqwidget.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.JQCtrls.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/dbconst.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/db.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/jsdelphisystem.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.Ctrls.SVG.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.Grids.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.EditAutocomplete.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.DropDown.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.DBCtrls.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.SpeechRecognition.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.Clipboard.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/fpexprpars.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/jsondataset.pas","C:/DelphiComponent/TMS XData/source/core/web/XData.Web.JsonDataset.pas","C:/DelphiComponent/TMS XData/source/core/common/XData.Web.DatasetCommon.pas","C:/DelphiComponent/TMS XData/source/core/web/XData.Web.Dataset.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.DB.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.CDS.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.Toast.pas","../../PickForm.pas","../../Common.pas","../../DynamicGridSetup.pas","../../EditForm_Base.pas","../../ListForm_Base.pas","../../UDF_Schedule.pas","../../ReportForm.pas","../../MultiLevelPickForm.pas","../../UDF_CustomForm.pas","../../DBFieldSettings.pas","../../QPKLSettings.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.Actions.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/libfilereader.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/libglmatrix.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/RTL/libmedia.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.Devices.pas","../../QAI_FileUpload.pas","../../UDF_ImageCapture.pas","../../UDF_QAI.pas","../../UDF_ImageEditor.pas","../../UDF_CernerAPI.pas","../../UDF_ProcReport_EV.pas","../../UDF_ProcReport_Q.pas","../../UDF_CernerPatients.pas","../../Settings.pas","../../Login_New.pas","../../DataModule.pas","../../Picklist.pas","C:/Users/zohair/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE13/Core Source/WEBLib.Imaging.jpeg.pas","../../Login.pas","../../Main.pas","../../LoginMain.pas","../../Login2.pas","../../Q_APPBuilder.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;\r\n usage: string;\r\n sensitivity : string;\r\n ignorePunctuation : Boolean;\r\n numeric : boolean;\r\n caseFirst : string;\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\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\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 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 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 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 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}(TJSObject)\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 onunload : TJSUIEventHandler;\r\n touchstart : TJSTouchEventHandler;\r\n touchend : TJSTouchEventHandler;\r\n touchmove : TJSTouchEventHandler;\r\n touchcancel : TJSTouchEventHandler;\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 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 procedure removeEventListener(aname : string; aListener : TJSEventHandler);\r\n procedure removeEventListener(aname : string; aListener : JSValue);\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 - 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.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 - 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.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 TControl = class(TComponent)\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 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 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 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\nend;\r\n\r\nfunction TControl.HandleDoExit(Event: TEventListenerEvent): Boolean;\r\nbegin\r\n DoExit;\r\n Result := True;\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 begin\r\n FParent.RegisterParent(Self);\r\n end;\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 Realign;\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\nbegin\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 IsEnabled then\r\n FContainer.removeAttribute('disabled')\r\n else\r\n FContainer.setAttribute('disabled','');\r\n\r\n if IsLinked and (Hint = '') then\r\n Exit;\r\n\r\n if (Role <> '') then\r\n FContainer['role'] := FRole;\r\n\r\n frm := GetParentForm(Self);\r\n if Assigned(frm) and (frm.CSSLibrary = cssBootstrap) and ShowHint and (Hint <> '') and not Assigned(Self.FToolTip) 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 asm\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 ShowHint and (Hint <> '') then\r\n FContainer['title'] := Hint\r\n else\r\n FContainer.removeAttribute('title');\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 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\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 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{ 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 - 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.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\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\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\nend;\r\n\r\nconstructor TJSONNumber.Create(ANumber: Int64);\r\nbegin\r\n inherited Create;\r\n jv := ANumber;\r\nend;\r\n\r\nconstructor TJSONNumber.Create(ANumber: double);\r\nbegin\r\n inherited Create;\r\n jv := 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 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 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\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\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+QWaAAihwMWm4G8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\"+\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 - 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.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.6.0.0';\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 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 //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 {$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 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\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 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 (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 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 Result := inherited GetElementHandle\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 }\r\n Result := window.innerWidth;\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 = '') 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 // 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 end;\r\n end;\r\n\r\n // position popup form centered\r\n if Assigned(span) and (AForm.FormContainer = '') and AForm.Popup 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 if (AForm.ElementClassName = '') 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\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 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.message;\r\n pstack = Event.reason.stack;\r\n jserror = Event.reason;\r\n }\r\n }\r\n end;\r\n\r\n // ignore this error\r\n if (Event.message = 'ResizeObserver loop limit exceeded') then\r\n Exit;\r\n\r\n // ignore this error\r\n if (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 'oC23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42BcwkCAOHjxtjGhIEAkPHneGViSIhQfPW2MLE'+\r\n 'kTDQ4C9wYmEi3T4kpKSkm+5ax+YhPsUTQAAAABJRU5ErkJggg==';\r\n\r\n PlaceHolderImage = '#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.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 := 999998;\r\n FHandleOAuth := true;\r\n FHintPause := 200;\r\n FHintHidePause := 250;\r\n FHintPosition := hpTop;\r\n FHintClassName := '';\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 - 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.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 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 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 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 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 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 ParentFont;\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 FWantTabs: boolean;\r\n FAutoCompletion: TAutoCompletion;\r\n FSpellCheck: boolean;\r\n FModified: boolean;\r\n FScrollbars: TScrollStyle;\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 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 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 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 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 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 FRequired := Value;\r\n UpdateElement;\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;\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) 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 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 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 TJSHTMLOptionElement(TJSHTMLSelectElement(Container).options[Aindex]).selected := AValue;\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\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.selectedIndex := FItemIndex;\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 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 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\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.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 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\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 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\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 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 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 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\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.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.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.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 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\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 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 - 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.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 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\nbegin\r\n if Assigned(FFieldSet) then\r\n begin\r\n if WidthStyle = ssAbsolute then\r\n FFieldSet.style.setProperty('width',IntToStr(Width - 4 - 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 - 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\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.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 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 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 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 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\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 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 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 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 if not FShowTabs then\r\n (TJSHTMLElement(ul)).style.setProperty('display', 'none');\r\n\r\n Container.appendChild(ul);\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 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 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 th := Round((TJSHTMLElement(ul)).offsetHeight) - 1;\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) then\r\n OnChanging(Self, NewNode, Allow);\r\n\r\n if Allow 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\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) and Assigned(OnDblClickNode) then\r\n OnDblClickNode(Self, n);\r\n\r\n // toggle expanded state on dbl click\r\n n.Expanded := not n.Expanded;\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{ }\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 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 - 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',\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jguMjIzLDkxLjI1MDdDMTcwLjIwMyw3NC40MTczLDE3MC4yMDgsNDUuNjg2NywxNjguMjIzLDI4Ljc5MzNMMTY4LjIyMywyOC'+\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 'w5Ljk1NyAtNy40ODQsLTcuOTc1IC0xOC4xNDgsLTEyLjk1NyAtMjkuOTUsLTEyLjk1NyAtMjIuNjYsMCAtNDEuMDMzLDE4LjM3MSAtNDEuMDMzLDQxLjAzMSAwLDMuMjE2IDAuMzYzLDYuMzQ4IDEuMDYyLDkuMzUxIC0zNC4xMDIsLTEuNzExIC'+\r\n '02NC4zMzYsLTE4LjA0NyAtODQuNTc0LC00Mi44NzIgLTMuNTMyLDYuMDYgLTUuNTU2LDEzLjEwOCAtNS41NTYsMjAuNjI4IDAsMTQuMjM2IDcuMjQ0LDI2Ljc5NSAxOC4yNTQsMzQuMTUzIC02LjcyNiwtMC4yMTMgLTEzLjA1MywtMi4wNTkgLT'+\r\n 'E4LjU4NSwtNS4xMzIgLTAuMDA0LDAuMTcxIC0wLjAwNCwwLjM0MyAtMC4wMDQsMC41MTYgMCwxOS44OCAxNC4xNDQsMzYuNDY0IDMyLjkxNSw0MC4yMzQgLTMuNDQzLDAuOTM4IC03LjA2OCwxLjQzOSAtMTAuODEsMS40MzkgLTIuNjQ0LDAgLT'+\r\n 'UuMjE0LC0wLjI1OCAtNy43MiwtMC43MzYgNS4yMjIsMTYuMzAxIDIwLjM3NSwyOC4xNjUgMzguMzMxLDI4LjQ5NSAtMTQuMDQzLDExLjAwNiAtMzEuNzM1LDE3LjU2NSAtNTAuOTYsMTcuNTY1IC0zLjMxMiwwIC02LjU3OCwtMC4xOTQgLTkuNz'+\r\n 'g4LC0wLjU3NCAxOC4xNTksMTEuNjQzIDM5LjcyNywxOC40MzcgNjIuODk5LDE4LjQzNyA3NS40NzMsMCAxMTYuNzQ2LC02Mi41MjQgMTE2Ljc0NiwtMTE2Ljc0NyAwLC0xLjc3OSAtMC4wNCwtMy41NDggLTAuMTE5LC01LjMwOSA4LjAxNywtNS'+\r\n '43ODQgMTQuOTczLC0xMy4wMTEgMjAuNDc0LC0yMS4yMzkgeiIgc3R5bGU9ImZpbGw6IzNhYWFlMSIgLz4NCjwvc3ZnPg==';\r\n\r\n RenderDesigning(ClassName, Container, Self, True, img);\r\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,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjwhRE9DVFlQRSBzdmcgIFBVQkxJQyAnLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4nICAnaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkJz48c3ZnIGV'+\r\n 'uYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDEyOCAxMjgiIGlkPSJTb2NpYWxfSWNvbnMiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDEyOCAxMjgiIHhtbDpzcGFjZT0icHJlc2VydmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1s'+\r\n 'bnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxnIGlkPSJfeDMzX19zdHJva2UiPjxnIGlkPSJHb29nbGVfRHJpdmUiPjxyZWN0IGNsaXAtcnVsZT0iZXZlbm9kZCIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBoZWlnaHQ9I'+\r\n 'jEyOCIgd2lkdGg9IjEyOCIvPjxnIGlkPSJHb29nbGVfRHJpdmVfMV8iPjxwb2x5Z29uIGNsaXAtcnVsZT0iZXZlbm9kZCIgZmlsbD0iIzM3NzdFMyIgZmlsbC1ydWxlPSJldmVub2RkIiBwb2ludHM9IjIxLjMzNSwxMjAgNDIuNjY2LDgyLjY2NyAxMjgsODIuNj'+\r\n 'Y3IDEwNi42NjYsMTIwICAgICAgICAgIi8+PHBvbHlnb24gY2xpcC1ydWxlPSJldmVub2RkIiBmaWxsPSIjRkZDRjYzIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHBvaW50cz0iODUuMzM1LDgyLjY2NyAxMjgsODIuNjY3IDg1LjMzNSw4IDQyLjY2Niw4ICAgICIvPjx'+\r\n 'wb2x5Z29uIGNsaXAtcnVsZT0iZXZlbm9kZCIgZmlsbD0iIzExQTg2MSIgZmlsbC1ydWxlPSJldmVub2RkIiBwb2ludHM9IjAsODIuNjY3IDIxLjMzNSwxMjAgNjQsNDUuMzMzIDQyLjY2Niw4ICAgICIvPjwvZz48L2c+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) 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 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) 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) 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.TMSFNCUtils;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WIN64}\r\n{$HPPEMIT ''}\r\n{$HPPEMIT '#pragma link \"wininet.a\"'}\r\n{$HPPEMIT ''}\r\n{$ENDIF}\r\n\r\n{$IFDEF WIN32}\r\n{$HPPEMIT ''}\r\n{$HPPEMIT '#pragma link \"wininet.lib\"'}\r\n{$HPPEMIT '#pragma link \"urlmon.lib\"'}\r\n{$HPPEMIT ''}\r\n{$ENDIF}\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 {$IFDEF MSWINDOWS}\r\n Windows,\r\n {$ENDIF}\r\n Classes, SysUtils, Types, WEBLib.Graphics, WEBLib.TMSFNCTypes, WEBLib.Controls, WEBLib.Forms\r\n {$IFDEF FMXLIB}\r\n ,FMX.Types, WEBLib.Dialogs\r\n {$IFDEF LINUX}\r\n ,Linuxapi.Curl, 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 {$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 FNCLIB}\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n ,JSON\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\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 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(var ABias: Integer; var ABiasDay: Integer; var AIsDaylight: Boolean);\r\n {$ENDIF}\r\n public\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);\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): 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 CreateBitmapFromHexStr(const AHexStr: string): 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;\r\n class procedure LoadBitmapFromHexStr(const AHexStr: string; const ABitmap: TTMSFNCBitmapHelperClass);\r\n class procedure LoadStreamFromHexStr(const AHexStr: string; const AStream: TStream);\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);\r\n class function EpochToDateTime(const AEpoch: string): TDateTime;\r\n {$IFDEF FNCLIB}\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 ISOToDateTime(const AISOString: string): TDateTime; overload;\r\n class function ISOToDateTime(const AISOString: string; AIsUTC: Boolean): TDateTime; overload;\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;\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 class function GetJSONProp(AJSONValue: TJSONValue; APropertyName: string): string;\r\n class function GetJSONValueAsString(AJSONValue: TJSONValue): string;\r\n class function GetJSONValue(AJSONValue: TJSONValue; APropertyName: 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 {$ENDIF}\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;\r\n class function MatchStr(AValue1, AValue2:string; ACaseSensitive: Boolean): Boolean;\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 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): 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 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 GetFormat(AFormat: TTMSFNCClipBoardFormat): Cardinal; virtual;\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 GetFormat(AFormat: TTMSFNCClipBoardFormat): string; virtual;\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 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 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 WEBLIB}\r\nfunction CreateUploadFile(AName: string; AData: TJSUint8Array): TTMSFNCUtilsFile;\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\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.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\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\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 = 86;\r\n JSONNumSpecialChar = 7;\r\n{$IFNDEF LCLLIB}\r\n FPC_FULLVERSION = 0;\r\n{$ENDIF}\r\n\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 'å','Å','(c)','®',\r\n '€','«','»','ã',\r\n 'Ã','õ','Õ','™',\r\n '§','¶','ß','£',\r\n '$','§','‰','¶',\r\n '''','¥','¤','¢',\r\n '±','¡','°','ý','Ý',\r\n '¼','½','¾','Æ',\r\n 'æ','Ñ','ñ','Ð');\r\n\r\n HTMLSpecialChar : array[1..HTMLNumSpecialChar] of string = ('amp;','lt;','gt;','quot;',' ',\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 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\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] = '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 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(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 lTimeZone: TTimeZoneInformation;\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 AIsDayLight := (GetTimeZoneInformation(lTimeZone) = TIME_ZONE_ID_DAYLIGHT);\r\n ABias := lTimeZone.Bias;\r\n ABiasday := lTimeZone.DaylightBias;\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(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\nclass function TTMSFNCUtils.ISOToDateTime(const AISOString: string): TDateTime;\r\nvar\r\n da,mo,ye,ho,mi,se: 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 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 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,0);\r\nend;\r\n\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\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 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 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 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 Val(Copy(s,SignPosition + 4,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 end;\r\n\r\n Result := EncodeDate(ye,mo,da) + EncodeTime(ho,mi,se,0);\r\n Result := AdjustDateTime(Result, HourOffset, MinuteOffset);\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\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{$ENDIF}\r\n{$ENDIF}\r\n{$ENDIF}\r\n{$ENDIF}\r\n{$ENDIF}\r\nend;\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.UnFixMarkup(su:string;SpecialChars: boolean = true):string;\r\nvar\r\n i: integer;\r\nbegin\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\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\nclass function TTMSFNCUtils.GetImageType(AData: TStream; AResetPosition: Boolean = True): string;\r\n{$IFDEF WEBLIB}\r\nbegin\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..9] 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,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: '.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\nfunction CalculateDPIScale(AForm: TCustomForm; AHDC: HDC; ADefaultDPI: Integer = 0): single; overload;\r\nbegin\r\n Result := 1.0;\r\n if Assigned(AForm) and (AForm is TForm) then\r\n begin\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION >= 31}\r\n if Assigned(AForm) and (AForm is TForm) and (AForm as TForm).Scaled then\r\n begin\r\n if ADefaultDPI > 0 then\r\n Result := TForm(AForm).Monitor.PixelsPerInch / ADefaultDPI\r\n else\r\n begin\r\n {$IF COMPILERVERSION > 34}\r\n Result := TForm(AForm).Monitor.PixelsPerInch / AForm.PixelsPerInch\r\n {$ELSE}\r\n Result := TForm(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((AForm as TForm).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 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\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 function TTMSFNCUtils.GetDPIScale(AOwner: TComponent = nil; ADefaultDPI: Integer = -1): Single;\r\n{$IFDEF FMXLIB}\r\nvar\r\n {$IFDEF MSWINDOWS}\r\n frm: TCustomForm;\r\n {$ELSE}\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 := GetOwnerForm(AOwner);\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 := GetOwnerForm(AOwner);\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\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\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).AsInteger;\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.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\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 Result := (AJSONValue as TJSONObject).Values[APropertyName];\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 Result := AJSONArray.Count;\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 Result := AJSONArray.Items[AIndex];\r\nend;\r\n\r\nclass function TTMSFNCUtils.GetJSONObjectSize(AJSONObject: TJSONObject): Integer;\r\nbegin\r\n Result := AJSONObject.Count;\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 p := AJSONObject.Pairs[AIndex];\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 p := AJSONObject.Pairs[AIndex];\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);\r\nbegin\r\n {$IFDEF FMXLIB}\r\n AFont.Size := ASize;\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), 96, 72);\r\n {$ENDIF}\r\nend;\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\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\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\r\nclass function TTMSFNCUtils.MulDivSingle(nNumber, nNumerator, nDenominator: Single): Single;\r\nbegin\r\n Result := MulDivInt(Round(nNumber), Round(nNumerator), Round(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 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.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\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\r\n{$IFDEF FNCLIB}\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\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 b: TBase64Encoding;\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 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 {$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\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 b: TBase64Encoding;\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 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 {$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\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\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\r\n{$ENDIF}\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 // Going backwards: from bytestream, to percent-encoding, to original string.\r\n return decodeURIComponent(atob(str).split('').map(function(c) {\r\n return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);\r\n }).join(''));\r\n }\r\n s = b64DecodeUnicode(s);\r\n end;\r\n {$ENDIF}\r\n ss := TStringStream.Create('');\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 b: TBase64Encoding;\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 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 {$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 // Going backwards: from bytestream, to percent-encoding, to original string.\r\n return decodeURIComponent(atob(str).split('').map(function(c) {\r\n return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);\r\n }).join(''));\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): 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 {$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 sab[sabc] := 0;\r\n sab[sabc + 1] := 0;\r\n\r\n {$IFDEF LCLLIB}\r\n res := Trim(UTF8Encode(TEncoding.UTF8.GetString(sab)));\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n res := Trim(TEncoding.UTF8.GetString(sab));\r\n {$ENDIF}\r\n Result := res;\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.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 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\nbegin\r\n {$IFDEF WEBLIB}\r\n while (Pos(ThousandSeparator, ps) > 0) do\r\n Delete(ps, Pos(ThousandSeparator, ps), 1);\r\n Result := ps;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n while (Pos(FormatSettings.ThousandSeparator, ps) > 0) do\r\n Delete(ps, Pos(FormatSettings.ThousandSeparator, ps), 1);\r\n Result := ps;\r\n {$ENDIF}\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 {$IFDEF WEBLIB}\r\n su := UpperCase(ShortDateFormat);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n su := UpperCase(FormatSettings.ShortDateFormat);\r\n {$ENDIF}\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 {$IFDEF WEBLIB}\r\n if TTMSFNCUtils.VarPos(DateSeparator,AValue,vp)>0 then\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n if TTMSFNCUtils.VarPos(FormatSettings.DateSeparator,AValue,vp)>0 then\r\n {$ENDIF}\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 {$IFDEF WEBLIB}\r\n if TTMSFNCUtils.VarPos(DateSeparator,AValue,vp)>0 then\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n if TTMSFNCUtils.VarPos(FormatSettings.DateSeparator,AValue,vp)>0 then\r\n {$ENDIF}\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 {$IFDEF WEBLIB}\r\n if TTMSFNCUtils.VarPos(TimeSeparator,ts,vp)>0 then\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n if TTMSFNCUtils.VarPos(FormatSettings.TimeSeparator,ts,vp)>0 then\r\n {$ENDIF}\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 {$IFDEF WEBLIB}\r\n if TTMSFNCUtils.VarPos(TimeSeparator,ts,vp)>0 then // there is a second part\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n if TTMSFNCUtils.VarPos(FormatSettings.TimeSeparator,ts,vp)>0 then // there is a second part\r\n {$ENDIF}\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 {$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 (s0a[s2 - i] =' ') do inc(s2);\r\n s3 := s2;\r\n len := 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\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 (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\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(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\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.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 TWinControl(Self).PaintTo(bmp.Canvas.Handle, 0, 0);\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 := '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{$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\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{$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: Integer;\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\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.SetValue(AValue: TValue; AFormat: Cardinal);\r\n{$ELSE}\r\nclass procedure TTMSFNCClipBoard.SetValue(AValue: TValue; AFormat: String);\r\n{$ENDIF}\r\n{$IFDEF MACOS}\r\nvar\r\n{$IFDEF IOS}\r\n pb: UIPasteboard;\r\n dic: NSDictionary;\r\n pValue: Pointer;\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 l: integer;\r\n{$ENDIF}\r\n{$IFDEF ANDROID}\r\nvar\r\n c: JClipData;\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 bs: TBitmapSurface;\r\n b: TBitmap;\r\n{$ENDIF}\r\n{$ENDIF}\r\nbegin\r\n if AValue.IsObject then\r\n begin\r\n if AValue.IsType then\r\n AValue.AsType.Position := 0;\r\n end;\r\n\r\n {$IFDEF MACOS}\r\n {$IFDEF IOS}\r\n pb := TUIPasteboard.Wrap(TUIPasteboard.OCClass.generalPasteboard);\r\n if AValue.IsType then\r\n pValue := TNSData.OCClass.dataWithBytes(AValue.AsType.Memory, AValue.AsType.Size)\r\n else if AValue.IsType then\r\n pValue := (TTMSFNCUtils.NSStrEx(AValue.AsType) as ILocalObject).GetObjectID\r\n else\r\n pValue := (SetCustomValue(AFormat, AValue) as ILocalObject).GetObjectID;\r\n\r\n if Assigned(pValue) then\r\n begin\r\n dic := TNSDictionary.Wrap(TNSDictionary.OCClass.dictionaryWithObject(pValue, (TTMSFNCUtils.NSStrEx(AFormat) as ILocalObject).GetObjectID));\r\n pb.addItems(TNSArray.Wrap(TNSArray.OCClass.arrayWithObject((dic as ILocalObject).GetObjectID)));\r\n end;\r\n {$ELSE}\r\n pb := TNSPasteboard.Wrap(TNSPasteboard.OCClass.generalPasteboard);\r\n pb.declareTypes(TNSArray.Wrap(TNSArray.OCClass.arrayWithObject((TTMSFNCUtils.NSStrEx(AFormat) as ILocalObject).GetObjectID)), nil);\r\n pbit := TNSPasteboardItem.Wrap(TNSPasteboardItem.Wrap(TNSPasteboardItem.OCClass.alloc).init);\r\n if AValue.IsType then\r\n pbit.setData(TNSData.Wrap(TNSData.OCClass.dataWithBytes(AValue.AsType.Memory, AValue.AsType.Size)), TTMSFNCUtils.NSStrEx(AFormat))\r\n else if AValue.IsType then\r\n pbit.setData(TTMSFNCUtils.NSStrEx(AValue.AsType).dataUsingEncoding(NSUTF8StringEncoding), TTMSFNCUtils.NSStrEx(AFormat))\r\n else\r\n pbit.setData(SetCustomValue(AFormat, AValue), TTMSFNCUtils.NSStrEx(AFormat));\r\n\r\n pb.writeObjects(TNSArray.Wrap(TNSArray.OCClass.arrayWithObject((pbit as ILocalObject).GetObjectID)));\r\n {$ENDIF}\r\n{$ENDIF}\r\n\r\n{$IFDEF MSWINDOWS}\r\n if AValue.IsObject and AValue.IsType then\r\n hMem := GlobalAlloc(GHND or GMEM_DDESHARE, AValue.AsType.Size)\r\n else if AValue.IsType then\r\n begin\r\n txt := AValue.AsString;\r\n if AFormat = 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(AFormat, AValue);\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 AValue.IsObject and AValue.IsType then\r\n begin\r\n AValue.AsType.Read(pMem^, AValue.AsType.Size);\r\n AValue.AsType.Position := 0;\r\n end\r\n else if AValue.IsType then\r\n begin\r\n if AFormat = 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 AFormat = CF_TEXT then\r\n AFormat := 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(AFormat, AValue, pMem);\r\n finally\r\n GlobalUnlock(hMem);\r\n end;\r\n OpenClipboard(0);\r\n try\r\n SetClipboardData(AFormat, 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{$ENDIF}\r\n\r\n{$IFDEF ANDROID}\r\n if Assigned(FClipboardManager) and AValue.IsType then\r\n FClipboardManager.setText(StrToJCharSequence(AValue.AsType))\r\n else if Assigned(FContentClipboardManager) then\r\n begin\r\n if AValue.IsType then\r\n begin\r\n int := TJIntent.Create;\r\n bt := TJavaArray.Create(AValue.AsType.Size - AValue.AsType.Position);\r\n AValue.AsType.Read(bt.Data^, AValue.AsType.Size - AValue.AsType.Position);\r\n int.putExtra(StringToJString(AFormat), bt);\r\n c := TJClipData.JavaClass.newIntent(StrToJCharSequence('Stream'), int);\r\n FContentClipboardManager.setPrimaryClip(c);\r\n end\r\n else if AValue.IsType then\r\n begin\r\n if AFormat = GetFormat(cfHTML) then\r\n c := TJClipData.JavaClass.newHtmlText(StrToJCharSequence(AFormat), StrToJCharSequence(TTMSFNCUtils.HTMLStrip(AValue.AsType)), StringToJString(AValue.AsType))\r\n else\r\n c := TJClipData.JavaClass.newPlainText(StrToJCharSequence(AFormat), StrToJCharSequence(AValue.AsType));\r\n\r\n FContentClipboardManager.setPrimaryClip(c);\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 if AValue.IsType then\r\n begin\r\n bs := TBitmapSurface.Create;\r\n try\r\n bs.Assign(AValue.AsType);\r\n clip.SetImage(bs);\r\n finally\r\n bs.Free;\r\n end;\r\n end\r\n else if AValue.IsType then\r\n begin\r\n if AFormat = GetFormat(cfBitmap) then\r\n begin\r\n b := TBitmap.Create;\r\n bs := TBitmapSurface.Create;\r\n try\r\n b.LoadFromStream(AValue.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(AFormat, AValue.AsType)\r\n end\r\n else if AValue.IsType then\r\n clip.SetText(AValue.AsType);\r\n end;\r\n{$ENDIF}\r\n{$ENDIF}\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF WEBLIB}\r\nclass function TTMSFNCClipBoard.GetBitmap: TTMSFNCBitmap;\r\nbegin\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 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 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 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 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 const element = document.createElement('textarea');\r\n element.value = AText;\r\n document.body.appendChild(element);\r\n element.focus();\r\n element.setSelectionRange(0, element.value.length);\r\n document.execCommand('copy');\r\n document.body.removeChild(element);\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/x-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 {$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 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 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 = {$IFNDEF WEBLIB}1{$ELSE}2{$ENDIF}); 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 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 LCLLIB}\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.HasNext: boolean;\r\nbegin\r\n Result := not (NextPeek in [TTMSFNCJSONState.jstEndObject, TTMSFNCJSONState.jstEndArray]);\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 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 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 TryStrToFloat(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 := StrToFloat(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 := StrToFloat(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 := StrToFloat(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 c: String;\r\n s: string;\r\nbegin\r\n Result := '';\r\n s := '';\r\n while not FReader.Eof do\r\n begin\r\n c := ReadChar;\r\n if (c = '\"') then\r\n Break\r\n else\r\n s := s + 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('');\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 - {$IFNDEF WEBLIB}1{$ELSE}2{$ENDIF};\r\nend;\r\n\r\nprocedure TTMSFNCJSONStreamReader.MoveNext(const Count: integer = {$IFNDEF WEBLIB}1{$ELSE}2{$ENDIF});\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 FClosed: boolean;\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\nresourcestring\r\n ErrInvalidString = 'The file contains a string that can''t be encoded in UTF-8';\r\n\r\nprocedure RaiseErrInvalidString;\r\nbegin\r\n raise Exception.Create(ErrInvalidString);\r\nend;\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\n FClosed := true;\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(FloatToStr(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('');\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 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) 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 LCLWEBLIB}\r\n Generics.Collections,\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Contnrs,\r\n {$ENDIF}\r\n Classes, TypInfo, Variants, SysUtils,\r\n WEBLib.TMSFNCTypes,\r\n WEBLib.TMSFNCJSONReader,\r\n WEBLib.TMSFNCJSONWriter;\r\n\r\ntype\r\n TStreamEx = TStream;\r\n\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: TStreamEx; AAppearanceOnly: Boolean = False);\r\n procedure LoadSettingsFromStream(AStream: TStreamEx);\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 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 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 TTMSFNCObjectList = class(TObjectList)\r\n private\r\n function GetItem(Index: Integer): TObject;\r\n procedure SetItem(Index: Integer; const Value: TObject);\r\n public\r\n property Items[Index: Integer]: TObject read GetItem write SetItem; default;\r\n end;\r\n \r\n TTMSFNCStringList = class(TList)\r\n private\r\n function GetItem(Index: Integer): String;\r\n procedure SetItem(Index: Integer; const Value: String);\r\n public\r\n property Items[Index: Integer]: String read GetItem write SetItem; default;\r\n end;\r\n\r\n TTMSFNCIntegerList = 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\r\n TTMSFNCDoubleList = class(TList)\r\n private\r\n function GetItem(Index: Integer): Double;\r\n procedure SetItem(Index: Integer; const Value: Double);\r\n public\r\n property Items[Index: Integer]: Double read GetItem write SetItem; default;\r\n end;\r\n\r\n TTMSFNCPropertyInfo = TTypeMemberProperty;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCObjectList = class(TObjectList);\r\n TTMSFNCStringList = class(TList);\r\n TTMSFNCIntegerList = class(TList);\r\n TTMSFNCDoubleList = class(TList);\r\n TTMSFNCObjectDictionary = class(TDictionary);\r\n TTMSFNCPropertyInfo = PPropInfo;\r\n {$ENDIF}\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 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 {$IFNDEF LCLWEBLIB}\r\n procedure WriteGenericDictionary(ADictionary: TTMSFNCObjectDictionary);\r\n {$ENDIF}\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: TStreamEx);\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 TTMSFNCReader = class\r\n private\r\n type\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 {$IFDEF WEBLIB}\r\n TTMSFNCObjectReferences = class(TObjectList)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCObjectReference;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCObjectReference);\r\n public\r\n property Items[Index: Integer]: TTMSFNCObjectReference read GetItem write SetItem; default;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCObjectReferences = TObjectList;\r\n {$ENDIF}\r\n private\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 {$IFNDEF LCLWEBLIB}\r\n procedure ReadGenericDictionary(ADictionary: TTMSFNCObjectDictionary);\r\n {$ENDIF}\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: TStreamEx);\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 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: TStreamEx);\r\n class procedure LoadSettingsFromStream(AObject: TObject; AStream: TStreamEx);\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 IsGenericList(AClass: TClass; AType: string = ''): Boolean; virtual;\r\n {$IFNDEF LCLWEBLIB}\r\n class function IsGenericDictionary(AClass: TClass): Boolean; virtual;\r\n {$ENDIF}\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\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\nimplementation\r\n\r\nuses\r\n {$IFDEF FMXLIB}\r\n UITypes,\r\n {$ENDIF}\r\n StrUtils,\r\n WEBLib.Controls,\r\n WEBLib.Graphics,\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\ntype\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{ TTMSFNCWriter }\r\n\r\nconstructor TTMSFNCWriter.Create(AStream: TStreamEx);\r\nbegin\r\n FWriter := TTMSFNCJSONWriter.Create(AStream);\r\nend;\r\n\r\ndestructor TTMSFNCWriter.Destroy;\r\nbegin\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\n{$IFNDEF LCLWEBLIB}\r\nprocedure TTMSFNCWriter.WriteGenericDictionary(\r\n ADictionary: TTMSFNCObjectDictionary);\r\nvar\r\n k: string;\r\nbegin\r\n Writer.WriteBeginArray;\r\n for k in ADictionary.Keys do\r\n begin\r\n Writer.WriteBeginObject;\r\n Writer.WriteName(k);\r\n WriteSingleObject(ADictionary[k]);\r\n Writer.WriteEndObject;\r\n end;\r\n Writer.WriteEndArray;\r\nend;\r\n{$ENDIF}\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\nvar\r\n ms: TMemoryStream;\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 {$IFNDEF LCLWEBLIB}\r\n else if TTMSFNCPersistence.IsGenericDictionary(AObject.ClassType) then\r\n WriteGenericDictionary(TTMSFNCObjectDictionary(AObject))\r\n {$ENDIF}\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\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\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 LCLWEBLIB}\r\n tkBool: Writer.WriteBoolean(Boolean(GetOrdProp(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 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 //raise ETMSFNCReaderException.CreateFmt('Cannot write property %s with type %s', [pName, en]);\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\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 p: TTMSFNCPropertyInfo;\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 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 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: TStreamEx);\r\nbegin\r\n FReader := TTMSFNCJSONReader.Create(AStream);\r\n FReferences := TTMSFNCObjectReferences.Create(true);\r\nend;\r\n\r\ndestructor TTMSFNCReader.Destroy;\r\nbegin\r\n FReader.Free;\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 cn := Reader.ReadString;\r\n end;\r\n\r\n if cn = '' then\r\n cn := ABaseClass.ClassName;\r\n\r\n if Assigned(FIOReference) then\r\n begin\r\n Result := nil;\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 else\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 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.ReadNull;\r\nend;\r\n\r\n{$IFNDEF LCLWEBLIB}\r\nprocedure TTMSFNCReader.ReadGenericDictionary(ADictionary: TTMSFNCObjectDictionary);\r\nvar\r\n obj: TObject;\r\n k: string;\r\n c: TClass;\r\n i: ITMSFNCBaseListIO;\r\nbegin\r\n c := TObject;\r\n if Supports(ADictionary, ITMSFNCBaseListIO, i) then\r\n c := i.GetItemClass;\r\n\r\n ADictionary.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 Reader.ReadBeginObject;\r\n k := Reader.ReadName;\r\n obj := ReadSingleObject(c);\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 Reader.ReadEndArray;\r\nend;\r\n{$ENDIF}\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\nbegin\r\n c := TObject;\r\n if Supports(AList, ITMSFNCBaseListIO, i) then\r\n c := i.GetItemClass;\r\n\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 := ReadSingleObject(c);\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 else\r\n Reader.SkipValue;\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 ms: TMemoryStream;\r\nbegin\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\nbegin\r\n c := TObject;\r\n if Supports(ACollection, ITMSFNCBaseListIO, i) then\r\n c := i.GetItemClass;\r\n\r\n ACollection.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 := ReadSingleObject(c);\r\n if Assigned(obj) then\r\n begin\r\n try\r\n if obj is TPersistent then\r\n ACollection.Add.Assign(obj as TPersistent);\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 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\nbegin\r\n c := TObject;\r\n if Supports(AList, ITMSFNCBaseListIO, i) then\r\n c := i.GetItemClass;\r\n\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 := ReadSingleObject(c);\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 else\r\n Reader.SkipValue;\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 {$IFNDEF LCLWEBLIB}\r\n else if TTMSFNCPersistence.IsGenericDictionary(AObject.ClassType) then\r\n ReadGenericDictionary(TTMSFNCObjectDictionary(AObject))\r\n {$ENDIF}\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\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 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) then\r\n ReadGenericObjectList(TTMSFNCObjectList(GetObjectProp(AObject, pName)))\r\n {$IFNDEF LCLWEBLIB}\r\n else if TTMSFNCPersistence.IsGenericDictionary(ct) then\r\n ReadGenericDictionary(TTMSFNCObjectDictionary(GetObjectProp(AObject, pName)))\r\n {$ENDIF}\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\nend;\r\n\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\nbegin\r\n if TTMSFNCPersistence.IsWriteOnly(APropInfo) 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 SetOrdProp(o, pName, HTMLToColorEx(cnv));\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 SetOrdProp(o, p, Integer(b))\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 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 //raise ETMSFNCReaderException.CreateFmt('Cannot read property %s with type %s', [pName, en]);\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\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{ TTMSFNCReader.TTMSFNCObjectReference }\r\n\r\nconstructor TTMSFNCReader.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: TStreamEx);\r\nvar\r\n Reader: TTMSFNCReader;\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 AStream.Position := 0;\r\n Reader := TTMSFNCReader.Create(AStream);\r\n t := FormatSettings.ThousandSeparator;\r\n d := FormatSettings.DecimalSeparator;\r\n try\r\n Reader.IOReference := TTMSFNCPersistence.IOReference;\r\n Reader.RootObject := TTMSFNCPersistence.RootObject;\r\n Reader.OnCustomReadProperty := DoCustomReadProperty;\r\n FormatSettings.DecimalSeparator := '.';\r\n FormatSettings.ThousandSeparator := ',';\r\n Reader.Read(AObject);\r\n finally\r\n FormatSettings.DecimalSeparator := d;\r\n FormatSettings.ThousandSeparator := t;\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: TStreamEx);\r\nvar\r\n Writer: TTMSFNCWriter;\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 Writer := TTMSFNCWriter.Create(AStream);\r\n t := FormatSettings.ThousandSeparator;\r\n d := FormatSettings.DecimalSeparator;\r\n try\r\n Writer.IOReference := TTMSFNCPersistence.IOReference;\r\n Writer.RootObject := TTMSFNCPersistence.RootObject;\r\n Writer.OnCustomWriteProperty := DoCustomWriteProperty;\r\n FormatSettings.DecimalSeparator := '.';\r\n FormatSettings.ThousandSeparator := ',';\r\n Writer.Write(AObject);\r\n finally\r\n FormatSettings.DecimalSeparator := d;\r\n FormatSettings.ThousandSeparator := t;\r\n Writer.Free;\r\n end;\r\nend;\r\n\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.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\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\n{$IFNDEF LCLWEBLIB}\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{$ENDIF}\r\n\r\nclass function TTMSFNCPersistence.IsGenericList(AClass: TClass; AType: string = ''): 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('TList<', cn) or AnsiStartsStr('TObjectList<', cn) then\r\n begin\r\n if (AType = '') or ((AType <> '') 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 raise ETMSFNCReaderException.CreateFmt('Type \"%s\" not found', [AClassName]);\r\n if not ObjType.InheritsFrom(TObject) then\r\n raise ETMSFNCReaderException.Create('Type \"%s\" is not an class type');\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\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{$IFDEF WEBLIB}\r\nfunction TTMSFNCReader.TTMSFNCObjectReferences.GetItem(Index: Integer): TTMSFNCObjectReference;\r\nbegin\r\n Result := TTMSFNCObjectReference(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCReader.TTMSFNCObjectReferences.SetItem(Index: Integer; const Value: TTMSFNCObjectReference);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF WEBLIB}\r\nfunction TTMSFNCStringList.GetItem(Index: Integer): String;\r\nbegin\r\n Result := String(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCStringList.SetItem(Index: Integer; const Value: String);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nfunction TTMSFNCDoubleList.GetItem(Index: Integer): Double;\r\nbegin\r\n Result := Double(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCDoubleList.SetItem(Index: Integer; const Value: Double);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nfunction TTMSFNCIntegerList.GetItem(Index: Integer): Integer;\r\nbegin\r\n Result := Integer(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCIntegerList.SetItem(Index: Integer; const Value: Integer);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nfunction TTMSFNCObjectList.GetItem(Index: Integer): TObject;\r\nbegin\r\n Result := TObject(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCObjectList.SetItem(Index: Integer; const Value: TObject);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n{$ENDIF}\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);\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('');\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\ninitialization\r\n TTMSFNCPersistence.ClassTypeVariable := '$type';\r\n\r\nend.\r\n\r\n\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.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 > 27}\r\n{$DEFINE SUPPORTSHELPERS}\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ELSE}\r\n{$DEFINE SUPPORTSHELPERS}\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 {$ENDIF}\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\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, fpjson,\r\n {$ENDIF}\r\n Types, Classes, WEBLib.Graphics\r\n ,SysUtils, WEBLib.Controls, Math\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/Download/Manuals/TMSFNCUIPackDevGuide.pdf';\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 or pidOSX32{$IF COMPILERVERSION > 32} or pidOSX64{$IFEND}{$IF COMPILERVERSION > 33} or pidLinux64{$IFEND};\r\n TMSPlatforms = pidWin32 or pidWin64 or pidOSX32{$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;\r\n TMSPlatforms = pidWin32 or pidWin64;\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 TPopupMenu = class(TComponent);\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 TTMSFNCSVGImport = class\r\n private\r\n FViewRect: TRectF;\r\n FGrayScale: Boolean;\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 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 property GrayScale: Boolean read FGrayScale write FGrayScale default False;\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 {$IFDEF VCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION >= 33}\r\n TTMSFNCSVGImageCollectionItem = class(TCollectionItem)\r\n private\r\n FData: TPicture;\r\n FName: String;\r\n procedure SetData(const Value: TPicture);\r\n procedure SetName(const Value: String);\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 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 LoadFromText(const AText: string); virtual;\r\n procedure SaveToStream(Stream: TStream); virtual;\r\n procedure SaveToFile(const AFilename: 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 public\r\n function HasSVG: Boolean; virtual;\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 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 {$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 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 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 {$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\n{$IFDEF SVGSUPPORT}\r\n{$IFDEF VCLLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION >= 33}\r\n\r\n{$R TMSFNCSVGImageCollection.dcr}\r\n\r\nprocedure Register;\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n{$ENDIF}\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\nprocedure Register;\r\nbegin\r\n {$IFDEF SVGSUPPORT}\r\n RegisterComponents('TMS FNC UI', [TTMSFNCSVGImageCollection]);\r\n {$ENDIF}\r\nend;\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.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\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\nprocedure TTMSFNCMemoryStream.OpenFile(FileType: string);\r\nvar\r\n b: TBytes;\r\n s: string;\r\n f: string;\r\nbegin\r\n f := 'tmp.' + TTMSFNCUtils.GetFileExtension(FileType);\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{$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\nprocedure TTMSFNCBitmap.LoadFromText(const AText: 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(AText);\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\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);\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\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('');\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('');\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{$IFDEF CMNLIB}\r\n\r\n{ TTMSFNCBitmap }\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\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.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 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 TTMSFNCGraphicsSVGImport((it.Data.Graphic as TTMSFNCSVGBitmap).SVG).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\nend;\r\n\r\nprocedure TTMSFNCSVGImageCollectionItem.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCSVGImageCollectionItem then\r\n begin\r\n FData.Assign((Source as TTMSFNCSVGImageCollectionItem).Data);\r\n FName := (Source as TTMSFNCSVGImageCollectionItem).Name;\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 IsGraphicClassRegistered('.svg') then}\r\n TPicture.RegisterFileFormat('SVG', 'Scalable Vector Graphics (FNC)', TTMSFNCSVGBitmap);\r\nend;\r\n\r\nfinalization\r\n TPicture.UnregisterGraphicClass(TTMSFNCSVGBitmap);\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;\r\n function Insert(index: Integer): TTMSFNCGraphicsFillGradientItem;\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 FColor: TTMSFNCGraphicsColor;\r\n FColorTo: TTMSFNCGraphicsColor;\r\n FColorMirror: TTMSFNCGraphicsColor;\r\n FColorMirrorTo: 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 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 default gfkSolid;\r\n property Orientation: TTMSFNCGraphicsFillOrientation read FOrientation write SetOrientation default gfoVertical;\r\n property Color: TTMSFNCGraphicsColor read FColor write SetColor default gcWhite;\r\n property ColorTo: TTMSFNCGraphicsColor read FColorTo write SetColorTo default gcGray;\r\n property ColorMirror: TTMSFNCGraphicsColor read FColorMirror write SetColorMirror default gcNull;\r\n property ColorMirrorTo: TTMSFNCGraphicsColor read FColorMirrorTo write SetColorMirrorTo default gcNull;\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); 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 {$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;\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 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 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 protected\r\n procedure Changed;\r\n property OnChanged: TNotifyEvent read FOnChanged write FOnChanged;\r\n property Kind: TTMSFNCGraphicsStrokeKind read FKind write SetKind default gskSolid;\r\n property Color: TTMSFNCGraphicsColor read FColor write SetColor default gcSilver;\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 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);\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 TTMSFNCGraphicsCorner = (gcTopLeft, gcTopRight, gcBottomLeft, gcBottomRight);\r\n TTMSFNCGraphicsCorners = set of TTMSFNCGraphicsCorner;\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: TStringList;\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: TStringList;\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: TStringList;\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 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\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 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\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 := -11;\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\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);\r\nbegin\r\n FGradientItems := TTMSFNCGraphicsFillGradientItems.Create(Self);\r\n FKind := 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 FOpacity := 1;\r\n FOrientation := gfoVertical;\r\n FColorTo := gcGray;\r\n FColorMirror := gcNull;\r\n FColorMirrorTo := gcNull;\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.IsGradientAngleStored: Boolean;\r\nbegin\r\n Result := GradientAngle <> 0;\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 FColor := 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.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);\r\nvar\r\n c: TTMSFNCGraphicsCorners;\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 c := [gcTopLeft, gcTopRight, gcBottomLeft, gcBottomRight];\r\n if gcBottomLeft in c 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 c 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 c 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 c 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 c 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\nprocedure DestroyColorLookup;\r\nvar\r\n I: Integer;\r\n {$IFNDEF FMXLIB}\r\n obj: TTMSFNCGraphicsColorObject;\r\n {$ENDIF}\r\nbegin\r\n {$IFDEF FMXLIB}\r\n for I := 0 to FColorLookup.Count - 1 do\r\n FColorLookup.Objects[I].DisposeOf;\r\n {$ELSE}\r\n for I := 0 to FColorLookup.Count - 1 do\r\n begin\r\n obj := TTMSFNCGraphicsColorObject(FColorLookup.Objects[I]);\r\n obj.Free;\r\n end;\r\n {$ENDIF}\r\n\r\n FColorLookup.Free;\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\ninitialization\r\nbegin\r\n fcolorlookup := TStringList.Create;\r\n fcolorlookup.addobject('aliceblue', TTMSFNCGraphicsColorObject.Create(gcaliceblue));\r\n fcolorlookup.addobject('antiquewhite', TTMSFNCGraphicsColorObject.Create(gcantiquewhite));\r\n fcolorlookup.addobject('aqua', TTMSFNCGraphicsColorObject.Create(gcaqua));\r\n fcolorlookup.addobject('aquamarine', TTMSFNCGraphicsColorObject.Create(gcaquamarine));\r\n fcolorlookup.addobject('azure', TTMSFNCGraphicsColorObject.Create(gcazure));\r\n fcolorlookup.addobject('beige', TTMSFNCGraphicsColorObject.Create(gcbeige));\r\n fcolorlookup.addobject('bisque', TTMSFNCGraphicsColorObject.Create(gcbisque));\r\n fcolorlookup.addobject('black', TTMSFNCGraphicsColorObject.Create(gcblack));\r\n fcolorlookup.addobject('blanchedalmond', TTMSFNCGraphicsColorObject.Create(gcblanchedalmond));\r\n fcolorlookup.addobject('blue', TTMSFNCGraphicsColorObject.Create(gcblue));\r\n fcolorlookup.addobject('blueviolet', TTMSFNCGraphicsColorObject.Create(gcblueviolet));\r\n fcolorlookup.addobject('brown', TTMSFNCGraphicsColorObject.Create(gcbrown));\r\n fcolorlookup.addobject('burlywood', TTMSFNCGraphicsColorObject.Create(gcburlywood));\r\n fcolorlookup.addobject('cadetblue', TTMSFNCGraphicsColorObject.Create(gccadetblue));\r\n fcolorlookup.addobject('chartreuse', TTMSFNCGraphicsColorObject.Create(gcchartreuse));\r\n fcolorlookup.addobject('chocolate', TTMSFNCGraphicsColorObject.Create(gcchocolate));\r\n fcolorlookup.addobject('coral', TTMSFNCGraphicsColorObject.Create(gccoral));\r\n fcolorlookup.addobject('cornflowerblue', TTMSFNCGraphicsColorObject.Create(gccornflowerblue));\r\n fcolorlookup.addobject('cornsilk', TTMSFNCGraphicsColorObject.Create(gccornsilk));\r\n fcolorlookup.addobject('crimson', TTMSFNCGraphicsColorObject.Create(gccrimson));\r\n fcolorlookup.addobject('cyan', TTMSFNCGraphicsColorObject.Create(gccyan));\r\n fcolorlookup.addobject('darkblue', TTMSFNCGraphicsColorObject.Create(gcdarkblue));\r\n fcolorlookup.addobject('darkcyan', TTMSFNCGraphicsColorObject.Create(gcdarkcyan));\r\n fcolorlookup.addobject('darkgoldenrod', TTMSFNCGraphicsColorObject.Create(gcdarkgoldenrod));\r\n fcolorlookup.addobject('darkgray', TTMSFNCGraphicsColorObject.Create(gcdarkgray));\r\n fcolorlookup.addobject('darkgreen', TTMSFNCGraphicsColorObject.Create(gcdarkgreen));\r\n fcolorlookup.addobject('darkgrey', TTMSFNCGraphicsColorObject.Create(gcdarkgrey));\r\n fcolorlookup.addobject('darkkhaki', TTMSFNCGraphicsColorObject.Create(gcdarkkhaki));\r\n fcolorlookup.addobject('darkmagenta', TTMSFNCGraphicsColorObject.Create(gcdarkmagenta));\r\n fcolorlookup.addobject('darkolivegreen', TTMSFNCGraphicsColorObject.Create(gcdarkolivegreen));\r\n fcolorlookup.addobject('darkorange', TTMSFNCGraphicsColorObject.Create(gcdarkorange));\r\n fcolorlookup.addobject('darkorchid', TTMSFNCGraphicsColorObject.Create(gcdarkorchid));\r\n fcolorlookup.addobject('darkred', TTMSFNCGraphicsColorObject.Create(gcdarkred));\r\n fcolorlookup.addobject('darksalmon', TTMSFNCGraphicsColorObject.Create(gcdarksalmon));\r\n fcolorlookup.addobject('darkseagreen', TTMSFNCGraphicsColorObject.Create(gcdarkseagreen));\r\n fcolorlookup.addobject('darkslateblue', TTMSFNCGraphicsColorObject.Create(gcdarkslateblue));\r\n fcolorlookup.addobject('darkslategray', TTMSFNCGraphicsColorObject.Create(gcdarkslategray));\r\n fcolorlookup.addobject('darkslategrey', TTMSFNCGraphicsColorObject.Create(gcdarkslategrey));\r\n fcolorlookup.addobject('darkturquoise', TTMSFNCGraphicsColorObject.Create(gcdarkturquoise));\r\n fcolorlookup.addobject('darkviolet', TTMSFNCGraphicsColorObject.Create(gcdarkviolet));\r\n fcolorlookup.addobject('deeppink', TTMSFNCGraphicsColorObject.Create(gcdeeppink));\r\n fcolorlookup.addobject('deepskyblue', TTMSFNCGraphicsColorObject.Create(gcdeepskyblue));\r\n fcolorlookup.addobject('dimgray', TTMSFNCGraphicsColorObject.Create(gcdimgray));\r\n fcolorlookup.addobject('dimgrey', TTMSFNCGraphicsColorObject.Create(gcdimgrey));\r\n fcolorlookup.addobject('dodgerblue', TTMSFNCGraphicsColorObject.Create(gcdodgerblue));\r\n fcolorlookup.addobject('firebrick', TTMSFNCGraphicsColorObject.Create(gcfirebrick));\r\n fcolorlookup.addobject('floralwhite', TTMSFNCGraphicsColorObject.Create(gcfloralwhite));\r\n fcolorlookup.addobject('forestgreen', TTMSFNCGraphicsColorObject.Create(gcforestgreen));\r\n fcolorlookup.addobject('fuchsia', TTMSFNCGraphicsColorObject.Create(gcfuchsia));\r\n fcolorlookup.addobject('gainsboro', TTMSFNCGraphicsColorObject.Create(gcgainsboro));\r\n fcolorlookup.addobject('ghostwhite', TTMSFNCGraphicsColorObject.Create(gcghostwhite));\r\n fcolorlookup.addobject('gold', TTMSFNCGraphicsColorObject.Create(gcgold));\r\n fcolorlookup.addobject('goldenrod', TTMSFNCGraphicsColorObject.Create(gcgoldenrod));\r\n fcolorlookup.addobject('gray', TTMSFNCGraphicsColorObject.Create(gcgray));\r\n fcolorlookup.addobject('green', TTMSFNCGraphicsColorObject.Create(gcgreen));\r\n fcolorlookup.addobject('greenyellow', TTMSFNCGraphicsColorObject.Create(gcgreenyellow));\r\n fcolorlookup.addobject('grey', TTMSFNCGraphicsColorObject.Create(gcgrey));\r\n fcolorlookup.addobject('honeydew', TTMSFNCGraphicsColorObject.Create(gchoneydew));\r\n fcolorlookup.addobject('hotpink', TTMSFNCGraphicsColorObject.Create(gchotpink));\r\n fcolorlookup.addobject('indianred', TTMSFNCGraphicsColorObject.Create(gcindianred));\r\n fcolorlookup.addobject('indigo', TTMSFNCGraphicsColorObject.Create(gcindigo));\r\n fcolorlookup.addobject('ivory', TTMSFNCGraphicsColorObject.Create(gcivory));\r\n fcolorlookup.addobject('khaki', TTMSFNCGraphicsColorObject.Create(gckhaki));\r\n fcolorlookup.addobject('lavender', TTMSFNCGraphicsColorObject.Create(gcLavender));\r\n fcolorlookup.addobject('lavenderblush', TTMSFNCGraphicsColorObject.Create(gcLavenderblush));\r\n fcolorlookup.addobject('lawngreen', TTMSFNCGraphicsColorObject.Create(gcLawngreen));\r\n fcolorlookup.addobject('lemonchiffon', TTMSFNCGraphicsColorObject.Create(gclemonchiffon));\r\n fcolorlookup.addobject('lightblue', TTMSFNCGraphicsColorObject.Create(gclightblue));\r\n fcolorlookup.addobject('lightcoral', TTMSFNCGraphicsColorObject.Create(gclightcoral));\r\n fcolorlookup.addobject('lightcyan', TTMSFNCGraphicsColorObject.Create(gclightcyan));\r\n fcolorlookup.addobject('lightgoldenrodyellow', TTMSFNCGraphicsColorObject.Create(gclightgoldenrodyellow));\r\n fcolorlookup.addobject('lightgray', TTMSFNCGraphicsColorObject.Create(gclightgray));\r\n fcolorlookup.addobject('lightgreen', TTMSFNCGraphicsColorObject.Create(gclightgreen));\r\n fcolorlookup.addobject('lightgrey', TTMSFNCGraphicsColorObject.Create(gclightgrey));\r\n fcolorlookup.addobject('lightpink', TTMSFNCGraphicsColorObject.Create(gclightpink));\r\n fcolorlookup.addobject('lightsalmon', TTMSFNCGraphicsColorObject.Create(gclightsalmon));\r\n fcolorlookup.addobject('lightseagreen', TTMSFNCGraphicsColorObject.Create(gclightseagreen));\r\n fcolorlookup.addobject('lightskyblue', TTMSFNCGraphicsColorObject.Create(gclightskyblue));\r\n fcolorlookup.addobject('lightslategray', TTMSFNCGraphicsColorObject.Create(gclightslategray));\r\n fcolorlookup.addobject('lightslategrey', TTMSFNCGraphicsColorObject.Create(gclightslategrey));\r\n fcolorlookup.addobject('lightsteelblue', TTMSFNCGraphicsColorObject.Create(gclightsteelblue));\r\n fcolorlookup.addobject('lightyellow', TTMSFNCGraphicsColorObject.Create(gclightyellow));\r\n fcolorlookup.addobject('lime', TTMSFNCGraphicsColorObject.Create(gclime));\r\n fcolorlookup.addobject('limegreen', TTMSFNCGraphicsColorObject.Create(gclimegreen));\r\n fcolorlookup.addobject('linen', TTMSFNCGraphicsColorObject.Create(gclinen));\r\n fcolorlookup.addobject('magenta', TTMSFNCGraphicsColorObject.Create(gcmagenta));\r\n fcolorlookup.addobject('maroon', TTMSFNCGraphicsColorObject.Create(gcmaroon));\r\n fcolorlookup.addobject('mediumaquamarine', TTMSFNCGraphicsColorObject.Create(gcmediumaquamarine));\r\n fcolorlookup.addobject('mediumblue', TTMSFNCGraphicsColorObject.Create(gcmediumblue));\r\n fcolorlookup.addobject('mediumorchid', TTMSFNCGraphicsColorObject.Create(gcmediumorchid));\r\n fcolorlookup.addobject('mediumpurple', TTMSFNCGraphicsColorObject.Create(gcmediumpurple));\r\n fcolorlookup.addobject('mediumseagreen', TTMSFNCGraphicsColorObject.Create(gcmediumseagreen));\r\n fcolorlookup.addobject('mediumslateblue', TTMSFNCGraphicsColorObject.Create(gcmediumslateblue));\r\n fcolorlookup.addobject('mediumspringgreen', TTMSFNCGraphicsColorObject.Create(gcmediumspringgreen));\r\n fcolorlookup.addobject('mediumturquoise', TTMSFNCGraphicsColorObject.Create(gcmediumturquoise));\r\n fcolorlookup.addobject('mediumvioletred', TTMSFNCGraphicsColorObject.Create(gcmediumvioletred));\r\n fcolorlookup.addobject('midnightblue', TTMSFNCGraphicsColorObject.Create(gcmidnightblue));\r\n fcolorlookup.addobject('mintcream', TTMSFNCGraphicsColorObject.Create(gcmintcream));\r\n fcolorlookup.addobject('mistyrose', TTMSFNCGraphicsColorObject.Create(gcmistyrose));\r\n fcolorlookup.addobject('moccasin', TTMSFNCGraphicsColorObject.Create(gcmoccasin));\r\n fcolorlookup.addobject('navajowhite', TTMSFNCGraphicsColorObject.Create(gcnavajowhite));\r\n fcolorlookup.addobject('navy', TTMSFNCGraphicsColorObject.Create(gcnavy));\r\n fcolorlookup.addobject('oldlace', TTMSFNCGraphicsColorObject.Create(gcoldlace));\r\n fcolorlookup.addobject('olive', TTMSFNCGraphicsColorObject.Create(gcolive));\r\n fcolorlookup.addobject('olivedrab', TTMSFNCGraphicsColorObject.Create(gcolivedrab));\r\n fcolorlookup.addobject('orange', TTMSFNCGraphicsColorObject.Create(gcorange));\r\n fcolorlookup.addobject('orangered', TTMSFNCGraphicsColorObject.Create(gcorangered));\r\n fcolorlookup.addobject('orchid', TTMSFNCGraphicsColorObject.Create(gcorchid));\r\n fcolorlookup.addobject('palegoldenrod', TTMSFNCGraphicsColorObject.Create(gcpalegoldenrod));\r\n fcolorlookup.addobject('palegreen', TTMSFNCGraphicsColorObject.Create(gcpalegreen));\r\n fcolorlookup.addobject('paleturquoise', TTMSFNCGraphicsColorObject.Create(gcpaleturquoise));\r\n fcolorlookup.addobject('palevioletred', TTMSFNCGraphicsColorObject.Create(gcpalevioletred));\r\n fcolorlookup.addobject('papayawhip', TTMSFNCGraphicsColorObject.Create(gcpapayawhip));\r\n fcolorlookup.addobject('peachpuff', TTMSFNCGraphicsColorObject.Create(gcpeachpuff));\r\n fcolorlookup.addobject('peru', TTMSFNCGraphicsColorObject.Create(gcperu));\r\n fcolorlookup.addobject('pink', TTMSFNCGraphicsColorObject.Create(gcpink));\r\n fcolorlookup.addobject('plum', TTMSFNCGraphicsColorObject.Create(gcplum));\r\n fcolorlookup.addobject('powderblue', TTMSFNCGraphicsColorObject.Create(gcpowderblue));\r\n fcolorlookup.addobject('purple', TTMSFNCGraphicsColorObject.Create(gcpurple));\r\n fcolorlookup.addobject('red', TTMSFNCGraphicsColorObject.Create(gcred));\r\n fcolorlookup.addobject('rosybrown', TTMSFNCGraphicsColorObject.Create(gcrosybrown));\r\n fcolorlookup.addobject('royalblue', TTMSFNCGraphicsColorObject.Create(gcroyalblue));\r\n fcolorlookup.addobject('saddlebrown', TTMSFNCGraphicsColorObject.Create(gcsaddlebrown));\r\n fcolorlookup.addobject('salmon', TTMSFNCGraphicsColorObject.Create(gcsalmon));\r\n fcolorlookup.addobject('sandybrown', TTMSFNCGraphicsColorObject.Create(gcsandybrown));\r\n fcolorlookup.addobject('seagreen', TTMSFNCGraphicsColorObject.Create(gcseagreen));\r\n fcolorlookup.addobject('seashell', TTMSFNCGraphicsColorObject.Create(gcseashell));\r\n fcolorlookup.addobject('sienna', TTMSFNCGraphicsColorObject.Create(gcsienna));\r\n fcolorlookup.addobject('skyblue', TTMSFNCGraphicsColorObject.Create(gcskyblue));\r\n fcolorlookup.addobject('slateblue', TTMSFNCGraphicsColorObject.Create(gcslateblue));\r\n fcolorlookup.addobject('slategray', TTMSFNCGraphicsColorObject.Create(gcslategray));\r\n fcolorlookup.addobject('slategrey', TTMSFNCGraphicsColorObject.Create(gcslategrey));\r\n fcolorlookup.addobject('snow', TTMSFNCGraphicsColorObject.Create(gcsnow));\r\n fcolorlookup.addobject('springgreen', TTMSFNCGraphicsColorObject.Create(gcspringgreen));\r\n fcolorlookup.addobject('steelblue', TTMSFNCGraphicsColorObject.Create(gcsteelblue));\r\n fcolorlookup.addobject('violet', TTMSFNCGraphicsColorObject.Create(gcviolet));\r\n fcolorlookup.addobject('thistle', TTMSFNCGraphicsColorObject.Create(gcthistle));\r\n fcolorlookup.addobject('tan', TTMSFNCGraphicsColorObject.Create(gctan));\r\n fcolorlookup.addobject('tomato', TTMSFNCGraphicsColorObject.Create(gctomato));\r\n fcolorlookup.addobject('turquoise', TTMSFNCGraphicsColorObject.Create(gcturquoise));\r\n fcolorlookup.addobject('wheat', TTMSFNCGraphicsColorObject.Create(gcwheat));\r\n fcolorlookup.addobject('whitesmoke', TTMSFNCGraphicsColorObject.Create(gcwhitesmoke));\r\n fcolorlookup.addobject('yellowgreen', TTMSFNCGraphicsColorObject.Create(gcyellowgreen));\r\n fcolorlookup.addobject('red', TTMSFNCGraphicsColorObject.Create(gcred));\r\n fcolorlookup.addobject('black', TTMSFNCGraphicsColorObject.Create(gcblack));\r\n fcolorlookup.addobject('blue', TTMSFNCGraphicsColorObject.Create(gcblue));\r\n fcolorlookup.addobject('green', TTMSFNCGraphicsColorObject.Create(gcgreen));\r\n fcolorlookup.addobject('aqua', TTMSFNCGraphicsColorObject.Create(gcaqua));\r\n fcolorlookup.addobject('yellow', TTMSFNCGraphicsColorObject.Create(gcyellow));\r\n fcolorlookup.addobject('fuchsia', TTMSFNCGraphicsColorObject.Create(gcfuchsia));\r\n fcolorlookup.addobject('white', TTMSFNCGraphicsColorObject.Create(gcwhite));\r\n fcolorlookup.addobject('lime', TTMSFNCGraphicsColorObject.Create(gclime));\r\n fcolorlookup.addobject('silver', TTMSFNCGraphicsColorObject.Create(gcsilver));\r\n fcolorlookup.addobject('gray', TTMSFNCGraphicsColorObject.Create(gcgray));\r\n fcolorlookup.addobject('olive', TTMSFNCGraphicsColorObject.Create(gcolive));\r\n fcolorlookup.addobject('navy', TTMSFNCGraphicsColorObject.Create(gcnavy));\r\n fcolorlookup.addobject('purple', TTMSFNCGraphicsColorObject.Create(gcpurple));\r\n fcolorlookup.addobject('teal', TTMSFNCGraphicsColorObject.Create(gcteal));\r\n fcolorlookup.addobject('orange', TTMSFNCGraphicsColorObject.Create(gcorange));\r\n fcolorlookup.addobject('maroon', TTMSFNCGraphicsColorObject.Create(gcmaroon));\r\n FColorLookup.Sort;\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nfinalization\r\nbegin\r\n DestroyColorLookup;\r\nend;\r\n{$ENDIF}\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.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, AIconData: 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 TIconDataDict = class(TObject)\r\n strict private\r\n class var FDict: TDictionary;\r\n public\r\n class destructor Destroy;\r\n class procedure Add(const AComponentName, AIconData: 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\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);\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, AIconData: string);\r\nbegin\r\n TIconDataDict.Add(AComponentName, AIconData);\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, AIconData: string);\r\nbegin\r\n if FDict = nil then\r\n FDict := TDictionary.Create;\r\n FDict.AddOrSetValue(AComponentName.ToUpper, AIconData);\r\nend;\r\n\r\nclass function TIconDataDict.Find(const AComponentName: string): string;\r\nbegin\r\n if (FDict = nil) or (not FDict.TryGetValue(AComponentName.ToUpper, Result)) then\r\n Result := '';\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) 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.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 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 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 procedure SetAdaptToStyle(const Value: Boolean); virtual;\r\n procedure Paint; override;\r\n procedure Loaded; override;\r\n procedure RegisterRuntimeClasses; virtual;\r\n property AdaptToStyle: Boolean read FAdaptToStyle write SetAdaptToStyle default False;\r\n public\r\n constructor Create(AOwner: TComponent); 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: TStreamEx; AAppearanceOnly: Boolean = False); virtual;\r\n procedure LoadSettingsFromStream(AStream: TStreamEx); virtual;\r\n class property BlockPersistenceInterface: Boolean read FBlockPersistenceInterface write FBlockPersistenceInterface;\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, 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, WEBLib.Forms, FMX.Types, WEBLib.StdCtrls, FMX.Objects, UIConsts\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n ,VCL.Forms, 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 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\nbegin\r\n inherited;\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 := (csDesigning in ComponentState) 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);\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 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: TStreamEx; 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: TStreamEx);\r\nbegin\r\n TTMSFNCPersistence.LoadSettingsFromStream(Self, AStream);\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 c: TClass;\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(0, 0, Width, Height), pic);\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.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\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\nbegin\r\n inherited SetBounds(X, Y, 26, 26);\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 {$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 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 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 function DrawSVG(ABitmap: TTMSFNCBitmapHelperClass; ARect: TRectF): Boolean;\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 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 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 'JqcGAAAAGdJREFUOI3tzjsOwjAURNGDUqSgTxU5K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FlzAAAOvwAADr8'+\r\n 'BOAVTJAAAABh0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4zjOaXUAAAACVJREFUGFdj+P//P07MEBYW9h8Xxi'+\r\n '8JAjglYACnBAzglMAEDAwARZ1DA4NRF38AAAAASUVORK5CYII=';\r\n{$ENDIF}\r\n\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 {$IFNDEF LIMITEDGRAPHICSMODE}\r\n ,WEBLib.TMSFNCUtils\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 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 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(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 {$IFDEF FMXLIB}\r\n if TTMSFNCUtils.GetDPIScale > 1 then\r\n {$ELSE}\r\n if AScaleFactor > 1 then\r\n {$ENDIF}\r\n bmp := TTMSFNCBitmap.CreateFromResource('TMSFNCGRAPHICSCLOSELARGE')\r\n else\r\n bmp := TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSCLOSE);\r\n\r\n try\r\n r := ARect;\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 {$IFDEF FMXLIB}\r\n if TTMSFNCUtils.GetDPIScale > 1 then\r\n {$ELSE}\r\n if AScaleFactor > 1 then\r\n {$ENDIF}\r\n begin\r\n case AState of\r\n gesCollapsed: bmp := TTMSFNCBitmap.CreateFromResource('TMSFNCGRAPHICSDOWNLARGE');\r\n gesExpanded: bmp := TTMSFNCBitmap.CreateFromResource('TMSFNCGRAPHICSUPLARGE');\r\n else\r\n bmp := nil;\r\n end;\r\n end\r\n else\r\n begin\r\n case AState of\r\n gesCollapsed: bmp := TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSDOWN);\r\n gesExpanded: bmp := TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSUP);\r\n else\r\n bmp := nil;\r\n end;\r\n end;\r\n\r\n if Assigned(bmp) then\r\n begin\r\n try\r\n r := ARect;\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 {$IFDEF FMXLIB}\r\n if TTMSFNCUtils.GetDPIScale > 1 then\r\n {$ELSE}\r\n if AScaleFactor > 1 then\r\n {$ENDIF}\r\n begin\r\n case AState of\r\n gcsCollapsed: bmp := TTMSFNCBitmap.CreateFromResource('TMSFNCGRAPHICSRIGHTLARGE');\r\n gcsExpanded: bmp := TTMSFNCBitmap.CreateFromResource('TMSFNCGRAPHICSLEFTLARGE');\r\n else\r\n bmp := nil;\r\n end;\r\n end\r\n else\r\n begin\r\n case AState of\r\n gcsCollapsed: bmp := TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSRIGHT);\r\n gcsExpanded: bmp := TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSLEFT);\r\n else\r\n bmp := nil;\r\n end;\r\n end;\r\n\r\n if Assigned(bmp) then\r\n begin\r\n try\r\n r := RectF(Round(ARect.Left), Round(ARect.Top), Round(ARect.Right), Round(ARect.Bottom));\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 {$IFDEF FMXLIB}\r\n if TTMSFNCUtils.GetDPIScale > 1 then\r\n {$ELSE}\r\n if AScaleFactor > 1 then\r\n {$ENDIF}\r\n bmp := TTMSFNCBitmap.CreateFromResource('TMSFNCGRAPHICSDOWNLARGE')\r\n else\r\n bmp := TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSDOWN);\r\n\r\n try\r\n if (ARect.Right - bmp.Width - 10 * AScaleFactor > ARect.Left) and not ACenter then\r\n r := RectF(ARect.Right - bmp.Width - 10 * AScaleFactor, ARect.Top, ARect.Right, ARect.Bottom)\r\n else\r\n r := ARect;\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\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 if not DrawSVG(ABitmap, r) then\r\n Context.DrawBitmap(BitmapToDrawBitmap(ABitmap), RectF(0, 0, ABitmap.Width, ABitmap.Height), r, 1);\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 if not DrawSVG(ABitmap, r) then\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);\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\nfunction TTMSFNCGraphics.DrawSVG(ABitmap: TTMSFNCBitmapHelperClass;\r\n ARect: TRectF): Boolean;\r\n{$IFNDEF WEBLIB}\r\n{$IFDEF SVGSUPPORT}\r\nvar\r\n si: TTMSFNCGraphicsSVGImport;\r\n{$ENDIF}\r\n{$ENDIF}\r\nbegin\r\n Result := False;\r\n {$IFDEF SVGSUPPORT}\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\n {$ENDIF}\r\nend;\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 i: integer;\r\n s: string;\r\n c: TStringList;\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 i := c.IndexOf(LowerCase(s));\r\n if (i >= 0) and (i <= c.Count - 1) then\r\n Result := TTMSFNCGraphicsColorObject(c.Objects[i]).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 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 := OptimizedHTMLDrawing;\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\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\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 := PointInPolygon(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 b := OptimizedHTMLDrawing and TTMSFNCUtils.IsHTML(AText);\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(TMSFNCGRAPHICSUP);\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\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 : 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.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 - 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.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: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 ;\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 StripPos2HTMLPos(s:string; i: Integer): Integer;\r\nvar\r\n j,k: Integer;\r\n Skip: Boolean;\r\nbegin\r\n Result := 0;\r\n k := 1;\r\n Skip := False;\r\n\r\n {$IFDEF ZEROSTRINGINDEX}\r\n for j := 0 to Length(s) - 1 do\r\n {$ELSE}\r\n for j := 1 to Length(s) do\r\n {$ENDIF}\r\n begin\r\n if s[j] = '<' then\r\n Skip := True;\r\n\r\n if k = i then\r\n begin\r\n Result := j;\r\n Exit;\r\n end;\r\n\r\n if not Skip then\r\n Inc(k);\r\n\r\n if s[j] = '>' then\r\n Skip := False;\r\n\r\n end;\r\n\r\n if k = i then\r\n begin\r\n Result := Length(s) + 1;\r\n end;\r\nend;\r\n\r\n\r\nfunction PosFrom(su,s:string; h: Integer;DoCase: boolean; var Res: Integer): Integer;\r\nvar\r\n r: Integer;\r\nbegin\r\n Result := 0;\r\n Res := 0;\r\n\r\n if h > 0 then\r\n Delete(s,1,h);\r\n\r\n if DoCase then\r\n r := Pos(su,s)\r\n else\r\n r := Pos(AnsiUpperCase(su), AnsiUpperCase(s));\r\n\r\n if r > 0 then\r\n begin\r\n Res := h + r;\r\n Result := Res;\r\n end;\r\nend;\r\n\r\n\r\nfunction HiLight(s,h,tag:string;DoCase:boolean):string;\r\nvar\r\n hs: string;\r\n l,k: Integer;\r\nbegin\r\n hs := TTMSFNCUtils.HTMLStrip(s);\r\n\r\n l := 0;\r\n\r\n if (pos(h,s) > 0) and ((pos('<',hs) >0) or (pos('>',hs) > 0)) then\r\n begin\r\n hs := StringReplace(hs,'<','<',[rfReplaceAll]);\r\n hs := StringReplace(hs,'>','>',[rfReplaceAll]);\r\n s := hs;\r\n h := StringReplace(h,'<','<',[rfReplaceAll]);\r\n h := StringReplace(h,'>','>',[rfReplaceAll]);\r\n end;\r\n\r\n k := 0;\r\n while PosFrom(h,hs,l,DoCase,k) > 0 do\r\n begin\r\n l := k + Length(h);\r\n Insert('<'+tag+'>',s,StripPos2HTMLPos(s,k));\r\n Insert('',s,StripPos2HTMLPos(s,l));\r\n end;\r\n\r\n Result := s;\r\nend;\r\n\r\nfunction UnHiLight(s,tag:string):string;\r\nbegin\r\n Result := '';\r\n // replace line breaks by linefeeds\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 s := StringReplace(s,'<','<',[rfReplaceAll]);\r\n s := StringReplace(s,'>','>',[rfReplaceAll]);\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 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 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 FirstChar(sub:string; s: string): integer;\r\n var\r\n i,j: integer;\r\n begin\r\n Result := -1;\r\n\r\n for i := 1 to Length(s) do\r\n begin\r\n for j := 1 to Length(sub) do\r\n begin\r\n if sub[j{$IFDEF ZEROSTRINGINDEX} -1 {$ENDIF}] = s[i{$IFDEF ZEROSTRINGINDEX} -1 {$ENDIF}] then\r\n begin\r\n Result := i;\r\n Exit;\r\n end;\r\n end;\r\n end;\r\n end;\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 := 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 < 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 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 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 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 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 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);\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 := 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\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\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 {%H-}FShowAcceleratorChar: Boolean;\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 {$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 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\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{$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\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\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\nbegin\r\n {$IFDEF FMXLIB}\r\n Result := ARect;\r\n {$IFDEF FMXWINDOWS}\r\n Result := CalculateTextWin(AText, Result, AWordWrapping)\r\n {$ELSE}\r\n Canvas.MeasureText(Result, AText, 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{$ENDIF}\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 Exit;\r\n end;\r\n {$ENDIF}\r\n\r\n {$IFDEF FMXLIB}\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 := AText;\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 {$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\nvar\r\n hpen: THandle;\r\n lb: TLogBrush;\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 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\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 else\r\n begin\r\n DeleteObject(SelectObject(Canvas.Handle, FOldPenHandle));\r\n end;\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{$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 if (Result.Right - Result.Left) < (Result.Bottom - Result.Top) then\r\n Result := RectF(-(Result.Bottom - Result.Top) / 2, -(Result.Right - Result.Left) / 2, (Result.Bottom - Result.Top) / 2, (Result.Right - Result.Left) / 2)\r\n else\r\n Result := RectF(-(Result.Right - Result.Left) / 2, -(Result.Bottom - Result.Top) / 2, (Result.Right - Result.Left) / 2, (Result.Bottom - Result.Top) / 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 FShowAcceleratorChar := AShowAcceleratorChar;\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 case AFill.Kind of\r\n gfkSolid, gfkGradient: Canvas.Brush.Style := bsSolid;\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\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\nvar\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// 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\nvar\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\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 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\nvar\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\nvar\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\nvar\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\nvar\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, 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\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 if (Result.Right - Result.Left) < (Result.Bottom - Result.Top) then\r\n Result := RectF(-(Result.Bottom - Result.Top) / 2, -(Result.Right - Result.Left) / 2, (Result.Bottom - Result.Top) / 2, (Result.Right - Result.Left) / 2)\r\n else\r\n Result := RectF(-(Result.Right - Result.Left) / 2, -(Result.Bottom - Result.Top) / 2, (Result.Right - Result.Left) / 2, (Result.Bottom - Result.Top) / 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 FNCLIB}\r\n {$IFDEF WEBLIB}\r\n ,js, WEBLIB.JSON\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n ,JSON\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 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, 0);\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);\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, s3: string;\r\n sl, sl2: 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(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, s2, s3: string;\r\n sl, sl2: 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\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.startsWith(s)) {\r\n return classes[x];\r\n }\r\n }\r\n }\r\n }\r\n }\r\n end;\r\nend;\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 VCLLIBVCLSTYLESENABLED}\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\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);\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 {$IFDEF FMXLIB}\r\n it.DisposeOf;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n it.Free;\r\n {$ENDIF}\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 - 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.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{$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 {$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\r\n {$IFDEF FNCLIB}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCCustomControlShortCutWindowList = TObjectList;\r\n {$ENDIF}\r\n {$ENDIF}\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(TCustomControl, ITMSFNCAdaptToStyle, ITMSFNCProductInfo {$IFNDEF WEBLIB}{$IFDEF FNCLIB}, ITMSFNCShortCutHint{$ENDIF}{$ENDIF})\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 {$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 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 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 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;\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 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 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\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 WMGetDlgCode(var Message: TWMGetDlgCode); message WM_GETDLGCODE;\r\n procedure WMMouseWheel(var Message: TWMMouseWheel); message WM_MOUSEWHEEL;\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 {$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 {$IFDEF WEBLIB}\r\n FPopupMenu: TPopupMenu;\r\n {$ENDIF}\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 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 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 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: TStreamEx; AAppearanceOnly: Boolean = False); virtual;\r\n procedure LoadSettingsFromStream(AStream: TStreamEx); 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 {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n property Align;\r\n property AlignWithMargins;\r\n property DoubleBuffered;\r\n property Color;\r\n property Enabled;\r\n property Font;\r\n property ParentDoubleBuffered;\r\n property TabStop;\r\n property ShowHint;\r\n property Hint;\r\n property TabOrder;\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 PopupMenu: TPopupMenu read FPopupMenu write FPopupMenu;\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\nimplementation\r\n\r\nuses\r\n WEBLib.TMSFNCUtils, SysUtils\r\n {$IFNDEF LCLLIB}\r\n ,WEBLib.StdCtrls\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n ,FMX.Platform, FMX.Ani\r\n {$ENDIF}\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, WinApi.ShellApi\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\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\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\nbegin\r\n inherited;\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 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.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\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\nbegin\r\n inherited;\r\n b := Operation = TDragOperation.Move;\r\n HandleDragOver(Data.Source, Point, b);\r\n if b then\r\n Operation := TDragOperation.Move;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.DragDrop(const Data: TDragObject; const Point: TPointF);\r\nbegin\r\n inherited;\r\n HandleDragDrop(Data.Source, Point);\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\nvar\r\n Ctrl: TWinControl;\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 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.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\nprocedure TTMSFNCCustomControlBase.WMMouseWheel(var Message: TWMMouseWheel);\r\nvar\r\n b: Boolean;\r\nbegin\r\n inherited;\r\n b := message.Result > 0;\r\n HandleMouseWheel(CreateShiftStateEx, Message.WheelDelta, 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 inherited;\r\n b := Message.Result > 0;\r\n HandleMouseWheel(CreateShiftStateEx, Message.WheelDelta, b);\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 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 {$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 g.OptimizedHTMLDrawing := OptimizedHTMLDrawing;\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 if not BlockInvalidate then\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\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 bmp: TBitmap;\r\n sc: Single;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF CMNWEBLIB}\r\n sc := TTMSFNCUtils.GetDPIScale;\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 := gcRed;\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 := gcRed;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n DChecked := DFCS_BUTTONCHECK;\r\n ThemeStyle := CBS_UNCHECKEDNORMAL;\r\n if IsThemeActive and not (csDesigning in ComponentState) 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 {$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 := gcRed;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n DChecked := DFCS_BUTTONCHECK or DFCS_CHECKED;\r\n ThemeStyle := CBS_CHECKEDNORMAL;\r\n if IsThemeActive and not (csDesigning in ComponentState) 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 {$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 := gcRed;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n DChecked := DFCS_BUTTONCHECK or DFCS_HOT;\r\n ThemeStyle := CBS_UNCHECKEDHOT;\r\n if IsThemeActive and not (csDesigning in ComponentState) 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 {$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 := gcRed;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n DChecked := DFCS_BUTTONCHECK or DFCS_CHECKED or DFCS_HOT;\r\n ThemeStyle := CBS_CHECKEDHOT;\r\n if IsThemeActive and not (csDesigning in ComponentState) 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 {$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 := gcRed;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n DChecked := DFCS_BUTTONCHECK or DFCS_INACTIVE;\r\n ThemeStyle := CBS_UNCHECKEDDISABLED;\r\n if IsThemeActive and not (csDesigning in ComponentState) 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 {$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 := gcRed;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n DChecked := DFCS_BUTTONCHECK or DFCS_CHECKED or DFCS_INACTIVE;\r\n ThemeStyle := CBS_CHECKEDDISABLED;\r\n if IsThemeActive and not (csDesigning in ComponentState) 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 {$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 bmp: TBitmap;\r\n sc: Single;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF CMNWEBLIB}\r\n sc := TTMSFNCUtils.GetDPIScale;\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 := gcRed;\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 := gcRed;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n DChecked := DFCS_BUTTONPUSH;\r\n ThemeStyle := PBS_NORMAL;\r\n if IsThemeActive and not (csDesigning in ComponentState) 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 {$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 := gcRed;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n DChecked := DFCS_BUTTONPUSH or DFCS_PUSHED;\r\n ThemeStyle := PBS_PRESSED;\r\n if IsThemeActive and not (csDesigning in ComponentState) 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 {$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 := gcRed;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n DChecked := DFCS_BUTTONPUSH or DFCS_HOT;\r\n ThemeStyle := PBS_HOT;\r\n if IsThemeActive and not (csDesigning in ComponentState) 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 {$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 := gcRed;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n DChecked := DFCS_BUTTONPUSH or DFCS_PUSHED or DFCS_HOT;\r\n ThemeStyle := PBS_HOT or PBS_PRESSED;\r\n if IsThemeActive and not (csDesigning in ComponentState) 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 {$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 := gcRed;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n DChecked := DFCS_BUTTONPUSH or DFCS_INACTIVE;\r\n ThemeStyle := PBS_DISABLED;\r\n if IsThemeActive and not (csDesigning in ComponentState) 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 {$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 bmp: TBitmap;\r\n sc: Single;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF CMNWEBLIB}\r\n sc := TTMSFNCUtils.GetDPIScale;\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 := gcRed;\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 := gcRed;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n DChecked := DFCS_BUTTONRADIO;\r\n ThemeStyle := RBS_UNCHECKEDNORMAL;\r\n if IsThemeActive and not (csDesigning in ComponentState) 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 {$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 := gcRed;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n DChecked := DFCS_BUTTONRADIO or DFCS_CHECKED;\r\n ThemeStyle := RBS_CHECKEDNORMAL;\r\n if IsThemeActive and not (csDesigning in ComponentState) 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 {$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 := gcRed;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n DChecked := DFCS_BUTTONRADIO or DFCS_HOT;\r\n ThemeStyle := RBS_UNCHECKEDHOT;\r\n if IsThemeActive and not (csDesigning in ComponentState) 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 {$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 := gcRed;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n DChecked := DFCS_BUTTONRADIO or DFCS_CHECKED or DFCS_HOT;\r\n ThemeStyle := RBS_CHECKEDHOT;\r\n if IsThemeActive and not (csDesigning in ComponentState) 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 {$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 := gcRed;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n DChecked := DFCS_BUTTONRADIO or DFCS_INACTIVE;\r\n ThemeStyle := RBS_UNCHECKEDDISABLED;\r\n if IsThemeActive and not (csDesigning in ComponentState) 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 {$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 := gcRed;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n DChecked := DFCS_BUTTONRADIO or DFCS_CHECKED or DFCS_INACTIVE;\r\n ThemeStyle := RBS_CHECKEDDISABLED;\r\n if IsThemeActive and not (csDesigning in ComponentState) 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 {$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 := (csDesigning in ComponentState) 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);\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 CreateCheckBoxBitmaps;\r\n CreateRadioButtonBitmaps;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.RegisterRuntimeClasses;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.&Export({%H-}AGraphics: TTMSFNCGraphics; {%H-}ARect: TRectF);\r\nbegin\r\n FExporting := True;\r\n FExportRect := 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: TStreamEx; 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: TStreamEx);\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\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\nbegin\r\n DragImage := TTMSFNCBitmap.Create;\r\n DragImage.Width := 1;\r\n DragImage.Height := 1;\r\n try\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.TMSFNCHTMLText;\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.TMSFNCCustomControl, WEBLib.TMSFNCBitmapContainer, \r\n WEBLib.TMSFNCGraphics, WEBLib.TMSFNCGraphicsTypes, WEBLib.TMSFNCTypes, WEBLib.Controls\r\n {$IFNDEF LCLLIB}\r\n {$IFNDEF WEBLIB}\r\n ,UITypes, 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 = 1; // 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.1.0.0 : New : Support for float left & float right images\r\n // : New : Support for float left text\r\n // : New : Support for loading images from file\r\n // : New : Stroke property exposed\r\n // v1.1.0.1 : Fixed : Issue with autosize rounding\r\n // v1.1.0.2 : Improved : AnchorText property for anchor click behavior in compound controls\r\n // v1.1.0.3 : Improved : Anchor click behavior\r\n // v1.1.0.4 : Fixed : Issue with applying horizontal and vertical alignment in combination with wordwrapping\r\n // v1.1.0.5 : Fixed : Issue in Delphi 11 with begin and end scene for CreateBitmapCanvas\r\n\r\n\r\ntype\r\n TTMSFNCHTMLTextAnchorClickEvent = procedure(Sender: TObject; AAnchor: string) of object;\r\n\r\n TTMSFNCHTMLText = class;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCHTMLText = class(TTMSFNCCustomControl, ITMSFNCBitmapContainer)\r\n private\r\n FDisableAdjustSize: Boolean;\r\n FBitmapContainer: TTMSFNCBitmapContainer;\r\n FOnAnchorClick: TTMSFNCHTMLTextAnchorClickEvent;\r\n FURLColor: TTMSFNCGraphicsColor;\r\n FShadowOffset: Integer;\r\n FShadowColor: TTMSFNCGraphicsColor;\r\n FDisplayHTML: Boolean;\r\n FURLUnderline: Boolean;\r\n FText: String;\r\n FFont: TTMSFNCGraphicsFont;\r\n FWordWrapping: Boolean;\r\n FAutoSize: Boolean;\r\n FVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FHorizontalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FAutoOpenURL: Boolean;\r\n FAutoSizeSpacing: Single;\r\n FAutoHeight: Boolean;\r\n FAutoWidth: Boolean;\r\n FTrimming: TTMSFNCGraphicsTextTrimming;\r\n procedure SetShadowOffset(const Value: integer);\r\n procedure SetURLColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetShadowColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetBitmapContainer(const Value: TTMSFNCBitmapContainer);\r\n procedure SetText(const Value: String);\r\n procedure SetDisplayHTML(const Value: Boolean);\r\n procedure SetURLUnderline(const Value: Boolean);\r\n procedure SetFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetWordWrapping(const Value: Boolean);\r\n procedure SetAS(const Value: Boolean);\r\n procedure SetHorizontalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetVerticalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n function IsAutoSizeSpacingStored: Boolean;\r\n procedure SetAutoSizeSpacing(const Value: Single);\r\n function GetBitmapContainer: TTMSFNCBitmapContainer;\r\n procedure SetAutoHeight(const Value: Boolean);\r\n procedure SetAutoWidth(const Value: Boolean);\r\n procedure SetTrimming(const Value: TTMSFNCGraphicsTextTrimming);\r\n protected\r\n function GetVersion: string; override;\r\n function CanDrawDesignTime: Boolean; virtual;\r\n procedure ChangeDPIScale(M, D: Integer); override;\r\n procedure RegisterRuntimeClasses; override;\r\n procedure ApplyStyle; override;\r\n procedure ResetToDefaultStyle; override;\r\n procedure ApplyAutoSize; virtual;\r\n procedure FillChanged(Sender: TObject);\r\n procedure DoFontChanged(Sender: TObject);\r\n procedure StrokeChanged(Sender: TObject);\r\n procedure Notification(AComponent: TComponent; Operation: TOperation); 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 DoAnchorClick(Anchor: string);\r\n procedure DrawHTMLText(AGraphics: TTMSFNCGraphics); virtual;\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 public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n function GetTextRect: TRectF; virtual;\r\n procedure Assign(Source: TPersistent); override;\r\n procedure DoMouseMove({%H-}Shift: TShiftState; X, Y: Single);\r\n procedure DoMouseDown({%H-}Button: TTMSFNCMouseButton; {%H-}Shift: TShiftState; X, Y: Single);\r\n procedure UpdateControlAfterResize; override;\r\n function IsHTML: boolean;\r\n procedure Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF); override;\r\n published\r\n property AutoSize: Boolean read FAutoSize write SetAS {$IFNDEF WEBLIB}default False{$ENDIF};\r\n property AutoHeight: Boolean read FAutoHeight write SetAutoHeight {$IFNDEF WEBLIB}default True{$ENDIF};\r\n property AutoWidth: Boolean read FAutoWidth write SetAutoWidth {$IFNDEF WEBLIB}default True{$ENDIF};\r\n property AutoSizeSpacing: Single read FAutoSizeSpacing write SetAutoSizeSpacing {$IFNDEF WEBLIB}stored IsAutoSizeSpacingStored nodefault{$ENDIF};\r\n property AutoOpenURL: Boolean read FAutoOpenURL write FAutoOpenURL {$IFNDEF WEBLIB}default True{$ENDIF};\r\n property BitmapContainer: TTMSFNCBitmapContainer read GetBitmapContainer write SetBitmapContainer;\r\n property DisplayHTML: Boolean read FDisplayHTML write SetDisplayHTML {$IFNDEF WEBLIB}default True{$ENDIF};\r\n property Font: TTMSFNCGraphicsFont read FFont write SetFont;\r\n property HorizontalTextAlign: TTMSFNCGraphicsTextAlign read FHorizontalTextAlign write SetHorizontalTextAlign {$IFNDEF WEBLIB}default gtaCenter{$ENDIF};\r\n property Trimming: TTMSFNCGraphicsTextTrimming read FTrimming write SetTrimming {$IFNDEF WEBLIB}default gttNone{$ENDIF};\r\n property ShadowColor: TTMSFNCGraphicsColor read FShadowColor write SetShadowColor {$IFNDEF WEBLIB}default gcGray{$ENDIF};\r\n property ShadowOffset: integer read FShadowOffset write SetShadowOffset {$IFNDEF WEBLIB}default 1{$ENDIF};\r\n property Fill;\r\n property Stroke;\r\n property Text: String read FText write SetText;\r\n property URLColor: TTMSFNCGraphicsColor read FURLColor write SetURLColor {$IFNDEF WEBLIB}default gcBlue{$ENDIF};\r\n property URLUnderline: Boolean read FURLUnderline write SetURLUnderline {$IFNDEF WEBLIB}default True{$ENDIF};\r\n property VerticalTextAlign: TTMSFNCGraphicsTextAlign read FVerticalTextAlign write SetVerticalTextAlign {$IFNDEF WEBLIB}default gtaCenter{$ENDIF};\r\n property Version: String read GetVersion;\r\n property WordWrapping: Boolean read FWordWrapping write SetWordWrapping {$IFNDEF WEBLIB}default False{$ENDIF};\r\n property OnAnchorClick: TTMSFNCHTMLTextAnchorClickEvent read FOnAnchorClick write FOnAnchorClick;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n SysUtils, WEBLib.TMSFNCUtils, WEBLib.TMSFNCStyles, WEBLib.Graphics;\r\n\r\n{ TTMSFNCHTMLText }\r\n\r\nprocedure TTMSFNCHTMLText.ApplyAutoSize;\r\nvar\r\n R: TRectF;\r\nbegin\r\n if not FDisableAdjustSize and not (csLoading in ComponentState) then\r\n begin\r\n FDisableAdjustSize := True;\r\n try\r\n if FAutoSize and (Text <> '') then\r\n begin\r\n R := GetTextRect;\r\n {$IFDEF FMXLIB}\r\n if AutoHeight and AutoWidth then\r\n SetBounds(Position.X, Position.Y, R.Width + R.Left * 2 + Font.Size / 3, R.Height + R.Top * 2)\r\n else if AutoWidth then\r\n SetBounds(Position.X, Position.Y, R.Width + R.Left * 2 + Font.Size / 3, Height)\r\n else if AutoHeight then\r\n SetBounds(Position.X, Position.Y, Width, Round(R.Height) + R.Top * 2);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n if AutoHeight and AutoWidth then\r\n SetBounds(Left, Top, Round((R.Right - R.Left) + R.Left * 2 + Font.Size / 3), Round((R.Bottom - R.Top) + R.Top * 2))\r\n else if AutoWidth then\r\n SetBounds(Left, Top, Round((R.Right - R.Left) + R.Left * 2 + Font.Size / 3), Height)\r\n else if AutoHeight then\r\n SetBounds(Left, Top, Width, Round((R.Bottom - R.Top) + R.Top * 2));\r\n {$ENDIF}\r\n end;\r\n finally\r\n FDisableAdjustSize := False;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCHTMLText.CanDrawDesignTime: Boolean;\r\nbegin\r\n Result := True;\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.ChangeDPIScale(M, D: Integer);\r\nbegin\r\n inherited;\r\n Font.Height := TTMSFNCUtils.MulDivInt(Font.Height, M, D);\r\nend;\r\n\r\nconstructor TTMSFNCHTMLText.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FURLColor := gcBlue;\r\n FTrimming := gttNone;\r\n FURLUnderline := True;\r\n FDisplayHTML := True;\r\n FShadowOffset := 1;\r\n FAutoOpenURL := True;\r\n FShadowColor := gcGray;\r\n FWordWrapping := False;\r\n FAutoSize := False;\r\n FAutoHeight := True;\r\n FAutoWidth := True;\r\n FHorizontalTextAlign := gtaCenter;\r\n FVerticalTextAlign := gtaCenter;\r\n FFont := TTMSFNCGraphicsFont.Create;\r\n FFont.OnChanged := @DoFontChanged;\r\n FAutoSizeSpacing := 0;\r\n Stroke.Color := gcNull;\r\n\r\n if IsDesignTime then\r\n begin\r\n Text := 'TTMSFNCHTMLText';\r\n DisableBackground;\r\n end;\r\n\r\n Width := 100;\r\n Height := 50;\r\nend;\r\n\r\ndestructor TTMSFNCHTMLText.Destroy;\r\nbegin\r\n FFont.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.DoAnchorClick(Anchor: string);\r\nbegin\r\n if Assigned(OnAnchorClick) then\r\n OnAnchorClick(Self, Anchor)\r\n else if AutoOpenURL then\r\n TTMSFNCUtils.OpenURL(Anchor);\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.DoMouseDown(Button: TTMSFNCMouseButton; Shift: TShiftState;\r\n X, Y: Single);\r\nvar\r\n Anchor: String;\r\n g: TTMSFNCGraphics;\r\n r: TRectF;\r\nbegin\r\n if IsHTML then\r\n begin\r\n g := TTMSFNCGraphics.CreateBitmapCanvas;\r\n g.BeginScene;\r\n g.OptimizedHTMLDrawing := OptimizedHTMLDrawing;\r\n g.BitmapContainer := BitmapContainer;\r\n g.Font.AssignSource(Font);\r\n try\r\n if AutoSize then\r\n begin\r\n if AutoWidth and AutoHeight then\r\n r := RectF(AutoSizeSpacing, AutoSizeSpacing, Width, Height)\r\n else if AutoWidth then\r\n r := RectF(AutoSizeSpacing, 0, Width, Height)\r\n else if AutoHeight then\r\n r := RectF(0, AutoSizeSpacing, Width, Height);\r\n end\r\n else\r\n r := LocalRect;\r\n\r\n Anchor := g.DrawText(r, Text, WordWrapping, HorizontalTextAlign, VerticalTextAlign, Trimming, 0, -1, -1, True, True, X, Y);\r\n if Anchor <> '' then\r\n DoAnchorClick(Anchor);\r\n finally\r\n g.EndScene;\r\n g.free;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.DoMouseMove(Shift: TShiftState; X, Y: Single);\r\nvar\r\n g: TTMSFNCGraphics;\r\n r: TRectF;\r\n a: string;\r\nbegin\r\n inherited;\r\n if IsHTML then\r\n begin\r\n g := TTMSFNCGraphics.CreateBitmapCanvas;\r\n g.BeginScene;\r\n g.OptimizedHTMLDrawing := OptimizedHTMLDrawing;\r\n g.BitmapContainer := BitmapContainer;\r\n g.Font.AssignSource(Font);\r\n try\r\n if AutoSize then\r\n begin\r\n if AutoWidth and AutoHeight then\r\n r := RectF(AutoSizeSpacing, AutoSizeSpacing, Width, Height)\r\n else if AutoWidth then\r\n r := RectF(AutoSizeSpacing, 0, Width, Height)\r\n else if AutoHeight then\r\n r := RectF(0, AutoSizeSpacing, Width, Height);\r\n end\r\n else\r\n r := LocalRect;\r\n\r\n a := g.DrawText(r, Text, WordWrapping, HorizontalTextAlign, VerticalTextAlign, Trimming, 0, -1, -1, True, True, X, Y);\r\n if (a <> '') then\r\n Cursor := crHandPoint\r\n else\r\n Cursor := crDefault;\r\n finally\r\n g.EndScene;\r\n g.Free;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.DrawHTMLText(AGraphics: TTMSFNCGraphics);\r\nvar\r\n r: TRectF;\r\nbegin\r\n AGraphics.Font.AssignSource(Font);\r\n\r\n if not Enabled then\r\n AGraphics.Font.Color := gcMedGray;\r\n\r\n AGraphics.URLColor := URLColor;\r\n AGraphics.URLUnderline := URLUnderline;\r\n if AutoSize then\r\n begin\r\n if AutoWidth and AutoHeight then\r\n r := RectF(AutoSizeSpacing, AutoSizeSpacing, Width, Height)\r\n else if AutoWidth then\r\n r := RectF(AutoSizeSpacing, 0, Width, Height)\r\n else if AutoHeight then\r\n r := RectF(0, AutoSizeSpacing, Width, Height);\r\n end\r\n else\r\n r := LocalRect;\r\n AGraphics.DrawText(r, Text, WordWrapping, HorizontalTextAlign, VerticalTextAlign, Trimming, 0, -1, -1, DisplayHTML);\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.FillChanged(Sender: TObject);\r\nbegin\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.DoFontChanged(Sender: TObject);\r\nbegin\r\n Invalidate;\r\nend;\r\n\r\nfunction TTMSFNCHTMLText.GetBitmapContainer: TTMSFNCBitmapContainer;\r\nbegin\r\n Result := FBitmapContainer;\r\nend;\r\n\r\nfunction TTMSFNCHTMLText.GetTextRect: TRectF;\r\nvar\r\n g: TTMSFNCGraphics;\r\n R: TRectF;\r\n w, h: Single;\r\nbegin\r\n g := TTMSFNCGraphics.CreateBitmapCanvas;\r\n g.BeginScene;\r\n g.OptimizedHTMLDrawing := OptimizedHTMLDrawing;\r\n g.BitmapContainer := BitmapContainer;\r\n g.Font.AssignSource(Font);\r\n try\r\n g.Font.AssignSource(Font);\r\n if WordWrapping then\r\n R := RectF(0, 0, Width, 10000)\r\n else\r\n R := RectF(0, 0, 10000, 10000);\r\n\r\n Result := g.CalculateText(Text, R, WordWrapping, DisplayHTML);\r\n w := Result.Right - Result.Left;\r\n h := Result.Bottom - Result.Top;\r\n Result.Right := Result.Left + w + AutoSizeSpacing * 2;\r\n Result.Bottom := Result.Top + h + AutoSizeSpacing * 2;\r\n finally\r\n g.EndScene;\r\n g.Free;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCHTMLText.GetVersion: string;\r\nbegin\r\n Result := GetVersionNumber(MAJ_VER, MIN_VER, REL_VER, BLD_VER);\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.HandleMouseDown(Button: TTMSFNCMouseButton;\r\n Shift: TShiftState; X, Y: Single);\r\nbegin\r\n inherited;\r\n DoMouseDown(Button, Shift, X, Y);\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.HandleMouseMove(Shift: TShiftState; X, Y: Single);\r\nbegin\r\n inherited;\r\n DoMouseMove(Shift, X, Y);\r\nend;\r\n\r\nfunction TTMSFNCHTMLText.IsAutoSizeSpacingStored: Boolean;\r\nbegin\r\n Result := AutoSizeSpacing <> 0;\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCHTMLText.SetEnabled(const Value: Boolean);\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCHTMLText.SetEnabled(Value: Boolean);\r\n{$ENDIF}\r\nbegin\r\n inherited;\r\n Invalidate;\r\nend;\r\n\r\nfunction TTMSFNCHTMLText.IsHTML: boolean;\r\nbegin\r\n if not DisplayHTML then\r\n Result := False\r\n else\r\n Result := (Pos(' 0) or (Pos('/>', Text) > 0) or (Pos('
', UpperCase(Text)) > 0);\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.SetAS(const Value: Boolean);\r\nbegin\r\n if FAutoSize <> Value then\r\n begin\r\n FAutoSize := Value;\r\n ApplyAutoSize;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.SetAutoHeight(const Value: Boolean);\r\nbegin\r\n if FAutoHeight <> Value then\r\n begin\r\n FAutoHeight := Value;\r\n ApplyAutoSize;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.SetAutoSizeSpacing(const Value: Single);\r\nbegin\r\n if FAutoSizeSpacing <> Value then\r\n begin\r\n FAutoSizeSpacing := Value;\r\n ApplyAutoSize;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.SetAutoWidth(const Value: Boolean);\r\nbegin\r\n if FAutoWidth <> Value then\r\n begin\r\n FAutoWidth := Value;\r\n ApplyAutoSize;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.SetBitmapContainer(\r\n const Value: TTMSFNCBitmapContainer);\r\nbegin\r\n FBitmapContainer := Value;\r\n ApplyAutoSize;\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.SetDisplayHTML(const Value: Boolean);\r\nbegin\r\n if FDisplayHTML <> Value then\r\n begin\r\n FDisplayHTML := Value;\r\n ApplyAutoSize;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.SetFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FFont.AssignSource(Value);\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.SetHorizontalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FHorizontalTextAlign <> Value then\r\n begin\r\n FHorizontalTextAlign := Value;\r\n ApplyAutoSize;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.SetShadowColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if (FShadowColor <> Value) then\r\n begin\r\n FShadowColor := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.SetShadowOffset(const Value: integer);\r\nbegin\r\n if (FShadowOffset <> Value) then\r\n begin\r\n FShadowOffset := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.SetText(const Value: String);\r\nbegin\r\n if FText <> Value then\r\n begin\r\n FText := Value;\r\n ApplyAutoSize;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.SetTrimming(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 TTMSFNCHTMLText.SetURLColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if (FURLColor <> Value) then\r\n begin\r\n FURLColor := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.SetURLUnderline(const Value: Boolean);\r\nbegin\r\n if FURLUnderline <> Value then\r\n begin\r\n FURLUnderline := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.SetVerticalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FVerticalTextAlign <> Value then\r\n begin\r\n FVerticalTextAlign := Value;\r\n ApplyAutoSize;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.SetWordWrapping(const Value: Boolean);\r\nbegin\r\n if FWordWrapping <> Value then\r\n begin\r\n FWordWrapping := Value;\r\n ApplyAutoSize;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.StrokeChanged(Sender: TObject);\r\nbegin\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.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.GetStyleBackgroundStrokeColor(c) then\r\n Stroke.Color := c;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleTextFontColor(c) then\r\n Font.Color := c;\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if Source is TTMSFNCHTMLText then\r\n begin\r\n FTrimming := (Source as TTMSFNCHTMLText).Trimming;\r\n FAutoSize := (Source as TTMSFNCHTMLText).AutoSize;\r\n FAutoWidth := (Source as TTMSFNCHTMLText).AutoWidth;\r\n FAutoHeight := (Source as TTMSFNCHTMLText).AutoHeight;\r\n FAutoSizeSpacing := (Source as TTMSFNCHTMLText).AutoSizeSpacing;\r\n FAutoOpenURL := (Source as TTMSFNCHTMLText).AutoOpenURL;\r\n FDisplayHTML := (Source as TTMSFNCHTMLText).DisplayHTML;\r\n FFont.AssignSource((Source as TTMSFNCHTMLText).Font);\r\n FHorizontalTextAlign := (Source as TTMSFNCHTMLText).HorizontalTextAlign;\r\n FShadowColor := (Source as TTMSFNCHTMLText).ShadowColor;\r\n FShadowOffset := (Source as TTMSFNCHTMLText).ShadowOffset;\r\n FText := (Source as TTMSFNCHTMLText).Text;\r\n FURLColor := (Source as TTMSFNCHTMLText).URLColor;\r\n FURLUnderline := (Source as TTMSFNCHTMLText).URLUnderline;\r\n FVerticalTextAlign := (Source as TTMSFNCHTMLText).VerticalTextAlign;\r\n FWordWrapping := (Source as TTMSFNCHTMLText).WordWrapping;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClass(TTMSFNCHTMLText);\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.ResetToDefaultStyle;\r\nbegin\r\n inherited;\r\n Fill.Color := gcWhite;\r\n Stroke.Color := gcSilver;\r\n Font.Color := gcBlack;\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.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 TTMSFNCHTMLText.UpdateControlAfterResize;\r\nbegin\r\n inherited;\r\n ApplyAutoSize;\r\nend;\r\n\r\nprocedure TTMSFNCHTMLText.Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nbegin\r\n inherited;\r\n AGraphics.BitmapContainer := BitmapContainer;\r\n DrawHTMLText(AGraphics);\r\n if IsDesignTime and CanDrawDesignTime then\r\n AGraphics.DrawFocusRectangle(ARect, gcBlack);\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 : 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.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 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 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 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, WEBLib.TMSFNCStyles;\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 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.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 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.GetMaxScrollButton: TRectF;\r\nvar\r\n r: TRectF;\r\nbegin\r\n r := LocalRect;\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 := LocalRect;\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) + min;\r\n Result := Math.Max(Math.Min(v, max), 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)) * s, s)\r\n else\r\n Result := Math.Min(((FTempValue - Min) / (Max - Min)) * 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 := Result.Left + GetMaxScrollButton.Left - (GetMinScrollbutton.Right - GetMinScrollButton.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 := Result.Top + GetMaxScrollButton.Top - (GetMinScrollButton.Bottom - GetMinScrollButton.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 + 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 + 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 CaptureEx;\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 ReleaseCaptureEx;\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 if not (csLoading in ComponentState) then\r\n SetBounds(Left, Top, Height, Width)\r\n else\r\n FNeedsChange := True;\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 FPageSize <> value then\r\n begin\r\n FPageSize := Math.Min(GetRange, Math.Max(0, Value));\r\n if Assigned(FOnPageSizeChanged) then\r\n FOnPageSizeChanged(Self, PageSize);\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 FValue <> Value then\r\n begin\r\n FValue := Math.Max(Self.Min, Math.Min(Self.Max, Value));\r\n FTempValue := FValue;\r\n if Assigned(FOnValueChange) then\r\n FOnValueChange(Self, Value);\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 }\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\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 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 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 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 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 ColumnW: TTMSFNCTreeViewDoubleList read FColumnW write SetColumnW;\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 FColumnP := TTMSFNCTreeViewDoubleList.Create(Self);\r\n\r\n FDefaultRowHeight := 25;\r\n FDefaultColumnWidth := 75;\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 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 := 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.GetVScrollValue: Single;\r\nbegin\r\n if CustomScrollBars then\r\n Result := 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.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.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.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.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 CustomHorizontalScrollBar.Value := AValue\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 CustomVerticalScrollBar.Value := AValue\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 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 ColumnWidths[0] := nw;\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] := 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 ColumnWidths[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: Double;\r\n cw, ch: Double;\r\n vpos, hpos: Double;\r\n cr: TRectF;\r\n reverse: Boolean;\r\n rh: Double;\r\nbegin\r\n hpos := GetHorizontalScrollPosition;\r\n vpos := GetVerticalScrollPosition;\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 reverse := GetVScrollValue > VerticalScrollBar.Max / 2;\r\n\r\n if reverse then\r\n yval := yval + GetTotalRowHeight;\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 if reverse then\r\n begin\r\n for r := RowCount - 1 downto 0 do\r\n begin\r\n rh := GetRowHeight(r);\r\n yval := yval - rh;\r\n if (yval <= 0) and (FStartRow = -1) then\r\n begin\r\n FStartRow := r;\r\n FStartOffset := yval;\r\n FStartY := FStartY + int(FStartOffset - rh);\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 end\r\n else\r\n begin\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 > 0) 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 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 - vsc.PageSize;\r\n end\r\n else\r\n begin\r\n vsc.PageSize := Min(h, ch);\r\n vsc.Max := h - vsc.PageSize;\r\n vsc.SmallChange := Round(DefaultRowHeight);\r\n vsc.Value := Min(vsc.Value, vsc.Max);\r\n end;\r\n\r\n if ScrollMode = smNodeScrolling then\r\n begin\r\n hsc.PageSize := GetColumnViewPortSize;\r\n hsc.Max := ColumnCount - hsc.PageSize;\r\n end\r\n else\r\n begin\r\n hsc.PageSize := Min(w, cw);\r\n hsc.Max := w - hsc.PageSize;\r\n hsc.Value := Min(hsc.Value, hsc.Max);\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 - 2020 }\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 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 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 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 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 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 protected\r\n procedure BitmapChanged(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 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 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 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 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: Single; 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 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 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\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 EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.ClearNodes;\r\nbegin\r\n BeginUpdate;\r\n NodeListBuild := False;\r\n Nodes.Clear;\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: 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 FFilterApplied := False;\r\n ClearNodeList;\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, DefaultRowHeight);\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 + DefaultRowHeight;\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.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.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 := DefaultRowHeight;\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.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.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].Text;\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.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.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 {$IFDEF FMXLIB}\r\n ANode.DisposeOf;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n ANode.Free;\r\n {$ENDIF}\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 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: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n if not Assigned(ANode) or not ANode.Expanded or not NodeListBuild or (csDestroying in ComponentState) then\r\n Exit;\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 ResetNodes(False);\r\n UpdateVisibleNodes(ANode);\r\n UpdateTreeView;\r\n Invalidate;\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 := 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, nw, np: TTMSFNCTreeViewNode;\r\nbegin\r\n if not Assigned(ADestinationNode) or not Assigned(ANode) then\r\n Exit;\r\n\r\n if (ADestinationNode <> ANode) 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\r\n\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 RemoveNode(ANode);\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.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 ColumnWidths[I] := c.Width\r\n else\r\n ColumnWidths[I] := 0;\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: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n if (csDestroying in ComponentState) or not Assigned(ANode) or ANode.Expanded then\r\n Exit;\r\n\r\n if Assigned(ANode) then\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.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.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 + DefaultRowHeight * 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 <= VisibleNodes.Count - 1) then\r\n Result := VisibleNodes[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 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 Expanded := 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\nfunction TTMSFNCTreeViewColumn.IsExpandingButtonSizeStored: Boolean;\r\nbegin\r\n Result := ExpandingButtonSize <> 15;\r\nend;\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.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\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 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 UpdateNodeValue;\r\nend;\r\n\r\ndestructor TTMSFNCTreeViewNodeValue.Destroy;\r\nbegin\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\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.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 - 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.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{$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 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 = 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 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\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 TTMSFNCCustomPopupForm = class(TCustomForm)\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 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 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 WEBLIB}\r\n , Web\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.DeactivateProc(Sender: TObject);\r\nbegin\r\n if Assigned(FPopupForm) and not FPopupForm.FShowModal and not StaysOpen then\r\n begin\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 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\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 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\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\nbegin\r\n if FIsOpen <> Value then\r\n begin\r\n if csDesigning in ComponentState then\r\n begin\r\n FIsOpen := False;\r\n Exit;\r\n end;\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 else\r\n CloseAction := TCloseAction.caNone;\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 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.Free;\r\n end;\r\n end;\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{ 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 FMXMOBILE}\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\nbegin\r\n Result := nil;\r\n if FOwner is TTMSFNCCustomPopup then\r\n Result := FOwner as TTMSFNCCustomPopup;\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\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 := window.innerWidth;\r\n WorkareaRect.Bottom := window.innerHeight;\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 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 protected\r\n function GetVersion: string; override;\r\n procedure ApplyAutoSize;\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 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 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 := bmp.Width;\r\n Self.Height := bmp.Height;\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.Clear;\r\nbegin\r\n Bitmaps.Clear;\r\nend;\r\n\r\nconstructor TTMSFNCCustomImage.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n if IsDesignTime then\r\n DisableBackground;\r\n\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 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 := 0;\r\n y := 0;\r\n w := 0;\r\n h := 0;\r\n TTMSFNCGraphics.GetAspectSize(w, h, bmp.Width, bmp.Height, Width, Height, AspectRatio, Stretch, Cropping);\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 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 AGraphics.DrawBitmap(ARect, bmp, AspectRatio, Stretch, Center, Cropping);\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.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 - 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.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\r\ninterface\r\n\r\nuses\r\n Classes, 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\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 ;\r\n\r\nconst\r\n TTMSFNCTreeViewDocURL = 'https://download.tmssoftware.com/download/manuals/TMSFNCTreeViewDevGuide.pdf';\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 1; // Minor version nr.\r\n REL_VER = 6; // Release nr.\r\n BLD_VER = 1; // 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.0.5.0 : Improved : OnColumnAnchorClick event added\r\n // v1.0.5.1 : Fixed : Issue with moving parent nodes inside children\r\n // v1.0.5.2 : Fixed : Issue with Anchor if font was changed\r\n // v1.0.5.3 : Fixed : Issue with default drag & drop events not being triggered\r\n // v1.0.5.4 : Fixed : Issue with OnIsNodeChecked missing AColumn parameter\r\n // v1.0.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.0.5.6 : Fixed : Issue with Delete key triggering LookupNode when FLookupString is empty\r\n // v1.0.5.7 : Fixed : Issue with OnBeforeUnSelectNode & OnAfterUnSelectNode event not called\r\n // v1.0.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.0.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.0.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.0.6.1 : Improved : Interaction.Lookup.VisibleNodesOnly to lookup within visible nodes.\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\nresourcestring\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 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; 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\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 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 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 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 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 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 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 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 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 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 TTMSFNCCustomTreeView = class(TTMSFNCTreeViewData)\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, 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 FOnNodeClick: TTMSFNCTreeViewNodeClickEvent;\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 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 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\r\n procedure ExportNotification(AState: TTMSFNCTreeViewExportState; ARow: Integer); 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 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 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 DoGetNodeSides(ANode: TTMSFNCTreeViewVirtualNode; var ASides: TTMSFNCGraphicsSides); override;\r\n procedure DoGetNodeDisabledColor(ANode: TTMSFNCTreeViewVirtualNode; var AColor: TTMSFNCGraphicsColor); override;\r\n procedure DoGetNodeColor(ANode: TTMSFNCTreeViewVirtualNode; var AColor: TTMSFNCGraphicsColor); override;\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; 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 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 {$IFDEF FMXLIB}\r\n procedure ApplyInplaceEditorStyleLookup(Sender: TObject);\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 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);\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 UpdateColumnsDisplay; virtual;\r\n procedure UpdateGroupsDisplay; virtual;\r\n procedure UpdateNodeDisplay; 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 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 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: 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\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 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 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 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 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 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 OnGetNodeCheckType: TTMSFNCTreeViewGetNodeCheckTypeEvent read FOnGetNodeCheckType write FOnGetNodeCheckType;\r\n property OnGetNodeSelectedColor: TTMSFNCTreeViewGetNodeColorEvent read FOnGetNodeSelectedColor write FOnGetNodeSelectedColor;\r\n property OnGetNodeDisabledColor: TTMSFNCTreeViewGetNodeColorEvent read FOnGetNodeDisabledColor write FOnGetNodeDisabledColor;\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\r\n property DragBitmap: TTMSFNCImage read FDragBitmap;\r\n\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 {$IFNDEF WEBLIB}\r\n procedure LoadFromFile(const AFileName: string); overload;\r\n procedure LoadFromStream(const AStream: TStream); overload;\r\n procedure SaveToFile(const AFileName: string; const ATextOnly: Boolean = True); overload;\r\n procedure SaveToStream(const AStream: TStream; const ATextOnly: Boolean = True); overload;\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 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 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 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 OnNodeClick;\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 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 SysUtils, 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{$IFNDEF WEBLIB}\r\nprocedure TTMSFNCCustomTreeView.LoadFromFile(const 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 TTMSFNCCustomTreeView.LoadFromStream(const AStream: TStream);\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);\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{$ENDIF}\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) and IsVirtualNodeSelectable(Result) and AAutoSelect 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 n := n.GetParent;\r\n\r\n if Assigned(n) then\r\n n.Expand(True);\r\n end;\r\n\r\n SelectVirtualNode(Result);\r\n ScrollToVirtualNode(Result, True);\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);\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{$ENDIF}\r\n\r\nfunction TTMSFNCCustomTreeView.ColumnStretchingActive: Boolean;\r\nbegin\r\n Result := ColumnsAppearance.Stretch and ColumnsAppearance.StretchAll;\r\nend;\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(20);\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);\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(DefaultRowHeight, maxh);\r\n bh := bh + GetNodesSpacing + toff + boff;\r\n UpdateNodeHeight(v, Int(bh));\r\n TotalRowHeight := (TotalRowHeight - DefaultRowHeight) + v.Height;\r\n end\r\n else\r\n begin\r\n bh := DefaultRowHeight;\r\n bh := bh + GetNodesSpacing + toff + boff;\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;\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(20);\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);\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.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);\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 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.DisposeOf;\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;\r\n ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; 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\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.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.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.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.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.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\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.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.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.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.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(\r\n 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.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.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\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 := SelectedVirtualNodeCount - 1 downto 0 do\r\n RemoveVirtualNode(SelectedVirtualNodes[I]);\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.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 := GetNodeForRow(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 {$IFNDEF MACOS}\r\n FInplaceEditor.Parent := nil;\r\n {$ENDIF}\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 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 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 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) < 5) then\r\n c := Abs(X - FMouseX) < 5;\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\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 FDragNode.Node.MoveTo(dn.Node.GetParent, dn.Node.Index);\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 Nodes.Sort(FDownColumn, Columns[FDownColumn].Sorting in [tcsRecursive, tcsRecursiveCaseSensitive], Columns[FDownColumn].Sorting in [tcsNormalCaseSensitive, tcsRecursiveCaseSensitive], nsmDescending);\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 Nodes.Sort(FDownColumn, Columns[FDownColumn].Sorting in [tcsRecursive, tcsRecursiveCaseSensitive], Columns[FDownColumn].Sorting in [tcsNormalCaseSensitive, tcsRecursiveCaseSensitive], nsmAscending);\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) then\r\n begin\r\n if Assigned(FFocusedNode) then\r\n begin\r\n if FFocusedNode.Row <= FDownNode.Row then\r\n begin\r\n for I := FFocusedNode.Row + 1 to FDownNode.Row do\r\n HandleSelectNode(GetNodeFromNodeStructure(I), True, False, {$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 FDownNode.Row do\r\n HandleSelectNode(GetNodeFromNodeStructure(I), True, False, {$IFNDEF FMXMOBILE}(ssShift in Shift) and {$ENDIF} Interaction.MultiSelect);\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 not (ssCtrl in Shift) and not (ssCommand in Shift) 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 Interaction.MultiSelect);\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 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 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 := GetNodeForRow(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 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 for I := 0 to Columns.Count - 1 do\r\n begin\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 := GetNodeForRow(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.UpdateNodeDisplay;\r\nbegin\r\n BuildDisplay(FNodeCache, FNodeDisplay);\r\nend;\r\n\r\nconstructor TTMSFNCCustomTreeView.Create(AOwner: TComponent);\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 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 FFilterPopup.PlacementControl := Self;\r\n\r\n Width := 300;\r\n Height := 280;\r\n if IsDesignTime then\r\n InitSample;\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 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 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 {$IFDEF FMXMOBILE}\r\n FDragBitmap.DisposeOf;\r\n {$ELSE}\r\n FDragBitmap.Free;\r\n {$ENDIF}\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 FFilterListBox.Parent := nil;\r\n\r\n FFilterListBox.Tag := AColumn;\r\n finally\r\n sl.Free;\r\n end;\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 FFilterPopup.PlacementRectangle.Right := pt.X + FFilterPopup.DropDownWidth;\r\n FFilterPopup.PlacementRectangle.Bottom := pt.Y + FFilterPopup.DropDownHeight;\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.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 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.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.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: 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 Result := DefaultRowHeight;\r\n v := GetNodeForRow(ARow);\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 pAudi, pMercedes, pSub, n: TTMSFNCTreeViewNode;\r\nbegin\r\n BeginUpdate;\r\n ClearNodeList;\r\n Columns.Clear;\r\n Nodes.Clear;\r\n\r\n Columns.Add.Text := 'Model';\r\n Columns.Add.Text := 'Year';\r\n Columns.Add.Text := 'Miles';\r\n\r\n pAudi := AddNode;\r\n pAudi.Text[0] := 'Audi';\r\n pAudi.Extended := True;\r\n\r\n pSub := AddNode(pAudi);\r\n pSub.Text[0] := 'A3';\r\n pSub.Text[1] := '2010';\r\n pSub.Text[2] := '32,300';\r\n\r\n pSub := AddNode(pAudi);\r\n pSub.Text[0] := 'A5 series';\r\n\r\n n := AddNode(pSub);\r\n n.Text[0] := 'S5';\r\n n.Text[1] := '2016';\r\n n.Text[2] := '40,000';\r\n\r\n n := AddNode(pSub);\r\n n.Text[0] := 'RS5';\r\n n.Text[1] := '2012';\r\n n.Text[2] := '15,000';\r\n\r\n pSub := AddNode(pAudi);\r\n pSub.Text[0] := 'A8';\r\n pSub.Text[1] := '2005';\r\n pSub.Text[2] := '80,000';\r\n\r\n pMercedes := AddNode;\r\n pMercedes.Text[0] := 'Mercedes';\r\n pMercedes.Extended := True;\r\n\r\n pSub := AddNode(pMercedes);\r\n pSub.Text[0] := 'SLS';\r\n pSub.Text[1] := '2000';\r\n pSub.Text[2] := '300,000';\r\n\r\n pSub := AddNode(pMercedes);\r\n pSub.Text[0] := 'SLK';\r\n pSub.Text[1] := '2010';\r\n pSub.Text[2] := '20,000';\r\n\r\n pSub := AddNode(pMercedes);\r\n pSub.Text[0] := 'GLA';\r\n pSub.Text[1] := '2012';\r\n pSub.Text[2] := '14,500';\r\n\r\n ExpandAll;\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 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 SelectAllNodes;\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 sel := GetNextFocusableNode(sel);\r\n donext := True;\r\n end;\r\n KEY_UP:\r\n begin\r\n sel := GetPreviousFocusableNode(sel);\r\n doprev := True;\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 := GetNodeForRow(I);\r\n if Assigned(v) then\r\n begin\r\n TotalRowHeight := TotalRowHeight - v.Height + DefaultRowHeight;\r\n UpdateNodeHeight(v, DefaultRowHeight);\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 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.TopFill.Color := gcWhite;\r\n ColumnsAppearance.BottomFill.Color := gcWhite;\r\n ColumnsAppearance.TopStroke.Color := gcDarkGray;\r\n ColumnsAppearance.BottomStroke.Color := gcDarkgray;\r\n ColumnsAppearance.TopFont.Color := gcBlack;\r\n ColumnsAppearance.BottomFont.Color := gcBlack;\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 := gfkNone;\r\n ColumnsAppearance.BottomFill.Kind := gfkNone;\r\n ColumnsAppearance.TopStroke.Kind := gskSolid;\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.Font.Color := gcBlack;\r\n NodesAppearance.ExtendedFontColor := gcBlack;\r\n ColumnsAppearance.TopFont.Color := gcBlack;\r\n ColumnsAppearance.BottomFont.Color := gcBlack;\r\n GroupsAppearance.TopFont.Color := gcBlack;\r\n GroupsAppearance.BottomFont.Color := gcBlack;\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.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\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.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 * DefaultRowHeight;\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 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 rc.Left := dx;\r\n dx := dx + ColumnWidths[c] + extrax;\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.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.DisposeOf;\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);\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 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 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 begin\r\n DoAfterSelectNode(ANode);\r\n if not AKeyBoard then\r\n DoNodeClick(ANode);\r\n end;\r\n end;\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 FExpandNodeIcon.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\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.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 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 - 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.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 = 0; // Release nr.\r\n BLD_VER = 0; // Build nr. \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 RegisterRuntimeClasses; 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, WEBLib.TMSFNCUtils, WEBLib.TMSFNCStyles;\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\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, -2, -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\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 - 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.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 FDefaultStyle: Boolean;\r\n FKeyDown: Word;\r\n FContent: string;\r\n FEdit: TEdit;\r\n FTimer: 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 FEditable: Boolean;\r\n FUpdateCount: Integer;\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 protected\r\n function GetVersion: String; override;\r\n function GetContent: String; virtual;\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 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 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\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 HandleKeyUp(var Key: Word; Shift: TShiftState); 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 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: TStreamEx); 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 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\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{ TTMSFNCCustomPicker }\r\n\r\nconstructor TTMSFNCCustomPicker.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\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 FEdit := TEdit.Create(Self);\r\n FEdit.TabOrder := 0;\r\n FEdit.TabStop := True;\r\n Edit.OnKeyDown := @EditKeyDown;\r\n {$IFDEF FMXLIB}\r\n FEdit.Margins.Left := 1;\r\n FEdit.Margins.Top := 1;\r\n FEdit.Margins.Right := 15;\r\n FEdit.Margins.Bottom := 1;\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 := 1;\r\n FEdit.Margins.Top := 1;\r\n FEdit.Margins.Right := 15;\r\n FEdit.Margins.Bottom := 1;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n FEdit.AlignWithMargins := True;\r\n FEdit.Margins.Left := 1;\r\n FEdit.Margins.Top := 1;\r\n FEdit.Margins.Right := 15;\r\n FEdit.Margins.Bottom := 1;\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n FEdit.BorderSpacing.Left := 1;\r\n FEdit.BorderSpacing.Top := 1;\r\n FEdit.BorderSpacing.Right := 15;\r\n FEdit.BorderSpacing.Bottom := 1;\r\n {$ENDIF}\r\n FEdit.Align := alClient;\r\n FEdit.OnChange := @EditChange;\r\n Edit.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.PlacementControl:= 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(FSelector) then\r\n FreeAndNil(FSelector);\r\n if Assigned(FPopup) then\r\n FreeAndNil(FPopup);\r\n inherited;\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\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 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.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 := Appearance.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.DropDown;\r\nbegin\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\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.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 then\r\n FEdit.SetFocus;\r\n\r\n FTimer.Enabled := False;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.HandleMouseUp(Button: TTMSFNCMouseButton; Shift: TShiftState; X, Y: Single);\r\nbegin\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\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.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_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 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.DoEnter;\r\nbegin\r\n inherited;\r\n FTimer.Enabled := True;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.DoExit;\r\nbegin\r\n inherited;\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 - 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 {$IFDEF CMNWEBLIB}\r\n AGraphics.DrawDropDownButton(ARect, FDown, Focused, True, False, AdaptToStyle or not FDefaultStyle);\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n AGraphics.DrawDropDownButton(ARect, FDown, IsFocused, True, False, AdaptToStyle or not FDefaultStyle);\r\n {$ENDIF}\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 {$IFDEF CMNWEBLIB}\r\n AGraphics.Font.Assign(Font);\r\n {$ENDIF}\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 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 := Appearance.Fill.Color;\r\n FPopup.StrokeColor := Appearance.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 begin\r\n TTMSFNCOpenCustomSelector(FSelector).Fill.Assign(Appearance.Fill);\r\n TTMSFNCOpenCustomSelector(FSelector).Color := Appearance.Fill.Color;\r\n TTMSFNCOpenCustomSelector(FSelector).Stroke.Assign(Appearance.Stroke);\r\n FSelector.AdaptToStyle := AdaptToStyle;\r\n end;\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: TStreamEx);\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\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 : 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 = 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\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);\r\n TTMSFNCControlPickderDropDownWidthMode = (cwmDropDownWidth, cwmControl, cwmItems);\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 SetFont(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 Notification(AComponent: TComponent; Operation: TOperation); override;\r\n procedure FontChange(Sender: TObject);\r\n {$IFDEF WEBLIB}\r\n procedure Loaded; override;\r\n {$ENDIF}\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 SetFont;\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.TMSFNCStyles\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) then\r\n begin\r\n if (DropDownHeightMode = chmItems) then\r\n begin\r\n h := ItemHeight * GetVisibleItemCount;\r\n end\r\n else if (DropDownHeightMode = chmControl) then\r\n begin\r\n h := FControlHeight;\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\n end;\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) then\r\n begin\r\n if (FDropDownWidthMode = cwmItems) then\r\n begin\r\n w := ItemWidth * GetVisibleItemCount;\r\n end\r\n else if (FDropDownWidthMode = cwmControl) then\r\n begin\r\n w := FControlWidth;\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\n end;\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.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 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 OnAdjustDropDownHeight(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\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\n{$IFDEF WEBLIB}\r\nprocedure TTMSFNCCustomControlPicker.Loaded;\r\nbegin\r\n inherited;\r\n AdjustDropDownHeight;\r\n SetControl(FControl);\r\nend;\r\n{$ENDIF}\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.SetFont(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 - 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.TMSFNCTreeView;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\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 , WEBLib.TMSFNCControlPicker\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, ITMSFNCControlPickerFull)\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 function PickerLookupItem(ALookupString: String; ACaseSensitive: Boolean): TTMSFNCControlPickerFilterItem; virtual;\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 , WEBLib.TMSFNCCustomSelector\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 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\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 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, False, 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(-2), ScalePaintValue(-2));\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 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\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 DoGetNodeSelectedColor(ANode, AColor);\r\n AGraphics.Fill.Color := AColor;\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 DoGetNodeColor(ANode, AColor);\r\n AGraphics.Fill.Color := AColor;\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 DoGetNodeDisabledColor(ANode, AColor);\r\n AGraphics.Fill.Color := AColor;\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: rsel.Left := 0;\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 DoGetNodeSides(ANode, s);\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\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\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 - 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.TMSFNCListBox;\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\r\ninterface\r\n\r\nuses\r\n Classes, WEBLib.TMSFNCTreeView, WEBLib.TMSFNCStyles, WEBLib.TMSFNCPersistence, WEBLib.TMSFNCTreeViewData, WEBLib.TMSFNCCustomControl,\r\n WEBLib.TMSFNCTypes, WEBLib.TMSFNCGraphics, WEBLib.TMSFNCCustomTreeView, WEBLib.TMSFNCBitmapContainer, TypInfo,\r\n WEBLib.TMSFNCGraphicsTypes, WEBLib.TMSFNCControlPicker\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n ,UITypes, 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 = 3; // Release nr.\r\n BLD_VER = 1; // Build nr.\r\n CLP_FMT = '#LISTBOX#';\r\n\r\n // version history\r\n // v1.0.0.0 : first release\r\n // v1.0.0.1 : Clear selection with ItemIndex := -1;\r\n // v1.0.0.2 : Fixed : Issue with OnClick and OnDblClick\r\n // v1.0.0.3 : Fixed : Issue with assignment of data properties\r\n // v1.0.1.0 : Improved : Exposed ShowFocus property\r\n // v1.0.1.1 : Improved : Exposed SortMode property\r\n // v1.0.2.0 : Improved : OnHeaderAnchorClick event added\r\n // v1.0.3.0 : New : Interface for TMSFNCControlPicker implemented\r\n // v1.0.3.1 : Fixed : Issue with saving and setting ItemIndex when clearing items\r\n\r\ntype\r\n TTMSFNCCustomListBox = class;\r\n TTMSFNCListBoxInteraction = class;\r\n\r\n TTMSFNCListBoxItem = class(TCollectionItem)\r\n private\r\n FTag: NativeInt;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FListBox: TTMSFNCCustomListBox;\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 FTextAlign: 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 FBitmapHeight: Double;\r\n FBitmapWidth: Double;\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 SetTextAlign(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 function IsBitmapHeightStored: Boolean;\r\n function IsBitmapWidthStored: Boolean;\r\n procedure SetBitmapHeight(const Value: Double);\r\n procedure SetBitmapWidth(const Value: Double);\r\n protected\r\n procedure UpdateItem;\r\n procedure Changed(Sender: TObject);\r\n procedure BitmapChanged(Sender: TObject);\r\n public\r\n function ListBox: TTMSFNCCustomListBox;\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 Checked: Boolean read FChecked write SetChecked default False;\r\n property BitmapContainer: TTMSFNCBitmapContainer read GetBitmapContainer;\r\n property StrippedHTMLText: String read GetStrippedHTMLText;\r\n published\r\n property Text: String read FText write SetText;\r\n property Bitmap: TTMSFNCBitmap read FBitmap write SetBitmap;\r\n property BitmapWidth: Double read FBitmapWidth write SetBitmapWidth stored IsBitmapWidthStored nodefault;\r\n property BitmapHeight: Double read FBitmapHeight write SetBitmapHeight stored IsBitmapHeightStored nodefault;\r\n property BitmapName: string read FBitmapName write SetBitmapName;\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 TextAlign: TTMSFNCGraphicsTextAlign read FTextAlign write SetTextAlign 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 Tag: NativeInt read FTag write FTag default 0;\r\n end;\r\n\r\n TTMSFNCListBoxItemsSortMode = (ismAscending, ismDescending);\r\n TTMSFNCListBoxItemsSortKind = (iskNone, iskAscending, iskDescending);\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCListBoxItems = class(TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCListBoxItems = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FListBox: TTMSFNCCustomListBox;\r\n function GetItem(Index: Integer): TTMSFNCListBoxItem;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCListBoxItem);\r\n protected\r\n function GetItemClass: TCollectionItemClass; virtual;\r\n function Compare(AItem1, AItem2: TTMSFNCListBoxItem; ACaseSensitive: Boolean = True; ASortingMode: TTMSFNCListBoxItemsSortMode = ismAscending): Integer; virtual;\r\n procedure QuickSort(L, R: Integer; ACaseSensitive: Boolean = True; ASortingMode: TTMSFNCListBoxItemsSortMode = ismAscending); virtual;\r\n public\r\n function ListBox: TTMSFNCCustomListBox;\r\n constructor Create(AListBox: TTMSFNCCustomListBox);\r\n function Add: TTMSFNCListBoxItem; virtual;\r\n function Insert(Index: Integer): TTMSFNCListBoxItem;\r\n procedure Clear; virtual;\r\n procedure Sort(ACaseSensitive: Boolean = True; ASortingMode: TTMSFNCListBoxItemsSortMode = ismAscending);\r\n property Items[Index: Integer]: TTMSFNCListBoxItem read GetItem write SetItem; default;\r\n end;\r\n\r\n TTMSFNCListBoxLookup = class(TPersistent)\r\n private\r\n FOwner: TTMSFNCListBoxInteraction;\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: TTMSFNCListBoxInteraction);\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 TTMSFNCListBoxFiltering = class(TPersistent)\r\n private\r\n FOwner: TTMSFNCListBoxInteraction;\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: TTMSFNCListBoxInteraction);\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 TTMSFNCListBoxMouseEditMode = (lmemDoubleClick, lmemSingleClick, lmemSingleClickOnSelectedItem);\r\n TTMSFNCListBoxClipboardMode = (lcmNone, lcmTextOnly, lcmFull);\r\n TTMSFNCListBoxDragDropMode = (ldmNone, ldmMove, ldmCopy);\r\n TTMSFNCListBoxSorting = (lcsNone, lcsNormal, lcsNormalCaseSensitive);\r\n\r\n TTMSFNCListBoxInteraction = class(TPersistent)\r\n private\r\n FListBox: TTMSFNCCustomListBox;\r\n FLookup: TTMSFNCListBoxLookup;\r\n FFiltering: TTMSFNCListBoxFiltering;\r\n function GetMultiSelect: Boolean;\r\n procedure SetMultiSelect(const Value: Boolean);\r\n function GetClipboardMode: TTMSFNCListBoxClipboardMode;\r\n function GetDragDropMode: TTMSFNCListBoxDragDropMode;\r\n function GetReorder: Boolean;\r\n function GetTouchScrolling: Boolean;\r\n procedure SetDragDropMode(const Value: TTMSFNCListBoxDragDropMode);\r\n procedure SetFiltering(const Value: TTMSFNCListBoxFiltering);\r\n procedure SetLookup(const Value: TTMSFNCListBoxLookup);\r\n procedure SetReorder(const Value: Boolean);\r\n procedure SetTouchScrolling(const Value: Boolean);\r\n procedure SetClipboardMode(const Value: TTMSFNCListBoxClipboardMode);\r\n function GetSorting: TTMSFNCListBoxSorting;\r\n procedure SetSorting(const Value: TTMSFNCListBoxSorting);\r\n public\r\n constructor Create(AListBox: TTMSFNCCustomListBox);\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n published\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 ClipboardMode: TTMSFNCListBoxClipboardMode read GetClipboardMode write SetClipboardMode default lcmNone;\r\n property Reorder: Boolean read GetReorder write SetReorder default False;\r\n property DragDropMode: TTMSFNCListBoxDragDropMode read GetDragDropMode write SetDragDropMode default ldmNone;\r\n property Lookup: TTMSFNCListBoxLookup read FLookup write SetLookup;\r\n property Filtering: TTMSFNCListBoxFiltering read FFiltering write SetFiltering;\r\n property Sorting: TTMSFNCListBoxSorting read GetSorting write SetSorting default lcsNone;\r\n end;\r\n\r\n TTMSFNCListBoxItemHeightMode = (lihmFixed, lihmVariable);\r\n\r\n TTMSFNCListBoxItemsAppearance = class(TPersistent)\r\n private\r\n FListBox: TTMSFNCCustomListBox;\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: TTMSFNCListBoxItemHeightMode;\r\n procedure SetHeightMode(const Value: TTMSFNCListBoxItemHeightMode);\r\n function GetFixedHeight: Double;\r\n procedure SetFixedHeight(const Value: Double);\r\n function GetShowFocus: Boolean;\r\n procedure SetShowFocus(const Value: Boolean);\r\n public\r\n constructor Create(AListBox: TTMSFNCCustomListBox);\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: TTMSFNCListBoxItemHeightMode read GetHeightMode write SetHeightMode default lihmFixed;\r\n property FixedHeight: Double read GetFixedHeight write SetFixedHeight;\r\n property ShowFocus: Boolean read GetShowFocus write SetShowFocus default True;\r\n end;\r\n\r\n TTMSFNCListBoxItemArray = array of Integer;\r\n\r\n TTMSFNCListBoxHeader = class(TPersistent)\r\n private\r\n FListBox: TTMSFNCCustomListBox;\r\n function GetVisible: Boolean;\r\n procedure SetVisible(const Value: Boolean);\r\n function GetText: String;\r\n procedure SetText(const Value: String);\r\n function GetFill: TTMSFNCGraphicsFill;\r\n function GetHorizontalTextAlign: TTMSFNCGraphicsTextAlign;\r\n function GetSize: Single;\r\n function GetStroke: TTMSFNCGraphicsStroke;\r\n procedure SetFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetHorizontalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetSize(const Value: Single);\r\n procedure SetStroke(const Value: TTMSFNCGraphicsStroke);\r\n function GetVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n procedure SetVerticalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n function GetFont: TTMSFNCGraphicsFont;\r\n function GetTrimming: TTMSFNCGraphicsTextTrimming;\r\n function GetWordWrapping: Boolean;\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 public\r\n constructor Create(AListBox: TTMSFNCCustomListBox); virtual;\r\n published\r\n property Visible: Boolean read GetVisible write SetVisible default False;\r\n property Text: String read GetText 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 GetHorizontalTextAlign write SetHorizontalTextAlign default gtaCenter;\r\n property VerticalTextAlign: TTMSFNCGraphicsTextAlign read GetVerticalTextAlign write SetVerticalTextAlign default gtaCenter;\r\n property WordWrapping: Boolean read GetWordWrapping write SetWordWrapping default False;\r\n property Trimming: TTMSFNCGraphicsTextTrimming read GetTrimming write SetTrimming default gttNone;\r\n property Size: Single read GetSize write SetSize;\r\n property SortIndicatorColor: TTMSFNCGraphicsColor read GetSortIndicatorColor write SetSortIndicatorColor default TTMSFNCTreeViewColorSelection;\r\n end;\r\n\r\n TTMSFNCListBoxCopyItems = class(TTMSFNCListBoxItems);\r\n\r\n TTMSFNCListBoxBeforeDrawSortIndicatorEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; ASortIndex: Integer; ASortKind: TTMSFNCListBoxItemsSortKind; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCListBoxAfterDrawSortIndicatorEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; ASortIndex: Integer; ASortKind: TTMSFNCListBoxItemsSortKind) of object;\r\n TTMSFNCListBoxNeedFilterDropDownDataEvent = procedure(Sender: TObject; AValues: TStrings) of object;\r\n TTMSFNCListBoxItemAnchorClickEvent = procedure(Sender: TObject; AItem: TTMSFNCListBoxItem; AAnchor: String) of object;\r\n TTMSFNCListBoxHeaderAnchorClickEvent = procedure(Sender: TObject; AAnchor: String) of object;\r\n TTMSFNCListBoxBeforeReorderItemEvent = procedure(Sender: TObject; AFromItem, AToItem: TTMSFNCListBoxItem; var ACanReorder: Boolean) of object;\r\n TTMSFNCListBoxAfterReorderItemEvent = procedure(Sender: TObject; AFromItem, AToItem: TTMSFNCListBoxItem) of object;\r\n TTMSFNCListBoxBeforeDropItemEvent = procedure(Sender: TObject; AFromItem, AToItem: TTMSFNCListBoxItem; var ACanDrop: Boolean) of object;\r\n TTMSFNCListBoxAfterDropItemEvent = procedure(Sender: TObject; AFromItem, AToItem: TTMSFNCListBoxItem) of object;\r\n TTMSFNCListBoxBeforeCopyToClipboardEvent = procedure(Sender: TObject; var ACanCopy: Boolean) of object;\r\n TTMSFNCListBoxBeforeCutToClipboardEvent = procedure(Sender: TObject; var ACanCut: Boolean) of object;\r\n TTMSFNCListBoxBeforePasteFromClipboardEvent = procedure(Sender: TObject; var ACanPaste: Boolean) of object;\r\n TTMSFNCListBoxAfterCopyToClipboardEvent = procedure(Sender: TObject) of object;\r\n TTMSFNCListBoxAfterCutToClipboardEvent = procedure(Sender: TObject) of object;\r\n TTMSFNCListBoxAfterPasteFromClipboardEvent = procedure(Sender: TObject) of object;\r\n TTMSFNCListBoxBeforeDrawItemTextEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCListBoxItem; AText: String; var AAllow: Boolean) of object;\r\n TTMSFNCListBoxAfterDrawItemTextEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCListBoxItem; AText: String) of object;\r\n TTMSFNCListBoxItemSelectedEvent = procedure(Sender: TObject; AItem: TTMSFNCListBoxItem) of object;\r\n TTMSFNCListBoxItemClickEvent = procedure(Sender: TObject; AItem: TTMSFNCListBoxItem) of object;\r\n TTMSFNCListBoxItemMouseEnterEvent = procedure(Sender: TObject; AItem: TTMSFNCListBoxItem) of object;\r\n TTMSFNCListBoxItemMouseLeaveEvent = procedure(Sender: TObject; AItem: TTMSFNCListBoxItem) of object;\r\n TTMSFNCListBoxScrollEvent = procedure(Sender: TObject; APosition: Single) of object;\r\n TTMSFNCListBoxGetItemHeightEvent = procedure(Sender: TObject; AItem: TTMSFNCListBoxItem; var AHeight: Double) of object;\r\n TTMSFNCListBoxBeforeDrawItemIconEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCListBoxItem; AIcon:TTMSFNCBitmap; var AAllow: Boolean) of object;\r\n TTMSFNCListBoxAfterDrawItemIconEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCListBoxItem; AIcon:TTMSFNCBitmap) of object;\r\n TTMSFNCListBoxBeforeDrawItemCheckEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCListBoxItem; ACheck: TTMSFNCBitmap; var AAllow: Boolean) of object;\r\n TTMSFNCListBoxAfterDrawItemCheckEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCListBoxItem; ACheck: TTMSFNCBitmap) of object;\r\n TTMSFNCListBoxBeforeDrawItemEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCListBoxItem; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCListBoxAfterDrawItemEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCListBoxItem) of object;\r\n TTMSFNCListBoxItemCompareEvent = procedure(Sender: TObject; Item1, Item2: TTMSFNCListBoxItem; var ACompareResult: Integer) of object;\r\n TTMSFNCListBoxFilterSelectEvent = procedure(Sender: TObject; var ACondition: string) of object;\r\n\r\n TTMSFNCListBoxFilterOperation = (lfoSHORT, lfoNONE, lfoAND, lfoXOR, lfoOR);\r\n\r\n TTMSFNCListBoxFilterData = class(TCollectionItem)\r\n private\r\n FCondition: string;\r\n FCaseSensitive: Boolean;\r\n FSuffix: string;\r\n FPrefix: string;\r\n FOperation: TTMSFNCListBoxFilterOperation;\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: TTMSFNCListBoxFilterOperation read FOperation write FOperation;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCListBoxFilter = class(TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCListBoxFilter = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TTMSFNCCustomListBox;\r\n function GetItem(Index: Integer): TTMSFNCListBoxFilterData;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCListBoxFilterData);\r\n public\r\n constructor Create(AOwner: TTMSFNCCustomListBox);\r\n function Add: TTMSFNCListBoxFilterData;\r\n function Insert(index: Integer): TTMSFNCListBoxFilterData;\r\n property Items[Index: Integer]: TTMSFNCListBoxFilterData read GetItem write SetItem; default;\r\n end;\r\n\r\n TTMSFNCListBoxFilteredItems = array of TTMSFNCListBoxItem;\r\n\r\n TTMSFNCCustomListBox = class(TTMSFNCCustomControl, ITMSFNCStylesManager, ITMSFNCBitmapContainer, ITMSFNCControlPickerFull)\r\n private\r\n FUpdateCount: Integer;\r\n FSaveSelectedItemIndex: Integer;\r\n FCopyItems: TTMSFNCListBoxCopyItems;\r\n FAccepted: Boolean;\r\n FItems: TTMSFNCListBoxItems;\r\n FTreeView: TTMSFNCTreeView;\r\n FDefaultItem: TTMSFNCListBoxItem;\r\n FItemsAppearance: TTMSFNCListBoxItemsAppearance;\r\n FOnItemSelected: TTMSFNCListBoxItemSelectedEvent;\r\n FInteraction: TTMSFNCListBoxInteraction;\r\n FHeader: TTMSFNCListBoxHeader;\r\n FOnItemAnchorClick: TTMSFNCListBoxItemAnchorClickEvent;\r\n FOnAfterCutToClipboard: TTMSFNCListBoxAfterCutToClipboardEvent;\r\n FOnBeforePasteFromClipboard: TTMSFNCListBoxBeforePasteFromClipboardEvent;\r\n FOnAfterReorderItem: TTMSFNCListBoxAfterReorderItemEvent;\r\n FOnBeforeDropItem: TTMSFNCListBoxBeforeDropItemEvent;\r\n FOnBeforeDrawItemText: TTMSFNCListBoxBeforeDrawItemTextEvent;\r\n FOnVScroll: TTMSFNCListBoxScrollEvent;\r\n FOnBeforeCopyToClipboard: TTMSFNCListBoxBeforeCopyToClipboardEvent;\r\n FOnItemDblClick: TTMSFNCListBoxItemClickEvent;\r\n FOnBeforeDrawItemCheck: TTMSFNCListBoxBeforeDrawItemCheckEvent;\r\n FOnAfterDrawItemIcon: TTMSFNCListBoxAfterDrawItemIconEvent;\r\n FOnBeforeDrawItem: TTMSFNCListBoxBeforeDrawItemEvent;\r\n FOnAfterPasteFromClipboard: TTMSFNCListBoxAfterPasteFromClipboardEvent;\r\n FOnItemClick: TTMSFNCListBoxItemClickEvent;\r\n FOnAfterDropItem: TTMSFNCListBoxAfterDropItemEvent;\r\n FOnAfterDrawItemText: TTMSFNCListBoxAfterDrawItemTextEvent;\r\n FOnItemCompare: TTMSFNCListBoxItemCompareEvent;\r\n FOnBeforeCutToClipboard: TTMSFNCListBoxBeforeCutToClipboardEvent;\r\n FOnBeforeReorderItem: TTMSFNCListBoxBeforeReorderItemEvent;\r\n FOnNeedFilterDropDownData: TTMSFNCListBoxNeedFilterDropDownDataEvent;\r\n FOnAfterCopyToClipboard: TTMSFNCListBoxAfterCopyToClipboardEvent;\r\n FOnFilterSelect: TTMSFNCListBoxFilterSelectEvent;\r\n FOnAfterDrawItemCheck: TTMSFNCListBoxAfterDrawItemCheckEvent;\r\n FOnAfterDrawItem: TTMSFNCListBoxAfterDrawItemEvent;\r\n FOnBeforeDrawItemIcon: TTMSFNCListBoxBeforeDrawItemIconEvent;\r\n FFilter: TTMSFNCListBoxFilter;\r\n FOnBeforeDrawSortIndicator: TTMSFNCListBoxBeforeDrawSortIndicatorEvent;\r\n FOnAfterDrawSortIndicator: TTMSFNCListBoxAfterDrawSortIndicatorEvent;\r\n FOnItemMouseLeave: TTMSFNCListBoxItemMouseLeaveEvent;\r\n FOnItemMouseEnter: TTMSFNCListBoxItemMouseEnterEvent;\r\n FSortMode: TTMSFNCListBoxItemsSortMode;\r\n FOnHeaderAnchorClick: TTMSFNCListBoxHeaderAnchorClickEvent;\r\n procedure SetItems(const Value: TTMSFNCListBoxItems);\r\n procedure SetDefaultItem(const Value: TTMSFNCListBoxItem);\r\n procedure SetItemsAppearance(const Value: TTMSFNCListBoxItemsAppearance);\r\n function GetItemIndex: Integer;\r\n procedure SetItemIndex(const Value: Integer);\r\n procedure SetInteraction(const Value: TTMSFNCListBoxInteraction);\r\n function GetBitmapContainer: TTMSFNCBitmapContainer;\r\n procedure SetBitmapContainer(const Value: TTMSFNCBitmapContainer);\r\n procedure SetHeader(const Value: TTMSFNCListBoxHeader);\r\n function GetSelectedItem: TTMSFNCListBoxItem;\r\n procedure SetSelectedItem(const Value: TTMSFNCListBoxItem);\r\n function GetSelItem(AIndex: Integer): TTMSFNCListBoxItem;\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 function GetFilteredItems: TTMSFNCListBoxFilteredItems;\r\n protected\r\n function GetSubComponentArray: TTMSFNCStylesManagerComponentArray;\r\n function IsAppearanceProperty({%H-}AObject: TObject; {%H-}APropertyName: string; {%H-}APropertyType: TTypeKind): Boolean; override;\r\n function GetVersion: string; override;\r\n function CreateItems: TTMSFNCListBoxItems; virtual;\r\n function GetItemIndexForNode(ANode: TTMSFNCTreeViewVirtualNode): Integer; virtual;\r\n function GetItemForNode(ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCListBoxItem; virtual;\r\n function GetNodeForItemIndex(AItemIndex: Integer): TTMSFNCTreeViewVirtualNode; virtual;\r\n procedure RegisterRuntimeClasses; override;\r\n procedure ApplyStyle; override;\r\n procedure ResetToDefaultStyle; override;\r\n procedure SetAdaptToStyle(const Value: Boolean); override;\r\n procedure UpdateItems; virtual;\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 DoGetNodeIconSize(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; {%H-}ALarge: Boolean; AIcon: TTMSFNCBitmap; var AIconWidth: Double; var AIconHeight: Double); virtual;\r\n procedure DoGetNumberOfNodes(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; var ANumberOfNodes: Integer); virtual;\r\n procedure DoGetNodeText(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; {%H-}AMode: TTMSFNCTreeViewNodeTextMode; var AText: String); virtual;\r\n procedure DoGetNodeTrimming(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var ATrimming: TTMSFNCGraphicsTextTrimming); virtual;\r\n procedure DoGetNodeWordWrapping(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var AWordWrapping: Boolean); 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 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 DoIsNodeEnabled(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; var AEnabled: Boolean); virtual;\r\n procedure DoAfterSelectNode(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: TTMSFNCListBoxItem; 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 DoClick(Sender: TObject);\r\n procedure DoDblClick(Sender: TObject);\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 DoColumnAnchorClick(Sender: TObject; {%H-}AColumn: Integer; AAnchor: String); virtual;\r\n procedure DoNodeClick(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure DoNodeMouseEnter(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure DoNodeMouseLeave(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: TTMSFNCListBoxItem; var ACanReorder: Boolean); virtual;\r\n procedure DoAfterReorderItem(AFromItem, AToItem: TTMSFNCListBoxItem); virtual;\r\n procedure DoBeforeDropItem(AFromItem, AToItem: TTMSFNCListBoxItem; var ACanDrop: Boolean); virtual;\r\n procedure DoAfterDropItem(AFromItem, AToItem: TTMSFNCListBoxItem); 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 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 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 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 BitmapContainer: TTMSFNCBitmapContainer read GetBitmapContainer write SetBitmapContainer;\r\n property Items: TTMSFNCListBoxItems read FItems write SetItems;\r\n property DefaultItem: TTMSFNCListBoxItem read FDefaultItem write SetDefaultItem;\r\n property ItemsAppearance: TTMSFNCListBoxItemsAppearance read FItemsAppearance write SetItemsAppearance;\r\n property Interaction: TTMSFNCListBoxInteraction read FInteraction write SetInteraction;\r\n property ItemIndex: Integer read GetItemIndex write SetItemIndex default -1;\r\n property OnItemSelected: TTMSFNCListBoxItemSelectedEvent read FOnItemSelected write FOnItemSelected;\r\n property Header: TTMSFNCListBoxHeader read FHeader write SetHeader;\r\n property VerticalScrollBarVisible: Boolean read GetVerticalScrollBarVisible write SetVerticalScrollBarVisible default True;\r\n property OnNeedFilterDropDownData: TTMSFNCListBoxNeedFilterDropDownDataEvent read FOnNeedFilterDropDownData write FOnNeedFilterDropDownData;\r\n property OnFilterSelect: TTMSFNCListBoxFilterSelectEvent read FOnFilterSelect write FOnFilterSelect;\r\n property OnBeforeDrawItem: TTMSFNCListBoxBeforeDrawItemEvent read FOnBeforeDrawItem write FOnBeforeDrawItem;\r\n property OnAfterDrawItem: TTMSFNCListBoxAfterDrawItemEvent read FOnAfterDrawItem write FOnAfterDrawItem;\r\n property OnItemCompare: TTMSFNCListBoxItemCompareEvent read FOnItemCompare write FOnItemCompare;\r\n property OnAfterDrawItemIcon: TTMSFNCListBoxAfterDrawItemIconEvent read FOnAfterDrawItemIcon write FOnAfterDrawItemIcon;\r\n property OnBeforeDrawItemIcon: TTMSFNCListBoxBeforeDrawItemIconEvent read FOnBeforeDrawItemIcon write FOnBeforeDrawItemIcon;\r\n property OnAfterDrawItemCheck: TTMSFNCListBoxAfterDrawItemCheckEvent read FOnAfterDrawItemCheck write FOnAfterDrawItemCheck;\r\n property OnBeforeDrawItemCheck: TTMSFNCListBoxBeforeDrawItemCheckEvent read FOnBeforeDrawItemCheck write FOnBeforeDrawItemCheck;\r\n property OnBeforeDrawItemText: TTMSFNCListBoxBeforeDrawItemTextEvent read FOnBeforeDrawItemText write FOnBeforeDrawItemText;\r\n property OnAfterDrawItemText: TTMSFNCListBoxAfterDrawItemTextEvent read FOnAfterDrawItemText write FOnAfterDrawItemText;\r\n property OnAfterDrawSortIndicator: TTMSFNCListBoxAfterDrawSortIndicatorEvent read FOnAfterDrawSortIndicator write FOnAfterDrawSortIndicator;\r\n property OnBeforeDrawSortIndicator: TTMSFNCListBoxBeforeDrawSortIndicatorEvent read FOnBeforeDrawSortIndicator write FOnBeforeDrawSortIndicator;\r\n property OnItemAnchorClick: TTMSFNCListBoxItemAnchorClickEvent read FOnItemAnchorClick write FOnItemAnchorClick;\r\n property OnItemClick: TTMSFNCListBoxItemClickEvent read FOnItemClick write FOnItemClick;\r\n property OnItemMouseEnter: TTMSFNCListBoxItemMouseEnterEvent read FOnItemMouseEnter write FOnItemMouseEnter;\r\n property OnItemMouseLeave: TTMSFNCListBoxItemMouseLeaveEvent read FOnItemMouseLeave write FOnItemMouseLeave;\r\n property OnItemDblClick: TTMSFNCListBoxItemClickEvent read FOnItemDblClick write FOnItemDblClick;\r\n property OnVScroll: TTMSFNCListBoxScrollEvent read FOnVScroll write FOnVScroll;\r\n property OnBeforeReorderItem: TTMSFNCListBoxBeforeReorderItemEvent read FOnBeforeReorderItem write FOnBeforeReorderItem;\r\n property OnAfterReorderItem: TTMSFNCListBoxAfterReorderItemEvent read FOnAfterReorderItem write FOnAfterReorderItem;\r\n property OnBeforeDropItem: TTMSFNCListBoxBeforeDropItemEvent read FOnBeforeDropItem write FOnBeforeDropItem;\r\n property OnAfterDropItem: TTMSFNCListBoxAfterDropItemEvent read FOnAfterDropItem write FOnAfterDropItem;\r\n property OnBeforeCutToClipboard: TTMSFNCListBoxBeforeCutToClipboardEvent read FOnBeforeCutToClipboard write FOnBeforeCutToClipboard;\r\n property OnBeforeCopyToClipboard: TTMSFNCListBoxBeforeCopyToClipboardEvent read FOnBeforeCopyToClipboard write FOnBeforeCopyToClipboard;\r\n property OnBeforePasteFromClipboard: TTMSFNCListBoxBeforePasteFromClipboardEvent read FOnBeforePasteFromClipboard write FOnBeforePasteFromClipboard;\r\n property OnAfterCutToClipboard: TTMSFNCListBoxAfterCutToClipboardEvent read FOnAfterCutToClipboard write FOnAfterCutToClipboard;\r\n property OnAfterCopyToClipboard: TTMSFNCListBoxAfterCopyToClipboardEvent read FOnAfterCopyToClipboard write FOnAfterCopyToClipboard;\r\n property OnAfterPasteFromClipboard: TTMSFNCListBoxAfterPasteFromClipboardEvent read FOnAfterPasteFromClipboard write FOnAfterPasteFromClipboard;\r\n property OnHeaderAnchorClick: TTMSFNCListBoxHeaderAnchorClickEvent read FOnHeaderAnchorClick write FOnHeaderAnchorClick;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n function AddItem(AText: string = ''): TTMSFNCListBoxItem; virtual;\r\n function XYToItem(X, Y: Single): TTMSFNCListBoxItem; virtual;\r\n function XYToItemIndex(X, Y: Single): Integer; virtual;\r\n function SelectedItemCount: Integer; virtual;\r\n function GetItemsFromClipboard: TTMSFNCListBoxCopyItems; virtual;\r\n function LookupItem(ALookupString: String; ACaseSensitive: Boolean = False; AAutoSelect: Boolean = False): TTMSFNCListBoxItem; virtual;\r\n function IsItemSelectable(AItem: TTMSFNCListBoxItem): Boolean; virtual;\r\n procedure RemoveItem(AItem: TTMSFNCListBoxItem); virtual;\r\n procedure DoEnter; override;\r\n procedure BeginUpdate; override;\r\n procedure EndUpdate; override;\r\n procedure InitSample; virtual;\r\n procedure UnSelectAllItems; virtual;\r\n procedure LoadSettingsFromFile(AFileName: string); override;\r\n procedure LoadSettingsFromStream(AStream: TStreamEx); override;\r\n procedure ScrollToItem(AItemIndex: Integer); virtual;\r\n procedure SelectItem(AItemIndex: Integer); virtual;\r\n procedure SelectItems(AItemIndexes: TTMSFNCListBoxItemArray); virtual;\r\n {$IFNDEF WEBLIB}\r\n procedure LoadFromStrings(AStrings: TStrings); virtual;\r\n procedure SaveToStrings(AStrings: TStrings); virtual;\r\n procedure LoadFromFile(AFileName: string); virtual;\r\n procedure SaveToFile(AFileName: string; ATextOnly: Boolean = True); virtual;\r\n procedure LoadFromStream(AStream: TStream); 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: TTMSFNCListBoxItemsSortMode = ismAscending); {$IFDEF FMXLIB}reintroduce;{$ENDIF} virtual;\r\n procedure ClearSorting; virtual;\r\n procedure ApplyFilter; virtual;\r\n procedure RemoveFilter; virtual;\r\n procedure RemoveFilters; virtual;\r\n property FilteredItems: TTMSFNCListBoxFilteredItems read GetFilteredItems;\r\n property Filter: TTMSFNCListBoxFilter read FFilter;\r\n property SelectedItem: TTMSFNCListBoxItem read GetSelectedItem write SetSelectedItem;\r\n property SelectedItems[AIndex: Integer]: TTMSFNCListBoxItem read GetSelItem;\r\n property TreeView: TTMSFNCTreeView read FTreeView;\r\n property SortMode: TTMSFNCListBoxItemsSortMode read FSortMode;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCListBox = class(TTMSFNCCustomListBox)\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n published\r\n property Fill;\r\n property Stroke;\r\n property BitmapContainer;\r\n property ItemsAppearance;\r\n property DefaultItem;\r\n property Items;\r\n property Header;\r\n property ItemIndex;\r\n property Interaction;\r\n property OnItemSelected;\r\n property Version;\r\n property VerticalScrollBarVisible;\r\n property OnNeedFilterDropDownData;\r\n property OnFilterSelect;\r\n property OnBeforeDrawItem;\r\n property OnAfterDrawItem;\r\n property OnItemCompare;\r\n property OnAfterDrawItemIcon;\r\n property OnBeforeDrawItemIcon;\r\n property OnBeforeDrawItemText;\r\n property OnAfterDrawItemText;\r\n property OnAfterDrawSortIndicator;\r\n property OnBeforeDrawSortIndicator;\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 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 end;\r\n\r\nimplementation\r\n\r\nuses\r\n WEBLib.TMSFNCUtils, WEBLib.Controls, SysUtils, WEBLib.Graphics, WEBLib.TMSFNCCustomSelector\r\n {$IFDEF FMXLIB}\r\n ,FMX.Types\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n ,Generics.Collections\r\n {$ENDIF}\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCTreeViewOpen = class(TTMSFNCTreeView);\r\n TTMSFNCCustomTreeViewOpen = class(TTMSFNCCustomTreeView);\r\n TTMSFNCCustomListBoxOpen = class(TTMSFNCCustomListBox);\r\n\r\nfunction TTMSFNCCustomListBox.AddItem(AText: string = ''): TTMSFNCListBoxItem;\r\nbegin\r\n Result := Items.Add;\r\n Result.Text := AText;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.ApplyFilter;\r\nvar\r\n I: Integer;\r\n ft: TTMSFNCTreeViewFilterData;\r\n o: Integer;\r\nbegin\r\n if Assigned(FTreeView) then\r\n begin\r\n FTreeView.Filter.Clear;\r\n for I := 0 to Filter.Count - 1 do\r\n begin\r\n ft := FTreeView.Filter.Add;\r\n ft.Column := 0;\r\n ft.Condition := Filter[I].Condition;\r\n ft.CaseSensitive := Filter[I].CaseSensitive;\r\n ft.Prefix := Filter[I].Prefix;\r\n ft.Suffix := Filter[I].Suffix;\r\n o := Integer(Filter[I].Operation);\r\n ft.Operation := TTMSFNCTreeViewFilterOperation(o);\r\n end;\r\n FTreeView.ApplyFilter;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.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 DefaultItem.TextColor := c;\r\n for I := 0 to Items.Count - 1 do\r\n begin\r\n Items[I].TextColor := c;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTMSFNCCustomListBox) then\r\n FTreeView.Assign((Source as TTMSFNCCustomListBox).TreeView);\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.BeginUpdate;\r\nbegin\r\n inherited;\r\n if Assigned(FTreeView) then\r\n begin\r\n if FUpdateCount = 0 then\r\n FSaveSelectedItemIndex := ItemIndex;\r\n\r\n Inc(FUpdateCount);\r\n FTreeView.BeginUpdate;\r\n FTreeView.ClearNodeList;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.ClearSorting;\r\nbegin\r\n if Assigned(FTreeView) then\r\n FTreeView.ClearSorting;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.CopyToClipboard(ATextOnly: Boolean);\r\nvar\r\n s: String;\r\n I: Integer;\r\n it: TTMSFNCListBoxItem;\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 TTMSFNCCustomListBox.Create(AOwner: TComponent);\r\nvar\r\n c: TTMSFNCTreeViewColumn;\r\nbegin\r\n inherited;\r\n FFilter := TTMSFNCListBoxFilter.Create(Self);\r\n FHeader := TTMSFNCListBoxHeader.Create(Self);\r\n FItemsAppearance := TTMSFNCListBoxItemsAppearance.Create(Self);\r\n FDefaultItem := TTMSFNCListBoxItem.Create(nil);\r\n FItems := CreateItems;\r\n FInteraction := TTMSFNCListBoxInteraction.Create(Self);\r\n FCopyItems := TTMSFNCListBoxCopyItems.Create(nil);\r\n FTreeView := TTMSFNCTreeView.Create(Self);\r\n FTreeView.Stored := False;\r\n FTreeView.Parent := Self;\r\n FTreeView.Columns.Clear;\r\n c := FTreeView.Columns.Add;\r\n c.Text := 'Header';\r\n c.HorizontalTextAlign := gtaCenter;\r\n FTreeView.ClearNodes;\r\n FTreeView.ColumnsAppearance.Layouts := [];\r\n FTreeView.StretchScrollBars := True;\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 := tsaFull;\r\n FTreeView.OnGetNumberOfNodes := DoGetNumberOfNodes;\r\n FTreeView.OnGetNodeHeight := DoGetNodeHeight;\r\n FTreeView.OnGetNodeIcon := DoGetNodeIcon;\r\n FTreeView.OnGetNodeIconSize := DoGetNodeIconSize;\r\n FTreeView.OnGetNodeTrimming := DoGetNodeTrimming;\r\n FTreeView.OnGetNodeWordWrapping := DoGetNodeWordWrapping;\r\n FTreeView.OnGetNodeTextColor := DoGetNodeTextColor;\r\n FTreeView.OnGetNodeSelectedTextColor := DoGetNodeSelectedTextColor;\r\n FTreeView.OnGetNodeDisabledTextColor := DoGetNodeDisabledTextColor;\r\n FTreeView.OnGetNodeText := DoGetNodeText;\r\n FTreeView.OnGetNodeHorizontalTextAlign := DoGetNodeHorizontalTextAlign;\r\n FTreeView.OnGetNodeVerticalTextAlign := DoGetNodeVerticalTextAlign;\r\n FTreeView.OnIsNodeEnabled := DoIsNodeEnabled;\r\n FTreeView.OnAfterSelectNode := DoAfterSelectNode;\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.OnNodeAnchorClick := DoNodeAnchorClick;\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.OnColumnAnchorClick := @DoColumnAnchorClick;\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 FTreeView.OnClick := DoClick;\r\n FTreeView.OnDblClick := DoDblClick;\r\n\r\n CustomizeTreeView(FTreeView);\r\n {$IFDEF FMXLIB}\r\n FTreeView.Align := TAlignLayout.Client;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n FTreeView.Align := alClient;\r\n {$ENDIF}\r\n\r\n Width := 200;\r\n Height := 220;\r\n if IsDesignTime then\r\n InitSample;\r\nend;\r\n\r\nfunction TTMSFNCCustomListBox.CreateItems: TTMSFNCListBoxItems;\r\nbegin\r\n Result := TTMSFNCListBoxItems.Create(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.CustomizeTreeView(\r\n ATreeView: TTMSFNCTreeView);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.Destroy;\r\nbegin\r\n FFilter.Free;\r\n FCopyItems.Free;\r\n FHeader.Free;\r\n FDefaultItem.Free;\r\n FInteraction.Free;\r\n FItems.Free;\r\n FTreeView.Free;\r\n FItemsAppearance.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoAfterCopyToClipboard(Sender: TObject);\r\nbegin\r\n if Assigned(OnAfterCopyToClipboard) then\r\n OnAfterCopyToClipboard(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoAfterCutToClipboard(Sender: TObject);\r\nbegin\r\n if Assigned(OnAfterCutToClipboard) then\r\n OnAfterCutToClipboard(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.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: TTMSFNCListBoxItemsSortKind;\r\nbegin\r\n if Assigned(OnAfterDrawSortIndicator) then\r\n begin\r\n i := Integer(ASortKind);\r\n sk := TTMSFNCListBoxItemsSortKind(i);\r\n OnAfterDrawSortIndicator(Self, AGraphics, ARect, ASortIndex, sk);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoAfterDropItem(AFromItem: TTMSFNCListBoxItem; AToItem: TTMSFNCListBoxItem);\r\nbegin\r\n if Assigned(OnAfterDropItem) then\r\n OnAfterDropItem(Self, AFromItem, AToItem);\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoAfterPasteFromClipboard(Sender: TObject);\r\nbegin\r\n if Assigned(OnAfterPasteFromClipboard) then\r\n OnAfterPasteFromClipboard(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoAfterReorderItem(AFromItem, AToItem: TTMSFNCListBoxItem);\r\nbegin\r\n if Assigned(OnAfterReorderItem) then\r\n OnAfterReorderItem(Self, AFromItem, AToItem);\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.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(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\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.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: TTMSFNCListBoxItemsSortKind;\r\nbegin\r\n if Assigned(OnBeforeDrawSortIndicator) then\r\n begin\r\n i := Integer(ASortKind);\r\n sk := TTMSFNCListBoxItemsSortKind(i);\r\n OnBeforeDrawSortIndicator(Self, AGraphics, ARect, ASortIndex, sk, ADefaultDraw);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoBeforeDropItem(AFromItem: TTMSFNCListBoxItem; AToItem: TTMSFNCListBoxItem; var ACanDrop: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDropItem) then\r\n OnBeforeDropItem(Self, AFromItem, AToItem, ACanDrop);\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.DoBeforeReorderItem(AFromItem, AToItem: TTMSFNCListBoxItem; var ACanReorder: Boolean);\r\nbegin\r\n if Assigned(OnBeforeReorderItem) then\r\n OnBeforeReorderItem(Self, AFromItem, AToItem, ACanReorder);\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoClick(Sender: TObject);\r\nbegin\r\n Click;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoColumnAnchorClick(Sender: TObject; AColumn: Integer; AAnchor: String);\r\nbegin\r\n if Assigned(OnHeaderAnchorClick) then\r\n OnHeaderAnchorClick(Self, AAnchor)\r\n else\r\n TTMSFNCUtils.OpenURL(AAnchor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.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 [lcsNormalCaseSensitive], TTMSFNCListBoxItemsSortMode(i));\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoCopyToClipboard(Sender: TObject);\r\nbegin\r\n CopyToClipboard(Interaction.ClipboardMode = lcmTextOnly);\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoCustomDragDrop(Sender, Source: TObject;\r\n Point: TPointF);\r\nvar\r\n di, dragi, li: TTMSFNCListBoxItem;\r\n dragn: TTMSFNCTreeViewVirtualNode;\r\n b: Boolean;\r\nbegin\r\n if FAccepted and Assigned(Source) and (Source is TTMSFNCCustomTreeView) and ((Source as TTMSFNCCustomTreeView).Parent is TTMSFNCCustomListBox)\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 := TTMSFNCCustomListBoxOpen((Source as TTMSFNCCustomTreeView).Parent).GetItemForNode(dragn);\r\n di := XYToItem(Point.X, Point.Y);\r\n if (di <> dragi) and Assigned(dragi) then\r\n begin\r\n b := True;\r\n DoBeforeDropItem(dragi, di, b);\r\n if b then\r\n begin\r\n BeginUpdate;\r\n TTMSFNCCustomListBoxOpen((Source as TTMSFNCCustomTreeView).Parent).BeginUpdate;\r\n if Assigned(di) then\r\n begin\r\n case TTMSFNCCustomListBoxOpen((Source as TTMSFNCCustomTreeView).Parent).Interaction.DragDropMode of\r\n ldmMove:\r\n begin\r\n if (Source as TTMSFNCCustomTreeView).Parent = Self then\r\n begin\r\n dragi.Index := di.Index;\r\n end\r\n else\r\n begin\r\n li := Items.Add;\r\n li.Assign(dragi);\r\n li.Index := di.Index;\r\n TTMSFNCCustomListBoxOpen((Source as TTMSFNCCustomTreeView).Parent).Items.Delete(dragi.Index);\r\n end;\r\n end;\r\n ldmCopy:\r\n begin\r\n li := Items.Add;\r\n li.Assign(dragi);\r\n li.Index := di.Index;\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n li := Items.Add;\r\n li.Assign(dragi);\r\n case TTMSFNCCustomListBoxOpen((Source as TTMSFNCCustomTreeView).Parent).Interaction.DragDropMode of\r\n ldmMove: TTMSFNCCustomListBoxOpen((Source as TTMSFNCCustomTreeView).Parent).Items.Delete(dragi.Index);\r\n end;\r\n end;\r\n (Source as TTMSFNCCustomTreeView).DragNode := nil;\r\n TTMSFNCCustomListBoxOpen((Source as TTMSFNCCustomTreeView).Parent).EndUpdate;\r\n EndUpdate;\r\n DoAfterDropItem(dragi, di);\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoCustomDragOver(Sender, Source: TObject;\r\n Point: TPointF; var Accept: Boolean);\r\nbegin\r\n Accept := (Interaction.DragDropMode <> ldmNone) and (Source is TTMSFNCCustomTreeView) and Assigned((Source as TTMSFNCCustomTreeView).DragNode);\r\n FAccepted := Accept;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoCustomReorder(Sender: TObject; AFromNode,\r\n AToNode: TTMSFNCTreeViewVirtualNode);\r\nvar\r\n it, itt: TTMSFNCListBoxItem;\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 TTMSFNCCustomListBox.DoCutToClipboard(Sender: TObject);\r\nbegin\r\n CutToClipboard(Interaction.ClipboardMode = lcmTextOnly);\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoDblClick(Sender: TObject);\r\nbegin\r\n DblClick;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.DoGetNodeDisabledTextColor(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var ADisabledTextColor: TTMSFNCGraphicsColor);\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= Items.Count - 1) then\r\n ADisabledTextColor := Items[ANode.Row].DisabledTextColor;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoGetNodeHeight(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AHeight: Double);\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= Items.Count - 1) then\r\n begin\r\n if Items[ANode.Row].Height > -1 then\r\n AHeight := Items[ANode.Row].Height;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoGetNodeHorizontalTextAlign(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var AHorizontalTextAlign: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= Items.Count - 1) then\r\n AHorizontalTextAlign := Items[ANode.Row].TextAlign;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoGetNodeVerticalTextAlign(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var AVerticalTextAlign: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n AVerticalTextAlign := gtaCenter;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoGetNodeIcon(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; ALarge: Boolean;\r\n var AIcon: TTMSFNCBitmap);\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= Items.Count - 1) then\r\n begin\r\n if Assigned(BitmapContainer) and (Items[ANode.Row].BitmapName <> '') then\r\n AIcon := BitmapContainer.FindBitmap(Items[ANode.Row].BitmapName);\r\n\r\n if not Assigned(AIcon) then\r\n AIcon := Items[ANode.Row].Bitmap;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoGetNodeIconSize(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; ALarge: Boolean;\r\n AIcon: TTMSFNCBitmap; var AIconWidth, AIconHeight: Double);\r\nvar\r\n w, h: Single;\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= Items.Count - 1) then\r\n begin\r\n w := Items[ANode.Row].BitmapWidth;\r\n if w <> -1 then\r\n AIconWidth := w;\r\n\r\n h := Items[ANode.Row].BitmapHeight;\r\n if h <> -1 then\r\n AIconHeight := h;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoGetNodeSelectedTextColor(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var ASelectedTextColor: TTMSFNCGraphicsColor);\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= Items.Count - 1) then\r\n ASelectedTextColor := Items[ANode.Row].SelectedTextColor;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoGetNodeText(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode;\r\n AColumn: Integer; AMode: TTMSFNCTreeViewNodeTextMode; var AText: String);\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= Items.Count - 1) then\r\n AText := Items[ANode.Row].Text;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoGetNodeTextColor(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var ATextColor: TTMSFNCGraphicsColor);\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= Items.Count - 1) then\r\n ATextColor := Items[ANode.Row].TextColor;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoGetNodeTrimming(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var ATrimming: TTMSFNCGraphicsTextTrimming);\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= Items.Count - 1) then\r\n ATrimming := Items[ANode.Row].Trimming;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoGetNodeWordWrapping(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var AWordWrapping: Boolean);\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= Items.Count - 1) then\r\n AWordWrapping := Items[ANode.Row].WordWrapping;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoGetNumberOfNodes(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode; var ANumberOfNodes: Integer);\r\nbegin\r\n if ANode.Level = -1 then\r\n ANumberOfNodes := Items.Count;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoIsNodeEnabled(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode; var AEnabled: Boolean);\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= Items.Count - 1) then\r\n AEnabled := Items[ANode.Row].Enabled;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoLookup(Sender: TObject; ALookupString: String);\r\nbegin\r\n LookupItem(ALookupString, Interaction.Lookup.CaseSensitive, Interaction.Lookup.AutoSelect)\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.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\r\n TTMSFNCUtils.OpenURL(AAnchor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoNodeClick(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n if Assigned(OnItemClick) then\r\n OnItemClick(Self, GetItemForNode(ANode));\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.DoItemCompare(AItem1: TTMSFNCListBoxItem; AItem2: TTMSFNCListBoxItem; var ACompareResult: Integer);\r\nbegin\r\n if Assigned(OnItemCompare) then\r\n OnItemCompare(Self, AItem1, AItem2, ACompareResult);\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.DoPasteFromClipboard(Sender: TObject);\r\nbegin\r\n PasteFromClipboard;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.DoVScroll(Sender: TObject; APosition: Single);\r\nbegin\r\n if Assigned(OnVScroll) then\r\n OnVScroll(Self, APosition);\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.EndUpdate;\r\nbegin\r\n inherited;\r\n if Assigned(FTreeView) then\r\n begin\r\n Dec(FUpdateCount);\r\n FTreeView.EndUpdate;\r\n if FUpdateCount = 0 then\r\n ItemIndex := FSaveSelectedItemIndex\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.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\nfunction TTMSFNCCustomListBox.GetFilteredItems: TTMSFNCListBoxFilteredItems;\r\nvar\r\n I: Integer;\r\n li: TTMSFNCListBoxItem;\r\nbegin\r\n for I := 0 to TTMSFNCTreeViewOpen(FTreeView).VisibleNodes.Count - 1 do\r\n begin\r\n SetLength(Result, Length(Result) + 1);\r\n li := GetItemForNode(TTMSFNCTreeViewOpen(FTreeView).VisibleNodes[I]);\r\n Result[Length(Result) - 1] := li;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomListBox.GetItemForNode(\r\n ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCListBoxItem;\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 TTMSFNCCustomListBox.GetItemIndex: Integer;\r\nbegin\r\n Result := -1;\r\n if Assigned(FTreeView) and (FTreeView.SelectedVirtualNodeCount > 0) and Assigned(FTreeView.SelectedVirtualNodes[0]) then\r\n Result := FTreeView.SelectedVirtualNodes[0].Row;\r\nend;\r\n\r\nfunction TTMSFNCCustomListBox.GetItemIndexForNode(\r\n ANode: TTMSFNCTreeViewVirtualNode): Integer;\r\nbegin\r\n Result := -1;\r\n if Assigned(ANode) then\r\n Result := ANode.Row;\r\nend;\r\n\r\nfunction TTMSFNCCustomListBox.GetItemsFromClipboard: TTMSFNCListBoxCopyItems;\r\nvar\r\n s: String;\r\n a: TStringList;\r\n AItem: TTMSFNCListBoxItem;\r\n I: Integer;\r\n CurrStr: String;\r\n templ: TTMSFNCCustomListBox;\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 := TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.GetNodeForItemIndex(\r\n AItemIndex: Integer): TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n Result := TTMSFNCTreeViewOpen(FTreeView).GetNodeForRow(AItemIndex);\r\nend;\r\n\r\nfunction TTMSFNCCustomListBox.GetSelectedItem: TTMSFNCListBoxItem;\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 TTMSFNCCustomListBox.GetSelItem(AIndex: Integer): TTMSFNCListBoxItem;\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 TTMSFNCCustomListBox.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\nfunction TTMSFNCCustomListBox.GetSubComponentArray: TTMSFNCStylesManagerComponentArray;\r\nbegin\r\n SetLength(Result, 1);\r\n Result[0] := FTreeView;\r\nend;\r\n\r\nfunction TTMSFNCCustomListBox.GetVersion: string;\r\nbegin\r\n Result := GetVersionNumber(MAJ_VER, MIN_VER, REL_VER, BLD_VER);\r\nend;\r\n\r\nfunction TTMSFNCCustomListBox.GetVerticalScrollBarVisible: Boolean;\r\nbegin\r\n Result := True;\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.VerticalScrollBarVisible;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.InitSample;\r\nbegin\r\n BeginUpdate;\r\n Items.Clear;\r\n AddItem('Mercedes');\r\n AddItem('Audi');\r\n AddItem('BMW');\r\n AddItem('Land Rover');\r\n AddItem('Bugatti');\r\n EndUpdate;\r\nend;\r\n\r\nfunction TTMSFNCCustomListBox.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');\r\nend;\r\n\r\nfunction TTMSFNCCustomListBox.IsItemSelectable(AItem: TTMSFNCListBoxItem): 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\n{$IFNDEF WEBLIB}\r\nprocedure TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.LoadFromStream(AStream: TStream);\r\nvar\r\n List: TStringList;\r\n AItem: TTMSFNCListBoxItem;\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\r\nprocedure TTMSFNCCustomListBox.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{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomListBox.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 <> ItemsAppearance.Font.Color) then\r\n begin\r\n DefaultItem.TextColor := ItemsAppearance.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 TTMSFNCCustomListBox.LoadSettingsFromStream(AStream: TStreamEx);\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 <> ItemsAppearance.Font.Color) then\r\n begin\r\n DefaultItem.TextColor := ItemsAppearance.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\nfunction TTMSFNCCustomListBox.LookupItem(ALookupString: String; ACaseSensitive,\r\n AAutoSelect: Boolean): TTMSFNCListBoxItem;\r\nvar\r\n v: String;\r\n it: TTMSFNCListBoxItem;\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\nprocedure TTMSFNCCustomListBox.PasteFromClipboard;\r\nvar\r\n s: String;\r\n a: TStringList;\r\n AItem: TTMSFNCListBoxItem;\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\nprocedure TTMSFNCCustomListBox.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClass(TTMSFNCCustomListBox);\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.RemoveFilter;\r\nbegin\r\n if Assigned(FTreeView) then\r\n FTreeView.RemoveFilter;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.RemoveFilters;\r\nbegin\r\n if Assigned(FTreeView) then\r\n FTreeView.RemoveFilters;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.RemoveItem(AItem: TTMSFNCListBoxItem);\r\nbegin\r\n if Assigned(AItem) then\r\n Items.Delete(AItem.Index);\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.ResetToDefaultStyle;\r\nvar\r\n I: Integer;\r\nbegin\r\n inherited;\r\n for I := 0 to Items.Count - 1 do\r\n Items[I].TextColor := gcBlack;\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nprocedure TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.SaveToStream(AStream: TStream; ATextOnly: Boolean = True);\r\nvar\r\n AItem: TTMSFNCListBoxItem;\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 TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.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(AItemIndex), True, tvnspTop);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.SelectItem(AItemIndex: Integer);\r\nvar\r\n t: TTMSFNCTreeViewOpen;\r\nbegin\r\n if Assigned(FTreeView) then\r\n begin\r\n t := TTMSFNCTreeViewOpen(FTreeView);\r\n if (AItemIndex >= 0) and (AItemIndex <= Items.Count - 1) then\r\n t.SelectVirtualNode(t.GetNodeForRow(AItemIndex))\r\n else\r\n t.SelectVirtualNode(nil);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.SelectItems(\r\n AItemIndexes: TTMSFNCListBoxItemArray);\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(AItemIndexes[I]);\r\n\r\n t.SelectVirtualNodes(na);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.SetItemsAppearance(\r\n const Value: TTMSFNCListBoxItemsAppearance);\r\nbegin\r\n FItemsAppearance.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.SetSelectedItem(const Value: TTMSFNCListBoxItem);\r\nbegin\r\n if Assigned(Value) then\r\n ItemIndex := Value.Index;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.Sort(ACaseSensitive: Boolean;\r\n ASortingMode: TTMSFNCListBoxItemsSortMode);\r\nbegin\r\n Items.Sort(ACaseSensitive, ASortingMode);\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.SetBitmapContainer(\r\n const Value: TTMSFNCBitmapContainer);\r\nbegin\r\n FTreeView.BitmapContainer := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.SetDefaultItem(const Value: TTMSFNCListBoxItem);\r\nbegin\r\n FDefaultItem.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.SetHeader(const Value: TTMSFNCListBoxHeader);\r\nbegin\r\n FHeader.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.SetInteraction(\r\n const Value: TTMSFNCListBoxInteraction);\r\nbegin\r\n FInteraction.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.SetItemIndex(const Value: Integer);\r\nbegin\r\n SelectItem(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.SetItems(const Value: TTMSFNCListBoxItems);\r\nbegin\r\n FItems.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.UnSelectAllItems;\r\nbegin\r\n if Assigned(FTreeView) then\r\n FTreeView.UnSelectAllVirtualNodes;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.UpdateItems;\r\nvar\r\n sel: TTMSFNCListBoxItem;\r\nbegin\r\n if IsDestroying then\r\n Exit;\r\n\r\n if Assigned(FTreeView) and (FUpdateCount = 0) then\r\n begin\r\n sel := SelectedItem;\r\n FTreeView.BeginUpdate;\r\n FTreeView.ClearNodeList;\r\n FTreeView.EndUpdate;\r\n SelectedItem := sel;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomListBox.XYToItem(X, Y: Single): TTMSFNCListBoxItem;\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 <= Items.Count - 1) then\r\n Result := Items[n.Row];\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomListBox.XYToItemIndex(X, Y: Single): Integer;\r\nvar\r\n it: TTMSFNCListBoxItem;\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\n{ TTMSFNCCustomListBox picker implementation }\r\n\r\nprocedure TTMSFNCCustomListBox.PickerApplyFilter(ACondition: string; ACaseSensitive: Boolean);\r\nbegin\r\n ApplyFilter;\r\nend;\r\n\r\nfunction TTMSFNCCustomListBox.PickerGetContent: String;\r\nbegin\r\n Result := '';\r\n if ItemIndex >= 0 then\r\n Result := Items[ItemIndex].Text;\r\nend;\r\n\r\nfunction TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.PickerGetItemCount: Integer;\r\nbegin\r\n Result := Items.Count;\r\nend;\r\n\r\nfunction TTMSFNCCustomListBox.PickerGetItemHeight: Single;\r\nbegin\r\n Result := ItemsAppearance.FixedHeight;\r\nend;\r\n\r\nfunction TTMSFNCCustomListBox.PickerGetItemWidth: Single;\r\nbegin\r\n Result := Width;\r\nend;\r\n\r\nfunction TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.PickerGetSelectedItem: Integer;\r\nbegin\r\n Result := ItemIndex;\r\nend;\r\n\r\nfunction TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.PickerLookupItem(ALookupString: String; ACaseSensitive: Boolean): TTMSFNCControlPickerFilterItem;\r\nvar\r\n it: TTMSFNCListBoxItem;\r\nbegin\r\n it := LookupItem(ALookupString, ACaseSensitive);\r\n Result.ItemIndex := it.Index;\r\n Result.ItemText := it.Text;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.PickerResetFilter;\r\nbegin\r\n RemoveFilter;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.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 TTMSFNCCustomListBox.PickerSetItemHeight(AValue: Single);\r\nbegin\r\n ItemsAppearance.FixedHeight := AValue;\r\nend;\r\n\r\nprocedure TTMSFNCCustomListBox.PickerSetItemWidth(AValue: Single);\r\nbegin\r\n //\r\nend;\r\n\r\n{ TTMSFNCListBoxItems }\r\n\r\nfunction TTMSFNCListBoxItems.Add: TTMSFNCListBoxItem;\r\nbegin\r\n Result := TTMSFNCListBoxItem(inherited Add);\r\nend;\r\n\r\nprocedure TTMSFNCListBoxItems.Clear;\r\nvar\r\n l: TTMSFNCCustomListBox;\r\nbegin\r\n l := ListBox;\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 TTMSFNCListBoxItems.Compare(AItem1, AItem2: TTMSFNCListBoxItem;\r\n ACaseSensitive: Boolean; ASortingMode: TTMSFNCListBoxItemsSortMode): Integer;\r\nvar\r\n l: TTMSFNCCustomListBox;\r\nbegin\r\n Result := 0;\r\n\r\n l := ListBox;\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 ismDescending: Result := Result * -1;\r\n end;\r\n\r\n l.DoItemCompare(AItem1, AItem2, Result);\r\nend;\r\n\r\nconstructor TTMSFNCListBoxItems.Create(AListBox: TTMSFNCCustomListBox);\r\nbegin\r\n inherited Create(AListBox, GetItemClass);\r\n FListBox := AListBox;\r\nend;\r\n\r\nfunction TTMSFNCListBoxItems.GetItem(Index: Integer): TTMSFNCListBoxItem;\r\nbegin\r\n Result := TTMSFNCListBoxItem(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCListBoxItems.GetItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCListBoxItem;\r\nend;\r\n\r\nfunction TTMSFNCListBoxItems.Insert(Index: Integer): TTMSFNCListBoxItem;\r\nbegin\r\n Result := TTMSFNCListBoxItem(inherited Insert(Index));\r\nend;\r\n\r\nfunction TTMSFNCListBoxItems.ListBox: TTMSFNCCustomListBox;\r\nbegin\r\n Result := FListBox;\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 TTMSFNCListBoxItems.QuickSort(L, R: Integer; ACaseSensitive: Boolean;\r\n ASortingMode: TTMSFNCListBoxItemsSortMode);\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 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 TTMSFNCListBoxItems.SetItem(Index: Integer;\r\n const Value: TTMSFNCListBoxItem);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxItems.Sort(ACaseSensitive: Boolean;\r\n ASortingMode: TTMSFNCListBoxItemsSortMode);\r\nvar\r\n l: TTMSFNCCustomListBox;\r\nbegin\r\n l := ListBox;\r\n if Assigned(l) then\r\n begin\r\n l.FSortMode := ASortingMode;\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{ TTMSFNCListBoxItem }\r\n\r\nprocedure TTMSFNCListBoxItem.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCListBoxItem then\r\n begin\r\n FTag := (Source as TTMSFNCListBoxItem).Tag;\r\n FText := (Source as TTMSFNCListBoxItem).Text;\r\n FTrimming := (Source as TTMSFNCListBoxItem).Trimming;\r\n FWordWrapping := (Source as TTMSFNCListBoxItem).WordWrapping;\r\n FTextAlign := (Source as TTMSFNCListBoxItem).TextAlign;\r\n FTextColor := (Source as TTMSFNCListBoxItem).TextColor;\r\n FSelectedTextColor := (Source as TTMSFNCListBoxItem).SelectedTextColor;\r\n FDisabledTextColor := (Source as TTMSFNCListBoxItem).DisabledTextColor;\r\n FEnabled := (Source as TTMSFNCListBoxItem).Enabled;\r\n FBitmapName := (Source as TTMSFNCListBoxItem).BitmapName;\r\n FBitmap.Assign((Source as TTMSFNCListBoxItem).Bitmap);\r\n FHeight := (Source as TTMSFNCListBoxItem).Height;\r\n FBitmapHeight := (Source as TTMSFNCListBoxItem).BitmapHeight;\r\n FBitmapWidth := (Source as TTMSFNCListBoxItem).BitmapWidth;\r\n FDataPointer := (Source as TTMSFNCListBoxItem).DataPointer;\r\n FDataBoolean := (Source as TTMSFNCListBoxItem).DataBoolean;\r\n FDataObject := (Source as TTMSFNCListBoxItem).DataObject;\r\n FDataString := (Source as TTMSFNCListBoxItem).DataString;\r\n FDataInteger := (Source as TTMSFNCListBoxItem).DataInteger;\r\n AssignData(Source);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxItem.AssignData(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCListBoxItem then\r\n begin\r\n FDataString := (Source as TTMSFNCListBoxItem).DataString;\r\n FDataBoolean := (Source as TTMSFNCListBoxItem).DataBoolean;\r\n FDataObject := (Source as TTMSFNCListBoxItem).DataObject;\r\n FDataInteger := (Source as TTMSFNCListBoxItem).DataInteger;\r\n FDataPointer := (Source as TTMSFNCListBoxItem).DataPointer;\r\n FDBKey := (Source as TTMSFNCListBoxItem).DBKey;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxItem.BitmapChanged(Sender: TObject);\r\nbegin\r\n UpdateItem;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxItem.Changed(Sender: TObject);\r\nbegin\r\n UpdateItem;\r\nend;\r\n\r\nconstructor TTMSFNCListBoxItem.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(Collection) then\r\n FListBox := (Collection as TTMSFNCListBoxItems).ListBox;\r\n\r\n FTextColor := gcBlack;\r\n FHeight := -1;\r\n FBitmapWidth := -1;\r\n FBitmapHeight := -1;\r\n FEnabled := True;\r\n FSelectedTextColor := gcWhite;\r\n FDisabledTextColor := gcSilver;\r\n FWordWrapping := False;\r\n FTextAlign := gtaLeading;\r\n FTrimming := gttNone;\r\n FBitmap := TTMSFNCBitmap.Create;\r\n FBitmap.OnChange := @BitmapChanged;\r\n if Assigned(FListBox) then\r\n Self.Assign(FListBox.DefaultItem);\r\n UpdateItem;\r\nend;\r\n\r\ndestructor TTMSFNCListBoxItem.Destroy;\r\nbegin\r\n FBitmap.Free;\r\n inherited;\r\n UpdateItem;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxItem.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\nfunction TTMSFNCListBoxItem.GetBitmapContainer: TTMSFNCBitmapContainer;\r\nvar\r\n l: TTMSFNCCustomListBox;\r\nbegin\r\n Result := nil;\r\n l := ListBox;\r\n if Assigned(l) then\r\n Result := l.BitmapContainer;\r\nend;\r\n\r\nfunction TTMSFNCListBoxItem.ListBox: TTMSFNCCustomListBox;\r\nbegin\r\n Result := FListBox;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxItem.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 TTMSFNCListBoxItem.GetStrippedHTMLText: String;\r\nbegin\r\n Result := TTMSFNCUtils.HTMLStrip(Text);\r\nend;\r\n\r\nfunction TTMSFNCListBoxItem.IsBitmapHeightStored: Boolean;\r\nbegin\r\n Result := BitmapHeight <> -1;\r\nend;\r\n\r\nfunction TTMSFNCListBoxItem.IsBitmapWidthStored: Boolean;\r\nbegin\r\n Result := BitmapWidth <> -1;\r\nend;\r\n\r\nfunction TTMSFNCListBoxItem.IsHeightStored: Boolean;\r\nbegin\r\n Result := Height <> -1;\r\nend;\r\n\r\nfunction TTMSFNCListBoxItem.IsSelected: Boolean;\r\nvar\r\n i: Integer;\r\nbegin\r\n Result := False;\r\n if Assigned(FListBox) then\r\n begin\r\n for I := 0 to FListBox.SelectedItemCount - 1 do\r\n begin\r\n if FListBox.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 TTMSFNCListBoxItem.SaveToString(ATextOnly: Boolean): String;\r\nvar\r\n s: String;\r\nbegin\r\n if not Assigned(FListBox) 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 TTMSFNCListBoxItem.SetChecked(const Value: Boolean);\r\nvar\r\n l: TTMSFNCCustomListBox;\r\n n: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n if FChecked <> Value then\r\n begin\r\n FChecked := Value;\r\n l := ListBox;\r\n if Assigned(l) then\r\n begin\r\n n := TTMSFNCCustomListBoxOpen(l).GetNodeForItemIndex(Index);\r\n if Assigned(n) and (n.CheckStates[0] <> FChecked) then\r\n begin\r\n if FChecked then\r\n TTMSFNCCustomListBoxOpen(l).TreeView.CheckVirtualNode(n, 0)\r\n else\r\n TTMSFNCCustomListBoxOpen(l).TreeView.UnCheckVirtualNode(n, 0);\r\n end;\r\n\r\n if Assigned(l.TreeView) then\r\n l.TreeView.Invalidate;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxItem.SetBitmap(const Value: TTMSFNCBitmap);\r\nbegin\r\n if FBitmap <> Value then\r\n begin\r\n FBitmap.Assign(Value);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxItem.SetBitmapHeight(const Value: Double);\r\nbegin\r\n FBitmapHeight := Value;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxItem.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 TTMSFNCListBoxItem.SetBitmapWidth(const Value: Double);\r\nbegin\r\n FBitmapWidth := Value;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxItem.SetDisabledTextColor(\r\n 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 TTMSFNCListBoxItem.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 TTMSFNCListBoxItem.SetSelectedTextColor(\r\n 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 TTMSFNCListBoxItem.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 TTMSFNCListBoxItem.SetTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FTextAlign <> Value then\r\n begin\r\n FTextAlign := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxItem.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 TTMSFNCListBoxItem.SetTrimming(\r\n 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 TTMSFNCListBoxItem.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 TTMSFNCListBoxItem.UpdateItem;\r\nvar\r\n l: TTMSFNCCustomListBox;\r\nbegin\r\n l := ListBox;\r\n if Assigned(l) then\r\n l.UpdateItems;\r\nend;\r\n\r\n{ TTMSFNCListBoxItemsAppearance }\r\n\r\nconstructor TTMSFNCListBoxItemsAppearance.Create(\r\n AListBox: TTMSFNCCustomListBox);\r\nbegin\r\n FListBox := AListBox;\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) and FListBox.IsDesignTime then\r\n begin\r\n FListBox.FTreeView.NodesAppearance.DisabledFill.Kind := gfkNone;\r\n FListBox.FTreeView.NodesAppearance.DisabledStroke.Kind := gskNone;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCListBoxItemsAppearance.GetDisabledFill: TTMSFNCGraphicsFill;\r\nbegin\r\n Result := nil;\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n Result := FListBox.FTreeView.NodesAppearance.DisabledFill;\r\nend;\r\n\r\nfunction TTMSFNCListBoxItemsAppearance.GetDisabledStroke: TTMSFNCGraphicsStroke;\r\nbegin\r\n Result := nil;\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n Result := FListBox.FTreeView.NodesAppearance.DisabledStroke;\r\nend;\r\n\r\nfunction TTMSFNCListBoxItemsAppearance.GetFill: TTMSFNCGraphicsFill;\r\nbegin\r\n Result := nil;\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n Result := FListBox.FTreeView.NodesAppearance.Fill;\r\nend;\r\n\r\nfunction TTMSFNCListBoxItemsAppearance.GetFixedHeight: Double;\r\nbegin\r\n Result := 0;\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n Result := FListBox.FTreeView.NodesAppearance.FixedHeight;\r\nend;\r\n\r\nfunction TTMSFNCListBoxItemsAppearance.GetFont: TTMSFNCGraphicsFont;\r\nbegin\r\n Result := nil;\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n Result := FListBox.FTreeView.NodesAppearance.Font;\r\nend;\r\n\r\nfunction TTMSFNCListBoxItemsAppearance.GetHeightMode: TTMSFNCListBoxItemHeightMode;\r\nvar\r\n i: Integer;\r\nbegin\r\n Result := lihmFixed;\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n begin\r\n i := Integer(FListBox.FTreeView.NodesAppearance.HeightMode);\r\n Result := TTMSFNCListBoxItemHeightMode(i);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCListBoxItemsAppearance.GetSelectedFill: TTMSFNCGraphicsFill;\r\nbegin\r\n Result := nil;\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n Result := FListBox.FTreeView.NodesAppearance.SelectedFill;\r\nend;\r\n\r\nfunction TTMSFNCListBoxItemsAppearance.GetSelectedStroke: TTMSFNCGraphicsStroke;\r\nbegin\r\n Result := nil;\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n Result := FListBox.FTreeView.NodesAppearance.SelectedStroke;\r\nend;\r\n\r\nfunction TTMSFNCListBoxItemsAppearance.GetShowFocus: Boolean;\r\nbegin\r\n Result := True;\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n Result := FListBox.FTreeView.NodesAppearance.ShowFocus;\r\nend;\r\n\r\nfunction TTMSFNCListBoxItemsAppearance.GetStroke: TTMSFNCGraphicsStroke;\r\nbegin\r\n Result := nil;\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n Result := FListBox.FTreeView.NodesAppearance.Stroke;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxItemsAppearance.SetDisabledFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n FListBox.FTreeView.NodesAppearance.DisabledFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCListBoxItemsAppearance.SetDisabledStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n FListBox.FTreeView.NodesAppearance.DisabledStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCListBoxItemsAppearance.SetFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n FListBox.FTreeView.NodesAppearance.Fill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCListBoxItemsAppearance.SetFixedHeight(const Value: Double);\r\nbegin\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n FListBox.FTreeView.NodesAppearance.FixedHeight := Value;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxItemsAppearance.SetFont(\r\n const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n FListBox.FTreeView.NodesAppearance.Font.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCListBoxItemsAppearance.SetHeightMode(\r\n const Value: TTMSFNCListBoxItemHeightMode);\r\nvar\r\n i: Integer;\r\nbegin\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n begin\r\n i := Integer(Value);\r\n FListBox.FTreeView.NodesAppearance.HeightMode := TTMSFNCTreeViewNodeHeightMode(i);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxItemsAppearance.SetSelectedFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n FListBox.FTreeView.NodesAppearance.SelectedFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCListBoxItemsAppearance.SetSelectedStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n FListBox.FTreeView.NodesAppearance.SelectedStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCListBoxItemsAppearance.SetShowFocus(const Value: Boolean);\r\nbegin\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n FListBox.FTreeView.NodesAppearance.ShowFocus := Value;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxItemsAppearance.SetStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n FListBox.FTreeView.NodesAppearance.Stroke.Assign(Value);\r\nend;\r\n\r\n{ TTMSFNCListBoxInteraction }\r\n\r\nprocedure TTMSFNCListBoxInteraction.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTMSFNCListBoxInteraction) then\r\n begin\r\n FLookup.Assign((Source as TTMSFNCListBoxInteraction).Lookup);\r\n Filtering.Assign((Source as TTMSFNCListBoxInteraction).Filtering);\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCListBoxInteraction.Create(AListBox: TTMSFNCCustomListBox);\r\nbegin\r\n FListBox := AListBox;\r\n FLookup := TTMSFNCListBoxLookup.Create(Self);\r\n FFiltering := TTMSFNCListBoxFiltering.Create(Self);\r\nend;\r\n\r\ndestructor TTMSFNCListBoxInteraction.Destroy;\r\nbegin\r\n FLookup.Free;\r\n FFiltering.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCListBoxInteraction.GetClipboardMode: TTMSFNCListBoxClipboardMode;\r\nvar\r\n i: Integer;\r\nbegin\r\n Result := lcmNone;\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n begin\r\n i := Integer(FListBox.FTreeView.Interaction.ClipboardMode);\r\n Result := TTMSFNCListBoxClipboardMode(i);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCListBoxInteraction.GetDragDropMode: TTMSFNCListBoxDragDropMode;\r\nvar\r\n i: Integer;\r\nbegin\r\n Result := ldmNone;\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n begin\r\n i := Integer(FListBox.FTreeView.Interaction.DragDropMode);\r\n Result := TTMSFNCListBoxDragDropMode(i);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCListBoxInteraction.GetMultiSelect: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n Result := FListBox.FTreeView.Interaction.MultiSelect;\r\nend;\r\n\r\nfunction TTMSFNCListBoxInteraction.GetReorder: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n Result := FListBox.FTreeView.Interaction.Reorder;\r\nend;\r\n\r\nfunction TTMSFNCListBoxInteraction.GetSorting: TTMSFNCListBoxSorting;\r\nbegin\r\n Result := lcsNone;\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) and (FListBox.FTreeView.Columns.Count > 0) then\r\n begin\r\n case FListBox.FTreeView.Columns[0].Sorting of\r\n tcsNone: Result := lcsNone;\r\n tcsNormal: Result := lcsNormal;\r\n tcsNormalCaseSensitive: Result := lcsNormalCaseSensitive;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCListBoxInteraction.GetTouchScrolling: Boolean;\r\nbegin\r\n Result := True;\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n Result := FListBox.FTreeView.Interaction.TouchScrolling;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxInteraction.SetClipboardMode(\r\n const Value: TTMSFNCListBoxClipboardMode);\r\nvar\r\n i: Integer;\r\nbegin\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n begin\r\n i := Integer(Value);\r\n FListBox.FTreeView.Interaction.ClipboardMode := TTMSFNCTreeViewClipboardMode(i);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxInteraction.SetDragDropMode(\r\n const Value: TTMSFNCListBoxDragDropMode);\r\nvar\r\n i: Integer;\r\nbegin\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n begin\r\n i := Integer(Value);\r\n FListBox.FTreeView.Interaction.DragDropMode := TTMSFNCTreeViewDragDropMode(i);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxInteraction.SetFiltering(\r\n const Value: TTMSFNCListBoxFiltering);\r\nbegin\r\n FFiltering.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCListBoxInteraction.SetLookup(\r\n const Value: TTMSFNCListBoxLookup);\r\nbegin\r\n FLookup.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCListBoxInteraction.SetMultiSelect(const Value: Boolean);\r\nbegin\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n FListBox.FTreeView.Interaction.MultiSelect := Value;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxInteraction.SetReorder(const Value: Boolean);\r\nbegin\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n FListBox.FTreeView.Interaction.Reorder := Value;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxInteraction.SetSorting(\r\n const Value: TTMSFNCListBoxSorting);\r\nbegin\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) and (FListBox.FTreeView.Columns.Count > 0) then\r\n begin\r\n case Value of\r\n lcsNone: FListBox.FTreeView.Columns[0].Sorting := tcsNone;\r\n lcsNormal: FListBox.FTreeView.Columns[0].Sorting := tcsNormal;\r\n lcsNormalCaseSensitive: FListBox.FTreeView.Columns[0].Sorting := tcsNormalCaseSensitive;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxInteraction.SetTouchScrolling(const Value: Boolean);\r\nbegin\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n FListBox.FTreeView.Interaction.TouchScrolling := Value;\r\nend;\r\n\r\n{ TTMSFNCListBoxLookup }\r\n\r\nconstructor TTMSFNCListBoxLookup.Create(AOwner: TTMSFNCListBoxInteraction);\r\nbegin\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCListBoxLookup.GetAutoSelect: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FOwner) and Assigned(FOwner.FListBox) and Assigned(FOwner.FListBox.FTreeView) then\r\n Result := FOwner.FListBox.FTreeView.Interaction.Lookup.AutoSelect;\r\nend;\r\n\r\nfunction TTMSFNCListBoxLookup.GetCaseSensitive: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FOwner) and Assigned(FOwner.FListBox) and Assigned(FOwner.FListBox.FTreeView) then\r\n Result := FOwner.FListBox.FTreeView.Interaction.Lookup.CaseSensitive;\r\nend;\r\n\r\nfunction TTMSFNCListBoxLookup.GetEnabled: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FOwner) and Assigned(FOwner.FListBox) and Assigned(FOwner.FListBox.FTreeView) then\r\n Result := FOwner.FListBox.FTreeView.Interaction.Lookup.Enabled;\r\nend;\r\n\r\nfunction TTMSFNCListBoxLookup.GetIncremental: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FOwner) and Assigned(FOwner.FListBox) and Assigned(FOwner.FListBox.FTreeView) then\r\n Result := FOwner.FListBox.FTreeView.Interaction.Lookup.Incremental;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxLookup.SetAutoSelect(const Value: Boolean);\r\nbegin\r\n if Assigned(FOwner) and Assigned(FOwner.FListBox) and Assigned(FOwner.FListBox.FTreeView) then\r\n FOwner.FListBox.FTreeView.Interaction.Lookup.AutoSelect := Value;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxLookup.SetCaseSensitive(const Value: Boolean);\r\nbegin\r\n if Assigned(FOwner) and Assigned(FOwner.FListBox) and Assigned(FOwner.FListBox.FTreeView) then\r\n FOwner.FListBox.FTreeView.Interaction.Lookup.CaseSensitive := Value;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxLookup.SetEnabled(const Value: Boolean);\r\nbegin\r\n if Assigned(FOwner) and Assigned(FOwner.FListBox) and Assigned(FOwner.FListBox.FTreeView) then\r\n FOwner.FListBox.FTreeView.Interaction.Lookup.Enabled := Value;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxLookup.SetIncremental(const Value: Boolean);\r\nbegin\r\n if Assigned(FOwner) and Assigned(FOwner.FListBox) and Assigned(FOwner.FListBox.FTreeView) then\r\n FOwner.FListBox.FTreeView.Interaction.Lookup.Incremental := Value;\r\nend;\r\n\r\n{ TTMSFNCListBoxFiltering }\r\n\r\nconstructor TTMSFNCListBoxFiltering.Create(\r\n AOwner: TTMSFNCListBoxInteraction);\r\nbegin\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCListBoxFiltering.GetDropDownHeight: integer;\r\nbegin\r\n Result := 120;\r\n if Assigned(FOwner) and Assigned(FOwner.FListBox) and Assigned(FOwner.FListBox.FTreeView) and (FOwner.FListBox.FTreeView.Columns.Count > 0) then\r\n Result := FOwner.FListBox.FTreeView.Columns[0].Filtering.DropDownHeight;\r\nend;\r\n\r\nfunction TTMSFNCListBoxFiltering.GetDropDownWidth: integer;\r\nbegin\r\n Result := 100;\r\n if Assigned(FOwner) and Assigned(FOwner.FListBox) and Assigned(FOwner.FListBox.FTreeView) and (FOwner.FListBox.FTreeView.Columns.Count > 0) then\r\n Result := FOwner.FListBox.FTreeView.Columns[0].Filtering.DropDownWidth;\r\nend;\r\n\r\nfunction TTMSFNCListBoxFiltering.GetEnabled: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FOwner) and Assigned(FOwner.FListBox) and Assigned(FOwner.FListBox.FTreeView) and (FOwner.FListBox.FTreeView.Columns.Count > 0) then\r\n Result := FOwner.FListBox.FTreeView.Columns[0].Filtering.Enabled;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxFiltering.SetDropDownHeight(const Value: integer);\r\nbegin\r\n if Assigned(FOwner) and Assigned(FOwner.FListBox) and Assigned(FOwner.FListBox.FTreeView) and (FOwner.FListBox.FTreeView.Columns.Count > 0) then\r\n FOwner.FListBox.FTreeView.Columns[0].Filtering.DropDownHeight := Value;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxFiltering.SetDropDownWidth(const Value: integer);\r\nbegin\r\n if Assigned(FOwner) and Assigned(FOwner.FListBox) and Assigned(FOwner.FListBox.FTreeView) and (FOwner.FListBox.FTreeView.Columns.Count > 0) then\r\n FOwner.FListBox.FTreeView.Columns[0].Filtering.DropDownWidth := Value;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxFiltering.SetEnabled(const Value: Boolean);\r\nbegin\r\n if Assigned(FOwner) and Assigned(FOwner.FListBox) and Assigned(FOwner.FListBox.FTreeView) and (FOwner.FListBox.FTreeView.Columns.Count > 0) then\r\n FOwner.FListBox.FTreeView.Columns[0].Filtering.Enabled := Value;\r\nend;\r\n\r\n{ TTMSFNCListBoxHeader }\r\n\r\nconstructor TTMSFNCListBoxHeader.Create(AListBox: TTMSFNCCustomListBox);\r\nbegin\r\n FListBox := AListBox;\r\nend;\r\n\r\nfunction TTMSFNCListBoxHeader.GetFill: TTMSFNCGraphicsFill;\r\nbegin\r\n Result := nil;\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n Result := FListBox.FTreeView.ColumnsAppearance.TopFill;\r\nend;\r\n\r\nfunction TTMSFNCListBoxHeader.GetFont: TTMSFNCGraphicsFont;\r\nbegin\r\n Result := nil;\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n Result := FListBox.FTreeView.ColumnsAppearance.TopFont;\r\nend;\r\n\r\nfunction TTMSFNCListBoxHeader.GetHorizontalTextAlign: TTMSFNCGraphicsTextAlign;\r\nbegin\r\n Result := gtaCenter;\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) and (FListBox.FTreeView.Columns.Count > 0) then\r\n Result := FListBox.FTreeView.Columns[0].HorizontalTextAlign;\r\nend;\r\n\r\nfunction TTMSFNCListBoxHeader.GetSize: Single;\r\nbegin\r\n Result := 25;\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n Result := FListBox.FTreeView.ColumnsAppearance.TopSize;\r\nend;\r\n\r\nfunction TTMSFNCListBoxHeader.GetSortIndicatorColor: TTMSFNCGraphicsColor;\r\nbegin\r\n Result := TTMSFNCTreeViewColorSelection;\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n Result := FListBox.FTreeView.ColumnsAppearance.SortIndicatorColor;\r\nend;\r\n\r\nfunction TTMSFNCListBoxHeader.GetStroke: TTMSFNCGraphicsStroke;\r\nbegin\r\n Result := nil;\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n Result := FListBox.FTreeView.ColumnsAppearance.TopStroke;\r\nend;\r\n\r\nfunction TTMSFNCListBoxHeader.GetText: String;\r\nbegin\r\n Result := '';\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) and (FListBox.FTreeView.Columns.Count > 0) then\r\n Result := FListBox.FTreeView.Columns[0].Text\r\nend;\r\n\r\nfunction TTMSFNCListBoxHeader.GetTrimming: TTMSFNCGraphicsTextTrimming;\r\nbegin\r\n Result := gttNone;\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) and (FListBox.FTreeView.Columns.Count > 0) then\r\n Result := FListBox.FTreeView.Columns[0].Trimming\r\nend;\r\n\r\nfunction TTMSFNCListBoxHeader.GetVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\nbegin\r\n Result := gtaCenter;\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) and (FListBox.FTreeView.Columns.Count > 0) then\r\n Result := FListBox.FTreeView.Columns[0].VerticalTextAlign;\r\nend;\r\n\r\nfunction TTMSFNCListBoxHeader.GetVisible: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n Result := tclTop in FListBox.FTreeView.ColumnsAppearance.Layouts;\r\nend;\r\n\r\nfunction TTMSFNCListBoxHeader.GetWordWrapping: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) and (FListBox.FTreeView.Columns.Count > 0) then\r\n Result := FListBox.FTreeView.Columns[0].WordWrapping\r\nend;\r\n\r\nprocedure TTMSFNCListBoxHeader.SetFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n FListBox.FTreeView.ColumnsAppearance.TopFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCListBoxHeader.SetFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n FListBox.FTreeView.ColumnsAppearance.TopFont.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCListBoxHeader.SetHorizontalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) and (FListBox.FTreeView.Columns.Count > 0) then\r\n FListBox.FTreeView.Columns[0].HorizontalTextAlign := Value;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxHeader.SetSize(const Value: Single);\r\nbegin\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n FListBox.FTreeView.ColumnsAppearance.TopSize := Value;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxHeader.SetSortIndicatorColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n FListBox.FTreeView.ColumnsAppearance.SortIndicatorColor := Value;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxHeader.SetStroke(const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n FListBox.FTreeView.ColumnsAppearance.TopStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCListBoxHeader.SetText(const Value: String);\r\nbegin\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) and (FListBox.FTreeView.Columns.Count > 0) then\r\n FListBox.FTreeView.Columns[0].Text := Value;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxHeader.SetTrimming(\r\n const Value: TTMSFNCGraphicsTextTrimming);\r\nbegin\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) and (FListBox.FTreeView.Columns.Count > 0) then\r\n FListBox.FTreeView.Columns[0].Trimming := Value;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxHeader.SetVerticalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) and (FListBox.FTreeView.Columns.Count > 0) then\r\n FListBox.FTreeView.Columns[0].VerticalTextAlign := Value;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxHeader.SetVisible(const Value: Boolean);\r\nbegin\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) then\r\n begin\r\n if Value then\r\n FListBox.FTreeView.ColumnsAppearance.Layouts := [tclTop]\r\n else\r\n FListBox.FTreeView.ColumnsAppearance.Layouts := [];\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCListBoxHeader.SetWordWrapping(const Value: Boolean);\r\nbegin\r\n if Assigned(FListBox) and Assigned(FListBox.FTreeView) and (FListBox.FTreeView.Columns.Count > 0) then\r\n FListBox.FTreeView.Columns[0].WordWrapping := Value;\r\nend;\r\n\r\n{ TTMSFNCListBoxFilterData }\r\n\r\nprocedure TTMSFNCListBoxFilterData.Assign(Source: TPersistent);\r\nvar\r\n ASrcFilterData: TTMSFNCListBoxFilterData;\r\nbegin\r\n ASrcFilterData := Source as TTMSFNCListBoxFilterData;\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 TTMSFNCListBoxFilterData.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n FCaseSensitive := True;\r\nend;\r\n\r\n{ TTMSFNCListBoxFilter }\r\n\r\nfunction TTMSFNCListBoxFilter.Add: TTMSFNCListBoxFilterData;\r\nbegin\r\n Result := TTMSFNCListBoxFilterData(inherited Add);\r\n if Count = 1 then\r\n Result.Operation := lfoNone\r\n else\r\n Result.Operation := lfoAND;\r\nend;\r\n\r\nconstructor TTMSFNCListBoxFilter.Create(AOwner: TTMSFNCCustomListBox);\r\nbegin\r\n inherited Create(AOwner, TTMSFNCListBoxFilterData);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCListBoxFilter.GetItem(Index: Integer): TTMSFNCListBoxFilterData;\r\nbegin\r\n Result := TTMSFNCListBoxFilterData(inherited GetItem(Index));\r\nend;\r\n\r\nfunction TTMSFNCListBoxFilter.Insert(index: Integer): TTMSFNCListBoxFilterData;\r\nbegin\r\n Result := TTMSFNCListBoxFilterData(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCListBoxFilter.SetItem(Index: Integer; const Value: TTMSFNCListBoxFilterData);\r\nbegin\r\n inherited SetItem(Index, Value);\r\nend;\r\n\r\n\r\n{ TTMSFNCListBox }\r\n\r\nprocedure TTMSFNCListBox.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClasses([TTMSFNCListBox, TTMSFNCListBoxItem]);\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.TMSFNCCheckedListBox;\r\n\r\ninterface\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\nuses\r\n Classes, WEBLib.TMSFNCListBox, WEBLib.TMSFNCTreeView, WEBLib.TMSFNCTreeViewData\r\n {$IFNDEF LCLLIB}\r\n ,WEBLib.TMSFNCTypes\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 TTMSFNCCheckedListBoxItems = class;\r\n\r\n TTMSFNCCheckedListBoxItem = class(TTMSFNCListBoxItem)\r\n published\r\n property Checked;\r\n end;\r\n\r\n TTMSFNCListBoxCheckedItems = array of TTMSFNCCheckedListBoxItem;\r\n\r\n TTMSFNCCheckedListBoxItems = class(TTMSFNCListBoxItems)\r\n protected\r\n function GetItemClass: TCollectionItemClass; override;\r\n public\r\n function CheckedItems: TTMSFNCListBoxCheckedItems; virtual;\r\n end;\r\n\r\n TTMSFNCCheckedListBoxItemCheckChanged = procedure(Sender: TObject; AItem: TTMSFNCCheckedListBoxItem) of object;\r\n\r\n TTMSFNCCustomCheckedListBox = class(TTMSFNCListBox)\r\n private\r\n FOnItemCheckChanged: TTMSFNCCheckedListBoxItemCheckChanged;\r\n function GetCheckedItem(AItem: TTMSFNCCheckedListBoxItem): Boolean;\r\n procedure SetCheckedItem(AItem: TTMSFNCCheckedListBoxItem; const Value: Boolean);\r\n function GetChecked(AItemIndex: Integer): Boolean;\r\n procedure SetChecked(AItemIndex: Integer; const Value: Boolean);\r\n protected\r\n function CreateItems: TTMSFNCListBoxItems; override;\r\n function GetVersion: string; override;\r\n procedure DoItemCheckChanged(Sender: TObject; AItem: TTMSFNCCheckedListBoxItem); virtual;\r\n procedure CustomizeTreeView(ATreeView: TTMSFNCTreeView); override;\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 property OnItemCheckChanged: TTMSFNCCheckedListBoxItemCheckChanged read FOnItemCheckChanged write FOnItemCheckChanged;\r\n public\r\n property CheckedItem[AItem: TTMSFNCCheckedListBoxItem]: Boolean read GetCheckedItem write SetCheckedItem;\r\n property Checked[AItemIndex: Integer]: Boolean read GetChecked write SetChecked;\r\n function CheckedItems: TTMSFNCListBoxCheckedItems; virtual;\r\n function AddItem(AText: string = ''): TTMSFNCCheckedListBoxItem; reintroduce; virtual;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCCheckedListBox = class(TTMSFNCCustomCheckedListBox)\r\n published\r\n property OnItemCheckChanged;\r\n property OnAfterDrawItemCheck;\r\n property OnBeforeDrawItemCheck;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n WEBLib.TMSFNCUtils;\r\n\r\n{ TTMSFNCCheckedListBox }\r\n\r\nfunction TTMSFNCCustomCheckedListBox.AddItem(\r\n AText: string): TTMSFNCCheckedListBoxItem;\r\nbegin\r\n Result := TTMSFNCCheckedListBoxItem(inherited AddItem(AText));\r\nend;\r\n\r\nfunction TTMSFNCCustomCheckedListBox.CheckedItems: TTMSFNCListBoxCheckedItems;\r\nbegin\r\n Result := TTMSFNCCheckedListBoxItems(Items).CheckedItems;\r\nend;\r\n\r\nfunction TTMSFNCCustomCheckedListBox.CreateItems: TTMSFNCListBoxItems;\r\nbegin\r\n Result := TTMSFNCCheckedListBoxItems.Create(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCheckedListBox.CustomizeTreeView(\r\n ATreeView: TTMSFNCTreeView);\r\nbegin\r\n inherited;\r\n ATreeView.OnIsNodeChecked := DoIsNodeChecked;\r\n ATreeView.OnGetNodeCheckType := DoGetNodeCheckType;\r\n ATreeView.OnAfterUnCheckNode := DoAfterUnCheckNode;\r\n ATreeView.OnAfterCheckNode := DoAfterCheckNode;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCheckedListBox.DoAfterCheckNode(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer);\r\nvar\r\n it: TTMSFNCCheckedListBoxItem;\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= Items.Count - 1) then\r\n begin\r\n it := Items[ANode.Row] as TTMSFNCCheckedListBoxItem;\r\n it.Checked := True;\r\n DoItemCheckChanged(Self, it);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCheckedListBox.DoAfterUnCheckNode(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer);\r\nvar\r\n it: TTMSFNCCheckedListBoxItem;\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= Items.Count - 1) then\r\n begin\r\n it := Items[ANode.Row] as TTMSFNCCheckedListBoxItem;\r\n it.Checked := False;\r\n DoItemCheckChanged(Self, it);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCheckedListBox.DoGetNodeCheckType(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ACheckType: TTMSFNCTreeViewNodeCheckType);\r\nbegin\r\n ACheckType := tvntCheckBox;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCheckedListBox.DoIsNodeChecked(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AIsChecked: Boolean);\r\nbegin\r\n inherited;\r\n if (ANode.Row >= 0) and (ANode.Row <= Items.Count - 1) then\r\n AIsChecked := (Items[ANode.Row] as TTMSFNCCheckedListBoxItem).Checked;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCheckedListBox.DoItemCheckChanged(Sender: TObject;\r\n AItem: TTMSFNCCheckedListBoxItem);\r\nbegin\r\n if Assigned(OnItemCheckChanged) then\r\n OnItemCheckChanged(Self, AItem);\r\nend;\r\n\r\nfunction TTMSFNCCustomCheckedListBox.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] as TTMSFNCCheckedListBoxItem).Checked;\r\nend;\r\n\r\nfunction TTMSFNCCustomCheckedListBox.GetCheckedItem(\r\n AItem: TTMSFNCCheckedListBoxItem): Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(AItem) then\r\n Result := AItem.Checked;\r\nend;\r\n\r\nfunction TTMSFNCCustomCheckedListBox.GetVersion: string;\r\nbegin\r\n Result := GetVersionNumber(MAJ_VER, MIN_VER, REL_VER, BLD_VER);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCheckedListBox.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] as TTMSFNCCheckedListBoxItem).Checked := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCheckedListBox.SetCheckedItem(AItem: TTMSFNCCheckedListBoxItem;\r\n const Value: Boolean);\r\nbegin\r\n if Assigned(AItem) then\r\n AItem.Checked := Value;\r\nend;\r\n\r\n{ TTMSFNCCheckedListBoxItems }\r\n\r\nfunction TTMSFNCCheckedListBoxItems.CheckedItems: TTMSFNCListBoxCheckedItems;\r\nvar\r\n I: Integer;\r\n n: TTMSFNCCheckedListBoxItem;\r\nbegin\r\n Result := nil;\r\n for I := 0 to Count - 1 do\r\n begin\r\n n := Items[I] as TTMSFNCCheckedListBoxItem;\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\nfunction TTMSFNCCheckedListBoxItems.GetItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCCheckedListBoxItem;\r\nend;\r\n\r\nend.\r\n\r\n","unit libcalendar;\r\n\r\ninterface\r\n\r\n{$mode objfpc}\r\n{$modeswitch externalclass}\r\n\r\nuses\r\n Web, JS, Classes;\r\n\r\ntype\r\n TJSCalendarSelectHandler = reference to procedure(Date: TJSDate);\r\n\r\n TJSCalendarOptions = class(TJSObject)\r\n private\r\n FSelector: string external name 'selector';\r\n FDatesFilter: Boolean external name 'datesFilter';\r\n FReadOnly: Boolean external name 'readOnly';\r\n FPastDates: Boolean external name 'pastDates';\r\n FFirstDay: NativeInt external name 'firstDay';\r\n FAvailableWeekDays: TJSArray external name 'availableWeekDays';\r\n FAvailableDates: TJSArray external name 'availableDates';\r\n FSelectedDate: TJSDate external name 'selectedDate';\r\n FDate: TJSDate external name 'date';\r\n FTodaysDate: TJSDate external name 'todaysDate';\r\n FMultiselect: Boolean external name 'multiselect';\r\n FMonths: TJSArray external name 'months';\r\n FShortWeekday: TJSArray external name 'shortWeekday';\r\n FShowToday: Boolean external name 'showToday';\r\n FButtonHintNext: string external name 'buttonHintNext';\r\n FButtonHintPrev: string external name 'buttonHintPrev';\r\n FMaxDate: TJSDate external name 'maxDate';\r\n FMinDate: TJSDate external name 'minDate';\r\n FBackgroundClass: string external name 'backgroundClass';\r\n FSelectedClass: string external name 'selectedClass';\r\n FCurrentClass: string external name 'currentClass';\r\n FWeekClass: string external name 'weekClass';\r\n FHeaderClass: string external name 'headerClass';\r\n public\r\n onSelect: TJSCalendarSelectHandler;\r\n onUnselect: TJSCalendarSelectHandler;\r\n property selector: string read FSelector write FSelector;\r\n property datesFilter: Boolean read FDatesFilter write FDatesFilter;\r\n property readOnly: Boolean read FReadOnly write FReadOnly;\r\n property pastDates: Boolean read FPastDates write FPastDates;\r\n property firstDay: NativeInt read FFirstDay write FFirstDay;\r\n property availableWeekDays: TJSArray read FAvailableWeekDays write FAvailableWeekDays;\r\n property availableDates: TJSArray read FAvailableDates write FAvailableDates;\r\n property selectedDate: TJSDate read FSelectedDate write FSelectedDate;\r\n property date: TJSDate read FDate write FDate;\r\n property todaysDate: TJSDate read FTodaysDate write FTodaysDate;\r\n property multiselect: Boolean read FMultiselect write FMultiselect;\r\n property months: TJSArray read FMonths write FMonths;\r\n property shortWeekday: TJSArray read FShortWeekday write FShortWeekday;\r\n property showToday: Boolean read FShowToday write FShowToday;\r\n property buttonHintNext: string read FButtonHintNext write FButtonHintNext;\r\n property buttonHintPrev: string read FButtonHintPrev write FButtonHintPrev;\r\n property maxDate: TJSDate read FMaxDate write FMaxDate;\r\n property minDate: TJSDate read FMinDate write FMinDate;\r\n property backgroundClass: string read FBackgroundClass write FBackgroundClass;\r\n property selectedClass: string read FSelectedClass write FSelectedClass;\r\n property currentClass: string read FCurrentClass write FCurrentClass;\r\n property weekClass: string read FWeekClass write FWeekClass;\r\n property headerClass: string read FHeaderClass write FHeaderClass;\r\n end;\r\n\r\n TJSCalendar = class external name 'VanillaCalendar' (TJSObject)\r\n public\r\n constructor new(AOptions: TJSCalendarOptions);\r\n procedure init;\r\n procedure reset;\r\n procedure &set(AOptions: TJSCalendarOptions);\r\n procedure setSelectedYear(AYear: NativeInt);\r\n procedure setSelectedMonth(AMonth: NativeInt);\r\n procedure setSelectedDay(ADay: NativeInt);\r\n procedure setSelectedDate(ADate: TJSDate);\r\n procedure setFirstDay(ADay: NativeInt);\r\n procedure setMultiSelect(AMultiSelect: Boolean);\r\n procedure setMonths(AMonths: TJSArray);\r\n procedure setShortWeekdays(AWeekdays: TJSArray);\r\n procedure setPastDates(APastDates: Boolean);\r\n procedure setEnabledWeekdays(AWeekdays: TJSArray);\r\n procedure setDatesFilter(AFilter: Boolean);\r\n procedure setShowToday(AShowToday: Boolean);\r\n procedure setReadOnly(AReadOnly: Boolean);\r\n procedure setSelectedDates(ADates: TJSArray);\r\n procedure setButtonHintNext(AHint: string);\r\n procedure setButtonHintPrev(AHint: string);\r\n procedure setMaxDate(ADate: TJSDate);\r\n procedure setMinDate(ADate: TJSDate);\r\n procedure setBackgroundClass(AClass: string);\r\n procedure setSelectedClass(AClass: string);\r\n procedure setCurrentClass(AClass: string);\r\n procedure setWeekClass(AClass: string);\r\n procedure setHeaderClass(AClass: string);\r\n function getSelectedDays: TJSArray;\r\n function getSelectedYear: NativeInt;\r\n function getSelectedMonth: NativeInt;\r\n function getSelectedDay: NativeInt;\r\n function getSelectedDate: TJSDate;\r\n function getSelectedDateCount: NativeInt;\r\n end;\r\n\r\nimplementation\r\n\r\nend.\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.Calendar;\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, Web, JS, WEBLib.Controls, WebLib.Menus, libcalendar;\r\n\r\ntype\r\n TCalendarInactiveDays = class(TPersistent)\r\n private\r\n FSunday: Boolean;\r\n FWednesday: Boolean;\r\n FTuesday: Boolean;\r\n FFriday: Boolean;\r\n FThursday: Boolean;\r\n FMonday: Boolean;\r\n FSaturday: Boolean;\r\n FOnChanged: TNotifyEvent;\r\n procedure SetFriday(const Value: Boolean);\r\n procedure SetMonday(const Value: Boolean);\r\n procedure SetSaturday(const Value: Boolean);\r\n procedure SetSunday(const Value: Boolean);\r\n procedure SetThursday(const Value: Boolean);\r\n procedure SetTuesDay(const Value: Boolean);\r\n procedure SetWednesday(const Value: Boolean);\r\n protected\r\n procedure Changed;\r\n public\r\n constructor Create; virtual;\r\n property OnChanged: TNotifyEvent read FOnChanged write FOnChanged;\r\n published\r\n property Sunday: Boolean read FSunday write SetSunday;\r\n property Monday: Boolean read FMonday write SetMonday;\r\n property Tuesday: Boolean read FTuesday write SetTuesDay;\r\n property Wednesday: Boolean read FWednesday write SetWednesday;\r\n property Thursday: Boolean read FThursday write SetThursday;\r\n property Friday: Boolean read FFriday write SetFriday;\r\n property Saturday: Boolean read FSaturday write SetSaturday;\r\n end;\r\n\r\n TCalendarWeekDayNames = class(TPersistent)\r\n private\r\n FSunday: string;\r\n FWednesday: string;\r\n FTuesday: string;\r\n FFriday: string;\r\n FThursday: string;\r\n FMonday: string;\r\n FSaturday: string;\r\n FOnChanged: TNotifyEvent;\r\n procedure SetFriday(const Value: string);\r\n procedure SetMonday(const Value: string);\r\n procedure SetSaturday(const Value: string);\r\n procedure SetSunday(const Value: string);\r\n procedure SetThursday(const Value: string);\r\n procedure SetTuesDay(const Value: string);\r\n procedure SetWednesday(const Value: string);\r\n protected\r\n procedure Changed;\r\n public\r\n constructor Create; virtual;\r\n property OnChanged: TNotifyEvent read FOnChanged write FOnChanged;\r\n published\r\n property Sunday: string read FSunday write SetSunday;\r\n property Monday: string read FMonday write SetMonday;\r\n property Tuesday: string read FTuesday write SetTuesDay;\r\n property Wednesday: string read FWednesday write SetWednesday;\r\n property Thursday: string read FThursday write SetThursday;\r\n property Friday: string read FFriday write SetFriday;\r\n property Saturday: string read FSaturday write SetSaturday;\r\n end;\r\n\r\n TCalendarMonthNames = class(TPersistent)\r\n private\r\n FApril: string;\r\n FNovember: string;\r\n FMay: string;\r\n FDecember: string;\r\n FAugust: string;\r\n FFebruary: string;\r\n FJune: string;\r\n FMarch: string;\r\n FJuly: string;\r\n FOctober: string;\r\n FSeptember: string;\r\n FJanuary: string;\r\n FOnChanged: TNotifyEvent;\r\n procedure SetApril(const Value: string);\r\n procedure SetAugust(const Value: string);\r\n procedure SetDecember(const Value: string);\r\n procedure SetFebruary(const Value: string);\r\n procedure SetJanuary(const Value: string);\r\n procedure SetJuly(const Value: string);\r\n procedure SetJune(const Value: string);\r\n procedure SetMarch(const Value: string);\r\n procedure SetMay(const Value: string);\r\n procedure SetNovember(const Value: string);\r\n procedure SetOctober(const Value: string);\r\n procedure SetSeptember(const Value: string);\r\n protected\r\n procedure Changed;\r\n public\r\n constructor Create; virtual;\r\n property OnChanged: TNotifyEvent read FOnChanged write FOnChanged;\r\n published\r\n property January: string read FJanuary write SetJanuary;\r\n property February: string read FFebruary write SetFebruary;\r\n property March: string read FMarch write SetMarch;\r\n property April: string read FApril write SetApril;\r\n property May: string read FMay write SetMay;\r\n property June: string read FJune write SetJune;\r\n property July: string read FJuly write SetJuly;\r\n property August: string read FAugust write SetAugust;\r\n property September: string read FSeptember write SetSeptember;\r\n property October: string read FOctober write SetOctober;\r\n property November: string read FNovember write SetNovember;\r\n property December: string read FDecember write SetDecember;\r\n end;\r\n\r\n TCalendarSelectDateEvent = procedure(Sender: TObject; ADate: TDateTime) of object;\r\n TCalendarDates = array of TDateTime;\r\n\r\n TCalendar = class(TWebCustomControl)\r\n private\r\n FSelectedDate: TDateTime;\r\n FCalendar: TJSCalendar;\r\n FMultiSelect: Boolean;\r\n FDay: Integer;\r\n FMonth: Integer;\r\n FYear: Integer;\r\n FFirstDay: Integer;\r\n FNameOfDays: TCalendarWeekDayNames;\r\n FMonthNames: TCalendarMonthNames;\r\n FEnablePastDates: Boolean;\r\n FInactiveDays: TCalendarInactiveDays;\r\n FShowToday: Boolean;\r\n FOnDateSelected: TCalendarSelectDateEvent;\r\n FReadOnly: Boolean;\r\n FHintNext: string;\r\n FHintPrev: string;\r\n FMaxDate: TDateTime;\r\n FMinDate: TDateTime;\r\n FElementHeaderClassName: TElementClassName;\r\n FElementBackgroundClassName: TElementClassName;\r\n FElementDayNamesClassName: TElementClassName;\r\n FElementSelectedDateClassName: TElementClassName;\r\n FElementCurrentDateClassName: TElementClassName;\r\n FOnDateUnselected: TCalendarSelectDateEvent;\r\n function GetDay: Integer;\r\n function GetMonth: Integer;\r\n function GetSelectedDate: TDateTime;\r\n function GetYear: Integer;\r\n procedure SetDay(const Value: Integer);\r\n procedure SetMonth(const Value: Integer);\r\n procedure SetSelectedDate(const Value: TDateTime);\r\n procedure SetYear(const Value: Integer);\r\n procedure SetMultiSelect(const Value: Boolean);\r\n procedure SetFirstDay(const Value: Integer);\r\n procedure SetNameOfDays(const Value: TCalendarWeekDayNames);\r\n procedure SetMonthNames(const Value: TCalendarMonthNames);\r\n procedure SetEnablePastDates(const Value: Boolean);\r\n procedure SetInactiveDays(const Value: TCalendarInactiveDays);\r\n procedure SetShowToday(const Value: Boolean);\r\n procedure SetReadOnly(const Value: Boolean);\r\n procedure SetHintNext(const Value: string);\r\n procedure SetHintPrev(const Value: string);\r\n procedure SetMaxDate(const Value: TDateTime);\r\n procedure SetMinDate(const Value: TDateTime);\r\n procedure SetElementBackgroundClassName(const Value: TElementClassName);\r\n procedure SetElementHeaderClassName(const Value: TElementClassName);\r\n procedure SetElementSelectedDateClassName(const Value: TElementClassName);\r\n procedure SetElementDayNamesClassName(const Value: TElementClassName);\r\n procedure SetElementCurrentDateClassName(const Value: TElementClassName);\r\n function GetDate: TDate;\r\n procedure SetDate(const Value: TDate);\r\n protected\r\n procedure SetElementClassName(AValue: string); override;\r\n\r\n function CreateElement: TJSElement; override;\r\n function GetNameOfDaysArray: TJSArray;\r\n function GetMonthNamesArray: TJSArray;\r\n function GetEnabledDaysArray: TJSArray;\r\n function GetID: string; override;\r\n procedure InactiveDaysChanged(Sender: TObject);\r\n procedure NameOfDaysChanged(Sender: TObject);\r\n procedure MonthNamesChanged(Sender: TObject);\r\n procedure HandleDateSelect(Data: TJSDate);\r\n procedure HandleDateUnselect(Data: TJSDate);\r\n public\r\n destructor Destroy; override;\r\n procedure CreateInitialize; override;\r\n procedure EndUpdate; override;\r\n function SelectedDates: TCalendarDates;\r\n property Date: TDate read GetDate write SetDate;\r\n published\r\n property Align;\r\n property Anchors;\r\n property ChildOrder;\r\n property DragMode;\r\n property ShowHint;\r\n property Visible;\r\n property TabOrder;\r\n property TabStop;\r\n property ElementSelectedDateClassName: TElementClassName read FElementSelectedDateClassName write SetElementSelectedDateClassName;\r\n property ElementCurrentDateClassName: TElementClassName read FElementCurrentDateClassName write SetElementCurrentDateClassName;\r\n property ElementBackgroundClassName: TElementClassName read FElementBackgroundClassName write SetElementBackgroundClassName;\r\n property ElementDayNamesClassName: TElementClassName read FElementDayNamesClassName write SetElementDayNamesClassName;\r\n property ElementHeaderClassName: TElementClassName read FElementHeaderClassName write SetElementHeaderClassName;\r\n property SelectedDate: TDateTime read GetSelectedDate write SetSelectedDate;\r\n property Year: Integer read GetYear write SetYear;\r\n property Month: Integer read GetMonth write SetMonth;\r\n property Day: Integer read GetDay write SetDay;\r\n property Font;\r\n property HintNext: string read FHintNext write SetHintNext;\r\n property HintPrev: string read FHintPrev write SetHintPrev;\r\n property MaxDate: TDateTime read FMaxDate write SetMaxDate;\r\n property MinDate: TDateTime read FMinDate write SetMinDate;\r\n property MultiSelect: Boolean read FMultiSelect write SetMultiSelect;\r\n property FirstDay: Integer read FFirstDay write SetFirstDay;\r\n property EnablePastDates: Boolean read FEnablePastDates write SetEnablePastDates;\r\n property InactiveDays: TCalendarInactiveDays read FInactiveDays write SetInactiveDays;\r\n property NameOfMonths: TCalendarMonthNames read FMonthNames write SetMonthNames;\r\n property NameOfDays: TCalendarWeekDayNames read FNameOfDays write SetNameOfDays;\r\n property ReadOnly: Boolean read FReadOnly write SetReadOnly;\r\n property ShowToday: Boolean read FShowToday write SetShowToday;\r\n property OnDateSelected: TCalendarSelectDateEvent read FOnDateSelected write FOnDateSelected;\r\n property OnDateUnselected: TCalendarSelectDateEvent read FOnDateUnselected write FOnDateUnselected;\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 property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebCalendar = class(TCalendar);\r\n\r\nimplementation\r\n\r\nuses\r\n DateUtils, SysUtils;\r\n\r\n{ TCalendar }\r\n\r\nfunction TCalendar.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('DIV');\r\n Result.setAttribute('class','vanilla-calendar');\r\nend;\r\n\r\nprocedure TCalendar.CreateInitialize;\r\nbegin\r\n inherited;\r\n FShowToday := True;\r\n FSelectedDate := Int(Now);\r\n FYear := YearOf(Now);\r\n FMonth := MonthOf(Now);\r\n FDay := DayOf(Now);\r\n FEnablePastDates := True;\r\n FMultiSelect := True;\r\n FReadOnly := False;\r\n FFirstDay := 1;\r\n FHintNext := '';\r\n FHintPrev := '';\r\n FElementHeaderClassName := '';\r\n FElementBackgroundClassName := '';\r\n FElementDayNamesClassName := '';\r\n FElementSelectedDateClassName := '';\r\n FElementCurrentDateClassName := '';\r\n FInactiveDays := TCalendarInactiveDays.Create;\r\n FInactiveDays.OnChanged := InactiveDaysChanged;\r\n FNameOfDays := TCalendarWeekDayNames.Create;\r\n FNameOfDays.OnChanged := NameOfDaysChanged;\r\n FMonthNames := TCalendarMonthNames.Create;\r\n FMonthNames.OnChanged := MonthNamesChanged;\r\n Width := 250;\r\n Height := 250;\r\nend;\r\n\r\ndestructor TCalendar.Destroy;\r\nbegin\r\n FInactiveDays.Free;\r\n FNameOfDays.Free;\r\n FMonthNames.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TCalendar.InactiveDaysChanged(Sender: TObject);\r\nvar\r\n arr: TJSArray;\r\nbegin\r\n if Assigned(FCalendar) then\r\n begin\r\n arr := GetEnabledDaysArray;\r\n if Assigned(arr) then\r\n begin\r\n FCalendar.setDatesFilter(True);\r\n FCalendar.setEnabledWeekDays(arr);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCalendar.EndUpdate;\r\nvar\r\n opt: TJSCalendarOptions;\r\n arr: TJSArray;\r\nbegin\r\n inherited;\r\n if Assigned(ElementHandle) then\r\n begin\r\n ElementHandle.setAttribute('class','vanilla-calendar');\r\n if ElementClassName <> '' then\r\n ElementHandle.classList.add(ElementClassName);\r\n\r\n if FElementBackgroundClassName <> '' then\r\n ElementHandle.classList.add(FElementBackgroundClassName)\r\n else\r\n ElementHandle.classList.add('tms-calendar-background-default');\r\n\r\n opt := TJSCalendarOptions(new([]));\r\n opt.selector := '#' + ElementHandle.id;\r\n opt.multiselect := FMultiSelect;\r\n opt.firstDay := FFirstDay - 1;\r\n opt.pastDates := FEnablePastDates;\r\n opt.showToday := FShowToday;\r\n opt.readOnly := FReadOnly;\r\n opt.selectedDate := DateTimeToJSDate(FSelectedDate);\r\n opt.buttonHintNext := FHintNext;\r\n opt.buttonHintPrev := FHintPrev;\r\n opt.backgroundClass := FElementBackgroundClassName;\r\n opt.selectedClass := FElementSelectedDateClassName;\r\n opt.currentClass := FElementCurrentDateClassName;\r\n opt.weekClass := FElementDayNamesClassName;\r\n opt.headerClass := FElementHeaderClassName;\r\n opt.onSelect := @HandleDateSelect;\r\n opt.onUnselect := @HandleDateUnselect;\r\n\r\n if FMinDate <> 0.0 then\r\n begin\r\n opt.datesFilter := True;\r\n opt.minDate := DateTimeToJSDate(FMinDate);\r\n end;\r\n\r\n if FMaxDate <> 0.0 then\r\n begin\r\n opt.datesFilter := True;\r\n opt.maxDate := DateTimeToJSDate(FMaxDate);\r\n end;\r\n\r\n arr := GetEnabledDaysArray;\r\n if Assigned(arr) then\r\n begin\r\n opt.datesFilter := True;\r\n opt.availableWeekDays := arr;\r\n end;\r\n\r\n arr := GetNameOfDaysArray;\r\n if Assigned(arr) then\r\n opt.shortWeekday := arr;\r\n\r\n arr := GetMonthNamesArray;\r\n if Assigned(arr) then\r\n opt.months := arr;\r\n\r\n FCalendar := TJSCalendar.new(opt);\r\n end;\r\nend;\r\n\r\nfunction TCalendar.GetDate: TDate;\r\nbegin\r\n Result := EncodeDate(Year, Month, Day);\r\nend;\r\n\r\nfunction TCalendar.GetDay: Integer;\r\nbegin\r\n if Assigned(FCalendar) then\r\n FDay := FCalendar.getSelectedDay;\r\n\r\n Result := FDay;\r\nend;\r\n\r\nfunction TCalendar.GetEnabledDaysArray: TJSArray;\r\nbegin\r\n Result := nil;\r\n if Assigned(FInactiveDays) then\r\n begin\r\n Result := TJSArray.new;\r\n if not FInactiveDays.Sunday then\r\n Result.push(new(['day', 'sunday']));\r\n if not FInactiveDays.Monday then\r\n Result.push(new(['day', 'monday']));\r\n if not FInactiveDays.Tuesday then\r\n Result.push(new(['day', 'tuesday']));\r\n if not FInactiveDays.Wednesday then\r\n Result.push(new(['day', 'wednesday']));\r\n if not FInactiveDays.Thursday then\r\n Result.push(new(['day', 'thursday']));\r\n if not FInactiveDays.Friday then\r\n Result.push(new(['day', 'friday']));\r\n if not FInactiveDays.Saturday then\r\n Result.push(new(['day', 'saturday']));\r\n end;\r\nend;\r\n\r\nfunction TCalendar.GetID: string;\r\nbegin\r\n Result := inherited GetID;\r\n\r\n if Result = '' then\r\n begin\r\n ElementID := GetNewName;\r\n Result := ElementID;\r\n end;\r\nend;\r\n\r\nfunction TCalendar.GetMonth: Integer;\r\nbegin\r\n if Assigned(FCalendar) then\r\n FMonth := FCalendar.getSelectedMonth;\r\n\r\n Result := FMonth;\r\nend;\r\n\r\nfunction TCalendar.GetMonthNamesArray: TJSArray;\r\nbegin\r\n Result := nil;\r\n if Assigned(FMonthNames) then\r\n begin\r\n Result := TJSArray.new;\r\n Result.push(FMonthNames.January);\r\n Result.push(FMonthNames.February);\r\n Result.push(FMonthNames.March);\r\n Result.push(FMonthNames.April);\r\n Result.push(FMonthNames.May);\r\n Result.push(FMonthNames.June);\r\n Result.push(FMonthNames.July);\r\n Result.push(FMonthNames.August);\r\n Result.push(FMonthNames.September);\r\n Result.push(FMonthNames.October);\r\n Result.push(FMonthNames.November);\r\n Result.push(FMonthNames.December);\r\n end;\r\nend;\r\n\r\nfunction TCalendar.GetNameOfDaysArray: TJSArray;\r\nbegin\r\n Result := nil;\r\n if Assigned(FNameOfDays) then\r\n begin\r\n Result := TJSArray.new;\r\n Result.push(FNameOfDays.Sunday);\r\n Result.push(FNameOfDays.Monday);\r\n Result.push(FNameOfDays.Tuesday);\r\n Result.push(FNameOfDays.Wednesday);\r\n Result.push(FNameOfDays.Thursday);\r\n Result.push(FNameOfDays.Friday);\r\n Result.push(FNameOfDays.Saturday);\r\n end;\r\nend;\r\n\r\nfunction TCalendar.GetSelectedDate: TDateTime;\r\nbegin\r\n if Assigned(FCalendar) then\r\n FSelectedDate := JSDateToDateTime(FCalendar.getSelectedDate);\r\n\r\n Result := FSelectedDate\r\nend;\r\n\r\nfunction TCalendar.GetYear: Integer;\r\nbegin\r\n if Assigned(FCalendar) then\r\n FYear := FCalendar.getSelectedYear;\r\n\r\n Result := FYear;\r\nend;\r\n\r\nprocedure TCalendar.HandleDateSelect(Data: TJSDate);\r\nbegin\r\n if Assigned(OnDateSelected) then\r\n OnDateSelected(Self, JSDateToDateTime(Data));\r\nend;\r\n\r\nprocedure TCalendar.HandleDateUnselect(Data: TJSDate);\r\nbegin\r\n if Assigned(OnDateUnselected) then\r\n OnDateUnselected(Self, JSDateToDateTime(Data));\r\nend;\r\n\r\nprocedure TCalendar.MonthNamesChanged(Sender: TObject);\r\nvar\r\n arr: TJSArray;\r\nbegin\r\n if Assigned(FCalendar) then\r\n begin\r\n arr := GetMonthNamesArray;\r\n if Assigned(arr) then\r\n FCalendar.setMonths(arr);\r\n end;\r\nend;\r\n\r\nprocedure TCalendar.NameOfDaysChanged(Sender: TObject);\r\nvar\r\n arr: TJSArray;\r\nbegin\r\n if Assigned(FCalendar) then\r\n begin\r\n arr := GetNameOfDaysArray;\r\n if Assigned(arr) then\r\n FCalendar.setShortWeekdays(arr);\r\n end;\r\nend;\r\n\r\nfunction TCalendar.SelectedDates: TCalendarDates;\r\nvar\r\n arr: TJSArray;\r\n d: TJSDate;\r\n I: Integer;\r\nbegin\r\n if Assigned(FCalendar) then\r\n begin\r\n SetLength(Result, FCalendar.getSelectedDateCount);\r\n arr := FCalendar.getSelectedDays;\r\n for I := 0 to arr.length - 1 do\r\n begin\r\n d := TJSDate.new(JS.toString(arr[I]));\r\n Result[I] := JSDateToDateTime(d);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCalendar.SetDate(const Value: TDate);\r\nvar\r\n Ye,Mo,Da: word;\r\nbegin\r\n DecodeDate(Value, Ye, Mo, Da);\r\n\r\n Day := da;\r\n Month := mo;\r\n Year := ye;\r\nend;\r\n\r\nprocedure TCalendar.SetDay(const Value: Integer);\r\nbegin\r\n FDay := Value;\r\n if Assigned(FCalendar) then\r\n FCalendar.setSelectedDay(Value);\r\nend;\r\n\r\nprocedure TCalendar.SetInactiveDays(const Value: TCalendarInactiveDays);\r\nvar\r\n arr: TJSArray;\r\nbegin\r\n FInactiveDays := Value;\r\n if Assigned(FCalendar) then\r\n begin\r\n arr := GetEnabledDaysArray;\r\n if Assigned(arr) then\r\n FCalendar.setEnabledWeekDays(arr);\r\n end;\r\nend;\r\n\r\nprocedure TCalendar.SetElementBackgroundClassName(\r\n const Value: TElementClassName);\r\nbegin\r\n if Assigned(ElementHandle) and (FElementBackgroundClassName <> '') then\r\n ElementHandle.classList.remove(FElementBackgroundClassName);\r\n\r\n FElementBackgroundClassName := Value;\r\n if Assigned(ElementHandle) then\r\n begin\r\n if FElementBackgroundClassName <> '' then\r\n ElementHandle.classList.add(Value)\r\n else\r\n ElementHandle.classList.add('tms-calendar-background-default');\r\n end;\r\nend;\r\n\r\nprocedure TCalendar.SetElementClassName(AValue: string);\r\nbegin\r\n inherited;\r\n BeginUpdate;\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TCalendar.SetElementCurrentDateClassName(\r\n const Value: TElementClassName);\r\nbegin\r\n FElementCurrentDateClassName := Value;\r\n if Assigned(FCalendar) then\r\n FCalendar.setCurrentClass(Value);\r\nend;\r\n\r\nprocedure TCalendar.SetElementHeaderClassName(const Value: TElementClassName);\r\nbegin\r\n FElementHeaderClassName := Value;\r\n if Assigned(FCalendar) then\r\n FCalendar.setHeaderClass(Value);\r\nend;\r\n\r\nprocedure TCalendar.SetElementSelectedDateClassName(\r\n const Value: TElementClassName);\r\nbegin\r\n FElementSelectedDateClassName := Value;\r\n if Assigned(FCalendar) then\r\n FCalendar.setSelectedClass(Value);\r\nend;\r\n\r\nprocedure TCalendar.SetElementDayNamesClassName(const Value: TElementClassName);\r\nbegin\r\n FElementDayNamesClassName := Value;\r\n if Assigned(FCalendar) then\r\n FCalendar.setWeekClass(Value);\r\nend;\r\n\r\nprocedure TCalendar.SetEnablePastDates(const Value: Boolean);\r\nbegin\r\n FEnablePastDates := Value;\r\n if Assigned(FCalendar) then\r\n FCalendar.setPastDates(Value);\r\nend;\r\n\r\nprocedure TCalendar.SetFirstDay(const Value: Integer);\r\nbegin\r\n if (Value > 0) and (Value < 8) then\r\n begin\r\n FFirstDay := Value;\r\n if Assigned(FCalendar) then\r\n FCalendar.setFirstDay(Value - 1);\r\n end;\r\nend;\r\n\r\nprocedure TCalendar.SetHintNext(const Value: string);\r\nbegin\r\n FHintNext := Value;\r\n if Assigned(FCalendar) then\r\n FCalendar.setButtonHintNext(Value);\r\nend;\r\n\r\nprocedure TCalendar.SetHintPrev(const Value: string);\r\nbegin\r\n FHintPrev := Value;\r\n if Assigned(FCalendar) then\r\n FCalendar.setButtonHintPrev(Value);\r\nend;\r\n\r\nprocedure TCalendar.SetMaxDate(const Value: TDateTime);\r\nbegin\r\n FMaxDate := Value;\r\n if Assigned(FCalendar) then\r\n begin\r\n if Value = 0.0 then\r\n FCalendar.setMaxDate(nil)\r\n else\r\n begin\r\n FCalendar.setDatesFilter(True);\r\n FCalendar.setMaxDate(DateTimeToJSDate(Value));\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCalendar.SetMinDate(const Value: TDateTime);\r\nbegin\r\n FMinDate := Value;\r\n if Assigned(FCalendar) then\r\n begin\r\n if Value = 0.0 then\r\n FCalendar.setMinDate(nil)\r\n else\r\n begin\r\n FCalendar.setDatesFilter(True);\r\n FCalendar.setMinDate(DateTimeToJSDate(Value));\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCalendar.SetMonth(const Value: Integer);\r\nbegin\r\n FMonth := Value;\r\n if Assigned(FCalendar) then\r\n FCalendar.setSelectedMonth(Value);\r\nend;\r\n\r\nprocedure TCalendar.SetMonthNames(const Value: TCalendarMonthNames);\r\nvar\r\n arr: TJSArray;\r\nbegin\r\n FMonthNames := Value;\r\n if Assigned(FCalendar) then\r\n begin\r\n arr := GetMonthNamesArray;\r\n if Assigned(arr) then\r\n FCalendar.setMonths(arr);\r\n end;\r\nend;\r\n\r\nprocedure TCalendar.SetMultiSelect(const Value: Boolean);\r\nbegin\r\n FMultiSelect := Value;\r\n if Assigned(FCalendar) then\r\n FCalendar.setMultiSelect(Value);\r\nend;\r\n\r\nprocedure TCalendar.SetNameOfDays(const Value: TCalendarWeekDayNames);\r\nvar\r\n arr: TJSArray;\r\nbegin\r\n FNameOfDays := Value;\r\n if Assigned(FCalendar) then\r\n begin\r\n arr := GetNameOfDaysArray;\r\n if Assigned(arr) then\r\n FCalendar.setShortWeekdays(arr);\r\n end;\r\nend;\r\n\r\nprocedure TCalendar.SetReadOnly(const Value: Boolean);\r\nbegin\r\n FReadOnly := Value;\r\n if Assigned(FCalendar) then\r\n FCalendar.setReadOnly(Value);\r\nend;\r\n\r\nprocedure TCalendar.SetSelectedDate(const Value: TDateTime);\r\nbegin\r\n FSelectedDate := Int(Value);\r\n if Assigned(FCalendar) then\r\n FCalendar.setSelectedDate(DateTimeToJSDate(FSelectedDate));\r\nend;\r\n\r\nprocedure TCalendar.SetShowToday(const Value: Boolean);\r\nbegin\r\n FShowToday := Value;\r\n if Assigned(FCalendar) then\r\n FCalendar.setShowToday(Value);\r\nend;\r\n\r\nprocedure TCalendar.SetYear(const Value: Integer);\r\nbegin\r\n FYear := Value;\r\n if Assigned(FCalendar) then\r\n FCalendar.setSelectedYear(Value);\r\nend;\r\n\r\n{ TCalendarWeekDayNames }\r\n\r\nprocedure TCalendarWeekDayNames.Changed;\r\nbegin\r\n if Assigned(OnChanged) then\r\n OnChanged(Self);\r\nend;\r\n\r\nconstructor TCalendarWeekDayNames.Create;\r\nbegin\r\n FSunday := 'Sun';\r\n FMonday := 'Mon';\r\n FTuesday := 'Tue';\r\n FWednesday := 'Wed';\r\n FThursday := 'Thu';\r\n FFriday := 'Fri';\r\n FSaturday := 'Sat';\r\nend;\r\n\r\nprocedure TCalendarWeekDayNames.SetFriday(const Value: string);\r\nbegin\r\n FFriday := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TCalendarWeekDayNames.SetMonday(const Value: string);\r\nbegin\r\n FMonday := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TCalendarWeekDayNames.SetSaturday(const Value: string);\r\nbegin\r\n FSaturday := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TCalendarWeekDayNames.SetSunday(const Value: string);\r\nbegin\r\n FSunday := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TCalendarWeekDayNames.SetThursday(const Value: string);\r\nbegin\r\n FThursday := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TCalendarWeekDayNames.SetTuesDay(const Value: string);\r\nbegin\r\n FTuesday := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TCalendarWeekDayNames.SetWednesday(const Value: string);\r\nbegin\r\n FWednesday := Value;\r\n Changed;\r\nend;\r\n\r\n{ TCalendarMonthNames }\r\n\r\nprocedure TCalendarMonthNames.Changed;\r\nbegin\r\n if Assigned(OnChanged) then\r\n OnChanged(Self);\r\nend;\r\n\r\nconstructor TCalendarMonthNames.Create;\r\nbegin\r\n FJanuary := 'January';\r\n FFebruary := 'February';\r\n FMarch := 'March';\r\n FApril := 'April';\r\n FMay := 'May';\r\n FJune := 'June';\r\n FJuly := 'July';\r\n FAugust := 'August';\r\n FSeptember := 'September';\r\n FOctober := 'October';\r\n FNovember := 'November';\r\n FDecember := 'December';\r\nend;\r\n\r\nprocedure TCalendarMonthNames.SetApril(const Value: string);\r\nbegin\r\n FApril := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TCalendarMonthNames.SetAugust(const Value: string);\r\nbegin\r\n FAugust := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TCalendarMonthNames.SetDecember(const Value: string);\r\nbegin\r\n FDecember := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TCalendarMonthNames.SetFebruary(const Value: string);\r\nbegin\r\n FFebruary := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TCalendarMonthNames.SetJanuary(const Value: string);\r\nbegin\r\n FJanuary := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TCalendarMonthNames.SetJuly(const Value: string);\r\nbegin\r\n FJuly := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TCalendarMonthNames.SetJune(const Value: string);\r\nbegin\r\n FJune := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TCalendarMonthNames.SetMarch(const Value: string);\r\nbegin\r\n FMarch := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TCalendarMonthNames.SetMay(const Value: string);\r\nbegin\r\n FMay := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TCalendarMonthNames.SetNovember(const Value: string);\r\nbegin\r\n FNovember := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TCalendarMonthNames.SetOctober(const Value: string);\r\nbegin\r\n FOctober := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TCalendarMonthNames.SetSeptember(const Value: string);\r\nbegin\r\n FSeptember := Value;\r\n Changed;\r\nend;\r\n\r\n{ TCalendarInactiveDays }\r\n\r\nprocedure TCalendarInactiveDays.Changed;\r\nbegin\r\n if Assigned(OnChanged) then\r\n OnChanged(Self);\r\nend;\r\n\r\nconstructor TCalendarInactiveDays.Create;\r\nbegin\r\n FSunday := False;\r\n FMonday := False;\r\n FTuesday := False;\r\n FWednesday := False;\r\n FThursday := False;\r\n FFriday := False;\r\n FSaturday := False;\r\nend;\r\n\r\nprocedure TCalendarInactiveDays.SetFriday(const Value: Boolean);\r\nbegin\r\n FFriday := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TCalendarInactiveDays.SetMonday(const Value: Boolean);\r\nbegin\r\n FMonday := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TCalendarInactiveDays.SetSaturday(const Value: Boolean);\r\nbegin\r\n FSaturday := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TCalendarInactiveDays.SetSunday(const Value: Boolean);\r\nbegin\r\n FSunday := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TCalendarInactiveDays.SetThursday(const Value: Boolean);\r\nbegin\r\n FThursday := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TCalendarInactiveDays.SetTuesDay(const Value: Boolean);\r\nbegin\r\n FTuesday := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TCalendarInactiveDays.SetWednesday(const Value: Boolean);\r\nbegin\r\n FWednesday := Value;\r\n Changed;\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.TMSFNCSwitch;\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 {$IFDEF FMXLIB}\r\n FMX.Types,\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n ExtCtrls,\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n WEBLib.ExtCtrls, WEBLib.Controls,\r\n {$ENDIF}\r\n WEBLib.TMSFNCCustomControl, WEBLib.TMSFNCGraphics, WEBLib.TMSFNCGraphicsTypes,\r\n 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 = 0; // Build nr.\r\n\r\n //Version history\r\n //v1.0.0.0 : First Release\r\n //v1.0.1.0 : New : Introduced ButtonAppearance.OffFill and ButtonAppearance.OffStroke properties\r\n // : Improved : Style adaption\r\n // : Fixed : Issue with text drawn outside of control if ClipChildren is set to False\r\n\r\ntype\r\n TTMSFNCCustomSwitchOrientation = (soHorizontal, soVertical);\r\n TTMSFNCCustomSwitchState = (ssOff, ssOn);\r\n TTMSFNCCustomSwitchLayout = (sloSimple, sloExtended);\r\n\r\n TTMSFNCCustomSwitchAppearanceOff = class(TPersistent)\r\n private\r\n FOnChange: TNotifyEvent;\r\n FFill: TTMSFNCGraphicsFill;\r\n FStroke: TTMSFNCGraphicsStroke;\r\n FText: string;\r\n FFont: TTMSFNCGraphicsFont;\r\n procedure SetFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetText(const Value: string);\r\n function IsTextStored: Boolean;\r\n procedure SetFont(const Value: TTMSFNCGraphicsFont);\r\n protected\r\n procedure Changed;\r\n procedure FillChanged(Sender: TObject);\r\n procedure StrokeChanged(Sender: TObject);\r\n procedure FontChanged(Sender: TObject);\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 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 Text: string read FText write SetText stored IsTextStored nodefault;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n TTMSFNCCustomSwitchAppearanceOn = class(TPersistent)\r\n private\r\n FOnChange: TNotifyEvent;\r\n FFill: TTMSFNCGraphicsFill;\r\n FStroke: TTMSFNCGraphicsStroke;\r\n FText: string;\r\n FFont: TTMSFNCGraphicsFont;\r\n procedure SetFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetText(const Value: string);\r\n function IsTextStored: Boolean;\r\n procedure SetFont(const Value: TTMSFNCGraphicsFont);\r\n protected\r\n procedure Changed;\r\n procedure FillChanged(Sender: TObject);\r\n procedure StrokeChanged(Sender: TObject);\r\n procedure FontChanged(Sender: TObject);\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 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 Text: string read FText write SetText stored IsTextStored nodefault;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n TTMSFNCCustomSwitchButtonAppearance = class(TPersistent)\r\n private\r\n FOnChange: TNotifyEvent;\r\n FFill: TTMSFNCGraphicsFill;\r\n FStroke: TTMSFNCGraphicsStroke;\r\n FMargin: Single;\r\n FOffFill: TTMSFNCGraphicsFill;\r\n FOffStroke: TTMSFNCGraphicsStroke;\r\n procedure SetFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetMargin(const Value: Single);\r\n function IsMarginStored: Boolean;\r\n procedure SetOffFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetOffStroke(const Value: TTMSFNCGraphicsStroke);\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;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property Margin: Single read FMargin write SetMargin stored IsMarginStored nodefault;\r\n property OffFill: TTMSFNCGraphicsFill read FOffFill write SetOffFill;\r\n property OffStroke: TTMSFNCGraphicsStroke read FOffStroke write SetOffStroke;\r\n property Fill: TTMSFNCGraphicsFill read FFill write SetFill;\r\n property Stroke: TTMSFNCGraphicsStroke read FStroke write SetStroke;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n TTMSFNCCustomSwitchBeforeDrawSwitchEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; ASwitchState: TTMSFNCCustomSwitchState; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCCustomSwitchAfterDrawSwitchEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; ASwitchState: TTMSFNCCustomSwitchState) of object;\r\n TTMSFNCCustomSwitchBeforeDrawSwitchButtonEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; ASwitchState: TTMSFNCCustomSwitchState; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCCustomSwitchAfterDrawSwitchButtonEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; ASwitchState: TTMSFNCCustomSwitchState) of object;\r\n TTMSFNCCustomSwitchStateChangeEvent = procedure(Sender: TObject; ASwitchState: TTMSFNCCustomSwitchState) of object;\r\n\r\n TTMSFNCCustomSwitch = class(TTMSFNCCustomControl)\r\n private\r\n FButtonPos: Double;\r\n FPosTo: Double;\r\n FMouseDown: Boolean;\r\n FMouseDownButton: Boolean;\r\n FOrientation: TTMSFNCCustomSwitchOrientation;\r\n FAppearanceOff: TTMSFNCCustomSwitchAppearanceOff;\r\n FAppearanceOn: TTMSFNCCustomSwitchAppearanceOn;\r\n FButtonAppearance: TTMSFNCCustomSwitchButtonAppearance;\r\n FRounded: Boolean;\r\n FLayout: TTMSFNCCustomSwitchLayout;\r\n FSwitchState: TTMSFNCCustomSwitchState;\r\n FSwitchTimer: TTimer;\r\n FAnimationFactor: Integer;\r\n FDoAnimation: Boolean;\r\n FOnAfterDrawSwitch: TTMSFNCCustomSwitchAfterDrawSwitchEvent;\r\n FOnAfterDrawSwitchButton: TTMSFNCCustomSwitchAfterDrawSwitchButtonEvent;\r\n FOnBeforeDrawSwitch: TTMSFNCCustomSwitchBeforeDrawSwitchEvent;\r\n FOnBeforeDrawSwitchButton: TTMSFNCCustomSwitchBeforeDrawSwitchButtonEvent;\r\n FOnStateChange: TTMSFNCCustomSwitchStateChangeEvent;\r\n FOnChange: TNotifyEvent;\r\n procedure SetOrientation(const Value: TTMSFNCCustomSwitchOrientation);\r\n procedure SetAppearanceOff(const Value: TTMSFNCCustomSwitchAppearanceOff);\r\n procedure SetAppearanceOn(const Value: TTMSFNCCustomSwitchAppearanceOn);\r\n procedure SetButtonAppearance(const Value: TTMSFNCCustomSwitchButtonAppearance);\r\n procedure SetRounded(const Value: Boolean);\r\n procedure SetChecked(const Value: Boolean);\r\n procedure SetLayout(const Value: TTMSFNCCustomSwitchLayout);\r\n procedure SetSwitchState(const Value: TTMSFNCCustomSwitchState);\r\n procedure SetAnimationFactor(const Value: Integer);\r\n function GetChecked: Boolean;\r\n protected\r\n procedure ApplyStyle; override;\r\n procedure ResetToDefaultStyle; override;\r\n function GetVersion: string; override;\r\n procedure Draw({%H-}AGraphics: TTMSFNCGraphics; {%H-}ARect: TRectF); override;\r\n procedure DrawSwitchBackground({%H-}AGraphics: TTMSFNCGraphics; {%H-}ARect: TRectF);\r\n procedure DrawSwitchButton({%H-}AGraphics: TTMSFNCGraphics; {%H-}ARect: TRectF);\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 DoBeforeDrawSwitch(AGraphics: TTMSFNCGraphics; ARect: TRectF; ASwitchState: TTMSFNCCustomSwitchState; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawSwitch(AGraphics: TTMSFNCGraphics; ARect: TRectF; ASwitchState: TTMSFNCCustomSwitchState); virtual;\r\n procedure DoBeforeDrawSwtichButton(AGraphics: TTMSFNCGraphics; ARect: TRectF; ASwitchState: TTMSFNCCustomSwitchState; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawSwitchButton(AGraphics: TTMSFNCGraphics; ARect: TRectF; ASwitchState: TTMSFNCCustomSwitchState); virtual;\r\n procedure DoStateChange(ASwitchState: TTMSFNCCustomSwitchState);\r\n procedure DoSwitchTimer(Sender: TObject);\r\n procedure UpdateControlAfterResize; override;\r\n procedure AppearanceChanged(Sender: TObject);\r\n procedure Changed;\r\n function GetSwitchButtonRect: TRectF;\r\n function CalculateButtonPosition(AX: Single; AY: Single): Double;\r\n function GetButtonPos: Double;\r\n function GetButtonOffPos: Double;\r\n function GetButtonOnPos: Double;\r\n function GetOffTextRect: TRectF;\r\n function GetOnTextRect: TrectF;\r\n property AppearanceOff: TTMSFNCCustomSwitchAppearanceOff read FAppearanceOff write SetAppearanceOff;\r\n property AppearanceOn: TTMSFNCCustomSwitchAppearanceOn read FAppearanceOn write SetAppearanceOn;\r\n property ButtonAppearance: TTMSFNCCustomSwitchButtonAppearance read FButtonAppearance write SetButtonAppearance;\r\n property AnimationFactor: Integer read FAnimationFactor write SetAnimationFactor default 15;\r\n property Rounded: Boolean read FRounded write SetRounded default False;\r\n property Orientation: TTMSFNCCustomSwitchOrientation read FOrientation write SetOrientation default soHorizontal;\r\n property State: TTMSFNCCustomSwitchState read FSwitchState write SetSwitchState default ssOff;\r\n property Layout: TTMSFNCCustomSwitchLayout read FLayout write SetLayout default sloSimple;\r\n property OnBeforeDrawSwitch: TTMSFNCCustomSwitchBeforeDrawSwitchEvent read FOnBeforeDrawSwitch write FOnBeforeDrawSwitch;\r\n property OnAfterDrawSwitch: TTMSFNCCustomSwitchAfterDrawSwitchEvent read FOnAfterDrawSwitch write FOnAfterDrawSwitch;\r\n property OnBeforeDrawSwitchButton: TTMSFNCCustomSwitchBeforeDrawSwitchButtonEvent read FOnBeforeDrawSwitchButton write FOnBeforeDrawSwitchButton;\r\n property OnAfterDrawSwitchButton: TTMSFNCCustomSwitchAfterDrawSwitchButtonEvent read FOnAfterDrawSwitchButton write FOnAfterDrawSwitchButton;\r\n property OnStateChange: TTMSFNCCustomSwitchStateChangeEvent read FOnStateChange write FOnStateChange;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n property Checked: Boolean read GetChecked write SetChecked;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCSwitch = class(TTMSFNCCustomSwitch)\r\n published\r\n property AppearanceOff;\r\n property AppearanceOn;\r\n property ButtonAppearance;\r\n property AnimationFactor;\r\n property State;\r\n property Layout;\r\n property Orientation;\r\n property Rounded;\r\n property OnBeforeDrawSwitch;\r\n property OnAfterDrawSwitch;\r\n property OnBeforeDrawSwitchButton;\r\n property OnAfterDrawSwitchButton;\r\n property OnStateChange;\r\n property OnChange;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n Math, WEBLib.TMSFNCStyles, WEBLib.TMSFNCUtils;\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{ TTMSFNCCustomSwitch }\r\n\r\nprocedure TTMSFNCCustomSwitch.AppearanceChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nconstructor TTMSFNCCustomSwitch.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FMouseDown := False;\r\n FSwitchState := ssOff;\r\n FAnimationFactor := 8;\r\n FMouseDownButton := False;\r\n FAppearanceOff := TTMSFNCCustomSwitchAppearanceOff.Create;\r\n FAppearanceOff.OnChange := @AppearanceChanged;\r\n FAppearanceOn := TTMSFNCCustomSwitchAppearanceOn.Create;\r\n FAppearanceOn.OnChange := @AppearanceChanged;\r\n FButtonAppearance := TTMSFNCCustomSwitchButtonAppearance.Create;\r\n FButtonAppearance.OnChange := @AppearanceChanged;\r\n FButtonPos := GetButtonOffPos;\r\n FPosTo := GetButtonOffPos;\r\n Width := 75;\r\n Height := 25;\r\n Fill.Color := gcNull;\r\n Stroke.Color := gcNull;\r\n FDoAnimation := False;\r\n FSwitchTimer := TTimer.Create(Self);\r\n FSwitchTimer.Interval := 10;\r\n FSwitchTimer.OnTimer := DoSwitchTimer;\r\n FSwitchTimer.Enabled := True;\r\nend;\r\n\r\ndestructor TTMSFNCCustomSwitch.Destroy;\r\nbegin\r\n FAppearanceOff.Free;\r\n FAppearanceOn.Free;\r\n FButtonAppearance.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitch.DoAfterDrawSwitch(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; ASwitchState: TTMSFNCCustomSwitchState);\r\nbegin\r\n if Assigned(OnAfterDrawSwitch) then\r\n OnAfterDrawSwitch(Self, AGraphics, ARect, ASwitchState);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitch.DoAfterDrawSwitchButton(\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF;\r\n ASwitchState: TTMSFNCCustomSwitchState);\r\nbegin\r\n if Assigned(OnAfterDrawSwitchButton) then\r\n OnAfterDrawSwitchButton(Self, AGraphics, ARect, ASwitchState);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitch.DoBeforeDrawSwitch(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; ASwitchState: TTMSFNCCustomSwitchState; var AAllow,\r\n ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawSwitch) then\r\n OnBeforeDrawSwitch(Self, AGraphics, ARect, ASwitchState, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitch.DoBeforeDrawSwtichButton(\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF;\r\n ASwitchState: TTMSFNCCustomSwitchState; var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawSwitchButton) then\r\n OnBeforeDrawSwitchButton(Self, AGraphics, ARect, ASwitchState, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitch.DoStateChange(\r\n ASwitchState: TTMSFNCCustomSwitchState);\r\nbegin\r\n if Assigned(OnStateChange) then\r\n OnStateChange(Self, ASwitchState);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitch.DoSwitchTimer(Sender: TObject);\r\nvar\r\n currPos, d: Double;\r\n anim: Boolean;\r\nbegin\r\n if FMouseDown then\r\n Exit;\r\n\r\n if FDoAnimation then\r\n begin\r\n d := Abs(FButtonPos - FPosTo) / AnimationFactor;\r\n currPos := FButtonPos;\r\n anim := AnimateDouble(currPos, FPosTo, d, 0.01);\r\n if anim then\r\n begin\r\n FButtonPos := currPos;\r\n Invalidate;\r\n end\r\n else\r\n FDoAnimation := False;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitch.Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nbegin\r\n DrawSwitchBackground(AGraphics, ARect);\r\n DrawSwitchButton(AGraphics, ARect);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitch.DrawSwitchBackground(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF);\r\nvar\r\n round, ang, ctrlW: Single;\r\n rText: TRectF;\r\n b, df: Boolean;\r\n pos: Double;\r\nbegin\r\n ctrlW := 0;\r\n case FOrientation of\r\n soHorizontal: ctrlW := ARect.Right - ARect.Left;\r\n soVertical: ctrlW := ARect.Bottom - ARect.Top;\r\n end;\r\n\r\n ang := 0;\r\n if FOrientation = soVertical then\r\n ang := -90;\r\n\r\n if FRounded then\r\n begin\r\n round := 0;\r\n case FOrientation of\r\n soHorizontal: round := (ARect.Bottom - ARect.Top) / 2;\r\n soVertical: round := (ARect.Right - ARect.Left) / 2;\r\n end;\r\n end\r\n else\r\n round := 1;\r\n\r\n if FButtonPos < ctrlW / 2 then\r\n begin\r\n AGraphics.Fill.Assign(FAppearanceOff.Fill);\r\n AGraphics.Stroke.Assign(FAppearanceOff.Stroke);\r\n end\r\n else\r\n begin\r\n AGraphics.Fill.Assign(FAppearanceOn.Fill);\r\n AGraphics.Stroke.Assign(FAppearanceOn.Stroke);\r\n end;\r\n\r\n b:= True;\r\n df := True;\r\n DoBeforeDrawSwitch(AGraphics, ARect, FSwitchState, b, df);\r\n if b then\r\n begin\r\n if df then\r\n begin\r\n AGraphics.DrawRoundRectangle(ARect, round - 1);\r\n\r\n if FLayout = sloExtended then\r\n begin\r\n pos := GetButtonOnPos;\r\n if FButtonPos <> pos then\r\n begin\r\n rText := GetOffTextRect;\r\n AGraphics.Font.AssignSource(FAppearanceOff.Font);\r\n AGraphics.DrawText(rText, FAppearanceOff.Text, False, gtaCenter, gtaCenter, gttNone, ang);\r\n end;\r\n\r\n pos := GetButtonOffPos;\r\n if FButtonPos <> pos then\r\n begin\r\n rText := GetOnTextRect;\r\n AGraphics.Font.AssignSource(FAppearanceOn.Font);\r\n AGraphics.DrawText(rText, FAppearanceOn.Text, False, gtaCenter, gtaCenter, gttNone, ang);\r\n end;\r\n end;\r\n end;\r\n DoAfterDrawSwitch(AGraphics, ARect, FSwitchState);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitch.DrawSwitchButton(AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nvar\r\n r: TRectF;\r\n round, ctrlW: Single;\r\n b, df: Boolean;\r\nbegin\r\n ctrlW := 0;\r\n case FOrientation of\r\n soHorizontal: ctrlW := ARect.Right - ARect.Left;\r\n soVertical: ctrlW := ARect.Bottom - ARect.Top;\r\n end;\r\n\r\n if FButtonPos < ctrlW / 2 then\r\n begin\r\n AGraphics.Fill.Assign(FButtonAppearance.OffFill);\r\n AGraphics.Stroke.Assign(FButtonAppearance.OffStroke);\r\n end\r\n else\r\n begin\r\n AGraphics.Fill.Assign(FButtonAppearance.Fill);\r\n AGraphics.Stroke.Assign(FButtonAppearance.Stroke);\r\n end;\r\n\r\n r := GetSwitchButtonRect;\r\n\r\n round := FButtonAppearance.Margin + 1;\r\n if FRounded then\r\n begin\r\n case FOrientation of\r\n soHorizontal: round := (ARect.Bottom - ARect.Top) / 2;\r\n soVertical: round := (ARect.Right - ARect.Left) / 2;\r\n end;\r\n end;\r\n\r\n b := True;\r\n df := True;\r\n DoBeforeDrawSwtichButton(AGraphics, r, FSwitchState, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawRoundRectangle(r, round - FButtonAppearance.Margin - 1, [gcTopLeft, gcTopRight, gcBottomLeft, gcBottomRight], gcrmNone);\r\n\r\n DoAfterDrawSwitchButton(AGraphics, r, FSwitchState);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitch.ApplyStyle;\r\nvar\r\n c: TTMSFNCGraphicsColor;\r\nbegin\r\n inherited;\r\n {$IFDEF FMXLIB}\r\n Fill.Kind := gfkNone;\r\n {$ENDIF}\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleBackgroundFillColor(c) then\r\n begin\r\n AppearanceOff.Fill.Kind := gfkSolid;\r\n AppearanceOff.Fill.Color := c;\r\n ButtonAppearance.Fill.Kind := gfkSolid;\r\n ButtonAppearance.Fill.Color := c;\r\n end;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleSelectionFillColorTo(c) then\r\n begin\r\n AppearanceOn.Fill.Kind := gfkSolid;\r\n AppearanceOn.Fill.Color := c;\r\n end;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleTextFontColor(c) then\r\n begin\r\n AppearanceOn.Font.Color := c;\r\n AppearanceOff.Font.Color := c;\r\n end;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleLineFillColor(c) then\r\n begin\r\n AppearanceOff.Stroke.Kind := gskSolid;\r\n AppearanceOff.Stroke.Color := c;\r\n AppearanceOn.Stroke.Kind := gskSolid;\r\n AppearanceOn.Stroke.Color := c;\r\n ButtonAppearance.Stroke.Kind := gskSolid;\r\n ButtonAppearance.Stroke.Color := c;\r\n end;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleDefaultButtonFillColor(c) then\r\n begin\r\n ButtonAppearance.OffFill.Kind := gfkSolid;\r\n ButtonAppearance.OffFill.Color := c;\r\n end;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleDefaultButtonStrokeColor(c) then\r\n begin\r\n ButtonAppearance.OffStroke.Kind := gskSolid;\r\n ButtonAppearance.OffStroke.Color := c;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomSwitch.CalculateButtonPosition(AX, AY: Single): Double;\r\nvar\r\n ind: Single;\r\n r, rb: TRectF;\r\nbegin\r\n Result := -1;\r\n rb := GetSwitchButtonRect;\r\n ind := FButtonAppearance.Margin + FButtonAppearance.Stroke.Width / 2 + (rb.Right - rb.Left) / 2;\r\n r := GetControlRect;\r\n\r\n case FOrientation of\r\n soHorizontal:\r\n begin\r\n if r.Left + ind >= AX then\r\n Result := r.Left + ind\r\n else if r.Right - ind <= AX then\r\n Result := r.Right - ind\r\n else\r\n Result := AX;\r\n end;\r\n soVertical:\r\n begin\r\n if r.Top + ind >= AY then\r\n Result := r.Top + ind\r\n else if r.Bottom - ind <= AY then\r\n Result := r.Bottom - ind\r\n else\r\n Result := AY;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitch.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\n\r\n Invalidate;\r\nend;\r\n\r\nfunction TTMSFNCCustomSwitch.GetButtonOffPos: Double;\r\nvar\r\n rb: TRectF;\r\n ind: Single;\r\nbegin\r\n Result := 0;\r\n rb := GetSwitchButtonRect;\r\n ind := FButtonAppearance.Margin + FButtonAppearance.Stroke.Width / 2 + (rb.Right - rb.Left) / 2;\r\n case FOrientation of\r\n soHorizontal: Result := GetControlRect.Left + ind;\r\n soVertical: Result := GetControlRect.Bottom - ind;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomSwitch.GetButtonOnPos: Double;\r\nvar\r\n rb: TRectF;\r\n ind: Single;\r\nbegin\r\n Result := 0;\r\n rb := GetSwitchButtonRect;\r\n ind := FButtonAppearance.Margin + FButtonAppearance.Stroke.Width / 2 + (rb.Right - rb.Left) / 2;\r\n case FOrientation of\r\n soHorizontal: Result := GetControlRect.Right - ind;\r\n soVertical: Result := GetControlRect.Top + ind;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomSwitch.GetButtonPos: Double;\r\nbegin\r\n Result := 0;\r\n case FSwitchState of\r\n ssOff: Result := GetButtonOffPos;\r\n ssOn: Result := GetButtonOnPos;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomSwitch.GetChecked: Boolean;\r\nbegin\r\n Result := False;\r\n case FSwitchState of\r\n ssOff: Result := False;\r\n ssOn: Result := True;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomSwitch.GetOffTextRect: TRectF;\r\nvar\r\n rbtn: TRectF;\r\n btnW: Single;\r\nbegin\r\n Result := RectF(0, 0, 0, 0);\r\n rbtn := GetSwitchButtonRect;\r\n case FOrientation of\r\n soHorizontal:\r\n begin\r\n btnW := rbtn.Right - rbtn.Left;\r\n Result := RectF(rbtn.Right, GetControlRect.Top, rbtn.Right + (GetControlRect.Right - btnW), GetControlRect.Bottom);\r\n end;\r\n soVertical:\r\n begin\r\n btnW := GetControlRect.Bottom - GetControlRect.Top - (rbtn.Bottom - rbtn.Top);\r\n Result := RectF(GetControlRect.Left, rbtn.Top - btnW, GetControlRect.Right, rbtn.Top);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomSwitch.GetOnTextRect: TrectF;\r\nvar\r\n rbtn: TRectF;\r\n ctrlW: Single;\r\nbegin\r\n Result := RectF(0, 0, 0, 0);\r\n rbtn := GetSwitchButtonRect;\r\n case FOrientation of\r\n soHorizontal:\r\n begin\r\n ctrlW := GetControlRect.Right - GetControlRect.Left - (rbtn.Right - rbtn.Left);\r\n Result := RectF(rbtn.Left - ctrlW, GetControlRect.Top, rbtn.Left, GetControlRect.Bottom);\r\n end;\r\n soVertical:\r\n begin\r\n ctrlW := GetControlRect.Bottom - GetControlRect.Top - (rbtn.Bottom - rbtn.Top);\r\n Result := RectF(GetControlRect.Left, rbtn.Bottom, GetControlRect.Right, rbtn.Bottom + ctrlW);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomSwitch.GetSwitchButtonRect: TRectF;\r\nvar\r\n btnW, btn, infl: Single;\r\nbegin\r\n btnW := 0;\r\n case FOrientation of\r\n soHorizontal: btnW := GetControlRect.Bottom - GetContentRect.Top;\r\n soVertical: btnW := GetContentRect.Right - GetContentRect.Left;\r\n end;\r\n\r\n btn := btnW / 2;\r\n infl := FButtonAppearance.Margin + FButtonAppearance.Stroke.Width / 2;\r\n case FOrientation of\r\n soHorizontal: Result := RectF(FButtonPos - btn, GetContentRect.Top, FButtonPos + btn, GetControlRect.Bottom);\r\n soVertical: Result := RectF(GetContentRect.Left, FButtonPos - btn, GetContentRect.Right, FButtonPos + btn);\r\n end;\r\n\r\n InflateRectEx(Result, -infl, -infl);\r\nend;\r\n\r\nfunction TTMSFNCCustomSwitch.GetVersion: string;\r\nbegin\r\n Result := GetVersionNumber(MAJ_VER, MIN_VER, REL_VER, BLD_VER);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitch.HandleMouseDown(Button: TTMSFNCMouseButton;\r\n Shift: TShiftState; X, Y: Single);\r\nvar\r\n r: TRectF;\r\nbegin\r\n inherited;\r\n r := GetSwitchButtonRect;\r\n if PtInRectEx(r, PointF(X, Y)) then\r\n begin\r\n FMouseDown := True;\r\n CaptureEx;\r\n end\r\n else\r\n FMouseDownButton := True;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitch.HandleMouseMove(Shift: TShiftState; X, Y: Single);\r\nbegin\r\n inherited;\r\n if FMouseDown and (FLayout = sloExtended) then\r\n begin\r\n FButtonPos := CalculateButtonPosition(X, Y);\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitch.HandleMouseUp(Button: TTMSFNCMouseButton;\r\n Shift: TShiftState; X, Y: Single);\r\nbegin\r\n inherited;\r\n if FMouseDown then\r\n begin\r\n case FOrientation of\r\n soHorizontal:\r\n begin\r\n if X > Width / 2 then\r\n begin\r\n FPosTo := GetButtonOnPos;\r\n FSwitchState := ssOn;\r\n DoStateChange(ssOn);\r\n end\r\n else\r\n begin\r\n FPosTo := GetButtonOffPos;\r\n FSwitchState := ssOff;\r\n DoStateChange(ssOff);\r\n end;\r\n end;\r\n soVertical:\r\n begin\r\n if Y < Height / 2 then\r\n begin\r\n FPosTo := GetButtonOnPos;\r\n FSwitchState := ssOn;\r\n DoStateChange(ssOn);\r\n end\r\n else\r\n begin\r\n FPosTo := GetButtonOffPos;\r\n FSwitchState := ssOff;\r\n DoStateChange(ssOff);\r\n end;\r\n end;\r\n end;\r\n\r\n FDoAnimation := True;\r\n FMouseDown := False;\r\n ReleaseCaptureEx;\r\n Changed;\r\n end\r\n else if FMouseDownButton then\r\n begin\r\n case FSwitchState of\r\n ssOff:\r\n begin\r\n FSwitchState := ssOn;\r\n FPosTo := GetButtonOnPos;\r\n DoStateChange(ssOn);\r\n end;\r\n ssOn:\r\n begin\r\n FSwitchState := ssOff;\r\n FPosTo := GetButtonOffPos;\r\n DoStateChange(ssOff);\r\n end;\r\n end;\r\n\r\n FDoAnimation := True;\r\n FMouseDownButton := False;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitch.ResetToDefaultStyle;\r\nbegin\r\n inherited;\r\n {$IFDEF FMXLIB}\r\n Fill.Kind := gfkSolid;\r\n {$ENDIF}\r\n AppearanceOff.Fill.Color := gcWhite;\r\n AppearanceOn.Fill.Color := gcDodgerBlue;\r\n AppearanceOn.Font.Color := gcBlack;\r\n AppearanceOff.Font.Color := gcBlack;\r\n AppearanceOff.Stroke.Color := gcSilver;\r\n AppearanceOn.Stroke.Color := gcSilver;\r\n ButtonAppearance.Fill.Color := gcWhite;\r\n ButtonAppearance.Stroke.Color := gcSilver;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitch.SetAnimationFactor(const Value: Integer);\r\nbegin\r\n if FAnimationFactor <> Value then\r\n begin\r\n FAnimationFactor := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitch.SetAppearanceOff(\r\n const Value: TTMSFNCCustomSwitchAppearanceOff);\r\nbegin\r\n FAppearanceOff.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitch.SetAppearanceOn(\r\n const Value: TTMSFNCCustomSwitchAppearanceOn);\r\nbegin\r\n FAppearanceOn.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitch.SetButtonAppearance(\r\n const Value: TTMSFNCCustomSwitchButtonAppearance);\r\nbegin\r\n FButtonAppearance.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitch.SetChecked(const Value: Boolean);\r\nbegin\r\n if Value then\r\n begin\r\n FSwitchState := ssOn;\r\n DoStateChange(ssOn);\r\n end\r\n else\r\n begin\r\n FSwitchState := ssOff;\r\n DoStateChange(ssOff);\r\n end;\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitch.SetLayout(const Value: TTMSFNCCustomSwitchLayout);\r\nbegin\r\n if FLayout <> Value then\r\n begin\r\n FLayout := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitch.SetOrientation(\r\n const Value: TTMSFNCCustomSwitchOrientation);\r\nbegin\r\n if FOrientation <> Value then\r\n begin\r\n FOrientation := Value;\r\n if ComponentState * [csLoading, csUpdating] = [] then\r\n begin\r\n {$IFDEF FMXLIB}\r\n SetBounds(Position.x, Position.Y, Height, Width);\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n SetBounds(Left, Top, Height, Width);\r\n {$ENDIF}\r\n end;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitch.SetRounded(const Value: Boolean);\r\nbegin\r\n if FRounded <> Value then\r\n begin\r\n FRounded := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitch.SetSwitchState(\r\n const Value: TTMSFNCCustomSwitchState);\r\nbegin\r\n if FSwitchState <> Value then\r\n begin\r\n FSwitchState := Value;\r\n case Value of\r\n ssOn:\r\n begin\r\n FPosTo := GetButtonOnPos;\r\n FButtonPos := GetButtonOnPos;\r\n end;\r\n ssOff:\r\n begin\r\n FPosTo := GetButtonOffPos;\r\n FButtonPos := GetButtonOffPos;\r\n end;\r\n end;\r\n DoStateChange(Value);\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitch.UpdateControlAfterResize;\r\nbegin\r\n inherited;\r\n FButtonPos := GetButtonPos;\r\n FPosTo := GetButtonOffPos;\r\nend;\r\n\r\n{ TTMSFNCCustomSwitchAppearanceOff }\r\n\r\nprocedure TTMSFNCCustomSwitchAppearanceOff.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCCustomSwitchAppearanceOff then\r\n begin\r\n FFill.Assign((Source as TTMSFNCCustomSwitchAppearanceOff).Fill);\r\n FStroke.Assign((Source as TTMSFNCCustomSwitchAppearanceOff).Stroke);\r\n FFont.AssignSource((Source as TTMSFNCCustomSwitchAppearanceOff).Font);\r\n FText := (Source as TTMSFNCCustomSwitchAppearanceOff).Text;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitchAppearanceOff.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TTMSFNCCustomSwitchAppearanceOff.Create;\r\nbegin\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 FText := 'Off';\r\nend;\r\n\r\ndestructor TTMSFNCCustomSwitchAppearanceOff.Destroy;\r\nbegin\r\n FFill.Free;\r\n FStroke.Free;\r\n FFont.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitchAppearanceOff.FillChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitchAppearanceOff.FontChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nfunction TTMSFNCCustomSwitchAppearanceOff.IsTextStored: Boolean;\r\nbegin\r\n Result := FText <> 'Off';\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitchAppearanceOff.SetFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitchAppearanceOff.SetFont(\r\n const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FFont.AssignSource(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitchAppearanceOff.SetStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitchAppearanceOff.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 TTMSFNCCustomSwitchAppearanceOff.StrokeChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\n{ TTMSFNCCustomSwitchAppearanceOn }\r\n\r\nprocedure TTMSFNCCustomSwitchAppearanceOn.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCCustomSwitchAppearanceOn then\r\n begin\r\n FFill.Assign((Source as TTMSFNCCustomSwitchAppearanceOn).Fill);\r\n FStroke.Assign((Source as TTMSFNCCustomSwitchAppearanceOn).Stroke);\r\n FFont.AssignSource((Source as TTMSFNCCustomSwitchAppearanceOn).Font);\r\n FText := (Source as TTMSFNCCustomSwitchAppearanceOn).Text;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitchAppearanceOn.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TTMSFNCCustomSwitchAppearanceOn.Create;\r\nbegin\r\n FFill := TTMSFNCGraphicsFill.Create(gfkSolid, gcDodgerBlue);\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 FText := 'On';\r\nend;\r\n\r\ndestructor TTMSFNCCustomSwitchAppearanceOn.Destroy;\r\nbegin\r\n FFill.Free;\r\n FStroke.Free;\r\n FFont.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitchAppearanceOn.FillChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitchAppearanceOn.FontChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nfunction TTMSFNCCustomSwitchAppearanceOn.IsTextStored: Boolean;\r\nbegin\r\n Result := FText <> 'On';\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitchAppearanceOn.SetFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitchAppearanceOn.SetFont(\r\n const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FFont.AssignSource(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitchAppearanceOn.SetStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitchAppearanceOn.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 TTMSFNCCustomSwitchAppearanceOn.StrokeChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\n{ TTMSFNCCustomSwitchButtonAppearance }\r\n\r\nprocedure TTMSFNCCustomSwitchButtonAppearance.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCCustomSwitchButtonAppearance then\r\n begin\r\n FFill.Assign((Source as TTMSFNCCustomSwitchButtonAppearance).Fill);\r\n FOffFill.Assign((Source as TTMSFNCCustomSwitchButtonAppearance).OffFill);\r\n FStroke.Assign((Source as TTMSFNCCustomSwitchButtonAppearance).Stroke);\r\n FOffStroke.Assign((Source as TTMSFNCCustomSwitchButtonAppearance).OffStroke);\r\n FMargin := (Source as TTMSFNCCustomSwitchButtonAppearance).Margin;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitchButtonAppearance.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TTMSFNCCustomSwitchButtonAppearance.Create;\r\nbegin\r\n FMargin := 3;\r\n FFill := TTMSFNCGraphicsFill.Create;\r\n FFill.OnChanged := @FillChanged;\r\n FOffFill := TTMSFNCGraphicsFill.Create;\r\n FOffFill.OnChanged := @FillChanged;\r\n FStroke := TTMSFNCGraphicsStroke.Create;\r\n FStroke.OnChanged := @StrokeChanged;\r\n FOffStroke := TTMSFNCGraphicsStroke.Create;\r\n FOffStroke.OnChanged := @StrokeChanged;\r\nend;\r\n\r\ndestructor TTMSFNCCustomSwitchButtonAppearance.Destroy;\r\nbegin\r\n FFill.Free;\r\n FStroke.Free;\r\n FOffFill.Free;\r\n FOffStroke.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitchButtonAppearance.FillChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nfunction TTMSFNCCustomSwitchButtonAppearance.IsMarginStored: Boolean;\r\nbegin\r\n Result := FMargin <> 3.0;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitchButtonAppearance.SetFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitchButtonAppearance.SetMargin(const Value: Single);\r\nbegin\r\n if FMargin <> Value then\r\n begin\r\n FMargin := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitchButtonAppearance.SetOffFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FOffFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitchButtonAppearance.SetOffStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FOffStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitchButtonAppearance.SetStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSwitchButtonAppearance.StrokeChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\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.ContinuousScroll;\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, Web, JS, WEBLib.Controls, WEBLib.JSON;\r\n\r\ntype\r\n TContinuousScrollFetchPageEvent = procedure(Sender: TObject; APageSize: Integer; APageNumber: Integer; var AURL: string) of object;\r\n TContinuousScrollJSONToItemEvent = procedure(Sender: TObject; AObject: TJSONObject; var AHTML: string) of object;\r\n TContinuousScrollObjectToArrayEvent = procedure(Sender: TObject; AObject: TJSObjectRecord; var AArray: TJSArrayRecord) of object;\r\n TContinuousScrollResponseToArrayEvent = procedure(Sender: TObject; AResponse: string; var AArray: TJSArrayRecord) of object;\r\n TContinuousScrollGetDataEvent = procedure(Sender: TObject; var AArray: TJSArrayRecord; var ALoadMoreData: Boolean) of object;\r\n TContinuousScrollGetItemEvent = procedure(Sender: TObject; AElementControl: TControl; AObject: TJSONObject; AIndex: Integer; AElement: TJSHTMLElementRecord) of object;\r\n TContinuousScrollItemFieldEvent = procedure(Sender: TObject; AIndex: Integer; AFieldName: string; var AValue: string) of object;\r\n TContinuousScrollPageLoadedEvent = procedure(Sender: TObject; APageNumber: Integer) of object;\r\n TContinuousScrollItemEvent = procedure(Sender: TObject; AIndex: Integer; AItemElement, ATargetElement: TJSHTMLElementRecord) of object;\r\n TContinousScrollItemMouseEvent = procedure(Sender: TObject; AIndex: Integer; AElement: TJSHTMLElementRecord) of object;\r\n\r\n TContinuousScrollLoadType = (ltButton, ltScroll, ltNever);\r\n TRequestMode = (rmGET, rmPOST);\r\n\r\n TContinuousScroll = class(TCustomControl)\r\n private\r\n FRow: Integer;\r\n FCanScroll: Boolean;\r\n FCanLoad: Boolean;\r\n FButtonElement: TJSHTMLElement;\r\n FListEndElement: TJSHTMLElement;\r\n FLoaderElement: TJSHTMLElement;\r\n FPageNumber: Integer;\r\n FPageSize: Integer;\r\n FOnFetchNextPage: TContinuousScrollFetchPageEvent;\r\n FLoadScrollPercent: Integer;\r\n FLoadType: TContinuousScrollLoadType;\r\n FOnJSONToItem: TContinuousScrollJSONToItemEvent;\r\n FOnObjectToArray: TContinuousScrollObjectToArrayEvent;\r\n FShowLoading: Boolean;\r\n FShowEnd: Boolean;\r\n FElementListEndClassName: TElementClassName;\r\n FElementLoadClassName: TElementClassName;\r\n FElementButtonClassName: TElementClassName;\r\n FListEndText: string;\r\n FButtonText: string;\r\n FItemTemplate: string;\r\n FOnGetListItem: TContinuousScrollGetItemEvent;\r\n FOnItemGetFieldValue: TContinuousScrollItemFieldEvent;\r\n FOnResponseToArray: TContinuousScrollResponseToArrayEvent;\r\n FOnPageLoaded: TContinuousScrollPageLoadedEvent;\r\n FOnGetData: TContinuousScrollGetDataEvent;\r\n FAutoLoadFirstPage: Boolean;\r\n FHeaders: TStringList;\r\n FPostData: string;\r\n FRequestMode: TRequestMode;\r\n FOnItemClick: TContinuousScrollItemEvent;\r\n FOnItemMouseDown: TContinuousScrollItemEvent;\r\n FOnItemMouseMove: TContinuousScrollItemEvent;\r\n FOnItemMouseUp: TContinuousScrollItemEvent;\r\n FOnItemMouseLeave: TContinousScrollItemMouseEvent;\r\n FOnItemMouseEnter: TContinousScrollItemMouseEvent;\r\n procedure SetLoadScrollPercent(const Value: Integer);\r\n procedure SetElementLoadClassName(const Value: TElementClassName);\r\n procedure SetElementListEndClassName(const Value: TElementClassName);\r\n procedure SetElementButtonClassName(const Value: TElementClassName);\r\n procedure SetButtonText(const Value: string);\r\n procedure SetListEndText(const Value: string);\r\n procedure SetHeaders(const Value: TStringList);\r\n protected\r\n procedure BindEvents; override;\r\n procedure UnbindEvents; override;\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElement; override;\r\n function HandleScroll(aEvent: TJSUIEvent): Boolean;\r\n function HandleItemClick(aEvent: TJSEvent): Boolean;\r\n function HandleItemMouseDown(aEvent: TJSEvent): Boolean;\r\n function HandleItemMouseUp(aEvent: TJSEvent): Boolean;\r\n function HandleItemMouseMove(aEvent: TJSEvent): Boolean;\r\n function HandleItemMouseLeave(aEvent: TJSEvent): Boolean;\r\n function HandleItemMouseEnter(aEvent: TJSEvent): Boolean;\r\n function HandleButtonClick(aEvent: TJSMouseEvent): Boolean;\r\n function HandleResponse(Event: TEventListenerEvent): Boolean;\r\n function HandleAbort(Event: TEventListenerEvent): Boolean;\r\n procedure ProcessResponseData(AData: string);\r\n procedure DoGetData(var AArray: TJSArray; var ALoadMoreData: Boolean);\r\n procedure DoPageLoaded(APageNumber: Integer); virtual;\r\n procedure DoScrollEnd; virtual;\r\n procedure DoLoadOnScroll; virtual;\r\n procedure DoFetchNextPage(APageSize, APageNumber: Integer; var AURL: string); virtual;\r\n procedure DoObjectToArray(AObject: TJSObject; var AArray: TJSArray); virtual;\r\n procedure DoResponseToArray(AResponse: string; var AArray: TJSArray); virtual;\r\n procedure DoJSONToItem(AObject: TJSONObject; var AHTML: string); virtual;\r\n procedure DoGetListItem(AElementControl: TControl; AObject: TJSONObject; ARow: Integer; AElement: TJSHTMLElement); virtual;\r\n procedure DoItemGetFieldValue(AIndex: Integer; AFieldName: string; var AValue: string); virtual;\r\n procedure ReplaceTemplateHTML(var AHTML: string; AObject: TJSONObject; AIndex: Integer);\r\n procedure DoItemClick(AIndex: Integer; AItemElement, ATargetElement: TJSHTMLElement); virtual;\r\n procedure DoItemMouseDown(AIndex: Integer; AItemElement, ATargetElement: TJSHTMLElement); virtual;\r\n procedure DoItemMouseUp(AIndex: Integer; AItemElement, ATargetElement: TJSHTMLElement); virtual;\r\n procedure DoItemMouseMove(AIndex: Integer; AItemElement, ATargetElement: TJSHTMLElement); virtual;\r\n procedure DoItemMouseLeave(AIndex: Integer; AElement: TJSHTMLElement); virtual;\r\n procedure DoItemMouseEnter(AIndex: Integer; AElement: TJSHTMLElement); virtual;\r\n property ButtonElement: TJSHTMLElement read FButtonElement write FButtonElement;\r\n property ListEndElement: TJSHTMLElement read FListEndElement write FListEndElement;\r\n property LoadElement: TJSHTMLElement read FLoaderElement write FLoaderElement;\r\n public\r\n destructor Destroy; override;\r\n procedure CreateInitialize; override;\r\n procedure Clear;\r\n procedure FetchNextPage; virtual;\r\n procedure EndUpdate; override;\r\n function GetChildElement(AChildIndex: Integer): TJSHTMLElement;\r\n function GetChildElements: TJSNodeList;\r\n published\r\n property Align;\r\n property Anchors;\r\n property AutoLoadFirstPage: Boolean read FAutoLoadFirstPage write FAutoLoadFirstPage;\r\n property ShowHint;\r\n property Visible;\r\n property TabOrder;\r\n property TabStop;\r\n property Headers: TStringList read FHeaders write SetHeaders;\r\n property ButtonText: string read FButtonText write SetButtonText;\r\n property ListEndText: string read FListEndText write SetListEndText;\r\n property ElementPosition;\r\n property ElementFont;\r\n property ElementButtonClassName: TElementClassName read FElementButtonClassName write SetElementButtonClassName;\r\n property ElementLoadClassName: TElementClassName read FElementLoadClassName write SetElementLoadClassName;\r\n property ElementListEndClassName: TElementClassName read FElementListEndClassName write SetElementListEndClassName;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property ItemTemplate: string read FItemTemplate write FItemTemplate;\r\n property LoadType: TContinuousScrollLoadType read FLoadType write FLoadType;\r\n property PageSize: Integer read FPageSize write FPageSize;\r\n property PageNumber: Integer read FPageNumber write FPageNumber;\r\n property RequestMode: TRequestMode read FRequestMode write FRequestMode;\r\n property PostData: string read FPostData write FPostData;\r\n property LoadScrollPercent: Integer read FLoadScrollPercent write SetLoadScrollPercent;\r\n property ShowLoading: Boolean read FShowLoading write FShowLoading;\r\n property ShowEnd: Boolean read FShowEnd write FShowEnd;\r\n property WidthStyle;\r\n property WidthPercent;\r\n property OnFetchNextPage: TContinuousScrollFetchPageEvent read FOnFetchNextPage write FOnFetchNextPage;\r\n property OnObjectToArray: TContinuousScrollObjectToArrayEvent read FOnObjectToArray write FOnObjectToArray;\r\n property OnResponseToArray: TContinuousScrollResponseToArrayEvent read FOnResponseToArray write FOnResponseToArray;\r\n property OnJSONToItem: TContinuousScrollJSONToItemEvent read FOnJSONToItem write FOnJSONToItem;\r\n property OnGetListItem: TContinuousScrollGetItemEvent read FOnGetListItem write FOnGetListItem;\r\n property OnItemGetFieldValue: TContinuousScrollItemFieldEvent read FOnItemGetFieldValue write FOnItemGetFieldValue;\r\n property OnPageLoaded: TContinuousScrollPageLoadedEvent read FOnPageLoaded write FOnPageLoaded;\r\n property OnGetData: TContinuousScrollGetDataEvent read FOnGetData write FOnGetData;\r\n property OnItemClick: TContinuousScrollItemEvent read FOnItemClick write FOnItemClick;\r\n property OnItemMouseDown: TContinuousScrollItemEvent read FOnItemMouseDown write FOnItemMouseDown;\r\n property OnItemMouseUp: TContinuousScrollItemEvent read FOnItemMouseUp write FOnItemMouseUp;\r\n property OnItemMouseMove: TContinuousScrollItemEvent read FOnItemMouseMove write FOnItemMouseMove;\r\n property OnItemMouseLeave: TContinousScrollItemMouseEvent read FOnItemMouseLeave write FOnItemMouseLeave;\r\n property OnItemMouseEnter: TContinousScrollItemMouseEvent read FOnItemMouseEnter write FOnItemMouseEnter;\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 TWebContinuousScroll = class(TContinuousScroll);\r\n\r\nimplementation\r\n\r\nuses\r\n SysUtils, StrUtils, Math;\r\n\r\n{ TContinuousScroll }\r\n\r\nprocedure TContinuousScroll.BindEvents;\r\nbegin\r\n inherited;\r\n window.addEventListener('scroll', @HandleScroll);\r\n if Assigned(ElementHandle) then\r\n ElementHandle.onscroll := HandleScroll;\r\nend;\r\n\r\nprocedure TContinuousScroll.Clear;\r\nvar\r\n I: NativeInt;\r\n el: TJSHTMLElement;\r\nbegin\r\n FCanLoad := False;\r\n FRow := 0;\r\n if ElementHandle.contains(FButtonElement) then\r\n FButtonElement := TJSHTMLElement(ElementHandle.removeChild(FButtonElement));\r\n\r\n if ElementHandle.contains(FListEndElement) then\r\n FListEndElement := TJSHTMLElement(ElementHandle.removeChild(FListEndElement));\r\n\r\n for I := GetChildElements.length - 1 downto 0 do\r\n begin\r\n el := GetChildElement(I);\r\n if Assigned(el) then\r\n ElementHandle.removeChild(el);\r\n end;\r\n FCanLoad := True;\r\n if FAutoLoadFirstPage then\r\n FetchNextPage;\r\nend;\r\n\r\nfunction TContinuousScroll.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('DIV');\r\nend;\r\n\r\nprocedure TContinuousScroll.CreateInitialize;\r\nbegin\r\n inherited;\r\n Height := 300;\r\n Width := 250;\r\n FHeaders := TStringList.Create;\r\n FAutoLoadFirstPage := True;\r\n FCanScroll := True;\r\n FCanLoad := True;\r\n FLoadScrollPercent := 100;\r\n FLoadType := ltButton;\r\n FPageSize := 10;\r\n FPageNumber := 1;\r\n FShowLoading := True;\r\n FShowEnd := True;\r\n FButtonText := 'Show more';\r\n FListEndText := 'End of results';\r\n FRow := 0;\r\n FRequestMode := rmGET;\r\n FPostData := '';\r\n\r\n FButtonElement := TJSHTMLElement(document.createElement('BUTTON'));\r\n FButtonElement.onclick := @HandleButtonClick;\r\n FButtonElement.innerHTML := FButtonText;\r\n if FElementButtonClassName <> '' then\r\n FButtonElement.setAttribute('class', FElementButtonClassName);\r\n\r\n FListEndElement := TJSHTMLElement(document.createElement('DIV'));\r\n FListEndElement.innerHTML := FListEndText;\r\n FListEndElement.setAttribute('style', 'display: flex; align-items: center; justify-content: center');\r\n if FElementListEndClassName <> '' then\r\n FListEndElement.setAttribute('class', FElementListEndClassName);\r\n\r\n FLoaderElement := TJSHTMLElement(document.createElement('DIV'));\r\n if FElementLoadClassName <> '' then\r\n FLoaderElement.setAttribute('class', FElementLoadClassName)\r\n else\r\n FLoaderElement.setAttribute('class', 'CSLoad');\r\nend;\r\n\r\ndestructor TContinuousScroll.Destroy;\r\nbegin\r\n FHeaders.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TContinuousScroll.DoFetchNextPage(APageSize, APageNumber: Integer; var AURL: string);\r\nbegin\r\n if Assigned(OnFetchNextPage) then\r\n OnFetchNextPage(Self, APageSize, APageNumber, AURL);\r\nend;\r\n\r\nprocedure TContinuousScroll.DoGetData(var AArray: TJSArray;\r\n var ALoadMoreData: Boolean);\r\nvar\r\n LJARec: TJSArrayRecord;\r\nbegin\r\n if Assigned(OnGetData) then\r\n begin\r\n LJARec.jsarray := AArray;\r\n OnGetData(Self, LJARec, ALoadMoreData);\r\n AArray := LJARec.jsarray;\r\n end;\r\nend;\r\n\r\nprocedure TContinuousScroll.DoGetListItem(AElementControl: TControl;\r\n AObject: TJSONObject; ARow: Integer; AElement: TJSHTMLElement);\r\nvar\r\n LElementRec: TJSHTMLElementRecord;\r\nbegin\r\n if Assigned(OnGetListItem) then\r\n begin\r\n LElementRec.element := AElement;\r\n OnGetListItem(Self, AElementControl, AObject, ARow, LElementRec);\r\n end;\r\nend;\r\n\r\nprocedure TContinuousScroll.DoItemClick(AIndex: Integer;\r\n AItemElement, ATargetElement: TJSHTMLElement);\r\nvar\r\n LItemElementRec, LTargetElementRec: TJSHTMLElementRecord;\r\nbegin\r\n if Assigned(OnItemClick) then\r\n begin\r\n LItemElementRec.element := AItemElement;\r\n LTargetElementRec.element := ATargetElement;\r\n OnItemClick(Self, AIndex, LItemElementRec, LTargetElementRec);\r\n end;\r\nend;\r\n\r\nprocedure TContinuousScroll.DoItemGetFieldValue(AIndex: Integer;\r\n AFieldName: string; var AValue: string);\r\nbegin\r\n if Assigned(OnItemGetFieldValue) then\r\n OnItemGetfieldValue(Self, AIndex, AFieldName, AValue);\r\nend;\r\n\r\nprocedure TContinuousScroll.DoItemMouseDown(AIndex: Integer; AItemElement,\r\n ATargetElement: TJSHTMLElement);\r\nvar\r\n LItemElementRec, LTargetElementRec: TJSHTMLElementRecord;\r\nbegin\r\n if Assigned(OnItemMouseDown) then\r\n begin\r\n LItemElementRec.element := AItemElement;\r\n LTargetElementRec.element := ATargetElement;\r\n OnItemMouseDown(Self, AIndex, LItemElementRec, LTargetElementRec);\r\n end;\r\nend;\r\n\r\nprocedure TContinuousScroll.DoItemMouseEnter(AIndex: Integer;\r\n AElement: TJSHTMLElement);\r\nvar\r\n LItemElementRec: TJSHTMLElementRecord;\r\nbegin\r\n if Assigned(OnItemMouseEnter) then\r\n begin\r\n LItemElementRec.element := AElement;\r\n OnItemMouseEnter(Self, AIndex, LItemElementRec);\r\n end;\r\nend;\r\n\r\nprocedure TContinuousScroll.DoItemMouseLeave(AIndex: Integer;\r\n AElement: TJSHTMLElement);\r\nvar\r\n LItemElementRec: TJSHTMLElementRecord;\r\nbegin\r\n if Assigned(OnItemMouseLeave) then\r\n begin\r\n LItemElementRec.element := AElement;\r\n OnItemMouseLeave(Self, AIndex, LItemElementRec);\r\n end;\r\nend;\r\n\r\nprocedure TContinuousScroll.DoItemMouseMove(AIndex: Integer; AItemElement,\r\n ATargetElement: TJSHTMLElement);\r\nvar\r\n LItemElementRec, LTargetElementRec: TJSHTMLElementRecord;\r\nbegin\r\n if Assigned(OnItemMouseMove) then\r\n begin\r\n LItemElementRec.element := AItemElement;\r\n LTargetElementRec.element := ATargetElement;\r\n OnItemMouseMove(Self, AIndex, LItemElementRec, LTargetElementRec);\r\n end;\r\nend;\r\n\r\nprocedure TContinuousScroll.DoItemMouseUp(AIndex: Integer; AItemElement,\r\n ATargetElement: TJSHTMLElement);\r\nvar\r\n LItemElementRec, LTargetElementRec: TJSHTMLElementRecord;\r\nbegin\r\n if Assigned(OnItemMouseUp) then\r\n begin\r\n LItemElementRec.element := AItemElement;\r\n LTargetElementRec.element := ATargetElement;\r\n OnItemMouseUp(Self, AIndex, LItemElementRec, LTargetElementRec);\r\n end;\r\nend;\r\n\r\nprocedure TContinuousScroll.DoJSONToItem(AObject: TJSONObject;\r\n var AHTML: string);\r\nbegin\r\n if Assigned(OnJSONToItem) then\r\n OnJSONToItem(Self, AObject, AHTML);\r\nend;\r\n\r\nprocedure TContinuousScroll.DoLoadOnScroll;\r\nvar\r\n st: Integer;\r\nbegin\r\n if HeightStyle = ssAuto then\r\n begin\r\n asm\r\n st = (window.scrollY || window.pageYOffset);\r\n end;\r\n st := st + Round(elementhandle.getBoundingClientRect.top) + document.documentElement.scrollTop;\r\n if FCanScroll and (window.innerHeight + st + 2 >= Min(ElementHandle.getBoundingClientRect.bottom + document.documentElement.scrollTop, document.documentElement.scrollHeight div 100 * FLoadScrollPercent)) then\r\n begin\r\n FCanScroll := False;\r\n DoScrollEnd;\r\n end;\r\n end\r\n else\r\n begin\r\n if FCanScroll and (ElementHandle.ClientHeight + ElementHandle.scrollTop + 2 >= (ElementHandle.scrollHeight div 100 * FLoadScrollPercent)) then\r\n begin\r\n FCanScroll := False;\r\n DoScrollEnd;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TContinuousScroll.DoObjectToArray(AObject: TJSObject;\r\n var AArray: TJSArray);\r\nvar\r\n LObjRec: TJSObjectRecord;\r\n LJARec: TJSArrayRecord;\r\nbegin\r\n if Assigned(OnObjectToArray) then\r\n begin\r\n LObjRec.jsobject := AObject;\r\n LJARec.jsarray := AArray;\r\n OnObjectToArray(Self, LObjRec, LJARec);\r\n AArray := LJARec.jsarray;\r\n end;\r\nend;\r\n\r\nprocedure TContinuousScroll.DoPageLoaded(APageNumber: Integer);\r\nbegin\r\n if Assigned(OnPageLoaded) then\r\n OnPageLoaded(Self, APageNumber);\r\nend;\r\n\r\nprocedure TContinuousScroll.DoResponseToArray(AResponse: string;\r\n var AArray: TJSArray);\r\nvar\r\n LJARec: TJSArrayRecord;\r\nbegin\r\n if Assigned(OnResponseToArray) then\r\n begin\r\n LJARec.jsarray := AArray;\r\n OnResponseToArray(Self, AResponse, LJARec);\r\n AArray := LJARec.jsarray;\r\n end;\r\nend;\r\n\r\nprocedure TContinuousScroll.DoScrollEnd;\r\nbegin\r\n if FLoadType = ltScroll then\r\n FetchNextPage;\r\nend;\r\n\r\nprocedure TContinuousScroll.EndUpdate;\r\nbegin\r\n inherited;\r\n if FAutoLoadFirstPage then\r\n FetchNextPage;\r\nend;\r\n\r\nprocedure TContinuousScroll.FetchNextPage;\r\nvar\r\n req: TJSXMLHttpRequest;\r\n requrl, headname, headvalue: string;\r\n I: Integer;\r\nbegin\r\n if not FCanLoad then\r\n Exit;\r\n\r\n requrl := '';\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if HeightStyle = ssAuto then\r\n ElementHandle.style.setProperty('overflow', 'hidden');\r\n\r\n if ElementHandle.contains(FButtonElement) then\r\n FButtonElement := TJSHTMLElement(ElementHandle.removeChild(FButtonElement));\r\n\r\n if FShowLoading then\r\n ElementHandle.appendChild(FLoaderElement);\r\n end;\r\n\r\n DoFetchNextPage(FPageSize, FPageNumber, requrl);\r\n FCanLoad := False;\r\n if requrl <> '' then\r\n begin\r\n req := TJSXMLHttpRequest.new;\r\n req.addEventListener('load', @HandleResponse);\r\n req.addEventListener('abort',@HandleAbort);\r\n req.addEventListener('timeout',@HandleAbort);\r\n req.addEventListener('error',@HandleAbort);\r\n\r\n case FRequestMode of\r\n rmGET: req.open('GET', requrl);\r\n rmPOST: req.open('POST', requrl);\r\n end;\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 FPostData <> '' then\r\n req.send(FPostData)\r\n else\r\n req.send;\r\n end\r\n else\r\n ProcessResponseData('');\r\nend;\r\n\r\nfunction TContinuousScroll.GetChildElement(\r\n AChildIndex: Integer): TJSHTMLElement;\r\nbegin\r\n Result := nil;\r\n if Assigned(ElementHandle) then\r\n Result := TJSHTMLElement(document.getElementById(Name + '_child' + IntToStr(AChildIndex)));\r\nend;\r\n\r\nfunction TContinuousScroll.GetChildElements: TJSNodeList;\r\nbegin\r\n Result := nil;\r\n if Assigned(ElementHandle) then\r\n Result := ElementHandle.querySelectorAll('#' + ElementID + ' > div');\r\nend;\r\n\r\nfunction TContinuousScroll.HandleAbort(Event: TEventListenerEvent): Boolean;\r\nbegin\r\n Result := True;\r\n FCanLoad := False;\r\n if Assigned(ElementHandle) then\r\n begin\r\n if ElementHandle.contains(FButtonElement) then\r\n FButtonElement := TJSHTMLElement(ElementHandle.removeChild(FButtonElement));\r\n\r\n if ElementHandle.contains(FLoaderElement) then\r\n FLoaderElement := TJSHTMLElement(ElementHandle.removeChild(FLoaderElement));\r\n\r\n if FShowEnd then\r\n ElementHandle.appendChild(FListEndElement);\r\n end;\r\n DoPageLoaded(FPageNumber);\r\nend;\r\n\r\nfunction TContinuousScroll.HandleButtonClick(aEvent: TJSMouseEvent): Boolean;\r\nbegin\r\n Result := True;\r\n FetchNextPage;\r\nend;\r\n\r\nfunction TContinuousScroll.HandleItemClick(aEvent: TJSEvent): Boolean;\r\nvar\r\n i: Integer;\r\nbegin\r\n Result := True;\r\n if Assigned(aEvent.currentTargetElement) then\r\n begin\r\n i := StrToInt(StringReplace(aEvent.currentTargetElement.id, Name + '_child', '', []));\r\n DoItemClick(i, TJSHTMLElement(aEvent.currentTargetElement), TJSHTMLElement(aEvent.target));\r\n end;\r\nend;\r\n\r\nfunction TContinuousScroll.HandleItemMouseDown(aEvent: TJSEvent): Boolean;\r\nvar\r\n i: Integer;\r\nbegin\r\n Result := True;\r\n if Assigned(aEvent.currentTargetElement) then\r\n begin\r\n i := StrToInt(StringReplace(aEvent.currentTargetElement.id, Name + '_child', '', []));\r\n DoItemMouseDown(i, TJSHTMLElement(aEvent.currentTargetElement), TJSHTMLElement(aEvent.target));\r\n end;\r\nend;\r\n\r\nfunction TContinuousScroll.HandleItemMouseEnter(aEvent: TJSEvent): Boolean;\r\nvar\r\n i: Integer;\r\nbegin\r\n Result := True;\r\n if Assigned(aEvent.currentTargetElement) then\r\n begin\r\n i := StrToInt(StringReplace(aEvent.currentTargetElement.id, Name + '_child', '', []));\r\n DoItemMouseEnter(i, TJSHTMLElement(aEvent.currentTargetElement));\r\n end;\r\nend;\r\n\r\nfunction TContinuousScroll.HandleItemMouseLeave(aEvent: TJSEvent): Boolean;\r\nvar\r\n i: Integer;\r\nbegin\r\n Result := True;\r\n if Assigned(aEvent.currentTargetElement) then\r\n begin\r\n i := StrToInt(StringReplace(aEvent.currentTargetElement.id, Name + '_child', '', []));\r\n DoItemMouseLeave(i, TJSHTMLElement(aEvent.currentTargetElement));\r\n end;\r\nend;\r\n\r\nfunction TContinuousScroll.HandleItemMouseMove(aEvent: TJSEvent): Boolean;\r\nvar\r\n i: Integer;\r\nbegin\r\n Result := True;\r\n if Assigned(aEvent.currentTargetElement) then\r\n begin\r\n i := StrToInt(StringReplace(aEvent.currentTargetElement.id, Name + '_child', '', []));\r\n DoItemMouseMove(i, TJSHTMLElement(aEvent.currentTargetElement), TJSHTMLElement(aEvent.target));\r\n end;\r\nend;\r\n\r\nfunction TContinuousScroll.HandleItemMouseUp(aEvent: TJSEvent): Boolean;\r\nvar\r\n i: Integer;\r\nbegin\r\n Result := True;\r\n if Assigned(aEvent.currentTargetElement) then\r\n begin\r\n i := StrToInt(StringReplace(aEvent.currentTargetElement.id, Name + '_child', '', []));\r\n DoItemMouseUp(i, TJSHTMLElement(aEvent.currentTargetElement), TJSHTMLElement(aEvent.target));\r\n end;\r\nend;\r\n\r\nfunction TContinuousScroll.HandleResponse(Event: TEventListenerEvent): Boolean;\r\nvar\r\n s: string;\r\nbegin\r\n s := '';\r\n asm\r\n s = Event.target.responseText;\r\n end;\r\n\r\n ProcessResponseData(s);\r\n Result := True;\r\nend;\r\n\r\nfunction TContinuousScroll.HandleScroll(aEvent: TJSUIEvent): Boolean;\r\nbegin\r\n Result := True;\r\n if Assigned(ElementHandle) then\r\n DoLoadOnScroll;\r\nend;\r\n\r\nprocedure TContinuousScroll.ProcessResponseData(AData: string);\r\nvar\r\n html: string;\r\n O: TJSObject;\r\n jsarr: TJSArray;\r\n obj: TJSONObject;\r\n arr: TJSONArray;\r\n I: Integer;\r\n el: TJSElement;\r\n elc: TControl;\r\n lm: Boolean;\r\nbegin\r\n lm := True;\r\n if AData <> '' then\r\n begin\r\n DoResponseToArray(AData, jsarr);\r\n if not Assigned(jsarr) then\r\n begin\r\n try\r\n O := TJSJSON.parseObject(AData);\r\n DoObjectToArray(O, jsarr);\r\n except\r\n Exit;\r\n end;\r\n end;\r\n\r\n if not Assigned(jsarr) then\r\n arr := TJSONArray.Create(TJSArray(O))\r\n else\r\n arr := TJSONArray.Create(jsarr);\r\n end\r\n else\r\n begin\r\n DoGetData(jsarr, lm);\r\n if not Assigned(jsarr) then\r\n begin\r\n FCanLoad := lm;\r\n Exit;\r\n end;\r\n arr := TJSONArray.Create(jsarr);\r\n end;\r\n\r\n if not Assigned(ElementHandle) or not Assigned(FLoaderElement) then\r\n Exit;\r\n\r\n if ElementHandle.contains(FLoaderElement) then\r\n begin\r\n if HeightStyle = ssAuto then\r\n ElementHandle.style.setProperty('overflow', 'auto');\r\n\r\n if FShowLoading then\r\n FLoaderElement := TJSHTMLElement(ElementHandle.removeChild(FLoaderElement));\r\n end;\r\n\r\n for I := 0 to arr.Count - 1 do\r\n begin\r\n html := '';\r\n el := document.createElement('DIV');\r\n el.id := Name + '_child' + IntToStr(FRow);\r\n el.addEventListener('click', @HandleItemClick);\r\n el.addEventListener('mousedown', @HandleItemMouseDown);\r\n el.addEventListener('mouseup', @HandleItemMouseUp);\r\n el.addEventListener('mousemove', @HandleItemMouseMove);\r\n el.addEventListener('mouseleave', @HandleItemMouseLeave);\r\n el.addEventListener('mouseenter', @HandleItemMouseEnter);\r\n TJSHTMLElement(el).style.setProperty('position', 'relative');\r\n obj := TJSONObject(arr.Items[I]);\r\n DoJSONToItem(obj, html);\r\n if html = '' then\r\n html := FItemTemplate;\r\n\r\n ReplaceTemplateHTML(html, obj, FRow);\r\n el.innerHTML := el.innerHTML + html;\r\n ElementHandle.appendChild(el);\r\n elc := TControl.Create(Self);\r\n elc.Container := el;\r\n DoGetListItem(elc, obj, FRow, TJSHTMLElement(el));\r\n Inc(FRow);\r\n end;\r\n\r\n FCanLoad := True;\r\n if (arr.Count < FPageSize) or (arr.Count = 0) or (FLoadType = ltNever) or not lm then\r\n FCanLoad := False;\r\n\r\n if (FLoadType = ltButton) and FCanLoad then\r\n ElementHandle.appendChild(FButtonElement);\r\n\r\n if (not FCanLoad) and FShowEnd then\r\n ElementHandle.appendChild(FListEndElement);\r\n\r\n DoPageLoaded(FPageNumber);\r\n\r\n Inc(FPageNumber);\r\n FCanScroll := True;\r\n\r\n if (FLoadType = ltScroll) and FCanLoad then\r\n DoLoadOnScroll;\r\nend;\r\n\r\nprocedure TContinuousScroll.ReplaceTemplateHTML(var AHTML: string;\r\n AObject: TJSONObject; AIndex: Integer);\r\n function repl(const AMatch, AName: string; AOffset: Integer; AString: string): string;\r\n var\r\n str: string;\r\n begin\r\n str := TJSString(AName).replace('(%', '');\r\n str := TJSString(str).replace('%)', '');\r\n Result := AObject.GetJSONValue(str);\r\n DoItemGetFieldValue(AIndex, str, Result);\r\n end;\r\nvar\r\n e: TJSRegexp;\r\nbegin\r\n e := TJSRegexp.New('(\\(\\%[_\\w]*\\%\\))','g');\r\n AHTML := TJSString(AHTML).replace(e, @repl);\r\nend;\r\n\r\nprocedure TContinuousScroll.SetButtonText(const Value: string);\r\nbegin\r\n FButtonText := Value;\r\n if Assigned(FButtonElement) then\r\n FButtonElement.innerHTML := FButtonText;\r\nend;\r\n\r\nprocedure TContinuousScroll.SetElementButtonClassName(\r\n const Value: TElementClassName);\r\nbegin\r\n FElementButtonClassName := Value;\r\n if Assigned(FButtonElement) then\r\n begin\r\n if Value <> '' then\r\n FButtonElement.setAttribute('class', FElementButtonClassName)\r\n else\r\n FButtonElement.removeAttribute('class');\r\n end;\r\nend;\r\n\r\nprocedure TContinuousScroll.SetElementListEndClassName(const Value: TElementClassName);\r\nbegin\r\n FElementListEndClassName := Value;\r\n if Assigned(FListEndElement) then\r\n begin\r\n if Value <> '' then\r\n FListEndElement.setAttribute('class', FElementListEndClassName)\r\n else\r\n FListEndElement.removeAttribute('class');\r\n end;\r\nend;\r\n\r\nprocedure TContinuousScroll.SetElementLoadClassName(const Value: TElementClassName);\r\nbegin\r\n FElementLoadClassName := Value;\r\n if Assigned(FLoaderElement) then\r\n begin\r\n if Value <> '' then\r\n FLoaderElement.setAttribute('class', FElementLoadClassName)\r\n else\r\n FLoaderElement.setAttribute('class', 'CSLoad');\r\n end;\r\nend;\r\n\r\nprocedure TContinuousScroll.SetHeaders(const Value: TStringList);\r\nbegin\r\n FHeaders.Assign(Value);\r\nend;\r\n\r\nprocedure TContinuousScroll.SetListEndText(const Value: string);\r\nbegin\r\n FListEndText := Value;\r\n if Assigned(FListEndElement) then\r\n FListEndElement.innerHTML := FListEndText;\r\nend;\r\n\r\nprocedure TContinuousScroll.SetLoadScrollPercent(const Value: Integer);\r\nbegin\r\n if (Value > 0) and (Value <= 100) then\r\n FLoadScrollPercent := Value;\r\nend;\r\n\r\nprocedure TContinuousScroll.UnbindEvents;\r\nbegin\r\n inherited;\r\n window.removeEventListener('scroll', @HandleScroll);\r\nend;\r\n\r\nprocedure TContinuousScroll.UpdateElement;\r\nbegin\r\n inherited;\r\n if Assigned(ElementHandle) then\r\n ElementHandle.style.setProperty('overflow', 'auto');\r\n\r\n AddControlStyle(\r\n '.CSLoad {' + #13 +\r\n ' border: 3px solid #f3f3f3;' + #13 +\r\n ' border-radius: 50%;' + #13 +\r\n ' border-top: 3px solid #3498db;' + #13 +\r\n ' width: 15px;' + #13 +\r\n ' height: 15px;' + #13 +\r\n ' margin: auto;' + #13 +\r\n ' -webkit-animation: spin 1s linear infinite;' + #13 +\r\n ' animation: spin 1s linear infinite;' + #13 +\r\n '}' + #13 +\r\n '@-webkit-keyframes spin {' + #13 +\r\n ' 0% { -webkit-transform: rotate(0deg); }' + #13 +\r\n ' 100% { -webkit-transform: rotate(360deg); }' + #13 +\r\n '}' + #13 +\r\n '@keyframes spin {' + #13 +\r\n ' 0% { transform: rotate(0deg); }' + #13 +\r\n ' 100% { transform: rotate(360deg); }' + #13 +\r\n '}');\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.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 console.log('initializing bootstrap', classname, name);\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) 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\nunit WEBLib.Imaging.gifimg;\r\n\r\ninterface\r\n\r\nimplementation\r\n\r\nbegin\r\nasm\r\nend;\r\n\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\nunit WEBLib.Imaging.pngImage;\r\n\r\ninterface\r\n\r\nimplementation\r\n\r\nbegin\r\nasm\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 AsJObject(Value: TJElement): TJObject;\r\nfunction AsJArray(Value: TJElement): TJArray;\r\n\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 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\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);\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);\r\nend;\r\n{$ENDIF}\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 {$IFNDEF PAS2JS}\r\n Character,\r\n {$ELSE}\r\n JS,\r\n {$ENDIF}\r\n SysUtils;\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 procedure Init;\r\n end;\r\n\r\n TBclUtils = class\r\n {$IFNDEF PAS2JS}\r\n public\r\n class procedure InitFormatSettings(var FS: TFormatSettings); {$IFNDEF PAS2JS}static;{$ENDIF}\r\n {$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 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 Value: 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; {$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): boolean; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n {$ENDIF}\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 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\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\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.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;\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 ExtractTripleDigit(var CharIndex: Integer; out Value: Integer): Boolean;\r\n var\r\n N100, N10, N: Integer;\r\n begin\r\n Result := ExtractDigit(CharIndex, N100) and ExtractDigit(CharIndex, N10) and ExtractDigit(CharIndex, N);\r\n if Result then\r\n Value := 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 ExtractHourMinOffset(var CharIndex: Integer; out HourOff, MinOff: Integer): Boolean;\r\n begin\r\n Result :=\r\n ExtractDoubleDigit(CharIndex, HourOff)\r\n and ExtractChar(CharIndex, ':')\r\n and ExtractDoubleDigit(CharIndex, MinOff)\r\n and (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): 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 end;\r\n\r\nvar\r\n Hour, Min, Sec, MSec: Integer;\r\n HourOff, MinOff: Integer;\r\n HasTimeZone: Boolean;\r\n CharIndex: 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\r\n TextLen := Length(Text);\r\n CharIndex := 1;\r\n if not ExtractDoubleDigit(CharIndex, Hour) then Exit(False);\r\n if not ExtractChar(CharIndex, ':') then Exit(False);\r\n if not ExtractDoubleDigit(CharIndex, Min) then Exit(False);\r\n if not IsFinal(CharIndex, HasTimeZone) then\r\n begin\r\n if not ExtractChar(CharIndex, ':') then Exit(False);\r\n if not ExtractDoubleDigit(CharIndex, Sec) then Exit(False);\r\n if not IsFinal(CharIndex, HasTimeZone) then\r\n begin\r\n if not (ExtractChar(CharIndex, '.') and ExtractTripleDigit(CharIndex, MSec) and IsFinal(CharIndex, HasTimeZone)) then\r\n Exit(False);\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 DateTime := EncodeTime(Hour, Min, Sec, MSec);\r\n TimeZone.HourOff := HourOff;\r\n TimeZone.MinOff := MinOff;\r\n TimeZone.HasTimeZone := HasTimeZone;\r\n\r\n Result := True;\r\n end;\r\nend;\r\n\r\n{$IFNDEF PAS2JS}\r\nclass procedure TBclUtils.InitFormatSettings(var FS: TFormatSettings);\r\nbegin\r\n {$IFDEF DELPHIXE2_LVL}\r\n FS := System.SysUtils.FormatSettings;\r\n {$ELSE}\r\n {$IFDEF DELPHIXE_LVL}\r\n FS := TFormatSettings.Create;\r\n {$ELSE}\r\n GetLocaleFormatSettings(0, FS);\r\n {$ENDIF}\r\n {$ENDIF}\r\nend;\r\n{$ENDIF}\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\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.PercentEncode(const S: string): string;\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\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): 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;\r\n out Guid: TGuid): boolean;\r\nbegin\r\n // TODO: Optimize this to a TryStringToGUID\r\n try\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 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 DatePart: TDate;\r\n TimePart: TDateTime;\r\n TimeZone: TTimeZoneInfo;\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//{$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\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 DefaultTimeZoneMode := TTimeZoneMode.Error;\r\n FullISOTimeNotation := False;\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 SysUtils, Bcl.SysUtils,\r\n Bcl.Collections.Common,\r\n XData.Model.Classes;\r\n\r\ntype\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 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 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 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 Str := Copy(Str, 2, Len - 2);\r\nend;\r\n\r\nfunction LiteralQuote(const Str: string): string;\r\nbegin\r\n Result := '''' + Str + '''';\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\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\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\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 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\ninitialization\r\n{$IFNDEF PAS2JS}\r\nfinalization\r\n TXDataPrimitiveTypes.ClassDestroy;\r\n{$ENDIF}\r\n\r\nend.\r\n\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 {$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; Prop: TXDataSimpleProperty): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue; Prop: TXDataSimpleProperty): 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; Prop: TXDataSimpleProperty): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue; Prop: TXDataSimpleProperty): 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; Prop: TXDataSimpleProperty): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue; Prop: TXDataSimpleProperty): 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; Prop: TXDataSimpleProperty): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue; Prop: TXDataSimpleProperty): 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; Prop: TXDataSimpleProperty): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue; Prop: TXDataSimpleProperty): 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; Prop: TXDataSimpleProperty): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue; Prop: TXDataSimpleProperty): 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; Prop: TXDataSimpleProperty): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue; Prop: TXDataSimpleProperty): 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; Prop: TXDataSimpleProperty): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue; Prop: TXDataSimpleProperty): 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; Prop: TXDataSimpleProperty): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue; Prop: TXDataSimpleProperty): 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; Prop: TXDataSimpleProperty): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue; Prop: TXDataSimpleProperty): 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; Prop: TXDataSimpleProperty): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue; Prop: TXDataSimpleProperty): 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; Prop: TXDataSimpleProperty): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue; Prop: TXDataSimpleProperty): 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; Prop: TXDataSimpleProperty): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue; Prop: TXDataSimpleProperty): 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; Prop: TXDataSimpleProperty): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue; Prop: TXDataSimpleProperty): 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; Prop: TXDataSimpleProperty): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue; Prop: TXDataSimpleProperty): boolean; override;\r\n public\r\n constructor Create(AEnumType: TXDataEnumType); reintroduce;\r\n end;\r\n\r\nprocedure AddDefaultUrlConverters(Converters: TXDataUrlConverters);\r\n\r\nimplementation\r\n\r\nuses\r\n XData.Model.Types;\r\n\r\nprocedure AddDefaultUrlConverters(Converters: TXDataUrlConverters);\r\nbegin\r\n // Integer types\r\n Converters.RegisterConverter('Int32', TXDataInt32Converter.Create);\r\n Converters.RegisterConverter('Int16', TXDataInt16Converter.Create);\r\n Converters.RegisterConverter('Int64', TXDataInt64Converter.Create);\r\n\r\n // Boolean types\r\n Converters.RegisterConverter('Boolean', TXDataBooleanConverter.Create);\r\n\r\n // Float types\r\n Converters.RegisterConverter('Double', TXDataDoubleConverter.Create);\r\n {$IFDEF PAS2JS}\r\n Converters.RegisterConverter('Currency', TXDataDoubleConverter.Create);\r\n {$ELSE}\r\n Converters.RegisterConverter('Currency', TXDataCurrencyConverter.Create);\r\n {$ENDIF}\r\n\r\n // Date time types\r\n Converters.RegisterConverter('DateTime', TXDataDateTimeConverter.Create);\r\n Converters.RegisterConverter('Date', TXDataDateConverter.Create);\r\n Converters.RegisterConverter('Time', TXDataTimeConverter.Create);\r\n\r\n // Blob types\r\n Converters.RegisterConverter('Binary', TXDataBinaryConverter.Create);\r\n Converters.RegisterConverter('Stream', TXDataBinaryConverter.Create);\r\n\r\n // String types\r\n Converters.RegisterConverter('String', TXDataStringConverter.Create);\r\n\r\n // Char types\r\n Converters.RegisterConverter('Char', TXDataCharConverter.Create);\r\n\r\n // Guid types\r\n Converters.RegisterConverter('Guid', TXDataGuidConverter.Create);\r\n\r\n // Variant\r\n Converters.RegisterConverter('Variant', 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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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 LiteralQuote(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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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;\r\n Prop: TXDataSimpleProperty): 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\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{$IFDEF PAS2JS}\r\n {$modeswitch ignoreattributes}\r\n{$ENDIF}\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 Bcl.Json.Attributes,\r\n {$ELSE}\r\n// JS,\r\n {$ENDIF}\r\n {$IFDEF GENERICS}\r\n Generics.Collections,\r\n {$ELSE}\r\n Contnrs,\r\n {$ENDIF}\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\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 );\r\n\r\n TXDataSchema = class;\r\n TXDataModel = class;\r\n TXDataTypeConverter = class;\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 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 TXDataType = class(TXDataModelObject)\r\n strict private\r\n FName: string;\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 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 TXDataPrimitiveType = class(TXDataScalarType)\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 TXDataStructuredType = class(TXDataType)\r\n end;\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 [JsonInclude(TInclusionMode.NonDefault)]\r\n TXDataProperty = class(TXDataModelObject)\r\n strict private\r\n FName: string;\r\n FRequired: Boolean;\r\n function GetParent: TXDataEntityType;\r\n public\r\n function IsSimple: Boolean; virtual; abstract;\r\n property Parent: TXDataEntityType read GetParent;\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 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 TXDataSimpleProperty = class(TXDataProperty)\r\n strict private\r\n [JsonIgnore]\r\n FType: TXDataScalarType;\r\n FLength: Integer;\r\n FPrecision: Integer;\r\n FScale: Integer;\r\n private\r\n [JsonIgnore]\r\n FUrlConverter: TXDataTypeConverter;\r\n private\r\n [JsonIgnore]\r\n FTypeRef: string;\r\n function GetTypeRef: string;\r\n public\r\n [JsonProperty('Type')]\r\n property TypeRef: string read GetTypeRef write FTypeRef;\r\n private\r\n procedure Prepare;\r\n protected\r\n procedure SetType(const Value: TXDataScalarType);\r\n function GetTypeKind: TXTypeKind;\r\n// procedure SetTypeKind(const Value: TOTypeKind);\r\n public\r\n property UrlConverter: TXDataTypeConverter read FUrlConverter write FUrlConverter;\r\n public\r\n function IsSimple: Boolean; override;\r\n property PropertyType: TXDataScalarType read FType write SetType;\r\n property TypeKind: TXTypeKind read GetTypeKind; // write SetTypeKind;\r\n\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 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 [JsonInclude(TInclusionMode.NonDefault)]\r\n TXDataNavigationProperty = class(TXDataProperty)\r\n strict private\r\n [JsonIgnore]\r\n FTarget: TXDataEntityType;\r\n private\r\n [JsonIgnore]\r\n FTargetRef: string;\r\n function GetTargetRef: string;\r\n public\r\n [JsonProperty('Target')]\r\n property TargetRef: string read GetTargetRef write FTargetRef;\r\n private\r\n procedure Prepare;\r\n public\r\n function IsSimple: Boolean; override;\r\n property Target: TXDataEntityType read FTarget write FTarget;\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 TXDataEntityCollectionType = class;\r\n TXDataEntitySet = class;\r\n TXDataSimplePropertyArray = array of TXDataSimpleProperty;\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 function FindDeclaredProperty(const AName: string): TXDataSimpleProperty;\r\n function FindDeclaredNavigationProperty(const AName: string): TXDataNavigationProperty;\r\n function GetSchema: TXDataSchema;\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 procedure SetSchema(Value: TXDataSchema);\r\n private\r\n property DefaultEntitySet: TXDataEntitySet read FDefaultEntitySet write FDefaultEntitySet;\r\n public\r\n function QualifiedName: string; override;\r\n function FindProperty(const AName: string): TXDataSimpleProperty;\r\n function FindNavigationProperty(const AName: string): TXDataNavigationProperty;\r\n function FindAnyProperty(const AName: string): TXDataProperty;\r\n function IsInheritedFrom(ABase: TXDataEntityType): boolean;\r\n function RootType: TXDataEntityType;\r\n function KeyScalarProperties: TXDataSimplePropertyArray;\r\n property Schema: TXDataSchema read GetSchema;\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 {$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 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 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 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 private\r\n [JsonIgnore]\r\n FTypeRef: string;\r\n function GetTypeRef: string;\r\n public\r\n [JsonProperty('Type')]\r\n property TypeRef: string read GetTypeRef write FTypeRef;\r\n private\r\n procedure Prepare;\r\n private\r\n [JsonIgnore]\r\n FUrlConverter: TXDataTypeConverter;\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 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 FUrlConverter write FUrlConverter;\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 FDefaultValue;\r\n property ParamType: TXDataType read FType write FType;\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 [JsonIgnore]\r\n FRemarks: string;\r\n [JsonIgnore]\r\n FRouteInfo: TXDataRouteInfo;\r\n {$IFDEF ISDELPHI}\r\n [JsonIgnore]\r\n FRttiMethod: TRttiMethod;\r\n procedure SetRttiMethod(ARttiMethod: TRttiMethod);\r\n {$ENDIF}\r\n function ParamCount(Binding: TBindingMode): Integer;\r\n function GetParam(Binding: TBindingMode; Index: Integer): TXDataParamDef;\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 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 function HasOutputParams: Boolean;\r\n {$IFDEF ISDELPHI}\r\n function ReturnType: TRttiType;\r\n property RttiMethod: TRttiMethod read FRttiMethod write SetRttiMethod;\r\n {$ENDIF}\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 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 {$IFDEF ISDELPHI}\r\n [JsonIgnore]\r\n FInterfaceType: PTypeInfo;\r\n {$ENDIF}\r\n [JsonIgnore]\r\n FTagName: string;\r\n function GetSchema: TXDataSchema;\r\n public\r\n property Schema: TXDataSchema read GetSchema;\r\n public\r\n {$IFDEF ISDELPHI}\r\n function InterfaceTypeName: string;\r\n property InterfaceType: PTypeInfo read FInterfaceType write FInterfaceType;\r\n {$ENDIF}\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 private\r\n procedure Prepare;\r\n public\r\n constructor Create; reintroduce;\r\n destructor Destroy; override;\r\n {$IFDEF ISDELPHI}\r\n function FindActionFromRttiMethod(const AMethodName: string): TXDataAction;\r\n {$ENDIF}\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 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 FindOrDefineConverter(AType: TXDataType): TXDataTypeConverter;\r\n strict private\r\n FEntityTypes: TXDataEntityTypeList;\r\n FEntityContainers: TXDataEntityContainerList;\r\n FEnumTypes: TXDataEnumTypeList;\r\n FControllers: TXDataControllerList;\r\n public\r\n constructor Create; reintroduce;\r\n destructor Destroy; override;\r\n function FindEntityType(const AName: string): TXDataEntityType;\r\n function FindEnumType(const AName: string): TXDataEnumType;\r\n function FindEnumMember(const AName: string): TXDataEnumMember;\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 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 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 protected\r\n function GetXDataType: TXDataScalarType; virtual; abstract;\r\n function TryValueToUrl(const Value: TValue; out Literal: string; Prop: TXDataSimpleProperty): boolean; virtual;\r\n function TryUrlToValue(const Literal: string; out Value: TValue; Prop: TXDataSimpleProperty): boolean; virtual;\r\n public\r\n function ValueToUrl(const Value: TValue; Prop: TXDataSimpleProperty): string;\r\n function UrlToValue(const Literal: string; Prop: TXDataSimpleProperty): 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(Prop: TXDataSimpleProperty; Value: TValue); reintroduce;\r\n end;\r\n EConvertFromUrlError = class(Exception)\r\n public\r\n constructor Create(const Prop: TXDataSimpleProperty; const 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;\r\n Prop: TXDataSimpleProperty): TValue;\r\nbegin\r\n if not TryUrlToValue(Literal, Result, Prop) then\r\n raise EConvertFromUrlError.Create(Prop, Literal);\r\nend;\r\n\r\nfunction TXDataTypeConverter.TryUrlToValue(const Literal: string;\r\n out Value: TValue; Prop: TXDataSimpleProperty): boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n\r\nfunction TXDataTypeConverter.TryValueToUrl(const Value: TValue;\r\n out Literal: string; Prop: TXDataSimpleProperty): boolean;\r\nbegin\r\n Result := false;\r\nend;\r\n\r\nfunction TXDataTypeConverter.ValueToUrl(const Value: TValue;\r\n Prop: TXDataSimpleProperty): 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, Prop) then\r\n raise EConvertToUrlError.Create(Prop, Value);\r\n end;\r\nend;\r\n\r\n{ EConvertToUrlError }\r\n\r\nconstructor EConvertToUrlError.Create(\r\n Prop: TXDataSimpleProperty; Value: TValue);\r\nbegin\r\n inherited CreateFmt('Cannot serialize value \"%s\" to Url format',\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(\r\n const Prop: TXDataSimpleProperty; const Literal: string);\r\nbegin\r\n inherited CreateFmt('Cannot deserialize value \"%s\" from Url format',\r\n [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 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 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 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 Wrapper, SubType: string;\r\n I: Integer;\r\nbegin\r\n // Check if it's a collection type\r\n if TXDataUtils.GetNameAndKey(AName, Wrapper, SubType) and\r\n (Wrapper = 'Collection') then\r\n begin\r\n EntityType := FindEntityType(SubType);\r\n Result := EntityType.Collection;\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\nbegin\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\nend;\r\n\r\nfunction TXDataSchema.FindOrDefineConverter(\r\n AType: TXDataType): TXDataTypeConverter;\r\nbegin\r\n if AType = nil then Exit(nil);\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.GetModel: TXDataModel;\r\nbegin\r\n Result := TXDataModel(inherited Parent);\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: TXDataEntityType;\r\nbegin\r\n Result := TXDataEntityType(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.FindAnyProperty(const AName: string): TXDataProperty;\r\nbegin\r\n Result := FindProperty(AName);\r\n if Result = nil then\r\n Result := FindNavigationProperty(AName);\r\nend;\r\n\r\nfunction TXDataEntityType.FindDeclaredNavigationProperty(\r\n const AName: string): TXDataNavigationProperty;\r\nvar\r\n Prop: TXDataNavigationProperty;\r\n I: Integer;\r\nbegin\r\n for I := 0 to NavigationProperties.Count - 1 do\r\n begin\r\n Prop := NavigationProperties[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 TXDataEntityType.FindDeclaredProperty(\r\n const AName: string): TXDataSimpleProperty;\r\nvar\r\n Prop: TXDataSimpleProperty;\r\n I: Integer;\r\nbegin\r\n for I := 0 to Properties.Count - 1 do\r\n begin\r\n Prop := Properties[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 TXDataEntityType.FindNavigationProperty(const AName: string): TXDataNavigationProperty;\r\nbegin\r\n Result := FindDeclaredNavigationProperty(AName);\r\n if (Result = nil) and (BaseType <> nil) then\r\n Result := BaseType.FindNavigationProperty(AName);\r\nend;\r\n\r\nfunction TXDataEntityType.FindProperty(const AName: string): TXDataSimpleProperty;\r\nbegin\r\n Result := FindDeclaredProperty(AName);\r\n if (Result = nil) and (BaseType <> nil) then\r\n Result := BaseType.FindProperty(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.SetSchema(Self.Schema);\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.GetSchema: TXDataSchema;\r\nbegin\r\n Result := TXDataSchema(inherited Parent);\r\nend;\r\n\r\n//function TXDataEntityType.GetOpenType: boolean;\r\n//begin\r\n// if (BaseType <> nil) then\r\n// Result := BaseType.OpenType\r\n// else\r\n// Result := FOpenType;\r\n//end;\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.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.SetSchema(Value: TXDataSchema);\r\nbegin\r\n inherited Parent := Value;\r\n if FCollection <> nil then\r\n FCollection.SetSchema(Value);\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\n{ TXDataSimpleProperty }\r\n\r\nfunction TXDataSimpleProperty.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 TXDataSimpleProperty.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 TXDataSimpleProperty.IsSimple: Boolean;\r\nbegin\r\n Result := True;\r\nend;\r\n\r\nprocedure TXDataSimpleProperty.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\nprocedure TXDataSimpleProperty.Prepare;\r\nbegin\r\n // Resolve type reference\r\n if FTypeRef <> '' then\r\n begin\r\n PropertyType := Parent.Schema.FindEnumType(FTypeRef);\r\n if PropertyType = nil then\r\n PropertyType := TXDataPrimitiveTypes.Instance.Find(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 UrlConverter := Parent.Schema.FindOrDefineConverter(PropertyType);\r\n if UrlConverter = nil then\r\n raise EUrlConverterNotFound.Create(PropertyType);\r\nend;\r\n\r\n//procedure TXDataSimpleProperty.SetTypeKind(const Value: TOTypeKind);\r\n//begin\r\n// raise ECannotSetTypeKind.Create(Self, Value);\r\n//end;\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 := '2.0';\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.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 SchemaIndex: Integer;\r\n ContainerIndex: Integer;\r\n EntitySetIndex: Integer;\r\n EntityTypeIndex: Integer;\r\n ControllerIndex: Integer;\r\n Controller: TXDataController;\r\nbegin\r\n for SchemaIndex := 0 to Schemas.Count - 1 do\r\n begin\r\n Schema := Schemas[SchemaIndex];\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 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 nil\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 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, nil)\r\n else\r\n begin\r\n // complex predicate (composite or using associations)\r\n KeyProps := AType.KeyScalarProperties;\r\n if not (TValue_IsArray(Id) and (TValue_GetArrayLength(Id) = Length(KeyProps))) then\r\n raise ECannotBuildKeyPredicateWrongValueLength.Create(AType);\r\n\r\n for I := 0 to Length(KeyProps) - 1 do\r\n begin\r\n Value := TValue_GetArrayElement(Id, I);\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, nil);\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.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 // 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 TValue_IsEmpty(Parameters[I].DefaultValue) 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\n{$IFDEF ISDELPHI}\r\nfunction TXDataAction.ReturnType: TRttiType;\r\nbegin\r\n if (FRttiMethod <> nil) then\r\n Result := FRttiMethod.ReturnType\r\n else\r\n Result := nil;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF ISDELPHI}\r\nprocedure TXDataAction.SetRttiMethod(ARttiMethod: TRttiMethod);\r\nvar\r\n IsSingleResult: Boolean;\r\nbegin\r\n FRttiMethod := ARttiMethod;\r\n\r\n IsSingleResult := (ReturnType <> nil) and not HasOutputParams;\r\n FIsResultSingleObject := IsSingleResult and ReturnType.IsInstance;\r\n FIsResultStream := IsSingleResult and (ReturnType.Handle = TypeInfo(TStream));\r\n FIsResultCriteria := IsSingleResult and (ReturnType.QualifiedName = 'Aurelius.Criteria.Base.TCriteria');\r\n\r\n FOperationId := '';\r\n if Assigned(RttiMethod.Parent) then\r\n FOperationId := RttiMethod.Parent.Name + '.';\r\n FOperationId := FOperationId + RttiMethod.Name;\r\nend;\r\n{$ENDIF}\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\n{ TXDataParamDef }\r\n\r\nfunction TXDataParamDef.GetParent: TXDataAction;\r\nbegin\r\n Result := TXDataAction(inherited Parent);\r\nend;\r\n\r\nfunction TXDataParamDef.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 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.FindEnumType(FTypeRef);\r\n if ParamType = nil then\r\n ParamType := TXDataPrimitiveTypes.Instance.Find(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\r\n // Find the type converter for the param def\r\n if (BindingMode in [TBindingMode.FromURI, TBindingMode.FromPath]) then\r\n begin\r\n UrlConverter := Parent.Controller.Schema.FindOrDefineConverter(ParamType);\r\n if UrlConverter = nil then\r\n raise EFromURIBindingNotSupported.Create(Self);\r\n end;\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\n{$IFDEF ISDELPHI}\r\nfunction TXDataController.FindActionFromRttiMethod(const AMethodName: string): TXDataAction;\r\nvar\r\n Action: TXDataAction;\r\nbegin\r\n for Action in Self.Actions do\r\n if SameText(Action.RttiMethod.Name, AMethodName) then\r\n Exit(Action);\r\n Result := nil;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF ISDELPHI}\r\nfunction TXDataController.InterfaceTypeName: string;\r\nbegin\r\n Result := GetTypeName_(InterfaceType);\r\nend;\r\n{$ENDIF}\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.GetTargetRef: string;\r\nbegin\r\n if FTarget <> nil then\r\n Result := FTarget.Name\r\n else\r\n Result := FTargetRef;\r\nend;\r\n\r\nfunction TXDataNavigationProperty.IsSimple: Boolean;\r\nbegin\r\n Result := False;\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{ 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 FConverterMap := TStringMap.Create(True);\r\n AddDefaultUrlConverters(Self);\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\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 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 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 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 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 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.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.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 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 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 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 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 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 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.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.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 ReadSimpleProperty(SimpleProperty: TXDataSimpleProperty; JObj: TJObject);\r\n procedure ReadNavigationProperty(NavigationProperty: TXDataNavigationProperty; 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\nvar\r\n Key: string;\r\n Keys: TStringDynArray;\r\n KeyIndex: Integer;\r\nbegin\r\n ReadProperty(NavigationProperty, 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 NavigationProperty.TargetRef := JToStr(JObj[Key]);\r\n end;\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 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 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.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 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.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 = '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\nvar\r\n Key: string;\r\n Keys: TStringDynArray;\r\n KeyIndex: Integer;\r\nbegin\r\n ReadProperty(SimpleProperty, 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 SimpleProperty.Length := JToInt(JObj[Key])\r\n else\r\n if Key = 'Precision' then\r\n SimpleProperty.Precision := JToInt(JObj[Key])\r\n else\r\n if Key = 'Scale' then\r\n SimpleProperty.Scale := JToInt(JObj[Key])\r\n else\r\n if Key = 'Type' then\r\n SimpleProperty.TypeRef := 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\ninterface\r\n\r\nuses\r\n Types, Classes, SysUtils, Web,\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\r\n TXDataWebConnectionRequest = class\r\n strict private\r\n FRequest: IHttpRequest;\r\n FConnection: TXDataWebConnection;\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 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 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 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 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 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 procedure Close;\r\n procedure Loaded; override;\r\n procedure EndUpdate; 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\nimplementation\r\n\r\nuses\r\n Bcl.Utils, JS,\r\n XData.Model.Deserializer;\r\n\r\nprocedure InternalSendRequest(Req: IHttpRequest; SuccessProc: THttpResponseProc;\r\n ErrorProc: THttpErrorProc = 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;\r\n begin\r\n if Assigned(ErrorProc) then\r\n ErrorProc();\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 not Js.IsNull(Req.Content) then\r\n Xhr.send(Req.Content)\r\n else\r\n Xhr.send;\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\nprocedure TXDataWebConnection.EndUpdate;\r\nbegin\r\n inherited;\r\n Loaded;\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\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 begin\r\n if Assigned(FOnResponse) then\r\n begin\r\n ResponseArgs := TXDataWebConnectionResponse.Create(Self, Request, Response);\r\n try\r\n FOnResponse(ResponseArgs);\r\n Response := ResponseArgs.Response;\r\n finally\r\n ResponseArgs.Free;\r\n end;\r\n end;\r\n\r\n SuccessProc(Response);\r\n end;\r\n\r\nvar\r\n RequestArgs: TXDataWebConnectionRequest;\r\nbegin\r\n if Assigned(FOnRequest) then\r\n begin\r\n RequestArgs := TXDataWebConnectionRequest.Create(Self, Request);\r\n try\r\n FOnRequest(RequestArgs);\r\n finally\r\n RequestArgs.Free;\r\n end;\r\n end;\r\n\r\n InternalSendRequest(Request, @LocalSuccess, ErrorProc);\r\nend;\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\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 Info: TTypeInfo;\r\n UrlConverter: TXDataTypeConverter): string;\r\n\r\nimplementation\r\n\r\nfunction BindValueToUrl(const Value: JSValue; const Info: TTypeInfo;\r\n UrlConverter: TXDataTypeConverter): string;\r\nbegin\r\n Result := UrlConverter.ValueToUrl(Value, nil);\r\nend;\r\n\r\nend.\r\n","unit XData.Web.Client;\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\r\n 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);\r\n procedure DoError(Response: IHttpResponse; RequestUrl, RequestId: string;\r\n ErrorMessage: string; ErrorProc: TXDataClientErrorProc);\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); overload;\r\n procedure InternalPut(const EntitySet: string; Entity: TJObject; const RequestId: string;\r\n SuccessProc: TXDataClientLoadProc; ErrorProc: TXDataClientErrorProc); overload;\r\n procedure InternalPost(const EntitySet: string; Entity: TJObject; const RequestId: string;\r\n SuccessProc: TXDataClientLoadProc; ErrorProc: TXDataClientErrorProc); overload;\r\n procedure InternalDelete(const EntitySet: string; Entity: TJObject; const RequestId: string;\r\n SuccessProc: TXDataClientLoadProc; ErrorProc: TXDataClientErrorProc); overload;\r\n procedure InternalList(const EntitySet: string; const Query: string; const RequestId: string;\r\n SuccessProc: TXDataClientLoadProc; ErrorProc: TXDataClientErrorProc); overload;\r\n procedure InternalRawInvoke(const OperationId: string; Args: array of JSValue;\r\n RequestId: string; SuccessProc: TXDataClientLoadProc; ErrorProc: TXDataClientErrorProc); overload;\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 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 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 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 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 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// 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 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): 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 TransformParam(Param: TXDataParamDef; var Value: JSValue);\r\n public\r\n constructor Create(AClient: TXDataWebClient; AAction: TXDataAction;\r\n ASuccessProc: TXDataClientLoadProc; AErrorProc: TXDataClientErrorProc); reintroduce;\r\n procedure Execute(const Args: array of JSValue);\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\nprocedure TXDataWebClient.DoError(Response: IHttpResponse; RequestUrl, RequestId: string;\r\n ErrorMessage: string; ErrorProc: TXDataClientErrorProc);\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 if Assigned(ErrorProc) then\r\n ErrorProc(ClientError)\r\n else\r\n if Assigned(FOnError) then\r\n FOnError(ClientError)\r\n else\r\n raise EXDataClientRequestException.Create(ClientError);\r\nend;\r\n\r\nprocedure TXDataWebClient.DoLoad(Response: TXDataClientResponse;\r\n SuccessProc: TXDataClientLoadProc);\r\nbegin\r\n try\r\n case ReferenceSolvingMode of\r\n rsAll: SolveReferences(Response.Result);\r\n end;\r\n\r\n\r\n if Assigned(SuccessProc) then\r\n SuccessProc(Response)\r\n else\r\n if Assigned(FOnLoad) then\r\n FOnLoad(Response);\r\n finally\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);\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)\r\n else\r\n DoError(Resp, RequestUri, RequestId, '', ErrorProc);\r\n end;\r\n\r\n procedure LocalError;\r\n begin\r\n DoError(nil, RequestUri, RequestId, '', ErrorProc);\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);\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)\r\n else\r\n DoError(Resp, RequestUri, RequestId, 'Invalid JSON object from GET request', ErrorProc);\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)\r\n else\r\n DoError(Resp, RequestUri, RequestId, '', ErrorProc);\r\n end;\r\n\r\n procedure LocalError;\r\n begin\r\n DoError(nil, RequestUri, RequestId, '', ErrorProc);\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);\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);\r\n end\r\n else\r\n DoError(Resp, RequestUri, RequestId, 'Invalid JSON array from LIST request', ErrorProc);\r\n end\r\n else\r\n DoError(Resp, RequestUri, RequestId, '', ErrorProc);\r\n end;\r\n\r\n procedure LocalError;\r\n begin\r\n DoError(nil, RequestUri, RequestId, '', ErrorProc);\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);\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);\r\n end\r\n else\r\n DoError(Resp, RequestUri, RequestId, '', ErrorProc);\r\n end;\r\n\r\n procedure LocalError;\r\n begin\r\n DoError(nil, RequestUri, RequestId, '', ErrorProc);\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);\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)\r\n else\r\n DoError(Resp, RequestUri, RequestId, '', ErrorProc);\r\n end;\r\n\r\n procedure LocalError;\r\n begin\r\n DoError(nil, RequestUri, RequestId, '', ErrorProc);\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; RequestId: string;\r\n SuccessProc: TXDataClientLoadProc; ErrorProc: TXDataClientErrorProc);\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);\r\n Invoker.RequestId := RequestId;\r\n Invoker.Execute(Args);\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\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\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; 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\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\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{ 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], 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): string;\r\nvar\r\n QueryString: string;\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 := '';\r\n for I := 0 to Action.Parameters.Count - 1 do\r\n if Action.Parameters[I].BindingMode = TBindingMode.FromURI 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 QueryString <> '' then\r\n QueryString := QueryString + '&';\r\n QueryString := QueryString +\r\n TBclUtils.PercentEncode(Param.Name) +\r\n '=' +\r\n TBclUtils.PercentEncode(\r\n BindValueToUrl(Args[I], nil {Param.RttiType.Handle}, Param.UrlConverter)\r\n );\r\n end;\r\n end;\r\n if QueryString <> '' then\r\n QueryString := '?' + QueryString;\r\n\r\n Result := QueryString;\r\nend;\r\n\r\nconstructor TXDataWebInvoker.Create(AClient: TXDataWebClient; AAction: TXDataAction;\r\n ASuccessProc: TXDataClientLoadProc; AErrorProc: TXDataClientErrorProc);\r\nbegin\r\n FClient := AClient;\r\n FAction := AAction;\r\n FSuccessProc := ASuccessProc;\r\n FErrorProc := AErrorProc;\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);\r\nend;\r\n\r\nprocedure TXDataWebInvoker.DoLoad(Response: TXDataClientResponse);\r\nbegin\r\n FClient.DoLoad(Response, FSuccessProc);\r\nend;\r\n\r\nprocedure TXDataWebInvoker.Execute(const Args: array of JSValue);\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.ContentAsText; //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 JsonResult := TJSJSON.parse(Resp.ContentAsText)\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);\r\n RequestUrl := BuildUrlRoute(Args);\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.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 // 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 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.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","{********************************************************************}\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","{********************************************************************}\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.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 = 1; // 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\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 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 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 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\nconstructor TTMSFNCCustomDigitalTimeSelector.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 := 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 FStartTime := StrToTime('00:00:00');\r\n FEndTime := StrToTime('23:59:59');\r\n FSelectedTime := FStartTime;\r\n FFirst := FStartTime;\r\n FTimeFormat := 'hh:nn:ss';\r\n AddTimes;\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 := 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 + 4, GetTopOffset / 2);\r\n AGraphics.DrawLine(p, PointF(r.Right - 4, r.Top));\r\n AGraphics.DrawLine(p, PointF(r.Right - 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 - 4, GetTopOffset / 2);\r\n AGraphics.DrawLine(p, PointF(r.Left + 4, r.Top));\r\n AGraphics.DrawLine(p, PointF(r.Left + 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, -4, -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\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.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 - 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.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 = 1; // Release nr.\r\n BLD_VER = 4; // 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\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 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 SetFont(const Value: TTMSFNCGraphicsFont);\r\n protected\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 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 SetFont;\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 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 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 ;\r\n\r\ntype\r\n TCustomEditProtected = class(TCustomEdit);\r\n\r\n{ TTMSFNCCustomDigitalTimePicker }\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 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.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.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.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.SetFont(\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 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","unit libjquery;\r\n\r\n{$mode objfpc}\r\n{$modeswitch externalclass}\r\n\r\ninterface\r\n\r\nuses js, web;\r\n\r\nType\r\n TJQueryTopLeft = record\r\n top,left : integer;\r\n end;\r\n\r\n TJQuery = class;\r\n\r\n TCallback = Procedure (args : JSValue);\r\n TCallbackEvent = Procedure (args : JSValue) of object;\r\n\r\n TCallbacks = class external name 'Callbacks'\r\n Public\r\n function add(aCallBack : TCallBack) : TCallbacks;\r\n function add(aCallBack : Array of TCallBack) : TCallbacks;\r\n function add(aCallBack : TCallBackEvent) : TCallbacks;\r\n function add(aCallBack : Array of TCallBackEvent) : TCallbacks;\r\n function disable : TCallBacks;\r\n function disabled : Boolean;\r\n function empty : TCallBacks;\r\n function fire(arguments : JSValue) : TCallbacks; varargs;\r\n function fired : Boolean;\r\n function fireWith(context : JSValue; arguments : JSValue) : TCallbacks;\r\n function has(aCallBack : TCallBack) : Boolean;\r\n function has(aCallBack : TCallBackEvent) : Boolean;\r\n function lock : TCallBacks;\r\n function locked : boolean;\r\n function remove(aCallBack : TCallBack) : TCallbacks;\r\n function remove(aCallBack : Array of TCallBack) : TCallbacks;\r\n function remove(aCallBack : TCallBackEvent) : TCallbacks;\r\n function remove(aCallBack : Array of TCallBackEvent) : TCallbacks;\r\n end;\r\n\r\n { TJQuery }\r\n\r\n TJQueryAddClassHandler = Reference to Function (aIndex : Integer; AClass : String) : String;\r\n TJQueryAttrHandler = Reference to Function (aIndex : Integer; aAttr : String) : JSValue;\r\n TJQueryCSSHandler = Reference to Function (aIndex : Integer; AClass : String) : JSValue ;\r\n TJQueryEachHandler = Reference to Function (aIndex : Integer; AElement : TJSElement) : Boolean;\r\n TJQueryFilterHandler = Reference to Function (aIndex : Integer; AElement : TJSElement) : Boolean;\r\n TJQueryHeightHandler = Reference to Function (aIndex : Integer; AHeight : jsValue) : JSValue ;\r\n TJQueryHTMLHandler = Reference to Function(aIndex : Integer; aHTML : String) : String;\r\n TJQueryMapHandler = Reference to Function (aIndex : Integer; AElement : TJSElement) : TJSObject;\r\n TJQueryOffsetHandler = Reference to Function (aIndex : Integer; aCoords : TJQueryTopLeft) : TJQueryTopLeft;\r\n TJQueryPropHandler = Reference to Function(aIndex : Integer; oldProp : JSValue) : JSValue;\r\n TJQueryQueueHandler = Reference to procedure;\r\n TJQueryTextHandler = Reference to Function(aIndex : Integer; aString : String) : String;\r\n TJQueryToggleClassHandler = Reference to Function(aIndex : Integer; aClassName : string; AState : Boolean) : String;\r\n TJQueryValHandler = Reference to Function(aIndex :integer; aValue : String) : String;\r\n TJQueryWidthHandler = Reference to Function (aIndex : Integer; AHeight : jsValue) : JSValue ;\r\n\r\n TJQueryDeQueueFunction = Reference to Procedure;\r\n TJQueryAddQueueHandler = Reference to Procedure (aFunc : TJQueryDeQueueFunction);\r\n\r\n TAjaxEvent = class external name 'AjaxEvent' (TJSEvent);\r\n\r\n TDeferredDoneHandler = reference to function : Boolean;\r\n\r\n TJQueryDeferred = class external name 'Deferred' (TJSObject)\r\n Public\r\n Function done(aHandler :TDeferredDoneHandler) : TJQueryDeferred; overload;\r\n Function done(aHandlers : Array of TDeferredDoneHandler) : TJQueryDeferred; overload;\r\n end;\r\n\r\n TJQXHR = class;\r\n\r\n TJQXHRDoneHandler = reference to function(aData : jsValue; textStatus : String; aJQXHR : TJQXHR) : boolean;\r\n TJQXHRFailHandler = reference to function(aJQXHR : TJQXHR; textStatus : String; AErrorThrown : jsValue) : boolean;\r\n TJQXHRAlwaysHandler = reference to function(arg1 : TJSObject; textStatus : String; arg2 : TJSObject) : boolean;\r\n\r\n TJQXHR = class external name 'jqXHR' (TJQueryDeferred)\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 FresponseXML: TJSDocument; external name 'responseXML';\r\n //FUpload: TJSXMLHttpRequestUpload; external name 'upload';\r\n FStatus : NativeInt; external name 'status';\r\n FStatusText : String; external name 'statustext';\r\n public\r\n function getResponseHeader(aName : string) : String;\r\n function getAllResponseHeaders : String;\r\n procedure overrideMimeType(aType : String);\r\n procedure setRequestHeader(aName, AValue : string);\r\n procedure done(aHandler : TJQXHRDoneHandler); overload;\r\n procedure always(aHandler : TJQXHRAlwaysHandler); overload;\r\n procedure fail(aHandler : TJQXHRFailHandler); overload;\r\n procedure _then(aSuccess : TJQXHRDoneHandler; aFail : TJQXHRFailHandler); overload;\r\n procedure abort;\r\n procedure abort(AStatusText : String);\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 responseText : string read FResponseText;\r\n property status : NativeInt read FStatus;\r\n property statusText : string read FStatusText;\r\n end;\r\n\r\n TJSAjaxSettings = class;\r\n\r\n TJQueryAjaxSettingsHandler = Reference to Function (aHXR : TJQXHR; aOptions : TJSAjaxSettings) : Boolean;\r\n TJQueryAjaxSettingsDataFilter = Reference to function (aData: String; aType : string) : JSValue;\r\n TJQueryAjaxSettingsErrorHandler = Reference to Function (aHXR : TJQXHR; aOptions : TJSAjaxSettings; aStatus, aError : String) : Boolean;\r\n TJQueryAjaxSettingsSuccessHandler = Reference to Function (data : JSValue; aStatus : String; aHXR : TJQXHR) : Boolean;\r\n TJQueryAjaxSettsingsXHRHandler = reference to function : JSValue;\r\n\r\n TJSAjaxSettings = class external name 'Object' (TJSObject)\r\n accepts : TJSObject;\r\n async : boolean;\r\n beforeSend : TJQueryAjaxSettingsHandler;\r\n cache : boolean;\r\n complete : TJQueryAjaxSettingsHandler;\r\n contents : TJSObject;\r\n contentType : String;\r\n context : TJSObject;\r\n converters : TJSObject;\r\n crossDomain : boolean;\r\n data : JSValue;\r\n dataFilter : TJQueryAjaxSettingsDataFilter;\r\n dataType : String;\r\n error : TJQueryAjaxSettingsErrorHandler;\r\n global: boolean;\r\n headers : TJSObject;\r\n ifModified : Boolean;\r\n isLocal : Boolean;\r\n json : String;\r\n jsonpCallback : String;\r\n method : string;\r\n mimeType : string;\r\n password : string;\r\n processData : Boolean;\r\n scriptCharset : String;\r\n statusCode : TJSObject;\r\n success : TJQueryAjaxSettingsSuccessHandler;\r\n timeout : NativeInt;\r\n traditional : boolean;\r\n url : string;\r\n username : string;\r\n xhr : TJQueryAjaxSettsingsXHRHandler;\r\n xhrFields : TJSObject;\r\n end;\r\n\r\n TJQueryAjaxTransportCompleteHandler = function (aStatus : NativeInt; aStatusText : string; responses, Headers : TJSObject) : Boolean;\r\n TJQueryAjaxTransportSendHandler = reference to function(headers: TJSObject; onComplete : TJQueryAjaxTransportCompleteHandler) : boolean;\r\n TJQueryAjaxTransportAbortHandler = reference to function () : Boolean;\r\n TJQueryAjaxTransport = record\r\n send : TJQueryAjaxTransportSendHandler;\r\n abort : TJQueryAjaxTransportAbortHandler;\r\n end;\r\n\r\n TJQueryAjaxTransportHandler = reference to Function (aOptions,aOriginalOptions : TJSObject; aXHR : TJQXHR) : TJQueryAjaxTransport;\r\n TJQueryAjaxPrefilterHandler = reference to procedure (aOptions,aOriginalOptions : TJSObject; aXHR : TJQXHR);\r\n TJQueryAjaxEventHandler = Reference to Function (aEvent : TAjaxEvent; aHXR : TJQXHR; aOptions : TJSAjaxSettings) : Boolean;\r\n TJQueryAjaxErrorHandler = Reference to Function (aEvent : TAjaxEvent; aHXR : TJQXHR; aOptions : TJSAjaxSettings; aError : String) : Boolean;\r\n TJQueryAjaxSuccessHandler = Reference to function (aData : TJSObject; aStatus : String; aXHR : TJQXHR) : Boolean;\r\n TJQueryAjaxLoadHandler = Reference to function (aResponseText,aStatus : String; aXHR : TJQXHR) : Boolean;\r\n TJQueryAjaxScriptHandler = Reference to function (aScript,aStatus : String; aXHR : TJQXHR) : Boolean;\r\n TJQueryAjaxHandler = Reference to procedure;\r\n TPrependCallback = reference to Function(elementOfArray : NativeInt; Html : String) : JSValue;\r\n\r\n TJQuery = class external name 'jQuery' (TJSObject)\r\n private\r\n FCSSHooks: TJSObject; external name 'cssHooks';\r\n FCSSNumber: TJSObject; external name 'cssNumber';\r\n FReady: TJSPromise; external name 'ready';\r\n function getEl(aIndex : Integer) : TJSElement; external name 'get';\r\n Public\r\n function add(Const aSelector : String) : TJQuery;overload;\r\n function add(Const aSelector : String; AContext : TJSElement) : TJQuery;overload;\r\n function add(Const aElement : TJSElement) : TJQuery;overload;\r\n function add(Const aElement : Array of TJSElement) : TJQuery;overload;\r\n function add(Const aQuery : TJQuery) : TJQuery;overload;\r\n function addBack(Const aSelector : String) : TJQuery;overload;\r\n function addBack : TJQuery;overload;\r\n function addClass(Const aClass : String) : TJQuery;overload;\r\n function addClass(Const aClassFunction : TJQueryAddClassHandler) : TJQuery; overload;\r\n function ajaxComplete(aHandler : TJQueryAjaxEventHandler) : TJQuery;\r\n function ajaxError(aHandler : TJQueryAjaxEventHandler) : TJQuery;\r\n function ajaxSend(aHandler : TJQueryAjaxEventHandler) : TJQuery;\r\n function ajaxStart(aHandler : TJQueryAjaxHandler) : TJQuery;\r\n function ajaxStop(aHandler : TJQueryAjaxHandler) : TJQuery;\r\n function ajaxSuccess(aHandler : TJQueryAjaxEventHandler) : TJQuery;\r\n class function ajax(aURL : String; aSettings : TJSObject) : tJQXHR; overload;\r\n class function ajax(aSettings : TJSObject) : tJQXHR; overload;\r\n class function ajax(aSettings : TJSAjaxSettings) : tJQXHR; overload;\r\n class procedure ajaxPrefilter(dataTypes : string; aHandler : TJQueryAjaxPrefilterHandler);overload;\r\n class procedure ajaxSetup(aSettings : TJSAjaxSettings); overload;\r\n class procedure ajaxSetup(aSettings : TJSObject); overload;\r\n class procedure ajaxTransport(aDataType : string; AHandler : TJQueryAjaxTransportHandler);\r\n\r\n function attr(Const attributeName : string) : string;overload;\r\n function attr(Const attributeName : string; Const Value : String) : TJQuery;overload;\r\n function attr(Const attributes : TJSObject) : TJQuery;overload;\r\n function attr(Const attributeName : string; aHandler : TJQueryAttrHandler) : TJQuery;overload;\r\n class function Callbacks : TCallbacks;overload;\r\n class function Callbacks(const aFlags : string) : TCallbacks;overload;\r\n function children(Const aSelector : String) : TJQuery;overload;\r\n function children : TJQuery;overload;\r\n function clearQueue : TJQuery;overload;\r\n function clearQueue(const aQueueName : String) : TJQuery;overload;\r\n function click : TJQuery; overload;\r\n function click (aHandler : TJSRawEventHandler) : TJQuery; overload;\r\n function click (aHandler : TJSEventHandler) : TJQuery; overload;\r\n function click (aData : TJSObject; aHandler : TJSEventHandler) : TJQuery; overload;\r\n function click (aData : TJSObject; aHandler : TJSRawEventHandler) : TJQuery; overload;\r\n function closest(Const aSelector : String) : TJQuery;overload;\r\n function closest(Const aSelector : String; AContext : TJSElement) : TJQuery;overload;\r\n function closest(Const aQuery : TJQuery) : TJQuery;overload;\r\n function closest(Const aElement : TJSElement) : TJQuery;overload;\r\n function contents : TJQuery;\r\n function css(Const aPropertyName : TJSObject) : string; overload;\r\n function css(Const aPropertyName : String) : string; overload;\r\n function css(Const aPropertyNames : Array of String) : string;overload;\r\n function css(Const aPropertyName, Avalue : String) : TJQuery;overload;\r\n function css(Const aPropertyName : String; Avalue : Integer) : TJQuery;overload;\r\n function css(Const aPropertyName : String; AHandler : TJQueryCSSHandler) : TJQuery;overload;\r\n class function data(aElement : TJSElement; const aKey : String; aValue : jsValue) : TJSObject;overload;\r\n class function data(aElement : TJSElement; const aKey : String) : TJSObject;overload;\r\n class function data(aElement : TJSElement) : TJSObject;overload;\r\n function data(aKey : String; aValue : JSValue) : TJQuery;overload;\r\n function data(aObj : TJSObject) : TJQuery;overload;\r\n function data(aKey : String) : TJSObject;overload;\r\n function data : TJSObject;overload;\r\n function dequeue : TJQuery;overload;\r\n function dequeue(const aQueueName : String) : TJQuery;overload;\r\n class function dequeue(aElement : TJSElement) : TJQuery;overload;\r\n class function dequeue(aElement : TJSElement; const aQueueName : String) : TJQuery;overload;\r\n function _end : TJQuery; external name 'end';\r\n function eq(AIndex : Integer) : TJQuery;\r\n function each(aHandler : TJQueryEachHandler) : TJQuery;\r\n class function escapeSelector(const S : String) : String;\r\n function filter(Const aSelector : String) : TJQuery;overload;\r\n function filter(aHandler : TJQueryFilterHandler) : TJQuery;overload;\r\n function filter(Const aQuery : TJQuery) : TJQuery;overload;\r\n function filter(Const aElement : TJSElement) : TJQuery;overload;\r\n function filter(Const aElements : Array of TJSElement) : TJQuery;overload;\r\n function find(Const aSelector : String) : TJQuery;overload;\r\n function find(Const aQuery : TJQuery) : TJQuery;overload;\r\n function find(Const aElement : TJSElement) : TJQuery;overload;\r\n function first : TJQuery;\r\n function get(aIndex : Integer) : TJSElement;overload;\r\n class function get : TJQXHR;overload;\r\n class function get(url : String) : TJQXHR;overload;\r\n class function get(url,Data : String) : TJQXHR;overload;\r\n class function get(url : String; Data : TJSObject) : TJQXHR;overload;\r\n class function get(url : String; Data : TJSObject; success : TJQueryAjaxSuccessHandler) : TJQXHR;overload;\r\n class function get(url,Data : String; success : TJQueryAjaxSuccessHandler) : TJQXHR;overload;\r\n class function get(url : String; Data : TJSObject; success : TJQueryAjaxSuccessHandler; aDataType : string) : TJQXHR;overload;\r\n class function get(url,Data : String; success : TJQueryAjaxSuccessHandler; aDataType : string) : TJQXHR;overload;\r\n class function get(aSettings : TJSAjaxSettings) : TJQXHR; overload;\r\n class function get(aSettings : TJSObject) : TJQXHR; overload;\r\n\r\n class function getJSON(url : String) : TJQXHR;overload;\r\n class function getJSON(url,Data : String) : TJQXHR;overload;\r\n class function getJSON(url : String; Data : TJSObject) : TJQXHR;overload;\r\n class function getJSON(url : String; Data : TJSObject; success : TJQueryAjaxSuccessHandler) : TJQXHR;overload;\r\n class function getJSON(url,Data : String; success : TJQueryAjaxSuccessHandler) : TJQXHR;overload;\r\n class function getJSON(url : String; Data : TJSObject; success : TJQueryAjaxSuccessHandler; aDataType : string) : TJQXHR;overload;\r\n class function getJSON(url,Data : String; success : TJQueryAjaxSuccessHandler; aDataType : string) : TJQXHR;overload;\r\n\r\n class function getScript(url : String) : TJQXHR;overload;\r\n class function getScript(url : String; aSuccess : TJQueryAjaxScriptHandler) : TJQXHR;overload;\r\n\r\n function has(Const aSelector : String) : TJQuery;\r\n function has(Const aQuery : TJQuery) : TJQuery;\r\n function hasClass(Const aClassName : String) : Boolean;\r\n class function hasData(aElement : TJSElement) : Boolean;\r\n function height: Integer;\r\n function height(aValue: Integer) : TJQuery;\r\n function height(aValue: String) : TJQuery;\r\n function height(aHandler: TJQueryHeightHandler) : TJQuery;\r\n function html : String;\r\n function html(Const aHTML : String) : TJQuery;\r\n function html(Const aHandler : TJQueryHTMLHandler) : TJQuery;\r\n function innerHeight: Integer;\r\n function innerHeight(aValue: Integer) : TJQuery;\r\n function innerHeight(aValue: String) : TJQuery;\r\n function innerHeight(aHandler: TJQueryHeightHandler) : TJQuery;\r\n function innerWidth: Integer;\r\n function innerWidth(aValue: Integer) : TJQuery;\r\n function innerWidth(aValue: String) : TJQuery;\r\n function innerWidth(aHandler: TJQueryWidthHandler) : TJQuery;\r\n function _is(Const aSelector : String) : TJQuery; external name 'is';\r\n function _is(Const aQuery : TJQuery) : TJQuery; external name 'is';\r\n function _is(aHandler : TJQueryFilterHandler) : TJQuery; external name 'is';\r\n function _is(Const aElement : TJSElement) : TJQuery; external name 'is';\r\n function _is(Const aElements : Array of TJSElement) : TJQuery; external name 'is';\r\n function last : TJQuery;\r\n class function load(url : String) : TJQXHR;overload;\r\n class function load(url,Data : String) : TJQXHR;overload;\r\n class function load(url : String; Data : TJSObject) : TJQXHR;overload;\r\n class function load(url : String; Data : TJSObject; success : TJQueryAjaxLoadHandler) : TJQXHR;overload;\r\n class function load(url,Data : String; success : TJQueryAjaxLoadHandler) : TJQXHR;overload;\r\n function map(aHandler : TJQueryMapHandler) : TJQuery;\r\n function next : TJQuery;overload;\r\n function next(const aSelector : String) : TJQuery;overload;\r\n function nextAll : TJQuery;overload;\r\n function nextAll(const aSelector : String) : TJQuery;overload;\r\n function nextUntil : TJQuery;overload;\r\n function nextUntil(const aSelector : String) : TJQuery;overload;\r\n function nextUntil(const aSelector,aFilter : String) : TJQuery;overload;\r\n function nextUntil(const aElement : TJSElement) : TJQuery;overload;\r\n function nextUntil(const aElement : TJSElement; aFilter : String) : TJQuery;overload;\r\n function nextUntil(const aQuery : TJQuery) : TJQuery;overload;\r\n function nextUntil(const aQuery : TJQuery; aFilter : String) : TJQuery;overload;\r\n function _not(const aSelector : String) : TJQuery; external name 'not';overload;\r\n function _not(const aSelector : TJSElement) : TJQuery; external name 'not';overload;\r\n function _not(const aSelector : Array of TJSElement) : TJQuery; external name 'not';overload;\r\n function _not(const aSelector : TJQuery) : TJQuery; external name 'not';overload;\r\n function _not(const aSelector : TJQueryFilterHandler) : TJQuery;external name 'not';overload;\r\n function noConflict : TJSObject;overload;\r\n function noConflict(removeAll: Boolean) : TJSObject;overload;\r\n function offSet: Integer;overload;\r\n function offSet(const aOffset : TJQueryTopLeft): TJQuery;overload;\r\n function offSet(aHandler : TJQueryOffsetHandler): TJQuery;overload;\r\n Function offsetParent : TJQuery;\r\n Function off : TJQuery; overload;\r\n Function off(events : String) : TJQuery; overload;\r\n Function off(events : String; aHandler : TJSEventHandler) : TJQuery; overload;\r\n Function off(events : String; selector : String; aHandler : TJSEventHandler) : TJQuery; overload;\r\n Function off(events : String; selector : String; data : JSValue; aHandler : TJSEventHandler) : TJQuery; overload;\r\n \r\n Function On_(events : String; aHandler : TJSEventHandler) : TJQuery; external name 'on'; overload;\r\n Function On_(events : String; selector : String; aHandler : TJSEventHandler) : TJQuery; external name 'on'; overload;\r\n Function On_(events : String; selector : String; data : JSValue; aHandler : TJSEventHandler) : TJQuery; external name 'on'; overload;\r\n Function On_(events : TJSObject; selector : String; data : JSValue) : TJQuery; external name 'on'; overload;\r\n Function On_(events : TJSObject; data : JSValue) : TJQuery; overload;\r\n Function On_(events : TJSObject) : TJQuery; overload;\r\n function outerHeight(IncludeMargin : Boolean): Integer;overload;\r\n function outerHeight: Integer;overload;\r\n function outerHeight(aValue: Integer) : TJQuery;overload;\r\n function outerHeight(aValue: String) : TJQuery;overload;\r\n function outerHeight(aHandler: TJQueryHeightHandler) : TJQuery;overload;\r\n function outerWidth(IncludeMargin : Boolean): Integer;overload;\r\n function outerWidth: Integer;overload;\r\n function outerWidth(aValue: Integer) : TJQuery;overload;\r\n function outerWidth(aValue: String) : TJQuery;overload;\r\n function outerWidth(aHandler: TJQueryWidthHandler) : TJQuery;overload;\r\n class function param (aObject : String) : String;overload;\r\n class function param (aObject : TJSObject) : String;overload;\r\n class function param (aObject : TJQuery) : String;overload;\r\n class function param (aObject : String; traditional : Boolean) : String;overload;\r\n class function param (aObject : TJSObject; traditional : Boolean) : String;overload;\r\n class function param (aObject : TJQuery; traditional : Boolean) : String;overload;\r\n\r\n Function parent : TJQuery;\r\n Function parent (const ASelector: String) : TJQuery;\r\n Function parents : TJQuery;\r\n Function parents (const ASelector: String) : TJQuery;\r\n function parentsUntil : TJQuery;\r\n function parentsUntil(const aSelector : String) : TJQuery;\r\n function parentsUntil(const aSelector,aFilter : String) : TJQuery;\r\n function parentsUntil(const aElement : TJSElement) : TJQuery;\r\n function parentsUntil(const aElement : TJSElement; aFilter : String) : TJQuery;\r\n function parentsUntil(const aQuery : TJQuery) : TJQuery;\r\n function parentsUntil(const aQuery : TJQuery; aFilter : String) : TJQuery;\r\n function position : TJQueryTopLeft;\r\n class function post(url : String) : TJQXHR;overload;\r\n class function post(url,Data : String) : TJQXHR;overload;\r\n class function post(url : String; Data : TJSObject) : TJQXHR;overload;\r\n class function post(url : String; Data : TJSObject; success : TJQueryAjaxSuccessHandler) : TJQXHR;overload;\r\n class function post(url,Data : String; success : TJQueryAjaxSuccessHandler) : TJQXHR;overload;\r\n class function post(url : String; Data : TJSObject; success : TJQueryAjaxSuccessHandler; aDataType : string) : TJQXHR;overload;\r\n class function post(url,Data : String; success : TJQueryAjaxSuccessHandler; aDataType : string) : TJQXHR;overload;\r\n class function post(aSettings : TJSAjaxSettings) : TJQXHR; overload;\r\n class function post(aSettings : TJSObject) : TJQXHR; overload;\r\n function prepend(content : String) : TJQuery; overload;\r\n function prepend(Content1,Content2 : String) : TJQuery; overload;\r\n function prepend(aHandler : TPrependCallback) : TJQuery; overload;\r\n Function prev : TJQuery;overload;\r\n Function prev(Const aSelector : String) : TJQuery;overload;\r\n Function prevAll : TJQuery;overload;\r\n Function prevAll(Const aSelector : String) : TJQuery;overload;\r\n function prevUntil : TJQuery;overload;\r\n function prevUntil(const aSelector : String) : TJQuery;overload;\r\n function prevUntil(const aSelector,aFilter : String) : TJQuery;overload;\r\n function prevUntil(const aElement : TJSElement) : TJQuery;overload;\r\n function prevUntil(const aElement : TJSElement; aFilter : String) : TJQuery;overload;\r\n function prevUntil(const aQuery : TJQuery) : TJQuery;overload;\r\n function prevUntil(const aQuery : TJQuery; aFilter : String) : TJQuery;overload;\r\n function prop(const aPropertyName : String) : JSValue;overload;\r\n function prop(const aPropertyName : String;AValue : JSValue) : TJQuery;overload;\r\n function prop(const TJSObject) : TJQuery;overload;\r\n function prop(const aPropertyName : String; aHandler : TJQueryPropHandler) : TJQuery;overload;\r\n class function queue(element : TJSElement) : TJSarray;overload;\r\n class function queue(element : TJSElement; const aQueueName : String) : TJSarray;overload;\r\n class function queue(element : TJSElement; const aQueueName : string; anewQueue : TJSarray) : TJQuery;overload;\r\n class function queue(element : TJSElement; const aQueueName : String ; aHandler : TJQueryQueueHandler) : TJQuery;overload;\r\n function queue : TJSarray;overload;\r\n function queue(aQueueName : string) : TJSarray;overload;\r\n function queue(anArray : TJSArray) : TJQuery;overload;\r\n function queue(aQueueName : string; anArray : TJSarray) : TJQuery;overload;\r\n function queue(aQueueName : string; aHandler : TJQueryAddQueueHandler) : TJQuery;overload;\r\n function remove(Const Selector : string) : TJQuery; overload;\r\n function remove() : TJQuery;overload;\r\n function removeAttr(Const attributeName : string) : TJQuery;\r\n function removeClass(Const aClass : String) : TJQuery;overload;\r\n function removeClass(Const aClassFunction : TJQueryAddClassHandler) : TJQuery;overload;\r\n class function removeData(aElement : TJSElement; Const aName : String) : TJQuery;overload;\r\n class function removeData(aElement : TJSElement) : TJQuery;overload;\r\n function removeData(const aName : string) : TJQuery;overload;\r\n function removeData(const aNames : array of string) : TJQuery;overload;\r\n function removeData : TJQuery;overload;\r\n function removeProp(Const aPropertyName : string) : TJQuery;\r\n function scrollLeft : Integer;overload;\r\n function scrollLeft(aValue : Integer) : TJQuery;overload;\r\n function scrollTop : Integer;overload;\r\n function scrollTop(aValue : Integer) : TJQuery;overload;\r\n function serialize : string;\r\n function serializeArray : TJSObjectDynArrayArray;\r\n Function siblings : TJQuery;overload;\r\n Function siblings(Const aSelector : String) : TJQuery;overload;\r\n Function slice(aStart : integer) : TJQuery;overload;\r\n Function slice(aStart,aEnd : integer) : TJQuery;overload;\r\n Function sub : TJQuery;\r\n function text : String;overload;\r\n function text(Const aText : string): TJQuery;overload;\r\n function text(Const aText : Integer): TJQuery;overload;\r\n function text(Const aText : Double): TJQuery;overload;\r\n function text(Const aText : Boolean): TJQuery;overload;\r\n function text(aHandler : TJQueryTextHandler) : TJQuery;overload;\r\n function toggleClass(Const aClass : String) : TJQuery;overload;\r\n function toggleClass(Const aClass : String; aState : Boolean) : TJQuery;overload;\r\n function toggleClass(Const aHandler : TJQueryToggleClassHandler) : TJQuery;overload;\r\n function toggleClass(Const aHandler : TJQueryToggleClassHandler; AState : Boolean) : TJQuery;overload;\r\n function trigger(aEventName : string) : TJQuery; varargs;\r\n function trigger(aEvent : TJSEvent) : TJQuery; varargs;\r\n function val : JSValue;overload;\r\n function val(Const aValue : String) : TJQuery;overload;\r\n function val(Const aValue : Integer) : TJQuery;overload;\r\n function val(Const aValue : Array of String) : TJQuery;overload;\r\n function val(aHandler : TJQueryValHandler) : TJQuery;overload;\r\n Function when(APromise : TJSPromise) : TJSPromise;overload;\r\n Function when : TJSPromise;overload;\r\n function Width: Integer;overload;\r\n function Width(aValue: Integer) : TJQuery;overload;\r\n function Width(aValue: String) : TJQuery;overload;\r\n function Width(aHandler: TJQueryWidthHandler) : TJQuery;overload;\r\n Property ready : TJSPromise Read FReady;\r\n // These should actually be class properties ?\r\n property cssHooks : TJSObject Read FCSSHooks;\r\n property cssNumber : TJSObject read FCSSNumber;\r\n Property Elements[AIndex : Integer] : TJSElement read getEl; default;\r\n end;\r\n\r\n\r\nFunction JQuery(Const aSelector : String) : TJQuery; external name 'jQuery';\r\nFunction JQuery(Const aSelector : String; Context : TJSElement) : TJQuery; external name 'jQuery';\r\nFunction JQuery(Const aElement : TJSElement) : TJQuery; external name 'jQuery';\r\nFunction JQuery(Const aElement : Array of TJSElement) : TJQuery; external name 'jQuery';\r\nFunction JQuery(Const aElement : TJSObject) : TJQuery; external name 'jQuery';\r\nFunction JQuery(Const aQuery : TJQuery) : TJQuery; external name 'jQuery';\r\nFunction JQuery() : TJQuery; external name 'jQuery';\r\n\r\nVar\r\n gJQuery : TJQuery; external name 'jQuery';\r\n\r\nImplementation\r\n\r\nend.\r\n\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\nunit jqwidget;\r\n\r\n{$mode objfpc}\r\n{$modeswitch externalclass}\r\n\r\ninterface\r\n\r\nuses js, web, libjquery, sysutils;\r\n\r\ntype\r\n\r\n { TJQXEvent }\r\n\r\n TJQXEvent = class external name 'jqxEvent' (TJSUIevent)\r\n private\r\n FArgs: TJSObject; external name 'args';\r\n Public\r\n property Args: TJSObject read FArgs;\r\n end;\r\n\r\n TJQXEventHandler = reference to function(Event: TJQXEvent): boolean;\r\n\r\n { TJQXElementEvent }\r\n\r\n TJQXElementEvent = class external name 'jqxElementEvent' (TJSUIevent)\r\n private\r\n FArgs: TJSHTMLElement; external name 'args';\r\n Public\r\n property Args: TJSHTMLElement read FArgs;\r\n end;\r\n\r\n TJQXElementEventHandler = reference to function(Event: TJQXElementEvent): boolean;\r\n\r\n TJQXWidgetCalendar = class external name 'jqxCalendar' (TJQuery)\r\n public\r\n function jqxCalendar(Const aParameter : TJSObject) : TJQuery;overload;\r\n function jqxCalendar(Const aParameter : String) : TJSObject;overload;\r\n function jqxCalendar(Const aParameter : String; aValue : String) : TJQuery;overload;\r\n function jqxCalendar(Const aParameter : String; aValue : Integer) : TJQuery;overload;\r\n function jqxCalendar(Const aParameter : String; aValue : Boolean) : TJQuery;overload;\r\n function jqxCalendar(Const aParameter : String; aValue : TJSDate) : TJQuery;overload;\r\n function jqxCalendar(Const aParameter : String; aValue : TJSDate; aValue2 : TJSDate) : TJQuery;overload;\r\n function on(Const aParameter : String; aValue : TJQXEventHandler) : TJQuery;\r\n end;\r\n\r\n TJQXWidgetDateTimeInput = class external name 'jqxDateTimeInput' (TJQuery)\r\n public\r\n function jqxDateTimeInput(Const aParameter : TJSObject) : TJQuery;overload;\r\n function jqxDateTimeInput(Const aParameter : String) : TJSObject;overload;\r\n function jqxDateTimeInput(Const aParameter : String; aValue : String) : TJQuery;overload;\r\n function jqxDateTimeInput(Const aParameter : String; aValue : Integer) : TJQuery;overload;\r\n function jqxDateTimeInput(Const aParameter : String; aValue : Boolean) : TJQuery;overload;\r\n function jqxDateTimeInput(Const aParameter : String; aValue : TJSDate) : TJQuery;overload;\r\n function jqxDateTimeInput(Const aParameter : String; aValue : TJSDate; aValue2 : TJSDate) : TJQuery;overload;\r\n function on(Const aParameter : String; aValue : TJQXEventHandler) : TJQuery;\r\n end;\r\n\r\n TJQXWidgetMenu = class external name 'jqxMenu' (TJQuery)\r\n public\r\n function jqxMenu(Const aParameter : TJSObject) : TJQuery;overload;\r\n function jqxMenu(Const aParameter : String) : TJQuery;overload;\r\n function jqxMenu(Const aParameter : String; aValue : String) : TJQuery;overload;\r\n function jqxMenu(Const aParameter : String; aValue : Boolean) : TJQuery;overload;\r\n function jqxMenu(Const aParameter : String; aName : String; aValue : Boolean) : TJQuery;overload;\r\n function on(Const aParameter : String; aValue : TJQXElementEventHandler) : TJQuery;\r\n end;\r\n\r\n TJQXWidgetMaskedInput = class external name 'jqxMaskedInput' (TJQuery)\r\n public\r\n function jqxMaskedInput(Const aParameter : TJSObject) : TJQuery;overload;\r\n function jqxMaskedInput(Const aParameter : String) : string;overload;\r\n function jqxMaskedInput(Const aParameter : String; aValue : String) : TJQuery;overload;\r\n function jqxMaskedInput(Const aParameter : String; aValue : Integer) : TJQuery;overload;\r\n function jqxMaskedInput(Const aParameter : String; aValue : Boolean) : TJQuery;overload;\r\n function on(Const aParameter : String; aValue : TJQXElementEventHandler) : TJQuery;\r\n end;\r\n\r\n TJQXWidgetColorPicker = class external name 'jqxColorPicker' (TJQuery)\r\n public\r\n function jqxColorPicker(Const aParameter : TJSObject) : TJQuery;overload;\r\n function jqxColorPicker(Const aParameter : String) : TJSObject;overload;\r\n function jqxColorPicker(Const aParameter : String; aValue : String) : TJQuery;overload;\r\n function jqxColorPicker(Const aParameter : String; aValue : Integer) : TJQuery;overload;\r\n function jqxColorPicker(Const aParameter : String; aValue : Boolean) : TJQuery;overload;\r\n function on(Const aParameter : String; aValue : TJQXEventHandler) : TJQuery;\r\n end;\r\n\r\n TJQXWidgetComboBox = class external name 'jqxComboBox' (TJQuery)\r\n public\r\n function jqxComboBox(Const aParameter : TJSObject) : TJQuery;overload;\r\n function jqxComboBox(Const aParameter : String) : TJSObject;overload;\r\n function jqxComboBox(Const aParameter : String; aValue : String) : TJQuery;overload;\r\n function jqxComboBox(Const aParameter : String; aValue : Integer) : TJQuery;overload;\r\n function jqxComboBox(Const aParameter : String; aValue : Boolean) : TJQuery;overload;\r\n function on(Const aParameter : String; aValue : TJQXEventHandler) : TJQuery;\r\n end;\r\n\r\n TJQXWidgetDropDownList = class external name 'jqxDropDownList' (TJQuery)\r\n public\r\n function jqxDropDownList(Const aParameter : TJSObject) : TJQuery;overload;\r\n function jqxDropDownList(Const aParameter : String) : TJSObject;overload;\r\n function jqxDropDownList(Const aParameter : String; aValue : String) : TJQuery;overload;\r\n function jqxDropDownList(Const aParameter : String; aValue : Integer) : TJQuery;overload;\r\n function jqxDropDownList(Const aParameter : String; aValue : Boolean) : TJQuery;overload;\r\n function on(Const aParameter : String; aValue : TJQXEventHandler) : TJQuery;\r\n end;\r\n\r\n TJQDataAdapter = class external name '$.jqx.dataAdapter'\r\n constructor new(aConfig : TJSObject);\r\n constructor new(aConfig : String);\r\n end;\r\n\r\n TJQXWidgetGrid = class external name 'jqxGrid' (TJQuery)\r\n public\r\n function jqxGrid(Const aParameter : TJSObject) : TJQuery;overload;\r\n function jqxGrid(Const aParameter : String) : TJSObject;overload;\r\n function jqxGrid(Const aParameter : String; aValue : String) : TJQuery;overload;\r\n function jqxGrid(Const aParameter : String; aValue : Integer) : string;overload;\r\n function jqxGrid(Const aParameter : String; aValue : Boolean) : TJQuery;overload;\r\n function jqxGrid(Const aParameter : String; aValue : TJQDataAdapter) : TJQuery;overload;\r\n function jqxGrid(Const aParameter : String; aID : String; aValue : TJSObject) : TJSObject;overload;\r\n function jqxGrid(Const aParameter : String; aIndex : integer; aID: String; aValue : String) : TJQuery;overload;\r\n function jqxGrid(Const aParameter : String; aRow : integer; aCol: integer; aValue : String) : TJQuery;overload;\r\n function jqxGrid(Const aParameter : String; aRow : integer; aCol: integer) : string;overload;\r\n function jqxGrid(Const aParameter : String; aCol : integer; aValue: string) : string;overload;\r\n function on(Const aParameter : String; aValue : TJQXEventHandler) : TJQuery;\r\n end;\r\n\r\n TJQXWidgetNumberInput = class external name 'jqxNumberInput' (TJQuery)\r\n public\r\n function jqxNumberInput(Const aParameter : TJSObject) : TJQuery;overload;\r\n function jqxNumberInput(Const aParameter : String) : TJSObject;overload;\r\n function jqxNumberInput(Const aParameter : String; aValue : String) : TJQuery;overload;\r\n function jqxNumberInput(Const aParameter : String; aValue : Integer) : TJQuery;overload;\r\n function jqxNumberInput(Const aParameter : String; aValue : Boolean) : TJQuery;overload;\r\n function jqxNumberInput(Const aParameter : String; aValue : Double) : TJQuery;overload;\r\n function on(Const aParameter : String; aValue : TJQXElementEventHandler) : TJQuery;\r\n end;\r\n\r\n TJQXWidgetRating = class external name 'jqxRating' (TJQuery)\r\n public\r\n function jqxRating(Const aParameter : TJSObject) : TJQuery;overload;\r\n function jqxRating(Const aParameter : String) : TJSObject;overload;\r\n function jqxRating(Const aParameter : String; aValue : String) : TJQuery;overload;\r\n function jqxRating(Const aParameter : String; aValue : Integer) : TJQuery;overload;\r\n function jqxRating(Const aParameter : String; aValue : Boolean) : TJQuery;overload;\r\n function jqxRating(Const aParameter : String; aValue : Double) : TJQuery;overload;\r\n function on(Const aParameter : String; aValue : TJQXElementEventHandler) : TJQuery;\r\n end;\r\n\r\n TJQXWidgetButton = class external name 'jqxButton' (TJQuery)\r\n public\r\n function jqxButton(Const aParameter : TJSObject) : TJQuery;overload;\r\n function jqxButton(Const aParameter : String) : TJSObject;overload;\r\n function jqxButton(Const aParameter : String; aValue : String) : TJQuery;overload;\r\n function jqxButton(Const aParameter : String; aValue : Integer) : TJQuery;overload;\r\n function jqxButton(Const aParameter : String; aValue : Boolean) : TJQuery;overload;\r\n function on(Const aParameter : String; aValue : TJQXElementEventHandler) : TJQuery;\r\n end;\r\n\r\n TJQXWidgetButtonGroup = class external name 'jqxButtonGroup' (TJQuery)\r\n public\r\n function jqxButtonGroup(Const aParameter : TJSObject) : TJQuery;overload;\r\n function jqxButtonGroup(Const aParameter : String) : TJSObject;overload;\r\n function jqxButtonGroup(Const aParameter : String; aValue : String) : TJQuery;overload;\r\n function jqxButtonGroup(Const aParameter : String; aValue : Integer) : TJQuery;overload;\r\n function jqxButtonGroup(Const aParameter : String; aValue : Boolean) : TJQuery;overload;\r\n function jqxButtonGroup(Const aParameter : String; aValue : Double) : TJQuery;overload;\r\n function on(Const aParameter : String; aValue : TJQXEventHandler) : TJQuery;\r\n end;\r\n\r\n TJQXWidgetKnob = class external name 'jqxKnob' (TJQuery)\r\n public\r\n function jqxKnob(Const aParameter : TJSObject) : TJQuery;overload;\r\n function jqxKnob(Const aParameter : String) : TJSObject;overload;\r\n function jqxKnob(Const aParameter : String; aValue : String) : TJQuery;overload;\r\n function jqxKnob(Const aParameter : String; aValue : Double) : TJQuery;overload;\r\n function jqxKnob(Const aParameter : String; aValue : Boolean) : TJQuery;overload;\r\n function on(Const aParameter : String; aValue : TJQXElementEventHandler) : TJQuery;\r\n end;\r\n\r\n TJQXWidgetProgressBar = class external name 'jqxProgressBar' (TJQuery)\r\n public\r\n function jqxProgressBar(Const aParameter : TJSObject) : TJQuery;overload;\r\n function jqxProgressBar(Const aParameter : String) : TJSObject;overload;\r\n function jqxProgressBar(Const aParameter : String; aValue : String) : TJQuery;overload;\r\n function jqxProgressBar(Const aParameter : String; aValue : Double) : TJQuery;overload;\r\n function jqxProgressBar(Const aParameter : String; aValue : Boolean) : TJQuery;overload;\r\n function on(Const aParameter : String; aValue : TJQXElementEventHandler) : TJQuery;\r\n end;\r\n\r\n TJQXWidgetSlider = class external name 'jqxSlider' (TJQuery)\r\n public\r\n function jqxSlider(Const aParameter : TJSObject) : TJQuery;overload;\r\n function jqxSlider(Const aParameter : String) : TJSObject;overload;\r\n function jqxSlider(Const aParameter : String; aValue : String) : TJQuery;overload;\r\n function jqxSlider(Const aParameter : String; aValue : Double) : TJQuery;overload;\r\n function jqxSlider(Const aParameter : String; aValue : Boolean) : TJQuery;overload;\r\n function jqxSlider(Const aParameter : String; aValue : TJSArray) : TJQuery;overload;\r\n function jqxSlider(Const aParameter : String; aMinimumValue : Double; aMaximumValue : Double) : TJQuery;overload;\r\n function on(Const aParameter : String; aValue : TJQXEventHandler) : TJQuery;\r\n end;\r\n\r\n TJQXWidgetRangeSelector = class external name 'jqxRangeSelector' (TJQuery)\r\n public\r\n function jqxRangeSelector(Const aParameter : TJSObject) : TJQuery;overload;\r\n function jqxRangeSelector(Const aParameter : String) : TJSObject;overload;\r\n function jqxRangeSelector(Const aParameter : String; aValue : String) : TJQuery;overload;\r\n function jqxRangeSelector(Const aParameter : String; aValue : Double) : TJQuery;overload;\r\n function jqxRangeSelector(Const aParameter : String; aValue : Boolean) : TJQuery;overload;\r\n function jqxRangeSelector(Const aParameter : String; aValue : TJSArray) : TJQuery;overload;\r\n function jqxRangeSelector(Const aParameter : String; aMinimumValue : Double; aMaximumValue : Double) : TJQuery;overload;\r\n function on(Const aParameter : String; aValue : TJQXEventHandler) : TJQuery;\r\n end;\r\n\r\n TJQXWidgetTagCloud = class external name 'jqxTagCloud' (TJQuery)\r\n public\r\n function jqxTagCloud(Const aParameter : TJSObject) : TJQuery;overload;\r\n function jqxTagCloud(Const aParameter : String) : TJSObject;overload;\r\n function jqxTagCloud(Const aParameter : String; aValue : String) : TJQuery;overload;\r\n function jqxTagCloud(Const aParameter : String; aValue : Double) : TJQuery;overload;\r\n function jqxTagCloud(Const aParameter : String; aValue : Boolean) : TJQuery;overload;\r\n function jqxTagCloud(Const aParameter : String; aValue : TJSArray) : TJQuery;overload;\r\n function jqxTagCloud(Const aParameter : String; aValue : TJQDataAdapter) : TJQuery;overload;\r\n function jqxTagCloud(Const aParameter : String; aValue : TJQDataAdapter; Const aParameter2 : String; aValue2 : String) : TJQuery;overload;\r\n function on(Const aParameter : String; aValue : TJQXEventHandler) : TJQuery;\r\n end;\r\n\r\n TJQXWidgetResponsivePanel = class external name 'jqxResponsivePanel' (TJQuery)\r\n public\r\n function jqxResponsivePanel(Const aParameter : TJSObject) : TJQuery;overload;\r\n function jqxResponsivePanel(Const aParameter : String) : TJSObject;overload;\r\n function jqxResponsivePanel(Const aParameter : String; aValue : String) : TJQuery;overload;\r\n function jqxResponsivePanel(Const aParameter : String; aValue : Integer) : TJQuery;overload;\r\n function jqxResponsivePanel(Const aParameter : String; aValue : Boolean) : TJQuery;overload;\r\n function jqxResponsivePanel(Const aParameter : String; aValue : TJQuery) : TJQuery;overload;\r\n function on(Const aParameter : String; aValue : TJQXElementEventHandler) : TJQuery;\r\n end;\r\n\r\n TJQXWidgetTabs = class external name 'jqxTabs' (TJQuery)\r\n public\r\n function jqxTabs(Const aParameter : TJSObject) : TJQuery;overload;\r\n function jqxTabs(Const aParameter : String) : TJSObject;overload;\r\n function jqxTabs(Const aParameter : String; aValue : String) : TJQuery;overload;\r\n function jqxTabs(Const aParameter : String; aValue : Integer) : TJQuery;overload;\r\n function jqxTabs(Const aParameter : String; aValue : Boolean) : TJQuery;overload;\r\n function jqxTabs(Const aParameter : String; aValue : TJQuery) : TJQuery;overload;\r\n function on(Const aParameter : String; aValue : TJQXEventHandler) : TJQuery;\r\n end;\r\n\r\nimplementation\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.JQCtrls;\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, WebLib.Graphics, SysUtils, Web, WebLib.Controls, js, libJQuery, jqwidget,\r\n WebLib.Menus, WEBLib.ExtCtrls;\r\n\r\ntype\r\n TJQXDayOfWeek = (dowMonday, dowTuesday, dowWednesday, dowThursday,\r\n dowFriday, dowSaturday, dowSunday, dowLocaleDefault);\r\n TJQXInputKind = (diDate, diTime, diDateTime);\r\n TJQXMenuMode = (mmHorizontal, mmVertical, mmPopup);\r\n TJQXColorMode = (cmHue, cmSaturation);\r\n TJQXSymbolPosition = (spLeft, spRight);\r\n TJQXInputMode = (imAdvanced, imSimple);\r\n //TJQXRatingPrecision = (rpFull, rpHalf);\r\n TJQXProgressOrientation = (poHorizontal, poVertical);\r\n TJQXProgressLayout = (plNormal, plReverse);\r\n TJQXTemplate = (ttDefault, ttPrimary, ttSuccess, ttWarning, ttDanger, ttInfo);\r\n TJQXHorizontalPosition = (hpLeft, hpRight, hpBoth);\r\n TJQXVerticalPosition = (vpTop, vpBottom, vpBoth);\r\n TJQXSliderMode = (smDefault, smFixed);\r\n TJQXKnobMarkType = (mtCircle, mtLine);\r\n TJQXKnobPointerType = (ptArrow, ptCircle, ptLine);\r\n TJQXPosition = (xpLeft, xpTop, xpCenter, xpBottom, xpRight, xpTopLeft,\r\n xpBottomLeft, xpTopRight, xpBottomRight);\r\n TJQXImagePosition = (ipAfterImage, ipAboveImage, ipBelowImage, ipBeforeImage, ipOverlay);\r\n TJQXGroupMode = (gmDefault, gmCheckBox, gmRadioButton);\r\n TJQXTagCloudSort = (tcsNone, tcsLabel, tcsValue);\r\n TJQXSortOrder = (soAscending, soDescending);\r\n TJQXTextCase = (tcOriginal, tcUpperCase, tcLowerCase, tcFirstUpper, tcCamelCase);\r\n TJQXAnimationType = (atNone, atFade, atSlide);\r\n TJQXTabPosition = (tpTop, tpBottom);\r\n TJQXToggleMode = (tmClick, tmDoubleClick, tmMouseEnter);\r\n\r\n TJQXCalendarEventArgs = class(TPersistent)\r\n private\r\n FDate: TDateTime;\r\n published\r\n property Date: TDateTime read FDate write FDate;\r\n end;\r\n\r\n TJQXDateEvent = procedure(Sender: TObject; Event: TJQXCalendarEventArgs) of object;\r\n\r\n TJQXMenuEventArgs = class(TPersistent)\r\n private\r\n FSource: TMenuItem;\r\n published\r\n property Source: TMenuItem read FSource write FSource;\r\n end;\r\n\r\n TJQXItemEvent = procedure(Sender: TObject; Event: TJQXMenuEventArgs) of object;\r\n\r\n TJQXSliderEventArgs = class(TPersistent)\r\n private\r\n FValue: Double;\r\n FMaximumValue: Double;\r\n FMinimumValue: Double;\r\n published\r\n property Value: Double read FValue write FValue;\r\n property MinimumValue: Double read FMinimumValue write FMinimumValue;\r\n property MaximumValue: Double read FMaximumValue write FMaximumValue;\r\n end;\r\n\r\n TJQXSliderEvent = procedure(Sender: TObject; Event: TJQXSliderEventArgs) of object;\r\n\r\n TJQXButtonEventArgs = class(TPersistent)\r\n private\r\n FButtonIndex: Integer;\r\n published\r\n property ButtonIndex: Integer read FButtonIndex write FButtonIndex;\r\n end;\r\n\r\n TJQXButtonEvent = procedure(Sender: TObject; Event: TJQXButtonEventArgs) of object;\r\n\r\n TJQXTagEventArgs = class(TPersistent)\r\n private\r\n FTagIndex: Integer;\r\n FDisplayIndex: Integer;\r\n FTagLabel: String;\r\n FTagValue: Integer;\r\n published\r\n property TagIndex: Integer read FTagIndex write FTagIndex;\r\n property TagLabel: String read FTagLabel write FTagLabel;\r\n property TagValue: Integer read FTagValue write FTagValue;\r\n property DisplayIndex: Integer read FDisplayIndex write FDisplayIndex;\r\n end;\r\n\r\n TJQXTagEvent = procedure(Sender: TObject; Event: TJQXTagEventArgs) of object;\r\n\r\n TJQXTabEventArgs = class(TPersistent)\r\n private\r\n FTabIndex: Integer;\r\n published\r\n property TabIndex: Integer read FTabIndex write FTabIndex;\r\n end;\r\n\r\n TJQXTabEvent = procedure(Sender: TObject; Event: TJQXTabEventArgs) of object;\r\n\r\n\r\n TJQXCustomControl = class(TjQueryCustomControl)\r\n private\r\n FTheme: string;\r\n protected\r\n function GetTheme(ATheme: string): string;\r\n function RequiredBaseURL: string; override;\r\n procedure RequiredScriptLoaded(Event: TJSEvent); override;\r\n public\r\n procedure SetTheme(AValue: string); virtual;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property Theme: string read FTheme write SetTheme;\r\n property Visible;\r\n end;\r\n\r\n TJQXCalendar = class(TJQXCustomControl)\r\n private\r\n FFirstDayOfWeek: TJQXDayOfWeek;\r\n FDate: TDateTime;\r\n FEndDate: TDateTime;\r\n FIsLoaded: Boolean;\r\n FMaxDate: TDateTime;\r\n FMinDate: TDateTime;\r\n FMultiSelect: Boolean;\r\n FOtherMonthDays: Boolean;\r\n FShowToday: Boolean;\r\n FWeekNumbers: Boolean;\r\n FOnDateClick: TJQXDateEvent;\r\n FOnNavigateClick: TJQXDateEvent;\r\n function HandleDateClick(Event: TJQXEvent): Boolean; virtual;\r\n function HandleNavigateClick(Event: TJQXEvent): Boolean; virtual;\r\n protected\r\n procedure UpdateElement; override;\r\n procedure UpdateSize; reintroduce;\r\n\r\n procedure SetDate(AValue: TDateTime);\r\n function GetDate: TDateTime;\r\n procedure SetEndDate(AValue: TDateTime);\r\n function GetEndDate: TDateTime;\r\n\r\n procedure SetWidth(AValue: Integer); override;\r\n procedure SetHeight(AValue: Integer); override;\r\n procedure SetEnabled(Value: boolean); override;\r\n procedure SetFirstDayOfWeek(AValue: TJQXDayOfWeek);\r\n procedure SetMaxDate(AValue: TDateTime);\r\n procedure SetMinDate(AValue: TDateTime);\r\n procedure SetMultiSelect(AValue: boolean);\r\n procedure SetOtherMonthDays(AValue: boolean);\r\n procedure SetShowToday(AValue: boolean);\r\n procedure SetWeekNumbers(AValue: boolean);\r\n public\r\n procedure InitJQuery; override;\r\n procedure CreateInitialize; override;\r\n procedure SetTheme(AValue: string); override;\r\n published\r\n property FirstDayOfWeek: TJQXDayOfWeek read FFirstDayOfWeek write SetFirstDayOfWeek;\r\n property Date: TDateTime read GetDate write SetDate;\r\n property EndDate: TDateTime read GetEndDate write SetEndDate;\r\n property MaxDate: TDateTime read FMaxDate write SetMaxDate;\r\n property MinDate: TDateTime read FMinDate write SetMinDate;\r\n property MultiSelect: Boolean read FMultiSelect write SetMultiSelect;\r\n property OtherMonthDays: Boolean read FOtherMonthDays write SetOtherMonthDays;\r\n property ShowToday: Boolean read FShowToday write SetShowToday;\r\n property WeekNumbers: Boolean read FWeekNumbers write SetWeekNumbers;\r\n property OnDateClick: TJQXDateEvent read FOnDateClick write FOnDateClick;\r\n property OnNavigateClick: TJQXDateEvent read FOnNavigateClick write FOnNavigateClick;\r\n end;\r\n\r\n TWebJQXCalendar = class(TJQXCalendar);\r\n\r\n TJQXDateTimeInput = class(TJQXCustomControl)\r\n private\r\n FFirstDayOfWeek: TJQXDayOfWeek;\r\n FDate: TDateTime;\r\n FEndDate: TDateTime;\r\n FIsLoaded: Boolean;\r\n FKind: TJQXInputKind;\r\n FMaxDate: TDateTime;\r\n FMinDate: TDateTime;\r\n FMultiSelect: boolean;\r\n FShowToday: boolean;\r\n FWeekNumbers: boolean;\r\n FOnDateClick: TJQXDateEvent;\r\n function HandleDateClick(Event: TJQXEvent): boolean; virtual;\r\n protected\r\n procedure InitJQuery; override;\r\n procedure UpdateElement; override;\r\n\r\n procedure SetDate(AValue: TDateTime);\r\n function GetDate: TDateTime;\r\n procedure SetEndDate(AValue: TDateTime);\r\n function GetEndDate: TDateTime;\r\n\r\n procedure SetWidth(AValue: Integer); override;\r\n procedure SetHeight(AValue: Integer); override;\r\n procedure SetEnabled(Value: boolean); override;\r\n procedure SetFirstDayOfWeek(AValue: TJQXDayOfWeek);\r\n procedure SetKind(AValue: TJQXInputKind);\r\n procedure SetMaxDate(AValue: TDateTime);\r\n procedure SetMinDate(AValue: TDateTime);\r\n procedure SetMultiSelect(AValue: boolean);\r\n procedure SetShowToday(AValue: boolean);\r\n procedure SetWeekNumbers(AValue: boolean);\r\n public\r\n procedure CreateInitialize; override;\r\n procedure SetTheme(AValue: string); override;\r\n published\r\n property FirstDayOfWeek: TJQXDayOfWeek read FFirstDayOfWeek write SetFirstDayOfWeek;\r\n property Date: TDateTime read GetDate write SetDate;\r\n property EndDate: TDateTime read GetEndDate write SetEndDate;\r\n property Kind: TJQXInputKind read FKind write SetKind;\r\n property MaxDate: TDateTime read FMaxDate write SetMaxDate;\r\n property MinDate: TDateTime read FMinDate write SetMinDate;\r\n property MultiSelect: boolean read FMultiSelect write SetMultiSelect;\r\n property ShowToday: boolean read FShowToday write SetShowToday;\r\n property WeekNumbers: boolean read FWeekNumbers write SetWeekNumbers;\r\n property OnDateClick: TJQXDateEvent read FOnDateClick write FOnDateClick;\r\n end;\r\n\r\n TWebJQXDateTimeInput = class(TJQXDateTimeInput);\r\n\r\n TJQXMenu = class(TJQXCustomControl)\r\n private\r\n FIsLoaded: Boolean;\r\n FMode: TJQXMenuMode;\r\n FMenu: TMainMenu;\r\n FUpdateCount: Integer;\r\n FOnItemClick: TJQXItemEvent;\r\n function HandleItemClick(Event: TJQXElementEvent): boolean; virtual;\r\n protected\r\n procedure InitJQuery; override;\r\n procedure UpdateElement; override;\r\n function GetMenuSource(Item: TMenuItem): string;\r\n function GetItemByName(AMenu: TMenuItem; Name: string): TMenuItem;\r\n\r\n procedure SetWidth(AValue: Integer); override;\r\n procedure SetHeight(AValue: Integer); override;\r\n procedure SetEnabled(Value: boolean); override;\r\n procedure SetMode(AValue: TJQXMenuMode);\r\n procedure SetMenu(AValue: TMainMenu);\r\n procedure ToggleItem(AMenuItem: TMenuItem; Disabled: Boolean);\r\n public\r\n procedure CreateInitialize; override;\r\n procedure BeginUpdate; override;\r\n procedure EndUpdate; override;\r\n procedure SetTheme(AValue: string); override;\r\n procedure SetItemEnabled(AMenuItem: TMenuItem);\r\n procedure SetItemDisabled(AMenuItem: TMenuItem);\r\n published\r\n property Mode: TJQXMenuMode read FMode write SetMode default mmHorizontal;\r\n property Menu: TMainMenu read FMenu write SetMenu;\r\n property OnItemClick: TJQXItemEvent read FOnItemClick write FOnItemClick;\r\n end;\r\n\r\n TWebJQXMenu = class(TJQXMenu);\r\n\r\n TJQXMaskedInput = class(TJQXCustomControl)\r\n private\r\n FMask: string;\r\n FText: string;\r\n FOnChange: TNotifyEvent;\r\n FIsLoaded: boolean;\r\n function HandleMaskedInputChange(Event: TJQXElementEvent): boolean; virtual;\r\n protected\r\n procedure InitJQuery; override;\r\n procedure UpdateElement; override;\r\n\r\n function GetText: string;\r\n procedure SetMask(AValue: string);\r\n procedure SetText(AValue: string);\r\n procedure SetWidth(AValue: Integer); override;\r\n procedure SetHeight(AValue: Integer); override;\r\n procedure SetEnabled(Value: boolean); override;\r\n public\r\n procedure CreateInitialize; override;\r\n procedure SetTheme(AValue: string); override;\r\n published\r\n property Mask: string read FMask write SetMask;\r\n property Text: string read GetText write SetText;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n TWebJQXMaskedInput = class(TJQXMaskedInput);\r\n\r\n TJQXColorPicker = class(TJQXCustomControl)\r\n private\r\n FColor: TColor;\r\n FColorMode: TJQXColorMode;\r\n FOnChange: TNotifyEvent;\r\n FUpdateCount: Integer;\r\n FIsLoaded: boolean;\r\n function HandleChange(Event: TJQXEvent): boolean; virtual;\r\n protected\r\n procedure InitJQuery; override;\r\n procedure UpdateElement; override;\r\n procedure BindEvents; override;\r\n procedure SetWidth(AValue: Integer); override;\r\n procedure SetHeight(AValue: Integer); override;\r\n procedure SetEnabled(Value: boolean); override;\r\n public\r\n procedure CreateInitialize; override;\r\n procedure BeginUpdate; override;\r\n procedure EndUpdate; override;\r\n\r\n function GetColor: TColor;\r\n procedure SetColorPickerColor(AValue: TColor);\r\n procedure SetColorMode(AValue: TJQXColorMode);\r\n published\r\n property Color: TColor read GetColor write SetColorPickerColor default clBlack;\r\n property ColorMode: TJQXColorMode read FColorMode write SetColorMode default cmSaturation;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n TWebJQXColorPicker = class(TJQXColorPicker);\r\n\r\n TJQXComboBox = class(TJQXCustomControl)\r\n private\r\n FAutoComplete: Boolean;\r\n FDisabled: TList;\r\n FItemIndex: Integer;\r\n FItems: TStringList;\r\n FSelected: TList;\r\n FMultiSelect: Boolean;\r\n FTextHint: string;\r\n FOnChange: TNotifyEvent;\r\n FIsLoaded: Boolean;\r\n FText: string;\r\n FOnExit: TNotifyEvent;\r\n function HandleChange(Event: TJQXEvent): Boolean; virtual;\r\n function HandleExit(Event: TJQXEvent): Boolean; virtual;\r\n procedure SetText(const Value: string);\r\n function GetText: string;\r\n protected\r\n procedure InitJQuery; override;\r\n procedure UpdateElement; override;\r\n procedure HandleItemsChanged(Sender: TObject);\r\n function GetDisabled(AIndex: Integer): Boolean;\r\n procedure SetDisabled(AIndex: Integer; AValue: Boolean);\r\n function GetSelected(AIndex: Integer): Boolean;\r\n procedure SetSelected(AIndex: Integer; AValue: Boolean);\r\n procedure SetAutoComplete(AValue: Boolean);\r\n procedure SetWidth(AValue: Integer); override;\r\n procedure SetHeight(AValue: Integer); override;\r\n procedure SetEnabled(Value: Boolean); override;\r\n procedure SetMultiSelect(AValue: Boolean);\r\n procedure SetTextHint(AValue: string);\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n\r\n function ItemsToJSON: string;\r\n function GetItemIndex: Integer;\r\n procedure SetItemIndex(AIndex: Integer);\r\n procedure SetItems(AItems: TStringList);\r\n procedure SetTheme(AValue: string); override;\r\n\r\n property Disabled[i: Integer]: Boolean read GetDisabled write SetDisabled;\r\n property Selected[i: Integer]: Boolean read GetSelected write SetSelected;\r\n published\r\n property AutoComplete: Boolean read FAutoComplete write SetAutoComplete default false;\r\n property ItemIndex: Integer read GetItemIndex write SetItemIndex default -1;\r\n property Items: TStringList read FItems write SetItems;\r\n property MultiSelect: Boolean read FMultiSelect write SetMultiSelect default false;\r\n property TextHint: string read FTextHint write SetTextHint;\r\n property Text: string read GetText write SetText;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n property OnExit: TNotifyEvent read FOnExit write FOnExit;\r\n end;\r\n\r\n TWebJQXComboBox = class(TJQXComboBox);\r\n\r\n TJQXDropDownList = class(TJQXCustomControl)\r\n private\r\n FDisabled: TList;\r\n FItemIndex: Integer;\r\n FItems: TStringList;\r\n FSelected: TList;\r\n FMultiSelect: Boolean;\r\n FTextHint: string;\r\n FOnChange: TNotifyEvent;\r\n FIsLoaded: Boolean;\r\n function HandleChange(Event: TJQXEvent): Boolean; virtual;\r\n protected\r\n procedure InitJQuery; override;\r\n procedure UpdateElement; override;\r\n procedure HandleItemsChanged(Sender: TObject);\r\n function GetDisabled(AIndex: Integer): Boolean;\r\n procedure SetDisabled(AIndex: Integer; AValue: Boolean);\r\n function GetSelected(AIndex: Integer): Boolean;\r\n procedure SetSelected(AIndex: Integer; AValue: Boolean);\r\n procedure SetWidth(AValue: Integer); override;\r\n procedure SetHeight(AValue: Integer); override;\r\n procedure SetEnabled(Value: Boolean); override;\r\n procedure SetMultiSelect(AValue: Boolean);\r\n procedure SetTextHint(AValue: string);\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n\r\n function ItemsToJSON: string;\r\n function GetItemIndex: Integer;\r\n procedure SetItemIndex(AIndex: Integer);\r\n procedure SetItems(AItems: TStringList);\r\n procedure SetTheme(AValue: string); override;\r\n\r\n property Disabled[i: Integer]: Boolean read GetDisabled write SetDisabled;\r\n property Selected[i: Integer]: Boolean read GetSelected write SetSelected;\r\n published\r\n property ItemIndex: Integer read GetItemIndex write SetItemIndex default -1;\r\n property Items: TStringList read FItems write SetItems;\r\n property MultiSelect: Boolean read FMultiSelect write SetMultiSelect default false;\r\n property TextHint: string read FTextHint write SetTextHint;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n TWebJQXDropDownList = class(TJQXDropDownList);\r\n\r\n TJQXNumberInput = class(TJQXCustomControl)\r\n private\r\n FDigits: Integer;\r\n FDecimalDigits: Integer;\r\n FInputMode: TJQXInputMode;\r\n FMaxValue: Double;\r\n FMinValue: Double;\r\n FShowSpinButtons: Boolean;\r\n FSpinButtonsStep: Integer;\r\n FSymbol: string;\r\n FSymbolPosition: TJQXSymbolPosition;\r\n FValue: Double;\r\n FOnChange: TNotifyEvent;\r\n FIsLoaded: boolean;\r\n function HandleNumberInputChange(Event: TJQXElementEvent): boolean; virtual;\r\n protected\r\n procedure InitJQuery; override;\r\n procedure UpdateElement; override;\r\n procedure BindEvents; override;\r\n\r\n function GetValue: Double;\r\n procedure SetDigits(AValue: Integer);\r\n procedure SetDecimalDigits(AValue: Integer);\r\n procedure SetInputMode(AValue: TJQXInputMode);\r\n procedure SetMaxValue(AValue: Double);\r\n procedure SetMinValue(AValue: Double);\r\n procedure SetShowSpinButtons(AValue: Boolean);\r\n procedure SetSpinButtonsStep(AValue: Integer);\r\n procedure SetSymbol(AValue: string);\r\n procedure SetSymbolPosition(AValue: TJQXSymbolPosition);\r\n procedure SetValue(AValue: Double);\r\n procedure SetWidth(AValue: Integer); override;\r\n procedure SetHeight(AValue: Integer); override;\r\n procedure SetEnabled(Value: boolean); override;\r\n public\r\n procedure CreateInitialize; override;\r\n procedure SetTheme(AValue: string); override;\r\n published\r\n property Digits: Integer read FDigits write SetDigits;\r\n property DecimalDigits: Integer read FDecimalDigits write SetDecimalDigits;\r\n property InputMode: TJQXInputMode read FInputMode write SetInputMode;\r\n property MaxValue: Double read FMaxValue write SetMaxValue;\r\n property MinValue: Double read FMinValue write SetMinValue;\r\n property ShowSpinButtons: Boolean read FShowSpinButtons write SetShowSpinButtons;\r\n property SpinButtonsStep: Integer read FSpinButtonsStep write SetSpinButtonsStep;\r\n property Symbol: String read FSymbol write SetSymbol;\r\n property SymbolPosition: TJQXSymbolPosition read FSymbolPosition write SetSymbolPosition;\r\n property Value: Double read GetValue write SetValue;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n TWebJQXNumberInput = class(TJQXNumberInput);\r\n\r\n TJQXRating = class(TJQXCustomControl)\r\n private\r\n FItemCount: Integer;\r\n //FPrecision: TJQXRatingPrecision;\r\n FValue: Double;\r\n FOnChange: TNotifyEvent;\r\n FIsLoaded: boolean;\r\n function HandleRatingChange(Event: TJQXElementEvent): boolean; virtual;\r\n protected\r\n procedure InitJQuery; override;\r\n procedure UpdateElement; override;\r\n procedure BindEvents; override;\r\n\r\n function GetValue: Double;\r\n procedure SetItemCount(AValue: Integer);\r\n //procedure SetPrecision(AValue: TJQXRatingPrecision);\r\n procedure SetValue(AValue: Double);\r\n procedure SetWidth(AValue: Integer); override;\r\n procedure SetHeight(AValue: Integer); override;\r\n procedure SetEnabled(Value: boolean); override;\r\n public\r\n procedure CreateInitialize; override;\r\n published\r\n property ItemCount: Integer read FItemCount write SetItemCount;\r\n //property Precision: TJQXRatingPrecision read FPrecision write SetPrecision;\r\n property Value: Double read GetValue write SetValue;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n TWebJQXRating = class(TJQXRating);\r\n\r\n TJQXButton = class(TJQXCustomControl)\r\n private\r\n FIsLoaded: boolean;\r\n FOnClick: TNotifyEvent;\r\n FCaption: string;\r\n FRoundedBorders: Boolean;\r\n FImageURL: string;\r\n FImageHeight: Integer;\r\n FImagePosition: TJQXPosition;\r\n FCaptionPosition: TJQXPosition;\r\n FImageWidth: Integer;\r\n FCaptionImageRelation: TJQXImagePosition;\r\n FTemplate: TJQXTemplate;\r\n function HandleClick(Event: TJQXElementEvent): boolean; virtual;\r\n procedure SetCaption(const Value: string);\r\n procedure SetRoundedBorders(const Value: Boolean);\r\n procedure SetCaptionImageRelation(const Value: TJQXImagePosition);\r\n procedure SetCaptionPosition(const Value: TJQXPosition);\r\n procedure SetImagePosition(const Value: TJQXPosition);\r\n procedure SetImageHeight(const Value: Integer);\r\n procedure SetImageURL(const Value: string);\r\n procedure SetImageWidth(const Value: Integer);\r\n procedure SetTemplate(const Value: TJQXTemplate);\r\n protected\r\n procedure InitJQuery; override;\r\n procedure UpdateElement; override;\r\n procedure BindEvents; override;\r\n procedure SetWidth(AValue: Integer); override;\r\n procedure SetHeight(AValue: Integer); override;\r\n procedure SetTop(AValue: Integer); override;\r\n procedure SetEnabled(Value: boolean); override;\r\n public\r\n procedure CreateInitialize; override;\r\n procedure SetTheme(AValue: string); override;\r\n published\r\n property Caption: string read FCaption write SetCaption;\r\n property CaptionPosition: TJQXPosition read FCaptionPosition write SetCaptionPosition default xpLeft;\r\n property CaptionImageRelation: TJQXImagePosition read FCaptionImageRelation write SetCaptionImageRelation default ipAfterImage;\r\n property ImageURL: string read FImageURL write SetImageURL;\r\n property ImagePosition: TJQXPosition read FImagePosition write SetImagePosition default xpLeft;\r\n property ImageHeight: Integer read FImageHeight write SetImageHeight default 16;\r\n property ImageWidth: Integer read FImageWidth write SetImageWidth default 16;\r\n property RoundedBorders: Boolean read FRoundedBorders write SetRoundedBorders default true;\r\n property Template: TJQXTemplate read FTemplate write SetTemplate default ttDefault;\r\n property OnClick: TNotifyEvent read FOnClick write FOnClick;\r\n end;\r\n\r\n TWebJQXButton = class(TJQXButton);\r\n\r\n TJQXButtonGroup = class(TJQXCustomControl)\r\n private\r\n FSelectedButton: TList;\r\n FIsLoaded: boolean;\r\n FTemplate: TJQXTemplate;\r\n FMode: TJQXGroupMode;\r\n FEnableHover: Boolean;\r\n FItems: TStringList;\r\n FOnClick: TJQXButtonEvent;\r\n function HandleClick(Event: TJQXEvent): boolean; virtual;\r\n procedure SetTemplate(const Value: TJQXTemplate);\r\n procedure SetMode(const Value: TJQXGroupMode);\r\n procedure SetEnableHover(const Value: Boolean);\r\n procedure SetItems(const AItems: TStringList);\r\n function GetButtonSelect(Button: Integer): Boolean;\r\n procedure SetButtonSelect(Button: Integer; const Value: Boolean);\r\n protected\r\n procedure InitJQuery; override;\r\n procedure UpdateElement; override;\r\n procedure BindEvents; override;\r\n procedure FixMargin;\r\n procedure DoItemsChanged(Sender: TObject);\r\n procedure SetWidth(AValue: Integer); override;\r\n procedure SetHeight(AValue: Integer); override;\r\n procedure SetEnabled(Value: boolean); override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure SetTheme(AValue: string); override;\r\n\r\n property ButtonSelect[Button: Integer]: Boolean read GetButtonSelect write SetButtonSelect;\r\n published\r\n property EnableHover: Boolean read FEnableHover write SetEnableHover default True;\r\n property Items: TStringList read FItems write SetItems;\r\n property Mode: TJQXGroupMode read FMode write SetMode default gmDefault;\r\n property Template: TJQXTemplate read FTemplate write SetTemplate default ttDefault;\r\n property OnClick: TJQXButtonEvent read FOnClick write FOnClick;\r\n end;\r\n\r\n TWebJQXButtonGroup = class(TJQXButtonGroup);\r\n\r\n TJQXKnob = class;\r\n TJQXKnobAppearance = class;\r\n\r\n TJQXKnobLabels = class(TPersistent)\r\n private\r\n FOwner: TJQXKnobAppearance;\r\n FVisible: Boolean;\r\n FStep: Integer;\r\n FOffset: Integer;\r\n procedure SetOffset(const Value: Integer);\r\n procedure SetStep(const Value: Integer);\r\n procedure SetVisible(const Value: Boolean);\r\n public\r\n constructor Create(AOwner: TJQXKnobAppearance); 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 Offset: Integer read FOffset write SetOffset default 88;\r\n property Step: Integer read FStep write SetStep default 10;\r\n property Visible: Boolean read FVisible write SetVisible default true;\r\n end;\r\n\r\n TJQXKnobProgressBar = class(TPersistent)\r\n private\r\n FOwner: TJQXKnobAppearance;\r\n FBorderColor: TColor;\r\n FSize: Integer;\r\n FBackgroundColor: TColor;\r\n FOffset: Integer;\r\n FColor: TColor;\r\n procedure SetBackgroundColor(const Value: TColor);\r\n procedure SetBorderColor(const Value: TColor);\r\n procedure SetColor(const Value: TColor);\r\n procedure SetOffset(const Value: Integer);\r\n procedure SetSize(const Value: Integer);\r\n public\r\n constructor Create(AOwner: TJQXKnobAppearance); 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 Color: TColor read FColor write SetColor default clWebSilver;\r\n property Size: Integer read FSize write SetSize default 9;\r\n property Offset: Integer read FOffset write SetOffset default 60;\r\n property BackgroundColor: TColor read FBackgroundColor write SetBackgroundColor default clWebGray;\r\n property BorderColor: TColor read FBorderColor write SetBorderColor default clWebBlack;\r\n end;\r\n\r\n TJQXKnobMarks = class(TPersistent)\r\n private\r\n FOwner: TJQXKnobAppearance;\r\n FOffset: Integer;\r\n FMajorSize: Integer;\r\n FColorProgress: TColor;\r\n FWidth: Integer;\r\n FBorderColorRemaining: TColor;\r\n FBorderColorProgress: TColor;\r\n FMinorInterval: Integer;\r\n FSize: Integer;\r\n FColorRemaining: TColor;\r\n FMajorInterval: Integer;\r\n FMarkType: TJQXKnobMarkType;\r\n procedure SetOffset(const Value: Integer);\r\n procedure SetBorderColorProgress(const Value: TColor);\r\n procedure SetBorderColorRemaining(const Value: TColor);\r\n procedure SetColorProgress(const Value: TColor);\r\n procedure SetColorRemaining(const Value: TColor);\r\n procedure SetMajorInterval(const Value: Integer);\r\n procedure SetMajorSize(const Value: Integer);\r\n procedure SetMarkType(const Value: TJQXKnobMarkType);\r\n procedure SetMinorInterval(const Value: Integer);\r\n procedure SetSize(const Value: Integer);\r\n procedure SetWidth(const Value: Integer);\r\n public\r\n constructor Create(AOwner: TJQXKnobAppearance); 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 ColorRemaining: TColor read FColorRemaining write SetColorRemaining default clGray;\r\n property BorderColorRemaining: TColor read FBorderColorRemaining write SetBorderColorRemaining default clGray;\r\n property ColorProgress: TColor read FColorProgress write SetColorProgress default clSilver;\r\n property BorderColorProgress: TColor read FBorderColorProgress write SetBorderColorProgress default clSilver;\r\n property MarkType: TJQXKnobMarkType read FMarkType write SetMarkType default mtLine;\r\n property Offset: Integer read FOffset write SetOffset default 71;\r\n property Width: Integer read FWidth write SetWidth default 3;\r\n property Size: Integer read FSize write SetSize default 6;\r\n property MajorSize: Integer read FMajorSize write SetMajorSize default 9;\r\n property MajorInterval: Integer read FMajorInterval write SetMajorInterval default 10;\r\n property MinorInterval: Integer read FMinorInterval write SetMinorInterval default 2;\r\n end;\r\n\r\n TJQXKnobPointer = class(TPersistent)\r\n private\r\n FOwner: TJQXKnobAppearance;\r\n FOffset: Integer;\r\n FColor: TColor;\r\n FWidth: Integer;\r\n FVisible: Boolean;\r\n FSize: Integer;\r\n FPointerType: TJQXKnobPointerType;\r\n FBorderColor: TColor;\r\n procedure SetOffset(const Value: Integer);\r\n procedure SetVisible(const Value: Boolean);\r\n procedure SetColor(const Value: TColor);\r\n procedure SetPointerType(const Value: TJQXKnobPointerType);\r\n procedure SetSize(const Value: Integer);\r\n procedure SetWidth(const Value: Integer);\r\n procedure SetBorderColor(const Value: TColor);\r\n public\r\n constructor Create(AOwner: TJQXKnobAppearance); 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 PointerType: TJQXKnobPointerType read FPointerType write SetPointerType default ptArrow;\r\n property Color: TColor read FColor write SetColor default clGray;\r\n property BorderColor: TColor read FBorderColor write SetBorderColor default clSilver;\r\n property Size: Integer read FSize write SetSize default 59;\r\n property Offset: Integer read FOffset write SetOffset default 49;\r\n property Visible: Boolean read FVisible write SetVisible default true;\r\n property Width: Integer read FWidth write SetWidth default 20;\r\n end;\r\n\r\n TJQXKnobAppearance = class(TPersistent)\r\n private\r\n FOwner: TJQXKnob;\r\n FLabels: TJQXKnobLabels;\r\n FProgressBar: TJQXKnobProgressBar;\r\n FMarks: TJQXKnobMarks;\r\n FPointer: TJQXKnobPointer;\r\n FBorderColor: TColor;\r\n FColor: TColor;\r\n FBorderWidth: Integer;\r\n procedure SetBorderColor(const Value: TColor);\r\n procedure SetBorderWidth(const Value: Integer);\r\n procedure SetColor(const Value: TColor);\r\n public\r\n constructor Create(AOwner: TJQXKnob); 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 Color: TColor read FColor write SetColor default clNone;\r\n property BorderColor: TColor read FBorderColor write SetBorderColor default clNone;\r\n property BorderWidth: Integer read FBorderWidth write SetBorderWidth default 1;\r\n property Labels: TJQXKnobLabels read FLabels write FLabels;\r\n property ProgressBar: TJQXKnobProgressBar read FProgressBar write FProgressBar;\r\n property Marks: TJQXKnobMarks read FMarks write FMarks;\r\n property Pointer: TJQXKnobPointer read FPointer write FPointer;\r\n end;\r\n\r\n TJQXKnob = class(TJQXCustomControl)\r\n private\r\n FValue: Double;\r\n FOnChange: TNotifyEvent;\r\n FIsLoaded: boolean;\r\n FEndAngle: Integer;\r\n FStartAngle: Integer;\r\n FAppearance: TJQXKnobAppearance;\r\n FMaximum: Integer;\r\n FMinimum: Integer;\r\n FStep: Integer;\r\n procedure SetEndAngle(const Value: Integer);\r\n procedure SetStartAngle(const Value: Integer);\r\n function HandleKnobChange(Event: TJQXElementEvent): boolean; virtual;\r\n procedure SetAppearance(const Value: TJQXKnobAppearance);\r\n procedure SetMaximum(const Value: Integer);\r\n procedure SetMinimum(const Value: Integer);\r\n procedure SetStep(const Value: Integer);\r\n protected\r\n procedure InitJQuery; override;\r\n procedure UpdateElement; override;\r\n procedure BindEvents; override;\r\n procedure SetWidth(AValue: Integer); override;\r\n procedure SetHeight(AValue: Integer); override;\r\n\r\n function GetValue: Double;\r\n procedure SetValue(AValue: Double);\r\n procedure SetEnabled(Value: boolean); override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n published\r\n property Appearance: TJQXKnobAppearance read FAppearance write SetAppearance;\r\n property Maximum: Integer read FMaximum write SetMaximum default 100;\r\n property Minimum: Integer read FMinimum write SetMinimum default 0;\r\n property Step: Integer read FStep write SetStep default 1;\r\n property Value: Double read GetValue write SetValue;\r\n property StartAngle: Integer read FStartAngle write SetStartAngle default 120;\r\n property EndAngle: Integer read FEndAngle write SetEndAngle default 420;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n TWebJQXKnob = class(TJQXKnob);\r\n\r\n TJQXProgressBar = class;\r\n TJQXProgressBarColors = class;\r\n\r\n TJQXProgressBarColor = class(TCollectionItem)\r\n private\r\n FStop: Integer;\r\n FOwner: TJQXProgressBarColors;\r\n FColor: TColor;\r\n procedure SetStop(const Value: Integer);\r\n procedure SetColor(const Value: TColor);\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 GetOwner: TPersistent; override;\r\n protected\r\n function GetDisplayName: string; override;\r\n published\r\n property Color: TColor read FColor write SetColor;\r\n property Stop: Integer read FStop write SetStop;\r\n end;\r\n\r\n TJQXProgressBarColors = class(TCollection)\r\n private\r\n FOwner: TJQXProgressBar;\r\n function GetItems(Index: Integer): TJQXProgressBarColor;\r\n procedure SetItems(Index: Integer; const Value: TJQXProgressBarColor);\r\n protected\r\n procedure Update(Item: TCollectionItem); override;\r\n public\r\n constructor Create(AOwner: TJQXProgressBar); overload;\r\n function GetOwner: TPersistent; override;\r\n function Add: TJQXProgressBarColor; reintroduce;\r\n function Insert(Index: Integer):TJQXProgressBarColor; reintroduce;\r\n property Items[Index: Integer]: TJQXProgressBarColor read GetItems write SetItems; default;\r\n end;\r\n\r\n TJQXProgressBar = class(TJQXCustomControl)\r\n private\r\n FValue: Integer;\r\n FIsLoaded: boolean;\r\n FLayout: TJQXProgressLayout;\r\n FShowValue: Boolean;\r\n FOrientation: TJQXProgressOrientation;\r\n FMaximum: Integer;\r\n FMinimum: Integer;\r\n FAnimationDuration: Integer;\r\n FColorRanges: TJQXProgressBarColors;\r\n FTemplate: TJQXTemplate;\r\n procedure SetLayout(const Value: TJQXProgressLayout);\r\n procedure SetOrientation(const Value: TJQXProgressOrientation);\r\n procedure SetShowValue(const Value: Boolean);\r\n procedure SetMaximum(const Value: Integer);\r\n procedure SetMinimum(const Value: Integer);\r\n procedure SetAnimationDuration(const Value: Integer);\r\n procedure SetColorRanges(const Value: TJQXProgressBarColors);\r\n procedure SetTemplate(const Value: TJQXTemplate);\r\n protected\r\n procedure InitJQuery; override;\r\n procedure UpdateElement; override;\r\n function ColorsToArray: TJSArray;\r\n\r\n procedure SetValue(AValue: Integer);\r\n procedure SetEnabled(Value: boolean); override;\r\n procedure SetWidth(AValue: Integer); override;\r\n procedure SetHeight(AValue: Integer); override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure SetTheme(AValue: string); override;\r\n published\r\n property AnimationDuration: Integer read FAnimationDuration write SetAnimationDuration default 300;\r\n property ColorRanges: TJQXProgressBarColors read FColorRanges write SetColorRanges;\r\n property Maximum: Integer read FMaximum write SetMaximum default 100;\r\n property Minimum: Integer read FMinimum write SetMinimum default 0;\r\n property Value: Integer read FValue write SetValue;\r\n property ShowValue: Boolean read FShowValue write SetShowValue default True;\r\n property Template: TJQXTemplate read FTemplate write SetTemplate default ttDefault;\r\n property Orientation: TJQXProgressOrientation read FOrientation write SetOrientation default poHorizontal;\r\n property Layout: TJQXProgressLayout read FLayout write SetLayout default plNormal;\r\n end;\r\n\r\n TWebJQXProgressBar = class(TJQXProgressBar);\r\n\r\n TJQXSlider = class(TJQXCustomControl)\r\n private\r\n FValue: Double;\r\n FOnChange: TJQXSliderEvent;\r\n FIsLoaded: boolean;\r\n FLayout: TJQXProgressLayout;\r\n FMaximumValue: Double;\r\n FTemplate: TJQXTemplate;\r\n FMinorTickSize: Integer;\r\n FShowRangeSlider: Boolean;\r\n FMaximum: Double;\r\n FMinimumValue: Double;\r\n FTicksFrequency: Integer;\r\n FMinimum: Double;\r\n FShowRange: Boolean;\r\n FShowButtons: Boolean;\r\n FShowTicks: Boolean;\r\n FMinorTicksFrequency: Integer;\r\n FButtonsPosition: TJQXHorizontalPosition;\r\n FTicksPosition: TJQXVerticalPosition;\r\n FTickSize: Integer;\r\n FShowMinorTicks: Boolean;\r\n FStep: Double;\r\n FMode: TJQXSliderMode;\r\n function HandleSliderChange(Event: TJQXEvent): boolean; virtual;\r\n procedure SetButtonsPosition(const Value: TJQXHorizontalPosition);\r\n procedure SetLayout(const Value: TJQXProgressLayout);\r\n procedure SetMaximum(const Value: Double);\r\n procedure SetMaximumValue(const Value: Double);\r\n procedure SetMinimum(const Value: Double);\r\n procedure SetMinimumValue(const Value: Double);\r\n procedure SetMinorTicksFrequency(const Value: Integer);\r\n procedure SetMinorTickSize(const Value: Integer);\r\n procedure SetShowButtons(const Value: Boolean);\r\n procedure SetShowRange(const Value: Boolean);\r\n procedure SetShowRangeSlider(const Value: Boolean);\r\n procedure SetShowTicks(const Value: Boolean);\r\n procedure SetTemplate(const Value: TJQXTemplate);\r\n procedure SetTicksFrequency(const Value: Integer);\r\n procedure SetTickSize(const Value: Integer);\r\n procedure SetTicksPosition(const Value: TJQXVerticalPosition);\r\n procedure SetShowMinorTicks(const Value: Boolean);\r\n procedure SetStep(const Value: Double);\r\n procedure SetMode(const Value: TJQXSliderMode);\r\n function GetMaximumValue: Double;\r\n function GetMinimumValue: Double;\r\n protected\r\n procedure InitJQuery; override;\r\n procedure UpdateElement; override;\r\n procedure UpdateSize; reintroduce;\r\n procedure BindEvents; override;\r\n\r\n function GetValue: Double;\r\n procedure SetValue(AValue: Double);\r\n procedure SetEnabled(Value: boolean); override;\r\n procedure SetWidth(AValue: Integer); override;\r\n procedure SetHeight(AValue: Integer); override;\r\n public\r\n procedure CreateInitialize; override;\r\n procedure SetTheme(AValue: string); override;\r\n published\r\n property ButtonsPosition: TJQXHorizontalPosition read FButtonsPosition write SetButtonsPosition default hpBoth;\r\n property TicksPosition: TJQXVerticalPosition read FTicksPosition write SetTicksPosition default vpBoth;\r\n property TicksFrequency: Integer read FTicksFrequency write SetTicksFrequency default 2;\r\n property TickSize: Integer read FTickSize write SetTickSize default 5;\r\n property MinorTicksFrequency: Integer read FMinorTicksFrequency write SetMinorTicksFrequency default 2;\r\n property MinorTickSize: Integer read FMinorTickSize write SetMinorTickSize default 5;\r\n property ShowButtons: Boolean read FShowButtons write SetShowButtons default true;\r\n property ShowTicks: Boolean read FShowTicks write SetShowTicks default true;\r\n property ShowMinorTicks: Boolean read FShowMinorTicks write SetShowMinorTicks default true;\r\n property ShowRange: Boolean read FShowRange write SetShowRange default true;\r\n property ShowRangeSlider: Boolean read FShowRangeSlider write SetShowRangeSlider default false;\r\n property MaximumValue: Double read GetMaximumValue write SetMaximumValue default 10;\r\n property MinimumValue: Double read GetMinimumValue write SetMinimumValue default 0;\r\n property Maximum: Double read FMaximum write SetMaximum default 10;\r\n property Minimum: Double read FMinimum write SetMinimum default 0;\r\n property Mode: TJQXSliderMode read FMode write SetMode default smDefault;\r\n property Step: Double read FStep write SetStep default 2;\r\n property Template: TJQXTemplate read FTemplate write SetTemplate default ttDefault;\r\n property Layout: TJQXProgressLayout read FLayout write SetLayout default plNormal;\r\n property Value: Double read GetValue write SetValue;\r\n property OnChange: TJQXSliderEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n TWebJQXSlider = class(TJQXSlider);\r\n\r\n TJQXRangeSelector = class(TJQXCustomControl)\r\n private\r\n FOnChange: TNotifyEvent;\r\n FIsLoaded: boolean;\r\n FMaximumValue: Double;\r\n FMaximum: Double;\r\n FMinimumValue: Double;\r\n FMinimum: Double;\r\n FResizable: Boolean;\r\n FMinorTicksInterval: Integer;\r\n FMajorTicksInterval: Integer;\r\n FShowMinorTicks: Boolean;\r\n FShowMajorTicks: Boolean;\r\n FMoveOnClick: Boolean;\r\n FShowMarkers: Boolean;\r\n function HandleRangeChange(Event: TJQXEvent): boolean; virtual;\r\n procedure SetMaximum(const Value: Double);\r\n procedure SetMaximumValue(const Value: Double);\r\n procedure SetMinimum(const Value: Double);\r\n procedure SetMinimumValue(const Value: Double);\r\n function GetMaximumValue: Double;\r\n function GetMinimumValue: Double;\r\n procedure SetMajorTicksInterval(const Value: Integer);\r\n procedure SetMinorTicksInterval(const Value: Integer);\r\n procedure SetResizable(const Value: Boolean);\r\n procedure SetShowMinorTicks(const Value: Boolean);\r\n procedure SetShowMajorTicks(const Value: Boolean);\r\n procedure SetMoveOnClick(const Value: Boolean);\r\n procedure SetShowMarkers(const Value: Boolean);\r\n protected\r\n procedure InitJQuery; override;\r\n procedure UpdateElement; override;\r\n procedure BindEvents; override;\r\n\r\n procedure SetEnabled(Value: boolean); override;\r\n procedure SetWidth(AValue: Integer); override;\r\n procedure SetHeight(AValue: Integer); override;\r\n public\r\n procedure CreateInitialize; override;\r\n procedure SetTheme(AValue: string); override;\r\n published\r\n property MaximumValue: Double read GetMaximumValue write SetMaximumValue default 10;\r\n property MinimumValue: Double read GetMinimumValue write SetMinimumValue default 0;\r\n property Maximum: Double read FMaximum write SetMaximum default 10;\r\n property Minimum: Double read FMinimum write SetMinimum default 0;\r\n property MajorTicksInterval: Integer read FMajorTicksInterval write SetMajorTicksInterval default 5;\r\n property MinorTicksInterval: Integer read FMinorTicksInterval write SetMinorTicksInterval default 1;\r\n property MoveOnClick: Boolean read FMoveOnClick write SetMoveOnClick default True;\r\n property Resizable: Boolean read FResizable write SetResizable default True;\r\n property ShowMajorTicks: Boolean read FShowMajorTicks write SetShowMajorTicks default True;\r\n property ShowMinorTicks: Boolean read FShowMinorTicks write SetShowMinorTicks default True;\r\n property ShowMarkers: Boolean read FShowMarkers write SetShowMarkers default True;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n TWebJQXRangeSelector = class(TJQXRangeSelector);\r\n\r\n TJQXTagCloud = class;\r\n TJQXCloudTags = class;\r\n\r\n TJQXCloudTag = class(TCollectionItem)\r\n private\r\n FOwner: TJQXCloudTags;\r\n FTagValue: Integer;\r\n FTag: Integer;\r\n FTagName: String;\r\n FTagLabel: String;\r\n procedure SetTagName(const Value: String);\r\n procedure SetTagValue(const Value: Integer);\r\n procedure SetTagLabel(const Value: String);\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 GetOwner: TPersistent; override;\r\n protected\r\n function GetDisplayName: string; override;\r\n published\r\n property Tag: Integer read FTag write FTag;\r\n property TagLabel: String read FTagLabel write SetTagLabel;\r\n property TagName: String read FTagName write SetTagName;\r\n property TagValue: Integer read FTagValue write SetTagValue;\r\n end;\r\n\r\n TJQXCloudTags = class(TCollection)\r\n private\r\n FOwner: TJQXTagCloud;\r\n function GetItems(Index: Integer): TJQXCloudTag;\r\n procedure SetItems(Index: Integer; const Value: TJQXCloudTag);\r\n protected\r\n procedure Update(Item: TCollectionItem); override;\r\n public\r\n constructor Create(AOwner: TJQXTagCloud); overload;\r\n function GetOwner: TPersistent; override;\r\n function Add: TJQXCloudTag; reintroduce;\r\n function Insert(Index: Integer):TJQXCloudTag; reintroduce;\r\n property Items[Index: Integer]: TJQXCloudTag read GetItems write SetItems; default;\r\n end;\r\n\r\n TJQXTagCloud = class(TJQXCustomControl)\r\n private\r\n FIsLoaded: boolean;\r\n FItems: TJQXCloudTags;\r\n FSortBy: TJQXTagCloudSort;\r\n FOnClick: TJQXTagEvent;\r\n FSortOrder: TJQXSortOrder;\r\n FTextCase: TJQXTextCase;\r\n FDisplayLimit: Integer;\r\n FDisplayMinValue: Integer;\r\n FDisplayTopWeighted: Boolean;\r\n FMaxColor: TColor;\r\n FMinColor: TColor;\r\n FDisplayMaxValue: Integer;\r\n FMaxFontSize: Integer;\r\n FMinFontSize: Integer;\r\n procedure SetSortBy(const Value: TJQXTagCloudSort);\r\n procedure SetSortOrder(const Value: TJQXSortOrder);\r\n procedure SetTextCase(const Value: TJQXTextCase);\r\n procedure SetDisplayLimit(const Value: Integer);\r\n procedure SetDisplayMaxValue(const Value: Integer);\r\n procedure SetDisplayMinValue(const Value: Integer);\r\n procedure SetDisplayTopWeighted(const Value: Boolean);\r\n procedure SetMaxColor(const Value: TColor);\r\n procedure SetMinColor(const Value: TColor);\r\n procedure SetMaxFontSize(const Value: Integer);\r\n procedure SetMinFontSize(const Value: Integer);\r\n protected\r\n procedure InitJQuery; override;\r\n procedure UpdateElement; override;\r\n procedure BindEvents; override;\r\n\r\n procedure SetEnabled(Value: boolean); override;\r\n procedure SetWidth(AValue: Integer); override;\r\n procedure SetHeight(AValue: Integer); override;\r\n function DataToArray: TJSArray;\r\n function HandleItemClick(Event: TJQXEvent): boolean; virtual;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n published\r\n property DisplayLimit: Integer read FDisplayLimit write SetDisplayLimit default -1;\r\n property DisplayTopWeighted: Boolean read FDisplayTopWeighted write SetDisplayTopWeighted default False;\r\n property DisplayMaxValue: Integer read FDisplayMaxValue write SetDisplayMaxValue default -1;\r\n property DisplayMinValue: Integer read FDisplayMinValue write SetDisplayMinValue default -1;\r\n property Items: TJQXCloudTags read FItems write FItems;\r\n property MaxColor: TColor read FMaxColor write SetMaxColor default clNone;\r\n property MinColor: TColor read FMinColor write SetMinColor default clNone;\r\n property MaxFontSize: Integer read FMaxFontSize write SetMaxFontSize default 36;\r\n property MinFontSize: Integer read FMinFontSize write SetMinFontSize default 8;\r\n property SortBy: TJQXTagCloudSort read FSortBy write SetSortBy default tcsNone;\r\n property SortOrder: TJQXSortOrder read FSortOrder write SetSortOrder default soAscending;\r\n property TextCase: TJQXTextCase read FTextCase write SetTextCase default tcOriginal;\r\n property OnClick: TJQXTagEvent read FOnClick write FOnClick;\r\n end;\r\n\r\n TWebJQXTagCloud = class(TJQXTagCloud);\r\n\r\n TJQXResponsivePanel = class(TJQXCustomControl)\r\n private\r\n FIsLoaded: boolean;\r\n FOnOpen: TNotifyEvent;\r\n FAutoClose: Boolean;\r\n FOnClose: TNotifyEvent;\r\n FOnCollapse: TNotifyEvent;\r\n FOnExpand: TNotifyEvent;\r\n FToggleButtonSize: Integer;\r\n FCollapseBreakPoint: Integer;\r\n FAnimationType: TJQXAnimationType;\r\n function HandleOpen(Event: TJQXElementEvent): boolean; virtual;\r\n function HandleClose(Event: TJQXElementEvent): boolean; virtual;\r\n function HandleCollapse(Event: TJQXElementEvent): boolean; virtual;\r\n function HandleExpand(Event: TJQXElementEvent): boolean; virtual;\r\n procedure SetAutoClose(const Value: Boolean);\r\n procedure SetCollapsBreakPoint(const Value: Integer);\r\n procedure SetToggleButtonSize(const Value: Integer);\r\n procedure SetAnimationType(const Value: TJQXAnimationType);\r\n protected\r\n procedure InitJQuery; override;\r\n procedure UpdateElement; override;\r\n procedure BindEvents; override;\r\n function GetContentID: string;\r\n function GetButtonID: string;\r\n public\r\n procedure CreateInitialize; override;\r\n procedure SetTheme(AValue: string); override;\r\n procedure SetEnabled(Value: boolean); override;\r\n procedure SetWidth(AValue: Integer); override;\r\n procedure SetHeight(AValue: Integer); override;\r\n\r\n procedure Open;\r\n procedure Close;\r\n procedure Refresh;\r\n published\r\n property AnimationType: TJQXAnimationType read FAnimationType write SetAnimationType default atNone;\r\n property AutoClose: Boolean read FAutoClose write SetAutoClose default True;\r\n property CollapseBreakPoint: Integer read FCollapseBreakPoint write SetCollapsBreakPoint default 1000;\r\n property ToggleButtonSize: Integer read FToggleButtonSize write SetToggleButtonSize default 30;\r\n\r\n property OnOpen: TNotifyEvent read FOnOpen write FOnOpen;\r\n property OnClose: TNotifyEvent read FOnClose write FOnClose;\r\n property OnCollapse: TNotifyEvent read FOnCollapse write FOnCollapse;\r\n property OnExpand: TNotifyEvent read FOnExpand write FOnExpand;\r\n end;\r\n\r\n TWebJQXResponsivePanel = class(TJQXResponsivePanel);\r\n\r\n TJQXTabSheet = class(TDivPanel)\r\n private\r\n FCaption: string;\r\n protected\r\n procedure BindEvents; override;\r\n public\r\n procedure CreateInitialize; override;\r\n published\r\n property Caption: string read FCaption write FCaption;\r\n end;\r\n\r\n TWebJQXTabSheet = class(TJQXTabSheet);\r\n\r\n TJQXTabs = class(TJQXCustomControl)\r\n private\r\n FIsLoaded: boolean;\r\n FTabIndex: Integer;\r\n FScrollPosition: TJQXHorizontalPosition;\r\n FCollapsible: Boolean;\r\n FToggleMode: TJQXToggleMode;\r\n FSelectionTracker: Boolean;\r\n FReorder: Boolean;\r\n FEnableHover: Boolean;\r\n FPosition: TJQXTabPosition;\r\n FEnableScrollAnimation: Boolean;\r\n FScrollStep: Integer;\r\n FOnTabClick: TJQXTabEvent;\r\n FOnSelected: TJQXTabEvent;\r\n function HandleTabClick(Event: TJQXEvent): boolean; virtual;\r\n function HandleSelected(Event: TJQXEvent): boolean; virtual;\r\n procedure SetTabIndex(const Value: Integer);\r\n procedure SetCollapsible(const Value: Boolean);\r\n procedure SetEnableHover(const Value: Boolean);\r\n procedure SetEnableScrollAnimation(const Value: Boolean);\r\n procedure SetPosition(const Value: TJQXTabPosition);\r\n procedure SetReorder(const Value: Boolean);\r\n procedure SetScrollPosition(const Value: TJQXHorizontalPosition);\r\n procedure SetSelectionTracker(const Value: Boolean);\r\n procedure SetToggleMode(const Value: TJQXToggleMode);\r\n procedure SetScrollStep(const Value: Integer);\r\n function GetTabIndex: Integer;\r\n protected\r\n procedure InitJQuery; override;\r\n procedure UpdateElement; override;\r\n procedure BindEvents; override;\r\n procedure SetEnabled(Value: boolean); override;\r\n procedure SetWidth(AValue: Integer); override;\r\n procedure SetHeight(AValue: Integer); override;\r\n public\r\n procedure CreateInitialize; override;\r\n procedure SetTheme(AValue: string); override;\r\n published\r\n property Collapsible: Boolean read FCollapsible write SetCollapsible default False;\r\n property EnableHover: Boolean read FEnableHover write SetEnableHover default True;\r\n property EnableScrollAnimation: Boolean read FEnableScrollAnimation write SetEnableScrollAnimation default True;\r\n property Position: TJQXTabPosition read FPosition write SetPosition default tpTop;\r\n property Reorder: Boolean read FReorder write SetReorder default False;\r\n property SelectionTracker: Boolean read FSelectionTracker write SetSelectionTracker default False;\r\n property ScrollPosition: TJQXHorizontalPosition read FScrollPosition write SetScrollPosition default hpRight;\r\n property ScrollStep: Integer read FScrollStep write SetScrollStep default 70;\r\n property ToggleMode: TJQXToggleMode read FToggleMode write SetToggleMode default tmClick;\r\n property TabIndex: Integer read GetTabIndex write SetTabIndex default 0;\r\n\r\n property OnTabClick: TJQXTabEvent read FOnTabClick write FOnTabClick;\r\n property OnSelected: TJQXTabEvent read FOnSelected write FOnSelected;\r\n end;\r\n\r\n TWebJQXTabs = class(TJQXTabs);\r\n\r\nimplementation\r\n\r\nuses\r\n WEBLib.Dialogs;\r\n\r\nvar\r\n TMSJQWIDGETSLIBRARYURL: string = '';\r\n\r\nfunction JSDateToTDate(AValue: TJSDate): TDateTime;\r\nvar\r\n y, m, d: Word;\r\nbegin\r\n Result := 0;\r\n\r\n if not Assigned(AValue) then\r\n Exit;\r\n\r\n y := AValue.FullYear;\r\n m := AValue.Month + 1;\r\n d := AValue.Date;\r\n Result := EncodeDate(y,m,d);\r\nend;\r\n\r\nfunction TDateToJSDate(AValue: TDateTime): TJSDate;\r\nvar\r\n y, m, d: Word;\r\nbegin\r\n Result := TJSDate.New(1970, 0, 1);\r\n\r\n if not Assigned(AValue) then\r\n Exit;\r\n\r\n DecodeDate(AValue, y, m, d);\r\n Result := TJSDate.New(y, m - 1, d);\r\nend;\r\n\r\n{ TJQXCustomControl }\r\n\r\nfunction TJQXCustomControl.GetTheme(ATheme: string): string;\r\nbegin\r\n result := 'base';\r\n if ATheme <> '' then\r\n result := ATheme;\r\nend;\r\n\r\nfunction TJQXCustomControl.RequiredBaseURL: string;\r\nvar\r\n i: integer;\r\n el: TJSElement;\r\n scr: TJSHTMLScriptElement;\r\n s: string;\r\n found: boolean;\r\n\r\nbegin\r\n if (TMSJQWIDGETSLIBRARYURL <> '') then\r\n begin\r\n Result := TMSJQWIDGETSLIBRARYURL;\r\n Exit;\r\n end;\r\n\r\n Result := '';\r\n\r\n found := 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('jqxcore.js', scr.src) > 0) then\r\n begin\r\n s := scr.src;\r\n found := true;\r\n break;\r\n end;\r\n end;\r\n end;\r\n\r\n if found then\r\n begin\r\n TMSJQWIDGETSLIBRARYURL := Copy(s, 1, Length(s) - 10);\r\n Result := TMSJQWIDGETSLIBRARYURL;\r\n end\r\n else\r\n begin\r\n TMSJQWIDGETSLIBRARYURL := 'notfound';\r\n ShowMessage('No jQWidgets library specified in project HTML file.'#13#10'See \"Manage JavaScript Libraries\"');\r\n end;\r\nend;\r\n\r\nprocedure TJQXCustomControl.RequiredScriptLoaded(Event: TJSEvent);\r\nbegin\r\n inherited;\r\n\r\n if ControlScriptCountLoaded = ControlScriptCount then\r\n begin\r\n ScriptLoaded := true;\r\n InitJQuery;\r\n end;\r\nend;\r\n\r\nprocedure TJQXCustomControl.SetTheme(AValue: string);\r\nbegin\r\n FTheme := AValue;\r\nend;\r\n\r\n{ TJQXCalendar }\r\n\r\nprocedure TJQXCalendar.CreateInitialize;\r\nbegin\r\n inherited;\r\n FDate := Now;\r\n FFirstDayOfWeek := dowMonday;\r\n FIsLoaded := false;\r\n FMaxDate := EncodeDate(2100, 12, 31);\r\n FMinDate := EncodeDate(1970, 1, 1);\r\n FMultiSelect := False;\r\n FOtherMonthDays := True;\r\n FShowToday := False;\r\n FWeekNumbers := False;\r\n Enabled := True;\r\n Height := 220;\r\n Width := 220;\r\n\r\n RequiredScripts.Add('jqxdatetimeinput.js');\r\n RequiredScripts.Add('jqxcalendar.js');\r\n RequiredScripts.Add('globalization/globalize.js');\r\n\r\n ScriptLoaded := not AddRequiredScripts;\r\nend;\r\n\r\nprocedure TJQXCalendar.InitJQuery;\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if FIsLoaded then\r\n Exit;\r\n\r\n if not ScriptLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n FIsLoaded := True;\r\n TJQXWidgetCalendar(JQuery(GetJQID)).jqxCalendar(New(['width', Width, 'height', Height]));\r\n TJQXWidgetCalendar(JQuery(GetJQID)).on('change', @HandleDateClick);\r\n TJQXWidgetCalendar(JQuery(GetJQID)).on('viewChange', @HandleNavigateClick);\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TJQXCalendar.UpdateElement;\r\nvar\r\n dow: Integer;\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n case FFirstDayOfWeek of\r\n dowMonday: dow := 1;\r\n dowTuesday: dow := 2;\r\n dowWednesday: dow := 3;\r\n dowThursday: dow := 4;\r\n dowFriday: dow := 5;\r\n dowSaturday: dow := 6;\r\n dowSunday: dow := 0;\r\n dowLocaleDefault: dow := 1;\r\n end;\r\n\r\n TJQXWidgetCalendar(JQuery(GetJQID)).jqxCalendar(New(['width', Width, 'height', Height]));\r\n TJQXWidgetCalendar(JQuery(GetJQID)).jqxCalendar('firstDayOfWeek', dow);\r\n TJQXWidgetCalendar(JQuery(GetJQID)).jqxCalendar('setMaxDate', TDateToJSDate(FMaxDate));\r\n TJQXWidgetCalendar(JQuery(GetJQID)).jqxCalendar('setMinDate', TDateToJSDate(FMinDate));\r\n TJQXWidgetCalendar(JQuery(GetJQID)).jqxCalendar('showOtherMonthDays', FOtherMonthDays);\r\n TJQXWidgetCalendar(JQuery(GetJQID)).jqxCalendar('showFooter', FShowToday);\r\n TJQXWidgetCalendar(JQuery(GetJQID)).jqxCalendar('showWeekNumbers', FWeekNumbers);\r\n TJQXWidgetCalendar(JQuery(GetJQID)).jqxCalendar('disabled', not Enabled);\r\n TJQXWidgetCalendar(JQuery(GetJQID)).jqxCalendar('theme', GetTheme(Theme));\r\n\r\n SetDate(FDate);\r\n end;\r\nend;\r\n\r\nprocedure TJQXCalendar.UpdateSize;\r\nbegin\r\n if IsUpdating then\r\n Exit;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n TJQXWidgetCalendar(JQuery(GetJQID)).jqxCalendar(New(['width', Width, 'height', Height]));\r\nend;\r\n\r\nfunction TJQXCalendar.HandleDateClick(Event: TJQXEvent): Boolean ;\r\nvar\r\n Args: TJQXCalendarEventArgs;\r\nbegin\r\n if Assigned(OnDateClick) then\r\n begin\r\n Args := TJQXCalendarEventArgs.Create;\r\n Args.Date := JSDateToTDate(TJSDate(Event.Args.Properties['date']));\r\n FDate := Args.Date;\r\n OnDateClick(Self, Args);\r\n Args.Free;\r\n end;\r\n\r\n Result := True;\r\nend;\r\n\r\nfunction TJQXCalendar.HandleNavigateClick(Event: TJQXEvent): Boolean ;\r\nvar\r\n Args: TJQXCalendarEventArgs;\r\nbegin\r\n if Assigned(OnNavigateClick) then\r\n begin\r\n Args := TJQXCalendarEventArgs.Create;\r\n Args.Date := JSDateToTDate(TJSDate(Event.Args.Properties['date']));\r\n OnNavigateClick(Self, Args);\r\n Args.Free;\r\n end;\r\n\r\n Result := True;\r\nend;\r\n\r\nprocedure TJQXCalendar.SetDate(AValue: TDateTime);\r\nbegin\r\n FDate := AValue;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n\r\n if MultiSelect then\r\n begin\r\n TJQXWidgetCalendar(JQuery(GetJQID)).jqxCalendar('selectionMode', 'range');\r\n TJQXWidgetCalendar(JQuery(GetJQID)).jqxCalendar('setRange', TDateToJSDate(FDate), TDateToJSDate(FEndDate));\r\n end\r\n else\r\n begin\r\n TJQXWidgetCalendar(JQuery(GetJQID)).jqxCalendar('selectionMode', 'default');\r\n TJQXWidgetCalendar(JQuery(GetJQID)).jqxCalendar('val', TDateToJSDate(FDate));\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TJQXCalendar.GetDate: TDateTime;\r\nvar\r\n seldate: TDateTime;\r\n jso: TJSObject;\r\nbegin\r\n Result := FDate;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if MultiSelect then\r\n begin\r\n jso := TJQXWidgetCalendar(JQuery(GetJQID)).jqxCalendar('getRange');\r\n if Assigned(jso) then\r\n seldate := JSDateToTDate(TJSDate(jso.Properties['from']));\r\n end\r\n else\r\n begin\r\n jso := TJQXWidgetCalendar(JQuery(GetJQID)).jqxCalendar('getDate');\r\n if Assigned(jso) then\r\n seldate := JSDateToTDate(TJSDate(jso));\r\n end;\r\n\r\n Result := seldate;\r\n end;\r\nend;\r\n\r\nprocedure TJQXCalendar.SetEndDate(AValue: TDateTime);\r\nbegin\r\n FEndDate := AValue;\r\n UpdateElement;\r\nend;\r\n\r\nfunction TJQXCalendar.GetEndDate: TDateTime;\r\nvar\r\n seldate: TDateTime;\r\n jso: TJSObject;\r\nbegin\r\n Result := FDate;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if MultiSelect then\r\n begin\r\n jso := TJQXWidgetCalendar(JQuery(GetJQID)).jqxCalendar('getRange');\r\n if Assigned(jso) then\r\n seldate := JSDateToTDate(TJSDate(jso.Properties['to']));\r\n end\r\n else\r\n begin\r\n jso := TJQXWidgetCalendar(JQuery(GetJQID)).jqxCalendar('getDate');\r\n if Assigned(jso) then\r\n seldate := JSDateToTDate(TJSDate(jso));\r\n end;\r\n\r\n Result := seldate;\r\n end;\r\nend;\r\n\r\nprocedure TJQXCalendar.SetFirstDayOfWeek(AValue: TJQXDayOfWeek);\r\nbegin\r\n FFirstDayOFWeek := AValue;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXCalendar.SetMaxDate(AValue: TDateTime);\r\nbegin\r\n if (AValue < 0) then\r\n Exit;\r\n\r\n FMaxDate := AValue;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXCalendar.SetMinDate(AValue: TDateTime);\r\nbegin\r\n if (AValue < 0) then\r\n Exit;\r\n\r\n FMinDate := AValue;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXCalendar.SetMultiSelect(AValue: Boolean );\r\nbegin\r\n FMultiSelect := AValue;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXCalendar.SetOtherMonthDays(AValue: Boolean );\r\nbegin\r\n FOtherMonthDays := AValue;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXCalendar.SetShowToday(AValue: Boolean );\r\nbegin\r\n FShowToday := AValue;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXCalendar.SetTheme(AValue: string);\r\nbegin\r\n inherited;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n TJQXWidgetCalendar(JQuery(GetJQID)).jqxCalendar('theme', GetTheme(AValue))\r\nend;\r\n\r\nprocedure TJQXCalendar.SetWeekNumbers(AValue: Boolean );\r\nbegin\r\n FWeekNumbers := AValue;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXCalendar.SetEnabled(Value: Boolean );\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXCalendar.SetWidth(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateSize;\r\nend;\r\n\r\nprocedure TJQXCalendar.SetHeight(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateSize;\r\nend;\r\n\r\n\r\n{ TJQXDateTimeInput }\r\n\r\nprocedure TJQXDateTimeInput.CreateInitialize;\r\nbegin\r\n inherited;\r\n FDate := Date;\r\n FFirstDayOfWeek := dowMonday;\r\n FIsLoaded := False;\r\n FKind := diTime;\r\n FMaxDate := 0;\r\n FMinDate := 0;\r\n FMultiSelect := False;\r\n FShowToday := False;\r\n FWeekNumbers := False;\r\n Height := 21;\r\n Width := 220;\r\n\r\n RequiredScripts.Add('jqxdatetimeinput.js');\r\n RequiredScripts.Add('jqxcalendar.js');\r\n RequiredScripts.Add('globalization/globalize.js');\r\n\r\n ScriptLoaded := not AddRequiredScripts;\r\nend;\r\n\r\nprocedure TJQXDateTimeInput.InitJQuery;\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if FIsLoaded then\r\n Exit;\r\n\r\n if not ScriptLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n FIsLoaded := True;\r\n TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput(TJSJSON.parseObject('{\"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height) + '}'));\r\n TJQXWidgetDateTimeInput(JQuery(GetJQID)).on('valueChanged', @HandleDateClick);\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TJQXDateTimeInput.UpdateElement;\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('theme', GetTheme(Theme));\r\n end;\r\nend;\r\n\r\nfunction TJQXDateTimeInput.HandleDateClick(Event: TJQXEvent): Boolean ;\r\nvar\r\n Args: TJQXCalendarEventArgs;\r\n jso: TJSObject;\r\nbegin\r\n if Assigned(OnDateClick) then\r\n begin\r\n Args := TJQXCalendarEventArgs.Create;\r\n if MultiSelect then\r\n begin\r\n jso := TJSObject(Event.Args.Properties['date']);\r\n Args.Date := JSDateToTDate(TJSDate(jso.Properties['to']));\r\n end\r\n else\r\n Args.Date := JSDateToTDate(TJSDate(Event.Args.Properties['date']));\r\n\r\n FDate := Args.Date;\r\n OnDateClick(Self, Args);\r\n Args.Free;\r\n end;\r\n\r\n Result := True;\r\nend;\r\n\r\nprocedure TJQXDateTimeInput.SetDate(AValue: TDateTime);\r\nvar\r\n seldate: string;\r\nbegin\r\n FDate := AValue;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if Kind = diTime then\r\n begin\r\n seldate := FormatDateTime('HH:mm:SS', AValue, TFormatSettings.Invariant);\r\n TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('val', seldate);\r\n end\r\n else if Kind = diDate then\r\n begin\r\n seldate := FormatDateTime('YYYY-MM-DD', AValue, TFormatSettings.Invariant);\r\n TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('setDate', seldate);\r\n end\r\n else\r\n begin\r\n seldate := FormatDateTime('YYYY-MM-DD HH:mm:SS', AValue, TFormatSettings.Invariant);\r\n TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('setDate', seldate);\r\n end;\r\n end;\r\n\r\nend;\r\n\r\nfunction TJQXDateTimeInput.GetDate: TDateTime;\r\nvar\r\n seldate: TDateTime;\r\n jso: TJSObject;\r\nbegin\r\n Result := FDate;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if MultiSelect then\r\n begin\r\n jso := TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('getRange');\r\n if Assigned(jso) then\r\n seldate := JSDateToTDate(TJSDate(jso.Properties['from']));\r\n end\r\n else\r\n begin\r\n jso := TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('getDate');\r\n if Assigned(jso) then\r\n seldate := JSDateToTDate(TJSDate(jso));\r\n end;\r\n\r\n Result := seldate;\r\n end;\r\nend;\r\n\r\nprocedure TJQXDateTimeInput.SetEndDate(AValue: TDateTime);\r\nbegin\r\n FEndDate := AValue;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('setRange', TDateToJSDate(FDate), TDateToJSDate(AValue));\r\nend;\r\n\r\nfunction TJQXDateTimeInput.GetEndDate: TDateTime;\r\nvar\r\n seldate: TDateTime;\r\n jso: TJSObject;\r\nbegin\r\n Result := FEndDate;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if MultiSelect then\r\n begin\r\n jso := TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('getRange');\r\n if Assigned(jso) then\r\n seldate := JSDateToTDate(TJSDate(jso.Properties['to']));\r\n end\r\n else\r\n begin\r\n jso := TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('getDate');\r\n if Assigned(jso) then\r\n seldate := JSDateToTDate(TJSDate(jso));\r\n end;\r\n\r\n Result := seldate;\r\n end;\r\nend;\r\n\r\nprocedure TJQXDateTimeInput.SetFirstDayOfWeek(AValue: TJQXDayOfWeek);\r\nvar\r\n dow: Integer;\r\nbegin\r\n FFirstDayOFWeek := AValue;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n case AValue of\r\n dowMonday: dow := 1;\r\n dowTuesday: dow := 2;\r\n dowWednesday: dow := 3;\r\n dowThursday: dow := 4;\r\n dowFriday: dow := 5;\r\n dowSaturday: dow := 6;\r\n dowSunday: dow := 0;\r\n dowLocaleDefault: dow := 1;\r\n end;\r\n\r\n TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('firstDayOfWeek', dow);\r\n end;\r\nend;\r\n\r\nprocedure TJQXDateTimeInput.SetKind(AValue: TJQXInputKind);\r\nbegin\r\n FKind := AValue;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if AValue = diDate then\r\n begin\r\n TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('showCalendarButton', True);\r\n TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('showTimeButton', False);\r\n TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('formatString', 'dd/MM/yyyy');\r\n end\r\n else if AValue = diTime then\r\n begin\r\n TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('showCalendarButton', False);\r\n TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('showTimeButton', True);\r\n TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('formatString', 'HH:mm:ss');\r\n end\r\n else\r\n begin\r\n TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('showCalendarButton', True);\r\n TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('showTimeButton', True);\r\n TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('formatString', 'dd/MM/yyyy HH:mm:ss');\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TJQXDateTimeInput.SetMaxDate(AValue: TDateTime);\r\nbegin\r\n FMaxDate := AValue;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if (FMaxDate < 0) then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('setMaxDate', TDateToJSDate(AValue));\r\nend;\r\n\r\nprocedure TJQXDateTimeInput.SetMinDate(AValue: TDateTime);\r\nbegin\r\n FMinDate := AValue;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if (FMinDate < 0) then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('setMinDate', TDateToJSDate(AValue));\r\nend;\r\n\r\nprocedure TJQXDateTimeInput.SetMultiSelect(AValue: Boolean );\r\nbegin\r\n FMultiSelect := AValue;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if (AValue) then\r\n TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('selectionMode', 'range')\r\n else\r\n TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('selectionMode', 'default');\r\n end;\r\nend;\r\n\r\nprocedure TJQXDateTimeInput.SetShowToday(AValue: Boolean );\r\nbegin\r\n FShowToday := AValue;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('showFooter', AValue);\r\nend;\r\n\r\nprocedure TJQXDateTimeInput.SetTheme(AValue: string);\r\nbegin\r\n inherited;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('theme', GetTheme(AValue))\r\nend;\r\n\r\nprocedure TJQXDateTimeInput.SetWeekNumbers(AValue: Boolean );\r\nbegin\r\n FWeekNumbers := AValue;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('showWeekNumbers', AValue);\r\nend;\r\n\r\nprocedure TJQXDateTimeInput.SetEnabled(Value: Boolean );\r\nbegin\r\n inherited;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('disabled', not Value)\r\nend;\r\n\r\nprocedure TJQXDateTimeInput.SetWidth(AValue: Integer);\r\nbegin\r\n inherited;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('width', IntToStr(AValue) + 'px');\r\nend;\r\n\r\nprocedure TJQXDateTimeInput.SetHeight(AValue: Integer);\r\nbegin\r\n inherited;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n TJQXWidgetDateTimeInput(JQuery(GetJQID)).jqxDateTimeInput('height', IntToStr(AValue) + 'px');\r\nend;\r\n\r\n\r\n{ TJQXMenu }\r\n\r\nprocedure TJQXMenu.CreateInitialize;\r\nbegin\r\n inherited;\r\n FIsLoaded := False;\r\n Mode := mmHorizontal;\r\n Height := 20;\r\n Width := 220;\r\n\r\n RequiredScripts.Add('jqxmenu.js');\r\n\r\n ScriptLoaded := not AddRequiredScripts;\r\nend;\r\n\r\nprocedure TJQXMenu.BeginUpdate;\r\nbegin\r\n inc(FUpdateCount);\r\nend;\r\n\r\nprocedure TJQXMenu.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\nprocedure TJQXMenu.InitJQuery;\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if FIsLoaded then\r\n Exit;\r\n\r\n if not ScriptLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n FIsLoaded := True;\r\n// TJQXWidgetMenu(JQuery(GetJQID)).jqxMenu(string(TJSJSON.parse('{\"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height) + '}')));\r\n TJQXWidgetMenu(JQuery(GetJQID)).jqxMenu('width', IntToStr(Width) + 'px');\r\n TJQXWidgetMenu(JQuery(GetJQID)).jqxMenu('height', IntToStr(Height) + 'px');\r\n TJQXWidgetMenu(JQuery(GetJQID)).on('itemclick', @HandleItemClick);\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nfunction TJQXMenu.GetMenuSource(Item: TMenuItem): string;\r\nvar\r\n I: Integer;\r\n it: TMenuItem;\r\nbegin\r\n result := '';\r\n\r\n if Assigned(Item.Items) then\r\n begin\r\n for I := 0 to Item.Items.Count - 1 do\r\n begin\r\n it := TMenuItem(Item.Items[I]);\r\n if I > 0 then\r\n result := result + ', ';\r\n\r\n result := result + '{ \"label\": \"' + it.Caption + '\", \"id\": \"' + it.Name + '\", \"items\": ' + GetMenuSource(it) + ' }';\r\n end;\r\n end;\r\n\r\n result := '[' + result + ']';\r\nend;\r\n\r\nfunction TJQXMenu.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\nprocedure TJQXMenu.UpdateElement;\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) and Assigned(Menu) then\r\n begin\r\n TJQXWidgetMenu(JQuery(GetJQID)).jqxMenu(TJSJSON.parseObject('{\"source\": ' + GetMenuSource(Menu.Items) + ', \"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height) + '}'));\r\n\r\n case Mode of\r\n mmHorizontal: TJQXWidgetMenu(JQuery(GetJQID)).jqxMenu('mode', 'horizontal');\r\n mmVertical: TJQXWidgetMenu(JQuery(GetJQID)).jqxMenu('mode', 'vertical');\r\n mmPopup: TJQXWidgetMenu(JQuery(GetJQID)).jqxMenu('mode', 'popup');\r\n end;\r\n\r\n TJQXWidgetMenu(JQuery(GetJQID)).jqxMenu('theme', GetTheme(Theme));\r\n TJQXWidgetMenu(JQuery(GetJQID)).jqxMenu('disabled', not Enabled);\r\n TJQXWidgetMenu(JQuery(GetJQID)).jqxMenu('width', IntToStr(Width) + 'px');\r\n TJQXWidgetMenu(JQuery(GetJQID)).jqxMenu('height', IntToStr(Height) + 'px');\r\n end;\r\nend;\r\n\r\nfunction TJQXMenu.HandleItemClick(Event: TJQXElementEvent): Boolean;\r\nvar\r\n Args: TJQXMenuEventArgs;\r\n h: TJSHTMLElement;\r\n it: TMenuItem;\r\nbegin\r\n Args := TJQXMenuEventArgs.Create;\r\n h := TJSHTMLElement(Event.Args);\r\n it := GetItemByName(Menu.Items, h.id);\r\n if Assigned(it) then\r\n begin\r\n Args.Source := it;\r\n\r\n if Assigned(it.OnClick) then\r\n it.OnClick;\r\n\r\n if Assigned(OnItemClick) then\r\n OnItemClick(Self, Args);\r\n\r\n if Assigned(Menu.OnChange) then\r\n Menu.OnChange(Self, it, False);\r\n end;\r\n Args.Free;\r\n\r\n Result := True;\r\nend;\r\n\r\nprocedure TJQXMenu.SetMode(AValue: TJQXMenuMode);\r\nbegin\r\n FMode := AValue;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXMenu.SetTheme(AValue: string);\r\nbegin\r\n inherited;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n TJQXWidgetMenu(JQuery(GetJQID)).jqxMenu('theme', GetTheme(AValue))\r\nend;\r\n\r\nprocedure TJQXMenu.SetMenu(AValue: TMainMenu);\r\nbegin\r\n if Assigned(AValue) then\r\n begin\r\n FMenu := AValue;\r\n FMenu.Visible := False;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TJQXMenu.SetEnabled(Value: Boolean );\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXMenu.SetWidth(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXMenu.SetHeight(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXMenu.ToggleItem(AMenuItem: TMenuItem; Disabled: Boolean);\r\nbegin\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if not Assigned(AMenuItem) then\r\n Exit;\r\n\r\n if AMenuItem.Name = '' then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n TJQXWidgetMenu(JQuery(GetJQID)).jqxMenu('disable', AMenuItem.Name, Disabled);\r\nend;\r\n\r\nprocedure TJQXMenu.SetItemDisabled(AMenuItem: TMenuItem);\r\nbegin\r\n ToggleItem(AMenuItem, True);\r\nend;\r\n\r\nprocedure TJQXMenu.SetItemEnabled(AMenuItem: TMenuItem);\r\nbegin\r\n ToggleItem(AMenuItem, False);\r\nend;\r\n\r\n{ TJQXMaskedInput }\r\n\r\nprocedure TJQXMaskedInput.CreateInitialize;\r\nbegin\r\n inherited;\r\n FMask := '(###)###-####';\r\n Height := 21;\r\n Width := 120;\r\n FIsLoaded := False;\r\n\r\n RequiredScripts.Add('jqxmaskedinput.js');\r\n\r\n ScriptLoaded := not AddRequiredScripts;\r\nend;\r\n\r\nprocedure TJQXMaskedInput.InitJQuery;\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if FIsLoaded then\r\n Exit;\r\n\r\n if not ScriptLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n FIsLoaded := True;\r\n TJQXWidgetMaskedInput(JQuery(GetJQID)).jqxMaskedInput(TJSJSON.parseObject('{\"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height) + ', \"mask\": \"' + mask + '\"}'));\r\n TJQXWidgetMaskedInput(JQuery(GetJQID)).on('valueChanged', @HandleMaskedInputChange);\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TJQXMaskedInput.UpdateElement;\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if not FIsLoaded then\r\n begin\r\n if Assigned(Container) then\r\n begin\r\n\r\n if Assigned(document.getElementById(GetJQID)) then\r\n begin\r\n TJQXWidgetMaskedInput(JQuery(GetJQID)).jqxMaskedInput(TJSJSON.parseObject('{\"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height) + ', \"mask\": \"' + mask + '\"}'));\r\n TJQXWidgetMaskedInput(JQuery(GetJQID)).on('valueChanged', @HandleMaskedInputChange);\r\n UpdateElement;\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n FIsLoaded := True;\r\n\r\n if FIsLoaded then\r\n begin\r\n TJQXWidgetMaskedInput(JQuery(GetJQID)).jqxMaskedInput(TJSJSON.parseObject('{\"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height) + ', \"mask\": \"' + mask + '\"}'));\r\n TJQXWidgetMaskedInput(JQuery(GetJQID)).jqxMaskedInput('disabled', not Enabled);\r\n TJQXWidgetMaskedInput(JQuery(GetJQID)).jqxMaskedInput('value', Text);\r\n TJQXWidgetMaskedInput(JQuery(GetJQID)).jqxMaskedInput('theme', GetTheme(theme))\r\n// TJQXWidgetMaskedInput(JQuery(GetJQID)).jqxMaskedInput('readOnly', True);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TJQXMaskedInput.HandleMaskedInputChange(Event: TJQXElementEvent): Boolean ;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\n Result := True;\r\nend;\r\n\r\nfunction TJQXMaskedInput.GetText: string;\r\nbegin\r\n inherited;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n Result := TJQXWidgetMaskedInput(JQuery(GetJQID)).jqxMaskedInput('value');\r\n if not Assigned(Result) then\r\n Result := FText;\r\nend;\r\n\r\nprocedure TJQXMaskedInput.SetMask(AValue: string);\r\nbegin\r\n inherited;\r\n FMask := AValue;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXMaskedInput.SetText(AValue: string);\r\nbegin\r\n inherited;\r\n FText := AValue;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n TJQXWidgetMaskedInput(JQuery(GetJQID)).jqxMaskedInput('value', AValue);\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXMaskedInput.SetTheme(AValue: string);\r\nbegin\r\n inherited;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n TJQXWidgetMaskedInput(JQuery(GetJQID)).jqxMaskedInput('theme', GetTheme(AValue))\r\nend;\r\n\r\nprocedure TJQXMaskedInput.SetEnabled(Value: Boolean );\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXMaskedInput.SetWidth(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXMaskedInput.SetHeight(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\n{ TJQXColorPicker }\r\n\r\nprocedure TJQXColorPicker.CreateInitialize;\r\nbegin\r\n inherited;\r\n Color := clRed;\r\n ColorMode := cmSaturation;\r\n Enabled := True;\r\n Height := 200;\r\n Width := 200;\r\n FIsLoaded := False;\r\n\r\n RequiredScripts.Add('jqxcolorpicker.js');\r\n\r\n ScriptLoaded := not AddRequiredScripts;\r\nend;\r\n\r\nprocedure TJQXColorPicker.BindEvents;\r\nbegin\r\n //disabled\r\nend;\r\n\r\nprocedure TJQXColorPicker.BeginUpdate;\r\nbegin\r\n inc(FUpdateCount);\r\nend;\r\n\r\nprocedure TJQXColorPicker.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\nprocedure TJQXColorPicker.InitJQuery;\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if FIsLoaded then\r\n Exit;\r\n\r\n if not ScriptLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n FIsLoaded := True;\r\n TJQXWidgetColorPicker(JQuery(GetJQID)).jqxColorPicker(TJSJSON.parseObject('{\"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height) + '}'));\r\n TJQXWidgetColorPicker(JQuery(GetJQID)).on('colorchange', @HandleChange);\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TJQXColorPicker.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 FIsLoaded then\r\n begin\r\n TJQXWidgetColorPicker(JQuery(GetJQID)).jqxColorPicker('setColor', '#' + ColorToHex(FColor));\r\n if ColorMode = cmHue then\r\n TJQXWidgetColorPicker(JQuery(GetJQID)).jqxColorPicker('colorMode', 'hue')\r\n else\r\n TJQXWidgetColorPicker(JQuery(GetJQID)).jqxColorPicker('colorMode', 'saturation');\r\n TJQXWidgetColorPicker(JQuery(GetJQID)).jqxColorPicker('disabled', not Enabled);\r\n TJQXWidgetColorPicker(JQuery(GetJQID)).jqxColorPicker('width', IntToStr(Width) + 'px');\r\n TJQXWidgetColorPicker(JQuery(GetJQID)).jqxColorPicker('height', IntToStr(Height) + 'px');\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TJQXColorPicker.HandleChange(Event: TJQXEvent): Boolean ;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\n Result := True;\r\nend;\r\n\r\nfunction TJQXColorPicker.GetColor: TColor;\r\nvar\r\n o: TJSObject;\r\nbegin\r\n Result := FColor;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if FIsLoaded then\r\n begin\r\n o := TJSObject(TJQXWidgetColorPicker(JQuery(GetJQID)).jqxColorPicker('getColor'));\r\n if Assigned(0) then\r\n Result := HexToColor(string(o.Properties['hex']));\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TJQXColorPicker.SetColorPickerColor(AValue: TColor);\r\nbegin\r\n FColor := AValue;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXColorPicker.SetColorMode(AValue: TJQXColorMode);\r\nbegin\r\n FColorMode := AValue;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXColorPicker.SetEnabled(Value: Boolean );\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXColorPicker.SetWidth(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXColorPicker.SetHeight(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\n\r\n{ TJQXComboBox }\r\n\r\nprocedure TJQXComboBox.CreateInitialize;\r\nbegin\r\n inherited;\r\n FAutoComplete := false;\r\n FItemIndex := -1;\r\n FItems := TStringList.Create;\r\n FItems.OnChange := HandleItemsChanged;\r\n FDisabled := TList.Create;\r\n FSelected := TList.Create;\r\n FMultiSelect := False;\r\n Enabled := True;\r\n Height := 21;\r\n Width := 200;\r\n FIsLoaded := False;\r\n\r\n RequiredScripts.Add('jqxbuttons.js');\r\n RequiredScripts.Add('jqxscrollbar.js');\r\n RequiredScripts.Add('jqxlistbox.js');\r\n RequiredScripts.Add('jqxcombobox.js');\r\n\r\n ScriptLoaded := not AddRequiredScripts;\r\nend;\r\n\r\ndestructor TJQXComboBox.Destroy;\r\nbegin\r\n FItems.Free;\r\n FDisabled.Free;\r\n FSelected.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TJQXComboBox.HandleItemsChanged(Sender: TObject);\r\nbegin\r\n UpdateElement;\r\nend;\r\n\r\nfunction TJQXComboBox.ItemsToJSON: string;\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := 0 to FItems.Count - 1 do\r\n begin\r\n if I > 0 then\r\n Result := Result + ', ';\r\n Result := Result + '\"' + FItems[I] + '\"';\r\n end;\r\n\r\n Result := '[' + Result + ']';\r\nend;\r\n\r\nprocedure TJQXComboBox.InitJQuery;\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if FIsLoaded then\r\n Exit;\r\n\r\n if not ScriptLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n FIsLoaded := True;\r\n TJQXWidgetComboBox(JQuery(GetJQID)).jqxComboBox(TJSJSON.parseObject('{\"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height) + '}'));\r\n TJQXWidgetComboBox(JQuery(GetJQID)).on('change', @HandleChange);\r\n TJQXWidgetComboBox(JQuery(GetJQID + ' input')).on('blur', @HandleExit);\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TJQXComboBox.UpdateElement;\r\nvar\r\n I: 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 if FIsLoaded then\r\n begin\r\n TJQXWidgetComboBox(JQuery(GetJQID)).jqxComboBox(TJSJSON.parseObject('{\"source\": ' + ItemsToJSON + '}'));\r\n TJQXWidgetComboBox(JQuery(GetJQID)).jqxComboBox('disabled', not Enabled);\r\n TJQXWidgetComboBox(JQuery(GetJQID)).jqxComboBox('selectedIndex', FItemIndex);\r\n TJQXWidgetComboBox(JQuery(GetJQID)).jqxComboBox('width', IntToStr(Width) + 'px');\r\n TJQXWidgetComboBox(JQuery(GetJQID)).jqxComboBox('height', IntToStr(Height) + 'px');\r\n TJQXWidgetComboBox(JQuery(GetJQID)).jqxComboBox('enableBrowserBoundsDetection', True);\r\n TJQXWidgetComboBox(JQuery(GetJQID)).jqxComboBox('checkboxes', FMultiSelect);\r\n TJQXWidgetComboBox(JQuery(GetJQID)).jqxComboBox('autoComplete', FAutoComplete);\r\n TJQXWidgetComboBox(JQuery(GetJQID)).jqxComboBox('placeHolder', FTextHint);\r\n TJQXWidgetComboBox(JQuery(GetJQID)).jqxComboBox('theme', GetTheme(theme));\r\n TJQXWidgetComboBox(JQuery(GetJQID)).jqxComboBox('val', FText);\r\n\r\n for I := 0 to Items.Count - 1 do\r\n begin\r\n if Disabled[I] then\r\n TJQXWidgetComboBox(JQuery(GetJQID)).jqxComboBox('disableAt', I)\r\n else\r\n TJQXWidgetComboBox(JQuery(GetJQID)).jqxComboBox('enableAt', I);\r\n\r\n if FSelected.Count > I then\r\n begin\r\n if FSelected.Items[I] then\r\n TJQXWidgetComboBox(JQuery(GetJQID)).jqxComboBox('checkIndex', I)\r\n else\r\n TJQXWidgetComboBox(JQuery(GetJQID)).jqxComboBox('uncheckIndex', I);\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TJQXComboBox.HandleChange(Event: TJQXEvent): Boolean ;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\n Result := True;\r\nend;\r\n\r\nfunction TJQXComboBox.HandleExit(Event: TJQXEvent): Boolean;\r\nbegin\r\n if Assigned(OnExit) then\r\n OnExit(Self);\r\n Result := True;\r\nend;\r\n\r\nfunction TJQXComboBox.GetItemIndex: Integer;\r\nbegin\r\n Result := FItemIndex;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n Result := StrToInt(TJQXWidgetComboBox(JQuery(GetJQID)).jqxComboBox('selectedIndex').ToString);\r\nend;\r\n\r\nfunction TJQXComboBox.GetDisabled(AIndex: Integer): Boolean ;\r\nbegin\r\n if (AIndex < FDisabled.Count) then\r\n Result := Boolean(FDisabled.Items[AIndex])\r\n else\r\n Result := False;\r\nend;\r\n\r\nprocedure TJQXComboBox.SetDisabled(AIndex: Integer; AValue: Boolean);\r\nbegin\r\n while (AIndex >= FDisabled.Count) do\r\n FDisabled.Add(false);\r\n\r\n FDisabled.Items[AIndex] := AValue;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if AValue then\r\n TJQXWidgetComboBox(JQuery(GetJQID)).jqxComboBox('disableAt', AIndex)\r\n else\r\n TJQXWidgetComboBox(JQuery(GetJQID)).jqxComboBox('enableAt', AIndex);\r\n end;\r\nend;\r\n\r\nfunction TJQXComboBox.GetSelected(AIndex: Integer): Boolean ;\r\nvar\r\n items: TJSArray;\r\n o: TJSObject;\r\n I: integer;\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 not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n Result := False;\r\n\r\n items := TJSArray(TJQXWidgetComboBox(JQuery(GetJQID)).jqxComboBox('getCheckedItems'));\r\n\r\n for I := 0 to items.Length - 1 do\r\n begin\r\n o := TJSObject(items[I]);\r\n if o.Properties['index'] = AIndex then\r\n Result := True;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TJQXComboBox.GetText: string;\r\nbegin\r\n inherited;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n Result := TJQXWidgetComboBox(JQuery(GetJQID)).jqxComboBox('val').toString;\r\n if not Assigned(Result) then\r\n Result := FText;\r\nend;\r\n\r\nprocedure TJQXComboBox.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 not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if AValue then\r\n TJQXWidgetComboBox(JQuery(GetJQID)).jqxComboBox('checkIndex', AIndex)\r\n else\r\n TJQXWidgetComboBox(JQuery(GetJQID)).jqxComboBox('uncheckIndex', AIndex);\r\n end;\r\nend;\r\n\r\nprocedure TJQXComboBox.SetItemIndex(AIndex: Integer);\r\nbegin\r\n FItemIndex := AIndex;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXComboBox.SetItems(AItems: TStringList);\r\nbegin\r\n FItems.Assign(AItems);\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXComboBox.SetEnabled(Value: Boolean);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXComboBox.SetWidth(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXComboBox.SetHeight(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXComboBox.SetMultiSelect(AValue: Boolean);\r\nbegin\r\n FMultiSelect := AValue;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXComboBox.SetAutoComplete(AValue: Boolean);\r\nbegin\r\n FAutoComplete := AValue;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXComboBox.SetText(const Value: string);\r\nbegin\r\n FText := Value;\r\n ItemIndex := -1;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXComboBox.SetTextHint(AValue: string);\r\nbegin\r\n FTextHint := AValue;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXComboBox.SetTheme(AValue: string);\r\nbegin\r\n inherited;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n TJQXWidgetComboBox(JQuery(GetJQID)).jqxComboBox('theme', GetTheme(AValue))\r\nend;\r\n\r\n{ TJQXDropDownList }\r\n\r\nprocedure TJQXDropDownList.CreateInitialize;\r\nbegin\r\n inherited;\r\n FItemIndex := -1;\r\n FItems := TStringList.Create;\r\n FItems.OnChange := HandleItemsChanged;\r\n FDisabled := TList.Create;\r\n FSelected := TList.Create;\r\n FMultiSelect := False;\r\n FTextHint := '';\r\n Enabled := True;\r\n Height := 21;\r\n Width := 200;\r\n FIsLoaded := False;\r\n\r\n RequiredScripts.Add('jqxbuttons.js');\r\n RequiredScripts.Add('jqxscrollbar.js');\r\n RequiredScripts.Add('jqxlistbox.js');\r\n RequiredScripts.Add('jqxcombobox.js');\r\n RequiredScripts.Add('jqxdropdownlist.js');\r\n\r\n ScriptLoaded := not AddRequiredScripts;\r\nend;\r\n\r\ndestructor TJQXDropDownList.Destroy;\r\nbegin\r\n FItems.Free;\r\n FDisabled.Free;\r\n FSelected.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TJQXDropDownList.ItemsToJSON: string;\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := 0 to FItems.Count - 1 do\r\n begin\r\n if I > 0 then\r\n Result := Result + ', ';\r\n Result := Result + '\"' + FItems[I] + '\"';\r\n end;\r\n\r\n Result := '[' + Result + ']';\r\nend;\r\n\r\nprocedure TJQXDropDownList.InitJQuery;\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if FIsLoaded then\r\n Exit;\r\n\r\n if not ScriptLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n FIsLoaded := True;\r\n TJQXWidgetDropDownList(JQuery(GetJQID)).jqxDropDownList(TJSJSON.parseObject('{\"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height) + '}'));\r\n TJQXWidgetDropDownList(JQuery(GetJQID)).on('change', @HandleChange);\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TJQXDropDownList.UpdateElement;\r\nvar\r\n I: 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 if FIsLoaded then\r\n begin\r\n TJQXWidgetDropDownList(JQuery(GetJQID)).jqxDropDownList(TJSJSON.parseObject('{\"source\": ' + ItemsToJSON + '}'));\r\n TJQXWidgetDropDownList(JQuery(GetJQID)).jqxDropDownList('disabled', not Enabled);\r\n TJQXWidgetDropDownList(JQuery(GetJQID)).jqxDropDownList('selectedIndex', FItemIndex);\r\n TJQXWidgetDropDownList(JQuery(GetJQID)).jqxDropDownList('width', IntToStr(Width) + 'px');\r\n TJQXWidgetDropDownList(JQuery(GetJQID)).jqxDropDownList('height', IntToStr(Height) + 'px');\r\n TJQXWidgetDropDownList(JQuery(GetJQID)).jqxDropDownList('enableBrowserBoundsDetection', True);\r\n TJQXWidgetDropDownList(JQuery(GetJQID)).jqxDropDownList('checkboxes', FMultiSelect);\r\n TJQXWidgetDropDownList(JQuery(GetJQID)).jqxDropDownList('placeHolder', FTextHint);\r\n TJQXWidgetDropDownList(JQuery(GetJQID)).jqxDropDownList('theme', GetTheme(Theme));\r\n\r\n for I := 0 to Items.Count - 1 do\r\n begin\r\n if Disabled[I] then\r\n TJQXWidgetDropDownList(JQuery(GetJQID)).jqxDropDownList('disableAt', I)\r\n else\r\n TJQXWidgetDropDownList(JQuery(GetJQID)).jqxDropDownList('enableAt', I);\r\n\r\n if FSelected.Count > I then\r\n begin\r\n if FSelected.Items[I] then\r\n TJQXWidgetDropDownList(JQuery(GetJQID)).jqxDropDownList('checkIndex', I)\r\n else\r\n TJQXWidgetDropDownList(JQuery(GetJQID)).jqxDropDownList('uncheckIndex', I);\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TJQXDropDownList.HandleChange(Event: TJQXEvent): Boolean ;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\n Result := True;\r\nend;\r\n\r\nprocedure TJQXDropDownList.HandleItemsChanged(Sender: TObject);\r\nbegin\r\n UpdateElement;\r\nend;\r\n\r\nfunction TJQXDropDownList.GetItemIndex: Integer;\r\nbegin\r\n Result := FItemIndex;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n Result := StrToInt(TJQXWidgetDropDownList(JQuery(GetJQID)).jqxDropDownList('selectedIndex').ToString);\r\nend;\r\n\r\nfunction TJQXDropDownList.GetDisabled(AIndex: Integer): Boolean ;\r\nbegin\r\n if (AIndex < FDisabled.Count) then\r\n Result := Boolean(FDisabled.Items[AIndex])\r\n else\r\n Result := False;\r\nend;\r\n\r\nprocedure TJQXDropDownList.SetDisabled(AIndex: Integer; AValue: Boolean);\r\nbegin\r\n while (AIndex >= FDisabled.Count) do\r\n FDisabled.Add(false);\r\n\r\n FDisabled.Items[AIndex] := AValue;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if AValue then\r\n TJQXWidgetDropDownList(JQuery(GetJQID)).jqxDropDownList('disableAt', AIndex)\r\n else\r\n TJQXWidgetDropDownList(JQuery(GetJQID)).jqxDropDownList('enableAt', AIndex);\r\n end;\r\nend;\r\n\r\nfunction TJQXDropDownList.GetSelected(AIndex: Integer): Boolean ;\r\nvar\r\n items: TJSArray;\r\n o: TJSObject;\r\n I: integer;\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 Assigned(ElementHandle) then\r\n begin\r\n Result := False;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n items := TJSArray(TJQXWidgetDropDownList(JQuery(GetJQID)).jqxDropDownList('getCheckedItems'));\r\n\r\n for I := 0 to items.Length - 1 do\r\n begin\r\n o := TJSObject(items[I]);\r\n if o.Properties['index'] = AIndex then\r\n Result := True;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TJQXDropDownList.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 not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if AValue then\r\n TJQXWidgetDropDownList(JQuery(GetJQID)).jqxDropDownList('checkIndex', AIndex)\r\n else\r\n TJQXWidgetDropDownList(JQuery(GetJQID)).jqxDropDownList('uncheckIndex', AIndex);\r\n end;\r\nend;\r\n\r\nprocedure TJQXDropDownList.SetItemIndex(AIndex: Integer);\r\nbegin\r\n FItemIndex := AIndex;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXDropDownList.SetItems(AItems: TStringList);\r\nbegin\r\n FItems.Assign(AItems);\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXDropDownList.SetEnabled(Value: Boolean);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXDropDownList.SetWidth(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXDropDownList.SetHeight(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXDropDownList.SetMultiSelect(AValue: Boolean);\r\nbegin\r\n FMultiSelect := AValue;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXDropDownList.SetTextHint(AValue: string);\r\nbegin\r\n FTextHint := AValue;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXDropDownList.SetTheme(AValue: string);\r\nbegin\r\n inherited;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n TJQXWidgetDropDownList(JQuery(GetJQID)).jqxDropDownList('theme', GetTheme(AValue))\r\nend;\r\n\r\n{ TJQXNumberInput }\r\n\r\nprocedure TJQXNumberInput.CreateInitialize;\r\nbegin\r\n inherited;\r\n FDigits := 3;\r\n FDecimalDigits := 0;\r\n FInputMode := imAdvanced;\r\n FMaxValue := 100;\r\n FMinValue := 0;\r\n FShowSpinButtons := True;\r\n FSpinButtonsStep := 1;\r\n FSymbol := '';\r\n FSymbolPosition := spLeft;\r\n FValue := 0;\r\n Height := 21;\r\n Width := 120;\r\n FIsLoaded := False;\r\n\r\n RequiredScripts.Add('jqxnumberinput.js');\r\n RequiredScripts.Add('jqxbuttons.js');\r\n\r\n ScriptLoaded := not AddRequiredScripts;\r\nend;\r\n\r\nprocedure TJQXNumberInput.BindEvents;\r\nbegin\r\n //disabled\r\nend;\r\n\r\nprocedure TJQXNumberInput.InitJQuery;\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if FIsLoaded then\r\n Exit;\r\n\r\n if not ScriptLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n FIsLoaded := True;\r\n TJQXWidgetNumberInput(JQuery(GetJQID)).jqxNumberInput(TJSJSON.parseObject('{\"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height) + '}'));\r\n TJQXWidgetNumberInput(JQuery(GetJQID)).on('valueChanged', @HandleNumberInputChange);\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TJQXNumberInput.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 FIsLoaded then\r\n begin\r\n TJQXWidgetNumberInput(JQuery(GetJQID)).jqxNumberInput(TJSJSON.parseObject('{\"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height) + '}'));\r\n TJQXWidgetNumberInput(JQuery(GetJQID)).jqxNumberInput('disabled', not Enabled);\r\n TJQXWidgetNumberInput(JQuery(GetJQID)).jqxNumberInput('spinButtons', FShowSpinButtons);\r\n TJQXWidgetNumberInput(JQuery(GetJQID)).jqxNumberInput('spinButtonsStep', FSpinButtonsStep);\r\n TJQXWidgetNumberInput(JQuery(GetJQID)).jqxNumberInput('symbol', FSymbol);\r\n TJQXWidgetNumberInput(JQuery(GetJQID)).jqxNumberInput('theme', GetTheme(Theme));\r\n\r\n if FSymbolPosition = spLeft then\r\n TJQXWidgetNumberInput(JQuery(GetJQID)).jqxNumberInput('symbolPosition', 'left')\r\n else\r\n TJQXWidgetNumberInput(JQuery(GetJQID)).jqxNumberInput('symbolPosition', 'right');\r\n\r\n TJQXWidgetNumberInput(JQuery(GetJQID)).jqxNumberInput('setDecimal', FValue);\r\n TJQXWidgetNumberInput(JQuery(GetJQID)).jqxNumberInput('digits', FDigits);\r\n TJQXWidgetNumberInput(JQuery(GetJQID)).jqxNumberInput('decimalDigits', FDecimalDigits);\r\n\r\n TJQXWidgetNumberInput(JQuery(GetJQID)).jqxNumberInput('max', FMaxValue);\r\n TJQXWidgetNumberInput(JQuery(GetJQID)).jqxNumberInput('min', FMinValue);\r\n// TJQXWidgetNumberInput(JQuery(GetJQID)).jqxNumberInput('max', 99999999);\r\n// TJQXWidgetNumberInput(JQuery(GetJQID)).jqxNumberInput('min', -99999999);\r\n\r\n if FInputMode = imAdvanced then\r\n TJQXWidgetNumberInput(JQuery(GetJQID)).jqxNumberInput('inputMode', 'advanced')\r\n else\r\n TJQXWidgetNumberInput(JQuery(GetJQID)).jqxNumberInput('inputMode', 'simple');\r\n\r\n TJQXWidgetNumberInput(JQuery(GetJQID)).jqxNumberInput('decimalSeparator', TFormatSettings.Invariant.DecimalSeparator);\r\n TJQXWidgetNumberInput(JQuery(GetJQID)).jqxNumberInput('groupSeparator', TFormatSettings.Invariant.ThousandSeparator);\r\n\r\n// TJQXWidgetNumberInput(JQuery(GetJQID)).jqxNumberInput('readOnly', True);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TJQXNumberInput.HandleNumberInputChange(Event: TJQXElementEvent): Boolean;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\n\r\n Result := True;\r\nend;\r\n\r\n{$HINTS OFF}\r\nfunction TJQXNumberInput.GetValue: Double;\r\nvar\r\n id: string;\r\n dbl: double;\r\nbegin\r\n Result := FValue;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n id := GetJQID;\r\n\r\n asm\r\n dbl = $(id).jqxNumberInput('getDecimal');\r\n end;\r\n\r\n Result := dbl;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TJQXNumberInput.SetDigits(AValue: Integer);\r\nbegin\r\n if AValue > 0 then\r\n FDigits := AValue;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXNumberInput.SetDecimalDigits(AValue: Integer);\r\nbegin\r\n if AValue >= 0 then\r\n FDecimalDigits := AValue;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXNumberInput.SetInputMode(AValue: TJQXInputMode);\r\nbegin\r\n FInputMode := AValue;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXNumberInput.SetMaxValue(AValue: Double);\r\nbegin\r\n if AValue <= 99999999 then\r\n FMaxValue := AValue;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXNumberInput.SetMinValue(AValue: Double);\r\nbegin\r\n if AValue >= -99999999 then\r\n FMinValue := AValue;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXNumberInput.SetShowSpinButtons(AValue: Boolean);\r\nbegin\r\n FShowSpinButtons := AValue;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXNumberInput.SetSpinButtonsStep(AValue: Integer);\r\nbegin\r\n FSpinButtonsStep := AValue;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXNumberInput.SetSymbol(AValue: string);\r\nbegin\r\n FSymbol := AValue;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXNumberInput.SetSymbolPosition(AValue: TJQXSymbolPosition);\r\nbegin\r\n FSymbolPosition := AValue;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXNumberInput.SetTheme(AValue: string);\r\nbegin\r\n inherited;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n TJQXWidgetNumberInput(JQuery(GetJQID)).jqxNumberInput('theme', GetTheme(AValue))\r\nend;\r\n\r\nprocedure TJQXNumberInput.SetValue(AValue: Double);\r\nbegin\r\n FValue := AValue;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n TJQXWidgetNumberInput(JQuery(GetJQID)).jqxNumberInput('setDecimal', AValue);\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXNumberInput.SetEnabled(Value: Boolean);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXNumberInput.SetWidth(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXNumberInput.SetHeight(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\n{ TJQXRating }\r\n\r\nprocedure TJQXRating.CreateInitialize;\r\nbegin\r\n inherited;\r\n FItemCount := 5;\r\n //FPrecision := TJQXRatingPrecision;\r\n FValue := 0;\r\n Height := 20;\r\n Width := 100;\r\n FIsLoaded := False;\r\n\r\n RequiredScripts.Add('jqxrating.js');\r\n\r\n ScriptLoaded := not AddRequiredScripts;\r\nend;\r\n\r\nprocedure TJQXRating.BindEvents;\r\nbegin\r\n //disabled\r\nend;\r\n\r\nprocedure TJQXRating.InitJQuery;\r\nbegin\r\n inherited;\r\n\r\n if FIsLoaded then\r\n Exit;\r\n\r\n if not ScriptLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n FIsLoaded := True;\r\n\r\n TJQXWidgetRating(JQuery(GetJQID)).jqxRating(TJSJSON.parseObject('{\"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height) + '}'));\r\n// TJQXWidgetRating(JQuery(GetJQID)).jqxRating(TJSJSON.parse('{\"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height) + ', \"precision\": 0.5}'));\r\n TJQXWidgetRating(JQuery(GetJQID)).on('change', @HandleRatingChange);\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TJQXRating.UpdateElement;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if FIsLoaded then\r\n begin\r\n TJQXWidgetRating(JQuery(GetJQID)).jqxRating(TJSJSON.parseObject('{\"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height) + '}'));\r\n TJQXWidgetRating(JQuery(GetJQID)).jqxRating('disabled', not Enabled);\r\n TJQXWidgetRating(JQuery(GetJQID)).jqxRating('setValue', FValue);\r\n TJQXWidgetRating(JQuery(GetJQID)).jqxRating('count', FItemCount);\r\n TJQXWidgetRating(JQuery(GetJQID)).jqxRating('itemHeight', Height);\r\n\r\n if FItemCount > 0 then\r\n TJQXWidgetRating(JQuery(GetJQID)).jqxRating('itemWidth', Width/FItemCount)\r\n else\r\n TJQXWidgetRating(JQuery(GetJQID)).jqxRating('itemWidth', Width);\r\n\r\n// if FPrecision = rpFull then\r\n// TJQXWidgetRating(JQuery(GetJQID)).jqxRating(TJSJSON.parse('{\"precision\": 1}'))\r\n// else\r\n// TJQXWidgetRating(JQuery(GetJQID)).jqxRating(TJSJSON.parse('{\"precision\": 0.5}'));\r\n//\r\n// if FPrecision = rpFull then\r\n// OutputDebugString('precision: full')\r\n// else\r\n// OutputDebugString('precision: half');\r\n// OutputDebugString(TJQXWidgetRating(JQuery(GetJQID)).jqxRating('precision').ToString);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TJQXRating.HandleRatingChange(Event: TJQXElementEvent): Boolean;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\n\r\n Result := True;\r\nend;\r\n\r\nfunction TJQXRating.GetValue: Double;\r\nvar\r\n s: string;\r\nbegin\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n s := TJQXWidgetRating(JQuery(GetJQID)).jqxRating('getValue').ToString;\r\n if s <> '' then\r\n Result := StrToFloat(s, TFormatSettings.Invariant);\r\n\r\n if not Assigned(Result) then\r\n Result := FValue;\r\nend;\r\n\r\nprocedure TJQXRating.SetValue(AValue: Double);\r\nbegin\r\n FValue := AValue;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXRating.SetItemCount(AValue: Integer);\r\nbegin\r\n if AValue > 0 then\r\n FItemCount := AValue;\r\n UpdateElement;\r\nend;\r\n\r\n//procedure TJQXRating.SetPrecision(AValue: TJQXRatingPrecision);\r\n//begin\r\n// FPrecision := AValue;\r\n// UpdateElement;\r\n//end;\r\n\r\nprocedure TJQXRating.SetEnabled(Value: Boolean);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXRating.SetWidth(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXRating.SetHeight(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\n\r\n{ TJQXButton }\r\n\r\nprocedure TJQXButton.BindEvents;\r\nbegin\r\n //disabled\r\nend;\r\n\r\nprocedure TJQXButton.CreateInitialize;\r\nbegin\r\n inherited;\r\n FCaption := Name;\r\n FCaptionPosition := xpLeft;\r\n FCaptionImageRelation := ipAfterImage;\r\n FImageURL := '';\r\n FImagePosition := xpLeft;\r\n FImageHeight := 16;\r\n FImageWidth := 16;\r\n FRoundedBorders := True;\r\n FTemplate := ttDefault;\r\n Width := 96;\r\n Height := 25;\r\n ElementPosition := epAbsolute;\r\n\r\n RequiredScripts.Add('jqxbuttons.js');\r\n\r\n ScriptLoaded := not AddRequiredScripts;\r\nend;\r\n\r\nfunction TJQXButton.HandleClick(Event: TJQXElementEvent): boolean;\r\nbegin\r\n Result := False;\r\n\r\n if not Enabled then\r\n Exit;\r\n\r\n if Assigned(OnClick) then\r\n OnClick(Self);\r\n\r\n Result := True;\r\nend;\r\n\r\nprocedure TJQXButton.InitJQuery;\r\nvar\r\n elbutton: TJSElement;\r\n elid: string;\r\nbegin\r\n inherited;\r\n\r\n if FIsLoaded then\r\n Exit;\r\n\r\n if not ScriptLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n elbutton := document.createElement('INPUT');\r\n elbutton['id'] := GetID + 'Button';\r\n ElementHandle.appendChild(elbutton);\r\n\r\n elid := GetJQID + 'Button';\r\n\r\n FIsLoaded := True;\r\n TJQXWidgetButton(JQuery(elid)).jqxButton(TJSJSON.parseObject('{\"value\": \"' + FCaption + '\", \"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height) + '}'));\r\n TJQXWidgetButton(JQuery(elid)).on('click', @HandleClick);\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TJQXButton.SetCaption(const Value: string);\r\nbegin\r\n FCaption := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXButton.SetCaptionImageRelation(const Value: TJQXImagePosition);\r\nbegin\r\n FCaptionImageRelation := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXButton.SetCaptionPosition(const Value: TJQXPosition);\r\nbegin\r\n FCaptionPosition := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXButton.SetEnabled(Value: boolean);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXButton.SetHeight(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXButton.SetImagePosition(const Value: TJQXPosition);\r\nbegin\r\n FImagePosition := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXButton.SetImageHeight(const Value: Integer);\r\nbegin\r\n FImageHeight := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXButton.SetImageURL(const Value: string);\r\nbegin\r\n FImageURL := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXButton.SetImageWidth(const Value: Integer);\r\nbegin\r\n FImageWidth := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXButton.SetRoundedBorders(const Value: Boolean);\r\nbegin\r\n FRoundedBorders := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXButton.SetTemplate(const Value: TJQXTemplate);\r\nbegin\r\n FTemplate := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXButton.SetTheme(AValue: string);\r\nbegin\r\n inherited;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n TJQXWidgetButton(JQuery(GetJQID + 'Button')).jqxButton('theme', GetTheme(AValue))\r\nend;\r\n\r\nprocedure TJQXButton.SetTop(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXButton.SetWidth(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXButton.UpdateElement;\r\nvar\r\n sborders: string;\r\n stpos: string;\r\n sipos: string;\r\n sirel: string;\r\n stemplate: string;\r\n elid: string;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if FIsLoaded then\r\n begin\r\n\r\n elid := GetJQID + 'Button';\r\n\r\n TJQXWidgetButton(JQuery(elid)).jqxButton(TJSJSON.parseObject('{\"value\": \"' + FCaption + '\", \"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height) + '}'));\r\n TJQXWidgetButton(JQuery(elid)).jqxButton('disabled', not Enabled);\r\n TJQXWidgetButton(JQuery(elid)).jqxButton('value', FCaption);\r\n TJQXWidgetButton(JQuery(elid)).jqxButton('theme', GetTheme(Theme));\r\n\r\n case CaptionPosition of\r\n xpLeft: stpos := 'left';\r\n xpTop: stpos := 'top';\r\n xpCenter: stpos := 'center';\r\n xpBottom: stpos := 'bottom';\r\n xpRight: stpos := 'right';\r\n xpTopLeft: stpos := 'topLeft';\r\n xpBottomLeft: stpos := 'bottomLeft';\r\n xpTopRight: stpos := 'topRight';\r\n xpBottomRight: stpos := 'bottomRight';\r\n end;\r\n\r\n TJQXWidgetButton(JQuery(elid)).jqxButton('textPosition', stpos);\r\n\r\n case ImagePosition of\r\n xpLeft: sipos := 'left';\r\n xpTop: sipos := 'top';\r\n xpCenter: sipos := 'center';\r\n xpBottom: sipos := 'bottom';\r\n xpRight: sipos := 'right';\r\n xpTopLeft: sipos := 'topLeft';\r\n xpBottomLeft: sipos := 'bottomLeft';\r\n xpTopRight: sipos := 'topRight';\r\n xpBottomRight: sipos := 'bottomRight';\r\n end;\r\n\r\n TJQXWidgetButton(JQuery(elid)).jqxButton('imgPosition', sipos);\r\n TJQXWidgetButton(JQuery(elid)).jqxButton('imgWidth', FImageWidth);\r\n TJQXWidgetButton(JQuery(elid)).jqxButton('imgHeight', FImageHeight);\r\n TJQXWidgetButton(JQuery(elid)).jqxButton('imgSrc', FImageURL);\r\n\r\n case CaptionImageRelation of\r\n ipAfterImage: sirel := 'imageBeforeText';\r\n ipAboveImage: sirel := 'textAboveImage';\r\n ipBelowImage: sirel := 'imageAboveText';\r\n ipBeforeImage: sirel := 'textBeforeImage';\r\n ipOverlay: sirel := 'overlay';\r\n end;\r\n TJQXWidgetButton(JQuery(elid)).jqxButton('textImageRelation', sirel);\r\n\r\n case Template of\r\n ttDefault: stemplate := 'default';\r\n ttPrimary: stemplate := 'primary';\r\n ttSuccess: stemplate := 'success';\r\n ttWarning: stemplate := 'warning';\r\n ttDanger: stemplate := 'danger';\r\n ttInfo: stemplate := 'info';\r\n end;\r\n TJQXWidgetButton(JQuery(elid)).jqxButton('template', stemplate);\r\n\r\n sborders := '';\r\n if FRoundedBorders then\r\n sborders := 'all';\r\n TJQXWidgetButton(JQuery(elid)).jqxButton('roundedCorners', sborders);\r\n end;\r\n end;\r\nend;\r\n\r\n{ TJQXButtonGroup }\r\n\r\nprocedure TJQXButtonGroup.BindEvents;\r\nbegin\r\n //disabled\r\nend;\r\n\r\nprocedure TJQXButtonGroup.CreateInitialize;\r\nbegin\r\n inherited;\r\n FSelectedButton := TList.Create;\r\n FEnableHover := True;\r\n FItems := TStringList.Create;\r\n FItems.OnChange := DoItemsChanged;\r\n FMode := gmDefault;\r\n FTemplate := ttDefault;\r\n Width := 250;\r\n Height := 25;\r\n\r\n FItems.Add('Button 1');\r\n\r\n RequiredScripts.Add('jqxbuttongroup.js');\r\n RequiredScripts.Add('jqxradiobutton.js');\r\n\r\n ScriptLoaded := not AddRequiredScripts;\r\nend;\r\n\r\ndestructor TJQXButtonGroup.Destroy;\r\nbegin\r\n FSelectedButton.Free;\r\n FItems.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TJQXButtonGroup.DoItemsChanged(Sender: TObject);\r\nbegin\r\n UpdateElement;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TJQXButtonGroup.FixMargin;\r\nvar\r\n jqid: string;\r\nbegin\r\n jqid := GetJQID;\r\n asm\r\n $(jqid).children().first().css({\r\n marginLeft: '0px'\r\n });\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nfunction TJQXButtonGroup.GetButtonSelect(Button: Integer): Boolean;\r\nvar\r\n a: TJSArray;\r\n o: TJSObject;\r\n I: Integer;\r\n v: String;\r\nbegin\r\n if (Button < FSelectedButton.Count) then\r\n Result := Boolean(FSelectedButton.Items[Button])\r\n else\r\n Result := False;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n\r\n if Mode = gmRadioButton then\r\n begin\r\n o := TJQXWidgetButtonGroup(JQuery(GetJQID)).jqxButtonGroup('getSelection');\r\n if Assigned(o) then\r\n begin\r\n I := StrToInt((o).ToString);\r\n Result := I = Button;\r\n end;\r\n end\r\n else if Mode = gmCheckBox then\r\n begin\r\n a := TJSArray(TJQXWidgetButtonGroup(JQuery(GetJQID)).jqxButtonGroup('getSelection'));\r\n\r\n for I := 0 to a.Length - 1 do\r\n begin\r\n v := string(a[I]);\r\n if (v <> '') then\r\n begin\r\n Result := StrToInt(v) = Button;\r\n if Result then\r\n Exit;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TJQXButtonGroup.HandleClick(Event: TJQXEvent): boolean;\r\nvar\r\n Args: TJQXButtonEventArgs;\r\nbegin\r\n Result := False;\r\n\r\n if not Enabled then\r\n Exit;\r\n\r\n if Assigned(OnClick) then\r\n begin\r\n Args := TJQXButtonEventArgs.Create;\r\n Args.ButtonIndex := StrToInt(string(Event.Args.Properties['index']));\r\n OnClick(Self, Args);\r\n Args.Free;\r\n end;\r\n\r\n Result := True;\r\nend;\r\n\r\nprocedure TJQXButtonGroup.InitJQuery;\r\nbegin\r\n inherited;\r\n\r\n if FIsLoaded then\r\n Exit;\r\n\r\n if not ScriptLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n FIsLoaded := True;\r\n TJQXWidgetButtonGroup(JQuery(GetJQID)).jqxButtonGroup(TJSJSON.parseObject('{\"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height) + '}'));\r\n TJQXWidgetButtonGroup(JQuery(GetJQID)).on('buttonclick', @HandleClick);\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TJQXButtonGroup.SetButtonSelect(Button: Integer;\r\n const Value: Boolean);\r\nbegin\r\n while (Button >= FSelectedButton.Count) do\r\n FSelectedButton.Add(false);\r\n\r\n if (ButtonSelect[Button] = True) and (Value) then\r\n Exit;\r\n\r\n FSelectedButton.Items[Button] := Value;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n TJQXWidgetButtonGroup(JQuery(GetJQID)).jqxButtonGroup('setSelection', Button)\r\nend;\r\n\r\nprocedure TJQXButtonGroup.SetEnabled(Value: boolean);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXButtonGroup.SetEnableHover(const Value: Boolean);\r\nbegin\r\n FEnableHover := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXButtonGroup.SetHeight(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXButtonGroup.SetItems(const AItems: TStringList);\r\nbegin\r\n FItems.Assign(AItems);\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXButtonGroup.SetMode(const Value: TJQXGroupMode);\r\nbegin\r\n FMode := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXButtonGroup.SetTemplate(const Value: TJQXTemplate);\r\nbegin\r\n FTemplate := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXButtonGroup.SetTheme(AValue: string);\r\nbegin\r\n inherited;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n TJQXWidgetButtonGroup(JQuery(GetJQID)).jqxButtonGroup('theme', GetTheme(AValue));\r\n FixMargin;\r\n end;\r\nend;\r\n\r\nprocedure TJQXButtonGroup.SetWidth(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXButtonGroup.UpdateElement;\r\nvar\r\n smode: string;\r\n stemplate: string;\r\n I: integer;\r\n innerHTML: string;\r\nbegin\r\n inherited;\r\n\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n innerHTML := '';\r\n\r\n if FItems.Count > 0 then\r\n begin\r\n for I := 0 to FItems.Count - 1 do\r\n begin\r\n if FItems[I] <> '' then\r\n innerHTML := innerHTML + '
' + FItems[I] + '
'\r\n else\r\n innerHTML := innerHTML + '
 
';\r\n end;\r\n end;\r\n Container.innerHTML := innerHTML;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if FIsLoaded then\r\n begin\r\n TJQXWidgetButtonGroup(JQuery(GetJQID)).jqxButtonGroup(TJSJSON.parseObject('{\"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height) + '}'));\r\n\r\n case FMode of\r\n gmDefault: smode := 'default';\r\n gmCheckBox: smode := 'checkbox';\r\n gmRadioButton: smode := 'radio';\r\n end;\r\n TJQXWidgetButtonGroup(JQuery(GetJQID)).jqxButtonGroup('mode', smode);\r\n\r\n case Template of\r\n ttDefault: stemplate := 'default';\r\n ttPrimary: stemplate := 'primary';\r\n ttSuccess: stemplate := 'success';\r\n ttWarning: stemplate := 'warning';\r\n ttDanger: stemplate := 'danger';\r\n ttInfo: stemplate := 'info';\r\n end;\r\n TJQXWidgetButtonGroup(JQuery(GetJQID)).jqxButtonGroup('template', stemplate);\r\n\r\n TJQXWidgetButtonGroup(JQuery(GetJQID)).jqxButtonGroup('enableHover', FEnableHover);\r\n TJQXWidgetButtonGroup(JQuery(GetJQID)).jqxButtonGroup('disabled', not Enabled);\r\n TJQXWidgetButtonGroup(JQuery(GetJQID)).jqxButtonGroup('theme', GetTheme(Theme));\r\n\r\n if Mode <> gmDefault then\r\n begin\r\n for I := 0 to Items.Count - 1 do\r\n TJQXWidgetButtonGroup(JQuery(GetJQID)).jqxButtonGroup('setSelection', ButtonSelect[I])\r\n end;\r\n end;\r\n\r\n FixMargin;\r\n end;\r\nend;\r\n\r\n{ TJQXKnob }\r\n\r\nprocedure TJQXKnob.CreateInitialize;\r\nbegin\r\n inherited;\r\n FAppearance := TJQXKnobAppearance.Create(Self);\r\n FValue := 0;\r\n FStartAngle := 120;\r\n FEndAngle := 420;\r\n FMaximum := 100;\r\n FMinimum := 0;\r\n FStep := 1;\r\n Width := 200;\r\n Height := 200;\r\n FIsLoaded := False;\r\n\r\n RequiredScripts.Add('jqxdraw.js');\r\n RequiredScripts.Add('jqxknob.js');\r\n\r\n ScriptLoaded := not AddRequiredScripts;\r\nend;\r\n\r\ndestructor TJQXKnob.Destroy;\r\nbegin\r\n FAppearance.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TJQXKnob.BindEvents;\r\nbegin\r\n //disabled\r\nend;\r\n\r\nprocedure TJQXKnob.InitJQuery;\r\nbegin\r\n inherited;\r\n\r\n if FIsLoaded then\r\n Exit;\r\n\r\n if not ScriptLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n FIsLoaded := True;\r\n// TJQXWidgetKnob(JQuery(GetJQID)).jqxKnob(TJSJSON.parseObject('{\"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height) + '}'));\r\n TJQXWidgetKnob(JQuery(GetJQID)).jqxKnob(TJSJSON.parseObject('{\"startAngle\": ' + IntToStr(FStartAngle) + ', \"endAngle\": ' + IntToStr(FEndAngle) + ', \"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height) + '}'));\r\n TJQXWidgetKnob(JQuery(GetJQID)).on('change', @HandleKnobChange);\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TJQXKnob.UpdateElement;\r\nvar\r\n sline: string;\r\n spointer: string;\r\n sbgcolor: string;\r\n sbcolor: string;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if FIsLoaded then\r\n begin\r\n TJQXWidgetKnob(JQuery(GetJQID)).jqxKnob(TJSJSON.parseObject('{\"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height) + '}'));\r\n\r\n TJQXWidgetKnob(JQuery(GetJQID)).jqxKnob(TJSJSON.parseObject('{\"labels\": {\"offset\": \"'\r\n + IntToStr(Appearance.Labels.Offset) + '%\", \"step\": ' + IntToStr(Appearance.Labels.Step) + ', \"visible\": '\r\n + LowerCase(BoolToStr(Appearance.Labels.Visible, True)) + '}}'));\r\n\r\n TJQXWidgetKnob(JQuery(GetJQID)).jqxKnob(TJSJSON.parseObject('{\"progressBar\": {\"style\": { \"fill\": \"'\r\n + ColorToHTML(Appearance.ProgressBar.Color) + '\"}, \"size\": \"'\r\n + IntToStr(Appearance.ProgressBar.Size) + '%\", \"offset\": \"'\r\n + IntToStr(Appearance.ProgressBar.Offset) + '%\", \"background\": {\"fill\": \"'\r\n + ColorToHTML(Appearance.Progressbar.BackgroundColor) + '\", \"stroke\": \"'\r\n + ColorToHTML(Appearance.ProgressBar.BorderColor) + '\"}}}'));\r\n\r\n sline := 'line';\r\n if Appearance.Marks.MarkType = mtCircle then\r\n sline := 'circle';\r\n\r\n TJQXWidgetKnob(JQuery(GetJQID)).jqxKnob(TJSJSON.parseObject('{\"marks\": {\"colorRemaining\": {\"color\": \"'\r\n + ColorToHTML(Appearance.Marks.ColorRemaining) + '\", \"border\": \"'\r\n + ColorToHTML(Appearance.Marks.BorderColorRemaining) + '\"}, \"colorProgress\": {\"color\": \"'\r\n + ColorToHTML(Appearance.Marks.ColorProgress) + '\", \"border\": \"'\r\n + ColorToHTML(Appearance.Marks.BorderColorProgress) + '\"}, \"type\": \"'\r\n + sline + '\", \"offset\": \"' + IntToStr(Appearance.Marks.Offset) + '%\", \"thickness\": '\r\n + IntToStr(Appearance.Marks.Width) + ', \"size\": \"' + IntToStr(Appearance.Marks.Size)\r\n + '%\", \"majorSize\": \"' + IntToStr(Appearance.Marks.MajorSize) + '%\", \"majorInterval\": '\r\n + IntToStr(Appearance.Marks.MajorInterval) + ', \"minorInterval\": ' + IntToStr(Appearance.Marks.MinorInterval) + '}}'));\r\n\r\n// TJQXWidgetKnob(JQuery(GetJQID)).jqxKnob(TJSJSON.parseObject('{\"dial\": {\"innerRadius\": \"40%\", \"outerRadius\": \"50%\", \"style\": { \"stroke\": \"#ff0000\", \"strokeWidth\": 1, \"fill\": { \"color\": \"#66707e\", \"gradientType\": \"linear\", \"gradientStops\": [[0, 1], [50, 0.4], [100, 1]] }}}}'));\r\n\r\n case Appearance.Pointer.PointerType of\r\n ptArrow: spointer := 'arrow';\r\n ptCircle: spointer := 'circle';\r\n ptLine: spointer := 'line';\r\n end;\r\n\r\n TJQXWidgetKnob(JQuery(GetJQID)).jqxKnob(TJSJSON.parseObject('{\"pointer\": {\"type\": \"'\r\n + spointer + '\", \"style\": { \"fill\": \"'\r\n + ColorToHTML(Appearance.Pointer.Color) + '\", \"stroke\": \"'\r\n + ColorToHTML(Appearance.Pointer.BorderColor) + '\" }, \"size\": \"'\r\n + IntToStr(Appearance.Pointer.Size) + '%\", \"offset\": \"'\r\n + IntToStr(Appearance.Pointer.Offset) + '%\", \"thickness\": ' + IntToStr(Appearance.Pointer.Width) + ' }}'));\r\n\r\n sbgcolor := 'transparent';\r\n if Appearance.Color <> clNone then\r\n sbgcolor := ColorToHTML(Appearance.Color);\r\n\r\n sbcolor := 'transparent';\r\n if Appearance.BorderColor <> clNone then\r\n sbcolor := ColorToHTML(Appearance.BorderColor);\r\n\r\n TJQXWidgetKnob(JQuery(GetJQID)).jqxKnob(TJSJSON.parseObject('{\"style\": {\"fill\": \"'\r\n + sbgcolor + '\", \"stroke\": \"' + sbcolor + '\", \"strokeWidth\": ' + IntToStr(Appearance.BorderWidth) + '}}'));\r\n\r\n TJQXWidgetKnob(JQuery(GetJQID)).jqxKnob('disabled', not Enabled);\r\n TJQXWidgetKnob(JQuery(GetJQID)).jqxKnob('step', FStep);\r\n TJQXWidgetKnob(JQuery(GetJQID)).jqxKnob('max', FMaximum);\r\n TJQXWidgetKnob(JQuery(GetJQID)).jqxKnob('min', FMinimum);\r\n TJQXWidgetKnob(JQuery(GetJQID)).jqxKnob('value', FValue);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TJQXKnob.HandleKnobChange(Event: TJQXElementEvent): Boolean;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\n\r\n Result := True;\r\nend;\r\n\r\nfunction TJQXKnob.GetValue: Double;\r\nvar\r\n s: string;\r\n o: TJSObject;\r\nbegin\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n o := TJQXWidgetKnob(JQuery(GetJQID)).jqxKnob('value');\r\n s := o.ToString;\r\n Result := StrToFloat(s, TFormatSettings.Invariant);\r\n if not Assigned(Result) then\r\n Result := FValue;\r\nend;\r\n\r\nprocedure TJQXKnob.SetValue(AValue: Double);\r\nbegin\r\n FValue := AValue;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n TJQXWidgetKnob(JQuery(GetJQID)).jqxKnob('val', AValue);\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnob.SetAppearance(const Value: TJQXKnobAppearance);\r\nbegin\r\n FAppearance.Assign(Value);\r\nend;\r\n\r\nprocedure TJQXKnob.SetEnabled(Value: Boolean);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnob.SetEndAngle(const Value: Integer);\r\nbegin\r\n FEndAngle := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnob.SetHeight(AValue: Integer);\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TJQXKnob.SetWidth(AValue: Integer);\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TJQXKnob.SetMaximum(const Value: Integer);\r\nbegin\r\n FMaximum := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnob.SetMinimum(const Value: Integer);\r\nbegin\r\n FMinimum := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnob.SetStartAngle(const Value: Integer);\r\nbegin\r\n FStartAngle := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnob.SetStep(const Value: Integer);\r\nbegin\r\n FStep := Value;\r\n UpdateElement;\r\nend;\r\n\r\n{ TJQXProgressBar }\r\n\r\nprocedure TJQXProgressBar.CreateInitialize;\r\nbegin\r\n inherited;\r\n FAnimationDuration := 300;\r\n FColorRanges := TJQXProgressBarColors.Create(Self);\r\n FMaximum := 100;\r\n FMinimum := 0;\r\n FValue := 0;\r\n Width := 200;\r\n Height := 21;\r\n FShowValue := True;\r\n FOrientation := poHorizontal;\r\n FLayout := plNormal;\r\n FTemplate := ttDefault;\r\n FIsLoaded := False;\r\n\r\n RequiredScripts.Add('jqxprogressbar.js');\r\n\r\n ScriptLoaded := not AddRequiredScripts;\r\nend;\r\n\r\ndestructor TJQXProgressBar.Destroy;\r\nbegin\r\n FColorRanges.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TJQXProgressBar.InitJQuery;\r\nbegin\r\n inherited;\r\n\r\n if FIsLoaded then\r\n Exit;\r\n\r\n if not ScriptLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n FIsLoaded := True;\r\n TJQXWidgetProgressBar(JQuery(GetJQID)).jqxProgressBar(TJSJSON.parseObject('{\"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height) + '}'));\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TJQXProgressBar.UpdateElement;\r\nvar\r\n sorientation: string;\r\n slayout: string;\r\n stemplate: string;\r\n id: string;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if FIsLoaded then\r\n begin\r\n id := GetJQID;\r\n\r\n TJQXWidgetProgressBar(JQuery(GetJQID)).jqxProgressBar(TJSJSON.parseObject('{\"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height) + '}'));\r\n TJQXWidgetProgressBar(JQuery(GetJQID)).jqxProgressBar('animationDuration', FAnimationDuration);\r\n\r\n sorientation := 'horizontal';\r\n if Orientation = poVertical then\r\n sorientation := 'vertical';\r\n TJQXWidgetProgressBar(JQuery(GetJQID)).jqxProgressBar('orientation', sorientation);\r\n\r\n slayout := 'normal';\r\n if Layout = plReverse then\r\n slayout := 'reverse';\r\n TJQXWidgetProgressBar(JQuery(GetJQID)).jqxProgressBar('layout', slayout);\r\n\r\n case Template of\r\n ttDefault: stemplate := 'default';\r\n ttPrimary: stemplate := 'primary';\r\n ttSuccess: stemplate := 'success';\r\n ttWarning: stemplate := 'warning';\r\n ttDanger: stemplate := 'danger';\r\n ttInfo: stemplate := 'info';\r\n end;\r\n TJQXWidgetProgressBar(JQuery(id)).jqxProgressBar('template', stemplate);\r\n\r\n asm\r\n let template = $(id).jqxProgressBar('template');\r\n $(id).find('.jqx-fill-state-pressed').addClass('jqx-' + template);\r\n end;\r\n\r\n TJQXWidgetProgressBar(JQuery(GetJQID)).jqxProgressBar('disabled', not Enabled);\r\n TJQXWidgetProgressBar(JQuery(GetJQID)).jqxProgressBar('max', FMaximum);\r\n TJQXWidgetProgressBar(JQuery(GetJQID)).jqxProgressBar('min', FMinimum);\r\n TJQXWidgetProgressBar(JQuery(GetJQID)).jqxProgressBar('value', FValue);\r\n TJQXWidgetProgressBar(JQuery(GetJQID)).jqxProgressBar(New(['colorRanges', ColorsToArray]));\r\n TJQXWidgetProgressBar(JQuery(GetJQID)).jqxProgressBar('showText', ShowValue);\r\n TJQXWidgetProgressBar(JQuery(GetJQID)).jqxProgressBar('theme', GetTheme(Theme));\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TJQXProgressBar.ColorsToArray: TJSArray;\r\nvar\r\n I: integer;\r\nbegin\r\n Result := TJSArray.New;\r\n\r\n for I := 0 to ColorRanges.Count - 1 do\r\n Result.Push(New(['stop', ColorRanges[I].Stop, 'color', ColorToHTML(ColorRanges[I].Color)]));\r\nend;\r\n\r\nprocedure TJQXProgressBar.SetValue(AValue: Integer);\r\nbegin\r\n FValue := AValue;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n TJQXWidgetProgressBar(JQuery(GetJQID)).jqxProgressBar('val', AValue);\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXProgressBar.SetWidth(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXProgressBar.SetAnimationDuration(const Value: Integer);\r\nbegin\r\n FAnimationDuration := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXProgressBar.SetColorRanges(const Value: TJQXProgressBarColors);\r\nbegin\r\n FColorRanges.Assign(Value);\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXProgressBar.SetEnabled(Value: Boolean);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXProgressBar.SetHeight(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXProgressBar.SetLayout(const Value: TJQXProgressLayout);\r\nbegin\r\n FLayout := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXProgressBar.SetMaximum(const Value: Integer);\r\nbegin\r\n FMaximum := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXProgressBar.SetMinimum(const Value: Integer);\r\nbegin\r\n FMinimum := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXProgressBar.SetOrientation(const Value: TJQXProgressOrientation);\r\nbegin\r\n FOrientation := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXProgressBar.SetShowValue(const Value: Boolean);\r\nbegin\r\n FShowValue := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXProgressBar.SetTemplate(const Value: TJQXTemplate);\r\nbegin\r\n FTemplate := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXProgressBar.SetTheme(AValue: string);\r\nbegin\r\n inherited;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n TJQXWidgetProgressBar(JQuery(GetJQID)).jqxProgressBar('theme', GetTheme(AValue));\r\nend;\r\n\r\n{ TJQXProgressBarColor }\r\n\r\nprocedure TJQXProgressBarColor.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TJQXProgressBarColor) then\r\n begin\r\n FColor := (Source as TJQXProgressBarColor).Color;\r\n FStop := (Source as TJQXProgressBarColor).Stop;\r\n end;\r\nend;\r\n\r\nconstructor TJQXProgressBarColor.Create(Collection: TCollection);\r\nbegin\r\n inherited;\r\n FColor := clNone;\r\n FStop := 0;\r\n\r\n if Collection is TJQXProgressBarColors then\r\n begin\r\n FOwner := Collection as TJQXProgressBarColors;\r\n end;\r\nend;\r\n\r\ndestructor TJQXProgressBarColor.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nfunction TJQXProgressBarColor.GetDisplayName: string;\r\nbegin\r\n Result := 'Color '+ IntToStr(Index);\r\nend;\r\n\r\nfunction TJQXProgressBarColor.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nprocedure TJQXProgressBarColor.SetColor(const Value: TColor);\r\nbegin\r\n FColor := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TJQXProgressBarColor.SetStop(const Value: Integer);\r\nbegin\r\n FStop := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\n{ TJQXProgressBarColors }\r\n\r\nfunction TJQXProgressBarColors.Add: TJQXProgressBarColor;\r\nbegin\r\n Result := TJQXProgressBarColor(inherited Add);\r\nend;\r\n\r\nconstructor TJQXProgressBarColors.Create(AOwner: TJQXProgressBar);\r\nbegin\r\n inherited Create(TJQXProgressBarColor);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TJQXProgressBarColors.GetItems(Index: Integer): TJQXProgressBarColor;\r\nbegin\r\n Result := TJQXProgressBarColor(inherited Items[Index]);\r\nend;\r\n\r\nfunction TJQXProgressBarColors.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TJQXProgressBarColors.Insert(Index: Integer): TJQXProgressBarColor;\r\nbegin\r\n Result := TJQXProgressBarColor(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TJQXProgressBarColors.SetItems(Index: Integer; const Value: TJQXProgressBarColor);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nprocedure TJQXProgressBarColors.Update(Item: TCollectionItem);\r\nbegin\r\n inherited;\r\nend;\r\n\r\n{ TJQXSlider }\r\n\r\nprocedure TJQXSlider.CreateInitialize;\r\nbegin\r\n inherited;\r\n FButtonsPosition := hpBoth;\r\n FTicksPosition := vpBoth;\r\n FTicksFrequency := 2;\r\n FTickSize := 5;\r\n FMinorTicksFrequency := 2;\r\n FMinorTickSize := 5;\r\n FShowButtons := true;\r\n FShowTicks := true;\r\n FShowMinorTicks := true;\r\n FShowRange := true;\r\n FShowRangeSlider := false;\r\n FMaximumValue := 10;\r\n FMinimumValue := 0;\r\n FMaximum := 10;\r\n FMinimum := 0;\r\n FMode := smDefault;\r\n FStep := 2;\r\n FTemplate := ttDefault;\r\n FLayout := plNormal;\r\n FValue := 0;\r\n FIsLoaded := False;\r\n Width := 300;\r\n Height := 25;\r\n\r\n RequiredScripts.Add('jqxbuttons.js');\r\n RequiredScripts.Add('jqxslider.js');\r\n\r\n ScriptLoaded := not AddRequiredScripts;\r\nend;\r\n\r\nprocedure TJQXSlider.BindEvents;\r\nbegin\r\n //disabled\r\nend;\r\n\r\nprocedure TJQXSlider.InitJQuery;\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if FIsLoaded then\r\n Exit;\r\n\r\n if not ScriptLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n FIsLoaded := True;\r\n FValue := 5;\r\n TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider(TJSJSON.parseObject('{\"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height) + '}'));\r\n TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider('value', FValue);\r\n TJQXWidgetSlider(JQuery(GetJQID)).on('change', @HandleSliderChange);\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TJQXSlider.UpdateElement;\r\nvar\r\n stemplate: string;\r\n slayout: string;\r\n bpos, tpos: string;\r\n smode: string;\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if not ScriptLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if FIsLoaded then\r\n begin\r\n TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider(TJSJSON.parseObject('{\"width\": ' + IntToStr(Width)\r\n + ', \"height\": ' + IntToStr(Height) + '}'));\r\n\r\n TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider(TJSJSON.parseObject('{\"disabled\": ' + LowerCase(BoolToStr(not Enabled, True)) + '}'));\r\n\r\n TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider('rangeSlider', FShowRangeSlider);\r\n\r\n TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider('theme', GetTheme(Theme));\r\n\r\n if ShowRangeSlider then\r\n TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider('setValue', FMinimumValue, FMaximumValue)\r\n else\r\n TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider('setValue', FValue);\r\n\r\n TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider('max', FMaximum);\r\n TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider('min', FMinimum);\r\n TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider('step', FStep);\r\n\r\n case ButtonsPosition of\r\n hpBoth: bpos := 'both';\r\n hpLeft: bpos := 'left';\r\n hpRight: bpos := 'right';\r\n end;\r\n TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider('buttonsPosition', bpos);\r\n\r\n case TicksPosition of\r\n vpBoth: tpos := 'both';\r\n vpTop: tpos := 'top';\r\n vpBottom: tpos := 'bottom';\r\n end;\r\n TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider('ticksPosition', tpos);\r\n\r\n TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider('ticksFrequency', FTicksFrequency);\r\n TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider('tickSize', FTickSize);\r\n TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider('minorTicksFrequency', FMinorTicksFrequency);\r\n TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider('minorTickSize', FMinorTickSize);\r\n\r\n TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider('showTicks', FShowTicks);\r\n TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider('showMinorTicks', FShowMinorTicks);\r\n TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider('showButtons', FShowButtons);\r\n TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider('showRange', FShowRange);\r\n\r\n case Mode of\r\n smDefault: smode := 'default';\r\n smFixed: smode := 'fixed';\r\n end;\r\n TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider('mode', smode);\r\n\r\n case Template of\r\n ttDefault: stemplate := 'default';\r\n ttPrimary: stemplate := 'primary';\r\n ttSuccess: stemplate := 'success';\r\n ttWarning: stemplate := 'warning';\r\n ttDanger: stemplate := 'danger';\r\n ttInfo: stemplate := 'info';\r\n end;\r\n TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider('template', stemplate);\r\n\r\n slayout := 'normal';\r\n if Layout = plReverse then\r\n slayout := 'reverse';\r\n TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider('layout', slayout);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TJQXSlider.UpdateSize;\r\nbegin\r\n if Assigned(ElementHandle) then\r\n begin\r\n if FIsLoaded then\r\n TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider(TJSJSON.parseObject('{\"width\": ' + IntToStr(Width)\r\n + ', \"height\": ' + IntToStr(Height) + '}'));\r\n end;\r\nend;\r\n\r\nfunction TJQXSlider.HandleSliderChange(Event: TJQXEvent): Boolean;\r\nvar\r\n Args: TJQXSliderEventArgs;\r\n o: TJSObject;\r\n s: string;\r\nbegin\r\n if Assigned(OnChange) then\r\n begin\r\n Args := TJQXSliderEventArgs.Create;\r\n\r\n if not ShowRangeSlider then\r\n begin\r\n Args.Value := StrToFloat(string(Event.Args.Properties['value']), TFormatSettings.Invariant);\r\n FValue := Args.Value;\r\n end\r\n else\r\n begin\r\n o := TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider('getValue');\r\n if Assigned(o) then\r\n begin\r\n s := string(o.Properties['rangeStart']);\r\n if s <> '' then\r\n Args.MinimumValue := StrToFloat(s, TFormatSettings.Invariant);\r\n s := string(o.Properties['rangeEnd']);\r\n if s <> '' then\r\n Args.MaximumValue := StrToFloat(s, TFormatSettings.Invariant);\r\n end;\r\n end;\r\n\r\n OnChange(Self, Args);\r\n Args.Free;\r\n end;\r\n\r\n Result := True;\r\nend;\r\n\r\nfunction TJQXSlider.GetMaximumValue: Double;\r\nvar\r\n s: string;\r\n o: TJSObject;\r\nbegin\r\n Result := FMaximumValue;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if ShowRangeSlider then\r\n begin\r\n o := TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider('getValue');\r\n if Assigned(o) then\r\n begin\r\n s := string(o.Properties['rangeEnd']);\r\n if s <> '' then\r\n Result := StrToFloat(s, TFormatSettings.Invariant);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TJQXSlider.GetMinimumValue: Double;\r\nvar\r\n s: string;\r\n o: TJSObject;\r\nbegin\r\n Result := FMinimumValue;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if ShowRangeSlider then\r\n begin\r\n o := TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider('getValue');\r\n if Assigned(o) then\r\n begin\r\n s := string(o.Properties['rangeStart']);\r\n if s <> '' then\r\n Result := StrToFloat(s, TFormatSettings.Invariant);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TJQXSlider.SetMaximum(const Value: Double);\r\nbegin\r\n FMaximum := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXSlider.SetMaximumValue(const Value: Double);\r\nbegin\r\n FMaximumValue := Value;\r\n UpdateElement;\r\nend;\r\n\r\nfunction TJQXSlider.GetValue: Double;\r\nvar\r\n s: string;\r\n o: TJSObject;\r\nbegin\r\n Result := FValue;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if not ShowRangeSlider then\r\n begin\r\n o := TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider('value');\r\n s := o.ToString;\r\n Result := StrToFloat(s, TFormatSettings.Invariant);\r\n end;\r\nend;\r\n\r\nprocedure TJQXSlider.SetValue(AValue: Double);\r\nbegin\r\n FValue := AValue;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if not ShowRangeSlider then\r\n TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider('value', AValue);\r\nend;\r\n\r\nprocedure TJQXSlider.SetWidth(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateSize;\r\nend;\r\n\r\nprocedure TJQXSlider.SetButtonsPosition(const Value: TJQXHorizontalPosition);\r\nbegin\r\n FButtonsPosition := Value;\r\nend;\r\n\r\nprocedure TJQXSlider.SetEnabled(Value: Boolean);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXSlider.SetHeight(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateSize;\r\nend;\r\n\r\nprocedure TJQXSlider.SetLayout(const Value: TJQXProgressLayout);\r\nbegin\r\n FLayout := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXSlider.SetMinimum(const Value: Double);\r\nbegin\r\n FMinimum := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXSlider.SetMinimumValue(const Value: Double);\r\nbegin\r\n FMinimumValue := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXSlider.SetMinorTicksFrequency(const Value: Integer);\r\nbegin\r\n FMinorTicksFrequency := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXSlider.SetMinorTickSize(const Value: Integer);\r\nbegin\r\n FMinorTickSize := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXSlider.SetMode(const Value: TJQXSliderMode);\r\nbegin\r\n FMode := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXSlider.SetShowButtons(const Value: Boolean);\r\nbegin\r\n FShowButtons := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXSlider.SetShowMinorTicks(const Value: Boolean);\r\nbegin\r\n FShowMinorTicks := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXSlider.SetShowRange(const Value: Boolean);\r\nbegin\r\n FShowRange := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXSlider.SetShowRangeSlider(const Value: Boolean);\r\nbegin\r\n FShowRangeSlider := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXSlider.SetShowTicks(const Value: Boolean);\r\nbegin\r\n FShowTicks := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXSlider.SetStep(const Value: Double);\r\nbegin\r\n FStep := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXSlider.SetTemplate(const Value: TJQXTemplate);\r\nbegin\r\n FTemplate := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXSlider.SetTheme(AValue: string);\r\nbegin\r\n inherited;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n TJQXWidgetSlider(JQuery(GetJQID)).jqxSlider('theme', GetTheme(AValue))\r\nend;\r\n\r\nprocedure TJQXSlider.SetTicksFrequency(const Value: Integer);\r\nbegin\r\n FTicksFrequency := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXSlider.SetTickSize(const Value: Integer);\r\nbegin\r\n FTickSize := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXSlider.SetTicksPosition(const Value: TJQXVerticalPosition);\r\nbegin\r\n FTicksPosition := Value;\r\n UpdateElement;\r\nend;\r\n\r\n{ TJQXKnobAppearance }\r\n\r\nprocedure TJQXKnobAppearance.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if (Source is TJQXKnobAppearance) then\r\n begin\r\n FColor := (Source as TJQXKnobAppearance).Color;\r\n FBorderColor := (Source as TJQXKnobAppearance).BorderColor;\r\n FBorderWidth := (Source as TJQXKnobAppearance).BorderWidth;\r\n FLabels := (Source as TJQXKnobAppearance).Labels;\r\n FProgressBar := (Source as TJQXKnobAppearance).ProgressBar;\r\n FMarks := (Source as TJQXKnobAppearance).Marks;\r\n FPointer := (Source as TJQXKnobAppearance).Pointer;\r\n end;\r\nend;\r\n\r\nconstructor TJQXKnobAppearance.Create(AOwner: TJQXKnob);\r\nbegin\r\n inherited Create;\r\n FColor := clNone;\r\n FBorderColor := clNone;\r\n FBorderWidth := 1;\r\n FLabels := TJQXKnobLabels.Create(Self);\r\n FProgressBar := TJQXKnobProgressBar.Create(Self);\r\n FMarks := TJQXKnobMarks.Create(Self);\r\n FPointer := TJQXKnobPointer.Create(Self);\r\n FOwner := AOwner;\r\nend;\r\n\r\ndestructor TJQXKnobAppearance.Destroy;\r\nbegin\r\n FLabels.Free;\r\n FProgressBar.Free;\r\n FMarks.Free;\r\n FPointer.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TJQXKnobAppearance.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nprocedure TJQXKnobAppearance.SetBorderColor(const Value: TColor);\r\nbegin\r\n FBorderColor := Value;\r\n FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnobAppearance.SetBorderWidth(const Value: Integer);\r\nbegin\r\n FBorderWidth := Value;\r\n FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnobAppearance.SetColor(const Value: TColor);\r\nbegin\r\n FColor := Value;\r\n FOwner.UpdateElement;\r\nend;\r\n\r\n{ TJQXKnobLabels }\r\n\r\nprocedure TJQXKnobLabels.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if (Source is TJQXKnobLabels) then\r\n begin\r\n FOffset := (Source as TJQXKnobLabels).Offset;\r\n FStep := (Source as TJQXKnobLabels).Step;\r\n FVisible := (Source as TJQXKnobLabels).Visible;\r\n end;\r\nend;\r\n\r\nconstructor TJQXKnobLabels.Create(AOwner: TJQXKnobAppearance);\r\nbegin\r\n FOffset := 88;\r\n FStep := 10;\r\n FVisible := True;\r\n FOwner := AOwner;\r\nend;\r\n\r\ndestructor TJQXKnobLabels.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nfunction TJQXKnobLabels.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nprocedure TJQXKnobLabels.SetOffset(const Value: Integer);\r\nbegin\r\n FOffset := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnobLabels.SetStep(const Value: Integer);\r\nbegin\r\n FStep := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnobLabels.SetVisible(const Value: Boolean);\r\nbegin\r\n FVisible := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\n{ TJQXKnobProgressBar }\r\n\r\nprocedure TJQXKnobProgressBar.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if (Source is TJQXKnobProgressBar) then\r\n begin\r\n FColor := (Source as TJQXKnobProgressBar).Color;\r\n FSize := (Source as TJQXKnobProgressBar).Size;\r\n FOffset := (Source as TJQXKnobProgressBar).Offset;\r\n FBackgroundColor := (Source as TJQXKnobProgressBar).BackgroundColor;\r\n FBorderColor := (Source as TJQXKnobProgressBar).BorderColor;\r\n end;\r\nend;\r\n\r\nconstructor TJQXKnobProgressBar.Create(AOwner: TJQXKnobAppearance);\r\nbegin\r\n FColor := clSilver;\r\n FSize := 9;\r\n FOffset := 60;\r\n FBackgroundColor := clGray;\r\n FBorderColor := clBlack;\r\n FOwner := AOwner;\r\nend;\r\n\r\ndestructor TJQXKnobProgressBar.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nfunction TJQXKnobProgressBar.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nprocedure TJQXKnobProgressBar.SetBackgroundColor(const Value: TColor);\r\nbegin\r\n FBackgroundColor := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnobProgressBar.SetBorderColor(const Value: TColor);\r\nbegin\r\n FBorderColor := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnobProgressBar.SetColor(const Value: TColor);\r\nbegin\r\n FColor := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnobProgressBar.SetOffset(const Value: Integer);\r\nbegin\r\n FOffset := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnobProgressBar.SetSize(const Value: Integer);\r\nbegin\r\n FSize := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\n{ TJQXKnobMarks }\r\n\r\nprocedure TJQXKnobMarks.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if (Source is TJQXKnobMarks) then\r\n begin\r\n FOffset := (Source as TJQXKnobMarks).Offset;\r\n FMajorSize := (Source as TJQXKnobMarks).MajorSize;\r\n FColorProgress := (Source as TJQXKnobMarks).ColorProgress;\r\n FWidth := (Source as TJQXKnobMarks).Width;\r\n FBorderColorRemaining := (Source as TJQXKnobMarks).BorderColorRemaining;\r\n FBorderColorProgress := (Source as TJQXKnobMarks).BorderColorProgress;\r\n FMinorInterval := (Source as TJQXKnobMarks).MinorInterval;\r\n FSize := (Source as TJQXKnobMarks).Size;\r\n FColorRemaining := (Source as TJQXKnobMarks).ColorRemaining;\r\n FMajorInterval := (Source as TJQXKnobMarks).MajorInterval;\r\n FMarkType := (Source as TJQXKnobMarks).MarkType;\r\n end;\r\nend;\r\n\r\nconstructor TJQXKnobMarks.Create(AOwner: TJQXKnobAppearance);\r\nbegin\r\n inherited Create;\r\n FColorRemaining := clGray;\r\n FBorderColorRemaining := clGray;\r\n FColorProgress := clSilver;\r\n FBorderColorProgress := clSilver;\r\n FMarkType := mtLine;\r\n FOffset := 71;\r\n FWidth := 3;\r\n FSize := 6;\r\n FMajorSize := 9;\r\n FMajorInterval := 10;\r\n FMinorInterval := 2;\r\n FOwner := AOwner;\r\nend;\r\n\r\ndestructor TJQXKnobMarks.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nfunction TJQXKnobMarks.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nprocedure TJQXKnobMarks.SetBorderColorProgress(const Value: TColor);\r\nbegin\r\n FBorderColorProgress := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnobMarks.SetBorderColorRemaining(const Value: TColor);\r\nbegin\r\n FBorderColorRemaining := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnobMarks.SetColorProgress(const Value: TColor);\r\nbegin\r\n FColorProgress := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnobMarks.SetColorRemaining(const Value: TColor);\r\nbegin\r\n FColorRemaining := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnobMarks.SetMajorInterval(const Value: Integer);\r\nbegin\r\n FMajorInterval := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnobMarks.SetMajorSize(const Value: Integer);\r\nbegin\r\n FMajorSize := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnobMarks.SetMarkType(const Value: TJQXKnobMarkType);\r\nbegin\r\n FMarkType := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnobMarks.SetMinorInterval(const Value: Integer);\r\nbegin\r\n FMinorInterval := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnobMarks.SetOffset(const Value: Integer);\r\nbegin\r\n FOffset := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnobMarks.SetSize(const Value: Integer);\r\nbegin\r\n FSize := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnobMarks.SetWidth(const Value: Integer);\r\nbegin\r\n FWidth := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\n{ TJQXKnobPointer }\r\n\r\nprocedure TJQXKnobPointer.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if (Source is TJQXKnobPointer) then\r\n begin\r\n FPointerType := (Source as TJQXKnobPointer).PointerType;\r\n FColor := (Source as TJQXKnobPointer).Color;\r\n FBorderColor := (Source as TJQXKnobPointer).BorderColor;\r\n FSize := (Source as TJQXKnobPointer).Size;\r\n FOffset := (Source as TJQXKnobPointer).Offset;\r\n FVisible := (Source as TJQXKnobPointer).Visible;\r\n FWidth := (Source as TJQXKnobPointer).Width;\r\n end;\r\nend;\r\n\r\nconstructor TJQXKnobPointer.Create(AOwner: TJQXKnobAppearance);\r\nbegin\r\n FPointerType := ptArrow;\r\n FColor := clGray;\r\n FBorderColor := clSilver;\r\n FSize := 59;\r\n FOffset := 49;\r\n FVisible := True;\r\n FWidth := 20;\r\n FOwner := AOwner;\r\nend;\r\n\r\ndestructor TJQXKnobPointer.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nfunction TJQXKnobPointer.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nprocedure TJQXKnobPointer.SetBorderColor(const Value: TColor);\r\nbegin\r\n FBorderColor := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnobPointer.SetColor(const Value: TColor);\r\nbegin\r\n FColor := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnobPointer.SetOffset(const Value: Integer);\r\nbegin\r\n FOffset := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnobPointer.SetPointerType(const Value: TJQXKnobPointerType);\r\nbegin\r\n FPointerType := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnobPointer.SetSize(const Value: Integer);\r\nbegin\r\n FSize := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnobPointer.SetVisible(const Value: Boolean);\r\nbegin\r\n FVisible := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TJQXKnobPointer.SetWidth(const Value: Integer);\r\nbegin\r\n FWidth := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\n{ TJQXRangeSelector }\r\n\r\nprocedure TJQXRangeSelector.BindEvents;\r\nbegin\r\n//disable;\r\nend;\r\n\r\nprocedure TJQXRangeSelector.CreateInitialize;\r\nbegin\r\n inherited;\r\n FMinimum := 0;\r\n FMaximum := 10;\r\n FMinimumValue := 0;\r\n FMaximumValue := 10;\r\n FMajorTicksInterval := 5;\r\n FMinorTicksInterval := 1;\r\n FMoveOnClick := True;\r\n FResizable := True;\r\n FShowMajorTicks := True;\r\n FShowMinorTicks := True;\r\n FShowMarkers := True;\r\n Height := 60;\r\n Width := 200;\r\n\r\n RequiredScripts.Add('jqxdata.js');\r\n RequiredScripts.Add('jqxrangeselector.js');\r\n\r\n ScriptLoaded := not AddRequiredScripts;\r\nend;\r\n\r\nfunction TJQXRangeSelector.GetMaximumValue: Double;\r\nvar\r\n s: string;\r\n o: TJSObject;\r\nbegin\r\n Result := FMaximumValue;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n o := TJQXWidgetRangeSelector(JQuery(GetJQID)).jqxRangeSelector('getRange');\r\n if Assigned(o) then\r\n begin\r\n s := string(o.Properties['to']);\r\n if s <> '' then\r\n Result := StrToFloat(s, TFormatSettings.Invariant);\r\n end;\r\n\r\n FMaximumValue := Result;\r\nend;\r\n\r\nfunction TJQXRangeSelector.GetMinimumValue: Double;\r\nvar\r\n s: string;\r\n o: TJSObject;\r\nbegin\r\n Result := FMinimumValue;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n o := TJQXWidgetRangeSelector(JQuery(GetJQID)).jqxRangeSelector('getRange');\r\n if Assigned(o) then\r\n begin\r\n s := string(o.Properties['from']);\r\n if s <> '' then\r\n Result := StrToFloat(s, TFormatSettings.Invariant);\r\n end;\r\n\r\n FMinimumValue := Result;\r\nend;\r\n\r\nfunction TJQXRangeSelector.HandleRangeChange(Event: TJQXEvent): boolean;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\n Result := True;\r\nend;\r\n\r\nprocedure TJQXRangeSelector.InitJQuery;\r\nbegin\r\n inherited;\r\n\r\n if FIsLoaded then\r\n Exit;\r\n\r\n if not ScriptLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n FIsLoaded := True;\r\n TJQXWidgetRangeSelector(JQuery(GetJQID)).jqxRangeSelector(TJSJSON.parseObject('{\"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height - 50) + '}'));\r\n TJQXWidgetRangeSelector(JQuery(GetJQID)).on('change', @HandleRangeChange);\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TJQXRangeSelector.SetEnabled(Value: boolean);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXRangeSelector.SetHeight(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXRangeSelector.SetMajorTicksInterval(const Value: Integer);\r\nbegin\r\n FMajorTicksInterval := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXRangeSelector.SetMaximum(const Value: Double);\r\nbegin\r\n FMaximum := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXRangeSelector.SetMaximumValue(const Value: Double);\r\nbegin\r\n FMaximumValue := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXRangeSelector.SetMinimum(const Value: Double);\r\nbegin\r\n FMinimum := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXRangeSelector.SetMinimumValue(const Value: Double);\r\nbegin\r\n FMinimumValue := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXRangeSelector.SetMinorTicksInterval(const Value: Integer);\r\nbegin\r\n FMinorTicksInterval := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXRangeSelector.SetMoveOnClick(const Value: Boolean);\r\nbegin\r\n FMoveOnClick := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXRangeSelector.SetResizable(const Value: Boolean);\r\nbegin\r\n FResizable := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXRangeSelector.SetShowMajorTicks(const Value: Boolean);\r\nbegin\r\n FShowMajorTicks := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXRangeSelector.SetShowMarkers(const Value: Boolean);\r\nbegin\r\n FShowMarkers := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXRangeSelector.SetShowMinorTicks(const Value: Boolean);\r\nbegin\r\n FShowMinorTicks := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXRangeSelector.SetTheme(AValue: string);\r\nbegin\r\n inherited;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n TJQXWidgetRangeSelector(JQuery(GetJQID)).jqxRangeSelector('theme', GetTheme(AValue));\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TJQXRangeSelector.SetWidth(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXRangeSelector.UpdateElement;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if FIsLoaded then\r\n begin\r\n ElementHandle.style.setProperty('overflow','visible');\r\n TJQXWidgetRangeSelector(JQuery(GetJQID)).jqxRangeSelector(TJSJSON.parseObject('{\"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height-50) + '}'));\r\n TJQXWidgetRangeSelector(JQuery(GetJQID)).jqxRangeSelector('max', FMaximum);\r\n TJQXWidgetRangeSelector(JQuery(GetJQID)).jqxRangeSelector('min', FMinimum);\r\n TJQXWidgetRangeSelector(JQuery(GetJQID)).jqxRangeSelector(TJSJSON.parseObject('{\"range\": {\"from\": ' + FloatToStr(FMinimumValue, TFormatSettings.Invariant) + ', \"to\": ' + FloatToStr(FMaximumValue) + '}}'));\r\n TJQXWidgetRangeSelector(JQuery(GetJQID)).jqxRangeSelector('resizable', FResizable);\r\n TJQXWidgetRangeSelector(JQuery(GetJQID)).jqxRangeSelector('disabled', not Enabled);\r\n TJQXWidgetRangeSelector(JQuery(GetJQID)).jqxRangeSelector('majorTicksInterval', FMajorTicksInterval);\r\n TJQXWidgetRangeSelector(JQuery(GetJQID)).jqxRangeSelector('minorTicksInterval', FMinorTicksInterval);\r\n TJQXWidgetRangeSelector(JQuery(GetJQID)).jqxRangeSelector('moveOnClick', FMoveOnClick);\r\n TJQXWidgetRangeSelector(JQuery(GetJQID)).jqxRangeSelector('showMajorTicks', FShowMajorTicks);\r\n TJQXWidgetRangeSelector(JQuery(GetJQID)).jqxRangeSelector('showMinorTicks', FShowMinorTicks);\r\n TJQXWidgetRangeSelector(JQuery(GetJQID)).jqxRangeSelector('showMarkers', FShowMarkers);\r\n TJQXWidgetRangeSelector(JQuery(GetJQID)).jqxRangeSelector('theme', GetTheme(Theme));\r\n// TJQXWidgetRangeSelector(JQuery(GetJQID)).jqxRangeSelector('snapToTicks', True);\r\n end;\r\n end;\r\nend;\r\n\r\n{ TJQXTagCloud }\r\n\r\nprocedure TJQXTagCloud.BindEvents;\r\nbegin\r\n//disable;\r\nend;\r\n\r\nprocedure TJQXTagCloud.CreateInitialize;\r\nvar\r\n ltag: TJQXCloudTag;\r\nbegin\r\n inherited;\r\n FDisplayLimit := -1;\r\n FDisplayTopWeighted := False;\r\n FDisplayMaxValue := -1;\r\n FDisplayMinValue := -1;\r\n FItems := TJQXCloudTags.Create(Self);\r\n FMaxColor := clNone;\r\n FMinColor := clNone;\r\n FMaxFontSize := 36;\r\n FMinFontSize := 8;\r\n FSortBy := tcsNone;\r\n FSortOrder := soAscending;\r\n FTextCase := tcOriginal;\r\n Height := 200;\r\n Width := 200;\r\n\r\n RequiredScripts.Add('jqxdata.js');\r\n RequiredScripts.Add('jqxtagcloud.js');\r\n\r\n ltag := Items.Add;\r\n ltag.TagLabel := 'Tag Item 1';\r\n ltag.TagValue := 50;\r\n\r\n ltag := Items.Add;\r\n ltag.TagLabel := 'Tag Item 2';\r\n ltag.TagValue := 100;\r\n\r\n ltag := Items.Add;\r\n ltag.TagLabel := 'Tag Item 3';\r\n ltag.TagValue := 75;\r\n\r\n ScriptLoaded := not AddRequiredScripts;\r\nend;\r\n\r\nfunction TJQXTagCloud.DataToArray: TJSArray;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := TJSArray.New;\r\n for I := 0 to Items.Count - 1 do\r\n begin\r\n Result.Push(New(['name', Items[I].TagLabel, 'rating', Items[I].TagValue]));\r\n end;\r\nend;\r\n\r\ndestructor TJQXTagCloud.Destroy;\r\nbegin\r\n FItems.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TJQXTagCloud.HandleItemClick(Event: TJQXEvent): boolean;\r\nvar\r\n Args: TJQXTagEventArgs;\r\nbegin\r\n Result := false;\r\n\r\n if not Enabled then\r\n Exit;\r\n\r\n if Assigned(OnClick) then\r\n begin\r\n Args := TJQXTagEventArgs.Create;\r\n Args.TagIndex := StrToInt(string(Event.Args.Properties['index']));\r\n Args.DisplayIndex := StrToInt(string(Event.Args.Properties['visibleIndex']));\r\n Args.TagLabel := string(Event.Args.Properties['label']);\r\n Args.TagValue := StrToInt(string(Event.Args.Properties['value']));\r\n OnClick(Self, Args);\r\n Args.Free;\r\n end;\r\n\r\n Result := true;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TJQXTagCloud.InitJQuery;\r\nvar\r\n jqid: string;\r\nbegin\r\n inherited;\r\n\r\n if FIsLoaded then\r\n Exit;\r\n\r\n if not ScriptLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n FIsLoaded := True;\r\n\r\n jqid := GetJQID;\r\n asm\r\n var source =\r\n {\r\n localData: null,\r\n dataType: \"array\",\r\n dataFields: [\r\n {name: 'name', type: 'string'},\r\n {name: 'rating', type: 'number'}\r\n ]\r\n };\r\n var dataAdapter = new $.jqx.dataAdapter(source, {});\r\n\r\n $(jqid).jqxTagCloud({\r\n source: dataAdapter,\r\n displayMember: 'name'\r\n });\r\n end;\r\n\r\n TJQXWidgetTagCloud(JQuery(GetJQID)).on('itemClick', @HandleItemClick);\r\n\r\n UpdateElement;\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TJQXTagCloud.SetDisplayLimit(const Value: Integer);\r\nbegin\r\n FDisplayLimit := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXTagCloud.SetDisplayMaxValue(const Value: Integer);\r\nbegin\r\n FDisplayMaxValue := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXTagCloud.SetDisplayMinValue(const Value: Integer);\r\nbegin\r\n FDisplayMinValue := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXTagCloud.SetDisplayTopWeighted(const Value: Boolean);\r\nbegin\r\n FDisplayTopWeighted := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXTagCloud.SetEnabled(Value: boolean);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXTagCloud.SetHeight(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXTagCloud.SetMaxColor(const Value: TColor);\r\nbegin\r\n FMaxColor := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXTagCloud.SetMaxFontSize(const Value: integer);\r\nbegin\r\n FMaxFontSize := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXTagCloud.SetMinColor(const Value: TColor);\r\nbegin\r\n FMinColor := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXTagCloud.SetMinFontSize(const Value: integer);\r\nbegin\r\n FMinFontSize := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXTagCloud.SetSortBy(const Value: TJQXTagCloudSort);\r\nbegin\r\n FSortBy := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXTagCloud.SetSortOrder(const Value: TJQXSortOrder);\r\nbegin\r\n FSortOrder := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXTagCloud.SetTextCase(const Value: TJQXTextCase);\r\nbegin\r\n FTextCase := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXTagCloud.SetWidth(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXTagCloud.UpdateElement;\r\nvar\r\n a: TJQDataAdapter;\r\n ar: TJSArray;\r\n ssort: string;\r\n ssortorder: string;\r\n stextcase: string;\r\n ilimit: Integer;\r\n imaxval: Integer;\r\n cmax: string;\r\n cmin: string;\r\n scolor: string;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if FIsLoaded then\r\n begin\r\n ar := TJSArray.New;\r\n ar.Push(New(['name', 'name', 'type', 'string']));\r\n ar.Push(New(['name', 'rating', 'type', 'number']));\r\n// ar.Push(New(['name', 'url', 'type', 'string']));\r\n a := TJQDataAdapter.New(New(['datatype', 'array', 'datafields', ar, 'localdata', DataToArray]));\r\n TJQXWidgetTagCloud(JQuery(GetJQID)).jqxTagCloud('source', a);\r\n// TJQXWidgetTagCloud(JQuery(GetJQID)).jqxTagCloud('source', a, 'displayMember', 'name');\r\n\r\n TJQXWidgetTagCloud(JQuery(GetJQID)).jqxTagCloud(TJSJSON.parseObject('{\"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height) + '}'));\r\n// TJQXWidgetTagCloud(JQuery(GetJQID)).jqxTagCloud('displayMember', 'name');\r\n TJQXWidgetTagCloud(JQuery(GetJQID)).jqxTagCloud('valueMember', 'rating');\r\n// TJQXWidgetTagCloud(JQuery(GetJQID)).jqxTagCloud('urlMember', 'url');\r\n\r\n ssort := 'none';\r\n case FSortBy of\r\n tcsLabel: ssort := 'label';\r\n tcsValue: ssort := 'value';\r\n end;\r\n\r\n TJQXWidgetTagCloud(JQuery(GetJQID)).jqxTagCloud('sortBy', ssort);\r\n\r\n ssortorder := 'ascending';\r\n if FSortOrder = soDescending then\r\n ssortorder := 'descending';\r\n\r\n TJQXWidgetTagCloud(JQuery(GetJQID)).jqxTagCloud('sortOrder', ssortorder);\r\n\r\n stextcase := 'none';\r\n case FTextCase of\r\n tcUpperCase: stextcase := 'allUpper';\r\n tcLowerCase: stextcase := 'allLower';\r\n tcFirstUpper: stextcase := 'firstUpper';\r\n tcCamelCase: stextcase := 'titleCase';\r\n end;\r\n\r\n TJQXWidgetTagCloud(JQuery(GetJQID)).jqxTagCloud('alterTextCase', stextcase);\r\n\r\n ilimit := 9999;\r\n if FDisplayLimit >= 0 then\r\n ilimit := FDisplayLimit;\r\n\r\n TJQXWidgetTagCloud(JQuery(GetJQID)).jqxTagCloud('displayLimit', ilimit);\r\n TJQXWidgetTagCloud(JQuery(GetJQID)).jqxTagCloud('takeTopWeightedItems', FDisplayTopWeighted);\r\n\r\n imaxval := 9999;\r\n if FDisplayMaxValue > FDisplayMinValue then\r\n imaxval := FDisplayMaxValue;\r\n\r\n TJQXWidgetTagCloud(JQuery(GetJQID)).jqxTagCloud('minValueToDisplay', FDisplayMinValue);\r\n TJQXWidgetTagCloud(JQuery(GetJQID)).jqxTagCloud('maxValueToDisplay', imaxval);\r\n\r\n TJQXWidgetTagCloud(JQuery(GetJQID)).jqxTagCloud('minFontSize', FMinFontSize);\r\n TJQXWidgetTagCloud(JQuery(GetJQID)).jqxTagCloud('maxFontSize', FMaxFontSize);\r\n\r\n cmax := '';\r\n if MaxColor <> clNone then\r\n cmax := ColorToHTML(MaxColor);\r\n cmin := '';\r\n if MinColor <> clNone then\r\n cmin := ColorToHTML(MinColor);\r\n\r\n scolor := '';\r\n if cmin <> '' then\r\n scolor := cmin\r\n else if cmax <> '' then\r\n scolor := cmax;\r\n\r\n TJQXWidgetTagCloud(JQuery(GetJQID)).jqxTagCloud('minColor', cmin);\r\n TJQXWidgetTagCloud(JQuery(GetJQID)).jqxTagCloud('maxColor', cmax);\r\n TJQXWidgetTagCloud(JQuery(GetJQID)).jqxTagCloud('textColor', scolor);\r\n\r\n TJQXWidgetTagCloud(JQuery(GetJQID)).jqxTagCloud('disabled', not Enabled);\r\n end;\r\n end;\r\nend;\r\n\r\n{ TJQXCloudTag }\r\n\r\nprocedure TJQXCloudTag.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TJQXCloudTag) then\r\n begin\r\n FTag := (Source as TJQXCloudTag).Tag;\r\n FTagName := (Source as TJQXCloudTag).TagName;\r\n FTagValue := (Source as TJQXCloudTag).TagValue;\r\n end;\r\nend;\r\n\r\nconstructor TJQXCloudTag.Create(Collection: TCollection);\r\nbegin\r\n inherited;\r\n FTag := -1;\r\n FTagName := 'Tag '+ IntToStr(Index);\r\n FTagValue := 0;\r\n\r\n if Collection is TJQXCloudTags then\r\n begin\r\n FOwner := Collection as TJQXCloudTags;\r\n end;\r\nend;\r\n\r\ndestructor TJQXCloudTag.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nfunction TJQXCloudTag.GetDisplayName: string;\r\nbegin\r\n Result := 'Tag '+ IntToStr(Index);\r\nend;\r\n\r\nfunction TJQXCloudTag.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nprocedure TJQXCloudTag.SetTagLabel(const Value: String);\r\nbegin\r\n FTagLabel := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TJQXCloudTag.SetTagName(const Value: String);\r\nbegin\r\n FTagName := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TJQXCloudTag.SetTagValue(const Value: Integer);\r\nbegin\r\n FTagValue := Value;\r\n FOwner.FOwner.UpdateElement;\r\nend;\r\n\r\n{ TJQXCloudTags }\r\n\r\nfunction TJQXCloudTags.Add: TJQXCloudTag;\r\nbegin\r\n Result := TJQXCloudTag(inherited Add);\r\nend;\r\n\r\nconstructor TJQXCloudTags.Create(AOwner: TJQXTagCloud);\r\nbegin\r\n inherited Create(TJQXCloudTag);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TJQXCloudTags.GetItems(Index: Integer): TJQXCloudTag;\r\nbegin\r\n Result := TJQXCloudTag(inherited Items[Index]);\r\nend;\r\n\r\nfunction TJQXCloudTags.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TJQXCloudTags.Insert(Index: Integer): TJQXCloudTag;\r\nbegin\r\n Result := TJQXCloudTag(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TJQXCloudTags.SetItems(Index: Integer; const Value: TJQXCloudTag);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nprocedure TJQXCloudTags.Update(Item: TCollectionItem);\r\nbegin\r\n inherited;\r\nend;\r\n\r\n{ TJQXResponsivePanel }\r\n\r\nprocedure TJQXResponsivePanel.BindEvents;\r\nbegin\r\n// inherited;\r\nend;\r\n\r\nprocedure TJQXResponsivePanel.Close;\r\nbegin\r\n TJQXWidgetResponsivePanel(JQuery(GetContentID)).jqxResponsivePanel('close');\r\nend;\r\n\r\nprocedure TJQXResponsivePanel.CreateInitialize;\r\nbegin\r\n inherited;\r\n FAnimationType := atNone;\r\n FAutoClose := True;\r\n FCollapseBreakpoint := 1000;\r\n FToggleButtonSize := 30;\r\n Height := 200;\r\n Width := 200;\r\n WidthPercent := 100;\r\n WidthStyle := ssPercent;\r\n\r\n RequiredScripts.Add('jqxresponsivepanel.js');\r\n\r\n ScriptLoaded := not AddRequiredScripts;\r\nend;\r\n\r\nfunction TJQXResponsivePanel.GetButtonID: string;\r\nbegin\r\n Result := GetJQID + 'BTN';\r\nend;\r\n\r\nfunction TJQXResponsivePanel.GetContentID: string;\r\nbegin\r\n Result := GetJQID + 'DIV';\r\nend;\r\n\r\nfunction TJQXResponsivePanel.HandleClose(Event: TJQXElementEvent): boolean;\r\nbegin\r\n if Assigned(OnClose) then\r\n OnClose(Self);\r\n\r\n Result := true;\r\nend;\r\n\r\nfunction TJQXResponsivePanel.HandleCollapse(Event: TJQXElementEvent): boolean;\r\nbegin\r\n if Assigned(OnCollapse) then\r\n OnCollapse(Self);\r\n\r\n Result := true;\r\nend;\r\n\r\nfunction TJQXResponsivePanel.HandleExpand(Event: TJQXElementEvent): boolean;\r\nbegin\r\n if Assigned(OnExpand) then\r\n OnExpand(Self);\r\n\r\n Result := true;\r\nend;\r\n\r\nfunction TJQXResponsivePanel.HandleOpen(Event: TJQXElementEvent): boolean;\r\nbegin\r\n if Assigned(OnOpen) then\r\n OnOpen(Self);\r\n\r\n Result := true;\r\nend;\r\n\r\nprocedure TJQXResponsivePanel.InitJQuery;\r\nvar\r\n idContent: string;\r\n idButton: string;\r\n content: TJSElement;\r\n button: TJSElement;\r\nbegin\r\n inherited;\r\n\r\n if FIsLoaded then\r\n Exit;\r\n\r\n if not ScriptLoaded then\r\n Exit;\r\n\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n idContent := GetID + 'DIV';\r\n idButton := GetID + 'BTN';\r\n\r\n button := document.createElement('DIV');\r\n button['id'] := idButton;\r\n\r\n content := document.createElement('DIV');\r\n content['id'] := idContent;\r\n\r\n while Assigned(Container.firstChild) do\r\n content.appendChild(Container.children[0]);\r\n\r\n Container.appendChild(button);\r\n Container.appendChild(content);\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n idContent := GetContentID;\r\n idButton := GetButtonID;\r\n FIsLoaded := True;\r\n\r\n asm\r\n $(idContent).jqxResponsivePanel({\r\n toggleButton: $(idButton),\r\n });\r\n end;\r\n\r\n TJQXWidgetResponsivePanel(JQuery(idContent)).jqxResponsivePanel(TJSJSON.parseObject('{\"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height) + '}'));\r\n TJQXWidgetResponsivePanel(JQuery(idContent)).on('open', @HandleOpen);\r\n TJQXWidgetResponsivePanel(JQuery(idContent)).on('close', @HandleClose);\r\n TJQXWidgetResponsivePanel(JQuery(idContent)).on('collapse', @HandleCollapse);\r\n TJQXWidgetResponsivePanel(JQuery(idContent)).on('expand', @HandleExpand);\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TJQXResponsivePanel.Open;\r\nbegin\r\n TJQXWidgetResponsivePanel(JQuery(GetContentID)).jqxResponsivePanel('open');\r\nend;\r\n\r\nprocedure TJQXResponsivePanel.Refresh;\r\nbegin\r\n TJQXWidgetResponsivePanel(JQuery(GetContentID)).jqxResponsivePanel('refresh');\r\nend;\r\n\r\nprocedure TJQXResponsivePanel.SetAnimationType(const Value: TJQXAnimationType);\r\nbegin\r\n FAnimationType := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXResponsivePanel.SetAutoClose(const Value: Boolean);\r\nbegin\r\n FAutoClose := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXResponsivePanel.SetCollapsBreakPoint(const Value: Integer);\r\nbegin\r\n FCollapseBreakPoint := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXResponsivePanel.SetEnabled(Value: boolean);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXResponsivePanel.SetHeight(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXResponsivePanel.SetTheme(AValue: string);\r\nbegin\r\n inherited;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n TJQXWidgetResponsivePanel(JQuery(GetContentID)).jqxResponsivePanel('theme', GetTheme(AValue))\r\nend;\r\n\r\nprocedure TJQXResponsivePanel.SetToggleButtonSize(const Value: Integer);\r\nbegin\r\n FToggleButtonSize := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXResponsivePanel.SetWidth(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXResponsivePanel.UpdateElement;\r\nvar\r\n satype: string;\r\nbegin\r\n inherited;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n TJQXWidgetResponsivePanel(JQuery(GetContentID)).jqxResponsivePanel('autoClose', BoolToStr(FAutoClose, True));\r\n TJQXWidgetResponsivePanel(JQuery(GetContentID)).jqxResponsivePanel('collapseBreakpoint', FCollapseBreakpoint);\r\n TJQXWidgetResponsivePanel(JQuery(GetContentID)).jqxResponsivePanel('toggleButtonSize', FToggleButtonSize);\r\n TJQXWidgetResponsivePanel(JQuery(GetContentID)).jqxResponsivePanel('toggleButtonSize', FToggleButtonSize);\r\n\r\n satype := 'none';\r\n if FAnimationType = aTSlide then\r\n satype := 'slide'\r\n else if FAnimationType = aTFade then\r\n satype := 'fade';\r\n\r\n TJQXWidgetResponsivePanel(JQuery(GetContentID)).jqxResponsivePanel('animationType', satype);\r\n TJQXWidgetResponsivePanel(JQuery(GetContentID)).jqxResponsivePanel('animationDirection', 'top');\r\n end;\r\nend;\r\n\r\n{ TJQXTabs }\r\n\r\nprocedure TJQXTabs.BindEvents;\r\nbegin\r\n// inherited;\r\nend;\r\n\r\nprocedure TJQXTabs.CreateInitialize;\r\nbegin\r\n inherited;\r\n FCollapsible := False;\r\n FEnableHover := True;\r\n FEnableScrollAnimation := True;\r\n FPosition := tpTop;\r\n FReorder := False;\r\n FSelectionTracker := False;\r\n FScrollPosition := hpRight;\r\n FScrollStep := 70;\r\n FToggleMode := tmClick;\r\n Height := 200;\r\n Width := 200;\r\n\r\n RequiredScripts.Add('jqxtabs.js');\r\n\r\n ScriptLoaded := not AddRequiredScripts;\r\nend;\r\n\r\nfunction TJQXTabs.HandleSelected(Event: TJQXEvent): boolean;\r\nvar\r\n Args: TJQXTabEventArgs;\r\n index: string;\r\nbegin\r\n\r\n GetTabIndex;\r\n\r\n if Assigned(OnSelected) then\r\n begin\r\n Args := TJQXTabEventArgs.Create;\r\n index := string(Event.Args.Properties['item']);\r\n if index <> '' then\r\n Args.TabIndex := StrToInt(index)\r\n else\r\n Args.TabIndex := -1;\r\n OnSelected(Self, Args);\r\n Args.Free;\r\n end;\r\n\r\n Result := True;\r\nend;\r\n\r\nfunction TJQXTabs.HandleTabClick(Event: TJQXEvent): boolean;\r\nvar\r\n Args: TJQXTabEventArgs;\r\n index: string;\r\nbegin\r\n if Assigned(OnTabClick) then\r\n begin\r\n Args := TJQXTabEventArgs.Create;\r\n index := string(Event.Args.Properties['item']);\r\n if index <> '' then\r\n Args.TabIndex := StrToInt(index)\r\n else\r\n Args.TabIndex := -1;\r\n OnTabClick(Self, Args);\r\n Args.Free;\r\n end;\r\n\r\n Result := True;\r\nend;\r\n\r\nprocedure TJQXTabs.InitJQuery;\r\nvar\r\n listitem: TJSElement;\r\n list: TJSElement;\r\n I: Integer;\r\nbegin\r\n inherited;\r\n\r\n if FIsLoaded then\r\n Exit;\r\n\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n if not ScriptLoaded then\r\n Exit;\r\n\r\n if ControlCount <= 0 then\r\n Exit;\r\n\r\n list := document.createElement('UL');\r\n for I := 0 to ControlCount - 1 do\r\n begin\r\n listitem := document.createElement('LI');\r\n listitem.innerHTML := TJQXTabSheet(Controls[I]).Caption;\r\n list.appendChild(listitem);\r\n end;\r\n Container.appendChild(list);\r\n\r\n for i := 0 to ControlCount - 1 do\r\n begin\r\n if Controls[i] is TJQXTabSheet then\r\n begin\r\n TJQXTabSheet(Controls[i]).GetElementHandle.style.setProperty('top', '');\r\n TJQXTabSheet(Controls[i]).GetElementHandle.style.setProperty('border-width', '0px');\r\n TJQXTabSheet(Controls[i]).ElementHandle.style.setProperty('white-space', '');\r\n end;\r\n end;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n FIsLoaded := True;\r\n\r\n TJQXWidgetTabs(JQuery(GetJQID)).jqxTabs(TJSJSON.parseObject('{\"width\": ' + IntToStr(Width) + ', \"height\": ' + IntToStr(Height) + '}'));\r\n TJQXWidgetTabs(JQuery(GetJQID)).on('selected', @HandleSelected);\r\n TJQXWidgetTabs(JQuery(GetJQID)).on('tabclick', @HandleTabClick);\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TJQXTabs.SetCollapsible(const Value: Boolean);\r\nbegin\r\n FCollapsible := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXTabs.SetEnabled(Value: boolean);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXTabs.SetEnableHover(const Value: Boolean);\r\nbegin\r\n FEnableHover := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXTabs.SetEnableScrollAnimation(const Value: Boolean);\r\nbegin\r\n FEnableScrollAnimation := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXTabs.SetHeight(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXTabs.SetPosition(const Value: TJQXTabPosition);\r\nbegin\r\n FPosition := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXTabs.SetReorder(const Value: Boolean);\r\nbegin\r\n FReorder := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXTabs.SetScrollPosition(const Value: TJQXHorizontalPosition);\r\nbegin\r\n FScrollPosition := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXTabs.SetScrollStep(const Value: Integer);\r\nbegin\r\n FScrollStep := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXTabs.SetSelectionTracker(const Value: Boolean);\r\nbegin\r\n FSelectionTracker := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXTabs.SetTabIndex(const Value: Integer);\r\nbegin\r\n FTabIndex := Value;\r\n UpdateElement;\r\nend;\r\n\r\nfunction TJQXTabs.GetTabIndex: Integer;\r\nvar\r\n index: string;\r\nbegin\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n index := TJSJSON.stringify(TJQXWidgetTabs(JQuery(GetJQID)).jqxTabs('selectedItem'));\r\n if (index <> '') and (index <> 'null') then\r\n FTabIndex := StrToInt(index);\r\n end;\r\n\r\n Result := FTabIndex;\r\nend;\r\n\r\nprocedure TJQXTabs.SetTheme(AValue: string);\r\nbegin\r\n inherited;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n TJQXWidgetTabs(JQuery(GetJQID)).jqxTabs('theme', GetTheme(AValue))\r\nend;\r\n\r\nprocedure TJQXTabs.SetToggleMode(const Value: TJQXToggleMode);\r\nbegin\r\n FToggleMode := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXTabs.SetWidth(AValue: Integer);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TJQXTabs.UpdateElement;\r\nvar\r\n spos, sscrollpos, stoggle: string;\r\nbegin\r\n inherited;\r\n\r\n if not FIsLoaded then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\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 spos := 'top';\r\n if FPosition = tpBottom then\r\n spos := 'bottom';\r\n\r\n sscrollpos := 'right';\r\n if FScrollPosition = hpBoth then\r\n sscrollpos := 'both'\r\n else if FScrollPosition = hpLeft then\r\n sscrollpos := 'left';\r\n\r\n stoggle := 'click';\r\n if FToggleMode = tmDoubleClick then\r\n stoggle := 'dblclick'\r\n else if FToggleMode = tmMouseEnter then\r\n stoggle := 'mouseenter';\r\n\r\n TJQXWidgetTabs(JQuery(GetJQID)).jqxTabs('collapsible', FCollapsible);\r\n TJQXWidgetTabs(JQuery(GetJQID)).jqxTabs('enabledHover', FEnableHover);\r\n TJQXWidgetTabs(JQuery(GetJQID)).jqxTabs('enableScrollAnimation', FEnableScrollAnimation);\r\n TJQXWidgetTabs(JQuery(GetJQID)).jqxTabs('position', spos);\r\n TJQXWidgetTabs(JQuery(GetJQID)).jqxTabs('reorder', FReorder);\r\n TJQXWidgetTabs(JQuery(GetJQID)).jqxTabs('selectionTracker', FSelectionTracker);\r\n TJQXWidgetTabs(JQuery(GetJQID)).jqxTabs('scrollPosition', sscrollpos);\r\n TJQXWidgetTabs(JQuery(GetJQID)).jqxTabs('scrollStep', FScrollStep);\r\n TJQXWidgetTabs(JQuery(GetJQID)).jqxTabs('toggleMode', stoggle);\r\n TJQXWidgetTabs(JQuery(GetJQID)).jqxTabs('theme', GetTheme(Theme));\r\n\r\n TJQXWidgetTabs(JQuery(GetJQID)).jqxTabs('selectedItem', FTabIndex);\r\n end;\r\nend;\r\n\r\n{ TJQXTabSheet }\r\n\r\nprocedure TJQXTabSheet.BindEvents;\r\nbegin\r\n //disabled\r\nend;\r\n\r\nprocedure TJQXTabSheet.CreateInitialize;\r\nbegin\r\n inherited;\r\n Color := clWhite;\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\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{ }\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","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 'j0YxJiCrDRqFoPpq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NjA2LDEuMzQyLDMsMywzYzEuNjU4LDAsMy0xLjM5NSwzLTMgICAgQzE1LjAxOCwxMC4zOTIsMTMuNjc2LDguOTk3LDEyLjAxOCw5eiIgZmlsbC1ydWxlPSJldmVu'+\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 - 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.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 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 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 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\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 procedure SetCaption(const Value: string);\r\n procedure SetVisible(const Value: boolean);\r\n procedure SetPager(const Value: TTablePager);\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 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.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 = 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 StartEdit(Event.Key);\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\nbegin\r\n cindex := -1;\r\n rindex := -1;\r\n\r\n ClientToXY(X,Y,DocX,DocY);\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 fixcol := ColorToHTML(FFixedColor);\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;'+\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 ' 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: 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 el.innerHTML := StrVal;\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\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\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 = s;\r\n }\r\n else {\r\n this.FEdit.value = ch;\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\r\n asm\r\n this.FEdit.focus();\r\n end;\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() == '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: 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 // 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\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\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 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 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.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 FPagerElement.style.setProperty('float','right');\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 FPagerElement.style.setProperty('float','right');\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 FPagerElement.style.setProperty('float','right');\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 FPagerElement.style.setProperty('float','right');\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 FPagerElement.style.setProperty('float','right');\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) 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 - 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.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 cn <> '' then\r\n begin\r\n ce.setAttribute('class',cn);\r\n end;\r\n\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 begin\r\n ce.setAttribute('class',cn);\r\n end;\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: 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 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 (cn <> '') and Assigned(ce) then\r\n begin\r\n ce.classList.add(cn);\r\n\r\n subclass := cn;\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 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,subp: integer;\r\n fld: TField;\r\n cd,cn,subclass: 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 begin\r\n subclass := cn;\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\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) 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.SpeechRecognition;\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\nuses\r\n web,js, Classes, weblib.Controls, WEBLib.StdCtrls, WEBLib.WebCtrls,\r\n WEBLib.Graphics, SysUtils;\r\n\r\ntype\r\n TCommandEvent = procedure(Sender: TObject; Parameters: TStrings) of object;\r\n\r\n TCommand = class(TCollectionItem)\r\n private\r\n FValue: string;\r\n FOnCommand: TCommandEvent;\r\n FTag: integer;\r\n procedure SetOnCommand(AEvent: TCommandEvent);\r\n procedure SetValue(AValue: String);\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property Tag: integer read FTag write FTag;\r\n property Value: String read FValue write SetValue;\r\n property OnCommand: TCommandEvent read FOnCommand write SetOnCommand;\r\n end;\r\n\r\n TCommands = class(TOwnedCollection)\r\n private\r\n FOnChange: TNotifyEvent;\r\n function GetItem(Index: integer): TCommand; reintroduce;\r\n procedure SetItem(Index: integer; const Value: TCommand);\r\n protected\r\n procedure Changed; reintroduce;\r\n procedure Update(Item: TCollectionItem); override;\r\n public\r\n constructor Create(AOwner: TComponent);\r\n procedure EndUpdate; override;\r\n function Find(ACommand: string): TCommand;\r\n function Add: TCommand; reintroduce;\r\n procedure Delete(Index: Integer); reintroduce;\r\n function Insert(Index: integer): TCommand; reintroduce;\r\n property Items[Index: integer]: TCommand read GetItem write SetItem; default;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n TPhrasesEvent = procedure(Sender: TObject; Phrases: TStrings) of object;\r\n TResultMatchEvent = procedure (Sender: TObject; userSaid: String; Parameters: TStrings; Command: TCommand; Phrases: TStrings) of object;\r\n\r\n TSpeechRecognition = class(TComponent)\r\n private\r\n FLanguage: String;\r\n FCommands: TCommands;\r\n FOnResultMatch: TResultMatchEvent;\r\n FOnNoResultMatch: TPhrasesEvent;\r\n FOnResult: TPhrasesEvent;\r\n FOnNetworkError: TNotifyEvent;\r\n FOnSoundStart: TNotifyEvent;\r\n FOnEnd: TNotifyEvent;\r\n FOnPermissionBlockedError: TNotifyEvent;\r\n FOnPermissionDeniedError: TNotifyEvent;\r\n FOnStart: TNotifyEvent;\r\n FOnError: TNotifyEvent;\r\n procedure SetLanguage(ALanguage: String);\r\n procedure SetCommands(ACommands: TCommands);\r\n protected\r\n procedure DoCommandsChanged(Sender: TObject);\r\n public\r\n procedure Start;\r\n procedure Abort;\r\n procedure Pause;\r\n procedure Resume;\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n published\r\n property Language: String read FLanguage write SetLanguage;\r\n property Commands: TCommands read FCommands write SetCommands;\r\n property OnResultMatch: TResultMatchEvent read FOnResultMatch write FOnResultMatch;\r\n property OnNoResultMatch: TPhrasesEvent read FOnNoResultMatch write FOnNoResultMatch;\r\n property OnResult: TPhrasesEvent read FOnResult write FOnResult;\r\n property OnStart: TNotifyEvent read FOnStart write FOnStart;\r\n property OnEnd: TNotifyEvent read FOnEnd write FOnEnd;\r\n property OnSoundStart: TNotifyEvent read FOnSoundStart write FOnSoundStart;\r\n property OnError: TNotifyEvent read FOnError write FOnError;\r\n property OnNetworkError: TNotifyEvent read FOnNetworkError write FOnNetworkError;\r\n property OnPermissionBlockedError: TNotifyEvent read FOnPermissionBlockedError write FOnPermissionBlockedError;\r\n property OnPermissionDeniedError: TNotifyEvent read FOnPermissionDeniedError write FonPermissionDeniedError;\r\n end;\r\n\r\n TWebSpeechRecognition = class(TSpeechRecognition);\r\n\r\nimplementation\r\n\r\n{TSpeechRecognition}\r\n\r\n{$HINTS OFF}\r\nconstructor TSpeechRecognition.Create(AOwner: TComponent);\r\n\r\n procedure HandleCommand(ACommand: string; parameters: TJSArray; Phrase: String; alt: TJSArray);\r\n var\r\n c: TCommand;\r\n para, alternatives: TStrings;\r\n r: String;\r\n s: JSValue;\r\n begin\r\n r := StringReplace(ACommand, '(.)(!)(?)', '', [rfReplaceAll]);\r\n c := FCommands.Find(ACommand);\r\n para := TStringList.Create;\r\n for s in parameters do\r\n begin\r\n r := StringReplace(string(s), '.', '', [rfReplaceAll]);\r\n para.add(r);\r\n end;\r\n\r\n alternatives := TStringList.Create;\r\n for s in alt do\r\n begin\r\n r := StringReplace(string(s), '.', '', [rfReplaceAll]);\r\n alternatives.add(r);\r\n end;\r\n\r\n if Assigned(c) and Assigned(c.OnCommand) then\r\n c.OnCommand(c, para);\r\n\r\n if Assigned(OnResultMatch) then\r\n OnResultMatch(Self, Phrase, para, c, alternatives);\r\n end;\r\n\r\n procedure HandleNoResultMatch(Phrases: TJSArray);\r\n var\r\n p: TStrings;\r\n r: string;\r\n s: JSValue;\r\n begin\r\n p := TStringList.Create;\r\n for s in Phrases do\r\n begin\r\n r := StringReplace(string(s), '.', '', [rfReplaceAll]);\r\n p.add(r);\r\n end;\r\n\r\n if Assigned(OnNoResultMatch) then\r\n OnNoResultMatch(Self, p);\r\n end;\r\n\r\n procedure HandleResult(Phrases: TJSArray);\r\n var\r\n p: TStrings;\r\n r: String;\r\n s: JSValue;\r\n begin\r\n p := TStringList.Create;\r\n for s in Phrases do\r\n begin\r\n r := StringReplace(string(s), '.', '', [rfReplaceAll]);\r\n p.add(r);\r\n end;\r\n \r\n if Assigned(OnResult) then\r\n OnResult(Self, p);\r\n end;\r\n\r\n procedure HandleStart;\r\n begin\r\n if Assigned(OnStart) then\r\n OnStart(Self);\r\n end;\r\n\r\n procedure HandleEnd;\r\n begin\r\n if Assigned(OnEnd) then\r\n OnEnd(Self);\r\n end;\r\n\r\n procedure HandleSoundStart;\r\n begin\r\n if Assigned(OnSoundStart) then\r\n OnSoundStart(Self);\r\n end;\r\n\r\n procedure HandleError;\r\n begin\r\n if Assigned(OnError) then\r\n OnError(Self);\r\n end;\r\n\r\n procedure HandleNetworkError;\r\n begin\r\n if Assigned(OnNetworkError) then\r\n OnNetworkError(Self);\r\n end;\r\n\r\n procedure HandlePermissionBlocked;\r\n begin\r\n if Assigned(OnPermissionBlockedError) then\r\n OnPermissionBlockedError(Self);\r\n end;\r\n\r\n procedure HandlePermissionDenied;\r\n begin\r\n if Assigned(OnPermissionDeniedError) then\r\n OnPermissionDeniedError(Self);\r\n end;\r\n\r\nbegin\r\n inherited;\r\n FLanguage := 'en-US';\r\n FCommands := TCommands.Create(Self);\r\n FCommands.OnChange := DoCommandsChanged;\r\n asm\r\n if (annyang){\r\n annyang.addCallback('resultMatch', function(parameters, phrase, cmd,alt)\r\n {\r\n HandleCommand(cmd, parameters, phrase, alt);\r\n });\r\n\r\n annyang.addCallback('resultNoMatch', function(phrases)\r\n {\r\n HandleNoResultMatch(phrases);\r\n });\r\n\r\n annyang.addCallback('start', function()\r\n {\r\n HandleStart();\r\n });\r\n\r\n annyang.addCallback('soundstart', function()\r\n {\r\n HandleSoundStart();\r\n });\r\n annyang.addCallback('error', function()\r\n {\r\n HandleError();\r\n });\r\n annyang.addCallback('errorNetwork', function()\r\n {\r\n HandleNetworkError();\r\n });\r\n annyang.addCallback('errorPermissionBlocked', function()\r\n {\r\n HandlePermissionBlocked();\r\n });\r\n annyang.addCallback('errorPermissionDenied', function()\r\n {\r\n HandlePermissionDenied();\r\n });\r\n annyang.addCallback('end', function()\r\n {\r\n HandleEnd();\r\n });\r\n annyang.addCallback('result', function(phrases)\r\n {\r\n HandleResult(phrases);\r\n });\r\n }\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\ndestructor TSpeechRecognition.Destroy;\r\nbegin\r\n FCommands.free;\r\n inherited;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TSpeechRecognition.DoCommandsChanged(Sender: TObject);\r\nvar\r\n cmd: string;\r\n event: TCommandEvent;\r\n i: Integer;\r\nbegin\r\n asm\r\n if (annyang) {\r\n annyang.removeCommands();\r\n }\r\n end;\r\n for i := 0 to FCommands.Count -1 do\r\n begin\r\n cmd := FCommands[i].Value + '(.)(!)(?)';\r\n asm\r\n if (annyang){\r\n var commands = {};\r\n commands[cmd] = function(){ return undefined;};\r\n annyang.addCommands(commands);\r\n }\r\n end;\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TSpeechRecognition.Start;\r\nbegin\r\n asm\r\n annyang.start();\r\n end;\r\nend;\r\n\r\nprocedure TSpeechRecognition.Abort;\r\nbegin\r\n asm\r\n annyang.abort();\r\n end;\r\nend;\r\n\r\nprocedure TSpeechRecognition.Pause;\r\nbegin\r\n asm\r\n annyang.pause();\r\n end;\r\nend;\r\n\r\nprocedure TSpeechRecognition.Resume;\r\nbegin\r\n asm\r\n annyang.resume();\r\n end;\r\nend;\r\n\r\nprocedure TSpeechRecognition.SetLanguage(aLanguage: String);\r\nbegin\r\n if FLanguage <> aLanguage then\r\n begin\r\n FLanguage := aLanguage;\r\n asm\r\n if (annyang) {\r\n annyang.setLanguage(this.FLanguage);\r\n }\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TSpeechRecognition.SetCommands(ACommands: TCommands);\r\nbegin\r\n FCommands.Assign(ACommands);\r\nend;\r\n\r\n{TCommands}\r\n\r\nprocedure TCommands.Changed;\r\nbegin\r\n if (UpdateCount = 0) And Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TCommands.Create(AOwner: TComponent);\r\nbegin\r\n inherited Create(AOwner, TCommand);\r\nend;\r\n\r\nprocedure TCommands.Delete(Index: Integer);\r\nbegin\r\n Inherited Delete(Index);\r\n Changed;\r\nend;\r\n\r\nprocedure TCommands.EndUpdate;\r\nbegin\r\n inherited;\r\n Changed;\r\nend;\r\n\r\nfunction TCommands.Find(ACommand: string): TCommand;\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 (CompareText(Items[i].Value + '(.)(!)(?)', ACommand) = 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 TCommands.Add: TCommand;\r\nbegin\r\n Result := TCommand(inherited Add);\r\n Changed;\r\nend;\r\n\r\nfunction TCommands.Insert(Index: integer): TCommand;\r\nbegin\r\n Result := TCommand(inherited Insert(Index));\r\n Changed;\r\nend;\r\n\r\nfunction TCommands.GetItem(Index: integer): TCommand;\r\nbegin\r\n Result := TCommand(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TCommands.SetItem(Index: integer; const Value: TCommand);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nprocedure TCommands.Update(Item: TCollectionItem);\r\nbegin\r\n inherited;\r\n Changed;\r\nend;\r\n\r\n{TCommand}\r\n\r\nprocedure TCommand.SetOnCommand(AEvent: TCommandEvent);\r\nbegin\r\n FOnCommand := AEvent;\r\n (Collection as TCommands).Update(Self); \r\nend;\r\n\r\nprocedure TCommand.SetValue(AValue: String);\r\nbegin\r\n if FValue <> AValue then\r\n begin\r\n FValue := AValue;\r\n end;\r\nend;\r\n\r\nprocedure TCommand.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TCommand) then\r\n begin\r\n FValue := (Source as TCommand).Value;\r\n FTag := (Source as TCommand).Tag;\r\n FOnCommand := (Source as TCommand).OnCommand;\r\n (Collection as TCommands).Update(Self);\r\n end;\r\nend;\r\n\r\nend.","unit WEBLib.Clipboard;\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, web, js;\r\n\r\ntype\r\n TClipboardImageDataEvent = procedure(ADataURL: string) of object;\r\n TClipboardTextDataEvent = procedure(AData: string; AMimeType: string) of object;\r\n\r\n TClipboard = class(TComponent)\r\n private\r\n FOnImageData: TClipboardImageDataEvent;\r\n FOnTextData: TClipboardTextDataEvent;\r\n protected\r\n procedure BindEventListener;\r\n procedure UnbindEventListener;\r\n function DoHandlePaste(Event: TEventListenerEvent): Boolean;\r\n function HandleFileLoad(Event: TEventListenerEvent): Boolean;\r\n procedure ReadStringData(AItem: TJSDataTransferItem; AMimeType: string);\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n class procedure CopyToClipboard(const AValue: string);\r\n class function AsText: string; async;\r\n class procedure SetAsText(const AValue: string);\r\n class procedure SetAsImage(img: TJSHTMLImageElement); async;\r\n published\r\n property OnImageData: TClipboardImageDataEvent read FOnImageData write FOnImageData;\r\n property OnTextData: TClipboardTextDataEvent read FOnTextData write FOnTextData;\r\n end;\r\n\r\n TWebClipboard = class(TClipboard);\r\n\r\nimplementation\r\n\r\n{ TClipboardImage }\r\n\r\n\r\nclass function TClipboard.AsText: string;\r\nvar\r\n res: string;\r\nbegin\r\n asm\r\n res = await navigator.clipboard.readText();\r\n end;\r\n\r\n Result := res;\r\nend;\r\n\r\nclass procedure TClipboard.SetAsText(const AValue: string);\r\nbegin\r\n asm\r\n window.navigator.clipboard.writeText(AValue);\r\n end;\r\nend;\r\n\r\nclass procedure TClipboard.SetAsImage(img: TJSHTMLImageElement);\r\nbegin\r\n asm\r\n const response = await fetch(img.currentSrc);\r\n const blob = await response.blob();\r\n await navigator.clipboard.write([new ClipboardItem({'image/png': blob})]);\r\n end;\r\nend;\r\n\r\n\r\nprocedure TClipboard.BindEventListener;\r\nbegin\r\n window.addEventListener('paste', @DoHandlePaste);\r\nend;\r\n\r\nclass procedure TClipboard.CopyToClipboard(const AValue: string);\r\nbegin\r\n asm\r\n if (window.navigator.clipboard != null) {\r\n window.navigator.clipboard.writeText(AValue);\r\n }\r\n end;\r\nend;\r\n\r\nconstructor TClipboard.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n BindEventListener;\r\nend;\r\n\r\ndestructor TClipboard.Destroy;\r\nbegin\r\n UnbindEventListener;\r\n inherited;\r\nend;\r\n\r\nprocedure TClipboard.ReadStringData(AItem: TJSDataTransferItem;\r\n AMimeType: string);\r\nbegin\r\n AItem.getAsString(procedure (AData: string)\r\n begin\r\n if Assigned(OnTextData) then\r\n OnTextData(AData, AMimeType);\r\n end);\r\nend;\r\n\r\nfunction TClipboard.HandleFileLoad(Event: TEventListenerEvent): Boolean;\r\nvar\r\n du: string;\r\nbegin\r\n Result := True;\r\n asm\r\n du = Event.target.result;\r\n end;\r\n if Assigned(OnImageData) then\r\n OnImageData(du);\r\nend;\r\n\r\nfunction TClipboard.DoHandlePaste(Event: TEventListenerEvent): Boolean;\r\nvar\r\n data: TJSDataTransferItemList;\r\n I: Integer;\r\n blob: TJSBlob;\r\n fr: TJSFileReader;\r\nbegin\r\n Result := True;\r\n asm\r\n data = Event.clipboardData.items;\r\n end;\r\n for I := 0 to data.length - 1 do\r\n begin\r\n if (data.Items[I].kind = 'file') and (Pos('image', data.Items[I]._Type) > 0) then\r\n begin\r\n blob := data.Items[I].getAsFile;\r\n if Assigned(blob) then\r\n begin\r\n fr := TJSFileReader.new;\r\n fr.onload := HandleFileLoad;\r\n fr.readAsDataURL(blob);\r\n end;\r\n end\r\n else if data.Items[I].kind = 'string' then\r\n ReadStringData(data.Items[I], data.Items[I]._Type);\r\n end;\r\nend;\r\n\r\nprocedure TClipboard.UnbindEventListener;\r\nbegin\r\n window.removeEventListener('paste', @DoHandlePaste);\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\n\r\nVar\r\n C : Char;\r\n S : String;\r\nbegin\r\n C:=CurrentChar;\r\n while (not IsWordDelim(C)) and (C<>cNull) do\r\n begin\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='_') 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\nbegin\r\n If FDirty then\r\n CreateHashList;\r\n Result:=TFPExprIdentifierDef(FHashList[LowerCase(AName)]);\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 CreateIndexes; virtual;\r\n // Convert MetaData object to FieldDefs.\r\n Procedure MetaDataToFieldDefs; virtual; abstract;\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 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.GetRecNo: Integer;\r\n\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\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\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 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 Indexes;\r\n property ActiveIndex;\r\n published\r\n // redeclared data set properties\r\n// property Active;\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 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 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.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 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 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 res := aBatch.List.Count > 0;\r\n\r\n for i := 0 to aBatch.List.Count - 1 do\r\n begin\r\n if 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.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.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) 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.Toast;\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\n// https://getbootstrap.com/docs/4.3/components/toasts/\r\n// https://www.tutorialrepublic.com/twitter-bootstrap-tutorial/bootstrap-toasts.php\r\n// https://www.w3schools.com/howto/howto_js_add_class.asp\r\n// event for click\r\n\r\nuses\r\n Web, Classes, SysUtils, WEBLib.Controls, WEBLib.ExtCtrls;\r\n\r\n\r\ntype\r\n TToast = class;\r\n\r\n TToastPosition = (tpTopLeft,tpTopRight, tpBottomLeft, tpBottomRight, tpAbsolute, tpContainer);\r\n\r\n TToastTime = (ttNone, ttShow, ttDeltaShow);\r\n\r\n TToastItem = class(TCollectionItem)\r\n private\r\n FBody: string;\r\n FHeader: string;\r\n FCloseButton: boolean;\r\n FElementHandle: TJSHTMLElement;\r\n FElementTime: TJSHTMLElement;\r\n FAutoHide: boolean;\r\n FTime: TToastTime;\r\n FDispTime: TDateTime;\r\n FVisible: boolean;\r\n FID: integer;\r\n procedure SetVisible(const Value: boolean);\r\n protected\r\n function ToastID: string;\r\n procedure UpdateToast(el: TJSHTMLElement);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n procedure Show;\r\n procedure Hide;\r\n function CreateToast: TJSHTMLElement;\r\n procedure Update;\r\n function Toast: TToast; virtual;\r\n property Visible: boolean read FVisible write SetVisible;\r\n published\r\n property AutoHide: boolean read FAutoHide write FAutoHide default false;\r\n property Body: string read FBody write FBody;\r\n property CloseButton: boolean read FCloseButton write FCloseButton default true;\r\n property Time: TToastTime read FTime write FTime;\r\n property Header: string read FHeader write FHeader;\r\n end;\r\n\r\n TToastCollection = class(TOwnedCollection)\r\n private\r\n FUniqueID: integer;\r\n function GetItem(AIndex: integer): TToastItem; reintroduce;\r\n procedure SetItem(AIndex: integer; const Value: TToastItem);\r\n protected\r\n property UniqueID: integer read FUniqueID write FUniqueID;\r\n\r\n public\r\n constructor Create(AOwner: TComponent); reintroduce;\r\n function Add(AHeader,ABody: string): TToastItem; overload; reintroduce;\r\n function Add: TToastItem; overload; reintroduce;\r\n function Insert(Index: integer): TToastItem; reintroduce;\r\n property Items[AIndex: integer]: TToastItem read GetItem write SetItem; default;\r\n end;\r\n\r\n TToastHideEvent = procedure(Sender: TObject; AIndex: integer) of object;\r\n\r\n TLibraryLevel = (llv4,llv5);\r\n\r\n TToast = class(TComponent)\r\n private\r\n FToastContainer: TJSHTMLElement;\r\n FItems: TToastCollection;\r\n FPosition: TToastPosition;\r\n FTimer: TTimer;\r\n FAutoHideDelay: integer;\r\n FContainer: TElementID;\r\n FX: integer;\r\n FY: integer;\r\n FClosePtr: pointer;\r\n FOnHide: TToastHideEvent;\r\n FLevel: TLibraryLevel;\r\n procedure SetX(const Value: integer);\r\n procedure SetY(const Value: integer);\r\n protected\r\n procedure SetItems(const Value: TToastCollection);\r\n procedure UpdatePosition;\r\n procedure EnsureToastArea;\r\n procedure UpdateTimes(Sender: TObject);\r\n function HandleClose(Event: TEventListenerEvent): boolean; virtual;\r\n procedure DoHideToast(AIndex: integer); virtual;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n published\r\n property AutoHideDelay: integer read FAutoHideDelay write FAutoHideDelay default 5000;\r\n property Container: TElementID read FContainer write FContainer;\r\n property Items: TToastCollection read FItems write SetItems;\r\n property Level: TLibraryLevel read FLevel write FLevel default llv5;\r\n property Position: TToastPosition read FPosition write FPosition;\r\n property X: integer read FX write SetX default 0;\r\n property Y: integer read FY write SetY default 0;\r\n property OnHide: TToastHideEvent read FOnHide write FOnHide;\r\n end;\r\n\r\n TWebToast = class(TToast);\r\n\r\nfunction CreateToast(ATitle, ABody, AID: string): TJSHTMLElement;\r\n\r\nimplementation\r\n\r\nfunction CreateToast(ATitle, ABody, AID: string): TJSHTMLElement;\r\nvar\r\n el: TJSHTMLElement;\r\n hdr,bdy: TJSHTMLElement;\r\nbegin\r\n el := TJSHTMLElement(document.createElement('DIV'));\r\n\r\n el.classList.Add('toast');\r\n el['data-autohide'] := 'false';\r\n el['id'] := AID;\r\n\r\n hdr := TJSHTMLElement(document.createElement('DIV'));\r\n hdr['class'] := 'toast-header';\r\n hdr.innerHTML := ATitle;\r\n\r\n bdy := TJSHTMLElement(document.createElement('DIV'));\r\n bdy['class'] := 'toast-body';\r\n bdy.innerHTML := ABody;\r\n\r\n el.appendChild(hdr);\r\n el.appendChild(bdy);\r\n\r\n Result := el;\r\nend;\r\n\r\n{ TToastCollection }\r\n\r\nfunction TToastCollection.Add(AHeader, ABody: string): TToastItem;\r\nbegin\r\n Result := TToastItem(inherited Add);\r\n Result.Header := AHeader;\r\n Result.Body := ABody;\r\nend;\r\n\r\nfunction TToastCollection.Add: TToastItem;\r\nbegin\r\n Result := TToastItem(inherited Add);\r\nend;\r\n\r\nconstructor TToastCollection.Create(AOwner: TComponent);\r\nbegin\r\n inherited Create(AOwner, TToastItem);\r\n FUniqueID := 0;\r\nend;\r\n\r\nfunction TToastCollection.GetItem(AIndex: integer): TToastItem;\r\nbegin\r\n Result := TToastItem(inherited Items[AIndex]);\r\nend;\r\n\r\nfunction TToastCollection.Insert(Index: integer): TToastItem;\r\nbegin\r\n Result := TToastItem(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TToastCollection.SetItem(AIndex: integer; const Value: TToastItem);\r\nbegin\r\n inherited Items[AIndex] := Value;\r\nend;\r\n\r\n{ TToastItem }\r\n\r\nprocedure TToastItem.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TToastItem) then\r\n begin\r\n FBody := (Source as TToastItem).Body;\r\n FHeader := (Source as TToastItem).Header;\r\n FCloseButton := (Source as TToastItem).CloseButton;\r\n FAutoHide := (Source as TToastItem).AutoHide;\r\n FTime := (Source as TToastItem).Time;\r\n end;\r\nend;\r\n\r\nconstructor TToastItem.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n (ACollection as TToastCollection).UniqueID := (ACollection as TToastCollection).UniqueID + 1;\r\n FElementHandle := nil;\r\n FTime := ttNone;\r\n FCloseButton := true;\r\n FID := (ACollection as TToastCollection).UniqueID;\r\nend;\r\n\r\nprocedure TToastItem.UpdateToast(el: TJSHTMLElement);\r\nvar\r\n hdr,bdy,btn,cap: TJSHTMLElement;\r\nbegin\r\n el.classList.Add('toast');\r\n\r\n if AutoHide then\r\n begin\r\n el['data-autohide'] := 'true';\r\n el['data-delay'] := IntToStr(Toast.AutoHideDelay);\r\n end\r\n else\r\n el['data-autohide'] := 'false';\r\n\r\n el['data-animation'] := 'true';\r\n el['role'] := 'alert';\r\n el['id'] := ToastID;\r\n el.style.setProperty('min-width','300px');\r\n\r\n hdr := TJSHTMLElement(document.createElement('DIV'));\r\n hdr['class'] := 'toast-header';\r\n\r\n cap := TJSHTMLElement(document.createElement('STRONG'));\r\n if (Collection.Owner as TToast).Level = llv4 then\r\n cap['class'] := 'mr-auto'\r\n else\r\n cap['class'] := 'me-auto';\r\n\r\n cap.innerHTML := FHeader;\r\n hdr.appendChild(cap);\r\n\r\n if Time <> ttNone then\r\n begin\r\n FElementTime := TJSHTMLElement(document.createElement('SMALL'));\r\n\r\n if Time = ttShow then\r\n FElementTime.innerHTML := TimeToStr(Now);\r\n\r\n hdr.appendChild(FElementTime);\r\n end;\r\n\r\n if CloseButton then\r\n begin\r\n btn := TJSHTMLElement(document.createElement('BUTTON'));\r\n btn['type'] := 'button';\r\n\r\n if (Collection.Owner as TToast).Level = llv4 then\r\n begin\r\n btn['class'] := 'ml-2 mb-1 close';\r\n btn['data-dismiss'] := 'toast';\r\n end\r\n else\r\n begin\r\n btn['class'] := 'btn-close';\r\n btn['data-bs-dismiss'] := 'toast';\r\n end;\r\n\r\n btn['data-id'] := ToastID;\r\n\r\n if (Collection.Owner as TToast).Level = llv4 then\r\n btn.innerHTML := '×';\r\n btn.addEventListener('click',Toast.FClosePtr);\r\n hdr.appendChild(btn);\r\n end;\r\n\r\n bdy := TJSHTMLElement(document.createElement('DIV'));\r\n bdy['class'] := 'toast-body';\r\n bdy.innerHTML := FBody;\r\n\r\n el.appendChild(hdr);\r\n el.appendChild(bdy);\r\nend;\r\n\r\nfunction TToastItem.CreateToast: TJSHTMLElement;\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n el := TJSHTMLElement(document.createElement('DIV'));\r\n UpdateToast(el);\r\n Result := el;\r\nend;\r\n\r\ndestructor TToastItem.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TToastItem.Hide;\r\nvar\r\n id: string;\r\nbegin\r\n if Assigned(FElementHandle) then\r\n begin\r\n id := ToastID;\r\n\r\n asm\r\n var tst = document.getElementById(id); //select id of toast\r\n var msg = new bootstrap.Toast(tst); //inizialize it\r\n msg.hide(); //show it\r\n end;\r\n\r\n FVisible := false;\r\n end;\r\nend;\r\n\r\nprocedure TToastItem.SetVisible(const Value: boolean);\r\nbegin\r\n if (FVisible <> Value) then\r\n begin\r\n FVisible := Value;\r\n if FVisible then\r\n Show\r\n else\r\n Hide;\r\n end;\r\nend;\r\n\r\nprocedure TToastItem.Show;\r\nvar\r\n id: string;\r\n el: TJSElement;\r\nbegin\r\n Toast.UpdatePosition;\r\n\r\n if not Assigned(FElementHandle) then\r\n FElementHandle := CreateToast;\r\n\r\n id := ToastID;\r\n\r\n el := Toast.FToastContainer;\r\n\r\n if (Toast.Position = tpContainer) and (Toast.Container <> '') then\r\n begin\r\n el := document.getElementById(Toast.Container);\r\n if not Assigned(el) then\r\n el := Toast.FToastContainer;\r\n end;\r\n\r\n el.appendChild(FElementHandle);\r\n\r\n if (id <> '') then\r\n begin\r\n asm\r\n var tst = document.getElementById(id); //select id of toast\r\n var msg = new bootstrap.Toast(tst); //inizialize it\r\n msg.show(); //show it\r\n end;\r\n end;\r\n\r\n FDispTime := Now;\r\n FVisible := true;\r\nend;\r\n\r\n{$HINTS ON}\r\n\r\nfunction TToastItem.Toast: TToast;\r\nbegin\r\n Result := TToast(Collection.Owner);\r\nend;\r\n\r\nfunction TToastItem.ToastID: string;\r\nbegin\r\n Result := TComponent(Collection.Owner).Name + IntToStr(FID);\r\nend;\r\n\r\nprocedure TToastItem.Update;\r\nbegin\r\n if Assigned(FElementHandle) then\r\n begin\r\n while FElementHandle.childElementCount > 0 do\r\n FElementHandle.removeChild(FElementHandle.firstChild);\r\n end\r\n else\r\n FElementHandle := CreateToast;\r\n\r\n UpdateToast(FElementHandle);\r\nend;\r\n\r\n\r\n{ TToast }\r\n\r\nconstructor TToast.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FItems := TToastCollection.Create(Self);\r\n FToastContainer := nil;\r\n FTimer := TTimer.Create(Self);\r\n FTimer.OnTimer := UpdateTimes;\r\n FAutoHideDelay := 5000;\r\n FLevel := llv5;\r\n FClosePtr := @HandleClose;\r\nend;\r\n\r\n\r\ndestructor TToast.Destroy;\r\nbegin\r\n FTimer.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TToast.DoHideToast(AIndex: integer);\r\nvar\r\n Idx,i: integer;\r\nbegin\r\n Idx := -1;\r\n\r\n for i := 0 to Items.Count - 1 do\r\n begin\r\n if Items[i].FID = AIndex then\r\n Idx := i;\r\n end;\r\n\r\n if Idx = -1 then\r\n Exit;\r\n\r\n if Assigned(OnHide) then\r\n OnHide(Self, Idx);\r\n\r\n FItems[Idx].Hide;\r\n\r\n FItems.Delete(Idx);\r\nend;\r\n\r\nprocedure TToast.EnsureToastArea;\r\nbegin\r\n if not Assigned(FToastContainer) then\r\n begin\r\n FToastContainer := TJSHTMLElement(document.createElement('DIV'));\r\n document.body.appendChild(FToastContainer);\r\n end;\r\nend;\r\n\r\nfunction TToast.HandleClose(Event: TEventListenerEvent): boolean;\r\nvar\r\n sid: string;\r\n id,e,l: integer;\r\nbegin\r\n sid := TJSHTMLElement(Event.target)['data-id'];\r\n\r\n l := Length(Name);\r\n Delete(sid,1,l);\r\n\r\n val(sid,id,e);\r\n if e = 0 then\r\n begin\r\n DoHideToast(id);\r\n end;\r\n Result := true;\r\nend;\r\n\r\nprocedure TToast.SetItems(const Value: TToastCollection);\r\nbegin\r\n FItems.Assign(Value);\r\nend;\r\n\r\nprocedure TToast.SetX(const Value: integer);\r\nbegin\r\n FX := Value;\r\nend;\r\n\r\nprocedure TToast.SetY(const Value: integer);\r\nbegin\r\n FY := Value;\r\nend;\r\n\r\nprocedure TToast.UpdatePosition;\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n EnsureToastArea;\r\n\r\n el := FToastContainer;\r\n\r\n case Position of\r\n tpTopLeft:\r\n begin\r\n el.style.setProperty('top','0');\r\n el.style.setProperty('left','0');\r\n el.style.removeProperty('right');\r\n el.style.removeProperty('bottom');\r\n end;\r\n tpTopRight:\r\n begin\r\n el.style.setProperty('top','0');\r\n el.style.removeProperty('left');\r\n el.style.setProperty('right','0');\r\n el.style.removeProperty('bottom');\r\n end;\r\n tpBottomLeft:\r\n begin\r\n el.style.removeProperty('top');\r\n el.style.setProperty('left','0');\r\n el.style.removeProperty('right');\r\n el.style.setProperty('bottom','0');\r\n end;\r\n tpBottomRight:\r\n begin\r\n el.style.removeProperty('top');\r\n el.style.removeProperty('left');\r\n el.style.setProperty('right','0');\r\n el.style.setProperty('bottom','0');\r\n end;\r\n tpAbsolute:\r\n begin\r\n el.style.setProperty('top',inttostr(FY)+'px');\r\n el.style.setProperty('left',inttostr(FX)+'px');\r\n el.style.removeProperty('right');\r\n el.style.removeProperty('bottom');\r\n end;\r\n end;\r\n\r\n el.style.setproperty('position','absolute');\r\n el.style.setproperty('z-index','2');\r\nend;\r\n\r\nprocedure TToast.UpdateTimes(Sender: TObject);\r\nvar\r\n i: integer;\r\n d: TDateTime;\r\n h,mi,se,se1100: word;\r\n s: string;\r\nbegin\r\n for i := 0 to FItems.Count - 1 do\r\n begin\r\n if (FItems[i].Visible) and (FItems[i].Time = ttDeltaShow) then\r\n begin\r\n d := Now - FItems[i].FDispTime;\r\n\r\n DecodeTime(d, h, mi, se, se1100);\r\n\r\n if h > 0 then\r\n s := inttostr(h) + 'h ' + inttostr(mi)+'m'\r\n else\r\n if mi > 0 then\r\n s := inttostr(h) + 'm ' + inttostr(se)+'s'\r\n else\r\n s := inttostr(se)+'s';\r\n\r\n FItems[i].FElementTime.innerHTML := s +' ago';\r\n end;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit PickForm;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, System.Types, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Vcl.StdCtrls, WEBLib.StdCtrls, WEBLib.Buttons,\r\n WEBLib.ExtCtrls, VCL.TMSFNCSwitch, Vcl.Controls, VCL.TMSFNCTypes,\r\n VCL.TMSFNCUtils, VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes,\r\n VCL.TMSFNCCustomControl, VCL.TMSFNCListBox, VCL.TMSFNCCheckedListBox,\r\n System.StrUtils, WebLib.JSON, XData.Web.JsonDataset, XData.Web.Client,\r\n Vcl.Grids, WEBLib.DBCtrls;\r\n\r\ntype\r\n TfrmPickForm = class(TForm)\r\n SubForm_DIV: TScrollBox;\r\n WebLabel2: TLabel;\r\n B1: TPanel;\r\n WebPanel70: TPanel;\r\n WebLabel36: TLabel;\r\n WebSpeedButton33: TSpeedButton;\r\n M1: TMemo;\r\n B3: TPanel;\r\n WebPanel72: TPanel;\r\n WebLabel37: TLabel;\r\n WebSpeedButton34: TSpeedButton;\r\n M3: TMemo;\r\n B5: TPanel;\r\n WebPanel74: TPanel;\r\n WebLabel38: TLabel;\r\n WebSpeedButton35: TSpeedButton;\r\n M5: TMemo;\r\n B2: TPanel;\r\n WebPanel76: TPanel;\r\n WebLabel39: TLabel;\r\n WebSpeedButton36: TSpeedButton;\r\n M2: TMemo;\r\n B4: TPanel;\r\n WebPanel78: TPanel;\r\n WebLabel40: TLabel;\r\n WebSpeedButton37: TSpeedButton;\r\n M4: TMemo;\r\n B6: TPanel;\r\n WebPanel80: TPanel;\r\n WebLabel41: TLabel;\r\n WebSpeedButton38: TSpeedButton;\r\n M6: TMemo;\r\n B7: TPanel;\r\n WebPanel82: TPanel;\r\n WebLabel42: TLabel;\r\n WebSpeedButton39: TSpeedButton;\r\n M7: TMemo;\r\n B8: TPanel;\r\n WebPanel86: TPanel;\r\n WebLabel43: TLabel;\r\n WebSpeedButton40: TSpeedButton;\r\n M8: TMemo;\r\n B9: TPanel;\r\n WebPanel88: TPanel;\r\n WebLabel44: TLabel;\r\n WebSpeedButton41: TSpeedButton;\r\n M9: TMemo;\r\n B10: TPanel;\r\n WebPanel91: TPanel;\r\n WebLabel45: TLabel;\r\n WebSpeedButton42: TSpeedButton;\r\n M10: TMemo;\r\n B19: TPanel;\r\n WebPanel93: TPanel;\r\n WebLabel46: TLabel;\r\n WebSpeedButton43: TSpeedButton;\r\n M19: TMemo;\r\n B20: TPanel;\r\n WebPanel95: TPanel;\r\n WebLabel47: TLabel;\r\n WebSpeedButton44: TSpeedButton;\r\n M20: TMemo;\r\n B15: TPanel;\r\n WebPanel97: TPanel;\r\n WebLabel48: TLabel;\r\n WebSpeedButton45: TSpeedButton;\r\n M15: TMemo;\r\n B14: TPanel;\r\n WebPanel99: TPanel;\r\n WebLabel49: TLabel;\r\n WebSpeedButton46: TSpeedButton;\r\n M14: TMemo;\r\n B13: TPanel;\r\n WebPanel101: TPanel;\r\n WebLabel50: TLabel;\r\n WebSpeedButton47: TSpeedButton;\r\n M13: TMemo;\r\n B12: TPanel;\r\n WebPanel103: TPanel;\r\n WebLabel51: TLabel;\r\n WebSpeedButton48: TSpeedButton;\r\n M12: TMemo;\r\n B11: TPanel;\r\n WebPanel105: TPanel;\r\n WebLabel52: TLabel;\r\n WebSpeedButton49: TSpeedButton;\r\n M11: TMemo;\r\n B16: TPanel;\r\n WebPanel107: TPanel;\r\n WebLabel53: TLabel;\r\n WebSpeedButton50: TSpeedButton;\r\n M16: TMemo;\r\n B17: TPanel;\r\n WebPanel109: TPanel;\r\n WebLabel54: TLabel;\r\n WebSpeedButton51: TSpeedButton;\r\n M17: TMemo;\r\n B18: TPanel;\r\n WebPanel111: TPanel;\r\n WebLabel55: TLabel;\r\n WebSpeedButton52: TSpeedButton;\r\n M18: TMemo;\r\n Memo: TMemo;\r\n pnlFormButtons: TPanel;\r\n btnClose: TBitBtn;\r\n btnSave: TBitBtn;\r\n btnUseDefaults: TBitBtn;\r\n btnSaveAsDefaults: TBitBtn;\r\n btnAdd: TBitBtn;\r\n btnClear: TBitBtn;\r\n PNL_PICKFORM_PNLGRID: TPanel;\r\n WebLabel15: TLabel;\r\n WebLabel1: TLabel;\r\n pnlFormCaption: TPanel;\r\n WebHTMLContainer2: THTMLContainer;\r\n WebHTMLContainer1: THTMLContainer;\r\n WebHTMLContainer3: THTMLContainer;\r\n WebHTMLContainer4: THTMLContainer;\r\n WebHTMLContainer5: THTMLContainer;\r\n WebHTMLContainer6: THTMLContainer;\r\n WebHTMLContainer7: THTMLContainer;\r\n WebHTMLContainer8: THTMLContainer;\r\n WebHTMLContainer9: THTMLContainer;\r\n WebHTMLContainer10: THTMLContainer;\r\n WebHTMLContainer11: THTMLContainer;\r\n WebHTMLContainer12: THTMLContainer;\r\n WebHTMLContainer13: THTMLContainer;\r\n WebHTMLContainer14: THTMLContainer;\r\n WebHTMLContainer15: THTMLContainer;\r\n WebHTMLContainer16: THTMLContainer;\r\n WebHTMLContainer17: THTMLContainer;\r\n WebHTMLContainer18: THTMLContainer;\r\n WebHTMLContainer19: THTMLContainer;\r\n WebHTMLContainer20: THTMLContainer;\r\n btnSentenceTemplate: TBitBtn;\r\n btnClearBlockCustomPositioning: TBitBtn;\r\n btnClearBlockCustomSizes: TBitBtn;\r\n btnFixBlockPositions: TBitBtn;\r\n procedure btnCloseClick(Sender: TObject);\r\n procedure WebFormShow(Sender: TObject);\r\n procedure btnClearClick(Sender: TObject);\r\n procedure btnAddClick(Sender: TObject);\r\n procedure btnSaveClick(Sender: TObject);\r\n\r\n procedure _Block_MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);\r\n procedure _Block_MouseLeave(Sender: TObject);\r\n procedure _BlockTitle_MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);\r\n procedure _BlockTitleEdit(Sender: TObject);\r\n procedure _BlockDragOverTitle(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);\r\n procedure _BlockDragDrop(Sender, Source: TObject; X, Y: Integer);\r\n procedure _BlockShowQPickList(Sender: Tobject);\r\n procedure _BlockCallPickForm(Sender: Tobject);\r\n procedure M1Change(Sender: TObject);\r\n procedure M1MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure WebFormClose(Sender: TObject; var Action: TCloseAction);\r\n procedure WebFormResize(Sender: TObject);\r\n procedure btnUseDefaultsClick(Sender: TObject);\r\n procedure btnSaveAsDefaultsClick(Sender: TObject);\r\n procedure RestoreTargetGrid;\r\n procedure PNL_PICKFORM_PNLGRIDMouseMove(Sender: TObject; Shift: TShiftState;\r\n X, Y: Integer);\r\n procedure MemoMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);\r\n procedure pnlFormButtonsMouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure btnUseDefaultsMouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure pnlFormCaptionMouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure WebFormCreate(Sender: TObject);\r\n procedure WebPanel70MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure WebHTMLContainer2Click(Sender: TObject);\r\n procedure btnSentenceTemplateClick(Sender: TObject);\r\n procedure btnClearBlockCustomPositioningClick(Sender: TObject);\r\n procedure btnClearBlockCustomSizesClick(Sender: TObject);\r\n procedure btnFixBlockPositionsClick(Sender: TObject);\r\n\r\n private\r\n { Private declarations }\r\n PrevTargetMemo_p : TMemo;\r\n PrevTargetMemoname_p : string;\r\n PrevGridParent_p : TControl;\r\n PrevBlock_p : TPanel;\r\n PrevBlockUniqueID : string;\r\n FormIsActive_p : Boolean;\r\n Mouse_X : integer;\r\n Mouse_Y : integer;\r\n public\r\n { Public declarations }\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmPickForm: TfrmPickForm;\r\n\r\nimplementation\r\n\r\n{$R *.dfm}\r\n\r\nuses main, Common, DataModule;\r\n\r\nprocedure TfrmPickForm.btnAddClick(Sender: TObject);\r\nvar i, j, k, n: integer; c, c2, c3: Tcontrol; formdiv_p: TScrollBox;\r\n c_p, s_p, t_p, sectionname_p, sectiondata_p, C_colmn_p: string; container_p: TScrollBox;\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p: string;\r\n begin\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n // showmessage(Response_p);\r\n if Response_p <> ''\r\n then begin\r\n if memo.Text = ''\r\n then memo.Text := Response_p\r\n else memo.Text := memo.Text + ' ' +Response_p;\r\n //replace links to from data blocks\r\n container_p := (getpreviousform.FindComponent('Subform_DIV') as TScrollBox);\r\n if (pos('<', memo.Text) > 0) and (pos('>', memo.Text) > 0) and (container_p <> nil)\r\n then memo.Text := ReplaceddataBlockLinks(memo.Text, container_p);\r\n end;\r\n end;\r\n\r\nbegin\r\n{\r\nt_p - template\r\nc_p - block titles (separated by ~ )\r\ns_p - block data (separated by ~ )\r\n}\r\nRestoreTargetGrid;\r\n//showmessage('1');\r\nt_p := BlockGetSentenceTMP(PrevBlockUniqueID); // sentence template\r\nformdiv_p := subform_div;\r\ns_p := ''; c_p := '';\r\n\r\nif assigned(egv_parent_dbgrid) then Block_GridNewRecord(egv_parent_dbgrid);\r\n\r\nfor n := 0 to 199 do\r\n\r\nfor i:=0 to formdiv_p.ControlCount - 1\r\ndo begin\r\n c := formdiv_p.controls[i];\r\n if (c is TPanel) // and c.Visible\r\n then begin\r\n if c.childorder <> n then continue;\r\n GetBlockUniqueID(c as TPanel);\r\n SectionName_p := '';\r\n SectionData_p := '';\r\n if BlockgetTitle(c as TPanel) <> ''\r\n\r\n then if c_p = ''\r\n then c_p := BlockgetTitle(c as TPanel)\r\n else c_p := c_p + '~' + BlockgetTitle(c as TPanel)\r\n else if c_p = ''\r\n then c_p := (c as TPanel).name\r\n else c_p := c_p + '~' + (c as TPanel).name;\r\n\r\n //showmessage('c_p: ' + c_p);\r\n for j := 0 to (c as TPanel).controlcount - 1\r\n do begin\r\n c2 := (c as TPanel).controls[j];\r\n if not c2.Visible then continue;\r\n //showmessage(c2.Name);\r\n if (c2 is TPanel)\r\n then begin\r\n for k := 0 to (c2 as TPanel).controlcount - 1\r\n do begin\r\n c3 := (c2 as TPanel).controls[k];\r\n if (c3 is TLabel)\r\n then SectionName_p := (c3 as TLabel).caption;\r\n end;\r\n end;\r\n if (c2 is Tmemo)\r\n then begin\r\n sectiondata_p := (c2 as Tmemo).text;\r\n (c2 as Tmemo).text := '';\r\n end;\r\n end;\r\n\r\n if t_p = '' // NO sentence template\r\n then begin\r\n // '~' says to use only the part of the data before it.\r\n if pos('~', sectiondata_p) > 0\r\n then sectiondata_p := copy(sectiondata_p,1,pos('~', sectiondata_p) - 1);\r\n\r\n\r\n if sectiondata_p <> ''\r\n then begin\r\n if assigned(egv_parent_dbgrid)\r\n then begin\r\n C_colmn_p := splitstring(dm.egv_localstorage.values['DBF_' + EGV_BLOCKUNIQUEID],'|')[1];\r\n egv_parent_dbgrid.DataSource.DataSet.Edit;\r\n if egv_parent_dbgrid.DataSource.DataSet.FieldByName(C_colmn_p).asstring = ''\r\n then egv_parent_dbgrid.DataSource.DataSet.FieldByName(C_colmn_p).Value := sectiondata_p\r\n else egv_parent_dbgrid.DataSource.DataSet.FieldByName(C_colmn_p).asstring :=\r\n trim(egv_parent_dbgrid.DataSource.DataSet.FieldByName(C_colmn_p).asstring) + ', ' + sectiondata_p;\r\n egv_parent_dbgrid.DataSource.DataSet.post;\r\n // update the grid fields\r\n end\r\n else begin\r\n if s_p = ''\r\n then s_p := {sectionname_p + ': ' +} sectiondata_p\r\n else s_p := s_p {', ' } {+ '-' + sectionname_p + ': '} + sectiondata_p;\r\n s_p := trim(s_p);\r\n if s_p[length(s_p) -1] <> '.' then s_p := s_p + '. ';\r\n end;\r\n end;\r\n end\r\n else begin //sentece template\r\n if not c.Visible then sectiondata_p := '';\r\n if s_p = ''\r\n then s_p := trim(sectiondata_p)\r\n else s_p := s_p + '~' + trim(sectiondata_p);\r\n if s_p = '' then s_p := '@';\r\n end;\r\n // showmessage(c2.ClassName);\r\n end;\r\n\r\n end;\r\ns_p := stringreplace(s_p,'@','',[rfReplaceAll]);\r\n//showmessage(c_p + '************' + s_p);\r\nif t_p <> ''\r\nthen if dm.XDataWebConnection2.Connected then dm.XDataWebClient2.RawInvoke('IReportService.GetColumnData',[PrepareScript(t_p, c_p, s_p) , egv_facilityid, '0'], @OnResult)\r\nelse begin\r\n if s_p <> ''\r\n then begin\r\n if memo.Text = ''\r\n then memo.Text := s_p\r\n else memo.Text := memo.Text + chr(13) + s_p;\r\n //replace links to from data blocks\r\n container_p := (getpreviousform.FindComponent('Subform_DIV') as TScrollBox);\r\n if (pos('<', memo.Text) > 0) and (pos('>', memo.Text) > 0) and (container_p <> nil)\r\n then memo.Text := ReplaceddataBlockLinks(memo.Text, container_p);\r\n end;\r\n end;\r\n\r\nDBF_GetPostBlocks(self.Subform_div, 0); //get block data\r\n\r\n//showmessage('3');\r\n//showmessage(inttostr(length(dm.EGV_FORMDEFAULTS)));\r\n// save in DB\r\n{if dm.xdsPKL_FormDefaults.isempty\r\nthen dm.xdsPKL_FormDefaults.append\r\nelse dm.xdsPKL_FormDefaults.edit;\r\n// showmessage('SAVING: ' + dm.EGV_FORMDEFAULTS);\r\ndm.xdsPKL_FormDefaults.fieldbyname('IDENT_VALUE').asstring := dm.EGV_FORMDEFAULTS + '#';\r\ndm.xdsPKL_FormDefaults.post;\r\ndm.xdsPKL_FormDefaults.applyupdates; }\r\nend;\r\n\r\nprocedure TfrmPickForm.btnCloseClick(Sender: TObject);\r\nbegin\r\nRestoreTargetGrid;\r\nif frmmain.clQuickPicklist.visible then frmmain.btnCloseQuickPickListClick(nil);\r\nRefreshGridDatasources(getpreviousform);\r\nself.Close;\r\nend;\r\n\r\nprocedure TfrmPickForm.btnFixBlockPositionsClick(Sender: TObject);\r\nbegin\r\nFixBlockPositions;\r\nend;\r\n\r\nprocedure TfrmPickForm.btnSaveAsDefaultsClick(Sender: TObject);\r\nbegin\r\ntry\r\n (Sender as TBitbtn).enabled := false;\r\n\r\nCollectFormDefaults(GetCurrentFormName());\r\nfinally\r\n (Sender as TBitbtn).enabled := true;\r\nend;\r\nend;\r\n\r\nprocedure TfrmPickForm.btnSaveClick(Sender: TObject);\r\nbegin\r\nRestoreTargetGrid;\r\n\r\nif getpreviousform <> nil\r\nthen begin\r\n if dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS_' + uppercase(getpreviousform.name)]= ''\r\n then EGV_FORMCOLUMNS := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS'])\r\n else EGV_FORMCOLUMNS := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS_' + uppercase(getpreviousform.Name)]);\r\n end;\r\n\r\nif assigned(PrevTargetMemo_p)\r\nthen begin //showmessage(PrevTargetMemo_p.name);\r\n egv_pkltargetmemo := PrevTargetMemo_p;\r\n egv_pkltargetmemoname := PrevTargetMemoname_p;\r\n {if memo.Text = '' then }\r\n //btnAdd.click;\r\n if frmmain.clQuickPicklist.visible then frmmain.btnCloseQuickPickListClick(nil);\r\n if trim(memo.Text) <> trim(egv_pkltargetmemo.text)\r\n then begin\r\n egv_pkltargetmemo.text := trim(memo.Text);\r\n egv_pkltargetmemo.Tag := 1; // updated\r\n BlockApplyDependencies((EGV_PKLTARGETMEMO.Parent as TPanel), EGV_PKLTARGETMEMO.text);\r\n StretchMemo(egv_pkltargetmemo);\r\n // showmessage(egv_pkltargetmemo.text);\r\n end;\r\n end;\r\nbtnCloseclick(nil);\r\nend;\r\n\r\nprocedure TfrmPickForm.btnUseDefaultsClick(Sender: TObject);\r\nbegin\r\ntry\r\n(Sender as TBitbtn).enabled := false;\r\n GetPostFormDefaultsdata(GetCurrentFormname, 0); // get and apply default data\r\n StretchAllMemos(GetCurrentFormDIV);\r\nfinally\r\n (Sender as TBitbtn).enabled := true;\r\nend;\r\nend;\r\n\r\nprocedure TfrmPickForm.btnUseDefaultsMouseMove(Sender: TObject;\r\n Shift: TShiftState; X, Y: Integer);\r\nbegin\r\n if frmmain.clQuickPicklist.Visible then frmmain.btnCloseQuickPicklistClick(nil);\r\nend;\r\n\r\nprocedure TfrmPickForm.btnClearClick(Sender: TObject);\r\nbegin\r\n memo.Clear;\r\nend;\r\n\r\nprocedure TfrmPickForm.btnClearBlockCustomPositioningClick(Sender: TObject);\r\nbegin\r\nClearBlockCustomPositioning;\r\nend;\r\n\r\nprocedure TfrmPickForm.btnSentenceTemplateClick(Sender: TObject);\r\nbegin\r\nEGV_CURRENTBLOCK := PrevBlock_p;\r\nEGV_BLOCKUNIQUEID := PrevBlockUniqueID;\r\nBlockShowDBFieldSettings;\r\nend;\r\n\r\nprocedure TfrmPickForm.btnClearBlockCustomSizesClick(Sender: TObject);\r\nbegin\r\nClearBlockCustomSizes;\r\nend;\r\n\r\nprocedure TfrmPickForm.WebFormClose(Sender: TObject; var Action: TCloseAction);\r\nVAR i: integer; prevform_p: TForm; grd: TDBGrid;\r\nbegin\r\nprevform_p := getpreviousform;\r\nif assigned(prevform_p) and assigned(prevform_p.findcomponent('GRDDYNAMICGRID'))\r\nthen grd := ( prevform_p.findcomponent('GRDDYNAMICGRID') as TDBGrid);\r\n\r\n//if frmmain.btnSwitch_Design.state = ssON\r\n//then begin\r\n frmmain.btnSwitch_Design.state := ssOff;\r\n// if dm.EGV_LOCALSTORAGE.Values['EGV_AUTOSAVEDESIGNDATA'] = '1' then LS_Save;\r\n// end;\r\n\r\nif prevform_p <> nil\r\nthen begin\r\n//showmessage('1');\r\n if dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS_' + uppercase(getpreviousform.name)]= ''\r\n then EGV_FORMCOLUMNS := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS'])\r\n else EGV_FORMCOLUMNS := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS_' + uppercase(getpreviousform.Name)]);\r\n\r\n if dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH_' + uppercase(getpreviousform.name)]= ''\r\n then EGV_BLOCKDEFAULTWIDTH := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH'])\r\n else EGV_BLOCKDEFAULTWIDTH := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH_' + uppercase(getpreviousform.Name)]);\r\n\r\n if dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNSAUTO_' + uppercase(getpreviousform.name)]= ''\r\n then EGV_FORMCOLUMNSAUTO := (dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNSAUTO'] = '1')\r\n else EGV_FORMCOLUMNSAUTO := (dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNSAUTO_' + uppercase(getpreviousform.name)] = '1');\r\n\r\n if (prevform_p <> nil) and (prevform_p.findcomponent('pnlBottom') <> nil)\r\n then begin\r\n (getpreviousform.findcomponent('pnlBottom') as Tpanel).Visible := false;\r\n (getpreviousform.findcomponent('pnlBottom') as Tpanel).Visible := true;\r\n end;\r\n end;\r\n// showmessage(inttostr(EGV_FORMCOLUMNS));\r\n//EGV_CURRENTFORM_DIV := getcurrentformdiv;\r\nif grd <> nil\r\nthen SetKeyVariablesFromDataSet(grd.datasource.dataset, false);\r\nDBF_GetPostBlocks(frmmain.sbLogoBox, 0, frmmain);\r\nDBF_GetPostBlocks(frmmain.sbAlertBoxes, 0, frmmain);\r\nDBF_GetPostBlocks(frmmain.sbInfoBoxes, 0, frmmain);\r\n\r\n frmmain.btnSwitch_Design.state := ssOff;\r\n HideFormContainer(true);\r\n //egv_subform2 := nil;\r\n\r\n if assigned(prevform_p)\r\nthen begin\r\n prevform_p.Realign;\r\n if prevform_p.FindComponent('pnlFormButtons') <> nil then ResizeButtons((prevform_p.FindComponent('pnlFormButtons')as Tpanel));\r\n if prevform_p.FindComponent('pnlReportButtons') <> nil then ResizeButtons((prevform_p.FindComponent('pnlReportButtons')as Tpanel));\r\n\r\n if prevform_p.FindComponent('SUBFORM_DIV') <> nil\r\n then begin\r\n ResizeFormBlocks((prevform_p.FindComponent('SUBFORM_DIV') as TScrollBox), egv_formcolumns);\r\n //OrganizeBlocks((prevform_p.FindComponent('SUBFORM_DIV') as TWebScrollBox));\r\n StretchAllMemos((prevform_p.FindComponent('SUBFORM_DIV') as TScrollBox));\r\n //Form_AdjustGrids(prevform_p);\r\n end;\r\n\r\n if grd <> nil\r\n then begin\r\n ResizeFormBlocks((prevform_p.FindComponent('sbSearch')as TScrollBox), 20, false);\r\n Grid_AdjustColumns(grd,true);\r\n Grid_SetTitleHeight(grd);\r\n end\r\n end;\r\n\r\n egv_pkltargetmemo := nil;\r\n egv_pkltargetmemoname := '';\r\n egv_pkltargetmemoblock := nil;\r\n\r\n if assigned(EGV_PARENT_DBGRID)\r\n then begin\r\n //showmessage(PrevGridParent_p.Name);\r\n EGV_PARENT_DBGRID.Parent := PrevGridParent_p;\r\n EGV_PARENT_DBGRID.Align := alNone;\r\n EGV_PARENT_DBGRID.Align := alClient;\r\n Grid_AdjustColumns(EGV_PARENT_DBGRID,true);\r\n Grid_SetTitleHeight(EGV_PARENT_DBGRID);\r\n end;\r\n frmmain.lblLocation.caption := stringreplace(frmmain.lblLocation.caption,' > ' + pnlFormCaption.Caption + ' ' ,'',[]);\r\nend;\r\n\r\nprocedure TfrmPickForm.WebFormCreate(Sender: TObject);\r\nbegin\r\nFormIsActive_p := false;\r\nend;\r\n\r\nprocedure TfrmPickForm.WebFormResize(Sender: TObject);\r\nbegin\r\nif not FormIsActive_p then exit;\r\n\r\nResizeFormBlocks(SubForm_DIV, egv_formcolumns);\r\nOrganizeBlocks(SubForm_DIV);\r\nStretchAllMemos(SubForm_DIV);\r\nif EGV_PARENT_DBGRID <> nil\r\nthen begin\r\n Grid_AdjustColumns(EGV_PARENT_DBGRID,true);\r\n Grid_SetTitleHeight(EGV_PARENT_DBGRID);\r\n end;\r\nResizeButtons(pnlFormButtons);\r\nend;\r\n\r\nprocedure TfrmPickForm.WebFormShow(Sender: TObject);\r\nbegin\r\n\r\nFormIsActive_p := true;\r\nPrevBlockUniqueID := EGV_BLOCKUNIQUEID;\r\nPrevBlock_p := EGV_CURRENTBLOCK;\r\nEGV_CURRENTBLOCK := nil;\r\n\r\n//if frmmain.btnSwitch_Design.state = ssON\r\n//then begin\r\n\r\n frmmain.btnSwitch_Design.state := ssOff;\r\n\r\n// if dm.EGV_LOCALSTORAGE.Values['EGV_AUTOSAVEDESIGNDATA'] = '1' then LS_Save;\r\n// end;\r\n//showmessage(egv_pkltargetmemo.name);\r\n//if egv_pkltargetmemo = nil then showmessage('1');\r\nif egv_pkltargetmemo <> nil\r\nthen begin\r\n GetCurrentForm.Name := FindParentForm(egv_pkltargetmemo).name + '_' + GetCurrentForm.Name + '_' + egv_pkltargetmemo.name;\r\n PrevTargetMemo_p := egv_pkltargetmemo;\r\n PrevTargetMemoname_p := egv_pkltargetmemoname;\r\n memo.Text := PrevTargetMemo_p.Text;\r\n PNL_PICKFORM_PNLGRID.Visible := false;\r\n end;\r\n\r\nif EGV_PARENT_DBGRID <> nil\r\nthen begin\r\n GetCurrentForm.Name := FindParentForm(EGV_PARENT_DBGRID).name + '_' + GetCurrentForm.Name + '_' + EGV_PARENT_DBGRID.name;\r\n //showmessage(EGV_PARENT_DBGRID.name + '_SELECT_' + getcurrentformname);\r\n\r\n // To access the grid info in when editing the grid.\r\n dm.egv_localstorage.values[EGV_PARENT_DBGRID.name + '_SELECT_' + getcurrentformname] := dm.egv_localstorage.values[EGV_PARENT_DBGRID.name + '_SELECT_' + uppercase(GetPreviousForm.name)];\r\n dm.egv_localstorage.values[EGV_PARENT_DBGRID.name + '_COLUMNS_' + getcurrentformname] := dm.egv_localstorage.values[EGV_PARENT_DBGRID.name + '_COLUMNS_' + uppercase(GetPreviousForm.name)];\r\n\r\n\r\n // WebLabel1.Visible := false;\r\n memo.Visible := false;\r\n btnClear.Visible := false;\r\n PNL_PICKFORM_PNLGRID.Visible := true;\r\n PrevGridParent_p := EGV_PARENT_DBGRID.Parent;\r\n EGV_PARENT_DBGRID.Parent := PNL_PICKFORM_PNLGRID;\r\n EGV_PARENT_DBGRID.Align := alNone;\r\n EGV_PARENT_DBGRID.Align := alClient;\r\n\r\n Grid_AdjustColumns(EGV_PARENT_DBGRID,true);\r\n Grid_SetTitleHeight(EGV_PARENT_DBGRID);\r\n end;\r\n\r\n//showmessage(GetCurrentForm.Name);\r\n\r\n// designer options. if no form-specific then use global\r\nif dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS_' + getcurrentformname]= ''\r\nthen EGV_FORMCOLUMNS := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS'])\r\nelse EGV_FORMCOLUMNS := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS_' + getcurrentformname]);\r\n\r\nif dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH_' + getcurrentformname]= ''\r\nthen EGV_BLOCKDEFAULTWIDTH := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH'])\r\nelse EGV_BLOCKDEFAULTWIDTH := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH_' + getcurrentformname]);\r\n\r\nif dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNSAUTO_' + getcurrentformname]= ''\r\nthen EGV_FORMCOLUMNSAUTO := (dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNSAUTO'] = '1')\r\nelse EGV_FORMCOLUMNSAUTO := (dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNSAUTO_' + getcurrentformname] = '1');\r\n\r\n//EGV_FORMCOLUMNSAUTO := (dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNSAUTO_' + getcurrentformname] = '1');\r\n\r\nEGV_CURRENTFORM_DIV := (GetCurrentForm.findcomponent('SubForm_DIV') as TScrollBox);\r\n\r\nEGV_CURRENTFORM_DIV.Tag := 0;\r\nloadformdesigninfo(GetCurrentForm.Name);\r\n\r\nfrmmain.tmGenTimer.tag := 4;\r\nfrmmain.tmGenTimer.Enabled := true;\r\nDBF_GetPostBlocks(EGV_CURRENTFORM_DIV, 0); //get block data\r\n\r\n//GetPostFormDefaultsdata(EGV_SUBFORM2.name, 0); // get default data\r\nbtnSaveAsDefaults.Visible := (frmmain.btnSwitch_Design.State = SSON);\r\npnlFormCaption.caption := EGV_CHILD_FORM_CAPTION;\r\n\r\n//self.name := 'frmPickList_' + egv_pkltargetmemo.name;\r\nfrmmain.lblLocation.caption := frmmain.lblLocation.caption + ' > ' + pnlFormCaption.Caption + ' ';\r\n\r\nResizeButtons(pnlFormButtons);\r\nend;\r\n\r\nprocedure TfrmPickForm.WebHTMLContainer2Click(Sender: TObject);\r\nbegin\r\nblockgetmemo(EGV_CURRENTBLOCK).text := GetLocationByXY(Mouse_x, Mouse_y);\r\nBlockDataDistribute(EGV_CURRENTBLOCK);\r\nend;\r\n\r\nprocedure TfrmPickForm.WebPanel70MouseMove(Sender: TObject; Shift: TShiftState;\r\n X, Y: Integer);\r\nbegin\r\n\r\nif (sender is TPanel) and (EGV_CURRENTBLOCK <> nil)\r\nthen begin\r\n (sender as TPanel).hint := EGV_CURRENTBLOCK.Name;\r\n (sender as TPanel).showhint := (frmmain.btnSwitch_Design.State = ssON);\r\n end;\r\n\r\nBlock_MouseMove(((Sender as TControl).parent as TPanel),[],0,0);\r\nend;\r\n\r\nprocedure TfrmPickForm.M1Change(Sender: TObject);\r\nbegin\r\nBlockApplyDependencies(((Sender as TMemo).Parent as TPanel), (Sender as TMemo).text);\r\nStretchMemo(Sender as TMemo);\r\n(Sender as TMemo).Tag := 1; // updated\r\nend;\r\n\r\nprocedure TfrmPickForm.M1MouseMove(Sender: TObject; Shift: TShiftState;\r\n X, Y: Integer);\r\nvar P: TPoint; c: string;\r\nbegin\r\n\r\nEGV_CURRENTBLOCK := ((Sender as TControl).parent as TPanel);\r\ngetblockuniqueid(EGV_CURRENTBLOCK);\r\n\r\nif (sender is TMemo) and (EGV_CURRENTBLOCK <> nil)\r\nthen begin\r\n (sender as TMemo).hint := EGV_CURRENTBLOCK.Name;\r\n (sender as TMemo).showhint := (frmmain.btnSwitch_Design.State = ssON);\r\n end;\r\n\r\nMouse_X := X;\r\nMouse_Y := Y;\r\n\r\n// showmessage(EGV_BLOCKUNIQUEID);\r\n\r\nif (sender is THTMLContainer) and ((sender as THTMLContainer).tag = 0)\r\nthen begin\r\n (sender as THTMLContainer).tag := 1;\r\n GetBlockUniqueID(((sender as THTMLContainer).Parent as TPanel));\r\n EGV_SECTIONNAME := dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SECTION'];\r\n if dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SOURCE'] = ''\r\n then dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SOURCE'] := '0';\r\n dm.xdsQPKL_DynamicData.Close;\r\n //showmessage('1');\r\n QPKL_LoadFromDataset(dm.xdsQPKL_DynamicData, 'Original.ITEM');\r\n end;\r\n\r\nfrmmain.rgBlockRadioGroup.tag := 0;\r\n\r\nif (sender is THTMLContainer)\r\nthen begin\r\n // LGV_IMAGE_X_Y := inttostr(Y) + ' - ' + inttostr(X);\r\n // memo.Text := LGV_IMAGE_X_Y;\r\n\r\n P.X := X;\r\n P.Y := Y + 20;\r\n c := GetLocationByXY(X, Y);\r\n if (P.X + length(c)) > ((sender as THTMLContainer).width - P.X - 30)\r\n then P.X := P.X - 30;\r\n\r\n P := (sender as THTMLContainer).ClientToScreen(P);\r\n\r\n frmmain.lbImage_Y_X.Top := P.Y;\r\n frmmain.lbImage_Y_X.left := P.X;\r\n\r\n frmmain.lbImage_Y_X.Parent := frmmain; //(sender as TWebHTMLContainer);\r\n frmmain.lbImage_Y_X.Visible := false;\r\n frmmain.lbImage_Y_X.Caption := c;\r\n frmmain.lbImage_Y_X.Visible := true;\r\n\r\n end;\r\n\r\n\r\n if (sender is TMemo)\r\n then begin\r\n if frmmain.clQuickPicklist.Visible and ((sender as TMemo).Name <> frmmain.clQuickPicklist.Hint)\r\n then frmmain.btnCloseQuickPicklistClick(nil);\r\n end\r\n else if frmmain.clQuickPicklist.Visible then frmmain.btnCloseQuickPicklistClick(nil);\r\n\r\nBlock_MouseMove(((Sender as TControl).parent as TPanel),[],0,0);\r\n\r\n//showmessage(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE']);\r\n//Show date/time picker if data type is date/time\r\nif uppercase(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE']) = '0'\r\nthen BlockInsertFromDatePicker(nil)\r\nelse if uppercase(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE']) = '1'\r\n then BlockInsertFromTimePicker(nil)\r\n else if uppercase(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE']) = '2'\r\n then begin\r\n //showmessage('radio group');\r\n // frmmain.rgBlockRadioGroup.tag := 1; // activated. used instead of 'visible' because if we make it visible here\r\n // it shows the old data from previous block bfore showing the rigt one;\r\n // this tag will be used as an indicator that radiogroup must be made visible after filled with data\r\n // in QPKL_LoadFromDataset.\r\n BlockInsertRadioGroup(Sender);\r\n end\r\n else if uppercase(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE']) = '3'\r\n then begin\r\n // showmessage('spin edit');\r\n BlockInsertSpinEdit(Sender);\r\n end;\r\n\r\nBlockShowEditMask(Sender);\r\nend;\r\n\r\nprocedure TfrmPickForm.MemoMouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\nbegin\r\n if frmmain.clQuickPicklist.Visible then frmmain.btnCloseQuickPicklistClick(nil);\r\nend;\r\n\r\nprocedure TfrmPickForm.pnlFormButtonsMouseMove(Sender: TObject;\r\n Shift: TShiftState; X, Y: Integer);\r\nbegin\r\n if frmmain.clQuickPicklist.Visible then frmmain.btnCloseQuickPicklistClick(nil);\r\nend;\r\n\r\nprocedure TfrmPickForm.pnlFormCaptionMouseMove(Sender: TObject;\r\n Shift: TShiftState; X, Y: Integer);\r\nbegin\r\nif frmmain.clQuickPicklist.visible then frmmain.btnCloseQuickPickListClick(nil);\r\nend;\r\n\r\nprocedure TfrmPickForm.PNL_PICKFORM_PNLGRIDMouseMove(Sender: TObject;\r\n Shift: TShiftState; X, Y: Integer);\r\nbegin\r\n if frmmain.clQuickPicklist.Visible then frmmain.btnCloseQuickPicklistClick(nil);\r\nend;\r\n\r\nprocedure TfrmPickForm._Block_MouseLeave(Sender: TObject);\r\nbegin\r\n//showmessage( EGV_CURRENTBLOCK.name);\r\n//if EGV_CURRENTBLOCK <> nil\r\n//then\r\nBlock_MouseLeave(Sender);\r\nend;\r\n\r\n\r\nprocedure TfrmPickForm._Block_MouseMove(Sender: TObject; Shift: TShiftState;\r\n X, Y: Integer);\r\nbegin\r\nBlock_MouseMove(Sender, Shift, X, Y);\r\nend;\r\n\r\nprocedure TfrmPickForm._BlockTitle_MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);\r\nbegin\r\n\r\nif (sender is TLabel) and (EGV_CURRENTBLOCK <> nil)\r\nthen begin\r\n (sender as TLabel).hint := EGV_CURRENTBLOCK.Name;\r\n (sender as TLabel).showhint := (frmmain.btnSwitch_Design.State = ssON);\r\n end;\r\n\r\nBlock_MouseMove((((Sender as TControl).parent as TPanel).Parent as TPanel),[],0,0);\r\nend;\r\n\r\nprocedure TfrmPickForm._BlockTitleEdit(Sender: TObject);\r\nbegin\r\nBlockTitleEdit(Sender);\r\nend;\r\n\r\nprocedure TfrmPickForm._BlockDragOverTitle(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);\r\nbegin\r\nBlockDragOverTitle(Sender, Source, X, Y, State, Accept);\r\nend;\r\n\r\nprocedure TfrmPickForm._BlockDragDrop(Sender, Source: TObject; X, Y: Integer);\r\nbegin\r\nBlockDragDrop(Sender, Source, X, Y);\r\nend;\r\n\r\nprocedure TfrmPickForm._BlockShowQPickList(Sender: Tobject);\r\nbegin\r\nBlockShowQPickList(Sender);\r\nend;\r\n\r\nprocedure TfrmPickForm._BlockCallPickForm(Sender: Tobject);\r\nbegin\r\nBlockCallPickForm(Sender);\r\nend;\r\n\r\nprocedure TfrmPickForm.RestoreTargetGrid;\r\nvar i: integer; SQL_p: string;\r\nbegin\r\nfor i := 0 to PNL_PICKFORM_PNLGRID.ControlCount - 1\r\ndo begin\r\n if PNL_PICKFORM_PNLGRID.Controls[i] is TDBGrid\r\n then begin\r\n EGV_PARENT_DBGRID := (PNL_PICKFORM_PNLGRID.Controls[i] as TDBGrid);\r\n //showmessage(EGV_PARENT_DBGRID.Name);\r\n frmmain.memGridColumns.text := dm.egv_localstorage.values[EGV_PARENT_DBGRID.name + '_COLUMNS_' + getcurrentformname];\r\n SQL_p := dm.egv_localstorage.values[EGV_PARENT_DBGRID.name + '_SELECT_' + getcurrentformname];\r\n EGV_PKLTARGETGRIDFIELDS := Grid_GetTableAndColumns(3, SQL_p, frmmain.memGridColumns);\r\n end;\r\n end;\r\nend;\r\n\r\n\r\nprocedure TfrmPickForm.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n WebLabel15 := TLabel.Create(Self);\r\n WebLabel1 := TLabel.Create(Self);\r\n SubForm_DIV := TScrollBox.Create(Self);\r\n WebLabel2 := TLabel.Create(Self);\r\n B1 := TPanel.Create(Self);\r\n WebPanel70 := TPanel.Create(Self);\r\n WebLabel36 := TLabel.Create(Self);\r\n WebSpeedButton33 := TSpeedButton.Create(Self);\r\n M1 := TMemo.Create(Self);\r\n WebHTMLContainer2 := THTMLContainer.Create(Self);\r\n B3 := TPanel.Create(Self);\r\n WebPanel72 := TPanel.Create(Self);\r\n WebLabel37 := TLabel.Create(Self);\r\n WebSpeedButton34 := TSpeedButton.Create(Self);\r\n M3 := TMemo.Create(Self);\r\n WebHTMLContainer3 := THTMLContainer.Create(Self);\r\n B5 := TPanel.Create(Self);\r\n WebPanel74 := TPanel.Create(Self);\r\n WebLabel38 := TLabel.Create(Self);\r\n WebSpeedButton35 := TSpeedButton.Create(Self);\r\n M5 := TMemo.Create(Self);\r\n WebHTMLContainer5 := THTMLContainer.Create(Self);\r\n B2 := TPanel.Create(Self);\r\n WebPanel76 := TPanel.Create(Self);\r\n WebLabel39 := TLabel.Create(Self);\r\n WebSpeedButton36 := TSpeedButton.Create(Self);\r\n M2 := TMemo.Create(Self);\r\n WebHTMLContainer1 := THTMLContainer.Create(Self);\r\n B4 := TPanel.Create(Self);\r\n WebPanel78 := TPanel.Create(Self);\r\n WebLabel40 := TLabel.Create(Self);\r\n WebSpeedButton37 := TSpeedButton.Create(Self);\r\n M4 := TMemo.Create(Self);\r\n WebHTMLContainer4 := THTMLContainer.Create(Self);\r\n B6 := TPanel.Create(Self);\r\n WebPanel80 := TPanel.Create(Self);\r\n WebLabel41 := TLabel.Create(Self);\r\n WebSpeedButton38 := TSpeedButton.Create(Self);\r\n M6 := TMemo.Create(Self);\r\n WebHTMLContainer6 := THTMLContainer.Create(Self);\r\n B7 := TPanel.Create(Self);\r\n WebPanel82 := TPanel.Create(Self);\r\n WebLabel42 := TLabel.Create(Self);\r\n WebSpeedButton39 := TSpeedButton.Create(Self);\r\n M7 := TMemo.Create(Self);\r\n WebHTMLContainer7 := THTMLContainer.Create(Self);\r\n B8 := TPanel.Create(Self);\r\n WebPanel86 := TPanel.Create(Self);\r\n WebLabel43 := TLabel.Create(Self);\r\n WebSpeedButton40 := TSpeedButton.Create(Self);\r\n M8 := TMemo.Create(Self);\r\n WebHTMLContainer8 := THTMLContainer.Create(Self);\r\n B9 := TPanel.Create(Self);\r\n WebPanel88 := TPanel.Create(Self);\r\n WebLabel44 := TLabel.Create(Self);\r\n WebSpeedButton41 := TSpeedButton.Create(Self);\r\n M9 := TMemo.Create(Self);\r\n WebHTMLContainer9 := THTMLContainer.Create(Self);\r\n B10 := TPanel.Create(Self);\r\n WebPanel91 := TPanel.Create(Self);\r\n WebLabel45 := TLabel.Create(Self);\r\n WebSpeedButton42 := TSpeedButton.Create(Self);\r\n M10 := TMemo.Create(Self);\r\n WebHTMLContainer10 := THTMLContainer.Create(Self);\r\n B19 := TPanel.Create(Self);\r\n WebPanel93 := TPanel.Create(Self);\r\n WebLabel46 := TLabel.Create(Self);\r\n WebSpeedButton43 := TSpeedButton.Create(Self);\r\n M19 := TMemo.Create(Self);\r\n WebHTMLContainer19 := THTMLContainer.Create(Self);\r\n B20 := TPanel.Create(Self);\r\n WebPanel95 := TPanel.Create(Self);\r\n WebLabel47 := TLabel.Create(Self);\r\n WebSpeedButton44 := TSpeedButton.Create(Self);\r\n M20 := TMemo.Create(Self);\r\n WebHTMLContainer20 := THTMLContainer.Create(Self);\r\n B15 := TPanel.Create(Self);\r\n WebPanel97 := TPanel.Create(Self);\r\n WebLabel48 := TLabel.Create(Self);\r\n WebSpeedButton45 := TSpeedButton.Create(Self);\r\n M15 := TMemo.Create(Self);\r\n WebHTMLContainer15 := THTMLContainer.Create(Self);\r\n B14 := TPanel.Create(Self);\r\n WebPanel99 := TPanel.Create(Self);\r\n WebLabel49 := TLabel.Create(Self);\r\n WebSpeedButton46 := TSpeedButton.Create(Self);\r\n M14 := TMemo.Create(Self);\r\n WebHTMLContainer14 := THTMLContainer.Create(Self);\r\n B13 := TPanel.Create(Self);\r\n WebPanel101 := TPanel.Create(Self);\r\n WebLabel50 := TLabel.Create(Self);\r\n WebSpeedButton47 := TSpeedButton.Create(Self);\r\n M13 := TMemo.Create(Self);\r\n WebHTMLContainer13 := THTMLContainer.Create(Self);\r\n B12 := TPanel.Create(Self);\r\n WebPanel103 := TPanel.Create(Self);\r\n WebLabel51 := TLabel.Create(Self);\r\n WebSpeedButton48 := TSpeedButton.Create(Self);\r\n M12 := TMemo.Create(Self);\r\n WebHTMLContainer12 := THTMLContainer.Create(Self);\r\n B11 := TPanel.Create(Self);\r\n WebPanel105 := TPanel.Create(Self);\r\n WebLabel52 := TLabel.Create(Self);\r\n WebSpeedButton49 := TSpeedButton.Create(Self);\r\n M11 := TMemo.Create(Self);\r\n WebHTMLContainer11 := THTMLContainer.Create(Self);\r\n B16 := TPanel.Create(Self);\r\n WebPanel107 := TPanel.Create(Self);\r\n WebLabel53 := TLabel.Create(Self);\r\n WebSpeedButton50 := TSpeedButton.Create(Self);\r\n M16 := TMemo.Create(Self);\r\n WebHTMLContainer16 := THTMLContainer.Create(Self);\r\n B17 := TPanel.Create(Self);\r\n WebPanel109 := TPanel.Create(Self);\r\n WebLabel54 := TLabel.Create(Self);\r\n WebSpeedButton51 := TSpeedButton.Create(Self);\r\n M17 := TMemo.Create(Self);\r\n WebHTMLContainer17 := THTMLContainer.Create(Self);\r\n B18 := TPanel.Create(Self);\r\n WebPanel111 := TPanel.Create(Self);\r\n WebLabel55 := TLabel.Create(Self);\r\n WebSpeedButton52 := TSpeedButton.Create(Self);\r\n M18 := TMemo.Create(Self);\r\n WebHTMLContainer18 := THTMLContainer.Create(Self);\r\n Memo := TMemo.Create(Self);\r\n pnlFormButtons := TPanel.Create(Self);\r\n btnClose := TBitBtn.Create(Self);\r\n btnSave := TBitBtn.Create(Self);\r\n btnUseDefaults := TBitBtn.Create(Self);\r\n btnSaveAsDefaults := TBitBtn.Create(Self);\r\n btnAdd := TBitBtn.Create(Self);\r\n btnClear := TBitBtn.Create(Self);\r\n btnSentenceTemplate := TBitBtn.Create(Self);\r\n btnClearBlockCustomPositioning := TBitBtn.Create(Self);\r\n btnClearBlockCustomSizes := TBitBtn.Create(Self);\r\n btnFixBlockPositions := TBitBtn.Create(Self);\r\n PNL_PICKFORM_PNLGRID := TPanel.Create(Self);\r\n pnlFormCaption := TPanel.Create(Self);\r\n\r\n WebLabel15.BeforeLoadDFMValues;\r\n WebLabel1.BeforeLoadDFMValues;\r\n SubForm_DIV.BeforeLoadDFMValues;\r\n WebLabel2.BeforeLoadDFMValues;\r\n B1.BeforeLoadDFMValues;\r\n WebPanel70.BeforeLoadDFMValues;\r\n WebLabel36.BeforeLoadDFMValues;\r\n WebSpeedButton33.BeforeLoadDFMValues;\r\n M1.BeforeLoadDFMValues;\r\n WebHTMLContainer2.BeforeLoadDFMValues;\r\n B3.BeforeLoadDFMValues;\r\n WebPanel72.BeforeLoadDFMValues;\r\n WebLabel37.BeforeLoadDFMValues;\r\n WebSpeedButton34.BeforeLoadDFMValues;\r\n M3.BeforeLoadDFMValues;\r\n WebHTMLContainer3.BeforeLoadDFMValues;\r\n B5.BeforeLoadDFMValues;\r\n WebPanel74.BeforeLoadDFMValues;\r\n WebLabel38.BeforeLoadDFMValues;\r\n WebSpeedButton35.BeforeLoadDFMValues;\r\n M5.BeforeLoadDFMValues;\r\n WebHTMLContainer5.BeforeLoadDFMValues;\r\n B2.BeforeLoadDFMValues;\r\n WebPanel76.BeforeLoadDFMValues;\r\n WebLabel39.BeforeLoadDFMValues;\r\n WebSpeedButton36.BeforeLoadDFMValues;\r\n M2.BeforeLoadDFMValues;\r\n WebHTMLContainer1.BeforeLoadDFMValues;\r\n B4.BeforeLoadDFMValues;\r\n WebPanel78.BeforeLoadDFMValues;\r\n WebLabel40.BeforeLoadDFMValues;\r\n WebSpeedButton37.BeforeLoadDFMValues;\r\n M4.BeforeLoadDFMValues;\r\n WebHTMLContainer4.BeforeLoadDFMValues;\r\n B6.BeforeLoadDFMValues;\r\n WebPanel80.BeforeLoadDFMValues;\r\n WebLabel41.BeforeLoadDFMValues;\r\n WebSpeedButton38.BeforeLoadDFMValues;\r\n M6.BeforeLoadDFMValues;\r\n WebHTMLContainer6.BeforeLoadDFMValues;\r\n B7.BeforeLoadDFMValues;\r\n WebPanel82.BeforeLoadDFMValues;\r\n WebLabel42.BeforeLoadDFMValues;\r\n WebSpeedButton39.BeforeLoadDFMValues;\r\n M7.BeforeLoadDFMValues;\r\n WebHTMLContainer7.BeforeLoadDFMValues;\r\n B8.BeforeLoadDFMValues;\r\n WebPanel86.BeforeLoadDFMValues;\r\n WebLabel43.BeforeLoadDFMValues;\r\n WebSpeedButton40.BeforeLoadDFMValues;\r\n M8.BeforeLoadDFMValues;\r\n WebHTMLContainer8.BeforeLoadDFMValues;\r\n B9.BeforeLoadDFMValues;\r\n WebPanel88.BeforeLoadDFMValues;\r\n WebLabel44.BeforeLoadDFMValues;\r\n WebSpeedButton41.BeforeLoadDFMValues;\r\n M9.BeforeLoadDFMValues;\r\n WebHTMLContainer9.BeforeLoadDFMValues;\r\n B10.BeforeLoadDFMValues;\r\n WebPanel91.BeforeLoadDFMValues;\r\n WebLabel45.BeforeLoadDFMValues;\r\n WebSpeedButton42.BeforeLoadDFMValues;\r\n M10.BeforeLoadDFMValues;\r\n WebHTMLContainer10.BeforeLoadDFMValues;\r\n B19.BeforeLoadDFMValues;\r\n WebPanel93.BeforeLoadDFMValues;\r\n WebLabel46.BeforeLoadDFMValues;\r\n WebSpeedButton43.BeforeLoadDFMValues;\r\n M19.BeforeLoadDFMValues;\r\n WebHTMLContainer19.BeforeLoadDFMValues;\r\n B20.BeforeLoadDFMValues;\r\n WebPanel95.BeforeLoadDFMValues;\r\n WebLabel47.BeforeLoadDFMValues;\r\n WebSpeedButton44.BeforeLoadDFMValues;\r\n M20.BeforeLoadDFMValues;\r\n WebHTMLContainer20.BeforeLoadDFMValues;\r\n B15.BeforeLoadDFMValues;\r\n WebPanel97.BeforeLoadDFMValues;\r\n WebLabel48.BeforeLoadDFMValues;\r\n WebSpeedButton45.BeforeLoadDFMValues;\r\n M15.BeforeLoadDFMValues;\r\n WebHTMLContainer15.BeforeLoadDFMValues;\r\n B14.BeforeLoadDFMValues;\r\n WebPanel99.BeforeLoadDFMValues;\r\n WebLabel49.BeforeLoadDFMValues;\r\n WebSpeedButton46.BeforeLoadDFMValues;\r\n M14.BeforeLoadDFMValues;\r\n WebHTMLContainer14.BeforeLoadDFMValues;\r\n B13.BeforeLoadDFMValues;\r\n WebPanel101.BeforeLoadDFMValues;\r\n WebLabel50.BeforeLoadDFMValues;\r\n WebSpeedButton47.BeforeLoadDFMValues;\r\n M13.BeforeLoadDFMValues;\r\n WebHTMLContainer13.BeforeLoadDFMValues;\r\n B12.BeforeLoadDFMValues;\r\n WebPanel103.BeforeLoadDFMValues;\r\n WebLabel51.BeforeLoadDFMValues;\r\n WebSpeedButton48.BeforeLoadDFMValues;\r\n M12.BeforeLoadDFMValues;\r\n WebHTMLContainer12.BeforeLoadDFMValues;\r\n B11.BeforeLoadDFMValues;\r\n WebPanel105.BeforeLoadDFMValues;\r\n WebLabel52.BeforeLoadDFMValues;\r\n WebSpeedButton49.BeforeLoadDFMValues;\r\n M11.BeforeLoadDFMValues;\r\n WebHTMLContainer11.BeforeLoadDFMValues;\r\n B16.BeforeLoadDFMValues;\r\n WebPanel107.BeforeLoadDFMValues;\r\n WebLabel53.BeforeLoadDFMValues;\r\n WebSpeedButton50.BeforeLoadDFMValues;\r\n M16.BeforeLoadDFMValues;\r\n WebHTMLContainer16.BeforeLoadDFMValues;\r\n B17.BeforeLoadDFMValues;\r\n WebPanel109.BeforeLoadDFMValues;\r\n WebLabel54.BeforeLoadDFMValues;\r\n WebSpeedButton51.BeforeLoadDFMValues;\r\n M17.BeforeLoadDFMValues;\r\n WebHTMLContainer17.BeforeLoadDFMValues;\r\n B18.BeforeLoadDFMValues;\r\n WebPanel111.BeforeLoadDFMValues;\r\n WebLabel55.BeforeLoadDFMValues;\r\n WebSpeedButton52.BeforeLoadDFMValues;\r\n M18.BeforeLoadDFMValues;\r\n WebHTMLContainer18.BeforeLoadDFMValues;\r\n Memo.BeforeLoadDFMValues;\r\n pnlFormButtons.BeforeLoadDFMValues;\r\n btnClose.BeforeLoadDFMValues;\r\n btnSave.BeforeLoadDFMValues;\r\n btnUseDefaults.BeforeLoadDFMValues;\r\n btnSaveAsDefaults.BeforeLoadDFMValues;\r\n btnAdd.BeforeLoadDFMValues;\r\n btnClear.BeforeLoadDFMValues;\r\n btnSentenceTemplate.BeforeLoadDFMValues;\r\n btnClearBlockCustomPositioning.BeforeLoadDFMValues;\r\n btnClearBlockCustomSizes.BeforeLoadDFMValues;\r\n btnFixBlockPositions.BeforeLoadDFMValues;\r\n PNL_PICKFORM_PNLGRID.BeforeLoadDFMValues;\r\n pnlFormCaption.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmPickForm';\r\n Width := 838;\r\n Height := 800;\r\n SetEvent(Self, 'OnClose', 'WebFormClose');\r\n SetEvent(Self, 'OnCreate', 'WebFormCreate');\r\n SetEvent(Self, 'OnResize', 'WebFormResize');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n WebLabel15.SetParentComponent(Self);\r\n WebLabel15.Name := 'WebLabel15';\r\n WebLabel15.Left := 0;\r\n WebLabel15.Top := 733;\r\n WebLabel15.Width := 838;\r\n WebLabel15.Height := 13;\r\n WebLabel15.Align := alBottom;\r\n WebLabel15.ElementClassName := 'BOX_BOTTOMBORDER';\r\n WebLabel15.HeightPercent := 100.000000000000000000;\r\n WebLabel15.WidthPercent := 100.000000000000000000;\r\n WebLabel1.SetParentComponent(Self);\r\n WebLabel1.Name := 'WebLabel1';\r\n WebLabel1.Left := 0;\r\n WebLabel1.Top := 746;\r\n WebLabel1.Width := 838;\r\n WebLabel1.Height := 13;\r\n WebLabel1.Align := alBottom;\r\n WebLabel1.HeightPercent := 100.000000000000000000;\r\n WebLabel1.WidthPercent := 100.000000000000000000;\r\n SubForm_DIV.SetParentComponent(Self);\r\n SubForm_DIV.Name := 'SubForm_DIV';\r\n SubForm_DIV.Left := 0;\r\n SubForm_DIV.Top := 41;\r\n SubForm_DIV.Width := 838;\r\n SubForm_DIV.Height := 422;\r\n SubForm_DIV.ElementClassName := 'form_background';\r\n SubForm_DIV.Align := alClient;\r\n SubForm_DIV.BorderStyle := bsNone;\r\n SubForm_DIV.ChildOrder := 2;\r\n SubForm_DIV.Color := clWhite;\r\n SubForm_DIV.ScrollBars := ssVertical;\r\n SetEvent(SubForm_DIV, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(SubForm_DIV, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel2.SetParentComponent(SubForm_DIV);\r\n WebLabel2.Name := 'WebLabel2';\r\n WebLabel2.Left := 0;\r\n WebLabel2.Top := 0;\r\n WebLabel2.Width := 838;\r\n WebLabel2.Height := 13;\r\n WebLabel2.Align := alTop;\r\n WebLabel2.HeightPercent := 100.000000000000000000;\r\n WebLabel2.WidthPercent := 100.000000000000000000;\r\n B1.SetParentComponent(SubForm_DIV);\r\n B1.Name := 'B1';\r\n B1.Left := 58;\r\n B1.Top := 3;\r\n B1.Width := 100;\r\n B1.Height := 80;\r\n B1.ElementClassName := 'data_block';\r\n B1.BorderColor := clWhite;\r\n B1.ChildOrder := 1;\r\n B1.Color := clWhite;\r\n B1.ElementFont := efCSS;\r\n B1.Font.Charset := ANSI_CHARSET;\r\n B1.Font.Color := clBlack;\r\n B1.Font.Height := -13;\r\n B1.Font.Name := 'Tahoma';\r\n B1.Font.Style := [];\r\n B1.ParentFont := False;\r\n B1.TabOrder := 0;\r\n SetEvent(B1, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B1, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel70.SetParentComponent(B1);\r\n WebPanel70.Name := 'WebPanel70';\r\n WebPanel70.Left := 0;\r\n WebPanel70.Top := 0;\r\n WebPanel70.Width := 100;\r\n WebPanel70.Height := 24;\r\n WebPanel70.ElementClassName := 'block_top';\r\n WebPanel70.HeightStyle := ssAuto;\r\n WebPanel70.Align := alTop;\r\n WebPanel70.BorderStyle := bsNone;\r\n WebPanel70.ChildOrder := 2;\r\n WebPanel70.Color := clWhite;\r\n WebPanel70.DragMode := dmAutomatic;\r\n WebPanel70.ElementFont := efCSS;\r\n WebPanel70.TabOrder := 0;\r\n SetEvent(WebPanel70, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel70, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel70, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel70, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel36.SetParentComponent(WebPanel70);\r\n WebLabel36.Name := 'WebLabel36';\r\n WebLabel36.Left := 24;\r\n WebLabel36.Top := 0;\r\n WebLabel36.Width := 11;\r\n WebLabel36.Height := 26;\r\n WebLabel36.Align := alLeft;\r\n WebLabel36.Caption := '1';\r\n WebLabel36.DragMode := dmAutomatic;\r\n WebLabel36.ElementClassName := 'block_title';\r\n WebLabel36.ElementFont := efCSS;\r\n WebLabel36.Font.Charset := ANSI_CHARSET;\r\n WebLabel36.Font.Color := clNavy;\r\n WebLabel36.Font.Height := -19;\r\n WebLabel36.Font.Name := 'Segoe UI Emoji';\r\n WebLabel36.Font.Style := [fsBold];\r\n WebLabel36.HeightPercent := 100.000000000000000000;\r\n WebLabel36.ParentFont := False;\r\n WebLabel36.WidthStyle := ssAuto;\r\n WebLabel36.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel36, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel36, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel36, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel36, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton33.SetParentComponent(WebPanel70);\r\n WebSpeedButton33.Name := 'WebSpeedButton33';\r\n WebSpeedButton33.Left := 0;\r\n WebSpeedButton33.Top := 0;\r\n WebSpeedButton33.Width := 24;\r\n WebSpeedButton33.Height := 24;\r\n WebSpeedButton33.Cursor := crHandPoint;\r\n WebSpeedButton33.Hint := 'Edit';\r\n WebSpeedButton33.Align := alLeft;\r\n WebSpeedButton33.Color := clNone;\r\n WebSpeedButton33.Flat := True;\r\n WebSpeedButton33.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton33.Font.Color := clBlack;\r\n WebSpeedButton33.Font.Height := -13;\r\n WebSpeedButton33.Font.Name := 'Tahoma';\r\n WebSpeedButton33.Font.Style := [];\r\n WebSpeedButton33.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton33.MaterialGlyph := 'edit';\r\n WebSpeedButton33.ParentFont := False;\r\n WebSpeedButton33.ShowHint := True;\r\n WebSpeedButton33.TabOrder := 0;\r\n WebSpeedButton33.Visible := False;\r\n WebSpeedButton33.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton33, Self, 'OnClick', '_BlockCallPickForm');\r\n M1.SetParentComponent(B1);\r\n M1.Name := 'M1';\r\n M1.Left := 0;\r\n M1.Top := 56;\r\n M1.Width := 100;\r\n M1.Height := 24;\r\n M1.Align := alBottom;\r\n M1.BorderStyle := bsNone;\r\n M1.ElementClassName := 'block_memo';\r\n M1.ElementFont := efCSS;\r\n M1.Font.Charset := ANSI_CHARSET;\r\n M1.Font.Color := clBlack;\r\n M1.Font.Height := -13;\r\n M1.Font.Name := 'Tahoma';\r\n M1.Font.Style := [];\r\n M1.HeightPercent := 100.000000000000000000;\r\n M1.ParentFont := False;\r\n M1.SelLength := 0;\r\n M1.SelStart := 0;\r\n M1.ShowFocus := False;\r\n M1.WidthPercent := 100.000000000000000000;\r\n SetEvent(M1, Self, 'OnChange', 'M1Change');\r\n SetEvent(M1, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M1, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M1, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M1, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer2.SetParentComponent(B1);\r\n WebHTMLContainer2.Name := 'WebHTMLContainer2';\r\n WebHTMLContainer2.Left := 0;\r\n WebHTMLContainer2.Top := 41;\r\n WebHTMLContainer2.Width := 100;\r\n WebHTMLContainer2.Height := 15;\r\n WebHTMLContainer2.HeightStyle := ssAuto;\r\n WebHTMLContainer2.Align := alBottom;\r\n WebHTMLContainer2.ChildOrder := 2;\r\n WebHTMLContainer2.Visible := False;\r\n SetEvent(WebHTMLContainer2, Self, 'OnClick', 'WebHTMLContainer2Click');\r\n SetEvent(WebHTMLContainer2, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer2, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer2, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B3.SetParentComponent(SubForm_DIV);\r\n B3.Name := 'B3';\r\n B3.Left := 299;\r\n B3.Top := 1;\r\n B3.Width := 100;\r\n B3.Height := 80;\r\n B3.ElementClassName := 'data_block';\r\n B3.BorderColor := clWhite;\r\n B3.ChildOrder := 3;\r\n B3.Color := clWhite;\r\n B3.ElementFont := efCSS;\r\n B3.Font.Charset := ANSI_CHARSET;\r\n B3.Font.Color := clBlack;\r\n B3.Font.Height := -13;\r\n B3.Font.Name := 'Tahoma';\r\n B3.Font.Style := [];\r\n B3.ParentFont := False;\r\n B3.TabOrder := 1;\r\n SetEvent(B3, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B3, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel72.SetParentComponent(B3);\r\n WebPanel72.Name := 'WebPanel72';\r\n WebPanel72.Left := 0;\r\n WebPanel72.Top := 0;\r\n WebPanel72.Width := 100;\r\n WebPanel72.Height := 28;\r\n WebPanel72.ElementClassName := 'block_top';\r\n WebPanel72.HeightStyle := ssAuto;\r\n WebPanel72.Align := alTop;\r\n WebPanel72.BorderStyle := bsNone;\r\n WebPanel72.ChildOrder := 2;\r\n WebPanel72.Color := clWhite;\r\n WebPanel72.DragMode := dmAutomatic;\r\n WebPanel72.ElementFont := efCSS;\r\n WebPanel72.TabOrder := 0;\r\n SetEvent(WebPanel72, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel72, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel72, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel72, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel37.SetParentComponent(WebPanel72);\r\n WebLabel37.Name := 'WebLabel37';\r\n WebLabel37.Left := 24;\r\n WebLabel37.Top := 0;\r\n WebLabel37.Width := 11;\r\n WebLabel37.Height := 26;\r\n WebLabel37.Align := alLeft;\r\n WebLabel37.Caption := '3';\r\n WebLabel37.DragMode := dmAutomatic;\r\n WebLabel37.ElementClassName := 'block_title';\r\n WebLabel37.ElementFont := efCSS;\r\n WebLabel37.Font.Charset := ANSI_CHARSET;\r\n WebLabel37.Font.Color := clNavy;\r\n WebLabel37.Font.Height := -19;\r\n WebLabel37.Font.Name := 'Segoe UI Emoji';\r\n WebLabel37.Font.Style := [fsBold];\r\n WebLabel37.HeightPercent := 100.000000000000000000;\r\n WebLabel37.ParentFont := False;\r\n WebLabel37.WidthStyle := ssAuto;\r\n WebLabel37.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel37, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel37, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel37, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel37, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton34.SetParentComponent(WebPanel72);\r\n WebSpeedButton34.Name := 'WebSpeedButton34';\r\n WebSpeedButton34.Left := 0;\r\n WebSpeedButton34.Top := 0;\r\n WebSpeedButton34.Width := 24;\r\n WebSpeedButton34.Height := 28;\r\n WebSpeedButton34.Cursor := crHandPoint;\r\n WebSpeedButton34.Hint := 'Edit';\r\n WebSpeedButton34.Align := alLeft;\r\n WebSpeedButton34.Color := clNone;\r\n WebSpeedButton34.Flat := True;\r\n WebSpeedButton34.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton34.Font.Color := clBlack;\r\n WebSpeedButton34.Font.Height := -13;\r\n WebSpeedButton34.Font.Name := 'Tahoma';\r\n WebSpeedButton34.Font.Style := [];\r\n WebSpeedButton34.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton34.MaterialGlyph := 'edit';\r\n WebSpeedButton34.ParentFont := False;\r\n WebSpeedButton34.ShowHint := True;\r\n WebSpeedButton34.TabOrder := 0;\r\n WebSpeedButton34.Visible := False;\r\n WebSpeedButton34.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton34, Self, 'OnClick', '_BlockCallPickForm');\r\n M3.SetParentComponent(B3);\r\n M3.Name := 'M3';\r\n M3.Left := 0;\r\n M3.Top := 56;\r\n M3.Width := 100;\r\n M3.Height := 24;\r\n M3.Align := alBottom;\r\n M3.BorderStyle := bsNone;\r\n M3.ElementClassName := 'block_memo';\r\n M3.ElementFont := efCSS;\r\n M3.Font.Charset := ANSI_CHARSET;\r\n M3.Font.Color := clBlack;\r\n M3.Font.Height := -13;\r\n M3.Font.Name := 'Tahoma';\r\n M3.Font.Style := [];\r\n M3.HeightPercent := 100.000000000000000000;\r\n M3.ParentFont := False;\r\n M3.SelLength := 0;\r\n M3.SelStart := 0;\r\n M3.ShowFocus := False;\r\n M3.WidthPercent := 100.000000000000000000;\r\n SetEvent(M3, Self, 'OnChange', 'M1Change');\r\n SetEvent(M3, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M3, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M3, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M3, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer3.SetParentComponent(B3);\r\n WebHTMLContainer3.Name := 'WebHTMLContainer3';\r\n WebHTMLContainer3.Left := 0;\r\n WebHTMLContainer3.Top := 41;\r\n WebHTMLContainer3.Width := 100;\r\n WebHTMLContainer3.Height := 15;\r\n WebHTMLContainer3.HeightStyle := ssAuto;\r\n WebHTMLContainer3.Align := alBottom;\r\n WebHTMLContainer3.ChildOrder := 2;\r\n WebHTMLContainer3.Visible := False;\r\n SetEvent(WebHTMLContainer3, Self, 'OnClick', 'WebHTMLContainer2Click');\r\n SetEvent(WebHTMLContainer3, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer3, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer3, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B5.SetParentComponent(SubForm_DIV);\r\n B5.Name := 'B5';\r\n B5.Left := 540;\r\n B5.Top := 1;\r\n B5.Width := 100;\r\n B5.Height := 80;\r\n B5.ElementClassName := 'data_block';\r\n B5.BorderColor := clWhite;\r\n B5.ChildOrder := 5;\r\n B5.Color := clWhite;\r\n B5.ElementFont := efCSS;\r\n B5.Font.Charset := ANSI_CHARSET;\r\n B5.Font.Color := clBlack;\r\n B5.Font.Height := -13;\r\n B5.Font.Name := 'Tahoma';\r\n B5.Font.Style := [];\r\n B5.ParentFont := False;\r\n B5.TabOrder := 2;\r\n SetEvent(B5, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B5, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel74.SetParentComponent(B5);\r\n WebPanel74.Name := 'WebPanel74';\r\n WebPanel74.Left := 0;\r\n WebPanel74.Top := 0;\r\n WebPanel74.Width := 100;\r\n WebPanel74.Height := 28;\r\n WebPanel74.ElementClassName := 'block_top';\r\n WebPanel74.HeightStyle := ssAuto;\r\n WebPanel74.Align := alTop;\r\n WebPanel74.BorderStyle := bsNone;\r\n WebPanel74.ChildOrder := 2;\r\n WebPanel74.Color := clWhite;\r\n WebPanel74.DragMode := dmAutomatic;\r\n WebPanel74.ElementFont := efCSS;\r\n WebPanel74.TabOrder := 0;\r\n SetEvent(WebPanel74, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel74, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel74, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel74, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel38.SetParentComponent(WebPanel74);\r\n WebLabel38.Name := 'WebLabel38';\r\n WebLabel38.Left := 24;\r\n WebLabel38.Top := 0;\r\n WebLabel38.Width := 11;\r\n WebLabel38.Height := 26;\r\n WebLabel38.Hint := 'Locations';\r\n WebLabel38.Align := alLeft;\r\n WebLabel38.Caption := '5';\r\n WebLabel38.DragMode := dmAutomatic;\r\n WebLabel38.ElementClassName := 'block_title';\r\n WebLabel38.ElementFont := efCSS;\r\n WebLabel38.Font.Charset := ANSI_CHARSET;\r\n WebLabel38.Font.Color := clNavy;\r\n WebLabel38.Font.Height := -19;\r\n WebLabel38.Font.Name := 'Segoe UI Emoji';\r\n WebLabel38.Font.Style := [fsBold];\r\n WebLabel38.HeightPercent := 100.000000000000000000;\r\n WebLabel38.ParentFont := False;\r\n WebLabel38.WidthStyle := ssAuto;\r\n WebLabel38.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel38, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel38, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel38, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel38, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton35.SetParentComponent(WebPanel74);\r\n WebSpeedButton35.Name := 'WebSpeedButton35';\r\n WebSpeedButton35.Left := 0;\r\n WebSpeedButton35.Top := 0;\r\n WebSpeedButton35.Width := 24;\r\n WebSpeedButton35.Height := 28;\r\n WebSpeedButton35.Cursor := crHandPoint;\r\n WebSpeedButton35.Hint := 'Edit';\r\n WebSpeedButton35.Align := alLeft;\r\n WebSpeedButton35.Color := clNone;\r\n WebSpeedButton35.Flat := True;\r\n WebSpeedButton35.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton35.Font.Color := clBlack;\r\n WebSpeedButton35.Font.Height := -13;\r\n WebSpeedButton35.Font.Name := 'Tahoma';\r\n WebSpeedButton35.Font.Style := [];\r\n WebSpeedButton35.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton35.MaterialGlyph := 'edit';\r\n WebSpeedButton35.ParentFont := False;\r\n WebSpeedButton35.ShowHint := True;\r\n WebSpeedButton35.TabOrder := 0;\r\n WebSpeedButton35.Visible := False;\r\n WebSpeedButton35.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton35, Self, 'OnClick', '_BlockCallPickForm');\r\n M5.SetParentComponent(B5);\r\n M5.Name := 'M5';\r\n M5.Left := 0;\r\n M5.Top := 56;\r\n M5.Width := 100;\r\n M5.Height := 24;\r\n M5.Align := alBottom;\r\n M5.BorderStyle := bsNone;\r\n M5.ElementClassName := 'block_memo';\r\n M5.ElementFont := efCSS;\r\n M5.Font.Charset := ANSI_CHARSET;\r\n M5.Font.Color := clBlack;\r\n M5.Font.Height := -13;\r\n M5.Font.Name := 'Tahoma';\r\n M5.Font.Style := [];\r\n M5.HeightPercent := 100.000000000000000000;\r\n M5.ParentFont := False;\r\n M5.SelLength := 0;\r\n M5.SelStart := 0;\r\n M5.ShowFocus := False;\r\n M5.WidthPercent := 100.000000000000000000;\r\n SetEvent(M5, Self, 'OnChange', 'M1Change');\r\n SetEvent(M5, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M5, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M5, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M5, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer5.SetParentComponent(B5);\r\n WebHTMLContainer5.Name := 'WebHTMLContainer5';\r\n WebHTMLContainer5.Left := 0;\r\n WebHTMLContainer5.Top := 41;\r\n WebHTMLContainer5.Width := 100;\r\n WebHTMLContainer5.Height := 15;\r\n WebHTMLContainer5.HeightStyle := ssAuto;\r\n WebHTMLContainer5.Align := alBottom;\r\n WebHTMLContainer5.ChildOrder := 2;\r\n WebHTMLContainer5.Visible := False;\r\n SetEvent(WebHTMLContainer5, Self, 'OnClick', 'WebHTMLContainer2Click');\r\n SetEvent(WebHTMLContainer5, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer5, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer5, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B2.SetParentComponent(SubForm_DIV);\r\n B2.Name := 'B2';\r\n B2.Left := 178;\r\n B2.Top := 3;\r\n B2.Width := 100;\r\n B2.Height := 80;\r\n B2.ElementClassName := 'data_block';\r\n B2.BorderColor := clWhite;\r\n B2.ChildOrder := 2;\r\n B2.Color := clWhite;\r\n B2.ElementFont := efCSS;\r\n B2.Font.Charset := ANSI_CHARSET;\r\n B2.Font.Color := clBlack;\r\n B2.Font.Height := -13;\r\n B2.Font.Name := 'Tahoma';\r\n B2.Font.Style := [];\r\n B2.ParentFont := False;\r\n B2.TabOrder := 3;\r\n SetEvent(B2, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B2, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel76.SetParentComponent(B2);\r\n WebPanel76.Name := 'WebPanel76';\r\n WebPanel76.Left := 0;\r\n WebPanel76.Top := 0;\r\n WebPanel76.Width := 100;\r\n WebPanel76.Height := 28;\r\n WebPanel76.ElementClassName := 'block_top';\r\n WebPanel76.HeightStyle := ssAuto;\r\n WebPanel76.Align := alTop;\r\n WebPanel76.BorderStyle := bsNone;\r\n WebPanel76.ChildOrder := 2;\r\n WebPanel76.Color := clWhite;\r\n WebPanel76.DragMode := dmAutomatic;\r\n WebPanel76.ElementFont := efCSS;\r\n WebPanel76.TabOrder := 0;\r\n SetEvent(WebPanel76, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel76, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel76, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel76, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel39.SetParentComponent(WebPanel76);\r\n WebLabel39.Name := 'WebLabel39';\r\n WebLabel39.Left := 24;\r\n WebLabel39.Top := 0;\r\n WebLabel39.Width := 11;\r\n WebLabel39.Height := 26;\r\n WebLabel39.Align := alLeft;\r\n WebLabel39.Caption := '2';\r\n WebLabel39.DragMode := dmAutomatic;\r\n WebLabel39.ElementClassName := 'block_title';\r\n WebLabel39.ElementFont := efCSS;\r\n WebLabel39.Font.Charset := ANSI_CHARSET;\r\n WebLabel39.Font.Color := clNavy;\r\n WebLabel39.Font.Height := -19;\r\n WebLabel39.Font.Name := 'Segoe UI Emoji';\r\n WebLabel39.Font.Style := [fsBold];\r\n WebLabel39.HeightPercent := 100.000000000000000000;\r\n WebLabel39.ParentFont := False;\r\n WebLabel39.WidthStyle := ssAuto;\r\n WebLabel39.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel39, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel39, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel39, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel39, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton36.SetParentComponent(WebPanel76);\r\n WebSpeedButton36.Name := 'WebSpeedButton36';\r\n WebSpeedButton36.Left := 0;\r\n WebSpeedButton36.Top := 0;\r\n WebSpeedButton36.Width := 24;\r\n WebSpeedButton36.Height := 28;\r\n WebSpeedButton36.Cursor := crHandPoint;\r\n WebSpeedButton36.Hint := 'Edit';\r\n WebSpeedButton36.Align := alLeft;\r\n WebSpeedButton36.Color := clNone;\r\n WebSpeedButton36.Flat := True;\r\n WebSpeedButton36.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton36.Font.Color := clBlack;\r\n WebSpeedButton36.Font.Height := -13;\r\n WebSpeedButton36.Font.Name := 'Tahoma';\r\n WebSpeedButton36.Font.Style := [];\r\n WebSpeedButton36.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton36.MaterialGlyph := 'edit';\r\n WebSpeedButton36.ParentFont := False;\r\n WebSpeedButton36.ShowHint := True;\r\n WebSpeedButton36.TabOrder := 0;\r\n WebSpeedButton36.Visible := False;\r\n WebSpeedButton36.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton36, Self, 'OnClick', '_BlockCallPickForm');\r\n M2.SetParentComponent(B2);\r\n M2.Name := 'M2';\r\n M2.Left := 0;\r\n M2.Top := 56;\r\n M2.Width := 100;\r\n M2.Height := 24;\r\n M2.Align := alBottom;\r\n M2.BorderStyle := bsNone;\r\n M2.ElementClassName := 'block_memo';\r\n M2.ElementFont := efCSS;\r\n M2.Font.Charset := ANSI_CHARSET;\r\n M2.Font.Color := clBlack;\r\n M2.Font.Height := -13;\r\n M2.Font.Name := 'Tahoma';\r\n M2.Font.Style := [];\r\n M2.HeightPercent := 100.000000000000000000;\r\n M2.ParentFont := False;\r\n M2.SelLength := 0;\r\n M2.SelStart := 0;\r\n M2.ShowFocus := False;\r\n M2.WidthPercent := 100.000000000000000000;\r\n SetEvent(M2, Self, 'OnChange', 'M1Change');\r\n SetEvent(M2, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M2, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M2, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M2, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer1.SetParentComponent(B2);\r\n WebHTMLContainer1.Name := 'WebHTMLContainer1';\r\n WebHTMLContainer1.Left := 0;\r\n WebHTMLContainer1.Top := 41;\r\n WebHTMLContainer1.Width := 100;\r\n WebHTMLContainer1.Height := 15;\r\n WebHTMLContainer1.HeightStyle := ssAuto;\r\n WebHTMLContainer1.Align := alBottom;\r\n WebHTMLContainer1.ChildOrder := 2;\r\n WebHTMLContainer1.Visible := False;\r\n SetEvent(WebHTMLContainer1, Self, 'OnClick', 'WebHTMLContainer2Click');\r\n SetEvent(WebHTMLContainer1, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer1, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer1, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B4.SetParentComponent(SubForm_DIV);\r\n B4.Name := 'B4';\r\n B4.Left := 419;\r\n B4.Top := 6;\r\n B4.Width := 100;\r\n B4.Height := 80;\r\n B4.ElementClassName := 'data_block';\r\n B4.BorderColor := clWhite;\r\n B4.ChildOrder := 4;\r\n B4.Color := clWhite;\r\n B4.ElementFont := efCSS;\r\n B4.Font.Charset := ANSI_CHARSET;\r\n B4.Font.Color := clBlack;\r\n B4.Font.Height := -13;\r\n B4.Font.Name := 'Tahoma';\r\n B4.Font.Style := [];\r\n B4.ParentFont := False;\r\n B4.TabOrder := 4;\r\n SetEvent(B4, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B4, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel78.SetParentComponent(B4);\r\n WebPanel78.Name := 'WebPanel78';\r\n WebPanel78.Left := 0;\r\n WebPanel78.Top := 0;\r\n WebPanel78.Width := 100;\r\n WebPanel78.Height := 28;\r\n WebPanel78.ElementClassName := 'block_top';\r\n WebPanel78.HeightStyle := ssAuto;\r\n WebPanel78.Align := alTop;\r\n WebPanel78.BorderStyle := bsNone;\r\n WebPanel78.ChildOrder := 2;\r\n WebPanel78.Color := clWhite;\r\n WebPanel78.DragMode := dmAutomatic;\r\n WebPanel78.ElementFont := efCSS;\r\n WebPanel78.TabOrder := 0;\r\n SetEvent(WebPanel78, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel78, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel78, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel78, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel40.SetParentComponent(WebPanel78);\r\n WebLabel40.Name := 'WebLabel40';\r\n WebLabel40.Left := 24;\r\n WebLabel40.Top := 0;\r\n WebLabel40.Width := 11;\r\n WebLabel40.Height := 26;\r\n WebLabel40.Align := alLeft;\r\n WebLabel40.Caption := '4';\r\n WebLabel40.DragMode := dmAutomatic;\r\n WebLabel40.ElementClassName := 'block_title';\r\n WebLabel40.ElementFont := efCSS;\r\n WebLabel40.Font.Charset := ANSI_CHARSET;\r\n WebLabel40.Font.Color := clNavy;\r\n WebLabel40.Font.Height := -19;\r\n WebLabel40.Font.Name := 'Segoe UI Emoji';\r\n WebLabel40.Font.Style := [fsBold];\r\n WebLabel40.HeightPercent := 100.000000000000000000;\r\n WebLabel40.ParentFont := False;\r\n WebLabel40.WidthStyle := ssAuto;\r\n WebLabel40.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel40, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel40, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel40, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel40, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton37.SetParentComponent(WebPanel78);\r\n WebSpeedButton37.Name := 'WebSpeedButton37';\r\n WebSpeedButton37.Left := 0;\r\n WebSpeedButton37.Top := 0;\r\n WebSpeedButton37.Width := 24;\r\n WebSpeedButton37.Height := 28;\r\n WebSpeedButton37.Cursor := crHandPoint;\r\n WebSpeedButton37.Hint := 'Edit';\r\n WebSpeedButton37.Align := alLeft;\r\n WebSpeedButton37.Color := clNone;\r\n WebSpeedButton37.Flat := True;\r\n WebSpeedButton37.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton37.Font.Color := clBlack;\r\n WebSpeedButton37.Font.Height := -13;\r\n WebSpeedButton37.Font.Name := 'Tahoma';\r\n WebSpeedButton37.Font.Style := [];\r\n WebSpeedButton37.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton37.MaterialGlyph := 'edit';\r\n WebSpeedButton37.ParentFont := False;\r\n WebSpeedButton37.ShowHint := True;\r\n WebSpeedButton37.TabOrder := 0;\r\n WebSpeedButton37.Visible := False;\r\n WebSpeedButton37.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton37, Self, 'OnClick', '_BlockCallPickForm');\r\n M4.SetParentComponent(B4);\r\n M4.Name := 'M4';\r\n M4.Left := 0;\r\n M4.Top := 56;\r\n M4.Width := 100;\r\n M4.Height := 24;\r\n M4.Align := alBottom;\r\n M4.BorderStyle := bsNone;\r\n M4.ElementClassName := 'block_memo';\r\n M4.ElementFont := efCSS;\r\n M4.Font.Charset := ANSI_CHARSET;\r\n M4.Font.Color := clBlack;\r\n M4.Font.Height := -13;\r\n M4.Font.Name := 'Tahoma';\r\n M4.Font.Style := [];\r\n M4.HeightPercent := 100.000000000000000000;\r\n M4.ParentFont := False;\r\n M4.SelLength := 0;\r\n M4.SelStart := 0;\r\n M4.ShowFocus := False;\r\n M4.WidthPercent := 100.000000000000000000;\r\n SetEvent(M4, Self, 'OnChange', 'M1Change');\r\n SetEvent(M4, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M4, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M4, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M4, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer4.SetParentComponent(B4);\r\n WebHTMLContainer4.Name := 'WebHTMLContainer4';\r\n WebHTMLContainer4.Left := 0;\r\n WebHTMLContainer4.Top := 41;\r\n WebHTMLContainer4.Width := 100;\r\n WebHTMLContainer4.Height := 15;\r\n WebHTMLContainer4.HeightStyle := ssAuto;\r\n WebHTMLContainer4.Align := alBottom;\r\n WebHTMLContainer4.ChildOrder := 2;\r\n WebHTMLContainer4.Visible := False;\r\n SetEvent(WebHTMLContainer4, Self, 'OnClick', 'WebHTMLContainer2Click');\r\n SetEvent(WebHTMLContainer4, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer4, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer4, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B6.SetParentComponent(SubForm_DIV);\r\n B6.Name := 'B6';\r\n B6.Left := 58;\r\n B6.Top := 79;\r\n B6.Width := 100;\r\n B6.Height := 80;\r\n B6.ElementClassName := 'data_block';\r\n B6.BorderColor := clWhite;\r\n B6.ChildOrder := 6;\r\n B6.Color := clWhite;\r\n B6.ElementFont := efCSS;\r\n B6.Font.Charset := ANSI_CHARSET;\r\n B6.Font.Color := clBlack;\r\n B6.Font.Height := -13;\r\n B6.Font.Name := 'Tahoma';\r\n B6.Font.Style := [];\r\n B6.ParentFont := False;\r\n B6.TabOrder := 5;\r\n SetEvent(B6, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B6, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel80.SetParentComponent(B6);\r\n WebPanel80.Name := 'WebPanel80';\r\n WebPanel80.Left := 0;\r\n WebPanel80.Top := 0;\r\n WebPanel80.Width := 100;\r\n WebPanel80.Height := 28;\r\n WebPanel80.ElementClassName := 'block_top';\r\n WebPanel80.HeightStyle := ssAuto;\r\n WebPanel80.Align := alTop;\r\n WebPanel80.BorderStyle := bsNone;\r\n WebPanel80.ChildOrder := 2;\r\n WebPanel80.Color := clWhite;\r\n WebPanel80.DragMode := dmAutomatic;\r\n WebPanel80.ElementFont := efCSS;\r\n WebPanel80.TabOrder := 0;\r\n SetEvent(WebPanel80, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel80, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel80, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel80, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel41.SetParentComponent(WebPanel80);\r\n WebLabel41.Name := 'WebLabel41';\r\n WebLabel41.Left := 24;\r\n WebLabel41.Top := 0;\r\n WebLabel41.Width := 11;\r\n WebLabel41.Height := 26;\r\n WebLabel41.Align := alLeft;\r\n WebLabel41.Caption := '6';\r\n WebLabel41.DragMode := dmAutomatic;\r\n WebLabel41.ElementClassName := 'block_title';\r\n WebLabel41.ElementFont := efCSS;\r\n WebLabel41.Font.Charset := ANSI_CHARSET;\r\n WebLabel41.Font.Color := clNavy;\r\n WebLabel41.Font.Height := -19;\r\n WebLabel41.Font.Name := 'Segoe UI Emoji';\r\n WebLabel41.Font.Style := [fsBold];\r\n WebLabel41.HeightPercent := 100.000000000000000000;\r\n WebLabel41.ParentFont := False;\r\n WebLabel41.WidthStyle := ssAuto;\r\n WebLabel41.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel41, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel41, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel41, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel41, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton38.SetParentComponent(WebPanel80);\r\n WebSpeedButton38.Name := 'WebSpeedButton38';\r\n WebSpeedButton38.Left := 0;\r\n WebSpeedButton38.Top := 0;\r\n WebSpeedButton38.Width := 24;\r\n WebSpeedButton38.Height := 28;\r\n WebSpeedButton38.Cursor := crHandPoint;\r\n WebSpeedButton38.Hint := 'Edit';\r\n WebSpeedButton38.Align := alLeft;\r\n WebSpeedButton38.Color := clNone;\r\n WebSpeedButton38.Flat := True;\r\n WebSpeedButton38.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton38.Font.Color := clBlack;\r\n WebSpeedButton38.Font.Height := -13;\r\n WebSpeedButton38.Font.Name := 'Tahoma';\r\n WebSpeedButton38.Font.Style := [];\r\n WebSpeedButton38.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton38.MaterialGlyph := 'edit';\r\n WebSpeedButton38.ParentFont := False;\r\n WebSpeedButton38.ShowHint := True;\r\n WebSpeedButton38.TabOrder := 0;\r\n WebSpeedButton38.Visible := False;\r\n WebSpeedButton38.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton38, Self, 'OnClick', '_BlockCallPickForm');\r\n M6.SetParentComponent(B6);\r\n M6.Name := 'M6';\r\n M6.Left := 0;\r\n M6.Top := 56;\r\n M6.Width := 100;\r\n M6.Height := 24;\r\n M6.Align := alBottom;\r\n M6.BorderStyle := bsNone;\r\n M6.ElementClassName := 'block_memo';\r\n M6.ElementFont := efCSS;\r\n M6.Font.Charset := ANSI_CHARSET;\r\n M6.Font.Color := clBlack;\r\n M6.Font.Height := -13;\r\n M6.Font.Name := 'Tahoma';\r\n M6.Font.Style := [];\r\n M6.HeightPercent := 100.000000000000000000;\r\n M6.ParentFont := False;\r\n M6.SelLength := 0;\r\n M6.SelStart := 0;\r\n M6.ShowFocus := False;\r\n M6.WidthPercent := 100.000000000000000000;\r\n SetEvent(M6, Self, 'OnChange', 'M1Change');\r\n SetEvent(M6, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M6, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M6, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M6, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer6.SetParentComponent(B6);\r\n WebHTMLContainer6.Name := 'WebHTMLContainer6';\r\n WebHTMLContainer6.Left := 0;\r\n WebHTMLContainer6.Top := 41;\r\n WebHTMLContainer6.Width := 100;\r\n WebHTMLContainer6.Height := 15;\r\n WebHTMLContainer6.HeightStyle := ssAuto;\r\n WebHTMLContainer6.Align := alBottom;\r\n WebHTMLContainer6.ChildOrder := 2;\r\n WebHTMLContainer6.Visible := False;\r\n SetEvent(WebHTMLContainer6, Self, 'OnClick', 'WebHTMLContainer2Click');\r\n SetEvent(WebHTMLContainer6, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer6, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer6, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B7.SetParentComponent(SubForm_DIV);\r\n B7.Name := 'B7';\r\n B7.Left := 178;\r\n B7.Top := 79;\r\n B7.Width := 100;\r\n B7.Height := 80;\r\n B7.ElementClassName := 'data_block';\r\n B7.BorderColor := clWhite;\r\n B7.ChildOrder := 7;\r\n B7.Color := clWhite;\r\n B7.ElementFont := efCSS;\r\n B7.Font.Charset := ANSI_CHARSET;\r\n B7.Font.Color := clBlack;\r\n B7.Font.Height := -13;\r\n B7.Font.Name := 'Tahoma';\r\n B7.Font.Style := [];\r\n B7.ParentFont := False;\r\n B7.TabOrder := 6;\r\n SetEvent(B7, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B7, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel82.SetParentComponent(B7);\r\n WebPanel82.Name := 'WebPanel82';\r\n WebPanel82.Left := 0;\r\n WebPanel82.Top := 0;\r\n WebPanel82.Width := 100;\r\n WebPanel82.Height := 28;\r\n WebPanel82.ElementClassName := 'block_top';\r\n WebPanel82.HeightStyle := ssAuto;\r\n WebPanel82.Align := alTop;\r\n WebPanel82.BorderStyle := bsNone;\r\n WebPanel82.ChildOrder := 2;\r\n WebPanel82.Color := clWhite;\r\n WebPanel82.DragMode := dmAutomatic;\r\n WebPanel82.ElementFont := efCSS;\r\n WebPanel82.TabOrder := 0;\r\n SetEvent(WebPanel82, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel82, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel82, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel82, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel42.SetParentComponent(WebPanel82);\r\n WebLabel42.Name := 'WebLabel42';\r\n WebLabel42.Left := 24;\r\n WebLabel42.Top := 0;\r\n WebLabel42.Width := 11;\r\n WebLabel42.Height := 26;\r\n WebLabel42.Hint := 'Setting Unit';\r\n WebLabel42.Align := alLeft;\r\n WebLabel42.Caption := '7';\r\n WebLabel42.DragMode := dmAutomatic;\r\n WebLabel42.ElementClassName := 'block_title';\r\n WebLabel42.ElementFont := efCSS;\r\n WebLabel42.Font.Charset := ANSI_CHARSET;\r\n WebLabel42.Font.Color := clNavy;\r\n WebLabel42.Font.Height := -19;\r\n WebLabel42.Font.Name := 'Segoe UI Emoji';\r\n WebLabel42.Font.Style := [fsBold];\r\n WebLabel42.HeightPercent := 100.000000000000000000;\r\n WebLabel42.ParentFont := False;\r\n WebLabel42.WidthStyle := ssAuto;\r\n WebLabel42.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel42, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel42, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel42, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel42, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton39.SetParentComponent(WebPanel82);\r\n WebSpeedButton39.Name := 'WebSpeedButton39';\r\n WebSpeedButton39.Left := 0;\r\n WebSpeedButton39.Top := 0;\r\n WebSpeedButton39.Width := 24;\r\n WebSpeedButton39.Height := 28;\r\n WebSpeedButton39.Cursor := crHandPoint;\r\n WebSpeedButton39.Hint := 'Edit';\r\n WebSpeedButton39.Align := alLeft;\r\n WebSpeedButton39.Color := clNone;\r\n WebSpeedButton39.Flat := True;\r\n WebSpeedButton39.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton39.Font.Color := clBlack;\r\n WebSpeedButton39.Font.Height := -13;\r\n WebSpeedButton39.Font.Name := 'Tahoma';\r\n WebSpeedButton39.Font.Style := [];\r\n WebSpeedButton39.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton39.MaterialGlyph := 'edit';\r\n WebSpeedButton39.ParentFont := False;\r\n WebSpeedButton39.ShowHint := True;\r\n WebSpeedButton39.TabOrder := 0;\r\n WebSpeedButton39.Visible := False;\r\n WebSpeedButton39.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton39, Self, 'OnClick', '_BlockCallPickForm');\r\n M7.SetParentComponent(B7);\r\n M7.Name := 'M7';\r\n M7.Left := 0;\r\n M7.Top := 56;\r\n M7.Width := 100;\r\n M7.Height := 24;\r\n M7.Align := alBottom;\r\n M7.BorderStyle := bsNone;\r\n M7.ElementClassName := 'block_memo';\r\n M7.ElementFont := efCSS;\r\n M7.Font.Charset := ANSI_CHARSET;\r\n M7.Font.Color := clBlack;\r\n M7.Font.Height := -13;\r\n M7.Font.Name := 'Tahoma';\r\n M7.Font.Style := [];\r\n M7.HeightPercent := 100.000000000000000000;\r\n M7.ParentFont := False;\r\n M7.SelLength := 0;\r\n M7.SelStart := 0;\r\n M7.ShowFocus := False;\r\n M7.WidthPercent := 100.000000000000000000;\r\n SetEvent(M7, Self, 'OnChange', 'M1Change');\r\n SetEvent(M7, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M7, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M7, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M7, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer7.SetParentComponent(B7);\r\n WebHTMLContainer7.Name := 'WebHTMLContainer7';\r\n WebHTMLContainer7.Left := 0;\r\n WebHTMLContainer7.Top := 41;\r\n WebHTMLContainer7.Width := 100;\r\n WebHTMLContainer7.Height := 15;\r\n WebHTMLContainer7.HeightStyle := ssAuto;\r\n WebHTMLContainer7.Align := alBottom;\r\n WebHTMLContainer7.ChildOrder := 2;\r\n WebHTMLContainer7.Visible := False;\r\n SetEvent(WebHTMLContainer7, Self, 'OnClick', 'WebHTMLContainer2Click');\r\n SetEvent(WebHTMLContainer7, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer7, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer7, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B8.SetParentComponent(SubForm_DIV);\r\n B8.Name := 'B8';\r\n B8.Left := 299;\r\n B8.Top := 78;\r\n B8.Width := 100;\r\n B8.Height := 80;\r\n B8.Hint := 'DIS_COMMENTS';\r\n B8.ElementClassName := 'data_block';\r\n B8.BorderColor := clWhite;\r\n B8.ChildOrder := 8;\r\n B8.Color := clWhite;\r\n B8.ElementFont := efCSS;\r\n B8.Font.Charset := ANSI_CHARSET;\r\n B8.Font.Color := clBlack;\r\n B8.Font.Height := -13;\r\n B8.Font.Name := 'Tahoma';\r\n B8.Font.Style := [];\r\n B8.ParentFont := False;\r\n B8.TabOrder := 7;\r\n SetEvent(B8, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B8, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel86.SetParentComponent(B8);\r\n WebPanel86.Name := 'WebPanel86';\r\n WebPanel86.Left := 0;\r\n WebPanel86.Top := 0;\r\n WebPanel86.Width := 100;\r\n WebPanel86.Height := 28;\r\n WebPanel86.ElementClassName := 'block_top';\r\n WebPanel86.HeightStyle := ssAuto;\r\n WebPanel86.Align := alTop;\r\n WebPanel86.BorderStyle := bsNone;\r\n WebPanel86.ChildOrder := 2;\r\n WebPanel86.Color := clWhite;\r\n WebPanel86.DragMode := dmAutomatic;\r\n WebPanel86.ElementFont := efCSS;\r\n WebPanel86.TabOrder := 0;\r\n SetEvent(WebPanel86, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel86, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel86, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel86, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel43.SetParentComponent(WebPanel86);\r\n WebLabel43.Name := 'WebLabel43';\r\n WebLabel43.Left := 24;\r\n WebLabel43.Top := 0;\r\n WebLabel43.Width := 11;\r\n WebLabel43.Height := 26;\r\n WebLabel43.Hint := 'Ground Pad Location';\r\n WebLabel43.Align := alLeft;\r\n WebLabel43.Caption := '8';\r\n WebLabel43.DragMode := dmAutomatic;\r\n WebLabel43.ElementClassName := 'block_title';\r\n WebLabel43.ElementFont := efCSS;\r\n WebLabel43.Font.Charset := ANSI_CHARSET;\r\n WebLabel43.Font.Color := clNavy;\r\n WebLabel43.Font.Height := -19;\r\n WebLabel43.Font.Name := 'Segoe UI Emoji';\r\n WebLabel43.Font.Style := [fsBold];\r\n WebLabel43.HeightPercent := 100.000000000000000000;\r\n WebLabel43.ParentFont := False;\r\n WebLabel43.WidthStyle := ssAuto;\r\n WebLabel43.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel43, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel43, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel43, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel43, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton40.SetParentComponent(WebPanel86);\r\n WebSpeedButton40.Name := 'WebSpeedButton40';\r\n WebSpeedButton40.Left := 0;\r\n WebSpeedButton40.Top := 0;\r\n WebSpeedButton40.Width := 24;\r\n WebSpeedButton40.Height := 28;\r\n WebSpeedButton40.Cursor := crHandPoint;\r\n WebSpeedButton40.Hint := 'Edit';\r\n WebSpeedButton40.Align := alLeft;\r\n WebSpeedButton40.Color := clNone;\r\n WebSpeedButton40.Flat := True;\r\n WebSpeedButton40.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton40.Font.Color := clBlack;\r\n WebSpeedButton40.Font.Height := -13;\r\n WebSpeedButton40.Font.Name := 'Tahoma';\r\n WebSpeedButton40.Font.Style := [];\r\n WebSpeedButton40.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton40.MaterialGlyph := 'edit';\r\n WebSpeedButton40.ParentFont := False;\r\n WebSpeedButton40.ShowHint := True;\r\n WebSpeedButton40.TabOrder := 0;\r\n WebSpeedButton40.Visible := False;\r\n WebSpeedButton40.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton40, Self, 'OnClick', '_BlockCallPickForm');\r\n M8.SetParentComponent(B8);\r\n M8.Name := 'M8';\r\n M8.Left := 0;\r\n M8.Top := 56;\r\n M8.Width := 100;\r\n M8.Height := 24;\r\n M8.Align := alBottom;\r\n M8.BorderStyle := bsNone;\r\n M8.ElementClassName := 'block_memo';\r\n M8.ElementFont := efCSS;\r\n M8.Font.Charset := ANSI_CHARSET;\r\n M8.Font.Color := clBlack;\r\n M8.Font.Height := -13;\r\n M8.Font.Name := 'Tahoma';\r\n M8.Font.Style := [];\r\n M8.HeightPercent := 100.000000000000000000;\r\n M8.ParentFont := False;\r\n M8.SelLength := 0;\r\n M8.SelStart := 0;\r\n M8.ShowFocus := False;\r\n M8.WidthPercent := 100.000000000000000000;\r\n SetEvent(M8, Self, 'OnChange', 'M1Change');\r\n SetEvent(M8, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M8, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M8, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M8, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer8.SetParentComponent(B8);\r\n WebHTMLContainer8.Name := 'WebHTMLContainer8';\r\n WebHTMLContainer8.Left := 0;\r\n WebHTMLContainer8.Top := 41;\r\n WebHTMLContainer8.Width := 100;\r\n WebHTMLContainer8.Height := 15;\r\n WebHTMLContainer8.HeightStyle := ssAuto;\r\n WebHTMLContainer8.Align := alBottom;\r\n WebHTMLContainer8.ChildOrder := 2;\r\n WebHTMLContainer8.Visible := False;\r\n SetEvent(WebHTMLContainer8, Self, 'OnClick', 'WebHTMLContainer2Click');\r\n SetEvent(WebHTMLContainer8, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer8, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer8, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B9.SetParentComponent(SubForm_DIV);\r\n B9.Name := 'B9';\r\n B9.Left := 419;\r\n B9.Top := 79;\r\n B9.Width := 100;\r\n B9.Height := 80;\r\n B9.ElementClassName := 'data_block';\r\n B9.BorderColor := clWhite;\r\n B9.ChildOrder := 9;\r\n B9.Color := clWhite;\r\n B9.ElementFont := efCSS;\r\n B9.Font.Charset := ANSI_CHARSET;\r\n B9.Font.Color := clBlack;\r\n B9.Font.Height := -13;\r\n B9.Font.Name := 'Tahoma';\r\n B9.Font.Style := [];\r\n B9.ParentFont := False;\r\n B9.TabOrder := 8;\r\n SetEvent(B9, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B9, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel88.SetParentComponent(B9);\r\n WebPanel88.Name := 'WebPanel88';\r\n WebPanel88.Left := 0;\r\n WebPanel88.Top := 0;\r\n WebPanel88.Width := 100;\r\n WebPanel88.Height := 28;\r\n WebPanel88.ElementClassName := 'block_top';\r\n WebPanel88.HeightStyle := ssAuto;\r\n WebPanel88.Align := alTop;\r\n WebPanel88.BorderStyle := bsNone;\r\n WebPanel88.ChildOrder := 2;\r\n WebPanel88.Color := clWhite;\r\n WebPanel88.DragMode := dmAutomatic;\r\n WebPanel88.ElementFont := efCSS;\r\n WebPanel88.TabOrder := 0;\r\n SetEvent(WebPanel88, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel88, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel88, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel88, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel44.SetParentComponent(WebPanel88);\r\n WebLabel44.Name := 'WebLabel44';\r\n WebLabel44.Left := 24;\r\n WebLabel44.Top := 0;\r\n WebLabel44.Width := 11;\r\n WebLabel44.Height := 26;\r\n WebLabel44.Hint := 'Setting Unit';\r\n WebLabel44.Align := alLeft;\r\n WebLabel44.Caption := '9';\r\n WebLabel44.DragMode := dmAutomatic;\r\n WebLabel44.ElementClassName := 'block_title';\r\n WebLabel44.ElementFont := efCSS;\r\n WebLabel44.Font.Charset := ANSI_CHARSET;\r\n WebLabel44.Font.Color := clNavy;\r\n WebLabel44.Font.Height := -19;\r\n WebLabel44.Font.Name := 'Segoe UI Emoji';\r\n WebLabel44.Font.Style := [fsBold];\r\n WebLabel44.HeightPercent := 100.000000000000000000;\r\n WebLabel44.ParentFont := False;\r\n WebLabel44.WidthStyle := ssAuto;\r\n WebLabel44.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel44, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel44, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel44, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel44, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton41.SetParentComponent(WebPanel88);\r\n WebSpeedButton41.Name := 'WebSpeedButton41';\r\n WebSpeedButton41.Left := 0;\r\n WebSpeedButton41.Top := 0;\r\n WebSpeedButton41.Width := 24;\r\n WebSpeedButton41.Height := 28;\r\n WebSpeedButton41.Cursor := crHandPoint;\r\n WebSpeedButton41.Hint := 'Edit';\r\n WebSpeedButton41.Align := alLeft;\r\n WebSpeedButton41.Color := clNone;\r\n WebSpeedButton41.Flat := True;\r\n WebSpeedButton41.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton41.Font.Color := clBlack;\r\n WebSpeedButton41.Font.Height := -13;\r\n WebSpeedButton41.Font.Name := 'Tahoma';\r\n WebSpeedButton41.Font.Style := [];\r\n WebSpeedButton41.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton41.MaterialGlyph := 'edit';\r\n WebSpeedButton41.ParentFont := False;\r\n WebSpeedButton41.ShowHint := True;\r\n WebSpeedButton41.TabOrder := 0;\r\n WebSpeedButton41.Visible := False;\r\n WebSpeedButton41.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton41, Self, 'OnClick', '_BlockCallPickForm');\r\n M9.SetParentComponent(B9);\r\n M9.Name := 'M9';\r\n M9.Left := 0;\r\n M9.Top := 56;\r\n M9.Width := 100;\r\n M9.Height := 24;\r\n M9.Align := alBottom;\r\n M9.BorderStyle := bsNone;\r\n M9.ElementClassName := 'block_memo';\r\n M9.ElementFont := efCSS;\r\n M9.Font.Charset := ANSI_CHARSET;\r\n M9.Font.Color := clBlack;\r\n M9.Font.Height := -13;\r\n M9.Font.Name := 'Tahoma';\r\n M9.Font.Style := [];\r\n M9.HeightPercent := 100.000000000000000000;\r\n M9.ParentFont := False;\r\n M9.SelLength := 0;\r\n M9.SelStart := 0;\r\n M9.ShowFocus := False;\r\n M9.WidthPercent := 100.000000000000000000;\r\n SetEvent(M9, Self, 'OnChange', 'M1Change');\r\n SetEvent(M9, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M9, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M9, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M9, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer9.SetParentComponent(B9);\r\n WebHTMLContainer9.Name := 'WebHTMLContainer9';\r\n WebHTMLContainer9.Left := 0;\r\n WebHTMLContainer9.Top := 41;\r\n WebHTMLContainer9.Width := 100;\r\n WebHTMLContainer9.Height := 15;\r\n WebHTMLContainer9.HeightStyle := ssAuto;\r\n WebHTMLContainer9.Align := alBottom;\r\n WebHTMLContainer9.ChildOrder := 2;\r\n WebHTMLContainer9.Visible := False;\r\n SetEvent(WebHTMLContainer9, Self, 'OnClick', 'WebHTMLContainer2Click');\r\n SetEvent(WebHTMLContainer9, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer9, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer9, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B10.SetParentComponent(SubForm_DIV);\r\n B10.Name := 'B10';\r\n B10.Left := 540;\r\n B10.Top := 78;\r\n B10.Width := 100;\r\n B10.Height := 80;\r\n B10.ElementClassName := 'data_block';\r\n B10.BorderColor := clWhite;\r\n B10.ChildOrder := 10;\r\n B10.Color := clWhite;\r\n B10.ElementFont := efCSS;\r\n B10.Font.Charset := ANSI_CHARSET;\r\n B10.Font.Color := clBlack;\r\n B10.Font.Height := -13;\r\n B10.Font.Name := 'Tahoma';\r\n B10.Font.Style := [];\r\n B10.ParentFont := False;\r\n B10.TabOrder := 9;\r\n SetEvent(B10, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B10, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel91.SetParentComponent(B10);\r\n WebPanel91.Name := 'WebPanel91';\r\n WebPanel91.Left := 0;\r\n WebPanel91.Top := 0;\r\n WebPanel91.Width := 100;\r\n WebPanel91.Height := 28;\r\n WebPanel91.ElementClassName := 'block_top';\r\n WebPanel91.HeightStyle := ssAuto;\r\n WebPanel91.Align := alTop;\r\n WebPanel91.BorderStyle := bsNone;\r\n WebPanel91.ChildOrder := 2;\r\n WebPanel91.Color := clWhite;\r\n WebPanel91.DragMode := dmAutomatic;\r\n WebPanel91.ElementFont := efCSS;\r\n WebPanel91.TabOrder := 0;\r\n SetEvent(WebPanel91, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel91, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel91, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel91, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel45.SetParentComponent(WebPanel91);\r\n WebLabel45.Name := 'WebLabel45';\r\n WebLabel45.Left := 24;\r\n WebLabel45.Top := 0;\r\n WebLabel45.Width := 22;\r\n WebLabel45.Height := 26;\r\n WebLabel45.Hint := 'Setting Unit';\r\n WebLabel45.Align := alLeft;\r\n WebLabel45.Caption := '10';\r\n WebLabel45.DragMode := dmAutomatic;\r\n WebLabel45.ElementClassName := 'block_title';\r\n WebLabel45.ElementFont := efCSS;\r\n WebLabel45.Font.Charset := ANSI_CHARSET;\r\n WebLabel45.Font.Color := clNavy;\r\n WebLabel45.Font.Height := -19;\r\n WebLabel45.Font.Name := 'Segoe UI Emoji';\r\n WebLabel45.Font.Style := [fsBold];\r\n WebLabel45.HeightPercent := 100.000000000000000000;\r\n WebLabel45.ParentFont := False;\r\n WebLabel45.WidthStyle := ssAuto;\r\n WebLabel45.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel45, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel45, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel45, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel45, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton42.SetParentComponent(WebPanel91);\r\n WebSpeedButton42.Name := 'WebSpeedButton42';\r\n WebSpeedButton42.Left := 0;\r\n WebSpeedButton42.Top := 0;\r\n WebSpeedButton42.Width := 24;\r\n WebSpeedButton42.Height := 28;\r\n WebSpeedButton42.Cursor := crHandPoint;\r\n WebSpeedButton42.Hint := 'Edit';\r\n WebSpeedButton42.Align := alLeft;\r\n WebSpeedButton42.Color := clNone;\r\n WebSpeedButton42.Flat := True;\r\n WebSpeedButton42.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton42.Font.Color := clBlack;\r\n WebSpeedButton42.Font.Height := -13;\r\n WebSpeedButton42.Font.Name := 'Tahoma';\r\n WebSpeedButton42.Font.Style := [];\r\n WebSpeedButton42.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton42.MaterialGlyph := 'edit';\r\n WebSpeedButton42.ParentFont := False;\r\n WebSpeedButton42.ShowHint := True;\r\n WebSpeedButton42.TabOrder := 0;\r\n WebSpeedButton42.Visible := False;\r\n WebSpeedButton42.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton42, Self, 'OnClick', '_BlockCallPickForm');\r\n M10.SetParentComponent(B10);\r\n M10.Name := 'M10';\r\n M10.Left := 0;\r\n M10.Top := 56;\r\n M10.Width := 100;\r\n M10.Height := 24;\r\n M10.Align := alBottom;\r\n M10.BorderStyle := bsNone;\r\n M10.ElementClassName := 'block_memo';\r\n M10.ElementFont := efCSS;\r\n M10.Font.Charset := ANSI_CHARSET;\r\n M10.Font.Color := clBlack;\r\n M10.Font.Height := -13;\r\n M10.Font.Name := 'Tahoma';\r\n M10.Font.Style := [];\r\n M10.HeightPercent := 100.000000000000000000;\r\n M10.ParentFont := False;\r\n M10.SelLength := 0;\r\n M10.SelStart := 0;\r\n M10.ShowFocus := False;\r\n M10.WidthPercent := 100.000000000000000000;\r\n SetEvent(M10, Self, 'OnChange', 'M1Change');\r\n SetEvent(M10, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M10, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M10, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M10, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer10.SetParentComponent(B10);\r\n WebHTMLContainer10.Name := 'WebHTMLContainer10';\r\n WebHTMLContainer10.Left := 0;\r\n WebHTMLContainer10.Top := 41;\r\n WebHTMLContainer10.Width := 100;\r\n WebHTMLContainer10.Height := 15;\r\n WebHTMLContainer10.HeightStyle := ssAuto;\r\n WebHTMLContainer10.Align := alBottom;\r\n WebHTMLContainer10.ChildOrder := 2;\r\n WebHTMLContainer10.Visible := False;\r\n SetEvent(WebHTMLContainer10, Self, 'OnClick', 'WebHTMLContainer2Click');\r\n SetEvent(WebHTMLContainer10, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer10, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer10, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B19.SetParentComponent(SubForm_DIV);\r\n B19.Name := 'B19';\r\n B19.Left := 419;\r\n B19.Top := 233;\r\n B19.Width := 100;\r\n B19.Height := 80;\r\n B19.ElementClassName := 'data_block';\r\n B19.BorderColor := clWhite;\r\n B19.ChildOrder := 19;\r\n B19.Color := clWhite;\r\n B19.ElementFont := efCSS;\r\n B19.Font.Charset := ANSI_CHARSET;\r\n B19.Font.Color := clBlack;\r\n B19.Font.Height := -13;\r\n B19.Font.Name := 'Tahoma';\r\n B19.Font.Style := [];\r\n B19.ParentFont := False;\r\n B19.TabOrder := 10;\r\n SetEvent(B19, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B19, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel93.SetParentComponent(B19);\r\n WebPanel93.Name := 'WebPanel93';\r\n WebPanel93.Left := 0;\r\n WebPanel93.Top := 0;\r\n WebPanel93.Width := 100;\r\n WebPanel93.Height := 28;\r\n WebPanel93.ElementClassName := 'block_top';\r\n WebPanel93.HeightStyle := ssAuto;\r\n WebPanel93.Align := alTop;\r\n WebPanel93.BorderStyle := bsNone;\r\n WebPanel93.ChildOrder := 2;\r\n WebPanel93.Color := clWhite;\r\n WebPanel93.DragMode := dmAutomatic;\r\n WebPanel93.ElementFont := efCSS;\r\n WebPanel93.TabOrder := 0;\r\n SetEvent(WebPanel93, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel93, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel93, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel93, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel46.SetParentComponent(WebPanel93);\r\n WebLabel46.Name := 'WebLabel46';\r\n WebLabel46.Left := 24;\r\n WebLabel46.Top := 0;\r\n WebLabel46.Width := 22;\r\n WebLabel46.Height := 26;\r\n WebLabel46.Hint := 'Setting Unit';\r\n WebLabel46.Align := alLeft;\r\n WebLabel46.Caption := '19';\r\n WebLabel46.DragMode := dmAutomatic;\r\n WebLabel46.ElementClassName := 'block_title';\r\n WebLabel46.ElementFont := efCSS;\r\n WebLabel46.Font.Charset := ANSI_CHARSET;\r\n WebLabel46.Font.Color := clNavy;\r\n WebLabel46.Font.Height := -19;\r\n WebLabel46.Font.Name := 'Segoe UI Emoji';\r\n WebLabel46.Font.Style := [fsBold];\r\n WebLabel46.HeightPercent := 100.000000000000000000;\r\n WebLabel46.ParentFont := False;\r\n WebLabel46.WidthStyle := ssAuto;\r\n WebLabel46.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel46, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel46, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel46, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel46, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton43.SetParentComponent(WebPanel93);\r\n WebSpeedButton43.Name := 'WebSpeedButton43';\r\n WebSpeedButton43.Left := 0;\r\n WebSpeedButton43.Top := 0;\r\n WebSpeedButton43.Width := 24;\r\n WebSpeedButton43.Height := 28;\r\n WebSpeedButton43.Cursor := crHandPoint;\r\n WebSpeedButton43.Hint := 'Edit';\r\n WebSpeedButton43.Align := alLeft;\r\n WebSpeedButton43.Color := clNone;\r\n WebSpeedButton43.Flat := True;\r\n WebSpeedButton43.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton43.Font.Color := clBlack;\r\n WebSpeedButton43.Font.Height := -13;\r\n WebSpeedButton43.Font.Name := 'Tahoma';\r\n WebSpeedButton43.Font.Style := [];\r\n WebSpeedButton43.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton43.MaterialGlyph := 'edit';\r\n WebSpeedButton43.ParentFont := False;\r\n WebSpeedButton43.ShowHint := True;\r\n WebSpeedButton43.TabOrder := 0;\r\n WebSpeedButton43.Visible := False;\r\n WebSpeedButton43.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton43, Self, 'OnClick', '_BlockCallPickForm');\r\n M19.SetParentComponent(B19);\r\n M19.Name := 'M19';\r\n M19.Left := 0;\r\n M19.Top := 56;\r\n M19.Width := 100;\r\n M19.Height := 24;\r\n M19.Align := alBottom;\r\n M19.BorderStyle := bsNone;\r\n M19.ElementClassName := 'block_memo';\r\n M19.ElementFont := efCSS;\r\n M19.Font.Charset := ANSI_CHARSET;\r\n M19.Font.Color := clBlack;\r\n M19.Font.Height := -13;\r\n M19.Font.Name := 'Tahoma';\r\n M19.Font.Style := [];\r\n M19.HeightPercent := 100.000000000000000000;\r\n M19.ParentFont := False;\r\n M19.SelLength := 0;\r\n M19.SelStart := 0;\r\n M19.ShowFocus := False;\r\n M19.WidthPercent := 100.000000000000000000;\r\n SetEvent(M19, Self, 'OnChange', 'M1Change');\r\n SetEvent(M19, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M19, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M19, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M19, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer19.SetParentComponent(B19);\r\n WebHTMLContainer19.Name := 'WebHTMLContainer19';\r\n WebHTMLContainer19.Left := 0;\r\n WebHTMLContainer19.Top := 41;\r\n WebHTMLContainer19.Width := 100;\r\n WebHTMLContainer19.Height := 15;\r\n WebHTMLContainer19.HeightStyle := ssAuto;\r\n WebHTMLContainer19.Align := alBottom;\r\n WebHTMLContainer19.ChildOrder := 2;\r\n WebHTMLContainer19.Visible := False;\r\n SetEvent(WebHTMLContainer19, Self, 'OnClick', 'WebHTMLContainer2Click');\r\n SetEvent(WebHTMLContainer19, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer19, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer19, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B20.SetParentComponent(SubForm_DIV);\r\n B20.Name := 'B20';\r\n B20.Left := 540;\r\n B20.Top := 233;\r\n B20.Width := 100;\r\n B20.Height := 80;\r\n B20.ElementClassName := 'data_block';\r\n B20.BorderColor := clWhite;\r\n B20.ChildOrder := 20;\r\n B20.Color := clWhite;\r\n B20.ElementFont := efCSS;\r\n B20.Font.Charset := ANSI_CHARSET;\r\n B20.Font.Color := clBlack;\r\n B20.Font.Height := -13;\r\n B20.Font.Name := 'Tahoma';\r\n B20.Font.Style := [];\r\n B20.ParentFont := False;\r\n B20.TabOrder := 11;\r\n SetEvent(B20, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B20, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel95.SetParentComponent(B20);\r\n WebPanel95.Name := 'WebPanel95';\r\n WebPanel95.Left := 0;\r\n WebPanel95.Top := 0;\r\n WebPanel95.Width := 100;\r\n WebPanel95.Height := 28;\r\n WebPanel95.ElementClassName := 'block_top';\r\n WebPanel95.HeightStyle := ssAuto;\r\n WebPanel95.Align := alTop;\r\n WebPanel95.BorderStyle := bsNone;\r\n WebPanel95.ChildOrder := 2;\r\n WebPanel95.Color := clWhite;\r\n WebPanel95.DragMode := dmAutomatic;\r\n WebPanel95.ElementFont := efCSS;\r\n WebPanel95.TabOrder := 0;\r\n SetEvent(WebPanel95, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel95, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel95, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel95, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel47.SetParentComponent(WebPanel95);\r\n WebLabel47.Name := 'WebLabel47';\r\n WebLabel47.Left := 24;\r\n WebLabel47.Top := 0;\r\n WebLabel47.Width := 22;\r\n WebLabel47.Height := 26;\r\n WebLabel47.Hint := 'Setting Unit';\r\n WebLabel47.Align := alLeft;\r\n WebLabel47.Caption := '20';\r\n WebLabel47.DragMode := dmAutomatic;\r\n WebLabel47.ElementClassName := 'block_title';\r\n WebLabel47.ElementFont := efCSS;\r\n WebLabel47.Font.Charset := ANSI_CHARSET;\r\n WebLabel47.Font.Color := clNavy;\r\n WebLabel47.Font.Height := -19;\r\n WebLabel47.Font.Name := 'Segoe UI Emoji';\r\n WebLabel47.Font.Style := [fsBold];\r\n WebLabel47.HeightPercent := 100.000000000000000000;\r\n WebLabel47.ParentFont := False;\r\n WebLabel47.WidthStyle := ssAuto;\r\n WebLabel47.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel47, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel47, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel47, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel47, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton44.SetParentComponent(WebPanel95);\r\n WebSpeedButton44.Name := 'WebSpeedButton44';\r\n WebSpeedButton44.Left := 0;\r\n WebSpeedButton44.Top := 0;\r\n WebSpeedButton44.Width := 24;\r\n WebSpeedButton44.Height := 28;\r\n WebSpeedButton44.Cursor := crHandPoint;\r\n WebSpeedButton44.Hint := 'Edit';\r\n WebSpeedButton44.Align := alLeft;\r\n WebSpeedButton44.Color := clNone;\r\n WebSpeedButton44.Flat := True;\r\n WebSpeedButton44.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton44.Font.Color := clBlack;\r\n WebSpeedButton44.Font.Height := -13;\r\n WebSpeedButton44.Font.Name := 'Tahoma';\r\n WebSpeedButton44.Font.Style := [];\r\n WebSpeedButton44.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton44.MaterialGlyph := 'edit';\r\n WebSpeedButton44.ParentFont := False;\r\n WebSpeedButton44.ShowHint := True;\r\n WebSpeedButton44.TabOrder := 0;\r\n WebSpeedButton44.Visible := False;\r\n WebSpeedButton44.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton44, Self, 'OnClick', '_BlockCallPickForm');\r\n M20.SetParentComponent(B20);\r\n M20.Name := 'M20';\r\n M20.Left := 0;\r\n M20.Top := 56;\r\n M20.Width := 100;\r\n M20.Height := 24;\r\n M20.Align := alBottom;\r\n M20.BorderStyle := bsNone;\r\n M20.ElementClassName := 'block_memo';\r\n M20.ElementFont := efCSS;\r\n M20.Font.Charset := ANSI_CHARSET;\r\n M20.Font.Color := clBlack;\r\n M20.Font.Height := -13;\r\n M20.Font.Name := 'Tahoma';\r\n M20.Font.Style := [];\r\n M20.HeightPercent := 100.000000000000000000;\r\n M20.ParentFont := False;\r\n M20.SelLength := 0;\r\n M20.SelStart := 0;\r\n M20.ShowFocus := False;\r\n M20.WidthPercent := 100.000000000000000000;\r\n SetEvent(M20, Self, 'OnChange', 'M1Change');\r\n SetEvent(M20, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M20, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M20, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M20, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer20.SetParentComponent(B20);\r\n WebHTMLContainer20.Name := 'WebHTMLContainer20';\r\n WebHTMLContainer20.Left := 0;\r\n WebHTMLContainer20.Top := 41;\r\n WebHTMLContainer20.Width := 100;\r\n WebHTMLContainer20.Height := 15;\r\n WebHTMLContainer20.HeightStyle := ssAuto;\r\n WebHTMLContainer20.Align := alBottom;\r\n WebHTMLContainer20.ChildOrder := 2;\r\n WebHTMLContainer20.Visible := False;\r\n SetEvent(WebHTMLContainer20, Self, 'OnClick', 'WebHTMLContainer2Click');\r\n SetEvent(WebHTMLContainer20, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer20, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer20, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B15.SetParentComponent(SubForm_DIV);\r\n B15.Name := 'B15';\r\n B15.Left := 540;\r\n B15.Top := 155;\r\n B15.Width := 100;\r\n B15.Height := 80;\r\n B15.ElementClassName := 'data_block';\r\n B15.BorderColor := clWhite;\r\n B15.ChildOrder := 15;\r\n B15.Color := clWhite;\r\n B15.ElementFont := efCSS;\r\n B15.Font.Charset := ANSI_CHARSET;\r\n B15.Font.Color := clBlack;\r\n B15.Font.Height := -13;\r\n B15.Font.Name := 'Tahoma';\r\n B15.Font.Style := [];\r\n B15.ParentFont := False;\r\n B15.TabOrder := 12;\r\n SetEvent(B15, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B15, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel97.SetParentComponent(B15);\r\n WebPanel97.Name := 'WebPanel97';\r\n WebPanel97.Left := 0;\r\n WebPanel97.Top := 0;\r\n WebPanel97.Width := 100;\r\n WebPanel97.Height := 28;\r\n WebPanel97.ElementClassName := 'block_top';\r\n WebPanel97.HeightStyle := ssAuto;\r\n WebPanel97.Align := alTop;\r\n WebPanel97.BorderStyle := bsNone;\r\n WebPanel97.ChildOrder := 2;\r\n WebPanel97.Color := clWhite;\r\n WebPanel97.DragMode := dmAutomatic;\r\n WebPanel97.ElementFont := efCSS;\r\n WebPanel97.TabOrder := 0;\r\n SetEvent(WebPanel97, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel97, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel97, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel97, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel48.SetParentComponent(WebPanel97);\r\n WebLabel48.Name := 'WebLabel48';\r\n WebLabel48.Left := 24;\r\n WebLabel48.Top := 0;\r\n WebLabel48.Width := 22;\r\n WebLabel48.Height := 26;\r\n WebLabel48.Hint := 'Setting Unit';\r\n WebLabel48.Align := alLeft;\r\n WebLabel48.Caption := '15';\r\n WebLabel48.DragMode := dmAutomatic;\r\n WebLabel48.ElementClassName := 'block_title';\r\n WebLabel48.ElementFont := efCSS;\r\n WebLabel48.Font.Charset := ANSI_CHARSET;\r\n WebLabel48.Font.Color := clNavy;\r\n WebLabel48.Font.Height := -19;\r\n WebLabel48.Font.Name := 'Segoe UI Emoji';\r\n WebLabel48.Font.Style := [fsBold];\r\n WebLabel48.HeightPercent := 100.000000000000000000;\r\n WebLabel48.ParentFont := False;\r\n WebLabel48.WidthStyle := ssAuto;\r\n WebLabel48.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel48, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel48, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel48, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel48, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton45.SetParentComponent(WebPanel97);\r\n WebSpeedButton45.Name := 'WebSpeedButton45';\r\n WebSpeedButton45.Left := 0;\r\n WebSpeedButton45.Top := 0;\r\n WebSpeedButton45.Width := 24;\r\n WebSpeedButton45.Height := 28;\r\n WebSpeedButton45.Cursor := crHandPoint;\r\n WebSpeedButton45.Hint := 'Edit';\r\n WebSpeedButton45.Align := alLeft;\r\n WebSpeedButton45.Color := clNone;\r\n WebSpeedButton45.Flat := True;\r\n WebSpeedButton45.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton45.Font.Color := clBlack;\r\n WebSpeedButton45.Font.Height := -13;\r\n WebSpeedButton45.Font.Name := 'Tahoma';\r\n WebSpeedButton45.Font.Style := [];\r\n WebSpeedButton45.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton45.MaterialGlyph := 'edit';\r\n WebSpeedButton45.ParentFont := False;\r\n WebSpeedButton45.ShowHint := True;\r\n WebSpeedButton45.TabOrder := 0;\r\n WebSpeedButton45.Visible := False;\r\n WebSpeedButton45.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton45, Self, 'OnClick', '_BlockCallPickForm');\r\n M15.SetParentComponent(B15);\r\n M15.Name := 'M15';\r\n M15.Left := 0;\r\n M15.Top := 56;\r\n M15.Width := 100;\r\n M15.Height := 24;\r\n M15.Align := alBottom;\r\n M15.BorderStyle := bsNone;\r\n M15.ElementClassName := 'block_memo';\r\n M15.ElementFont := efCSS;\r\n M15.Font.Charset := ANSI_CHARSET;\r\n M15.Font.Color := clBlack;\r\n M15.Font.Height := -13;\r\n M15.Font.Name := 'Tahoma';\r\n M15.Font.Style := [];\r\n M15.HeightPercent := 100.000000000000000000;\r\n M15.ParentFont := False;\r\n M15.SelLength := 0;\r\n M15.SelStart := 0;\r\n M15.ShowFocus := False;\r\n M15.WidthPercent := 100.000000000000000000;\r\n SetEvent(M15, Self, 'OnChange', 'M1Change');\r\n SetEvent(M15, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M15, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M15, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M15, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer15.SetParentComponent(B15);\r\n WebHTMLContainer15.Name := 'WebHTMLContainer15';\r\n WebHTMLContainer15.Left := 0;\r\n WebHTMLContainer15.Top := 41;\r\n WebHTMLContainer15.Width := 100;\r\n WebHTMLContainer15.Height := 15;\r\n WebHTMLContainer15.HeightStyle := ssAuto;\r\n WebHTMLContainer15.Align := alBottom;\r\n WebHTMLContainer15.ChildOrder := 2;\r\n WebHTMLContainer15.Visible := False;\r\n SetEvent(WebHTMLContainer15, Self, 'OnClick', 'WebHTMLContainer2Click');\r\n SetEvent(WebHTMLContainer15, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer15, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer15, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B14.SetParentComponent(SubForm_DIV);\r\n B14.Name := 'B14';\r\n B14.Left := 419;\r\n B14.Top := 156;\r\n B14.Width := 100;\r\n B14.Height := 80;\r\n B14.ElementClassName := 'data_block';\r\n B14.BorderColor := clWhite;\r\n B14.ChildOrder := 14;\r\n B14.Color := clWhite;\r\n B14.ElementFont := efCSS;\r\n B14.Font.Charset := ANSI_CHARSET;\r\n B14.Font.Color := clBlack;\r\n B14.Font.Height := -13;\r\n B14.Font.Name := 'Tahoma';\r\n B14.Font.Style := [];\r\n B14.ParentFont := False;\r\n B14.TabOrder := 13;\r\n SetEvent(B14, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B14, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel99.SetParentComponent(B14);\r\n WebPanel99.Name := 'WebPanel99';\r\n WebPanel99.Left := 0;\r\n WebPanel99.Top := 0;\r\n WebPanel99.Width := 100;\r\n WebPanel99.Height := 28;\r\n WebPanel99.ElementClassName := 'block_top';\r\n WebPanel99.HeightStyle := ssAuto;\r\n WebPanel99.Align := alTop;\r\n WebPanel99.BorderStyle := bsNone;\r\n WebPanel99.ChildOrder := 2;\r\n WebPanel99.Color := clWhite;\r\n WebPanel99.DragMode := dmAutomatic;\r\n WebPanel99.ElementFont := efCSS;\r\n WebPanel99.TabOrder := 0;\r\n SetEvent(WebPanel99, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel99, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel99, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel99, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel49.SetParentComponent(WebPanel99);\r\n WebLabel49.Name := 'WebLabel49';\r\n WebLabel49.Left := 24;\r\n WebLabel49.Top := 0;\r\n WebLabel49.Width := 22;\r\n WebLabel49.Height := 26;\r\n WebLabel49.Hint := 'Setting Unit';\r\n WebLabel49.Align := alLeft;\r\n WebLabel49.Caption := '14';\r\n WebLabel49.DragMode := dmAutomatic;\r\n WebLabel49.ElementClassName := 'block_title';\r\n WebLabel49.ElementFont := efCSS;\r\n WebLabel49.Font.Charset := ANSI_CHARSET;\r\n WebLabel49.Font.Color := clNavy;\r\n WebLabel49.Font.Height := -19;\r\n WebLabel49.Font.Name := 'Segoe UI Emoji';\r\n WebLabel49.Font.Style := [fsBold];\r\n WebLabel49.HeightPercent := 100.000000000000000000;\r\n WebLabel49.ParentFont := False;\r\n WebLabel49.WidthStyle := ssAuto;\r\n WebLabel49.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel49, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel49, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel49, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel49, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton46.SetParentComponent(WebPanel99);\r\n WebSpeedButton46.Name := 'WebSpeedButton46';\r\n WebSpeedButton46.Left := 0;\r\n WebSpeedButton46.Top := 0;\r\n WebSpeedButton46.Width := 24;\r\n WebSpeedButton46.Height := 28;\r\n WebSpeedButton46.Cursor := crHandPoint;\r\n WebSpeedButton46.Hint := 'Edit';\r\n WebSpeedButton46.Align := alLeft;\r\n WebSpeedButton46.Color := clNone;\r\n WebSpeedButton46.Flat := True;\r\n WebSpeedButton46.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton46.Font.Color := clBlack;\r\n WebSpeedButton46.Font.Height := -13;\r\n WebSpeedButton46.Font.Name := 'Tahoma';\r\n WebSpeedButton46.Font.Style := [];\r\n WebSpeedButton46.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton46.MaterialGlyph := 'edit';\r\n WebSpeedButton46.ParentFont := False;\r\n WebSpeedButton46.ShowHint := True;\r\n WebSpeedButton46.TabOrder := 0;\r\n WebSpeedButton46.Visible := False;\r\n WebSpeedButton46.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton46, Self, 'OnClick', '_BlockCallPickForm');\r\n M14.SetParentComponent(B14);\r\n M14.Name := 'M14';\r\n M14.Left := 0;\r\n M14.Top := 56;\r\n M14.Width := 100;\r\n M14.Height := 24;\r\n M14.Align := alBottom;\r\n M14.BorderStyle := bsNone;\r\n M14.ElementClassName := 'block_memo';\r\n M14.ElementFont := efCSS;\r\n M14.Font.Charset := ANSI_CHARSET;\r\n M14.Font.Color := clBlack;\r\n M14.Font.Height := -13;\r\n M14.Font.Name := 'Tahoma';\r\n M14.Font.Style := [];\r\n M14.HeightPercent := 100.000000000000000000;\r\n M14.ParentFont := False;\r\n M14.SelLength := 0;\r\n M14.SelStart := 0;\r\n M14.ShowFocus := False;\r\n M14.WidthPercent := 100.000000000000000000;\r\n SetEvent(M14, Self, 'OnChange', 'M1Change');\r\n SetEvent(M14, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M14, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M14, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M14, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer14.SetParentComponent(B14);\r\n WebHTMLContainer14.Name := 'WebHTMLContainer14';\r\n WebHTMLContainer14.Left := 0;\r\n WebHTMLContainer14.Top := 41;\r\n WebHTMLContainer14.Width := 100;\r\n WebHTMLContainer14.Height := 15;\r\n WebHTMLContainer14.HeightStyle := ssAuto;\r\n WebHTMLContainer14.Align := alBottom;\r\n WebHTMLContainer14.ChildOrder := 2;\r\n WebHTMLContainer14.Visible := False;\r\n SetEvent(WebHTMLContainer14, Self, 'OnClick', 'WebHTMLContainer2Click');\r\n SetEvent(WebHTMLContainer14, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer14, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer14, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B13.SetParentComponent(SubForm_DIV);\r\n B13.Name := 'B13';\r\n B13.Left := 299;\r\n B13.Top := 155;\r\n B13.Width := 100;\r\n B13.Height := 80;\r\n B13.ElementClassName := 'data_block';\r\n B13.BorderColor := clWhite;\r\n B13.ChildOrder := 13;\r\n B13.Color := clWhite;\r\n B13.ElementFont := efCSS;\r\n B13.Font.Charset := ANSI_CHARSET;\r\n B13.Font.Color := clBlack;\r\n B13.Font.Height := -13;\r\n B13.Font.Name := 'Tahoma';\r\n B13.Font.Style := [];\r\n B13.ParentFont := False;\r\n B13.TabOrder := 14;\r\n SetEvent(B13, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B13, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel101.SetParentComponent(B13);\r\n WebPanel101.Name := 'WebPanel101';\r\n WebPanel101.Left := 0;\r\n WebPanel101.Top := 0;\r\n WebPanel101.Width := 100;\r\n WebPanel101.Height := 28;\r\n WebPanel101.ElementClassName := 'block_top';\r\n WebPanel101.HeightStyle := ssAuto;\r\n WebPanel101.Align := alTop;\r\n WebPanel101.BorderStyle := bsNone;\r\n WebPanel101.ChildOrder := 2;\r\n WebPanel101.Color := clWhite;\r\n WebPanel101.DragMode := dmAutomatic;\r\n WebPanel101.ElementFont := efCSS;\r\n WebPanel101.TabOrder := 0;\r\n SetEvent(WebPanel101, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel101, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel101, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel101, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel50.SetParentComponent(WebPanel101);\r\n WebLabel50.Name := 'WebLabel50';\r\n WebLabel50.Left := 24;\r\n WebLabel50.Top := 0;\r\n WebLabel50.Width := 22;\r\n WebLabel50.Height := 26;\r\n WebLabel50.Hint := 'Setting Unit';\r\n WebLabel50.Align := alLeft;\r\n WebLabel50.Caption := '13';\r\n WebLabel50.DragMode := dmAutomatic;\r\n WebLabel50.ElementClassName := 'block_title';\r\n WebLabel50.ElementFont := efCSS;\r\n WebLabel50.Font.Charset := ANSI_CHARSET;\r\n WebLabel50.Font.Color := clNavy;\r\n WebLabel50.Font.Height := -19;\r\n WebLabel50.Font.Name := 'Segoe UI Emoji';\r\n WebLabel50.Font.Style := [fsBold];\r\n WebLabel50.HeightPercent := 100.000000000000000000;\r\n WebLabel50.ParentFont := False;\r\n WebLabel50.WidthStyle := ssAuto;\r\n WebLabel50.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel50, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel50, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel50, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel50, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton47.SetParentComponent(WebPanel101);\r\n WebSpeedButton47.Name := 'WebSpeedButton47';\r\n WebSpeedButton47.Left := 0;\r\n WebSpeedButton47.Top := 0;\r\n WebSpeedButton47.Width := 24;\r\n WebSpeedButton47.Height := 28;\r\n WebSpeedButton47.Cursor := crHandPoint;\r\n WebSpeedButton47.Hint := 'Edit';\r\n WebSpeedButton47.Align := alLeft;\r\n WebSpeedButton47.Color := clNone;\r\n WebSpeedButton47.Flat := True;\r\n WebSpeedButton47.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton47.Font.Color := clBlack;\r\n WebSpeedButton47.Font.Height := -13;\r\n WebSpeedButton47.Font.Name := 'Tahoma';\r\n WebSpeedButton47.Font.Style := [];\r\n WebSpeedButton47.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton47.MaterialGlyph := 'edit';\r\n WebSpeedButton47.ParentFont := False;\r\n WebSpeedButton47.ShowHint := True;\r\n WebSpeedButton47.TabOrder := 0;\r\n WebSpeedButton47.Visible := False;\r\n WebSpeedButton47.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton47, Self, 'OnClick', '_BlockCallPickForm');\r\n M13.SetParentComponent(B13);\r\n M13.Name := 'M13';\r\n M13.Left := 0;\r\n M13.Top := 56;\r\n M13.Width := 100;\r\n M13.Height := 24;\r\n M13.Align := alBottom;\r\n M13.BorderStyle := bsNone;\r\n M13.ElementClassName := 'block_memo';\r\n M13.ElementFont := efCSS;\r\n M13.Font.Charset := ANSI_CHARSET;\r\n M13.Font.Color := clBlack;\r\n M13.Font.Height := -13;\r\n M13.Font.Name := 'Tahoma';\r\n M13.Font.Style := [];\r\n M13.HeightPercent := 100.000000000000000000;\r\n M13.ParentFont := False;\r\n M13.SelLength := 0;\r\n M13.SelStart := 0;\r\n M13.ShowFocus := False;\r\n M13.WidthPercent := 100.000000000000000000;\r\n SetEvent(M13, Self, 'OnChange', 'M1Change');\r\n SetEvent(M13, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M13, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M13, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M13, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer13.SetParentComponent(B13);\r\n WebHTMLContainer13.Name := 'WebHTMLContainer13';\r\n WebHTMLContainer13.Left := 0;\r\n WebHTMLContainer13.Top := 41;\r\n WebHTMLContainer13.Width := 100;\r\n WebHTMLContainer13.Height := 15;\r\n WebHTMLContainer13.HeightStyle := ssAuto;\r\n WebHTMLContainer13.Align := alBottom;\r\n WebHTMLContainer13.ChildOrder := 2;\r\n WebHTMLContainer13.Visible := False;\r\n SetEvent(WebHTMLContainer13, Self, 'OnClick', 'WebHTMLContainer2Click');\r\n SetEvent(WebHTMLContainer13, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer13, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer13, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B12.SetParentComponent(SubForm_DIV);\r\n B12.Name := 'B12';\r\n B12.Left := 178;\r\n B12.Top := 156;\r\n B12.Width := 100;\r\n B12.Height := 80;\r\n B12.ElementClassName := 'data_block';\r\n B12.BorderColor := clWhite;\r\n B12.ChildOrder := 12;\r\n B12.Color := clWhite;\r\n B12.ElementFont := efCSS;\r\n B12.Font.Charset := ANSI_CHARSET;\r\n B12.Font.Color := clBlack;\r\n B12.Font.Height := -13;\r\n B12.Font.Name := 'Tahoma';\r\n B12.Font.Style := [];\r\n B12.ParentFont := False;\r\n B12.TabOrder := 15;\r\n SetEvent(B12, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B12, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel103.SetParentComponent(B12);\r\n WebPanel103.Name := 'WebPanel103';\r\n WebPanel103.Left := 0;\r\n WebPanel103.Top := 0;\r\n WebPanel103.Width := 100;\r\n WebPanel103.Height := 28;\r\n WebPanel103.ElementClassName := 'block_top';\r\n WebPanel103.HeightStyle := ssAuto;\r\n WebPanel103.Align := alTop;\r\n WebPanel103.BorderStyle := bsNone;\r\n WebPanel103.ChildOrder := 2;\r\n WebPanel103.Color := clWhite;\r\n WebPanel103.DragMode := dmAutomatic;\r\n WebPanel103.ElementFont := efCSS;\r\n WebPanel103.TabOrder := 0;\r\n SetEvent(WebPanel103, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel103, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel103, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel103, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel51.SetParentComponent(WebPanel103);\r\n WebLabel51.Name := 'WebLabel51';\r\n WebLabel51.Left := 24;\r\n WebLabel51.Top := 0;\r\n WebLabel51.Width := 22;\r\n WebLabel51.Height := 26;\r\n WebLabel51.Hint := 'Setting Unit';\r\n WebLabel51.Align := alLeft;\r\n WebLabel51.Caption := '12';\r\n WebLabel51.DragMode := dmAutomatic;\r\n WebLabel51.ElementClassName := 'block_title';\r\n WebLabel51.ElementFont := efCSS;\r\n WebLabel51.Font.Charset := ANSI_CHARSET;\r\n WebLabel51.Font.Color := clNavy;\r\n WebLabel51.Font.Height := -19;\r\n WebLabel51.Font.Name := 'Segoe UI Emoji';\r\n WebLabel51.Font.Style := [fsBold];\r\n WebLabel51.HeightPercent := 100.000000000000000000;\r\n WebLabel51.ParentFont := False;\r\n WebLabel51.WidthStyle := ssAuto;\r\n WebLabel51.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel51, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel51, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel51, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel51, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton48.SetParentComponent(WebPanel103);\r\n WebSpeedButton48.Name := 'WebSpeedButton48';\r\n WebSpeedButton48.Left := 0;\r\n WebSpeedButton48.Top := 0;\r\n WebSpeedButton48.Width := 24;\r\n WebSpeedButton48.Height := 28;\r\n WebSpeedButton48.Cursor := crHandPoint;\r\n WebSpeedButton48.Hint := 'Edit';\r\n WebSpeedButton48.Align := alLeft;\r\n WebSpeedButton48.Color := clNone;\r\n WebSpeedButton48.Flat := True;\r\n WebSpeedButton48.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton48.Font.Color := clBlack;\r\n WebSpeedButton48.Font.Height := -13;\r\n WebSpeedButton48.Font.Name := 'Tahoma';\r\n WebSpeedButton48.Font.Style := [];\r\n WebSpeedButton48.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton48.MaterialGlyph := 'edit';\r\n WebSpeedButton48.ParentFont := False;\r\n WebSpeedButton48.ShowHint := True;\r\n WebSpeedButton48.TabOrder := 0;\r\n WebSpeedButton48.Visible := False;\r\n WebSpeedButton48.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton48, Self, 'OnClick', '_BlockCallPickForm');\r\n M12.SetParentComponent(B12);\r\n M12.Name := 'M12';\r\n M12.Left := 0;\r\n M12.Top := 56;\r\n M12.Width := 100;\r\n M12.Height := 24;\r\n M12.Align := alBottom;\r\n M12.BorderStyle := bsNone;\r\n M12.ElementClassName := 'block_memo';\r\n M12.ElementFont := efCSS;\r\n M12.Font.Charset := ANSI_CHARSET;\r\n M12.Font.Color := clBlack;\r\n M12.Font.Height := -13;\r\n M12.Font.Name := 'Tahoma';\r\n M12.Font.Style := [];\r\n M12.HeightPercent := 100.000000000000000000;\r\n M12.ParentFont := False;\r\n M12.SelLength := 0;\r\n M12.SelStart := 0;\r\n M12.ShowFocus := False;\r\n M12.WidthPercent := 100.000000000000000000;\r\n SetEvent(M12, Self, 'OnChange', 'M1Change');\r\n SetEvent(M12, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M12, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M12, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M12, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer12.SetParentComponent(B12);\r\n WebHTMLContainer12.Name := 'WebHTMLContainer12';\r\n WebHTMLContainer12.Left := 0;\r\n WebHTMLContainer12.Top := 41;\r\n WebHTMLContainer12.Width := 100;\r\n WebHTMLContainer12.Height := 15;\r\n WebHTMLContainer12.HeightStyle := ssAuto;\r\n WebHTMLContainer12.Align := alBottom;\r\n WebHTMLContainer12.ChildOrder := 2;\r\n WebHTMLContainer12.Visible := False;\r\n SetEvent(WebHTMLContainer12, Self, 'OnClick', 'WebHTMLContainer2Click');\r\n SetEvent(WebHTMLContainer12, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer12, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer12, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B11.SetParentComponent(SubForm_DIV);\r\n B11.Name := 'B11';\r\n B11.Left := 58;\r\n B11.Top := 156;\r\n B11.Width := 100;\r\n B11.Height := 80;\r\n B11.ElementClassName := 'data_block';\r\n B11.BorderColor := clWhite;\r\n B11.ChildOrder := 11;\r\n B11.Color := clWhite;\r\n B11.ElementFont := efCSS;\r\n B11.Font.Charset := ANSI_CHARSET;\r\n B11.Font.Color := clBlack;\r\n B11.Font.Height := -13;\r\n B11.Font.Name := 'Tahoma';\r\n B11.Font.Style := [];\r\n B11.ParentFont := False;\r\n B11.TabOrder := 16;\r\n SetEvent(B11, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B11, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel105.SetParentComponent(B11);\r\n WebPanel105.Name := 'WebPanel105';\r\n WebPanel105.Left := 0;\r\n WebPanel105.Top := 0;\r\n WebPanel105.Width := 100;\r\n WebPanel105.Height := 28;\r\n WebPanel105.ElementClassName := 'block_top';\r\n WebPanel105.HeightStyle := ssAuto;\r\n WebPanel105.Align := alTop;\r\n WebPanel105.BorderStyle := bsNone;\r\n WebPanel105.ChildOrder := 2;\r\n WebPanel105.Color := clWhite;\r\n WebPanel105.DragMode := dmAutomatic;\r\n WebPanel105.ElementFont := efCSS;\r\n WebPanel105.TabOrder := 0;\r\n SetEvent(WebPanel105, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel105, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel105, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel105, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel52.SetParentComponent(WebPanel105);\r\n WebLabel52.Name := 'WebLabel52';\r\n WebLabel52.Left := 24;\r\n WebLabel52.Top := 0;\r\n WebLabel52.Width := 22;\r\n WebLabel52.Height := 26;\r\n WebLabel52.Hint := 'Setting Unit';\r\n WebLabel52.Align := alLeft;\r\n WebLabel52.Caption := '11';\r\n WebLabel52.DragMode := dmAutomatic;\r\n WebLabel52.ElementClassName := 'block_title';\r\n WebLabel52.ElementFont := efCSS;\r\n WebLabel52.Font.Charset := ANSI_CHARSET;\r\n WebLabel52.Font.Color := clNavy;\r\n WebLabel52.Font.Height := -19;\r\n WebLabel52.Font.Name := 'Segoe UI Emoji';\r\n WebLabel52.Font.Style := [fsBold];\r\n WebLabel52.HeightPercent := 100.000000000000000000;\r\n WebLabel52.ParentFont := False;\r\n WebLabel52.WidthStyle := ssAuto;\r\n WebLabel52.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel52, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel52, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel52, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel52, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton49.SetParentComponent(WebPanel105);\r\n WebSpeedButton49.Name := 'WebSpeedButton49';\r\n WebSpeedButton49.Left := 0;\r\n WebSpeedButton49.Top := 0;\r\n WebSpeedButton49.Width := 24;\r\n WebSpeedButton49.Height := 28;\r\n WebSpeedButton49.Cursor := crHandPoint;\r\n WebSpeedButton49.Hint := 'Edit';\r\n WebSpeedButton49.Align := alLeft;\r\n WebSpeedButton49.Color := clNone;\r\n WebSpeedButton49.Flat := True;\r\n WebSpeedButton49.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton49.Font.Color := clBlack;\r\n WebSpeedButton49.Font.Height := -13;\r\n WebSpeedButton49.Font.Name := 'Tahoma';\r\n WebSpeedButton49.Font.Style := [];\r\n WebSpeedButton49.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton49.MaterialGlyph := 'edit';\r\n WebSpeedButton49.ParentFont := False;\r\n WebSpeedButton49.ShowHint := True;\r\n WebSpeedButton49.TabOrder := 0;\r\n WebSpeedButton49.Visible := False;\r\n WebSpeedButton49.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton49, Self, 'OnClick', '_BlockCallPickForm');\r\n M11.SetParentComponent(B11);\r\n M11.Name := 'M11';\r\n M11.Left := 0;\r\n M11.Top := 56;\r\n M11.Width := 100;\r\n M11.Height := 24;\r\n M11.Align := alBottom;\r\n M11.BorderStyle := bsNone;\r\n M11.ElementClassName := 'block_memo';\r\n M11.ElementFont := efCSS;\r\n M11.Font.Charset := ANSI_CHARSET;\r\n M11.Font.Color := clBlack;\r\n M11.Font.Height := -13;\r\n M11.Font.Name := 'Tahoma';\r\n M11.Font.Style := [];\r\n M11.HeightPercent := 100.000000000000000000;\r\n M11.ParentFont := False;\r\n M11.SelLength := 0;\r\n M11.SelStart := 0;\r\n M11.ShowFocus := False;\r\n M11.WidthPercent := 100.000000000000000000;\r\n SetEvent(M11, Self, 'OnChange', 'M1Change');\r\n SetEvent(M11, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M11, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M11, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M11, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer11.SetParentComponent(B11);\r\n WebHTMLContainer11.Name := 'WebHTMLContainer11';\r\n WebHTMLContainer11.Left := 0;\r\n WebHTMLContainer11.Top := 41;\r\n WebHTMLContainer11.Width := 100;\r\n WebHTMLContainer11.Height := 15;\r\n WebHTMLContainer11.HeightStyle := ssAuto;\r\n WebHTMLContainer11.Align := alBottom;\r\n WebHTMLContainer11.ChildOrder := 2;\r\n WebHTMLContainer11.Visible := False;\r\n SetEvent(WebHTMLContainer11, Self, 'OnClick', 'WebHTMLContainer2Click');\r\n SetEvent(WebHTMLContainer11, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer11, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer11, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B16.SetParentComponent(SubForm_DIV);\r\n B16.Name := 'B16';\r\n B16.Left := 58;\r\n B16.Top := 233;\r\n B16.Width := 100;\r\n B16.Height := 80;\r\n B16.ElementClassName := 'data_block';\r\n B16.BorderColor := clWhite;\r\n B16.ChildOrder := 16;\r\n B16.Color := clWhite;\r\n B16.ElementFont := efCSS;\r\n B16.Font.Charset := ANSI_CHARSET;\r\n B16.Font.Color := clBlack;\r\n B16.Font.Height := -13;\r\n B16.Font.Name := 'Tahoma';\r\n B16.Font.Style := [];\r\n B16.ParentFont := False;\r\n B16.TabOrder := 17;\r\n SetEvent(B16, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B16, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel107.SetParentComponent(B16);\r\n WebPanel107.Name := 'WebPanel107';\r\n WebPanel107.Left := 0;\r\n WebPanel107.Top := 0;\r\n WebPanel107.Width := 100;\r\n WebPanel107.Height := 28;\r\n WebPanel107.ElementClassName := 'block_top';\r\n WebPanel107.HeightStyle := ssAuto;\r\n WebPanel107.Align := alTop;\r\n WebPanel107.BorderStyle := bsNone;\r\n WebPanel107.ChildOrder := 2;\r\n WebPanel107.Color := clWhite;\r\n WebPanel107.DragMode := dmAutomatic;\r\n WebPanel107.ElementFont := efCSS;\r\n WebPanel107.TabOrder := 0;\r\n SetEvent(WebPanel107, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel107, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel107, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel107, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel53.SetParentComponent(WebPanel107);\r\n WebLabel53.Name := 'WebLabel53';\r\n WebLabel53.Left := 24;\r\n WebLabel53.Top := 0;\r\n WebLabel53.Width := 22;\r\n WebLabel53.Height := 26;\r\n WebLabel53.Hint := 'Setting Unit';\r\n WebLabel53.Align := alLeft;\r\n WebLabel53.Caption := '16';\r\n WebLabel53.DragMode := dmAutomatic;\r\n WebLabel53.ElementClassName := 'block_title';\r\n WebLabel53.ElementFont := efCSS;\r\n WebLabel53.Font.Charset := ANSI_CHARSET;\r\n WebLabel53.Font.Color := clNavy;\r\n WebLabel53.Font.Height := -19;\r\n WebLabel53.Font.Name := 'Segoe UI Emoji';\r\n WebLabel53.Font.Style := [fsBold];\r\n WebLabel53.HeightPercent := 100.000000000000000000;\r\n WebLabel53.ParentFont := False;\r\n WebLabel53.WidthStyle := ssAuto;\r\n WebLabel53.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel53, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel53, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel53, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel53, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton50.SetParentComponent(WebPanel107);\r\n WebSpeedButton50.Name := 'WebSpeedButton50';\r\n WebSpeedButton50.Left := 0;\r\n WebSpeedButton50.Top := 0;\r\n WebSpeedButton50.Width := 24;\r\n WebSpeedButton50.Height := 28;\r\n WebSpeedButton50.Cursor := crHandPoint;\r\n WebSpeedButton50.Hint := 'Edit';\r\n WebSpeedButton50.Align := alLeft;\r\n WebSpeedButton50.Color := clNone;\r\n WebSpeedButton50.Flat := True;\r\n WebSpeedButton50.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton50.Font.Color := clBlack;\r\n WebSpeedButton50.Font.Height := -13;\r\n WebSpeedButton50.Font.Name := 'Tahoma';\r\n WebSpeedButton50.Font.Style := [];\r\n WebSpeedButton50.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton50.MaterialGlyph := 'edit';\r\n WebSpeedButton50.ParentFont := False;\r\n WebSpeedButton50.ShowHint := True;\r\n WebSpeedButton50.TabOrder := 0;\r\n WebSpeedButton50.Visible := False;\r\n WebSpeedButton50.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton50, Self, 'OnClick', '_BlockCallPickForm');\r\n M16.SetParentComponent(B16);\r\n M16.Name := 'M16';\r\n M16.Left := 0;\r\n M16.Top := 56;\r\n M16.Width := 100;\r\n M16.Height := 24;\r\n M16.Align := alBottom;\r\n M16.BorderStyle := bsNone;\r\n M16.ElementClassName := 'block_memo';\r\n M16.ElementFont := efCSS;\r\n M16.Font.Charset := ANSI_CHARSET;\r\n M16.Font.Color := clBlack;\r\n M16.Font.Height := -13;\r\n M16.Font.Name := 'Tahoma';\r\n M16.Font.Style := [];\r\n M16.HeightPercent := 100.000000000000000000;\r\n M16.ParentFont := False;\r\n M16.SelLength := 0;\r\n M16.SelStart := 0;\r\n M16.ShowFocus := False;\r\n M16.WidthPercent := 100.000000000000000000;\r\n SetEvent(M16, Self, 'OnChange', 'M1Change');\r\n SetEvent(M16, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M16, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M16, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M16, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer16.SetParentComponent(B16);\r\n WebHTMLContainer16.Name := 'WebHTMLContainer16';\r\n WebHTMLContainer16.Left := 0;\r\n WebHTMLContainer16.Top := 41;\r\n WebHTMLContainer16.Width := 100;\r\n WebHTMLContainer16.Height := 15;\r\n WebHTMLContainer16.HeightStyle := ssAuto;\r\n WebHTMLContainer16.Align := alBottom;\r\n WebHTMLContainer16.ChildOrder := 2;\r\n WebHTMLContainer16.Visible := False;\r\n SetEvent(WebHTMLContainer16, Self, 'OnClick', 'WebHTMLContainer2Click');\r\n SetEvent(WebHTMLContainer16, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer16, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer16, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B17.SetParentComponent(SubForm_DIV);\r\n B17.Name := 'B17';\r\n B17.Left := 178;\r\n B17.Top := 233;\r\n B17.Width := 100;\r\n B17.Height := 80;\r\n B17.ElementClassName := 'data_block';\r\n B17.BorderColor := clWhite;\r\n B17.ChildOrder := 17;\r\n B17.Color := clWhite;\r\n B17.ElementFont := efCSS;\r\n B17.Font.Charset := ANSI_CHARSET;\r\n B17.Font.Color := clBlack;\r\n B17.Font.Height := -13;\r\n B17.Font.Name := 'Tahoma';\r\n B17.Font.Style := [];\r\n B17.ParentFont := False;\r\n B17.TabOrder := 18;\r\n SetEvent(B17, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B17, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel109.SetParentComponent(B17);\r\n WebPanel109.Name := 'WebPanel109';\r\n WebPanel109.Left := 0;\r\n WebPanel109.Top := 0;\r\n WebPanel109.Width := 100;\r\n WebPanel109.Height := 28;\r\n WebPanel109.ElementClassName := 'block_top';\r\n WebPanel109.HeightStyle := ssAuto;\r\n WebPanel109.Align := alTop;\r\n WebPanel109.BorderStyle := bsNone;\r\n WebPanel109.ChildOrder := 2;\r\n WebPanel109.Color := clWhite;\r\n WebPanel109.DragMode := dmAutomatic;\r\n WebPanel109.ElementFont := efCSS;\r\n WebPanel109.TabOrder := 0;\r\n SetEvent(WebPanel109, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel109, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel109, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel109, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel54.SetParentComponent(WebPanel109);\r\n WebLabel54.Name := 'WebLabel54';\r\n WebLabel54.Left := 24;\r\n WebLabel54.Top := 0;\r\n WebLabel54.Width := 22;\r\n WebLabel54.Height := 26;\r\n WebLabel54.Hint := 'Setting Unit';\r\n WebLabel54.Align := alLeft;\r\n WebLabel54.Caption := '17';\r\n WebLabel54.DragMode := dmAutomatic;\r\n WebLabel54.ElementClassName := 'block_title';\r\n WebLabel54.ElementFont := efCSS;\r\n WebLabel54.Font.Charset := ANSI_CHARSET;\r\n WebLabel54.Font.Color := clNavy;\r\n WebLabel54.Font.Height := -19;\r\n WebLabel54.Font.Name := 'Segoe UI Emoji';\r\n WebLabel54.Font.Style := [fsBold];\r\n WebLabel54.HeightPercent := 100.000000000000000000;\r\n WebLabel54.ParentFont := False;\r\n WebLabel54.WidthStyle := ssAuto;\r\n WebLabel54.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel54, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel54, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel54, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel54, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton51.SetParentComponent(WebPanel109);\r\n WebSpeedButton51.Name := 'WebSpeedButton51';\r\n WebSpeedButton51.Left := 0;\r\n WebSpeedButton51.Top := 0;\r\n WebSpeedButton51.Width := 24;\r\n WebSpeedButton51.Height := 28;\r\n WebSpeedButton51.Cursor := crHandPoint;\r\n WebSpeedButton51.Hint := 'Edit';\r\n WebSpeedButton51.Align := alLeft;\r\n WebSpeedButton51.Color := clNone;\r\n WebSpeedButton51.Flat := True;\r\n WebSpeedButton51.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton51.Font.Color := clBlack;\r\n WebSpeedButton51.Font.Height := -13;\r\n WebSpeedButton51.Font.Name := 'Tahoma';\r\n WebSpeedButton51.Font.Style := [];\r\n WebSpeedButton51.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton51.MaterialGlyph := 'edit';\r\n WebSpeedButton51.ParentFont := False;\r\n WebSpeedButton51.ShowHint := True;\r\n WebSpeedButton51.TabOrder := 0;\r\n WebSpeedButton51.Visible := False;\r\n WebSpeedButton51.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton51, Self, 'OnClick', '_BlockCallPickForm');\r\n M17.SetParentComponent(B17);\r\n M17.Name := 'M17';\r\n M17.Left := 0;\r\n M17.Top := 56;\r\n M17.Width := 100;\r\n M17.Height := 24;\r\n M17.Align := alBottom;\r\n M17.BorderStyle := bsNone;\r\n M17.ElementClassName := 'block_memo';\r\n M17.ElementFont := efCSS;\r\n M17.Font.Charset := ANSI_CHARSET;\r\n M17.Font.Color := clBlack;\r\n M17.Font.Height := -13;\r\n M17.Font.Name := 'Tahoma';\r\n M17.Font.Style := [];\r\n M17.HeightPercent := 100.000000000000000000;\r\n M17.ParentFont := False;\r\n M17.SelLength := 0;\r\n M17.SelStart := 0;\r\n M17.ShowFocus := False;\r\n M17.WidthPercent := 100.000000000000000000;\r\n SetEvent(M17, Self, 'OnChange', 'M1Change');\r\n SetEvent(M17, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M17, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M17, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M17, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer17.SetParentComponent(B17);\r\n WebHTMLContainer17.Name := 'WebHTMLContainer17';\r\n WebHTMLContainer17.Left := 0;\r\n WebHTMLContainer17.Top := 41;\r\n WebHTMLContainer17.Width := 100;\r\n WebHTMLContainer17.Height := 15;\r\n WebHTMLContainer17.ElementClassName := 'data_block';\r\n WebHTMLContainer17.HeightStyle := ssAuto;\r\n WebHTMLContainer17.Align := alBottom;\r\n WebHTMLContainer17.ChildOrder := 2;\r\n WebHTMLContainer17.ElementFont := efCSS;\r\n WebHTMLContainer17.Visible := False;\r\n SetEvent(WebHTMLContainer17, Self, 'OnClick', 'WebHTMLContainer2Click');\r\n SetEvent(WebHTMLContainer17, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer17, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer17, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B18.SetParentComponent(SubForm_DIV);\r\n B18.Name := 'B18';\r\n B18.Left := 299;\r\n B18.Top := 233;\r\n B18.Width := 100;\r\n B18.Height := 80;\r\n B18.ElementClassName := 'data_block';\r\n B18.BorderColor := clWhite;\r\n B18.ChildOrder := 18;\r\n B18.Color := clWhite;\r\n B18.ElementFont := efCSS;\r\n B18.Font.Charset := ANSI_CHARSET;\r\n B18.Font.Color := clBlack;\r\n B18.Font.Height := -13;\r\n B18.Font.Name := 'Tahoma';\r\n B18.Font.Style := [];\r\n B18.ParentFont := False;\r\n B18.TabOrder := 19;\r\n SetEvent(B18, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B18, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel111.SetParentComponent(B18);\r\n WebPanel111.Name := 'WebPanel111';\r\n WebPanel111.Left := 0;\r\n WebPanel111.Top := 0;\r\n WebPanel111.Width := 100;\r\n WebPanel111.Height := 28;\r\n WebPanel111.ElementClassName := 'block_top';\r\n WebPanel111.HeightStyle := ssAuto;\r\n WebPanel111.Align := alTop;\r\n WebPanel111.BorderStyle := bsNone;\r\n WebPanel111.ChildOrder := 2;\r\n WebPanel111.Color := clWhite;\r\n WebPanel111.DragMode := dmAutomatic;\r\n WebPanel111.ElementFont := efCSS;\r\n WebPanel111.TabOrder := 0;\r\n SetEvent(WebPanel111, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel111, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel111, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel111, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel55.SetParentComponent(WebPanel111);\r\n WebLabel55.Name := 'WebLabel55';\r\n WebLabel55.Left := 24;\r\n WebLabel55.Top := 0;\r\n WebLabel55.Width := 22;\r\n WebLabel55.Height := 26;\r\n WebLabel55.Hint := 'Setting Unit';\r\n WebLabel55.Align := alLeft;\r\n WebLabel55.Caption := '18';\r\n WebLabel55.DragMode := dmAutomatic;\r\n WebLabel55.ElementClassName := 'block_title';\r\n WebLabel55.ElementFont := efCSS;\r\n WebLabel55.Font.Charset := ANSI_CHARSET;\r\n WebLabel55.Font.Color := clNavy;\r\n WebLabel55.Font.Height := -19;\r\n WebLabel55.Font.Name := 'Segoe UI Emoji';\r\n WebLabel55.Font.Style := [fsBold];\r\n WebLabel55.HeightPercent := 100.000000000000000000;\r\n WebLabel55.ParentFont := False;\r\n WebLabel55.WidthStyle := ssAuto;\r\n WebLabel55.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel55, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel55, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel55, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel55, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton52.SetParentComponent(WebPanel111);\r\n WebSpeedButton52.Name := 'WebSpeedButton52';\r\n WebSpeedButton52.Left := 0;\r\n WebSpeedButton52.Top := 0;\r\n WebSpeedButton52.Width := 24;\r\n WebSpeedButton52.Height := 28;\r\n WebSpeedButton52.Cursor := crHandPoint;\r\n WebSpeedButton52.Hint := 'Edit';\r\n WebSpeedButton52.Align := alLeft;\r\n WebSpeedButton52.Color := clNone;\r\n WebSpeedButton52.Flat := True;\r\n WebSpeedButton52.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton52.Font.Color := clBlack;\r\n WebSpeedButton52.Font.Height := -13;\r\n WebSpeedButton52.Font.Name := 'Tahoma';\r\n WebSpeedButton52.Font.Style := [];\r\n WebSpeedButton52.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton52.MaterialGlyph := 'edit';\r\n WebSpeedButton52.ParentFont := False;\r\n WebSpeedButton52.ShowHint := True;\r\n WebSpeedButton52.TabOrder := 0;\r\n WebSpeedButton52.Visible := False;\r\n WebSpeedButton52.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton52, Self, 'OnClick', '_BlockCallPickForm');\r\n M18.SetParentComponent(B18);\r\n M18.Name := 'M18';\r\n M18.Left := 0;\r\n M18.Top := 56;\r\n M18.Width := 100;\r\n M18.Height := 24;\r\n M18.Align := alBottom;\r\n M18.BorderStyle := bsNone;\r\n M18.ElementClassName := 'block_memo';\r\n M18.ElementFont := efCSS;\r\n M18.Font.Charset := ANSI_CHARSET;\r\n M18.Font.Color := clBlack;\r\n M18.Font.Height := -13;\r\n M18.Font.Name := 'Tahoma';\r\n M18.Font.Style := [];\r\n M18.HeightPercent := 100.000000000000000000;\r\n M18.ParentFont := False;\r\n M18.SelLength := 0;\r\n M18.SelStart := 0;\r\n M18.ShowFocus := False;\r\n M18.WidthPercent := 100.000000000000000000;\r\n SetEvent(M18, Self, 'OnChange', 'M1Change');\r\n SetEvent(M18, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M18, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M18, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M18, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer18.SetParentComponent(B18);\r\n WebHTMLContainer18.Name := 'WebHTMLContainer18';\r\n WebHTMLContainer18.Left := 0;\r\n WebHTMLContainer18.Top := 41;\r\n WebHTMLContainer18.Width := 100;\r\n WebHTMLContainer18.Height := 15;\r\n WebHTMLContainer18.HeightStyle := ssAuto;\r\n WebHTMLContainer18.Align := alBottom;\r\n WebHTMLContainer18.ChildOrder := 2;\r\n WebHTMLContainer18.Visible := False;\r\n SetEvent(WebHTMLContainer18, Self, 'OnClick', 'WebHTMLContainer2Click');\r\n SetEvent(WebHTMLContainer18, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer18, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer18, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n Memo.SetParentComponent(Self);\r\n Memo.Name := 'Memo';\r\n Memo.Tag := -1;\r\n Memo.Left := 0;\r\n Memo.Top := 607;\r\n Memo.Width := 838;\r\n Memo.Height := 126;\r\n Memo.Align := alBottom;\r\n Memo.BorderStyle := bsNone;\r\n Memo.ElementClassName := 'block_memo';\r\n Memo.ElementFont := efCSS;\r\n Memo.Font.Charset := DEFAULT_CHARSET;\r\n Memo.Font.Color := clWindowText;\r\n Memo.Font.Height := -13;\r\n Memo.Font.Name := 'Tahoma';\r\n Memo.Font.Style := [];\r\n Memo.HeightPercent := 100.000000000000000000;\r\n Memo.ParentFont := False;\r\n Memo.SelLength := 0;\r\n Memo.SelStart := 0;\r\n Memo.ShowFocus := False;\r\n Memo.WidthPercent := 100.000000000000000000;\r\n SetEvent(Memo, Self, 'OnMouseMove', 'MemoMouseMove');\r\n pnlFormButtons.SetParentComponent(Self);\r\n pnlFormButtons.Name := 'pnlFormButtons';\r\n pnlFormButtons.Left := 0;\r\n pnlFormButtons.Top := 759;\r\n pnlFormButtons.Width := 838;\r\n pnlFormButtons.Height := 41;\r\n pnlFormButtons.Align := alBottom;\r\n pnlFormButtons.BorderStyle := bsNone;\r\n pnlFormButtons.ChildOrder := 5;\r\n pnlFormButtons.Color := clWhite;\r\n pnlFormButtons.TabOrder := 2;\r\n SetEvent(pnlFormButtons, Self, 'OnMouseMove', 'pnlFormButtonsMouseMove');\r\n btnClose.SetParentComponent(pnlFormButtons);\r\n btnClose.Name := 'btnClose';\r\n btnClose.Left := 748;\r\n btnClose.Top := 0;\r\n btnClose.Width := 90;\r\n btnClose.Height := 41;\r\n btnClose.Cursor := crHandPoint;\r\n btnClose.Hint := 'Cancel';\r\n btnClose.Align := alRight;\r\n btnClose.Caption := '';\r\n btnClose.Color := clNone;\r\n btnClose.ElementClassName := 'btn_icon';\r\n btnClose.Font.Charset := DEFAULT_CHARSET;\r\n btnClose.Font.Color := clGray;\r\n btnClose.Font.Height := -16;\r\n btnClose.Font.Name := 'Tahoma';\r\n btnClose.Font.Style := [];\r\n btnClose.HeightPercent := 100.000000000000000000;\r\n btnClose.MaterialGlyph := 'exit_to_app';\r\n btnClose.MaterialGlyphSize := 1;\r\n btnClose.ParentFont := False;\r\n btnClose.ShowHint := True;\r\n btnClose.TabOrder := 10;\r\n btnClose.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnClose, Self, 'OnClick', 'btnCloseClick');\r\n SetEvent(btnClose, Self, 'OnMouseMove', 'btnUseDefaultsMouseMove');\r\n btnSave.SetParentComponent(pnlFormButtons);\r\n btnSave.Name := 'btnSave';\r\n btnSave.Left := 658;\r\n btnSave.Top := 0;\r\n btnSave.Width := 90;\r\n btnSave.Height := 41;\r\n btnSave.Cursor := crHandPoint;\r\n btnSave.Hint := 'Ok';\r\n btnSave.Align := alRight;\r\n btnSave.Caption := '';\r\n btnSave.Color := clNone;\r\n btnSave.ElementClassName := 'btn_icon';\r\n btnSave.Font.Charset := DEFAULT_CHARSET;\r\n btnSave.Font.Color := clGray;\r\n btnSave.Font.Height := -16;\r\n btnSave.Font.Name := 'Tahoma';\r\n btnSave.Font.Style := [];\r\n btnSave.HeightPercent := 100.000000000000000000;\r\n btnSave.MaterialGlyph := 'save';\r\n btnSave.MaterialGlyphSize := 1;\r\n btnSave.ParentFont := False;\r\n btnSave.ShowHint := True;\r\n btnSave.TabOrder := 11;\r\n btnSave.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnSave, Self, 'OnClick', 'btnSaveClick');\r\n SetEvent(btnSave, Self, 'OnMouseMove', 'btnUseDefaultsMouseMove');\r\n btnUseDefaults.SetParentComponent(pnlFormButtons);\r\n btnUseDefaults.Name := 'btnUseDefaults';\r\n btnUseDefaults.Tag := -1;\r\n btnUseDefaults.Left := 298;\r\n btnUseDefaults.Top := 0;\r\n btnUseDefaults.Width := 90;\r\n btnUseDefaults.Height := 41;\r\n btnUseDefaults.Cursor := crHandPoint;\r\n btnUseDefaults.Hint := 'Use Default';\r\n btnUseDefaults.Align := alRight;\r\n btnUseDefaults.Caption := '';\r\n btnUseDefaults.ChildOrder := 86;\r\n btnUseDefaults.Color := clNone;\r\n btnUseDefaults.ElementClassName := 'btn_icon';\r\n btnUseDefaults.Font.Charset := DEFAULT_CHARSET;\r\n btnUseDefaults.Font.Color := clGray;\r\n btnUseDefaults.Font.Height := -16;\r\n btnUseDefaults.Font.Name := 'Tahoma';\r\n btnUseDefaults.Font.Style := [];\r\n btnUseDefaults.HeightPercent := 100.000000000000000000;\r\n btnUseDefaults.MaterialGlyph := 'replay';\r\n btnUseDefaults.MaterialGlyphSize := 1;\r\n btnUseDefaults.ParentFont := False;\r\n btnUseDefaults.ShowHint := True;\r\n btnUseDefaults.TabOrder := 2;\r\n btnUseDefaults.WidthPercent := 9.000000000000000000;\r\n SetEvent(btnUseDefaults, Self, 'OnClick', 'btnUseDefaultsClick');\r\n SetEvent(btnUseDefaults, Self, 'OnMouseMove', 'btnUseDefaultsMouseMove');\r\n btnSaveAsDefaults.SetParentComponent(pnlFormButtons);\r\n btnSaveAsDefaults.Name := 'btnSaveAsDefaults';\r\n btnSaveAsDefaults.Left := 388;\r\n btnSaveAsDefaults.Top := 0;\r\n btnSaveAsDefaults.Width := 90;\r\n btnSaveAsDefaults.Height := 41;\r\n btnSaveAsDefaults.Cursor := crHandPoint;\r\n btnSaveAsDefaults.Hint := 'Save as Default';\r\n btnSaveAsDefaults.Align := alRight;\r\n btnSaveAsDefaults.Caption := '';\r\n btnSaveAsDefaults.ChildOrder := 86;\r\n btnSaveAsDefaults.Color := clNone;\r\n btnSaveAsDefaults.ElementClassName := 'btn_icon';\r\n btnSaveAsDefaults.Font.Charset := DEFAULT_CHARSET;\r\n btnSaveAsDefaults.Font.Color := clGray;\r\n btnSaveAsDefaults.Font.Height := -16;\r\n btnSaveAsDefaults.Font.Name := 'Tahoma';\r\n btnSaveAsDefaults.Font.Style := [];\r\n btnSaveAsDefaults.HeightPercent := 100.000000000000000000;\r\n btnSaveAsDefaults.MaterialGlyph := 'attachment';\r\n btnSaveAsDefaults.MaterialGlyphSize := 1;\r\n btnSaveAsDefaults.ParentFont := False;\r\n btnSaveAsDefaults.ShowHint := True;\r\n btnSaveAsDefaults.TabOrder := 3;\r\n btnSaveAsDefaults.Visible := False;\r\n btnSaveAsDefaults.WidthPercent := 9.000000000000000000;\r\n SetEvent(btnSaveAsDefaults, Self, 'OnClick', 'btnSaveAsDefaultsClick');\r\n SetEvent(btnSaveAsDefaults, Self, 'OnMouseMove', 'btnUseDefaultsMouseMove');\r\n btnAdd.SetParentComponent(pnlFormButtons);\r\n btnAdd.Name := 'btnAdd';\r\n btnAdd.Left := 568;\r\n btnAdd.Top := 0;\r\n btnAdd.Width := 90;\r\n btnAdd.Height := 41;\r\n btnAdd.Cursor := crHandPoint;\r\n btnAdd.Hint := 'Add';\r\n btnAdd.Align := alRight;\r\n btnAdd.Caption := '';\r\n btnAdd.Color := clNone;\r\n btnAdd.ElementClassName := 'btn_icon';\r\n btnAdd.Font.Charset := DEFAULT_CHARSET;\r\n btnAdd.Font.Color := clGray;\r\n btnAdd.Font.Height := -16;\r\n btnAdd.Font.Name := 'Tahoma';\r\n btnAdd.Font.Style := [];\r\n btnAdd.HeightPercent := 100.000000000000000000;\r\n btnAdd.MaterialGlyph := 'add';\r\n btnAdd.MaterialGlyphSize := 1;\r\n btnAdd.ParentFont := False;\r\n btnAdd.ShowHint := True;\r\n btnAdd.TabOrder := 10;\r\n btnAdd.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnAdd, Self, 'OnClick', 'btnAddClick');\r\n SetEvent(btnAdd, Self, 'OnMouseMove', 'btnUseDefaultsMouseMove');\r\n btnClear.SetParentComponent(pnlFormButtons);\r\n btnClear.Name := 'btnClear';\r\n btnClear.Left := 478;\r\n btnClear.Top := 0;\r\n btnClear.Width := 90;\r\n btnClear.Height := 41;\r\n btnClear.Cursor := crHandPoint;\r\n btnClear.Hint := 'Clear';\r\n btnClear.Align := alRight;\r\n btnClear.Caption := '';\r\n btnClear.Color := clNone;\r\n btnClear.ElementClassName := 'btn_icon';\r\n btnClear.Font.Charset := DEFAULT_CHARSET;\r\n btnClear.Font.Color := clGray;\r\n btnClear.Font.Height := -16;\r\n btnClear.Font.Name := 'Tahoma';\r\n btnClear.Font.Style := [];\r\n btnClear.HeightPercent := 100.000000000000000000;\r\n btnClear.MaterialGlyph := 'delete_sweep';\r\n btnClear.MaterialGlyphSize := 1;\r\n btnClear.ParentFont := False;\r\n btnClear.ShowHint := True;\r\n btnClear.TabOrder := 10;\r\n btnClear.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnClear, Self, 'OnClick', 'btnClearClick');\r\n SetEvent(btnClear, Self, 'OnMouseMove', 'btnUseDefaultsMouseMove');\r\n btnSentenceTemplate.SetParentComponent(pnlFormButtons);\r\n btnSentenceTemplate.Name := 'btnSentenceTemplate';\r\n btnSentenceTemplate.Tag := -1;\r\n btnSentenceTemplate.Left := 258;\r\n btnSentenceTemplate.Top := 0;\r\n btnSentenceTemplate.Width := 40;\r\n btnSentenceTemplate.Height := 41;\r\n btnSentenceTemplate.Cursor := crHandPoint;\r\n btnSentenceTemplate.Hint := 'Sentence Template';\r\n btnSentenceTemplate.Align := alRight;\r\n btnSentenceTemplate.Caption := '';\r\n btnSentenceTemplate.ChildOrder := 86;\r\n btnSentenceTemplate.Color := clNone;\r\n btnSentenceTemplate.ElementClassName := 'btn_icon';\r\n btnSentenceTemplate.Font.Charset := DEFAULT_CHARSET;\r\n btnSentenceTemplate.Font.Color := clGray;\r\n btnSentenceTemplate.Font.Height := -16;\r\n btnSentenceTemplate.Font.Name := 'Tahoma';\r\n btnSentenceTemplate.Font.Style := [];\r\n btnSentenceTemplate.HeightPercent := 100.000000000000000000;\r\n btnSentenceTemplate.MaterialGlyph := 'text_format';\r\n btnSentenceTemplate.MaterialGlyphSize := 1;\r\n btnSentenceTemplate.ParentFont := False;\r\n btnSentenceTemplate.ShowHint := True;\r\n btnSentenceTemplate.TabOrder := 2;\r\n btnSentenceTemplate.WidthPercent := 9.000000000000000000;\r\n SetEvent(btnSentenceTemplate, Self, 'OnClick', 'btnSentenceTemplateClick');\r\n SetEvent(btnSentenceTemplate, Self, 'OnMouseMove', 'btnUseDefaultsMouseMove');\r\n btnClearBlockCustomPositioning.SetParentComponent(pnlFormButtons);\r\n btnClearBlockCustomPositioning.Name := 'btnClearBlockCustomPositioning';\r\n btnClearBlockCustomPositioning.Left := 218;\r\n btnClearBlockCustomPositioning.Top := 0;\r\n btnClearBlockCustomPositioning.Width := 40;\r\n btnClearBlockCustomPositioning.Height := 41;\r\n btnClearBlockCustomPositioning.Cursor := crHandPoint;\r\n btnClearBlockCustomPositioning.Hint := 'Clear Block Custom Positioning';\r\n btnClearBlockCustomPositioning.Align := alRight;\r\n btnClearBlockCustomPositioning.Caption := '';\r\n btnClearBlockCustomPositioning.Color := clNone;\r\n btnClearBlockCustomPositioning.ElementClassName := 'btn_icon';\r\n btnClearBlockCustomPositioning.Font.Charset := DEFAULT_CHARSET;\r\n btnClearBlockCustomPositioning.Font.Color := clGray;\r\n btnClearBlockCustomPositioning.Font.Height := -16;\r\n btnClearBlockCustomPositioning.Font.Name := 'Tahoma';\r\n btnClearBlockCustomPositioning.Font.Style := [];\r\n btnClearBlockCustomPositioning.HeightPercent := 100.000000000000000000;\r\n btnClearBlockCustomPositioning.MaterialGlyph := 'clear_all';\r\n btnClearBlockCustomPositioning.MaterialGlyphSize := 1;\r\n btnClearBlockCustomPositioning.ParentFont := False;\r\n btnClearBlockCustomPositioning.ShowHint := True;\r\n btnClearBlockCustomPositioning.TabOrder := 10;\r\n btnClearBlockCustomPositioning.Visible := False;\r\n btnClearBlockCustomPositioning.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnClearBlockCustomPositioning, Self, 'OnClick', 'btnClearBlockCustomPositioningClick');\r\n SetEvent(btnClearBlockCustomPositioning, Self, 'OnMouseMove', 'btnUseDefaultsMouseMove');\r\n btnClearBlockCustomSizes.SetParentComponent(pnlFormButtons);\r\n btnClearBlockCustomSizes.Name := 'btnClearBlockCustomSizes';\r\n btnClearBlockCustomSizes.Left := 178;\r\n btnClearBlockCustomSizes.Top := 0;\r\n btnClearBlockCustomSizes.Width := 40;\r\n btnClearBlockCustomSizes.Height := 41;\r\n btnClearBlockCustomSizes.Cursor := crHandPoint;\r\n btnClearBlockCustomSizes.Hint := 'Clear Block Custom Sizes';\r\n btnClearBlockCustomSizes.Align := alRight;\r\n btnClearBlockCustomSizes.Caption := '';\r\n btnClearBlockCustomSizes.Color := clNone;\r\n btnClearBlockCustomSizes.ElementClassName := 'btn_icon';\r\n btnClearBlockCustomSizes.Font.Charset := DEFAULT_CHARSET;\r\n btnClearBlockCustomSizes.Font.Color := clGray;\r\n btnClearBlockCustomSizes.Font.Height := -16;\r\n btnClearBlockCustomSizes.Font.Name := 'Tahoma';\r\n btnClearBlockCustomSizes.Font.Style := [];\r\n btnClearBlockCustomSizes.HeightPercent := 100.000000000000000000;\r\n btnClearBlockCustomSizes.MaterialGlyph := 'dehaze';\r\n btnClearBlockCustomSizes.MaterialGlyphSize := 1;\r\n btnClearBlockCustomSizes.ParentFont := False;\r\n btnClearBlockCustomSizes.ShowHint := True;\r\n btnClearBlockCustomSizes.TabOrder := 10;\r\n btnClearBlockCustomSizes.Visible := False;\r\n btnClearBlockCustomSizes.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnClearBlockCustomSizes, Self, 'OnClick', 'btnClearBlockCustomSizesClick');\r\n SetEvent(btnClearBlockCustomSizes, Self, 'OnMouseMove', 'btnUseDefaultsMouseMove');\r\n btnFixBlockPositions.SetParentComponent(pnlFormButtons);\r\n btnFixBlockPositions.Name := 'btnFixBlockPositions';\r\n btnFixBlockPositions.Left := 138;\r\n btnFixBlockPositions.Top := 0;\r\n btnFixBlockPositions.Width := 40;\r\n btnFixBlockPositions.Height := 41;\r\n btnFixBlockPositions.Cursor := crHandPoint;\r\n btnFixBlockPositions.Hint := 'Fix Block Postions';\r\n btnFixBlockPositions.Align := alRight;\r\n btnFixBlockPositions.Caption := '';\r\n btnFixBlockPositions.Color := clNone;\r\n btnFixBlockPositions.ElementClassName := 'btn_icon';\r\n btnFixBlockPositions.Font.Charset := DEFAULT_CHARSET;\r\n btnFixBlockPositions.Font.Color := clGray;\r\n btnFixBlockPositions.Font.Height := -16;\r\n btnFixBlockPositions.Font.Name := 'Tahoma';\r\n btnFixBlockPositions.Font.Style := [];\r\n btnFixBlockPositions.HeightPercent := 100.000000000000000000;\r\n btnFixBlockPositions.MaterialGlyph := 'apps';\r\n btnFixBlockPositions.MaterialGlyphSize := 1;\r\n btnFixBlockPositions.ParentFont := False;\r\n btnFixBlockPositions.ShowHint := True;\r\n btnFixBlockPositions.TabOrder := 10;\r\n btnFixBlockPositions.Visible := False;\r\n btnFixBlockPositions.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnFixBlockPositions, Self, 'OnClick', 'btnFixBlockPositionsClick');\r\n PNL_PICKFORM_PNLGRID.SetParentComponent(Self);\r\n PNL_PICKFORM_PNLGRID.Name := 'PNL_PICKFORM_PNLGRID';\r\n PNL_PICKFORM_PNLGRID.Left := 0;\r\n PNL_PICKFORM_PNLGRID.Top := 463;\r\n PNL_PICKFORM_PNLGRID.Width := 838;\r\n PNL_PICKFORM_PNLGRID.Height := 144;\r\n PNL_PICKFORM_PNLGRID.Align := alBottom;\r\n PNL_PICKFORM_PNLGRID.BorderColor := clWhite;\r\n PNL_PICKFORM_PNLGRID.BorderStyle := bsNone;\r\n PNL_PICKFORM_PNLGRID.ChildOrder := 6;\r\n PNL_PICKFORM_PNLGRID.Color := clWhite;\r\n PNL_PICKFORM_PNLGRID.TabOrder := 3;\r\n SetEvent(PNL_PICKFORM_PNLGRID, Self, 'OnMouseMove', 'PNL_PICKFORM_PNLGRIDMouseMove');\r\n pnlFormCaption.SetParentComponent(Self);\r\n pnlFormCaption.Name := 'pnlFormCaption';\r\n pnlFormCaption.Left := 0;\r\n pnlFormCaption.Top := 0;\r\n pnlFormCaption.Width := 838;\r\n pnlFormCaption.Height := 41;\r\n pnlFormCaption.ElementClassName := 'form_caption';\r\n pnlFormCaption.HeightStyle := ssAuto;\r\n pnlFormCaption.Align := alTop;\r\n pnlFormCaption.BorderColor := clWhite;\r\n pnlFormCaption.BorderStyle := bsNone;\r\n pnlFormCaption.Caption := 'Form Caption';\r\n pnlFormCaption.ChildOrder := 9;\r\n pnlFormCaption.ElementFont := efCSS;\r\n pnlFormCaption.Font.Charset := DEFAULT_CHARSET;\r\n pnlFormCaption.Font.Color := clWindowText;\r\n pnlFormCaption.Font.Height := -16;\r\n pnlFormCaption.Font.Name := 'Tahoma';\r\n pnlFormCaption.Font.Style := [];\r\n pnlFormCaption.ParentFont := False;\r\n pnlFormCaption.TabOrder := 4;\r\n SetEvent(pnlFormCaption, Self, 'OnMouseMove', 'pnlFormCaptionMouseMove');\r\n finally\r\n WebLabel15.AfterLoadDFMValues;\r\n WebLabel1.AfterLoadDFMValues;\r\n SubForm_DIV.AfterLoadDFMValues;\r\n WebLabel2.AfterLoadDFMValues;\r\n B1.AfterLoadDFMValues;\r\n WebPanel70.AfterLoadDFMValues;\r\n WebLabel36.AfterLoadDFMValues;\r\n WebSpeedButton33.AfterLoadDFMValues;\r\n M1.AfterLoadDFMValues;\r\n WebHTMLContainer2.AfterLoadDFMValues;\r\n B3.AfterLoadDFMValues;\r\n WebPanel72.AfterLoadDFMValues;\r\n WebLabel37.AfterLoadDFMValues;\r\n WebSpeedButton34.AfterLoadDFMValues;\r\n M3.AfterLoadDFMValues;\r\n WebHTMLContainer3.AfterLoadDFMValues;\r\n B5.AfterLoadDFMValues;\r\n WebPanel74.AfterLoadDFMValues;\r\n WebLabel38.AfterLoadDFMValues;\r\n WebSpeedButton35.AfterLoadDFMValues;\r\n M5.AfterLoadDFMValues;\r\n WebHTMLContainer5.AfterLoadDFMValues;\r\n B2.AfterLoadDFMValues;\r\n WebPanel76.AfterLoadDFMValues;\r\n WebLabel39.AfterLoadDFMValues;\r\n WebSpeedButton36.AfterLoadDFMValues;\r\n M2.AfterLoadDFMValues;\r\n WebHTMLContainer1.AfterLoadDFMValues;\r\n B4.AfterLoadDFMValues;\r\n WebPanel78.AfterLoadDFMValues;\r\n WebLabel40.AfterLoadDFMValues;\r\n WebSpeedButton37.AfterLoadDFMValues;\r\n M4.AfterLoadDFMValues;\r\n WebHTMLContainer4.AfterLoadDFMValues;\r\n B6.AfterLoadDFMValues;\r\n WebPanel80.AfterLoadDFMValues;\r\n WebLabel41.AfterLoadDFMValues;\r\n WebSpeedButton38.AfterLoadDFMValues;\r\n M6.AfterLoadDFMValues;\r\n WebHTMLContainer6.AfterLoadDFMValues;\r\n B7.AfterLoadDFMValues;\r\n WebPanel82.AfterLoadDFMValues;\r\n WebLabel42.AfterLoadDFMValues;\r\n WebSpeedButton39.AfterLoadDFMValues;\r\n M7.AfterLoadDFMValues;\r\n WebHTMLContainer7.AfterLoadDFMValues;\r\n B8.AfterLoadDFMValues;\r\n WebPanel86.AfterLoadDFMValues;\r\n WebLabel43.AfterLoadDFMValues;\r\n WebSpeedButton40.AfterLoadDFMValues;\r\n M8.AfterLoadDFMValues;\r\n WebHTMLContainer8.AfterLoadDFMValues;\r\n B9.AfterLoadDFMValues;\r\n WebPanel88.AfterLoadDFMValues;\r\n WebLabel44.AfterLoadDFMValues;\r\n WebSpeedButton41.AfterLoadDFMValues;\r\n M9.AfterLoadDFMValues;\r\n WebHTMLContainer9.AfterLoadDFMValues;\r\n B10.AfterLoadDFMValues;\r\n WebPanel91.AfterLoadDFMValues;\r\n WebLabel45.AfterLoadDFMValues;\r\n WebSpeedButton42.AfterLoadDFMValues;\r\n M10.AfterLoadDFMValues;\r\n WebHTMLContainer10.AfterLoadDFMValues;\r\n B19.AfterLoadDFMValues;\r\n WebPanel93.AfterLoadDFMValues;\r\n WebLabel46.AfterLoadDFMValues;\r\n WebSpeedButton43.AfterLoadDFMValues;\r\n M19.AfterLoadDFMValues;\r\n WebHTMLContainer19.AfterLoadDFMValues;\r\n B20.AfterLoadDFMValues;\r\n WebPanel95.AfterLoadDFMValues;\r\n WebLabel47.AfterLoadDFMValues;\r\n WebSpeedButton44.AfterLoadDFMValues;\r\n M20.AfterLoadDFMValues;\r\n WebHTMLContainer20.AfterLoadDFMValues;\r\n B15.AfterLoadDFMValues;\r\n WebPanel97.AfterLoadDFMValues;\r\n WebLabel48.AfterLoadDFMValues;\r\n WebSpeedButton45.AfterLoadDFMValues;\r\n M15.AfterLoadDFMValues;\r\n WebHTMLContainer15.AfterLoadDFMValues;\r\n B14.AfterLoadDFMValues;\r\n WebPanel99.AfterLoadDFMValues;\r\n WebLabel49.AfterLoadDFMValues;\r\n WebSpeedButton46.AfterLoadDFMValues;\r\n M14.AfterLoadDFMValues;\r\n WebHTMLContainer14.AfterLoadDFMValues;\r\n B13.AfterLoadDFMValues;\r\n WebPanel101.AfterLoadDFMValues;\r\n WebLabel50.AfterLoadDFMValues;\r\n WebSpeedButton47.AfterLoadDFMValues;\r\n M13.AfterLoadDFMValues;\r\n WebHTMLContainer13.AfterLoadDFMValues;\r\n B12.AfterLoadDFMValues;\r\n WebPanel103.AfterLoadDFMValues;\r\n WebLabel51.AfterLoadDFMValues;\r\n WebSpeedButton48.AfterLoadDFMValues;\r\n M12.AfterLoadDFMValues;\r\n WebHTMLContainer12.AfterLoadDFMValues;\r\n B11.AfterLoadDFMValues;\r\n WebPanel105.AfterLoadDFMValues;\r\n WebLabel52.AfterLoadDFMValues;\r\n WebSpeedButton49.AfterLoadDFMValues;\r\n M11.AfterLoadDFMValues;\r\n WebHTMLContainer11.AfterLoadDFMValues;\r\n B16.AfterLoadDFMValues;\r\n WebPanel107.AfterLoadDFMValues;\r\n WebLabel53.AfterLoadDFMValues;\r\n WebSpeedButton50.AfterLoadDFMValues;\r\n M16.AfterLoadDFMValues;\r\n WebHTMLContainer16.AfterLoadDFMValues;\r\n B17.AfterLoadDFMValues;\r\n WebPanel109.AfterLoadDFMValues;\r\n WebLabel54.AfterLoadDFMValues;\r\n WebSpeedButton51.AfterLoadDFMValues;\r\n M17.AfterLoadDFMValues;\r\n WebHTMLContainer17.AfterLoadDFMValues;\r\n B18.AfterLoadDFMValues;\r\n WebPanel111.AfterLoadDFMValues;\r\n WebLabel55.AfterLoadDFMValues;\r\n WebSpeedButton52.AfterLoadDFMValues;\r\n M18.AfterLoadDFMValues;\r\n WebHTMLContainer18.AfterLoadDFMValues;\r\n Memo.AfterLoadDFMValues;\r\n pnlFormButtons.AfterLoadDFMValues;\r\n btnClose.AfterLoadDFMValues;\r\n btnSave.AfterLoadDFMValues;\r\n btnUseDefaults.AfterLoadDFMValues;\r\n btnSaveAsDefaults.AfterLoadDFMValues;\r\n btnAdd.AfterLoadDFMValues;\r\n btnClear.AfterLoadDFMValues;\r\n btnSentenceTemplate.AfterLoadDFMValues;\r\n btnClearBlockCustomPositioning.AfterLoadDFMValues;\r\n btnClearBlockCustomSizes.AfterLoadDFMValues;\r\n btnFixBlockPositions.AfterLoadDFMValues;\r\n PNL_PICKFORM_PNLGRID.AfterLoadDFMValues;\r\n pnlFormCaption.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","unit Common;\r\n{\r\nForm and Block unique ID rules used to read/save data:\r\n\r\nForm ( to read/save form design ): form_name + target_memo_name + design_panel_name ).\r\n Target_memo_name - used when form is called for a\r\n certain memo/block. Pickform for example.\r\n\r\nBlock Data ( to read / save setting for blcok db field and form Q.pick list ) :\r\n First_level_form_name + First_level_Block_name [+ Second_level_form_name + Second_level_block_name].\r\n\r\n}\r\n\r\n\r\ninterface\r\n\r\nuses 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.Buttons, WEBLib.ExtCtrls, WEBLib.WebCtrls, WEBLib.Modules, Data.DB,\r\n XData.Web.JsonDataset, XData.Web.Dataset, WEBLib.Storage, XData.Web.Connection,\r\n WEBLib.DBCtrls, WEBLib.Toast, System.Math, VCL.TMSFNCSwitch, DateUtils, WEBLib.Clipboard,\r\n StrUtils, Types, WebLib.JSON, XData.Web.Client, WEBLib.WebTools, WEBLib.Grids, WEBLib.DB,\r\n VCL.TMSFNCTypes, VCL.TMSFNCUtils, VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes,\r\n VCL.TMSFNCCustomControl, VCL.TMSFNCListBox, VCL.TMSFNCCheckedListBox;\r\n\r\nfunction ImageAnnotate(image_p: TDBImageControl): string;\r\nfunction ImageAnnotate_new(image_p: TDBImageControl): string;\r\nfunction TColorToHex( Color : string ): string;\r\nfunction DecimalColorToHex(Color: TColor): string;\r\nprocedure MemoEndOfText(m: TMemo);\r\nprocedure LS_Save;\r\nprocedure LS_Load;\r\nprocedure CallArgus;\r\nprocedure APPSettings_Copy(from_p: string; to_p: string; useridfrom_p: string='SYSDBA'; useridto_p: string='SYSDBA');\r\n\r\nprocedure SetSystemVariablesFromStorage;\r\nprocedure CustomizeDateTimeFormats;\r\nprocedure ResizeButtons(ButtonPanel_p: TPanel; forceresize_p: boolean=true);\r\n\r\nprocedure GetPostFormDefaultsdata(formname_p: string; mode_p: integer=0; Block_p: Tpanel=nil); // mode: 0-get/ 1-post\r\nprocedure ApplyFormDefaults(block_p: TPanel=nil);\r\nprocedure CollectFormDefaults(Formname_p: string);\r\n\r\nprocedure StretchAllMemos(container_p: TControl);\r\nprocedure StretchMemo(WebMemo_p: TMemo);\r\nprocedure OrganizeBlocks(formdiv_p: TScrollBox; columns_p: integer=0; AutoAllowed: boolean=true);\r\nprocedure ResizeFormBlocks(Form_DIV: TScrollBox; col: integer=0; AutoAllowed: boolean=true);\r\nprocedure loadFormDesignInfo(formname_p: string);\r\nprocedure CollectFormDesignInfo(objectname_p: string; mode_p: integer = 1; BlockTitle_Old_p: string='';\r\n BlockTitle_New_p: string=''; formname_p: string=''; formdiv_p: TScrollBox=nil;\r\n ResizeBlocks_p: boolean=false);\r\nprocedure GetPostFormDesignData(formname_p: string; type_p: string; mode_p: integer=0; designpanel_p: TScrollBox=nil;\r\n columns_p: integer=0; ResizeBlocks_p: boolean=false); // mode: 0-get/ 1-post\r\nprocedure ApplyFormDesign(maincontrol_p: TControl; mode_p: integer=1; Visible: boolean=false; formname_p: string='');\r\nprocedure BlockTitleEdit(Sender: TObject);\r\nprocedure DBF_GetPostBlocks(Div_p: TScrollBox; mode: integer; form_p: TForm=nil; mode_p: integer=0);\r\nprocedure DBF_GetPostFieldData(Block_p: TPanel; mode: integer; form_p: TForm;\r\n var InsertSQL_Table: string; var InsertSQL_Columns: string; var InsertSQL_Values: string;\r\n var UpdateScript: string; CreateScript:boolean=false);\r\nprocedure DBF_FillSettings(s: string; aForm: TForm);\r\nprocedure FinishBlockTitleEdit(Sender: TObject);\r\nprocedure SwitchFormDesign(form_p: TForm; DesignPanel_p: TScrollBox=nil; columns_p: integer=0;AutoAllowed: Boolean=true);\r\nfunction GetBlockUniqueID(block_p: TPanel; activate_p: boolean=true): string;\r\n\r\nprocedure BlockShowDBFieldSettings;\r\nprocedure BlockShowQPickList(Sender: TObject);\r\nprocedure BlockClearData(Sender: TObject);\r\nprocedure BlockStretchGrid(aGrid: TDBGrid);\r\nprocedure BlockSetPickListType(Sender: TObject);\r\nprocedure BlockDragOverTitle(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);\r\nprocedure BlockDragDrop(Sender, Source: TObject; X, Y: Integer; form_p: Tform=nil; formdiv_p: TScrollBox=nil; columns_p: integer=0);\r\nprocedure Block_Hide_Show(Sender: TObject);\r\nprocedure BlockCallPickform(Sender: TObject);\r\nprocedure BlockShowPickList(mode_p: integer=0);\r\nprocedure Block_MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer;\r\n mode: string='btnClearBlockData,btnDefaultBlockData,btnInsertCurrentDate,btnQPKLDatePicker,miCurrentTime,btnQPKLTimePicker,btnDBField_Settings,cbPickListType,edtPickListCustomForm,btnQuickPicklistSettings,miClearCache'; form_p: TForm=nil);\r\n\r\nprocedure Block_MouseLeave(Sender: TObject);\r\nprocedure BlockInsertDate(date_p: TDateTime=0);\r\nprocedure BlockInsertCurrentTime(Sender: TObject);\r\nprocedure BlockInsertFromCalendar(Sender: TObject);\r\nprocedure BlockInsertFromTimePicker(Sender: TObject);\r\nprocedure BlockInsertFromDatePicker(Sender: TObject);\r\nprocedure BlockInsertRadioGroup(Sender: TObject);\r\nprocedure BlockInsertSpinEdit(Sender: TObject);\r\nprocedure BlockCalendarDateSelected(Sender: TObject; ADate: TDateTime);\r\nprocedure BlockInsertTimeSelected(time_p: TDatetime=0);\r\nprocedure Block_GridSetUp(Sender: TObject);\r\nprocedure Block_GridPost(Sender: TObject; Grid_p: TDBGrid=nil);\r\nprocedure Block_GridNewRecord(Sender: TObject);\r\nprocedure Block_DeleteGridRecord(Sender: TObject);\r\nprocedure BlockShowEditMask(Sender: TObject);\r\nprocedure BlockEditBoxMouseLeave(Sender: TObject);\r\nfunction BlockGetTitle(Block_p: Tpanel): string;\r\nfunction BlockGetTitleLabel(Block_p: Tpanel): Tlabel;\r\nfunction BlockGetBlockByTitle(Title_p: string; container_p: TScrollBox): TPanel;\r\nfunction BlockGetBlockByName(Name_p: string; container_p: TScrollBox): TPanel;\r\nfunction BlockGetTopPanel(Block_p: Tpanel): Tpanel;\r\nfunction BlockGetEditButton(Block_p: Tpanel): TSpeedButton;\r\nfunction BlockGetMemo(Block_p: Tpanel): TMemo;\r\nfunction BlockGetMemoByTitle(Title_p: string; container_p: TScrollBox): TMemo;\r\nfunction BlockGetHTML(Block_p: Tpanel): THTMLContainer;\r\nfunction BlockGetGrid(Block_p: Tpanel): TDBGrid;\r\nprocedure BlockApplyDependencies(block_p: TPanel; value_p: string);\r\nprocedure BlockDataDistribute(SourceBlock_p: TPanel);\r\n\r\nprocedure Grid_SetUpColumns(grd_p: TDBGrid);\r\nprocedure Grid_AdjustColumns(aGrid: TDBGrid; stretch_p: boolean=true; fixedrowhight: integer=30);\r\nprocedure Grid_SetTitleHeight(aGrid: TDBGrid);\r\nprocedure Grid_Post(SQl_p: string; memGridColumns: TMemo; grd: TDBGrid);\r\nprocedure Grid_NewRecord(SQl_p: string; memGridColumns: TMemo; grd: TDBGrid);\r\nprocedure Grid_DeleteRecord(SQl_p: string; memGridColumns: TMemo; grd: TDBGrid);\r\nprocedure HideShowFormGrids(form_p: TForm; Show_p: Boolean=false);\r\n\r\nprocedure QPKLSaveAndClose(Sender: TObject);\r\nprocedure QPKLShowSettings(Sender: TObject);\r\nprocedure QPKL_LoadFromDataset(Dataset_p: TXDataWebDataset; FieldName_p: string;\r\n ListBox_p: TTMSFNCCheckedlistBox=nil; SourceType_p: string='';\r\n Cache_p: Boolean=true);\r\nprocedure QPKL_LoadCache(Block_p: Tpanel; ResultList_p: TListBox=nil);\r\n\r\nprocedure QPKLClearCache;\r\nfunction Response_to_JSArray(Response: TXDataClientResponse): TJSArray;\r\nprocedure FitQPickList(Dataset_p: TDataset);\r\nprocedure DataSetApplyUpdate(Dataset: TDataset; mode: string='U'; AuthDB: integer=0);\r\nprocedure PKLOpen(HideCommonItems_p: Boolean=false);\r\nfunction IsAllDigit(s:String):Boolean;\r\n\r\nfunction GetCurrentForm(): TForm;\r\nfunction GetPreviousForm(Depth_p: integer=1): TForm;\r\nfunction GetCurrentFormDiv(): TScrollBox;\r\nfunction GetCurrentFormName(): string;\r\nfunction GetDynamicGridDataSource(): TDataSource;\r\nprocedure ReleaseGridDatasets(form_p: TForm);\r\nprocedure RefreshGridDataSources(form_p: TForm);\r\n\r\nprocedure CreateMainMenu;\r\nprocedure LoadMainMenu;\r\nprocedure ShowHideSubItems(Sender: TBitBtn);\r\nprocedure ChangeMainMenuHighlight;\r\n\r\nprocedure PrepareFields_J(Dataset: TDataset);\r\nprocedure PrepareFieldsData_J(Dataset: TDataset);\r\nprocedure OpenDataSet_J(Dataset: TDataset; SQL_p: string; Grd_p: TDBGrid=nil);\r\n\r\nfunction GetFormContainer(): THTMLDiv;\r\nfunction GetCurrentFormContainer(): THTMLDiv;\r\nfunction GetSubForm(): integer;\r\nfunction HideFormContainer(ReleasePointer: Boolean=false): THTMLDiv;\r\nprocedure ReleaseSubForms(releaseall: boolean; level_p: integer=0);\r\n\r\nfunction InsertKeyValues(SQL_p: string; quotestring_p: Boolean=true): string;\r\nprocedure SetKeyVariablesFromDataSet(dataset: TDataset; mode: Boolean=false);\r\nprocedure SaveKeyVariables();\r\nprocedure RestoreKeyVariables();\r\nfunction IsSystemKeysChanged(): Boolean;\r\n\r\nfunction FindParentForm(control_p: TControl): TForm;\r\nfunction GetDesignArea(control_p: TControl): TScrollBox;\r\n\r\nprocedure CallForm(containername_p: string; tag_p: integer = 0; callfrommainmenu_p: boolean=false );\r\nprocedure CallFormPrepare(containername_p: string; tag_p: integer = 0; APIcall_p: string=''; callfrommainmenu_p: boolean=false);\r\n\r\nfunction Grid_GetTableAndColumns(mode: integer; SQL_p: string; memGridColumns: TMemo): string;\r\nfunction Grid_GetColumnsAndValues(SQL_p: string; memGridColumns: TMemo; grd: TDBGrid): string;\r\n\r\nfunction Grid_GetIsertedFields(SQL_p: string; memGridColumns: TMemo; grd: TDBGrid): string;\r\nfunction Grid_GetIsertedValues(SQL_p: string; memGridColumns: TMemo; grd: TDBGrid): string;\r\n\r\nprocedure Grid_GetInsertDataForColumn(expr_p: string; grd: TDBGrid; fieldname_p: string);\r\n\r\nprocedure Form_AdjustGrids(form_p: TForm; grid_p: TDBGrid=nil);\r\n\r\nFunction S_TextWidth(const Text:String; Font:TFont) : Integer;\r\n\r\nprocedure OpenMainForm;\r\n\r\nprocedure RunReport(Viewpdf: TBrowserControl; TemplateType: string=''; TemplateID: integer = 1; Stretch_p: Boolean=true);\r\n\r\nfunction BlockGetSentenceTMP(BlockUniqueID_p: string): string;\r\nfunction BlockGetCopyTMP(BlockUniqueID_p: string): string;\r\n\r\nprocedure ParseAndShowMainMenuLine;\r\nprocedure ParseAndShowGridSetupLine;\r\nfunction PrepareScript(t_p: string; c_p: string; s_p: string): string;\r\nfunction ReplaceddataBlockLinks(text_p: string; container_p: TScrollBox): string;\r\n\r\nfunction GetArgusURL(): string;\r\nprocedure AlignFilterColumns;\r\n\r\nfunction GetLocationByXY(X: integer; Y: integer): string;\r\n\r\nprocedure ClearBlockCustomPositioning;\r\nprocedure ClearBlockCustomSizes;\r\nprocedure FixBlockPositions;\r\n\r\nfunction DBType(var SQL_p : string ): integer;\r\n\r\nfunction ParseArgusXml(XmlStr: string): string;\r\n\r\nprocedure SpeechProcess(command_p: string; parameters_p: Tstrings);\r\n\r\nvar\r\n EGV_SCREENSIZE: string='';\r\n\r\n //Image management\r\n EGV_CURRENTIMAGE: string='';\r\n EGV_CAPTUREDIMAGEBASE64: string='';\r\n\r\n ELV_REPORTFILENAME: string;\r\n\r\n // ARGUS\r\n ELV_ARGUSURL: string='';\r\n ELV_SESSIONID: string='';\r\n ELV_VIDEODLLPATH: string='';\r\n ELV_APPLICATIONURL: string='';\r\n ELV_RANDOMSTR: string='';\r\n\r\n ELV_QAI_SESSIONID: string='';\r\n ELV_QAI_ANSWER: string='';\r\n ELV_QAI_FILETOUPLOAD_BASE64: string='';\r\n ELV_QAI_FILETOUPLOAD_LIST: string='';\r\n ELV_QAI_CURRENTSESSIONINFO: string='';\r\n ELV_QAI_SESSIONSLIST: string='';\r\n\r\n ELV_SPEECHRECEIVER: TMemo;\r\n ELV_SPEECH_STARTED: Boolean;\r\n ELV_SPEECH_FIRSTSTART: Boolean;\r\n ELV_SPEECHTARGET: TMemo;\r\n ELV_SPEECHCOMMAND: string;\r\n\r\n ELV_CERNERENCOUNTER_ID : string = '';\r\n ELV_CERNERECOUNTER_DATE: string = '';\r\n ELV_CERNERENCOUNTER_TIME: string = '';\r\n ELV_CERNERPROVIDER_CODE: string = '';\r\n ELV_PATIENTCERNERID: string = '';\r\n ELV_CERNERPATIENT_NAME: string = '';\r\n ELV_CERNERFILETOUPLOAD: string = '';\r\n ELV_CERNERPATIENTSEARCHPARAMS: string = '';\r\n\r\n ELV_PATIENTEPICID: string = '';\r\n ELV_EPICPATIENT_NAME: string = '';\r\n\r\n EGV_QAI_WAITMESSAGECOLOR: string='';\r\n EGV_QAI_SERVERMESSAGECOLOR: string='';\r\n EGV_QAI_QUESTIONCOLOR: string='';\r\n EGV_QAI_ANSWERCOLOR: string='';\r\n\r\n EGV_QAI_WAITMESSAGEICON: string='';\r\n EGV_QAI_SERVERMESSAGEICON: string='';\r\n EGV_QAI_QUESTIONICON: string='';\r\n EGV_QAI_ANSWERICON: string='';\r\n\r\n EGV_QAI_WAITMESSAGEICONCOLOR: string='';\r\n EGV_QAI_SERVERMESSAGEICONCOLOR: string='';\r\n EGV_QAI_QUESTIONICONCOLOR: string='';\r\n EGV_QAI_ANSWERICONCOLOR: string='';\r\n\r\n EGV_QAI_BIDDINGDOCS: string='0';\r\n EGV_QAI_DEFAULTFILESTOUPLOAD: string='';\r\n EGV_QAI_DEFAULTBIDDINGDOCSTOUPLOAD: string='';\r\n\r\n ELV_EHRSOURCE: string='';\r\n EGV_CALLERID: string='';\r\n\r\n EGV_LOCALVIDEODLLPATH: string='Local Video DLL path';\r\n\r\n // sql_pool_num: integer;\r\n EGV_FORM_LEVEL: integer=0;\r\n EGV_REPORTTEMPLATENAME: string;\r\n EGV_CURRENTFORMNAME: string='';\r\n EGV_CURRENTFORMNAME_L2: string='';\r\n EGV_CURRENTFORMNAME_L3: string='';\r\n EGV_CURRENTFORMNAME_L4: string='';\r\n EGV_CURRENTFORMNAME_L5: string='';\r\n\r\n EGV_SUBFORMPOOL: string='';\r\n EGV_SCREENWIDTH_HIDEALERTS: integer;\r\n EGV_SCREENWIDTH_SHRINKBUTTONS: integer;\r\n EGV_SCREENWIDTH_SHRINKMAINMENU: integer;\r\n EGV_SRENBNWIDTH_SHRINKMAINBOTTOM: integer;\r\n EGV_SRENBNWIDTH_SHRINKSCHEDULETOP: integer;\r\n\r\n EGV_ARRAYOFSTRING: Array[0..1000] of string;\r\n\r\n EGV_SERVERBASEURL : string;\r\n EGV_DBSERVER : string;\r\n EGV_DBSERVICEURL : string;\r\n\r\n EGV_REPORTSURL : string;\r\n EGV_DOCUMENTSURL : string;\r\n EGV_IMAGESURL : string;\r\n\r\n //Picklist Key:\r\n EGV_USERID: string;\r\n EGV_SECTIONNAME: string;\r\n EGV_IDENTNAME: string;\r\n\r\n EGV_FACILITYID: string = '49';\r\n EGV_SETUPFACILITYID:string = '';\r\n EGV_SPECIALITY: string = '';\r\n EGV_FACILITY: string = 'Clinique Endovision Plus';\r\n EGV_FACILITYLIST: string;\r\n EGV_FACILITYDBNAME: string;\r\n EGV_FACILITYDBUSER: string;\r\n EGV_FACILITYDBPASSWORD: string;\r\n EGV_FACILITYCODE: string;\r\n EGV_FACILITYTOKEN: string='';\r\n\r\n EGV_PKLNEXTID: integer;\r\n\r\n // dataset to refresh after calling from second level form\r\n PKL_DATASET_TO_REFRESH: TXDataWebDataSet;\r\n\r\n // Qucick picklist filter\r\n EGV_QPKLFILTER: string;\r\n EGV_QPKLCONTAINER: TTMSFNCCheckedListBox=nil;\r\n EGV_QPKLSOURCETYPE: string='';\r\n EGV_USEQPKL_CACHE: Boolean=false;\r\n\r\n //\r\n EGV_BLOCKUNIQUEID_0: string; // to remove\r\n EGV_BLOCKUNIQUEID: string;\r\n\r\n //Picklist target DBMemo\r\n EGV_PKLTARGETMEMONAME: string='';\r\n EGV_PKLTARGETMEMO: TMEMO=nil;\r\n EGV_PKLTARGETMEMOBLOCK: TPANEL;\r\n EGV_PKLTARGETGRIDFIELDS: string='';\r\n EGV_PKLEDITMODE: Boolean=false;\r\n EGV_PKLMODE: integer; // 0- regular( result can go to target memo field ), 1- edit picklist only. DO NOT clear target memo when close.\r\n\r\n EGV_CURRENTFORM_DIV: TScrollBox;\r\n EGV_CURRENTFORM_BOTTOM: TPANEL;\r\n\r\n\r\n EGV_CURRENTBLOCK: TPANEL;\r\n EGV_FORMCOLUMNS: integer=2;\r\n EGV_FORMCOLUMNSAUTO: boolean=false;\r\n EGV_BLOCKDEFAULTWIDTH: integer;\r\n EGV_BLOCKDEFAULTHEIGHT: integer;\r\n\r\n EGV_FORMDESIGN: string='';\r\n EGV_FORMDESIGN_P: string='';\r\n EGV_FORMDESIGN_T: string='';\r\n EGV_FORMDESIGN_M: string='';\r\n\r\n EGV_DESIGNFORMNAME: string='';\r\n EGV_FORMDEFAULTS: string='';\r\n EGV_SHOWHIDDENBLOCKSINDESIGN: boolean=true;\r\n EGV_NOHORIZONTALLINEUP: boolean=false;\r\n\r\n\r\n EGV_USERNAME : string='';\r\n EGV_USERFULLNAME: String='';\r\n EGV_USERROLE : String='';\r\n EGV_USERLOGINNAME : string='';\r\n EGV_USERLOGINPASSWORD: String='';\r\n\r\n // EGV_PatientNames: string;\r\n // EGV_ScheduleFilter: string;\r\n // EGV_ScheduleOrder: string;\r\n // EGV_PatientListFilter: string;\r\n // EGV_RefPhyFilter: string;\r\n // EGV_PatientsOrder: string;\r\n\r\n EGV_RECNO: integer; // to stay on selected record in the lits after refresh ( ListForm_Base)\r\n\r\n // EGV_GRIDBEINGMODIFIED: TWebDBGrid;\r\n // EGV_GridSetupButtonClciked: TWebSpeedButton;\r\n // EGV_GridRefreshButton: TWebBitBtn;\r\n\r\n EGV_SHOWCOMMONPICKLIST: Boolean=true;\r\n\r\n EGV_SUBFORM: TForm = nil;\r\n EGV_SUBFORM2: TForm = nil;\r\n EGV_SUBFORM3: TForm = nil;\r\n EGV_SUBFORM4: TForm = nil;\r\n EGV_SUBFORM5: TForm = nil;\r\n EGV_SUBFORM6: TForm = nil;\r\n EGV_SUBFORM7: TForm = nil;\r\n EGV_SUBFORM8: TForm = nil;\r\n EGV_SUBFORM9: TForm = nil;\r\n\r\n EGV_SUBFORMCAPTION: string;\r\n\r\n EGV_PARENT_MEMO: TDBMemo;\r\n EGV_PARENT_DBGRID: TDBGRID;\r\n EGV_CHILD_DATASOURCE: TDataSource;\r\n EGV_CHILD_DATAFIELD: string;\r\n EGV_CHILD_FORM_CAPTION: String;\r\n EGV_CHILD_FORM_SECTION: String;\r\n\r\n EGV_GRIDTOSETUP: TDBGrid;\r\n\r\n EGV_CURRENT_PROCEDURENUMBER: string='0'; //'4796';\r\n EGV_CURRENT_ENCOUNTERNUMBER: string='0'; //'4796';\r\n EGV_NEW_PROCEDURENUMBER: string='';\r\n EGV_CURRENT_PROCIMAGECOUNT: string='0';\r\n EGV_CURRENT_APPTDATE: string;\r\n\r\n EGV_CURRENT_MRN: string=''; //'FUJ84_NORAMQ';\r\n EGV_CURRENT_PATIENTNAME: string='';\r\n EGV_CURRENT_PATIENTDOB: string='';\r\n EGV_PATIENTFHIRID: string='';\r\n\r\n EGV_NEW_MRN: string='';\r\n EGV_CURRENT_PROVIDER: string='';\r\n EGV_CURRENT_NURSE1: string='';\r\n EGV_CURRENT_NURSE2: string='';\r\n EGV_STARTDATE: string='';\r\n EGV_ENDDATE: string='';\r\n\r\n EGV_STARTDATE_DATE: TDateTime;\r\n EGV_ENDDATE_DATE: TDateTime;\r\n\r\n\r\n EGV_CURRENT_APPTNAME: string='';\r\n EGV_CURRENT_REFPHYCODE: string='0';\r\n EGV_CURRENT_APPTTYPE: string='';\r\n\r\n EGV_CURRENT_MEDID: string='0';\r\n EGV_CURRENT_PROBLEMID: string='0';\r\n EGV_CURRENT_ALLERGYID: string='0';\r\n\r\n EGV_CURRENTDATE: string;\r\n EGV_CURRENTTIME: string;\r\n\r\n EGV_CURRENTDYNAMICGRID: TDBGrid=nil;\r\n\r\n // Multi level picklist form settings:\r\n EGV_MULTILEVEL_PKL_GROUPCHECKBOX_CAPTION: string;\r\n\r\n // LGV_IMAGE_X_Y: string;\r\n\r\nimplementation\r\n\r\nuses main, datamodule, Picklist, PickForm, UDF_Schedule, EditForm_base, ReportForm, ListForm_Base, DynamicGridSetup,\r\n MultiLevelPickForm, UDF_CustomForm, DBFieldSettings, QPKLSettings, UDF_QAI,\r\n UDF_ImageEditor, UDF_ImageCapture, UDF_CernerAPI, UDF_ProcReport_EV,\r\n UDF_ProcReport_Q, UDF_CernerPatients;\r\n\r\nprocedure ApplyFormDefaults(block_p: TPanel=nil);\r\nvar i, j: integer; c, c2: Tcontrol; s, value_p: string; event_p: TNotifyEvent;\r\n formdiv_p: TScrollBox;\r\nbegin\r\nformdiv_p := GetCurrentFormDiv;\r\n//showmessage(EGV_FORMDEFAULTS);\r\nif EGV_FORMDEFAULTS <> ''\r\nthen begin\r\nfor i:=0 to formdiv_p.ControlCount - 1\r\ndo begin\r\n c := (formdiv_p.controls[i] as TControl);\r\n if (c is TPanel) and ( (block_p = nil) or (c.Name = block_p.Name) ) and (c as TPanel).visible\r\n then begin\r\n\r\n //skip the blcok if 'update' is not allowed\r\n GetBlockUniqueID((c as TPanel));\r\n s := dm.egv_localstorage.values['DBF_' + EGV_BLOCKUNIQUEID];\r\n //showmessage(s);\r\n if ( length(splitstring(s,'|')) < 21) or (splitstring(s,'|')[20] = '') or (splitstring(s,'|')[20] = '0' ) then continue;\r\n\r\n for j := 0 to (c as TPanel).controlcount - 1\r\n do begin\r\n c2 := (c as TPanel).controls[j];\r\n //showmessage(c2.name);\r\n if pos('#'+c2.Name+'~', EGV_FORMDEFAULTS) = 0 then continue;\r\n value_p := copy(EGV_FORMDEFAULTS, pos('#'+c2.Name+'~', EGV_FORMDEFAULTS) + length('#'+c2.Name+'~'),\r\n length(EGV_FORMDEFAULTS));\r\n value_p := copy(value_p, 1, pos('#', value_p) - 1);\r\n if (c2 is Tmemo) and ( not (c2 as Tmemo).readonly )\r\n then begin\r\n // showmessage((c2 as twebmemo).name);\r\n (c2 as Tmemo).text := value_p;\r\n BlockApplyDependencies((c2.Parent as TPanel), (c2 as Tmemo).text);\r\n StretchMemo((c2 as Tmemo));\r\n (c2 as Tmemo).Tag := 1;\r\n //if assigned((c2 as TWebMemo).OnChange) then (c2 as TWebMemo).OnChange(c2);\r\n end;\r\n { if (c2 is twebdbmemo) and ( not (c2 as twebdbmemo).datasource.DataSet.FieldByName((c2 as twebdbmemo).DataField).readonly )\r\n then begin\r\n (c2 as twebdbmemo).datasource.DataSet.edit;\r\n (c2 as twebdbmemo).datasource.DataSet.FieldByName((c2 as twebdbmemo).DataField).value := value_p;\r\n end;\r\n if (c2 is TWebDBComboBox) and ( not (c2 as TWebDBComboBox).datasource.DataSet.FieldByName((c2 as TWebDBComboBox).DataField).readonly )\r\n then begin\r\n (c2 as TWebDBComboBox).datasource.DataSet.edit;\r\n (c2 as TWebDBComboBox).datasource.DataSet.FieldByName((c2 as TWebDBComboBox).DataField).value := value_p;\r\n end;\r\n if (c2 is TWebDBLookUpComboBox) and ( not (c2 as TWebDBLookUpComboBox).datasource.DataSet.FieldByName((c2 as TWebDBLookUpComboBox).DataField).readonly )\r\n then begin\r\n (c2 as TWebDBLookUpComboBox).datasource.DataSet.edit;\r\n (c2 as TWebDBLookUpComboBox).datasource.DataSet.FieldByName((c2 as TWebDBLookUpComboBox).DataField).value := value_p;\r\n end;\r\n if (c2 is TWebDBCheckBox) and ( not (c2 as TWebDBCheckBox).datasource.DataSet.FieldByName((c2 as TWebDBCheckBox).DataField).readonly )\r\n then begin\r\n (c2 as TWebDBCheckBox).datasource.DataSet.edit;\r\n (c2 as TWebDBCheckBox).datasource.DataSet.FieldByName((c2 as TWebDBCheckBox).DataField).value := value_p;\r\n end;\r\n if (c2 is TWebDBRadioGroup) and ( not (c2 as TWebDBRadioGroup).datasource.DataSet.FieldByName((c2 as TWebDBRadioGroup).DataField).readonly )\r\n then begin\r\n (c2 as TWebDBRadioGroup).datasource.DataSet.edit;\r\n (c2 as TWebDBRadioGroup).datasource.DataSet.FieldByName((c2 as TWebDBRadioGroup).DataField).value := value_p;\r\n end;\r\n if (c2 is TWebDBEdit) and ( not (c2 as TWebDBEdit).datasource.DataSet.FieldByName((c2 as TWebDBEdit).DataField).readonly )\r\n then begin\r\n event_p := (c2 as TWebDBEdit).onchange;\r\n (c2 as TWebDBEdit).onchange := nil;\r\n (c2 as TWebDBEdit).datasource.DataSet.edit;\r\n if (c2 as TWebDBEdit).datasource.DataSet.FieldByName((c2 as TWebDBEdit).DataField).datatype = ftFloat\r\n then begin\r\n if Value_p = '' then Value_p := '0';\r\n (c2 as TWebDBEdit).datasource.DataSet.FieldByName((c2 as TWebDBEdit).DataField).value := strtofloat(value_p);\r\n end\r\n else if (c2 as TWebDBEdit).datasource.DataSet.FieldByName((c2 as TWebDBEdit).DataField).datatype = ftInteger\r\n then begin\r\n if Value_p = '' then Value_p := '0';\r\n (c2 as TWebDBEdit).datasource.DataSet.FieldByName((c2 as TWebDBEdit).DataField).value := strtoInt(value_p);\r\n end\r\n else (c2 as TWebDBEdit).datasource.DataSet.FieldByName((c2 as TWebDBEdit).DataField).value := value_p;\r\n\r\n (c2 as TWebDBEdit).onchange := event_p;\r\n end; }\r\n end;\r\n end;\r\n\r\n end;\r\n end;\r\nend;\r\n\r\n\r\nprocedure StretchMemo(WebMemo_p: TMemo);\r\nvar i: integer; P: TPoint; html_p: THTMLContainer; Block_p: TPanel; block_id, s:string;\r\n//Tag:\r\n// -2 :set memo to client only and skip the rest\r\n// -1 : do not process in resizeblock() function\r\nbegin // showmessage('stretch starts: ' + webmemo_p.Name);\r\n\r\nif WebMemo_p.Tag = -1 then exit; // skip thisblock\r\nBlock_p := (WebMemo_p.parent as TPanel);\r\nif Block_p = nil then exit;\r\nif BlockGetTopPanel(Block_p) = nil then exit;\r\n\r\nblock_id := getblockuniqueid(block_p, false);\r\ns := dm.egv_localstorage.values['DBF_' + block_id];\r\nhtml_p := nil;\r\n\r\n//showmessage(webmemo_p.Parent.Name);\r\n\r\nif webmemo_p.visible\r\nthen begin\r\n // showmessage(webmemo_p.text);\r\n // if trim(webmemo_p.Text) = 'Christian' then showmessage(webmemo_p.text);\r\n WebMemo_p.align := alClient;\r\n // if webmemo_p.Align <> alClient then showmessage(webmemo_p.Name);\r\n if (Block_p.Tag = -2) or\r\n ((length(splitstring(s,'|')) >= 23) and (splitstring(s,'|')[22] <> '') and (splitstring(s,'|')[22] <> '0'))\r\n then exit;\r\n for i := WebMemo_p.lines.Count - 1 downto 0 do if (Trim(WebMemo_p.lines[i]) = '') then WebMemo_p.lines.Delete(i);\r\n\r\n { frmmain.lblMemodataText.width := WebMemo_p.width;\r\n frmmain.lblMemodataText.caption := WebMemo_p.text;\r\n Block_p.height := frmMain.lblMemodataText.height + BlockGetTopPanel(Block_p).Height + 10; //35; }\r\n\r\n frmMain.HTMLMemoDataText.width := WebMemo_p.width - 22;\r\n frmMain.HTMLMemoDataText.HTML.text := stringreplace(WebMemo_p.Text, chr(13), '
', [rfReplaceAll]);\r\n frmMain.HTMLMemoDataText.HTML.text := stringreplace(frmMain.HTMLMemoDataText.HTML.text, chr(10), '
', [rfReplaceAll]);\r\n frmMain.HTMLMemoDataText.HTML.text := frmMain.HTMLMemoDataText.HTML.text + '
';\r\n // frmMain.lblMemoDataText.HTML.text := frmMain.lblMemoDataText.HTML.text; // + '


';\r\n Block_p.height := frmMain.HTMLMemoDataText.height + BlockGetTopPanel(Block_p).Height + 10;\r\n end\r\nelse begin\r\n html_p := BlockGetHTML(block_p);\r\n if (html_p = nil) or (not html_p.Visible) then exit;\r\n html_p.align := alClient;\r\n if (Block_p.Tag = -2) or\r\n ((length(splitstring(s,'|')) >= 23) and (splitstring(s,'|')[22] <> '') and (splitstring(s,'|')[22] <> '0'))\r\n then exit;\r\n //showmessage(html_p.HTML.text);\r\n if trim(html_p.HTML.Text) = ''\r\n then Block_p.height := EGV_BLOCKDEFAULTHEIGHT //84\r\n else begin\r\n if (html_p.height + 28 + (html_p.height div 17)*2 + 14) < EGV_BLOCKDEFAULTHEIGHT\r\n then Block_p.Height := EGV_BLOCKDEFAULTHEIGHT\r\n else Block_p.height := html_p.height + 28; // + (html_p.height div 17)*2 + 14;\r\n // showmessage('stretch: ' + block_p.Name + ' - ' + inttostr(Block_p.height));\r\n end;\r\n end;\r\n\r\n if (uppercase((Block_p.Parent as TScrollBox).name) = 'SBSIDEDATA') then OrganizeBlocks((Block_p.Parent as TScrollBox), 1, false)\r\n else if (uppercase((Block_p.Parent as TScrollBox).name) = 'SBSEARCH') then OrganizeBlocks((Block_p.Parent as TScrollBox), 20, false)\r\n else if (uppercase((Block_p.Parent as TScrollBox).name) = 'SUBFORM_DIV') then OrganizeBlocks((Block_p.Parent as TScrollBox))\r\n else OrganizeBlocks((Block_p.Parent as TScrollBox), 5);\r\n\r\n\r\nif frmMain.clQuickPickList.tag = 0\r\nthen begin\r\n P.x := (WebMemo_p as TMemo).left;\r\n P.y := (WebMemo_p as TMemo).top;\r\n P := ((WebMemo_p as TMemo).parent as TControl).clienttoscreen(P);\r\n frmMain.clQuickPickList.top := P.y + WebMemo_p.height + 1;\r\n end;\r\nend;\r\n\r\nprocedure OrganizeBlocks(formdiv_p: TScrollBox; columns_p: integer=0; AutoAllowed: boolean=true);\r\nvar i,j,k,m,l,n,p,r,s: integer; c: TPanel; block_child_orders_p: array[0..100] of integer; columns: integer;\r\nstr1, str2, str3, str4, str5, str6: string; block_bottoms: array[0..100] of integer; BlockID_p: string;\r\nEGV_COMPACT: boolean;\r\nbegin\r\n\r\nwith frmmain\r\ndo begin\r\n pnlTopBanners.Visible := (B1.Visible or B2.Visible or B3.Visible or B4.Visible or B5.Visible);\r\n pnlFormBottomBar.Visible := (B6.Visible or B7.Visible or B8.Visible or B9.Visible or B10.Visible);\r\n sbLogoBox.Visible := pnlLogo.Visible;\r\n end;\r\n\r\nif not formdiv_p.Visible then exit;\r\n \r\nfrmMain.clQuickPickList.visible := false;\r\n\r\nEGV_COMPACT := true;\r\n//showmessage('organize starts: ' + formdiv_p.name);\r\n//if (uppercase(formdiv_p.Name) = 'SBSEARCH') and AutoAllowed then showmessage(inttostr(columns_p));\r\n\r\nfor i := 0 to 100\r\ndo begin\r\n block_child_orders_p[i] := -1;\r\n block_bottoms[i] := 5;\r\n end;\r\n// set all to absolute and get DB data for dynamic blocks:\r\nfor p := 0 to formdiv_p.controlcount -1\r\ndo if (formdiv_p.controls[p] is TPanel)\r\nthen (formdiv_p.controls[p] as TPanel).elementposition := epAbsolute;\r\n\r\nm := -1;\r\n// find the max childorder ( the last block )\r\nfor p := 0 to formdiv_p.controlcount -1\r\ndo\r\nif (formdiv_p.controls[p] is TPanel)\r\nthen begin\r\n if ((formdiv_p.controls[p] as TPanel).childorder > m) and ((formdiv_p.controls[p] as TPanel).ChildOrder < 1000)\r\n then m := (formdiv_p.controls[p] as TPanel).childorder;\r\n end;\r\n\r\n// fix duplicates and move to the end\r\nfor p := 0 to formdiv_p.controlcount -1\r\ndo\r\nif (formdiv_p.controls[p] is TPanel)\r\nthen begin\r\n for i := p + 1 to formdiv_p.controlcount -1\r\n do if (formdiv_p.controls[i] is TPanel) and ((formdiv_p.controls[p] as TPanel).ChildOrder < 1000)\r\n then begin\r\n if (formdiv_p.controls[i] as TPanel).childorder = (formdiv_p.controls[p] as TPanel).childorder\r\n then begin\r\n (formdiv_p.controls[i] as TPanel).childorder := m + 1;\r\n m := m + 1; // showmessage('1');\r\n end;\r\n end;\r\n block_child_orders_p[p] := (formdiv_p.controls[p] as TPanel).childorder;\r\n end;\r\n\r\nif columns_p = 0 then columns := egv_formcolumns else columns := columns_p;\r\n\r\nL:=5; n:= columns; {2}; j:= 0; k:=0; m:=10;\r\n\r\nFor I:=0 to 1002 //formdiv_p.controlcount -1\r\nDo begin\r\n s := -1;\r\n for r:=0 to 100\r\n do begin\r\n if block_child_orders_p[r] = i\r\n then begin\r\n s := i;\r\n break;\r\n end;\r\n end;\r\n if s = -1 then continue;\r\n\r\n // find control with childorder = i\r\n\r\n c := nil;\r\n for p := 0 to formdiv_p.controlcount -1\r\n do if (formdiv_p.controls[p] is TPanel) and ((formdiv_p.controls[p] as TPanel).childorder = i ) and\r\n (formdiv_p.controls[p] as TPanel).Visible {and ((formdiv_p.controls[p] as TWebPanel).tag <> -1)}\r\n then begin c := (formdiv_p.controls[p] as TPanel); break; end;\r\n\r\n if not assigned(c) then continue;\r\n\r\n BlockID_p := getblockuniqueid(c, false);\r\n\r\n // block with child order = i found. Place it.\r\n //if (uppercase(c.Name) = 'B1') and (c.visible) then showmessage(c.Name);\r\n // if block has custom top/left apply and take the next\r\n str6 := dm.egv_localstorage.values['DBF_' + BlockID_p];\r\n if (length(splitstring(str6,'|')) >= 26) and\r\n (splitstring(str6,'|')[24] <> '') and (splitstring(str6,'|')[24] <> '0') and\r\n (splitstring(str6,'|')[25] <> '') and (splitstring(str6,'|')[25] <> '0') and\r\n (uppercase(formdiv_p.name) <> 'SBALERTBOXES') and\r\n (uppercase(formdiv_p.name) <> 'SBINFOBOXES') and\r\n (uppercase(formdiv_p.name) <> 'SBSEARCH') and\r\n (uppercase(formdiv_p.name) <> 'SBSIDEDATA')\r\n then begin\r\n c.Top := strtoint(splitstring(str6,'|')[24]);\r\n c.Left := strtoint(splitstring(str6,'|')[25]);\r\n continue;\r\n end;\r\n\r\n // if (blockgettitlelabel(c) <> nil)\r\n // then blockgettitlelabel(c).Caption := 'TEST' + inttostr(i);\r\n if (not egv_formcolumnsauto) or ( not AutoAllowed ) //n > 0\r\n then begin\r\n if EGV_NOHORIZONTALLINEUP and (uppercase(formdiv_p.name) <> 'SBALERTBOXES')\r\n and (uppercase(formdiv_p.name) <> 'SBINFOBOXES')\r\n and (uppercase(formdiv_p.name) <> 'SBSEARCH')\r\n and (uppercase(formdiv_p.name) <> 'SBSIDEDATA')\r\n then begin // no line up. compact. remove vertical gaps\r\n c.top := block_bottoms[j]; c.left:=m;\r\n m := m + c.width + 20;\r\n block_bottoms[j] := block_bottoms[j] + c.Height + 3;\r\n j := j + 1;\r\n If j = n // next block will go to next line\r\n then begin m:=10; j:=0; end;\r\n end\r\n else begin // line up titles\r\n c.top := L; c.left:=m;\r\n If k < c.height then k := c.height;\r\n m := m + c.width + 20;\r\n j := j + 1;\r\n If j = n // next block will go to next line\r\n then begin L := L + k + 3; m:=10; j:=0; k:=0; end;\r\n\r\n { (formdiv_p.width - 20*(n - 1) - ) DIV (n)\r\n if c.width > formdiv_p.width - m - 20\r\n then begin L := L + k + 3; m:=10; j:=0; k:=0; end;\r\n c.top := L; c.left:=m;\r\n If k < c.height then k := c.height;\r\n\r\n if c.width <= formdiv_p.width - m - 20 then j := j + 1;\r\n m := m + c.width + 20;\r\n If j = n // next block will go to next line\r\n then begin L := L + k + 3; m:=10; j:=0; k:=0; end; }\r\n\r\n\r\n end;\r\n end\r\n else begin\r\n if c.width <= formdiv_p.width - m - 20\r\n then begin\r\n c.top := L; c.left:=m;\r\n end\r\n else begin\r\n L := L + k + 3; m:=10; j:=0; k:=0; //showmessage(inttostr(k));\r\n c.top := L; c.left:=m;\r\n end;\r\n If k < c.height then k := c.height;\r\n m := m + c.width + 20;\r\n // showmessage(inttostr(c.height));\r\n end;\r\n end;\r\n//showmessage('organize ends: ' + formdiv_p.name);\r\nend;\r\n\r\nprocedure Block_MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer; mode: string=''; form_p: TForm=nil);\r\n {\r\n btnClearBlockData -\r\n btnDefaultBlockData -\r\n btnInsertCurrentDate -\r\n btnQPKLDatePicker -\r\n btnQPKLTimePicker -\r\n btnDBField_Settings -\r\n cbPickListType -\r\n edtPickListCustomForm -\r\n btnQuickPicklistSettings -\r\n\r\n btnAddRecord\r\n btnDeleteRecord\r\n btnGridDesign\r\n }\r\nvar\r\n i, j: Integer; dbmemo_p: TMemo; panel_p: TPanel; form: TForm;\r\n\r\n procedure BlockButtonsON( Header_p: Tpanel);\r\n var\r\n i: Integer; formname_p, parentblockname_p: string; s: string;\r\n begin\r\n frmmain.btnBlockMenu.Parent := Header_p;\r\n { frmMain.cbPickListType.Parent := Header_p;\r\n frmMain.edtPickListCustomForm.Parent := Header_p; }\r\n frmMain.btnBlockGridPost.Parent := Header_p;\r\n frmMain.btnDeleteRecord.Parent := Header_p;\r\n frmMain.btnAddRecord.Parent := Header_p;\r\n frmMain.btnDesignGrid.Parent := Header_p;\r\n\r\n frmmain.btnBlockMenu.align := alRight;\r\n { frmMain.cbPickListType.align := alRight;\r\n frmMain.edtPickListCustomForm.align := alRight; }\r\n frmMain.btnBlockGridPost.align := alRight; //showmessage(header_p.Name);\r\n frmMain.btnDeleteRecord.align := alRight;\r\n frmMain.btnAddRecord.align := alRight;\r\n frmMain.btnDesignGrid.align := alRight;\r\n\r\n { frmMain.cbPickListType.color := Header_p.color;\r\n frmMain.edtPickListCustomForm.color := Header_p.color; }\r\n\r\n frmMain.btnBlockMenu.visible := true;\r\n\r\n { frmMain.cbPickListType.visible := ( frmmain.btnSwitch_Design.State = ssOn );\r\n frmMain.edtPickListCustomForm.visible := ( frmmain.btnSwitch_Design.State = ssOn ); }\r\n\r\n for i := 0 to Header_p.ControlCount - 1\r\n do begin\r\n if (Header_p.Controls[i] is TSpeedButton) and\r\n ((Header_p.Controls[i] as TSpeedButton).MaterialGlyph = 'edit' ) and\r\n ((frmmain.btnSwitch_Design.State = ssON) or (uppercase(EGV_CURRENTBLOCK.Parent.Name) <> 'SBSEARCH') )\r\n then begin\r\n (Header_p.Controls[i] as TSpeedButton).Visible := (frmmain.cbPickListType.itemindex <> 6);\r\n // set the tag - picklist type:\r\n //showmessage(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_PKLTYPE']);\r\n if length(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_PKLTYPE']) > 1\r\n then dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_PKLTYPE'] := '0';\r\n if dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_PKLTYPE'] = ''\r\n then (Header_p.Controls[i] as TSpeedButton).tag := 0\r\n else (Header_p.Controls[i] as TSpeedButton).tag := strtoint(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_PKLTYPE']);\r\n // frmMain.cbPickListType.itemindex := (Header_p.Controls[i] as TWebSpeedButton).tag;\r\n // frmMain.edtPicklistCustomForm.text := dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_CUSTOMFORM'];\r\n // showmessage(EGV_BLOCKUNIQUEID);\r\n Break;\r\n end;\r\n end;\r\n end;\r\n\r\nbegin\r\n// showmessage('1');\r\nif (sender is TLabel) and (EGV_CURRENTBLOCK <> nil)\r\nthen begin\r\n (sender as TLabel).hint := EGV_CURRENTBLOCK.Name;\r\n (sender as TLabel).showhint := (frmmain.btnSwitch_Design.State = ssON);\r\n end;\r\nif (sender is TPanel) and (EGV_CURRENTBLOCK <> nil)\r\nthen begin\r\n (sender as TPanel).hint := EGV_CURRENTBLOCK.Name;\r\n (sender as TPanel).showhint := (frmmain.btnSwitch_Design.State = ssON);\r\n end;\r\n\r\n//showmessage((Sender as TWebPanel).name);\r\n EGV_CURRENTBLOCK := (Sender as TPanel);\r\n getblockuniqueid(EGV_CURRENTBLOCK);\r\n // showmessage(EGV_BLOCKUNIQUEID);\r\n\r\n // set block class\r\n if ((Sender as TPanel).ElementClassName = 'data_block') and\r\n ((frmmain.btnSwitch_Design.State = ssON) or (uppercase(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE']) = '2'))\r\n then begin\r\n // showmessage(EGV_BLOCKUNIQUEID);\r\n (Sender as TPanel).ElementClassName := 'data_block_focused';\r\n end;\r\n if ((Sender as TPanel).ElementClassName = 'flt_data_block') and\r\n ((frmmain.btnSwitch_Design.State = ssON) or (uppercase(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE']) = '2'))\r\n then begin\r\n // showmessage(EGV_BLOCKUNIQUEID);\r\n (Sender as TPanel).ElementClassName := 'flt_data_block_focused';\r\n end;\r\n\r\n if (Sender as TPanel).ElementClassName = 'data_block_deleted'\r\n then (Sender as TPanel).ElementClassName := 'data_block_deleted_focused';\r\n\r\n if (Sender as TPanel).ElementClassName = 'flt_data_block_deleted'\r\n then (Sender as TPanel).ElementClassName := 'flt_data_block_deleted_focused';\r\n\r\n // if frmmain.cldQPKLCalendar.Visible then exit;\r\n\r\n if frmmain.tmQPKLTimePicker.Visible and (frmmain.tmQPKLTimePicker.parent <> EGV_CURRENTBLOCK)\r\n then begin\r\n frmmain.tmQPKLTimePicker.Visible := false;\r\n frmmain.btnUseSelectedTime.visible := false;\r\n end;\r\n if frmmain.dpBlockDatePicker.Visible and (frmmain.dpBlockDatePicker.parent <> EGV_CURRENTBLOCK)\r\n then begin\r\n frmmain.dpBlockDatePicker.Visible := false;\r\n //frmmain.btnUseSelectedTime.visible := false;\r\n end;\r\n\r\n\r\n frmmain.pmBlockMenu.Parent := frmmain; //GetCurrentForm; //EGV_CURRENTBLOCK.parent.parent.parent;\r\n\r\n if assigned(form_p)\r\n then form := form_p\r\n else form := egv_subform;\r\n //msg\r\n //showmessage(form.Name);\r\n //showmessage(EGV_CURRENTBLOCK.Name);\r\n\r\n GetBlockUniqueID((Sender as TPanel));\r\n\r\n //if (Sender as TWebPanel).BorderColor <> clRed\r\n //then (Sender as TWebPanel).BorderColor := clwhite;\r\n\r\n if frmmain.btnSwitch_Design.State = ssOn\r\n then begin\r\n frmMain.btnDesign_Hide.Parent := (Sender as TPanel);\r\n frmMain.btnDesign_Hide.Top := 0;\r\n frmMain.btnDesign_Hide.Left := 0;\r\n frmMain.btnDesign_Hide.Align := alLeft;\r\n frmMain.btnDesign_Hide.BringToFront;\r\n\r\n try\r\n // Hide/Show button\r\n if Pos('#'+(Sender as TPanel).Name+'#',EGV_FORMDESIGN) = 0\r\n then frmMain.btnDesign_Hide.elementclassname := 'btn btn-warning'\r\n else frmMain.btnDesign_Hide.elementclassname := 'btn btn-danger';\r\n finally\r\n end;\r\n frmMain.btnDesign_Hide.visible := true;\r\n end;\r\n\r\n panel_p:= nil; dbmemo_p := nil;\r\n frmMain.btnDesignGrid.Visible := false;\r\n for i := 0 to ((Sender as TPanel)).ControlCount - 1 do\r\n begin\r\n if ((Sender as TPanel).Controls[i] is TPanel) then\r\n begin\r\n panel_p := (((Sender as TPanel)).Controls[i] as TPanel);\r\n // Panel_p.color := $00E6E6E6; // set active block caption color.\r\n if Panel_p.ElementClassName = 'block_top' then Panel_p.ElementClassName := 'block_top_active';\r\n if Panel_p.ElementClassName = 'flt_block_top' then Panel_p.ElementClassName := 'flt_block_top_active';\r\n\r\n if not panel_p.Visible then panel_p.Visible := ( frmmain.btnSwitch_Design.State = ssON );\r\n // showmessage(Panel_p.Name);\r\n BlockButtonsON( Panel_p);\r\n end;\r\n\r\n if ((Sender as TPanel).Controls[i] is TDBGrid)\r\n then frmMain.btnDesignGrid.Visible := ( frmmain.btnSwitch_Design.State = ssOn );\r\n\r\n if (((Sender as TPanel)).Controls[i] is TMemo)\r\n then begin\r\n dbmemo_p := (((Sender as TPanel)).Controls[i] as TMemo);\r\n if frmMain.clQuickPickList.visible and (frmMain.clQuickPickList.hint <> dbmemo_p.name)\r\n then begin\r\n // showmessage('btnCloseQuickPickListclick');\r\n frmMain.btnCloseQuickPickListclick(frmMain.btnCloseQuickPickList);\r\n end;\r\n end;\r\n end;\r\n\r\n if assigned(Panel_p) and assigned(dbmemo_p) then if dbmemo_p.hint <> '' then Panel_p.color := $fcefe8; //clred;\r\n // showmessage(mode);\r\n\r\n if mode <> ''\r\n then with frmmain\r\n do begin\r\n miClear.visible := (( pos(uppercase('btnClearBlockData'), uppercase(mode)) > 0 ));\r\n miDefault.Visible := (( pos(uppercase('btnDefaultBlockData'), uppercase(mode)) > 0 ) );\r\n miCurrentDate.Visible := (( pos(uppercase('btnInsertCurrentDate'), uppercase(mode)) > 0 ) );\r\n miCalendar.Visible := (( pos(uppercase('btnQPKLDatePicker'), uppercase(mode)) > 0 ) );\r\n miTimePicker.Visible := (( pos(uppercase('btnQPKLTimePicker'), uppercase(mode)) > 0 ) );\r\n miCurrentTime.Visible := (( pos(uppercase('miCurrentTime'), uppercase(mode)) > 0 ) );\r\n miClearCache.Visible := (( pos(uppercase('miClearCache'), uppercase(mode)) > 0 ) );\r\n\r\n miDBFieldSetup.visible := (( pos(uppercase('btnDBField_Settings'), uppercase(mode)) > 0 ) and ( frmmain.btnSwitch_Design.State = ssOn ));\r\n miQPKLSetup.visible := (( pos(uppercase('btnQuickPicklistSettings'), uppercase(mode)) > 0 ) and ( frmmain.btnSwitch_Design.State = ssOn ));\r\n //edtPickListCustomForm.visible := (( pos(uppercase('edtPickListCustomForm'),uppercase(mode)) > 0 ) and ( frmmain.btnSwitch_Design.State = ssOn ));\r\n //miQPKLSetup.visible := (( pos(uppercase('cbPickListType'), uppercase(mode)) > 0 ) and ( frmmain.btnSwitch_Design.State = ssOn ));\r\n\r\n\r\n { btnClearBlockData.visible := (( pos(uppercase('btnClearBlockData'), uppercase(mode)) > 0 ));\r\n btnDefaultBlockData.Visible := (( pos(uppercase('btnDefaultBlockData'), uppercase(mode)) > 0 ) );\r\n btnInsertCurrentDate.Visible := (( pos(uppercase('btnInsertCurrentDate'), uppercase(mode)) > 0 ) );\r\n btnQPKLDatePicker.Visible := (( pos(uppercase('btnQPKLDatePicker'), uppercase(mode)) > 0 ) );\r\n btnQPKLTimePicker.Visible := (( pos(uppercase('btnQPKLTimePicker'), uppercase(mode)) > 0 ) );\r\n btnDBField_Settings.visible := (( pos(uppercase('btnDBField_Settings'), uppercase(mode)) > 0 ) and ( frmmain.btnSwitch_Design.State = ssOn ));\r\n cbPickListType.visible := (( pos(uppercase('cbPickListType'), uppercase(mode)) > 0 ) and ( frmmain.btnSwitch_Design.State = ssOn ));\r\n edtPickListCustomForm.visible:= (( pos(uppercase('edtPickListCustomForm'),uppercase(mode)) > 0 ) and ( frmmain.btnSwitch_Design.State = ssOn ));\r\n btnQuickPicklistSettings.visible := (( pos(uppercase('btnQuickPicklistSettings'), uppercase(mode)) > 0 ) and ( frmmain.btnSwitch_Design.State = ssOn ));\r\n }\r\n btnAddRecord.visible := (( pos(uppercase('btnAddRecord'), uppercase(mode)) > 0 ));\r\n btnDeleteRecord.visible := (( pos(uppercase('btnDeleteRecord'), uppercase(mode)) > 0 ));\r\n btnBlockGridPost.visible := (( pos(uppercase('btnBlockGridPost'), uppercase(mode)) > 0 ));\r\n btnDesignGrid.visible := (( pos(uppercase('btnDesignGrid'), uppercase(mode)) > 0 ) and\r\n ( frmmain.btnSwitch_Design.State = ssOn ));\r\n // showmessage('1');\r\n end;\r\n // showmessage(mode);\r\nwith frmmain do begin // showmessage('1');\r\n frmMain.btnBlockMenu.Visible := (\r\n ( (uppercase(EGV_CURRENTBLOCK.Parent.Name) <> 'SBSEARCH') or\r\n (btnSwitch_Design.State = ssON)\r\n )\r\n and\r\n ( (mode = '') or\r\n ( miClear.visible or\r\n miDefault.Visible or\r\n miCurrentDate.Visible or\r\n miCalendar.Visible or\r\n miTimePicker.Visible or\r\n miCurrentTime.Visible or\r\n miDBFieldSetup.visible or\r\n miQPKLSetup.visible or\r\n miClearCache.Visible )));\r\n\r\n end;\r\n\r\n // if frmmain.btnAddRecord.visible then showmessage((frmmain.btnAddRecord.parent as twebpanel).name);\r\n\r\nend;\r\n\r\nprocedure Block_MouseLeave(Sender: TObject);\r\nvar i: Integer; blockleft_p: TPanel;\r\n\r\n procedure EditButtonOFF( Header_p: Tpanel);\r\n var\r\n i: Integer;\r\n begin\r\n for i := 0 to Header_p.ControlCount - 1 do\r\n begin\r\n if (Header_p.Controls[i] is TSpeedButton) and\r\n ((Header_p.Controls[i] as TSpeedButton).MaterialGlyph = 'edit' ) then\r\n begin\r\n // showmessage( (Header_p.Controls[i] as TWebSpeedButton).name);\r\n (Header_p.Controls[i] as TSpeedButton).Visible := False;\r\n Break;\r\n end;\r\n end;\r\n // Hide Clear button\r\n frmMain.btnClearBlockData.visible := false;\r\n end;\r\n\r\n procedure DefaultButtonOFF( Header_p: Tpanel);\r\n var\r\n i: Integer;\r\n begin\r\n for i := 0 to Header_p.ControlCount - 1 do\r\n begin\r\n if (Header_p.Controls[i] is TSpeedButton) and\r\n ((Header_p.Controls[i] as TSpeedButton).MaterialGlyph = 'replay' ) then\r\n begin\r\n (Header_p.Controls[i] as TSpeedButton).visible := False;\r\n Break;\r\n end;\r\n end;\r\n end;\r\n\r\n procedure InsertDateButtonOFF( Header_p: Tpanel);\r\n var\r\n i: Integer;\r\n begin\r\n for i := 0 to Header_p.ControlCount - 1 do\r\n begin\r\n if (Header_p.Controls[i] is TSpeedButton) and\r\n (\r\n ((Header_p.Controls[i] as TSpeedButton).MaterialGlyph = 'today' ) or\r\n ((Header_p.Controls[i] as TSpeedButton).MaterialGlyph = 'timer' ) or\r\n ((Header_p.Controls[i] as TSpeedButton).MaterialGlyph = 'date_range' ) or\r\n ((Header_p.Controls[i] as TSpeedButton).MaterialGlyph = 'settings' ) or\r\n ((Header_p.Controls[i] as TSpeedButton).MaterialGlyph = 'add' ) or\r\n ((Header_p.Controls[i] as TSpeedButton).MaterialGlyph = 'remove' ) or\r\n ((Header_p.Controls[i] as TSpeedButton).MaterialGlyph = 'check' ) or\r\n ((Header_p.Controls[i] as TSpeedButton).MaterialGlyph = 'grid_on' )\r\n ) then (Header_p.Controls[i] as TSpeedButton).visible := False;\r\n end;\r\n // frmmain.btnQuickPicklistSettings.visible := false;\r\n end;\r\n\r\nbegin\r\n frmmain.lbImage_Y_X.Visible := false;\r\n blockleft_p := EGV_CURRENTBLOCK;\r\n\r\n{ with frmmain do begin\r\n\r\n if rgBlockRadioGroup.visible //(BlockGetMemo(EGV_CURRENTBLOCK) <> nil ) and (BlockGetMemo(EGV_CURRENTBLOCK <> nil)\r\n then begin\r\n rgBlockRadioGroup.visible := false;\r\n if (blockleft_p <> nil) and (BlockGetMemo(EGV_CURRENTBLOCK) <> nil) and (rgBlockRadioGroup.ItemIndex >= 0 )\r\n then begin\r\n BlockGetMemo(EGV_CURRENTBLOCK).Text := rgBlockRadioGroup.Items[rgBlockRadioGroup.ItemIndex];\r\n BlockGetMemo(EGV_CURRENTBLOCK).Tag := 1; // Modified. To be saved in DB\r\n BlockApplyDependencies(EGV_CURRENTBLOCK, BlockGetMemo(EGV_CURRENTBLOCK).Text);\r\n end;\r\n end;\r\n end; }\r\n\r\n if (blockleft_p <> nil) and (BlockGetMemo(blockleft_p) <> nil) and frmmain.rgBlockRadioGroup.visible\r\n then begin\r\n frmmain.rgBlockRadioGroup.visible := false;\r\n if (frmmain.rgBlockRadioGroup.ItemIndex >= 0)\r\n then begin\r\n BlockGetMemo(blockleft_p).Text := frmmain.rgBlockRadioGroup.Items[frmmain.rgBlockRadioGroup.ItemIndex];\r\n BlockGetMemo(blockleft_p).Tag := 1; // Modified. To be saved in DB\r\n BlockApplyDependencies(blockleft_p, BlockGetMemo(blockleft_p).Text);\r\n end;\r\n end;\r\n\r\n if ( blockgethtml(blockleft_p) = nil) or ( not blockgethtml(blockleft_p).visible)\r\n then BlockDataDistribute(blockleft_p);\r\n\r\n frmmain.tmQPKLTimePicker.Visible := false;\r\n frmmain.dpBlockDatePicker.Visible := false;\r\n frmmain.seBlockSpinEdit.visible := false;\r\n\r\n// frmmain.rgBlockRadioGroup.tag := 0;\r\n\r\n if (BlockGetMemo(blockleft_p) <> nil) and\r\n (( (BlockGetHTML(blockleft_p) <> nil) and (not BlockGetHTML(blockleft_p).Visible ) ) or (BlockGetHTML(blockleft_p) = nil))\r\n then BlockGetMemo(blockleft_p).Visible := true;\r\n\r\n if frmmain.edtEditMask.Visible\r\n then BlockEditBoxMouseLeave(Sender);\r\n // showmessage('1');\r\n frmMain.btnBlockMenu.visible := false;\r\n\r\n // (Sender as TWebPanel).elementID := '';\r\n\r\n if (Sender as TPanel).ElementClassName = 'data_block_focused' then (Sender as TPanel).ElementClassName := 'data_block';\r\n if (Sender as TPanel).ElementClassName = 'data_block_deleted_focused' then (Sender as TPanel).ElementClassName := 'data_block_deleted';\r\n\r\n if (Sender as TPanel).ElementClassName = 'flt_data_block_focused' then (Sender as TPanel).ElementClassName := 'flt_data_block';\r\n if (Sender as TPanel).ElementClassName = 'flt_data_block_deleted_focused' then (Sender as TPanel).ElementClassName := 'flt_data_block_deleted';\r\n\r\n\r\n // Picklist tuype box OFF\r\n frmMain.cbPickListType.visible := false;\r\n frmMain.edtPickListCustomForm.visible := false;\r\n //Grid Design OFF\r\n frmMain.btnDesignGrid.Visible := false;\r\n\r\n// if (Sender as TWebPanel).BorderColor <> clRed then\r\n// (Sender as TWebPanel).BorderColor := clWhite;\r\n frmMain.btnDesign_Hide.Visible := False;\r\n\r\n for i := 0 to ((Sender as TPanel)).ControlCount - 1 do\r\n begin\r\n if (((Sender as TPanel)).Controls[i] is TPanel) then\r\n begin //showmessage('1');\r\n if (((Sender as TPanel)).Controls[i] as TPanel).ElementClassname = 'block_top_active'\r\n then (((Sender as TPanel)).Controls[i] as TPanel).ElementClassname := 'block_top';\r\n if (((Sender as TPanel)).Controls[i] as TPanel).ElementClassname = 'flt_block_top_active'\r\n then (((Sender as TPanel)).Controls[i] as TPanel).ElementClassname := 'flt_block_top';\r\n\r\n // set title visibility\r\n // showmessage((Sender as TWebPanel).Name);\r\n (((Sender as TPanel)).Controls[i] as TPanel).visible := (\r\n (trim(BlockGetTitle((Sender as TPanel))) <> '') or\r\n ((uppercase(((Sender as TPanel).parent as TScrollBox).Name) = 'SBSEARCH')));\r\n {or\r\n (frmmain.btnSwitch_Design.state = ssON)) }\r\n\r\n\r\n //(trim(BlockGetTitle((Sender as TWebPanel))) <> '');\r\n // // or (frmmain.btnSwitch_Design.state = ssON));\r\n\r\n EditButtonOFF( (((Sender as TPanel)).Controls[i] as TPanel));\r\n end;\r\n\r\n if (((Sender as TPanel)).Controls[i] is TDBMemo)\r\n then stretchmemo( (((Sender as TPanel)).Controls[i] as TDBMemo) );\r\n\r\n end;\r\n\r\n for i := 0 to ((Sender as TPanel)).ControlCount - 1 do\r\n begin\r\n if (((Sender as TPanel)).Controls[i] is TPanel) then\r\n begin\r\n DefaultButtonOFF( (((Sender as TPanel)).Controls[i] as TPanel));\r\n Break;\r\n end;\r\n end;\r\n for i := 0 to ((Sender as TPanel)).ControlCount - 1 do\r\n begin\r\n if (((Sender as TPanel)).Controls[i] is TPanel) then\r\n begin\r\n InsertDateButtonOFF( (((Sender as TPanel)).Controls[i] as TPanel));\r\n Break;\r\n end;\r\n end;\r\n// ResizeFormBlocks(((Sender as TWebPanel).parent as TWebScrollBox), 0);\r\nend;\r\n\r\nprocedure ResizeFormBlocks(Form_DIV: TScrollBox; col: integer=0; AutoAllowed: boolean=true);\r\nvar i, j: integer; n, m, col_for_calc, width_p, height_p: integer; s: string; areawidth_p: integer; blockid_p: string;\r\nbegin\r\n//showmessage('resize blocks called: ' + form_div.name);\r\nblockid_p := EGV_BLOCKUNIQUEID;\r\ntry\r\n\r\nif col = 0 then col := egv_formcolumns;\r\nareawidth_p := Form_DIV.Width;\r\n\r\n//showmessage('resize starts - ' + Form_DIV.name);\r\n// if (not egv_formcolumnsauto) then showmessage('1'+Form_DIV.name);\r\n// if (not AutoAllowed) then showmessage('2'+Form_DIV.name);\r\n\r\nif (not egv_formcolumnsauto) or ( not AutoAllowed )\r\nthen begin\r\n//showmessage('1');\r\n // number of visible blocks:\r\n n := 0; m := 0;\r\n for i:=0 to Form_DIV.controlcount - 1\r\n do if (Form_DIV.controls[i] is TPanel) and\r\n (Form_DIV.controls[i] as TPanel).Visible\r\n then begin\r\n n := n + 1; // available ( visible ) blocks\r\n GetBlockUniqueID((Form_DIV.controls[i] as TPanel));\r\n s := dm.egv_localstorage.values['DBF_' + EGV_BLOCKUNIQUEID];\r\n if (uppercase(Form_DIV.Name) = 'SBALERTBOXES') or (uppercase(Form_DIV.Name) = 'SBSEARCH')\r\n then if (length(splitstring(s,'|')) >= 18) and (splitstring(s,'|')[17] <> '') and (splitstring(s,'|')[17] <> '0')\r\n then begin\r\n (Form_DIV.controls[i] as TPanel).width := strtoint(splitstring(s,'|')[17]);\r\n areawidth_p := areawidth_p - (Form_DIV.controls[i] as TPanel).width - 10;\r\n end\r\n\r\n else m := m + 1; // blocks with no individual width for 1-line area\r\n end;\r\n\r\n // showmessage('2');\r\n if n < col then col := n;\r\n col_for_calc := col;\r\n if (uppercase(Form_DIV.Name) = 'SBALERTBOXES') or (uppercase(Form_DIV.Name) = 'SBSEARCH')\r\n then if m < col then col_for_calc := m;\r\n\r\n for i:=0 to Form_DIV.controlcount - 1\r\n do if (Form_DIV.controls[i] is TPanel) and\r\n ((Form_DIV.controls[i] as TPanel).tag <> -1)\r\n then begin\r\n width_p := ((areawidth_p - 10) div col_for_calc) - 25;\r\n\r\n GetBlockUniqueID((Form_DIV.controls[i] as TPanel));\r\n s := dm.egv_localstorage.values['DBF_' + EGV_BLOCKUNIQUEID];\r\n\r\n // apply block width for alert boxes\r\n if ((uppercase(Form_DIV.Name) = 'SBALERTBOXES') or (uppercase(Form_DIV.Name) = 'SBSEARCH')) and (length(splitstring(s,'|')) >= 18) and\r\n (splitstring(s,'|')[17] <> '') and (splitstring(s,'|')[17] <> '0')\r\n then begin\r\n // showmessage(blockgethtml((Form_DIV.controls[i] as TWebpanel)).HTML.Text);\r\n width_p := strtoint(splitstring(s,'|')[17]);\r\n // showmessage('apply block width for alert boxes ends');\r\n end;\r\n\r\n //showmessage(inttostr(i));\r\n if width_p < 50 then begin width_p := 50; end;\r\n\r\n (Form_DIV.controls[i] as Tpanel).width := width_p;\r\n\r\n // showmessage(splitstring(s,'|')[9]);\r\n // apply color\r\n\r\n if (BlockGetMemo((Form_DIV.controls[i] as Tpanel)) <> nil ) and (length(splitstring(s,'|')) >= 24) and\r\n (splitstring(s,'|')[23] = '1')\r\n then BlockGetMemo((Form_DIV.controls[i] as Tpanel)).Color := stringtocolor(splitstring(s,'|')[9]);\r\n\r\n //showmessage('after apply color');\r\n\r\n if (length(splitstring(s,'|')) >= 23)\r\n then begin\r\n if splitstring(s,'|')[22] = '' then splitstring(s,'|')[22] := '0';\r\n try\r\n if strtoint(splitstring(s,'|')[22]) < 20\r\n then (Form_DIV.controls[i] as Tpanel).height := EGV_BLOCKDEFAULTHEIGHT\r\n else (Form_DIV.controls[i] as Tpanel).height := strtoint(splitstring(s,'|')[22]);\r\n except\r\n splitstring(s,'|')[22] := '0';\r\n (Form_DIV.controls[i] as Tpanel).height := EGV_BLOCKDEFAULTHEIGHT;\r\n end;\r\n // showmessage('resize: ' + (Form_DIV.controls[i] as TWebpanel).Name + ' - ' + inttostr((Form_DIV.controls[i] as TWebpanel).height));\r\n end\r\n else (Form_DIV.controls[i] as Tpanel).height := EGV_BLOCKDEFAULTHEIGHT;\r\n\r\n if (Form_DIV.controls[i] as Tpanel).height > ((Form_DIV.controls[i] as Tpanel).parent as TScrollBox).height - 5\r\n then (Form_DIV.controls[i] as Tpanel).height := ((Form_DIV.controls[i] as Tpanel).parent as TScrollBox).height - 5\r\n\r\n end;\r\n\r\n // showmessage('2');\r\n end\r\nelse if EGV_BLOCKDEFAULTWIDTH > 0\r\n then begin\r\n // showmessage('3');\r\n // Variable columns number\r\n for i:=0 to Form_DIV.controlcount - 1\r\n do if (Form_DIV.controls[i] is TPanel) and ((Form_DIV.controls[i] as TPanel).tag <> -1)\r\n then begin\r\n GetBlockUniqueID((Form_DIV.controls[i] as TPanel));\r\n s := dm.egv_localstorage.values['DBF_' + EGV_BLOCKUNIQUEID]; // showmessage(inttostr(length(splitstring(s,'|'))));\r\n\r\n if (length(splitstring(s,'|')) >= 18) and (splitstring(s,'|')[17] <> '') and (splitstring(s,'|')[17] <> '0')\r\n then begin\r\n try\r\n width_p := strtoint(splitstring(s,'|')[17]);\r\n except\r\n width_p := 0;\r\n end;\r\n if width_p = 0 then width_p := EGV_BLOCKDEFAULTWIDTH;\r\n if width_p = 0 then width_p := 50;\r\n end\r\n else begin\r\n width_p := EGV_BLOCKDEFAULTWIDTH;\r\n if width_p = 0 then width_p := 50;\r\n end;\r\n\r\n if width_p > ((Form_DIV.controls[i] as Tpanel).parent as TScrollBox).Width - 35\r\n then width_p := ((Form_DIV.controls[i] as Tpanel).parent as TScrollBox).Width -35;\r\n\r\n (Form_DIV.controls[i] as Tpanel).width := width_p;\r\n\r\n // setting block default height\r\n if (length(splitstring(s,'|')) >= 23)\r\n then begin\r\n if splitstring(s,'|')[22] = '' then splitstring(s,'|')[22] := '0';\r\n try\r\n if strtoint(splitstring(s,'|')[22]) < EGV_BLOCKDEFAULTHEIGHT\r\n then (Form_DIV.controls[i] as Tpanel).height := EGV_BLOCKDEFAULTHEIGHT\r\n else (Form_DIV.controls[i] as Tpanel).height := strtoint(splitstring(s,'|')[22]);\r\n except\r\n splitstring(s,'|')[22] := '0';\r\n (Form_DIV.controls[i] as Tpanel).height := EGV_BLOCKDEFAULTHEIGHT;\r\n end;\r\n end\r\n else (Form_DIV.controls[i] as Tpanel).height := EGV_BLOCKDEFAULTHEIGHT;\r\n\r\n if (Form_DIV.controls[i] as Tpanel).height > ((Form_DIV.controls[i] as Tpanel).parent as TScrollBox).height - 5\r\n then (Form_DIV.controls[i] as Tpanel).height := ((Form_DIV.controls[i] as Tpanel).parent as TScrollBox).height - 5\r\n\r\n end;\r\n // showmessage('4');\r\n end;\r\n\r\n // showmessage('resize ends: ' + Form_Div.name);\r\norganizeblocks(Form_Div, col, AutoAllowed);\r\n\r\nif uppercase(Form_DIV.Name) = 'SBSEARCH'\r\nthen AlignFilterColumns;\r\n\r\nexcept\r\non E: Exception do\r\n begin\r\n EGV_BLOCKUNIQUEID := blockid_p;\r\n Showmessage(E.Message);\r\n end;\r\nend;\r\nEGV_BLOCKUNIQUEID := blockid_p;\r\n\r\nend;\r\n\r\n\r\nprocedure LoadFormDesignInfo(formname_p: string);\r\nbegin\r\nGetPostFormDesignData(formname_p, 'V', 0);\r\nGetPostFormDesignData(formname_p, 'P', 0, nil, 0, true); //exit;\r\nGetPostFormDesignData(formname_p, 'T', 0);\r\nend;\r\n\r\nprocedure GetPostFormDesignData(formname_p: string; type_p: string; mode_p: integer;\r\n designpanel_p: TScrollBox=nil; columns_p: integer=0; ResizeBlocks_p: boolean=false);\r\nvar sql_p, section_p, value_p, facilityfilter_p: string; designpanel: TScrollBox;\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p: string;\r\n begin\r\n if columns_p = 0 then columns_p := egv_formcolumns;\r\n\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n //showmessage('loaded Design form: ' + formname_p + ', ' + 'panel: ' +designpanel_p.name +', '+ type_p + ': ' + response_p);\r\n //showmessage('load design section ' + type_p + ': ' + section_p);\r\n //showmessage('load design data ' + type_p + ': ' + response_p);\r\n if type_p = 'V' then begin\r\n // showmessage(designpanel_p.name);\r\n dm.EGV_LOCALSTORAGE.values['DSN_' + formname_p + '_' + uppercase(designpanel.name) + '_V'] := Response_p;\r\n // showmessage('design data saved - V');\r\n ApplyFormDesign(designpanel, 1, false, formname_p);\r\n // showmessage('design data applied - V');\r\n end;\r\n if type_p = 'P' then begin\r\n dm.EGV_LOCALSTORAGE.values['DSN_' + formname_p + '_' + uppercase(designpanel.name) + '_P']:= Response_p;\r\n ApplyFormDesign(designpanel, 2, false, formname_p);\r\n end;\r\n if type_p = 'T' then begin\r\n dm.EGV_LOCALSTORAGE.values['DSN_' + formname_p + '_' + uppercase(designpanel.name) + '_T'] := Response_p;\r\n ApplyFormDesign(designpanel, 3, false, formname_p);\r\n end;\r\n\r\n if ResizeBlocks_p then designpanel.Tag := 1;\r\n\r\n { if ResizeBlocks_p\r\n then begin\r\n if (uppercase(designpanel.name) = 'SBSIDEDATA') then Resizeformblocks(designpanel,1,false)\r\n else if (uppercase(designpanel.name) = 'SBSEARCH') then Resizeformblocks(designpanel,1,false)\r\n else if (uppercase(designpanel.name) = 'SUBFORM_DIV') then begin\r\n designpanel.Visible := true;\r\n Resizeformblocks(designpanel, columns_p);\r\n end\r\n else begin\r\n // showmessage('design applied, resize starting for panel ' + designpanel.Name);\r\n Resizeformblocks(designpanel,5,false);\r\n end;\r\n end; }\r\n end;\r\n\r\nbegin\r\nformname_p := uppercase(formname_p);\r\nif assigned(designpanel_p)\r\nthen designpanel := designpanel_p\r\nelse designpanel := GetCurrentFormDiv;\r\n\r\n{\r\nif mode_p = 0\r\nthen begin\r\n // showmessage(designpanel.Name + ' - ' + type_p);\r\n if type_p = 'V' then ApplyFormDesign(designpanel, 1, false, formname_p);\r\n if type_p = 'P' then ApplyFormDesign(designpanel, 2, false, formname_p);\r\n if type_p = 'T' then ApplyFormDesign(designpanel, 3, false, formname_p);\r\n end;\r\nexit; }\r\n\r\ndesignpanel.Tag := 0; // start processing\r\n\r\nfacilityfilter_p := ' facilityid = ' + egv_facilityid;\r\nif egv_showcommonpicklist\r\nthen facilityfilter_p := facilityfilter_p + ' or facilityid = 1 ';\r\n\r\n\r\n//showmessage(designpanel.name);\r\n//showmessage('1');\r\nif type_p = 'V' then section_p := 'D_' + formname_p + '_' + uppercase(designpanel.name) + '_V'; // + egv_pkltargetmemoname + '_V'; // visibility\r\nif type_p = 'P' then section_p := 'D_' + formname_p + '_' + uppercase(designpanel.name) + '_P'; // + egv_pkltargetmemoname + '_P'; // position\r\nif type_p = 'T' then section_p := 'D_' + formname_p + '_' + uppercase(designpanel.name) + '_T'; // + egv_pkltargetmemoname + '_T'; // title\r\n\r\n// Screen size:\r\nsection_p := section_p + trim(EGV_SCREENSIZE);\r\n\r\n//showmessage('design section name: ' + section_p);\r\n\r\nif mode_p = 0\r\nthen begin\r\n // showmessage('read design section: ' + section_p);\r\n sql_p := 'select ident_value from ini_ident where section_name = ' + quotedstr(section_p) + ' and ( ' + facilityfilter_p + ' )' +\r\n ' order by facilityid DESC'; // connected facility data comes first\r\n // showmessage('load design sql: ' + sql_p);\r\n dm.XDataWebClient1.RawInvoke('IReportService.GetColumnData',[sql_p , egv_facilityid, '1'], @OnResult);\r\n end\r\nelse begin\r\n\r\n if type_p = 'V' then value_p := dm.EGV_LOCALSTORAGE.values['DSN_' + formname_p + '_' + uppercase(designpanel.name) + '_V']; // visibility\r\n if type_p = 'P' then value_p := dm.EGV_LOCALSTORAGE.values['DSN_' + formname_p + '_' + uppercase(designpanel.name) + '_P']; // position\r\n if type_p = 'T' then value_p := dm.EGV_LOCALSTORAGE.values['DSN_' + formname_p + '_' + uppercase(designpanel.name) + '_T']; // title\r\n //showmessage('post design section ' + type_p + ': ' + section_p);\r\n //showmessage('post design data ' + type_p + ': ' + value_p);\r\n\r\n sql_p := ' if exists ( select * from ini_ident where section_name = ' + quotedstr(section_p) + ' and ' +\r\n ' FACILITYID = ' + quotedstr(EGV_FACILITYID) + ') ' +\r\n ' update ini_ident set ident_value = ' + quotedstr(value_p) +\r\n ' where section_name = ' + quotedstr(section_p) + ' and ' + ' FACILITYID = ' + quotedstr(EGV_FACILITYID) +\r\n ' else insert into ini_ident(USERID, SECTION_NAME, IDENT_NAME, IDENT_VALUE, FACILITYID, SPECIALITY, VISIBLE)' +\r\n ' values( ' + quotedstr('SYSDBA' + egv_facilityid) + ', ' +\r\n quotedstr(section_p) + ', ' +\r\n quotedstr(section_p + '00001') + ', ' +\r\n quotedstr(value_p) + ', ' +\r\n quotedstr(EGV_FACILITYID) + ', ' +\r\n quotedstr(EGV_SPECIALITY) + ', ' +\r\n '1' + ') ';\r\n //showmessage(sql_p);\r\n\r\n dm.XDataWebClient1.RawInvoke('IReportService.ExecQuery',[sql_p, egv_facilityid, '1'], nil);\r\n\r\n end;\r\nend;\r\n\r\nprocedure GetPostFormDefaultsData(formname_p: string; mode_p: integer; Block_p: Tpanel=nil);\r\nvar sql_p, section_p, facilityfilter_p: string; value_p: string;\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p: string;\r\n begin\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n // showmessage('loaded form defaults: '+ response_p);\r\n egv_formdefaults := Response_p;\r\n ApplyFormDefaults(Block_p);\r\n end;\r\n\r\nbegin\r\nsection_p := 'DF_' + formname_p;\r\n\r\nfacilityfilter_p := ' facilityid = ' + egv_facilityid;\r\nif egv_showcommonpicklist\r\nthen facilityfilter_p := facilityfilter_p + ' or facilityid = 1 ';\r\n\r\n//showmessage(section_p);\r\n\r\nif mode_p = 0\r\nthen begin\r\n sql_p := 'select ident_value from ini_ident where section_name = ' + quotedstr(section_p) + ' and ( ' + facilityfilter_p + ' )' +\r\n ' order by facilityid DESC '; // connected facility data comes first;\r\n dm.XDataWebClient1.RawInvoke('IReportService.GetColumnData',[sql_p , egv_facilityid, '1'], @OnResult);\r\n end\r\nelse begin\r\n // showmessage('saving form defaults: ' + egv_formdefaults + ' section: ' + section_p);\r\n sql_p := ' if exists ( select * from ini_ident where section_name = ' + quotedstr(section_p) + ' and ' +\r\n ' FACILITYID = ' + EGV_FACILITYID + ') ' +\r\n ' update ini_ident set ident_value = ' + quotedstr(egv_formdefaults) +\r\n ' where section_name = ' + quotedstr(section_p) + ' and ' + ' FACILITYID = ' + EGV_FACILITYID +\r\n ' else insert into ini_ident(USERID, SECTION_NAME, IDENT_NAME, IDENT_VALUE, FACILITYID, SPECIALITY, VISIBLE)' +\r\n ' values( ' + quotedstr('SYSDBA' + egv_facilityid) + ', ' +\r\n quotedstr(section_p) + ', ' +\r\n quotedstr(section_p + '00001') + ', ' +\r\n quotedstr(egv_formdefaults) + ', ' +\r\n quotedstr(EGV_FACILITYID) + ', ' +\r\n quotedstr(EGV_SPECIALITY) + ', ' +\r\n '1' + ') ';\r\n // showmessage(sql_p);\r\n dm.XDataWebClient1.RawInvoke('IReportService.ExecQuery',[sql_p , egv_facilityid, '1'], nil);\r\n end;\r\nend;\r\n\r\nprocedure StretchAllMemos(container_p: TControl);\r\nvar i, j: integer; c: TControl;\r\nbegin\r\n//showmessage('stretch all memos starts: ' + container_p.Name);\r\n for i := 0 to container_p.Controlcount - 1\r\n do begin\r\n c := container_p.controls[i];\r\n if c is TPanel\r\n then begin\r\n { if blockgetmemo((c as TWebPanel)) <> nil\r\n then showmessage('block: ' + c.name + ' memo: ' +\r\n blockgetmemo((c as TWebPanel)).name + ' parent: ' + blockgetmemo((c as TWebPanel)).parent.name ); }\r\n for j := 0 to c.Controlcount - 1\r\n do begin\r\n if c.controls[j] is TMemo\r\n then begin\r\n // showmessage( (c.controls[j] as TWebMemo).name);\r\n stretchmemo((c.controls[j] as TMemo));\r\n end;\r\n //if c.controls[j] is TWebDBGrid then (c as TWebPanel).height := 200;\r\n end;\r\n //showmessage('2');\r\n end;\r\n end;\r\n//showmessage('stretch all memos ends');\r\nend;\r\n\r\nprocedure BlockTitleEdit(Sender: TObject);\r\nvar c: Tlabel;\r\nbegin\r\nif (Sender is Tlabel)\r\nthen c := (Sender as Tlabel)\r\nelse c := Blockgettitlelabel((Sender as TControl).parent as Tpanel);\r\n\r\n//showmessage(c.name);\r\n\r\nif frmmain.btnSwitch_Design.State <> ssOn then exit;\r\n\r\nc.Visible := false;\r\nfrmmain.edtDesign_BlockTitleEdit.Parent := c.Parent;\r\nfrmmain.edtDesign_BlockTitleEdit.Text := c.Caption;\r\nfrmmain.edtDesign_BlockTitleEdit.Visible := true;\r\nend;\r\n\r\nprocedure DBF_GetPostBlocks(Div_p: TScrollBox; mode: integer; form_p: TForm=nil; mode_p: integer=0);\r\nvar i: integer; form: TForm; s, s1, s2, s3, InsertSQL_Table, InsertSQL_Columns, InsertSQL_Values, InsertSQL: string;\r\n UpdateScript: string; DBType_p: integer;\r\n\r\n// mode 0- read; 1- post; 2- prepare form for new record( clear all blocks and run 'isert' queries to set the data to for insert);\r\n// 3 - insert new record\r\n//postgrids_p 0-blocks + grids, 1- blocks only ( no grids) , 2- grids only (no blocks)\r\nbegin\r\n//showmessage('getpostblocks: ' + Div_p.name);\r\n\r\nif Div_p = nil then exit;\r\n\r\nInsertSQL_Table := '';\r\nInsertSQL_Columns := '';\r\nInsertSQL_Values := '';\r\nUpdateScript := '';\r\nfor i := 0 to Div_p.controlcount - 1\r\ndo begin\r\n if (Div_p.controls[i] is Tpanel)\r\n then begin\r\n GetBlockUniqueID((Div_p.controls[i] as TPanel));\r\n s := dm.egv_localstorage.values['DBF_' + EGV_BLOCKUNIQUEID];\r\n if ( (Div_p.controls[i] as TPanel).visible or\r\n ((length(splitstring(s,'|')) >= 22) and (splitstring(s,'|')[21] ='1')) ) and\r\n ( (mode_p = 0) or\r\n ((mode_p = 1) and (BlockGetGrid((Div_p.controls[i] as Tpanel)) = nil)) or\r\n ((mode_p = 2) and (BlockGetGrid((Div_p.controls[i] as Tpanel)) <> nil))\r\n )\r\n then begin\r\n // showmessage('getpostbloks. block name. ' + (Div_p.controls[i] as TWebPanel).name);\r\n // Load QPKL cache\r\n if (mode_p = 0) and\r\n (uppercase(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE']) = '2')\r\n then QPKL_Loadcache( (Div_p.controls[i] as TPanel));\r\n dbf_getpostfielddata((Div_p.controls[i] as TPanel), mode, form_p, InsertSQL_Table, InsertSQL_Columns,\r\n InsertSQL_Values, UpdateScript, true);\r\n end;\r\n end;\r\n end;\r\n\r\n if UpdateScript <> ''\r\n then begin\r\n //showmessage(UpdateScript);\r\n DBtype_p := DBType(UpdateScript);\r\n UpdateScript := 'BEGIN TRANSACTION; ' + char(13) + UpdateScript + char(13) + ' COMMIT TRANSACTION;';\r\n if DBType_p = 1\r\n then dm.XDataWebClient1.RawInvoke('IReportService.ExecQuery',[UpdateScript , egv_facilityid, inttostr(DBType_p)], nil)\r\n else if dm.XDataWebConnection2.Connected then dm.XDataWebClient2.RawInvoke('IReportService.ExecQuery',[UpdateScript , egv_facilityid, inttostr(DBType_p)], nil);\r\n end;\r\n\r\n // for the list form. click refresh after loading filter data.\r\n if (uppercase( Div_p.Name) = 'SBSEARCH') and (getcurrentForm.FindComponent('tmGridRefreshClick') <> nil)\r\n then begin\r\n (getcurrentForm.FindComponent('tmGridRefreshClick') as TTimer).Enabled := true;\r\n end;\r\n\r\n if mode = 3 // insert statement prepared in the previus loop. run it.\r\n then begin\r\n InsertSQL := 'INSERT INTO ' + InsertSQL_Table + ' ( ' + InsertSQL_Columns + ' ) ' + ' VALUES ( ' + InsertSQL_Values + ') ';\r\n // showmessage(InsertSQL);\r\n //frmmain.webmemo6.text := InsertSQL;\r\n\r\n if dm.XDataWebConnection2.Connected then\r\n dm.XDataWebClient2.RawInvoke('IReportService.ExecQuery',[InsertSQL , egv_facilityid, '0'], nil);\r\n end;\r\n\r\n //showmessage( 'INSERT INTO ' + InsertSQL_Table + ' ( ' + InsertSQL_Columns + ' ) ' + ' VALUES ( ' + InsertSQL_Values + ') ' );\r\n\r\nend;\r\n\r\nprocedure DBF_GetPostFieldData(Block_p: TPanel; mode: integer; form_p: TForm;\r\n var InsertSQL_Table: string; var InsertSQL_Columns: string; var InsertSQL_Values: string;\r\n var UpdateScript: string; CreateScript: boolean=false);\r\nvar s, s2, s3, html_text, where_p: string; i,j: integer; c: TMemo; grd: TDBGrid; form: TForm; html_p: THTMLContainer;\r\n value_to_save: string; SQL_p: string; ds_p: TDataSource; DBType_p: integer=0;\r\n// mode 0- read; 1- post; 2- new record( clear all blocks and run 'insert' queries)\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p: string; Visible_p: boolean;\r\n begin\r\n // showmessage(block_p.name);\r\n if (mode = 0) or (mode = 2)\r\n then begin\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n\r\n if assigned(html_p) and (html_p.HTML.text <> '')\r\n then begin\r\n // showmessage(html_p.HTML.text);\r\n if pos('@', Response_p) > 0\r\n then begin\r\n for j := 0 to length(splitstring(Response_p,'@')) - 1\r\n do begin\r\n if splitstring(Response_p,'@')[j] <> ''\r\n then html_p.HTML.text :=\r\n stringreplace(html_p.HTML.text, '#VALUE_' + inttostr(j), splitstring(Response_p,'@')[j], [rfIgnoreCase]);\r\n // showmessage( inttostr(j));\r\n end;\r\n end\r\n else if (pos('#VALUE_0', html_p.html.text) > 0) and (Response_p <> '')\r\n then html_p.HTML.text := stringreplace(html_p.HTML.text, '#VALUE_0', Response_p, [rfIgnoreCase]);\r\n\r\n // html_p.visible := ( pos('#VALUE_', html_p.html.text) = 0);\r\n // if not all data provided for html then removes unresolved tags.\r\n for j := 0 to 100 do html_p.HTML.text := stringreplace(html_p.HTML.text, '#VALUE_' + inttostr(j), '', [rfIgnoreCase]);\r\n html_p.visible := true;\r\n end\r\n else if assigned(html_p) then html_p.visible := false;\r\n // if c.visible\r\n // then begin\r\n { if trim(c.Text) <> trim(Response_p)\r\n then c.tag := 1 // updated\r\n else} c.tag := 0;\r\n c.text := Response_p;\r\n\r\n //showmessage(block_p.Name);\r\n BlockApplyDependencies(block_p, c.text);\r\n // end;\r\n\r\n // showmessage('stretch after getting data');\r\n StretchMemo(c);\r\n\r\n Response_p := trim(stringreplace(response_p, '@', '', [rfReplaceAll]));\r\n Visible_p := block_p.Visible;\r\n // hide block if empty\r\n // if (c.Text = '') and ( (html_p = nil) or (not html_p.Visible) or (response_p = '') )\r\n if (length(splitstring(s,'|')) >= 22) and (splitstring(s,'|')[21] ='1')\r\n then begin\r\n // showmessage(response_p);\r\n if (trim(Response_p) = '') and (frmmain.btnSwitch_Design.State = ssOFF)\r\n then begin //showmessage(response_p);\r\n block_p.Visible := false;\r\n Block_p.Tag := 2;\r\n OrganizeBlocks((Block_p.parent as TScrollBox));\r\n end;\r\n if (trim(Response_p) <> '') \r\n then begin //showmessage('show');\r\n block_p.Visible := true;\r\n Block_p.Tag := 0;\r\n OrganizeBlocks((Block_p.parent as TScrollBox));\r\n end;\r\n end;\r\n { if Visible_p and (trim(Response_p) = '') and (length(splitstring(s,'|')) >= 22) and\r\n (splitstring(s,'|')[21] ='1') and (frmmain.btnSwitch_Design.State = ssOFF)\r\n then begin //showmessage('hide');\r\n block_p.Visible := false;\r\n OrganizeBlocks((Block_p.parent as TWebScrollBox));\r\n end;\r\n if ( not Visible_p) and (trim(Response_p) <> '') and (length(splitstring(s,'|')) >= 22) and\r\n (splitstring(s,'|')[21] ='1') \r\n then begin //showmessage('show');\r\n block_p.Visible := true;\r\n OrganizeBlocks((Block_p.parent as TWebScrollBox));\r\n end; }\r\n end;\r\n frmMain.RealignCurrentForm;\r\n end;\r\n\r\n\r\nbegin\r\n\r\nc := nil;\r\nfor i := 0 to Block_p.controlcount - 1\r\ndo begin\r\n if (Block_p.controls[i] is TDBGrid) and Block_p.visible // Open and show grid data\r\n then begin\r\n // showmessage('get-post ' + inttostr(dm.xdsDynamicGrid2.tag));\r\n grd := (Block_p.controls[i] as TDBGrid);\r\n\r\n frmmain.memGridColumns.text := dm.egv_localstorage.values[grd.name + '_COLUMNS_' + uppercase(findparentform(grd).name)];\r\n //showmessage(frmmain.memGridColumns.text);\r\n\r\n SQL_p := dm.egv_localstorage.values[grd.name + '_SELECT_' + getcurrentformname];\r\n //showmessage(sql_p);\r\n if mode = 0\r\n then begin\r\n if assigned(grd.datasource) and (grd.datasource.dataset.active)\r\n then begin\r\n grd.datasource.dataset.Tag := 0;\r\n grd.datasource.dataset.Close;\r\n end; //release\r\n grd.datasource := nil;\r\n if SQL_p <> ''\r\n then begin\r\n // showmessage('1');\r\n SQL_p := InsertKeyValues(SQL_p);\r\n // showmessage('2');\r\n Grid_SetUpColumns(grd);\r\n // showmessage('3');\r\n Grid_AdjustColumns(grd,true);\r\n // showmessage('4');\r\n Grid_SetTitleHeight(grd);\r\n // showmessage('5');\r\n ds_p := GetDynamicGridDataSource;\r\n // showmessage('6');\r\n // showmessage(ds_p.name);\r\n OpenDataSet_J(ds_p.DataSet, SQL_p);\r\n grd.datasource := ds_p;\r\n // showmessage('datasource assigned: ' + grd.name);\r\n end;\r\n end;\r\n if mode = 1\r\n then begin\r\n if sql_p <> '' then Grid_Post(SQl_p, frmmain.memGridColumns, grd);\r\n end;\r\n\r\n break\r\n end;\r\n\r\n if (Block_p.controls[i] is TMemo)\r\n then begin\r\n c := (Block_p.controls[i] as TMemo);\r\n break;\r\n end;\r\n end;\r\n\r\nif not assigned(c) then exit;\r\n// showmessage(c.name + ' - ' +inttostr(c.tag));\r\nif (mode = 1) and (c.tag = 0) then begin {showmessage(c.name + ' - ' + 'exit');} exit; end;\r\n\r\nGetBlockUniqueID(block_p);\r\ns := dm.egv_localstorage.values['DBF_' + EGV_BLOCKUNIQUEID];\r\n\r\n//if (block_p.Name = 'B3') then showmessage(s);\r\n\r\n\r\n// HTML data\r\nhtml_p := nil;\r\nfor i := 0 to Block_p.controlcount - 1\r\ndo begin\r\n if not (Block_p.controls[i] is THTMLContainer) then continue;\r\n html_p := (Block_p.controls[i] as THTMLContainer);\r\n if assigned(html_p) then html_p.visible := false;\r\n if length(splitstring(s,'|')) >= 13\r\n then html_p.HTML.text := splitstring(s,'|')[12]\r\n else html_p.HTML.TEXT := '';\r\n end;\r\nif assigned(html_p)\r\nthen begin\r\n if (html_p.HTML.text <> '')\r\n then begin\r\n //showmessage(html_p.HTML.text);\r\n html_p.Visible := (pos('#VALUE_', uppercase(html_p.html.text)) = 0);\r\n c.tag := 0;\r\n c.visible := false;\r\n html_p.HTML.text := InsertKeyValues(html_p.HTML.text, false);\r\n end\r\n else c.visible := true;\r\n end;\r\n\r\nif mode = 2 // prepare form for new record.\r\nthen begin\r\n c.text := '';\r\n StretchMemo(c);\r\n end;\r\n\r\nif assigned(form_p)\r\nthen form := form_p\r\nelse form := egv_subform;\r\n\r\n//showmessage('block id: ' + EGV_BLOCKUNIQUEID);\r\n\r\n// apply color\r\nif (length(splitstring(s,'|')) >= 10) and (splitstring(s,'|')[9] <> '')\r\nthen begin\r\n try\r\n c.Color := stringtocolor(splitstring(s,'|')[9]);\r\n Block_p.color := c.Color;\r\n except\r\n splitstring(s,'|')[9] := '';\r\n end;\r\n end;\r\n\r\n//showmessage(EGV_BLOCKUNIQUEID);\r\n//showmessage(splitstring(s,'|')[8]);\r\nif (s = '') or ((splitstring(s,'|')[0] = '') and (splitstring(s,'|')[8] = ''))\r\nthen begin\r\n if assigned(html_p) and (html_p.html.text <> '') and (pos('#VALUE_', uppercase(html_p.html.text)) = 0)\r\n then begin\r\n html_p.visible := true;\r\n // showmessage(html_p.html.text);\r\n end\r\n else if assigned(html_p) then html_p.visible := false;\r\n //showmessage(c.Name + ' - ' + html_p.html.text);\r\n //sshowmessage('calling stretch: ' + c.name);\r\n StretchMemo(c);\r\n //showmessage(getcurrentformname);\r\n if (frmmain.btnSwitch_Design.State = ssOFF) and ((html_p = nil) or (not html_p.visible)) and\r\n (length(splitstring(s,'|')) >= 22) and (splitstring(s,'|')[21] ='1') // 'hide is invisible' option set\r\n then begin // showmessage('hide block');\r\n block_p.Visible := false;\r\n OrganizeBlocks((Block_p.parent as TScrollBox));\r\n end;\r\n exit;\r\n end;\r\n//if (splitstring(s,'|')[8] <> '') and ( mode = 1 ) then exit;\r\n\r\n\r\n//showmessage(s);\r\n{\r\ndm.EGV_LOCALSTORAGE.values['DBF_' + EGV_BLOCKUNIQUEID] :=\r\neddbfield_table.text + '|' + 0\r\neddbfield_column.text + '|' + 1\r\neddbfield_key1.text + '|' + 2\r\neddbfield_key2.text + '|' + 3\r\neddbfield_key3.text + '|' + 4\r\ncbdbfield_key1source.text + '|' + 5\r\ncbdbfield_key2source.text + '|' + 6\r\ncbdbfield_key3source.text + '|' + 7\r\nmemDBField_customselect.text + '|' + 8\r\nColortoString(clrdbfield_color.color) + '|' + 9\r\nmemDBField_Update.text + '|' + 10\r\nmemDBField_Insert.text; + '|' + 11\r\nmemDBField_HTMLTemplate.text; + '|' + 12\r\nmemDBField_CopyToBlocks.text; + '|' + 13\r\nDoUpdate + '|' + 14\r\nDoInsert; 15\r\nmemDBField_SentenceTMP.text; + '|' + 16\r\ninttostr(seDBF_BlockWidth.value) + '|' + 17\r\nmemBlockVisibilityCondition.text + '|' + 18\r\nmemEGVvariables.text 19\r\n\r\ninttostr(seDBF_BlockHeight.value) + '|' + 22\r\n}\r\n\r\n\r\nwhere_p := '';\r\n{showmessage(splitstring(s,'|')[0]);\r\nshowmessage(splitstring(s,'|')[1]);\r\nshowmessage(splitstring(s,'|')[2]);\r\n showmessage(splitstring(s,'|')[3]);\r\nshowmessage(splitstring(s,'|')[4]);\r\nshowmessage(splitstring(s,'|')[5]);\r\n showmessage(splitstring(s,'|')[6]); }\r\n\r\nif splitstring(s,'|')[2] <> ''\r\nthen begin\r\n//showmessage(splitstring(s,'|')[2]);\r\n if splitstring(s,'|')[5] = 'MRN' then where_p := ' ' + splitstring(s,'|')[2] + ' = ' + quotedstr(egv_CURRENT_MRN);\r\n if splitstring(s,'|')[5] = 'FHIR_ID' then where_p := ' ' + splitstring(s,'|')[2] + ' = ' + quotedstr(EGV_PATIENTFHIRID);\r\n if splitstring(s,'|')[5] = 'App.Date' then where_p := ' ' + splitstring(s,'|')[2] + ' = ' + quotedstr(egv_CURRENT_APPTDATE);\r\n if splitstring(s,'|')[5] = 'Appt.ID' then where_p := ' ' + splitstring(s,'|')[2] + ' = ' + egv_CURRENT_PROCEDURENUMBER;\r\n if splitstring(s,'|')[5] = 'Facility' then where_p := ' ' + splitstring(s,'|')[2] + ' = ' + egv_FACILITYID;\r\n if splitstring(s,'|')[5] = 'Provider' then where_p := ' ' + splitstring(s,'|')[2] + ' = ' + quotedstr(egv_CURRENT_PROVIDER);\r\n if splitstring(s,'|')[5] = 'Nurse1' then where_p := ' ' + splitstring(s,'|')[2] + ' = ' + quotedstr(egv_CURRENT_NURSE1);\r\n if splitstring(s,'|')[5] = 'Nurse2' then where_p := ' ' + splitstring(s,'|')[2] + ' = ' + quotedstr(egv_CURRENT_NURSE2);\r\n if splitstring(s,'|')[5] = 'Appt.Name' then where_p := ' ' + splitstring(s,'|')[2] + ' = ' + quotedstr(egv_CURRENT_APPTNAME);\r\n if splitstring(s,'|')[5] = 'Med.ID' then where_p := ' ' + splitstring(s,'|')[2] + ' = ' + quotedstr(egv_CURRENT_MEDID);\r\n if splitstring(s,'|')[5] = 'Problem ID' then where_p := ' ' + splitstring(s,'|')[2] + ' = ' + quotedstr(egv_CURRENT_PROBLEMID);\r\n if splitstring(s,'|')[5] = 'Problem ID' then where_p := ' ' + splitstring(s,'|')[2] + ' = ' + quotedstr(egv_CURRENT_PROBLEMID);\r\n if splitstring(s,'|')[5] = 'Ref.Phy.ID' then where_p := ' ' + splitstring(s,'|')[2] + ' = ' + quotedstr(EGV_CURRENT_REFPHYCODE);\r\n if splitstring(s,'|')[5] = 'Allergy ID' then where_p := ' ' + splitstring(s,'|')[2] + ' = ' + quotedstr(EGV_CURRENT_ALLERGYID);\r\n\r\n end; // showmessage(where_p);\r\nif splitstring(s,'|')[3] <> ''\r\nthen begin\r\n//showmessage(splitstring(s,'|')[3]);\r\n if splitstring(s,'|')[6] = 'MRN' then where_p := where_p + ' and ' + splitstring(s,'|')[3] + ' = ' + quotedstr(egv_CURRENT_MRN);\r\n if splitstring(s,'|')[6] = 'FHIR_ID' then where_p := where_p + ' and ' + splitstring(s,'|')[3] + ' = ' + quotedstr(EGV_PATIENTFHIRID);\r\n if splitstring(s,'|')[6] = 'Appt.date' then where_p := where_p + ' and ' + splitstring(s,'|')[3] + ' = ' + quotedstr(egv_CURRENT_APPTDATE);\r\n if splitstring(s,'|')[6] = 'Appt.ID' then where_p := where_p + ' and ' + splitstring(s,'|')[3] + ' = ' + egv_CURRENT_PROCEDURENUMBER;\r\n if splitstring(s,'|')[6] = 'Facility' then where_p := where_p + ' and ' + splitstring(s,'|')[3] + ' = ' + egv_FACILITYID;\r\n if splitstring(s,'|')[6] = 'Provider' then where_p := where_p + ' and ' + splitstring(s,'|')[3] + ' = ' + quotedstr(egv_CURRENT_PROVIDER);\r\n if splitstring(s,'|')[6] = 'Nurse1' then where_p := where_p + ' and ' + splitstring(s,'|')[3] + ' = ' + quotedstr(egv_CURRENT_NURSE1);\r\n if splitstring(s,'|')[6] = 'Nurse2' then where_p := where_p + ' and ' + splitstring(s,'|')[3] + ' = ' + quotedstr(egv_CURRENT_NURSE2);\r\n if splitstring(s,'|')[6] = 'Appt.Name' then where_p := where_p + ' and ' + splitstring(s,'|')[3] + ' = ' + quotedstr(egv_CURRENT_APPTNAME);\r\n if splitstring(s,'|')[6] = 'Med.ID' then where_p := where_p + ' and ' + splitstring(s,'|')[3] + ' = ' + quotedstr(egv_CURRENT_MEDID);\r\n if splitstring(s,'|')[6] = 'Problem ID' then where_p := where_p + ' and ' + splitstring(s,'|')[3] + ' = ' + quotedstr(egv_CURRENT_PROBLEMID);\r\n if splitstring(s,'|')[6] = 'Ref.Phy.ID' then where_p := where_p + ' and ' + splitstring(s,'|')[3] + ' = ' + quotedstr(EGV_CURRENT_REFPHYCODE);\r\n if splitstring(s,'|')[6] = 'Allergy ID' then where_p := where_p + ' and ' + splitstring(s,'|')[3] + ' = ' + quotedstr(EGV_CURRENT_ALLERGYID);\r\n end; // showmessage(where_p);\r\nif splitstring(s,'|')[4] <> ''\r\nthen begin\r\n if splitstring(s,'|')[7] = 'MRN' then where_p := where_p + ' and ' + splitstring(s,'|')[4] + ' = ' + quotedstr(egv_CURRENT_MRN);\r\n if splitstring(s,'|')[6] = 'FHIR_ID' then where_p := where_p + ' and ' + splitstring(s,'|')[4] + ' = ' + quotedstr(EGV_PATIENTFHIRID);\r\n if splitstring(s,'|')[7] = 'Appt.date' then where_p := where_p + ' and ' + splitstring(s,'|')[4] + ' = ' + quotedstr(egv_CURRENT_APPTDATE);\r\n if splitstring(s,'|')[7] = 'Appt.ID' then where_p := where_p + ' and ' + splitstring(s,'|')[4] + ' = ' + egv_CURRENT_PROCEDURENUMBER;\r\n if splitstring(s,'|')[7] = 'Facility' then where_p := where_p + ' and ' + splitstring(s,'|')[4] + ' = ' + egv_FACILITYID;\r\n if splitstring(s,'|')[7] = 'Provider' then where_p := where_p + ' and ' + splitstring(s,'|')[4] + ' = ' + quotedstr(egv_CURRENT_PROVIDER);\r\n if splitstring(s,'|')[7] = 'Nurse1' then where_p := where_p + ' and ' + splitstring(s,'|')[4] + ' = ' + quotedstr(egv_CURRENT_NURSE1);\r\n if splitstring(s,'|')[7] = 'Nurse2' then where_p := where_p + ' and ' + splitstring(s,'|')[4] + ' = ' + quotedstr(egv_CURRENT_NURSE2);\r\n if splitstring(s,'|')[7] = 'Appt.Name' then where_p := where_p + ' and ' + splitstring(s,'|')[4] + ' = ' + quotedstr(egv_CURRENT_APPTNAME);\r\n if splitstring(s,'|')[7] = 'Med.ID' then where_p := where_p + ' and ' + splitstring(s,'|')[4] + ' = ' + quotedstr(egv_CURRENT_MEDID);\r\n if splitstring(s,'|')[7] = 'Problem ID' then where_p := where_p + ' and ' + splitstring(s,'|')[4] + ' = ' + quotedstr(egv_CURRENT_PROBLEMID);\r\n if splitstring(s,'|')[7] = 'Ref.Phy.ID' then where_p := where_p + ' and ' + splitstring(s,'|')[4] + ' = ' + quotedstr(EGV_CURRENT_REFPHYCODE);\r\n if splitstring(s,'|')[7] = 'Allergy ID' then where_p := where_p + ' and ' + splitstring(s,'|')[4] + ' = ' + quotedstr(EGV_CURRENT_ALLERGYID);\r\n end; // showmessage(where_p);\r\n\r\nwhere_p := copy(where_p, 6, length(where_p));\r\n\r\n//showmessage('mode:' + inttostr(mode));\r\n\r\nif mode = 0 // read data\r\nthen begin\r\n //if html_p.html.text <> ''\r\n //then showmessage(html_p.html.text);\r\n\r\n // showmessage(splitstring(s,'|')[8]);\r\n if (splitstring(s,'|')[1]<>'') and (splitstring(s,'|')[0]<>'')\r\n then s2 := 'select ' + splitstring(s,'|')[1] + ' from ' + splitstring(s,'|')[0]\r\n else s2 := '';\r\n // showmessage(s2);\r\n if (length(splitstring(s,'|')) >= 9) and (trim(splitstring(s,'|')[8]) <> '') // custom select or expression\r\n then begin\r\n s2 := splitstring(s,'|')[8];\r\n s2 := trim(InsertKeyValues(s2));\r\n // showmessage(s2);\r\n if (pos('SELECT', uppercase(s2)) <> 1) and\r\n (pos('EXECUTE', uppercase(s2)) <> 1) and\r\n (pos('USE', uppercase(s2)) <> 1) and\r\n (pos('DECLARE', uppercase(s2)) <> 1) and\r\n (pos('WITH', uppercase(s2)) <> 1) // if the value comes from SYSTEM variable ( EGV_FACIILITY ... )\r\n then begin\r\n if assigned(html_p) and (html_p.HTML.text <> '')\r\n then begin\r\n // showmessage(html_p.HTML.text);\r\n if pos('^', s2) > 0\r\n then begin\r\n for j := 0 to length(splitstring(s2,'^')) - 1\r\n do begin\r\n html_p.HTML.text :=\r\n stringreplace(html_p.HTML.text, '#VALUE_' + inttostr(j), splitstring(s2,'^')[j], [rfIgnoreCase]);\r\n end;\r\n end\r\n else html_p.HTML.text := stringreplace(html_p.HTML.text, '#VALUE_0', stringreplace(s2, '''', '', [rfReplaceall]), [rfIgnoreCase]);\r\n if pos('#VALUE_0', html_p.html.text) = 0 then html_p.visible := true;\r\n end\r\n else begin\r\n if assigned(html_p) then html_p.visible := false;\r\n\r\n { if trim(c.Text) <> trim(stringreplace(s2, '''', '', [rfReplaceall]))\r\n then c.tag := 1 // updated\r\n else c.tag := 0; }\r\n c.text := stringreplace(s2, '''', '', [rfIgnoreCase, rfReplaceAll]);\r\n BlockApplyDependencies(block_p, c.text);\r\n end; // showmessage(blockgettitle(block_p) + ' - ' + c.Text);\r\n StretchMemo(c);\r\n exit;\r\n end;\r\n end\r\n else begin\r\n // if html_p.html.text <> ''\r\n // then showmessage(html_p.html.text);\r\n if trim(s2) <> ''\r\n then begin\r\n if where_p <> '' then s2 := s2 + ' where ' + where_p;\r\n if pos('SELECT TOP ', uppercase(s2)) = 0\r\n then s2 := stringreplace(s2, 'select', 'select top 300',[rfIgnoreCase]);\r\n end\r\n else begin\r\n if assigned(html_p) and (html_p.html.text <> '')\r\n then begin\r\n html_p.visible := true;\r\n // showmessage(html_p.HTML.text);\r\n end;\r\n end;\r\n\r\n end;\r\n end;\r\nif (mode = 1) and (( splitstring(s,'|')[14] = '1' ) or ( splitstring(s,'|')[15] = '1' )) // update data\r\nthen begin\r\n if pos('~', c.text) = 0\r\n then value_to_save := c.text\r\n else value_to_save := copy(c.text, 1, pos('~', c.text) -1);\r\n\r\n if ( length(splitstring(s,'|')) < 11) or (trim(splitstring(s,'|')[10]) = '' )\r\n then begin\r\n s2 := 'update ' + splitstring(s,'|')[0] + ' set ' + splitstring(s,'|')[1] + ' = ' + quotedstr(value_to_save);\r\n if where_p <> '' then s2 := s2 + ' where ' + where_p;\r\n end\r\n else begin\r\n s2 := splitstring(s,'|')[10];\r\n //showmessage(s2);\r\n s2 := InsertKeyValues(s2);\r\n //showmessage(s2);\r\n\r\n // insert data from anothe block\r\n for i := 0 to egv_currentblock.parent.ControlCount - 1\r\n do if (egv_currentblock.parent.Controls[i] is Tpanel) and\r\n (blockgetmemo((egv_currentblock.parent.Controls[i] as Tpanel)) <> nil)\r\n then s2 := stringreplace(s2, '<' + blockgettitle((egv_currentblock.parent.Controls[i] as Tpanel)) + '>',\r\n blockgetmemo((egv_currentblock.parent.Controls[i] as Tpanel)).text, [rfReplaceAll, rfIgnorecase]);\r\n //showmessage(s2);\r\n\r\n\r\n // insert the value:\r\n s2 := stringreplace(s2, ':NEW_VALUE', quotedstr(value_to_save), [rfIgnoreCase, rfReplaceAll]);\r\n //showmessage(s2);\r\n //showmessage(value_to_save);\r\n end;\r\n end;\r\nif (mode = 2) and ( length(splitstring(s,'|')) >= 13 ) // prepare form for insert\r\nthen begin //showmessage(s);\r\n s2 := splitstring(s,'|')[11];\r\n // showmessage(s2);\r\n s2 := trim(uppercase(InsertKeyValues(s2)));\r\n // showmessage(s2);\r\n if (pos('SELECT', s2) <> 1) and\r\n (pos('EXECUTE', s2) <> 1) and\r\n (pos('USE', s2) <> 1) and\r\n (pos('DECLARE', s2) <> 1) and\r\n (pos('With', s2) <> 1) // if the value comes from SYSTEM variable ( EGV_FACIILITY ... )\r\n then begin\r\n if assigned(html_p) and (html_p.HTML.text <> '')\r\n then begin\r\n if pos('^', s2) > 0\r\n then begin\r\n for j := 0 to length(splitstring(s2,'^')) - 1\r\n do begin\r\n html_p.HTML.text :=\r\n stringreplace(html_p.HTML.text, '#VALUE_' + inttostr(j), splitstring(s2,'^')[j], [rfIgnoreCase]);\r\n end;\r\n end\r\n else html_p.HTML.text := stringreplace(html_p.HTML.text, '#VALUE_0', stringreplace(s2, '''', '', [rfIgnoreCase, rfReplaceAll]), [rfIgnoreCase]);\r\n if pos('#VALUE_0', html_p.html.text) = 0 then html_p.visible := true;\r\n end\r\n else begin\r\n if assigned(html_p) then html_p.visible := false;\r\n if pos(':NEW_VALUE', s2) = 0\r\n then c.text := stringreplace(s2, '''', '', [rfIgnoreCase, rfReplaceAll]);\r\n end;\r\n // StretchMemo(c);\r\n // showmessage(c.text);\r\n exit;\r\n end;\r\n end;\r\nif (mode = 3) // prepare insert SQL\r\nthen begin\r\n if pos('~', c.text) = 0\r\n then value_to_save := c.text\r\n else value_to_save := copy(c.text, 1, pos('~', c.text) -1);\r\n s2 := splitstring(s,'|')[11];\r\n s2 := trim(uppercase(InsertKeyValues(s2)));\r\n if pos(':NEW_VALUE', s2) > 0\r\n then value_to_save := stringreplace(s2, ':NEW_VALUE', quotedstr(value_to_save), [rfIgnoreCase, rfReplaceAll]) // apply function to new value ( encryption, ...)\r\n else value_to_save := quotedstr(value_to_save);\r\n\r\n if ( splitstring(s,'|')[15] = '1' )\r\n then begin\r\n InsertSQL_Table := splitstring(s,'|')[0];\r\n\r\n if InsertSQL_Columns = ''\r\n then InsertSQL_Columns := splitstring(s,'|')[1]\r\n else InsertSQL_Columns := InsertSQL_Columns + ', ' + splitstring(s,'|')[1];\r\n\r\n if InsertSQL_Values = ''\r\n then InsertSQL_Values := value_to_save\r\n else InsertSQL_Values := InsertSQL_Values + ', ' + value_to_save;\r\n end;\r\n exit;\r\n end;\r\n\r\n//showmessage(block_p.Name + ': ' + s2);\r\n//if html_p.HTML.Text <> '' then showmessage(s2);\r\n\r\nif s2 <> ''\r\nthen begin\r\n DBType_p := DBType(s2);\r\n if (mode = 0) or (mode = 2)\r\n then begin\r\n //showmessage(Block_p.Name + ' --- ' + s2);\r\n if DBType_p = 1\r\n then dm.XDataWebClient1.RawInvoke('IReportService.GetColumnData',[s2 , egv_facilityid, inttostr(DBType_p)], @OnResult)\r\n else if dm.XDataWebConnection2.Connected then dm.XDataWebClient2.RawInvoke('IReportService.GetColumnData',[s2 , egv_facilityid, inttostr(DBType_p)], @OnResult);\r\n end;\r\n if mode = 1\r\n then begin\r\n // showmessage(s2);\r\n if UpdateScript = '' then UpdateScript := 'USE ' + inttostr(DBType_p) + '; '+ char(13);\r\n\r\n if CreateScript\r\n then UpdateScript := UpdateScript + s2 + ';' + char(13) + char(13)\r\n else begin\r\n //showmessage(s2 + ' - ' + inttostr(DBType_p));\r\n if DBType_p = 1\r\n then dm.XDataWebClient1.RawInvoke('IReportService.ExecQuery',[s2 , egv_facilityid, inttostr(DBType_p)], @OnResult)\r\n else if dm.XDataWebConnection2.Connected then dm.XDataWebClient2.RawInvoke('IReportService.ExecQuery',[s2 , egv_facilityid, inttostr(DBType_p)], @OnResult);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure FinishBlockTitleEdit(Sender: TObject);\r\nvar i: integer; c: TControl; c1, c2: string;\r\nbegin\r\nfor i := 0 to frmmain.edtDesign_BlockTitleEdit.parent.ControlCount - 1\r\n do begin\r\n c := frmmain.edtDesign_BlockTitleEdit.parent.Controls[i];\r\n if (c is TLabel)\r\n then begin\r\n // showmessage(c.Name);\r\n c1 := ( c as TLabel).Caption;\r\n ( c as TLabel).Caption := frmmain.edtDesign_BlockTitleEdit.Text;\r\n { if ( c as TWebLabel).Caption = ''\r\n then ( c as TWebLabel).Caption := ' '; }\r\n\r\n frmmain.edtDesign_BlockTitleEdit.Visible := false;\r\n c.Visible := true;\r\n c2 := ( c as TLabel).Caption;\r\n end;\r\n end;\r\n//showmessage( ((((sender as TControl).parent as TControl).parent as twebcontrol).parent as TWebScrollBox).name );\r\n//showmessage(uppercase(((sender as TControl).parent as TControl).parent.Name));\r\n//showmessage(' finish title edit :' + ((sender as TControl).parent as TControl).parent.Name);\r\n//showmessage('subform: ' + uppercase(((sender as TControl).parent as TControl).parent.Name));\r\n\r\n//showmessage(c1); showmessage(c2);\r\n\r\nif uppercase((((sender as TControl).parent as TControl).parent as Tcontrol).parent.Name) = 'SUBFORM_DIV'\r\nthen CollectFormDesignInfo(((sender as TControl).parent as Tcontrol).parent.name, 3, c1, c2)\r\nelse if ( uppercase((((sender as TControl).parent as TControl).parent as Tcontrol).parent.Name) = 'SBLOGOBOX' ) or\r\n ( uppercase((((sender as TControl).parent as TControl).parent as Tcontrol).parent.Name) = 'SBALERTBOXES' ) or\r\n ( uppercase((((sender as TControl).parent as TControl).parent as Tcontrol).parent.Name) = 'SBINFOBOXES' )\r\n then CollectFormDesignInfo(((sender as TControl).parent as Tcontrol).parent.name, 3, c1, c2, frmmain.name,\r\n ((((sender as TControl).parent as TControl).parent as Tcontrol).parent as TScrollBox))\r\n else CollectFormDesignInfo(((sender as TControl).parent as Tcontrol).parent.name, 3, c1, c2, getcurrentformname,\r\n ((((sender as TControl).parent as TControl).parent as Tcontrol).parent as TScrollBox));\r\nend;\r\n\r\nprocedure BlockDragOverTitle(Sender, Source: TObject; X, Y: Integer;\r\n State: TDragState; var Accept: Boolean);\r\n var i: integer; P: TPoint; DesignArea_p: TScrollBox;\r\nbegin\r\n//(getcurrentform.FindComponent('memo') as Twebmemo).text := (sender as TWebcontrol).name;\r\nAccept := (frmmain.btnSwitch_Design.state = ssOn);\r\nDesignArea_p := GetDesignArea((Source as TControl)); // := getcurrentformdiv;\r\n P.X := X;\r\n P.Y := Y - 10 + DesignArea_p.ScrollTop;\r\n P := DesignArea_p.screentoclient(P);\r\n for i := 0 to DesignArea_p.ControlCount - 1\r\n do if (DesignArea_p.Controls[i] is Tpanel)\r\n then begin\r\n if (DesignArea_p.Controls[i] as Tpanel).elementclassname = 'data_block_lineup'\r\n then (DesignArea_p.Controls[i] as Tpanel).elementclassname := 'data_block';\r\n if (DesignArea_p.Controls[i] as Tpanel).elementclassname = 'data_block_deleted_lineup'\r\n then (DesignArea_p.Controls[i] as Tpanel).elementclassname := 'data_block_deleted';\r\n end;\r\n for i := 0 to DesignArea_p.ControlCount - 1\r\n do if (DesignArea_p.Controls[i] is Tpanel) and\r\n (\r\n (((DesignArea_p.Controls[i] as Tpanel).left > (P.X - 3)) and ((DesignArea_p.Controls[i] as Tpanel).left < (P.X + 3))) or\r\n (((DesignArea_p.Controls[i] as Tpanel).top > (P.Y - 3)) and ((DesignArea_p.Controls[i] as Tpanel).top < (P.Y + 3)))\r\n )\r\n then begin //showmessage('1');\r\n if (DesignArea_p.Controls[i] as Tpanel).elementclassname = 'data_block'\r\n then (DesignArea_p.Controls[i] as Tpanel).elementclassname := 'data_block_lineup';\r\n if (DesignArea_p.Controls[i] as Tpanel).elementclassname = 'data_block_deleted'\r\n then (DesignArea_p.Controls[i] as Tpanel).elementclassname := 'data_block_deleted_lineup';\r\n end;\r\nend;\r\n\r\nprocedure BlockDragDrop(Sender, Source: TObject; X, Y: Integer; form_p: Tform=nil; formdiv_p: TScrollBox=nil; columns_p: integer=0);\r\nvar i, childorder_sender_p, childorder_source_p, left_sender_p, top_sender_p, left_source_p, top_source_p: integer;\r\n p_source, p_sender: Tpanel; Formname_p, s, s2: string; P: TPoint; DesignArea_p: TScrollBox;\r\n sender_id, source_id, sender_X, sender_Y, source_X, source_Y: string;\r\nbegin\r\n//showmessage('1');\r\nDesignArea_p := GetDesignArea((Source as TControl)); //currentformdiv;\r\n//remove line-up highlits\r\nfor i := 0 to DesignArea_p.ControlCount - 1\r\n do if (DesignArea_p.Controls[i] is Tpanel)\r\n then begin\r\n if(DesignArea_p.Controls[i] as Tpanel).elementclassname = 'data_block_lineup'\r\n then (DesignArea_p.Controls[i] as Tpanel).elementclassname := 'data_block';\r\n if (DesignArea_p.Controls[i] as Tpanel).elementclassname = 'data_block_deleted_lineup'\r\n then (DesignArea_p.Controls[i] as Tpanel).elementclassname := 'data_block_deleted';\r\n end;\r\n\r\nif columns_p = 0 then columns_p := egv_formcolumns;\r\n\r\n// SOURCE ---> SENDER\r\nif assigned(form_p)\r\nthen begin\r\n Formname_p := form_p.name; //showmessage(formname_p);\r\n end\r\nelse begin\r\n FormDiv_p := GetCurrentFormDiv; //(EGV_SUBFORM3.FindComponent('SubForm_DIV') as TWebScrollBox);\r\n Formname_p := GetCurrentFormName; //(EGV_SUBFORM3.Name);\r\n end;\r\n\r\n//showmessage('1');\r\nif source is Tlabel then p_source := (((source as TControl).parent as Tpanel).parent as TPanel);\r\nif source is TPanel then p_source := ((source as TControl).parent as Tpanel);\r\nif source is TMemo then p_source := ((source as TControl).parent as Tpanel);\r\nif source is THTMLContainer then p_source := ((source as TControl).parent as Tpanel);\r\n// showmessage('2');\r\nif sender is Tlabel then p_sender := (((sender as TControl).parent as Tpanel).parent as TPanel);\r\nif sender is TPanel then p_sender := ((sender as TControl).parent as Tpanel);\r\nif sender is TMemo then p_sender := ((sender as TControl).parent as Tpanel);\r\nif sender is THTMLContainer then p_sender := ((sender as TControl).parent as Tpanel);\r\n//showmessage('3');\r\n\r\nif (sender is TScrollBox) or ((p_sender as Tpanel).name = (p_source as Tpanel).name)\r\nthen begin\r\n // if block has custom top/left apply and take the next\r\n\r\n P.X := X;\r\n P.Y := Y - 10 + DesignArea_p.ScrollTop;;\r\n P := DesignArea_p.screentoclient(P);\r\n\r\n for i := 0 to DesignArea_p.ControlCount - 1\r\n do begin\r\n if (DesignArea_p.Controls[i] is Tpanel)\r\n then begin\r\n if ((DesignArea_p.Controls[i] as Tpanel).left > (P.X - 3)) and ((DesignArea_p.Controls[i] as Tpanel).left < (P.X + 3))\r\n then P.X := (DesignArea_p.Controls[i] as Tpanel).left;\r\n if ((DesignArea_p.Controls[i] as Tpanel).top > (P.Y - 3)) and ((DesignArea_p.Controls[i] as Tpanel).top < (P.Y + 3))\r\n then P.Y := (DesignArea_p.Controls[i] as Tpanel).top;\r\n end;\r\n end;\r\n\r\n getblockuniqueid(p_source);\r\n s := dm.egv_localstorage.values['DBF_' + EGV_BLOCKUNIQUEID];\r\n //showmessage(inttostr(length(splitstring(s,'|'))));\r\n for i := length(splitstring(s,'|')) to 26\r\n do s := s + '|';\r\n s2 := '';\r\n for i := 0 to length(splitstring(s,'|')) - 1\r\n do begin\r\n if i = 24 then s2 := s2 + inttostr(P.Y) + '|'\r\n else if i = 25 then s2 := s2 + inttostr(P.X) + '|'\r\n else s2 := s2 + splitstring(s,'|')[i] + '|';\r\n end;\r\n dm.egv_localstorage.values['DBF_' + EGV_BLOCKUNIQUEID] := s2;\r\n //showmessage(s2);\r\n OrganizeBlocks(FormDiv_p, columns_p);\r\n CollectFormDesignInfo('', 2, '', '', formname_p, formdiv_p); // showmessage('3');\r\n AlignFilterColumns;\r\n exit;\r\n end;\r\n\r\nchildorder_sender_p := p_sender.childorder;\r\nchildorder_source_p := p_source.childorder;\r\nif childorder_source_p < childorder_sender_p // forward\r\nthen begin\r\n for i := 0 to FormDiv_p.controlcount - 1\r\n do if FormDiv_p.controls[i] is TPanel\r\n then if ((FormDiv_p.controls[i] as Tpanel).childorder > childorder_source_p) and\r\n ((FormDiv_p.controls[i] as Tpanel).childorder <= childorder_sender_p)\r\n then (FormDiv_p.controls[i] as Tpanel).childorder := (FormDiv_p.controls[i] as Tpanel).childorder - 1;\r\n end\r\nelse begin\r\n for i := 0 to FormDiv_p.controlcount - 1 // back\r\n do if FormDiv_p.controls[i] is TPanel\r\n then if ((FormDiv_p.controls[i] as Tpanel).childorder >= childorder_sender_p) and\r\n ((FormDiv_p.controls[i] as Tpanel).childorder < childorder_source_p)\r\n then (FormDiv_p.controls[i] as Tpanel).childorder := (FormDiv_p.controls[i] as Tpanel).childorder + 1;\r\n end;\r\n\r\np_source.childorder := childorder_sender_p; //showmessage('1');\r\n\r\n// Swap block's X,Y\r\nsender_id := getblockuniqueid(p_sender, false);\r\nsource_id := getblockuniqueid(p_source, false);\r\ns := dm.egv_localstorage.values['DBF_' + sender_id];\r\nif length(splitstring(s,'|')) >= 26\r\nthen begin sender_X := splitstring(s,'|')[24]; sender_Y := splitstring(s,'|')[25]; end\r\nelse begin sender_X := '0'; sender_Y := '0'; end;\r\nif sender_X = '' then sender_X := '0';\r\nif sender_Y = '' then sender_Y := '0';\r\n\r\ns := dm.egv_localstorage.values['DBF_' + source_id];\r\nif length(splitstring(s,'|')) >= 26\r\nthen begin source_X := splitstring(s,'|')[24]; source_Y := splitstring(s,'|')[25]; end\r\nelse begin source_X := '0'; source_Y := '0'; end;\r\nif source_X = '' then source_X := '0';\r\nif source_Y = '' then source_Y := '0';\r\n\r\n//showmessage(source_X + ' - ' + source_Y);\r\ns2 := '';\r\ns := dm.egv_localstorage.values['DBF_' + sender_id];\r\nfor i := length(splitstring(s,'|')) to 26 do s := s + '|';\r\nfor i := 0 to length(splitstring(s,'|')) - 1\r\n do begin\r\n if i = 24 then s2 := s2 + source_X + '|'\r\n else if i = 25 then s2 := s2 + source_Y + '|'\r\n else s2 := s2 + splitstring(s,'|')[i] + '|';\r\n end;\r\ndm.egv_localstorage.values['DBF_' + sender_id] := s2;\r\n\r\ns2 := '';\r\ns := dm.egv_localstorage.values['DBF_' + source_id];\r\nfor i := 0 to length(splitstring(s,'|')) - 1\r\n do begin\r\n if i = 24 then s2 := s2 + sender_X + '|'\r\n else if i = 25 then s2 := s2 + sender_Y + '|'\r\n else s2 := s2 + splitstring(s,'|')[i] + '|';\r\n end;\r\ndm.egv_localstorage.values['DBF_' + source_id] := s2;\r\n\r\nOrganizeBlocks(FormDiv_p, columns_p);\r\n\r\nCollectFormDesignInfo('', 2, '', '', formname_p, formdiv_p); // showmessage('3');\r\nAlignFilterColumns;\r\nend;\r\n\r\nprocedure Block_Hide_Show(Sender: TObject);\r\nbegin\r\n//showmessage(((sender as tcontrol).parent as TWebPanel).elementclassname);\r\n//(btnDesign_Hide.parent as TWebPanel).Visible := false;\r\nif ((sender as tcontrol).parent as TPanel).elementclassname = 'data_block_deleted_focused'\r\nthen ((sender as tcontrol).parent as TPanel).elementclassname := 'data_block_focused'\r\nelse ((sender as tcontrol).parent as TPanel).elementclassname := 'data_block_deleted_focused';\r\n\r\n{if ((sender as tcontrol).parent as TWebPanel).BorderColor = clred\r\nthen ((sender as tcontrol).parent as TWebPanel).BorderColor := clSilver\r\nelse ((sender as tcontrol).parent as TWebPanel).BorderColor := clRed; }\r\n\r\nif uppercase(((sender as TControl).parent as TControl).parent.Name) = 'SUBFORM_DIV'\r\nthen CollectFormDesignInfo((sender as TControl).parent.name, 1, '', '', '', nil, true)\r\nelse if ( uppercase(((sender as TControl).parent as TControl).parent.Name) = 'SBLOGOBOX' ) or\r\n ( uppercase(((sender as TControl).parent as TControl).parent.Name) = 'SBALERTBOXES' ) or\r\n ( uppercase(((sender as TControl).parent as TControl).parent.Name) = 'SBINFOBOXES' )\r\n then CollectFormDesignInfo((sender as TControl).parent.name, 1, '', '', frmmain.name,\r\n (((sender as TControl).parent as TControl).parent as TScrollBox), true)\r\n else CollectFormDesignInfo((sender as TControl).parent.name, 1, '', '', getcurrentformname,\r\n (((sender as TControl).parent as TControl).parent as TScrollBox), true);\r\n\r\nif Pos('#'+((sender as TControl).parent as TPanel).Name+'#', EGV_FORMDESIGN) = 0\r\nthen frmmain.btnDesign_Hide.elementclassname := 'btn btn-warning'\r\nelse frmmain.btnDesign_Hide.elementclassname := 'btn btn-danger';\r\nend;\r\n\r\nprocedure CollectFormDesignInfo(objectname_p: string; mode_p: integer = 1; BlockTitle_Old_p: string=''; BlockTitle_New_p: string='';\r\n formname_p: string=''; formdiv_p: TScrollBox=nil; ResizeBlocks_p: boolean=false);\r\nvar i: integer; sql_p,s1,s2,s3,s4,s5: string; c: Tpanel; designinfo_p: string;\r\nbegin\r\n//mode= 1-visibility, 2-position(childorder), 3-Block title\r\ntry\r\nformname_p := uppercase(formname_p);\r\nif not assigned(formdiv_p)\r\nthen begin\r\n FormDiv_p := GetCurrentFormDiv; //(EGV_SUBFORM3.FindComponent('SubForm_DIV') as TWebScrollBox);\r\n Formname_p := GetCurrentFormName; //(EGV_SUBFORM3.Name);\r\n end;\r\nif mode_p = 1\r\nthen begin\r\n designinfo_p := dm.EGV_LOCALSTORAGE.values['DSN_' + formname_p + '_' + uppercase(FormDiv_p.name) + '_V'];\r\n // showmessage('v_desing from storage before: '+ 'DSN_' + formname_p + '_' + FormDiv_p.name + '_V: ' + designinfo_p);\r\n EGV_SECTIONNAME := 'D_' + Formname_p + '_V';\r\n if designinfo_p = '' then designinfo_p := '#';\r\n if pos('#'+objectname_p+'#', designinfo_p) = 0\r\n then designinfo_p := designinfo_p + objectname_p + '#'\r\n else designinfo_p := stringreplace(designinfo_p, '#'+objectname_p+'#', '#', [rfIgnoreCase]);\r\n if designinfo_p = '#' then designinfo_p := '';\r\n dm.EGV_LOCALSTORAGE.values['DSN_' + formname_p + '_' + uppercase(FormDiv_p.name) + '_V'] := designinfo_p;\r\n// showmessage('v_desing from storage after: '+ designinfo_p);\r\n // save in DB\r\n\r\n GetPostFormDesignData(Formname_p, 'V', 1, formdiv_p, 0, ResizeBlocks_p);\r\n end;\r\nif mode_p = 2\r\nthen begin\r\n designinfo_p := dm.EGV_LOCALSTORAGE.values['DSN_' + formname_p + '_' + uppercase(FormDiv_p.name) + '_P'];\r\n\r\n EGV_SECTIONNAME := 'D_' + Formname_p + '_P';\r\n for i:=0 to FormDiv_p.controlcount - 1\r\n do begin\r\n if not (FormDiv_p.controls[i] is TPanel) then continue;\r\n c := (FormDiv_p.controls[i] as TPanel);\r\n // showmessage(c.name);\r\n if designinfo_p = '' then designinfo_p := '#';\r\n if pos('#'+c.name+'~', designinfo_p) = 0\r\n then designinfo_p := designinfo_p + c.name + '~'+inttostr(c.childorder).padleft(3,'0') + '#'\r\n else begin\r\n s2 := copy(designinfo_p, pos('#'+c.name+'~', designinfo_p) + 1, length(c.name) + 4);\r\n designinfo_p := stringreplace(designinfo_p, '#' + s2, '#' + c.name+'~' + inttostr(c.childorder).padleft(3,'0'), [rfIgnoreCase]);\r\n end;\r\n end;\r\n if designinfo_p = '#' then designinfo_p := '';\r\n dm.EGV_LOCALSTORAGE.values['DSN_' + formname_p + '_' + uppercase(FormDiv_p.name) + '_P'] := designinfo_p;\r\n // save in DB\r\n GetPostFormDesignData(Formname_p, 'P', 1, formdiv_p, 0, ResizeBlocks_p);\r\n end;\r\n\r\nif mode_p = 3\r\nthen begin\r\n designinfo_p := dm.EGV_LOCALSTORAGE.values['DSN_' + formname_p + '_' + uppercase(FormDiv_p.name) + '_T'];\r\n\r\n EGV_SECTIONNAME := 'D_' + Formname_p + '_T';\r\n if designinfo_p = '' then designinfo_p := '#';\r\n if BlockTitle_New_p <> ''\r\n then begin\r\n if pos('#'+objectname_p+'~'+BlockTitle_Old_p, designinfo_p) = 0\r\n then designinfo_p := designinfo_p + objectname_p + '~' + BlockTitle_New_p + '#'\r\n else designinfo_p := stringreplace(designinfo_p,\r\n '#' + objectname_p + '~' + BlockTitle_Old_p,\r\n '#' + objectname_p + '~' + BlockTitle_New_p,\r\n [rfIgnoreCase]);\r\n\r\n //showmessage(designinfo_p);\r\n end\r\n else designinfo_p := stringreplace(designinfo_p,\r\n '#' + objectname_p + '~' + BlockTitle_Old_p,\r\n '',\r\n [rfIgnoreCase]);\r\n if designinfo_p = '#' then designinfo_p := '';\r\n // showmessage('collected(T): ' + designinfo_p);\r\n // save in DB\r\n // showmessage('collected(T): ' + designinfo_p);\r\n dm.EGV_LOCALSTORAGE.values['DSN_' + formname_p + '_' + uppercase(FormDiv_p.name) + '_T'] := designinfo_p;\r\n GetPostFormDesignData(Formname_p, 'T', 1, formdiv_p, 0, ResizeBlocks_p);\r\n end;\r\n\r\nfinally\r\n\r\nend;\r\nend;\r\n\r\n\r\nprocedure ApplyFormDesign(maincontrol_p: TControl; mode_p: integer=1; Visible: boolean=false; formname_p: string='');\r\nvar i, j, k, l, n, m: integer; s_p, s1,s2,s3,s4,s5: string; c: Tpanel; childorder_p: integer;\r\n c2: tcontrol; designinfo_p: string; currentform_p: TForm;\r\nbegin\r\n//showmessage('apply form design starts: ' + maincontrol_p.Name + ' mode = ' + inttostr(mode_p));\r\n//if egv_subform = nil then exit;\r\n//showmessage('start ApplyFormDesign mode: ' + inttostr(mode_p));\r\ntry\r\nformname_p := uppercase(formname_p);\r\n//showmessage('form name: ' + formname_p);\r\n\r\n\r\nif mode_p = 1 // visibility\r\nthen begin\r\n // if designinfo_p = '' then designinfo_p := egv_formdesign;\r\n designinfo_p := dm.EGV_LOCALSTORAGE.values['DSN_' + formname_p + '_' + uppercase(maincontrol_p.name) + '_V'];\r\n //showmessage('Apply Visibility: ' + 'DSN_' + formname_p + '_' + maincontrol_p.name + '_V : ' + designinfo_p);\r\n\r\n //reset all visibility set by block dependencies\r\n for i := 0 to maincontrol_p.controlcount - 1\r\n do begin\r\n if (maincontrol_p.controls[i] is Tpanel)\r\n then {if (maincontrol_p.Controls[i] as TWebPanel).tag = 1\r\n then} (maincontrol_p.Controls[i] as TPanel).Visible := true;\r\n end;\r\n\r\n if (designinfo_p <> '') and (pos('#', designinfo_p) > 0)\r\n then begin\r\n s_p := designinfo_p;\r\n i := 0;\r\n while s_p<>'#'\r\n do begin\r\n // showmessage('s_p: ' + s_p);\r\n s1 := copy(s_p, pos('#',s_p) + 1, length(s_p));\r\n s1 := copy(s1, 1, pos('#',s1) - 1);\r\n for j := 0 to maincontrol_p.Controlcount - 1\r\n do if (maincontrol_p.controls[j].name = s1)\r\n then begin\r\n (maincontrol_p.controls[j] as TControl).visible := Visible;\r\n if Visible\r\n then begin\r\n // showmessage((maincontrol_p.controls[j] as twebpanel).name);\r\n (maincontrol_p.controls[j] as Tpanel).elementclassname := 'data_block_deleted' // bordercolor := clRed\r\n end\r\n else (maincontrol_p.controls[j] as Tpanel).elementclassname := 'data_block'; //.bordercolor := clwhite;\r\n end;\r\n s_p := stringreplace(s_p,'#'+s1,'', [rfIgnoreCase]);\r\n i := i + 1;\r\n end;\r\n // showmessage('Dependencies');\r\n // Block visibility can be changed in design mode.\r\n //Restore Dependencies. This will not work when the form opens first time - titles are not set yet.\r\n for i := 0 to maincontrol_p.Controlcount - 1\r\n do begin\r\n if (maincontrol_p.Controls[i] is TPanel) and ((BlockGetMemo(maincontrol_p.Controls[i] as TPanel)) <> nil)\r\n then BlockApplyDependencies(maincontrol_p.Controls[i] as TPanel, BlockGetMemo(maincontrol_p.Controls[i] as TPanel).Text );\r\n end;\r\n\r\n with frmmain\r\n do begin\r\n pnlTopBanners.Visible := (B1.Visible or B2.Visible or B3.Visible or B4.Visible or B5.Visible);\r\n pnlFormBottomBar.Visible := (B6.Visible or B7.Visible or B8.Visible or B9.Visible or B10.Visible);\r\n sbLogoBox.Visible := pnlLogo.Visible;\r\n end;\r\n end;\r\n currentform_p := getcurrentform;\r\n if uppercase(maincontrol_p.Name) = 'SBSIDEDATA'\r\n then begin // showmessage('2380:'+inttostr(((maincontrol_p.parent) as TWebPanel).width));\r\n ((maincontrol_p.parent) as TPanel).visible :=\r\n ((currentform_p.FindComponent('sb1') as TPanel).Visible or\r\n (currentform_p.FindComponent('sb2') as TPanel).Visible or\r\n (currentform_p.FindComponent('sb3') as TPanel).Visible or\r\n (currentform_p.FindComponent('sb4') as TPanel).Visible or\r\n (currentform_p.FindComponent('sb5') as TPanel).Visible or\r\n (currentform_p.FindComponent('sb6') as TPanel).Visible or\r\n (currentform_p.FindComponent('sb7') as TPanel).Visible or\r\n (currentform_p.FindComponent('sb101') as TPanel).Visible\r\n );\r\n // if ((maincontrol_p.parent) as TWebPanel).Visible then showmessage('visible');\r\n (currentform_p.FindComponent('spSideDataSplitter') as TSplitter).Visible :=\r\n ((frmmain.btnSwitch_Design.State = ssON) or ((maincontrol_p.parent) as TPanel).Visible);\r\n { if (maincontrol_p.parent as TWebPanel).Visible\r\n then} StretchAllMemos((maincontrol_p as TScrollBox));\r\n ResizeFormBlocks(GetCurrentFormDiv, egv_formcolumns);\r\n form_adjustgrids(getcurrentform);\r\n end;\r\n end;\r\n\r\n // showmessage('1');\r\nif mode_p = 2 // position\r\nthen begin\r\n designinfo_p := dm.EGV_LOCALSTORAGE.values['DSN_' + formname_p + '_' + uppercase(maincontrol_p.name) + '_P'];\r\n // showmessage('Aply Positions ): ' + egv_formdesign_p);\r\nif (designinfo_p <> '') and (pos('#', designinfo_p) > 0)\r\nthen begin\r\n s_p := designinfo_p;\r\n i := 0;\r\n while s_p<>'#'\r\n do begin\r\n s1 := copy(s_p, pos('#',s_p) + 1, length(s_p));\r\n s1 := copy(s1, 1, pos('#',s1) - 1); //showmessage(s1);\r\n s2 := copy(s1, 1, pos('~',s1) - 1); // object name\r\n s3 := copy(s1, pos('~',s1) + 1, 3); // childorder\r\n for j := 0 to maincontrol_p.Controlcount - 1\r\n do if (maincontrol_p.controls[j].name = s2) and ((maincontrol_p.controls[j] as TPanel).childorder < 1000)\r\n then (maincontrol_p.controls[j] as TPanel).childorder := strtoint(s3);\r\n s_p := stringreplace(s_p,'#'+s1,'', [rfIgnoreCase]);\r\n i := i + 1;\r\n end;\r\n\r\n end;\r\nend;\r\n\r\nif mode_p = 3 // Titles\r\nthen begin\r\n designinfo_p := dm.EGV_LOCALSTORAGE.values['DSN_' + formname_p + '_' + uppercase(maincontrol_p.name) + '_T'];\r\n // showmessage('Apply Titles ): ' + designinfo_p);\r\n // showmessage(maincontrol_p.Name);\r\nif (designinfo_p <> '') and (pos('#', designinfo_p) > 0)\r\nthen begin\r\n for m:= 0 to length(designinfo_p)\r\n do if designinfo_p[m] = '?' then designinfo_p[m] := #32; // no '?' in titles;\r\n\r\n s_p := designinfo_p;\r\n i := 0;\r\n while s_p<>'#'\r\n do begin\r\n //showmessage(s_p);\r\n s1 := copy(s_p, pos('#',s_p) + 1, length(s_p));\r\n s1 := copy(s1, 1, pos('#',s1) - 1); //showmessage(s1);\r\n s2 := copy(s1, 1, pos('~',s1) - 1); // object name\r\n s3 := copy(s1, pos('~',s1) + 1, length(s1)); // Title\r\n // showmessage(s1 + ' - ' + s2 + ' - ' + s3);\r\n for j := 0 to maincontrol_p.Controlcount - 1\r\n do begin\r\n // showmessage(maincontrol_p.controls[j].name);\r\n if maincontrol_p.controls[j].name = s2\r\n then begin\r\n c2 := maincontrol_p.controls[j];\r\n for k := 0 to c2.controlCount - 1 do\r\n if c2.Controls[k] is TPanel\r\n then begin\r\n c2 := c2.Controls[k]; //showmessage(' block title panel: ' + c2.name);\r\n //12345 (c2 as TWebpanel).ElementClassName := 'block_top'; // set regular tile properties\r\n //if title is empty and not in design mode - hide it\r\n for l := 0 to c2.controlcount - 1\r\n do if c2.Controls[l] is TLabel\r\n then begin\r\n (c2.Controls[l] as TLabel).Caption := trim(s3);\r\n // showmessage(maincontrol_p.Name);\r\n c2.Visible := (\r\n (trim(s3) <> '') or\r\n ((uppercase(maincontrol_p.Name) = 'SBSEARCH') or\r\n (frmmain.btnSwitch_Design.state = ssON))\r\n );\r\n break;\r\n end;\r\n end;\r\n end;\r\n end;\r\n // showmessage(s_p); showmessage(s1);\r\n // s_p:= stringreplace(s_p,'???','',[]);\r\n s_p := stringreplace(s_p,'#'+s1,'', [rfIgnoreCase]);\r\n i := i + 1;\r\n end;\r\n // All titles assigned\r\n //Aply Dependencies\r\n for i := 0 to maincontrol_p.Controlcount - 1\r\n do begin\r\n if (maincontrol_p.Controls[i] is TPanel) and ((BlockGetMemo(maincontrol_p.Controls[i] as TPanel)) <> nil)\r\n then BlockApplyDependencies(maincontrol_p.Controls[i] as TPanel, BlockGetMemo(maincontrol_p.Controls[i] as TPanel).Text );\r\n end;\r\n\r\n end;\r\nend;\r\n\r\nfinally\r\n\r\nend;\r\n\r\n//showmessage('apply form design ends ');\r\nend;\r\n\r\nprocedure SwitchFormDesign(form_p: TForm; DesignPanel_p: TScrollBox=nil; columns_p: integer=0; AutoAllowed: Boolean=true);\r\nbegin\r\n//showmessage('SwitchFormDesign');\r\nif columns_p = 0 then columns_p := egv_formcolumns;\r\n\r\nif not assigned(DesignPanel_p) then DesignPanel_p := getcurrentformdiv; //EGV_CURRENTFORM_DIV;\r\nif not ( assigned(form_p) and assigned(DesignPanel_p) ) then exit;\r\nif columns_p = 0 then columns_p := egv_formcolumns;\r\n//showmessage(inttostr(columns_p));\r\nif uppercase(form_p.Name) <> 'FRMMAIN'\r\nthen begin\r\n if Assigned(form_p)\r\n then begin\r\n //if EGV_SHOWHIDDENBLOCKSINDESIGN then showmessage('1');\r\n // showmessage('apply design ' + DesignPanel_p.name);\r\n applyformdesign(DesignPanel_p, 1, ((frmmain.btnSwitch_Design.state = ssOn) and EGV_SHOWHIDDENBLOCKSINDESIGN ), form_p.name);\r\n //showmessage('2');\r\n // showmessage('calling resize ' + DesignPanel_p.name);\r\n ResizeFormBlocks(DesignPanel_p, columns_p,AutoAllowed);\r\n\r\n // OrganizeBlocks(DesignPanel_p, columns_p,false);\r\n // showmessage('calling stretch');\r\n StretchAllMemos(DesignPanel_p);\r\n\r\n if form_p.FindComponent('btnSaveAsDefaults') <> nil\r\n then (form_p.FindComponent('btnSaveAsDefaults') as TBitBtn).Visible := (frmmain.btnSwitch_Design.State = SSON);\r\n end;\r\n end\r\nelse begin\r\n // showmessage(inttostr(columns_p));\r\n applyformdesign(DesignPanel_p, 1, ((frmmain.btnSwitch_Design.state = ssOn) and EGV_SHOWHIDDENBLOCKSINDESIGN ), form_p.name);\r\n ResizeFormBlocks(DesignPanel_p, columns_p, false);\r\n end;\r\n\r\nend;\r\n\r\nfunction GetBlockUniqueID(block_p: TPanel; activate_p: boolean=true): string;\r\nbegin\r\nif frmmain.clQuickPicklist.visible then exit;\r\nResult := uppercase(FindParentForm(block_p).name + '_' + block_p.Name);\r\nif activate_p\r\nthen EGV_BLOCKUNIQUEID := result;\r\n//frmmain.WebMemo1.text := 'form: ' + FindParentForm(block_p).name + ' block id: ' + egv_blockuniqueid;\r\nend;\r\n\r\nprocedure BlockShowDBFieldSettings;\r\nvar i: integer; P: TPoint; c: TControl; memo_p: TMemo; s: string;\r\nform_p: TfrmDBFieldSettings; BlockID_p: string;\r\n\r\nprocedure Aftercreate(aForm: TObject);\r\nbegin\r\n//showmessage( EGV_CURRENTBLOCK.Name);\r\ns := dm.EGV_LOCALSTORAGE.values['DBF_' + EGV_BLOCKUNIQUEID];\r\n//showmessage('call settings ' + EGV_BLOCKUNIQUEID);\r\n\r\nwith ( aForm as TfrmDBFieldSettings )\r\ndo begin\r\n if (BlockgetMemo(EGV_CURRENTBLOCK) = nil)\r\n then begin\r\n edDBField_Table.enabled := false;\r\n edDBField_Column.enabled := false;\r\n edDBField_Key1.enabled := false;\r\n edDBField_Key2.enabled := false;\r\n edDBField_Key3.enabled := false;\r\n cbDBField_Key1Source.enabled := false;\r\n cbDBField_Key2Source.enabled := false;\r\n cbDBField_Key3Source.enabled := false;\r\n\r\n webpagecontrol1.Enabled := false;\r\n clrDBField_Color.Enabled := false;\r\n chDBF_DoUpdate.Enabled := false;\r\n chDBF_DoInsert.Enabled := false;\r\n end;\r\n\r\n webpagecontrol1.ActivePageIndex := 0;\r\n\r\n pnlDBFieldSetupCaption.caption := BlockGetTitle(EGV_CURRENTBLOCK);\r\n eddbfield_table.text := '';\r\n eddbfield_column.text := '';\r\n eddbfield_key1.text := '';\r\n eddbfield_key2.text := '';\r\n eddbfield_key3.text := '';\r\n cbdbfield_key1source.itemindex := -1;\r\n cbdbfield_key2source.itemindex := -1;\r\n cbdbfield_key3source.itemindex := -1;\r\n memDBField_customselect.text := '';\r\n clrdbfield_color.color := clWhite;\r\n memDBField_Update.text := '';\r\n memDBField_Insert.text := '';\r\n memDBField_HTMLTemplate.text := '';\r\n memDBField_CopyToBlocks.text := '';\r\n memDBField_SentenceTMP.text := '';\r\n chDBF_DoUpdate.checked := false;\r\n chDBF_DoInsert.checked := false;\r\n chDBF_IncludeInDefault.checked := false;\r\n chDBF_HideWhenEmpty.checked := false;\r\n chDBF_ApplyColor.checked := false;\r\n eddbfield_editmask.text := '';\r\n edCERNER_Search.text := '';\r\n //showmessage(s);\r\n DBF_FillSettings(s, (aForm as TForm));\r\n end;\r\nend;\r\n\r\n\r\nbegin\r\nBlock_MouseLeave(EGV_CURRENTBLOCK);\r\n\r\n{for i := 0 to EGV_CURRENTBLOCK.ControlCount - 1\r\ndo begin\r\n if EGV_CURRENTBLOCK.Controls[i] is TWebMemo\r\n then begin\r\n memo_p := (EGV_CURRENTBLOCK.Controls[i] as TWebMemo);\r\n break;\r\n end;\r\n end;\r\nif not assigned(memo_p) then exit; }\r\n\r\nform_p := TfrmDBFieldSettings.CreateNew(@AfterCreate);\r\nform_p.Popup := true;\r\nform_p.PopupOpacity := 0.1;\r\nform_p.Border := fbsingle;\r\n//showmessage('showmodal ' + EGV_BLOCKUNIQUEID);\r\nform_p.ShowModal;\r\nend;\r\n\r\nprocedure BlockShowQPickList(Sender: TObject);\r\nvar currentblockname_p, section_p: string; P: TPoint; Shift_p: integer;\r\nbegin\r\nif frmmain.clQuickPicklist.visible and ((sender as TControl).name = frmmain.clQuickPicklist.Hint) then exit;\r\n\r\nEGV_QPKLFILTER := '';\r\nEGV_CURRENTBLOCK := ((sender as TControl).Parent as TPanel);\r\n\r\nGetBlockUniqueID(EGV_CURRENTBLOCK);\r\nEGV_PKLTARGETMEMO := (Sender as TMemo);\r\n\r\nEGV_PKLTARGETMEMONAME := (Sender as TMemo).Name;\r\nEGV_PKLTARGETMEMOBLOCK := EGV_CURRENTBLOCK;\r\n//showmessage(EGV_CURRENTBLOCK.name);\r\ncurrentblockname_p := EGV_CURRENTBLOCK.name;\r\n\r\nsection_p := dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SECTION'];\r\nEGV_SECTIONNAME := section_p;\r\n\r\nif dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_CHECKED'] = '' then dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_CHECKED'] := '1';\r\nif dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_USER'] = '' then dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_USER'] := '0';\r\nif dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SINGLE'] = '' then dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SINGLE'] := '0';\r\nif dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_CLEAR'] = '' then dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_CLEAR'] := '0';\r\nif dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_COMPACT'] = '' then dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_COMPACT'] := '1';\r\nif dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SOURCE'] = '' then dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SOURCE'] := '0';\r\n\r\nwith frmmain\r\ndo begin\r\nif false and clQuickPicklist.visible and ((sender as TControl).name <> clQuickPicklist.Hint)\r\nthen btnCloseQuickPickListClick(nil)\r\nelse begin\r\n seQPKLValue.value := 0;\r\n edQPKLFilter.text := '';\r\n\r\n clQuickPicklist.parent := frmmain;\r\n btnQuickPicklistMoreItems.parent := clQuickPicklist;\r\n\r\n clQuickPicklist.height := EGV_CURRENTBLOCK.height; //showmessage(egv_currentform_div.name);\r\n clQuickPicklist.visible := false;\r\n\r\n P.x := EGV_CURRENTBLOCK.left;\r\n\r\n P.y := EGV_CURRENTBLOCK.top - 3;\r\n\r\n P := (EGV_CURRENTBLOCK.parent as TControl).clienttoscreen(P);\r\n clQuickPicklist.left := P.x + 25;\r\n clQuickPicklist.top := P.y + EGV_CURRENTBLOCK.height + 1;\r\n clQuickPicklist.top := clQuickPicklist.top - (EGV_CURRENTBLOCK.parent as TScrollBox).ScrollTop;\r\n\r\n clQuickPicklist.width := (Sender as TMemo).width - 25;\r\n clQuickPicklist.hint := (Sender as TMemo).name;\r\n\r\n //showmessage('1');\r\n if dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SOURCE'] = ''\r\n then dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SOURCE'] := '0';\r\n\r\n dm.xdsQPKL_DynamicData.Close;\r\n QPKL_LoadFromDataset(dm.xdsQPKL_DynamicData, 'Original.ITEM');\r\n\r\n if clQuickPicklist.Visible then clQuickPicklist.setfocus;\r\n\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure QPKLSaveAndClose(Sender: TObject);\r\nvar i:integer; memo_p: TMemo; dbmemo_p: TDBMemo; s: string;\r\nformname_p, parentblockname_p: string;\r\nform_p: TForm;\r\nbegin\r\ntry //showmessage('1');\r\n//form_p := EGV_SUBFORM;\r\ns := '';\r\nif (EGV_PKLTARGETMEMO = nil) then exit;\r\n\r\nwith frmmain\r\ndo begin\r\n//showmessage(inttostr(clQuickPicklist.Items.Count));\r\nfor i:=0 to clQuickPicklist.Items.Count - 1\r\n do if clQuickPicklist.Items[i].checked or ( dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_CHECKED'] = '0')\r\n then begin\r\n if (s = '')\r\n then s := clQuickPicklist.Items[i].text\r\n else begin\r\n // showmessage(EGV_BLOCKUNIQUEID);\r\n // showmessage(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_COMPACT']);\r\n if (dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_COMPACT'] = '1')\r\n then s := s + ', ' + clQuickPicklist.Items[i].text\r\n else s := s + char(13) + clQuickPicklist.Items[i].text;\r\n end;\r\n\r\n if ( dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_C_WORD'] <> '') and\r\n clQuickPicklist.Items[i].checked\r\n then s := s + ' -' + dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_C_WORD'];\r\n if ( dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_U_WORD'] <> '') and\r\n ( not clQuickPicklist.Items[i].checked )\r\n then s := s + ' -' + dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_U_WORD'];\r\n end;\r\n if (s <> '')\r\n then begin\r\n if (dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_USER'] = '1') and\r\n (dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATETIME'] = '0')\r\n then s := s + '[' + egv_userfullname + ']';\r\n\r\n if (dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_USER'] = '0') and\r\n (dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATETIME'] = '1')\r\n then s := s + '[' + timetostr(time) + ']';\r\n\r\n if (dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_USER'] = '1') and\r\n (dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATETIME'] = '1')\r\n then s := s + '[' + egv_userfullname + ', ' + timetostr(time) + ']';\r\n end;\r\n\r\n if ( dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_CLEAR'] = '1') and (s <> '')\r\n then begin\r\n EGV_PKLTARGETMEMO.Text := '';\r\n EGV_PKLTARGETMEMO.tag := 1; // modified\r\n end;\r\n if frmmain.seQPKLValue.Value <> 0 then s := inttostr(seQPKLValue.Value) + ' ' + s;\r\n if s <> ''\r\n then begin\r\n if EGV_PKLTARGETMEMO.text = '' then EGV_PKLTARGETMEMO.text := s\r\n else EGV_PKLTARGETMEMO.text := EGV_PKLTARGETMEMO.Text + ', ' + s;\r\n EGV_PKLTARGETMEMO.tag := 1; // modified\r\n BlockApplyDependencies((EGV_PKLTARGETMEMO.Parent as TPanel), EGV_PKLTARGETMEMO.text);\r\n StretchMemo(EGV_PKLTARGETMEMO as TMemo);\r\n end;\r\n\r\n clQuickPickList.visible := false;\r\n // if using for filter fields - refresh list(apply filter)\r\n if (uppercase(((EGV_PKLTARGETMEMO.Parent).Parent as TControl).name) = 'SBSEARCH') and\r\n (getcurrentform.FindComponent('tmGridRefreshClick') <> nil)\r\n then (getcurrentform.FindComponent('tmGridRefreshClick') as TTimer).Enabled := true;\r\n\r\n end;\r\nfinally\r\n EGV_PKLTARGETMEMO := nil;\r\n EGV_PKLTARGETMEMONAME := '';\r\n EGV_PKLTARGETMEMOBLOCK := nil;\r\n\r\nend;\r\nend;\r\n\r\nprocedure QPKLShowSettings(Sender: TObject);\r\nvar memohint_p: string;\r\nformname_p, parentblockname_p: string; s: string;\r\nform_p: TForm; c: Tcontrol; P: TPoint;\r\nQPKLSettingsForm_p: TfrmQPKLSettings;\r\n\r\nprocedure Aftercreate(aForm: TObject);\r\nbegin\r\nform_p := EGV_SUBFORM;\r\ngetblockuniqueID(EGV_CURRENTBLOCK);\r\nwith ( aForm as TfrmQPKLSettings )\r\ndo begin\r\npnlPKLSetupCaption.caption := BlockGetTitle(EGV_CURRENTBLOCK);\r\n\r\nchQPKL_CheckedOnly.Checked := (dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_CHECKED'] = '1');\r\nchQPKL_UserInitials.Checked := (dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_USER'] = '1');\r\nchQPKL_Timestamp.Checked := (dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATETIME'] = '1');\r\nchQPKL_SingleSelect.Checked := (dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SINGLE'] = '1');\r\nchQPKL_ClearPrevData.Checked := (dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_CLEAR'] = '1');\r\nchQPKL_CompactResult.Checked := (dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_COMPACT'] = '1');\r\n\r\nedQPKL_CheckedWord.text := dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_C_WORD'];\r\nedQPKL_UncheckedWord.text := dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_U_WORD'];\r\n\r\nif dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SOURCE'] = ''\r\nthen cbQPKL_DataSource.itemindex := 0\r\nelse cbQPKL_DataSource.itemindex := strtoint(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SOURCE']);\r\n\r\nedtQPKL_Section.text := dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SECTION'];\r\nmemQPKL_Select.text := dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SELECT'];\r\n\r\nedtPicklistCustomForm.text := dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_CUSTOMFORM'];\r\n\r\n\r\nif dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_PKLTYPE'] = 'Pick List' then cbPickListType.ItemIndex := 0;\r\nif dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_PKLTYPE'] = 'Multi Level' then cbPickListType.ItemIndex := 1;\r\nif dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_PKLTYPE'] = 'Form' then cbPickListType.ItemIndex := 2;\r\nif dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_PKLTYPE'] = 'List>Memo' then cbPickListType.ItemIndex := 3;\r\nif dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_PKLTYPE'] = 'List>grid' then cbPickListType.ItemIndex := 4;\r\nif dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_PKLTYPE'] = 'Custom' then cbPickListType.ItemIndex := 5;\r\nif dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_PKLTYPE'] = 'None' then cbPickListType.ItemIndex := 6;\r\n//cbPickListType.text := dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_PKLTYPE'];\r\n\r\nif dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE'] = '0' then cbBlockDataType.ItemIndex := 0;\r\nif dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE'] = '1' then cbBlockDataType.ItemIndex := 1;\r\nif dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE'] = '2' then cbBlockDataType.ItemIndex := 2;\r\nif dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE'] = '3' then cbBlockDataType.ItemIndex := 3;\r\nif dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE'] = '4' then cbBlockDataType.ItemIndex := 4;\r\n//cbBlockDataType.text := dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE'];\r\n\r\nif dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_RGCOLUMNS'] = ''\r\nthen seColumns.value := 0\r\nelse seColumns.value := strtoint(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_RGCOLUMNS']);\r\n\r\nend;\r\nend;\r\n\r\nbegin\r\nBlock_MouseLeave(EGV_CURRENTBLOCK);\r\nQPKLSettingsForm_p := TfrmQPKLSettings.CreateNew(@AfterCreate);\r\nQPKLSettingsForm_p.Popup := true;\r\nQPKLSettingsForm_p.Border := fbSingle;\r\nQPKLSettingsForm_p.PopupOpacity := 0.1;\r\nQPKLSettingsForm_p.ShowModal;\r\nend;\r\n\r\nprocedure QPKL_LoadFromDataset(Dataset_p: TXDataWebDataset;\r\n FieldName_p: string;\r\n ListBox_p: TTMSFNCCheckedlistBox;\r\n SourceType_p: string='';\r\n Cache_p: Boolean=true);\r\n\r\nvar i: integer; formname_p: string; parentblockname_p: string; s: string; source_p: string; DBType_p: integer=0;\r\n\r\nprocedure OnResult(Response: TXDataClientResponse);\r\nbegin\r\nDataSet_p.Close;\r\ntry\r\nDataSet_p.SetJsonData(Response_to_JSArray(Response));\r\nexcept\r\nshowmessage('Error loading List. Check DB Select statement');\r\nend;\r\nDataSet_p.Open;\r\nend;\r\n\r\nbegin\r\n\r\n//cache_p := false;\r\n//showmessage('load from dataset starts');\r\nEGV_USEQPKL_CACHE := Cache_p;\r\nif not cache_p\r\nthen dm.EGV_SESSIONSTORAGE.values[EGV_BLOCKUNIQUEID + '_QPKLCACHE'] := '';\r\n\r\n// showmessage(EGV_BLOCKUNIQUEID);\r\n\r\nif ListBox_p <> nil then EGV_QPKLCONTAINER := ListBox_p;\r\nif SourceType_p <> '' then EGV_QPKLSOURCETYPE := SourceType_p;\r\nif (dm.EGV_SESSIONSTORAGE.values[EGV_BLOCKUNIQUEID + '_QPKLCACHE'] <> '') or Dataset_p.Active\r\nthen begin\r\n // if frmmain.rgBlockRadioGroup.Visible then showmessage('visible4');\r\n//showmessage('1');\r\n frmmain.rgBlockRadioGroup.BeginUpdate;\r\n frmmain.rgBlockRadioGroup.Items.Clear; // Fill the radiogroup in case we need to show it for the block\r\n frmmain.rgBlockRadioGroup.endupdate;\r\n frmmain.clQuickPicklist.BeginUpdate;\r\n frmmain.clQuickPicklist.items.clear;\r\n frmmain.clQuickPicklist.EndUpdate;\r\n // showmessage('2');\r\n\r\n if (dm.EGV_SESSIONSTORAGE.values[EGV_BLOCKUNIQUEID + '_QPKLCACHE'] <> '') //Load from cache\r\n then begin\r\n // showmessage('3');\r\n frmmain.edtQPKLCacheIndicator.Visible := true;\r\n frmmain.tmCloseCacheIndicator.Enabled := true;\r\n frmmain.clQuickPicklist.BeginUpdate;\r\n for i := 0 to length(splitstring(dm.EGV_SESSIONSTORAGE.values[EGV_BLOCKUNIQUEID + '_QPKLCACHE'], '^')) - 1\r\n do begin\r\n if frmmain.rgBlockRadioGroup.visible\r\n then frmmain.rgBlockRadioGroup.items.Add(splitstring(dm.EGV_SESSIONSTORAGE.values[EGV_BLOCKUNIQUEID + '_QPKLCACHE'], '^')[i]);\r\n\r\n if (EGV_QPKLFILTER = '') or ( pos(uppercase(EGV_QPKLFILTER), uppercase(splitstring(dm.EGV_SESSIONSTORAGE.values[EGV_BLOCKUNIQUEID + '_QPKLCACHE'], '^')[i])) > 0)\r\n then frmmain.clQuickPicklist.additem(splitstring(dm.EGV_SESSIONSTORAGE.values[EGV_BLOCKUNIQUEID + '_QPKLCACHE'], '^')[i]);\r\n end;\r\n frmmain.clQuickPicklist.EndUpdate;\r\n // showmessage('4');\r\n end\r\n else begin // showmessage('5');\r\n //Load from dataset\r\n Dataset_p.first;\r\n frmmain.clQuickPicklist.BeginUpdate;\r\n while not dataset_p.eof\r\n do begin // showmessage(inttostr(frmmain.rgBlockRadioGroup.tag));\r\n if frmmain.rgBlockRadioGroup.visible\r\n then frmmain.rgBlockRadioGroup.items.Add(Dataset_p.fieldbyname(FieldName_p).asstring);\r\n\r\n if (EGV_QPKLFILTER = '') or ( pos(uppercase(EGV_QPKLFILTER), uppercase(Dataset_p.FieldByName(Fieldname_p).asstring)) > 0)\r\n then frmmain.clQuickPicklist.additem(Dataset_p.fieldbyname(FieldName_p).asstring);\r\n Dataset_p.next;\r\n end;\r\n frmmain.clQuickPicklist.endupdate;\r\n Dataset_p.first;\r\n // showmessage('7');\r\n end;\r\n\r\n if (dm.EGV_SESSIONSTORAGE.values[EGV_BLOCKUNIQUEID + '_QPKLCACHE'] = '')\r\n then begin\r\n for i := 0 to frmmain.clQuickPicklist.Items.Count - 1\r\n do if dm.EGV_SESSIONSTORAGE.values[EGV_BLOCKUNIQUEID + '_QPKLCACHE'] = ''\r\n then dm.EGV_SESSIONSTORAGE.values[EGV_BLOCKUNIQUEID + '_QPKLCACHE'] := frmmain.clQuickPicklist.Items.Items[i].Text\r\n else dm.EGV_SESSIONSTORAGE.values[EGV_BLOCKUNIQUEID + '_QPKLCACHE'] := dm.EGV_SESSIONSTORAGE.values[EGV_BLOCKUNIQUEID + '_QPKLCACHE'] +\r\n '^' + frmmain.clQuickPicklist.Items.Items[i].Text;\r\n //showmessage('Cached: ' + dm.EGV_SESSIONSTORAGE.values[EGV_BLOCKUNIQUEID + '_QPKLCACHE']);\r\n end;\r\n\r\n\r\n if frmmain.rgBlockRadioGroup.visible and\r\n (frmmain.rgBlockRadioGroup.Items.Count > 0) and\r\n (dm.EGV_SESSIONSTORAGE.values[EGV_BLOCKUNIQUEID + '_QPKLCACHE'] <> '') and\r\n (frmmain.rgBlockRadioGroup.Items.IndexOf(BlockGetMemo(EGV_CURRENTBLOCK).text) < frmmain.rgBlockRadioGroup.Items.Count)\r\n then frmmain.rgBlockRadioGroup.ItemIndex := frmmain.rgBlockRadioGroup.Items.IndexOf(BlockGetMemo(EGV_CURRENTBLOCK).text);\r\n\r\n // showmessage('8');\r\n if frmmain.rgBlockRadioGroup.Visible then begin {showmessage('visible2');} exit; end; // show radiobuttons not Q_piclist\r\n\r\n if EGV_QPKLCONTAINER = nil\r\n then FitQPickList(Dataset_p)\r\n else begin\r\n EGV_QPKLCONTAINER.BeginUpdate;\r\n EGV_QPKLCONTAINER.items.clear;\r\n for i := 0 to frmmain.clQuickPicklist.items.count - 1\r\n do EGV_QPKLCONTAINER.additem(frmmain.clQuickPicklist.items[i].text);\r\n EGV_QPKLCONTAINER.EndUpdate;\r\n\r\n // EGV_QPKLCONTAINER.items := frmmain.clQuickPicklist.items;\r\n EGV_QPKLCONTAINER := nil;\r\n EGV_QPKLSOURCETYPE := '';\r\n DataSet_p.close;\r\n end;\r\n // showmessage('9');\r\n end\r\nelse begin\r\n if ( (EGV_QPKLSOURCETYPE = '0') or (dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SOURCE'] = '0') ) and (EGV_SECTIONNAME <> '')\r\n then begin\r\n if egv_showcommonpicklist\r\n then s := ' use 1; select ident_value as ITEM from ini_ident where ' +\r\n ' section_name = ' + quotedstr(EGV_SECTIONNAME) + ' and ' +\r\n ' ( facilityid = ' + EGV_FACILITYID + ' or facilityid = 1 ) ' + ' and ' +\r\n ' visible <> 0 order by facilityid DESC, ident_name'\r\n else s := ' use 1; select ident_value as ITEM from ini_ident where ' +\r\n ' section_name = ' + quotedstr(EGV_SECTIONNAME) + ' and ' +\r\n ' facilityid = ' + EGV_FACILITYID + ' and ' +\r\n ' visible <> 0 order by facilityid DESC, ident_name';\r\n end\r\n else if dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SOURCE'] = '1'\r\n then begin\r\n s := ' use 1; select FULLNAME as ITEM from USERS where ' +\r\n ' facilityid = ' + EGV_FACILITYID + ' and ' +\r\n ' is_active = 1 and usertype = ' + quotedstr('P') +\r\n ' order by fullname';\r\n end\r\n else if dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SOURCE'] = '2'\r\n then begin\r\n s := ' use 1; select FULLNAME as item from USERS where ' +\r\n ' facilityid = ' + EGV_FACILITYID + ' and ' +\r\n ' is_active = 1 and usertype = ' + quotedstr('N') +\r\n ' order by fullname';\r\n end\r\n else if dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SOURCE'] = '3'\r\n then begin\r\n s := ' use 1; select FULLNAME as item from USERS where ' +\r\n ' facilityid = ' + EGV_FACILITYID + ' and ' +\r\n ' is_active = 1 and usertype = ' + quotedstr('T') +\r\n ' order by fullname';\r\n end\r\n else if dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SOURCE'] = '4'\r\n then begin\r\n s := uppercase(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SELECT']);\r\n end;\r\n\r\n s := uppercase(s);\r\n // selected column must have an alias ITEM. Add it to the query if missing\r\n if pos('ITEM', s) = 0\r\n then s := stringreplace(s,'FROM',' AS ITEM FROM ', [rfIgnoreCase]);\r\n\r\n s := InsertKeyValues(s);\r\n DBType_p := DBType(s);\r\n if s <> ''\r\n then begin\r\n if DBType_p = 1\r\n then dm.XDataWebClient1.RawInvoke('IReportService.OpenQuery',[s , egv_facilityid, inttostr(DBType_p)], @OnResult)\r\n else if dm.XDataWebConnection2.Connected then dm.XDataWebClient2.RawInvoke('IReportService.OpenQuery',[s , egv_facilityid, inttostr(DBType_p)], @OnResult);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction Response_to_JSArray(Response: TXDataClientResponse): TJSArray;\r\nvar s: string;\r\n JFDBS: TJSObject;\r\n JManager: TJSObject;\r\n JTableList: TJSObject;\r\n JRowList: TJSArray;\r\nbegin\r\nJFDBS := TJSObject(TJSObject(TJSJson.Parse(string(Response.Result)))['FDBS']);\r\nJManager := TJSObject(JFDBS['Manager']);\r\nJTableList := TJSObject(TJSArray(JManager['TableList'])[0]);\r\nJRowList := TJSArray(JTableList['RowList']);\r\nResult := JRowList;\r\nend;\r\n\r\nprocedure FitQPickList(Dataset_p: TDataset);\r\nbegin\r\n\r\nwith frmmain\r\ndo begin\r\n//calculate the quickpicklist height min\r\nclQuickPicklist.height := min(300, 27 + clQuickPicklist.Items.Count*25);\r\nbtnQuickPickListMoreItems.visible := (((27+clQuickPicklist.Items.Count*25) - clQuickPicklist.height) > 12);\r\n\r\n// check if there is enough room to show it down the memo. if not move it up the memo\r\nclQuickPicklist.tag := 0; // down.\r\nif height - clQuickPicklist.top < clQuickPicklist.height\r\nthen begin\r\n clQuickPicklist.tag := 1; // up;\r\n clQuickPicklist.top := clQuickPicklist.top - (EGV_PKLTARGETMEMO.parent as Tpanel).height - clQuickPicklist.height + 4;\r\n\r\n if clQuickPicklist.top < 0\r\n then begin\r\n clQuickPicklist.height := clQuickPicklist.height + clQuickPicklist.top;\r\n clQuickPicklist.top := 0;\r\n end;\r\n end;\r\n\r\npnlQPKLHeader.parent := clQuickPicklist;\r\npnlQPKLHeader.top := 0;\r\npnlQPKLHeader.left := 0;\r\nseQPKLValue.Color := pnlQPKLHeader.Color;\r\nedQPKLFilter.Color := pnlQPKLHeader.Color;\r\npnlQPKLHeader.width := clQuickPicklist.width;\r\n\r\n//btnQuickPicklistSettings.visible := ( btnSwitch_Design.State = ssOn );\r\nedQPKLFilter.top := 3;\r\nbtnQuickPickListMoreItems.top := clQuickPicklist.height - btnQuickPickListMoreItems.height; //clQuickPicklist.top + clQuickPicklist.height - btnQuickPickListMoreItems.height;\r\nbtnQuickPickListMoreItems.left := clQuickPicklist.width - btnCloseQuickPicklist.width;; //clQuickPicklist.left - clQuickPicklist.width;\r\nbtnCloseQuickPicklist.visible := true;\r\n//showmessage('clQuickPicklist.visible := true');\r\nclQuickPicklist.visible := true;\r\nend;\r\nend;\r\n\r\nprocedure BlockClearData(Sender: TObject);\r\nvar i: integer; control_p: TObject;\r\nbegin\r\nfor i:=0 to EGV_CURRENTBLOCK.ControlCount - 1\r\ndo begin\r\n control_p := (EGV_CURRENTBLOCK.Controls[i] as TControl);\r\n if (control_p is TMemo) and (not (control_p as TMemo).readonly)\r\n then begin\r\n (control_p as TMemo).text := '';\r\n stretchmemo( (control_p as TMemo) );\r\n if assigned((control_p as TMemo).OnChange) then (control_p as TMemo).OnChange(control_p);\r\n end;\r\n if control_p is TDBGrid\r\n then begin\r\n (control_p as TDBGrid).datasource.dataset.disablecontrols;\r\n while not (control_p as TDBGrid).datasource.dataset.eof do (control_p as TDBGrid).datasource.dataset.delete;\r\n (control_p as TDBGrid).datasource.dataset.enablecontrols;\r\n // BlockStretchGrid((control_p as TWEbDBGrid));\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure BlockStretchGrid(aGrid: TDBGrid);\r\nbegin\r\n{if (aGrid.Parent is TWebPanel)\r\nthen if assigned(aGrid.DataSource.DataSet)\r\n then (aGrid.Parent as TWEbPanel).Height := 150 + aGrid.DefaultRowHeight * aGrid.DataSource.DataSet.RecordCount\r\n else (aGrid.Parent as TWEbPanel).Height := 200;\r\nOrganizeBlocks(getcurrentformdiv); }\r\nend;\r\n\r\nprocedure DataSetApplyUpdate(Dataset: TDataset; mode: string='U'; AuthDB: integer=0);\r\nvar i: integer; SQL_p, Set_p, Where_p, columns_p, values_p, columnname_p: string;\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p: string;\r\n begin\r\n //\r\n end;\r\n\r\nbegin\r\n{\r\n field tag update : 0 - to UPDATE, 1 - to include in WHERE, -1 - skip\r\n insert : 0,1 - to insert\r\n}\r\nSQL_p := '';\r\nif mode = 'U'\r\nthen begin // showmessage('update ' + dataset.Name);\r\n // Dataset.Post;\r\n Set_p := ''; Where_p := '';\r\n for i := 0 to Dataset.FieldCount - 1\r\n do begin\r\n if Dataset.Fields[i].Origin <> ''\r\n then columnname_p := Dataset.Fields[i].Origin\r\n else columnname_p := Stringreplace(Dataset.Fields[i].FieldName, 'Original.','',[rfIgnoreCase]);\r\n if Dataset.Fields[i].tag = 1\r\n then if Where_p = ''\r\n then Where_p := ' where ' + columnname_p + ' = ' + quotedstr(Dataset.FieldByname(Dataset.Fields[i].FieldName).AsString)\r\n else Where_p := Where_p + ' and ' + columnname_p + ' = ' + quotedstr(Dataset.FieldByname(Dataset.Fields[i].FieldName).AsString);\r\n if (Dataset.Fields[i].tag = 0) and (Dataset.Fields[i].OldValue <> Dataset.Fields[i].NewValue)\r\n then if Set_p = ''\r\n then Set_p := ' set ' + columnname_p + ' = ' + quotedstr(Dataset.FieldByname(Dataset.Fields[i].FieldName).AsString)\r\n else Set_p := Set_p + ' , ' + columnname_p + ' = ' + quotedstr(Dataset.FieldByname(Dataset.Fields[i].FieldName).AsString);\r\n end;\r\n if (Where_p <> '') and (set_p <> '')\r\n then SQL_p := ' update ' + (Dataset as TXDataWebDataSet).EntitySetName + Set_p + Where_p;\r\n // showmessage(where_P);\r\n // showmessage(sql_p);\r\n end;\r\nif mode = 'I'\r\nthen begin\r\n //showmessage('insert');\r\n // Dataset.Post;\r\n columns_p := ''; values_p := '';\r\n for i := 0 to Dataset.FieldCount - 1\r\n do begin\r\n if (Dataset.Fields[i].tag >= 0)\r\n then begin\r\n if Dataset.Fields[i].Origin <> ''\r\n then columnname_p := Dataset.Fields[i].Origin\r\n else columnname_p := Stringreplace(Dataset.Fields[i].FieldName, 'Original.','',[rfIgnoreCase]);\r\n if columns_p = ''\r\n then columns_p := ' ( ' + columnname_p\r\n else columns_p := columns_p + ' , ' + columnname_p ;\r\n {if Dataset.FieldByname(Dataset.Fields[i].FieldName).AsString <> ''\r\n then}if values_p = ''\r\n then values_p := ' values ( ' + quotedstr(Dataset.FieldByname(Dataset.Fields[i].FieldName).AsString)\r\n else values_p := values_p + ' , ' + quotedstr(Dataset.FieldByname(Dataset.Fields[i].FieldName).AsString);\r\n end;\r\n end;\r\n if columns_p <> ''\r\n then begin\r\n columns_p := columns_p + ' ) ';\r\n values_p := values_p + ' ) ';\r\n end;\r\n if (columns_p <> '')\r\n then SQL_p := ' insert into ' + (Dataset as TXDataWebDataSet).EntitySetName + columns_p + values_p;\r\n end;\r\nif mode = 'D'\r\nthen begin //showmessage('Delete ' + dataset.Name);\r\n // Dataset.Post;\r\n Set_p := ''; Where_p := '';\r\n for i := 0 to Dataset.FieldCount - 1\r\n do begin\r\n if Dataset.Fields[i].Origin <> ''\r\n then columnname_p := Dataset.Fields[i].Origin\r\n else columnname_p := Stringreplace(Dataset.Fields[i].FieldName, 'Original.','',[rfIgnoreCase]);\r\n if Dataset.Fields[i].tag = 1\r\n then if Where_p = ''\r\n then Where_p := ' where ' + columnname_p + ' = ' + quotedstr(Dataset.FieldByname(Dataset.Fields[i].FieldName).AsString)\r\n else Where_p := Where_p + ' and ' + columnname_p + ' = ' + quotedstr(Dataset.FieldByname(Dataset.Fields[i].FieldName).AsString);\r\n end;\r\n if (Where_p <> '')\r\n then SQL_p := ' delete from ' + (Dataset as TXDataWebDataSet).EntitySetName + Where_p;\r\n end;\r\n\r\n// Apply (Commit)\r\n//if SQL_P <> '' then showmessage(SQL_p);\r\nif SQL_p <> ''\r\nthen begin\r\n if AuthDB = 1\r\n then dm.XDataWebClient1.RawInvoke('IReportService.ExecQuery', [SQL_p, egv_facilityid, inttostr(AuthDB)], nil)\r\n else if dm.XDataWebConnection2.Connected then dm.XDataWebClient2.RawInvoke('IReportService.ExecQuery', [SQL_p, egv_facilityid, inttostr(AuthDB)], nil);\r\n end;\r\nend;\r\n\r\nprocedure CollectFormDefaults(Formname_p: string);\r\nvar i, j: integer; c, c2: Tcontrol; formdiv_p: TScrollBox;\r\nbegin\r\nEGV_FORMDEFAULTS := '';\r\n//showmessage(inttostr(dm.EGV_CURRENTFORM_DIV.controlcount));\r\n\r\n//showmessage(EGV_PKLTARGETMEMONAME);\r\n\r\n\r\nformdiv_p := getcurrentformdiv; //EGV_CURRENTFORM_DIV;\r\n\r\nfor i:=0 to formdiv_p.ControlCount - 1\r\ndo begin\r\n c := formdiv_p.controls[i];\r\n if (c is TPanel) and c.Visible\r\n then begin\r\n for j := 0 to (c as TPanel).controlcount - 1\r\n do begin\r\n c2 := (c as TPanel).controls[j];\r\n if not c2.Visible then continue;\r\n //showmessage(c2.Name);\r\n if (c2 is Tmemo)\r\n then EGV_FORMDEFAULTS := EGV_FORMDEFAULTS + '#' + c2.Name + '~' +\r\n (c2 as Tmemo).text;\r\n { if (c2 is twebdbmemo) and assigned((c2 as twebdbmemo).datasource)\r\n then EGV_FORMDEFAULTS := EGV_FORMDEFAULTS + '#' + c2.Name + '~' +\r\n (c2 as twebdbmemo).datasource.DataSet.FieldByName((c2 as twebdbmemo).DataField).AsString;\r\n if c2 is TWebDBComboBox and assigned((c2 as TWebDBComboBox).datasource)\r\n then EGV_FORMDEFAULTS := EGV_FORMDEFAULTS + '#' + c2.Name + '~' +\r\n (c2 as TWebDBComboBox).datasource.DataSet.FieldByName((c2 as TWebDBComboBox).DataField).AsString;\r\n if c2 is TWebDBLookUpComboBox and assigned((c2 as TWebDBLookUpComboBox).datasource)\r\n then EGV_FORMDEFAULTS := EGV_FORMDEFAULTS + '#' + c2.Name + '~' +\r\n (c2 as TWebDBLookUpComboBox).datasource.DataSet.FieldByName((c2 as TWebDBLookUpComboBox).DataField).AsString;\r\n if c2 is TWebDBCheckBox and assigned((c2 as TWebDBCheckBox).datasource)\r\n then EGV_FORMDEFAULTS := EGV_FORMDEFAULTS + '#' + c2.Name + '~' +\r\n (c2 as TWebDBCheckBox).datasource.DataSet.FieldByName((c2 as TWebDBCheckBox).DataField).AsString;\r\n if c2 is TWebDBEdit and assigned((c2 as TWebDBEdit).datasource)\r\n then EGV_FORMDEFAULTS := EGV_FORMDEFAULTS + '#' + c2.Name + '~' +\r\n (c2 as TWebDBEdit).datasource.DataSet.FieldByName((c2 as TWebDBEdit).DataField).AsString;\r\n if c2 is TWebDBRadioGroup and assigned((c2 as TWebDBRadioGroup).datasource)\r\n then EGV_FORMDEFAULTS := EGV_FORMDEFAULTS + '#' + c2.Name + '~' +\r\n (c2 as TWebDBRadioGroup).datasource.DataSet.FieldByName((c2 as TWebDBRadioGroup).DataField).AsString; }\r\n end;\r\n // showmessage(c2.ClassName);\r\n end;\r\n\r\n end;\r\n//showmessage(EGV_FORMDEFAULTS);\r\n// save in DB\r\nGetPostFormDefaultsdata(Formname_p, 1); // post\r\nend;\r\n\r\nprocedure BlockSetPickListType(Sender: TObject);\r\nvar i: integer;\r\nformname_p, parentblockname_p: string; s: string;\r\nbegin\r\n//showmessage(egv_blockuniqueid);\r\n//for i := 0 to ((sender as TwebComboBox).Parent as TWebPanel).ControlCount - 1 do\r\nfor i := 0 to BlockGetTopPanel(EGV_CURRENTBLOCK).ControlCount - 1 do\r\nbegin\r\n//showmessage(inttostr(Header_p.ControlCount));\r\nif ((BlockGetTopPanel(EGV_CURRENTBLOCK).Controls[i]) is TSpeedButton) and\r\n (((BlockGetTopPanel(EGV_CURRENTBLOCK).Controls[i]) as TSpeedButton).MaterialGlyph = 'edit')\r\nthen begin\r\n //showmessage(s);\r\n (BlockGetTopPanel(EGV_CURRENTBLOCK).Controls[i] as TSpeedButton).Tag := (sender as TComboBox).itemindex;\r\n dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_PKLTYPE'] := inttostr((sender as TComboBox).itemindex); // type\r\n Break;\r\n end;\r\nend;\r\nend;\r\n\r\nprocedure BlockCallPickform(Sender: TObject);\r\nvar section_p, title_p: string; c, c2: TControl; i: integer; formname_p, parentblockname_p: string; s: string;\r\nform_p: TForm; containername_p, SQL_p: string;\r\nbegin\r\n//showmessage('block id on pickform call: ' + EGV_BLOCKUNIQUEID );\r\n\r\nform_p := EGV_SUBFORM;\r\nc := nil;\r\nc2 := nil;\r\n\r\nfor i := 0 to EGV_CURRENTBLOCK.ControlCount - 1\r\ndo begin\r\n c := EGV_CURRENTBLOCK.Controls[i];\r\n if (c is TMemo) or (c is TDBGrid) then break;\r\n end;\r\nif not ((c is TMemo) or (c is TDBGrid)) then exit;\r\n\r\nEGV_SECTIONNAME := dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SECTION'];\r\nfor i := 0 to (Sender as TControl).parent.ControlCount - 1\r\ndo begin\r\n c2 := (Sender as TControl).parent.Controls[i];\r\n if (c2 is TLabel)\r\n then begin EGV_CHILD_FORM_CAPTION := (c2 as TLabel).caption; break; end;\r\n end;\r\n\r\nEGV_PARENT_DBGRID := nil;\r\nfor i := 0 to ((Sender as TControl).parent as TControl).parent.ControlCount - 1\r\ndo begin\r\n c2 := ((Sender as TControl).parent as TControl).Parent.Controls[i];\r\n if c2 is TDBGrid\r\n then begin EGV_PARENT_DBGRID := (c2 as TDBGrid); break; end;\r\n end;\r\nEGV_CHILD_FORM_CAPTION := trim(EGV_CHILD_FORM_CAPTION);\r\n\r\n//showmessage('0');\r\nif c is TMemo\r\nthen begin\r\n//showmessage('0-1');\r\n EGV_PARENT_DBGRID := nil;\r\n EGV_PKLTARGETMEMO := (c as TMemo);\r\n EGV_PKLTARGETMEMONAME := (c as TMemo).name;\r\n end\r\nelse begin\r\n//showmessage('0_2');\r\n EGV_PKLTARGETMEMO := nil;\r\n EGV_PKLTARGETMEMONAME := '';\r\n end;\r\n//showmessage('0_3');\r\n\r\n{if (dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SOURCE'] <> '0') and\r\n (dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SOURCE'] <> '')\r\nthen begin\r\n BlockShowQPickList(c);\r\n exit;\r\n end; }\r\n\r\n//Reqular icklist\r\nif (sender as TSpeedButton).tag = 0\r\nthen begin\r\n // Clear cache\r\n dm.EGV_SESSIONSTORAGE.Values[EGV_BLOCKUNIQUEID + '_QPKLCACHE'] := '';\r\n BlockShowPickList();\r\n end;\r\n// showmessage(inttostr((sender as TWebSpeedButton).tag));\r\n//Multi-level picklist form\r\nif (sender as TSpeedButton).tag = 1\r\nthen begin\r\n//showmessage( EGV_PKLTARGETMEMO.Text);\r\n EGV_MULTILEVEL_PKL_GROUPCHECKBOX_CAPTION := '';\r\n //if (sender as TWebSpeedButton).tag = 2 then dm.EGV_MULTILEVEL_PKL_GROUPCHECKBOX_CAPTION := 'All Normal';\r\n containername_p := getformcontainer().name;\r\n if containername_p = 'FormContainer1' then Application.CreateForm(TfrmMultiLevelPickForm, frmmain.formcontainer1.ElementID, egv_subform);\r\n if containername_p = 'FormContainer2' then Application.CreateForm(TfrmMultiLevelPickForm, frmmain.formcontainer2.ElementID, egv_subform2);\r\n if containername_p = 'FormContainer3' then Application.CreateForm(TfrmMultiLevelPickForm, frmmain.formcontainer3.ElementID, egv_subform3);\r\n if containername_p = 'FormContainer4' then Application.CreateForm(TfrmMultiLevelPickForm, frmmain.formcontainer4.ElementID, egv_subform4);\r\n if containername_p = 'FormContainer5' then Application.CreateForm(TfrmMultiLevelPickForm, frmmain.formcontainer5.ElementID, egv_subform5);\r\n if containername_p = 'FormContainer6' then Application.CreateForm(TfrmMultiLevelPickForm, frmmain.formcontainer5.ElementID, egv_subform6);\r\n if containername_p = 'FormContainer7' then Application.CreateForm(TfrmMultiLevelPickForm, frmmain.formcontainer5.ElementID, egv_subform7);\r\n if containername_p = 'FormContainer8' then Application.CreateForm(TfrmMultiLevelPickForm, frmmain.formcontainer5.ElementID, egv_subform8);\r\n if containername_p = 'FormContainer9' then Application.CreateForm(TfrmMultiLevelPickForm, frmmain.formcontainer5.ElementID, egv_subform9);\r\n end;\r\n\r\n//Edit-base Pick form for MEMO field or GRID\r\nif (sender as TSpeedButton).tag = 2\r\nthen begin\r\n if assigned(EGV_PARENT_DBGRID)\r\n then begin\r\n //showmessage(EGV_PARENT_DBGRID.name + '_SELECT_' + getcurrentformname);\r\n SQL_p := dm.egv_localstorage.values[EGV_PARENT_DBGRID.name + '_SELECT_' + getcurrentformname];\r\n frmmain.memGridColumns.text := dm.egv_localstorage.values[uppercase(EGV_PARENT_DBGRID.name) + '_COLUMNS_' + getcurrentformname];\r\n EGV_PKLTARGETGRIDFIELDS := Grid_GetTableAndColumns(3, SQL_p, frmmain.memGridColumns);\r\n end;\r\n //showmessage(EGV_PKLTARGETGRIDFIELDS);\r\n containername_p := getformcontainer().name;\r\n {\r\n frmmain.formcontainer2.Visible := true;\r\n frmmain.formcontainer3.Align := alNone;\r\n frmmain.formcontainer3.Top := 200;\r\n frmmain.formcontainer3.left := 300;\r\n frmmain.formcontainer3.Width := 700;\r\n frmmain.formcontainer3.Height := 500;\r\n }\r\n if containername_p = 'FormContainer1' then Application.CreateForm(TfrmPickForm, frmmain.formcontainer1.ElementID, egv_subform);\r\n if containername_p = 'FormContainer2' then Application.CreateForm(TfrmPickForm, frmmain.formcontainer2.ElementID, egv_subform2);\r\n if containername_p = 'FormContainer3' then Application.CreateForm(TfrmPickForm, frmmain.formcontainer3.ElementID, egv_subform3);\r\n if containername_p = 'FormContainer4' then Application.CreateForm(TfrmPickForm, frmmain.formcontainer4.ElementID, egv_subform4);\r\n if containername_p = 'FormContainer5' then Application.CreateForm(TfrmPickForm, frmmain.formcontainer5.ElementID, egv_subform5);\r\n if containername_p = 'FormContainer6' then Application.CreateForm(TfrmPickForm, frmmain.formcontainer5.ElementID, egv_subform6);\r\n if containername_p = 'FormContainer7' then Application.CreateForm(TfrmPickForm, frmmain.formcontainer5.ElementID, egv_subform7);\r\n if containername_p = 'FormContainer8' then Application.CreateForm(TfrmPickForm, frmmain.formcontainer5.ElementID, egv_subform8);\r\n if containername_p = 'FormContainer9' then Application.CreateForm(TfrmPickForm, frmmain.formcontainer5.ElementID, egv_subform9);\r\n end;\r\n\r\n//List - based pick form for the memo block\r\nif (sender as TSpeedButton).tag = 3\r\nthen begin\r\n // showmessage('1');\r\n EGV_CURRENTFORMNAME := dm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform()-1)];\r\n dm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform())] := 'L_' + EGV_BLOCKUNIQUEID;\r\n EGV_CURRENTFORMNAME := dm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform())];\r\n containername_p := getformcontainer().name;\r\n // showmessage(EGV_CURRENTFORMNAME);\r\n // showmessage('CURRENTFORMNAME_' + inttostr(getsubform()));\r\n dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_FORM_CAPTION'] := EGV_CHILD_FORM_CAPTION;\r\n //showmessage('block id on pickform call 2: ' + EGV_BLOCKUNIQUEID );\r\n CallForm(containername_p); // if LIST form - activate filter when form shows up\r\n // if EDUI form - clcik 'NEW' after form show up to create new record\r\n end;\r\n\r\n // showmessage(inttostr((sender as TWebSpeedButton).tag));\r\n\r\n//List - based pick form for the GRID block\r\nif (sender as TSpeedButton).tag = 4\r\nthen begin\r\n // showmessage('call list pickform for grid block. dataset tag = ' + inttostr(dm.xdsDynamicGrid2.Tag) );\r\n // showmessage('1');\r\n // showmessage(EGV_PARENT_DBGRID.name);\r\n EGV_PKLTARGETMEMO := nil;\r\n Block_GridNewRecord(Sender);\r\n SQL_p := dm.egv_localstorage.values[EGV_PARENT_DBGRID.name + '_SELECT_' + getcurrentformname];\r\n frmmain.memGridColumns.text := dm.egv_localstorage.values[EGV_PARENT_DBGRID.name + '_COLUMNS_' + getcurrentformname];\r\n EGV_PKLTARGETGRIDFIELDS := Grid_GetTableAndColumns(3, SQL_p, frmmain.memGridColumns);\r\n\r\n EGV_CURRENTFORMNAME := dm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform()-1)];\r\n dm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform())] := 'L_' + EGV_BLOCKUNIQUEID;\r\n EGV_CURRENTFORMNAME := dm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform())];\r\n containername_p := getformcontainer().name;\r\n //showmessage(SQL_p);\r\n // showmessage('CURRENTFORMNAME_' + inttostr(getsubform()));\r\n dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_FORM_CAPTION'] := EGV_CHILD_FORM_CAPTION;\r\n CallForm(containername_p, 1); // activate filter when form shows up\r\n end;\r\n\r\n//Custom form\r\nif (sender as TSpeedButton).tag = 5\r\nthen begin\r\n EGV_CURRENTFORMNAME := dm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform()-1)];\r\n dm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform())] := frmmain.edtPicklistCustomForm.text;\r\n EGV_CURRENTFORMNAME := dm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform())];\r\n containername_p := getformcontainer().name;\r\n dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_FORM_CAPTION'] := EGV_CHILD_FORM_CAPTION;\r\n CallForm(containername_p);\r\n end;\r\n\r\n//Custom pick form with grid\r\n{if (sender as TWebSpeedButton).tag = 3\r\nthen begin\r\n PreparaFormContainer(nil, nil, 0);\r\n FormContainer.Visible := False;\r\n SubFormContainer.Visible := True;\r\n SubFormContainer.Align := alClient;\r\n if assigned(DM.EGV_PARENT_DBGRID)\r\n then begin\r\n DM.EGV_PARENT_DBGRID.datasource.dataset.append;\r\n DM.EGV_PARENT_DBGRID.datasource.dataset.post;\r\n end;\r\n\r\n Application.CreateForm(TfrmPickFormGrid, SubFormContainer.ElementID, dm.egv_subform); // showmessage('2');\r\n end; }\r\nend;\r\n\r\nprocedure BlockShowPickList(mode_p: integer=0);\r\nvar containername_p: string;\r\nbegin\r\ncontainername_p := getformcontainer().name; // showmessage(containername_p);\r\nif containername_p = 'FormContainer1' then Application.CreateForm(TfrmPickList, frmmain.formcontainer1.ElementID, egv_subform);\r\nif containername_p = 'FormContainer2' then Application.CreateForm(TfrmPickList, frmmain.formcontainer2.ElementID, egv_subform2);\r\nif containername_p = 'FormContainer3' then Application.CreateForm(TfrmPickList, frmmain.formcontainer3.ElementID, egv_subform3);\r\nif containername_p = 'FormContainer4' then Application.CreateForm(TfrmPickList, frmmain.formcontainer4.ElementID, egv_subform4);\r\nif containername_p = 'FormContainer5' then Application.CreateForm(TfrmPickList, frmmain.formcontainer5.ElementID, egv_subform5);\r\nif containername_p = 'FormContainer6' then Application.CreateForm(TfrmPickList, frmmain.formcontainer5.ElementID, egv_subform6);\r\nif containername_p = 'FormContainer7' then Application.CreateForm(TfrmPickList, frmmain.formcontainer5.ElementID, egv_subform7);\r\nif containername_p = 'FormContainer8' then Application.CreateForm(TfrmPickList, frmmain.formcontainer5.ElementID, egv_subform8);\r\nif containername_p = 'FormContainer9' then Application.CreateForm(TfrmPickList, frmmain.formcontainer5.ElementID, egv_subform9);\r\nend;\r\n\r\nprocedure PKLOpen(HideCommonItems_p: Boolean=false);\r\nvar s: string;\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var i: integer;\r\n begin\r\n dm.xdsPickList.Close;\r\n // showmessage('before set j data');\r\n try\r\n dm.xdsPickList.SetJsonData(Response_to_JSArray(Response));\r\n except\r\n //showmessage('Error loading List. Check DB Select statement');\r\n //string(TJSObject(Response.Result)['value']));\r\n end;\r\n// showmessage('after set j data: ' );\r\n dm.xdsPickList.Open;\r\n end;\r\n\r\nbegin\r\nif frmmain.clQuickPicklist.visible then frmmain.btnCloseQuickPickListClick(nil);\r\nEGV_QPKLFilter := '';\r\n // showmessage(EGV_SECTIONNAME);\r\n if EGV_SHOWCOMMONPICKLIST\r\n then begin \r\n if egv_pkleditmode\r\n then s := ' select userid as USERID, ident_value as IDENT_VALUE, ident_name as IDENT_NAME, ' +\r\n ' Visible as VISIBLE, FACILITYID as FACILITYID, section_name as SECTION_NAME, speciality as SPECIALITY ' +\r\n ' from ini_ident where ' +\r\n ' section_name = ' + quotedstr(EGV_SECTIONNAME) + ' and ' +\r\n ' ( facilityid = ' + EGV_FACILITYID + ' or facilityid = 1 ) ' +\r\n ' order by facilityid DESC, ident_name'\r\n else s := ' select userid as USERID, ident_value as IDENT_VALUE, ident_name as IDENT_NAME, ' +\r\n ' Visible as VISIBLE, FACILITYID as FACILITYID, section_name as SECTION_NAME, speciality as SPECIALITY ' +\r\n ' from ini_ident where ' +\r\n ' section_name = ' + quotedstr(EGV_SECTIONNAME) + ' and ' +\r\n ' ( facilityid = ' + EGV_FACILITYID + ' or facilityid = 1 ) ' + ' and ' +\r\n ' visible <> 0 order by facilityid DESC, ident_name';\r\n end\r\n else begin \r\n if egv_pkleditmode\r\n then s := ' select userid as USERID, ident_value as IDENT_VALUE, ident_name as IDENT_NAME, ' +\r\n ' Visible as VISIBLE, FACILITYID as FACILITYID, section_name as SECTION_NAME, speciality as SPECIALITY ' +\r\n ' from ini_ident where ' +\r\n ' section_name = ' + quotedstr(EGV_SECTIONNAME) + ' and ' +\r\n ' ( facilityid = ' + EGV_FACILITYID + ' ) ' +\r\n ' order by facilityid DESC, ident_name'\r\n else s := ' select userid as USERID, ident_value as IDENT_VALUE, ident_name as IDENT_NAME, ' +\r\n ' Visible as VISIBLE, FACILITYID as FACILITYID, section_name as SECTION_NAME, speciality as SPECIALITY ' +\r\n ' from ini_ident where ' +\r\n ' section_name = ' + quotedstr(EGV_SECTIONNAME) + ' and ' +\r\n ' ( facilityid = ' + EGV_FACILITYID + ' ) ' + ' and ' +\r\n ' visible <> 0 order by facilityid DESC, ident_name';\r\n end;\r\n // showmessage(s);\r\n dm.XDataWebClient1.RawInvoke('IReportService.OpenQuery',[s , egv_facilityid, '1'], @OnResult);\r\nend;\r\n\r\nfunction IsAllDigit(s:String):Boolean;\r\nvar\r\n n:Integer;\r\nbegin\r\n result := true;\r\n for n := 1 to Length(s) do begin\r\n if (s[n] < '0') or (s[n] > '9') then\r\n begin\r\n result := false;\r\n exit;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction GetCurrentForm(): TForm;\r\nbegin\r\nResult := nil;\r\nif Assigned(egv_subform9) then result := EGV_SUBFORM9\r\nelse if Assigned(egv_subform8) then result := EGV_SUBFORM8\r\n else if Assigned(egv_subform7) then result := EGV_SUBFORM7\r\n else if Assigned(egv_subform6) then result := EGV_SUBFORM6\r\n else if Assigned(egv_subform5) then result := EGV_SUBFORM5\r\n else if Assigned(egv_subform4) then result := EGV_SUBFORM4\r\n else if Assigned(egv_subform3) then result := EGV_SUBFORM3\r\n else if Assigned(egv_subform2) then result := EGV_SUBFORM2\r\n else if Assigned(egv_subform) then result := EGV_SUBFORM;\r\nend;\r\n\r\nfunction GetPreviousForm(Depth_p: integer=1): TForm;\r\nbegin\r\nResult := nil;\r\nif Depth_p = 1\r\n then begin\r\n if Assigned(egv_subform9) then result := EGV_SUBFORM8\r\n else if Assigned(egv_subform8) then result := EGV_SUBFORM7\r\n else if Assigned(egv_subform7) then result := EGV_SUBFORM6\r\n else if Assigned(egv_subform6) then result := EGV_SUBFORM5\r\n else if Assigned(egv_subform5) then result := EGV_SUBFORM4\r\n else if Assigned(egv_subform4) then result := EGV_SUBFORM3\r\n else if Assigned(egv_subform3) then result := EGV_SUBFORM2\r\n else if Assigned(egv_subform2) then result := EGV_SUBFORM;\r\n end;\r\nif Depth_p = 2\r\n then begin\r\n if Assigned(egv_subform9) then result := EGV_SUBFORM7\r\n else if Assigned(egv_subform8) then result := EGV_SUBFORM6\r\n else if Assigned(egv_subform7) then result := EGV_SUBFORM5\r\n else if Assigned(egv_subform6) then result := EGV_SUBFORM4\r\n else if Assigned(egv_subform5) then result := EGV_SUBFORM3\r\n else if Assigned(egv_subform4) then result := EGV_SUBFORM2\r\n else if Assigned(egv_subform3) then result := EGV_SUBFORM;\r\n end;\r\nif Depth_p = 3\r\n then begin\r\n if Assigned(egv_subform9) then result := EGV_SUBFORM6\r\n else if Assigned(egv_subform8) then result := EGV_SUBFORM5\r\n else if Assigned(egv_subform7) then result := EGV_SUBFORM4\r\n else if Assigned(egv_subform6) then result := EGV_SUBFORM3\r\n else if Assigned(egv_subform5) then result := EGV_SUBFORM2\r\n else if Assigned(egv_subform4) then result := EGV_SUBFORM;\r\n end;\r\nif Depth_p = 4\r\n then begin\r\n if Assigned(egv_subform9) then result := EGV_SUBFORM5\r\n else if Assigned(egv_subform8) then result := EGV_SUBFORM4\r\n else if Assigned(egv_subform7) then result := EGV_SUBFORM3\r\n else if Assigned(egv_subform6) then result := EGV_SUBFORM2\r\n else if Assigned(egv_subform5) then result := EGV_SUBFORM;\r\n end;\r\n if Depth_p = 5\r\n then begin\r\n if Assigned(egv_subform9) then result := EGV_SUBFORM4\r\n else if Assigned(egv_subform8) then result := EGV_SUBFORM3\r\n else if Assigned(egv_subform7) then result := EGV_SUBFORM2\r\n else if Assigned(egv_subform6) then result := EGV_SUBFORM;\r\n end;\r\n if Depth_p = 6\r\n then begin\r\n if Assigned(egv_subform9) then result := EGV_SUBFORM3\r\n else if Assigned(egv_subform8) then result := EGV_SUBFORM2\r\n else if Assigned(egv_subform7) then result := EGV_SUBFORM;\r\n end;\r\n if Depth_p = 7\r\n then begin\r\n if Assigned(egv_subform9) then result := EGV_SUBFORM2\r\n else if Assigned(egv_subform8) then result := EGV_SUBFORM;\r\n end;\r\n if Depth_p = 8\r\n then begin\r\n if Assigned(egv_subform9) then result := EGV_SUBFORM;\r\n end;\r\nend;\r\n\r\nfunction GetCurrentFormName(): string;\r\nbegin\r\nResult := '';\r\nif Assigned(egv_subform9) then result := EGV_SUBFORM9.name\r\nelse if Assigned(egv_subform8) then result := EGV_SUBFORM8.name\r\n else if Assigned(egv_subform7) then result := EGV_SUBFORM7.name\r\n else if Assigned(egv_subform6) then result := EGV_SUBFORM6.name\r\n else if Assigned(egv_subform5) then result := EGV_SUBFORM5.name\r\n else if Assigned(egv_subform4) then result := EGV_SUBFORM4.name\r\n else if Assigned(egv_subform3) then result := EGV_SUBFORM3.name\r\n else if Assigned(egv_subform2) then result := EGV_SUBFORM2.name\r\n else if Assigned(egv_subform) then result := EGV_SUBFORM.name;\r\nResult := uppercase(Result);\r\nend;\r\n\r\nfunction GetCurrentFormDiv(): TScrollBox;\r\nvar i: integer;\r\nbegin\r\nResult := nil;\r\nif Assigned(egv_subform9) then result := (EGV_SUBFORM9.FindComponent('SubForm_DIV') as TScrollBox)\r\nelse if Assigned(egv_subform8) then result := (EGV_SUBFORM8.FindComponent('SubForm_DIV') as TScrollBox)\r\n else if Assigned(egv_subform7) then result := (EGV_SUBFORM7.FindComponent('SubForm_DIV') as TScrollBox)\r\n else if Assigned(egv_subform6) then result := (EGV_SUBFORM6.FindComponent('SubForm_DIV') as TScrollBox)\r\n else if Assigned(egv_subform5) then result := (EGV_SUBFORM5.FindComponent('SubForm_DIV') as TScrollBox)\r\n else if Assigned(egv_subform4) then result := (EGV_SUBFORM4.FindComponent('SubForm_DIV') as TScrollBox)\r\n else if Assigned(egv_subform3) then result := (EGV_SUBFORM3.FindComponent('SubForm_DIV') as TScrollBox)\r\n else if Assigned(egv_subform2) then result := (EGV_SUBFORM2.FindComponent('SubForm_DIV') as TScrollBox)\r\n else if Assigned(egv_subform) then result := (EGV_SUBFORM.FindComponent('SubForm_DIV') as TScrollBox);\r\nend;\r\n\r\nprocedure CreateMainMenu;\r\nvar s, facilityfilter_p: string;\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n begin\r\n dm.xdsMainMenu.Close;\r\n //showmessage(string(TJSObject(Response.Result)['value']));\r\n try\r\n dm.xdsMainMenu.SetJsonData(Response_to_JSArray(Response));\r\n except\r\n showmessage('Error loading List. Check DB Select statement');\r\n //showmessage(string(TJSObject(Response.Result)['value']));\r\n end;\r\n //showmessage('dm.xdsMainMenu.Open;');\r\n dm.xdsMainMenu.Open;\r\n end;\r\n\r\nbegin\r\n//showmessage('create main menu starts');\r\nEGV_QPKLFilter := '';\r\n\r\nfacilityfilter_p := ' facilityid = ' + egv_facilityid;\r\n{if egv_showcommonpicklist\r\nthen facilityfilter_p := facilityfilter_p + ' or facilityid = 1 '; }\r\n\r\n //showmessage('create menue:' + egv_facilityid);\r\n s := ' select ident_value as IDENT_VALUE, VISIBLE' +\r\n ' from ini_ident where ' +\r\n ' section_name = ' + quotedstr('QAPPBUILDER_MAIN_MENU') + ' and ' +\r\n ' ( ' + facilityfilter_p + ' ) ' +\r\n ' order by facilityid DESC, ident_name';\r\n //showmessage(s);\r\n dm.XDataWebClient1.RawInvoke('IReportService.OpenQuery',[s , egv_facilityid, '1'], @OnResult);\r\nend;\r\n\r\nprocedure LoadMainMenu;\r\nvar i, k: integer; s: string; c: TBitBtn; v_p: boolean;\r\nbegin\r\nfor i := 1 to 100\r\ndo begin\r\n c := (frmmain.FindComponent('mm'+inttostr(i)) as TBitBtn);\r\n if ( c <> nil )\r\n then begin\r\n c.Tag := 0; c.Visible := false; c.MaterialGlyphSize := 30; //c.Layout := blGlyphLeft;\r\n dm.egv_localstorage.values['MAINMENU_FRM' + uppercase(c.name)] := ''; // form name to call level 1\r\n dm.egv_localstorage.values['MAINMENU_API' + uppercase(c.name)] := ''; // API (remote function) to call before form\r\n dm.egv_localstorage.values['MAINMENU_MASTER' + uppercase(c.name)] := ''; // Master menu item\r\n end;\r\n end;\r\n\r\ndm.xdsmainMenu.First;\r\n//showmessage('load menu start: ' + inttostr(dm.xdsMainMenu.RecordCount));\r\nwhile not dm.xdsMainMenu.Eof\r\ndo begin\r\n s := dm.xdsMainMenuOriginalIDENT_VALUE.AsString;\r\n if (copy(s,1,2) <> 'M^') and (copy(s,1,2) <> 'F^')\r\n then begin\r\n dm.xdsMainMenu.Next;\r\n continue\r\n end;\r\n v_p := (dm.xdsMainMenuOriginalVISIBLE.AsInteger = 1);\r\n //showmessage(s);\r\n if copy(s,1,1) = 'M' // Menu Item\r\n then begin\r\n c := nil;\r\n for i := 1 to 100\r\n do begin\r\n if not assigned(frmmain.FindComponent('mm'+inttostr(i))) then break;\r\n c := (frmmain.FindComponent('mm'+inttostr(i)) as TBitBtn);\r\n if ( c <> nil ) and ( not c.Visible ) and (c.Tag = 0)\r\n then begin\r\n if not v_p\r\n then c.Tag := -1 // hidden item\r\n else if splitstring(s,'^')[5] <> '' // dependant item ( tag = 1 or 2)\r\n then begin\r\n if copy(splitstring(s,'^')[5],1,1) = '_'\r\n then c.Tag := 1 // same level dependant item\r\n else begin\r\n c.Tag := 2; // second level dependant item\r\n c.MaterialGlyphSize := 20; {c.Layout := blGlyphBottom;}\r\n end;\r\n end;\r\n\r\n c.MaterialGlyph := '';\r\n c.Caption := splitstring(s,'^')[1]; // icon goes to caption ( font awesome )\r\n c.hint := splitstring(s,'^')[2]; // caption goes to hint\r\n\r\n { if (dm.EGV_LOCALSTORAGE.Values['EGV_MAINMENUTITLES'] = '1')\r\n then begin\r\n c.Caption := splitstring(s,'^')[2] + ' ';\r\n // showmessage(c.name);\r\n end\r\n else begin\r\n c.caption := '';\r\n c.hint := splitstring(s,'^')[2];\r\n end; }\r\n\r\n dm.egv_localstorage.values['MAINMENU_FRM' + uppercase(c.name)] := splitstring(s,'^')[3]; // form name to call level 1\r\n if length( splitstring(s,'^')) >=5\r\n then dm.egv_localstorage.values['MAINMENU_API' + uppercase(c.name)] := splitstring(s,'^')[4]; // API (remote function) to call before form\r\n if length( splitstring(s,'^')) >=6\r\n then begin\r\n dm.egv_localstorage.values['MAINMENU_MASTER' + uppercase(c.name)] := splitstring(s,'^')[5]; // Master menu item\r\n // showmessage(c.caption);\r\n end;\r\n if (trim(splitstring(s,'^')[3]) = '') and ((length( splitstring(s,'^')) < 5) or (trim(splitstring(s,'^')[4]) = ''))\r\n then c.Height := 10\r\n else c.Height := 30;\r\n Break;\r\n end;\r\n end;\r\n\r\n if c <> nil\r\n then begin\r\n // showmessage(c.Caption + c.hint);\r\n c.ChildOrder := i;\r\n c.Visible :=(v_p and (c.Tag < 2));\r\n end;\r\n end;\r\n // showmessage('1');\r\n if copy(s,1,1) = 'F' // Fom description\r\n then begin // showmessage(splitstring(s,'^')[2]);\r\n k := length(splitstring(s,'^')) - 39;\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_FORM_CAPTION'] := splitstring(s,'^')[2];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_FORM_REPORTTEMPLATE'] := splitstring(s,'^')[3];\r\n\r\n // showmessage(splitstring(s,'^')[2] + ' - ' + splitstring(s,'^')[4] + ' - ' + splitstring(s,'^')[5]);\r\n\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON1_CAPTION'] := splitstring(s,'^')[3 + k];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON1_FORM'] := splitstring(s,'^')[4 + k];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON1_ICON'] := splitstring(s,'^')[5 + k];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON1_API'] := splitstring(s,'^')[6 + k];\r\n\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON2_CAPTION'] := splitstring(s,'^')[7 + k];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON2_FORM'] := splitstring(s,'^')[8 + k];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON2_ICON'] := splitstring(s,'^')[9 + k];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON2_API'] := splitstring(s,'^')[10 + k];\r\n\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON3_CAPTION'] := splitstring(s,'^')[11 + k];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON3_FORM'] := splitstring(s,'^')[12 + k];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON3_ICON'] := splitstring(s,'^')[13 + k];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON3_API'] := splitstring(s,'^')[14 + k];\r\n\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON4_CAPTION'] := splitstring(s,'^')[15 + k];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON4_FORM'] := splitstring(s,'^')[16 + k];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON4_ICON'] := splitstring(s,'^')[17 + k];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON4_API'] := splitstring(s,'^')[18 + k];\r\n\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON5_CAPTION'] := splitstring(s,'^')[19 + k];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON5_FORM'] := splitstring(s,'^')[20 + k];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON5_ICON'] := splitstring(s,'^')[21 + k];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON5_API'] := splitstring(s,'^')[22 + k];\r\n\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON6_CAPTION'] := splitstring(s,'^')[23 + k];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON6_FORM'] := splitstring(s,'^')[24 + k];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON6_ICON'] := splitstring(s,'^')[25 + k];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON6_API'] := splitstring(s,'^')[26 + k];\r\n\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON7_CAPTION'] := splitstring(s,'^')[27 + k];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON7_FORM'] := splitstring(s,'^')[28 + k];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON7_ICON'] := splitstring(s,'^')[29 + k];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON7_API'] := splitstring(s,'^')[30 + k];\r\n\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON8_CAPTION'] := splitstring(s,'^')[31 + k];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON8_FORM'] := splitstring(s,'^')[32 + k];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON8_ICON'] := splitstring(s,'^')[33 + k];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON8_API'] := splitstring(s,'^')[34 + k];\r\n\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON9_CAPTION'] := splitstring(s,'^')[35 + k];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON9_FORM'] := splitstring(s,'^')[36 + k];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON9_ICON'] := splitstring(s,'^')[37 + k];\r\n dm.egv_localstorage.values[uppercase(splitstring(s,'^')[1]) + '_BUTTON9_API'] := splitstring(s,'^')[38 + k];\r\n //showmessage(splitstring(s,'^')[1]);\r\n //showmessage(dm.egv_localstorage.values[splitstring(s,'^')[1] + '_BUTTON1_FORM']);\r\n end;\r\n //showmessage('2');\r\n dm.xdsMainMenu.Next;\r\n end;\r\n // showmessage('2');\r\nwith frmmain\r\ndo begin\r\n if dm.EGV_LOCALSTORAGE.Values['EGV_MAINMENUTITLES'] = '1'\r\n then begin\r\n btnMenu_Settings.Caption := btnMenu_Settings.Caption + btnMenu_Settings.hint;\r\n pnlMainMenu.ElementClassName := 'mainmenu_wide';\r\n end\r\n else begin\r\n btnMenu_Settings.caption := stringreplace(btnMenu_Settings.caption,btnMenu_Settings.hint,'',[rfReplaceAll]);\r\n // btnMenu_Settings.hint := 'Settings';\r\n pnlMainMenu.ElementClassName := 'mainmenu_narrow';\r\n end;\r\n pnlMainMenu.Width := pnlMainMenu.Width + 1; // to refresh\r\n pnlMainMenu.Width := pnlMainMenu.Width - 1;\r\n end;\r\n\r\n { showmessage(frmmain.mm1.caption);\r\n showmessage(frmmain.mm2.caption);\r\n showmessage(frmmain.mm3.caption);\r\n showmessage(frmmain.mm4.caption);\r\n showmessage(frmmain.mm5.caption);}\r\n// Activate Default Screen\r\nfor i := 1 to 100\r\ndo begin\r\n c := (frmmain.FindComponent('mm'+inttostr(i)) as TBitBtn);\r\n if assigned(c) and ((pos('*',trim(c.Caption)) = 1) or (pos('*',trim(c.hint)) = 1))\r\n then begin //showmessage(c.caption);\r\n c.Caption := stringreplace(c.Caption,'*','',[]);\r\n c.hint := stringreplace(c.hint, '*','',[]);\r\n frmmain.mm1Click(c);\r\n break;;\r\n end;\r\n end;\r\n//if (dm.EGV_LOCALSTORAGE.Values['EGV_MAINMENUTITLES'] <> '1')\r\n//then frmmain.btnLogout.caption := '';\r\n//showmessage('load menu end');\r\nfrmmain.tmGenTimer.tag := 1;\r\nfrmmain.tmGenTimer.Enabled := true;\r\nend;\r\n\r\nprocedure BlockInsertDate(Date_p: TDatetime=0);\r\nvar i: integer; control_p: TObject;\r\nbegin\r\n if date_p = 0 then date_p := date;\r\n\r\n for i:=0 to EGV_CURRENTBLOCK.ControlCount - 1\r\n do begin\r\n control_p := (EGV_CURRENTBLOCK.Controls[i] as TControl);\r\n if (control_p is TMemo) and (not (control_p as TMemo).readonly)\r\n then begin\r\n // showmessage(formatdatetime('c', Date));\r\n if dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_CLEAR'] = '1' then (control_p as TMemo).text := '';\r\n\r\n if (control_p as TMemo).text = ''\r\n then (control_p as TMemo).text := formatdatetime('c', Date_p)\r\n else (control_p as TMemo).text := (control_p as TMemo).text + ', ' + formatdatetime('c', Date_p);\r\n // showmessage((control_p as twebmemo).text);\r\n stretchmemo( (control_p as TMemo) );\r\n if assigned((control_p as TMemo).OnChange) then (control_p as TMemo).OnChange(control_p);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure BlockInsertCurrentTime(Sender: TObject);\r\nvar i: integer; control_p: TObject;\r\nbegin\r\n for i:=0 to EGV_CURRENTBLOCK.ControlCount - 1\r\n do begin\r\n control_p := (EGV_CURRENTBLOCK.Controls[i] as TControl);\r\n if (control_p is TMemo) and (not (control_p as TMemo).readonly)\r\n then begin\r\n // showmessage(formatdatetime('c', Date));\r\n if dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_CLEAR'] = '1' then (control_p as TMemo).text := '';\r\n\r\n if (control_p as TMemo).text = ''\r\n then (control_p as TMemo).text := formatdatetime('t', time)\r\n else (control_p as TMemo).text := (control_p as TMemo).text + ', ' + formatdatetime('t', time);\r\n //showmessage((control_p as twebmemo).text);\r\n stretchmemo( (control_p as TMemo) );\r\n if assigned((control_p as TMemo).OnChange) then (control_p as TMemo).OnChange(control_p);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure BlockInsertFromCalendar(Sender: TObject);\r\nvar i: integer; P: TPoint; c: TControl;\r\nbegin\r\nwith frmmain do\r\nbegin\r\n//if cldQPKLCalendar.visible then begin cldQPKLCalendar.visible := false; exit; end;\r\n\r\nif clQuickPicklist.visible then btnCloseQuickPickListClick(nil);\r\n\r\nfor i := 0 to EGV_CURRENTBLOCK.ControlCount - 1\r\ndo begin\r\n c := EGV_CURRENTBLOCK.Controls[i];\r\n if ((c is TDBmemo) or (c is TMemo) or (c is TDBGrid)) then break;\r\n end;\r\nif not (c is TMemo) then exit;\r\ncldQPKLCalendar.hint := c.name;\r\ncldQPKLCalendar.parent := ((c.parent as TControl).parent as TScrollBox); // GetCurrentFormDiv;\r\n { P.x := (((Sender as TWebControl).parent as TWebControl).parent as TWebControl).left +\r\n (((Sender as TWebControl).parent as TWebControl).parent as TWebControl).width -\r\n cldQPKLCalendar.width;\r\n P.y := (((Sender as TWebControl).parent as TWebControl).parent as TWebControl).top + (Sender as TWebControl).parent.height;\r\n P := ((((Sender as TWebControl).parent as TWebControl).parent as TWebControl).parent as TControl).clienttoscreen(P);\r\n cldQPKLCalendar.left := P.x;\r\n cldQPKLCalendar.top := P.y; }\r\n\r\n cldQPKLCalendar.left := EGV_CURRENTBLOCK.Left + EGV_CURRENTBLOCK.Width - cldQPKLCalendar.Width; // ((c as TwebMemo).parent as TWebPanel).Left;\r\n cldQPKLCalendar.top := ((c as TMemo).parent as TPanel).Top;\r\n cldQPKLCalendar.SelectedDate := date;\r\n\r\ncldQPKLCalendar.visible := true;\r\nend\r\nend;\r\n\r\nprocedure BlockInsertFromTimePicker(Sender: TObject);\r\nvar i: integer; P: TPoint; c: TControl;\r\nbegin\r\nwith frmmain do\r\nbegin\r\nif tmQPKLTimePicker.visible then exit;\r\n//if pnlQPKLTimePicker.visible then begin pnlQPKLTimePicker.visible := false; exit; end;\r\n\r\nif clQuickPicklist.visible\r\nthen btnCloseQuickPickListClick(nil);\r\n\r\nfor i := 0 to EGV_CURRENTBLOCK.ControlCount - 1\r\ndo begin\r\n c := EGV_CURRENTBLOCK.Controls[i];\r\n if ((c is TDBmemo) or (c is TMemo) or (c is TDBGrid)) then break;\r\n end;\r\nif not (c is TMemo) then exit;\r\ntmQPKLTimePicker.hint := c.name;\r\ntmQPKLTimePicker.parent := EGV_CURRENTBLOCK;\r\nc.Visible := false;\r\ntmQPKLTimePicker.align := alClient; //alTop;\r\n{\r\ntmQPKLTimePicker.Left := c.left;\r\ntmQPKLTimePicker.Top := c.Top; }\r\n\r\n{\r\npnlQPKLTimePicker.parent := EGV_CURRENTBLOCK; // blockgettoppanel(EGV_CURRENTBLOCK); // ((c.parent as TWebControl).parent as TWebScrollBox); // GetCurrentFormDiv;\r\npnlQPKLTimePicker.Left := c.left;\r\npnlQPKLTimePicker.Top := c.Top; }\r\n\r\n//pnlQPKLTimePicker.Align := alLeft;\r\n{pnlQPKLTimePicker.left := ((c as TwebMemo).parent as TWebPanel).Left;\r\npnlQPKLTimePicker.top := ((c as TwebMemo).parent as TWebPanel).Top; }\r\n//showmessage('1');\r\nif (c as TMemo).text <> ''\r\nthen try tmQPKLTimePicker.time := strtotime((c as TMemo).text);\r\n except\r\n tmQPKLTimePicker.time := time;\r\n end\r\nelse tmQPKLTimePicker.time := time;\r\n{btnUseSelectedTime.Visible := true; }\r\ntmQPKLTimePicker.visible := true;\r\n//tmQPKLTimePicker.SetFocus;\r\n\r\n{btnUseSelectedTime.parent := tmQPKLTimePicker.parent;\r\nbtnUseSelectedTime.top := tmQPKLTimePicker.top;\r\nbtnUseSelectedTime.left := tmQPKLTimePicker.left + tmQPKLTimePicker.width;\r\nbtnUseSelectedTime.visible := true; }\r\n\r\nend\r\nend;\r\n\r\nprocedure BlockInsertFromDatePicker(Sender: TObject);\r\nvar i: integer; P: TPoint; c: TControl;\r\nbegin\r\nwith frmmain do\r\nbegin\r\nif dpBlockDatePicker.visible then exit;\r\nif clQuickPicklist.visible\r\nthen btnCloseQuickPickListClick(nil);\r\n\r\nfor i := 0 to EGV_CURRENTBLOCK.ControlCount - 1\r\ndo begin\r\n c := EGV_CURRENTBLOCK.Controls[i];\r\n if ((c is TDBmemo) or (c is TMemo) or (c is TDBGrid)) then break;\r\n end;\r\nif not (c is TMemo) then exit;\r\ndpBlockDatePicker.hint := c.name;\r\ndpBlockDatePicker.parent := EGV_CURRENTBLOCK;\r\nc.Visible := false;\r\ndpBlockDatePicker.align := alClient; //alTop;\r\n{\r\ndpBlockDatePicker.Left := c.left;\r\ndpBlockDatePicker.Top := c.Top; }\r\n\r\nif (c as TMemo).text <> ''\r\nthen try dpBlockDatePicker.date := strtodate((c as TMemo).text);\r\n except\r\n dpBlockDatePicker.date := date;\r\n end\r\nelse dpBlockDatePicker.date := date;\r\n//btnUseSelectedTime.Visible := true;\r\ndpBlockDatePicker.visible := true;\r\n//dpBlockDatePicker.SetFocus;\r\nend\r\nend;\r\n\r\nprocedure BlockInsertRadioGroup(Sender: TObject);\r\nvar i: integer; P: TPoint; c: TControl;\r\nbegin\r\n//showmessage('BlockInsertRadioGroup');\r\nwith frmmain do\r\nbegin\r\n\r\nif rgBlockRadioGroup.visible then exit;\r\n\r\nrgBlockRadioGroup.BeginUpdate;\r\nrgBlockRadioGroup.items.Clear;\r\nrgBlockRadioGroup.EndUpdate;\r\n//showmessage(inttostr(frmmain.rgBlockRadioGroup.Items.count));\r\nif clQuickPicklist.visible then btnCloseQuickPickListClick(nil);\r\n\r\nc := BlockgetMemo(EGV_CURRENTBLOCK);\r\nrgBlockRadioGroup.hint := c.name;\r\nrgBlockRadioGroup.parent := EGV_CURRENTBLOCK;\r\nc.Visible := false;\r\nrgBlockRadioGroup.align := alClient;\r\n\r\nrgBlockRadioGroup.Visible := true;\r\n\r\n// 12345 rgBlockRadioGroup.Visible := false;\r\n\r\nif dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_RGCOLUMNS'] = ''\r\nthen frmmain.rgBlockRadioGroup.Columns := 1\r\nelse frmmain.rgBlockRadioGroup.Columns := strtoint(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_RGCOLUMNS']);\r\n\r\nBlockShowQPickList(Sender);\r\n\r\n//showmessage('1');\r\nend\r\nend;\r\n\r\nprocedure BlockInsertSpinEdit(Sender: TObject);\r\nvar i: integer; P: TPoint; c: TControl;\r\nbegin\r\n//showmessage('BlockInsertRadioGroup');\r\nwith frmmain do\r\nbegin\r\nif seBlockSpinEdit.visible then exit;\r\nseBlockSpinEdit.Value := 0;\r\nseBlockSpinEdit.visible := true;\r\nif clQuickPicklist.visible then btnCloseQuickPickListClick(nil);\r\n\r\nc := BlockgetMemo(EGV_CURRENTBLOCK);\r\nseBlockSpinEdit.hint := c.name;\r\nseBlockSpinEdit.parent := EGV_CURRENTBLOCK;\r\nc.Visible := false;\r\nseBlockSpinEdit.align := alClient; //alLeft;\r\n\r\n\r\nif (c as TMemo).text <> ''\r\nthen try begin\r\n seBlockSpinEdit.value := strtoint((c as TMemo).text);\r\n end;\r\n except\r\n seBlockSpinEdit.value := 0;\r\n end;\r\nseBlockSpinEdit.visible := true;\r\n//showmessage('1');\r\nend\r\nend;\r\n\r\nprocedure BlockCalendarDateSelected(Sender: TObject; ADate: TDateTime);\r\nvar c: Tcontrol;\r\nbegin\r\nwith frmmain do\r\nbegin\r\nc := (GetCurrentForm.findcomponent(cldQPKLCalendar.hint) as Tcontrol);\r\nif (c is TMemo)\r\nthen begin\r\n try\r\n if (c as TMemo).readonly then exit;\r\n\r\n if dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_CLEAR'] = '1' then (c as TMemo).text := '';\r\n if (c as TMemo).text = ''\r\n then (c as TMemo).text := formatdatetime('c', cldQPKLCalendar.selecteddate)\r\n else (c as TMemo).text := (c as TMemo).text + ', ' +\r\n formatdatetime('c', cldQPKLCalendar.selecteddate);\r\n if assigned((c as TMemo).OnChange) then (c as TMemo).OnChange(c);\r\n\r\n finally\r\n cldQPKLCalendar.visible := false;\r\n Block_MouseLeave ( (c.Parent as TPanel) );\r\n end;\r\n end;\r\nend;\r\nend;\r\n\r\nprocedure BlockInsertTimeSelected(time_p: TDateTime=0);\r\nvar c: Tcontrol;\r\nbegin\r\nif time_p = 0 then time_p := time;\r\n\r\nwith frmmain do\r\nbegin\r\nc := (GetCurrentForm.findcomponent(tmQPKLTimePicker.hint) as Tcontrol);\r\nif (c is TMemo)\r\nthen begin\r\n try\r\n if (c as TMemo).readonly then exit;\r\n if dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_CLEAR'] = '1' then (c as TMemo).text := '';\r\n if (c as TMemo).text = ''\r\n then (c as TMemo).text := formatdatetime('t', time_p)\r\n else (c as TMemo).text := (c as TMemo).text + ', ' +\r\n formatdatetime('t', time_p);\r\n if assigned((c as TMemo).OnChange) then (c as TMemo).OnChange(c);\r\n finally\r\n //tmQPKLTimePicker.visible := false;\r\n // btnUseSelectedTime.Visible := false;\r\n end;\r\n end;\r\nend;\r\nend;\r\n\r\nprocedure PrepareFields_J(Dataset: TDataset);\r\nvar i: integer;\r\nbegin\r\nfor i := 0 to Dataset.fields.count - 1\r\ndo begin\r\n if (dataset.fields[i].fieldkind = fkData) and (pos('Original.', dataset.fields[i].fieldname) = 0)\r\n then dataset.fields[i].fieldname := 'Original.' + dataset.fields[i].fieldname;\r\n end;\r\nend;\r\n\r\nprocedure PrepareFieldsData_J(DataSet: TDataSet);\r\nvar value_p: string; i: integer; Afterscroll_p, beforeedit_p, beforepost_p: TDatasetNotifyEvent; ms: Tmemorystream;\r\nbegin\r\n//showmessage('prepare fields data starts');\r\nif dataset = nil then exit;\r\n\r\nbeforeedit_p := dataset.beforeedit;\r\nbeforepost_p := dataset.beforepost;\r\ndataset.beforeedit := nil;\r\ndataset.beforepost := nil;\r\n\r\ndataset.DisableControls;\r\n//showmessage(inttostr(dataset.RecordCount));\r\nif dataset.isempty\r\nthen begin\r\n for i := 0 to dataset.fields.count -1\r\n do if dataset.fields[i].fieldkind = fkData\r\n then dataset.fields[i].fieldname := stringreplace(dataset.fields[i].fieldname, 'Original.', '', [rfIgnoreCase]);\r\n end\r\nelse begin\r\n while not dataset.eof\r\n do begin\r\n for i := 0 to dataset.fields.count -1\r\n do begin\r\n if dataset.fields[i].fieldkind = fkData\r\n then begin\r\n // if dataset.fields[i].DataType = ftBlob then continue;\r\n // try\r\n // ms := TmemoryStream.Create;\r\n { if dataset.fields[i].DataType = ftBlob\r\n then begin\r\n (dataset.fields[i] as TBlobField).SaveToStream(ms); showmessage('1');\r\n end\r\n else} value_p := dataset.fields[i].asstring;\r\n dataset.fields[i].fieldname := stringreplace(dataset.fields[i].fieldname, 'Original.', '', [rfIgnoreCase]);\r\n dataset.edit;\r\n {if dataset.fields[i].DataType = ftBlob\r\n then begin\r\n ms.Position := 0;\r\n // (dataset.fields[i] as TBlobField).LoadFromStream(ms); showmessage('2');\r\n end\r\n else} dataset.fields[i].asstring := value_p;\r\n // if dataset.fields[i].DataType = ftBlob then showmessage(value_p);\r\n if dataset.State in [dsEdit, dsInsert] then dataset.post;\r\n // finally\r\n // ms.Free;\r\n // end;\r\n end;\r\n end;\r\n dataset.next;\r\n if dataset.eof\r\n then begin // showmessage('remove orignal');\r\n for i := 0 to dataset.fields.count - 1\r\n do if dataset.fields[i].fieldkind = fkData\r\n then dataset.fields[i].fieldname := stringreplace(dataset.fields[i].fieldname, 'Original.', '', [rfIgnoreCase])\r\n end\r\n else begin\r\n for i := 0 to dataset.fields.count - 1\r\n do if dataset.fields[i].fieldkind = fkData\r\n then dataset.fields[i].fieldname := 'Original.' + dataset.fields[i].fieldname;\r\n end;\r\n end;\r\n end;\r\n\r\n//dataset.First;\r\n//showmessage('after open ends 1');\r\n//while not dataset.eof do dataset.Next;\r\n//showmessage('after open ends 2');\r\ndataset.First;\r\ndataset.EnableControls;\r\n//showmessage('after open ends 3');\r\nif assigned(EGV_CURRENTDYNAMICGRID)\r\nthen begin\r\n EGV_CURRENTDYNAMICGRID.Refresh;\r\n EGV_CURRENTDYNAMICGRID := nil;\r\n // showmessage('1');\r\n end;\r\n//showmessage('after open ends 3');\r\n//EGV_CURRENTDYNAMICGRID := nil;\r\ndataset.beforeedit := beforeedit_p;\r\ndataset.beforepost := beforepost_p;\r\n//showmessage('after open ends 4');\r\n//showmessage(GetCurrentForm.Name);\r\nif (GetCurrentForm <> nil) and (uppercase(GetCurrentForm.Name) = 'FRMSETTINGS')\r\nthen ParseAndShowMainMenuLine;\r\nif GetPreviousForm <> nil\r\nthen if uppercase(GetPreviousForm.Name) = 'FRMDYNAMICGRIDSETUP' then ParseAndShowGridSetupLine;\r\n//showmessage('prepare fields data ends');\r\nend;\r\n\r\nprocedure OpenDataSet_J(Dataset: TDataset; SQL_p: string; grd_p: TDBGrid=nil);\r\nvar s: string; DBtype_p: integer;\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var i: integer;\r\n begin\r\n try\r\n Dataset.Close;\r\n //showmessage(string(TJSObject(Response.Result)['value']));\r\n PrepareFields_J(dataset);\r\n try\r\n (Dataset as TXdataWebDataset).SetJsonData(Response_to_JSArray(Response));\r\n except\r\n //showmessage('Error loading List. Check DB Select statement');\r\n //showmessage(string(TJSObject(Response.Result)['value']));\r\n end;\r\n Dataset.Open;\r\n //showmessage(inttostr(frmmain.wmWaitMessage.Tag));\r\n finally\r\n if frmmain.wmWaitMessage.showing and\r\n ((frmmain.wmWaitMessage.Tag = 0) or\r\n (pos('CERNER_SCHEDULE', SQL_p) > 0) or\r\n (pos('CERNER_PATIENT', SQL_p) > 0) or\r\n (pos('CERNER_ENCOUNTERS', SQL_p) > 0)) then frmmain.wmWaitMessage.hide;\r\n\r\n if (grd_p <> nil) then grd_p.Visible := true;\r\n end;\r\n end;\r\n\r\nbegin\r\n// paruyr // if not frmmain.wmWaitMessage.showing then frmmain.wmWaitMessage.show;\r\n\r\nEGV_CURRENTDYNAMICGRID := grd_p;\r\nif pos('SELECT TOP ', uppercase(SQL_p)) = 0\r\nthen SQL_p := stringreplace(SQL_p, 'select', 'select top 300', [rfIgnoreCase]);\r\n\r\nDBtype_p := DBType(SQL_p);\r\n\r\n//showmessage(inttostr(DBtype_p) + ' --- ' + SQL_p);\r\nif SQL_p <> ''\r\nthen begin\r\n try\r\n if DBType_p = 1\r\n then dm.XDataWebClient1.RawInvoke('IReportService.OpenQuery',[SQL_p , egv_facilityid, inttostr(DBType_p)], @OnResult)\r\n else begin\r\n if pos('CERNER_SCHEDULE', SQL_p) > 0\r\n then begin\r\n // SQL_p := stringreplace(SQL_p, 'CERNER_SCHEDULE', '', [rfIgnorecase]);\r\n if dm.XDataWebConnection2.Connected\r\n then dm.XDataWebClient2.RawInvoke('IReportService.CERNER_OpenSchedule', [formatdatetime('MM/DD/YYYY', EGV_STARTDATE_DATE), formatdatetime('MM/DD/YYYY', EGV_ENDDATE_DATE)], @OnResult);\r\n end\r\n else if pos('CERNER_PATIENT', SQL_p) > 0\r\n then begin //showmessage(ELV_CERNERPATIENTSEARCHPARAMS);\r\n if (ELV_CERNERPATIENTSEARCHPARAMS <> '') or ( dm.XDataWebConnection2.Connected and (EGV_CURRENT_MRN <> '') )\r\n then dm.XDataWebClient2.RawInvoke('IReportService.CERNER_LOADPATIENT', [ELV_CERNERPATIENTSEARCHPARAMS], @OnResult);\r\n end\r\n else if pos('CERNER_ENCOUNTERS', SQL_p) > 0\r\n then begin\r\n // showmessage(formatdatetime('MM/DD/YYYY', EGV_STARTDATE_DATE) + ' - ' + formatdatetime('MM/DD/YYYY', EGV_ENDDATE_DATE) + ' - ' +\r\n // EGV_CURRENT_PROCEDURENUMBER + ' - ' + EGV_CURRENT_MRN) ;\r\n\r\n // EGV_CURRENT_PROCEDURENUMBER is used here to save the CERNER appointment ID on 'CERNER API' form.\r\n if dm.XDataWebConnection2.Connected and (EGV_CURRENT_MRN <> '') and\r\n (EGV_CURRENT_PROCEDURENUMBER <> '') and\r\n (EGV_CURRENT_PROCEDURENUMBER <> '0')\r\n then dm.XDataWebClient2.RawInvoke('IReportService.CERNER_LOADENCOUNTERS', [formatdatetime('MM/DD/YYYY', EGV_STARTDATE_DATE), formatdatetime('MM/DD/YYYY', EGV_ENDDATE_DATE), EGV_CURRENT_PROCEDURENUMBER, EGV_CURRENT_MRN], @OnResult);\r\n end\r\n else if pos('QLINICAL_IMAGES', uppercase(SQL_p)) > 0\r\n then dm.XDataWebClient1.RawInvoke('IReportService.Q_GetImages',[egv_facilityid, egv_current_procedurenumber, egv_current_mrn], @OnResult)\r\n else if dm.XDataWebConnection2.Connected then dm.XDataWebClient2.RawInvoke('IReportService.OpenQuery',[SQL_p , egv_facilityid, inttostr(DBType_p)], @OnResult);\r\n end;\r\n finally\r\n if frmmain.wmWaitMessage.showing and (frmmain.wmWaitMessage.Tag = 0) then frmmain.wmWaitMessage.hide;\r\n ELV_CERNERPATIENTSEARCHPARAMS := '';\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure Grid_AdjustColumns(aGrid: TDBGrid; stretch_p: boolean=true; fixedrowhight: integer=30);\r\nvar i,j,k,col_p: integer; c: array[0..100] of double;\r\nbegin\r\n{col_p := 0;\r\nk := 0;\r\nfor i := 0 to agrid.Columns.Count - 1\r\ndo if agrid.Columns[i].Width > 0\r\n then begin\r\n col_p := col_p + 1;\r\n k := k + aGrid.columns[i].width;\r\n end;\r\nif col_p = 0 then exit;\r\nfor i := 0 to agrid.Columns.Count - 1\r\ndo begin\r\n if agrid.columns[i].Width > 0\r\n then begin\r\n agrid.Columns[i].Width := trunc(agrid.width / (k/agrid.Columns[i].Width));\r\n aGrid.columns[i].elementclassname := 'text-wrap';\r\n aGrid.columns[i].titleelementclassname := 'text-wrap';\r\n j := i;\r\n end;\r\n end;\r\naGrid.FixedFont.Size := aGrid.Font.Size;\r\nagrid.Columns[j].Width := agrid.Columns[j].Width - 40;\r\n }\r\n\r\ntry\r\n//showmessage('adjust');\r\ncol_p := aGrid.columns.count - 1 - aGrid.FixedCols;\r\nif col_p < 0 then exit;\r\n\r\nk := 0;\r\nfor i := 0 to col_p do begin\r\n k := k + aGrid.columns[i].width;\r\n // aGrid.columns[i].elementclassname := 'text-wrap';\r\n // aGrid.columns[i].titleelementclassname := 'text-wrap';\r\n end;\r\nfor i := 0 to col_p do begin\r\n //showmessage(inttostr(aGrid.columns[i].width));\r\n c[i] := k/aGrid.columns[i].width;\r\n end;\r\nagrid.BeginUpdate;\r\nif aGrid.width >= 60\r\nthen begin\r\n //showmessage(aGrid.name);\r\n for i := 0 to col_p\r\n do begin\r\n aGrid.columns[i].width := trunc((aGrid.width - 40) / c[i]); // -1;\r\n if aGrid.columns[i].Title <> ''\r\n then begin\r\n aGrid.columns[i].elementclassname := 'text-wrap';\r\n aGrid.columns[i].titleelementclassname := 'text-wrap';\r\n end\r\n else begin\r\n aGrid.columns[i].elementclassname := '';\r\n aGrid.columns[i].titleelementclassname := '';\r\n end;\r\n end;\r\n// showmessage(inttostr(aGrid.columns[0].width));\r\n end; //showmessage(inttostr(sb101.width));\r\nagrid.EndUpdate;\r\n{k := 0;\r\nfor i := 0 to col_p do begin\r\n k := k + aGrid.columns[i].width;\r\n aGrid.columns[i].elementclassname := 'text-wrap';\r\n aGrid.columns[i].titleelementclassname := 'text-wrap';\r\n end; }\r\n//showmessage(inttostr(col_p));\r\n//aGrid.Columns[col_p].Width := 50; // aGrid.Columns[col_p].Width - (k - aGrid.Width - 15);\r\n//if stretch_p then BlockStretchGrid(aGrid);\r\nagrid.BeginUpdate;\r\naGrid.FixedFont.Size := aGrid.Font.Size;\r\naGrid.rowheights[0] := fixedrowhight;\r\nagrid.EndUpdate;\r\nfinally\r\nagrid.EndUpdate;\r\nend;\r\nend;\r\n\r\nfunction GetFormContainer(): THTMLDiv;\r\nbegin\r\nwith frmmain\r\ndo begin\r\n if FormContainer1.visible\r\n then begin result := FormContainer2; FormContainer2.visible := true; FormContainer1.visible := false; exit; end\r\n else\r\n if FormContainer2.visible\r\n then begin result := FormContainer3; FormContainer3.visible := true; FormContainer2.visible := false; exit; end\r\n else\r\n if FormContainer3.visible\r\n then begin result := FormContainer4; FormContainer4.visible := true; FormContainer3.visible := false; exit; end\r\n else\r\n if FormContainer4.visible\r\n then begin result := FormContainer5; FormContainer5.visible := true; FormContainer4.visible := false; exit; end\r\n else\r\n if FormContainer5.visible\r\n then begin result := FormContainer6; FormContainer6.visible := true; FormContainer5.visible := false; exit; end\r\n else\r\n if FormContainer6.visible\r\n then begin result := FormContainer7; FormContainer7.visible := true; FormContainer6.visible := false; exit; end\r\n else\r\n if FormContainer7.visible\r\n then begin result := FormContainer8; FormContainer8.visible := true; FormContainer7.visible := false; exit; end\r\n else\r\n if FormContainer8.visible\r\n then begin result := FormContainer9; FormContainer9.visible := true; FormContainer8.visible := false; exit; end\r\n else\r\n if FormContainer9.visible // 9 is a max.\r\n then begin result := nil; exit; end\r\n else begin result := FormContainer1; FormContainer1.visible := true; exit; end; // first level form\r\n end;\r\nend;\r\n\r\nfunction GetCurrentFormContainer(): THTMLDiv;\r\nbegin\r\nwith frmmain\r\ndo begin\r\n if FormContainer9.visible then begin result := FormContainer9; exit; end;\r\n if FormContainer8.visible then begin result := FormContainer8; exit; end;\r\n if FormContainer7.visible then begin result := FormContainer7; exit; end;\r\n if FormContainer6.visible then begin result := FormContainer6; exit; end;\r\n if FormContainer5.visible then begin result := FormContainer5; exit; end;\r\n if FormContainer4.visible then begin result := FormContainer4; exit; end;\r\n if FormContainer3.visible then begin result := FormContainer3; exit; end;\r\n if FormContainer2.visible then begin result := FormContainer2; exit; end;\r\n if FormContainer1.visible then begin result := FormContainer1; exit; end;\r\n end;\r\nend;\r\n\r\nfunction GetSubForm(): integer;\r\nbegin\r\n//if (assigned(egv_subform)) then showmessage(egv_subform.Name);\r\n{if (assigned(egv_subform2)) then showmessage(egv_subform2.Name);\r\nif (assigned(egv_subform3)) then showmessage(egv_subform3.Name);\r\nif (assigned(egv_subform4)) then showmessage(egv_subform3.Name);\r\nif (assigned(egv_subform5)) then showmessage(egv_subform5.Name); }\r\n\r\n if (not assigned(egv_subform)) or ( assigned(egv_subform) and (not egv_subform.visible)) then begin result := 1; exit; end;\r\n if (not assigned(egv_subform2)) or ( assigned(egv_subform2) and (not egv_subform2.visible)) then begin result := 2; exit; end;\r\n if (not assigned(egv_subform3)) or ( assigned(egv_subform3) and (not egv_subform3.visible)) then begin result := 3; exit; end;\r\n if (not assigned(egv_subform4)) or ( assigned(egv_subform4) and (not egv_subform4.visible)) then begin result := 4; exit; end;\r\n if (not assigned(egv_subform5)) or ( assigned(egv_subform5) and (not egv_subform5.visible)) then begin result := 5; exit; end;\r\n if (not assigned(egv_subform6)) or ( assigned(egv_subform6) and (not egv_subform6.visible)) then begin result := 6; exit; end;\r\n if (not assigned(egv_subform7)) or ( assigned(egv_subform7) and (not egv_subform7.visible)) then begin result := 7; exit; end;\r\n if (not assigned(egv_subform8)) or ( assigned(egv_subform8) and (not egv_subform8.visible)) then begin result := 8; exit; end;\r\n if (not assigned(egv_subform9)) or ( assigned(egv_subform9) and (not egv_subform9.visible)) then begin result := 9; exit; end;\r\nend;\r\n\r\nfunction HideFormContainer(ReleasePointer: Boolean=false): THTMLDiv;\r\nbegin\r\n//if frmmain.btnSwitch_Design.state = ssON\r\n//then begin\r\n//12345 2024.04.08 frmmain.btnSwitch_Design.state := ssOff;\r\n// if dm.EGV_LOCALSTORAGE.Values['EGV_AUTOSAVEDESIGNDATA'] = '1' then LS_Save;\r\n// end;\r\n\r\nfrmmain.wbBrowser.visible := false;\r\n\r\n//showmessage(egv_subform4.name);\r\n//showmessage(egv_subform3.name);\r\n// ReleasePointer - true means hide container and release the subform. false - just hide the container( used when opening next level form. to be able to come back to the calling form).\r\nwith frmmain\r\ndo begin\r\n if FormContainer9.visible then begin FormContainer9.visible := false; if ReleasePointer then egv_subform9 := nil; FormContainer8.visible := true; result := FormContainer8; exit; end;\r\n if FormContainer8.visible then begin FormContainer8.visible := false; if ReleasePointer then egv_subform8 := nil; FormContainer7.visible := true; result := FormContainer7; exit; end;\r\n if FormContainer7.visible then begin FormContainer7.visible := false; if ReleasePointer then egv_subform7 := nil; FormContainer6.visible := true; result := FormContainer6; exit; end;\r\n if FormContainer6.visible then begin FormContainer6.visible := false; if ReleasePointer then egv_subform6 := nil; FormContainer5.visible := true; result := FormContainer5; exit; end;\r\n if FormContainer5.visible then begin FormContainer5.visible := false; if ReleasePointer then egv_subform5 := nil; FormContainer4.visible := true; result := FormContainer4; exit; end;\r\n if FormContainer4.visible then begin FormContainer4.visible := false; if ReleasePointer then egv_subform4 := nil; FormContainer3.visible := true; result := FormContainer3; exit; end;\r\n if FormContainer3.visible then begin FormContainer3.visible := false; if ReleasePointer then egv_subform3 := nil; FormContainer2.visible := true; result := FormContainer2; exit; end;\r\n if FormContainer2.visible then begin FormContainer2.visible := false; if ReleasePointer then egv_subform2 := nil; FormContainer1.visible := true; result := FormContainer1; exit; end;\r\n if FormContainer1.visible then begin FormContainer1.visible := false; if ReleasePointer then egv_subform := nil; result := FormContainer1; exit; end;\r\n end;\r\nend;\r\n\r\nprocedure ReleaseSubForms(releaseall: boolean; level_p: integer=0);\r\nbegin\r\nif releaseall\r\nthen begin\r\n if assigned(egv_subform9) and (level_p < 9) then begin if egv_subform9.visible then egv_subform9.close; egv_subform9 := nil; end;\r\n if assigned(egv_subform8) and (level_p < 8) then begin if egv_subform8.visible then egv_subform8.close; egv_subform8 := nil; end;\r\n if assigned(egv_subform7) and (level_p < 7) then begin if egv_subform7.visible then egv_subform7.close; egv_subform7 := nil; end;\r\n if assigned(egv_subform6) and (level_p < 6) then begin if egv_subform6.visible then egv_subform6.close; egv_subform6 := nil; end;\r\n if assigned(egv_subform5) and (level_p < 5) then begin if egv_subform5.visible then egv_subform5.close; egv_subform5 := nil; end;\r\n if assigned(egv_subform4) and (level_p < 4) then begin if egv_subform4.visible then egv_subform4.close; egv_subform4 := nil; end;\r\n if assigned(egv_subform3) and (level_p < 3) then begin if egv_subform3.visible then egv_subform3.close; egv_subform3 := nil; end;\r\n if assigned(egv_subform2) and (level_p < 2) then begin if egv_subform2.visible then egv_subform2.close; egv_subform2 := nil; end;\r\n if assigned(egv_subform) and (level_p < 1) then begin if egv_subform.visible then egv_subform.close; egv_subform := nil; end;\r\n end\r\nelse begin\r\n if assigned(egv_subform9) then begin if egv_subform9.visible then egv_subform9.close; egv_subform9 := nil; if not releaseall then exit; end;\r\n if assigned(egv_subform8) then begin if egv_subform8.visible then egv_subform8.close; egv_subform8 := nil; if not releaseall then exit; end;\r\n if assigned(egv_subform7) then begin if egv_subform7.visible then egv_subform7.close; egv_subform7 := nil; if not releaseall then exit; end;\r\n if assigned(egv_subform6) then begin if egv_subform6.visible then egv_subform6.close; egv_subform6 := nil; if not releaseall then exit; end;\r\n if assigned(egv_subform5) then begin if egv_subform5.visible then egv_subform5.close; egv_subform5 := nil; if not releaseall then exit; end;\r\n if assigned(egv_subform4) then begin if egv_subform4.visible then egv_subform4.close; egv_subform4 := nil; if not releaseall then exit; end;\r\n if assigned(egv_subform3) then begin if egv_subform3.visible then egv_subform3.close; egv_subform3 := nil; if not releaseall then exit; end;\r\n if assigned(egv_subform2) then begin if egv_subform2.visible then egv_subform2.close; egv_subform2 := nil; if not releaseall then exit; end;\r\n if assigned(egv_subform) then begin if egv_subform.visible then egv_subform.close; egv_subform := nil; if not releaseall then exit; end;\r\n end;\r\nend;\r\n\r\n\r\nfunction InsertKeyValues(SQL_p: string; quotestring_p: Boolean=true): string;\r\nvar formatSettings : TFormatSettings; Y,M,D,H,MN,SC,MS: word; i: integer;\r\nbegin\r\n\r\n//GetLocaleFormatSettings(LOCALE_SYSTEM_DEFAULT, formatSettings);\r\nDecodeDate(date,Y,M,D);\r\nDecodeTime(time,H,MN,SC,MS);\r\nELV_RANDOMSTR := inttostr(Y)+inttostr(M)+inttostr(D)+inttostr(H)+inttostr(MN)+inttostr(SC)+inttostr(MS);\r\n\r\nSQL_p := stringreplace(SQL_p, 'EGV_DBSERVICEURL', EGV_DBSERVICEURL, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_DBSERVER', EGV_DBSERVER, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_FACILITYDBUSER', EGV_FACILITYDBUSER, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_FACILITYDBPASSWORD', EGV_FACILITYDBPASSWORD, [rfReplaceAll, rfIgnoreCase]);\r\n\r\n\r\nSQL_p := stringreplace(SQL_p, 'ELV_RANDOMSTR', ELV_RANDOMSTR, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_FACILITYID', egv_FACILITYID, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_FACILITYCODE', EGV_FACILITYCODE, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_FACILITYDBNAME', EGV_FACILITYDBNAME, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_FACILITYTOKEN', EGV_FACILITYTOKEN, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_FACILITY', egv_FACILITY, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_SETUPFACILITYID', EGV_SETUPFACILITYID, [rfReplaceAll, rfIgnoreCase]);\r\n\r\n\r\nSQL_p := stringreplace(SQL_p, 'EGV_SERVERBASEURL', EGV_SERVERBASEURL, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_IMAGESURL', EGV_IMAGESURL, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_REPORTSURL', EGV_REPORTSURL, [rfReplaceAll, rfIgnoreCase]);\r\n\r\nSQL_p := stringreplace(SQL_p, 'EGV_USERID', EGV_USERID, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_USERNAME', EGV_USERNAME, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_USERFULLNAME', EGV_USERFULLNAME, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_USERROLE', EGV_USERROLE, [rfReplaceAll, rfIgnoreCase]);\r\n\r\nSQL_p := stringreplace(SQL_p, 'EGV_CURRENT_MRN', egv_CURRENT_MRN, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_CURRENT_PATIENTNAME', EGV_CURRENT_PATIENTNAME, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_CURRENT_PATIENTDOB', EGV_CURRENT_PATIENTDOB, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_PATIENTFHIRID', EGV_PATIENTFHIRID, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'ELV_PATIENTCERNERID', ELV_PATIENTCERNERID, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_CURRENT_APPTDATE', egv_CURRENT_APPTDATE, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_CURRENT_PROCEDURENUMBER', egv_CURRENT_PROCEDURENUMBER, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_CURRENT_PROVIDER', EGV_CURRENT_PROVIDER, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_CURRENT_NURSE1', EGV_CURRENT_NURSE1, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_CURRENT_NURSE2', EGV_CURRENT_NURSE2, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_CURRENT_APPTNAME', EGV_CURRENT_APPTNAME, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_CURRENT_APPTTYPE', EGV_CURRENT_APPTTYPE, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_STARTDATE', EGV_STARTDATE, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_ENDDATE', EGV_ENDDATE, [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_CURRENTMEDID', EGV_ENDDATE, [rfReplaceAll, rfIgnoreCase]);\r\n\r\nSQL_p := stringreplace(SQL_p, 'EGV_CURRENTDATE', formatdatetime('c', date), [rfReplaceAll, rfIgnoreCase]);\r\nSQL_p := stringreplace(SQL_p, 'EGV_CURRENTTIME', formatdatetime('t', time), [rfReplaceAll, rfIgnoreCase]);\r\n\r\n// Replace block data tags\r\nif GetCurrentFormDiv <> nil\r\nthen begin\r\n SQL_p := ReplaceddataBlockLinks(SQL_p, GetCurrentFormDiv);\r\n //showmessage(sql_p);\r\n end;\r\nResult := SQL_p;\r\nend;\r\n\r\nprocedure SetKeyVariablesFromDataSet(dataset: TDataset; mode: Boolean=false);\r\nvar columns_p: string; i, j: integer;\r\nbegin\r\n// mode = true - clear variables, mode = false - do not clear;\r\n// showmessage('set key variable from dataset - ' + dataset.name);\r\n//if pos('Original.', dataset.fields[0].name) <> 0 then exit;\r\nif dataset = nil then exit;\r\nif not dataset.active then exit;\r\nif GetCurrentForm = nil\r\nthen begin\r\n EGV_CURRENT_MRN := '';\r\n EGV_CURRENT_PATIENTNAME := '';\r\n EGV_CURRENT_PATIENTDOB := '';\r\n EGV_PATIENTFHIRID := '';\r\n ELV_PATIENTCERNERID := '';\r\n EGV_CURRENT_APPTNAME := '';\r\n EGV_CURRENT_PROCEDURENUMBER := '';\r\n EGV_CURRENT_PROVIDER := '';\r\n EGV_CURRENT_NURSE1 := '';\r\n EGV_CURRENT_NURSE2 := '';\r\n EGV_CURRENT_APPTNAME := '';\r\n EGV_CURRENT_APPTTYPE := '';\r\n EGV_CURRENT_MEDID := '';\r\n EGV_CURRENT_PROBLEMID := '';\r\n EGV_CURRENT_REFPHYCODE := '';\r\n EGV_CURRENT_ALLERGYID := '';\r\n EGV_CURRENT_PROCIMAGECOUNT := '';\r\n EGV_SETUPFACILITYID := '';\r\n EGV_USERID := '';\r\n exit;\r\n end;\r\n\r\nmode := true;\r\nfor i := 0 to getcurrentform.ComponentCount - 1\r\ndo if (getcurrentform.Components[i] is TDBGrid) and\r\n ((getcurrentform.Components[i] as TDBGrid).datasource <> nil) and\r\n ((getcurrentform.Components[i] as TDBGrid).datasource.dataset <> nil) and\r\n ((getcurrentform.Components[i] as TDBGrid).datasource.dataset.name = dataset.name)\r\n then begin\r\n for j := 0 to (getcurrentform.Components[i] as TDBGrid).Columns.Count - 1\r\n do columns_p := columns_p + '*' + (getcurrentform.Components[i] as TDBGrid).Columns[j].DataField;\r\n //columns_p := dm.egv_localstorage.values[(getcurrentform.Components[i] as TWebDBGrid).name + '_COLUMNS_' + getcurrentformname];\r\n break;\r\n end;\r\n//showmessage(columns_p);\r\nif pos('_CURRENT_MRN', columns_p) > 0\r\nthen if (dataset.findfield('_CURRENT_MRN') <> nil)\r\nthen if dataset.IsEmpty then egv_current_mrn := ''\r\n else egv_current_mrn := dataset.fieldbyname('_CURRENT_MRN').asstring;\r\nif pos('_CURRENT_PATIENTNAME', columns_p) > 0\r\nthen if (dataset.findfield('_CURRENT_PATIENTNAME') <> nil)\r\nthen if dataset.IsEmpty then EGV_CURRENT_PATIENTNAME := ''\r\n else EGV_CURRENT_PATIENTNAME := dataset.fieldbyname('_CURRENT_PATIENTNAME').asstring;\r\nif pos('_CURRENT_PATIENTDOB', columns_p) > 0\r\nthen if (dataset.findfield('_CURRENT_PATIENTDOB') <> nil)\r\nthen if dataset.IsEmpty then EGV_CURRENT_PATIENTDOB := ''\r\n else EGV_CURRENT_PATIENTDOB := dataset.fieldbyname('_CURRENT_PATIENTDOB').asstring;\r\nif pos('_PATIENTFHIRID', columns_p) > 0\r\nthen if (dataset.findfield('_PATIENTFHIRID') <> nil)\r\nthen if dataset.IsEmpty then EGV_PATIENTFHIRID := ''\r\n else EGV_PATIENTFHIRID := dataset.fieldbyname('_PATIENTFHIRID').asstring;\r\nif pos('_PATIENTCERNERID', columns_p) > 0\r\nthen if (dataset.findfield('_PATIENTCERNERID') <> nil)\r\nthen if dataset.IsEmpty then ELV_PATIENTCERNERID := ''\r\n else ELV_PATIENTCERNERID := dataset.fieldbyname('_PATIENTCERNERID').asstring;\r\nif pos('_CURRENT_APPTDATE', columns_p) > 0\r\nthen if (dataset.findfield('_CURRENT_APPTDATE') <> nil)\r\nthen if dataset.IsEmpty then egv_current_apptname := ''\r\n else egv_current_apptname := dataset.fieldbyname('_CURRENT_APPTDATE').asstring;\r\nif pos('_CURRENT_PROCEDURENUMBER', columns_p) > 0\r\nthen if (dataset.findfield('_CURRENT_PROCEDURENUMBER') <> nil)\r\n then begin\r\n if dataset.IsEmpty then EGV_CURRENT_PROCEDURENUMBER:= '0'\r\n else EGV_CURRENT_PROCEDURENUMBER := dataset.fieldbyname('_CURRENT_PROCEDURENUMBER').asstring;\r\n // showmessage(EGV_CURRENT_PROCEDURENUMBER);\r\n end;\r\n\r\nif pos('_SETUPFACILITYID', columns_p) > 0\r\nthen if (dataset.findfield('_SETUPFACILITYID') <> nil)\r\nthen if dataset.IsEmpty then EGV_SETUPFACILITYID := ''\r\n else EGV_SETUPFACILITYID := dataset.fieldbyname('_SETUPFACILITYID').asstring;\r\nif pos('_USERID', columns_p) > 0\r\nthen if (dataset.findfield('_USERID') <> nil)\r\nthen if dataset.IsEmpty then EGV_USERID := ''\r\n else EGV_USERID := dataset.fieldbyname('_USERID').asstring;\r\nif pos('_CURRENT_PROVIDER', columns_p) > 0\r\nthen if (dataset.findfield('_CURRENT_PROVIDER') <> nil)\r\nthen if dataset.IsEmpty then egv_current_provider := ''\r\n else egv_current_provider := dataset.fieldbyname('_CURRENT_PROVIDER').asstring;\r\nif pos('_CURRENT_NURSE1', columns_p) > 0\r\nthen if (dataset.findfield('_CURRENT_NURSE1') <> nil)\r\nthen if dataset.IsEmpty then egv_current_nurse1 := ''\r\n else egv_current_nurse1 := dataset.fieldbyname('_CURRENT_NURSE1').asstring;\r\nif pos('_CURRENT_NURSE2', columns_p) > 0\r\nthen if (dataset.findfield('_CURRENT_NURSE2') <> nil)\r\nthen if dataset.IsEmpty then egv_current_nurse2 := ''\r\n else egv_current_nurse2 := dataset.fieldbyname('_CURRENT_NURSE2').asstring;\r\nif pos('_CURRENT_APPTNAME', columns_p) > 0\r\nthen if (dataset.findfield('_CURRENT_APPTNAME') <> nil)\r\nthen if dataset.IsEmpty then egv_current_apptname := ''\r\n else egv_current_apptname := dataset.fieldbyname('_CURRENT_APPTNAME').asstring;\r\nif pos('_CURRENT_APPTTYPE', columns_p) > 0\r\nthen if (dataset.findfield('_CURRENT_APPTTYPE') <> nil)\r\nthen if dataset.IsEmpty then egv_current_appttype := ''\r\n else egv_current_appttype := dataset.fieldbyname('_CURRENT_APPTTYPE').asstring;\r\nif pos('_CURRENT_MEDID', columns_p) > 0\r\nthen if (dataset.findfield('_CURRENT_MEDID') <> nil)\r\nthen if dataset.IsEmpty then egv_current_medid := '0'\r\n else egv_current_medid := dataset.fieldbyname('_CURRENT_MEDID').asstring;\r\nif pos('_CURRENT_PROBLEMID', columns_p) > 0\r\nthen if (dataset.findfield('_CURRENT_PROBLEMID') <> nil)\r\nthen if dataset.IsEmpty then EGV_CURRENT_PROBLEMID := '0'\r\n else EGV_CURRENT_PROBLEMID := dataset.fieldbyname('_CURRENT_PROBLEMID').asstring;\r\nif pos('_CURRENT_REFPHYCODE', columns_p) > 0\r\nthen if (dataset.findfield('_CURRENT_REFPHYCODE') <> nil)\r\nthen if dataset.IsEmpty then EGV_CURRENT_REFPHYCODE := ''\r\n else EGV_CURRENT_REFPHYCODE := dataset.fieldbyname('_CURRENT_REFPHYCODE').asstring;\r\nif pos('_CURRENT_ALLERGYID', columns_p) > 0\r\nthen if (dataset.findfield('_CURRENT_ALLERGYID') <> nil)\r\nthen if dataset.IsEmpty then EGV_CURRENT_ALLERGYID := '0'\r\n else EGV_CURRENT_ALLERGYID := dataset.fieldbyname('_CURRENT_ALLERGYID').asstring;\r\nif pos('_CURRENT_PROCIMAGECOUNT', columns_p) > 0\r\nthen if (dataset.findfield('_CURRENT_PROCIMAGECOUNT') <> nil)\r\nthen if dataset.IsEmpty then EGV_CURRENT_PROCIMAGECOUNT := '0'\r\n else EGV_CURRENT_PROCIMAGECOUNT := dataset.fieldbyname('_CURRENT_PROCIMAGECOUNT').asstring;\r\n\r\nif uppercase(EGV_CURRENT_MRN ) = 'UNKNOWN' then EGV_CURRENT_MRN := '';\r\nif uppercase(EGV_CURRENT_PATIENTNAME ) = 'UNKNOWN' then EGV_CURRENT_PATIENTNAME := '';\r\nif uppercase(EGV_CURRENT_PATIENTDOB ) = 'UNKNOWN' then EGV_CURRENT_PATIENTDOB := '';\r\nif uppercase(EGV_PATIENTFHIRID ) = 'UNKNOWN' then EGV_PATIENTFHIRID := '';\r\nif uppercase(ELV_PATIENTCERNERID ) = 'UNKNOWN' then ELV_PATIENTCERNERID := '';\r\nif uppercase(EGV_CURRENT_APPTNAME ) = 'UNKNOWN' then EGV_CURRENT_APPTNAME := '';\r\nif uppercase(EGV_CURRENT_PROCEDURENUMBER ) = 'UNKNOWN' then EGV_CURRENT_PROCEDURENUMBER := '';\r\nif uppercase(EGV_CURRENT_PROVIDER ) = 'UNKNOWN' then EGV_CURRENT_PROVIDER := '';\r\nif uppercase(EGV_CURRENT_NURSE1 ) = 'UNKNOWN' then EGV_CURRENT_NURSE1 := '';\r\nif uppercase(EGV_CURRENT_NURSE2 ) = 'UNKNOWN' then EGV_CURRENT_NURSE2 := '';\r\nif uppercase(EGV_CURRENT_APPTNAME ) = 'UNKNOWN' then EGV_CURRENT_APPTNAME := '';\r\nif uppercase(EGV_CURRENT_APPTTYPE ) = 'UNKNOWN' then EGV_CURRENT_APPTTYPE := '';\r\nif uppercase(EGV_CURRENT_MEDID ) = 'UNKNOWN' then EGV_CURRENT_MEDID := '';\r\nif uppercase(EGV_CURRENT_PROBLEMID ) = 'UNKNOWN' then EGV_CURRENT_PROBLEMID := '';\r\nif uppercase(EGV_CURRENT_REFPHYCODE ) = 'UNKNOWN' then EGV_CURRENT_REFPHYCODE := '';\r\nif uppercase(EGV_CURRENT_ALLERGYID ) = 'UNKNOWN' then EGV_CURRENT_ALLERGYID := '';\r\nif uppercase(EGV_CURRENT_PROCIMAGECOUNT ) = 'UNKNOWN' then EGV_CURRENT_PROCIMAGECOUNT := '';\r\n\r\nif uppercase(EGV_CURRENT_PROCEDURENUMBER ) = '' then EGV_CURRENT_PROCEDURENUMBER := '0';\r\nif uppercase(EGV_CURRENT_MEDID ) = '' then EGV_CURRENT_MEDID := '0';\r\nif uppercase(EGV_CURRENT_PROBLEMID ) = '' then EGV_CURRENT_PROBLEMID := '0';\r\nif uppercase(EGV_CURRENT_ALLERGYID ) = '' then EGV_CURRENT_ALLERGYID := '0';\r\nif uppercase(EGV_CURRENT_PROCIMAGECOUNT ) = '' then EGV_CURRENT_PROCIMAGECOUNT := '0';\r\nif uppercase(EGV_SETUPFACILITYID ) = '' then EGV_SETUPFACILITYID := '0';\r\nif uppercase(EGV_USERID ) = '' then EGV_USERID := '0';\r\nend;\r\n\r\nprocedure SaveKeyVariables();\r\nbegin\r\ndm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_MRN'] := egv_current_mrn;\r\ndm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_PATIENTNAME'] := EGV_CURRENT_PATIENTNAME;\r\ndm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_PATIENTDOB'] := EGV_CURRENT_PATIENTDOB;\r\ndm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_PATIENTFHIRID'] := EGV_PATIENTFHIRID;\r\ndm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'ELV_PATIENTCERNERID'] := ELV_PATIENTCERNERID;\r\ndm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_APPTNAME'] := egv_current_apptdate;\r\ndm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_PROCEDURENUMBER'] := EGV_CURRENT_PROCEDURENUMBER;\r\ndm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_PROVIDER'] := egv_current_provider;\r\ndm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_NURSE1'] := egv_current_nurse1;\r\ndm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_NURSE2'] := egv_current_nurse2;\r\ndm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_APPTNAME'] := egv_current_apptname;\r\ndm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_APPTTYPE'] := egv_current_appttype;\r\ndm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_MEDID'] := egv_current_medid;\r\ndm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_PROBLEMID'] := EGV_CURRENT_PROBLEMID;\r\ndm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_REFPHYCODE'] := EGV_CURRENT_REFPHYCODE;\r\ndm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_ALLERGYID'] := EGV_CURRENT_ALLERGYID;\r\ndm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_PROCIMAGECOUNT'] := EGV_CURRENT_PROCIMAGECOUNT;\r\ndm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_SETUPFACILITYID'] := EGV_SETUPFACILITYID;\r\ndm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_USERID'] := EGV_SETUPFACILITYID;\r\nend;\r\n\r\nfunction IsSystemKeysChanged(): Boolean;\r\nbegin\r\nresult :=\r\n(\r\n(dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_MRN'] <> egv_current_mrn) or\r\n(dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_PATIENTNAME'] <> egv_current_patientname) or\r\n(dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_PATIENTDOB'] <> egv_current_patientdob) or\r\n(dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_PATIENTFHIRID'] <> EGV_PATIENTFHIRID) or\r\n(dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'ELV_PATIENTCERNERID'] <> ELV_PATIENTCERNERID) or\r\n(dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_APPTDATE'] <> egv_current_apptdate) or\r\n(dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_PROCEDURENUMBER']<> EGV_CURRENT_PROCEDURENUMBER) or\r\n(dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_PROVIDER'] <> egv_current_provider) or\r\n(dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_NURSE1'] <> egv_current_nurse1) or\r\n(dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_NURSE2'] <> egv_current_nurse2) or\r\n(dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_APPTNAME'] <> egv_current_apptname) or\r\n(dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_APPTTYPE'] <> egv_current_appttype) or\r\n(dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_MEDID'] <> egv_current_medid) or\r\n(dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_PROBLEMID'] <> EGV_CURRENT_PROBLEMID) or\r\n(dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_REFPHYCODE'] <> EGV_CURRENT_REFPHYCODE) or\r\n(dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_ALLERGYID'] <> EGV_CURRENT_ALLERGYID) or\r\n(dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_PROCIMAGECOUNT'] <> EGV_CURRENT_PROCIMAGECOUNT) or\r\n(dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_USERID'] <> EGV_USERID) or\r\n(dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_SETUPFACILITYID'] <> EGV_SETUPFACILITYID)\r\n);\r\nend;\r\n\r\nprocedure RestoreKeyVariables();\r\nbegin\r\n egv_current_mrn := dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_MRN'];\r\n EGV_CURRENT_PATIENTNAME := dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_PATIENTNAME'];\r\n EGV_CURRENT_PATIENTDOB := dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_PATIENTDOB'];\r\n EGV_PATIENTFHIRID := dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_PATIENTFHIRID'];\r\n ELV_PATIENTCERNERID := dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'ELV_PATIENTCERNERID'];\r\n egv_current_apptdate := dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_APPTDATE'];\r\n EGV_CURRENT_PROCEDURENUMBER := dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_PROCEDURENUMBER'];\r\n egv_current_provider := dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_PROVIDER'];\r\n egv_current_nurse1 := dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_NURSE1'];\r\n egv_current_nurse2 := dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_NURSE2'];\r\n egv_current_apptname := dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_APPTNAME'];\r\n egv_current_appttype := dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_APPTTYPE'];\r\n egv_current_medid := dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_MEDID'];\r\n EGV_CURRENT_PROBLEMID := dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_PROBLEMID'];\r\n EGV_CURRENT_REFPHYCODE := dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_REFPHYCODE'];\r\n EGV_CURRENT_ALLERGYID := dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_ALLERGYID'];\r\n EGV_CURRENT_PROCIMAGECOUNT := dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_CURRENT_PROCIMAGECOUNT'];\r\n EGV_SETUPFACILITYID := dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_SETUPFACILITYID'];\r\n EGV_SETUPFACILITYID := dm.EGV_LOCALSTORAGE.values[getcurrentformname + '_' + 'EGV_USERID'];\r\nend;\r\n\r\nfunction FindParentForm(control_p: TControl): TForm;\r\nvar c2: TControl;\r\nbegin\r\n// try\r\nc2 := control_p;\r\nwhile not (c2.parent is TForm)\r\ndo c2 := c2.parent;\r\nresult := (c2.parent as Tform);\r\n//except\r\n//result := getcurrentform();\r\n// end;\r\n//showmessage(result.name);\r\nend;\r\n\r\nfunction GetDesignArea(control_p: TControl): TScrollBox;\r\nvar c2: TControl;\r\nbegin\r\nc2 := control_p;\r\nwhile not (c2.parent is TScrollBox)\r\ndo c2 := c2.parent;\r\nresult := (c2.parent as TScrollBox);\r\nend;\r\n\r\n\r\n\r\nprocedure CallFormPrepare(containername_p: string; tag_p: integer = 0; APIcall_p: string=''; callfrommainmenu_p: boolean=false);\r\nvar i: integer; s1,s2,s3,s4,s5,s6,s7,s8,s9: string;\r\n\r\n procedure OnResult_API(Response: TXDataClientResponse);\r\n var Response_p: string;\r\n begin\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n //showmessage('1'); //'Response_p');\r\n CallForm(containername_p, tag_p, callfrommainmenu_p);\r\n end;\r\n\r\n procedure OnResult_SQL(Response: TXDataClientResponse);\r\n var Response_p, Value_p: string;\r\n begin\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n //Showmessage(response_p);\r\n if pos(']', response_p) > 0 then Value_p := copy(response_p, pos(']', Response_p) + 1, 1024);\r\n\r\n if pos('[_CURRENT_MRN]' , Response_p) > 0 then EGV_CURRENT_MRN := value_p;\r\n if pos('[_CURRENT_PATIENTNAME]' , Response_p) > 0 then EGV_CURRENT_PATIENTNAME := value_p;\r\n if pos('[_CURRENT_PATIENTDOB]' , Response_p) > 0 then EGV_CURRENT_PATIENTDOB := value_p;\r\n if pos('[_PATIENTFHIRID]' , Response_p) > 0 then EGV_PATIENTFHIRID := value_p;\r\n if pos('[_PATIENTCERNERID]' , Response_p) > 0 then ELV_PATIENTCERNERID := value_p;\r\n if pos('[_CURRENT_APPTNAME]' , Response_p) > 0 then EGV_CURRENT_APPTNAME := value_p;\r\n if pos('[_CURRENT_PROCEDURENUMBER]', Response_p) > 0 then EGV_CURRENT_PROCEDURENUMBER := value_p;\r\n if pos('[_CURRENTt_PROVIDER]' , Response_p) > 0 then EGV_CURRENT_PROVIDER := value_p;\r\n if pos('[_CURRENT_NURSE1]' , Response_p) > 0 then EGV_CURRENT_NURSE1 := value_p;\r\n if pos('[_CURRENT_NURSE2]' , Response_p) > 0 then EGV_CURRENT_NURSE2 := value_p;\r\n if pos('[_CURRENT_APPTNAME]' , Response_p) > 0 then EGV_CURRENT_APPTNAME := value_p;\r\n if pos('[_CURRENT_APPTTYPE]' , Response_p) > 0 then EGV_CURRENT_APPTTYPE := value_p;\r\n if pos('[_CURRENT_MEDID]' , Response_p) > 0 then EGV_CURRENT_MEDID := value_p;\r\n if pos('[_CURRENT_PROBLEMID]' , Response_p) > 0 then EGV_CURRENT_PROBLEMID := value_p;\r\n if pos('[_CURRENT_REFPHYCODE]' , Response_p) > 0 then EGV_CURRENT_REFPHYCODE := value_p;\r\n if pos('[_CURRENT_ALLERGYID]' , Response_p) > 0 then EGV_CURRENT_ALLERGYID := value_p;\r\n if pos('[_CURRENT_PROCIMAGECOUNT]' , Response_p) > 0 then EGV_CURRENT_PROCIMAGECOUNT := value_p;\r\n if pos('[_SETUPFACILITYID]' , Response_p) > 0 then EGV_SETUPFACILITYID := value_p;\r\n if pos('[_USERID]' , Response_p) > 0 then EGV_USERID := value_p;\r\n //showmessage('1'); //'Response_p');\r\n CallForm(containername_p, tag_p, callfrommainmenu_p);\r\n end;\r\n\r\nbegin\r\n // if callfrommainmenu_p then showmessage('1');\r\nif uppercase(APIcall_p) = 'ARGUS' then begin CallArgus; exit; end;\r\n\r\nif not frmmain.wmWaitMessage.showing then begin frmmain.wmWaitMessage.tag := 0; frmmain.wmWaitMessage.show; end;\r\n//dm.XDataWebClient1.RawInvoke('IReportService.GetImages',[egv_facilityid, egv_current_procedurenumber, 'egv_current_mrn'], nil);\r\nAPIcall_p := trim(APIcall_p);\r\nif APIcall_p <> ''\r\nthen begin\r\n if pos('[API]', APIcall_p) = 1\r\n then begin\r\n APIcall_p := stringreplace(APIcall_p, '[API]','',[]);\r\n APIcall_p := InsertKeyValues(APIcall_p);\r\n // showmessage(APIcall_p);\r\n s1 := copy(APIcall_p, 1, pos('[', APIcall_p) - 1);\r\n s1 := stringreplace(s1,',','',[rfReplaceall]);\r\n //showmessage(s1);\r\n\r\n s2 := copy(APIcall_p, pos('[', APIcall_p), length(APIcall_p));\r\n s2 := stringreplace(s2,'[','',[rfreplaceall]);\r\n s2 := stringreplace(s2,']','',[rfreplaceall]);\r\n\r\n //showmessage(s2);\r\n\r\n for i := 0 to length(splitstring(s2,';')) - 1\r\n do begin\r\n if i = 0 then s3 := trim(splitstring(s2,';')[i]);\r\n if i = 1 then s4 := trim(splitstring(s2,';')[i]);\r\n if i = 2 then s5 := trim(splitstring(s2,';')[i]);\r\n if i = 3 then s6 := trim(splitstring(s2,';')[i]);\r\n if i = 4 then s7 := trim(splitstring(s2,';')[i]);\r\n if i = 5 then s8 := trim(splitstring(s2,';')[i]);\r\n if i = 6 then s9 := trim(splitstring(s2,';')[i]);\r\n end;\r\n\r\n //showmessage(s1 + ' -- ' + s3 + ' --- ' + s4 + ' --- ' + s5);\r\n //showmessage(inttostr(length(splitstring(s2,';'))));\r\n if length(splitstring(s2,';')) = 1 then dm.XDataWebClient1.RawInvoke(s1,[s3], @OnResult_API);\r\n if length(splitstring(s2,';')) = 2 then dm.XDataWebClient1.RawInvoke(s1,[s3,s4], @OnResult_API);\r\n if length(splitstring(s2,';')) = 3 then dm.XDataWebClient1.RawInvoke(s1,[s3,s4,s5], @OnResult_API);\r\n if length(splitstring(s2,';')) = 4 then dm.XDataWebClient1.RawInvoke(s1,[s3,s4,s5,s6], @OnResult_API);\r\n if length(splitstring(s2,';')) = 5 then dm.XDataWebClient1.RawInvoke(s1,[s3,s4,s5,s6,s7], @OnResult_API);\r\n if length(splitstring(s2,';')) = 6 then dm.XDataWebClient1.RawInvoke(s1,[s3,s4,s5,s6,s7,s8], @OnResult_API);\r\n if length(splitstring(s2,';')) = 7 then dm.XDataWebClient1.RawInvoke(s1,[s3,s4,s5,s6,s7,s8,s9], @OnResult_API);\r\n end\r\n else begin\r\n APIcall_p := InsertKeyValues(APIcall_p);\r\n APIcall_p := 'declare @Result varchar(1024); ' + chr(13) +\r\n 'set @Result = ' + quotedstr('') + ';' + chr(13) +\r\n APIcall_p + chr(13) +\r\n 'select @result; ';\r\n if dm.XDataWebConnection2.Connected\r\n then dm.XDataWebClient2.RawInvoke('IReportService.GetColumnData',[APIcall_p , egv_facilityid, '0'], @OnResult_SQL);\r\n\r\n end;\r\n end\r\nelse CallForm(containername_p, tag_p, callfrommainmenu_p);\r\nend;\r\n\r\nprocedure CallForm(containername_p: string; tag_p: integer = 0; callfrommainmenu_p: boolean=false);\r\n\r\n procedure OnCreate(AForm: TObject);\r\n begin\r\n // showmessage('form created. width = ' + inttostr((Aform as TWebForm).width) + 'form name: ' + (Aform as TWebForm).name);\r\n (Aform as TForm).Tag := tag_p;\r\n { if (Aform as TWebForm).FindComponent('pnlFormCaption') <> nil\r\n then ((Aform as TWebForm).FindComponent('pnlFormCaption') as TWebpanel).Visible := ( not callfrommainmenu_p ); }\r\n end;\r\nbegin\r\nfrmmain.wbBrowser.visible := false;\r\n\r\n//if frmmain.btnSwitch_Design.state = ssON\r\n//then begin\r\n frmmain.btnSwitch_Design.state := ssOff;\r\n// if dm.EGV_LOCALSTORAGE.Values['EGV_AUTOSAVEDESIGNDATA'] = '1' then LS_Save;\r\n// end;\r\n//showmessage('calling form: ' + EGV_CURRENTFORMNAME);\r\nEGV_CURRENTFORMNAME := InsertKeyValues(EGV_CURRENTFORMNAME, false);\r\n\r\n//Calling form\r\nif copy(uppercase(EGV_CURRENTFORMNAME),1,4) = 'UDF_' then begin\r\n // if EGV_CURRENTFORMNAME = '*** Custom form name ***'\r\n // then Application.CreateForm('***Cusrtom Form***', FormContainer1.ElementID, egv_subform);\r\n end;\r\n// Calling function\r\nif copy(uppercase(EGV_CURRENTFORMNAME),1,4) = 'UDC_' then begin\r\n // if EGV_CURRENTFORMNAME = '*** Function/procedure name ***'\r\n // then *** Function/procedure name ***\r\n end;\r\n//Custom forms\r\nif copy(uppercase(EGV_CURRENTFORMNAME),1,4) = 'UDF_'\r\nthen begin\r\n if uppercase(EGV_CURRENTFORMNAME) = 'UDF_QAI'\r\n then begin\r\n if containername_p = 'FormContainer1' then Application.CreateForm(Tfrmudf_QAI, frmmain.formcontainer1.ElementID, egv_subform);\r\n if containername_p = 'FormContainer2' then Application.CreateForm(Tfrmudf_QAI, frmmain.formcontainer2.ElementID, egv_subform2);\r\n if containername_p = 'FormContainer3' then Application.CreateForm(Tfrmudf_QAI, frmmain.formcontainer3.ElementID, egv_subform3);\r\n if containername_p = 'FormContainer4' then Application.CreateForm(Tfrmudf_QAI, frmmain.formcontainer4.ElementID, egv_subform4);\r\n if containername_p = 'FormContainer5' then Application.CreateForm(Tfrmudf_QAI, frmmain.formcontainer5.ElementID, egv_subform5);\r\n if containername_p = 'FormContainer6' then Application.CreateForm(Tfrmudf_QAI, frmmain.formcontainer6.ElementID, egv_subform6);\r\n if containername_p = 'FormContainer7' then Application.CreateForm(Tfrmudf_QAI, frmmain.formcontainer7.ElementID, egv_subform7);\r\n if containername_p = 'FormContainer8' then Application.CreateForm(Tfrmudf_QAI, frmmain.formcontainer8.ElementID, egv_subform8);\r\n if containername_p = 'FormContainer9' then Application.CreateForm(Tfrmudf_QAI, frmmain.formcontainer9.ElementID, egv_subform9);\r\n end;\r\n if uppercase(EGV_CURRENTFORMNAME) = 'UDF_SCHEDULE'\r\n then begin\r\n if containername_p = 'FormContainer1' then Application.CreateForm(Tfrmudf_schedule, frmmain.formcontainer1.ElementID, egv_subform);\r\n if containername_p = 'FormContainer2' then Application.CreateForm(Tfrmudf_schedule, frmmain.formcontainer2.ElementID, egv_subform2);\r\n if containername_p = 'FormContainer3' then Application.CreateForm(Tfrmudf_schedule, frmmain.formcontainer3.ElementID, egv_subform3);\r\n if containername_p = 'FormContainer4' then Application.CreateForm(Tfrmudf_schedule, frmmain.formcontainer4.ElementID, egv_subform4);\r\n if containername_p = 'FormContainer5' then Application.CreateForm(Tfrmudf_schedule, frmmain.formcontainer5.ElementID, egv_subform5);\r\n if containername_p = 'FormContainer6' then Application.CreateForm(Tfrmudf_schedule, frmmain.formcontainer6.ElementID, egv_subform6);\r\n if containername_p = 'FormContainer7' then Application.CreateForm(Tfrmudf_schedule, frmmain.formcontainer7.ElementID, egv_subform7);\r\n if containername_p = 'FormContainer8' then Application.CreateForm(Tfrmudf_schedule, frmmain.formcontainer8.ElementID, egv_subform8);\r\n if containername_p = 'FormContainer9' then Application.CreateForm(Tfrmudf_schedule, frmmain.formcontainer9.ElementID, egv_subform9);\r\n end;\r\n if uppercase(EGV_CURRENTFORMNAME) = 'UDF_IMAGEEDITOR'\r\n then begin\r\n // showmessage(containername_p);\r\n if containername_p = 'FormContainer1' then Application.CreateForm(Tfrmudf_ImageEditor, frmmain.formcontainer1.ElementID, egv_subform);\r\n if containername_p = 'FormContainer2' then Application.CreateForm(Tfrmudf_ImageEditor, frmmain.formcontainer2.ElementID, egv_subform2);\r\n if containername_p = 'FormContainer3' then Application.CreateForm(Tfrmudf_ImageEditor, frmmain.formcontainer3.ElementID, egv_subform3);\r\n if containername_p = 'FormContainer4' then Application.CreateForm(Tfrmudf_ImageEditor, frmmain.formcontainer4.ElementID, egv_subform4);\r\n if containername_p = 'FormContainer5' then Application.CreateForm(Tfrmudf_ImageEditor, frmmain.formcontainer5.ElementID, egv_subform5);\r\n if containername_p = 'FormContainer6' then Application.CreateForm(Tfrmudf_ImageEditor, frmmain.formcontainer6.ElementID, egv_subform6);\r\n if containername_p = 'FormContainer7' then Application.CreateForm(Tfrmudf_ImageEditor, frmmain.formcontainer7.ElementID, egv_subform7);\r\n if containername_p = 'FormContainer8' then Application.CreateForm(Tfrmudf_ImageEditor, frmmain.formcontainer8.ElementID, egv_subform8);\r\n if containername_p = 'FormContainer9' then Application.CreateForm(Tfrmudf_ImageEditor, frmmain.formcontainer9.ElementID, egv_subform9);\r\n\r\n { frmudf_ImageEditor:=Tfrmudf_ImageEditor.creat .Create(nil);\r\n frmudf_ImageEditor.Popup:=false;\r\n frmudf_ImageEditor.FormContainer := frmmain.formcontainer1.ElementID;\r\n window.location.hash:='frmudf_ImageEditor';\r\n frmudf_ImageEditor.Load(); }\r\n\r\n end;\r\n if uppercase(EGV_CURRENTFORMNAME) = 'UDF_IMAGECAPTURE'\r\n then begin\r\n // showmessage(containername_p);\r\n if containername_p = 'FormContainer1' then Application.CreateForm(Tfrmudf_ImageCapture, frmmain.formcontainer1.ElementID, egv_subform);\r\n if containername_p = 'FormContainer2' then Application.CreateForm(Tfrmudf_ImageCapture, frmmain.formcontainer2.ElementID, egv_subform2);\r\n if containername_p = 'FormContainer3' then Application.CreateForm(Tfrmudf_ImageCapture, frmmain.formcontainer3.ElementID, egv_subform3);\r\n if containername_p = 'FormContainer4' then Application.CreateForm(Tfrmudf_ImageCapture, frmmain.formcontainer4.ElementID, egv_subform4);\r\n if containername_p = 'FormContainer5' then Application.CreateForm(Tfrmudf_ImageCapture, frmmain.formcontainer5.ElementID, egv_subform5);\r\n if containername_p = 'FormContainer6' then Application.CreateForm(Tfrmudf_ImageCapture, frmmain.formcontainer6.ElementID, egv_subform6);\r\n if containername_p = 'FormContainer7' then Application.CreateForm(Tfrmudf_ImageCapture, frmmain.formcontainer7.ElementID, egv_subform7);\r\n if containername_p = 'FormContainer8' then Application.CreateForm(Tfrmudf_ImageCapture, frmmain.formcontainer8.ElementID, egv_subform8);\r\n if containername_p = 'FormContainer9' then Application.CreateForm(Tfrmudf_ImageCapture, frmmain.formcontainer9.ElementID, egv_subform9);\r\n\r\n end;\r\n if uppercase(EGV_CURRENTFORMNAME) = 'UDF_CUSTOMFORM'\r\n then begin\r\n if containername_p = 'FormContainer1' then Application.CreateForm(Tfrmudf_CustomForm, frmmain.formcontainer1.ElementID, egv_subform);\r\n if containername_p = 'FormContainer2' then Application.CreateForm(Tfrmudf_CustomForm, frmmain.formcontainer2.ElementID, egv_subform2);\r\n if containername_p = 'FormContainer3' then Application.CreateForm(Tfrmudf_CustomForm, frmmain.formcontainer3.ElementID, egv_subform3);\r\n if containername_p = 'FormContainer4' then Application.CreateForm(Tfrmudf_CustomForm, frmmain.formcontainer4.ElementID, egv_subform4);\r\n if containername_p = 'FormContainer5' then Application.CreateForm(Tfrmudf_CustomForm, frmmain.formcontainer5.ElementID, egv_subform5);\r\n if containername_p = 'FormContainer6' then Application.CreateForm(Tfrmudf_CustomForm, frmmain.formcontainer6.ElementID, egv_subform6);\r\n if containername_p = 'FormContainer7' then Application.CreateForm(Tfrmudf_CustomForm, frmmain.formcontainer7.ElementID, egv_subform7);\r\n if containername_p = 'FormContainer8' then Application.CreateForm(Tfrmudf_CustomForm, frmmain.formcontainer8.ElementID, egv_subform8);\r\n if containername_p = 'FormContainer9' then Application.CreateForm(Tfrmudf_CustomForm, frmmain.formcontainer9.ElementID, egv_subform9);\r\n end;\r\n\r\n if uppercase(EGV_CURRENTFORMNAME) = 'UDF_CERNERAPI'\r\n then begin\r\n if containername_p = 'FormContainer1' then Application.CreateForm(Tfrmudf_CernerAPI, frmmain.formcontainer1.ElementID, egv_subform);\r\n if containername_p = 'FormContainer2' then Application.CreateForm(Tfrmudf_CernerAPI, frmmain.formcontainer2.ElementID, egv_subform2);\r\n if containername_p = 'FormContainer3' then Application.CreateForm(Tfrmudf_CernerAPI, frmmain.formcontainer3.ElementID, egv_subform3);\r\n if containername_p = 'FormContainer4' then Application.CreateForm(Tfrmudf_CernerAPI, frmmain.formcontainer4.ElementID, egv_subform4);\r\n if containername_p = 'FormContainer5' then Application.CreateForm(Tfrmudf_CernerAPI, frmmain.formcontainer5.ElementID, egv_subform5);\r\n if containername_p = 'FormContainer6' then Application.CreateForm(Tfrmudf_CernerAPI, frmmain.formcontainer6.ElementID, egv_subform6);\r\n if containername_p = 'FormContainer7' then Application.CreateForm(Tfrmudf_CernerAPI, frmmain.formcontainer7.ElementID, egv_subform7);\r\n if containername_p = 'FormContainer8' then Application.CreateForm(Tfrmudf_CernerAPI, frmmain.formcontainer8.ElementID, egv_subform8);\r\n if containername_p = 'FormContainer9' then Application.CreateForm(Tfrmudf_CernerAPI, frmmain.formcontainer9.ElementID, egv_subform9);\r\n end;\r\n\r\n if uppercase(EGV_CURRENTFORMNAME) = 'UDF_PROCREPORT_EV'\r\n then begin\r\n if containername_p = 'FormContainer1' then Application.CreateForm(Tfrmudf_ProcReport_EV, frmmain.formcontainer1.ElementID, egv_subform);\r\n if containername_p = 'FormContainer2' then Application.CreateForm(Tfrmudf_ProcReport_EV, frmmain.formcontainer2.ElementID, egv_subform2);\r\n if containername_p = 'FormContainer3' then Application.CreateForm(Tfrmudf_ProcReport_EV, frmmain.formcontainer3.ElementID, egv_subform3);\r\n if containername_p = 'FormContainer4' then Application.CreateForm(Tfrmudf_ProcReport_EV, frmmain.formcontainer4.ElementID, egv_subform4);\r\n if containername_p = 'FormContainer5' then Application.CreateForm(Tfrmudf_ProcReport_EV, frmmain.formcontainer5.ElementID, egv_subform5);\r\n if containername_p = 'FormContainer6' then Application.CreateForm(Tfrmudf_ProcReport_EV, frmmain.formcontainer6.ElementID, egv_subform6);\r\n if containername_p = 'FormContainer7' then Application.CreateForm(Tfrmudf_ProcReport_EV, frmmain.formcontainer7.ElementID, egv_subform7);\r\n if containername_p = 'FormContainer8' then Application.CreateForm(Tfrmudf_ProcReport_EV, frmmain.formcontainer8.ElementID, egv_subform8);\r\n if containername_p = 'FormContainer9' then Application.CreateForm(Tfrmudf_ProcReport_EV, frmmain.formcontainer9.ElementID, egv_subform9);\r\n end;\r\n\r\n if uppercase(EGV_CURRENTFORMNAME) = 'UDF_PROCREPORT_Q'\r\n then begin\r\n if containername_p = 'FormContainer1' then Application.CreateForm(Tfrmudf_ProcReport_Q, frmmain.formcontainer1.ElementID, egv_subform);\r\n if containername_p = 'FormContainer2' then Application.CreateForm(Tfrmudf_ProcReport_Q, frmmain.formcontainer2.ElementID, egv_subform2);\r\n if containername_p = 'FormContainer3' then Application.CreateForm(Tfrmudf_ProcReport_Q, frmmain.formcontainer3.ElementID, egv_subform3);\r\n if containername_p = 'FormContainer4' then Application.CreateForm(Tfrmudf_ProcReport_Q, frmmain.formcontainer4.ElementID, egv_subform4);\r\n if containername_p = 'FormContainer5' then Application.CreateForm(Tfrmudf_ProcReport_Q, frmmain.formcontainer5.ElementID, egv_subform5);\r\n if containername_p = 'FormContainer6' then Application.CreateForm(Tfrmudf_ProcReport_Q, frmmain.formcontainer6.ElementID, egv_subform6);\r\n if containername_p = 'FormContainer7' then Application.CreateForm(Tfrmudf_ProcReport_Q, frmmain.formcontainer7.ElementID, egv_subform7);\r\n if containername_p = 'FormContainer8' then Application.CreateForm(Tfrmudf_ProcReport_Q, frmmain.formcontainer8.ElementID, egv_subform8);\r\n if containername_p = 'FormContainer9' then Application.CreateForm(Tfrmudf_ProcReport_Q, frmmain.formcontainer9.ElementID, egv_subform9);\r\n end;\r\n\r\n if uppercase(EGV_CURRENTFORMNAME) = 'UDF_CERNERPATIENTS'\r\n then begin\r\n if containername_p = 'FormContainer1' then Application.CreateForm(Tfrmudf_CernerPatients, frmmain.formcontainer1.ElementID, egv_subform);\r\n if containername_p = 'FormContainer2' then Application.CreateForm(Tfrmudf_CernerPatients, frmmain.formcontainer2.ElementID, egv_subform2);\r\n if containername_p = 'FormContainer3' then Application.CreateForm(Tfrmudf_CernerPatients, frmmain.formcontainer3.ElementID, egv_subform3);\r\n if containername_p = 'FormContainer4' then Application.CreateForm(Tfrmudf_CernerPatients, frmmain.formcontainer4.ElementID, egv_subform4);\r\n if containername_p = 'FormContainer5' then Application.CreateForm(Tfrmudf_CernerPatients, frmmain.formcontainer5.ElementID, egv_subform5);\r\n if containername_p = 'FormContainer6' then Application.CreateForm(Tfrmudf_CernerPatients, frmmain.formcontainer6.ElementID, egv_subform6);\r\n if containername_p = 'FormContainer7' then Application.CreateForm(Tfrmudf_CernerPatients, frmmain.formcontainer7.ElementID, egv_subform7);\r\n if containername_p = 'FormContainer8' then Application.CreateForm(Tfrmudf_CernerPatients, frmmain.formcontainer8.ElementID, egv_subform8);\r\n if containername_p = 'FormContainer9' then Application.CreateForm(Tfrmudf_CernerPatients, frmmain.formcontainer9.ElementID, egv_subform9);\r\n end;\r\n\r\n end;\r\n\r\n\r\n//Standart List form\r\nif copy(uppercase(EGV_CURRENTFORMNAME),1,2) = 'L_'\r\nthen begin\r\n //showmessage('block id on pickform call 3: ' + EGV_BLOCKUNIQUEID );\r\n if containername_p = 'FormContainer1' then Application.CreateForm(TfrmListForm_Base, frmmain.formcontainer1.ElementID, egv_subform , @Oncreate);\r\n if containername_p = 'FormContainer2' then Application.CreateForm(TfrmListForm_Base, frmmain.formcontainer2.ElementID, egv_subform2, @Oncreate);\r\n if containername_p = 'FormContainer3' then Application.CreateForm(TfrmListForm_Base, frmmain.formcontainer3.ElementID, egv_subform3, @Oncreate);\r\n if containername_p = 'FormContainer4' then Application.CreateForm(TfrmListForm_Base, frmmain.formcontainer4.ElementID, egv_subform4, @Oncreate);\r\n if containername_p = 'FormContainer5' then Application.CreateForm(TfrmListForm_Base, frmmain.formcontainer5.ElementID, egv_subform5, @Oncreate);\r\n if containername_p = 'FormContainer6' then Application.CreateForm(TfrmListForm_Base, frmmain.formcontainer6.ElementID, egv_subform6, @Oncreate);\r\n if containername_p = 'FormContainer7' then Application.CreateForm(TfrmListForm_Base, frmmain.formcontainer7.ElementID, egv_subform7, @Oncreate);\r\n if containername_p = 'FormContainer8' then Application.CreateForm(TfrmListForm_Base, frmmain.formcontainer8.ElementID, egv_subform8, @Oncreate);\r\n if containername_p = 'FormContainer9' then Application.CreateForm(TfrmListForm_Base, frmmain.formcontainer9.ElementID, egv_subform9, @Oncreate);\r\n end;\r\n\r\n//Standart Edit form\r\nif copy(uppercase(EGV_CURRENTFORMNAME),1,2) = 'E_'\r\nthen begin //showmessage(containername_p);\r\n //showmessage(inttostr(getsubform()));\r\n //showmessage('call edit form. proc# = ' + EGV_CURRENT_PROCEDURENUMBER);\r\n if containername_p = 'FormContainer1' then Application.CreateForm(TfrmEditForm_Base, frmmain.formcontainer1.ElementID, egv_subform , @Oncreate);\r\n if containername_p = 'FormContainer2' then Application.CreateForm(TfrmEditForm_Base, frmmain.formcontainer2.ElementID, egv_subform2, @Oncreate);\r\n if containername_p = 'FormContainer3' then Application.CreateForm(TfrmEditForm_Base, frmmain.formcontainer3.ElementID, egv_subform3, @Oncreate);\r\n if containername_p = 'FormContainer4' then Application.CreateForm(TfrmEditForm_Base, frmmain.formcontainer4.ElementID, egv_subform4, @Oncreate);\r\n if containername_p = 'FormContainer5' then Application.CreateForm(TfrmEditForm_Base, frmmain.formcontainer5.ElementID, egv_subform5, @Oncreate);\r\n if containername_p = 'FormContainer6' then Application.CreateForm(TfrmEditForm_Base, frmmain.formcontainer6.ElementID, egv_subform6, @Oncreate);\r\n if containername_p = 'FormContainer7' then Application.CreateForm(TfrmEditForm_Base, frmmain.formcontainer7.ElementID, egv_subform7, @Oncreate);\r\n if containername_p = 'FormContainer8' then Application.CreateForm(TfrmEditForm_Base, frmmain.formcontainer8.ElementID, egv_subform8, @Oncreate);\r\n if containername_p = 'FormContainer9' then Application.CreateForm(TfrmEditForm_Base, frmmain.formcontainer9.ElementID, egv_subform9, @Oncreate);\r\n end;\r\n\r\n//Form Reports\r\nif copy(uppercase(EGV_CURRENTFORMNAME),1,2) = 'R_'\r\nthen begin\r\n EGV_REPORTTEMPLATENAME := copy(EGV_CURRENTFORMNAME,3,length(EGV_CURRENTFORMNAME));\r\n if containername_p = 'FormContainer1' then Application.CreateForm(TfrmReportForm, frmmain.formcontainer1.ElementID, egv_subform);\r\n if containername_p = 'FormContainer2' then Application.CreateForm(TfrmReportForm, frmmain.formcontainer2.ElementID, egv_subform2);\r\n if containername_p = 'FormContainer3' then Application.CreateForm(TfrmReportForm, frmmain.formcontainer3.ElementID, egv_subform3);\r\n if containername_p = 'FormContainer4' then Application.CreateForm(TfrmReportForm, frmmain.formcontainer4.ElementID, egv_subform4);\r\n if containername_p = 'FormContainer5' then Application.CreateForm(TfrmReportForm, frmmain.formcontainer5.ElementID, egv_subform5);\r\n if containername_p = 'FormContainer6' then Application.CreateForm(TfrmReportForm, frmmain.formcontainer6.ElementID, egv_subform6);\r\n if containername_p = 'FormContainer7' then Application.CreateForm(TfrmReportForm, frmmain.formcontainer7.ElementID, egv_subform7);\r\n if containername_p = 'FormContainer8' then Application.CreateForm(TfrmReportForm, frmmain.formcontainer8.ElementID, egv_subform8);\r\n if containername_p = 'FormContainer9' then Application.CreateForm(TfrmReportForm, frmmain.formcontainer9.ElementID, egv_subform9);\r\n end;\r\n\r\n//Stand alone Reports\r\n{if\r\nthen begin\r\n if containername_p = 'FormContainer1' then Application.CreateForm(TfrmReportForm, frmmain.formcontainer1.ElementID, egv_subform);\r\n if containername_p = 'FormContainer2' then Application.CreateForm(TfrmReportForm, frmmain.formcontainer2.ElementID, egv_subform2);\r\n if containername_p = 'FormContainer3' then Application.CreateForm(TfrmReportForm, frmmain.formcontainer3.ElementID, egv_subform3);\r\n if containername_p = 'FormContainer4' then Application.CreateForm(TfrmReportForm, frmmain.formcontainer4.ElementID, egv_subform4);\r\n if containername_p = 'FormContainer5' then Application.CreateForm(TfrmReportForm, frmmain.formcontainer5.ElementID, egv_subform5);\r\n end; }\r\nend;\r\n\r\nfunction Grid_GetTableAndColumns(mode: integer; SQL_p: string; memGridColumns: TMemo): string;\r\nvar i: integer; s, c, p, srs, Primary_Key_Columns, DataSet_Key_Columns, DataSet_PKL_Columns, main_table: string;\r\nbegin\r\nPrimary_Key_Columns := '';\r\nDataSet_Key_Columns := '';\r\nDataSet_PKL_Columns := '';\r\ni := 0;\r\n\r\nfor i := 0 to memGridColumns.lines.count - 1\r\ndo begin\r\n memGridColumns.lines[i] := memGridColumns.lines[i] + '||||||||||';\r\n s := splitstring(memGridColumns.lines[i],'|')[4]; // DB Field Name\r\n c := splitstring(memGridColumns.lines[i],'|')[1]; // Dataset Field Name\r\n p := splitstring(memGridColumns.lines[i],'|')[5]; // is PK\r\n srs := splitstring(memGridColumns.lines[i],'|')[6]; // value source (to check if for selection ( from list-pickform) '=' )\r\n\r\n if length(splitstring(memGridColumns.lines[i],'|')) >= 5 // primary key columns to be able to delete the record\r\n then if (s <> '') and (p = '1')\r\n then begin\r\n Primary_Key_Columns := Primary_Key_Columns + s + ',';\r\n DataSet_Key_Columns := DataSet_Key_Columns + c + ',';\r\n end;\r\n if length(splitstring(memGridColumns.lines[i],'|')) >= 6 // Picklist columns\r\n then if (trim(srs) = '=')\r\n then DataSet_PKL_Columns := DataSet_PKL_Columns + c + ',';\r\n\r\n // showmessage(sql_p);\r\n main_table := trim(copy(sql_p, pos('FROM ', uppercase(sql_p)) + 4, length(sql_p)));\r\n main_table := stringreplace(main_table,chr(10),' ',[rfIgnoreCase, rfReplaceAll]);\r\n main_table := stringreplace(main_table,chr(13),' ',[rfIgnoreCase, rfReplaceAll]);\r\n main_table := trim(main_table);\r\n if pos(' ', main_table) > 0\r\n then main_Table := copy(main_table, 1, pos(' ',main_table))\r\n end;\r\nif mode = 0 then result := Main_Table;\r\nif mode = 1 then result := Primary_Key_Columns;\r\nif mode = 2 then result := DataSet_Key_Columns;\r\nif mode = 3 then result := DataSet_PKL_Columns;\r\nend;\r\n\r\nprocedure Grid_DeleteRecord(SQl_p: string; memGridColumns: TMemo; grd: TDBGrid);\r\nvar DeleteSQL_p, s, c: string; i: integer; DBType_p: integer;\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n begin\r\n if (grd.DataSource <> nil) and (grd.DataSource.DataSet <> nil)\r\n then OpenDataSet_J(grd.DataSource.DataSet, InsertKeyValues(dm.egv_localstorage.values[uppercase(grd.name) + '_SELECT_' + getcurrentformname]));\r\n //grd.datasource.dataset.refresh;\r\n end;\r\nbegin\r\nDeleteSql_p := ' Delete TOP (1) from ' + Grid_GetTableAndColumns(0, SQL_p, memGridColumns) + ' where ';\r\n s := Grid_GetTableAndColumns(1, SQL_p, memGridColumns);\r\n c := Grid_GetTableAndColumns(2, SQL_p, memGridColumns);\r\n // showmessage(s);\r\n // showmessage(c);\r\n for i:=0 to length(splitstring(s,',')) - 2\r\n do if i = 0 then DeleteSql_p := DeleteSql_p + splitstring(s,',')[i] + ' = ' +\r\n quotedstr(grd.datasource.dataset.fieldbyname(splitstring(c,',')[i]).asstring)\r\n else DeleteSql_p := DeleteSql_p + ' and ' + splitstring(s,',')[i] + ' = ' +\r\n quotedstr(grd.datasource.dataset.fieldbyname(splitstring(c,',')[i]).asstring);\r\n // showmessage('delete sql: ' + DeleteSql_p);\r\nDBType_p := DBType(SQL_p);\r\nif DBType_p = 1\r\nthen dm.XDataWebClient1.RawInvoke('IReportService.ExecQuery',[DeleteSQL_p, egv_facilityid, inttostr(DBType_p)], @OnResult)\r\nelse if dm.XDataWebConnection2.Connected then dm.XDataWebClient2.RawInvoke('IReportService.ExecQuery',[DeleteSQL_p, egv_facilityid, inttostr(DBType_p)], @OnResult);\r\ngrd.datasource.dataset.delete;\r\nend;\r\n\r\nprocedure Grid_Post(SQl_p: string; memGridColumns: TMemo; grd: TDBGrid);\r\nvar InsertSQL_p, UpdateSQL_p, where_p, RunSQL_p: string; i: integer; value_p: string;\r\n table_p, db_key_columns_p, dataset_key_columns_p, fields_to_update_p: string; DBType_p: integer=0;\r\nbegin\r\nif (grd.datasource = nil) or (grd.datasource.DataSet = nil) then exit;\r\n\r\n//showmessage(sql_p);\r\n{\r\nGrid_GetTableAndColumns:\r\nmode = 0 = Main_Table;\r\nmode = 1 = DB_Primary_Key_Columns;\r\nmode = 2 = DataSet_Key_Columns;\r\n}\r\n//showmessage(grd.columns[0].title);\r\nDBType_p := DBType(SQL_p); // database to apply changes ( AUTH or main)\r\ntable_p := Grid_GetTableAndColumns(0, SQL_p, memGridColumns);\r\ndb_key_columns_p := Grid_GetTableAndColumns(1, SQL_p, memGridColumns);\r\ndataset_key_columns_p := Grid_GetTableAndColumns(2, SQL_p, memGridColumns);\r\n\r\ngrd.datasource.dataset.first;\r\nwhile not grd.datasource.dataset.eof\r\ndo begin\r\n // Update SQL\r\n fields_to_update_p := Grid_GetColumnsAndValues(SQL_p, memGridColumns, grd);\r\n UpdateSQL_p := ' Update ' + table_p + ' set ' + fields_to_update_p + ' where ';\r\n\r\n // showmessage('status: ' + grd.datasource.dataset.fieldbyname('NEW_RECORD').asstring);\r\n { showmessage(table_p);\r\n showmessage(db_key_columns_p);\r\n showmessage(dataset_key_columns_p);\r\n showmessage(fields_to_update_p); }\r\n\r\n if (grd.datasource.dataset.fieldbyname('NEW_RECORD').asinteger = 0) or\r\n ((grd.datasource.dataset.fieldbyname('NEW_RECORD').asinteger = 2) and\r\n ( (trim(table_p) = '' ) or (trim(db_key_columns_p) = '' ) or (trim(dataset_key_columns_p) = '') or (trim(fields_to_update_p) = '') ))\r\n then begin\r\n {showmessage('DB Update failed. Check grid settings.');}\r\n grd.datasource.dataset.next;\r\n continue;\r\n end;\r\n\r\n for i:=0 to length(splitstring(db_key_columns_p,',')) - 2\r\n do begin\r\n if (grd.datasource.dataset.fieldbyname(splitstring(dataset_key_columns_p,',')[i]).oldvalue <> null)\r\n then value_p := string(grd.datasource.dataset.fieldbyname(splitstring(dataset_key_columns_p,',')[i]).oldvalue)\r\n else value_p := string(grd.datasource.dataset.fieldbyname(splitstring(dataset_key_columns_p,',')[i]).newvalue);\r\n if i = 0 then where_p := splitstring(db_key_columns_p,',')[i] + ' = ' + quotedstr(value_p)\r\n else where_p := where_p + ' and ' + splitstring(db_key_columns_p,',')[i] + ' = ' + quotedstr(value_p);\r\n end;\r\n UpdateSQL_p := UpdateSQL_p + where_p;\r\n //Insert SQL\r\n InsertSQL_p := ' Insert into ' + table_p + ' ( ' + Grid_GetIsertedFields(SQL_p, memGridColumns, grd) + ' )' +\r\n ' values ( ' + Grid_GetIsertedValues(SQL_p, memGridColumns, grd) + ' )';\r\n\r\n if grd.datasource.dataset.fieldbyname('NEW_RECORD').asinteger = 2\r\n then RunSQL_p := UpdateSQL_p\r\n else RunSQL_p := InsertSQL_p;\r\n //showmessage('update / insert sql: ' + RunSQL_p);\r\n if DBType_p = 1\r\n then dm.XDataWebClient1.RawInvoke('IReportService.ExecQuery',[RunSQL_p, egv_facilityid, inttostr(DBType_p)], nil)\r\n else if dm.XDataWebConnection2.Connected then dm.XDataWebClient2.RawInvoke('IReportService.ExecQuery',[RunSQL_p, egv_facilityid, inttostr(DBType_p)], nil);\r\n\r\n grd.datasource.dataset.edit;\r\n grd.datasource.dataset.fieldbyname('NEW_RECORD').asinteger := 0;\r\n grd.datasource.dataset.post;\r\n grd.datasource.dataset.next;\r\n end;\r\ngrd.datasource.dataset.first;\r\nend;\r\n\r\nfunction Grid_GetColumnsAndValues(SQL_p: string; memGridColumns: TMemo; grd: TDBGrid): string;\r\nvar i, j: integer; s, c, p, value_p, expr_p: string;\r\nbegin\r\ni := 0;\r\nresult := '';\r\nfor i := 0 to memGridColumns.lines.count - 1\r\ndo begin\r\n if (length(splitstring(memGridColumns.lines[i],'|')) > 5) and\r\n (splitstring(memGridColumns.lines[i],'|')[6] = '-') then continue; // skip (for example identity column)\r\n\r\n s := splitstring(memGridColumns.lines[i],'|')[4]; // DB Field Name\r\n c := splitstring(memGridColumns.lines[i],'|')[1]; // Dataset Field Name\r\n p := splitstring(memGridColumns.lines[i],'|')[5]; // is PK ( 0/1 )\r\n\r\n // showmessage(string(grd.datasource.dataset.fieldbyname(c).curvalue));\r\n\r\n if (length(splitstring(memGridColumns.lines[i],'|')) >= 5) and (s <> '')\r\n then begin\r\n if (length(splitstring(memGridColumns.lines[i], '|')) >= 7 ) and\r\n (splitstring(memGridColumns.lines[i], '|')[6] <> '' ) and\r\n (pos('CALC(', splitstring(memGridColumns.lines[i], '|')[6]) = 1)\r\n then begin\r\n expr_p := uppercase(trim( splitstring( memGridColumns.lines[i], '|')[6] ));\r\n if pos('CALC(', uppercase(expr_p)) = 1\r\n then begin\r\n expr_p := copy(expr_p, 6, length(expr_p) - 6);\r\n expr_p := insertkeyvalues(expr_p);\r\n for j := 0 to grd.Columns.Count - 1\r\n do if grd.Columns[j].DataField <> ''\r\n then expr_p := stringreplace(expr_p, grd.Columns[j].DataField,\r\n grd.DataSource.DataSet.FieldByName(grd.Columns[j].DataField).AsString,\r\n [rfReplaceAll, rfIgnoreCase])\r\n else expr_p := stringreplace(expr_p, grd.Columns[j].DataField,\r\n '',\r\n [rfReplaceAll, rfIgnoreCase]);\r\n expr_p := '( ' + expr_p + ' )';\r\n // showmessage(expr_p);\r\n end;\r\n value_p := expr_p;\r\n end\r\n else begin\r\n value_p := grd.datasource.dataset.fieldbyname(c).asstring;\r\n value_p := trim(value_p);\r\n value_p := quotedstr(value_p);\r\n end;\r\n\r\n if result = ''\r\n then result := s + ' = ' + value_p\r\n else result := result + ', ' + s + ' = ' + value_p;\r\n // showmessage(result);\r\n end;\r\n end;\r\n\r\nend;\r\n\r\nfunction Grid_GetIsertedFields(SQL_p: string; memGridColumns: TMemo; grd: TDBGrid): string;\r\nvar i: integer; s, c, p: string;\r\nbegin\r\ni := 0;\r\nresult := '';\r\nfor i := 0 to memGridColumns.lines.count - 1\r\ndo begin\r\n if (length(splitstring(memGridColumns.lines[i],'|')) > 5) and\r\n (splitstring(memGridColumns.lines[i],'|')[6] = '-') then continue; // skip (for example identity column)\r\n\r\n s := splitstring(memGridColumns.lines[i],'|')[4]; // DB Field Name\r\n if s <> ''\r\n then begin\r\n if result = ''\r\n then result := s\r\n else result := result + ', ' + s;\r\n // showmessage(result);\r\n end;\r\n end;\r\n\r\nend;\r\n\r\nfunction Grid_GetIsertedValues(SQL_p: string; memGridColumns: TMemo; grd: TDBGrid): string;\r\nvar i, j: integer; s, c, p, value_p, expr_p: string;\r\nbegin\r\n//showmessage(grd.name);\r\ni := 0;\r\nresult := '';\r\nfor i := 0 to memGridColumns.lines.count - 1\r\ndo begin\r\n if (length(splitstring(memGridColumns.lines[i],'|')) > 5) and\r\n (splitstring(memGridColumns.lines[i],'|')[6] = '-') then continue; // skip (for example identity column)\r\n\r\n c := splitstring(memGridColumns.lines[i],'|')[1]; // Dataset Field Name\r\n\r\n if c <> ''\r\n then begin\r\n if (length(splitstring(memGridColumns.lines[i], '|')) >= 7 ) and\r\n (splitstring(memGridColumns.lines[i], '|')[6] <> '' ) and\r\n (pos('CALC(', splitstring(memGridColumns.lines[i], '|')[6]) = 1)\r\n then begin\r\n expr_p := uppercase(trim( splitstring( memGridColumns.lines[i], '|')[6] ));\r\n expr_p := copy(expr_p, 6, length(expr_p) - 6);\r\n expr_p := insertkeyvalues(expr_p);\r\n for j := 0 to grd.Columns.Count - 1\r\n do if grd.Columns[j].DataField <> ''\r\n then expr_p := stringreplace(expr_p, grd.Columns[j].DataField,\r\n grd.DataSource.DataSet.FieldByName(grd.Columns[j].DataField).AsString,\r\n [rfReplaceAll, rfIgnoreCase])\r\n else expr_p := stringreplace(expr_p, grd.Columns[j].DataField, '', [rfReplaceAll, rfIgnoreCase]);\r\n expr_p := '( ' + expr_p + ' )';\r\n // showmessage(expr_p);\r\n value_p := expr_p;\r\n end\r\n else value_p := quotedstr(grd.datasource.dataset.fieldbyname(c).asstring);\r\n\r\n if result = ''\r\n then result := value_p\r\n else result := result + ', ' + value_p;\r\n // showmessage(result);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure Block_GridSetUp(Sender: TObject);\r\nvar containername_p: string; grd: TDBGrid; i: integer; b: TControl;\r\nbegin\r\n//Grid Setup\r\n//showmessage( (((sender as TWebControl).parent as twebcontrol).parent as twebcontrol).name);\r\ngrd := nil;\r\nb := (((sender as TControl).parent as TControl).parent as TControl);\r\nfor i:= 0 to b.controlcount - 1\r\ndo if b.controls[i] is TDBGrid then begin grd := (b.controls[i] as TDBGrid); break; end;\r\nif grd = nil then exit;\r\n\r\nEGV_SUBFORMCAPTION := 'Grid Setup';\r\nEGV_GRIDTOSETUP := grd;\r\n{if assigned(grd.datasource) then grd.datasource.dataset.close;\r\ngrd.datasource := nil; }\r\n\r\ncontainername_p := getformcontainer().name;\r\nif containername_p = 'FormContainer1' then Application.CreateForm(TfrmDynamicGridSetup, frmmain.formcontainer1.ElementID, egv_subform);\r\nif containername_p = 'FormContainer2' then Application.CreateForm(TfrmDynamicGridSetup, frmmain.formcontainer2.ElementID, egv_subform2);\r\nif containername_p = 'FormContainer3' then Application.CreateForm(TfrmDynamicGridSetup, frmmain.formcontainer3.ElementID, egv_subform3);\r\nif containername_p = 'FormContainer4' then Application.CreateForm(TfrmDynamicGridSetup, frmmain.formcontainer4.ElementID, egv_subform4);\r\nif containername_p = 'FormContainer5' then Application.CreateForm(TfrmDynamicGridSetup, frmmain.formcontainer5.ElementID, egv_subform5);\r\nif containername_p = 'FormContainer6' then Application.CreateForm(TfrmDynamicGridSetup, frmmain.formcontainer6.ElementID, egv_subform6);\r\nif containername_p = 'FormContainer7' then Application.CreateForm(TfrmDynamicGridSetup, frmmain.formcontainer7.ElementID, egv_subform7);\r\nif containername_p = 'FormContainer8' then Application.CreateForm(TfrmDynamicGridSetup, frmmain.formcontainer8.ElementID, egv_subform8);\r\nif containername_p = 'FormContainer9' then Application.CreateForm(TfrmDynamicGridSetup, frmmain.formcontainer9.ElementID, egv_subform9);\r\nend;\r\n\r\nfunction GetDynamicGridDataSource(): TDataSource;\r\nvar i: integer; ds_p: TDataSource;\r\nbegin\r\nds_p := nil;\r\nfor i := 1 to 30 do begin\r\n if dm.findcomponent('dsDynamicGrid' + inttostr(i)) <> nil\r\n then ds_p := (dm.findcomponent('dsDynamicGrid' + inttostr(i)) as TDataSource);\r\n if ds_p <> nil\r\n then begin\r\n if ds_p.dataset.tag = 1 // in use;\r\n then continue\r\n else begin\r\n result := ds_p;\r\n // showmessage(result.name);\r\n ds_p.dataset.tag := 1;\r\n exit;\r\n end;\r\n end;\r\n end;\r\n\r\nend;\r\n\r\nprocedure Grid_SetUpColumns(grd_p: TDBGrid);\r\nvar i,j: integer; s1,s2,s3,s4,s5: string;\r\nbegin\r\n\r\ntry\r\n//showmessage(grd_p.Name + ' --- ' + dm.egv_localstorage.values[uppercase(grd_p.name) + '_COLUMNS_' + getcurrentformname]);\r\n// Columns :\r\nfrmmain.memGridColumns.text := dm.egv_localstorage.values[uppercase(grd_p.name) + '_COLUMNS_' + getcurrentformname];\r\n//frmmain.memGridColumns.text := dm.egv_localstorage.values[grd_p.name + '_COLUMNS_' + getcurrentformname];\r\n//frmmain.memGridColumns.text := dm.egv_localstorage.values[grd_p.name + '_COLUMNS_' + getcurrentformname];\r\n\r\nif frmmain.memGridColumns.text = '' then exit;\r\n\r\n//showmessage('columns: ' + frmmain.memGridColumns.text);\r\n//showmessage('block: ' + (grd_p.Parent as TWebPanel).Name + ': ' + frmmain.memGridColumns.text);\r\n//showmessage('1');\r\ngrd_p.BeginUpdate;\r\ni := 0; j := 0;\r\nfor i := 0 to frmmain.memGridColumns.lines.count - 1\r\ndo begin\r\n s1 := splitstring(frmmain.memGridColumns.lines[i],'|')[0]; // Visible\r\n s2 := splitstring(frmmain.memGridColumns.lines[i],'|')[1]; // field name\r\n s3 := splitstring(frmmain.memGridColumns.lines[i],'|')[2]; // title\r\n s4 := splitstring(frmmain.memGridColumns.lines[i],'|')[3]; // width\r\n s5 := splitstring(frmmain.memGridColumns.lines[i],'|')[4]; // DB Field Name\r\n\r\n if length(splitstring(frmmain.memGridColumns.lines[i],'|')) < 5 then s5 := '';\r\n if length(splitstring(frmmain.memGridColumns.lines[i],'|')) < 4 then s4 := '0';\r\n if length(splitstring(frmmain.memGridColumns.lines[i],'|')) < 3 then s3 := '';\r\n if length(splitstring(frmmain.memGridColumns.lines[i],'|')) < 2 then s2 := '';\r\n if length(splitstring(frmmain.memGridColumns.lines[i],'|')) < 1 then s1 := '0';\r\n\r\n if s1 = '1'\r\n then begin //showmessage('visible : ' + grd_p.Name + ' --- ' + inttostr(i));\r\n try\r\n grd_p.columns[i].datafield := s2;\r\n grd_p.columns[i].width := strtoint(s4);\r\n grd_p.columns[i].title := s3;\r\n except\r\n showmessage(s1 + ' --- ' + s2 + ' --- ' + s3 + ' --- ' + s4 + ' --- ' + s5);\r\n showmessage('Grid columns setup error: check grid setting for block: ' + BlockGetTitle((grd_p.Parent as TPanel)) );\r\n end;\r\n end\r\n else begin //showmessage('hidden : ' + grd_p.Name + ' --- ' + inttostr(i));\r\n grd_p.columns[i].DataField := s2; //'';\r\n grd_p.columns[i].width := 0;\r\n grd_p.columns[i].title := '';\r\n end;\r\n j := j + 1;\r\n end;\r\n//showmessage('2');\r\n//showmessage(GetTableAndKey(0, SQL_p, frmmain.memGridColumns));\r\n//showmessage(GetTableAndKey(1, SQL_p, frmmain.memGridColumns));\r\n\r\nfor i := j to grd_p.columns.count - 1\r\ndo begin\r\n grd_p.columns[i].width := 0;\r\n grd_p.columns[i].datafield := '';\r\n grd_p.columns[i].title := '';\r\n end;\r\nfinally\r\n grd_p.endupdate;\r\nend;\r\n// showmessage('3');\r\nend;\r\n\r\nprocedure Block_GridPost(Sender: TObject; Grid_p: TDBGrid=nil);\r\nvar i: integer; SQL_p: string; grd: TDBGrid; b: TControl;\r\nbegin\r\nif Grid_p = nil\r\nthen begin\r\n grd := nil;\r\n b := (((sender as TControl).parent as TControl).parent as TControl);\r\n //showmessage(b.name);\r\n for i := 0 to b.controlcount - 1\r\n do begin\r\n if b.controls[i] is TDBGrid\r\n then begin\r\n grd := (b.controls[i] as TDBGrid);\r\n break;\r\n end;\r\n end;\r\n end\r\nelse grd := Grid_p;\r\n\r\nif grd <> nil\r\nthen begin\r\n SQL_p := dm.egv_localstorage.values[uppercase(grd.name) + '_SELECT_' + uppercase(findparentform(grd).name) {getcurrentformname}];\r\n // showmessage(sql_p);\r\n frmmain.memGridColumns.text := dm.egv_localstorage.values[uppercase(grd.name) + '_COLUMNS_' + uppercase(findparentform(grd).name) {getcurrentformname}];\r\n Grid_Post(SQl_p, frmmain.memGridColumns, grd);\r\n end;\r\nend;\r\n\r\nprocedure Block_GridNewRecord(Sender: TObject);\r\nvar i: integer; SQL_p: string; grd: TDBGrid; b: TControl;\r\nbegin\r\nif not (sender is TDBGrid)\r\nthen begin\r\n grd := nil;\r\n b := (((sender as TControl).parent as TControl).parent as TControl);\r\n //showmessage(b.name);\r\n for i := 0 to b.controlcount - 1\r\n do begin\r\n if b.controls[i] is TDBGrid\r\n then begin\r\n grd := (b.controls[i] as TDBGrid);\r\n break;\r\n end;\r\n end;\r\n end\r\nelse grd := (sender as TDBGrid);\r\nif grd <> nil\r\nthen begin\r\n SQL_p := dm.egv_localstorage.values[grd.name + '_SELECT_' + getcurrentformname];\r\n // showmessage('Block_GridNewRecord: ' +grd.name + '_SELECT_' + getcurrentformname);\r\n //showmessage(sql_p);\r\n frmmain.memGridColumns.text := dm.egv_localstorage.values[grd.name + '_COLUMNS_' + getcurrentformname]; // reasign colums in pickform\r\n Grid_NewRecord(SQl_p, frmmain.memGridColumns, grd);\r\n end;\r\nend;\r\n\r\nprocedure Grid_NewRecord(SQl_p: string; memGridColumns: TMemo; grd: TDBGrid);\r\nvar i: integer; expr_p, fieldname_p: string;\r\nbegin\r\n//showmessage(memGridColumns.text);\r\ngrd.datasource.dataset.last;\r\ngrd.datasource.dataset.Append;\r\ngrd.datasource.dataset.post;\r\ngrd.datasource.dataset.edit;\r\n//showmessage('2');\r\nfor i := 0 to memGridColumns.lines.count - 1\r\ndo begin\r\n if (length(splitstring(memGridColumns.lines[i], '|')) >= 7 ) and (splitstring(memGridColumns.lines[i], '|')[6] <> '' )\r\n then begin\r\n expr_p := uppercase(trim( splitstring( memGridColumns.lines[i], '|')[6] ));\r\n fieldname_p := trim( splitstring( memGridColumns.lines[i], '|')[1] );\r\n expr_p := uppercase( InsertKeyValues(expr_p));\r\n // showmessage(expr_p);\r\n Grid_GetInsertDataForColumn(expr_p, grd, fieldname_p);\r\n end;\r\n\r\n end;\r\nend;\r\n\r\nprocedure ReleaseGridDatasets(form_p: TForm);\r\nvar i: integer;\r\nbegin\r\n//Release datasets of all grids\r\nfor i := 0 to form_p.componentcount - 1\r\ndo begin\r\n if (form_p.components[i] is TDBGrid) and assigned( (form_p.components[i] as TDBGrid).datasource )\r\n and assigned( (form_p.components[i] as TDBGrid).datasource.DataSet )\r\n then begin //showmessage('releasing: ' + (form_p.components[i] as TWebDBGrid).datasource.name);\r\n (form_p.components[i] as TDBGrid).datasource.dataset.tag := 0; // release\r\n (form_p.components[i] as TDBGrid).datasource.dataset.close;\r\n (form_p.components[i] as TDBGrid).datasource := nil;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure RefreshGridDataSources(form_p: TForm);\r\nvar i: integer; ds_p: TDataSource;\r\nbegin\r\nif form_p = nil then exit;\r\n// showmessage(form_p.name);\r\n\r\nif form_p.FindComponent('tmGridRefreshClick') <> nil\r\nthen (form_p.FindComponent('tmGridRefreshClick') as TTimer).Enabled := true;\r\n\r\n//Refresh datasets of all grids\r\nfor i := 0 to form_p.componentcount - 1\r\ndo begin\r\n if (form_p.components[i] is TDBGrid) and assigned( (form_p.components[i] as TDBGrid).datasource )\r\n and assigned( (form_p.components[i] as TDBGrid).datasource.DataSet )\r\n then begin //showmessage('1');\r\n ds_p := (form_p.components[i] as TDBGrid).datasource;\r\n (form_p.components[i] as TDBGrid).datasource := nil;\r\n (form_p.components[i] as TDBGrid).datasource := ds_p;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure HideShowFormGrids(form_p: TForm; Show_p: Boolean=false);\r\nvar i: integer; ds_p: TDataSource;\r\nbegin\r\nif form_p = nil then exit;\r\nfor i := 0 to form_p.componentcount - 1\r\ndo begin\r\n if (form_p.components[i] is TDBGrid)\r\n then (form_p.components[i] as TDBGrid).Visible := Show_p;\r\n end;\r\nend;\r\n\r\nprocedure Grid_GetInsertDataForColumn(expr_p: string; grd: TDBGrid; fieldname_p: string);\r\nvar recno_p: integer; max_p: integer;\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p: string;\r\n begin\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n // showmessage('column: ' + fieldname_p +' value: ' + Response_p);\r\n grd.datasource.dataset.Edit;\r\n grd.datasource.dataset.fieldbyname(fieldname_p).asstring := Response_p;\r\n dm.XDataWebClient1.tag := 0;\r\n end;\r\n\r\nbegin\r\nexpr_p := trim(expr_p);\r\nif (pos('SELECT', uppercase(expr_p)) <> 1) and\r\n (pos('DECLARE', uppercase(expr_p)) <> 1) and\r\n (pos('USE', uppercase(expr_p)) <> 1) and\r\n (pos('EXECUTE', uppercase(expr_p)) <> 1) and\r\n (pos('WITH', uppercase(expr_p)) <> 1) // if the value comes from SYSTEM variable ( EGV_FACIILITY ... )\r\n then begin\r\n if expr_p <> '+'\r\n then begin\r\n expr_p := uppercase( InsertKeyValues(expr_p, false));\r\n if expr_p = '=' then expr_p := '';\r\n if pos('CALC(', expr_p) = 0\r\n then grd.datasource.dataset.fieldbyname(fieldname_p).asstring := expr_p;\r\n end\r\n else begin // incremental\r\n //showmessage(fieldname_p);\r\n recno_p := grd.datasource.dataset.recno;\r\n grd.datasource.dataset.first;\r\n max_p := 0;\r\n while not grd.datasource.dataset.eof\r\n do begin\r\n // showmessage(grd.datasource.dataset.fieldbyname(fieldname_p).asstring);\r\n if (recno_p <> grd.datasource.dataset.recno) and (grd.datasource.dataset.fieldbyname(fieldname_p).asinteger > max_p)\r\n then max_p := grd.datasource.dataset.fieldbyname(fieldname_p).asinteger;\r\n grd.datasource.dataset.next;\r\n end;\r\n max_p := max_p + 1;\r\n grd.datasource.dataset.recno := recno_p;\r\n //showmessage(inttostr(max_p));\r\n grd.datasource.dataset.edit;\r\n grd.datasource.dataset.fieldbyname(fieldname_p).asstring := inttostr(max_p);\r\n end;\r\n end\r\n else begin // showmessage(expr_p);\r\n expr_p := uppercase( InsertKeyValues(expr_p));\r\n if dm.XDataWebConnection2.Connected then dm.XDataWebClient2.RawInvoke('IReportService.GetColumnData',[expr_p , egv_facilityid, '0'], @OnResult);\r\n end\r\nend;\r\n\r\nprocedure Block_DeleteGridRecord(Sender: TObject);\r\nvar i: integer; SQL_p: string; grd: TDBGrid; b: TControl;\r\nbegin\r\ngrd := nil;\r\nb := (((sender as TControl).parent as TControl).parent as TControl);\r\nfor i := 0 to b.controlcount - 1\r\ndo begin\r\n if b.controls[i] is TDBGrid\r\n then begin\r\n grd := (b.controls[i] as TDBGrid);\r\n break;\r\n end;\r\n end;\r\nif grd <> nil\r\nthen begin\r\n SQL_p := dm.egv_localstorage.values[grd.name + '_SELECT_' + getcurrentformname];\r\n frmmain.memGridColumns.text := dm.egv_localstorage.values[grd.name + '_COLUMNS_' + getcurrentformname];\r\n // frmmain.mdDelete.Show;\r\n // if frmmain.mdDelete.Dialogresult = 6\r\n // then begin\r\n Grid_DeleteRecord(SQl_p, frmmain.memGridColumns, grd);\r\n // end;\r\n end;\r\nend;\r\n\r\nprocedure SetSystemVariablesFromStorage;\r\nbegin\r\n//showmessage( dm.EGV_SESSIONSTORAGE.values['EGV_QAI_CERNERTOKEN'] );\r\n\r\nif dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS'] = '' then dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS'] := '0';\r\nif dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH'] = '' then dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH'] := '50';\r\negv_formcolumns := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS']);\r\nEGV_BLOCKDEFAULTWIDTH := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH']);\r\nEGV_BLOCKDEFAULTHEIGHT := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTHEIGHT']);\r\nEGV_FORMCOLUMNSAUTO := (dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNSAUTO'] = '1');\r\nEGV_SHOWHIDDENBLOCKSINDESIGN := (dm.EGV_LOCALSTORAGE.Values['EGV_SHOWHIDDENBLOCKSINDESIGN'] = '1');\r\nEGV_SHOWCOMMONPICKLIST := (dm.EGV_LOCALSTORAGE.Values['EGV_SHOWCOMMONPICKLIST'] = '1');\r\nEGV_NOHORIZONTALLINEUP := (dm.EGV_LOCALSTORAGE.Values['EGV_NOHORIZONTALLINEUP'] = '1');\r\n\r\nif dm.EGV_LOCALSTORAGE.Values['EGV_QAI_WAITMESSAGECOLOR'] = '' then dm.EGV_LOCALSTORAGE.Values['EGV_QAI_WAITMESSAGECOLOR'] := 'clwhite';\r\nif dm.EGV_LOCALSTORAGE.Values['EGV_QAI_SERVERMESSAGECOLOR'] = '' then dm.EGV_LOCALSTORAGE.Values['EGV_QAI_SERVERMESSAGECOLOR'] := 'clwhite';\r\nif dm.EGV_LOCALSTORAGE.Values['EGV_QAI_QUESTIONCOLOR'] = '' then dm.EGV_LOCALSTORAGE.Values['EGV_QAI_QUESTIONCOLOR'] := 'clwhite';\r\nif dm.EGV_LOCALSTORAGE.Values['EGV_QAI_ANSWERCOLOR'] = '' then dm.EGV_LOCALSTORAGE.Values['EGV_QAI_ANSWERCOLOR'] := 'clwhite';\r\nif dm.EGV_LOCALSTORAGE.Values['EGV_QAI_WAITMESSAGEICONCOLOR'] = '' then dm.EGV_LOCALSTORAGE.Values['EGV_QAI_WAITMESSAGEICONCOLOR'] := 'clwhite';\r\nif dm.EGV_LOCALSTORAGE.Values['EGV_QAI_SERVERMESSAGEICONCOLOR'] = '' then dm.EGV_LOCALSTORAGE.Values['EGV_QAI_SERVERMESSAGEICONCOLOR'] := 'clwhite';\r\nif dm.EGV_LOCALSTORAGE.Values['EGV_QAI_QUESTIONICONCOLOR'] = '' then dm.EGV_LOCALSTORAGE.Values['EGV_QAI_QUESTIONICONCOLOR'] := 'clwhite';\r\nif dm.EGV_LOCALSTORAGE.Values['EGV_QAI_ANSWERICONCOLOR'] = '' then dm.EGV_LOCALSTORAGE.Values['EGV_QAI_ANSWERICONCOLOR'] := 'clwhite';\r\n\r\nEGV_QAI_WAITMESSAGECOLOR := dm.EGV_LOCALSTORAGE.Values['EGV_QAI_WAITMESSAGECOLOR'];\r\nEGV_QAI_SERVERMESSAGECOLOR := dm.EGV_LOCALSTORAGE.Values['EGV_QAI_SERVERMESSAGECOLOR'];\r\nEGV_QAI_QUESTIONCOLOR := dm.EGV_LOCALSTORAGE.Values['EGV_QAI_QUESTIONCOLOR'];\r\nEGV_QAI_ANSWERCOLOR := dm.EGV_LOCALSTORAGE.Values['EGV_QAI_ANSWERCOLOR'];\r\n\r\nEGV_QAI_WAITMESSAGEICON := dm.EGV_LOCALSTORAGE.Values['EGV_QAI_WAITMESSAGEICON'];\r\nEGV_QAI_SERVERMESSAGEICON := dm.EGV_LOCALSTORAGE.Values['EGV_QAI_SERVERMESSAGEICON'];\r\nEGV_QAI_QUESTIONICON := dm.EGV_LOCALSTORAGE.Values['EGV_QAI_QUESTIONICON'];\r\nEGV_QAI_ANSWERICON := dm.EGV_LOCALSTORAGE.Values['EGV_QAI_ANSWERICON'];\r\n\r\nEGV_QAI_WAITMESSAGEICONCOLOR := dm.EGV_LOCALSTORAGE.Values['EGV_QAI_WAITMESSAGEICONCOLOR'];\r\nEGV_QAI_SERVERMESSAGEICONCOLOR := dm.EGV_LOCALSTORAGE.Values['EGV_QAI_SERVERMESSAGEICONCOLOR'];\r\nEGV_QAI_QUESTIONICONCOLOR := dm.EGV_LOCALSTORAGE.Values['EGV_QAI_QUESTIONICONCOLOR'];\r\nEGV_QAI_ANSWERICONCOLOR := dm.EGV_LOCALSTORAGE.Values['EGV_QAI_ANSWERICONCOLOR'];\r\n\r\nEGV_QAI_BIDDINGDOCS := dm.EGV_LOCALSTORAGE.Values['EGV_QAI_BIDDINGDOCS'];\r\n\r\nEGV_QAI_DEFAULTFILESTOUPLOAD := dm.EGV_LOCALSTORAGE.Values['EGV_QAI_DEFAULTFILESTOUPLOAD'];\r\nEGV_QAI_DEFAULTBIDDINGDOCSTOUPLOAD := dm.EGV_LOCALSTORAGE.Values['EGV_QAI_DEFAULTBIDDINGDOCSTOUPLOAD'];\r\n\r\nEGV_QAI_BIDDINGDOCS := dm.EGV_LOCALSTORAGE.Values['EGV_QAI_BIDDINGDOCS'];\r\n\r\n//showmessage(dm.EGV_LOCALSTORAGE.Values['EGV_NOHORIZONTALLINEUP']);\r\nend;\r\n\r\nprocedure Form_AdjustGrids(form_p: TForm; grid_p: TDBGrid=nil);\r\nvar i: integer; ds_p: TDataSource;\r\nbegin\r\nif form_p = nil then exit;\r\n//showmessage('Adjust grids');\r\nif Grid_p = nil\r\nthen begin\r\n for i := 0 to form_p.componentcount - 1\r\n do begin\r\n if (form_p.components[i] is TDBGrid) and (((form_p.components[i] as TDBGrid).Parent as TPanel)).Visible\r\n then begin\r\n //showmessage('Adjust columns');\r\n if assigned((form_p.components[i] as TDBGrid).datasource)\r\n then begin\r\n //showmessage('Adjust columns- datasource assigned');\r\n Grid_AdjustColumns((form_p.components[i] as TDBGrid), true);\r\n Grid_SetTitleHeight((form_p.components[i] as TDBGrid));\r\n end;\r\n end;\r\n end;\r\n end\r\nelse begin\r\n Grid_AdjustColumns(Grid_p, true);\r\n Grid_SetTitleHeight(Grid_p);\r\n end;\r\nend;\r\n\r\nFunction S_TextWidth(const Text:String; Font:TFont) : Integer;\r\nvar\r\n LBmp: TBitmap;\r\nbegin\r\n LBmp := TBitmap.Create;\r\n try\r\n LBmp.Canvas.Font.name := Font.name;\r\n LBmp.Canvas.Font.size := Font.size;\r\n LBmp.Canvas.Font.style := Font.style;\r\n Result := trunc(LBmp.Canvas.TextWidth(Text));\r\n finally\r\n LBmp.Free;\r\n end;\r\nend;\r\n\r\nprocedure Grid_SetTitleHeight(aGrid: TDBGrid);\r\nvar i: integer;\r\nbegin\r\ntry\r\n//aGrid.BeginUpdate;\r\n//if not assigned(aGrid.datasource) then exit;\r\n//showmessage(aGrid.Name);\r\n// 2 lines max for now.\r\naGrid.rowheights[0] :=0;\r\n//aGrid.EndUpdate;\r\n\r\n//aGrid.BeginUpdate;\r\nfor i := 0 to aGrid.columns.count -1\r\ndo begin\r\n if trim(aGrid.columns[i].Title) <> ''\r\n then begin\r\n //showmessage(aGrid.name);\r\n aGrid.rowheights[0] := 40;\r\n exit;\r\n end;\r\n end;\r\n//aGrid.EndUpdate;\r\n\r\n{for i := 0 to aGrid.columns.count -1\r\ndo begin\r\n if (aGrid.columns[i].width > 0) and (S_TextWidth(aGrid.columns[i].title, aGrid.Font) > aGrid.columns[i].width) and\r\n (pos(' ', aGrid.columns[i].title) > 0)\r\n then begin\r\n // showmessage(aGrid.columns[i].title);\r\n // showmessage(inttostr(aGrid.columns[i].width));\r\n aGrid.rowheights[0] := aGrid.rowheights[0] + 25;\r\n break;\r\n end;\r\n end; }\r\nfinally\r\n// aGrid.EndUpdate;\r\nend;\r\nend;\r\n\r\nprocedure LS_Save;\r\nvar i, j, n: integer; s, section_p, value_p, sql_p: string; sql_pool: array [0..100] of string;\r\n\r\nprocedure OnResult(Response: TXDataClientResponse);\r\n var Response_p: string;\r\n begin\r\n n := n + 1;\r\n //showmessage('run sql ' + inttostr(n) + ' ' + copy(sql_pool[n],1,100));\r\n if (sql_pool[n] <> '')\r\n then begin\r\n // if pos('EGV_QAI_CERNERTOKEN', sql_pool[n]) > 0\r\n // then showmessage('saving: ' + sql_pool[n]);\r\n\r\n dm.XDataWebClient1.RawInvoke('IReportService.ExecQuery',[sql_pool[n], egv_facilityid, '1'], @OnResult);\r\n // frmmain.WebMemo10.Text := sql_pool[n];\r\n end\r\n else if frmmain.wmWaitMessage.showing then begin\r\n // showmessage('desing wait message close');\r\n frmmain.wmWaitMessage.Tag := 0;\r\n frmmain.wmWaitMessage.hide;\r\n end;\r\n end;\r\n\r\n\r\nbegin\r\nif frmmain.wmWaitMessage.showing then frmmain.wmWaitMessage.hide;\r\nif not frmmain.wmWaitMessage.showing then begin\r\n //showmessage('desing wait message start');\r\n frmmain.wmWaitMessage.Tag := 1; // design switch message. can be closed only when finished\r\n frmmain.wmWaitMessage.show;\r\n end;\r\n\r\nfor i := 0 to 100 do sql_pool[i] := '';\r\n// Variables and settings\r\nsection_p := 'QAPPBUILDER_SETTINGS' + trim(EGV_SCREENSIZE);\r\n//clear low-case-key duplicates\r\ns := '';\r\nfor i := 0 to dm.EGV_LOCALSTORAGE.Count - 1\r\ndo if uppercase(dm.EGV_LOCALSTORAGE.Keys[i]) <> dm.EGV_LOCALSTORAGE.Keys[i]\r\n then dm.EGV_LOCALSTORAGE.Values[dm.EGV_LOCALSTORAGE.Keys[i]] := '';\r\n\r\nvalue_p := '';\r\n//frmmain.webmemo10.text := '';\r\nfor i := 0 to dm.EGV_LOCALSTORAGE.Count - 1\r\ndo begin\r\n\r\n //if dm.EGV_LOCALSTORAGE.Keys[i] = 'EGV_QAI_CERNERTOKEN'\r\n // then showmessage('collecting: ' + dm.EGV_LOCALSTORAGE.Values['EGV_QAI_CERNERTOKEN']);\r\n\r\n if ( (pos('DSN_', uppercase(dm.EGV_LOCALSTORAGE.Keys[i])) = 1) or {Form design data}\r\n (pos('DBF_', uppercase(dm.EGV_LOCALSTORAGE.Keys[i])) = 1) or {Form data block data settings}\r\n (pos('Q_', uppercase(dm.EGV_LOCALSTORAGE.Keys[i])) = 1) or {Form data block picklist, input style settings}\r\n (pos('EGV_', uppercase(dm.EGV_LOCALSTORAGE.Keys[i])) = 1) or {Application internal variable}\r\n (pos('_SELECT_', uppercase(dm.EGV_LOCALSTORAGE.Keys[i])) > 0) or {Form grids select statements}\r\n (pos('QAI_', uppercase(dm.EGV_LOCALSTORAGE.Keys[i])) > 0) or {MedGPT settings (db query, ...)}\r\n (pos('_COLUMNS_', uppercase(dm.EGV_LOCALSTORAGE.Keys[i])) > 0) {Form Grids Columns}\r\n ) and (dm.EGV_LOCALSTORAGE.Values[dm.EGV_LOCALSTORAGE.Keys[i]] <> '')\r\n then begin\r\n\r\n value_p := value_p + '***' + uppercase(dm.EGV_LOCALSTORAGE.Keys[i]) + '^' + dm.EGV_LOCALSTORAGE.values[dm.EGV_LOCALSTORAGE.Keys[i]];\r\n end;\r\n end;\r\n value_p := stringreplace(value_p, '''', '$\"$', [rfIgnoreCase, rfReplaceAll]);\r\n//frmmain.webmemo10.text := value_p;\r\n\r\n//value_p :=\r\n\r\nsql_p := ' delete from ini_ident where section_name = ' + quotedstr(section_p) + ' and ' +\r\n ' FACILITYID = ' + EGV_FACILITYID + ' and ' +\r\n ' USERID = ' + quotedstr('SYSDBA');\r\nsql_pool[0] := sql_p;\r\n\r\n//dm.XDataWebClient1.RawInvoke('IReportService.ExecQuery',[sql_p, egv_facilityid], @OnResult);\r\n\r\nsql_p :=\r\n ' insert into ini_ident(USERID, SECTION_NAME, IDENT_NAME, NOTES, FACILITYID, SPECIALITY, VISIBLE)' +\r\n ' values( ' + quotedstr('SYSDBA') + ', ' +\r\n quotedstr(section_p) + ', ' +\r\n quotedstr(section_p + '00001') + ', ' +\r\n quotedstr(trim(copy(value_p,1,10000))) + ', ' +\r\n quotedstr(EGV_FACILITYID) + ', ' +\r\n quotedstr(EGV_SPECIALITY) + ', ' +\r\n '1' + ') ';\r\n//dm.XDataWebClient1.RawInvoke('IReportService.ExecQuery',[sql_p, egv_facilityid], @OnResult);\r\nsql_pool[1] := sql_p;\r\n\r\ni := 10001; j := 2; n := 0;\r\nwhile copy(value_p,i,10000) <> ''\r\ndo begin\r\n sql_p := ' update ini_ident set notes = cast(notes as varchar(max)) + ' + quotedstr(copy(value_p,i,10000)) +\r\n ' where section_name = ' + quotedstr(section_p) + ' and ' +\r\n ' userid = ' + quotedstr('SYSDBA') + ' and ' +\r\n ' FACILITYID = ' + EGV_FACILITYID;\r\n i := i + 10000;\r\n// dm.XDataWebClient1.RawInvoke('IReportService.ExecQuery',[sql_p, egv_facilityid], OnResult);\r\n sql_pool[j] := sql_p;\r\n j := j + 1;\r\n end;\r\ndm.XDataWebClient1.RawInvoke('IReportService.ExecQuery',[sql_pool[0], egv_facilityid, '1'], @OnResult);\r\nend;\r\n\r\nprocedure LS_Load;\r\nvar i: integer; section_p, value_p, sql_p, s,s1,s2,s3: string; sa: array of string;\r\n\r\n procedure ParseResponse(Response_p: widestring);\r\n begin\r\n Response_p := stringreplace(Response_p, '$\"$', '''', [rfIgnoreCase, rfReplaceAll]);\r\n s := trim(response_p);\r\n // showmessage(inttostr(pos('$', s)));\r\n s := stringreplace(s,'***',chr(149),[rfReplaceAll]);\r\n\r\n { showmessage('parse start: ' + inttostr(length(splitstring(s,'#'))));\r\n showmessage('parse start: ' + inttostr(length(s)));\r\n showmessage(copy(s,336000, 1000)); }\r\n\r\n sa := splitstring(s,chr(149));\r\n setlength(sa, length(splitstring(s,chr(149))) - 1);\r\n for i := 0 to length(sa) - 1\r\n do begin\r\n s1 := trim(sa[i]);\r\n // showmessage(s1);\r\n if (s1 = '') or (pos('^', s1) = 0) then continue;\r\n s2 := trim(splitstring(s1,'^')[0]); // name\r\n s3 := trim(splitstring(s1,'^')[1]); // value\r\n if s2 = '' then continue;\r\n // if pos('EGV_QAI_CERNERTOKEN',uppercase(s2)) > 0 then showmessage(s2 + ' --------------- ' + s3);\r\n\r\n dm.egv_localstorage.values[uppercase(s2)] := s3;\r\n // showmessage(s2 + ' --- ' + s3);\r\n end;\r\n //showmessage('parse ends: ' + s);\r\n\r\n { i := 1;\r\n while pos('***', s) > 0\r\n do begin\r\n // if length(s) < 500 then showmessage(s);\r\n s1 := trim(copy(s, 4, pos('^', s) - 4)); // var. name\r\n s2 := trim(copy(s, pos('^', s) + 1, length(s)));\r\n if pos('***', s2) > 0\r\n then s3 := trim(copy(s2, 1, pos('***', s2) - 1)) // value\r\n else s3 := s2;\r\n dm.egv_localstorage.values[uppercase(s1)] := s3;\r\n if pos('***', s2) > 0\r\n then s := copy(s2, pos('***', s2), length(s2))\r\n else s := '';\r\n i := i + 1;\r\n end; }\r\n //Open main form\r\n //showmessage('open main form');\r\n OpenMainForm;\r\n end;\r\n\r\n procedure OnResult1(Response: TXDataClientResponse);\r\n var Response_p: widestring;\r\n\r\n procedure OnResult2(Response: TXDataClientResponse);\r\n var Response_p: widestring;\r\n begin\r\n // showmessage('end load design data: ');\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n // showmessage(response_p);\r\n ParseResponse(Response_p);\r\n end;\r\n\r\n begin\r\n //showmessage('next load design data: ' + sql_p);\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n if response_p <> ''\r\n then ParseResponse(Response_p)\r\n else begin\r\n // if no data read facility level settings\r\n sql_p := 'select cast(notes as varchar(max)) from ini_ident where ' +\r\n ' section_name = ' + quotedstr(section_p) + ' and ' +\r\n ' facilityid = ' + EGV_FACILITYID + ' and ' +\r\n ' USERID = ' + quotedstr('SYSDBA');\r\n // showmessage('load: ' + sql_p);\r\n dm.XDataWebClient1.RawInvoke('IReportService.GetColumnData',[sql_p , egv_facilityid, '1'], @OnResult2);\r\n end;\r\n end;\r\n\r\nbegin\r\n// OpenMainForm;\r\n// exit;\r\n\r\nsection_p := 'QAPPBUILDER_SETTINGS' + trim(EGV_SCREENSIZE);\r\n//showmessage('section: ' + section_p);\r\n// First try to read connected user settings\r\nsql_p := 'select cast(notes as varchar(max)) from ini_ident where ' +\r\n ' section_name = ' + quotedstr(section_p) + ' and ' +\r\n ' facilityid = ' + EGV_FACILITYID + ' and ' +\r\n ' USERID = ' + quotedstr(EGV_USERID);\r\n //showmessage('start load design data: ' + sql_p);\r\ndm.XDataWebClient1.RawInvoke('IReportService.GetColumnData',[sql_p , egv_facilityid, '1'], @OnResult1);\r\nend;\r\n\r\nprocedure APPSettings_Copy(from_p: string; to_p: string; useridfrom_p: string='SYSDBA'; useridto_p: string='SYSDBA');\r\nvar i: integer; section_p, value_p, sql_p, s,s1,s2,s3: string;\r\n\r\nbegin\r\n//showmessage(from_p + ' --- ' + to_p + ' --- ' + useridfrom_p + ' --- ' + useridto_p);\r\n//exit;\r\n// Main menu\r\nsql_p := ' delete from ini_ident where section_name = ' + quotedstr('QAPPBUILDER_MAIN_MENU') + ' and ' +\r\n ' facilityid = ' + to_p + ' and userid = ' + quotedstr(useridto_p); //showmessage(sql_p);\r\nsql_p := sql_p + chr(13) ;\r\n\r\nsql_p := sql_p + ' insert into ini_ident(USERID, SECTION_NAME, IDENT_NAME, IDENT_VALUE, FACILITYID, VISIBLE, SPECIALITY) ' +\r\n ' select ' + quotedstr(useridto_p) + ', ' + quotedstr('QAPPBUILDER_MAIN_MENU') +\r\n ', IDENT_NAME, IDENT_VALUE, ' + to_p + ', VISIBLE, SPECIALITY ' +\r\n ' from ini_ident where section_name = ' + quotedstr('QAPPBUILDER_MAIN_MENU') + ' and ' +\r\n ' facilityid = ' + from_p + ' and userid = ' + quotedstr(useridfrom_p); // showmessage(sql_p);\r\nsql_p := sql_p + chr(13) ;\r\n\r\n//showmessage(sql_p);\r\n//frmmain.WebMemo10.Text := sql_p;\r\n//exit;\r\n\r\n\r\n// Design data\r\n\r\nsql_p := sql_p + 'delete from ini_ident where section_name like ' + quotedstr('D[_]%') +\r\n ' and ( section_name like ' + quotedstr('%[_]T') + ' or ' +\r\n ' section_name like ' + quotedstr('%[_]V') + ' or ' +\r\n ' section_name like ' + quotedstr('%[_]P') +\r\n ' ) and facilityid = ' + to_p; // showmessage(sql_p);\r\nsql_p := sql_p + chr(13) ;\r\n\r\nsql_p := sql_p + ' insert into ini_ident(USERID, SECTION_NAME, IDENT_NAME, IDENT_VALUE, FACILITYID, VISIBLE) ' +\r\n ' select USERID, SECTION_NAME, IDENT_NAME, IDENT_VALUE, ' + to_p + ', VISIBLE ' +\r\n ' from ini_ident where section_name like ' + quotedstr('D[_]%') +\r\n ' and ( section_name like ' + quotedstr('%[_]T') + ' or ' +\r\n ' section_name like ' + quotedstr('%[_]V') + ' or ' +\r\n ' section_name like ' + quotedstr('%[_]P') +\r\n ' ) and facilityid = ' + from_p; // showmessage(sql_p);\r\nsql_p := sql_p + chr(13) ;\r\n\r\n// Dynamic grid columns\r\n// Data control settings ( Local Storage variables )\r\nsql_p := sql_p + ' delete from ini_ident where ( ' +\r\n ' section_name like ' + quotedstr('GRDDYNAMICGRID%') + ' or ' +\r\n ' section_name like ' + quotedstr('G1_[_]%') + ' or ' +\r\n ' section_name like ' + quotedstr('G2_[_]%') + ' or ' +\r\n ' section_name like ' + quotedstr('G3_[_]%') + ' or ' +\r\n ' section_name like ' + quotedstr('G4_[_]%') + ' or ' +\r\n ' section_name like ' + quotedstr('G5_[_]%') + ' or ' +\r\n ' section_name like ' + quotedstr('G6_[_]%') + ' or ' +\r\n ' section_name like ' + quotedstr('G7_[_]%') + ' or ' +\r\n ' section_name like ' + quotedstr('G8_[_]%') + ' or ' +\r\n ' section_name like ' + quotedstr('G9_[_]%') + ' ) ' +\r\n ' and facilityid = ' + to_p + ' and ' + ' userid = ' + quotedstr(useridto_p); // showmessage(sql_p);\r\nsql_p := sql_p + chr(13);\r\n\r\nsql_p := sql_p + ' insert into ini_ident(USERID, SECTION_NAME, IDENT_NAME, IDENT_VALUE, FACILITYID, NOTES, VISIBLE, SPECIALITY) ' +\r\n ' select ' + quotedstr('SYSDBA') + ', SECTION_NAME, IDENT_NAME, IDENT_VALUE, ' + to_p + ', NOTES, VISIBLE, SPECIALITY ' +\r\n ' from ini_ident where ( ' +\r\n ' section_name like ' + quotedstr('GRDDYNAMICGRID%') + ' or ' +\r\n ' section_name like ' + quotedstr('G1_[_]%') + ' or ' +\r\n ' section_name like ' + quotedstr('G2_[_]%') + ' or ' +\r\n ' section_name like ' + quotedstr('G3_[_]%') + ' or ' +\r\n ' section_name like ' + quotedstr('G4_[_]%') + ' or ' +\r\n ' section_name like ' + quotedstr('G5_[_]%') + ' or ' +\r\n ' section_name like ' + quotedstr('G6_[_]%') + ' or ' +\r\n ' section_name like ' + quotedstr('G7_[_]%') + ' or ' +\r\n ' section_name like ' + quotedstr('G8_[_]%') + ' or ' +\r\n ' section_name like ' + quotedstr('G9_[_]%') + ' ) ' +\r\n ' and facilityid = ' + from_p + ' and ' + ' userid = ' + quotedstr(useridfrom_p);\r\n\r\n// Data control settings ( Local Storage variables )\r\nsql_p := sql_p + 'delete from ini_ident where section_name = ' + quotedstr('QAPPBUILDER_SETTINGS') +\r\n ' and facilityid = ' + to_p + ' and ' + ' userid = ' + quotedstr(useridto_p); // showmessage(sql_p);\r\nsql_p := sql_p + chr(13);\r\n\r\nsql_p := sql_p + ' insert into ini_ident(USERID, SECTION_NAME, IDENT_NAME, IDENT_VALUE, FACILITYID, NOTES, VISIBLE, SPECIALITY) ' +\r\n ' select ' + quotedstr(useridto_p) + ', ' + quotedstr('QAPPBUILDER_SETTINGS') +\r\n ', IDENT_NAME, IDENT_VALUE, ' + to_p + ', NOTES, VISIBLE, SPECIALITY ' +\r\n ' from ini_ident where section_name = ' + quotedstr('QAPPBUILDER_SETTINGS') +\r\n ' and facilityid = ' + from_p + ' and ' + ' userid = ' + quotedstr(useridfrom_p);\r\n\r\n//showmessage(sql_p);\r\ndm.XDataWebClient1.RawInvoke('IReportService.ExecQuery',[sql_p, egv_facilityid, '1'], nil);\r\nend;\r\n\r\nprocedure BlockShowEditMask(Sender: TObject);\r\nvar s: string;\r\nbegin\r\ns := dm.egv_localstorage.values['DBF_' + EGV_BLOCKUNIQUEID];\r\n//showmessage(splitstring(s,'|')[13]);\r\n//frmmain.WebMemo1.Text := splitstring(s,'|')[13];\r\n // showmessage(inttostr(length(splitstring(s,'|'))));\r\nif (length(splitstring(s,'|')) >= 27) and (splitstring(s,'|')[26]<> '')\r\nthen begin\r\n frmmain.edtEditMask.borderstyle := bsNone;\r\n frmmain.edtEditMask.editmask := splitstring(s,'|')[26];\r\n frmmain.edtEditMask.parent := (sender as TControl).parent;\r\n frmmain.edtEditMask.top := (sender as TControl).top;\r\n frmmain.edtEditMask.left := (sender as TControl).left;\r\n frmmain.edtEditMask.width := (sender as TControl).width;\r\n frmmain.edtEditMask.height := (sender as TControl).height;\r\n frmmain.edtEditMask.visible := true;\r\n frmmain.edtEditMask.text := (sender as Tmemo).text;\r\n frmmain.edtEditMask.setfocus;\r\n end;\r\nend;\r\n\r\nprocedure BlockEditBoxMouseLeave(Sender: TObject);\r\nvar i: integer;\r\nbegin\r\nif BlockGetMemo(EGV_CURRENTBLOCK) <> nil\r\nthen begin\r\n //showmessage(frmmain.edtEditMask.text);\r\n BlockGetMemo(EGV_CURRENTBLOCK).Text := frmmain.edtEditMask.text;\r\n BlockGetMemo(EGV_CURRENTBLOCK).Tag := 1; // modified\r\n end;\r\n{\r\nfor i := 0 to (frmmain.edtEditMask.parent as TWebpanel).controlcount - 1\r\ndo if (frmmain.edtEditMask.parent as TWebpanel).controls[i] is TWebmemo\r\n then begin\r\n ( (frmmain.edtEditMask.parent as TWebpanel).controls[i] as TWebmemo).text := frmmain.edtEditMask.text;\r\n ( (frmmain.edtEditMask.parent as TWebpanel).controls[i] as TWebmemo).Tag := 1; // updated\r\n end; }\r\n//showmessage('1');\r\nfrmmain.edtEditMask.visible := false;\r\nend;\r\n\r\nprocedure OpenMainForm;\r\nbegin\r\nApplication.CreateForm(TfrmMain, frmMain);\r\nend;\r\n\r\nprocedure RunReport(Viewpdf: TBrowserControl; TemplateType: string=''; TemplateID: integer = 1; Stretch_p: Boolean=true);\r\nvar s: string;\r\n\r\n procedure OnResult_gettemplate(Response: TXDataClientResponse);\r\n var Response_p: string;\r\n\r\n procedure OnResult_ViewReport(Response: TXDataClientResponse);\r\n var Response_p: string;\r\n begin\r\n try\r\n Response_p := string(TJSObject(Response.Result)['value']); // report link\r\n //Showmessage('View: ' + response_p);\r\n if Response_p = '1' then exit; // wait / repeat;\r\n\r\n EGV_REPORTSURL := Response_p; //'https://test.ArgusMedGPT.com/REPORTS';\r\n\r\n // https://test.ArgusMedGPT.com/REPORTS/ProcRPT_127_28_2_1.pdf#view=FitH\r\n\r\n // Showmessage(EGV_REPORTSURL + '/' + Templatetype +'_' +\r\n // EGV_CURRENT_PROCEDURENUMBER + '_' +\r\n // EGV_FACILITYID + '_' +\r\n // inttostr(templateid) + '_' +\r\n // '1' + '.pdf' + '#view=FitH');\r\n ELV_REPORTFILENAME := Templatetype +'_' + EGV_CURRENT_PROCEDURENUMBER + '_' +\r\n EGV_FACILITYID + '_' + inttostr(templateid) + '_' + '1' + '.pdf';\r\n\r\n if Stretch_p\r\n then viewpdf.URL := EGV_REPORTSURL + '#view=FitH' { + '/' + Templatetype +'_' +\r\n EGV_CURRENT_PROCEDURENUMBER + '_' +\r\n EGV_FACILITYID + '_' +\r\n inttostr(templateid) + '_' +\r\n '1' + '.pdf' + '#view=FitH' }\r\n else viewpdf.URL := EGV_REPORTSURL; { + '/' + Templatetype +'_' +\r\n EGV_CURRENT_PROCEDURENUMBER + '_' +\r\n EGV_FACILITYID + '_' +\r\n inttostr(templateid) + '_' +\r\n '1' + '.pdf'; }\r\n //showmessage(viewpdf.URL);\r\n\r\n {\r\n nameddest = destination Specifies a named destination in the PDF document.\r\n page = pagenum Specifies a numbered page in the document, using an integer value.\r\n The document’s first page has a pagenum value of 1.\r\n comment = commentID Specifies a comment on a given page in the PDF document.\r\n Use the page command before this command.\r\n For example: #page=1&comment=452fde0e-fd22-457c-84aa2cf5bed5a349 5Adobe\r\n Acrobat SDK Parameters for Opening PDF Files Parameters for Opening PDF Files Parameters\r\n 6 Syntax Description collab=setting Sets the comment repository to be used to supply and store comments for the document.\r\n This overrides the default comment server for the review or the default preference.\r\n The setting is of the form store_type@location,\r\n where valid values for store_type are: DAVFDF (WebDAV) FSFDF (Network folder) DB (ADBC)\r\n For example: #collab=DAVFDF@http://review_server/Collab /user1 For more information on comment repositories,\r\n see Acrobat Online Collaboration: Setup and Administration. zoom=scale zoom=scale,left,top Sets the zoom and scroll factors,\r\n using float or integer values. For example, a scale value of 100 indicates a zoom value of 100%.\r\n Scroll values left and top are in a coordinate system where 0,0 represents the top left corner of the visible page,\r\n regardless of document rotation.\r\n view=Fit view=FitH view=FitH,top view=FitV view=FitV,left view=FitB view=FitBH view=FitBH,top view=FitBV\r\n view=FitBV,left Set the view of the displayed page, using the keyword values defined in the PDF language specification.\r\n For more information, see the PDF Reference.\r\n Scroll values left and top are floats or integers in a coordinate system where\r\n 0,0 represents the top left corner of the visible page, regardless of document rotation.\r\n viewrect=left,top,wd,ht Use the page command before this command. Note: This parameter is not supported on the command line.\r\n Sets the view rectangle using float or integer values in a coordinate system where 0,0 represents the top left corner of the visible page,\r\n regardless of document rotation. pagemode=bookmarks pagemode=thumbs pagemode=none (default) Use the page command before this command.\r\n Note: This parameter is not supported on the command line. Displays bookmarks or thumbnails.\r\n scrollbar=1|0 Turns scrollbars on or off.\r\n Adobe Acrobat SDK Parameters for Opening PDF Files Parameters for Opening PDF Files\r\n Specifying parameters in a URL 7 Syntax Description search=wordList Opens the Search panel and performs a search for any of the words\r\n in the specified word list. The first matching word is highlighted in the document.\r\n The words must be enclosed in quotation marks and separated by spaces.\r\n For example: #search=\"word1 word2\" You can search only for single words. You cannot search for a string of words.\r\n toolbar=1|0 Turns the toolbar on or off. statusbar=1|0 Turns the status bar on or off. messages=1|0 Turns the document message bar on or off.\r\n navpanes=1|0 Turns the navigation panes and tabs on or off.\r\n highlight=lt,rt,top,btm Highlights a specified rectangle on the displayed page. Use the page command before this command.\r\n The rectangle values are integers in a coordinate system where 0,0 represents the top left corner of the visible page,\r\n regardless of document rotation. fdf=URL Specifies an FDF file to populate form fields in the PDF file being opened.\r\n For example: #fdf=http://example.org/doc.fdf Note: The fdf parameter should be specified last in a URL.\r\n Specifying parameters in a URL You can specify multiple parameters in a single URL.\r\n Separate each parameter with either an ampersand (&) or a pound (#) character.\r\n Actions are processed and executed from left to right as they appear in the URL.\r\n Because all specified actions are executed, it is possible that later actions will override the effects of previous actions,\r\n so it is important to use the correct order. For example, page actions should appear before zoom actions.\r\n Commands are not case sensitive except for the value of a named destination. There can be no spaces in the URL.\r\n\r\n }\r\n\r\n finally\r\n if frmmain.wmWaitMessage.showing and (frmmain.wmWaitMessage.Tag = 0) then frmmain.wmWaitMessage.hide;\r\n end;\r\n end;\r\n\r\n begin\r\n //showmessage('Build report');\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n //Showmessage(TemplateType);\r\n if dm.XDataWebConnection2.Connected\r\n then dm.XDataWebClient2.RawInvoke('IReportService.BuildReport', [Response_p, EGV_CURRENT_PROCEDURENUMBER,\r\n EGV_CURRENT_MRN,\r\n EGV_FACILITYID, // dm.xdsScheduleP_PIDFACILITYID.AsString, // Facility ID\r\n EGV_FACILITY,\r\n inttostr(templateid), //Template ID 1 - first template\r\n '1', // Language ID\r\n TemplateType, // Template TYPE\r\n formatdatetime('YYYY.MM.DD', date), // date range;\r\n formatdatetime('YYYY.MM.DD', date)],\r\n\r\n @OnResult_ViewReport);\r\n\r\n // '\\\\vulcan\\tshome\\paruir\\APPS\\ENRWEB\\TMSWeb\\Release\\'\r\n end;\r\n\r\n\r\n\r\nbegin\r\n//CloseOpenedForm();\r\n//showmessage(egv_currentform.name)\r\n//showmessage(self.name);\r\n//Showmessage(TemplateType);\r\n\r\n//frmmain.wmWaitMessage.show;\r\n//showmessage('get template');\r\ns := ' select top 1 FRTEMPLATE from templates where ' +\r\n ' facilityid = ' + EGV_FACILITYID + ' and ' +\r\n ' templateid = ' + inttostr(templateid) + ' and ' +\r\n ' languageID = ' + '1' + ' and ' +\r\n ' templatetype = ' + quotedstr(TemplateType);\r\n// showmessage(s);\r\ndm.XDataWebClient1.RawInvoke('IReportService.GetColumnData',[s , egv_facilityid, '1'], @OnResult_gettemplate);\r\n//showmessage('3');\r\nend;\r\n\r\nprocedure CustomizeDateTimeFormats;\r\nbegin\r\n if pos('/', dm.EGV_LOCALSTORAGE.Values['EGV_DATEFORMAT']) > 0 then Formatsettings.DateSeparator := '/';\r\n if pos('-', dm.EGV_LOCALSTORAGE.Values['EGV_DATEFORMAT']) > 0 then Formatsettings.DateSeparator := '-';\r\n if pos('.', dm.EGV_LOCALSTORAGE.Values['EGV_DATEFORMAT']) > 0 then Formatsettings.DateSeparator := '.';\r\n if pos(':', dm.EGV_LOCALSTORAGE.Values['EGV_TIMEFORMAT']) > 0 then Formatsettings.TimeSeparator := ':';\r\n Formatsettings.ShortDateFormat := dm.EGV_LOCALSTORAGE.Values['EGV_DATEFORMAT'];\r\n Formatsettings.ShortTimeFormat := dm.EGV_LOCALSTORAGE.Values['EGV_TIMEFORMAT'];\r\n Formatsettings.TimeAMString := dm.EGV_LOCALSTORAGE.Values['EGV_TIMEAM'];\r\n Formatsettings.TimePMString := dm.EGV_LOCALSTORAGE.Values['EGV_TIMEPM'];\r\nend;\r\n\r\nprocedure ResizeButtons(ButtonPanel_p: TPanel; forceresize_p: boolean=true);\r\nvar i, totalwidth_p : integer;\r\nbegin // showmessage('start');\r\n\r\nif not ButtonPanel_p.Visible then exit;\r\n\r\ntotalwidth_p := 0;\r\nfor i := 0 to ButtonPanel_p.ControlCount - 1\r\ndo begin\r\n if (ButtonPanel_p.Controls[i] is TBitBtn) and ((ButtonPanel_p.Controls[i] as TBitBtn).MaterialGlyph <> '' ) and\r\n (ButtonPanel_p.Controls[i] as TBitBtn).visible\r\n then totalwidth_p := totalwidth_p + 100;\r\n end;\r\n\r\nfor i := 0 to ButtonPanel_p.ControlCount - 1\r\ndo begin\r\n if ButtonPanel_p.Controls[i] is TBitBtn\r\n then begin // showmessage((ButtonPanel_p.Controls[i] as TWebBitBtn).caption);\r\n if copy( trim((ButtonPanel_p.Controls[i] as TBitBtn).caption), 1, 1) = '<'\r\n then begin\r\n (ButtonPanel_p.Controls[i] as TBitBtn).Width := 30;\r\n // (ButtonPanel_p.Controls[i] as TWebBitBtn).ElementClassName := 'btn_icon';\r\n (ButtonPanel_p.Controls[i] as TBitBtn).ShowHint := true;\r\n end\r\n else begin\r\n (ButtonPanel_p.Controls[i] as TBitBtn).Width := 90;\r\n // (ButtonPanel_p.Controls[i] as TWebBitBtn).ElementClassName := 'btn_text';\r\n end;\r\n\r\n { // showmessage((ButtonPanel_p.Controls[i] as TWebBitBtn).caption + ' --- ' + (ButtonPanel_p.Controls[i] as TWebBitBtn).MaterialGlyph);\r\n if (forceresize_p or (totalwidth_p >= buttonpanel_p.width)) and\r\n trim(copy( (ButtonPanel_p.Controls[i] as TWebBitBtn).caption, 1, 1)) = '<'\r\n then begin\r\n //showmessage((ButtonPanel_p.Controls[i] as TWebBitBtn).caption);\r\n (ButtonPanel_p.Controls[i] as TWebBitBtn).ElementClassName := 'btn_icon';\r\n (ButtonPanel_p.Controls[i] as TWebBitBtn).Width := 35;\r\n (ButtonPanel_p.Controls[i] as TWebBitBtn).MaterialGlyph := '';\r\n (ButtonPanel_p.Controls[i] as TWebBitBtn).MaterialGlyphSize := 25;\r\n (ButtonPanel_p.Controls[i] as TWebBitBtn).ShowHint := true;\r\n end\r\n else begin\r\n // showmessage((ButtonPanel_p.Controls[i] as TWebBitBtn).Name);\r\n (ButtonPanel_p.Controls[i] as TWebBitBtn).ElementClassName := 'btn btn-outline-info';\r\n (ButtonPanel_p.Controls[i] as TWebBitBtn).Width := 90;\r\n (ButtonPanel_p.Controls[i] as TWebBitBtn).MaterialGlyphSize := 1;\r\n if (ButtonPanel_p.Controls[i] as TWebBitBtn).Caption = ''\r\n then (ButtonPanel_p.Controls[i] as TWebBitBtn).Caption := (ButtonPanel_p.Controls[i] as TWebBitBtn).hint;\r\n (ButtonPanel_p.Controls[i] as TWebBitBtn).ShowHint := false;\r\n end; }\r\n end;\r\n end;\r\n // showmessage('end');\r\nend;\r\n\r\nfunction BlockGetSentenceTMP(BlockUniqueID_p: string): string;\r\nvar s: string;\r\nbegin\r\n//showmessage('block id(common): ' + BlockUniqueID_p);\r\nresult := '';\r\ns := dm.egv_localstorage.values['DBF_' + BlockUniqueID_p];\r\nif (length(splitstring(s,'|')) >= 17) and (splitstring(s,'|')[16] <> '')\r\nthen result := splitstring(s,'|')[16]\r\nend;\r\n\r\nfunction BlockGetCopyTMP(BlockUniqueID_p: string): string;\r\nvar s: string;\r\nbegin\r\nresult := '';\r\ns := dm.egv_localstorage.values['DBF_' + BlockUniqueID_p];\r\n//showmessage(splitstring(s,'|')[16]);\r\nif (length(splitstring(s,'|')) >= 14) and (splitstring(s,'|')[13] <> '')\r\nthen result := splitstring(s,'|')[13]\r\nend;\r\n\r\nfunction BlockGetTitle(Block_p: Tpanel): string;\r\nvar i, j: integer;\r\nbegin\r\nResult := '';\r\nif Block_p = nil then exit;\r\n\r\nfor i := 0 to block_p.controlcount - 1\r\ndo begin\r\n if block_p.Controls[i] is TPanel\r\n then begin\r\n for j := 0 to (block_p.Controls[i] as TPanel).Controlcount -1\r\n do begin\r\n if (block_p.Controls[i] as TPanel).Controls[i] is TLabel\r\n then begin\r\n Result := ((block_p.Controls[i] as TPanel).Controls[i] as TLabel).Caption;\r\n exit;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction BlockGetTitleLabel(Block_p: Tpanel): TLabel;\r\nvar i, j: integer;\r\nbegin\r\nResult := nil;\r\nif Block_p = nil then exit;\r\n\r\nfor i := 0 to block_p.controlcount - 1\r\ndo begin\r\n if block_p.Controls[i] is TPanel\r\n then begin\r\n for j := 0 to (block_p.Controls[i] as TPanel).Controlcount -1\r\n do begin\r\n if (block_p.Controls[i] as TPanel).Controls[i] is TLabel\r\n then begin\r\n Result := ((block_p.Controls[i] as TPanel).Controls[i] as TLabel);\r\n exit;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction BlockGetTopPanel(Block_p: Tpanel): Tpanel;\r\nvar i, j: integer;\r\nbegin\r\nResult := nil;\r\nif Block_p = nil then exit;\r\n\r\nfor i := 0 to block_p.controlcount - 1\r\ndo begin\r\n if block_p.Controls[i] is TPanel\r\n then begin\r\n Result := (block_p.Controls[i] as TPanel);\r\n exit;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure ParseAndShowMainMenuLine;\r\nvar i, j, k: integer;\r\nbegin\r\nwith GetCurrentForm()\r\ndo begin\r\n ( findcomponent('cb1' ) as TComboBox).ItemIndex :=\r\n ( findcomponent('cb1' ) as TComboBox).Items.IndexOf(splitstring(dm.xdsPicklistIDENT_VALUE.asstring,'^')[0]);\r\n //showmessage(splitstring(dm.xdsPicklistIDENT_VALUE.asstring,'^')[0]);\r\n if splitstring(dm.xdsPicklistIDENT_VALUE.asstring,'^')[0] = 'M'\r\n then begin\r\n for i := 1 to 5 do ( findcomponent('me'+inttostr(i)) as TControl).visible := true;\r\n for i := 5 to 42 do ( findcomponent('e'+inttostr(i)) as TControl).visible := false;\r\n (findcomponent('e6_2') as TEdit).visible := false; // report template name\r\n\r\n // for i := 1 to 4 do ( findcomponent('e'+inttostr(i)) as TWebEdit).visible := true;\r\n ( findcomponent('l2') as Tlabel).visible := true;\r\n for i := 3 to 13 do ( findcomponent('l'+inttostr(i)) as Tlabel).visible := false;\r\n\r\n for i := 1 to 5\r\n do begin\r\n if findcomponent('me'+inttostr(i)) is TEdit\r\n then ( findcomponent('me'+inttostr(i)) as TEdit).text := splitstring(dm.xdsPicklistIDENT_VALUE.asstring,'^')[i];\r\n if findcomponent('me'+inttostr(i)) is TMemo\r\n then ( findcomponent('me'+inttostr(i)) as TMemo).text := splitstring(dm.xdsPicklistIDENT_VALUE.asstring,'^')[i];\r\n end;\r\n end\r\n else begin //'F'\r\n for i := 1 to 5 do ( findcomponent('me'+inttostr(i)) as TControl).visible := false;\r\n for i := 5 to 42 do ( findcomponent('e'+inttostr(i)) as TControl).visible := true;\r\n (findcomponent('e6_2') as TEdit).visible := true; // report template name\r\n // for i := 1 to 4 do ( findcomponent('e'+inttostr(i)) as TWebEdit).visible := false;\r\n ( findcomponent('l2') as Tlabel).visible := false;\r\n for i := 3 to 13 do ( findcomponent('l'+inttostr(i)) as Tlabel).visible := true;\r\n //Form name and caption\r\n (findcomponent('e5') as TEdit).text := splitstring(dm.xdsPicklistIDENT_VALUE.asstring,'^')[1];\r\n (findcomponent('e6') as TEdit).text := splitstring(dm.xdsPicklistIDENT_VALUE.asstring,'^')[2];\r\n (findcomponent('e6_2') as TEdit).text := splitstring(dm.xdsPicklistIDENT_VALUE.asstring,'^')[3]; // report template name\r\n\r\n k := length(splitstring(dm.xdsPicklistIDENT_VALUE.asstring, '^')) - 39;\r\n //showmessage(inttostr(length(splitstring(dm.xdsPicklistIDENT_VALUE.asstring, '^'))));\r\n //Buttons\r\n j := 0;\r\n {for i := 3 + k to 36\r\n do begin\r\n if findcomponent('e'+inttostr(i + 4)) <> nil\r\n then begin\r\n\r\n if findcomponent('e'+inttostr(i + 4)) is TWebEdit then ( findcomponent('e'+inttostr(i + 4)) as TWebEdit).text := splitstring(dm.xdsPicklistIDENT_VALUE.asstring,'^')[i];\r\n if findcomponent('e'+inttostr(i + 4)) is TWebMemo\r\n then begin\r\n //showmessage(inttostr(i) + ' --- ' + dm.xdsPicklistIDENT_VALUE.asstring);\r\n ( findcomponent('e'+inttostr(i + 4)) as TWebMemo).text := splitstring(dm.xdsPicklistIDENT_VALUE.asstring,'^')[i];\r\n end;\r\n end;\r\n\r\n end; }\r\n for i := 4 to 36\r\n do begin\r\n if findcomponent('e'+inttostr(i + 3)) <> nil\r\n then begin\r\n\r\n if findcomponent('e'+inttostr(i + 3)) is TEdit then ( findcomponent('e'+inttostr(i + 3)) as TEdit).text := splitstring(dm.xdsPicklistIDENT_VALUE.asstring,'^')[i];\r\n if findcomponent('e'+inttostr(i + 3)) is TMemo\r\n then begin\r\n //showmessage(inttostr(i) + ' --- ' + dm.xdsPicklistIDENT_VALUE.asstring);\r\n ( findcomponent('e'+inttostr(i + 3)) as TMemo).text := splitstring(dm.xdsPicklistIDENT_VALUE.asstring,'^')[i];\r\n end;\r\n end;\r\n\r\n end;\r\n\r\n end;\r\n // showmessage('4');\r\n for i := 1 to 5\r\n do begin\r\n if findcomponent('me'+inttostr(i)) is TEdit\r\n then if ( findcomponent('me'+inttostr(i)) as TEdit).text = 'undefined' then ( findcomponent('me'+inttostr(i)) as TEdit).text := '';\r\n if findcomponent('me'+inttostr(i)) is TMemo\r\n then if ( findcomponent('me'+inttostr(i)) as TMemo).text = 'undefined' then ( findcomponent('me'+inttostr(i)) as TMemo).text := '';\r\n end;\r\n for i := 5 to 42\r\n do begin\r\n if findcomponent('e'+inttostr(i)) is TEdit\r\n then if ( findcomponent('e'+inttostr(i)) as TEdit).text = 'undefined' then ( findcomponent('e'+inttostr(i)) as TEdit).text := '';\r\n if findcomponent('e'+inttostr(i)) is TMemo\r\n then if ( findcomponent('e'+inttostr(i)) as TMemo).text = 'undefined' then ( findcomponent('e'+inttostr(i)) as TMemo).text := '';\r\n end;\r\n // showmessage('5');\r\n end;\r\nend;\r\n\r\nprocedure ParseAndShowGridSetupLine;\r\nvar i: integer;\r\nbegin\r\nwith GetPreviousForm()\r\ndo begin\r\n for i := 1 to 6\r\n do begin\r\n if findcomponent('e'+inttostr(i)) is TEdit\r\n then ( findcomponent('e'+inttostr(i)) as TEdit ).text := splitstring(dm.xdsPicklistIDENT_VALUE.asstring,'|')[i-1];\r\n if findcomponent('e'+inttostr(i)) is TMemo\r\n then ( findcomponent('e'+inttostr(i)) as TMemo ).text := splitstring(dm.xdsPicklistIDENT_VALUE.asstring,'|')[i-1];\r\n end;\r\n for i := 1 to 6\r\n do begin\r\n if findcomponent('e'+inttostr(i)) is TEdit\r\n then if ( findcomponent('e'+inttostr(i)) as TEdit).text = 'undefined' then ( findcomponent('e'+inttostr(i)) as TEdit).text := '';\r\n if findcomponent('e'+inttostr(i)) is TMemo\r\n then if ( findcomponent('e'+inttostr(i)) as Tmemo).text = 'undefined' then ( findcomponent('e'+inttostr(i)) as TMemo).text := '';\r\n end;\r\n end;\r\nend;\r\n\r\nfunction BlockGetEditButton(Block_p: Tpanel): TSpeedButton;\r\nvar i, j: integer;\r\nbegin // showmessage('1');\r\nResult := nil;\r\nif Block_p = nil then exit;\r\n\r\nfor i := 0 to block_p.controlcount - 1\r\ndo begin\r\n if block_p.Controls[i] is TPanel\r\n then begin\r\n for j := 0 to (block_p.Controls[i] as TPanel).ControlCount - 1\r\n do if ((block_p.Controls[i] as TPanel).Controls[j] is TSpeedButton) and\r\n (((block_p.Controls[i] as TPanel).Controls[j] as TSpeedButton).MaterialGlyph = 'edit')\r\n then Result := ((block_p.Controls[i] as TPanel).Controls[j] as TSpeedButton);\r\n // showmessage(result.Name);\r\n exit;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction BlockGetMemo(Block_p: Tpanel): TMemo;\r\nvar i, j: integer;\r\nbegin // showmessage('1');\r\nResult := nil;\r\nif Block_p = nil then exit;\r\n\r\nfor i := 0 to block_p.controlcount - 1\r\ndo begin\r\n if block_p.Controls[i] is TMemo\r\n then begin\r\n Result := (block_p.Controls[i] as TMemo);\r\n // showmessage(result.Name);\r\n exit;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction BlockGetBlockByTitle(Title_p: string; Container_p: TScrollBox): Tpanel;\r\nvar i, j: integer;\r\nbegin // showmessage('1');\r\nResult := nil;\r\nif Container_p = nil then exit;\r\n\r\nfor i := 0 to Container_p.controlcount - 1\r\ndo begin\r\n if (Container_p.Controls[i] is TPanel) and\r\n (uppercase(trim(BlockGetTitle((Container_p.Controls[i] as TPanel)))) = uppercase(trim(Title_p)))\r\n then begin\r\n Result :=(Container_p.Controls[i] as TPanel);\r\n // showmessage(result.Name);\r\n exit;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction BlockGetMemoByTitle(Title_p: string; Container_p: TScrollBox): TMemo;\r\nvar i, j: integer; b: TPanel;\r\nbegin // showmessage('1');\r\nResult := nil;\r\nif Container_p = nil then exit;\r\n\r\nfor i := 0 to Container_p.controlcount - 1\r\ndo begin\r\n if (Container_p.Controls[i] is TPanel) and\r\n (uppercase(trim(BlockGetTitle((Container_p.Controls[i] as TPanel)))) = uppercase(trim(Title_p)))\r\n then begin\r\n b := (Container_p.Controls[i] as TPanel);\r\n if b <> nil\r\n then result := BlockgetMemo(b);\r\n exit;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction BlockGetBlockByName(Name_p: string; Container_p: TScrollBox): Tpanel;\r\nvar i, j: integer;\r\nbegin // showmessage('1');\r\nResult := nil;\r\nif Container_p = nil then exit;\r\n\r\nfor i := 0 to Container_p.controlcount - 1\r\ndo begin\r\n if (Container_p.Controls[i] is TPanel) and\r\n (trim(uppercase((Container_p.Controls[i] as TPanel).name)) = uppercase(trim(Name_p)))\r\n then begin\r\n Result :=(Container_p.Controls[i] as TPanel);\r\n // showmessage(result.Name);\r\n exit;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction BlockGetHTML(Block_p: Tpanel): THTMLContainer;\r\nvar i, j: integer;\r\nbegin // showmessage('1');\r\nResult := nil;\r\nif Block_p = nil then exit;\r\n\r\nfor i := 0 to block_p.controlcount - 1\r\ndo begin\r\n if block_p.Controls[i] is THTMLContainer\r\n then begin\r\n Result := (block_p.Controls[i] as THTMLContainer);\r\n // showmessage(result.Name);\r\n exit;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction BlockGetGrid(Block_p: Tpanel): TDBGrid;\r\nvar i, j: integer;\r\nbegin // showmessage('1');\r\nResult := nil;\r\nif Block_p = nil then exit;\r\n\r\nfor i := 0 to block_p.controlcount - 1\r\ndo begin\r\n if block_p.Controls[i] is TDBGrid\r\n then begin\r\n Result := (block_p.Controls[i] as TDBGrid);\r\n // showmessage(result.Name);\r\n exit;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure BlockApplyDependencies(block_p: TPanel; value_p: string);\r\nvar i,j,k: integer; s, s1, s2, title, value, action, blocklist: string; c: TScrollBox; updated_p: boolean;\r\nbegin\r\nc := (block_p.Parent as TScrollBox);\r\nGetBlockUniqueID(block_p);\r\ns := dm.egv_localstorage.values['DBF_' + EGV_BLOCKUNIQUEID];\r\nif (value_p = '') or (length(splitstring(s,'|')) < 19) then exit;\r\n\r\nif length(splitstring(s,'|')) >= 20 // Set EGV variables\r\nthen begin\r\n s1 := splitstring(s,'|')[19];\r\n s1 := s1 + ',';\r\n updated_p := false;\r\n for i := 0 to length(splitstring(s1,',')) - 1\r\n do begin\r\n s2 := splitstring(s1,',')[i];\r\n // showmessage(s2);\r\n // if s2 <> '' then showmessage(s2 + ' - ' + value_p + ' - ' + EGV_CURRENT_PROCEDURENUMBER);\r\n if s2 = 'EGV_CURRENT_MRN' then begin if EGV_CURRENT_MRN <> value_p then begin EGV_CURRENT_MRN := value_p; updated_p := true; end;end;\r\n if s2 = 'EGV_CURRENT_PATIENTNAME' then begin if EGV_CURRENT_PATIENTNAME <> value_p then begin EGV_CURRENT_PATIENTNAME := value_p; updated_p := true; end;end;\r\n if s2 = 'EGV_CURRENT_PATIENTDOB' then begin if EGV_CURRENT_PATIENTDOB <> value_p then begin EGV_CURRENT_PATIENTDOB := value_p; updated_p := true; end;end;\r\n if s2 = 'EGV_PATIENTFHIRID' then begin if EGV_PATIENTFHIRID <> value_p then begin EGV_PATIENTFHIRID := value_p; updated_p := true; end;end;\r\n if s2 = 'ELV_PATIENTCERNERID' then begin if ELV_PATIENTCERNERID <> value_p then begin ELV_PATIENTCERNERID := value_p; updated_p := true; end;end;\r\n if s2 = 'EGV_CURRENT_APPTDATE' then begin if EGV_CURRENT_APPTDATE <> value_p then begin EGV_CURRENT_APPTDATE := value_p; updated_p := true; end;end;\r\n if s2 = 'EGV_CURRENT_PROCEDURENUMBER' then begin if EGV_CURRENT_PROCEDURENUMBER <> value_p then begin EGV_CURRENT_PROCEDURENUMBER := value_p; updated_p := true; end;end;\r\n if s2 = 'EGV_CURRENT_APPTNAME' then begin if EGV_CURRENT_APPTNAME <> value_p then begin EGV_CURRENT_APPTNAME := value_p; updated_p := true; end;end;\r\n if s2 = 'EGV_CURRENT_APPTTYPE' then begin if EGV_CURRENT_APPTTYPE <> value_p then begin EGV_CURRENT_APPTTYPE := value_p; updated_p := true; end;end;\r\n if s2 = 'EGV_CURRENT_PROVIDER' then begin if EGV_CURRENT_PROVIDER <> value_p then begin EGV_CURRENT_PROVIDER := value_p; updated_p := true; end;end;\r\n if s2 = 'EGV_FACILITY' then begin if EGV_FACILITY <> value_p then begin EGV_FACILITY := value_p; updated_p := true; end;end;\r\n if s2 = 'EGV_FACILITYID' then begin if EGV_FACILITYID <> value_p then begin EGV_FACILITYID := value_p; updated_p := true; end;end;\r\n if s2 = 'EGV_USERNAME' then begin if EGV_USERNAME <> value_p then begin EGV_USERNAME := value_p; updated_p := true; end;end;\r\n if s2 = 'EGV_USERID' then begin if EGV_USERID <> value_p then begin EGV_USERID := value_p; updated_p := true; end;end;\r\n if s2 = 'EGV_USERROLE' then begin if EGV_USERROLE <> value_p then begin EGV_USERROLE := value_p; updated_p := true; end;end;\r\n if s2 = 'EGV_FACILITYDBNAME' then begin if EGV_FACILITYDBNAME <> value_p then begin EGV_FACILITYDBNAME := value_p; updated_p := true; end;end;\r\n if s2 = 'EGV_CURRENTDATE' then begin if EGV_CURRENTDATE <> value_p then begin EGV_CURRENTDATE := value_p; updated_p := true; end;end;\r\n if s2 = 'EGV_CURRENTTIME' then begin if EGV_CURRENTTIME <> value_p then begin EGV_CURRENTTIME := value_p; updated_p := true; end;end;\r\n if s2 = 'EGV_SETUPFACILITYID' then begin if EGV_SETUPFACILITYID <> value_p then begin EGV_SETUPFACILITYID := value_p; updated_p := true; end;end;\r\n end;\r\n if updated_p\r\n then begin\r\n //showmessage('updated');\r\n DBF_GetPostBlocks(frmmain.sblogoBox, 0, frmmain);\r\n DBF_GetPostBlocks(frmmain.sbAlertBoxes, 0, frmmain);\r\n DBF_GetPostBlocks(frmmain.sbInfoBoxes, 0, frmmain);\r\n ReleaseGridDatasets(getcurrentform);\r\n\r\n // showmessage(egv_current_procedurenumber);\r\n\r\n DBF_GetPostBlocks(GetCurrentFormDiv, 0, getcurrentform, 2); // GRIDS only\r\n // showmessage('apply dependencies ' + inttostr(dm.xdsDynamicGrid2.Tag) );\r\n end;\r\n end;\r\n\r\ns := splitstring(s,'|')[18];\r\nif (s = 'undefined') or (s = '') then exit;\r\n//showmessage(s);\r\n//if pos('!', s) = 0 then s := s + '!';\r\n// showmessage(blockgettitle(block_p));\r\n\r\nfor i := 0 to length(splitstring(s,'!')) - 1\r\ndo begin\r\n s1 := splitstring(s,'!')[i];\r\n if (s1 <> 'undefined') and (trim(s1) <> '')\r\n then begin\r\n value := splitstring(s1,':')[0];\r\n blocklist := splitstring(s1,':')[1];\r\n // showmessage(s1);\r\n for j := 0 to length(splitstring(blocklist,',')) - 1\r\n do begin\r\n s2 := splitstring(blocklist,',')[j];\r\n action := copy(s2,1,1);\r\n if (action <> '+') and (action <> '-') then continue;\r\n title := copy(s2,3,length(s2));\r\n title := stringreplace(title,'<','',[rfreplaceall]);\r\n title := stringreplace(title,'>','',[rfreplaceall]);\r\n value := stringreplace(value,'<','',[rfreplaceall]);\r\n value := stringreplace(value,'>','',[rfreplaceall]);\r\n // showmessage( value_p + ' _______ ' + value + ' _________ ' + title + ' _________________' + action);\r\n for k := 0 to c.ControlCount -1\r\n do begin\r\n // showmessage(uppercase(blockgettitle(c.controls[k] as TWebpanel)));\r\n // find the block by title or block name\r\n if (c.controls[k] is Tpanel) and\r\n ((uppercase(blockgettitle(c.controls[k] as Tpanel)) = uppercase(title)) or\r\n (uppercase((c.controls[k] as Tpanel).Name) = uppercase(title)))\r\n then begin\r\n //showmessage( value_p + ' _______ ' + value + ' _________ ' + title + ' _________________' + action);\r\n if (trim(value_p) = trim(value))\r\n then begin\r\n if (action = '+') and ( not (c.controls[k] as Tpanel).visible ) and ((c.controls[k] as Tpanel).Tag = 1)\r\n then begin\r\n (c.controls[k] as Tpanel).Visible := true;\r\n (c.controls[k] as Tpanel).tag := 0;\r\n end;\r\n if (action = '-')\r\n then begin\r\n if not ((frmmain.btnSwitch_Design.state = ssOn) and EGV_SHOWHIDDENBLOCKSINDESIGN )\r\n then begin\r\n (c.controls[k] as Tpanel).Visible := false;\r\n (c.controls[k] as Tpanel).tag := 1;\r\n end;\r\n end;\r\n end\r\n else begin\r\n if (action = '+') and (c.controls[k] as Tpanel).visible\r\n then begin\r\n (c.controls[k] as Tpanel).Visible := false;\r\n (c.controls[k] as Tpanel).tag := 1;\r\n end;\r\n if (action = '-')\r\n then begin\r\n if not ((frmmain.btnSwitch_Design.state = ssOn) and EGV_SHOWHIDDENBLOCKSINDESIGN ) and ((c.controls[k] as Tpanel).Tag = 1)\r\n then begin\r\n (c.controls[k] as Tpanel).Visible := true;\r\n (c.controls[k] as Tpanel).tag := 1;\r\n end;\r\n end;\r\n end;\r\n {\r\n\r\n if ( not (c.controls[k] as TWebpanel).visible ) and ((c.controls[k] as TWebpanel).Tag = 1)\r\n then begin\r\n (c.controls[k] as TWebpanel).Visible := true;\r\n (c.controls[k] as TWebpanel).tag := 0;\r\n end; }\r\n end;\r\n end;\r\n end;\r\n\r\n end;\r\n end;\r\n organizeblocks((block_p.parent as TScrollBox));\r\n stretchallmemos((block_p.parent as TScrollBox));\r\nend;\r\n\r\nfunction PrepareScript(t_p: string; c_p: string; s_p: string): string;\r\nvar i: integer;\r\nbegin\r\nfor i := 0 to length(splitstring(c_p,'|')) -1\r\ndo begin\r\n // showmessage(inttostr(i) + ' --- ' + splitstring(c_p,'~')[i] + ' --- ' + splitstring(s_p,'~')[i]);\r\n t_p := stringreplace(t_p,'<'+splitstring(c_p,'|')[i]+'>', quotedstr(splitstring(s_p,'|')[i]),[rfReplaceAll, rfIgnorecase]);\r\n end;\r\n//showmessage(t_p);\r\nt_p := InsertKeyValues(t_p);\r\n\r\nResult := 'declare @Result varchar(1024); ' + chr(13) +\r\n 'set @Result = ' + quotedstr('') + ';' + chr(13) +\r\n t_p + chr(13) +\r\n 'select @result; ';\r\n//showmessage(result);\r\nend;\r\n\r\nfunction ReplaceddataBlockLinks(text_p: string; container_p: TScrollBox): string;\r\nvar i, j: integer; block_p: TPanel; memo_p: TMemo; title_p: string;\r\nbegin // showmessage('1');\r\nfor i := 0 to container_p.controlcount - 1\r\ndo begin\r\n if container_p.Controls[i] is Tpanel\r\n then begin\r\n block_p := (container_p.Controls[i] as Tpanel);\r\n memo_p := BlockGetMemo(container_p.Controls[i] as Tpanel);\r\n if memo_p <> nil\r\n then begin\r\n // by title\r\n title_p := BlockGetTitle(container_p.Controls[i] as Tpanel);\r\n if title_p <> ''\r\n then text_p := stringreplace(text_p, '<'+title_p+'>', memo_p.Text, [rfIgnoreCase, rfReplaceAll]);\r\n // by block name\r\n text_p := stringreplace(text_p, '<'+(container_p.Controls[i] as Tpanel).Name +'>', memo_p.Text, [rfIgnoreCase, rfReplaceAll]);\r\n end;\r\n //showmessage(text_p);\r\n end;\r\n end;\r\nResult := text_p;\r\nend;\r\n\r\nfunction GetArgusUrl() : String;\r\nvar str1, str2, str3, str4, sUrl : String;\r\nbegin\r\n // showmessage(application.Version);\r\n Result := '';\r\n if ELV_ArgusURL = '' then\r\n begin\r\n try\r\n str1 := ELV_SESSIONID;\r\n str1 := window.btoa(str1);\r\n\r\n str2 := StringReplace(ELV_APPLICATIONURL,'https://','',[rfReplaceAll, rfIgnoreCase]);\r\n str2 := window.btoa(str2);\r\n\r\n str3 := StringReplace(elv_VideoDLLPath,'https://','',[rfReplaceAll, rfIgnoreCase]);\r\n str3 := window.btoa(str3);\r\n\r\n str4 := '_ARGUSAPP_';\r\n str4 := window.btoa(str4);\r\n\r\n ELV_ArgusURL := 'argus://?s1=' + str1 + '&s2=' +\r\n str2 + '&s3=' + str3 + '&s4=' + str4;\r\n except\r\n on E: Exception do\r\n begin\r\n //WriteExceptionToLog(Self, 'TIWUserSession.GetArgusUrl:', E);\r\n end;\r\n end;\r\n end;\r\n Result := ELV_ArgusURL;\r\nend;\r\n\r\nprocedure CallArgus;\r\nvar parList, str1_p, str2_p, userid_p: string;\r\n\r\n procedure OnGetEncryption1(Response: TXDataClientResponse);\r\n\r\n procedure OnGetEncryption2(Response: TXDataClientResponse);\r\n begin\r\n str2_p := string(TJSObject(Response.Result)['value']);\r\n userid_p := '_ARGUSAPP_' + EGV_FACILITYID + '_' + str1_p + '_' + str2_p + '@qlinical.com';\r\n\r\n with frmmain\r\n do begin\r\n // send parameters\r\n httpCall.postdata := 'App=' + 'Q' + '&' +\r\n 'UserID=' + userid_p + '&' + // USERID in qlinical\r\n 'PID=' + EGV_CURRENT_MRN + '&' + // P_PID\r\n 'PFN=' + EGV_CURRENT_PATIENTNAME + '&' + // Patient Name\r\n 'PDOB=' + EGV_CURRENT_PATIENTDOB + '&' + // Patient P_DOB - dateofbirth\r\n 'PROCID=' + EGV_CURRENT_PROCEDURENUMBER + '&' + // ProcedureNumber\r\n 'FID=' + EGV_FACILITYID + '&' + // FacilityID\r\n 'SS=' + ELV_SESSIONID + '&' + // Unique sessionID\r\n 'IMAGE_COUNT=' + EGV_CURRENT_PROCIMAGECOUNT + '&' + // Procedure images count\r\n 'V=' + '2' + '&' +\r\n 'VFILE=' + 'vid_' + EGV_CURRENT_MRN + '_' + EGV_CURRENT_PROCEDURENUMBER + '.avi';\r\n httpCall.URL := elv_VideoDLLPath;\r\n httpCall.Execute;\r\n //webmemo3.Text := httpCall.URL;\r\n //webmemo10.Text := httpCall.postdata;\r\n end;\r\n\r\n end;\r\n\r\n begin\r\n str1_p := string(TJSObject(Response.Result)['value']);\r\n // showmessage('session id: ' + str1_p);\r\n // showmessage('URL: ' + StringReplace(ELV_APPLICATIONURL,'https://','',[rfReplaceAll, rfIgnoreCase]));\r\n if dm.XDataWebConnection2.Connected then dm.XDataWebClient2.RawInvoke('IReportService.S_AES256Enrypt',[StringReplace(ELV_APPLICATIONURL,'https://','',[rfReplaceAll, rfIgnoreCase]), egv_facilityid, '0'], @OnGetEncryption2);\r\n end;\r\n\r\nbegin\r\n//showmessage('Argus call');\r\nwith frmmain\r\ndo begin\r\n if not edtArgusIndicator.Visible\r\n then wbBrowser.URL := GEtArgusURL\r\n else wbBrowser.URL := '';\r\n end;\r\n\r\n// send parameters\r\nif dm.XDataWebConnection2.Connected then dm.XDataWebClient2.RawInvoke('IReportService.S_AES256Enrypt',[ELV_SESSIONID , egv_facilityid, '0'], @OnGetEncryption1);\r\nend;\r\n\r\nprocedure ShowHideSubItems(Sender: TBitBtn);\r\nvar i: integer; c: TControl;\r\nbegin // showmessage('1');\r\nfor i := 1 to frmmain.div_mainmenucontainer.ControlCount - 1\r\ndo begin\r\n c := frmmain.div_mainmenucontainer.Controls[i];\r\n\r\n if (c <> nil) and (c is TBitBtn) and (trim(dm.egv_localstorage.values['MAINMENU_MASTER' + uppercase(c.name)]) <> '') and\r\n (c.Tag = 2)\r\n then if (trim(dm.egv_localstorage.values['MAINMENU_MASTER' + uppercase(c.name)]) = trim(Sender.caption)) or\r\n (trim(dm.egv_localstorage.values['MAINMENU_MASTER' + uppercase(c.name)]) = trim(Sender.hint))\r\n then begin\r\n c.Visible := true; //(not c.Visible);\r\n // showmessage((c as twebbitbtn).caption);\r\n end\r\n else c.Visible := false;\r\n end;\r\n\r\nend;\r\n\r\nprocedure ChangeMainMenuHighlight;\r\nvar c: TControl; i, j: integer; form_p: TForm;\r\nbegin\r\nfor i := 1 to frmmain.div_mainmenucontainer.ControlCount - 1\r\ndo begin\r\n c := frmmain.div_mainmenucontainer.Controls[i];\r\n if (c <> nil) and (c is TBitBtn)\r\n then begin\r\n if ((c.Tag = 0) or (c.tag = 1))\r\n then (c as TBitBtn).elementclassname := 'mm_reg'\r\n else (c as TBitBtn).elementclassname := 'mmd_reg';\r\n end;\r\n end;\r\n\r\n for i := 1 to 8\r\n do begin\r\n form_p := GetPreviousForm(i);\r\n if form_p = nil then exit;\r\n // showmessage(form_p.name);\r\n for j := 1 to frmmain.div_mainmenucontainer.ControlCount - 1\r\n do begin\r\n c := frmmain.div_mainmenucontainer.Controls[j];\r\n if (c <> nil) and (c is TBitBtn) and (dm.egv_localstorage.values['MAINMENU_FRM' + uppercase(c.name)] = form_p.Name)\r\n then begin\r\n if ((c.Tag = 0) or (c.tag = 1))\r\n then (c as TBitBtn).elementclassname := 'mm_click'\r\n else (c as TBitBtn).elementclassname := 'mmd_click';\r\n exit;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure DBF_FillSettings(s: string; aForm: TForm);\r\nbegin\r\nwith ( aForm as TfrmDBFieldSettings )\r\ndo begin\r\nif s <> ''\r\nthen begin\r\n eddbfield_table.text := splitstring(s,'|')[0];\r\n eddbfield_column.text := splitstring(s,'|')[1];\r\n eddbfield_key1.text := splitstring(s,'|')[2];\r\n eddbfield_key2.text := splitstring(s,'|')[3];\r\n eddbfield_key3.text := splitstring(s,'|')[4];\r\n cbdbfield_key1source.text := splitstring(s,'|')[5];\r\n cbdbfield_key2source.text := splitstring(s,'|')[6];\r\n cbdbfield_key3source.text := splitstring(s,'|')[7];\r\n if (length(splitstring(s,'|')) >= 9) then memDBField_customselect.text := splitstring(s,'|')[8];\r\n //showmessage(inttostr(length(splitstring(s,'|'))));\r\n if (length(splitstring(s,'|')) >= 10) and (splitstring(s,'|')[9] <> '')\r\n then try clrdbfield_color.color := stringtocolor(splitstring(s,'|')[9]);\r\n except splitstring(s,'|')[9] := ''; end;\r\n if length(splitstring(s,'|')) >= 11 then memDBField_Update.text := splitstring(s,'|')[10];\r\n if length(splitstring(s,'|')) >= 12 then memDBField_Insert.text := splitstring(s,'|')[11];\r\n if length(splitstring(s,'|')) >= 13 then memDBField_HTMLTemplate.text := splitstring(s,'|')[12];\r\n if length(splitstring(s,'|')) >= 14 then memDBField_CopyToBlocks.text := splitstring(s,'|')[13];\r\n if length(splitstring(s,'|')) >= 17 then memDBField_SentenceTMP.text := splitstring(s,'|')[16];\r\n\r\n if length(splitstring(s,'|')) >= 18 then try seDBF_BlockWidth.value := strtoint(splitstring(s,'|')[17]);\r\n except seDBF_BlockWidth.value := 0; end;\r\n end;\r\n if length(splitstring(s,'|')) >= 19 then memBlockVisibilityCondition.text := splitstring(s,'|')[18];\r\n if length(splitstring(s,'|')) >= 20 then memEGVvariables.text := splitstring(s,'|')[19];\r\n\r\n chDBF_DoUpdate.checked := (splitstring(s,'|')[14] = '1');\r\n chDBF_DoInsert.checked := (splitstring(s,'|')[15] = '1');\r\n chDBF_IncludeInDefault.checked := (splitstring(s,'|')[20] = '1');\r\n chDBF_HideWhenEmpty.checked := (splitstring(s,'|')[21] = '1');\r\n // showmessage('1');\r\n if length(splitstring(s,'|')) >= 23 then try seDBF_BlockHeight.value := strtoint(splitstring(s,'|')[22]);\r\n except seDBF_BlockHeight.value := 0; end;\r\n if length(splitstring(s,'|')) >= 24 then chDBF_ApplyColor.checked := (splitstring(s,'|')[23] = '1');\r\n\r\n if length(splitstring(s,'|')) >= 25 then try seDBF_BlockTop.value := strtoint(splitstring(s,'|')[24]);\r\n except seDBF_BlockTop.value := 0; end;\r\n if length(splitstring(s,'|')) >= 26 then try seDBF_BlockLeft.value := strtoint(splitstring(s,'|')[25]);\r\n except seDBF_BlockLeft.value := 0; end;\r\n\r\n if length(splitstring(s,'|')) >= 27 then edDBField_Editmask.text := splitstring(s,'|')[26];\r\n if length(splitstring(s,'|')) >= 28 then edCERNER_Search.text := splitstring(s,'|')[27];\r\n // showmessage('2');\r\n end;\r\nend;\r\n\r\nprocedure QPKLClearCache;\r\nbegin\r\n//showmessage(EGV_BLOCKUNIQUEID);\r\ndm.EGV_SESSIONSTORAGE.Values[EGV_BLOCKUNIQUEID + '_QPKLCACHE'] := '';\r\nend;\r\n\r\nprocedure AlignFilterColumns;\r\nvar i,j,k,n: integer; c: TComponent;\r\nbegin;\r\nif getcurrentform.findcomponent('SBSEARCH') = nil then exit;\r\n\r\n// align filter with the grid\r\nj := 0;\r\nk := 0;\r\nn := 0;\r\n//showmessage(inttostr((getcurrentform.findcomponent('B4') as TWebpanel).childorder));;\r\nfor i := 1 to 21\r\ndo begin\r\n for k:= 1 to 20 // find the block with child order i\r\n do begin\r\n c := getcurrentform.findcomponent('B'+inttostr(k));\r\n if (c <> nil) and (c is TPanel) and {(c as TWebPanel).visible and} ((c as Tpanel).childorder = i)\r\n then break;\r\n end;\r\n\r\n if (c <> nil) and (c is TPanel) {and ((c as TWebPanel).visible }\r\n then begin\r\n //showmessage((c as TWebPanel).name);\r\n for k := j to (getcurrentform.findcomponent('grdDynamicGrid') as TDBGrid).Columns.Count - 1\r\n do begin\r\n if (getcurrentform.findcomponent('grdDynamicGrid') as TDBGrid).Columns[k].DataField <> ''\r\n then begin\r\n (c as TPanel).width := (getcurrentform.findcomponent('grdDynamicGrid') as TDBGrid).ColWidths[k];\r\n (c as TPanel).left := n;\r\n n := n + (getcurrentform.findcomponent('grdDynamicGrid') as TDBGrid).ColWidths[k];\r\n // showmessage(blockgettitle((c as TWebpanel)));\r\n j := k + 1;\r\n Break;\r\n end;\r\n end;\r\n // showmessage(inttostr(k));\r\n if k = ((getcurrentform.findcomponent('grdDynamicGrid') as TDBGrid).Columns.Count - 1)\r\n then begin\r\n //showmessage((c as TWebPanel).name);\r\n (c as TPanel).left := n;\r\n n := n + (c as TPanel).width;\r\n j := k;\r\n end;\r\n end;\r\n end;\r\nfor i := 20 downto 1\r\ndo begin\r\n for k:= 1 to 20 // find the block with child order i\r\n do begin\r\n c := getcurrentform.findcomponent('B'+inttostr(k));\r\n if (c <> nil) and (c is TPanel) and (c as TPanel).visible and ((c as Tpanel).childorder = i)\r\n then begin\r\n (c as Tpanel).width := (c as Tpanel).width - 15;\r\n if (c as Tpanel).width > (getcurrentform.findcomponent('SBSEARCH') as TScrollBox).width\r\n then (c as Tpanel).width := (c as Tpanel).width - 40;\r\n\r\n break;\r\n end;\r\n end;\r\n end;\r\n\r\nend;\r\n\r\nfunction GetLocationByXY(X: integer; Y: integer): string;\r\nvar array_p: array[1..100, 1..5] of string; s1,s2,s3: string; i,j,k: integer;\r\nbegin\r\nresult := '';\r\ns1 := dm.EGV_SESSIONSTORAGE.values[EGV_BLOCKUNIQUEID + '_QPKLCACHE'];\r\nif s1 = '' then exit;\r\n//showmessage(s1);\r\nfor i := 0 to length(splitstring(s1, '^' )) - 1\r\ndo begin\r\n s2 := splitstring(s1, '^' )[i];\r\n for j := 0 to 4\r\n do array_p[i+1,j+1] := splitstring(s2,'|')[j];\r\n if (X > strtoint(array_p[i+1,2])) and (X < strtoint(array_p[i+1,4])) and\r\n (Y > strtoint(array_p[i+1,3])) and (Y < strtoint(array_p[i+1,5]))\r\n then begin\r\n Result := array_p[i+1,1];\r\n exit;\r\n end;\r\n end;\r\n\r\nend;\r\n\r\nprocedure BlockDataDistribute(SourceBlock_p: Tpanel);\r\nvar array_p: array[1..100, 1..5] of string; s1,s2,s3: string; i,j,k: integer;\r\n t_p, c_p, s_p: string; c: TPanel; m: TMemo; div_p: TScrollBox;\r\n block_id: string;\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p, s1, s2: string; c: TPanel;\r\n begin\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n //showmessage(Response_p);\r\n if trim(Response_p) <> ''\r\n then begin\r\n for i := 0 to length(splitstring(Response_p, '^')) - 1\r\n do begin\r\n s1 := splitstring(Response_p, '^')[i];\r\n s2 := splitstring(s1,']')[0];\r\n s3 := splitstring(s1,']')[1]; // value;\r\n s2 := stringreplace(s2,'[','',[rfReplaceAll]); // title\r\n // showmessage(s2);\r\n c := BlockGetBlockByName(s2,div_p); //BlockGetBlockByTitle(s2, div_p);\r\n\r\n if c <> nil\r\n then begin\r\n // showmessage(c.Name);\r\n m := blockgetmemo(c);\r\n if m <> nil\r\n then begin\r\n if pos(',', trim(s3)) = 0\r\n then m.Text := s3\r\n else m.Text := m.Text + s3;\r\n if pos(',', trim(m.text)) = 1\r\n then m.Text := trim(copy(m.Text, 2, length(m.Text)));\r\n m.Tag := 1; // updated - can be save in db\r\n stretchmemo(m);\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\nbegin\r\n//showmessage('1');\r\n// call script to update other blocks if needed\r\nif SourceBlock_p = nil then exit;\r\n\r\n//showmessage(SourceBlock_p.Name);\r\nblock_id := getBlockUniqueID(SourceBlock_p, false);\r\n\r\ndiv_p := (SourceBlock_p.Parent as TScrollBox);\r\ns1 := dm.EGV_LOCALSTORAGE.Values['DBF_' + block_id];\r\n//showmessage(block_id);\r\n//showmessage(s1);\r\nc_p := '';\r\ns_p := '';\r\nif (length(splitstring(s1,'|')) >= 14) and (splitstring(s1,'|')[13] <> '')\r\nthen begin\r\n t_p := splitstring(s1,'|')[13];\r\n for i := 0 to div_p.ControlCount - 1\r\n do begin\r\n if (div_p.Controls[i] is TPanel) and (blockgetmemo(div_p.Controls[i] as TPanel) <> nil)\r\n then begin\r\n c := (div_p.Controls[i] as TPanel);\r\n if c_p = '' then c_p := c.name + '|'\r\n else c_p := c_p + c.name + '|'; //showmessage(c_p);\r\n if s_p = ''\r\n then s_p := blockgetmemo(c).text +'|'\r\n else s_p := s_p + blockgetmemo(c).text +'|'; //showmessage(s_p);\r\n if s_p = '' then s_p := '@';\r\n end;\r\n end;\r\n s_p := stringreplace(s_p,'@','', [rfReplaceAll]);\r\n\r\n // showmessage(PrepareScript(t_p, c_p, s_p));\r\n if dm.XDataWebConnection2.Connected then dm.XDataWebClient2.RawInvoke('IReportService.GetColumnData',[PrepareScript(t_p, c_p, s_p) , egv_facilityid, '0'], @OnResult);\r\n end;\r\nend;\r\n\r\nprocedure QPKL_LoadCache(Block_p: Tpanel; ResultList_p: TListBox=nil);\r\nvar i: integer; blockid_p, s, sectionname_p: string; DBType_p: integer=0;\r\n\r\nprocedure OnResult(Response: TXDataClientResponse);\r\nvar Response_p: string;\r\nbegin\r\n// load cache (dm.EGV_SESSIONSTORAGE.values[EGV_BLOCKUNIQUEID + '_QPKLCACHE']\r\nResponse_p := string(TJSObject(Response.Result)['value']);\r\n//showmessage(Response_p);\r\ndm.EGV_SESSIONSTORAGE.values[blockid_p + '_QPKLCACHE'] := '';\r\nfor i := 0 to length(splitstring(Response_p,'^')) - 1\r\ndo if dm.EGV_SESSIONSTORAGE.values[blockid_p + '_QPKLCACHE'] = ''\r\n then dm.EGV_SESSIONSTORAGE.values[blockid_p + '_QPKLCACHE'] := splitstring(response_p, '^')[i]\r\n else dm.EGV_SESSIONSTORAGE.values[blockid_p + '_QPKLCACHE'] :=\r\n dm.EGV_SESSIONSTORAGE.values[blockid_p + '_QPKLCACHE'] + '^' + splitstring(response_p, '^')[i];\r\nif ResultList_p <> nil\r\nthen begin\r\n ResultList_p.Clear;\r\n for i := 0 to length(splitstring(dm.EGV_SESSIONSTORAGE.values[blockid_p + '_QPKLCACHE'], '^')) - 1\r\n do begin\r\n ResultList_p.items.Add(splitstring(dm.EGV_SESSIONSTORAGE.values[blockid_p + '_QPKLCACHE'], '^')[i]);\r\n end;\r\n end;\r\nend;\r\n\r\nbegin\r\ns := '';\r\nblockid_p := getblockuniqueid(block_p, false);\r\n\r\n//showmessage(dm.EGV_SESSIONSTORAGE.values[blockid_p + '_QPKLCACHE']);\r\nif dm.EGV_SESSIONSTORAGE.values[blockid_p + '_QPKLCACHE'] <> '' then exit;\r\n\r\nsectionname_p := dm.EGV_LOCALSTORAGE.values['Q_' + blockid_p + '_SECTION'];\r\n\r\n if (dm.EGV_LOCALSTORAGE.values['Q_' + blockid_p + '_SOURCE'] = '0') and (sectionname_p <> '')\r\n then begin\r\n if egv_showcommonpicklist\r\n then s := ' use 1; select STRING_AGG(ident_value, ' + quotedstr('^') + ' ) as ITEM from ini_ident where ' +\r\n ' section_name = ' + quotedstr(sectionname_p) + ' and ' +\r\n ' ( facilityid = ' + EGV_FACILITYID + ' or facilityid = 1 ) ' + ' and ' +\r\n ' visible <> 0 '\r\n else s := ' use 1; select STRING_AGG(ident_value, ' + quotedstr('^') + ' ) as ITEM from ini_ident where ' +\r\n ' section_name = ' + quotedstr(sectionname_p) + ' and ' +\r\n ' facilityid = ' + EGV_FACILITYID + ' and ' +\r\n ' visible <> 0'; // order by facilityid DESC, ident_name\r\n end\r\n else if dm.EGV_LOCALSTORAGE.values['Q_' + blockid_p + '_SOURCE'] = '1'\r\n then begin\r\n s := ' use 1; select STRING_AGG(FULLNAME, ' + quotedstr('^') + ' ) as ITEM from USERS where ' +\r\n ' facilityid = ' + EGV_FACILITYID + ' and ' +\r\n ' is_active = 1 and usertype = ' + quotedstr('P') +\r\n '/* order by fullname*/';\r\n end\r\n else if dm.EGV_LOCALSTORAGE.values['Q_' + blockid_p + '_SOURCE'] = '2'\r\n then begin\r\n s := ' use 1; select STRING_AGG(FULLNAME, ' + quotedstr('^') + ' ) as item from USERS where ' +\r\n ' facilityid = ' + EGV_FACILITYID + ' and ' +\r\n ' is_active = 1 and usertype = ' + quotedstr('N') +\r\n ' /* order by fullname*/';\r\n end\r\n else begin\r\n if dm.EGV_LOCALSTORAGE.values['Q_' + blockid_p + '_SOURCE'] = '3'\r\n then s := ' use 1; select STRING_AGG(FULLNAME, ' + quotedstr('^') + ' ) as item from USERS where ' +\r\n ' facilityid = ' + EGV_FACILITYID + ' and ' +\r\n ' is_active = 1 and usertype = ' + quotedstr('T') +\r\n ' /* order by fullname*/' ;\r\n end;\r\n { // we need to use STRING_AGG function in the custom select for this\r\n // but in that case the click-Qpicklist will not work;\r\n else if dm.EGV_LOCALSTORAGE.values['Q_' + blockid_p + '_SOURCE'] = '4'\r\n then begin\r\n s := uppercase(dm.EGV_LOCALSTORAGE.values['Q_' + blockid_p + '_SELECT']);\r\n // showmessage(s);\r\n end; }\r\n\r\n s := uppercase(s);\r\n // selected column must have an alias ITEM. Add it to the query if missing\r\n if pos('ITEM', s) = 0\r\n then s := stringreplace(s,'FROM',' AS ITEM FROM ', [rfIgnoreCase]);\r\n\r\n s := InsertKeyValues(s);\r\n DBType_p := DBType(s);\r\n // showmessage(s);\r\n if s <> ''\r\n then begin\r\n if DBType_p = 1\r\n then dm.XDataWebClient1.RawInvoke('IReportService.GetColumnData',[s , egv_facilityid, inttostr(DBType_p)], @OnResult)\r\n else if dm.XDataWebConnection2.Connected then dm.XDataWebClient2.RawInvoke('IReportService.GetColumnData',[s , egv_facilityid, inttostr(DBType_p)], @OnResult);\r\n end;\r\nend;\r\n\r\nprocedure ClearBlockCustomPositioning;\r\nvar i, j, k: integer; DesignArea_p: TScrollBox; s, s2: string;\r\nbegin\r\nDesignArea_p := GetCurrentFormDIV;\r\nif DesignArea_p = nil then exit;\r\n\r\nfor i := 0 to DesignArea_p.ControlCount - 1\r\n do begin\r\n if (DesignArea_p.Controls[i] is Tpanel)\r\n then begin\r\n getblockuniqueid((DesignArea_p.Controls[i] as Tpanel));\r\n s := dm.egv_localstorage.values['DBF_' + EGV_BLOCKUNIQUEID];\r\n for j := length(splitstring(s,'|')) to 26\r\n do s := s + '|';\r\n s2 := '';\r\n for j := 0 to length(splitstring(s,'|')) - 1\r\n do begin\r\n if j = 24 then s2 := s2 + '0' + '|'\r\n else if j = 25\r\n then s2 := s2 + '0' + '|'\r\n else s2 := s2 + splitstring(s,'|')[j] + '|';\r\n end;\r\n dm.egv_localstorage.values['DBF_' + EGV_BLOCKUNIQUEID] := s2;\r\n end;\r\n end;\r\n OrganizeBlocks(DesignArea_p);\r\n CollectFormDesignInfo('', 2, '', '', getcurrentformname, designarea_p); //\r\nend;\r\n\r\nprocedure ClearBlockCustomSizes;\r\nvar i, j, k: integer; DesignArea_p: TScrollBox; s, s2: string;\r\nbegin\r\nDesignArea_p := GetCurrentFormDIV;\r\nif DesignArea_p = nil then exit;\r\n\r\nfor i := 0 to DesignArea_p.ControlCount - 1\r\n do begin\r\n if (DesignArea_p.Controls[i] is Tpanel)\r\n then begin\r\n getblockuniqueid((DesignArea_p.Controls[i] as Tpanel));\r\n s := dm.egv_localstorage.values['DBF_' + EGV_BLOCKUNIQUEID];\r\n for j := length(splitstring(s,'|')) to 26\r\n do s := s + '|';\r\n s2 := '';\r\n for j := 0 to length(splitstring(s,'|')) - 1\r\n do begin\r\n if (j = 17) or (j = 22) then s2 := s2 + '0' + '|'\r\n else s2 := s2 + splitstring(s,'|')[j] + '|';\r\n end;\r\n dm.egv_localstorage.values['DBF_' + EGV_BLOCKUNIQUEID] := s2;\r\n end;\r\n end;\r\n ResizeFormBlocks(DesignArea_p);\r\n CollectFormDesignInfo('', 2, '', '', getcurrentformname, designarea_p); //\r\nend;\r\n\r\nprocedure FixBlockPositions;\r\nvar i, j, k: integer; DesignArea_p: TScrollBox; s, s2: string;\r\nbegin\r\nDesignArea_p := GetCurrentFormDIV;\r\nif DesignArea_p = nil then exit;\r\n\r\nfor i := 0 to DesignArea_p.ControlCount - 1\r\n do begin\r\n if (DesignArea_p.Controls[i] is Tpanel)\r\n then begin\r\n getblockuniqueid((DesignArea_p.Controls[i] as Tpanel));\r\n s := dm.egv_localstorage.values['DBF_' + EGV_BLOCKUNIQUEID];\r\n for j := length(splitstring(s,'|')) to 26\r\n do s := s + '|';\r\n s2 := '';\r\n for j := 0 to length(splitstring(s,'|')) - 1\r\n do begin\r\n if j = 24 then s2 := s2 + inttostr((DesignArea_p.Controls[i] as Tpanel).top) + '|'\r\n else if j = 25\r\n then s2 := s2 + inttostr((DesignArea_p.Controls[i] as Tpanel).left) + '|'\r\n else s2 := s2 + splitstring(s,'|')[j] + '|';\r\n end;\r\n dm.egv_localstorage.values['DBF_' + EGV_BLOCKUNIQUEID] := s2;\r\n end;\r\n end;\r\n OrganizeBlocks(DesignArea_p);\r\n CollectFormDesignInfo('', 2, '', '', getcurrentformname, designarea_p); //\r\nend;\r\n\r\n{\r\n Return TColor value in XXXXXX format\r\n (X being a hex digit)\r\n}\r\nfunction TColorToHex( Color : string ): string;\r\nbegin\r\n if Color = '' then Color := '000000';\r\n Result := '#'+\r\n { red value }\r\n IntToHex( GetRValue( stringtocolor(Color) ), 2 ) +\r\n { green value }\r\n IntToHex( GetGValue( stringtocolor(Color) ), 2 ) +\r\n { blue value }\r\n IntToHex( GetBValue( stringtocolor(Color) ), 2 );\r\nend;\r\n\r\nfunction DecimalColorToHex(Color: TColor): string;\r\nvar\r\n R, G, B: Byte;\r\nbegin\r\n // Ensure it's an RGB color (not a system color)\r\n Color := ColorToRGB(Color);\r\n //color := clBlue;\r\n // Extract Red, Green, and Blue components\r\n R := GetRValue(Color);\r\n G := GetGValue(Color);\r\n B := GetBValue(Color);\r\n\r\n // Format as hex string in #RRGGBB format\r\n Result := Format('#%.2X%.2X%.2X', [R, G, B]);\r\nend;\r\n\r\n\r\nfunction DBType(var SQL_p : string ): integer;\r\nbegin\r\nResult := 0;\r\nif (pos('USE 1', uppercase(SQL_p)) > 0) or (pos('USE 1;', uppercase(SQL_p)) > 0)\r\nthen begin\r\n Result := 1;\r\n SQL_p := stringreplace(SQL_p, 'USE 1;', '', [rfIgnoreCase]);\r\n SQL_p := stringreplace(SQL_p, 'USE 1', '', [rfIgnoreCase]);\r\n end;\r\nif (pos('USE 0', uppercase(SQL_p)) > 0) or (pos('USE 0;', uppercase(SQL_p)) > 0)\r\nthen begin\r\n Result := 0;\r\n SQL_p := stringreplace(SQL_p, 'USE 0;', '', [rfIgnoreCase]);\r\n SQL_p := stringreplace(SQL_p, 'USE 0', '', [rfIgnoreCase]);\r\n end;\r\nend;\r\n\r\nfunction ParseArgusXml(XmlStr: string): string;\r\nvar s1,s2,s3,s4,s5, s6: string;\r\nbegin\r\ns6 := XmlStr;\r\n//xmlstr := '{246FA38F-8D08-41FF-9BF5-8A91A3BFD56E}@MACROME-TSAPP-31FB3E7AAE95MAC@\r\n// polyp941783162936670.177734375;0.31640625;0.2934027777777778;0.6666666666666666\r\n// polyp825417816189620.541015625;0.78125;0.6180555555555556;0.9618055555555556\r\n// polyp523764572673750.3759765625;0.45703125;0.2673611111111111;0.375\r\n// 17:38:1517:38:156750';\r\nresult := '';\r\nwhile pos('', XmlStr) > 0\r\ndo begin\r\n s1 := copy(XmlStr, pos('', XmlStr) + 12, pos('', XmlStr) - (pos('', XmlStr) + 12));\r\n s2 := copy(XmlStr, pos('', XmlStr) + 6, pos('', XmlStr) - (pos('', XmlStr) + 6));\r\n s3 := copy(XmlStr, pos('', XmlStr) + 7, pos('', XmlStr) - (pos('', XmlStr) + 7));\r\n s4 := copy(XmlStr, pos('', XmlStr) + 5, pos('', XmlStr) - (pos('', XmlStr) + 5));\r\n s5 := copy(XmlStr, pos('', XmlStr) + 8, pos('', XmlStr) - (pos('', XmlStr) + 8));\r\n // showmessage(s1+'-'+s2+'-'+s3+'-'+s4);\r\n\r\n if uppercase(s1) = 'POLYP'\r\n then begin\r\n if result <> '' then result := result + ';';\r\n result := result + s2+','+s3+','+s4+','+s5;\r\n end;\r\n XmlStr := copy(XmlStr, pos('', XmlStr) + 9, length(xmlstr));\r\n end;\r\n\r\n\r\n //\"PolypSize\": 7.000113636363636,\r\n // Get polyp size\r\n if( pos('\"PolypSize\": ', s6) > 0 ) and not ( pos('\"PolypSize\": 0.', s6) > 0 )\r\n then result := result + '^' + copy(s6, pos('\"PolypSize\":', s6) + 12, 5)\r\n else result := result +'^';\r\n //Get the measured polyp frame to show the size on top of it\r\n //\"PolypIntersectRect\": [488, 210, 757, 433]\r\n //\"P\": [488, 210, 757, 433]\r\n if pos('\"PolypIntersectRect\":', s6) > 0\r\n then begin\r\n s6 := trim(copy(s6, pos('\"PolypIntersectRect\":', s6) + 21, length(s6)));\r\n s6 := trim(copy(s6, pos('[', s6) + 1, length(s6)));\r\n s6 := trim(copy(s6, 1, pos(']', s6) - 1));\r\n result := result + '^' + s6;\r\n // showmessage(s6);\r\n end\r\n else result := result +'^';\r\n\r\n\r\n\r\n // showmessage(result);\r\nend;\r\n\r\nprocedure SpeechProcess(command_p: string; parameters_p: Tstrings);\r\nvar div_p: TScrollbox; block_p: TPanel; memo_p: TMemo; form_p, prevform_p: TForm;\r\nbegin\r\nif dm.EGV_LOCALSTORAGE.Values['EGV_VOICECOMMANDS'] <> '1' then exit;\r\nELV_SPEECHTARGET := nil;\r\nform_p := getcurrentform;\r\nprevform_p := getpreviousform(1);\r\nif form_p = nil then exit;\r\n\r\ntry\r\nELV_SPEECHCOMMAND := trim(command_p + ' ' + trim(parameters_p.Text));\r\n\r\nif (uppercase(command_p) = 'CLEAR TEXT') and (ELV_SPEECHRECEIVER <> nil)\r\nthen begin\r\n ELV_SPEECHRECEIVER.Clear;\r\n exit;\r\n end;\r\n\r\nif (uppercase(command_p) = 'QUESTION')\r\nthen begin\r\n if (uppercase(form_p.Name) = 'UDF_QAI')\r\n then begin\r\n (form_p.FindComponent('memQAI_Question') as TMemo).SetFocus;\r\n ELV_SPEECHRECEIVER := (form_p.FindComponent('memQAI_Question') as TMemo);\r\n ELV_SPEECHRECEIVER.SetFocus;\r\n MemoEndOfText(ELV_SPEECHRECEIVER);\r\n exit;\r\n end;\r\n end;\r\n\r\nif (uppercase(command_p) = 'SEARCH') and (uppercase(getcurrentform.Name) = 'UDF_QAI')\r\nthen begin\r\n (form_p as TfrmUDF_QAI).btnSendQuestionClick(nil);\r\n (form_p as TfrmUDF_QAI).btnSendQuestion.SetFocus;\r\n end;\r\n\r\nif (uppercase(command_p) = 'START')\r\nthen begin\r\n if uppercase(form_p.Name) = 'UDF_IMAGECAPTURE'\r\n then begin\r\n (form_p as TfrmUDF_ImageCapture).mDictation.Visible := true;\r\n (form_p as TfrmUDF_ImageCapture).mDictation.text := '';\r\n exit;\r\n end;\r\n end;\r\n\r\nif (uppercase(command_p) = 'STOP')\r\nthen begin\r\n if uppercase(form_p.Name) = 'UDF_IMAGECAPTURE'\r\n then begin\r\n (form_p as TfrmUDF_ImageCapture).mDictation.Visible := false;\r\n exit\r\n end;\r\n end;\r\n\r\nif (uppercase(command_p) = 'CAPTURE')\r\nthen begin\r\n if uppercase(form_p.Name) = 'UDF_IMAGECAPTURE'\r\n then begin\r\n (form_p as TfrmUDF_ImageCapture).btnCaptureClick(nil);\r\n exit\r\n end;\r\n end;\r\n\r\nif (uppercase(command_p) = 'CLOSE')\r\nthen begin\r\n if uppercase(form_p.Name) = 'UDF_IMAGECAPTURE'\r\n then begin\r\n if uppercase(trim(parameters_p.Text)) = 'FORM'\r\n then (form_p as TfrmUDF_ImageCapture).btnCloseClick(nil);\r\n exit\r\n end;\r\n end;\r\n\r\nif uppercase(command_p) = 'GO'\r\nthen begin\r\n if uppercase(form_p.Name) = 'UDF_IMAGECAPTURE'\r\n then begin\r\n if prevform_p.FindComponent('SubForm_DIV') <> nil\r\n then div_p := (prevform_p.FindComponent('SubForm_DIV') as TScrollBox);\r\n if div_p <> nil then block_p := BlockGetBlockByTitle(parameters_p.Text, div_p);\r\n if block_p <> nil then memo_p := blockgetmemo(block_p);\r\n if memo_p <> nil\r\n then begin\r\n (form_p as TfrmUDF_ImageCapture).mDictation.Text := memo_p.Text;\r\n ELV_SPEECHTARGET := memo_p;\r\n ELV_SPEECHRECEIVER := (form_p as TfrmUDF_ImageCapture).mDictation;\r\n (form_p as TfrmUDF_ImageCapture).mDictation.setfocus;\r\n MemoEndOfText((form_p as TfrmUDF_ImageCapture).mDictation);\r\n ELV_SPEECHRECEIVER.Text := stringreplace(ELV_SPEECHRECEIVER.Text,'GO ' + trim(parameters_p.Text),'',[rfIgnoreCase]);\r\n exit;\r\n end;\r\n if prevform_p.FindComponent('sbSideData') <> nil\r\n then div_p := (prevform_p.FindComponent('sbSideData') as TScrollBox);\r\n if div_p <> nil then block_p := BlockGetBlockByTitle(parameters_p.Text, div_p);\r\n if block_p <> nil then memo_p := blockgetmemo(block_p);\r\n if memo_p <> nil\r\n then begin\r\n (form_p as TfrmUDF_ImageCapture).mDictation.Text := memo_p.Text;\r\n ELV_SPEECHRECEIVER := (form_p as TfrmUDF_ImageCapture).mDictation;\r\n (form_p as TfrmUDF_ImageCapture).mDictation.setfocus;\r\n MemoEndOfText((form_p as TfrmUDF_ImageCapture).mDictation);\r\n ELV_SPEECHRECEIVER.Text := stringreplace(ELV_SPEECHRECEIVER.Text,'GO ' + trim(parameters_p.Text),'',[rfIgnoreCase]);\r\n exit;\r\n end;\r\n end;\r\n // GO command for all orther forms\r\n if form_p.FindComponent('SubForm_DIV') <> nil\r\n then div_p := (form_p.FindComponent('SubForm_DIV') as TScrollBox);\r\n if div_p <> nil then block_p := BlockGetBlockByTitle(parameters_p.Text, div_p);\r\n if block_p <> nil then memo_p := blockgetmemo(block_p);\r\n if memo_p <> nil\r\n then begin\r\n ELV_SPEECHRECEIVER := memo_p;\r\n // showmessage(ELV_SPEECHRECEIVER.Text);\r\n // showmessage('GO ' + parameters_p.Text);\r\n // showmessage(ELV_SPEECHRECEIVER.Text);\r\n memo_p.setfocus;\r\n MemoEndOfText(memo_p);\r\n ELV_SPEECHRECEIVER.Text := stringreplace(ELV_SPEECHRECEIVER.Text,'GO ' + trim(parameters_p.Text),'',[rfIgnoreCase]);\r\n exit;\r\n end;\r\n if form_p.FindComponent('sbSideData') <> nil\r\n then div_p := (form_p.FindComponent('sbSideData') as TScrollBox);\r\n if div_p <> nil then block_p := BlockGetBlockByTitle(parameters_p.Text, div_p);\r\n if block_p <> nil then memo_p := blockgetmemo(block_p);\r\n if memo_p <> nil\r\n then begin\r\n ELV_SPEECHRECEIVER := memo_p;\r\n memo_p.setfocus;\r\n MemoEndOfText(memo_p);\r\n ELV_SPEECHRECEIVER.Text := stringreplace(ELV_SPEECHRECEIVER.Text,'GO ' + trim(parameters_p.Text),'',[rfIgnoreCase]);\r\n exit;\r\n end;\r\n end;\r\nfinally\r\n frmmain.tmRemoveVoiceCommand.Enabled := true;\r\nend;\r\nend;\r\n\r\nprocedure MemoEndOfText(m: TMemo);\r\nbegin\r\nm.SelLength := 0;\r\nm.SelStart := 0; // set caret before first character\r\nm.SelStart := 1; // set caret before second character\r\nm.SelStart := Length(m.Text) // set caret after the last character\r\nend;\r\n\r\nfunction ImageAnnotate(image_p: TDBImageControl): string;\r\nvar\r\n Canvas: TCanvas;\r\n Img: TBitmap;\r\n Base64Image_p: string;\r\nbegin\r\n // Create a temporary WebCanvas\r\n Canvas := TCanvas.Create;\r\n try\r\n Canvas.Element.setAttribute('width', inttostr(image_p.width));\r\n Canvas.Element.setAttribute('height', inttostr(image_p.Height)); // Set height\r\n\r\n // Load the original image\r\n Img := TBitmap.Create();\r\n try\r\n // Img.LoadFromURL(image_p.URL);\r\n //Load image to bitmap\r\n asm\r\n this.Img.FHandle.src = this.image_p.Element.src;\r\n end;\r\n showmessage('1');\r\n //Canvas.Draw(0, 0, Img.Graphic); // Draw the image on the canvas\r\n // Use JavaScript to draw the image onto the canvas\r\n asm\r\n var ctx = document.getElementById(this.Canvas.ElementID).getContext('2d');\r\n ctx.drawImage(this.Img.FHandle, 0, 0);\r\n end;\r\n showmessage('2');\r\n // Draw annotations (Example: a red rectangle)\r\n Canvas.Pen.Color := clRed;\r\n Canvas.Pen.Width := 3;\r\n Canvas.Rectangle(50, 50, 150, 150);\r\n\r\n asm\r\n var ctx = document.getElementById(this.Canvas.ElementID).getContext('2d');\r\n var base64Img = ctx.canvas.toDataURL();\r\n // Return it to Delphi as a string\r\n this.Base64Image_p = base64Img;\r\n end;\r\n\r\n showmessage(Base64Image_p);\r\n\r\n { // Convert to Base64\r\n Canvas.ToDataURL(procedure(DataURL: string)\r\n begin\r\n asm\r\n // console.log(\"Base64 Image: \" + DataURL); // Log it to console\r\n end;\r\n // You can use the DataURL for downloading, saving, or sending to a server.\r\n showmessage(DataURL);\r\n end); }\r\n\r\n finally\r\n Img.Free;\r\n end;\r\n\r\n finally\r\n Canvas.Free;\r\n end;\r\nend;\r\n\r\nfunction ImageAnnotate_new(image_p: TDBImageControl): string;\r\nvar\r\n Canvas: TCanvas;\r\n Img: TBitmap;\r\n Base64Image_p: string;\r\nbegin\r\n // Create a temporary WebCanvas\r\n Canvas := TCanvas.Create;\r\n try\r\n Canvas.Element.setAttribute('width', inttostr(image_p.width));\r\n Canvas.Element.setAttribute('height', inttostr(image_p.Height)); // Set height\r\n\r\n // Load the original image\r\n Img := TBitmap.Create();\r\n try\r\n // Img.LoadFromURL(image_p.URL);\r\n //Load image to bitmap\r\n asm\r\n this.Img.FHandle.src = this.image_p.Element.src;\r\n end;\r\n showmessage('1');\r\n //Canvas.Draw(0, 0, Img.Graphic); // Draw the image on the canvas\r\n // Use JavaScript to draw the image onto the canvas\r\n asm\r\n var ctx = document.getElementById(this.Canvas.ElementID).getContext('2d');\r\n ctx.drawImage(this.Img.FHandle, 0, 0);\r\n end;\r\n showmessage('2');\r\n // Draw annotations (Example: a red rectangle)\r\n Canvas.Pen.Color := clRed;\r\n Canvas.Pen.Width := 3;\r\n Canvas.Rectangle(50, 50, 150, 150);\r\n\r\n asm\r\n var ctx = document.getElementById(this.Canvas.ElementID).getContext('2d');\r\n var base64Img = ctx.canvas.toDataURL();\r\n // Return it to Delphi as a string\r\n this.Base64Image_p = base64Img;\r\n end;\r\n\r\n showmessage(Base64Image_p);\r\n\r\n { // Convert to Base64\r\n Canvas.ToDataURL(procedure(DataURL: string)\r\n begin\r\n asm\r\n // console.log(\"Base64 Image: \" + DataURL); // Log it to console\r\n end;\r\n // You can use the DataURL for downloading, saving, or sending to a server.\r\n showmessage(DataURL);\r\n end); }\r\n\r\n finally\r\n Img.Free;\r\n end;\r\n\r\n finally\r\n Canvas.Free;\r\n end;\r\nend;\r\n\r\n\r\nend.\r\n","unit DynamicGridSetup;\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, Vcl.Controls, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, WEBLib.Buttons, Vcl.Grids, WEBLib.DBCtrls, StrUtils;\r\n\r\ntype\r\n TfrmDynamicGridSetup = class(TForm)\r\n memoSQL: TMemo;\r\n WebSplitter1: TSplitter;\r\n WebLabel1: TLabel;\r\n WebSplitter2: TSplitter;\r\n WebPanel4: TPanel;\r\n pnlFormButtons: TPanel;\r\n btnOk: TBitBtn;\r\n btnClose: TBitBtn;\r\n WebMemo1: TMemo;\r\n WebMemo2: TMemo;\r\n WebPanel1: TPanel;\r\n pnlGridColumnsPKL: TPanel;\r\n memGridColumns: TMemo;\r\n WebPanel2: TPanel;\r\n WebScrollBox1: TScrollBox;\r\n WebLabel7: TLabel;\r\n e1: TEdit;\r\n e2: TEdit;\r\n e3: TEdit;\r\n e4: TEdit;\r\n e5: TEdit;\r\n e6: TEdit;\r\n pnlListButtons: TPanel;\r\n WebBitBtn3: TBitBtn;\r\n WebBitBtn4: TBitBtn;\r\n pnlFormCaption: TPanel;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure WebFormClose(Sender: TObject; var Action: TCloseAction);\r\n procedure btnOkClick(Sender: TObject);\r\n procedure btnCloseClick(Sender: TObject);\r\n procedure WebBitBtn4Click(Sender: TObject);\r\n procedure WebBitBtn3Click(Sender: TObject);\r\n procedure WebSplitter1Moved(Sender: TObject);\r\n private\r\n { Private declarations }\r\n form_pointer_number: integer;\r\n subform_pointer_number: integer;\r\n Save_EGV_SHOWCOMMONPICKLIST: Boolean;\r\n public\r\n { Public declarations }\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmDynamicGridSetup: TfrmDynamicGridSetup;\r\n\r\n\r\nimplementation\r\n\r\n{$R *.dfm}\r\n\r\nuses common, DataModule, picklist, main;\r\n\r\nprocedure TfrmDynamicGridSetup.btnCloseClick(Sender: TObject);\r\nbegin\r\nself.close;\r\nend;\r\n\r\nprocedure TfrmDynamicGridSetup.btnOkClick(Sender: TObject);\r\nvar i, j: integer; s1,s2,s3,s4,s5,s6: string; Grid_p: TDBGrid; storageID_p: string;\r\nbegin\r\nGrid_p := EGV_GRIDTOSETUP;\r\n//Save grid seetings\r\n// The Select statement:\r\n//showmessage(inttostr(form_pointer_number)+ ' ' + egv_subform.name);\r\ncase form_pointer_number of\r\n1: StorageID_p := egv_subform.name;\r\n2: StorageID_p := egv_subform2.name;\r\n3: StorageID_p := egv_subform3.name;\r\n4: StorageID_p := egv_subform4.name;\r\n5: StorageID_p := egv_subform5.name;\r\n6: StorageID_p := egv_subform5.name;\r\n7: StorageID_p := egv_subform5.name;\r\n8: StorageID_p := egv_subform5.name;\r\n9: StorageID_p := egv_subform5.name;\r\nend;\r\nStorageID_p := uppercase(StorageID_p);\r\n//showmessage(EGV_GRIDTOSETUP.name + '_SELECT_' + StorageID_p);\r\ndm.egv_localstorage.values[uppercase(EGV_GRIDTOSETUP.name) + '_SELECT_' + StorageID_p] := memoSQL.text;\r\n// The Grid:\r\ndm.xdsPicklist.first;\r\n{\r\nwhile not dm.xdsPicklist.eof\r\ndo begin\r\n dm.xdsPicklist.Edit;\r\n dm.xdsPicklistIDENT_VALUE.AsString := uppercase(dm.xdsPicklistIDENT_VALUE.AsString);\r\n dm.xdsPicklist.post;\r\n dm.xdsPicklist.next;\r\n end; }\r\n\r\nj := 0;\r\nmemGridColumns.clear;\r\ndm.egv_localstorage.values[uppercase(EGV_GRIDTOSETUP.name) + '_COLUMNS_' + StorageID_p] := '';\r\n\r\nwhile not dm.xdsPicklist.eof\r\ndo begin\r\n //showmessage(dm.xdsPicklistIDENT_VALUE.asstring);\r\n if dm.xdsPicklist.recno > Grid_p.columns.count then break;\r\n if dm.xdsPicklistVISIBLE.asinteger = 1\r\n then memGridColumns.lines.add( '1|' + dm.xdsPicklistIDENT_VALUE.asstring )\r\n else memGridColumns.lines.add( '0|' + dm.xdsPicklistIDENT_VALUE.asstring );\r\n\r\n s1 := splitstring(dm.xdsPicklistIDENT_VALUE.asstring,'|')[0]; // field name\r\n s2 := splitstring(dm.xdsPicklistIDENT_VALUE.asstring,'|')[1]; // title\r\n s3 := splitstring(dm.xdsPicklistIDENT_VALUE.asstring,'|')[2]; // width\r\n s4 := splitstring(dm.xdsPicklistIDENT_VALUE.asstring,'|')[3]; // DB field name\r\n s5 := splitstring(dm.xdsPicklistIDENT_VALUE.asstring,'|')[4]; // Primary Key '0/1'\r\n s6 := splitstring(dm.xdsPicklistIDENT_VALUE.asstring,'|')[5]; // Insert value source\r\n\r\n if dm.xdsPicklistVISIBLE.asinteger = 1\r\n then begin\r\n Grid_p.columns[dm.xdsPicklist.recno - 1].datafield := s1;\r\n Grid_p.columns[dm.xdsPicklist.recno - 1].width := strtoint(s3);\r\n Grid_p.columns[dm.xdsPicklist.recno - 1].title := s2;\r\n end\r\n else begin\r\n Grid_p.columns[dm.xdsPicklist.recno - 1].datafield := s1; //'';\r\n Grid_p.columns[dm.xdsPicklist.recno - 1].width := 0;\r\n Grid_p.columns[dm.xdsPicklist.recno - 1].title := '';\r\n end;\r\n\r\n if s6 = '=' // to use in pick form\r\n then Grid_p.columns[dm.xdsPicklist.recno - 1].Tag := 1\r\n else Grid_p.columns[dm.xdsPicklist.recno - 1].Tag := 0;\r\n\r\n dm.xdsPicklist.next;\r\n j := j + 1; // showmessage('j');\r\n end;\r\n //showmessage('J = ' + inttostr(J));\r\n //showmessage('Grid_p.columns.count = ' + inttostr(Grid_p.columns.count));\r\n //showmessage(Grid_p.columns[0].title);\r\n\r\n// showmessage(grid_p.name);\r\n\r\nfor i := j to Grid_p.columns.count - 1\r\ndo begin\r\n //showmessage(Grid_p.columns[i].title);\r\n Grid_p.columns[i].width := 0;\r\n Grid_p.columns[i].datafield := '';\r\n Grid_p.columns[i].title := '';\r\n //showmessage(Grid_p.columns[i].title);\r\n end;\r\n//showmessage(memGridColumns.text);\r\n\r\ndm.egv_localstorage.values[uppercase(EGV_GRIDTOSETUP.name) + '_COLUMNS_' + StorageID_p] := memGridColumns.text;\r\n\r\n//Grid_AdjustColumns(Grid_p,true);\r\n//showmessage(uppercase(EGV_GRIDTOSETUP.name) + '_COLUMNS_' + StorageID_p);\r\n//showmessage(memGridColumns.text);\r\n\r\nLS_Save;\r\n\r\nself.close;\r\nend;\r\n\r\nprocedure TfrmDynamicGridSetup.WebBitBtn3Click(Sender: TObject);\r\nvar i: integer; s: string;\r\nbegin\r\ns := ( findcomponent('e1') as TEdit ).text;\r\nfor i := 2 to 6 do s := s + '|' + ( findcomponent('e'+inttostr(i)) as TEdit ).text;\r\n dm.xdsPicklist.Append;\r\n dm.xdsPicklistIDENT_VALUE.AsString := s;\r\n dm.xdsPicklist.Post;\r\n DataSetApplyUpdate(dm.xdsPicklist, 'I', 1);\r\nend;\r\n\r\nprocedure TfrmDynamicGridSetup.WebBitBtn4Click(Sender: TObject);\r\nvar i: integer; s: string;\r\nbegin\r\ns := ( findcomponent('e1') as TEdit ).text;\r\nfor i := 2 to 6 do s := s + '|' + ( findcomponent('e'+inttostr(i)) as TEdit ).text;\r\n//showmessage(s);\r\ndm.xdsPicklist.edit;\r\ndm.xdsPicklistIDENT_VALUE.AsString := s;\r\ndm.xdsPicklist.Post;\r\nend;\r\n\r\nprocedure TfrmDynamicGridSetup.WebFormClose(Sender: TObject;\r\n var Action: TCloseAction);\r\nvar prevform_p: TForm; grd: TDBGrid;\r\nbegin\r\nEGV_SHOWCOMMONPICKLIST := Save_EGV_SHOWCOMMONPICKLIST;\r\ngrd := nil;\r\nprevform_p := getpreviousform;\r\nif assigned(prevform_p) and assigned(prevform_p.findcomponent('GRDDYNAMICGRID'))\r\nthen grd := ( prevform_p.findcomponent('GRDDYNAMICGRID') as TDBGrid);\r\n\r\nif (subform_pointer_number = 1) and assigned(egv_subform) and egv_subform.visible then begin {egv_subform.Close; } egv_subform := nil; end;\r\nif (subform_pointer_number = 2) and assigned(egv_subform2) and egv_subform3.visible then begin {egv_subform2.Close; }egv_subform2 := nil; end;\r\nif (subform_pointer_number = 3) and assigned(egv_subform3) and egv_subform3.visible then begin {egv_subform3.Close; } egv_subform3 := nil; end;\r\nif (subform_pointer_number = 4) and assigned(egv_subform4) and egv_subform4.visible then begin {egv_subform4.Close; } egv_subform4 := nil; end;\r\nif (subform_pointer_number = 5) and assigned(egv_subform5) and egv_subform5.visible then begin {egv_subform5.Close; } egv_subform5 := nil; end;\r\nif (subform_pointer_number = 6) and assigned(egv_subform6) and egv_subform6.visible then begin {egv_subform5.Close; } egv_subform6 := nil; end;\r\nif (subform_pointer_number = 7) and assigned(egv_subform7) and egv_subform7.visible then begin {egv_subform5.Close; } egv_subform7 := nil; end;\r\nif (subform_pointer_number = 8) and assigned(egv_subform8) and egv_subform8.visible then begin {egv_subform5.Close; } egv_subform8 := nil; end;\r\nif (subform_pointer_number = 9) and assigned(egv_subform9) and egv_subform9.visible then begin {egv_subform5.Close; } egv_subform9 := nil; end;\r\n//showmessage(getpreviousform.name);\r\nRefreshGridDatasources(getpreviousform);\r\nHideFormContainer(true);\r\nEGV_GRIDTOSETUP := nil;\r\nif grd <> nil\r\nthen begin\r\n ResizeFormBlocks((prevform_p.FindComponent('sbSearch')as TScrollBox), 20, false);\r\n Grid_AdjustColumns(grd,true);\r\n Grid_SetTitleHeight(grd);\r\n end;\r\nend;\r\n\r\nprocedure TfrmDynamicGridSetup.WebFormShow(Sender: TObject);\r\nbegin\r\n\r\n Save_EGV_SHOWCOMMONPICKLIST := EGV_SHOWCOMMONPICKLIST;\r\n EGV_SHOWCOMMONPICKLIST := false; // can be true only for reg. picklists\r\n\r\n subform_pointer_number := getsubform();\r\n form_pointer_number := subform_pointer_number - 2;\r\n\r\n EGV_CHILD_FORM_CAPTION := 'Grid Columns';\r\n /// EGV_PKLTARGETMEMO := nil;\r\n ///EGV_PKLTARGETMEMONAME := '';\r\n EGV_PKLEDITMODE := true;\r\n\r\n // showmessage(inttostr(form_pointer_number));\r\n\r\n if subform_pointer_number = 1 then Application.CreateForm(TfrmPickList, pnlGridColumnsPKL.ElementID, egv_subform);\r\n if subform_pointer_number = 2 then Application.CreateForm(TfrmPickList, pnlGridColumnsPKL.ElementID, egv_subform2);\r\n if subform_pointer_number = 3 then Application.CreateForm(TfrmPickList, pnlGridColumnsPKL.ElementID, egv_subform3);\r\n if subform_pointer_number = 4 then Application.CreateForm(TfrmPickList, pnlGridColumnsPKL.ElementID, egv_subform4);\r\n if subform_pointer_number = 5 then Application.CreateForm(TfrmPickList, pnlGridColumnsPKL.ElementID, egv_subform5);\r\n if subform_pointer_number = 6 then Application.CreateForm(TfrmPickList, pnlGridColumnsPKL.ElementID, egv_subform6);\r\n if subform_pointer_number = 7 then Application.CreateForm(TfrmPickList, pnlGridColumnsPKL.ElementID, egv_subform7);\r\n if subform_pointer_number = 8 then Application.CreateForm(TfrmPickList, pnlGridColumnsPKL.ElementID, egv_subform8);\r\n if subform_pointer_number = 9 then Application.CreateForm(TfrmPickList, pnlGridColumnsPKL.ElementID, egv_subform9);\r\n // showmessage(EGV_GRIDTOSETUP.name);\r\n if form_pointer_number = 1\r\n then begin\r\n EGV_SECTIONNAME := EGV_GRIDTOSETUP.name + egv_subform.name;\r\n memoSQL.text := dm.egv_localstorage.values[uppercase(EGV_GRIDTOSETUP.name) + '_SELECT_' + uppercase(egv_subform.name)];\r\n end;\r\n if form_pointer_number = 2\r\n then begin\r\n EGV_SECTIONNAME := EGV_GRIDTOSETUP.name + egv_subform2.name;\r\n memoSQL.text := dm.egv_localstorage.values[uppercase(EGV_GRIDTOSETUP.name) + '_SELECT_' + uppercase(egv_subform2.name)];\r\n end;\r\n if form_pointer_number = 3\r\n then begin\r\n EGV_SECTIONNAME := EGV_GRIDTOSETUP.name + egv_subform3.name;\r\n memoSQL.text := dm.egv_localstorage.values[uppercase(EGV_GRIDTOSETUP.name) + '_SELECT_' + uppercase(egv_subform3.name)];\r\n end;\r\n if form_pointer_number = 4\r\n then begin\r\n EGV_SECTIONNAME := EGV_GRIDTOSETUP.name + egv_subform4.name;\r\n memoSQL.text := dm.egv_localstorage.values[uppercase(EGV_GRIDTOSETUP.name) + '_SELECT_' + uppercase(egv_subform4.name)];\r\n end;\r\n if form_pointer_number = 5\r\n then begin\r\n EGV_SECTIONNAME := EGV_GRIDTOSETUP.name + egv_subform5.name;\r\n memoSQL.text := dm.egv_localstorage.values[uppercase(EGV_GRIDTOSETUP.name) + '_SELECT_' + uppercase(egv_subform5.name)];\r\n end;\r\n if form_pointer_number = 6\r\n then begin\r\n EGV_SECTIONNAME := EGV_GRIDTOSETUP.name + egv_subform6.name;\r\n memoSQL.text := dm.egv_localstorage.values[uppercase(EGV_GRIDTOSETUP.name) + '_SELECT_' + uppercase(egv_subform6.name)];\r\n end;\r\n if form_pointer_number = 7\r\n then begin\r\n EGV_SECTIONNAME := EGV_GRIDTOSETUP.name + egv_subform7.name;\r\n memoSQL.text := dm.egv_localstorage.values[uppercase(EGV_GRIDTOSETUP.name) + '_SELECT_' + uppercase(egv_subform7.name)];\r\n end;\r\n if form_pointer_number = 8\r\n then begin\r\n EGV_SECTIONNAME := EGV_GRIDTOSETUP.name + egv_subform8.name;\r\n memoSQL.text := dm.egv_localstorage.values[uppercase(EGV_GRIDTOSETUP.name) + '_SELECT_' + uppercase(egv_subform8.name)];\r\n end;\r\n if form_pointer_number = 9\r\n then begin\r\n EGV_SECTIONNAME := EGV_GRIDTOSETUP.name + egv_subform9.name;\r\n memoSQL.text := dm.egv_localstorage.values[uppercase(EGV_GRIDTOSETUP.name) + '_SELECT_' + uppercase(egv_subform9.name)];\r\n end;\r\n pnlFormCaption.Caption := EGV_SUBFORMCAPTION;\r\n\r\nResizeButtons(pnlListButtons);\r\nResizeButtons(pnlFormButtons);\r\n\r\nend;\r\n\r\nprocedure TfrmDynamicGridSetup.WebSplitter1Moved(Sender: TObject);\r\nbegin\r\nif (subform_pointer_number = 1) and assigned(egv_subform) and egv_subform.visible then egv_subform.Realign;\r\nif (subform_pointer_number = 2) and assigned(egv_subform2) and egv_subform3.visible then egv_subform2.Realign;\r\nif (subform_pointer_number = 3) and assigned(egv_subform3) and egv_subform3.visible then egv_subform3.Realign;\r\nif (subform_pointer_number = 4) and assigned(egv_subform4) and egv_subform4.visible then egv_subform4.Realign;\r\nif (subform_pointer_number = 5) and assigned(egv_subform5) and egv_subform5.visible then egv_subform5.Realign;\r\nif (subform_pointer_number = 6) and assigned(egv_subform6) and egv_subform6.visible then egv_subform6.Realign;\r\nif (subform_pointer_number = 7) and assigned(egv_subform7) and egv_subform7.visible then egv_subform7.Realign;\r\nif (subform_pointer_number = 8) and assigned(egv_subform8) and egv_subform8.visible then egv_subform8.Realign;\r\nif (subform_pointer_number = 9) and assigned(egv_subform9) and egv_subform9.visible then egv_subform9.Realign;\r\nend;\r\n\r\nprocedure TfrmDynamicGridSetup.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n WebLabel1 := TLabel.Create(Self);\r\n memoSQL := TMemo.Create(Self);\r\n WebSplitter1 := TSplitter.Create(Self);\r\n WebSplitter2 := TSplitter.Create(Self);\r\n WebPanel4 := TPanel.Create(Self);\r\n pnlFormButtons := TPanel.Create(Self);\r\n btnOk := TBitBtn.Create(Self);\r\n btnClose := TBitBtn.Create(Self);\r\n WebMemo1 := TMemo.Create(Self);\r\n WebMemo2 := TMemo.Create(Self);\r\n WebPanel1 := TPanel.Create(Self);\r\n pnlGridColumnsPKL := TPanel.Create(Self);\r\n memGridColumns := TMemo.Create(Self);\r\n WebPanel2 := TPanel.Create(Self);\r\n WebScrollBox1 := TScrollBox.Create(Self);\r\n WebLabel7 := TLabel.Create(Self);\r\n e1 := TEdit.Create(Self);\r\n e2 := TEdit.Create(Self);\r\n e3 := TEdit.Create(Self);\r\n e4 := TEdit.Create(Self);\r\n e5 := TEdit.Create(Self);\r\n e6 := TEdit.Create(Self);\r\n pnlListButtons := TPanel.Create(Self);\r\n WebBitBtn3 := TBitBtn.Create(Self);\r\n WebBitBtn4 := TBitBtn.Create(Self);\r\n pnlFormCaption := TPanel.Create(Self);\r\n\r\n WebLabel1.BeforeLoadDFMValues;\r\n memoSQL.BeforeLoadDFMValues;\r\n WebSplitter1.BeforeLoadDFMValues;\r\n WebSplitter2.BeforeLoadDFMValues;\r\n WebPanel4.BeforeLoadDFMValues;\r\n pnlFormButtons.BeforeLoadDFMValues;\r\n btnOk.BeforeLoadDFMValues;\r\n btnClose.BeforeLoadDFMValues;\r\n WebMemo1.BeforeLoadDFMValues;\r\n WebMemo2.BeforeLoadDFMValues;\r\n WebPanel1.BeforeLoadDFMValues;\r\n pnlGridColumnsPKL.BeforeLoadDFMValues;\r\n memGridColumns.BeforeLoadDFMValues;\r\n WebPanel2.BeforeLoadDFMValues;\r\n WebScrollBox1.BeforeLoadDFMValues;\r\n WebLabel7.BeforeLoadDFMValues;\r\n e1.BeforeLoadDFMValues;\r\n e2.BeforeLoadDFMValues;\r\n e3.BeforeLoadDFMValues;\r\n e4.BeforeLoadDFMValues;\r\n e5.BeforeLoadDFMValues;\r\n e6.BeforeLoadDFMValues;\r\n pnlListButtons.BeforeLoadDFMValues;\r\n WebBitBtn3.BeforeLoadDFMValues;\r\n WebBitBtn4.BeforeLoadDFMValues;\r\n pnlFormCaption.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmDynamicGridSetup';\r\n Width := 1303;\r\n Height := 594;\r\n SetEvent(Self, 'OnClose', 'WebFormClose');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n WebLabel1.SetParentComponent(Self);\r\n WebLabel1.Name := 'WebLabel1';\r\n WebLabel1.Left := 0;\r\n WebLabel1.Top := 41;\r\n WebLabel1.Width := 1303;\r\n WebLabel1.Height := 29;\r\n WebLabel1.Align := alTop;\r\n WebLabel1.AutoSize := False;\r\n WebLabel1.Caption := 'DB Select statement ( '#39'USE 1'#39' - for Authorization DB, '#39'USE db_name'#39' - for main DB )';\r\n WebLabel1.Font.Charset := ANSI_CHARSET;\r\n WebLabel1.Font.Color := clBlack;\r\n WebLabel1.Font.Height := -13;\r\n WebLabel1.Font.Name := 'Tahoma';\r\n WebLabel1.Font.Style := [];\r\n WebLabel1.HeightPercent := 100.000000000000000000;\r\n WebLabel1.ParentFont := False;\r\n WebLabel1.Transparent := False;\r\n WebLabel1.WidthPercent := 100.000000000000000000;\r\n memoSQL.SetParentComponent(Self);\r\n memoSQL.Name := 'memoSQL';\r\n memoSQL.Left := 0;\r\n memoSQL.Top := 70;\r\n memoSQL.Width := 1293;\r\n memoSQL.Height := 117;\r\n memoSQL.Align := alClient;\r\n memoSQL.BorderStyle := bsNone;\r\n memoSQL.Font.Charset := DEFAULT_CHARSET;\r\n memoSQL.Font.Color := clWindowText;\r\n memoSQL.Font.Height := -16;\r\n memoSQL.Font.Name := 'Tahoma';\r\n memoSQL.Font.Style := [];\r\n memoSQL.HeightPercent := 100.000000000000000000;\r\n memoSQL.Lines.BeginUpdate;\r\n try\r\n memoSQL.Lines.Clear;\r\n memoSQL.Lines.Add('memoSQL');\r\n finally\r\n memoSQL.Lines.EndUpdate;\r\n end;\r\n memoSQL.ParentFont := False;\r\n memoSQL.SelLength := 0;\r\n memoSQL.SelStart := 0;\r\n memoSQL.ShowFocus := False;\r\n memoSQL.WidthPercent := 100.000000000000000000;\r\n WebSplitter1.SetParentComponent(Self);\r\n WebSplitter1.Name := 'WebSplitter1';\r\n WebSplitter1.Left := 0;\r\n WebSplitter1.Top := 187;\r\n WebSplitter1.Width := 1303;\r\n WebSplitter1.Height := 5;\r\n WebSplitter1.Align := alBottom;\r\n WebSplitter1.ChildOrder := 1;\r\n WebSplitter1.Color := clBtnFace;\r\n SetEvent(WebSplitter1, Self, 'OnMoved', 'WebSplitter1Moved');\r\n WebSplitter2.SetParentComponent(Self);\r\n WebSplitter2.Name := 'WebSplitter2';\r\n WebSplitter2.Left := 1293;\r\n WebSplitter2.Top := 70;\r\n WebSplitter2.Width := 10;\r\n WebSplitter2.Height := 117;\r\n WebSplitter2.Align := alRight;\r\n WebSplitter2.ChildOrder := 3;\r\n WebSplitter2.Color := clWhite;\r\n WebPanel4.SetParentComponent(Self);\r\n WebPanel4.Name := 'WebPanel4';\r\n WebPanel4.Left := 0;\r\n WebPanel4.Top := 192;\r\n WebPanel4.Width := 1303;\r\n WebPanel4.Height := 402;\r\n WebPanel4.Align := alBottom;\r\n WebPanel4.BorderColor := clWhite;\r\n WebPanel4.BorderStyle := bsNone;\r\n WebPanel4.ChildOrder := 9;\r\n WebPanel4.Color := clWhite;\r\n WebPanel4.TabOrder := 3;\r\n pnlFormButtons.SetParentComponent(WebPanel4);\r\n pnlFormButtons.Name := 'pnlFormButtons';\r\n pnlFormButtons.Left := 0;\r\n pnlFormButtons.Top := 361;\r\n pnlFormButtons.Width := 1303;\r\n pnlFormButtons.Height := 41;\r\n pnlFormButtons.Align := alBottom;\r\n pnlFormButtons.BorderStyle := bsNone;\r\n pnlFormButtons.ChildOrder := 5;\r\n pnlFormButtons.Color := clWhite;\r\n pnlFormButtons.TabOrder := 0;\r\n btnOk.SetParentComponent(pnlFormButtons);\r\n btnOk.Name := 'btnOk';\r\n btnOk.Left := 1123;\r\n btnOk.Top := 0;\r\n btnOk.Width := 90;\r\n btnOk.Height := 41;\r\n btnOk.Cursor := crHandPoint;\r\n btnOk.Hint := 'Cancel';\r\n btnOk.Align := alRight;\r\n btnOk.Caption := '';\r\n btnOk.ChildOrder := 86;\r\n btnOk.Color := clNone;\r\n btnOk.ElementClassName := 'btn_icon';\r\n btnOk.Font.Charset := DEFAULT_CHARSET;\r\n btnOk.Font.Color := clGray;\r\n btnOk.Font.Height := -16;\r\n btnOk.Font.Name := 'Tahoma';\r\n btnOk.Font.Style := [];\r\n btnOk.HeightPercent := 100.000000000000000000;\r\n btnOk.MaterialGlyph := 'check';\r\n btnOk.MaterialGlyphSize := 1;\r\n btnOk.ParentFont := False;\r\n btnOk.ShowHint := True;\r\n btnOk.TabOrder := 7;\r\n btnOk.WidthPercent := 9.000000000000000000;\r\n SetEvent(btnOk, Self, 'OnClick', 'btnOkClick');\r\n btnClose.SetParentComponent(pnlFormButtons);\r\n btnClose.Name := 'btnClose';\r\n btnClose.Left := 1213;\r\n btnClose.Top := 0;\r\n btnClose.Width := 90;\r\n btnClose.Height := 41;\r\n btnClose.Cursor := crHandPoint;\r\n btnClose.Hint := 'close';\r\n btnClose.Align := alRight;\r\n btnClose.Caption := '';\r\n btnClose.ChildOrder := 86;\r\n btnClose.Color := clNone;\r\n btnClose.ElementClassName := 'btn_icon';\r\n btnClose.Font.Charset := DEFAULT_CHARSET;\r\n btnClose.Font.Color := clGray;\r\n btnClose.Font.Height := -16;\r\n btnClose.Font.Name := 'Tahoma';\r\n btnClose.Font.Style := [];\r\n btnClose.HeightPercent := 100.000000000000000000;\r\n btnClose.MaterialGlyph := 'close';\r\n btnClose.MaterialGlyphSize := 1;\r\n btnClose.ParentFont := False;\r\n btnClose.ShowHint := True;\r\n btnClose.TabOrder := 7;\r\n btnClose.WidthPercent := 9.000000000000000000;\r\n SetEvent(btnClose, Self, 'OnClick', 'btnCloseClick');\r\n WebMemo1.SetParentComponent(WebPanel4);\r\n WebMemo1.Name := 'WebMemo1';\r\n WebMemo1.Left := 0;\r\n WebMemo1.Top := 313;\r\n WebMemo1.Width := 1303;\r\n WebMemo1.Height := 24;\r\n WebMemo1.Align := alBottom;\r\n WebMemo1.BorderStyle := bsNone;\r\n WebMemo1.Font.Charset := DEFAULT_CHARSET;\r\n WebMemo1.Font.Color := clWindowText;\r\n WebMemo1.Font.Height := -13;\r\n WebMemo1.Font.Name := 'Tahoma';\r\n WebMemo1.Font.Style := [fsBold];\r\n WebMemo1.HeightPercent := 100.000000000000000000;\r\n WebMemo1.Lines.BeginUpdate;\r\n try\r\n WebMemo1.Lines.Clear;\r\n WebMemo1.Lines.Add(' Column Alias (C1-C30)|Title|Width|DB Column Name|Is P.Key (1/0)|Update/Insert Value Source');\r\n finally\r\n WebMemo1.Lines.EndUpdate;\r\n end;\r\n WebMemo1.ParentFont := False;\r\n WebMemo1.ReadOnly := True;\r\n WebMemo1.SelLength := 0;\r\n WebMemo1.SelStart := 0;\r\n WebMemo1.ShowFocus := False;\r\n WebMemo1.WidthPercent := 100.000000000000000000;\r\n WebMemo2.SetParentComponent(WebPanel4);\r\n WebMemo2.Name := 'WebMemo2';\r\n WebMemo2.Left := 0;\r\n WebMemo2.Top := 337;\r\n WebMemo2.Width := 1303;\r\n WebMemo2.Height := 24;\r\n WebMemo2.Align := alBottom;\r\n WebMemo2.BorderStyle := bsNone;\r\n WebMemo2.Font.Charset := DEFAULT_CHARSET;\r\n WebMemo2.Font.Color := clWindowText;\r\n WebMemo2.Font.Height := -13;\r\n WebMemo2.Font.Name := 'Tahoma';\r\n WebMemo2.Font.Style := [];\r\n WebMemo2.HeightPercent := 100.000000000000000000;\r\n WebMemo2.Lines.BeginUpdate;\r\n try\r\n WebMemo2.Lines.Clear;\r\n WebMemo2.Lines.Add('( Value Sorce : DB Select / '#39'EGV_'#39' Variable / '#39'+'#39' - Incrimental (Last + 1) /'#39' ='#39' - Pick-Form ) / \"-\" - Skip');\r\n finally\r\n WebMemo2.Lines.EndUpdate;\r\n end;\r\n WebMemo2.ParentFont := False;\r\n WebMemo2.ReadOnly := True;\r\n WebMemo2.SelLength := 0;\r\n WebMemo2.SelStart := 0;\r\n WebMemo2.ShowFocus := False;\r\n WebMemo2.WidthPercent := 100.000000000000000000;\r\n WebPanel1.SetParentComponent(WebPanel4);\r\n WebPanel1.Name := 'WebPanel1';\r\n WebPanel1.Left := 0;\r\n WebPanel1.Top := 0;\r\n WebPanel1.Width := 1303;\r\n WebPanel1.Height := 313;\r\n WebPanel1.Align := alClient;\r\n WebPanel1.BorderColor := clWhite;\r\n WebPanel1.BorderStyle := bsNone;\r\n WebPanel1.ChildOrder := 8;\r\n WebPanel1.Color := clWhite;\r\n WebPanel1.TabOrder := 3;\r\n pnlGridColumnsPKL.SetParentComponent(WebPanel1);\r\n pnlGridColumnsPKL.Name := 'pnlGridColumnsPKL';\r\n pnlGridColumnsPKL.Left := 0;\r\n pnlGridColumnsPKL.Top := 0;\r\n pnlGridColumnsPKL.Width := 848;\r\n pnlGridColumnsPKL.Height := 313;\r\n pnlGridColumnsPKL.Align := alClient;\r\n pnlGridColumnsPKL.BorderColor := clWhite;\r\n pnlGridColumnsPKL.BorderStyle := bsNone;\r\n pnlGridColumnsPKL.ChildOrder := 2;\r\n pnlGridColumnsPKL.Color := clWhite;\r\n pnlGridColumnsPKL.TabOrder := 0;\r\n memGridColumns.SetParentComponent(pnlGridColumnsPKL);\r\n memGridColumns.Name := 'memGridColumns';\r\n memGridColumns.Left := 11;\r\n memGridColumns.Top := 24;\r\n memGridColumns.Width := 265;\r\n memGridColumns.Height := 89;\r\n memGridColumns.HeightPercent := 100.000000000000000000;\r\n memGridColumns.Lines.BeginUpdate;\r\n try\r\n memGridColumns.Lines.Clear;\r\n memGridColumns.Lines.Add('memGridColumns');\r\n finally\r\n memGridColumns.Lines.EndUpdate;\r\n end;\r\n memGridColumns.SelLength := 0;\r\n memGridColumns.SelStart := 0;\r\n memGridColumns.Visible := False;\r\n memGridColumns.WidthPercent := 100.000000000000000000;\r\n WebPanel2.SetParentComponent(WebPanel1);\r\n WebPanel2.Name := 'WebPanel2';\r\n WebPanel2.Left := 848;\r\n WebPanel2.Top := 0;\r\n WebPanel2.Width := 455;\r\n WebPanel2.Height := 313;\r\n WebPanel2.Align := alRight;\r\n WebPanel2.BorderColor := clWhite;\r\n WebPanel2.BorderStyle := bsNone;\r\n WebPanel2.ChildOrder := 3;\r\n WebPanel2.Color := clWhite;\r\n WebPanel2.TabOrder := 1;\r\n WebScrollBox1.SetParentComponent(WebPanel2);\r\n WebScrollBox1.Name := 'WebScrollBox1';\r\n WebScrollBox1.Left := 0;\r\n WebScrollBox1.Top := 0;\r\n WebScrollBox1.Width := 455;\r\n WebScrollBox1.Height := 272;\r\n WebScrollBox1.Align := alClient;\r\n WebScrollBox1.BorderStyle := bsNone;\r\n WebScrollBox1.ChildOrder := 3;\r\n WebScrollBox1.Color := clWhite;\r\n WebScrollBox1.ScrollBars := ssVertical;\r\n WebLabel7.SetParentComponent(WebScrollBox1);\r\n WebLabel7.Name := 'WebLabel7';\r\n WebLabel7.Left := 0;\r\n WebLabel7.Top := 0;\r\n WebLabel7.Width := 455;\r\n WebLabel7.Height := 16;\r\n WebLabel7.Align := alTop;\r\n WebLabel7.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel7.Font.Color := clWindowText;\r\n WebLabel7.Font.Height := -13;\r\n WebLabel7.Font.Name := 'Tahoma';\r\n WebLabel7.Font.Style := [fsBold];\r\n WebLabel7.HeightPercent := 100.000000000000000000;\r\n WebLabel7.ParentFont := False;\r\n WebLabel7.Transparent := False;\r\n WebLabel7.WidthPercent := 100.000000000000000000;\r\n e1.SetParentComponent(WebScrollBox1);\r\n e1.Name := 'e1';\r\n e1.Left := 0;\r\n e1.Top := 16;\r\n e1.Width := 455;\r\n e1.Height := 22;\r\n e1.Hint := 'Name (Alias)';\r\n e1.Align := alTop;\r\n e1.ChildOrder := 4;\r\n e1.ElementClassName := 'box_bottomborder_font_normal';\r\n e1.ElementFont := efCSS;\r\n e1.Font.Charset := DEFAULT_CHARSET;\r\n e1.Font.Color := clBlack;\r\n e1.Font.Height := -16;\r\n e1.Font.Name := 'Tahoma';\r\n e1.Font.Style := [];\r\n e1.HeightPercent := 100.000000000000000000;\r\n e1.ParentFont := False;\r\n e1.ShowFocus := False;\r\n e1.ShowHint := True;\r\n e1.WidthPercent := 100.000000000000000000;\r\n e2.SetParentComponent(WebScrollBox1);\r\n e2.Name := 'e2';\r\n e2.Left := 0;\r\n e2.Top := 38;\r\n e2.Width := 455;\r\n e2.Height := 22;\r\n e2.Hint := 'Title';\r\n e2.Align := alTop;\r\n e2.ChildOrder := 5;\r\n e2.ElementClassName := 'box_bottomborder_font_normal';\r\n e2.ElementFont := efCSS;\r\n e2.Font.Charset := DEFAULT_CHARSET;\r\n e2.Font.Color := clMaroon;\r\n e2.Font.Height := -19;\r\n e2.Font.Name := 'Tahoma';\r\n e2.Font.Style := [];\r\n e2.HeightPercent := 100.000000000000000000;\r\n e2.ParentFont := False;\r\n e2.ShowFocus := False;\r\n e2.ShowHint := True;\r\n e2.WidthPercent := 100.000000000000000000;\r\n e3.SetParentComponent(WebScrollBox1);\r\n e3.Name := 'e3';\r\n e3.Left := 0;\r\n e3.Top := 60;\r\n e3.Width := 455;\r\n e3.Height := 22;\r\n e3.Hint := 'Width';\r\n e3.Align := alTop;\r\n e3.ChildOrder := 6;\r\n e3.ElementClassName := 'box_bottomborder_font_normal';\r\n e3.ElementFont := efCSS;\r\n e3.Font.Charset := DEFAULT_CHARSET;\r\n e3.Font.Color := clMaroon;\r\n e3.Font.Height := -19;\r\n e3.Font.Name := 'Tahoma';\r\n e3.Font.Style := [];\r\n e3.HeightPercent := 100.000000000000000000;\r\n e3.ParentFont := False;\r\n e3.ShowFocus := False;\r\n e3.ShowHint := True;\r\n e3.WidthPercent := 100.000000000000000000;\r\n e4.SetParentComponent(WebScrollBox1);\r\n e4.Name := 'e4';\r\n e4.Left := 0;\r\n e4.Top := 82;\r\n e4.Width := 455;\r\n e4.Height := 22;\r\n e4.Hint := 'DB Column Name';\r\n e4.Align := alTop;\r\n e4.ChildOrder := 4;\r\n e4.ElementClassName := 'box_bottomborder_font_normal';\r\n e4.ElementFont := efCSS;\r\n e4.Font.Charset := DEFAULT_CHARSET;\r\n e4.Font.Color := clMaroon;\r\n e4.Font.Height := -19;\r\n e4.Font.Name := 'Tahoma';\r\n e4.Font.Style := [];\r\n e4.HeightPercent := 100.000000000000000000;\r\n e4.ParentFont := False;\r\n e4.ShowFocus := False;\r\n e4.ShowHint := True;\r\n e4.WidthPercent := 100.000000000000000000;\r\n e5.SetParentComponent(WebScrollBox1);\r\n e5.Name := 'e5';\r\n e5.Left := 0;\r\n e5.Top := 104;\r\n e5.Width := 455;\r\n e5.Height := 22;\r\n e5.Hint := 'Is PK (0/1)';\r\n e5.Align := alTop;\r\n e5.ChildOrder := 5;\r\n e5.ElementClassName := 'box_bottomborder_font_normal';\r\n e5.ElementFont := efCSS;\r\n e5.Font.Charset := DEFAULT_CHARSET;\r\n e5.Font.Color := clMaroon;\r\n e5.Font.Height := -19;\r\n e5.Font.Name := 'Tahoma';\r\n e5.Font.Style := [];\r\n e5.HeightPercent := 100.000000000000000000;\r\n e5.ParentFont := False;\r\n e5.ShowFocus := False;\r\n e5.ShowHint := True;\r\n e5.WidthPercent := 100.000000000000000000;\r\n e6.SetParentComponent(WebScrollBox1);\r\n e6.Name := 'e6';\r\n e6.Left := 0;\r\n e6.Top := 126;\r\n e6.Width := 455;\r\n e6.Height := 22;\r\n e6.Hint := 'Update/Insert Value Source';\r\n e6.Align := alTop;\r\n e6.ChildOrder := 6;\r\n e6.ElementClassName := 'box_bottomborder_font_normal';\r\n e6.Font.Charset := DEFAULT_CHARSET;\r\n e6.Font.Color := clWindowText;\r\n e6.Font.Height := -13;\r\n e6.Font.Name := 'Tahoma';\r\n e6.Font.Style := [];\r\n e6.HeightPercent := 100.000000000000000000;\r\n e6.ParentFont := False;\r\n e6.ShowFocus := False;\r\n e6.ShowHint := True;\r\n e6.WidthPercent := 100.000000000000000000;\r\n pnlListButtons.SetParentComponent(WebPanel2);\r\n pnlListButtons.Name := 'pnlListButtons';\r\n pnlListButtons.Left := 0;\r\n pnlListButtons.Top := 272;\r\n pnlListButtons.Width := 455;\r\n pnlListButtons.Height := 41;\r\n pnlListButtons.Align := alBottom;\r\n pnlListButtons.BorderColor := clWhite;\r\n pnlListButtons.BorderStyle := bsNone;\r\n pnlListButtons.ChildOrder := 5;\r\n pnlListButtons.Color := clWhite;\r\n pnlListButtons.TabOrder := 1;\r\n WebBitBtn3.SetParentComponent(pnlListButtons);\r\n WebBitBtn3.Name := 'WebBitBtn3';\r\n WebBitBtn3.Left := 365;\r\n WebBitBtn3.Top := 0;\r\n WebBitBtn3.Width := 90;\r\n WebBitBtn3.Height := 41;\r\n WebBitBtn3.Cursor := crHandPoint;\r\n WebBitBtn3.Hint := 'Add as New Item';\r\n WebBitBtn3.Align := alRight;\r\n WebBitBtn3.Caption := '';\r\n WebBitBtn3.ChildOrder := 87;\r\n WebBitBtn3.Color := clNone;\r\n WebBitBtn3.ElementClassName := 'btn_icon';\r\n WebBitBtn3.Font.Charset := DEFAULT_CHARSET;\r\n WebBitBtn3.Font.Color := clGray;\r\n WebBitBtn3.Font.Height := -16;\r\n WebBitBtn3.Font.Name := 'Tahoma';\r\n WebBitBtn3.Font.Style := [];\r\n WebBitBtn3.HeightPercent := 100.000000000000000000;\r\n WebBitBtn3.MaterialGlyph := 'add_circle';\r\n WebBitBtn3.MaterialGlyphSize := 1;\r\n WebBitBtn3.ParentFont := False;\r\n WebBitBtn3.ShowHint := True;\r\n WebBitBtn3.TabOrder := 6;\r\n WebBitBtn3.WidthPercent := 9.000000000000000000;\r\n SetEvent(WebBitBtn3, Self, 'OnClick', 'WebBitBtn3Click');\r\n WebBitBtn4.SetParentComponent(pnlListButtons);\r\n WebBitBtn4.Name := 'WebBitBtn4';\r\n WebBitBtn4.Left := 275;\r\n WebBitBtn4.Top := 0;\r\n WebBitBtn4.Width := 90;\r\n WebBitBtn4.Height := 41;\r\n WebBitBtn4.Cursor := crHandPoint;\r\n WebBitBtn4.Hint := 'Update Item';\r\n WebBitBtn4.Align := alRight;\r\n WebBitBtn4.Caption := '';\r\n WebBitBtn4.ChildOrder := 87;\r\n WebBitBtn4.Color := clNone;\r\n WebBitBtn4.ElementClassName := 'btn_icon';\r\n WebBitBtn4.Font.Charset := DEFAULT_CHARSET;\r\n WebBitBtn4.Font.Color := clGray;\r\n WebBitBtn4.Font.Height := -16;\r\n WebBitBtn4.Font.Name := 'Tahoma';\r\n WebBitBtn4.Font.Style := [];\r\n WebBitBtn4.HeightPercent := 100.000000000000000000;\r\n WebBitBtn4.MaterialGlyph := 'check_circle';\r\n WebBitBtn4.MaterialGlyphSize := 1;\r\n WebBitBtn4.ParentFont := False;\r\n WebBitBtn4.ShowHint := True;\r\n WebBitBtn4.TabOrder := 6;\r\n WebBitBtn4.WidthPercent := 9.000000000000000000;\r\n SetEvent(WebBitBtn4, Self, 'OnClick', 'WebBitBtn4Click');\r\n pnlFormCaption.SetParentComponent(Self);\r\n pnlFormCaption.Name := 'pnlFormCaption';\r\n pnlFormCaption.Left := 0;\r\n pnlFormCaption.Top := 0;\r\n pnlFormCaption.Width := 1303;\r\n pnlFormCaption.Height := 41;\r\n pnlFormCaption.ElementClassName := 'form_caption';\r\n pnlFormCaption.HeightStyle := ssAuto;\r\n pnlFormCaption.Align := alTop;\r\n pnlFormCaption.BorderColor := clWhite;\r\n pnlFormCaption.BorderStyle := bsNone;\r\n pnlFormCaption.Caption := 'Form Caption';\r\n pnlFormCaption.ChildOrder := 9;\r\n pnlFormCaption.ElementFont := efCSS;\r\n pnlFormCaption.Font.Charset := DEFAULT_CHARSET;\r\n pnlFormCaption.Font.Color := clWindowText;\r\n pnlFormCaption.Font.Height := -16;\r\n pnlFormCaption.Font.Name := 'Tahoma';\r\n pnlFormCaption.Font.Style := [];\r\n pnlFormCaption.ParentFont := False;\r\n pnlFormCaption.TabOrder := 4;\r\n finally\r\n WebLabel1.AfterLoadDFMValues;\r\n memoSQL.AfterLoadDFMValues;\r\n WebSplitter1.AfterLoadDFMValues;\r\n WebSplitter2.AfterLoadDFMValues;\r\n WebPanel4.AfterLoadDFMValues;\r\n pnlFormButtons.AfterLoadDFMValues;\r\n btnOk.AfterLoadDFMValues;\r\n btnClose.AfterLoadDFMValues;\r\n WebMemo1.AfterLoadDFMValues;\r\n WebMemo2.AfterLoadDFMValues;\r\n WebPanel1.AfterLoadDFMValues;\r\n pnlGridColumnsPKL.AfterLoadDFMValues;\r\n memGridColumns.AfterLoadDFMValues;\r\n WebPanel2.AfterLoadDFMValues;\r\n WebScrollBox1.AfterLoadDFMValues;\r\n WebLabel7.AfterLoadDFMValues;\r\n e1.AfterLoadDFMValues;\r\n e2.AfterLoadDFMValues;\r\n e3.AfterLoadDFMValues;\r\n e4.AfterLoadDFMValues;\r\n e5.AfterLoadDFMValues;\r\n e6.AfterLoadDFMValues;\r\n pnlListButtons.AfterLoadDFMValues;\r\n WebBitBtn3.AfterLoadDFMValues;\r\n WebBitBtn4.AfterLoadDFMValues;\r\n pnlFormCaption.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit EditForm_Base;\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, Vcl.Controls,\r\n WEBLib.ExtCtrls, WebLib.Storage, WEBLib.Buttons, VCL.TMSFNCTypes,\r\n VCL.TMSFNCUtils, VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes,\r\n VCL.TMSFNCCustomControl, VCL.TMSFNCHTMLText, Types, WEBLib.WebCtrls,\r\n WEBLib.ContinuousScroll, WEBLib.DBCtrls, WEBLib.Calendar, VCL.TMSFNCListBox,\r\n VCL.TMSFNCCheckedListBox, VCL.TMSFNCSwitch, Vcl.Grids, Vcl.Mask, WEBLib.Mask,\r\n Vcl.Imaging.GIFImg, WEBLib.JQCtrls, Vcl.Menus, WEBLib.Menus, WEBLib.Grids, StrUtils;\r\n\r\ntype\r\n TfrmEditForm_Base = class(TForm)\r\n pnlBottom: TPanel;\r\n WebLabel15: TLabel;\r\n WebLabel13: TLabel;\r\n tbReport: TTMSFNCSwitch;\r\n pnlFormButtons: TPanel;\r\n btnCustom1: TBitBtn;\r\n btnCustom2: TBitBtn;\r\n btnCustom3: TBitBtn;\r\n btnCustom4: TBitBtn;\r\n btnCustom5: TBitBtn;\r\n btnPost: TBitBtn;\r\n btnAdd: TBitBtn;\r\n btnRefresh: TBitBtn;\r\n btnClose: TBitBtn;\r\n btnUseDefaults: TBitBtn;\r\n btnSaveAsDefaults: TBitBtn;\r\n pnlReportButtons: TPanel;\r\n btnRefresh_RPT: TBitBtn;\r\n btnClose_RPT: TBitBtn;\r\n WebLabel2: TLabel;\r\n btnCustom6: TBitBtn;\r\n btnCustom7: TBitBtn;\r\n btnCustom8: TBitBtn;\r\n btnCustom9: TBitBtn;\r\n spSideDataSplitter: TSplitter;\r\n pnlFormCaption: TPanel;\r\n WebMemo8: TMemo;\r\n btnClearBlockCustomPositioning: TBitBtn;\r\n btnClearBlockCustomSizes: TBitBtn;\r\n btnFixBlockPositions: TBitBtn;\r\n pnlSideData: TPanel;\r\n sbSideData: TScrollBox;\r\n sb6: TPanel;\r\n WebPanel9: TPanel;\r\n WebLabel26: TLabel;\r\n WebSpeedButton20: TSpeedButton;\r\n SM6: TMemo;\r\n WebHTMLContainer36: THTMLContainer;\r\n sb5: TPanel;\r\n WebPanel12: TPanel;\r\n WebLabel27: TLabel;\r\n WebSpeedButton21: TSpeedButton;\r\n SM5: TMemo;\r\n WebHTMLContainer35: THTMLContainer;\r\n sb4: TPanel;\r\n WebPanel22: TPanel;\r\n WebLabel28: TLabel;\r\n WebSpeedButton22: TSpeedButton;\r\n SM4: TMemo;\r\n WebHTMLContainer34: THTMLContainer;\r\n sb3: TPanel;\r\n WebPanel25: TPanel;\r\n WebLabel29: TLabel;\r\n WebSpeedButton23: TSpeedButton;\r\n SM3: TMemo;\r\n WebHTMLContainer33: THTMLContainer;\r\n sb2: TPanel;\r\n WebPanel30: TPanel;\r\n WebLabel30: TLabel;\r\n WebSpeedButton24: TSpeedButton;\r\n SM2: TMemo;\r\n WebHTMLContainer32: THTMLContainer;\r\n sb1: TPanel;\r\n WebPanel32: TPanel;\r\n WebLabel31: TLabel;\r\n WebSpeedButton25: TSpeedButton;\r\n SM1: TMemo;\r\n WebHTMLContainer31: THTMLContainer;\r\n sb7: TPanel;\r\n WebPanel34: TPanel;\r\n WebLabel32: TLabel;\r\n WebSpeedButton26: TSpeedButton;\r\n SM7: TMemo;\r\n WebHTMLContainer37: THTMLContainer;\r\n sb101: TPanel;\r\n WebPanel10: TPanel;\r\n WebLabel1: TLabel;\r\n WebSpeedButton67: TSpeedButton;\r\n SG1: TDBGrid;\r\n pnlSUBFORM_DIV: TPanel;\r\n pnlDataBlocks: TPanel;\r\n SubForm_DIV: TScrollBox;\r\n b26: TPanel;\r\n WebPanel13: TPanel;\r\n WebLabel8: TLabel;\r\n WebSpeedButton6: TSpeedButton;\r\n M26: TMemo;\r\n WebHTMLContainer27: THTMLContainer;\r\n B101: TPanel;\r\n WebPanel14: TPanel;\r\n WebLabel18: TLabel;\r\n WebSpeedButton11: TSpeedButton;\r\n G1: TDBGrid;\r\n B25: TPanel;\r\n WebPanel11: TPanel;\r\n WebLabel7: TLabel;\r\n WebSpeedButton5: TSpeedButton;\r\n M25: TMemo;\r\n WebHTMLContainer26: THTMLContainer;\r\n B20: TPanel;\r\n WebPanel95: TPanel;\r\n WebLabel47: TLabel;\r\n WebSpeedButton44: TSpeedButton;\r\n M20: TMemo;\r\n WebHTMLContainer17: THTMLContainer;\r\n B21: TPanel;\r\n WebPanel2: TPanel;\r\n WebLabel3: TLabel;\r\n WebSpeedButton1: TSpeedButton;\r\n M21: TMemo;\r\n WebHTMLContainer22: THTMLContainer;\r\n B22: TPanel;\r\n WebPanel4: TPanel;\r\n WebLabel4: TLabel;\r\n WebSpeedButton2: TSpeedButton;\r\n M22: TMemo;\r\n WebHTMLContainer23: THTMLContainer;\r\n b23: TPanel;\r\n WebPanel6: TPanel;\r\n WebLabel5: TLabel;\r\n WebSpeedButton3: TSpeedButton;\r\n M23: TMemo;\r\n WebHTMLContainer24: THTMLContainer;\r\n B18: TPanel;\r\n WebPanel111: TPanel;\r\n WebLabel55: TLabel;\r\n WebSpeedButton52: TSpeedButton;\r\n M18: TMemo;\r\n WebHTMLContainer19: THTMLContainer;\r\n B19: TPanel;\r\n WebPanel93: TPanel;\r\n WebLabel46: TLabel;\r\n WebSpeedButton43: TSpeedButton;\r\n M19: TMemo;\r\n WebHTMLContainer18: THTMLContainer;\r\n B24: TPanel;\r\n WebPanel8: TPanel;\r\n WebLabel6: TLabel;\r\n WebSpeedButton4: TSpeedButton;\r\n M24: TMemo;\r\n WebHTMLContainer25: THTMLContainer;\r\n B29: TPanel;\r\n WebPanel19: TPanel;\r\n WebLabel11: TLabel;\r\n WebSpeedButton9: TSpeedButton;\r\n M29: TMemo;\r\n WebHTMLContainer30: THTMLContainer;\r\n B28: TPanel;\r\n WebPanel17: TPanel;\r\n WebLabel10: TLabel;\r\n WebSpeedButton8: TSpeedButton;\r\n M28: TMemo;\r\n WebHTMLContainer29: THTMLContainer;\r\n B27: TPanel;\r\n WebPanel15: TPanel;\r\n WebLabel9: TLabel;\r\n WebSpeedButton7: TSpeedButton;\r\n M27: TMemo;\r\n WebHTMLContainer28: THTMLContainer;\r\n B16: TPanel;\r\n WebPanel107: TPanel;\r\n WebLabel53: TLabel;\r\n WebSpeedButton50: TSpeedButton;\r\n M16: TMemo;\r\n WebHTMLContainer21: THTMLContainer;\r\n B17: TPanel;\r\n WebPanel109: TPanel;\r\n WebLabel54: TLabel;\r\n WebSpeedButton51: TSpeedButton;\r\n M17: TMemo;\r\n WebHTMLContainer20: THTMLContainer;\r\n B15: TPanel;\r\n WebPanel97: TPanel;\r\n WebLabel48: TLabel;\r\n WebSpeedButton45: TSpeedButton;\r\n M15: TMemo;\r\n WebHTMLContainer16: THTMLContainer;\r\n B14: TPanel;\r\n WebPanel99: TPanel;\r\n WebLabel49: TLabel;\r\n WebSpeedButton46: TSpeedButton;\r\n M14: TMemo;\r\n WebHTMLContainer15: THTMLContainer;\r\n B13: TPanel;\r\n WebPanel101: TPanel;\r\n WebLabel50: TLabel;\r\n WebSpeedButton47: TSpeedButton;\r\n M13: TMemo;\r\n WebHTMLContainer14: THTMLContainer;\r\n B12: TPanel;\r\n WebPanel103: TPanel;\r\n WebLabel51: TLabel;\r\n WebSpeedButton48: TSpeedButton;\r\n M12: TMemo;\r\n WebHTMLContainer13: THTMLContainer;\r\n B11: TPanel;\r\n WebPanel105: TPanel;\r\n WebLabel52: TLabel;\r\n WebSpeedButton49: TSpeedButton;\r\n M11: TMemo;\r\n WebHTMLContainer12: THTMLContainer;\r\n B6: TPanel;\r\n WebPanel80: TPanel;\r\n WebLabel41: TLabel;\r\n WebSpeedButton38: TSpeedButton;\r\n M6: TMemo;\r\n WebHTMLContainer11: THTMLContainer;\r\n B7: TPanel;\r\n WebPanel82: TPanel;\r\n WebLabel42: TLabel;\r\n WebSpeedButton39: TSpeedButton;\r\n M7: TMemo;\r\n WebHTMLContainer10: THTMLContainer;\r\n B8: TPanel;\r\n WebPanel86: TPanel;\r\n WebLabel43: TLabel;\r\n WebSpeedButton40: TSpeedButton;\r\n M8: TMemo;\r\n WebHTMLContainer9: THTMLContainer;\r\n B9: TPanel;\r\n WebPanel88: TPanel;\r\n WebLabel44: TLabel;\r\n WebSpeedButton41: TSpeedButton;\r\n M9: TMemo;\r\n WebHTMLContainer8: THTMLContainer;\r\n B10: TPanel;\r\n WebPanel91: TPanel;\r\n WebLabel45: TLabel;\r\n WebSpeedButton42: TSpeedButton;\r\n M10: TMemo;\r\n WebHTMLContainer7: THTMLContainer;\r\n B5: TPanel;\r\n WebPanel74: TPanel;\r\n WebLabel38: TLabel;\r\n WebSpeedButton35: TSpeedButton;\r\n M5: TMemo;\r\n WebHTMLContainer6: THTMLContainer;\r\n B4: TPanel;\r\n WebPanel78: TPanel;\r\n WebLabel40: TLabel;\r\n WebSpeedButton37: TSpeedButton;\r\n M4: TMemo;\r\n WebHTMLContainer5: THTMLContainer;\r\n B3: TPanel;\r\n WebPanel72: TPanel;\r\n WebLabel37: TLabel;\r\n WebSpeedButton34: TSpeedButton;\r\n M3: TMemo;\r\n WebHTMLContainer4: THTMLContainer;\r\n B2: TPanel;\r\n WebPanel76: TPanel;\r\n WebLabel39: TLabel;\r\n WebSpeedButton36: TSpeedButton;\r\n M2: TMemo;\r\n WebHTMLContainer3: THTMLContainer;\r\n B1: TPanel;\r\n WebPanel70: TPanel;\r\n WebLabel36: TLabel;\r\n WebSpeedButton33: TSpeedButton;\r\n M1: TMemo;\r\n WebHTMLContainer2: THTMLContainer;\r\n B30: TPanel;\r\n WebPanel21: TPanel;\r\n WebLabel12: TLabel;\r\n WebSpeedButton10: TSpeedButton;\r\n M30: TMemo;\r\n WebHTMLContainer1: THTMLContainer;\r\n B100: TPanel;\r\n WebPanel3: TPanel;\r\n WebLabel14: TLabel;\r\n WebSpeedButton19: TSpeedButton;\r\n G9: TDBGrid;\r\n B102: TPanel;\r\n WebPanel24: TPanel;\r\n WebLabel21: TLabel;\r\n WebSpeedButton12: TSpeedButton;\r\n G2: TDBGrid;\r\n B105: TPanel;\r\n WebPanel26: TPanel;\r\n WebLabel22: TLabel;\r\n WebSpeedButton15: TSpeedButton;\r\n G5: TDBGrid;\r\n B104: TPanel;\r\n WebPanel18: TPanel;\r\n WebLabel19: TLabel;\r\n WebSpeedButton14: TSpeedButton;\r\n G4: TDBGrid;\r\n B103: TPanel;\r\n WebPanel7: TPanel;\r\n WebLabel17: TLabel;\r\n WebSpeedButton13: TSpeedButton;\r\n G3: TDBGrid;\r\n B106: TPanel;\r\n WebPanel20: TPanel;\r\n WebLabel20: TLabel;\r\n WebSpeedButton16: TSpeedButton;\r\n G6: TDBGrid;\r\n B107: TPanel;\r\n WebPanel27: TPanel;\r\n WebLabel23: TLabel;\r\n WebSpeedButton17: TSpeedButton;\r\n G7: TDBGrid;\r\n B108: TPanel;\r\n WebPanel29: TPanel;\r\n WebLabel24: TLabel;\r\n WebSpeedButton18: TSpeedButton;\r\n G8: TDBGrid;\r\n wmWaitMessage: TWaitMessage;\r\n viewpdf: TBrowserControl;\r\n B31: TPanel;\r\n WebPanel5: TPanel;\r\n WebLabel16: TLabel;\r\n WebSpeedButton27: TSpeedButton;\r\n M31: TMemo;\r\n WebHTMLContainer38: THTMLContainer;\r\n B32: TPanel;\r\n WebPanel16: TPanel;\r\n WebLabel25: TLabel;\r\n WebSpeedButton28: TSpeedButton;\r\n M32: TMemo;\r\n WebHTMLContainer39: THTMLContainer;\r\n B33: TPanel;\r\n WebPanel28: TPanel;\r\n WebLabel33: TLabel;\r\n WebSpeedButton29: TSpeedButton;\r\n M33: TMemo;\r\n WebHTMLContainer40: THTMLContainer;\r\n B34: TPanel;\r\n WebPanel33: TPanel;\r\n WebLabel34: TLabel;\r\n WebSpeedButton30: TSpeedButton;\r\n M34: TMemo;\r\n WebHTMLContainer41: THTMLContainer;\r\n B35: TPanel;\r\n WebPanel36: TPanel;\r\n WebLabel35: TLabel;\r\n WebSpeedButton31: TSpeedButton;\r\n M35: TMemo;\r\n WebHTMLContainer42: THTMLContainer;\r\n B36: TPanel;\r\n WebPanel38: TPanel;\r\n WebLabel56: TLabel;\r\n WebSpeedButton32: TSpeedButton;\r\n M36: TMemo;\r\n WebHTMLContainer43: THTMLContainer;\r\n B37: TPanel;\r\n WebPanel40: TPanel;\r\n WebLabel57: TLabel;\r\n WebSpeedButton53: TSpeedButton;\r\n M37: TMemo;\r\n WebHTMLContainer44: THTMLContainer;\r\n B38: TPanel;\r\n WebPanel42: TPanel;\r\n WebLabel58: TLabel;\r\n WebSpeedButton54: TSpeedButton;\r\n M38: TMemo;\r\n WebHTMLContainer45: THTMLContainer;\r\n B39: TPanel;\r\n WebPanel44: TPanel;\r\n WebLabel59: TLabel;\r\n WebSpeedButton55: TSpeedButton;\r\n M39: TMemo;\r\n WebHTMLContainer46: THTMLContainer;\r\n B40: TPanel;\r\n WebPanel46: TPanel;\r\n WebLabel60: TLabel;\r\n WebSpeedButton56: TSpeedButton;\r\n M40: TMemo;\r\n WebHTMLContainer47: THTMLContainer;\r\n B41: TPanel;\r\n WebPanel48: TPanel;\r\n WebLabel61: TLabel;\r\n WebSpeedButton57: TSpeedButton;\r\n M41: TMemo;\r\n WebHTMLContainer48: THTMLContainer;\r\n B42: TPanel;\r\n WebPanel50: TPanel;\r\n WebLabel62: TLabel;\r\n WebSpeedButton58: TSpeedButton;\r\n M42: TMemo;\r\n WebHTMLContainer49: THTMLContainer;\r\n B43: TPanel;\r\n WebPanel52: TPanel;\r\n WebLabel63: TLabel;\r\n WebSpeedButton59: TSpeedButton;\r\n M43: TMemo;\r\n WebHTMLContainer50: THTMLContainer;\r\n B44: TPanel;\r\n WebPanel54: TPanel;\r\n WebLabel64: TLabel;\r\n WebSpeedButton60: TSpeedButton;\r\n M44: TMemo;\r\n WebHTMLContainer51: THTMLContainer;\r\n B45: TPanel;\r\n WebPanel56: TPanel;\r\n WebLabel65: TLabel;\r\n WebSpeedButton61: TSpeedButton;\r\n M45: TMemo;\r\n WebHTMLContainer52: THTMLContainer;\r\n B46: TPanel;\r\n WebPanel58: TPanel;\r\n WebLabel66: TLabel;\r\n WebSpeedButton62: TSpeedButton;\r\n M46: TMemo;\r\n WebHTMLContainer53: THTMLContainer;\r\n B47: TPanel;\r\n WebPanel60: TPanel;\r\n WebLabel67: TLabel;\r\n WebSpeedButton63: TSpeedButton;\r\n M47: TMemo;\r\n WebHTMLContainer54: THTMLContainer;\r\n B48: TPanel;\r\n WebPanel62: TPanel;\r\n WebLabel68: TLabel;\r\n WebSpeedButton64: TSpeedButton;\r\n M48: TMemo;\r\n WebHTMLContainer55: THTMLContainer;\r\n B49: TPanel;\r\n WebPanel64: TPanel;\r\n WebLabel69: TLabel;\r\n WebSpeedButton65: TSpeedButton;\r\n M49: TMemo;\r\n WebHTMLContainer56: THTMLContainer;\r\n B50: TPanel;\r\n WebPanel66: TPanel;\r\n WebLabel70: TLabel;\r\n WebSpeedButton66: TSpeedButton;\r\n M50: TMemo;\r\n WebHTMLContainer57: THTMLContainer;\r\n sb102: TPanel;\r\n WebPanel23: TPanel;\r\n WebLabel73: TLabel;\r\n WebSpeedButton68: TSpeedButton;\r\n SG2: TDBGrid;\r\n sb103: TPanel;\r\n WebPanel35: TPanel;\r\n WebLabel74: TLabel;\r\n WebSpeedButton69: TSpeedButton;\r\n SG3: TDBGrid;\r\n\r\n procedure _Block_MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);\r\n procedure _GridBlock_MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);\r\n procedure _Block_MouseLeave(Sender: TObject);\r\n procedure _BlockTitle_MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);\r\n procedure _GridBlockTitle_MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);\r\n procedure _BlockTitleEdit(Sender: TObject);\r\n procedure _BlockDragOverTitle(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);\r\n procedure _BlockDragDrop(Sender, Source: TObject; X, Y: Integer);\r\n procedure _BlockShowQPickList(Sender: Tobject);\r\n procedure _BlockCallPickForm(Sender: Tobject);\r\n\r\n procedure WebFormClose(Sender: TObject; var Action: TCloseAction);\r\n procedure WebFormResize(Sender: TObject);\r\n procedure WebFormShow(Sender: TObject);\r\n procedure M21Change(Sender: TObject);\r\n procedure SubForm_DIV_MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure btnCloseClick(Sender: TObject);\r\n procedure btnSaveAsDefaultsClick(Sender: TObject);\r\n procedure btnUseDefaultsClick(Sender: TObject);\r\n procedure M21MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure pnlFormCaptionMouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure btnPostClick(Sender: TObject);\r\n procedure btnRefreshClick(Sender: TObject);\r\n procedure M21DragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);\r\n procedure btnAddClick(Sender: TObject);\r\n procedure btnCustom1Click(Sender: TObject);\r\n procedure btnPostMouseLeave(Sender: TObject);\r\n procedure btnRefreshMouseLeave(Sender: TObject);\r\n procedure G1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);\r\n procedure G1KeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);\r\n procedure G1Click(Sender: TObject);\r\n procedure M1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);\r\n procedure tbReportChange(Sender: TObject);\r\n procedure btnRefresh_RPTClick(Sender: TObject);\r\n procedure btnClose_RPTClick(Sender: TObject);\r\n procedure _SideDataBlockDragDrop(Sender, Source: TObject; X, Y: Integer);\r\n procedure spSideDataSplitterMoved(Sender: TObject);\r\n procedure WebFormCloseQuery(Sender: TObject; var CanClose: Boolean);\r\n procedure btnCloseMouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure WebFormCreate(Sender: TObject);\r\n procedure WebPanel70MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure WebPanel14MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure WebPanel32MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure WebHTMLContainer2Click(Sender: TObject);\r\n procedure btnClearBlockCustomPositioningClick(Sender: TObject);\r\n procedure btnClearBlockCustomSizesClick(Sender: TObject);\r\n procedure btnFixBlockPositionsClick(Sender: TObject);\r\n procedure SubForm_DIVDragDrop(Sender, Source: TObject; X, Y: Integer);\r\n procedure WebLabel15MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure pnlFormButtonsMouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure M1Enter(Sender: TObject);\r\n procedure M1Exit(Sender: TObject);\r\n\r\n\r\n private\r\n { Private declarations }\r\n PrevFormName_p: string;\r\n FormIsActive_p: Boolean;\r\n Mouse_X : integer;\r\n Mouse_Y : integer;\r\n\r\n\r\n public\r\n { Public declarations }\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmEditForm_Base: TfrmEditForm_Base;\r\n\r\nimplementation\r\n\r\n{$R *.dfm}\r\nuses DATAMODULE, Main, common;\r\n\r\n\r\nprocedure TfrmEditForm_Base.btnUseDefaultsClick(Sender: TObject);\r\nbegin\r\n try\r\n(Sender as TBitbtn).enabled := false;\r\n GetPostFormDefaultsdata(GetCurrentFormname, 0); // get and apply default data\r\n StretchAllMemos(GetCurrentFormDiv);\r\nfinally\r\n (Sender as TBitbtn).enabled := true;\r\nend;\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.G1Click(Sender: TObject);\r\nbegin\r\n{showmessage((Sender as TWebDBGrid).datasource.Name);\r\nshowmessage((Sender as TWebDBGrid).datasource.dataset.Name);\r\nshowmessage(inttostr((Sender as TWebDBGrid).datasource.dataset.tag));\r\nif (Sender as TWebDBGrid).datasource.dataset.active\r\nthen showmessage('Active')\r\nelse showmessage('Closed'); }\r\n\r\n//showmessage('1');\r\nif assigned((Sender as TDBGrid).datasource) and assigned((Sender as TDBGrid).datasource.dataset)\r\nthen SetKeyVariablesFromDataSet((Sender as TDBGrid).datasource.dataset);\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.G1KeyUp(Sender: TObject; var Key: Word;\r\n Shift: TShiftState);\r\nbegin\r\nif assigned((Sender as TDBGrid).datasource) and assigned((Sender as TDBGrid).datasource.dataset)\r\nthen SetKeyVariablesFromDataSet((Sender as TDBGrid).datasource.dataset);\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.G1MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\nbegin\r\nif (sender as TControl).parent.Name = 'PNL_PICKFORM_PNLGRID' then exit;\r\n\r\n//if frmmain.cldQPKLCalendar.Visible then exit;\r\n\r\nGetBlockUniqueID(((Sender as TControl).Parent as Tpanel));\r\nBlock_MouseMove(((Sender as TControl).parent as TPanel),[],0,0, 'btnAddRecord,btnDeleteRecord,btnDesignGrid,btnBlockGridPost,cbPickListType,edtPickListCustomForm,btnDBField_Settings,btnQuickPicklistSettings');\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.pnlFormButtonsMouseMove(Sender: TObject;\r\n Shift: TShiftState; X, Y: Integer);\r\nbegin\r\nif frmmain.clQuickPicklist.visible then frmmain.btnCloseQuickPickListClick(nil);\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.pnlFormCaptionMouseMove(Sender: TObject; Shift: TShiftState;\r\n X, Y: Integer);\r\nbegin\r\nif frmmain.clQuickPicklist.visible then frmmain.btnCloseQuickPickListClick(nil);\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.btnSaveAsDefaultsClick(Sender: TObject);\r\nbegin\r\n try\r\n (Sender as TBitbtn).enabled := false;\r\n\r\nCollectFormDefaults(GetCurrentFormName());\r\nfinally\r\n (Sender as TBitbtn).enabled := true;\r\nend;\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.btnClearBlockCustomPositioningClick(Sender: TObject);\r\nbegin\r\nClearBlockCustomPositioning;\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.btnClearBlockCustomSizesClick(Sender: TObject);\r\nbegin\r\nClearBlockCustomSizes\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.btnCloseClick(Sender: TObject);\r\nbegin\r\n//if pnlFormCaption.Visible then showmessage('1');\r\n\r\nif frmmain.clQuickPicklist.visible then frmmain.btnCloseQuickPickListClick(nil);\r\nRefreshGridDatasources(getpreviousform);\r\nself.Close;\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.btnCloseMouseMove(Sender: TObject;\r\n Shift: TShiftState; X, Y: Integer);\r\nbegin\r\n if frmmain.clQuickPicklist.Visible then frmmain.btnCloseQuickPicklistClick(nil);\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.btnClose_RPTClick(Sender: TObject);\r\nbegin\r\nRefreshGridDatasources(getpreviousform);\r\nself.Close;\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.btnCustom1Click(Sender: TObject);\r\nvar containername_p, Buttonname_p, Formtocall_p, APIcall_p: string;\r\nbegin\r\n//showmessage(EGV_CURRENTFORMNAME);\r\nButtonName_p := uppercase('BUTTON' + StringReplace((Sender as TBitBtn).name, 'btnCustom','', []));\r\nEGV_CURRENTFORMNAME := dm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform()-1)];\r\nFormtocall_p := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_' + ButtonName_p + '_FORM'];\r\nAPIcall_p := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_' + Buttonname_p + '_API'];\r\n\r\n//showmessage('current form name: ' + EGV_CURRENTFORMNAME);\r\n\r\ndm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform())] := Formtocall_p;\r\nEGV_CURRENTFORMNAME := dm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform())];\r\n// dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + Buttonname_p +'_FORM'];\r\n\r\nif Formtocall_p <> ''\r\nthen containername_p := getformcontainer().name;\r\n\r\n//showmessage(dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON1_API']);\r\nCallFormPrepare(containername_p, 0, APIcall_p);\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.btnFixBlockPositionsClick(Sender: TObject);\r\nbegin\r\nFixBlockPositions;\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.SubForm_DIVDragDrop(Sender, Source: TObject; X,\r\n Y: Integer);\r\nbegin\r\nBlockDragDrop(Sender, Source, X, Y);\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.SubForm_DIV_MouseMove(Sender: TObject; Shift: TShiftState;\r\n X, Y: Integer);\r\nbegin\r\nif frmmain.clQuickPicklist.visible then frmmain.btnCloseQuickPickListClick(nil);\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.tbReportChange(Sender: TObject);\r\nvar template_name: string; template_id: integer;\r\nbegin\r\ntry\r\nviewpdf.url := '';\r\nif tbReport.State = ssOn\r\nthen begin\r\n viewpdf.Visible := false;\r\n viewpdf.align := alNone;\r\n viewpdf.Parent := self; //History_panel;\r\n viewpdf.align := alClient;\r\n SubForm_DIV.Visible := false;\r\n viewpdf.visible := true;\r\n //showmessage(EGV_CURRENTFORMNAME);\r\n\r\n if not frmmain.wmWaitMessage.showing then frmmain.wmWaitMessage.Show;\r\n\r\n //Runreport(Viewpdf, 'NURHISTORY', 1); // Runreport(Viewpdf, EGV_CURRENTFORMNAME, 1);\r\n\r\n //showmessage(EGV_CURRENTFORMNAME);\r\n if pos(',', dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME + '_FORM_REPORTTEMPLATE')]) > 0\r\n then begin\r\n template_name := splitstring(dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME + '_FORM_REPORTTEMPLATE')],',')[0];\r\n template_id := strtoint(splitstring(dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME + '_FORM_REPORTTEMPLATE')],',')[1]);\r\n end\r\n else begin\r\n template_name := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME + '_FORM_REPORTTEMPLATE')];\r\n template_id := 1;\r\n end;\r\n\r\n // showmessage(template_name + ' --- ' + inttostr(template_id));\r\n Runreport(Viewpdf, template_name, template_id, false);\r\n\r\n pnlFormButtons.Visible := false;\r\n pnlReportButtons.Visible := true; //showmessage('1');\r\n pnlReportButtons.Align := alClient;\r\n end\r\nelse begin\r\n viewpdf.Visible := false;\r\n SubForm_DIV.Visible := true;\r\n pnlFormButtons.Visible := true;\r\n pnlFormButtons.Align := alClient;\r\n pnlReportButtons.Visible := false;\r\n end;\r\nfinally\r\nWebFormResize(self);\r\nend;\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.btnAddClick(Sender: TObject);\r\nbegin\r\nif btnPost.tag = 1 then exit; // already in insert mode\r\n\r\nDBF_GetPostBlocks(Subform_div, 2); // clear all data and run 'insert' queries.\r\nbtnPost.tag := 1; // insert mode;\r\n//(Sender as TWebBitBtn).elementclassname := 'btn btn-warning';\r\n//HideShowFormGrids(self, false);\r\n//frmmain.sbAlertBoxes.visible := false;\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.btnRefreshClick(Sender: TObject);\r\nbegin\r\n//(sender as TWebBitBtn).ElementClassName := 'btn btn-light';\r\nReleaseGridDatasets(getcurrentform);\r\nDBF_GetPostBlocks(Subform_div, 0);\r\nDBF_GetPostBlocks(sbSidedata, 0);\r\n//btnAdd.elementclassname := 'btn btn-outline-warning';\r\nbtnPost.tag := 0;\r\nHideShowFormGrids(self, true);\r\nfrmmain.sbAlertBoxes.visible := true;\r\n\r\nif tbReport.State = ssOn\r\nthen tbReportChange(tbReport);\r\n\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.btnRefreshMouseLeave(Sender: TObject);\r\nbegin\r\n//(sender as TWebBitBtn).ElementClassName := 'btn btn-outline-primary';\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.btnPostClick(Sender: TObject);\r\nbegin\r\n//(sender as TWebBitBtn).ElementClassName := 'btn btn-light';\r\nif (sender as TControl).tag = 0\r\nthen DBF_GetPostBlocks(Subform_div, 1) // post\r\nelse begin\r\n DBF_GetPostBlocks(Subform_div, 3, nil, 1); // insert ( new record ) - blocks only\r\n DBF_GetPostBlocks(Subform_div, 1, nil, 2); // post ( new record ) - grids only\r\n end;\r\n//btnAdd.elementclassname := 'btn btn-outline-warning';\r\nDBF_GetPostBlocks(sbSidedata, 1);\r\nDBF_GetPostBlocks(frmmain.sbAlertBoxes, 0, frmmain);\r\nDBF_GetPostBlocks(frmmain.sbInfoBoxes, 0, frmmain);\r\n{if btnPost.tag = 0 then DBF_GetPostBlocks(Subform_div, 0); // only if NOT in insert mode\r\nbtnPost.tag := 0; }\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.btnPostMouseLeave(Sender: TObject);\r\nbegin\r\n//(sender as TWebBitBtn).ElementClassName := 'btn btn-outline-success';\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.btnRefresh_RPTClick(Sender: TObject);\r\nbegin\r\nif tbReport.State = ssOn\r\nthen tbReportChange(tbReport);\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.WebFormClose(Sender: TObject; var Action: TCloseAction);\r\nvar s1,s2,s3, s4: string; grd: TDBGrid; prevform_p: TForm; currentform_p: TForm;\r\nbegin\r\n//showmessage('close');\r\n\r\nChangeMainMenuHighlight;\r\ngrd := nil;\r\nprevform_p := getpreviousform;\r\n\r\nif prevform_p <> nil\r\nthen begin\r\n // restore Design settings for the prevos form\r\n if dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS_' + uppercase(prevform_p.name)]= ''\r\n then EGV_FORMCOLUMNS := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS'])\r\n else EGV_FORMCOLUMNS := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS_' + uppercase(prevform_p.name)]);\r\n\r\n if dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH_' + uppercase(prevform_p.name)]= ''\r\n then EGV_BLOCKDEFAULTWIDTH := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH'])\r\n else EGV_BLOCKDEFAULTWIDTH := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH_' + uppercase(prevform_p.name)]);\r\n EGV_FORMCOLUMNSAUTO := (dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNSAUTO_' + uppercase(prevform_p.name)] = '1');\r\n\r\n { if dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS_' + uppercase(getpreviousform.name)]= ''\r\n then EGV_FORMCOLUMNS := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS'])\r\n else EGV_FORMCOLUMNS := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS_' + uppercase(getpreviousform.name)]); }\r\n\r\n end;\r\n\r\nif assigned(prevform_p) and assigned(prevform_p.findcomponent('GRDDYNAMICGRID'))\r\nthen grd := ( prevform_p.findcomponent('GRDDYNAMICGRID') as TDBGrid);\r\n\r\n//showmessage(getcurrentform.Name);\r\nReleaseGridDatasets(getcurrentform);\r\n//showmessage('2');\r\n//RefreshGridDatasources(prevform_p);\r\n\r\n//if grd <> nil\r\n//then SetKeyVariablesFromDataSet(grd.datasource.dataset, false);\r\nDBF_GetPostBlocks(frmmain.sbLogoBox, 0, frmmain);\r\nDBF_GetPostBlocks(frmmain.sbAlertBoxes, 0, frmmain);\r\nDBF_GetPostBlocks(frmmain.sbInfoBoxes, 0, frmmain);\r\n\r\nfrmmain.btnSwitch_Design.state := ssOff;\r\nHideFormContainer(true);\r\n\r\nif assigned(prevform_p)\r\nthen begin // showmessage(prevform_p.name);\r\n prevform_p.Realign;\r\n if prevform_p.FindComponent('pnlFormButtons') <> nil then ResizeButtons((prevform_p.FindComponent('pnlFormButtons')as Tpanel));\r\n if prevform_p.FindComponent('pnlReportButtons') <> nil then ResizeButtons((prevform_p.FindComponent('pnlReportButtons')as Tpanel));\r\n\r\n if prevform_p.FindComponent('SUBFORM_DIV') <> nil\r\n then begin //showmessage('1');\r\n ResizeFormBlocks((prevform_p.FindComponent('SUBFORM_DIV') as TScrollBox));\r\n StretchAllMemos((prevform_p.FindComponent('SUBFORM_DIV') as TScrollBox));\r\n DBF_GetPostBlocks((prevform_p.FindComponent('Subform_div') as TScrollBox), 0);\r\n end;\r\n if prevform_p.FindComponent('sbSideData') <> nil\r\n then begin //showmessage('2');\r\n ResizeFormBlocks((prevform_p.FindComponent('sbSideData') as TScrollBox), 1, false);\r\n StretchAllMemos((prevform_p.FindComponent('sbSideData') as TScrollBox));\r\n DBF_GetPostBlocks((prevform_p.FindComponent('sbSidedata') as TScrollBox), 0);\r\n end;\r\n // RefreshGridDataSources(prevform_p);\r\n //Form_AdjustGrids(prevform_p);\r\n //OrganizeBlocks((prevform_p.FindComponent('SUBFORM_DIV') as TWebScrollBox));\r\n //StretchAllMemos((prevform_p.FindComponent('SUBFORM_DIV') as TWebScrollBox));\r\n\r\n if grd <> nil\r\n then begin\r\n ResizeFormBlocks((prevform_p.FindComponent('sbSearch')as TScrollBox), 20, false);\r\n Grid_AdjustColumns(grd,true);\r\n Grid_SetTitleHeight(grd);\r\n end\r\n end;\r\nfrmmain.lblLocation.caption := stringreplace(frmmain.lblLocation.caption,' > ' + pnlFormCaption.Caption + ' ','',[]);\r\n//Refresh grid data\r\nif EGV_PARENT_DBGRID <> nil\r\nthen DBF_GetPostFieldData((EGV_PARENT_DBGRID.parent as TPanel), 0, nil, s1, s2, s3, s4);\r\n\r\nEGV_PARENT_DBGRID := nil;\r\nfrmmain.sbAlertBoxes.visible := true;\r\ncurrentform_p := getcurrentform;\r\ncurrentform_p := nil;\r\n\r\nif prevform_p <> nil\r\nthen begin\r\n EGV_CURRENTFORMNAME := prevform_p.Name;\r\n end;\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.WebFormCloseQuery(Sender: TObject;\r\n var CanClose: Boolean);\r\nbegin\r\n RestoreKeyVariables;\r\n CanClose := true;\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.WebFormCreate(Sender: TObject);\r\nbegin\r\n FormIsActive_p := false;\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.WebFormResize(Sender: TObject);\r\nvar width_p: integer;\r\nbegin\r\n//showmessage('resize starts');\r\n{if dm.EGV_LOCALSTORAGE.Values['EGV_SIDEDATAWIDTH_' + getcurrentformname] <> ''\r\nthen begin\r\n sbSideData.width := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_SIDEDATAWIDTH_' + getcurrentformname]);\r\n if sbSideData.width <= 0 then sbSideData.width := 100;\r\n end; }\r\n\r\nif not FormIsActive_p then exit;\r\n\r\nResizeFormBlocks(SubForm_DIV, egv_formcolumns);\r\nResizeFormBlocks(sbSideData, 1, false);\r\n\r\n//OrganizeBlocks(sbSideData, 1, false);\r\n\r\nStretchAllMemos(SUBFORM_DIV);\r\nStretchAllMemos(sbSideData);\r\n\r\n\r\nForm_AdjustGrids(self);\r\n\r\nResizeButtons(pnlFormButtons);\r\nResizeButtons(pnlReportButtons);\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.WebFormShow(Sender: TObject);\r\nbegin\r\n\r\ntry\r\nFormIsActive_p := true;\r\nEGV_CURRENTFORMNAME := dm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform()-1)];\r\ncase (getsubform() - 1) of\r\n 1: egv_subform.Name := EGV_CURRENTFORMNAME;\r\n 2: egv_subform2.Name := EGV_CURRENTFORMNAME;\r\n 3: egv_subform3.Name := EGV_CURRENTFORMNAME;\r\n 4: egv_subform4.Name := EGV_CURRENTFORMNAME;\r\n 5: egv_subform5.Name := EGV_CURRENTFORMNAME;\r\n 6: egv_subform6.Name := EGV_CURRENTFORMNAME;\r\n 7: egv_subform7.Name := EGV_CURRENTFORMNAME;\r\n 8: egv_subform8.Name := EGV_CURRENTFORMNAME;\r\n 9: egv_subform9.Name := EGV_CURRENTFORMNAME;\r\nend;\r\nSaveKeyVariables;\r\nif dm.EGV_LOCALSTORAGE.Values['EGV_SIDEDATAWIDTH_' + getcurrentformname] <> ''\r\nthen begin\r\n //showmessage(dm.EGV_LOCALSTORAGE.Values['EGV_SIDEDATAWIDTH_' + getcurrentformname]);\r\n pnlSideData.width := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_SIDEDATAWIDTH_' + getcurrentformname]);\r\n if pnlSideData.width <= 0 then pnlSideData.width := 100;\r\n\r\n // showmessage(inttostr(pnlSideData.width));\r\n end;\r\n\r\n// showmessage(getcurrentformname);\r\n// designer options. if no form-specific then use global\r\nif dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS_' + getcurrentformname]= ''\r\nthen EGV_FORMCOLUMNS := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS'])\r\nelse EGV_FORMCOLUMNS := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS_' + getcurrentformname]);\r\n\r\nif dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH_' + getcurrentformname]= ''\r\nthen EGV_BLOCKDEFAULTWIDTH := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH'])\r\nelse EGV_BLOCKDEFAULTWIDTH := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH_' + getcurrentformname]);\r\n\r\nif dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNSAUTO_' + getcurrentformname]= ''\r\nthen EGV_FORMCOLUMNSAUTO := (dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNSAUTO'] = '1')\r\nelse EGV_FORMCOLUMNSAUTO := (dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNSAUTO_' + getcurrentformname] = '1');\r\n\r\nif dm.EGV_LOCALSTORAGE.Values['EGV_NOHORIZONTALLINEUP_' + getcurrentformname]= ''\r\nthen EGV_NOHORIZONTALLINEUP := (dm.EGV_LOCALSTORAGE.Values['EGV_NOHORIZONTALLINEUP'] = '1')\r\nelse EGV_NOHORIZONTALLINEUP := (dm.EGV_LOCALSTORAGE.Values['EGV_NOHORIZONTALLINEUP_' + getcurrentformname] = '1');\r\n\r\n//showmessage(EGV_CURRENTFORMNAME);\r\nif dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON1_ICON']<> ''\r\nthen btnCustom1.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON1_ICON']\r\nelse btnCustom1.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON1_CAPTION'];\r\nbtnCustom1.Hint := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON1_CAPTION'];\r\nbtnCustom1.ShowHint := false;\r\n\r\nif dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON2_ICON']<> ''\r\nthen btnCustom2.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON2_ICON']\r\nelse btnCustom2.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON2_CAPTION'];\r\nbtnCustom2.Hint := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON2_CAPTION'];\r\nbtnCustom2.ShowHint := false;\r\n\r\nif dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON3_ICON']<> ''\r\nthen btnCustom3.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON3_ICON']\r\nelse btnCustom3.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON3_CAPTION'];\r\nbtnCustom3.Hint := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON3_CAPTION'];\r\nbtnCustom3.ShowHint := false;\r\n\r\nif dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON4_ICON']<> ''\r\nthen btnCustom4.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON4_ICON']\r\nelse btnCustom4.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON4_CAPTION'];\r\nbtnCustom4.Hint := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON4_CAPTION'];\r\nbtnCustom4.ShowHint := false;\r\n\r\nif dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON5_ICON']<> ''\r\nthen btnCustom5.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON5_ICON']\r\nelse btnCustom5.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON5_CAPTION'];\r\nbtnCustom5.Hint := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON5_CAPTION'];\r\nbtnCustom5.ShowHint := false;\r\n\r\nif dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON6_ICON']<> ''\r\nthen btnCustom6.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON6_ICON']\r\nelse btnCustom6.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON6_CAPTION'];\r\nbtnCustom6.Hint := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON6_CAPTION'];\r\nbtnCustom6.ShowHint := false;\r\n\r\nif dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON7_ICON']<> ''\r\nthen btnCustom7.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON7_ICON']\r\nelse btnCustom7.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON7_CAPTION'];\r\nbtnCustom7.Hint := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON7_CAPTION'];\r\nbtnCustom7.ShowHint := false;\r\n\r\nif dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON8_ICON']<> ''\r\nthen btnCustom8.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON8_ICON']\r\nelse btnCustom8.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON8_CAPTION'];\r\nbtnCustom8.Hint := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON8_CAPTION'];\r\nbtnCustom8.ShowHint := false;\r\n\r\nif dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON9_ICON']<> ''\r\nthen btnCustom9.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON9_ICON']\r\nelse btnCustom9.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON9_CAPTION'];\r\nbtnCustom9.Hint := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON9_CAPTION'];\r\nbtnCustom9.ShowHint := false;\r\n\r\n{\r\nbtnCustom1.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON1_CAPTION'];\r\nbtnCustom1.MaterialGlyph := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON1_ICON'];\r\nbtnCustom1.Hint := btnCustom1.Caption;\r\nbtnCustom1.ShowHint := false;\r\nbtnCustom2.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON2_CAPTION'];\r\nbtnCustom2.MaterialGlyph := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON2_ICON'];\r\nbtnCustom2.Hint := btnCustom2.Caption;\r\nbtnCustom2.ShowHint := false;\r\nbtnCustom3.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON3_CAPTION'];\r\nbtnCustom3.MaterialGlyph := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON3_ICON'];\r\nbtnCustom3.Hint := btnCustom3.Caption;\r\nbtnCustom3.ShowHint := false;\r\nbtnCustom4.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON4_CAPTION'];\r\nbtnCustom4.MaterialGlyph := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON4_ICON'];\r\nbtnCustom4.Hint := btnCustom4.Caption;\r\nbtnCustom4.ShowHint := false;\r\nbtnCustom5.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON5_CAPTION'];\r\nbtnCustom5.MaterialGlyph := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON5_ICON'];\r\nbtnCustom5.Hint := btnCustom5.Caption;\r\nbtnCustom5.ShowHint := false;\r\nbtnCustom6.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON6_CAPTION'];\r\nbtnCustom6.MaterialGlyph := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON6_ICON'];\r\nbtnCustom6.Hint := btnCustom6.Caption;\r\nbtnCustom6.ShowHint := false;\r\nbtnCustom7.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON7_CAPTION'];\r\nbtnCustom7.MaterialGlyph := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON7_ICON'];\r\nbtnCustom7.Hint := btnCustom7.Caption;\r\nbtnCustom7.ShowHint := false;\r\nbtnCustom8.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON8_CAPTION'];\r\nbtnCustom8.MaterialGlyph := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON8_ICON'];\r\nbtnCustom8.Hint := btnCustom8.Caption;\r\nbtnCustom8.ShowHint := false;\r\nbtnCustom9.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON9_CAPTION'];\r\nbtnCustom9.MaterialGlyph := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON9_ICON'];\r\nbtnCustom9.Hint := btnCustom9.Caption;\r\nbtnCustom9.ShowHint := false; }\r\n{\r\nbtnCustom1.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON1_CAPTION'];\r\nbtnCustom2.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON2_CAPTION'];\r\nbtnCustom3.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON3_CAPTION'];\r\nbtnCustom4.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON4_CAPTION'];\r\nbtnCustom5.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON5_CAPTION'];\r\nbtnCustom6.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON6_CAPTION'];\r\nbtnCustom7.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON7_CAPTION'];\r\nbtnCustom8.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON8_CAPTION'];\r\nbtnCustom9.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON9_CAPTION']; }\r\n\r\nbtnCustom1.width := 90;\r\nbtnCustom2.width := 90;\r\nbtnCustom3.width := 90;\r\nbtnCustom4.width := 90;\r\nbtnCustom5.width := 90;\r\nbtnCustom6.width := 90;\r\nbtnCustom7.width := 90;\r\nbtnCustom8.width := 90;\r\nbtnCustom9.width := 90;\r\n\r\n//showmessage(uppercase(EGV_CURRENTFORMNAME) + '_FORM_CAPTION');\r\n//showmessage(dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_FORM_CAPTION']);\r\npnlFormCaption.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_FORM_CAPTION'];\r\nfrmmain.lblLocation.caption := frmmain.lblLocation.caption + ' > ' + pnlFormCaption.Caption + ' ';\r\n\r\nbtnCustom1.visible := ( (btnCustom1.caption <> 'undefined') and ((btnCustom1.caption <> '') and (btnCustom1.hint <> '')) );\r\nbtnCustom2.visible := ( (btnCustom2.caption <> 'undefined') and ((btnCustom2.caption <> '') and (btnCustom2.hint <> '')) );\r\nbtnCustom3.visible := ( (btnCustom3.caption <> 'undefined') and ((btnCustom3.caption <> '') and (btnCustom3.hint <> '')) );\r\nbtnCustom4.visible := ( (btnCustom4.caption <> 'undefined') and ((btnCustom4.caption <> '') and (btnCustom4.hint <> '')) );\r\nbtnCustom5.visible := ( (btnCustom5.caption <> 'undefined') and ((btnCustom5.caption <> '') and (btnCustom5.hint <> '')) );\r\nbtnCustom6.visible := ( (btnCustom5.caption <> 'undefined') and ((btnCustom6.caption <> '') and (btnCustom6.hint <> '')) );\r\nbtnCustom7.visible := ( (btnCustom5.caption <> 'undefined') and ((btnCustom7.caption <> '') and (btnCustom7.hint <> '')) );\r\nbtnCustom8.visible := ( (btnCustom5.caption <> 'undefined') and ((btnCustom8.caption <> '') and (btnCustom8.hint <> '')) );\r\nbtnCustom9.visible := ( (btnCustom5.caption <> 'undefined') and ((btnCustom9.caption <> '') and (btnCustom9.hint <> '')) );\r\n\r\nloadformdesigninfo(getcurrentformname);\r\n\r\n\r\n// 12345 ResizeFormBlocks(self.SubForm_DIV, egv_formcolumns);\r\n//showmessage('loadformdesigninfo');\r\n\r\nif self.Tag = 0\r\nthen begin\r\n sbSideData.Tag := 0;\r\n GetPostFormDesignData(getcurrentform.name, 'V', 0, sbSideData,1);\r\n GetPostFormDesignData(getcurrentform.name, 'P', 0, sbSideData,1);\r\n GetPostFormDesignData(getcurrentform.name, 'T', 0, sbSideData,1, true);\r\n\r\n frmmain.tmGenTimer.tag := 2;\r\n frmmain.tmGenTimer.Interval := 1000;\r\n frmmain.tmGenTimer.Enabled := true;\r\n\r\n // DBF_GetPostBlocks(self.sbSideData, 0); //get block data\r\n // DBF_GetPostBlocks(self.Subform_div, 0); //get block data\r\n end\r\nelse btnAddClick(btnAdd);\r\n\r\nbtnSaveAsDefaults.Visible := (frmmain.btnSwitch_Design.State = SSON);\r\nself.Hint := EGV_BLOCKUNIQUEID;\r\npnlFormButtons.Align := alClient;\r\n\r\nResizeButtons(pnlFormButtons);\r\nResizeButtons(pnlReportButtons);\r\nfinally\r\n if frmmain.wmWaitMessage.showing and (frmmain.wmWaitMessage.Tag = 0) then frmmain.wmWaitMessage.hide;\r\nend;\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.WebHTMLContainer2Click(Sender: TObject);\r\nbegin\r\nblockgetmemo(EGV_CURRENTBLOCK).text := GetLocationByXY(Mouse_x, Mouse_y);\r\nBlockDataDistribute(EGV_CURRENTBLOCK);\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.WebLabel15MouseMove(Sender: TObject;\r\n Shift: TShiftState; X, Y: Integer);\r\nbegin\r\nif frmmain.clQuickPicklist.visible then frmmain.btnCloseQuickPickListClick(nil);\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.WebPanel14MouseMove(Sender: TObject;\r\n Shift: TShiftState; X, Y: Integer);\r\nbegin\r\nBlock_MouseMove(((Sender as TControl).parent as TPanel),[],0,0, 'btnAddRecord,btnDeleteRecord,btnDesignGrid,btnBlockGridPost,cbPickListType,edtPickListCustomForm,btnDBField_Settings,btnQuickPicklistSettings');\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.WebPanel32MouseMove(Sender: TObject;\r\n Shift: TShiftState; X, Y: Integer);\r\nbegin\r\nBlock_MouseMove(((Sender as TControl).parent as TPanel),[],0,0);\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.WebPanel70MouseMove(Sender: TObject;\r\n Shift: TShiftState; X, Y: Integer);\r\nbegin\r\nBlock_MouseMove(((Sender as TControl).parent as TPanel),[],0,0);\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.spSideDataSplitterMoved(Sender: TObject);\r\nbegin\r\n//showmessage(getcurrentformname);\r\ndm.EGV_LOCALSTORAGE.Values['EGV_SIDEDATAWIDTH_' + getcurrentformname] := inttostr(pnlSideData.Width);\r\nWebFormResize(getcurrentform);\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.M1Enter(Sender: TObject);\r\nbegin\r\nELV_SPEECHRECEIVER := (sender as TMemo);\r\nELV_SPEECHTARGET := (sender as TMemo);\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.M1Exit(Sender: TObject);\r\nbegin\r\nELV_SPEECHRECEIVER := nil;\r\nELV_SPEECHTARGET := nil;\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.M1MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\nbegin\r\n\r\nEGV_CURRENTBLOCK := ((Sender as TControl).parent as TPanel);\r\ngetblockuniqueid(EGV_CURRENTBLOCK);\r\n\r\nif (sender is TMemo) and (EGV_CURRENTBLOCK <> nil)\r\nthen begin\r\n (sender as TMemo).hint := EGV_CURRENTBLOCK.Name;\r\n (sender as TMemo).showhint := (frmmain.btnSwitch_Design.State = ssON);\r\n end;\r\n\r\nMouse_X := X;\r\nMouse_Y := Y;\r\n\r\n// showmessage(EGV_BLOCKUNIQUEID);\r\n\r\nif (sender is THTMLContainer) and ((sender as THTMLContainer).tag = 0)\r\nthen begin\r\n (sender as THTMLContainer).tag := 1;\r\n GetBlockUniqueID(((sender as THTMLContainer).Parent as TPanel));\r\n EGV_SECTIONNAME := dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SECTION'];\r\n if dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SOURCE'] = ''\r\n then dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SOURCE'] := '0';\r\n dm.xdsQPKL_DynamicData.Close;\r\n // showmessage('1');\r\n // QPKL_LoadFromDataset(dm.xdsQPKL_DynamicData, 'Original.ITEM');\r\n end;\r\n\r\nfrmmain.rgBlockRadioGroup.tag := 0;\r\n\r\n if (sender is TMemo)\r\n then begin\r\n if frmmain.clQuickPicklist.Visible and ((sender as TMemo).Name <> frmmain.clQuickPicklist.Hint)\r\n then frmmain.btnCloseQuickPicklistClick(nil);\r\n end\r\n else if frmmain.clQuickPicklist.Visible then frmmain.btnCloseQuickPicklistClick(nil);\r\n\r\nBlock_MouseMove(((Sender as TControl).parent as TPanel),[],0,0);\r\n//BlockShowQPickList(Sender);\r\n//Show date/time picker if data type is date/time\r\nif uppercase(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE']) = '0'\r\nthen BlockInsertFromDatePicker(nil)\r\nelse if uppercase(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE']) = '1'\r\n then BlockInsertFromTimePicker(nil)\r\n else if uppercase(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE']) = '2'\r\n then begin\r\n BlockInsertRadioGroup(Sender);\r\n end\r\n else if uppercase(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE']) = '3'\r\n then begin\r\n // showmessage('spin edit');\r\n BlockInsertSpinEdit(Sender);\r\n end;\r\n\r\nBlockShowEditMask(Sender);\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.M21Change(Sender: TObject);\r\nbegin\r\nBlockApplyDependencies(((Sender as TMemo).Parent as TPanel), (Sender as TMemo).text);\r\nStretchMemo(Sender as TMemo);\r\n(Sender as TMemo).Tag := 1; // updated\r\n//showmessage((sender as twebmemo).name);\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.M21DragOver(Sender, Source: TObject; X,\r\n Y: Integer; State: TDragState; var Accept: Boolean);\r\nbegin\r\n Accept := false;\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.M21MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\nbegin\r\n//if frmmain.cldQPKLCalendar.Visible then exit;\r\n\r\nGetBlockUniqueID(((Sender as TMemo).Parent as Tpanel));\r\nend;\r\n\r\nprocedure TfrmEditForm_Base._Block_MouseLeave(Sender: TObject);\r\nbegin\r\n//if frmmain.cldQPKLCalendar.Visible then exit;\r\nBlock_MouseLeave(Sender);\r\nend;\r\n\r\nprocedure TfrmEditForm_Base._Block_MouseMove(Sender: TObject; Shift: TShiftState;\r\n X, Y: Integer);\r\nbegin\r\n//if frmmain.cldQPKLCalendar.Visible then exit;\r\n//showmessage((sender as twebpanel).name);\r\nBlock_MouseMove(Sender, Shift, X, Y);\r\nend;\r\n\r\nprocedure TfrmEditForm_Base._GridBlock_MouseMove(Sender: TObject; Shift: TShiftState;\r\n X, Y: Integer);\r\nbegin\r\n//if frmmain.cldQPKLCalendar.Visible then exit;\r\nBlock_MouseMove(Sender, Shift, X, Y,'btnAddRecord,btnDeleteRecord,btnDesignGrid,btnBlockGridPost,cbPickListType,edtPickListCustomForm,btnDBField_Settings,btnQuickPicklistSettings');\r\nend;\r\n\r\nprocedure TfrmEditForm_Base._BlockTitle_MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);\r\nbegin\r\n//showmessage('1');\r\n//if frmmain.cldQPKLCalendar.Visible then exit;\r\n//frmmain.WebMemo10.Text := egv_currentblock.Name;\r\nBlock_MouseMove((((Sender as TControl).parent as TPanel).Parent as TPanel),[],0,0);\r\nend;\r\n\r\nprocedure TfrmEditForm_Base._GridBlockTitle_MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);\r\nbegin\r\n//if frmmain.cldQPKLCalendar.Visible then exit;\r\nBlock_MouseMove((((Sender as TControl).parent as TPanel).Parent as TPanel),[],0,0,\r\n 'btnAddRecord,btnDeleteRecord,btnDesignGrid,btnBlockGridPost,cbPickListType,edtPickListCustomForm,btnDBField_Settings,btnQuickPicklistSettings');\r\nend;\r\n\r\nprocedure TfrmEditForm_Base._BlockTitleEdit(Sender: TObject);\r\nbegin\r\nBlockTitleEdit(Sender);\r\nend;\r\n\r\nprocedure TfrmEditForm_Base._BlockDragOverTitle(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);\r\nbegin\r\nBlockDragOverTitle(Sender, Source, X, Y, State, Accept);\r\nend;\r\n\r\nprocedure TfrmEditForm_Base._BlockDragDrop(Sender, Source: TObject; X, Y: Integer);\r\nbegin\r\n//showmessage('1');\r\nBlockDragDrop(Sender, Source, X, Y);\r\nend;\r\n\r\nprocedure TfrmEditForm_Base._BlockShowQPickList(Sender: Tobject);\r\nbegin\r\ngetblockuniqueid(((sender as TMemo).Parent as Tpanel));\r\nQPKLClearCache;\r\nBlockShowQPickList(Sender);\r\n//BlockShowEditMask(Sender);\r\nend;\r\n\r\nprocedure TfrmEditForm_Base._BlockCallPickForm(Sender: Tobject);\r\nvar containername_p: string;\r\nbegin\r\n//showmessage(egv_currentblock.name);\r\nBlockCallPickForm(Sender);\r\nend;\r\n\r\nprocedure TfrmEditForm_Base._SideDataBlockDragDrop(Sender, Source: TObject; X, Y: Integer);\r\nbegin\r\nBlockDragDrop(Sender, Source, X, Y, getcurrentform, sbSideData, 1);\r\nend;\r\n\r\nprocedure TfrmEditForm_Base.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n WebLabel15 := TLabel.Create(Self);\r\n WebLabel13 := TLabel.Create(Self);\r\n WebLabel2 := TLabel.Create(Self);\r\n pnlBottom := TPanel.Create(Self);\r\n tbReport := TTMSFNCSwitch.Create(Self);\r\n pnlFormButtons := TPanel.Create(Self);\r\n btnCustom1 := TBitBtn.Create(Self);\r\n btnCustom2 := TBitBtn.Create(Self);\r\n btnCustom3 := TBitBtn.Create(Self);\r\n btnCustom4 := TBitBtn.Create(Self);\r\n btnCustom5 := TBitBtn.Create(Self);\r\n btnPost := TBitBtn.Create(Self);\r\n btnAdd := TBitBtn.Create(Self);\r\n btnRefresh := TBitBtn.Create(Self);\r\n btnClose := TBitBtn.Create(Self);\r\n btnUseDefaults := TBitBtn.Create(Self);\r\n btnSaveAsDefaults := TBitBtn.Create(Self);\r\n btnCustom6 := TBitBtn.Create(Self);\r\n btnCustom7 := TBitBtn.Create(Self);\r\n btnCustom8 := TBitBtn.Create(Self);\r\n btnCustom9 := TBitBtn.Create(Self);\r\n WebMemo8 := TMemo.Create(Self);\r\n btnClearBlockCustomPositioning := TBitBtn.Create(Self);\r\n btnClearBlockCustomSizes := TBitBtn.Create(Self);\r\n btnFixBlockPositions := TBitBtn.Create(Self);\r\n pnlReportButtons := TPanel.Create(Self);\r\n btnRefresh_RPT := TBitBtn.Create(Self);\r\n btnClose_RPT := TBitBtn.Create(Self);\r\n spSideDataSplitter := TSplitter.Create(Self);\r\n pnlFormCaption := TPanel.Create(Self);\r\n pnlSideData := TPanel.Create(Self);\r\n sbSideData := TScrollBox.Create(Self);\r\n sb6 := TPanel.Create(Self);\r\n WebPanel9 := TPanel.Create(Self);\r\n WebLabel26 := TLabel.Create(Self);\r\n WebSpeedButton20 := TSpeedButton.Create(Self);\r\n SM6 := TMemo.Create(Self);\r\n WebHTMLContainer36 := THTMLContainer.Create(Self);\r\n sb5 := TPanel.Create(Self);\r\n WebPanel12 := TPanel.Create(Self);\r\n WebLabel27 := TLabel.Create(Self);\r\n WebSpeedButton21 := TSpeedButton.Create(Self);\r\n SM5 := TMemo.Create(Self);\r\n WebHTMLContainer35 := THTMLContainer.Create(Self);\r\n sb4 := TPanel.Create(Self);\r\n WebPanel22 := TPanel.Create(Self);\r\n WebLabel28 := TLabel.Create(Self);\r\n WebSpeedButton22 := TSpeedButton.Create(Self);\r\n SM4 := TMemo.Create(Self);\r\n WebHTMLContainer34 := THTMLContainer.Create(Self);\r\n sb3 := TPanel.Create(Self);\r\n WebPanel25 := TPanel.Create(Self);\r\n WebLabel29 := TLabel.Create(Self);\r\n WebSpeedButton23 := TSpeedButton.Create(Self);\r\n SM3 := TMemo.Create(Self);\r\n WebHTMLContainer33 := THTMLContainer.Create(Self);\r\n sb2 := TPanel.Create(Self);\r\n WebPanel30 := TPanel.Create(Self);\r\n WebLabel30 := TLabel.Create(Self);\r\n WebSpeedButton24 := TSpeedButton.Create(Self);\r\n SM2 := TMemo.Create(Self);\r\n WebHTMLContainer32 := THTMLContainer.Create(Self);\r\n sb1 := TPanel.Create(Self);\r\n WebPanel32 := TPanel.Create(Self);\r\n WebLabel31 := TLabel.Create(Self);\r\n WebSpeedButton25 := TSpeedButton.Create(Self);\r\n SM1 := TMemo.Create(Self);\r\n WebHTMLContainer31 := THTMLContainer.Create(Self);\r\n sb7 := TPanel.Create(Self);\r\n WebPanel34 := TPanel.Create(Self);\r\n WebLabel32 := TLabel.Create(Self);\r\n WebSpeedButton26 := TSpeedButton.Create(Self);\r\n SM7 := TMemo.Create(Self);\r\n WebHTMLContainer37 := THTMLContainer.Create(Self);\r\n sb101 := TPanel.Create(Self);\r\n WebPanel10 := TPanel.Create(Self);\r\n WebLabel1 := TLabel.Create(Self);\r\n WebSpeedButton67 := TSpeedButton.Create(Self);\r\n SG1 := TDBGrid.Create(Self);\r\n sb102 := TPanel.Create(Self);\r\n WebPanel23 := TPanel.Create(Self);\r\n WebLabel73 := TLabel.Create(Self);\r\n WebSpeedButton68 := TSpeedButton.Create(Self);\r\n SG2 := TDBGrid.Create(Self);\r\n sb103 := TPanel.Create(Self);\r\n WebPanel35 := TPanel.Create(Self);\r\n WebLabel74 := TLabel.Create(Self);\r\n WebSpeedButton69 := TSpeedButton.Create(Self);\r\n SG3 := TDBGrid.Create(Self);\r\n pnlSUBFORM_DIV := TPanel.Create(Self);\r\n pnlDataBlocks := TPanel.Create(Self);\r\n SubForm_DIV := TScrollBox.Create(Self);\r\n b26 := TPanel.Create(Self);\r\n WebPanel13 := TPanel.Create(Self);\r\n WebLabel8 := TLabel.Create(Self);\r\n WebSpeedButton6 := TSpeedButton.Create(Self);\r\n M26 := TMemo.Create(Self);\r\n WebHTMLContainer27 := THTMLContainer.Create(Self);\r\n B101 := TPanel.Create(Self);\r\n WebPanel14 := TPanel.Create(Self);\r\n WebLabel18 := TLabel.Create(Self);\r\n WebSpeedButton11 := TSpeedButton.Create(Self);\r\n G1 := TDBGrid.Create(Self);\r\n B25 := TPanel.Create(Self);\r\n WebPanel11 := TPanel.Create(Self);\r\n WebLabel7 := TLabel.Create(Self);\r\n WebSpeedButton5 := TSpeedButton.Create(Self);\r\n M25 := TMemo.Create(Self);\r\n WebHTMLContainer26 := THTMLContainer.Create(Self);\r\n B20 := TPanel.Create(Self);\r\n WebPanel95 := TPanel.Create(Self);\r\n WebLabel47 := TLabel.Create(Self);\r\n WebSpeedButton44 := TSpeedButton.Create(Self);\r\n M20 := TMemo.Create(Self);\r\n WebHTMLContainer17 := THTMLContainer.Create(Self);\r\n B21 := TPanel.Create(Self);\r\n WebPanel2 := TPanel.Create(Self);\r\n WebLabel3 := TLabel.Create(Self);\r\n WebSpeedButton1 := TSpeedButton.Create(Self);\r\n M21 := TMemo.Create(Self);\r\n WebHTMLContainer22 := THTMLContainer.Create(Self);\r\n B22 := TPanel.Create(Self);\r\n WebPanel4 := TPanel.Create(Self);\r\n WebLabel4 := TLabel.Create(Self);\r\n WebSpeedButton2 := TSpeedButton.Create(Self);\r\n M22 := TMemo.Create(Self);\r\n WebHTMLContainer23 := THTMLContainer.Create(Self);\r\n b23 := TPanel.Create(Self);\r\n WebPanel6 := TPanel.Create(Self);\r\n WebLabel5 := TLabel.Create(Self);\r\n WebSpeedButton3 := TSpeedButton.Create(Self);\r\n M23 := TMemo.Create(Self);\r\n WebHTMLContainer24 := THTMLContainer.Create(Self);\r\n B18 := TPanel.Create(Self);\r\n WebPanel111 := TPanel.Create(Self);\r\n WebLabel55 := TLabel.Create(Self);\r\n WebSpeedButton52 := TSpeedButton.Create(Self);\r\n M18 := TMemo.Create(Self);\r\n WebHTMLContainer19 := THTMLContainer.Create(Self);\r\n B19 := TPanel.Create(Self);\r\n WebPanel93 := TPanel.Create(Self);\r\n WebLabel46 := TLabel.Create(Self);\r\n WebSpeedButton43 := TSpeedButton.Create(Self);\r\n M19 := TMemo.Create(Self);\r\n WebHTMLContainer18 := THTMLContainer.Create(Self);\r\n B24 := TPanel.Create(Self);\r\n WebPanel8 := TPanel.Create(Self);\r\n WebLabel6 := TLabel.Create(Self);\r\n WebSpeedButton4 := TSpeedButton.Create(Self);\r\n M24 := TMemo.Create(Self);\r\n WebHTMLContainer25 := THTMLContainer.Create(Self);\r\n B29 := TPanel.Create(Self);\r\n WebPanel19 := TPanel.Create(Self);\r\n WebLabel11 := TLabel.Create(Self);\r\n WebSpeedButton9 := TSpeedButton.Create(Self);\r\n M29 := TMemo.Create(Self);\r\n WebHTMLContainer30 := THTMLContainer.Create(Self);\r\n B28 := TPanel.Create(Self);\r\n WebPanel17 := TPanel.Create(Self);\r\n WebLabel10 := TLabel.Create(Self);\r\n WebSpeedButton8 := TSpeedButton.Create(Self);\r\n M28 := TMemo.Create(Self);\r\n WebHTMLContainer29 := THTMLContainer.Create(Self);\r\n B27 := TPanel.Create(Self);\r\n WebPanel15 := TPanel.Create(Self);\r\n WebLabel9 := TLabel.Create(Self);\r\n WebSpeedButton7 := TSpeedButton.Create(Self);\r\n M27 := TMemo.Create(Self);\r\n WebHTMLContainer28 := THTMLContainer.Create(Self);\r\n B16 := TPanel.Create(Self);\r\n WebPanel107 := TPanel.Create(Self);\r\n WebLabel53 := TLabel.Create(Self);\r\n WebSpeedButton50 := TSpeedButton.Create(Self);\r\n M16 := TMemo.Create(Self);\r\n WebHTMLContainer21 := THTMLContainer.Create(Self);\r\n B17 := TPanel.Create(Self);\r\n WebPanel109 := TPanel.Create(Self);\r\n WebLabel54 := TLabel.Create(Self);\r\n WebSpeedButton51 := TSpeedButton.Create(Self);\r\n M17 := TMemo.Create(Self);\r\n WebHTMLContainer20 := THTMLContainer.Create(Self);\r\n B15 := TPanel.Create(Self);\r\n WebPanel97 := TPanel.Create(Self);\r\n WebLabel48 := TLabel.Create(Self);\r\n WebSpeedButton45 := TSpeedButton.Create(Self);\r\n M15 := TMemo.Create(Self);\r\n WebHTMLContainer16 := THTMLContainer.Create(Self);\r\n B14 := TPanel.Create(Self);\r\n WebPanel99 := TPanel.Create(Self);\r\n WebLabel49 := TLabel.Create(Self);\r\n WebSpeedButton46 := TSpeedButton.Create(Self);\r\n M14 := TMemo.Create(Self);\r\n WebHTMLContainer15 := THTMLContainer.Create(Self);\r\n B13 := TPanel.Create(Self);\r\n WebPanel101 := TPanel.Create(Self);\r\n WebLabel50 := TLabel.Create(Self);\r\n WebSpeedButton47 := TSpeedButton.Create(Self);\r\n M13 := TMemo.Create(Self);\r\n WebHTMLContainer14 := THTMLContainer.Create(Self);\r\n B12 := TPanel.Create(Self);\r\n WebPanel103 := TPanel.Create(Self);\r\n WebLabel51 := TLabel.Create(Self);\r\n WebSpeedButton48 := TSpeedButton.Create(Self);\r\n M12 := TMemo.Create(Self);\r\n WebHTMLContainer13 := THTMLContainer.Create(Self);\r\n B11 := TPanel.Create(Self);\r\n WebPanel105 := TPanel.Create(Self);\r\n WebLabel52 := TLabel.Create(Self);\r\n WebSpeedButton49 := TSpeedButton.Create(Self);\r\n M11 := TMemo.Create(Self);\r\n WebHTMLContainer12 := THTMLContainer.Create(Self);\r\n B6 := TPanel.Create(Self);\r\n WebPanel80 := TPanel.Create(Self);\r\n WebLabel41 := TLabel.Create(Self);\r\n WebSpeedButton38 := TSpeedButton.Create(Self);\r\n M6 := TMemo.Create(Self);\r\n WebHTMLContainer11 := THTMLContainer.Create(Self);\r\n B7 := TPanel.Create(Self);\r\n WebPanel82 := TPanel.Create(Self);\r\n WebLabel42 := TLabel.Create(Self);\r\n WebSpeedButton39 := TSpeedButton.Create(Self);\r\n M7 := TMemo.Create(Self);\r\n WebHTMLContainer10 := THTMLContainer.Create(Self);\r\n B8 := TPanel.Create(Self);\r\n WebPanel86 := TPanel.Create(Self);\r\n WebLabel43 := TLabel.Create(Self);\r\n WebSpeedButton40 := TSpeedButton.Create(Self);\r\n M8 := TMemo.Create(Self);\r\n WebHTMLContainer9 := THTMLContainer.Create(Self);\r\n B9 := TPanel.Create(Self);\r\n WebPanel88 := TPanel.Create(Self);\r\n WebLabel44 := TLabel.Create(Self);\r\n WebSpeedButton41 := TSpeedButton.Create(Self);\r\n M9 := TMemo.Create(Self);\r\n WebHTMLContainer8 := THTMLContainer.Create(Self);\r\n B10 := TPanel.Create(Self);\r\n WebPanel91 := TPanel.Create(Self);\r\n WebLabel45 := TLabel.Create(Self);\r\n WebSpeedButton42 := TSpeedButton.Create(Self);\r\n M10 := TMemo.Create(Self);\r\n WebHTMLContainer7 := THTMLContainer.Create(Self);\r\n B5 := TPanel.Create(Self);\r\n WebPanel74 := TPanel.Create(Self);\r\n WebLabel38 := TLabel.Create(Self);\r\n WebSpeedButton35 := TSpeedButton.Create(Self);\r\n M5 := TMemo.Create(Self);\r\n WebHTMLContainer6 := THTMLContainer.Create(Self);\r\n B4 := TPanel.Create(Self);\r\n WebPanel78 := TPanel.Create(Self);\r\n WebLabel40 := TLabel.Create(Self);\r\n WebSpeedButton37 := TSpeedButton.Create(Self);\r\n M4 := TMemo.Create(Self);\r\n WebHTMLContainer5 := THTMLContainer.Create(Self);\r\n B3 := TPanel.Create(Self);\r\n WebPanel72 := TPanel.Create(Self);\r\n WebLabel37 := TLabel.Create(Self);\r\n WebSpeedButton34 := TSpeedButton.Create(Self);\r\n M3 := TMemo.Create(Self);\r\n WebHTMLContainer4 := THTMLContainer.Create(Self);\r\n B2 := TPanel.Create(Self);\r\n WebPanel76 := TPanel.Create(Self);\r\n WebLabel39 := TLabel.Create(Self);\r\n WebSpeedButton36 := TSpeedButton.Create(Self);\r\n M2 := TMemo.Create(Self);\r\n WebHTMLContainer3 := THTMLContainer.Create(Self);\r\n B1 := TPanel.Create(Self);\r\n WebPanel70 := TPanel.Create(Self);\r\n WebLabel36 := TLabel.Create(Self);\r\n WebSpeedButton33 := TSpeedButton.Create(Self);\r\n M1 := TMemo.Create(Self);\r\n WebHTMLContainer2 := THTMLContainer.Create(Self);\r\n B30 := TPanel.Create(Self);\r\n WebPanel21 := TPanel.Create(Self);\r\n WebLabel12 := TLabel.Create(Self);\r\n WebSpeedButton10 := TSpeedButton.Create(Self);\r\n M30 := TMemo.Create(Self);\r\n WebHTMLContainer1 := THTMLContainer.Create(Self);\r\n B100 := TPanel.Create(Self);\r\n WebPanel3 := TPanel.Create(Self);\r\n WebLabel14 := TLabel.Create(Self);\r\n WebSpeedButton19 := TSpeedButton.Create(Self);\r\n G9 := TDBGrid.Create(Self);\r\n B102 := TPanel.Create(Self);\r\n WebPanel24 := TPanel.Create(Self);\r\n WebLabel21 := TLabel.Create(Self);\r\n WebSpeedButton12 := TSpeedButton.Create(Self);\r\n G2 := TDBGrid.Create(Self);\r\n B105 := TPanel.Create(Self);\r\n WebPanel26 := TPanel.Create(Self);\r\n WebLabel22 := TLabel.Create(Self);\r\n WebSpeedButton15 := TSpeedButton.Create(Self);\r\n G5 := TDBGrid.Create(Self);\r\n B104 := TPanel.Create(Self);\r\n WebPanel18 := TPanel.Create(Self);\r\n WebLabel19 := TLabel.Create(Self);\r\n WebSpeedButton14 := TSpeedButton.Create(Self);\r\n G4 := TDBGrid.Create(Self);\r\n B103 := TPanel.Create(Self);\r\n WebPanel7 := TPanel.Create(Self);\r\n WebLabel17 := TLabel.Create(Self);\r\n WebSpeedButton13 := TSpeedButton.Create(Self);\r\n G3 := TDBGrid.Create(Self);\r\n B106 := TPanel.Create(Self);\r\n WebPanel20 := TPanel.Create(Self);\r\n WebLabel20 := TLabel.Create(Self);\r\n WebSpeedButton16 := TSpeedButton.Create(Self);\r\n G6 := TDBGrid.Create(Self);\r\n B107 := TPanel.Create(Self);\r\n WebPanel27 := TPanel.Create(Self);\r\n WebLabel23 := TLabel.Create(Self);\r\n WebSpeedButton17 := TSpeedButton.Create(Self);\r\n G7 := TDBGrid.Create(Self);\r\n B108 := TPanel.Create(Self);\r\n WebPanel29 := TPanel.Create(Self);\r\n WebLabel24 := TLabel.Create(Self);\r\n WebSpeedButton18 := TSpeedButton.Create(Self);\r\n G8 := TDBGrid.Create(Self);\r\n wmWaitMessage := TWaitMessage.Create(Self);\r\n viewpdf := TBrowserControl.Create(Self);\r\n B31 := TPanel.Create(Self);\r\n WebPanel5 := TPanel.Create(Self);\r\n WebLabel16 := TLabel.Create(Self);\r\n WebSpeedButton27 := TSpeedButton.Create(Self);\r\n M31 := TMemo.Create(Self);\r\n WebHTMLContainer38 := THTMLContainer.Create(Self);\r\n B32 := TPanel.Create(Self);\r\n WebPanel16 := TPanel.Create(Self);\r\n WebLabel25 := TLabel.Create(Self);\r\n WebSpeedButton28 := TSpeedButton.Create(Self);\r\n M32 := TMemo.Create(Self);\r\n WebHTMLContainer39 := THTMLContainer.Create(Self);\r\n B33 := TPanel.Create(Self);\r\n WebPanel28 := TPanel.Create(Self);\r\n WebLabel33 := TLabel.Create(Self);\r\n WebSpeedButton29 := TSpeedButton.Create(Self);\r\n M33 := TMemo.Create(Self);\r\n WebHTMLContainer40 := THTMLContainer.Create(Self);\r\n B34 := TPanel.Create(Self);\r\n WebPanel33 := TPanel.Create(Self);\r\n WebLabel34 := TLabel.Create(Self);\r\n WebSpeedButton30 := TSpeedButton.Create(Self);\r\n M34 := TMemo.Create(Self);\r\n WebHTMLContainer41 := THTMLContainer.Create(Self);\r\n B35 := TPanel.Create(Self);\r\n WebPanel36 := TPanel.Create(Self);\r\n WebLabel35 := TLabel.Create(Self);\r\n WebSpeedButton31 := TSpeedButton.Create(Self);\r\n M35 := TMemo.Create(Self);\r\n WebHTMLContainer42 := THTMLContainer.Create(Self);\r\n B36 := TPanel.Create(Self);\r\n WebPanel38 := TPanel.Create(Self);\r\n WebLabel56 := TLabel.Create(Self);\r\n WebSpeedButton32 := TSpeedButton.Create(Self);\r\n M36 := TMemo.Create(Self);\r\n WebHTMLContainer43 := THTMLContainer.Create(Self);\r\n B37 := TPanel.Create(Self);\r\n WebPanel40 := TPanel.Create(Self);\r\n WebLabel57 := TLabel.Create(Self);\r\n WebSpeedButton53 := TSpeedButton.Create(Self);\r\n M37 := TMemo.Create(Self);\r\n WebHTMLContainer44 := THTMLContainer.Create(Self);\r\n B38 := TPanel.Create(Self);\r\n WebPanel42 := TPanel.Create(Self);\r\n WebLabel58 := TLabel.Create(Self);\r\n WebSpeedButton54 := TSpeedButton.Create(Self);\r\n M38 := TMemo.Create(Self);\r\n WebHTMLContainer45 := THTMLContainer.Create(Self);\r\n B39 := TPanel.Create(Self);\r\n WebPanel44 := TPanel.Create(Self);\r\n WebLabel59 := TLabel.Create(Self);\r\n WebSpeedButton55 := TSpeedButton.Create(Self);\r\n M39 := TMemo.Create(Self);\r\n WebHTMLContainer46 := THTMLContainer.Create(Self);\r\n B40 := TPanel.Create(Self);\r\n WebPanel46 := TPanel.Create(Self);\r\n WebLabel60 := TLabel.Create(Self);\r\n WebSpeedButton56 := TSpeedButton.Create(Self);\r\n M40 := TMemo.Create(Self);\r\n WebHTMLContainer47 := THTMLContainer.Create(Self);\r\n B41 := TPanel.Create(Self);\r\n WebPanel48 := TPanel.Create(Self);\r\n WebLabel61 := TLabel.Create(Self);\r\n WebSpeedButton57 := TSpeedButton.Create(Self);\r\n M41 := TMemo.Create(Self);\r\n WebHTMLContainer48 := THTMLContainer.Create(Self);\r\n B42 := TPanel.Create(Self);\r\n WebPanel50 := TPanel.Create(Self);\r\n WebLabel62 := TLabel.Create(Self);\r\n WebSpeedButton58 := TSpeedButton.Create(Self);\r\n M42 := TMemo.Create(Self);\r\n WebHTMLContainer49 := THTMLContainer.Create(Self);\r\n B43 := TPanel.Create(Self);\r\n WebPanel52 := TPanel.Create(Self);\r\n WebLabel63 := TLabel.Create(Self);\r\n WebSpeedButton59 := TSpeedButton.Create(Self);\r\n M43 := TMemo.Create(Self);\r\n WebHTMLContainer50 := THTMLContainer.Create(Self);\r\n B44 := TPanel.Create(Self);\r\n WebPanel54 := TPanel.Create(Self);\r\n WebLabel64 := TLabel.Create(Self);\r\n WebSpeedButton60 := TSpeedButton.Create(Self);\r\n M44 := TMemo.Create(Self);\r\n WebHTMLContainer51 := THTMLContainer.Create(Self);\r\n B45 := TPanel.Create(Self);\r\n WebPanel56 := TPanel.Create(Self);\r\n WebLabel65 := TLabel.Create(Self);\r\n WebSpeedButton61 := TSpeedButton.Create(Self);\r\n M45 := TMemo.Create(Self);\r\n WebHTMLContainer52 := THTMLContainer.Create(Self);\r\n B46 := TPanel.Create(Self);\r\n WebPanel58 := TPanel.Create(Self);\r\n WebLabel66 := TLabel.Create(Self);\r\n WebSpeedButton62 := TSpeedButton.Create(Self);\r\n M46 := TMemo.Create(Self);\r\n WebHTMLContainer53 := THTMLContainer.Create(Self);\r\n B47 := TPanel.Create(Self);\r\n WebPanel60 := TPanel.Create(Self);\r\n WebLabel67 := TLabel.Create(Self);\r\n WebSpeedButton63 := TSpeedButton.Create(Self);\r\n M47 := TMemo.Create(Self);\r\n WebHTMLContainer54 := THTMLContainer.Create(Self);\r\n B48 := TPanel.Create(Self);\r\n WebPanel62 := TPanel.Create(Self);\r\n WebLabel68 := TLabel.Create(Self);\r\n WebSpeedButton64 := TSpeedButton.Create(Self);\r\n M48 := TMemo.Create(Self);\r\n WebHTMLContainer55 := THTMLContainer.Create(Self);\r\n B49 := TPanel.Create(Self);\r\n WebPanel64 := TPanel.Create(Self);\r\n WebLabel69 := TLabel.Create(Self);\r\n WebSpeedButton65 := TSpeedButton.Create(Self);\r\n M49 := TMemo.Create(Self);\r\n WebHTMLContainer56 := THTMLContainer.Create(Self);\r\n B50 := TPanel.Create(Self);\r\n WebPanel66 := TPanel.Create(Self);\r\n WebLabel70 := TLabel.Create(Self);\r\n WebSpeedButton66 := TSpeedButton.Create(Self);\r\n M50 := TMemo.Create(Self);\r\n WebHTMLContainer57 := THTMLContainer.Create(Self);\r\n\r\n WebLabel15.BeforeLoadDFMValues;\r\n WebLabel13.BeforeLoadDFMValues;\r\n WebLabel2.BeforeLoadDFMValues;\r\n pnlBottom.BeforeLoadDFMValues;\r\n tbReport.BeforeLoadDFMValues;\r\n pnlFormButtons.BeforeLoadDFMValues;\r\n btnCustom1.BeforeLoadDFMValues;\r\n btnCustom2.BeforeLoadDFMValues;\r\n btnCustom3.BeforeLoadDFMValues;\r\n btnCustom4.BeforeLoadDFMValues;\r\n btnCustom5.BeforeLoadDFMValues;\r\n btnPost.BeforeLoadDFMValues;\r\n btnAdd.BeforeLoadDFMValues;\r\n btnRefresh.BeforeLoadDFMValues;\r\n btnClose.BeforeLoadDFMValues;\r\n btnUseDefaults.BeforeLoadDFMValues;\r\n btnSaveAsDefaults.BeforeLoadDFMValues;\r\n btnCustom6.BeforeLoadDFMValues;\r\n btnCustom7.BeforeLoadDFMValues;\r\n btnCustom8.BeforeLoadDFMValues;\r\n btnCustom9.BeforeLoadDFMValues;\r\n WebMemo8.BeforeLoadDFMValues;\r\n btnClearBlockCustomPositioning.BeforeLoadDFMValues;\r\n btnClearBlockCustomSizes.BeforeLoadDFMValues;\r\n btnFixBlockPositions.BeforeLoadDFMValues;\r\n pnlReportButtons.BeforeLoadDFMValues;\r\n btnRefresh_RPT.BeforeLoadDFMValues;\r\n btnClose_RPT.BeforeLoadDFMValues;\r\n spSideDataSplitter.BeforeLoadDFMValues;\r\n pnlFormCaption.BeforeLoadDFMValues;\r\n pnlSideData.BeforeLoadDFMValues;\r\n sbSideData.BeforeLoadDFMValues;\r\n sb6.BeforeLoadDFMValues;\r\n WebPanel9.BeforeLoadDFMValues;\r\n WebLabel26.BeforeLoadDFMValues;\r\n WebSpeedButton20.BeforeLoadDFMValues;\r\n SM6.BeforeLoadDFMValues;\r\n WebHTMLContainer36.BeforeLoadDFMValues;\r\n sb5.BeforeLoadDFMValues;\r\n WebPanel12.BeforeLoadDFMValues;\r\n WebLabel27.BeforeLoadDFMValues;\r\n WebSpeedButton21.BeforeLoadDFMValues;\r\n SM5.BeforeLoadDFMValues;\r\n WebHTMLContainer35.BeforeLoadDFMValues;\r\n sb4.BeforeLoadDFMValues;\r\n WebPanel22.BeforeLoadDFMValues;\r\n WebLabel28.BeforeLoadDFMValues;\r\n WebSpeedButton22.BeforeLoadDFMValues;\r\n SM4.BeforeLoadDFMValues;\r\n WebHTMLContainer34.BeforeLoadDFMValues;\r\n sb3.BeforeLoadDFMValues;\r\n WebPanel25.BeforeLoadDFMValues;\r\n WebLabel29.BeforeLoadDFMValues;\r\n WebSpeedButton23.BeforeLoadDFMValues;\r\n SM3.BeforeLoadDFMValues;\r\n WebHTMLContainer33.BeforeLoadDFMValues;\r\n sb2.BeforeLoadDFMValues;\r\n WebPanel30.BeforeLoadDFMValues;\r\n WebLabel30.BeforeLoadDFMValues;\r\n WebSpeedButton24.BeforeLoadDFMValues;\r\n SM2.BeforeLoadDFMValues;\r\n WebHTMLContainer32.BeforeLoadDFMValues;\r\n sb1.BeforeLoadDFMValues;\r\n WebPanel32.BeforeLoadDFMValues;\r\n WebLabel31.BeforeLoadDFMValues;\r\n WebSpeedButton25.BeforeLoadDFMValues;\r\n SM1.BeforeLoadDFMValues;\r\n WebHTMLContainer31.BeforeLoadDFMValues;\r\n sb7.BeforeLoadDFMValues;\r\n WebPanel34.BeforeLoadDFMValues;\r\n WebLabel32.BeforeLoadDFMValues;\r\n WebSpeedButton26.BeforeLoadDFMValues;\r\n SM7.BeforeLoadDFMValues;\r\n WebHTMLContainer37.BeforeLoadDFMValues;\r\n sb101.BeforeLoadDFMValues;\r\n WebPanel10.BeforeLoadDFMValues;\r\n WebLabel1.BeforeLoadDFMValues;\r\n WebSpeedButton67.BeforeLoadDFMValues;\r\n SG1.BeforeLoadDFMValues;\r\n sb102.BeforeLoadDFMValues;\r\n WebPanel23.BeforeLoadDFMValues;\r\n WebLabel73.BeforeLoadDFMValues;\r\n WebSpeedButton68.BeforeLoadDFMValues;\r\n SG2.BeforeLoadDFMValues;\r\n sb103.BeforeLoadDFMValues;\r\n WebPanel35.BeforeLoadDFMValues;\r\n WebLabel74.BeforeLoadDFMValues;\r\n WebSpeedButton69.BeforeLoadDFMValues;\r\n SG3.BeforeLoadDFMValues;\r\n pnlSUBFORM_DIV.BeforeLoadDFMValues;\r\n pnlDataBlocks.BeforeLoadDFMValues;\r\n SubForm_DIV.BeforeLoadDFMValues;\r\n b26.BeforeLoadDFMValues;\r\n WebPanel13.BeforeLoadDFMValues;\r\n WebLabel8.BeforeLoadDFMValues;\r\n WebSpeedButton6.BeforeLoadDFMValues;\r\n M26.BeforeLoadDFMValues;\r\n WebHTMLContainer27.BeforeLoadDFMValues;\r\n B101.BeforeLoadDFMValues;\r\n WebPanel14.BeforeLoadDFMValues;\r\n WebLabel18.BeforeLoadDFMValues;\r\n WebSpeedButton11.BeforeLoadDFMValues;\r\n G1.BeforeLoadDFMValues;\r\n B25.BeforeLoadDFMValues;\r\n WebPanel11.BeforeLoadDFMValues;\r\n WebLabel7.BeforeLoadDFMValues;\r\n WebSpeedButton5.BeforeLoadDFMValues;\r\n M25.BeforeLoadDFMValues;\r\n WebHTMLContainer26.BeforeLoadDFMValues;\r\n B20.BeforeLoadDFMValues;\r\n WebPanel95.BeforeLoadDFMValues;\r\n WebLabel47.BeforeLoadDFMValues;\r\n WebSpeedButton44.BeforeLoadDFMValues;\r\n M20.BeforeLoadDFMValues;\r\n WebHTMLContainer17.BeforeLoadDFMValues;\r\n B21.BeforeLoadDFMValues;\r\n WebPanel2.BeforeLoadDFMValues;\r\n WebLabel3.BeforeLoadDFMValues;\r\n WebSpeedButton1.BeforeLoadDFMValues;\r\n M21.BeforeLoadDFMValues;\r\n WebHTMLContainer22.BeforeLoadDFMValues;\r\n B22.BeforeLoadDFMValues;\r\n WebPanel4.BeforeLoadDFMValues;\r\n WebLabel4.BeforeLoadDFMValues;\r\n WebSpeedButton2.BeforeLoadDFMValues;\r\n M22.BeforeLoadDFMValues;\r\n WebHTMLContainer23.BeforeLoadDFMValues;\r\n b23.BeforeLoadDFMValues;\r\n WebPanel6.BeforeLoadDFMValues;\r\n WebLabel5.BeforeLoadDFMValues;\r\n WebSpeedButton3.BeforeLoadDFMValues;\r\n M23.BeforeLoadDFMValues;\r\n WebHTMLContainer24.BeforeLoadDFMValues;\r\n B18.BeforeLoadDFMValues;\r\n WebPanel111.BeforeLoadDFMValues;\r\n WebLabel55.BeforeLoadDFMValues;\r\n WebSpeedButton52.BeforeLoadDFMValues;\r\n M18.BeforeLoadDFMValues;\r\n WebHTMLContainer19.BeforeLoadDFMValues;\r\n B19.BeforeLoadDFMValues;\r\n WebPanel93.BeforeLoadDFMValues;\r\n WebLabel46.BeforeLoadDFMValues;\r\n WebSpeedButton43.BeforeLoadDFMValues;\r\n M19.BeforeLoadDFMValues;\r\n WebHTMLContainer18.BeforeLoadDFMValues;\r\n B24.BeforeLoadDFMValues;\r\n WebPanel8.BeforeLoadDFMValues;\r\n WebLabel6.BeforeLoadDFMValues;\r\n WebSpeedButton4.BeforeLoadDFMValues;\r\n M24.BeforeLoadDFMValues;\r\n WebHTMLContainer25.BeforeLoadDFMValues;\r\n B29.BeforeLoadDFMValues;\r\n WebPanel19.BeforeLoadDFMValues;\r\n WebLabel11.BeforeLoadDFMValues;\r\n WebSpeedButton9.BeforeLoadDFMValues;\r\n M29.BeforeLoadDFMValues;\r\n WebHTMLContainer30.BeforeLoadDFMValues;\r\n B28.BeforeLoadDFMValues;\r\n WebPanel17.BeforeLoadDFMValues;\r\n WebLabel10.BeforeLoadDFMValues;\r\n WebSpeedButton8.BeforeLoadDFMValues;\r\n M28.BeforeLoadDFMValues;\r\n WebHTMLContainer29.BeforeLoadDFMValues;\r\n B27.BeforeLoadDFMValues;\r\n WebPanel15.BeforeLoadDFMValues;\r\n WebLabel9.BeforeLoadDFMValues;\r\n WebSpeedButton7.BeforeLoadDFMValues;\r\n M27.BeforeLoadDFMValues;\r\n WebHTMLContainer28.BeforeLoadDFMValues;\r\n B16.BeforeLoadDFMValues;\r\n WebPanel107.BeforeLoadDFMValues;\r\n WebLabel53.BeforeLoadDFMValues;\r\n WebSpeedButton50.BeforeLoadDFMValues;\r\n M16.BeforeLoadDFMValues;\r\n WebHTMLContainer21.BeforeLoadDFMValues;\r\n B17.BeforeLoadDFMValues;\r\n WebPanel109.BeforeLoadDFMValues;\r\n WebLabel54.BeforeLoadDFMValues;\r\n WebSpeedButton51.BeforeLoadDFMValues;\r\n M17.BeforeLoadDFMValues;\r\n WebHTMLContainer20.BeforeLoadDFMValues;\r\n B15.BeforeLoadDFMValues;\r\n WebPanel97.BeforeLoadDFMValues;\r\n WebLabel48.BeforeLoadDFMValues;\r\n WebSpeedButton45.BeforeLoadDFMValues;\r\n M15.BeforeLoadDFMValues;\r\n WebHTMLContainer16.BeforeLoadDFMValues;\r\n B14.BeforeLoadDFMValues;\r\n WebPanel99.BeforeLoadDFMValues;\r\n WebLabel49.BeforeLoadDFMValues;\r\n WebSpeedButton46.BeforeLoadDFMValues;\r\n M14.BeforeLoadDFMValues;\r\n WebHTMLContainer15.BeforeLoadDFMValues;\r\n B13.BeforeLoadDFMValues;\r\n WebPanel101.BeforeLoadDFMValues;\r\n WebLabel50.BeforeLoadDFMValues;\r\n WebSpeedButton47.BeforeLoadDFMValues;\r\n M13.BeforeLoadDFMValues;\r\n WebHTMLContainer14.BeforeLoadDFMValues;\r\n B12.BeforeLoadDFMValues;\r\n WebPanel103.BeforeLoadDFMValues;\r\n WebLabel51.BeforeLoadDFMValues;\r\n WebSpeedButton48.BeforeLoadDFMValues;\r\n M12.BeforeLoadDFMValues;\r\n WebHTMLContainer13.BeforeLoadDFMValues;\r\n B11.BeforeLoadDFMValues;\r\n WebPanel105.BeforeLoadDFMValues;\r\n WebLabel52.BeforeLoadDFMValues;\r\n WebSpeedButton49.BeforeLoadDFMValues;\r\n M11.BeforeLoadDFMValues;\r\n WebHTMLContainer12.BeforeLoadDFMValues;\r\n B6.BeforeLoadDFMValues;\r\n WebPanel80.BeforeLoadDFMValues;\r\n WebLabel41.BeforeLoadDFMValues;\r\n WebSpeedButton38.BeforeLoadDFMValues;\r\n M6.BeforeLoadDFMValues;\r\n WebHTMLContainer11.BeforeLoadDFMValues;\r\n B7.BeforeLoadDFMValues;\r\n WebPanel82.BeforeLoadDFMValues;\r\n WebLabel42.BeforeLoadDFMValues;\r\n WebSpeedButton39.BeforeLoadDFMValues;\r\n M7.BeforeLoadDFMValues;\r\n WebHTMLContainer10.BeforeLoadDFMValues;\r\n B8.BeforeLoadDFMValues;\r\n WebPanel86.BeforeLoadDFMValues;\r\n WebLabel43.BeforeLoadDFMValues;\r\n WebSpeedButton40.BeforeLoadDFMValues;\r\n M8.BeforeLoadDFMValues;\r\n WebHTMLContainer9.BeforeLoadDFMValues;\r\n B9.BeforeLoadDFMValues;\r\n WebPanel88.BeforeLoadDFMValues;\r\n WebLabel44.BeforeLoadDFMValues;\r\n WebSpeedButton41.BeforeLoadDFMValues;\r\n M9.BeforeLoadDFMValues;\r\n WebHTMLContainer8.BeforeLoadDFMValues;\r\n B10.BeforeLoadDFMValues;\r\n WebPanel91.BeforeLoadDFMValues;\r\n WebLabel45.BeforeLoadDFMValues;\r\n WebSpeedButton42.BeforeLoadDFMValues;\r\n M10.BeforeLoadDFMValues;\r\n WebHTMLContainer7.BeforeLoadDFMValues;\r\n B5.BeforeLoadDFMValues;\r\n WebPanel74.BeforeLoadDFMValues;\r\n WebLabel38.BeforeLoadDFMValues;\r\n WebSpeedButton35.BeforeLoadDFMValues;\r\n M5.BeforeLoadDFMValues;\r\n WebHTMLContainer6.BeforeLoadDFMValues;\r\n B4.BeforeLoadDFMValues;\r\n WebPanel78.BeforeLoadDFMValues;\r\n WebLabel40.BeforeLoadDFMValues;\r\n WebSpeedButton37.BeforeLoadDFMValues;\r\n M4.BeforeLoadDFMValues;\r\n WebHTMLContainer5.BeforeLoadDFMValues;\r\n B3.BeforeLoadDFMValues;\r\n WebPanel72.BeforeLoadDFMValues;\r\n WebLabel37.BeforeLoadDFMValues;\r\n WebSpeedButton34.BeforeLoadDFMValues;\r\n M3.BeforeLoadDFMValues;\r\n WebHTMLContainer4.BeforeLoadDFMValues;\r\n B2.BeforeLoadDFMValues;\r\n WebPanel76.BeforeLoadDFMValues;\r\n WebLabel39.BeforeLoadDFMValues;\r\n WebSpeedButton36.BeforeLoadDFMValues;\r\n M2.BeforeLoadDFMValues;\r\n WebHTMLContainer3.BeforeLoadDFMValues;\r\n B1.BeforeLoadDFMValues;\r\n WebPanel70.BeforeLoadDFMValues;\r\n WebLabel36.BeforeLoadDFMValues;\r\n WebSpeedButton33.BeforeLoadDFMValues;\r\n M1.BeforeLoadDFMValues;\r\n WebHTMLContainer2.BeforeLoadDFMValues;\r\n B30.BeforeLoadDFMValues;\r\n WebPanel21.BeforeLoadDFMValues;\r\n WebLabel12.BeforeLoadDFMValues;\r\n WebSpeedButton10.BeforeLoadDFMValues;\r\n M30.BeforeLoadDFMValues;\r\n WebHTMLContainer1.BeforeLoadDFMValues;\r\n B100.BeforeLoadDFMValues;\r\n WebPanel3.BeforeLoadDFMValues;\r\n WebLabel14.BeforeLoadDFMValues;\r\n WebSpeedButton19.BeforeLoadDFMValues;\r\n G9.BeforeLoadDFMValues;\r\n B102.BeforeLoadDFMValues;\r\n WebPanel24.BeforeLoadDFMValues;\r\n WebLabel21.BeforeLoadDFMValues;\r\n WebSpeedButton12.BeforeLoadDFMValues;\r\n G2.BeforeLoadDFMValues;\r\n B105.BeforeLoadDFMValues;\r\n WebPanel26.BeforeLoadDFMValues;\r\n WebLabel22.BeforeLoadDFMValues;\r\n WebSpeedButton15.BeforeLoadDFMValues;\r\n G5.BeforeLoadDFMValues;\r\n B104.BeforeLoadDFMValues;\r\n WebPanel18.BeforeLoadDFMValues;\r\n WebLabel19.BeforeLoadDFMValues;\r\n WebSpeedButton14.BeforeLoadDFMValues;\r\n G4.BeforeLoadDFMValues;\r\n B103.BeforeLoadDFMValues;\r\n WebPanel7.BeforeLoadDFMValues;\r\n WebLabel17.BeforeLoadDFMValues;\r\n WebSpeedButton13.BeforeLoadDFMValues;\r\n G3.BeforeLoadDFMValues;\r\n B106.BeforeLoadDFMValues;\r\n WebPanel20.BeforeLoadDFMValues;\r\n WebLabel20.BeforeLoadDFMValues;\r\n WebSpeedButton16.BeforeLoadDFMValues;\r\n G6.BeforeLoadDFMValues;\r\n B107.BeforeLoadDFMValues;\r\n WebPanel27.BeforeLoadDFMValues;\r\n WebLabel23.BeforeLoadDFMValues;\r\n WebSpeedButton17.BeforeLoadDFMValues;\r\n G7.BeforeLoadDFMValues;\r\n B108.BeforeLoadDFMValues;\r\n WebPanel29.BeforeLoadDFMValues;\r\n WebLabel24.BeforeLoadDFMValues;\r\n WebSpeedButton18.BeforeLoadDFMValues;\r\n G8.BeforeLoadDFMValues;\r\n wmWaitMessage.BeforeLoadDFMValues;\r\n viewpdf.BeforeLoadDFMValues;\r\n B31.BeforeLoadDFMValues;\r\n WebPanel5.BeforeLoadDFMValues;\r\n WebLabel16.BeforeLoadDFMValues;\r\n WebSpeedButton27.BeforeLoadDFMValues;\r\n M31.BeforeLoadDFMValues;\r\n WebHTMLContainer38.BeforeLoadDFMValues;\r\n B32.BeforeLoadDFMValues;\r\n WebPanel16.BeforeLoadDFMValues;\r\n WebLabel25.BeforeLoadDFMValues;\r\n WebSpeedButton28.BeforeLoadDFMValues;\r\n M32.BeforeLoadDFMValues;\r\n WebHTMLContainer39.BeforeLoadDFMValues;\r\n B33.BeforeLoadDFMValues;\r\n WebPanel28.BeforeLoadDFMValues;\r\n WebLabel33.BeforeLoadDFMValues;\r\n WebSpeedButton29.BeforeLoadDFMValues;\r\n M33.BeforeLoadDFMValues;\r\n WebHTMLContainer40.BeforeLoadDFMValues;\r\n B34.BeforeLoadDFMValues;\r\n WebPanel33.BeforeLoadDFMValues;\r\n WebLabel34.BeforeLoadDFMValues;\r\n WebSpeedButton30.BeforeLoadDFMValues;\r\n M34.BeforeLoadDFMValues;\r\n WebHTMLContainer41.BeforeLoadDFMValues;\r\n B35.BeforeLoadDFMValues;\r\n WebPanel36.BeforeLoadDFMValues;\r\n WebLabel35.BeforeLoadDFMValues;\r\n WebSpeedButton31.BeforeLoadDFMValues;\r\n M35.BeforeLoadDFMValues;\r\n WebHTMLContainer42.BeforeLoadDFMValues;\r\n B36.BeforeLoadDFMValues;\r\n WebPanel38.BeforeLoadDFMValues;\r\n WebLabel56.BeforeLoadDFMValues;\r\n WebSpeedButton32.BeforeLoadDFMValues;\r\n M36.BeforeLoadDFMValues;\r\n WebHTMLContainer43.BeforeLoadDFMValues;\r\n B37.BeforeLoadDFMValues;\r\n WebPanel40.BeforeLoadDFMValues;\r\n WebLabel57.BeforeLoadDFMValues;\r\n WebSpeedButton53.BeforeLoadDFMValues;\r\n M37.BeforeLoadDFMValues;\r\n WebHTMLContainer44.BeforeLoadDFMValues;\r\n B38.BeforeLoadDFMValues;\r\n WebPanel42.BeforeLoadDFMValues;\r\n WebLabel58.BeforeLoadDFMValues;\r\n WebSpeedButton54.BeforeLoadDFMValues;\r\n M38.BeforeLoadDFMValues;\r\n WebHTMLContainer45.BeforeLoadDFMValues;\r\n B39.BeforeLoadDFMValues;\r\n WebPanel44.BeforeLoadDFMValues;\r\n WebLabel59.BeforeLoadDFMValues;\r\n WebSpeedButton55.BeforeLoadDFMValues;\r\n M39.BeforeLoadDFMValues;\r\n WebHTMLContainer46.BeforeLoadDFMValues;\r\n B40.BeforeLoadDFMValues;\r\n WebPanel46.BeforeLoadDFMValues;\r\n WebLabel60.BeforeLoadDFMValues;\r\n WebSpeedButton56.BeforeLoadDFMValues;\r\n M40.BeforeLoadDFMValues;\r\n WebHTMLContainer47.BeforeLoadDFMValues;\r\n B41.BeforeLoadDFMValues;\r\n WebPanel48.BeforeLoadDFMValues;\r\n WebLabel61.BeforeLoadDFMValues;\r\n WebSpeedButton57.BeforeLoadDFMValues;\r\n M41.BeforeLoadDFMValues;\r\n WebHTMLContainer48.BeforeLoadDFMValues;\r\n B42.BeforeLoadDFMValues;\r\n WebPanel50.BeforeLoadDFMValues;\r\n WebLabel62.BeforeLoadDFMValues;\r\n WebSpeedButton58.BeforeLoadDFMValues;\r\n M42.BeforeLoadDFMValues;\r\n WebHTMLContainer49.BeforeLoadDFMValues;\r\n B43.BeforeLoadDFMValues;\r\n WebPanel52.BeforeLoadDFMValues;\r\n WebLabel63.BeforeLoadDFMValues;\r\n WebSpeedButton59.BeforeLoadDFMValues;\r\n M43.BeforeLoadDFMValues;\r\n WebHTMLContainer50.BeforeLoadDFMValues;\r\n B44.BeforeLoadDFMValues;\r\n WebPanel54.BeforeLoadDFMValues;\r\n WebLabel64.BeforeLoadDFMValues;\r\n WebSpeedButton60.BeforeLoadDFMValues;\r\n M44.BeforeLoadDFMValues;\r\n WebHTMLContainer51.BeforeLoadDFMValues;\r\n B45.BeforeLoadDFMValues;\r\n WebPanel56.BeforeLoadDFMValues;\r\n WebLabel65.BeforeLoadDFMValues;\r\n WebSpeedButton61.BeforeLoadDFMValues;\r\n M45.BeforeLoadDFMValues;\r\n WebHTMLContainer52.BeforeLoadDFMValues;\r\n B46.BeforeLoadDFMValues;\r\n WebPanel58.BeforeLoadDFMValues;\r\n WebLabel66.BeforeLoadDFMValues;\r\n WebSpeedButton62.BeforeLoadDFMValues;\r\n M46.BeforeLoadDFMValues;\r\n WebHTMLContainer53.BeforeLoadDFMValues;\r\n B47.BeforeLoadDFMValues;\r\n WebPanel60.BeforeLoadDFMValues;\r\n WebLabel67.BeforeLoadDFMValues;\r\n WebSpeedButton63.BeforeLoadDFMValues;\r\n M47.BeforeLoadDFMValues;\r\n WebHTMLContainer54.BeforeLoadDFMValues;\r\n B48.BeforeLoadDFMValues;\r\n WebPanel62.BeforeLoadDFMValues;\r\n WebLabel68.BeforeLoadDFMValues;\r\n WebSpeedButton64.BeforeLoadDFMValues;\r\n M48.BeforeLoadDFMValues;\r\n WebHTMLContainer55.BeforeLoadDFMValues;\r\n B49.BeforeLoadDFMValues;\r\n WebPanel64.BeforeLoadDFMValues;\r\n WebLabel69.BeforeLoadDFMValues;\r\n WebSpeedButton65.BeforeLoadDFMValues;\r\n M49.BeforeLoadDFMValues;\r\n WebHTMLContainer56.BeforeLoadDFMValues;\r\n B50.BeforeLoadDFMValues;\r\n WebPanel66.BeforeLoadDFMValues;\r\n WebLabel70.BeforeLoadDFMValues;\r\n WebSpeedButton66.BeforeLoadDFMValues;\r\n M50.BeforeLoadDFMValues;\r\n WebHTMLContainer57.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmEditForm_Base';\r\n Width := 1444;\r\n Height := 1000;\r\n SetEvent(Self, 'OnClose', 'WebFormClose');\r\n SetEvent(Self, 'OnCloseQuery', 'WebFormCloseQuery');\r\n SetEvent(Self, 'OnCreate', 'WebFormCreate');\r\n SetEvent(Self, 'OnResize', 'WebFormResize');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n WebLabel15.SetParentComponent(Self);\r\n WebLabel15.Name := 'WebLabel15';\r\n WebLabel15.Left := 0;\r\n WebLabel15.Top := 933;\r\n WebLabel15.Width := 1444;\r\n WebLabel15.Height := 13;\r\n WebLabel15.Align := alBottom;\r\n WebLabel15.ElementClassName := 'BOX_BOTTOMBORDER';\r\n WebLabel15.HeightPercent := 100.000000000000000000;\r\n WebLabel15.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel15, Self, 'OnMouseMove', 'WebLabel15MouseMove');\r\n WebLabel13.SetParentComponent(Self);\r\n WebLabel13.Name := 'WebLabel13';\r\n WebLabel13.Left := 0;\r\n WebLabel13.Top := 35;\r\n WebLabel13.Width := 3;\r\n WebLabel13.Height := 898;\r\n WebLabel13.Align := alLeft;\r\n WebLabel13.HeightPercent := 100.000000000000000000;\r\n WebLabel13.WidthPercent := 100.000000000000000000;\r\n WebLabel2.SetParentComponent(Self);\r\n WebLabel2.Name := 'WebLabel2';\r\n WebLabel2.Left := 0;\r\n WebLabel2.Top := 946;\r\n WebLabel2.Width := 1444;\r\n WebLabel2.Height := 13;\r\n WebLabel2.Align := alBottom;\r\n WebLabel2.HeightPercent := 100.000000000000000000;\r\n WebLabel2.Visible := False;\r\n WebLabel2.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel2, Self, 'OnMouseMove', 'btnCloseMouseMove');\r\n pnlBottom.SetParentComponent(Self);\r\n pnlBottom.Name := 'pnlBottom';\r\n pnlBottom.Left := 0;\r\n pnlBottom.Top := 959;\r\n pnlBottom.Width := 1444;\r\n pnlBottom.Height := 41;\r\n pnlBottom.Align := alBottom;\r\n pnlBottom.BorderStyle := bsNone;\r\n pnlBottom.ChildOrder := 5;\r\n pnlBottom.Color := clWhite;\r\n pnlBottom.TabOrder := 0;\r\n tbReport.SetParentComponent(pnlBottom);\r\n tbReport.Name := 'tbReport';\r\n tbReport.Left := 0;\r\n tbReport.Top := 0;\r\n tbReport.Width := 95;\r\n tbReport.Height := 41;\r\n tbReport.Cursor := crHandPoint;\r\n tbReport.AllowFocus := False;\r\n tbReport.Align := alLeft;\r\n tbReport.BevelInner := bvNone;\r\n tbReport.BevelOuter := bvNone;\r\n tbReport.ParentDoubleBuffered := False;\r\n tbReport.DoubleBuffered := True;\r\n tbReport.ParentColor := True;\r\n tbReport.TabOrder := 0;\r\n SetEvent(tbReport, Self, 'OnMouseMove', 'btnCloseMouseMove');\r\n tbReport.AppearanceOff.Fill.ColorTo := clWhite;\r\n tbReport.AppearanceOff.Font.Charset := DEFAULT_CHARSET;\r\n tbReport.AppearanceOff.Font.Color := clBlack;\r\n tbReport.AppearanceOff.Font.Height := -16;\r\n tbReport.AppearanceOff.Font.Name := 'Tahoma';\r\n tbReport.AppearanceOff.Font.Style := [];\r\n tbReport.AppearanceOff.Text := 'Report';\r\n tbReport.AppearanceOn.Fill.Color := 16748574;\r\n tbReport.AppearanceOn.Font.Charset := DEFAULT_CHARSET;\r\n tbReport.AppearanceOn.Font.Color := clWhite;\r\n tbReport.AppearanceOn.Font.Height := -16;\r\n tbReport.AppearanceOn.Font.Name := 'Tahoma';\r\n tbReport.AppearanceOn.Font.Style := [];\r\n tbReport.AppearanceOn.Text := 'Form';\r\n tbReport.AnimationFactor := 8;\r\n tbReport.Layout := sloExtended;\r\n tbReport.Rounded := True;\r\n SetEvent(tbReport, Self, 'OnChange', 'tbReportChange');\r\n pnlFormButtons.SetParentComponent(pnlBottom);\r\n pnlFormButtons.Name := 'pnlFormButtons';\r\n pnlFormButtons.Left := 312;\r\n pnlFormButtons.Top := 0;\r\n pnlFormButtons.Width := 1132;\r\n pnlFormButtons.Height := 41;\r\n pnlFormButtons.Align := alRight;\r\n pnlFormButtons.BorderColor := clNone;\r\n pnlFormButtons.BorderStyle := bsNone;\r\n pnlFormButtons.ChildOrder := 13;\r\n pnlFormButtons.Color := clWhite;\r\n pnlFormButtons.TabOrder := 1;\r\n SetEvent(pnlFormButtons, Self, 'OnMouseMove', 'pnlFormButtonsMouseMove');\r\n btnCustom1.SetParentComponent(pnlFormButtons);\r\n btnCustom1.Name := 'btnCustom1';\r\n btnCustom1.Left := 412;\r\n btnCustom1.Top := 0;\r\n btnCustom1.Width := 40;\r\n btnCustom1.Height := 41;\r\n btnCustom1.Cursor := crHandPoint;\r\n btnCustom1.Align := alRight;\r\n btnCustom1.Caption := 'Custom1';\r\n btnCustom1.Color := clNone;\r\n btnCustom1.ElementClassName := 'btn_icon';\r\n btnCustom1.Font.Charset := DEFAULT_CHARSET;\r\n btnCustom1.Font.Color := clGray;\r\n btnCustom1.Font.Height := -13;\r\n btnCustom1.Font.Name := 'Tahoma';\r\n btnCustom1.Font.Style := [];\r\n btnCustom1.HeightPercent := 100.000000000000000000;\r\n btnCustom1.ParentFont := False;\r\n btnCustom1.Visible := False;\r\n btnCustom1.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnCustom1, Self, 'OnClick', 'btnCustom1Click');\r\n SetEvent(btnCustom1, Self, 'OnMouseMove', 'btnCloseMouseMove');\r\n btnCustom2.SetParentComponent(pnlFormButtons);\r\n btnCustom2.Name := 'btnCustom2';\r\n btnCustom2.Left := 452;\r\n btnCustom2.Top := 0;\r\n btnCustom2.Width := 40;\r\n btnCustom2.Height := 41;\r\n btnCustom2.Cursor := crHandPoint;\r\n btnCustom2.Align := alRight;\r\n btnCustom2.Caption := 'Custom2';\r\n btnCustom2.Color := clNone;\r\n btnCustom2.ElementClassName := 'btn_icon';\r\n btnCustom2.Font.Charset := DEFAULT_CHARSET;\r\n btnCustom2.Font.Color := clGray;\r\n btnCustom2.Font.Height := -13;\r\n btnCustom2.Font.Name := 'Tahoma';\r\n btnCustom2.Font.Style := [];\r\n btnCustom2.HeightPercent := 100.000000000000000000;\r\n btnCustom2.ParentFont := False;\r\n btnCustom2.Visible := False;\r\n btnCustom2.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnCustom2, Self, 'OnClick', 'btnCustom1Click');\r\n SetEvent(btnCustom2, Self, 'OnMouseMove', 'btnCloseMouseMove');\r\n btnCustom3.SetParentComponent(pnlFormButtons);\r\n btnCustom3.Name := 'btnCustom3';\r\n btnCustom3.Left := 492;\r\n btnCustom3.Top := 0;\r\n btnCustom3.Width := 40;\r\n btnCustom3.Height := 41;\r\n btnCustom3.Cursor := crHandPoint;\r\n btnCustom3.Align := alRight;\r\n btnCustom3.Caption := 'Custom3';\r\n btnCustom3.Color := clNone;\r\n btnCustom3.ElementClassName := 'btn_icon';\r\n btnCustom3.Font.Charset := DEFAULT_CHARSET;\r\n btnCustom3.Font.Color := clGray;\r\n btnCustom3.Font.Height := -13;\r\n btnCustom3.Font.Name := 'Tahoma';\r\n btnCustom3.Font.Style := [];\r\n btnCustom3.HeightPercent := 100.000000000000000000;\r\n btnCustom3.ParentFont := False;\r\n btnCustom3.Visible := False;\r\n btnCustom3.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnCustom3, Self, 'OnClick', 'btnCustom1Click');\r\n SetEvent(btnCustom3, Self, 'OnMouseMove', 'btnCloseMouseMove');\r\n btnCustom4.SetParentComponent(pnlFormButtons);\r\n btnCustom4.Name := 'btnCustom4';\r\n btnCustom4.Left := 532;\r\n btnCustom4.Top := 0;\r\n btnCustom4.Width := 40;\r\n btnCustom4.Height := 41;\r\n btnCustom4.Cursor := crHandPoint;\r\n btnCustom4.Align := alRight;\r\n btnCustom4.Caption := 'Custom4';\r\n btnCustom4.Color := clNone;\r\n btnCustom4.ElementClassName := 'btn_icon';\r\n btnCustom4.Font.Charset := DEFAULT_CHARSET;\r\n btnCustom4.Font.Color := clGray;\r\n btnCustom4.Font.Height := -13;\r\n btnCustom4.Font.Name := 'Tahoma';\r\n btnCustom4.Font.Style := [];\r\n btnCustom4.HeightPercent := 100.000000000000000000;\r\n btnCustom4.ParentFont := False;\r\n btnCustom4.Visible := False;\r\n btnCustom4.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnCustom4, Self, 'OnClick', 'btnCustom1Click');\r\n SetEvent(btnCustom4, Self, 'OnMouseMove', 'btnCloseMouseMove');\r\n btnCustom5.SetParentComponent(pnlFormButtons);\r\n btnCustom5.Name := 'btnCustom5';\r\n btnCustom5.Left := 572;\r\n btnCustom5.Top := 0;\r\n btnCustom5.Width := 40;\r\n btnCustom5.Height := 41;\r\n btnCustom5.Cursor := crHandPoint;\r\n btnCustom5.Align := alRight;\r\n btnCustom5.Caption := 'Custom5';\r\n btnCustom5.Color := clNone;\r\n btnCustom5.ElementClassName := 'btn_icon';\r\n btnCustom5.Font.Charset := DEFAULT_CHARSET;\r\n btnCustom5.Font.Color := clGray;\r\n btnCustom5.Font.Height := -13;\r\n btnCustom5.Font.Name := 'Tahoma';\r\n btnCustom5.Font.Style := [];\r\n btnCustom5.HeightPercent := 100.000000000000000000;\r\n btnCustom5.ParentFont := False;\r\n btnCustom5.Visible := False;\r\n btnCustom5.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnCustom5, Self, 'OnClick', 'btnCustom1Click');\r\n SetEvent(btnCustom5, Self, 'OnMouseMove', 'btnCloseMouseMove');\r\n btnPost.SetParentComponent(pnlFormButtons);\r\n btnPost.Name := 'btnPost';\r\n btnPost.Left := 772;\r\n btnPost.Top := 0;\r\n btnPost.Width := 90;\r\n btnPost.Height := 41;\r\n btnPost.Cursor := crHandPoint;\r\n btnPost.Hint := 'Post';\r\n btnPost.Align := alRight;\r\n btnPost.Caption := '';\r\n btnPost.ChildOrder := 87;\r\n btnPost.Color := clNone;\r\n btnPost.ElementClassName := 'btn_icon';\r\n btnPost.Font.Charset := DEFAULT_CHARSET;\r\n btnPost.Font.Color := clGray;\r\n btnPost.Font.Height := -13;\r\n btnPost.Font.Name := 'Tahoma';\r\n btnPost.Font.Style := [];\r\n btnPost.HeightPercent := 100.000000000000000000;\r\n btnPost.MaterialGlyph := 'check';\r\n btnPost.MaterialGlyphSize := 1;\r\n btnPost.ParentFont := False;\r\n btnPost.TabOrder := 6;\r\n btnPost.WidthPercent := 9.000000000000000000;\r\n SetEvent(btnPost, Self, 'OnClick', 'btnPostClick');\r\n SetEvent(btnPost, Self, 'OnMouseMove', 'btnCloseMouseMove');\r\n SetEvent(btnPost, Self, 'OnMouseLeave', 'btnPostMouseLeave');\r\n btnAdd.SetParentComponent(pnlFormButtons);\r\n btnAdd.Name := 'btnAdd';\r\n btnAdd.Left := 862;\r\n btnAdd.Top := 0;\r\n btnAdd.Width := 90;\r\n btnAdd.Height := 41;\r\n btnAdd.Cursor := crHandPoint;\r\n btnAdd.Hint := 'New';\r\n btnAdd.Align := alRight;\r\n btnAdd.Caption := '';\r\n btnAdd.ChildOrder := 87;\r\n btnAdd.Color := clNone;\r\n btnAdd.ElementClassName := 'btn_icon';\r\n btnAdd.Font.Charset := DEFAULT_CHARSET;\r\n btnAdd.Font.Color := clGray;\r\n btnAdd.Font.Height := -13;\r\n btnAdd.Font.Name := 'Tahoma';\r\n btnAdd.Font.Style := [];\r\n btnAdd.HeightPercent := 100.000000000000000000;\r\n btnAdd.MaterialGlyph := 'add';\r\n btnAdd.MaterialGlyphSize := 1;\r\n btnAdd.ParentFont := False;\r\n btnAdd.TabOrder := 6;\r\n btnAdd.WidthPercent := 9.000000000000000000;\r\n SetEvent(btnAdd, Self, 'OnClick', 'btnAddClick');\r\n SetEvent(btnAdd, Self, 'OnMouseMove', 'btnCloseMouseMove');\r\n btnRefresh.SetParentComponent(pnlFormButtons);\r\n btnRefresh.Name := 'btnRefresh';\r\n btnRefresh.Left := 952;\r\n btnRefresh.Top := 0;\r\n btnRefresh.Width := 90;\r\n btnRefresh.Height := 41;\r\n btnRefresh.Cursor := crHandPoint;\r\n btnRefresh.Hint := 'Refresh from DB';\r\n btnRefresh.Align := alRight;\r\n btnRefresh.Caption := '';\r\n btnRefresh.ChildOrder := 86;\r\n btnRefresh.Color := clNone;\r\n btnRefresh.ElementClassName := 'btn_icon';\r\n btnRefresh.Font.Charset := DEFAULT_CHARSET;\r\n btnRefresh.Font.Color := clGray;\r\n btnRefresh.Font.Height := -13;\r\n btnRefresh.Font.Name := 'Tahoma';\r\n btnRefresh.Font.Style := [];\r\n btnRefresh.HeightPercent := 100.000000000000000000;\r\n btnRefresh.MaterialGlyph := 'refresh';\r\n btnRefresh.MaterialGlyphSize := 1;\r\n btnRefresh.ParentFont := False;\r\n btnRefresh.TabOrder := 7;\r\n btnRefresh.WidthPercent := 9.000000000000000000;\r\n SetEvent(btnRefresh, Self, 'OnClick', 'btnRefreshClick');\r\n SetEvent(btnRefresh, Self, 'OnMouseMove', 'btnCloseMouseMove');\r\n SetEvent(btnRefresh, Self, 'OnMouseLeave', 'btnRefreshMouseLeave');\r\n btnClose.SetParentComponent(pnlFormButtons);\r\n btnClose.Name := 'btnClose';\r\n btnClose.Left := 1042;\r\n btnClose.Top := 0;\r\n btnClose.Width := 90;\r\n btnClose.Height := 41;\r\n btnClose.Cursor := crHandPoint;\r\n btnClose.Hint := 'Close';\r\n btnClose.Align := alRight;\r\n btnClose.Caption := '';\r\n btnClose.Color := clNone;\r\n btnClose.ElementClassName := 'btn_icon';\r\n btnClose.Font.Charset := DEFAULT_CHARSET;\r\n btnClose.Font.Color := clGray;\r\n btnClose.Font.Height := -13;\r\n btnClose.Font.Name := 'Tahoma';\r\n btnClose.Font.Style := [];\r\n btnClose.HeightPercent := 100.000000000000000000;\r\n btnClose.MaterialGlyph := 'close';\r\n btnClose.MaterialGlyphSize := 1;\r\n btnClose.ParentFont := False;\r\n btnClose.TabOrder := 11;\r\n btnClose.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnClose, Self, 'OnClick', 'btnCloseClick');\r\n SetEvent(btnClose, Self, 'OnMouseMove', 'btnCloseMouseMove');\r\n btnUseDefaults.SetParentComponent(pnlFormButtons);\r\n btnUseDefaults.Name := 'btnUseDefaults';\r\n btnUseDefaults.Tag := -1;\r\n btnUseDefaults.Left := 332;\r\n btnUseDefaults.Top := 0;\r\n btnUseDefaults.Width := 40;\r\n btnUseDefaults.Height := 41;\r\n btnUseDefaults.Cursor := crHandPoint;\r\n btnUseDefaults.Hint := 'Use Default';\r\n btnUseDefaults.Align := alRight;\r\n btnUseDefaults.Caption := '';\r\n btnUseDefaults.ChildOrder := 86;\r\n btnUseDefaults.Color := clNone;\r\n btnUseDefaults.ElementClassName := 'btn_icon';\r\n btnUseDefaults.Font.Charset := DEFAULT_CHARSET;\r\n btnUseDefaults.Font.Color := clGray;\r\n btnUseDefaults.Font.Height := -13;\r\n btnUseDefaults.Font.Name := 'Tahoma';\r\n btnUseDefaults.Font.Style := [];\r\n btnUseDefaults.HeightPercent := 100.000000000000000000;\r\n btnUseDefaults.MaterialGlyph := 'replay';\r\n btnUseDefaults.MaterialGlyphSize := 1;\r\n btnUseDefaults.ParentFont := False;\r\n btnUseDefaults.TabOrder := 2;\r\n btnUseDefaults.WidthPercent := 9.000000000000000000;\r\n SetEvent(btnUseDefaults, Self, 'OnClick', 'btnUseDefaultsClick');\r\n SetEvent(btnUseDefaults, Self, 'OnMouseMove', 'btnCloseMouseMove');\r\n btnSaveAsDefaults.SetParentComponent(pnlFormButtons);\r\n btnSaveAsDefaults.Name := 'btnSaveAsDefaults';\r\n btnSaveAsDefaults.Left := 372;\r\n btnSaveAsDefaults.Top := 0;\r\n btnSaveAsDefaults.Width := 40;\r\n btnSaveAsDefaults.Height := 41;\r\n btnSaveAsDefaults.Cursor := crHandPoint;\r\n btnSaveAsDefaults.Hint := 'Save as Default';\r\n btnSaveAsDefaults.Align := alRight;\r\n btnSaveAsDefaults.Caption := '';\r\n btnSaveAsDefaults.ChildOrder := 86;\r\n btnSaveAsDefaults.Color := clNone;\r\n btnSaveAsDefaults.ElementClassName := 'btn_icon';\r\n btnSaveAsDefaults.Font.Charset := DEFAULT_CHARSET;\r\n btnSaveAsDefaults.Font.Color := clGray;\r\n btnSaveAsDefaults.Font.Height := -13;\r\n btnSaveAsDefaults.Font.Name := 'Tahoma';\r\n btnSaveAsDefaults.Font.Style := [];\r\n btnSaveAsDefaults.HeightPercent := 100.000000000000000000;\r\n btnSaveAsDefaults.MaterialGlyph := 'attachment';\r\n btnSaveAsDefaults.MaterialGlyphSize := 1;\r\n btnSaveAsDefaults.ParentFont := False;\r\n btnSaveAsDefaults.TabOrder := 3;\r\n btnSaveAsDefaults.Visible := False;\r\n btnSaveAsDefaults.WidthPercent := 9.000000000000000000;\r\n SetEvent(btnSaveAsDefaults, Self, 'OnClick', 'btnSaveAsDefaultsClick');\r\n SetEvent(btnSaveAsDefaults, Self, 'OnMouseMove', 'btnCloseMouseMove');\r\n btnCustom6.SetParentComponent(pnlFormButtons);\r\n btnCustom6.Name := 'btnCustom6';\r\n btnCustom6.Left := 612;\r\n btnCustom6.Top := 0;\r\n btnCustom6.Width := 40;\r\n btnCustom6.Height := 41;\r\n btnCustom6.Cursor := crHandPoint;\r\n btnCustom6.Align := alRight;\r\n btnCustom6.Caption := 'Custom6';\r\n btnCustom6.Color := clNone;\r\n btnCustom6.ElementClassName := 'btn_icon';\r\n btnCustom6.Font.Charset := DEFAULT_CHARSET;\r\n btnCustom6.Font.Color := clGray;\r\n btnCustom6.Font.Height := -13;\r\n btnCustom6.Font.Name := 'Tahoma';\r\n btnCustom6.Font.Style := [];\r\n btnCustom6.HeightPercent := 100.000000000000000000;\r\n btnCustom6.ParentFont := False;\r\n btnCustom6.Visible := False;\r\n btnCustom6.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnCustom6, Self, 'OnClick', 'btnCustom1Click');\r\n SetEvent(btnCustom6, Self, 'OnMouseMove', 'btnCloseMouseMove');\r\n btnCustom7.SetParentComponent(pnlFormButtons);\r\n btnCustom7.Name := 'btnCustom7';\r\n btnCustom7.Left := 652;\r\n btnCustom7.Top := 0;\r\n btnCustom7.Width := 40;\r\n btnCustom7.Height := 41;\r\n btnCustom7.Cursor := crHandPoint;\r\n btnCustom7.Align := alRight;\r\n btnCustom7.Caption := 'Custom7';\r\n btnCustom7.Color := clNone;\r\n btnCustom7.ElementClassName := 'btn_icon';\r\n btnCustom7.Font.Charset := DEFAULT_CHARSET;\r\n btnCustom7.Font.Color := clGray;\r\n btnCustom7.Font.Height := -13;\r\n btnCustom7.Font.Name := 'Tahoma';\r\n btnCustom7.Font.Style := [];\r\n btnCustom7.HeightPercent := 100.000000000000000000;\r\n btnCustom7.ParentFont := False;\r\n btnCustom7.Visible := False;\r\n btnCustom7.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnCustom7, Self, 'OnClick', 'btnCustom1Click');\r\n SetEvent(btnCustom7, Self, 'OnMouseMove', 'btnCloseMouseMove');\r\n btnCustom8.SetParentComponent(pnlFormButtons);\r\n btnCustom8.Name := 'btnCustom8';\r\n btnCustom8.Left := 692;\r\n btnCustom8.Top := 0;\r\n btnCustom8.Width := 40;\r\n btnCustom8.Height := 41;\r\n btnCustom8.Cursor := crHandPoint;\r\n btnCustom8.Align := alRight;\r\n btnCustom8.Caption := 'Custom8';\r\n btnCustom8.Color := clNone;\r\n btnCustom8.ElementClassName := 'btn_icon';\r\n btnCustom8.Font.Charset := DEFAULT_CHARSET;\r\n btnCustom8.Font.Color := clGray;\r\n btnCustom8.Font.Height := -13;\r\n btnCustom8.Font.Name := 'Tahoma';\r\n btnCustom8.Font.Style := [];\r\n btnCustom8.HeightPercent := 100.000000000000000000;\r\n btnCustom8.ParentFont := False;\r\n btnCustom8.Visible := False;\r\n btnCustom8.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnCustom8, Self, 'OnClick', 'btnCustom1Click');\r\n SetEvent(btnCustom8, Self, 'OnMouseMove', 'btnCloseMouseMove');\r\n btnCustom9.SetParentComponent(pnlFormButtons);\r\n btnCustom9.Name := 'btnCustom9';\r\n btnCustom9.Left := 732;\r\n btnCustom9.Top := 0;\r\n btnCustom9.Width := 40;\r\n btnCustom9.Height := 41;\r\n btnCustom9.Cursor := crHandPoint;\r\n btnCustom9.Align := alRight;\r\n btnCustom9.Caption := 'Custom9';\r\n btnCustom9.Color := clNone;\r\n btnCustom9.ElementClassName := 'btn_icon';\r\n btnCustom9.Font.Charset := DEFAULT_CHARSET;\r\n btnCustom9.Font.Color := clGray;\r\n btnCustom9.Font.Height := -13;\r\n btnCustom9.Font.Name := 'Tahoma';\r\n btnCustom9.Font.Style := [];\r\n btnCustom9.HeightPercent := 100.000000000000000000;\r\n btnCustom9.ParentFont := False;\r\n btnCustom9.Visible := False;\r\n btnCustom9.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnCustom9, Self, 'OnClick', 'btnCustom1Click');\r\n SetEvent(btnCustom9, Self, 'OnMouseMove', 'btnCloseMouseMove');\r\n WebMemo8.SetParentComponent(pnlFormButtons);\r\n WebMemo8.Name := 'WebMemo8';\r\n WebMemo8.Left := 0;\r\n WebMemo8.Top := 0;\r\n WebMemo8.Width := 32;\r\n WebMemo8.Height := 41;\r\n WebMemo8.Align := alLeft;\r\n WebMemo8.HeightPercent := 100.000000000000000000;\r\n WebMemo8.Lines.BeginUpdate;\r\n try\r\n WebMemo8.Lines.Clear;\r\n WebMemo8.Lines.Add('We');\r\n WebMemo8.Lines.Add('bMe');\r\n WebMemo8.Lines.Add('mo8');\r\n finally\r\n WebMemo8.Lines.EndUpdate;\r\n end;\r\n WebMemo8.SelLength := 0;\r\n WebMemo8.SelStart := 0;\r\n WebMemo8.Visible := False;\r\n WebMemo8.WidthPercent := 100.000000000000000000;\r\n btnClearBlockCustomPositioning.SetParentComponent(pnlFormButtons);\r\n btnClearBlockCustomPositioning.Name := 'btnClearBlockCustomPositioning';\r\n btnClearBlockCustomPositioning.Left := 292;\r\n btnClearBlockCustomPositioning.Top := 0;\r\n btnClearBlockCustomPositioning.Width := 40;\r\n btnClearBlockCustomPositioning.Height := 41;\r\n btnClearBlockCustomPositioning.Cursor := crHandPoint;\r\n btnClearBlockCustomPositioning.Hint := 'Clear Block Custom Positioning';\r\n btnClearBlockCustomPositioning.Align := alRight;\r\n btnClearBlockCustomPositioning.Caption := '';\r\n btnClearBlockCustomPositioning.Color := clNone;\r\n btnClearBlockCustomPositioning.ElementClassName := 'btn_icon';\r\n btnClearBlockCustomPositioning.Font.Charset := DEFAULT_CHARSET;\r\n btnClearBlockCustomPositioning.Font.Color := clGray;\r\n btnClearBlockCustomPositioning.Font.Height := -16;\r\n btnClearBlockCustomPositioning.Font.Name := 'Tahoma';\r\n btnClearBlockCustomPositioning.Font.Style := [];\r\n btnClearBlockCustomPositioning.HeightPercent := 100.000000000000000000;\r\n btnClearBlockCustomPositioning.MaterialGlyph := 'clear_all';\r\n btnClearBlockCustomPositioning.MaterialGlyphSize := 1;\r\n btnClearBlockCustomPositioning.ParentFont := False;\r\n btnClearBlockCustomPositioning.ShowHint := True;\r\n btnClearBlockCustomPositioning.TabOrder := 10;\r\n btnClearBlockCustomPositioning.Visible := False;\r\n btnClearBlockCustomPositioning.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnClearBlockCustomPositioning, Self, 'OnClick', 'btnClearBlockCustomPositioningClick');\r\n btnClearBlockCustomSizes.SetParentComponent(pnlFormButtons);\r\n btnClearBlockCustomSizes.Name := 'btnClearBlockCustomSizes';\r\n btnClearBlockCustomSizes.Left := 252;\r\n btnClearBlockCustomSizes.Top := 0;\r\n btnClearBlockCustomSizes.Width := 40;\r\n btnClearBlockCustomSizes.Height := 41;\r\n btnClearBlockCustomSizes.Cursor := crHandPoint;\r\n btnClearBlockCustomSizes.Hint := 'Clear Block Custom Sizes';\r\n btnClearBlockCustomSizes.Align := alRight;\r\n btnClearBlockCustomSizes.Caption := '';\r\n btnClearBlockCustomSizes.Color := clNone;\r\n btnClearBlockCustomSizes.ElementClassName := 'btn_icon';\r\n btnClearBlockCustomSizes.Font.Charset := DEFAULT_CHARSET;\r\n btnClearBlockCustomSizes.Font.Color := clGray;\r\n btnClearBlockCustomSizes.Font.Height := -16;\r\n btnClearBlockCustomSizes.Font.Name := 'Tahoma';\r\n btnClearBlockCustomSizes.Font.Style := [];\r\n btnClearBlockCustomSizes.HeightPercent := 100.000000000000000000;\r\n btnClearBlockCustomSizes.MaterialGlyph := 'dehaze';\r\n btnClearBlockCustomSizes.MaterialGlyphSize := 1;\r\n btnClearBlockCustomSizes.ParentFont := False;\r\n btnClearBlockCustomSizes.ShowHint := True;\r\n btnClearBlockCustomSizes.TabOrder := 10;\r\n btnClearBlockCustomSizes.Visible := False;\r\n btnClearBlockCustomSizes.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnClearBlockCustomSizes, Self, 'OnClick', 'btnClearBlockCustomSizesClick');\r\n btnFixBlockPositions.SetParentComponent(pnlFormButtons);\r\n btnFixBlockPositions.Name := 'btnFixBlockPositions';\r\n btnFixBlockPositions.Left := 212;\r\n btnFixBlockPositions.Top := 0;\r\n btnFixBlockPositions.Width := 40;\r\n btnFixBlockPositions.Height := 41;\r\n btnFixBlockPositions.Cursor := crHandPoint;\r\n btnFixBlockPositions.Hint := 'Fix Block Postions';\r\n btnFixBlockPositions.Align := alRight;\r\n btnFixBlockPositions.Caption := '';\r\n btnFixBlockPositions.Color := clNone;\r\n btnFixBlockPositions.ElementClassName := 'btn_icon';\r\n btnFixBlockPositions.Font.Charset := DEFAULT_CHARSET;\r\n btnFixBlockPositions.Font.Color := clGray;\r\n btnFixBlockPositions.Font.Height := -16;\r\n btnFixBlockPositions.Font.Name := 'Tahoma';\r\n btnFixBlockPositions.Font.Style := [];\r\n btnFixBlockPositions.HeightPercent := 100.000000000000000000;\r\n btnFixBlockPositions.MaterialGlyph := 'apps';\r\n btnFixBlockPositions.MaterialGlyphSize := 1;\r\n btnFixBlockPositions.ParentFont := False;\r\n btnFixBlockPositions.ShowHint := True;\r\n btnFixBlockPositions.TabOrder := 10;\r\n btnFixBlockPositions.Visible := False;\r\n btnFixBlockPositions.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnFixBlockPositions, Self, 'OnClick', 'btnFixBlockPositionsClick');\r\n pnlReportButtons.SetParentComponent(pnlBottom);\r\n pnlReportButtons.Name := 'pnlReportButtons';\r\n pnlReportButtons.Left := 95;\r\n pnlReportButtons.Top := 0;\r\n pnlReportButtons.Width := 217;\r\n pnlReportButtons.Height := 41;\r\n pnlReportButtons.Align := alClient;\r\n pnlReportButtons.BorderColor := clNone;\r\n pnlReportButtons.BorderStyle := bsNone;\r\n pnlReportButtons.ChildOrder := 2;\r\n pnlReportButtons.Color := clWhite;\r\n pnlReportButtons.TabOrder := 2;\r\n pnlReportButtons.Visible := False;\r\n btnRefresh_RPT.SetParentComponent(pnlReportButtons);\r\n btnRefresh_RPT.Name := 'btnRefresh_RPT';\r\n btnRefresh_RPT.Left := 137;\r\n btnRefresh_RPT.Top := 0;\r\n btnRefresh_RPT.Width := 40;\r\n btnRefresh_RPT.Height := 41;\r\n btnRefresh_RPT.Cursor := crHandPoint;\r\n btnRefresh_RPT.Hint := 'Refresh Report';\r\n btnRefresh_RPT.Align := alRight;\r\n btnRefresh_RPT.Caption := '';\r\n btnRefresh_RPT.ChildOrder := 86;\r\n btnRefresh_RPT.Color := clNone;\r\n btnRefresh_RPT.ElementClassName := 'btn_icon';\r\n btnRefresh_RPT.Font.Charset := DEFAULT_CHARSET;\r\n btnRefresh_RPT.Font.Color := clGray;\r\n btnRefresh_RPT.Font.Height := -13;\r\n btnRefresh_RPT.Font.Name := 'Tahoma';\r\n btnRefresh_RPT.Font.Style := [];\r\n btnRefresh_RPT.HeightPercent := 100.000000000000000000;\r\n btnRefresh_RPT.MaterialGlyph := 'refresh';\r\n btnRefresh_RPT.MaterialGlyphSize := 1;\r\n btnRefresh_RPT.ParentFont := False;\r\n btnRefresh_RPT.TabOrder := 7;\r\n btnRefresh_RPT.WidthPercent := 9.000000000000000000;\r\n SetEvent(btnRefresh_RPT, Self, 'OnClick', 'btnRefresh_RPTClick');\r\n SetEvent(btnRefresh_RPT, Self, 'OnMouseMove', 'btnCloseMouseMove');\r\n SetEvent(btnRefresh_RPT, Self, 'OnMouseLeave', 'btnRefreshMouseLeave');\r\n btnClose_RPT.SetParentComponent(pnlReportButtons);\r\n btnClose_RPT.Name := 'btnClose_RPT';\r\n btnClose_RPT.Left := 177;\r\n btnClose_RPT.Top := 0;\r\n btnClose_RPT.Width := 40;\r\n btnClose_RPT.Height := 41;\r\n btnClose_RPT.Cursor := crHandPoint;\r\n btnClose_RPT.Hint := 'Close';\r\n btnClose_RPT.Align := alRight;\r\n btnClose_RPT.Caption := '';\r\n btnClose_RPT.Color := clNone;\r\n btnClose_RPT.ElementClassName := 'btn_icon';\r\n btnClose_RPT.Font.Charset := DEFAULT_CHARSET;\r\n btnClose_RPT.Font.Color := clGray;\r\n btnClose_RPT.Font.Height := -13;\r\n btnClose_RPT.Font.Name := 'Tahoma';\r\n btnClose_RPT.Font.Style := [];\r\n btnClose_RPT.HeightPercent := 100.000000000000000000;\r\n btnClose_RPT.MaterialGlyph := 'save';\r\n btnClose_RPT.MaterialGlyphSize := 1;\r\n btnClose_RPT.ParentFont := False;\r\n btnClose_RPT.TabOrder := 11;\r\n btnClose_RPT.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnClose_RPT, Self, 'OnClick', 'btnClose_RPTClick');\r\n SetEvent(btnClose_RPT, Self, 'OnMouseMove', 'btnCloseMouseMove');\r\n spSideDataSplitter.SetParentComponent(Self);\r\n spSideDataSplitter.Name := 'spSideDataSplitter';\r\n spSideDataSplitter.Left := 1123;\r\n spSideDataSplitter.Top := 35;\r\n spSideDataSplitter.Width := 5;\r\n spSideDataSplitter.Height := 898;\r\n spSideDataSplitter.Align := alRight;\r\n spSideDataSplitter.ChildOrder := 8;\r\n spSideDataSplitter.Color := clSilver;\r\n SetEvent(spSideDataSplitter, Self, 'OnMoved', 'spSideDataSplitterMoved');\r\n pnlFormCaption.SetParentComponent(Self);\r\n pnlFormCaption.Name := 'pnlFormCaption';\r\n pnlFormCaption.Left := 0;\r\n pnlFormCaption.Top := 0;\r\n pnlFormCaption.Width := 1444;\r\n pnlFormCaption.Height := 35;\r\n pnlFormCaption.ElementClassName := 'form_caption';\r\n pnlFormCaption.HeightStyle := ssAuto;\r\n pnlFormCaption.Align := alTop;\r\n pnlFormCaption.BorderColor := clWhite;\r\n pnlFormCaption.BorderStyle := bsNone;\r\n pnlFormCaption.Caption := 'Form Caption';\r\n pnlFormCaption.ChildOrder := 9;\r\n pnlFormCaption.ElementFont := efCSS;\r\n pnlFormCaption.Font.Charset := DEFAULT_CHARSET;\r\n pnlFormCaption.Font.Color := clWindowText;\r\n pnlFormCaption.Font.Height := -16;\r\n pnlFormCaption.Font.Name := 'Tahoma';\r\n pnlFormCaption.Font.Style := [];\r\n pnlFormCaption.ParentFont := False;\r\n pnlFormCaption.TabOrder := 2;\r\n SetEvent(pnlFormCaption, Self, 'OnMouseMove', 'pnlFormCaptionMouseMove');\r\n pnlSideData.SetParentComponent(Self);\r\n pnlSideData.Name := 'pnlSideData';\r\n pnlSideData.Left := 1128;\r\n pnlSideData.Top := 35;\r\n pnlSideData.Width := 316;\r\n pnlSideData.Height := 898;\r\n pnlSideData.Align := alRight;\r\n pnlSideData.BorderColor := clWhite;\r\n pnlSideData.BorderStyle := bsNone;\r\n pnlSideData.ChildOrder := 7;\r\n pnlSideData.Color := clWhite;\r\n pnlSideData.TabOrder := 3;\r\n pnlSideData.Visible := False;\r\n sbSideData.SetParentComponent(pnlSideData);\r\n sbSideData.Name := 'sbSideData';\r\n sbSideData.Left := 0;\r\n sbSideData.Top := 0;\r\n sbSideData.Width := 316;\r\n sbSideData.Height := 898;\r\n sbSideData.ElementClassName := 'sidedata_background';\r\n sbSideData.Align := alClient;\r\n sbSideData.AutoScroll := True;\r\n sbSideData.BorderStyle := bsNone;\r\n sbSideData.ChildOrder := 2;\r\n sbSideData.Color := clWhite;\r\n sbSideData.ScrollBars := ssVertical;\r\n sb6.SetParentComponent(sbSideData);\r\n sb6.Name := 'sb6';\r\n sb6.Left := 6;\r\n sb6.Top := 331;\r\n sb6.Width := 300;\r\n sb6.Height := 65;\r\n sb6.ElementClassName := 'data_block';\r\n sb6.BorderColor := clWhite;\r\n sb6.ChildOrder := 5;\r\n sb6.Color := clWhite;\r\n sb6.ElementFont := efCSS;\r\n sb6.Font.Charset := ANSI_CHARSET;\r\n sb6.Font.Color := clBlack;\r\n sb6.Font.Height := -13;\r\n sb6.Font.Name := 'Tahoma';\r\n sb6.Font.Style := [];\r\n sb6.ParentFont := False;\r\n sb6.TabOrder := 0;\r\n SetEvent(sb6, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(sb6, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel9.SetParentComponent(sb6);\r\n WebPanel9.Name := 'WebPanel9';\r\n WebPanel9.Left := 0;\r\n WebPanel9.Top := 0;\r\n WebPanel9.Width := 300;\r\n WebPanel9.Height := 28;\r\n WebPanel9.ElementClassName := 'block_top';\r\n WebPanel9.HeightStyle := ssAuto;\r\n WebPanel9.Align := alTop;\r\n WebPanel9.BorderStyle := bsNone;\r\n WebPanel9.ChildOrder := 2;\r\n WebPanel9.Color := clWhite;\r\n WebPanel9.DragMode := dmAutomatic;\r\n WebPanel9.ElementFont := efCSS;\r\n WebPanel9.TabOrder := 0;\r\n SetEvent(WebPanel9, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel9, Self, 'OnMouseMove', 'WebPanel32MouseMove');\r\n SetEvent(WebPanel9, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(WebPanel9, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel26.SetParentComponent(WebPanel9);\r\n WebLabel26.Name := 'WebLabel26';\r\n WebLabel26.Left := 24;\r\n WebLabel26.Top := 0;\r\n WebLabel26.Width := 37;\r\n WebLabel26.Height := 17;\r\n WebLabel26.Cursor := crHandPoint;\r\n WebLabel26.Align := alLeft;\r\n WebLabel26.Caption := 'Title6';\r\n WebLabel26.DragMode := dmAutomatic;\r\n WebLabel26.ElementClassName := 'block_title';\r\n WebLabel26.ElementFont := efCSS;\r\n WebLabel26.Font.Charset := ANSI_CHARSET;\r\n WebLabel26.Font.Color := clNavy;\r\n WebLabel26.Font.Height := -13;\r\n WebLabel26.Font.Name := 'Segoe UI Emoji';\r\n WebLabel26.Font.Style := [fsBold];\r\n WebLabel26.HeightPercent := 100.000000000000000000;\r\n WebLabel26.ParentFont := False;\r\n WebLabel26.WidthStyle := ssAuto;\r\n WebLabel26.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel26, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel26, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel26, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(WebLabel26, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton20.SetParentComponent(WebPanel9);\r\n WebSpeedButton20.Name := 'WebSpeedButton20';\r\n WebSpeedButton20.Left := 0;\r\n WebSpeedButton20.Top := 0;\r\n WebSpeedButton20.Width := 24;\r\n WebSpeedButton20.Height := 28;\r\n WebSpeedButton20.Cursor := crHandPoint;\r\n WebSpeedButton20.Hint := 'Edit';\r\n WebSpeedButton20.Align := alLeft;\r\n WebSpeedButton20.Color := clNone;\r\n WebSpeedButton20.Flat := True;\r\n WebSpeedButton20.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton20.MaterialGlyph := 'edit';\r\n WebSpeedButton20.TabOrder := 0;\r\n WebSpeedButton20.Visible := False;\r\n WebSpeedButton20.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton20, Self, 'OnClick', '_BlockCallPickForm');\r\n SM6.SetParentComponent(sb6);\r\n SM6.Name := 'SM6';\r\n SM6.Left := 0;\r\n SM6.Top := 53;\r\n SM6.Width := 300;\r\n SM6.Height := 12;\r\n SM6.Align := alBottom;\r\n SM6.BorderStyle := bsNone;\r\n SM6.ElementClassName := 'block_memo';\r\n SM6.ElementFont := efCSS;\r\n SM6.Font.Charset := ANSI_CHARSET;\r\n SM6.Font.Color := clBlack;\r\n SM6.Font.Height := -13;\r\n SM6.Font.Name := 'Tahoma';\r\n SM6.Font.Style := [];\r\n SM6.HeightPercent := 100.000000000000000000;\r\n SM6.ParentFont := False;\r\n SM6.SelLength := 0;\r\n SM6.SelStart := 0;\r\n SM6.ShowFocus := False;\r\n SM6.WidthPercent := 100.000000000000000000;\r\n SetEvent(SM6, Self, 'OnChange', 'M21Change');\r\n SetEvent(SM6, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(SM6, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(SM6, Self, 'OnExit', 'M1Exit');\r\n SetEvent(SM6, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(SM6, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(SM6, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer36.SetParentComponent(sb6);\r\n WebHTMLContainer36.Name := 'WebHTMLContainer36';\r\n WebHTMLContainer36.Left := 0;\r\n WebHTMLContainer36.Top := 38;\r\n WebHTMLContainer36.Width := 300;\r\n WebHTMLContainer36.Height := 15;\r\n WebHTMLContainer36.HeightStyle := ssAuto;\r\n WebHTMLContainer36.Align := alBottom;\r\n WebHTMLContainer36.ChildOrder := 2;\r\n WebHTMLContainer36.Visible := False;\r\n SetEvent(WebHTMLContainer36, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer36, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(WebHTMLContainer36, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n sb5.SetParentComponent(sbSideData);\r\n sb5.Name := 'sb5';\r\n sb5.Left := 6;\r\n sb5.Top := 260;\r\n sb5.Width := 300;\r\n sb5.Height := 65;\r\n sb5.ElementClassName := 'data_block';\r\n sb5.BorderColor := clWhite;\r\n sb5.ChildOrder := 4;\r\n sb5.Color := clWhite;\r\n sb5.ElementFont := efCSS;\r\n sb5.Font.Charset := ANSI_CHARSET;\r\n sb5.Font.Color := clBlack;\r\n sb5.Font.Height := -13;\r\n sb5.Font.Name := 'Tahoma';\r\n sb5.Font.Style := [];\r\n sb5.ParentFont := False;\r\n sb5.TabOrder := 1;\r\n SetEvent(sb5, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(sb5, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel12.SetParentComponent(sb5);\r\n WebPanel12.Name := 'WebPanel12';\r\n WebPanel12.Left := 0;\r\n WebPanel12.Top := 0;\r\n WebPanel12.Width := 300;\r\n WebPanel12.Height := 28;\r\n WebPanel12.ElementClassName := 'block_top';\r\n WebPanel12.HeightStyle := ssAuto;\r\n WebPanel12.Align := alTop;\r\n WebPanel12.BorderStyle := bsNone;\r\n WebPanel12.ChildOrder := 2;\r\n WebPanel12.Color := clWhite;\r\n WebPanel12.DragMode := dmAutomatic;\r\n WebPanel12.ElementFont := efCSS;\r\n WebPanel12.TabOrder := 0;\r\n SetEvent(WebPanel12, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel12, Self, 'OnMouseMove', 'WebPanel32MouseMove');\r\n SetEvent(WebPanel12, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(WebPanel12, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel27.SetParentComponent(WebPanel12);\r\n WebLabel27.Name := 'WebLabel27';\r\n WebLabel27.Left := 24;\r\n WebLabel27.Top := 0;\r\n WebLabel27.Width := 37;\r\n WebLabel27.Height := 17;\r\n WebLabel27.Cursor := crHandPoint;\r\n WebLabel27.Align := alLeft;\r\n WebLabel27.Caption := 'Title5';\r\n WebLabel27.DragMode := dmAutomatic;\r\n WebLabel27.ElementClassName := 'block_title';\r\n WebLabel27.ElementFont := efCSS;\r\n WebLabel27.Font.Charset := ANSI_CHARSET;\r\n WebLabel27.Font.Color := clNavy;\r\n WebLabel27.Font.Height := -13;\r\n WebLabel27.Font.Name := 'Segoe UI Emoji';\r\n WebLabel27.Font.Style := [fsBold];\r\n WebLabel27.HeightPercent := 100.000000000000000000;\r\n WebLabel27.ParentFont := False;\r\n WebLabel27.WidthStyle := ssAuto;\r\n WebLabel27.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel27, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel27, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel27, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(WebLabel27, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton21.SetParentComponent(WebPanel12);\r\n WebSpeedButton21.Name := 'WebSpeedButton21';\r\n WebSpeedButton21.Left := 0;\r\n WebSpeedButton21.Top := 0;\r\n WebSpeedButton21.Width := 24;\r\n WebSpeedButton21.Height := 28;\r\n WebSpeedButton21.Cursor := crHandPoint;\r\n WebSpeedButton21.Hint := 'Edit';\r\n WebSpeedButton21.Align := alLeft;\r\n WebSpeedButton21.Color := clNone;\r\n WebSpeedButton21.Flat := True;\r\n WebSpeedButton21.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton21.MaterialGlyph := 'edit';\r\n WebSpeedButton21.TabOrder := 0;\r\n WebSpeedButton21.Visible := False;\r\n WebSpeedButton21.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton21, Self, 'OnClick', '_BlockCallPickForm');\r\n SM5.SetParentComponent(sb5);\r\n SM5.Name := 'SM5';\r\n SM5.Left := 0;\r\n SM5.Top := 53;\r\n SM5.Width := 300;\r\n SM5.Height := 12;\r\n SM5.Align := alBottom;\r\n SM5.BorderStyle := bsNone;\r\n SM5.ElementClassName := 'block_memo';\r\n SM5.ElementFont := efCSS;\r\n SM5.Font.Charset := ANSI_CHARSET;\r\n SM5.Font.Color := clBlack;\r\n SM5.Font.Height := -13;\r\n SM5.Font.Name := 'Tahoma';\r\n SM5.Font.Style := [];\r\n SM5.HeightPercent := 100.000000000000000000;\r\n SM5.ParentFont := False;\r\n SM5.SelLength := 0;\r\n SM5.SelStart := 0;\r\n SM5.ShowFocus := False;\r\n SM5.WidthPercent := 100.000000000000000000;\r\n SetEvent(SM5, Self, 'OnChange', 'M21Change');\r\n SetEvent(SM5, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(SM5, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(SM5, Self, 'OnExit', 'M1Exit');\r\n SetEvent(SM5, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(SM5, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(SM5, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer35.SetParentComponent(sb5);\r\n WebHTMLContainer35.Name := 'WebHTMLContainer35';\r\n WebHTMLContainer35.Left := 0;\r\n WebHTMLContainer35.Top := 38;\r\n WebHTMLContainer35.Width := 300;\r\n WebHTMLContainer35.Height := 15;\r\n WebHTMLContainer35.HeightStyle := ssAuto;\r\n WebHTMLContainer35.Align := alBottom;\r\n WebHTMLContainer35.ChildOrder := 2;\r\n WebHTMLContainer35.Visible := False;\r\n SetEvent(WebHTMLContainer35, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer35, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(WebHTMLContainer35, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n sb4.SetParentComponent(sbSideData);\r\n sb4.Name := 'sb4';\r\n sb4.Left := 6;\r\n sb4.Top := 195;\r\n sb4.Width := 300;\r\n sb4.Height := 65;\r\n sb4.ElementClassName := 'data_block';\r\n sb4.BorderColor := clWhite;\r\n sb4.ChildOrder := 3;\r\n sb4.Color := clWhite;\r\n sb4.ElementFont := efCSS;\r\n sb4.Font.Charset := ANSI_CHARSET;\r\n sb4.Font.Color := clBlack;\r\n sb4.Font.Height := -13;\r\n sb4.Font.Name := 'Tahoma';\r\n sb4.Font.Style := [];\r\n sb4.ParentFont := False;\r\n sb4.TabOrder := 2;\r\n SetEvent(sb4, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(sb4, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel22.SetParentComponent(sb4);\r\n WebPanel22.Name := 'WebPanel22';\r\n WebPanel22.Left := 0;\r\n WebPanel22.Top := 0;\r\n WebPanel22.Width := 300;\r\n WebPanel22.Height := 28;\r\n WebPanel22.ElementClassName := 'block_top';\r\n WebPanel22.HeightStyle := ssAuto;\r\n WebPanel22.Align := alTop;\r\n WebPanel22.BorderStyle := bsNone;\r\n WebPanel22.ChildOrder := 2;\r\n WebPanel22.Color := clWhite;\r\n WebPanel22.DragMode := dmAutomatic;\r\n WebPanel22.ElementFont := efCSS;\r\n WebPanel22.TabOrder := 0;\r\n SetEvent(WebPanel22, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel22, Self, 'OnMouseMove', 'WebPanel32MouseMove');\r\n SetEvent(WebPanel22, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(WebPanel22, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel28.SetParentComponent(WebPanel22);\r\n WebLabel28.Name := 'WebLabel28';\r\n WebLabel28.Left := 24;\r\n WebLabel28.Top := 0;\r\n WebLabel28.Width := 37;\r\n WebLabel28.Height := 17;\r\n WebLabel28.Cursor := crHandPoint;\r\n WebLabel28.Align := alLeft;\r\n WebLabel28.Caption := 'Title4';\r\n WebLabel28.DragMode := dmAutomatic;\r\n WebLabel28.ElementClassName := 'block_title';\r\n WebLabel28.ElementFont := efCSS;\r\n WebLabel28.Font.Charset := ANSI_CHARSET;\r\n WebLabel28.Font.Color := clNavy;\r\n WebLabel28.Font.Height := -13;\r\n WebLabel28.Font.Name := 'Segoe UI Emoji';\r\n WebLabel28.Font.Style := [fsBold];\r\n WebLabel28.HeightPercent := 100.000000000000000000;\r\n WebLabel28.ParentFont := False;\r\n WebLabel28.WidthStyle := ssAuto;\r\n WebLabel28.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel28, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel28, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel28, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(WebLabel28, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton22.SetParentComponent(WebPanel22);\r\n WebSpeedButton22.Name := 'WebSpeedButton22';\r\n WebSpeedButton22.Left := 0;\r\n WebSpeedButton22.Top := 0;\r\n WebSpeedButton22.Width := 24;\r\n WebSpeedButton22.Height := 28;\r\n WebSpeedButton22.Cursor := crHandPoint;\r\n WebSpeedButton22.Hint := 'Edit';\r\n WebSpeedButton22.Align := alLeft;\r\n WebSpeedButton22.Color := clNone;\r\n WebSpeedButton22.Flat := True;\r\n WebSpeedButton22.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton22.MaterialGlyph := 'edit';\r\n WebSpeedButton22.TabOrder := 0;\r\n WebSpeedButton22.Visible := False;\r\n WebSpeedButton22.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton22, Self, 'OnClick', '_BlockCallPickForm');\r\n SM4.SetParentComponent(sb4);\r\n SM4.Name := 'SM4';\r\n SM4.Left := 0;\r\n SM4.Top := 53;\r\n SM4.Width := 300;\r\n SM4.Height := 12;\r\n SM4.Align := alBottom;\r\n SM4.BorderStyle := bsNone;\r\n SM4.ElementClassName := 'block_memo';\r\n SM4.ElementFont := efCSS;\r\n SM4.Font.Charset := ANSI_CHARSET;\r\n SM4.Font.Color := clBlack;\r\n SM4.Font.Height := -13;\r\n SM4.Font.Name := 'Tahoma';\r\n SM4.Font.Style := [];\r\n SM4.HeightPercent := 100.000000000000000000;\r\n SM4.ParentFont := False;\r\n SM4.SelLength := 0;\r\n SM4.SelStart := 0;\r\n SM4.ShowFocus := False;\r\n SM4.WidthPercent := 100.000000000000000000;\r\n SetEvent(SM4, Self, 'OnChange', 'M21Change');\r\n SetEvent(SM4, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(SM4, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(SM4, Self, 'OnExit', 'M1Exit');\r\n SetEvent(SM4, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(SM4, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(SM4, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer34.SetParentComponent(sb4);\r\n WebHTMLContainer34.Name := 'WebHTMLContainer34';\r\n WebHTMLContainer34.Left := 0;\r\n WebHTMLContainer34.Top := 38;\r\n WebHTMLContainer34.Width := 300;\r\n WebHTMLContainer34.Height := 15;\r\n WebHTMLContainer34.HeightStyle := ssAuto;\r\n WebHTMLContainer34.Align := alBottom;\r\n WebHTMLContainer34.ChildOrder := 2;\r\n WebHTMLContainer34.Visible := False;\r\n SetEvent(WebHTMLContainer34, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer34, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(WebHTMLContainer34, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n sb3.SetParentComponent(sbSideData);\r\n sb3.Name := 'sb3';\r\n sb3.Left := 6;\r\n sb3.Top := 130;\r\n sb3.Width := 300;\r\n sb3.Height := 65;\r\n sb3.ElementClassName := 'data_block';\r\n sb3.BorderColor := clWhite;\r\n sb3.ChildOrder := 2;\r\n sb3.Color := clWhite;\r\n sb3.ElementFont := efCSS;\r\n sb3.Font.Charset := ANSI_CHARSET;\r\n sb3.Font.Color := clBlack;\r\n sb3.Font.Height := -13;\r\n sb3.Font.Name := 'Tahoma';\r\n sb3.Font.Style := [];\r\n sb3.ParentFont := False;\r\n sb3.TabOrder := 3;\r\n SetEvent(sb3, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(sb3, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel25.SetParentComponent(sb3);\r\n WebPanel25.Name := 'WebPanel25';\r\n WebPanel25.Left := 0;\r\n WebPanel25.Top := 0;\r\n WebPanel25.Width := 300;\r\n WebPanel25.Height := 28;\r\n WebPanel25.ElementClassName := 'block_top';\r\n WebPanel25.HeightStyle := ssAuto;\r\n WebPanel25.Align := alTop;\r\n WebPanel25.BorderStyle := bsNone;\r\n WebPanel25.ChildOrder := 2;\r\n WebPanel25.Color := clWhite;\r\n WebPanel25.DragMode := dmAutomatic;\r\n WebPanel25.ElementFont := efCSS;\r\n WebPanel25.TabOrder := 0;\r\n SetEvent(WebPanel25, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel25, Self, 'OnMouseMove', 'WebPanel32MouseMove');\r\n SetEvent(WebPanel25, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(WebPanel25, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel29.SetParentComponent(WebPanel25);\r\n WebLabel29.Name := 'WebLabel29';\r\n WebLabel29.Left := 24;\r\n WebLabel29.Top := 0;\r\n WebLabel29.Width := 37;\r\n WebLabel29.Height := 17;\r\n WebLabel29.Cursor := crHandPoint;\r\n WebLabel29.Align := alLeft;\r\n WebLabel29.Caption := 'Title3';\r\n WebLabel29.DragMode := dmAutomatic;\r\n WebLabel29.ElementClassName := 'block_title';\r\n WebLabel29.ElementFont := efCSS;\r\n WebLabel29.Font.Charset := ANSI_CHARSET;\r\n WebLabel29.Font.Color := clNavy;\r\n WebLabel29.Font.Height := -13;\r\n WebLabel29.Font.Name := 'Segoe UI Emoji';\r\n WebLabel29.Font.Style := [fsBold];\r\n WebLabel29.HeightPercent := 100.000000000000000000;\r\n WebLabel29.ParentFont := False;\r\n WebLabel29.WidthStyle := ssAuto;\r\n WebLabel29.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel29, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel29, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel29, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(WebLabel29, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton23.SetParentComponent(WebPanel25);\r\n WebSpeedButton23.Name := 'WebSpeedButton23';\r\n WebSpeedButton23.Left := 0;\r\n WebSpeedButton23.Top := 0;\r\n WebSpeedButton23.Width := 24;\r\n WebSpeedButton23.Height := 28;\r\n WebSpeedButton23.Cursor := crHandPoint;\r\n WebSpeedButton23.Hint := 'Edit';\r\n WebSpeedButton23.Align := alLeft;\r\n WebSpeedButton23.Color := clNone;\r\n WebSpeedButton23.Flat := True;\r\n WebSpeedButton23.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton23.MaterialGlyph := 'edit';\r\n WebSpeedButton23.TabOrder := 0;\r\n WebSpeedButton23.Visible := False;\r\n WebSpeedButton23.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton23, Self, 'OnClick', '_BlockCallPickForm');\r\n SM3.SetParentComponent(sb3);\r\n SM3.Name := 'SM3';\r\n SM3.Left := 0;\r\n SM3.Top := 53;\r\n SM3.Width := 300;\r\n SM3.Height := 12;\r\n SM3.Align := alBottom;\r\n SM3.BorderStyle := bsNone;\r\n SM3.ElementClassName := 'block_memo';\r\n SM3.ElementFont := efCSS;\r\n SM3.Font.Charset := ANSI_CHARSET;\r\n SM3.Font.Color := clBlack;\r\n SM3.Font.Height := -13;\r\n SM3.Font.Name := 'Tahoma';\r\n SM3.Font.Style := [];\r\n SM3.HeightPercent := 100.000000000000000000;\r\n SM3.ParentFont := False;\r\n SM3.SelLength := 0;\r\n SM3.SelStart := 0;\r\n SM3.ShowFocus := False;\r\n SM3.WidthPercent := 100.000000000000000000;\r\n SetEvent(SM3, Self, 'OnChange', 'M21Change');\r\n SetEvent(SM3, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(SM3, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(SM3, Self, 'OnExit', 'M1Exit');\r\n SetEvent(SM3, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(SM3, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(SM3, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer33.SetParentComponent(sb3);\r\n WebHTMLContainer33.Name := 'WebHTMLContainer33';\r\n WebHTMLContainer33.Left := 0;\r\n WebHTMLContainer33.Top := 38;\r\n WebHTMLContainer33.Width := 300;\r\n WebHTMLContainer33.Height := 15;\r\n WebHTMLContainer33.HeightStyle := ssAuto;\r\n WebHTMLContainer33.Align := alBottom;\r\n WebHTMLContainer33.ChildOrder := 2;\r\n WebHTMLContainer33.Visible := False;\r\n SetEvent(WebHTMLContainer33, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer33, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(WebHTMLContainer33, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n sb2.SetParentComponent(sbSideData);\r\n sb2.Name := 'sb2';\r\n sb2.Left := 6;\r\n sb2.Top := 65;\r\n sb2.Width := 300;\r\n sb2.Height := 65;\r\n sb2.ElementClassName := 'data_block';\r\n sb2.BorderColor := clWhite;\r\n sb2.ChildOrder := 1;\r\n sb2.Color := clWhite;\r\n sb2.ElementFont := efCSS;\r\n sb2.Font.Charset := ANSI_CHARSET;\r\n sb2.Font.Color := clBlack;\r\n sb2.Font.Height := -13;\r\n sb2.Font.Name := 'Tahoma';\r\n sb2.Font.Style := [];\r\n sb2.ParentFont := False;\r\n sb2.TabOrder := 4;\r\n SetEvent(sb2, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(sb2, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel30.SetParentComponent(sb2);\r\n WebPanel30.Name := 'WebPanel30';\r\n WebPanel30.Left := 0;\r\n WebPanel30.Top := 0;\r\n WebPanel30.Width := 300;\r\n WebPanel30.Height := 28;\r\n WebPanel30.ElementClassName := 'block_top';\r\n WebPanel30.HeightStyle := ssAuto;\r\n WebPanel30.Align := alTop;\r\n WebPanel30.BorderStyle := bsNone;\r\n WebPanel30.ChildOrder := 2;\r\n WebPanel30.Color := clWhite;\r\n WebPanel30.DragMode := dmAutomatic;\r\n WebPanel30.ElementFont := efCSS;\r\n WebPanel30.TabOrder := 0;\r\n SetEvent(WebPanel30, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel30, Self, 'OnMouseMove', 'WebPanel32MouseMove');\r\n SetEvent(WebPanel30, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(WebPanel30, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel30.SetParentComponent(WebPanel30);\r\n WebLabel30.Name := 'WebLabel30';\r\n WebLabel30.Left := 24;\r\n WebLabel30.Top := 0;\r\n WebLabel30.Width := 37;\r\n WebLabel30.Height := 17;\r\n WebLabel30.Cursor := crHandPoint;\r\n WebLabel30.Align := alLeft;\r\n WebLabel30.Caption := 'Title2';\r\n WebLabel30.DragMode := dmAutomatic;\r\n WebLabel30.ElementClassName := 'block_title';\r\n WebLabel30.ElementFont := efCSS;\r\n WebLabel30.Font.Charset := ANSI_CHARSET;\r\n WebLabel30.Font.Color := clNavy;\r\n WebLabel30.Font.Height := -13;\r\n WebLabel30.Font.Name := 'Segoe UI Emoji';\r\n WebLabel30.Font.Style := [fsBold];\r\n WebLabel30.HeightPercent := 100.000000000000000000;\r\n WebLabel30.ParentFont := False;\r\n WebLabel30.WidthStyle := ssAuto;\r\n WebLabel30.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel30, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel30, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel30, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(WebLabel30, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton24.SetParentComponent(WebPanel30);\r\n WebSpeedButton24.Name := 'WebSpeedButton24';\r\n WebSpeedButton24.Left := 0;\r\n WebSpeedButton24.Top := 0;\r\n WebSpeedButton24.Width := 24;\r\n WebSpeedButton24.Height := 28;\r\n WebSpeedButton24.Cursor := crHandPoint;\r\n WebSpeedButton24.Hint := 'Edit';\r\n WebSpeedButton24.Align := alLeft;\r\n WebSpeedButton24.Color := clNone;\r\n WebSpeedButton24.Flat := True;\r\n WebSpeedButton24.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton24.MaterialGlyph := 'edit';\r\n WebSpeedButton24.TabOrder := 0;\r\n WebSpeedButton24.Visible := False;\r\n WebSpeedButton24.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton24, Self, 'OnClick', '_BlockCallPickForm');\r\n SM2.SetParentComponent(sb2);\r\n SM2.Name := 'SM2';\r\n SM2.Left := 0;\r\n SM2.Top := 53;\r\n SM2.Width := 300;\r\n SM2.Height := 12;\r\n SM2.Align := alBottom;\r\n SM2.BorderStyle := bsNone;\r\n SM2.ElementClassName := 'block_memo';\r\n SM2.ElementFont := efCSS;\r\n SM2.Font.Charset := ANSI_CHARSET;\r\n SM2.Font.Color := clBlack;\r\n SM2.Font.Height := -13;\r\n SM2.Font.Name := 'Tahoma';\r\n SM2.Font.Style := [];\r\n SM2.HeightPercent := 100.000000000000000000;\r\n SM2.ParentFont := False;\r\n SM2.SelLength := 0;\r\n SM2.SelStart := 0;\r\n SM2.ShowFocus := False;\r\n SM2.WidthPercent := 100.000000000000000000;\r\n SetEvent(SM2, Self, 'OnChange', 'M21Change');\r\n SetEvent(SM2, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(SM2, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(SM2, Self, 'OnExit', 'M1Exit');\r\n SetEvent(SM2, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(SM2, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(SM2, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer32.SetParentComponent(sb2);\r\n WebHTMLContainer32.Name := 'WebHTMLContainer32';\r\n WebHTMLContainer32.Left := 0;\r\n WebHTMLContainer32.Top := 38;\r\n WebHTMLContainer32.Width := 300;\r\n WebHTMLContainer32.Height := 15;\r\n WebHTMLContainer32.HeightStyle := ssAuto;\r\n WebHTMLContainer32.Align := alBottom;\r\n WebHTMLContainer32.ChildOrder := 2;\r\n WebHTMLContainer32.Visible := False;\r\n SetEvent(WebHTMLContainer32, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer32, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(WebHTMLContainer32, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n sb1.SetParentComponent(sbSideData);\r\n sb1.Name := 'sb1';\r\n sb1.Left := 6;\r\n sb1.Top := 6;\r\n sb1.Width := 300;\r\n sb1.Height := 65;\r\n sb1.ElementClassName := 'data_block';\r\n sb1.BorderColor := clWhite;\r\n sb1.ChildOrder := 6;\r\n sb1.Color := clWhite;\r\n sb1.ElementFont := efCSS;\r\n sb1.Font.Charset := ANSI_CHARSET;\r\n sb1.Font.Color := clBlack;\r\n sb1.Font.Height := -13;\r\n sb1.Font.Name := 'Tahoma';\r\n sb1.Font.Style := [];\r\n sb1.ParentFont := False;\r\n sb1.TabOrder := 5;\r\n SetEvent(sb1, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(sb1, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel32.SetParentComponent(sb1);\r\n WebPanel32.Name := 'WebPanel32';\r\n WebPanel32.Left := 0;\r\n WebPanel32.Top := 0;\r\n WebPanel32.Width := 300;\r\n WebPanel32.Height := 28;\r\n WebPanel32.ElementClassName := 'block_top';\r\n WebPanel32.HeightStyle := ssAuto;\r\n WebPanel32.Align := alTop;\r\n WebPanel32.BorderStyle := bsNone;\r\n WebPanel32.ChildOrder := 2;\r\n WebPanel32.Color := clWhite;\r\n WebPanel32.DragMode := dmAutomatic;\r\n WebPanel32.ElementFont := efCSS;\r\n WebPanel32.TabOrder := 0;\r\n SetEvent(WebPanel32, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel32, Self, 'OnMouseMove', 'WebPanel32MouseMove');\r\n SetEvent(WebPanel32, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(WebPanel32, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel31.SetParentComponent(WebPanel32);\r\n WebLabel31.Name := 'WebLabel31';\r\n WebLabel31.Left := 24;\r\n WebLabel31.Top := 0;\r\n WebLabel31.Width := 37;\r\n WebLabel31.Height := 17;\r\n WebLabel31.Cursor := crHandPoint;\r\n WebLabel31.Align := alLeft;\r\n WebLabel31.Caption := 'Title1';\r\n WebLabel31.DragMode := dmAutomatic;\r\n WebLabel31.ElementClassName := 'block_title';\r\n WebLabel31.ElementFont := efCSS;\r\n WebLabel31.Font.Charset := ANSI_CHARSET;\r\n WebLabel31.Font.Color := clNavy;\r\n WebLabel31.Font.Height := -13;\r\n WebLabel31.Font.Name := 'Segoe UI Emoji';\r\n WebLabel31.Font.Style := [fsBold];\r\n WebLabel31.HeightPercent := 100.000000000000000000;\r\n WebLabel31.ParentFont := False;\r\n WebLabel31.WidthStyle := ssAuto;\r\n WebLabel31.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel31, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel31, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel31, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(WebLabel31, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton25.SetParentComponent(WebPanel32);\r\n WebSpeedButton25.Name := 'WebSpeedButton25';\r\n WebSpeedButton25.Left := 0;\r\n WebSpeedButton25.Top := 0;\r\n WebSpeedButton25.Width := 24;\r\n WebSpeedButton25.Height := 28;\r\n WebSpeedButton25.Cursor := crHandPoint;\r\n WebSpeedButton25.Hint := 'Edit';\r\n WebSpeedButton25.Align := alLeft;\r\n WebSpeedButton25.Color := clNone;\r\n WebSpeedButton25.Flat := True;\r\n WebSpeedButton25.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton25.MaterialGlyph := 'edit';\r\n WebSpeedButton25.TabOrder := 0;\r\n WebSpeedButton25.Visible := False;\r\n WebSpeedButton25.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton25, Self, 'OnClick', '_BlockCallPickForm');\r\n SM1.SetParentComponent(sb1);\r\n SM1.Name := 'SM1';\r\n SM1.Left := 0;\r\n SM1.Top := 53;\r\n SM1.Width := 300;\r\n SM1.Height := 12;\r\n SM1.Align := alBottom;\r\n SM1.BorderStyle := bsNone;\r\n SM1.ElementClassName := 'block_memo';\r\n SM1.ElementFont := efCSS;\r\n SM1.Font.Charset := ANSI_CHARSET;\r\n SM1.Font.Color := clBlack;\r\n SM1.Font.Height := -13;\r\n SM1.Font.Name := 'Tahoma';\r\n SM1.Font.Style := [];\r\n SM1.HeightPercent := 100.000000000000000000;\r\n SM1.ParentFont := False;\r\n SM1.SelLength := 0;\r\n SM1.SelStart := 0;\r\n SM1.ShowFocus := False;\r\n SM1.WidthPercent := 100.000000000000000000;\r\n SetEvent(SM1, Self, 'OnChange', 'M21Change');\r\n SetEvent(SM1, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(SM1, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(SM1, Self, 'OnExit', 'M1Exit');\r\n SetEvent(SM1, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(SM1, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(SM1, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer31.SetParentComponent(sb1);\r\n WebHTMLContainer31.Name := 'WebHTMLContainer31';\r\n WebHTMLContainer31.Left := 0;\r\n WebHTMLContainer31.Top := 38;\r\n WebHTMLContainer31.Width := 300;\r\n WebHTMLContainer31.Height := 15;\r\n WebHTMLContainer31.HeightStyle := ssAuto;\r\n WebHTMLContainer31.Align := alBottom;\r\n WebHTMLContainer31.ChildOrder := 2;\r\n WebHTMLContainer31.Visible := False;\r\n SetEvent(WebHTMLContainer31, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer31, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(WebHTMLContainer31, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n sb7.SetParentComponent(sbSideData);\r\n sb7.Name := 'sb7';\r\n sb7.Left := 6;\r\n sb7.Top := 402;\r\n sb7.Width := 300;\r\n sb7.Height := 65;\r\n sb7.ElementClassName := 'data_block';\r\n sb7.BorderColor := clWhite;\r\n sb7.ChildOrder := 6;\r\n sb7.Color := clWhite;\r\n sb7.ElementFont := efCSS;\r\n sb7.Font.Charset := ANSI_CHARSET;\r\n sb7.Font.Color := clBlack;\r\n sb7.Font.Height := -13;\r\n sb7.Font.Name := 'Tahoma';\r\n sb7.Font.Style := [];\r\n sb7.ParentFont := False;\r\n sb7.TabOrder := 6;\r\n SetEvent(sb7, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(sb7, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel34.SetParentComponent(sb7);\r\n WebPanel34.Name := 'WebPanel34';\r\n WebPanel34.Left := 0;\r\n WebPanel34.Top := 0;\r\n WebPanel34.Width := 300;\r\n WebPanel34.Height := 28;\r\n WebPanel34.ElementClassName := 'block_top';\r\n WebPanel34.HeightStyle := ssAuto;\r\n WebPanel34.Align := alTop;\r\n WebPanel34.BorderStyle := bsNone;\r\n WebPanel34.ChildOrder := 2;\r\n WebPanel34.Color := clWhite;\r\n WebPanel34.DragMode := dmAutomatic;\r\n WebPanel34.ElementFont := efCSS;\r\n WebPanel34.TabOrder := 0;\r\n SetEvent(WebPanel34, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel34, Self, 'OnMouseMove', 'WebPanel32MouseMove');\r\n SetEvent(WebPanel34, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(WebPanel34, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel32.SetParentComponent(WebPanel34);\r\n WebLabel32.Name := 'WebLabel32';\r\n WebLabel32.Left := 24;\r\n WebLabel32.Top := 0;\r\n WebLabel32.Width := 37;\r\n WebLabel32.Height := 17;\r\n WebLabel32.Cursor := crHandPoint;\r\n WebLabel32.Align := alLeft;\r\n WebLabel32.Caption := 'Title7';\r\n WebLabel32.DragMode := dmAutomatic;\r\n WebLabel32.ElementClassName := 'block_title';\r\n WebLabel32.ElementFont := efCSS;\r\n WebLabel32.Font.Charset := ANSI_CHARSET;\r\n WebLabel32.Font.Color := clNavy;\r\n WebLabel32.Font.Height := -13;\r\n WebLabel32.Font.Name := 'Segoe UI Emoji';\r\n WebLabel32.Font.Style := [fsBold];\r\n WebLabel32.HeightPercent := 100.000000000000000000;\r\n WebLabel32.ParentFont := False;\r\n WebLabel32.WidthStyle := ssAuto;\r\n WebLabel32.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel32, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel32, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel32, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(WebLabel32, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton26.SetParentComponent(WebPanel34);\r\n WebSpeedButton26.Name := 'WebSpeedButton26';\r\n WebSpeedButton26.Left := 0;\r\n WebSpeedButton26.Top := 0;\r\n WebSpeedButton26.Width := 24;\r\n WebSpeedButton26.Height := 28;\r\n WebSpeedButton26.Cursor := crHandPoint;\r\n WebSpeedButton26.Hint := 'Edit';\r\n WebSpeedButton26.Align := alLeft;\r\n WebSpeedButton26.Color := clNone;\r\n WebSpeedButton26.Flat := True;\r\n WebSpeedButton26.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton26.MaterialGlyph := 'edit';\r\n WebSpeedButton26.TabOrder := 0;\r\n WebSpeedButton26.Visible := False;\r\n WebSpeedButton26.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton26, Self, 'OnClick', '_BlockCallPickForm');\r\n SM7.SetParentComponent(sb7);\r\n SM7.Name := 'SM7';\r\n SM7.Left := 0;\r\n SM7.Top := 53;\r\n SM7.Width := 300;\r\n SM7.Height := 12;\r\n SM7.Align := alBottom;\r\n SM7.BorderStyle := bsNone;\r\n SM7.ElementClassName := 'block_memo';\r\n SM7.ElementFont := efCSS;\r\n SM7.Font.Charset := ANSI_CHARSET;\r\n SM7.Font.Color := clBlack;\r\n SM7.Font.Height := -13;\r\n SM7.Font.Name := 'Tahoma';\r\n SM7.Font.Style := [];\r\n SM7.HeightPercent := 100.000000000000000000;\r\n SM7.ParentFont := False;\r\n SM7.SelLength := 0;\r\n SM7.SelStart := 0;\r\n SM7.ShowFocus := False;\r\n SM7.WidthPercent := 100.000000000000000000;\r\n SetEvent(SM7, Self, 'OnChange', 'M21Change');\r\n SetEvent(SM7, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(SM7, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(SM7, Self, 'OnExit', 'M1Exit');\r\n SetEvent(SM7, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(SM7, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(SM7, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer37.SetParentComponent(sb7);\r\n WebHTMLContainer37.Name := 'WebHTMLContainer37';\r\n WebHTMLContainer37.Left := 0;\r\n WebHTMLContainer37.Top := 38;\r\n WebHTMLContainer37.Width := 300;\r\n WebHTMLContainer37.Height := 15;\r\n WebHTMLContainer37.HeightStyle := ssAuto;\r\n WebHTMLContainer37.Align := alBottom;\r\n WebHTMLContainer37.ChildOrder := 2;\r\n WebHTMLContainer37.Visible := False;\r\n SetEvent(WebHTMLContainer37, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer37, Self, 'OnDragDrop', '_SideDataBlockDragDrop');\r\n SetEvent(WebHTMLContainer37, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n sb101.SetParentComponent(sbSideData);\r\n sb101.Name := 'sb101';\r\n sb101.Left := 32;\r\n sb101.Top := 473;\r\n sb101.Width := 265;\r\n sb101.Height := 100;\r\n sb101.ElementClassName := 'data_block';\r\n sb101.BorderColor := clWhite;\r\n sb101.ChildOrder := 201;\r\n sb101.Color := clWhite;\r\n sb101.ElementFont := efCSS;\r\n sb101.Font.Charset := ANSI_CHARSET;\r\n sb101.Font.Color := clBlack;\r\n sb101.Font.Height := -13;\r\n sb101.Font.Name := 'Tahoma';\r\n sb101.Font.Style := [fsUnderline];\r\n sb101.ParentFont := False;\r\n sb101.TabOrder := 7;\r\n SetEvent(sb101, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(sb101, Self, 'OnMouseMove', '_GridBlock_MouseMove');\r\n WebPanel10.SetParentComponent(sb101);\r\n WebPanel10.Name := 'WebPanel10';\r\n WebPanel10.Left := 0;\r\n WebPanel10.Top := 0;\r\n WebPanel10.Width := 265;\r\n WebPanel10.Height := 28;\r\n WebPanel10.ElementClassName := 'block_top';\r\n WebPanel10.HeightStyle := ssAuto;\r\n WebPanel10.Align := alTop;\r\n WebPanel10.BorderStyle := bsNone;\r\n WebPanel10.ChildOrder := 2;\r\n WebPanel10.Color := clWhite;\r\n WebPanel10.DragMode := dmAutomatic;\r\n WebPanel10.ElementFont := efCSS;\r\n WebPanel10.TabOrder := 0;\r\n SetEvent(WebPanel10, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel10, Self, 'OnMouseMove', 'WebPanel14MouseMove');\r\n SetEvent(WebPanel10, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel10, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel1.SetParentComponent(WebPanel10);\r\n WebLabel1.Name := 'WebLabel1';\r\n WebLabel1.Left := 24;\r\n WebLabel1.Top := 0;\r\n WebLabel1.Width := 44;\r\n WebLabel1.Height := 26;\r\n WebLabel1.Cursor := crHandPoint;\r\n WebLabel1.Hint := 'Setting Unit';\r\n WebLabel1.Align := alLeft;\r\n WebLabel1.Caption := 'S101';\r\n WebLabel1.DragMode := dmAutomatic;\r\n WebLabel1.ElementClassName := 'block_title';\r\n WebLabel1.ElementLabelClassName := 'block_title';\r\n WebLabel1.ElementFont := efCSS;\r\n WebLabel1.Font.Charset := ANSI_CHARSET;\r\n WebLabel1.Font.Color := clNavy;\r\n WebLabel1.Font.Height := -19;\r\n WebLabel1.Font.Name := 'Segoe UI Emoji';\r\n WebLabel1.Font.Style := [fsBold];\r\n WebLabel1.HeightPercent := 100.000000000000000000;\r\n WebLabel1.ParentFont := False;\r\n WebLabel1.WidthStyle := ssAuto;\r\n WebLabel1.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel1, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel1, Self, 'OnMouseMove', '_GridBlockTitle_MouseMove');\r\n SetEvent(WebLabel1, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel1, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton67.SetParentComponent(WebPanel10);\r\n WebSpeedButton67.Name := 'WebSpeedButton67';\r\n WebSpeedButton67.Left := 0;\r\n WebSpeedButton67.Top := 0;\r\n WebSpeedButton67.Width := 24;\r\n WebSpeedButton67.Height := 28;\r\n WebSpeedButton67.Cursor := crHandPoint;\r\n WebSpeedButton67.Hint := 'Edit';\r\n WebSpeedButton67.Align := alLeft;\r\n WebSpeedButton67.Color := clNone;\r\n WebSpeedButton67.Flat := True;\r\n WebSpeedButton67.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton67.Font.Color := clBlack;\r\n WebSpeedButton67.Font.Height := -13;\r\n WebSpeedButton67.Font.Name := 'Tahoma';\r\n WebSpeedButton67.Font.Style := [];\r\n WebSpeedButton67.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton67.MaterialGlyph := 'edit';\r\n WebSpeedButton67.ParentFont := False;\r\n WebSpeedButton67.ShowHint := True;\r\n WebSpeedButton67.TabOrder := 0;\r\n WebSpeedButton67.Visible := False;\r\n WebSpeedButton67.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton67, Self, 'OnClick', '_BlockCallPickForm');\r\n SG1.SetParentComponent(sb101);\r\n SG1.Name := 'SG1';\r\n SG1.AlignWithMargins := True;\r\n SG1.Left := 3;\r\n SG1.Top := 31;\r\n SG1.Width := 259;\r\n SG1.Height := 59;\r\n SG1.Margins.Bottom := 10;\r\n SG1.Align := alClient;\r\n SG1.BorderStyle := bsNone;\r\n SG1.Columns.Clear;\r\n with SG1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C1';\r\n Title := 'C1';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C2';\r\n Title := 'C2';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C3';\r\n Title := 'C3';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C4';\r\n Title := 'C4';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C5';\r\n Title := 'C5';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C6';\r\n Title := 'C6';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C7';\r\n Title := 'C7';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C8';\r\n Title := 'C8';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C9';\r\n Title := 'C9';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C10';\r\n Title := 'C10';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C11';\r\n Title := 'C11';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C12';\r\n Title := 'C12';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C13';\r\n Title := 'C13';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C15';\r\n Title := 'C15';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C16';\r\n Title := 'C16';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C17';\r\n Title := 'C17';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C18';\r\n Title := 'C18';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C19';\r\n Title := 'C19';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C20';\r\n Title := 'C20';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_NURSE2';\r\n Title := '_CURRENT_NURSE2';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_NURSE1';\r\n Title := '_CURRENT_NURSE1';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_PROVIDER';\r\n Title := '_CURRENT_PROVIDER';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_PROCEDURENUMBER';\r\n Title := '_CURRENT_PROCEDURENUMBER';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_MRN';\r\n Title := '_CURRENT_MRN';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n SG1.DefaultRowHeight := 25;\r\n SG1.FixedFont.Charset := DEFAULT_CHARSET;\r\n SG1.FixedFont.Color := clWindowText;\r\n SG1.FixedFont.Height := -11;\r\n SG1.FixedFont.Name := 'Tahoma';\r\n SG1.FixedFont.Style := [];\r\n SG1.FixedCols := 0;\r\n SG1.Font.Charset := DEFAULT_CHARSET;\r\n SG1.Font.Color := clWindowText;\r\n SG1.Font.Height := -13;\r\n SG1.Font.Name := 'Tahoma';\r\n SG1.Font.Style := [];\r\n SG1.Options := [goFixedVertLine,goColSizing,goEditing,goRowSelect];\r\n SG1.ParentFont := False;\r\n SG1.TabOrder := 1;\r\n SG1.HeightPercent := 100.000000000000000000;\r\n SG1.SelectionColor := 16769217;\r\n SG1.SelectionTextColor := clBlack;\r\n SG1.WidthPercent := 100.000000000000000000;\r\n SetEvent(SG1, Self, 'OnClick', 'G1Click');\r\n SetEvent(SG1, Self, 'OnKeyUp', 'G1KeyUp');\r\n SetEvent(SG1, Self, 'OnMouseMove', 'G1MouseMove');\r\n SG1.ColWidths[0] := 64;\r\n SG1.ColWidths[1] := 64;\r\n SG1.ColWidths[2] := 64;\r\n SG1.ColWidths[3] := 64;\r\n SG1.ColWidths[4] := 64;\r\n SG1.ColWidths[5] := 64;\r\n SG1.ColWidths[6] := 64;\r\n SG1.ColWidths[7] := 64;\r\n SG1.ColWidths[8] := 64;\r\n SG1.ColWidths[9] := 64;\r\n SG1.ColWidths[10] := 64;\r\n SG1.ColWidths[11] := 64;\r\n SG1.ColWidths[12] := 64;\r\n SG1.ColWidths[13] := 64;\r\n SG1.ColWidths[14] := 64;\r\n SG1.ColWidths[15] := 64;\r\n SG1.ColWidths[16] := 64;\r\n SG1.ColWidths[17] := 64;\r\n SG1.ColWidths[18] := 64;\r\n SG1.ColWidths[19] := 64;\r\n SG1.ColWidths[20] := 64;\r\n SG1.ColWidths[21] := 64;\r\n SG1.ColWidths[22] := 64;\r\n SG1.ColWidths[23] := 64;\r\n sb102.SetParentComponent(sbSideData);\r\n sb102.Name := 'sb102';\r\n sb102.Left := 40;\r\n sb102.Top := 604;\r\n sb102.Width := 265;\r\n sb102.Height := 100;\r\n sb102.ElementClassName := 'data_block';\r\n sb102.BorderColor := clWhite;\r\n sb102.ChildOrder := 201;\r\n sb102.Color := clWhite;\r\n sb102.ElementFont := efCSS;\r\n sb102.Font.Charset := ANSI_CHARSET;\r\n sb102.Font.Color := clBlack;\r\n sb102.Font.Height := -13;\r\n sb102.Font.Name := 'Tahoma';\r\n sb102.Font.Style := [fsUnderline];\r\n sb102.ParentFont := False;\r\n sb102.TabOrder := 8;\r\n SetEvent(sb102, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(sb102, Self, 'OnMouseMove', '_GridBlock_MouseMove');\r\n WebPanel23.SetParentComponent(sb102);\r\n WebPanel23.Name := 'WebPanel23';\r\n WebPanel23.Left := 0;\r\n WebPanel23.Top := 0;\r\n WebPanel23.Width := 265;\r\n WebPanel23.Height := 28;\r\n WebPanel23.ElementClassName := 'block_top';\r\n WebPanel23.HeightStyle := ssAuto;\r\n WebPanel23.Align := alTop;\r\n WebPanel23.BorderStyle := bsNone;\r\n WebPanel23.ChildOrder := 2;\r\n WebPanel23.Color := clWhite;\r\n WebPanel23.DragMode := dmAutomatic;\r\n WebPanel23.ElementFont := efCSS;\r\n WebPanel23.TabOrder := 0;\r\n SetEvent(WebPanel23, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel23, Self, 'OnMouseMove', 'WebPanel14MouseMove');\r\n SetEvent(WebPanel23, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel23, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel73.SetParentComponent(WebPanel23);\r\n WebLabel73.Name := 'WebLabel73';\r\n WebLabel73.Left := 24;\r\n WebLabel73.Top := 0;\r\n WebLabel73.Width := 44;\r\n WebLabel73.Height := 26;\r\n WebLabel73.Cursor := crHandPoint;\r\n WebLabel73.Hint := 'Setting Unit';\r\n WebLabel73.Align := alLeft;\r\n WebLabel73.Caption := 'S102';\r\n WebLabel73.DragMode := dmAutomatic;\r\n WebLabel73.ElementClassName := 'block_title';\r\n WebLabel73.ElementLabelClassName := 'block_title';\r\n WebLabel73.ElementFont := efCSS;\r\n WebLabel73.Font.Charset := ANSI_CHARSET;\r\n WebLabel73.Font.Color := clNavy;\r\n WebLabel73.Font.Height := -19;\r\n WebLabel73.Font.Name := 'Segoe UI Emoji';\r\n WebLabel73.Font.Style := [fsBold];\r\n WebLabel73.HeightPercent := 100.000000000000000000;\r\n WebLabel73.ParentFont := False;\r\n WebLabel73.WidthStyle := ssAuto;\r\n WebLabel73.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel73, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel73, Self, 'OnMouseMove', '_GridBlockTitle_MouseMove');\r\n SetEvent(WebLabel73, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel73, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton68.SetParentComponent(WebPanel23);\r\n WebSpeedButton68.Name := 'WebSpeedButton68';\r\n WebSpeedButton68.Left := 0;\r\n WebSpeedButton68.Top := 0;\r\n WebSpeedButton68.Width := 24;\r\n WebSpeedButton68.Height := 28;\r\n WebSpeedButton68.Cursor := crHandPoint;\r\n WebSpeedButton68.Hint := 'Edit';\r\n WebSpeedButton68.Align := alLeft;\r\n WebSpeedButton68.Color := clNone;\r\n WebSpeedButton68.Flat := True;\r\n WebSpeedButton68.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton68.Font.Color := clBlack;\r\n WebSpeedButton68.Font.Height := -13;\r\n WebSpeedButton68.Font.Name := 'Tahoma';\r\n WebSpeedButton68.Font.Style := [];\r\n WebSpeedButton68.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton68.MaterialGlyph := 'edit';\r\n WebSpeedButton68.ParentFont := False;\r\n WebSpeedButton68.ShowHint := True;\r\n WebSpeedButton68.TabOrder := 0;\r\n WebSpeedButton68.Visible := False;\r\n WebSpeedButton68.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton68, Self, 'OnClick', '_BlockCallPickForm');\r\n SG2.SetParentComponent(sb102);\r\n SG2.Name := 'SG2';\r\n SG2.AlignWithMargins := True;\r\n SG2.Left := 3;\r\n SG2.Top := 31;\r\n SG2.Width := 259;\r\n SG2.Height := 59;\r\n SG2.Margins.Bottom := 10;\r\n SG2.Align := alClient;\r\n SG2.BorderStyle := bsNone;\r\n SG2.Columns.Clear;\r\n with SG2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C1';\r\n Title := 'C1';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C2';\r\n Title := 'C2';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C3';\r\n Title := 'C3';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C4';\r\n Title := 'C4';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C5';\r\n Title := 'C5';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C6';\r\n Title := 'C6';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C7';\r\n Title := 'C7';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C8';\r\n Title := 'C8';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C9';\r\n Title := 'C9';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C10';\r\n Title := 'C10';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C11';\r\n Title := 'C11';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C12';\r\n Title := 'C12';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C13';\r\n Title := 'C13';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C15';\r\n Title := 'C15';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C16';\r\n Title := 'C16';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C17';\r\n Title := 'C17';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C18';\r\n Title := 'C18';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C19';\r\n Title := 'C19';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C20';\r\n Title := 'C20';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_NURSE2';\r\n Title := '_CURRENT_NURSE2';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_NURSE1';\r\n Title := '_CURRENT_NURSE1';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_PROVIDER';\r\n Title := '_CURRENT_PROVIDER';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_PROCEDURENUMBER';\r\n Title := '_CURRENT_PROCEDURENUMBER';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_MRN';\r\n Title := '_CURRENT_MRN';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n SG2.DefaultRowHeight := 25;\r\n SG2.FixedFont.Charset := DEFAULT_CHARSET;\r\n SG2.FixedFont.Color := clWindowText;\r\n SG2.FixedFont.Height := -11;\r\n SG2.FixedFont.Name := 'Tahoma';\r\n SG2.FixedFont.Style := [];\r\n SG2.FixedCols := 0;\r\n SG2.Font.Charset := DEFAULT_CHARSET;\r\n SG2.Font.Color := clWindowText;\r\n SG2.Font.Height := -13;\r\n SG2.Font.Name := 'Tahoma';\r\n SG2.Font.Style := [];\r\n SG2.Options := [goFixedVertLine,goColSizing,goEditing,goRowSelect];\r\n SG2.ParentFont := False;\r\n SG2.TabOrder := 1;\r\n SG2.HeightPercent := 100.000000000000000000;\r\n SG2.SelectionColor := 16769217;\r\n SG2.SelectionTextColor := clBlack;\r\n SG2.WidthPercent := 100.000000000000000000;\r\n SetEvent(SG2, Self, 'OnClick', 'G1Click');\r\n SetEvent(SG2, Self, 'OnKeyUp', 'G1KeyUp');\r\n SetEvent(SG2, Self, 'OnMouseMove', 'G1MouseMove');\r\n SG2.ColWidths[0] := 64;\r\n SG2.ColWidths[1] := 64;\r\n SG2.ColWidths[2] := 64;\r\n SG2.ColWidths[3] := 64;\r\n SG2.ColWidths[4] := 64;\r\n SG2.ColWidths[5] := 64;\r\n SG2.ColWidths[6] := 64;\r\n SG2.ColWidths[7] := 64;\r\n SG2.ColWidths[8] := 64;\r\n SG2.ColWidths[9] := 64;\r\n SG2.ColWidths[10] := 64;\r\n SG2.ColWidths[11] := 64;\r\n SG2.ColWidths[12] := 64;\r\n SG2.ColWidths[13] := 64;\r\n SG2.ColWidths[14] := 64;\r\n SG2.ColWidths[15] := 64;\r\n SG2.ColWidths[16] := 64;\r\n SG2.ColWidths[17] := 64;\r\n SG2.ColWidths[18] := 64;\r\n SG2.ColWidths[19] := 64;\r\n SG2.ColWidths[20] := 64;\r\n SG2.ColWidths[21] := 64;\r\n SG2.ColWidths[22] := 64;\r\n SG2.ColWidths[23] := 64;\r\n sb103.SetParentComponent(sbSideData);\r\n sb103.Name := 'sb103';\r\n sb103.Left := 40;\r\n sb103.Top := 712;\r\n sb103.Width := 265;\r\n sb103.Height := 100;\r\n sb103.ElementClassName := 'data_block';\r\n sb103.BorderColor := clWhite;\r\n sb103.ChildOrder := 201;\r\n sb103.Color := clWhite;\r\n sb103.ElementFont := efCSS;\r\n sb103.Font.Charset := ANSI_CHARSET;\r\n sb103.Font.Color := clBlack;\r\n sb103.Font.Height := -13;\r\n sb103.Font.Name := 'Tahoma';\r\n sb103.Font.Style := [fsUnderline];\r\n sb103.ParentFont := False;\r\n sb103.TabOrder := 9;\r\n SetEvent(sb103, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(sb103, Self, 'OnMouseMove', '_GridBlock_MouseMove');\r\n WebPanel35.SetParentComponent(sb103);\r\n WebPanel35.Name := 'WebPanel35';\r\n WebPanel35.Left := 0;\r\n WebPanel35.Top := 0;\r\n WebPanel35.Width := 265;\r\n WebPanel35.Height := 28;\r\n WebPanel35.ElementClassName := 'block_top';\r\n WebPanel35.HeightStyle := ssAuto;\r\n WebPanel35.Align := alTop;\r\n WebPanel35.BorderStyle := bsNone;\r\n WebPanel35.ChildOrder := 2;\r\n WebPanel35.Color := clWhite;\r\n WebPanel35.DragMode := dmAutomatic;\r\n WebPanel35.ElementFont := efCSS;\r\n WebPanel35.TabOrder := 0;\r\n SetEvent(WebPanel35, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel35, Self, 'OnMouseMove', 'WebPanel14MouseMove');\r\n SetEvent(WebPanel35, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel35, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel74.SetParentComponent(WebPanel35);\r\n WebLabel74.Name := 'WebLabel74';\r\n WebLabel74.Left := 24;\r\n WebLabel74.Top := 0;\r\n WebLabel74.Width := 44;\r\n WebLabel74.Height := 26;\r\n WebLabel74.Cursor := crHandPoint;\r\n WebLabel74.Hint := 'Setting Unit';\r\n WebLabel74.Align := alLeft;\r\n WebLabel74.Caption := 'S103';\r\n WebLabel74.DragMode := dmAutomatic;\r\n WebLabel74.ElementClassName := 'block_title';\r\n WebLabel74.ElementLabelClassName := 'block_title';\r\n WebLabel74.ElementFont := efCSS;\r\n WebLabel74.Font.Charset := ANSI_CHARSET;\r\n WebLabel74.Font.Color := clNavy;\r\n WebLabel74.Font.Height := -19;\r\n WebLabel74.Font.Name := 'Segoe UI Emoji';\r\n WebLabel74.Font.Style := [fsBold];\r\n WebLabel74.HeightPercent := 100.000000000000000000;\r\n WebLabel74.ParentFont := False;\r\n WebLabel74.WidthStyle := ssAuto;\r\n WebLabel74.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel74, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel74, Self, 'OnMouseMove', '_GridBlockTitle_MouseMove');\r\n SetEvent(WebLabel74, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel74, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton69.SetParentComponent(WebPanel35);\r\n WebSpeedButton69.Name := 'WebSpeedButton69';\r\n WebSpeedButton69.Left := 0;\r\n WebSpeedButton69.Top := 0;\r\n WebSpeedButton69.Width := 24;\r\n WebSpeedButton69.Height := 28;\r\n WebSpeedButton69.Cursor := crHandPoint;\r\n WebSpeedButton69.Hint := 'Edit';\r\n WebSpeedButton69.Align := alLeft;\r\n WebSpeedButton69.Color := clNone;\r\n WebSpeedButton69.Flat := True;\r\n WebSpeedButton69.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton69.Font.Color := clBlack;\r\n WebSpeedButton69.Font.Height := -13;\r\n WebSpeedButton69.Font.Name := 'Tahoma';\r\n WebSpeedButton69.Font.Style := [];\r\n WebSpeedButton69.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton69.MaterialGlyph := 'edit';\r\n WebSpeedButton69.ParentFont := False;\r\n WebSpeedButton69.ShowHint := True;\r\n WebSpeedButton69.TabOrder := 0;\r\n WebSpeedButton69.Visible := False;\r\n WebSpeedButton69.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton69, Self, 'OnClick', '_BlockCallPickForm');\r\n SG3.SetParentComponent(sb103);\r\n SG3.Name := 'SG3';\r\n SG3.AlignWithMargins := True;\r\n SG3.Left := 3;\r\n SG3.Top := 31;\r\n SG3.Width := 259;\r\n SG3.Height := 59;\r\n SG3.Margins.Bottom := 10;\r\n SG3.Align := alClient;\r\n SG3.BorderStyle := bsNone;\r\n SG3.Columns.Clear;\r\n with SG3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C1';\r\n Title := 'C1';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C2';\r\n Title := 'C2';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C3';\r\n Title := 'C3';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C4';\r\n Title := 'C4';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C5';\r\n Title := 'C5';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C6';\r\n Title := 'C6';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C7';\r\n Title := 'C7';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C8';\r\n Title := 'C8';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C9';\r\n Title := 'C9';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C10';\r\n Title := 'C10';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C11';\r\n Title := 'C11';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C12';\r\n Title := 'C12';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C13';\r\n Title := 'C13';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C15';\r\n Title := 'C15';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C16';\r\n Title := 'C16';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C17';\r\n Title := 'C17';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C18';\r\n Title := 'C18';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C19';\r\n Title := 'C19';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C20';\r\n Title := 'C20';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_NURSE2';\r\n Title := '_CURRENT_NURSE2';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_NURSE1';\r\n Title := '_CURRENT_NURSE1';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_PROVIDER';\r\n Title := '_CURRENT_PROVIDER';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_PROCEDURENUMBER';\r\n Title := '_CURRENT_PROCEDURENUMBER';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_MRN';\r\n Title := '_CURRENT_MRN';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n SG3.DefaultRowHeight := 25;\r\n SG3.FixedFont.Charset := DEFAULT_CHARSET;\r\n SG3.FixedFont.Color := clWindowText;\r\n SG3.FixedFont.Height := -11;\r\n SG3.FixedFont.Name := 'Tahoma';\r\n SG3.FixedFont.Style := [];\r\n SG3.FixedCols := 0;\r\n SG3.Font.Charset := DEFAULT_CHARSET;\r\n SG3.Font.Color := clWindowText;\r\n SG3.Font.Height := -13;\r\n SG3.Font.Name := 'Tahoma';\r\n SG3.Font.Style := [];\r\n SG3.Options := [goFixedVertLine,goColSizing,goEditing,goRowSelect];\r\n SG3.ParentFont := False;\r\n SG3.TabOrder := 1;\r\n SG3.HeightPercent := 100.000000000000000000;\r\n SG3.SelectionColor := 16769217;\r\n SG3.SelectionTextColor := clBlack;\r\n SG3.WidthPercent := 100.000000000000000000;\r\n SetEvent(SG3, Self, 'OnClick', 'G1Click');\r\n SetEvent(SG3, Self, 'OnKeyUp', 'G1KeyUp');\r\n SetEvent(SG3, Self, 'OnMouseMove', 'G1MouseMove');\r\n SG3.ColWidths[0] := 64;\r\n SG3.ColWidths[1] := 64;\r\n SG3.ColWidths[2] := 64;\r\n SG3.ColWidths[3] := 64;\r\n SG3.ColWidths[4] := 64;\r\n SG3.ColWidths[5] := 64;\r\n SG3.ColWidths[6] := 64;\r\n SG3.ColWidths[7] := 64;\r\n SG3.ColWidths[8] := 64;\r\n SG3.ColWidths[9] := 64;\r\n SG3.ColWidths[10] := 64;\r\n SG3.ColWidths[11] := 64;\r\n SG3.ColWidths[12] := 64;\r\n SG3.ColWidths[13] := 64;\r\n SG3.ColWidths[14] := 64;\r\n SG3.ColWidths[15] := 64;\r\n SG3.ColWidths[16] := 64;\r\n SG3.ColWidths[17] := 64;\r\n SG3.ColWidths[18] := 64;\r\n SG3.ColWidths[19] := 64;\r\n SG3.ColWidths[20] := 64;\r\n SG3.ColWidths[21] := 64;\r\n SG3.ColWidths[22] := 64;\r\n SG3.ColWidths[23] := 64;\r\n pnlSUBFORM_DIV.SetParentComponent(Self);\r\n pnlSUBFORM_DIV.Name := 'pnlSUBFORM_DIV';\r\n pnlSUBFORM_DIV.Left := 3;\r\n pnlSUBFORM_DIV.Top := 35;\r\n pnlSUBFORM_DIV.Width := 1120;\r\n pnlSUBFORM_DIV.Height := 898;\r\n pnlSUBFORM_DIV.Align := alClient;\r\n pnlSUBFORM_DIV.BorderColor := clWhite;\r\n pnlSUBFORM_DIV.BorderStyle := bsNone;\r\n pnlSUBFORM_DIV.ChildOrder := 7;\r\n pnlSUBFORM_DIV.Color := clWhite;\r\n pnlSUBFORM_DIV.TabOrder := 4;\r\n pnlDataBlocks.SetParentComponent(pnlSUBFORM_DIV);\r\n pnlDataBlocks.Name := 'pnlDataBlocks';\r\n pnlDataBlocks.Left := 0;\r\n pnlDataBlocks.Top := 0;\r\n pnlDataBlocks.Width := 1120;\r\n pnlDataBlocks.Height := 898;\r\n pnlDataBlocks.Align := alClient;\r\n pnlDataBlocks.BorderColor := clWhite;\r\n pnlDataBlocks.BorderStyle := bsNone;\r\n pnlDataBlocks.ChildOrder := 1;\r\n pnlDataBlocks.Color := clWhite;\r\n pnlDataBlocks.TabOrder := 0;\r\n SubForm_DIV.SetParentComponent(pnlDataBlocks);\r\n SubForm_DIV.Name := 'SubForm_DIV';\r\n SubForm_DIV.Left := 0;\r\n SubForm_DIV.Top := 0;\r\n SubForm_DIV.Width := 1120;\r\n SubForm_DIV.Height := 898;\r\n SubForm_DIV.ElementClassName := 'form_background';\r\n SubForm_DIV.Align := alClient;\r\n SubForm_DIV.BorderStyle := bsNone;\r\n SubForm_DIV.ChildOrder := 2;\r\n SubForm_DIV.Color := clWhite;\r\n SubForm_DIV.ScrollBars := ssVertical;\r\n SubForm_DIV.Visible := False;\r\n SetEvent(SubForm_DIV, Self, 'OnDragDrop', 'SubForm_DIVDragDrop');\r\n SetEvent(SubForm_DIV, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n b26.SetParentComponent(SubForm_DIV);\r\n b26.Name := 'b26';\r\n b26.Left := 57;\r\n b26.Top := 394;\r\n b26.Width := 100;\r\n b26.Height := 80;\r\n b26.ElementClassName := 'data_block';\r\n b26.BorderColor := clWhite;\r\n b26.ChildOrder := 26;\r\n b26.Color := clWhite;\r\n b26.ElementFont := efCSS;\r\n b26.Font.Charset := ANSI_CHARSET;\r\n b26.Font.Color := clBlack;\r\n b26.Font.Height := -13;\r\n b26.Font.Name := 'Tahoma';\r\n b26.Font.Style := [];\r\n b26.ParentFont := False;\r\n b26.TabOrder := 0;\r\n SetEvent(b26, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(b26, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel13.SetParentComponent(b26);\r\n WebPanel13.Name := 'WebPanel13';\r\n WebPanel13.Left := 0;\r\n WebPanel13.Top := 0;\r\n WebPanel13.Width := 100;\r\n WebPanel13.Height := 28;\r\n WebPanel13.ElementClassName := 'block_top';\r\n WebPanel13.HeightStyle := ssAuto;\r\n WebPanel13.Align := alTop;\r\n WebPanel13.BorderStyle := bsNone;\r\n WebPanel13.ChildOrder := 2;\r\n WebPanel13.Color := clWhite;\r\n WebPanel13.DragMode := dmAutomatic;\r\n WebPanel13.ElementFont := efCSS;\r\n WebPanel13.TabOrder := 0;\r\n SetEvent(WebPanel13, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel13, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel13, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel13, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel8.SetParentComponent(WebPanel13);\r\n WebLabel8.Name := 'WebLabel8';\r\n WebLabel8.Left := 24;\r\n WebLabel8.Top := 0;\r\n WebLabel8.Width := 22;\r\n WebLabel8.Height := 26;\r\n WebLabel8.Cursor := crHandPoint;\r\n WebLabel8.Hint := 'Setting Unit';\r\n WebLabel8.Align := alLeft;\r\n WebLabel8.Caption := '26';\r\n WebLabel8.DragMode := dmAutomatic;\r\n WebLabel8.ElementClassName := 'block_title';\r\n WebLabel8.ElementLabelClassName := 'block_title';\r\n WebLabel8.ElementFont := efCSS;\r\n WebLabel8.Font.Charset := ANSI_CHARSET;\r\n WebLabel8.Font.Color := clNavy;\r\n WebLabel8.Font.Height := -19;\r\n WebLabel8.Font.Name := 'Segoe UI Emoji';\r\n WebLabel8.Font.Style := [fsBold];\r\n WebLabel8.HeightPercent := 100.000000000000000000;\r\n WebLabel8.ParentFont := False;\r\n WebLabel8.WidthStyle := ssAuto;\r\n WebLabel8.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel8, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel8, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel8, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel8, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton6.SetParentComponent(WebPanel13);\r\n WebSpeedButton6.Name := 'WebSpeedButton6';\r\n WebSpeedButton6.Left := 0;\r\n WebSpeedButton6.Top := 0;\r\n WebSpeedButton6.Width := 24;\r\n WebSpeedButton6.Height := 28;\r\n WebSpeedButton6.Cursor := crHandPoint;\r\n WebSpeedButton6.Hint := 'Edit';\r\n WebSpeedButton6.Align := alLeft;\r\n WebSpeedButton6.Color := clNone;\r\n WebSpeedButton6.Flat := True;\r\n WebSpeedButton6.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton6.Font.Color := clBlack;\r\n WebSpeedButton6.Font.Height := -13;\r\n WebSpeedButton6.Font.Name := 'Tahoma';\r\n WebSpeedButton6.Font.Style := [];\r\n WebSpeedButton6.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton6.MaterialGlyph := 'edit';\r\n WebSpeedButton6.ParentFont := False;\r\n WebSpeedButton6.ShowHint := True;\r\n WebSpeedButton6.TabOrder := 0;\r\n WebSpeedButton6.Visible := False;\r\n WebSpeedButton6.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton6, Self, 'OnClick', '_BlockCallPickForm');\r\n M26.SetParentComponent(b26);\r\n M26.Name := 'M26';\r\n M26.Left := 0;\r\n M26.Top := 56;\r\n M26.Width := 100;\r\n M26.Height := 24;\r\n M26.Align := alBottom;\r\n M26.BorderStyle := bsNone;\r\n M26.ElementClassName := 'block_memo';\r\n M26.ElementFont := efCSS;\r\n M26.Font.Charset := ANSI_CHARSET;\r\n M26.Font.Color := clBlack;\r\n M26.Font.Height := -13;\r\n M26.Font.Name := 'Tahoma';\r\n M26.Font.Style := [];\r\n M26.HeightPercent := 100.000000000000000000;\r\n M26.ParentFont := False;\r\n M26.SelLength := 0;\r\n M26.SelStart := 0;\r\n M26.ShowFocus := False;\r\n M26.WidthPercent := 100.000000000000000000;\r\n SetEvent(M26, Self, 'OnChange', 'M21Change');\r\n SetEvent(M26, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M26, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M26, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M26, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M26, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M26, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer27.SetParentComponent(b26);\r\n WebHTMLContainer27.Name := 'WebHTMLContainer27';\r\n WebHTMLContainer27.Left := 0;\r\n WebHTMLContainer27.Top := 41;\r\n WebHTMLContainer27.Width := 100;\r\n WebHTMLContainer27.Height := 15;\r\n WebHTMLContainer27.HeightStyle := ssAuto;\r\n WebHTMLContainer27.Align := alBottom;\r\n WebHTMLContainer27.ChildOrder := 2;\r\n WebHTMLContainer27.Visible := False;\r\n SetEvent(WebHTMLContainer27, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer27, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer27, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B101.SetParentComponent(SubForm_DIV);\r\n B101.Name := 'B101';\r\n B101.Left := 681;\r\n B101.Top := -7;\r\n B101.Width := 92;\r\n B101.Height := 100;\r\n B101.ElementClassName := 'data_block';\r\n B101.BorderColor := clWhite;\r\n B101.ChildOrder := 51;\r\n B101.Color := clWhite;\r\n B101.ElementFont := efCSS;\r\n B101.Font.Charset := ANSI_CHARSET;\r\n B101.Font.Color := clBlack;\r\n B101.Font.Height := -13;\r\n B101.Font.Name := 'Tahoma';\r\n B101.Font.Style := [fsUnderline];\r\n B101.ParentFont := False;\r\n B101.TabOrder := 1;\r\n SetEvent(B101, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B101, Self, 'OnMouseMove', '_GridBlock_MouseMove');\r\n WebPanel14.SetParentComponent(B101);\r\n WebPanel14.Name := 'WebPanel14';\r\n WebPanel14.Left := 0;\r\n WebPanel14.Top := 0;\r\n WebPanel14.Width := 92;\r\n WebPanel14.Height := 28;\r\n WebPanel14.ElementClassName := 'block_top';\r\n WebPanel14.HeightStyle := ssAuto;\r\n WebPanel14.Align := alTop;\r\n WebPanel14.BorderStyle := bsNone;\r\n WebPanel14.ChildOrder := 2;\r\n WebPanel14.Color := clWhite;\r\n WebPanel14.DragMode := dmAutomatic;\r\n WebPanel14.ElementFont := efCSS;\r\n WebPanel14.TabOrder := 0;\r\n SetEvent(WebPanel14, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel14, Self, 'OnMouseMove', 'WebPanel14MouseMove');\r\n SetEvent(WebPanel14, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel14, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel18.SetParentComponent(WebPanel14);\r\n WebLabel18.Name := 'WebLabel18';\r\n WebLabel18.Left := 24;\r\n WebLabel18.Top := 0;\r\n WebLabel18.Width := 33;\r\n WebLabel18.Height := 26;\r\n WebLabel18.Cursor := crHandPoint;\r\n WebLabel18.Hint := 'Setting Unit';\r\n WebLabel18.Align := alLeft;\r\n WebLabel18.Caption := '101';\r\n WebLabel18.DragMode := dmAutomatic;\r\n WebLabel18.ElementClassName := 'block_title';\r\n WebLabel18.ElementLabelClassName := 'block_title';\r\n WebLabel18.Font.Charset := ANSI_CHARSET;\r\n WebLabel18.Font.Color := clNavy;\r\n WebLabel18.Font.Height := -19;\r\n WebLabel18.Font.Name := 'Segoe UI Emoji';\r\n WebLabel18.Font.Style := [fsBold];\r\n WebLabel18.HeightPercent := 100.000000000000000000;\r\n WebLabel18.ParentFont := False;\r\n WebLabel18.WidthStyle := ssAuto;\r\n WebLabel18.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel18, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel18, Self, 'OnMouseMove', '_GridBlockTitle_MouseMove');\r\n SetEvent(WebLabel18, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel18, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton11.SetParentComponent(WebPanel14);\r\n WebSpeedButton11.Name := 'WebSpeedButton11';\r\n WebSpeedButton11.Left := 0;\r\n WebSpeedButton11.Top := 0;\r\n WebSpeedButton11.Width := 24;\r\n WebSpeedButton11.Height := 28;\r\n WebSpeedButton11.Cursor := crHandPoint;\r\n WebSpeedButton11.Hint := 'Edit';\r\n WebSpeedButton11.Align := alLeft;\r\n WebSpeedButton11.Color := clNone;\r\n WebSpeedButton11.Flat := True;\r\n WebSpeedButton11.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton11.Font.Color := clBlack;\r\n WebSpeedButton11.Font.Height := -13;\r\n WebSpeedButton11.Font.Name := 'Tahoma';\r\n WebSpeedButton11.Font.Style := [];\r\n WebSpeedButton11.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton11.MaterialGlyph := 'edit';\r\n WebSpeedButton11.ParentFont := False;\r\n WebSpeedButton11.ShowHint := True;\r\n WebSpeedButton11.TabOrder := 0;\r\n WebSpeedButton11.Visible := False;\r\n WebSpeedButton11.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton11, Self, 'OnClick', '_BlockCallPickForm');\r\n G1.SetParentComponent(B101);\r\n G1.Name := 'G1';\r\n G1.AlignWithMargins := True;\r\n G1.Left := 3;\r\n G1.Top := 31;\r\n G1.Width := 86;\r\n G1.Height := 59;\r\n G1.Margins.Bottom := 10;\r\n G1.Align := alClient;\r\n G1.BorderStyle := bsNone;\r\n G1.Columns.Clear;\r\n with G1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C1';\r\n Title := 'C1';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C2';\r\n Title := 'C2';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C3';\r\n Title := 'C3';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C4';\r\n Title := 'C4';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C5';\r\n Title := 'C5';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C6';\r\n Title := 'C6';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C7';\r\n Title := 'C7';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C8';\r\n Title := 'C8';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C9';\r\n Title := 'C9';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C10';\r\n Title := 'C10';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C11';\r\n Title := 'C11';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C12';\r\n Title := 'C12';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C13';\r\n Title := 'C13';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C15';\r\n Title := 'C15';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C16';\r\n Title := 'C16';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C17';\r\n Title := 'C17';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C18';\r\n Title := 'C18';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C19';\r\n Title := 'C19';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C20';\r\n Title := 'C20';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_NURSE2';\r\n Title := '_CURRENT_NURSE2';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_NURSE1';\r\n Title := '_CURRENT_NURSE1';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_PROVIDER';\r\n Title := '_CURRENT_PROVIDER';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_PROCEDURENUMBER';\r\n Title := '_CURRENT_PROCEDURENUMBER';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_MRN';\r\n Title := '_CURRENT_MRN';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n G1.DefaultRowHeight := 25;\r\n G1.FixedFont.Charset := DEFAULT_CHARSET;\r\n G1.FixedFont.Color := clWindowText;\r\n G1.FixedFont.Height := -11;\r\n G1.FixedFont.Name := 'Tahoma';\r\n G1.FixedFont.Style := [];\r\n G1.FixedCols := 0;\r\n G1.Font.Charset := DEFAULT_CHARSET;\r\n G1.Font.Color := clWindowText;\r\n G1.Font.Height := -13;\r\n G1.Font.Name := 'Tahoma';\r\n G1.Font.Style := [];\r\n G1.Options := [goFixedVertLine,goColSizing,goEditing,goRowSelect];\r\n G1.ParentFont := False;\r\n G1.TabOrder := 1;\r\n G1.HeightPercent := 100.000000000000000000;\r\n G1.SelectionColor := 16769217;\r\n G1.SelectionTextColor := clBlack;\r\n G1.WidthPercent := 100.000000000000000000;\r\n SetEvent(G1, Self, 'OnClick', 'G1Click');\r\n SetEvent(G1, Self, 'OnKeyUp', 'G1KeyUp');\r\n SetEvent(G1, Self, 'OnMouseMove', 'G1MouseMove');\r\n G1.ColWidths[0] := 64;\r\n G1.ColWidths[1] := 64;\r\n G1.ColWidths[2] := 64;\r\n G1.ColWidths[3] := 64;\r\n G1.ColWidths[4] := 64;\r\n G1.ColWidths[5] := 64;\r\n G1.ColWidths[6] := 64;\r\n G1.ColWidths[7] := 64;\r\n G1.ColWidths[8] := 64;\r\n G1.ColWidths[9] := 64;\r\n G1.ColWidths[10] := 64;\r\n G1.ColWidths[11] := 64;\r\n G1.ColWidths[12] := 64;\r\n G1.ColWidths[13] := 64;\r\n G1.ColWidths[14] := 64;\r\n G1.ColWidths[15] := 64;\r\n G1.ColWidths[16] := 64;\r\n G1.ColWidths[17] := 64;\r\n G1.ColWidths[18] := 64;\r\n G1.ColWidths[19] := 64;\r\n G1.ColWidths[20] := 64;\r\n G1.ColWidths[21] := 64;\r\n G1.ColWidths[22] := 64;\r\n G1.ColWidths[23] := 64;\r\n B25.SetParentComponent(SubForm_DIV);\r\n B25.Name := 'B25';\r\n B25.Left := 540;\r\n B25.Top := 326;\r\n B25.Width := 100;\r\n B25.Height := 80;\r\n B25.ElementClassName := 'data_block';\r\n B25.BorderColor := clWhite;\r\n B25.ChildOrder := 25;\r\n B25.Color := clWhite;\r\n B25.ElementFont := efCSS;\r\n B25.Font.Charset := ANSI_CHARSET;\r\n B25.Font.Color := clBlack;\r\n B25.Font.Height := -13;\r\n B25.Font.Name := 'Tahoma';\r\n B25.Font.Style := [];\r\n B25.ParentFont := False;\r\n B25.TabOrder := 2;\r\n SetEvent(B25, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B25, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel11.SetParentComponent(B25);\r\n WebPanel11.Name := 'WebPanel11';\r\n WebPanel11.Left := 0;\r\n WebPanel11.Top := 0;\r\n WebPanel11.Width := 100;\r\n WebPanel11.Height := 28;\r\n WebPanel11.ElementClassName := 'block_top';\r\n WebPanel11.HeightStyle := ssAuto;\r\n WebPanel11.Align := alTop;\r\n WebPanel11.BorderStyle := bsNone;\r\n WebPanel11.ChildOrder := 2;\r\n WebPanel11.Color := clWhite;\r\n WebPanel11.DragMode := dmAutomatic;\r\n WebPanel11.ElementFont := efCSS;\r\n WebPanel11.TabOrder := 0;\r\n SetEvent(WebPanel11, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel11, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel11, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel11, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel7.SetParentComponent(WebPanel11);\r\n WebLabel7.Name := 'WebLabel7';\r\n WebLabel7.Left := 24;\r\n WebLabel7.Top := 0;\r\n WebLabel7.Width := 22;\r\n WebLabel7.Height := 26;\r\n WebLabel7.Cursor := crHandPoint;\r\n WebLabel7.Hint := 'Setting Unit';\r\n WebLabel7.Align := alLeft;\r\n WebLabel7.Caption := '25';\r\n WebLabel7.DragMode := dmAutomatic;\r\n WebLabel7.ElementClassName := 'block_title';\r\n WebLabel7.ElementLabelClassName := 'block_title';\r\n WebLabel7.ElementFont := efCSS;\r\n WebLabel7.Font.Charset := ANSI_CHARSET;\r\n WebLabel7.Font.Color := clNavy;\r\n WebLabel7.Font.Height := -19;\r\n WebLabel7.Font.Name := 'Segoe UI Emoji';\r\n WebLabel7.Font.Style := [fsBold];\r\n WebLabel7.HeightPercent := 100.000000000000000000;\r\n WebLabel7.ParentFont := False;\r\n WebLabel7.WidthStyle := ssAuto;\r\n WebLabel7.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel7, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel7, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel7, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel7, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton5.SetParentComponent(WebPanel11);\r\n WebSpeedButton5.Name := 'WebSpeedButton5';\r\n WebSpeedButton5.Left := 0;\r\n WebSpeedButton5.Top := 0;\r\n WebSpeedButton5.Width := 24;\r\n WebSpeedButton5.Height := 28;\r\n WebSpeedButton5.Cursor := crHandPoint;\r\n WebSpeedButton5.Hint := 'Edit';\r\n WebSpeedButton5.Align := alLeft;\r\n WebSpeedButton5.Color := clNone;\r\n WebSpeedButton5.Flat := True;\r\n WebSpeedButton5.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton5.Font.Color := clBlack;\r\n WebSpeedButton5.Font.Height := -13;\r\n WebSpeedButton5.Font.Name := 'Tahoma';\r\n WebSpeedButton5.Font.Style := [];\r\n WebSpeedButton5.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton5.MaterialGlyph := 'edit';\r\n WebSpeedButton5.ParentFont := False;\r\n WebSpeedButton5.ShowHint := True;\r\n WebSpeedButton5.TabOrder := 0;\r\n WebSpeedButton5.Visible := False;\r\n WebSpeedButton5.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton5, Self, 'OnClick', '_BlockCallPickForm');\r\n M25.SetParentComponent(B25);\r\n M25.Name := 'M25';\r\n M25.Left := 0;\r\n M25.Top := 56;\r\n M25.Width := 100;\r\n M25.Height := 24;\r\n M25.Align := alBottom;\r\n M25.BorderStyle := bsNone;\r\n M25.ElementClassName := 'block_memo';\r\n M25.ElementFont := efCSS;\r\n M25.Font.Charset := ANSI_CHARSET;\r\n M25.Font.Color := clBlack;\r\n M25.Font.Height := -13;\r\n M25.Font.Name := 'Tahoma';\r\n M25.Font.Style := [];\r\n M25.HeightPercent := 100.000000000000000000;\r\n M25.ParentFont := False;\r\n M25.SelLength := 0;\r\n M25.SelStart := 0;\r\n M25.ShowFocus := False;\r\n M25.WidthPercent := 100.000000000000000000;\r\n SetEvent(M25, Self, 'OnChange', 'M21Change');\r\n SetEvent(M25, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M25, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M25, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M25, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M25, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M25, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer26.SetParentComponent(B25);\r\n WebHTMLContainer26.Name := 'WebHTMLContainer26';\r\n WebHTMLContainer26.Left := 0;\r\n WebHTMLContainer26.Top := 41;\r\n WebHTMLContainer26.Width := 100;\r\n WebHTMLContainer26.Height := 15;\r\n WebHTMLContainer26.HeightStyle := ssAuto;\r\n WebHTMLContainer26.Align := alBottom;\r\n WebHTMLContainer26.ChildOrder := 2;\r\n WebHTMLContainer26.Visible := False;\r\n SetEvent(WebHTMLContainer26, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer26, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer26, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B20.SetParentComponent(SubForm_DIV);\r\n B20.Name := 'B20';\r\n B20.Left := 540;\r\n B20.Top := 240;\r\n B20.Width := 100;\r\n B20.Height := 80;\r\n B20.ElementClassName := 'data_block';\r\n B20.BorderColor := clWhite;\r\n B20.ChildOrder := 20;\r\n B20.Color := clWhite;\r\n B20.ElementFont := efCSS;\r\n B20.Font.Charset := ANSI_CHARSET;\r\n B20.Font.Color := clBlack;\r\n B20.Font.Height := -13;\r\n B20.Font.Name := 'Tahoma';\r\n B20.Font.Style := [];\r\n B20.ParentFont := False;\r\n B20.TabOrder := 3;\r\n SetEvent(B20, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B20, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel95.SetParentComponent(B20);\r\n WebPanel95.Name := 'WebPanel95';\r\n WebPanel95.Left := 0;\r\n WebPanel95.Top := 0;\r\n WebPanel95.Width := 100;\r\n WebPanel95.Height := 28;\r\n WebPanel95.ElementClassName := 'block_top';\r\n WebPanel95.HeightStyle := ssAuto;\r\n WebPanel95.Align := alTop;\r\n WebPanel95.BorderStyle := bsNone;\r\n WebPanel95.ChildOrder := 2;\r\n WebPanel95.Color := clWhite;\r\n WebPanel95.DragMode := dmAutomatic;\r\n WebPanel95.ElementFont := efCSS;\r\n WebPanel95.TabOrder := 0;\r\n SetEvent(WebPanel95, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel95, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel95, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel95, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel47.SetParentComponent(WebPanel95);\r\n WebLabel47.Name := 'WebLabel47';\r\n WebLabel47.Left := 24;\r\n WebLabel47.Top := 0;\r\n WebLabel47.Width := 22;\r\n WebLabel47.Height := 26;\r\n WebLabel47.Cursor := crHandPoint;\r\n WebLabel47.Hint := 'Setting Unit';\r\n WebLabel47.Align := alLeft;\r\n WebLabel47.Caption := '20';\r\n WebLabel47.DragMode := dmAutomatic;\r\n WebLabel47.ElementClassName := 'block_title';\r\n WebLabel47.ElementLabelClassName := 'block_title';\r\n WebLabel47.ElementFont := efCSS;\r\n WebLabel47.Font.Charset := ANSI_CHARSET;\r\n WebLabel47.Font.Color := clNavy;\r\n WebLabel47.Font.Height := -19;\r\n WebLabel47.Font.Name := 'Segoe UI Emoji';\r\n WebLabel47.Font.Style := [fsBold];\r\n WebLabel47.HeightPercent := 100.000000000000000000;\r\n WebLabel47.ParentFont := False;\r\n WebLabel47.WidthStyle := ssAuto;\r\n WebLabel47.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel47, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel47, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel47, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel47, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton44.SetParentComponent(WebPanel95);\r\n WebSpeedButton44.Name := 'WebSpeedButton44';\r\n WebSpeedButton44.Left := 0;\r\n WebSpeedButton44.Top := 0;\r\n WebSpeedButton44.Width := 24;\r\n WebSpeedButton44.Height := 28;\r\n WebSpeedButton44.Cursor := crHandPoint;\r\n WebSpeedButton44.Hint := 'Edit';\r\n WebSpeedButton44.Align := alLeft;\r\n WebSpeedButton44.Color := clNone;\r\n WebSpeedButton44.Flat := True;\r\n WebSpeedButton44.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton44.Font.Color := clBlack;\r\n WebSpeedButton44.Font.Height := -13;\r\n WebSpeedButton44.Font.Name := 'Tahoma';\r\n WebSpeedButton44.Font.Style := [];\r\n WebSpeedButton44.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton44.MaterialGlyph := 'edit';\r\n WebSpeedButton44.ParentFont := False;\r\n WebSpeedButton44.ShowHint := True;\r\n WebSpeedButton44.TabOrder := 0;\r\n WebSpeedButton44.Visible := False;\r\n WebSpeedButton44.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton44, Self, 'OnClick', '_BlockCallPickForm');\r\n M20.SetParentComponent(B20);\r\n M20.Name := 'M20';\r\n M20.Left := 0;\r\n M20.Top := 56;\r\n M20.Width := 100;\r\n M20.Height := 24;\r\n M20.Align := alBottom;\r\n M20.BorderStyle := bsNone;\r\n M20.ElementClassName := 'block_memo';\r\n M20.ElementFont := efCSS;\r\n M20.Font.Charset := ANSI_CHARSET;\r\n M20.Font.Color := clBlack;\r\n M20.Font.Height := -13;\r\n M20.Font.Name := 'Tahoma';\r\n M20.Font.Style := [];\r\n M20.HeightPercent := 100.000000000000000000;\r\n M20.ParentFont := False;\r\n M20.SelLength := 0;\r\n M20.SelStart := 0;\r\n M20.ShowFocus := False;\r\n M20.WidthPercent := 100.000000000000000000;\r\n SetEvent(M20, Self, 'OnChange', 'M21Change');\r\n SetEvent(M20, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M20, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M20, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M20, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M20, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M20, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer17.SetParentComponent(B20);\r\n WebHTMLContainer17.Name := 'WebHTMLContainer17';\r\n WebHTMLContainer17.Left := 0;\r\n WebHTMLContainer17.Top := 41;\r\n WebHTMLContainer17.Width := 100;\r\n WebHTMLContainer17.Height := 15;\r\n WebHTMLContainer17.HeightStyle := ssAuto;\r\n WebHTMLContainer17.Align := alBottom;\r\n WebHTMLContainer17.ChildOrder := 2;\r\n WebHTMLContainer17.Visible := False;\r\n SetEvent(WebHTMLContainer17, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer17, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer17, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B21.SetParentComponent(SubForm_DIV);\r\n B21.Name := 'B21';\r\n B21.Left := 57;\r\n B21.Top := 326;\r\n B21.Width := 100;\r\n B21.Height := 80;\r\n B21.ElementClassName := 'data_block';\r\n B21.BorderColor := clWhite;\r\n B21.ChildOrder := 21;\r\n B21.Color := clWhite;\r\n B21.ElementFont := efCSS;\r\n B21.Font.Charset := ANSI_CHARSET;\r\n B21.Font.Color := clBlack;\r\n B21.Font.Height := -13;\r\n B21.Font.Name := 'Tahoma';\r\n B21.Font.Style := [];\r\n B21.ParentFont := False;\r\n B21.TabOrder := 4;\r\n SetEvent(B21, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B21, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel2.SetParentComponent(B21);\r\n WebPanel2.Name := 'WebPanel2';\r\n WebPanel2.Left := 0;\r\n WebPanel2.Top := 0;\r\n WebPanel2.Width := 100;\r\n WebPanel2.Height := 28;\r\n WebPanel2.ElementClassName := 'block_top';\r\n WebPanel2.HeightStyle := ssAuto;\r\n WebPanel2.Align := alTop;\r\n WebPanel2.BorderStyle := bsNone;\r\n WebPanel2.ChildOrder := 2;\r\n WebPanel2.Color := clWhite;\r\n WebPanel2.DragMode := dmAutomatic;\r\n WebPanel2.ElementFont := efCSS;\r\n WebPanel2.TabOrder := 0;\r\n SetEvent(WebPanel2, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel2, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel2, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel2, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel3.SetParentComponent(WebPanel2);\r\n WebLabel3.Name := 'WebLabel3';\r\n WebLabel3.Left := 24;\r\n WebLabel3.Top := 0;\r\n WebLabel3.Width := 22;\r\n WebLabel3.Height := 26;\r\n WebLabel3.Cursor := crHandPoint;\r\n WebLabel3.Hint := 'Setting Unit';\r\n WebLabel3.Align := alLeft;\r\n WebLabel3.Caption := '21';\r\n WebLabel3.DragMode := dmAutomatic;\r\n WebLabel3.ElementClassName := 'block_title';\r\n WebLabel3.ElementLabelClassName := 'block_title';\r\n WebLabel3.ElementFont := efCSS;\r\n WebLabel3.Font.Charset := ANSI_CHARSET;\r\n WebLabel3.Font.Color := clNavy;\r\n WebLabel3.Font.Height := -19;\r\n WebLabel3.Font.Name := 'Segoe UI Emoji';\r\n WebLabel3.Font.Style := [fsBold];\r\n WebLabel3.HeightPercent := 100.000000000000000000;\r\n WebLabel3.ParentFont := False;\r\n WebLabel3.WidthStyle := ssAuto;\r\n WebLabel3.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel3, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel3, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel3, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel3, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton1.SetParentComponent(WebPanel2);\r\n WebSpeedButton1.Name := 'WebSpeedButton1';\r\n WebSpeedButton1.Left := 0;\r\n WebSpeedButton1.Top := 0;\r\n WebSpeedButton1.Width := 24;\r\n WebSpeedButton1.Height := 28;\r\n WebSpeedButton1.Cursor := crHandPoint;\r\n WebSpeedButton1.Hint := 'Edit';\r\n WebSpeedButton1.Align := alLeft;\r\n WebSpeedButton1.Color := clNone;\r\n WebSpeedButton1.Flat := True;\r\n WebSpeedButton1.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton1.Font.Color := clBlack;\r\n WebSpeedButton1.Font.Height := -13;\r\n WebSpeedButton1.Font.Name := 'Tahoma';\r\n WebSpeedButton1.Font.Style := [];\r\n WebSpeedButton1.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton1.MaterialGlyph := 'edit';\r\n WebSpeedButton1.ParentFont := False;\r\n WebSpeedButton1.ShowHint := True;\r\n WebSpeedButton1.TabOrder := 0;\r\n WebSpeedButton1.Visible := False;\r\n WebSpeedButton1.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton1, Self, 'OnClick', '_BlockCallPickForm');\r\n M21.SetParentComponent(B21);\r\n M21.Name := 'M21';\r\n M21.Left := 0;\r\n M21.Top := 56;\r\n M21.Width := 100;\r\n M21.Height := 24;\r\n M21.Align := alBottom;\r\n M21.BorderStyle := bsNone;\r\n M21.ElementClassName := 'block_memo';\r\n M21.ElementFont := efCSS;\r\n M21.Font.Charset := ANSI_CHARSET;\r\n M21.Font.Color := clBlack;\r\n M21.Font.Height := -13;\r\n M21.Font.Name := 'Tahoma';\r\n M21.Font.Style := [];\r\n M21.HeightPercent := 100.000000000000000000;\r\n M21.ParentFont := False;\r\n M21.SelLength := 0;\r\n M21.SelStart := 0;\r\n M21.ShowFocus := False;\r\n M21.WidthPercent := 100.000000000000000000;\r\n SetEvent(M21, Self, 'OnChange', 'M21Change');\r\n SetEvent(M21, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M21, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M21, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M21, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M21, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M21, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer22.SetParentComponent(B21);\r\n WebHTMLContainer22.Name := 'WebHTMLContainer22';\r\n WebHTMLContainer22.Left := 0;\r\n WebHTMLContainer22.Top := 41;\r\n WebHTMLContainer22.Width := 100;\r\n WebHTMLContainer22.Height := 15;\r\n WebHTMLContainer22.HeightStyle := ssAuto;\r\n WebHTMLContainer22.Align := alBottom;\r\n WebHTMLContainer22.ChildOrder := 2;\r\n WebHTMLContainer22.Visible := False;\r\n SetEvent(WebHTMLContainer22, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer22, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer22, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B22.SetParentComponent(SubForm_DIV);\r\n B22.Name := 'B22';\r\n B22.Left := 178;\r\n B22.Top := 326;\r\n B22.Width := 100;\r\n B22.Height := 80;\r\n B22.ElementClassName := 'data_block';\r\n B22.BorderColor := clWhite;\r\n B22.ChildOrder := 22;\r\n B22.Color := clWhite;\r\n B22.ElementFont := efCSS;\r\n B22.Font.Charset := ANSI_CHARSET;\r\n B22.Font.Color := clBlack;\r\n B22.Font.Height := -13;\r\n B22.Font.Name := 'Tahoma';\r\n B22.Font.Style := [];\r\n B22.ParentFont := False;\r\n B22.TabOrder := 5;\r\n SetEvent(B22, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B22, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel4.SetParentComponent(B22);\r\n WebPanel4.Name := 'WebPanel4';\r\n WebPanel4.Left := 0;\r\n WebPanel4.Top := 0;\r\n WebPanel4.Width := 100;\r\n WebPanel4.Height := 28;\r\n WebPanel4.ElementClassName := 'block_top';\r\n WebPanel4.HeightStyle := ssAuto;\r\n WebPanel4.Align := alTop;\r\n WebPanel4.BorderStyle := bsNone;\r\n WebPanel4.ChildOrder := 2;\r\n WebPanel4.Color := clWhite;\r\n WebPanel4.DragMode := dmAutomatic;\r\n WebPanel4.ElementFont := efCSS;\r\n WebPanel4.TabOrder := 0;\r\n SetEvent(WebPanel4, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel4, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel4, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel4, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel4.SetParentComponent(WebPanel4);\r\n WebLabel4.Name := 'WebLabel4';\r\n WebLabel4.Left := 24;\r\n WebLabel4.Top := 0;\r\n WebLabel4.Width := 22;\r\n WebLabel4.Height := 26;\r\n WebLabel4.Cursor := crHandPoint;\r\n WebLabel4.Hint := 'Setting Unit';\r\n WebLabel4.Align := alLeft;\r\n WebLabel4.Caption := '22';\r\n WebLabel4.DragMode := dmAutomatic;\r\n WebLabel4.ElementClassName := 'block_title';\r\n WebLabel4.ElementLabelClassName := 'block_title';\r\n WebLabel4.ElementFont := efCSS;\r\n WebLabel4.Font.Charset := ANSI_CHARSET;\r\n WebLabel4.Font.Color := clNavy;\r\n WebLabel4.Font.Height := -19;\r\n WebLabel4.Font.Name := 'Segoe UI Emoji';\r\n WebLabel4.Font.Style := [fsBold];\r\n WebLabel4.HeightPercent := 100.000000000000000000;\r\n WebLabel4.ParentFont := False;\r\n WebLabel4.WidthStyle := ssAuto;\r\n WebLabel4.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel4, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel4, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel4, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel4, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton2.SetParentComponent(WebPanel4);\r\n WebSpeedButton2.Name := 'WebSpeedButton2';\r\n WebSpeedButton2.Left := 0;\r\n WebSpeedButton2.Top := 0;\r\n WebSpeedButton2.Width := 24;\r\n WebSpeedButton2.Height := 28;\r\n WebSpeedButton2.Cursor := crHandPoint;\r\n WebSpeedButton2.Hint := 'Edit';\r\n WebSpeedButton2.Align := alLeft;\r\n WebSpeedButton2.Color := clNone;\r\n WebSpeedButton2.Flat := True;\r\n WebSpeedButton2.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton2.Font.Color := clBlack;\r\n WebSpeedButton2.Font.Height := -13;\r\n WebSpeedButton2.Font.Name := 'Tahoma';\r\n WebSpeedButton2.Font.Style := [];\r\n WebSpeedButton2.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton2.MaterialGlyph := 'edit';\r\n WebSpeedButton2.ParentFont := False;\r\n WebSpeedButton2.ShowHint := True;\r\n WebSpeedButton2.TabOrder := 0;\r\n WebSpeedButton2.Visible := False;\r\n WebSpeedButton2.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton2, Self, 'OnClick', '_BlockCallPickForm');\r\n M22.SetParentComponent(B22);\r\n M22.Name := 'M22';\r\n M22.Left := 0;\r\n M22.Top := 56;\r\n M22.Width := 100;\r\n M22.Height := 24;\r\n M22.Align := alBottom;\r\n M22.BorderStyle := bsNone;\r\n M22.ElementClassName := 'block_memo';\r\n M22.ElementFont := efCSS;\r\n M22.Font.Charset := ANSI_CHARSET;\r\n M22.Font.Color := clBlack;\r\n M22.Font.Height := -13;\r\n M22.Font.Name := 'Tahoma';\r\n M22.Font.Style := [];\r\n M22.HeightPercent := 100.000000000000000000;\r\n M22.ParentFont := False;\r\n M22.SelLength := 0;\r\n M22.SelStart := 0;\r\n M22.ShowFocus := False;\r\n M22.WidthPercent := 100.000000000000000000;\r\n SetEvent(M22, Self, 'OnChange', 'M21Change');\r\n SetEvent(M22, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M22, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M22, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M22, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M22, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M22, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer23.SetParentComponent(B22);\r\n WebHTMLContainer23.Name := 'WebHTMLContainer23';\r\n WebHTMLContainer23.Left := 0;\r\n WebHTMLContainer23.Top := 41;\r\n WebHTMLContainer23.Width := 100;\r\n WebHTMLContainer23.Height := 15;\r\n WebHTMLContainer23.HeightStyle := ssAuto;\r\n WebHTMLContainer23.Align := alBottom;\r\n WebHTMLContainer23.ChildOrder := 2;\r\n WebHTMLContainer23.Visible := False;\r\n SetEvent(WebHTMLContainer23, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer23, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer23, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n b23.SetParentComponent(SubForm_DIV);\r\n b23.Name := 'b23';\r\n b23.Left := 298;\r\n b23.Top := 326;\r\n b23.Width := 100;\r\n b23.Height := 80;\r\n b23.ElementClassName := 'data_block';\r\n b23.BorderColor := clWhite;\r\n b23.ChildOrder := 23;\r\n b23.Color := clWhite;\r\n b23.ElementFont := efCSS;\r\n b23.Font.Charset := ANSI_CHARSET;\r\n b23.Font.Color := clBlack;\r\n b23.Font.Height := -13;\r\n b23.Font.Name := 'Tahoma';\r\n b23.Font.Style := [];\r\n b23.ParentFont := False;\r\n b23.TabOrder := 6;\r\n SetEvent(b23, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(b23, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel6.SetParentComponent(b23);\r\n WebPanel6.Name := 'WebPanel6';\r\n WebPanel6.Left := 0;\r\n WebPanel6.Top := 0;\r\n WebPanel6.Width := 100;\r\n WebPanel6.Height := 28;\r\n WebPanel6.ElementClassName := 'block_top';\r\n WebPanel6.HeightStyle := ssAuto;\r\n WebPanel6.Align := alTop;\r\n WebPanel6.BorderStyle := bsNone;\r\n WebPanel6.ChildOrder := 2;\r\n WebPanel6.Color := clWhite;\r\n WebPanel6.DragMode := dmAutomatic;\r\n WebPanel6.ElementFont := efCSS;\r\n WebPanel6.TabOrder := 0;\r\n SetEvent(WebPanel6, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel6, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel6, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel6, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel5.SetParentComponent(WebPanel6);\r\n WebLabel5.Name := 'WebLabel5';\r\n WebLabel5.Left := 24;\r\n WebLabel5.Top := 0;\r\n WebLabel5.Width := 22;\r\n WebLabel5.Height := 26;\r\n WebLabel5.Cursor := crHandPoint;\r\n WebLabel5.Hint := 'Setting Unit';\r\n WebLabel5.Align := alLeft;\r\n WebLabel5.Caption := '23';\r\n WebLabel5.DragMode := dmAutomatic;\r\n WebLabel5.ElementClassName := 'block_title';\r\n WebLabel5.ElementLabelClassName := 'block_title';\r\n WebLabel5.ElementFont := efCSS;\r\n WebLabel5.Font.Charset := ANSI_CHARSET;\r\n WebLabel5.Font.Color := clNavy;\r\n WebLabel5.Font.Height := -19;\r\n WebLabel5.Font.Name := 'Segoe UI Emoji';\r\n WebLabel5.Font.Style := [fsBold];\r\n WebLabel5.HeightPercent := 100.000000000000000000;\r\n WebLabel5.ParentFont := False;\r\n WebLabel5.WidthStyle := ssAuto;\r\n WebLabel5.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel5, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel5, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel5, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel5, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton3.SetParentComponent(WebPanel6);\r\n WebSpeedButton3.Name := 'WebSpeedButton3';\r\n WebSpeedButton3.Left := 0;\r\n WebSpeedButton3.Top := 0;\r\n WebSpeedButton3.Width := 24;\r\n WebSpeedButton3.Height := 28;\r\n WebSpeedButton3.Cursor := crHandPoint;\r\n WebSpeedButton3.Hint := 'Edit';\r\n WebSpeedButton3.Align := alLeft;\r\n WebSpeedButton3.Color := clNone;\r\n WebSpeedButton3.Flat := True;\r\n WebSpeedButton3.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton3.Font.Color := clBlack;\r\n WebSpeedButton3.Font.Height := -13;\r\n WebSpeedButton3.Font.Name := 'Tahoma';\r\n WebSpeedButton3.Font.Style := [];\r\n WebSpeedButton3.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton3.MaterialGlyph := 'edit';\r\n WebSpeedButton3.ParentFont := False;\r\n WebSpeedButton3.ShowHint := True;\r\n WebSpeedButton3.TabOrder := 0;\r\n WebSpeedButton3.Visible := False;\r\n WebSpeedButton3.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton3, Self, 'OnClick', '_BlockCallPickForm');\r\n M23.SetParentComponent(b23);\r\n M23.Name := 'M23';\r\n M23.Left := 0;\r\n M23.Top := 56;\r\n M23.Width := 100;\r\n M23.Height := 24;\r\n M23.Align := alBottom;\r\n M23.BorderStyle := bsNone;\r\n M23.ElementClassName := 'block_memo';\r\n M23.ElementFont := efCSS;\r\n M23.Font.Charset := ANSI_CHARSET;\r\n M23.Font.Color := clBlack;\r\n M23.Font.Height := -13;\r\n M23.Font.Name := 'Tahoma';\r\n M23.Font.Style := [];\r\n M23.HeightPercent := 100.000000000000000000;\r\n M23.ParentFont := False;\r\n M23.SelLength := 0;\r\n M23.SelStart := 0;\r\n M23.ShowFocus := False;\r\n M23.WidthPercent := 100.000000000000000000;\r\n SetEvent(M23, Self, 'OnChange', 'M21Change');\r\n SetEvent(M23, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M23, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M23, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M23, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M23, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M23, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer24.SetParentComponent(b23);\r\n WebHTMLContainer24.Name := 'WebHTMLContainer24';\r\n WebHTMLContainer24.Left := 0;\r\n WebHTMLContainer24.Top := 41;\r\n WebHTMLContainer24.Width := 100;\r\n WebHTMLContainer24.Height := 15;\r\n WebHTMLContainer24.HeightStyle := ssAuto;\r\n WebHTMLContainer24.Align := alBottom;\r\n WebHTMLContainer24.ChildOrder := 2;\r\n WebHTMLContainer24.Visible := False;\r\n SetEvent(WebHTMLContainer24, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer24, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer24, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B18.SetParentComponent(SubForm_DIV);\r\n B18.Name := 'B18';\r\n B18.Left := 298;\r\n B18.Top := 240;\r\n B18.Width := 100;\r\n B18.Height := 80;\r\n B18.ElementClassName := 'data_block';\r\n B18.BorderColor := clWhite;\r\n B18.ChildOrder := 18;\r\n B18.Color := clWhite;\r\n B18.ElementFont := efCSS;\r\n B18.Font.Charset := ANSI_CHARSET;\r\n B18.Font.Color := clBlack;\r\n B18.Font.Height := -13;\r\n B18.Font.Name := 'Tahoma';\r\n B18.Font.Style := [];\r\n B18.ParentFont := False;\r\n B18.TabOrder := 7;\r\n SetEvent(B18, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B18, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel111.SetParentComponent(B18);\r\n WebPanel111.Name := 'WebPanel111';\r\n WebPanel111.Left := 0;\r\n WebPanel111.Top := 0;\r\n WebPanel111.Width := 100;\r\n WebPanel111.Height := 28;\r\n WebPanel111.ElementClassName := 'block_top';\r\n WebPanel111.HeightStyle := ssAuto;\r\n WebPanel111.Align := alTop;\r\n WebPanel111.BorderStyle := bsNone;\r\n WebPanel111.ChildOrder := 2;\r\n WebPanel111.Color := clWhite;\r\n WebPanel111.DragMode := dmAutomatic;\r\n WebPanel111.ElementFont := efCSS;\r\n WebPanel111.TabOrder := 0;\r\n SetEvent(WebPanel111, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel111, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel111, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel111, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel55.SetParentComponent(WebPanel111);\r\n WebLabel55.Name := 'WebLabel55';\r\n WebLabel55.Left := 24;\r\n WebLabel55.Top := 0;\r\n WebLabel55.Width := 22;\r\n WebLabel55.Height := 26;\r\n WebLabel55.Cursor := crHandPoint;\r\n WebLabel55.Hint := 'Setting Unit';\r\n WebLabel55.Align := alLeft;\r\n WebLabel55.Caption := '18';\r\n WebLabel55.DragMode := dmAutomatic;\r\n WebLabel55.ElementClassName := 'block_title';\r\n WebLabel55.ElementLabelClassName := 'block_title';\r\n WebLabel55.ElementFont := efCSS;\r\n WebLabel55.Font.Charset := ANSI_CHARSET;\r\n WebLabel55.Font.Color := clNavy;\r\n WebLabel55.Font.Height := -19;\r\n WebLabel55.Font.Name := 'Segoe UI Emoji';\r\n WebLabel55.Font.Style := [fsBold];\r\n WebLabel55.HeightPercent := 100.000000000000000000;\r\n WebLabel55.ParentFont := False;\r\n WebLabel55.WidthStyle := ssAuto;\r\n WebLabel55.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel55, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel55, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel55, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel55, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton52.SetParentComponent(WebPanel111);\r\n WebSpeedButton52.Name := 'WebSpeedButton52';\r\n WebSpeedButton52.Left := 0;\r\n WebSpeedButton52.Top := 0;\r\n WebSpeedButton52.Width := 24;\r\n WebSpeedButton52.Height := 28;\r\n WebSpeedButton52.Cursor := crHandPoint;\r\n WebSpeedButton52.Hint := 'Edit';\r\n WebSpeedButton52.Align := alLeft;\r\n WebSpeedButton52.Color := clNone;\r\n WebSpeedButton52.Flat := True;\r\n WebSpeedButton52.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton52.Font.Color := clBlack;\r\n WebSpeedButton52.Font.Height := -13;\r\n WebSpeedButton52.Font.Name := 'Tahoma';\r\n WebSpeedButton52.Font.Style := [];\r\n WebSpeedButton52.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton52.MaterialGlyph := 'edit';\r\n WebSpeedButton52.ParentFont := False;\r\n WebSpeedButton52.ShowHint := True;\r\n WebSpeedButton52.TabOrder := 0;\r\n WebSpeedButton52.Visible := False;\r\n WebSpeedButton52.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton52, Self, 'OnClick', '_BlockCallPickForm');\r\n M18.SetParentComponent(B18);\r\n M18.Name := 'M18';\r\n M18.Left := 0;\r\n M18.Top := 56;\r\n M18.Width := 100;\r\n M18.Height := 24;\r\n M18.Align := alBottom;\r\n M18.BorderStyle := bsNone;\r\n M18.ElementClassName := 'block_memo';\r\n M18.ElementFont := efCSS;\r\n M18.Font.Charset := ANSI_CHARSET;\r\n M18.Font.Color := clBlack;\r\n M18.Font.Height := -13;\r\n M18.Font.Name := 'Tahoma';\r\n M18.Font.Style := [];\r\n M18.HeightPercent := 100.000000000000000000;\r\n M18.ParentFont := False;\r\n M18.SelLength := 0;\r\n M18.SelStart := 0;\r\n M18.ShowFocus := False;\r\n M18.WidthPercent := 100.000000000000000000;\r\n SetEvent(M18, Self, 'OnChange', 'M21Change');\r\n SetEvent(M18, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M18, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M18, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M18, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M18, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M18, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer19.SetParentComponent(B18);\r\n WebHTMLContainer19.Name := 'WebHTMLContainer19';\r\n WebHTMLContainer19.Left := 0;\r\n WebHTMLContainer19.Top := 41;\r\n WebHTMLContainer19.Width := 100;\r\n WebHTMLContainer19.Height := 15;\r\n WebHTMLContainer19.HeightStyle := ssAuto;\r\n WebHTMLContainer19.Align := alBottom;\r\n WebHTMLContainer19.ChildOrder := 2;\r\n WebHTMLContainer19.Visible := False;\r\n SetEvent(WebHTMLContainer19, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer19, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer19, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B19.SetParentComponent(SubForm_DIV);\r\n B19.Name := 'B19';\r\n B19.Left := 419;\r\n B19.Top := 240;\r\n B19.Width := 100;\r\n B19.Height := 80;\r\n B19.ElementClassName := 'data_block';\r\n B19.BorderColor := clWhite;\r\n B19.ChildOrder := 19;\r\n B19.Color := clWhite;\r\n B19.ElementFont := efCSS;\r\n B19.Font.Charset := ANSI_CHARSET;\r\n B19.Font.Color := clBlack;\r\n B19.Font.Height := -13;\r\n B19.Font.Name := 'Tahoma';\r\n B19.Font.Style := [];\r\n B19.ParentFont := False;\r\n B19.TabOrder := 8;\r\n SetEvent(B19, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B19, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel93.SetParentComponent(B19);\r\n WebPanel93.Name := 'WebPanel93';\r\n WebPanel93.Left := 0;\r\n WebPanel93.Top := 0;\r\n WebPanel93.Width := 100;\r\n WebPanel93.Height := 28;\r\n WebPanel93.ElementClassName := 'block_top';\r\n WebPanel93.HeightStyle := ssAuto;\r\n WebPanel93.Align := alTop;\r\n WebPanel93.BorderStyle := bsNone;\r\n WebPanel93.ChildOrder := 2;\r\n WebPanel93.Color := clWhite;\r\n WebPanel93.DragMode := dmAutomatic;\r\n WebPanel93.ElementFont := efCSS;\r\n WebPanel93.TabOrder := 0;\r\n SetEvent(WebPanel93, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel93, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel93, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel93, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel46.SetParentComponent(WebPanel93);\r\n WebLabel46.Name := 'WebLabel46';\r\n WebLabel46.Left := 24;\r\n WebLabel46.Top := 0;\r\n WebLabel46.Width := 22;\r\n WebLabel46.Height := 26;\r\n WebLabel46.Cursor := crHandPoint;\r\n WebLabel46.Hint := 'Setting Unit';\r\n WebLabel46.Align := alLeft;\r\n WebLabel46.Caption := '19';\r\n WebLabel46.DragMode := dmAutomatic;\r\n WebLabel46.ElementClassName := 'block_title';\r\n WebLabel46.ElementLabelClassName := 'block_title';\r\n WebLabel46.ElementFont := efCSS;\r\n WebLabel46.Font.Charset := ANSI_CHARSET;\r\n WebLabel46.Font.Color := clNavy;\r\n WebLabel46.Font.Height := -19;\r\n WebLabel46.Font.Name := 'Segoe UI Emoji';\r\n WebLabel46.Font.Style := [fsBold];\r\n WebLabel46.HeightPercent := 100.000000000000000000;\r\n WebLabel46.ParentFont := False;\r\n WebLabel46.WidthStyle := ssAuto;\r\n WebLabel46.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel46, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel46, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel46, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel46, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton43.SetParentComponent(WebPanel93);\r\n WebSpeedButton43.Name := 'WebSpeedButton43';\r\n WebSpeedButton43.Left := 0;\r\n WebSpeedButton43.Top := 0;\r\n WebSpeedButton43.Width := 24;\r\n WebSpeedButton43.Height := 28;\r\n WebSpeedButton43.Cursor := crHandPoint;\r\n WebSpeedButton43.Hint := 'Edit';\r\n WebSpeedButton43.Align := alLeft;\r\n WebSpeedButton43.Color := clNone;\r\n WebSpeedButton43.Flat := True;\r\n WebSpeedButton43.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton43.Font.Color := clBlack;\r\n WebSpeedButton43.Font.Height := -13;\r\n WebSpeedButton43.Font.Name := 'Tahoma';\r\n WebSpeedButton43.Font.Style := [];\r\n WebSpeedButton43.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton43.MaterialGlyph := 'edit';\r\n WebSpeedButton43.ParentFont := False;\r\n WebSpeedButton43.ShowHint := True;\r\n WebSpeedButton43.TabOrder := 0;\r\n WebSpeedButton43.Visible := False;\r\n WebSpeedButton43.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton43, Self, 'OnClick', '_BlockCallPickForm');\r\n M19.SetParentComponent(B19);\r\n M19.Name := 'M19';\r\n M19.Left := 0;\r\n M19.Top := 56;\r\n M19.Width := 100;\r\n M19.Height := 24;\r\n M19.Align := alBottom;\r\n M19.BorderStyle := bsNone;\r\n M19.ElementClassName := 'block_memo';\r\n M19.ElementFont := efCSS;\r\n M19.Font.Charset := ANSI_CHARSET;\r\n M19.Font.Color := clBlack;\r\n M19.Font.Height := -13;\r\n M19.Font.Name := 'Tahoma';\r\n M19.Font.Style := [];\r\n M19.HeightPercent := 100.000000000000000000;\r\n M19.ParentFont := False;\r\n M19.SelLength := 0;\r\n M19.SelStart := 0;\r\n M19.ShowFocus := False;\r\n M19.WidthPercent := 100.000000000000000000;\r\n SetEvent(M19, Self, 'OnChange', 'M21Change');\r\n SetEvent(M19, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M19, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M19, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M19, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M19, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M19, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer18.SetParentComponent(B19);\r\n WebHTMLContainer18.Name := 'WebHTMLContainer18';\r\n WebHTMLContainer18.Left := 0;\r\n WebHTMLContainer18.Top := 41;\r\n WebHTMLContainer18.Width := 100;\r\n WebHTMLContainer18.Height := 15;\r\n WebHTMLContainer18.HeightStyle := ssAuto;\r\n WebHTMLContainer18.Align := alBottom;\r\n WebHTMLContainer18.ChildOrder := 2;\r\n WebHTMLContainer18.Visible := False;\r\n SetEvent(WebHTMLContainer18, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer18, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer18, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B24.SetParentComponent(SubForm_DIV);\r\n B24.Name := 'B24';\r\n B24.Left := 419;\r\n B24.Top := 326;\r\n B24.Width := 100;\r\n B24.Height := 80;\r\n B24.ElementClassName := 'data_block';\r\n B24.BorderColor := clWhite;\r\n B24.ChildOrder := 24;\r\n B24.Color := clWhite;\r\n B24.ElementFont := efCSS;\r\n B24.Font.Charset := ANSI_CHARSET;\r\n B24.Font.Color := clBlack;\r\n B24.Font.Height := -13;\r\n B24.Font.Name := 'Tahoma';\r\n B24.Font.Style := [];\r\n B24.ParentFont := False;\r\n B24.TabOrder := 9;\r\n SetEvent(B24, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B24, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel8.SetParentComponent(B24);\r\n WebPanel8.Name := 'WebPanel8';\r\n WebPanel8.Left := 0;\r\n WebPanel8.Top := 0;\r\n WebPanel8.Width := 100;\r\n WebPanel8.Height := 28;\r\n WebPanel8.ElementClassName := 'block_top';\r\n WebPanel8.HeightStyle := ssAuto;\r\n WebPanel8.Align := alTop;\r\n WebPanel8.BorderStyle := bsNone;\r\n WebPanel8.ChildOrder := 2;\r\n WebPanel8.Color := clWhite;\r\n WebPanel8.DragMode := dmAutomatic;\r\n WebPanel8.ElementFont := efCSS;\r\n WebPanel8.TabOrder := 0;\r\n SetEvent(WebPanel8, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel8, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel8, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel8, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel6.SetParentComponent(WebPanel8);\r\n WebLabel6.Name := 'WebLabel6';\r\n WebLabel6.Left := 24;\r\n WebLabel6.Top := 0;\r\n WebLabel6.Width := 22;\r\n WebLabel6.Height := 26;\r\n WebLabel6.Cursor := crHandPoint;\r\n WebLabel6.Hint := 'Setting Unit';\r\n WebLabel6.Align := alLeft;\r\n WebLabel6.Caption := '24';\r\n WebLabel6.DragMode := dmAutomatic;\r\n WebLabel6.ElementClassName := 'block_title';\r\n WebLabel6.ElementLabelClassName := 'block_title';\r\n WebLabel6.ElementFont := efCSS;\r\n WebLabel6.Font.Charset := ANSI_CHARSET;\r\n WebLabel6.Font.Color := clNavy;\r\n WebLabel6.Font.Height := -19;\r\n WebLabel6.Font.Name := 'Segoe UI Emoji';\r\n WebLabel6.Font.Style := [fsBold];\r\n WebLabel6.HeightPercent := 100.000000000000000000;\r\n WebLabel6.ParentFont := False;\r\n WebLabel6.WidthStyle := ssAuto;\r\n WebLabel6.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel6, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel6, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel6, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel6, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton4.SetParentComponent(WebPanel8);\r\n WebSpeedButton4.Name := 'WebSpeedButton4';\r\n WebSpeedButton4.Left := 0;\r\n WebSpeedButton4.Top := 0;\r\n WebSpeedButton4.Width := 24;\r\n WebSpeedButton4.Height := 28;\r\n WebSpeedButton4.Cursor := crHandPoint;\r\n WebSpeedButton4.Hint := 'Edit';\r\n WebSpeedButton4.Align := alLeft;\r\n WebSpeedButton4.Color := clNone;\r\n WebSpeedButton4.Flat := True;\r\n WebSpeedButton4.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton4.Font.Color := clBlack;\r\n WebSpeedButton4.Font.Height := -13;\r\n WebSpeedButton4.Font.Name := 'Tahoma';\r\n WebSpeedButton4.Font.Style := [];\r\n WebSpeedButton4.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton4.MaterialGlyph := 'edit';\r\n WebSpeedButton4.ParentFont := False;\r\n WebSpeedButton4.ShowHint := True;\r\n WebSpeedButton4.TabOrder := 0;\r\n WebSpeedButton4.Visible := False;\r\n WebSpeedButton4.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton4, Self, 'OnClick', '_BlockCallPickForm');\r\n M24.SetParentComponent(B24);\r\n M24.Name := 'M24';\r\n M24.Left := 0;\r\n M24.Top := 56;\r\n M24.Width := 100;\r\n M24.Height := 24;\r\n M24.Align := alBottom;\r\n M24.BorderStyle := bsNone;\r\n M24.ElementClassName := 'block_memo';\r\n M24.ElementFont := efCSS;\r\n M24.Font.Charset := ANSI_CHARSET;\r\n M24.Font.Color := clBlack;\r\n M24.Font.Height := -13;\r\n M24.Font.Name := 'Tahoma';\r\n M24.Font.Style := [];\r\n M24.HeightPercent := 100.000000000000000000;\r\n M24.ParentFont := False;\r\n M24.SelLength := 0;\r\n M24.SelStart := 0;\r\n M24.ShowFocus := False;\r\n M24.WidthPercent := 100.000000000000000000;\r\n SetEvent(M24, Self, 'OnChange', 'M21Change');\r\n SetEvent(M24, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M24, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M24, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M24, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M24, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M24, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer25.SetParentComponent(B24);\r\n WebHTMLContainer25.Name := 'WebHTMLContainer25';\r\n WebHTMLContainer25.Left := 0;\r\n WebHTMLContainer25.Top := 41;\r\n WebHTMLContainer25.Width := 100;\r\n WebHTMLContainer25.Height := 15;\r\n WebHTMLContainer25.HeightStyle := ssAuto;\r\n WebHTMLContainer25.Align := alBottom;\r\n WebHTMLContainer25.ChildOrder := 2;\r\n WebHTMLContainer25.Visible := False;\r\n SetEvent(WebHTMLContainer25, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer25, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer25, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B29.SetParentComponent(SubForm_DIV);\r\n B29.Name := 'B29';\r\n B29.Left := 419;\r\n B29.Top := 394;\r\n B29.Width := 100;\r\n B29.Height := 80;\r\n B29.ElementClassName := 'data_block';\r\n B29.BorderColor := clWhite;\r\n B29.ChildOrder := 29;\r\n B29.Color := clWhite;\r\n B29.ElementFont := efCSS;\r\n B29.Font.Charset := ANSI_CHARSET;\r\n B29.Font.Color := clBlack;\r\n B29.Font.Height := -13;\r\n B29.Font.Name := 'Tahoma';\r\n B29.Font.Style := [];\r\n B29.ParentFont := False;\r\n B29.TabOrder := 10;\r\n SetEvent(B29, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B29, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel19.SetParentComponent(B29);\r\n WebPanel19.Name := 'WebPanel19';\r\n WebPanel19.Left := 0;\r\n WebPanel19.Top := 0;\r\n WebPanel19.Width := 100;\r\n WebPanel19.Height := 28;\r\n WebPanel19.ElementClassName := 'block_top';\r\n WebPanel19.HeightStyle := ssAuto;\r\n WebPanel19.Align := alTop;\r\n WebPanel19.BorderStyle := bsNone;\r\n WebPanel19.ChildOrder := 2;\r\n WebPanel19.Color := clWhite;\r\n WebPanel19.DragMode := dmAutomatic;\r\n WebPanel19.ElementFont := efCSS;\r\n WebPanel19.TabOrder := 0;\r\n SetEvent(WebPanel19, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel19, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel19, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel19, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel11.SetParentComponent(WebPanel19);\r\n WebLabel11.Name := 'WebLabel11';\r\n WebLabel11.Left := 24;\r\n WebLabel11.Top := 0;\r\n WebLabel11.Width := 22;\r\n WebLabel11.Height := 26;\r\n WebLabel11.Cursor := crHandPoint;\r\n WebLabel11.Hint := 'Setting Unit';\r\n WebLabel11.Align := alLeft;\r\n WebLabel11.Caption := '29';\r\n WebLabel11.DragMode := dmAutomatic;\r\n WebLabel11.ElementClassName := 'block_title';\r\n WebLabel11.ElementLabelClassName := 'block_title';\r\n WebLabel11.ElementFont := efCSS;\r\n WebLabel11.Font.Charset := ANSI_CHARSET;\r\n WebLabel11.Font.Color := clNavy;\r\n WebLabel11.Font.Height := -19;\r\n WebLabel11.Font.Name := 'Segoe UI Emoji';\r\n WebLabel11.Font.Style := [fsBold];\r\n WebLabel11.HeightPercent := 100.000000000000000000;\r\n WebLabel11.ParentFont := False;\r\n WebLabel11.WidthStyle := ssAuto;\r\n WebLabel11.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel11, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel11, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel11, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel11, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton9.SetParentComponent(WebPanel19);\r\n WebSpeedButton9.Name := 'WebSpeedButton9';\r\n WebSpeedButton9.Left := 0;\r\n WebSpeedButton9.Top := 0;\r\n WebSpeedButton9.Width := 24;\r\n WebSpeedButton9.Height := 28;\r\n WebSpeedButton9.Cursor := crHandPoint;\r\n WebSpeedButton9.Hint := 'Edit';\r\n WebSpeedButton9.Align := alLeft;\r\n WebSpeedButton9.Color := clNone;\r\n WebSpeedButton9.Flat := True;\r\n WebSpeedButton9.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton9.Font.Color := clBlack;\r\n WebSpeedButton9.Font.Height := -13;\r\n WebSpeedButton9.Font.Name := 'Tahoma';\r\n WebSpeedButton9.Font.Style := [];\r\n WebSpeedButton9.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton9.MaterialGlyph := 'edit';\r\n WebSpeedButton9.ParentFont := False;\r\n WebSpeedButton9.ShowHint := True;\r\n WebSpeedButton9.TabOrder := 0;\r\n WebSpeedButton9.Visible := False;\r\n WebSpeedButton9.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton9, Self, 'OnClick', '_BlockCallPickForm');\r\n M29.SetParentComponent(B29);\r\n M29.Name := 'M29';\r\n M29.Left := 0;\r\n M29.Top := 56;\r\n M29.Width := 100;\r\n M29.Height := 24;\r\n M29.Align := alBottom;\r\n M29.BorderStyle := bsNone;\r\n M29.ElementClassName := 'block_memo';\r\n M29.ElementFont := efCSS;\r\n M29.Font.Charset := ANSI_CHARSET;\r\n M29.Font.Color := clBlack;\r\n M29.Font.Height := -13;\r\n M29.Font.Name := 'Tahoma';\r\n M29.Font.Style := [];\r\n M29.HeightPercent := 100.000000000000000000;\r\n M29.ParentFont := False;\r\n M29.SelLength := 0;\r\n M29.SelStart := 0;\r\n M29.ShowFocus := False;\r\n M29.WidthPercent := 100.000000000000000000;\r\n SetEvent(M29, Self, 'OnChange', 'M21Change');\r\n SetEvent(M29, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M29, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M29, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M29, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M29, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M29, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer30.SetParentComponent(B29);\r\n WebHTMLContainer30.Name := 'WebHTMLContainer30';\r\n WebHTMLContainer30.Left := 0;\r\n WebHTMLContainer30.Top := 41;\r\n WebHTMLContainer30.Width := 100;\r\n WebHTMLContainer30.Height := 15;\r\n WebHTMLContainer30.HeightStyle := ssAuto;\r\n WebHTMLContainer30.Align := alBottom;\r\n WebHTMLContainer30.ChildOrder := 2;\r\n WebHTMLContainer30.Visible := False;\r\n SetEvent(WebHTMLContainer30, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer30, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer30, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B28.SetParentComponent(SubForm_DIV);\r\n B28.Name := 'B28';\r\n B28.Left := 298;\r\n B28.Top := 394;\r\n B28.Width := 100;\r\n B28.Height := 80;\r\n B28.ElementClassName := 'data_block';\r\n B28.BorderColor := clWhite;\r\n B28.ChildOrder := 28;\r\n B28.Color := clWhite;\r\n B28.ElementFont := efCSS;\r\n B28.Font.Charset := ANSI_CHARSET;\r\n B28.Font.Color := clBlack;\r\n B28.Font.Height := -13;\r\n B28.Font.Name := 'Tahoma';\r\n B28.Font.Style := [];\r\n B28.ParentFont := False;\r\n B28.TabOrder := 11;\r\n SetEvent(B28, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B28, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel17.SetParentComponent(B28);\r\n WebPanel17.Name := 'WebPanel17';\r\n WebPanel17.Left := 0;\r\n WebPanel17.Top := 0;\r\n WebPanel17.Width := 100;\r\n WebPanel17.Height := 28;\r\n WebPanel17.ElementClassName := 'block_top';\r\n WebPanel17.HeightStyle := ssAuto;\r\n WebPanel17.Align := alTop;\r\n WebPanel17.BorderStyle := bsNone;\r\n WebPanel17.ChildOrder := 2;\r\n WebPanel17.Color := clWhite;\r\n WebPanel17.DragMode := dmAutomatic;\r\n WebPanel17.ElementFont := efCSS;\r\n WebPanel17.TabOrder := 0;\r\n SetEvent(WebPanel17, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel17, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel17, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel17, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel10.SetParentComponent(WebPanel17);\r\n WebLabel10.Name := 'WebLabel10';\r\n WebLabel10.Left := 24;\r\n WebLabel10.Top := 0;\r\n WebLabel10.Width := 22;\r\n WebLabel10.Height := 26;\r\n WebLabel10.Cursor := crHandPoint;\r\n WebLabel10.Hint := 'Setting Unit';\r\n WebLabel10.Align := alLeft;\r\n WebLabel10.Caption := '28';\r\n WebLabel10.DragMode := dmAutomatic;\r\n WebLabel10.ElementClassName := 'block_title';\r\n WebLabel10.ElementLabelClassName := 'block_title';\r\n WebLabel10.ElementFont := efCSS;\r\n WebLabel10.Font.Charset := ANSI_CHARSET;\r\n WebLabel10.Font.Color := clNavy;\r\n WebLabel10.Font.Height := -19;\r\n WebLabel10.Font.Name := 'Segoe UI Emoji';\r\n WebLabel10.Font.Style := [fsBold];\r\n WebLabel10.HeightPercent := 100.000000000000000000;\r\n WebLabel10.ParentFont := False;\r\n WebLabel10.WidthStyle := ssAuto;\r\n WebLabel10.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel10, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel10, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel10, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel10, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton8.SetParentComponent(WebPanel17);\r\n WebSpeedButton8.Name := 'WebSpeedButton8';\r\n WebSpeedButton8.Left := 0;\r\n WebSpeedButton8.Top := 0;\r\n WebSpeedButton8.Width := 24;\r\n WebSpeedButton8.Height := 28;\r\n WebSpeedButton8.Cursor := crHandPoint;\r\n WebSpeedButton8.Hint := 'Edit';\r\n WebSpeedButton8.Align := alLeft;\r\n WebSpeedButton8.Color := clNone;\r\n WebSpeedButton8.Flat := True;\r\n WebSpeedButton8.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton8.Font.Color := clBlack;\r\n WebSpeedButton8.Font.Height := -13;\r\n WebSpeedButton8.Font.Name := 'Tahoma';\r\n WebSpeedButton8.Font.Style := [];\r\n WebSpeedButton8.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton8.MaterialGlyph := 'edit';\r\n WebSpeedButton8.ParentFont := False;\r\n WebSpeedButton8.ShowHint := True;\r\n WebSpeedButton8.TabOrder := 0;\r\n WebSpeedButton8.Visible := False;\r\n WebSpeedButton8.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton8, Self, 'OnClick', '_BlockCallPickForm');\r\n M28.SetParentComponent(B28);\r\n M28.Name := 'M28';\r\n M28.Left := 0;\r\n M28.Top := 56;\r\n M28.Width := 100;\r\n M28.Height := 24;\r\n M28.Align := alBottom;\r\n M28.BorderStyle := bsNone;\r\n M28.ElementClassName := 'block_memo';\r\n M28.ElementFont := efCSS;\r\n M28.Font.Charset := ANSI_CHARSET;\r\n M28.Font.Color := clBlack;\r\n M28.Font.Height := -13;\r\n M28.Font.Name := 'Tahoma';\r\n M28.Font.Style := [];\r\n M28.HeightPercent := 100.000000000000000000;\r\n M28.ParentFont := False;\r\n M28.SelLength := 0;\r\n M28.SelStart := 0;\r\n M28.ShowFocus := False;\r\n M28.WidthPercent := 100.000000000000000000;\r\n SetEvent(M28, Self, 'OnChange', 'M21Change');\r\n SetEvent(M28, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M28, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M28, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M28, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M28, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M28, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer29.SetParentComponent(B28);\r\n WebHTMLContainer29.Name := 'WebHTMLContainer29';\r\n WebHTMLContainer29.Left := 0;\r\n WebHTMLContainer29.Top := 41;\r\n WebHTMLContainer29.Width := 100;\r\n WebHTMLContainer29.Height := 15;\r\n WebHTMLContainer29.HeightStyle := ssAuto;\r\n WebHTMLContainer29.Align := alBottom;\r\n WebHTMLContainer29.ChildOrder := 2;\r\n WebHTMLContainer29.Visible := False;\r\n SetEvent(WebHTMLContainer29, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer29, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer29, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B27.SetParentComponent(SubForm_DIV);\r\n B27.Name := 'B27';\r\n B27.Left := 178;\r\n B27.Top := 394;\r\n B27.Width := 100;\r\n B27.Height := 80;\r\n B27.ElementClassName := 'data_block';\r\n B27.BorderColor := clWhite;\r\n B27.ChildOrder := 27;\r\n B27.Color := clWhite;\r\n B27.ElementFont := efCSS;\r\n B27.Font.Charset := ANSI_CHARSET;\r\n B27.Font.Color := clBlack;\r\n B27.Font.Height := -13;\r\n B27.Font.Name := 'Tahoma';\r\n B27.Font.Style := [];\r\n B27.ParentFont := False;\r\n B27.TabOrder := 12;\r\n SetEvent(B27, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B27, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel15.SetParentComponent(B27);\r\n WebPanel15.Name := 'WebPanel15';\r\n WebPanel15.Left := 0;\r\n WebPanel15.Top := 0;\r\n WebPanel15.Width := 100;\r\n WebPanel15.Height := 28;\r\n WebPanel15.ElementClassName := 'block_top';\r\n WebPanel15.HeightStyle := ssAuto;\r\n WebPanel15.Align := alTop;\r\n WebPanel15.BorderStyle := bsNone;\r\n WebPanel15.ChildOrder := 2;\r\n WebPanel15.Color := clWhite;\r\n WebPanel15.DragMode := dmAutomatic;\r\n WebPanel15.ElementFont := efCSS;\r\n WebPanel15.TabOrder := 0;\r\n SetEvent(WebPanel15, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel15, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel15, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel15, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel9.SetParentComponent(WebPanel15);\r\n WebLabel9.Name := 'WebLabel9';\r\n WebLabel9.Left := 24;\r\n WebLabel9.Top := 0;\r\n WebLabel9.Width := 22;\r\n WebLabel9.Height := 26;\r\n WebLabel9.Cursor := crHandPoint;\r\n WebLabel9.Hint := 'Setting Unit';\r\n WebLabel9.Align := alLeft;\r\n WebLabel9.Caption := '27';\r\n WebLabel9.DragMode := dmAutomatic;\r\n WebLabel9.ElementClassName := 'block_title';\r\n WebLabel9.ElementLabelClassName := 'block_title';\r\n WebLabel9.ElementFont := efCSS;\r\n WebLabel9.Font.Charset := ANSI_CHARSET;\r\n WebLabel9.Font.Color := clNavy;\r\n WebLabel9.Font.Height := -19;\r\n WebLabel9.Font.Name := 'Segoe UI Emoji';\r\n WebLabel9.Font.Style := [fsBold];\r\n WebLabel9.HeightPercent := 100.000000000000000000;\r\n WebLabel9.ParentFont := False;\r\n WebLabel9.WidthStyle := ssAuto;\r\n WebLabel9.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel9, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel9, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel9, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel9, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton7.SetParentComponent(WebPanel15);\r\n WebSpeedButton7.Name := 'WebSpeedButton7';\r\n WebSpeedButton7.Left := 0;\r\n WebSpeedButton7.Top := 0;\r\n WebSpeedButton7.Width := 24;\r\n WebSpeedButton7.Height := 28;\r\n WebSpeedButton7.Cursor := crHandPoint;\r\n WebSpeedButton7.Hint := 'Edit';\r\n WebSpeedButton7.Align := alLeft;\r\n WebSpeedButton7.Color := clNone;\r\n WebSpeedButton7.Flat := True;\r\n WebSpeedButton7.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton7.Font.Color := clBlack;\r\n WebSpeedButton7.Font.Height := -13;\r\n WebSpeedButton7.Font.Name := 'Tahoma';\r\n WebSpeedButton7.Font.Style := [];\r\n WebSpeedButton7.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton7.MaterialGlyph := 'edit';\r\n WebSpeedButton7.ParentFont := False;\r\n WebSpeedButton7.ShowHint := True;\r\n WebSpeedButton7.TabOrder := 0;\r\n WebSpeedButton7.Visible := False;\r\n WebSpeedButton7.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton7, Self, 'OnClick', '_BlockCallPickForm');\r\n M27.SetParentComponent(B27);\r\n M27.Name := 'M27';\r\n M27.Left := 0;\r\n M27.Top := 56;\r\n M27.Width := 100;\r\n M27.Height := 24;\r\n M27.Align := alBottom;\r\n M27.BorderStyle := bsNone;\r\n M27.ElementClassName := 'block_memo';\r\n M27.ElementFont := efCSS;\r\n M27.Font.Charset := ANSI_CHARSET;\r\n M27.Font.Color := clBlack;\r\n M27.Font.Height := -13;\r\n M27.Font.Name := 'Tahoma';\r\n M27.Font.Style := [];\r\n M27.HeightPercent := 100.000000000000000000;\r\n M27.ParentFont := False;\r\n M27.SelLength := 0;\r\n M27.SelStart := 0;\r\n M27.ShowFocus := False;\r\n M27.WidthPercent := 100.000000000000000000;\r\n SetEvent(M27, Self, 'OnChange', 'M21Change');\r\n SetEvent(M27, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M27, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M27, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M27, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M27, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M27, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer28.SetParentComponent(B27);\r\n WebHTMLContainer28.Name := 'WebHTMLContainer28';\r\n WebHTMLContainer28.Left := 0;\r\n WebHTMLContainer28.Top := 41;\r\n WebHTMLContainer28.Width := 100;\r\n WebHTMLContainer28.Height := 15;\r\n WebHTMLContainer28.HeightStyle := ssAuto;\r\n WebHTMLContainer28.Align := alBottom;\r\n WebHTMLContainer28.ChildOrder := 2;\r\n WebHTMLContainer28.Visible := False;\r\n SetEvent(WebHTMLContainer28, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer28, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer28, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B16.SetParentComponent(SubForm_DIV);\r\n B16.Name := 'B16';\r\n B16.Left := 57;\r\n B16.Top := 240;\r\n B16.Width := 100;\r\n B16.Height := 80;\r\n B16.ElementClassName := 'data_block';\r\n B16.BorderColor := clWhite;\r\n B16.ChildOrder := 16;\r\n B16.Color := clWhite;\r\n B16.ElementFont := efCSS;\r\n B16.Font.Charset := ANSI_CHARSET;\r\n B16.Font.Color := clBlack;\r\n B16.Font.Height := -13;\r\n B16.Font.Name := 'Tahoma';\r\n B16.Font.Style := [];\r\n B16.ParentFont := False;\r\n B16.TabOrder := 13;\r\n SetEvent(B16, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B16, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel107.SetParentComponent(B16);\r\n WebPanel107.Name := 'WebPanel107';\r\n WebPanel107.Left := 0;\r\n WebPanel107.Top := 0;\r\n WebPanel107.Width := 100;\r\n WebPanel107.Height := 28;\r\n WebPanel107.ElementClassName := 'block_top';\r\n WebPanel107.HeightStyle := ssAuto;\r\n WebPanel107.Align := alTop;\r\n WebPanel107.BorderStyle := bsNone;\r\n WebPanel107.ChildOrder := 2;\r\n WebPanel107.Color := clWhite;\r\n WebPanel107.DragMode := dmAutomatic;\r\n WebPanel107.ElementFont := efCSS;\r\n WebPanel107.TabOrder := 0;\r\n SetEvent(WebPanel107, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel107, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel107, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel107, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel53.SetParentComponent(WebPanel107);\r\n WebLabel53.Name := 'WebLabel53';\r\n WebLabel53.Left := 24;\r\n WebLabel53.Top := 0;\r\n WebLabel53.Width := 22;\r\n WebLabel53.Height := 26;\r\n WebLabel53.Cursor := crHandPoint;\r\n WebLabel53.Hint := 'Setting Unit';\r\n WebLabel53.Align := alLeft;\r\n WebLabel53.Caption := '16';\r\n WebLabel53.DragMode := dmAutomatic;\r\n WebLabel53.ElementClassName := 'block_title';\r\n WebLabel53.ElementLabelClassName := 'block_title';\r\n WebLabel53.ElementFont := efCSS;\r\n WebLabel53.Font.Charset := ANSI_CHARSET;\r\n WebLabel53.Font.Color := clNavy;\r\n WebLabel53.Font.Height := -19;\r\n WebLabel53.Font.Name := 'Segoe UI Emoji';\r\n WebLabel53.Font.Style := [fsBold];\r\n WebLabel53.HeightPercent := 100.000000000000000000;\r\n WebLabel53.ParentFont := False;\r\n WebLabel53.WidthStyle := ssAuto;\r\n WebLabel53.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel53, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel53, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel53, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel53, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton50.SetParentComponent(WebPanel107);\r\n WebSpeedButton50.Name := 'WebSpeedButton50';\r\n WebSpeedButton50.Left := 0;\r\n WebSpeedButton50.Top := 0;\r\n WebSpeedButton50.Width := 24;\r\n WebSpeedButton50.Height := 28;\r\n WebSpeedButton50.Cursor := crHandPoint;\r\n WebSpeedButton50.Hint := 'Edit';\r\n WebSpeedButton50.Align := alLeft;\r\n WebSpeedButton50.Color := clNone;\r\n WebSpeedButton50.Flat := True;\r\n WebSpeedButton50.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton50.Font.Color := clBlack;\r\n WebSpeedButton50.Font.Height := -13;\r\n WebSpeedButton50.Font.Name := 'Tahoma';\r\n WebSpeedButton50.Font.Style := [];\r\n WebSpeedButton50.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton50.MaterialGlyph := 'edit';\r\n WebSpeedButton50.ParentFont := False;\r\n WebSpeedButton50.ShowHint := True;\r\n WebSpeedButton50.TabOrder := 0;\r\n WebSpeedButton50.Visible := False;\r\n WebSpeedButton50.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton50, Self, 'OnClick', '_BlockCallPickForm');\r\n M16.SetParentComponent(B16);\r\n M16.Name := 'M16';\r\n M16.Left := 0;\r\n M16.Top := 56;\r\n M16.Width := 100;\r\n M16.Height := 24;\r\n M16.Align := alBottom;\r\n M16.BorderStyle := bsNone;\r\n M16.ElementClassName := 'block_memo';\r\n M16.ElementFont := efCSS;\r\n M16.Font.Charset := ANSI_CHARSET;\r\n M16.Font.Color := clBlack;\r\n M16.Font.Height := -13;\r\n M16.Font.Name := 'Tahoma';\r\n M16.Font.Style := [];\r\n M16.HeightPercent := 100.000000000000000000;\r\n M16.ParentFont := False;\r\n M16.SelLength := 0;\r\n M16.SelStart := 0;\r\n M16.ShowFocus := False;\r\n M16.WidthPercent := 100.000000000000000000;\r\n SetEvent(M16, Self, 'OnChange', 'M21Change');\r\n SetEvent(M16, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M16, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M16, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M16, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M16, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M16, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer21.SetParentComponent(B16);\r\n WebHTMLContainer21.Name := 'WebHTMLContainer21';\r\n WebHTMLContainer21.Left := 0;\r\n WebHTMLContainer21.Top := 41;\r\n WebHTMLContainer21.Width := 100;\r\n WebHTMLContainer21.Height := 15;\r\n WebHTMLContainer21.HeightStyle := ssAuto;\r\n WebHTMLContainer21.Align := alBottom;\r\n WebHTMLContainer21.ChildOrder := 2;\r\n WebHTMLContainer21.Visible := False;\r\n SetEvent(WebHTMLContainer21, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer21, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer21, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B17.SetParentComponent(SubForm_DIV);\r\n B17.Name := 'B17';\r\n B17.Left := 178;\r\n B17.Top := 240;\r\n B17.Width := 100;\r\n B17.Height := 80;\r\n B17.ElementClassName := 'data_block';\r\n B17.BorderColor := clWhite;\r\n B17.ChildOrder := 17;\r\n B17.Color := clWhite;\r\n B17.ElementFont := efCSS;\r\n B17.Font.Charset := ANSI_CHARSET;\r\n B17.Font.Color := clBlack;\r\n B17.Font.Height := -13;\r\n B17.Font.Name := 'Tahoma';\r\n B17.Font.Style := [];\r\n B17.ParentFont := False;\r\n B17.TabOrder := 14;\r\n SetEvent(B17, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B17, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel109.SetParentComponent(B17);\r\n WebPanel109.Name := 'WebPanel109';\r\n WebPanel109.Left := 0;\r\n WebPanel109.Top := 0;\r\n WebPanel109.Width := 100;\r\n WebPanel109.Height := 28;\r\n WebPanel109.ElementClassName := 'block_top';\r\n WebPanel109.HeightStyle := ssAuto;\r\n WebPanel109.Align := alTop;\r\n WebPanel109.BorderStyle := bsNone;\r\n WebPanel109.ChildOrder := 2;\r\n WebPanel109.Color := clWhite;\r\n WebPanel109.DragMode := dmAutomatic;\r\n WebPanel109.ElementFont := efCSS;\r\n WebPanel109.TabOrder := 0;\r\n SetEvent(WebPanel109, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel109, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel109, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel109, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel54.SetParentComponent(WebPanel109);\r\n WebLabel54.Name := 'WebLabel54';\r\n WebLabel54.Left := 24;\r\n WebLabel54.Top := 0;\r\n WebLabel54.Width := 22;\r\n WebLabel54.Height := 26;\r\n WebLabel54.Cursor := crHandPoint;\r\n WebLabel54.Hint := 'Setting Unit';\r\n WebLabel54.Align := alLeft;\r\n WebLabel54.Caption := '17';\r\n WebLabel54.DragMode := dmAutomatic;\r\n WebLabel54.ElementClassName := 'block_title';\r\n WebLabel54.ElementLabelClassName := 'block_title';\r\n WebLabel54.ElementFont := efCSS;\r\n WebLabel54.Font.Charset := ANSI_CHARSET;\r\n WebLabel54.Font.Color := clNavy;\r\n WebLabel54.Font.Height := -19;\r\n WebLabel54.Font.Name := 'Segoe UI Emoji';\r\n WebLabel54.Font.Style := [fsBold];\r\n WebLabel54.HeightPercent := 100.000000000000000000;\r\n WebLabel54.ParentFont := False;\r\n WebLabel54.WidthStyle := ssAuto;\r\n WebLabel54.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel54, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel54, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel54, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel54, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton51.SetParentComponent(WebPanel109);\r\n WebSpeedButton51.Name := 'WebSpeedButton51';\r\n WebSpeedButton51.Left := 0;\r\n WebSpeedButton51.Top := 0;\r\n WebSpeedButton51.Width := 24;\r\n WebSpeedButton51.Height := 28;\r\n WebSpeedButton51.Cursor := crHandPoint;\r\n WebSpeedButton51.Hint := 'Edit';\r\n WebSpeedButton51.Align := alLeft;\r\n WebSpeedButton51.Color := clNone;\r\n WebSpeedButton51.Flat := True;\r\n WebSpeedButton51.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton51.Font.Color := clBlack;\r\n WebSpeedButton51.Font.Height := -13;\r\n WebSpeedButton51.Font.Name := 'Tahoma';\r\n WebSpeedButton51.Font.Style := [];\r\n WebSpeedButton51.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton51.MaterialGlyph := 'edit';\r\n WebSpeedButton51.ParentFont := False;\r\n WebSpeedButton51.ShowHint := True;\r\n WebSpeedButton51.TabOrder := 0;\r\n WebSpeedButton51.Visible := False;\r\n WebSpeedButton51.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton51, Self, 'OnClick', '_BlockCallPickForm');\r\n M17.SetParentComponent(B17);\r\n M17.Name := 'M17';\r\n M17.Left := 0;\r\n M17.Top := 56;\r\n M17.Width := 100;\r\n M17.Height := 24;\r\n M17.Align := alBottom;\r\n M17.BorderStyle := bsNone;\r\n M17.ElementClassName := 'block_memo';\r\n M17.ElementFont := efCSS;\r\n M17.Font.Charset := ANSI_CHARSET;\r\n M17.Font.Color := clBlack;\r\n M17.Font.Height := -13;\r\n M17.Font.Name := 'Tahoma';\r\n M17.Font.Style := [];\r\n M17.HeightPercent := 100.000000000000000000;\r\n M17.ParentFont := False;\r\n M17.SelLength := 0;\r\n M17.SelStart := 0;\r\n M17.ShowFocus := False;\r\n M17.WidthPercent := 100.000000000000000000;\r\n SetEvent(M17, Self, 'OnChange', 'M21Change');\r\n SetEvent(M17, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M17, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M17, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M17, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M17, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M17, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer20.SetParentComponent(B17);\r\n WebHTMLContainer20.Name := 'WebHTMLContainer20';\r\n WebHTMLContainer20.Left := 0;\r\n WebHTMLContainer20.Top := 41;\r\n WebHTMLContainer20.Width := 100;\r\n WebHTMLContainer20.Height := 15;\r\n WebHTMLContainer20.HeightStyle := ssAuto;\r\n WebHTMLContainer20.Align := alBottom;\r\n WebHTMLContainer20.ChildOrder := 2;\r\n WebHTMLContainer20.Visible := False;\r\n SetEvent(WebHTMLContainer20, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer20, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer20, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B15.SetParentComponent(SubForm_DIV);\r\n B15.Name := 'B15';\r\n B15.Left := 540;\r\n B15.Top := 161;\r\n B15.Width := 100;\r\n B15.Height := 80;\r\n B15.ElementClassName := 'data_block';\r\n B15.BorderColor := clWhite;\r\n B15.ChildOrder := 15;\r\n B15.Color := clWhite;\r\n B15.ElementFont := efCSS;\r\n B15.Font.Charset := ANSI_CHARSET;\r\n B15.Font.Color := clBlack;\r\n B15.Font.Height := -13;\r\n B15.Font.Name := 'Tahoma';\r\n B15.Font.Style := [];\r\n B15.ParentFont := False;\r\n B15.TabOrder := 15;\r\n SetEvent(B15, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B15, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel97.SetParentComponent(B15);\r\n WebPanel97.Name := 'WebPanel97';\r\n WebPanel97.Left := 0;\r\n WebPanel97.Top := 0;\r\n WebPanel97.Width := 100;\r\n WebPanel97.Height := 28;\r\n WebPanel97.ElementClassName := 'block_top';\r\n WebPanel97.HeightStyle := ssAuto;\r\n WebPanel97.Align := alTop;\r\n WebPanel97.BorderStyle := bsNone;\r\n WebPanel97.ChildOrder := 2;\r\n WebPanel97.Color := clWhite;\r\n WebPanel97.DragMode := dmAutomatic;\r\n WebPanel97.ElementFont := efCSS;\r\n WebPanel97.TabOrder := 0;\r\n SetEvent(WebPanel97, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel97, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel97, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel97, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel48.SetParentComponent(WebPanel97);\r\n WebLabel48.Name := 'WebLabel48';\r\n WebLabel48.Left := 24;\r\n WebLabel48.Top := 0;\r\n WebLabel48.Width := 22;\r\n WebLabel48.Height := 26;\r\n WebLabel48.Cursor := crHandPoint;\r\n WebLabel48.Hint := 'Setting Unit';\r\n WebLabel48.Align := alLeft;\r\n WebLabel48.Caption := '15';\r\n WebLabel48.DragMode := dmAutomatic;\r\n WebLabel48.ElementClassName := 'block_title';\r\n WebLabel48.ElementLabelClassName := 'block_title';\r\n WebLabel48.ElementFont := efCSS;\r\n WebLabel48.Font.Charset := ANSI_CHARSET;\r\n WebLabel48.Font.Color := clNavy;\r\n WebLabel48.Font.Height := -19;\r\n WebLabel48.Font.Name := 'Segoe UI Emoji';\r\n WebLabel48.Font.Style := [fsBold];\r\n WebLabel48.HeightPercent := 100.000000000000000000;\r\n WebLabel48.ParentFont := False;\r\n WebLabel48.WidthStyle := ssAuto;\r\n WebLabel48.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel48, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel48, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel48, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel48, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton45.SetParentComponent(WebPanel97);\r\n WebSpeedButton45.Name := 'WebSpeedButton45';\r\n WebSpeedButton45.Left := 0;\r\n WebSpeedButton45.Top := 0;\r\n WebSpeedButton45.Width := 24;\r\n WebSpeedButton45.Height := 28;\r\n WebSpeedButton45.Cursor := crHandPoint;\r\n WebSpeedButton45.Hint := 'Edit';\r\n WebSpeedButton45.Align := alLeft;\r\n WebSpeedButton45.Color := clNone;\r\n WebSpeedButton45.Flat := True;\r\n WebSpeedButton45.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton45.Font.Color := clBlack;\r\n WebSpeedButton45.Font.Height := -13;\r\n WebSpeedButton45.Font.Name := 'Tahoma';\r\n WebSpeedButton45.Font.Style := [];\r\n WebSpeedButton45.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton45.MaterialGlyph := 'edit';\r\n WebSpeedButton45.ParentFont := False;\r\n WebSpeedButton45.ShowHint := True;\r\n WebSpeedButton45.TabOrder := 0;\r\n WebSpeedButton45.Visible := False;\r\n WebSpeedButton45.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton45, Self, 'OnClick', '_BlockCallPickForm');\r\n M15.SetParentComponent(B15);\r\n M15.Name := 'M15';\r\n M15.Left := 0;\r\n M15.Top := 56;\r\n M15.Width := 100;\r\n M15.Height := 24;\r\n M15.Align := alBottom;\r\n M15.BorderStyle := bsNone;\r\n M15.ElementClassName := 'block_memo';\r\n M15.ElementFont := efCSS;\r\n M15.Font.Charset := ANSI_CHARSET;\r\n M15.Font.Color := clBlack;\r\n M15.Font.Height := -13;\r\n M15.Font.Name := 'Tahoma';\r\n M15.Font.Style := [];\r\n M15.HeightPercent := 100.000000000000000000;\r\n M15.ParentFont := False;\r\n M15.SelLength := 0;\r\n M15.SelStart := 0;\r\n M15.ShowFocus := False;\r\n M15.WidthPercent := 100.000000000000000000;\r\n SetEvent(M15, Self, 'OnChange', 'M21Change');\r\n SetEvent(M15, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M15, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M15, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M15, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M15, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M15, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer16.SetParentComponent(B15);\r\n WebHTMLContainer16.Name := 'WebHTMLContainer16';\r\n WebHTMLContainer16.Left := 0;\r\n WebHTMLContainer16.Top := 41;\r\n WebHTMLContainer16.Width := 100;\r\n WebHTMLContainer16.Height := 15;\r\n WebHTMLContainer16.HeightStyle := ssAuto;\r\n WebHTMLContainer16.Align := alBottom;\r\n WebHTMLContainer16.ChildOrder := 2;\r\n WebHTMLContainer16.Visible := False;\r\n SetEvent(WebHTMLContainer16, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer16, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer16, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B14.SetParentComponent(SubForm_DIV);\r\n B14.Name := 'B14';\r\n B14.Left := 419;\r\n B14.Top := 161;\r\n B14.Width := 100;\r\n B14.Height := 80;\r\n B14.ElementClassName := 'data_block';\r\n B14.BorderColor := clWhite;\r\n B14.ChildOrder := 14;\r\n B14.Color := clWhite;\r\n B14.ElementFont := efCSS;\r\n B14.Font.Charset := ANSI_CHARSET;\r\n B14.Font.Color := clBlack;\r\n B14.Font.Height := -13;\r\n B14.Font.Name := 'Tahoma';\r\n B14.Font.Style := [];\r\n B14.ParentFont := False;\r\n B14.TabOrder := 16;\r\n SetEvent(B14, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B14, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel99.SetParentComponent(B14);\r\n WebPanel99.Name := 'WebPanel99';\r\n WebPanel99.Left := 0;\r\n WebPanel99.Top := 0;\r\n WebPanel99.Width := 100;\r\n WebPanel99.Height := 28;\r\n WebPanel99.ElementClassName := 'block_top';\r\n WebPanel99.HeightStyle := ssAuto;\r\n WebPanel99.Align := alTop;\r\n WebPanel99.BorderStyle := bsNone;\r\n WebPanel99.ChildOrder := 2;\r\n WebPanel99.Color := clWhite;\r\n WebPanel99.DragMode := dmAutomatic;\r\n WebPanel99.ElementFont := efCSS;\r\n WebPanel99.TabOrder := 0;\r\n SetEvent(WebPanel99, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel99, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel99, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel99, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel49.SetParentComponent(WebPanel99);\r\n WebLabel49.Name := 'WebLabel49';\r\n WebLabel49.Left := 24;\r\n WebLabel49.Top := 0;\r\n WebLabel49.Width := 22;\r\n WebLabel49.Height := 26;\r\n WebLabel49.Cursor := crHandPoint;\r\n WebLabel49.Hint := 'Setting Unit';\r\n WebLabel49.Align := alLeft;\r\n WebLabel49.Caption := '14';\r\n WebLabel49.DragMode := dmAutomatic;\r\n WebLabel49.ElementClassName := 'block_title';\r\n WebLabel49.ElementLabelClassName := 'block_title';\r\n WebLabel49.ElementFont := efCSS;\r\n WebLabel49.Font.Charset := ANSI_CHARSET;\r\n WebLabel49.Font.Color := clNavy;\r\n WebLabel49.Font.Height := -19;\r\n WebLabel49.Font.Name := 'Segoe UI Emoji';\r\n WebLabel49.Font.Style := [fsBold];\r\n WebLabel49.HeightPercent := 100.000000000000000000;\r\n WebLabel49.ParentFont := False;\r\n WebLabel49.WidthStyle := ssAuto;\r\n WebLabel49.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel49, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel49, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel49, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel49, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton46.SetParentComponent(WebPanel99);\r\n WebSpeedButton46.Name := 'WebSpeedButton46';\r\n WebSpeedButton46.Left := 0;\r\n WebSpeedButton46.Top := 0;\r\n WebSpeedButton46.Width := 24;\r\n WebSpeedButton46.Height := 28;\r\n WebSpeedButton46.Cursor := crHandPoint;\r\n WebSpeedButton46.Hint := 'Edit';\r\n WebSpeedButton46.Align := alLeft;\r\n WebSpeedButton46.Color := clNone;\r\n WebSpeedButton46.Flat := True;\r\n WebSpeedButton46.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton46.Font.Color := clBlack;\r\n WebSpeedButton46.Font.Height := -13;\r\n WebSpeedButton46.Font.Name := 'Tahoma';\r\n WebSpeedButton46.Font.Style := [];\r\n WebSpeedButton46.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton46.MaterialGlyph := 'edit';\r\n WebSpeedButton46.ParentFont := False;\r\n WebSpeedButton46.ShowHint := True;\r\n WebSpeedButton46.TabOrder := 0;\r\n WebSpeedButton46.Visible := False;\r\n WebSpeedButton46.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton46, Self, 'OnClick', '_BlockCallPickForm');\r\n M14.SetParentComponent(B14);\r\n M14.Name := 'M14';\r\n M14.Left := 0;\r\n M14.Top := 56;\r\n M14.Width := 100;\r\n M14.Height := 24;\r\n M14.Align := alBottom;\r\n M14.BorderStyle := bsNone;\r\n M14.ElementClassName := 'block_memo';\r\n M14.ElementFont := efCSS;\r\n M14.Font.Charset := ANSI_CHARSET;\r\n M14.Font.Color := clBlack;\r\n M14.Font.Height := -13;\r\n M14.Font.Name := 'Tahoma';\r\n M14.Font.Style := [];\r\n M14.HeightPercent := 100.000000000000000000;\r\n M14.ParentFont := False;\r\n M14.SelLength := 0;\r\n M14.SelStart := 0;\r\n M14.ShowFocus := False;\r\n M14.WidthPercent := 100.000000000000000000;\r\n SetEvent(M14, Self, 'OnChange', 'M21Change');\r\n SetEvent(M14, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M14, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M14, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M14, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M14, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M14, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer15.SetParentComponent(B14);\r\n WebHTMLContainer15.Name := 'WebHTMLContainer15';\r\n WebHTMLContainer15.Left := 0;\r\n WebHTMLContainer15.Top := 41;\r\n WebHTMLContainer15.Width := 100;\r\n WebHTMLContainer15.Height := 15;\r\n WebHTMLContainer15.HeightStyle := ssAuto;\r\n WebHTMLContainer15.Align := alBottom;\r\n WebHTMLContainer15.ChildOrder := 2;\r\n WebHTMLContainer15.Visible := False;\r\n SetEvent(WebHTMLContainer15, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer15, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer15, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B13.SetParentComponent(SubForm_DIV);\r\n B13.Name := 'B13';\r\n B13.Left := 299;\r\n B13.Top := 161;\r\n B13.Width := 100;\r\n B13.Height := 80;\r\n B13.ElementClassName := 'data_block';\r\n B13.BorderColor := clWhite;\r\n B13.ChildOrder := 13;\r\n B13.Color := clWhite;\r\n B13.ElementFont := efCSS;\r\n B13.Font.Charset := ANSI_CHARSET;\r\n B13.Font.Color := clBlack;\r\n B13.Font.Height := -13;\r\n B13.Font.Name := 'Tahoma';\r\n B13.Font.Style := [];\r\n B13.ParentFont := False;\r\n B13.TabOrder := 17;\r\n SetEvent(B13, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B13, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel101.SetParentComponent(B13);\r\n WebPanel101.Name := 'WebPanel101';\r\n WebPanel101.Left := 0;\r\n WebPanel101.Top := 0;\r\n WebPanel101.Width := 100;\r\n WebPanel101.Height := 28;\r\n WebPanel101.ElementClassName := 'block_top';\r\n WebPanel101.HeightStyle := ssAuto;\r\n WebPanel101.Align := alTop;\r\n WebPanel101.BorderStyle := bsNone;\r\n WebPanel101.ChildOrder := 2;\r\n WebPanel101.Color := clWhite;\r\n WebPanel101.DragMode := dmAutomatic;\r\n WebPanel101.ElementFont := efCSS;\r\n WebPanel101.TabOrder := 0;\r\n SetEvent(WebPanel101, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel101, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel101, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel101, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel50.SetParentComponent(WebPanel101);\r\n WebLabel50.Name := 'WebLabel50';\r\n WebLabel50.Left := 24;\r\n WebLabel50.Top := 0;\r\n WebLabel50.Width := 22;\r\n WebLabel50.Height := 26;\r\n WebLabel50.Cursor := crHandPoint;\r\n WebLabel50.Hint := 'Setting Unit';\r\n WebLabel50.Align := alLeft;\r\n WebLabel50.Caption := '13';\r\n WebLabel50.DragMode := dmAutomatic;\r\n WebLabel50.ElementClassName := 'block_title';\r\n WebLabel50.ElementLabelClassName := 'block_title';\r\n WebLabel50.ElementFont := efCSS;\r\n WebLabel50.Font.Charset := ANSI_CHARSET;\r\n WebLabel50.Font.Color := clNavy;\r\n WebLabel50.Font.Height := -19;\r\n WebLabel50.Font.Name := 'Segoe UI Emoji';\r\n WebLabel50.Font.Style := [fsBold];\r\n WebLabel50.HeightPercent := 100.000000000000000000;\r\n WebLabel50.ParentFont := False;\r\n WebLabel50.WidthStyle := ssAuto;\r\n WebLabel50.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel50, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel50, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel50, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel50, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton47.SetParentComponent(WebPanel101);\r\n WebSpeedButton47.Name := 'WebSpeedButton47';\r\n WebSpeedButton47.Left := 0;\r\n WebSpeedButton47.Top := 0;\r\n WebSpeedButton47.Width := 24;\r\n WebSpeedButton47.Height := 28;\r\n WebSpeedButton47.Cursor := crHandPoint;\r\n WebSpeedButton47.Hint := 'Edit';\r\n WebSpeedButton47.Align := alLeft;\r\n WebSpeedButton47.Color := clNone;\r\n WebSpeedButton47.Flat := True;\r\n WebSpeedButton47.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton47.Font.Color := clBlack;\r\n WebSpeedButton47.Font.Height := -13;\r\n WebSpeedButton47.Font.Name := 'Tahoma';\r\n WebSpeedButton47.Font.Style := [];\r\n WebSpeedButton47.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton47.MaterialGlyph := 'edit';\r\n WebSpeedButton47.ParentFont := False;\r\n WebSpeedButton47.ShowHint := True;\r\n WebSpeedButton47.TabOrder := 0;\r\n WebSpeedButton47.Visible := False;\r\n WebSpeedButton47.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton47, Self, 'OnClick', '_BlockCallPickForm');\r\n M13.SetParentComponent(B13);\r\n M13.Name := 'M13';\r\n M13.Left := 0;\r\n M13.Top := 56;\r\n M13.Width := 100;\r\n M13.Height := 24;\r\n M13.Align := alBottom;\r\n M13.BorderStyle := bsNone;\r\n M13.ElementClassName := 'block_memo';\r\n M13.ElementFont := efCSS;\r\n M13.Font.Charset := ANSI_CHARSET;\r\n M13.Font.Color := clBlack;\r\n M13.Font.Height := -13;\r\n M13.Font.Name := 'Tahoma';\r\n M13.Font.Style := [];\r\n M13.HeightPercent := 100.000000000000000000;\r\n M13.ParentFont := False;\r\n M13.SelLength := 0;\r\n M13.SelStart := 0;\r\n M13.ShowFocus := False;\r\n M13.WidthPercent := 100.000000000000000000;\r\n SetEvent(M13, Self, 'OnChange', 'M21Change');\r\n SetEvent(M13, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M13, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M13, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M13, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M13, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M13, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer14.SetParentComponent(B13);\r\n WebHTMLContainer14.Name := 'WebHTMLContainer14';\r\n WebHTMLContainer14.Left := 0;\r\n WebHTMLContainer14.Top := 41;\r\n WebHTMLContainer14.Width := 100;\r\n WebHTMLContainer14.Height := 15;\r\n WebHTMLContainer14.HeightStyle := ssAuto;\r\n WebHTMLContainer14.Align := alBottom;\r\n WebHTMLContainer14.ChildOrder := 2;\r\n WebHTMLContainer14.Visible := False;\r\n SetEvent(WebHTMLContainer14, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer14, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer14, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B12.SetParentComponent(SubForm_DIV);\r\n B12.Name := 'B12';\r\n B12.Left := 178;\r\n B12.Top := 161;\r\n B12.Width := 100;\r\n B12.Height := 80;\r\n B12.ElementClassName := 'data_block';\r\n B12.BorderColor := clWhite;\r\n B12.ChildOrder := 12;\r\n B12.Color := clWhite;\r\n B12.ElementFont := efCSS;\r\n B12.Font.Charset := ANSI_CHARSET;\r\n B12.Font.Color := clBlack;\r\n B12.Font.Height := -13;\r\n B12.Font.Name := 'Tahoma';\r\n B12.Font.Style := [];\r\n B12.ParentFont := False;\r\n B12.TabOrder := 18;\r\n SetEvent(B12, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B12, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel103.SetParentComponent(B12);\r\n WebPanel103.Name := 'WebPanel103';\r\n WebPanel103.Left := 0;\r\n WebPanel103.Top := 0;\r\n WebPanel103.Width := 100;\r\n WebPanel103.Height := 28;\r\n WebPanel103.ElementClassName := 'block_top';\r\n WebPanel103.HeightStyle := ssAuto;\r\n WebPanel103.Align := alTop;\r\n WebPanel103.BorderStyle := bsNone;\r\n WebPanel103.ChildOrder := 2;\r\n WebPanel103.Color := clWhite;\r\n WebPanel103.DragMode := dmAutomatic;\r\n WebPanel103.ElementFont := efCSS;\r\n WebPanel103.TabOrder := 0;\r\n SetEvent(WebPanel103, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel103, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel103, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel103, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel51.SetParentComponent(WebPanel103);\r\n WebLabel51.Name := 'WebLabel51';\r\n WebLabel51.Left := 24;\r\n WebLabel51.Top := 0;\r\n WebLabel51.Width := 22;\r\n WebLabel51.Height := 26;\r\n WebLabel51.Cursor := crHandPoint;\r\n WebLabel51.Align := alLeft;\r\n WebLabel51.Caption := '12';\r\n WebLabel51.DragMode := dmAutomatic;\r\n WebLabel51.ElementClassName := 'block_title';\r\n WebLabel51.ElementLabelClassName := 'block_title';\r\n WebLabel51.ElementFont := efCSS;\r\n WebLabel51.Font.Charset := ANSI_CHARSET;\r\n WebLabel51.Font.Color := clNavy;\r\n WebLabel51.Font.Height := -19;\r\n WebLabel51.Font.Name := 'Segoe UI Emoji';\r\n WebLabel51.Font.Style := [fsBold];\r\n WebLabel51.HeightPercent := 100.000000000000000000;\r\n WebLabel51.ParentFont := False;\r\n WebLabel51.WidthStyle := ssAuto;\r\n WebLabel51.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel51, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel51, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel51, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel51, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton48.SetParentComponent(WebPanel103);\r\n WebSpeedButton48.Name := 'WebSpeedButton48';\r\n WebSpeedButton48.Left := 0;\r\n WebSpeedButton48.Top := 0;\r\n WebSpeedButton48.Width := 24;\r\n WebSpeedButton48.Height := 28;\r\n WebSpeedButton48.Cursor := crHandPoint;\r\n WebSpeedButton48.Hint := 'Edit';\r\n WebSpeedButton48.Align := alLeft;\r\n WebSpeedButton48.Color := clNone;\r\n WebSpeedButton48.Flat := True;\r\n WebSpeedButton48.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton48.Font.Color := clBlack;\r\n WebSpeedButton48.Font.Height := -13;\r\n WebSpeedButton48.Font.Name := 'Tahoma';\r\n WebSpeedButton48.Font.Style := [];\r\n WebSpeedButton48.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton48.MaterialGlyph := 'edit';\r\n WebSpeedButton48.ParentFont := False;\r\n WebSpeedButton48.ShowHint := True;\r\n WebSpeedButton48.TabOrder := 0;\r\n WebSpeedButton48.Visible := False;\r\n WebSpeedButton48.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton48, Self, 'OnClick', '_BlockCallPickForm');\r\n M12.SetParentComponent(B12);\r\n M12.Name := 'M12';\r\n M12.Left := 0;\r\n M12.Top := 56;\r\n M12.Width := 100;\r\n M12.Height := 24;\r\n M12.Align := alBottom;\r\n M12.BorderStyle := bsNone;\r\n M12.ElementClassName := 'block_memo';\r\n M12.ElementFont := efCSS;\r\n M12.Font.Charset := ANSI_CHARSET;\r\n M12.Font.Color := clBlack;\r\n M12.Font.Height := -13;\r\n M12.Font.Name := 'Tahoma';\r\n M12.Font.Style := [];\r\n M12.HeightPercent := 100.000000000000000000;\r\n M12.ParentFont := False;\r\n M12.SelLength := 0;\r\n M12.SelStart := 0;\r\n M12.ShowFocus := False;\r\n M12.WidthPercent := 100.000000000000000000;\r\n SetEvent(M12, Self, 'OnChange', 'M21Change');\r\n SetEvent(M12, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M12, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M12, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M12, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M12, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M12, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer13.SetParentComponent(B12);\r\n WebHTMLContainer13.Name := 'WebHTMLContainer13';\r\n WebHTMLContainer13.Left := 0;\r\n WebHTMLContainer13.Top := 41;\r\n WebHTMLContainer13.Width := 100;\r\n WebHTMLContainer13.Height := 15;\r\n WebHTMLContainer13.HeightStyle := ssAuto;\r\n WebHTMLContainer13.Align := alBottom;\r\n WebHTMLContainer13.ChildOrder := 2;\r\n WebHTMLContainer13.Visible := False;\r\n SetEvent(WebHTMLContainer13, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer13, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer13, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B11.SetParentComponent(SubForm_DIV);\r\n B11.Name := 'B11';\r\n B11.Left := 58;\r\n B11.Top := 161;\r\n B11.Width := 100;\r\n B11.Height := 80;\r\n B11.ElementClassName := 'data_block';\r\n B11.BorderColor := clWhite;\r\n B11.ChildOrder := 11;\r\n B11.Color := clWhite;\r\n B11.ElementFont := efCSS;\r\n B11.Font.Charset := ANSI_CHARSET;\r\n B11.Font.Color := clBlack;\r\n B11.Font.Height := -13;\r\n B11.Font.Name := 'Tahoma';\r\n B11.Font.Style := [];\r\n B11.ParentFont := False;\r\n B11.TabOrder := 19;\r\n SetEvent(B11, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B11, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel105.SetParentComponent(B11);\r\n WebPanel105.Name := 'WebPanel105';\r\n WebPanel105.Left := 0;\r\n WebPanel105.Top := 0;\r\n WebPanel105.Width := 100;\r\n WebPanel105.Height := 28;\r\n WebPanel105.ElementClassName := 'block_top';\r\n WebPanel105.HeightStyle := ssAuto;\r\n WebPanel105.Align := alTop;\r\n WebPanel105.BorderStyle := bsNone;\r\n WebPanel105.ChildOrder := 2;\r\n WebPanel105.Color := clWhite;\r\n WebPanel105.DragMode := dmAutomatic;\r\n WebPanel105.ElementFont := efCSS;\r\n WebPanel105.TabOrder := 0;\r\n SetEvent(WebPanel105, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel105, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel105, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel105, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel52.SetParentComponent(WebPanel105);\r\n WebLabel52.Name := 'WebLabel52';\r\n WebLabel52.Left := 24;\r\n WebLabel52.Top := 0;\r\n WebLabel52.Width := 22;\r\n WebLabel52.Height := 26;\r\n WebLabel52.Cursor := crHandPoint;\r\n WebLabel52.Align := alLeft;\r\n WebLabel52.Caption := '11';\r\n WebLabel52.DragMode := dmAutomatic;\r\n WebLabel52.ElementClassName := 'block_title';\r\n WebLabel52.ElementLabelClassName := 'block_title';\r\n WebLabel52.ElementFont := efCSS;\r\n WebLabel52.Font.Charset := ANSI_CHARSET;\r\n WebLabel52.Font.Color := clNavy;\r\n WebLabel52.Font.Height := -19;\r\n WebLabel52.Font.Name := 'Segoe UI Emoji';\r\n WebLabel52.Font.Style := [fsBold];\r\n WebLabel52.HeightPercent := 100.000000000000000000;\r\n WebLabel52.ParentFont := False;\r\n WebLabel52.WidthStyle := ssAuto;\r\n WebLabel52.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel52, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel52, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel52, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel52, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton49.SetParentComponent(WebPanel105);\r\n WebSpeedButton49.Name := 'WebSpeedButton49';\r\n WebSpeedButton49.Left := 0;\r\n WebSpeedButton49.Top := 0;\r\n WebSpeedButton49.Width := 24;\r\n WebSpeedButton49.Height := 28;\r\n WebSpeedButton49.Cursor := crHandPoint;\r\n WebSpeedButton49.Hint := 'Edit';\r\n WebSpeedButton49.Align := alLeft;\r\n WebSpeedButton49.Color := clNone;\r\n WebSpeedButton49.Flat := True;\r\n WebSpeedButton49.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton49.Font.Color := clBlack;\r\n WebSpeedButton49.Font.Height := -13;\r\n WebSpeedButton49.Font.Name := 'Tahoma';\r\n WebSpeedButton49.Font.Style := [];\r\n WebSpeedButton49.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton49.MaterialGlyph := 'edit';\r\n WebSpeedButton49.ParentFont := False;\r\n WebSpeedButton49.ShowHint := True;\r\n WebSpeedButton49.TabOrder := 0;\r\n WebSpeedButton49.Visible := False;\r\n WebSpeedButton49.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton49, Self, 'OnClick', '_BlockCallPickForm');\r\n M11.SetParentComponent(B11);\r\n M11.Name := 'M11';\r\n M11.Left := 0;\r\n M11.Top := 56;\r\n M11.Width := 100;\r\n M11.Height := 24;\r\n M11.Align := alBottom;\r\n M11.BorderStyle := bsNone;\r\n M11.ElementClassName := 'block_memo';\r\n M11.ElementFont := efCSS;\r\n M11.Font.Charset := ANSI_CHARSET;\r\n M11.Font.Color := clBlack;\r\n M11.Font.Height := -13;\r\n M11.Font.Name := 'Tahoma';\r\n M11.Font.Style := [];\r\n M11.HeightPercent := 100.000000000000000000;\r\n M11.ParentFont := False;\r\n M11.SelLength := 0;\r\n M11.SelStart := 0;\r\n M11.ShowFocus := False;\r\n M11.WidthPercent := 100.000000000000000000;\r\n SetEvent(M11, Self, 'OnChange', 'M21Change');\r\n SetEvent(M11, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M11, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M11, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M11, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M11, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M11, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer12.SetParentComponent(B11);\r\n WebHTMLContainer12.Name := 'WebHTMLContainer12';\r\n WebHTMLContainer12.Left := 0;\r\n WebHTMLContainer12.Top := 41;\r\n WebHTMLContainer12.Width := 100;\r\n WebHTMLContainer12.Height := 15;\r\n WebHTMLContainer12.HeightStyle := ssAuto;\r\n WebHTMLContainer12.Align := alBottom;\r\n WebHTMLContainer12.ChildOrder := 2;\r\n WebHTMLContainer12.Visible := False;\r\n SetEvent(WebHTMLContainer12, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer12, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer12, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B6.SetParentComponent(SubForm_DIV);\r\n B6.Name := 'B6';\r\n B6.Left := 65;\r\n B6.Top := 75;\r\n B6.Width := 100;\r\n B6.Height := 80;\r\n B6.ElementClassName := 'data_block';\r\n B6.BorderColor := clWhite;\r\n B6.ChildOrder := 6;\r\n B6.Color := clWhite;\r\n B6.ElementFont := efCSS;\r\n B6.Font.Charset := ANSI_CHARSET;\r\n B6.Font.Color := clBlack;\r\n B6.Font.Height := -13;\r\n B6.Font.Name := 'Tahoma';\r\n B6.Font.Style := [];\r\n B6.ParentFont := False;\r\n B6.TabOrder := 20;\r\n SetEvent(B6, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B6, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel80.SetParentComponent(B6);\r\n WebPanel80.Name := 'WebPanel80';\r\n WebPanel80.Left := 0;\r\n WebPanel80.Top := 0;\r\n WebPanel80.Width := 100;\r\n WebPanel80.Height := 28;\r\n WebPanel80.ElementClassName := 'block_top';\r\n WebPanel80.HeightStyle := ssAuto;\r\n WebPanel80.Align := alTop;\r\n WebPanel80.BorderStyle := bsNone;\r\n WebPanel80.ChildOrder := 2;\r\n WebPanel80.Color := clWhite;\r\n WebPanel80.DragMode := dmAutomatic;\r\n WebPanel80.ElementFont := efCSS;\r\n WebPanel80.TabOrder := 0;\r\n SetEvent(WebPanel80, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel80, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel80, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel80, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel41.SetParentComponent(WebPanel80);\r\n WebLabel41.Name := 'WebLabel41';\r\n WebLabel41.Left := 24;\r\n WebLabel41.Top := 0;\r\n WebLabel41.Width := 11;\r\n WebLabel41.Height := 26;\r\n WebLabel41.Cursor := crHandPoint;\r\n WebLabel41.Align := alLeft;\r\n WebLabel41.Caption := '6';\r\n WebLabel41.DragMode := dmAutomatic;\r\n WebLabel41.ElementClassName := 'block_title';\r\n WebLabel41.ElementLabelClassName := 'block_title';\r\n WebLabel41.ElementFont := efCSS;\r\n WebLabel41.Font.Charset := ANSI_CHARSET;\r\n WebLabel41.Font.Color := clNavy;\r\n WebLabel41.Font.Height := -19;\r\n WebLabel41.Font.Name := 'Segoe UI Emoji';\r\n WebLabel41.Font.Style := [fsBold];\r\n WebLabel41.HeightPercent := 100.000000000000000000;\r\n WebLabel41.ParentFont := False;\r\n WebLabel41.WidthStyle := ssAuto;\r\n WebLabel41.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel41, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel41, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel41, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel41, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton38.SetParentComponent(WebPanel80);\r\n WebSpeedButton38.Name := 'WebSpeedButton38';\r\n WebSpeedButton38.Left := 0;\r\n WebSpeedButton38.Top := 0;\r\n WebSpeedButton38.Width := 24;\r\n WebSpeedButton38.Height := 28;\r\n WebSpeedButton38.Cursor := crHandPoint;\r\n WebSpeedButton38.Hint := 'Edit';\r\n WebSpeedButton38.Align := alLeft;\r\n WebSpeedButton38.Color := clNone;\r\n WebSpeedButton38.Flat := True;\r\n WebSpeedButton38.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton38.Font.Color := clBlack;\r\n WebSpeedButton38.Font.Height := -13;\r\n WebSpeedButton38.Font.Name := 'Tahoma';\r\n WebSpeedButton38.Font.Style := [];\r\n WebSpeedButton38.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton38.MaterialGlyph := 'edit';\r\n WebSpeedButton38.ParentFont := False;\r\n WebSpeedButton38.ShowHint := True;\r\n WebSpeedButton38.TabOrder := 0;\r\n WebSpeedButton38.Visible := False;\r\n WebSpeedButton38.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton38, Self, 'OnClick', '_BlockCallPickForm');\r\n M6.SetParentComponent(B6);\r\n M6.Name := 'M6';\r\n M6.Left := 0;\r\n M6.Top := 56;\r\n M6.Width := 100;\r\n M6.Height := 24;\r\n M6.Align := alBottom;\r\n M6.BorderStyle := bsNone;\r\n M6.ElementClassName := 'block_memo';\r\n M6.ElementFont := efCSS;\r\n M6.Font.Charset := ANSI_CHARSET;\r\n M6.Font.Color := clBlack;\r\n M6.Font.Height := -13;\r\n M6.Font.Name := 'Tahoma';\r\n M6.Font.Style := [];\r\n M6.HeightPercent := 100.000000000000000000;\r\n M6.ParentFont := False;\r\n M6.SelLength := 0;\r\n M6.SelStart := 0;\r\n M6.ShowFocus := False;\r\n M6.WidthPercent := 100.000000000000000000;\r\n SetEvent(M6, Self, 'OnChange', 'M21Change');\r\n SetEvent(M6, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M6, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M6, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M6, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M6, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M6, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer11.SetParentComponent(B6);\r\n WebHTMLContainer11.Name := 'WebHTMLContainer11';\r\n WebHTMLContainer11.Left := 0;\r\n WebHTMLContainer11.Top := 41;\r\n WebHTMLContainer11.Width := 100;\r\n WebHTMLContainer11.Height := 15;\r\n WebHTMLContainer11.HeightStyle := ssAuto;\r\n WebHTMLContainer11.Align := alBottom;\r\n WebHTMLContainer11.ChildOrder := 2;\r\n WebHTMLContainer11.Visible := False;\r\n SetEvent(WebHTMLContainer11, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer11, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer11, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B7.SetParentComponent(SubForm_DIV);\r\n B7.Name := 'B7';\r\n B7.Left := 186;\r\n B7.Top := 75;\r\n B7.Width := 100;\r\n B7.Height := 80;\r\n B7.ElementClassName := 'data_block';\r\n B7.BorderColor := clWhite;\r\n B7.ChildOrder := 7;\r\n B7.Color := clWhite;\r\n B7.ElementFont := efCSS;\r\n B7.Font.Charset := ANSI_CHARSET;\r\n B7.Font.Color := clBlack;\r\n B7.Font.Height := -13;\r\n B7.Font.Name := 'Tahoma';\r\n B7.Font.Style := [];\r\n B7.ParentFont := False;\r\n B7.TabOrder := 21;\r\n SetEvent(B7, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B7, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel82.SetParentComponent(B7);\r\n WebPanel82.Name := 'WebPanel82';\r\n WebPanel82.Left := 0;\r\n WebPanel82.Top := 0;\r\n WebPanel82.Width := 100;\r\n WebPanel82.Height := 28;\r\n WebPanel82.ElementClassName := 'block_top';\r\n WebPanel82.HeightStyle := ssAuto;\r\n WebPanel82.Align := alTop;\r\n WebPanel82.BorderStyle := bsNone;\r\n WebPanel82.ChildOrder := 2;\r\n WebPanel82.Color := clWhite;\r\n WebPanel82.DragMode := dmAutomatic;\r\n WebPanel82.ElementFont := efCSS;\r\n WebPanel82.TabOrder := 0;\r\n SetEvent(WebPanel82, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel82, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel82, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel82, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel42.SetParentComponent(WebPanel82);\r\n WebLabel42.Name := 'WebLabel42';\r\n WebLabel42.Left := 24;\r\n WebLabel42.Top := 0;\r\n WebLabel42.Width := 11;\r\n WebLabel42.Height := 26;\r\n WebLabel42.Cursor := crHandPoint;\r\n WebLabel42.Hint := 'Setting Unit';\r\n WebLabel42.Align := alLeft;\r\n WebLabel42.Caption := '7';\r\n WebLabel42.DragMode := dmAutomatic;\r\n WebLabel42.ElementClassName := 'block_title';\r\n WebLabel42.ElementLabelClassName := 'block_title';\r\n WebLabel42.ElementFont := efCSS;\r\n WebLabel42.Font.Charset := ANSI_CHARSET;\r\n WebLabel42.Font.Color := clNavy;\r\n WebLabel42.Font.Height := -19;\r\n WebLabel42.Font.Name := 'Segoe UI Emoji';\r\n WebLabel42.Font.Style := [fsBold];\r\n WebLabel42.HeightPercent := 100.000000000000000000;\r\n WebLabel42.ParentFont := False;\r\n WebLabel42.WidthStyle := ssAuto;\r\n WebLabel42.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel42, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel42, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel42, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel42, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton39.SetParentComponent(WebPanel82);\r\n WebSpeedButton39.Name := 'WebSpeedButton39';\r\n WebSpeedButton39.Left := 0;\r\n WebSpeedButton39.Top := 0;\r\n WebSpeedButton39.Width := 24;\r\n WebSpeedButton39.Height := 28;\r\n WebSpeedButton39.Cursor := crHandPoint;\r\n WebSpeedButton39.Hint := 'Edit';\r\n WebSpeedButton39.Align := alLeft;\r\n WebSpeedButton39.Color := clNone;\r\n WebSpeedButton39.Flat := True;\r\n WebSpeedButton39.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton39.Font.Color := clBlack;\r\n WebSpeedButton39.Font.Height := -13;\r\n WebSpeedButton39.Font.Name := 'Tahoma';\r\n WebSpeedButton39.Font.Style := [];\r\n WebSpeedButton39.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton39.MaterialGlyph := 'edit';\r\n WebSpeedButton39.ParentFont := False;\r\n WebSpeedButton39.ShowHint := True;\r\n WebSpeedButton39.TabOrder := 0;\r\n WebSpeedButton39.Visible := False;\r\n WebSpeedButton39.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton39, Self, 'OnClick', '_BlockCallPickForm');\r\n M7.SetParentComponent(B7);\r\n M7.Name := 'M7';\r\n M7.Left := 0;\r\n M7.Top := 56;\r\n M7.Width := 100;\r\n M7.Height := 24;\r\n M7.Align := alBottom;\r\n M7.BorderStyle := bsNone;\r\n M7.ElementClassName := 'block_memo';\r\n M7.ElementFont := efCSS;\r\n M7.Font.Charset := ANSI_CHARSET;\r\n M7.Font.Color := clBlack;\r\n M7.Font.Height := -13;\r\n M7.Font.Name := 'Tahoma';\r\n M7.Font.Style := [];\r\n M7.HeightPercent := 100.000000000000000000;\r\n M7.ParentFont := False;\r\n M7.SelLength := 0;\r\n M7.SelStart := 0;\r\n M7.ShowFocus := False;\r\n M7.WidthPercent := 100.000000000000000000;\r\n SetEvent(M7, Self, 'OnChange', 'M21Change');\r\n SetEvent(M7, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M7, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M7, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M7, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M7, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M7, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer10.SetParentComponent(B7);\r\n WebHTMLContainer10.Name := 'WebHTMLContainer10';\r\n WebHTMLContainer10.Left := 0;\r\n WebHTMLContainer10.Top := 41;\r\n WebHTMLContainer10.Width := 100;\r\n WebHTMLContainer10.Height := 15;\r\n WebHTMLContainer10.HeightStyle := ssAuto;\r\n WebHTMLContainer10.Align := alBottom;\r\n WebHTMLContainer10.ChildOrder := 2;\r\n WebHTMLContainer10.Visible := False;\r\n SetEvent(WebHTMLContainer10, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer10, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer10, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B8.SetParentComponent(SubForm_DIV);\r\n B8.Name := 'B8';\r\n B8.Left := 306;\r\n B8.Top := 75;\r\n B8.Width := 100;\r\n B8.Height := 80;\r\n B8.ElementClassName := 'data_block';\r\n B8.BorderColor := clWhite;\r\n B8.ChildOrder := 8;\r\n B8.Color := clWhite;\r\n B8.ElementFont := efCSS;\r\n B8.Font.Charset := ANSI_CHARSET;\r\n B8.Font.Color := clBlack;\r\n B8.Font.Height := -13;\r\n B8.Font.Name := 'Tahoma';\r\n B8.Font.Style := [];\r\n B8.ParentFont := False;\r\n B8.TabOrder := 22;\r\n SetEvent(B8, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B8, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel86.SetParentComponent(B8);\r\n WebPanel86.Name := 'WebPanel86';\r\n WebPanel86.Left := 0;\r\n WebPanel86.Top := 0;\r\n WebPanel86.Width := 100;\r\n WebPanel86.Height := 28;\r\n WebPanel86.ElementClassName := 'block_top';\r\n WebPanel86.HeightStyle := ssAuto;\r\n WebPanel86.Align := alTop;\r\n WebPanel86.BorderStyle := bsNone;\r\n WebPanel86.ChildOrder := 2;\r\n WebPanel86.Color := clWhite;\r\n WebPanel86.DragMode := dmAutomatic;\r\n WebPanel86.ElementFont := efCSS;\r\n WebPanel86.TabOrder := 0;\r\n SetEvent(WebPanel86, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel86, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel86, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel86, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel43.SetParentComponent(WebPanel86);\r\n WebLabel43.Name := 'WebLabel43';\r\n WebLabel43.Left := 24;\r\n WebLabel43.Top := 0;\r\n WebLabel43.Width := 11;\r\n WebLabel43.Height := 26;\r\n WebLabel43.Cursor := crHandPoint;\r\n WebLabel43.Align := alLeft;\r\n WebLabel43.Caption := '8';\r\n WebLabel43.DragMode := dmAutomatic;\r\n WebLabel43.ElementClassName := 'block_title';\r\n WebLabel43.ElementLabelClassName := 'block_title';\r\n WebLabel43.ElementFont := efCSS;\r\n WebLabel43.Font.Charset := ANSI_CHARSET;\r\n WebLabel43.Font.Color := clNavy;\r\n WebLabel43.Font.Height := -19;\r\n WebLabel43.Font.Name := 'Segoe UI Emoji';\r\n WebLabel43.Font.Style := [fsBold];\r\n WebLabel43.HeightPercent := 100.000000000000000000;\r\n WebLabel43.ParentFont := False;\r\n WebLabel43.WidthStyle := ssAuto;\r\n WebLabel43.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel43, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel43, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel43, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel43, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton40.SetParentComponent(WebPanel86);\r\n WebSpeedButton40.Name := 'WebSpeedButton40';\r\n WebSpeedButton40.Left := 0;\r\n WebSpeedButton40.Top := 0;\r\n WebSpeedButton40.Width := 24;\r\n WebSpeedButton40.Height := 28;\r\n WebSpeedButton40.Cursor := crHandPoint;\r\n WebSpeedButton40.Hint := 'Edit';\r\n WebSpeedButton40.Align := alLeft;\r\n WebSpeedButton40.Color := clNone;\r\n WebSpeedButton40.Flat := True;\r\n WebSpeedButton40.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton40.Font.Color := clBlack;\r\n WebSpeedButton40.Font.Height := -13;\r\n WebSpeedButton40.Font.Name := 'Tahoma';\r\n WebSpeedButton40.Font.Style := [];\r\n WebSpeedButton40.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton40.MaterialGlyph := 'edit';\r\n WebSpeedButton40.ParentFont := False;\r\n WebSpeedButton40.ShowHint := True;\r\n WebSpeedButton40.TabOrder := 0;\r\n WebSpeedButton40.Visible := False;\r\n WebSpeedButton40.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton40, Self, 'OnClick', '_BlockCallPickForm');\r\n M8.SetParentComponent(B8);\r\n M8.Name := 'M8';\r\n M8.Left := 0;\r\n M8.Top := 56;\r\n M8.Width := 100;\r\n M8.Height := 24;\r\n M8.Align := alBottom;\r\n M8.BorderStyle := bsNone;\r\n M8.ElementClassName := 'block_memo';\r\n M8.ElementFont := efCSS;\r\n M8.Font.Charset := ANSI_CHARSET;\r\n M8.Font.Color := clBlack;\r\n M8.Font.Height := -13;\r\n M8.Font.Name := 'Tahoma';\r\n M8.Font.Style := [];\r\n M8.HeightPercent := 100.000000000000000000;\r\n M8.ParentFont := False;\r\n M8.SelLength := 0;\r\n M8.SelStart := 0;\r\n M8.ShowFocus := False;\r\n M8.WidthPercent := 100.000000000000000000;\r\n SetEvent(M8, Self, 'OnChange', 'M21Change');\r\n SetEvent(M8, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M8, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M8, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M8, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M8, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M8, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer9.SetParentComponent(B8);\r\n WebHTMLContainer9.Name := 'WebHTMLContainer9';\r\n WebHTMLContainer9.Left := 0;\r\n WebHTMLContainer9.Top := 41;\r\n WebHTMLContainer9.Width := 100;\r\n WebHTMLContainer9.Height := 15;\r\n WebHTMLContainer9.HeightStyle := ssAuto;\r\n WebHTMLContainer9.Align := alBottom;\r\n WebHTMLContainer9.ChildOrder := 2;\r\n WebHTMLContainer9.Visible := False;\r\n SetEvent(WebHTMLContainer9, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer9, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer9, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B9.SetParentComponent(SubForm_DIV);\r\n B9.Name := 'B9';\r\n B9.Left := 427;\r\n B9.Top := 75;\r\n B9.Width := 100;\r\n B9.Height := 80;\r\n B9.ElementClassName := 'data_block';\r\n B9.BorderColor := clWhite;\r\n B9.ChildOrder := 9;\r\n B9.Color := clWhite;\r\n B9.ElementFont := efCSS;\r\n B9.Font.Charset := ANSI_CHARSET;\r\n B9.Font.Color := clBlack;\r\n B9.Font.Height := -13;\r\n B9.Font.Name := 'Tahoma';\r\n B9.Font.Style := [];\r\n B9.ParentFont := False;\r\n B9.TabOrder := 23;\r\n SetEvent(B9, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B9, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel88.SetParentComponent(B9);\r\n WebPanel88.Name := 'WebPanel88';\r\n WebPanel88.Left := 0;\r\n WebPanel88.Top := 0;\r\n WebPanel88.Width := 100;\r\n WebPanel88.Height := 28;\r\n WebPanel88.ElementClassName := 'block_top';\r\n WebPanel88.HeightStyle := ssAuto;\r\n WebPanel88.Align := alTop;\r\n WebPanel88.BorderStyle := bsNone;\r\n WebPanel88.ChildOrder := 2;\r\n WebPanel88.Color := clWhite;\r\n WebPanel88.DragMode := dmAutomatic;\r\n WebPanel88.ElementFont := efCSS;\r\n WebPanel88.TabOrder := 0;\r\n SetEvent(WebPanel88, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel88, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel88, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel88, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel44.SetParentComponent(WebPanel88);\r\n WebLabel44.Name := 'WebLabel44';\r\n WebLabel44.Left := 24;\r\n WebLabel44.Top := 0;\r\n WebLabel44.Width := 11;\r\n WebLabel44.Height := 26;\r\n WebLabel44.Cursor := crHandPoint;\r\n WebLabel44.Align := alLeft;\r\n WebLabel44.Caption := '9';\r\n WebLabel44.DragMode := dmAutomatic;\r\n WebLabel44.ElementClassName := 'block_title';\r\n WebLabel44.ElementLabelClassName := 'block_title';\r\n WebLabel44.ElementFont := efCSS;\r\n WebLabel44.Font.Charset := ANSI_CHARSET;\r\n WebLabel44.Font.Color := clNavy;\r\n WebLabel44.Font.Height := -19;\r\n WebLabel44.Font.Name := 'Segoe UI Emoji';\r\n WebLabel44.Font.Style := [fsBold];\r\n WebLabel44.HeightPercent := 100.000000000000000000;\r\n WebLabel44.ParentFont := False;\r\n WebLabel44.WidthStyle := ssAuto;\r\n WebLabel44.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel44, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel44, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel44, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel44, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton41.SetParentComponent(WebPanel88);\r\n WebSpeedButton41.Name := 'WebSpeedButton41';\r\n WebSpeedButton41.Left := 0;\r\n WebSpeedButton41.Top := 0;\r\n WebSpeedButton41.Width := 24;\r\n WebSpeedButton41.Height := 28;\r\n WebSpeedButton41.Cursor := crHandPoint;\r\n WebSpeedButton41.Hint := 'Edit';\r\n WebSpeedButton41.Align := alLeft;\r\n WebSpeedButton41.Color := clNone;\r\n WebSpeedButton41.Flat := True;\r\n WebSpeedButton41.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton41.Font.Color := clBlack;\r\n WebSpeedButton41.Font.Height := -13;\r\n WebSpeedButton41.Font.Name := 'Tahoma';\r\n WebSpeedButton41.Font.Style := [];\r\n WebSpeedButton41.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton41.MaterialGlyph := 'edit';\r\n WebSpeedButton41.ParentFont := False;\r\n WebSpeedButton41.ShowHint := True;\r\n WebSpeedButton41.TabOrder := 0;\r\n WebSpeedButton41.Visible := False;\r\n WebSpeedButton41.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton41, Self, 'OnClick', '_BlockCallPickForm');\r\n M9.SetParentComponent(B9);\r\n M9.Name := 'M9';\r\n M9.Left := 0;\r\n M9.Top := 56;\r\n M9.Width := 100;\r\n M9.Height := 24;\r\n M9.Align := alBottom;\r\n M9.BorderStyle := bsNone;\r\n M9.ElementClassName := 'block_memo';\r\n M9.ElementFont := efCSS;\r\n M9.Font.Charset := ANSI_CHARSET;\r\n M9.Font.Color := clBlack;\r\n M9.Font.Height := -13;\r\n M9.Font.Name := 'Tahoma';\r\n M9.Font.Style := [];\r\n M9.HeightPercent := 100.000000000000000000;\r\n M9.ParentFont := False;\r\n M9.SelLength := 0;\r\n M9.SelStart := 0;\r\n M9.ShowFocus := False;\r\n M9.WidthPercent := 100.000000000000000000;\r\n SetEvent(M9, Self, 'OnChange', 'M21Change');\r\n SetEvent(M9, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M9, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M9, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M9, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M9, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M9, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer8.SetParentComponent(B9);\r\n WebHTMLContainer8.Name := 'WebHTMLContainer8';\r\n WebHTMLContainer8.Left := 0;\r\n WebHTMLContainer8.Top := 41;\r\n WebHTMLContainer8.Width := 100;\r\n WebHTMLContainer8.Height := 15;\r\n WebHTMLContainer8.HeightStyle := ssAuto;\r\n WebHTMLContainer8.Align := alBottom;\r\n WebHTMLContainer8.ChildOrder := 2;\r\n WebHTMLContainer8.Visible := False;\r\n SetEvent(WebHTMLContainer8, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer8, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer8, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B10.SetParentComponent(SubForm_DIV);\r\n B10.Name := 'B10';\r\n B10.Left := 548;\r\n B10.Top := 75;\r\n B10.Width := 100;\r\n B10.Height := 80;\r\n B10.ElementClassName := 'data_block';\r\n B10.BorderColor := clWhite;\r\n B10.ChildOrder := 10;\r\n B10.Color := clWhite;\r\n B10.ElementFont := efCSS;\r\n B10.Font.Charset := ANSI_CHARSET;\r\n B10.Font.Color := clBlack;\r\n B10.Font.Height := -13;\r\n B10.Font.Name := 'Tahoma';\r\n B10.Font.Style := [];\r\n B10.ParentFont := False;\r\n B10.TabOrder := 24;\r\n SetEvent(B10, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B10, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel91.SetParentComponent(B10);\r\n WebPanel91.Name := 'WebPanel91';\r\n WebPanel91.Left := 0;\r\n WebPanel91.Top := 0;\r\n WebPanel91.Width := 100;\r\n WebPanel91.Height := 28;\r\n WebPanel91.ElementClassName := 'block_top';\r\n WebPanel91.HeightStyle := ssAuto;\r\n WebPanel91.Align := alTop;\r\n WebPanel91.BorderStyle := bsNone;\r\n WebPanel91.ChildOrder := 2;\r\n WebPanel91.Color := clWhite;\r\n WebPanel91.DragMode := dmAutomatic;\r\n WebPanel91.ElementFont := efCSS;\r\n WebPanel91.TabOrder := 0;\r\n SetEvent(WebPanel91, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel91, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel91, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel91, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel45.SetParentComponent(WebPanel91);\r\n WebLabel45.Name := 'WebLabel45';\r\n WebLabel45.Left := 24;\r\n WebLabel45.Top := 0;\r\n WebLabel45.Width := 22;\r\n WebLabel45.Height := 26;\r\n WebLabel45.Cursor := crHandPoint;\r\n WebLabel45.Align := alLeft;\r\n WebLabel45.Caption := '10';\r\n WebLabel45.DragMode := dmAutomatic;\r\n WebLabel45.ElementClassName := 'block_title';\r\n WebLabel45.ElementLabelClassName := 'block_title';\r\n WebLabel45.ElementFont := efCSS;\r\n WebLabel45.Font.Charset := ANSI_CHARSET;\r\n WebLabel45.Font.Color := clNavy;\r\n WebLabel45.Font.Height := -19;\r\n WebLabel45.Font.Name := 'Segoe UI Emoji';\r\n WebLabel45.Font.Style := [fsBold];\r\n WebLabel45.HeightPercent := 100.000000000000000000;\r\n WebLabel45.ParentFont := False;\r\n WebLabel45.WidthStyle := ssAuto;\r\n WebLabel45.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel45, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel45, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel45, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel45, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton42.SetParentComponent(WebPanel91);\r\n WebSpeedButton42.Name := 'WebSpeedButton42';\r\n WebSpeedButton42.Left := 0;\r\n WebSpeedButton42.Top := 0;\r\n WebSpeedButton42.Width := 24;\r\n WebSpeedButton42.Height := 28;\r\n WebSpeedButton42.Cursor := crHandPoint;\r\n WebSpeedButton42.Hint := 'Edit';\r\n WebSpeedButton42.Align := alLeft;\r\n WebSpeedButton42.Color := clNone;\r\n WebSpeedButton42.Flat := True;\r\n WebSpeedButton42.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton42.Font.Color := clBlack;\r\n WebSpeedButton42.Font.Height := -13;\r\n WebSpeedButton42.Font.Name := 'Tahoma';\r\n WebSpeedButton42.Font.Style := [];\r\n WebSpeedButton42.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton42.MaterialGlyph := 'edit';\r\n WebSpeedButton42.ParentFont := False;\r\n WebSpeedButton42.ShowHint := True;\r\n WebSpeedButton42.TabOrder := 0;\r\n WebSpeedButton42.Visible := False;\r\n WebSpeedButton42.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton42, Self, 'OnClick', '_BlockCallPickForm');\r\n M10.SetParentComponent(B10);\r\n M10.Name := 'M10';\r\n M10.Left := 0;\r\n M10.Top := 56;\r\n M10.Width := 100;\r\n M10.Height := 24;\r\n M10.Align := alBottom;\r\n M10.BorderStyle := bsNone;\r\n M10.ElementClassName := 'block_memo';\r\n M10.ElementFont := efCSS;\r\n M10.Font.Charset := ANSI_CHARSET;\r\n M10.Font.Color := clBlack;\r\n M10.Font.Height := -13;\r\n M10.Font.Name := 'Tahoma';\r\n M10.Font.Style := [];\r\n M10.HeightPercent := 100.000000000000000000;\r\n M10.ParentFont := False;\r\n M10.SelLength := 0;\r\n M10.SelStart := 0;\r\n M10.ShowFocus := False;\r\n M10.WidthPercent := 100.000000000000000000;\r\n SetEvent(M10, Self, 'OnChange', 'M21Change');\r\n SetEvent(M10, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M10, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M10, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M10, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M10, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M10, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer7.SetParentComponent(B10);\r\n WebHTMLContainer7.Name := 'WebHTMLContainer7';\r\n WebHTMLContainer7.Left := 0;\r\n WebHTMLContainer7.Top := 41;\r\n WebHTMLContainer7.Width := 100;\r\n WebHTMLContainer7.Height := 15;\r\n WebHTMLContainer7.HeightStyle := ssAuto;\r\n WebHTMLContainer7.Align := alBottom;\r\n WebHTMLContainer7.ChildOrder := 2;\r\n WebHTMLContainer7.Visible := False;\r\n SetEvent(WebHTMLContainer7, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer7, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer7, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B5.SetParentComponent(SubForm_DIV);\r\n B5.Name := 'B5';\r\n B5.Left := 548;\r\n B5.Top := 3;\r\n B5.Width := 100;\r\n B5.Height := 80;\r\n B5.ElementClassName := 'data_block';\r\n B5.BorderColor := clWhite;\r\n B5.ChildOrder := 5;\r\n B5.Color := clWhite;\r\n B5.ElementFont := efCSS;\r\n B5.Font.Charset := ANSI_CHARSET;\r\n B5.Font.Color := clBlack;\r\n B5.Font.Height := -13;\r\n B5.Font.Name := 'Tahoma';\r\n B5.Font.Style := [];\r\n B5.ParentFont := False;\r\n B5.TabOrder := 25;\r\n SetEvent(B5, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B5, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel74.SetParentComponent(B5);\r\n WebPanel74.Name := 'WebPanel74';\r\n WebPanel74.Left := 0;\r\n WebPanel74.Top := 0;\r\n WebPanel74.Width := 100;\r\n WebPanel74.Height := 28;\r\n WebPanel74.ElementClassName := 'block_top';\r\n WebPanel74.HeightStyle := ssAuto;\r\n WebPanel74.Align := alTop;\r\n WebPanel74.BorderStyle := bsNone;\r\n WebPanel74.ChildOrder := 2;\r\n WebPanel74.Color := clWhite;\r\n WebPanel74.DragMode := dmAutomatic;\r\n WebPanel74.ElementFont := efCSS;\r\n WebPanel74.TabOrder := 0;\r\n SetEvent(WebPanel74, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel74, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel74, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel74, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel38.SetParentComponent(WebPanel74);\r\n WebLabel38.Name := 'WebLabel38';\r\n WebLabel38.Left := 24;\r\n WebLabel38.Top := 0;\r\n WebLabel38.Width := 11;\r\n WebLabel38.Height := 26;\r\n WebLabel38.Cursor := crHandPoint;\r\n WebLabel38.Hint := 'Locations';\r\n WebLabel38.Align := alLeft;\r\n WebLabel38.Caption := '5';\r\n WebLabel38.DragMode := dmAutomatic;\r\n WebLabel38.ElementClassName := 'block_title';\r\n WebLabel38.ElementLabelClassName := 'block_title';\r\n WebLabel38.ElementFont := efCSS;\r\n WebLabel38.Font.Charset := ANSI_CHARSET;\r\n WebLabel38.Font.Color := clNavy;\r\n WebLabel38.Font.Height := -19;\r\n WebLabel38.Font.Name := 'Segoe UI Emoji';\r\n WebLabel38.Font.Style := [fsBold];\r\n WebLabel38.HeightPercent := 100.000000000000000000;\r\n WebLabel38.ParentFont := False;\r\n WebLabel38.WidthStyle := ssAuto;\r\n WebLabel38.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel38, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel38, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel38, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel38, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton35.SetParentComponent(WebPanel74);\r\n WebSpeedButton35.Name := 'WebSpeedButton35';\r\n WebSpeedButton35.Left := 0;\r\n WebSpeedButton35.Top := 0;\r\n WebSpeedButton35.Width := 24;\r\n WebSpeedButton35.Height := 28;\r\n WebSpeedButton35.Cursor := crHandPoint;\r\n WebSpeedButton35.Hint := 'Edit';\r\n WebSpeedButton35.Align := alLeft;\r\n WebSpeedButton35.Color := clNone;\r\n WebSpeedButton35.Flat := True;\r\n WebSpeedButton35.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton35.Font.Color := clBlack;\r\n WebSpeedButton35.Font.Height := -13;\r\n WebSpeedButton35.Font.Name := 'Tahoma';\r\n WebSpeedButton35.Font.Style := [];\r\n WebSpeedButton35.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton35.MaterialGlyph := 'edit';\r\n WebSpeedButton35.ParentFont := False;\r\n WebSpeedButton35.ShowHint := True;\r\n WebSpeedButton35.TabOrder := 0;\r\n WebSpeedButton35.Visible := False;\r\n WebSpeedButton35.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton35, Self, 'OnClick', '_BlockCallPickForm');\r\n M5.SetParentComponent(B5);\r\n M5.Name := 'M5';\r\n M5.Left := 0;\r\n M5.Top := 56;\r\n M5.Width := 100;\r\n M5.Height := 24;\r\n M5.Align := alBottom;\r\n M5.BorderStyle := bsNone;\r\n M5.ElementClassName := 'block_memo';\r\n M5.ElementFont := efCSS;\r\n M5.Font.Charset := ANSI_CHARSET;\r\n M5.Font.Color := clBlack;\r\n M5.Font.Height := -13;\r\n M5.Font.Name := 'Tahoma';\r\n M5.Font.Style := [];\r\n M5.HeightPercent := 100.000000000000000000;\r\n M5.ParentFont := False;\r\n M5.SelLength := 0;\r\n M5.SelStart := 0;\r\n M5.ShowFocus := False;\r\n M5.WidthPercent := 100.000000000000000000;\r\n SetEvent(M5, Self, 'OnChange', 'M21Change');\r\n SetEvent(M5, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M5, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M5, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M5, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M5, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M5, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer6.SetParentComponent(B5);\r\n WebHTMLContainer6.Name := 'WebHTMLContainer6';\r\n WebHTMLContainer6.Left := 0;\r\n WebHTMLContainer6.Top := 41;\r\n WebHTMLContainer6.Width := 100;\r\n WebHTMLContainer6.Height := 15;\r\n WebHTMLContainer6.HeightStyle := ssAuto;\r\n WebHTMLContainer6.Align := alBottom;\r\n WebHTMLContainer6.ChildOrder := 2;\r\n WebHTMLContainer6.Visible := False;\r\n SetEvent(WebHTMLContainer6, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer6, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer6, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B4.SetParentComponent(SubForm_DIV);\r\n B4.Name := 'B4';\r\n B4.Left := 427;\r\n B4.Top := 3;\r\n B4.Width := 100;\r\n B4.Height := 80;\r\n B4.ElementClassName := 'data_block';\r\n B4.BorderColor := clWhite;\r\n B4.ChildOrder := 4;\r\n B4.Color := clWhite;\r\n B4.ElementFont := efCSS;\r\n B4.Font.Charset := ANSI_CHARSET;\r\n B4.Font.Color := clBlack;\r\n B4.Font.Height := -13;\r\n B4.Font.Name := 'Tahoma';\r\n B4.Font.Style := [];\r\n B4.ParentFont := False;\r\n B4.TabOrder := 26;\r\n SetEvent(B4, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B4, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel78.SetParentComponent(B4);\r\n WebPanel78.Name := 'WebPanel78';\r\n WebPanel78.Left := 0;\r\n WebPanel78.Top := 0;\r\n WebPanel78.Width := 100;\r\n WebPanel78.Height := 28;\r\n WebPanel78.ElementClassName := 'block_top';\r\n WebPanel78.HeightStyle := ssAuto;\r\n WebPanel78.Align := alTop;\r\n WebPanel78.BorderStyle := bsNone;\r\n WebPanel78.ChildOrder := 2;\r\n WebPanel78.Color := clWhite;\r\n WebPanel78.DragMode := dmAutomatic;\r\n WebPanel78.ElementFont := efCSS;\r\n WebPanel78.TabOrder := 0;\r\n SetEvent(WebPanel78, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel78, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel78, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel78, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel40.SetParentComponent(WebPanel78);\r\n WebLabel40.Name := 'WebLabel40';\r\n WebLabel40.Left := 24;\r\n WebLabel40.Top := 0;\r\n WebLabel40.Width := 11;\r\n WebLabel40.Height := 26;\r\n WebLabel40.Cursor := crHandPoint;\r\n WebLabel40.Align := alLeft;\r\n WebLabel40.Caption := '4';\r\n WebLabel40.DragMode := dmAutomatic;\r\n WebLabel40.ElementClassName := 'block_title';\r\n WebLabel40.ElementLabelClassName := 'block_title';\r\n WebLabel40.ElementFont := efCSS;\r\n WebLabel40.Font.Charset := ANSI_CHARSET;\r\n WebLabel40.Font.Color := clNavy;\r\n WebLabel40.Font.Height := -19;\r\n WebLabel40.Font.Name := 'Segoe UI Emoji';\r\n WebLabel40.Font.Style := [fsBold];\r\n WebLabel40.HeightPercent := 100.000000000000000000;\r\n WebLabel40.ParentFont := False;\r\n WebLabel40.WidthStyle := ssAuto;\r\n WebLabel40.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel40, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel40, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel40, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel40, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton37.SetParentComponent(WebPanel78);\r\n WebSpeedButton37.Name := 'WebSpeedButton37';\r\n WebSpeedButton37.Left := 0;\r\n WebSpeedButton37.Top := 0;\r\n WebSpeedButton37.Width := 24;\r\n WebSpeedButton37.Height := 28;\r\n WebSpeedButton37.Cursor := crHandPoint;\r\n WebSpeedButton37.Hint := 'Edit';\r\n WebSpeedButton37.Align := alLeft;\r\n WebSpeedButton37.Color := clNone;\r\n WebSpeedButton37.Flat := True;\r\n WebSpeedButton37.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton37.Font.Color := clBlack;\r\n WebSpeedButton37.Font.Height := -13;\r\n WebSpeedButton37.Font.Name := 'Tahoma';\r\n WebSpeedButton37.Font.Style := [];\r\n WebSpeedButton37.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton37.MaterialGlyph := 'edit';\r\n WebSpeedButton37.ParentFont := False;\r\n WebSpeedButton37.ShowHint := True;\r\n WebSpeedButton37.TabOrder := 0;\r\n WebSpeedButton37.Visible := False;\r\n WebSpeedButton37.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton37, Self, 'OnClick', '_BlockCallPickForm');\r\n M4.SetParentComponent(B4);\r\n M4.Name := 'M4';\r\n M4.Left := 0;\r\n M4.Top := 56;\r\n M4.Width := 100;\r\n M4.Height := 24;\r\n M4.Align := alBottom;\r\n M4.BorderStyle := bsNone;\r\n M4.ElementClassName := 'block_memo';\r\n M4.ElementFont := efCSS;\r\n M4.Font.Charset := ANSI_CHARSET;\r\n M4.Font.Color := clBlack;\r\n M4.Font.Height := -13;\r\n M4.Font.Name := 'Tahoma';\r\n M4.Font.Style := [];\r\n M4.HeightPercent := 100.000000000000000000;\r\n M4.ParentFont := False;\r\n M4.SelLength := 0;\r\n M4.SelStart := 0;\r\n M4.ShowFocus := False;\r\n M4.WidthPercent := 100.000000000000000000;\r\n SetEvent(M4, Self, 'OnChange', 'M21Change');\r\n SetEvent(M4, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M4, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M4, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M4, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M4, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M4, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer5.SetParentComponent(B4);\r\n WebHTMLContainer5.Name := 'WebHTMLContainer5';\r\n WebHTMLContainer5.Left := 0;\r\n WebHTMLContainer5.Top := 41;\r\n WebHTMLContainer5.Width := 100;\r\n WebHTMLContainer5.Height := 15;\r\n WebHTMLContainer5.HeightStyle := ssAuto;\r\n WebHTMLContainer5.Align := alBottom;\r\n WebHTMLContainer5.ChildOrder := 2;\r\n WebHTMLContainer5.Visible := False;\r\n SetEvent(WebHTMLContainer5, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer5, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer5, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B3.SetParentComponent(SubForm_DIV);\r\n B3.Name := 'B3';\r\n B3.Left := 307;\r\n B3.Top := 3;\r\n B3.Width := 100;\r\n B3.Height := 80;\r\n B3.ElementClassName := 'data_block';\r\n B3.BorderColor := clWhite;\r\n B3.ChildOrder := 3;\r\n B3.Color := clWhite;\r\n B3.ElementFont := efCSS;\r\n B3.Font.Charset := ANSI_CHARSET;\r\n B3.Font.Color := clBlack;\r\n B3.Font.Height := -13;\r\n B3.Font.Name := 'Tahoma';\r\n B3.Font.Style := [];\r\n B3.ParentFont := False;\r\n B3.TabOrder := 27;\r\n SetEvent(B3, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B3, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel72.SetParentComponent(B3);\r\n WebPanel72.Name := 'WebPanel72';\r\n WebPanel72.Left := 0;\r\n WebPanel72.Top := 0;\r\n WebPanel72.Width := 100;\r\n WebPanel72.Height := 28;\r\n WebPanel72.ElementClassName := 'block_top';\r\n WebPanel72.HeightStyle := ssAuto;\r\n WebPanel72.Align := alTop;\r\n WebPanel72.BorderStyle := bsNone;\r\n WebPanel72.ChildOrder := 2;\r\n WebPanel72.Color := clWhite;\r\n WebPanel72.DragMode := dmAutomatic;\r\n WebPanel72.ElementFont := efCSS;\r\n WebPanel72.TabOrder := 0;\r\n SetEvent(WebPanel72, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel72, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel72, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel72, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel37.SetParentComponent(WebPanel72);\r\n WebLabel37.Name := 'WebLabel37';\r\n WebLabel37.Left := 24;\r\n WebLabel37.Top := 0;\r\n WebLabel37.Width := 11;\r\n WebLabel37.Height := 26;\r\n WebLabel37.Cursor := crHandPoint;\r\n WebLabel37.Align := alLeft;\r\n WebLabel37.Caption := '3';\r\n WebLabel37.DragMode := dmAutomatic;\r\n WebLabel37.ElementClassName := 'block_title';\r\n WebLabel37.ElementLabelClassName := 'block_title';\r\n WebLabel37.ElementFont := efCSS;\r\n WebLabel37.Font.Charset := ANSI_CHARSET;\r\n WebLabel37.Font.Color := clNavy;\r\n WebLabel37.Font.Height := -19;\r\n WebLabel37.Font.Name := 'Segoe UI Emoji';\r\n WebLabel37.Font.Style := [fsBold];\r\n WebLabel37.HeightPercent := 100.000000000000000000;\r\n WebLabel37.ParentFont := False;\r\n WebLabel37.WidthStyle := ssAuto;\r\n WebLabel37.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel37, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel37, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel37, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel37, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton34.SetParentComponent(WebPanel72);\r\n WebSpeedButton34.Name := 'WebSpeedButton34';\r\n WebSpeedButton34.Left := 0;\r\n WebSpeedButton34.Top := 0;\r\n WebSpeedButton34.Width := 24;\r\n WebSpeedButton34.Height := 28;\r\n WebSpeedButton34.Cursor := crHandPoint;\r\n WebSpeedButton34.Hint := 'Edit';\r\n WebSpeedButton34.Align := alLeft;\r\n WebSpeedButton34.Color := clNone;\r\n WebSpeedButton34.Flat := True;\r\n WebSpeedButton34.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton34.Font.Color := clBlack;\r\n WebSpeedButton34.Font.Height := -13;\r\n WebSpeedButton34.Font.Name := 'Tahoma';\r\n WebSpeedButton34.Font.Style := [];\r\n WebSpeedButton34.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton34.MaterialGlyph := 'edit';\r\n WebSpeedButton34.ParentFont := False;\r\n WebSpeedButton34.ShowHint := True;\r\n WebSpeedButton34.TabOrder := 0;\r\n WebSpeedButton34.Visible := False;\r\n WebSpeedButton34.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton34, Self, 'OnClick', '_BlockCallPickForm');\r\n M3.SetParentComponent(B3);\r\n M3.Name := 'M3';\r\n M3.Left := 0;\r\n M3.Top := 56;\r\n M3.Width := 100;\r\n M3.Height := 24;\r\n M3.Align := alBottom;\r\n M3.BorderStyle := bsNone;\r\n M3.ElementClassName := 'block_memo';\r\n M3.ElementFont := efCSS;\r\n M3.Font.Charset := ANSI_CHARSET;\r\n M3.Font.Color := clBlack;\r\n M3.Font.Height := -13;\r\n M3.Font.Name := 'Tahoma';\r\n M3.Font.Style := [];\r\n M3.HeightPercent := 100.000000000000000000;\r\n M3.ParentFont := False;\r\n M3.SelLength := 0;\r\n M3.SelStart := 0;\r\n M3.ShowFocus := False;\r\n M3.WidthPercent := 100.000000000000000000;\r\n SetEvent(M3, Self, 'OnChange', 'M21Change');\r\n SetEvent(M3, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M3, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M3, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M3, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M3, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M3, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer4.SetParentComponent(B3);\r\n WebHTMLContainer4.Name := 'WebHTMLContainer4';\r\n WebHTMLContainer4.Left := 0;\r\n WebHTMLContainer4.Top := 41;\r\n WebHTMLContainer4.Width := 100;\r\n WebHTMLContainer4.Height := 15;\r\n WebHTMLContainer4.HeightStyle := ssAuto;\r\n WebHTMLContainer4.Align := alBottom;\r\n WebHTMLContainer4.ChildOrder := 2;\r\n WebHTMLContainer4.Visible := False;\r\n SetEvent(WebHTMLContainer4, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer4, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer4, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B2.SetParentComponent(SubForm_DIV);\r\n B2.Name := 'B2';\r\n B2.Left := 186;\r\n B2.Top := 3;\r\n B2.Width := 100;\r\n B2.Height := 80;\r\n B2.ElementClassName := 'data_block';\r\n B2.BorderColor := clWhite;\r\n B2.ChildOrder := 2;\r\n B2.Color := clWhite;\r\n B2.ElementFont := efCSS;\r\n B2.Font.Charset := ANSI_CHARSET;\r\n B2.Font.Color := clBlack;\r\n B2.Font.Height := -13;\r\n B2.Font.Name := 'Tahoma';\r\n B2.Font.Style := [];\r\n B2.ParentFont := False;\r\n B2.TabOrder := 28;\r\n SetEvent(B2, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B2, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel76.SetParentComponent(B2);\r\n WebPanel76.Name := 'WebPanel76';\r\n WebPanel76.Left := 0;\r\n WebPanel76.Top := 0;\r\n WebPanel76.Width := 100;\r\n WebPanel76.Height := 28;\r\n WebPanel76.ElementClassName := 'block_top';\r\n WebPanel76.HeightStyle := ssAuto;\r\n WebPanel76.Align := alTop;\r\n WebPanel76.BorderStyle := bsNone;\r\n WebPanel76.ChildOrder := 2;\r\n WebPanel76.Color := clWhite;\r\n WebPanel76.DragMode := dmAutomatic;\r\n WebPanel76.ElementFont := efCSS;\r\n WebPanel76.TabOrder := 0;\r\n SetEvent(WebPanel76, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel76, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel76, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel76, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel39.SetParentComponent(WebPanel76);\r\n WebLabel39.Name := 'WebLabel39';\r\n WebLabel39.Left := 24;\r\n WebLabel39.Top := 0;\r\n WebLabel39.Width := 11;\r\n WebLabel39.Height := 26;\r\n WebLabel39.Cursor := crHandPoint;\r\n WebLabel39.Align := alLeft;\r\n WebLabel39.Caption := '2';\r\n WebLabel39.DragMode := dmAutomatic;\r\n WebLabel39.ElementClassName := 'block_title';\r\n WebLabel39.ElementLabelClassName := 'block_title';\r\n WebLabel39.ElementFont := efCSS;\r\n WebLabel39.Font.Charset := ANSI_CHARSET;\r\n WebLabel39.Font.Color := clNavy;\r\n WebLabel39.Font.Height := -19;\r\n WebLabel39.Font.Name := 'Segoe UI Emoji';\r\n WebLabel39.Font.Style := [fsBold];\r\n WebLabel39.HeightPercent := 100.000000000000000000;\r\n WebLabel39.ParentFont := False;\r\n WebLabel39.WidthStyle := ssAuto;\r\n WebLabel39.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel39, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel39, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel39, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel39, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton36.SetParentComponent(WebPanel76);\r\n WebSpeedButton36.Name := 'WebSpeedButton36';\r\n WebSpeedButton36.Left := 0;\r\n WebSpeedButton36.Top := 0;\r\n WebSpeedButton36.Width := 24;\r\n WebSpeedButton36.Height := 28;\r\n WebSpeedButton36.Cursor := crHandPoint;\r\n WebSpeedButton36.Hint := 'Edit';\r\n WebSpeedButton36.Align := alLeft;\r\n WebSpeedButton36.Color := clNone;\r\n WebSpeedButton36.Flat := True;\r\n WebSpeedButton36.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton36.Font.Color := clBlack;\r\n WebSpeedButton36.Font.Height := -13;\r\n WebSpeedButton36.Font.Name := 'Tahoma';\r\n WebSpeedButton36.Font.Style := [];\r\n WebSpeedButton36.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton36.MaterialGlyph := 'edit';\r\n WebSpeedButton36.ParentFont := False;\r\n WebSpeedButton36.ShowHint := True;\r\n WebSpeedButton36.TabOrder := 0;\r\n WebSpeedButton36.Visible := False;\r\n WebSpeedButton36.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton36, Self, 'OnClick', '_BlockCallPickForm');\r\n M2.SetParentComponent(B2);\r\n M2.Name := 'M2';\r\n M2.Left := 0;\r\n M2.Top := 56;\r\n M2.Width := 100;\r\n M2.Height := 24;\r\n M2.Align := alBottom;\r\n M2.BorderStyle := bsNone;\r\n M2.ElementClassName := 'block_memo';\r\n M2.ElementFont := efCSS;\r\n M2.Font.Charset := ANSI_CHARSET;\r\n M2.Font.Color := clBlack;\r\n M2.Font.Height := -13;\r\n M2.Font.Name := 'Tahoma';\r\n M2.Font.Style := [];\r\n M2.HeightPercent := 100.000000000000000000;\r\n M2.ParentFont := False;\r\n M2.SelLength := 0;\r\n M2.SelStart := 0;\r\n M2.ShowFocus := False;\r\n M2.WidthPercent := 100.000000000000000000;\r\n SetEvent(M2, Self, 'OnChange', 'M21Change');\r\n SetEvent(M2, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M2, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M2, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M2, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M2, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M2, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer3.SetParentComponent(B2);\r\n WebHTMLContainer3.Name := 'WebHTMLContainer3';\r\n WebHTMLContainer3.Left := 0;\r\n WebHTMLContainer3.Top := 41;\r\n WebHTMLContainer3.Width := 100;\r\n WebHTMLContainer3.Height := 15;\r\n WebHTMLContainer3.HeightStyle := ssAuto;\r\n WebHTMLContainer3.Align := alBottom;\r\n WebHTMLContainer3.ChildOrder := 2;\r\n WebHTMLContainer3.Visible := False;\r\n SetEvent(WebHTMLContainer3, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer3, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer3, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B1.SetParentComponent(SubForm_DIV);\r\n B1.Name := 'B1';\r\n B1.Left := 66;\r\n B1.Top := 3;\r\n B1.Width := 100;\r\n B1.Height := 80;\r\n B1.ElementClassName := 'data_block';\r\n B1.BorderColor := clWhite;\r\n B1.ChildOrder := 1;\r\n B1.Color := clWhite;\r\n B1.ElementFont := efCSS;\r\n B1.Font.Charset := ANSI_CHARSET;\r\n B1.Font.Color := clBlack;\r\n B1.Font.Height := -13;\r\n B1.Font.Name := 'Tahoma';\r\n B1.Font.Style := [];\r\n B1.ParentFont := False;\r\n B1.TabOrder := 29;\r\n SetEvent(B1, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B1, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel70.SetParentComponent(B1);\r\n WebPanel70.Name := 'WebPanel70';\r\n WebPanel70.Left := 0;\r\n WebPanel70.Top := 0;\r\n WebPanel70.Width := 100;\r\n WebPanel70.Height := 24;\r\n WebPanel70.ElementClassName := 'block_top';\r\n WebPanel70.HeightStyle := ssAuto;\r\n WebPanel70.Align := alTop;\r\n WebPanel70.BorderStyle := bsNone;\r\n WebPanel70.ChildOrder := 2;\r\n WebPanel70.Color := clWhite;\r\n WebPanel70.DragMode := dmAutomatic;\r\n WebPanel70.ElementFont := efCSS;\r\n WebPanel70.TabOrder := 0;\r\n SetEvent(WebPanel70, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel70, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel70, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel70, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel36.SetParentComponent(WebPanel70);\r\n WebLabel36.Name := 'WebLabel36';\r\n WebLabel36.Left := 24;\r\n WebLabel36.Top := 0;\r\n WebLabel36.Width := 11;\r\n WebLabel36.Height := 26;\r\n WebLabel36.Cursor := crHandPoint;\r\n WebLabel36.Align := alLeft;\r\n WebLabel36.Caption := '1';\r\n WebLabel36.DragMode := dmAutomatic;\r\n WebLabel36.ElementClassName := 'block_title';\r\n WebLabel36.ElementLabelClassName := 'block_title';\r\n WebLabel36.ElementFont := efCSS;\r\n WebLabel36.Font.Charset := ANSI_CHARSET;\r\n WebLabel36.Font.Color := clNavy;\r\n WebLabel36.Font.Height := -19;\r\n WebLabel36.Font.Name := 'Segoe UI Emoji';\r\n WebLabel36.Font.Style := [fsBold];\r\n WebLabel36.HeightPercent := 100.000000000000000000;\r\n WebLabel36.ParentFont := False;\r\n WebLabel36.WidthStyle := ssAuto;\r\n WebLabel36.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel36, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel36, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel36, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel36, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton33.SetParentComponent(WebPanel70);\r\n WebSpeedButton33.Name := 'WebSpeedButton33';\r\n WebSpeedButton33.Left := 0;\r\n WebSpeedButton33.Top := 0;\r\n WebSpeedButton33.Width := 24;\r\n WebSpeedButton33.Height := 24;\r\n WebSpeedButton33.Cursor := crHandPoint;\r\n WebSpeedButton33.Hint := 'Edit';\r\n WebSpeedButton33.Align := alLeft;\r\n WebSpeedButton33.Color := clNone;\r\n WebSpeedButton33.Flat := True;\r\n WebSpeedButton33.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton33.Font.Color := clBlack;\r\n WebSpeedButton33.Font.Height := -13;\r\n WebSpeedButton33.Font.Name := 'Tahoma';\r\n WebSpeedButton33.Font.Style := [];\r\n WebSpeedButton33.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton33.MaterialGlyph := 'edit';\r\n WebSpeedButton33.ParentFont := False;\r\n WebSpeedButton33.ShowHint := True;\r\n WebSpeedButton33.TabOrder := 0;\r\n WebSpeedButton33.Visible := False;\r\n WebSpeedButton33.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton33, Self, 'OnClick', '_BlockCallPickForm');\r\n M1.SetParentComponent(B1);\r\n M1.Name := 'M1';\r\n M1.Left := 0;\r\n M1.Top := 56;\r\n M1.Width := 100;\r\n M1.Height := 24;\r\n M1.Align := alBottom;\r\n M1.BorderStyle := bsNone;\r\n M1.ElementClassName := 'block_memo';\r\n M1.ElementFont := efCSS;\r\n M1.Font.Charset := ANSI_CHARSET;\r\n M1.Font.Color := clBlack;\r\n M1.Font.Height := -13;\r\n M1.Font.Name := 'Tahoma';\r\n M1.Font.Style := [];\r\n M1.HeightPercent := 100.000000000000000000;\r\n M1.ParentFont := False;\r\n M1.SelLength := 0;\r\n M1.SelStart := 0;\r\n M1.ShowFocus := False;\r\n M1.WidthPercent := 100.000000000000000000;\r\n SetEvent(M1, Self, 'OnChange', 'M21Change');\r\n SetEvent(M1, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M1, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M1, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M1, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M1, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M1, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer2.SetParentComponent(B1);\r\n WebHTMLContainer2.Name := 'WebHTMLContainer2';\r\n WebHTMLContainer2.Left := 0;\r\n WebHTMLContainer2.Top := 41;\r\n WebHTMLContainer2.Width := 100;\r\n WebHTMLContainer2.Height := 15;\r\n WebHTMLContainer2.HeightStyle := ssAuto;\r\n WebHTMLContainer2.Align := alBottom;\r\n WebHTMLContainer2.ChildOrder := 2;\r\n WebHTMLContainer2.Visible := False;\r\n SetEvent(WebHTMLContainer2, Self, 'OnClick', 'WebHTMLContainer2Click');\r\n SetEvent(WebHTMLContainer2, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer2, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer2, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B30.SetParentComponent(SubForm_DIV);\r\n B30.Name := 'B30';\r\n B30.Left := 540;\r\n B30.Top := 394;\r\n B30.Width := 100;\r\n B30.Height := 80;\r\n B30.ElementClassName := 'data_block';\r\n B30.BorderColor := clWhite;\r\n B30.ChildOrder := 30;\r\n B30.Color := clWhite;\r\n B30.ElementFont := efCSS;\r\n B30.Font.Charset := ANSI_CHARSET;\r\n B30.Font.Color := clBlack;\r\n B30.Font.Height := -13;\r\n B30.Font.Name := 'Tahoma';\r\n B30.Font.Style := [];\r\n B30.ParentFont := False;\r\n B30.TabOrder := 30;\r\n SetEvent(B30, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B30, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel21.SetParentComponent(B30);\r\n WebPanel21.Name := 'WebPanel21';\r\n WebPanel21.Left := 0;\r\n WebPanel21.Top := 0;\r\n WebPanel21.Width := 100;\r\n WebPanel21.Height := 28;\r\n WebPanel21.ElementClassName := 'block_top';\r\n WebPanel21.HeightStyle := ssAuto;\r\n WebPanel21.Align := alTop;\r\n WebPanel21.BorderStyle := bsNone;\r\n WebPanel21.ChildOrder := 2;\r\n WebPanel21.Color := clWhite;\r\n WebPanel21.DragMode := dmAutomatic;\r\n WebPanel21.ElementFont := efCSS;\r\n WebPanel21.TabOrder := 0;\r\n SetEvent(WebPanel21, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel21, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel21, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel21, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel12.SetParentComponent(WebPanel21);\r\n WebLabel12.Name := 'WebLabel12';\r\n WebLabel12.Left := 24;\r\n WebLabel12.Top := 0;\r\n WebLabel12.Width := 22;\r\n WebLabel12.Height := 26;\r\n WebLabel12.Cursor := crHandPoint;\r\n WebLabel12.Hint := 'Setting Unit';\r\n WebLabel12.Align := alLeft;\r\n WebLabel12.Caption := '30';\r\n WebLabel12.DragMode := dmAutomatic;\r\n WebLabel12.ElementClassName := 'block_title';\r\n WebLabel12.ElementLabelClassName := 'block_title';\r\n WebLabel12.ElementFont := efCSS;\r\n WebLabel12.Font.Charset := ANSI_CHARSET;\r\n WebLabel12.Font.Color := clNavy;\r\n WebLabel12.Font.Height := -19;\r\n WebLabel12.Font.Name := 'Segoe UI Emoji';\r\n WebLabel12.Font.Style := [fsBold];\r\n WebLabel12.HeightPercent := 100.000000000000000000;\r\n WebLabel12.ParentFont := False;\r\n WebLabel12.WidthStyle := ssAuto;\r\n WebLabel12.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel12, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel12, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel12, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel12, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton10.SetParentComponent(WebPanel21);\r\n WebSpeedButton10.Name := 'WebSpeedButton10';\r\n WebSpeedButton10.Left := 0;\r\n WebSpeedButton10.Top := 0;\r\n WebSpeedButton10.Width := 24;\r\n WebSpeedButton10.Height := 28;\r\n WebSpeedButton10.Cursor := crHandPoint;\r\n WebSpeedButton10.Hint := 'Edit';\r\n WebSpeedButton10.Align := alLeft;\r\n WebSpeedButton10.Color := clNone;\r\n WebSpeedButton10.Flat := True;\r\n WebSpeedButton10.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton10.Font.Color := clBlack;\r\n WebSpeedButton10.Font.Height := -13;\r\n WebSpeedButton10.Font.Name := 'Tahoma';\r\n WebSpeedButton10.Font.Style := [];\r\n WebSpeedButton10.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton10.MaterialGlyph := 'edit';\r\n WebSpeedButton10.ParentFont := False;\r\n WebSpeedButton10.ShowHint := True;\r\n WebSpeedButton10.TabOrder := 0;\r\n WebSpeedButton10.Visible := False;\r\n WebSpeedButton10.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton10, Self, 'OnClick', '_BlockCallPickForm');\r\n M30.SetParentComponent(B30);\r\n M30.Name := 'M30';\r\n M30.Left := 0;\r\n M30.Top := 56;\r\n M30.Width := 100;\r\n M30.Height := 24;\r\n M30.Align := alBottom;\r\n M30.BorderStyle := bsNone;\r\n M30.ElementClassName := 'block_memo';\r\n M30.ElementFont := efCSS;\r\n M30.Font.Charset := ANSI_CHARSET;\r\n M30.Font.Color := clBlack;\r\n M30.Font.Height := -13;\r\n M30.Font.Name := 'Tahoma';\r\n M30.Font.Style := [];\r\n M30.HeightPercent := 100.000000000000000000;\r\n M30.ParentFont := False;\r\n M30.SelLength := 0;\r\n M30.SelStart := 0;\r\n M30.ShowFocus := False;\r\n M30.WidthPercent := 100.000000000000000000;\r\n SetEvent(M30, Self, 'OnChange', 'M21Change');\r\n SetEvent(M30, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M30, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M30, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M30, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M30, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M30, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer1.SetParentComponent(B30);\r\n WebHTMLContainer1.Name := 'WebHTMLContainer1';\r\n WebHTMLContainer1.Left := 0;\r\n WebHTMLContainer1.Top := 38;\r\n WebHTMLContainer1.Width := 100;\r\n WebHTMLContainer1.Height := 18;\r\n WebHTMLContainer1.HeightStyle := ssAuto;\r\n WebHTMLContainer1.Align := alBottom;\r\n WebHTMLContainer1.ChildOrder := 2;\r\n WebHTMLContainer1.Visible := False;\r\n SetEvent(WebHTMLContainer1, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer1, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer1, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B100.SetParentComponent(SubForm_DIV);\r\n B100.Name := 'B100';\r\n B100.Left := 914;\r\n B100.Top := 240;\r\n B100.Width := 92;\r\n B100.Height := 100;\r\n B100.ElementClassName := 'data_block';\r\n B100.BorderColor := clWhite;\r\n B100.ChildOrder := 59;\r\n B100.Color := clWhite;\r\n B100.ElementFont := efCSS;\r\n B100.Font.Charset := ANSI_CHARSET;\r\n B100.Font.Color := clBlack;\r\n B100.Font.Height := -13;\r\n B100.Font.Name := 'Tahoma';\r\n B100.Font.Style := [fsUnderline];\r\n B100.ParentFont := False;\r\n B100.TabOrder := 31;\r\n SetEvent(B100, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B100, Self, 'OnMouseMove', '_GridBlock_MouseMove');\r\n WebPanel3.SetParentComponent(B100);\r\n WebPanel3.Name := 'WebPanel3';\r\n WebPanel3.Left := 0;\r\n WebPanel3.Top := 0;\r\n WebPanel3.Width := 92;\r\n WebPanel3.Height := 28;\r\n WebPanel3.ElementClassName := 'block_top';\r\n WebPanel3.HeightStyle := ssAuto;\r\n WebPanel3.Align := alTop;\r\n WebPanel3.BorderStyle := bsNone;\r\n WebPanel3.ChildOrder := 2;\r\n WebPanel3.Color := clWhite;\r\n WebPanel3.DragMode := dmAutomatic;\r\n WebPanel3.ElementFont := efCSS;\r\n WebPanel3.TabOrder := 0;\r\n SetEvent(WebPanel3, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel3, Self, 'OnMouseMove', 'WebPanel14MouseMove');\r\n SetEvent(WebPanel3, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel3, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel14.SetParentComponent(WebPanel3);\r\n WebLabel14.Name := 'WebLabel14';\r\n WebLabel14.Left := 24;\r\n WebLabel14.Top := 0;\r\n WebLabel14.Width := 33;\r\n WebLabel14.Height := 26;\r\n WebLabel14.Cursor := crHandPoint;\r\n WebLabel14.Hint := 'Setting Unit';\r\n WebLabel14.Align := alLeft;\r\n WebLabel14.Caption := '109';\r\n WebLabel14.DragMode := dmAutomatic;\r\n WebLabel14.ElementClassName := 'block_title';\r\n WebLabel14.ElementLabelClassName := 'block_title';\r\n WebLabel14.ElementFont := efCSS;\r\n WebLabel14.Font.Charset := ANSI_CHARSET;\r\n WebLabel14.Font.Color := clNavy;\r\n WebLabel14.Font.Height := -19;\r\n WebLabel14.Font.Name := 'Segoe UI Emoji';\r\n WebLabel14.Font.Style := [fsBold];\r\n WebLabel14.HeightPercent := 100.000000000000000000;\r\n WebLabel14.ParentFont := False;\r\n WebLabel14.WidthStyle := ssAuto;\r\n WebLabel14.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel14, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel14, Self, 'OnMouseMove', '_GridBlockTitle_MouseMove');\r\n SetEvent(WebLabel14, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel14, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton19.SetParentComponent(WebPanel3);\r\n WebSpeedButton19.Name := 'WebSpeedButton19';\r\n WebSpeedButton19.Left := 0;\r\n WebSpeedButton19.Top := 0;\r\n WebSpeedButton19.Width := 24;\r\n WebSpeedButton19.Height := 28;\r\n WebSpeedButton19.Cursor := crHandPoint;\r\n WebSpeedButton19.Hint := 'Edit';\r\n WebSpeedButton19.Align := alLeft;\r\n WebSpeedButton19.Color := clNone;\r\n WebSpeedButton19.Flat := True;\r\n WebSpeedButton19.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton19.Font.Color := clBlack;\r\n WebSpeedButton19.Font.Height := -13;\r\n WebSpeedButton19.Font.Name := 'Tahoma';\r\n WebSpeedButton19.Font.Style := [];\r\n WebSpeedButton19.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton19.MaterialGlyph := 'edit';\r\n WebSpeedButton19.ParentFont := False;\r\n WebSpeedButton19.ShowHint := True;\r\n WebSpeedButton19.TabOrder := 0;\r\n WebSpeedButton19.Visible := False;\r\n WebSpeedButton19.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton19, Self, 'OnClick', '_BlockCallPickForm');\r\n G9.SetParentComponent(B100);\r\n G9.Name := 'G9';\r\n G9.AlignWithMargins := True;\r\n G9.Left := 3;\r\n G9.Top := 31;\r\n G9.Width := 86;\r\n G9.Height := 59;\r\n G9.Margins.Bottom := 10;\r\n G9.Align := alClient;\r\n G9.BorderStyle := bsNone;\r\n G9.Columns.Clear;\r\n with G9.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C1';\r\n Title := 'C1';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C2';\r\n Title := 'C2';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C3';\r\n Title := 'C3';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C4';\r\n Title := 'C4';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C5';\r\n Title := 'C5';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C6';\r\n Title := 'C6';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C7';\r\n Title := 'C7';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C8';\r\n Title := 'C8';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C9';\r\n Title := 'C9';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C10';\r\n Title := 'C10';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C11';\r\n Title := 'C11';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C12';\r\n Title := 'C12';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C13';\r\n Title := 'C13';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C15';\r\n Title := 'C15';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C16';\r\n Title := 'C16';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C17';\r\n Title := 'C17';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C18';\r\n Title := 'C18';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C19';\r\n Title := 'C19';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C20';\r\n Title := 'C20';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_NURSE2';\r\n Title := '_CURRENT_NURSE2';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_NURSE1';\r\n Title := '_CURRENT_NURSE1';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_PROVIDER';\r\n Title := '_CURRENT_PROVIDER';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_PROCEDURENUMBER';\r\n Title := '_CURRENT_PROCEDURENUMBER';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_MRN';\r\n Title := '_CURRENT_MRN';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n G9.DefaultRowHeight := 25;\r\n G9.FixedFont.Charset := DEFAULT_CHARSET;\r\n G9.FixedFont.Color := clWindowText;\r\n G9.FixedFont.Height := -11;\r\n G9.FixedFont.Name := 'Tahoma';\r\n G9.FixedFont.Style := [];\r\n G9.FixedCols := 0;\r\n G9.Font.Charset := DEFAULT_CHARSET;\r\n G9.Font.Color := clWindowText;\r\n G9.Font.Height := -13;\r\n G9.Font.Name := 'Tahoma';\r\n G9.Font.Style := [];\r\n G9.Options := [goFixedVertLine,goColSizing,goEditing,goRowSelect];\r\n G9.ParentFont := False;\r\n G9.TabOrder := 1;\r\n G9.HeightPercent := 100.000000000000000000;\r\n G9.SelectionColor := 16769217;\r\n G9.SelectionTextColor := clBlack;\r\n G9.WidthPercent := 100.000000000000000000;\r\n SetEvent(G9, Self, 'OnClick', 'G1Click');\r\n SetEvent(G9, Self, 'OnKeyUp', 'G1KeyUp');\r\n SetEvent(G9, Self, 'OnMouseMove', 'G1MouseMove');\r\n G9.ColWidths[0] := 64;\r\n G9.ColWidths[1] := 64;\r\n G9.ColWidths[2] := 64;\r\n G9.ColWidths[3] := 64;\r\n G9.ColWidths[4] := 64;\r\n G9.ColWidths[5] := 64;\r\n G9.ColWidths[6] := 64;\r\n G9.ColWidths[7] := 64;\r\n G9.ColWidths[8] := 64;\r\n G9.ColWidths[9] := 64;\r\n G9.ColWidths[10] := 64;\r\n G9.ColWidths[11] := 64;\r\n G9.ColWidths[12] := 64;\r\n G9.ColWidths[13] := 64;\r\n G9.ColWidths[14] := 64;\r\n G9.ColWidths[15] := 64;\r\n G9.ColWidths[16] := 64;\r\n G9.ColWidths[17] := 64;\r\n G9.ColWidths[18] := 64;\r\n G9.ColWidths[19] := 64;\r\n G9.ColWidths[20] := 64;\r\n G9.ColWidths[21] := 64;\r\n G9.ColWidths[22] := 64;\r\n G9.ColWidths[23] := 64;\r\n B102.SetParentComponent(SubForm_DIV);\r\n B102.Name := 'B102';\r\n B102.Left := 799;\r\n B102.Top := -7;\r\n B102.Width := 92;\r\n B102.Height := 100;\r\n B102.ElementClassName := 'data_block';\r\n B102.BorderColor := clWhite;\r\n B102.ChildOrder := 52;\r\n B102.Color := clWhite;\r\n B102.ElementFont := efCSS;\r\n B102.Font.Charset := ANSI_CHARSET;\r\n B102.Font.Color := clBlack;\r\n B102.Font.Height := -13;\r\n B102.Font.Name := 'Tahoma';\r\n B102.Font.Style := [fsUnderline];\r\n B102.ParentFont := False;\r\n B102.TabOrder := 32;\r\n SetEvent(B102, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B102, Self, 'OnMouseMove', '_GridBlock_MouseMove');\r\n WebPanel24.SetParentComponent(B102);\r\n WebPanel24.Name := 'WebPanel24';\r\n WebPanel24.Left := 0;\r\n WebPanel24.Top := 0;\r\n WebPanel24.Width := 92;\r\n WebPanel24.Height := 28;\r\n WebPanel24.ElementClassName := 'block_top';\r\n WebPanel24.HeightStyle := ssAuto;\r\n WebPanel24.Align := alTop;\r\n WebPanel24.BorderStyle := bsNone;\r\n WebPanel24.ChildOrder := 2;\r\n WebPanel24.Color := clWhite;\r\n WebPanel24.DragMode := dmAutomatic;\r\n WebPanel24.ElementFont := efCSS;\r\n WebPanel24.TabOrder := 0;\r\n SetEvent(WebPanel24, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel24, Self, 'OnMouseMove', 'WebPanel14MouseMove');\r\n SetEvent(WebPanel24, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel24, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel21.SetParentComponent(WebPanel24);\r\n WebLabel21.Name := 'WebLabel21';\r\n WebLabel21.Left := 24;\r\n WebLabel21.Top := 0;\r\n WebLabel21.Width := 33;\r\n WebLabel21.Height := 26;\r\n WebLabel21.Cursor := crHandPoint;\r\n WebLabel21.Hint := 'Setting Unit';\r\n WebLabel21.Align := alLeft;\r\n WebLabel21.Caption := '102';\r\n WebLabel21.DragMode := dmAutomatic;\r\n WebLabel21.ElementClassName := 'block_title';\r\n WebLabel21.ElementLabelClassName := 'block_title';\r\n WebLabel21.ElementFont := efCSS;\r\n WebLabel21.Font.Charset := ANSI_CHARSET;\r\n WebLabel21.Font.Color := clNavy;\r\n WebLabel21.Font.Height := -19;\r\n WebLabel21.Font.Name := 'Segoe UI Emoji';\r\n WebLabel21.Font.Style := [fsBold];\r\n WebLabel21.HeightPercent := 100.000000000000000000;\r\n WebLabel21.ParentFont := False;\r\n WebLabel21.WidthStyle := ssAuto;\r\n WebLabel21.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel21, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel21, Self, 'OnMouseMove', '_GridBlockTitle_MouseMove');\r\n SetEvent(WebLabel21, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel21, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton12.SetParentComponent(WebPanel24);\r\n WebSpeedButton12.Name := 'WebSpeedButton12';\r\n WebSpeedButton12.Left := 0;\r\n WebSpeedButton12.Top := 0;\r\n WebSpeedButton12.Width := 24;\r\n WebSpeedButton12.Height := 28;\r\n WebSpeedButton12.Cursor := crHandPoint;\r\n WebSpeedButton12.Hint := 'Edit';\r\n WebSpeedButton12.Align := alLeft;\r\n WebSpeedButton12.Color := clNone;\r\n WebSpeedButton12.Flat := True;\r\n WebSpeedButton12.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton12.Font.Color := clBlack;\r\n WebSpeedButton12.Font.Height := -13;\r\n WebSpeedButton12.Font.Name := 'Tahoma';\r\n WebSpeedButton12.Font.Style := [];\r\n WebSpeedButton12.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton12.MaterialGlyph := 'edit';\r\n WebSpeedButton12.ParentFont := False;\r\n WebSpeedButton12.ShowHint := True;\r\n WebSpeedButton12.TabOrder := 0;\r\n WebSpeedButton12.Visible := False;\r\n WebSpeedButton12.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton12, Self, 'OnClick', '_BlockCallPickForm');\r\n G2.SetParentComponent(B102);\r\n G2.Name := 'G2';\r\n G2.AlignWithMargins := True;\r\n G2.Left := 3;\r\n G2.Top := 31;\r\n G2.Width := 86;\r\n G2.Height := 59;\r\n G2.Margins.Bottom := 10;\r\n G2.Align := alClient;\r\n G2.BorderStyle := bsNone;\r\n G2.Columns.Clear;\r\n with G2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C1';\r\n Title := 'C1';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C2';\r\n Title := 'C2';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C3';\r\n Title := 'C3';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C4';\r\n Title := 'C4';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C5';\r\n Title := 'C5';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C6';\r\n Title := 'C6';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C7';\r\n Title := 'C7';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C8';\r\n Title := 'C8';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C9';\r\n Title := 'C9';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C10';\r\n Title := 'C10';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C11';\r\n Title := 'C11';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C12';\r\n Title := 'C12';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C13';\r\n Title := 'C13';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C15';\r\n Title := 'C15';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C16';\r\n Title := 'C16';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C17';\r\n Title := 'C17';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C18';\r\n Title := 'C18';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C19';\r\n Title := 'C19';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C20';\r\n Title := 'C20';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_NURSE2';\r\n Title := '_CURRENT_NURSE2';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_NURSE1';\r\n Title := '_CURRENT_NURSE1';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_PROVIDER';\r\n Title := '_CURRENT_PROVIDER';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_PROCEDURENUMBER';\r\n Title := '_CURRENT_PROCEDURENUMBER';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_MRN';\r\n Title := '_CURRENT_MRN';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n G2.DefaultRowHeight := 25;\r\n G2.FixedFont.Charset := DEFAULT_CHARSET;\r\n G2.FixedFont.Color := clWindowText;\r\n G2.FixedFont.Height := -11;\r\n G2.FixedFont.Name := 'Tahoma';\r\n G2.FixedFont.Style := [];\r\n G2.FixedCols := 0;\r\n G2.Font.Charset := DEFAULT_CHARSET;\r\n G2.Font.Color := clWindowText;\r\n G2.Font.Height := -13;\r\n G2.Font.Name := 'Tahoma';\r\n G2.Font.Style := [];\r\n G2.Options := [goFixedVertLine,goColSizing,goEditing,goRowSelect];\r\n G2.ParentFont := False;\r\n G2.TabOrder := 1;\r\n G2.HeightPercent := 100.000000000000000000;\r\n G2.SelectionColor := 16769217;\r\n G2.SelectionTextColor := clBlack;\r\n G2.WidthPercent := 100.000000000000000000;\r\n SetEvent(G2, Self, 'OnClick', 'G1Click');\r\n SetEvent(G2, Self, 'OnKeyUp', 'G1KeyUp');\r\n SetEvent(G2, Self, 'OnMouseMove', 'G1MouseMove');\r\n G2.ColWidths[0] := 64;\r\n G2.ColWidths[1] := 64;\r\n G2.ColWidths[2] := 64;\r\n G2.ColWidths[3] := 64;\r\n G2.ColWidths[4] := 64;\r\n G2.ColWidths[5] := 64;\r\n G2.ColWidths[6] := 64;\r\n G2.ColWidths[7] := 64;\r\n G2.ColWidths[8] := 64;\r\n G2.ColWidths[9] := 64;\r\n G2.ColWidths[10] := 64;\r\n G2.ColWidths[11] := 64;\r\n G2.ColWidths[12] := 64;\r\n G2.ColWidths[13] := 64;\r\n G2.ColWidths[14] := 64;\r\n G2.ColWidths[15] := 64;\r\n G2.ColWidths[16] := 64;\r\n G2.ColWidths[17] := 64;\r\n G2.ColWidths[18] := 64;\r\n G2.ColWidths[19] := 64;\r\n G2.ColWidths[20] := 64;\r\n G2.ColWidths[21] := 64;\r\n G2.ColWidths[22] := 64;\r\n G2.ColWidths[23] := 64;\r\n B105.SetParentComponent(SubForm_DIV);\r\n B105.Name := 'B105';\r\n B105.Left := 799;\r\n B105.Top := 117;\r\n B105.Width := 92;\r\n B105.Height := 100;\r\n B105.ElementClassName := 'data_block';\r\n B105.BorderColor := clWhite;\r\n B105.ChildOrder := 55;\r\n B105.Color := clWhite;\r\n B105.ElementFont := efCSS;\r\n B105.Font.Charset := ANSI_CHARSET;\r\n B105.Font.Color := clBlack;\r\n B105.Font.Height := -13;\r\n B105.Font.Name := 'Tahoma';\r\n B105.Font.Style := [fsUnderline];\r\n B105.ParentFont := False;\r\n B105.TabOrder := 33;\r\n SetEvent(B105, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B105, Self, 'OnMouseMove', '_GridBlock_MouseMove');\r\n WebPanel26.SetParentComponent(B105);\r\n WebPanel26.Name := 'WebPanel26';\r\n WebPanel26.Left := 0;\r\n WebPanel26.Top := 0;\r\n WebPanel26.Width := 92;\r\n WebPanel26.Height := 28;\r\n WebPanel26.ElementClassName := 'block_top';\r\n WebPanel26.HeightStyle := ssAuto;\r\n WebPanel26.Align := alTop;\r\n WebPanel26.BorderStyle := bsNone;\r\n WebPanel26.ChildOrder := 2;\r\n WebPanel26.Color := clWhite;\r\n WebPanel26.DragMode := dmAutomatic;\r\n WebPanel26.ElementFont := efCSS;\r\n WebPanel26.TabOrder := 0;\r\n SetEvent(WebPanel26, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel26, Self, 'OnMouseMove', 'WebPanel14MouseMove');\r\n SetEvent(WebPanel26, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel26, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel22.SetParentComponent(WebPanel26);\r\n WebLabel22.Name := 'WebLabel22';\r\n WebLabel22.Left := 24;\r\n WebLabel22.Top := 0;\r\n WebLabel22.Width := 33;\r\n WebLabel22.Height := 26;\r\n WebLabel22.Cursor := crHandPoint;\r\n WebLabel22.Hint := 'Setting Unit';\r\n WebLabel22.Align := alLeft;\r\n WebLabel22.Caption := '105';\r\n WebLabel22.DragMode := dmAutomatic;\r\n WebLabel22.ElementClassName := 'block_title';\r\n WebLabel22.ElementLabelClassName := 'block_title';\r\n WebLabel22.ElementFont := efCSS;\r\n WebLabel22.Font.Charset := ANSI_CHARSET;\r\n WebLabel22.Font.Color := clNavy;\r\n WebLabel22.Font.Height := -19;\r\n WebLabel22.Font.Name := 'Segoe UI Emoji';\r\n WebLabel22.Font.Style := [fsBold];\r\n WebLabel22.HeightPercent := 100.000000000000000000;\r\n WebLabel22.ParentFont := False;\r\n WebLabel22.WidthStyle := ssAuto;\r\n WebLabel22.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel22, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel22, Self, 'OnMouseMove', '_GridBlockTitle_MouseMove');\r\n SetEvent(WebLabel22, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel22, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton15.SetParentComponent(WebPanel26);\r\n WebSpeedButton15.Name := 'WebSpeedButton15';\r\n WebSpeedButton15.Left := 0;\r\n WebSpeedButton15.Top := 0;\r\n WebSpeedButton15.Width := 24;\r\n WebSpeedButton15.Height := 28;\r\n WebSpeedButton15.Cursor := crHandPoint;\r\n WebSpeedButton15.Hint := 'Edit';\r\n WebSpeedButton15.Align := alLeft;\r\n WebSpeedButton15.Color := clNone;\r\n WebSpeedButton15.Flat := True;\r\n WebSpeedButton15.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton15.Font.Color := clBlack;\r\n WebSpeedButton15.Font.Height := -13;\r\n WebSpeedButton15.Font.Name := 'Tahoma';\r\n WebSpeedButton15.Font.Style := [];\r\n WebSpeedButton15.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton15.MaterialGlyph := 'edit';\r\n WebSpeedButton15.ParentFont := False;\r\n WebSpeedButton15.ShowHint := True;\r\n WebSpeedButton15.TabOrder := 0;\r\n WebSpeedButton15.Visible := False;\r\n WebSpeedButton15.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton15, Self, 'OnClick', '_BlockCallPickForm');\r\n G5.SetParentComponent(B105);\r\n G5.Name := 'G5';\r\n G5.AlignWithMargins := True;\r\n G5.Left := 3;\r\n G5.Top := 31;\r\n G5.Width := 86;\r\n G5.Height := 59;\r\n G5.Margins.Bottom := 10;\r\n G5.Align := alClient;\r\n G5.BorderStyle := bsNone;\r\n G5.Columns.Clear;\r\n with G5.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C1';\r\n Title := 'C1';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C2';\r\n Title := 'C2';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C3';\r\n Title := 'C3';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C4';\r\n Title := 'C4';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C5';\r\n Title := 'C5';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C6';\r\n Title := 'C6';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C7';\r\n Title := 'C7';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C8';\r\n Title := 'C8';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C9';\r\n Title := 'C9';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C10';\r\n Title := 'C10';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C11';\r\n Title := 'C11';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C12';\r\n Title := 'C12';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C13';\r\n Title := 'C13';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C15';\r\n Title := 'C15';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C16';\r\n Title := 'C16';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C17';\r\n Title := 'C17';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C18';\r\n Title := 'C18';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C19';\r\n Title := 'C19';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C20';\r\n Title := 'C20';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_NURSE2';\r\n Title := '_CURRENT_NURSE2';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_NURSE1';\r\n Title := '_CURRENT_NURSE1';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_PROVIDER';\r\n Title := '_CURRENT_PROVIDER';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_PROCEDURENUMBER';\r\n Title := '_CURRENT_PROCEDURENUMBER';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_MRN';\r\n Title := '_CURRENT_MRN';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n G5.DefaultRowHeight := 25;\r\n G5.FixedFont.Charset := DEFAULT_CHARSET;\r\n G5.FixedFont.Color := clWindowText;\r\n G5.FixedFont.Height := -11;\r\n G5.FixedFont.Name := 'Tahoma';\r\n G5.FixedFont.Style := [];\r\n G5.FixedCols := 0;\r\n G5.Font.Charset := DEFAULT_CHARSET;\r\n G5.Font.Color := clWindowText;\r\n G5.Font.Height := -13;\r\n G5.Font.Name := 'Tahoma';\r\n G5.Font.Style := [];\r\n G5.Options := [goFixedVertLine,goColSizing,goEditing,goRowSelect];\r\n G5.ParentFont := False;\r\n G5.TabOrder := 1;\r\n G5.HeightPercent := 100.000000000000000000;\r\n G5.SelectionColor := 16769217;\r\n G5.SelectionTextColor := clBlack;\r\n G5.WidthPercent := 100.000000000000000000;\r\n SetEvent(G5, Self, 'OnClick', 'G1Click');\r\n SetEvent(G5, Self, 'OnKeyUp', 'G1KeyUp');\r\n SetEvent(G5, Self, 'OnMouseMove', 'G1MouseMove');\r\n G5.ColWidths[0] := 64;\r\n G5.ColWidths[1] := 64;\r\n G5.ColWidths[2] := 64;\r\n G5.ColWidths[3] := 64;\r\n G5.ColWidths[4] := 64;\r\n G5.ColWidths[5] := 64;\r\n G5.ColWidths[6] := 64;\r\n G5.ColWidths[7] := 64;\r\n G5.ColWidths[8] := 64;\r\n G5.ColWidths[9] := 64;\r\n G5.ColWidths[10] := 64;\r\n G5.ColWidths[11] := 64;\r\n G5.ColWidths[12] := 64;\r\n G5.ColWidths[13] := 64;\r\n G5.ColWidths[14] := 64;\r\n G5.ColWidths[15] := 64;\r\n G5.ColWidths[16] := 64;\r\n G5.ColWidths[17] := 64;\r\n G5.ColWidths[18] := 64;\r\n G5.ColWidths[19] := 64;\r\n G5.ColWidths[20] := 64;\r\n G5.ColWidths[21] := 64;\r\n G5.ColWidths[22] := 64;\r\n G5.ColWidths[23] := 64;\r\n B104.SetParentComponent(SubForm_DIV);\r\n B104.Name := 'B104';\r\n B104.Left := 683;\r\n B104.Top := 117;\r\n B104.Width := 92;\r\n B104.Height := 100;\r\n B104.ElementClassName := 'data_block';\r\n B104.BorderColor := clWhite;\r\n B104.ChildOrder := 54;\r\n B104.Color := clWhite;\r\n B104.ElementFont := efCSS;\r\n B104.Font.Charset := ANSI_CHARSET;\r\n B104.Font.Color := clBlack;\r\n B104.Font.Height := -13;\r\n B104.Font.Name := 'Tahoma';\r\n B104.Font.Style := [fsUnderline];\r\n B104.ParentFont := False;\r\n B104.TabOrder := 34;\r\n SetEvent(B104, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B104, Self, 'OnMouseMove', '_GridBlock_MouseMove');\r\n WebPanel18.SetParentComponent(B104);\r\n WebPanel18.Name := 'WebPanel18';\r\n WebPanel18.Left := 0;\r\n WebPanel18.Top := 0;\r\n WebPanel18.Width := 92;\r\n WebPanel18.Height := 28;\r\n WebPanel18.ElementClassName := 'block_top';\r\n WebPanel18.HeightStyle := ssAuto;\r\n WebPanel18.Align := alTop;\r\n WebPanel18.BorderStyle := bsNone;\r\n WebPanel18.ChildOrder := 2;\r\n WebPanel18.Color := clWhite;\r\n WebPanel18.DragMode := dmAutomatic;\r\n WebPanel18.ElementFont := efCSS;\r\n WebPanel18.TabOrder := 0;\r\n SetEvent(WebPanel18, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel18, Self, 'OnMouseMove', 'WebPanel14MouseMove');\r\n SetEvent(WebPanel18, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel18, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel19.SetParentComponent(WebPanel18);\r\n WebLabel19.Name := 'WebLabel19';\r\n WebLabel19.Left := 24;\r\n WebLabel19.Top := 0;\r\n WebLabel19.Width := 33;\r\n WebLabel19.Height := 26;\r\n WebLabel19.Cursor := crHandPoint;\r\n WebLabel19.Hint := 'Setting Unit';\r\n WebLabel19.Align := alLeft;\r\n WebLabel19.Caption := '104';\r\n WebLabel19.DragMode := dmAutomatic;\r\n WebLabel19.ElementClassName := 'block_title';\r\n WebLabel19.ElementLabelClassName := 'block_title';\r\n WebLabel19.ElementFont := efCSS;\r\n WebLabel19.Font.Charset := ANSI_CHARSET;\r\n WebLabel19.Font.Color := clNavy;\r\n WebLabel19.Font.Height := -19;\r\n WebLabel19.Font.Name := 'Segoe UI Emoji';\r\n WebLabel19.Font.Style := [fsBold];\r\n WebLabel19.HeightPercent := 100.000000000000000000;\r\n WebLabel19.ParentFont := False;\r\n WebLabel19.WidthStyle := ssAuto;\r\n WebLabel19.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel19, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel19, Self, 'OnMouseMove', '_GridBlockTitle_MouseMove');\r\n SetEvent(WebLabel19, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel19, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton14.SetParentComponent(WebPanel18);\r\n WebSpeedButton14.Name := 'WebSpeedButton14';\r\n WebSpeedButton14.Left := 0;\r\n WebSpeedButton14.Top := 0;\r\n WebSpeedButton14.Width := 24;\r\n WebSpeedButton14.Height := 28;\r\n WebSpeedButton14.Cursor := crHandPoint;\r\n WebSpeedButton14.Hint := 'Edit';\r\n WebSpeedButton14.Align := alLeft;\r\n WebSpeedButton14.Color := clNone;\r\n WebSpeedButton14.Flat := True;\r\n WebSpeedButton14.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton14.Font.Color := clBlack;\r\n WebSpeedButton14.Font.Height := -13;\r\n WebSpeedButton14.Font.Name := 'Tahoma';\r\n WebSpeedButton14.Font.Style := [];\r\n WebSpeedButton14.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton14.MaterialGlyph := 'edit';\r\n WebSpeedButton14.ParentFont := False;\r\n WebSpeedButton14.ShowHint := True;\r\n WebSpeedButton14.TabOrder := 0;\r\n WebSpeedButton14.Visible := False;\r\n WebSpeedButton14.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton14, Self, 'OnClick', '_BlockCallPickForm');\r\n G4.SetParentComponent(B104);\r\n G4.Name := 'G4';\r\n G4.AlignWithMargins := True;\r\n G4.Left := 3;\r\n G4.Top := 31;\r\n G4.Width := 86;\r\n G4.Height := 59;\r\n G4.Margins.Bottom := 10;\r\n G4.Align := alClient;\r\n G4.BorderStyle := bsNone;\r\n G4.Columns.Clear;\r\n with G4.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C1';\r\n Title := 'C1';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C2';\r\n Title := 'C2';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C3';\r\n Title := 'C3';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C4';\r\n Title := 'C4';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C5';\r\n Title := 'C5';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C6';\r\n Title := 'C6';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C7';\r\n Title := 'C7';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C8';\r\n Title := 'C8';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C9';\r\n Title := 'C9';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C10';\r\n Title := 'C10';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C11';\r\n Title := 'C11';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C12';\r\n Title := 'C12';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C13';\r\n Title := 'C13';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C15';\r\n Title := 'C15';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C16';\r\n Title := 'C16';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C17';\r\n Title := 'C17';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C18';\r\n Title := 'C18';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C19';\r\n Title := 'C19';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C20';\r\n Title := 'C20';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_NURSE2';\r\n Title := '_CURRENT_NURSE2';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_NURSE1';\r\n Title := '_CURRENT_NURSE1';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_PROVIDER';\r\n Title := '_CURRENT_PROVIDER';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_PROCEDURENUMBER';\r\n Title := '_CURRENT_PROCEDURENUMBER';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_MRN';\r\n Title := '_CURRENT_MRN';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n G4.DefaultRowHeight := 25;\r\n G4.FixedFont.Charset := DEFAULT_CHARSET;\r\n G4.FixedFont.Color := clWindowText;\r\n G4.FixedFont.Height := -11;\r\n G4.FixedFont.Name := 'Tahoma';\r\n G4.FixedFont.Style := [];\r\n G4.FixedCols := 0;\r\n G4.Font.Charset := DEFAULT_CHARSET;\r\n G4.Font.Color := clWindowText;\r\n G4.Font.Height := -13;\r\n G4.Font.Name := 'Tahoma';\r\n G4.Font.Style := [];\r\n G4.Options := [goFixedVertLine,goColSizing,goEditing,goRowSelect];\r\n G4.ParentFont := False;\r\n G4.TabOrder := 1;\r\n G4.HeightPercent := 100.000000000000000000;\r\n G4.SelectionColor := 16769217;\r\n G4.SelectionTextColor := clBlack;\r\n G4.WidthPercent := 100.000000000000000000;\r\n SetEvent(G4, Self, 'OnClick', 'G1Click');\r\n SetEvent(G4, Self, 'OnKeyUp', 'G1KeyUp');\r\n SetEvent(G4, Self, 'OnMouseMove', 'G1MouseMove');\r\n G4.ColWidths[0] := 64;\r\n G4.ColWidths[1] := 64;\r\n G4.ColWidths[2] := 64;\r\n G4.ColWidths[3] := 64;\r\n G4.ColWidths[4] := 64;\r\n G4.ColWidths[5] := 64;\r\n G4.ColWidths[6] := 64;\r\n G4.ColWidths[7] := 64;\r\n G4.ColWidths[8] := 64;\r\n G4.ColWidths[9] := 64;\r\n G4.ColWidths[10] := 64;\r\n G4.ColWidths[11] := 64;\r\n G4.ColWidths[12] := 64;\r\n G4.ColWidths[13] := 64;\r\n G4.ColWidths[14] := 64;\r\n G4.ColWidths[15] := 64;\r\n G4.ColWidths[16] := 64;\r\n G4.ColWidths[17] := 64;\r\n G4.ColWidths[18] := 64;\r\n G4.ColWidths[19] := 64;\r\n G4.ColWidths[20] := 64;\r\n G4.ColWidths[21] := 64;\r\n G4.ColWidths[22] := 64;\r\n G4.ColWidths[23] := 64;\r\n B103.SetParentComponent(SubForm_DIV);\r\n B103.Name := 'B103';\r\n B103.Left := 911;\r\n B103.Top := -7;\r\n B103.Width := 92;\r\n B103.Height := 100;\r\n B103.ElementClassName := 'data_block';\r\n B103.BorderColor := clWhite;\r\n B103.ChildOrder := 53;\r\n B103.Color := clWhite;\r\n B103.ElementFont := efCSS;\r\n B103.Font.Charset := ANSI_CHARSET;\r\n B103.Font.Color := clBlack;\r\n B103.Font.Height := -13;\r\n B103.Font.Name := 'Tahoma';\r\n B103.Font.Style := [fsUnderline];\r\n B103.ParentFont := False;\r\n B103.TabOrder := 35;\r\n SetEvent(B103, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B103, Self, 'OnMouseMove', '_GridBlock_MouseMove');\r\n WebPanel7.SetParentComponent(B103);\r\n WebPanel7.Name := 'WebPanel7';\r\n WebPanel7.Left := 0;\r\n WebPanel7.Top := 0;\r\n WebPanel7.Width := 92;\r\n WebPanel7.Height := 28;\r\n WebPanel7.ElementClassName := 'block_top';\r\n WebPanel7.HeightStyle := ssAuto;\r\n WebPanel7.Align := alTop;\r\n WebPanel7.BorderStyle := bsNone;\r\n WebPanel7.ChildOrder := 2;\r\n WebPanel7.Color := clWhite;\r\n WebPanel7.DragMode := dmAutomatic;\r\n WebPanel7.ElementFont := efCSS;\r\n WebPanel7.TabOrder := 0;\r\n SetEvent(WebPanel7, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel7, Self, 'OnMouseMove', 'WebPanel14MouseMove');\r\n SetEvent(WebPanel7, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel7, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel17.SetParentComponent(WebPanel7);\r\n WebLabel17.Name := 'WebLabel17';\r\n WebLabel17.Left := 24;\r\n WebLabel17.Top := 0;\r\n WebLabel17.Width := 33;\r\n WebLabel17.Height := 26;\r\n WebLabel17.Cursor := crHandPoint;\r\n WebLabel17.Hint := 'Setting Unit';\r\n WebLabel17.Align := alLeft;\r\n WebLabel17.Caption := '103';\r\n WebLabel17.DragMode := dmAutomatic;\r\n WebLabel17.ElementClassName := 'block_title';\r\n WebLabel17.ElementLabelClassName := 'block_title';\r\n WebLabel17.ElementFont := efCSS;\r\n WebLabel17.Font.Charset := ANSI_CHARSET;\r\n WebLabel17.Font.Color := clNavy;\r\n WebLabel17.Font.Height := -19;\r\n WebLabel17.Font.Name := 'Segoe UI Emoji';\r\n WebLabel17.Font.Style := [fsBold];\r\n WebLabel17.HeightPercent := 100.000000000000000000;\r\n WebLabel17.ParentFont := False;\r\n WebLabel17.WidthStyle := ssAuto;\r\n WebLabel17.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel17, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel17, Self, 'OnMouseMove', '_GridBlockTitle_MouseMove');\r\n SetEvent(WebLabel17, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel17, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton13.SetParentComponent(WebPanel7);\r\n WebSpeedButton13.Name := 'WebSpeedButton13';\r\n WebSpeedButton13.Left := 0;\r\n WebSpeedButton13.Top := 0;\r\n WebSpeedButton13.Width := 24;\r\n WebSpeedButton13.Height := 28;\r\n WebSpeedButton13.Cursor := crHandPoint;\r\n WebSpeedButton13.Hint := 'Edit';\r\n WebSpeedButton13.Align := alLeft;\r\n WebSpeedButton13.Color := clNone;\r\n WebSpeedButton13.Flat := True;\r\n WebSpeedButton13.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton13.Font.Color := clBlack;\r\n WebSpeedButton13.Font.Height := -13;\r\n WebSpeedButton13.Font.Name := 'Tahoma';\r\n WebSpeedButton13.Font.Style := [];\r\n WebSpeedButton13.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton13.MaterialGlyph := 'edit';\r\n WebSpeedButton13.ParentFont := False;\r\n WebSpeedButton13.ShowHint := True;\r\n WebSpeedButton13.TabOrder := 0;\r\n WebSpeedButton13.Visible := False;\r\n WebSpeedButton13.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton13, Self, 'OnClick', '_BlockCallPickForm');\r\n G3.SetParentComponent(B103);\r\n G3.Name := 'G3';\r\n G3.AlignWithMargins := True;\r\n G3.Left := 3;\r\n G3.Top := 31;\r\n G3.Width := 86;\r\n G3.Height := 59;\r\n G3.Margins.Bottom := 10;\r\n G3.Align := alClient;\r\n G3.BorderStyle := bsNone;\r\n G3.Columns.Clear;\r\n with G3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C1';\r\n Title := 'C1';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C2';\r\n Title := 'C2';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C3';\r\n Title := 'C3';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C4';\r\n Title := 'C4';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C5';\r\n Title := 'C5';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C6';\r\n Title := 'C6';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C7';\r\n Title := 'C7';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C8';\r\n Title := 'C8';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C9';\r\n Title := 'C9';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C10';\r\n Title := 'C10';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C11';\r\n Title := 'C11';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C12';\r\n Title := 'C12';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C13';\r\n Title := 'C13';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C15';\r\n Title := 'C15';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C16';\r\n Title := 'C16';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C17';\r\n Title := 'C17';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C18';\r\n Title := 'C18';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C19';\r\n Title := 'C19';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C20';\r\n Title := 'C20';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_NURSE2';\r\n Title := '_CURRENT_NURSE2';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_NURSE1';\r\n Title := '_CURRENT_NURSE1';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_PROVIDER';\r\n Title := '_CURRENT_PROVIDER';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_PROCEDURENUMBER';\r\n Title := '_CURRENT_PROCEDURENUMBER';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_MRN';\r\n Title := '_CURRENT_MRN';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n G3.DefaultRowHeight := 25;\r\n G3.FixedFont.Charset := DEFAULT_CHARSET;\r\n G3.FixedFont.Color := clWindowText;\r\n G3.FixedFont.Height := -11;\r\n G3.FixedFont.Name := 'Tahoma';\r\n G3.FixedFont.Style := [];\r\n G3.FixedCols := 0;\r\n G3.Font.Charset := DEFAULT_CHARSET;\r\n G3.Font.Color := clWindowText;\r\n G3.Font.Height := -13;\r\n G3.Font.Name := 'Tahoma';\r\n G3.Font.Style := [];\r\n G3.Options := [goFixedVertLine,goColSizing,goEditing,goRowSelect];\r\n G3.ParentFont := False;\r\n G3.TabOrder := 1;\r\n G3.HeightPercent := 100.000000000000000000;\r\n G3.SelectionColor := 16769217;\r\n G3.SelectionTextColor := clBlack;\r\n G3.WidthPercent := 100.000000000000000000;\r\n SetEvent(G3, Self, 'OnClick', 'G1Click');\r\n SetEvent(G3, Self, 'OnKeyUp', 'G1KeyUp');\r\n SetEvent(G3, Self, 'OnMouseMove', 'G1MouseMove');\r\n G3.ColWidths[0] := 64;\r\n G3.ColWidths[1] := 64;\r\n G3.ColWidths[2] := 64;\r\n G3.ColWidths[3] := 64;\r\n G3.ColWidths[4] := 64;\r\n G3.ColWidths[5] := 64;\r\n G3.ColWidths[6] := 64;\r\n G3.ColWidths[7] := 64;\r\n G3.ColWidths[8] := 64;\r\n G3.ColWidths[9] := 64;\r\n G3.ColWidths[10] := 64;\r\n G3.ColWidths[11] := 64;\r\n G3.ColWidths[12] := 64;\r\n G3.ColWidths[13] := 64;\r\n G3.ColWidths[14] := 64;\r\n G3.ColWidths[15] := 64;\r\n G3.ColWidths[16] := 64;\r\n G3.ColWidths[17] := 64;\r\n G3.ColWidths[18] := 64;\r\n G3.ColWidths[19] := 64;\r\n G3.ColWidths[20] := 64;\r\n G3.ColWidths[21] := 64;\r\n G3.ColWidths[22] := 64;\r\n G3.ColWidths[23] := 64;\r\n B106.SetParentComponent(SubForm_DIV);\r\n B106.Name := 'B106';\r\n B106.Left := 915;\r\n B106.Top := 117;\r\n B106.Width := 92;\r\n B106.Height := 100;\r\n B106.ElementClassName := 'data_block';\r\n B106.BorderColor := clWhite;\r\n B106.ChildOrder := 56;\r\n B106.Color := clWhite;\r\n B106.ElementFont := efCSS;\r\n B106.Font.Charset := ANSI_CHARSET;\r\n B106.Font.Color := clBlack;\r\n B106.Font.Height := -13;\r\n B106.Font.Name := 'Tahoma';\r\n B106.Font.Style := [fsUnderline];\r\n B106.ParentFont := False;\r\n B106.TabOrder := 36;\r\n SetEvent(B106, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B106, Self, 'OnMouseMove', '_GridBlock_MouseMove');\r\n WebPanel20.SetParentComponent(B106);\r\n WebPanel20.Name := 'WebPanel20';\r\n WebPanel20.Left := 0;\r\n WebPanel20.Top := 0;\r\n WebPanel20.Width := 92;\r\n WebPanel20.Height := 28;\r\n WebPanel20.ElementClassName := 'block_top';\r\n WebPanel20.HeightStyle := ssAuto;\r\n WebPanel20.Align := alTop;\r\n WebPanel20.BorderStyle := bsNone;\r\n WebPanel20.ChildOrder := 2;\r\n WebPanel20.Color := clWhite;\r\n WebPanel20.DragMode := dmAutomatic;\r\n WebPanel20.ElementFont := efCSS;\r\n WebPanel20.TabOrder := 0;\r\n SetEvent(WebPanel20, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel20, Self, 'OnMouseMove', 'WebPanel14MouseMove');\r\n SetEvent(WebPanel20, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel20, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel20.SetParentComponent(WebPanel20);\r\n WebLabel20.Name := 'WebLabel20';\r\n WebLabel20.Left := 24;\r\n WebLabel20.Top := 0;\r\n WebLabel20.Width := 33;\r\n WebLabel20.Height := 26;\r\n WebLabel20.Cursor := crHandPoint;\r\n WebLabel20.Hint := 'Setting Unit';\r\n WebLabel20.Align := alLeft;\r\n WebLabel20.Caption := '106';\r\n WebLabel20.DragMode := dmAutomatic;\r\n WebLabel20.ElementClassName := 'block_title';\r\n WebLabel20.ElementLabelClassName := 'block_title';\r\n WebLabel20.ElementFont := efCSS;\r\n WebLabel20.Font.Charset := ANSI_CHARSET;\r\n WebLabel20.Font.Color := clNavy;\r\n WebLabel20.Font.Height := -19;\r\n WebLabel20.Font.Name := 'Segoe UI Emoji';\r\n WebLabel20.Font.Style := [fsBold];\r\n WebLabel20.HeightPercent := 100.000000000000000000;\r\n WebLabel20.ParentFont := False;\r\n WebLabel20.WidthStyle := ssAuto;\r\n WebLabel20.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel20, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel20, Self, 'OnMouseMove', '_GridBlockTitle_MouseMove');\r\n SetEvent(WebLabel20, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel20, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton16.SetParentComponent(WebPanel20);\r\n WebSpeedButton16.Name := 'WebSpeedButton16';\r\n WebSpeedButton16.Left := 0;\r\n WebSpeedButton16.Top := 0;\r\n WebSpeedButton16.Width := 24;\r\n WebSpeedButton16.Height := 28;\r\n WebSpeedButton16.Cursor := crHandPoint;\r\n WebSpeedButton16.Hint := 'Edit';\r\n WebSpeedButton16.Align := alLeft;\r\n WebSpeedButton16.Color := clNone;\r\n WebSpeedButton16.Flat := True;\r\n WebSpeedButton16.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton16.Font.Color := clBlack;\r\n WebSpeedButton16.Font.Height := -13;\r\n WebSpeedButton16.Font.Name := 'Tahoma';\r\n WebSpeedButton16.Font.Style := [];\r\n WebSpeedButton16.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton16.MaterialGlyph := 'edit';\r\n WebSpeedButton16.ParentFont := False;\r\n WebSpeedButton16.ShowHint := True;\r\n WebSpeedButton16.TabOrder := 0;\r\n WebSpeedButton16.Visible := False;\r\n WebSpeedButton16.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton16, Self, 'OnClick', '_BlockCallPickForm');\r\n G6.SetParentComponent(B106);\r\n G6.Name := 'G6';\r\n G6.AlignWithMargins := True;\r\n G6.Left := 3;\r\n G6.Top := 31;\r\n G6.Width := 86;\r\n G6.Height := 59;\r\n G6.Margins.Bottom := 10;\r\n G6.Align := alClient;\r\n G6.BorderStyle := bsNone;\r\n G6.Columns.Clear;\r\n with G6.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C1';\r\n Title := 'C1';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C2';\r\n Title := 'C2';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C3';\r\n Title := 'C3';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C4';\r\n Title := 'C4';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C5';\r\n Title := 'C5';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C6';\r\n Title := 'C6';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C7';\r\n Title := 'C7';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C8';\r\n Title := 'C8';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C9';\r\n Title := 'C9';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C10';\r\n Title := 'C10';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C11';\r\n Title := 'C11';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C12';\r\n Title := 'C12';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C13';\r\n Title := 'C13';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C15';\r\n Title := 'C15';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C16';\r\n Title := 'C16';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C17';\r\n Title := 'C17';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C18';\r\n Title := 'C18';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C19';\r\n Title := 'C19';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C20';\r\n Title := 'C20';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_NURSE2';\r\n Title := '_CURRENT_NURSE2';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_NURSE1';\r\n Title := '_CURRENT_NURSE1';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_PROVIDER';\r\n Title := '_CURRENT_PROVIDER';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_PROCEDURENUMBER';\r\n Title := '_CURRENT_PROCEDURENUMBER';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_MRN';\r\n Title := '_CURRENT_MRN';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n G6.DefaultRowHeight := 25;\r\n G6.FixedFont.Charset := DEFAULT_CHARSET;\r\n G6.FixedFont.Color := clWindowText;\r\n G6.FixedFont.Height := -11;\r\n G6.FixedFont.Name := 'Tahoma';\r\n G6.FixedFont.Style := [];\r\n G6.FixedCols := 0;\r\n G6.Font.Charset := DEFAULT_CHARSET;\r\n G6.Font.Color := clWindowText;\r\n G6.Font.Height := -13;\r\n G6.Font.Name := 'Tahoma';\r\n G6.Font.Style := [];\r\n G6.Options := [goFixedVertLine,goColSizing,goEditing,goRowSelect];\r\n G6.ParentFont := False;\r\n G6.TabOrder := 1;\r\n G6.HeightPercent := 100.000000000000000000;\r\n G6.SelectionColor := 16769217;\r\n G6.SelectionTextColor := clBlack;\r\n G6.WidthPercent := 100.000000000000000000;\r\n SetEvent(G6, Self, 'OnClick', 'G1Click');\r\n SetEvent(G6, Self, 'OnKeyUp', 'G1KeyUp');\r\n SetEvent(G6, Self, 'OnMouseMove', 'G1MouseMove');\r\n G6.ColWidths[0] := 64;\r\n G6.ColWidths[1] := 64;\r\n G6.ColWidths[2] := 64;\r\n G6.ColWidths[3] := 64;\r\n G6.ColWidths[4] := 64;\r\n G6.ColWidths[5] := 64;\r\n G6.ColWidths[6] := 64;\r\n G6.ColWidths[7] := 64;\r\n G6.ColWidths[8] := 64;\r\n G6.ColWidths[9] := 64;\r\n G6.ColWidths[10] := 64;\r\n G6.ColWidths[11] := 64;\r\n G6.ColWidths[12] := 64;\r\n G6.ColWidths[13] := 64;\r\n G6.ColWidths[14] := 64;\r\n G6.ColWidths[15] := 64;\r\n G6.ColWidths[16] := 64;\r\n G6.ColWidths[17] := 64;\r\n G6.ColWidths[18] := 64;\r\n G6.ColWidths[19] := 64;\r\n G6.ColWidths[20] := 64;\r\n G6.ColWidths[21] := 64;\r\n G6.ColWidths[22] := 64;\r\n G6.ColWidths[23] := 64;\r\n B107.SetParentComponent(SubForm_DIV);\r\n B107.Name := 'B107';\r\n B107.Left := 683;\r\n B107.Top := 240;\r\n B107.Width := 92;\r\n B107.Height := 100;\r\n B107.ElementClassName := 'data_block';\r\n B107.BorderColor := clWhite;\r\n B107.ChildOrder := 57;\r\n B107.Color := clWhite;\r\n B107.ElementFont := efCSS;\r\n B107.Font.Charset := ANSI_CHARSET;\r\n B107.Font.Color := clBlack;\r\n B107.Font.Height := -13;\r\n B107.Font.Name := 'Tahoma';\r\n B107.Font.Style := [fsUnderline];\r\n B107.ParentFont := False;\r\n B107.TabOrder := 37;\r\n SetEvent(B107, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B107, Self, 'OnMouseMove', '_GridBlock_MouseMove');\r\n WebPanel27.SetParentComponent(B107);\r\n WebPanel27.Name := 'WebPanel27';\r\n WebPanel27.Left := 0;\r\n WebPanel27.Top := 0;\r\n WebPanel27.Width := 92;\r\n WebPanel27.Height := 28;\r\n WebPanel27.ElementClassName := 'block_top';\r\n WebPanel27.HeightStyle := ssAuto;\r\n WebPanel27.Align := alTop;\r\n WebPanel27.BorderStyle := bsNone;\r\n WebPanel27.ChildOrder := 2;\r\n WebPanel27.Color := clWhite;\r\n WebPanel27.DragMode := dmAutomatic;\r\n WebPanel27.ElementFont := efCSS;\r\n WebPanel27.TabOrder := 0;\r\n SetEvent(WebPanel27, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel27, Self, 'OnMouseMove', 'WebPanel14MouseMove');\r\n SetEvent(WebPanel27, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel27, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel23.SetParentComponent(WebPanel27);\r\n WebLabel23.Name := 'WebLabel23';\r\n WebLabel23.Left := 24;\r\n WebLabel23.Top := 0;\r\n WebLabel23.Width := 33;\r\n WebLabel23.Height := 26;\r\n WebLabel23.Cursor := crHandPoint;\r\n WebLabel23.Hint := 'Setting Unit';\r\n WebLabel23.Align := alLeft;\r\n WebLabel23.Caption := '107';\r\n WebLabel23.DragMode := dmAutomatic;\r\n WebLabel23.ElementClassName := 'block_title';\r\n WebLabel23.ElementLabelClassName := 'block_title';\r\n WebLabel23.ElementFont := efCSS;\r\n WebLabel23.Font.Charset := ANSI_CHARSET;\r\n WebLabel23.Font.Color := clNavy;\r\n WebLabel23.Font.Height := -19;\r\n WebLabel23.Font.Name := 'Segoe UI Emoji';\r\n WebLabel23.Font.Style := [fsBold];\r\n WebLabel23.HeightPercent := 100.000000000000000000;\r\n WebLabel23.ParentFont := False;\r\n WebLabel23.WidthStyle := ssAuto;\r\n WebLabel23.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel23, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel23, Self, 'OnMouseMove', '_GridBlockTitle_MouseMove');\r\n SetEvent(WebLabel23, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel23, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton17.SetParentComponent(WebPanel27);\r\n WebSpeedButton17.Name := 'WebSpeedButton17';\r\n WebSpeedButton17.Left := 0;\r\n WebSpeedButton17.Top := 0;\r\n WebSpeedButton17.Width := 24;\r\n WebSpeedButton17.Height := 28;\r\n WebSpeedButton17.Cursor := crHandPoint;\r\n WebSpeedButton17.Hint := 'Edit';\r\n WebSpeedButton17.Align := alLeft;\r\n WebSpeedButton17.Color := clNone;\r\n WebSpeedButton17.Flat := True;\r\n WebSpeedButton17.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton17.Font.Color := clBlack;\r\n WebSpeedButton17.Font.Height := -13;\r\n WebSpeedButton17.Font.Name := 'Tahoma';\r\n WebSpeedButton17.Font.Style := [];\r\n WebSpeedButton17.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton17.MaterialGlyph := 'edit';\r\n WebSpeedButton17.ParentFont := False;\r\n WebSpeedButton17.ShowHint := True;\r\n WebSpeedButton17.TabOrder := 0;\r\n WebSpeedButton17.Visible := False;\r\n WebSpeedButton17.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton17, Self, 'OnClick', '_BlockCallPickForm');\r\n G7.SetParentComponent(B107);\r\n G7.Name := 'G7';\r\n G7.AlignWithMargins := True;\r\n G7.Left := 3;\r\n G7.Top := 31;\r\n G7.Width := 86;\r\n G7.Height := 59;\r\n G7.Margins.Bottom := 10;\r\n G7.Align := alClient;\r\n G7.BorderStyle := bsNone;\r\n G7.Columns.Clear;\r\n with G7.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C1';\r\n Title := 'C1';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C2';\r\n Title := 'C2';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C3';\r\n Title := 'C3';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C4';\r\n Title := 'C4';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C5';\r\n Title := 'C5';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C6';\r\n Title := 'C6';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C7';\r\n Title := 'C7';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C8';\r\n Title := 'C8';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C9';\r\n Title := 'C9';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C10';\r\n Title := 'C10';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C11';\r\n Title := 'C11';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C12';\r\n Title := 'C12';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C13';\r\n Title := 'C13';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C15';\r\n Title := 'C15';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C16';\r\n Title := 'C16';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C17';\r\n Title := 'C17';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C18';\r\n Title := 'C18';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C19';\r\n Title := 'C19';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C20';\r\n Title := 'C20';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_NURSE2';\r\n Title := '_CURRENT_NURSE2';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_NURSE1';\r\n Title := '_CURRENT_NURSE1';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_PROVIDER';\r\n Title := '_CURRENT_PROVIDER';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_PROCEDURENUMBER';\r\n Title := '_CURRENT_PROCEDURENUMBER';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_MRN';\r\n Title := '_CURRENT_MRN';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n G7.DefaultRowHeight := 25;\r\n G7.FixedFont.Charset := DEFAULT_CHARSET;\r\n G7.FixedFont.Color := clWindowText;\r\n G7.FixedFont.Height := -11;\r\n G7.FixedFont.Name := 'Tahoma';\r\n G7.FixedFont.Style := [];\r\n G7.FixedCols := 0;\r\n G7.Font.Charset := DEFAULT_CHARSET;\r\n G7.Font.Color := clWindowText;\r\n G7.Font.Height := -13;\r\n G7.Font.Name := 'Tahoma';\r\n G7.Font.Style := [];\r\n G7.Options := [goFixedVertLine,goColSizing,goEditing,goRowSelect];\r\n G7.ParentFont := False;\r\n G7.TabOrder := 1;\r\n G7.HeightPercent := 100.000000000000000000;\r\n G7.SelectionColor := 16769217;\r\n G7.SelectionTextColor := clBlack;\r\n G7.WidthPercent := 100.000000000000000000;\r\n SetEvent(G7, Self, 'OnClick', 'G1Click');\r\n SetEvent(G7, Self, 'OnKeyUp', 'G1KeyUp');\r\n SetEvent(G7, Self, 'OnMouseMove', 'G1MouseMove');\r\n G7.ColWidths[0] := 64;\r\n G7.ColWidths[1] := 64;\r\n G7.ColWidths[2] := 64;\r\n G7.ColWidths[3] := 64;\r\n G7.ColWidths[4] := 64;\r\n G7.ColWidths[5] := 64;\r\n G7.ColWidths[6] := 64;\r\n G7.ColWidths[7] := 64;\r\n G7.ColWidths[8] := 64;\r\n G7.ColWidths[9] := 64;\r\n G7.ColWidths[10] := 64;\r\n G7.ColWidths[11] := 64;\r\n G7.ColWidths[12] := 64;\r\n G7.ColWidths[13] := 64;\r\n G7.ColWidths[14] := 64;\r\n G7.ColWidths[15] := 64;\r\n G7.ColWidths[16] := 64;\r\n G7.ColWidths[17] := 64;\r\n G7.ColWidths[18] := 64;\r\n G7.ColWidths[19] := 64;\r\n G7.ColWidths[20] := 64;\r\n G7.ColWidths[21] := 64;\r\n G7.ColWidths[22] := 64;\r\n G7.ColWidths[23] := 64;\r\n B108.SetParentComponent(SubForm_DIV);\r\n B108.Name := 'B108';\r\n B108.Left := 801;\r\n B108.Top := 240;\r\n B108.Width := 92;\r\n B108.Height := 100;\r\n B108.ElementClassName := 'data_block';\r\n B108.BorderColor := clWhite;\r\n B108.ChildOrder := 58;\r\n B108.Color := clWhite;\r\n B108.ElementFont := efCSS;\r\n B108.Font.Charset := ANSI_CHARSET;\r\n B108.Font.Color := clBlack;\r\n B108.Font.Height := -13;\r\n B108.Font.Name := 'Tahoma';\r\n B108.Font.Style := [fsUnderline];\r\n B108.ParentFont := False;\r\n B108.TabOrder := 38;\r\n SetEvent(B108, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B108, Self, 'OnMouseMove', '_GridBlock_MouseMove');\r\n WebPanel29.SetParentComponent(B108);\r\n WebPanel29.Name := 'WebPanel29';\r\n WebPanel29.Left := 0;\r\n WebPanel29.Top := 0;\r\n WebPanel29.Width := 92;\r\n WebPanel29.Height := 28;\r\n WebPanel29.ElementClassName := 'block_top';\r\n WebPanel29.HeightStyle := ssAuto;\r\n WebPanel29.Align := alTop;\r\n WebPanel29.BorderStyle := bsNone;\r\n WebPanel29.ChildOrder := 2;\r\n WebPanel29.Color := clWhite;\r\n WebPanel29.DragMode := dmAutomatic;\r\n WebPanel29.ElementFont := efCSS;\r\n WebPanel29.TabOrder := 0;\r\n SetEvent(WebPanel29, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel29, Self, 'OnMouseMove', 'WebPanel14MouseMove');\r\n SetEvent(WebPanel29, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel29, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel24.SetParentComponent(WebPanel29);\r\n WebLabel24.Name := 'WebLabel24';\r\n WebLabel24.Left := 24;\r\n WebLabel24.Top := 0;\r\n WebLabel24.Width := 33;\r\n WebLabel24.Height := 26;\r\n WebLabel24.Cursor := crHandPoint;\r\n WebLabel24.Hint := 'Setting Unit';\r\n WebLabel24.Align := alLeft;\r\n WebLabel24.Caption := '108';\r\n WebLabel24.DragMode := dmAutomatic;\r\n WebLabel24.ElementClassName := 'block_title';\r\n WebLabel24.ElementLabelClassName := 'block_title';\r\n WebLabel24.ElementFont := efCSS;\r\n WebLabel24.Font.Charset := ANSI_CHARSET;\r\n WebLabel24.Font.Color := clNavy;\r\n WebLabel24.Font.Height := -19;\r\n WebLabel24.Font.Name := 'Segoe UI Emoji';\r\n WebLabel24.Font.Style := [fsBold];\r\n WebLabel24.HeightPercent := 100.000000000000000000;\r\n WebLabel24.ParentFont := False;\r\n WebLabel24.WidthStyle := ssAuto;\r\n WebLabel24.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel24, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel24, Self, 'OnMouseMove', '_GridBlockTitle_MouseMove');\r\n SetEvent(WebLabel24, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel24, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton18.SetParentComponent(WebPanel29);\r\n WebSpeedButton18.Name := 'WebSpeedButton18';\r\n WebSpeedButton18.Left := 0;\r\n WebSpeedButton18.Top := 0;\r\n WebSpeedButton18.Width := 24;\r\n WebSpeedButton18.Height := 28;\r\n WebSpeedButton18.Cursor := crHandPoint;\r\n WebSpeedButton18.Hint := 'Edit';\r\n WebSpeedButton18.Align := alLeft;\r\n WebSpeedButton18.Color := clNone;\r\n WebSpeedButton18.Flat := True;\r\n WebSpeedButton18.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton18.Font.Color := clBlack;\r\n WebSpeedButton18.Font.Height := -13;\r\n WebSpeedButton18.Font.Name := 'Tahoma';\r\n WebSpeedButton18.Font.Style := [];\r\n WebSpeedButton18.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton18.MaterialGlyph := 'edit';\r\n WebSpeedButton18.ParentFont := False;\r\n WebSpeedButton18.ShowHint := True;\r\n WebSpeedButton18.TabOrder := 0;\r\n WebSpeedButton18.Visible := False;\r\n WebSpeedButton18.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton18, Self, 'OnClick', '_BlockCallPickForm');\r\n G8.SetParentComponent(B108);\r\n G8.Name := 'G8';\r\n G8.AlignWithMargins := True;\r\n G8.Left := 3;\r\n G8.Top := 31;\r\n G8.Width := 86;\r\n G8.Height := 59;\r\n G8.Margins.Bottom := 10;\r\n G8.Align := alClient;\r\n G8.BorderStyle := bsNone;\r\n G8.Columns.Clear;\r\n with G8.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C1';\r\n Title := 'C1';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C2';\r\n Title := 'C2';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C3';\r\n Title := 'C3';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C4';\r\n Title := 'C4';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C5';\r\n Title := 'C5';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C6';\r\n Title := 'C6';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C7';\r\n Title := 'C7';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C8';\r\n Title := 'C8';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C9';\r\n Title := 'C9';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C10';\r\n Title := 'C10';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C11';\r\n Title := 'C11';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C12';\r\n Title := 'C12';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C13';\r\n Title := 'C13';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C15';\r\n Title := 'C15';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C16';\r\n Title := 'C16';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C17';\r\n Title := 'C17';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C18';\r\n Title := 'C18';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C19';\r\n Title := 'C19';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C20';\r\n Title := 'C20';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_NURSE2';\r\n Title := '_CURRENT_NURSE2';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_NURSE1';\r\n Title := '_CURRENT_NURSE1';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_PROVIDER';\r\n Title := '_CURRENT_PROVIDER';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_PROCEDURENUMBER';\r\n Title := '_CURRENT_PROCEDURENUMBER';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_MRN';\r\n Title := '_CURRENT_MRN';\r\n TitleElementClassName := 'gridcolumntitle2';\r\n end;\r\n G8.DefaultRowHeight := 25;\r\n G8.FixedFont.Charset := DEFAULT_CHARSET;\r\n G8.FixedFont.Color := clWindowText;\r\n G8.FixedFont.Height := -11;\r\n G8.FixedFont.Name := 'Tahoma';\r\n G8.FixedFont.Style := [];\r\n G8.FixedCols := 0;\r\n G8.Font.Charset := DEFAULT_CHARSET;\r\n G8.Font.Color := clWindowText;\r\n G8.Font.Height := -13;\r\n G8.Font.Name := 'Tahoma';\r\n G8.Font.Style := [];\r\n G8.Options := [goFixedVertLine,goColSizing,goEditing,goRowSelect];\r\n G8.ParentFont := False;\r\n G8.TabOrder := 1;\r\n G8.HeightPercent := 100.000000000000000000;\r\n G8.SelectionColor := 16769217;\r\n G8.SelectionTextColor := clBlack;\r\n G8.WidthPercent := 100.000000000000000000;\r\n SetEvent(G8, Self, 'OnClick', 'G1Click');\r\n SetEvent(G8, Self, 'OnKeyUp', 'G1KeyUp');\r\n SetEvent(G8, Self, 'OnMouseMove', 'G1MouseMove');\r\n G8.ColWidths[0] := 64;\r\n G8.ColWidths[1] := 64;\r\n G8.ColWidths[2] := 64;\r\n G8.ColWidths[3] := 64;\r\n G8.ColWidths[4] := 64;\r\n G8.ColWidths[5] := 64;\r\n G8.ColWidths[6] := 64;\r\n G8.ColWidths[7] := 64;\r\n G8.ColWidths[8] := 64;\r\n G8.ColWidths[9] := 64;\r\n G8.ColWidths[10] := 64;\r\n G8.ColWidths[11] := 64;\r\n G8.ColWidths[12] := 64;\r\n G8.ColWidths[13] := 64;\r\n G8.ColWidths[14] := 64;\r\n G8.ColWidths[15] := 64;\r\n G8.ColWidths[16] := 64;\r\n G8.ColWidths[17] := 64;\r\n G8.ColWidths[18] := 64;\r\n G8.ColWidths[19] := 64;\r\n G8.ColWidths[20] := 64;\r\n G8.ColWidths[21] := 64;\r\n G8.ColWidths[22] := 64;\r\n G8.ColWidths[23] := 64;\r\n wmWaitMessage.SetParentComponent(SubForm_DIV);\r\n wmWaitMessage.Name := 'wmWaitMessage';\r\n wmWaitMessage.Left := 6;\r\n wmWaitMessage.Top := 57;\r\n wmWaitMessage.Width := 24;\r\n wmWaitMessage.Height := 24;\r\n wmWaitMessage.Opacity := 0.100000000000000000;\r\n wmWaitMessage.Picture.LoadFromFile('EditForm_Base.SubForm_DIV.wmWaitMessage.Picture.gif');\r\n viewpdf.SetParentComponent(SubForm_DIV);\r\n viewpdf.Name := 'viewpdf';\r\n viewpdf.Left := 686;\r\n viewpdf.Top := 367;\r\n viewpdf.Width := 287;\r\n viewpdf.Height := 218;\r\n viewpdf.BorderStyle := bsNone;\r\n viewpdf.ChildOrder := 18;\r\n viewpdf.Sandbox := [];\r\n viewpdf.Visible := False;\r\n B31.SetParentComponent(SubForm_DIV);\r\n B31.Name := 'B31';\r\n B31.Left := 58;\r\n B31.Top := 480;\r\n B31.Width := 100;\r\n B31.Height := 80;\r\n B31.ElementClassName := 'data_block';\r\n B31.BorderColor := clWhite;\r\n B31.ChildOrder := 31;\r\n B31.Color := clWhite;\r\n B31.ElementFont := efCSS;\r\n B31.Font.Charset := ANSI_CHARSET;\r\n B31.Font.Color := clBlack;\r\n B31.Font.Height := -13;\r\n B31.Font.Name := 'Tahoma';\r\n B31.Font.Style := [];\r\n B31.ParentFont := False;\r\n B31.TabOrder := 41;\r\n SetEvent(B31, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B31, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel5.SetParentComponent(B31);\r\n WebPanel5.Name := 'WebPanel5';\r\n WebPanel5.Left := 0;\r\n WebPanel5.Top := 0;\r\n WebPanel5.Width := 100;\r\n WebPanel5.Height := 28;\r\n WebPanel5.ElementClassName := 'block_top';\r\n WebPanel5.HeightStyle := ssAuto;\r\n WebPanel5.Align := alTop;\r\n WebPanel5.BorderStyle := bsNone;\r\n WebPanel5.ChildOrder := 2;\r\n WebPanel5.Color := clWhite;\r\n WebPanel5.DragMode := dmAutomatic;\r\n WebPanel5.ElementFont := efCSS;\r\n WebPanel5.TabOrder := 0;\r\n SetEvent(WebPanel5, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel5, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel5, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel5, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel16.SetParentComponent(WebPanel5);\r\n WebLabel16.Name := 'WebLabel16';\r\n WebLabel16.Left := 24;\r\n WebLabel16.Top := 0;\r\n WebLabel16.Width := 22;\r\n WebLabel16.Height := 26;\r\n WebLabel16.Cursor := crHandPoint;\r\n WebLabel16.Hint := 'Setting Unit';\r\n WebLabel16.Align := alLeft;\r\n WebLabel16.Caption := '31';\r\n WebLabel16.DragMode := dmAutomatic;\r\n WebLabel16.ElementClassName := 'block_title';\r\n WebLabel16.ElementLabelClassName := 'block_title';\r\n WebLabel16.ElementFont := efCSS;\r\n WebLabel16.Font.Charset := ANSI_CHARSET;\r\n WebLabel16.Font.Color := clNavy;\r\n WebLabel16.Font.Height := -19;\r\n WebLabel16.Font.Name := 'Segoe UI Emoji';\r\n WebLabel16.Font.Style := [fsBold];\r\n WebLabel16.HeightPercent := 100.000000000000000000;\r\n WebLabel16.ParentFont := False;\r\n WebLabel16.WidthStyle := ssAuto;\r\n WebLabel16.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel16, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel16, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel16, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel16, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton27.SetParentComponent(WebPanel5);\r\n WebSpeedButton27.Name := 'WebSpeedButton27';\r\n WebSpeedButton27.Left := 0;\r\n WebSpeedButton27.Top := 0;\r\n WebSpeedButton27.Width := 24;\r\n WebSpeedButton27.Height := 28;\r\n WebSpeedButton27.Cursor := crHandPoint;\r\n WebSpeedButton27.Hint := 'Edit';\r\n WebSpeedButton27.Align := alLeft;\r\n WebSpeedButton27.Color := clNone;\r\n WebSpeedButton27.Flat := True;\r\n WebSpeedButton27.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton27.Font.Color := clBlack;\r\n WebSpeedButton27.Font.Height := -13;\r\n WebSpeedButton27.Font.Name := 'Tahoma';\r\n WebSpeedButton27.Font.Style := [];\r\n WebSpeedButton27.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton27.MaterialGlyph := 'edit';\r\n WebSpeedButton27.ParentFont := False;\r\n WebSpeedButton27.ShowHint := True;\r\n WebSpeedButton27.TabOrder := 0;\r\n WebSpeedButton27.Visible := False;\r\n WebSpeedButton27.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton27, Self, 'OnClick', '_BlockCallPickForm');\r\n M31.SetParentComponent(B31);\r\n M31.Name := 'M31';\r\n M31.Left := 0;\r\n M31.Top := 56;\r\n M31.Width := 100;\r\n M31.Height := 24;\r\n M31.Align := alBottom;\r\n M31.BorderStyle := bsNone;\r\n M31.ElementClassName := 'block_memo';\r\n M31.ElementFont := efCSS;\r\n M31.Font.Charset := ANSI_CHARSET;\r\n M31.Font.Color := clBlack;\r\n M31.Font.Height := -13;\r\n M31.Font.Name := 'Tahoma';\r\n M31.Font.Style := [];\r\n M31.HeightPercent := 100.000000000000000000;\r\n M31.ParentFont := False;\r\n M31.SelLength := 0;\r\n M31.SelStart := 0;\r\n M31.ShowFocus := False;\r\n M31.WidthPercent := 100.000000000000000000;\r\n SetEvent(M31, Self, 'OnChange', 'M21Change');\r\n SetEvent(M31, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M31, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M31, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M31, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M31, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M31, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer38.SetParentComponent(B31);\r\n WebHTMLContainer38.Name := 'WebHTMLContainer38';\r\n WebHTMLContainer38.Left := 0;\r\n WebHTMLContainer38.Top := 41;\r\n WebHTMLContainer38.Width := 100;\r\n WebHTMLContainer38.Height := 15;\r\n WebHTMLContainer38.HeightStyle := ssAuto;\r\n WebHTMLContainer38.Align := alBottom;\r\n WebHTMLContainer38.ChildOrder := 2;\r\n WebHTMLContainer38.Visible := False;\r\n SetEvent(WebHTMLContainer38, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer38, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer38, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B32.SetParentComponent(SubForm_DIV);\r\n B32.Name := 'B32';\r\n B32.Left := 171;\r\n B32.Top := 480;\r\n B32.Width := 100;\r\n B32.Height := 80;\r\n B32.ElementClassName := 'data_block';\r\n B32.BorderColor := clWhite;\r\n B32.ChildOrder := 32;\r\n B32.Color := clWhite;\r\n B32.ElementFont := efCSS;\r\n B32.Font.Charset := ANSI_CHARSET;\r\n B32.Font.Color := clBlack;\r\n B32.Font.Height := -13;\r\n B32.Font.Name := 'Tahoma';\r\n B32.Font.Style := [];\r\n B32.ParentFont := False;\r\n B32.TabOrder := 42;\r\n SetEvent(B32, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B32, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel16.SetParentComponent(B32);\r\n WebPanel16.Name := 'WebPanel16';\r\n WebPanel16.Left := 0;\r\n WebPanel16.Top := 0;\r\n WebPanel16.Width := 100;\r\n WebPanel16.Height := 28;\r\n WebPanel16.ElementClassName := 'block_top';\r\n WebPanel16.HeightStyle := ssAuto;\r\n WebPanel16.Align := alTop;\r\n WebPanel16.BorderStyle := bsNone;\r\n WebPanel16.ChildOrder := 2;\r\n WebPanel16.Color := clWhite;\r\n WebPanel16.DragMode := dmAutomatic;\r\n WebPanel16.ElementFont := efCSS;\r\n WebPanel16.TabOrder := 0;\r\n SetEvent(WebPanel16, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel16, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel16, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel16, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel25.SetParentComponent(WebPanel16);\r\n WebLabel25.Name := 'WebLabel25';\r\n WebLabel25.Left := 24;\r\n WebLabel25.Top := 0;\r\n WebLabel25.Width := 22;\r\n WebLabel25.Height := 26;\r\n WebLabel25.Cursor := crHandPoint;\r\n WebLabel25.Hint := 'Setting Unit';\r\n WebLabel25.Align := alLeft;\r\n WebLabel25.Caption := '32';\r\n WebLabel25.DragMode := dmAutomatic;\r\n WebLabel25.ElementClassName := 'block_title';\r\n WebLabel25.ElementLabelClassName := 'block_title';\r\n WebLabel25.ElementFont := efCSS;\r\n WebLabel25.Font.Charset := ANSI_CHARSET;\r\n WebLabel25.Font.Color := clNavy;\r\n WebLabel25.Font.Height := -19;\r\n WebLabel25.Font.Name := 'Segoe UI Emoji';\r\n WebLabel25.Font.Style := [fsBold];\r\n WebLabel25.HeightPercent := 100.000000000000000000;\r\n WebLabel25.ParentFont := False;\r\n WebLabel25.WidthStyle := ssAuto;\r\n WebLabel25.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel25, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel25, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel25, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel25, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton28.SetParentComponent(WebPanel16);\r\n WebSpeedButton28.Name := 'WebSpeedButton28';\r\n WebSpeedButton28.Left := 0;\r\n WebSpeedButton28.Top := 0;\r\n WebSpeedButton28.Width := 24;\r\n WebSpeedButton28.Height := 28;\r\n WebSpeedButton28.Cursor := crHandPoint;\r\n WebSpeedButton28.Hint := 'Edit';\r\n WebSpeedButton28.Align := alLeft;\r\n WebSpeedButton28.Color := clNone;\r\n WebSpeedButton28.Flat := True;\r\n WebSpeedButton28.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton28.Font.Color := clBlack;\r\n WebSpeedButton28.Font.Height := -13;\r\n WebSpeedButton28.Font.Name := 'Tahoma';\r\n WebSpeedButton28.Font.Style := [];\r\n WebSpeedButton28.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton28.MaterialGlyph := 'edit';\r\n WebSpeedButton28.ParentFont := False;\r\n WebSpeedButton28.ShowHint := True;\r\n WebSpeedButton28.TabOrder := 0;\r\n WebSpeedButton28.Visible := False;\r\n WebSpeedButton28.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton28, Self, 'OnClick', '_BlockCallPickForm');\r\n M32.SetParentComponent(B32);\r\n M32.Name := 'M32';\r\n M32.Left := 0;\r\n M32.Top := 56;\r\n M32.Width := 100;\r\n M32.Height := 24;\r\n M32.Align := alBottom;\r\n M32.BorderStyle := bsNone;\r\n M32.ElementClassName := 'block_memo';\r\n M32.ElementFont := efCSS;\r\n M32.Font.Charset := ANSI_CHARSET;\r\n M32.Font.Color := clBlack;\r\n M32.Font.Height := -13;\r\n M32.Font.Name := 'Tahoma';\r\n M32.Font.Style := [];\r\n M32.HeightPercent := 100.000000000000000000;\r\n M32.ParentFont := False;\r\n M32.SelLength := 0;\r\n M32.SelStart := 0;\r\n M32.ShowFocus := False;\r\n M32.WidthPercent := 100.000000000000000000;\r\n SetEvent(M32, Self, 'OnChange', 'M21Change');\r\n SetEvent(M32, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M32, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M32, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M32, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M32, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M32, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer39.SetParentComponent(B32);\r\n WebHTMLContainer39.Name := 'WebHTMLContainer39';\r\n WebHTMLContainer39.Left := 0;\r\n WebHTMLContainer39.Top := 41;\r\n WebHTMLContainer39.Width := 100;\r\n WebHTMLContainer39.Height := 15;\r\n WebHTMLContainer39.HeightStyle := ssAuto;\r\n WebHTMLContainer39.Align := alBottom;\r\n WebHTMLContainer39.ChildOrder := 2;\r\n WebHTMLContainer39.Visible := False;\r\n SetEvent(WebHTMLContainer39, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer39, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer39, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B33.SetParentComponent(SubForm_DIV);\r\n B33.Name := 'B33';\r\n B33.Left := 299;\r\n B33.Top := 480;\r\n B33.Width := 100;\r\n B33.Height := 80;\r\n B33.ElementClassName := 'data_block';\r\n B33.BorderColor := clWhite;\r\n B33.ChildOrder := 33;\r\n B33.Color := clWhite;\r\n B33.ElementFont := efCSS;\r\n B33.Font.Charset := ANSI_CHARSET;\r\n B33.Font.Color := clBlack;\r\n B33.Font.Height := -13;\r\n B33.Font.Name := 'Tahoma';\r\n B33.Font.Style := [];\r\n B33.ParentFont := False;\r\n B33.TabOrder := 43;\r\n SetEvent(B33, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B33, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel28.SetParentComponent(B33);\r\n WebPanel28.Name := 'WebPanel28';\r\n WebPanel28.Left := 0;\r\n WebPanel28.Top := 0;\r\n WebPanel28.Width := 100;\r\n WebPanel28.Height := 28;\r\n WebPanel28.ElementClassName := 'block_top';\r\n WebPanel28.HeightStyle := ssAuto;\r\n WebPanel28.Align := alTop;\r\n WebPanel28.BorderStyle := bsNone;\r\n WebPanel28.ChildOrder := 2;\r\n WebPanel28.Color := clWhite;\r\n WebPanel28.DragMode := dmAutomatic;\r\n WebPanel28.ElementFont := efCSS;\r\n WebPanel28.TabOrder := 0;\r\n SetEvent(WebPanel28, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel28, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel28, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel28, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel33.SetParentComponent(WebPanel28);\r\n WebLabel33.Name := 'WebLabel33';\r\n WebLabel33.Left := 24;\r\n WebLabel33.Top := 0;\r\n WebLabel33.Width := 22;\r\n WebLabel33.Height := 26;\r\n WebLabel33.Cursor := crHandPoint;\r\n WebLabel33.Hint := 'Setting Unit';\r\n WebLabel33.Align := alLeft;\r\n WebLabel33.Caption := '33';\r\n WebLabel33.DragMode := dmAutomatic;\r\n WebLabel33.ElementClassName := 'block_title';\r\n WebLabel33.ElementLabelClassName := 'block_title';\r\n WebLabel33.ElementFont := efCSS;\r\n WebLabel33.Font.Charset := ANSI_CHARSET;\r\n WebLabel33.Font.Color := clNavy;\r\n WebLabel33.Font.Height := -19;\r\n WebLabel33.Font.Name := 'Segoe UI Emoji';\r\n WebLabel33.Font.Style := [fsBold];\r\n WebLabel33.HeightPercent := 100.000000000000000000;\r\n WebLabel33.ParentFont := False;\r\n WebLabel33.WidthStyle := ssAuto;\r\n WebLabel33.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel33, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel33, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel33, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel33, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton29.SetParentComponent(WebPanel28);\r\n WebSpeedButton29.Name := 'WebSpeedButton29';\r\n WebSpeedButton29.Left := 0;\r\n WebSpeedButton29.Top := 0;\r\n WebSpeedButton29.Width := 24;\r\n WebSpeedButton29.Height := 28;\r\n WebSpeedButton29.Cursor := crHandPoint;\r\n WebSpeedButton29.Hint := 'Edit';\r\n WebSpeedButton29.Align := alLeft;\r\n WebSpeedButton29.Color := clNone;\r\n WebSpeedButton29.Flat := True;\r\n WebSpeedButton29.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton29.Font.Color := clBlack;\r\n WebSpeedButton29.Font.Height := -13;\r\n WebSpeedButton29.Font.Name := 'Tahoma';\r\n WebSpeedButton29.Font.Style := [];\r\n WebSpeedButton29.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton29.MaterialGlyph := 'edit';\r\n WebSpeedButton29.ParentFont := False;\r\n WebSpeedButton29.ShowHint := True;\r\n WebSpeedButton29.TabOrder := 0;\r\n WebSpeedButton29.Visible := False;\r\n WebSpeedButton29.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton29, Self, 'OnClick', '_BlockCallPickForm');\r\n M33.SetParentComponent(B33);\r\n M33.Name := 'M33';\r\n M33.Left := 0;\r\n M33.Top := 56;\r\n M33.Width := 100;\r\n M33.Height := 24;\r\n M33.Align := alBottom;\r\n M33.BorderStyle := bsNone;\r\n M33.ElementClassName := 'block_memo';\r\n M33.ElementFont := efCSS;\r\n M33.Font.Charset := ANSI_CHARSET;\r\n M33.Font.Color := clBlack;\r\n M33.Font.Height := -13;\r\n M33.Font.Name := 'Tahoma';\r\n M33.Font.Style := [];\r\n M33.HeightPercent := 100.000000000000000000;\r\n M33.ParentFont := False;\r\n M33.SelLength := 0;\r\n M33.SelStart := 0;\r\n M33.ShowFocus := False;\r\n M33.WidthPercent := 100.000000000000000000;\r\n SetEvent(M33, Self, 'OnChange', 'M21Change');\r\n SetEvent(M33, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M33, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M33, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M33, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M33, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M33, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer40.SetParentComponent(B33);\r\n WebHTMLContainer40.Name := 'WebHTMLContainer40';\r\n WebHTMLContainer40.Left := 0;\r\n WebHTMLContainer40.Top := 41;\r\n WebHTMLContainer40.Width := 100;\r\n WebHTMLContainer40.Height := 15;\r\n WebHTMLContainer40.HeightStyle := ssAuto;\r\n WebHTMLContainer40.Align := alBottom;\r\n WebHTMLContainer40.ChildOrder := 2;\r\n WebHTMLContainer40.Visible := False;\r\n SetEvent(WebHTMLContainer40, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer40, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer40, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B34.SetParentComponent(SubForm_DIV);\r\n B34.Name := 'B34';\r\n B34.Left := 420;\r\n B34.Top := 480;\r\n B34.Width := 100;\r\n B34.Height := 80;\r\n B34.ElementClassName := 'data_block';\r\n B34.BorderColor := clWhite;\r\n B34.ChildOrder := 34;\r\n B34.Color := clWhite;\r\n B34.ElementFont := efCSS;\r\n B34.Font.Charset := ANSI_CHARSET;\r\n B34.Font.Color := clBlack;\r\n B34.Font.Height := -13;\r\n B34.Font.Name := 'Tahoma';\r\n B34.Font.Style := [];\r\n B34.ParentFont := False;\r\n B34.TabOrder := 44;\r\n SetEvent(B34, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B34, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel33.SetParentComponent(B34);\r\n WebPanel33.Name := 'WebPanel33';\r\n WebPanel33.Left := 0;\r\n WebPanel33.Top := 0;\r\n WebPanel33.Width := 100;\r\n WebPanel33.Height := 28;\r\n WebPanel33.ElementClassName := 'block_top';\r\n WebPanel33.HeightStyle := ssAuto;\r\n WebPanel33.Align := alTop;\r\n WebPanel33.BorderStyle := bsNone;\r\n WebPanel33.ChildOrder := 2;\r\n WebPanel33.Color := clWhite;\r\n WebPanel33.DragMode := dmAutomatic;\r\n WebPanel33.ElementFont := efCSS;\r\n WebPanel33.TabOrder := 0;\r\n SetEvent(WebPanel33, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel33, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel33, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel33, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel34.SetParentComponent(WebPanel33);\r\n WebLabel34.Name := 'WebLabel34';\r\n WebLabel34.Left := 24;\r\n WebLabel34.Top := 0;\r\n WebLabel34.Width := 22;\r\n WebLabel34.Height := 26;\r\n WebLabel34.Cursor := crHandPoint;\r\n WebLabel34.Hint := 'Setting Unit';\r\n WebLabel34.Align := alLeft;\r\n WebLabel34.Caption := '34';\r\n WebLabel34.DragMode := dmAutomatic;\r\n WebLabel34.ElementClassName := 'block_title';\r\n WebLabel34.ElementLabelClassName := 'block_title';\r\n WebLabel34.ElementFont := efCSS;\r\n WebLabel34.Font.Charset := ANSI_CHARSET;\r\n WebLabel34.Font.Color := clNavy;\r\n WebLabel34.Font.Height := -19;\r\n WebLabel34.Font.Name := 'Segoe UI Emoji';\r\n WebLabel34.Font.Style := [fsBold];\r\n WebLabel34.HeightPercent := 100.000000000000000000;\r\n WebLabel34.ParentFont := False;\r\n WebLabel34.WidthStyle := ssAuto;\r\n WebLabel34.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel34, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel34, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel34, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel34, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton30.SetParentComponent(WebPanel33);\r\n WebSpeedButton30.Name := 'WebSpeedButton30';\r\n WebSpeedButton30.Left := 0;\r\n WebSpeedButton30.Top := 0;\r\n WebSpeedButton30.Width := 24;\r\n WebSpeedButton30.Height := 28;\r\n WebSpeedButton30.Cursor := crHandPoint;\r\n WebSpeedButton30.Hint := 'Edit';\r\n WebSpeedButton30.Align := alLeft;\r\n WebSpeedButton30.Color := clNone;\r\n WebSpeedButton30.Flat := True;\r\n WebSpeedButton30.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton30.Font.Color := clBlack;\r\n WebSpeedButton30.Font.Height := -13;\r\n WebSpeedButton30.Font.Name := 'Tahoma';\r\n WebSpeedButton30.Font.Style := [];\r\n WebSpeedButton30.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton30.MaterialGlyph := 'edit';\r\n WebSpeedButton30.ParentFont := False;\r\n WebSpeedButton30.ShowHint := True;\r\n WebSpeedButton30.TabOrder := 0;\r\n WebSpeedButton30.Visible := False;\r\n WebSpeedButton30.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton30, Self, 'OnClick', '_BlockCallPickForm');\r\n M34.SetParentComponent(B34);\r\n M34.Name := 'M34';\r\n M34.Left := 0;\r\n M34.Top := 56;\r\n M34.Width := 100;\r\n M34.Height := 24;\r\n M34.Align := alBottom;\r\n M34.BorderStyle := bsNone;\r\n M34.ElementClassName := 'block_memo';\r\n M34.ElementFont := efCSS;\r\n M34.Font.Charset := ANSI_CHARSET;\r\n M34.Font.Color := clBlack;\r\n M34.Font.Height := -13;\r\n M34.Font.Name := 'Tahoma';\r\n M34.Font.Style := [];\r\n M34.HeightPercent := 100.000000000000000000;\r\n M34.ParentFont := False;\r\n M34.SelLength := 0;\r\n M34.SelStart := 0;\r\n M34.ShowFocus := False;\r\n M34.WidthPercent := 100.000000000000000000;\r\n SetEvent(M34, Self, 'OnChange', 'M21Change');\r\n SetEvent(M34, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M34, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M34, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M34, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M34, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M34, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer41.SetParentComponent(B34);\r\n WebHTMLContainer41.Name := 'WebHTMLContainer41';\r\n WebHTMLContainer41.Left := 0;\r\n WebHTMLContainer41.Top := 41;\r\n WebHTMLContainer41.Width := 100;\r\n WebHTMLContainer41.Height := 15;\r\n WebHTMLContainer41.HeightStyle := ssAuto;\r\n WebHTMLContainer41.Align := alBottom;\r\n WebHTMLContainer41.ChildOrder := 2;\r\n WebHTMLContainer41.Visible := False;\r\n SetEvent(WebHTMLContainer41, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer41, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer41, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B35.SetParentComponent(SubForm_DIV);\r\n B35.Name := 'B35';\r\n B35.Left := 541;\r\n B35.Top := 480;\r\n B35.Width := 100;\r\n B35.Height := 80;\r\n B35.ElementClassName := 'data_block';\r\n B35.BorderColor := clWhite;\r\n B35.ChildOrder := 35;\r\n B35.Color := clWhite;\r\n B35.ElementFont := efCSS;\r\n B35.Font.Charset := ANSI_CHARSET;\r\n B35.Font.Color := clBlack;\r\n B35.Font.Height := -13;\r\n B35.Font.Name := 'Tahoma';\r\n B35.Font.Style := [];\r\n B35.ParentFont := False;\r\n B35.TabOrder := 45;\r\n SetEvent(B35, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B35, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel36.SetParentComponent(B35);\r\n WebPanel36.Name := 'WebPanel36';\r\n WebPanel36.Left := 0;\r\n WebPanel36.Top := 0;\r\n WebPanel36.Width := 100;\r\n WebPanel36.Height := 28;\r\n WebPanel36.ElementClassName := 'block_top';\r\n WebPanel36.HeightStyle := ssAuto;\r\n WebPanel36.Align := alTop;\r\n WebPanel36.BorderStyle := bsNone;\r\n WebPanel36.ChildOrder := 2;\r\n WebPanel36.Color := clWhite;\r\n WebPanel36.DragMode := dmAutomatic;\r\n WebPanel36.ElementFont := efCSS;\r\n WebPanel36.TabOrder := 0;\r\n SetEvent(WebPanel36, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel36, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel36, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel36, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel35.SetParentComponent(WebPanel36);\r\n WebLabel35.Name := 'WebLabel35';\r\n WebLabel35.Left := 24;\r\n WebLabel35.Top := 0;\r\n WebLabel35.Width := 22;\r\n WebLabel35.Height := 26;\r\n WebLabel35.Cursor := crHandPoint;\r\n WebLabel35.Hint := 'Setting Unit';\r\n WebLabel35.Align := alLeft;\r\n WebLabel35.Caption := '35';\r\n WebLabel35.DragMode := dmAutomatic;\r\n WebLabel35.ElementClassName := 'block_title';\r\n WebLabel35.ElementLabelClassName := 'block_title';\r\n WebLabel35.ElementFont := efCSS;\r\n WebLabel35.Font.Charset := ANSI_CHARSET;\r\n WebLabel35.Font.Color := clNavy;\r\n WebLabel35.Font.Height := -19;\r\n WebLabel35.Font.Name := 'Segoe UI Emoji';\r\n WebLabel35.Font.Style := [fsBold];\r\n WebLabel35.HeightPercent := 100.000000000000000000;\r\n WebLabel35.ParentFont := False;\r\n WebLabel35.WidthStyle := ssAuto;\r\n WebLabel35.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel35, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel35, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel35, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel35, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton31.SetParentComponent(WebPanel36);\r\n WebSpeedButton31.Name := 'WebSpeedButton31';\r\n WebSpeedButton31.Left := 0;\r\n WebSpeedButton31.Top := 0;\r\n WebSpeedButton31.Width := 24;\r\n WebSpeedButton31.Height := 28;\r\n WebSpeedButton31.Cursor := crHandPoint;\r\n WebSpeedButton31.Hint := 'Edit';\r\n WebSpeedButton31.Align := alLeft;\r\n WebSpeedButton31.Color := clNone;\r\n WebSpeedButton31.Flat := True;\r\n WebSpeedButton31.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton31.Font.Color := clBlack;\r\n WebSpeedButton31.Font.Height := -13;\r\n WebSpeedButton31.Font.Name := 'Tahoma';\r\n WebSpeedButton31.Font.Style := [];\r\n WebSpeedButton31.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton31.MaterialGlyph := 'edit';\r\n WebSpeedButton31.ParentFont := False;\r\n WebSpeedButton31.ShowHint := True;\r\n WebSpeedButton31.TabOrder := 0;\r\n WebSpeedButton31.Visible := False;\r\n WebSpeedButton31.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton31, Self, 'OnClick', '_BlockCallPickForm');\r\n M35.SetParentComponent(B35);\r\n M35.Name := 'M35';\r\n M35.Left := 0;\r\n M35.Top := 56;\r\n M35.Width := 100;\r\n M35.Height := 24;\r\n M35.Align := alBottom;\r\n M35.BorderStyle := bsNone;\r\n M35.ElementClassName := 'block_memo';\r\n M35.ElementFont := efCSS;\r\n M35.Font.Charset := ANSI_CHARSET;\r\n M35.Font.Color := clBlack;\r\n M35.Font.Height := -13;\r\n M35.Font.Name := 'Tahoma';\r\n M35.Font.Style := [];\r\n M35.HeightPercent := 100.000000000000000000;\r\n M35.ParentFont := False;\r\n M35.SelLength := 0;\r\n M35.SelStart := 0;\r\n M35.ShowFocus := False;\r\n M35.WidthPercent := 100.000000000000000000;\r\n SetEvent(M35, Self, 'OnChange', 'M21Change');\r\n SetEvent(M35, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M35, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M35, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M35, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M35, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M35, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer42.SetParentComponent(B35);\r\n WebHTMLContainer42.Name := 'WebHTMLContainer42';\r\n WebHTMLContainer42.Left := 0;\r\n WebHTMLContainer42.Top := 38;\r\n WebHTMLContainer42.Width := 100;\r\n WebHTMLContainer42.Height := 18;\r\n WebHTMLContainer42.HeightStyle := ssAuto;\r\n WebHTMLContainer42.Align := alBottom;\r\n WebHTMLContainer42.ChildOrder := 2;\r\n WebHTMLContainer42.Visible := False;\r\n SetEvent(WebHTMLContainer42, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer42, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer42, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B36.SetParentComponent(SubForm_DIV);\r\n B36.Name := 'B36';\r\n B36.Left := 58;\r\n B36.Top := 548;\r\n B36.Width := 100;\r\n B36.Height := 80;\r\n B36.ElementClassName := 'data_block';\r\n B36.BorderColor := clWhite;\r\n B36.ChildOrder := 36;\r\n B36.Color := clWhite;\r\n B36.ElementFont := efCSS;\r\n B36.Font.Charset := ANSI_CHARSET;\r\n B36.Font.Color := clBlack;\r\n B36.Font.Height := -13;\r\n B36.Font.Name := 'Tahoma';\r\n B36.Font.Style := [];\r\n B36.ParentFont := False;\r\n B36.TabOrder := 46;\r\n SetEvent(B36, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B36, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel38.SetParentComponent(B36);\r\n WebPanel38.Name := 'WebPanel38';\r\n WebPanel38.Left := 0;\r\n WebPanel38.Top := 0;\r\n WebPanel38.Width := 100;\r\n WebPanel38.Height := 28;\r\n WebPanel38.ElementClassName := 'block_top';\r\n WebPanel38.HeightStyle := ssAuto;\r\n WebPanel38.Align := alTop;\r\n WebPanel38.BorderStyle := bsNone;\r\n WebPanel38.ChildOrder := 2;\r\n WebPanel38.Color := clWhite;\r\n WebPanel38.DragMode := dmAutomatic;\r\n WebPanel38.ElementFont := efCSS;\r\n WebPanel38.TabOrder := 0;\r\n SetEvent(WebPanel38, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel38, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel38, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel38, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel56.SetParentComponent(WebPanel38);\r\n WebLabel56.Name := 'WebLabel56';\r\n WebLabel56.Left := 24;\r\n WebLabel56.Top := 0;\r\n WebLabel56.Width := 22;\r\n WebLabel56.Height := 26;\r\n WebLabel56.Cursor := crHandPoint;\r\n WebLabel56.Hint := 'Setting Unit';\r\n WebLabel56.Align := alLeft;\r\n WebLabel56.Caption := '36';\r\n WebLabel56.DragMode := dmAutomatic;\r\n WebLabel56.ElementClassName := 'block_title';\r\n WebLabel56.ElementLabelClassName := 'block_title';\r\n WebLabel56.ElementFont := efCSS;\r\n WebLabel56.Font.Charset := ANSI_CHARSET;\r\n WebLabel56.Font.Color := clNavy;\r\n WebLabel56.Font.Height := -19;\r\n WebLabel56.Font.Name := 'Segoe UI Emoji';\r\n WebLabel56.Font.Style := [fsBold];\r\n WebLabel56.HeightPercent := 100.000000000000000000;\r\n WebLabel56.ParentFont := False;\r\n WebLabel56.WidthStyle := ssAuto;\r\n WebLabel56.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel56, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel56, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel56, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel56, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton32.SetParentComponent(WebPanel38);\r\n WebSpeedButton32.Name := 'WebSpeedButton32';\r\n WebSpeedButton32.Left := 0;\r\n WebSpeedButton32.Top := 0;\r\n WebSpeedButton32.Width := 24;\r\n WebSpeedButton32.Height := 28;\r\n WebSpeedButton32.Cursor := crHandPoint;\r\n WebSpeedButton32.Hint := 'Edit';\r\n WebSpeedButton32.Align := alLeft;\r\n WebSpeedButton32.Color := clNone;\r\n WebSpeedButton32.Flat := True;\r\n WebSpeedButton32.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton32.Font.Color := clBlack;\r\n WebSpeedButton32.Font.Height := -13;\r\n WebSpeedButton32.Font.Name := 'Tahoma';\r\n WebSpeedButton32.Font.Style := [];\r\n WebSpeedButton32.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton32.MaterialGlyph := 'edit';\r\n WebSpeedButton32.ParentFont := False;\r\n WebSpeedButton32.ShowHint := True;\r\n WebSpeedButton32.TabOrder := 0;\r\n WebSpeedButton32.Visible := False;\r\n WebSpeedButton32.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton32, Self, 'OnClick', '_BlockCallPickForm');\r\n M36.SetParentComponent(B36);\r\n M36.Name := 'M36';\r\n M36.Left := 0;\r\n M36.Top := 56;\r\n M36.Width := 100;\r\n M36.Height := 24;\r\n M36.Align := alBottom;\r\n M36.BorderStyle := bsNone;\r\n M36.ElementClassName := 'block_memo';\r\n M36.ElementFont := efCSS;\r\n M36.Font.Charset := ANSI_CHARSET;\r\n M36.Font.Color := clBlack;\r\n M36.Font.Height := -13;\r\n M36.Font.Name := 'Tahoma';\r\n M36.Font.Style := [];\r\n M36.HeightPercent := 100.000000000000000000;\r\n M36.ParentFont := False;\r\n M36.SelLength := 0;\r\n M36.SelStart := 0;\r\n M36.ShowFocus := False;\r\n M36.WidthPercent := 100.000000000000000000;\r\n SetEvent(M36, Self, 'OnChange', 'M21Change');\r\n SetEvent(M36, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M36, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M36, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M36, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M36, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M36, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer43.SetParentComponent(B36);\r\n WebHTMLContainer43.Name := 'WebHTMLContainer43';\r\n WebHTMLContainer43.Left := 0;\r\n WebHTMLContainer43.Top := 41;\r\n WebHTMLContainer43.Width := 100;\r\n WebHTMLContainer43.Height := 15;\r\n WebHTMLContainer43.HeightStyle := ssAuto;\r\n WebHTMLContainer43.Align := alBottom;\r\n WebHTMLContainer43.ChildOrder := 2;\r\n WebHTMLContainer43.Visible := False;\r\n SetEvent(WebHTMLContainer43, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer43, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer43, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B37.SetParentComponent(SubForm_DIV);\r\n B37.Name := 'B37';\r\n B37.Left := 179;\r\n B37.Top := 548;\r\n B37.Width := 100;\r\n B37.Height := 80;\r\n B37.ElementClassName := 'data_block';\r\n B37.BorderColor := clWhite;\r\n B37.ChildOrder := 37;\r\n B37.Color := clWhite;\r\n B37.ElementFont := efCSS;\r\n B37.Font.Charset := ANSI_CHARSET;\r\n B37.Font.Color := clBlack;\r\n B37.Font.Height := -13;\r\n B37.Font.Name := 'Tahoma';\r\n B37.Font.Style := [];\r\n B37.ParentFont := False;\r\n B37.TabOrder := 47;\r\n SetEvent(B37, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B37, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel40.SetParentComponent(B37);\r\n WebPanel40.Name := 'WebPanel40';\r\n WebPanel40.Left := 0;\r\n WebPanel40.Top := 0;\r\n WebPanel40.Width := 100;\r\n WebPanel40.Height := 28;\r\n WebPanel40.ElementClassName := 'block_top';\r\n WebPanel40.HeightStyle := ssAuto;\r\n WebPanel40.Align := alTop;\r\n WebPanel40.BorderStyle := bsNone;\r\n WebPanel40.ChildOrder := 2;\r\n WebPanel40.Color := clWhite;\r\n WebPanel40.DragMode := dmAutomatic;\r\n WebPanel40.ElementFont := efCSS;\r\n WebPanel40.TabOrder := 0;\r\n SetEvent(WebPanel40, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel40, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel40, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel40, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel57.SetParentComponent(WebPanel40);\r\n WebLabel57.Name := 'WebLabel57';\r\n WebLabel57.Left := 24;\r\n WebLabel57.Top := 0;\r\n WebLabel57.Width := 22;\r\n WebLabel57.Height := 26;\r\n WebLabel57.Cursor := crHandPoint;\r\n WebLabel57.Hint := 'Setting Unit';\r\n WebLabel57.Align := alLeft;\r\n WebLabel57.Caption := '37';\r\n WebLabel57.DragMode := dmAutomatic;\r\n WebLabel57.ElementClassName := 'block_title';\r\n WebLabel57.ElementLabelClassName := 'block_title';\r\n WebLabel57.ElementFont := efCSS;\r\n WebLabel57.Font.Charset := ANSI_CHARSET;\r\n WebLabel57.Font.Color := clNavy;\r\n WebLabel57.Font.Height := -19;\r\n WebLabel57.Font.Name := 'Segoe UI Emoji';\r\n WebLabel57.Font.Style := [fsBold];\r\n WebLabel57.HeightPercent := 100.000000000000000000;\r\n WebLabel57.ParentFont := False;\r\n WebLabel57.WidthStyle := ssAuto;\r\n WebLabel57.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel57, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel57, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel57, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel57, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton53.SetParentComponent(WebPanel40);\r\n WebSpeedButton53.Name := 'WebSpeedButton53';\r\n WebSpeedButton53.Left := 0;\r\n WebSpeedButton53.Top := 0;\r\n WebSpeedButton53.Width := 24;\r\n WebSpeedButton53.Height := 28;\r\n WebSpeedButton53.Cursor := crHandPoint;\r\n WebSpeedButton53.Hint := 'Edit';\r\n WebSpeedButton53.Align := alLeft;\r\n WebSpeedButton53.Color := clNone;\r\n WebSpeedButton53.Flat := True;\r\n WebSpeedButton53.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton53.Font.Color := clBlack;\r\n WebSpeedButton53.Font.Height := -13;\r\n WebSpeedButton53.Font.Name := 'Tahoma';\r\n WebSpeedButton53.Font.Style := [];\r\n WebSpeedButton53.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton53.MaterialGlyph := 'edit';\r\n WebSpeedButton53.ParentFont := False;\r\n WebSpeedButton53.ShowHint := True;\r\n WebSpeedButton53.TabOrder := 0;\r\n WebSpeedButton53.Visible := False;\r\n WebSpeedButton53.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton53, Self, 'OnClick', '_BlockCallPickForm');\r\n M37.SetParentComponent(B37);\r\n M37.Name := 'M37';\r\n M37.Left := 0;\r\n M37.Top := 56;\r\n M37.Width := 100;\r\n M37.Height := 24;\r\n M37.Align := alBottom;\r\n M37.BorderStyle := bsNone;\r\n M37.ElementClassName := 'block_memo';\r\n M37.ElementFont := efCSS;\r\n M37.Font.Charset := ANSI_CHARSET;\r\n M37.Font.Color := clBlack;\r\n M37.Font.Height := -13;\r\n M37.Font.Name := 'Tahoma';\r\n M37.Font.Style := [];\r\n M37.HeightPercent := 100.000000000000000000;\r\n M37.ParentFont := False;\r\n M37.SelLength := 0;\r\n M37.SelStart := 0;\r\n M37.ShowFocus := False;\r\n M37.WidthPercent := 100.000000000000000000;\r\n SetEvent(M37, Self, 'OnChange', 'M21Change');\r\n SetEvent(M37, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M37, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M37, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M37, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M37, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M37, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer44.SetParentComponent(B37);\r\n WebHTMLContainer44.Name := 'WebHTMLContainer44';\r\n WebHTMLContainer44.Left := 0;\r\n WebHTMLContainer44.Top := 41;\r\n WebHTMLContainer44.Width := 100;\r\n WebHTMLContainer44.Height := 15;\r\n WebHTMLContainer44.HeightStyle := ssAuto;\r\n WebHTMLContainer44.Align := alBottom;\r\n WebHTMLContainer44.ChildOrder := 2;\r\n WebHTMLContainer44.Visible := False;\r\n SetEvent(WebHTMLContainer44, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer44, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer44, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B38.SetParentComponent(SubForm_DIV);\r\n B38.Name := 'B38';\r\n B38.Left := 299;\r\n B38.Top := 548;\r\n B38.Width := 100;\r\n B38.Height := 80;\r\n B38.ElementClassName := 'data_block';\r\n B38.BorderColor := clWhite;\r\n B38.ChildOrder := 38;\r\n B38.Color := clWhite;\r\n B38.ElementFont := efCSS;\r\n B38.Font.Charset := ANSI_CHARSET;\r\n B38.Font.Color := clBlack;\r\n B38.Font.Height := -13;\r\n B38.Font.Name := 'Tahoma';\r\n B38.Font.Style := [];\r\n B38.ParentFont := False;\r\n B38.TabOrder := 48;\r\n SetEvent(B38, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B38, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel42.SetParentComponent(B38);\r\n WebPanel42.Name := 'WebPanel42';\r\n WebPanel42.Left := 0;\r\n WebPanel42.Top := 0;\r\n WebPanel42.Width := 100;\r\n WebPanel42.Height := 28;\r\n WebPanel42.ElementClassName := 'block_top';\r\n WebPanel42.HeightStyle := ssAuto;\r\n WebPanel42.Align := alTop;\r\n WebPanel42.BorderStyle := bsNone;\r\n WebPanel42.ChildOrder := 2;\r\n WebPanel42.Color := clWhite;\r\n WebPanel42.DragMode := dmAutomatic;\r\n WebPanel42.ElementFont := efCSS;\r\n WebPanel42.TabOrder := 0;\r\n SetEvent(WebPanel42, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel42, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel42, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel42, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel58.SetParentComponent(WebPanel42);\r\n WebLabel58.Name := 'WebLabel58';\r\n WebLabel58.Left := 24;\r\n WebLabel58.Top := 0;\r\n WebLabel58.Width := 22;\r\n WebLabel58.Height := 26;\r\n WebLabel58.Cursor := crHandPoint;\r\n WebLabel58.Hint := 'Setting Unit';\r\n WebLabel58.Align := alLeft;\r\n WebLabel58.Caption := '38';\r\n WebLabel58.DragMode := dmAutomatic;\r\n WebLabel58.ElementClassName := 'block_title';\r\n WebLabel58.ElementLabelClassName := 'block_title';\r\n WebLabel58.ElementFont := efCSS;\r\n WebLabel58.Font.Charset := ANSI_CHARSET;\r\n WebLabel58.Font.Color := clNavy;\r\n WebLabel58.Font.Height := -19;\r\n WebLabel58.Font.Name := 'Segoe UI Emoji';\r\n WebLabel58.Font.Style := [fsBold];\r\n WebLabel58.HeightPercent := 100.000000000000000000;\r\n WebLabel58.ParentFont := False;\r\n WebLabel58.WidthStyle := ssAuto;\r\n WebLabel58.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel58, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel58, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel58, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel58, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton54.SetParentComponent(WebPanel42);\r\n WebSpeedButton54.Name := 'WebSpeedButton54';\r\n WebSpeedButton54.Left := 0;\r\n WebSpeedButton54.Top := 0;\r\n WebSpeedButton54.Width := 24;\r\n WebSpeedButton54.Height := 28;\r\n WebSpeedButton54.Cursor := crHandPoint;\r\n WebSpeedButton54.Hint := 'Edit';\r\n WebSpeedButton54.Align := alLeft;\r\n WebSpeedButton54.Color := clNone;\r\n WebSpeedButton54.Flat := True;\r\n WebSpeedButton54.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton54.Font.Color := clBlack;\r\n WebSpeedButton54.Font.Height := -13;\r\n WebSpeedButton54.Font.Name := 'Tahoma';\r\n WebSpeedButton54.Font.Style := [];\r\n WebSpeedButton54.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton54.MaterialGlyph := 'edit';\r\n WebSpeedButton54.ParentFont := False;\r\n WebSpeedButton54.ShowHint := True;\r\n WebSpeedButton54.TabOrder := 0;\r\n WebSpeedButton54.Visible := False;\r\n WebSpeedButton54.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton54, Self, 'OnClick', '_BlockCallPickForm');\r\n M38.SetParentComponent(B38);\r\n M38.Name := 'M38';\r\n M38.Left := 0;\r\n M38.Top := 56;\r\n M38.Width := 100;\r\n M38.Height := 24;\r\n M38.Align := alBottom;\r\n M38.BorderStyle := bsNone;\r\n M38.ElementClassName := 'block_memo';\r\n M38.ElementFont := efCSS;\r\n M38.Font.Charset := ANSI_CHARSET;\r\n M38.Font.Color := clBlack;\r\n M38.Font.Height := -13;\r\n M38.Font.Name := 'Tahoma';\r\n M38.Font.Style := [];\r\n M38.HeightPercent := 100.000000000000000000;\r\n M38.ParentFont := False;\r\n M38.SelLength := 0;\r\n M38.SelStart := 0;\r\n M38.ShowFocus := False;\r\n M38.WidthPercent := 100.000000000000000000;\r\n SetEvent(M38, Self, 'OnChange', 'M21Change');\r\n SetEvent(M38, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M38, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M38, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M38, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M38, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M38, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer45.SetParentComponent(B38);\r\n WebHTMLContainer45.Name := 'WebHTMLContainer45';\r\n WebHTMLContainer45.Left := 0;\r\n WebHTMLContainer45.Top := 41;\r\n WebHTMLContainer45.Width := 100;\r\n WebHTMLContainer45.Height := 15;\r\n WebHTMLContainer45.HeightStyle := ssAuto;\r\n WebHTMLContainer45.Align := alBottom;\r\n WebHTMLContainer45.ChildOrder := 2;\r\n WebHTMLContainer45.Visible := False;\r\n SetEvent(WebHTMLContainer45, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer45, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer45, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B39.SetParentComponent(SubForm_DIV);\r\n B39.Name := 'B39';\r\n B39.Left := 420;\r\n B39.Top := 548;\r\n B39.Width := 100;\r\n B39.Height := 80;\r\n B39.ElementClassName := 'data_block';\r\n B39.BorderColor := clWhite;\r\n B39.ChildOrder := 39;\r\n B39.Color := clWhite;\r\n B39.ElementFont := efCSS;\r\n B39.Font.Charset := ANSI_CHARSET;\r\n B39.Font.Color := clBlack;\r\n B39.Font.Height := -13;\r\n B39.Font.Name := 'Tahoma';\r\n B39.Font.Style := [];\r\n B39.ParentFont := False;\r\n B39.TabOrder := 49;\r\n SetEvent(B39, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B39, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel44.SetParentComponent(B39);\r\n WebPanel44.Name := 'WebPanel44';\r\n WebPanel44.Left := 0;\r\n WebPanel44.Top := 0;\r\n WebPanel44.Width := 100;\r\n WebPanel44.Height := 28;\r\n WebPanel44.ElementClassName := 'block_top';\r\n WebPanel44.HeightStyle := ssAuto;\r\n WebPanel44.Align := alTop;\r\n WebPanel44.BorderStyle := bsNone;\r\n WebPanel44.ChildOrder := 2;\r\n WebPanel44.Color := clWhite;\r\n WebPanel44.DragMode := dmAutomatic;\r\n WebPanel44.ElementFont := efCSS;\r\n WebPanel44.TabOrder := 0;\r\n SetEvent(WebPanel44, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel44, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel44, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel44, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel59.SetParentComponent(WebPanel44);\r\n WebLabel59.Name := 'WebLabel59';\r\n WebLabel59.Left := 24;\r\n WebLabel59.Top := 0;\r\n WebLabel59.Width := 22;\r\n WebLabel59.Height := 26;\r\n WebLabel59.Cursor := crHandPoint;\r\n WebLabel59.Hint := 'Setting Unit';\r\n WebLabel59.Align := alLeft;\r\n WebLabel59.Caption := '39';\r\n WebLabel59.DragMode := dmAutomatic;\r\n WebLabel59.ElementClassName := 'block_title';\r\n WebLabel59.ElementLabelClassName := 'block_title';\r\n WebLabel59.ElementFont := efCSS;\r\n WebLabel59.Font.Charset := ANSI_CHARSET;\r\n WebLabel59.Font.Color := clNavy;\r\n WebLabel59.Font.Height := -19;\r\n WebLabel59.Font.Name := 'Segoe UI Emoji';\r\n WebLabel59.Font.Style := [fsBold];\r\n WebLabel59.HeightPercent := 100.000000000000000000;\r\n WebLabel59.ParentFont := False;\r\n WebLabel59.WidthStyle := ssAuto;\r\n WebLabel59.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel59, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel59, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel59, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel59, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton55.SetParentComponent(WebPanel44);\r\n WebSpeedButton55.Name := 'WebSpeedButton55';\r\n WebSpeedButton55.Left := 0;\r\n WebSpeedButton55.Top := 0;\r\n WebSpeedButton55.Width := 24;\r\n WebSpeedButton55.Height := 28;\r\n WebSpeedButton55.Cursor := crHandPoint;\r\n WebSpeedButton55.Hint := 'Edit';\r\n WebSpeedButton55.Align := alLeft;\r\n WebSpeedButton55.Color := clNone;\r\n WebSpeedButton55.Flat := True;\r\n WebSpeedButton55.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton55.Font.Color := clBlack;\r\n WebSpeedButton55.Font.Height := -13;\r\n WebSpeedButton55.Font.Name := 'Tahoma';\r\n WebSpeedButton55.Font.Style := [];\r\n WebSpeedButton55.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton55.MaterialGlyph := 'edit';\r\n WebSpeedButton55.ParentFont := False;\r\n WebSpeedButton55.ShowHint := True;\r\n WebSpeedButton55.TabOrder := 0;\r\n WebSpeedButton55.Visible := False;\r\n WebSpeedButton55.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton55, Self, 'OnClick', '_BlockCallPickForm');\r\n M39.SetParentComponent(B39);\r\n M39.Name := 'M39';\r\n M39.Left := 0;\r\n M39.Top := 56;\r\n M39.Width := 100;\r\n M39.Height := 24;\r\n M39.Align := alBottom;\r\n M39.BorderStyle := bsNone;\r\n M39.ElementClassName := 'block_memo';\r\n M39.ElementFont := efCSS;\r\n M39.Font.Charset := ANSI_CHARSET;\r\n M39.Font.Color := clBlack;\r\n M39.Font.Height := -13;\r\n M39.Font.Name := 'Tahoma';\r\n M39.Font.Style := [];\r\n M39.HeightPercent := 100.000000000000000000;\r\n M39.ParentFont := False;\r\n M39.SelLength := 0;\r\n M39.SelStart := 0;\r\n M39.ShowFocus := False;\r\n M39.WidthPercent := 100.000000000000000000;\r\n SetEvent(M39, Self, 'OnChange', 'M21Change');\r\n SetEvent(M39, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M39, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M39, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M39, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M39, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M39, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer46.SetParentComponent(B39);\r\n WebHTMLContainer46.Name := 'WebHTMLContainer46';\r\n WebHTMLContainer46.Left := 0;\r\n WebHTMLContainer46.Top := 41;\r\n WebHTMLContainer46.Width := 100;\r\n WebHTMLContainer46.Height := 15;\r\n WebHTMLContainer46.HeightStyle := ssAuto;\r\n WebHTMLContainer46.Align := alBottom;\r\n WebHTMLContainer46.ChildOrder := 2;\r\n WebHTMLContainer46.Visible := False;\r\n SetEvent(WebHTMLContainer46, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer46, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer46, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B40.SetParentComponent(SubForm_DIV);\r\n B40.Name := 'B40';\r\n B40.Left := 541;\r\n B40.Top := 548;\r\n B40.Width := 100;\r\n B40.Height := 80;\r\n B40.ElementClassName := 'data_block';\r\n B40.BorderColor := clWhite;\r\n B40.ChildOrder := 40;\r\n B40.Color := clWhite;\r\n B40.ElementFont := efCSS;\r\n B40.Font.Charset := ANSI_CHARSET;\r\n B40.Font.Color := clBlack;\r\n B40.Font.Height := -13;\r\n B40.Font.Name := 'Tahoma';\r\n B40.Font.Style := [];\r\n B40.ParentFont := False;\r\n B40.TabOrder := 50;\r\n SetEvent(B40, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B40, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel46.SetParentComponent(B40);\r\n WebPanel46.Name := 'WebPanel46';\r\n WebPanel46.Left := 0;\r\n WebPanel46.Top := 0;\r\n WebPanel46.Width := 100;\r\n WebPanel46.Height := 28;\r\n WebPanel46.ElementClassName := 'block_top';\r\n WebPanel46.HeightStyle := ssAuto;\r\n WebPanel46.Align := alTop;\r\n WebPanel46.BorderStyle := bsNone;\r\n WebPanel46.ChildOrder := 2;\r\n WebPanel46.Color := clWhite;\r\n WebPanel46.DragMode := dmAutomatic;\r\n WebPanel46.ElementFont := efCSS;\r\n WebPanel46.TabOrder := 0;\r\n SetEvent(WebPanel46, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel46, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel46, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel46, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel60.SetParentComponent(WebPanel46);\r\n WebLabel60.Name := 'WebLabel60';\r\n WebLabel60.Left := 24;\r\n WebLabel60.Top := 0;\r\n WebLabel60.Width := 22;\r\n WebLabel60.Height := 26;\r\n WebLabel60.Cursor := crHandPoint;\r\n WebLabel60.Hint := 'Setting Unit';\r\n WebLabel60.Align := alLeft;\r\n WebLabel60.Caption := '40';\r\n WebLabel60.DragMode := dmAutomatic;\r\n WebLabel60.ElementClassName := 'block_title';\r\n WebLabel60.ElementLabelClassName := 'block_title';\r\n WebLabel60.ElementFont := efCSS;\r\n WebLabel60.Font.Charset := ANSI_CHARSET;\r\n WebLabel60.Font.Color := clNavy;\r\n WebLabel60.Font.Height := -19;\r\n WebLabel60.Font.Name := 'Segoe UI Emoji';\r\n WebLabel60.Font.Style := [fsBold];\r\n WebLabel60.HeightPercent := 100.000000000000000000;\r\n WebLabel60.ParentFont := False;\r\n WebLabel60.WidthStyle := ssAuto;\r\n WebLabel60.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel60, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel60, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel60, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel60, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton56.SetParentComponent(WebPanel46);\r\n WebSpeedButton56.Name := 'WebSpeedButton56';\r\n WebSpeedButton56.Left := 0;\r\n WebSpeedButton56.Top := 0;\r\n WebSpeedButton56.Width := 24;\r\n WebSpeedButton56.Height := 28;\r\n WebSpeedButton56.Cursor := crHandPoint;\r\n WebSpeedButton56.Hint := 'Edit';\r\n WebSpeedButton56.Align := alLeft;\r\n WebSpeedButton56.Color := clNone;\r\n WebSpeedButton56.Flat := True;\r\n WebSpeedButton56.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton56.Font.Color := clBlack;\r\n WebSpeedButton56.Font.Height := -13;\r\n WebSpeedButton56.Font.Name := 'Tahoma';\r\n WebSpeedButton56.Font.Style := [];\r\n WebSpeedButton56.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton56.MaterialGlyph := 'edit';\r\n WebSpeedButton56.ParentFont := False;\r\n WebSpeedButton56.ShowHint := True;\r\n WebSpeedButton56.TabOrder := 0;\r\n WebSpeedButton56.Visible := False;\r\n WebSpeedButton56.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton56, Self, 'OnClick', '_BlockCallPickForm');\r\n M40.SetParentComponent(B40);\r\n M40.Name := 'M40';\r\n M40.Left := 0;\r\n M40.Top := 56;\r\n M40.Width := 100;\r\n M40.Height := 24;\r\n M40.Align := alBottom;\r\n M40.BorderStyle := bsNone;\r\n M40.ElementClassName := 'block_memo';\r\n M40.ElementFont := efCSS;\r\n M40.Font.Charset := ANSI_CHARSET;\r\n M40.Font.Color := clBlack;\r\n M40.Font.Height := -13;\r\n M40.Font.Name := 'Tahoma';\r\n M40.Font.Style := [];\r\n M40.HeightPercent := 100.000000000000000000;\r\n M40.ParentFont := False;\r\n M40.SelLength := 0;\r\n M40.SelStart := 0;\r\n M40.ShowFocus := False;\r\n M40.WidthPercent := 100.000000000000000000;\r\n SetEvent(M40, Self, 'OnChange', 'M21Change');\r\n SetEvent(M40, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M40, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M40, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M40, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M40, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M40, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer47.SetParentComponent(B40);\r\n WebHTMLContainer47.Name := 'WebHTMLContainer47';\r\n WebHTMLContainer47.Left := 0;\r\n WebHTMLContainer47.Top := 38;\r\n WebHTMLContainer47.Width := 100;\r\n WebHTMLContainer47.Height := 18;\r\n WebHTMLContainer47.HeightStyle := ssAuto;\r\n WebHTMLContainer47.Align := alBottom;\r\n WebHTMLContainer47.ChildOrder := 2;\r\n WebHTMLContainer47.Visible := False;\r\n SetEvent(WebHTMLContainer47, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer47, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer47, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B41.SetParentComponent(SubForm_DIV);\r\n B41.Name := 'B41';\r\n B41.Left := 58;\r\n B41.Top := 626;\r\n B41.Width := 100;\r\n B41.Height := 80;\r\n B41.ElementClassName := 'data_block';\r\n B41.BorderColor := clWhite;\r\n B41.ChildOrder := 41;\r\n B41.Color := clWhite;\r\n B41.ElementFont := efCSS;\r\n B41.Font.Charset := ANSI_CHARSET;\r\n B41.Font.Color := clBlack;\r\n B41.Font.Height := -13;\r\n B41.Font.Name := 'Tahoma';\r\n B41.Font.Style := [];\r\n B41.ParentFont := False;\r\n B41.TabOrder := 51;\r\n SetEvent(B41, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B41, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel48.SetParentComponent(B41);\r\n WebPanel48.Name := 'WebPanel48';\r\n WebPanel48.Left := 0;\r\n WebPanel48.Top := 0;\r\n WebPanel48.Width := 100;\r\n WebPanel48.Height := 28;\r\n WebPanel48.ElementClassName := 'block_top';\r\n WebPanel48.HeightStyle := ssAuto;\r\n WebPanel48.Align := alTop;\r\n WebPanel48.BorderStyle := bsNone;\r\n WebPanel48.ChildOrder := 2;\r\n WebPanel48.Color := clWhite;\r\n WebPanel48.DragMode := dmAutomatic;\r\n WebPanel48.ElementFont := efCSS;\r\n WebPanel48.TabOrder := 0;\r\n SetEvent(WebPanel48, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel48, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel48, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel48, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel61.SetParentComponent(WebPanel48);\r\n WebLabel61.Name := 'WebLabel61';\r\n WebLabel61.Left := 24;\r\n WebLabel61.Top := 0;\r\n WebLabel61.Width := 22;\r\n WebLabel61.Height := 26;\r\n WebLabel61.Cursor := crHandPoint;\r\n WebLabel61.Hint := 'Setting Unit';\r\n WebLabel61.Align := alLeft;\r\n WebLabel61.Caption := '41';\r\n WebLabel61.DragMode := dmAutomatic;\r\n WebLabel61.ElementClassName := 'block_title';\r\n WebLabel61.ElementLabelClassName := 'block_title';\r\n WebLabel61.ElementFont := efCSS;\r\n WebLabel61.Font.Charset := ANSI_CHARSET;\r\n WebLabel61.Font.Color := clNavy;\r\n WebLabel61.Font.Height := -19;\r\n WebLabel61.Font.Name := 'Segoe UI Emoji';\r\n WebLabel61.Font.Style := [fsBold];\r\n WebLabel61.HeightPercent := 100.000000000000000000;\r\n WebLabel61.ParentFont := False;\r\n WebLabel61.WidthStyle := ssAuto;\r\n WebLabel61.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel61, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel61, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel61, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel61, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton57.SetParentComponent(WebPanel48);\r\n WebSpeedButton57.Name := 'WebSpeedButton57';\r\n WebSpeedButton57.Left := 0;\r\n WebSpeedButton57.Top := 0;\r\n WebSpeedButton57.Width := 24;\r\n WebSpeedButton57.Height := 28;\r\n WebSpeedButton57.Cursor := crHandPoint;\r\n WebSpeedButton57.Hint := 'Edit';\r\n WebSpeedButton57.Align := alLeft;\r\n WebSpeedButton57.Color := clNone;\r\n WebSpeedButton57.Flat := True;\r\n WebSpeedButton57.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton57.Font.Color := clBlack;\r\n WebSpeedButton57.Font.Height := -13;\r\n WebSpeedButton57.Font.Name := 'Tahoma';\r\n WebSpeedButton57.Font.Style := [];\r\n WebSpeedButton57.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton57.MaterialGlyph := 'edit';\r\n WebSpeedButton57.ParentFont := False;\r\n WebSpeedButton57.ShowHint := True;\r\n WebSpeedButton57.TabOrder := 0;\r\n WebSpeedButton57.Visible := False;\r\n WebSpeedButton57.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton57, Self, 'OnClick', '_BlockCallPickForm');\r\n M41.SetParentComponent(B41);\r\n M41.Name := 'M41';\r\n M41.Left := 0;\r\n M41.Top := 56;\r\n M41.Width := 100;\r\n M41.Height := 24;\r\n M41.Align := alBottom;\r\n M41.BorderStyle := bsNone;\r\n M41.ElementClassName := 'block_memo';\r\n M41.ElementFont := efCSS;\r\n M41.Font.Charset := ANSI_CHARSET;\r\n M41.Font.Color := clBlack;\r\n M41.Font.Height := -13;\r\n M41.Font.Name := 'Tahoma';\r\n M41.Font.Style := [];\r\n M41.HeightPercent := 100.000000000000000000;\r\n M41.ParentFont := False;\r\n M41.SelLength := 0;\r\n M41.SelStart := 0;\r\n M41.ShowFocus := False;\r\n M41.WidthPercent := 100.000000000000000000;\r\n SetEvent(M41, Self, 'OnChange', 'M21Change');\r\n SetEvent(M41, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M41, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M41, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M41, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M41, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M41, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer48.SetParentComponent(B41);\r\n WebHTMLContainer48.Name := 'WebHTMLContainer48';\r\n WebHTMLContainer48.Left := 0;\r\n WebHTMLContainer48.Top := 41;\r\n WebHTMLContainer48.Width := 100;\r\n WebHTMLContainer48.Height := 15;\r\n WebHTMLContainer48.HeightStyle := ssAuto;\r\n WebHTMLContainer48.Align := alBottom;\r\n WebHTMLContainer48.ChildOrder := 2;\r\n WebHTMLContainer48.Visible := False;\r\n SetEvent(WebHTMLContainer48, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer48, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer48, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B42.SetParentComponent(SubForm_DIV);\r\n B42.Name := 'B42';\r\n B42.Left := 178;\r\n B42.Top := 626;\r\n B42.Width := 100;\r\n B42.Height := 80;\r\n B42.ElementClassName := 'data_block';\r\n B42.BorderColor := clWhite;\r\n B42.ChildOrder := 42;\r\n B42.Color := clWhite;\r\n B42.ElementFont := efCSS;\r\n B42.Font.Charset := ANSI_CHARSET;\r\n B42.Font.Color := clBlack;\r\n B42.Font.Height := -13;\r\n B42.Font.Name := 'Tahoma';\r\n B42.Font.Style := [];\r\n B42.ParentFont := False;\r\n B42.TabOrder := 52;\r\n SetEvent(B42, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B42, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel50.SetParentComponent(B42);\r\n WebPanel50.Name := 'WebPanel50';\r\n WebPanel50.Left := 0;\r\n WebPanel50.Top := 0;\r\n WebPanel50.Width := 100;\r\n WebPanel50.Height := 28;\r\n WebPanel50.ElementClassName := 'block_top';\r\n WebPanel50.Align := alTop;\r\n WebPanel50.BorderStyle := bsNone;\r\n WebPanel50.ChildOrder := 2;\r\n WebPanel50.Color := clWhite;\r\n WebPanel50.DragMode := dmAutomatic;\r\n WebPanel50.ElementFont := efCSS;\r\n WebPanel50.TabOrder := 0;\r\n SetEvent(WebPanel50, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel50, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel50, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel50, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel62.SetParentComponent(WebPanel50);\r\n WebLabel62.Name := 'WebLabel62';\r\n WebLabel62.Left := 24;\r\n WebLabel62.Top := 0;\r\n WebLabel62.Width := 22;\r\n WebLabel62.Height := 26;\r\n WebLabel62.Cursor := crHandPoint;\r\n WebLabel62.Hint := 'Setting Unit';\r\n WebLabel62.Align := alLeft;\r\n WebLabel62.Caption := '42';\r\n WebLabel62.DragMode := dmAutomatic;\r\n WebLabel62.ElementClassName := 'block_title';\r\n WebLabel62.ElementLabelClassName := 'block_title';\r\n WebLabel62.ElementFont := efCSS;\r\n WebLabel62.Font.Charset := ANSI_CHARSET;\r\n WebLabel62.Font.Color := clNavy;\r\n WebLabel62.Font.Height := -19;\r\n WebLabel62.Font.Name := 'Segoe UI Emoji';\r\n WebLabel62.Font.Style := [fsBold];\r\n WebLabel62.HeightStyle := ssAuto;\r\n WebLabel62.HeightPercent := 100.000000000000000000;\r\n WebLabel62.ParentFont := False;\r\n WebLabel62.WidthStyle := ssAuto;\r\n WebLabel62.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel62, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel62, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel62, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel62, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton58.SetParentComponent(WebPanel50);\r\n WebSpeedButton58.Name := 'WebSpeedButton58';\r\n WebSpeedButton58.Left := 0;\r\n WebSpeedButton58.Top := 0;\r\n WebSpeedButton58.Width := 24;\r\n WebSpeedButton58.Height := 28;\r\n WebSpeedButton58.Cursor := crHandPoint;\r\n WebSpeedButton58.Hint := 'Edit';\r\n WebSpeedButton58.Align := alLeft;\r\n WebSpeedButton58.Color := clNone;\r\n WebSpeedButton58.Flat := True;\r\n WebSpeedButton58.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton58.Font.Color := clBlack;\r\n WebSpeedButton58.Font.Height := -13;\r\n WebSpeedButton58.Font.Name := 'Tahoma';\r\n WebSpeedButton58.Font.Style := [];\r\n WebSpeedButton58.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton58.MaterialGlyph := 'edit';\r\n WebSpeedButton58.ParentFont := False;\r\n WebSpeedButton58.ShowHint := True;\r\n WebSpeedButton58.TabOrder := 0;\r\n WebSpeedButton58.Visible := False;\r\n WebSpeedButton58.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton58, Self, 'OnClick', '_BlockCallPickForm');\r\n M42.SetParentComponent(B42);\r\n M42.Name := 'M42';\r\n M42.Left := 0;\r\n M42.Top := 56;\r\n M42.Width := 100;\r\n M42.Height := 24;\r\n M42.Align := alBottom;\r\n M42.BorderStyle := bsNone;\r\n M42.ElementClassName := 'block_memo';\r\n M42.ElementFont := efCSS;\r\n M42.Font.Charset := ANSI_CHARSET;\r\n M42.Font.Color := clBlack;\r\n M42.Font.Height := -13;\r\n M42.Font.Name := 'Tahoma';\r\n M42.Font.Style := [];\r\n M42.HeightPercent := 100.000000000000000000;\r\n M42.ParentFont := False;\r\n M42.SelLength := 0;\r\n M42.SelStart := 0;\r\n M42.ShowFocus := False;\r\n M42.WidthPercent := 100.000000000000000000;\r\n SetEvent(M42, Self, 'OnChange', 'M21Change');\r\n SetEvent(M42, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M42, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M42, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M42, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M42, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M42, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer49.SetParentComponent(B42);\r\n WebHTMLContainer49.Name := 'WebHTMLContainer49';\r\n WebHTMLContainer49.Left := 0;\r\n WebHTMLContainer49.Top := 41;\r\n WebHTMLContainer49.Width := 100;\r\n WebHTMLContainer49.Height := 15;\r\n WebHTMLContainer49.HeightStyle := ssAuto;\r\n WebHTMLContainer49.Align := alBottom;\r\n WebHTMLContainer49.ChildOrder := 2;\r\n WebHTMLContainer49.Visible := False;\r\n SetEvent(WebHTMLContainer49, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer49, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer49, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B43.SetParentComponent(SubForm_DIV);\r\n B43.Name := 'B43';\r\n B43.Left := 298;\r\n B43.Top := 626;\r\n B43.Width := 100;\r\n B43.Height := 80;\r\n B43.ElementClassName := 'data_block';\r\n B43.BorderColor := clWhite;\r\n B43.ChildOrder := 43;\r\n B43.Color := clWhite;\r\n B43.ElementFont := efCSS;\r\n B43.Font.Charset := ANSI_CHARSET;\r\n B43.Font.Color := clBlack;\r\n B43.Font.Height := -13;\r\n B43.Font.Name := 'Tahoma';\r\n B43.Font.Style := [];\r\n B43.ParentFont := False;\r\n B43.TabOrder := 53;\r\n SetEvent(B43, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B43, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel52.SetParentComponent(B43);\r\n WebPanel52.Name := 'WebPanel52';\r\n WebPanel52.Left := 0;\r\n WebPanel52.Top := 0;\r\n WebPanel52.Width := 100;\r\n WebPanel52.Height := 28;\r\n WebPanel52.ElementClassName := 'block_top';\r\n WebPanel52.Align := alTop;\r\n WebPanel52.BorderStyle := bsNone;\r\n WebPanel52.ChildOrder := 2;\r\n WebPanel52.Color := clWhite;\r\n WebPanel52.DragMode := dmAutomatic;\r\n WebPanel52.ElementFont := efCSS;\r\n WebPanel52.TabOrder := 0;\r\n SetEvent(WebPanel52, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel52, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel52, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel52, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel63.SetParentComponent(WebPanel52);\r\n WebLabel63.Name := 'WebLabel63';\r\n WebLabel63.Left := 24;\r\n WebLabel63.Top := 0;\r\n WebLabel63.Width := 22;\r\n WebLabel63.Height := 26;\r\n WebLabel63.Cursor := crHandPoint;\r\n WebLabel63.Hint := 'Setting Unit';\r\n WebLabel63.Align := alLeft;\r\n WebLabel63.Caption := '43';\r\n WebLabel63.DragMode := dmAutomatic;\r\n WebLabel63.ElementClassName := 'block_title';\r\n WebLabel63.ElementLabelClassName := 'block_title';\r\n WebLabel63.ElementFont := efCSS;\r\n WebLabel63.Font.Charset := ANSI_CHARSET;\r\n WebLabel63.Font.Color := clNavy;\r\n WebLabel63.Font.Height := -19;\r\n WebLabel63.Font.Name := 'Segoe UI Emoji';\r\n WebLabel63.Font.Style := [fsBold];\r\n WebLabel63.HeightStyle := ssAuto;\r\n WebLabel63.HeightPercent := 100.000000000000000000;\r\n WebLabel63.ParentFont := False;\r\n WebLabel63.WidthStyle := ssAuto;\r\n WebLabel63.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel63, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel63, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel63, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel63, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton59.SetParentComponent(WebPanel52);\r\n WebSpeedButton59.Name := 'WebSpeedButton59';\r\n WebSpeedButton59.Left := 0;\r\n WebSpeedButton59.Top := 0;\r\n WebSpeedButton59.Width := 24;\r\n WebSpeedButton59.Height := 28;\r\n WebSpeedButton59.Cursor := crHandPoint;\r\n WebSpeedButton59.Hint := 'Edit';\r\n WebSpeedButton59.Align := alLeft;\r\n WebSpeedButton59.Color := clNone;\r\n WebSpeedButton59.Flat := True;\r\n WebSpeedButton59.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton59.Font.Color := clBlack;\r\n WebSpeedButton59.Font.Height := -13;\r\n WebSpeedButton59.Font.Name := 'Tahoma';\r\n WebSpeedButton59.Font.Style := [];\r\n WebSpeedButton59.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton59.MaterialGlyph := 'edit';\r\n WebSpeedButton59.ParentFont := False;\r\n WebSpeedButton59.ShowHint := True;\r\n WebSpeedButton59.TabOrder := 0;\r\n WebSpeedButton59.Visible := False;\r\n WebSpeedButton59.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton59, Self, 'OnClick', '_BlockCallPickForm');\r\n M43.SetParentComponent(B43);\r\n M43.Name := 'M43';\r\n M43.Left := 0;\r\n M43.Top := 56;\r\n M43.Width := 100;\r\n M43.Height := 24;\r\n M43.Align := alBottom;\r\n M43.BorderStyle := bsNone;\r\n M43.ElementClassName := 'block_memo';\r\n M43.ElementFont := efCSS;\r\n M43.Font.Charset := ANSI_CHARSET;\r\n M43.Font.Color := clBlack;\r\n M43.Font.Height := -13;\r\n M43.Font.Name := 'Tahoma';\r\n M43.Font.Style := [];\r\n M43.HeightPercent := 100.000000000000000000;\r\n M43.ParentFont := False;\r\n M43.SelLength := 0;\r\n M43.SelStart := 0;\r\n M43.ShowFocus := False;\r\n M43.WidthPercent := 100.000000000000000000;\r\n SetEvent(M43, Self, 'OnChange', 'M21Change');\r\n SetEvent(M43, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M43, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M43, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M43, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M43, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M43, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer50.SetParentComponent(B43);\r\n WebHTMLContainer50.Name := 'WebHTMLContainer50';\r\n WebHTMLContainer50.Left := 0;\r\n WebHTMLContainer50.Top := 41;\r\n WebHTMLContainer50.Width := 100;\r\n WebHTMLContainer50.Height := 15;\r\n WebHTMLContainer50.HeightStyle := ssAuto;\r\n WebHTMLContainer50.Align := alBottom;\r\n WebHTMLContainer50.ChildOrder := 2;\r\n WebHTMLContainer50.Visible := False;\r\n SetEvent(WebHTMLContainer50, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer50, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer50, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B44.SetParentComponent(SubForm_DIV);\r\n B44.Name := 'B44';\r\n B44.Left := 419;\r\n B44.Top := 626;\r\n B44.Width := 100;\r\n B44.Height := 80;\r\n B44.ElementClassName := 'data_block';\r\n B44.BorderColor := clWhite;\r\n B44.ChildOrder := 44;\r\n B44.Color := clWhite;\r\n B44.ElementFont := efCSS;\r\n B44.Font.Charset := ANSI_CHARSET;\r\n B44.Font.Color := clBlack;\r\n B44.Font.Height := -13;\r\n B44.Font.Name := 'Tahoma';\r\n B44.Font.Style := [];\r\n B44.ParentFont := False;\r\n B44.TabOrder := 54;\r\n SetEvent(B44, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B44, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel54.SetParentComponent(B44);\r\n WebPanel54.Name := 'WebPanel54';\r\n WebPanel54.Left := 0;\r\n WebPanel54.Top := 0;\r\n WebPanel54.Width := 100;\r\n WebPanel54.Height := 28;\r\n WebPanel54.ElementClassName := 'block_top';\r\n WebPanel54.Align := alTop;\r\n WebPanel54.BorderStyle := bsNone;\r\n WebPanel54.ChildOrder := 2;\r\n WebPanel54.Color := clWhite;\r\n WebPanel54.DragMode := dmAutomatic;\r\n WebPanel54.ElementFont := efCSS;\r\n WebPanel54.TabOrder := 0;\r\n SetEvent(WebPanel54, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel54, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel54, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel54, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel64.SetParentComponent(WebPanel54);\r\n WebLabel64.Name := 'WebLabel64';\r\n WebLabel64.Left := 24;\r\n WebLabel64.Top := 0;\r\n WebLabel64.Width := 22;\r\n WebLabel64.Height := 26;\r\n WebLabel64.Cursor := crHandPoint;\r\n WebLabel64.Hint := 'Setting Unit';\r\n WebLabel64.Align := alLeft;\r\n WebLabel64.Caption := '44';\r\n WebLabel64.DragMode := dmAutomatic;\r\n WebLabel64.ElementClassName := 'block_title';\r\n WebLabel64.ElementLabelClassName := 'block_title';\r\n WebLabel64.ElementFont := efCSS;\r\n WebLabel64.Font.Charset := ANSI_CHARSET;\r\n WebLabel64.Font.Color := clNavy;\r\n WebLabel64.Font.Height := -19;\r\n WebLabel64.Font.Name := 'Segoe UI Emoji';\r\n WebLabel64.Font.Style := [fsBold];\r\n WebLabel64.HeightStyle := ssAuto;\r\n WebLabel64.HeightPercent := 100.000000000000000000;\r\n WebLabel64.ParentFont := False;\r\n WebLabel64.WidthStyle := ssAuto;\r\n WebLabel64.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel64, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel64, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel64, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel64, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton60.SetParentComponent(WebPanel54);\r\n WebSpeedButton60.Name := 'WebSpeedButton60';\r\n WebSpeedButton60.Left := 0;\r\n WebSpeedButton60.Top := 0;\r\n WebSpeedButton60.Width := 24;\r\n WebSpeedButton60.Height := 28;\r\n WebSpeedButton60.Cursor := crHandPoint;\r\n WebSpeedButton60.Hint := 'Edit';\r\n WebSpeedButton60.Align := alLeft;\r\n WebSpeedButton60.Color := clNone;\r\n WebSpeedButton60.Flat := True;\r\n WebSpeedButton60.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton60.Font.Color := clBlack;\r\n WebSpeedButton60.Font.Height := -13;\r\n WebSpeedButton60.Font.Name := 'Tahoma';\r\n WebSpeedButton60.Font.Style := [];\r\n WebSpeedButton60.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton60.MaterialGlyph := 'edit';\r\n WebSpeedButton60.ParentFont := False;\r\n WebSpeedButton60.ShowHint := True;\r\n WebSpeedButton60.TabOrder := 0;\r\n WebSpeedButton60.Visible := False;\r\n WebSpeedButton60.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton60, Self, 'OnClick', '_BlockCallPickForm');\r\n M44.SetParentComponent(B44);\r\n M44.Name := 'M44';\r\n M44.Left := 0;\r\n M44.Top := 56;\r\n M44.Width := 100;\r\n M44.Height := 24;\r\n M44.Align := alBottom;\r\n M44.BorderStyle := bsNone;\r\n M44.ElementClassName := 'block_memo';\r\n M44.ElementFont := efCSS;\r\n M44.Font.Charset := ANSI_CHARSET;\r\n M44.Font.Color := clBlack;\r\n M44.Font.Height := -13;\r\n M44.Font.Name := 'Tahoma';\r\n M44.Font.Style := [];\r\n M44.HeightPercent := 100.000000000000000000;\r\n M44.ParentFont := False;\r\n M44.SelLength := 0;\r\n M44.SelStart := 0;\r\n M44.ShowFocus := False;\r\n M44.WidthPercent := 100.000000000000000000;\r\n SetEvent(M44, Self, 'OnChange', 'M21Change');\r\n SetEvent(M44, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M44, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M44, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M44, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M44, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M44, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer51.SetParentComponent(B44);\r\n WebHTMLContainer51.Name := 'WebHTMLContainer51';\r\n WebHTMLContainer51.Left := 0;\r\n WebHTMLContainer51.Top := 41;\r\n WebHTMLContainer51.Width := 100;\r\n WebHTMLContainer51.Height := 15;\r\n WebHTMLContainer51.HeightStyle := ssAuto;\r\n WebHTMLContainer51.Align := alBottom;\r\n WebHTMLContainer51.ChildOrder := 2;\r\n WebHTMLContainer51.Visible := False;\r\n SetEvent(WebHTMLContainer51, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer51, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer51, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B45.SetParentComponent(SubForm_DIV);\r\n B45.Name := 'B45';\r\n B45.Left := 540;\r\n B45.Top := 626;\r\n B45.Width := 100;\r\n B45.Height := 80;\r\n B45.ElementClassName := 'data_block';\r\n B45.BorderColor := clWhite;\r\n B45.ChildOrder := 45;\r\n B45.Color := clWhite;\r\n B45.ElementFont := efCSS;\r\n B45.Font.Charset := ANSI_CHARSET;\r\n B45.Font.Color := clBlack;\r\n B45.Font.Height := -13;\r\n B45.Font.Name := 'Tahoma';\r\n B45.Font.Style := [];\r\n B45.ParentFont := False;\r\n B45.TabOrder := 55;\r\n SetEvent(B45, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B45, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel56.SetParentComponent(B45);\r\n WebPanel56.Name := 'WebPanel56';\r\n WebPanel56.Left := 0;\r\n WebPanel56.Top := 0;\r\n WebPanel56.Width := 100;\r\n WebPanel56.Height := 28;\r\n WebPanel56.ElementClassName := 'block_top';\r\n WebPanel56.HeightStyle := ssAuto;\r\n WebPanel56.Align := alTop;\r\n WebPanel56.BorderStyle := bsNone;\r\n WebPanel56.ChildOrder := 2;\r\n WebPanel56.Color := clWhite;\r\n WebPanel56.DragMode := dmAutomatic;\r\n WebPanel56.ElementFont := efCSS;\r\n WebPanel56.TabOrder := 0;\r\n SetEvent(WebPanel56, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel56, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel56, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel56, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel65.SetParentComponent(WebPanel56);\r\n WebLabel65.Name := 'WebLabel65';\r\n WebLabel65.Left := 24;\r\n WebLabel65.Top := 0;\r\n WebLabel65.Width := 22;\r\n WebLabel65.Height := 26;\r\n WebLabel65.Cursor := crHandPoint;\r\n WebLabel65.Hint := 'Setting Unit';\r\n WebLabel65.Align := alLeft;\r\n WebLabel65.Caption := '45';\r\n WebLabel65.DragMode := dmAutomatic;\r\n WebLabel65.ElementClassName := 'block_title';\r\n WebLabel65.ElementLabelClassName := 'block_title';\r\n WebLabel65.ElementFont := efCSS;\r\n WebLabel65.Font.Charset := ANSI_CHARSET;\r\n WebLabel65.Font.Color := clNavy;\r\n WebLabel65.Font.Height := -19;\r\n WebLabel65.Font.Name := 'Segoe UI Emoji';\r\n WebLabel65.Font.Style := [fsBold];\r\n WebLabel65.HeightPercent := 100.000000000000000000;\r\n WebLabel65.ParentFont := False;\r\n WebLabel65.WidthStyle := ssAuto;\r\n WebLabel65.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel65, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel65, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel65, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel65, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton61.SetParentComponent(WebPanel56);\r\n WebSpeedButton61.Name := 'WebSpeedButton61';\r\n WebSpeedButton61.Left := 0;\r\n WebSpeedButton61.Top := 0;\r\n WebSpeedButton61.Width := 24;\r\n WebSpeedButton61.Height := 28;\r\n WebSpeedButton61.Cursor := crHandPoint;\r\n WebSpeedButton61.Hint := 'Edit';\r\n WebSpeedButton61.Align := alLeft;\r\n WebSpeedButton61.Color := clNone;\r\n WebSpeedButton61.Flat := True;\r\n WebSpeedButton61.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton61.Font.Color := clBlack;\r\n WebSpeedButton61.Font.Height := -13;\r\n WebSpeedButton61.Font.Name := 'Tahoma';\r\n WebSpeedButton61.Font.Style := [];\r\n WebSpeedButton61.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton61.MaterialGlyph := 'edit';\r\n WebSpeedButton61.ParentFont := False;\r\n WebSpeedButton61.ShowHint := True;\r\n WebSpeedButton61.TabOrder := 0;\r\n WebSpeedButton61.Visible := False;\r\n WebSpeedButton61.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton61, Self, 'OnClick', '_BlockCallPickForm');\r\n M45.SetParentComponent(B45);\r\n M45.Name := 'M45';\r\n M45.Left := 0;\r\n M45.Top := 56;\r\n M45.Width := 100;\r\n M45.Height := 24;\r\n M45.Align := alBottom;\r\n M45.BorderStyle := bsNone;\r\n M45.ElementClassName := 'block_memo';\r\n M45.ElementFont := efCSS;\r\n M45.Font.Charset := ANSI_CHARSET;\r\n M45.Font.Color := clBlack;\r\n M45.Font.Height := -13;\r\n M45.Font.Name := 'Tahoma';\r\n M45.Font.Style := [];\r\n M45.HeightPercent := 100.000000000000000000;\r\n M45.ParentFont := False;\r\n M45.SelLength := 0;\r\n M45.SelStart := 0;\r\n M45.ShowFocus := False;\r\n M45.WidthPercent := 100.000000000000000000;\r\n SetEvent(M45, Self, 'OnChange', 'M21Change');\r\n SetEvent(M45, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M45, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M45, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M45, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M45, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M45, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer52.SetParentComponent(B45);\r\n WebHTMLContainer52.Name := 'WebHTMLContainer52';\r\n WebHTMLContainer52.Left := 0;\r\n WebHTMLContainer52.Top := 38;\r\n WebHTMLContainer52.Width := 100;\r\n WebHTMLContainer52.Height := 18;\r\n WebHTMLContainer52.HeightStyle := ssAuto;\r\n WebHTMLContainer52.Align := alBottom;\r\n WebHTMLContainer52.ChildOrder := 2;\r\n WebHTMLContainer52.Visible := False;\r\n SetEvent(WebHTMLContainer52, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer52, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer52, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B46.SetParentComponent(SubForm_DIV);\r\n B46.Name := 'B46';\r\n B46.Left := 57;\r\n B46.Top := 712;\r\n B46.Width := 100;\r\n B46.Height := 80;\r\n B46.ElementClassName := 'data_block';\r\n B46.BorderColor := clWhite;\r\n B46.ChildOrder := 46;\r\n B46.Color := clWhite;\r\n B46.ElementFont := efCSS;\r\n B46.Font.Charset := ANSI_CHARSET;\r\n B46.Font.Color := clBlack;\r\n B46.Font.Height := -13;\r\n B46.Font.Name := 'Tahoma';\r\n B46.Font.Style := [];\r\n B46.ParentFont := False;\r\n B46.TabOrder := 56;\r\n SetEvent(B46, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B46, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel58.SetParentComponent(B46);\r\n WebPanel58.Name := 'WebPanel58';\r\n WebPanel58.Left := 0;\r\n WebPanel58.Top := 0;\r\n WebPanel58.Width := 100;\r\n WebPanel58.Height := 28;\r\n WebPanel58.ElementClassName := 'block_top';\r\n WebPanel58.HeightStyle := ssAuto;\r\n WebPanel58.Align := alTop;\r\n WebPanel58.BorderStyle := bsNone;\r\n WebPanel58.ChildOrder := 2;\r\n WebPanel58.Color := clWhite;\r\n WebPanel58.DragMode := dmAutomatic;\r\n WebPanel58.ElementFont := efCSS;\r\n WebPanel58.TabOrder := 0;\r\n SetEvent(WebPanel58, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel58, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel58, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel58, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel66.SetParentComponent(WebPanel58);\r\n WebLabel66.Name := 'WebLabel66';\r\n WebLabel66.Left := 24;\r\n WebLabel66.Top := 0;\r\n WebLabel66.Width := 22;\r\n WebLabel66.Height := 26;\r\n WebLabel66.Cursor := crHandPoint;\r\n WebLabel66.Hint := 'Setting Unit';\r\n WebLabel66.Align := alLeft;\r\n WebLabel66.Caption := '46';\r\n WebLabel66.DragMode := dmAutomatic;\r\n WebLabel66.ElementClassName := 'block_title';\r\n WebLabel66.ElementLabelClassName := 'block_title';\r\n WebLabel66.ElementFont := efCSS;\r\n WebLabel66.Font.Charset := ANSI_CHARSET;\r\n WebLabel66.Font.Color := clNavy;\r\n WebLabel66.Font.Height := -19;\r\n WebLabel66.Font.Name := 'Segoe UI Emoji';\r\n WebLabel66.Font.Style := [fsBold];\r\n WebLabel66.HeightPercent := 100.000000000000000000;\r\n WebLabel66.ParentFont := False;\r\n WebLabel66.WidthStyle := ssAuto;\r\n WebLabel66.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel66, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel66, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel66, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel66, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton62.SetParentComponent(WebPanel58);\r\n WebSpeedButton62.Name := 'WebSpeedButton62';\r\n WebSpeedButton62.Left := 0;\r\n WebSpeedButton62.Top := 0;\r\n WebSpeedButton62.Width := 24;\r\n WebSpeedButton62.Height := 28;\r\n WebSpeedButton62.Cursor := crHandPoint;\r\n WebSpeedButton62.Hint := 'Edit';\r\n WebSpeedButton62.Align := alLeft;\r\n WebSpeedButton62.Color := clNone;\r\n WebSpeedButton62.Flat := True;\r\n WebSpeedButton62.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton62.Font.Color := clBlack;\r\n WebSpeedButton62.Font.Height := -13;\r\n WebSpeedButton62.Font.Name := 'Tahoma';\r\n WebSpeedButton62.Font.Style := [];\r\n WebSpeedButton62.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton62.MaterialGlyph := 'edit';\r\n WebSpeedButton62.ParentFont := False;\r\n WebSpeedButton62.ShowHint := True;\r\n WebSpeedButton62.TabOrder := 0;\r\n WebSpeedButton62.Visible := False;\r\n WebSpeedButton62.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton62, Self, 'OnClick', '_BlockCallPickForm');\r\n M46.SetParentComponent(B46);\r\n M46.Name := 'M46';\r\n M46.Left := 0;\r\n M46.Top := 56;\r\n M46.Width := 100;\r\n M46.Height := 24;\r\n M46.Align := alBottom;\r\n M46.BorderStyle := bsNone;\r\n M46.ElementClassName := 'block_memo';\r\n M46.ElementFont := efCSS;\r\n M46.Font.Charset := ANSI_CHARSET;\r\n M46.Font.Color := clBlack;\r\n M46.Font.Height := -13;\r\n M46.Font.Name := 'Tahoma';\r\n M46.Font.Style := [];\r\n M46.HeightPercent := 100.000000000000000000;\r\n M46.ParentFont := False;\r\n M46.SelLength := 0;\r\n M46.SelStart := 0;\r\n M46.ShowFocus := False;\r\n M46.WidthPercent := 100.000000000000000000;\r\n SetEvent(M46, Self, 'OnChange', 'M21Change');\r\n SetEvent(M46, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M46, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M46, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M46, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M46, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M46, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer53.SetParentComponent(B46);\r\n WebHTMLContainer53.Name := 'WebHTMLContainer53';\r\n WebHTMLContainer53.Left := 0;\r\n WebHTMLContainer53.Top := 41;\r\n WebHTMLContainer53.Width := 100;\r\n WebHTMLContainer53.Height := 15;\r\n WebHTMLContainer53.HeightStyle := ssAuto;\r\n WebHTMLContainer53.Align := alBottom;\r\n WebHTMLContainer53.ChildOrder := 2;\r\n WebHTMLContainer53.Visible := False;\r\n SetEvent(WebHTMLContainer53, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer53, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer53, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B47.SetParentComponent(SubForm_DIV);\r\n B47.Name := 'B47';\r\n B47.Left := 178;\r\n B47.Top := 712;\r\n B47.Width := 100;\r\n B47.Height := 80;\r\n B47.ElementClassName := 'data_block';\r\n B47.BorderColor := clWhite;\r\n B47.ChildOrder := 47;\r\n B47.Color := clWhite;\r\n B47.ElementFont := efCSS;\r\n B47.Font.Charset := ANSI_CHARSET;\r\n B47.Font.Color := clBlack;\r\n B47.Font.Height := -13;\r\n B47.Font.Name := 'Tahoma';\r\n B47.Font.Style := [];\r\n B47.ParentFont := False;\r\n B47.TabOrder := 57;\r\n SetEvent(B47, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B47, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel60.SetParentComponent(B47);\r\n WebPanel60.Name := 'WebPanel60';\r\n WebPanel60.Left := 0;\r\n WebPanel60.Top := 0;\r\n WebPanel60.Width := 100;\r\n WebPanel60.Height := 28;\r\n WebPanel60.ElementClassName := 'block_top';\r\n WebPanel60.HeightStyle := ssAuto;\r\n WebPanel60.Align := alTop;\r\n WebPanel60.BorderStyle := bsNone;\r\n WebPanel60.ChildOrder := 2;\r\n WebPanel60.Color := clWhite;\r\n WebPanel60.DragMode := dmAutomatic;\r\n WebPanel60.ElementFont := efCSS;\r\n WebPanel60.TabOrder := 0;\r\n SetEvent(WebPanel60, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel60, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel60, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel60, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel67.SetParentComponent(WebPanel60);\r\n WebLabel67.Name := 'WebLabel67';\r\n WebLabel67.Left := 24;\r\n WebLabel67.Top := 0;\r\n WebLabel67.Width := 22;\r\n WebLabel67.Height := 26;\r\n WebLabel67.Cursor := crHandPoint;\r\n WebLabel67.Hint := 'Setting Unit';\r\n WebLabel67.Align := alLeft;\r\n WebLabel67.Caption := '47';\r\n WebLabel67.DragMode := dmAutomatic;\r\n WebLabel67.ElementClassName := 'block_title';\r\n WebLabel67.ElementLabelClassName := 'block_title';\r\n WebLabel67.ElementFont := efCSS;\r\n WebLabel67.Font.Charset := ANSI_CHARSET;\r\n WebLabel67.Font.Color := clNavy;\r\n WebLabel67.Font.Height := -19;\r\n WebLabel67.Font.Name := 'Segoe UI Emoji';\r\n WebLabel67.Font.Style := [fsBold];\r\n WebLabel67.HeightPercent := 100.000000000000000000;\r\n WebLabel67.ParentFont := False;\r\n WebLabel67.WidthStyle := ssAuto;\r\n WebLabel67.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel67, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel67, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel67, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel67, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton63.SetParentComponent(WebPanel60);\r\n WebSpeedButton63.Name := 'WebSpeedButton63';\r\n WebSpeedButton63.Left := 0;\r\n WebSpeedButton63.Top := 0;\r\n WebSpeedButton63.Width := 24;\r\n WebSpeedButton63.Height := 28;\r\n WebSpeedButton63.Cursor := crHandPoint;\r\n WebSpeedButton63.Hint := 'Edit';\r\n WebSpeedButton63.Align := alLeft;\r\n WebSpeedButton63.Color := clNone;\r\n WebSpeedButton63.Flat := True;\r\n WebSpeedButton63.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton63.Font.Color := clBlack;\r\n WebSpeedButton63.Font.Height := -13;\r\n WebSpeedButton63.Font.Name := 'Tahoma';\r\n WebSpeedButton63.Font.Style := [];\r\n WebSpeedButton63.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton63.MaterialGlyph := 'edit';\r\n WebSpeedButton63.ParentFont := False;\r\n WebSpeedButton63.ShowHint := True;\r\n WebSpeedButton63.TabOrder := 0;\r\n WebSpeedButton63.Visible := False;\r\n WebSpeedButton63.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton63, Self, 'OnClick', '_BlockCallPickForm');\r\n M47.SetParentComponent(B47);\r\n M47.Name := 'M47';\r\n M47.Left := 0;\r\n M47.Top := 56;\r\n M47.Width := 100;\r\n M47.Height := 24;\r\n M47.Align := alBottom;\r\n M47.BorderStyle := bsNone;\r\n M47.ElementClassName := 'block_memo';\r\n M47.ElementFont := efCSS;\r\n M47.Font.Charset := ANSI_CHARSET;\r\n M47.Font.Color := clBlack;\r\n M47.Font.Height := -13;\r\n M47.Font.Name := 'Tahoma';\r\n M47.Font.Style := [];\r\n M47.HeightPercent := 100.000000000000000000;\r\n M47.ParentFont := False;\r\n M47.SelLength := 0;\r\n M47.SelStart := 0;\r\n M47.ShowFocus := False;\r\n M47.WidthPercent := 100.000000000000000000;\r\n SetEvent(M47, Self, 'OnChange', 'M21Change');\r\n SetEvent(M47, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M47, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M47, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M47, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M47, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M47, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer54.SetParentComponent(B47);\r\n WebHTMLContainer54.Name := 'WebHTMLContainer54';\r\n WebHTMLContainer54.Left := 0;\r\n WebHTMLContainer54.Top := 41;\r\n WebHTMLContainer54.Width := 100;\r\n WebHTMLContainer54.Height := 15;\r\n WebHTMLContainer54.HeightStyle := ssAuto;\r\n WebHTMLContainer54.Align := alBottom;\r\n WebHTMLContainer54.ChildOrder := 2;\r\n WebHTMLContainer54.Visible := False;\r\n SetEvent(WebHTMLContainer54, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer54, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer54, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B48.SetParentComponent(SubForm_DIV);\r\n B48.Name := 'B48';\r\n B48.Left := 298;\r\n B48.Top := 712;\r\n B48.Width := 100;\r\n B48.Height := 80;\r\n B48.ElementClassName := 'data_block';\r\n B48.BorderColor := clWhite;\r\n B48.ChildOrder := 48;\r\n B48.Color := clWhite;\r\n B48.ElementFont := efCSS;\r\n B48.Font.Charset := ANSI_CHARSET;\r\n B48.Font.Color := clBlack;\r\n B48.Font.Height := -13;\r\n B48.Font.Name := 'Tahoma';\r\n B48.Font.Style := [];\r\n B48.ParentFont := False;\r\n B48.TabOrder := 58;\r\n SetEvent(B48, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B48, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel62.SetParentComponent(B48);\r\n WebPanel62.Name := 'WebPanel62';\r\n WebPanel62.Left := 0;\r\n WebPanel62.Top := 0;\r\n WebPanel62.Width := 100;\r\n WebPanel62.Height := 28;\r\n WebPanel62.ElementClassName := 'block_top';\r\n WebPanel62.HeightStyle := ssAuto;\r\n WebPanel62.Align := alTop;\r\n WebPanel62.BorderStyle := bsNone;\r\n WebPanel62.ChildOrder := 2;\r\n WebPanel62.Color := clWhite;\r\n WebPanel62.DragMode := dmAutomatic;\r\n WebPanel62.ElementFont := efCSS;\r\n WebPanel62.TabOrder := 0;\r\n SetEvent(WebPanel62, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel62, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel62, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel62, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel68.SetParentComponent(WebPanel62);\r\n WebLabel68.Name := 'WebLabel68';\r\n WebLabel68.Left := 24;\r\n WebLabel68.Top := 0;\r\n WebLabel68.Width := 22;\r\n WebLabel68.Height := 26;\r\n WebLabel68.Cursor := crHandPoint;\r\n WebLabel68.Hint := 'Setting Unit';\r\n WebLabel68.Align := alLeft;\r\n WebLabel68.Caption := '48';\r\n WebLabel68.DragMode := dmAutomatic;\r\n WebLabel68.ElementClassName := 'block_title';\r\n WebLabel68.ElementLabelClassName := 'block_title';\r\n WebLabel68.ElementFont := efCSS;\r\n WebLabel68.Font.Charset := ANSI_CHARSET;\r\n WebLabel68.Font.Color := clNavy;\r\n WebLabel68.Font.Height := -19;\r\n WebLabel68.Font.Name := 'Segoe UI Emoji';\r\n WebLabel68.Font.Style := [fsBold];\r\n WebLabel68.HeightPercent := 100.000000000000000000;\r\n WebLabel68.ParentFont := False;\r\n WebLabel68.WidthStyle := ssAuto;\r\n WebLabel68.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel68, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel68, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel68, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel68, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton64.SetParentComponent(WebPanel62);\r\n WebSpeedButton64.Name := 'WebSpeedButton64';\r\n WebSpeedButton64.Left := 0;\r\n WebSpeedButton64.Top := 0;\r\n WebSpeedButton64.Width := 24;\r\n WebSpeedButton64.Height := 28;\r\n WebSpeedButton64.Cursor := crHandPoint;\r\n WebSpeedButton64.Hint := 'Edit';\r\n WebSpeedButton64.Align := alLeft;\r\n WebSpeedButton64.Color := clNone;\r\n WebSpeedButton64.Flat := True;\r\n WebSpeedButton64.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton64.Font.Color := clBlack;\r\n WebSpeedButton64.Font.Height := -13;\r\n WebSpeedButton64.Font.Name := 'Tahoma';\r\n WebSpeedButton64.Font.Style := [];\r\n WebSpeedButton64.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton64.MaterialGlyph := 'edit';\r\n WebSpeedButton64.ParentFont := False;\r\n WebSpeedButton64.ShowHint := True;\r\n WebSpeedButton64.TabOrder := 0;\r\n WebSpeedButton64.Visible := False;\r\n WebSpeedButton64.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton64, Self, 'OnClick', '_BlockCallPickForm');\r\n M48.SetParentComponent(B48);\r\n M48.Name := 'M48';\r\n M48.Left := 0;\r\n M48.Top := 56;\r\n M48.Width := 100;\r\n M48.Height := 24;\r\n M48.Align := alBottom;\r\n M48.BorderStyle := bsNone;\r\n M48.ElementClassName := 'block_memo';\r\n M48.ElementFont := efCSS;\r\n M48.Font.Charset := ANSI_CHARSET;\r\n M48.Font.Color := clBlack;\r\n M48.Font.Height := -13;\r\n M48.Font.Name := 'Tahoma';\r\n M48.Font.Style := [];\r\n M48.HeightPercent := 100.000000000000000000;\r\n M48.ParentFont := False;\r\n M48.SelLength := 0;\r\n M48.SelStart := 0;\r\n M48.ShowFocus := False;\r\n M48.WidthPercent := 100.000000000000000000;\r\n SetEvent(M48, Self, 'OnChange', 'M21Change');\r\n SetEvent(M48, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M48, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M48, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M48, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M48, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M48, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer55.SetParentComponent(B48);\r\n WebHTMLContainer55.Name := 'WebHTMLContainer55';\r\n WebHTMLContainer55.Left := 0;\r\n WebHTMLContainer55.Top := 41;\r\n WebHTMLContainer55.Width := 100;\r\n WebHTMLContainer55.Height := 15;\r\n WebHTMLContainer55.HeightStyle := ssAuto;\r\n WebHTMLContainer55.Align := alBottom;\r\n WebHTMLContainer55.ChildOrder := 2;\r\n WebHTMLContainer55.Visible := False;\r\n SetEvent(WebHTMLContainer55, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer55, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer55, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B49.SetParentComponent(SubForm_DIV);\r\n B49.Name := 'B49';\r\n B49.Left := 419;\r\n B49.Top := 712;\r\n B49.Width := 100;\r\n B49.Height := 80;\r\n B49.ElementClassName := 'data_block';\r\n B49.BorderColor := clWhite;\r\n B49.ChildOrder := 49;\r\n B49.Color := clWhite;\r\n B49.ElementFont := efCSS;\r\n B49.Font.Charset := ANSI_CHARSET;\r\n B49.Font.Color := clBlack;\r\n B49.Font.Height := -13;\r\n B49.Font.Name := 'Tahoma';\r\n B49.Font.Style := [];\r\n B49.ParentFont := False;\r\n B49.TabOrder := 59;\r\n SetEvent(B49, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B49, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel64.SetParentComponent(B49);\r\n WebPanel64.Name := 'WebPanel64';\r\n WebPanel64.Left := 0;\r\n WebPanel64.Top := 0;\r\n WebPanel64.Width := 100;\r\n WebPanel64.Height := 28;\r\n WebPanel64.ElementClassName := 'block_top';\r\n WebPanel64.HeightStyle := ssAuto;\r\n WebPanel64.Align := alTop;\r\n WebPanel64.BorderStyle := bsNone;\r\n WebPanel64.ChildOrder := 2;\r\n WebPanel64.Color := clWhite;\r\n WebPanel64.DragMode := dmAutomatic;\r\n WebPanel64.ElementFont := efCSS;\r\n WebPanel64.TabOrder := 0;\r\n SetEvent(WebPanel64, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel64, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel64, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel64, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel69.SetParentComponent(WebPanel64);\r\n WebLabel69.Name := 'WebLabel69';\r\n WebLabel69.Left := 24;\r\n WebLabel69.Top := 0;\r\n WebLabel69.Width := 22;\r\n WebLabel69.Height := 26;\r\n WebLabel69.Cursor := crHandPoint;\r\n WebLabel69.Hint := 'Setting Unit';\r\n WebLabel69.Align := alLeft;\r\n WebLabel69.Caption := '49';\r\n WebLabel69.DragMode := dmAutomatic;\r\n WebLabel69.ElementClassName := 'block_title';\r\n WebLabel69.ElementLabelClassName := 'block_title';\r\n WebLabel69.ElementFont := efCSS;\r\n WebLabel69.Font.Charset := ANSI_CHARSET;\r\n WebLabel69.Font.Color := clNavy;\r\n WebLabel69.Font.Height := -19;\r\n WebLabel69.Font.Name := 'Segoe UI Emoji';\r\n WebLabel69.Font.Style := [fsBold];\r\n WebLabel69.HeightPercent := 100.000000000000000000;\r\n WebLabel69.ParentFont := False;\r\n WebLabel69.WidthStyle := ssAuto;\r\n WebLabel69.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel69, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel69, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel69, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel69, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton65.SetParentComponent(WebPanel64);\r\n WebSpeedButton65.Name := 'WebSpeedButton65';\r\n WebSpeedButton65.Left := 0;\r\n WebSpeedButton65.Top := 0;\r\n WebSpeedButton65.Width := 24;\r\n WebSpeedButton65.Height := 28;\r\n WebSpeedButton65.Cursor := crHandPoint;\r\n WebSpeedButton65.Hint := 'Edit';\r\n WebSpeedButton65.Align := alLeft;\r\n WebSpeedButton65.Color := clNone;\r\n WebSpeedButton65.Flat := True;\r\n WebSpeedButton65.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton65.Font.Color := clBlack;\r\n WebSpeedButton65.Font.Height := -13;\r\n WebSpeedButton65.Font.Name := 'Tahoma';\r\n WebSpeedButton65.Font.Style := [];\r\n WebSpeedButton65.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton65.MaterialGlyph := 'edit';\r\n WebSpeedButton65.ParentFont := False;\r\n WebSpeedButton65.ShowHint := True;\r\n WebSpeedButton65.TabOrder := 0;\r\n WebSpeedButton65.Visible := False;\r\n WebSpeedButton65.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton65, Self, 'OnClick', '_BlockCallPickForm');\r\n M49.SetParentComponent(B49);\r\n M49.Name := 'M49';\r\n M49.Left := 0;\r\n M49.Top := 56;\r\n M49.Width := 100;\r\n M49.Height := 24;\r\n M49.Align := alBottom;\r\n M49.BorderStyle := bsNone;\r\n M49.ElementClassName := 'block_memo';\r\n M49.ElementFont := efCSS;\r\n M49.Font.Charset := ANSI_CHARSET;\r\n M49.Font.Color := clBlack;\r\n M49.Font.Height := -13;\r\n M49.Font.Name := 'Tahoma';\r\n M49.Font.Style := [];\r\n M49.HeightPercent := 100.000000000000000000;\r\n M49.ParentFont := False;\r\n M49.SelLength := 0;\r\n M49.SelStart := 0;\r\n M49.ShowFocus := False;\r\n M49.WidthPercent := 100.000000000000000000;\r\n SetEvent(M49, Self, 'OnChange', 'M21Change');\r\n SetEvent(M49, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M49, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M49, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M49, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M49, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M49, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer56.SetParentComponent(B49);\r\n WebHTMLContainer56.Name := 'WebHTMLContainer56';\r\n WebHTMLContainer56.Left := 0;\r\n WebHTMLContainer56.Top := 41;\r\n WebHTMLContainer56.Width := 100;\r\n WebHTMLContainer56.Height := 15;\r\n WebHTMLContainer56.HeightStyle := ssAuto;\r\n WebHTMLContainer56.Align := alBottom;\r\n WebHTMLContainer56.ChildOrder := 2;\r\n WebHTMLContainer56.Visible := False;\r\n SetEvent(WebHTMLContainer56, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer56, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer56, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n B50.SetParentComponent(SubForm_DIV);\r\n B50.Name := 'B50';\r\n B50.Left := 540;\r\n B50.Top := 712;\r\n B50.Width := 100;\r\n B50.Height := 80;\r\n B50.ElementClassName := 'data_block';\r\n B50.BorderColor := clWhite;\r\n B50.ChildOrder := 50;\r\n B50.Color := clWhite;\r\n B50.ElementFont := efCSS;\r\n B50.Font.Charset := ANSI_CHARSET;\r\n B50.Font.Color := clBlack;\r\n B50.Font.Height := -13;\r\n B50.Font.Name := 'Tahoma';\r\n B50.Font.Style := [];\r\n B50.ParentFont := False;\r\n B50.TabOrder := 60;\r\n SetEvent(B50, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B50, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel66.SetParentComponent(B50);\r\n WebPanel66.Name := 'WebPanel66';\r\n WebPanel66.Left := 0;\r\n WebPanel66.Top := 0;\r\n WebPanel66.Width := 100;\r\n WebPanel66.Height := 28;\r\n WebPanel66.ElementClassName := 'block_top';\r\n WebPanel66.HeightStyle := ssAuto;\r\n WebPanel66.Align := alTop;\r\n WebPanel66.BorderStyle := bsNone;\r\n WebPanel66.ChildOrder := 2;\r\n WebPanel66.Color := clWhite;\r\n WebPanel66.DragMode := dmAutomatic;\r\n WebPanel66.ElementFont := efCSS;\r\n WebPanel66.TabOrder := 0;\r\n SetEvent(WebPanel66, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel66, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel66, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel66, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel70.SetParentComponent(WebPanel66);\r\n WebLabel70.Name := 'WebLabel70';\r\n WebLabel70.Left := 24;\r\n WebLabel70.Top := 0;\r\n WebLabel70.Width := 22;\r\n WebLabel70.Height := 26;\r\n WebLabel70.Cursor := crHandPoint;\r\n WebLabel70.Hint := 'Setting Unit';\r\n WebLabel70.Align := alLeft;\r\n WebLabel70.Caption := '50';\r\n WebLabel70.DragMode := dmAutomatic;\r\n WebLabel70.ElementClassName := 'block_title';\r\n WebLabel70.ElementLabelClassName := 'block_title';\r\n WebLabel70.ElementFont := efCSS;\r\n WebLabel70.Font.Charset := ANSI_CHARSET;\r\n WebLabel70.Font.Color := clNavy;\r\n WebLabel70.Font.Height := -19;\r\n WebLabel70.Font.Name := 'Segoe UI Emoji';\r\n WebLabel70.Font.Style := [fsBold];\r\n WebLabel70.HeightPercent := 100.000000000000000000;\r\n WebLabel70.ParentFont := False;\r\n WebLabel70.WidthStyle := ssAuto;\r\n WebLabel70.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel70, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel70, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel70, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel70, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton66.SetParentComponent(WebPanel66);\r\n WebSpeedButton66.Name := 'WebSpeedButton66';\r\n WebSpeedButton66.Left := 0;\r\n WebSpeedButton66.Top := 0;\r\n WebSpeedButton66.Width := 24;\r\n WebSpeedButton66.Height := 28;\r\n WebSpeedButton66.Cursor := crHandPoint;\r\n WebSpeedButton66.Hint := 'Edit';\r\n WebSpeedButton66.Align := alLeft;\r\n WebSpeedButton66.Color := clNone;\r\n WebSpeedButton66.Flat := True;\r\n WebSpeedButton66.Font.Charset := ANSI_CHARSET;\r\n WebSpeedButton66.Font.Color := clBlack;\r\n WebSpeedButton66.Font.Height := -13;\r\n WebSpeedButton66.Font.Name := 'Tahoma';\r\n WebSpeedButton66.Font.Style := [];\r\n WebSpeedButton66.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton66.MaterialGlyph := 'edit';\r\n WebSpeedButton66.ParentFont := False;\r\n WebSpeedButton66.ShowHint := True;\r\n WebSpeedButton66.TabOrder := 0;\r\n WebSpeedButton66.Visible := False;\r\n WebSpeedButton66.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton66, Self, 'OnClick', '_BlockCallPickForm');\r\n M50.SetParentComponent(B50);\r\n M50.Name := 'M50';\r\n M50.Left := 0;\r\n M50.Top := 56;\r\n M50.Width := 100;\r\n M50.Height := 24;\r\n M50.Align := alBottom;\r\n M50.BorderStyle := bsNone;\r\n M50.ElementClassName := 'block_memo';\r\n M50.ElementFont := efCSS;\r\n M50.Font.Charset := ANSI_CHARSET;\r\n M50.Font.Color := clBlack;\r\n M50.Font.Height := -13;\r\n M50.Font.Name := 'Tahoma';\r\n M50.Font.Style := [];\r\n M50.HeightPercent := 100.000000000000000000;\r\n M50.ParentFont := False;\r\n M50.SelLength := 0;\r\n M50.SelStart := 0;\r\n M50.ShowFocus := False;\r\n M50.WidthPercent := 100.000000000000000000;\r\n SetEvent(M50, Self, 'OnChange', 'M21Change');\r\n SetEvent(M50, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M50, Self, 'OnEnter', 'M1Enter');\r\n SetEvent(M50, Self, 'OnExit', 'M1Exit');\r\n SetEvent(M50, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M50, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M50, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebHTMLContainer57.SetParentComponent(B50);\r\n WebHTMLContainer57.Name := 'WebHTMLContainer57';\r\n WebHTMLContainer57.Left := 0;\r\n WebHTMLContainer57.Top := 38;\r\n WebHTMLContainer57.Width := 100;\r\n WebHTMLContainer57.Height := 18;\r\n WebHTMLContainer57.HeightStyle := ssAuto;\r\n WebHTMLContainer57.Align := alBottom;\r\n WebHTMLContainer57.ChildOrder := 2;\r\n WebHTMLContainer57.Visible := False;\r\n SetEvent(WebHTMLContainer57, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(WebHTMLContainer57, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebHTMLContainer57, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n finally\r\n WebLabel15.AfterLoadDFMValues;\r\n WebLabel13.AfterLoadDFMValues;\r\n WebLabel2.AfterLoadDFMValues;\r\n pnlBottom.AfterLoadDFMValues;\r\n tbReport.AfterLoadDFMValues;\r\n pnlFormButtons.AfterLoadDFMValues;\r\n btnCustom1.AfterLoadDFMValues;\r\n btnCustom2.AfterLoadDFMValues;\r\n btnCustom3.AfterLoadDFMValues;\r\n btnCustom4.AfterLoadDFMValues;\r\n btnCustom5.AfterLoadDFMValues;\r\n btnPost.AfterLoadDFMValues;\r\n btnAdd.AfterLoadDFMValues;\r\n btnRefresh.AfterLoadDFMValues;\r\n btnClose.AfterLoadDFMValues;\r\n btnUseDefaults.AfterLoadDFMValues;\r\n btnSaveAsDefaults.AfterLoadDFMValues;\r\n btnCustom6.AfterLoadDFMValues;\r\n btnCustom7.AfterLoadDFMValues;\r\n btnCustom8.AfterLoadDFMValues;\r\n btnCustom9.AfterLoadDFMValues;\r\n WebMemo8.AfterLoadDFMValues;\r\n btnClearBlockCustomPositioning.AfterLoadDFMValues;\r\n btnClearBlockCustomSizes.AfterLoadDFMValues;\r\n btnFixBlockPositions.AfterLoadDFMValues;\r\n pnlReportButtons.AfterLoadDFMValues;\r\n btnRefresh_RPT.AfterLoadDFMValues;\r\n btnClose_RPT.AfterLoadDFMValues;\r\n spSideDataSplitter.AfterLoadDFMValues;\r\n pnlFormCaption.AfterLoadDFMValues;\r\n pnlSideData.AfterLoadDFMValues;\r\n sbSideData.AfterLoadDFMValues;\r\n sb6.AfterLoadDFMValues;\r\n WebPanel9.AfterLoadDFMValues;\r\n WebLabel26.AfterLoadDFMValues;\r\n WebSpeedButton20.AfterLoadDFMValues;\r\n SM6.AfterLoadDFMValues;\r\n WebHTMLContainer36.AfterLoadDFMValues;\r\n sb5.AfterLoadDFMValues;\r\n WebPanel12.AfterLoadDFMValues;\r\n WebLabel27.AfterLoadDFMValues;\r\n WebSpeedButton21.AfterLoadDFMValues;\r\n SM5.AfterLoadDFMValues;\r\n WebHTMLContainer35.AfterLoadDFMValues;\r\n sb4.AfterLoadDFMValues;\r\n WebPanel22.AfterLoadDFMValues;\r\n WebLabel28.AfterLoadDFMValues;\r\n WebSpeedButton22.AfterLoadDFMValues;\r\n SM4.AfterLoadDFMValues;\r\n WebHTMLContainer34.AfterLoadDFMValues;\r\n sb3.AfterLoadDFMValues;\r\n WebPanel25.AfterLoadDFMValues;\r\n WebLabel29.AfterLoadDFMValues;\r\n WebSpeedButton23.AfterLoadDFMValues;\r\n SM3.AfterLoadDFMValues;\r\n WebHTMLContainer33.AfterLoadDFMValues;\r\n sb2.AfterLoadDFMValues;\r\n WebPanel30.AfterLoadDFMValues;\r\n WebLabel30.AfterLoadDFMValues;\r\n WebSpeedButton24.AfterLoadDFMValues;\r\n SM2.AfterLoadDFMValues;\r\n WebHTMLContainer32.AfterLoadDFMValues;\r\n sb1.AfterLoadDFMValues;\r\n WebPanel32.AfterLoadDFMValues;\r\n WebLabel31.AfterLoadDFMValues;\r\n WebSpeedButton25.AfterLoadDFMValues;\r\n SM1.AfterLoadDFMValues;\r\n WebHTMLContainer31.AfterLoadDFMValues;\r\n sb7.AfterLoadDFMValues;\r\n WebPanel34.AfterLoadDFMValues;\r\n WebLabel32.AfterLoadDFMValues;\r\n WebSpeedButton26.AfterLoadDFMValues;\r\n SM7.AfterLoadDFMValues;\r\n WebHTMLContainer37.AfterLoadDFMValues;\r\n sb101.AfterLoadDFMValues;\r\n WebPanel10.AfterLoadDFMValues;\r\n WebLabel1.AfterLoadDFMValues;\r\n WebSpeedButton67.AfterLoadDFMValues;\r\n SG1.AfterLoadDFMValues;\r\n sb102.AfterLoadDFMValues;\r\n WebPanel23.AfterLoadDFMValues;\r\n WebLabel73.AfterLoadDFMValues;\r\n WebSpeedButton68.AfterLoadDFMValues;\r\n SG2.AfterLoadDFMValues;\r\n sb103.AfterLoadDFMValues;\r\n WebPanel35.AfterLoadDFMValues;\r\n WebLabel74.AfterLoadDFMValues;\r\n WebSpeedButton69.AfterLoadDFMValues;\r\n SG3.AfterLoadDFMValues;\r\n pnlSUBFORM_DIV.AfterLoadDFMValues;\r\n pnlDataBlocks.AfterLoadDFMValues;\r\n SubForm_DIV.AfterLoadDFMValues;\r\n b26.AfterLoadDFMValues;\r\n WebPanel13.AfterLoadDFMValues;\r\n WebLabel8.AfterLoadDFMValues;\r\n WebSpeedButton6.AfterLoadDFMValues;\r\n M26.AfterLoadDFMValues;\r\n WebHTMLContainer27.AfterLoadDFMValues;\r\n B101.AfterLoadDFMValues;\r\n WebPanel14.AfterLoadDFMValues;\r\n WebLabel18.AfterLoadDFMValues;\r\n WebSpeedButton11.AfterLoadDFMValues;\r\n G1.AfterLoadDFMValues;\r\n B25.AfterLoadDFMValues;\r\n WebPanel11.AfterLoadDFMValues;\r\n WebLabel7.AfterLoadDFMValues;\r\n WebSpeedButton5.AfterLoadDFMValues;\r\n M25.AfterLoadDFMValues;\r\n WebHTMLContainer26.AfterLoadDFMValues;\r\n B20.AfterLoadDFMValues;\r\n WebPanel95.AfterLoadDFMValues;\r\n WebLabel47.AfterLoadDFMValues;\r\n WebSpeedButton44.AfterLoadDFMValues;\r\n M20.AfterLoadDFMValues;\r\n WebHTMLContainer17.AfterLoadDFMValues;\r\n B21.AfterLoadDFMValues;\r\n WebPanel2.AfterLoadDFMValues;\r\n WebLabel3.AfterLoadDFMValues;\r\n WebSpeedButton1.AfterLoadDFMValues;\r\n M21.AfterLoadDFMValues;\r\n WebHTMLContainer22.AfterLoadDFMValues;\r\n B22.AfterLoadDFMValues;\r\n WebPanel4.AfterLoadDFMValues;\r\n WebLabel4.AfterLoadDFMValues;\r\n WebSpeedButton2.AfterLoadDFMValues;\r\n M22.AfterLoadDFMValues;\r\n WebHTMLContainer23.AfterLoadDFMValues;\r\n b23.AfterLoadDFMValues;\r\n WebPanel6.AfterLoadDFMValues;\r\n WebLabel5.AfterLoadDFMValues;\r\n WebSpeedButton3.AfterLoadDFMValues;\r\n M23.AfterLoadDFMValues;\r\n WebHTMLContainer24.AfterLoadDFMValues;\r\n B18.AfterLoadDFMValues;\r\n WebPanel111.AfterLoadDFMValues;\r\n WebLabel55.AfterLoadDFMValues;\r\n WebSpeedButton52.AfterLoadDFMValues;\r\n M18.AfterLoadDFMValues;\r\n WebHTMLContainer19.AfterLoadDFMValues;\r\n B19.AfterLoadDFMValues;\r\n WebPanel93.AfterLoadDFMValues;\r\n WebLabel46.AfterLoadDFMValues;\r\n WebSpeedButton43.AfterLoadDFMValues;\r\n M19.AfterLoadDFMValues;\r\n WebHTMLContainer18.AfterLoadDFMValues;\r\n B24.AfterLoadDFMValues;\r\n WebPanel8.AfterLoadDFMValues;\r\n WebLabel6.AfterLoadDFMValues;\r\n WebSpeedButton4.AfterLoadDFMValues;\r\n M24.AfterLoadDFMValues;\r\n WebHTMLContainer25.AfterLoadDFMValues;\r\n B29.AfterLoadDFMValues;\r\n WebPanel19.AfterLoadDFMValues;\r\n WebLabel11.AfterLoadDFMValues;\r\n WebSpeedButton9.AfterLoadDFMValues;\r\n M29.AfterLoadDFMValues;\r\n WebHTMLContainer30.AfterLoadDFMValues;\r\n B28.AfterLoadDFMValues;\r\n WebPanel17.AfterLoadDFMValues;\r\n WebLabel10.AfterLoadDFMValues;\r\n WebSpeedButton8.AfterLoadDFMValues;\r\n M28.AfterLoadDFMValues;\r\n WebHTMLContainer29.AfterLoadDFMValues;\r\n B27.AfterLoadDFMValues;\r\n WebPanel15.AfterLoadDFMValues;\r\n WebLabel9.AfterLoadDFMValues;\r\n WebSpeedButton7.AfterLoadDFMValues;\r\n M27.AfterLoadDFMValues;\r\n WebHTMLContainer28.AfterLoadDFMValues;\r\n B16.AfterLoadDFMValues;\r\n WebPanel107.AfterLoadDFMValues;\r\n WebLabel53.AfterLoadDFMValues;\r\n WebSpeedButton50.AfterLoadDFMValues;\r\n M16.AfterLoadDFMValues;\r\n WebHTMLContainer21.AfterLoadDFMValues;\r\n B17.AfterLoadDFMValues;\r\n WebPanel109.AfterLoadDFMValues;\r\n WebLabel54.AfterLoadDFMValues;\r\n WebSpeedButton51.AfterLoadDFMValues;\r\n M17.AfterLoadDFMValues;\r\n WebHTMLContainer20.AfterLoadDFMValues;\r\n B15.AfterLoadDFMValues;\r\n WebPanel97.AfterLoadDFMValues;\r\n WebLabel48.AfterLoadDFMValues;\r\n WebSpeedButton45.AfterLoadDFMValues;\r\n M15.AfterLoadDFMValues;\r\n WebHTMLContainer16.AfterLoadDFMValues;\r\n B14.AfterLoadDFMValues;\r\n WebPanel99.AfterLoadDFMValues;\r\n WebLabel49.AfterLoadDFMValues;\r\n WebSpeedButton46.AfterLoadDFMValues;\r\n M14.AfterLoadDFMValues;\r\n WebHTMLContainer15.AfterLoadDFMValues;\r\n B13.AfterLoadDFMValues;\r\n WebPanel101.AfterLoadDFMValues;\r\n WebLabel50.AfterLoadDFMValues;\r\n WebSpeedButton47.AfterLoadDFMValues;\r\n M13.AfterLoadDFMValues;\r\n WebHTMLContainer14.AfterLoadDFMValues;\r\n B12.AfterLoadDFMValues;\r\n WebPanel103.AfterLoadDFMValues;\r\n WebLabel51.AfterLoadDFMValues;\r\n WebSpeedButton48.AfterLoadDFMValues;\r\n M12.AfterLoadDFMValues;\r\n WebHTMLContainer13.AfterLoadDFMValues;\r\n B11.AfterLoadDFMValues;\r\n WebPanel105.AfterLoadDFMValues;\r\n WebLabel52.AfterLoadDFMValues;\r\n WebSpeedButton49.AfterLoadDFMValues;\r\n M11.AfterLoadDFMValues;\r\n WebHTMLContainer12.AfterLoadDFMValues;\r\n B6.AfterLoadDFMValues;\r\n WebPanel80.AfterLoadDFMValues;\r\n WebLabel41.AfterLoadDFMValues;\r\n WebSpeedButton38.AfterLoadDFMValues;\r\n M6.AfterLoadDFMValues;\r\n WebHTMLContainer11.AfterLoadDFMValues;\r\n B7.AfterLoadDFMValues;\r\n WebPanel82.AfterLoadDFMValues;\r\n WebLabel42.AfterLoadDFMValues;\r\n WebSpeedButton39.AfterLoadDFMValues;\r\n M7.AfterLoadDFMValues;\r\n WebHTMLContainer10.AfterLoadDFMValues;\r\n B8.AfterLoadDFMValues;\r\n WebPanel86.AfterLoadDFMValues;\r\n WebLabel43.AfterLoadDFMValues;\r\n WebSpeedButton40.AfterLoadDFMValues;\r\n M8.AfterLoadDFMValues;\r\n WebHTMLContainer9.AfterLoadDFMValues;\r\n B9.AfterLoadDFMValues;\r\n WebPanel88.AfterLoadDFMValues;\r\n WebLabel44.AfterLoadDFMValues;\r\n WebSpeedButton41.AfterLoadDFMValues;\r\n M9.AfterLoadDFMValues;\r\n WebHTMLContainer8.AfterLoadDFMValues;\r\n B10.AfterLoadDFMValues;\r\n WebPanel91.AfterLoadDFMValues;\r\n WebLabel45.AfterLoadDFMValues;\r\n WebSpeedButton42.AfterLoadDFMValues;\r\n M10.AfterLoadDFMValues;\r\n WebHTMLContainer7.AfterLoadDFMValues;\r\n B5.AfterLoadDFMValues;\r\n WebPanel74.AfterLoadDFMValues;\r\n WebLabel38.AfterLoadDFMValues;\r\n WebSpeedButton35.AfterLoadDFMValues;\r\n M5.AfterLoadDFMValues;\r\n WebHTMLContainer6.AfterLoadDFMValues;\r\n B4.AfterLoadDFMValues;\r\n WebPanel78.AfterLoadDFMValues;\r\n WebLabel40.AfterLoadDFMValues;\r\n WebSpeedButton37.AfterLoadDFMValues;\r\n M4.AfterLoadDFMValues;\r\n WebHTMLContainer5.AfterLoadDFMValues;\r\n B3.AfterLoadDFMValues;\r\n WebPanel72.AfterLoadDFMValues;\r\n WebLabel37.AfterLoadDFMValues;\r\n WebSpeedButton34.AfterLoadDFMValues;\r\n M3.AfterLoadDFMValues;\r\n WebHTMLContainer4.AfterLoadDFMValues;\r\n B2.AfterLoadDFMValues;\r\n WebPanel76.AfterLoadDFMValues;\r\n WebLabel39.AfterLoadDFMValues;\r\n WebSpeedButton36.AfterLoadDFMValues;\r\n M2.AfterLoadDFMValues;\r\n WebHTMLContainer3.AfterLoadDFMValues;\r\n B1.AfterLoadDFMValues;\r\n WebPanel70.AfterLoadDFMValues;\r\n WebLabel36.AfterLoadDFMValues;\r\n WebSpeedButton33.AfterLoadDFMValues;\r\n M1.AfterLoadDFMValues;\r\n WebHTMLContainer2.AfterLoadDFMValues;\r\n B30.AfterLoadDFMValues;\r\n WebPanel21.AfterLoadDFMValues;\r\n WebLabel12.AfterLoadDFMValues;\r\n WebSpeedButton10.AfterLoadDFMValues;\r\n M30.AfterLoadDFMValues;\r\n WebHTMLContainer1.AfterLoadDFMValues;\r\n B100.AfterLoadDFMValues;\r\n WebPanel3.AfterLoadDFMValues;\r\n WebLabel14.AfterLoadDFMValues;\r\n WebSpeedButton19.AfterLoadDFMValues;\r\n G9.AfterLoadDFMValues;\r\n B102.AfterLoadDFMValues;\r\n WebPanel24.AfterLoadDFMValues;\r\n WebLabel21.AfterLoadDFMValues;\r\n WebSpeedButton12.AfterLoadDFMValues;\r\n G2.AfterLoadDFMValues;\r\n B105.AfterLoadDFMValues;\r\n WebPanel26.AfterLoadDFMValues;\r\n WebLabel22.AfterLoadDFMValues;\r\n WebSpeedButton15.AfterLoadDFMValues;\r\n G5.AfterLoadDFMValues;\r\n B104.AfterLoadDFMValues;\r\n WebPanel18.AfterLoadDFMValues;\r\n WebLabel19.AfterLoadDFMValues;\r\n WebSpeedButton14.AfterLoadDFMValues;\r\n G4.AfterLoadDFMValues;\r\n B103.AfterLoadDFMValues;\r\n WebPanel7.AfterLoadDFMValues;\r\n WebLabel17.AfterLoadDFMValues;\r\n WebSpeedButton13.AfterLoadDFMValues;\r\n G3.AfterLoadDFMValues;\r\n B106.AfterLoadDFMValues;\r\n WebPanel20.AfterLoadDFMValues;\r\n WebLabel20.AfterLoadDFMValues;\r\n WebSpeedButton16.AfterLoadDFMValues;\r\n G6.AfterLoadDFMValues;\r\n B107.AfterLoadDFMValues;\r\n WebPanel27.AfterLoadDFMValues;\r\n WebLabel23.AfterLoadDFMValues;\r\n WebSpeedButton17.AfterLoadDFMValues;\r\n G7.AfterLoadDFMValues;\r\n B108.AfterLoadDFMValues;\r\n WebPanel29.AfterLoadDFMValues;\r\n WebLabel24.AfterLoadDFMValues;\r\n WebSpeedButton18.AfterLoadDFMValues;\r\n G8.AfterLoadDFMValues;\r\n wmWaitMessage.AfterLoadDFMValues;\r\n viewpdf.AfterLoadDFMValues;\r\n B31.AfterLoadDFMValues;\r\n WebPanel5.AfterLoadDFMValues;\r\n WebLabel16.AfterLoadDFMValues;\r\n WebSpeedButton27.AfterLoadDFMValues;\r\n M31.AfterLoadDFMValues;\r\n WebHTMLContainer38.AfterLoadDFMValues;\r\n B32.AfterLoadDFMValues;\r\n WebPanel16.AfterLoadDFMValues;\r\n WebLabel25.AfterLoadDFMValues;\r\n WebSpeedButton28.AfterLoadDFMValues;\r\n M32.AfterLoadDFMValues;\r\n WebHTMLContainer39.AfterLoadDFMValues;\r\n B33.AfterLoadDFMValues;\r\n WebPanel28.AfterLoadDFMValues;\r\n WebLabel33.AfterLoadDFMValues;\r\n WebSpeedButton29.AfterLoadDFMValues;\r\n M33.AfterLoadDFMValues;\r\n WebHTMLContainer40.AfterLoadDFMValues;\r\n B34.AfterLoadDFMValues;\r\n WebPanel33.AfterLoadDFMValues;\r\n WebLabel34.AfterLoadDFMValues;\r\n WebSpeedButton30.AfterLoadDFMValues;\r\n M34.AfterLoadDFMValues;\r\n WebHTMLContainer41.AfterLoadDFMValues;\r\n B35.AfterLoadDFMValues;\r\n WebPanel36.AfterLoadDFMValues;\r\n WebLabel35.AfterLoadDFMValues;\r\n WebSpeedButton31.AfterLoadDFMValues;\r\n M35.AfterLoadDFMValues;\r\n WebHTMLContainer42.AfterLoadDFMValues;\r\n B36.AfterLoadDFMValues;\r\n WebPanel38.AfterLoadDFMValues;\r\n WebLabel56.AfterLoadDFMValues;\r\n WebSpeedButton32.AfterLoadDFMValues;\r\n M36.AfterLoadDFMValues;\r\n WebHTMLContainer43.AfterLoadDFMValues;\r\n B37.AfterLoadDFMValues;\r\n WebPanel40.AfterLoadDFMValues;\r\n WebLabel57.AfterLoadDFMValues;\r\n WebSpeedButton53.AfterLoadDFMValues;\r\n M37.AfterLoadDFMValues;\r\n WebHTMLContainer44.AfterLoadDFMValues;\r\n B38.AfterLoadDFMValues;\r\n WebPanel42.AfterLoadDFMValues;\r\n WebLabel58.AfterLoadDFMValues;\r\n WebSpeedButton54.AfterLoadDFMValues;\r\n M38.AfterLoadDFMValues;\r\n WebHTMLContainer45.AfterLoadDFMValues;\r\n B39.AfterLoadDFMValues;\r\n WebPanel44.AfterLoadDFMValues;\r\n WebLabel59.AfterLoadDFMValues;\r\n WebSpeedButton55.AfterLoadDFMValues;\r\n M39.AfterLoadDFMValues;\r\n WebHTMLContainer46.AfterLoadDFMValues;\r\n B40.AfterLoadDFMValues;\r\n WebPanel46.AfterLoadDFMValues;\r\n WebLabel60.AfterLoadDFMValues;\r\n WebSpeedButton56.AfterLoadDFMValues;\r\n M40.AfterLoadDFMValues;\r\n WebHTMLContainer47.AfterLoadDFMValues;\r\n B41.AfterLoadDFMValues;\r\n WebPanel48.AfterLoadDFMValues;\r\n WebLabel61.AfterLoadDFMValues;\r\n WebSpeedButton57.AfterLoadDFMValues;\r\n M41.AfterLoadDFMValues;\r\n WebHTMLContainer48.AfterLoadDFMValues;\r\n B42.AfterLoadDFMValues;\r\n WebPanel50.AfterLoadDFMValues;\r\n WebLabel62.AfterLoadDFMValues;\r\n WebSpeedButton58.AfterLoadDFMValues;\r\n M42.AfterLoadDFMValues;\r\n WebHTMLContainer49.AfterLoadDFMValues;\r\n B43.AfterLoadDFMValues;\r\n WebPanel52.AfterLoadDFMValues;\r\n WebLabel63.AfterLoadDFMValues;\r\n WebSpeedButton59.AfterLoadDFMValues;\r\n M43.AfterLoadDFMValues;\r\n WebHTMLContainer50.AfterLoadDFMValues;\r\n B44.AfterLoadDFMValues;\r\n WebPanel54.AfterLoadDFMValues;\r\n WebLabel64.AfterLoadDFMValues;\r\n WebSpeedButton60.AfterLoadDFMValues;\r\n M44.AfterLoadDFMValues;\r\n WebHTMLContainer51.AfterLoadDFMValues;\r\n B45.AfterLoadDFMValues;\r\n WebPanel56.AfterLoadDFMValues;\r\n WebLabel65.AfterLoadDFMValues;\r\n WebSpeedButton61.AfterLoadDFMValues;\r\n M45.AfterLoadDFMValues;\r\n WebHTMLContainer52.AfterLoadDFMValues;\r\n B46.AfterLoadDFMValues;\r\n WebPanel58.AfterLoadDFMValues;\r\n WebLabel66.AfterLoadDFMValues;\r\n WebSpeedButton62.AfterLoadDFMValues;\r\n M46.AfterLoadDFMValues;\r\n WebHTMLContainer53.AfterLoadDFMValues;\r\n B47.AfterLoadDFMValues;\r\n WebPanel60.AfterLoadDFMValues;\r\n WebLabel67.AfterLoadDFMValues;\r\n WebSpeedButton63.AfterLoadDFMValues;\r\n M47.AfterLoadDFMValues;\r\n WebHTMLContainer54.AfterLoadDFMValues;\r\n B48.AfterLoadDFMValues;\r\n WebPanel62.AfterLoadDFMValues;\r\n WebLabel68.AfterLoadDFMValues;\r\n WebSpeedButton64.AfterLoadDFMValues;\r\n M48.AfterLoadDFMValues;\r\n WebHTMLContainer55.AfterLoadDFMValues;\r\n B49.AfterLoadDFMValues;\r\n WebPanel64.AfterLoadDFMValues;\r\n WebLabel69.AfterLoadDFMValues;\r\n WebSpeedButton65.AfterLoadDFMValues;\r\n M49.AfterLoadDFMValues;\r\n WebHTMLContainer56.AfterLoadDFMValues;\r\n B50.AfterLoadDFMValues;\r\n WebPanel66.AfterLoadDFMValues;\r\n WebLabel70.AfterLoadDFMValues;\r\n WebSpeedButton66.AfterLoadDFMValues;\r\n M50.AfterLoadDFMValues;\r\n WebHTMLContainer57.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit ListForm_Base;\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, Vcl.Controls, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, WEBLib.Buttons, Vcl.Grids, WEBLib.DBCtrls, WEBLib.Calendar,\r\n WEBLib.Grids, StrUtils, Vcl.Imaging.GIFImg, VCL.TMSFNCTypes, VCL.TMSFNCUtils,\r\n VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes, VCL.TMSFNCCustomControl,\r\n VCL.TMSFNCSwitch, WEBLib.WebCtrls, Data.DB, WEBLib.DB, WebLib.JSON,\r\n XData.Web.JsonDataset, XData.Web.Client;\r\n\r\ntype\r\n TfrmListForm_Base = class(TForm)\r\n pnlTop: TPanel;\r\n pnlBottom: TPanel;\r\n LFB_dateRange: TPanel;\r\n dpStartDate: TDateTimePicker;\r\n dpEndDate: TDateTimePicker;\r\n WebSpeedButton9: TSpeedButton;\r\n WebLabel10: TLabel;\r\n chApplyDateRange: TCheckBox;\r\n tbReport: TTMSFNCSwitch;\r\n pnlMain: TPanel;\r\n pnlSearch: TPanel;\r\n GRDDYNAMICGRID: TDBGrid;\r\n cldDayRange: TCalendar;\r\n viewpdf: TBrowserControl;\r\n pnlFormButtons: TPanel;\r\n btnCustom1: TBitBtn;\r\n btnCustom2: TBitBtn;\r\n btnCustom3: TBitBtn;\r\n btnCustom4: TBitBtn;\r\n btnCustom5: TBitBtn;\r\n btnSelect: TBitBtn;\r\n btnClose: TBitBtn;\r\n pnlReportButtons: TPanel;\r\n btnClose_RPT: TBitBtn;\r\n Memo: TMemo;\r\n btnClear: TBitBtn;\r\n btnSave: TBitBtn;\r\n WebLabel11: TLabel;\r\n btnCustom6: TBitBtn;\r\n btnCustom7: TBitBtn;\r\n btnCustom8: TBitBtn;\r\n btnCustom9: TBitBtn;\r\n tmGridRefreshClick: TTimer;\r\n tmCloseWaitMessage: TTimer;\r\n WebSpeedButton16: TSpeedButton;\r\n pnlFormCaption: TPanel;\r\n wmWaitMessage: TWaitMessage;\r\n WebLabel8: TLabel;\r\n mdDialogDelete: TMessageDlg;\r\n sbSearch: TScrollBox;\r\n B6: TPanel;\r\n WebPanel2: TPanel;\r\n WebLabel1: TLabel;\r\n WebSpeedButton7: TSpeedButton;\r\n M6: TMemo;\r\n B5: TPanel;\r\n WebPanel4: TPanel;\r\n WebLabel2: TLabel;\r\n WebSpeedButton5: TSpeedButton;\r\n M5: TMemo;\r\n B4: TPanel;\r\n WebPanel6: TPanel;\r\n WebLabel3: TLabel;\r\n WebSpeedButton4: TSpeedButton;\r\n M4: TMemo;\r\n B3: TPanel;\r\n WebPanel8: TPanel;\r\n WebLabel4: TLabel;\r\n WebSpeedButton3: TSpeedButton;\r\n M3: TMemo;\r\n B2: TPanel;\r\n WebPanel10: TPanel;\r\n WebLabel5: TLabel;\r\n WebSpeedButton2: TSpeedButton;\r\n M2: TMemo;\r\n B1: TPanel;\r\n WebPanel12: TPanel;\r\n WebLabel6: TLabel;\r\n WebSpeedButton1: TSpeedButton;\r\n M1: TMemo;\r\n B7: TPanel;\r\n WebPanel70: TPanel;\r\n WebLabel36: TLabel;\r\n WebSpeedButton6: TSpeedButton;\r\n M7: TMemo;\r\n B8: TPanel;\r\n WebPanel3: TPanel;\r\n WebLabel12: TLabel;\r\n WebSpeedButton13: TSpeedButton;\r\n M8: TMemo;\r\n B9: TPanel;\r\n WebPanel7: TPanel;\r\n WebLabel13: TLabel;\r\n WebSpeedButton14: TSpeedButton;\r\n M9: TMemo;\r\n B10: TPanel;\r\n WebPanel11: TPanel;\r\n WebLabel14: TLabel;\r\n WebSpeedButton15: TSpeedButton;\r\n M10: TMemo;\r\n WebPanel1: TPanel;\r\n btnClearFilter: TBitBtn;\r\n btnApplyFilter: TBitBtn;\r\n tmFixFiltermemos: TTimer;\r\n B11: TPanel;\r\n WebPanel9: TPanel;\r\n WebLabel7: TLabel;\r\n WebSpeedButton17: TSpeedButton;\r\n M11: TMemo;\r\n B12: TPanel;\r\n WebPanel14: TPanel;\r\n WebLabel9: TLabel;\r\n WebSpeedButton18: TSpeedButton;\r\n M12: TMemo;\r\n B13: TPanel;\r\n WebPanel16: TPanel;\r\n WebLabel15: TLabel;\r\n WebSpeedButton19: TSpeedButton;\r\n M13: TMemo;\r\n B14: TPanel;\r\n WebPanel18: TPanel;\r\n WebLabel16: TLabel;\r\n WebSpeedButton20: TSpeedButton;\r\n M14: TMemo;\r\n B15: TPanel;\r\n WebPanel20: TPanel;\r\n WebLabel17: TLabel;\r\n WebSpeedButton21: TSpeedButton;\r\n M15: TMemo;\r\n B16: TPanel;\r\n WebPanel22: TPanel;\r\n WebLabel18: TLabel;\r\n WebSpeedButton22: TSpeedButton;\r\n M16: TMemo;\r\n B17: TPanel;\r\n WebPanel24: TPanel;\r\n WebLabel19: TLabel;\r\n WebSpeedButton23: TSpeedButton;\r\n M17: TMemo;\r\n B18: TPanel;\r\n WebPanel26: TPanel;\r\n WebLabel20: TLabel;\r\n WebSpeedButton24: TSpeedButton;\r\n M18: TMemo;\r\n B19: TPanel;\r\n WebPanel28: TPanel;\r\n WebLabel21: TLabel;\r\n WebSpeedButton25: TSpeedButton;\r\n M19: TMemo;\r\n B20: TPanel;\r\n WebPanel30: TPanel;\r\n WebLabel22: TLabel;\r\n WebSpeedButton26: TSpeedButton;\r\n M20: TMemo;\r\n btnFltIcon1: TBitBtn;\r\n btnFltIcon2: TBitBtn;\r\n btnFltIcon3: TBitBtn;\r\n btnFltIcon4: TBitBtn;\r\n btnFltIcon5: TBitBtn;\r\n btnFltIcon6: TBitBtn;\r\n btnFltIcon7: TBitBtn;\r\n btnFltIcon8: TBitBtn;\r\n btnFltIcon9: TBitBtn;\r\n btnFltIcon10: TBitBtn;\r\n btnFltIcon11: TBitBtn;\r\n btnFltIcon12: TBitBtn;\r\n btnFltIcon13: TBitBtn;\r\n btnFltIcon14: TBitBtn;\r\n btnFltIcon15: TBitBtn;\r\n btnFltIcon16: TBitBtn;\r\n btnFltIcon17: TBitBtn;\r\n btnFltIcon18: TBitBtn;\r\n btnFltIcon19: TBitBtn;\r\n btnFltIcon20: TBitBtn;\r\n btnRange_calendar: TBitBtn;\r\n btnRange_todaye: TBitBtn;\r\n btnRange_dayback: TBitBtn;\r\n btnRange_dayforward: TBitBtn;\r\n btnGridRefresh: TBitBtn;\r\n btnGridSetup: TBitBtn;\r\n btnCernerSearch: TBitBtn;\r\n\r\n procedure _BlockDragDrop(Sender, Source: TObject; X, Y: Integer);\r\n procedure _BlockDragOverTitle(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);\r\n procedure WebFormResize(Sender: TObject);\r\n procedure WebFormShow(Sender: TObject);\r\n procedure _BlockTitleEdit(Sender: TObject);\r\n procedure _BlockTitle_MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);\r\n procedure _Block_MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);\r\n procedure _Block_MouseLeave(Sender: TObject);\r\n procedure M1DragOver(Sender, Source: TObject; X, Y: Integer;\r\n State: TDragState; var Accept: Boolean);\r\n procedure _BlockCallPickForm(Sender: Tobject);\r\n procedure M1MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure btnGridRefreshClick(Sender: TObject);\r\n procedure btnGridSetupClick(Sender: TObject);\r\n procedure WebFormClose(Sender: TObject; var Action: TCloseAction);\r\n procedure btnCloseClick(Sender: TObject);\r\n procedure btnApplyFilterClick(Sender: TObject);\r\n procedure btnClearFilterClick(Sender: TObject);\r\n procedure btnCustom1Click(Sender: TObject);\r\n procedure GRDDYNAMICGRIDClick(Sender: TObject);\r\n procedure WebSpeedButton8Click(Sender: TObject);\r\n procedure WebSpeedButton12Click(Sender: TObject);\r\n procedure cldDayRangeDateSelected(Sender: TObject; ADate: TDateTime);\r\n procedure cldDayRangeMouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure cldDayRangeMouseUp(Sender: TObject; Button: TMouseButton;\r\n Shift: TShiftState; X, Y: Integer);\r\n procedure WebSpeedButton10Click(Sender: TObject);\r\n procedure WebSpeedButton11Click(Sender: TObject);\r\n procedure chApplyDateRangeClick(Sender: TObject);\r\n procedure GRDDYNAMICGRIDKeyUp(Sender: TObject; var Key: Word;\r\n Shift: TShiftState);\r\n procedure btnCustom1MouseLeave(Sender: TObject);\r\n procedure btnSelectClick(Sender: TObject);\r\n procedure btnCustom2Click(Sender: TObject);\r\n procedure btnCustom3Click(Sender: TObject);\r\n procedure btnCustom4Click(Sender: TObject);\r\n procedure btnCustom5Click(Sender: TObject);\r\n procedure tmCloseWaitMessageTimer(Sender: TObject);\r\n procedure GRDDYNAMICGRIDFixedCellClick(Sender: TObject; ACol,\r\n ARow: Integer);\r\n procedure tbReportChange(Sender: TObject);\r\n procedure btnClose_RPTClick(Sender: TObject);\r\n procedure M1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);\r\n procedure btnSaveClick(Sender: TObject);\r\n procedure btnClearClick(Sender: TObject);\r\n procedure GRDDYNAMICGRIDDblClick(Sender: TObject);\r\n procedure btnCustom6Click(Sender: TObject);\r\n procedure btnCustom7Click(Sender: TObject);\r\n procedure btnCustom8Click(Sender: TObject);\r\n procedure btnCustom9Click(Sender: TObject);\r\n procedure WebFormCloseQuery(Sender: TObject; var CanClose: Boolean);\r\n procedure tmGridRefreshClickTimer(Sender: TObject);\r\n procedure pnlSearchMouseLeave(Sender: TObject);\r\n procedure tmFixFiltermemosTimer(Sender: TObject);\r\n procedure _BlockShowQPickList(Sender: TObject);\r\n procedure WebPanel12MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure M1Change(Sender: TObject);\r\n procedure btnCustom1MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure btnCernerSearchClick(Sender: TObject);\r\n procedure BuildCernerSearchString;\r\n\r\n private\r\n { Private declarations }\r\n SQL_p: string;\r\n SQL_Filter: string;\r\n SQL_Orderby: string;\r\n\r\n PrevTargetMemo_p : TMemo;\r\n PrevGrid_p : TDBGrid;\r\n PrevGridParent_p : TControl;\r\n PrevBlock_p : TPanel;\r\n PrevBlockUniqueID_p : string;\r\n\r\n public\r\n { Public declarations }\r\n\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmListForm_Base: TfrmListForm_Base;\r\n FormIsActive_p: Boolean=false;\r\n\r\nimplementation\r\n\r\n{$R *.dfm}\r\n\r\nuses DATAMODULE, Main, common, DynamicGridSetup, EditForm_Base, UDF_Schedule;\r\n\r\nprocedure TfrmListForm_Base._BlockDragDrop(Sender, Source: TObject; X, Y: Integer);\r\nbegin\r\nBlockDragDrop(Sender, Source, X, Y, getcurrentform, sbSearch, 20);\r\nend;\r\n\r\nprocedure TfrmListForm_Base._BlockDragOverTitle(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);\r\nbegin\r\nBlockDragOverTitle(Sender, Source, X, Y, State, Accept);\r\nend;\r\n\r\nprocedure TfrmListForm_Base._BlockShowQPickList(Sender: TObject);\r\nbegin\r\nBlockShowQPickList(Sender);\r\nend;\r\n\r\nprocedure TfrmListForm_Base.btnGridSetupClick(Sender: TObject);\r\nvar containername_p: string;\r\nbegin\r\n//Grid Setup\r\nEGV_SUBFORMCAPTION := 'Grid Setup';\r\nEGV_GRIDTOSETUP := GRDDYNAMICGRID;\r\n//GRDDYNAMICGRID.datasource := nil;\r\n\r\ncontainername_p := getformcontainer().name;\r\n//showmessage(containername_p);\r\nif containername_p = 'FormContainer1' then Application.CreateForm(TfrmDynamicGridSetup, frmmain.formcontainer1.ElementID, egv_subform);\r\nif containername_p = 'FormContainer2' then Application.CreateForm(TfrmDynamicGridSetup, frmmain.formcontainer2.ElementID, egv_subform2);\r\nif containername_p = 'FormContainer3' then Application.CreateForm(TfrmDynamicGridSetup, frmmain.formcontainer3.ElementID, egv_subform3);\r\nif containername_p = 'FormContainer4' then Application.CreateForm(TfrmDynamicGridSetup, frmmain.formcontainer4.ElementID, egv_subform4);\r\nif containername_p = 'FormContainer5' then Application.CreateForm(TfrmDynamicGridSetup, frmmain.formcontainer5.ElementID, egv_subform5);\r\nif containername_p = 'FormContainer6' then Application.CreateForm(TfrmDynamicGridSetup, frmmain.formcontainer5.ElementID, egv_subform6);\r\nif containername_p = 'FormContainer7' then Application.CreateForm(TfrmDynamicGridSetup, frmmain.formcontainer6.ElementID, egv_subform7);\r\nif containername_p = 'FormContainer8' then Application.CreateForm(TfrmDynamicGridSetup, frmmain.formcontainer7.ElementID, egv_subform8);\r\nif containername_p = 'FormContainer9' then Application.CreateForm(TfrmDynamicGridSetup, frmmain.formcontainer8.ElementID, egv_subform9);\r\n\r\nend;\r\n\r\nprocedure TfrmListForm_Base.btnSaveClick(Sender: TObject);\r\nvar t_p: string; container_p: TScrollBox;\r\n\r\nprocedure OnResult(Response: TXDataClientResponse);\r\n var Response_p: string;\r\n begin\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n // showmessage('Response: ' + Response_p);\r\n if Response_p <> ''\r\n then begin\r\n //replace links to from data blocks\r\n container_p := (getpreviousform.FindComponent('Subform_DIV') as TScrollBox);\r\n if (pos('<', Response_p) > 0) and (pos('>', Response_p) > 0) and (container_p <> nil)\r\n then Response_p := ReplaceddataBlockLinks(Response_p, container_p);\r\n\r\n EGV_PKLTARGETMEMO.Text := Response_p;\r\n EGV_PKLTARGETMEMO.Tag := 1; // Updated\r\n stretchmemo(EGV_PKLTARGETMEMO);\r\n RefreshGridDatasources(getpreviousform);\r\n self.Close;\r\n end\r\n else begin\r\n Showmessage('Template processing returns no result');\r\n self.Close;\r\n end;\r\n end;\r\n\r\nbegin\r\nBlockApplyDependencies((EGV_PKLTARGETMEMO.Parent as TPanel), EGV_PKLTARGETMEMO.text);\r\nEGV_BLOCKUNIQUEID := PrevBlockUniqueID_p;\r\nEGV_PKLTARGETMEMO := PrevTargetMemo_p;\r\nEGV_PARENT_DBGRID := PrevGrid_p;\r\nif EGV_PARENT_DBGRID <> nil then EGV_PARENT_DBGRID.Parent := PrevGridParent_p;\r\n\r\nt_p := BlockGetSentenceTMP(EGV_BLOCKUNIQUEID);\r\n//showmessage(BlockGetTitle(PrevBlock_p));\r\n//showmessage(t_p);\r\nif t_p <> ''\r\nthen if dm.XDataWebConnection2.Connected then dm.XDataWebClient2.RawInvoke('IReportService.GetColumnData',[PrepareScript(t_p, BlockGetTitle(PrevBlock_p), memo.text) , egv_facilityid, '0'], @OnResult)\r\nelse begin\r\n //replace links to from data blocks\r\n container_p := (getpreviousform.FindComponent('Subform_DIV') as TScrollBox);\r\n if (pos('<', memo.text) > 0) and (pos('>', memo.text) > 0) and (container_p <> nil)\r\n then memo.text := ReplaceddataBlockLinks(memo.text, container_p);\r\n\r\n EGV_PKLTARGETMEMO.Text := memo.text;\r\n EGV_PKLTARGETMEMO.Tag := 1; // Updated\r\n stretchmemo(EGV_PKLTARGETMEMO);\r\n RefreshGridDatasources(getpreviousform);\r\n\r\n self.Close;\r\n end;\r\nend;\r\n\r\nprocedure TfrmListForm_Base.btnSelectClick(Sender: TObject);\r\nvar i: integer; f_p, SQL_p: string;\r\nbegin\r\nEGV_BLOCKUNIQUEID := PrevBlockUniqueID_p;\r\nEGV_PKLTARGETMEMO := PrevTargetMemo_p;\r\nEGV_PARENT_DBGRID := PrevGrid_p;\r\nif EGV_PARENT_DBGRID <> nil then EGV_PARENT_DBGRID.Parent := PrevGridParent_p;\r\n\r\n//showmessage('select on list: ' + EGV_BLOCKUNIQUEID);\r\nif assigned(EGV_PARENT_DBGRID)\r\nthen begin\r\n //showmessage('to grid');\r\n EGV_PARENT_DBGRID.datasource.dataset.edit;\r\n for i := 0 to length(splitstring(EGV_PKLTARGETGRIDFIELDS,',')) - 1\r\n do begin\r\n f_p := splitstring(EGV_PKLTARGETGRIDFIELDS,',')[i];\r\n if f_p <> ''\r\n then EGV_PARENT_DBGRID.datasource.DATASET.fieldbyname(f_p).asstring := GRDDYNAMICGRID.datasource.dataset.fieldbyname(f_p).asstring;\r\n end;\r\n EGV_PARENT_DBGRID.datasource.dataset.post;\r\n Block_GridPost(nil, EGV_PARENT_DBGRID);\r\n self.close;\r\n end\r\nelse begin\r\n //showmessage(EGV_PKLTARGETMEMO.name);\r\n if assigned(EGV_PKLTARGETMEMO)\r\n then begin\r\n // showmessage('to memo');\r\n // showmessage(GRDDYNAMICGRID.datasource.dataset.fields[0].FieldName );\r\n // showmessage(GRDDYNAMICGRID.datasource.dataset.fields[1].FieldName);\r\n frmmain.memGridColumns.text := dm.egv_localstorage.values['GRDDYNAMICGRID' + '_COLUMNS_' + getcurrentformname];\r\n SQL_p := dm.egv_localstorage.values['GRDDYNAMICGRID' + '_SELECT_' + getcurrentformname];\r\n f_p := Grid_GetTableAndColumns(3, SQL_p, frmmain.memGridColumns);\r\n // showmessage(f_p);\r\n // in this version only one (first with '=') column can be used for the value.\r\n f_p := splitstring(f_p,',')[0];\r\n\r\n //showmessage(f_p);\r\n //f_p := GRDDYNAMICGRID.Columns[GRDDYNAMICGRID.Columns.Count - 1].DataField;\r\n if memo.text = ''\r\n then memo.Text := GRDDYNAMICGRID.datasource.dataset.fieldbyname(f_p).asstring\r\n else begin\r\n if copy(memo.Text,length(memo.Text),1)= '.'\r\n then memo.text := memo.text + ' ' + GRDDYNAMICGRID.datasource.dataset.fieldbyname(f_p).asstring\r\n else memo.text := memo.text + ', ' + GRDDYNAMICGRID.datasource.dataset.fieldbyname(f_p).asstring;\r\n end;\r\n //showmessage('2');\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TfrmListForm_Base.chApplyDateRangeClick(Sender: TObject);\r\nbegin\r\nLFB_dateRange.visible := chApplyDateRange.checked;\r\nbtnApplyFilterClick(nil);\r\nend;\r\n\r\nprocedure TfrmListForm_Base.cldDayRangeDateSelected(Sender: TObject;\r\n ADate: TDateTime);\r\nbegin\r\ndpStartdate.date := ADate;\r\ndpEnddate.date := ADate;\r\ncldDayRange.visible := false;\r\nend;\r\n\r\nprocedure TfrmListForm_Base.cldDayRangeMouseMove(Sender: TObject;\r\n Shift: TShiftState; X, Y: Integer);\r\nbegin\r\n//frmmain.webmemo1.text := inttostr(x) + ' - ' + inttostr(y);\r\nend;\r\n\r\nprocedure TfrmListForm_Base.cldDayRangeMouseUp(Sender: TObject;\r\n Button: TMouseButton; Shift: TShiftState; X, Y: Integer);\r\nbegin\r\nif Y > 65\r\nthen begin\r\n dpStartdate.date := cldDayRange.selecteddate;\r\n dpEnddate.date := cldDayRange.selecteddate;\r\n cldDayRange.visible := false;\r\n end;\r\nend;\r\n\r\nprocedure TfrmListForm_Base.GRDDYNAMICGRIDClick(Sender: TObject);\r\nbegin\r\nif GRDDYNAMICGRID.datasource.DataSet.Active then SetKeyVariablesFromDataSet(GRDDYNAMICGRID.datasource.dataset);\r\nDBF_GetPostBlocks(frmmain.sblogoBox, 0, frmmain);\r\nDBF_GetPostBlocks(frmmain.sbAlertBoxes, 0, frmmain);\r\nDBF_GetPostBlocks(frmmain.sbInfoBoxes, 0, frmmain);\r\n//showmessage(GRDDYNAMICGRID.datasource.DataSet.name);\r\n\r\nend;\r\n\r\nprocedure TfrmListForm_Base.GRDDYNAMICGRIDDblClick(Sender: TObject);\r\nbegin\r\n//if assigned(EGV_PKLTARGETMEMO) then\r\nbtnSelectClick(nil);\r\nend;\r\n\r\nprocedure TfrmListForm_Base.GRDDYNAMICGRIDFixedCellClick(Sender: TObject; ACol,\r\n ARow: Integer);\r\nvar\r\n i: integer;\r\n srt_p: string;\r\nbegin\r\nSQL_Orderby := '';\r\n// set the sort indicator in the grid column header\r\nif GRDDYNAMICGRID.Columns[ACol].SortIndicator = siAscending\r\nthen GRDDYNAMICGRID.Columns[ACol].SortIndicator := siDescending\r\nelse if GRDDYNAMICGRID.Columns[ACol].SortIndicator = siDescending\r\n then GRDDYNAMICGRID.Columns[ACol].SortIndicator := siNone\r\n else GRDDYNAMICGRID.Columns[ACol].SortIndicator := siAscending;\r\nif GRDDYNAMICGRID.Columns[ACol].SortIndicator = siAscending\r\nthen SQL_Orderby := {srt_p + ', ' +} stringreplace(GRDDYNAMICGRID.Columns[ACol].datafield,'.','/',[rfreplaceAll]) + ' ASC '\r\nelse if GRDDYNAMICGRID.Columns[ACol].SortIndicator = siDescending\r\n then SQL_Orderby := stringreplace(GRDDYNAMICGRID.Columns[ACol].datafield,'.','/',[rfreplaceAll]) + ' DESC ';\r\n // showmessage(SQL_Orderby);\r\nbtnGridRefreshClick(nil);\r\nend;\r\n\r\nprocedure TfrmListForm_Base.GRDDYNAMICGRIDKeyUp(Sender: TObject; var Key: Word;\r\n Shift: TShiftState);\r\nbegin\r\nSetKeyVariablesFromDataSet(GRDDYNAMICGRID.datasource.dataset);\r\nDBF_GetPostBlocks(frmmain.sbLogoBox, 0, frmmain);\r\nDBF_GetPostBlocks(frmmain.sbAlertBoxes, 0, frmmain);\r\nDBF_GetPostBlocks(frmmain.sbInfoBoxes, 0, frmmain);\r\nend;\r\n\r\nprocedure TfrmListForm_Base.btnApplyFilterClick(Sender: TObject);\r\nvar i, j: integer; b: Tcontrol; m: TMemo; s, t, f, where_p: string; c: TComponent; block_id: string;\r\nbegin\r\nif frmmain.clQuickPicklist.visible then frmmain.btnCloseQuickPickListClick(nil);\r\nwhere_p := '';\r\nfor i := 0 to sbSearch.controlcount - 1\r\ndo begin\r\n b := sbSearch.controls[i];\r\n if (b is Tpanel) and (b as TPanel).visible\r\n then begin\r\n // showmessage(b.name);\r\n m := nil;\r\n for j := 0 to b.controlcount - 1\r\n do if (b.controls[j] is TMemo) then begin m := (b.controls[j] as TMemo); break; end;\r\n if not assigned(m) then continue;\r\n block_id := GetBlockUniqueID(( b as TPanel), false);\r\n s := dm.egv_localstorage.values['DBF_' + block_id];\r\n //showmessage(b.Name + ' --- ' + m.text + ' --- ' + block_id);\r\n if s <> ''\r\n then begin\r\n t := splitstring(s,'|')[0];\r\n f := splitstring(s,'|')[1];\r\n // showmessage(f + ' --- ' + t);\r\n if (f <> '')\r\n then begin // showmessage(f);\r\n f := trim(f);\r\n { if (pos('=', f) <> length(f) ) and\r\n (pos('>', f) <> length(f)) and\r\n (pos('<', f) <> length(f)) and\r\n (pos('<>', f) <> length(f) -1 ) and\r\n (pos('>=', f) <> length(f) -1 ) and\r\n (pos('<=', f) <> length(f) -1 ) and\r\n (pos('LIKE', uppercase(f)) <> length(f) -3 )\r\n then begin }\r\n { if (pos('=', f) = 0 ) and\r\n (pos('>', f) = 0 ) and\r\n (pos('<', f) = 0 ) and\r\n (pos('<>', f) = 0 ) and\r\n (pos('>=', f) = 0 ) and\r\n (pos('<=', f) = 0 ) and\r\n (pos('LIKE', uppercase(f)) = 0 )\r\n then} if m.text <> ''\r\n then begin\r\n if (pos('=', m.text) = 0 ) and\r\n (pos('>', m.text) = 0 ) and\r\n (pos('<', m.text) = 0 ) and\r\n (pos('<>', m.text) = 0 ) and\r\n (pos('>=', m.text) = 0 ) and\r\n (pos('<=', m.text) = 0 )\r\n then begin\r\n if uppercase(dm.EGV_LOCALSTORAGE.values['Q_' + block_id + '_DATATYPE']) = '0'\r\n then f := f + ' = ' + quotedstr(m.Text)\r\n else f := f + ' like ' + quotedstr('%' + m.Text + '%');\r\n end\r\n else f := f + m.Text;\r\n // showmessage(s);\r\n end\r\n else f := '';\r\n { end\r\n else begin\r\n if (pos('LIKE', uppercase(f)) = length(f) -3 )\r\n then begin\r\n if m.text <> ''\r\n then f := f + ' ' + quotedstr('%' + m.Text + '%')\r\n else f := '';\r\n end\r\n else begin\r\n if m.text <> ''\r\n then f := f + ' ' + quotedstr(m.Text)\r\n else f := '';\r\n end;\r\n end; }\r\n // showmessage(f);\r\n if f <> ''\r\n then begin\r\n if where_p <> ''\r\n then where_p := where_p + ' and ' + f\r\n else where_p := f;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n SQL_Filter := where_p;;\r\n // Showmessage(SQL_Filter);\r\nbtnGridRefreshclick(nil);\r\nend;\r\n\r\nprocedure TfrmListForm_Base.btnClearClick(Sender: TObject);\r\nbegin\r\n memo.Clear;\r\nend;\r\n\r\nprocedure TfrmListForm_Base.btnCloseClick(Sender: TObject);\r\nbegin\r\nRefreshGridDatasources(getpreviousform);\r\nself.close;\r\nend;\r\n\r\nprocedure TfrmListForm_Base.btnCustom1Click(Sender: TObject);\r\nvar containername_p, DeleteSql_p, s, c, ButtonName_p: string; i: integer;\r\n mr: TModalResult; APIcall_p, Formtocall_p: string;\r\n\r\n procedure OnDlgResult(Result: TDialogResult);\r\n begin\r\n if Result = mrYes\r\n then Grid_DeleteRecord(SQl_p, frmmain.memGridColumns, GRDDYNAMICGRID);\r\n end;\r\n\r\nbegin\r\n//showmessage(getcurrentformname);\r\nEGV_PKLTARGETMEMO := nil;\r\nButtonName_p := uppercase('BUTTON' + StringReplace((Sender as TBitBtn).name, 'btnCustom','', []));\r\nEGV_CURRENTFORMNAME := dm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform()-1)];\r\nFormtocall_p := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_' + ButtonName_p + '_FORM'];\r\nAPIcall_p := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_' + Buttonname_p + '_API'];\r\n\r\n//showmessage(Formtocall_p);\r\n\r\n// Save current form name\r\ndm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform())] := formtocall_p;\r\n\r\nif ((Sender as TBitBtn).caption = 'Delete') or ((Sender as TBitBtn).hint = 'Delete')\r\nthen begin\r\n mdDialogDelete.ShowDialog('Delete selected record ?', WEBLib.Dialogs.mtConfirmation,[], @OnDlgResult);\r\n end\r\nelse if ((Sender as TBitBtn).caption = 'Post') or ((Sender as TBitBtn).hint = 'Post')\r\n then begin\r\n Grid_Post(SQl_p, frmmain.memGridColumns, GRDDYNAMICGRID);\r\n end\r\n else if ((((Sender as TBitBtn).caption = 'New')) or ((Sender as TBitBtn).hint = 'New')) and ( Formtocall_p = '')\r\n then begin\r\n Grid_NewRecord(SQl_p, frmmain.memGridColumns, GRDDYNAMICGRID);\r\n end\r\n else begin\r\n dm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform())] :=Formtocall_p;\r\n\r\n EGV_CURRENTFORMNAME := dm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform())];\r\n // showmessage(Formtocall_p);\r\n\r\n if Formtocall_p <> ''\r\n then containername_p := getformcontainer().name;\r\n\r\n if ((Sender as TBitBtn).caption = 'New') or ((Sender as TBitBtn).hint = 'New')\r\n then CallFormPrepare(containername_p, 1, APIcall_p)\r\n else CallFormPrepare(containername_p, 0, APIcall_p);\r\n end;\r\nend;\r\n\r\nprocedure TfrmListForm_Base.btnCustom1MouseLeave(Sender: TObject);\r\nbegin\r\n//(sender as TWebBitBtn).ElementClassName := 'btn btn-outline-info';\r\nend;\r\n\r\nprocedure TfrmListForm_Base.btnCustom1MouseMove(Sender: TObject;\r\n Shift: TShiftState; X, Y: Integer);\r\nbegin\r\n//(sender as twebbitbtn).hint := (sender as twebbitbtn).ElementClassName;\r\nend;\r\n\r\nprocedure TfrmListForm_Base.btnCustom2Click(Sender: TObject);\r\nbegin\r\nbtnCustom1Click(Sender);\r\nend;\r\n\r\nprocedure TfrmListForm_Base.btnCustom3Click(Sender: TObject);\r\nbegin\r\nbtnCustom1Click(Sender);\r\nend;\r\n\r\nprocedure TfrmListForm_Base.btnCustom4Click(Sender: TObject);\r\nbegin\r\nbtnCustom1Click(Sender);\r\nend;\r\n\r\nprocedure TfrmListForm_Base.btnCustom5Click(Sender: TObject);\r\nbegin\r\nbtnCustom1Click(Sender);\r\nend;\r\n\r\nprocedure TfrmListForm_Base.btnCustom6Click(Sender: TObject);\r\nbegin\r\nbtnCustom1Click(Sender);\r\nend;\r\n\r\nprocedure TfrmListForm_Base.btnCustom7Click(Sender: TObject);\r\nbegin\r\nbtnCustom1Click(Sender);\r\nend;\r\n\r\nprocedure TfrmListForm_Base.btnCustom8Click(Sender: TObject);\r\nbegin\r\nbtnCustom1Click(Sender);\r\nend;\r\n\r\nprocedure TfrmListForm_Base.btnCustom9Click(Sender: TObject);\r\nbegin\r\nbtnCustom1Click(Sender);\r\nend;\r\n\r\nprocedure TfrmListForm_Base.btnGridRefreshClick(Sender: TObject);\r\nvar s, s1, s2, s3, s4, s5, block_id: string; i, j, k, n: integer; grd: TDBGrid; ds_p: TDatasource; c: TComponent;\r\n b: TControl; m: TMemo;\r\n // c: TWebComponent; columnleftpos_p: integer;\r\nbegin //frmmain.wmWaitMessage.hide; EXIT;\r\ntry\r\nBuildCernerSearchString;\r\n//showmessage(ELV_CERNERPATIENTSEARCHPARAMS);\r\n\r\n// Check if to enable the Cerner Search button:\r\nbtnCernerSearch.Visible := false;\r\nfor i := 0 to sbSearch.controlcount - 1\r\ndo begin\r\n b := sbSearch.controls[i];\r\n if (b is Tpanel) and (b as TPanel).visible\r\n then begin\r\n // showmessage(b.name);\r\n m := nil;\r\n for j := 0 to b.controlcount - 1\r\n do if (b.controls[j] is TMemo) then begin m := (b.controls[j] as TMemo); break; end;\r\n if not assigned(m) then continue;\r\n block_id := GetBlockUniqueID(( b as TPanel), false);\r\n s := dm.egv_localstorage.values['DBF_' + block_id];\r\n if (s <> '') and (length(splitstring(s,'|')) >= 28) and (splitstring(s,'|')[27] <> '')\r\n then begin\r\n btnCernerSearch.Visible := true;\r\n break;\r\n end\r\n end;\r\n end;\r\n\r\n//if pnlFormCaption.Visible then showmessage('1');\r\n\r\n//showmessage(SQL_Orderby);\r\n\r\nif assigned(GRDDYNAMICGRID.DataSource) and assigned(GRDDYNAMICGRID.DataSource.DataSet)\r\nthen begin\r\n if GRDDYNAMICGRID.DataSource.DataSet.Active\r\n then EGV_RECNO := GRDDYNAMICGRID.DataSource.DataSet.RecNo;\r\n end\r\nelse exit;\r\n\r\n//showmessage(dm.egv_localstorage.values['GRDDYNAMICGRID' + '_SELECT_' + uppercase(getcurrentformname)]);\r\n// Select :\r\nSQL_p := dm.egv_localstorage.values['GRDDYNAMICGRID' + '_SELECT_' + getcurrentformname];\r\n\r\n// get rid of comment in SQL_p\r\nwhile ( pos('/*', SQL_p) > 0 ) and ( pos('*/', SQL_p) > 0 )\r\ndo begin\r\n i := pos('/*', SQL_p);\r\n j := pos('*/', SQL_p);\r\n if ( i > 0 ) and ( j > 0 )\r\n then delete(SQL_p, i, (j - i) + 2);\r\n end;\r\n\r\nchApplyDateRange.visible := ( (pos('EGV_STARTDATE', uppercase(SQL_p)) > 0) and (pos('EGV_ENDDATE', uppercase(SQL_p)) > 0) );\r\nLFB_DateRange.visible:= (chApplyDateRange.visible and chApplyDateRange.checked);\r\n\r\nif chApplyDateRange.checked\r\nthen begin\r\n EGV_STARTDATE := formatdatetime('YYYY.MM.DD', dpStartDate.date);\r\n EGV_ENDDATE := formatdatetime('YYYY.MM.DD', dpEndDate.date);\r\n end\r\nelse begin\r\n EGV_STARTDATE := formatdatetime('YYYY.MM.DD', date - 36500);\r\n EGV_ENDDATE := formatdatetime('YYYY.MM.DD', date + 36500);\r\n end;\r\n //To keep it in original date format.\r\n EGV_STARTDATE_DATE := dpStartDate.date;\r\n EGV_ENDDATE_DATE := dpEndDate.date;\r\n\r\nSQL_p := InsertKeyValues(SQL_p);\r\nSQL_p := stringreplace(uppercase(SQL_p), ' ', ' ', [rfReplaceAll]);\r\n\r\nif SQL_Filter <> ''\r\nthen begin\r\n if pos('TOP 0', uppercase(SQL_p)) > 0\r\n then SQL_p := stringreplace(uppercase(SQL_p), 'TOP 0', '', []);\r\n\r\n if pos('WHERE', uppercase(SQL_p)) > 0\r\n then begin\r\n i := 0;\r\n while pos('WHERE', uppercase(SQL_p)) > 0\r\n do begin\r\n SQL_p := stringreplace(uppercase(SQL_p), 'WHERE', 'W^H^E^R^E^'+inttostr(i), []);\r\n i := i + 1;\r\n end;\r\n // showmessage(inttostr(i));\r\n SQL_p := stringreplace(uppercase(SQL_p), 'W^H^E^R^E^'+inttostr(i-1), 'WHERE ' + SQL_Filter + ' and ',[]); // SQL_P + ' and ' + SQL_Filter\r\n i := 0;\r\n while pos('W^H^E^R^E^'+inttostr(i), uppercase(SQL_p)) > 0\r\n do begin\r\n SQL_p := stringreplace(uppercase(SQL_p), 'W^H^E^R^E^'+inttostr(i), 'WHERE', []);\r\n i := i + 1;\r\n end;\r\n end\r\n else SQL_p := SQL_P + ' where ' + SQL_Filter;\r\n // showmessage(SQL_p);\r\n end;\r\n\r\nif SQL_Orderby <> ''\r\nthen begin\r\n if pos('ORDER BY', uppercase(SQL_p)) > 0\r\n then SQL_p := SQL_P + ', ' + SQL_Orderby //stringreplace(uppercase(SQL_p), 'ORDER BY', 'ORDER BY ' + SQL_Orderby + ', ',[]) // SQL_P + ' and ' + SQL_Filter\r\n else SQL_p := SQL_P + ' ORDER BY ' + SQL_Orderby;\r\n end;\r\n//showmessage('1');\r\n{Grid_SetUpColumns(GRDDYNAMICGRID); // showmessage('resfresh 1');\r\nGrid_AdjustColumns(GRDDYNAMICGRID,true); // showmessage('resfresh 2');\r\nGrid_SetTitleHeight(GRDDYNAMICGRID); // showmessage('resfresh 3'); }\r\n\r\nif assigned(GRDDYNAMICGRID.datasource)\r\nthen begin\r\n GRDDYNAMICGRID.datasource.dataset.close;\r\n GRDDYNAMICGRID.datasource.dataset.tag := 0;\r\n GRDDYNAMICGRID.datasource := nil;\r\n end;\r\n\r\nds_p := GetDynamicGridDataSource();\r\n//showmessage(SQL_p);\r\nGrid_SetUpColumns(GRDDYNAMICGRID); // showmessage('resfresh 1');\r\ngrdDynamicGrid.Visible := true;\r\nGrid_AdjustColumns(GRDDYNAMICGRID,true); //showmessage('resfresh 2');\r\nGrid_SetTitleHeight(GRDDYNAMICGRID); // showmessage('resfresh 3');\r\n\r\nGRDDYNAMICGRID.datasource := ds_p;\r\nGRDDYNAMICGRID.datasource.dataset.tag := 1;\r\n\r\nif tbReport.State = ssOn\r\nthen tbReportChange(tbReport);\r\nfinally\r\n//showmessage('refresh clicked: ' + SQL_p);\r\nif trim(SQL_p) <> ''\r\nthen OpenDataSet_J(ds_p.dataset, SQL_p, GRDDYNAMICGRID)\r\nelse if frmmain.wmWaitMessage.showing and (frmmain.wmWaitMessage.Tag = 0) then frmmain.wmWaitMessage.hide;\r\n\r\nresizeformblocks(sbSearch,20,false);\r\nsbSearch.Visible := true;\r\nend;\r\nend;\r\n\r\nprocedure TfrmListForm_Base.btnClearFilterClick(Sender: TObject);\r\nvar i, j: integer; b: Tcontrol; m: TMemo;\r\nbegin\r\nfor i := 0 to sbSearch.controlcount - 1\r\ndo begin\r\n b := sbSearch.controls[i];\r\n if (b is Tpanel) and (b as TPanel).visible\r\n then begin\r\n m := nil;\r\n for j := 0 to b.controlcount - 1\r\n do if (b.controls[j] is TMemo) then begin m := (b.controls[j] as TMemo); break; end;\r\n if not assigned(m) then continue;\r\n m.text := '';\r\n end;\r\n end;\r\nbtnCernerSearch.Visible := false;\r\nbtnApplyFilterClick(nil);\r\nend;\r\n\r\nprocedure TfrmListForm_Base.btnClose_RPTClick(Sender: TObject);\r\nbegin\r\n RefreshGridDatasources(getpreviousform);\r\n self.Close;\r\nend;\r\n\r\nprocedure TfrmListForm_Base.btnCernerSearchClick(Sender: TObject);\r\nvar i, j: integer; b: Tcontrol; m: TMemo; c: TComponent;\r\n s, containername_p, block_id: string;\r\nbegin\r\n//Showmessage(ELV_CERNERPATIENTSEARCHPARAMS);\r\nBuildCernerSearchString;\r\n\r\nEGV_CURRENTFORMNAME := dm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform()-1)];\r\ndm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform())] := 'UDF_CERNERPATIENTS';\r\nEGV_CURRENTFORMNAME := dm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform())];\r\n// showmessage('1' + EGV_CURRENTFORMNAME);\r\ncontainername_p := getformcontainer().name;\r\nCallForm(containername_p);\r\nend;\r\n\r\nprocedure TfrmListForm_Base.WebFormClose(Sender: TObject; var Action: TCloseAction);\r\nvar grd: TDBGrid; prevform_p: TForm;\r\n begin\r\nChangeMainMenuHighlight;\r\nprevform_p := getpreviousform;\r\n//showmessage(prevform_p.Name);\r\n//showmessage(getcurrentform.name);\r\nReleaseGridDataSets(getcurrentform);\r\n\r\n{grd := nil; // find the youngest grid in the past to reset the system key variables.\r\nif assigned(getpreviousform(1)) and assigned(getpreviousform(1).findcomponent('GRDDYNAMICGRID'))\r\nthen grd := ( getpreviousform(1).findcomponent('GRDDYNAMICGRID') as TWebDBGrid)\r\nelse\r\n if assigned(getpreviousform(2)) and assigned(getpreviousform(2).findcomponent('GRDDYNAMICGRID'))\r\n then grd := ( getpreviousform(2).findcomponent('GRDDYNAMICGRID') as TWebDBGrid)\r\n else\r\n if assigned(getpreviousform(3)) and assigned(getpreviousform(3).findcomponent('GRDDYNAMICGRID'))\r\n then grd := ( getpreviousform(3).findcomponent('GRDDYNAMICGRID') as TWebDBGrid)\r\n else\r\n\r\n if assigned(getpreviousform(4)) and assigned(getpreviousform(4).findcomponent('GRDDYNAMICGRID'))\r\n then grd := ( getpreviousform(4).findcomponent('GRDDYNAMICGRID') as TWebDBGrid)\r\n else\r\n\r\n if assigned(getpreviousform(5)) and assigned(getpreviousform(5).findcomponent('GRDDYNAMICGRID'))\r\n then grd := ( getpreviousform(5).findcomponent('GRDDYNAMICGRID') as TWebDBGrid)\r\n else\r\n\r\n if assigned(getpreviousform(6)) and assigned(getpreviousform(6).findcomponent('GRDDYNAMICGRID'))\r\n then grd := ( getpreviousform(6).findcomponent('GRDDYNAMICGRID') as TWebDBGrid)\r\n else\r\n\r\n if assigned(getpreviousform(7)) and assigned(getpreviousform(7).findcomponent('GRDDYNAMICGRID'))\r\n then grd := ( getpreviousform(7).findcomponent('GRDDYNAMICGRID') as TWebDBGrid)\r\n else\r\n\r\n if assigned(getpreviousform(8)) and assigned(getpreviousform(8).findcomponent('GRDDYNAMICGRID'))\r\n then grd := ( getpreviousform(8).findcomponent('GRDDYNAMICGRID') as TWebDBGrid); }\r\n\r\n{grd := nil; // find the grid on the previous form\r\nif assigned(prevform_p)\r\nthen begin\r\n grd := ( prevform_p.findcomponent('GRDDYNAMICGRID') as TWebDBGrid);\r\n if grd <> nil\r\n then SetKeyVariablesFromDataSet(grd.datasource.dataset, true);\r\n //else SetKeyVariablesFromDataSet(nil, true);\r\n end; }\r\n\r\nDBF_GetPostBlocks(frmmain.sbLogoBox, 0, frmmain);\r\nDBF_GetPostBlocks(frmmain.sbAlertBoxes, 0, frmmain);\r\nDBF_GetPostBlocks(frmmain.sbInfoBoxes, 0, frmmain);\r\n\r\nfrmmain.btnSwitch_Design.state := ssOff;\r\nHideFormContainer(true);\r\n\r\n// in case the browser window size changes we need to realign the hidden ( previous ) form.\r\nif assigned(prevform_p)\r\nthen begin\r\n prevform_p.Realign;\r\n // showmessage('1');\r\n if prevform_p.FindComponent('pnlFormButtons') <> nil then ResizeButtons((prevform_p.FindComponent('pnlFormButtons')as Tpanel));\r\n if prevform_p.FindComponent('pnlReportButtons') <> nil then ResizeButtons((prevform_p.FindComponent('pnlReportButtons')as Tpanel));\r\n // showmessage('2');\r\n\r\n if prevform_p.FindComponent('SUBFORM_DIV') <> nil\r\n then begin\r\n ResizeFormBlocks((prevform_p.FindComponent('SUBFORM_DIV') as TScrollBox), egv_formcolumns);\r\n //OrganizeBlocks((prevform_p.FindComponent('SUBFORM_DIV') as TWebScrollBox));\r\n StretchAllMemos((prevform_p.FindComponent('SUBFORM_DIV') as TScrollBox));\r\n //Form_AdjustGrids(prevform_p);\r\n end;\r\n if grd <> nil\r\n then begin //showmessage(grd.name);\r\n ResizeFormBlocks((prevform_p.FindComponent('sbSearch')as TScrollBox), 20, false);\r\n Grid_AdjustColumns(grd,true);\r\n Grid_SetTitleHeight(grd);\r\n end;\r\n // showmessage('2');\r\n end;\r\n\r\nfrmmain.lblLocation.caption := stringreplace(frmmain.lblLocation.caption,' > ' + pnlFormCaption.Caption + ' ' ,'',[]);\r\nEGV_PKLTARGETGRIDFIELDS := '';\r\n\r\n{EGV_PARENT_DBGRID := nil;\r\nEGV_PKLTARGETMEMO := nil; }\r\n// showmessage(PrevTargetMemo_p.Name);\r\nEGV_BLOCKUNIQUEID := PrevBlockUniqueID_p;\r\nEGV_PKLTARGETMEMO := PrevTargetMemo_p;\r\nEGV_PARENT_DBGRID := PrevGrid_p;\r\nif EGV_PARENT_DBGRID <> nil then EGV_PARENT_DBGRID.Parent := PrevGridParent_p;\r\n\r\nif prevform_p <> nil\r\nthen begin\r\n EGV_CURRENTFORMNAME := prevform_p.Name;\r\n end;\r\nend;\r\n\r\nprocedure TfrmListForm_Base.WebFormCloseQuery(Sender: TObject;\r\n var CanClose: Boolean);\r\nbegin\r\n//showmessage('1 ' + egv_current_mrn);\r\n// showmessage('2 ' + egv_current_mrn);\r\nRestoreKeyVariables;\r\n// CanClose := true;\r\nend;\r\n\r\nprocedure TfrmListForm_Base.WebFormResize(Sender: TObject);\r\nbegin\r\nif not FormIsActive_p then exit;\r\n\r\nGrid_AdjustColumns(GRDDYNAMICGRID,true);\r\nGrid_SetTitleHeight(GRDDYNAMICGRID);\r\nResizeButtons(pnlFormButtons);\r\nResizeButtons(pnlReportButtons);\r\nResizeButtons(pnlTop);\r\n\r\n//showmessage('resize');\r\nResizeFormBlocks(sbSearch, 20, false);\r\n{\r\nif self.Width < 500\r\nthen begin // showmessage('1');\r\n btnCustom1.Width := 30; btnCustom1.MaterialGlyphSize := 18; btnCustom1.Caption := ''; btnCustom1.ShowHint := true;\r\n btnCustom2.Width := 30; btnCustom2.MaterialGlyphSize := 18; btnCustom2.Caption := ''; btnCustom2.ShowHint := true;\r\n btnCustom3.Width := 30; btnCustom3.MaterialGlyphSize := 18; btnCustom3.Caption := ''; btnCustom3.ShowHint := true;\r\n btnCustom4.Width := 30; btnCustom4.MaterialGlyphSize := 18; btnCustom4.Caption := ''; btnCustom4.ShowHint := true;\r\n btnCustom5.Width := 30; btnCustom5.MaterialGlyphSize := 18; btnCustom5.Caption := ''; btnCustom5.ShowHint := true;\r\n\r\n btnClose_RPT.Width := 30; btnClose_RPT.MaterialGlyphSize := 18; btnClose_RPT.Caption := ''; btnClose_RPT.ShowHint := true;\r\n btnSelect.Width := 30; btnSelect.MaterialGlyphSize := 18; btnSelect.Caption := ''; btnSelect.ShowHint := true;\r\n btnClose.Width := 30; btnClose.MaterialGlyphSize := 18; btnClose.Caption := ''; btnClose.ShowHint := true;\r\n btnGridRefresh.Width := 30; btnGridRefresh.MaterialGlyphSize := 18; btnGridRefresh.Caption := ''; btnGridRefresh.ShowHint := true;\r\n\r\n end\r\nelse begin // showmessage('2');\r\n btnCustom1.Width := 100; btnCustom1.MaterialGlyphSize := 1; btnCustom1.Caption := btnCustom1.hint; btnCustom1.ShowHint := false;\r\n btnCustom2.Width := 100; btnCustom2.MaterialGlyphSize := 1; btnCustom2.Caption := btnCustom2.hint; btnCustom2.ShowHint := false;\r\n btnCustom3.Width := 100; btnCustom3.MaterialGlyphSize := 1; btnCustom3.Caption := btnCustom3.hint; btnCustom3.ShowHint := false;\r\n btnCustom4.Width := 100; btnCustom4.MaterialGlyphSize := 1; btnCustom4.Caption := btnCustom4.hint; btnCustom4.ShowHint := false;\r\n btnCustom5.Width := 100; btnCustom5.MaterialGlyphSize := 1; btnCustom5.Caption := btnCustom5.hint; btnCustom5.ShowHint := false;\r\n\r\n btnClose_RPT.Width := 100; btnClose_RPT.MaterialGlyphSize := 1; btnClose_RPT.Caption := btnClose_RPT.hint; btnClose_RPT.ShowHint := false;\r\n btnSelect.Width := 100; btnSelect.MaterialGlyphSize := 1; btnSelect.Caption := btnSelect.hint; btnSelect.ShowHint := false;\r\n btnClose.Width := 100; btnClose.MaterialGlyphSize := 1; btnClose.Caption := btnClose.hint; btnClose.ShowHint := false;\r\n btnGridRefresh.Width := 100; btnGridRefresh.MaterialGlyphSize := 1; btnGridRefresh.Caption := btnGridRefresh.hint; btnGridRefresh.ShowHint := false;\r\n end }\r\n// showmessage('end resize');\r\nend;\r\n\r\nprocedure TfrmListForm_Base.WebFormShow(Sender: TObject);\r\nvar sbSearch_p: TScrollBox;\r\nbegin\r\n\r\n//asm document.title = \"Argus Med-GPT\"; end;\r\n\r\n//showmessage('block id on show: ' + EGV_BLOCKUNIQUEID);\r\nself.Tag := 1;\r\nFormIsActive_p := true;\r\n\r\nPrevBlock_p := EGV_CURRENTBLOCK;\r\nPrevBlockUniqueID_p := EGV_BLOCKUNIQUEID;\r\nPrevTargetMemo_p := EGV_PKLTARGETMEMO;\r\nPrevGrid_p := EGV_PARENT_DBGRID;\r\nif EGV_PARENT_DBGRID <> nil then PrevGridParent_p := EGV_PARENT_DBGRID.Parent;\r\n\r\n{if dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS_' + getcurrentformname]= ''\r\nthen EGV_FORMCOLUMNS := 2\r\nelse EGV_FORMCOLUMNS := inttostr(dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS_' + getcurrentformname]);}\r\n\r\n{if dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH_' + getcurrentformname]= ''\r\nthen EGV_BLOCKDEFAULTWIDTH := 200\r\nelse EGV_BLOCKDEFAULTWIDTH := inttostr(dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH_' + getcurrentformname]);\r\n\r\nEGV_FORMCOLUMNSAUTO := (dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNSAUTO_' + getcurrentformname] = '1'); }\r\n\r\n// showmessage('CURRENTFORMNAME_' + inttostr(getsubform()-1));\r\nEGV_CURRENTFORMNAME := dm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform()-1)];\r\n//showmessage('show ' + inttostr(getsubform()));\r\ncase (getsubform() - 1) of\r\n 1: egv_subform.Name := EGV_CURRENTFORMNAME;\r\n 2: egv_subform2.Name := EGV_CURRENTFORMNAME;\r\n 3: egv_subform3.Name := EGV_CURRENTFORMNAME;\r\n 4: egv_subform4.Name := EGV_CURRENTFORMNAME;\r\n 5: egv_subform5.Name := EGV_CURRENTFORMNAME;\r\n 6: egv_subform6.Name := EGV_CURRENTFORMNAME;\r\n 7: egv_subform7.Name := EGV_CURRENTFORMNAME;\r\n 8: egv_subform8.Name := EGV_CURRENTFORMNAME;\r\n 9: egv_subform9.Name := EGV_CURRENTFORMNAME;\r\n end;\r\n\r\nSaveKeyVariables;\r\n\r\n// showmessage(EGV_CURRENTFORMNAME);\r\n\r\nif dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON1_ICON']<> ''\r\nthen btnCustom1.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON1_ICON']\r\nelse btnCustom1.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON1_CAPTION'];\r\nbtnCustom1.Hint := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON1_CAPTION'];\r\nbtnCustom1.ShowHint := false;\r\n\r\nif dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON2_ICON']<> ''\r\nthen btnCustom2.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON2_ICON']\r\nelse btnCustom2.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON2_CAPTION'];\r\nbtnCustom2.Hint := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON2_CAPTION'];\r\nbtnCustom2.ShowHint := false;\r\n\r\nif dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON3_ICON']<> ''\r\nthen btnCustom3.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON3_ICON']\r\nelse btnCustom3.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON3_CAPTION'];\r\nbtnCustom3.Hint := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON3_CAPTION'];\r\nbtnCustom3.ShowHint := false;\r\n\r\nif dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON4_ICON']<> ''\r\nthen btnCustom4.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON4_ICON']\r\nelse btnCustom4.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON4_CAPTION'];\r\nbtnCustom4.Hint := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON4_CAPTION'];\r\nbtnCustom4.ShowHint := false;\r\n\r\nif dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON5_ICON']<> ''\r\nthen btnCustom5.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON5_ICON']\r\nelse btnCustom5.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON5_CAPTION'];\r\nbtnCustom5.Hint := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON5_CAPTION'];\r\nbtnCustom5.ShowHint := false;\r\n\r\nif dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON6_ICON']<> ''\r\nthen btnCustom6.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON6_ICON']\r\nelse btnCustom6.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON6_CAPTION'];\r\nbtnCustom6.Hint := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON6_CAPTION'];\r\nbtnCustom6.ShowHint := false;\r\n\r\nif dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON7_ICON']<> ''\r\nthen btnCustom7.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON7_ICON']\r\nelse btnCustom7.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON7_CAPTION'];\r\nbtnCustom7.Hint := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON7_CAPTION'];\r\nbtnCustom7.ShowHint := false;\r\n\r\nif dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON8_ICON']<> ''\r\nthen btnCustom8.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON8_ICON']\r\nelse btnCustom8.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON8_CAPTION'];\r\nbtnCustom8.Hint := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON8_CAPTION'];\r\nbtnCustom8.ShowHint := false;\r\n\r\nif dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON9_ICON']<> ''\r\nthen btnCustom9.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON9_ICON']\r\nelse btnCustom9.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON9_CAPTION'];\r\nbtnCustom9.Hint := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON9_CAPTION'];\r\nbtnCustom9.ShowHint := false;\r\n\r\n{\r\nbtnCustom1.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON1_CAPTION'];\r\nbtnCustom1.MaterialGlyph := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON1_ICON'];\r\nbtnCustom1.Hint := btnCustom1.Caption;\r\nbtnCustom1.ShowHint := false;\r\n\r\nbtnCustom2.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON2_CAPTION'];\r\nbtnCustom2.MaterialGlyph := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON2_ICON'];\r\nbtnCustom2.Hint := btnCustom2.Caption;\r\nbtnCustom2.ShowHint := false;\r\nbtnCustom3.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON3_CAPTION'];\r\nbtnCustom3.MaterialGlyph := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON3_ICON'];\r\nbtnCustom3.Hint := btnCustom3.Caption;\r\nbtnCustom3.ShowHint := false;\r\nbtnCustom4.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON4_CAPTION'];\r\nbtnCustom4.MaterialGlyph := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON4_ICON'];\r\nbtnCustom4.Hint := btnCustom4.Caption;\r\nbtnCustom4.ShowHint := false;\r\nbtnCustom5.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON5_CAPTION'];\r\nbtnCustom5.MaterialGlyph := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON5_ICON'];\r\nbtnCustom5.Hint := btnCustom5.Caption;\r\nbtnCustom5.ShowHint := false;\r\nbtnCustom6.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON6_CAPTION'];\r\nbtnCustom6.MaterialGlyph := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON6_ICON'];\r\nbtnCustom6.Hint := btnCustom6.Caption;\r\nbtnCustom6.ShowHint := false;\r\nbtnCustom7.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON7_CAPTION'];\r\nbtnCustom7.MaterialGlyph := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON7_ICON'];\r\nbtnCustom7.Hint := btnCustom7.Caption;\r\nbtnCustom7.ShowHint := false;\r\nbtnCustom8.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON8_CAPTION'];\r\nbtnCustom8.MaterialGlyph := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON8_ICON'];\r\nbtnCustom8.Hint := btnCustom8.Caption;\r\nbtnCustom8.ShowHint := false;\r\nbtnCustom9.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON9_CAPTION'];\r\nbtnCustom9.MaterialGlyph := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON9_ICON'];\r\nbtnCustom9.Hint := btnCustom9.Caption;\r\nbtnCustom9.ShowHint := false; }\r\n\r\nif (uppercase(btnCustom1.hint) = 'POST') or (uppercase(btnCustom2.hint) = 'POST') or (uppercase(btnCustom3.hint) = 'POST') or\r\n (uppercase(btnCustom4.hint) = 'POST') or (uppercase(btnCustom5.hint) = 'POST') or (uppercase(btnCustom6.hint) = 'POST') or\r\n (uppercase(btnCustom7.hint) = 'POST') or (uppercase(btnCustom8.hint) = 'POST') or (uppercase(btnCustom9.hint) = 'POST')\r\nthen grdDynamicGrid.Options := grdDynamicGrid.Options + [goEditing]\r\nelse grdDynamicGrid.Options := grdDynamicGrid.Options - [goEditing];\r\n\r\npnlFormCaption.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_FORM_CAPTION'];\r\nfrmmain.lblLocation.caption := frmmain.lblLocation.caption + ' > ' + pnlFormCaption.Caption + ' ';\r\n//showmessage(dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_FORMTITLE']);\r\n\r\nGetPostFormDesignData(getcurrentform.name, 'V', 0, sbSearch,20);\r\nGetPostFormDesignData(getcurrentform.name, 'P', 0, sbSearch,20);\r\nGetPostFormDesignData(getcurrentform.name, 'T', 0, sbSearch,20, true);\r\n\r\nfrmmain.tmGenTimer.tag := 3;\r\nfrmmain.tmGenTimer.Enabled := true;\r\n\r\n\r\n//StretchAllMemos(sbSearch);\r\n//ResizeFormBlocks(sbSearch,10, false);\r\n\r\n//Grid_AdjustColumns(GRDDYNAMICGRID, true);\r\n\r\n// showmessage(EGV_CURRENTFORMNAME + '_EDIT_BUTTONTITLE');\r\n// showmessage(dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON1_FORM']);\r\n\r\nbtnCustom1.width := 90;\r\nbtnCustom2.width := 90;\r\nbtnCustom3.width := 90;\r\nbtnCustom4.width := 90;\r\nbtnCustom5.width := 90;\r\nbtnCustom6.width := 90;\r\nbtnCustom7.width := 90;\r\nbtnCustom8.width := 90;\r\nbtnCustom9.width := 90;\r\n\r\nbtnCustom1.visible := ( (btnCustom1.caption <> 'undefined') and ((btnCustom1.caption <> '') and (btnCustom1.hint <> '')) );\r\nbtnCustom2.visible := ( (btnCustom2.caption <> 'undefined') and ((btnCustom2.caption <> '') and (btnCustom2.hint <> '')) );\r\nbtnCustom3.visible := ( (btnCustom3.caption <> 'undefined') and ((btnCustom3.caption <> '') and (btnCustom3.hint <> '')) );\r\nbtnCustom4.visible := ( (btnCustom4.caption <> 'undefined') and ((btnCustom4.caption <> '') and (btnCustom4.hint <> '')) );\r\nbtnCustom5.visible := ( (btnCustom5.caption <> 'undefined') and ((btnCustom5.caption <> '') and (btnCustom5.hint <> '')) );\r\nbtnCustom6.visible := ( (btnCustom5.caption <> 'undefined') and ((btnCustom6.caption <> '') and (btnCustom6.hint <> '')) );\r\nbtnCustom7.visible := ( (btnCustom5.caption <> 'undefined') and ((btnCustom7.caption <> '') and (btnCustom7.hint <> '')) );\r\nbtnCustom8.visible := ( (btnCustom5.caption <> 'undefined') and ((btnCustom8.caption <> '') and (btnCustom8.hint <> '')) );\r\nbtnCustom9.visible := ( (btnCustom5.caption <> 'undefined') and ((btnCustom9.caption <> '') and (btnCustom9.hint <> '')) );\r\n\r\nbtnSelect.visible := ( assigned(EGV_PKLTARGETMEMO) or assigned(EGV_PARENT_DBGRID));\r\nbtnSave.visible := assigned(EGV_PKLTARGETMEMO);\r\nbtnClear.visible := assigned(EGV_PKLTARGETMEMO);\r\nmemo.Visible := assigned(EGV_PKLTARGETMEMO);\r\n{if ( assigned(EGV_PKLTARGETMEMO) or assigned(EGV_PARENT_DBGRID))\r\nthen GRDDYNAMICGRID.Options := GRDDYNAMICGRID.Options - [goEditing]\r\nelse GRDDYNAMICGRID.Options := GRDDYNAMICGRID.Options + [goEditing];}\r\nif assigned(EGV_PKLTARGETMEMO) then memo.Text := EGV_PKLTARGETMEMO.Text;\r\n\r\ndpStartDate.date := date;\r\ndpEndDate.date := date;\r\n\r\n//showmessage('show 1');\r\n\r\nGRDDYNAMICGRID.datasource := GetDynamicGridDataSource();\r\n\r\n//tmGridRefreshClick.Enabled := true;\r\n//btnApplyFilterClick(nil);\r\n\r\nDBF_GetPostBlocks(sbSearch, 0, getcurrentform);\r\n\r\n\r\n//if self.Tag = 1 then btnFilter.click;\r\n//if (EGV_PKLTARGETMEMO <> nil) then begin showmessage(EGV_PKLTARGETMEMO.name); btnFilter.click; end;\r\n\r\npnlFormButtons.Align := alClient;\r\n\r\n//12345 if frmmain.wmWaitMessage.showing then frmmain.wmWaitMessage.hide;\r\n\r\nResizeButtons(pnlFormButtons);\r\nResizeButtons(pnlReportButtons);\r\nResizeButtons(pnlTop);\r\nend;\r\n\r\nprocedure TfrmListForm_Base.WebPanel12MouseMove(Sender: TObject;\r\n Shift: TShiftState; X, Y: Integer);\r\nbegin\r\nBlock_MouseMove(((Sender as TControl).parent as TPanel),[],0,0,\r\n 'btnClearBlockData,btnDefaultBlockData,btnQPKLDatePicker, ' +\r\n 'btnQPKLTimePicker,btnDBField_Settings,btnQuickPicklistSettings', getcurrentform);\r\nend;\r\n\r\nprocedure TfrmListForm_Base.WebSpeedButton10Click(Sender: TObject);\r\nbegin\r\ndpStartDate.date := dpStartDate.date - 1;\r\ndpEndDate.date := dpEndDate.date - 1;\r\nbtnGridRefreshclick(nil);\r\nend;\r\n\r\nprocedure TfrmListForm_Base.WebSpeedButton11Click(Sender: TObject);\r\nbegin\r\ndpStartDate.date := dpStartDate.date + 1;\r\ndpEndDate.date := dpEndDate.date + 1;\r\nbtnGridRefreshclick(nil);\r\nend;\r\n\r\nprocedure TfrmListForm_Base.WebSpeedButton12Click(Sender: TObject);\r\nbegin\r\ncldDayRange.selecteddate := date;\r\ncldDayRange.visible := ( not cldDayRange.visible);\r\nend;\r\n\r\nprocedure TfrmListForm_Base.WebSpeedButton8Click(Sender: TObject);\r\nbegin\r\ndpStartdate.date := date;\r\ndpEnddate.date := date;\r\nbtnGridRefreshClick(nil);\r\nend;\r\n\r\nprocedure TfrmListForm_Base.M1Change(Sender: TObject);\r\nbegin\r\n(sender as Tmemo).Text := stringreplace((sender as Tmemo).Text, chr(10), '', [rfReplaceAll]);\r\n//showmessage((sender as TWebmemo).Text);\r\nbtnApplyFilterClick(nil);\r\nend;\r\n\r\nprocedure TfrmListForm_Base.M1DragOver(Sender, Source: TObject; X,\r\n Y: Integer; State: TDragState; var Accept: Boolean);\r\nbegin\r\nAccept := false;\r\nend;\r\n\r\nprocedure TfrmListForm_Base.M1KeyDown(Sender: TObject; var Key: Word;\r\n Shift: TShiftState);\r\nbegin\r\nif Key = 13\r\nthen btnApplyFilterClick(nil);\r\n//tmFixFiltermemos.Enabled := true;\r\nend;\r\n\r\nprocedure TfrmListForm_Base.M1MouseMove(Sender: TObject;\r\n Shift: TShiftState; X, Y: Integer);\r\nbegin\r\nBlock_MouseMove((Sender as TMemo).Parent, Shift, X, Y,\r\n 'btnClearBlockData,btnDefaultBlockData,btnQPKLDatePicker, ' +\r\n 'btnQPKLTimePicker,btnDBField_Settings,btnQuickPicklistSettings,miClearCache',\r\n getcurrentform);\r\n\r\n // showmessage(EGV_BLOCKUNIQUEID);\r\nif uppercase(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE']) = '0'\r\nthen BlockInsertFromDatePicker(nil)\r\nelse if uppercase(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE']) = '1'\r\n then BlockInsertFromTimePicker(nil)\r\n else if uppercase(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE']) = '2'\r\n then begin\r\n //showmessage('radio group');\r\n frmmain.rgBlockRadioGroup.tag := 1; // activated. used instead of 'visible' because if we make it visible here\r\n // it shows the old data from previous block bfore showing the rigt one;\r\n // this tag will be used as an indicator that radiogroup must be made visible after filled with data\r\n // in QPKL_LoadFromDataset.\r\n BlockInsertRadioGroup(Sender);\r\n end\r\n else if uppercase(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE']) = '3'\r\n then begin\r\n // showmessage('spin edit');\r\n BlockInsertSpinEdit(Sender);\r\n end;\r\n\r\nend;\r\n\r\nprocedure TfrmListForm_Base.pnlSearchMouseLeave(Sender: TObject);\r\nbegin\r\n//EGV_PKLTARGETMEMO := nil;\r\n//showmessage('1');\r\nend;\r\n\r\nprocedure TfrmListForm_Base.tbReportChange(Sender: TObject);\r\nbegin\r\ntry\r\nviewpdf.url := '';\r\nif tbReport.State = ssOn\r\nthen begin\r\n viewpdf.Visible := false;\r\n viewpdf.align := alNone;\r\n viewpdf.Parent := self;\r\n viewpdf.align := alClient;\r\n pnlMain.Visible := false;\r\n viewpdf.visible := true;\r\n\r\n //12345 frmmain.wmWaitMessage.Show;\r\n Runreport(Viewpdf, 'NURHISTORY', 1);\r\n\r\n pnlFormButtons.Visible := false;\r\n pnlReportButtons.Visible := true;\r\n pnlReportButtons.Align := alClient;\r\n end\r\nelse begin\r\n viewpdf.Visible := false;\r\n pnlMain.Visible := true;\r\n pnlFormButtons.Visible := true;\r\n pnlFormButtons.Align := alClient;\r\n pnlReportButtons.Visible := false;\r\n end;\r\nfinally\r\nWebFormResize(self);\r\nend;\r\nend;\r\n\r\nprocedure TfrmListForm_Base.tmCloseWaitMessageTimer(Sender: TObject);\r\nbegin\r\n(Sender as TTimer).enabled := false;\r\n// 12345 frmmain.wmWaitMessage.Hide;\r\nend;\r\n\r\nprocedure TfrmListForm_Base.tmFixFiltermemosTimer(Sender: TObject);\r\nbegin\r\n{tmFixFiltermemos.Enabled := false;\r\nbtnApplyFilterClick(nil);}\r\nend;\r\n\r\nprocedure TfrmListForm_Base.tmGridRefreshClickTimer(Sender: TObject);\r\nbegin\r\n(Sender as TTimer).enabled := false;\r\n//btnGridRefreshClick(nil);\r\nbtnApplyFilterClick(nil);\r\nend;\r\n\r\nprocedure TfrmListForm_Base._BlockTitleEdit(Sender: TObject);\r\nbegin\r\nBlockTitleEdit(Sender);\r\nend;\r\n\r\nprocedure TfrmListForm_Base._BlockTitle_MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);\r\nbegin\r\n//showmessage(getcurrentform.name);\r\nBlock_MouseMove((((Sender as TControl).parent as TPanel).Parent as TPanel),[],0,0,\r\n 'btnClearBlockData,btnDefaultBlockData,btnQPKLDatePicker, ' +\r\n 'btnQPKLTimePicker,btnDBField_Settings,btnQuickPicklistSettings,miClearCache', getcurrentform);\r\nend;\r\n\r\nprocedure TfrmListForm_Base._Block_MouseLeave(Sender: TObject);\r\nbegin\r\nBlock_MouseLeave(Sender);\r\nend;\r\n\r\nprocedure TfrmListForm_Base._Block_MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);\r\nbegin\r\n//showmessage(getcurrentform.name);\r\nBlock_MouseMove(Sender, Shift, X, Y, 'btnClearBlockData,btnDefaultBlockData,btnQPKLDatePicker, ' +\r\n 'btnQPKLTimePicker,btnDBField_Settings,btnQuickPicklistSettings,miClearCache', getcurrentform);\r\nend;\r\n\r\nprocedure TfrmListForm_Base._BlockCallPickForm(Sender: Tobject);\r\nbegin\r\nBlockCallPickForm(Sender);\r\nend;\r\n\r\nprocedure TfrmListForm_Base.BuildCernerSearchString;\r\nvar i, j: integer; b: Tcontrol; m: TMemo; c: TComponent;\r\n s, containername_p, block_id: string;\r\nbegin\r\nif ELV_CERNERPATIENTSEARCHPARAMS <> '' then exit; //'_count=100'; // 100 records max.\r\nEGV_PKLTARGETMEMO := nil;\r\nif frmmain.clQuickPicklist.visible then frmmain.btnCloseQuickPickListClick(nil);\r\nfor i := 0 to sbSearch.controlcount - 1\r\ndo begin\r\n b := sbSearch.controls[i];\r\n if (b is Tpanel) and (b as TPanel).visible\r\n then begin\r\n // showmessage(b.name);\r\n m := nil;\r\n for j := 0 to b.controlcount - 1\r\n do if (b.controls[j] is TMemo) then begin m := (b.controls[j] as TMemo); break; end;\r\n if not assigned(m) then continue;\r\n block_id := GetBlockUniqueID(( b as TPanel), false);\r\n s := dm.egv_localstorage.values['DBF_' + block_id];\r\n //showmessage(b.Name + ' --- ' + m.text + ' --- ' + block_id);\r\n if s <> ''\r\n then begin\r\n if (m.Text <> '') and (length(splitstring(s,'|')) >= 28)\r\n then if uppercase(splitstring(s,'|')[27]) = '_ID'\r\n then begin\r\n ELV_CERNERPATIENTSEARCHPARAMS := splitstring(s,'|')[27]+ '=' + m.Text;\r\n break;\r\n end\r\n else if ELV_CERNERPATIENTSEARCHPARAMS = ''\r\n then ELV_CERNERPATIENTSEARCHPARAMS := '_count=100&' + splitstring(s,'|')[27]+ '=' + m.Text\r\n else ELV_CERNERPATIENTSEARCHPARAMS := ELV_CERNERPATIENTSEARCHPARAMS + '&' + splitstring(s,'|')[27]+ '=' + m.Text;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\n\r\nprocedure TfrmListForm_Base.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n WebLabel10 := TLabel.Create(Self);\r\n WebLabel11 := TLabel.Create(Self);\r\n WebLabel8 := TLabel.Create(Self);\r\n pnlTop := TPanel.Create(Self);\r\n LFB_dateRange := TPanel.Create(Self);\r\n dpStartDate := TDateTimePicker.Create(Self);\r\n dpEndDate := TDateTimePicker.Create(Self);\r\n WebSpeedButton9 := TSpeedButton.Create(Self);\r\n btnRange_calendar := TBitBtn.Create(Self);\r\n btnRange_todaye := TBitBtn.Create(Self);\r\n btnRange_dayback := TBitBtn.Create(Self);\r\n btnRange_dayforward := TBitBtn.Create(Self);\r\n chApplyDateRange := TCheckBox.Create(Self);\r\n btnGridRefresh := TBitBtn.Create(Self);\r\n btnGridSetup := TBitBtn.Create(Self);\r\n pnlBottom := TPanel.Create(Self);\r\n tbReport := TTMSFNCSwitch.Create(Self);\r\n pnlFormButtons := TPanel.Create(Self);\r\n btnCustom1 := TBitBtn.Create(Self);\r\n btnCustom2 := TBitBtn.Create(Self);\r\n btnCustom3 := TBitBtn.Create(Self);\r\n btnCustom4 := TBitBtn.Create(Self);\r\n btnCustom5 := TBitBtn.Create(Self);\r\n btnSelect := TBitBtn.Create(Self);\r\n btnClose := TBitBtn.Create(Self);\r\n btnClear := TBitBtn.Create(Self);\r\n btnSave := TBitBtn.Create(Self);\r\n btnCustom6 := TBitBtn.Create(Self);\r\n btnCustom7 := TBitBtn.Create(Self);\r\n btnCustom8 := TBitBtn.Create(Self);\r\n btnCustom9 := TBitBtn.Create(Self);\r\n pnlReportButtons := TPanel.Create(Self);\r\n btnClose_RPT := TBitBtn.Create(Self);\r\n pnlMain := TPanel.Create(Self);\r\n pnlSearch := TPanel.Create(Self);\r\n sbSearch := TScrollBox.Create(Self);\r\n B6 := TPanel.Create(Self);\r\n WebPanel2 := TPanel.Create(Self);\r\n WebLabel1 := TLabel.Create(Self);\r\n WebSpeedButton7 := TSpeedButton.Create(Self);\r\n M6 := TMemo.Create(Self);\r\n btnFltIcon6 := TBitBtn.Create(Self);\r\n B5 := TPanel.Create(Self);\r\n WebPanel4 := TPanel.Create(Self);\r\n WebLabel2 := TLabel.Create(Self);\r\n WebSpeedButton5 := TSpeedButton.Create(Self);\r\n M5 := TMemo.Create(Self);\r\n btnFltIcon5 := TBitBtn.Create(Self);\r\n B4 := TPanel.Create(Self);\r\n WebPanel6 := TPanel.Create(Self);\r\n WebLabel3 := TLabel.Create(Self);\r\n WebSpeedButton4 := TSpeedButton.Create(Self);\r\n M4 := TMemo.Create(Self);\r\n btnFltIcon4 := TBitBtn.Create(Self);\r\n B3 := TPanel.Create(Self);\r\n WebPanel8 := TPanel.Create(Self);\r\n WebLabel4 := TLabel.Create(Self);\r\n WebSpeedButton3 := TSpeedButton.Create(Self);\r\n M3 := TMemo.Create(Self);\r\n btnFltIcon3 := TBitBtn.Create(Self);\r\n B2 := TPanel.Create(Self);\r\n WebPanel10 := TPanel.Create(Self);\r\n WebLabel5 := TLabel.Create(Self);\r\n WebSpeedButton2 := TSpeedButton.Create(Self);\r\n M2 := TMemo.Create(Self);\r\n btnFltIcon2 := TBitBtn.Create(Self);\r\n B1 := TPanel.Create(Self);\r\n WebPanel12 := TPanel.Create(Self);\r\n WebLabel6 := TLabel.Create(Self);\r\n WebSpeedButton1 := TSpeedButton.Create(Self);\r\n M1 := TMemo.Create(Self);\r\n btnFltIcon1 := TBitBtn.Create(Self);\r\n B7 := TPanel.Create(Self);\r\n WebPanel70 := TPanel.Create(Self);\r\n WebLabel36 := TLabel.Create(Self);\r\n WebSpeedButton6 := TSpeedButton.Create(Self);\r\n M7 := TMemo.Create(Self);\r\n btnFltIcon7 := TBitBtn.Create(Self);\r\n B8 := TPanel.Create(Self);\r\n WebPanel3 := TPanel.Create(Self);\r\n WebLabel12 := TLabel.Create(Self);\r\n WebSpeedButton13 := TSpeedButton.Create(Self);\r\n M8 := TMemo.Create(Self);\r\n btnFltIcon8 := TBitBtn.Create(Self);\r\n B9 := TPanel.Create(Self);\r\n WebPanel7 := TPanel.Create(Self);\r\n WebLabel13 := TLabel.Create(Self);\r\n WebSpeedButton14 := TSpeedButton.Create(Self);\r\n M9 := TMemo.Create(Self);\r\n btnFltIcon9 := TBitBtn.Create(Self);\r\n B10 := TPanel.Create(Self);\r\n WebPanel11 := TPanel.Create(Self);\r\n WebLabel14 := TLabel.Create(Self);\r\n WebSpeedButton15 := TSpeedButton.Create(Self);\r\n M10 := TMemo.Create(Self);\r\n btnFltIcon10 := TBitBtn.Create(Self);\r\n B11 := TPanel.Create(Self);\r\n WebPanel9 := TPanel.Create(Self);\r\n WebLabel7 := TLabel.Create(Self);\r\n WebSpeedButton17 := TSpeedButton.Create(Self);\r\n M11 := TMemo.Create(Self);\r\n btnFltIcon11 := TBitBtn.Create(Self);\r\n B12 := TPanel.Create(Self);\r\n WebPanel14 := TPanel.Create(Self);\r\n WebLabel9 := TLabel.Create(Self);\r\n WebSpeedButton18 := TSpeedButton.Create(Self);\r\n M12 := TMemo.Create(Self);\r\n btnFltIcon12 := TBitBtn.Create(Self);\r\n B13 := TPanel.Create(Self);\r\n WebPanel16 := TPanel.Create(Self);\r\n WebLabel15 := TLabel.Create(Self);\r\n WebSpeedButton19 := TSpeedButton.Create(Self);\r\n M13 := TMemo.Create(Self);\r\n btnFltIcon13 := TBitBtn.Create(Self);\r\n B14 := TPanel.Create(Self);\r\n WebPanel18 := TPanel.Create(Self);\r\n WebLabel16 := TLabel.Create(Self);\r\n WebSpeedButton20 := TSpeedButton.Create(Self);\r\n M14 := TMemo.Create(Self);\r\n btnFltIcon14 := TBitBtn.Create(Self);\r\n B15 := TPanel.Create(Self);\r\n WebPanel20 := TPanel.Create(Self);\r\n WebLabel17 := TLabel.Create(Self);\r\n WebSpeedButton21 := TSpeedButton.Create(Self);\r\n M15 := TMemo.Create(Self);\r\n btnFltIcon15 := TBitBtn.Create(Self);\r\n B16 := TPanel.Create(Self);\r\n WebPanel22 := TPanel.Create(Self);\r\n WebLabel18 := TLabel.Create(Self);\r\n WebSpeedButton22 := TSpeedButton.Create(Self);\r\n M16 := TMemo.Create(Self);\r\n btnFltIcon16 := TBitBtn.Create(Self);\r\n B17 := TPanel.Create(Self);\r\n WebPanel24 := TPanel.Create(Self);\r\n WebLabel19 := TLabel.Create(Self);\r\n WebSpeedButton23 := TSpeedButton.Create(Self);\r\n M17 := TMemo.Create(Self);\r\n btnFltIcon17 := TBitBtn.Create(Self);\r\n B18 := TPanel.Create(Self);\r\n WebPanel26 := TPanel.Create(Self);\r\n WebLabel20 := TLabel.Create(Self);\r\n WebSpeedButton24 := TSpeedButton.Create(Self);\r\n M18 := TMemo.Create(Self);\r\n btnFltIcon18 := TBitBtn.Create(Self);\r\n B19 := TPanel.Create(Self);\r\n WebPanel28 := TPanel.Create(Self);\r\n WebLabel21 := TLabel.Create(Self);\r\n WebSpeedButton25 := TSpeedButton.Create(Self);\r\n M19 := TMemo.Create(Self);\r\n btnFltIcon19 := TBitBtn.Create(Self);\r\n B20 := TPanel.Create(Self);\r\n WebPanel30 := TPanel.Create(Self);\r\n WebLabel22 := TLabel.Create(Self);\r\n WebSpeedButton26 := TSpeedButton.Create(Self);\r\n M20 := TMemo.Create(Self);\r\n btnFltIcon20 := TBitBtn.Create(Self);\r\n WebPanel1 := TPanel.Create(Self);\r\n btnClearFilter := TBitBtn.Create(Self);\r\n btnApplyFilter := TBitBtn.Create(Self);\r\n btnCernerSearch := TBitBtn.Create(Self);\r\n grdDynamicGrid := TDBGrid.Create(Self);\r\n cldDayRange := TCalendar.Create(Self);\r\n viewpdf := TBrowserControl.Create(Self);\r\n WebSpeedButton16 := TSpeedButton.Create(Self);\r\n mdDialogDelete := TMessageDlg.Create(Self);\r\n Memo := TMemo.Create(Self);\r\n pnlFormCaption := TPanel.Create(Self);\r\n wmWaitMessage := TWaitMessage.Create(Self);\r\n tmGridRefreshClick := TTimer.Create(Self);\r\n tmCloseWaitMessage := TTimer.Create(Self);\r\n tmFixFiltermemos := TTimer.Create(Self);\r\n\r\n WebLabel10.BeforeLoadDFMValues;\r\n WebLabel11.BeforeLoadDFMValues;\r\n WebLabel8.BeforeLoadDFMValues;\r\n pnlTop.BeforeLoadDFMValues;\r\n LFB_dateRange.BeforeLoadDFMValues;\r\n dpStartDate.BeforeLoadDFMValues;\r\n dpEndDate.BeforeLoadDFMValues;\r\n WebSpeedButton9.BeforeLoadDFMValues;\r\n btnRange_calendar.BeforeLoadDFMValues;\r\n btnRange_todaye.BeforeLoadDFMValues;\r\n btnRange_dayback.BeforeLoadDFMValues;\r\n btnRange_dayforward.BeforeLoadDFMValues;\r\n chApplyDateRange.BeforeLoadDFMValues;\r\n btnGridRefresh.BeforeLoadDFMValues;\r\n btnGridSetup.BeforeLoadDFMValues;\r\n pnlBottom.BeforeLoadDFMValues;\r\n tbReport.BeforeLoadDFMValues;\r\n pnlFormButtons.BeforeLoadDFMValues;\r\n btnCustom1.BeforeLoadDFMValues;\r\n btnCustom2.BeforeLoadDFMValues;\r\n btnCustom3.BeforeLoadDFMValues;\r\n btnCustom4.BeforeLoadDFMValues;\r\n btnCustom5.BeforeLoadDFMValues;\r\n btnSelect.BeforeLoadDFMValues;\r\n btnClose.BeforeLoadDFMValues;\r\n btnClear.BeforeLoadDFMValues;\r\n btnSave.BeforeLoadDFMValues;\r\n btnCustom6.BeforeLoadDFMValues;\r\n btnCustom7.BeforeLoadDFMValues;\r\n btnCustom8.BeforeLoadDFMValues;\r\n btnCustom9.BeforeLoadDFMValues;\r\n pnlReportButtons.BeforeLoadDFMValues;\r\n btnClose_RPT.BeforeLoadDFMValues;\r\n pnlMain.BeforeLoadDFMValues;\r\n pnlSearch.BeforeLoadDFMValues;\r\n sbSearch.BeforeLoadDFMValues;\r\n B6.BeforeLoadDFMValues;\r\n WebPanel2.BeforeLoadDFMValues;\r\n WebLabel1.BeforeLoadDFMValues;\r\n WebSpeedButton7.BeforeLoadDFMValues;\r\n M6.BeforeLoadDFMValues;\r\n btnFltIcon6.BeforeLoadDFMValues;\r\n B5.BeforeLoadDFMValues;\r\n WebPanel4.BeforeLoadDFMValues;\r\n WebLabel2.BeforeLoadDFMValues;\r\n WebSpeedButton5.BeforeLoadDFMValues;\r\n M5.BeforeLoadDFMValues;\r\n btnFltIcon5.BeforeLoadDFMValues;\r\n B4.BeforeLoadDFMValues;\r\n WebPanel6.BeforeLoadDFMValues;\r\n WebLabel3.BeforeLoadDFMValues;\r\n WebSpeedButton4.BeforeLoadDFMValues;\r\n M4.BeforeLoadDFMValues;\r\n btnFltIcon4.BeforeLoadDFMValues;\r\n B3.BeforeLoadDFMValues;\r\n WebPanel8.BeforeLoadDFMValues;\r\n WebLabel4.BeforeLoadDFMValues;\r\n WebSpeedButton3.BeforeLoadDFMValues;\r\n M3.BeforeLoadDFMValues;\r\n btnFltIcon3.BeforeLoadDFMValues;\r\n B2.BeforeLoadDFMValues;\r\n WebPanel10.BeforeLoadDFMValues;\r\n WebLabel5.BeforeLoadDFMValues;\r\n WebSpeedButton2.BeforeLoadDFMValues;\r\n M2.BeforeLoadDFMValues;\r\n btnFltIcon2.BeforeLoadDFMValues;\r\n B1.BeforeLoadDFMValues;\r\n WebPanel12.BeforeLoadDFMValues;\r\n WebLabel6.BeforeLoadDFMValues;\r\n WebSpeedButton1.BeforeLoadDFMValues;\r\n M1.BeforeLoadDFMValues;\r\n btnFltIcon1.BeforeLoadDFMValues;\r\n B7.BeforeLoadDFMValues;\r\n WebPanel70.BeforeLoadDFMValues;\r\n WebLabel36.BeforeLoadDFMValues;\r\n WebSpeedButton6.BeforeLoadDFMValues;\r\n M7.BeforeLoadDFMValues;\r\n btnFltIcon7.BeforeLoadDFMValues;\r\n B8.BeforeLoadDFMValues;\r\n WebPanel3.BeforeLoadDFMValues;\r\n WebLabel12.BeforeLoadDFMValues;\r\n WebSpeedButton13.BeforeLoadDFMValues;\r\n M8.BeforeLoadDFMValues;\r\n btnFltIcon8.BeforeLoadDFMValues;\r\n B9.BeforeLoadDFMValues;\r\n WebPanel7.BeforeLoadDFMValues;\r\n WebLabel13.BeforeLoadDFMValues;\r\n WebSpeedButton14.BeforeLoadDFMValues;\r\n M9.BeforeLoadDFMValues;\r\n btnFltIcon9.BeforeLoadDFMValues;\r\n B10.BeforeLoadDFMValues;\r\n WebPanel11.BeforeLoadDFMValues;\r\n WebLabel14.BeforeLoadDFMValues;\r\n WebSpeedButton15.BeforeLoadDFMValues;\r\n M10.BeforeLoadDFMValues;\r\n btnFltIcon10.BeforeLoadDFMValues;\r\n B11.BeforeLoadDFMValues;\r\n WebPanel9.BeforeLoadDFMValues;\r\n WebLabel7.BeforeLoadDFMValues;\r\n WebSpeedButton17.BeforeLoadDFMValues;\r\n M11.BeforeLoadDFMValues;\r\n btnFltIcon11.BeforeLoadDFMValues;\r\n B12.BeforeLoadDFMValues;\r\n WebPanel14.BeforeLoadDFMValues;\r\n WebLabel9.BeforeLoadDFMValues;\r\n WebSpeedButton18.BeforeLoadDFMValues;\r\n M12.BeforeLoadDFMValues;\r\n btnFltIcon12.BeforeLoadDFMValues;\r\n B13.BeforeLoadDFMValues;\r\n WebPanel16.BeforeLoadDFMValues;\r\n WebLabel15.BeforeLoadDFMValues;\r\n WebSpeedButton19.BeforeLoadDFMValues;\r\n M13.BeforeLoadDFMValues;\r\n btnFltIcon13.BeforeLoadDFMValues;\r\n B14.BeforeLoadDFMValues;\r\n WebPanel18.BeforeLoadDFMValues;\r\n WebLabel16.BeforeLoadDFMValues;\r\n WebSpeedButton20.BeforeLoadDFMValues;\r\n M14.BeforeLoadDFMValues;\r\n btnFltIcon14.BeforeLoadDFMValues;\r\n B15.BeforeLoadDFMValues;\r\n WebPanel20.BeforeLoadDFMValues;\r\n WebLabel17.BeforeLoadDFMValues;\r\n WebSpeedButton21.BeforeLoadDFMValues;\r\n M15.BeforeLoadDFMValues;\r\n btnFltIcon15.BeforeLoadDFMValues;\r\n B16.BeforeLoadDFMValues;\r\n WebPanel22.BeforeLoadDFMValues;\r\n WebLabel18.BeforeLoadDFMValues;\r\n WebSpeedButton22.BeforeLoadDFMValues;\r\n M16.BeforeLoadDFMValues;\r\n btnFltIcon16.BeforeLoadDFMValues;\r\n B17.BeforeLoadDFMValues;\r\n WebPanel24.BeforeLoadDFMValues;\r\n WebLabel19.BeforeLoadDFMValues;\r\n WebSpeedButton23.BeforeLoadDFMValues;\r\n M17.BeforeLoadDFMValues;\r\n btnFltIcon17.BeforeLoadDFMValues;\r\n B18.BeforeLoadDFMValues;\r\n WebPanel26.BeforeLoadDFMValues;\r\n WebLabel20.BeforeLoadDFMValues;\r\n WebSpeedButton24.BeforeLoadDFMValues;\r\n M18.BeforeLoadDFMValues;\r\n btnFltIcon18.BeforeLoadDFMValues;\r\n B19.BeforeLoadDFMValues;\r\n WebPanel28.BeforeLoadDFMValues;\r\n WebLabel21.BeforeLoadDFMValues;\r\n WebSpeedButton25.BeforeLoadDFMValues;\r\n M19.BeforeLoadDFMValues;\r\n btnFltIcon19.BeforeLoadDFMValues;\r\n B20.BeforeLoadDFMValues;\r\n WebPanel30.BeforeLoadDFMValues;\r\n WebLabel22.BeforeLoadDFMValues;\r\n WebSpeedButton26.BeforeLoadDFMValues;\r\n M20.BeforeLoadDFMValues;\r\n btnFltIcon20.BeforeLoadDFMValues;\r\n WebPanel1.BeforeLoadDFMValues;\r\n btnClearFilter.BeforeLoadDFMValues;\r\n btnApplyFilter.BeforeLoadDFMValues;\r\n btnCernerSearch.BeforeLoadDFMValues;\r\n grdDynamicGrid.BeforeLoadDFMValues;\r\n cldDayRange.BeforeLoadDFMValues;\r\n viewpdf.BeforeLoadDFMValues;\r\n WebSpeedButton16.BeforeLoadDFMValues;\r\n mdDialogDelete.BeforeLoadDFMValues;\r\n Memo.BeforeLoadDFMValues;\r\n pnlFormCaption.BeforeLoadDFMValues;\r\n wmWaitMessage.BeforeLoadDFMValues;\r\n tmGridRefreshClick.BeforeLoadDFMValues;\r\n tmCloseWaitMessage.BeforeLoadDFMValues;\r\n tmFixFiltermemos.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmListForm_Base';\r\n Width := 1450;\r\n Height := 1000;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnClose', 'WebFormClose');\r\n SetEvent(Self, 'OnCloseQuery', 'WebFormCloseQuery');\r\n SetEvent(Self, 'OnResize', 'WebFormResize');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n WebLabel10.SetParentComponent(Self);\r\n WebLabel10.Name := 'WebLabel10';\r\n WebLabel10.Left := 0;\r\n WebLabel10.Top := 65;\r\n WebLabel10.Width := 3;\r\n WebLabel10.Height := 800;\r\n WebLabel10.Align := alLeft;\r\n WebLabel10.HeightPercent := 100.000000000000000000;\r\n WebLabel10.WidthPercent := 100.000000000000000000;\r\n WebLabel11.SetParentComponent(Self);\r\n WebLabel11.Name := 'WebLabel11';\r\n WebLabel11.Left := 0;\r\n WebLabel11.Top := 946;\r\n WebLabel11.Width := 1450;\r\n WebLabel11.Height := 13;\r\n WebLabel11.Align := alBottom;\r\n WebLabel11.HeightPercent := 100.000000000000000000;\r\n WebLabel11.WidthPercent := 100.000000000000000000;\r\n WebLabel8.SetParentComponent(Self);\r\n WebLabel8.Name := 'WebLabel8';\r\n WebLabel8.Left := 0;\r\n WebLabel8.Top := 865;\r\n WebLabel8.Width := 1450;\r\n WebLabel8.Height := 13;\r\n WebLabel8.Align := alBottom;\r\n WebLabel8.HeightPercent := 100.000000000000000000;\r\n WebLabel8.WidthPercent := 100.000000000000000000;\r\n pnlTop.SetParentComponent(Self);\r\n pnlTop.Name := 'pnlTop';\r\n pnlTop.AlignWithMargins := True;\r\n pnlTop.Left := 10;\r\n pnlTop.Top := 24;\r\n pnlTop.Width := 1440;\r\n pnlTop.Height := 41;\r\n pnlTop.Margins.Left := 10;\r\n pnlTop.Margins.Top := 0;\r\n pnlTop.Margins.Right := 0;\r\n pnlTop.Margins.Bottom := 0;\r\n pnlTop.Align := alTop;\r\n pnlTop.BorderColor := clWhite;\r\n pnlTop.BorderStyle := bsNone;\r\n pnlTop.Color := clWhite;\r\n pnlTop.TabOrder := 0;\r\n LFB_dateRange.SetParentComponent(pnlTop);\r\n LFB_dateRange.Name := 'LFB_dateRange';\r\n LFB_dateRange.Left := 17;\r\n LFB_dateRange.Top := 0;\r\n LFB_dateRange.Width := 413;\r\n LFB_dateRange.Height := 41;\r\n LFB_dateRange.Align := alLeft;\r\n LFB_dateRange.BorderColor := clWhite;\r\n LFB_dateRange.BorderStyle := bsNone;\r\n LFB_dateRange.ChildOrder := 2;\r\n LFB_dateRange.Color := clWhite;\r\n LFB_dateRange.TabOrder := 0;\r\n dpStartDate.SetParentComponent(LFB_dateRange);\r\n dpStartDate.Name := 'dpStartDate';\r\n dpStartDate.Left := 72;\r\n dpStartDate.Top := 0;\r\n dpStartDate.Width := 110;\r\n dpStartDate.Height := 41;\r\n dpStartDate.Align := alLeft;\r\n dpStartDate.BorderStyle := bsNone;\r\n dpStartDate.ChildOrder := 3;\r\n dpStartDate.Color := clWhite;\r\n dpStartDate.Date := 44915.681804502320000000;\r\n dpStartDate.Font.Charset := DEFAULT_CHARSET;\r\n dpStartDate.Font.Color := clWindowText;\r\n dpStartDate.Font.Height := -16;\r\n dpStartDate.Font.Name := 'Tahoma';\r\n dpStartDate.Font.Style := [];\r\n dpStartDate.ParentFont := False;\r\n dpStartDate.Role := '';\r\n dpStartDate.ShowFocus := False;\r\n dpStartDate.ShowSeconds := False;\r\n dpStartDate.Text := '';\r\n dpEndDate.SetParentComponent(LFB_dateRange);\r\n dpEndDate.Name := 'dpEndDate';\r\n dpEndDate.Left := 206;\r\n dpEndDate.Top := 0;\r\n dpEndDate.Width := 110;\r\n dpEndDate.Height := 41;\r\n dpEndDate.Align := alLeft;\r\n dpEndDate.BorderStyle := bsNone;\r\n dpEndDate.ChildOrder := 3;\r\n dpEndDate.Color := clWhite;\r\n dpEndDate.Date := 44915.681804502320000000;\r\n dpEndDate.Font.Charset := DEFAULT_CHARSET;\r\n dpEndDate.Font.Color := clWindowText;\r\n dpEndDate.Font.Height := -16;\r\n dpEndDate.Font.Name := 'Tahoma';\r\n dpEndDate.Font.Style := [];\r\n dpEndDate.ParentFont := False;\r\n dpEndDate.Role := '';\r\n dpEndDate.ShowFocus := False;\r\n dpEndDate.ShowSeconds := False;\r\n dpEndDate.Text := '';\r\n WebSpeedButton9.SetParentComponent(LFB_dateRange);\r\n WebSpeedButton9.Name := 'WebSpeedButton9';\r\n WebSpeedButton9.Left := 182;\r\n WebSpeedButton9.Top := 0;\r\n WebSpeedButton9.Width := 24;\r\n WebSpeedButton9.Height := 41;\r\n WebSpeedButton9.Align := alLeft;\r\n WebSpeedButton9.Caption := '-';\r\n WebSpeedButton9.Color := clWhite;\r\n WebSpeedButton9.ElementClassName := 'btn btn-outline-light';\r\n WebSpeedButton9.Font.Charset := DEFAULT_CHARSET;\r\n WebSpeedButton9.Font.Color := clWindowText;\r\n WebSpeedButton9.Font.Height := -16;\r\n WebSpeedButton9.Font.Name := 'Tahoma';\r\n WebSpeedButton9.Font.Style := [];\r\n WebSpeedButton9.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton9.ParentFont := False;\r\n WebSpeedButton9.TabOrder := 2;\r\n WebSpeedButton9.WidthPercent := 100.000000000000000000;\r\n btnRange_calendar.SetParentComponent(LFB_dateRange);\r\n btnRange_calendar.Name := 'btnRange_calendar';\r\n btnRange_calendar.Left := 0;\r\n btnRange_calendar.Top := 0;\r\n btnRange_calendar.Width := 24;\r\n btnRange_calendar.Height := 41;\r\n btnRange_calendar.Cursor := crHandPoint;\r\n btnRange_calendar.Hint := 'Calendar';\r\n btnRange_calendar.Align := alLeft;\r\n btnRange_calendar.Caption := '';\r\n btnRange_calendar.Color := clNone;\r\n btnRange_calendar.ElementClassName := 'btn_icon';\r\n btnRange_calendar.ElementFont := efCSS;\r\n btnRange_calendar.Font.Charset := DEFAULT_CHARSET;\r\n btnRange_calendar.Font.Color := clGray;\r\n btnRange_calendar.Font.Height := -13;\r\n btnRange_calendar.Font.Name := 'Tahoma';\r\n btnRange_calendar.Font.Style := [];\r\n btnRange_calendar.HeightPercent := 100.000000000000000000;\r\n btnRange_calendar.MaterialGlyphSize := 30;\r\n btnRange_calendar.ParentFont := False;\r\n btnRange_calendar.ShowHint := True;\r\n btnRange_calendar.TabOrder := 10;\r\n btnRange_calendar.WidthStyle := ssAuto;\r\n btnRange_calendar.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnRange_calendar, Self, 'OnClick', 'WebSpeedButton12Click');\r\n btnRange_todaye.SetParentComponent(LFB_dateRange);\r\n btnRange_todaye.Name := 'btnRange_todaye';\r\n btnRange_todaye.Left := 24;\r\n btnRange_todaye.Top := 0;\r\n btnRange_todaye.Width := 24;\r\n btnRange_todaye.Height := 41;\r\n btnRange_todaye.Cursor := crHandPoint;\r\n btnRange_todaye.Hint := 'Today';\r\n btnRange_todaye.Align := alLeft;\r\n btnRange_todaye.Caption := '';\r\n btnRange_todaye.Color := clNone;\r\n btnRange_todaye.ElementClassName := 'btn_icon';\r\n btnRange_todaye.ElementFont := efCSS;\r\n btnRange_todaye.Font.Charset := DEFAULT_CHARSET;\r\n btnRange_todaye.Font.Color := clGray;\r\n btnRange_todaye.Font.Height := -13;\r\n btnRange_todaye.Font.Name := 'Tahoma';\r\n btnRange_todaye.Font.Style := [];\r\n btnRange_todaye.HeightPercent := 100.000000000000000000;\r\n btnRange_todaye.MaterialGlyphSize := 30;\r\n btnRange_todaye.ParentFont := False;\r\n btnRange_todaye.ShowHint := True;\r\n btnRange_todaye.TabOrder := 10;\r\n btnRange_todaye.WidthStyle := ssAuto;\r\n btnRange_todaye.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnRange_todaye, Self, 'OnClick', 'WebSpeedButton8Click');\r\n btnRange_dayback.SetParentComponent(LFB_dateRange);\r\n btnRange_dayback.Name := 'btnRange_dayback';\r\n btnRange_dayback.Left := 48;\r\n btnRange_dayback.Top := 0;\r\n btnRange_dayback.Width := 24;\r\n btnRange_dayback.Height := 41;\r\n btnRange_dayback.Cursor := crHandPoint;\r\n btnRange_dayback.Hint := 'Day Back';\r\n btnRange_dayback.Align := alLeft;\r\n btnRange_dayback.Caption := '';\r\n btnRange_dayback.Color := clNone;\r\n btnRange_dayback.ElementClassName := 'btn_icon';\r\n btnRange_dayback.ElementFont := efCSS;\r\n btnRange_dayback.Font.Charset := DEFAULT_CHARSET;\r\n btnRange_dayback.Font.Color := clGray;\r\n btnRange_dayback.Font.Height := -13;\r\n btnRange_dayback.Font.Name := 'Tahoma';\r\n btnRange_dayback.Font.Style := [];\r\n btnRange_dayback.HeightPercent := 100.000000000000000000;\r\n btnRange_dayback.MaterialGlyphSize := 30;\r\n btnRange_dayback.ParentFont := False;\r\n btnRange_dayback.ShowHint := True;\r\n btnRange_dayback.TabOrder := 10;\r\n btnRange_dayback.WidthStyle := ssAuto;\r\n btnRange_dayback.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnRange_dayback, Self, 'OnClick', 'WebSpeedButton10Click');\r\n btnRange_dayforward.SetParentComponent(LFB_dateRange);\r\n btnRange_dayforward.Name := 'btnRange_dayforward';\r\n btnRange_dayforward.Left := 316;\r\n btnRange_dayforward.Top := 0;\r\n btnRange_dayforward.Width := 24;\r\n btnRange_dayforward.Height := 41;\r\n btnRange_dayforward.Cursor := crHandPoint;\r\n btnRange_dayforward.Hint := 'day Forward';\r\n btnRange_dayforward.Align := alLeft;\r\n btnRange_dayforward.Caption := '';\r\n btnRange_dayforward.Color := clNone;\r\n btnRange_dayforward.ElementClassName := 'btn_icon';\r\n btnRange_dayforward.ElementFont := efCSS;\r\n btnRange_dayforward.Font.Charset := DEFAULT_CHARSET;\r\n btnRange_dayforward.Font.Color := clGray;\r\n btnRange_dayforward.Font.Height := -13;\r\n btnRange_dayforward.Font.Name := 'Tahoma';\r\n btnRange_dayforward.Font.Style := [];\r\n btnRange_dayforward.HeightPercent := 100.000000000000000000;\r\n btnRange_dayforward.MaterialGlyphSize := 30;\r\n btnRange_dayforward.ParentFont := False;\r\n btnRange_dayforward.ShowHint := True;\r\n btnRange_dayforward.TabOrder := 10;\r\n btnRange_dayforward.WidthStyle := ssAuto;\r\n btnRange_dayforward.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnRange_dayforward, Self, 'OnClick', 'WebSpeedButton11Click');\r\n chApplyDateRange.SetParentComponent(pnlTop);\r\n chApplyDateRange.Name := 'chApplyDateRange';\r\n chApplyDateRange.Left := 0;\r\n chApplyDateRange.Top := 0;\r\n chApplyDateRange.Width := 17;\r\n chApplyDateRange.Height := 41;\r\n chApplyDateRange.Cursor := crHandPoint;\r\n chApplyDateRange.Align := alLeft;\r\n chApplyDateRange.Checked := True;\r\n chApplyDateRange.ChildOrder := 7;\r\n chApplyDateRange.HeightPercent := 100.000000000000000000;\r\n chApplyDateRange.State := cbChecked;\r\n chApplyDateRange.WidthPercent := 100.000000000000000000;\r\n SetEvent(chApplyDateRange, Self, 'OnClick', 'chApplyDateRangeClick');\r\n btnGridRefresh.SetParentComponent(pnlTop);\r\n btnGridRefresh.Name := 'btnGridRefresh';\r\n btnGridRefresh.Left := 430;\r\n btnGridRefresh.Top := 0;\r\n btnGridRefresh.Width := 24;\r\n btnGridRefresh.Height := 41;\r\n btnGridRefresh.Cursor := crHandPoint;\r\n btnGridRefresh.Hint := 'Refresh';\r\n btnGridRefresh.Align := alLeft;\r\n btnGridRefresh.Caption := '';\r\n btnGridRefresh.Color := clNone;\r\n btnGridRefresh.ElementClassName := 'btn_icon';\r\n btnGridRefresh.ElementFont := efCSS;\r\n btnGridRefresh.Font.Charset := DEFAULT_CHARSET;\r\n btnGridRefresh.Font.Color := clGray;\r\n btnGridRefresh.Font.Height := -13;\r\n btnGridRefresh.Font.Name := 'Tahoma';\r\n btnGridRefresh.Font.Style := [];\r\n btnGridRefresh.HeightPercent := 100.000000000000000000;\r\n btnGridRefresh.MaterialGlyphSize := 30;\r\n btnGridRefresh.ParentFont := False;\r\n btnGridRefresh.ShowHint := True;\r\n btnGridRefresh.TabOrder := 10;\r\n btnGridRefresh.WidthStyle := ssAuto;\r\n btnGridRefresh.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnGridRefresh, Self, 'OnClick', 'btnGridRefreshClick');\r\n btnGridSetup.SetParentComponent(pnlTop);\r\n btnGridSetup.Name := 'btnGridSetup';\r\n btnGridSetup.Left := 1408;\r\n btnGridSetup.Top := 0;\r\n btnGridSetup.Width := 32;\r\n btnGridSetup.Height := 41;\r\n btnGridSetup.Cursor := crHandPoint;\r\n btnGridSetup.Hint := 'Grid Columns Setup';\r\n btnGridSetup.Align := alRight;\r\n btnGridSetup.Caption := '';\r\n btnGridSetup.Color := clNone;\r\n btnGridSetup.ElementClassName := 'btn_icon';\r\n btnGridSetup.ElementFont := efCSS;\r\n btnGridSetup.Font.Charset := DEFAULT_CHARSET;\r\n btnGridSetup.Font.Color := clGray;\r\n btnGridSetup.Font.Height := -13;\r\n btnGridSetup.Font.Name := 'Tahoma';\r\n btnGridSetup.Font.Style := [];\r\n btnGridSetup.HeightPercent := 100.000000000000000000;\r\n btnGridSetup.MaterialGlyphSize := 30;\r\n btnGridSetup.ParentFont := False;\r\n btnGridSetup.ShowHint := True;\r\n btnGridSetup.TabOrder := 10;\r\n btnGridSetup.Visible := False;\r\n btnGridSetup.WidthStyle := ssAuto;\r\n btnGridSetup.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnGridSetup, Self, 'OnClick', 'btnGridSetupClick');\r\n pnlBottom.SetParentComponent(Self);\r\n pnlBottom.Name := 'pnlBottom';\r\n pnlBottom.Left := 0;\r\n pnlBottom.Top := 959;\r\n pnlBottom.Width := 1450;\r\n pnlBottom.Height := 41;\r\n pnlBottom.Align := alBottom;\r\n pnlBottom.BorderColor := clWhite;\r\n pnlBottom.BorderStyle := bsNone;\r\n pnlBottom.ChildOrder := 1;\r\n pnlBottom.Color := clWhite;\r\n pnlBottom.TabOrder := 1;\r\n tbReport.SetParentComponent(pnlBottom);\r\n tbReport.Name := 'tbReport';\r\n tbReport.Left := 0;\r\n tbReport.Top := 0;\r\n tbReport.Width := 95;\r\n tbReport.Height := 41;\r\n tbReport.Cursor := crHandPoint;\r\n tbReport.Align := alLeft;\r\n tbReport.ParentDoubleBuffered := False;\r\n tbReport.DoubleBuffered := True;\r\n tbReport.ParentColor := True;\r\n tbReport.TabOrder := 0;\r\n tbReport.AppearanceOff.Font.Charset := DEFAULT_CHARSET;\r\n tbReport.AppearanceOff.Font.Color := clBlack;\r\n tbReport.AppearanceOff.Font.Height := -16;\r\n tbReport.AppearanceOff.Font.Name := 'Tahoma';\r\n tbReport.AppearanceOff.Font.Style := [];\r\n tbReport.AppearanceOff.Text := 'Report';\r\n tbReport.AppearanceOn.Fill.Color := 16748574;\r\n tbReport.AppearanceOn.Font.Charset := DEFAULT_CHARSET;\r\n tbReport.AppearanceOn.Font.Color := clWhite;\r\n tbReport.AppearanceOn.Font.Height := -16;\r\n tbReport.AppearanceOn.Font.Name := 'Tahoma';\r\n tbReport.AppearanceOn.Font.Style := [];\r\n tbReport.AppearanceOn.Text := 'Form';\r\n tbReport.AnimationFactor := 8;\r\n tbReport.Layout := sloExtended;\r\n tbReport.Rounded := True;\r\n SetEvent(tbReport, Self, 'OnChange', 'tbReportChange');\r\n pnlFormButtons.SetParentComponent(pnlBottom);\r\n pnlFormButtons.Name := 'pnlFormButtons';\r\n pnlFormButtons.Left := 290;\r\n pnlFormButtons.Top := 0;\r\n pnlFormButtons.Width := 1160;\r\n pnlFormButtons.Height := 41;\r\n pnlFormButtons.Align := alRight;\r\n pnlFormButtons.BorderStyle := bsNone;\r\n pnlFormButtons.ChildOrder := 1;\r\n pnlFormButtons.Color := clWindow;\r\n pnlFormButtons.TabOrder := 1;\r\n btnCustom1.SetParentComponent(pnlFormButtons);\r\n btnCustom1.Name := 'btnCustom1';\r\n btnCustom1.Left := 350;\r\n btnCustom1.Top := 0;\r\n btnCustom1.Width := 50;\r\n btnCustom1.Height := 41;\r\n btnCustom1.Cursor := crHandPoint;\r\n btnCustom1.Align := alRight;\r\n btnCustom1.Caption := 'Custom1';\r\n btnCustom1.Color := clNone;\r\n btnCustom1.ElementClassName := 'btn_icon';\r\n btnCustom1.Font.Charset := DEFAULT_CHARSET;\r\n btnCustom1.Font.Color := clGray;\r\n btnCustom1.Font.Height := -13;\r\n btnCustom1.Font.Name := 'Tahoma';\r\n btnCustom1.Font.Style := [];\r\n btnCustom1.HeightPercent := 100.000000000000000000;\r\n btnCustom1.MaterialGlyphSize := 1;\r\n btnCustom1.ParentFont := False;\r\n btnCustom1.Visible := False;\r\n btnCustom1.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnCustom1, Self, 'OnClick', 'btnCustom1Click');\r\n SetEvent(btnCustom1, Self, 'OnMouseMove', 'btnCustom1MouseMove');\r\n SetEvent(btnCustom1, Self, 'OnMouseLeave', 'btnCustom1MouseLeave');\r\n btnCustom2.SetParentComponent(pnlFormButtons);\r\n btnCustom2.Name := 'btnCustom2';\r\n btnCustom2.Left := 400;\r\n btnCustom2.Top := 0;\r\n btnCustom2.Width := 50;\r\n btnCustom2.Height := 41;\r\n btnCustom2.Cursor := crHandPoint;\r\n btnCustom2.Align := alRight;\r\n btnCustom2.Caption := 'Custom2';\r\n btnCustom2.Color := clNone;\r\n btnCustom2.ElementClassName := 'btn_icon';\r\n btnCustom2.Font.Charset := DEFAULT_CHARSET;\r\n btnCustom2.Font.Color := clGray;\r\n btnCustom2.Font.Height := -13;\r\n btnCustom2.Font.Name := 'Tahoma';\r\n btnCustom2.Font.Style := [];\r\n btnCustom2.HeightPercent := 100.000000000000000000;\r\n btnCustom2.MaterialGlyphSize := 1;\r\n btnCustom2.ParentFont := False;\r\n btnCustom2.Visible := False;\r\n btnCustom2.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnCustom2, Self, 'OnClick', 'btnCustom2Click');\r\n SetEvent(btnCustom2, Self, 'OnMouseMove', 'btnCustom1MouseMove');\r\n SetEvent(btnCustom2, Self, 'OnMouseLeave', 'btnCustom1MouseLeave');\r\n btnCustom3.SetParentComponent(pnlFormButtons);\r\n btnCustom3.Name := 'btnCustom3';\r\n btnCustom3.Left := 450;\r\n btnCustom3.Top := 0;\r\n btnCustom3.Width := 50;\r\n btnCustom3.Height := 41;\r\n btnCustom3.Cursor := crHandPoint;\r\n btnCustom3.Align := alRight;\r\n btnCustom3.Caption := 'Custom3';\r\n btnCustom3.Color := clNone;\r\n btnCustom3.ElementClassName := 'btn_icon';\r\n btnCustom3.Font.Charset := DEFAULT_CHARSET;\r\n btnCustom3.Font.Color := clGray;\r\n btnCustom3.Font.Height := -13;\r\n btnCustom3.Font.Name := 'Tahoma';\r\n btnCustom3.Font.Style := [];\r\n btnCustom3.HeightPercent := 100.000000000000000000;\r\n btnCustom3.MaterialGlyphSize := 1;\r\n btnCustom3.ParentFont := False;\r\n btnCustom3.Visible := False;\r\n btnCustom3.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnCustom3, Self, 'OnClick', 'btnCustom3Click');\r\n SetEvent(btnCustom3, Self, 'OnMouseMove', 'btnCustom1MouseMove');\r\n SetEvent(btnCustom3, Self, 'OnMouseLeave', 'btnCustom1MouseLeave');\r\n btnCustom4.SetParentComponent(pnlFormButtons);\r\n btnCustom4.Name := 'btnCustom4';\r\n btnCustom4.Left := 500;\r\n btnCustom4.Top := 0;\r\n btnCustom4.Width := 50;\r\n btnCustom4.Height := 41;\r\n btnCustom4.Cursor := crHandPoint;\r\n btnCustom4.Align := alRight;\r\n btnCustom4.Caption := 'Custom4';\r\n btnCustom4.Color := clNone;\r\n btnCustom4.ElementClassName := 'btn_icon';\r\n btnCustom4.Font.Charset := DEFAULT_CHARSET;\r\n btnCustom4.Font.Color := clGray;\r\n btnCustom4.Font.Height := -13;\r\n btnCustom4.Font.Name := 'Tahoma';\r\n btnCustom4.Font.Style := [];\r\n btnCustom4.HeightPercent := 100.000000000000000000;\r\n btnCustom4.MaterialGlyphSize := 1;\r\n btnCustom4.ParentFont := False;\r\n btnCustom4.Visible := False;\r\n btnCustom4.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnCustom4, Self, 'OnClick', 'btnCustom4Click');\r\n SetEvent(btnCustom4, Self, 'OnMouseMove', 'btnCustom1MouseMove');\r\n SetEvent(btnCustom4, Self, 'OnMouseLeave', 'btnCustom1MouseLeave');\r\n btnCustom5.SetParentComponent(pnlFormButtons);\r\n btnCustom5.Name := 'btnCustom5';\r\n btnCustom5.Left := 550;\r\n btnCustom5.Top := 0;\r\n btnCustom5.Width := 50;\r\n btnCustom5.Height := 41;\r\n btnCustom5.Cursor := crHandPoint;\r\n btnCustom5.Align := alRight;\r\n btnCustom5.Caption := 'Custom5';\r\n btnCustom5.Color := clNone;\r\n btnCustom5.ElementClassName := 'btn_icon';\r\n btnCustom5.Font.Charset := DEFAULT_CHARSET;\r\n btnCustom5.Font.Color := clGray;\r\n btnCustom5.Font.Height := -13;\r\n btnCustom5.Font.Name := 'Tahoma';\r\n btnCustom5.Font.Style := [];\r\n btnCustom5.HeightPercent := 100.000000000000000000;\r\n btnCustom5.MaterialGlyphSize := 1;\r\n btnCustom5.ParentFont := False;\r\n btnCustom5.Visible := False;\r\n btnCustom5.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnCustom5, Self, 'OnClick', 'btnCustom5Click');\r\n SetEvent(btnCustom5, Self, 'OnMouseMove', 'btnCustom1MouseMove');\r\n SetEvent(btnCustom5, Self, 'OnMouseLeave', 'btnCustom1MouseLeave');\r\n btnSelect.SetParentComponent(pnlFormButtons);\r\n btnSelect.Name := 'btnSelect';\r\n btnSelect.Left := 800;\r\n btnSelect.Top := 0;\r\n btnSelect.Width := 90;\r\n btnSelect.Height := 41;\r\n btnSelect.Cursor := crHandPoint;\r\n btnSelect.Hint := 'Select';\r\n btnSelect.Align := alRight;\r\n btnSelect.Caption := '';\r\n btnSelect.Color := clNone;\r\n btnSelect.ElementClassName := 'btn_icon';\r\n btnSelect.Font.Charset := DEFAULT_CHARSET;\r\n btnSelect.Font.Color := clGray;\r\n btnSelect.Font.Height := -13;\r\n btnSelect.Font.Name := 'Tahoma';\r\n btnSelect.Font.Style := [];\r\n btnSelect.HeightPercent := 100.000000000000000000;\r\n btnSelect.MaterialGlyphSize := 1;\r\n btnSelect.ParentFont := False;\r\n btnSelect.WidthStyle := ssAuto;\r\n btnSelect.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnSelect, Self, 'OnClick', 'btnSelectClick');\r\n SetEvent(btnSelect, Self, 'OnMouseMove', 'btnCustom1MouseMove');\r\n btnClose.SetParentComponent(pnlFormButtons);\r\n btnClose.Name := 'btnClose';\r\n btnClose.Left := 1070;\r\n btnClose.Top := 0;\r\n btnClose.Width := 90;\r\n btnClose.Height := 41;\r\n btnClose.Cursor := crHandPoint;\r\n btnClose.Hint := 'Close';\r\n btnClose.Align := alRight;\r\n btnClose.Caption := '';\r\n btnClose.Color := clNone;\r\n btnClose.ElementClassName := 'btn_icon';\r\n btnClose.Font.Charset := DEFAULT_CHARSET;\r\n btnClose.Font.Color := clGray;\r\n btnClose.Font.Height := -13;\r\n btnClose.Font.Name := 'Tahoma';\r\n btnClose.Font.Style := [];\r\n btnClose.HeightPercent := 100.000000000000000000;\r\n btnClose.MaterialGlyphSize := 1;\r\n btnClose.ParentFont := False;\r\n btnClose.ShowHint := True;\r\n btnClose.WidthStyle := ssAuto;\r\n btnClose.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnClose, Self, 'OnClick', 'btnCloseClick');\r\n SetEvent(btnClose, Self, 'OnMouseMove', 'btnCustom1MouseMove');\r\n btnClear.SetParentComponent(pnlFormButtons);\r\n btnClear.Name := 'btnClear';\r\n btnClear.Left := 890;\r\n btnClear.Top := 0;\r\n btnClear.Width := 90;\r\n btnClear.Height := 41;\r\n btnClear.Cursor := crHandPoint;\r\n btnClear.Hint := 'Clear';\r\n btnClear.Align := alRight;\r\n btnClear.Caption := '';\r\n btnClear.Color := clNone;\r\n btnClear.ElementClassName := 'btn_icon';\r\n btnClear.Font.Charset := DEFAULT_CHARSET;\r\n btnClear.Font.Color := clGray;\r\n btnClear.Font.Height := -13;\r\n btnClear.Font.Name := 'Tahoma';\r\n btnClear.Font.Style := [];\r\n btnClear.HeightPercent := 100.000000000000000000;\r\n btnClear.MaterialGlyphSize := 1;\r\n btnClear.ParentFont := False;\r\n btnClear.ShowHint := True;\r\n btnClear.TabOrder := 10;\r\n btnClear.WidthStyle := ssAuto;\r\n btnClear.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnClear, Self, 'OnClick', 'btnClearClick');\r\n SetEvent(btnClear, Self, 'OnMouseMove', 'btnCustom1MouseMove');\r\n btnSave.SetParentComponent(pnlFormButtons);\r\n btnSave.Name := 'btnSave';\r\n btnSave.Left := 980;\r\n btnSave.Top := 0;\r\n btnSave.Width := 90;\r\n btnSave.Height := 41;\r\n btnSave.Cursor := crHandPoint;\r\n btnSave.Hint := 'Ok';\r\n btnSave.Align := alRight;\r\n btnSave.Caption := '';\r\n btnSave.Color := clNone;\r\n btnSave.ElementClassName := 'btn_icon';\r\n btnSave.Font.Charset := DEFAULT_CHARSET;\r\n btnSave.Font.Color := clGray;\r\n btnSave.Font.Height := -13;\r\n btnSave.Font.Name := 'Tahoma';\r\n btnSave.Font.Style := [];\r\n btnSave.HeightPercent := 100.000000000000000000;\r\n btnSave.MaterialGlyphSize := 1;\r\n btnSave.ParentFont := False;\r\n btnSave.ShowHint := True;\r\n btnSave.TabOrder := 11;\r\n btnSave.WidthStyle := ssAuto;\r\n btnSave.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnSave, Self, 'OnClick', 'btnSaveClick');\r\n SetEvent(btnSave, Self, 'OnMouseMove', 'btnCustom1MouseMove');\r\n btnCustom6.SetParentComponent(pnlFormButtons);\r\n btnCustom6.Name := 'btnCustom6';\r\n btnCustom6.Left := 600;\r\n btnCustom6.Top := 0;\r\n btnCustom6.Width := 50;\r\n btnCustom6.Height := 41;\r\n btnCustom6.Cursor := crHandPoint;\r\n btnCustom6.Align := alRight;\r\n btnCustom6.Caption := 'Custom6';\r\n btnCustom6.Color := clNone;\r\n btnCustom6.ElementClassName := 'btn_icon';\r\n btnCustom6.Font.Charset := DEFAULT_CHARSET;\r\n btnCustom6.Font.Color := clGray;\r\n btnCustom6.Font.Height := -13;\r\n btnCustom6.Font.Name := 'Tahoma';\r\n btnCustom6.Font.Style := [];\r\n btnCustom6.HeightPercent := 100.000000000000000000;\r\n btnCustom6.MaterialGlyphSize := 1;\r\n btnCustom6.ParentFont := False;\r\n btnCustom6.Visible := False;\r\n btnCustom6.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnCustom6, Self, 'OnClick', 'btnCustom6Click');\r\n SetEvent(btnCustom6, Self, 'OnMouseMove', 'btnCustom1MouseMove');\r\n SetEvent(btnCustom6, Self, 'OnMouseLeave', 'btnCustom1MouseLeave');\r\n btnCustom7.SetParentComponent(pnlFormButtons);\r\n btnCustom7.Name := 'btnCustom7';\r\n btnCustom7.Left := 650;\r\n btnCustom7.Top := 0;\r\n btnCustom7.Width := 50;\r\n btnCustom7.Height := 41;\r\n btnCustom7.Cursor := crHandPoint;\r\n btnCustom7.Align := alRight;\r\n btnCustom7.Caption := 'Custom7';\r\n btnCustom7.Color := clNone;\r\n btnCustom7.ElementClassName := 'btn_icon';\r\n btnCustom7.Font.Charset := DEFAULT_CHARSET;\r\n btnCustom7.Font.Color := clGray;\r\n btnCustom7.Font.Height := -13;\r\n btnCustom7.Font.Name := 'Tahoma';\r\n btnCustom7.Font.Style := [];\r\n btnCustom7.HeightPercent := 100.000000000000000000;\r\n btnCustom7.MaterialGlyphSize := 1;\r\n btnCustom7.ParentFont := False;\r\n btnCustom7.Visible := False;\r\n btnCustom7.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnCustom7, Self, 'OnClick', 'btnCustom7Click');\r\n SetEvent(btnCustom7, Self, 'OnMouseMove', 'btnCustom1MouseMove');\r\n SetEvent(btnCustom7, Self, 'OnMouseLeave', 'btnCustom1MouseLeave');\r\n btnCustom8.SetParentComponent(pnlFormButtons);\r\n btnCustom8.Name := 'btnCustom8';\r\n btnCustom8.Left := 700;\r\n btnCustom8.Top := 0;\r\n btnCustom8.Width := 50;\r\n btnCustom8.Height := 41;\r\n btnCustom8.Cursor := crHandPoint;\r\n btnCustom8.Align := alRight;\r\n btnCustom8.Caption := 'Custom8';\r\n btnCustom8.Color := clNone;\r\n btnCustom8.ElementClassName := 'btn_icon';\r\n btnCustom8.Font.Charset := DEFAULT_CHARSET;\r\n btnCustom8.Font.Color := clGray;\r\n btnCustom8.Font.Height := -13;\r\n btnCustom8.Font.Name := 'Tahoma';\r\n btnCustom8.Font.Style := [];\r\n btnCustom8.HeightPercent := 100.000000000000000000;\r\n btnCustom8.MaterialGlyphSize := 1;\r\n btnCustom8.ParentFont := False;\r\n btnCustom8.Visible := False;\r\n btnCustom8.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnCustom8, Self, 'OnClick', 'btnCustom8Click');\r\n SetEvent(btnCustom8, Self, 'OnMouseMove', 'btnCustom1MouseMove');\r\n SetEvent(btnCustom8, Self, 'OnMouseLeave', 'btnCustom1MouseLeave');\r\n btnCustom9.SetParentComponent(pnlFormButtons);\r\n btnCustom9.Name := 'btnCustom9';\r\n btnCustom9.Left := 750;\r\n btnCustom9.Top := 0;\r\n btnCustom9.Width := 50;\r\n btnCustom9.Height := 41;\r\n btnCustom9.Cursor := crHandPoint;\r\n btnCustom9.Align := alRight;\r\n btnCustom9.Caption := 'Custom9';\r\n btnCustom9.Color := clNone;\r\n btnCustom9.ElementClassName := 'btn_icon';\r\n btnCustom9.Font.Charset := DEFAULT_CHARSET;\r\n btnCustom9.Font.Color := clGray;\r\n btnCustom9.Font.Height := -13;\r\n btnCustom9.Font.Name := 'Tahoma';\r\n btnCustom9.Font.Style := [];\r\n btnCustom9.HeightPercent := 100.000000000000000000;\r\n btnCustom9.MaterialGlyphSize := 1;\r\n btnCustom9.ParentFont := False;\r\n btnCustom9.Visible := False;\r\n btnCustom9.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnCustom9, Self, 'OnClick', 'btnCustom9Click');\r\n SetEvent(btnCustom9, Self, 'OnMouseMove', 'btnCustom1MouseMove');\r\n SetEvent(btnCustom9, Self, 'OnMouseLeave', 'btnCustom1MouseLeave');\r\n pnlReportButtons.SetParentComponent(pnlBottom);\r\n pnlReportButtons.Name := 'pnlReportButtons';\r\n pnlReportButtons.Left := 95;\r\n pnlReportButtons.Top := 0;\r\n pnlReportButtons.Width := 195;\r\n pnlReportButtons.Height := 41;\r\n pnlReportButtons.Align := alClient;\r\n pnlReportButtons.BorderColor := clNone;\r\n pnlReportButtons.BorderStyle := bsNone;\r\n pnlReportButtons.ChildOrder := 7;\r\n pnlReportButtons.Color := clWhite;\r\n pnlReportButtons.TabOrder := 2;\r\n pnlReportButtons.Visible := False;\r\n btnClose_RPT.SetParentComponent(pnlReportButtons);\r\n btnClose_RPT.Name := 'btnClose_RPT';\r\n btnClose_RPT.Left := 105;\r\n btnClose_RPT.Top := 0;\r\n btnClose_RPT.Width := 90;\r\n btnClose_RPT.Height := 41;\r\n btnClose_RPT.Cursor := crHandPoint;\r\n btnClose_RPT.Hint := 'Close';\r\n btnClose_RPT.Align := alRight;\r\n btnClose_RPT.Caption := '';\r\n btnClose_RPT.Color := clNone;\r\n btnClose_RPT.ElementClassName := 'btn_icon';\r\n btnClose_RPT.Font.Charset := DEFAULT_CHARSET;\r\n btnClose_RPT.Font.Color := clGray;\r\n btnClose_RPT.Font.Height := -13;\r\n btnClose_RPT.Font.Name := 'Tahoma';\r\n btnClose_RPT.Font.Style := [];\r\n btnClose_RPT.HeightPercent := 100.000000000000000000;\r\n btnClose_RPT.MaterialGlyph := 'close';\r\n btnClose_RPT.MaterialGlyphSize := 1;\r\n btnClose_RPT.ParentFont := False;\r\n btnClose_RPT.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnClose_RPT, Self, 'OnClick', 'btnClose_RPTClick');\r\n pnlMain.SetParentComponent(Self);\r\n pnlMain.Name := 'pnlMain';\r\n pnlMain.Left := 3;\r\n pnlMain.Top := 65;\r\n pnlMain.Width := 1447;\r\n pnlMain.Height := 800;\r\n pnlMain.Align := alClient;\r\n pnlMain.BorderColor := clNone;\r\n pnlMain.BorderStyle := bsNone;\r\n pnlMain.ChildOrder := 6;\r\n pnlMain.Color := clWindow;\r\n pnlMain.TabOrder := 2;\r\n pnlSearch.SetParentComponent(pnlMain);\r\n pnlSearch.Name := 'pnlSearch';\r\n pnlSearch.AlignWithMargins := True;\r\n pnlSearch.Left := 10;\r\n pnlSearch.Top := 0;\r\n pnlSearch.Width := 1437;\r\n pnlSearch.Height := 45;\r\n pnlSearch.Margins.Left := 10;\r\n pnlSearch.Margins.Top := 0;\r\n pnlSearch.Margins.Right := 0;\r\n pnlSearch.Margins.Bottom := 0;\r\n pnlSearch.Align := alTop;\r\n pnlSearch.BorderColor := clWhite;\r\n pnlSearch.BorderStyle := bsNone;\r\n pnlSearch.ChildOrder := 3;\r\n pnlSearch.Color := clWhite;\r\n pnlSearch.TabOrder := 0;\r\n SetEvent(pnlSearch, Self, 'OnMouseLeave', 'pnlSearchMouseLeave');\r\n sbSearch.SetParentComponent(pnlSearch);\r\n sbSearch.Name := 'sbSearch';\r\n sbSearch.Left := 0;\r\n sbSearch.Top := 0;\r\n sbSearch.Width := 1343;\r\n sbSearch.Height := 45;\r\n sbSearch.Align := alClient;\r\n sbSearch.AutoScroll := True;\r\n sbSearch.BorderStyle := bsNone;\r\n sbSearch.ChildOrder := 2;\r\n sbSearch.Color := clWhite;\r\n sbSearch.ScrollBars := ssHorizontal;\r\n sbSearch.Visible := False;\r\n B6.SetParentComponent(sbSearch);\r\n B6.Name := 'B6';\r\n B6.Tag := -2;\r\n B6.Left := 336;\r\n B6.Top := 3;\r\n B6.Width := 60;\r\n B6.Height := 60;\r\n B6.ElementClassName := 'flt_data_block';\r\n B6.BorderColor := clWhite;\r\n B6.ChildOrder := 6;\r\n B6.Color := clWhite;\r\n B6.ElementFont := efCSS;\r\n B6.Font.Charset := ANSI_CHARSET;\r\n B6.Font.Color := clBlack;\r\n B6.Font.Height := -13;\r\n B6.Font.Name := 'Tahoma';\r\n B6.Font.Style := [fsUnderline];\r\n B6.ParentFont := False;\r\n B6.TabOrder := 0;\r\n SetEvent(B6, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B6, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel2.SetParentComponent(B6);\r\n WebPanel2.Name := 'WebPanel2';\r\n WebPanel2.Left := 0;\r\n WebPanel2.Top := 0;\r\n WebPanel2.Width := 60;\r\n WebPanel2.Height := 28;\r\n WebPanel2.ElementClassName := 'flt_block_top';\r\n WebPanel2.HeightStyle := ssAuto;\r\n WebPanel2.Align := alTop;\r\n WebPanel2.BorderStyle := bsNone;\r\n WebPanel2.ChildOrder := 2;\r\n WebPanel2.Color := clWhite;\r\n WebPanel2.ElementFont := efCSS;\r\n WebPanel2.TabOrder := 0;\r\n SetEvent(WebPanel2, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel2, Self, 'OnMouseMove', 'WebPanel12MouseMove');\r\n SetEvent(WebPanel2, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel2, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel1.SetParentComponent(WebPanel2);\r\n WebLabel1.Name := 'WebLabel1';\r\n WebLabel1.Left := 24;\r\n WebLabel1.Top := 0;\r\n WebLabel1.Width := 37;\r\n WebLabel1.Height := 28;\r\n WebLabel1.Cursor := crDrag;\r\n WebLabel1.Align := alLeft;\r\n WebLabel1.Caption := 'Title6';\r\n WebLabel1.DragMode := dmAutomatic;\r\n WebLabel1.ElementClassName := 'flt_block_title';\r\n WebLabel1.ElementFont := efCSS;\r\n WebLabel1.Font.Charset := ANSI_CHARSET;\r\n WebLabel1.Font.Color := clNavy;\r\n WebLabel1.Font.Height := -13;\r\n WebLabel1.Font.Name := 'Segoe UI Emoji';\r\n WebLabel1.Font.Style := [fsBold];\r\n WebLabel1.HeightPercent := 100.000000000000000000;\r\n WebLabel1.ParentFont := False;\r\n WebLabel1.WidthStyle := ssAuto;\r\n WebLabel1.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel1, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel1, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel1, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel1, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton7.SetParentComponent(WebPanel2);\r\n WebSpeedButton7.Name := 'WebSpeedButton7';\r\n WebSpeedButton7.Left := 0;\r\n WebSpeedButton7.Top := 0;\r\n WebSpeedButton7.Width := 24;\r\n WebSpeedButton7.Height := 28;\r\n WebSpeedButton7.Cursor := crHandPoint;\r\n WebSpeedButton7.Align := alLeft;\r\n WebSpeedButton7.Color := clNone;\r\n WebSpeedButton7.ElementClassName := 'btn_icon_nohighlight';\r\n WebSpeedButton7.Flat := True;\r\n WebSpeedButton7.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton7.MaterialGlyph := 'edit';\r\n WebSpeedButton7.MaterialGlyphSize := 14;\r\n WebSpeedButton7.TabOrder := 0;\r\n WebSpeedButton7.Visible := False;\r\n WebSpeedButton7.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton7, Self, 'OnClick', '_BlockCallPickForm');\r\n M6.SetParentComponent(B6);\r\n M6.Name := 'M6';\r\n M6.Left := 15;\r\n M6.Top := 28;\r\n M6.Width := 45;\r\n M6.Height := 32;\r\n M6.Align := alClient;\r\n M6.BorderStyle := bsNone;\r\n M6.ElementClassName := 'flt_block_memo';\r\n M6.ElementFont := efCSS;\r\n M6.Font.Charset := ANSI_CHARSET;\r\n M6.Font.Color := clBlack;\r\n M6.Font.Height := -13;\r\n M6.Font.Name := 'Tahoma';\r\n M6.Font.Style := [];\r\n M6.HeightPercent := 100.000000000000000000;\r\n M6.ParentFont := False;\r\n M6.SelLength := 0;\r\n M6.SelStart := 0;\r\n M6.ShowFocus := False;\r\n M6.WidthPercent := 100.000000000000000000;\r\n SetEvent(M6, Self, 'OnChange', 'M1Change');\r\n SetEvent(M6, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M6, Self, 'OnKeyDown', 'M1KeyDown');\r\n SetEvent(M6, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M6, Self, 'OnDragOver', 'M1DragOver');\r\n btnFltIcon6.SetParentComponent(B6);\r\n btnFltIcon6.Name := 'btnFltIcon6';\r\n btnFltIcon6.Left := 0;\r\n btnFltIcon6.Top := 28;\r\n btnFltIcon6.Width := 15;\r\n btnFltIcon6.Height := 32;\r\n btnFltIcon6.Cursor := crHandPoint;\r\n btnFltIcon6.Hint := 'Search';\r\n btnFltIcon6.Align := alLeft;\r\n btnFltIcon6.Color := clNone;\r\n btnFltIcon6.ElementClassName := 'btn_icon';\r\n btnFltIcon6.ElementFont := efCSS;\r\n btnFltIcon6.Font.Charset := DEFAULT_CHARSET;\r\n btnFltIcon6.Font.Color := clGray;\r\n btnFltIcon6.Font.Height := -13;\r\n btnFltIcon6.Font.Name := 'Tahoma';\r\n btnFltIcon6.Font.Style := [];\r\n btnFltIcon6.HeightPercent := 100.000000000000000000;\r\n btnFltIcon6.MaterialGlyph := 'search';\r\n btnFltIcon6.ParentFont := False;\r\n btnFltIcon6.ShowHint := True;\r\n btnFltIcon6.TabOrder := 10;\r\n btnFltIcon6.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnFltIcon6, Self, 'OnClick', 'btnApplyFilterClick');\r\n B5.SetParentComponent(sbSearch);\r\n B5.Name := 'B5';\r\n B5.Tag := -2;\r\n B5.Left := 270;\r\n B5.Top := 0;\r\n B5.Width := 60;\r\n B5.Height := 60;\r\n B5.ElementClassName := 'flt_data_block';\r\n B5.BorderColor := clWhite;\r\n B5.ChildOrder := 5;\r\n B5.Color := clWhite;\r\n B5.ElementFont := efCSS;\r\n B5.Font.Charset := ANSI_CHARSET;\r\n B5.Font.Color := clBlack;\r\n B5.Font.Height := -13;\r\n B5.Font.Name := 'Tahoma';\r\n B5.Font.Style := [fsUnderline];\r\n B5.ParentFont := False;\r\n B5.TabOrder := 1;\r\n SetEvent(B5, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B5, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel4.SetParentComponent(B5);\r\n WebPanel4.Name := 'WebPanel4';\r\n WebPanel4.Left := 0;\r\n WebPanel4.Top := 0;\r\n WebPanel4.Width := 60;\r\n WebPanel4.Height := 28;\r\n WebPanel4.ElementClassName := 'flt_block_top';\r\n WebPanel4.HeightStyle := ssAuto;\r\n WebPanel4.Align := alTop;\r\n WebPanel4.BorderStyle := bsNone;\r\n WebPanel4.ChildOrder := 2;\r\n WebPanel4.Color := clWhite;\r\n WebPanel4.ElementFont := efCSS;\r\n WebPanel4.TabOrder := 0;\r\n SetEvent(WebPanel4, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel4, Self, 'OnMouseMove', 'WebPanel12MouseMove');\r\n SetEvent(WebPanel4, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel4, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel2.SetParentComponent(WebPanel4);\r\n WebLabel2.Name := 'WebLabel2';\r\n WebLabel2.Left := 24;\r\n WebLabel2.Top := 0;\r\n WebLabel2.Width := 37;\r\n WebLabel2.Height := 28;\r\n WebLabel2.Cursor := crDrag;\r\n WebLabel2.Align := alLeft;\r\n WebLabel2.Caption := 'Title5';\r\n WebLabel2.DragMode := dmAutomatic;\r\n WebLabel2.ElementClassName := 'flt_block_title';\r\n WebLabel2.ElementFont := efCSS;\r\n WebLabel2.Font.Charset := ANSI_CHARSET;\r\n WebLabel2.Font.Color := clNavy;\r\n WebLabel2.Font.Height := -13;\r\n WebLabel2.Font.Name := 'Segoe UI Emoji';\r\n WebLabel2.Font.Style := [fsBold];\r\n WebLabel2.HeightPercent := 100.000000000000000000;\r\n WebLabel2.ParentFont := False;\r\n WebLabel2.WidthStyle := ssAuto;\r\n WebLabel2.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel2, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel2, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel2, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel2, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton5.SetParentComponent(WebPanel4);\r\n WebSpeedButton5.Name := 'WebSpeedButton5';\r\n WebSpeedButton5.Left := 0;\r\n WebSpeedButton5.Top := 0;\r\n WebSpeedButton5.Width := 24;\r\n WebSpeedButton5.Height := 28;\r\n WebSpeedButton5.Cursor := crHandPoint;\r\n WebSpeedButton5.Align := alLeft;\r\n WebSpeedButton5.Color := clNone;\r\n WebSpeedButton5.ElementClassName := 'btn_icon_nohighlight';\r\n WebSpeedButton5.Flat := True;\r\n WebSpeedButton5.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton5.MaterialGlyph := 'edit';\r\n WebSpeedButton5.MaterialGlyphSize := 14;\r\n WebSpeedButton5.TabOrder := 0;\r\n WebSpeedButton5.Visible := False;\r\n WebSpeedButton5.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton5, Self, 'OnClick', '_BlockCallPickForm');\r\n M5.SetParentComponent(B5);\r\n M5.Name := 'M5';\r\n M5.Left := 15;\r\n M5.Top := 28;\r\n M5.Width := 45;\r\n M5.Height := 32;\r\n M5.Align := alClient;\r\n M5.BorderStyle := bsNone;\r\n M5.ElementClassName := 'flt_block_memo';\r\n M5.ElementFont := efCSS;\r\n M5.Font.Charset := ANSI_CHARSET;\r\n M5.Font.Color := clBlack;\r\n M5.Font.Height := -13;\r\n M5.Font.Name := 'Tahoma';\r\n M5.Font.Style := [];\r\n M5.HeightPercent := 100.000000000000000000;\r\n M5.ParentFont := False;\r\n M5.SelLength := 0;\r\n M5.SelStart := 0;\r\n M5.ShowFocus := False;\r\n M5.WidthPercent := 100.000000000000000000;\r\n SetEvent(M5, Self, 'OnChange', 'M1Change');\r\n SetEvent(M5, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M5, Self, 'OnKeyDown', 'M1KeyDown');\r\n SetEvent(M5, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M5, Self, 'OnDragOver', 'M1DragOver');\r\n btnFltIcon5.SetParentComponent(B5);\r\n btnFltIcon5.Name := 'btnFltIcon5';\r\n btnFltIcon5.Left := 0;\r\n btnFltIcon5.Top := 28;\r\n btnFltIcon5.Width := 15;\r\n btnFltIcon5.Height := 32;\r\n btnFltIcon5.Cursor := crHandPoint;\r\n btnFltIcon5.Hint := 'Search';\r\n btnFltIcon5.Align := alLeft;\r\n btnFltIcon5.Color := clNone;\r\n btnFltIcon5.ElementClassName := 'btn_icon';\r\n btnFltIcon5.ElementFont := efCSS;\r\n btnFltIcon5.Font.Charset := DEFAULT_CHARSET;\r\n btnFltIcon5.Font.Color := clGray;\r\n btnFltIcon5.Font.Height := -13;\r\n btnFltIcon5.Font.Name := 'Tahoma';\r\n btnFltIcon5.Font.Style := [];\r\n btnFltIcon5.HeightPercent := 100.000000000000000000;\r\n btnFltIcon5.MaterialGlyph := 'search';\r\n btnFltIcon5.ParentFont := False;\r\n btnFltIcon5.ShowHint := True;\r\n btnFltIcon5.TabOrder := 10;\r\n btnFltIcon5.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnFltIcon5, Self, 'OnClick', 'btnApplyFilterClick');\r\n B4.SetParentComponent(sbSearch);\r\n B4.Name := 'B4';\r\n B4.Tag := -2;\r\n B4.Left := 203;\r\n B4.Top := 0;\r\n B4.Width := 60;\r\n B4.Height := 60;\r\n B4.ElementClassName := 'flt_data_block';\r\n B4.BorderColor := clWhite;\r\n B4.ChildOrder := 4;\r\n B4.Color := clWhite;\r\n B4.ElementFont := efCSS;\r\n B4.Font.Charset := ANSI_CHARSET;\r\n B4.Font.Color := clBlack;\r\n B4.Font.Height := -13;\r\n B4.Font.Name := 'Tahoma';\r\n B4.Font.Style := [fsUnderline];\r\n B4.ParentFont := False;\r\n B4.TabOrder := 2;\r\n SetEvent(B4, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B4, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel6.SetParentComponent(B4);\r\n WebPanel6.Name := 'WebPanel6';\r\n WebPanel6.Left := 0;\r\n WebPanel6.Top := 0;\r\n WebPanel6.Width := 60;\r\n WebPanel6.Height := 28;\r\n WebPanel6.ElementClassName := 'flt_block_top';\r\n WebPanel6.HeightStyle := ssAuto;\r\n WebPanel6.Align := alTop;\r\n WebPanel6.BorderStyle := bsNone;\r\n WebPanel6.ChildOrder := 2;\r\n WebPanel6.Color := clWhite;\r\n WebPanel6.ElementFont := efCSS;\r\n WebPanel6.TabOrder := 0;\r\n SetEvent(WebPanel6, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel6, Self, 'OnMouseMove', 'WebPanel12MouseMove');\r\n SetEvent(WebPanel6, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel6, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel3.SetParentComponent(WebPanel6);\r\n WebLabel3.Name := 'WebLabel3';\r\n WebLabel3.Left := 24;\r\n WebLabel3.Top := 0;\r\n WebLabel3.Width := 37;\r\n WebLabel3.Height := 28;\r\n WebLabel3.Cursor := crDrag;\r\n WebLabel3.Align := alLeft;\r\n WebLabel3.Caption := 'Title4';\r\n WebLabel3.DragMode := dmAutomatic;\r\n WebLabel3.ElementClassName := 'flt_block_title';\r\n WebLabel3.ElementFont := efCSS;\r\n WebLabel3.Font.Charset := ANSI_CHARSET;\r\n WebLabel3.Font.Color := clNavy;\r\n WebLabel3.Font.Height := -13;\r\n WebLabel3.Font.Name := 'Segoe UI Emoji';\r\n WebLabel3.Font.Style := [fsBold];\r\n WebLabel3.HeightPercent := 100.000000000000000000;\r\n WebLabel3.ParentFont := False;\r\n WebLabel3.WidthStyle := ssAuto;\r\n WebLabel3.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel3, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel3, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel3, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel3, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton4.SetParentComponent(WebPanel6);\r\n WebSpeedButton4.Name := 'WebSpeedButton4';\r\n WebSpeedButton4.Left := 0;\r\n WebSpeedButton4.Top := 0;\r\n WebSpeedButton4.Width := 24;\r\n WebSpeedButton4.Height := 28;\r\n WebSpeedButton4.Cursor := crHandPoint;\r\n WebSpeedButton4.Align := alLeft;\r\n WebSpeedButton4.Color := clNone;\r\n WebSpeedButton4.ElementClassName := 'btn_icon_nohighlight';\r\n WebSpeedButton4.Flat := True;\r\n WebSpeedButton4.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton4.MaterialGlyph := 'edit';\r\n WebSpeedButton4.MaterialGlyphSize := 14;\r\n WebSpeedButton4.TabOrder := 0;\r\n WebSpeedButton4.Visible := False;\r\n WebSpeedButton4.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton4, Self, 'OnClick', '_BlockCallPickForm');\r\n M4.SetParentComponent(B4);\r\n M4.Name := 'M4';\r\n M4.Left := 15;\r\n M4.Top := 28;\r\n M4.Width := 45;\r\n M4.Height := 32;\r\n M4.Align := alClient;\r\n M4.BorderStyle := bsNone;\r\n M4.ElementClassName := 'flt_block_memo';\r\n M4.ElementFont := efCSS;\r\n M4.Font.Charset := ANSI_CHARSET;\r\n M4.Font.Color := clBlack;\r\n M4.Font.Height := -13;\r\n M4.Font.Name := 'Tahoma';\r\n M4.Font.Style := [];\r\n M4.HeightPercent := 100.000000000000000000;\r\n M4.ParentFont := False;\r\n M4.SelLength := 0;\r\n M4.SelStart := 0;\r\n M4.ShowFocus := False;\r\n M4.WidthPercent := 100.000000000000000000;\r\n SetEvent(M4, Self, 'OnChange', 'M1Change');\r\n SetEvent(M4, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M4, Self, 'OnKeyDown', 'M1KeyDown');\r\n SetEvent(M4, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M4, Self, 'OnDragOver', 'M1DragOver');\r\n btnFltIcon4.SetParentComponent(B4);\r\n btnFltIcon4.Name := 'btnFltIcon4';\r\n btnFltIcon4.Left := 0;\r\n btnFltIcon4.Top := 28;\r\n btnFltIcon4.Width := 15;\r\n btnFltIcon4.Height := 32;\r\n btnFltIcon4.Cursor := crHandPoint;\r\n btnFltIcon4.Hint := 'Search';\r\n btnFltIcon4.Align := alLeft;\r\n btnFltIcon4.Color := clNone;\r\n btnFltIcon4.ElementClassName := 'btn_icon';\r\n btnFltIcon4.ElementFont := efCSS;\r\n btnFltIcon4.Font.Charset := DEFAULT_CHARSET;\r\n btnFltIcon4.Font.Color := clGray;\r\n btnFltIcon4.Font.Height := -13;\r\n btnFltIcon4.Font.Name := 'Tahoma';\r\n btnFltIcon4.Font.Style := [];\r\n btnFltIcon4.HeightPercent := 100.000000000000000000;\r\n btnFltIcon4.MaterialGlyph := 'search';\r\n btnFltIcon4.ParentFont := False;\r\n btnFltIcon4.ShowHint := True;\r\n btnFltIcon4.TabOrder := 10;\r\n btnFltIcon4.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnFltIcon4, Self, 'OnClick', 'btnApplyFilterClick');\r\n B3.SetParentComponent(sbSearch);\r\n B3.Name := 'B3';\r\n B3.Tag := -2;\r\n B3.Left := 137;\r\n B3.Top := 0;\r\n B3.Width := 60;\r\n B3.Height := 60;\r\n B3.ElementClassName := 'flt_data_block';\r\n B3.BorderColor := clWhite;\r\n B3.ChildOrder := 3;\r\n B3.Color := clWhite;\r\n B3.ElementFont := efCSS;\r\n B3.Font.Charset := ANSI_CHARSET;\r\n B3.Font.Color := clBlack;\r\n B3.Font.Height := -13;\r\n B3.Font.Name := 'Tahoma';\r\n B3.Font.Style := [fsUnderline];\r\n B3.ParentFont := False;\r\n B3.TabOrder := 3;\r\n SetEvent(B3, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B3, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel8.SetParentComponent(B3);\r\n WebPanel8.Name := 'WebPanel8';\r\n WebPanel8.Left := 0;\r\n WebPanel8.Top := 0;\r\n WebPanel8.Width := 60;\r\n WebPanel8.Height := 28;\r\n WebPanel8.ElementClassName := 'flt_block_top';\r\n WebPanel8.HeightStyle := ssAuto;\r\n WebPanel8.Align := alTop;\r\n WebPanel8.BorderStyle := bsNone;\r\n WebPanel8.ChildOrder := 2;\r\n WebPanel8.Color := clWhite;\r\n WebPanel8.ElementFont := efCSS;\r\n WebPanel8.TabOrder := 0;\r\n SetEvent(WebPanel8, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel8, Self, 'OnMouseMove', 'WebPanel12MouseMove');\r\n SetEvent(WebPanel8, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel8, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel4.SetParentComponent(WebPanel8);\r\n WebLabel4.Name := 'WebLabel4';\r\n WebLabel4.Left := 24;\r\n WebLabel4.Top := 0;\r\n WebLabel4.Width := 37;\r\n WebLabel4.Height := 28;\r\n WebLabel4.Cursor := crDrag;\r\n WebLabel4.Align := alLeft;\r\n WebLabel4.Caption := 'Title3';\r\n WebLabel4.DragMode := dmAutomatic;\r\n WebLabel4.ElementClassName := 'flt_block_title';\r\n WebLabel4.ElementFont := efCSS;\r\n WebLabel4.Font.Charset := ANSI_CHARSET;\r\n WebLabel4.Font.Color := clNavy;\r\n WebLabel4.Font.Height := -13;\r\n WebLabel4.Font.Name := 'Segoe UI Emoji';\r\n WebLabel4.Font.Style := [fsBold];\r\n WebLabel4.HeightPercent := 100.000000000000000000;\r\n WebLabel4.ParentFont := False;\r\n WebLabel4.WidthStyle := ssAuto;\r\n WebLabel4.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel4, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel4, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel4, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel4, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton3.SetParentComponent(WebPanel8);\r\n WebSpeedButton3.Name := 'WebSpeedButton3';\r\n WebSpeedButton3.Left := 0;\r\n WebSpeedButton3.Top := 0;\r\n WebSpeedButton3.Width := 24;\r\n WebSpeedButton3.Height := 28;\r\n WebSpeedButton3.Cursor := crHandPoint;\r\n WebSpeedButton3.Align := alLeft;\r\n WebSpeedButton3.Color := clNone;\r\n WebSpeedButton3.ElementClassName := 'btn_icon_nohighlight';\r\n WebSpeedButton3.Flat := True;\r\n WebSpeedButton3.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton3.MaterialGlyph := 'edit';\r\n WebSpeedButton3.MaterialGlyphSize := 14;\r\n WebSpeedButton3.TabOrder := 0;\r\n WebSpeedButton3.Visible := False;\r\n WebSpeedButton3.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton3, Self, 'OnClick', '_BlockCallPickForm');\r\n M3.SetParentComponent(B3);\r\n M3.Name := 'M3';\r\n M3.Left := 15;\r\n M3.Top := 28;\r\n M3.Width := 45;\r\n M3.Height := 32;\r\n M3.Align := alClient;\r\n M3.BorderStyle := bsNone;\r\n M3.ElementClassName := 'flt_block_memo';\r\n M3.ElementFont := efCSS;\r\n M3.Font.Charset := ANSI_CHARSET;\r\n M3.Font.Color := clBlack;\r\n M3.Font.Height := -13;\r\n M3.Font.Name := 'Tahoma';\r\n M3.Font.Style := [];\r\n M3.HeightPercent := 100.000000000000000000;\r\n M3.ParentFont := False;\r\n M3.SelLength := 0;\r\n M3.SelStart := 0;\r\n M3.ShowFocus := False;\r\n M3.WidthPercent := 100.000000000000000000;\r\n SetEvent(M3, Self, 'OnChange', 'M1Change');\r\n SetEvent(M3, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M3, Self, 'OnKeyDown', 'M1KeyDown');\r\n SetEvent(M3, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M3, Self, 'OnDragOver', 'M1DragOver');\r\n btnFltIcon3.SetParentComponent(B3);\r\n btnFltIcon3.Name := 'btnFltIcon3';\r\n btnFltIcon3.Left := 0;\r\n btnFltIcon3.Top := 28;\r\n btnFltIcon3.Width := 15;\r\n btnFltIcon3.Height := 32;\r\n btnFltIcon3.Cursor := crHandPoint;\r\n btnFltIcon3.Hint := 'Search';\r\n btnFltIcon3.Align := alLeft;\r\n btnFltIcon3.Color := clNone;\r\n btnFltIcon3.ElementClassName := 'btn_icon';\r\n btnFltIcon3.ElementFont := efCSS;\r\n btnFltIcon3.Font.Charset := DEFAULT_CHARSET;\r\n btnFltIcon3.Font.Color := clGray;\r\n btnFltIcon3.Font.Height := -13;\r\n btnFltIcon3.Font.Name := 'Tahoma';\r\n btnFltIcon3.Font.Style := [];\r\n btnFltIcon3.HeightPercent := 100.000000000000000000;\r\n btnFltIcon3.MaterialGlyph := 'search';\r\n btnFltIcon3.ParentFont := False;\r\n btnFltIcon3.ShowHint := True;\r\n btnFltIcon3.TabOrder := 10;\r\n btnFltIcon3.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnFltIcon3, Self, 'OnClick', 'btnApplyFilterClick');\r\n B2.SetParentComponent(sbSearch);\r\n B2.Name := 'B2';\r\n B2.Tag := -2;\r\n B2.Left := 71;\r\n B2.Top := 0;\r\n B2.Width := 60;\r\n B2.Height := 60;\r\n B2.ElementClassName := 'flt_data_block';\r\n B2.BorderColor := clWhite;\r\n B2.ChildOrder := 2;\r\n B2.Color := clWhite;\r\n B2.ElementFont := efCSS;\r\n B2.Font.Charset := ANSI_CHARSET;\r\n B2.Font.Color := clBlack;\r\n B2.Font.Height := -13;\r\n B2.Font.Name := 'Tahoma';\r\n B2.Font.Style := [fsUnderline];\r\n B2.ParentFont := False;\r\n B2.TabOrder := 4;\r\n SetEvent(B2, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B2, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel10.SetParentComponent(B2);\r\n WebPanel10.Name := 'WebPanel10';\r\n WebPanel10.Left := 0;\r\n WebPanel10.Top := 0;\r\n WebPanel10.Width := 60;\r\n WebPanel10.Height := 28;\r\n WebPanel10.ElementClassName := 'flt_block_top';\r\n WebPanel10.HeightStyle := ssAuto;\r\n WebPanel10.Align := alTop;\r\n WebPanel10.BorderStyle := bsNone;\r\n WebPanel10.ChildOrder := 2;\r\n WebPanel10.Color := clWhite;\r\n WebPanel10.ElementFont := efCSS;\r\n WebPanel10.TabOrder := 0;\r\n SetEvent(WebPanel10, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel10, Self, 'OnMouseMove', 'WebPanel12MouseMove');\r\n SetEvent(WebPanel10, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel10, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel5.SetParentComponent(WebPanel10);\r\n WebLabel5.Name := 'WebLabel5';\r\n WebLabel5.Left := 24;\r\n WebLabel5.Top := 0;\r\n WebLabel5.Width := 37;\r\n WebLabel5.Height := 28;\r\n WebLabel5.Cursor := crDrag;\r\n WebLabel5.Align := alLeft;\r\n WebLabel5.Caption := 'Title2';\r\n WebLabel5.DragMode := dmAutomatic;\r\n WebLabel5.ElementClassName := 'flt_block_title';\r\n WebLabel5.ElementFont := efCSS;\r\n WebLabel5.Font.Charset := ANSI_CHARSET;\r\n WebLabel5.Font.Color := clNavy;\r\n WebLabel5.Font.Height := -13;\r\n WebLabel5.Font.Name := 'Segoe UI Emoji';\r\n WebLabel5.Font.Style := [fsBold];\r\n WebLabel5.HeightPercent := 100.000000000000000000;\r\n WebLabel5.ParentFont := False;\r\n WebLabel5.WidthStyle := ssAuto;\r\n WebLabel5.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel5, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel5, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel5, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel5, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton2.SetParentComponent(WebPanel10);\r\n WebSpeedButton2.Name := 'WebSpeedButton2';\r\n WebSpeedButton2.Left := 0;\r\n WebSpeedButton2.Top := 0;\r\n WebSpeedButton2.Width := 24;\r\n WebSpeedButton2.Height := 28;\r\n WebSpeedButton2.Cursor := crHandPoint;\r\n WebSpeedButton2.Align := alLeft;\r\n WebSpeedButton2.Color := clNone;\r\n WebSpeedButton2.ElementClassName := 'btn_icon_nohighlight';\r\n WebSpeedButton2.Flat := True;\r\n WebSpeedButton2.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton2.MaterialGlyph := 'edit';\r\n WebSpeedButton2.MaterialGlyphSize := 14;\r\n WebSpeedButton2.TabOrder := 0;\r\n WebSpeedButton2.Visible := False;\r\n WebSpeedButton2.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton2, Self, 'OnClick', '_BlockCallPickForm');\r\n M2.SetParentComponent(B2);\r\n M2.Name := 'M2';\r\n M2.Left := 15;\r\n M2.Top := 28;\r\n M2.Width := 45;\r\n M2.Height := 32;\r\n M2.Align := alClient;\r\n M2.BorderStyle := bsNone;\r\n M2.ElementClassName := 'flt_block_memo';\r\n M2.ElementFont := efCSS;\r\n M2.Font.Charset := ANSI_CHARSET;\r\n M2.Font.Color := clBlack;\r\n M2.Font.Height := -13;\r\n M2.Font.Name := 'Tahoma';\r\n M2.Font.Style := [];\r\n M2.HeightPercent := 100.000000000000000000;\r\n M2.ParentFont := False;\r\n M2.SelLength := 0;\r\n M2.SelStart := 0;\r\n M2.ShowFocus := False;\r\n M2.WidthPercent := 100.000000000000000000;\r\n SetEvent(M2, Self, 'OnChange', 'M1Change');\r\n SetEvent(M2, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M2, Self, 'OnKeyDown', 'M1KeyDown');\r\n SetEvent(M2, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M2, Self, 'OnDragOver', 'M1DragOver');\r\n btnFltIcon2.SetParentComponent(B2);\r\n btnFltIcon2.Name := 'btnFltIcon2';\r\n btnFltIcon2.Left := 0;\r\n btnFltIcon2.Top := 28;\r\n btnFltIcon2.Width := 15;\r\n btnFltIcon2.Height := 32;\r\n btnFltIcon2.Cursor := crHandPoint;\r\n btnFltIcon2.Hint := 'Search';\r\n btnFltIcon2.Align := alLeft;\r\n btnFltIcon2.Color := clNone;\r\n btnFltIcon2.ElementClassName := 'btn_icon';\r\n btnFltIcon2.ElementFont := efCSS;\r\n btnFltIcon2.Font.Charset := DEFAULT_CHARSET;\r\n btnFltIcon2.Font.Color := clGray;\r\n btnFltIcon2.Font.Height := -13;\r\n btnFltIcon2.Font.Name := 'Tahoma';\r\n btnFltIcon2.Font.Style := [];\r\n btnFltIcon2.HeightPercent := 100.000000000000000000;\r\n btnFltIcon2.MaterialGlyph := 'search';\r\n btnFltIcon2.ParentFont := False;\r\n btnFltIcon2.ShowHint := True;\r\n btnFltIcon2.TabOrder := 10;\r\n btnFltIcon2.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnFltIcon2, Self, 'OnClick', 'btnApplyFilterClick');\r\n B1.SetParentComponent(sbSearch);\r\n B1.Name := 'B1';\r\n B1.Tag := -2;\r\n B1.Left := 5;\r\n B1.Top := 0;\r\n B1.Width := 60;\r\n B1.Height := 60;\r\n B1.ElementClassName := 'flt_data_block';\r\n B1.BorderColor := clWhite;\r\n B1.ChildOrder := 1;\r\n B1.Color := clWhite;\r\n B1.ElementFont := efCSS;\r\n B1.Font.Charset := ANSI_CHARSET;\r\n B1.Font.Color := clBlack;\r\n B1.Font.Height := -13;\r\n B1.Font.Name := 'Tahoma';\r\n B1.Font.Style := [fsUnderline];\r\n B1.ParentFont := False;\r\n B1.TabOrder := 5;\r\n SetEvent(B1, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B1, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel12.SetParentComponent(B1);\r\n WebPanel12.Name := 'WebPanel12';\r\n WebPanel12.Left := 0;\r\n WebPanel12.Top := 0;\r\n WebPanel12.Width := 60;\r\n WebPanel12.Height := 28;\r\n WebPanel12.ElementClassName := 'flt_block_top';\r\n WebPanel12.HeightStyle := ssAuto;\r\n WebPanel12.Align := alTop;\r\n WebPanel12.BorderStyle := bsNone;\r\n WebPanel12.ChildOrder := 2;\r\n WebPanel12.Color := clWhite;\r\n WebPanel12.ElementFont := efCSS;\r\n WebPanel12.TabOrder := 0;\r\n SetEvent(WebPanel12, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel12, Self, 'OnMouseMove', 'WebPanel12MouseMove');\r\n SetEvent(WebPanel12, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel12, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel6.SetParentComponent(WebPanel12);\r\n WebLabel6.Name := 'WebLabel6';\r\n WebLabel6.Left := 24;\r\n WebLabel6.Top := 0;\r\n WebLabel6.Width := 37;\r\n WebLabel6.Height := 28;\r\n WebLabel6.Cursor := crDrag;\r\n WebLabel6.Align := alLeft;\r\n WebLabel6.Caption := 'Title1';\r\n WebLabel6.DragMode := dmAutomatic;\r\n WebLabel6.ElementClassName := 'flt_block_title';\r\n WebLabel6.ElementFont := efCSS;\r\n WebLabel6.Font.Charset := ANSI_CHARSET;\r\n WebLabel6.Font.Color := clNavy;\r\n WebLabel6.Font.Height := -13;\r\n WebLabel6.Font.Name := 'Segoe UI Emoji';\r\n WebLabel6.Font.Style := [fsBold];\r\n WebLabel6.HeightPercent := 100.000000000000000000;\r\n WebLabel6.ParentFont := False;\r\n WebLabel6.WidthStyle := ssAuto;\r\n WebLabel6.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel6, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel6, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel6, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel6, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton1.SetParentComponent(WebPanel12);\r\n WebSpeedButton1.Name := 'WebSpeedButton1';\r\n WebSpeedButton1.Left := 0;\r\n WebSpeedButton1.Top := 0;\r\n WebSpeedButton1.Width := 24;\r\n WebSpeedButton1.Height := 28;\r\n WebSpeedButton1.Cursor := crHandPoint;\r\n WebSpeedButton1.Align := alLeft;\r\n WebSpeedButton1.Color := clNone;\r\n WebSpeedButton1.ElementClassName := 'btn_icon_nohighlight';\r\n WebSpeedButton1.Flat := True;\r\n WebSpeedButton1.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton1.MaterialGlyph := 'edit';\r\n WebSpeedButton1.MaterialGlyphSize := 14;\r\n WebSpeedButton1.TabOrder := 0;\r\n WebSpeedButton1.Visible := False;\r\n WebSpeedButton1.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton1, Self, 'OnClick', '_BlockCallPickForm');\r\n M1.SetParentComponent(B1);\r\n M1.Name := 'M1';\r\n M1.Left := 15;\r\n M1.Top := 28;\r\n M1.Width := 45;\r\n M1.Height := 32;\r\n M1.Align := alClient;\r\n M1.BorderStyle := bsNone;\r\n M1.ElementClassName := 'flt_block_memo';\r\n M1.ElementFont := efCSS;\r\n M1.Font.Charset := ANSI_CHARSET;\r\n M1.Font.Color := clBlack;\r\n M1.Font.Height := -13;\r\n M1.Font.Name := 'Tahoma';\r\n M1.Font.Style := [];\r\n M1.HeightPercent := 100.000000000000000000;\r\n M1.ParentFont := False;\r\n M1.SelLength := 0;\r\n M1.SelStart := 0;\r\n M1.ShowFocus := False;\r\n M1.WidthPercent := 100.000000000000000000;\r\n SetEvent(M1, Self, 'OnChange', 'M1Change');\r\n SetEvent(M1, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M1, Self, 'OnKeyDown', 'M1KeyDown');\r\n SetEvent(M1, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M1, Self, 'OnDragOver', 'M1DragOver');\r\n btnFltIcon1.SetParentComponent(B1);\r\n btnFltIcon1.Name := 'btnFltIcon1';\r\n btnFltIcon1.Left := 0;\r\n btnFltIcon1.Top := 28;\r\n btnFltIcon1.Width := 15;\r\n btnFltIcon1.Height := 32;\r\n btnFltIcon1.Cursor := crHandPoint;\r\n btnFltIcon1.Hint := 'Search';\r\n btnFltIcon1.Align := alLeft;\r\n btnFltIcon1.Color := clNone;\r\n btnFltIcon1.ElementClassName := 'btn_icon';\r\n btnFltIcon1.ElementFont := efCSS;\r\n btnFltIcon1.Font.Charset := DEFAULT_CHARSET;\r\n btnFltIcon1.Font.Color := clGray;\r\n btnFltIcon1.Font.Height := -13;\r\n btnFltIcon1.Font.Name := 'Tahoma';\r\n btnFltIcon1.Font.Style := [];\r\n btnFltIcon1.HeightPercent := 100.000000000000000000;\r\n btnFltIcon1.MaterialGlyph := 'search';\r\n btnFltIcon1.ParentFont := False;\r\n btnFltIcon1.ShowHint := True;\r\n btnFltIcon1.TabOrder := 10;\r\n btnFltIcon1.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnFltIcon1, Self, 'OnClick', 'btnApplyFilterClick');\r\n B7.SetParentComponent(sbSearch);\r\n B7.Name := 'B7';\r\n B7.Tag := -2;\r\n B7.Left := 403;\r\n B7.Top := 0;\r\n B7.Width := 60;\r\n B7.Height := 60;\r\n B7.ElementClassName := 'flt_data_block';\r\n B7.BorderColor := clWhite;\r\n B7.ChildOrder := 7;\r\n B7.Color := clWhite;\r\n B7.ElementFont := efCSS;\r\n B7.Font.Charset := ANSI_CHARSET;\r\n B7.Font.Color := clBlack;\r\n B7.Font.Height := -13;\r\n B7.Font.Name := 'Tahoma';\r\n B7.Font.Style := [fsUnderline];\r\n B7.ParentFont := False;\r\n B7.TabOrder := 6;\r\n SetEvent(B7, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B7, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel70.SetParentComponent(B7);\r\n WebPanel70.Name := 'WebPanel70';\r\n WebPanel70.Left := 0;\r\n WebPanel70.Top := 0;\r\n WebPanel70.Width := 60;\r\n WebPanel70.Height := 28;\r\n WebPanel70.ElementClassName := 'flt_block_top';\r\n WebPanel70.HeightStyle := ssAuto;\r\n WebPanel70.Align := alTop;\r\n WebPanel70.BorderStyle := bsNone;\r\n WebPanel70.ChildOrder := 2;\r\n WebPanel70.Color := clWhite;\r\n WebPanel70.ElementFont := efCSS;\r\n WebPanel70.TabOrder := 0;\r\n SetEvent(WebPanel70, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel70, Self, 'OnMouseMove', 'WebPanel12MouseMove');\r\n SetEvent(WebPanel70, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel70, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel36.SetParentComponent(WebPanel70);\r\n WebLabel36.Name := 'WebLabel36';\r\n WebLabel36.Left := 24;\r\n WebLabel36.Top := 0;\r\n WebLabel36.Width := 37;\r\n WebLabel36.Height := 28;\r\n WebLabel36.Cursor := crDrag;\r\n WebLabel36.Align := alLeft;\r\n WebLabel36.Caption := 'Title7';\r\n WebLabel36.DragMode := dmAutomatic;\r\n WebLabel36.ElementClassName := 'flt_block_title';\r\n WebLabel36.ElementFont := efCSS;\r\n WebLabel36.Font.Charset := ANSI_CHARSET;\r\n WebLabel36.Font.Color := clNavy;\r\n WebLabel36.Font.Height := -13;\r\n WebLabel36.Font.Name := 'Segoe UI Emoji';\r\n WebLabel36.Font.Style := [fsBold];\r\n WebLabel36.HeightPercent := 100.000000000000000000;\r\n WebLabel36.ParentFont := False;\r\n WebLabel36.WidthStyle := ssAuto;\r\n WebLabel36.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel36, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel36, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel36, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel36, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton6.SetParentComponent(WebPanel70);\r\n WebSpeedButton6.Name := 'WebSpeedButton6';\r\n WebSpeedButton6.Left := 0;\r\n WebSpeedButton6.Top := 0;\r\n WebSpeedButton6.Width := 24;\r\n WebSpeedButton6.Height := 28;\r\n WebSpeedButton6.Cursor := crHandPoint;\r\n WebSpeedButton6.Align := alLeft;\r\n WebSpeedButton6.Color := clNone;\r\n WebSpeedButton6.ElementClassName := 'btn_icon_nohighlight';\r\n WebSpeedButton6.Flat := True;\r\n WebSpeedButton6.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton6.MaterialGlyph := 'edit';\r\n WebSpeedButton6.MaterialGlyphSize := 14;\r\n WebSpeedButton6.TabOrder := 0;\r\n WebSpeedButton6.Visible := False;\r\n WebSpeedButton6.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton6, Self, 'OnClick', '_BlockCallPickForm');\r\n M7.SetParentComponent(B7);\r\n M7.Name := 'M7';\r\n M7.Left := 15;\r\n M7.Top := 28;\r\n M7.Width := 45;\r\n M7.Height := 32;\r\n M7.Align := alClient;\r\n M7.BorderStyle := bsNone;\r\n M7.ElementClassName := 'flt_block_memo';\r\n M7.ElementFont := efCSS;\r\n M7.Font.Charset := ANSI_CHARSET;\r\n M7.Font.Color := clBlack;\r\n M7.Font.Height := -13;\r\n M7.Font.Name := 'Tahoma';\r\n M7.Font.Style := [];\r\n M7.HeightPercent := 100.000000000000000000;\r\n M7.ParentFont := False;\r\n M7.SelLength := 0;\r\n M7.SelStart := 0;\r\n M7.ShowFocus := False;\r\n M7.WidthPercent := 100.000000000000000000;\r\n SetEvent(M7, Self, 'OnChange', 'M1Change');\r\n SetEvent(M7, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M7, Self, 'OnKeyDown', 'M1KeyDown');\r\n SetEvent(M7, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M7, Self, 'OnDragOver', 'M1DragOver');\r\n btnFltIcon7.SetParentComponent(B7);\r\n btnFltIcon7.Name := 'btnFltIcon7';\r\n btnFltIcon7.Left := 0;\r\n btnFltIcon7.Top := 28;\r\n btnFltIcon7.Width := 15;\r\n btnFltIcon7.Height := 32;\r\n btnFltIcon7.Cursor := crHandPoint;\r\n btnFltIcon7.Hint := 'Search';\r\n btnFltIcon7.Align := alLeft;\r\n btnFltIcon7.Color := clNone;\r\n btnFltIcon7.ElementClassName := 'btn_icon';\r\n btnFltIcon7.ElementFont := efCSS;\r\n btnFltIcon7.Font.Charset := DEFAULT_CHARSET;\r\n btnFltIcon7.Font.Color := clGray;\r\n btnFltIcon7.Font.Height := -13;\r\n btnFltIcon7.Font.Name := 'Tahoma';\r\n btnFltIcon7.Font.Style := [];\r\n btnFltIcon7.HeightPercent := 100.000000000000000000;\r\n btnFltIcon7.MaterialGlyph := 'search';\r\n btnFltIcon7.ParentFont := False;\r\n btnFltIcon7.ShowHint := True;\r\n btnFltIcon7.TabOrder := 10;\r\n btnFltIcon7.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnFltIcon7, Self, 'OnClick', 'btnApplyFilterClick');\r\n B8.SetParentComponent(sbSearch);\r\n B8.Name := 'B8';\r\n B8.Tag := -2;\r\n B8.Left := 469;\r\n B8.Top := 0;\r\n B8.Width := 60;\r\n B8.Height := 60;\r\n B8.ElementClassName := 'flt_data_block';\r\n B8.BorderColor := clWhite;\r\n B8.ChildOrder := 8;\r\n B8.Color := clWhite;\r\n B8.ElementFont := efCSS;\r\n B8.Font.Charset := ANSI_CHARSET;\r\n B8.Font.Color := clBlack;\r\n B8.Font.Height := -13;\r\n B8.Font.Name := 'Tahoma';\r\n B8.Font.Style := [fsUnderline];\r\n B8.ParentFont := False;\r\n B8.TabOrder := 7;\r\n SetEvent(B8, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B8, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel3.SetParentComponent(B8);\r\n WebPanel3.Name := 'WebPanel3';\r\n WebPanel3.Left := 0;\r\n WebPanel3.Top := 0;\r\n WebPanel3.Width := 60;\r\n WebPanel3.Height := 28;\r\n WebPanel3.ElementClassName := 'flt_block_top';\r\n WebPanel3.HeightStyle := ssAuto;\r\n WebPanel3.Align := alTop;\r\n WebPanel3.BorderStyle := bsNone;\r\n WebPanel3.ChildOrder := 2;\r\n WebPanel3.Color := clWhite;\r\n WebPanel3.ElementFont := efCSS;\r\n WebPanel3.TabOrder := 0;\r\n SetEvent(WebPanel3, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel3, Self, 'OnMouseMove', 'WebPanel12MouseMove');\r\n SetEvent(WebPanel3, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel3, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel12.SetParentComponent(WebPanel3);\r\n WebLabel12.Name := 'WebLabel12';\r\n WebLabel12.Left := 24;\r\n WebLabel12.Top := 0;\r\n WebLabel12.Width := 37;\r\n WebLabel12.Height := 28;\r\n WebLabel12.Cursor := crDrag;\r\n WebLabel12.Align := alLeft;\r\n WebLabel12.Caption := 'Title8';\r\n WebLabel12.DragMode := dmAutomatic;\r\n WebLabel12.ElementClassName := 'flt_block_title';\r\n WebLabel12.ElementFont := efCSS;\r\n WebLabel12.Font.Charset := ANSI_CHARSET;\r\n WebLabel12.Font.Color := clNavy;\r\n WebLabel12.Font.Height := -13;\r\n WebLabel12.Font.Name := 'Segoe UI Emoji';\r\n WebLabel12.Font.Style := [fsBold];\r\n WebLabel12.HeightPercent := 100.000000000000000000;\r\n WebLabel12.ParentFont := False;\r\n WebLabel12.WidthStyle := ssAuto;\r\n WebLabel12.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel12, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel12, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel12, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel12, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton13.SetParentComponent(WebPanel3);\r\n WebSpeedButton13.Name := 'WebSpeedButton13';\r\n WebSpeedButton13.Left := 0;\r\n WebSpeedButton13.Top := 0;\r\n WebSpeedButton13.Width := 24;\r\n WebSpeedButton13.Height := 28;\r\n WebSpeedButton13.Cursor := crHandPoint;\r\n WebSpeedButton13.Align := alLeft;\r\n WebSpeedButton13.Color := clNone;\r\n WebSpeedButton13.ElementClassName := 'btn_icon_nohighlight';\r\n WebSpeedButton13.Flat := True;\r\n WebSpeedButton13.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton13.MaterialGlyph := 'edit';\r\n WebSpeedButton13.MaterialGlyphSize := 14;\r\n WebSpeedButton13.TabOrder := 0;\r\n WebSpeedButton13.Visible := False;\r\n WebSpeedButton13.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton13, Self, 'OnClick', '_BlockCallPickForm');\r\n M8.SetParentComponent(B8);\r\n M8.Name := 'M8';\r\n M8.Left := 15;\r\n M8.Top := 28;\r\n M8.Width := 45;\r\n M8.Height := 32;\r\n M8.Align := alClient;\r\n M8.BorderStyle := bsNone;\r\n M8.ElementClassName := 'flt_block_memo';\r\n M8.ElementFont := efCSS;\r\n M8.Font.Charset := ANSI_CHARSET;\r\n M8.Font.Color := clBlack;\r\n M8.Font.Height := -13;\r\n M8.Font.Name := 'Tahoma';\r\n M8.Font.Style := [];\r\n M8.HeightPercent := 100.000000000000000000;\r\n M8.ParentFont := False;\r\n M8.SelLength := 0;\r\n M8.SelStart := 0;\r\n M8.ShowFocus := False;\r\n M8.WidthPercent := 100.000000000000000000;\r\n SetEvent(M8, Self, 'OnChange', 'M1Change');\r\n SetEvent(M8, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M8, Self, 'OnKeyDown', 'M1KeyDown');\r\n SetEvent(M8, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M8, Self, 'OnDragOver', 'M1DragOver');\r\n btnFltIcon8.SetParentComponent(B8);\r\n btnFltIcon8.Name := 'btnFltIcon8';\r\n btnFltIcon8.Left := 0;\r\n btnFltIcon8.Top := 28;\r\n btnFltIcon8.Width := 15;\r\n btnFltIcon8.Height := 32;\r\n btnFltIcon8.Cursor := crHandPoint;\r\n btnFltIcon8.Hint := 'Search';\r\n btnFltIcon8.Align := alLeft;\r\n btnFltIcon8.Color := clNone;\r\n btnFltIcon8.ElementClassName := 'btn_icon';\r\n btnFltIcon8.ElementFont := efCSS;\r\n btnFltIcon8.Font.Charset := DEFAULT_CHARSET;\r\n btnFltIcon8.Font.Color := clGray;\r\n btnFltIcon8.Font.Height := -13;\r\n btnFltIcon8.Font.Name := 'Tahoma';\r\n btnFltIcon8.Font.Style := [];\r\n btnFltIcon8.HeightPercent := 100.000000000000000000;\r\n btnFltIcon8.MaterialGlyph := 'search';\r\n btnFltIcon8.ParentFont := False;\r\n btnFltIcon8.ShowHint := True;\r\n btnFltIcon8.TabOrder := 10;\r\n btnFltIcon8.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnFltIcon8, Self, 'OnClick', 'btnApplyFilterClick');\r\n B9.SetParentComponent(sbSearch);\r\n B9.Name := 'B9';\r\n B9.Tag := -2;\r\n B9.Left := 536;\r\n B9.Top := 0;\r\n B9.Width := 60;\r\n B9.Height := 60;\r\n B9.ElementClassName := 'flt_data_block';\r\n B9.BorderColor := clWhite;\r\n B9.ChildOrder := 9;\r\n B9.Color := clWhite;\r\n B9.ElementFont := efCSS;\r\n B9.Font.Charset := ANSI_CHARSET;\r\n B9.Font.Color := clBlack;\r\n B9.Font.Height := -13;\r\n B9.Font.Name := 'Tahoma';\r\n B9.Font.Style := [fsUnderline];\r\n B9.ParentFont := False;\r\n B9.TabOrder := 8;\r\n SetEvent(B9, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B9, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel7.SetParentComponent(B9);\r\n WebPanel7.Name := 'WebPanel7';\r\n WebPanel7.Left := 0;\r\n WebPanel7.Top := 0;\r\n WebPanel7.Width := 60;\r\n WebPanel7.Height := 28;\r\n WebPanel7.ElementClassName := 'flt_block_top';\r\n WebPanel7.HeightStyle := ssAuto;\r\n WebPanel7.Align := alTop;\r\n WebPanel7.BorderStyle := bsNone;\r\n WebPanel7.ChildOrder := 2;\r\n WebPanel7.Color := clWhite;\r\n WebPanel7.ElementFont := efCSS;\r\n WebPanel7.TabOrder := 0;\r\n SetEvent(WebPanel7, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel7, Self, 'OnMouseMove', 'WebPanel12MouseMove');\r\n SetEvent(WebPanel7, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel7, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel13.SetParentComponent(WebPanel7);\r\n WebLabel13.Name := 'WebLabel13';\r\n WebLabel13.Left := 24;\r\n WebLabel13.Top := 0;\r\n WebLabel13.Width := 37;\r\n WebLabel13.Height := 28;\r\n WebLabel13.Cursor := crDrag;\r\n WebLabel13.Align := alLeft;\r\n WebLabel13.Caption := 'Title9';\r\n WebLabel13.DragMode := dmAutomatic;\r\n WebLabel13.ElementClassName := 'flt_block_title';\r\n WebLabel13.ElementFont := efCSS;\r\n WebLabel13.Font.Charset := ANSI_CHARSET;\r\n WebLabel13.Font.Color := clNavy;\r\n WebLabel13.Font.Height := -13;\r\n WebLabel13.Font.Name := 'Segoe UI Emoji';\r\n WebLabel13.Font.Style := [fsBold];\r\n WebLabel13.HeightPercent := 100.000000000000000000;\r\n WebLabel13.ParentFont := False;\r\n WebLabel13.WidthStyle := ssAuto;\r\n WebLabel13.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel13, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel13, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel13, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel13, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton14.SetParentComponent(WebPanel7);\r\n WebSpeedButton14.Name := 'WebSpeedButton14';\r\n WebSpeedButton14.Left := 0;\r\n WebSpeedButton14.Top := 0;\r\n WebSpeedButton14.Width := 24;\r\n WebSpeedButton14.Height := 28;\r\n WebSpeedButton14.Cursor := crHandPoint;\r\n WebSpeedButton14.Align := alLeft;\r\n WebSpeedButton14.Color := clNone;\r\n WebSpeedButton14.ElementClassName := 'btn_icon_nohighlight';\r\n WebSpeedButton14.Flat := True;\r\n WebSpeedButton14.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton14.MaterialGlyph := 'edit';\r\n WebSpeedButton14.MaterialGlyphSize := 14;\r\n WebSpeedButton14.TabOrder := 0;\r\n WebSpeedButton14.Visible := False;\r\n WebSpeedButton14.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton14, Self, 'OnClick', '_BlockCallPickForm');\r\n M9.SetParentComponent(B9);\r\n M9.Name := 'M9';\r\n M9.Left := 15;\r\n M9.Top := 28;\r\n M9.Width := 45;\r\n M9.Height := 32;\r\n M9.Align := alClient;\r\n M9.BorderStyle := bsNone;\r\n M9.ElementClassName := 'flt_block_memo';\r\n M9.ElementFont := efCSS;\r\n M9.Font.Charset := ANSI_CHARSET;\r\n M9.Font.Color := clBlack;\r\n M9.Font.Height := -13;\r\n M9.Font.Name := 'Tahoma';\r\n M9.Font.Style := [];\r\n M9.HeightPercent := 100.000000000000000000;\r\n M9.ParentFont := False;\r\n M9.SelLength := 0;\r\n M9.SelStart := 0;\r\n M9.ShowFocus := False;\r\n M9.WidthPercent := 100.000000000000000000;\r\n SetEvent(M9, Self, 'OnChange', 'M1Change');\r\n SetEvent(M9, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M9, Self, 'OnKeyDown', 'M1KeyDown');\r\n SetEvent(M9, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M9, Self, 'OnDragOver', 'M1DragOver');\r\n btnFltIcon9.SetParentComponent(B9);\r\n btnFltIcon9.Name := 'btnFltIcon9';\r\n btnFltIcon9.Left := 0;\r\n btnFltIcon9.Top := 28;\r\n btnFltIcon9.Width := 15;\r\n btnFltIcon9.Height := 32;\r\n btnFltIcon9.Cursor := crHandPoint;\r\n btnFltIcon9.Hint := 'Search';\r\n btnFltIcon9.Align := alLeft;\r\n btnFltIcon9.Color := clNone;\r\n btnFltIcon9.ElementClassName := 'btn_icon';\r\n btnFltIcon9.ElementFont := efCSS;\r\n btnFltIcon9.Font.Charset := DEFAULT_CHARSET;\r\n btnFltIcon9.Font.Color := clGray;\r\n btnFltIcon9.Font.Height := -13;\r\n btnFltIcon9.Font.Name := 'Tahoma';\r\n btnFltIcon9.Font.Style := [];\r\n btnFltIcon9.HeightPercent := 100.000000000000000000;\r\n btnFltIcon9.MaterialGlyph := 'search';\r\n btnFltIcon9.ParentFont := False;\r\n btnFltIcon9.ShowHint := True;\r\n btnFltIcon9.TabOrder := 10;\r\n btnFltIcon9.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnFltIcon9, Self, 'OnClick', 'btnApplyFilterClick');\r\n B10.SetParentComponent(sbSearch);\r\n B10.Name := 'B10';\r\n B10.Tag := -2;\r\n B10.Left := 602;\r\n B10.Top := 0;\r\n B10.Width := 60;\r\n B10.Height := 60;\r\n B10.ElementClassName := 'flt_data_block';\r\n B10.BorderColor := clWhite;\r\n B10.ChildOrder := 10;\r\n B10.Color := clWhite;\r\n B10.ElementFont := efCSS;\r\n B10.Font.Charset := ANSI_CHARSET;\r\n B10.Font.Color := clBlack;\r\n B10.Font.Height := -13;\r\n B10.Font.Name := 'Tahoma';\r\n B10.Font.Style := [fsUnderline];\r\n B10.ParentFont := False;\r\n B10.TabOrder := 9;\r\n SetEvent(B10, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B10, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel11.SetParentComponent(B10);\r\n WebPanel11.Name := 'WebPanel11';\r\n WebPanel11.Left := 0;\r\n WebPanel11.Top := 0;\r\n WebPanel11.Width := 60;\r\n WebPanel11.Height := 28;\r\n WebPanel11.ElementClassName := 'flt_block_top';\r\n WebPanel11.HeightStyle := ssAuto;\r\n WebPanel11.Align := alTop;\r\n WebPanel11.BorderStyle := bsNone;\r\n WebPanel11.ChildOrder := 2;\r\n WebPanel11.Color := clWhite;\r\n WebPanel11.ElementFont := efCSS;\r\n WebPanel11.TabOrder := 0;\r\n SetEvent(WebPanel11, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel11, Self, 'OnMouseMove', 'WebPanel12MouseMove');\r\n SetEvent(WebPanel11, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel11, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel14.SetParentComponent(WebPanel11);\r\n WebLabel14.Name := 'WebLabel14';\r\n WebLabel14.Left := 24;\r\n WebLabel14.Top := 0;\r\n WebLabel14.Width := 45;\r\n WebLabel14.Height := 28;\r\n WebLabel14.Cursor := crDrag;\r\n WebLabel14.Align := alLeft;\r\n WebLabel14.Caption := 'Title10';\r\n WebLabel14.DragMode := dmAutomatic;\r\n WebLabel14.ElementClassName := 'flt_block_title';\r\n WebLabel14.ElementFont := efCSS;\r\n WebLabel14.Font.Charset := ANSI_CHARSET;\r\n WebLabel14.Font.Color := clNavy;\r\n WebLabel14.Font.Height := -13;\r\n WebLabel14.Font.Name := 'Segoe UI Emoji';\r\n WebLabel14.Font.Style := [fsBold];\r\n WebLabel14.HeightPercent := 100.000000000000000000;\r\n WebLabel14.ParentFont := False;\r\n WebLabel14.WidthStyle := ssAuto;\r\n WebLabel14.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel14, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel14, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel14, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel14, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton15.SetParentComponent(WebPanel11);\r\n WebSpeedButton15.Name := 'WebSpeedButton15';\r\n WebSpeedButton15.Left := 0;\r\n WebSpeedButton15.Top := 0;\r\n WebSpeedButton15.Width := 24;\r\n WebSpeedButton15.Height := 28;\r\n WebSpeedButton15.Cursor := crHandPoint;\r\n WebSpeedButton15.Align := alLeft;\r\n WebSpeedButton15.Color := clNone;\r\n WebSpeedButton15.ElementClassName := 'btn_icon_nohighlight';\r\n WebSpeedButton15.Flat := True;\r\n WebSpeedButton15.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton15.MaterialGlyph := 'edit';\r\n WebSpeedButton15.MaterialGlyphSize := 14;\r\n WebSpeedButton15.TabOrder := 0;\r\n WebSpeedButton15.Visible := False;\r\n WebSpeedButton15.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton15, Self, 'OnClick', '_BlockCallPickForm');\r\n M10.SetParentComponent(B10);\r\n M10.Name := 'M10';\r\n M10.Left := 15;\r\n M10.Top := 28;\r\n M10.Width := 45;\r\n M10.Height := 32;\r\n M10.Align := alClient;\r\n M10.BorderStyle := bsNone;\r\n M10.ElementClassName := 'flt_block_memo';\r\n M10.ElementFont := efCSS;\r\n M10.Font.Charset := ANSI_CHARSET;\r\n M10.Font.Color := clBlack;\r\n M10.Font.Height := -13;\r\n M10.Font.Name := 'Tahoma';\r\n M10.Font.Style := [];\r\n M10.HeightPercent := 100.000000000000000000;\r\n M10.ParentFont := False;\r\n M10.SelLength := 0;\r\n M10.SelStart := 0;\r\n M10.ShowFocus := False;\r\n M10.WidthPercent := 100.000000000000000000;\r\n SetEvent(M10, Self, 'OnChange', 'M1Change');\r\n SetEvent(M10, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M10, Self, 'OnKeyDown', 'M1KeyDown');\r\n SetEvent(M10, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M10, Self, 'OnDragOver', 'M1DragOver');\r\n btnFltIcon10.SetParentComponent(B10);\r\n btnFltIcon10.Name := 'btnFltIcon10';\r\n btnFltIcon10.Left := 0;\r\n btnFltIcon10.Top := 28;\r\n btnFltIcon10.Width := 15;\r\n btnFltIcon10.Height := 32;\r\n btnFltIcon10.Cursor := crHandPoint;\r\n btnFltIcon10.Hint := 'Search';\r\n btnFltIcon10.Align := alLeft;\r\n btnFltIcon10.Color := clNone;\r\n btnFltIcon10.ElementClassName := 'btn_icon';\r\n btnFltIcon10.ElementFont := efCSS;\r\n btnFltIcon10.Font.Charset := DEFAULT_CHARSET;\r\n btnFltIcon10.Font.Color := clGray;\r\n btnFltIcon10.Font.Height := -13;\r\n btnFltIcon10.Font.Name := 'Tahoma';\r\n btnFltIcon10.Font.Style := [];\r\n btnFltIcon10.HeightPercent := 100.000000000000000000;\r\n btnFltIcon10.MaterialGlyph := 'search';\r\n btnFltIcon10.ParentFont := False;\r\n btnFltIcon10.ShowHint := True;\r\n btnFltIcon10.TabOrder := 10;\r\n btnFltIcon10.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnFltIcon10, Self, 'OnClick', 'btnApplyFilterClick');\r\n B11.SetParentComponent(sbSearch);\r\n B11.Name := 'B11';\r\n B11.Tag := -2;\r\n B11.Left := 669;\r\n B11.Top := 0;\r\n B11.Width := 60;\r\n B11.Height := 60;\r\n B11.ElementClassName := 'flt_data_block';\r\n B11.BorderColor := clWhite;\r\n B11.ChildOrder := 11;\r\n B11.Color := clWhite;\r\n B11.ElementFont := efCSS;\r\n B11.Font.Charset := ANSI_CHARSET;\r\n B11.Font.Color := clBlack;\r\n B11.Font.Height := -13;\r\n B11.Font.Name := 'Tahoma';\r\n B11.Font.Style := [fsUnderline];\r\n B11.ParentFont := False;\r\n B11.TabOrder := 10;\r\n SetEvent(B11, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B11, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel9.SetParentComponent(B11);\r\n WebPanel9.Name := 'WebPanel9';\r\n WebPanel9.Left := 0;\r\n WebPanel9.Top := 0;\r\n WebPanel9.Width := 60;\r\n WebPanel9.Height := 28;\r\n WebPanel9.ElementClassName := 'flt_block_top';\r\n WebPanel9.HeightStyle := ssAuto;\r\n WebPanel9.Align := alTop;\r\n WebPanel9.BorderStyle := bsNone;\r\n WebPanel9.ChildOrder := 2;\r\n WebPanel9.Color := clWhite;\r\n WebPanel9.ElementFont := efCSS;\r\n WebPanel9.TabOrder := 0;\r\n SetEvent(WebPanel9, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel9, Self, 'OnMouseMove', 'WebPanel12MouseMove');\r\n SetEvent(WebPanel9, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel9, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel7.SetParentComponent(WebPanel9);\r\n WebLabel7.Name := 'WebLabel7';\r\n WebLabel7.Left := 24;\r\n WebLabel7.Top := 0;\r\n WebLabel7.Width := 45;\r\n WebLabel7.Height := 28;\r\n WebLabel7.Cursor := crDrag;\r\n WebLabel7.Align := alLeft;\r\n WebLabel7.Caption := 'Title11';\r\n WebLabel7.DragMode := dmAutomatic;\r\n WebLabel7.ElementClassName := 'flt_block_title';\r\n WebLabel7.ElementFont := efCSS;\r\n WebLabel7.Font.Charset := ANSI_CHARSET;\r\n WebLabel7.Font.Color := clNavy;\r\n WebLabel7.Font.Height := -13;\r\n WebLabel7.Font.Name := 'Segoe UI Emoji';\r\n WebLabel7.Font.Style := [fsBold];\r\n WebLabel7.HeightPercent := 100.000000000000000000;\r\n WebLabel7.ParentFont := False;\r\n WebLabel7.WidthStyle := ssAuto;\r\n WebLabel7.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel7, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel7, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel7, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel7, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton17.SetParentComponent(WebPanel9);\r\n WebSpeedButton17.Name := 'WebSpeedButton17';\r\n WebSpeedButton17.Left := 0;\r\n WebSpeedButton17.Top := 0;\r\n WebSpeedButton17.Width := 24;\r\n WebSpeedButton17.Height := 28;\r\n WebSpeedButton17.Cursor := crHandPoint;\r\n WebSpeedButton17.Align := alLeft;\r\n WebSpeedButton17.Color := clNone;\r\n WebSpeedButton17.ElementClassName := 'btn_icon_nohighlight';\r\n WebSpeedButton17.Flat := True;\r\n WebSpeedButton17.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton17.MaterialGlyph := 'edit';\r\n WebSpeedButton17.MaterialGlyphSize := 14;\r\n WebSpeedButton17.TabOrder := 0;\r\n WebSpeedButton17.Visible := False;\r\n WebSpeedButton17.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton17, Self, 'OnClick', '_BlockCallPickForm');\r\n M11.SetParentComponent(B11);\r\n M11.Name := 'M11';\r\n M11.Left := 15;\r\n M11.Top := 28;\r\n M11.Width := 45;\r\n M11.Height := 32;\r\n M11.Align := alClient;\r\n M11.BorderStyle := bsNone;\r\n M11.ElementClassName := 'flt_block_memo';\r\n M11.ElementFont := efCSS;\r\n M11.Font.Charset := ANSI_CHARSET;\r\n M11.Font.Color := clBlack;\r\n M11.Font.Height := -13;\r\n M11.Font.Name := 'Tahoma';\r\n M11.Font.Style := [];\r\n M11.HeightPercent := 100.000000000000000000;\r\n M11.ParentFont := False;\r\n M11.SelLength := 0;\r\n M11.SelStart := 0;\r\n M11.ShowFocus := False;\r\n M11.WidthPercent := 100.000000000000000000;\r\n SetEvent(M11, Self, 'OnChange', 'M1Change');\r\n SetEvent(M11, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M11, Self, 'OnKeyDown', 'M1KeyDown');\r\n SetEvent(M11, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M11, Self, 'OnDragOver', 'M1DragOver');\r\n btnFltIcon11.SetParentComponent(B11);\r\n btnFltIcon11.Name := 'btnFltIcon11';\r\n btnFltIcon11.Left := 0;\r\n btnFltIcon11.Top := 28;\r\n btnFltIcon11.Width := 15;\r\n btnFltIcon11.Height := 32;\r\n btnFltIcon11.Cursor := crHandPoint;\r\n btnFltIcon11.Hint := 'Search';\r\n btnFltIcon11.Align := alLeft;\r\n btnFltIcon11.Color := clNone;\r\n btnFltIcon11.ElementClassName := 'btn_icon';\r\n btnFltIcon11.ElementFont := efCSS;\r\n btnFltIcon11.Font.Charset := DEFAULT_CHARSET;\r\n btnFltIcon11.Font.Color := clGray;\r\n btnFltIcon11.Font.Height := -13;\r\n btnFltIcon11.Font.Name := 'Tahoma';\r\n btnFltIcon11.Font.Style := [];\r\n btnFltIcon11.HeightPercent := 100.000000000000000000;\r\n btnFltIcon11.MaterialGlyph := 'search';\r\n btnFltIcon11.ParentFont := False;\r\n btnFltIcon11.ShowHint := True;\r\n btnFltIcon11.TabOrder := 10;\r\n btnFltIcon11.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnFltIcon11, Self, 'OnClick', 'btnApplyFilterClick');\r\n B12.SetParentComponent(sbSearch);\r\n B12.Name := 'B12';\r\n B12.Tag := -2;\r\n B12.Left := 735;\r\n B12.Top := 0;\r\n B12.Width := 60;\r\n B12.Height := 60;\r\n B12.ElementClassName := 'flt_data_block';\r\n B12.BorderColor := clWhite;\r\n B12.ChildOrder := 12;\r\n B12.Color := clWhite;\r\n B12.ElementFont := efCSS;\r\n B12.Font.Charset := ANSI_CHARSET;\r\n B12.Font.Color := clBlack;\r\n B12.Font.Height := -13;\r\n B12.Font.Name := 'Tahoma';\r\n B12.Font.Style := [fsUnderline];\r\n B12.ParentFont := False;\r\n B12.TabOrder := 11;\r\n SetEvent(B12, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B12, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel14.SetParentComponent(B12);\r\n WebPanel14.Name := 'WebPanel14';\r\n WebPanel14.Left := 0;\r\n WebPanel14.Top := 0;\r\n WebPanel14.Width := 60;\r\n WebPanel14.Height := 28;\r\n WebPanel14.ElementClassName := 'flt_block_top';\r\n WebPanel14.HeightStyle := ssAuto;\r\n WebPanel14.Align := alTop;\r\n WebPanel14.BorderStyle := bsNone;\r\n WebPanel14.ChildOrder := 2;\r\n WebPanel14.Color := clWhite;\r\n WebPanel14.ElementFont := efCSS;\r\n WebPanel14.TabOrder := 0;\r\n SetEvent(WebPanel14, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel14, Self, 'OnMouseMove', 'WebPanel12MouseMove');\r\n SetEvent(WebPanel14, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel14, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel9.SetParentComponent(WebPanel14);\r\n WebLabel9.Name := 'WebLabel9';\r\n WebLabel9.Left := 24;\r\n WebLabel9.Top := 0;\r\n WebLabel9.Width := 45;\r\n WebLabel9.Height := 28;\r\n WebLabel9.Cursor := crDrag;\r\n WebLabel9.Align := alLeft;\r\n WebLabel9.Caption := 'Title12';\r\n WebLabel9.DragMode := dmAutomatic;\r\n WebLabel9.ElementClassName := 'flt_block_title';\r\n WebLabel9.ElementFont := efCSS;\r\n WebLabel9.Font.Charset := ANSI_CHARSET;\r\n WebLabel9.Font.Color := clNavy;\r\n WebLabel9.Font.Height := -13;\r\n WebLabel9.Font.Name := 'Segoe UI Emoji';\r\n WebLabel9.Font.Style := [fsBold];\r\n WebLabel9.HeightPercent := 100.000000000000000000;\r\n WebLabel9.ParentFont := False;\r\n WebLabel9.WidthStyle := ssAuto;\r\n WebLabel9.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel9, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel9, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel9, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel9, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton18.SetParentComponent(WebPanel14);\r\n WebSpeedButton18.Name := 'WebSpeedButton18';\r\n WebSpeedButton18.Left := 0;\r\n WebSpeedButton18.Top := 0;\r\n WebSpeedButton18.Width := 24;\r\n WebSpeedButton18.Height := 28;\r\n WebSpeedButton18.Cursor := crHandPoint;\r\n WebSpeedButton18.Align := alLeft;\r\n WebSpeedButton18.Color := clNone;\r\n WebSpeedButton18.ElementClassName := 'btn_icon_nohighlight';\r\n WebSpeedButton18.Flat := True;\r\n WebSpeedButton18.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton18.MaterialGlyph := 'edit';\r\n WebSpeedButton18.MaterialGlyphSize := 14;\r\n WebSpeedButton18.TabOrder := 0;\r\n WebSpeedButton18.Visible := False;\r\n WebSpeedButton18.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton18, Self, 'OnClick', '_BlockCallPickForm');\r\n M12.SetParentComponent(B12);\r\n M12.Name := 'M12';\r\n M12.Left := 15;\r\n M12.Top := 28;\r\n M12.Width := 45;\r\n M12.Height := 32;\r\n M12.Align := alClient;\r\n M12.BorderStyle := bsNone;\r\n M12.ElementClassName := 'flt_block_memo';\r\n M12.ElementFont := efCSS;\r\n M12.Font.Charset := ANSI_CHARSET;\r\n M12.Font.Color := clBlack;\r\n M12.Font.Height := -13;\r\n M12.Font.Name := 'Tahoma';\r\n M12.Font.Style := [];\r\n M12.HeightPercent := 100.000000000000000000;\r\n M12.ParentFont := False;\r\n M12.SelLength := 0;\r\n M12.SelStart := 0;\r\n M12.ShowFocus := False;\r\n M12.WidthPercent := 100.000000000000000000;\r\n SetEvent(M12, Self, 'OnChange', 'M1Change');\r\n SetEvent(M12, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M12, Self, 'OnKeyDown', 'M1KeyDown');\r\n SetEvent(M12, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M12, Self, 'OnDragOver', 'M1DragOver');\r\n btnFltIcon12.SetParentComponent(B12);\r\n btnFltIcon12.Name := 'btnFltIcon12';\r\n btnFltIcon12.Left := 0;\r\n btnFltIcon12.Top := 28;\r\n btnFltIcon12.Width := 15;\r\n btnFltIcon12.Height := 32;\r\n btnFltIcon12.Cursor := crHandPoint;\r\n btnFltIcon12.Hint := 'Search';\r\n btnFltIcon12.Align := alLeft;\r\n btnFltIcon12.Color := clNone;\r\n btnFltIcon12.ElementClassName := 'btn_icon';\r\n btnFltIcon12.ElementFont := efCSS;\r\n btnFltIcon12.Font.Charset := DEFAULT_CHARSET;\r\n btnFltIcon12.Font.Color := clGray;\r\n btnFltIcon12.Font.Height := -13;\r\n btnFltIcon12.Font.Name := 'Tahoma';\r\n btnFltIcon12.Font.Style := [];\r\n btnFltIcon12.HeightPercent := 100.000000000000000000;\r\n btnFltIcon12.MaterialGlyph := 'search';\r\n btnFltIcon12.ParentFont := False;\r\n btnFltIcon12.ShowHint := True;\r\n btnFltIcon12.TabOrder := 10;\r\n btnFltIcon12.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnFltIcon12, Self, 'OnClick', 'btnApplyFilterClick');\r\n B13.SetParentComponent(sbSearch);\r\n B13.Name := 'B13';\r\n B13.Tag := -2;\r\n B13.Left := 802;\r\n B13.Top := 0;\r\n B13.Width := 60;\r\n B13.Height := 60;\r\n B13.ElementClassName := 'flt_data_block';\r\n B13.BorderColor := clWhite;\r\n B13.ChildOrder := 13;\r\n B13.Color := clWhite;\r\n B13.ElementFont := efCSS;\r\n B13.Font.Charset := ANSI_CHARSET;\r\n B13.Font.Color := clBlack;\r\n B13.Font.Height := -13;\r\n B13.Font.Name := 'Tahoma';\r\n B13.Font.Style := [fsUnderline];\r\n B13.ParentFont := False;\r\n B13.TabOrder := 12;\r\n SetEvent(B13, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B13, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel16.SetParentComponent(B13);\r\n WebPanel16.Name := 'WebPanel16';\r\n WebPanel16.Left := 0;\r\n WebPanel16.Top := 0;\r\n WebPanel16.Width := 60;\r\n WebPanel16.Height := 28;\r\n WebPanel16.ElementClassName := 'flt_block_top';\r\n WebPanel16.HeightStyle := ssAuto;\r\n WebPanel16.Align := alTop;\r\n WebPanel16.BorderStyle := bsNone;\r\n WebPanel16.ChildOrder := 2;\r\n WebPanel16.Color := clWhite;\r\n WebPanel16.ElementFont := efCSS;\r\n WebPanel16.TabOrder := 0;\r\n SetEvent(WebPanel16, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel16, Self, 'OnMouseMove', 'WebPanel12MouseMove');\r\n SetEvent(WebPanel16, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel16, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel15.SetParentComponent(WebPanel16);\r\n WebLabel15.Name := 'WebLabel15';\r\n WebLabel15.Left := 24;\r\n WebLabel15.Top := 0;\r\n WebLabel15.Width := 45;\r\n WebLabel15.Height := 28;\r\n WebLabel15.Cursor := crDrag;\r\n WebLabel15.Align := alLeft;\r\n WebLabel15.Caption := 'Title13';\r\n WebLabel15.DragMode := dmAutomatic;\r\n WebLabel15.ElementClassName := 'flt_block_title';\r\n WebLabel15.ElementFont := efCSS;\r\n WebLabel15.Font.Charset := ANSI_CHARSET;\r\n WebLabel15.Font.Color := clNavy;\r\n WebLabel15.Font.Height := -13;\r\n WebLabel15.Font.Name := 'Segoe UI Emoji';\r\n WebLabel15.Font.Style := [fsBold];\r\n WebLabel15.HeightPercent := 100.000000000000000000;\r\n WebLabel15.ParentFont := False;\r\n WebLabel15.WidthStyle := ssAuto;\r\n WebLabel15.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel15, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel15, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel15, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel15, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton19.SetParentComponent(WebPanel16);\r\n WebSpeedButton19.Name := 'WebSpeedButton19';\r\n WebSpeedButton19.Left := 0;\r\n WebSpeedButton19.Top := 0;\r\n WebSpeedButton19.Width := 24;\r\n WebSpeedButton19.Height := 28;\r\n WebSpeedButton19.Cursor := crHandPoint;\r\n WebSpeedButton19.Align := alLeft;\r\n WebSpeedButton19.Color := clNone;\r\n WebSpeedButton19.ElementClassName := 'btn_icon_nohighlight';\r\n WebSpeedButton19.Flat := True;\r\n WebSpeedButton19.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton19.MaterialGlyph := 'edit';\r\n WebSpeedButton19.MaterialGlyphSize := 14;\r\n WebSpeedButton19.TabOrder := 0;\r\n WebSpeedButton19.Visible := False;\r\n WebSpeedButton19.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton19, Self, 'OnClick', '_BlockCallPickForm');\r\n M13.SetParentComponent(B13);\r\n M13.Name := 'M13';\r\n M13.Left := 15;\r\n M13.Top := 28;\r\n M13.Width := 45;\r\n M13.Height := 32;\r\n M13.Align := alClient;\r\n M13.BorderStyle := bsNone;\r\n M13.ElementClassName := 'flt_block_memo';\r\n M13.ElementFont := efCSS;\r\n M13.Font.Charset := ANSI_CHARSET;\r\n M13.Font.Color := clBlack;\r\n M13.Font.Height := -13;\r\n M13.Font.Name := 'Tahoma';\r\n M13.Font.Style := [];\r\n M13.HeightPercent := 100.000000000000000000;\r\n M13.ParentFont := False;\r\n M13.SelLength := 0;\r\n M13.SelStart := 0;\r\n M13.ShowFocus := False;\r\n M13.WidthPercent := 100.000000000000000000;\r\n SetEvent(M13, Self, 'OnChange', 'M1Change');\r\n SetEvent(M13, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M13, Self, 'OnKeyDown', 'M1KeyDown');\r\n SetEvent(M13, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M13, Self, 'OnDragOver', 'M1DragOver');\r\n btnFltIcon13.SetParentComponent(B13);\r\n btnFltIcon13.Name := 'btnFltIcon13';\r\n btnFltIcon13.Left := 0;\r\n btnFltIcon13.Top := 28;\r\n btnFltIcon13.Width := 15;\r\n btnFltIcon13.Height := 32;\r\n btnFltIcon13.Cursor := crHandPoint;\r\n btnFltIcon13.Hint := 'Search';\r\n btnFltIcon13.Align := alLeft;\r\n btnFltIcon13.Color := clNone;\r\n btnFltIcon13.ElementClassName := 'btn_icon';\r\n btnFltIcon13.ElementFont := efCSS;\r\n btnFltIcon13.Font.Charset := DEFAULT_CHARSET;\r\n btnFltIcon13.Font.Color := clGray;\r\n btnFltIcon13.Font.Height := -13;\r\n btnFltIcon13.Font.Name := 'Tahoma';\r\n btnFltIcon13.Font.Style := [];\r\n btnFltIcon13.HeightPercent := 100.000000000000000000;\r\n btnFltIcon13.MaterialGlyph := 'search';\r\n btnFltIcon13.ParentFont := False;\r\n btnFltIcon13.ShowHint := True;\r\n btnFltIcon13.TabOrder := 10;\r\n btnFltIcon13.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnFltIcon13, Self, 'OnClick', 'btnApplyFilterClick');\r\n B14.SetParentComponent(sbSearch);\r\n B14.Name := 'B14';\r\n B14.Tag := -2;\r\n B14.Left := 868;\r\n B14.Top := 0;\r\n B14.Width := 60;\r\n B14.Height := 60;\r\n B14.ElementClassName := 'flt_data_block';\r\n B14.BorderColor := clWhite;\r\n B14.ChildOrder := 14;\r\n B14.Color := clWhite;\r\n B14.ElementFont := efCSS;\r\n B14.Font.Charset := ANSI_CHARSET;\r\n B14.Font.Color := clBlack;\r\n B14.Font.Height := -13;\r\n B14.Font.Name := 'Tahoma';\r\n B14.Font.Style := [fsUnderline];\r\n B14.ParentFont := False;\r\n B14.TabOrder := 13;\r\n SetEvent(B14, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B14, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel18.SetParentComponent(B14);\r\n WebPanel18.Name := 'WebPanel18';\r\n WebPanel18.Left := 0;\r\n WebPanel18.Top := 0;\r\n WebPanel18.Width := 60;\r\n WebPanel18.Height := 28;\r\n WebPanel18.ElementClassName := 'flt_block_top';\r\n WebPanel18.HeightStyle := ssAuto;\r\n WebPanel18.Align := alTop;\r\n WebPanel18.BorderStyle := bsNone;\r\n WebPanel18.ChildOrder := 2;\r\n WebPanel18.Color := clWhite;\r\n WebPanel18.ElementFont := efCSS;\r\n WebPanel18.TabOrder := 0;\r\n SetEvent(WebPanel18, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel18, Self, 'OnMouseMove', 'WebPanel12MouseMove');\r\n SetEvent(WebPanel18, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel18, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel16.SetParentComponent(WebPanel18);\r\n WebLabel16.Name := 'WebLabel16';\r\n WebLabel16.Left := 24;\r\n WebLabel16.Top := 0;\r\n WebLabel16.Width := 45;\r\n WebLabel16.Height := 28;\r\n WebLabel16.Cursor := crDrag;\r\n WebLabel16.Align := alLeft;\r\n WebLabel16.Caption := 'Title14';\r\n WebLabel16.DragMode := dmAutomatic;\r\n WebLabel16.ElementClassName := 'flt_block_title';\r\n WebLabel16.ElementFont := efCSS;\r\n WebLabel16.Font.Charset := ANSI_CHARSET;\r\n WebLabel16.Font.Color := clNavy;\r\n WebLabel16.Font.Height := -13;\r\n WebLabel16.Font.Name := 'Segoe UI Emoji';\r\n WebLabel16.Font.Style := [fsBold];\r\n WebLabel16.HeightPercent := 100.000000000000000000;\r\n WebLabel16.ParentFont := False;\r\n WebLabel16.WidthStyle := ssAuto;\r\n WebLabel16.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel16, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel16, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel16, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel16, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton20.SetParentComponent(WebPanel18);\r\n WebSpeedButton20.Name := 'WebSpeedButton20';\r\n WebSpeedButton20.Left := 0;\r\n WebSpeedButton20.Top := 0;\r\n WebSpeedButton20.Width := 24;\r\n WebSpeedButton20.Height := 28;\r\n WebSpeedButton20.Cursor := crHandPoint;\r\n WebSpeedButton20.Align := alLeft;\r\n WebSpeedButton20.Color := clNone;\r\n WebSpeedButton20.ElementClassName := 'btn_icon_nohighlight';\r\n WebSpeedButton20.Flat := True;\r\n WebSpeedButton20.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton20.MaterialGlyph := 'edit';\r\n WebSpeedButton20.MaterialGlyphSize := 14;\r\n WebSpeedButton20.TabOrder := 0;\r\n WebSpeedButton20.Visible := False;\r\n WebSpeedButton20.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton20, Self, 'OnClick', '_BlockCallPickForm');\r\n M14.SetParentComponent(B14);\r\n M14.Name := 'M14';\r\n M14.Left := 15;\r\n M14.Top := 28;\r\n M14.Width := 45;\r\n M14.Height := 32;\r\n M14.Align := alClient;\r\n M14.BorderStyle := bsNone;\r\n M14.ElementClassName := 'flt_block_memo';\r\n M14.ElementFont := efCSS;\r\n M14.Font.Charset := ANSI_CHARSET;\r\n M14.Font.Color := clBlack;\r\n M14.Font.Height := -13;\r\n M14.Font.Name := 'Tahoma';\r\n M14.Font.Style := [];\r\n M14.HeightPercent := 100.000000000000000000;\r\n M14.ParentFont := False;\r\n M14.SelLength := 0;\r\n M14.SelStart := 0;\r\n M14.ShowFocus := False;\r\n M14.WidthPercent := 100.000000000000000000;\r\n SetEvent(M14, Self, 'OnChange', 'M1Change');\r\n SetEvent(M14, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M14, Self, 'OnKeyDown', 'M1KeyDown');\r\n SetEvent(M14, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M14, Self, 'OnDragOver', 'M1DragOver');\r\n btnFltIcon14.SetParentComponent(B14);\r\n btnFltIcon14.Name := 'btnFltIcon14';\r\n btnFltIcon14.Left := 0;\r\n btnFltIcon14.Top := 28;\r\n btnFltIcon14.Width := 15;\r\n btnFltIcon14.Height := 32;\r\n btnFltIcon14.Cursor := crHandPoint;\r\n btnFltIcon14.Hint := 'Search';\r\n btnFltIcon14.Align := alLeft;\r\n btnFltIcon14.Color := clNone;\r\n btnFltIcon14.ElementClassName := 'btn_icon';\r\n btnFltIcon14.ElementFont := efCSS;\r\n btnFltIcon14.Font.Charset := DEFAULT_CHARSET;\r\n btnFltIcon14.Font.Color := clGray;\r\n btnFltIcon14.Font.Height := -13;\r\n btnFltIcon14.Font.Name := 'Tahoma';\r\n btnFltIcon14.Font.Style := [];\r\n btnFltIcon14.HeightPercent := 100.000000000000000000;\r\n btnFltIcon14.MaterialGlyph := 'search';\r\n btnFltIcon14.ParentFont := False;\r\n btnFltIcon14.ShowHint := True;\r\n btnFltIcon14.TabOrder := 10;\r\n btnFltIcon14.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnFltIcon14, Self, 'OnClick', 'btnApplyFilterClick');\r\n B15.SetParentComponent(sbSearch);\r\n B15.Name := 'B15';\r\n B15.Tag := -2;\r\n B15.Left := 935;\r\n B15.Top := 0;\r\n B15.Width := 60;\r\n B15.Height := 60;\r\n B15.ElementClassName := 'flt_data_block';\r\n B15.BorderColor := clWhite;\r\n B15.ChildOrder := 15;\r\n B15.Color := clWhite;\r\n B15.ElementFont := efCSS;\r\n B15.Font.Charset := ANSI_CHARSET;\r\n B15.Font.Color := clBlack;\r\n B15.Font.Height := -13;\r\n B15.Font.Name := 'Tahoma';\r\n B15.Font.Style := [fsUnderline];\r\n B15.ParentFont := False;\r\n B15.TabOrder := 14;\r\n SetEvent(B15, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B15, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel20.SetParentComponent(B15);\r\n WebPanel20.Name := 'WebPanel20';\r\n WebPanel20.Left := 0;\r\n WebPanel20.Top := 0;\r\n WebPanel20.Width := 60;\r\n WebPanel20.Height := 28;\r\n WebPanel20.ElementClassName := 'flt_block_top';\r\n WebPanel20.HeightStyle := ssAuto;\r\n WebPanel20.Align := alTop;\r\n WebPanel20.BorderStyle := bsNone;\r\n WebPanel20.ChildOrder := 2;\r\n WebPanel20.Color := clWhite;\r\n WebPanel20.ElementFont := efCSS;\r\n WebPanel20.TabOrder := 0;\r\n SetEvent(WebPanel20, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel20, Self, 'OnMouseMove', 'WebPanel12MouseMove');\r\n SetEvent(WebPanel20, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel20, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel17.SetParentComponent(WebPanel20);\r\n WebLabel17.Name := 'WebLabel17';\r\n WebLabel17.Left := 24;\r\n WebLabel17.Top := 0;\r\n WebLabel17.Width := 45;\r\n WebLabel17.Height := 28;\r\n WebLabel17.Cursor := crDrag;\r\n WebLabel17.Align := alLeft;\r\n WebLabel17.Caption := 'Title15';\r\n WebLabel17.DragMode := dmAutomatic;\r\n WebLabel17.ElementClassName := 'flt_block_title';\r\n WebLabel17.ElementFont := efCSS;\r\n WebLabel17.Font.Charset := ANSI_CHARSET;\r\n WebLabel17.Font.Color := clNavy;\r\n WebLabel17.Font.Height := -13;\r\n WebLabel17.Font.Name := 'Segoe UI Emoji';\r\n WebLabel17.Font.Style := [fsBold];\r\n WebLabel17.HeightPercent := 100.000000000000000000;\r\n WebLabel17.ParentFont := False;\r\n WebLabel17.WidthStyle := ssAuto;\r\n WebLabel17.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel17, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel17, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel17, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel17, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton21.SetParentComponent(WebPanel20);\r\n WebSpeedButton21.Name := 'WebSpeedButton21';\r\n WebSpeedButton21.Left := 0;\r\n WebSpeedButton21.Top := 0;\r\n WebSpeedButton21.Width := 24;\r\n WebSpeedButton21.Height := 28;\r\n WebSpeedButton21.Cursor := crHandPoint;\r\n WebSpeedButton21.Align := alLeft;\r\n WebSpeedButton21.Color := clNone;\r\n WebSpeedButton21.ElementClassName := 'btn_icon_nohighlight';\r\n WebSpeedButton21.Flat := True;\r\n WebSpeedButton21.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton21.MaterialGlyph := 'edit';\r\n WebSpeedButton21.MaterialGlyphSize := 14;\r\n WebSpeedButton21.TabOrder := 0;\r\n WebSpeedButton21.Visible := False;\r\n WebSpeedButton21.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton21, Self, 'OnClick', '_BlockCallPickForm');\r\n M15.SetParentComponent(B15);\r\n M15.Name := 'M15';\r\n M15.Left := 15;\r\n M15.Top := 28;\r\n M15.Width := 45;\r\n M15.Height := 32;\r\n M15.Align := alClient;\r\n M15.BorderStyle := bsNone;\r\n M15.ElementClassName := 'flt_block_memo';\r\n M15.ElementFont := efCSS;\r\n M15.Font.Charset := ANSI_CHARSET;\r\n M15.Font.Color := clBlack;\r\n M15.Font.Height := -13;\r\n M15.Font.Name := 'Tahoma';\r\n M15.Font.Style := [];\r\n M15.HeightPercent := 100.000000000000000000;\r\n M15.ParentFont := False;\r\n M15.SelLength := 0;\r\n M15.SelStart := 0;\r\n M15.ShowFocus := False;\r\n M15.WidthPercent := 100.000000000000000000;\r\n SetEvent(M15, Self, 'OnChange', 'M1Change');\r\n SetEvent(M15, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M15, Self, 'OnKeyDown', 'M1KeyDown');\r\n SetEvent(M15, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M15, Self, 'OnDragOver', 'M1DragOver');\r\n btnFltIcon15.SetParentComponent(B15);\r\n btnFltIcon15.Name := 'btnFltIcon15';\r\n btnFltIcon15.Left := 0;\r\n btnFltIcon15.Top := 28;\r\n btnFltIcon15.Width := 15;\r\n btnFltIcon15.Height := 32;\r\n btnFltIcon15.Cursor := crHandPoint;\r\n btnFltIcon15.Hint := 'Search';\r\n btnFltIcon15.Align := alLeft;\r\n btnFltIcon15.Color := clNone;\r\n btnFltIcon15.ElementClassName := 'btn_icon';\r\n btnFltIcon15.ElementFont := efCSS;\r\n btnFltIcon15.Font.Charset := DEFAULT_CHARSET;\r\n btnFltIcon15.Font.Color := clGray;\r\n btnFltIcon15.Font.Height := -13;\r\n btnFltIcon15.Font.Name := 'Tahoma';\r\n btnFltIcon15.Font.Style := [];\r\n btnFltIcon15.HeightPercent := 100.000000000000000000;\r\n btnFltIcon15.MaterialGlyph := 'search';\r\n btnFltIcon15.ParentFont := False;\r\n btnFltIcon15.ShowHint := True;\r\n btnFltIcon15.TabOrder := 10;\r\n btnFltIcon15.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnFltIcon15, Self, 'OnClick', 'btnApplyFilterClick');\r\n B16.SetParentComponent(sbSearch);\r\n B16.Name := 'B16';\r\n B16.Tag := -2;\r\n B16.Left := 1001;\r\n B16.Top := 0;\r\n B16.Width := 60;\r\n B16.Height := 60;\r\n B16.ElementClassName := 'flt_data_block';\r\n B16.BorderColor := clWhite;\r\n B16.ChildOrder := 16;\r\n B16.Color := clWhite;\r\n B16.ElementFont := efCSS;\r\n B16.Font.Charset := ANSI_CHARSET;\r\n B16.Font.Color := clBlack;\r\n B16.Font.Height := -13;\r\n B16.Font.Name := 'Tahoma';\r\n B16.Font.Style := [fsUnderline];\r\n B16.ParentFont := False;\r\n B16.TabOrder := 15;\r\n SetEvent(B16, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B16, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel22.SetParentComponent(B16);\r\n WebPanel22.Name := 'WebPanel22';\r\n WebPanel22.Left := 0;\r\n WebPanel22.Top := 0;\r\n WebPanel22.Width := 60;\r\n WebPanel22.Height := 28;\r\n WebPanel22.ElementClassName := 'flt_block_top';\r\n WebPanel22.HeightStyle := ssAuto;\r\n WebPanel22.Align := alTop;\r\n WebPanel22.BorderStyle := bsNone;\r\n WebPanel22.ChildOrder := 2;\r\n WebPanel22.Color := clWhite;\r\n WebPanel22.ElementFont := efCSS;\r\n WebPanel22.TabOrder := 0;\r\n SetEvent(WebPanel22, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel22, Self, 'OnMouseMove', 'WebPanel12MouseMove');\r\n SetEvent(WebPanel22, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel22, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel18.SetParentComponent(WebPanel22);\r\n WebLabel18.Name := 'WebLabel18';\r\n WebLabel18.Left := 24;\r\n WebLabel18.Top := 0;\r\n WebLabel18.Width := 45;\r\n WebLabel18.Height := 28;\r\n WebLabel18.Cursor := crDrag;\r\n WebLabel18.Align := alLeft;\r\n WebLabel18.Caption := 'Title16';\r\n WebLabel18.DragMode := dmAutomatic;\r\n WebLabel18.ElementClassName := 'flt_block_title';\r\n WebLabel18.ElementFont := efCSS;\r\n WebLabel18.Font.Charset := ANSI_CHARSET;\r\n WebLabel18.Font.Color := clNavy;\r\n WebLabel18.Font.Height := -13;\r\n WebLabel18.Font.Name := 'Segoe UI Emoji';\r\n WebLabel18.Font.Style := [fsBold];\r\n WebLabel18.HeightPercent := 100.000000000000000000;\r\n WebLabel18.ParentFont := False;\r\n WebLabel18.WidthStyle := ssAuto;\r\n WebLabel18.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel18, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel18, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel18, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel18, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton22.SetParentComponent(WebPanel22);\r\n WebSpeedButton22.Name := 'WebSpeedButton22';\r\n WebSpeedButton22.Left := 0;\r\n WebSpeedButton22.Top := 0;\r\n WebSpeedButton22.Width := 24;\r\n WebSpeedButton22.Height := 28;\r\n WebSpeedButton22.Cursor := crHandPoint;\r\n WebSpeedButton22.Align := alLeft;\r\n WebSpeedButton22.Color := clNone;\r\n WebSpeedButton22.ElementClassName := 'btn_icon_nohighlight';\r\n WebSpeedButton22.Flat := True;\r\n WebSpeedButton22.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton22.MaterialGlyph := 'edit';\r\n WebSpeedButton22.MaterialGlyphSize := 14;\r\n WebSpeedButton22.TabOrder := 0;\r\n WebSpeedButton22.Visible := False;\r\n WebSpeedButton22.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton22, Self, 'OnClick', '_BlockCallPickForm');\r\n M16.SetParentComponent(B16);\r\n M16.Name := 'M16';\r\n M16.Left := 15;\r\n M16.Top := 28;\r\n M16.Width := 45;\r\n M16.Height := 32;\r\n M16.Align := alClient;\r\n M16.BorderStyle := bsNone;\r\n M16.ElementClassName := 'flt_block_memo';\r\n M16.ElementFont := efCSS;\r\n M16.Font.Charset := ANSI_CHARSET;\r\n M16.Font.Color := clBlack;\r\n M16.Font.Height := -13;\r\n M16.Font.Name := 'Tahoma';\r\n M16.Font.Style := [];\r\n M16.HeightPercent := 100.000000000000000000;\r\n M16.ParentFont := False;\r\n M16.SelLength := 0;\r\n M16.SelStart := 0;\r\n M16.ShowFocus := False;\r\n M16.WidthPercent := 100.000000000000000000;\r\n SetEvent(M16, Self, 'OnChange', 'M1Change');\r\n SetEvent(M16, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M16, Self, 'OnKeyDown', 'M1KeyDown');\r\n SetEvent(M16, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M16, Self, 'OnDragOver', 'M1DragOver');\r\n btnFltIcon16.SetParentComponent(B16);\r\n btnFltIcon16.Name := 'btnFltIcon16';\r\n btnFltIcon16.Left := 0;\r\n btnFltIcon16.Top := 28;\r\n btnFltIcon16.Width := 15;\r\n btnFltIcon16.Height := 32;\r\n btnFltIcon16.Cursor := crHandPoint;\r\n btnFltIcon16.Hint := 'Search';\r\n btnFltIcon16.Align := alLeft;\r\n btnFltIcon16.Color := clNone;\r\n btnFltIcon16.ElementClassName := 'btn_icon';\r\n btnFltIcon16.ElementFont := efCSS;\r\n btnFltIcon16.Font.Charset := DEFAULT_CHARSET;\r\n btnFltIcon16.Font.Color := clGray;\r\n btnFltIcon16.Font.Height := -13;\r\n btnFltIcon16.Font.Name := 'Tahoma';\r\n btnFltIcon16.Font.Style := [];\r\n btnFltIcon16.HeightPercent := 100.000000000000000000;\r\n btnFltIcon16.MaterialGlyph := 'search';\r\n btnFltIcon16.ParentFont := False;\r\n btnFltIcon16.ShowHint := True;\r\n btnFltIcon16.TabOrder := 10;\r\n btnFltIcon16.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnFltIcon16, Self, 'OnClick', 'btnApplyFilterClick');\r\n B17.SetParentComponent(sbSearch);\r\n B17.Name := 'B17';\r\n B17.Tag := -2;\r\n B17.Left := 1068;\r\n B17.Top := 0;\r\n B17.Width := 60;\r\n B17.Height := 60;\r\n B17.ElementClassName := 'flt_data_block';\r\n B17.BorderColor := clWhite;\r\n B17.ChildOrder := 17;\r\n B17.Color := clWhite;\r\n B17.ElementFont := efCSS;\r\n B17.Font.Charset := ANSI_CHARSET;\r\n B17.Font.Color := clBlack;\r\n B17.Font.Height := -13;\r\n B17.Font.Name := 'Tahoma';\r\n B17.Font.Style := [fsUnderline];\r\n B17.ParentFont := False;\r\n B17.TabOrder := 16;\r\n SetEvent(B17, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B17, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel24.SetParentComponent(B17);\r\n WebPanel24.Name := 'WebPanel24';\r\n WebPanel24.Left := 0;\r\n WebPanel24.Top := 0;\r\n WebPanel24.Width := 60;\r\n WebPanel24.Height := 28;\r\n WebPanel24.ElementClassName := 'flt_block_top';\r\n WebPanel24.HeightStyle := ssAuto;\r\n WebPanel24.Align := alTop;\r\n WebPanel24.BorderStyle := bsNone;\r\n WebPanel24.ChildOrder := 2;\r\n WebPanel24.Color := clWhite;\r\n WebPanel24.ElementFont := efCSS;\r\n WebPanel24.TabOrder := 0;\r\n SetEvent(WebPanel24, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel24, Self, 'OnMouseMove', 'WebPanel12MouseMove');\r\n SetEvent(WebPanel24, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel24, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel19.SetParentComponent(WebPanel24);\r\n WebLabel19.Name := 'WebLabel19';\r\n WebLabel19.Left := 24;\r\n WebLabel19.Top := 0;\r\n WebLabel19.Width := 45;\r\n WebLabel19.Height := 28;\r\n WebLabel19.Cursor := crDrag;\r\n WebLabel19.Align := alLeft;\r\n WebLabel19.Caption := 'Title17';\r\n WebLabel19.DragMode := dmAutomatic;\r\n WebLabel19.ElementClassName := 'flt_block_title';\r\n WebLabel19.ElementFont := efCSS;\r\n WebLabel19.Font.Charset := ANSI_CHARSET;\r\n WebLabel19.Font.Color := clNavy;\r\n WebLabel19.Font.Height := -13;\r\n WebLabel19.Font.Name := 'Segoe UI Emoji';\r\n WebLabel19.Font.Style := [fsBold];\r\n WebLabel19.HeightPercent := 100.000000000000000000;\r\n WebLabel19.ParentFont := False;\r\n WebLabel19.WidthStyle := ssAuto;\r\n WebLabel19.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel19, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel19, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel19, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel19, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton23.SetParentComponent(WebPanel24);\r\n WebSpeedButton23.Name := 'WebSpeedButton23';\r\n WebSpeedButton23.Left := 0;\r\n WebSpeedButton23.Top := 0;\r\n WebSpeedButton23.Width := 24;\r\n WebSpeedButton23.Height := 28;\r\n WebSpeedButton23.Cursor := crHandPoint;\r\n WebSpeedButton23.Align := alLeft;\r\n WebSpeedButton23.Color := clNone;\r\n WebSpeedButton23.ElementClassName := 'btn_icon_nohighlight';\r\n WebSpeedButton23.Flat := True;\r\n WebSpeedButton23.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton23.MaterialGlyph := 'edit';\r\n WebSpeedButton23.MaterialGlyphSize := 14;\r\n WebSpeedButton23.TabOrder := 0;\r\n WebSpeedButton23.Visible := False;\r\n WebSpeedButton23.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton23, Self, 'OnClick', '_BlockCallPickForm');\r\n M17.SetParentComponent(B17);\r\n M17.Name := 'M17';\r\n M17.Left := 15;\r\n M17.Top := 28;\r\n M17.Width := 45;\r\n M17.Height := 32;\r\n M17.Align := alClient;\r\n M17.BorderStyle := bsNone;\r\n M17.ElementClassName := 'flt_block_memo';\r\n M17.ElementFont := efCSS;\r\n M17.Font.Charset := ANSI_CHARSET;\r\n M17.Font.Color := clBlack;\r\n M17.Font.Height := -13;\r\n M17.Font.Name := 'Tahoma';\r\n M17.Font.Style := [];\r\n M17.HeightPercent := 100.000000000000000000;\r\n M17.ParentFont := False;\r\n M17.SelLength := 0;\r\n M17.SelStart := 0;\r\n M17.ShowFocus := False;\r\n M17.WidthPercent := 100.000000000000000000;\r\n SetEvent(M17, Self, 'OnChange', 'M1Change');\r\n SetEvent(M17, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M17, Self, 'OnKeyDown', 'M1KeyDown');\r\n SetEvent(M17, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M17, Self, 'OnDragOver', 'M1DragOver');\r\n btnFltIcon17.SetParentComponent(B17);\r\n btnFltIcon17.Name := 'btnFltIcon17';\r\n btnFltIcon17.Left := 0;\r\n btnFltIcon17.Top := 28;\r\n btnFltIcon17.Width := 15;\r\n btnFltIcon17.Height := 32;\r\n btnFltIcon17.Cursor := crHandPoint;\r\n btnFltIcon17.Hint := 'Search';\r\n btnFltIcon17.Align := alLeft;\r\n btnFltIcon17.Color := clNone;\r\n btnFltIcon17.ElementClassName := 'btn_icon';\r\n btnFltIcon17.ElementFont := efCSS;\r\n btnFltIcon17.Font.Charset := DEFAULT_CHARSET;\r\n btnFltIcon17.Font.Color := clGray;\r\n btnFltIcon17.Font.Height := -13;\r\n btnFltIcon17.Font.Name := 'Tahoma';\r\n btnFltIcon17.Font.Style := [];\r\n btnFltIcon17.HeightPercent := 100.000000000000000000;\r\n btnFltIcon17.MaterialGlyph := 'search';\r\n btnFltIcon17.ParentFont := False;\r\n btnFltIcon17.ShowHint := True;\r\n btnFltIcon17.TabOrder := 10;\r\n btnFltIcon17.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnFltIcon17, Self, 'OnClick', 'btnApplyFilterClick');\r\n B18.SetParentComponent(sbSearch);\r\n B18.Name := 'B18';\r\n B18.Tag := -2;\r\n B18.Left := 1134;\r\n B18.Top := 0;\r\n B18.Width := 60;\r\n B18.Height := 60;\r\n B18.ElementClassName := 'flt_data_block';\r\n B18.BorderColor := clWhite;\r\n B18.ChildOrder := 18;\r\n B18.Color := clWhite;\r\n B18.ElementFont := efCSS;\r\n B18.Font.Charset := ANSI_CHARSET;\r\n B18.Font.Color := clBlack;\r\n B18.Font.Height := -13;\r\n B18.Font.Name := 'Tahoma';\r\n B18.Font.Style := [fsUnderline];\r\n B18.ParentFont := False;\r\n B18.TabOrder := 17;\r\n SetEvent(B18, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B18, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel26.SetParentComponent(B18);\r\n WebPanel26.Name := 'WebPanel26';\r\n WebPanel26.Left := 0;\r\n WebPanel26.Top := 0;\r\n WebPanel26.Width := 60;\r\n WebPanel26.Height := 28;\r\n WebPanel26.ElementClassName := 'flt_block_top';\r\n WebPanel26.HeightStyle := ssAuto;\r\n WebPanel26.Align := alTop;\r\n WebPanel26.BorderStyle := bsNone;\r\n WebPanel26.ChildOrder := 2;\r\n WebPanel26.Color := clWhite;\r\n WebPanel26.ElementFont := efCSS;\r\n WebPanel26.TabOrder := 0;\r\n SetEvent(WebPanel26, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel26, Self, 'OnMouseMove', 'WebPanel12MouseMove');\r\n SetEvent(WebPanel26, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel26, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel20.SetParentComponent(WebPanel26);\r\n WebLabel20.Name := 'WebLabel20';\r\n WebLabel20.Left := 24;\r\n WebLabel20.Top := 0;\r\n WebLabel20.Width := 45;\r\n WebLabel20.Height := 28;\r\n WebLabel20.Cursor := crDrag;\r\n WebLabel20.Align := alLeft;\r\n WebLabel20.Caption := 'Title18';\r\n WebLabel20.DragMode := dmAutomatic;\r\n WebLabel20.ElementClassName := 'flt_block_title';\r\n WebLabel20.ElementFont := efCSS;\r\n WebLabel20.Font.Charset := ANSI_CHARSET;\r\n WebLabel20.Font.Color := clNavy;\r\n WebLabel20.Font.Height := -13;\r\n WebLabel20.Font.Name := 'Segoe UI Emoji';\r\n WebLabel20.Font.Style := [fsBold];\r\n WebLabel20.HeightPercent := 100.000000000000000000;\r\n WebLabel20.ParentFont := False;\r\n WebLabel20.WidthStyle := ssAuto;\r\n WebLabel20.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel20, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel20, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel20, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel20, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton24.SetParentComponent(WebPanel26);\r\n WebSpeedButton24.Name := 'WebSpeedButton24';\r\n WebSpeedButton24.Left := 0;\r\n WebSpeedButton24.Top := 0;\r\n WebSpeedButton24.Width := 24;\r\n WebSpeedButton24.Height := 28;\r\n WebSpeedButton24.Cursor := crHandPoint;\r\n WebSpeedButton24.Align := alLeft;\r\n WebSpeedButton24.Color := clNone;\r\n WebSpeedButton24.ElementClassName := 'btn_icon_nohighlight';\r\n WebSpeedButton24.Flat := True;\r\n WebSpeedButton24.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton24.MaterialGlyph := 'edit';\r\n WebSpeedButton24.MaterialGlyphSize := 14;\r\n WebSpeedButton24.TabOrder := 0;\r\n WebSpeedButton24.Visible := False;\r\n WebSpeedButton24.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton24, Self, 'OnClick', '_BlockCallPickForm');\r\n M18.SetParentComponent(B18);\r\n M18.Name := 'M18';\r\n M18.Left := 15;\r\n M18.Top := 28;\r\n M18.Width := 45;\r\n M18.Height := 32;\r\n M18.Align := alClient;\r\n M18.BorderStyle := bsNone;\r\n M18.ElementClassName := 'flt_block_memo';\r\n M18.ElementFont := efCSS;\r\n M18.Font.Charset := ANSI_CHARSET;\r\n M18.Font.Color := clBlack;\r\n M18.Font.Height := -13;\r\n M18.Font.Name := 'Tahoma';\r\n M18.Font.Style := [];\r\n M18.HeightPercent := 100.000000000000000000;\r\n M18.ParentFont := False;\r\n M18.SelLength := 0;\r\n M18.SelStart := 0;\r\n M18.ShowFocus := False;\r\n M18.WidthPercent := 100.000000000000000000;\r\n SetEvent(M18, Self, 'OnChange', 'M1Change');\r\n SetEvent(M18, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M18, Self, 'OnKeyDown', 'M1KeyDown');\r\n SetEvent(M18, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M18, Self, 'OnDragOver', 'M1DragOver');\r\n btnFltIcon18.SetParentComponent(B18);\r\n btnFltIcon18.Name := 'btnFltIcon18';\r\n btnFltIcon18.Left := 0;\r\n btnFltIcon18.Top := 28;\r\n btnFltIcon18.Width := 15;\r\n btnFltIcon18.Height := 32;\r\n btnFltIcon18.Cursor := crHandPoint;\r\n btnFltIcon18.Hint := 'Search';\r\n btnFltIcon18.Align := alLeft;\r\n btnFltIcon18.Color := clNone;\r\n btnFltIcon18.ElementClassName := 'btn_icon';\r\n btnFltIcon18.ElementFont := efCSS;\r\n btnFltIcon18.Font.Charset := DEFAULT_CHARSET;\r\n btnFltIcon18.Font.Color := clGray;\r\n btnFltIcon18.Font.Height := -13;\r\n btnFltIcon18.Font.Name := 'Tahoma';\r\n btnFltIcon18.Font.Style := [];\r\n btnFltIcon18.HeightPercent := 100.000000000000000000;\r\n btnFltIcon18.MaterialGlyph := 'search';\r\n btnFltIcon18.ParentFont := False;\r\n btnFltIcon18.ShowHint := True;\r\n btnFltIcon18.TabOrder := 10;\r\n btnFltIcon18.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnFltIcon18, Self, 'OnClick', 'btnApplyFilterClick');\r\n B19.SetParentComponent(sbSearch);\r\n B19.Name := 'B19';\r\n B19.Tag := -2;\r\n B19.Left := 1201;\r\n B19.Top := 0;\r\n B19.Width := 60;\r\n B19.Height := 60;\r\n B19.ElementClassName := 'flt_data_block';\r\n B19.BorderColor := clWhite;\r\n B19.ChildOrder := 19;\r\n B19.Color := clWhite;\r\n B19.ElementFont := efCSS;\r\n B19.Font.Charset := ANSI_CHARSET;\r\n B19.Font.Color := clBlack;\r\n B19.Font.Height := -13;\r\n B19.Font.Name := 'Tahoma';\r\n B19.Font.Style := [fsUnderline];\r\n B19.ParentFont := False;\r\n B19.TabOrder := 18;\r\n SetEvent(B19, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B19, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel28.SetParentComponent(B19);\r\n WebPanel28.Name := 'WebPanel28';\r\n WebPanel28.Left := 0;\r\n WebPanel28.Top := 0;\r\n WebPanel28.Width := 60;\r\n WebPanel28.Height := 28;\r\n WebPanel28.ElementClassName := 'flt_block_top';\r\n WebPanel28.HeightStyle := ssAuto;\r\n WebPanel28.Align := alTop;\r\n WebPanel28.BorderStyle := bsNone;\r\n WebPanel28.ChildOrder := 2;\r\n WebPanel28.Color := clWhite;\r\n WebPanel28.ElementFont := efCSS;\r\n WebPanel28.TabOrder := 0;\r\n SetEvent(WebPanel28, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel28, Self, 'OnMouseMove', 'WebPanel12MouseMove');\r\n SetEvent(WebPanel28, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel28, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel21.SetParentComponent(WebPanel28);\r\n WebLabel21.Name := 'WebLabel21';\r\n WebLabel21.Left := 24;\r\n WebLabel21.Top := 0;\r\n WebLabel21.Width := 45;\r\n WebLabel21.Height := 28;\r\n WebLabel21.Cursor := crDrag;\r\n WebLabel21.Align := alLeft;\r\n WebLabel21.Caption := 'Title19';\r\n WebLabel21.DragMode := dmAutomatic;\r\n WebLabel21.ElementClassName := 'flt_block_title';\r\n WebLabel21.ElementFont := efCSS;\r\n WebLabel21.Font.Charset := ANSI_CHARSET;\r\n WebLabel21.Font.Color := clNavy;\r\n WebLabel21.Font.Height := -13;\r\n WebLabel21.Font.Name := 'Segoe UI Emoji';\r\n WebLabel21.Font.Style := [fsBold];\r\n WebLabel21.HeightPercent := 100.000000000000000000;\r\n WebLabel21.ParentFont := False;\r\n WebLabel21.WidthStyle := ssAuto;\r\n WebLabel21.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel21, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel21, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel21, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel21, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton25.SetParentComponent(WebPanel28);\r\n WebSpeedButton25.Name := 'WebSpeedButton25';\r\n WebSpeedButton25.Left := 0;\r\n WebSpeedButton25.Top := 0;\r\n WebSpeedButton25.Width := 24;\r\n WebSpeedButton25.Height := 28;\r\n WebSpeedButton25.Cursor := crHandPoint;\r\n WebSpeedButton25.Align := alLeft;\r\n WebSpeedButton25.Color := clNone;\r\n WebSpeedButton25.ElementClassName := 'btn_icon_nohighlight';\r\n WebSpeedButton25.Flat := True;\r\n WebSpeedButton25.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton25.MaterialGlyph := 'edit';\r\n WebSpeedButton25.MaterialGlyphSize := 14;\r\n WebSpeedButton25.TabOrder := 0;\r\n WebSpeedButton25.Visible := False;\r\n WebSpeedButton25.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton25, Self, 'OnClick', '_BlockCallPickForm');\r\n M19.SetParentComponent(B19);\r\n M19.Name := 'M19';\r\n M19.Left := 15;\r\n M19.Top := 28;\r\n M19.Width := 45;\r\n M19.Height := 32;\r\n M19.Align := alClient;\r\n M19.BorderStyle := bsNone;\r\n M19.ElementClassName := 'flt_block_memo';\r\n M19.ElementFont := efCSS;\r\n M19.Font.Charset := ANSI_CHARSET;\r\n M19.Font.Color := clBlack;\r\n M19.Font.Height := -13;\r\n M19.Font.Name := 'Tahoma';\r\n M19.Font.Style := [];\r\n M19.HeightPercent := 100.000000000000000000;\r\n M19.ParentFont := False;\r\n M19.SelLength := 0;\r\n M19.SelStart := 0;\r\n M19.ShowFocus := False;\r\n M19.WidthPercent := 100.000000000000000000;\r\n SetEvent(M19, Self, 'OnChange', 'M1Change');\r\n SetEvent(M19, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M19, Self, 'OnKeyDown', 'M1KeyDown');\r\n SetEvent(M19, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M19, Self, 'OnDragOver', 'M1DragOver');\r\n btnFltIcon19.SetParentComponent(B19);\r\n btnFltIcon19.Name := 'btnFltIcon19';\r\n btnFltIcon19.Left := 0;\r\n btnFltIcon19.Top := 28;\r\n btnFltIcon19.Width := 15;\r\n btnFltIcon19.Height := 32;\r\n btnFltIcon19.Cursor := crHandPoint;\r\n btnFltIcon19.Hint := 'Search';\r\n btnFltIcon19.Align := alLeft;\r\n btnFltIcon19.Color := clNone;\r\n btnFltIcon19.ElementClassName := 'btn_icon';\r\n btnFltIcon19.ElementFont := efCSS;\r\n btnFltIcon19.Font.Charset := DEFAULT_CHARSET;\r\n btnFltIcon19.Font.Color := clGray;\r\n btnFltIcon19.Font.Height := -13;\r\n btnFltIcon19.Font.Name := 'Tahoma';\r\n btnFltIcon19.Font.Style := [];\r\n btnFltIcon19.HeightPercent := 100.000000000000000000;\r\n btnFltIcon19.MaterialGlyph := 'search';\r\n btnFltIcon19.ParentFont := False;\r\n btnFltIcon19.ShowHint := True;\r\n btnFltIcon19.TabOrder := 10;\r\n btnFltIcon19.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnFltIcon19, Self, 'OnClick', 'btnApplyFilterClick');\r\n B20.SetParentComponent(sbSearch);\r\n B20.Name := 'B20';\r\n B20.Tag := -2;\r\n B20.Left := 1268;\r\n B20.Top := 0;\r\n B20.Width := 60;\r\n B20.Height := 60;\r\n B20.ElementClassName := 'flt_data_block';\r\n B20.BorderColor := clWhite;\r\n B20.ChildOrder := 20;\r\n B20.Color := clWhite;\r\n B20.ElementFont := efCSS;\r\n B20.Font.Charset := ANSI_CHARSET;\r\n B20.Font.Color := clBlack;\r\n B20.Font.Height := -13;\r\n B20.Font.Name := 'Tahoma';\r\n B20.Font.Style := [fsUnderline];\r\n B20.ParentFont := False;\r\n B20.TabOrder := 19;\r\n SetEvent(B20, Self, 'OnMouseLeave', '_Block_MouseLeave');\r\n SetEvent(B20, Self, 'OnMouseMove', '_Block_MouseMove');\r\n WebPanel30.SetParentComponent(B20);\r\n WebPanel30.Name := 'WebPanel30';\r\n WebPanel30.Left := 0;\r\n WebPanel30.Top := 0;\r\n WebPanel30.Width := 60;\r\n WebPanel30.Height := 28;\r\n WebPanel30.ElementClassName := 'flt_block_top';\r\n WebPanel30.HeightStyle := ssAuto;\r\n WebPanel30.Align := alTop;\r\n WebPanel30.BorderStyle := bsNone;\r\n WebPanel30.ChildOrder := 2;\r\n WebPanel30.Color := clWhite;\r\n WebPanel30.ElementFont := efCSS;\r\n WebPanel30.TabOrder := 0;\r\n SetEvent(WebPanel30, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebPanel30, Self, 'OnMouseMove', 'WebPanel12MouseMove');\r\n SetEvent(WebPanel30, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel30, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel22.SetParentComponent(WebPanel30);\r\n WebLabel22.Name := 'WebLabel22';\r\n WebLabel22.Left := 24;\r\n WebLabel22.Top := 0;\r\n WebLabel22.Width := 45;\r\n WebLabel22.Height := 28;\r\n WebLabel22.Cursor := crDrag;\r\n WebLabel22.Align := alLeft;\r\n WebLabel22.Caption := 'Title20';\r\n WebLabel22.DragMode := dmAutomatic;\r\n WebLabel22.ElementClassName := 'flt_block_title';\r\n WebLabel22.ElementFont := efCSS;\r\n WebLabel22.Font.Charset := ANSI_CHARSET;\r\n WebLabel22.Font.Color := clNavy;\r\n WebLabel22.Font.Height := -13;\r\n WebLabel22.Font.Name := 'Segoe UI Emoji';\r\n WebLabel22.Font.Style := [fsBold];\r\n WebLabel22.HeightPercent := 100.000000000000000000;\r\n WebLabel22.ParentFont := False;\r\n WebLabel22.WidthStyle := ssAuto;\r\n WebLabel22.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel22, Self, 'OnDblClick', '_BlockTitleEdit');\r\n SetEvent(WebLabel22, Self, 'OnMouseMove', '_BlockTitle_MouseMove');\r\n SetEvent(WebLabel22, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel22, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebSpeedButton26.SetParentComponent(WebPanel30);\r\n WebSpeedButton26.Name := 'WebSpeedButton26';\r\n WebSpeedButton26.Left := 0;\r\n WebSpeedButton26.Top := 0;\r\n WebSpeedButton26.Width := 24;\r\n WebSpeedButton26.Height := 28;\r\n WebSpeedButton26.Cursor := crHandPoint;\r\n WebSpeedButton26.Align := alLeft;\r\n WebSpeedButton26.Color := clNone;\r\n WebSpeedButton26.ElementClassName := 'btn_icon_nohighlight';\r\n WebSpeedButton26.Flat := True;\r\n WebSpeedButton26.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton26.MaterialGlyph := 'edit';\r\n WebSpeedButton26.MaterialGlyphSize := 14;\r\n WebSpeedButton26.TabOrder := 0;\r\n WebSpeedButton26.Visible := False;\r\n WebSpeedButton26.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton26, Self, 'OnClick', '_BlockCallPickForm');\r\n M20.SetParentComponent(B20);\r\n M20.Name := 'M20';\r\n M20.Left := 15;\r\n M20.Top := 28;\r\n M20.Width := 45;\r\n M20.Height := 32;\r\n M20.Align := alClient;\r\n M20.BorderStyle := bsNone;\r\n M20.ElementClassName := 'flt_block_memo';\r\n M20.ElementFont := efCSS;\r\n M20.Font.Charset := ANSI_CHARSET;\r\n M20.Font.Color := clBlack;\r\n M20.Font.Height := -13;\r\n M20.Font.Name := 'Tahoma';\r\n M20.Font.Style := [];\r\n M20.HeightPercent := 100.000000000000000000;\r\n M20.ParentFont := False;\r\n M20.SelLength := 0;\r\n M20.SelStart := 0;\r\n M20.ShowFocus := False;\r\n M20.WidthPercent := 100.000000000000000000;\r\n SetEvent(M20, Self, 'OnChange', 'M1Change');\r\n SetEvent(M20, Self, 'OnClick', '_BlockShowQPickList');\r\n SetEvent(M20, Self, 'OnKeyDown', 'M1KeyDown');\r\n SetEvent(M20, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M20, Self, 'OnDragOver', 'M1DragOver');\r\n btnFltIcon20.SetParentComponent(B20);\r\n btnFltIcon20.Name := 'btnFltIcon20';\r\n btnFltIcon20.Left := 0;\r\n btnFltIcon20.Top := 28;\r\n btnFltIcon20.Width := 15;\r\n btnFltIcon20.Height := 32;\r\n btnFltIcon20.Cursor := crHandPoint;\r\n btnFltIcon20.Hint := 'Search';\r\n btnFltIcon20.Align := alLeft;\r\n btnFltIcon20.Color := clNone;\r\n btnFltIcon20.ElementClassName := 'btn_icon';\r\n btnFltIcon20.ElementFont := efCSS;\r\n btnFltIcon20.Font.Charset := DEFAULT_CHARSET;\r\n btnFltIcon20.Font.Color := clGray;\r\n btnFltIcon20.Font.Height := -13;\r\n btnFltIcon20.Font.Name := 'Tahoma';\r\n btnFltIcon20.Font.Style := [];\r\n btnFltIcon20.HeightPercent := 100.000000000000000000;\r\n btnFltIcon20.MaterialGlyph := 'search';\r\n btnFltIcon20.ParentFont := False;\r\n btnFltIcon20.ShowHint := True;\r\n btnFltIcon20.TabOrder := 10;\r\n btnFltIcon20.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnFltIcon20, Self, 'OnClick', 'btnApplyFilterClick');\r\n WebPanel1.SetParentComponent(pnlSearch);\r\n WebPanel1.Name := 'WebPanel1';\r\n WebPanel1.Left := 1343;\r\n WebPanel1.Top := 0;\r\n WebPanel1.Width := 94;\r\n WebPanel1.Height := 45;\r\n WebPanel1.Align := alRight;\r\n WebPanel1.BorderColor := clWhite;\r\n WebPanel1.BorderStyle := bsNone;\r\n WebPanel1.ChildOrder := 3;\r\n WebPanel1.Color := clWhite;\r\n WebPanel1.TabOrder := 1;\r\n btnClearFilter.SetParentComponent(WebPanel1);\r\n btnClearFilter.Name := 'btnClearFilter';\r\n btnClearFilter.Left := 1;\r\n btnClearFilter.Top := 8;\r\n btnClearFilter.Width := 24;\r\n btnClearFilter.Height := 24;\r\n btnClearFilter.Cursor := crHandPoint;\r\n btnClearFilter.Hint := 'Clear Search';\r\n btnClearFilter.Caption := '';\r\n btnClearFilter.Color := clNone;\r\n btnClearFilter.ElementClassName := 'btn_icon';\r\n btnClearFilter.ElementFont := efCSS;\r\n btnClearFilter.Font.Charset := DEFAULT_CHARSET;\r\n btnClearFilter.Font.Color := clGray;\r\n btnClearFilter.Font.Height := -13;\r\n btnClearFilter.Font.Name := 'Tahoma';\r\n btnClearFilter.Font.Style := [];\r\n btnClearFilter.HeightPercent := 100.000000000000000000;\r\n btnClearFilter.MaterialGlyphSize := 30;\r\n btnClearFilter.ParentFont := False;\r\n btnClearFilter.ShowHint := True;\r\n btnClearFilter.TabOrder := 10;\r\n btnClearFilter.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnClearFilter, Self, 'OnClick', 'btnClearFilterClick');\r\n btnApplyFilter.SetParentComponent(WebPanel1);\r\n btnApplyFilter.Name := 'btnApplyFilter';\r\n btnApplyFilter.Left := 31;\r\n btnApplyFilter.Top := 8;\r\n btnApplyFilter.Width := 24;\r\n btnApplyFilter.Height := 24;\r\n btnApplyFilter.Cursor := crHandPoint;\r\n btnApplyFilter.Hint := 'Search';\r\n btnApplyFilter.Caption := '';\r\n btnApplyFilter.Color := clNone;\r\n btnApplyFilter.ElementClassName := 'btn_icon';\r\n btnApplyFilter.ElementFont := efCSS;\r\n btnApplyFilter.Font.Charset := DEFAULT_CHARSET;\r\n btnApplyFilter.Font.Color := clGray;\r\n btnApplyFilter.Font.Height := -13;\r\n btnApplyFilter.Font.Name := 'Tahoma';\r\n btnApplyFilter.Font.Style := [];\r\n btnApplyFilter.HeightPercent := 100.000000000000000000;\r\n btnApplyFilter.MaterialGlyphSize := 30;\r\n btnApplyFilter.ParentFont := False;\r\n btnApplyFilter.ShowHint := True;\r\n btnApplyFilter.TabOrder := 10;\r\n btnApplyFilter.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnApplyFilter, Self, 'OnClick', 'btnApplyFilterClick');\r\n btnCernerSearch.SetParentComponent(WebPanel1);\r\n btnCernerSearch.Name := 'btnCernerSearch';\r\n btnCernerSearch.Left := 61;\r\n btnCernerSearch.Top := 8;\r\n btnCernerSearch.Width := 24;\r\n btnCernerSearch.Height := 24;\r\n btnCernerSearch.Cursor := crHandPoint;\r\n btnCernerSearch.Hint := 'Cerner search';\r\n btnCernerSearch.Caption := '';\r\n btnCernerSearch.Color := clNone;\r\n btnCernerSearch.ElementClassName := 'btn_icon';\r\n btnCernerSearch.ElementFont := efCSS;\r\n btnCernerSearch.Font.Charset := DEFAULT_CHARSET;\r\n btnCernerSearch.Font.Color := clGray;\r\n btnCernerSearch.Font.Height := -13;\r\n btnCernerSearch.Font.Name := 'Tahoma';\r\n btnCernerSearch.Font.Style := [];\r\n btnCernerSearch.HeightPercent := 100.000000000000000000;\r\n btnCernerSearch.MaterialGlyphSize := 30;\r\n btnCernerSearch.ParentFont := False;\r\n btnCernerSearch.ShowHint := True;\r\n btnCernerSearch.TabOrder := 10;\r\n btnCernerSearch.Visible := False;\r\n btnCernerSearch.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnCernerSearch, Self, 'OnClick', 'btnCernerSearchClick');\r\n grdDynamicGrid.SetParentComponent(pnlMain);\r\n grdDynamicGrid.Name := 'grdDynamicGrid';\r\n grdDynamicGrid.AlignWithMargins := True;\r\n grdDynamicGrid.Left := 10;\r\n grdDynamicGrid.Top := 45;\r\n grdDynamicGrid.Width := 1437;\r\n grdDynamicGrid.Height := 755;\r\n grdDynamicGrid.Cursor := crHandPoint;\r\n grdDynamicGrid.Margins.Left := 10;\r\n grdDynamicGrid.Margins.Top := 0;\r\n grdDynamicGrid.Margins.Right := 0;\r\n grdDynamicGrid.Margins.Bottom := 0;\r\n grdDynamicGrid.Align := alClient;\r\n grdDynamicGrid.BorderStyle := bsNone;\r\n grdDynamicGrid.Columns.Clear;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C1';\r\n Title := 'C1';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C2';\r\n Title := 'C2';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C3';\r\n Title := 'C3';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C4';\r\n Title := 'C4';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C5';\r\n Title := 'C5';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C6';\r\n Title := 'C6';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C7';\r\n Title := 'C7';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C8';\r\n Title := 'C8';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C9';\r\n Title := 'C9';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C10';\r\n Title := 'C10';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C11';\r\n Title := 'C11';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C12';\r\n Title := 'C12';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C13';\r\n Title := 'C13';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C15';\r\n Title := 'C15';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C16';\r\n Title := 'C16';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C17';\r\n Title := 'C17';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C18';\r\n Title := 'C18';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C19';\r\n Title := 'C19';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'C20';\r\n Title := 'C20';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_NURSE2';\r\n Title := '_CURRENT_NURSE2';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_NURSE1';\r\n Title := '_CURRENT_NURSE1';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_PROVIDER';\r\n Title := '_CURRENT_PROVIDER';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_PROCEDURENUMBER';\r\n Title := '_CURRENT_PROCEDURENUMBER';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := '_CURRENT_MRN';\r\n Title := '_CURRENT_MRN';\r\n TitleElementClassName := 'text-wrap';\r\n end;\r\n grdDynamicGrid.DefaultRowHeight := 30;\r\n grdDynamicGrid.FixedFont.Charset := DEFAULT_CHARSET;\r\n grdDynamicGrid.FixedFont.Color := clWhite;\r\n grdDynamicGrid.FixedFont.Height := -11;\r\n grdDynamicGrid.FixedFont.Name := 'Tahoma';\r\n grdDynamicGrid.FixedFont.Style := [];\r\n grdDynamicGrid.FixedColor := 13801747;\r\n grdDynamicGrid.FixedCols := 0;\r\n grdDynamicGrid.Font.Charset := DEFAULT_CHARSET;\r\n grdDynamicGrid.Font.Color := clWindowText;\r\n grdDynamicGrid.Font.Height := -16;\r\n grdDynamicGrid.Font.Name := 'Tahoma';\r\n grdDynamicGrid.Font.Style := [];\r\n grdDynamicGrid.Options := [goFixedVertLine,goColSizing,goEditing,goRowSelect];\r\n grdDynamicGrid.ParentFont := False;\r\n grdDynamicGrid.TabOrder := 1;\r\n grdDynamicGrid.HeightPercent := 100.000000000000000000;\r\n grdDynamicGrid.SelectionColor := 16769217;\r\n grdDynamicGrid.SelectionTextColor := clBlack;\r\n grdDynamicGrid.Visible := False;\r\n grdDynamicGrid.WidthPercent := 100.000000000000000000;\r\n SetEvent(grdDynamicGrid, Self, 'OnClick', 'grdDynamicGridClick');\r\n SetEvent(grdDynamicGrid, Self, 'OnDblClick', 'grdDynamicGridDblClick');\r\n SetEvent(grdDynamicGrid, Self, 'OnFixedCellClick', 'grdDynamicGridFixedCellClick');\r\n SetEvent(grdDynamicGrid, Self, 'OnKeyUp', 'grdDynamicGridKeyUp');\r\n grdDynamicGrid.ColWidths[0] := 64;\r\n grdDynamicGrid.ColWidths[1] := 64;\r\n grdDynamicGrid.ColWidths[2] := 64;\r\n grdDynamicGrid.ColWidths[3] := 64;\r\n grdDynamicGrid.ColWidths[4] := 64;\r\n grdDynamicGrid.ColWidths[5] := 64;\r\n grdDynamicGrid.ColWidths[6] := 64;\r\n grdDynamicGrid.ColWidths[7] := 64;\r\n grdDynamicGrid.ColWidths[8] := 64;\r\n grdDynamicGrid.ColWidths[9] := 64;\r\n grdDynamicGrid.ColWidths[10] := 64;\r\n grdDynamicGrid.ColWidths[11] := 64;\r\n grdDynamicGrid.ColWidths[12] := 64;\r\n grdDynamicGrid.ColWidths[13] := 64;\r\n grdDynamicGrid.ColWidths[14] := 64;\r\n grdDynamicGrid.ColWidths[15] := 64;\r\n grdDynamicGrid.ColWidths[16] := 64;\r\n grdDynamicGrid.ColWidths[17] := 64;\r\n grdDynamicGrid.ColWidths[18] := 64;\r\n grdDynamicGrid.ColWidths[19] := 64;\r\n grdDynamicGrid.ColWidths[20] := 64;\r\n grdDynamicGrid.ColWidths[21] := 64;\r\n grdDynamicGrid.ColWidths[22] := 64;\r\n grdDynamicGrid.ColWidths[23] := 64;\r\n cldDayRange.SetParentComponent(pnlMain);\r\n cldDayRange.Name := 'cldDayRange';\r\n cldDayRange.Left := 72;\r\n cldDayRange.Top := 87;\r\n cldDayRange.Width := 201;\r\n cldDayRange.Height := 186;\r\n cldDayRange.ChildOrder := 7;\r\n cldDayRange.Visible := False;\r\n cldDayRange.TabOrder := 2;\r\n cldDayRange.SelectedDate := 44923.000000000000000000;\r\n cldDayRange.Year := 2022;\r\n cldDayRange.Month := 12;\r\n cldDayRange.Day := 28;\r\n cldDayRange.NameOfMonths.January := 'January';\r\n cldDayRange.NameOfMonths.February := 'February';\r\n cldDayRange.NameOfMonths.March := 'March';\r\n cldDayRange.NameOfMonths.April := 'April';\r\n cldDayRange.NameOfMonths.May := 'May';\r\n cldDayRange.NameOfMonths.June := 'June';\r\n cldDayRange.NameOfMonths.July := 'July';\r\n cldDayRange.NameOfMonths.August := 'August';\r\n cldDayRange.NameOfMonths.September := 'September';\r\n cldDayRange.NameOfMonths.October := 'October';\r\n cldDayRange.NameOfMonths.November := 'November';\r\n cldDayRange.NameOfMonths.December := 'December';\r\n cldDayRange.NameOfDays.Sunday := 'Sun';\r\n cldDayRange.NameOfDays.Monday := 'Mon';\r\n cldDayRange.NameOfDays.Tuesday := 'Tue';\r\n cldDayRange.NameOfDays.Wednesday := 'Wed';\r\n cldDayRange.NameOfDays.Thursday := 'Thu';\r\n cldDayRange.NameOfDays.Friday := 'Fri';\r\n cldDayRange.NameOfDays.Saturday := 'Sat';\r\n SetEvent(cldDayRange, Self, 'OnDateSelected', 'cldDayRangeDateSelected');\r\n SetEvent(cldDayRange, Self, 'OnMouseMove', 'cldDayRangeMouseMove');\r\n SetEvent(cldDayRange, Self, 'OnMouseUp', 'cldDayRangeMouseUp');\r\n viewpdf.SetParentComponent(pnlMain);\r\n viewpdf.Name := 'viewpdf';\r\n viewpdf.Left := 315;\r\n viewpdf.Top := 252;\r\n viewpdf.Width := 215;\r\n viewpdf.Height := 145;\r\n viewpdf.BorderStyle := bsNone;\r\n viewpdf.ChildOrder := 18;\r\n viewpdf.Sandbox := [];\r\n viewpdf.Visible := False;\r\n WebSpeedButton16.SetParentComponent(pnlMain);\r\n WebSpeedButton16.Name := 'WebSpeedButton16';\r\n WebSpeedButton16.Left := 573;\r\n WebSpeedButton16.Top := 148;\r\n WebSpeedButton16.Width := 59;\r\n WebSpeedButton16.Height := 61;\r\n WebSpeedButton16.Cursor := crHandPoint;\r\n WebSpeedButton16.Hint := 'Filter';\r\n WebSpeedButton16.Color := clNone;\r\n WebSpeedButton16.ElementClassName := 'accordion-flush';\r\n WebSpeedButton16.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton16.MaterialGlyph := 'group_add';\r\n WebSpeedButton16.MaterialGlyphSize := 40;\r\n WebSpeedButton16.ShowHint := True;\r\n WebSpeedButton16.TabOrder := 4;\r\n WebSpeedButton16.Visible := False;\r\n WebSpeedButton16.WidthPercent := 100.000000000000000000;\r\n mdDialogDelete.SetParentComponent(pnlMain);\r\n mdDialogDelete.Name := 'mdDialogDelete';\r\n mdDialogDelete.Left := 288;\r\n mdDialogDelete.Top := 137;\r\n mdDialogDelete.Width := 24;\r\n mdDialogDelete.Height := 24;\r\n mdDialogDelete.ElementClassName := 'modal-fullscreen-sm-down';\r\n mdDialogDelete.Buttons := [];\r\n mdDialogDelete.CustomButtons.Clear;\r\n with mdDialogDelete.CustomButtons.Add do\r\n begin\r\n Caption := 'Yes';\r\n ElementClassName := 'btn-outline-success';\r\n end;\r\n with mdDialogDelete.CustomButtons.Add do\r\n begin\r\n Caption := 'No';\r\n ElementClassName := 'btn-outline-secondary';\r\n end;\r\n mdDialogDelete.Opacity := 0.100000000000000000;\r\n mdDialogDelete.ElementButtonClassName := 'btn';\r\n Memo.SetParentComponent(Self);\r\n Memo.Name := 'Memo';\r\n Memo.Tag := -1;\r\n Memo.Left := 0;\r\n Memo.Top := 878;\r\n Memo.Width := 1450;\r\n Memo.Height := 68;\r\n Memo.Align := alBottom;\r\n Memo.BorderStyle := bsNone;\r\n Memo.ElementClassName := 'listform_block_memo';\r\n Memo.ElementFont := efCSS;\r\n Memo.Font.Charset := DEFAULT_CHARSET;\r\n Memo.Font.Color := clWindowText;\r\n Memo.Font.Height := -13;\r\n Memo.Font.Name := 'Tahoma';\r\n Memo.Font.Style := [];\r\n Memo.HeightStyle := ssAuto;\r\n Memo.HeightPercent := 100.000000000000000000;\r\n Memo.ParentFont := False;\r\n Memo.SelLength := 0;\r\n Memo.SelStart := 0;\r\n Memo.ShowFocus := False;\r\n Memo.WidthPercent := 100.000000000000000000;\r\n pnlFormCaption.SetParentComponent(Self);\r\n pnlFormCaption.Name := 'pnlFormCaption';\r\n pnlFormCaption.Left := 0;\r\n pnlFormCaption.Top := 0;\r\n pnlFormCaption.Width := 1450;\r\n pnlFormCaption.Height := 24;\r\n pnlFormCaption.ElementClassName := 'form_caption';\r\n pnlFormCaption.HeightStyle := ssAuto;\r\n pnlFormCaption.Align := alTop;\r\n pnlFormCaption.BorderColor := clWhite;\r\n pnlFormCaption.BorderStyle := bsNone;\r\n pnlFormCaption.Caption := 'Form Caption';\r\n pnlFormCaption.ChildOrder := 9;\r\n pnlFormCaption.ElementFont := efCSS;\r\n pnlFormCaption.Font.Charset := DEFAULT_CHARSET;\r\n pnlFormCaption.Font.Color := clWindowText;\r\n pnlFormCaption.Font.Height := -16;\r\n pnlFormCaption.Font.Name := 'Tahoma';\r\n pnlFormCaption.Font.Style := [];\r\n pnlFormCaption.ParentFont := False;\r\n pnlFormCaption.TabOrder := 4;\r\n wmWaitMessage.SetParentComponent(Self);\r\n wmWaitMessage.Name := 'wmWaitMessage';\r\n wmWaitMessage.Left := 364;\r\n wmWaitMessage.Top := 191;\r\n wmWaitMessage.Width := 24;\r\n wmWaitMessage.Height := 24;\r\n wmWaitMessage.Opacity := 0.200000000000000000;\r\n wmWaitMessage.Picture.LoadFromFile('ListForm_Base.wmWaitMessage.Picture.gif');\r\n tmGridRefreshClick.SetParentComponent(Self);\r\n tmGridRefreshClick.Name := 'tmGridRefreshClick';\r\n tmGridRefreshClick.Enabled := False;\r\n SetEvent(tmGridRefreshClick, Self, 'OnTimer', 'tmGridRefreshClickTimer');\r\n tmGridRefreshClick.Left := 288;\r\n tmGridRefreshClick.Top := 239;\r\n tmCloseWaitMessage.SetParentComponent(Self);\r\n tmCloseWaitMessage.Name := 'tmCloseWaitMessage';\r\n tmCloseWaitMessage.Enabled := False;\r\n tmCloseWaitMessage.Interval := 1;\r\n SetEvent(tmCloseWaitMessage, Self, 'OnTimer', 'tmCloseWaitMessageTimer');\r\n tmCloseWaitMessage.Left := 408;\r\n tmCloseWaitMessage.Top := 239;\r\n tmFixFiltermemos.SetParentComponent(Self);\r\n tmFixFiltermemos.Name := 'tmFixFiltermemos';\r\n tmFixFiltermemos.Enabled := False;\r\n tmFixFiltermemos.Interval := 1;\r\n SetEvent(tmFixFiltermemos, Self, 'OnTimer', 'tmFixFiltermemosTimer');\r\n tmFixFiltermemos.Left := 280;\r\n tmFixFiltermemos.Top := 303;\r\n finally\r\n WebLabel10.AfterLoadDFMValues;\r\n WebLabel11.AfterLoadDFMValues;\r\n WebLabel8.AfterLoadDFMValues;\r\n pnlTop.AfterLoadDFMValues;\r\n LFB_dateRange.AfterLoadDFMValues;\r\n dpStartDate.AfterLoadDFMValues;\r\n dpEndDate.AfterLoadDFMValues;\r\n WebSpeedButton9.AfterLoadDFMValues;\r\n btnRange_calendar.AfterLoadDFMValues;\r\n btnRange_todaye.AfterLoadDFMValues;\r\n btnRange_dayback.AfterLoadDFMValues;\r\n btnRange_dayforward.AfterLoadDFMValues;\r\n chApplyDateRange.AfterLoadDFMValues;\r\n btnGridRefresh.AfterLoadDFMValues;\r\n btnGridSetup.AfterLoadDFMValues;\r\n pnlBottom.AfterLoadDFMValues;\r\n tbReport.AfterLoadDFMValues;\r\n pnlFormButtons.AfterLoadDFMValues;\r\n btnCustom1.AfterLoadDFMValues;\r\n btnCustom2.AfterLoadDFMValues;\r\n btnCustom3.AfterLoadDFMValues;\r\n btnCustom4.AfterLoadDFMValues;\r\n btnCustom5.AfterLoadDFMValues;\r\n btnSelect.AfterLoadDFMValues;\r\n btnClose.AfterLoadDFMValues;\r\n btnClear.AfterLoadDFMValues;\r\n btnSave.AfterLoadDFMValues;\r\n btnCustom6.AfterLoadDFMValues;\r\n btnCustom7.AfterLoadDFMValues;\r\n btnCustom8.AfterLoadDFMValues;\r\n btnCustom9.AfterLoadDFMValues;\r\n pnlReportButtons.AfterLoadDFMValues;\r\n btnClose_RPT.AfterLoadDFMValues;\r\n pnlMain.AfterLoadDFMValues;\r\n pnlSearch.AfterLoadDFMValues;\r\n sbSearch.AfterLoadDFMValues;\r\n B6.AfterLoadDFMValues;\r\n WebPanel2.AfterLoadDFMValues;\r\n WebLabel1.AfterLoadDFMValues;\r\n WebSpeedButton7.AfterLoadDFMValues;\r\n M6.AfterLoadDFMValues;\r\n btnFltIcon6.AfterLoadDFMValues;\r\n B5.AfterLoadDFMValues;\r\n WebPanel4.AfterLoadDFMValues;\r\n WebLabel2.AfterLoadDFMValues;\r\n WebSpeedButton5.AfterLoadDFMValues;\r\n M5.AfterLoadDFMValues;\r\n btnFltIcon5.AfterLoadDFMValues;\r\n B4.AfterLoadDFMValues;\r\n WebPanel6.AfterLoadDFMValues;\r\n WebLabel3.AfterLoadDFMValues;\r\n WebSpeedButton4.AfterLoadDFMValues;\r\n M4.AfterLoadDFMValues;\r\n btnFltIcon4.AfterLoadDFMValues;\r\n B3.AfterLoadDFMValues;\r\n WebPanel8.AfterLoadDFMValues;\r\n WebLabel4.AfterLoadDFMValues;\r\n WebSpeedButton3.AfterLoadDFMValues;\r\n M3.AfterLoadDFMValues;\r\n btnFltIcon3.AfterLoadDFMValues;\r\n B2.AfterLoadDFMValues;\r\n WebPanel10.AfterLoadDFMValues;\r\n WebLabel5.AfterLoadDFMValues;\r\n WebSpeedButton2.AfterLoadDFMValues;\r\n M2.AfterLoadDFMValues;\r\n btnFltIcon2.AfterLoadDFMValues;\r\n B1.AfterLoadDFMValues;\r\n WebPanel12.AfterLoadDFMValues;\r\n WebLabel6.AfterLoadDFMValues;\r\n WebSpeedButton1.AfterLoadDFMValues;\r\n M1.AfterLoadDFMValues;\r\n btnFltIcon1.AfterLoadDFMValues;\r\n B7.AfterLoadDFMValues;\r\n WebPanel70.AfterLoadDFMValues;\r\n WebLabel36.AfterLoadDFMValues;\r\n WebSpeedButton6.AfterLoadDFMValues;\r\n M7.AfterLoadDFMValues;\r\n btnFltIcon7.AfterLoadDFMValues;\r\n B8.AfterLoadDFMValues;\r\n WebPanel3.AfterLoadDFMValues;\r\n WebLabel12.AfterLoadDFMValues;\r\n WebSpeedButton13.AfterLoadDFMValues;\r\n M8.AfterLoadDFMValues;\r\n btnFltIcon8.AfterLoadDFMValues;\r\n B9.AfterLoadDFMValues;\r\n WebPanel7.AfterLoadDFMValues;\r\n WebLabel13.AfterLoadDFMValues;\r\n WebSpeedButton14.AfterLoadDFMValues;\r\n M9.AfterLoadDFMValues;\r\n btnFltIcon9.AfterLoadDFMValues;\r\n B10.AfterLoadDFMValues;\r\n WebPanel11.AfterLoadDFMValues;\r\n WebLabel14.AfterLoadDFMValues;\r\n WebSpeedButton15.AfterLoadDFMValues;\r\n M10.AfterLoadDFMValues;\r\n btnFltIcon10.AfterLoadDFMValues;\r\n B11.AfterLoadDFMValues;\r\n WebPanel9.AfterLoadDFMValues;\r\n WebLabel7.AfterLoadDFMValues;\r\n WebSpeedButton17.AfterLoadDFMValues;\r\n M11.AfterLoadDFMValues;\r\n btnFltIcon11.AfterLoadDFMValues;\r\n B12.AfterLoadDFMValues;\r\n WebPanel14.AfterLoadDFMValues;\r\n WebLabel9.AfterLoadDFMValues;\r\n WebSpeedButton18.AfterLoadDFMValues;\r\n M12.AfterLoadDFMValues;\r\n btnFltIcon12.AfterLoadDFMValues;\r\n B13.AfterLoadDFMValues;\r\n WebPanel16.AfterLoadDFMValues;\r\n WebLabel15.AfterLoadDFMValues;\r\n WebSpeedButton19.AfterLoadDFMValues;\r\n M13.AfterLoadDFMValues;\r\n btnFltIcon13.AfterLoadDFMValues;\r\n B14.AfterLoadDFMValues;\r\n WebPanel18.AfterLoadDFMValues;\r\n WebLabel16.AfterLoadDFMValues;\r\n WebSpeedButton20.AfterLoadDFMValues;\r\n M14.AfterLoadDFMValues;\r\n btnFltIcon14.AfterLoadDFMValues;\r\n B15.AfterLoadDFMValues;\r\n WebPanel20.AfterLoadDFMValues;\r\n WebLabel17.AfterLoadDFMValues;\r\n WebSpeedButton21.AfterLoadDFMValues;\r\n M15.AfterLoadDFMValues;\r\n btnFltIcon15.AfterLoadDFMValues;\r\n B16.AfterLoadDFMValues;\r\n WebPanel22.AfterLoadDFMValues;\r\n WebLabel18.AfterLoadDFMValues;\r\n WebSpeedButton22.AfterLoadDFMValues;\r\n M16.AfterLoadDFMValues;\r\n btnFltIcon16.AfterLoadDFMValues;\r\n B17.AfterLoadDFMValues;\r\n WebPanel24.AfterLoadDFMValues;\r\n WebLabel19.AfterLoadDFMValues;\r\n WebSpeedButton23.AfterLoadDFMValues;\r\n M17.AfterLoadDFMValues;\r\n btnFltIcon17.AfterLoadDFMValues;\r\n B18.AfterLoadDFMValues;\r\n WebPanel26.AfterLoadDFMValues;\r\n WebLabel20.AfterLoadDFMValues;\r\n WebSpeedButton24.AfterLoadDFMValues;\r\n M18.AfterLoadDFMValues;\r\n btnFltIcon18.AfterLoadDFMValues;\r\n B19.AfterLoadDFMValues;\r\n WebPanel28.AfterLoadDFMValues;\r\n WebLabel21.AfterLoadDFMValues;\r\n WebSpeedButton25.AfterLoadDFMValues;\r\n M19.AfterLoadDFMValues;\r\n btnFltIcon19.AfterLoadDFMValues;\r\n B20.AfterLoadDFMValues;\r\n WebPanel30.AfterLoadDFMValues;\r\n WebLabel22.AfterLoadDFMValues;\r\n WebSpeedButton26.AfterLoadDFMValues;\r\n M20.AfterLoadDFMValues;\r\n btnFltIcon20.AfterLoadDFMValues;\r\n WebPanel1.AfterLoadDFMValues;\r\n btnClearFilter.AfterLoadDFMValues;\r\n btnApplyFilter.AfterLoadDFMValues;\r\n btnCernerSearch.AfterLoadDFMValues;\r\n grdDynamicGrid.AfterLoadDFMValues;\r\n cldDayRange.AfterLoadDFMValues;\r\n viewpdf.AfterLoadDFMValues;\r\n WebSpeedButton16.AfterLoadDFMValues;\r\n mdDialogDelete.AfterLoadDFMValues;\r\n Memo.AfterLoadDFMValues;\r\n pnlFormCaption.AfterLoadDFMValues;\r\n wmWaitMessage.AfterLoadDFMValues;\r\n tmGridRefreshClick.AfterLoadDFMValues;\r\n tmCloseWaitMessage.AfterLoadDFMValues;\r\n tmFixFiltermemos.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit UDF_Schedule;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,\r\n Vcl.Controls, Vcl.Forms, Vcl.Dialogs, ListForm_Base, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, WEBLib.ExtCtrls, WEBLib.Buttons, WEBLib.Controls,\r\n WEBLib.Calendar, Vcl.Grids, WEBLib.DBCtrls, WEBLib.Dialogs,\r\n XData.Web.JsonDataset, WebLib.JSON, Data.DB, XData.Web.Dataset,\r\n Vcl.Imaging.GIFImg, VCL.TMSFNCTypes, VCL.TMSFNCUtils, VCL.TMSFNCGraphics,\r\n VCL.TMSFNCGraphicsTypes, WEBLib.WebCtrls, VCL.TMSFNCCustomControl,\r\n VCL.TMSFNCSwitch, WEBLib.Grids;\r\n\r\ntype\r\n TfrmUDF_Schedule = class(TfrmListForm_Base)\r\n WebBitBtn2: TBitBtn;\r\n// WebBitBtn2: TWebBitBtn;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure grdDynamicGridGetCellChildren(Sender: TObject; ACol,\r\n ARow: Integer; AField: TField; AValue: string;\r\n AElement: TJSHTMLElementRecord);\r\n procedure WebBitBtn2Click(Sender: TObject);\r\n private\r\n { Private declarations }\r\n public\r\n { Public declarations }\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmUDF_Schedule: TfrmUDF_Schedule;\r\n\r\nimplementation\r\n\r\n{$R *.dfm}\r\n\r\nuses common, datamodule, main;\r\n\r\nprocedure TfrmUDF_Schedule.grdDynamicGridGetCellChildren(Sender: TObject; ACol,\r\n ARow: Integer; AField: TField; AValue: string;\r\n AElement: TJSHTMLElementRecord);\r\nbegin\r\n inherited;\r\n // showmessage(inttostr((sender as TWebDBGrid).rows.selectedindex));\r\nif (ARow > 0 ) and assigned(AField) and (AField.FieldName = 'C7') and (Avalue = 'Cancelled')\r\nthen begin\r\n//showmessage(AField.Name);\r\n //if Avalue = 'Finished' then AElement.element.style.setProperty('background-color', '#9ACD32');//'#00B74A');\r\n //if Avalue = 'Scheduled' then AElement.element.style.setProperty('background-color', '#39C0ED');\r\n //if Avalue = 'Cancelled' then AElement.element.style.setProperty('background-color', '#D3D3D3');//'Gray');\r\n AElement.element.style.setProperty('background-color', 'red');\r\n end;\r\nend;\r\n\r\nprocedure TfrmUDF_Schedule.WebBitBtn2Click(Sender: TObject);\r\nvar containername_p: string;\r\nbegin\r\n inherited;\r\n EGV_CURRENTFORMNAME := dm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform()-1)];\r\n dm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform())] := 'UDF_CUSTOMFORM';\r\n EGV_CURRENTFORMNAME := dm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform())];\r\n // showmessage('1' + EGV_CURRENTFORMNAME);\r\n containername_p := getformcontainer().name;\r\n CallForm(containername_p);\r\nend;\r\n\r\nprocedure TfrmUDF_Schedule.WebFormShow(Sender: TObject);\r\nbegin\r\ninherited;\r\n{\r\ncase (getsubform() - 1) of\r\n1: egv_subform.Name := 'frmUDF_Schedule';\r\n2: egv_subform2.Name := 'frmUDF_Schedule';\r\n3: egv_subform3.Name := 'frmUDF_Schedule';\r\n4: egv_subform4.Name := 'frmUDF_Schedule';\r\n5: egv_subform5.Name := 'frmUDF_Schedule';\r\nend;\r\n\r\ngrdDynamicGrid.datasource := dm.dsDynamicGrid1;\r\nGetPostFormDesignData(getcurrentform.name, 'V', 0, sbSearch,1);\r\nGetPostFormDesignData(getcurrentform.name, 'P', 0, sbSearch,1);\r\nGetPostFormDesignData(getcurrentform.name, 'T', 0, sbSearch,1);\r\nStretchAllMemos(sbSearch);\r\nGrid_AdjustColumns(grdDynamicGrid, true);\r\nlbcaption.Caption := EGV_SUBFORMCAPTION;\r\n\r\nbtnGridRefresh.click; }\r\nend;\r\n\r\nprocedure TfrmUDF_Schedule.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n WebBitBtn2 := TBitBtn.Create(Self);\r\n\r\n WebLabel11.BeforeLoadDFMValues;\r\n WebLabel8.BeforeLoadDFMValues;\r\n pnlTop.BeforeLoadDFMValues;\r\n btnGridSetup.BeforeLoadDFMValues;\r\n pnlBottom.BeforeLoadDFMValues;\r\n pnlFormButtons.BeforeLoadDFMValues;\r\n btnCustom1.BeforeLoadDFMValues;\r\n btnCustom2.BeforeLoadDFMValues;\r\n btnCustom3.BeforeLoadDFMValues;\r\n btnCustom4.BeforeLoadDFMValues;\r\n btnCustom5.BeforeLoadDFMValues;\r\n btnSelect.BeforeLoadDFMValues;\r\n btnClose.BeforeLoadDFMValues;\r\n btnClear.BeforeLoadDFMValues;\r\n btnSave.BeforeLoadDFMValues;\r\n btnCustom6.BeforeLoadDFMValues;\r\n btnCustom7.BeforeLoadDFMValues;\r\n btnCustom8.BeforeLoadDFMValues;\r\n btnCustom9.BeforeLoadDFMValues;\r\n WebBitBtn2.BeforeLoadDFMValues;\r\n pnlReportButtons.BeforeLoadDFMValues;\r\n btnClose_RPT.BeforeLoadDFMValues;\r\n pnlMain.BeforeLoadDFMValues;\r\n pnlSearch.BeforeLoadDFMValues;\r\n sbSearch.BeforeLoadDFMValues;\r\n B6.BeforeLoadDFMValues;\r\n WebPanel2.BeforeLoadDFMValues;\r\n WebLabel1.BeforeLoadDFMValues;\r\n M6.BeforeLoadDFMValues;\r\n btnFltIcon6.BeforeLoadDFMValues;\r\n B5.BeforeLoadDFMValues;\r\n WebPanel4.BeforeLoadDFMValues;\r\n WebLabel2.BeforeLoadDFMValues;\r\n M5.BeforeLoadDFMValues;\r\n btnFltIcon5.BeforeLoadDFMValues;\r\n B4.BeforeLoadDFMValues;\r\n WebPanel6.BeforeLoadDFMValues;\r\n WebLabel3.BeforeLoadDFMValues;\r\n M4.BeforeLoadDFMValues;\r\n btnFltIcon4.BeforeLoadDFMValues;\r\n B3.BeforeLoadDFMValues;\r\n WebPanel8.BeforeLoadDFMValues;\r\n WebLabel4.BeforeLoadDFMValues;\r\n M3.BeforeLoadDFMValues;\r\n btnFltIcon3.BeforeLoadDFMValues;\r\n B2.BeforeLoadDFMValues;\r\n WebPanel10.BeforeLoadDFMValues;\r\n WebLabel5.BeforeLoadDFMValues;\r\n M2.BeforeLoadDFMValues;\r\n btnFltIcon2.BeforeLoadDFMValues;\r\n B1.BeforeLoadDFMValues;\r\n WebPanel12.BeforeLoadDFMValues;\r\n WebLabel6.BeforeLoadDFMValues;\r\n M1.BeforeLoadDFMValues;\r\n btnFltIcon1.BeforeLoadDFMValues;\r\n B7.BeforeLoadDFMValues;\r\n WebPanel70.BeforeLoadDFMValues;\r\n WebLabel36.BeforeLoadDFMValues;\r\n M7.BeforeLoadDFMValues;\r\n btnFltIcon7.BeforeLoadDFMValues;\r\n B8.BeforeLoadDFMValues;\r\n WebPanel3.BeforeLoadDFMValues;\r\n WebLabel12.BeforeLoadDFMValues;\r\n M8.BeforeLoadDFMValues;\r\n btnFltIcon8.BeforeLoadDFMValues;\r\n B9.BeforeLoadDFMValues;\r\n WebPanel7.BeforeLoadDFMValues;\r\n WebLabel13.BeforeLoadDFMValues;\r\n M9.BeforeLoadDFMValues;\r\n btnFltIcon9.BeforeLoadDFMValues;\r\n B10.BeforeLoadDFMValues;\r\n WebPanel11.BeforeLoadDFMValues;\r\n WebLabel14.BeforeLoadDFMValues;\r\n M10.BeforeLoadDFMValues;\r\n btnFltIcon10.BeforeLoadDFMValues;\r\n B11.BeforeLoadDFMValues;\r\n WebPanel9.BeforeLoadDFMValues;\r\n WebLabel7.BeforeLoadDFMValues;\r\n B12.BeforeLoadDFMValues;\r\n WebPanel14.BeforeLoadDFMValues;\r\n WebLabel9.BeforeLoadDFMValues;\r\n B13.BeforeLoadDFMValues;\r\n WebPanel16.BeforeLoadDFMValues;\r\n WebLabel15.BeforeLoadDFMValues;\r\n B14.BeforeLoadDFMValues;\r\n WebPanel18.BeforeLoadDFMValues;\r\n WebLabel16.BeforeLoadDFMValues;\r\n B15.BeforeLoadDFMValues;\r\n WebPanel20.BeforeLoadDFMValues;\r\n WebLabel17.BeforeLoadDFMValues;\r\n B16.BeforeLoadDFMValues;\r\n WebPanel22.BeforeLoadDFMValues;\r\n WebLabel18.BeforeLoadDFMValues;\r\n B17.BeforeLoadDFMValues;\r\n WebPanel24.BeforeLoadDFMValues;\r\n WebLabel19.BeforeLoadDFMValues;\r\n B18.BeforeLoadDFMValues;\r\n WebPanel26.BeforeLoadDFMValues;\r\n WebLabel20.BeforeLoadDFMValues;\r\n B19.BeforeLoadDFMValues;\r\n WebPanel28.BeforeLoadDFMValues;\r\n WebLabel21.BeforeLoadDFMValues;\r\n B20.BeforeLoadDFMValues;\r\n WebPanel30.BeforeLoadDFMValues;\r\n WebLabel22.BeforeLoadDFMValues;\r\n WebPanel1.BeforeLoadDFMValues;\r\n btnClearFilter.BeforeLoadDFMValues;\r\n btnApplyFilter.BeforeLoadDFMValues;\r\n grdDynamicGrid.BeforeLoadDFMValues;\r\n mdDialogDelete.BeforeLoadDFMValues;\r\n Memo.BeforeLoadDFMValues;\r\n pnlFormCaption.BeforeLoadDFMValues;\r\n wmWaitMessage.BeforeLoadDFMValues;\r\n try\r\n Width := 1415;\r\n WebLabel11.Width := 1415;\r\n WebLabel8.Width := 1415;\r\n pnlTop.Width := 1405;\r\n btnGridSetup.Left := 1373;\r\n pnlBottom.Width := 1415;\r\n pnlFormButtons.Left := 235;\r\n pnlFormButtons.Width := 1180;\r\n btnCustom1.Left := 770;\r\n btnCustom2.Left := 720;\r\n btnCustom3.Left := 420;\r\n btnCustom4.Left := 370;\r\n btnCustom5.Left := 570;\r\n btnSelect.Left := 910;\r\n btnClose.Left := 1090;\r\n btnClear.Left := 820;\r\n btnSave.Left := 1000;\r\n btnCustom6.Left := 470;\r\n btnCustom7.Left := 520;\r\n btnCustom8.Left := 620;\r\n btnCustom9.Left := 670;\r\n WebBitBtn2.SetParentComponent(pnlFormButtons);\r\n WebBitBtn2.Name := 'WebBitBtn2';\r\n WebBitBtn2.Left := 270;\r\n WebBitBtn2.Top := 0;\r\n WebBitBtn2.Width := 100;\r\n WebBitBtn2.Height := 41;\r\n WebBitBtn2.Align := alRight;\r\n WebBitBtn2.Caption := 'Custom';\r\n WebBitBtn2.Color := clNone;\r\n WebBitBtn2.ElementClassName := 'btn btn-outline-info text-wrap';\r\n WebBitBtn2.Font.Charset := DEFAULT_CHARSET;\r\n WebBitBtn2.Font.Color := clGray;\r\n WebBitBtn2.Font.Height := -16;\r\n WebBitBtn2.Font.Name := 'Tahoma';\r\n WebBitBtn2.Font.Style := [];\r\n WebBitBtn2.HeightPercent := 100.000000000000000000;\r\n WebBitBtn2.ParentFont := False;\r\n WebBitBtn2.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebBitBtn2, Self, 'OnClick', 'WebBitBtn2Click');\r\n pnlReportButtons.Width := 140;\r\n btnClose_RPT.Left := 50;\r\n pnlMain.Width := 1412;\r\n pnlSearch.Width := 1402;\r\n pnlSearch.Height := 783;\r\n sbSearch.Width := 1308;\r\n sbSearch.Height := 783;\r\n B6.Height := 783;\r\n WebLabel1.Height := 28;\r\n M6.Height := 755;\r\n btnFltIcon6.Height := 755;\r\n B5.Height := 783;\r\n WebLabel2.Height := 28;\r\n M5.Height := 755;\r\n btnFltIcon5.Height := 755;\r\n B4.Height := 783;\r\n WebLabel3.Height := 28;\r\n M4.Height := 755;\r\n btnFltIcon4.Height := 755;\r\n B3.Height := 783;\r\n WebLabel4.Height := 28;\r\n M3.Height := 755;\r\n btnFltIcon3.Height := 755;\r\n B2.Height := 783;\r\n WebLabel5.Height := 28;\r\n M2.Height := 755;\r\n btnFltIcon2.Height := 755;\r\n B1.Height := 783;\r\n WebLabel6.Height := 28;\r\n M1.Height := 755;\r\n btnFltIcon1.Height := 755;\r\n B7.Height := 783;\r\n WebLabel36.Height := 28;\r\n M7.Height := 755;\r\n btnFltIcon7.Height := 755;\r\n B8.Height := 783;\r\n WebLabel12.Height := 28;\r\n M8.Height := 755;\r\n btnFltIcon8.Height := 755;\r\n B9.Height := 783;\r\n WebLabel13.Height := 28;\r\n M9.Height := 755;\r\n btnFltIcon9.Height := 755;\r\n B10.Height := 783;\r\n WebLabel14.Height := 28;\r\n M10.Height := 755;\r\n btnFltIcon10.Height := 755;\r\n WebLabel7.Height := 28;\r\n WebLabel9.Height := 28;\r\n WebLabel15.Height := 28;\r\n WebLabel16.Height := 28;\r\n WebLabel17.Height := 28;\r\n WebLabel18.Height := 28;\r\n WebLabel19.Height := 28;\r\n WebLabel20.Height := 28;\r\n WebLabel21.Height := 28;\r\n WebLabel22.Height := 28;\r\n WebPanel1.Left := 1308;\r\n WebPanel1.Height := 783;\r\n btnClearFilter.Left := 1342;\r\n btnClearFilter.Height := 783;\r\n btnApplyFilter.Left := 1377;\r\n btnApplyFilter.Height := 783;\r\n grdDynamicGrid.Top := 783;\r\n grdDynamicGrid.Width := 1402;\r\n grdDynamicGrid.Height := 17;\r\n grdDynamicGrid.Columns.Clear;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := 'C1';\r\n Title := 'C1';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := 'C2';\r\n Title := 'C2';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := 'C3';\r\n Title := 'C3';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := 'C4';\r\n Title := 'C4';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := 'C5';\r\n Title := 'C5';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := 'C6';\r\n Title := 'C6';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := 'C7';\r\n Title := 'C7';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := 'C8';\r\n Title := 'C8';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := 'C9';\r\n Title := 'C9';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := 'C11';\r\n Title := 'C11';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := 'C10';\r\n Title := 'C10';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := 'C12';\r\n Title := 'C12';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := 'C15';\r\n Title := 'C15';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := 'C13';\r\n Title := 'C13';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := 'C16';\r\n Title := 'C16';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := 'C17';\r\n Title := 'C17';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := 'C18';\r\n Title := 'C18';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := 'C19';\r\n Title := 'C19';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := 'C20';\r\n Title := 'C20';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := '_CURRENT_NURSE2';\r\n Title := '_CURRENT_NURSE2';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := '_CURRENT_NURSE1';\r\n Title := '_CURRENT_NURSE1';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := '_CURRENT_PROVIDER';\r\n Title := '_CURRENT_PROVIDER';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := '_CURRENT_PROCEDURENUMBER';\r\n Title := '_CURRENT_PROCEDURENUMBER';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := '_CURRENT_MRN';\r\n Title := '_CURRENT_MRN';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := '_CURRENT_APPTNAME';\r\n Title := '_CURRENT_APPTNAME';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := '_CURRENT_MEDID';\r\n Title := '_CURRENT_MEDID';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := '_CURRENT_PROBLEMID';\r\n Title := '_CURRENT_PROBLEMID';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := '_CURRENT_ALLERGYID';\r\n Title := '_CURRENT_ALLERGYID';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := '_CURRENT_REFPHYCODE';\r\n Title := '_CURRENT_REFPHYCODE';\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n DataField := 'NEW_RECORD';\r\n Title := 'NEW_RECORD';\r\n end;\r\n SetEvent(grdDynamicGrid, Self, 'OnGetCellChildren', 'grdDynamicGridGetCellChildren');\r\n grdDynamicGrid.ColWidths[0] := 64;\r\n grdDynamicGrid.ColWidths[1] := 64;\r\n grdDynamicGrid.ColWidths[2] := 64;\r\n grdDynamicGrid.ColWidths[3] := 64;\r\n grdDynamicGrid.ColWidths[4] := 64;\r\n grdDynamicGrid.ColWidths[5] := 64;\r\n grdDynamicGrid.ColWidths[6] := 64;\r\n grdDynamicGrid.ColWidths[7] := 64;\r\n grdDynamicGrid.ColWidths[8] := 64;\r\n grdDynamicGrid.ColWidths[9] := 64;\r\n grdDynamicGrid.ColWidths[10] := 64;\r\n grdDynamicGrid.ColWidths[11] := 64;\r\n grdDynamicGrid.ColWidths[12] := 64;\r\n grdDynamicGrid.ColWidths[13] := 64;\r\n grdDynamicGrid.ColWidths[14] := 64;\r\n grdDynamicGrid.ColWidths[15] := 64;\r\n grdDynamicGrid.ColWidths[16] := 64;\r\n grdDynamicGrid.ColWidths[17] := 64;\r\n grdDynamicGrid.ColWidths[18] := 64;\r\n grdDynamicGrid.ColWidths[19] := 64;\r\n grdDynamicGrid.ColWidths[20] := 64;\r\n grdDynamicGrid.ColWidths[21] := 64;\r\n grdDynamicGrid.ColWidths[22] := 64;\r\n grdDynamicGrid.ColWidths[23] := 64;\r\n grdDynamicGrid.ColWidths[24] := 64;\r\n grdDynamicGrid.ColWidths[25] := 64;\r\n grdDynamicGrid.ColWidths[26] := 64;\r\n grdDynamicGrid.ColWidths[27] := 64;\r\n grdDynamicGrid.ColWidths[28] := 64;\r\n grdDynamicGrid.ColWidths[29] := 64;\r\n mdDialogDelete.Left := 578;\r\n mdDialogDelete.Top := 11;\r\n mdDialogDelete.CustomButtons.Clear;\r\n with mdDialogDelete.CustomButtons.Add do\r\n begin\r\n end;\r\n Memo.Width := 1415;\r\n pnlFormCaption.Width := 1415;\r\n wmWaitMessage.Picture.LoadFromFile('UDF_Schedule.wmWaitMessage.Picture.gif');\r\n finally\r\n WebLabel11.AfterLoadDFMValues;\r\n WebLabel8.AfterLoadDFMValues;\r\n pnlTop.AfterLoadDFMValues;\r\n btnGridSetup.AfterLoadDFMValues;\r\n pnlBottom.AfterLoadDFMValues;\r\n pnlFormButtons.AfterLoadDFMValues;\r\n btnCustom1.AfterLoadDFMValues;\r\n btnCustom2.AfterLoadDFMValues;\r\n btnCustom3.AfterLoadDFMValues;\r\n btnCustom4.AfterLoadDFMValues;\r\n btnCustom5.AfterLoadDFMValues;\r\n btnSelect.AfterLoadDFMValues;\r\n btnClose.AfterLoadDFMValues;\r\n btnClear.AfterLoadDFMValues;\r\n btnSave.AfterLoadDFMValues;\r\n btnCustom6.AfterLoadDFMValues;\r\n btnCustom7.AfterLoadDFMValues;\r\n btnCustom8.AfterLoadDFMValues;\r\n btnCustom9.AfterLoadDFMValues;\r\n WebBitBtn2.AfterLoadDFMValues;\r\n pnlReportButtons.AfterLoadDFMValues;\r\n btnClose_RPT.AfterLoadDFMValues;\r\n pnlMain.AfterLoadDFMValues;\r\n pnlSearch.AfterLoadDFMValues;\r\n sbSearch.AfterLoadDFMValues;\r\n B6.AfterLoadDFMValues;\r\n WebPanel2.AfterLoadDFMValues;\r\n WebLabel1.AfterLoadDFMValues;\r\n M6.AfterLoadDFMValues;\r\n btnFltIcon6.AfterLoadDFMValues;\r\n B5.AfterLoadDFMValues;\r\n WebPanel4.AfterLoadDFMValues;\r\n WebLabel2.AfterLoadDFMValues;\r\n M5.AfterLoadDFMValues;\r\n btnFltIcon5.AfterLoadDFMValues;\r\n B4.AfterLoadDFMValues;\r\n WebPanel6.AfterLoadDFMValues;\r\n WebLabel3.AfterLoadDFMValues;\r\n M4.AfterLoadDFMValues;\r\n btnFltIcon4.AfterLoadDFMValues;\r\n B3.AfterLoadDFMValues;\r\n WebPanel8.AfterLoadDFMValues;\r\n WebLabel4.AfterLoadDFMValues;\r\n M3.AfterLoadDFMValues;\r\n btnFltIcon3.AfterLoadDFMValues;\r\n B2.AfterLoadDFMValues;\r\n WebPanel10.AfterLoadDFMValues;\r\n WebLabel5.AfterLoadDFMValues;\r\n M2.AfterLoadDFMValues;\r\n btnFltIcon2.AfterLoadDFMValues;\r\n B1.AfterLoadDFMValues;\r\n WebPanel12.AfterLoadDFMValues;\r\n WebLabel6.AfterLoadDFMValues;\r\n M1.AfterLoadDFMValues;\r\n btnFltIcon1.AfterLoadDFMValues;\r\n B7.AfterLoadDFMValues;\r\n WebPanel70.AfterLoadDFMValues;\r\n WebLabel36.AfterLoadDFMValues;\r\n M7.AfterLoadDFMValues;\r\n btnFltIcon7.AfterLoadDFMValues;\r\n B8.AfterLoadDFMValues;\r\n WebPanel3.AfterLoadDFMValues;\r\n WebLabel12.AfterLoadDFMValues;\r\n M8.AfterLoadDFMValues;\r\n btnFltIcon8.AfterLoadDFMValues;\r\n B9.AfterLoadDFMValues;\r\n WebPanel7.AfterLoadDFMValues;\r\n WebLabel13.AfterLoadDFMValues;\r\n M9.AfterLoadDFMValues;\r\n btnFltIcon9.AfterLoadDFMValues;\r\n B10.AfterLoadDFMValues;\r\n WebPanel11.AfterLoadDFMValues;\r\n WebLabel14.AfterLoadDFMValues;\r\n M10.AfterLoadDFMValues;\r\n btnFltIcon10.AfterLoadDFMValues;\r\n B11.AfterLoadDFMValues;\r\n WebPanel9.AfterLoadDFMValues;\r\n WebLabel7.AfterLoadDFMValues;\r\n B12.AfterLoadDFMValues;\r\n WebPanel14.AfterLoadDFMValues;\r\n WebLabel9.AfterLoadDFMValues;\r\n B13.AfterLoadDFMValues;\r\n WebPanel16.AfterLoadDFMValues;\r\n WebLabel15.AfterLoadDFMValues;\r\n B14.AfterLoadDFMValues;\r\n WebPanel18.AfterLoadDFMValues;\r\n WebLabel16.AfterLoadDFMValues;\r\n B15.AfterLoadDFMValues;\r\n WebPanel20.AfterLoadDFMValues;\r\n WebLabel17.AfterLoadDFMValues;\r\n B16.AfterLoadDFMValues;\r\n WebPanel22.AfterLoadDFMValues;\r\n WebLabel18.AfterLoadDFMValues;\r\n B17.AfterLoadDFMValues;\r\n WebPanel24.AfterLoadDFMValues;\r\n WebLabel19.AfterLoadDFMValues;\r\n B18.AfterLoadDFMValues;\r\n WebPanel26.AfterLoadDFMValues;\r\n WebLabel20.AfterLoadDFMValues;\r\n B19.AfterLoadDFMValues;\r\n WebPanel28.AfterLoadDFMValues;\r\n WebLabel21.AfterLoadDFMValues;\r\n B20.AfterLoadDFMValues;\r\n WebPanel30.AfterLoadDFMValues;\r\n WebLabel22.AfterLoadDFMValues;\r\n WebPanel1.AfterLoadDFMValues;\r\n btnClearFilter.AfterLoadDFMValues;\r\n btnApplyFilter.AfterLoadDFMValues;\r\n grdDynamicGrid.AfterLoadDFMValues;\r\n mdDialogDelete.AfterLoadDFMValues;\r\n Memo.AfterLoadDFMValues;\r\n pnlFormCaption.AfterLoadDFMValues;\r\n wmWaitMessage.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n\r\n\r\n\r\n\r\n\r\n\r\n","unit ReportForm;\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.WebCtrls, Vcl.Controls, XData.Web.Client,\r\n XData.Web.JsonDataset, XData.Web.Dataset, WEBLib.Buttons, WEBLib.ExtCtrls,\r\n Vcl.Imaging.GIFImg;\r\n\r\ntype\r\n TfrmReportForm = class(TForm)\r\n viewpdf: TBrowserControl;\r\n WebPanel9: TPanel;\r\n btnClose: TBitBtn;\r\n btnRefreshreport: TBitBtn;\r\n wmWaitMessage: TWaitMessage;\r\n procedure WebFormShow(Sender: TObject);\r\n// procedure RunReport(TemplateType: string=''; TemplateID: integer = 1; Stretch_p: Boolean=true);\r\n procedure btnCloseClick(Sender: TObject);\r\n procedure WebFormClose(Sender: TObject; var Action: TCloseAction);\r\n procedure btnRefreshreportClick(Sender: TObject);\r\n\r\n private\r\n { Private declarations }\r\n public\r\n { Public declarations }\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmReportForm: TfrmReportForm;\r\n\r\nimplementation\r\n\r\n{$R *.dfm}\r\n\r\nuses Common, DataModule, Main;\r\n\r\nprocedure TfrmReportForm.WebFormClose(Sender: TObject;\r\n var Action: TCloseAction);\r\nbegin\r\nHideFormContainer(true);\r\nend;\r\n\r\nprocedure TfrmReportForm.WebFormShow(Sender: TObject);\r\nbegin\r\n\r\n{EGV_CURRENTFORMNAME := dm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform()-1)];\r\ncase (getsubform() - 1) of\r\n 1: egv_subform.Name := stringreplace(stringreplace(EGV_CURRENTFORMNAME, ' ', '_', [rfReplaceAll]), '(', '_', [rfReplaceAll]) ; //template name can contain spaces.\r\n 2: egv_subform2.Name := stringreplace(stringreplace(EGV_CURRENTFORMNAME, ' ', '_', [rfReplaceAll]), '(', '_', [rfReplaceAll]);\r\n 3: egv_subform3.Name := stringreplace(stringreplace(EGV_CURRENTFORMNAME, ' ', '_', [rfReplaceAll]), '(', '_', [rfReplaceAll]);\r\n 4: egv_subform4.Name := stringreplace(stringreplace(EGV_CURRENTFORMNAME, ' ', '_', [rfReplaceAll]), '(', '_', [rfReplaceAll]);\r\n 5: egv_subform5.Name := stringreplace(stringreplace(EGV_CURRENTFORMNAME, ' ', '_', [rfReplaceAll]), '(', '_', [rfReplaceAll]);\r\n 6: egv_subform6.Name := stringreplace(stringreplace(EGV_CURRENTFORMNAME, ' ', '_', [rfReplaceAll]), '(', '_', [rfReplaceAll]);\r\n 7: egv_subform7.Name := stringreplace(stringreplace(EGV_CURRENTFORMNAME, ' ', '_', [rfReplaceAll]), '(', '_', [rfReplaceAll]);\r\n 8: egv_subform8.Name := stringreplace(stringreplace(EGV_CURRENTFORMNAME, ' ', '_', [rfReplaceAll]), ' ', '_', [rfReplaceAll]);\r\n 9: egv_subform9.Name := stringreplace(stringreplace(EGV_CURRENTFORMNAME, ' ', '_', [rfReplaceAll]), ' ', '_', [rfReplaceAll]);\r\nend; }\r\n//showmessage(EGV_CURRENTFORMNAME);\r\n\r\nviewpdf.url := '';\r\n//showmessage(EGV_REPORTTEMPLATENAME);\r\nRunreport(Viewpdf, EGV_REPORTTEMPLATENAME);\r\nend;\r\n\r\nprocedure TfrmReportForm.btnRefreshreportClick(Sender: TObject);\r\nbegin\r\nRunreport(Viewpdf, EGV_REPORTTEMPLATENAME);\r\nend;\r\n\r\nprocedure TfrmReportForm.btnCloseClick(Sender: TObject);\r\nbegin\r\nself.Close;\r\nend;\r\n\r\n{procedure TfrmReportForm.RunReport(TemplateType: string=''; TemplateID: integer = 1; Stretch_p: Boolean=true);\r\n\r\nprocedure OnResult(Response: TXDataClientResponse);\r\nvar\r\n Response_p: string;\r\nbegin\r\ntry\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n\r\n// Showmessage(Response_p);\r\n if Response_p = '1' then exit; // wait / repeat;\r\n\r\nif Stretch_p\r\nthen\r\nviewpdf.URL := EGV_REPORTSURL + '/' + Templatetype +'_' +\r\n EGV_CURRENT_PROCEDURENUMBER + '_' +\r\n EGV_FACILITYID + '_' +\r\n inttostr(templateid) + '_' +\r\n '1' + '.pdf' + '#view=FitH'\r\nelse\r\nviewpdf.URL := EGV_REPORTSURL + '/' + Templatetype +'_' +\r\n EGV_CURRENT_PROCEDURENUMBER + '_' +\r\n EGV_FACILITYID + '_' +\r\n inttostr(templateid) + '_' +\r\n '1' + '.pdf';\r\n\r\n\r\n\r\n\r\nfinally showmessage('1');\r\n wmWaitMessage.hide;\r\nend;\r\nend;\r\n\r\nbegin\r\n//CloseOpenedForm();\r\nwebwaitmessage.Show;\r\ndm.XDataWebClient1.RawInvoke('IReportService.BuildReport', [EGV_CURRENT_PROCEDURENUMBER,\r\n EGV_CURRENT_MRN,\r\n EGV_FACILITYID, // dm.xdsScheduleP_PIDFACILITYID.AsString, // Facility ID\r\n EGV_FACILITY,\r\n inttostr(templateid), //Template ID 1 - first template\r\n '1', // Language ID\r\n TemplateType, // Template TYPE\r\n formatdatetime('YYYY.MM.DD', date), // date range;\r\n formatdatetime('YYYY.MM.DD', date)],\r\n\r\n @OnResult);\r\n\r\n // '\\\\vulcan\\tshome\\paruir\\APPS\\ENRWEB\\TMSWeb\\Release\\'\r\nend; }\r\n\r\nprocedure TfrmReportForm.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n viewpdf := TBrowserControl.Create(Self);\r\n WebPanel9 := TPanel.Create(Self);\r\n btnClose := TBitBtn.Create(Self);\r\n btnRefreshreport := TBitBtn.Create(Self);\r\n wmWaitMessage := TWaitMessage.Create(Self);\r\n\r\n viewpdf.BeforeLoadDFMValues;\r\n WebPanel9.BeforeLoadDFMValues;\r\n btnClose.BeforeLoadDFMValues;\r\n btnRefreshreport.BeforeLoadDFMValues;\r\n wmWaitMessage.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmReportForm';\r\n Width := 750;\r\n Height := 561;\r\n SetEvent(Self, 'OnClose', 'WebFormClose');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n viewpdf.SetParentComponent(Self);\r\n viewpdf.Name := 'viewpdf';\r\n viewpdf.Left := 0;\r\n viewpdf.Top := 0;\r\n viewpdf.Width := 750;\r\n viewpdf.Height := 520;\r\n viewpdf.Align := alClient;\r\n viewpdf.ChildOrder := 18;\r\n viewpdf.Sandbox := [];\r\n WebPanel9.SetParentComponent(Self);\r\n WebPanel9.Name := 'WebPanel9';\r\n WebPanel9.Left := 0;\r\n WebPanel9.Top := 520;\r\n WebPanel9.Width := 750;\r\n WebPanel9.Height := 41;\r\n WebPanel9.Align := alBottom;\r\n WebPanel9.BorderStyle := bsNone;\r\n WebPanel9.ChildOrder := 5;\r\n WebPanel9.Color := clWhite;\r\n WebPanel9.TabOrder := 1;\r\n btnClose.SetParentComponent(WebPanel9);\r\n btnClose.Name := 'btnClose';\r\n btnClose.Left := 660;\r\n btnClose.Top := 0;\r\n btnClose.Width := 90;\r\n btnClose.Height := 41;\r\n btnClose.Cursor := crHandPoint;\r\n btnClose.Hint := 'Ok';\r\n btnClose.Align := alRight;\r\n btnClose.Caption := 'Close';\r\n btnClose.Color := clNone;\r\n btnClose.ElementClassName := 'btn btn-outline-secondary text-wrap';\r\n btnClose.Font.Charset := DEFAULT_CHARSET;\r\n btnClose.Font.Color := clGray;\r\n btnClose.Font.Height := -13;\r\n btnClose.Font.Name := 'Tahoma';\r\n btnClose.Font.Style := [];\r\n btnClose.HeightPercent := 100.000000000000000000;\r\n btnClose.MaterialGlyph := 'save';\r\n btnClose.MaterialGlyphSize := 1;\r\n btnClose.ParentFont := False;\r\n btnClose.ShowHint := True;\r\n btnClose.TabOrder := 11;\r\n btnClose.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnClose, Self, 'OnClick', 'btnCloseClick');\r\n btnRefreshreport.SetParentComponent(WebPanel9);\r\n btnRefreshreport.Name := 'btnRefreshreport';\r\n btnRefreshreport.Left := 570;\r\n btnRefreshreport.Top := 0;\r\n btnRefreshreport.Width := 90;\r\n btnRefreshreport.Height := 41;\r\n btnRefreshreport.Cursor := crHandPoint;\r\n btnRefreshreport.Hint := 'Refresh from DB';\r\n btnRefreshreport.Align := alRight;\r\n btnRefreshreport.Caption := 'Refresh';\r\n btnRefreshreport.ChildOrder := 86;\r\n btnRefreshreport.Color := clNone;\r\n btnRefreshreport.ElementClassName := 'btn btn-outline-primary';\r\n btnRefreshreport.Font.Charset := DEFAULT_CHARSET;\r\n btnRefreshreport.Font.Color := clGray;\r\n btnRefreshreport.Font.Height := -13;\r\n btnRefreshreport.Font.Name := 'Tahoma';\r\n btnRefreshreport.Font.Style := [];\r\n btnRefreshreport.HeightPercent := 100.000000000000000000;\r\n btnRefreshreport.MaterialGlyph := 'cancel';\r\n btnRefreshreport.MaterialGlyphSize := 1;\r\n btnRefreshreport.ParentFont := False;\r\n btnRefreshreport.ShowHint := True;\r\n btnRefreshreport.TabOrder := 7;\r\n btnRefreshreport.WidthPercent := 9.000000000000000000;\r\n SetEvent(btnRefreshreport, Self, 'OnClick', 'btnRefreshreportClick');\r\n wmWaitMessage.SetParentComponent(Self);\r\n wmWaitMessage.Name := 'wmWaitMessage';\r\n wmWaitMessage.Left := 638;\r\n wmWaitMessage.Top := 34;\r\n wmWaitMessage.Width := 24;\r\n wmWaitMessage.Height := 24;\r\n wmWaitMessage.Opacity := 0.100000000000000000;\r\n wmWaitMessage.Picture.LoadFromFile('ReportForm.wmWaitMessage.Picture.gif');\r\n finally\r\n viewpdf.AfterLoadDFMValues;\r\n WebPanel9.AfterLoadDFMValues;\r\n btnClose.AfterLoadDFMValues;\r\n btnRefreshreport.AfterLoadDFMValues;\r\n wmWaitMessage.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit MultiLevelPickForm;\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, WEBLib.ExtCtrls,\r\n Vcl.StdCtrls, WEBLib.StdCtrls, VCL.TMSFNCTypes, VCL.TMSFNCUtils,\r\n VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes, VCL.TMSFNCCustomControl,\r\n VCL.TMSFNCListBox, VCL.TMSFNCCheckedListBox;\r\n\r\ntype\r\n TfrmMultiLevelPickForm = class(TForm)\r\n WebLabel15: TLabel;\r\n WebLabel1: TLabel;\r\n SubForm_DIV: TScrollBox;\r\n Memo: TMemo;\r\n pnlFormButtons: TPanel;\r\n btnClose: TBitBtn;\r\n btnSave: TBitBtn;\r\n btnAdd: TBitBtn;\r\n WebBitBtn1: TBitBtn;\r\n lbList1: TTMSFNCCheckedListBox;\r\n lbList2: TTMSFNCCheckedListBox;\r\n lbList3: TTMSFNCCheckedListBox;\r\n pnlMenuRigt: TPanel;\r\n WebPanel1: TPanel;\r\n btnClearSelections: TSpeedButton;\r\n WebSpeedButton3: TSpeedButton;\r\n WebSpeedButton4: TSpeedButton;\r\n WebSpeedButton5: TSpeedButton;\r\n pnlFormCaption: TPanel;\r\n procedure btnCloseClick(Sender: TObject);\r\n procedure WebFormClose(Sender: TObject; var Action: TCloseAction);\r\n procedure WebFormResize(Sender: TObject);\r\n procedure WebFormShow(Sender: TObject);\r\n procedure lbList1ItemClick(Sender: TObject; AItem: TTMSFNCListBoxItem);\r\n procedure lbList2ItemClick(Sender: TObject; AItem: TTMSFNCListBoxItem);\r\n procedure WebSpeedButton1Click(Sender: TObject);\r\n procedure WebSpeedButton2Click(Sender: TObject);\r\n procedure btnEditGroupsClick(Sender: TObject);\r\n procedure lbList3ItemClick(Sender: TObject; AItem: TTMSFNCListBoxItem);\r\n procedure btnClearSelectionsClick(Sender: TObject);\r\n procedure WebBitBtn1Click(Sender: TObject);\r\n procedure btnSaveClick(Sender: TObject);\r\n procedure btnAddClick(Sender: TObject);\r\n private\r\n { Private declarations }\r\n P_StartSectionName: string;\r\n public\r\n { Public declarations }\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmMultiLevelPickForm: TfrmMultiLevelPickForm;\r\n\r\nimplementation\r\n\r\n{$R *.dfm}\r\n\r\nuses Common, DataModule, Picklist, Main;\r\n\r\nprocedure TfrmMultiLevelPickForm.btnAddClick(Sender: TObject);\r\nvar i: integer; s1,s2,s3: string;\r\nbegin\r\ns1 := '';\r\nfor i := 0 to lbList1.items.count - 1\r\ndo begin\r\n if lbList1.items[i].checked or (lbList1.itemindex = i)\r\n then if s1 = '' then s1 := lbList1.items[i].text\r\n else s1 := s1 + ', ' + lbList1.items[i].text;\r\n end;\r\n\r\ns2 := '';\r\nfor i := 0 to lbList2.items.count - 1\r\ndo begin\r\n if lbList2.items[i].checked or (lbList2.itemindex = i)\r\n then if s2 = '' then s2 := lbList2.items[i].text\r\n else s2 := s2 + ', ' + lbList2.items[i].text;\r\n end;\r\n\r\ns3 := '';\r\nfor i := 0 to lbList3.items.count - 1\r\ndo begin\r\n if lbList3.items[i].checked or (lbList3.itemindex = i)\r\n then if s3 = '' then s3 := lbList3.items[i].text\r\n else s3 := s3 + ', ' + lbList3.items[i].text;\r\n end;\r\n\r\n\r\nif s1 <> ''\r\nthen if s2 <> ''\r\n then begin\r\n memo.lines.add(s1 + ': ');\r\n if s3 <> ''\r\n then memo.text := memo.Text + s2 + ' - ' + s3 //memo.lines.add(s2 + '- ' + s3)\r\n else memo.text := memo.Text + s2 + '. ';\r\n end\r\n else begin\r\n memo.lines.add(s1 + '. ');\r\n end;\r\n\r\nbtnClearSelectionsclick(nil);\r\nend;\r\n\r\nprocedure TfrmMultiLevelPickForm.btnCloseClick(Sender: TObject);\r\nbegin\r\nself.Close;\r\nend;\r\n\r\nprocedure TfrmMultiLevelPickForm.btnEditGroupsClick(Sender: TObject);\r\nvar containername_p: string;\r\nbegin\r\n{if EGV_QPKLSOURCETYPE = '0'\r\nthen begin }\r\n EGV_SECTIONNAME := P_StartSectionName;\r\n EGV_PKLMODE := 1;\r\n EGV_PKLEDITMODE := TRUE;\r\n containername_p := getformcontainer().name; // showmessage(containername_p);\r\n if containername_p = 'FormContainer1' then Application.CreateForm(TfrmPickList, frmmain.formcontainer1.ElementID, egv_subform);\r\n if containername_p = 'FormContainer2' then Application.CreateForm(TfrmPickList, frmmain.formcontainer2.ElementID, egv_subform2);\r\n if containername_p = 'FormContainer3' then Application.CreateForm(TfrmPickList, frmmain.formcontainer3.ElementID, egv_subform3);\r\n if containername_p = 'FormContainer4' then Application.CreateForm(TfrmPickList, frmmain.formcontainer4.ElementID, egv_subform4);\r\n if containername_p = 'FormContainer5' then Application.CreateForm(TfrmPickList, frmmain.formcontainer5.ElementID, egv_subform5);\r\n if containername_p = 'FormContainer6' then Application.CreateForm(TfrmPickList, frmmain.formcontainer6.ElementID, egv_subform6);\r\n if containername_p = 'FormContainer7' then Application.CreateForm(TfrmPickList, frmmain.formcontainer7.ElementID, egv_subform7);\r\n if containername_p = 'FormContainer8' then Application.CreateForm(TfrmPickList, frmmain.formcontainer8.ElementID, egv_subform8);\r\n if containername_p = 'FormContainer9' then Application.CreateForm(TfrmPickList, frmmain.formcontainer9.ElementID, egv_subform9);\r\n{ end\r\nelse begin\r\n Showmessage('Check Data Block picklist settings');\r\n end; }\r\nend;\r\n\r\nprocedure TfrmMultiLevelPickForm.btnSaveClick(Sender: TObject);\r\nbegin\r\nEGV_PKLTARGETMEMO.text := memo.text;\r\nEGV_PKLTARGETMEMO.tag := 1; // updated. to post.\r\nStretchmemo(EGV_PKLTARGETMEMO);\r\nself.close;\r\nend;\r\n\r\nprocedure TfrmMultiLevelPickForm.lbList1ItemClick(Sender: TObject;\r\n AItem: TTMSFNCListBoxItem);\r\nbegin\r\n//AItem.checked := (not AItem.checked);\r\nEGV_SECTIONNAME := AItem.Text;\r\nQPKL_LoadFromDataset(dm.xdsQPKL_DynamicData, 'Original.ITEM', lbList2,'0', false);\r\nlbList3.BeginUpdate;\r\nlbList3.items.clear;\r\nlbList3.EndUpdate;\r\nend;\r\n\r\nprocedure TfrmMultiLevelPickForm.lbList2ItemClick(Sender: TObject;\r\n AItem: TTMSFNCListBoxItem);\r\nbegin\r\n//AItem.checked := (not AItem.checked);\r\nEGV_SECTIONNAME := AItem.Text;\r\nlbList3.Items.Clear;\r\nQPKL_LoadFromDataset(dm.xdsQPKL_DynamicData, 'Original.ITEM', lbList3,'0', false);\r\nend;\r\n\r\nprocedure TfrmMultiLevelPickForm.lbList3ItemClick(Sender: TObject;\r\n AItem: TTMSFNCListBoxItem);\r\nbegin\r\nAItem.checked := (not AItem.checked);\r\nend;\r\n\r\nprocedure TfrmMultiLevelPickForm.WebBitBtn1Click(Sender: TObject);\r\nbegin\r\nmemo.clear;\r\nend;\r\n\r\nprocedure TfrmMultiLevelPickForm.WebFormClose(Sender: TObject;\r\n var Action: TCloseAction);\r\nbegin\r\nRefreshGridDatasources(getpreviousform);\r\nHideFormContainer(true);\r\negv_pkltargetmemo := nil;\r\negv_pkltargetmemoname := '';\r\negv_pkltargetmemoblock := nil;\r\nend;\r\n\r\nprocedure TfrmMultiLevelPickForm.WebFormResize(Sender: TObject);\r\nbegin\r\nlbList1.width := self.width div 3;\r\nlblist2.width := lbList1.width;\r\nend;\r\n\r\nprocedure TfrmMultiLevelPickForm.WebFormShow(Sender: TObject);\r\nbegin\r\n\r\npnlFormCaption.caption := EGV_CHILD_FORM_CAPTION;\r\ndm.xdsQPKL_DynamicData.Close;\r\nP_StartSectionName := EGV_SECTIONNAME;\r\nQPKL_LoadFromDataset(dm.xdsQPKL_DynamicData, 'Original.ITEM', lbList1,'', false);\r\n//showmessage('target mem: ' + EGV_PKLTARGETMEMO.Text);\r\nmemo.text := EGV_PKLTARGETMEMO.text;\r\n\r\nResizeButtons(pnlFormButtons);\r\nend;\r\n\r\nprocedure TfrmMultiLevelPickForm.WebSpeedButton1Click(Sender: TObject);\r\nvar containername_p: string;\r\nbegin\r\nEGV_SECTIONNAME := lbList1.items[lbList1.itemindex].text;\r\nEGV_PKLMODE := 1;\r\nEGV_PKLEDITMODE := TRUE;\r\ncontainername_p := getformcontainer().name; // showmessage(containername_p);\r\nif containername_p = 'FormContainer1' then Application.CreateForm(TfrmPickList, frmmain.formcontainer1.ElementID, egv_subform);\r\nif containername_p = 'FormContainer2' then Application.CreateForm(TfrmPickList, frmmain.formcontainer2.ElementID, egv_subform2);\r\nif containername_p = 'FormContainer3' then Application.CreateForm(TfrmPickList, frmmain.formcontainer3.ElementID, egv_subform3);\r\nif containername_p = 'FormContainer4' then Application.CreateForm(TfrmPickList, frmmain.formcontainer4.ElementID, egv_subform4);\r\nif containername_p = 'FormContainer5' then Application.CreateForm(TfrmPickList, frmmain.formcontainer5.ElementID, egv_subform5);\r\nif containername_p = 'FormContainer6' then Application.CreateForm(TfrmPickList, frmmain.formcontainer6.ElementID, egv_subform6);\r\nif containername_p = 'FormContainer7' then Application.CreateForm(TfrmPickList, frmmain.formcontainer7.ElementID, egv_subform7);\r\nif containername_p = 'FormContainer8' then Application.CreateForm(TfrmPickList, frmmain.formcontainer8.ElementID, egv_subform8);\r\nif containername_p = 'FormContainer9' then Application.CreateForm(TfrmPickList, frmmain.formcontainer9.ElementID, egv_subform9);\r\nend;\r\n\r\nprocedure TfrmMultiLevelPickForm.WebSpeedButton2Click(Sender: TObject);\r\nvar containername_p: string;\r\nbegin\r\nEGV_SECTIONNAME := lbList2.items[lbList2.itemindex].text;\r\nEGV_PKLMODE := 1;\r\nEGV_PKLEDITMODE := TRUE;\r\ncontainername_p := getformcontainer().name; // showmessage(containername_p);\r\nif containername_p = 'FormContainer1' then Application.CreateForm(TfrmPickList, frmmain.formcontainer1.ElementID, egv_subform);\r\nif containername_p = 'FormContainer2' then Application.CreateForm(TfrmPickList, frmmain.formcontainer2.ElementID, egv_subform2);\r\nif containername_p = 'FormContainer3' then Application.CreateForm(TfrmPickList, frmmain.formcontainer3.ElementID, egv_subform3);\r\nif containername_p = 'FormContainer4' then Application.CreateForm(TfrmPickList, frmmain.formcontainer4.ElementID, egv_subform4);\r\nif containername_p = 'FormContainer5' then Application.CreateForm(TfrmPickList, frmmain.formcontainer5.ElementID, egv_subform5);\r\nif containername_p = 'FormContainer6' then Application.CreateForm(TfrmPickList, frmmain.formcontainer6.ElementID, egv_subform6);\r\nif containername_p = 'FormContainer7' then Application.CreateForm(TfrmPickList, frmmain.formcontainer7.ElementID, egv_subform7);\r\nif containername_p = 'FormContainer8' then Application.CreateForm(TfrmPickList, frmmain.formcontainer8.ElementID, egv_subform8);\r\nif containername_p = 'FormContainer9' then Application.CreateForm(TfrmPickList, frmmain.formcontainer9.ElementID, egv_subform9);\r\nend;\r\n\r\nprocedure TfrmMultiLevelPickForm.btnClearSelectionsClick(Sender: TObject);\r\nvar i: integer;\r\nbegin\r\nlbList1.BeginUpdate;\r\nfor i := 0 to lbList1.items.count - 1\r\ndo lbList1.items[i].checked := false;\r\nlbList1.EndUpdate;\r\n\r\nlbList1.itemindex := -1;\r\n\r\nlbList2.BeginUpdate; lbList2.items.clear; lbList2.EndUpdate;\r\nlbList3.BeginUpdate; LbList3.items.clear; lbList3.EndUpdate;\r\nend;\r\n\r\nprocedure TfrmMultiLevelPickForm.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n WebLabel15 := TLabel.Create(Self);\r\n WebLabel1 := TLabel.Create(Self);\r\n SubForm_DIV := TScrollBox.Create(Self);\r\n lbList1 := TTMSFNCCheckedListBox.Create(Self);\r\n btnClearSelections := TSpeedButton.Create(Self);\r\n WebSpeedButton3 := TSpeedButton.Create(Self);\r\n lbList2 := TTMSFNCCheckedListBox.Create(Self);\r\n WebSpeedButton4 := TSpeedButton.Create(Self);\r\n lbList3 := TTMSFNCCheckedListBox.Create(Self);\r\n WebSpeedButton5 := TSpeedButton.Create(Self);\r\n pnlMenuRigt := TPanel.Create(Self);\r\n WebPanel1 := TPanel.Create(Self);\r\n Memo := TMemo.Create(Self);\r\n pnlFormButtons := TPanel.Create(Self);\r\n btnClose := TBitBtn.Create(Self);\r\n btnSave := TBitBtn.Create(Self);\r\n btnAdd := TBitBtn.Create(Self);\r\n WebBitBtn1 := TBitBtn.Create(Self);\r\n pnlFormCaption := TPanel.Create(Self);\r\n\r\n WebLabel15.BeforeLoadDFMValues;\r\n WebLabel1.BeforeLoadDFMValues;\r\n SubForm_DIV.BeforeLoadDFMValues;\r\n lbList1.BeforeLoadDFMValues;\r\n btnClearSelections.BeforeLoadDFMValues;\r\n WebSpeedButton3.BeforeLoadDFMValues;\r\n lbList2.BeforeLoadDFMValues;\r\n WebSpeedButton4.BeforeLoadDFMValues;\r\n lbList3.BeforeLoadDFMValues;\r\n WebSpeedButton5.BeforeLoadDFMValues;\r\n pnlMenuRigt.BeforeLoadDFMValues;\r\n WebPanel1.BeforeLoadDFMValues;\r\n Memo.BeforeLoadDFMValues;\r\n pnlFormButtons.BeforeLoadDFMValues;\r\n btnClose.BeforeLoadDFMValues;\r\n btnSave.BeforeLoadDFMValues;\r\n btnAdd.BeforeLoadDFMValues;\r\n WebBitBtn1.BeforeLoadDFMValues;\r\n pnlFormCaption.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmMultiLevelPickForm';\r\n Width := 883;\r\n Height := 648;\r\n SetEvent(Self, 'OnClose', 'WebFormClose');\r\n SetEvent(Self, 'OnResize', 'WebFormResize');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n WebLabel15.SetParentComponent(Self);\r\n WebLabel15.Name := 'WebLabel15';\r\n WebLabel15.Left := 0;\r\n WebLabel15.Top := 635;\r\n WebLabel15.Width := 883;\r\n WebLabel15.Height := 13;\r\n WebLabel15.Align := alBottom;\r\n WebLabel15.ElementClassName := 'BOX_BOTTOMBORDER';\r\n WebLabel15.HeightPercent := 100.000000000000000000;\r\n WebLabel15.WidthPercent := 100.000000000000000000;\r\n WebLabel1.SetParentComponent(Self);\r\n WebLabel1.Name := 'WebLabel1';\r\n WebLabel1.Left := 0;\r\n WebLabel1.Top := 480;\r\n WebLabel1.Width := 883;\r\n WebLabel1.Height := 13;\r\n WebLabel1.Cursor := crHandPoint;\r\n WebLabel1.Align := alBottom;\r\n WebLabel1.ElementClassName := 'BOX_NOBORDER';\r\n WebLabel1.HeightPercent := 100.000000000000000000;\r\n WebLabel1.WidthPercent := 100.000000000000000000;\r\n SubForm_DIV.SetParentComponent(Self);\r\n SubForm_DIV.Name := 'SubForm_DIV';\r\n SubForm_DIV.Left := 0;\r\n SubForm_DIV.Top := 41;\r\n SubForm_DIV.Width := 883;\r\n SubForm_DIV.Height := 439;\r\n SubForm_DIV.Align := alClient;\r\n SubForm_DIV.BorderStyle := bsNone;\r\n SubForm_DIV.ChildOrder := 2;\r\n SubForm_DIV.Color := clWhite;\r\n SubForm_DIV.ScrollBars := ssVertical;\r\n lbList1.SetParentComponent(SubForm_DIV);\r\n lbList1.Name := 'lbList1';\r\n lbList1.Left := 0;\r\n lbList1.Top := 0;\r\n lbList1.Width := 270;\r\n lbList1.Height := 439;\r\n lbList1.Cursor := crHandPoint;\r\n lbList1.AllowFocus := False;\r\n lbList1.Align := alLeft;\r\n lbList1.ParentDoubleBuffered := False;\r\n lbList1.Color := clNone;\r\n lbList1.DoubleBuffered := True;\r\n lbList1.Font.Charset := DEFAULT_CHARSET;\r\n lbList1.Font.Color := clGray;\r\n lbList1.Font.Height := -16;\r\n lbList1.Font.Name := 'Tahoma';\r\n lbList1.Font.Style := [];\r\n lbList1.ParentFont := False;\r\n lbList1.TabOrder := 0;\r\n lbList1.Stroke.Color := 16514043;\r\n lbList1.Stroke.Width := 10.000000000000000000;\r\n lbList1.ItemsAppearance.Font.Charset := DEFAULT_CHARSET;\r\n lbList1.ItemsAppearance.Font.Color := clSilver;\r\n lbList1.ItemsAppearance.Font.Height := -13;\r\n lbList1.ItemsAppearance.Font.Name := 'Tahoma';\r\n lbList1.ItemsAppearance.Font.Style := [];\r\n lbList1.ItemsAppearance.Fill.Color := -1;\r\n lbList1.ItemsAppearance.Stroke.Kind := gskNone;\r\n lbList1.ItemsAppearance.Stroke.Color := 11119017;\r\n lbList1.ItemsAppearance.SelectedFill.Color := 16760704;\r\n lbList1.ItemsAppearance.SelectedStroke.Kind := gskNone;\r\n lbList1.ItemsAppearance.SelectedStroke.Color := 15658734;\r\n lbList1.ItemsAppearance.DisabledFill.Color := 11119017;\r\n lbList1.ItemsAppearance.DisabledStroke.Kind := gskNone;\r\n lbList1.ItemsAppearance.DisabledStroke.Color := 11119017;\r\n lbList1.ItemsAppearance.HeightMode := lihmVariable;\r\n lbList1.ItemsAppearance.FixedHeight := 25.000000000000000000;\r\n lbList1.ItemsAppearance.ShowFocus := False;\r\n lbList1.DefaultItem.WordWrapping := True;\r\n lbList1.Header.Visible := True;\r\n lbList1.Header.Text := '';\r\n lbList1.Header.Fill.Color := -1;\r\n lbList1.Header.Font.Charset := DEFAULT_CHARSET;\r\n lbList1.Header.Font.Color := 16514043;\r\n lbList1.Header.Font.Height := -16;\r\n lbList1.Header.Font.Name := 'Tahoma';\r\n lbList1.Header.Font.Style := [];\r\n lbList1.Header.Stroke.Kind := gskNone;\r\n lbList1.Header.Stroke.Color := 11119017;\r\n lbList1.Header.WordWrapping := True;\r\n lbList1.Header.Size := 25.000000000000000000;\r\n lbList1.Header.SortIndicatorColor := 11829830;\r\n lbList1.VerticalScrollBarVisible := False;\r\n SetEvent(lbList1, Self, 'OnItemClick', 'lbList1ItemClick');\r\n btnClearSelections.SetParentComponent(lbList1);\r\n btnClearSelections.Name := 'btnClearSelections';\r\n btnClearSelections.Left := 3;\r\n btnClearSelections.Top := 1;\r\n btnClearSelections.Width := 22;\r\n btnClearSelections.Height := 24;\r\n btnClearSelections.Cursor := crHandPoint;\r\n btnClearSelections.Hint := 'Clear';\r\n btnClearSelections.Color := clNone;\r\n btnClearSelections.Flat := True;\r\n btnClearSelections.HeightPercent := 100.000000000000000000;\r\n btnClearSelections.MaterialGlyph := 'delete_sweep';\r\n btnClearSelections.ShowHint := True;\r\n btnClearSelections.TabOrder := 1;\r\n btnClearSelections.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnClearSelections, Self, 'OnClick', 'btnClearSelectionsClick');\r\n WebSpeedButton3.SetParentComponent(lbList1);\r\n WebSpeedButton3.Name := 'WebSpeedButton3';\r\n WebSpeedButton3.Left := 247;\r\n WebSpeedButton3.Top := 1;\r\n WebSpeedButton3.Width := 22;\r\n WebSpeedButton3.Height := 24;\r\n WebSpeedButton3.Cursor := crHandPoint;\r\n WebSpeedButton3.Hint := 'Edit';\r\n WebSpeedButton3.Anchors := [akTop,akRight];\r\n WebSpeedButton3.Color := clNone;\r\n WebSpeedButton3.Flat := True;\r\n WebSpeedButton3.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton3.MaterialGlyph := 'edit';\r\n WebSpeedButton3.ShowHint := True;\r\n WebSpeedButton3.TabOrder := 2;\r\n WebSpeedButton3.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton3, Self, 'OnClick', 'btnEditGroupsClick');\r\n lbList2.SetParentComponent(SubForm_DIV);\r\n lbList2.Name := 'lbList2';\r\n lbList2.Left := 281;\r\n lbList2.Top := 0;\r\n lbList2.Width := 270;\r\n lbList2.Height := 439;\r\n lbList2.Cursor := crHandPoint;\r\n lbList2.AllowFocus := False;\r\n lbList2.Align := alLeft;\r\n lbList2.ParentDoubleBuffered := False;\r\n lbList2.Color := clNone;\r\n lbList2.DoubleBuffered := True;\r\n lbList2.Font.Charset := DEFAULT_CHARSET;\r\n lbList2.Font.Color := clGray;\r\n lbList2.Font.Height := -16;\r\n lbList2.Font.Name := 'Tahoma';\r\n lbList2.Font.Style := [];\r\n lbList2.ParentFont := False;\r\n lbList2.TabOrder := 1;\r\n lbList2.Stroke.Color := 16514043;\r\n lbList2.Stroke.Width := 10.000000000000000000;\r\n lbList2.ItemsAppearance.Font.Charset := DEFAULT_CHARSET;\r\n lbList2.ItemsAppearance.Font.Color := clSilver;\r\n lbList2.ItemsAppearance.Font.Height := -13;\r\n lbList2.ItemsAppearance.Font.Name := 'Tahoma';\r\n lbList2.ItemsAppearance.Font.Style := [];\r\n lbList2.ItemsAppearance.Fill.Color := -1;\r\n lbList2.ItemsAppearance.Stroke.Kind := gskNone;\r\n lbList2.ItemsAppearance.Stroke.Color := 11119017;\r\n lbList2.ItemsAppearance.SelectedFill.Color := 16760704;\r\n lbList2.ItemsAppearance.SelectedStroke.Kind := gskNone;\r\n lbList2.ItemsAppearance.SelectedStroke.Color := 15658734;\r\n lbList2.ItemsAppearance.DisabledFill.Color := 11119017;\r\n lbList2.ItemsAppearance.DisabledStroke.Kind := gskNone;\r\n lbList2.ItemsAppearance.DisabledStroke.Color := 11119017;\r\n lbList2.ItemsAppearance.HeightMode := lihmVariable;\r\n lbList2.ItemsAppearance.FixedHeight := 25.000000000000000000;\r\n lbList2.ItemsAppearance.ShowFocus := False;\r\n lbList2.DefaultItem.WordWrapping := True;\r\n lbList2.Header.Visible := True;\r\n lbList2.Header.Text := '';\r\n lbList2.Header.Fill.Color := -1;\r\n lbList2.Header.Font.Charset := DEFAULT_CHARSET;\r\n lbList2.Header.Font.Color := 16514043;\r\n lbList2.Header.Font.Height := -16;\r\n lbList2.Header.Font.Name := 'Tahoma';\r\n lbList2.Header.Font.Style := [];\r\n lbList2.Header.Stroke.Kind := gskNone;\r\n lbList2.Header.Stroke.Color := 11119017;\r\n lbList2.Header.WordWrapping := True;\r\n lbList2.Header.Size := 25.000000000000000000;\r\n lbList2.Header.SortIndicatorColor := 11829830;\r\n lbList2.VerticalScrollBarVisible := False;\r\n SetEvent(lbList2, Self, 'OnItemClick', 'lbList2ItemClick');\r\n WebSpeedButton4.SetParentComponent(lbList2);\r\n WebSpeedButton4.Name := 'WebSpeedButton4';\r\n WebSpeedButton4.Left := 247;\r\n WebSpeedButton4.Top := 1;\r\n WebSpeedButton4.Width := 22;\r\n WebSpeedButton4.Height := 24;\r\n WebSpeedButton4.Cursor := crHandPoint;\r\n WebSpeedButton4.Hint := 'Edit';\r\n WebSpeedButton4.Anchors := [akTop,akRight];\r\n WebSpeedButton4.Color := clNone;\r\n WebSpeedButton4.Flat := True;\r\n WebSpeedButton4.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton4.MaterialGlyph := 'edit';\r\n WebSpeedButton4.ShowHint := True;\r\n WebSpeedButton4.TabOrder := 1;\r\n WebSpeedButton4.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton4, Self, 'OnClick', 'WebSpeedButton1Click');\r\n lbList3.SetParentComponent(SubForm_DIV);\r\n lbList3.Name := 'lbList3';\r\n lbList3.Left := 562;\r\n lbList3.Top := 0;\r\n lbList3.Width := 321;\r\n lbList3.Height := 439;\r\n lbList3.Cursor := crHandPoint;\r\n lbList3.AllowFocus := False;\r\n lbList3.Align := alClient;\r\n lbList3.ParentDoubleBuffered := False;\r\n lbList3.Color := clNone;\r\n lbList3.DoubleBuffered := True;\r\n lbList3.Font.Charset := DEFAULT_CHARSET;\r\n lbList3.Font.Color := clGray;\r\n lbList3.Font.Height := -16;\r\n lbList3.Font.Name := 'Tahoma';\r\n lbList3.Font.Style := [];\r\n lbList3.ParentFont := False;\r\n lbList3.TabOrder := 2;\r\n lbList3.Stroke.Color := 16514043;\r\n lbList3.Stroke.Width := 10.000000000000000000;\r\n lbList3.ItemsAppearance.Font.Charset := DEFAULT_CHARSET;\r\n lbList3.ItemsAppearance.Font.Color := clSilver;\r\n lbList3.ItemsAppearance.Font.Height := -13;\r\n lbList3.ItemsAppearance.Font.Name := 'Tahoma';\r\n lbList3.ItemsAppearance.Font.Style := [];\r\n lbList3.ItemsAppearance.Fill.Color := -1;\r\n lbList3.ItemsAppearance.Stroke.Kind := gskNone;\r\n lbList3.ItemsAppearance.Stroke.Color := 11119017;\r\n lbList3.ItemsAppearance.SelectedFill.Color := 16760704;\r\n lbList3.ItemsAppearance.SelectedStroke.Kind := gskNone;\r\n lbList3.ItemsAppearance.SelectedStroke.Color := 15658734;\r\n lbList3.ItemsAppearance.DisabledFill.Color := 11119017;\r\n lbList3.ItemsAppearance.DisabledStroke.Kind := gskNone;\r\n lbList3.ItemsAppearance.DisabledStroke.Color := 11119017;\r\n lbList3.ItemsAppearance.HeightMode := lihmVariable;\r\n lbList3.ItemsAppearance.FixedHeight := 25.000000000000000000;\r\n lbList3.ItemsAppearance.ShowFocus := False;\r\n lbList3.DefaultItem.WordWrapping := True;\r\n lbList3.Header.Visible := True;\r\n lbList3.Header.Text := '';\r\n lbList3.Header.Fill.Color := -1;\r\n lbList3.Header.Font.Charset := DEFAULT_CHARSET;\r\n lbList3.Header.Font.Color := 16514043;\r\n lbList3.Header.Font.Height := -16;\r\n lbList3.Header.Font.Name := 'Tahoma';\r\n lbList3.Header.Font.Style := [];\r\n lbList3.Header.Stroke.Kind := gskNone;\r\n lbList3.Header.Stroke.Color := 11119017;\r\n lbList3.Header.WordWrapping := True;\r\n lbList3.Header.Size := 25.000000000000000000;\r\n lbList3.Header.SortIndicatorColor := 11829830;\r\n lbList3.VerticalScrollBarVisible := False;\r\n SetEvent(lbList3, Self, 'OnItemClick', 'lbList3ItemClick');\r\n WebSpeedButton5.SetParentComponent(lbList3);\r\n WebSpeedButton5.Name := 'WebSpeedButton5';\r\n WebSpeedButton5.Left := 292;\r\n WebSpeedButton5.Top := 1;\r\n WebSpeedButton5.Width := 22;\r\n WebSpeedButton5.Height := 24;\r\n WebSpeedButton5.Cursor := crHandPoint;\r\n WebSpeedButton5.Hint := 'Edit';\r\n WebSpeedButton5.Anchors := [akTop,akRight];\r\n WebSpeedButton5.Color := clNone;\r\n WebSpeedButton5.Flat := True;\r\n WebSpeedButton5.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton5.MaterialGlyph := 'edit';\r\n WebSpeedButton5.ShowHint := True;\r\n WebSpeedButton5.TabOrder := 1;\r\n WebSpeedButton5.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton5, Self, 'OnClick', 'WebSpeedButton2Click');\r\n pnlMenuRigt.SetParentComponent(SubForm_DIV);\r\n pnlMenuRigt.Name := 'pnlMenuRigt';\r\n pnlMenuRigt.Left := 270;\r\n pnlMenuRigt.Top := 0;\r\n pnlMenuRigt.Width := 11;\r\n pnlMenuRigt.Height := 439;\r\n pnlMenuRigt.ElementClassName := 'list_separator';\r\n pnlMenuRigt.Align := alLeft;\r\n pnlMenuRigt.BorderColor := clWhite;\r\n pnlMenuRigt.BorderStyle := bsNone;\r\n pnlMenuRigt.ChildOrder := 1;\r\n pnlMenuRigt.Color := 15528180;\r\n pnlMenuRigt.TabOrder := 3;\r\n WebPanel1.SetParentComponent(SubForm_DIV);\r\n WebPanel1.Name := 'WebPanel1';\r\n WebPanel1.Left := 551;\r\n WebPanel1.Top := 0;\r\n WebPanel1.Width := 11;\r\n WebPanel1.Height := 439;\r\n WebPanel1.ElementClassName := 'list_separator';\r\n WebPanel1.Align := alLeft;\r\n WebPanel1.BorderColor := clWhite;\r\n WebPanel1.BorderStyle := bsNone;\r\n WebPanel1.ChildOrder := 1;\r\n WebPanel1.Color := 15528180;\r\n WebPanel1.TabOrder := 4;\r\n Memo.SetParentComponent(Self);\r\n Memo.Name := 'Memo';\r\n Memo.Tag := -1;\r\n Memo.Left := 0;\r\n Memo.Top := 493;\r\n Memo.Width := 883;\r\n Memo.Height := 101;\r\n Memo.Align := alBottom;\r\n Memo.BorderStyle := bsNone;\r\n Memo.ElementClassName := 'block_memo';\r\n Memo.ElementFont := efCSS;\r\n Memo.Font.Charset := DEFAULT_CHARSET;\r\n Memo.Font.Color := clWindowText;\r\n Memo.Font.Height := -13;\r\n Memo.Font.Name := 'Tahoma';\r\n Memo.Font.Style := [];\r\n Memo.HeightPercent := 100.000000000000000000;\r\n Memo.ParentFont := False;\r\n Memo.SelLength := 0;\r\n Memo.SelStart := 0;\r\n Memo.ShowFocus := False;\r\n Memo.WidthPercent := 100.000000000000000000;\r\n pnlFormButtons.SetParentComponent(Self);\r\n pnlFormButtons.Name := 'pnlFormButtons';\r\n pnlFormButtons.Left := 0;\r\n pnlFormButtons.Top := 594;\r\n pnlFormButtons.Width := 883;\r\n pnlFormButtons.Height := 41;\r\n pnlFormButtons.Align := alBottom;\r\n pnlFormButtons.BorderStyle := bsNone;\r\n pnlFormButtons.ChildOrder := 5;\r\n pnlFormButtons.Color := clWhite;\r\n pnlFormButtons.TabOrder := 2;\r\n btnClose.SetParentComponent(pnlFormButtons);\r\n btnClose.Name := 'btnClose';\r\n btnClose.Left := 793;\r\n btnClose.Top := 0;\r\n btnClose.Width := 90;\r\n btnClose.Height := 41;\r\n btnClose.Cursor := crHandPoint;\r\n btnClose.Hint := 'Cancel';\r\n btnClose.Align := alRight;\r\n btnClose.Caption := 'Cancel';\r\n btnClose.Color := clNone;\r\n btnClose.ElementClassName := 'btn_icon';\r\n btnClose.Font.Charset := DEFAULT_CHARSET;\r\n btnClose.Font.Color := clGray;\r\n btnClose.Font.Height := -16;\r\n btnClose.Font.Name := 'Tahoma';\r\n btnClose.Font.Style := [];\r\n btnClose.HeightPercent := 100.000000000000000000;\r\n btnClose.MaterialGlyph := 'exit_to_app';\r\n btnClose.MaterialGlyphSize := 1;\r\n btnClose.ParentFont := False;\r\n btnClose.ShowHint := True;\r\n btnClose.TabOrder := 10;\r\n btnClose.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnClose, Self, 'OnClick', 'btnCloseClick');\r\n btnSave.SetParentComponent(pnlFormButtons);\r\n btnSave.Name := 'btnSave';\r\n btnSave.Left := 703;\r\n btnSave.Top := 0;\r\n btnSave.Width := 90;\r\n btnSave.Height := 41;\r\n btnSave.Cursor := crHandPoint;\r\n btnSave.Hint := 'Ok';\r\n btnSave.Align := alRight;\r\n btnSave.Caption := 'Ok';\r\n btnSave.Color := clNone;\r\n btnSave.ElementClassName := 'btn_icon';\r\n btnSave.Font.Charset := DEFAULT_CHARSET;\r\n btnSave.Font.Color := clGray;\r\n btnSave.Font.Height := -16;\r\n btnSave.Font.Name := 'Tahoma';\r\n btnSave.Font.Style := [];\r\n btnSave.HeightPercent := 100.000000000000000000;\r\n btnSave.MaterialGlyph := 'save';\r\n btnSave.MaterialGlyphSize := 1;\r\n btnSave.ParentFont := False;\r\n btnSave.ShowHint := True;\r\n btnSave.TabOrder := 11;\r\n btnSave.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnSave, Self, 'OnClick', 'btnSaveClick');\r\n btnAdd.SetParentComponent(pnlFormButtons);\r\n btnAdd.Name := 'btnAdd';\r\n btnAdd.Left := 613;\r\n btnAdd.Top := 0;\r\n btnAdd.Width := 90;\r\n btnAdd.Height := 41;\r\n btnAdd.Cursor := crHandPoint;\r\n btnAdd.Hint := 'Add';\r\n btnAdd.Align := alRight;\r\n btnAdd.Caption := 'Add';\r\n btnAdd.Color := clNone;\r\n btnAdd.ElementClassName := 'btn_icon';\r\n btnAdd.Font.Charset := DEFAULT_CHARSET;\r\n btnAdd.Font.Color := clGray;\r\n btnAdd.Font.Height := -16;\r\n btnAdd.Font.Name := 'Tahoma';\r\n btnAdd.Font.Style := [];\r\n btnAdd.HeightPercent := 100.000000000000000000;\r\n btnAdd.MaterialGlyph := 'add';\r\n btnAdd.MaterialGlyphSize := 1;\r\n btnAdd.ParentFont := False;\r\n btnAdd.ShowHint := True;\r\n btnAdd.TabOrder := 10;\r\n btnAdd.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnAdd, Self, 'OnClick', 'btnAddClick');\r\n WebBitBtn1.SetParentComponent(pnlFormButtons);\r\n WebBitBtn1.Name := 'WebBitBtn1';\r\n WebBitBtn1.Left := 523;\r\n WebBitBtn1.Top := 0;\r\n WebBitBtn1.Width := 90;\r\n WebBitBtn1.Height := 41;\r\n WebBitBtn1.Cursor := crHandPoint;\r\n WebBitBtn1.Hint := 'Clear';\r\n WebBitBtn1.Align := alRight;\r\n WebBitBtn1.Caption := 'Clear';\r\n WebBitBtn1.Color := clNone;\r\n WebBitBtn1.ElementClassName := 'btn_icon';\r\n WebBitBtn1.Font.Charset := DEFAULT_CHARSET;\r\n WebBitBtn1.Font.Color := clGray;\r\n WebBitBtn1.Font.Height := -16;\r\n WebBitBtn1.Font.Name := 'Tahoma';\r\n WebBitBtn1.Font.Style := [];\r\n WebBitBtn1.HeightPercent := 100.000000000000000000;\r\n WebBitBtn1.MaterialGlyph := 'delete_sweep';\r\n WebBitBtn1.MaterialGlyphSize := 1;\r\n WebBitBtn1.ParentFont := False;\r\n WebBitBtn1.ShowHint := True;\r\n WebBitBtn1.TabOrder := 10;\r\n WebBitBtn1.WidthPercent := 10.000000000000000000;\r\n SetEvent(WebBitBtn1, Self, 'OnClick', 'WebBitBtn1Click');\r\n pnlFormCaption.SetParentComponent(Self);\r\n pnlFormCaption.Name := 'pnlFormCaption';\r\n pnlFormCaption.Left := 0;\r\n pnlFormCaption.Top := 0;\r\n pnlFormCaption.Width := 883;\r\n pnlFormCaption.Height := 41;\r\n pnlFormCaption.ElementClassName := 'form_caption';\r\n pnlFormCaption.HeightStyle := ssAuto;\r\n pnlFormCaption.Align := alTop;\r\n pnlFormCaption.BorderColor := clWhite;\r\n pnlFormCaption.BorderStyle := bsNone;\r\n pnlFormCaption.Caption := 'Form Caption';\r\n pnlFormCaption.ChildOrder := 9;\r\n pnlFormCaption.ElementFont := efCSS;\r\n pnlFormCaption.Font.Charset := DEFAULT_CHARSET;\r\n pnlFormCaption.Font.Color := clWindowText;\r\n pnlFormCaption.Font.Height := -16;\r\n pnlFormCaption.Font.Name := 'Tahoma';\r\n pnlFormCaption.Font.Style := [];\r\n pnlFormCaption.ParentFont := False;\r\n pnlFormCaption.TabOrder := 3;\r\n finally\r\n WebLabel15.AfterLoadDFMValues;\r\n WebLabel1.AfterLoadDFMValues;\r\n SubForm_DIV.AfterLoadDFMValues;\r\n lbList1.AfterLoadDFMValues;\r\n btnClearSelections.AfterLoadDFMValues;\r\n WebSpeedButton3.AfterLoadDFMValues;\r\n lbList2.AfterLoadDFMValues;\r\n WebSpeedButton4.AfterLoadDFMValues;\r\n lbList3.AfterLoadDFMValues;\r\n WebSpeedButton5.AfterLoadDFMValues;\r\n pnlMenuRigt.AfterLoadDFMValues;\r\n WebPanel1.AfterLoadDFMValues;\r\n Memo.AfterLoadDFMValues;\r\n pnlFormButtons.AfterLoadDFMValues;\r\n btnClose.AfterLoadDFMValues;\r\n btnSave.AfterLoadDFMValues;\r\n btnAdd.AfterLoadDFMValues;\r\n WebBitBtn1.AfterLoadDFMValues;\r\n pnlFormCaption.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","unit UDF_CustomForm;\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 Vcl.Grids, WEBLib.DBCtrls, WEBLib.ExtCtrls, VCL.TMSFNCTypes, VCL.TMSFNCUtils,\r\n VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes, WEBLib.Buttons,\r\n VCL.TMSFNCCustomControl, VCL.TMSFNCSwitch;\r\n\r\ntype\r\n TfrmUDF_CustomForm = class(TForm)\r\n pnlFormCaption: TPanel;\r\n pnlBottom: TPanel;\r\n pnlFormButtons: TPanel;\r\n btnCustom1: TBitBtn;\r\n btnCustom2: TBitBtn;\r\n btnCustom3: TBitBtn;\r\n btnCustom4: TBitBtn;\r\n btnCustom5: TBitBtn;\r\n btnClose: TBitBtn;\r\n btnCustom6: TBitBtn;\r\n btnCustom7: TBitBtn;\r\n btnCustom8: TBitBtn;\r\n btnCustom9: TBitBtn;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure WebFormClose(Sender: TObject; var Action: TCloseAction);\r\n procedure btnCloseClick(Sender: TObject);\r\n procedure WebFormCreate(Sender: TObject);\r\n procedure WebFormResize(Sender: TObject);\r\n private\r\n { Private declarations }\r\n public\r\n { Public declarations }\r\n PrevFormName_p: string;\r\n FormIsActive_p: Boolean;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmUDF_CustomForm: TfrmUDF_CustomForm;\r\n\r\nimplementation\r\n\r\n{$R *.dfm}\r\n\r\nuses DataModule, Common, Main;\r\n\r\nprocedure TfrmUDF_CustomForm.btnCloseClick(Sender: TObject);\r\nbegin\r\nself.Close;\r\nend;\r\n\r\nprocedure TfrmUDF_CustomForm.WebFormClose(Sender: TObject;\r\n var Action: TCloseAction);\r\nvar s1,s2,s3, s4: string; grd: TDBGrid; prevform_p: TForm; currentform_p: TForm;\r\nbegin\r\nChangeMainMenuHighlight;\r\ngrd := nil;\r\nprevform_p := getpreviousform;\r\nif prevform_p <> nil\r\nthen begin\r\n //showmessage(prevform_p.Name);\r\n // restore Design settings for the prevos form\r\n if dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS_' + uppercase(prevform_p.name)]= ''\r\n then EGV_FORMCOLUMNS := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS'])\r\n else EGV_FORMCOLUMNS := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS_' + uppercase(prevform_p.name)]);\r\n\r\n if dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH_' + uppercase(prevform_p.name)]= ''\r\n then EGV_BLOCKDEFAULTWIDTH := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH'])\r\n else EGV_BLOCKDEFAULTWIDTH := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH_' + uppercase(prevform_p.name)]);\r\n EGV_FORMCOLUMNSAUTO := (dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNSAUTO_' + uppercase(prevform_p.name)] = '1');\r\n end;\r\n\r\nif assigned(prevform_p) and assigned(prevform_p.findcomponent('GRDDYNAMICGRID'))\r\nthen grd := ( prevform_p.findcomponent('GRDDYNAMICGRID') as TDBGrid);\r\n\r\nReleaseGridDatasets(getcurrentform);\r\nDBF_GetPostBlocks(frmmain.sbLogoBox, 0, frmmain);\r\nDBF_GetPostBlocks(frmmain.sbAlertBoxes, 0, frmmain);\r\nDBF_GetPostBlocks(frmmain.sbInfoBoxes, 0, frmmain);\r\n\r\nfrmmain.btnSwitch_Design.state := ssOff;\r\nHideFormContainer(true);\r\n\r\nif assigned(prevform_p)\r\nthen begin // showmessage(prevform_p.name);\r\n prevform_p.Realign;\r\n if prevform_p.FindComponent('pnlFormButtons') <> nil then ResizeButtons((prevform_p.FindComponent('pnlFormButtons')as Tpanel));\r\n if prevform_p.FindComponent('pnlReportButtons') <> nil then ResizeButtons((prevform_p.FindComponent('pnlReportButtons')as Tpanel));\r\n\r\n if prevform_p.FindComponent('SUBFORM_DIV') <> nil\r\n then begin //showmessage('1');\r\n // ResizeFormBlocks((prevform_p.FindComponent('SUBFORM_DIV') as TWebScrollBox));\r\n StretchAllMemos((prevform_p.FindComponent('SUBFORM_DIV') as TScrollBox));\r\n // DBF_GetPostBlocks((prevform_p.FindComponent('Subform_div') as TWebScrollBox), 0);\r\n end;\r\n if prevform_p.FindComponent('sbSideData') <> nil\r\n then begin //showmessage('2');\r\n ResizeFormBlocks((prevform_p.FindComponent('sbSideData') as TScrollBox), 1, false);\r\n StretchAllMemos((prevform_p.FindComponent('sbSideData') as TScrollBox));\r\n DBF_GetPostBlocks((prevform_p.FindComponent('sbSidedata') as TScrollBox), 0);\r\n end;\r\n if grd <> nil\r\n then begin\r\n ResizeFormBlocks((prevform_p.FindComponent('sbSearch')as TScrollBox), 20, false);\r\n Grid_AdjustColumns(grd,true);\r\n Grid_SetTitleHeight(grd);\r\n end\r\n end;\r\nfrmmain.lblLocation.caption := stringreplace(frmmain.lblLocation.caption,' > ' + pnlFormCaption.Caption + ' ','',[]);\r\n//Refresh grid data\r\nif EGV_PARENT_DBGRID <> nil\r\nthen DBF_GetPostFieldData((EGV_PARENT_DBGRID.parent as TPanel), 0, nil, s1, s2, s3, s4);\r\n\r\nEGV_PARENT_DBGRID := nil;\r\nfrmmain.sbAlertBoxes.visible := true;\r\ncurrentform_p := getcurrentform;\r\ncurrentform_p := nil;\r\n\r\nif prevform_p <> nil\r\nthen begin\r\n EGV_CURRENTFORMNAME := prevform_p.Name;\r\n end;\r\nend;\r\n\r\nprocedure TfrmUDF_CustomForm.WebFormCreate(Sender: TObject);\r\nbegin //showmessage('created');\r\n FormIsActive_p := false;\r\nend;\r\n\r\nprocedure TfrmUDF_CustomForm.WebFormResize(Sender: TObject);\r\nbegin\r\nif not FormIsActive_p then exit;\r\nend;\r\n\r\nprocedure TfrmUDF_CustomForm.WebFormShow(Sender: TObject);\r\nbegin\r\n\r\nFormIsActive_p := true;\r\nEGV_CURRENTFORMNAME := dm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform()-1)];\r\ncase (getsubform() - 1) of\r\n 1: egv_subform.Name := EGV_CURRENTFORMNAME;\r\n 2: egv_subform2.Name := EGV_CURRENTFORMNAME;\r\n 3: egv_subform3.Name := EGV_CURRENTFORMNAME;\r\n 4: egv_subform4.Name := EGV_CURRENTFORMNAME;\r\n 5: egv_subform5.Name := EGV_CURRENTFORMNAME;\r\n 6: egv_subform6.Name := EGV_CURRENTFORMNAME;\r\n 7: egv_subform7.Name := EGV_CURRENTFORMNAME;\r\n 8: egv_subform8.Name := EGV_CURRENTFORMNAME;\r\n 9: egv_subform9.Name := EGV_CURRENTFORMNAME;\r\nend;\r\n\r\nSaveKeyVariables;\r\n\r\nbtnCustom1.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON1_CAPTION'];\r\nbtnCustom2.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON2_CAPTION'];\r\nbtnCustom3.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON3_CAPTION'];\r\nbtnCustom4.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON4_CAPTION'];\r\nbtnCustom5.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON5_CAPTION'];\r\nbtnCustom6.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON6_CAPTION'];\r\nbtnCustom7.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON7_CAPTION'];\r\nbtnCustom8.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON8_CAPTION'];\r\nbtnCustom9.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON9_CAPTION'];\r\n\r\nbtnCustom1.width := 90;\r\nbtnCustom2.width := 90;\r\nbtnCustom3.width := 90;\r\nbtnCustom4.width := 90;\r\nbtnCustom5.width := 90;\r\nbtnCustom6.width := 90;\r\nbtnCustom7.width := 90;\r\nbtnCustom8.width := 90;\r\nbtnCustom9.width := 90;\r\n\r\npnlFormCaption.Caption := dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_FORM_CAPTION'];\r\nfrmmain.lblLocation.caption := frmmain.lblLocation.caption + ' > ' + pnlFormCaption.Caption + ' ';\r\n\r\nbtnCustom1.visible := ( (btnCustom1.caption <> 'undefined') and ((btnCustom1.caption <> '') or (btnCustom1.MaterialGlyph <> '')) );\r\nbtnCustom2.visible := ( (btnCustom2.caption <> 'undefined') and ((btnCustom2.caption <> '') or (btnCustom2.MaterialGlyph <> '')) );\r\nbtnCustom3.visible := ( (btnCustom3.caption <> 'undefined') and ((btnCustom3.caption <> '') or (btnCustom3.MaterialGlyph <> '')) );\r\nbtnCustom4.visible := ( (btnCustom4.caption <> 'undefined') and ((btnCustom4.caption <> '') or (btnCustom4.MaterialGlyph <> '')) );\r\nbtnCustom5.visible := ( (btnCustom5.caption <> 'undefined') and ((btnCustom5.caption <> '') or (btnCustom5.MaterialGlyph <> '')) );\r\nbtnCustom6.visible := ( (btnCustom6.caption <> 'undefined') and ((btnCustom6.caption <> '') or (btnCustom6.MaterialGlyph <> '')) );\r\nbtnCustom7.visible := ( (btnCustom7.caption <> 'undefined') and ((btnCustom7.caption <> '') or (btnCustom7.MaterialGlyph <> '')) );\r\nbtnCustom8.visible := ( (btnCustom8.caption <> 'undefined') and ((btnCustom8.caption <> '') or (btnCustom8.MaterialGlyph <> '')) );\r\nbtnCustom9.visible := ( (btnCustom9.caption <> 'undefined') and ((btnCustom9.caption <> '') or (btnCustom9.MaterialGlyph <> '')) );\r\n\r\n//loadformdesigninfo(getcurrentformname);\r\n\r\nif frmmain.wmWaitMessage.showing and (frmmain.wmWaitMessage.Tag = 0) then frmmain.wmWaitMessage.hide;\r\n\r\nResizeButtons(pnlFormButtons);\r\nend;\r\n\r\nprocedure TfrmUDF_CustomForm.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n pnlFormCaption := TPanel.Create(Self);\r\n pnlBottom := TPanel.Create(Self);\r\n pnlFormButtons := TPanel.Create(Self);\r\n btnCustom1 := TBitBtn.Create(Self);\r\n btnCustom2 := TBitBtn.Create(Self);\r\n btnCustom3 := TBitBtn.Create(Self);\r\n btnCustom4 := TBitBtn.Create(Self);\r\n btnCustom5 := TBitBtn.Create(Self);\r\n btnClose := TBitBtn.Create(Self);\r\n btnCustom6 := TBitBtn.Create(Self);\r\n btnCustom7 := TBitBtn.Create(Self);\r\n btnCustom8 := TBitBtn.Create(Self);\r\n btnCustom9 := TBitBtn.Create(Self);\r\n\r\n pnlFormCaption.BeforeLoadDFMValues;\r\n pnlBottom.BeforeLoadDFMValues;\r\n pnlFormButtons.BeforeLoadDFMValues;\r\n btnCustom1.BeforeLoadDFMValues;\r\n btnCustom2.BeforeLoadDFMValues;\r\n btnCustom3.BeforeLoadDFMValues;\r\n btnCustom4.BeforeLoadDFMValues;\r\n btnCustom5.BeforeLoadDFMValues;\r\n btnClose.BeforeLoadDFMValues;\r\n btnCustom6.BeforeLoadDFMValues;\r\n btnCustom7.BeforeLoadDFMValues;\r\n btnCustom8.BeforeLoadDFMValues;\r\n btnCustom9.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmUDF_CustomForm';\r\n Width := 1349;\r\n Height := 623;\r\n SetEvent(Self, 'OnClose', 'WebFormClose');\r\n SetEvent(Self, 'OnCreate', 'WebFormCreate');\r\n SetEvent(Self, 'OnResize', 'WebFormResize');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n pnlFormCaption.SetParentComponent(Self);\r\n pnlFormCaption.Name := 'pnlFormCaption';\r\n pnlFormCaption.Left := 0;\r\n pnlFormCaption.Top := 0;\r\n pnlFormCaption.Width := 1349;\r\n pnlFormCaption.Height := 25;\r\n pnlFormCaption.ElementClassName := 'form_caption';\r\n pnlFormCaption.HeightStyle := ssAuto;\r\n pnlFormCaption.Align := alTop;\r\n pnlFormCaption.BorderColor := clWhite;\r\n pnlFormCaption.BorderStyle := bsNone;\r\n pnlFormCaption.Caption := 'Form caption';\r\n pnlFormCaption.ChildOrder := 9;\r\n pnlFormCaption.ElementFont := efCSS;\r\n pnlFormCaption.Font.Charset := DEFAULT_CHARSET;\r\n pnlFormCaption.Font.Color := clWindowText;\r\n pnlFormCaption.Font.Height := -16;\r\n pnlFormCaption.Font.Name := 'Tahoma';\r\n pnlFormCaption.Font.Style := [];\r\n pnlFormCaption.ParentFont := False;\r\n pnlFormCaption.TabOrder := 0;\r\n pnlBottom.SetParentComponent(Self);\r\n pnlBottom.Name := 'pnlBottom';\r\n pnlBottom.Left := 0;\r\n pnlBottom.Top := 582;\r\n pnlBottom.Width := 1349;\r\n pnlBottom.Height := 41;\r\n pnlBottom.Align := alBottom;\r\n pnlBottom.BorderStyle := bsNone;\r\n pnlBottom.ChildOrder := 5;\r\n pnlBottom.Color := clWhite;\r\n pnlBottom.TabOrder := 1;\r\n pnlBottom.Visible := False;\r\n pnlFormButtons.SetParentComponent(pnlBottom);\r\n pnlFormButtons.Name := 'pnlFormButtons';\r\n pnlFormButtons.Left := 295;\r\n pnlFormButtons.Top := 0;\r\n pnlFormButtons.Width := 1054;\r\n pnlFormButtons.Height := 41;\r\n pnlFormButtons.Align := alRight;\r\n pnlFormButtons.BorderColor := clNone;\r\n pnlFormButtons.BorderStyle := bsNone;\r\n pnlFormButtons.ChildOrder := 13;\r\n pnlFormButtons.Color := clWhite;\r\n pnlFormButtons.TabOrder := 0;\r\n btnCustom1.SetParentComponent(pnlFormButtons);\r\n btnCustom1.Name := 'btnCustom1';\r\n btnCustom1.Left := 694;\r\n btnCustom1.Top := 0;\r\n btnCustom1.Width := 30;\r\n btnCustom1.Height := 41;\r\n btnCustom1.Cursor := crHandPoint;\r\n btnCustom1.Hint := 'Send Data from Database for Assessment';\r\n btnCustom1.Align := alRight;\r\n btnCustom1.Caption := 'Custom1';\r\n btnCustom1.Color := clNone;\r\n btnCustom1.ElementClassName := 'btn_icon';\r\n btnCustom1.Font.Charset := DEFAULT_CHARSET;\r\n btnCustom1.Font.Color := clGray;\r\n btnCustom1.Font.Height := -13;\r\n btnCustom1.Font.Name := 'Tahoma';\r\n btnCustom1.Font.Style := [];\r\n btnCustom1.HeightPercent := 100.000000000000000000;\r\n btnCustom1.ParentFont := False;\r\n btnCustom1.ShowHint := True;\r\n btnCustom1.Visible := False;\r\n btnCustom1.WidthPercent := 100.000000000000000000;\r\n btnCustom2.SetParentComponent(pnlFormButtons);\r\n btnCustom2.Name := 'btnCustom2';\r\n btnCustom2.Left := 724;\r\n btnCustom2.Top := 0;\r\n btnCustom2.Width := 30;\r\n btnCustom2.Height := 41;\r\n btnCustom2.Cursor := crHandPoint;\r\n btnCustom2.Hint := 'Upload Files for Assessment';\r\n btnCustom2.Align := alRight;\r\n btnCustom2.Caption := 'Custom2';\r\n btnCustom2.Color := clNone;\r\n btnCustom2.ElementClassName := 'btn_icon';\r\n btnCustom2.Font.Charset := DEFAULT_CHARSET;\r\n btnCustom2.Font.Color := clGray;\r\n btnCustom2.Font.Height := -13;\r\n btnCustom2.Font.Name := 'Tahoma';\r\n btnCustom2.Font.Style := [];\r\n btnCustom2.HeightPercent := 100.000000000000000000;\r\n btnCustom2.ParentFont := False;\r\n btnCustom2.Visible := False;\r\n btnCustom2.WidthPercent := 100.000000000000000000;\r\n btnCustom3.SetParentComponent(pnlFormButtons);\r\n btnCustom3.Name := 'btnCustom3';\r\n btnCustom3.Left := 754;\r\n btnCustom3.Top := 0;\r\n btnCustom3.Width := 30;\r\n btnCustom3.Height := 41;\r\n btnCustom3.Cursor := crHandPoint;\r\n btnCustom3.Align := alRight;\r\n btnCustom3.Caption := 'Custom3';\r\n btnCustom3.Color := clNone;\r\n btnCustom3.ElementClassName := 'btn_icon';\r\n btnCustom3.Font.Charset := DEFAULT_CHARSET;\r\n btnCustom3.Font.Color := clGray;\r\n btnCustom3.Font.Height := -13;\r\n btnCustom3.Font.Name := 'Tahoma';\r\n btnCustom3.Font.Style := [];\r\n btnCustom3.HeightPercent := 100.000000000000000000;\r\n btnCustom3.ParentFont := False;\r\n btnCustom3.Visible := False;\r\n btnCustom3.WidthPercent := 100.000000000000000000;\r\n btnCustom4.SetParentComponent(pnlFormButtons);\r\n btnCustom4.Name := 'btnCustom4';\r\n btnCustom4.Left := 784;\r\n btnCustom4.Top := 0;\r\n btnCustom4.Width := 30;\r\n btnCustom4.Height := 41;\r\n btnCustom4.Cursor := crHandPoint;\r\n btnCustom4.Align := alRight;\r\n btnCustom4.Caption := 'Custom4';\r\n btnCustom4.Color := clNone;\r\n btnCustom4.ElementClassName := 'btn_icon';\r\n btnCustom4.Font.Charset := DEFAULT_CHARSET;\r\n btnCustom4.Font.Color := clGray;\r\n btnCustom4.Font.Height := -13;\r\n btnCustom4.Font.Name := 'Tahoma';\r\n btnCustom4.Font.Style := [];\r\n btnCustom4.HeightPercent := 100.000000000000000000;\r\n btnCustom4.ParentFont := False;\r\n btnCustom4.Visible := False;\r\n btnCustom4.WidthPercent := 100.000000000000000000;\r\n btnCustom5.SetParentComponent(pnlFormButtons);\r\n btnCustom5.Name := 'btnCustom5';\r\n btnCustom5.Left := 814;\r\n btnCustom5.Top := 0;\r\n btnCustom5.Width := 30;\r\n btnCustom5.Height := 41;\r\n btnCustom5.Cursor := crHandPoint;\r\n btnCustom5.Align := alRight;\r\n btnCustom5.Caption := 'Custom5';\r\n btnCustom5.Color := clNone;\r\n btnCustom5.ElementClassName := 'btn_icon';\r\n btnCustom5.Font.Charset := DEFAULT_CHARSET;\r\n btnCustom5.Font.Color := clGray;\r\n btnCustom5.Font.Height := -13;\r\n btnCustom5.Font.Name := 'Tahoma';\r\n btnCustom5.Font.Style := [];\r\n btnCustom5.HeightPercent := 100.000000000000000000;\r\n btnCustom5.ParentFont := False;\r\n btnCustom5.Visible := False;\r\n btnCustom5.WidthPercent := 100.000000000000000000;\r\n btnClose.SetParentComponent(pnlFormButtons);\r\n btnClose.Name := 'btnClose';\r\n btnClose.Left := 964;\r\n btnClose.Top := 0;\r\n btnClose.Width := 90;\r\n btnClose.Height := 41;\r\n btnClose.Cursor := crHandPoint;\r\n btnClose.Hint := 'Close';\r\n btnClose.Align := alRight;\r\n btnClose.Caption := 'Close';\r\n btnClose.Color := clNone;\r\n btnClose.ElementClassName := 'btn_icon';\r\n btnClose.Font.Charset := DEFAULT_CHARSET;\r\n btnClose.Font.Color := clGray;\r\n btnClose.Font.Height := -13;\r\n btnClose.Font.Name := 'Tahoma';\r\n btnClose.Font.Style := [];\r\n btnClose.HeightPercent := 100.000000000000000000;\r\n btnClose.MaterialGlyph := 'close';\r\n btnClose.MaterialGlyphSize := 1;\r\n btnClose.ParentFont := False;\r\n btnClose.TabOrder := 11;\r\n btnClose.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnClose, Self, 'OnClick', 'btnCloseClick');\r\n btnCustom6.SetParentComponent(pnlFormButtons);\r\n btnCustom6.Name := 'btnCustom6';\r\n btnCustom6.Left := 844;\r\n btnCustom6.Top := 0;\r\n btnCustom6.Width := 30;\r\n btnCustom6.Height := 41;\r\n btnCustom6.Cursor := crHandPoint;\r\n btnCustom6.Align := alRight;\r\n btnCustom6.Caption := 'Custom6';\r\n btnCustom6.Color := clNone;\r\n btnCustom6.ElementClassName := 'btn_icon';\r\n btnCustom6.Font.Charset := DEFAULT_CHARSET;\r\n btnCustom6.Font.Color := clGray;\r\n btnCustom6.Font.Height := -13;\r\n btnCustom6.Font.Name := 'Tahoma';\r\n btnCustom6.Font.Style := [];\r\n btnCustom6.HeightPercent := 100.000000000000000000;\r\n btnCustom6.ParentFont := False;\r\n btnCustom6.Visible := False;\r\n btnCustom6.WidthPercent := 100.000000000000000000;\r\n btnCustom7.SetParentComponent(pnlFormButtons);\r\n btnCustom7.Name := 'btnCustom7';\r\n btnCustom7.Left := 874;\r\n btnCustom7.Top := 0;\r\n btnCustom7.Width := 30;\r\n btnCustom7.Height := 41;\r\n btnCustom7.Cursor := crHandPoint;\r\n btnCustom7.Align := alRight;\r\n btnCustom7.Caption := 'Custom7';\r\n btnCustom7.Color := clNone;\r\n btnCustom7.ElementClassName := 'btn_icon';\r\n btnCustom7.Font.Charset := DEFAULT_CHARSET;\r\n btnCustom7.Font.Color := clGray;\r\n btnCustom7.Font.Height := -13;\r\n btnCustom7.Font.Name := 'Tahoma';\r\n btnCustom7.Font.Style := [];\r\n btnCustom7.HeightPercent := 100.000000000000000000;\r\n btnCustom7.ParentFont := False;\r\n btnCustom7.Visible := False;\r\n btnCustom7.WidthPercent := 100.000000000000000000;\r\n btnCustom8.SetParentComponent(pnlFormButtons);\r\n btnCustom8.Name := 'btnCustom8';\r\n btnCustom8.Left := 904;\r\n btnCustom8.Top := 0;\r\n btnCustom8.Width := 30;\r\n btnCustom8.Height := 41;\r\n btnCustom8.Cursor := crHandPoint;\r\n btnCustom8.Align := alRight;\r\n btnCustom8.Caption := 'Custom8';\r\n btnCustom8.Color := clNone;\r\n btnCustom8.ElementClassName := 'btn_icon';\r\n btnCustom8.Font.Charset := DEFAULT_CHARSET;\r\n btnCustom8.Font.Color := clGray;\r\n btnCustom8.Font.Height := -13;\r\n btnCustom8.Font.Name := 'Tahoma';\r\n btnCustom8.Font.Style := [];\r\n btnCustom8.HeightPercent := 100.000000000000000000;\r\n btnCustom8.ParentFont := False;\r\n btnCustom8.Visible := False;\r\n btnCustom8.WidthPercent := 100.000000000000000000;\r\n btnCustom9.SetParentComponent(pnlFormButtons);\r\n btnCustom9.Name := 'btnCustom9';\r\n btnCustom9.Left := 934;\r\n btnCustom9.Top := 0;\r\n btnCustom9.Width := 30;\r\n btnCustom9.Height := 41;\r\n btnCustom9.Cursor := crHandPoint;\r\n btnCustom9.Align := alRight;\r\n btnCustom9.Caption := 'Custom9';\r\n btnCustom9.Color := clNone;\r\n btnCustom9.ElementClassName := 'btn_icon';\r\n btnCustom9.Font.Charset := DEFAULT_CHARSET;\r\n btnCustom9.Font.Color := clGray;\r\n btnCustom9.Font.Height := -13;\r\n btnCustom9.Font.Name := 'Tahoma';\r\n btnCustom9.Font.Style := [];\r\n btnCustom9.HeightPercent := 100.000000000000000000;\r\n btnCustom9.ParentFont := False;\r\n btnCustom9.Visible := False;\r\n btnCustom9.WidthPercent := 100.000000000000000000;\r\n finally\r\n pnlFormCaption.AfterLoadDFMValues;\r\n pnlBottom.AfterLoadDFMValues;\r\n pnlFormButtons.AfterLoadDFMValues;\r\n btnCustom1.AfterLoadDFMValues;\r\n btnCustom2.AfterLoadDFMValues;\r\n btnCustom3.AfterLoadDFMValues;\r\n btnCustom4.AfterLoadDFMValues;\r\n btnCustom5.AfterLoadDFMValues;\r\n btnClose.AfterLoadDFMValues;\r\n btnCustom6.AfterLoadDFMValues;\r\n btnCustom7.AfterLoadDFMValues;\r\n btnCustom8.AfterLoadDFMValues;\r\n btnCustom9.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","unit DBFieldSettings;\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.StdCtrls, WEBLib.StdCtrls,\r\n WEBLib.ComCtrls, Vcl.Controls, WEBLib.ExtCtrls, WEBLib.Clipboard;\r\n\r\ntype\r\n TfrmDBFieldSettings = class(TForm)\r\n pnlDBFieldSettings: TPanel;\r\n WebPanel15: TPanel;\r\n WebPanel23: TPanel;\r\n WebLabel5: TLabel;\r\n WebLabel6: TLabel;\r\n WebLabel7: TLabel;\r\n clrDBField_Color: TColorPicker;\r\n chDBF_DoUpdate: TCheckBox;\r\n chDBF_DoInsert: TCheckBox;\r\n WebPanel24: TPanel;\r\n WebPageControl1: TPageControl;\r\n WebPageControl1Sheet1: TTabSheet;\r\n memDBField_customselect: TMemo;\r\n WebPageControl1Sheet2: TTabSheet;\r\n memDBField_Update: TMemo;\r\n WebPageControl1Sheet3: TTabSheet;\r\n memDBField_Insert: TMemo;\r\n WebPageControl1Sheet4: TTabSheet;\r\n memDBField_HTMLTemplate: TMemo;\r\n WebPageControl1Sheet5: TTabSheet;\r\n memDBField_CopyToBlocks: TMemo;\r\n WebPageControl1Sheet6: TTabSheet;\r\n memDBField_SentenceTMP: TMemo;\r\n WebMemo11: TMemo;\r\n pnlDBFieldSetupCaption: TPanel;\r\n pnlFormButtons: TPanel;\r\n btnClose: TBitBtn;\r\n btnSave: TBitBtn;\r\n btnClear: TBitBtn;\r\n WebLabel1: TLabel;\r\n seDBF_BlockWidth: TSpinEdit;\r\n cbQuickData: TComboBox;\r\n WebPanel1: TPanel;\r\n WebLabel317: TLabel;\r\n WebLabel319: TLabel;\r\n WebLabel320: TLabel;\r\n WebLabel322: TLabel;\r\n WebLabel325: TLabel;\r\n WebPanel2: TPanel;\r\n edDBField_Table: TEdit;\r\n edDBField_Column: TEdit;\r\n WebPanel3: TPanel;\r\n WebPanel4: TPanel;\r\n edDBField_Key3: TEdit;\r\n edDBField_Key2: TEdit;\r\n edDBField_Key1: TEdit;\r\n WebPanel14: TPanel;\r\n cbDBField_Key1Source: TComboBox;\r\n cbDBField_Key2Source: TComboBox;\r\n cbDBField_Key3Source: TComboBox;\r\n WebLabel2: TLabel;\r\n WebPageControl1Sheet7: TTabSheet;\r\n WebMemo1: TMemo;\r\n memBlockVisibilityCondition: TMemo;\r\n WebPageControl1Sheet8: TTabSheet;\r\n memEGVvariables: TMemo;\r\n WebMemo3: TMemo;\r\n cbEGV: TComboBox;\r\n WebLabel4: TLabel;\r\n chDBF_IncludeInDefault: TCheckBox;\r\n WebMemo2: TMemo;\r\n WebLabel8: TLabel;\r\n chDBF_HideWhenEmpty: TCheckBox;\r\n btnCopy: TBitBtn;\r\n btnPaste: TBitBtn;\r\n WebLabel9: TLabel;\r\n seDBF_BlockHeight: TSpinEdit;\r\n chDBF_ApplyColor: TCheckBox;\r\n WebLabel10: TLabel;\r\n WebLabel11: TLabel;\r\n seDBF_BlockTop: TSpinEdit;\r\n seDBF_BlockLeft: TSpinEdit;\r\n WebLabel12: TLabel;\r\n WebLabel13: TLabel;\r\n lbDBF_BlockTop: TLabel;\r\n lbDBF_BlockLeft: TLabel;\r\n WebLabel14: TLabel;\r\n edDBField_EditMask: TEdit;\r\n WebMemo4: TMemo;\r\n WebMemo5: TMemo;\r\n WebMemo6: TMemo;\r\n WebLabel3: TLabel;\r\n edCERNER_Search: TEdit;\r\n ClipBoard: TClipboard;\r\n procedure btnSaveClick(Sender: TObject);\r\n procedure btnCloseClick(Sender: TObject);\r\n procedure btnClearClick(Sender: TObject);\r\n procedure cbQuickDataChange(Sender: TObject);\r\n function SelectEGV(m: string; c: string): string;\r\n procedure cbEGVChange(Sender: TObject);\r\n procedure Save(mode: integer);\r\n procedure btnCopyClick(Sender: TObject);\r\n [async] procedure btnPasteClick(Sender: TObject); async;\r\n procedure WebFormShow(Sender: TObject); //0- save, 1- save as a copy\r\n private\r\n { Private declarations }\r\n public\r\n { Public declarations }\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmDBFieldSettings: TfrmDBFieldSettings;\r\n\r\nimplementation\r\n\r\n{$R *.dfm}\r\n\r\nuses Common, DataModule, Main;\r\n\r\nprocedure TfrmDBFieldSettings.btnClearClick(Sender: TObject);\r\nbegin\r\neddbfield_table.text := '';\r\neddbfield_column.text := '';\r\neddbfield_key1.text := '';\r\neddbfield_key2.text := '';\r\neddbfield_key3.text := '';\r\ncbdbfield_key1source.itemindex := -1;\r\ncbdbfield_key2source.itemindex := -1;\r\ncbdbfield_key3source.itemindex := -1;\r\nclrdbfield_color.Color := clwhite;\r\nmemDBField_customselect.text := '';\r\nmemDBField_update.text := '';\r\nmemDBField_insert.text := '';\r\nmemDBField_HTMLTemplate.text := '';\r\nmemDBField_CopyToBlocks.text := '';\r\nmemDBField_SentenceTMP.text := '';\r\nmemBlockVisibilityCondition.text := '';\r\nseDBF_BlockWidth.value := 0;\r\ncbQuickData.ItemIndex := -1;\r\nmemEGVvariables.text := '';\r\nchDBF_DoUpdate.checked := false;\r\nchDBF_DoInsert.checked := false;\r\nchDBF_IncludeInDefault.checked := false;\r\nchDBF_HideWhenEmpty.checked := false;\r\nseDBF_BlockHeight.value := 0;\r\nchDBF_ApplyColor.checked := false;\r\nseDBF_BlockHeight.Value := 0;\r\nseDBF_BlockHeight.Value := 0;\r\nedDBField_EditMask.Text := '';\r\nedCERNER_Search.Text := '';\r\n\r\nend;\r\n\r\nprocedure TfrmDBFieldSettings.btnCloseClick(Sender: TObject);\r\nbegin\r\nself.Close;\r\nend;\r\n\r\nprocedure TfrmDBFieldSettings.btnCopyClick(Sender: TObject);\r\nbegin\r\nSave(1);\r\nend;\r\n\r\nprocedure TfrmDBFieldSettings.btnSaveClick(Sender: TObject);\r\nbegin\r\nSave(0);\r\n//showmessage(dm.EGV_LOCALSTORAGE.values['DBF_' + EGV_BLOCKUNIQUEID]);\r\n//showmessage('block id: (settings) ' + EGV_BLOCKUNIQUEID);\r\nif assigned(getcurrentform)\r\nthen begin\r\n if assigned(getcurrentform.findcomponent('sbSearch'))\r\n then SwitchFormDesign(GetCurrentForm, (getcurrentform.findcomponent('sbSearch') as Tscrollbox), 20)\r\n else SwitchFormDesign(GetCurrentForm);\r\n DBF_GetPostBlocks( (getcurrentform.findcomponent('SUBFORM_DIV') as Tscrollbox), 0);\r\n end;\r\n\r\nself.Close;\r\nend;\r\n\r\nprocedure TfrmDBFieldSettings.btnPasteClick(Sender: TObject);\r\nvar text_p: string;\r\nbegin\r\n\r\n asm\r\n text_p = await navigator.clipboard.readText();\r\n end;\r\n\r\nDBF_FillSettings(text_p, self);\r\n\r\n//DBF_FillSettings(dm.EGV_SESSIONSTORAGE.values['DBF_SETTINGS_COPY'], self);\r\nend;\r\n\r\nprocedure TfrmDBFieldSettings.cbEGVChange(Sender: TObject);\r\nbegin\r\nmemEGVvariables.Text := SelectEGV(memEGVvariables.Text, cbEGV.text);\r\ncbEGV.ItemIndex := -1;\r\nend;\r\n\r\nprocedure TfrmDBFieldSettings.cbQuickDataChange(Sender: TObject);\r\nbegin\r\nmemDBField_customselect.Text := SelectEGV(memDBField_customselect.Text, cbQuickData.text);\r\ncbQuickData.ItemIndex := -1;\r\nend;\r\n\r\nfunction TfrmDBFieldSettings.SelectEGV(m: string; c: string): string;\r\nvar s: string;\r\nbegin\r\nif m <> '' then m := m + ', ';\r\nc := trim(c);\r\nif c = 'Patient MRN' then m := m + 'EGV_CURRENT_MRN';\r\nif c = 'Appointment ID' then m := m + 'EGV_CURRENT_PROCEDURENUMBER';\r\nif c = 'Appointment Name' then m := m + 'EGV_CURRENT_APPTNAME';\r\nif c = 'Appointment Type' then m := m + 'EGV_CURRENT_APPTTYPE';\r\nif c = 'Service Provider' then m := m + 'EGV_CURRENT_PROVIDER';\r\nif c = 'Facility Name' then m := m + 'EGV_FACILITY';\r\nif c = 'Facility ID' then m := m + 'EGV_FACILITYID';\r\nif c = 'User Name' then m := m + 'EGV_USERNAME';\r\nif c = 'User ID' then m := m + 'EGV_USERID';\r\nif c = 'User Role' then m := m + 'EGV_USERROLE';\r\nif c = 'Database Name' then m := m + 'EGV_FACILITYDBNAME';\r\nif c = 'Current Date' then m := m + 'EGV_CURRENTDATE';\r\nif c = 'Current Time' then m := m + 'EGV_CURRENTTIME';\r\nif c = 'Facility Setup ID' then m := m + 'EGV_SETUPFACILITYID';\r\nResult := m;\r\nend;\r\n\r\nprocedure TfrmDBFieldSettings.WebFormShow(Sender: TObject);\r\nbegin\r\n\r\nlbDBF_BlockTop.Caption := inttostr(EGV_CURRENTBLOCK.Top);\r\nlbDBF_BlockLeft.Caption := inttostr(EGV_CURRENTBLOCK.Left);\r\nResizeButtons(pnlFormButtons);\r\nend;\r\n\r\nprocedure TfrmDBFieldSettings.Save(mode: integer); //0- save, 1- save as a copy\r\nvar s1, s2, s3, s4, s5, settings_p: string;\r\nbegin\r\nif chDBF_DoUpdate.checked then s1 := '1' else s1 := '0';\r\nif chDBF_DoInsert.checked then s2 := '1' else s2 := '0';\r\nif chDBF_IncludeInDefault.checked then s3 := '1' else s3 := '0';\r\nif chDBF_HideWhenEmpty.checked then s4 := '1' else s4 := '0';\r\nif chDBF_ApplyColor.checked then s5 := '1' else s5 := '0';\r\n\r\nsettings_p :=\r\neddbfield_table.text + '|' +\r\neddbfield_column.text + '|' +\r\neddbfield_key1.text + '|' +\r\neddbfield_key2.text + '|' +\r\neddbfield_key3.text + '|' +\r\ncbdbfield_key1source.text + '|' +\r\ncbdbfield_key2source.text + '|' +\r\ncbdbfield_key3source.text + '|' +\r\nmemDBField_customselect.text + '|' +\r\nColortoString(clrdbfield_color.color) + '|' +\r\nmemDBField_Update.text + '|' +\r\nmemDBField_Insert.text + '|' +\r\nmemDBField_HTMLTemplate.text + '|' +\r\nmemDBField_CopyToBlocks.text + '|' +\r\ns1 + '|' +\r\ns2 + '|' +\r\nmemDBField_SentenceTMP.text + '|' +\r\ninttostr(seDBF_BlockWidth.Value) + '|' +\r\nmemBlockVisibilityCondition.text + '|' +\r\nmemEGVvariables.text + '|' +\r\ns3 + '|' +\r\ns4 + '|' +\r\ninttostr(seDBF_BlockHeight.Value) + '|' +\r\ns5 + '|' +\r\ninttostr(seDBF_BlockTop.Value) + '|' +\r\ninttostr(seDBF_BlockLeft.Value) + '|' +\r\neddbfield_editmask.text + '|' +\r\nedCERNER_Search.text ;\r\n\r\n\r\n//showmessage(settings_p);\r\n\r\n// make a copy to use for pasting .\r\nif mode = 1\r\nthen Clipboard.CopyToClipboard(settings_p) //dm.EGV_SESSIONSTORAGE.values['DBF_SETTINGS_COPY'] := settings_p\r\nelse dm.EGV_LOCALSTORAGE.values['DBF_' + EGV_BLOCKUNIQUEID] := settings_p;\r\n\r\nend;\r\n\r\nprocedure TfrmDBFieldSettings.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n pnlDBFieldSettings := TPanel.Create(Self);\r\n WebPanel15 := TPanel.Create(Self);\r\n WebPanel1 := TPanel.Create(Self);\r\n WebLabel317 := TLabel.Create(Self);\r\n WebLabel319 := TLabel.Create(Self);\r\n WebLabel320 := TLabel.Create(Self);\r\n WebLabel322 := TLabel.Create(Self);\r\n WebLabel325 := TLabel.Create(Self);\r\n WebPanel2 := TPanel.Create(Self);\r\n edDBField_Table := TEdit.Create(Self);\r\n edDBField_Column := TEdit.Create(Self);\r\n WebPanel3 := TPanel.Create(Self);\r\n WebLabel2 := TLabel.Create(Self);\r\n WebPanel4 := TPanel.Create(Self);\r\n edDBField_Key3 := TEdit.Create(Self);\r\n edDBField_Key2 := TEdit.Create(Self);\r\n edDBField_Key1 := TEdit.Create(Self);\r\n WebPanel14 := TPanel.Create(Self);\r\n cbDBField_Key1Source := TComboBox.Create(Self);\r\n cbDBField_Key2Source := TComboBox.Create(Self);\r\n cbDBField_Key3Source := TComboBox.Create(Self);\r\n WebPanel23 := TPanel.Create(Self);\r\n WebLabel5 := TLabel.Create(Self);\r\n WebLabel6 := TLabel.Create(Self);\r\n WebLabel7 := TLabel.Create(Self);\r\n WebLabel1 := TLabel.Create(Self);\r\n WebLabel4 := TLabel.Create(Self);\r\n WebLabel8 := TLabel.Create(Self);\r\n WebLabel9 := TLabel.Create(Self);\r\n WebLabel10 := TLabel.Create(Self);\r\n WebLabel11 := TLabel.Create(Self);\r\n WebLabel12 := TLabel.Create(Self);\r\n WebLabel13 := TLabel.Create(Self);\r\n lbDBF_BlockTop := TLabel.Create(Self);\r\n lbDBF_BlockLeft := TLabel.Create(Self);\r\n WebLabel14 := TLabel.Create(Self);\r\n WebLabel3 := TLabel.Create(Self);\r\n clrDBField_Color := TColorPicker.Create(Self);\r\n chDBF_DoUpdate := TCheckBox.Create(Self);\r\n chDBF_DoInsert := TCheckBox.Create(Self);\r\n seDBF_BlockWidth := TSpinEdit.Create(Self);\r\n chDBF_IncludeInDefault := TCheckBox.Create(Self);\r\n chDBF_HideWhenEmpty := TCheckBox.Create(Self);\r\n seDBF_BlockHeight := TSpinEdit.Create(Self);\r\n chDBF_ApplyColor := TCheckBox.Create(Self);\r\n seDBF_BlockTop := TSpinEdit.Create(Self);\r\n seDBF_BlockLeft := TSpinEdit.Create(Self);\r\n edDBField_EditMask := TEdit.Create(Self);\r\n edCERNER_Search := TEdit.Create(Self);\r\n WebPanel24 := TPanel.Create(Self);\r\n WebPageControl1 := TPageControl.Create(Self);\r\n WebPageControl1Sheet1 := TTabSheet.Create(Self);\r\n memDBField_customselect := TMemo.Create(Self);\r\n cbQuickData := TComboBox.Create(Self);\r\n WebMemo2 := TMemo.Create(Self);\r\n WebPageControl1Sheet2 := TTabSheet.Create(Self);\r\n memDBField_Update := TMemo.Create(Self);\r\n WebMemo5 := TMemo.Create(Self);\r\n WebPageControl1Sheet3 := TTabSheet.Create(Self);\r\n memDBField_Insert := TMemo.Create(Self);\r\n WebMemo6 := TMemo.Create(Self);\r\n WebPageControl1Sheet4 := TTabSheet.Create(Self);\r\n memDBField_HTMLTemplate := TMemo.Create(Self);\r\n WebPageControl1Sheet5 := TTabSheet.Create(Self);\r\n memDBField_CopyToBlocks := TMemo.Create(Self);\r\n WebMemo4 := TMemo.Create(Self);\r\n WebPageControl1Sheet6 := TTabSheet.Create(Self);\r\n memDBField_SentenceTMP := TMemo.Create(Self);\r\n WebMemo11 := TMemo.Create(Self);\r\n WebPageControl1Sheet7 := TTabSheet.Create(Self);\r\n WebMemo1 := TMemo.Create(Self);\r\n memBlockVisibilityCondition := TMemo.Create(Self);\r\n WebPageControl1Sheet8 := TTabSheet.Create(Self);\r\n memEGVvariables := TMemo.Create(Self);\r\n WebMemo3 := TMemo.Create(Self);\r\n cbEGV := TComboBox.Create(Self);\r\n pnlDBFieldSetupCaption := TPanel.Create(Self);\r\n pnlFormButtons := TPanel.Create(Self);\r\n btnClose := TBitBtn.Create(Self);\r\n btnSave := TBitBtn.Create(Self);\r\n btnClear := TBitBtn.Create(Self);\r\n btnCopy := TBitBtn.Create(Self);\r\n btnPaste := TBitBtn.Create(Self);\r\n ClipBoard := TClipboard.Create(Self);\r\n\r\n pnlDBFieldSettings.BeforeLoadDFMValues;\r\n WebPanel15.BeforeLoadDFMValues;\r\n WebPanel1.BeforeLoadDFMValues;\r\n WebLabel317.BeforeLoadDFMValues;\r\n WebLabel319.BeforeLoadDFMValues;\r\n WebLabel320.BeforeLoadDFMValues;\r\n WebLabel322.BeforeLoadDFMValues;\r\n WebLabel325.BeforeLoadDFMValues;\r\n WebPanel2.BeforeLoadDFMValues;\r\n edDBField_Table.BeforeLoadDFMValues;\r\n edDBField_Column.BeforeLoadDFMValues;\r\n WebPanel3.BeforeLoadDFMValues;\r\n WebLabel2.BeforeLoadDFMValues;\r\n WebPanel4.BeforeLoadDFMValues;\r\n edDBField_Key3.BeforeLoadDFMValues;\r\n edDBField_Key2.BeforeLoadDFMValues;\r\n edDBField_Key1.BeforeLoadDFMValues;\r\n WebPanel14.BeforeLoadDFMValues;\r\n cbDBField_Key1Source.BeforeLoadDFMValues;\r\n cbDBField_Key2Source.BeforeLoadDFMValues;\r\n cbDBField_Key3Source.BeforeLoadDFMValues;\r\n WebPanel23.BeforeLoadDFMValues;\r\n WebLabel5.BeforeLoadDFMValues;\r\n WebLabel6.BeforeLoadDFMValues;\r\n WebLabel7.BeforeLoadDFMValues;\r\n WebLabel1.BeforeLoadDFMValues;\r\n WebLabel4.BeforeLoadDFMValues;\r\n WebLabel8.BeforeLoadDFMValues;\r\n WebLabel9.BeforeLoadDFMValues;\r\n WebLabel10.BeforeLoadDFMValues;\r\n WebLabel11.BeforeLoadDFMValues;\r\n WebLabel12.BeforeLoadDFMValues;\r\n WebLabel13.BeforeLoadDFMValues;\r\n lbDBF_BlockTop.BeforeLoadDFMValues;\r\n lbDBF_BlockLeft.BeforeLoadDFMValues;\r\n WebLabel14.BeforeLoadDFMValues;\r\n WebLabel3.BeforeLoadDFMValues;\r\n clrDBField_Color.BeforeLoadDFMValues;\r\n chDBF_DoUpdate.BeforeLoadDFMValues;\r\n chDBF_DoInsert.BeforeLoadDFMValues;\r\n seDBF_BlockWidth.BeforeLoadDFMValues;\r\n chDBF_IncludeInDefault.BeforeLoadDFMValues;\r\n chDBF_HideWhenEmpty.BeforeLoadDFMValues;\r\n seDBF_BlockHeight.BeforeLoadDFMValues;\r\n chDBF_ApplyColor.BeforeLoadDFMValues;\r\n seDBF_BlockTop.BeforeLoadDFMValues;\r\n seDBF_BlockLeft.BeforeLoadDFMValues;\r\n edDBField_EditMask.BeforeLoadDFMValues;\r\n edCERNER_Search.BeforeLoadDFMValues;\r\n WebPanel24.BeforeLoadDFMValues;\r\n WebPageControl1.BeforeLoadDFMValues;\r\n WebPageControl1Sheet1.BeforeLoadDFMValues;\r\n memDBField_customselect.BeforeLoadDFMValues;\r\n cbQuickData.BeforeLoadDFMValues;\r\n WebMemo2.BeforeLoadDFMValues;\r\n WebPageControl1Sheet2.BeforeLoadDFMValues;\r\n memDBField_Update.BeforeLoadDFMValues;\r\n WebMemo5.BeforeLoadDFMValues;\r\n WebPageControl1Sheet3.BeforeLoadDFMValues;\r\n memDBField_Insert.BeforeLoadDFMValues;\r\n WebMemo6.BeforeLoadDFMValues;\r\n WebPageControl1Sheet4.BeforeLoadDFMValues;\r\n memDBField_HTMLTemplate.BeforeLoadDFMValues;\r\n WebPageControl1Sheet5.BeforeLoadDFMValues;\r\n memDBField_CopyToBlocks.BeforeLoadDFMValues;\r\n WebMemo4.BeforeLoadDFMValues;\r\n WebPageControl1Sheet6.BeforeLoadDFMValues;\r\n memDBField_SentenceTMP.BeforeLoadDFMValues;\r\n WebMemo11.BeforeLoadDFMValues;\r\n WebPageControl1Sheet7.BeforeLoadDFMValues;\r\n WebMemo1.BeforeLoadDFMValues;\r\n memBlockVisibilityCondition.BeforeLoadDFMValues;\r\n WebPageControl1Sheet8.BeforeLoadDFMValues;\r\n memEGVvariables.BeforeLoadDFMValues;\r\n WebMemo3.BeforeLoadDFMValues;\r\n cbEGV.BeforeLoadDFMValues;\r\n pnlDBFieldSetupCaption.BeforeLoadDFMValues;\r\n pnlFormButtons.BeforeLoadDFMValues;\r\n btnClose.BeforeLoadDFMValues;\r\n btnSave.BeforeLoadDFMValues;\r\n btnClear.BeforeLoadDFMValues;\r\n btnCopy.BeforeLoadDFMValues;\r\n btnPaste.BeforeLoadDFMValues;\r\n ClipBoard.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmDBFieldSettings';\r\n Width := 800;\r\n Height := 700;\r\n ElementClassName := 'BOX_FORM_BORDER';\r\n Shadow := False;\r\n ShowClose := False;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n pnlDBFieldSettings.SetParentComponent(Self);\r\n pnlDBFieldSettings.Name := 'pnlDBFieldSettings';\r\n pnlDBFieldSettings.Tag := -1;\r\n pnlDBFieldSettings.Left := 0;\r\n pnlDBFieldSettings.Top := 0;\r\n pnlDBFieldSettings.Width := 800;\r\n pnlDBFieldSettings.Height := 700;\r\n pnlDBFieldSettings.ElementClassName := 'BOX_ROUND_BORDER';\r\n pnlDBFieldSettings.Align := alClient;\r\n pnlDBFieldSettings.ChildOrder := 8;\r\n pnlDBFieldSettings.Color := clWhite;\r\n pnlDBFieldSettings.TabOrder := 0;\r\n WebPanel15.SetParentComponent(pnlDBFieldSettings);\r\n WebPanel15.Name := 'WebPanel15';\r\n WebPanel15.Left := 0;\r\n WebPanel15.Top := 27;\r\n WebPanel15.Width := 800;\r\n WebPanel15.Height := 132;\r\n WebPanel15.Align := alTop;\r\n WebPanel15.BorderStyle := bsNone;\r\n WebPanel15.ChildOrder := 7;\r\n WebPanel15.Color := clWhite;\r\n WebPanel15.TabOrder := 0;\r\n WebPanel1.SetParentComponent(WebPanel15);\r\n WebPanel1.Name := 'WebPanel1';\r\n WebPanel1.Left := 0;\r\n WebPanel1.Top := 0;\r\n WebPanel1.Width := 87;\r\n WebPanel1.Height := 132;\r\n WebPanel1.Align := alLeft;\r\n WebPanel1.BorderStyle := bsNone;\r\n WebPanel1.ChildOrder := 5;\r\n WebPanel1.Color := clWhite;\r\n WebPanel1.TabOrder := 0;\r\n WebLabel317.SetParentComponent(WebPanel1);\r\n WebLabel317.Name := 'WebLabel317';\r\n WebLabel317.Left := 3;\r\n WebLabel317.Top := 62;\r\n WebLabel317.Width := 63;\r\n WebLabel317.Height := 13;\r\n WebLabel317.Caption := 'Key column 1';\r\n WebLabel317.ElementLabelClassName := 'text_normal';\r\n WebLabel317.ElementFont := efCSS;\r\n WebLabel317.HeightPercent := 100.000000000000000000;\r\n WebLabel317.WidthPercent := 100.000000000000000000;\r\n WebLabel319.SetParentComponent(WebPanel1);\r\n WebLabel319.Name := 'WebLabel319';\r\n WebLabel319.Left := 3;\r\n WebLabel319.Top := 5;\r\n WebLabel319.Width := 42;\r\n WebLabel319.Height := 13;\r\n WebLabel319.Caption := 'DB Table';\r\n WebLabel319.ElementLabelClassName := 'text_normal';\r\n WebLabel319.ElementFont := efCSS;\r\n WebLabel319.HeightPercent := 100.000000000000000000;\r\n WebLabel319.WidthPercent := 100.000000000000000000;\r\n WebLabel320.SetParentComponent(WebPanel1);\r\n WebLabel320.Name := 'WebLabel320';\r\n WebLabel320.Left := 3;\r\n WebLabel320.Top := 104;\r\n WebLabel320.Width := 63;\r\n WebLabel320.Height := 13;\r\n WebLabel320.Caption := 'Key column 3';\r\n WebLabel320.ElementLabelClassName := 'text_normal';\r\n WebLabel320.ElementFont := efCSS;\r\n WebLabel320.HeightPercent := 100.000000000000000000;\r\n WebLabel320.WidthPercent := 100.000000000000000000;\r\n WebLabel322.SetParentComponent(WebPanel1);\r\n WebLabel322.Name := 'WebLabel322';\r\n WebLabel322.Left := 3;\r\n WebLabel322.Top := 26;\r\n WebLabel322.Width := 35;\r\n WebLabel322.Height := 13;\r\n WebLabel322.Caption := 'Column';\r\n WebLabel322.ElementLabelClassName := 'text_normal';\r\n WebLabel322.ElementFont := efCSS;\r\n WebLabel322.HeightPercent := 100.000000000000000000;\r\n WebLabel322.WidthPercent := 100.000000000000000000;\r\n WebLabel325.SetParentComponent(WebPanel1);\r\n WebLabel325.Name := 'WebLabel325';\r\n WebLabel325.Left := 3;\r\n WebLabel325.Top := 83;\r\n WebLabel325.Width := 63;\r\n WebLabel325.Height := 13;\r\n WebLabel325.Caption := 'Key column 2';\r\n WebLabel325.ElementLabelClassName := 'text_normal';\r\n WebLabel325.ElementFont := efCSS;\r\n WebLabel325.HeightPercent := 100.000000000000000000;\r\n WebLabel325.WidthPercent := 100.000000000000000000;\r\n WebPanel2.SetParentComponent(WebPanel15);\r\n WebPanel2.Name := 'WebPanel2';\r\n WebPanel2.Left := 87;\r\n WebPanel2.Top := 0;\r\n WebPanel2.Width := 713;\r\n WebPanel2.Height := 132;\r\n WebPanel2.Align := alClient;\r\n WebPanel2.BorderColor := clWhite;\r\n WebPanel2.BorderStyle := bsNone;\r\n WebPanel2.ChildOrder := 7;\r\n WebPanel2.Color := clWhite;\r\n WebPanel2.TabOrder := 1;\r\n edDBField_Table.SetParentComponent(WebPanel2);\r\n edDBField_Table.Name := 'edDBField_Table';\r\n edDBField_Table.Left := 0;\r\n edDBField_Table.Top := 0;\r\n edDBField_Table.Width := 713;\r\n edDBField_Table.Height := 22;\r\n edDBField_Table.Align := alTop;\r\n edDBField_Table.BorderStyle := bsNone;\r\n edDBField_Table.ChildOrder := 15;\r\n edDBField_Table.Color := clSilver;\r\n edDBField_Table.ElementClassName := 'box_bottomborder_font_normal';\r\n edDBField_Table.ElementFont := efCSS;\r\n edDBField_Table.HeightPercent := 100.000000000000000000;\r\n edDBField_Table.ShowFocus := False;\r\n edDBField_Table.TabOrder := 1;\r\n edDBField_Table.WidthPercent := 100.000000000000000000;\r\n edDBField_Column.SetParentComponent(WebPanel2);\r\n edDBField_Column.Name := 'edDBField_Column';\r\n edDBField_Column.Left := 0;\r\n edDBField_Column.Top := 22;\r\n edDBField_Column.Width := 713;\r\n edDBField_Column.Height := 22;\r\n edDBField_Column.Align := alTop;\r\n edDBField_Column.BorderStyle := bsNone;\r\n edDBField_Column.ChildOrder := 15;\r\n edDBField_Column.Color := clSilver;\r\n edDBField_Column.ElementClassName := 'box_bottomborder_font_normal';\r\n edDBField_Column.ElementFont := efCSS;\r\n edDBField_Column.HeightPercent := 100.000000000000000000;\r\n edDBField_Column.ShowFocus := False;\r\n edDBField_Column.TabOrder := 2;\r\n edDBField_Column.WidthPercent := 100.000000000000000000;\r\n WebPanel3.SetParentComponent(WebPanel2);\r\n WebPanel3.Name := 'WebPanel3';\r\n WebPanel3.Left := 0;\r\n WebPanel3.Top := 59;\r\n WebPanel3.Width := 713;\r\n WebPanel3.Height := 73;\r\n WebPanel3.Align := alBottom;\r\n WebPanel3.BorderColor := clWhite;\r\n WebPanel3.BorderStyle := bsNone;\r\n WebPanel3.ChildOrder := 6;\r\n WebPanel3.Color := clWhite;\r\n WebPanel3.TabOrder := 2;\r\n WebLabel2.SetParentComponent(WebPanel3);\r\n WebLabel2.Name := 'WebLabel2';\r\n WebLabel2.Left := 161;\r\n WebLabel2.Top := 0;\r\n WebLabel2.Width := 3;\r\n WebLabel2.Height := 73;\r\n WebLabel2.Align := alLeft;\r\n WebLabel2.HeightPercent := 100.000000000000000000;\r\n WebLabel2.WidthPercent := 100.000000000000000000;\r\n WebPanel4.SetParentComponent(WebPanel3);\r\n WebPanel4.Name := 'WebPanel4';\r\n WebPanel4.Left := 0;\r\n WebPanel4.Top := 0;\r\n WebPanel4.Width := 161;\r\n WebPanel4.Height := 73;\r\n WebPanel4.Align := alLeft;\r\n WebPanel4.BorderColor := clWhite;\r\n WebPanel4.BorderStyle := bsNone;\r\n WebPanel4.Color := clWhite;\r\n WebPanel4.TabOrder := 0;\r\n edDBField_Key3.SetParentComponent(WebPanel4);\r\n edDBField_Key3.Name := 'edDBField_Key3';\r\n edDBField_Key3.Left := 0;\r\n edDBField_Key3.Top := 42;\r\n edDBField_Key3.Width := 161;\r\n edDBField_Key3.Height := 21;\r\n edDBField_Key3.Align := alTop;\r\n edDBField_Key3.BorderStyle := bsNone;\r\n edDBField_Key3.ChildOrder := 15;\r\n edDBField_Key3.Color := clSilver;\r\n edDBField_Key3.ElementClassName := 'box_bottomborder_font_normal';\r\n edDBField_Key3.ElementFont := efCSS;\r\n edDBField_Key3.HeightPercent := 100.000000000000000000;\r\n edDBField_Key3.ShowFocus := False;\r\n edDBField_Key3.TabOrder := 5;\r\n edDBField_Key3.WidthPercent := 100.000000000000000000;\r\n edDBField_Key2.SetParentComponent(WebPanel4);\r\n edDBField_Key2.Name := 'edDBField_Key2';\r\n edDBField_Key2.Left := 0;\r\n edDBField_Key2.Top := 21;\r\n edDBField_Key2.Width := 161;\r\n edDBField_Key2.Height := 21;\r\n edDBField_Key2.Align := alTop;\r\n edDBField_Key2.BorderStyle := bsNone;\r\n edDBField_Key2.ChildOrder := 15;\r\n edDBField_Key2.Color := clSilver;\r\n edDBField_Key2.ElementClassName := 'box_bottomborder_font_normal';\r\n edDBField_Key2.ElementFont := efCSS;\r\n edDBField_Key2.HeightPercent := 100.000000000000000000;\r\n edDBField_Key2.ShowFocus := False;\r\n edDBField_Key2.TabOrder := 4;\r\n edDBField_Key2.WidthPercent := 100.000000000000000000;\r\n edDBField_Key1.SetParentComponent(WebPanel4);\r\n edDBField_Key1.Name := 'edDBField_Key1';\r\n edDBField_Key1.Left := 0;\r\n edDBField_Key1.Top := 0;\r\n edDBField_Key1.Width := 161;\r\n edDBField_Key1.Height := 21;\r\n edDBField_Key1.Align := alTop;\r\n edDBField_Key1.BorderStyle := bsNone;\r\n edDBField_Key1.ChildOrder := 15;\r\n edDBField_Key1.Color := clSilver;\r\n edDBField_Key1.ElementClassName := 'box_bottomborder_font_normal';\r\n edDBField_Key1.ElementFont := efCSS;\r\n edDBField_Key1.HeightPercent := 100.000000000000000000;\r\n edDBField_Key1.ShowFocus := False;\r\n edDBField_Key1.TabOrder := 3;\r\n edDBField_Key1.WidthPercent := 100.000000000000000000;\r\n WebPanel14.SetParentComponent(WebPanel3);\r\n WebPanel14.Name := 'WebPanel14';\r\n WebPanel14.Left := 164;\r\n WebPanel14.Top := 0;\r\n WebPanel14.Width := 549;\r\n WebPanel14.Height := 73;\r\n WebPanel14.Align := alClient;\r\n WebPanel14.BorderStyle := bsNone;\r\n WebPanel14.ChildOrder := 10;\r\n WebPanel14.Color := clWhite;\r\n WebPanel14.TabOrder := 1;\r\n cbDBField_Key1Source.SetParentComponent(WebPanel14);\r\n cbDBField_Key1Source.Name := 'cbDBField_Key1Source';\r\n cbDBField_Key1Source.Left := 0;\r\n cbDBField_Key1Source.Top := 0;\r\n cbDBField_Key1Source.Width := 549;\r\n cbDBField_Key1Source.Height := 21;\r\n cbDBField_Key1Source.Align := alTop;\r\n cbDBField_Key1Source.ElementClassName := 'box_bottomborder_font_normal';\r\n cbDBField_Key1Source.ElementFont := efCSS;\r\n cbDBField_Key1Source.HeightPercent := 100.000000000000000000;\r\n cbDBField_Key1Source.ShowFocus := False;\r\n cbDBField_Key1Source.TabOrder := 7;\r\n cbDBField_Key1Source.TabStop := False;\r\n cbDBField_Key1Source.WidthPercent := 100.000000000000000000;\r\n cbDBField_Key1Source.ItemIndex := -1;\r\n cbDBField_Key1Source.Items.BeginUpdate;\r\n try\r\n cbDBField_Key1Source.Items.Clear;\r\n cbDBField_Key1Source.Items.Add('MRN');\r\n cbDBField_Key1Source.Items.Add('Appt.ID');\r\n cbDBField_Key1Source.Items.Add('Facility');\r\n cbDBField_Key1Source.Items.Add('Provider');\r\n cbDBField_Key1Source.Items.Add('Nurse1');\r\n cbDBField_Key1Source.Items.Add('Nurse2');\r\n cbDBField_Key1Source.Items.Add('Appt.Name');\r\n cbDBField_Key1Source.Items.Add('Med.ID');\r\n cbDBField_Key1Source.Items.Add('Problem ID');\r\n cbDBField_Key1Source.Items.Add('Ref.Phy.ID');\r\n cbDBField_Key1Source.Items.Add('Allergy ID');\r\n finally\r\n cbDBField_Key1Source.Items.EndUpdate;\r\n end;\r\n cbDBField_Key2Source.SetParentComponent(WebPanel14);\r\n cbDBField_Key2Source.Name := 'cbDBField_Key2Source';\r\n cbDBField_Key2Source.Left := 0;\r\n cbDBField_Key2Source.Top := 21;\r\n cbDBField_Key2Source.Width := 549;\r\n cbDBField_Key2Source.Height := 21;\r\n cbDBField_Key2Source.Align := alTop;\r\n cbDBField_Key2Source.ElementClassName := 'box_bottomborder_font_normal';\r\n cbDBField_Key2Source.ElementFont := efCSS;\r\n cbDBField_Key2Source.HeightPercent := 100.000000000000000000;\r\n cbDBField_Key2Source.ShowFocus := False;\r\n cbDBField_Key2Source.TabOrder := 7;\r\n cbDBField_Key2Source.TabStop := False;\r\n cbDBField_Key2Source.WidthPercent := 100.000000000000000000;\r\n cbDBField_Key2Source.ItemIndex := -1;\r\n cbDBField_Key2Source.Items.BeginUpdate;\r\n try\r\n cbDBField_Key2Source.Items.Clear;\r\n cbDBField_Key2Source.Items.Add('MRN');\r\n cbDBField_Key2Source.Items.Add('Appt.ID');\r\n cbDBField_Key2Source.Items.Add('Facility');\r\n cbDBField_Key2Source.Items.Add('Provider');\r\n cbDBField_Key2Source.Items.Add('Nurse1');\r\n cbDBField_Key2Source.Items.Add('Nurse2');\r\n cbDBField_Key2Source.Items.Add('Appt.Name');\r\n cbDBField_Key2Source.Items.Add('Med.ID');\r\n cbDBField_Key2Source.Items.Add('Problem ID');\r\n cbDBField_Key2Source.Items.Add('Ref.Phy.ID');\r\n cbDBField_Key2Source.Items.Add('Allergy ID');\r\n finally\r\n cbDBField_Key2Source.Items.EndUpdate;\r\n end;\r\n cbDBField_Key3Source.SetParentComponent(WebPanel14);\r\n cbDBField_Key3Source.Name := 'cbDBField_Key3Source';\r\n cbDBField_Key3Source.Left := 0;\r\n cbDBField_Key3Source.Top := 42;\r\n cbDBField_Key3Source.Width := 549;\r\n cbDBField_Key3Source.Height := 21;\r\n cbDBField_Key3Source.Align := alTop;\r\n cbDBField_Key3Source.ElementClassName := 'box_bottomborder_font_normal';\r\n cbDBField_Key3Source.ElementFont := efCSS;\r\n cbDBField_Key3Source.HeightPercent := 100.000000000000000000;\r\n cbDBField_Key3Source.ShowFocus := False;\r\n cbDBField_Key3Source.TabOrder := 9;\r\n cbDBField_Key3Source.TabStop := False;\r\n cbDBField_Key3Source.WidthPercent := 100.000000000000000000;\r\n cbDBField_Key3Source.ItemIndex := -1;\r\n cbDBField_Key3Source.Items.BeginUpdate;\r\n try\r\n cbDBField_Key3Source.Items.Clear;\r\n cbDBField_Key3Source.Items.Add('MRN');\r\n cbDBField_Key3Source.Items.Add('Appt.ID');\r\n cbDBField_Key3Source.Items.Add('Facility');\r\n cbDBField_Key3Source.Items.Add('Provider');\r\n cbDBField_Key3Source.Items.Add('Nurse1');\r\n cbDBField_Key3Source.Items.Add('Nurse2');\r\n cbDBField_Key3Source.Items.Add('Appt.Name');\r\n cbDBField_Key3Source.Items.Add('Med.ID');\r\n cbDBField_Key3Source.Items.Add('Problem ID');\r\n cbDBField_Key3Source.Items.Add('Ref.Phy.ID');\r\n cbDBField_Key3Source.Items.Add('Allergy ID');\r\n finally\r\n cbDBField_Key3Source.Items.EndUpdate;\r\n end;\r\n WebPanel23.SetParentComponent(pnlDBFieldSettings);\r\n WebPanel23.Name := 'WebPanel23';\r\n WebPanel23.Left := 0;\r\n WebPanel23.Top := 159;\r\n WebPanel23.Width := 800;\r\n WebPanel23.Height := 90;\r\n WebPanel23.Align := alTop;\r\n WebPanel23.BorderStyle := bsNone;\r\n WebPanel23.ChildOrder := 2;\r\n WebPanel23.Color := clWhite;\r\n WebPanel23.TabOrder := 1;\r\n WebLabel5.SetParentComponent(WebPanel23);\r\n WebLabel5.Name := 'WebLabel5';\r\n WebLabel5.Left := 3;\r\n WebLabel5.Top := 12;\r\n WebLabel5.Width := 25;\r\n WebLabel5.Height := 13;\r\n WebLabel5.Caption := 'Color';\r\n WebLabel5.ElementLabelClassName := 'text_normal';\r\n WebLabel5.ElementFont := efCSS;\r\n WebLabel5.HeightPercent := 100.000000000000000000;\r\n WebLabel5.WidthPercent := 100.000000000000000000;\r\n WebLabel6.SetParentComponent(WebPanel23);\r\n WebLabel6.Name := 'WebLabel6';\r\n WebLabel6.Left := 89;\r\n WebLabel6.Top := 5;\r\n WebLabel6.Width := 35;\r\n WebLabel6.Height := 13;\r\n WebLabel6.Caption := 'Update';\r\n WebLabel6.ElementLabelClassName := 'text_normal';\r\n WebLabel6.ElementFont := efCSS;\r\n WebLabel6.HeightPercent := 100.000000000000000000;\r\n WebLabel6.WidthPercent := 100.000000000000000000;\r\n WebLabel7.SetParentComponent(WebPanel23);\r\n WebLabel7.Name := 'WebLabel7';\r\n WebLabel7.Left := 89;\r\n WebLabel7.Top := 23;\r\n WebLabel7.Width := 29;\r\n WebLabel7.Height := 13;\r\n WebLabel7.Caption := 'Insert';\r\n WebLabel7.ElementLabelClassName := 'text_normal';\r\n WebLabel7.ElementFont := efCSS;\r\n WebLabel7.HeightPercent := 100.000000000000000000;\r\n WebLabel7.WidthPercent := 100.000000000000000000;\r\n WebLabel1.SetParentComponent(WebPanel23);\r\n WebLabel1.Name := 'WebLabel1';\r\n WebLabel1.Left := 296;\r\n WebLabel1.Top := 5;\r\n WebLabel1.Width := 55;\r\n WebLabel1.Height := 13;\r\n WebLabel1.Caption := 'Block Width';\r\n WebLabel1.ElementLabelClassName := 'text_normal';\r\n WebLabel1.ElementFont := efCSS;\r\n WebLabel1.HeightPercent := 100.000000000000000000;\r\n WebLabel1.WidthPercent := 100.000000000000000000;\r\n WebLabel4.SetParentComponent(WebPanel23);\r\n WebLabel4.Name := 'WebLabel4';\r\n WebLabel4.Left := 162;\r\n WebLabel4.Top := 5;\r\n WebLabel4.Width := 78;\r\n WebLabel4.Height := 13;\r\n WebLabel4.Caption := 'Include in Defult';\r\n WebLabel4.ElementLabelClassName := 'text_normal';\r\n WebLabel4.ElementFont := efCSS;\r\n WebLabel4.HeightPercent := 100.000000000000000000;\r\n WebLabel4.WidthPercent := 100.000000000000000000;\r\n WebLabel8.SetParentComponent(WebPanel23);\r\n WebLabel8.Name := 'WebLabel8';\r\n WebLabel8.Left := 162;\r\n WebLabel8.Top := 23;\r\n WebLabel8.Width := 83;\r\n WebLabel8.Height := 13;\r\n WebLabel8.Caption := 'Hide when empty';\r\n WebLabel8.ElementLabelClassName := 'text_normal';\r\n WebLabel8.ElementFont := efCSS;\r\n WebLabel8.HeightPercent := 100.000000000000000000;\r\n WebLabel8.WidthPercent := 100.000000000000000000;\r\n WebLabel9.SetParentComponent(WebPanel23);\r\n WebLabel9.Name := 'WebLabel9';\r\n WebLabel9.Left := 296;\r\n WebLabel9.Top := 23;\r\n WebLabel9.Width := 58;\r\n WebLabel9.Height := 13;\r\n WebLabel9.Caption := 'Block Height';\r\n WebLabel9.ElementLabelClassName := 'text_normal';\r\n WebLabel9.ElementFont := efCSS;\r\n WebLabel9.HeightPercent := 100.000000000000000000;\r\n WebLabel9.WidthPercent := 100.000000000000000000;\r\n WebLabel10.SetParentComponent(WebPanel23);\r\n WebLabel10.Name := 'WebLabel10';\r\n WebLabel10.Left := 453;\r\n WebLabel10.Top := 3;\r\n WebLabel10.Width := 57;\r\n WebLabel10.Height := 13;\r\n WebLabel10.Caption := 'Custom Top';\r\n WebLabel10.ElementLabelClassName := 'text_normal';\r\n WebLabel10.ElementFont := efCSS;\r\n WebLabel10.HeightPercent := 100.000000000000000000;\r\n WebLabel10.WidthPercent := 100.000000000000000000;\r\n WebLabel11.SetParentComponent(WebPanel23);\r\n WebLabel11.Name := 'WebLabel11';\r\n WebLabel11.Left := 453;\r\n WebLabel11.Top := 21;\r\n WebLabel11.Width := 58;\r\n WebLabel11.Height := 13;\r\n WebLabel11.Caption := 'Custom Left';\r\n WebLabel11.ElementLabelClassName := 'text_normal';\r\n WebLabel11.ElementFont := efCSS;\r\n WebLabel11.HeightPercent := 100.000000000000000000;\r\n WebLabel11.WidthPercent := 100.000000000000000000;\r\n WebLabel12.SetParentComponent(WebPanel23);\r\n WebLabel12.Name := 'WebLabel12';\r\n WebLabel12.Left := 605;\r\n WebLabel12.Top := 3;\r\n WebLabel12.Width := 58;\r\n WebLabel12.Height := 13;\r\n WebLabel12.Caption := 'Current Top';\r\n WebLabel12.ElementLabelClassName := 'text_normal';\r\n WebLabel12.ElementFont := efCSS;\r\n WebLabel12.HeightPercent := 100.000000000000000000;\r\n WebLabel12.WidthPercent := 100.000000000000000000;\r\n WebLabel13.SetParentComponent(WebPanel23);\r\n WebLabel13.Name := 'WebLabel13';\r\n WebLabel13.Left := 605;\r\n WebLabel13.Top := 21;\r\n WebLabel13.Width := 59;\r\n WebLabel13.Height := 13;\r\n WebLabel13.Caption := 'Current Left';\r\n WebLabel13.ElementLabelClassName := 'text_normal';\r\n WebLabel13.ElementFont := efCSS;\r\n WebLabel13.HeightPercent := 100.000000000000000000;\r\n WebLabel13.WidthPercent := 100.000000000000000000;\r\n lbDBF_BlockTop.SetParentComponent(WebPanel23);\r\n lbDBF_BlockTop.Name := 'lbDBF_BlockTop';\r\n lbDBF_BlockTop.Left := 685;\r\n lbDBF_BlockTop.Top := 3;\r\n lbDBF_BlockTop.Width := 18;\r\n lbDBF_BlockTop.Height := 13;\r\n lbDBF_BlockTop.Caption := 'Top';\r\n lbDBF_BlockTop.ElementLabelClassName := 'text_normal';\r\n lbDBF_BlockTop.ElementFont := efCSS;\r\n lbDBF_BlockTop.HeightPercent := 100.000000000000000000;\r\n lbDBF_BlockTop.WidthPercent := 100.000000000000000000;\r\n lbDBF_BlockLeft.SetParentComponent(WebPanel23);\r\n lbDBF_BlockLeft.Name := 'lbDBF_BlockLeft';\r\n lbDBF_BlockLeft.Left := 685;\r\n lbDBF_BlockLeft.Top := 21;\r\n lbDBF_BlockLeft.Width := 19;\r\n lbDBF_BlockLeft.Height := 13;\r\n lbDBF_BlockLeft.Caption := 'Left';\r\n lbDBF_BlockLeft.ElementClassName := 'form_caption';\r\n lbDBF_BlockLeft.ElementLabelClassName := 'text_normal';\r\n lbDBF_BlockLeft.ElementFont := efCSS;\r\n lbDBF_BlockLeft.HeightPercent := 100.000000000000000000;\r\n lbDBF_BlockLeft.WidthPercent := 100.000000000000000000;\r\n WebLabel14.SetParentComponent(WebPanel23);\r\n WebLabel14.Name := 'WebLabel14';\r\n WebLabel14.Left := 89;\r\n WebLabel14.Top := 46;\r\n WebLabel14.Width := 45;\r\n WebLabel14.Height := 13;\r\n WebLabel14.Caption := 'Edit Mask';\r\n WebLabel14.ElementLabelClassName := 'text_normal';\r\n WebLabel14.ElementFont := efCSS;\r\n WebLabel14.HeightPercent := 100.000000000000000000;\r\n WebLabel14.WidthPercent := 100.000000000000000000;\r\n WebLabel3.SetParentComponent(WebPanel23);\r\n WebLabel3.Name := 'WebLabel3';\r\n WebLabel3.Left := 89;\r\n WebLabel3.Top := 68;\r\n WebLabel3.Width := 76;\r\n WebLabel3.Height := 13;\r\n WebLabel3.Caption := 'CERNER Search';\r\n WebLabel3.ElementLabelClassName := 'text_normal';\r\n WebLabel3.ElementFont := efCSS;\r\n WebLabel3.HeightPercent := 100.000000000000000000;\r\n WebLabel3.WidthPercent := 100.000000000000000000;\r\n clrDBField_Color.SetParentComponent(WebPanel23);\r\n clrDBField_Color.Name := 'clrDBField_Color';\r\n clrDBField_Color.Left := 52;\r\n clrDBField_Color.Top := 8;\r\n clrDBField_Color.Width := 29;\r\n clrDBField_Color.Height := 22;\r\n clrDBField_Color.ElementClassName := 'BOX_NO_BORDER';\r\n clrDBField_Color.ChildOrder := 19;\r\n clrDBField_Color.Color := clWhite;\r\n clrDBField_Color.Role := '';\r\n chDBF_DoUpdate.SetParentComponent(WebPanel23);\r\n chDBF_DoUpdate.Name := 'chDBF_DoUpdate';\r\n chDBF_DoUpdate.Left := 135;\r\n chDBF_DoUpdate.Top := 3;\r\n chDBF_DoUpdate.Width := 16;\r\n chDBF_DoUpdate.Height := 22;\r\n chDBF_DoUpdate.ChildOrder := 8;\r\n chDBF_DoUpdate.HeightPercent := 100.000000000000000000;\r\n chDBF_DoUpdate.WidthPercent := 100.000000000000000000;\r\n chDBF_DoInsert.SetParentComponent(WebPanel23);\r\n chDBF_DoInsert.Name := 'chDBF_DoInsert';\r\n chDBF_DoInsert.Left := 135;\r\n chDBF_DoInsert.Top := 21;\r\n chDBF_DoInsert.Width := 16;\r\n chDBF_DoInsert.Height := 22;\r\n chDBF_DoInsert.ChildOrder := 8;\r\n chDBF_DoInsert.HeightPercent := 100.000000000000000000;\r\n chDBF_DoInsert.WidthPercent := 100.000000000000000000;\r\n seDBF_BlockWidth.SetParentComponent(WebPanel23);\r\n seDBF_BlockWidth.Name := 'seDBF_BlockWidth';\r\n seDBF_BlockWidth.Left := 362;\r\n seDBF_BlockWidth.Top := 3;\r\n seDBF_BlockWidth.Width := 68;\r\n seDBF_BlockWidth.Height := 22;\r\n seDBF_BlockWidth.Hint := 'Item Value';\r\n seDBF_BlockWidth.ElementClassName := 'box_bottomborder_font_xxbig';\r\n seDBF_BlockWidth.AutoSize := False;\r\n seDBF_BlockWidth.BorderStyle := bsNone;\r\n seDBF_BlockWidth.ChildOrder := 8;\r\n seDBF_BlockWidth.Color := clWhite;\r\n seDBF_BlockWidth.ElementFont := efCSS;\r\n seDBF_BlockWidth.Increment := 10;\r\n seDBF_BlockWidth.MaxValue := 1000;\r\n seDBF_BlockWidth.MinValue := 0;\r\n seDBF_BlockWidth.Role := '';\r\n seDBF_BlockWidth.ShowFocus := False;\r\n seDBF_BlockWidth.ShowHint := True;\r\n seDBF_BlockWidth.Value := 0;\r\n chDBF_IncludeInDefault.SetParentComponent(WebPanel23);\r\n chDBF_IncludeInDefault.Name := 'chDBF_IncludeInDefault';\r\n chDBF_IncludeInDefault.Left := 257;\r\n chDBF_IncludeInDefault.Top := 3;\r\n chDBF_IncludeInDefault.Width := 16;\r\n chDBF_IncludeInDefault.Height := 22;\r\n chDBF_IncludeInDefault.ChildOrder := 8;\r\n chDBF_IncludeInDefault.HeightPercent := 100.000000000000000000;\r\n chDBF_IncludeInDefault.WidthPercent := 100.000000000000000000;\r\n chDBF_HideWhenEmpty.SetParentComponent(WebPanel23);\r\n chDBF_HideWhenEmpty.Name := 'chDBF_HideWhenEmpty';\r\n chDBF_HideWhenEmpty.Left := 257;\r\n chDBF_HideWhenEmpty.Top := 21;\r\n chDBF_HideWhenEmpty.Width := 16;\r\n chDBF_HideWhenEmpty.Height := 22;\r\n chDBF_HideWhenEmpty.ChildOrder := 8;\r\n chDBF_HideWhenEmpty.HeightPercent := 100.000000000000000000;\r\n chDBF_HideWhenEmpty.WidthPercent := 100.000000000000000000;\r\n seDBF_BlockHeight.SetParentComponent(WebPanel23);\r\n seDBF_BlockHeight.Name := 'seDBF_BlockHeight';\r\n seDBF_BlockHeight.Left := 362;\r\n seDBF_BlockHeight.Top := 20;\r\n seDBF_BlockHeight.Width := 68;\r\n seDBF_BlockHeight.Height := 22;\r\n seDBF_BlockHeight.Hint := 'Item Value';\r\n seDBF_BlockHeight.ElementClassName := 'box_bottomborder_font_xxbig';\r\n seDBF_BlockHeight.AutoSize := False;\r\n seDBF_BlockHeight.BorderStyle := bsNone;\r\n seDBF_BlockHeight.ChildOrder := 8;\r\n seDBF_BlockHeight.Color := clWhite;\r\n seDBF_BlockHeight.ElementFont := efCSS;\r\n seDBF_BlockHeight.Increment := 10;\r\n seDBF_BlockHeight.MaxValue := 1000;\r\n seDBF_BlockHeight.MinValue := 0;\r\n seDBF_BlockHeight.Role := '';\r\n seDBF_BlockHeight.ShowFocus := False;\r\n seDBF_BlockHeight.ShowHint := True;\r\n seDBF_BlockHeight.Value := 0;\r\n chDBF_ApplyColor.SetParentComponent(WebPanel23);\r\n chDBF_ApplyColor.Name := 'chDBF_ApplyColor';\r\n chDBF_ApplyColor.Left := 30;\r\n chDBF_ApplyColor.Top := 9;\r\n chDBF_ApplyColor.Width := 16;\r\n chDBF_ApplyColor.Height := 22;\r\n chDBF_ApplyColor.ChildOrder := 8;\r\n chDBF_ApplyColor.HeightPercent := 100.000000000000000000;\r\n chDBF_ApplyColor.WidthPercent := 100.000000000000000000;\r\n seDBF_BlockTop.SetParentComponent(WebPanel23);\r\n seDBF_BlockTop.Name := 'seDBF_BlockTop';\r\n seDBF_BlockTop.Left := 519;\r\n seDBF_BlockTop.Top := 0;\r\n seDBF_BlockTop.Width := 68;\r\n seDBF_BlockTop.Height := 22;\r\n seDBF_BlockTop.Hint := 'Item Value';\r\n seDBF_BlockTop.ElementClassName := 'box_bottomborder_font_xxbig';\r\n seDBF_BlockTop.AutoSize := False;\r\n seDBF_BlockTop.BorderStyle := bsNone;\r\n seDBF_BlockTop.ChildOrder := 8;\r\n seDBF_BlockTop.Color := clWhite;\r\n seDBF_BlockTop.ElementFont := efCSS;\r\n seDBF_BlockTop.Increment := 1;\r\n seDBF_BlockTop.MaxValue := 10000;\r\n seDBF_BlockTop.MinValue := 0;\r\n seDBF_BlockTop.Role := '';\r\n seDBF_BlockTop.ShowFocus := False;\r\n seDBF_BlockTop.ShowHint := True;\r\n seDBF_BlockTop.Value := 0;\r\n seDBF_BlockLeft.SetParentComponent(WebPanel23);\r\n seDBF_BlockLeft.Name := 'seDBF_BlockLeft';\r\n seDBF_BlockLeft.Left := 519;\r\n seDBF_BlockLeft.Top := 18;\r\n seDBF_BlockLeft.Width := 68;\r\n seDBF_BlockLeft.Height := 22;\r\n seDBF_BlockLeft.Hint := 'Item Value';\r\n seDBF_BlockLeft.ElementClassName := 'box_bottomborder_font_xxbig';\r\n seDBF_BlockLeft.AutoSize := False;\r\n seDBF_BlockLeft.BorderStyle := bsNone;\r\n seDBF_BlockLeft.ChildOrder := 8;\r\n seDBF_BlockLeft.Color := clWhite;\r\n seDBF_BlockLeft.ElementFont := efCSS;\r\n seDBF_BlockLeft.Increment := 1;\r\n seDBF_BlockLeft.MaxValue := 10000;\r\n seDBF_BlockLeft.MinValue := 0;\r\n seDBF_BlockLeft.Role := '';\r\n seDBF_BlockLeft.ShowFocus := False;\r\n seDBF_BlockLeft.ShowHint := True;\r\n seDBF_BlockLeft.Value := 0;\r\n edDBField_EditMask.SetParentComponent(WebPanel23);\r\n edDBField_EditMask.Name := 'edDBField_EditMask';\r\n edDBField_EditMask.Left := 191;\r\n edDBField_EditMask.Top := 42;\r\n edDBField_EditMask.Width := 200;\r\n edDBField_EditMask.Height := 21;\r\n edDBField_EditMask.BorderStyle := bsNone;\r\n edDBField_EditMask.ChildOrder := 15;\r\n edDBField_EditMask.Color := clSilver;\r\n edDBField_EditMask.ElementClassName := 'box_bottomborder_font_normal';\r\n edDBField_EditMask.ElementFont := efCSS;\r\n edDBField_EditMask.HeightPercent := 100.000000000000000000;\r\n edDBField_EditMask.ShowFocus := False;\r\n edDBField_EditMask.TabOrder := 3;\r\n edDBField_EditMask.WidthPercent := 100.000000000000000000;\r\n edCERNER_Search.SetParentComponent(WebPanel23);\r\n edCERNER_Search.Name := 'edCERNER_Search';\r\n edCERNER_Search.Left := 191;\r\n edCERNER_Search.Top := 66;\r\n edCERNER_Search.Width := 200;\r\n edCERNER_Search.Height := 21;\r\n edCERNER_Search.BorderStyle := bsNone;\r\n edCERNER_Search.ChildOrder := 15;\r\n edCERNER_Search.Color := clSilver;\r\n edCERNER_Search.ElementClassName := 'box_bottomborder_font_normal';\r\n edCERNER_Search.ElementFont := efCSS;\r\n edCERNER_Search.HeightPercent := 100.000000000000000000;\r\n edCERNER_Search.ShowFocus := False;\r\n edCERNER_Search.TabOrder := 3;\r\n edCERNER_Search.WidthPercent := 100.000000000000000000;\r\n WebPanel24.SetParentComponent(pnlDBFieldSettings);\r\n WebPanel24.Name := 'WebPanel24';\r\n WebPanel24.Left := 0;\r\n WebPanel24.Top := 249;\r\n WebPanel24.Width := 800;\r\n WebPanel24.Height := 410;\r\n WebPanel24.Align := alClient;\r\n WebPanel24.BorderStyle := bsNone;\r\n WebPanel24.ChildOrder := 2;\r\n WebPanel24.Color := clWhite;\r\n WebPanel24.TabOrder := 2;\r\n WebPageControl1.SetParentComponent(WebPanel24);\r\n WebPageControl1.Name := 'WebPageControl1';\r\n WebPageControl1.Left := 0;\r\n WebPageControl1.Top := 0;\r\n WebPageControl1.Width := 800;\r\n WebPageControl1.Height := 410;\r\n WebPageControl1.Cursor := crHandPoint;\r\n WebPageControl1.Align := alClient;\r\n WebPageControl1.ChildOrder := 20;\r\n WebPageControl1.TabIndex := 0;\r\n WebPageControl1.TabOrder := 0;\r\n WebPageControl1Sheet1.SetParentComponent(WebPageControl1);\r\n WebPageControl1Sheet1.Name := 'WebPageControl1Sheet1';\r\n WebPageControl1Sheet1.Left := 0;\r\n WebPageControl1Sheet1.Top := 20;\r\n WebPageControl1Sheet1.Width := 800;\r\n WebPageControl1Sheet1.Height := 390;\r\n WebPageControl1Sheet1.ElementClassName := 'BOX_NO_BORDER';\r\n WebPageControl1Sheet1.Caption := 'Select';\r\n WebPageControl1Sheet1.ChildOrder := 3;\r\n memDBField_customselect.SetParentComponent(WebPageControl1Sheet1);\r\n memDBField_customselect.Name := 'memDBField_customselect';\r\n memDBField_customselect.Tag := -1;\r\n memDBField_customselect.Left := 0;\r\n memDBField_customselect.Top := 21;\r\n memDBField_customselect.Width := 800;\r\n memDBField_customselect.Height := 325;\r\n memDBField_customselect.Align := alClient;\r\n memDBField_customselect.BorderStyle := bsNone;\r\n memDBField_customselect.ElementClassName := 'block_memo';\r\n memDBField_customselect.ElementFont := efCSS;\r\n memDBField_customselect.Font.Charset := ANSI_CHARSET;\r\n memDBField_customselect.Font.Color := clWindowText;\r\n memDBField_customselect.Font.Height := -16;\r\n memDBField_customselect.Font.Name := 'Courier New';\r\n memDBField_customselect.Font.Style := [fsBold];\r\n memDBField_customselect.HeightPercent := 100.000000000000000000;\r\n memDBField_customselect.ParentFont := False;\r\n memDBField_customselect.SelLength := 0;\r\n memDBField_customselect.SelStart := 0;\r\n memDBField_customselect.ShowFocus := False;\r\n memDBField_customselect.TabOrder := 6;\r\n memDBField_customselect.WidthPercent := 100.000000000000000000;\r\n cbQuickData.SetParentComponent(WebPageControl1Sheet1);\r\n cbQuickData.Name := 'cbQuickData';\r\n cbQuickData.Left := 0;\r\n cbQuickData.Top := 0;\r\n cbQuickData.Width := 800;\r\n cbQuickData.Height := 21;\r\n cbQuickData.Align := alTop;\r\n cbQuickData.ElementClassName := 'box_bottomborder_font_normal';\r\n cbQuickData.ElementFont := efCSS;\r\n cbQuickData.HeightPercent := 100.000000000000000000;\r\n cbQuickData.ShowFocus := False;\r\n cbQuickData.TabOrder := 9;\r\n cbQuickData.TabStop := False;\r\n cbQuickData.WidthPercent := 100.000000000000000000;\r\n SetEvent(cbQuickData, Self, 'OnChange', 'cbQuickDataChange');\r\n cbQuickData.ItemIndex := -1;\r\n cbQuickData.Items.BeginUpdate;\r\n try\r\n cbQuickData.Items.Clear;\r\n cbQuickData.Items.Add(' MRN');\r\n cbQuickData.Items.Add('Appointment ID');\r\n cbQuickData.Items.Add('Appointment Name');\r\n cbQuickData.Items.Add('Appointment Type');\r\n cbQuickData.Items.Add('Service Provider');\r\n cbQuickData.Items.Add('Facility Name');\r\n cbQuickData.Items.Add('Facility ID');\r\n cbQuickData.Items.Add('User Name');\r\n cbQuickData.Items.Add('User ID');\r\n cbQuickData.Items.Add('User Role');\r\n cbQuickData.Items.Add('Database Name');\r\n cbQuickData.Items.Add('Current Date');\r\n cbQuickData.Items.Add('Current Time');\r\n finally\r\n cbQuickData.Items.EndUpdate;\r\n end;\r\n WebMemo2.SetParentComponent(WebPageControl1Sheet1);\r\n WebMemo2.Name := 'WebMemo2';\r\n WebMemo2.Left := 0;\r\n WebMemo2.Top := 346;\r\n WebMemo2.Width := 800;\r\n WebMemo2.Height := 44;\r\n WebMemo2.Align := alBottom;\r\n WebMemo2.BorderStyle := bsNone;\r\n WebMemo2.ElementClassName := 'text_normal';\r\n WebMemo2.HeightPercent := 100.000000000000000000;\r\n WebMemo2.Lines.BeginUpdate;\r\n try\r\n WebMemo2.Lines.Clear;\r\n WebMemo2.Lines.Add('Use as first 5 characters to use the result returned in HTML section. '#39'USE 1'#39' - for Authorization DB, '#39'USE db_name'#39' - for any DB under connected server. ');\r\n WebMemo2.Lines.Add(' - Block data value');\r\n finally\r\n WebMemo2.Lines.EndUpdate;\r\n end;\r\n WebMemo2.SelLength := 0;\r\n WebMemo2.SelStart := 194;\r\n WebMemo2.ShowFocus := False;\r\n WebMemo2.WidthPercent := 100.000000000000000000;\r\n WebPageControl1Sheet2.SetParentComponent(WebPageControl1);\r\n WebPageControl1Sheet2.Name := 'WebPageControl1Sheet2';\r\n WebPageControl1Sheet2.Left := 0;\r\n WebPageControl1Sheet2.Top := 20;\r\n WebPageControl1Sheet2.Width := 800;\r\n WebPageControl1Sheet2.Height := 390;\r\n WebPageControl1Sheet2.ElementClassName := 'BOX_NO_BORDER';\r\n WebPageControl1Sheet2.Caption := 'Update';\r\n WebPageControl1Sheet2.ChildOrder := 1;\r\n memDBField_Update.SetParentComponent(WebPageControl1Sheet2);\r\n memDBField_Update.Name := 'memDBField_Update';\r\n memDBField_Update.Tag := -1;\r\n memDBField_Update.Left := 0;\r\n memDBField_Update.Top := 0;\r\n memDBField_Update.Width := 800;\r\n memDBField_Update.Height := 346;\r\n memDBField_Update.Align := alClient;\r\n memDBField_Update.BorderStyle := bsNone;\r\n memDBField_Update.ElementClassName := 'block_memo';\r\n memDBField_Update.ElementFont := efCSS;\r\n memDBField_Update.Font.Charset := ANSI_CHARSET;\r\n memDBField_Update.Font.Color := clWindowText;\r\n memDBField_Update.Font.Height := -16;\r\n memDBField_Update.Font.Name := 'Courier New';\r\n memDBField_Update.Font.Style := [fsBold];\r\n memDBField_Update.HeightPercent := 100.000000000000000000;\r\n memDBField_Update.ParentFont := False;\r\n memDBField_Update.SelLength := 0;\r\n memDBField_Update.SelStart := 0;\r\n memDBField_Update.ShowFocus := False;\r\n memDBField_Update.TabOrder := 6;\r\n memDBField_Update.WidthPercent := 100.000000000000000000;\r\n WebMemo5.SetParentComponent(WebPageControl1Sheet2);\r\n WebMemo5.Name := 'WebMemo5';\r\n WebMemo5.Left := 0;\r\n WebMemo5.Top := 346;\r\n WebMemo5.Width := 800;\r\n WebMemo5.Height := 44;\r\n WebMemo5.Align := alBottom;\r\n WebMemo5.BorderStyle := bsNone;\r\n WebMemo5.ElementClassName := 'text_normal';\r\n WebMemo5.HeightPercent := 100.000000000000000000;\r\n WebMemo5.Lines.BeginUpdate;\r\n try\r\n WebMemo5.Lines.Clear;\r\n WebMemo5.Lines.Add('USE 1'#39' - for Authorization DB, '#39'USE db_name'#39' - for any DB under connected server. - Block data value');\r\n finally\r\n WebMemo5.Lines.EndUpdate;\r\n end;\r\n WebMemo5.SelLength := 0;\r\n WebMemo5.SelStart := 116;\r\n WebMemo5.ShowFocus := False;\r\n WebMemo5.WidthPercent := 100.000000000000000000;\r\n WebPageControl1Sheet3.SetParentComponent(WebPageControl1);\r\n WebPageControl1Sheet3.Name := 'WebPageControl1Sheet3';\r\n WebPageControl1Sheet3.Left := 0;\r\n WebPageControl1Sheet3.Top := 20;\r\n WebPageControl1Sheet3.Width := 800;\r\n WebPageControl1Sheet3.Height := 390;\r\n WebPageControl1Sheet3.ElementClassName := 'BOX_NO_BORDER';\r\n WebPageControl1Sheet3.Caption := 'Insert';\r\n WebPageControl1Sheet3.ChildOrder := 2;\r\n memDBField_Insert.SetParentComponent(WebPageControl1Sheet3);\r\n memDBField_Insert.Name := 'memDBField_Insert';\r\n memDBField_Insert.Tag := -1;\r\n memDBField_Insert.Left := 0;\r\n memDBField_Insert.Top := 0;\r\n memDBField_Insert.Width := 800;\r\n memDBField_Insert.Height := 346;\r\n memDBField_Insert.Align := alClient;\r\n memDBField_Insert.BorderStyle := bsNone;\r\n memDBField_Insert.Font.Charset := ANSI_CHARSET;\r\n memDBField_Insert.Font.Color := clWindowText;\r\n memDBField_Insert.Font.Height := -16;\r\n memDBField_Insert.Font.Name := 'Courier New';\r\n memDBField_Insert.Font.Style := [fsBold];\r\n memDBField_Insert.HeightPercent := 100.000000000000000000;\r\n memDBField_Insert.ParentFont := False;\r\n memDBField_Insert.SelLength := 0;\r\n memDBField_Insert.SelStart := 0;\r\n memDBField_Insert.ShowFocus := False;\r\n memDBField_Insert.TabOrder := 6;\r\n memDBField_Insert.WidthPercent := 100.000000000000000000;\r\n WebMemo6.SetParentComponent(WebPageControl1Sheet3);\r\n WebMemo6.Name := 'WebMemo6';\r\n WebMemo6.Left := 0;\r\n WebMemo6.Top := 346;\r\n WebMemo6.Width := 800;\r\n WebMemo6.Height := 44;\r\n WebMemo6.Align := alBottom;\r\n WebMemo6.BorderStyle := bsNone;\r\n WebMemo6.ElementClassName := 'text_normal';\r\n WebMemo6.HeightPercent := 100.000000000000000000;\r\n WebMemo6.Lines.BeginUpdate;\r\n try\r\n WebMemo6.Lines.Clear;\r\n WebMemo6.Lines.Add('USE 1'#39' - for Authorization DB, '#39'USE db_name'#39' - for any DB under connected server. - Block data value');\r\n finally\r\n WebMemo6.Lines.EndUpdate;\r\n end;\r\n WebMemo6.SelLength := 0;\r\n WebMemo6.SelStart := 116;\r\n WebMemo6.ShowFocus := False;\r\n WebMemo6.WidthPercent := 100.000000000000000000;\r\n WebPageControl1Sheet4.SetParentComponent(WebPageControl1);\r\n WebPageControl1Sheet4.Name := 'WebPageControl1Sheet4';\r\n WebPageControl1Sheet4.Left := 0;\r\n WebPageControl1Sheet4.Top := 20;\r\n WebPageControl1Sheet4.Width := 800;\r\n WebPageControl1Sheet4.Height := 390;\r\n WebPageControl1Sheet4.ElementClassName := 'BOX_NO_BORDER';\r\n WebPageControl1Sheet4.Caption := 'HTML';\r\n WebPageControl1Sheet4.ChildOrder := 3;\r\n WebPageControl1Sheet4.Font.Charset := ANSI_CHARSET;\r\n WebPageControl1Sheet4.Font.Color := clWindowText;\r\n WebPageControl1Sheet4.Font.Height := -11;\r\n WebPageControl1Sheet4.Font.Name := 'Tahoma';\r\n WebPageControl1Sheet4.Font.Style := [];\r\n WebPageControl1Sheet4.ParentFont := False;\r\n memDBField_HTMLTemplate.SetParentComponent(WebPageControl1Sheet4);\r\n memDBField_HTMLTemplate.Name := 'memDBField_HTMLTemplate';\r\n memDBField_HTMLTemplate.Left := 0;\r\n memDBField_HTMLTemplate.Top := 0;\r\n memDBField_HTMLTemplate.Width := 800;\r\n memDBField_HTMLTemplate.Height := 390;\r\n memDBField_HTMLTemplate.Align := alClient;\r\n memDBField_HTMLTemplate.BorderStyle := bsNone;\r\n memDBField_HTMLTemplate.ElementClassName := 'block_memo';\r\n memDBField_HTMLTemplate.ElementFont := efCSS;\r\n memDBField_HTMLTemplate.Font.Charset := ANSI_CHARSET;\r\n memDBField_HTMLTemplate.Font.Color := clWindowText;\r\n memDBField_HTMLTemplate.Font.Height := -16;\r\n memDBField_HTMLTemplate.Font.Name := 'Courier New';\r\n memDBField_HTMLTemplate.Font.Style := [fsBold];\r\n memDBField_HTMLTemplate.HeightPercent := 100.000000000000000000;\r\n memDBField_HTMLTemplate.ParentFont := False;\r\n memDBField_HTMLTemplate.SelLength := 0;\r\n memDBField_HTMLTemplate.SelStart := 0;\r\n memDBField_HTMLTemplate.ShowFocus := False;\r\n memDBField_HTMLTemplate.WidthPercent := 100.000000000000000000;\r\n WebPageControl1Sheet5.SetParentComponent(WebPageControl1);\r\n WebPageControl1Sheet5.Name := 'WebPageControl1Sheet5';\r\n WebPageControl1Sheet5.Left := 0;\r\n WebPageControl1Sheet5.Top := 20;\r\n WebPageControl1Sheet5.Width := 800;\r\n WebPageControl1Sheet5.Height := 390;\r\n WebPageControl1Sheet5.ElementClassName := 'BOX_NO_BORDER';\r\n WebPageControl1Sheet5.Caption := 'Copy to Other Blocks';\r\n WebPageControl1Sheet5.ChildOrder := 4;\r\n memDBField_CopyToBlocks.SetParentComponent(WebPageControl1Sheet5);\r\n memDBField_CopyToBlocks.Name := 'memDBField_CopyToBlocks';\r\n memDBField_CopyToBlocks.Left := 0;\r\n memDBField_CopyToBlocks.Top := 0;\r\n memDBField_CopyToBlocks.Width := 800;\r\n memDBField_CopyToBlocks.Height := 355;\r\n memDBField_CopyToBlocks.Align := alClient;\r\n memDBField_CopyToBlocks.BorderStyle := bsNone;\r\n memDBField_CopyToBlocks.ElementClassName := 'block_memo';\r\n memDBField_CopyToBlocks.ElementFont := efCSS;\r\n memDBField_CopyToBlocks.Font.Charset := ANSI_CHARSET;\r\n memDBField_CopyToBlocks.Font.Color := clWindowText;\r\n memDBField_CopyToBlocks.Font.Height := -16;\r\n memDBField_CopyToBlocks.Font.Name := 'Courier New';\r\n memDBField_CopyToBlocks.Font.Style := [fsBold];\r\n memDBField_CopyToBlocks.HeightPercent := 100.000000000000000000;\r\n memDBField_CopyToBlocks.ParentFont := False;\r\n memDBField_CopyToBlocks.SelLength := 0;\r\n memDBField_CopyToBlocks.SelStart := 0;\r\n memDBField_CopyToBlocks.ShowFocus := False;\r\n memDBField_CopyToBlocks.WidthPercent := 100.000000000000000000;\r\n WebMemo4.SetParentComponent(WebPageControl1Sheet5);\r\n WebMemo4.Name := 'WebMemo4';\r\n WebMemo4.Left := 0;\r\n WebMemo4.Top := 355;\r\n WebMemo4.Width := 800;\r\n WebMemo4.Height := 35;\r\n WebMemo4.Align := alBottom;\r\n WebMemo4.BorderStyle := bsNone;\r\n WebMemo4.ElementClassName := 'text_normal';\r\n WebMemo4.HeightPercent := 100.000000000000000000;\r\n WebMemo4.Lines.BeginUpdate;\r\n try\r\n WebMemo4.Lines.Clear;\r\n WebMemo4.Lines.Add('Use for block data, [Block_caption] to identify the target block. Return in @Result variable: [Block_caption]Value^ ...');\r\n finally\r\n WebMemo4.Lines.EndUpdate;\r\n end;\r\n WebMemo4.SelLength := 0;\r\n WebMemo4.SelStart := 0;\r\n WebMemo4.ShowFocus := False;\r\n WebMemo4.WidthPercent := 100.000000000000000000;\r\n WebMemo4.WordWrap := False;\r\n WebPageControl1Sheet6.SetParentComponent(WebPageControl1);\r\n WebPageControl1Sheet6.Name := 'WebPageControl1Sheet6';\r\n WebPageControl1Sheet6.Left := 0;\r\n WebPageControl1Sheet6.Top := 20;\r\n WebPageControl1Sheet6.Width := 800;\r\n WebPageControl1Sheet6.Height := 390;\r\n WebPageControl1Sheet6.ElementClassName := 'BOX_NO_BORDER';\r\n WebPageControl1Sheet6.Caption := 'Sentence Template';\r\n WebPageControl1Sheet6.ChildOrder := 5;\r\n memDBField_SentenceTMP.SetParentComponent(WebPageControl1Sheet6);\r\n memDBField_SentenceTMP.Name := 'memDBField_SentenceTMP';\r\n memDBField_SentenceTMP.Left := 0;\r\n memDBField_SentenceTMP.Top := 0;\r\n memDBField_SentenceTMP.Width := 800;\r\n memDBField_SentenceTMP.Height := 355;\r\n memDBField_SentenceTMP.Align := alClient;\r\n memDBField_SentenceTMP.BorderStyle := bsNone;\r\n memDBField_SentenceTMP.ElementClassName := 'block_memo';\r\n memDBField_SentenceTMP.ElementFont := efCSS;\r\n memDBField_SentenceTMP.Font.Charset := ANSI_CHARSET;\r\n memDBField_SentenceTMP.Font.Color := clWindowText;\r\n memDBField_SentenceTMP.Font.Height := -16;\r\n memDBField_SentenceTMP.Font.Name := 'Courier New';\r\n memDBField_SentenceTMP.Font.Style := [fsBold];\r\n memDBField_SentenceTMP.HeightPercent := 100.000000000000000000;\r\n memDBField_SentenceTMP.ParentFont := False;\r\n memDBField_SentenceTMP.SelLength := 0;\r\n memDBField_SentenceTMP.SelStart := 0;\r\n memDBField_SentenceTMP.ShowFocus := False;\r\n memDBField_SentenceTMP.WidthPercent := 100.000000000000000000;\r\n WebMemo11.SetParentComponent(WebPageControl1Sheet6);\r\n WebMemo11.Name := 'WebMemo11';\r\n WebMemo11.Left := 0;\r\n WebMemo11.Top := 355;\r\n WebMemo11.Width := 800;\r\n WebMemo11.Height := 35;\r\n WebMemo11.Align := alBottom;\r\n WebMemo11.BorderStyle := bsNone;\r\n WebMemo11.ElementClassName := 'text_normal';\r\n WebMemo11.HeightPercent := 100.000000000000000000;\r\n WebMemo11.Lines.BeginUpdate;\r\n try\r\n WebMemo11.Lines.Clear;\r\n WebMemo11.Lines.Add('Use for block data and @Result variable to return the sentence. Use '#39'!='#39' instead of '#39'<>'#39' as '#39'not equal'#39' sign.');\r\n finally\r\n WebMemo11.Lines.EndUpdate;\r\n end;\r\n WebMemo11.SelLength := 0;\r\n WebMemo11.SelStart := 0;\r\n WebMemo11.ShowFocus := False;\r\n WebMemo11.WidthPercent := 100.000000000000000000;\r\n WebMemo11.WordWrap := False;\r\n WebPageControl1Sheet7.SetParentComponent(WebPageControl1);\r\n WebPageControl1Sheet7.Name := 'WebPageControl1Sheet7';\r\n WebPageControl1Sheet7.Left := 0;\r\n WebPageControl1Sheet7.Top := 20;\r\n WebPageControl1Sheet7.Width := 800;\r\n WebPageControl1Sheet7.Height := 390;\r\n WebPageControl1Sheet7.Caption := 'Block dependencies( visibility)';\r\n WebPageControl1Sheet7.ChildOrder := 6;\r\n WebMemo1.SetParentComponent(WebPageControl1Sheet7);\r\n WebMemo1.Name := 'WebMemo1';\r\n WebMemo1.Left := 0;\r\n WebMemo1.Top := 355;\r\n WebMemo1.Width := 800;\r\n WebMemo1.Height := 35;\r\n WebMemo1.Align := alBottom;\r\n WebMemo1.BorderStyle := bsNone;\r\n WebMemo1.ElementClassName := 'text_normal';\r\n WebMemo1.HeightPercent := 100.000000000000000000;\r\n WebMemo1.Lines.BeginUpdate;\r\n try\r\n WebMemo1.Lines.Clear;\r\n WebMemo1.Lines.Add(':+/-, ...');\r\n finally\r\n WebMemo1.Lines.EndUpdate;\r\n end;\r\n WebMemo1.SelLength := 0;\r\n WebMemo1.SelStart := 0;\r\n WebMemo1.ShowFocus := False;\r\n WebMemo1.WidthPercent := 100.000000000000000000;\r\n WebMemo1.WordWrap := False;\r\n memBlockVisibilityCondition.SetParentComponent(WebPageControl1Sheet7);\r\n memBlockVisibilityCondition.Name := 'memBlockVisibilityCondition';\r\n memBlockVisibilityCondition.Left := 0;\r\n memBlockVisibilityCondition.Top := 0;\r\n memBlockVisibilityCondition.Width := 800;\r\n memBlockVisibilityCondition.Height := 355;\r\n memBlockVisibilityCondition.Align := alClient;\r\n memBlockVisibilityCondition.BorderStyle := bsNone;\r\n memBlockVisibilityCondition.ElementClassName := 'block_memo';\r\n memBlockVisibilityCondition.ElementFont := efCSS;\r\n memBlockVisibilityCondition.Font.Charset := ANSI_CHARSET;\r\n memBlockVisibilityCondition.Font.Color := clWindowText;\r\n memBlockVisibilityCondition.Font.Height := -16;\r\n memBlockVisibilityCondition.Font.Name := 'Courier New';\r\n memBlockVisibilityCondition.Font.Style := [fsBold];\r\n memBlockVisibilityCondition.HeightPercent := 100.000000000000000000;\r\n memBlockVisibilityCondition.ParentFont := False;\r\n memBlockVisibilityCondition.SelLength := 0;\r\n memBlockVisibilityCondition.SelStart := 0;\r\n memBlockVisibilityCondition.ShowFocus := False;\r\n memBlockVisibilityCondition.WidthPercent := 100.000000000000000000;\r\n WebPageControl1Sheet8.SetParentComponent(WebPageControl1);\r\n WebPageControl1Sheet8.Name := 'WebPageControl1Sheet8';\r\n WebPageControl1Sheet8.Left := 0;\r\n WebPageControl1Sheet8.Top := 20;\r\n WebPageControl1Sheet8.Width := 800;\r\n WebPageControl1Sheet8.Height := 390;\r\n WebPageControl1Sheet8.Caption := 'Assign to system variable( EGV...)';\r\n WebPageControl1Sheet8.ChildOrder := 7;\r\n memEGVvariables.SetParentComponent(WebPageControl1Sheet8);\r\n memEGVvariables.Name := 'memEGVvariables';\r\n memEGVvariables.Left := 0;\r\n memEGVvariables.Top := 21;\r\n memEGVvariables.Width := 800;\r\n memEGVvariables.Height := 334;\r\n memEGVvariables.Align := alClient;\r\n memEGVvariables.BorderStyle := bsNone;\r\n memEGVvariables.ElementClassName := 'block_memo';\r\n memEGVvariables.ElementFont := efCSS;\r\n memEGVvariables.Font.Charset := ANSI_CHARSET;\r\n memEGVvariables.Font.Color := clWindowText;\r\n memEGVvariables.Font.Height := -16;\r\n memEGVvariables.Font.Name := 'Courier New';\r\n memEGVvariables.Font.Style := [fsBold];\r\n memEGVvariables.HeightPercent := 100.000000000000000000;\r\n memEGVvariables.ParentFont := False;\r\n memEGVvariables.SelLength := 0;\r\n memEGVvariables.SelStart := 0;\r\n memEGVvariables.ShowFocus := False;\r\n memEGVvariables.WidthPercent := 100.000000000000000000;\r\n WebMemo3.SetParentComponent(WebPageControl1Sheet8);\r\n WebMemo3.Name := 'WebMemo3';\r\n WebMemo3.Left := 0;\r\n WebMemo3.Top := 355;\r\n WebMemo3.Width := 800;\r\n WebMemo3.Height := 35;\r\n WebMemo3.Align := alBottom;\r\n WebMemo3.BorderStyle := bsNone;\r\n WebMemo3.ElementClassName := 'text_normal';\r\n WebMemo3.HeightPercent := 100.000000000000000000;\r\n WebMemo3.Lines.BeginUpdate;\r\n try\r\n WebMemo3.Lines.Clear;\r\n WebMemo3.Lines.Add('EGV..., EGV..., EGV_...');\r\n finally\r\n WebMemo3.Lines.EndUpdate;\r\n end;\r\n WebMemo3.SelLength := 0;\r\n WebMemo3.SelStart := 25;\r\n WebMemo3.ShowFocus := False;\r\n WebMemo3.WidthPercent := 100.000000000000000000;\r\n WebMemo3.WordWrap := False;\r\n cbEGV.SetParentComponent(WebPageControl1Sheet8);\r\n cbEGV.Name := 'cbEGV';\r\n cbEGV.Left := 0;\r\n cbEGV.Top := 0;\r\n cbEGV.Width := 800;\r\n cbEGV.Height := 21;\r\n cbEGV.Align := alTop;\r\n cbEGV.ElementClassName := 'box_bottomborder_font_normal';\r\n cbEGV.ElementFont := efCSS;\r\n cbEGV.HeightPercent := 100.000000000000000000;\r\n cbEGV.ShowFocus := False;\r\n cbEGV.TabOrder := 9;\r\n cbEGV.TabStop := False;\r\n cbEGV.WidthPercent := 100.000000000000000000;\r\n SetEvent(cbEGV, Self, 'OnChange', 'cbEGVChange');\r\n cbEGV.ItemIndex := -1;\r\n cbEGV.Items.BeginUpdate;\r\n try\r\n cbEGV.Items.Clear;\r\n cbEGV.Items.Add('MRN');\r\n cbEGV.Items.Add('Appointment ID');\r\n cbEGV.Items.Add('Appointment Name');\r\n cbEGV.Items.Add('Appointment Type');\r\n cbEGV.Items.Add('Service Provider');\r\n cbEGV.Items.Add('Facility Name');\r\n cbEGV.Items.Add('Facility ID');\r\n cbEGV.Items.Add('User Name');\r\n cbEGV.Items.Add('User ID');\r\n cbEGV.Items.Add('User Role');\r\n cbEGV.Items.Add('Database Name');\r\n cbEGV.Items.Add('Current Date');\r\n cbEGV.Items.Add('Current Time');\r\n finally\r\n cbEGV.Items.EndUpdate;\r\n end;\r\n pnlDBFieldSetupCaption.SetParentComponent(pnlDBFieldSettings);\r\n pnlDBFieldSetupCaption.Name := 'pnlDBFieldSetupCaption';\r\n pnlDBFieldSetupCaption.Left := 0;\r\n pnlDBFieldSetupCaption.Top := 0;\r\n pnlDBFieldSetupCaption.Width := 800;\r\n pnlDBFieldSetupCaption.Height := 27;\r\n pnlDBFieldSetupCaption.ElementClassName := 'form_caption';\r\n pnlDBFieldSetupCaption.Align := alTop;\r\n pnlDBFieldSetupCaption.BorderColor := clWhite;\r\n pnlDBFieldSetupCaption.BorderStyle := bsNone;\r\n pnlDBFieldSetupCaption.Caption := 'Caption';\r\n pnlDBFieldSetupCaption.ChildOrder := 3;\r\n pnlDBFieldSetupCaption.Color := clWhite;\r\n pnlDBFieldSetupCaption.TabOrder := 3;\r\n pnlFormButtons.SetParentComponent(pnlDBFieldSettings);\r\n pnlFormButtons.Name := 'pnlFormButtons';\r\n pnlFormButtons.Left := 0;\r\n pnlFormButtons.Top := 659;\r\n pnlFormButtons.Width := 800;\r\n pnlFormButtons.Height := 41;\r\n pnlFormButtons.Align := alBottom;\r\n pnlFormButtons.BorderStyle := bsNone;\r\n pnlFormButtons.ChildOrder := 5;\r\n pnlFormButtons.Color := clWhite;\r\n pnlFormButtons.TabOrder := 4;\r\n btnClose.SetParentComponent(pnlFormButtons);\r\n btnClose.Name := 'btnClose';\r\n btnClose.Left := 620;\r\n btnClose.Top := 0;\r\n btnClose.Width := 90;\r\n btnClose.Height := 41;\r\n btnClose.Cursor := crHandPoint;\r\n btnClose.Hint := 'Cancel';\r\n btnClose.Align := alRight;\r\n btnClose.Caption := '';\r\n btnClose.Color := clNone;\r\n btnClose.ElementClassName := 'btn_icon';\r\n btnClose.Font.Charset := DEFAULT_CHARSET;\r\n btnClose.Font.Color := clGray;\r\n btnClose.Font.Height := -16;\r\n btnClose.Font.Name := 'Tahoma';\r\n btnClose.Font.Style := [];\r\n btnClose.HeightPercent := 100.000000000000000000;\r\n btnClose.MaterialGlyph := 'exit_to_app';\r\n btnClose.MaterialGlyphSize := 1;\r\n btnClose.ParentFont := False;\r\n btnClose.ShowHint := True;\r\n btnClose.TabOrder := 10;\r\n btnClose.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnClose, Self, 'OnClick', 'btnCloseClick');\r\n btnSave.SetParentComponent(pnlFormButtons);\r\n btnSave.Name := 'btnSave';\r\n btnSave.Left := 710;\r\n btnSave.Top := 0;\r\n btnSave.Width := 90;\r\n btnSave.Height := 41;\r\n btnSave.Cursor := crHandPoint;\r\n btnSave.Hint := 'Ok';\r\n btnSave.Align := alRight;\r\n btnSave.Caption := '';\r\n btnSave.Color := clNone;\r\n btnSave.ElementClassName := 'btn_icon';\r\n btnSave.Font.Charset := DEFAULT_CHARSET;\r\n btnSave.Font.Color := clGray;\r\n btnSave.Font.Height := -16;\r\n btnSave.Font.Name := 'Tahoma';\r\n btnSave.Font.Style := [];\r\n btnSave.HeightPercent := 100.000000000000000000;\r\n btnSave.MaterialGlyphSize := 1;\r\n btnSave.ParentFont := False;\r\n btnSave.ShowHint := True;\r\n btnSave.TabOrder := 11;\r\n btnSave.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnSave, Self, 'OnClick', 'btnSaveClick');\r\n btnClear.SetParentComponent(pnlFormButtons);\r\n btnClear.Name := 'btnClear';\r\n btnClear.Left := 530;\r\n btnClear.Top := 0;\r\n btnClear.Width := 90;\r\n btnClear.Height := 41;\r\n btnClear.Cursor := crHandPoint;\r\n btnClear.Hint := 'Clear';\r\n btnClear.Align := alRight;\r\n btnClear.Caption := '';\r\n btnClear.Color := clNone;\r\n btnClear.ElementClassName := 'btn_icon';\r\n btnClear.Font.Charset := DEFAULT_CHARSET;\r\n btnClear.Font.Color := clGray;\r\n btnClear.Font.Height := -16;\r\n btnClear.Font.Name := 'Tahoma';\r\n btnClear.Font.Style := [];\r\n btnClear.HeightPercent := 100.000000000000000000;\r\n btnClear.MaterialGlyphSize := 1;\r\n btnClear.ParentFont := False;\r\n btnClear.ShowHint := True;\r\n btnClear.TabOrder := 10;\r\n btnClear.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnClear, Self, 'OnClick', 'btnClearClick');\r\n btnCopy.SetParentComponent(pnlFormButtons);\r\n btnCopy.Name := 'btnCopy';\r\n btnCopy.Left := 350;\r\n btnCopy.Top := 0;\r\n btnCopy.Width := 90;\r\n btnCopy.Height := 41;\r\n btnCopy.Cursor := crHandPoint;\r\n btnCopy.Hint := 'Copy Settings';\r\n btnCopy.Align := alRight;\r\n btnCopy.Caption := '';\r\n btnCopy.Color := clNone;\r\n btnCopy.ElementClassName := 'btn_icon';\r\n btnCopy.Font.Charset := DEFAULT_CHARSET;\r\n btnCopy.Font.Color := clGray;\r\n btnCopy.Font.Height := -16;\r\n btnCopy.Font.Name := 'Tahoma';\r\n btnCopy.Font.Style := [];\r\n btnCopy.HeightPercent := 100.000000000000000000;\r\n btnCopy.MaterialGlyphSize := 1;\r\n btnCopy.ParentFont := False;\r\n btnCopy.ShowHint := True;\r\n btnCopy.TabOrder := 10;\r\n btnCopy.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnCopy, Self, 'OnClick', 'btnCopyClick');\r\n btnPaste.SetParentComponent(pnlFormButtons);\r\n btnPaste.Name := 'btnPaste';\r\n btnPaste.Left := 440;\r\n btnPaste.Top := 0;\r\n btnPaste.Width := 90;\r\n btnPaste.Height := 41;\r\n btnPaste.Cursor := crHandPoint;\r\n btnPaste.Hint := 'Paste Settings';\r\n btnPaste.Align := alRight;\r\n btnPaste.Caption := '';\r\n btnPaste.Color := clNone;\r\n btnPaste.ElementClassName := 'btn_icon';\r\n btnPaste.Font.Charset := DEFAULT_CHARSET;\r\n btnPaste.Font.Color := clGray;\r\n btnPaste.Font.Height := -16;\r\n btnPaste.Font.Name := 'Tahoma';\r\n btnPaste.Font.Style := [];\r\n btnPaste.HeightPercent := 100.000000000000000000;\r\n btnPaste.MaterialGlyphSize := 1;\r\n btnPaste.ParentFont := False;\r\n btnPaste.ShowHint := True;\r\n btnPaste.TabOrder := 10;\r\n btnPaste.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnPaste, Self, 'OnClick', 'btnPasteClick');\r\n ClipBoard.SetParentComponent(Self);\r\n ClipBoard.Name := 'ClipBoard';\r\n ClipBoard.Left := 467;\r\n ClipBoard.Top := 80;\r\n finally\r\n pnlDBFieldSettings.AfterLoadDFMValues;\r\n WebPanel15.AfterLoadDFMValues;\r\n WebPanel1.AfterLoadDFMValues;\r\n WebLabel317.AfterLoadDFMValues;\r\n WebLabel319.AfterLoadDFMValues;\r\n WebLabel320.AfterLoadDFMValues;\r\n WebLabel322.AfterLoadDFMValues;\r\n WebLabel325.AfterLoadDFMValues;\r\n WebPanel2.AfterLoadDFMValues;\r\n edDBField_Table.AfterLoadDFMValues;\r\n edDBField_Column.AfterLoadDFMValues;\r\n WebPanel3.AfterLoadDFMValues;\r\n WebLabel2.AfterLoadDFMValues;\r\n WebPanel4.AfterLoadDFMValues;\r\n edDBField_Key3.AfterLoadDFMValues;\r\n edDBField_Key2.AfterLoadDFMValues;\r\n edDBField_Key1.AfterLoadDFMValues;\r\n WebPanel14.AfterLoadDFMValues;\r\n cbDBField_Key1Source.AfterLoadDFMValues;\r\n cbDBField_Key2Source.AfterLoadDFMValues;\r\n cbDBField_Key3Source.AfterLoadDFMValues;\r\n WebPanel23.AfterLoadDFMValues;\r\n WebLabel5.AfterLoadDFMValues;\r\n WebLabel6.AfterLoadDFMValues;\r\n WebLabel7.AfterLoadDFMValues;\r\n WebLabel1.AfterLoadDFMValues;\r\n WebLabel4.AfterLoadDFMValues;\r\n WebLabel8.AfterLoadDFMValues;\r\n WebLabel9.AfterLoadDFMValues;\r\n WebLabel10.AfterLoadDFMValues;\r\n WebLabel11.AfterLoadDFMValues;\r\n WebLabel12.AfterLoadDFMValues;\r\n WebLabel13.AfterLoadDFMValues;\r\n lbDBF_BlockTop.AfterLoadDFMValues;\r\n lbDBF_BlockLeft.AfterLoadDFMValues;\r\n WebLabel14.AfterLoadDFMValues;\r\n WebLabel3.AfterLoadDFMValues;\r\n clrDBField_Color.AfterLoadDFMValues;\r\n chDBF_DoUpdate.AfterLoadDFMValues;\r\n chDBF_DoInsert.AfterLoadDFMValues;\r\n seDBF_BlockWidth.AfterLoadDFMValues;\r\n chDBF_IncludeInDefault.AfterLoadDFMValues;\r\n chDBF_HideWhenEmpty.AfterLoadDFMValues;\r\n seDBF_BlockHeight.AfterLoadDFMValues;\r\n chDBF_ApplyColor.AfterLoadDFMValues;\r\n seDBF_BlockTop.AfterLoadDFMValues;\r\n seDBF_BlockLeft.AfterLoadDFMValues;\r\n edDBField_EditMask.AfterLoadDFMValues;\r\n edCERNER_Search.AfterLoadDFMValues;\r\n WebPanel24.AfterLoadDFMValues;\r\n WebPageControl1.AfterLoadDFMValues;\r\n WebPageControl1Sheet1.AfterLoadDFMValues;\r\n memDBField_customselect.AfterLoadDFMValues;\r\n cbQuickData.AfterLoadDFMValues;\r\n WebMemo2.AfterLoadDFMValues;\r\n WebPageControl1Sheet2.AfterLoadDFMValues;\r\n memDBField_Update.AfterLoadDFMValues;\r\n WebMemo5.AfterLoadDFMValues;\r\n WebPageControl1Sheet3.AfterLoadDFMValues;\r\n memDBField_Insert.AfterLoadDFMValues;\r\n WebMemo6.AfterLoadDFMValues;\r\n WebPageControl1Sheet4.AfterLoadDFMValues;\r\n memDBField_HTMLTemplate.AfterLoadDFMValues;\r\n WebPageControl1Sheet5.AfterLoadDFMValues;\r\n memDBField_CopyToBlocks.AfterLoadDFMValues;\r\n WebMemo4.AfterLoadDFMValues;\r\n WebPageControl1Sheet6.AfterLoadDFMValues;\r\n memDBField_SentenceTMP.AfterLoadDFMValues;\r\n WebMemo11.AfterLoadDFMValues;\r\n WebPageControl1Sheet7.AfterLoadDFMValues;\r\n WebMemo1.AfterLoadDFMValues;\r\n memBlockVisibilityCondition.AfterLoadDFMValues;\r\n WebPageControl1Sheet8.AfterLoadDFMValues;\r\n memEGVvariables.AfterLoadDFMValues;\r\n WebMemo3.AfterLoadDFMValues;\r\n cbEGV.AfterLoadDFMValues;\r\n pnlDBFieldSetupCaption.AfterLoadDFMValues;\r\n pnlFormButtons.AfterLoadDFMValues;\r\n btnClose.AfterLoadDFMValues;\r\n btnSave.AfterLoadDFMValues;\r\n btnClear.AfterLoadDFMValues;\r\n btnCopy.AfterLoadDFMValues;\r\n btnPaste.AfterLoadDFMValues;\r\n ClipBoard.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n\r\n\r\n\r\n\r\n","unit QPKLSettings;\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, WEBLib.Clipboard;\r\n\r\ntype\r\n TfrmQPKLSettings = class(TForm)\r\n pnlQuickPicklistSettings: TPanel;\r\n memQPKL_Select: TMemo;\r\n WebPanel25: TPanel;\r\n chQPKL_Settings_CheckedOnly: TLabel;\r\n WebLabel306: TLabel;\r\n WebLabel309: TLabel;\r\n WebLabel310: TLabel;\r\n WebLabel311: TLabel;\r\n WebLabel312: TLabel;\r\n WebLabel314: TLabel;\r\n WebLabel315: TLabel;\r\n lbQPKLSectionName: TLabel;\r\n edQPKL_CheckedWord: TEdit;\r\n chQPKL_CheckedOnly: TCheckBox;\r\n chQPKL_UserInitials: TCheckBox;\r\n chQPKL_Timestamp: TCheckBox;\r\n edQPKL_UncheckedWord: TEdit;\r\n chQPKL_SingleSelect: TCheckBox;\r\n chQPKL_ClearPrevData: TCheckBox;\r\n chQPKL_CompactResult: TCheckBox;\r\n cbQPKL_DataSource: TComboBox;\r\n edtQPKL_Section: TEdit;\r\n pnlPKLSetupCaption: TPanel;\r\n WebPanel26: TPanel;\r\n pnlFormButtons: TPanel;\r\n btnClose: TBitBtn;\r\n btnSave: TBitBtn;\r\n cbPickListType: TComboBox;\r\n edtPicklistCustomForm: TEdit;\r\n WebLabel3: TLabel;\r\n WebLabel4: TLabel;\r\n WebLabel1: TLabel;\r\n cbBlockDataType: TComboBox;\r\n WebLabel2: TLabel;\r\n seColumns: TSpinEdit;\r\n WebLabel5: TLabel;\r\n btnCopy: TBitBtn;\r\n btnPaste: TBitBtn;\r\n WebLabel6: TLabel;\r\n memCopy: TMemo;\r\n ClipBoard: TClipboard;\r\n procedure btnCloseClick(Sender: TObject);\r\n procedure btnSaveClick(Sender: TObject);\r\n procedure cbPickListTypeChange(Sender: TObject);\r\n procedure WebFormShow(Sender: TObject);\r\n procedure Save(mode: integer=0);\r\n procedure btnCopyClick(Sender: TObject);\r\n [async] procedure btnPasteClick(Sender: TObject); async;\r\n private\r\n { Private declarations }\r\n public\r\n { Public declarations }\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmQPKLSettings: TfrmQPKLSettings;\r\n\r\nimplementation\r\n\r\n{$R *.dfm}\r\n\r\nuses Common, DataModule, Main;\r\n\r\nprocedure TfrmQPKLSettings.btnCloseClick(Sender: TObject);\r\nbegin\r\nself.Close;\r\nend;\r\n\r\nprocedure TfrmQPKLSettings.btnCopyClick(Sender: TObject);\r\nbegin\r\n Save(1);\r\nend;\r\n\r\nprocedure TfrmQPKLSettings.btnPasteClick(Sender: TObject);\r\nvar text_p: string;\r\nbegin\r\n\r\n asm\r\n text_p = await navigator.clipboard.readText();\r\n end;\r\nmemCopy.text := text_p;\r\n\r\ndm.EGV_SESSIONSTORAGE.values['COPY_Q_CHECKED'] := memCopy.Lines[0];\r\ndm.EGV_SESSIONSTORAGE.values['COPY_Q_USER'] := memCopy.Lines[2];\r\ndm.EGV_SESSIONSTORAGE.values['COPY_Q_DATETIME'] := memCopy.Lines[3];\r\ndm.EGV_SESSIONSTORAGE.values['COPY_Q_SINGLE'] := memCopy.Lines[4];\r\ndm.EGV_SESSIONSTORAGE.values['COPY_Q_CLEAR'] := memCopy.Lines[4];\r\ndm.EGV_SESSIONSTORAGE.values['COPY_Q_COMPACT'] := memCopy.Lines[5];\r\n\r\ndm.EGV_SESSIONSTORAGE.values['COPY_Q_C_WORD'] := memCopy.Lines[6];\r\ndm.EGV_SESSIONSTORAGE.values['COPY_Q_U_WORD'] := memCopy.Lines[7];\r\ndm.EGV_SESSIONSTORAGE.values['COPY_Q_SOURCE'] := memCopy.Lines[8];\r\ndm.EGV_SESSIONSTORAGE.values['COPY_Q_SECTION'] := memCopy.Lines[9];\r\ndm.EGV_SESSIONSTORAGE.values['COPY_Q_SELECT'] := memCopy.Lines[10];\r\ndm.EGV_SESSIONSTORAGE.values['COPY_Q_CUSTOMFORM'] := memCopy.Lines[11];\r\ndm.EGV_SESSIONSTORAGE.values['COPY_Q_PKLTYPE'] := memCopy.Lines[12];\r\ndm.EGV_SESSIONSTORAGE.values['COPY_Q_DATATYPE'] := memCopy.Lines[13];\r\ndm.EGV_SESSIONSTORAGE.values['COPY_Q_RGCOLUMNS'] := memCopy.Lines[14];\r\n\r\nchQPKL_CheckedOnly.Checked := (dm.EGV_SESSIONSTORAGE.values['COPY_Q_CHECKED'] = '1');\r\nchQPKL_UserInitials.Checked := (dm.EGV_SESSIONSTORAGE.values['COPY_Q_USER'] = '1');\r\nchQPKL_Timestamp.Checked := (dm.EGV_SESSIONSTORAGE.values['COPY_Q_DATETIME'] = '1');\r\nchQPKL_SingleSelect.Checked := (dm.EGV_SESSIONSTORAGE.values['COPY_Q_SINGLE'] = '1');\r\nchQPKL_ClearPrevData.Checked := (dm.EGV_SESSIONSTORAGE.values['COPY_Q_CLEAR'] = '1');\r\nchQPKL_CompactResult.Checked := (dm.EGV_SESSIONSTORAGE.values['COPY_Q_COMPACT'] = '1');\r\n\r\nedQPKL_CheckedWord.text := dm.EGV_SESSIONSTORAGE.values['COPY_Q_C_WORD'];\r\nedQPKL_UncheckedWord.text := dm.EGV_SESSIONSTORAGE.values['COPY_Q_U_WORD'];\r\n\r\nif dm.EGV_SESSIONSTORAGE.values['COPY_Q_SOURCE'] = ''\r\nthen cbQPKL_DataSource.itemindex := 0\r\nelse cbQPKL_DataSource.itemindex := strtoint(dm.EGV_SESSIONSTORAGE.values['COPY_Q_SOURCE']);\r\n\r\nedtQPKL_Section.text := dm.EGV_SESSIONSTORAGE.values['COPY_Q_SECTION'];\r\nmemQPKL_Select.text := dm.EGV_SESSIONSTORAGE.values['COPY_Q_SELECT'];\r\n\r\nedtPicklistCustomForm.text := dm.EGV_SESSIONSTORAGE.values['COPY_Q_CUSTOMFORM'];\r\n\r\ncbPickListType.text := dm.EGV_SESSIONSTORAGE.values['COPY_Q_PKLTYPE'];\r\ncbBlockDataType.text := dm.EGV_SESSIONSTORAGE.values['COPY_Q_DATATYPE'];\r\nif dm.EGV_SESSIONSTORAGE.values['COPY_Q_RGCOLUMNS'] = ''\r\nthen seColumns.value := 0\r\nelse strtoint(dm.EGV_SESSIONSTORAGE.values['COPY_Q_RGCOLUMNS']);\r\nend;\r\n\r\nprocedure TfrmQPKLSettings.btnSaveClick(Sender: TObject);\r\nbegin\r\npnlQuickPicklistSettings.visible := false;\r\nSave(0);\r\nself.close;\r\nend;\r\n\r\n\r\nprocedure TfrmQPKLSettings.cbPickListTypeChange(Sender: TObject);\r\nbegin\r\nBlockSetPickListType(Sender);\r\nWeblabel5.Visible := (cbBlockDataType.Text = 'Radio Buttons');\r\nseColumns.Visible := (cbBlockDataType.Text = 'Radio Buttons');\r\nend;\r\n\r\nprocedure TfrmQPKLSettings.WebFormShow(Sender: TObject);\r\nbegin\r\nif (dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_PKLTYPE'] = '') or\r\n (length(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_PKLTYPE']) > 1)\r\nthen dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_PKLTYPE'] := '0';\r\n\r\nif (dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE'] = '') or\r\n (length(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE']) > 1)\r\nthen dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE'] := '-1';\r\n\r\ncbPickListType.itemindex := strtoint(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_PKLTYPE']);\r\ncbBlockDataType.ItemIndex := strtoint(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE']);\r\n\r\n//cbPickListType.itemindex := BlockGetEditButton(EGV_CURRENTBLOCK).tag;\r\n//cbBlockDataType.ItemIndex := cbBlockDataType.Items.IndexOf(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE']);\r\n\r\n\r\nedtPicklistCustomForm.text := dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_CUSTOMFORM'];\r\nif dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_RGCOLUMNS'] = ''\r\nthen seColumns.value := 1\r\nelse seColumns.value := strtoint(dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_RGCOLUMNS']);\r\n\r\nWeblabel5.Visible := (cbBlockDataType.Text = 'Radio Buttons');\r\nseColumns.Visible := (cbBlockDataType.Text = 'Radio Buttons');\r\nResizeButtons(pnlFormButtons);\r\nend;\r\n\r\nprocedure TfrmQPKLSettings.Save(mode: integer = 0);\r\nbegin\r\nif (chQPKL_CheckedOnly.checked)\r\nthen dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_CHECKED'] := '1'\r\nelse dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_CHECKED'] := '0';\r\nif (chQPKL_UserInitials.checked)\r\nthen dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_USER'] := '1'\r\nelse dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_USER'] := '0';\r\nif (chQPKL_Timestamp.checked)\r\nthen dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATETIME'] := '1'\r\nelse dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATETIME'] := '0';\r\nif (chQPKL_SingleSelect.checked)\r\nthen dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SINGLE'] := '1'\r\nelse dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SINGLE'] := '0';\r\nif (chQPKL_ClearPrevData.checked)\r\nthen dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_CLEAR'] := '1'\r\nelse dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_CLEAR'] := '0';\r\nif (chQPKL_CompactResult.checked)\r\nthen dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_COMPACT'] := '1'\r\nelse dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_COMPACT'] := '0';\r\n\r\ndm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_C_WORD'] := edQPKL_CheckedWord.text;\r\ndm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_U_WORD'] := edQPKL_UncheckedWord.text;\r\ndm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SOURCE'] := inttostr(cbQPKL_DataSource.itemIndex);\r\ndm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SECTION'] := edtQPKL_Section.text;\r\ndm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SELECT'] := memQPKL_Select.text;\r\n\r\ndm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_CUSTOMFORM'] := edtPicklistCustomForm.text;\r\ndm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_PKLTYPE'] := inttostr(cbPickListType.itemindex);\r\ndm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_DATATYPE'] := inttostr(cbBlockDataType.itemindex);\r\ndm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_RGCOLUMNS'] := inttostr(seColumns.value);\r\n\r\n// Save a copy to paste later\r\nif mode = 1\r\nthen begin\r\n if (chQPKL_CheckedOnly.checked)\r\n then dm.EGV_SESSIONSTORAGE.values['COPY_Q_CHECKED'] := '1'\r\n else dm.EGV_SESSIONSTORAGE.values['COPY_Q_CHECKED'] := '0';\r\n if (chQPKL_UserInitials.checked)\r\n then dm.EGV_SESSIONSTORAGE.values['COPY_Q_USER'] := '1'\r\n else dm.EGV_SESSIONSTORAGE.values['COPY_Q_USER'] := '0';\r\n if (chQPKL_Timestamp.checked)\r\n then dm.EGV_SESSIONSTORAGE.values['COPY_Q_DATETIME'] := '1'\r\n else dm.EGV_SESSIONSTORAGE.values['COPY_Q_DATETIME'] := '0';\r\n if (chQPKL_SingleSelect.checked)\r\n then dm.EGV_SESSIONSTORAGE.values['COPY_Q_SINGLE'] := '1'\r\n else dm.EGV_SESSIONSTORAGE.values['COPY_Q_SINGLE'] := '0';\r\n if (chQPKL_ClearPrevData.checked)\r\n then dm.EGV_SESSIONSTORAGE.values['COPY_Q_CLEAR'] := '1'\r\n else dm.EGV_SESSIONSTORAGE.values['COPY_Q_CLEAR'] := '0';\r\n if (chQPKL_CompactResult.checked)\r\n then dm.EGV_SESSIONSTORAGE.values['COPY_Q_COMPACT'] := '1'\r\n else dm.EGV_SESSIONSTORAGE.values['COPY_Q_COMPACT'] := '0';\r\n\r\n dm.EGV_SESSIONSTORAGE.values['COPY_Q_C_WORD'] := edQPKL_CheckedWord.text;\r\n dm.EGV_SESSIONSTORAGE.values['COPY_Q_U_WORD'] := edQPKL_UncheckedWord.text;\r\n dm.EGV_SESSIONSTORAGE.values['COPY_Q_SOURCE'] := inttostr(cbQPKL_DataSource.itemIndex);\r\n dm.EGV_SESSIONSTORAGE.values['COPY_Q_SECTION'] := edtQPKL_Section.text;\r\n dm.EGV_SESSIONSTORAGE.values['COPY_Q_SELECT'] := memQPKL_Select.text;\r\n dm.EGV_SESSIONSTORAGE.values['COPY_Q_CUSTOMFORM'] := edtPicklistCustomForm.text;\r\n dm.EGV_SESSIONSTORAGE.values['COPY_Q_PKLTYPE'] := cbPickListType.text;\r\n dm.EGV_SESSIONSTORAGE.values['COPY_Q_DATATYPE'] := cbBlockDataType.text;\r\n dm.EGV_SESSIONSTORAGE.values['COPY_Q_RGCOLUMNS'] := inttostr(seColumns.value);\r\n\r\n clipboard.CopyToClipboard(\r\n dm.EGV_SESSIONSTORAGE.values['COPY_Q_CHECKED'] + chr(13) +\r\n dm.EGV_SESSIONSTORAGE.values['COPY_Q_USER'] + chr(13) +\r\n dm.EGV_SESSIONSTORAGE.values['COPY_Q_DATETIME'] + chr(13) +\r\n dm.EGV_SESSIONSTORAGE.values['COPY_Q_SINGLE'] + chr(13) +\r\n dm.EGV_SESSIONSTORAGE.values['COPY_Q_CLEAR'] + chr(13) +\r\n dm.EGV_SESSIONSTORAGE.values['COPY_Q_COMPACT'] + chr(13) +\r\n\r\n dm.EGV_SESSIONSTORAGE.values['COPY_Q_C_WORD'] + chr(13) +\r\n dm.EGV_SESSIONSTORAGE.values['COPY_Q_U_WORD'] + chr(13) +\r\n dm.EGV_SESSIONSTORAGE.values['COPY_Q_SOURCE'] + chr(13) +\r\n dm.EGV_SESSIONSTORAGE.values['COPY_Q_SECTION'] + chr(13) +\r\n dm.EGV_SESSIONSTORAGE.values['COPY_Q_SELECT'] + chr(13) +\r\n dm.EGV_SESSIONSTORAGE.values['COPY_Q_CUSTOMFORM'] + chr(13) +\r\n dm.EGV_SESSIONSTORAGE.values['COPY_Q_PKLTYPE'] + chr(13) +\r\n dm.EGV_SESSIONSTORAGE.values['COPY_Q_DATATYPE'] + chr(13) +\r\n dm.EGV_SESSIONSTORAGE.values['COPY_Q_RGCOLUMNS'] );\r\n\r\n end;\r\nend;\r\n\r\nprocedure TfrmQPKLSettings.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n pnlQuickPicklistSettings := TPanel.Create(Self);\r\n WebLabel6 := TLabel.Create(Self);\r\n memQPKL_Select := TMemo.Create(Self);\r\n WebPanel25 := TPanel.Create(Self);\r\n chQPKL_Settings_CheckedOnly := TLabel.Create(Self);\r\n WebLabel306 := TLabel.Create(Self);\r\n WebLabel309 := TLabel.Create(Self);\r\n WebLabel310 := TLabel.Create(Self);\r\n WebLabel311 := TLabel.Create(Self);\r\n WebLabel312 := TLabel.Create(Self);\r\n WebLabel314 := TLabel.Create(Self);\r\n WebLabel315 := TLabel.Create(Self);\r\n lbQPKLSectionName := TLabel.Create(Self);\r\n WebLabel3 := TLabel.Create(Self);\r\n WebLabel4 := TLabel.Create(Self);\r\n WebLabel1 := TLabel.Create(Self);\r\n WebLabel2 := TLabel.Create(Self);\r\n WebLabel5 := TLabel.Create(Self);\r\n edQPKL_CheckedWord := TEdit.Create(Self);\r\n chQPKL_CheckedOnly := TCheckBox.Create(Self);\r\n chQPKL_UserInitials := TCheckBox.Create(Self);\r\n chQPKL_Timestamp := TCheckBox.Create(Self);\r\n edQPKL_UncheckedWord := TEdit.Create(Self);\r\n chQPKL_SingleSelect := TCheckBox.Create(Self);\r\n chQPKL_ClearPrevData := TCheckBox.Create(Self);\r\n chQPKL_CompactResult := TCheckBox.Create(Self);\r\n cbQPKL_DataSource := TComboBox.Create(Self);\r\n edtQPKL_Section := TEdit.Create(Self);\r\n cbPickListType := TComboBox.Create(Self);\r\n edtPicklistCustomForm := TEdit.Create(Self);\r\n cbBlockDataType := TComboBox.Create(Self);\r\n seColumns := TSpinEdit.Create(Self);\r\n pnlPKLSetupCaption := TPanel.Create(Self);\r\n WebPanel26 := TPanel.Create(Self);\r\n pnlFormButtons := TPanel.Create(Self);\r\n btnClose := TBitBtn.Create(Self);\r\n btnSave := TBitBtn.Create(Self);\r\n btnCopy := TBitBtn.Create(Self);\r\n btnPaste := TBitBtn.Create(Self);\r\n memCopy := TMemo.Create(Self);\r\n ClipBoard := TClipboard.Create(Self);\r\n\r\n pnlQuickPicklistSettings.BeforeLoadDFMValues;\r\n WebLabel6.BeforeLoadDFMValues;\r\n memQPKL_Select.BeforeLoadDFMValues;\r\n WebPanel25.BeforeLoadDFMValues;\r\n chQPKL_Settings_CheckedOnly.BeforeLoadDFMValues;\r\n WebLabel306.BeforeLoadDFMValues;\r\n WebLabel309.BeforeLoadDFMValues;\r\n WebLabel310.BeforeLoadDFMValues;\r\n WebLabel311.BeforeLoadDFMValues;\r\n WebLabel312.BeforeLoadDFMValues;\r\n WebLabel314.BeforeLoadDFMValues;\r\n WebLabel315.BeforeLoadDFMValues;\r\n lbQPKLSectionName.BeforeLoadDFMValues;\r\n WebLabel3.BeforeLoadDFMValues;\r\n WebLabel4.BeforeLoadDFMValues;\r\n WebLabel1.BeforeLoadDFMValues;\r\n WebLabel2.BeforeLoadDFMValues;\r\n WebLabel5.BeforeLoadDFMValues;\r\n edQPKL_CheckedWord.BeforeLoadDFMValues;\r\n chQPKL_CheckedOnly.BeforeLoadDFMValues;\r\n chQPKL_UserInitials.BeforeLoadDFMValues;\r\n chQPKL_Timestamp.BeforeLoadDFMValues;\r\n edQPKL_UncheckedWord.BeforeLoadDFMValues;\r\n chQPKL_SingleSelect.BeforeLoadDFMValues;\r\n chQPKL_ClearPrevData.BeforeLoadDFMValues;\r\n chQPKL_CompactResult.BeforeLoadDFMValues;\r\n cbQPKL_DataSource.BeforeLoadDFMValues;\r\n edtQPKL_Section.BeforeLoadDFMValues;\r\n cbPickListType.BeforeLoadDFMValues;\r\n edtPicklistCustomForm.BeforeLoadDFMValues;\r\n cbBlockDataType.BeforeLoadDFMValues;\r\n seColumns.BeforeLoadDFMValues;\r\n pnlPKLSetupCaption.BeforeLoadDFMValues;\r\n WebPanel26.BeforeLoadDFMValues;\r\n pnlFormButtons.BeforeLoadDFMValues;\r\n btnClose.BeforeLoadDFMValues;\r\n btnSave.BeforeLoadDFMValues;\r\n btnCopy.BeforeLoadDFMValues;\r\n btnPaste.BeforeLoadDFMValues;\r\n memCopy.BeforeLoadDFMValues;\r\n ClipBoard.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmQPKLSettings';\r\n Width := 800;\r\n Height := 700;\r\n ElementClassName := 'BOX_FORM_BORDER';\r\n Shadow := False;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n pnlQuickPicklistSettings.SetParentComponent(Self);\r\n pnlQuickPicklistSettings.Name := 'pnlQuickPicklistSettings';\r\n pnlQuickPicklistSettings.Tag := -1;\r\n pnlQuickPicklistSettings.Left := 0;\r\n pnlQuickPicklistSettings.Top := 0;\r\n pnlQuickPicklistSettings.Width := 800;\r\n pnlQuickPicklistSettings.Height := 700;\r\n pnlQuickPicklistSettings.ElementClassName := 'BOX_ROUND_BORDER';\r\n pnlQuickPicklistSettings.Align := alClient;\r\n pnlQuickPicklistSettings.ChildOrder := 8;\r\n pnlQuickPicklistSettings.Color := clWhite;\r\n pnlQuickPicklistSettings.TabOrder := 0;\r\n WebLabel6.SetParentComponent(pnlQuickPicklistSettings);\r\n WebLabel6.Name := 'WebLabel6';\r\n WebLabel6.Left := 0;\r\n WebLabel6.Top := 646;\r\n WebLabel6.Width := 800;\r\n WebLabel6.Height := 13;\r\n WebLabel6.Align := alBottom;\r\n WebLabel6.Caption := #39'USE 1'#39' - for Authorization DB, '#39'USE db_name'#39' - for any DB under connected server.';\r\n WebLabel6.ElementClassName := 'text_normal';\r\n WebLabel6.ElementFont := efCSS;\r\n WebLabel6.HeightPercent := 100.000000000000000000;\r\n WebLabel6.Transparent := False;\r\n WebLabel6.WidthPercent := 100.000000000000000000;\r\n memQPKL_Select.SetParentComponent(pnlQuickPicklistSettings);\r\n memQPKL_Select.Name := 'memQPKL_Select';\r\n memQPKL_Select.Tag := -1;\r\n memQPKL_Select.Left := 0;\r\n memQPKL_Select.Top := 297;\r\n memQPKL_Select.Width := 800;\r\n memQPKL_Select.Height := 349;\r\n memQPKL_Select.Align := alClient;\r\n memQPKL_Select.BorderStyle := bsNone;\r\n memQPKL_Select.ElementClassName := 'block_memo';\r\n memQPKL_Select.ElementFont := efCSS;\r\n memQPKL_Select.Font.Charset := ANSI_CHARSET;\r\n memQPKL_Select.Font.Color := clWindowText;\r\n memQPKL_Select.Font.Height := -16;\r\n memQPKL_Select.Font.Name := 'Courier New';\r\n memQPKL_Select.Font.Style := [fsBold];\r\n memQPKL_Select.HeightPercent := 100.000000000000000000;\r\n memQPKL_Select.ParentFont := False;\r\n memQPKL_Select.SelLength := 0;\r\n memQPKL_Select.SelStart := 0;\r\n memQPKL_Select.ShowFocus := False;\r\n memQPKL_Select.WidthPercent := 100.000000000000000000;\r\n WebPanel25.SetParentComponent(pnlQuickPicklistSettings);\r\n WebPanel25.Name := 'WebPanel25';\r\n WebPanel25.Left := 0;\r\n WebPanel25.Top := 25;\r\n WebPanel25.Width := 800;\r\n WebPanel25.Height := 257;\r\n WebPanel25.Align := alTop;\r\n WebPanel25.BorderColor := clWhite;\r\n WebPanel25.BorderStyle := bsNone;\r\n WebPanel25.ChildOrder := 2;\r\n WebPanel25.Color := clWhite;\r\n WebPanel25.TabOrder := 1;\r\n chQPKL_Settings_CheckedOnly.SetParentComponent(WebPanel25);\r\n chQPKL_Settings_CheckedOnly.Name := 'chQPKL_Settings_CheckedOnly';\r\n chQPKL_Settings_CheckedOnly.Left := 3;\r\n chQPKL_Settings_CheckedOnly.Top := 57;\r\n chQPKL_Settings_CheckedOnly.Width := 66;\r\n chQPKL_Settings_CheckedOnly.Height := 13;\r\n chQPKL_Settings_CheckedOnly.Caption := 'Checked Only';\r\n chQPKL_Settings_CheckedOnly.ElementClassName := 'text_normal';\r\n chQPKL_Settings_CheckedOnly.ElementFont := efCSS;\r\n chQPKL_Settings_CheckedOnly.HeightPercent := 100.000000000000000000;\r\n chQPKL_Settings_CheckedOnly.WidthPercent := 100.000000000000000000;\r\n WebLabel306.SetParentComponent(WebPanel25);\r\n WebLabel306.Name := 'WebLabel306';\r\n WebLabel306.Left := 3;\r\n WebLabel306.Top := 6;\r\n WebLabel306.Width := 70;\r\n WebLabel306.Height := 13;\r\n WebLabel306.Caption := 'Value Checked';\r\n WebLabel306.ElementClassName := 'text_normal';\r\n WebLabel306.ElementFont := efCSS;\r\n WebLabel306.HeightPercent := 100.000000000000000000;\r\n WebLabel306.WidthPercent := 100.000000000000000000;\r\n WebLabel309.SetParentComponent(WebPanel25);\r\n WebLabel309.Name := 'WebLabel309';\r\n WebLabel309.Left := 3;\r\n WebLabel309.Top := 93;\r\n WebLabel309.Width := 56;\r\n WebLabel309.Height := 13;\r\n WebLabel309.Caption := 'User Initials';\r\n WebLabel309.ElementClassName := 'text_normal';\r\n WebLabel309.ElementFont := efCSS;\r\n WebLabel309.HeightPercent := 100.000000000000000000;\r\n WebLabel309.WidthPercent := 100.000000000000000000;\r\n WebLabel310.SetParentComponent(WebPanel25);\r\n WebLabel310.Name := 'WebLabel310';\r\n WebLabel310.Left := 3;\r\n WebLabel310.Top := 111;\r\n WebLabel310.Width := 55;\r\n WebLabel310.Height := 13;\r\n WebLabel310.Caption := 'Time Stamp';\r\n WebLabel310.ElementClassName := 'text_normal';\r\n WebLabel310.ElementFont := efCSS;\r\n WebLabel310.HeightPercent := 100.000000000000000000;\r\n WebLabel310.WidthPercent := 100.000000000000000000;\r\n WebLabel311.SetParentComponent(WebPanel25);\r\n WebLabel311.Name := 'WebLabel311';\r\n WebLabel311.Left := 3;\r\n WebLabel311.Top := 25;\r\n WebLabel311.Width := 81;\r\n WebLabel311.Height := 13;\r\n WebLabel311.Caption := 'Value Unchecked';\r\n WebLabel311.ElementClassName := 'text_normal';\r\n WebLabel311.ElementFont := efCSS;\r\n WebLabel311.HeightPercent := 100.000000000000000000;\r\n WebLabel311.WidthPercent := 100.000000000000000000;\r\n WebLabel312.SetParentComponent(WebPanel25);\r\n WebLabel312.Name := 'WebLabel312';\r\n WebLabel312.Left := 3;\r\n WebLabel312.Top := 129;\r\n WebLabel312.Width := 60;\r\n WebLabel312.Height := 13;\r\n WebLabel312.Caption := 'Single Select';\r\n WebLabel312.ElementClassName := 'text_normal';\r\n WebLabel312.ElementFont := efCSS;\r\n WebLabel312.HeightPercent := 100.000000000000000000;\r\n WebLabel312.WidthPercent := 100.000000000000000000;\r\n WebLabel314.SetParentComponent(WebPanel25);\r\n WebLabel314.Name := 'WebLabel314';\r\n WebLabel314.Left := 3;\r\n WebLabel314.Top := 148;\r\n WebLabel314.Width := 83;\r\n WebLabel314.Height := 13;\r\n WebLabel314.Caption := 'Remove previous';\r\n WebLabel314.ElementClassName := 'text_normal';\r\n WebLabel314.ElementFont := efCSS;\r\n WebLabel314.HeightPercent := 100.000000000000000000;\r\n WebLabel314.WidthPercent := 100.000000000000000000;\r\n WebLabel315.SetParentComponent(WebPanel25);\r\n WebLabel315.Name := 'WebLabel315';\r\n WebLabel315.Left := 3;\r\n WebLabel315.Top := 75;\r\n WebLabel315.Width := 75;\r\n WebLabel315.Height := 13;\r\n WebLabel315.Caption := 'Compact Result';\r\n WebLabel315.ElementClassName := 'text_normal';\r\n WebLabel315.ElementFont := efCSS;\r\n WebLabel315.HeightPercent := 100.000000000000000000;\r\n WebLabel315.WidthPercent := 100.000000000000000000;\r\n lbQPKLSectionName.SetParentComponent(WebPanel25);\r\n lbQPKLSectionName.Name := 'lbQPKLSectionName';\r\n lbQPKLSectionName.Left := 121;\r\n lbQPKLSectionName.Top := 120;\r\n lbQPKLSectionName.Width := 65;\r\n lbQPKLSectionName.Height := 13;\r\n lbQPKLSectionName.Caption := 'Section Name';\r\n lbQPKLSectionName.Font.Charset := DEFAULT_CHARSET;\r\n lbQPKLSectionName.Font.Color := clSilver;\r\n lbQPKLSectionName.Font.Height := -11;\r\n lbQPKLSectionName.Font.Name := 'Tahoma';\r\n lbQPKLSectionName.Font.Style := [];\r\n lbQPKLSectionName.HeightPercent := 100.000000000000000000;\r\n lbQPKLSectionName.ParentFont := False;\r\n lbQPKLSectionName.WidthPercent := 100.000000000000000000;\r\n WebLabel3.SetParentComponent(WebPanel25);\r\n WebLabel3.Name := 'WebLabel3';\r\n WebLabel3.Left := 3;\r\n WebLabel3.Top := 194;\r\n WebLabel3.Width := 72;\r\n WebLabel3.Height := 13;\r\n WebLabel3.Caption := 'Pick Form Type';\r\n WebLabel3.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel3.Font.Color := clSilver;\r\n WebLabel3.Font.Height := -11;\r\n WebLabel3.Font.Name := 'Tahoma';\r\n WebLabel3.Font.Style := [];\r\n WebLabel3.HeightPercent := 100.000000000000000000;\r\n WebLabel3.ParentFont := False;\r\n WebLabel3.WidthPercent := 100.000000000000000000;\r\n WebLabel4.SetParentComponent(WebPanel25);\r\n WebLabel4.Name := 'WebLabel4';\r\n WebLabel4.Left := 116;\r\n WebLabel4.Top := 194;\r\n WebLabel4.Width := 115;\r\n WebLabel4.Height := 13;\r\n WebLabel4.Caption := 'Custom Pick-Form Name';\r\n WebLabel4.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel4.Font.Color := clSilver;\r\n WebLabel4.Font.Height := -11;\r\n WebLabel4.Font.Name := 'Tahoma';\r\n WebLabel4.Font.Style := [];\r\n WebLabel4.HeightPercent := 100.000000000000000000;\r\n WebLabel4.ParentFont := False;\r\n WebLabel4.WidthPercent := 100.000000000000000000;\r\n WebLabel1.SetParentComponent(WebPanel25);\r\n WebLabel1.Name := 'WebLabel1';\r\n WebLabel1.Left := 121;\r\n WebLabel1.Top := 78;\r\n WebLabel1.Width := 59;\r\n WebLabel1.Height := 13;\r\n WebLabel1.Caption := 'Data Source';\r\n WebLabel1.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel1.Font.Color := clSilver;\r\n WebLabel1.Font.Height := -11;\r\n WebLabel1.Font.Name := 'Tahoma';\r\n WebLabel1.Font.Style := [];\r\n WebLabel1.HeightPercent := 100.000000000000000000;\r\n WebLabel1.ParentFont := False;\r\n WebLabel1.WidthPercent := 100.000000000000000000;\r\n WebLabel2.SetParentComponent(WebPanel25);\r\n WebLabel2.Name := 'WebLabel2';\r\n WebLabel2.Left := 3;\r\n WebLabel2.Top := 236;\r\n WebLabel2.Width := 62;\r\n WebLabel2.Height := 13;\r\n WebLabel2.Caption := 'Control Type';\r\n WebLabel2.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel2.Font.Color := clSilver;\r\n WebLabel2.Font.Height := -11;\r\n WebLabel2.Font.Name := 'Tahoma';\r\n WebLabel2.Font.Style := [];\r\n WebLabel2.HeightPercent := 100.000000000000000000;\r\n WebLabel2.ParentFont := False;\r\n WebLabel2.WidthPercent := 100.000000000000000000;\r\n WebLabel5.SetParentComponent(WebPanel25);\r\n WebLabel5.Name := 'WebLabel5';\r\n WebLabel5.Left := 116;\r\n WebLabel5.Top := 236;\r\n WebLabel5.Width := 42;\r\n WebLabel5.Height := 13;\r\n WebLabel5.Caption := 'Clolumns';\r\n WebLabel5.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel5.Font.Color := clSilver;\r\n WebLabel5.Font.Height := -11;\r\n WebLabel5.Font.Name := 'Tahoma';\r\n WebLabel5.Font.Style := [];\r\n WebLabel5.HeightPercent := 100.000000000000000000;\r\n WebLabel5.ParentFont := False;\r\n WebLabel5.WidthPercent := 100.000000000000000000;\r\n edQPKL_CheckedWord.SetParentComponent(WebPanel25);\r\n edQPKL_CheckedWord.Name := 'edQPKL_CheckedWord';\r\n edQPKL_CheckedWord.Left := 121;\r\n edQPKL_CheckedWord.Top := 3;\r\n edQPKL_CheckedWord.Width := 672;\r\n edQPKL_CheckedWord.Height := 22;\r\n edQPKL_CheckedWord.Anchors := [akLeft,akTop,akRight];\r\n edQPKL_CheckedWord.BorderStyle := bsNone;\r\n edQPKL_CheckedWord.ChildOrder := 15;\r\n edQPKL_CheckedWord.ElementClassName := 'box_bottomborder_font_normal';\r\n edQPKL_CheckedWord.ElementFont := efCSS;\r\n edQPKL_CheckedWord.HeightPercent := 100.000000000000000000;\r\n edQPKL_CheckedWord.Text := 'Yes';\r\n edQPKL_CheckedWord.WidthPercent := 100.000000000000000000;\r\n chQPKL_CheckedOnly.SetParentComponent(WebPanel25);\r\n chQPKL_CheckedOnly.Name := 'chQPKL_CheckedOnly';\r\n chQPKL_CheckedOnly.Left := 98;\r\n chQPKL_CheckedOnly.Top := 54;\r\n chQPKL_CheckedOnly.Width := 20;\r\n chQPKL_CheckedOnly.Height := 22;\r\n chQPKL_CheckedOnly.ChildOrder := 6;\r\n chQPKL_CheckedOnly.HeightPercent := 100.000000000000000000;\r\n chQPKL_CheckedOnly.WidthPercent := 100.000000000000000000;\r\n chQPKL_UserInitials.SetParentComponent(WebPanel25);\r\n chQPKL_UserInitials.Name := 'chQPKL_UserInitials';\r\n chQPKL_UserInitials.Left := 98;\r\n chQPKL_UserInitials.Top := 90;\r\n chQPKL_UserInitials.Width := 20;\r\n chQPKL_UserInitials.Height := 22;\r\n chQPKL_UserInitials.ChildOrder := 7;\r\n chQPKL_UserInitials.HeightPercent := 100.000000000000000000;\r\n chQPKL_UserInitials.WidthPercent := 100.000000000000000000;\r\n chQPKL_Timestamp.SetParentComponent(WebPanel25);\r\n chQPKL_Timestamp.Name := 'chQPKL_Timestamp';\r\n chQPKL_Timestamp.Left := 98;\r\n chQPKL_Timestamp.Top := 108;\r\n chQPKL_Timestamp.Width := 20;\r\n chQPKL_Timestamp.Height := 22;\r\n chQPKL_Timestamp.ChildOrder := 8;\r\n chQPKL_Timestamp.HeightPercent := 100.000000000000000000;\r\n chQPKL_Timestamp.WidthPercent := 100.000000000000000000;\r\n edQPKL_UncheckedWord.SetParentComponent(WebPanel25);\r\n edQPKL_UncheckedWord.Name := 'edQPKL_UncheckedWord';\r\n edQPKL_UncheckedWord.Left := 121;\r\n edQPKL_UncheckedWord.Top := 25;\r\n edQPKL_UncheckedWord.Width := 672;\r\n edQPKL_UncheckedWord.Height := 22;\r\n edQPKL_UncheckedWord.Anchors := [akLeft,akTop,akRight];\r\n edQPKL_UncheckedWord.BorderStyle := bsNone;\r\n edQPKL_UncheckedWord.ChildOrder := 15;\r\n edQPKL_UncheckedWord.ElementClassName := 'box_bottomborder_font_normal';\r\n edQPKL_UncheckedWord.ElementFont := efCSS;\r\n edQPKL_UncheckedWord.HeightPercent := 100.000000000000000000;\r\n edQPKL_UncheckedWord.Text := 'No';\r\n edQPKL_UncheckedWord.WidthPercent := 100.000000000000000000;\r\n chQPKL_SingleSelect.SetParentComponent(WebPanel25);\r\n chQPKL_SingleSelect.Name := 'chQPKL_SingleSelect';\r\n chQPKL_SingleSelect.Left := 98;\r\n chQPKL_SingleSelect.Top := 126;\r\n chQPKL_SingleSelect.Width := 20;\r\n chQPKL_SingleSelect.Height := 22;\r\n chQPKL_SingleSelect.ChildOrder := 8;\r\n chQPKL_SingleSelect.HeightPercent := 100.000000000000000000;\r\n chQPKL_SingleSelect.WidthPercent := 100.000000000000000000;\r\n chQPKL_ClearPrevData.SetParentComponent(WebPanel25);\r\n chQPKL_ClearPrevData.Name := 'chQPKL_ClearPrevData';\r\n chQPKL_ClearPrevData.Left := 98;\r\n chQPKL_ClearPrevData.Top := 145;\r\n chQPKL_ClearPrevData.Width := 20;\r\n chQPKL_ClearPrevData.Height := 22;\r\n chQPKL_ClearPrevData.ChildOrder := 8;\r\n chQPKL_ClearPrevData.HeightPercent := 100.000000000000000000;\r\n chQPKL_ClearPrevData.WidthPercent := 100.000000000000000000;\r\n chQPKL_CompactResult.SetParentComponent(WebPanel25);\r\n chQPKL_CompactResult.Name := 'chQPKL_CompactResult';\r\n chQPKL_CompactResult.Left := 98;\r\n chQPKL_CompactResult.Top := 72;\r\n chQPKL_CompactResult.Width := 20;\r\n chQPKL_CompactResult.Height := 22;\r\n chQPKL_CompactResult.ChildOrder := 6;\r\n chQPKL_CompactResult.HeightPercent := 100.000000000000000000;\r\n chQPKL_CompactResult.WidthPercent := 100.000000000000000000;\r\n cbQPKL_DataSource.SetParentComponent(WebPanel25);\r\n cbQPKL_DataSource.Name := 'cbQPKL_DataSource';\r\n cbQPKL_DataSource.Left := 121;\r\n cbQPKL_DataSource.Top := 57;\r\n cbQPKL_DataSource.Width := 672;\r\n cbQPKL_DataSource.Height := 21;\r\n cbQPKL_DataSource.Anchors := [akLeft,akTop,akRight];\r\n cbQPKL_DataSource.ElementClassName := 'box_bottomborder_font_normal';\r\n cbQPKL_DataSource.ElementFont := efCSS;\r\n cbQPKL_DataSource.HeightPercent := 100.000000000000000000;\r\n cbQPKL_DataSource.Text := 'Pick List';\r\n cbQPKL_DataSource.WidthPercent := 100.000000000000000000;\r\n cbQPKL_DataSource.ItemIndex := -1;\r\n cbQPKL_DataSource.Items.BeginUpdate;\r\n try\r\n cbQPKL_DataSource.Items.Clear;\r\n cbQPKL_DataSource.Items.Add('Pick List');\r\n cbQPKL_DataSource.Items.Add('Providers');\r\n cbQPKL_DataSource.Items.Add('Nurses');\r\n cbQPKL_DataSource.Items.Add('Technitians');\r\n cbQPKL_DataSource.Items.Add('Custom Select');\r\n finally\r\n cbQPKL_DataSource.Items.EndUpdate;\r\n end;\r\n edtQPKL_Section.SetParentComponent(WebPanel25);\r\n edtQPKL_Section.Name := 'edtQPKL_Section';\r\n edtQPKL_Section.Left := 121;\r\n edtQPKL_Section.Top := 98;\r\n edtQPKL_Section.Width := 672;\r\n edtQPKL_Section.Height := 22;\r\n edtQPKL_Section.Anchors := [akLeft,akTop,akRight];\r\n edtQPKL_Section.ChildOrder := 15;\r\n edtQPKL_Section.ElementClassName := 'box_bottomborder_font_normal';\r\n edtQPKL_Section.ElementFont := efCSS;\r\n edtQPKL_Section.HeightPercent := 100.000000000000000000;\r\n edtQPKL_Section.WidthPercent := 100.000000000000000000;\r\n cbPickListType.SetParentComponent(WebPanel25);\r\n cbPickListType.Name := 'cbPickListType';\r\n cbPickListType.Left := 3;\r\n cbPickListType.Top := 174;\r\n cbPickListType.Width := 104;\r\n cbPickListType.Height := 21;\r\n cbPickListType.Color := 15461355;\r\n cbPickListType.ElementClassName := 'box_bottomborder_font_normal';\r\n cbPickListType.ElementFont := efCSS;\r\n cbPickListType.HeightPercent := 100.000000000000000000;\r\n cbPickListType.ShowFocus := False;\r\n cbPickListType.ShowHint := True;\r\n cbPickListType.WidthPercent := 20.000000000000000000;\r\n SetEvent(cbPickListType, Self, 'OnChange', 'cbPickListTypeChange');\r\n cbPickListType.ItemIndex := -1;\r\n cbPickListType.Items.BeginUpdate;\r\n try\r\n cbPickListType.Items.Clear;\r\n cbPickListType.Items.Add('Pick List');\r\n cbPickListType.Items.Add('Multi Level');\r\n cbPickListType.Items.Add('Form');\r\n cbPickListType.Items.Add('List>Memo');\r\n cbPickListType.Items.Add('List>Grid');\r\n cbPickListType.Items.Add('Custom');\r\n cbPickListType.Items.Add('None');\r\n finally\r\n cbPickListType.Items.EndUpdate;\r\n end;\r\n edtPicklistCustomForm.SetParentComponent(WebPanel25);\r\n edtPicklistCustomForm.Name := 'edtPicklistCustomForm';\r\n edtPicklistCustomForm.Left := 116;\r\n edtPicklistCustomForm.Top := 174;\r\n edtPicklistCustomForm.Width := 516;\r\n edtPicklistCustomForm.Height := 22;\r\n edtPicklistCustomForm.ChildOrder := 21;\r\n edtPicklistCustomForm.ElementClassName := 'box_bottomborder_font_normal';\r\n edtPicklistCustomForm.ElementFont := efCSS;\r\n edtPicklistCustomForm.HeightPercent := 100.000000000000000000;\r\n edtPicklistCustomForm.ShowFocus := False;\r\n edtPicklistCustomForm.ShowHint := True;\r\n edtPicklistCustomForm.WidthPercent := 20.000000000000000000;\r\n cbBlockDataType.SetParentComponent(WebPanel25);\r\n cbBlockDataType.Name := 'cbBlockDataType';\r\n cbBlockDataType.Left := 3;\r\n cbBlockDataType.Top := 214;\r\n cbBlockDataType.Width := 104;\r\n cbBlockDataType.Height := 21;\r\n cbBlockDataType.Color := 15461355;\r\n cbBlockDataType.ElementClassName := 'box_bottomborder_font_normal';\r\n cbBlockDataType.ElementFont := efCSS;\r\n cbBlockDataType.HeightPercent := 100.000000000000000000;\r\n cbBlockDataType.ShowFocus := False;\r\n cbBlockDataType.ShowHint := True;\r\n cbBlockDataType.WidthStyle := ssAuto;\r\n cbBlockDataType.WidthPercent := 20.000000000000000000;\r\n SetEvent(cbBlockDataType, Self, 'OnChange', 'cbPickListTypeChange');\r\n cbBlockDataType.ItemIndex := -1;\r\n cbBlockDataType.Items.BeginUpdate;\r\n try\r\n cbBlockDataType.Items.Clear;\r\n cbBlockDataType.Items.Add('Date Picker');\r\n cbBlockDataType.Items.Add('Time Picker');\r\n cbBlockDataType.Items.Add('Radio Buttons');\r\n cbBlockDataType.Items.Add('Spin Edit');\r\n cbBlockDataType.Items.Add('Text');\r\n finally\r\n cbBlockDataType.Items.EndUpdate;\r\n end;\r\n seColumns.SetParentComponent(WebPanel25);\r\n seColumns.Name := 'seColumns';\r\n seColumns.Left := 116;\r\n seColumns.Top := 213;\r\n seColumns.Width := 68;\r\n seColumns.Height := 22;\r\n seColumns.ElementClassName := 'box_bottomborder_font_xxbig';\r\n seColumns.AutoSize := False;\r\n seColumns.BorderStyle := bsNone;\r\n seColumns.ChildOrder := 8;\r\n seColumns.Color := clWhite;\r\n seColumns.ElementFont := efCSS;\r\n seColumns.Increment := 1;\r\n seColumns.MaxValue := 100;\r\n seColumns.MinValue := 1;\r\n seColumns.Role := '';\r\n seColumns.ShowFocus := False;\r\n seColumns.ShowHint := True;\r\n seColumns.Value := 1;\r\n pnlPKLSetupCaption.SetParentComponent(pnlQuickPicklistSettings);\r\n pnlPKLSetupCaption.Name := 'pnlPKLSetupCaption';\r\n pnlPKLSetupCaption.Left := 0;\r\n pnlPKLSetupCaption.Top := 0;\r\n pnlPKLSetupCaption.Width := 800;\r\n pnlPKLSetupCaption.Height := 25;\r\n pnlPKLSetupCaption.ElementClassName := 'form_caption';\r\n pnlPKLSetupCaption.Align := alTop;\r\n pnlPKLSetupCaption.BorderStyle := bsNone;\r\n pnlPKLSetupCaption.Caption := 'Caption';\r\n pnlPKLSetupCaption.ChildOrder := 3;\r\n pnlPKLSetupCaption.Color := clWhite;\r\n pnlPKLSetupCaption.TabOrder := 2;\r\n WebPanel26.SetParentComponent(pnlQuickPicklistSettings);\r\n WebPanel26.Name := 'WebPanel26';\r\n WebPanel26.Left := 0;\r\n WebPanel26.Top := 282;\r\n WebPanel26.Width := 800;\r\n WebPanel26.Height := 15;\r\n WebPanel26.Align := alTop;\r\n WebPanel26.Alignment := taLeftJustify;\r\n WebPanel26.BorderStyle := bsNone;\r\n WebPanel26.Caption := 'Custom Select';\r\n WebPanel26.ChildOrder := 4;\r\n WebPanel26.Color := clWhite;\r\n WebPanel26.TabOrder := 3;\r\n pnlFormButtons.SetParentComponent(pnlQuickPicklistSettings);\r\n pnlFormButtons.Name := 'pnlFormButtons';\r\n pnlFormButtons.Left := 0;\r\n pnlFormButtons.Top := 659;\r\n pnlFormButtons.Width := 800;\r\n pnlFormButtons.Height := 41;\r\n pnlFormButtons.Align := alBottom;\r\n pnlFormButtons.BorderStyle := bsNone;\r\n pnlFormButtons.ChildOrder := 5;\r\n pnlFormButtons.Color := clWhite;\r\n pnlFormButtons.TabOrder := 4;\r\n btnClose.SetParentComponent(pnlFormButtons);\r\n btnClose.Name := 'btnClose';\r\n btnClose.Left := 620;\r\n btnClose.Top := 0;\r\n btnClose.Width := 90;\r\n btnClose.Height := 41;\r\n btnClose.Cursor := crHandPoint;\r\n btnClose.Hint := 'Cancel';\r\n btnClose.Align := alRight;\r\n btnClose.Caption := '';\r\n btnClose.Color := clNone;\r\n btnClose.ElementClassName := 'btn_icon';\r\n btnClose.Font.Charset := DEFAULT_CHARSET;\r\n btnClose.Font.Color := clGray;\r\n btnClose.Font.Height := -16;\r\n btnClose.Font.Name := 'Tahoma';\r\n btnClose.Font.Style := [];\r\n btnClose.HeightPercent := 100.000000000000000000;\r\n btnClose.MaterialGlyph := 'exit_to_app';\r\n btnClose.MaterialGlyphSize := 1;\r\n btnClose.ParentFont := False;\r\n btnClose.ShowHint := True;\r\n btnClose.TabOrder := 10;\r\n btnClose.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnClose, Self, 'OnClick', 'btnCloseClick');\r\n btnSave.SetParentComponent(pnlFormButtons);\r\n btnSave.Name := 'btnSave';\r\n btnSave.Left := 710;\r\n btnSave.Top := 0;\r\n btnSave.Width := 90;\r\n btnSave.Height := 41;\r\n btnSave.Cursor := crHandPoint;\r\n btnSave.Hint := 'Ok';\r\n btnSave.Align := alRight;\r\n btnSave.Caption := '';\r\n btnSave.Color := clNone;\r\n btnSave.ElementClassName := 'btn_icon';\r\n btnSave.Font.Charset := DEFAULT_CHARSET;\r\n btnSave.Font.Color := clGray;\r\n btnSave.Font.Height := -16;\r\n btnSave.Font.Name := 'Tahoma';\r\n btnSave.Font.Style := [];\r\n btnSave.HeightPercent := 100.000000000000000000;\r\n btnSave.MaterialGlyph := 'save';\r\n btnSave.MaterialGlyphSize := 1;\r\n btnSave.ParentFont := False;\r\n btnSave.ShowHint := True;\r\n btnSave.TabOrder := 11;\r\n btnSave.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnSave, Self, 'OnClick', 'btnSaveClick');\r\n btnCopy.SetParentComponent(pnlFormButtons);\r\n btnCopy.Name := 'btnCopy';\r\n btnCopy.Left := 440;\r\n btnCopy.Top := 0;\r\n btnCopy.Width := 90;\r\n btnCopy.Height := 41;\r\n btnCopy.Cursor := crHandPoint;\r\n btnCopy.Hint := 'Copy Settings';\r\n btnCopy.Align := alRight;\r\n btnCopy.Caption := '';\r\n btnCopy.Color := clNone;\r\n btnCopy.ElementClassName := 'btn_icon';\r\n btnCopy.Font.Charset := DEFAULT_CHARSET;\r\n btnCopy.Font.Color := clGray;\r\n btnCopy.Font.Height := -16;\r\n btnCopy.Font.Name := 'Tahoma';\r\n btnCopy.Font.Style := [];\r\n btnCopy.HeightPercent := 100.000000000000000000;\r\n btnCopy.MaterialGlyph := 'content_copy';\r\n btnCopy.MaterialGlyphSize := 1;\r\n btnCopy.ParentFont := False;\r\n btnCopy.ShowHint := True;\r\n btnCopy.TabOrder := 10;\r\n btnCopy.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnCopy, Self, 'OnClick', 'btnCopyClick');\r\n btnPaste.SetParentComponent(pnlFormButtons);\r\n btnPaste.Name := 'btnPaste';\r\n btnPaste.Left := 530;\r\n btnPaste.Top := 0;\r\n btnPaste.Width := 90;\r\n btnPaste.Height := 41;\r\n btnPaste.Cursor := crHandPoint;\r\n btnPaste.Hint := 'Paste Settings';\r\n btnPaste.Align := alRight;\r\n btnPaste.Caption := '';\r\n btnPaste.Color := clNone;\r\n btnPaste.ElementClassName := 'btn_icon';\r\n btnPaste.Font.Charset := DEFAULT_CHARSET;\r\n btnPaste.Font.Color := clGray;\r\n btnPaste.Font.Height := -16;\r\n btnPaste.Font.Name := 'Tahoma';\r\n btnPaste.Font.Style := [];\r\n btnPaste.HeightPercent := 100.000000000000000000;\r\n btnPaste.MaterialGlyph := 'content_paste';\r\n btnPaste.MaterialGlyphSize := 1;\r\n btnPaste.ParentFont := False;\r\n btnPaste.ShowHint := True;\r\n btnPaste.TabOrder := 10;\r\n btnPaste.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnPaste, Self, 'OnClick', 'btnPasteClick');\r\n memCopy.SetParentComponent(pnlQuickPicklistSettings);\r\n memCopy.Name := 'memCopy';\r\n memCopy.Left := 121;\r\n memCopy.Top := 368;\r\n memCopy.Width := 387;\r\n memCopy.Height := 161;\r\n memCopy.HeightPercent := 100.000000000000000000;\r\n memCopy.Lines.BeginUpdate;\r\n try\r\n memCopy.Lines.Clear;\r\n memCopy.Lines.Add('memCopy');\r\n finally\r\n memCopy.Lines.EndUpdate;\r\n end;\r\n memCopy.SelLength := 0;\r\n memCopy.SelStart := 0;\r\n memCopy.Visible := False;\r\n memCopy.WidthPercent := 100.000000000000000000;\r\n ClipBoard.SetParentComponent(Self);\r\n ClipBoard.Name := 'ClipBoard';\r\n ClipBoard.Left := 467;\r\n ClipBoard.Top := 80;\r\n finally\r\n pnlQuickPicklistSettings.AfterLoadDFMValues;\r\n WebLabel6.AfterLoadDFMValues;\r\n memQPKL_Select.AfterLoadDFMValues;\r\n WebPanel25.AfterLoadDFMValues;\r\n chQPKL_Settings_CheckedOnly.AfterLoadDFMValues;\r\n WebLabel306.AfterLoadDFMValues;\r\n WebLabel309.AfterLoadDFMValues;\r\n WebLabel310.AfterLoadDFMValues;\r\n WebLabel311.AfterLoadDFMValues;\r\n WebLabel312.AfterLoadDFMValues;\r\n WebLabel314.AfterLoadDFMValues;\r\n WebLabel315.AfterLoadDFMValues;\r\n lbQPKLSectionName.AfterLoadDFMValues;\r\n WebLabel3.AfterLoadDFMValues;\r\n WebLabel4.AfterLoadDFMValues;\r\n WebLabel1.AfterLoadDFMValues;\r\n WebLabel2.AfterLoadDFMValues;\r\n WebLabel5.AfterLoadDFMValues;\r\n edQPKL_CheckedWord.AfterLoadDFMValues;\r\n chQPKL_CheckedOnly.AfterLoadDFMValues;\r\n chQPKL_UserInitials.AfterLoadDFMValues;\r\n chQPKL_Timestamp.AfterLoadDFMValues;\r\n edQPKL_UncheckedWord.AfterLoadDFMValues;\r\n chQPKL_SingleSelect.AfterLoadDFMValues;\r\n chQPKL_ClearPrevData.AfterLoadDFMValues;\r\n chQPKL_CompactResult.AfterLoadDFMValues;\r\n cbQPKL_DataSource.AfterLoadDFMValues;\r\n edtQPKL_Section.AfterLoadDFMValues;\r\n cbPickListType.AfterLoadDFMValues;\r\n edtPicklistCustomForm.AfterLoadDFMValues;\r\n cbBlockDataType.AfterLoadDFMValues;\r\n seColumns.AfterLoadDFMValues;\r\n pnlPKLSetupCaption.AfterLoadDFMValues;\r\n WebPanel26.AfterLoadDFMValues;\r\n pnlFormButtons.AfterLoadDFMValues;\r\n btnClose.AfterLoadDFMValues;\r\n btnSave.AfterLoadDFMValues;\r\n btnCopy.AfterLoadDFMValues;\r\n btnPaste.AfterLoadDFMValues;\r\n memCopy.AfterLoadDFMValues;\r\n ClipBoard.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","{********************************************************************}\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\n\r\nunit WEBLib.Actions;\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, Web, JS, WEBLib.Controls;\r\n\r\ntype\r\n THTMLEvent = (heClick,heDblClick,heKeypress,heKeydown,heKeyup,heMouseDown,heMouseMove,heMouseUp,heMouseEnter,heMouseLeave,heBlur,heFocus,heChange,heSelect,heInput,heInvalid,heCustom,heNone,heTouchStart,heTouchEnd,heTouchCancel,heTouchMove,heWheel);\r\n\r\n THTMLAction = (actNone, actSetHidden, actRemoveHidden, actToggleHidden, actSetReadOnly, actRemoveReadOnly, actToggleReadOnly, actSetDisabled, actRemoveDisabled, actToggleDisabled, actClear, actAddClass, actRemoveClass, actAddRemoveClass);\r\n\r\n TJSEventParameter = record\r\n JSEvent: TJSEvent;\r\n end;\r\n\r\n THTMLEventEvent = procedure(Sender: TObject; Element: TJSHTMLElementRecord; Event: TJSEventParameter) of object;\r\n\r\n THTMLUpdateEvent = procedure(Sender: TObject; Element: TJSHTMLElementRecord; Event: TJSEventParameter; TargetElement: TJSHTMLElementRecord) of object;\r\n\r\n TCustomHTMLEvent = type string;\r\n\r\n TElementArray = array of TJSElement;\r\n\r\n TElementAction = class(TCollectionItem)\r\n private\r\n FElementEvent: THTMLEvent;\r\n FElementID: TElementID;\r\n FOnExecute: THTMLEventEvent;\r\n FTag: integer;\r\n FStopPropagation: boolean;\r\n FPreventDefault: boolean;\r\n FElementHandle: TJSElement;\r\n FElementHandles: TElementArray;\r\n FControlHandle: TJSElement;\r\n FHandlePtr: pointer;\r\n FCustomEvent: TCustomHTMLEvent;\r\n FEnabled: boolean;\r\n FSelector: string;\r\n FControl: TControl;\r\n FOnUpdate: THTMLUpdateEvent;\r\n FTargetControl: TControl;\r\n FTargetID: TElementID;\r\n FTargetAction: THTMLAction;\r\n FTargetSelector: string;\r\n FName: string;\r\n FTargetClassAdd: string;\r\n FTargetClassRemove: string;\r\n procedure SetElementID(const Value: TElementID);\r\n procedure SetSelector(const Value: string);\r\n procedure SetName(const Value: string);\r\n procedure SetElementEvent(const Value: THTMLEvent);\r\n protected\r\n function GetDisplayName: string; override;\r\n function DoHandleEvent(Event: TJSEvent): Boolean;\r\n procedure DoAction(AEvent: TJSEvent; SrcElement, AElement: TJSElement); virtual;\r\n procedure BindEvent(AEvent: THTMLEvent; AElement: TJSElement); virtual;\r\n procedure UnBindEvent(AEvent: THTMLEvent; AElement: TJSElement); virtual;\r\n public\r\n constructor Create(Collection: TCollection); override;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n procedure Bind;\r\n procedure UnBind;\r\n property ElementHandle: TJSElement read FElementHandle;\r\n property ElementHandles: TElementArray read FElementHandles;\r\n published\r\n property Control: TControl read FControl write FControl;\r\n property CustomEvent: TCustomHTMLEvent read FCustomEvent write FCustomEvent;\r\n property Enabled: boolean read FEnabled write FEnabled default true;\r\n property Event: THTMLEvent read FElementEvent write SetElementEvent default heClick;\r\n property ID: TElementID read FElementID write SetElementID;\r\n property Name: string read FName write SetName;\r\n property PreventDefault: boolean read FPreventDefault write FPreventDefault default true;\r\n property Selector: string read FSelector write SetSelector;\r\n property StopPropagation: boolean read FStopPropagation write FStopPropagation default true;\r\n property Tag: integer read FTag write FTag default 0;\r\n property TargetAction: THTMLAction read FTargetAction write FTargetAction default actNone;\r\n property TargetControl: TControl read FTargetControl write FTargetControl;\r\n property TargetID: TElementID read FTargetID write FTargetID;\r\n property TargetSelector: string read FTargetSelector write FTargetSelector;\r\n property TargetClassAdd: string read FTargetClassAdd write FTargetClassAdd;\r\n property TargetClassRemove: string read FTargetClassRemove write FTargetClassRemove;\r\n property OnExecute: THTMLEventEvent read FOnExecute write FOnExecute;\r\n property OnUpdate: THTMLUpdateEvent read FOnUpdate write FOnUpdate;\r\n end;\r\n\r\n TElementActions = class(TOwnedCollection)\r\n private\r\n function GetItems(AIndex: integer): TElementAction;\r\n procedure SetItems(AIndex: integer; const Value: TElementAction);\r\n function GetAction(AName: string): TElementAction;\r\n protected\r\n public\r\n constructor Create(AOwner: TComponent); reintroduce;\r\n function Add: TElementAction; reintroduce;\r\n function Insert(AIndex: integer): TElementAction; reintroduce;\r\n property Items[AIndex: integer]: TElementAction read GetItems write SetItems; default;\r\n property Action[AName: string]: TElementAction Read GetAction;\r\n function GetActionByName(AName: string): TElementAction;\r\n function GetByName(AName: string): TElementAction;\r\n function FindByName(AName: string): TElementAction;\r\n end;\r\n\r\n\r\n THTMLActionEventEvent = procedure(Sender: TObject; AAction: TElementAction; Element: TJSHTMLElementRecord; Event: TJSEventParameter) of object;\r\n\r\n THTMLActionUpdateEvent = procedure(Sender: TObject; AAction: TElementAction; Element: TJSHTMLElementRecord; Event: TJSEventParameter; TargetElement: TJSHTMLElementRecord) of object;\r\n\r\n\r\n TElementActionList = class(TComponent)\r\n private\r\n FActions: TElementActions;\r\n FOnUpdate: THTMLActionUpdateEvent;\r\n FOnExecute: THTMLActionEventEvent;\r\n procedure SetActions(const Value: TElementActions);\r\n function GetAction(AName: string): TElementAction;\r\n protected\r\n procedure BeforeLoadDFMValues; override;\r\n function CreateActions: TElementActions; virtual;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure BindActions;\r\n procedure UnBindActions;\r\n procedure Loaded; override;\r\n property Action[AName: string]: TElementAction Read GetAction; default;\r\n function GetActionByName(AName: string): TElementAction;\r\n function GetByName(AName: string): TElementAction;\r\n function FindByName(AName: string): TElementAction;\r\n published\r\n property Actions: TElementActions read FActions write SetActions;\r\n property OnExecute: THTMLActionEventEvent read FOnExecute write FOnExecute;\r\n property OnUpdate: THTMLActionUpdateEvent read FOnUpdate write FOnUpdate;\r\n end;\r\n\r\n TWebElementActionList = class(TElementActionList);\r\n\r\n\r\nimplementation\r\n\r\nuses\r\n SysUtils;\r\n\r\n{ TElementAction }\r\n\r\nfunction TElementActions.Add: TElementAction;\r\nbegin\r\n Result := TElementAction(inherited Add);\r\nend;\r\n\r\nconstructor TElementActions.Create(AOwner: TComponent);\r\nbegin\r\n inherited Create(AOwner, TElementAction);\r\nend;\r\n\r\nfunction TElementActions.FindByName(AName: string): TElementAction;\r\nbegin\r\n Result := GetActionByName(AName);\r\nend;\r\n\r\nfunction TElementActions.GetAction(AName: string): TElementAction;\r\nbegin\r\n Result := GetActionByName(AName);\r\nend;\r\n\r\nfunction TElementActions.GetActionByName(AName: string): TElementAction;\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 TElementActions.GetByName(AName: string): TElementAction;\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 TElementActions.GetItems(AIndex: integer): TElementAction;\r\nbegin\r\n Result := TElementAction(inherited Items[AIndex]);\r\nend;\r\n\r\nfunction TElementActions.Insert(AIndex: integer): TElementAction;\r\nbegin\r\n Result := TElementAction(inherited Insert(AIndex));\r\nend;\r\n\r\nprocedure TElementActions.SetItems(AIndex: integer;\r\n const Value: TElementAction);\r\nbegin\r\n inherited Items[AIndex] := Value;\r\nend;\r\n\r\n{ TElementAction }\r\n\r\nprocedure TElementAction.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TElementAction) then\r\n begin\r\n FEnabled := (Source as TElementAction).Enabled;\r\n FElementEvent := (Source as TElementAction).Event;\r\n FElementID := (Source as TElementAction).ID;\r\n FTag := (Source as TElementAction).Tag;\r\n FStopPropagation := (Source as TElementAction).StopPropagation;\r\n FPreventDefault := (Source as TElementAction).PreventDefault;\r\n FCustomEvent := (Source as TElementAction).CustomEvent;\r\n FSelector := (Source as TElementAction).Selector;\r\n FControl := (Source as TElementAction).Control;\r\n FTargetAction := (Source as TElementAction).TargetAction;\r\n FTargetControl := (Source as TElementAction).TargetControl;\r\n FTargetID := (Source as TElementAction).TargetID;\r\n FTargetSelector := (Source as TElementAction).TargetSelector;\r\n FTargetClassAdd := (Source as TElementAction).TargetClassAdd;\r\n FTargetClassRemove := (Source as TElementAction).TargetClassRemove;\r\n end;\r\nend;\r\n\r\nprocedure TElementAction.Bind;\r\nvar\r\n els: TJSNodeList;\r\n i: integer;\r\n el: TJSHTMLElement;\r\nbegin\r\n // unbind any previous event\r\n UnBind;\r\n\r\n if Assigned(Control) then\r\n begin\r\n FControlHandle := Control.ElementHandle;\r\n if Assigned(FControlHandle) then\r\n BindEvent(Event, FControlHandle);\r\n end;\r\n\r\n if (ID <> '') then\r\n begin\r\n if Assigned(FElementHandle) then\r\n UnBindEvent(Event, FElementHandle);\r\n\r\n // Event list https://www.w3schools.com/jsref/dom_obj_event.asp\r\n FElementHandle := document.getElementByID(ID);\r\n if Assigned(FElementHandle) then\r\n BindEvent(Event, FElementHandle);\r\n end;\r\n\r\n if (FSelector <> '') then\r\n begin\r\n els := document.querySelectorAll(Selector);\r\n\r\n SetLength(FElementHandles, els.length);\r\n\r\n for i := 0 to els.length - 1 do\r\n begin\r\n el := TJSHTMLElement(els.item(i));\r\n FElementHandles[i] := el;\r\n BindEvent(Event, el);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TElementAction.BindEvent(AEvent: THTMLEvent;\r\n AElement: TJSElement);\r\nbegin\r\n case AEvent of\r\n heClick:\r\n AElement.addEventListener('click', FHandlePtr);\r\n heDblClick:\r\n AElement.addEventListener('dblclick', FHandlePtr);\r\n heMouseDown:\r\n AElement.addEventListener('mousedown', FHandlePtr);\r\n heMouseUp:\r\n AElement.addEventListener('mouseup', FHandlePtr);\r\n heMouseMove:\r\n AElement.addEventListener('mousemove', FHandlePtr);\r\n heMouseLeave:\r\n AElement.addEventListener('mouseleave', FHandlePtr);\r\n heMouseEnter:\r\n AElement.addEventListener('mouseenter', FHandlePtr);\r\n heKeyPress:\r\n AElement.addEventListener('keypress', FHandlePtr);\r\n heKeyDown:\r\n AElement.addEventListener('keydown', FHandlePtr);\r\n heKeyUp:\r\n AElement.addEventListener('keyup', FHandlePtr);\r\n heFocus:\r\n AElement.addEventListener('focus', FHandlePtr);\r\n heBlur:\r\n AElement.addEventListener('blur', FHandlePtr);\r\n heChange:\r\n AElement.addEventListener('change', FHandlePtr);\r\n heSelect:\r\n AElement.addEventListener('select', FHandlePtr);\r\n heInvalid:\r\n AElement.addEventListener('invalid', FHandlePtr);\r\n heInput:\r\n AElement.addEventListener('input', FHandlePtr);\r\n heTouchStart:\r\n AElement.addEventListener('touchstart', FHandlePtr);\r\n heTouchEnd:\r\n AElement.addEventListener('touchend', FHandlePtr);\r\n heTouchMove:\r\n AElement.addEventListener('touchmove', FHandlePtr);\r\n heTouchCancel:\r\n AElement.addEventListener('touchcancel', FHandlePtr);\r\n heWheel:\r\n AElement.addEventListener('wheel', FHandlePtr);\r\n heCustom:\r\n if CustomEvent <> '' then\r\n AElement.addEventListener(CustomEvent, FHandlePtr);\r\n end;\r\nend;\r\n\r\nconstructor TElementAction.Create(Collection: TCollection);\r\nbegin\r\n inherited;\r\n FHandlePtr := @DoHandleEvent;\r\n FElementHandle := nil;\r\n FControlHandle := nil;\r\n FTag := 0;\r\n FName := 'Action' + IntToStr(Index);\r\n FEnabled := true;\r\n FStopPropagation := true;\r\n FPreventDefault := true;\r\nend;\r\n\r\ndestructor TElementAction.Destroy;\r\nbegin\r\n UnBind;\r\n inherited;\r\nend;\r\n\r\nprocedure TElementAction.DoAction(AEvent: TJSEvent; SrcElement, AElement: TJSElement);\r\nvar\r\n srcR,tgtR: TJSHTMLElementRecord;\r\n evR: TJSEventParameter;\r\nbegin\r\n case TargetAction of\r\n actSetHidden: AElement.setAttribute('hidden','true');\r\n actRemoveHidden: AElement.removeAttribute('hidden');\r\n actToggleHidden:\r\n begin\r\n if AElement.hasAttribute('hidden') then\r\n AElement.removeAttribute('hidden')\r\n else\r\n AElement.setAttribute('hidden','true');\r\n end;\r\n actSetReadOnly: AElement.setAttribute('readonly','true');\r\n actRemoveReadOnly: AElement.removeAttribute('readonly');\r\n actToggleReadOnly:\r\n begin\r\n if AElement.hasAttribute('readonly') then\r\n AElement.removeAttribute('readonly')\r\n else\r\n AElement.setAttribute('readonly','true');\r\n end;\r\n actSetDisabled: AElement.setAttribute('disabled','true');\r\n actRemoveDisabled: AElement.removeAttribute('disabled');\r\n actToggleDisabled:\r\n begin\r\n if AElement.hasAttribute('disabled') then\r\n AElement.removeAttribute('disabled')\r\n else\r\n AElement.setAttribute('disabled','true');\r\n end;\r\n actClear:\r\n begin\r\n asm\r\n AElement.value = '';\r\n end;\r\n end;\r\n actAddClass:\r\n begin\r\n AElement.classList.add(TargetClassAdd);\r\n end;\r\n actRemoveClass:\r\n begin\r\n AElement.classList.remove(TargetClassRemove);\r\n end;\r\n actAddRemoveClass:\r\n begin\r\n AElement.classList.add(TargetClassAdd);\r\n AElement.classList.remove(TargetClassRemove);\r\n end;\r\n end;\r\n\r\n if Assigned(OnUpdate) then\r\n begin\r\n srcR.element := TJSHTMLElement(SrcElement);\r\n tgtR.element := TJSHTMLElement(AElement);\r\n evR.JSEvent := AEvent;\r\n OnUpdate(Self, srcR, evR, tgtR);\r\n\r\n if Assigned( (Collection.Owner as TElementActionList).OnUpdate) then\r\n (Collection.Owner as TElementActionList).OnUpdate(Collection, Self, srcR, evR, tgtR);\r\n end;\r\nend;\r\n\r\nfunction TElementAction.DoHandleEvent(Event: TJSEvent): Boolean;\r\nvar\r\n ep: TJSEventParameter;\r\n el: TJSHTMLElementRecord;\r\n tgt: TJSHTMLElement;\r\n els: TJSNodeList;\r\n i: integer;\r\n\r\nbegin\r\n ep.JSEvent := Event;\r\n el.element := TJSHTMLElement(Event.target);\r\n\r\n if Enabled then\r\n begin\r\n if Assigned( (Collection.Owner as TElementActionList).OnExecute) then\r\n (Collection.Owner as TElementActionList).OnExecute(Collection, Self, el, ep);\r\n\r\n if Assigned(OnExecute) then\r\n OnExecute(Self, el, ep);\r\n end;\r\n\r\n if (TargetAction <> actNone) then\r\n begin\r\n if Assigned(TargetControl) and Assigned(TargetControl.ElementHandle) then\r\n DoAction(ep.JSEvent, el.element, TargetControl.ElementHandle);\r\n\r\n if (TargetID <> '') then\r\n begin\r\n tgt := TJSHTMLElement(document.getElementById(TargetID));\r\n if Assigned(tgt) then\r\n DoAction(ep.JSEvent, el.element, tgt);\r\n end;\r\n\r\n if (TargetSelector <> '') then\r\n begin\r\n els := document.querySelectorAll(TargetSelector);\r\n\r\n if els.length > 0 then\r\n begin\r\n for i := 0 to els.length - 1 do\r\n DoAction(ep.JSEvent, el.element, TJSElement(els.item(i)));\r\n end;\r\n end;\r\n end;\r\n\r\n Result := true;\r\n\r\n if StopPropagation then\r\n Event.stopPropagation;\r\n if PreventDefault then\r\n Event.preventDefault;\r\nend;\r\n\r\nfunction TElementAction.GetDisplayName: string;\r\nvar\r\n s: string;\r\nbegin\r\n s := FName;\r\n\r\n if (s = '') then\r\n begin\r\n case Event of\r\n heClick: s := 'click';\r\n heDblClick: s := 'dblclick';\r\n heKeypress: s := 'keypress';\r\n heKeydown: s := 'keydown';\r\n heKeyup: s := 'keyup';\r\n heMouseDown: s := 'mousedown';\r\n heMouseMove: s := 'mousemove';\r\n heMouseUp: s := 'mousemove';\r\n heMouseEnter: s := 'mouseenter';\r\n heMouseLeave: s := 'mouseleave';\r\n heBlur: s := 'blur';\r\n heFocus: s := 'focus';\r\n heChange: s := 'change';\r\n heSelect: s := 'select';\r\n heInvalid: s := 'invalid';\r\n heInput: s := 'input';\r\n heTouchStart: s := 'touchstart';\r\n heTouchEnd: s := 'touchend';\r\n heTouchCancel: s := 'touchcancel';\r\n heTouchMove: s := 'touchmove';\r\n heWheel: s := 'wheel';\r\n end;\r\n\r\n if ID <> '' then\r\n Result := s +'event_' + ID\r\n else\r\n Result := s +'event_' + IntToStr(Index);\r\n end\r\n else\r\n Result := s;\r\nend;\r\n\r\nprocedure TElementAction.SetElementEvent(const Value: THTMLEvent);\r\nvar\r\n FLoading: boolean;\r\nbegin\r\n FLoading := Assigned(Collection) and Assigned(Collection.Owner) and (csLoading in (Collection.Owner as TElementActionList).ComponentState);\r\n\r\n if (FElementEvent <> Value) then\r\n begin\r\n if not FLoading then\r\n UnBind;\r\n FElementEvent := Value;\r\n if not FLoading then\r\n Bind;\r\n end;\r\nend;\r\n\r\nprocedure TElementAction.SetElementID(const Value: TElementID);\r\nbegin\r\n if (FElementID <> Value) then\r\n begin\r\n FElementID := Value;\r\n if FElementID <> '' then\r\n FSelector := '';\r\n end;\r\nend;\r\n\r\nprocedure TElementAction.SetName(const Value: string);\r\nbegin\r\n FName := Value;\r\nend;\r\n\r\nprocedure TElementAction.SetSelector(const Value: string);\r\nbegin\r\n if (FSelector <> Value) then\r\n begin\r\n FSelector := Value;\r\n if FSelector <> '' then\r\n FElementID := '';\r\n end;\r\nend;\r\n\r\nprocedure TElementAction.UnBind;\r\nvar\r\n i: integer;\r\nbegin\r\n if Assigned(FControlHandle) then\r\n begin\r\n UnBindEvent(Event, FControlHandle);\r\n FControlHandle := nil;\r\n end;\r\n\r\n if (FElementID <> '') and Assigned(FElementHandle) then\r\n begin\r\n UnBindEvent(Event, FElementHandle);\r\n FElementHandle := nil;\r\n end;\r\n\r\n if (FSelector <> '') and (Length(FElementHandles) > 0) then\r\n begin\r\n for i := 0 to Length(FElementHandles) - 1 do\r\n begin\r\n if Assigned(FElementHandles[i]) then\r\n UnBindEvent(Event, FElementHandles[i]);\r\n FElementHandles[i] := nil;\r\n end;\r\n SetLength(FELementHandles, 0);\r\n end;\r\nend;\r\n\r\nprocedure TElementAction.UnBindEvent(AEvent: THTMLEvent; AElement: TJSElement);\r\nbegin\r\n if Assigned(AElement) then\r\n begin\r\n case Event of\r\n heClick:\r\n AElement.removeEventListener('click', FHandlePtr);\r\n heDblClick:\r\n AElement.removeEventListener('dblclick', FHandlePtr);\r\n heMouseDown:\r\n AElement.removeEventListener('mousedown', FHandlePtr);\r\n heMouseUp:\r\n AElement.removeEventListener('mouseup', FHandlePtr);\r\n heMouseMove:\r\n AElement.removeEventListener('mousemove', FHandlePtr);\r\n heMouseLeave:\r\n AElement.removeEventListener('mouseleave', FHandlePtr);\r\n heMouseEnter:\r\n AElement.removeEventListener('mouseenter', FHandlePtr);\r\n heKeyPress:\r\n AElement.removeEventListener('keypress', FHandlePtr);\r\n heKeyDown:\r\n AElement.removeEventListener('keydown', FHandlePtr);\r\n heKeyUp:\r\n AElement.removeEventListener('keyup', FHandlePtr);\r\n heFocus:\r\n AElement.removeEventListener('focus', FHandlePtr);\r\n heBlur:\r\n AElement.removeEventListener('blur', FHandlePtr);\r\n heChange:\r\n AElement.removeEventListener('change', FHandlePtr);\r\n heSelect:\r\n AElement.removeEventListener('select', FHandlePtr);\r\n heInvalid:\r\n AElement.removeEventListener('invalid', FHandlePtr);\r\n heInput:\r\n AElement.removeEventListener('input', FHandlePtr);\r\n heTouchStart:\r\n AElement.removeEventListener('touchstart', FHandlePtr);\r\n heTouchEnd:\r\n AElement.removeEventListener('touchend', FHandlePtr);\r\n heTouchMove:\r\n AElement.removeEventListener('touchmove', FHandlePtr);\r\n heTouchCancel:\r\n AElement.removeEventListener('touchcancel', FHandlePtr);\r\n heWheel:\r\n AElement.removeEventListener('wheel', FHandlePtr);\r\n\r\n heCustom:\r\n if CustomEvent <> '' then\r\n AElement.removeEventListener(CustomEvent, FHandlePtr);\r\n end;\r\n end;\r\nend;\r\n\r\n{ TElementActionList }\r\n\r\nprocedure TElementActionList.BeforeLoadDFMValues;\r\nbegin\r\n inherited;\r\n Loading;\r\nend;\r\n\r\nprocedure TElementActionList.BindActions;\r\nvar\r\n i: integer;\r\nbegin\r\n if not Assigned(Actions) then\r\n Exit;\r\n\r\n //\r\n for i := 0 to Actions.Count - 1 do\r\n begin\r\n Actions[i].Bind;\r\n end;\r\nend;\r\n\r\nconstructor TElementActionList.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FActions := CreateActions;\r\nend;\r\n\r\nfunction TElementActionList.CreateActions: TElementActions;\r\nbegin\r\n Result := TElementActions.Create(Self);\r\nend;\r\n\r\ndestructor TElementActionList.Destroy;\r\nbegin\r\n FActions.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TElementActionList.FindByName(AName: string): TElementAction;\r\nbegin\r\n Result := Actions.GetActionByName(AName);\r\nend;\r\n\r\nfunction TElementActionList.GetAction(AName: string): TElementAction;\r\nbegin\r\n Result := Actions.GetActionByName(AName);\r\nend;\r\n\r\nfunction TElementActionList.GetActionByName(AName: string): TElementAction;\r\nbegin\r\n Result := Actions.GetActionByName(AName);\r\nend;\r\n\r\nfunction TElementActionList.GetByName(AName: string): TElementAction;\r\nbegin\r\n Result := Actions.GetByName(AName);\r\nend;\r\n\r\nprocedure TElementActionList.Loaded;\r\nbegin\r\n inherited;\r\n\r\n BindActions;\r\nend;\r\n\r\nprocedure TElementActionList.SetActions(const Value: TElementActions);\r\nbegin\r\n FActions.Assign(Value);\r\nend;\r\n\r\nprocedure TElementActionList.UnBindActions;\r\nvar\r\n i: integer;\r\nbegin\r\n if not Assigned(Actions) then\r\n Exit;\r\n //\r\n for i := 0 to Actions.Count - 1 do\r\n begin\r\n Actions[i].UnBind;\r\n end;\r\nend;\r\n\r\n\r\nend.\r\n","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 QAI_FileUpload;\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.StdCtrls, WEBLib.StdCtrls,\r\n WEBLib.ComCtrls, Vcl.Controls, WEBLib.ExtCtrls, WEBLib.WebCtrls, WebLib.JSON, XData.Web.Client;\r\n\r\ntype\r\n TfrmQAI_FileUpload = class(TForm)\r\n pnlDBFieldSettings: TPanel;\r\n WebPanel24: TPanel;\r\n pnlDBFieldSetupCaption: TPanel;\r\n pnlFormButtons: TPanel;\r\n btnClose: TBitBtn;\r\n WebFilePicker1: TFilePicker;\r\n btnSubmit: TButton;\r\n btnClear: TBitBtn;\r\n btnDelete: TBitBtn;\r\n cbSubmitDefaults: TCheckBox;\r\n pnlUpload: TPanel;\r\n pnlChooseFile: TPanel;\r\n faQAI_FileUpload: TFileUpload;\r\n WebPanel1: TPanel;\r\n lbFiles: TListBox;\r\n WebLabel2: TLabel;\r\n WebLabel1: TLabel;\r\n WebLabel3: TLabel;\r\n procedure btnCloseClick(Sender: TObject);\r\n procedure WebFormShow(Sender: TObject);\r\n procedure WebFilePicker1Change(Sender: TObject);\r\n procedure WebFilePicker1GetFileAsStream(Sender: TObject;\r\n AFileIndex: Integer; AStream: TStream);\r\n procedure WebFilePicker1GetFileAsBase64(Sender: TObject;\r\n AFileIndex: Integer; ABase64: string);\r\n procedure btnSubmitClick(Sender: TObject);\r\n procedure faQAI_FileUploadDroppedFiles(Sender: TObject;\r\n AFileList: TStringList);\r\n procedure btnClearClick(Sender: TObject);\r\n procedure btnDeleteClick(Sender: TObject);\r\n procedure faQAI_FileUploadGetFileAsBase64(Sender: TObject;\r\n AFileIndex: Integer; ABase64: string);\r\n procedure cbSubmitDefaultsClick(Sender: TObject);\r\n procedure WebFormClose(Sender: TObject; var Action: TCloseAction); //0- save, 1- save as a copy\r\n private\r\n { Private declarations }\r\n public\r\n { Public declarations }\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmQAI_FileUpload: TfrmQAI_FileUpload;\r\n FileContent_p: string;\r\n\r\nimplementation\r\n\r\n{$R *.dfm}\r\n\r\nuses Common, DataModule, UDF_QAI, Main;\r\n\r\nprocedure TfrmQAI_FileUpload.btnCloseClick(Sender: TObject);\r\nbegin\r\n// showmessage( ELV_QAI_FILETOUPLOAD_BASE64);\r\n// showmessage( ELV_QAI_FILETOUPLOAD_LIST);\r\nELV_QAI_FILETOUPLOAD_BASE64 := '';\r\nELV_QAI_FILETOUPLOAD_LIST := 'Empty';\r\nself.Close;\r\nend;\r\n\r\nprocedure TfrmQAI_FileUpload.btnDeleteClick(Sender: TObject);\r\n//var i: integer;\r\nbegin\r\nlbFiles.Items.Delete(lbFiles.ItemIndex);\r\n{for i := 0 to lbFiles.Count - 1\r\ndo if lbFiles.Selected[i]\r\n then lbFiles.Selected[i].}\r\nend;\r\n\r\nprocedure TfrmQAI_FileUpload.cbSubmitDefaultsClick(Sender: TObject);\r\nbegin\r\npnlChooseFile.visible := ( not cbSubmitDefaults.Checked);\r\nlbFiles.Enabled := ( not cbSubmitDefaults.Checked);\r\nlbFiles.Clear;\r\nif cbSubmitDefaults.Checked\r\nthen lbFiles.Items.Add('Default Files');\r\nend;\r\n\r\nprocedure TfrmQAI_FileUpload.btnClearClick(Sender: TObject);\r\nbegin\r\nlbFiles.Clear;\r\nFileContent_p := '';\r\nif self.Tag = 1 // loqding images\r\nthen begin\r\n dm.xdsImages.Close;\r\n dm.xdsImages.Open;\r\n end;\r\nend;\r\n\r\nprocedure TfrmQAI_FileUpload.btnSubmitClick(Sender: TObject);\r\nbegin\r\nif cbSubmitDefaults.checked\r\nthen begin\r\n ELV_QAI_FILETOUPLOAD_BASE64 := '';\r\n ELV_QAI_FILETOUPLOAD_LIST := 'Default Files';\r\n end\r\nelse begin\r\n ELV_QAI_FILETOUPLOAD_BASE64 := FileContent_p;\r\n ELV_QAI_FILETOUPLOAD_LIST := trim(lbFiles.Items.CommaText);\r\n end;\r\n\r\n//showmessage( ELV_QAI_FILETOUPLOAD_BASE64);\r\n//showmessage( ELV_QAI_FILETOUPLOAD_LIST);\r\n\r\nself.Close;\r\nend;\r\n\r\nprocedure TfrmQAI_FileUpload.WebFilePicker1Change(Sender: TObject);\r\nbegin\r\nif WebFilePicker1.Files.Count > 0\r\nthen WebFilePicker1.Files[0].GetFileAsBase64;\r\nend;\r\n\r\nprocedure TfrmQAI_FileUpload.WebFilePicker1GetFileAsBase64(Sender: TObject;\r\n AFileIndex: Integer; ABase64: string);\r\nbegin\r\nFileContent_p := ABase64;\r\nend;\r\n\r\nprocedure TfrmQAI_FileUpload.WebFilePicker1GetFileAsStream(Sender: TObject;\r\n AFileIndex: Integer; AStream: TStream);\r\nvar ms: TmemoryStream;\r\n\r\n{procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p: string;\r\n begin\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n showmessage('Send file response: '+ response_p);\r\n end; }\r\n\r\nbegin\r\n{ showmessage(inttostr(AStream.Size));\r\ndm.XDataWebClient1.RawInvoke('IReportService.QAI_ReceiveFile',[AStream], @OnResult); }\r\nend;\r\n\r\nprocedure TfrmQAI_FileUpload.faQAI_FileUploadDroppedFiles(Sender: TObject;\r\n AFileList: TStringList);\r\nvar i: integer;\r\nbegin\r\nfor i:=0 to AFileList.Count - 1\r\ndo begin\r\n lbFiles.Items.Add(AFileList[i]);\r\n faQAI_FileUpload.Files[i].GetFileAsBase64();\r\n end;\r\n//showmessage(inttostr(AFileList.Count));\r\nend;\r\n\r\nprocedure TfrmQAI_FileUpload.faQAI_FileUploadGetFileAsBase64(Sender: TObject;\r\n AFileIndex: Integer; ABase64: string);\r\nvar ext_p: string;\r\nbegin\r\n//showmessage(abase64);\r\nif pos('.XML', uppercase(lbFiles.Items[AFileIndex])) > 0 then ext_p := '.XML';\r\nif pos('.PDF', uppercase(lbFiles.Items[AFileIndex])) > 0 then ext_p := '.PDF';\r\nif pos('.XLSX', uppercase(lbFiles.Items[AFileIndex])) > 0 then ext_p := '.XLSX';\r\nif pos('.RTF', uppercase(lbFiles.Items[AFileIndex])) > 0 then ext_p := '.RTF';\r\n\r\nif pos('.BMP', uppercase(lbFiles.Items[AFileIndex])) > 0 then ext_p := '.BMP';\r\nif pos('.JPG', uppercase(lbFiles.Items[AFileIndex])) > 0 then ext_p := '.JPEG';\r\nif pos('.JPEG', uppercase(lbFiles.Items[AFileIndex])) > 0 then ext_p := '.JPEG';\r\nif pos('.PNG', uppercase(lbFiles.Items[AFileIndex])) > 0 then ext_p := '.PNG';\r\n//showmessage(ext_p);\r\nFileContent_p := FileContent_p + ABase64 + '~~~' + ext_p + '^^^';\r\n\r\nif (self.Tag = 1) and ((ext_p = '.BMP') or (ext_p = '.JPG') or (ext_p = '.JPEG') or (ext_p = '.PNG')) // image files\r\nthen begin\r\n dm.xdsImages.Insert;\r\n dm.xdsImagesIMAGE.AsString := window.atob(ABase64);\r\n dm.xdsImagesIMAGEBASE64.AsString := 'data:image/' + copy(ext_p,2,10) + ';base64,' + ABase64;\r\n dm.xdsImagesIMAGEBASE64_DATA.AsString := ABase64;\r\n dm.xdsImages.Post;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TfrmQAI_FileUpload.WebFormClose(Sender: TObject;\r\n var Action: TCloseAction);\r\nbegin\r\nif dm.xdsImages.IsEmpty\r\nthen begin\r\n (getcurrentform.FindComponent('imagegrid') as TControl).Visible := false;\r\n (getcurrentform.FindComponent('btnZoomIn') as TControl).Visible := false;\r\n (getcurrentform.FindComponent('btnZoomOut') as TControl).Visible := false;\r\n end;\r\nend;\r\n\r\nprocedure TfrmQAI_FileUpload.WebFormShow(Sender: TObject);\r\nbegin\r\n\r\nResizeButtons(pnlFormButtons);\r\nFileContent_p := '';\r\nif cbSubmitDefaults.Checked\r\nthen cbSubmitDefaultsClick(cbSubmitDefaults);\r\n\r\nend;\r\n\r\n\r\n{\r\n\r\nprocedure TForm2.WebFilePicker1Change(Sender: TObject);\r\n2. begin\r\n3. if WebFilePicker1.Files.Count > 0 then\r\n4. WebFilePicker1.Files[0].GetFileAsText;\r\n5. end;\r\n6.\r\n7. procedure TForm2.WebFilePicker1GetFileAsText(Sender: TObject;\r\n8. AFileIndex: Integer; AText: string);\r\n9. begin\r\n10. WebMemo1.Lines.Text := AText;\r\n11. end;\r\n\r\n}\r\n\r\nprocedure TfrmQAI_FileUpload.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n pnlDBFieldSettings := TPanel.Create(Self);\r\n WebPanel24 := TPanel.Create(Self);\r\n WebFilePicker1 := TFilePicker.Create(Self);\r\n btnSubmit := TButton.Create(Self);\r\n cbSubmitDefaults := TCheckBox.Create(Self);\r\n pnlUpload := TPanel.Create(Self);\r\n pnlChooseFile := TPanel.Create(Self);\r\n WebLabel1 := TLabel.Create(Self);\r\n WebLabel3 := TLabel.Create(Self);\r\n faQAI_FileUpload := TFileUpload.Create(Self);\r\n WebPanel1 := TPanel.Create(Self);\r\n WebLabel2 := TLabel.Create(Self);\r\n lbFiles := TListBox.Create(Self);\r\n pnlDBFieldSetupCaption := TPanel.Create(Self);\r\n pnlFormButtons := TPanel.Create(Self);\r\n btnClose := TBitBtn.Create(Self);\r\n btnClear := TBitBtn.Create(Self);\r\n btnDelete := TBitBtn.Create(Self);\r\n\r\n pnlDBFieldSettings.BeforeLoadDFMValues;\r\n WebPanel24.BeforeLoadDFMValues;\r\n WebFilePicker1.BeforeLoadDFMValues;\r\n btnSubmit.BeforeLoadDFMValues;\r\n cbSubmitDefaults.BeforeLoadDFMValues;\r\n pnlUpload.BeforeLoadDFMValues;\r\n pnlChooseFile.BeforeLoadDFMValues;\r\n WebLabel1.BeforeLoadDFMValues;\r\n WebLabel3.BeforeLoadDFMValues;\r\n faQAI_FileUpload.BeforeLoadDFMValues;\r\n WebPanel1.BeforeLoadDFMValues;\r\n WebLabel2.BeforeLoadDFMValues;\r\n lbFiles.BeforeLoadDFMValues;\r\n pnlDBFieldSetupCaption.BeforeLoadDFMValues;\r\n pnlFormButtons.BeforeLoadDFMValues;\r\n btnClose.BeforeLoadDFMValues;\r\n btnClear.BeforeLoadDFMValues;\r\n btnDelete.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmQAI_FileUpload';\r\n Width := 577;\r\n Height := 407;\r\n ElementClassName := 'BOX_FORM_BORDER';\r\n Shadow := False;\r\n ShowClose := False;\r\n SetEvent(Self, 'OnClose', 'WebFormClose');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n pnlDBFieldSettings.SetParentComponent(Self);\r\n pnlDBFieldSettings.Name := 'pnlDBFieldSettings';\r\n pnlDBFieldSettings.Tag := -1;\r\n pnlDBFieldSettings.Left := 0;\r\n pnlDBFieldSettings.Top := 0;\r\n pnlDBFieldSettings.Width := 577;\r\n pnlDBFieldSettings.Height := 407;\r\n pnlDBFieldSettings.ElementClassName := 'BOX_ROUND_BORDER';\r\n pnlDBFieldSettings.Align := alClient;\r\n pnlDBFieldSettings.ChildOrder := 8;\r\n pnlDBFieldSettings.Color := clWhite;\r\n pnlDBFieldSettings.TabOrder := 0;\r\n WebPanel24.SetParentComponent(pnlDBFieldSettings);\r\n WebPanel24.Name := 'WebPanel24';\r\n WebPanel24.Left := 0;\r\n WebPanel24.Top := 27;\r\n WebPanel24.Width := 577;\r\n WebPanel24.Height := 339;\r\n WebPanel24.Align := alClient;\r\n WebPanel24.BorderStyle := bsNone;\r\n WebPanel24.ChildOrder := 2;\r\n WebPanel24.Color := clWhite;\r\n WebPanel24.TabOrder := 0;\r\n WebFilePicker1.SetParentComponent(WebPanel24);\r\n WebFilePicker1.Name := 'WebFilePicker1';\r\n WebFilePicker1.Left := 501;\r\n WebFilePicker1.Top := 263;\r\n WebFilePicker1.Width := 73;\r\n WebFilePicker1.Height := 62;\r\n WebFilePicker1.ElementClassName := 'file_picker';\r\n WebFilePicker1.HeightStyle := ssAuto;\r\n WebFilePicker1.ChildOrder := 2;\r\n WebFilePicker1.ElementFont := efCSS;\r\n WebFilePicker1.Visible := False;\r\n SetEvent(WebFilePicker1, Self, 'OnChange', 'WebFilePicker1Change');\r\n SetEvent(WebFilePicker1, Self, 'OnGetFileAsBase64', 'WebFilePicker1GetFileAsBase64');\r\n SetEvent(WebFilePicker1, Self, 'OnGetFileAsStream', 'WebFilePicker1GetFileAsStream');\r\n btnSubmit.SetParentComponent(WebPanel24);\r\n btnSubmit.Name := 'btnSubmit';\r\n btnSubmit.Left := 178;\r\n btnSubmit.Top := 276;\r\n btnSubmit.Width := 200;\r\n btnSubmit.Height := 41;\r\n btnSubmit.Cursor := crHandPoint;\r\n btnSubmit.Caption := 'Upload';\r\n btnSubmit.ChildOrder := 1;\r\n btnSubmit.ElementClassName := 'qai_submitbutton';\r\n btnSubmit.ElementFont := efCSS;\r\n btnSubmit.HeightPercent := 100.000000000000000000;\r\n btnSubmit.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnSubmit, Self, 'OnClick', 'btnSubmitClick');\r\n cbSubmitDefaults.SetParentComponent(WebPanel24);\r\n cbSubmitDefaults.Name := 'cbSubmitDefaults';\r\n cbSubmitDefaults.Left := 5;\r\n cbSubmitDefaults.Top := 263;\r\n cbSubmitDefaults.Width := 167;\r\n cbSubmitDefaults.Height := 17;\r\n cbSubmitDefaults.Cursor := crHandPoint;\r\n cbSubmitDefaults.Caption := 'Submit Default Files';\r\n cbSubmitDefaults.ChildOrder := 3;\r\n cbSubmitDefaults.ElementLabelClassName := 'text_normal';\r\n cbSubmitDefaults.ElementFont := efCSS;\r\n cbSubmitDefaults.HeightPercent := 100.000000000000000000;\r\n cbSubmitDefaults.WidthPercent := 100.000000000000000000;\r\n SetEvent(cbSubmitDefaults, Self, 'OnClick', 'cbSubmitDefaultsClick');\r\n pnlUpload.SetParentComponent(WebPanel24);\r\n pnlUpload.Name := 'pnlUpload';\r\n pnlUpload.Left := 0;\r\n pnlUpload.Top := 0;\r\n pnlUpload.Width := 577;\r\n pnlUpload.Height := 257;\r\n pnlUpload.Align := alTop;\r\n pnlUpload.BorderColor := clWhite;\r\n pnlUpload.BorderStyle := bsNone;\r\n pnlUpload.ChildOrder := 4;\r\n pnlUpload.Color := clWhite;\r\n pnlUpload.TabOrder := 3;\r\n pnlChooseFile.SetParentComponent(pnlUpload);\r\n pnlChooseFile.Name := 'pnlChooseFile';\r\n pnlChooseFile.AlignWithMargins := True;\r\n pnlChooseFile.Left := 7;\r\n pnlChooseFile.Top := 7;\r\n pnlChooseFile.Width := 265;\r\n pnlChooseFile.Height := 243;\r\n pnlChooseFile.Margins.Left := 7;\r\n pnlChooseFile.Margins.Top := 7;\r\n pnlChooseFile.Margins.Right := 7;\r\n pnlChooseFile.Margins.Bottom := 7;\r\n pnlChooseFile.ElementClassName := 'qai_choosefilepanel';\r\n pnlChooseFile.Align := alLeft;\r\n pnlChooseFile.BorderColor := clWhite;\r\n pnlChooseFile.BorderStyle := bsNone;\r\n pnlChooseFile.ChildOrder := 1;\r\n pnlChooseFile.Color := clWhite;\r\n pnlChooseFile.TabOrder := 0;\r\n WebLabel1.SetParentComponent(pnlChooseFile);\r\n WebLabel1.Name := 'WebLabel1';\r\n WebLabel1.Left := 57;\r\n WebLabel1.Top := 184;\r\n WebLabel1.Width := 3;\r\n WebLabel1.Height := 13;\r\n WebLabel1.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel1.Font.Color := clNavy;\r\n WebLabel1.Font.Height := -11;\r\n WebLabel1.Font.Name := 'Tahoma';\r\n WebLabel1.Font.Style := [];\r\n WebLabel1.HeightPercent := 100.000000000000000000;\r\n WebLabel1.ParentFont := False;\r\n WebLabel1.WidthPercent := 100.000000000000000000;\r\n WebLabel3.SetParentComponent(pnlChooseFile);\r\n WebLabel3.Name := 'WebLabel3';\r\n WebLabel3.Left := 0;\r\n WebLabel3.Top := 204;\r\n WebLabel3.Width := 265;\r\n WebLabel3.Height := 39;\r\n WebLabel3.Align := alClient;\r\n WebLabel3.Alignment := taCenter;\r\n WebLabel3.Caption := 'Choose a file or drag it here.';\r\n WebLabel3.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel3.Font.Color := 8536320;\r\n WebLabel3.Font.Height := -11;\r\n WebLabel3.Font.Name := 'Tahoma';\r\n WebLabel3.Font.Style := [];\r\n WebLabel3.HeightPercent := 100.000000000000000000;\r\n WebLabel3.ParentFont := False;\r\n WebLabel3.WidthPercent := 100.000000000000000000;\r\n faQAI_FileUpload.SetParentComponent(pnlChooseFile);\r\n faQAI_FileUpload.Name := 'faQAI_FileUpload';\r\n faQAI_FileUpload.AlignWithMargins := True;\r\n faQAI_FileUpload.Left := 7;\r\n faQAI_FileUpload.Top := 7;\r\n faQAI_FileUpload.Width := 251;\r\n faQAI_FileUpload.Height := 190;\r\n faQAI_FileUpload.Margins.Left := 7;\r\n faQAI_FileUpload.Margins.Top := 7;\r\n faQAI_FileUpload.Margins.Right := 7;\r\n faQAI_FileUpload.Margins.Bottom := 7;\r\n faQAI_FileUpload.ElementClassName := 'qai_choosefileButton';\r\n faQAI_FileUpload.Align := alTop;\r\n faQAI_FileUpload.Caption := '';\r\n faQAI_FileUpload.ChildOrder := 2;\r\n faQAI_FileUpload.Color := clWhite;\r\n faQAI_FileUpload.DragCaption := '.';\r\n faQAI_FileUpload.DragColor := clWhite;\r\n faQAI_FileUpload.Font.Charset := DEFAULT_CHARSET;\r\n faQAI_FileUpload.Font.Color := clWhite;\r\n faQAI_FileUpload.Font.Height := -11;\r\n faQAI_FileUpload.Font.Name := 'Tahoma';\r\n faQAI_FileUpload.Font.Style := [fsBold];\r\n faQAI_FileUpload.FontHoverColor := clWhite;\r\n faQAI_FileUpload.Multifile := True;\r\n faQAI_FileUpload.ParentFont := False;\r\n faQAI_FileUpload.ShowPicture := False;\r\n SetEvent(faQAI_FileUpload, Self, 'OnDroppedFiles', 'faQAI_FileUploadDroppedFiles');\r\n SetEvent(faQAI_FileUpload, Self, 'OnGetFileAsBase64', 'faQAI_FileUploadGetFileAsBase64');\r\n WebPanel1.SetParentComponent(pnlUpload);\r\n WebPanel1.Name := 'WebPanel1';\r\n WebPanel1.AlignWithMargins := True;\r\n WebPanel1.Left := 286;\r\n WebPanel1.Top := 7;\r\n WebPanel1.Width := 284;\r\n WebPanel1.Height := 243;\r\n WebPanel1.Margins.Left := 7;\r\n WebPanel1.Margins.Top := 7;\r\n WebPanel1.Margins.Right := 7;\r\n WebPanel1.Margins.Bottom := 7;\r\n WebPanel1.ElementClassName := 'qai_uploadFileListPanel';\r\n WebPanel1.Align := alClient;\r\n WebPanel1.BorderColor := clWhite;\r\n WebPanel1.ChildOrder := 2;\r\n WebPanel1.Color := clWhite;\r\n WebPanel1.TabOrder := 1;\r\n WebLabel2.SetParentComponent(WebPanel1);\r\n WebLabel2.Name := 'WebLabel2';\r\n WebLabel2.Left := 0;\r\n WebLabel2.Top := 0;\r\n WebLabel2.Width := 284;\r\n WebLabel2.Height := 13;\r\n WebLabel2.Align := alTop;\r\n WebLabel2.Alignment := taCenter;\r\n WebLabel2.Caption := 'File List';\r\n WebLabel2.ElementClassName := 'form_caption';\r\n WebLabel2.HeightPercent := 100.000000000000000000;\r\n WebLabel2.WidthPercent := 100.000000000000000000;\r\n lbFiles.SetParentComponent(WebPanel1);\r\n lbFiles.Name := 'lbFiles';\r\n lbFiles.AlignWithMargins := True;\r\n lbFiles.Left := 7;\r\n lbFiles.Top := 20;\r\n lbFiles.Width := 270;\r\n lbFiles.Height := 216;\r\n lbFiles.Margins.Left := 7;\r\n lbFiles.Margins.Top := 7;\r\n lbFiles.Margins.Right := 7;\r\n lbFiles.Margins.Bottom := 7;\r\n lbFiles.Align := alClient;\r\n lbFiles.BorderStyle := bsNone;\r\n lbFiles.ElementClassName := 'qai_uploadFileList';\r\n lbFiles.HeightPercent := 100.000000000000000000;\r\n lbFiles.ItemHeight := 13;\r\n lbFiles.ShowFocus := False;\r\n lbFiles.WidthPercent := 100.000000000000000000;\r\n lbFiles.ItemIndex := -1;\r\n pnlDBFieldSetupCaption.SetParentComponent(pnlDBFieldSettings);\r\n pnlDBFieldSetupCaption.Name := 'pnlDBFieldSetupCaption';\r\n pnlDBFieldSetupCaption.Left := 0;\r\n pnlDBFieldSetupCaption.Top := 0;\r\n pnlDBFieldSetupCaption.Width := 577;\r\n pnlDBFieldSetupCaption.Height := 27;\r\n pnlDBFieldSetupCaption.ElementClassName := 'form_caption';\r\n pnlDBFieldSetupCaption.Align := alTop;\r\n pnlDBFieldSetupCaption.BorderColor := clWhite;\r\n pnlDBFieldSetupCaption.BorderStyle := bsNone;\r\n pnlDBFieldSetupCaption.Caption := 'File Upload';\r\n pnlDBFieldSetupCaption.ChildOrder := 3;\r\n pnlDBFieldSetupCaption.Color := clWhite;\r\n pnlDBFieldSetupCaption.TabOrder := 1;\r\n pnlFormButtons.SetParentComponent(pnlDBFieldSettings);\r\n pnlFormButtons.Name := 'pnlFormButtons';\r\n pnlFormButtons.Left := 0;\r\n pnlFormButtons.Top := 366;\r\n pnlFormButtons.Width := 577;\r\n pnlFormButtons.Height := 41;\r\n pnlFormButtons.Align := alBottom;\r\n pnlFormButtons.BorderStyle := bsNone;\r\n pnlFormButtons.ChildOrder := 5;\r\n pnlFormButtons.Color := clWhite;\r\n pnlFormButtons.TabOrder := 2;\r\n btnClose.SetParentComponent(pnlFormButtons);\r\n btnClose.Name := 'btnClose';\r\n btnClose.Left := 487;\r\n btnClose.Top := 0;\r\n btnClose.Width := 90;\r\n btnClose.Height := 41;\r\n btnClose.Cursor := crHandPoint;\r\n btnClose.Hint := 'Cancel';\r\n btnClose.Align := alRight;\r\n btnClose.Caption := '';\r\n btnClose.Color := clNone;\r\n btnClose.ElementClassName := 'btn_icon';\r\n btnClose.Font.Charset := DEFAULT_CHARSET;\r\n btnClose.Font.Color := clGray;\r\n btnClose.Font.Height := -16;\r\n btnClose.Font.Name := 'Tahoma';\r\n btnClose.Font.Style := [];\r\n btnClose.HeightPercent := 100.000000000000000000;\r\n btnClose.MaterialGlyphSize := 1;\r\n btnClose.ParentFont := False;\r\n btnClose.ShowHint := True;\r\n btnClose.TabOrder := 10;\r\n btnClose.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnClose, Self, 'OnClick', 'btnCloseClick');\r\n btnClear.SetParentComponent(pnlFormButtons);\r\n btnClear.Name := 'btnClear';\r\n btnClear.Left := 397;\r\n btnClear.Top := 0;\r\n btnClear.Width := 90;\r\n btnClear.Height := 41;\r\n btnClear.Cursor := crHandPoint;\r\n btnClear.Hint := 'Clear';\r\n btnClear.Align := alRight;\r\n btnClear.Caption := '';\r\n btnClear.Color := clNone;\r\n btnClear.ElementClassName := 'btn_icon';\r\n btnClear.Font.Charset := DEFAULT_CHARSET;\r\n btnClear.Font.Color := clGray;\r\n btnClear.Font.Height := -16;\r\n btnClear.Font.Name := 'Tahoma';\r\n btnClear.Font.Style := [];\r\n btnClear.HeightPercent := 100.000000000000000000;\r\n btnClear.MaterialGlyphSize := 19;\r\n btnClear.ParentFont := False;\r\n btnClear.ShowHint := True;\r\n btnClear.TabOrder := 10;\r\n btnClear.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnClear, Self, 'OnClick', 'btnClearClick');\r\n btnDelete.SetParentComponent(pnlFormButtons);\r\n btnDelete.Name := 'btnDelete';\r\n btnDelete.Left := 307;\r\n btnDelete.Top := 0;\r\n btnDelete.Width := 90;\r\n btnDelete.Height := 41;\r\n btnDelete.Cursor := crHandPoint;\r\n btnDelete.Hint := 'Delete';\r\n btnDelete.Align := alRight;\r\n btnDelete.Caption := '';\r\n btnDelete.Color := clNone;\r\n btnDelete.ElementClassName := 'btn_icon';\r\n btnDelete.Font.Charset := DEFAULT_CHARSET;\r\n btnDelete.Font.Color := clGray;\r\n btnDelete.Font.Height := -16;\r\n btnDelete.Font.Name := 'Tahoma';\r\n btnDelete.Font.Style := [];\r\n btnDelete.HeightPercent := 100.000000000000000000;\r\n btnDelete.ParentFont := False;\r\n btnDelete.ShowHint := True;\r\n btnDelete.TabOrder := 10;\r\n btnDelete.Visible := False;\r\n btnDelete.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnDelete, Self, 'OnClick', 'btnDeleteClick');\r\n finally\r\n pnlDBFieldSettings.AfterLoadDFMValues;\r\n WebPanel24.AfterLoadDFMValues;\r\n WebFilePicker1.AfterLoadDFMValues;\r\n btnSubmit.AfterLoadDFMValues;\r\n cbSubmitDefaults.AfterLoadDFMValues;\r\n pnlUpload.AfterLoadDFMValues;\r\n pnlChooseFile.AfterLoadDFMValues;\r\n WebLabel1.AfterLoadDFMValues;\r\n WebLabel3.AfterLoadDFMValues;\r\n faQAI_FileUpload.AfterLoadDFMValues;\r\n WebPanel1.AfterLoadDFMValues;\r\n WebLabel2.AfterLoadDFMValues;\r\n lbFiles.AfterLoadDFMValues;\r\n pnlDBFieldSetupCaption.AfterLoadDFMValues;\r\n pnlFormButtons.AfterLoadDFMValues;\r\n btnClose.AfterLoadDFMValues;\r\n btnClear.AfterLoadDFMValues;\r\n btnDelete.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n\r\n\r\n\r\n\r\n","unit UDF_ImageCapture;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Variants, System.Classes, System.types, Vcl.Graphics,\r\n Vcl.Controls, Vcl.Forms, Vcl.Dialogs, UDF_CustomForm, VCL.TMSFNCTypes,\r\n VCL.TMSFNCUtils, VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes, WEBLib.Buttons,\r\n VCL.TMSFNCCustomControl, VCL.TMSFNCSwitch, WEBLib.Controls, WEBLib.ExtCtrls,\r\n Vcl.StdCtrls, WEBLib.StdCtrls, WEBLib.Devices, WEBLib.Grids, WEBLib.DBCtrls,\r\n WEBLib.WebCtrls, Data.DB, XData.Web.JsonDataset, XData.Web.Dataset, WEBLib.DB,\r\n Web, JS, XData.Web.Client, System.StrUtils, StrUtils, Vcl.Menus, WEBLib.Menus;\r\n\r\ntype\r\n\r\n TfrmUDF_ImageCapture = class(TfrmUDF_CustomForm)\r\n btnCapture: TBitBtn;\r\n WebPanel1: TPanel;\r\n WebComboBox1: TComboBox;\r\n btnZoomIn: TBitBtn;\r\n btnZoomOut: TBitBtn;\r\n WebPanel2: TPanel;\r\n WebMemo1: TMemo;\r\n btnProcessing: TBitBtn;\r\n pnlVideo: TPanel;\r\n WebCamera1: TCamera;\r\n f1: TPanel;\r\n F2: TPanel;\r\n F3: TPanel;\r\n F4: TPanel;\r\n F5: TPanel;\r\n F6: TPanel;\r\n F7: TPanel;\r\n WebComboBox2: TComboBox;\r\n WebMultimediaPlayer1: TMultimediaPlayer;\r\n pmImages: TPopupMenu;\r\n Delete1: TMenuItem;\r\n Print1: TMenuItem;\r\n lblSize: TPanel;\r\n mDictation: TMemo;\r\n mDictationTarget: TMemo;\r\n WebButton1: TButton;\r\n imgZoomCaptured: TDBImageControl;\r\n pnlImages: TPanel;\r\n mAI_Dictation: TMemo;\r\n ImageGrid: TDBResponsiveGrid;\r\n mImagelabel: TMemo;\r\n WebButton2: TButton;\r\n procedure WebCamera1CameraDevicesInitialized(Sender: TObject);\r\n procedure WebComboBox1Change(Sender: TObject);\r\n procedure btnCaptureClick(Sender: TObject);\r\n procedure WebFormShow(Sender: TObject);\r\n procedure btnCloseClick(Sender: TObject);\r\n procedure ImageGridClick(Sender: TObject);\r\n procedure WebFormResize(Sender: TObject);\r\n procedure btnZoomInClick(Sender: TObject);\r\n procedure btnZoomOutClick(Sender: TObject);\r\n procedure btnProcessClick(Sender: TObject);\r\n procedure WebCamera1CameraStreamPlay(Sender: TObject;\r\n ACamera: TCameraDevice);\r\n function CuptureFromVideo: string;\r\n procedure WebFormCreate(Sender: TObject);\r\n procedure mDictationChange(Sender: TObject);\r\n procedure ImageGridItemClick(Sender: TObject; Index: Integer);\r\n procedure WebButton1Click(Sender: TObject);\r\n procedure Delete1Click(Sender: TObject);\r\n procedure ImageGridMouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure ImageGridItemDblClick(Sender: TObject; Index: Integer);\r\n procedure ImageGridItemGetFieldValue(Sender: TObject; Index: Integer;\r\n AFieldName: string; var AValue: string);\r\n procedure Print1Click(Sender: TObject);\r\n procedure ImageGridItemCreated(Sender: TObject; Index: Integer);\r\n procedure mImagelabelChange(Sender: TObject);\r\n procedure WebButton2Click(Sender: TObject);\r\n\r\n private\r\n { Private declarations }\r\n public\r\n { Public declarations }\r\n\r\n procedure ImageMenu;\r\n\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmUDF_ImageCapture: TfrmUDF_ImageCapture;\r\n VideoWidth_p: integer;\r\n VideoHeight_p: integer;\r\n mouse_x, mouse_y: integer;\r\n recno1_p, recno2_p: integer;\r\n\r\nimplementation\r\n\r\n{$R *.dfm}\r\n\r\nuses DataModule, Common, Main;\r\n\r\nprocedure TfrmUDF_ImageCapture.ImageMenu;\r\n begin\r\n // showmessage(inttostr(imagegrid.ItemIndex));\r\n //showmessage(inttostr(mouse_x) + ' - ' + inttostr(mouse_y));\r\n pmImages.Popup(mouse_x - 200, mouse_y + 10);\r\n end;\r\n\r\nprocedure TfrmUDF_ImageCapture.btnCaptureClick(Sender: TObject);\r\nvar imagebase64_p: string; imagenumber_p: string; sql_p: string; sequence_p: integer;\r\n\r\n procedure OnResult_getimagenumber(Response: TXDataClientResponse);\r\n begin\r\n //showmessage('new image number: ' + string(TJSObject(Response.Result)['value']));\r\n imagenumber_p := trim(string(TJSObject(Response.Result)['value']));\r\n dm.xdsImages.edit;\r\n dm.xdsImagesIMAGENUMBER.AsString := imagenumber_p;\r\n dm.xdsImages.Post;\r\n\r\n if mImagelabel.Visible\r\n then begin\r\n dm.xdsImages.RecNo := recno1_p;\r\n mImagelabel.Text := mImagelabel.Text + 'NEXT'; // to triger image update\r\n mImagelabelchange(mImagelabel);\r\n end;\r\n mImagelabel.Visible := true;\r\n mImagelabel.SetFocus;\r\n mImagelabel.Text := '';\r\n\r\n\r\n end;\r\n\r\n procedure OnResult_addimage(Response: TXDataClientResponse);\r\n begin\r\n // showmessage(string(TJSObject(Response.Result)['value']));\r\n if uppercase(GetPreviousForm(1).Name) = 'UDF_PROCREPORT_EV'\r\n then begin\r\n sql_p := 'select max(imagenumber) from imagesevault where procedurenumber = ' + EGV_CURRENT_PROCEDURENUMBER;\r\n if dm.XDataWebConnection2.Connected then dm.XDataWebClient2.RawInvoke('IReportService.GetColumnData',[sql_p , egv_facilityid, '0'], @OnResult_getimagenumber);\r\n end;\r\n if uppercase(GetPreviousForm(1).Name) = 'UDF_PROCREPORT_Q'\r\n then begin\r\n sql_p := 'select max(imagenumber) from imagesevault where procedurenumber = ' + EGV_CURRENT_PROCEDURENUMBER +\r\n ' and facilityid = ' + EGV_FACILITYID;\r\n if dm.XDataWebConnection2.Connected then dm.XDataWebClient2.RawInvoke('IReportService.GetColumnData',[sql_p , egv_facilityid, '0'], @OnResult_getimagenumber);\r\n end;\r\n end;\r\n\r\nbegin\r\n inherited;\r\nrecno1_p := dm.xdsImages.RecNo; // current image ( before new one added)\r\n\r\n// showmessage('height: ' + inttostr(WebCamera1.SnapShotAsImageData.height) +\r\n// ' width: ' + inttostr(WebCamera1.SnapShotAsImageData.width));\r\n//showmessage('0');\r\nif Webcamera1.Visible\r\nthen imagebase64_p := WebCamera1.SnapShotAsBase64\r\nelse imagebase64_p := CuptureFromVideo;\r\n//showmessage('1 ' + imagebase64_p);\r\n//showmessage(copy(imagebase64_p,24,length(imagebase64_p)));\r\ndm.xdsImages.First;\r\nsequence_p := dm.xdsImagesSEQUENCE.AsInteger + 1;\r\ndm.xdsImages.Insert;\r\ndm.xdsImagesSEQUENCE.AsInteger := sequence_p;\r\ndm.xdsImagesIMAGE.AsString := window.atob(copy(imagebase64_p,24,length(imagebase64_p)));\r\ndm.xdsImagesIMAGEBASE64.AsString := imagebase64_p;\r\ndm.xdsImagesIMAGEBASE64_DATA.AsString := copy(imagebase64_p,24,length(imagebase64_p));\r\ndm.xdsImages.Post;\r\nrecno2_p := dm.xdsImages.RecNo; // newly cuptured image\r\n\r\n//showmessage('2 ' + copy(imagebase64_p,24,length(imagebase64_p)));\r\n\r\nif imagebase64_p <> ''\r\nthen begin\r\n if uppercase(GetPreviousForm(1).Name) = 'UDF_PROCREPORT_EV'\r\n then if dm.XDataWebConnection2.Connected then dm.XDataWebClient2.RawInvoke('IReportService.E_AddImage',\r\n [copy(imagebase64_p,24,length(imagebase64_p)),\r\n egv_facilityid, egv_current_procedurenumber, EGV_CURRENT_MRN, '0'], @OnResult_addimage); //Endovault\r\n if uppercase(GetPreviousForm(1).Name) = 'UDF_PROCREPORT_Q'\r\n then if dm.XDataWebConnection2.Connected then dm.XDataWebClient2.RawInvoke('IReportService.Q_AddImage',\r\n [copy(imagebase64_p,24,length(imagebase64_p)),\r\n egv_facilityid, egv_current_procedurenumber, EGV_CURRENT_MRN, '0'], @OnResult_addimage); //Qlinical\r\n end;\r\n\r\nimagegrid.Visible := true;\r\nend;\r\n\r\nprocedure TfrmUDF_ImageCapture.btnCloseClick(Sender: TObject);\r\nvar sql_p: string;\r\nbegin\r\nbtnProcessing.hint := 'Start Processing';\r\nWebCamera1.Stop;\r\nWebMultiMediaPlayer1.Pause;\r\n\r\n{if (uppercase(GetPreviousForm(1).Name) = 'UDF_PROCREPORT_EV') or (uppercase(GetPreviousForm(1).Name) = 'UDF_PROCREPORT_Q')\r\nthen begin\r\n (GetPreviousForm.FindComponent('SM1') as TWebMemo).Text := mAI_Dictation.Text;\r\n (GetPreviousForm.FindComponent('SM1') as TWebMemo).Tag := 1; // Updated\r\n end; }\r\n\r\n if uppercase(GetPreviousForm(1).Name) = 'UDF_PROCREPORT_EV'\r\n then sql_p := 'update procedure_surgery set custom1 = ' + quotedstr(mAI_Dictation.Text) + ' where id = ' + EGV_CURRENT_PROCEDURENUMBER;\r\n if uppercase(GetPreviousForm(1).Name) = 'UDF_PROCREPORT_Q'\r\n then sql_p := 'update procedure_surgery set custom1 = ' + quotedstr(mAI_Dictation.Text) + ' where id = ' + EGV_CURRENT_PROCEDURENUMBER +\r\n ' and facilityid = ' + EGV_FACILITYID;\r\n if dm.XDataWebConnection2.Connected then dm.XDataWebClient2.RawInvoke('IReportService.ExecQuery',[sql_p , egv_facilityid, '0'], nil);\r\ninherited;\r\n\r\nend;\r\n\r\n\r\nprocedure TfrmUDF_ImageCapture.btnProcessClick(Sender: TObject);\r\nvar imagebase64_p, s, s1, s2, s3, s4, s5, s6: string; i, j, a_top, a_left, a_bottom, a_right, h_shift, v_shift: integer;\r\n p: double; f_height, f_width: integer; // video frame dimensions\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p: string;\r\n begin\r\n //f_width := webcamera1.Width;\r\n //f_height := webcamera1.height;\r\n\r\n if Webcamera1.Visible\r\n then p := (1920 / 1080) // use selected resolution here\r\n else p := (Videowidth_p / Videoheight_p); // video file frame\r\n\r\n if pnlVideo.Width >= trunc(pnlVideo.Height * p)\r\n then begin\r\n f_height := pnlVideo.Height;\r\n f_width := trunc(f_height * p);\r\n v_shift := 0;\r\n h_shift := trunc((pnlVideo.Width - f_width ) / 2);\r\n end\r\n else begin\r\n f_width := pnlVideo.width;\r\n f_height := trunc(f_width / p);\r\n h_shift := 0;\r\n v_shift := trunc((pnlVideo.height - f_height ) / 2);\r\n end;\r\n\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n //showmessage('process result: '+ response_p);\r\n s := ParseArgusXml(Response_p);\r\n // showmessage('1');\r\n lblSize.caption := '';\r\n// lblSize.Visible := false;\r\n s1:='';s2:='';s3:='';s4:='';\r\n s1 := trim(splitstring(s,'^')[1]); // size\r\n s2 := trim(splitstring(s,'^')[2]); // frame\r\n if s2 <> ''\r\n then begin\r\n s3 := trim(splitstring(s2,',')[0]); // frame left\r\n s4 := trim(splitstring(s2,',')[1]); // frame top\r\n s5 := trim(splitstring(s2,',')[2]); // frame right\r\n s6 := trim(splitstring(s2,',')[3]); // frame bottom\r\n end;\r\n // showmessage('2');\r\n s := copy(s, 1 ,pos('^', s) - 1);\r\n // showmessage('3');\r\n lblSize.caption := s1 + ' mm.';\r\n // showmessage('4');\r\n f1.Visible := (s <> '');\r\n f2.Visible := (length(splitstring(s,';')) > 1);\r\n f3.Visible := (length(splitstring(s,';')) > 2);\r\n f4.Visible := (length(splitstring(s,';')) > 3);\r\n f5.Visible := (length(splitstring(s,';')) > 4);\r\n f6.Visible := (length(splitstring(s,';')) > 5);\r\n f7.Visible := (length(splitstring(s,';')) > 6);\r\n // showmessage('5');\r\n if (s1 <> '') and (copy(s1,1,1) <> '0')\r\n then begin\r\n lblSize.Left := strtoint(s3);\r\n lblSize.top := strtoint(s4);\r\n lblSize.Left := trunc(lblSize.Left * (f_width / 1000) + 0.5) + h_shift;\r\n lblSize.top := trunc(lblSize.top * (f_height / 1000) + 0.5) + v_shift - 45;\r\n lblSize.Visible := true;\r\n end\r\n else lblSize.Visible := false;\r\n // showmessage('6');\r\n if s <> ''\r\n then begin\r\n // webmemo1.Lines.Add(' *** ' + response_p);\r\n // if webmemo1.Lines.Count > 30 then webmemo1.Lines.Delete(0);\r\n // webmemo1.Lines.Add(' ### ' + s);\r\n for i := 0 to length(splitstring(s,';')) - 1\r\n do begin // showmessage('1');\r\n a_left := strtoint(splitstring(splitstring(s,';')[i],',')[0]);\r\n a_right := strtoint(splitstring(splitstring(s,';')[i],',')[1]);\r\n a_top := strtoint(splitstring(splitstring(s,';')[i],',')[2]);\r\n a_bottom := strtoint(splitstring(splitstring(s,';')[i],',')[3]);\r\n\r\n a_left := trunc(a_left * (f_width / 1000) + 0.5) + h_shift;\r\n a_right := trunc(a_right * (f_width / 1000) + 0.5) + h_shift;\r\n a_top := trunc(a_top * (f_height / 1000) + 0.5) + v_shift;\r\n a_bottom := trunc(a_bottom * (f_height / 1000) + 0.5) + v_shift;\r\n\r\n // if (a_left = lblSize.Left) and (a_top = lblSize.top)\r\n // then showmessage('match');\r\n\r\n if i = 0 then begin f1.Top := a_top; f1.Left := a_Left; f1.Width := a_right-a_left; f1.Height := a_bottom-a_top; end;\r\n if i = 1 then begin f2.Top := a_top; f2.Left := a_Left; f2.Width := a_right-a_left; f2.Height := a_bottom-a_top; end;\r\n if i = 2 then begin f3.Top := a_top; f3.Left := a_Left; f3.Width := a_right-a_left; f3.Height := a_bottom-a_top; end;\r\n if i = 3 then begin f4.Top := a_top; f4.Left := a_Left; f4.Width := a_right-a_left; f4.Height := a_bottom-a_top; end;\r\n if i = 4 then begin f5.Top := a_top; f5.Left := a_Left; f5.Width := a_right-a_left; f5.Height := a_bottom-a_top; end;\r\n if i = 5 then begin f6.Top := a_top; f6.Left := a_Left; f6.Width := a_right-a_left; f6.Height := a_bottom-a_top; end;\r\n if i = 6 then begin f7.Top := a_top; f7.Left := a_Left; f7.Width := a_right-a_left; f7.Height := a_bottom-a_top; end;\r\n end;\r\n end;\r\n { if lblSize.Visible then showmessage(s3 + ' - ' +inttostr(Videowidth_p) + ' - ' + inttostr(pnlVideo.width) + chr(13) +\r\n inttostr(f1.Left) + ' - ' + inttostr(f1.Top) + chr(13) +\r\n inttostr(f2.Left) + ' - ' + inttostr(f2.Top) + chr(13) +\r\n inttostr(f3.Left) + ' - ' + inttostr(f3.Top) + chr(13) +\r\n inttostr(f4.Left) + ' - ' + inttostr(f4.Top) + chr(13) +\r\n inttostr(f5.Left) + ' - ' + inttostr(f5.Top) + chr(13) +\r\n inttostr(f6.Left) + ' - ' + inttostr(f6.Top) + chr(13) +\r\n inttostr(f7.Left) + ' - ' + inttostr(f7.Top) + chr(13) ); }\r\n\r\n // process next frame\r\n if btnProcessing.hint = 'Stop Processing'\r\n then begin\r\n\r\n if Webcamera1.Visible\r\n then imagebase64_p := WebCamera1.SnapShotAsBase64\r\n else imagebase64_p := CuptureFromVideo;\r\n\r\n if imagebase64_p <> ''\r\n then dm.XDataWebClient1.RawInvoke('IReportService.Process_Image',[copy(imagebase64_p,24,length(imagebase64_p)) ,\r\n f_height, f_width, egv_facilityid, ELV_SESSIONID, '0'], @OnResult);\r\n end;\r\n end;\r\n\r\nbegin\r\ninherited;\r\n\r\nif btnProcessing.hint = 'Start Processing'\r\nthen begin\r\n btnProcessing.hint := 'Stop Processing';\r\n\r\n if Webcamera1.Visible\r\n then imagebase64_p := WebCamera1.SnapShotAsBase64\r\n else imagebase64_p := CuptureFromVideo;\r\n\r\n if imagebase64_p <> ''\r\n then dm.XDataWebClient1.RawInvoke('IReportService.Process_Image',[copy(imagebase64_p,24,length(imagebase64_p)) ,\r\n f_height, f_width, egv_facilityid, ELV_SESSIONID, '0'], @OnResult);\r\n end\r\nelse btnProcessing.hint := 'Start Processing';\r\nend;\r\n\r\nprocedure TfrmUDF_ImageCapture.btnZoomInClick(Sender: TObject);\r\nbegin\r\n inherited;\r\nImageGrid.Height := ((ImageGrid.Height * 15) div 10);\r\nImageGrid.Options.ItemHeight := ImageGrid.Height - 25;\r\nImageGrid.Options.ItemWidthMin := ImageGrid.Options.ItemHeight;\r\nend;\r\n\r\nprocedure TfrmUDF_ImageCapture.btnZoomOutClick(Sender: TObject);\r\nbegin\r\n inherited;\r\nImageGrid.Height := ((ImageGrid.Height *10) div 15);\r\nif ImageGrid.Height < 125 then ImageGrid.Height := 125;\r\nImageGrid.Options.ItemHeight := ImageGrid.Height - 25;\r\nImageGrid.Options.ItemWidthMin := ImageGrid.Options.ItemHeight;\r\nend;\r\n\r\nprocedure TfrmUDF_ImageCapture.ImageGridClick(Sender: TObject);\r\nbegin\r\n inherited;\r\n// showmessage(inttostr(imagegrid.ItemIndex));\r\n// showmessage(inttostr(dm.xdsImages.RecNo));\r\n// showmessage('image data: ' + dm.xdsImagesIMAGEBASE64_DATA.AsString);\r\n//pnlSelectedImage.Visible := true;\r\n//Webcamera1.Visible := false;\r\n\r\nwebcamera1.Realign;\r\n//showmessage(inttostr(webcamera1.ClientRect.Height));\r\n//showmessage(inttostr(webcamera1.ClientRect.width));\r\n\r\n{if pnlSelectedimage.Height > pnlSelectedimage.Width\r\nthen begin\r\n imgSelectedImage.Height := pnlSelectedImage.width - 5;\r\n imgSelectedImage.Width := pnlSelectedImage.width - 5;\r\n end\r\nelse begin\r\n imgSelectedImage.Height := pnlSelectedImage.Height - 5;\r\n imgSelectedImage.Width := pnlSelectedImage.Height - 5;\r\n end;\r\n\r\n// 6:9\r\nimgSelectedImage.Width := ((imgSelectedImage.Height * 9) div 6);\r\n\r\nimgSelectedImage.Top := (((imgSelectedImage.Parent as TWebcontrol).height - imgSelectedImage.Height) div 2);\r\nimgSelectedImage.left := (((imgSelectedImage.Parent as TWebcontrol).width - imgSelectedImage.width) div 2);\r\n\r\nif imgSelectedImage.top < 0 then imgSelectedImage.top := 0;\r\nif imgSelectedImage.left < 0 then imgSelectedImage.left := 0; }\r\n\r\n\r\n\r\n{if imgSelectedImage.height > (imgSelectedImage.Parent as TWebcontrol).height\r\nthen imgSelectedImage.height := (imgSelectedImage.Parent as TWebcontrol).height;\r\n\r\nif imgSelectedImage.width > (imgSelectedImage.Parent as TWebcontrol).width\r\nthen imgSelectedImage.width := (imgSelectedImage.Parent as TWebcontrol).width;\r\n\r\nif imgSelectedImage.height > imgSelectedImage.width then imgSelectedImage.height := imgSelectedImage.width;\r\nif imgSelectedImage.height < imgSelectedImage.width then imgSelectedImage.width := imgSelectedImage.height; }\r\n\r\n\r\n\r\nend;\r\n\r\nprocedure TfrmUDF_ImageCapture.ImageGridItemClick(Sender: TObject;\r\n Index: Integer);\r\nbegin\r\n inherited;\r\n//mycontrol := TSomeControl.Create(Owner);\r\n//webbutton1.Parent := imagegrid;\r\n\r\n//imagegrid.Items[index].ElementHandle.appendChild(webbutton1.ElementHandle);\r\nend;\r\n\r\nprocedure TfrmUDF_ImageCapture.ImageGridItemCreated(Sender: TObject;\r\n Index: Integer);\r\nbegin\r\n inherited;\r\n {\r\nif dm.xdsImagesSELECTED.AsString = 'T'\r\nthen imagegrid.Items[index].HTML := stringreplace(frmMain.mImageGridHTML_selected.text, 'Unit.Form', 'UDF_ImageCapture.frmUDF_ImageCapture',[rfIgnoreCase])\r\nelse imagegrid.Items[index].HTML := stringreplace(frmMain.mImageGridHTML_notselected.text, 'Unit.Form', 'UDF_ImageCapture.frmUDF_ImageCapture',[rfIgnoreCase]);\r\n //showmessage(imagegrid.Items[index].HTML);\r\n //showmessage(dm.xdsImagessequence.AsString + ' - ' + dm.xdsImagesLABEL.AsString + ' - ' + dm.xdsImagesCOMMENTS.AsString);\r\n imagegrid.Items[index].HTML :=\r\n stringreplace(imagegrid.Items[index].HTML, '(%LABEL%)', dm.xdsImagesLABEL.AsString,[rfReplaceAll]);\r\n imagegrid.Items[index].HTML :=\r\n stringreplace(imagegrid.Items[index].HTML, '(%COMMENTS%)', dm.xdsImagesCOMMENTS.AsString,[rfReplaceAll]);\r\n imagegrid.Items[index].HTML :=\r\n copy(imagegrid.Items[index].HTML, 1, pos('(%IMAGEBASE64%)', imagegrid.Items[index].HTML) - 1 ) +\r\n dm.xdsImagesIMAGEBASE64.AsString +\r\n copy(imagegrid.Items[index].HTML, pos('(%IMAGEBASE64%)', imagegrid.Items[index].HTML) + 15, length(imagegrid.Items[index].HTML))\r\n\r\n }\r\nend;\r\n\r\nprocedure TfrmUDF_ImageCapture.ImageGridItemDblClick(Sender: TObject;\r\n Index: Integer);\r\nbegin\r\n inherited;\r\n\r\nWebcamera1.Visible := false;\r\nWebMUltiMediaPlayer1.Visible := false;\r\nimgZoomCaptured.Align := alClient;\r\nimgZoomCaptured.Visible := true;\r\nend;\r\n\r\nprocedure TfrmUDF_ImageCapture.ImageGridItemGetFieldValue(Sender: TObject;\r\n Index: Integer; AFieldName: string; var AValue: string);\r\nbegin\r\n inherited;\r\n //showmessage(imagegrid.Items[index].HTML);\r\nend;\r\n\r\nprocedure TfrmUDF_ImageCapture.ImageGridMouseMove(Sender: TObject;\r\n Shift: TShiftState; X, Y: Integer);\r\n var P: TPoint;\r\nbegin\r\n inherited;\r\nP.x := x;\r\nP.y := y;\r\nP := ImageGrid.clienttoscreen(P);\r\nmouse_x := P.x;\r\nmouse_y := P.y;\r\nend;\r\n\r\nprocedure TfrmUDF_ImageCapture.mDictationChange(Sender: TObject);\r\nbegin\r\n inherited;\r\n if ELV_SPEECHTARGET <> nil\r\n then begin\r\n ELV_SPEECHTARGET.Text := mDictation.Text;\r\n // StretchMemo(ELV_SPEECHTARGET); // all blocks will stretch when form is closing\r\n if ELV_SPEECHTARGET.Tag = 0\r\n then ELV_SPEECHTARGET.Tag := 1; // updated. post it.\r\n end;\r\n end;\r\n\r\nprocedure TfrmUDF_ImageCapture.mImagelabelChange(Sender: TObject);\r\nvar print_p: boolean; s, sql_p, label_p, comment_p, location_p, Response_p: string;\r\n\r\n procedure OnResult_Parse(Response: TXDataClientResponse);\r\n\r\n procedure OnResult_update(Response: TXDataClientResponse);\r\n begin\r\n ImageGridItemCreated(nil, imagegrid.ItemIndex);\r\n dm.xdsImages.RecNo := recno2_p; // back to cuptured image.\r\n end;\r\n\r\n begin\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n // showmessage(response_p);\r\n label_p := splitstring(Response_p,'@')[0];\r\n comment_p := splitstring(Response_p,'@')[1];\r\n location_p := splitstring(Response_p,'@')[2];\r\n // showmessage(label_p);\r\n dm.xdsImages.Edit;\r\n if print_p then dm.xdsImagesSELECTED.AsString := 'T';\r\n dm.xdsImagesLABEL.asstring := label_p;\r\n dm.xdsImagesCOMMENTS.asstring := comment_p;\r\n dm.xdsImages.post;\r\n if print_p\r\n then sql_p := 'update imagesevault set SELECTED = ' + quotedstr('T') +\r\n ' , LABEL = ' + quotedstr(label_p) +\r\n ' , COMMENTS = ' + quotedstr(comment_p) +\r\n ' where procedurenumber = ' +\r\n EGV_CURRENT_PROCEDURENUMBER +\r\n ' and IMAGENUMBER = ' +\r\n dm.xdsImagesIMAGENUMBER.asstring\r\n else sql_p := 'update imagesevault set LABEL = ' + quotedstr(mImagelabel.text) +\r\n ' , COMMENTS = ' + quotedstr(comment_p) +\r\n ' where procedurenumber = ' +\r\n EGV_CURRENT_PROCEDURENUMBER +\r\n ' and IMAGENUMBER = ' +\r\n dm.xdsImagesIMAGENUMBER.asstring;\r\n // showmessage(sql_p);\r\n if dm.XDataWebConnection2.Connected then dm.XDataWebClient2.RawInvoke('IReportService.ExecQuery',[sql_p, egv_facilityid, '0'], @OnResult_update);\r\n mImagelabel.Visible := false;\r\n mAI_Dictation.SetFocus;\r\n end;\r\n\r\nbegin\r\n inherited;\r\n print_p := (pos('PRINT', uppercase(mImagelabel.text)) > 0);\r\n //showmessage(mImagelabel.text);\r\n if (pos('NEXT', uppercase(mImagelabel.text)) > 0) or\r\n (pos('STOP', uppercase(mImagelabel.text)) > 0) or\r\n (pos('PRINT', uppercase(mImagelabel.text)) > 0)\r\n then begin //showmessage(mImagelabel.text);\r\n mImagelabel.text := stringreplace(mImagelabel.text,'NEXT' ,'',[rfIgnoreCase]);\r\n mImagelabel.text := stringreplace(mImagelabel.text,'STOP' ,'',[rfIgnoreCase]);\r\n mImagelabel.text := stringreplace(mImagelabel.text,'PRINT','',[rfIgnoreCase]);\r\n if EGV_FACILITYTOKEN = '' then s := EGV_FACILITY\r\n else s := EGV_FACILITY + ',' + EGV_FACILITYTOKEN;\r\n dm.XDataWebClient1.RawInvoke('IReportService.QAI_ParseImgLabels', [s, mImagelabel.text], @OnResult_Parse);\r\n end;\r\nend;\r\n\r\nprocedure TfrmUDF_ImageCapture.Print1Click(Sender: TObject);\r\nvar s, sql_p: string;\r\nbegin\r\n inherited;\r\n// showmessage(inttostr(imagegrid.ItemIndex));\r\nif dm.xdsImagesSELECTED.AsString = 'T'\r\nthen s := 'F'\r\nelse s := 'T';\r\n\r\nsql_p := 'update imagesevault set SELECTED = ' + quotedstr(s) + ' where procedurenumber = ' +\r\n EGV_CURRENT_PROCEDURENUMBER + ' and IMAGENUMBER = ' + dm.xdsImagesIMAGENUMBER.asstring;\r\nshowmessage(sql_p);\r\nif dm.XDataWebConnection2.Connected then dm.XDataWebClient2.RawInvoke('IReportService.ExecQuery',[sql_p, egv_facilityid, '0'], nil);\r\nend;\r\n\r\nfunction TfrmUDF_ImageCapture.CuptureFromVideo(): string;\r\nvar\r\n canvas: TJSHTMLCanvasElement;\r\n vidElem: TJSHTMLElement;\r\nbegin\r\n Result := '';\r\n inherited;\r\n if Assigned(ElementHandle) then\r\n begin\r\n vidElem:= WebMultimediaPlayer1.ElementHandle;\r\n canvas := TJSHTMLCanvasElement(document.createElement('canvas'));\r\n canvas.width := JS.toInteger(vidElem.Properties['videoWidth']);\r\n canvas.height := JS.toInteger(vidElem.Properties['videoHeight']);\r\n canvas.getContextAs2DContext('2d').drawImage(TJSObject(vidElem), 0, 0);\r\n\r\n if (canvas.width = 0) or (canvas.height = 0) then exit;\r\n\r\n //showmessage(inttostr(canvas.width) + ' - ' + inttostr(canvas.height));\r\n\r\n //get the base64 image as JPEG and assign in to TWebImageControl\r\n //WebImageControl1.URL := canvas.toDataURL('image/jpeg');\r\n VideoWidth_p := canvas.width;\r\n VideoHeight_p := canvas.height;\r\n result := canvas.toDataURL('image/jpeg');\r\n //showmessage(result);\r\n end;\r\nend;\r\n\r\nprocedure TfrmUDF_ImageCapture.Delete1Click(Sender: TObject);\r\nvar sql_p: string;\r\nbegin\r\n inherited;\r\n// showmessage(inttostr(imagegrid.ItemIndex));\r\nsql_p := 'delete from imagesevault where procedurenumber = ' +\r\n EGV_CURRENT_PROCEDURENUMBER + ' and IMAGENUMBER = ' + dm.xdsImagesIMAGENUMBER.asstring;\r\nshowmessage(sql_p);\r\nif dm.XDataWebConnection2.Connected then dm.XDataWebClient2.RawInvoke('IReportService.ExecQuery',[sql_p, egv_facilityid, '0'], nil);\r\nend;\r\n\r\nprocedure TfrmUDF_ImageCapture.WebButton1Click(Sender: TObject);\r\nbegin\r\n inherited;\r\n\r\n// asm\r\n// document.getElementById('test').onclick = function() {\r\n// pas.UDF_ImageCapture.frmUDF_ImageCapture.btnTestClick; };\r\n// end;\r\nend;\r\n\r\nprocedure TfrmUDF_ImageCapture.WebButton2Click(Sender: TObject);\r\nbegin\r\n inherited;\r\n mImagelabel.Visible := true;\r\nend;\r\n\r\nprocedure TfrmUDF_ImageCapture.WebCamera1CameraDevicesInitialized(\r\n Sender: TObject);\r\nvar I: Integer; d: TCameraDevice;\r\nbegin //showmessage('1');\r\n\r\nfor I := 0 to WebCamera1.CameraDevices.Count - 1 do\r\nWebComboBox1.Items.Add(WebCamera1.CameraDevices.Items[I].Name);\r\n//showmessage('2');\r\n//If you want to select the first available device in the TWebComboBox, then:\r\nif (WebComboBox1.Items.Count <> 0) and\r\n ((dm.EGV_LOCALSTORAGE.Values['EGV_VIDEOSOURCE'] = '') or (dm.EGV_LOCALSTORAGE.Values['EGV_VIDEOSOURCE'] = 'STREAM'))\r\nthen begin\r\n WebComboBox1.ItemIndex := 0;\r\n //If you want to start the camera stream immediately\r\n //with the first selected device, then:\r\n d := WebCamera1.CameraDevices.GetDeviceByName(WebComboBox1.Items[0]); //showmessage(d.Name);\r\n WebCamera1.SetSelectedCameraDevice(d);\r\n WebCamera1.Start;\r\n end;\r\nif (dm.EGV_LOCALSTORAGE.Values['EGV_VIDEOSOURCE'] = 'FILE')\r\nthen begin\r\n Webcamera1.Stop;\r\n Webcamera1.Visible := false;\r\n WebMUltiMediaPlayer1.URL := EGV_IMAGESURL + '/' + dm.EGV_LOCALSTORAGE.Values['EGV_VIDEOSOURCEFILE'];\r\n WebMUltiMediaPlayer1.Visible := true\r\n end;\r\nbtnProcessClick(nil);\r\nend;\r\n\r\nprocedure TfrmUDF_ImageCapture.WebCamera1CameraStreamPlay(Sender: TObject;\r\n ACamera: TCameraDevice);\r\nvar JSONConstraints: TJSObject;\r\nbegin\r\n inherited;\r\n JSONConstraints := TJSObject.new;\r\n JSONConstraints.Properties['width'] := new(['ideal', 1920]);\r\n JSONConstraints.Properties['height'] := new(['ideal', 1080]);\r\n WebCamera1.ApplyConstraints(JSONConstraints);\r\nend;\r\n\r\nprocedure TfrmUDF_ImageCapture.WebComboBox1Change(Sender: TObject);\r\nvar d: TCameraDevice;\r\nbegin\r\nd := WebCamera1.CameraDevices.GetDeviceByName(WebComboBox1.Items[WebComboBox1.ItemIndex]);\r\nWebCamera1.SetSelectedCameraDevice(d);\r\nend;\r\n\r\nprocedure TfrmUDF_ImageCapture.WebFormCreate(Sender: TObject);\r\nbegin\r\n inherited;\r\nWebCamera1.Visible := true;\r\nWebMultiMediaPlayer1.Visible := false;\r\nWebCamera1.Align := alClient;\r\nWebMultiMediaPlayer1.Align := alClient;\r\nend;\r\n\r\nprocedure TfrmUDF_ImageCapture.WebFormResize(Sender: TObject);\r\nbegin\r\n inherited;\r\n//imgSelectedImage.Top := (((imgSelectedImage.Parent as TWebcontrol).height - imgSelectedImage.Height) div 2);\r\n//imgSelectedImage.left := (((imgSelectedImage.Parent as TWebcontrol).width - imgSelectedImage.width) div 2);\r\nend;\r\n\r\nprocedure TfrmUDF_ImageCapture.WebFormShow(Sender: TObject);\r\nvar\r\ni: integer;\r\nbtn: TButton;\r\nbegin\r\n\r\ninherited;\r\nif (uppercase(GetPreviousForm(1).Name) = 'UDF_PROCREPORT_EV') or (uppercase(GetPreviousForm(1).Name) = 'UDF_PROCREPORT_Q')\r\nthen mAI_Dictation.Text := (GetPreviousForm.FindComponent('SM1') as TMemo).Text;\r\nmAI_Dictation.SetFocus;\r\nMemoEndOfText(mAI_Dictation);\r\n\r\n//imagegrid.Options.itemtemplate := frmMain.mImageGridHTML_notselected.Text;\r\n\r\nfrmUDF_ImageCapture := self;\r\n//showmessage(frmUDF_ImageCapture.name);\r\n//from options\r\n//
\r\n\r\n\r\n// '
'\r\n{dm.xdsImages.Close;\r\nopendataset_j(dm.xdsImages,' select IMAGENUMBER, IMAGE, SEQUENCE, SELECTED, LABEL, COMMENTS ' +\r\n ' from imagesevault where procedurenumber = ' + EGV_CURRENT_PROCEDURENUMBER +\r\n ' order by SEQUENCE'); }\r\n//btn := TWebButton.Create('imgbtn');\r\n//btn.OnClick := btnTESTClick;\r\n\r\n// for i := 0 to 20 do\r\n// begin\r\n// imagegrid.Items.Add.HTML :=\r\n// '
' +\r\n// '
' +\r\n// '';\r\n//\r\n// btn := TWebButton.Create('btn'+i.ToString);\r\n// btn.Tag := i;\r\n// btn.OnClick := btnTESTClick;\r\n// end; }\r\nend;\r\n\r\nprocedure TfrmUDF_ImageCapture.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n btnCapture := TBitBtn.Create(Self);\r\n btnZoomIn := TBitBtn.Create(Self);\r\n btnZoomOut := TBitBtn.Create(Self);\r\n btnProcessing := TBitBtn.Create(Self);\r\n WebPanel1 := TPanel.Create(Self);\r\n WebComboBox1 := TComboBox.Create(Self);\r\n WebComboBox2 := TComboBox.Create(Self);\r\n WebPanel2 := TPanel.Create(Self);\r\n WebMemo1 := TMemo.Create(Self);\r\n pnlVideo := TPanel.Create(Self);\r\n imgZoomCaptured := TDBImageControl.Create(Self);\r\n WebMultimediaPlayer1 := TMultimediaPlayer.Create(Self);\r\n WebCamera1 := TCamera.Create(Self);\r\n f1 := TPanel.Create(Self);\r\n F2 := TPanel.Create(Self);\r\n F3 := TPanel.Create(Self);\r\n F4 := TPanel.Create(Self);\r\n F5 := TPanel.Create(Self);\r\n F6 := TPanel.Create(Self);\r\n F7 := TPanel.Create(Self);\r\n lblSize := TPanel.Create(Self);\r\n WebButton1 := TButton.Create(Self);\r\n mDictation := TMemo.Create(Self);\r\n mDictationTarget := TMemo.Create(Self);\r\n pnlImages := TPanel.Create(Self);\r\n mAI_Dictation := TMemo.Create(Self);\r\n ImageGrid := TDBResponsiveGrid.Create(Self);\r\n mImagelabel := TMemo.Create(Self);\r\n WebButton2 := TButton.Create(Self);\r\n pmImages := TPopupMenu.Create(Self);\r\n Delete1 := TMenuItem.Create(Self);\r\n Print1 := TMenuItem.Create(Self);\r\n\r\n pnlFormCaption.BeforeLoadDFMValues;\r\n pnlBottom.BeforeLoadDFMValues;\r\n pnlFormButtons.BeforeLoadDFMValues;\r\n btnCustom1.BeforeLoadDFMValues;\r\n btnCustom2.BeforeLoadDFMValues;\r\n btnCustom3.BeforeLoadDFMValues;\r\n btnCustom4.BeforeLoadDFMValues;\r\n btnCustom5.BeforeLoadDFMValues;\r\n btnClose.BeforeLoadDFMValues;\r\n btnCustom6.BeforeLoadDFMValues;\r\n btnCustom7.BeforeLoadDFMValues;\r\n btnCustom8.BeforeLoadDFMValues;\r\n btnCustom9.BeforeLoadDFMValues;\r\n btnCapture.BeforeLoadDFMValues;\r\n btnZoomIn.BeforeLoadDFMValues;\r\n btnZoomOut.BeforeLoadDFMValues;\r\n btnProcessing.BeforeLoadDFMValues;\r\n WebPanel1.BeforeLoadDFMValues;\r\n WebComboBox1.BeforeLoadDFMValues;\r\n WebComboBox2.BeforeLoadDFMValues;\r\n WebPanel2.BeforeLoadDFMValues;\r\n WebMemo1.BeforeLoadDFMValues;\r\n pnlVideo.BeforeLoadDFMValues;\r\n imgZoomCaptured.BeforeLoadDFMValues;\r\n WebMultimediaPlayer1.BeforeLoadDFMValues;\r\n WebCamera1.BeforeLoadDFMValues;\r\n f1.BeforeLoadDFMValues;\r\n F2.BeforeLoadDFMValues;\r\n F3.BeforeLoadDFMValues;\r\n F4.BeforeLoadDFMValues;\r\n F5.BeforeLoadDFMValues;\r\n F6.BeforeLoadDFMValues;\r\n F7.BeforeLoadDFMValues;\r\n lblSize.BeforeLoadDFMValues;\r\n WebButton1.BeforeLoadDFMValues;\r\n mDictation.BeforeLoadDFMValues;\r\n mDictationTarget.BeforeLoadDFMValues;\r\n pnlImages.BeforeLoadDFMValues;\r\n mAI_Dictation.BeforeLoadDFMValues;\r\n ImageGrid.BeforeLoadDFMValues;\r\n mImagelabel.BeforeLoadDFMValues;\r\n WebButton2.BeforeLoadDFMValues;\r\n pmImages.BeforeLoadDFMValues;\r\n Delete1.BeforeLoadDFMValues;\r\n Print1.BeforeLoadDFMValues;\r\n try\r\n Caption := 'Argus MedGPT';\r\n Color := clBlack;\r\n pnlFormCaption.Visible := False;\r\n pnlBottom.Top := 593;\r\n pnlBottom.Height := 30;\r\n pnlBottom.ElementClassName := '.transparent_panel { background-color: inherit}';\r\n pnlBottom.Visible := True;\r\n pnlFormButtons.Left := 224;\r\n pnlFormButtons.Width := 1125;\r\n pnlFormButtons.Height := 30;\r\n pnlFormButtons.ElementClassName := '.transparent_panel { background-color: inherit}';\r\n pnlFormButtons.Align := alClient;\r\n btnCustom1.Left := 405;\r\n btnCustom1.Height := 30;\r\n btnCustom2.Left := 435;\r\n btnCustom2.Height := 30;\r\n btnCustom3.Left := 465;\r\n btnCustom3.Height := 30;\r\n btnCustom4.Left := 495;\r\n btnCustom4.Height := 30;\r\n btnCustom5.Left := 525;\r\n btnCustom5.Height := 30;\r\n btnClose.Left := 1035;\r\n btnClose.Height := 30;\r\n btnClose.Caption := '';\r\n btnClose.MaterialGlyph := '';\r\n btnCustom6.Left := 555;\r\n btnCustom6.Height := 30;\r\n btnCustom7.Left := 585;\r\n btnCustom7.Height := 30;\r\n btnCustom8.Left := 615;\r\n btnCustom8.Height := 30;\r\n btnCustom9.Left := 645;\r\n btnCustom9.Height := 30;\r\n btnCapture.SetParentComponent(pnlFormButtons);\r\n btnCapture.Name := 'btnCapture';\r\n btnCapture.Left := 945;\r\n btnCapture.Top := 0;\r\n btnCapture.Width := 90;\r\n btnCapture.Height := 30;\r\n btnCapture.Cursor := crHandPoint;\r\n btnCapture.Hint := 'Capture';\r\n btnCapture.Align := alRight;\r\n btnCapture.Caption := '';\r\n btnCapture.Color := clNone;\r\n btnCapture.ElementClassName := 'btn_icon';\r\n btnCapture.Font.Charset := DEFAULT_CHARSET;\r\n btnCapture.Font.Color := clGray;\r\n btnCapture.Font.Height := -13;\r\n btnCapture.Font.Name := 'Tahoma';\r\n btnCapture.Font.Style := [];\r\n btnCapture.HeightPercent := 100.000000000000000000;\r\n btnCapture.MaterialGlyph := 'stop';\r\n btnCapture.MaterialGlyphSize := 1;\r\n btnCapture.ParentFont := False;\r\n btnCapture.TabOrder := 11;\r\n btnCapture.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnCapture, Self, 'OnClick', 'btnCaptureClick');\r\n btnZoomIn.SetParentComponent(pnlFormButtons);\r\n btnZoomIn.Name := 'btnZoomIn';\r\n btnZoomIn.Left := 765;\r\n btnZoomIn.Top := 0;\r\n btnZoomIn.Width := 90;\r\n btnZoomIn.Height := 30;\r\n btnZoomIn.Cursor := crHandPoint;\r\n btnZoomIn.Hint := 'Zoom-In';\r\n btnZoomIn.Align := alRight;\r\n btnZoomIn.Caption := '';\r\n btnZoomIn.Color := clNone;\r\n btnZoomIn.ElementClassName := 'btn_icon';\r\n btnZoomIn.Font.Charset := DEFAULT_CHARSET;\r\n btnZoomIn.Font.Color := clGray;\r\n btnZoomIn.Font.Height := -13;\r\n btnZoomIn.Font.Name := 'Tahoma';\r\n btnZoomIn.Font.Style := [];\r\n btnZoomIn.HeightPercent := 100.000000000000000000;\r\n btnZoomIn.MaterialGlyph := 'zoom_in';\r\n btnZoomIn.MaterialGlyphSize := 1;\r\n btnZoomIn.ParentFont := False;\r\n btnZoomIn.TabOrder := 11;\r\n btnZoomIn.Visible := False;\r\n btnZoomIn.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnZoomIn, Self, 'OnClick', 'btnZoomInClick');\r\n btnZoomOut.SetParentComponent(pnlFormButtons);\r\n btnZoomOut.Name := 'btnZoomOut';\r\n btnZoomOut.Left := 855;\r\n btnZoomOut.Top := 0;\r\n btnZoomOut.Width := 90;\r\n btnZoomOut.Height := 30;\r\n btnZoomOut.Cursor := crHandPoint;\r\n btnZoomOut.Hint := 'Zoom-out';\r\n btnZoomOut.Align := alRight;\r\n btnZoomOut.Caption := '';\r\n btnZoomOut.Color := clNone;\r\n btnZoomOut.ElementClassName := 'btn_icon';\r\n btnZoomOut.Font.Charset := DEFAULT_CHARSET;\r\n btnZoomOut.Font.Color := clGray;\r\n btnZoomOut.Font.Height := -13;\r\n btnZoomOut.Font.Name := 'Tahoma';\r\n btnZoomOut.Font.Style := [];\r\n btnZoomOut.HeightPercent := 100.000000000000000000;\r\n btnZoomOut.MaterialGlyph := 'zoom_out';\r\n btnZoomOut.MaterialGlyphSize := 1;\r\n btnZoomOut.ParentFont := False;\r\n btnZoomOut.TabOrder := 11;\r\n btnZoomOut.Visible := False;\r\n btnZoomOut.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnZoomOut, Self, 'OnClick', 'btnZoomOutClick');\r\n btnProcessing.SetParentComponent(pnlFormButtons);\r\n btnProcessing.Name := 'btnProcessing';\r\n btnProcessing.Left := 675;\r\n btnProcessing.Top := 0;\r\n btnProcessing.Width := 90;\r\n btnProcessing.Height := 30;\r\n btnProcessing.Cursor := crHandPoint;\r\n btnProcessing.Hint := 'Start Processing';\r\n btnProcessing.Align := alRight;\r\n btnProcessing.Caption := '';\r\n btnProcessing.Color := clNone;\r\n btnProcessing.ElementClassName := 'btn_icon';\r\n btnProcessing.Font.Charset := DEFAULT_CHARSET;\r\n btnProcessing.Font.Color := clGray;\r\n btnProcessing.Font.Height := -13;\r\n btnProcessing.Font.Name := 'Tahoma';\r\n btnProcessing.Font.Style := [];\r\n btnProcessing.HeightPercent := 100.000000000000000000;\r\n btnProcessing.MaterialGlyph := 'image_aspect_ratio';\r\n btnProcessing.MaterialGlyphSize := 1;\r\n btnProcessing.ParentFont := False;\r\n btnProcessing.TabOrder := 11;\r\n btnProcessing.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnProcessing, Self, 'OnClick', 'btnProcessClick');\r\n WebPanel1.SetParentComponent(pnlBottom);\r\n WebPanel1.Name := 'WebPanel1';\r\n WebPanel1.Left := 0;\r\n WebPanel1.Top := 0;\r\n WebPanel1.Width := 224;\r\n WebPanel1.Height := 30;\r\n WebPanel1.ElementClassName := '.transparent_panel { background-color: inherit}';\r\n WebPanel1.Align := alLeft;\r\n WebPanel1.BorderColor := clWhite;\r\n WebPanel1.BorderStyle := bsNone;\r\n WebPanel1.ChildOrder := 1;\r\n WebPanel1.Color := clWhite;\r\n WebPanel1.TabOrder := 1;\r\n WebPanel1.Visible := False;\r\n WebComboBox1.SetParentComponent(WebPanel1);\r\n WebComboBox1.Name := 'WebComboBox1';\r\n WebComboBox1.Left := 0;\r\n WebComboBox1.Top := 6;\r\n WebComboBox1.Width := 202;\r\n WebComboBox1.Height := 21;\r\n WebComboBox1.ElementClassName := 'box_bottomborder_font_normal';\r\n WebComboBox1.HeightPercent := 100.000000000000000000;\r\n WebComboBox1.Text := 'WebComboBox1';\r\n WebComboBox1.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebComboBox1, Self, 'OnChange', 'WebComboBox1Change');\r\n WebComboBox1.ItemIndex := -1;\r\n WebComboBox2.SetParentComponent(WebPanel1);\r\n WebComboBox2.Name := 'WebComboBox2';\r\n WebComboBox2.Left := 0;\r\n WebComboBox2.Top := 20;\r\n WebComboBox2.Width := 202;\r\n WebComboBox2.Height := 21;\r\n WebComboBox2.ElementClassName := 'box_bottomborder_font_normal';\r\n WebComboBox2.HeightPercent := 100.000000000000000000;\r\n WebComboBox2.Text := 'WebComboBox1';\r\n WebComboBox2.Visible := False;\r\n WebComboBox2.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebComboBox2, Self, 'OnChange', 'WebComboBox1Change');\r\n WebComboBox2.ItemIndex := -1;\r\n WebComboBox2.Items.BeginUpdate;\r\n try\r\n WebComboBox2.Items.Clear;\r\n WebComboBox2.Items.Add(' 640 x 480');\r\n WebComboBox2.Items.Add('1280 x 720');\r\n WebComboBox2.Items.Add('1920 x 1080');\r\n WebComboBox2.Items.Add('2560 x 1440');\r\n WebComboBox2.Items.Add('2048 x 1080');\r\n WebComboBox2.Items.Add('3840 x 2160');\r\n WebComboBox2.Items.Add('7680 x 4320');\r\n finally\r\n WebComboBox2.Items.EndUpdate;\r\n end;\r\n WebPanel2.SetParentComponent(Self);\r\n WebPanel2.Name := 'WebPanel2';\r\n WebPanel2.Left := 0;\r\n WebPanel2.Top := 25;\r\n WebPanel2.Width := 1349;\r\n WebPanel2.Height := 568;\r\n WebPanel2.Align := alClient;\r\n WebPanel2.BorderColor := clWhite;\r\n WebPanel2.BorderStyle := bsNone;\r\n WebPanel2.ChildOrder := 2;\r\n WebPanel2.Color := clWhite;\r\n WebPanel2.TabOrder := 2;\r\n WebMemo1.SetParentComponent(WebPanel2);\r\n WebMemo1.Name := 'WebMemo1';\r\n WebMemo1.Left := 1320;\r\n WebMemo1.Top := 0;\r\n WebMemo1.Width := 29;\r\n WebMemo1.Height := 510;\r\n WebMemo1.Align := alRight;\r\n WebMemo1.HeightPercent := 100.000000000000000000;\r\n WebMemo1.Lines.BeginUpdate;\r\n try\r\n WebMemo1.Lines.Clear;\r\n WebMemo1.Lines.Add('WebMemo1');\r\n finally\r\n WebMemo1.Lines.EndUpdate;\r\n end;\r\n WebMemo1.SelLength := 0;\r\n WebMemo1.SelStart := 0;\r\n WebMemo1.Visible := False;\r\n WebMemo1.WidthPercent := 100.000000000000000000;\r\n WebMemo1.WordWrap := False;\r\n pnlVideo.SetParentComponent(WebPanel2);\r\n pnlVideo.Name := 'pnlVideo';\r\n pnlVideo.Left := 0;\r\n pnlVideo.Top := 0;\r\n pnlVideo.Width := 1134;\r\n pnlVideo.Height := 510;\r\n pnlVideo.Align := alClient;\r\n pnlVideo.BorderColor := clWhite;\r\n pnlVideo.BorderStyle := bsNone;\r\n pnlVideo.ChildOrder := 3;\r\n pnlVideo.Color := clBlack;\r\n pnlVideo.TabOrder := 1;\r\n imgZoomCaptured.SetParentComponent(pnlVideo);\r\n imgZoomCaptured.Name := 'imgZoomCaptured';\r\n imgZoomCaptured.Left := 899;\r\n imgZoomCaptured.Top := 24;\r\n imgZoomCaptured.Width := 112;\r\n imgZoomCaptured.Height := 96;\r\n imgZoomCaptured.HeightPercent := 100.000000000000000000;\r\n imgZoomCaptured.WidthPercent := 100.000000000000000000;\r\n imgZoomCaptured.ChildOrder := 12;\r\n imgZoomCaptured.Visible := False;\r\n imgZoomCaptured.DataField := 'IMAGEBASE64_DATA';\r\n imgZoomCaptured.DataSource := DM.dsImages;\r\n WebMultimediaPlayer1.SetParentComponent(pnlVideo);\r\n WebMultimediaPlayer1.Name := 'WebMultimediaPlayer1';\r\n WebMultimediaPlayer1.Left := 649;\r\n WebMultimediaPlayer1.Top := 34;\r\n WebMultimediaPlayer1.Width := 234;\r\n WebMultimediaPlayer1.Height := 213;\r\n WebMultimediaPlayer1.AutoPlay := True;\r\n WebMultimediaPlayer1.Controls := True;\r\n WebMultimediaPlayer1.PlaybackRate := 1.000000000000000000;\r\n WebCamera1.SetParentComponent(pnlVideo);\r\n WebCamera1.Name := 'WebCamera1';\r\n WebCamera1.Left := 360;\r\n WebCamera1.Top := 30;\r\n WebCamera1.Width := 249;\r\n WebCamera1.Height := 213;\r\n WebCamera1.Margins.Left := 0;\r\n WebCamera1.Margins.Top := 0;\r\n WebCamera1.Margins.Right := 0;\r\n WebCamera1.Margins.Bottom := 0;\r\n WebCamera1.CameraType := ctSelected;\r\n WebCamera1.Visible := False;\r\n SetEvent(WebCamera1, Self, 'OnCameraDevicesInitialized', 'WebCamera1CameraDevicesInitialized');\r\n SetEvent(WebCamera1, Self, 'OnCameraStreamPlay', 'WebCamera1CameraStreamPlay');\r\n f1.SetParentComponent(pnlVideo);\r\n f1.Name := 'f1';\r\n f1.Left := 163;\r\n f1.Top := 24;\r\n f1.Width := 150;\r\n f1.Height := 60;\r\n f1.ElementClassName := 'imageant_box';\r\n f1.BorderColor := clRed;\r\n f1.BorderStyle := bsNone;\r\n f1.ChildOrder := 3;\r\n f1.Color := clSilver;\r\n f1.TabOrder := 1;\r\n f1.Visible := False;\r\n F2.SetParentComponent(pnlVideo);\r\n F2.Name := 'F2';\r\n F2.Left := 163;\r\n F2.Top := 90;\r\n F2.Width := 150;\r\n F2.Height := 60;\r\n F2.ElementClassName := 'imageant_box';\r\n F2.BorderColor := clBackground;\r\n F2.BorderStyle := bsNone;\r\n F2.ChildOrder := 3;\r\n F2.Color := clSilver;\r\n F2.TabOrder := 2;\r\n F2.Visible := False;\r\n F3.SetParentComponent(pnlVideo);\r\n F3.Name := 'F3';\r\n F3.Left := 163;\r\n F3.Top := 156;\r\n F3.Width := 150;\r\n F3.Height := 60;\r\n F3.ElementClassName := 'imageant_box';\r\n F3.BorderColor := clYellow;\r\n F3.BorderStyle := bsNone;\r\n F3.ChildOrder := 3;\r\n F3.Color := clSilver;\r\n F3.TabOrder := 3;\r\n F3.Visible := False;\r\n F4.SetParentComponent(pnlVideo);\r\n F4.Name := 'F4';\r\n F4.Left := 163;\r\n F4.Top := 222;\r\n F4.Width := 150;\r\n F4.Height := 60;\r\n F4.ElementClassName := 'imageant_box';\r\n F4.BorderColor := clYellow;\r\n F4.BorderStyle := bsNone;\r\n F4.ChildOrder := 3;\r\n F4.Color := clSilver;\r\n F4.TabOrder := 4;\r\n F4.Visible := False;\r\n F5.SetParentComponent(pnlVideo);\r\n F5.Name := 'F5';\r\n F5.Left := 163;\r\n F5.Top := 288;\r\n F5.Width := 150;\r\n F5.Height := 60;\r\n F5.ElementClassName := 'imageant_box';\r\n F5.BorderColor := clYellow;\r\n F5.BorderStyle := bsNone;\r\n F5.ChildOrder := 3;\r\n F5.Color := clSilver;\r\n F5.TabOrder := 5;\r\n F5.Visible := False;\r\n F6.SetParentComponent(pnlVideo);\r\n F6.Name := 'F6';\r\n F6.Left := 163;\r\n F6.Top := 354;\r\n F6.Width := 150;\r\n F6.Height := 60;\r\n F6.ElementClassName := 'imageant_box';\r\n F6.BorderColor := clYellow;\r\n F6.BorderStyle := bsNone;\r\n F6.ChildOrder := 3;\r\n F6.Color := clSilver;\r\n F6.TabOrder := 6;\r\n F6.Visible := False;\r\n F7.SetParentComponent(pnlVideo);\r\n F7.Name := 'F7';\r\n F7.Left := 163;\r\n F7.Top := 420;\r\n F7.Width := 150;\r\n F7.Height := 60;\r\n F7.ElementClassName := 'imageant_box';\r\n F7.BorderColor := clYellow;\r\n F7.BorderStyle := bsNone;\r\n F7.ChildOrder := 3;\r\n F7.Color := clSilver;\r\n F7.TabOrder := 7;\r\n F7.Visible := False;\r\n lblSize.SetParentComponent(pnlVideo);\r\n lblSize.Name := 'lblSize';\r\n lblSize.Left := 375;\r\n lblSize.Top := 6;\r\n lblSize.Width := 150;\r\n lblSize.Height := 21;\r\n lblSize.ElementClassName := 'detectedpolyp_size';\r\n lblSize.HeightStyle := ssAuto;\r\n lblSize.BorderColor := clRed;\r\n lblSize.BorderStyle := bsNone;\r\n lblSize.Caption := 'Polyp Size';\r\n lblSize.ChildOrder := 3;\r\n lblSize.Color := clSilver;\r\n lblSize.ElementFont := efCSS;\r\n lblSize.TabOrder := 9;\r\n lblSize.Visible := False;\r\n WebButton1.SetParentComponent(pnlVideo);\r\n WebButton1.Name := 'WebButton1';\r\n WebButton1.Left := 983;\r\n WebButton1.Top := 222;\r\n WebButton1.Width := 96;\r\n WebButton1.Height := 25;\r\n WebButton1.Caption := 'WebButton1';\r\n WebButton1.ChildOrder := 10;\r\n WebButton1.HeightPercent := 100.000000000000000000;\r\n WebButton1.Visible := False;\r\n WebButton1.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebButton1, Self, 'OnClick', 'WebButton1Click');\r\n mDictation.SetParentComponent(WebPanel2);\r\n mDictation.Name := 'mDictation';\r\n mDictation.Tag := -1;\r\n mDictation.Left := 0;\r\n mDictation.Top := 510;\r\n mDictation.Width := 1349;\r\n mDictation.Height := 58;\r\n mDictation.Align := alBottom;\r\n mDictation.BorderStyle := bsNone;\r\n mDictation.ElementClassName := 'block_memo';\r\n mDictation.HeightPercent := 100.000000000000000000;\r\n mDictation.ScrollBars := ssNone;\r\n mDictation.SelLength := 0;\r\n mDictation.SelStart := 0;\r\n mDictation.Visible := False;\r\n mDictation.WidthPercent := 100.000000000000000000;\r\n SetEvent(mDictation, Self, 'OnChange', 'mDictationChange');\r\n mDictationTarget.SetParentComponent(WebPanel2);\r\n mDictationTarget.Name := 'mDictationTarget';\r\n mDictationTarget.Left := 32;\r\n mDictationTarget.Top := 528;\r\n mDictationTarget.Width := 185;\r\n mDictationTarget.Height := 36;\r\n mDictationTarget.Color := clGray;\r\n mDictationTarget.HeightPercent := 100.000000000000000000;\r\n mDictationTarget.Lines.BeginUpdate;\r\n try\r\n mDictationTarget.Lines.Clear;\r\n mDictationTarget.Lines.Add('mDictationTarget');\r\n finally\r\n mDictationTarget.Lines.EndUpdate;\r\n end;\r\n mDictationTarget.SelLength := 0;\r\n mDictationTarget.SelStart := 0;\r\n mDictationTarget.Visible := False;\r\n mDictationTarget.WidthPercent := 100.000000000000000000;\r\n pnlImages.SetParentComponent(WebPanel2);\r\n pnlImages.Name := 'pnlImages';\r\n pnlImages.Left := 1134;\r\n pnlImages.Top := 0;\r\n pnlImages.Width := 186;\r\n pnlImages.Height := 510;\r\n pnlImages.Align := alRight;\r\n pnlImages.BorderColor := clWhite;\r\n pnlImages.BorderStyle := bsNone;\r\n pnlImages.ChildOrder := 5;\r\n pnlImages.Color := clWhite;\r\n pnlImages.TabOrder := 4;\r\n mAI_Dictation.SetParentComponent(pnlImages);\r\n mAI_Dictation.Name := 'mAI_Dictation';\r\n mAI_Dictation.Tag := -1;\r\n mAI_Dictation.AlignWithMargins := True;\r\n mAI_Dictation.Left := 10;\r\n mAI_Dictation.Top := 382;\r\n mAI_Dictation.Width := 166;\r\n mAI_Dictation.Height := 118;\r\n mAI_Dictation.Margins.Left := 10;\r\n mAI_Dictation.Margins.Top := 10;\r\n mAI_Dictation.Margins.Right := 10;\r\n mAI_Dictation.Margins.Bottom := 10;\r\n mAI_Dictation.Align := alBottom;\r\n mAI_Dictation.BorderStyle := bsNone;\r\n mAI_Dictation.ElementClassName := 'dictation_memo';\r\n mAI_Dictation.ElementFont := efCSS;\r\n mAI_Dictation.HeightPercent := 100.000000000000000000;\r\n mAI_Dictation.ScrollBars := ssVertical;\r\n mAI_Dictation.SelLength := 0;\r\n mAI_Dictation.SelStart := 0;\r\n mAI_Dictation.WidthPercent := 100.000000000000000000;\r\n ImageGrid.SetParentComponent(pnlImages);\r\n ImageGrid.Name := 'ImageGrid';\r\n ImageGrid.AlignWithMargins := True;\r\n ImageGrid.Left := 3;\r\n ImageGrid.Top := 96;\r\n ImageGrid.Width := 180;\r\n ImageGrid.Height := 273;\r\n ImageGrid.Align := alClient;\r\n ImageGrid.ChildOrder := 23;\r\n ImageGrid.ItemIndex := 0;\r\n ImageGrid.Options.ItemGap := 20;\r\n ImageGrid.Options.ItemHeight := 190;\r\n ImageGrid.Options.ItemSelectedBorderColor := clWhite;\r\n ImageGrid.Options.ItemTemplate := '
(%GILABELTEXT%) (%LABEL%)
\"Image\"
(%COMMENTS%)
';\r\n ImageGrid.Options.ItemWidthMin := 140;\r\n ImageGrid.PopupMenu := pmImages;\r\n SetEvent(ImageGrid, Self, 'OnClick', 'ImageGridClick');\r\n SetEvent(ImageGrid, Self, 'OnMouseMove', 'ImageGridMouseMove');\r\n SetEvent(ImageGrid, Self, 'OnItemCreated', 'ImageGridItemCreated');\r\n SetEvent(ImageGrid, Self, 'OnItemGetFieldValue', 'ImageGridItemGetFieldValue');\r\n SetEvent(ImageGrid, Self, 'OnItemClick', 'ImageGridItemClick');\r\n SetEvent(ImageGrid, Self, 'OnItemDblClick', 'ImageGridItemDblClick');\r\n ImageGrid.DataSource := DM.dsImages;\r\n mImagelabel.SetParentComponent(pnlImages);\r\n mImagelabel.Name := 'mImagelabel';\r\n mImagelabel.AlignWithMargins := True;\r\n mImagelabel.Left := 10;\r\n mImagelabel.Top := 10;\r\n mImagelabel.Width := 166;\r\n mImagelabel.Height := 73;\r\n mImagelabel.Margins.Left := 10;\r\n mImagelabel.Margins.Top := 10;\r\n mImagelabel.Margins.Right := 10;\r\n mImagelabel.Margins.Bottom := 10;\r\n mImagelabel.Align := alTop;\r\n mImagelabel.ElementClassName := 'image_label_memo';\r\n mImagelabel.ElementFont := efCSS;\r\n mImagelabel.HeightPercent := 100.000000000000000000;\r\n mImagelabel.ScrollBars := ssNone;\r\n mImagelabel.SelLength := 0;\r\n mImagelabel.SelStart := 0;\r\n mImagelabel.Visible := False;\r\n mImagelabel.WidthPercent := 100.000000000000000000;\r\n SetEvent(mImagelabel, Self, 'OnChange', 'mImagelabelChange');\r\n WebButton2.SetParentComponent(pnlImages);\r\n WebButton2.Name := 'WebButton2';\r\n WebButton2.Left := 40;\r\n WebButton2.Top := 408;\r\n WebButton2.Width := 96;\r\n WebButton2.Height := 25;\r\n WebButton2.Caption := 'WebButton2';\r\n WebButton2.ChildOrder := 3;\r\n WebButton2.HeightPercent := 100.000000000000000000;\r\n WebButton2.Visible := False;\r\n WebButton2.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebButton2, Self, 'OnClick', 'WebButton2Click');\r\n pmImages.SetParentComponent(Self);\r\n pmImages.Name := 'pmImages';\r\n pmImages.Appearance.HamburgerMenu.Caption := 'Menu';\r\n pmImages.Appearance.HoverColor := 14671839;\r\n pmImages.Appearance.SubmenuIndicator := '►';\r\n pmImages.ElementItemClassName := 'drop-label';\r\n pmImages.Font.Charset := DEFAULT_CHARSET;\r\n pmImages.Font.Color := clWindowText;\r\n pmImages.Font.Height := -11;\r\n pmImages.Font.Name := 'Tahoma';\r\n pmImages.Font.Style := [];\r\n pmImages.Left := 1032;\r\n pmImages.Top := 161;\r\n Delete1.SetParentComponent(pmImages);\r\n Delete1.Name := 'Delete1';\r\n Delete1.Caption := 'Delete';\r\n SetEvent(Delete1, Self, 'OnClick', 'Delete1Click');\r\n Print1.SetParentComponent(pmImages);\r\n Print1.Name := 'Print1';\r\n Print1.Caption := 'Print';\r\n SetEvent(Print1, Self, 'OnClick', 'Print1Click');\r\n finally\r\n pnlFormCaption.AfterLoadDFMValues;\r\n pnlBottom.AfterLoadDFMValues;\r\n pnlFormButtons.AfterLoadDFMValues;\r\n btnCustom1.AfterLoadDFMValues;\r\n btnCustom2.AfterLoadDFMValues;\r\n btnCustom3.AfterLoadDFMValues;\r\n btnCustom4.AfterLoadDFMValues;\r\n btnCustom5.AfterLoadDFMValues;\r\n btnClose.AfterLoadDFMValues;\r\n btnCustom6.AfterLoadDFMValues;\r\n btnCustom7.AfterLoadDFMValues;\r\n btnCustom8.AfterLoadDFMValues;\r\n btnCustom9.AfterLoadDFMValues;\r\n btnCapture.AfterLoadDFMValues;\r\n btnZoomIn.AfterLoadDFMValues;\r\n btnZoomOut.AfterLoadDFMValues;\r\n btnProcessing.AfterLoadDFMValues;\r\n WebPanel1.AfterLoadDFMValues;\r\n WebComboBox1.AfterLoadDFMValues;\r\n WebComboBox2.AfterLoadDFMValues;\r\n WebPanel2.AfterLoadDFMValues;\r\n WebMemo1.AfterLoadDFMValues;\r\n pnlVideo.AfterLoadDFMValues;\r\n imgZoomCaptured.AfterLoadDFMValues;\r\n WebMultimediaPlayer1.AfterLoadDFMValues;\r\n WebCamera1.AfterLoadDFMValues;\r\n f1.AfterLoadDFMValues;\r\n F2.AfterLoadDFMValues;\r\n F3.AfterLoadDFMValues;\r\n F4.AfterLoadDFMValues;\r\n F5.AfterLoadDFMValues;\r\n F6.AfterLoadDFMValues;\r\n F7.AfterLoadDFMValues;\r\n lblSize.AfterLoadDFMValues;\r\n WebButton1.AfterLoadDFMValues;\r\n mDictation.AfterLoadDFMValues;\r\n mDictationTarget.AfterLoadDFMValues;\r\n pnlImages.AfterLoadDFMValues;\r\n mAI_Dictation.AfterLoadDFMValues;\r\n ImageGrid.AfterLoadDFMValues;\r\n mImagelabel.AfterLoadDFMValues;\r\n WebButton2.AfterLoadDFMValues;\r\n pmImages.AfterLoadDFMValues;\r\n Delete1.AfterLoadDFMValues;\r\n Print1.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n\r\n","unit UDF_QAI;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,\r\n Vcl.Controls, Vcl.Forms, Vcl.Dialogs, EditForm_Base, VCL.TMSFNCTypes,\r\n VCL.TMSFNCUtils, VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes, WEBLib.ExtCtrls,\r\n WEBLib.WebCtrls, Vcl.Imaging.GIFImg, WEBLib.Controls, WEBLib.Dialogs,\r\n Vcl.Grids, WEBLib.DBCtrls, WEBLib.Buttons, Vcl.StdCtrls, WEBLib.StdCtrls,\r\n VCL.TMSFNCCustomControl, VCL.TMSFNCSwitch, JS, XData.Web.Client, Web, StrUtils,\r\n WEBLib.Lists, WEBLib.Grids, WEBLib.Actions, WEBLib.ComCtrls, WEBLib.Devices, Data.DB;\r\n\r\ntype\r\n TfrmUDF_QAI = class(TfrmEditForm_Base)\r\n tmQAI: TTimer;\r\n tmSendFileClick: TTimer;\r\n htmlTop: THTMLContainer;\r\n pnlQuestion: TPanel;\r\n WebButton1: TButton;\r\n pnlQAI_Question: TPanel;\r\n memQAI_Question: TMemo;\r\n cbSessions: TComboBox;\r\n pnlQAI_FormButtons: TPanel;\r\n WebButton2: TButton;\r\n pnlQuestionButtons: TPanel;\r\n btnClearQuestion: TBitBtn;\r\n btnStopResponse: TBitBtn;\r\n btnShowCurrentSessionInfo: TBitBtn;\r\n btnNewChat: TBitBtn;\r\n btnCloseForm: TBitBtn;\r\n btnSendFromDB: TBitBtn;\r\n WebLabel71: TLabel;\r\n WebLabel72: TLabel;\r\n btnSendFromEPIC: TBitBtn;\r\n btnSendFromCerner: TBitBtn;\r\n btnTransferFiles_bidding: TBitBtn;\r\n tmSendBiddingDocsClick: TTimer;\r\n btnCaptureImage: TBitBtn;\r\n btnZoomIn: TBitBtn;\r\n btnZoomOut: TBitBtn;\r\n WebProgressBar1: TProgressBar;\r\n ImageGrid: TDBResponsiveGrid;\r\n btnLoadImages: TBitBtn;\r\n pnlQAI_SidedataBottom: TPanel;\r\n WebLabel75: TLabel;\r\n btnMicStart: TBitBtn;\r\n btnTransferFiles: TBitBtn;\r\n btnSendQuestion: TBitBtn;\r\n pnlSideDataButtons: TPanel;\r\n WebBitBtn1: TBitBtn;\r\n WebBitBtn2: TBitBtn;\r\n btnAddToFavorites: TBitBtn;\r\n btnRequestFromKnowledgeBase: TBitBtn;\r\n btnSuggestedQuestions: TBitBtn;\r\n tmRequestFromKnowledgeBase: TTimer;\r\n\r\n procedure memQAI_QuestionEnter(Sender: TObject);\r\n procedure memQAI_QuestionExit(Sender: TObject);\r\n procedure btnSendFromDBClick(Sender: TObject);\r\n procedure RequestFromKnowledgeBase(Sender: TObject);\r\n procedure btnSendQuestionClick(Sender: TObject);\r\n procedure spSideDataSplitterMoved(Sender: TObject);\r\n procedure WebFormResize(Sender: TObject);\r\n procedure WebFormShow(Sender: TObject);\r\n procedure memQAI_QuestionMouseDown(Sender: TObject; Button: TMouseButton;\r\n Shift: TShiftState; X, Y: Integer);\r\n procedure memQAI_QuestionMouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure M21Change(Sender: TObject);\r\n procedure tmQAITimer(Sender: TObject);\r\n procedure _Block_MouseLeave(Sender: TObject);\r\n procedure btnClearQuestionClick(Sender: TObject);\r\n procedure btnTransferFilesClick(Sender: TObject);\r\n procedure tmSendFileClickTimer(Sender: TObject);\r\n procedure memQAI_QuestionKeyDown(Sender: TObject; var Key: Word;\r\n Shift: TShiftState);\r\n procedure memQAI_QuestionChange(Sender: TObject);\r\n procedure spSideDataVertMoved(Sender: TObject);\r\n procedure SG1DblClick(Sender: TObject);\r\n procedure ShowStartMessage(msg: string='');\r\n procedure WebButton1Click(Sender: TObject);\r\n procedure btnStopResponseClick(Sender: TObject);\r\n procedure cbSessionsExit(Sender: TObject);\r\n procedure cbSessionsEnter(Sender: TObject);\r\n procedure cbSessionsChange(Sender: TObject);\r\n procedure btnShowCurrentSessionInfoClick(Sender: TObject);\r\n procedure btnNewChatClick(Sender: TObject);\r\n procedure btnSendFromDBMouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure btnSendFromEPICClick(Sender: TObject);\r\n procedure btnSendFromCernerClick(Sender: TObject);\r\n\r\n procedure PositionProgressBar;\r\n procedure btnTransferFiles_biddingClick(Sender: TObject);\r\n procedure tmSendBiddingDocsClickTimer(Sender: TObject);\r\n procedure QuestionsShowHide(show_p: boolean=true);\r\n procedure WebFormClose(Sender: TObject; var Action: TCloseAction);\r\n\r\n procedure startdefaultsession;\r\n procedure btnCloseClick(Sender: TObject);\r\n procedure btnCaptureImageClick(Sender: TObject);\r\n procedure btnZoomInClick(Sender: TObject);\r\n procedure btnZoomOutClick(Sender: TObject);\r\n procedure btnLoadImagesClick(Sender: TObject);\r\n procedure SG2GetCellChildren(Sender: TObject; ACol, ARow: Integer;\r\n AField: TField; AValue: string; AElement: TJSHTMLElementRecord);\r\n procedure WebBitBtn1Click(Sender: TObject);\r\n procedure WebBitBtn2Click(Sender: TObject);\r\n procedure btnAddToFavoritesClick(Sender: TObject);\r\n procedure G1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);\r\n procedure _GridBlockTitle_MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure WebPanel14MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure _GridBlock_MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure btnRequestFromKnowledgeBaseClick(Sender: TObject);\r\n procedure btnSuggestedQuestionsClick(Sender: TObject);\r\n function SetBold(s: string): string;\r\n procedure tmRequestFromKnowledgeBaseTimer(Sender: TObject);\r\n\r\n private\r\n { Private declarations }\r\n FormIsActive_p: Boolean;\r\n HTML_Text: string;\r\n Bold_Pare: integer;\r\n // EPIC_DEFAULT_P_FHIRID: string;\r\n public\r\n { Public declarations }\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmUDF_QAI: TfrmUDF_QAI;\r\n message_p: string;\r\n color_p: string;\r\n HTML_p: string;\r\n icon_p: string;\r\n\r\nimplementation\r\n\r\nuses DATAMODULE, Main, common, QAI_FileUpload, UDF_ImageCapture;\r\n\r\n{$R *.dfm}\r\n\r\nprocedure TfrmUDF_QAI.btnCloseClick(Sender: TObject);\r\nbegin\r\n inherited;\r\n//showmessage(inttostr(pnlSidedata.Width));\r\n\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.btnLoadImagesClick(Sender: TObject);\r\nvar form_p: TForm;\r\n\r\n procedure Aftercreate(aForm: TObject);\r\n begin\r\n with ( aForm as TfrmQAI_FileUpload )\r\n do begin\r\n cbSubmitDefaults.Visible := false;\r\n pnlDBFieldSetupCaption.Caption := 'Collecting Images to upload';\r\n btnSubmit.Caption := 'Close';\r\n cbSubmitDefaults.Visible := false;\r\n tag := 1; // iages\r\n end;\r\n end;\r\n\r\nbegin\r\n inherited;\r\n dm.xdsImages.Close;\r\n dm.xdsImages.Open;\r\n imagegrid.Visible := true;\r\n btnZoomIn.Visible := true;\r\n btnZoomOut.Visible := true;\r\n if (btnRequestFromKnowledgeBase.Visible or btnSendFromDB.Visible or btnSendFromEPIC.Visible or btnSendFromCERNER.Visible or btnZoomIn.Visible)\r\n then pnlQuestionButtons.ElementClassName := 'qai_questionbuttons_panel_long';\r\n\r\n form_p := TfrmQAI_FileUpload.CreateNew(@AfterCreate);\r\n form_p.Popup := true;\r\n form_p.PopupOpacity := 0.1;\r\n form_p.Border := fbsingle;\r\n form_p.ShowModal;\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.btnNewChatClick(Sender: TObject);\r\nbegin\r\n inherited;\r\n BlockGetHTML(B2).HTML.Text := '';\r\n if btnRequestFromKnowledgeBase.Visible\r\n then RequestFromKnowledgeBase(btnRequestFromKnowledgeBase)\r\n else startdefaultsession; //ShowStartMessage;\r\n dm.xdsImages.Close;\r\n ImageGrid.visible := false;\r\n btnZoomIn.Visible := false;\r\n btnZoomOut.Visible := false;\r\n\r\n if (btnRequestFromKnowledgeBase.Visible or btnSendFromDB.Visible or btnSendFromEPIC.Visible or btnSendFromCERNER.Visible or btnZoomIn.Visible)\r\n then pnlQuestionButtons.ElementClassName := 'qai_questionbuttons_panel_long';\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.btnRequestFromKnowledgeBaseClick(Sender: TObject);\r\nvar s, sqlstr: string; sql_getanswer, sql_clearanswer: string; where_p: string; mode_p: string; i: integer;\r\n\r\n// -----------------------------------------------------------\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p: string; message_p: string; sections_p, progressfinished_p, progressvalue_p, ResultOK_p: string;\r\n begin\r\n\r\n WebProgressBar1.Max := 1000;\r\n //if WebProgressBar1.position = 0 then WebProgressBar1.position := 50;\r\n {ARGUS_KB_STATUS = 'OK' -> KB genarated\r\n ARGUS_KB_STATUS = 'ERROR_KB' -> Error on Q&A Server side\r\n ARGUS_KB_STATUS = 'WARN_NO_FILES' -> No files found in DB\r\n ARGUS_KB_STATUS = 'ERROR_EXCEPT' -> Exception on KB generation\r\n }\r\n\r\n frmmain.wmWaitMessage.hide;\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n //showmessage(response_p);\r\n if ((Response_p = 'GEN_KB') or (Response_p = ''))\r\n then begin\r\n //showmessage('checking the ARGUS_KB_STATUS field in patients table ...');\r\n if WebProgressBar1.position < 950\r\n then WebProgressBar1.position := WebProgressBar1.position + 1;\r\n s:= 'select ARGUS_KB_STATUS from patients where p_pid = ' + quotedstr(EGV_CURRENT_MRN);\r\n dm.XDataWebClient2.RawInvoke('IReportService.GetColumnData',[s , egv_facilityid, '0'], @OnResult);\r\n exit;\r\n end;\r\n //showmessage('ARGUS_KB_STATUS set to ; ' + Response_p );\r\n BlockGetHTML(B2).HTML.Text := HTML_Text;\r\n\r\n WebProgressBar1.Max := 100;\r\n WebProgressBar1.Position := 100;\r\n WebProgressBar1.Visible := false;\r\n\r\n if Response_p = 'OK' then RequestFromKnowledgeBase(nil);\r\n if Response_p = 'ERROR_KB' then message_p := 'Error at Q&A Server side';\r\n if Response_p = 'WARN_NO_FILES' then message_p := 'No files found in Database';\r\n if Response_p = 'ERROR_EXCEPT' then message_p := 'Error while generating the Knowledge Base';\r\n\r\n color_p := TColorToHex(EGV_QAI_SERVERMESSAGECOLOR); //'lightblue';\r\n icon_p := 'Argus Icon.ico';\r\n\r\n BlockGetHTML(B2).HTML.Text := HTML_Text;\r\n BlockGetHTML(B2).HTML.Text :=\r\n BlockGetHTML(B2).HTML.Text +\r\n stringreplace(stringreplace(stringreplace(HTML_p, '_icon_', icon_p, [rfReplaceAll]), '_message_', message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]);\r\n\r\n ELV_QAI_CURRENTSESSIONINFO := stringreplace(stringreplace(stringreplace(HTML_p, '_icon_',\r\n icon_p, [rfReplaceAll]), '_message_', 'Active Session: ' + message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]);\r\n\r\n // BlockGetMemo(BlockGetBlockByTitle('Message', SUBFORM_DIV)).Text := response_p;\r\n B2.height := BlockGetHTML(B2).height + 30;\r\n subform_div.ScrollTop := 10000;\r\n end;\r\n// ---------------------------------------------------------------\r\n\r\nbegin\r\n inherited;\r\n PositionProgressBar;\r\n\r\n WebProgressBar1.position := 0;\r\n WebProgressBar1.Visible := true;\r\n\r\n if (BlockGetHTML(B2).Tag = 0) or (pos(BlockGetHTML(B2).HTML.Text,'Upload data to create a knowledge base.') > 0)\r\n then begin //showmessage('1');\r\n BlockGetHTML(B2).HTML.Text := '';\r\n BlockGetHTML(B2).Tag := 1;\r\n end;\r\nsqlstr := 'update patients set ARGUS_KB_STATUS = ' + quotedstr('GEN_KB') + ' where p_pid = ' + quotedstr(EGV_CURRENT_MRN) ;\r\n\r\ndm.XDataWebClient2.RawInvoke('IReportService.ExecQuery',[sqlstr , egv_facilityid, '0'], @OnResult);\r\n\r\nBlockGetHTML(B2).HTML.Text := trim(BlockGetHTML(B2).HTML.Text);\r\nHTML_Text := BlockGetHTML(B2).HTML.Text;\r\n//showmessage('1 ' + HTML_Text);\r\nmessage_p := 'Collecting Data. Please wait ...';\r\ncolor_p := TColorToHex(EGV_QAI_WAITMESSAGECOLOR); //'silver';\r\nicon_p := 'Argus Icon.ico';\r\nBlockGetHTML(B2).HTML.Text :=\r\nBlockGetHTML(B2).HTML.Text +\r\nstringreplace(stringreplace(stringreplace(HTML_p, '_icon_', icon_p, [rfReplaceAll]), '_message_', message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]);\r\n\r\nB2.height := BlockGetHTML(B2).height + 30;\r\nsubform_div.ScrollTop := 10000;\r\n\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.btnSendFromCernerClick(Sender: TObject);\r\nvar s, s2, FileList_p: string; datasource_p: TDataSource; i, j: integer;\r\n // -----------------------------------------------------------\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p, message_p, sections_p, progressfinished_p, progressvalue_p, ResultOK_p: string; i: integer;\r\n Questions_p, Documents_p: string; //epicfilenames_p: string;\r\n begin\r\n frmmain.wmWaitMessage.hide;\r\n btnSendQuestion.Enabled := true;\r\n //btnSendQuestion.ElementClassName := 'btn_icon';\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n\r\n //showmessage(response_p);\r\n\r\n if trim(Response_p) <> ''\r\n then begin\r\n ELV_QAI_SESSIONID := trim(splitstring(Response_p, '~')[0]);\r\n sections_p := trim(splitstring(Response_p, '~')[1]);\r\n progressfinished_p := trim(splitstring(Response_p, '~')[2]);\r\n progressvalue_p := trim(splitstring(Response_p, '~')[3]);\r\n ResultOK_p := trim(splitstring(Response_p, '~')[4]);\r\n Questions_p := trim(splitstring(Response_p, '~')[5]);\r\n Documents_p := trim(splitstring(Response_p, '~')[6]);\r\n\r\n sections_p := 'Following sections were found:
' + sections_p;\r\n\r\n if trim(splitstring(Response_p, '~')[7]) <> ''\r\n then dm.EGV_SESSIONSTORAGE.values['EGV_QAI_CERNERTOKEN'] := trim(splitstring(Response_p, '~')[5]);\r\n\r\n if Questions_p <> ''\r\n then begin\r\n SG3.DataSource.DataSet.First;\r\n while not SG3.DataSource.DataSet.eof\r\n do SG3.DataSource.DataSet.Delete;\r\n for i := 0 to length(splitstring(Questions_p, ',')) - 1\r\n do begin\r\n SG3.DataSource.DataSet.insert;\r\n SG3.DataSource.DataSet.FieldByName('C1').AsString := splitstring(Questions_p, ',')[i];\r\n SG3.DataSource.DataSet.post;\r\n end;\r\n end;\r\n\r\n //Refresh/Redraw the grid;\r\n datasource_p := SG3.DataSource;\r\n SG3.DataSource := nil;\r\n SG3.DataSource := datasource_p;\r\n\r\n //showmessage('response: ' + dm.EGV_SESSIONSTORAGE.values['EGV_QAI_CERNERTOKEN']);\r\n\r\n // showmessage('CERNER Token: ' + CERNER_Token_p);\r\n WebProgressBar1.Position := strtoint(progressvalue_p);\r\n\r\n if (ResultOK_p='1') and (progressfinished_p = '0')\r\n then begin\r\n // showmessage('next');\r\n if EGV_FACILITYTOKEN = '' then s := EGV_FACILITY\r\n else s := EGV_FACILITY + ',' + EGV_FACILITYTOKEN;\r\n\r\n if EGV_QAI_DEFAULTFILESTOUPLOAD <> ''\r\n then dm.XDataWebClient1.RawInvoke('IReportService.QAI_UploadLocalFiles', ['', s, '', '0', ELV_QAI_SESSIONID, ''], @OnResult)\r\n else dm.XDataWebClient1.RawInvoke('IReportService.CERNER_UploadFiles', [EGV_CURRENT_MRN, s, ELV_PATIENTCERNERID, ELV_QAI_SESSIONID, dm.EGV_SESSIONSTORAGE.values['EGV_QAI_CERNERTOKEN']], @OnResult);\r\n EXIT;\r\n end;\r\n WebProgressBar1.Position := 100;\r\n WebProgressBar1.Visible := false;\r\n\r\n\r\n // save session details ( to show when session selected from 'recent session list'\r\n dm.EGV_SESSIONSTORAGE.values[ELV_QAI_SESSIONID] := sections_p;\r\n end\r\n else ELV_QAI_SESSIONID := '';\r\n\r\n if ELV_QAI_SESSIONID <> ''\r\n then begin\r\n // QuestionsShowHide(true);\r\n message_p := 'CERNER Files have been succsessfully submitted and assessed, data collected.' +\r\n ' You can ask any question you have.
' + sections_p;\r\n cbSessions.Items.Add(datetimetostr(now) + ' -CERNER- (' + ELV_QAI_SESSIONID +')'); // {+ 'Files [' + ELV_QAI_FILETOUPLOAD_LIST +']'});\r\n end\r\n else message_p := 'File submitting error / no files to submit. Returned Session ID is empty.
Error message: ' + sections_p;\r\n\r\n //' Session ID : ' + ELV_QAI_SESSIONID + '\r\n\r\n color_p := TColorToHex(EGV_QAI_SERVERMESSAGECOLOR); //'lightblue';\r\n icon_p := 'Argus Icon.ico';\r\n {'' +\r\n EGV_QAI_SERVERMESSAGEICON +\r\n ' Argus';\r\n }\r\n BlockGetHTML(B2).HTML.Text := HTML_Text;\r\n BlockGetHTML(B2).HTML.Text :=\r\n BlockGetHTML(B2).HTML.Text +\r\n stringreplace(stringreplace(stringreplace(HTML_p, '_icon_', icon_p, [rfReplaceAll]), '_message_', message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]);\r\n\r\n ELV_QAI_CURRENTSESSIONINFO := stringreplace(stringreplace(stringreplace(HTML_p, '_icon_',\r\n icon_p, [rfReplaceAll]), '_message_', 'Active Session: ' + message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]);\r\n\r\n // BlockGetMemo(BlockGetBlockByTitle('Message', SUBFORM_DIV)).Text := response_p;\r\n B2.height := BlockGetHTML(B2).height + 30;\r\n subform_div.ScrollTop := 10000;\r\n //showmessage('finish: ' + dm.EGV_SESSIONSTORAGE.values['EGV_QAI_CERNERTOKEN']);\r\n end;\r\n// ---------------------------------------------------------------\r\n\r\n\r\nbegin\r\n//showmessage('start: ' + dm.EGV_SESSIONSTORAGE.values['EGV_QAI_CERNERTOKEN']);\r\n inherited;\r\n QuestionsShowHide(false);\r\n btnSuggestedQuestionsClick(nil);\r\n\r\n // showmessage(sg3.DataSource.Name);\r\n\r\n PositionProgressBar;\r\n\r\n WebProgressBar1.position := 0;\r\n WebProgressBar1.Visible := true;\r\n\r\n if (BlockGetHTML(B2).Tag = 0) or (pos(BlockGetHTML(B2).HTML.Text,'Upload data to create a knowledge base.') > 0)\r\n then begin //showmessage('1');\r\n BlockGetHTML(B2).HTML.Text := '';\r\n BlockGetHTML(B2).Tag := 1;\r\n end;\r\n\r\nmessage_p := 'Submitting CERNER files for assessment. Please wait ...';\r\n color_p := TColorToHex(EGV_QAI_WAITMESSAGECOLOR); //'silver';\r\n icon_p := 'Argus Icon.ico';;\r\n\r\n //'\"Argus\"';\r\n\r\n {'' +\r\n EGV_QAI_WAITMESSAGEICON +\r\n ' Argus';\r\n }\r\n BlockGetHTML(B2).HTML.Text := trim(BlockGetHTML(B2).HTML.Text);\r\n HTML_Text := BlockGetHTML(B2).HTML.Text;\r\n BlockGetHTML(B2).HTML.Text :=\r\n BlockGetHTML(B2).HTML.Text +\r\n stringreplace(stringreplace(stringreplace(HTML_p, '_icon_', icon_p, [rfReplaceAll]), '_message_', message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]);\r\n B2.height := BlockGetHTML(B2).height + 30;\r\n subform_div.ScrollTop := 10000;\r\n\r\n//showmessage(EGV_QAI_DEFAULTFILESTOUPLOAD);\r\nif EGV_FACILITYTOKEN = '' then s := EGV_FACILITY\r\n else s := EGV_FACILITY + ',' + EGV_FACILITYTOKEN;\r\n\r\nif EGV_QAI_DEFAULTFILESTOUPLOAD <> ''\r\nthen begin\r\n // pick the file list for selected patient ELV_PATIENTCERNERID\r\n FileList_p := '';\r\n // showmessage(inttostr(length(splitstring(EGV_QAI_DEFAULTFILESTOUPLOAD,'|'))));\r\n if length(splitstring(EGV_QAI_DEFAULTFILESTOUPLOAD,'|')) <= 1\r\n then Filelist_p := EGV_QAI_DEFAULTFILESTOUPLOAD\r\n else begin\r\n for i:= 0 to length(splitstring(EGV_QAI_DEFAULTFILESTOUPLOAD,'|')) - 1\r\n do begin\r\n s2 := splitstring(EGV_QAI_DEFAULTFILESTOUPLOAD,'|')[i]; //showmessage(s2);\r\n if pos('@', s2) = 0 then continue;\r\n if ELV_PATIENTCERNERID = splitstring(s2,'@')[0]\r\n then begin\r\n Filelist_p := splitstring(s2,'@')[1];\r\n break;\r\n end;\r\n end;\r\n end;\r\n // showmessage( FileList_p );\r\n end\r\n else FileList_p := '';\r\nif FileList_p <> ''\r\nthen dm.XDataWebClient1.RawInvoke('IReportService.QAI_UploadLocalFiles', ['', s, '', '0', '', FileList_p], @OnResult)\r\nelse dm.XDataWebClient1.RawInvoke('IReportService.CERNER_UploadFiles', [EGV_CURRENT_MRN, s, ELV_PATIENTCERNERID, '', dm.EGV_SESSIONSTORAGE.values['EGV_QAI_CERNERTOKEN']], @OnResult);\r\n\r\n//dm.XDataWebClient1.RawInvoke('IReportService.CERNER_UploadFiles', [ELV_PATIENTCERNERID, '', dm.EGV_SESSIONSTORAGE.values['EGV_QAI_CERNERTOKEN']], @OnResult);\r\nend;\r\n\r\n\r\nprocedure TfrmUDF_QAI.btnSendFromDBClick(Sender: TObject);\r\nvar s, sqlstr: string; sql_getanswer, sql_clearanswer: string; where_p: string; mode_p: string;\r\n\r\n// -----------------------------------------------------------\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p: string; message_p: string; sections_p, progressfinished_p, progressvalue_p, ResultOK_p: string;\r\n Questions_p, Documents_p: string; i: integer;\r\n begin\r\n\r\n frmmain.wmWaitMessage.hide;\r\n btnSendQuestion.Enabled := true;\r\n //btnSendQuestion.ElementClassName := 'btn_icon';\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n\r\n // showmessage('response: ' + response_p);\r\n\r\n ELV_QAI_SESSIONID := trim(splitstring(Response_p, '~')[0]);\r\n sections_p := trim(splitstring(Response_p, '~')[1]);\r\n progressfinished_p := trim(splitstring(Response_p, '~')[2]);\r\n progressvalue_p := trim(splitstring(Response_p, '~')[3]);\r\n ResultOK_p := trim(splitstring(Response_p, '~')[4]);\r\n Questions_p := trim(splitstring(Response_p, '~')[5]);\r\n Documents_p := trim(splitstring(Response_p, '~')[6]);\r\n\r\n sections_p := 'Following sections were found:
' + sections_p;\r\n\r\n // Fill the suggested question grid\r\n //showmessage(Questions_p);\r\n if Questions_p <> ''\r\n then begin\r\n SG3.DataSource.DataSet.First;\r\n while not SG3.DataSource.DataSet.eof\r\n do SG3.DataSource.DataSet.Delete;\r\n for i := 0 to length(splitstring(Questions_p, ',')) - 1\r\n do begin\r\n SG3.DataSource.DataSet.insert;\r\n SG3.DataSource.DataSet.FieldByName('C1').AsString := splitstring(Questions_p, ',')[i];\r\n SG3.DataSource.DataSet.post;\r\n end;\r\n btnSuggestedQuestionsClick(nil);\r\n end;\r\n\r\n\r\n // showmessage('progress finished: ' + progressfinished_p);\r\n WebProgressBar1.Position := strtoint(progressvalue_p);\r\n\r\n if (ResultOK_p='1') and (progressfinished_p = '0')\r\n then begin\r\n if EGV_FACILITYTOKEN = '' then s := EGV_FACILITY\r\n else s := EGV_FACILITY + ',' + EGV_FACILITYTOKEN;\r\n // showmessage('next');\r\n dm.XDataWebClient1.RawInvoke('IReportService.QAI_SendFilesFromDB',\r\n [s, EGV_CURRENT_MRN,\r\n EGV_CURRENT_PATIENTNAME,\r\n egv_current_procedurenumber,\r\n EGV_CURRENT_APPTNAME,\r\n EGV_CURRENT_APPTDATE,\r\n egv_facilityid,\r\n sqlstr,\r\n mode_p, ELV_QAI_SESSIONID], @OnResult);\r\n EXIT;\r\n end;\r\n\r\n WebProgressBar1.Position := 100;\r\n WebProgressBar1.Visible := false;\r\n\r\n if ELV_QAI_SESSIONID <> ''\r\n then begin\r\n QuestionsShowHide(true);\r\n message_p := 'Data has been succsessfully collected for patient ' + EGV_CURRENT_PATIENTNAME +\r\n ' MRN: ' + EGV_CURRENT_MRN + '. You can ask any question you have.';\r\n cbSessions.Items.Add(datetimetostr(now) + ' -DB- ' + '(' + ELV_QAI_SESSIONID +')' + '- Patient: ' + EGV_CURRENT_PATIENTNAME);\r\n end\r\n else message_p := 'Data submitting error for MRN: ' + EGV_CURRENT_MRN + '. Returned Session ID is empty. Error message: ' + sections_p;\r\n color_p := TColorToHex(EGV_QAI_SERVERMESSAGECOLOR); //'lightblue';\r\n icon_p := 'Argus Icon.ico';\r\n\r\n //'\"Argus\"';\r\n\r\n {'' +\r\n EGV_QAI_SERVERMESSAGEICON +\r\n ' Argus';\r\n }\r\n //onclick=\"alert(' + quotedstr('1234567')+')\";\r\n BlockGetHTML(B2).HTML.Text := HTML_Text;\r\n BlockGetHTML(B2).HTML.Text :=\r\n BlockGetHTML(B2).HTML.Text +\r\n stringreplace(stringreplace(stringreplace(HTML_p, '_icon_', icon_p, [rfReplaceAll]), '_message_', message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]);\r\n\r\n ELV_QAI_CURRENTSESSIONINFO := stringreplace(stringreplace(stringreplace(HTML_p, '_icon_',\r\n icon_p, [rfReplaceAll]), '_message_', 'Active Session: ' + message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]);\r\n\r\n // BlockGetMemo(BlockGetBlockByTitle('Message', SUBFORM_DIV)).Text := response_p;\r\n B2.height := BlockGetHTML(B2).height + 30;\r\n subform_div.ScrollTop := 10000;\r\n end;\r\n// ---------------------------------------------------------------\r\n\r\nbegin\r\n inherited;\r\n btnSuggestedQuestionsClick(nil);\r\n PositionProgressBar;\r\n\r\n WebProgressBar1.position := 0;\r\n WebProgressBar1.Visible := true;\r\n\r\n if (BlockGetHTML(B2).Tag = 0) or (pos(BlockGetHTML(B2).HTML.Text,'Upload data to create a knowledge base.') > 0)\r\n then begin //showmessage('1');\r\n BlockGetHTML(B2).HTML.Text := '';\r\n BlockGetHTML(B2).Tag := 1;\r\n end;\r\n\r\nsqlstr := insertkeyvalues(dm.EGV_LOCALSTORAGE.Values['QAI_SELECT']);\r\nwhere_p := '';\r\nif trim(BlockGetMemo(SB1).Text) = 'Current'\r\nthen sqlstr := stringreplace(sqlstr, '/* */', ' and ID = ' + EGV_CURRENT_PROCEDURENUMBER, []);\r\n\r\nif trim(BlockGetMemo(SB1).Text) = 'Range'\r\nthen sqlstr := stringreplace(sqlstr, '/* */', ' and DATEOFPROCEDURE >= ' + quotedstr(formatdatetime('YYYY.MM.DD', strtodate(blockgetmemo(sb2).text) )) +\r\n ' and DATEOFPROCEDURE <= ' + quotedstr(formatdatetime('YYYY.MM.DD', strtodate(blockgetmemo(sb3).text) )), []);\r\n//showmessage(sqlstr);\r\nif BlockGetMemo(SB1).Text = 'Current' then mode_p := 'gaCurrent';\r\nif BlockGetMemo(SB1).Text = 'Range' then mode_p := 'gaDate';\r\nif BlockGetMemo(SB1).Text = 'All' then mode_p := 'gaMultiple';\r\n\r\n//BlockGetHTML(B2).HTML.text := sqlstr; exit;\r\n if EGV_FACILITYTOKEN = '' then s := EGV_FACILITY\r\n else s := EGV_FACILITY + ',' + EGV_FACILITYTOKEN;\r\ndm.XDataWebClient1.RawInvoke('IReportService.QAI_SendFilesFromDB',\r\n [s, EGV_CURRENT_MRN,\r\n EGV_CURRENT_PATIENTNAME,\r\n egv_current_procedurenumber,\r\n EGV_CURRENT_APPTNAME,\r\n EGV_CURRENT_APPTDATE,\r\n egv_facilityid,\r\n sqlstr,\r\n mode_p,''], @OnResult);\r\nBlockGetHTML(B2).HTML.Text := trim(BlockGetHTML(B2).HTML.Text);\r\nHTML_Text := BlockGetHTML(B2).HTML.Text;\r\n\r\nmessage_p := 'Collecting Data. Please wait ...';\r\ncolor_p := TColorToHex(EGV_QAI_WAITMESSAGECOLOR); //'silver';\r\nicon_p := 'Argus Icon.ico';\r\n\r\n{'' +\r\n EGV_QAI_WAITMESSAGEICON +\r\n ' Argus';\r\n}\r\nBlockGetHTML(B2).HTML.Text :=\r\nBlockGetHTML(B2).HTML.Text +\r\nstringreplace(stringreplace(stringreplace(HTML_p, '_icon_', icon_p, [rfReplaceAll]), '_message_', message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]);\r\n\r\nB2.height := BlockGetHTML(B2).height + 30;\r\nsubform_div.ScrollTop := 10000;\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.RequestFromKnowledgeBase(Sender: TObject);\r\nvar s, sqlstr: string; sql_getanswer, sql_clearanswer: string; where_p: string; mode_p: string;\r\n\r\n// -----------------------------------------------------------\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p, message_p, sections_p, progressfinished_p, progressvalue_p,\r\n ResultOK_p, Questions_p, Documents_p: string; i: integer; datasource_p: TDataSource;\r\n begin\r\n\r\n frmmain.wmWaitMessage.hide;\r\n btnSendQuestion.Enabled := true;\r\n //btnSendQuestion.ElementClassName := 'btn_icon';\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n\r\n //showmessage('response: ' + response_p);\r\n\r\n ELV_QAI_SESSIONID := trim(splitstring(Response_p, '~')[0]);\r\n sections_p := trim(splitstring(Response_p, '~')[1]);\r\n progressfinished_p := trim(splitstring(Response_p, '~')[2]);\r\n progressvalue_p := trim(splitstring(Response_p, '~')[3]);\r\n ResultOK_p := trim(splitstring(Response_p, '~')[4]);\r\n Questions_p := trim(splitstring(Response_p, '~')[5]);\r\n Documents_p := trim(splitstring(Response_p, '~')[6]);\r\n\r\n sections_p := 'Following sections were found:
' + sections_p;\r\n // Fill the suggested question grid\r\n //showmessage(Questions_p);\r\n if Questions_p <> ''\r\n then begin\r\n SG3.DataSource.DataSet.Open;\r\n SG3.DataSource.DataSet.First;\r\n while not SG3.DataSource.DataSet.eof\r\n do SG3.DataSource.DataSet.Delete;\r\n for i := 0 to length(splitstring(Questions_p, ',')) - 1\r\n do begin\r\n SG3.DataSource.DataSet.insert;\r\n SG3.DataSource.DataSet.FieldByName('C1').AsString := splitstring(Questions_p, ',')[i];\r\n SG3.DataSource.DataSet.post;\r\n end;\r\n datasource_p := SG3.DataSource;\r\n SG3.DataSource := nil;\r\n SG3.DataSource := datasource_p;\r\n btnSuggestedQuestionsClick(nil);\r\n // showmessage( inttostr(SG3.DataSource.DataSet.RecordCount));\r\n end;\r\n{ ****************************************\r\n if Questions_p <> ''\r\n then begin\r\n SG3.DataSource.DataSet.First;\r\n while not SG3.DataSource.DataSet.eof\r\n do SG3.DataSource.DataSet.Delete;\r\n for i := 0 to length(splitstring(Questions_p, ',')) - 1\r\n do begin\r\n SG3.DataSource.DataSet.insert;\r\n SG3.DataSource.DataSet.FieldByName('C1').AsString := splitstring(Questions_p, ',')[i];\r\n SG3.DataSource.DataSet.post;\r\n end;\r\n datasource_p := SG3.DataSource;\r\n SG3.DataSource := nil;\r\n SG3.DataSource := datasource_p;\r\n btnSuggestedQuestionsClick(nil);\r\n end;\r\n ***************************************** }\r\n // showmessage('progress finished: ' + progressfinished_p);\r\n //showmessage('ResultOK_p: ' + ResultOK_p);\r\n WebProgressBar1.Position := strtoint(progressvalue_p);\r\n\r\n if (ResultOK_p='1') and (progressfinished_p = '0')\r\n then begin\r\n // showmessage('next');\r\n if EGV_FACILITYTOKEN = '' then s := EGV_FACILITY\r\n else s := EGV_FACILITY + ',' + EGV_FACILITYTOKEN;\r\n\r\n dm.XDataWebClient1.RawInvoke('IReportService.QAI_RequestFromKnoledgeBase',\r\n [EGV_CURRENT_MRN,\r\n EGV_CURRENT_PATIENTNAME,\r\n egv_current_procedurenumber,\r\n EGV_CURRENT_APPTNAME,\r\n EGV_CURRENT_APPTDATE,\r\n s, // 'Gastro Associates of Rochester', //egv_facilityid,\r\n mode_p, ELV_QAI_SESSIONID], @OnResult);\r\n EXIT;\r\n end;\r\n\r\n WebProgressBar1.Position := 100;\r\n WebProgressBar1.Visible := false;\r\n\r\n if ELV_QAI_SESSIONID <> ''\r\n then begin\r\n // QuestionsShowHide(false);\r\n message_p := 'Data has been succsessfully collected for patient ' + EGV_CURRENT_PATIENTNAME +\r\n ' MRN: ' + EGV_CURRENT_MRN + '. You can ask any question you have.';\r\n cbSessions.Items.Add(datetimetostr(now) + ' -DB- ' + '(' + ELV_QAI_SESSIONID +')' + '- Patient: ' + EGV_CURRENT_PATIENTNAME);\r\n end\r\n else begin\r\n ShowStartMessage('Knowledge base is not available for the patient: ' +\r\n EGV_CURRENT_PATIENTNAME + '(MRN: ' + EGV_CURRENT_MRN + ')' + '. Upload data to create a knowledge base');\r\n //showmessage('session: ' + ELV_QAI_SESSIONID);\r\n exit;\r\n end;\r\n color_p := TColorToHex(EGV_QAI_SERVERMESSAGECOLOR); //'lightblue';\r\n icon_p := 'Argus Icon.ico';\r\n\r\n //'\"Argus\"';\r\n\r\n {'' +\r\n EGV_QAI_SERVERMESSAGEICON +\r\n ' Argus';\r\n }\r\n //onclick=\"alert(' + quotedstr('1234567')+')\";\r\n // showmessage(HTML_Text);\r\n BlockGetHTML(B2).HTML.Text := HTML_Text;\r\n BlockGetHTML(B2).HTML.Text :=\r\n BlockGetHTML(B2).HTML.Text +\r\n stringreplace(stringreplace(stringreplace(HTML_p, '_icon_', icon_p, [rfReplaceAll]), '_message_', message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]);\r\n\r\n ELV_QAI_CURRENTSESSIONINFO := stringreplace(stringreplace(stringreplace(HTML_p, '_icon_',\r\n icon_p, [rfReplaceAll]), '_message_', 'Active Session: ' + message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]);\r\n\r\n // BlockGetMemo(BlockGetBlockByTitle('Message', SUBFORM_DIV)).Text := response_p;\r\n B2.height := BlockGetHTML(B2).height + 30;\r\n subform_div.ScrollTop := 10000;\r\n // showmessage(BlockGetHTML(B2).HTML.Text);\r\n end;\r\n// ---------------------------------------------------------------\r\n\r\nbegin\r\n\r\n inherited;\r\n QuestionsShowHide(false);\r\n PositionProgressBar;\r\n btnSuggestedQuestionsClick(nil);\r\n\r\n WebProgressBar1.position := 0;\r\n WebProgressBar1.Visible := true;\r\n\r\n if (BlockGetHTML(B2).Tag = 0) or (pos(BlockGetHTML(B2).HTML.Text,'Upload data to create a knowledge base.') > 0)\r\n then begin //showmessage('1');\r\n BlockGetHTML(B2).HTML.Text := '';\r\n BlockGetHTML(B2).Tag := 1;\r\n end;\r\nsqlstr := '';\r\nmode_p := 'gaMultiple';\r\nif EGV_FACILITYTOKEN = '' then s := EGV_FACILITY\r\n else s := EGV_FACILITY + ',' + EGV_FACILITYTOKEN;\r\n//showmessage('facility: ' + s);\r\ndm.XDataWebClient1.RawInvoke('IReportService.QAI_RequestFromKnoledgeBase',\r\n [EGV_CURRENT_MRN,\r\n EGV_CURRENT_PATIENTNAME,\r\n egv_current_procedurenumber,\r\n EGV_CURRENT_APPTNAME,\r\n EGV_CURRENT_APPTDATE,\r\n s, //'Gastro Associates of Rochester'\r\n mode_p,''], @OnResult);\r\nBlockGetHTML(B2).HTML.Text := trim(BlockGetHTML(B2).HTML.Text);\r\nHTML_Text := BlockGetHTML(B2).HTML.Text;\r\n\r\n// showmessage('1' + HTML_Text);\r\n\r\nmessage_p := 'Collecting Data. Please wait ...';\r\ncolor_p := TColorToHex(EGV_QAI_WAITMESSAGECOLOR); //'silver';\r\nicon_p := 'Argus Icon.ico';\r\nBlockGetHTML(B2).HTML.Text :=\r\nBlockGetHTML(B2).HTML.Text +\r\nstringreplace(stringreplace(stringreplace(HTML_p, '_icon_', icon_p, [rfReplaceAll]), '_message_', message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]);\r\n\r\nB2.height := BlockGetHTML(B2).height + 30;\r\nsubform_div.ScrollTop := 10000;\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.btnSendFromDBMouseMove(Sender: TObject;\r\n Shift: TShiftState; X, Y: Integer);\r\nbegin\r\n inherited;\r\n if frmmain.clQuickPicklist.Visible then frmmain.btnCloseQuickPicklistClick(nil);\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.btnSendFromEPICClick(Sender: TObject);\r\nvar s: string;\r\n // -----------------------------------------------------------\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p, message_p, sections_p, progressfinished_p, progressvalue_p, ResultOK_p: string; //epicfilenames_p: string;\r\n Questions_p, Documents_p: string;i: integer; datasource_p: TDataSource;\r\n begin\r\n frmmain.wmWaitMessage.hide;\r\n btnSendQuestion.Enabled := true;\r\n //btnSendQuestion.ElementClassName := 'btn_icon';\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n\r\n //showmessage(response_p);\r\n ELV_QAI_SESSIONID := trim(splitstring(Response_p, '~')[0]);\r\n sections_p := trim(splitstring(Response_p, '~')[1]);\r\n progressfinished_p := trim(splitstring(Response_p, '~')[2]);\r\n progressvalue_p := trim(splitstring(Response_p, '~')[3]);\r\n ResultOK_p := trim(splitstring(Response_p, '~')[4]);\r\n Questions_p := trim(splitstring(Response_p, '~')[5]);\r\n Documents_p := trim(splitstring(Response_p, '~')[6]);\r\n\r\n sections_p := 'Following sections were found:
' + sections_p;\r\n\r\n // Fill the suggested question grid\r\n //showmessage(Questions_p);\r\n if Questions_p <> ''\r\n then begin\r\n SG3.DataSource.DataSet.First;\r\n while not SG3.DataSource.DataSet.eof\r\n do SG3.DataSource.DataSet.Delete;\r\n for i := 0 to length(splitstring(Questions_p, ',')) - 1\r\n do begin\r\n SG3.DataSource.DataSet.insert;\r\n SG3.DataSource.DataSet.FieldByName('C1').AsString := splitstring(Questions_p, ',')[i];\r\n SG3.DataSource.DataSet.post;\r\n end;\r\n btnSuggestedQuestionsClick(nil);\r\n end;\r\n\r\n //Refresh/Redraw the grid;\r\n datasource_p := SG3.DataSource;\r\n SG3.DataSource := nil;\r\n SG3.DataSource := datasource_p;\r\n\r\n WebProgressBar1.Position := strtoint(progressvalue_p);\r\n\r\n if (ResultOK_p='1') and (progressfinished_p = '0')\r\n then begin\r\n // showmessage('next');\r\n if EGV_FACILITYTOKEN = '' then s := EGV_FACILITY\r\n else s := EGV_FACILITY + ',' + EGV_FACILITYTOKEN;\r\n\r\n if EGV_QAI_DEFAULTFILESTOUPLOAD <> ''\r\n then dm.XDataWebClient1.RawInvoke('IReportService.QAI_UploadLocalFiles', ['', s, '', '0', ELV_QAI_SESSIONID, ''], @OnResult)\r\n else dm.XDataWebClient1.RawInvoke('IReportService.EPIC_UploadFiles', [EGV_CURRENT_MRN, s, EGV_PATIENTFHIRID, ELV_QAI_SESSIONID], @OnResult);\r\n // dm.XDataWebClient1.RawInvoke('IReportService.EPIC_UploadFiles', [EGV_PATIENTFHIRID, ELV_QAI_SESSIONID], @OnResult);\r\n EXIT;\r\n end;\r\n\r\n WebProgressBar1.Position := 100;\r\n WebProgressBar1.Visible := false;\r\n // save session details ( to show when session selected from 'recent session list'\r\n dm.EGV_SESSIONSTORAGE.values[ELV_QAI_SESSIONID] := sections_p;\r\n\r\n if ELV_QAI_SESSIONID <> ''\r\n then begin\r\n // QuestionsShowHide(true);\r\n message_p := 'EPIC Files have been succsessfully submitted and assessed, data collected.' +\r\n ' You can ask any question you have.
' + sections_p;\r\n cbSessions.Items.Add(datetimetostr(now) + ' -EPIC- (' + ELV_QAI_SESSIONID +')'); //' {+ 'Files [' + ELV_QAI_FILETOUPLOAD_LIST +']'});\r\n end\r\n else message_p := 'File submitting error. Returned Session ID is empty.
Error message: ' + sections_p;\r\n\r\n //' Session ID : ' + ELV_QAI_SESSIONID + '\r\n\r\n color_p := TColorToHex(EGV_QAI_SERVERMESSAGECOLOR); //'lightblue';\r\n icon_p := 'Argus Icon.ico';\r\n\r\n {'' +\r\n EGV_QAI_SERVERMESSAGEICON +\r\n ' Argus';\r\n }\r\n BlockGetHTML(B2).HTML.Text := HTML_Text;\r\n BlockGetHTML(B2).HTML.Text :=\r\n BlockGetHTML(B2).HTML.Text +\r\n stringreplace(stringreplace(stringreplace(HTML_p, '_icon_', icon_p, [rfReplaceAll]), '_message_', message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]);\r\n\r\n ELV_QAI_CURRENTSESSIONINFO := stringreplace(stringreplace(stringreplace(HTML_p, '_icon_',\r\n icon_p, [rfReplaceAll]), '_message_', 'Active Session: ' + message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]);\r\n\r\n // BlockGetMemo(BlockGetBlockByTitle('Message', SUBFORM_DIV)).Text := response_p;\r\n B2.height := BlockGetHTML(B2).height + 30;\r\n subform_div.ScrollTop := 10000;\r\n end;\r\n// ---------------------------------------------------------------\r\n\r\n\r\nbegin\r\n inherited;\r\n QuestionsShowHide(false);\r\n btnSuggestedQuestionsClick(nil);\r\n\r\n PositionProgressBar;\r\n\r\n WebProgressBar1.position := 0;\r\n WebProgressBar1.Visible := true;\r\n\r\n if (BlockGetHTML(B2).Tag = 0) or (pos(BlockGetHTML(B2).HTML.Text,'Upload data to create a knowledge base.') > 0)\r\n then begin //showmessage('1');\r\n BlockGetHTML(B2).HTML.Text := '';\r\n BlockGetHTML(B2).Tag := 1;\r\n end;\r\n message_p := 'Submitting EPIC files for assessment. Please wait ...';\r\n color_p := TColorToHex(EGV_QAI_WAITMESSAGECOLOR); //'silver';\r\n icon_p := 'Argus Icon.ico';\r\n\r\n {'' +\r\n EGV_QAI_WAITMESSAGEICON +\r\n ' Argus';\r\n }\r\n BlockGetHTML(B2).HTML.Text := trim(BlockGetHTML(B2).HTML.Text);\r\n HTML_Text := BlockGetHTML(B2).HTML.Text;\r\n BlockGetHTML(B2).HTML.Text :=\r\n BlockGetHTML(B2).HTML.Text +\r\n stringreplace(stringreplace(stringreplace(HTML_p, '_icon_', icon_p, [rfReplaceAll]), '_message_', message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]);\r\n B2.height := BlockGetHTML(B2).height + 30;\r\n subform_div.ScrollTop := 10000;\r\n\r\nif EGV_FACILITYTOKEN = '' then s := EGV_FACILITY\r\n else s := EGV_FACILITY + ',' + EGV_FACILITYTOKEN;\r\nif EGV_QAI_DEFAULTFILESTOUPLOAD <> ''\r\nthen dm.XDataWebClient1.RawInvoke('IReportService.QAI_UploadLocalFiles', ['', s, '', '0', '', EGV_QAI_DEFAULTFILESTOUPLOAD], @OnResult)\r\nelse dm.XDataWebClient1.RawInvoke('IReportService.EPIC_UploadFiles', [EGV_CURRENT_MRN, s, EGV_PATIENTFHIRID, ''], @OnResult);\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.btnTransferFilesClick(Sender: TObject);\r\nvar form_p: TForm; s: string;\r\n\r\n\r\n // -----------------------------------------------------------\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p, message_p, sections_p, progressfinished_p, ResultOK_p, Questions_p, Documents_p, progressvalue_p: string;\r\n i: integer; datasource_p: TDataSource;\r\n begin\r\n // showmessage('QAI_UploadLocalFiles - on result');\r\n frmmain.wmWaitMessage.hide;\r\n btnSendQuestion.Enabled := true;\r\n //btnSendQuestion.ElementClassName := 'btn_icon';\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n\r\n ELV_QAI_FILETOUPLOAD_BASE64 := '';\r\n\r\n // Progress bar loop\r\n ELV_QAI_SESSIONID := trim(splitstring(Response_p, '~')[0]);\r\n sections_p := trim(splitstring(Response_p, '~')[1]);\r\n progressfinished_p := trim(splitstring(Response_p, '~')[2]);\r\n progressvalue_p := trim(splitstring(Response_p, '~')[3]);\r\n ResultOK_p := trim(splitstring(Response_p, '~')[4]);\r\n Questions_p := trim(splitstring(Response_p, '~')[5]);\r\n Documents_p := trim(splitstring(Response_p, '~')[6]);\r\n\r\n sections_p := 'Following sections were found:
' + sections_p;\r\n\r\n// showmessage(Questions_p);\r\n\r\n if Questions_p <> ''\r\n then begin\r\n SG3.DataSource.DataSet.First;\r\n while not SG3.DataSource.DataSet.eof\r\n do SG3.DataSource.DataSet.Delete;\r\n for i := 0 to length(splitstring(Questions_p, ',')) - 1\r\n do begin\r\n // showmessage(splitstring(Questions_p, ',')[i]);\r\n\r\n SG3.DataSource.DataSet.insert;\r\n SG3.DataSource.DataSet.FieldByName('C1').AsString := splitstring(Questions_p, ',')[i];\r\n SG3.DataSource.DataSet.post;\r\n end;\r\n\r\n //Refresh/Redraw the grid;\r\n datasource_p := SG3.DataSource;\r\n SG3.DataSource := nil;\r\n SG3.DataSource := datasource_p;\r\n\r\n// showmessage(inttostr(SG3.DataSource.DataSet.RecordCount));\r\n\r\n btnSuggestedQuestionsClick(nil);\r\n end;\r\n\r\n // showmessage('progress finished: ' + progressfinished_p);\r\n\r\n WebProgressBar1.Position := strtoint(progressvalue_p);\r\n if (ResultOK_p='1') and (progressfinished_p = '0')\r\n then begin\r\n // showmessage('next');\r\n if EGV_FACILITYTOKEN = '' then s := EGV_FACILITY\r\n else s := EGV_FACILITY + ',' + EGV_FACILITYTOKEN;\r\n dm.XDataWebClient1.RawInvoke('IReportService.QAI_UploadLocalFiles',\r\n ['', s, '', '0', ELV_QAI_SESSIONID,''], @OnResult);\r\n EXIT;\r\n end;\r\n WebProgressBar1.Position := 100;\r\n WebProgressBar1.Visible := false;\r\n\r\n\r\n\r\n {sections_p := trim(copy(response_p, pos('-', response_p)+1, length(response_p)));\r\n Response_p := trim(copy(response_p, 1, pos('-', response_p)-1));\r\n ELV_QAI_SESSIONID := Response_p; }\r\n\r\n\r\n // save session details ( to show when session selected from 'recent session list'\r\n dm.EGV_SESSIONSTORAGE.values[ELV_QAI_SESSIONID] := sections_p;\r\n\r\n if ELV_QAI_SESSIONID <> ''\r\n then begin\r\n // QuestionsShowHide(true);\r\n message_p := 'Files [' + ELV_QAI_FILETOUPLOAD_LIST +'] have been succsessfully submitted and assessed, data collected.' +\r\n ' You can ask any question you have.
' + sections_p;\r\n cbSessions.Items.Add(datetimetostr(now) + ' -Local Files- ' + '(' + ELV_QAI_SESSIONID +')'); // {+ 'Files [' + ELV_QAI_FILETOUPLOAD_LIST +']'});\r\n end\r\n else message_p := 'File submitting error. Returned Session ID is empty.
Error message: ' + sections_p;\r\n\r\n //' Session ID : ' + ELV_QAI_SESSIONID + '\r\n\r\n color_p := TColorToHex(EGV_QAI_SERVERMESSAGECOLOR); //'lightblue';\r\n icon_p := 'Argus Icon.ico';\r\n\r\n {'' +\r\n EGV_QAI_SERVERMESSAGEICON +\r\n ' Argus';\r\n }\r\n BlockGetHTML(B2).HTML.Text := HTML_Text;\r\n BlockGetHTML(B2).HTML.Text :=\r\n BlockGetHTML(B2).HTML.Text +\r\n stringreplace(stringreplace(stringreplace(HTML_p, '_icon_', icon_p, [rfReplaceAll]), '_message_', message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]);\r\n\r\n ELV_QAI_CURRENTSESSIONINFO := stringreplace(stringreplace(stringreplace(HTML_p, '_icon_',\r\n icon_p, [rfReplaceAll]), '_message_', 'Active Session: ' + message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]);\r\n\r\n // BlockGetMemo(BlockGetBlockByTitle('Message', SUBFORM_DIV)).Text := response_p;\r\n B2.height := BlockGetHTML(B2).height + 30;\r\n subform_div.ScrollTop := 10000;\r\n ELV_QAI_FILETOUPLOAD_LIST := '';\r\n end;\r\n// ---------------------------------------------------------------\r\n\r\n procedure Aftercreate(aForm: TObject);\r\n begin\r\n with ( aForm as TfrmQAI_FileUpload )\r\n do begin\r\n cbSubmitDefaults.Visible := (EGV_QAI_DEFAULTFILESTOUPLOAD <> '');\r\n end;\r\n end;\r\n\r\nbegin\r\n inherited;\r\n QuestionsShowHide(false);\r\n PositionProgressBar;\r\n btnSuggestedQuestionsClick(nil);\r\n\r\n // showmessage(inttostr(BlockGetHTML(B2).Tag));\r\n if (BlockGetHTML(B2).Tag = 0) or (pos(BlockGetHTML(B2).HTML.Text,'Upload data to create a knowledge base.') > 0)\r\n then begin //showmessage('1');\r\n BlockGetHTML(B2).HTML.Text := '';\r\n BlockGetHTML(B2).Tag := 1;\r\n end;\r\n\r\n// showmessage(ELV_QAI_FILETOUPLOAD_BASE64);\r\nif ELV_QAI_FILETOUPLOAD_LIST = ''\r\nthen begin\r\n form_p := TfrmQAI_FileUpload.CreateNew(@AfterCreate);\r\n form_p.Popup := true;\r\n form_p.PopupOpacity := 0.1;\r\n form_p.Border := fbsingle;\r\n form_p.ShowModal;\r\n tmSendFileClick.Enabled := true;\r\n //showmessage('1');\r\n end\r\nelse begin\r\n if ELV_QAI_FILETOUPLOAD_LIST = 'Empty'\r\n then begin\r\n ELV_QAI_FILETOUPLOAD_LIST := '';\r\n exit;\r\n end;\r\n\r\n message_p := 'Submitting files for assessment [' + ELV_QAI_FILETOUPLOAD_LIST +'] Please wait ...';\r\n color_p := TColorToHex(EGV_QAI_WAITMESSAGECOLOR); //'silver';\r\n icon_p := 'Argus Icon.ico';\r\n\r\n {'' +\r\n EGV_QAI_WAITMESSAGEICON +\r\n ' Argus';\r\n }\r\n\r\n // showmessage(ELV_QAI_FILETOUPLOAD_BASE64);\r\n // showmessage(EGV_QAI_DEFAULTFILESTOUPLOAD);\r\n if ELV_QAI_FILETOUPLOAD_BASE64 <> '' then EGV_QAI_DEFAULTFILESTOUPLOAD := '';\r\n\r\n if EGV_FACILITYTOKEN = '' then s := EGV_FACILITY\r\n else s := EGV_FACILITY + ',' + EGV_FACILITYTOKEN;\r\n\r\n // showmessage('QAI_UploadLocalFiles - before');\r\n dm.XDataWebClient1.RawInvoke('IReportService.QAI_UploadLocalFiles',\r\n ['', s, ELV_QAI_FILETOUPLOAD_BASE64, '0', '', EGV_QAI_DEFAULTFILESTOUPLOAD], @OnResult);\r\n // showmessage('QAI_UploadLocalFiles - after');\r\n\r\n\r\n WebProgressBar1.position := 0;\r\n WebProgressBar1.Visible := true;\r\n\r\n BlockGetHTML(B2).HTML.Text := trim(BlockGetHTML(B2).HTML.Text);\r\n HTML_Text := BlockGetHTML(B2).HTML.Text;\r\n BlockGetHTML(B2).HTML.Text :=\r\n BlockGetHTML(B2).HTML.Text +\r\n stringreplace(stringreplace(stringreplace(HTML_p, '_icon_', icon_p, [rfReplaceAll]), '_message_', message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]);\r\n\r\n // showmessage(stringreplace(stringreplace(stringreplace(HTML_p, '_icon_', icon_p, [rfReplaceAll]), '_message_', message_p,[rfReplaceAll]),\r\n // '_color_', color_p, [rfReplaceAll]));\r\n\r\n B2.height := BlockGetHTML(B2).height + 30;\r\n subform_div.ScrollTop := 10000;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.btnTransferFiles_biddingClick(Sender: TObject);\r\nvar form_p: TForm; s: string;\r\n // -----------------------------------------------------------\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p, message_p: string; sections_p, progressfinished_p, ResultOK_p, progressvalue_p: string;\r\n Questions_p, Documents_p: string; i: integer;\r\n begin\r\n frmmain.wmWaitMessage.hide;\r\n btnSendQuestion.Enabled := true;\r\n //btnSendQuestion.ElementClassName := 'btn_icon';\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n\r\n //showmessage(Response_p);\r\n ELV_QAI_FILETOUPLOAD_BASE64 := '';\r\n // Progress bar loop\r\n ELV_QAI_SESSIONID := trim(splitstring(Response_p, '~')[0]);\r\n sections_p := trim(splitstring(Response_p, '~')[1]);\r\n progressfinished_p := trim(splitstring(Response_p, '~')[2]);\r\n progressvalue_p := trim(splitstring(Response_p, '~')[3]);\r\n ResultOK_p := trim(splitstring(Response_p, '~')[4]);\r\n Questions_p := trim(splitstring(Response_p, '~')[5]);\r\n Documents_p := trim(splitstring(Response_p, '~')[6]);\r\n\r\n sections_p := 'Following sections were found:
' + sections_p;\r\n\r\n if Questions_p <> ''\r\n then begin\r\n SG3.DataSource.DataSet.First;\r\n while not SG3.DataSource.DataSet.eof\r\n do SG3.DataSource.DataSet.Delete;\r\n for i := 0 to length(splitstring(Questions_p, ',')) - 1\r\n do begin\r\n SG3.DataSource.DataSet.insert;\r\n SG3.DataSource.DataSet.FieldByName('C1').AsString := splitstring(Questions_p, ',')[i];\r\n SG3.DataSource.DataSet.post;\r\n end;\r\n btnSuggestedQuestionsClick(nil);\r\n end;\r\n\r\n // showmessage('progress finished: ' + progressfinished_p);\r\n\r\n WebProgressBar1.Position := strtoint(progressvalue_p);\r\n if (ResultOK_p='1') and (progressfinished_p = '0')\r\n then begin\r\n // showmessage('next');\r\n if EGV_FACILITYTOKEN = '' then s := EGV_FACILITY\r\n else s := EGV_FACILITY + ',' + EGV_FACILITYTOKEN;\r\n dm.XDataWebClient1.RawInvoke('IReportService.QAI_UploadLocalFiles',['', s, '', '1', ELV_QAI_SESSIONID, ''], @OnResult);\r\n EXIT;\r\n end;\r\n WebProgressBar1.Position := 100;\r\n WebProgressBar1.Visible := false;\r\n\r\n\r\n\r\n //sections_p := trim(copy(response_p, pos('-', response_p)+1, length(response_p)));\r\n //ELV_QAI_SESSIONID := trim(copy(response_p, 1, pos('-', response_p)-1));\r\n\r\n // save session details ( to show when session selected from 'recent session list'\r\n dm.EGV_SESSIONSTORAGE.values[ELV_QAI_SESSIONID] := sections_p;\r\n\r\n if ELV_QAI_SESSIONID <> ''\r\n then begin\r\n message_p := 'Files [Bidding Documents] have been succsessfully submitted and assessed, data collected. '+\r\n 'You can ask any questions you have' ;\r\n cbSessions.Items.Add(datetimetostr(now) + ' -Bidding Documents- ' + '(' + ELV_QAI_SESSIONID + ')');\r\n end\r\n else message_p := 'File submitting error.
Error message: ' + sections_p;\r\n\r\n //' Session ID : ' + ELV_QAI_SESSIONID + '\r\n\r\n color_p := TColorToHex(EGV_QAI_SERVERMESSAGECOLOR); //'lightblue';\r\n icon_p := 'Argus Icon.ico';\r\n\r\n {'' +\r\n EGV_QAI_SERVERMESSAGEICON +\r\n ' Argus';\r\n }\r\n BlockGetHTML(B2).HTML.Text := HTML_Text;\r\n BlockGetHTML(B2).HTML.Text :=\r\n BlockGetHTML(B2).HTML.Text +\r\n stringreplace(stringreplace(stringreplace(HTML_p, '_icon_', icon_p, [rfReplaceAll]), '_message_', message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]);\r\n\r\n ELV_QAI_CURRENTSESSIONINFO := stringreplace(stringreplace(stringreplace(HTML_p, '_icon_',\r\n icon_p, [rfReplaceAll]), '_message_', 'Active Session: ' + message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]);\r\n\r\n // BlockGetMemo(BlockGetBlockByTitle('Message', SUBFORM_DIV)).Text := response_p;\r\n B2.height := BlockGetHTML(B2).height + 30;\r\n subform_div.ScrollTop := 10000;\r\n ELV_QAI_FILETOUPLOAD_LIST := '';\r\n end;\r\n// ---------------------------------------------------------------\r\n\r\n { procedure Aftercreate(aForm: TObject);\r\n begin\r\n with ( aForm as TfrmQAI_FileUpload )\r\n do begin\r\n cbSubmitDefaults.Checked := true;\r\n end;\r\n end; }\r\n\r\nbegin\r\n inherited;\r\n\r\n if EGV_QAI_DEFAULTBIDDINGDOCSTOUPLOAD = ''\r\n then begin\r\n exit;\r\n end;\r\n\r\n btnSuggestedQuestionsClick(nil);\r\n QuestionsShowHide(false);\r\n PositionProgressBar;\r\n\r\n // showmessage(inttostr(BlockGetHTML(B2).Tag));\r\n if (BlockGetHTML(B2).Tag = 0) or (pos(BlockGetHTML(B2).HTML.Text,'Upload data to create a knowledge base.') > 0)\r\n then begin //showmessage('1');\r\n BlockGetHTML(B2).HTML.Text := '';\r\n BlockGetHTML(B2).Tag := 1;\r\n end;\r\n\r\n// showmessage(ELV_QAI_FILETOUPLOAD_BASE64);\r\n{if ELV_QAI_FILETOUPLOAD_LIST = ''\r\nthen begin\r\n form_p := TfrmQAI_FileUpload.CreateNew(@AfterCreate);\r\n form_p.Popup := true;\r\n form_p.PopupOpacity := 0.1;\r\n form_p.Border := fbsingle;\r\n form_p.ShowModal;\r\n tmSendBiddingDocsClick.Enabled := true;\r\n //showmessage('1');\r\n end\r\nelse begin }\r\n\r\n\r\n message_p := 'Submitting files for assessment [Bidding Files] Please wait ...';\r\n color_p := TColorToHex(EGV_QAI_WAITMESSAGECOLOR); //'silver';\r\n icon_p := 'Argus Icon.ico';\r\n\r\n {'' +\r\n EGV_QAI_WAITMESSAGEICON +\r\n ' Argus';\r\n }\r\n // showmessage(EGV_QAI_DEFAULTBIDDINGDOCSTOUPLOAD);\r\n if EGV_FACILITYTOKEN = '' then s := EGV_FACILITY\r\n else s := EGV_FACILITY + ',' + EGV_FACILITYTOKEN;\r\n\r\n dm.XDataWebClient1.RawInvoke('IReportService.QAI_UploadLocalFiles',\r\n ['', s, ELV_QAI_FILETOUPLOAD_BASE64, '1', '', EGV_QAI_DEFAULTBIDDINGDOCSTOUPLOAD], @OnResult);\r\n\r\n WebProgressBar1.position := 0;\r\n WebProgressBar1.Visible := true;\r\n\r\n BlockGetHTML(B2).HTML.Text := trim(BlockGetHTML(B2).HTML.Text);\r\n HTML_Text := BlockGetHTML(B2).HTML.Text;\r\n BlockGetHTML(B2).HTML.Text :=\r\n BlockGetHTML(B2).HTML.Text +\r\n stringreplace(stringreplace(stringreplace(HTML_p, '_icon_', icon_p, [rfReplaceAll]), '_message_', message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]);\r\n\r\n // showmessage(stringreplace(stringreplace(stringreplace(HTML_p, '_icon_', icon_p, [rfReplaceAll]), '_message_', message_p,[rfReplaceAll]),\r\n // '_color_', color_p, [rfReplaceAll]));\r\n\r\n B2.height := BlockGetHTML(B2).height + 30;\r\n subform_div.ScrollTop := 10000;\r\n // end;\r\n\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.btnZoomInClick(Sender: TObject);\r\nbegin\r\n inherited;\r\nImageGrid.Height := ((ImageGrid.Height * 15) div 10);\r\nImageGrid.Options.ItemHeight := ImageGrid.Height - 25;\r\nImageGrid.Options.ItemWidthMin := ImageGrid.Options.ItemHeight;\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.btnZoomOutClick(Sender: TObject);\r\nbegin\r\n inherited;\r\nImageGrid.Height := ((ImageGrid.Height *10) div 15);\r\nif ImageGrid.Height < 125 then ImageGrid.Height := 125;\r\nImageGrid.Options.ItemHeight := ImageGrid.Height - 25;\r\nImageGrid.Options.ItemWidthMin := ImageGrid.Options.ItemHeight;\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.btnSendQuestionClick(Sender: TObject);\r\nvar s: string;\r\n\r\n procedure OnResult_RefreshHistory(Response: TXDataClientResponse);\r\n var Response_p: string;\r\n begin\r\n if (sg2.DataSource <> nil) and (sg2.DataSource.DataSet <> nil)\r\n then OpenDataSet_J(sg2.DataSource.DataSet, InsertKeyValues(dm.egv_localstorage.values['SG2' + '_SELECT_' + getcurrentformname]));\r\n end;\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p: string;\r\n begin\r\n response_p := string(TJSObject(Response.Result)['value']);\r\n\r\n //memQAI_Question.Text := '1'; //memQAI_Question.Text + chr(13) + datetimetostr(now);\r\n\r\n if btnStopResponse.Tag = 1\r\n then begin\r\n btnStopResponse.Tag := 0;\r\n Response_p := '
>>> Stopped by user.#end_of_answer';\r\n btnStopResponse.Visible := false;\r\n end;\r\n\r\n Response_p := stringreplace(Response_p, char(10), '
', [rfReplaceAll]);\r\n\r\n //showmessage(response_p);\r\n\r\n //string(TJSObject(Response.Result)['value']) + ' TEST
TEST2 ';\r\n\r\n if HTML_Text <> ''\r\n then BlockGetHTML(B2).HTML.Text := HTML_Text;\r\n HTML_Text := '';\r\n\r\n message_p := response_p + '...';\r\n //showmessage(EGV_QAI_ANSWERICONCOLOR);\r\n color_p := TColorToHex(EGV_QAI_ANSWERCOLOR); //'#FFFFD0';\r\n icon_p := 'Argus Icon.ico';\r\n\r\n {'' +\r\n EGV_QAI_ANSWERICON +\r\n ' Argus';\r\n }\r\n BlockGetHTML(BlockGetBlockByName('B2', SUBFORM_DIV)).HTML.Text := trim(BlockGetHTML(BlockGetBlockByName('B2', SUBFORM_DIV)).HTML.Text);\r\n if pos('...', BlockGetHTML(B2).HTML.Text) = 0\r\n then BlockGetHTML(B2).HTML.Text :=\r\n BlockGetHTML(B2).HTML.Text +\r\n stringreplace(stringreplace(stringreplace(HTML_p, '_icon_', icon_p, [rfReplaceAll]), '_message_', message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll])\r\n\r\n else if pos('#end_of_answer', response_p) = 0\r\n then BlockGetHTML(B2).HTML.Text := stringreplace(BlockGetHTML(B2).HTML.Text, '...', Response_p + '...',[])\r\n else begin\r\n BlockGetHTML(B2).HTML.Text := stringreplace(BlockGetHTML(B2).HTML.Text, '...', Response_p,[]);\r\n btnStopResponse.Tag := 0;\r\n btnStopResponse.Visible := false;\r\n end;\r\n BlockGetHTML(B2).HTML.Text := SetBold(stringreplace(BlockGetHTML(B2).HTML.Text, '....', '. ...',[]));\r\n\r\n // stretchmemo(BlockGetMemo(B2));\r\n B2.height := BlockGetHTML(B2).height + 30;\r\n subform_div.ScrollTop := 10000;\r\n\r\n //showmessage(BlockGetHTML(B2).HTML.Text);\r\n if EGV_FACILITYTOKEN = '' then s := EGV_FACILITY\r\n else s := EGV_FACILITY + ',' + EGV_FACILITYTOKEN;\r\n\r\n if pos('#end_of_answer', response_p) = 0\r\n then dm.XDataWebClient1.RawInvoke('IReportService.QAI_SendQuestion', [s, ELV_QAI_SESSIONID, '2', memQAI_Question.text], @OnResult)\r\n else begin\r\n BlockGetHTML(B2).HTML.Text := stringreplace(BlockGetHTML(B2).HTML.Text, '#end_of_answer', '' ,[]);\r\n BlockGetHTML(B2).HTML.Text := stringreplace(BlockGetHTML(B2).HTML.Text, '...', '' ,[rfReplaceAll]);\r\n end;\r\n end;\r\nbegin\r\n inherited;\r\n Bold_Pare := 0;\r\n if (BlockGetHTML(B2).Tag = 0) or (pos(BlockGetHTML(B2).HTML.Text,'Upload data to create a knowledge base.') > 0)\r\n then begin //showmessage('1');\r\n BlockGetHTML(B2).HTML.Text := '';\r\n BlockGetHTML(B2).Tag := 1;\r\n end;\r\n\r\nif (trim(memQAI_Question.text) = '') or (trim(memQAI_Question.text) = 'Type your question here')\r\nthen exit;\r\n\r\n// showmessage(BlockGetHTML(BlockGetBlockByName('B2', SUBFORM_DIV)).HTML.Text);\r\n message_p := memQAI_Question.text;\r\n color_p := TColorToHex(EGV_QAI_QUESTIONCOLOR); //'#AAFFDF';\r\n\r\n// icon_p := 'question_answer ';\r\n\r\n{ icon_p := '' +\r\n EGV_QAI_QUESTIONICON +\r\n ' You';\r\n}\r\n icon_p := 'MedGPT Person Icon.ico';\r\n\r\n //'\"Argus\"';\r\n\r\n // icon_p := '';\r\n\r\n BlockGetHTML(BlockGetBlockByName('B2', SUBFORM_DIV)).HTML.Text := trim(BlockGetHTML(BlockGetBlockByName('B2', SUBFORM_DIV)).HTML.Text);\r\n BlockGetHTML(BlockGetBlockByName('B2', SUBFORM_DIV)).HTML.Text :=\r\n BlockGetHTML(BlockGetBlockByName('B2', SUBFORM_DIV)).HTML.Text +\r\n stringreplace(stringreplace(stringreplace(HTML_p, '_icon_', icon_p, [rfReplaceAll]), '_message_', message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]);\r\n\r\n BlockGetHTML(B2).HTML.Text := trim(BlockGetHTML(B2).HTML.Text);\r\n HTML_Text := BlockGetHTML(B2).HTML.Text;\r\n\r\n message_p := 'Working on the request. Please wait ...';\r\n color_p := TColorToHex(EGV_QAI_WAITMESSAGECOLOR); //'silver';\r\n icon_p := 'Argus Icon.ico';\r\n {'' +\r\n EGV_QAI_WAITMESSAGEICON +\r\n ' Argus';\r\n }\r\n BlockGetHTML(B2).HTML.Text :=\r\n BlockGetHTML(B2).HTML.Text +\r\n stringreplace(stringreplace(stringreplace(HTML_p, '_icon_', icon_p, [rfReplaceAll]), '_message_', message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]);\r\n // stretchmemo(BlockGetMemo(B2));\r\n B2.height := BlockGetHTML(B2).height + 30;\r\n subform_div.ScrollTop := 10000;\r\n\r\n // Send\r\n if EGV_FACILITYTOKEN = '' then s := EGV_FACILITY\r\n else s := EGV_FACILITY + ',' + EGV_FACILITYTOKEN;\r\n dm.XDataWebClient1.RawInvoke('IReportService.QAI_SendQuestion', [s, ELV_QAI_SESSIONID, '1', memQAI_Question.text], @OnResult);\r\n btnStopResponse.Visible := true;\r\n\r\n // Add to history\r\n s := 'insert into MEDGPT_QHISTORY (Q_TEXT, Q_DATETIME, FACILITYID, USERID) values(' +\r\n quotedstr(memQAI_Question.text) + ', ' +\r\n quotedstr(formatdatetime('yyy.mm.dd hh:nn:ss:zzz', now)) + ', ' +\r\n EGV_FACILITYID + ', ' +\r\n quotedstr(EGV_USERNAME) + ')';\r\n\r\n // showmessage(s);\r\n dm.XDataWebClient1.RawInvoke('IReportService.ExecQuery',[s, egv_facilityid, '1'], @OnResult_RefreshHistory);\r\n\r\n btnClearQuestionClick(nil);\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.btnStopResponseClick(Sender: TObject);\r\nbegin\r\n inherited;\r\nbtnStopResponse.Tag := 1; // stop receiving responses\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.btnSuggestedQuestionsClick(Sender: TObject);\r\nvar s1,s2,s3, s4: string;\r\nbegin\r\n inherited;\r\nsb101.Visible := false;\r\nsb102.Visible := false;\r\nsb103.Visible := true;\r\nif sg3.DataSource = nil\r\nthen DBF_GetPostFieldData(sb103, 0, nil, s1, s2, s3, s4);\r\nForm_AdjustGrids(self, BlockGetGrid(sb103));\r\n\r\nResizeFormBlocks((self.FindComponent('sbSideData') as TScrollBox), 1, false);\r\nbtnAddToFavorites.Visible := false;\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.cbSessionsChange(Sender: TObject);\r\nbegin\r\n inherited;\r\nif trim(cbSessions.Text) = ''\r\nthen cbSessions.text := '';\r\nif (cbSessions.text <> 'Select from recent Session list')\r\nthen begin\r\n // showmessage(cbSessions.text);\r\n // cbSessions.ElementClassName := 'box_bottomborder_font_xxxbig';\r\n if (pos('DEFAULT SESSION', uppercase(cbSessions.text)) = 0)\r\n then QuestionsShowHide(true);\r\n\r\n if (BlockGetHTML(B2).Tag = 0)\r\n then begin //showmessage('1');\r\n // BlockGetHTML(B2).HTML.Text := '';\r\n BlockGetHTML(B2).Tag := 1;\r\n end;\r\n\r\n\r\n ELV_QAI_SESSIONID := copy(cbSessions.text,1,pos(')', cbsessions.text) - 1);\r\n ELV_QAI_SESSIONID := copy(ELV_QAI_SESSIONID, pos('(', ELV_QAI_SESSIONID) + 1, length(ELV_QAI_SESSIONID));\r\n // showmessage(ELV_QAI_SESSIONID);\r\n if ELV_QAI_SESSIONID <> ''\r\n then message_p := 'Session selected: ' + cbSessions.text + '
' + dm.EGV_SESSIONSTORAGE.values[ELV_QAI_SESSIONID];\r\n\r\n color_p := TColorToHex(EGV_QAI_SERVERMESSAGECOLOR); //'lightblue';\r\n icon_p := 'Argus Icon.ico';\r\n\r\n {'' +\r\n EGV_QAI_SERVERMESSAGEICON +\r\n ' Argus';\r\n }\r\n BlockGetHTML(B2).HTML.Text :=\r\n BlockGetHTML(B2).HTML.Text +\r\n stringreplace(stringreplace(stringreplace(HTML_p, '_icon_', icon_p, [rfReplaceAll]), '_message_', message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]);\r\n\r\n // showmessage(BlockGetHTML(B2).HTML.Text);\r\n\r\n ELV_QAI_CURRENTSESSIONINFO := stringreplace(stringreplace(stringreplace(HTML_p, '_icon_',\r\n icon_p, [rfReplaceAll]), '_message_', 'Active Session: ' + message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]);\r\n\r\n B2.height := BlockGetHTML(B2).height + 30;\r\n subform_div.ScrollTop := 10000;\r\n end;\r\n{if (pos('BIDDING DOCUMENTS', uppercase(cbSessions.text)) > 0) or (pos('DEFAULT SESSION', uppercase(cbSessions.text)) > 0)\r\nthen QuestionsShowHide(false); }\r\n\r\ncbSessions.itemindex := 0;\r\ncbSessions.ElementClassName := 'qai_sessionlist';\r\nmemQAI_Question.SetFocus;\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.cbSessionsEnter(Sender: TObject);\r\nbegin\r\n inherited;\r\nif cbSessions.Text = 'Select from recent Session list'\r\nthen cbSessions.ItemIndex := -1;\r\ncbSessions.ElementClassName := 'qai_sessionlist_focused';\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.cbSessionsExit(Sender: TObject);\r\nbegin\r\n inherited;\r\nif cbSessions.Text = ''\r\nthen cbSessions.ItemIndex := 0;\r\ncbSessions.ElementClassName := 'qai_sessionlist';\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.G1MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\nbegin\r\n inherited;\r\nif uppercase((sender as TDBGrid).name) = 'SG1'\r\nthen begin\r\n frmmain.btnAddRecord.visible := false;;\r\n frmmain.btnDeleteRecord.visible := false;;\r\n frmmain.btnBlockGridPost.visible := false;;\r\n end;\r\nif uppercase((sender as TDBGrid).name) = 'SG2'\r\nthen begin\r\n frmmain.btnAddRecord.visible := false;;\r\n frmmain.btnDeleteRecord.visible := true;;\r\n frmmain.btnBlockGridPost.visible := false;;\r\n end;\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.M21Change(Sender: TObject);\r\nbegin\r\n inherited;\r\nshowmessage('1');\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.memQAI_QuestionChange(Sender: TObject);\r\nbegin\r\n inherited;\r\nif trim(memQAI_Question.Text) = ''\r\nthen memQAI_Question.text := '';\r\nif (sender as TMemo).Text = 'Type your question here'\r\nthen begin\r\n (sender as TMemo).Text := '';\r\n (sender as TMemo).ElementClassName := 'qai_question_memo_focused';\r\n end;\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.memQAI_QuestionEnter(Sender: TObject);\r\nbegin\r\n inherited;\r\nif (sender as TMemo).Text = 'Type your question here'\r\nthen begin\r\n (sender as TMemo).Text := '';\r\n (sender as TMemo).ElementClassName := 'qai_question_memo_focused';\r\n end;\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.memQAI_QuestionExit(Sender: TObject);\r\nbegin\r\n inherited;\r\nif (sender as TMemo).Text = ''\r\nthen begin\r\n (sender as TMemo).Text := 'Type your question here';\r\n (sender as TMemo).ElementClassName := 'qai_question_memo';\r\n end;\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.memQAI_QuestionKeyDown(Sender: TObject; var Key: Word;\r\n Shift: TShiftState);\r\nbegin\r\n inherited;\r\nif (Key = VK_RETURN) then begin\r\n btnSendQuestion.SetFocus;\r\n btnSendQuestionClick(btnSendQuestion);\r\n end;\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.memQAI_QuestionMouseDown(Sender: TObject;\r\n Button: TMouseButton; Shift: TShiftState; X, Y: Integer);\r\nbegin\r\n inherited;\r\nif frmmain.clQuickPicklist.visible then frmmain.btnCloseQuickPickListClick(nil);\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.memQAI_QuestionMouseMove(Sender: TObject;\r\n Shift: TShiftState; X, Y: Integer);\r\nbegin\r\n inherited;\r\nif frmmain.clQuickPicklist.visible then frmmain.btnCloseQuickPickListClick(nil);\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.SG1DblClick(Sender: TObject);\r\nbegin\r\n inherited;\r\nmemQAI_Question.Text := (sender as TDBGrid).DataSource.DataSet.FieldByName('C1').AsString;\r\nbtnSendQuestionClick(btnSendQuestion);\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.SG2GetCellChildren(Sender: TObject; ACol, ARow: Integer;\r\n AField: TField; AValue: string; AElement: TJSHTMLElementRecord);\r\nbegin\r\n inherited;\r\n if (ARow > 0 ) and assigned(AField) and {(AField.FieldName = 'C1') and }\r\n ((Avalue = 'Today') or (Avalue = 'Yesterday') or (Avalue = 'This week') or (Avalue = 'This month') or (trim(Avalue) = ''))\r\n then begin\r\n //showmessage(AField.Name);\r\n //if Avalue = 'Finished' then AElement.element.style.setProperty('background-color', '#9ACD32');//'#00B74A');\r\n //if Avalue = 'Scheduled' then AElement.element.style.setProperty('background-color', '#39C0ED');\r\n //if Avalue = 'Cancelled' then AElement.element.style.setProperty('background-color', '#D3D3D3');//'Gray');\r\n AElement.element.style.setProperty('color', '#56AFCB');\r\n AElement.element.style.setProperty('background-color', 'white');\r\n AElement.element.style.setProperty('text-align', 'center');\r\n end;\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.spSideDataSplitterMoved(Sender: TObject);\r\nbegin\r\ndm.EGV_LOCALSTORAGE.Values['EGV_SIDEDATAWIDTH_' + getcurrentformname] := inttostr(pnlSideData.Width);\r\ndm.EGV_LOCALSTORAGE.Values['EGV_SUBFORM_DIVWIDTH_' + getcurrentformname] := inttostr(pnlSUBFORM_DIV.Width);\r\nWebFormResize(self);\r\n//inherited;\r\n\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.spSideDataVertMoved(Sender: TObject);\r\nbegin\r\n inherited;\r\ndm.EGV_LOCALSTORAGE.Values['EGV_SIDEDATAHEIGHT_' + getcurrentformname] := inttostr(sbSideData.Height);\r\nWebFormResize(self);\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.tmQAITimer(Sender: TObject);\r\nbegin\r\n inherited; // showmessage('1');\r\nif not frmmain.clQuickPicklist.Visible\r\nthen begin\r\n tmQAI.Enabled := false;\r\n if blockgetmemo(SB4).tag = 1\r\n then begin\r\n memQAI_Question.Text := blockgetmemo(SB4).Text;\r\n memQAI_Question.ElementClassName := 'qai_question_memo_focused';\r\n btnSendQuestionclick(btnSendQuestion);\r\n end;\r\n blockgetmemo(SB4).tag := 0;\r\n end;\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.tmRequestFromKnowledgeBaseTimer(Sender: TObject);\r\nbegin\r\n inherited;\r\ntmRequestFromKnowledgeBase.Enabled := false;\r\nif uppercase(copy(EGV_CALLERID,1,4)) = 'EPIC'\r\nthen begin\r\n //EGV_PATIENTFHIRID := 'erXuFYUfucBZaryVksYEcMg3'; // get FHIRID from URL\r\n btnSendFromEPIC.Visible := ((EGV_PATIENTFHIRID <> '') and (dm.EGV_LOCALSTORAGE.Values['EGV_EPIC'] = '1'));\r\n btnSendFromEPICClick(nil);\r\n end\r\nelse if uppercase(copy(EGV_CALLERID,1,5)) = 'CERNER'\r\n then begin\r\n btnSendFromCERNER.Visible := ((ELV_PATIENTCERNERID <> '') and (dm.EGV_LOCALSTORAGE.Values['EGV_CERNER'] = '1'));\r\n btnSendFromCERNERClick(nil);\r\n end\r\n else if btnRequestFromKnowledgeBase.Visible\r\n then RequestFromKnowledgeBase(nil)\r\n else startdefaultsession; //ShowStartMessage;\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.tmSendBiddingDocsClickTimer(Sender: TObject);\r\nbegin\r\n inherited;\r\nif ELV_QAI_FILETOUPLOAD_LIST <> ''\r\nthen begin\r\n //showmessage('1');\r\n tmSendBiddingDocsClick.Enabled := false;\r\n btnTransferFiles_BiddingClick(nil);\r\n end;\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.tmSendFileClickTimer(Sender: TObject);\r\nbegin\r\n inherited;\r\nif ELV_QAI_FILETOUPLOAD_LIST <> ''\r\nthen begin\r\n tmSendFileClick.Enabled := false;\r\n btnTransferFilesClick(nil);\r\n end;\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.btnAddToFavoritesClick(Sender: TObject);\r\nvar s: string;\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p: string;\r\n begin\r\n //Showmessage('Item has been added to the Favorite List');\r\n end;\r\n\r\nbegin\r\n inherited;\r\n s :=\r\n' declare @nextid varchar(32); ' +\r\n' declare @nextidentname varchar(32); ' +\r\n' declare @identname varchar(32); ' +\r\n' select @nextid = cast(substring(max(ident_name),18,5) as int) + 1, ' +\r\n' @identname = max(ident_name) ' +\r\n' \t from ini_ident where section_name = ' + quotedstr('QAI_FAVQUESTIONS') + ' and facilityid = 1; '+\r\n\r\n' set @nextidentname = ' +\r\nquotedstr('QAI_FAVQUESTIONS_') +\r\n' + RIGHT(REPLICATE(' +\r\nquotedstr('0') +\r\n',5)+@nextid,5);' +\r\n\r\n' insert into ini_ident(userid,section_name,ident_name, ident_value,facilityid,visible) ' +\r\n' select top 1 userid,section_name, @nextidentname, ' +\r\nquotedstr(SG2.datasource.dataset.fieldbyname('C2').AsString) +\r\n', facilityid,1 ' +\r\n' from ini_ident where section_name = ' + quotedstr('QAI_FAVQUESTIONS') + ' and facilityid = 1; ' ;\r\n\r\n//showmessage(s);\r\ndm.XDataWebClient1.RawInvoke('IReportService.ExecQuery',[s, egv_facilityid, '1'], @OnResult);\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.btnCaptureImageClick(Sender: TObject);\r\nvar containername_p, Buttonname_p, Formtocall_p, APIcall_p: string;\r\nbegin\r\ndm.xdsImages.Close;\r\ndm.xdsImages.Open;\r\nimagegrid.Visible := true;\r\nbtnZoomIn.Visible := true;\r\nbtnZoomOut.Visible := true;\r\nif (btnRequestFromKnowledgeBase.Visible or btnSendFromDB.Visible or btnSendFromEPIC.Visible or btnSendFromCERNER.Visible or btnZoomIn.Visible)\r\nthen pnlQuestionButtons.ElementClassName := 'qai_questionbuttons_panel_long';\r\n\r\nButtonName_p := uppercase('BUTTON' + StringReplace((Sender as TBitBtn).name, 'btnCustom','', []));\r\nEGV_CURRENTFORMNAME := dm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform()-1)];\r\nFormtocall_p := 'UDF_IMAGECAPTURE'; //dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_' + ButtonName_p + '_FORM'];\r\nAPIcall_p := ''; //dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_' + Buttonname_p + '_API'];\r\n\r\n//showmessage('current form name: ' + EGV_CURRENTFORMNAME);\r\ndm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform())] := Formtocall_p;\r\nEGV_CURRENTFORMNAME := dm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform())];\r\n// dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + Buttonname_p +'_FORM'];\r\n\r\nif Formtocall_p <> ''\r\nthen containername_p := getformcontainer().name;\r\n\r\n//showmessage(dm.egv_localstorage.values[uppercase(EGV_CURRENTFORMNAME) + '_BUTTON1_API']);\r\nCallFormPrepare(containername_p, 0, APIcall_p);\r\n\r\n//Application.CreateForm(Tfrmudf_ImageCapture, frmudf_ImageCapture);\r\n\r\n\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.btnClearQuestionClick(Sender: TObject);\r\nbegin\r\n inherited;\r\nmemQAI_Question.Text := 'Type your question here';\r\nmemQAI_Question.ElementClassName := 'qai_question_memo';\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.btnShowCurrentSessionInfoClick(Sender: TObject);\r\nbegin\r\n inherited;\r\nif ELV_QAI_SESSIONID <> ''\r\nthen begin\r\n BlockGetHTML(B2).HTML.Text :=\r\n BlockGetHTML(B2).HTML.Text + ELV_QAI_CURRENTSESSIONINFO;\r\n B2.height := BlockGetHTML(B2).height + 30;\r\n subform_div.ScrollTop := 10000;\r\n end;\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.WebBitBtn1Click(Sender: TObject);\r\nvar s1,s2,s3, s4: string;\r\nbegin\r\n inherited;\r\nsb101.Visible := true; DBF_GetPostFieldData(sb101, 0, nil, s1, s2, s3, s4);\r\n Form_AdjustGrids(self, BlockGetGrid(sb101));\r\nsb102.Visible := false;\r\nsb103.Visible := false;\r\nResizeFormBlocks((self.FindComponent('sbSideData') as TScrollBox), 1, false);\r\nbtnAddToFavorites.Visible := false;\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.WebBitBtn2Click(Sender: TObject);\r\nvar s1,s2,s3, s4: string;\r\nbegin\r\n inherited;\r\nsb101.Visible := false;\r\nsb102.Visible := true; DBF_GetPostFieldData(sb102, 0, nil, s1, s2, s3, s4);\r\n Form_AdjustGrids(self, BlockGetGrid(sb102));\r\nsb103.Visible := false;\r\nResizeFormBlocks((self.FindComponent('sbSideData') as TScrollBox), 1, false);\r\nbtnAddToFavorites.Visible := true;\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.WebButton1Click(Sender: TObject);\r\nbegin\r\n inherited;\r\n showmessage('clicked');\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.WebFormClose(Sender: TObject; var Action: TCloseAction);\r\nbegin\r\n inherited;\r\n\r\n if cbSessions <> nil\r\n then ELV_QAI_SESSIONSLIST := cbSessions.Items.CommaText;\r\nif EGV_CALLERID <> ''\r\nthen begin\r\n EGV_CALLERID := '';\r\n EGV_PATIENTFHIRID := '';\r\n EGV_CURRENT_PATIENTNAME := '';\r\n EGV_CURRENT_PATIENTDOB := '';\r\n end;\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.WebFormResize(Sender: TObject);\r\nvar width_p: integer;\r\nbegin\r\n//showmessage(inttostr(sbsidedata.width));\r\n{if (sender as twebform).width >= 700\r\nthen begin\r\n frmmain.B4.visible := true;\r\n frmmain.pnlLogo.visible := false; }\r\n if dm.EGV_LOCALSTORAGE.Values['EGV_SIDEDATAWIDTH_' + getcurrentformname]<> ''\r\n then pnlSUBFORM_DIV.Width := (sender as Tform).width -\r\n strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_SIDEDATAWIDTH_' + getcurrentformname]) -\r\n spSidedataSplitter.Width\r\n else pnlSUBFORM_DIV.Width := (sender as Tform).width - pnlSideData.Width - spSidedataSplitter.Width;\r\n if pnlsidedata.width < 0 then pnlSUBFORM_DIV.Width := pnlSUBFORM_DIV.Width + pnlsidedata.width;\r\n{ end\r\nelse begin\r\n pnlSUBFORM_DIV.Width := (sender as twebform).width - spSidedataSplitter.Width;\r\n frmmain.B4.visible := false;\r\n frmmain.pnlLogo.visible := true;\r\n end; }\r\n\r\n//showmessage(inttostr(subform_div.width));\r\n//pnlQAI_Question.Left := 50 + (subform_div.width DIV 100) * 15;\r\n\r\n{pnlQAI_Question.top := 0;\r\npnlQAI_Question.Height := pnlQuestion.Height - cbSessions.Height;\r\npnlQAI_Question.left := b2.left;\r\npnlQAI_Question.width := b2.width; //pnlSUBFORM_DIV.Width - btnClearQuestion.width - btnSendQuestion.width - btnStopResponse.width;\r\nmemQAI_Question.Left := cbSessions.Left; }\r\n\r\ninherited;\r\nPositionProgressBar;\r\nB2.height := BlockGetHTML(B2).height + 30;\r\nsubform_div.ScrollTop := 10000;\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.WebFormShow(Sender: TObject);\r\nvar i: integer; block_id: string;\r\nbegin // showmessage('1. - '+inttostr(pnlSideData.width));\r\n\r\ninherited;\r\n//showmessage('2. - '+inttostr(pnlSideData.width));\r\nfor i := 1 to length(splitstring(ELV_QAI_SESSIONSLIST,',')) - 1\r\ndo cbSessions.items.Add(splitstring(ELV_QAI_SESSIONSLIST,',')[i]);\r\n\r\nbtnTransferFiles_bidding.visible := (EGV_QAI_BIDDINGDOCS = '1');\r\nbtnTransferFiles.Visible := (EGV_SCREENSIZE <> 'S');\r\n//make epic/cerner buttons visible/invisible based on facility setting\r\n// ...\r\n//\r\n\r\n//EPIC_DEFAULT_P_FHIRID := 'erXuFYUfucBZaryVksYEcMg3';\r\n\r\n//if EGV_CALLERID = '' then ShowStartMessage;\r\n\r\n//htmlTop.HTML.Text := InsertKeyValues(htmlTop.HTML.Text);\r\n\r\n // \r\nHTML_p :=\r\n'' +\r\n'' +\r\n'' +\r\n'
\"Argus\"
' +\r\n'
_message_
' +\r\n'

' +\r\n'' +\r\n' ';\r\n\r\n{\r\n' ' +\r\n'

' +\r\n'\"Argus\"' +\r\n'

' +\r\n' _message_ ' +\r\n'

' +\r\n'
' +\r\n' ' +\r\n' ' ; }\r\n\r\n//\r\n//\r\n//\r\n//\r\n//
_Icon_
\r\n//
_Message_.
\r\n//\r\n//\r\n\r\n\r\n//FormIsActive_p := true;\r\n//showmessage('1173: ' + inttostr(pnlsidedata.width));\r\n\r\nif dm.EGV_LOCALSTORAGE.Values['EGV_SIDEDATAWIDTH_' + getcurrentformname]<> ''\r\nthen pnlSUBFORM_DIV.Width := (sender as Tform).width - strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_SIDEDATAWIDTH_' + getcurrentformname])\r\nelse pnlSUBFORM_DIV.Width := (sender as Tform).width - pnlSideData.Width;\r\n\r\nif pnlsidedata.width < 0 then pnlSUBFORM_DIV.Width := pnlSUBFORM_DIV.Width + pnlsidedata.width;\r\n\r\n\r\n//showmessage('1179: ' + inttostr(pnlsidedata.width));\r\n\r\n//showmessage(dm.EGV_LOCALSTORAGE.Values['EGV_SIDEDATAHEIGHT_' + getcurrentformname]);\r\n\r\nif dm.EGV_LOCALSTORAGE.Values['EGV_SIDEDATAHEIGHT_' + getcurrentformname]<> ''\r\nthen sbSideData.Height := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_SIDEDATAHEIGHT_' + getcurrentformname]);\r\n\r\nResizeFormBlocks(SubForm_DIV, egv_formcolumns);\r\nResizeFormBlocks(sbSideData, 1, false);\r\nStretchAllMemos(SUBFORM_DIV);\r\nStretchAllMemos(sbSideData);\r\nForm_AdjustGrids(self);\r\n\r\nResizeButtons(pnlQuestionButtons);\r\nResizeButtons(pnlSideDataButtons);\r\n//ResizeButtons(pnlQAI_Question);\r\n\r\n{pnlQAI_Question.top := 0;\r\npnlQAI_Question.Height := pnlQuestion.Height - cbSessions.Height;\r\npnlQAI_Question.left := b2.left;\r\npnlQAI_Question.width := b2.width; }\r\n\r\n//showmessage(inttostr(subform_div.width));\r\n//pnlQAI_Question.Left := 50 + (subform_div.width DIV 100) * 15;\r\n\r\n//btnSendFromDB.Visible := (EGV_CURRENT_MRN <> '');\r\n//showmessage('2: '+ELV_PATIENTCERNERID);\r\nbtnRequestFromKnowledgeBase.Visible := (EGV_CURRENT_MRN <> '');\r\nbtnSendFromEPIC.Visible := ((EGV_PATIENTFHIRID <> '') and (dm.EGV_LOCALSTORAGE.Values['EGV_EPIC'] = '1'));\r\nbtnSendFromCERNER.Visible := ((ELV_PATIENTCERNERID <> '') and (dm.EGV_LOCALSTORAGE.Values['EGV_CERNER'] = '1'));\r\n\r\ntmRequestFromKnowledgeBase.Enabled := true;\r\n\r\nif (btnRequestFromKnowledgeBase.visible or btnSendFromDB.Visible or btnSendFromEPIC.Visible or btnSendFromCERNER.Visible or btnZoomIn.Visible)\r\nthen pnlQuestionButtons.ElementClassName := 'qai_questionbuttons_panel_long';\r\n\r\n//showmessage('3. - '+inttostr(pnlSideData.width));\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.WebPanel14MouseMove(Sender: TObject; Shift: TShiftState;\r\n X, Y: Integer);\r\nbegin\r\n inherited;\r\nif uppercase((sender as TControl).name) = 'WEBPANEL10'\r\nthen begin\r\n frmmain.btnAddRecord.visible := false;;\r\n frmmain.btnDeleteRecord.visible := false;;\r\n frmmain.btnBlockGridPost.visible := false;;\r\n end;\r\nif uppercase((sender as TControl).name) = 'WEBPANEL23'\r\nthen begin\r\n frmmain.btnAddRecord.visible := false;;\r\n frmmain.btnDeleteRecord.visible := true;;\r\n frmmain.btnBlockGridPost.visible := false;;\r\n end;\r\nend;\r\n\r\nprocedure TfrmUDF_QAI._Block_MouseLeave(Sender: TObject);\r\nbegin\r\n inherited;\r\ntmQAI.Enabled := true;\r\nend;\r\n\r\nprocedure TfrmUDF_QAI._GridBlockTitle_MouseMove(Sender: TObject;\r\n Shift: TShiftState; X, Y: Integer);\r\nbegin\r\n inherited;\r\nif uppercase((sender as TControl).name) = 'WEBLABEL1'\r\nthen begin\r\n frmmain.btnAddRecord.visible := false;;\r\n frmmain.btnDeleteRecord.visible := false;;\r\n frmmain.btnBlockGridPost.visible := false;;\r\n end;\r\nif uppercase((sender as TControl).name) = 'WEBLABEL73'\r\nthen begin\r\n frmmain.btnAddRecord.visible := false;;\r\n frmmain.btnDeleteRecord.visible := true;;\r\n frmmain.btnBlockGridPost.visible := false;;\r\n end;\r\nend;\r\n\r\nprocedure TfrmUDF_QAI._GridBlock_MouseMove(Sender: TObject; Shift: TShiftState;\r\n X, Y: Integer);\r\nbegin\r\n inherited;\r\nif uppercase((sender as TControl).name) = 'SB101'\r\nthen begin\r\n frmmain.btnAddRecord.visible := false;;\r\n frmmain.btnDeleteRecord.visible := false;;\r\n frmmain.btnBlockGridPost.visible := false;;\r\n end;\r\nif uppercase((sender as TControl).name) = 'SB102'\r\nthen begin\r\n frmmain.btnAddRecord.visible := false;;\r\n frmmain.btnDeleteRecord.visible := true;;\r\n frmmain.btnBlockGridPost.visible := false;;\r\n end;\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.ShowStartMessage(msg: string='');\r\nbegin\r\nif msg = ''\r\nthen begin\r\n if cbSessions.Items.Count = 1\r\n then message_p := 'Upload data to create a knowledge base.'\r\n else message_p := 'Select a session from Recent Sessions list or Upload data to create a knowledge base.';\r\n end\r\nelse message_p := msg;\r\n\r\ncolor_p := TColorToHex(EGV_QAI_SERVERMESSAGECOLOR); //'silver';\r\nicon_p := 'Argus Icon.ico';\r\n\r\nBlockGetHTML(B2).Tag := 0;\r\nBlockGetHTML(B2).HTML.Text := HTML_p;\r\nBlockGetHTML(B2).HTML.Text :=\r\n stringreplace( stringreplace(stringreplace(stringreplace(HTML_p, '_icon_', icon_p, [rfReplaceAll]), '_message_', message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]), 'text-align:left', 'text-align:center', [rfReplaceAll]) ;\r\nB2.height := 200;\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.PositionProgressBar;\r\nbegin\r\nWebProgressBar1.parent := pnlSUBFORM_DIV;\r\nWebProgressBar1.Top := (WebProgressBar1.parent as TControl).Height div 2;\r\nWebProgressBar1.left := ((WebProgressBar1.parent as TControl).width div 2) - (WebProgressBar1.Width div 2);\r\nend;\r\n\r\nprocedure TfrmUDF_QAI.QuestionsShowHide(show_p: boolean=true);\r\nvar s1,s2,s3, s4: string;\r\nbegin\r\n if show_p\r\n then begin\r\n { pnlSubForm_Div.Align := alRight;\r\n spSideDataSplitter.Visible := true;\r\n pnlSideData.Visible := true; }\r\n //sb4.Visible := true;\r\n sb101.Visible := true; DBF_GetPostFieldData(sb101, 0, nil, s1, s2, s3, s4);\r\n Form_AdjustGrids(self, BlockGetGrid(sb101));\r\n sb102.Visible := false;\r\n sb103.Visible := false;\r\n end\r\n else begin\r\n {pnlSideData.Visible := false;\r\n spSideDataSplitter.Visible := false;\r\n pnlSubForm_Div.Align := alClient; }\r\n //sb4.Visible := false;\r\n sb101.Visible := false;\r\n sb101.Visible := false;\r\n sb103.Visible := false;\r\n end;\r\n//WebFormResize(self);\r\nResizeFormBlocks(sbSideData, 1, false);\r\nend;\r\n\r\n// ---------------------------------- start Default Session -------------------------------------------------------------\r\nprocedure TfrmUDF_QAI.startdefaultsession;\r\nvar s, sqlstr: string; sql_getanswer, sql_clearanswer: string; where_p: string; mode_p: string;\r\n\r\n// -----------------------------------------------------------\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p: string; message_p: string; sections_p, progressfinished_p, progressvalue_p, ResultOK_p: string;\r\n begin\r\n\r\n ELV_QAI_SESSIONID := '';\r\n sections_p := '';\r\n progressfinished_p := '1';\r\n progressvalue_p := '0';\r\n ResultOK_p := '0';\r\n\r\n frmmain.wmWaitMessage.hide;\r\n btnSendQuestion.Enabled := true;\r\n //btnSendQuestion.ElementClassName := 'btn_icon';\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n\r\n //showmessage('response: ' + response_p);\r\n ELV_QAI_SESSIONID := trim(splitstring(Response_p, '~')[0]);\r\n if length(splitstring(Response_p, '~')) = 5\r\n then begin\r\n //showmessage('session: ' + ELV_QAI_SESSIONID);\r\n sections_p := trim(splitstring(Response_p, '~')[1]);\r\n progressfinished_p := trim(splitstring(Response_p, '~')[2]);\r\n progressvalue_p := trim(splitstring(Response_p, '~')[3]);\r\n ResultOK_p := trim(splitstring(Response_p, '~')[4]);\r\n\r\n sections_p := 'Following sections were found:
' + sections_p;\r\n\r\n end;\r\n // showmessage('progress finished: ' + progressfinished_p);\r\n WebProgressBar1.position := 0;\r\n WebProgressBar1.Visible := true;\r\n PositionProgressBar;\r\n WebProgressBar1.Position := strtoint(progressvalue_p);\r\n\r\n if (ResultOK_p='1') and (progressfinished_p = '0')\r\n then begin\r\n // showmessage('next');\r\n if EGV_FACILITYTOKEN = '' then s := EGV_FACILITY\r\n else s := EGV_FACILITY + ',' + EGV_FACILITYTOKEN;\r\n dm.XDataWebClient1.RawInvoke('IReportService.QAI_UploadLocalFiles',\r\n ['', s, window.btoa(' ') + '~~~.rtf^^^', '0', ELV_QAI_SESSIONID,''], @OnResult); // uploading an empty file\r\n EXIT;\r\n end;\r\n\r\n WebProgressBar1.Position := 100;\r\n WebProgressBar1.Visible := false;\r\n\r\n if ELV_QAI_SESSIONID <> ''\r\n then begin\r\n QuestionsShowHide(true);\r\n message_p := datetimetostr(now) + ' - Default session.';\r\n cbSessions.Items.Add(datetimetostr(now) + ' - Default Session - ' + '(' + ELV_QAI_SESSIONID +')');\r\n ShowStartMessage;\r\n end\r\n else begin\r\n message_p := 'Error creating a Default session. Returned Session ID is empty. Error message: ' + sections_p;\r\n color_p := TColorToHex(EGV_QAI_SERVERMESSAGECOLOR); //'lightblue';\r\n icon_p := 'Argus Icon.ico';\r\n\r\n {'' +\r\n EGV_QAI_SERVERMESSAGEICON +\r\n ' Argus';\r\n }\r\n //onclick=\"alert(' + quotedstr('1234567')+')\";\r\n BlockGetHTML(B2).HTML.Text := HTML_Text;\r\n BlockGetHTML(B2).HTML.Text :=\r\n BlockGetHTML(B2).HTML.Text +\r\n stringreplace(stringreplace(stringreplace(HTML_p, '_icon_', icon_p, [rfReplaceAll]), '_message_', message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]);\r\n end;\r\n ELV_QAI_CURRENTSESSIONINFO := stringreplace(stringreplace(stringreplace(HTML_p, '_icon_',\r\n icon_p, [rfReplaceAll]), '_message_', 'Active Session: ' + message_p,[rfReplaceAll]),\r\n '_color_', color_p, [rfReplaceAll]);\r\n\r\n // BlockGetMemo(BlockGetBlockByTitle('Message', SUBFORM_DIV)).Text := response_p;\r\n B2.height := BlockGetHTML(B2).height + 30;\r\n subform_div.ScrollTop := 10000;\r\n end;\r\n// ---------------------------------------------------------------\r\n\r\nbegin\r\n\r\ninherited;\r\n\r\nsqlstr := 'select ' + quotedstr(' ');\r\nif EGV_FACILITYTOKEN = '' then s := EGV_FACILITY\r\n else s := EGV_FACILITY + ',' + EGV_FACILITYTOKEN;\r\ndm.XDataWebClient1.RawInvoke('IReportService.QAI_UploadLocalFiles', ['', s, window.btoa(' ') + '~~~.rtf^^^', '0', '', ''], @OnResult);\r\nBlockGetHTML(B2).HTML.Text := trim(BlockGetHTML(B2).HTML.Text);\r\nHTML_Text := BlockGetHTML(B2).HTML.Text;\r\n\r\nB2.height := BlockGetHTML(B2).height + 30;\r\nsubform_div.ScrollTop := 10000;\r\nend;\r\n\r\nfunction TfrmUDF_QAI.SetBold(s: string): string;\r\nbegin\r\n//showmessage(s);\r\nwhile pos('**', s) >0\r\ndo begin\r\n if bold_pare = 0\r\n then begin\r\n s := stringreplace(s,'**','',[]);\r\n bold_pare := 1;\r\n end\r\n else begin\r\n s := stringreplace(s,'**','',[]);\r\n bold_pare := 0;\r\n end\r\n end;\r\nresult := s;\r\nend;\r\n\r\n\r\nprocedure TfrmUDF_QAI.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n WebLabel75 := TLabel.Create(Self);\r\n pnlQAI_SidedataBottom := TPanel.Create(Self);\r\n pnlSideDataButtons := TPanel.Create(Self);\r\n WebBitBtn1 := TBitBtn.Create(Self);\r\n WebBitBtn2 := TBitBtn.Create(Self);\r\n btnAddToFavorites := TBitBtn.Create(Self);\r\n btnSuggestedQuestions := TBitBtn.Create(Self);\r\n WebLabel71 := TLabel.Create(Self);\r\n WebLabel72 := TLabel.Create(Self);\r\n htmlTop := THTMLContainer.Create(Self);\r\n pnlQuestion := TPanel.Create(Self);\r\n WebButton1 := TButton.Create('id_servermessage');\r\n pnlQAI_Question := TPanel.Create(Self);\r\n memQAI_Question := TMemo.Create(Self);\r\n cbSessions := TComboBox.Create(Self);\r\n btnMicStart := TBitBtn.Create(Self);\r\n btnTransferFiles := TBitBtn.Create(Self);\r\n btnSendQuestion := TBitBtn.Create(Self);\r\n pnlQAI_FormButtons := TPanel.Create(Self);\r\n WebButton2 := TButton.Create('id_servermessage');\r\n pnlQuestionButtons := TPanel.Create(Self);\r\n btnClearQuestion := TBitBtn.Create(Self);\r\n btnStopResponse := TBitBtn.Create(Self);\r\n btnShowCurrentSessionInfo := TBitBtn.Create(Self);\r\n btnNewChat := TBitBtn.Create(Self);\r\n btnCloseForm := TBitBtn.Create(Self);\r\n btnSendFromDB := TBitBtn.Create(Self);\r\n btnSendFromEPIC := TBitBtn.Create(Self);\r\n btnSendFromCerner := TBitBtn.Create(Self);\r\n btnTransferFiles_bidding := TBitBtn.Create(Self);\r\n btnCaptureImage := TBitBtn.Create(Self);\r\n btnZoomIn := TBitBtn.Create(Self);\r\n btnZoomOut := TBitBtn.Create(Self);\r\n btnLoadImages := TBitBtn.Create(Self);\r\n btnRequestFromKnowledgeBase := TBitBtn.Create(Self);\r\n WebProgressBar1 := TProgressBar.Create(Self);\r\n ImageGrid := TDBResponsiveGrid.Create(Self);\r\n tmQAI := TTimer.Create(Self);\r\n tmSendFileClick := TTimer.Create(Self);\r\n tmSendBiddingDocsClick := TTimer.Create(Self);\r\n tmRequestFromKnowledgeBase := TTimer.Create(Self);\r\n\r\n WebLabel15.BeforeLoadDFMValues;\r\n WebLabel13.BeforeLoadDFMValues;\r\n WebLabel2.BeforeLoadDFMValues;\r\n pnlBottom.BeforeLoadDFMValues;\r\n tbReport.BeforeLoadDFMValues;\r\n pnlFormButtons.BeforeLoadDFMValues;\r\n btnCustom1.BeforeLoadDFMValues;\r\n btnCustom2.BeforeLoadDFMValues;\r\n btnCustom3.BeforeLoadDFMValues;\r\n btnCustom4.BeforeLoadDFMValues;\r\n btnCustom5.BeforeLoadDFMValues;\r\n btnPost.BeforeLoadDFMValues;\r\n btnAdd.BeforeLoadDFMValues;\r\n btnRefresh.BeforeLoadDFMValues;\r\n btnUseDefaults.BeforeLoadDFMValues;\r\n btnSaveAsDefaults.BeforeLoadDFMValues;\r\n btnCustom6.BeforeLoadDFMValues;\r\n btnCustom7.BeforeLoadDFMValues;\r\n btnCustom8.BeforeLoadDFMValues;\r\n btnCustom9.BeforeLoadDFMValues;\r\n WebMemo8.BeforeLoadDFMValues;\r\n btnClearBlockCustomPositioning.BeforeLoadDFMValues;\r\n btnClearBlockCustomSizes.BeforeLoadDFMValues;\r\n btnFixBlockPositions.BeforeLoadDFMValues;\r\n pnlReportButtons.BeforeLoadDFMValues;\r\n btnRefresh_RPT.BeforeLoadDFMValues;\r\n btnClose_RPT.BeforeLoadDFMValues;\r\n spSideDataSplitter.BeforeLoadDFMValues;\r\n pnlFormCaption.BeforeLoadDFMValues;\r\n pnlSideData.BeforeLoadDFMValues;\r\n WebLabel75.BeforeLoadDFMValues;\r\n sbSideData.BeforeLoadDFMValues;\r\n sb6.BeforeLoadDFMValues;\r\n WebPanel9.BeforeLoadDFMValues;\r\n WebLabel26.BeforeLoadDFMValues;\r\n sb5.BeforeLoadDFMValues;\r\n WebPanel12.BeforeLoadDFMValues;\r\n WebLabel27.BeforeLoadDFMValues;\r\n sb4.BeforeLoadDFMValues;\r\n WebPanel22.BeforeLoadDFMValues;\r\n WebLabel28.BeforeLoadDFMValues;\r\n sb3.BeforeLoadDFMValues;\r\n WebPanel25.BeforeLoadDFMValues;\r\n WebLabel29.BeforeLoadDFMValues;\r\n sb2.BeforeLoadDFMValues;\r\n WebPanel30.BeforeLoadDFMValues;\r\n WebLabel30.BeforeLoadDFMValues;\r\n sb1.BeforeLoadDFMValues;\r\n WebPanel32.BeforeLoadDFMValues;\r\n WebLabel31.BeforeLoadDFMValues;\r\n sb7.BeforeLoadDFMValues;\r\n WebPanel34.BeforeLoadDFMValues;\r\n WebLabel32.BeforeLoadDFMValues;\r\n sb101.BeforeLoadDFMValues;\r\n WebPanel10.BeforeLoadDFMValues;\r\n WebLabel1.BeforeLoadDFMValues;\r\n SG1.BeforeLoadDFMValues;\r\n sb102.BeforeLoadDFMValues;\r\n WebPanel23.BeforeLoadDFMValues;\r\n WebLabel73.BeforeLoadDFMValues;\r\n SG2.BeforeLoadDFMValues;\r\n sb103.BeforeLoadDFMValues;\r\n WebPanel35.BeforeLoadDFMValues;\r\n WebLabel74.BeforeLoadDFMValues;\r\n SG3.BeforeLoadDFMValues;\r\n pnlQAI_SidedataBottom.BeforeLoadDFMValues;\r\n pnlSideDataButtons.BeforeLoadDFMValues;\r\n WebBitBtn1.BeforeLoadDFMValues;\r\n WebBitBtn2.BeforeLoadDFMValues;\r\n btnAddToFavorites.BeforeLoadDFMValues;\r\n btnSuggestedQuestions.BeforeLoadDFMValues;\r\n pnlSUBFORM_DIV.BeforeLoadDFMValues;\r\n WebLabel71.BeforeLoadDFMValues;\r\n WebLabel72.BeforeLoadDFMValues;\r\n htmlTop.BeforeLoadDFMValues;\r\n pnlQuestion.BeforeLoadDFMValues;\r\n WebButton1.BeforeLoadDFMValues;\r\n pnlQAI_Question.BeforeLoadDFMValues;\r\n memQAI_Question.BeforeLoadDFMValues;\r\n cbSessions.BeforeLoadDFMValues;\r\n btnMicStart.BeforeLoadDFMValues;\r\n btnTransferFiles.BeforeLoadDFMValues;\r\n btnSendQuestion.BeforeLoadDFMValues;\r\n pnlQAI_FormButtons.BeforeLoadDFMValues;\r\n WebButton2.BeforeLoadDFMValues;\r\n pnlQuestionButtons.BeforeLoadDFMValues;\r\n btnClearQuestion.BeforeLoadDFMValues;\r\n btnStopResponse.BeforeLoadDFMValues;\r\n btnShowCurrentSessionInfo.BeforeLoadDFMValues;\r\n btnNewChat.BeforeLoadDFMValues;\r\n btnCloseForm.BeforeLoadDFMValues;\r\n btnSendFromDB.BeforeLoadDFMValues;\r\n btnSendFromEPIC.BeforeLoadDFMValues;\r\n btnSendFromCerner.BeforeLoadDFMValues;\r\n btnTransferFiles_bidding.BeforeLoadDFMValues;\r\n btnCaptureImage.BeforeLoadDFMValues;\r\n btnZoomIn.BeforeLoadDFMValues;\r\n btnZoomOut.BeforeLoadDFMValues;\r\n btnLoadImages.BeforeLoadDFMValues;\r\n btnRequestFromKnowledgeBase.BeforeLoadDFMValues;\r\n pnlDataBlocks.BeforeLoadDFMValues;\r\n SubForm_DIV.BeforeLoadDFMValues;\r\n b26.BeforeLoadDFMValues;\r\n WebPanel13.BeforeLoadDFMValues;\r\n WebLabel8.BeforeLoadDFMValues;\r\n B101.BeforeLoadDFMValues;\r\n WebPanel14.BeforeLoadDFMValues;\r\n WebLabel18.BeforeLoadDFMValues;\r\n G1.BeforeLoadDFMValues;\r\n B25.BeforeLoadDFMValues;\r\n WebPanel11.BeforeLoadDFMValues;\r\n WebLabel7.BeforeLoadDFMValues;\r\n B20.BeforeLoadDFMValues;\r\n WebPanel95.BeforeLoadDFMValues;\r\n WebLabel47.BeforeLoadDFMValues;\r\n B21.BeforeLoadDFMValues;\r\n WebPanel2.BeforeLoadDFMValues;\r\n WebLabel3.BeforeLoadDFMValues;\r\n B22.BeforeLoadDFMValues;\r\n WebPanel4.BeforeLoadDFMValues;\r\n WebLabel4.BeforeLoadDFMValues;\r\n b23.BeforeLoadDFMValues;\r\n WebPanel6.BeforeLoadDFMValues;\r\n WebLabel5.BeforeLoadDFMValues;\r\n B18.BeforeLoadDFMValues;\r\n WebPanel111.BeforeLoadDFMValues;\r\n WebLabel55.BeforeLoadDFMValues;\r\n B19.BeforeLoadDFMValues;\r\n WebPanel93.BeforeLoadDFMValues;\r\n WebLabel46.BeforeLoadDFMValues;\r\n B24.BeforeLoadDFMValues;\r\n WebPanel8.BeforeLoadDFMValues;\r\n WebLabel6.BeforeLoadDFMValues;\r\n B29.BeforeLoadDFMValues;\r\n WebPanel19.BeforeLoadDFMValues;\r\n WebLabel11.BeforeLoadDFMValues;\r\n B28.BeforeLoadDFMValues;\r\n WebPanel17.BeforeLoadDFMValues;\r\n WebLabel10.BeforeLoadDFMValues;\r\n B27.BeforeLoadDFMValues;\r\n WebPanel15.BeforeLoadDFMValues;\r\n WebLabel9.BeforeLoadDFMValues;\r\n B16.BeforeLoadDFMValues;\r\n WebPanel107.BeforeLoadDFMValues;\r\n WebLabel53.BeforeLoadDFMValues;\r\n B17.BeforeLoadDFMValues;\r\n WebPanel109.BeforeLoadDFMValues;\r\n WebLabel54.BeforeLoadDFMValues;\r\n B15.BeforeLoadDFMValues;\r\n WebPanel97.BeforeLoadDFMValues;\r\n WebLabel48.BeforeLoadDFMValues;\r\n B14.BeforeLoadDFMValues;\r\n WebPanel99.BeforeLoadDFMValues;\r\n WebLabel49.BeforeLoadDFMValues;\r\n B13.BeforeLoadDFMValues;\r\n WebPanel101.BeforeLoadDFMValues;\r\n WebLabel50.BeforeLoadDFMValues;\r\n B12.BeforeLoadDFMValues;\r\n WebPanel103.BeforeLoadDFMValues;\r\n WebLabel51.BeforeLoadDFMValues;\r\n B11.BeforeLoadDFMValues;\r\n WebPanel105.BeforeLoadDFMValues;\r\n WebLabel52.BeforeLoadDFMValues;\r\n B6.BeforeLoadDFMValues;\r\n WebPanel80.BeforeLoadDFMValues;\r\n WebLabel41.BeforeLoadDFMValues;\r\n B7.BeforeLoadDFMValues;\r\n WebPanel82.BeforeLoadDFMValues;\r\n WebLabel42.BeforeLoadDFMValues;\r\n B8.BeforeLoadDFMValues;\r\n WebPanel86.BeforeLoadDFMValues;\r\n WebLabel43.BeforeLoadDFMValues;\r\n B9.BeforeLoadDFMValues;\r\n WebPanel88.BeforeLoadDFMValues;\r\n WebLabel44.BeforeLoadDFMValues;\r\n B10.BeforeLoadDFMValues;\r\n WebPanel91.BeforeLoadDFMValues;\r\n WebLabel45.BeforeLoadDFMValues;\r\n B5.BeforeLoadDFMValues;\r\n WebPanel74.BeforeLoadDFMValues;\r\n WebLabel38.BeforeLoadDFMValues;\r\n B4.BeforeLoadDFMValues;\r\n WebPanel78.BeforeLoadDFMValues;\r\n WebLabel40.BeforeLoadDFMValues;\r\n B3.BeforeLoadDFMValues;\r\n WebPanel72.BeforeLoadDFMValues;\r\n WebLabel37.BeforeLoadDFMValues;\r\n B2.BeforeLoadDFMValues;\r\n WebPanel76.BeforeLoadDFMValues;\r\n WebLabel39.BeforeLoadDFMValues;\r\n B1.BeforeLoadDFMValues;\r\n WebPanel70.BeforeLoadDFMValues;\r\n WebLabel36.BeforeLoadDFMValues;\r\n B30.BeforeLoadDFMValues;\r\n WebPanel21.BeforeLoadDFMValues;\r\n WebLabel12.BeforeLoadDFMValues;\r\n B100.BeforeLoadDFMValues;\r\n WebPanel3.BeforeLoadDFMValues;\r\n WebLabel14.BeforeLoadDFMValues;\r\n G9.BeforeLoadDFMValues;\r\n B102.BeforeLoadDFMValues;\r\n WebPanel24.BeforeLoadDFMValues;\r\n WebLabel21.BeforeLoadDFMValues;\r\n G2.BeforeLoadDFMValues;\r\n B105.BeforeLoadDFMValues;\r\n WebPanel26.BeforeLoadDFMValues;\r\n WebLabel22.BeforeLoadDFMValues;\r\n G5.BeforeLoadDFMValues;\r\n B104.BeforeLoadDFMValues;\r\n WebPanel18.BeforeLoadDFMValues;\r\n WebLabel19.BeforeLoadDFMValues;\r\n G4.BeforeLoadDFMValues;\r\n B103.BeforeLoadDFMValues;\r\n WebPanel7.BeforeLoadDFMValues;\r\n WebLabel17.BeforeLoadDFMValues;\r\n G3.BeforeLoadDFMValues;\r\n B106.BeforeLoadDFMValues;\r\n WebPanel20.BeforeLoadDFMValues;\r\n WebLabel20.BeforeLoadDFMValues;\r\n G6.BeforeLoadDFMValues;\r\n B107.BeforeLoadDFMValues;\r\n WebPanel27.BeforeLoadDFMValues;\r\n WebLabel23.BeforeLoadDFMValues;\r\n G7.BeforeLoadDFMValues;\r\n B108.BeforeLoadDFMValues;\r\n WebPanel29.BeforeLoadDFMValues;\r\n WebLabel24.BeforeLoadDFMValues;\r\n G8.BeforeLoadDFMValues;\r\n wmWaitMessage.BeforeLoadDFMValues;\r\n B31.BeforeLoadDFMValues;\r\n WebPanel5.BeforeLoadDFMValues;\r\n WebLabel16.BeforeLoadDFMValues;\r\n B32.BeforeLoadDFMValues;\r\n WebPanel16.BeforeLoadDFMValues;\r\n WebLabel25.BeforeLoadDFMValues;\r\n B33.BeforeLoadDFMValues;\r\n WebPanel28.BeforeLoadDFMValues;\r\n WebLabel33.BeforeLoadDFMValues;\r\n B34.BeforeLoadDFMValues;\r\n WebPanel33.BeforeLoadDFMValues;\r\n WebLabel34.BeforeLoadDFMValues;\r\n B35.BeforeLoadDFMValues;\r\n WebPanel36.BeforeLoadDFMValues;\r\n WebLabel35.BeforeLoadDFMValues;\r\n B36.BeforeLoadDFMValues;\r\n WebPanel38.BeforeLoadDFMValues;\r\n WebLabel56.BeforeLoadDFMValues;\r\n B37.BeforeLoadDFMValues;\r\n WebPanel40.BeforeLoadDFMValues;\r\n WebLabel57.BeforeLoadDFMValues;\r\n B38.BeforeLoadDFMValues;\r\n WebPanel42.BeforeLoadDFMValues;\r\n WebLabel58.BeforeLoadDFMValues;\r\n B39.BeforeLoadDFMValues;\r\n WebPanel44.BeforeLoadDFMValues;\r\n WebLabel59.BeforeLoadDFMValues;\r\n B40.BeforeLoadDFMValues;\r\n WebPanel46.BeforeLoadDFMValues;\r\n WebLabel60.BeforeLoadDFMValues;\r\n B41.BeforeLoadDFMValues;\r\n WebPanel48.BeforeLoadDFMValues;\r\n WebLabel61.BeforeLoadDFMValues;\r\n B42.BeforeLoadDFMValues;\r\n WebPanel50.BeforeLoadDFMValues;\r\n WebLabel62.BeforeLoadDFMValues;\r\n B43.BeforeLoadDFMValues;\r\n WebPanel52.BeforeLoadDFMValues;\r\n WebLabel63.BeforeLoadDFMValues;\r\n B44.BeforeLoadDFMValues;\r\n WebPanel54.BeforeLoadDFMValues;\r\n WebLabel64.BeforeLoadDFMValues;\r\n B45.BeforeLoadDFMValues;\r\n WebPanel56.BeforeLoadDFMValues;\r\n WebLabel65.BeforeLoadDFMValues;\r\n B46.BeforeLoadDFMValues;\r\n WebPanel58.BeforeLoadDFMValues;\r\n WebLabel66.BeforeLoadDFMValues;\r\n B47.BeforeLoadDFMValues;\r\n WebPanel60.BeforeLoadDFMValues;\r\n WebLabel67.BeforeLoadDFMValues;\r\n B48.BeforeLoadDFMValues;\r\n WebPanel62.BeforeLoadDFMValues;\r\n WebLabel68.BeforeLoadDFMValues;\r\n B49.BeforeLoadDFMValues;\r\n WebPanel64.BeforeLoadDFMValues;\r\n WebLabel69.BeforeLoadDFMValues;\r\n B50.BeforeLoadDFMValues;\r\n WebPanel66.BeforeLoadDFMValues;\r\n WebLabel70.BeforeLoadDFMValues;\r\n WebProgressBar1.BeforeLoadDFMValues;\r\n ImageGrid.BeforeLoadDFMValues;\r\n tmQAI.BeforeLoadDFMValues;\r\n tmSendFileClick.BeforeLoadDFMValues;\r\n tmSendBiddingDocsClick.BeforeLoadDFMValues;\r\n tmRequestFromKnowledgeBase.BeforeLoadDFMValues;\r\n try\r\n Width := 1400;\r\n Height := 1300;\r\n ElementClassName := 'form_background';\r\n WebLabel15.Top := 1233;\r\n WebLabel15.Width := 1400;\r\n WebLabel15.Visible := False;\r\n WebLabel13.Height := 1198;\r\n WebLabel2.Top := 1246;\r\n WebLabel2.Width := 1400;\r\n pnlBottom.Top := 1259;\r\n pnlBottom.Width := 1400;\r\n pnlBottom.Visible := False;\r\n tbReport.Visible := False;\r\n pnlFormButtons.Left := 268;\r\n pnlFormButtons.Visible := False;\r\n btnCustom1.Left := 502;\r\n btnCustom1.Width := 30;\r\n btnCustom1.Hint := 'Send Data from Database for Assessment';\r\n btnCustom1.ShowHint := True;\r\n btnCustom2.Left := 532;\r\n btnCustom2.Width := 30;\r\n btnCustom2.Hint := 'Upload Files for Assessment';\r\n btnCustom3.Left := 562;\r\n btnCustom3.Width := 30;\r\n btnCustom4.Left := 592;\r\n btnCustom4.Width := 30;\r\n btnCustom5.Left := 622;\r\n btnCustom5.Width := 30;\r\n btnPost.Visible := False;\r\n btnAdd.Visible := False;\r\n btnRefresh.Hint := 'Refresh From DB';\r\n btnRefresh.MaterialGlyph := 'chat_bubble_outline';\r\n btnUseDefaults.Left := 442;\r\n btnUseDefaults.Width := 30;\r\n btnUseDefaults.Visible := False;\r\n btnSaveAsDefaults.Left := 472;\r\n btnSaveAsDefaults.Width := 30;\r\n btnCustom6.Left := 652;\r\n btnCustom6.Width := 30;\r\n btnCustom7.Left := 682;\r\n btnCustom7.Width := 30;\r\n btnCustom8.Left := 712;\r\n btnCustom8.Width := 30;\r\n btnCustom9.Left := 742;\r\n btnCustom9.Width := 30;\r\n WebMemo8.Width := 40;\r\n btnClearBlockCustomPositioning.Left := 412;\r\n btnClearBlockCustomPositioning.Width := 30;\r\n btnClearBlockCustomSizes.Left := 382;\r\n btnClearBlockCustomSizes.Width := 30;\r\n btnFixBlockPositions.Left := 352;\r\n btnFixBlockPositions.Width := 30;\r\n pnlReportButtons.Width := 173;\r\n btnRefresh_RPT.Left := 93;\r\n btnClose_RPT.Left := 133;\r\n spSideDataSplitter.Left := 308;\r\n spSideDataSplitter.Height := 1198;\r\n spSideDataSplitter.Color := 15724527;\r\n pnlFormCaption.Width := 1400;\r\n pnlFormCaption.Visible := False;\r\n pnlSideData.Left := 3;\r\n pnlSideData.Width := 305;\r\n pnlSideData.Height := 1198;\r\n pnlSideData.Align := alClient;\r\n WebLabel75.SetParentComponent(pnlSideData);\r\n WebLabel75.Name := 'WebLabel75';\r\n WebLabel75.Left := 0;\r\n WebLabel75.Top := 1185;\r\n WebLabel75.Width := 305;\r\n WebLabel75.Height := 13;\r\n WebLabel75.Align := alBottom;\r\n WebLabel75.ElementClassName := 'BOX_BOTTOMBORDER';\r\n WebLabel75.HeightPercent := 100.000000000000000000;\r\n WebLabel75.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel75, Self, 'OnMouseMove', 'WebLabel15MouseMove');\r\n sbSideData.Width := 305;\r\n sbSideData.Height := 1144;\r\n WebLabel26.Height := 28;\r\n WebLabel27.Height := 28;\r\n WebLabel28.Height := 28;\r\n WebLabel29.Height := 28;\r\n WebLabel30.Height := 28;\r\n WebLabel31.Height := 28;\r\n WebLabel32.Height := 28;\r\n WebLabel1.Height := 28;\r\n SG1.Columns.Clear;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n Width := 63;\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n SG1.GridLineColor := 15658734;\r\n SG1.Options := [goFixedVertLine,goHorzLine,goColSizing,goRowSelect];\r\n SetEvent(SG1, Self, 'OnDblClick', 'SG1DblClick');\r\n SG1.ColWidths[0] := 64;\r\n SG1.ColWidths[1] := 63;\r\n SG1.ColWidths[2] := 64;\r\n SG1.ColWidths[3] := 64;\r\n SG1.ColWidths[4] := 64;\r\n SG1.ColWidths[5] := 64;\r\n SG1.ColWidths[6] := 64;\r\n SG1.ColWidths[7] := 64;\r\n SG1.ColWidths[8] := 64;\r\n SG1.ColWidths[9] := 64;\r\n SG1.ColWidths[10] := 64;\r\n SG1.ColWidths[11] := 64;\r\n SG1.ColWidths[12] := 64;\r\n SG1.ColWidths[13] := 64;\r\n SG1.ColWidths[14] := 64;\r\n SG1.ColWidths[15] := 64;\r\n SG1.ColWidths[16] := 64;\r\n SG1.ColWidths[17] := 64;\r\n SG1.ColWidths[18] := 64;\r\n SG1.ColWidths[19] := 64;\r\n SG1.ColWidths[20] := 64;\r\n SG1.ColWidths[21] := 64;\r\n SG1.ColWidths[22] := 64;\r\n SG1.ColWidths[23] := 64;\r\n sb102.Left := 34;\r\n sb102.Top := 579;\r\n sb102.Height := 127;\r\n WebLabel73.Height := 28;\r\n SG2.Height := 86;\r\n SG2.Columns.Clear;\r\n with SG2.Columns.Add do\r\n begin\r\n Width := 65;\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n SG2.GridLineColor := 15658734;\r\n SG2.Options := [goFixedVertLine,goHorzLine,goColSizing,goRowSelect];\r\n SetEvent(SG2, Self, 'OnDblClick', 'SG1DblClick');\r\n SetEvent(SG2, Self, 'OnGetCellChildren', 'SG2GetCellChildren');\r\n SG2.ColWidths[0] := 65;\r\n SG2.ColWidths[1] := 64;\r\n SG2.ColWidths[2] := 64;\r\n SG2.ColWidths[3] := 64;\r\n SG2.ColWidths[4] := 64;\r\n SG2.ColWidths[5] := 64;\r\n SG2.ColWidths[6] := 64;\r\n SG2.ColWidths[7] := 64;\r\n SG2.ColWidths[8] := 64;\r\n SG2.ColWidths[9] := 64;\r\n SG2.ColWidths[10] := 64;\r\n SG2.ColWidths[11] := 64;\r\n SG2.ColWidths[12] := 64;\r\n SG2.ColWidths[13] := 64;\r\n SG2.ColWidths[14] := 64;\r\n SG2.ColWidths[15] := 64;\r\n SG2.ColWidths[16] := 64;\r\n SG2.ColWidths[17] := 64;\r\n SG2.ColWidths[18] := 64;\r\n SG2.ColWidths[19] := 64;\r\n SG2.ColWidths[20] := 64;\r\n SG2.ColWidths[21] := 64;\r\n SG2.ColWidths[22] := 64;\r\n SG2.ColWidths[23] := 64;\r\n WebLabel74.Height := 28;\r\n SG3.Columns.Clear;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n SG3.GridLineColor := 15658734;\r\n SG3.Options := [goFixedVertLine,goHorzLine,goColSizing,goRowSelect];\r\n SetEvent(SG3, Self, 'OnDblClick', 'SG1DblClick');\r\n pnlQAI_SidedataBottom.SetParentComponent(pnlSideData);\r\n pnlQAI_SidedataBottom.Name := 'pnlQAI_SidedataBottom';\r\n pnlQAI_SidedataBottom.Left := 0;\r\n pnlQAI_SidedataBottom.Top := 1144;\r\n pnlQAI_SidedataBottom.Width := 305;\r\n pnlQAI_SidedataBottom.Height := 41;\r\n pnlQAI_SidedataBottom.Align := alBottom;\r\n pnlQAI_SidedataBottom.BorderColor := clWhite;\r\n pnlQAI_SidedataBottom.BorderStyle := bsNone;\r\n pnlQAI_SidedataBottom.ChildOrder := 1;\r\n pnlQAI_SidedataBottom.Color := clWhite;\r\n pnlQAI_SidedataBottom.TabOrder := 1;\r\n pnlSideDataButtons.SetParentComponent(pnlQAI_SidedataBottom);\r\n pnlSideDataButtons.Name := 'pnlSideDataButtons';\r\n pnlSideDataButtons.Left := 96;\r\n pnlSideDataButtons.Top := 2;\r\n pnlSideDataButtons.Width := 129;\r\n pnlSideDataButtons.Height := 37;\r\n pnlSideDataButtons.ElementClassName := 'qai_sidedatabuttons_panel';\r\n pnlSideDataButtons.WidthStyle := ssAuto;\r\n pnlSideDataButtons.BorderColor := clWhite;\r\n pnlSideDataButtons.BorderStyle := bsNone;\r\n pnlSideDataButtons.ChildOrder := 3;\r\n pnlSideDataButtons.Color := clWhite;\r\n pnlSideDataButtons.ElementPosition := epRelative;\r\n pnlSideDataButtons.TabOrder := 0;\r\n WebBitBtn1.SetParentComponent(pnlSideDataButtons);\r\n WebBitBtn1.Name := 'WebBitBtn1';\r\n WebBitBtn1.Tag := 1;\r\n WebBitBtn1.Left := 0;\r\n WebBitBtn1.Top := 0;\r\n WebBitBtn1.Width := 30;\r\n WebBitBtn1.Height := 37;\r\n WebBitBtn1.Cursor := crHandPoint;\r\n WebBitBtn1.Hint := 'Favorite Questions';\r\n WebBitBtn1.Align := alLeft;\r\n WebBitBtn1.Caption := '';\r\n WebBitBtn1.Color := clNone;\r\n WebBitBtn1.ElementClassName := 'btn_icon';\r\n WebBitBtn1.Font.Charset := DEFAULT_CHARSET;\r\n WebBitBtn1.Font.Color := clGray;\r\n WebBitBtn1.Font.Height := -13;\r\n WebBitBtn1.Font.Name := 'Tahoma';\r\n WebBitBtn1.Font.Style := [];\r\n WebBitBtn1.HeightPercent := 100.000000000000000000;\r\n WebBitBtn1.MaterialGlyphSize := 25;\r\n WebBitBtn1.ParentFont := False;\r\n WebBitBtn1.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebBitBtn1, Self, 'OnClick', 'WebBitBtn1Click');\r\n SetEvent(WebBitBtn1, Self, 'OnMouseMove', 'btnSendFromDBMouseMove');\r\n WebBitBtn2.SetParentComponent(pnlSideDataButtons);\r\n WebBitBtn2.Name := 'WebBitBtn2';\r\n WebBitBtn2.Left := 30;\r\n WebBitBtn2.Top := 0;\r\n WebBitBtn2.Width := 30;\r\n WebBitBtn2.Height := 37;\r\n WebBitBtn2.Cursor := crHandPoint;\r\n WebBitBtn2.Hint := 'History';\r\n WebBitBtn2.Align := alLeft;\r\n WebBitBtn2.Caption := '';\r\n WebBitBtn2.Color := clNone;\r\n WebBitBtn2.ElementClassName := 'btn_icon';\r\n WebBitBtn2.Font.Charset := DEFAULT_CHARSET;\r\n WebBitBtn2.Font.Color := clGray;\r\n WebBitBtn2.Font.Height := -13;\r\n WebBitBtn2.Font.Name := 'Tahoma';\r\n WebBitBtn2.Font.Style := [];\r\n WebBitBtn2.HeightPercent := 100.000000000000000000;\r\n WebBitBtn2.MaterialGlyphSize := 25;\r\n WebBitBtn2.ParentFont := False;\r\n WebBitBtn2.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebBitBtn2, Self, 'OnClick', 'WebBitBtn2Click');\r\n SetEvent(WebBitBtn2, Self, 'OnMouseMove', 'btnSendFromDBMouseMove');\r\n btnAddToFavorites.SetParentComponent(pnlSideDataButtons);\r\n btnAddToFavorites.Name := 'btnAddToFavorites';\r\n btnAddToFavorites.Tag := 1;\r\n btnAddToFavorites.Left := 90;\r\n btnAddToFavorites.Top := 0;\r\n btnAddToFavorites.Width := 30;\r\n btnAddToFavorites.Height := 37;\r\n btnAddToFavorites.Cursor := crHandPoint;\r\n btnAddToFavorites.Hint := 'Add to Favorites';\r\n btnAddToFavorites.Align := alLeft;\r\n btnAddToFavorites.Caption := '';\r\n btnAddToFavorites.Color := clNone;\r\n btnAddToFavorites.ElementClassName := 'btn_icon';\r\n btnAddToFavorites.Font.Charset := DEFAULT_CHARSET;\r\n btnAddToFavorites.Font.Color := clGray;\r\n btnAddToFavorites.Font.Height := -13;\r\n btnAddToFavorites.Font.Name := 'Tahoma';\r\n btnAddToFavorites.Font.Style := [];\r\n btnAddToFavorites.HeightPercent := 100.000000000000000000;\r\n btnAddToFavorites.MaterialGlyphSize := 25;\r\n btnAddToFavorites.ParentFont := False;\r\n btnAddToFavorites.Visible := False;\r\n btnAddToFavorites.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnAddToFavorites, Self, 'OnClick', 'btnAddToFavoritesClick');\r\n btnSuggestedQuestions.SetParentComponent(pnlSideDataButtons);\r\n btnSuggestedQuestions.Name := 'btnSuggestedQuestions';\r\n btnSuggestedQuestions.Tag := 1;\r\n btnSuggestedQuestions.Left := 60;\r\n btnSuggestedQuestions.Top := 0;\r\n btnSuggestedQuestions.Width := 30;\r\n btnSuggestedQuestions.Height := 37;\r\n btnSuggestedQuestions.Cursor := crHandPoint;\r\n btnSuggestedQuestions.Hint := 'Suggested Questions';\r\n btnSuggestedQuestions.Align := alLeft;\r\n btnSuggestedQuestions.Caption := '';\r\n btnSuggestedQuestions.Color := clNone;\r\n btnSuggestedQuestions.ElementClassName := 'btn_icon';\r\n btnSuggestedQuestions.Font.Charset := DEFAULT_CHARSET;\r\n btnSuggestedQuestions.Font.Color := clGray;\r\n btnSuggestedQuestions.Font.Height := -13;\r\n btnSuggestedQuestions.Font.Name := 'Tahoma';\r\n btnSuggestedQuestions.Font.Style := [];\r\n btnSuggestedQuestions.HeightPercent := 100.000000000000000000;\r\n btnSuggestedQuestions.MaterialGlyphSize := 25;\r\n btnSuggestedQuestions.ParentFont := False;\r\n btnSuggestedQuestions.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnSuggestedQuestions, Self, 'OnClick', 'btnSuggestedQuestionsClick');\r\n SetEvent(btnSuggestedQuestions, Self, 'OnMouseMove', 'btnSendFromDBMouseMove');\r\n pnlSUBFORM_DIV.Left := 313;\r\n pnlSUBFORM_DIV.Width := 1087;\r\n pnlSUBFORM_DIV.Height := 1198;\r\n pnlSUBFORM_DIV.Align := alRight;\r\n WebLabel71.SetParentComponent(pnlSUBFORM_DIV);\r\n WebLabel71.Name := 'WebLabel71';\r\n WebLabel71.Left := 0;\r\n WebLabel71.Top := 1035;\r\n WebLabel71.Width := 1087;\r\n WebLabel71.Height := 13;\r\n WebLabel71.Align := alBottom;\r\n WebLabel71.ElementClassName := 'BOX_BOTTOMBORDER';\r\n WebLabel71.HeightPercent := 100.000000000000000000;\r\n WebLabel71.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel71, Self, 'OnMouseMove', 'WebLabel15MouseMove');\r\n WebLabel72.SetParentComponent(pnlSUBFORM_DIV);\r\n WebLabel72.Name := 'WebLabel72';\r\n WebLabel72.Left := 0;\r\n WebLabel72.Top := 1148;\r\n WebLabel72.Width := 1087;\r\n WebLabel72.Height := 13;\r\n WebLabel72.Align := alBottom;\r\n WebLabel72.ElementClassName := 'BOX_BOTTOMBORDER';\r\n WebLabel72.HeightPercent := 100.000000000000000000;\r\n WebLabel72.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel72, Self, 'OnMouseMove', 'WebLabel15MouseMove');\r\n htmlTop.SetParentComponent(pnlSUBFORM_DIV);\r\n htmlTop.Name := 'htmlTop';\r\n htmlTop.Left := 0;\r\n htmlTop.Top := 0;\r\n htmlTop.Width := 1087;\r\n htmlTop.Height := 71;\r\n htmlTop.Align := alTop;\r\n htmlTop.ChildOrder := 2;\r\n htmlTop.HTML.BeginUpdate;\r\n try\r\n htmlTop.HTML.Clear;\r\n htmlTop.HTML.Add('');\r\n htmlTop.HTML.Add('');\r\n htmlTop.HTML.Add('');\r\n htmlTop.HTML.Add('');\r\n htmlTop.HTML.Add('');\r\n htmlTop.HTML.Add('');\r\n htmlTop.HTML.Add('');\r\n finally\r\n htmlTop.HTML.EndUpdate;\r\n end;\r\n htmlTop.Visible := False;\r\n pnlQuestion.SetParentComponent(pnlSUBFORM_DIV);\r\n pnlQuestion.Name := 'pnlQuestion';\r\n pnlQuestion.Left := 0;\r\n pnlQuestion.Top := 1048;\r\n pnlQuestion.Width := 1087;\r\n pnlQuestion.Height := 100;\r\n pnlQuestion.Align := alBottom;\r\n pnlQuestion.BorderStyle := bsNone;\r\n pnlQuestion.ChildOrder := 8;\r\n pnlQuestion.Color := clWhite;\r\n pnlQuestion.TabOrder := 2;\r\n WebButton1.SetParentComponent(pnlQuestion);\r\n WebButton1.Name := 'WebButton1';\r\n WebButton1.Left := 1119;\r\n WebButton1.Top := 6;\r\n WebButton1.Width := 96;\r\n WebButton1.Height := 25;\r\n WebButton1.Caption := 'WebButton1';\r\n WebButton1.ChildOrder := 7;\r\n WebButton1.HeightPercent := 100.000000000000000000;\r\n WebButton1.Visible := False;\r\n WebButton1.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebButton1, Self, 'OnClick', 'WebButton1Click');\r\n pnlQAI_Question.SetParentComponent(pnlQuestion);\r\n pnlQAI_Question.Name := 'pnlQAI_Question';\r\n pnlQAI_Question.Left := 171;\r\n pnlQAI_Question.Top := 4;\r\n pnlQAI_Question.Width := 836;\r\n pnlQAI_Question.Height := 90;\r\n pnlQAI_Question.ElementClassName := 'qai_question_panel';\r\n pnlQAI_Question.WidthStyle := ssAuto;\r\n pnlQAI_Question.WidthPercent := 50.000000000000000000;\r\n pnlQAI_Question.BorderColor := clWhite;\r\n pnlQAI_Question.BorderStyle := bsNone;\r\n pnlQAI_Question.ChildOrder := 7;\r\n pnlQAI_Question.Color := clWhite;\r\n pnlQAI_Question.ElementPosition := epRelative;\r\n pnlQAI_Question.TabOrder := 1;\r\n memQAI_Question.SetParentComponent(pnlQAI_Question);\r\n memQAI_Question.Name := 'memQAI_Question';\r\n memQAI_Question.Tag := -1;\r\n memQAI_Question.Left := 0;\r\n memQAI_Question.Top := 0;\r\n memQAI_Question.Width := 836;\r\n memQAI_Question.Height := 69;\r\n memQAI_Question.Align := alClient;\r\n memQAI_Question.Color := clWhite;\r\n memQAI_Question.ElementClassName := 'qai_question_memo';\r\n memQAI_Question.ElementFont := efCSS;\r\n memQAI_Question.HeightPercent := 100.000000000000000000;\r\n memQAI_Question.Lines.BeginUpdate;\r\n try\r\n memQAI_Question.Lines.Clear;\r\n memQAI_Question.Lines.Add('Type your question here');\r\n finally\r\n memQAI_Question.Lines.EndUpdate;\r\n end;\r\n memQAI_Question.ScrollBars := ssNone;\r\n memQAI_Question.SelLength := 0;\r\n memQAI_Question.SelStart := 25;\r\n memQAI_Question.ShowFocus := False;\r\n memQAI_Question.WidthPercent := 100.000000000000000000;\r\n SetEvent(memQAI_Question, Self, 'OnChange', 'memQAI_QuestionChange');\r\n SetEvent(memQAI_Question, Self, 'OnEnter', 'memQAI_QuestionEnter');\r\n SetEvent(memQAI_Question, Self, 'OnExit', 'memQAI_QuestionExit');\r\n SetEvent(memQAI_Question, Self, 'OnKeyDown', 'memQAI_QuestionKeyDown');\r\n SetEvent(memQAI_Question, Self, 'OnMouseDown', 'memQAI_QuestionMouseDown');\r\n SetEvent(memQAI_Question, Self, 'OnMouseMove', 'memQAI_QuestionMouseMove');\r\n cbSessions.SetParentComponent(pnlQAI_Question);\r\n cbSessions.Name := 'cbSessions';\r\n cbSessions.Left := 0;\r\n cbSessions.Top := 69;\r\n cbSessions.Width := 836;\r\n cbSessions.Height := 21;\r\n cbSessions.Align := alBottom;\r\n cbSessions.ElementClassName := 'qai_sessionlist';\r\n cbSessions.ElementFont := efCSS;\r\n cbSessions.HeightStyle := ssAuto;\r\n cbSessions.HeightPercent := 100.000000000000000000;\r\n cbSessions.ShowFocus := False;\r\n cbSessions.Text := 'Select from recent Session list';\r\n cbSessions.WidthPercent := 100.000000000000000000;\r\n SetEvent(cbSessions, Self, 'OnChange', 'cbSessionsChange');\r\n SetEvent(cbSessions, Self, 'OnEnter', 'cbSessionsEnter');\r\n SetEvent(cbSessions, Self, 'OnExit', 'cbSessionsExit');\r\n cbSessions.ItemIndex := 0;\r\n cbSessions.Items.BeginUpdate;\r\n try\r\n cbSessions.Items.Clear;\r\n cbSessions.Items.Add('Select from recent Session list');\r\n finally\r\n cbSessions.Items.EndUpdate;\r\n end;\r\n btnMicStart.SetParentComponent(pnlQAI_Question);\r\n btnMicStart.Name := 'btnMicStart';\r\n btnMicStart.Left := 741;\r\n btnMicStart.Top := 20;\r\n btnMicStart.Width := 30;\r\n btnMicStart.Height := 33;\r\n btnMicStart.Cursor := crHandPoint;\r\n btnMicStart.Hint := 'turn the microphone on/off';\r\n btnMicStart.Margins.Left := 1;\r\n btnMicStart.Margins.Top := 1;\r\n btnMicStart.Margins.Right := 1;\r\n btnMicStart.Margins.Bottom := 1;\r\n btnMicStart.Caption := '';\r\n btnMicStart.Color := clNone;\r\n btnMicStart.ElementClassName := 'qai_micbutton';\r\n btnMicStart.ElementFont := efCSS;\r\n btnMicStart.ElementPosition := epIgnore;\r\n btnMicStart.Font.Charset := DEFAULT_CHARSET;\r\n btnMicStart.Font.Color := clWindowText;\r\n btnMicStart.Font.Height := -11;\r\n btnMicStart.Font.Name := 'Tahoma';\r\n btnMicStart.Font.Style := [];\r\n btnMicStart.HeightPercent := 100.000000000000000000;\r\n btnMicStart.ParentFont := False;\r\n btnMicStart.ShowHint := True;\r\n btnMicStart.WidthPercent := 100.000000000000000000;\r\n btnTransferFiles.SetParentComponent(pnlQAI_Question);\r\n btnTransferFiles.Name := 'btnTransferFiles';\r\n btnTransferFiles.Left := 773;\r\n btnTransferFiles.Top := 20;\r\n btnTransferFiles.Width := 30;\r\n btnTransferFiles.Height := 33;\r\n btnTransferFiles.Cursor := crHandPoint;\r\n btnTransferFiles.Hint := 'Upload Files';\r\n btnTransferFiles.Margins.Left := 1;\r\n btnTransferFiles.Margins.Right := 1;\r\n btnTransferFiles.Margins.Bottom := 1;\r\n btnTransferFiles.Caption := '';\r\n btnTransferFiles.Color := clNone;\r\n btnTransferFiles.ElementClassName := 'qai_transferFiles';\r\n btnTransferFiles.ElementFont := efCSS;\r\n btnTransferFiles.ElementPosition := epIgnore;\r\n btnTransferFiles.Font.Charset := DEFAULT_CHARSET;\r\n btnTransferFiles.Font.Color := clWindowText;\r\n btnTransferFiles.Font.Height := -11;\r\n btnTransferFiles.Font.Name := 'Tahoma';\r\n btnTransferFiles.Font.Style := [];\r\n btnTransferFiles.HeightPercent := 100.000000000000000000;\r\n btnTransferFiles.ParentFont := False;\r\n btnTransferFiles.ShowHint := True;\r\n btnTransferFiles.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnTransferFiles, Self, 'OnClick', 'btnTransferFilesClick');\r\n SetEvent(btnTransferFiles, Self, 'OnMouseMove', 'btnSendFromDBMouseMove');\r\n btnSendQuestion.SetParentComponent(pnlQAI_Question);\r\n btnSendQuestion.Name := 'btnSendQuestion';\r\n btnSendQuestion.Left := 805;\r\n btnSendQuestion.Top := 20;\r\n btnSendQuestion.Width := 30;\r\n btnSendQuestion.Height := 33;\r\n btnSendQuestion.Cursor := crHandPoint;\r\n btnSendQuestion.Hint := 'Send Question';\r\n btnSendQuestion.Margins.Left := 1;\r\n btnSendQuestion.Margins.Right := 1;\r\n btnSendQuestion.Margins.Bottom := 1;\r\n btnSendQuestion.Caption := '';\r\n btnSendQuestion.Color := clNone;\r\n btnSendQuestion.ElementClassName := 'qai_sendquestion';\r\n btnSendQuestion.ElementFont := efCSS;\r\n btnSendQuestion.ElementPosition := epIgnore;\r\n btnSendQuestion.Font.Charset := DEFAULT_CHARSET;\r\n btnSendQuestion.Font.Color := clWindowText;\r\n btnSendQuestion.Font.Height := -11;\r\n btnSendQuestion.Font.Name := 'Tahoma';\r\n btnSendQuestion.Font.Style := [];\r\n btnSendQuestion.HeightPercent := 100.000000000000000000;\r\n btnSendQuestion.ParentFont := False;\r\n btnSendQuestion.ShowHint := True;\r\n btnSendQuestion.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnSendQuestion, Self, 'OnClick', 'btnSendQuestionClick');\r\n SetEvent(btnSendQuestion, Self, 'OnMouseMove', 'btnSendFromDBMouseMove');\r\n pnlQAI_FormButtons.SetParentComponent(pnlSUBFORM_DIV);\r\n pnlQAI_FormButtons.Name := 'pnlQAI_FormButtons';\r\n pnlQAI_FormButtons.Left := 0;\r\n pnlQAI_FormButtons.Top := 1161;\r\n pnlQAI_FormButtons.Width := 1087;\r\n pnlQAI_FormButtons.Height := 37;\r\n pnlQAI_FormButtons.Align := alBottom;\r\n pnlQAI_FormButtons.BorderStyle := bsNone;\r\n pnlQAI_FormButtons.ChildOrder := 8;\r\n pnlQAI_FormButtons.Color := clWhite;\r\n pnlQAI_FormButtons.TabOrder := 3;\r\n WebButton2.SetParentComponent(pnlQAI_FormButtons);\r\n WebButton2.Name := 'WebButton2';\r\n WebButton2.Left := 1119;\r\n WebButton2.Top := 6;\r\n WebButton2.Width := 96;\r\n WebButton2.Height := 25;\r\n WebButton2.Caption := 'WebButton1';\r\n WebButton2.ChildOrder := 7;\r\n WebButton2.HeightPercent := 100.000000000000000000;\r\n WebButton2.Visible := False;\r\n WebButton2.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebButton2, Self, 'OnClick', 'WebButton1Click');\r\n pnlQuestionButtons.SetParentComponent(pnlQAI_FormButtons);\r\n pnlQuestionButtons.Name := 'pnlQuestionButtons';\r\n pnlQuestionButtons.Left := 90;\r\n pnlQuestionButtons.Top := 2;\r\n pnlQuestionButtons.Width := 879;\r\n pnlQuestionButtons.Height := 33;\r\n pnlQuestionButtons.ElementClassName := 'qai_questionbuttons_panel';\r\n pnlQuestionButtons.WidthStyle := ssAuto;\r\n pnlQuestionButtons.WidthPercent := 50.000000000000000000;\r\n pnlQuestionButtons.BorderColor := clWhite;\r\n pnlQuestionButtons.BorderStyle := bsNone;\r\n pnlQuestionButtons.ChildOrder := 7;\r\n pnlQuestionButtons.Color := clWhite;\r\n pnlQuestionButtons.ElementPosition := epRelative;\r\n pnlQuestionButtons.TabOrder := 1;\r\n btnClearQuestion.SetParentComponent(pnlQuestionButtons);\r\n btnClearQuestion.Name := 'btnClearQuestion';\r\n btnClearQuestion.Left := 263;\r\n btnClearQuestion.Top := 0;\r\n btnClearQuestion.Width := 40;\r\n btnClearQuestion.Height := 33;\r\n btnClearQuestion.Cursor := crHandPoint;\r\n btnClearQuestion.Hint := 'Clear Question';\r\n btnClearQuestion.Align := alLeft;\r\n btnClearQuestion.Color := clNone;\r\n btnClearQuestion.ElementClassName := 'btn_icon';\r\n btnClearQuestion.Font.Charset := DEFAULT_CHARSET;\r\n btnClearQuestion.Font.Color := clGray;\r\n btnClearQuestion.Font.Height := -13;\r\n btnClearQuestion.Font.Name := 'Tahoma';\r\n btnClearQuestion.Font.Style := [];\r\n btnClearQuestion.HeightPercent := 100.000000000000000000;\r\n btnClearQuestion.MaterialGlyph := 'backspace';\r\n btnClearQuestion.MaterialGlyphSize := 36;\r\n btnClearQuestion.ParentFont := False;\r\n btnClearQuestion.ShowHint := True;\r\n btnClearQuestion.Visible := False;\r\n btnClearQuestion.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnClearQuestion, Self, 'OnClick', 'btnClearQuestionClick');\r\n SetEvent(btnClearQuestion, Self, 'OnMouseMove', 'btnSendFromDBMouseMove');\r\n btnStopResponse.SetParentComponent(pnlQuestionButtons);\r\n btnStopResponse.Name := 'btnStopResponse';\r\n btnStopResponse.Left := 303;\r\n btnStopResponse.Top := 0;\r\n btnStopResponse.Width := 40;\r\n btnStopResponse.Height := 33;\r\n btnStopResponse.Cursor := crHandPoint;\r\n btnStopResponse.Hint := 'Stop';\r\n btnStopResponse.Align := alLeft;\r\n btnStopResponse.Caption := '';\r\n btnStopResponse.Color := clNone;\r\n btnStopResponse.ElementClassName := 'btn_icon';\r\n btnStopResponse.Font.Charset := DEFAULT_CHARSET;\r\n btnStopResponse.Font.Color := clGray;\r\n btnStopResponse.Font.Height := -13;\r\n btnStopResponse.Font.Name := 'Tahoma';\r\n btnStopResponse.Font.Style := [];\r\n btnStopResponse.HeightPercent := 100.000000000000000000;\r\n btnStopResponse.MaterialGlyphSize := 36;\r\n btnStopResponse.ParentFont := False;\r\n btnStopResponse.ShowHint := True;\r\n btnStopResponse.Visible := False;\r\n btnStopResponse.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnStopResponse, Self, 'OnClick', 'btnStopResponseClick');\r\n SetEvent(btnStopResponse, Self, 'OnMouseMove', 'btnSendFromDBMouseMove');\r\n btnShowCurrentSessionInfo.SetParentComponent(pnlQuestionButtons);\r\n btnShowCurrentSessionInfo.Name := 'btnShowCurrentSessionInfo';\r\n btnShowCurrentSessionInfo.Left := 343;\r\n btnShowCurrentSessionInfo.Top := 0;\r\n btnShowCurrentSessionInfo.Width := 40;\r\n btnShowCurrentSessionInfo.Height := 33;\r\n btnShowCurrentSessionInfo.Cursor := crHandPoint;\r\n btnShowCurrentSessionInfo.Hint := 'Show Current Session Info';\r\n btnShowCurrentSessionInfo.Align := alLeft;\r\n btnShowCurrentSessionInfo.Caption := '';\r\n btnShowCurrentSessionInfo.Color := clNone;\r\n btnShowCurrentSessionInfo.ElementClassName := 'btn_icon';\r\n btnShowCurrentSessionInfo.Font.Charset := DEFAULT_CHARSET;\r\n btnShowCurrentSessionInfo.Font.Color := clGray;\r\n btnShowCurrentSessionInfo.Font.Height := -13;\r\n btnShowCurrentSessionInfo.Font.Name := 'Tahoma';\r\n btnShowCurrentSessionInfo.Font.Style := [];\r\n btnShowCurrentSessionInfo.HeightPercent := 100.000000000000000000;\r\n btnShowCurrentSessionInfo.MaterialGlyphSize := 36;\r\n btnShowCurrentSessionInfo.ParentFont := False;\r\n btnShowCurrentSessionInfo.ShowHint := True;\r\n btnShowCurrentSessionInfo.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnShowCurrentSessionInfo, Self, 'OnClick', 'btnShowCurrentSessionInfoClick');\r\n SetEvent(btnShowCurrentSessionInfo, Self, 'OnMouseMove', 'btnSendFromDBMouseMove');\r\n btnNewChat.SetParentComponent(pnlQuestionButtons);\r\n btnNewChat.Name := 'btnNewChat';\r\n btnNewChat.Left := 503;\r\n btnNewChat.Top := 0;\r\n btnNewChat.Width := 40;\r\n btnNewChat.Height := 33;\r\n btnNewChat.Cursor := crHandPoint;\r\n btnNewChat.Hint := 'New Chat';\r\n btnNewChat.Align := alLeft;\r\n btnNewChat.Caption := '';\r\n btnNewChat.ChildOrder := 86;\r\n btnNewChat.Color := clNone;\r\n btnNewChat.ElementClassName := 'btn_icon';\r\n btnNewChat.Font.Charset := DEFAULT_CHARSET;\r\n btnNewChat.Font.Color := clGray;\r\n btnNewChat.Font.Height := -13;\r\n btnNewChat.Font.Name := 'Tahoma';\r\n btnNewChat.Font.Style := [];\r\n btnNewChat.HeightPercent := 100.000000000000000000;\r\n btnNewChat.MaterialGlyphSize := 36;\r\n btnNewChat.ParentFont := False;\r\n btnNewChat.TabOrder := 7;\r\n btnNewChat.WidthPercent := 9.000000000000000000;\r\n SetEvent(btnNewChat, Self, 'OnClick', 'btnNewChatClick');\r\n SetEvent(btnNewChat, Self, 'OnMouseMove', 'btnSendFromDBMouseMove');\r\n btnCloseForm.SetParentComponent(pnlQuestionButtons);\r\n btnCloseForm.Name := 'btnCloseForm';\r\n btnCloseForm.Left := 543;\r\n btnCloseForm.Top := 0;\r\n btnCloseForm.Width := 40;\r\n btnCloseForm.Height := 33;\r\n btnCloseForm.Cursor := crHandPoint;\r\n btnCloseForm.Hint := 'Close';\r\n btnCloseForm.Align := alLeft;\r\n btnCloseForm.Caption := '';\r\n btnCloseForm.Color := clNone;\r\n btnCloseForm.ElementClassName := 'btn_icon';\r\n btnCloseForm.Font.Charset := DEFAULT_CHARSET;\r\n btnCloseForm.Font.Color := clGray;\r\n btnCloseForm.Font.Height := -13;\r\n btnCloseForm.Font.Name := 'Tahoma';\r\n btnCloseForm.Font.Style := [];\r\n btnCloseForm.HeightPercent := 100.000000000000000000;\r\n btnCloseForm.MaterialGlyphSize := 36;\r\n btnCloseForm.ParentFont := False;\r\n btnCloseForm.TabOrder := 11;\r\n btnCloseForm.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnCloseForm, Self, 'OnClick', 'btnCloseClick');\r\n SetEvent(btnCloseForm, Self, 'OnMouseMove', 'btnSendFromDBMouseMove');\r\n btnSendFromDB.SetParentComponent(pnlQuestionButtons);\r\n btnSendFromDB.Name := 'btnSendFromDB';\r\n btnSendFromDB.Left := 40;\r\n btnSendFromDB.Top := 0;\r\n btnSendFromDB.Width := 40;\r\n btnSendFromDB.Height := 33;\r\n btnSendFromDB.Cursor := crHandPoint;\r\n btnSendFromDB.Hint := 'Upload Data from Database for Assessment';\r\n btnSendFromDB.Align := alLeft;\r\n btnSendFromDB.Caption := '';\r\n btnSendFromDB.Color := clNone;\r\n btnSendFromDB.ElementClassName := 'btn_icon';\r\n btnSendFromDB.ElementFont := efCSS;\r\n btnSendFromDB.Font.Charset := DEFAULT_CHARSET;\r\n btnSendFromDB.Font.Color := clGray;\r\n btnSendFromDB.Font.Height := -13;\r\n btnSendFromDB.Font.Name := 'Tahoma';\r\n btnSendFromDB.Font.Style := [];\r\n btnSendFromDB.HeightPercent := 100.000000000000000000;\r\n btnSendFromDB.MaterialGlyphSize := 36;\r\n btnSendFromDB.ParentFont := False;\r\n btnSendFromDB.ShowHint := True;\r\n btnSendFromDB.Visible := False;\r\n btnSendFromDB.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnSendFromDB, Self, 'OnClick', 'btnSendFromDBClick');\r\n SetEvent(btnSendFromDB, Self, 'OnMouseMove', 'btnSendFromDBMouseMove');\r\n btnSendFromEPIC.SetParentComponent(pnlQuestionButtons);\r\n btnSendFromEPIC.Name := 'btnSendFromEPIC';\r\n btnSendFromEPIC.Left := 129;\r\n btnSendFromEPIC.Top := 0;\r\n btnSendFromEPIC.Width := 54;\r\n btnSendFromEPIC.Height := 33;\r\n btnSendFromEPIC.Cursor := crHandPoint;\r\n btnSendFromEPIC.Hint := 'Uplod EPIC Files for Assessment';\r\n btnSendFromEPIC.Align := alLeft;\r\n btnSendFromEPIC.Caption := '';\r\n btnSendFromEPIC.Color := clNone;\r\n btnSendFromEPIC.ElementClassName := 'btn_icon';\r\n btnSendFromEPIC.Font.Charset := DEFAULT_CHARSET;\r\n btnSendFromEPIC.Font.Color := clGray;\r\n btnSendFromEPIC.Font.Height := -13;\r\n btnSendFromEPIC.Font.Name := 'Tahoma';\r\n btnSendFromEPIC.Font.Style := [];\r\n btnSendFromEPIC.HeightPercent := 100.000000000000000000;\r\n btnSendFromEPIC.MaterialGlyphSize := 1;\r\n btnSendFromEPIC.ParentFont := False;\r\n btnSendFromEPIC.Visible := False;\r\n btnSendFromEPIC.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnSendFromEPIC, Self, 'OnClick', 'btnSendFromEPICClick');\r\n SetEvent(btnSendFromEPIC, Self, 'OnMouseMove', 'btnSendFromDBMouseMove');\r\n btnSendFromCerner.SetParentComponent(pnlQuestionButtons);\r\n btnSendFromCerner.Name := 'btnSendFromCerner';\r\n btnSendFromCerner.Left := 80;\r\n btnSendFromCerner.Top := 0;\r\n btnSendFromCerner.Width := 49;\r\n btnSendFromCerner.Height := 33;\r\n btnSendFromCerner.Cursor := crHandPoint;\r\n btnSendFromCerner.Hint := 'Upload CERNER Files for Assessment';\r\n btnSendFromCerner.Align := alLeft;\r\n btnSendFromCerner.Caption := '';\r\n btnSendFromCerner.Color := clNone;\r\n btnSendFromCerner.ElementClassName := 'btn_icon';\r\n btnSendFromCerner.Font.Charset := DEFAULT_CHARSET;\r\n btnSendFromCerner.Font.Color := clGray;\r\n btnSendFromCerner.Font.Height := -13;\r\n btnSendFromCerner.Font.Name := 'Tahoma';\r\n btnSendFromCerner.Font.Style := [];\r\n btnSendFromCerner.HeightPercent := 100.000000000000000000;\r\n btnSendFromCerner.MaterialGlyphSize := 1;\r\n btnSendFromCerner.ParentFont := False;\r\n btnSendFromCerner.Visible := False;\r\n btnSendFromCerner.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnSendFromCerner, Self, 'OnClick', 'btnSendFromCernerClick');\r\n SetEvent(btnSendFromCerner, Self, 'OnMouseMove', 'btnSendFromDBMouseMove');\r\n btnTransferFiles_bidding.SetParentComponent(pnlQuestionButtons);\r\n btnTransferFiles_bidding.Name := 'btnTransferFiles_bidding';\r\n btnTransferFiles_bidding.Tag := 1;\r\n btnTransferFiles_bidding.Left := 183;\r\n btnTransferFiles_bidding.Top := 0;\r\n btnTransferFiles_bidding.Width := 40;\r\n btnTransferFiles_bidding.Height := 33;\r\n btnTransferFiles_bidding.Cursor := crHandPoint;\r\n btnTransferFiles_bidding.Hint := 'Transfer Bidding Files';\r\n btnTransferFiles_bidding.Align := alLeft;\r\n btnTransferFiles_bidding.Caption := '';\r\n btnTransferFiles_bidding.Color := clNone;\r\n btnTransferFiles_bidding.ElementClassName := 'btn_icon';\r\n btnTransferFiles_bidding.Font.Charset := DEFAULT_CHARSET;\r\n btnTransferFiles_bidding.Font.Color := clGray;\r\n btnTransferFiles_bidding.Font.Height := -13;\r\n btnTransferFiles_bidding.Font.Name := 'Tahoma';\r\n btnTransferFiles_bidding.Font.Style := [];\r\n btnTransferFiles_bidding.HeightPercent := 100.000000000000000000;\r\n btnTransferFiles_bidding.MaterialGlyphSize := 36;\r\n btnTransferFiles_bidding.ParentFont := False;\r\n btnTransferFiles_bidding.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnTransferFiles_bidding, Self, 'OnClick', 'btnTransferFiles_biddingClick');\r\n SetEvent(btnTransferFiles_bidding, Self, 'OnMouseMove', 'btnSendFromDBMouseMove');\r\n btnCaptureImage.SetParentComponent(pnlQuestionButtons);\r\n btnCaptureImage.Name := 'btnCaptureImage';\r\n btnCaptureImage.Left := 383;\r\n btnCaptureImage.Top := 0;\r\n btnCaptureImage.Width := 40;\r\n btnCaptureImage.Height := 33;\r\n btnCaptureImage.Cursor := crHandPoint;\r\n btnCaptureImage.Hint := 'Capture Image';\r\n btnCaptureImage.Align := alLeft;\r\n btnCaptureImage.Caption := '';\r\n btnCaptureImage.Color := clNone;\r\n btnCaptureImage.ElementClassName := 'btn_icon';\r\n btnCaptureImage.Font.Charset := DEFAULT_CHARSET;\r\n btnCaptureImage.Font.Color := clGray;\r\n btnCaptureImage.Font.Height := -13;\r\n btnCaptureImage.Font.Name := 'Tahoma';\r\n btnCaptureImage.Font.Style := [];\r\n btnCaptureImage.HeightPercent := 100.000000000000000000;\r\n btnCaptureImage.MaterialGlyphSize := 36;\r\n btnCaptureImage.ParentFont := False;\r\n btnCaptureImage.ShowHint := True;\r\n btnCaptureImage.Visible := False;\r\n btnCaptureImage.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnCaptureImage, Self, 'OnClick', 'btnCaptureImageClick');\r\n SetEvent(btnCaptureImage, Self, 'OnMouseMove', 'btnSendFromDBMouseMove');\r\n btnZoomIn.SetParentComponent(pnlQuestionButtons);\r\n btnZoomIn.Name := 'btnZoomIn';\r\n btnZoomIn.Left := 423;\r\n btnZoomIn.Top := 0;\r\n btnZoomIn.Width := 40;\r\n btnZoomIn.Height := 33;\r\n btnZoomIn.Cursor := crHandPoint;\r\n btnZoomIn.Hint := 'Capture Image';\r\n btnZoomIn.Align := alLeft;\r\n btnZoomIn.Caption := '';\r\n btnZoomIn.Color := clNone;\r\n btnZoomIn.ElementClassName := 'btn_icon';\r\n btnZoomIn.Font.Charset := DEFAULT_CHARSET;\r\n btnZoomIn.Font.Color := clGray;\r\n btnZoomIn.Font.Height := -13;\r\n btnZoomIn.Font.Name := 'Tahoma';\r\n btnZoomIn.Font.Style := [];\r\n btnZoomIn.HeightPercent := 100.000000000000000000;\r\n btnZoomIn.MaterialGlyphSize := 36;\r\n btnZoomIn.ParentFont := False;\r\n btnZoomIn.ShowHint := True;\r\n btnZoomIn.Visible := False;\r\n btnZoomIn.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnZoomIn, Self, 'OnClick', 'btnZoomInClick');\r\n SetEvent(btnZoomIn, Self, 'OnMouseMove', 'btnSendFromDBMouseMove');\r\n btnZoomOut.SetParentComponent(pnlQuestionButtons);\r\n btnZoomOut.Name := 'btnZoomOut';\r\n btnZoomOut.Left := 463;\r\n btnZoomOut.Top := 0;\r\n btnZoomOut.Width := 40;\r\n btnZoomOut.Height := 33;\r\n btnZoomOut.Cursor := crHandPoint;\r\n btnZoomOut.Hint := 'Capture Image';\r\n btnZoomOut.Align := alLeft;\r\n btnZoomOut.Caption := '';\r\n btnZoomOut.Color := clNone;\r\n btnZoomOut.ElementClassName := 'btn_icon';\r\n btnZoomOut.Font.Charset := DEFAULT_CHARSET;\r\n btnZoomOut.Font.Color := clGray;\r\n btnZoomOut.Font.Height := -13;\r\n btnZoomOut.Font.Name := 'Tahoma';\r\n btnZoomOut.Font.Style := [];\r\n btnZoomOut.HeightPercent := 100.000000000000000000;\r\n btnZoomOut.MaterialGlyphSize := 36;\r\n btnZoomOut.ParentFont := False;\r\n btnZoomOut.ShowHint := True;\r\n btnZoomOut.Visible := False;\r\n btnZoomOut.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnZoomOut, Self, 'OnClick', 'btnZoomOutClick');\r\n SetEvent(btnZoomOut, Self, 'OnMouseMove', 'btnSendFromDBMouseMove');\r\n btnLoadImages.SetParentComponent(pnlQuestionButtons);\r\n btnLoadImages.Name := 'btnLoadImages';\r\n btnLoadImages.Left := 223;\r\n btnLoadImages.Top := 0;\r\n btnLoadImages.Width := 40;\r\n btnLoadImages.Height := 33;\r\n btnLoadImages.Cursor := crHandPoint;\r\n btnLoadImages.Hint := 'Load Images';\r\n btnLoadImages.Align := alLeft;\r\n btnLoadImages.Caption := '';\r\n btnLoadImages.Color := clNone;\r\n btnLoadImages.ElementClassName := 'btn_icon';\r\n btnLoadImages.Font.Charset := DEFAULT_CHARSET;\r\n btnLoadImages.Font.Color := clGray;\r\n btnLoadImages.Font.Height := -13;\r\n btnLoadImages.Font.Name := 'Tahoma';\r\n btnLoadImages.Font.Style := [];\r\n btnLoadImages.HeightPercent := 100.000000000000000000;\r\n btnLoadImages.MaterialGlyphSize := 36;\r\n btnLoadImages.ParentFont := False;\r\n btnLoadImages.Visible := False;\r\n btnLoadImages.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnLoadImages, Self, 'OnClick', 'btnLoadImagesClick');\r\n SetEvent(btnLoadImages, Self, 'OnMouseMove', 'btnSendFromDBMouseMove');\r\n btnRequestFromKnowledgeBase.SetParentComponent(pnlQuestionButtons);\r\n btnRequestFromKnowledgeBase.Name := 'btnRequestFromKnowledgeBase';\r\n btnRequestFromKnowledgeBase.Left := 0;\r\n btnRequestFromKnowledgeBase.Top := 0;\r\n btnRequestFromKnowledgeBase.Width := 40;\r\n btnRequestFromKnowledgeBase.Height := 33;\r\n btnRequestFromKnowledgeBase.Cursor := crHandPoint;\r\n btnRequestFromKnowledgeBase.Hint := 'Build the Knowledge Base';\r\n btnRequestFromKnowledgeBase.Align := alLeft;\r\n btnRequestFromKnowledgeBase.Caption := '';\r\n btnRequestFromKnowledgeBase.Color := clNone;\r\n btnRequestFromKnowledgeBase.ElementClassName := 'btn_icon';\r\n btnRequestFromKnowledgeBase.ElementFont := efCSS;\r\n btnRequestFromKnowledgeBase.Font.Charset := DEFAULT_CHARSET;\r\n btnRequestFromKnowledgeBase.Font.Color := clGray;\r\n btnRequestFromKnowledgeBase.Font.Height := -13;\r\n btnRequestFromKnowledgeBase.Font.Name := 'Tahoma';\r\n btnRequestFromKnowledgeBase.Font.Style := [];\r\n btnRequestFromKnowledgeBase.HeightPercent := 100.000000000000000000;\r\n btnRequestFromKnowledgeBase.MaterialGlyphSize := 36;\r\n btnRequestFromKnowledgeBase.ParentFont := False;\r\n btnRequestFromKnowledgeBase.ShowHint := True;\r\n btnRequestFromKnowledgeBase.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnRequestFromKnowledgeBase, Self, 'OnClick', 'btnRequestFromKnowledgeBaseClick');\r\n SetEvent(btnRequestFromKnowledgeBase, Self, 'OnMouseMove', 'btnSendFromDBMouseMove');\r\n pnlDataBlocks.Top := 71;\r\n pnlDataBlocks.Width := 1087;\r\n pnlDataBlocks.Height := 964;\r\n SubForm_DIV.Width := 1087;\r\n SubForm_DIV.Height := 845;\r\n WebLabel8.Height := 28;\r\n WebLabel18.Height := 28;\r\n G1.Columns.Clear;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n WebLabel7.Height := 28;\r\n WebLabel47.Height := 28;\r\n WebLabel3.Height := 28;\r\n WebLabel4.Height := 28;\r\n WebLabel5.Height := 28;\r\n WebLabel55.Height := 28;\r\n WebLabel46.Height := 28;\r\n WebLabel6.Height := 28;\r\n WebLabel11.Height := 28;\r\n WebLabel10.Height := 28;\r\n WebLabel9.Height := 28;\r\n WebLabel53.Height := 28;\r\n WebLabel54.Height := 28;\r\n WebLabel48.Height := 28;\r\n WebLabel49.Height := 28;\r\n WebLabel50.Height := 28;\r\n WebLabel51.Height := 28;\r\n WebLabel52.Height := 28;\r\n WebLabel41.Height := 28;\r\n WebLabel42.Height := 28;\r\n WebLabel43.Height := 28;\r\n WebLabel44.Height := 28;\r\n WebLabel45.Height := 28;\r\n WebLabel38.Height := 28;\r\n WebLabel40.Height := 28;\r\n WebLabel37.Height := 28;\r\n WebLabel39.Height := 28;\r\n WebLabel36.Height := 24;\r\n WebLabel12.Height := 28;\r\n WebLabel14.Height := 28;\r\n G9.Columns.Clear;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n WebLabel21.Height := 28;\r\n G2.Columns.Clear;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n WebLabel22.Height := 28;\r\n G5.Columns.Clear;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n WebLabel19.Height := 28;\r\n G4.Columns.Clear;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n WebLabel17.Height := 28;\r\n G3.Columns.Clear;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n WebLabel20.Height := 28;\r\n G6.Columns.Clear;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n WebLabel23.Height := 28;\r\n G7.Columns.Clear;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n WebLabel24.Height := 28;\r\n G8.Columns.Clear;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n wmWaitMessage.Picture.LoadFromFile('UDF_QAI.SubForm_DIV.wmWaitMessage.Picture.gif');\r\n WebLabel16.Height := 28;\r\n WebLabel25.Height := 28;\r\n WebLabel33.Height := 28;\r\n WebLabel34.Height := 28;\r\n WebLabel35.Height := 28;\r\n WebLabel56.Height := 28;\r\n WebLabel57.Height := 28;\r\n WebLabel58.Height := 28;\r\n WebLabel59.Height := 28;\r\n WebLabel60.Height := 28;\r\n WebLabel61.Height := 28;\r\n B42.Left := 179;\r\n WebLabel62.Height := 28;\r\n WebLabel63.Height := 28;\r\n WebLabel64.Height := 28;\r\n WebLabel65.Height := 28;\r\n WebLabel66.Height := 28;\r\n WebLabel67.Height := 28;\r\n WebLabel68.Height := 28;\r\n WebLabel69.Height := 28;\r\n WebLabel70.Height := 28;\r\n WebProgressBar1.SetParentComponent(SubForm_DIV);\r\n WebProgressBar1.Name := 'WebProgressBar1';\r\n WebProgressBar1.Left := 697;\r\n WebProgressBar1.Top := 589;\r\n WebProgressBar1.Width := 300;\r\n WebProgressBar1.Height := 25;\r\n WebProgressBar1.ChildOrder := 61;\r\n WebProgressBar1.Visible := False;\r\n ImageGrid.SetParentComponent(pnlDataBlocks);\r\n ImageGrid.Name := 'ImageGrid';\r\n ImageGrid.Left := 0;\r\n ImageGrid.Top := 845;\r\n ImageGrid.Width := 1087;\r\n ImageGrid.Height := 119;\r\n ImageGrid.Align := alBottom;\r\n ImageGrid.ChildOrder := 23;\r\n ImageGrid.ItemIndex := 0;\r\n ImageGrid.Options.ItemHoverBorderColor := clWhite;\r\n ImageGrid.Options.ItemSelectedBorderColor := clWhite;\r\n ImageGrid.Options.ItemPadding := 3;\r\n ImageGrid.Options.ItemTemplate := #39'
'#39;\r\n ImageGrid.Visible := False;\r\n ImageGrid.DataSource := DM.dsImages;\r\n tmQAI.SetParentComponent(Self);\r\n tmQAI.Name := 'tmQAI';\r\n tmQAI.Enabled := False;\r\n tmQAI.Interval := 1;\r\n SetEvent(tmQAI, Self, 'OnTimer', 'tmQAITimer');\r\n tmQAI.Left := 354;\r\n tmSendFileClick.SetParentComponent(Self);\r\n tmSendFileClick.Name := 'tmSendFileClick';\r\n tmSendFileClick.Enabled := False;\r\n SetEvent(tmSendFileClick, Self, 'OnTimer', 'tmSendFileClickTimer');\r\n tmSendFileClick.Left := 434;\r\n tmSendFileClick.Top := 8;\r\n tmSendBiddingDocsClick.SetParentComponent(Self);\r\n tmSendBiddingDocsClick.Name := 'tmSendBiddingDocsClick';\r\n tmSendBiddingDocsClick.Enabled := False;\r\n SetEvent(tmSendBiddingDocsClick, Self, 'OnTimer', 'tmSendBiddingDocsClickTimer');\r\n tmSendBiddingDocsClick.Left := 546;\r\n tmSendBiddingDocsClick.Top := 8;\r\n tmRequestFromKnowledgeBase.SetParentComponent(Self);\r\n tmRequestFromKnowledgeBase.Name := 'tmRequestFromKnowledgeBase';\r\n tmRequestFromKnowledgeBase.Enabled := False;\r\n SetEvent(tmRequestFromKnowledgeBase, Self, 'OnTimer', 'tmRequestFromKnowledgeBaseTimer');\r\n tmRequestFromKnowledgeBase.Left := 802;\r\n tmRequestFromKnowledgeBase.Top := 16;\r\n finally\r\n WebLabel15.AfterLoadDFMValues;\r\n WebLabel13.AfterLoadDFMValues;\r\n WebLabel2.AfterLoadDFMValues;\r\n pnlBottom.AfterLoadDFMValues;\r\n tbReport.AfterLoadDFMValues;\r\n pnlFormButtons.AfterLoadDFMValues;\r\n btnCustom1.AfterLoadDFMValues;\r\n btnCustom2.AfterLoadDFMValues;\r\n btnCustom3.AfterLoadDFMValues;\r\n btnCustom4.AfterLoadDFMValues;\r\n btnCustom5.AfterLoadDFMValues;\r\n btnPost.AfterLoadDFMValues;\r\n btnAdd.AfterLoadDFMValues;\r\n btnRefresh.AfterLoadDFMValues;\r\n btnUseDefaults.AfterLoadDFMValues;\r\n btnSaveAsDefaults.AfterLoadDFMValues;\r\n btnCustom6.AfterLoadDFMValues;\r\n btnCustom7.AfterLoadDFMValues;\r\n btnCustom8.AfterLoadDFMValues;\r\n btnCustom9.AfterLoadDFMValues;\r\n WebMemo8.AfterLoadDFMValues;\r\n btnClearBlockCustomPositioning.AfterLoadDFMValues;\r\n btnClearBlockCustomSizes.AfterLoadDFMValues;\r\n btnFixBlockPositions.AfterLoadDFMValues;\r\n pnlReportButtons.AfterLoadDFMValues;\r\n btnRefresh_RPT.AfterLoadDFMValues;\r\n btnClose_RPT.AfterLoadDFMValues;\r\n spSideDataSplitter.AfterLoadDFMValues;\r\n pnlFormCaption.AfterLoadDFMValues;\r\n pnlSideData.AfterLoadDFMValues;\r\n WebLabel75.AfterLoadDFMValues;\r\n sbSideData.AfterLoadDFMValues;\r\n sb6.AfterLoadDFMValues;\r\n WebPanel9.AfterLoadDFMValues;\r\n WebLabel26.AfterLoadDFMValues;\r\n sb5.AfterLoadDFMValues;\r\n WebPanel12.AfterLoadDFMValues;\r\n WebLabel27.AfterLoadDFMValues;\r\n sb4.AfterLoadDFMValues;\r\n WebPanel22.AfterLoadDFMValues;\r\n WebLabel28.AfterLoadDFMValues;\r\n sb3.AfterLoadDFMValues;\r\n WebPanel25.AfterLoadDFMValues;\r\n WebLabel29.AfterLoadDFMValues;\r\n sb2.AfterLoadDFMValues;\r\n WebPanel30.AfterLoadDFMValues;\r\n WebLabel30.AfterLoadDFMValues;\r\n sb1.AfterLoadDFMValues;\r\n WebPanel32.AfterLoadDFMValues;\r\n WebLabel31.AfterLoadDFMValues;\r\n sb7.AfterLoadDFMValues;\r\n WebPanel34.AfterLoadDFMValues;\r\n WebLabel32.AfterLoadDFMValues;\r\n sb101.AfterLoadDFMValues;\r\n WebPanel10.AfterLoadDFMValues;\r\n WebLabel1.AfterLoadDFMValues;\r\n SG1.AfterLoadDFMValues;\r\n sb102.AfterLoadDFMValues;\r\n WebPanel23.AfterLoadDFMValues;\r\n WebLabel73.AfterLoadDFMValues;\r\n SG2.AfterLoadDFMValues;\r\n sb103.AfterLoadDFMValues;\r\n WebPanel35.AfterLoadDFMValues;\r\n WebLabel74.AfterLoadDFMValues;\r\n SG3.AfterLoadDFMValues;\r\n pnlQAI_SidedataBottom.AfterLoadDFMValues;\r\n pnlSideDataButtons.AfterLoadDFMValues;\r\n WebBitBtn1.AfterLoadDFMValues;\r\n WebBitBtn2.AfterLoadDFMValues;\r\n btnAddToFavorites.AfterLoadDFMValues;\r\n btnSuggestedQuestions.AfterLoadDFMValues;\r\n pnlSUBFORM_DIV.AfterLoadDFMValues;\r\n WebLabel71.AfterLoadDFMValues;\r\n WebLabel72.AfterLoadDFMValues;\r\n htmlTop.AfterLoadDFMValues;\r\n pnlQuestion.AfterLoadDFMValues;\r\n WebButton1.AfterLoadDFMValues;\r\n pnlQAI_Question.AfterLoadDFMValues;\r\n memQAI_Question.AfterLoadDFMValues;\r\n cbSessions.AfterLoadDFMValues;\r\n btnMicStart.AfterLoadDFMValues;\r\n btnTransferFiles.AfterLoadDFMValues;\r\n btnSendQuestion.AfterLoadDFMValues;\r\n pnlQAI_FormButtons.AfterLoadDFMValues;\r\n WebButton2.AfterLoadDFMValues;\r\n pnlQuestionButtons.AfterLoadDFMValues;\r\n btnClearQuestion.AfterLoadDFMValues;\r\n btnStopResponse.AfterLoadDFMValues;\r\n btnShowCurrentSessionInfo.AfterLoadDFMValues;\r\n btnNewChat.AfterLoadDFMValues;\r\n btnCloseForm.AfterLoadDFMValues;\r\n btnSendFromDB.AfterLoadDFMValues;\r\n btnSendFromEPIC.AfterLoadDFMValues;\r\n btnSendFromCerner.AfterLoadDFMValues;\r\n btnTransferFiles_bidding.AfterLoadDFMValues;\r\n btnCaptureImage.AfterLoadDFMValues;\r\n btnZoomIn.AfterLoadDFMValues;\r\n btnZoomOut.AfterLoadDFMValues;\r\n btnLoadImages.AfterLoadDFMValues;\r\n btnRequestFromKnowledgeBase.AfterLoadDFMValues;\r\n pnlDataBlocks.AfterLoadDFMValues;\r\n SubForm_DIV.AfterLoadDFMValues;\r\n b26.AfterLoadDFMValues;\r\n WebPanel13.AfterLoadDFMValues;\r\n WebLabel8.AfterLoadDFMValues;\r\n B101.AfterLoadDFMValues;\r\n WebPanel14.AfterLoadDFMValues;\r\n WebLabel18.AfterLoadDFMValues;\r\n G1.AfterLoadDFMValues;\r\n B25.AfterLoadDFMValues;\r\n WebPanel11.AfterLoadDFMValues;\r\n WebLabel7.AfterLoadDFMValues;\r\n B20.AfterLoadDFMValues;\r\n WebPanel95.AfterLoadDFMValues;\r\n WebLabel47.AfterLoadDFMValues;\r\n B21.AfterLoadDFMValues;\r\n WebPanel2.AfterLoadDFMValues;\r\n WebLabel3.AfterLoadDFMValues;\r\n B22.AfterLoadDFMValues;\r\n WebPanel4.AfterLoadDFMValues;\r\n WebLabel4.AfterLoadDFMValues;\r\n b23.AfterLoadDFMValues;\r\n WebPanel6.AfterLoadDFMValues;\r\n WebLabel5.AfterLoadDFMValues;\r\n B18.AfterLoadDFMValues;\r\n WebPanel111.AfterLoadDFMValues;\r\n WebLabel55.AfterLoadDFMValues;\r\n B19.AfterLoadDFMValues;\r\n WebPanel93.AfterLoadDFMValues;\r\n WebLabel46.AfterLoadDFMValues;\r\n B24.AfterLoadDFMValues;\r\n WebPanel8.AfterLoadDFMValues;\r\n WebLabel6.AfterLoadDFMValues;\r\n B29.AfterLoadDFMValues;\r\n WebPanel19.AfterLoadDFMValues;\r\n WebLabel11.AfterLoadDFMValues;\r\n B28.AfterLoadDFMValues;\r\n WebPanel17.AfterLoadDFMValues;\r\n WebLabel10.AfterLoadDFMValues;\r\n B27.AfterLoadDFMValues;\r\n WebPanel15.AfterLoadDFMValues;\r\n WebLabel9.AfterLoadDFMValues;\r\n B16.AfterLoadDFMValues;\r\n WebPanel107.AfterLoadDFMValues;\r\n WebLabel53.AfterLoadDFMValues;\r\n B17.AfterLoadDFMValues;\r\n WebPanel109.AfterLoadDFMValues;\r\n WebLabel54.AfterLoadDFMValues;\r\n B15.AfterLoadDFMValues;\r\n WebPanel97.AfterLoadDFMValues;\r\n WebLabel48.AfterLoadDFMValues;\r\n B14.AfterLoadDFMValues;\r\n WebPanel99.AfterLoadDFMValues;\r\n WebLabel49.AfterLoadDFMValues;\r\n B13.AfterLoadDFMValues;\r\n WebPanel101.AfterLoadDFMValues;\r\n WebLabel50.AfterLoadDFMValues;\r\n B12.AfterLoadDFMValues;\r\n WebPanel103.AfterLoadDFMValues;\r\n WebLabel51.AfterLoadDFMValues;\r\n B11.AfterLoadDFMValues;\r\n WebPanel105.AfterLoadDFMValues;\r\n WebLabel52.AfterLoadDFMValues;\r\n B6.AfterLoadDFMValues;\r\n WebPanel80.AfterLoadDFMValues;\r\n WebLabel41.AfterLoadDFMValues;\r\n B7.AfterLoadDFMValues;\r\n WebPanel82.AfterLoadDFMValues;\r\n WebLabel42.AfterLoadDFMValues;\r\n B8.AfterLoadDFMValues;\r\n WebPanel86.AfterLoadDFMValues;\r\n WebLabel43.AfterLoadDFMValues;\r\n B9.AfterLoadDFMValues;\r\n WebPanel88.AfterLoadDFMValues;\r\n WebLabel44.AfterLoadDFMValues;\r\n B10.AfterLoadDFMValues;\r\n WebPanel91.AfterLoadDFMValues;\r\n WebLabel45.AfterLoadDFMValues;\r\n B5.AfterLoadDFMValues;\r\n WebPanel74.AfterLoadDFMValues;\r\n WebLabel38.AfterLoadDFMValues;\r\n B4.AfterLoadDFMValues;\r\n WebPanel78.AfterLoadDFMValues;\r\n WebLabel40.AfterLoadDFMValues;\r\n B3.AfterLoadDFMValues;\r\n WebPanel72.AfterLoadDFMValues;\r\n WebLabel37.AfterLoadDFMValues;\r\n B2.AfterLoadDFMValues;\r\n WebPanel76.AfterLoadDFMValues;\r\n WebLabel39.AfterLoadDFMValues;\r\n B1.AfterLoadDFMValues;\r\n WebPanel70.AfterLoadDFMValues;\r\n WebLabel36.AfterLoadDFMValues;\r\n B30.AfterLoadDFMValues;\r\n WebPanel21.AfterLoadDFMValues;\r\n WebLabel12.AfterLoadDFMValues;\r\n B100.AfterLoadDFMValues;\r\n WebPanel3.AfterLoadDFMValues;\r\n WebLabel14.AfterLoadDFMValues;\r\n G9.AfterLoadDFMValues;\r\n B102.AfterLoadDFMValues;\r\n WebPanel24.AfterLoadDFMValues;\r\n WebLabel21.AfterLoadDFMValues;\r\n G2.AfterLoadDFMValues;\r\n B105.AfterLoadDFMValues;\r\n WebPanel26.AfterLoadDFMValues;\r\n WebLabel22.AfterLoadDFMValues;\r\n G5.AfterLoadDFMValues;\r\n B104.AfterLoadDFMValues;\r\n WebPanel18.AfterLoadDFMValues;\r\n WebLabel19.AfterLoadDFMValues;\r\n G4.AfterLoadDFMValues;\r\n B103.AfterLoadDFMValues;\r\n WebPanel7.AfterLoadDFMValues;\r\n WebLabel17.AfterLoadDFMValues;\r\n G3.AfterLoadDFMValues;\r\n B106.AfterLoadDFMValues;\r\n WebPanel20.AfterLoadDFMValues;\r\n WebLabel20.AfterLoadDFMValues;\r\n G6.AfterLoadDFMValues;\r\n B107.AfterLoadDFMValues;\r\n WebPanel27.AfterLoadDFMValues;\r\n WebLabel23.AfterLoadDFMValues;\r\n G7.AfterLoadDFMValues;\r\n B108.AfterLoadDFMValues;\r\n WebPanel29.AfterLoadDFMValues;\r\n WebLabel24.AfterLoadDFMValues;\r\n G8.AfterLoadDFMValues;\r\n wmWaitMessage.AfterLoadDFMValues;\r\n B31.AfterLoadDFMValues;\r\n WebPanel5.AfterLoadDFMValues;\r\n WebLabel16.AfterLoadDFMValues;\r\n B32.AfterLoadDFMValues;\r\n WebPanel16.AfterLoadDFMValues;\r\n WebLabel25.AfterLoadDFMValues;\r\n B33.AfterLoadDFMValues;\r\n WebPanel28.AfterLoadDFMValues;\r\n WebLabel33.AfterLoadDFMValues;\r\n B34.AfterLoadDFMValues;\r\n WebPanel33.AfterLoadDFMValues;\r\n WebLabel34.AfterLoadDFMValues;\r\n B35.AfterLoadDFMValues;\r\n WebPanel36.AfterLoadDFMValues;\r\n WebLabel35.AfterLoadDFMValues;\r\n B36.AfterLoadDFMValues;\r\n WebPanel38.AfterLoadDFMValues;\r\n WebLabel56.AfterLoadDFMValues;\r\n B37.AfterLoadDFMValues;\r\n WebPanel40.AfterLoadDFMValues;\r\n WebLabel57.AfterLoadDFMValues;\r\n B38.AfterLoadDFMValues;\r\n WebPanel42.AfterLoadDFMValues;\r\n WebLabel58.AfterLoadDFMValues;\r\n B39.AfterLoadDFMValues;\r\n WebPanel44.AfterLoadDFMValues;\r\n WebLabel59.AfterLoadDFMValues;\r\n B40.AfterLoadDFMValues;\r\n WebPanel46.AfterLoadDFMValues;\r\n WebLabel60.AfterLoadDFMValues;\r\n B41.AfterLoadDFMValues;\r\n WebPanel48.AfterLoadDFMValues;\r\n WebLabel61.AfterLoadDFMValues;\r\n B42.AfterLoadDFMValues;\r\n WebPanel50.AfterLoadDFMValues;\r\n WebLabel62.AfterLoadDFMValues;\r\n B43.AfterLoadDFMValues;\r\n WebPanel52.AfterLoadDFMValues;\r\n WebLabel63.AfterLoadDFMValues;\r\n B44.AfterLoadDFMValues;\r\n WebPanel54.AfterLoadDFMValues;\r\n WebLabel64.AfterLoadDFMValues;\r\n B45.AfterLoadDFMValues;\r\n WebPanel56.AfterLoadDFMValues;\r\n WebLabel65.AfterLoadDFMValues;\r\n B46.AfterLoadDFMValues;\r\n WebPanel58.AfterLoadDFMValues;\r\n WebLabel66.AfterLoadDFMValues;\r\n B47.AfterLoadDFMValues;\r\n WebPanel60.AfterLoadDFMValues;\r\n WebLabel67.AfterLoadDFMValues;\r\n B48.AfterLoadDFMValues;\r\n WebPanel62.AfterLoadDFMValues;\r\n WebLabel68.AfterLoadDFMValues;\r\n B49.AfterLoadDFMValues;\r\n WebPanel64.AfterLoadDFMValues;\r\n WebLabel69.AfterLoadDFMValues;\r\n B50.AfterLoadDFMValues;\r\n WebPanel66.AfterLoadDFMValues;\r\n WebLabel70.AfterLoadDFMValues;\r\n WebProgressBar1.AfterLoadDFMValues;\r\n ImageGrid.AfterLoadDFMValues;\r\n tmQAI.AfterLoadDFMValues;\r\n tmSendFileClick.AfterLoadDFMValues;\r\n tmSendBiddingDocsClick.AfterLoadDFMValues;\r\n tmRequestFromKnowledgeBase.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit UDF_ImageEditor;\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.WebCtrls, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, WEBLib.ExtCtrls, Vcl.Imaging.pngimage, WEBLib.Buttons,\r\n WEBLib.Grids, WEBLib.DBCtrls, Data.DB, WEBLib.DB, XData.Web.JsonDataset,\r\n XData.Web.Client, XData.Web.Dataset;\r\n\r\ntype\r\n TfrmUDF_ImageEditor = class(TForm)\r\n imgEd2: THTMLDiv;\r\n pnlBottomButtons: TPanel;\r\n btnPost: TBitBtn;\r\n btnClose: TBitBtn;\r\n ImageGrid: TDBResponsiveGrid;\r\n xdsImages: TXDataWebDataSet;\r\n xdsImagesIMAGEBASE64: TMemoField;\r\n dsImages: TDataSource;\r\n xdsImagesPROCEDURENUMBER: TIntegerField;\r\n xdsImagesIMAGENUMBER: TIntegerField;\r\n xdsImagesIMAGE: TBlobField;\r\n xdsImagesIMAGEBASE64_DATA: TMemoField;\r\n procedure WebFormCreate(Sender: TObject);\r\n procedure WebFormHashChange(Sender: TObject; oldURL, newURL: string);\r\n procedure getUpdatedImageBase64;\r\n procedure btnPostClick(Sender: TObject);\r\n procedure WebFormShow(Sender: TObject);\r\n procedure btnCloseClick(Sender: TObject);\r\n procedure WebFormClose(Sender: TObject; var Action: TCloseAction);\r\n procedure xdsImagesAfterOpen(DataSet: TDataSet);\r\n procedure ImageGridItemClick(Sender: TObject; Index: Integer);\r\n private\r\n { Private declarations }\r\n filerobotImageEditor: TJSElement;\r\n Images_Loaded: Boolean;\r\n public\r\n { Public declarations }\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmUDF_ImageEditor: TfrmUDF_ImageEditor;\r\n\r\nimplementation\r\n\r\n{$R *.dfm}\r\n\r\nuses DataModule, Common, Main;\r\n\r\nprocedure TfrmUDF_ImageEditor.ImageGridItemClick(Sender: TObject;\r\n Index: Integer);\r\nvar imagesource_p: string;\r\nbegin\r\n//showmessage(xdsImages.FieldByName('Image').AsString);\r\n\r\nimagesource_p := xdsImages.FieldByName('IMAGEBASE64').AsString;\r\nasm\r\nthis.filerobotImageEditor.config.source = imagesource_p;\r\nthis.filerobotImageEditor.render();\r\n\r\nend;\r\nend;\r\n\r\nprocedure TfrmUDF_ImageEditor.WebFormClose(Sender: TObject;\r\n var Action: TCloseAction);\r\nvar s1,s2,s3: string; grd: TDBGrid;\r\nbegin\r\nChangeMainMenuHighlight;\r\ngrd := nil;\r\nif assigned(getpreviousform) and assigned(getpreviousform.findcomponent('GRDDYNAMICGRID'))\r\nthen grd := ( getpreviousform.findcomponent('GRDDYNAMICGRID') as TDBGrid);\r\nif grd <> nil\r\nthen SetKeyVariablesFromDataSet(grd.datasource.dataset, true);\r\nDBF_GetPostBlocks(frmmain.sbLogoBox, 0, frmmain);\r\nDBF_GetPostBlocks(frmmain.sbAlertBoxes, 0, frmmain);\r\nDBF_GetPostBlocks(frmmain.sbInfoBoxes, 0, frmmain);\r\nReleaseGridDatasets(getcurrentform);\r\nRefreshGridDatasources(getpreviousform);\r\nHideFormContainer(true);\r\nend;\r\n\r\nprocedure TfrmUDF_ImageEditor.WebFormCreate(Sender: TObject);\r\nbegin\r\nopendataset_j(xdsImages,'select IMAGENUMBER, IMAGE, SEQUENCE, SELECTED, LABEL from imagesevault where procedurenumber = ' + EGV_CURRENT_PROCEDURENUMBER); //37168\r\nend;\r\n\r\nprocedure TfrmUDF_ImageEditor.WebFormHashChange(Sender: TObject; oldURL, newURL: string);\r\nbegin\r\n if window.location.hash='' then\r\n Close;\r\nend;\r\n\r\nprocedure TfrmUDF_ImageEditor.WebFormShow(Sender: TObject);\r\nbegin\r\n\r\nImageGrid.Options.ItemHeight := ImageGrid.Width - 10;\r\nResizeButtons(pnlBottomButtons);\r\nEGV_CURRENTFORMNAME := dm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform()-1)];\r\ncase (getsubform() - 1) of\r\n 1: egv_subform.Name := EGV_CURRENTFORMNAME;\r\n 2: egv_subform2.Name := EGV_CURRENTFORMNAME;\r\n 3: egv_subform3.Name := EGV_CURRENTFORMNAME;\r\n 4: egv_subform4.Name := EGV_CURRENTFORMNAME;\r\n 5: egv_subform5.Name := EGV_CURRENTFORMNAME;\r\n 6: egv_subform5.Name := EGV_CURRENTFORMNAME;\r\n 7: egv_subform5.Name := EGV_CURRENTFORMNAME;\r\n 8: egv_subform5.Name := EGV_CURRENTFORMNAME;\r\n 9: egv_subform5.Name := EGV_CURRENTFORMNAME;\r\nend;\r\n//if frmmain.wmWaitMessage.showing and (frmmain.wmWaitMessage.Tag = 0) then frmmain.wmWaitMessage.hide;\r\nend;\r\n\r\nprocedure TfrmUDF_ImageEditor.xdsImagesAfterOpen(DataSet: TDataSet);\r\nvar base64_image: string; imagesource_p: string;\r\nbegin\r\nPrepareFieldsdata_J(Dataset);\r\ndataset.First;\r\n\r\nwhile not dataset.Eof\r\ndo begin\r\n base64_image := window.btoa(DataSet.FieldByName('Image').AsString);\r\n dataset.Edit;\r\n dataset.FieldByName('IMAGEBASE64').AsString := 'data:image/jpeg;base64,' + base64_image;\r\n dataset.FieldByName('IMAGEBASE64_DATA').AsString := base64_image;\r\n dataset.Post;\r\n dataset.Next;\r\n end;\r\ndataset.First;\r\n\r\n imagesource_p := xdsImages.FieldByName('IMAGEBASE64').AsString;\r\n // showmessage('4');\r\n asm\r\n const { TABS, TOOLS } = FilerobotImageEditor;\r\n const config = {\r\n source: imagesource_p,\r\n // source: 'https://scaleflex.airstore.io/demo/stephen-walker-unsplash.jpg',\r\n // onSave: (editedImageObject, designState) => console.log('saved', editedImageObject, designState),\r\n annotationsCommon: {\r\n fill: '#ff0000'\r\n },\r\n Text: { text: 'Something...' },\r\n tabsIds: [TABS.ADJUST,TABS.ANNOTATE,TABS.FINETUNE,TABS.FILTERS,TABS.RESIZE,TABS.WATERMARK],\r\n defaultTabId: TABS.ANNOTATE,\r\n defaultToolId: TOOLS.TEXT,\r\n // removeSaveButton: true\r\n resetOnImageSourceChange: true\r\n };\r\n this.filerobotImageEditor = new FilerobotImageEditor( document.querySelector('#editor_container'), config );\r\n this.filerobotImageEditor.render({\r\n// onClose: (closingReason) => {\r\n// console.log('Closing reason', closingReason);\r\n// filerobotImageEdtior.terminate();\r\n// }\r\n });\r\n end;\r\n\r\nend;\r\n\r\nprocedure TfrmUDF_ImageEditor.btnCloseClick(Sender: TObject);\r\nbegin\r\nasm\r\nthis.filerobotImageEditor.terminate();\r\nend;\r\nself.Close;\r\nend;\r\n\r\nprocedure TfrmUDF_ImageEditor.btnPostClick(Sender: TObject);\r\nbegin\r\ngetUpdatedImageBase64;\r\nend;\r\n\r\nprocedure TfrmUDF_ImageEditor.getUpdatedImageBase64;\r\nvar\r\n s, NewImg:String;\r\n MyClass: TComponent;\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p: string;\r\n begin\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n // showmessage('Update BLOB: '+ response_p);\r\n end;\r\nbegin\r\n asm\r\n const NewImgData = this.filerobotImageEditor.getCurrentImgData();\r\n var NewImg = NewImgData.imageData.imageBase64;\r\n// console.log(NewImg);\r\n end;\r\n try\r\n xdsImages.Edit;\r\n xdsImages.FieldByName('IMAGEBASE64').asstring := NewImg;\r\n xdsImages.post;\r\n NewImg := Copy(NewImg,23,Length(NewImg));\r\n s := 'select IMAGENUMBER, IMAGE, SEQUENCE, SELECTED, LABEL from imagesevault where procedurenumber = ' + xdsImagesPROCEDURENUMBER.AsString +\r\n ' and IMAGENUMBER = ' + xdsImagesIMAGENUMBER.AsString;\r\n if dm.XDataWebConnection2.Connected then dm.XDataWebClient2.RawInvoke('IReportService.UpdateBLOB',[s, 'IMAGE', NewIMG, egv_facilityid, '0'], @OnResult);\r\n //showmessage('updated image: ' + NewImg);\r\n finally\r\n end;\r\nend;\r\n\r\nprocedure TfrmUDF_ImageEditor.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n imgEd2 := THTMLDiv.Create('editor_container');\r\n pnlBottomButtons := TPanel.Create(Self);\r\n btnPost := TBitBtn.Create(Self);\r\n btnClose := TBitBtn.Create(Self);\r\n ImageGrid := TDBResponsiveGrid.Create(Self);\r\n xdsImages := TXDataWebDataSet.Create(Self);\r\n xdsImagesIMAGE := TBlobField.Create(Self);\r\n xdsImagesIMAGEBASE64 := TMemoField.Create(Self);\r\n xdsImagesPROCEDURENUMBER := TIntegerField.Create(Self);\r\n xdsImagesIMAGENUMBER := TIntegerField.Create(Self);\r\n xdsImagesIMAGEBASE64_DATA := TMemoField.Create(Self);\r\n dsImages := TDataSource.Create(Self);\r\n\r\n imgEd2.BeforeLoadDFMValues;\r\n pnlBottomButtons.BeforeLoadDFMValues;\r\n btnPost.BeforeLoadDFMValues;\r\n btnClose.BeforeLoadDFMValues;\r\n ImageGrid.BeforeLoadDFMValues;\r\n xdsImages.BeforeLoadDFMValues;\r\n xdsImagesIMAGE.BeforeLoadDFMValues;\r\n xdsImagesIMAGEBASE64.BeforeLoadDFMValues;\r\n xdsImagesPROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsImagesIMAGENUMBER.BeforeLoadDFMValues;\r\n xdsImagesIMAGEBASE64_DATA.BeforeLoadDFMValues;\r\n dsImages.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmUDF_ImageEditor';\r\n Width := 878;\r\n Height := 655;\r\n SetEvent(Self, 'OnClose', 'WebFormClose');\r\n SetEvent(Self, 'OnCreate', 'WebFormCreate');\r\n SetEvent(Self, 'OnHashChange', 'WebFormHashChange');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n imgEd2.SetParentComponent(Self);\r\n imgEd2.Name := 'imgEd2';\r\n imgEd2.Left := 0;\r\n imgEd2.Top := 0;\r\n imgEd2.Width := 720;\r\n imgEd2.Height := 614;\r\n imgEd2.Margins.Left := 0;\r\n imgEd2.Margins.Top := 50;\r\n imgEd2.Margins.Right := 0;\r\n imgEd2.Margins.Bottom := 0;\r\n imgEd2.Align := alClient;\r\n imgEd2.Role := '';\r\n pnlBottomButtons.SetParentComponent(Self);\r\n pnlBottomButtons.Name := 'pnlBottomButtons';\r\n pnlBottomButtons.Left := 0;\r\n pnlBottomButtons.Top := 614;\r\n pnlBottomButtons.Width := 878;\r\n pnlBottomButtons.Height := 41;\r\n pnlBottomButtons.Align := alBottom;\r\n pnlBottomButtons.BorderColor := clWhite;\r\n pnlBottomButtons.BorderStyle := bsNone;\r\n pnlBottomButtons.ChildOrder := 1;\r\n pnlBottomButtons.Color := clWhite;\r\n pnlBottomButtons.TabOrder := 1;\r\n btnPost.SetParentComponent(pnlBottomButtons);\r\n btnPost.Name := 'btnPost';\r\n btnPost.Left := 698;\r\n btnPost.Top := 0;\r\n btnPost.Width := 90;\r\n btnPost.Height := 41;\r\n btnPost.Cursor := crHandPoint;\r\n btnPost.Hint := 'Post';\r\n btnPost.Align := alRight;\r\n btnPost.Caption := 'Post';\r\n btnPost.ChildOrder := 87;\r\n btnPost.Color := clNone;\r\n btnPost.ElementClassName := 'btn_icon';\r\n btnPost.Font.Charset := DEFAULT_CHARSET;\r\n btnPost.Font.Color := clGray;\r\n btnPost.Font.Height := -13;\r\n btnPost.Font.Name := 'Tahoma';\r\n btnPost.Font.Style := [];\r\n btnPost.HeightPercent := 100.000000000000000000;\r\n btnPost.MaterialGlyph := 'check';\r\n btnPost.MaterialGlyphSize := 1;\r\n btnPost.ParentFont := False;\r\n btnPost.TabOrder := 6;\r\n btnPost.WidthPercent := 9.000000000000000000;\r\n SetEvent(btnPost, Self, 'OnClick', 'btnPostClick');\r\n btnClose.SetParentComponent(pnlBottomButtons);\r\n btnClose.Name := 'btnClose';\r\n btnClose.Left := 788;\r\n btnClose.Top := 0;\r\n btnClose.Width := 90;\r\n btnClose.Height := 41;\r\n btnClose.Cursor := crHandPoint;\r\n btnClose.Hint := 'Close';\r\n btnClose.Align := alRight;\r\n btnClose.Caption := 'Close';\r\n btnClose.Color := clNone;\r\n btnClose.ElementClassName := 'btn_icon';\r\n btnClose.Font.Charset := DEFAULT_CHARSET;\r\n btnClose.Font.Color := clGray;\r\n btnClose.Font.Height := -13;\r\n btnClose.Font.Name := 'Tahoma';\r\n btnClose.Font.Style := [];\r\n btnClose.HeightPercent := 100.000000000000000000;\r\n btnClose.MaterialGlyph := 'close';\r\n btnClose.MaterialGlyphSize := 1;\r\n btnClose.ParentFont := False;\r\n btnClose.TabOrder := 11;\r\n btnClose.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnClose, Self, 'OnClick', 'btnCloseClick');\r\n ImageGrid.SetParentComponent(Self);\r\n ImageGrid.Name := 'ImageGrid';\r\n ImageGrid.Left := 720;\r\n ImageGrid.Top := 0;\r\n ImageGrid.Width := 158;\r\n ImageGrid.Height := 614;\r\n ImageGrid.Align := alRight;\r\n ImageGrid.ChildOrder := 23;\r\n ImageGrid.ItemIndex := 0;\r\n ImageGrid.Options.ItemHoverBorderColor := clWhite;\r\n ImageGrid.Options.ItemSelectedBorderColor := clWhite;\r\n ImageGrid.Options.ItemPadding := 3;\r\n ImageGrid.Options.ItemTemplate := #39'
'#39;\r\n SetEvent(ImageGrid, Self, 'OnItemClick', 'ImageGridItemClick');\r\n ImageGrid.DataSource := dsImages;\r\n xdsImages.SetParentComponent(Self);\r\n xdsImages.Name := 'xdsImages';\r\n xdsImages.AfterOpen := xdsImagesAfterOpen;\r\n xdsImages.EntitySetName := 'IMAGESEVAULT';\r\n xdsImages.Left := 48;\r\n xdsImages.Top := 304;\r\n xdsImagesIMAGE.SetParentComponent(xdsImages);\r\n xdsImagesIMAGE.Name := 'xdsImagesIMAGE';\r\n xdsImagesIMAGE.FieldName := 'IMAGE';\r\n xdsImagesIMAGEBASE64.SetParentComponent(xdsImages);\r\n xdsImagesIMAGEBASE64.Name := 'xdsImagesIMAGEBASE64';\r\n xdsImagesIMAGEBASE64.Tag := -1;\r\n xdsImagesIMAGEBASE64.FieldName := 'IMAGEBASE64';\r\n xdsImagesIMAGEBASE64.BlobType := ftMemo;\r\n xdsImagesPROCEDURENUMBER.SetParentComponent(xdsImages);\r\n xdsImagesPROCEDURENUMBER.Name := 'xdsImagesPROCEDURENUMBER';\r\n xdsImagesPROCEDURENUMBER.Tag := 1;\r\n xdsImagesPROCEDURENUMBER.FieldName := 'PROCEDURENUMBER';\r\n xdsImagesIMAGENUMBER.SetParentComponent(xdsImages);\r\n xdsImagesIMAGENUMBER.Name := 'xdsImagesIMAGENUMBER';\r\n xdsImagesIMAGENUMBER.Tag := 1;\r\n xdsImagesIMAGENUMBER.FieldName := 'IMAGENUMBER';\r\n xdsImagesIMAGEBASE64_DATA.SetParentComponent(xdsImages);\r\n xdsImagesIMAGEBASE64_DATA.Name := 'xdsImagesIMAGEBASE64_DATA';\r\n xdsImagesIMAGEBASE64_DATA.FieldName := 'IMAGEBASE64_DATA';\r\n xdsImagesIMAGEBASE64_DATA.BlobType := ftMemo;\r\n dsImages.SetParentComponent(Self);\r\n dsImages.Name := 'dsImages';\r\n dsImages.DataSet := xdsImages;\r\n dsImages.Left := 48;\r\n dsImages.Top := 352;\r\n finally\r\n imgEd2.AfterLoadDFMValues;\r\n pnlBottomButtons.AfterLoadDFMValues;\r\n btnPost.AfterLoadDFMValues;\r\n btnClose.AfterLoadDFMValues;\r\n ImageGrid.AfterLoadDFMValues;\r\n xdsImages.AfterLoadDFMValues;\r\n xdsImagesIMAGE.AfterLoadDFMValues;\r\n xdsImagesIMAGEBASE64.AfterLoadDFMValues;\r\n xdsImagesPROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsImagesIMAGENUMBER.AfterLoadDFMValues;\r\n xdsImagesIMAGEBASE64_DATA.AfterLoadDFMValues;\r\n dsImages.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","unit UDF_CernerAPI;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,\r\n Vcl.Controls, Vcl.Forms, Vcl.Dialogs, EditForm_Base, VCL.TMSFNCTypes,\r\n VCL.TMSFNCUtils, VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes, WEBLib.Grids,\r\n WEBLib.WebCtrls, Vcl.Imaging.GIFImg, WEBLib.Controls, WEBLib.Dialogs,\r\n Vcl.Grids, WEBLib.DBCtrls, WEBLib.ExtCtrls, WEBLib.Buttons, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, VCL.TMSFNCCustomControl, VCL.TMSFNCSwitch, WEBLib.Calendar;\r\n\r\ntype\r\n TfrmUDF_CernerAPI = class(TfrmEditForm_Base)\r\n pnlTop: TPanel;\r\n LFB_dateRange: TPanel;\r\n dpStartDate: TDateTimePicker;\r\n dpEndDate: TDateTimePicker;\r\n WebSpeedButton70: TSpeedButton;\r\n btnRange_calendar: TBitBtn;\r\n btnRange_todaye: TBitBtn;\r\n btnRange_dayback: TBitBtn;\r\n btnRange_dayforward: TBitBtn;\r\n btnGridRefresh: TBitBtn;\r\n cldDayRange: TCalendar;\r\n procedure G1Click(Sender: TObject);\r\n procedure WebFormShow(Sender: TObject);\r\n procedure G3Click(Sender: TObject);\r\n procedure btnRange_calendarClick(Sender: TObject);\r\n procedure btnRange_todayeClick(Sender: TObject);\r\n procedure btnRange_daybackClick(Sender: TObject);\r\n procedure btnRange_dayforwardClick(Sender: TObject);\r\n procedure btnGridRefreshClick(Sender: TObject);\r\n procedure cldDayRangeDateSelected(Sender: TObject; ADate: TDateTime);\r\n private\r\n { Private declarations }\r\n public\r\n { Public declarations }\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmUDF_CernerAPI: TfrmUDF_CernerAPI;\r\n\r\nimplementation\r\n\r\n{$R *.dfm}\r\n\r\nuses Common, Main;\r\n\r\nprocedure TfrmUDF_CernerAPI.btnGridRefreshClick(Sender: TObject);\r\nbegin\r\n inherited;\r\nif not frmmain.wmWaitMessage.showing then begin frmmain.wmWaitMessage.tag := 1; frmmain.wmWaitMessage.show; end;\r\nEGV_STARTDATE := formatdatetime('YYYY.MM.DD', dpStartDate.date);\r\nEGV_ENDDATE := formatdatetime('YYYY.MM.DD', dpEndDate.date);\r\nEGV_STARTDATE_DATE := dpStartDate.date;\r\nEGV_ENDDATE_DATE := dpEndDate.date;\r\n\r\nOpenDataSet_J(G1.DataSource.DataSet, 'CERNER_SCHEDULE');\r\nG2.DataSource.DataSet.Close;\r\nG3.DataSource.DataSet.Close;\r\nend;\r\n\r\nprocedure TfrmUDF_CernerAPI.btnRange_calendarClick(Sender: TObject);\r\nbegin\r\n inherited;\r\ncldDayRange.Top := 0;\r\ncldDayRange.Left := 0;\r\ncldDayRange.selecteddate := date;\r\ncldDayRange.visible := ( not cldDayRange.visible);\r\nend;\r\n\r\nprocedure TfrmUDF_CernerAPI.btnRange_daybackClick(Sender: TObject);\r\nbegin\r\n inherited;\r\ndpStartDate.date := dpStartDate.date - 1;\r\ndpEndDate.date := dpEndDate.date - 1;\r\nbtnGridRefreshclick(nil);\r\nend;\r\n\r\nprocedure TfrmUDF_CernerAPI.btnRange_dayforwardClick(Sender: TObject);\r\nbegin\r\n inherited;\r\ndpStartDate.date := dpStartDate.date + 1;\r\ndpEndDate.date := dpEndDate.date + 1;\r\nbtnGridRefreshclick(nil);\r\nend;\r\n\r\nprocedure TfrmUDF_CernerAPI.btnRange_todayeClick(Sender: TObject);\r\nbegin\r\n inherited;\r\ndpStartdate.date := date;\r\ndpEnddate.date := date;\r\nbtnGridRefreshClick(sender);\r\nend;\r\n\r\nprocedure TfrmUDF_CernerAPI.cldDayRangeDateSelected(Sender: TObject;\r\n ADate: TDateTime);\r\nbegin\r\n inherited;\r\ndpStartdate.date := ADate;\r\ndpEnddate.date := ADate;\r\ncldDayRange.visible := false;\r\nbtnGridRefreshclick(nil);\r\nend;\r\n\r\nprocedure TfrmUDF_CernerAPI.G1Click(Sender: TObject);\r\nbegin\r\n inherited;\r\nif not frmmain.wmWaitMessage.showing then begin frmmain.wmWaitMessage.tag := 1; frmmain.wmWaitMessage.show; end;\r\nG2.DataSource.DataSet.Close;\r\nG3.DataSource.DataSet.Close;\r\nEGV_CURRENT_MRN := G1.DataSource.DataSet.FieldByName('C11').AsString;\r\nEGV_CURRENT_PROCEDURENUMBER := G1.DataSource.DataSet.FieldByName('C1').AsString;\r\nEGV_CURRENT_PATIENTNAME := G1.DataSource.DataSet.FieldByName('C10').AsString;\r\n\r\nELV_CERNERENCOUNTER_ID := G1.DataSource.DataSet.FieldByName('C1').AsString;\r\nELV_CERNERECOUNTER_DATE := G1.DataSource.DataSet.FieldByName('C5').AsString;\r\nELV_CERNERENCOUNTER_TIME := G1.DataSource.DataSet.FieldByName('C6').AsString;\r\nELV_CERNERPROVIDER_CODE := G1.DataSource.DataSet.FieldByName('C9').AsString;\r\nELV_PATIENTCERNERID := G1.DataSource.DataSet.FieldByName('C11').AsString;\r\nELV_CERNERPATIENT_NAME := G1.DataSource.DataSet.FieldByName('C10').AsString;\r\n\r\nELV_CERNERPATIENTSEARCHPARAMS := '_id='+ELV_PATIENTCERNERID;\r\n\r\nOpenDataSet_J(G2.DataSource.DataSet, 'CERNER_PATIENT');\r\nOpenDataSet_J(G3.DataSource.DataSet, 'CERNER_ENCOUNTERS');\r\nend;\r\n\r\nprocedure TfrmUDF_CernerAPI.G3Click(Sender: TObject);\r\nbegin\r\n inherited;\r\nshowmessage(g3.DataSource.DataSet.name);\r\nend;\r\n\r\nprocedure TfrmUDF_CernerAPI.WebFormShow(Sender: TObject);\r\nbegin\r\nEGV_STARTDATE_DATE := date;\r\nEGV_ENDDATE_DATE := date;\r\ndpStartdate.Date := date;\r\ndpEnddate.Date := date;\r\n\r\nif not frmmain.wmWaitMessage.showing then begin frmmain.wmWaitMessage.tag := 1; frmmain.wmWaitMessage.show; end;\r\n//frmmain.wmWaitMessage.hide;\r\n\r\n inherited;\r\n\r\n//asm document.title = \"Argus Med-GPT\"; end;\r\n\r\nend;\r\n\r\nprocedure TfrmUDF_CernerAPI.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n cldDayRange := TCalendar.Create(Self);\r\n pnlTop := TPanel.Create(Self);\r\n LFB_dateRange := TPanel.Create(Self);\r\n dpStartDate := TDateTimePicker.Create(Self);\r\n dpEndDate := TDateTimePicker.Create(Self);\r\n WebSpeedButton70 := TSpeedButton.Create(Self);\r\n btnRange_calendar := TBitBtn.Create(Self);\r\n btnRange_todaye := TBitBtn.Create(Self);\r\n btnRange_dayback := TBitBtn.Create(Self);\r\n btnRange_dayforward := TBitBtn.Create(Self);\r\n btnGridRefresh := TBitBtn.Create(Self);\r\n\r\n WebLabel13.BeforeLoadDFMValues;\r\n pnlBottom.BeforeLoadDFMValues;\r\n pnlFormButtons.BeforeLoadDFMValues;\r\n btnPost.BeforeLoadDFMValues;\r\n btnAdd.BeforeLoadDFMValues;\r\n btnRefresh.BeforeLoadDFMValues;\r\n btnUseDefaults.BeforeLoadDFMValues;\r\n spSideDataSplitter.BeforeLoadDFMValues;\r\n pnlSideData.BeforeLoadDFMValues;\r\n sbSideData.BeforeLoadDFMValues;\r\n sb6.BeforeLoadDFMValues;\r\n WebPanel9.BeforeLoadDFMValues;\r\n WebLabel26.BeforeLoadDFMValues;\r\n sb5.BeforeLoadDFMValues;\r\n WebPanel12.BeforeLoadDFMValues;\r\n WebLabel27.BeforeLoadDFMValues;\r\n sb4.BeforeLoadDFMValues;\r\n WebPanel22.BeforeLoadDFMValues;\r\n WebLabel28.BeforeLoadDFMValues;\r\n sb3.BeforeLoadDFMValues;\r\n WebPanel25.BeforeLoadDFMValues;\r\n WebLabel29.BeforeLoadDFMValues;\r\n sb2.BeforeLoadDFMValues;\r\n WebPanel30.BeforeLoadDFMValues;\r\n WebLabel30.BeforeLoadDFMValues;\r\n sb1.BeforeLoadDFMValues;\r\n WebPanel32.BeforeLoadDFMValues;\r\n WebLabel31.BeforeLoadDFMValues;\r\n sb7.BeforeLoadDFMValues;\r\n WebPanel34.BeforeLoadDFMValues;\r\n WebLabel32.BeforeLoadDFMValues;\r\n sb101.BeforeLoadDFMValues;\r\n WebPanel10.BeforeLoadDFMValues;\r\n WebLabel1.BeforeLoadDFMValues;\r\n SG1.BeforeLoadDFMValues;\r\n sb102.BeforeLoadDFMValues;\r\n WebPanel23.BeforeLoadDFMValues;\r\n WebLabel73.BeforeLoadDFMValues;\r\n SG2.BeforeLoadDFMValues;\r\n sb103.BeforeLoadDFMValues;\r\n WebPanel35.BeforeLoadDFMValues;\r\n WebLabel74.BeforeLoadDFMValues;\r\n SG3.BeforeLoadDFMValues;\r\n pnlSUBFORM_DIV.BeforeLoadDFMValues;\r\n pnlDataBlocks.BeforeLoadDFMValues;\r\n SubForm_DIV.BeforeLoadDFMValues;\r\n b26.BeforeLoadDFMValues;\r\n WebPanel13.BeforeLoadDFMValues;\r\n WebLabel8.BeforeLoadDFMValues;\r\n B101.BeforeLoadDFMValues;\r\n WebPanel14.BeforeLoadDFMValues;\r\n WebLabel18.BeforeLoadDFMValues;\r\n G1.BeforeLoadDFMValues;\r\n B25.BeforeLoadDFMValues;\r\n WebPanel11.BeforeLoadDFMValues;\r\n WebLabel7.BeforeLoadDFMValues;\r\n B20.BeforeLoadDFMValues;\r\n WebPanel95.BeforeLoadDFMValues;\r\n WebLabel47.BeforeLoadDFMValues;\r\n B21.BeforeLoadDFMValues;\r\n WebPanel2.BeforeLoadDFMValues;\r\n WebLabel3.BeforeLoadDFMValues;\r\n B22.BeforeLoadDFMValues;\r\n WebPanel4.BeforeLoadDFMValues;\r\n WebLabel4.BeforeLoadDFMValues;\r\n b23.BeforeLoadDFMValues;\r\n WebPanel6.BeforeLoadDFMValues;\r\n WebLabel5.BeforeLoadDFMValues;\r\n B18.BeforeLoadDFMValues;\r\n WebPanel111.BeforeLoadDFMValues;\r\n WebLabel55.BeforeLoadDFMValues;\r\n B19.BeforeLoadDFMValues;\r\n WebPanel93.BeforeLoadDFMValues;\r\n WebLabel46.BeforeLoadDFMValues;\r\n B24.BeforeLoadDFMValues;\r\n WebPanel8.BeforeLoadDFMValues;\r\n WebLabel6.BeforeLoadDFMValues;\r\n B29.BeforeLoadDFMValues;\r\n WebPanel19.BeforeLoadDFMValues;\r\n WebLabel11.BeforeLoadDFMValues;\r\n B28.BeforeLoadDFMValues;\r\n WebPanel17.BeforeLoadDFMValues;\r\n WebLabel10.BeforeLoadDFMValues;\r\n B27.BeforeLoadDFMValues;\r\n WebPanel15.BeforeLoadDFMValues;\r\n WebLabel9.BeforeLoadDFMValues;\r\n B16.BeforeLoadDFMValues;\r\n WebPanel107.BeforeLoadDFMValues;\r\n WebLabel53.BeforeLoadDFMValues;\r\n B17.BeforeLoadDFMValues;\r\n WebPanel109.BeforeLoadDFMValues;\r\n WebLabel54.BeforeLoadDFMValues;\r\n B15.BeforeLoadDFMValues;\r\n WebPanel97.BeforeLoadDFMValues;\r\n WebLabel48.BeforeLoadDFMValues;\r\n B14.BeforeLoadDFMValues;\r\n WebPanel99.BeforeLoadDFMValues;\r\n WebLabel49.BeforeLoadDFMValues;\r\n B13.BeforeLoadDFMValues;\r\n WebPanel101.BeforeLoadDFMValues;\r\n WebLabel50.BeforeLoadDFMValues;\r\n B12.BeforeLoadDFMValues;\r\n WebPanel103.BeforeLoadDFMValues;\r\n WebLabel51.BeforeLoadDFMValues;\r\n B11.BeforeLoadDFMValues;\r\n WebPanel105.BeforeLoadDFMValues;\r\n WebLabel52.BeforeLoadDFMValues;\r\n B6.BeforeLoadDFMValues;\r\n WebPanel80.BeforeLoadDFMValues;\r\n WebLabel41.BeforeLoadDFMValues;\r\n B7.BeforeLoadDFMValues;\r\n WebPanel82.BeforeLoadDFMValues;\r\n WebLabel42.BeforeLoadDFMValues;\r\n B8.BeforeLoadDFMValues;\r\n WebPanel86.BeforeLoadDFMValues;\r\n WebLabel43.BeforeLoadDFMValues;\r\n B9.BeforeLoadDFMValues;\r\n WebPanel88.BeforeLoadDFMValues;\r\n WebLabel44.BeforeLoadDFMValues;\r\n B10.BeforeLoadDFMValues;\r\n WebPanel91.BeforeLoadDFMValues;\r\n WebLabel45.BeforeLoadDFMValues;\r\n B5.BeforeLoadDFMValues;\r\n WebPanel74.BeforeLoadDFMValues;\r\n WebLabel38.BeforeLoadDFMValues;\r\n B4.BeforeLoadDFMValues;\r\n WebPanel78.BeforeLoadDFMValues;\r\n WebLabel40.BeforeLoadDFMValues;\r\n B3.BeforeLoadDFMValues;\r\n WebPanel72.BeforeLoadDFMValues;\r\n WebLabel37.BeforeLoadDFMValues;\r\n B2.BeforeLoadDFMValues;\r\n WebPanel76.BeforeLoadDFMValues;\r\n WebLabel39.BeforeLoadDFMValues;\r\n B1.BeforeLoadDFMValues;\r\n WebPanel70.BeforeLoadDFMValues;\r\n WebLabel36.BeforeLoadDFMValues;\r\n B30.BeforeLoadDFMValues;\r\n WebPanel21.BeforeLoadDFMValues;\r\n WebLabel12.BeforeLoadDFMValues;\r\n B100.BeforeLoadDFMValues;\r\n WebPanel3.BeforeLoadDFMValues;\r\n WebLabel14.BeforeLoadDFMValues;\r\n G9.BeforeLoadDFMValues;\r\n B102.BeforeLoadDFMValues;\r\n WebPanel24.BeforeLoadDFMValues;\r\n WebLabel21.BeforeLoadDFMValues;\r\n G2.BeforeLoadDFMValues;\r\n B105.BeforeLoadDFMValues;\r\n WebPanel26.BeforeLoadDFMValues;\r\n WebLabel22.BeforeLoadDFMValues;\r\n G5.BeforeLoadDFMValues;\r\n B104.BeforeLoadDFMValues;\r\n WebPanel18.BeforeLoadDFMValues;\r\n WebLabel19.BeforeLoadDFMValues;\r\n G4.BeforeLoadDFMValues;\r\n B103.BeforeLoadDFMValues;\r\n WebPanel7.BeforeLoadDFMValues;\r\n WebLabel17.BeforeLoadDFMValues;\r\n G3.BeforeLoadDFMValues;\r\n B106.BeforeLoadDFMValues;\r\n WebPanel20.BeforeLoadDFMValues;\r\n WebLabel20.BeforeLoadDFMValues;\r\n G6.BeforeLoadDFMValues;\r\n B107.BeforeLoadDFMValues;\r\n WebPanel27.BeforeLoadDFMValues;\r\n WebLabel23.BeforeLoadDFMValues;\r\n G7.BeforeLoadDFMValues;\r\n B108.BeforeLoadDFMValues;\r\n WebPanel29.BeforeLoadDFMValues;\r\n WebLabel24.BeforeLoadDFMValues;\r\n G8.BeforeLoadDFMValues;\r\n wmWaitMessage.BeforeLoadDFMValues;\r\n B31.BeforeLoadDFMValues;\r\n WebPanel5.BeforeLoadDFMValues;\r\n WebLabel16.BeforeLoadDFMValues;\r\n B32.BeforeLoadDFMValues;\r\n WebPanel16.BeforeLoadDFMValues;\r\n WebLabel25.BeforeLoadDFMValues;\r\n B33.BeforeLoadDFMValues;\r\n WebPanel28.BeforeLoadDFMValues;\r\n WebLabel33.BeforeLoadDFMValues;\r\n B34.BeforeLoadDFMValues;\r\n WebPanel33.BeforeLoadDFMValues;\r\n WebLabel34.BeforeLoadDFMValues;\r\n B35.BeforeLoadDFMValues;\r\n WebPanel36.BeforeLoadDFMValues;\r\n WebLabel35.BeforeLoadDFMValues;\r\n B36.BeforeLoadDFMValues;\r\n WebPanel38.BeforeLoadDFMValues;\r\n WebLabel56.BeforeLoadDFMValues;\r\n B37.BeforeLoadDFMValues;\r\n WebPanel40.BeforeLoadDFMValues;\r\n WebLabel57.BeforeLoadDFMValues;\r\n B38.BeforeLoadDFMValues;\r\n WebPanel42.BeforeLoadDFMValues;\r\n WebLabel58.BeforeLoadDFMValues;\r\n B39.BeforeLoadDFMValues;\r\n WebPanel44.BeforeLoadDFMValues;\r\n WebLabel59.BeforeLoadDFMValues;\r\n B40.BeforeLoadDFMValues;\r\n WebPanel46.BeforeLoadDFMValues;\r\n WebLabel60.BeforeLoadDFMValues;\r\n B41.BeforeLoadDFMValues;\r\n WebPanel48.BeforeLoadDFMValues;\r\n WebLabel61.BeforeLoadDFMValues;\r\n B42.BeforeLoadDFMValues;\r\n WebPanel50.BeforeLoadDFMValues;\r\n WebLabel62.BeforeLoadDFMValues;\r\n B43.BeforeLoadDFMValues;\r\n WebPanel52.BeforeLoadDFMValues;\r\n WebLabel63.BeforeLoadDFMValues;\r\n B44.BeforeLoadDFMValues;\r\n WebPanel54.BeforeLoadDFMValues;\r\n WebLabel64.BeforeLoadDFMValues;\r\n B45.BeforeLoadDFMValues;\r\n WebPanel56.BeforeLoadDFMValues;\r\n WebLabel65.BeforeLoadDFMValues;\r\n B46.BeforeLoadDFMValues;\r\n WebPanel58.BeforeLoadDFMValues;\r\n WebLabel66.BeforeLoadDFMValues;\r\n B47.BeforeLoadDFMValues;\r\n WebPanel60.BeforeLoadDFMValues;\r\n WebLabel67.BeforeLoadDFMValues;\r\n B48.BeforeLoadDFMValues;\r\n WebPanel62.BeforeLoadDFMValues;\r\n WebLabel68.BeforeLoadDFMValues;\r\n B49.BeforeLoadDFMValues;\r\n WebPanel64.BeforeLoadDFMValues;\r\n WebLabel69.BeforeLoadDFMValues;\r\n B50.BeforeLoadDFMValues;\r\n WebPanel66.BeforeLoadDFMValues;\r\n WebLabel70.BeforeLoadDFMValues;\r\n cldDayRange.BeforeLoadDFMValues;\r\n pnlTop.BeforeLoadDFMValues;\r\n LFB_dateRange.BeforeLoadDFMValues;\r\n dpStartDate.BeforeLoadDFMValues;\r\n dpEndDate.BeforeLoadDFMValues;\r\n WebSpeedButton70.BeforeLoadDFMValues;\r\n btnRange_calendar.BeforeLoadDFMValues;\r\n btnRange_todaye.BeforeLoadDFMValues;\r\n btnRange_dayback.BeforeLoadDFMValues;\r\n btnRange_dayforward.BeforeLoadDFMValues;\r\n btnGridRefresh.BeforeLoadDFMValues;\r\n try\r\n WebLabel13.Top := 76;\r\n WebLabel13.Height := 857;\r\n btnPost.Visible := False;\r\n btnAdd.Visible := False;\r\n btnRefresh.Visible := False;\r\n btnUseDefaults.Visible := False;\r\n spSideDataSplitter.Top := 76;\r\n spSideDataSplitter.Height := 857;\r\n pnlSideData.Top := 76;\r\n pnlSideData.Height := 857;\r\n sbSideData.Height := 857;\r\n WebLabel26.Height := 28;\r\n WebLabel27.Height := 28;\r\n WebLabel28.Height := 28;\r\n WebLabel29.Height := 28;\r\n WebLabel30.Height := 28;\r\n WebLabel31.Height := 28;\r\n WebLabel32.Height := 28;\r\n WebLabel1.Height := 28;\r\n SG1.Columns.Clear;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n WebLabel73.Height := 28;\r\n SG2.Columns.Clear;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n WebLabel74.Height := 28;\r\n SG3.Columns.Clear;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n pnlSUBFORM_DIV.Top := 76;\r\n pnlSUBFORM_DIV.Height := 857;\r\n pnlDataBlocks.Height := 857;\r\n SubForm_DIV.Height := 857;\r\n WebLabel8.Height := 28;\r\n WebLabel18.Height := 28;\r\n G1.Columns.Clear;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n WebLabel7.Height := 28;\r\n WebLabel47.Height := 28;\r\n WebLabel3.Height := 28;\r\n WebLabel4.Height := 28;\r\n WebLabel5.Height := 28;\r\n WebLabel55.Height := 28;\r\n WebLabel46.Height := 28;\r\n WebLabel6.Height := 28;\r\n WebLabel11.Height := 28;\r\n WebLabel10.Height := 28;\r\n WebLabel9.Height := 28;\r\n WebLabel53.Height := 28;\r\n WebLabel54.Height := 28;\r\n WebLabel48.Height := 28;\r\n WebLabel49.Height := 28;\r\n WebLabel50.Height := 28;\r\n WebLabel51.Height := 28;\r\n WebLabel52.Height := 28;\r\n WebLabel41.Height := 28;\r\n WebLabel42.Height := 28;\r\n WebLabel43.Height := 28;\r\n WebLabel44.Height := 28;\r\n WebLabel45.Height := 28;\r\n WebLabel38.Height := 28;\r\n WebLabel40.Height := 28;\r\n WebLabel37.Height := 28;\r\n WebLabel39.Height := 28;\r\n WebLabel36.Height := 24;\r\n WebLabel12.Height := 28;\r\n WebLabel14.Height := 28;\r\n G9.Columns.Clear;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n WebLabel21.Height := 28;\r\n G2.Columns.Clear;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n WebLabel22.Height := 28;\r\n G5.Columns.Clear;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n WebLabel19.Height := 28;\r\n G4.Columns.Clear;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n WebLabel17.Height := 28;\r\n G3.Columns.Clear;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n SetEvent(G3, Self, 'OnClick', 'G3Click');\r\n WebLabel20.Height := 28;\r\n G6.Columns.Clear;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n WebLabel23.Height := 28;\r\n G7.Columns.Clear;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n WebLabel24.Height := 28;\r\n G8.Columns.Clear;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n wmWaitMessage.Picture.LoadFromFile('UDF_CernerAPI.SubForm_DIV.wmWaitMessage.Picture.gif');\r\n WebLabel16.Height := 28;\r\n WebLabel25.Height := 28;\r\n WebLabel33.Height := 28;\r\n WebLabel34.Height := 28;\r\n WebLabel35.Height := 28;\r\n WebLabel56.Height := 28;\r\n WebLabel57.Height := 28;\r\n WebLabel58.Height := 28;\r\n WebLabel59.Height := 28;\r\n WebLabel60.Height := 28;\r\n WebLabel61.Height := 28;\r\n WebLabel62.Height := 28;\r\n WebLabel63.Height := 28;\r\n WebLabel64.Height := 28;\r\n WebLabel65.Height := 28;\r\n WebLabel66.Height := 28;\r\n WebLabel67.Height := 28;\r\n WebLabel68.Height := 28;\r\n WebLabel69.Height := 28;\r\n WebLabel70.Height := 28;\r\n cldDayRange.SetParentComponent(SubForm_DIV);\r\n cldDayRange.Name := 'cldDayRange';\r\n cldDayRange.Left := 666;\r\n cldDayRange.Top := 343;\r\n cldDayRange.Width := 201;\r\n cldDayRange.Height := 186;\r\n cldDayRange.ChildOrder := 7;\r\n cldDayRange.Visible := False;\r\n cldDayRange.TabOrder := 61;\r\n cldDayRange.SelectedDate := 44923.000000000000000000;\r\n cldDayRange.Year := 2022;\r\n cldDayRange.Month := 12;\r\n cldDayRange.Day := 28;\r\n cldDayRange.NameOfMonths.January := 'January';\r\n cldDayRange.NameOfMonths.February := 'February';\r\n cldDayRange.NameOfMonths.March := 'March';\r\n cldDayRange.NameOfMonths.April := 'April';\r\n cldDayRange.NameOfMonths.May := 'May';\r\n cldDayRange.NameOfMonths.June := 'June';\r\n cldDayRange.NameOfMonths.July := 'July';\r\n cldDayRange.NameOfMonths.August := 'August';\r\n cldDayRange.NameOfMonths.September := 'September';\r\n cldDayRange.NameOfMonths.October := 'October';\r\n cldDayRange.NameOfMonths.November := 'November';\r\n cldDayRange.NameOfMonths.December := 'December';\r\n cldDayRange.NameOfDays.Sunday := 'Sun';\r\n cldDayRange.NameOfDays.Monday := 'Mon';\r\n cldDayRange.NameOfDays.Tuesday := 'Tue';\r\n cldDayRange.NameOfDays.Wednesday := 'Wed';\r\n cldDayRange.NameOfDays.Thursday := 'Thu';\r\n cldDayRange.NameOfDays.Friday := 'Fri';\r\n cldDayRange.NameOfDays.Saturday := 'Sat';\r\n SetEvent(cldDayRange, Self, 'OnDateSelected', 'cldDayRangeDateSelected');\r\n pnlTop.SetParentComponent(Self);\r\n pnlTop.Name := 'pnlTop';\r\n pnlTop.AlignWithMargins := True;\r\n pnlTop.Left := 10;\r\n pnlTop.Top := 35;\r\n pnlTop.Width := 1434;\r\n pnlTop.Height := 41;\r\n pnlTop.Margins.Left := 10;\r\n pnlTop.Margins.Top := 0;\r\n pnlTop.Margins.Right := 0;\r\n pnlTop.Margins.Bottom := 0;\r\n pnlTop.Align := alTop;\r\n pnlTop.BorderColor := clWhite;\r\n pnlTop.BorderStyle := bsNone;\r\n pnlTop.ChildOrder := 8;\r\n pnlTop.Color := clWhite;\r\n pnlTop.TabOrder := 5;\r\n LFB_dateRange.SetParentComponent(pnlTop);\r\n LFB_dateRange.Name := 'LFB_dateRange';\r\n LFB_dateRange.Left := 0;\r\n LFB_dateRange.Top := 0;\r\n LFB_dateRange.Width := 413;\r\n LFB_dateRange.Height := 41;\r\n LFB_dateRange.Align := alLeft;\r\n LFB_dateRange.BorderColor := clWhite;\r\n LFB_dateRange.BorderStyle := bsNone;\r\n LFB_dateRange.ChildOrder := 2;\r\n LFB_dateRange.Color := clWhite;\r\n LFB_dateRange.TabOrder := 0;\r\n dpStartDate.SetParentComponent(LFB_dateRange);\r\n dpStartDate.Name := 'dpStartDate';\r\n dpStartDate.Left := 72;\r\n dpStartDate.Top := 0;\r\n dpStartDate.Width := 110;\r\n dpStartDate.Height := 41;\r\n dpStartDate.Align := alLeft;\r\n dpStartDate.BorderStyle := bsNone;\r\n dpStartDate.ChildOrder := 3;\r\n dpStartDate.Color := clWhite;\r\n dpStartDate.Date := 44915.681804502320000000;\r\n dpStartDate.Font.Charset := DEFAULT_CHARSET;\r\n dpStartDate.Font.Color := clWindowText;\r\n dpStartDate.Font.Height := -16;\r\n dpStartDate.Font.Name := 'Tahoma';\r\n dpStartDate.Font.Style := [];\r\n dpStartDate.ParentFont := False;\r\n dpStartDate.Role := '';\r\n dpStartDate.ShowFocus := False;\r\n dpStartDate.ShowSeconds := False;\r\n dpStartDate.Text := '';\r\n dpEndDate.SetParentComponent(LFB_dateRange);\r\n dpEndDate.Name := 'dpEndDate';\r\n dpEndDate.Left := 206;\r\n dpEndDate.Top := 0;\r\n dpEndDate.Width := 110;\r\n dpEndDate.Height := 41;\r\n dpEndDate.Align := alLeft;\r\n dpEndDate.BorderStyle := bsNone;\r\n dpEndDate.ChildOrder := 3;\r\n dpEndDate.Color := clWhite;\r\n dpEndDate.Date := 44915.681804502320000000;\r\n dpEndDate.Font.Charset := DEFAULT_CHARSET;\r\n dpEndDate.Font.Color := clWindowText;\r\n dpEndDate.Font.Height := -16;\r\n dpEndDate.Font.Name := 'Tahoma';\r\n dpEndDate.Font.Style := [];\r\n dpEndDate.ParentFont := False;\r\n dpEndDate.Role := '';\r\n dpEndDate.ShowFocus := False;\r\n dpEndDate.ShowSeconds := False;\r\n dpEndDate.Text := '';\r\n WebSpeedButton70.SetParentComponent(LFB_dateRange);\r\n WebSpeedButton70.Name := 'WebSpeedButton70';\r\n WebSpeedButton70.Left := 182;\r\n WebSpeedButton70.Top := 0;\r\n WebSpeedButton70.Width := 24;\r\n WebSpeedButton70.Height := 41;\r\n WebSpeedButton70.Align := alLeft;\r\n WebSpeedButton70.Caption := '-';\r\n WebSpeedButton70.Color := clWhite;\r\n WebSpeedButton70.ElementClassName := 'btn btn-outline-light';\r\n WebSpeedButton70.Font.Charset := DEFAULT_CHARSET;\r\n WebSpeedButton70.Font.Color := clWindowText;\r\n WebSpeedButton70.Font.Height := -16;\r\n WebSpeedButton70.Font.Name := 'Tahoma';\r\n WebSpeedButton70.Font.Style := [];\r\n WebSpeedButton70.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton70.ParentFont := False;\r\n WebSpeedButton70.TabOrder := 2;\r\n WebSpeedButton70.WidthPercent := 100.000000000000000000;\r\n btnRange_calendar.SetParentComponent(LFB_dateRange);\r\n btnRange_calendar.Name := 'btnRange_calendar';\r\n btnRange_calendar.Left := 0;\r\n btnRange_calendar.Top := 0;\r\n btnRange_calendar.Width := 24;\r\n btnRange_calendar.Height := 41;\r\n btnRange_calendar.Cursor := crHandPoint;\r\n btnRange_calendar.Hint := 'Calendar';\r\n btnRange_calendar.Align := alLeft;\r\n btnRange_calendar.Caption := '';\r\n btnRange_calendar.Color := clNone;\r\n btnRange_calendar.ElementClassName := 'btn_icon';\r\n btnRange_calendar.ElementFont := efCSS;\r\n btnRange_calendar.Font.Charset := DEFAULT_CHARSET;\r\n btnRange_calendar.Font.Color := clGray;\r\n btnRange_calendar.Font.Height := -13;\r\n btnRange_calendar.Font.Name := 'Tahoma';\r\n btnRange_calendar.Font.Style := [];\r\n btnRange_calendar.HeightPercent := 100.000000000000000000;\r\n btnRange_calendar.MaterialGlyphSize := 30;\r\n btnRange_calendar.ParentFont := False;\r\n btnRange_calendar.ShowHint := True;\r\n btnRange_calendar.TabOrder := 10;\r\n btnRange_calendar.WidthStyle := ssAuto;\r\n btnRange_calendar.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnRange_calendar, Self, 'OnClick', 'btnRange_calendarClick');\r\n btnRange_todaye.SetParentComponent(LFB_dateRange);\r\n btnRange_todaye.Name := 'btnRange_todaye';\r\n btnRange_todaye.Left := 24;\r\n btnRange_todaye.Top := 0;\r\n btnRange_todaye.Width := 24;\r\n btnRange_todaye.Height := 41;\r\n btnRange_todaye.Cursor := crHandPoint;\r\n btnRange_todaye.Hint := 'Today';\r\n btnRange_todaye.Align := alLeft;\r\n btnRange_todaye.Caption := '';\r\n btnRange_todaye.Color := clNone;\r\n btnRange_todaye.ElementClassName := 'btn_icon';\r\n btnRange_todaye.ElementFont := efCSS;\r\n btnRange_todaye.Font.Charset := DEFAULT_CHARSET;\r\n btnRange_todaye.Font.Color := clGray;\r\n btnRange_todaye.Font.Height := -13;\r\n btnRange_todaye.Font.Name := 'Tahoma';\r\n btnRange_todaye.Font.Style := [];\r\n btnRange_todaye.HeightPercent := 100.000000000000000000;\r\n btnRange_todaye.MaterialGlyphSize := 30;\r\n btnRange_todaye.ParentFont := False;\r\n btnRange_todaye.ShowHint := True;\r\n btnRange_todaye.TabOrder := 10;\r\n btnRange_todaye.WidthStyle := ssAuto;\r\n btnRange_todaye.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnRange_todaye, Self, 'OnClick', 'btnRange_todayeClick');\r\n btnRange_dayback.SetParentComponent(LFB_dateRange);\r\n btnRange_dayback.Name := 'btnRange_dayback';\r\n btnRange_dayback.Left := 48;\r\n btnRange_dayback.Top := 0;\r\n btnRange_dayback.Width := 24;\r\n btnRange_dayback.Height := 41;\r\n btnRange_dayback.Cursor := crHandPoint;\r\n btnRange_dayback.Hint := 'Day Back';\r\n btnRange_dayback.Align := alLeft;\r\n btnRange_dayback.Caption := '';\r\n btnRange_dayback.Color := clNone;\r\n btnRange_dayback.ElementClassName := 'btn_icon';\r\n btnRange_dayback.ElementFont := efCSS;\r\n btnRange_dayback.Font.Charset := DEFAULT_CHARSET;\r\n btnRange_dayback.Font.Color := clGray;\r\n btnRange_dayback.Font.Height := -13;\r\n btnRange_dayback.Font.Name := 'Tahoma';\r\n btnRange_dayback.Font.Style := [];\r\n btnRange_dayback.HeightPercent := 100.000000000000000000;\r\n btnRange_dayback.MaterialGlyphSize := 30;\r\n btnRange_dayback.ParentFont := False;\r\n btnRange_dayback.ShowHint := True;\r\n btnRange_dayback.TabOrder := 10;\r\n btnRange_dayback.WidthStyle := ssAuto;\r\n btnRange_dayback.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnRange_dayback, Self, 'OnClick', 'btnRange_daybackClick');\r\n btnRange_dayforward.SetParentComponent(LFB_dateRange);\r\n btnRange_dayforward.Name := 'btnRange_dayforward';\r\n btnRange_dayforward.Left := 316;\r\n btnRange_dayforward.Top := 0;\r\n btnRange_dayforward.Width := 24;\r\n btnRange_dayforward.Height := 41;\r\n btnRange_dayforward.Cursor := crHandPoint;\r\n btnRange_dayforward.Hint := 'day Forward';\r\n btnRange_dayforward.Align := alLeft;\r\n btnRange_dayforward.Caption := '';\r\n btnRange_dayforward.Color := clNone;\r\n btnRange_dayforward.ElementClassName := 'btn_icon';\r\n btnRange_dayforward.ElementFont := efCSS;\r\n btnRange_dayforward.Font.Charset := DEFAULT_CHARSET;\r\n btnRange_dayforward.Font.Color := clGray;\r\n btnRange_dayforward.Font.Height := -13;\r\n btnRange_dayforward.Font.Name := 'Tahoma';\r\n btnRange_dayforward.Font.Style := [];\r\n btnRange_dayforward.HeightPercent := 100.000000000000000000;\r\n btnRange_dayforward.MaterialGlyphSize := 30;\r\n btnRange_dayforward.ParentFont := False;\r\n btnRange_dayforward.ShowHint := True;\r\n btnRange_dayforward.TabOrder := 10;\r\n btnRange_dayforward.WidthStyle := ssAuto;\r\n btnRange_dayforward.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnRange_dayforward, Self, 'OnClick', 'btnRange_dayforwardClick');\r\n btnGridRefresh.SetParentComponent(pnlTop);\r\n btnGridRefresh.Name := 'btnGridRefresh';\r\n btnGridRefresh.Left := 413;\r\n btnGridRefresh.Top := 0;\r\n btnGridRefresh.Width := 24;\r\n btnGridRefresh.Height := 41;\r\n btnGridRefresh.Cursor := crHandPoint;\r\n btnGridRefresh.Hint := 'Refresh';\r\n btnGridRefresh.Align := alLeft;\r\n btnGridRefresh.Caption := '';\r\n btnGridRefresh.Color := clNone;\r\n btnGridRefresh.ElementClassName := 'btn_icon';\r\n btnGridRefresh.ElementFont := efCSS;\r\n btnGridRefresh.Font.Charset := DEFAULT_CHARSET;\r\n btnGridRefresh.Font.Color := clGray;\r\n btnGridRefresh.Font.Height := -13;\r\n btnGridRefresh.Font.Name := 'Tahoma';\r\n btnGridRefresh.Font.Style := [];\r\n btnGridRefresh.HeightPercent := 100.000000000000000000;\r\n btnGridRefresh.MaterialGlyphSize := 30;\r\n btnGridRefresh.ParentFont := False;\r\n btnGridRefresh.ShowHint := True;\r\n btnGridRefresh.TabOrder := 10;\r\n btnGridRefresh.WidthStyle := ssAuto;\r\n btnGridRefresh.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnGridRefresh, Self, 'OnClick', 'btnGridRefreshClick');\r\n finally\r\n WebLabel13.AfterLoadDFMValues;\r\n pnlBottom.AfterLoadDFMValues;\r\n pnlFormButtons.AfterLoadDFMValues;\r\n btnPost.AfterLoadDFMValues;\r\n btnAdd.AfterLoadDFMValues;\r\n btnRefresh.AfterLoadDFMValues;\r\n btnUseDefaults.AfterLoadDFMValues;\r\n spSideDataSplitter.AfterLoadDFMValues;\r\n pnlSideData.AfterLoadDFMValues;\r\n sbSideData.AfterLoadDFMValues;\r\n sb6.AfterLoadDFMValues;\r\n WebPanel9.AfterLoadDFMValues;\r\n WebLabel26.AfterLoadDFMValues;\r\n sb5.AfterLoadDFMValues;\r\n WebPanel12.AfterLoadDFMValues;\r\n WebLabel27.AfterLoadDFMValues;\r\n sb4.AfterLoadDFMValues;\r\n WebPanel22.AfterLoadDFMValues;\r\n WebLabel28.AfterLoadDFMValues;\r\n sb3.AfterLoadDFMValues;\r\n WebPanel25.AfterLoadDFMValues;\r\n WebLabel29.AfterLoadDFMValues;\r\n sb2.AfterLoadDFMValues;\r\n WebPanel30.AfterLoadDFMValues;\r\n WebLabel30.AfterLoadDFMValues;\r\n sb1.AfterLoadDFMValues;\r\n WebPanel32.AfterLoadDFMValues;\r\n WebLabel31.AfterLoadDFMValues;\r\n sb7.AfterLoadDFMValues;\r\n WebPanel34.AfterLoadDFMValues;\r\n WebLabel32.AfterLoadDFMValues;\r\n sb101.AfterLoadDFMValues;\r\n WebPanel10.AfterLoadDFMValues;\r\n WebLabel1.AfterLoadDFMValues;\r\n SG1.AfterLoadDFMValues;\r\n sb102.AfterLoadDFMValues;\r\n WebPanel23.AfterLoadDFMValues;\r\n WebLabel73.AfterLoadDFMValues;\r\n SG2.AfterLoadDFMValues;\r\n sb103.AfterLoadDFMValues;\r\n WebPanel35.AfterLoadDFMValues;\r\n WebLabel74.AfterLoadDFMValues;\r\n SG3.AfterLoadDFMValues;\r\n pnlSUBFORM_DIV.AfterLoadDFMValues;\r\n pnlDataBlocks.AfterLoadDFMValues;\r\n SubForm_DIV.AfterLoadDFMValues;\r\n b26.AfterLoadDFMValues;\r\n WebPanel13.AfterLoadDFMValues;\r\n WebLabel8.AfterLoadDFMValues;\r\n B101.AfterLoadDFMValues;\r\n WebPanel14.AfterLoadDFMValues;\r\n WebLabel18.AfterLoadDFMValues;\r\n G1.AfterLoadDFMValues;\r\n B25.AfterLoadDFMValues;\r\n WebPanel11.AfterLoadDFMValues;\r\n WebLabel7.AfterLoadDFMValues;\r\n B20.AfterLoadDFMValues;\r\n WebPanel95.AfterLoadDFMValues;\r\n WebLabel47.AfterLoadDFMValues;\r\n B21.AfterLoadDFMValues;\r\n WebPanel2.AfterLoadDFMValues;\r\n WebLabel3.AfterLoadDFMValues;\r\n B22.AfterLoadDFMValues;\r\n WebPanel4.AfterLoadDFMValues;\r\n WebLabel4.AfterLoadDFMValues;\r\n b23.AfterLoadDFMValues;\r\n WebPanel6.AfterLoadDFMValues;\r\n WebLabel5.AfterLoadDFMValues;\r\n B18.AfterLoadDFMValues;\r\n WebPanel111.AfterLoadDFMValues;\r\n WebLabel55.AfterLoadDFMValues;\r\n B19.AfterLoadDFMValues;\r\n WebPanel93.AfterLoadDFMValues;\r\n WebLabel46.AfterLoadDFMValues;\r\n B24.AfterLoadDFMValues;\r\n WebPanel8.AfterLoadDFMValues;\r\n WebLabel6.AfterLoadDFMValues;\r\n B29.AfterLoadDFMValues;\r\n WebPanel19.AfterLoadDFMValues;\r\n WebLabel11.AfterLoadDFMValues;\r\n B28.AfterLoadDFMValues;\r\n WebPanel17.AfterLoadDFMValues;\r\n WebLabel10.AfterLoadDFMValues;\r\n B27.AfterLoadDFMValues;\r\n WebPanel15.AfterLoadDFMValues;\r\n WebLabel9.AfterLoadDFMValues;\r\n B16.AfterLoadDFMValues;\r\n WebPanel107.AfterLoadDFMValues;\r\n WebLabel53.AfterLoadDFMValues;\r\n B17.AfterLoadDFMValues;\r\n WebPanel109.AfterLoadDFMValues;\r\n WebLabel54.AfterLoadDFMValues;\r\n B15.AfterLoadDFMValues;\r\n WebPanel97.AfterLoadDFMValues;\r\n WebLabel48.AfterLoadDFMValues;\r\n B14.AfterLoadDFMValues;\r\n WebPanel99.AfterLoadDFMValues;\r\n WebLabel49.AfterLoadDFMValues;\r\n B13.AfterLoadDFMValues;\r\n WebPanel101.AfterLoadDFMValues;\r\n WebLabel50.AfterLoadDFMValues;\r\n B12.AfterLoadDFMValues;\r\n WebPanel103.AfterLoadDFMValues;\r\n WebLabel51.AfterLoadDFMValues;\r\n B11.AfterLoadDFMValues;\r\n WebPanel105.AfterLoadDFMValues;\r\n WebLabel52.AfterLoadDFMValues;\r\n B6.AfterLoadDFMValues;\r\n WebPanel80.AfterLoadDFMValues;\r\n WebLabel41.AfterLoadDFMValues;\r\n B7.AfterLoadDFMValues;\r\n WebPanel82.AfterLoadDFMValues;\r\n WebLabel42.AfterLoadDFMValues;\r\n B8.AfterLoadDFMValues;\r\n WebPanel86.AfterLoadDFMValues;\r\n WebLabel43.AfterLoadDFMValues;\r\n B9.AfterLoadDFMValues;\r\n WebPanel88.AfterLoadDFMValues;\r\n WebLabel44.AfterLoadDFMValues;\r\n B10.AfterLoadDFMValues;\r\n WebPanel91.AfterLoadDFMValues;\r\n WebLabel45.AfterLoadDFMValues;\r\n B5.AfterLoadDFMValues;\r\n WebPanel74.AfterLoadDFMValues;\r\n WebLabel38.AfterLoadDFMValues;\r\n B4.AfterLoadDFMValues;\r\n WebPanel78.AfterLoadDFMValues;\r\n WebLabel40.AfterLoadDFMValues;\r\n B3.AfterLoadDFMValues;\r\n WebPanel72.AfterLoadDFMValues;\r\n WebLabel37.AfterLoadDFMValues;\r\n B2.AfterLoadDFMValues;\r\n WebPanel76.AfterLoadDFMValues;\r\n WebLabel39.AfterLoadDFMValues;\r\n B1.AfterLoadDFMValues;\r\n WebPanel70.AfterLoadDFMValues;\r\n WebLabel36.AfterLoadDFMValues;\r\n B30.AfterLoadDFMValues;\r\n WebPanel21.AfterLoadDFMValues;\r\n WebLabel12.AfterLoadDFMValues;\r\n B100.AfterLoadDFMValues;\r\n WebPanel3.AfterLoadDFMValues;\r\n WebLabel14.AfterLoadDFMValues;\r\n G9.AfterLoadDFMValues;\r\n B102.AfterLoadDFMValues;\r\n WebPanel24.AfterLoadDFMValues;\r\n WebLabel21.AfterLoadDFMValues;\r\n G2.AfterLoadDFMValues;\r\n B105.AfterLoadDFMValues;\r\n WebPanel26.AfterLoadDFMValues;\r\n WebLabel22.AfterLoadDFMValues;\r\n G5.AfterLoadDFMValues;\r\n B104.AfterLoadDFMValues;\r\n WebPanel18.AfterLoadDFMValues;\r\n WebLabel19.AfterLoadDFMValues;\r\n G4.AfterLoadDFMValues;\r\n B103.AfterLoadDFMValues;\r\n WebPanel7.AfterLoadDFMValues;\r\n WebLabel17.AfterLoadDFMValues;\r\n G3.AfterLoadDFMValues;\r\n B106.AfterLoadDFMValues;\r\n WebPanel20.AfterLoadDFMValues;\r\n WebLabel20.AfterLoadDFMValues;\r\n G6.AfterLoadDFMValues;\r\n B107.AfterLoadDFMValues;\r\n WebPanel27.AfterLoadDFMValues;\r\n WebLabel23.AfterLoadDFMValues;\r\n G7.AfterLoadDFMValues;\r\n B108.AfterLoadDFMValues;\r\n WebPanel29.AfterLoadDFMValues;\r\n WebLabel24.AfterLoadDFMValues;\r\n G8.AfterLoadDFMValues;\r\n wmWaitMessage.AfterLoadDFMValues;\r\n B31.AfterLoadDFMValues;\r\n WebPanel5.AfterLoadDFMValues;\r\n WebLabel16.AfterLoadDFMValues;\r\n B32.AfterLoadDFMValues;\r\n WebPanel16.AfterLoadDFMValues;\r\n WebLabel25.AfterLoadDFMValues;\r\n B33.AfterLoadDFMValues;\r\n WebPanel28.AfterLoadDFMValues;\r\n WebLabel33.AfterLoadDFMValues;\r\n B34.AfterLoadDFMValues;\r\n WebPanel33.AfterLoadDFMValues;\r\n WebLabel34.AfterLoadDFMValues;\r\n B35.AfterLoadDFMValues;\r\n WebPanel36.AfterLoadDFMValues;\r\n WebLabel35.AfterLoadDFMValues;\r\n B36.AfterLoadDFMValues;\r\n WebPanel38.AfterLoadDFMValues;\r\n WebLabel56.AfterLoadDFMValues;\r\n B37.AfterLoadDFMValues;\r\n WebPanel40.AfterLoadDFMValues;\r\n WebLabel57.AfterLoadDFMValues;\r\n B38.AfterLoadDFMValues;\r\n WebPanel42.AfterLoadDFMValues;\r\n WebLabel58.AfterLoadDFMValues;\r\n B39.AfterLoadDFMValues;\r\n WebPanel44.AfterLoadDFMValues;\r\n WebLabel59.AfterLoadDFMValues;\r\n B40.AfterLoadDFMValues;\r\n WebPanel46.AfterLoadDFMValues;\r\n WebLabel60.AfterLoadDFMValues;\r\n B41.AfterLoadDFMValues;\r\n WebPanel48.AfterLoadDFMValues;\r\n WebLabel61.AfterLoadDFMValues;\r\n B42.AfterLoadDFMValues;\r\n WebPanel50.AfterLoadDFMValues;\r\n WebLabel62.AfterLoadDFMValues;\r\n B43.AfterLoadDFMValues;\r\n WebPanel52.AfterLoadDFMValues;\r\n WebLabel63.AfterLoadDFMValues;\r\n B44.AfterLoadDFMValues;\r\n WebPanel54.AfterLoadDFMValues;\r\n WebLabel64.AfterLoadDFMValues;\r\n B45.AfterLoadDFMValues;\r\n WebPanel56.AfterLoadDFMValues;\r\n WebLabel65.AfterLoadDFMValues;\r\n B46.AfterLoadDFMValues;\r\n WebPanel58.AfterLoadDFMValues;\r\n WebLabel66.AfterLoadDFMValues;\r\n B47.AfterLoadDFMValues;\r\n WebPanel60.AfterLoadDFMValues;\r\n WebLabel67.AfterLoadDFMValues;\r\n B48.AfterLoadDFMValues;\r\n WebPanel62.AfterLoadDFMValues;\r\n WebLabel68.AfterLoadDFMValues;\r\n B49.AfterLoadDFMValues;\r\n WebPanel64.AfterLoadDFMValues;\r\n WebLabel69.AfterLoadDFMValues;\r\n B50.AfterLoadDFMValues;\r\n WebPanel66.AfterLoadDFMValues;\r\n WebLabel70.AfterLoadDFMValues;\r\n cldDayRange.AfterLoadDFMValues;\r\n pnlTop.AfterLoadDFMValues;\r\n LFB_dateRange.AfterLoadDFMValues;\r\n dpStartDate.AfterLoadDFMValues;\r\n dpEndDate.AfterLoadDFMValues;\r\n WebSpeedButton70.AfterLoadDFMValues;\r\n btnRange_calendar.AfterLoadDFMValues;\r\n btnRange_todaye.AfterLoadDFMValues;\r\n btnRange_dayback.AfterLoadDFMValues;\r\n btnRange_dayforward.AfterLoadDFMValues;\r\n btnGridRefresh.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit UDF_ProcReport_EV;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Variants, System.Classes, System.types, Vcl.Graphics,\r\n Vcl.Controls, Vcl.Forms, Vcl.Dialogs, EditForm_Base, VCL.TMSFNCTypes,\r\n VCL.TMSFNCUtils, VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes, WEBLib.Grids,\r\n WEBLib.WebCtrls, Vcl.Imaging.GIFImg, WEBLib.Controls, WEBLib.Dialogs,\r\n Vcl.Grids, WEBLib.DBCtrls, WEBLib.ExtCtrls, WEBLib.Buttons, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, VCL.TMSFNCCustomControl, VCL.TMSFNCSwitch, Vcl.Menus,\r\n WEBLib.Menus, JS, XData.Web.Client, Weblib.JSON;\r\n\r\ntype\r\n TfrmUDF_ProcReport_EV = class(TfrmEditForm_Base)\r\n pnlImages: TPanel;\r\n ImageGrid: TDBResponsiveGrid;\r\n WebDBImageControl1: TDBImageControl;\r\n pmImages: TPopupMenu;\r\n Delete1: TMenuItem;\r\n Print1: TMenuItem;\r\n pnlSideDataButtons: TPanel;\r\n btnParseReport: TBitBtn;\r\n btnSubmit_CERNER: TBitBtn;\r\n WebButton1: TButton;\r\n lbDictatedReport: TLabel;\r\n btnShowBottom: TBitBtn;\r\n tmGeneral: TTimer;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure Delete1Click(Sender: TObject);\r\n procedure Print1Click(Sender: TObject);\r\n procedure ImageGridItemCreated(Sender: TObject; Index: Integer);\r\n procedure ImageGridMouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure btnParseReportClick(Sender: TObject);\r\n function GetJSSection(JSONObject: TJSONObject; const aSectionStr: string): string;\r\n procedure tbReportChange(Sender: TObject);\r\n procedure btnSubmit_CERNERClick(Sender: TObject);\r\n procedure WebButton1Click(Sender: TObject);\r\n procedure btnFixBlockPositionsClick(Sender: TObject);\r\n procedure btnShowBottomClick(Sender: TObject);\r\n procedure tmGeneralTimer(Sender: TObject);\r\n procedure pmImagesPopup(Sender: TObject);\r\n procedure ImageGridItemClick(Sender: TObject; Index: Integer);\r\n private\r\n { Private declarations }\r\n mouse_x, mouse_y: integer;\r\n public\r\n { Public declarations }\r\n\r\n procedure ImageMenu;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmUDF_ProcReport_EV: TfrmUDF_ProcReport_EV;\r\n\r\n pnlSideDataWidth_p : integer;\r\n\r\nimplementation\r\n\r\n{$R *.dfm}\r\n\r\nuses DataModule, Common, Main;\r\n\r\nprocedure TfrmUDF_ProcReport_EV.ImageMenu;\r\n begin\r\n // showmessage(inttostr(imagegrid.ItemIndex));\r\n //showmessage(inttostr(mouse_x) + ' - ' + inttostr(mouse_y));\r\n //showmessage(pmImages.Parent.Name);\r\n pmImages.Popup(mouse_x, mouse_y);\r\n end;\r\n\r\nprocedure TfrmUDF_ProcReport_EV.pmImagesPopup(Sender: TObject);\r\nbegin\r\n inherited;\r\npmImages.visible := true;\r\npmImages.tag := 1;\r\nend;\r\n\r\nprocedure TfrmUDF_ProcReport_EV.Delete1Click(Sender: TObject);\r\nvar sql_p: string;\r\n\r\n procedure OnDlgResult(Result: TDialogResult);\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p: string;\r\n begin\r\n dm.xdsImages.Delete;\r\n end;\r\n\r\n begin\r\n if Result = mrYes\r\n then begin\r\n sql_p := 'delete from imagesevault where procedurenumber = ' +\r\n EGV_CURRENT_PROCEDURENUMBER + ' and IMAGENUMBER = ' + dm.xdsImagesIMAGENUMBER.asstring;\r\n //showmessage(sql_p);\r\n dm.XDataWebClient2.RawInvoke('IReportService.ExecQuery',[sql_p, egv_facilityid, '0'], @OnResult);\r\n end;\r\n end;\r\nbegin\r\n inherited;\r\nfrmmain.mdGenDialog.ShowDialog\r\n('Delete the image ?', WEBLib.Dialogs.mtConfirmation, [], @OnDlgResult);\r\nend;\r\n\r\nprocedure TfrmUDF_ProcReport_EV.ImageGridItemClick(Sender: TObject;\r\n Index: Integer);\r\nbegin\r\n inherited;\r\n imagemenu;\r\nend;\r\n\r\nprocedure TfrmUDF_ProcReport_EV.ImageGridItemCreated(Sender: TObject;\r\n Index: Integer);\r\nbegin\r\n inherited;\r\n{if dm.xdsImagesSELECTED.AsString = 'T'\r\nthen imagegrid.Items[index].HTML := stringreplace(frmMain.mImageGridHTML_selected.text, 'openimagemenu', 'openimagemenu_ev',[rfIgnoreCase])\r\nelse imagegrid.Items[index].HTML := stringreplace(frmMain.mImageGridHTML_notselected.text, 'openimagemenu', 'openimagemenu_ev',[rfIgnoreCase]);\r\n\r\n //showmessage(dm.xdsImagessequence.AsString + ' - ' + dm.xdsImagesLABEL.AsString + ' - ' + dm.xdsImagesCOMMENTS.AsString);\r\n imagegrid.Items[index].HTML :=\r\n stringreplace(imagegrid.Items[index].HTML, '(%LABEL%)', dm.xdsImagesLABEL.AsString,[rfReplaceAll]);\r\n imagegrid.Items[index].HTML :=\r\n stringreplace(imagegrid.Items[index].HTML, '(%COMMENTS%)', dm.xdsImagesCOMMENTS.AsString,[rfReplaceAll]);\r\n imagegrid.Items[index].HTML :=\r\n copy(imagegrid.Items[index].HTML, 1, pos('(%IMAGEBASE64%)', imagegrid.Items[index].HTML) - 1 ) +\r\n dm.xdsImagesIMAGEBASE64.AsString +\r\n copy(imagegrid.Items[index].HTML, pos('(%IMAGEBASE64%)', imagegrid.Items[index].HTML) + 15, length(imagegrid.Items[index].HTML))\r\n }\r\nend;\r\n\r\nprocedure TfrmUDF_ProcReport_EV.ImageGridMouseMove(Sender: TObject;\r\n Shift: TShiftState; X, Y: Integer);\r\n var P: TPoint;\r\nbegin\r\n inherited;\r\n\r\nif pmImages.tag = 1\r\nthen begin\r\n pmImages.tag := 0;\r\n pmImages.visible := false;\r\n end;\r\n\r\nP.x := x;\r\nP.y := y;\r\nP := ImageGrid.clienttoscreen(P);\r\nP := self.ScreenToClient(P);\r\nmouse_x := P.x;\r\nmouse_y := P.y;\r\nend;\r\n\r\nprocedure TfrmUDF_ProcReport_EV.Print1Click(Sender: TObject);\r\nvar s, sql_p: string;\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p: string;\r\n begin\r\n dm.xdsImages.Edit;\r\n if dm.xdsImagesSELECTED.AsString = 'T'\r\n then dm.xdsImagesSELECTED.AsString := 'F'\r\n else dm.xdsImagesSELECTED.AsString := 'T';\r\n dm.xdsImages.Post;\r\n {\r\n dm.xdsImagesSELECTED.AsString :=\r\n dm.xdsImages.Close;\r\n opendataset_j(dm.xdsImages,' select IMAGENUMBER, IMAGE, SEQUENCE, SELECTED, LABEL, COMMENTS ' +\r\n ' from imagesevault where procedurenumber = ' + EGV_CURRENT_PROCEDURENUMBER +\r\n ' order by SEQUENCE'); }\r\n end;\r\n\r\n\r\nbegin\r\n inherited;\r\n// showmessage(inttostr(imagegrid.ItemIndex));\r\nif dm.xdsImagesSELECTED.AsString = 'T'\r\nthen s := 'F'\r\nelse s := 'T';\r\n\r\nsql_p := 'update imagesevault set SELECTED = ' + quotedstr(s) + ' where procedurenumber = ' +\r\n EGV_CURRENT_PROCEDURENUMBER + ' and IMAGENUMBER = ' + dm.xdsImagesIMAGENUMBER.asstring;\r\n//showmessage(sql_p);\r\ndm.XDataWebClient2.RawInvoke('IReportService.ExecQuery',[sql_p, egv_facilityid, '0'], @OnResult);\r\nend;\r\n\r\nprocedure TfrmUDF_ProcReport_EV.tbReportChange(Sender: TObject);\r\nbegin\r\n inherited;\r\npnlImages.Visible := (tbReport.State = ssOFF);\r\npnlSidedata.Visible := (tbReport.State = ssOFF);\r\nend;\r\n\r\nprocedure TfrmUDF_ProcReport_EV.tmGeneralTimer(Sender: TObject);\r\nbegin\r\n inherited;\r\ntmGeneral.Enabled := false;\r\nbtnShowBottomClick(btnShowBottom);\r\nend;\r\n\r\nprocedure TfrmUDF_ProcReport_EV.btnFixBlockPositionsClick(Sender: TObject);\r\nvar i: integer;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TfrmUDF_ProcReport_EV.btnParseReportClick(Sender: TObject);\r\nvar s,s1,s2,s3: string; JSONObject_p: TJSONObject; m: TMemo;\r\n\r\n function GetStr(JSONObject: TJSONObject; const aSectionStr, aMemoSection: string; aValue_Skip: string=''; aBlock: TPanel=nil): string;\r\n var\r\n found_str: string;\r\n item_value: string;\r\n JSONArray: TJSONArray;\r\n i: integer;\r\n begin\r\n result := '';\r\n found_str := '';\r\n //if JSONObject.TryGetValue(JSONArray) then\r\n //if JSONObject.TryGetValue(aSectionStr, JSONArray) then\r\n JSONArray := JSONObject.GetValue(aSectionStr) as TJsonArray;\r\n //JSONArray := JSONObject.GetValue(aSectionStr);\r\n if JSONArray <> nil then\r\n begin\r\n for i := 0 to JSONArray.Count - 1 do\r\n begin\r\n item_value := JSONArray.Items[I].Value;\r\n if (item_value <> '') and (UpperCase(item_value) <> 'N/A') then\r\n begin\r\n if found_str <> '' then\r\n found_str := found_str + ' ';\r\n found_str := found_str + item_value;\r\n end;\r\n end;\r\n\r\n result := found_str;\r\n\r\n // put in a memo block\r\n m := nil;\r\n if aBlock = nil\r\n then begin\r\n if aMemoSection <> ''\r\n then m := BlockGetMemoByTitle(aMemoSection, Subform_div);\r\n end\r\n else begin\r\n m := BlockGetMemo(aBlock);\r\n //showmessage(aBlock.Name);\r\n end;\r\n\r\n if (m <> nil)\r\n then if uppercase(trim(found_str)) <> uppercase(aValue_Skip)\r\n then begin\r\n m.Text := found_str;\r\n m.Tag := 1;\r\n BlockApplyDependencies((m.Parent as Tpanel), m.Text);\r\n end;\r\n end\r\n else\r\n //showmessage('nil');\r\n end;\r\n\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p: string;\r\n begin\r\n frmmain.wmWaitMessage.hide;\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n JSONObject_p := TJSONObject.ParseJSONValue(Response_p) as TJSONObject;\r\n\r\n// JSONArray := TJSONArray(TJSONObject.ParseJSONValue(JSONArrayString));\r\n // showmessage(Response_p);\r\n\r\n GetStr(JSONObject_p, 'IND', 'Indications');\r\n GetStr(JSONObject_p, 'DIAG', 'Diagnosis');\r\n GetStr(JSONObject_p, 'FND', 'Findings');\r\n GetStr(JSONObject_p, 'RCM', 'Recommendations');\r\n GetStr(JSONObject_p, 'EOE', 'Extent of Exam');\r\n GetStr(JSONObject_p, 'COMPL', 'Complications');\r\n GetStr(JSONObject_p, 'INSUF', 'insufflation');\r\n GetStr(JSONObject_p, 'LIM', 'Limitations');\r\n GetStr(JSONObject_p, 'MED', 'Medications');\r\n\r\n\r\n\r\n s := GetStr(JSONObject_p, 'POLYP-COUNT', '', 'N/A', B26); //showmessage(s);\r\n m := BlockGetMemo(B25);\r\n if m <> nil\r\n then begin\r\n if (s <> '') and (s <> '0') // can be 'N/A' - skip\r\n then m.Text := 'Yes'\r\n else m.Text := 'No';\r\n BlockApplyDependencies((m.Parent as Tpanel), m.Text);\r\n m.Tag := 1; // updated\r\n end;\r\n\r\n s := GetStr(JSONObject_p, 'POLYP-POLYPECTOMY', '', 'N/A', B28);\r\n m := BlockGetMemo(B27);\r\n if m <> nil\r\n then begin\r\n if (s <> '') and (s <> '0') // can be 'N/A' - skip\r\n then m.Text := 'Yes'\r\n else m.Text := 'No';\r\n BlockApplyDependencies((m.Parent as Tpanel), m.Text);\r\n m.Tag := 1; // updated\r\n end;\r\n\r\n s := GetStr(JSONObject_p, 'POLYP-REM_CPLT', '', 'N/A', B30);\r\n m := BlockGetMemo(B31);\r\n if m <> nil\r\n then begin\r\n if (s <> '') and (s <> '0') // can be 'N/A' - skip\r\n then m.Text := 'Yes'\r\n else m.Text := 'No';\r\n BlockApplyDependencies((m.Parent as Tpanel), m.Text);\r\n m.Tag := 1; // updated\r\n end;\r\n\r\n s := GetStr(JSONObject_p, 'POLYP-SPECIMEN', '', 'N/A', B35);\r\n m := BlockGetMemo(B34);\r\n if m <> nil\r\n then begin\r\n if (s <> '') and (s <> '0') // can be 'N/A' - skip\r\n then m.Text := 'Yes'\r\n else m.Text := 'No';\r\n BlockApplyDependencies((m.Parent as Tpanel), m.Text);\r\n m.Tag := 1; // updated\r\n end;\r\n\r\n s := GetStr(JSONObject_p, 'POLYP-REM_PART', '', 'N/A', B41);\r\n m := BlockGetMemo(B29);\r\n if m <> nil\r\n then begin\r\n if (s <> '') and (s <> '0') // can be 'N/A' - skip\r\n then m.Text := 'Yes'\r\n else m.Text := 'No';\r\n BlockApplyDependencies((m.Parent as Tpanel), m.Text);\r\n m.Tag := 1; // updated\r\n end;\r\n\r\n s := GetStr(JSONObject_p, 'POLYP-TATTOED', '', 'N/A', B32);\r\n m := BlockGetMemo(B32);\r\n if m <> nil\r\n then begin\r\n if (s <> '') and (s <> '0') // can be 'N/A' - skip\r\n then m.Text := 'Yes'\r\n else m.Text := 'No';\r\n BlockApplyDependencies((m.Parent as Tpanel), m.Text);\r\n m.Tag := 1; // updated\r\n end;\r\n\r\n s := GetStr(JSONObject_p, 'POLYP-BIOPSY', '', 'N/A', B33);\r\n\r\n s1 := GetStr(JSONObject_p, 'BBP-L', '', 'N/A', B37); //BBP-L', 'Boston Bowel Prep - Left Colon\r\n s2 := GetStr(JSONObject_p, 'BBP-T', '', 'N/A', B38); //BBP-T', 'Boston Bowel Prep - Transverse\r\n s3 := GetStr(JSONObject_p, 'BBP-R', '', 'N/A', B39); //BBP-R', 'Boston Bowel Prep - Right Colon\r\n\r\n if s1 = '' then s1 := '0';\r\n if s2 = '' then s2 := '0';\r\n if s3 = '' then s3 := '0';\r\n BlockGetMemo(B46).text := inttostr(strtoint(s1) + strtoint(s2) + strtoint(s3));\r\n BlockGetMemo(B46).Tag := 1; // updated\r\n\r\n if (strtoint(s1) + strtoint(s2) + strtoint(s3)) >= 6 then\r\n BlockGetMemo(B40).text := 'Adequate'\r\n else\r\n if (s1 <> '0') or (s2 <> '0') or (s3 <> '0') then\r\n BlockGetMemo(B40).text := 'Inadequate'\r\n else\r\n BlockGetMemo(B40).text := '';\r\n\r\n\r\n StretchAllMemos(Subform_div);\r\n\r\n {'IND', //Indications);\r\n 'DIAG', //Diagnosis);\r\n 'FND', //Findings);\r\n\r\n 'RCM', //Recommendations);\r\n 'EOE', //ExtentOfExam);\r\n 'LIM', //Limitations);\r\n 'COMPL', //Complications);\r\n 'DISC-SCORE', //DiscomfortScore);\r\n 'INSUF', //Insufflation);\r\n 'INS-TECH', //InsertionTechnique);\r\n\r\n // rbBostonLeft. //Bostom Bowel Prep - Left Colon\r\n 'BBP-L'\r\n\r\n // rbBostonTransv //Bostom Bowel Prep - Transverse Colon\r\n 'BBP-T'\r\n\r\n // rbBostonRight. //Bostom Bowel Prep - Right Colon\r\n 'BBP-R'\r\n\r\n\r\n //PolypFound // polyp Detected\r\n 'POLYP-COUNT'));\r\n\r\n //Polypectopy //Polypectopy performed\r\n 'POLYP-POLYPECTOMY'\r\n\r\n //PRemoved // Polyp(s) removed\r\n 'POLYP-REM_PART'\r\n\r\n //PolypRetr // polyp(s) retrieved\r\n 'POLYP-REM_CPLT'\r\n\r\n //PolypTattooed // polyp site tatooed\r\n 'POLYP-TATTOED'\r\n\r\n //BiopsyObt // Biopsy obtained\r\n 'POLYP-BIOPSY'\r\n\r\n //Specimen // Speciemen collected\r\n 'POLYP-SPECIMEN'\r\n\r\n //HemoAchieved // Hemostasis Achieved\r\n 'POLYP-HEMOSTASIS'\r\n\r\n //Medications\r\n 'MED' }\r\n end;\r\n\r\nbegin\r\n inherited;\r\n\r\n if pnlSidedata.Width = 30\r\n then begin\r\n sbSideData.Visible := true;\r\n lbDictatedReport.Visible := true;\r\n pnlSidedata.Width := pnlSideDataWidth_p;\r\n WebFormResize(getcurrentform);\r\n exit;\r\n end\r\n else begin\r\n pnlSideDataWidth_p := pnlSidedata.Width;\r\n pnlSidedata.Width := 30;\r\n sbSideData.Visible := false;\r\n lbDictatedReport.Visible := false;\r\n WebFormResize(getcurrentform);\r\n end;\r\nif not frmmain.wmWaitMessage.showing then begin frmmain.wmWaitMessage.tag := 0; frmmain.wmWaitMessage.show; end;\r\nif EGV_FACILITYTOKEN = '' then s := EGV_FACILITY\r\n else s := EGV_FACILITY + ',' + EGV_FACILITYTOKEN;\r\n //showmessage(s);\r\n //showmessage(sm1.text);\r\ndm.XDataWebClient1.RawInvoke('IReportService.QAI_ParseReport',\r\n [s, sm1.text], @OnResult);\r\nend;\r\n\r\nprocedure TfrmUDF_ProcReport_EV.btnSubmit_CERNERClick(Sender: TObject);\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p: string;\r\n begin\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n // showmessage('file submission response:: '+ response_p);\r\n showmessage('File has been successfuly submitted.');\r\n end;\r\n\r\nbegin\r\n// inherited;\r\n{showmessage(ELV_REPORTFILENAME +' - ' +\r\n ELV_PATIENTCERNERID +' - ' +\r\n ELV_CERNERPATIENT_NAME +' - ' +\r\n ELV_CERNERPROVIDER_CODE +' - ' +\r\n ELV_CERNERECOUNTER_DATE +' - ' +\r\n ELV_CERNERENCOUNTER_TIME +' - ' +\r\n ELV_CERNERENCOUNTER_ID ); }\r\n\r\ndm.XDataWebClient1.RawInvoke('IReportService.CERNER_SubmitFile',\r\n[ELV_REPORTFILENAME,\r\n ELV_PATIENTCERNERID,\r\n ELV_CERNERPATIENT_NAME,\r\n ELV_CERNERPROVIDER_CODE,\r\n ELV_CERNERECOUNTER_DATE,\r\n ELV_CERNERENCOUNTER_TIME,\r\n ELV_CERNERENCOUNTER_ID], @OnResult);\r\nend;\r\n\r\nprocedure TfrmUDF_ProcReport_EV.btnShowBottomClick(Sender: TObject);\r\nvar i: integer;\r\nbegin\r\n inherited;\r\n if (sender as TControl).Tag = 0\r\n then (sender as TControl).Tag := 1\r\n else (sender as TControl).Tag := 0;\r\n\r\nif (sender as TControl).Tag = 1\r\nthen begin\r\n (sender as TBitBtn).hint := 'Quality Indicators';\r\n (sender as TBitBtn).caption := '';\r\n for i := 1 to 24\r\n do begin\r\n if (not (self.FindComponent('B'+inttostr(i)) as TPanel).Visible) and\r\n ((self.FindComponent('B'+inttostr(i)) as TPanel).tag = 2)\r\n then begin\r\n (self.FindComponent('B'+inttostr(i)) as TPanel).Visible := true;\r\n (self.FindComponent('B'+inttostr(i)) as TPanel).tag := 0;\r\n end;\r\n end;\r\n for i := 25 to 50\r\n do begin\r\n if (self.FindComponent('B'+inttostr(i)) as TPanel).Visible\r\n then begin\r\n (self.FindComponent('B'+inttostr(i)) as TPanel).Visible := false;\r\n (self.FindComponent('B'+inttostr(i)) as TPanel).tag := 2;\r\n end;\r\n end;\r\n end;\r\n\r\nif (sender as TControl).Tag = 0\r\nthen begin\r\n (sender as TBitBtn).hint := 'Report';\r\n (sender as TBitBtn).caption := '';\r\n for i := 1 to 24\r\n do begin\r\n if (self.FindComponent('B'+inttostr(i)) as TPanel).Visible\r\n then begin\r\n (self.FindComponent('B'+inttostr(i)) as TPanel).Visible := false;\r\n (self.FindComponent('B'+inttostr(i)) as TPanel).tag := 2;\r\n end;\r\n end;\r\n for i := 25 to 50\r\n do begin\r\n if (not (self.FindComponent('B'+inttostr(i)) as TPanel).Visible) and\r\n ((self.FindComponent('B'+inttostr(i)) as TPanel).tag = 2)\r\n then begin\r\n (self.FindComponent('B'+inttostr(i)) as TPanel).Visible := true;\r\n (self.FindComponent('B'+inttostr(i)) as TPanel).tag := 0;\r\n end;\r\n end;\r\n end;\r\n\r\norganizeblocks((b1.parent as TScrollBox));\r\nStretchAllMemos(Subform_div);\r\n\r\nend;\r\n\r\nprocedure TfrmUDF_ProcReport_EV.WebButton1Click(Sender: TObject);\r\nbegin\r\n inherited;\r\nimageannotate_new(WebDBImageControl1);\r\nend;\r\n\r\nprocedure TfrmUDF_ProcReport_EV.WebFormShow(Sender: TObject);\r\nvar i: integer;\r\nbegin\r\n\r\n inherited;\r\nResizeButtons(pnlSideDataButtons);\r\n\r\n//imagegrid.Options.itemtemplate := frmMain.mImageGridHTML_notselected.Text;\r\n\r\nfrmUDF_ProcReport_EV := self;\r\n\r\ndm.xdsImageDiagram.Close;\r\nopendataset_j(dm.xdsImageDiagram,'select TRACTIMAGE as IMAGE from PROCEDURE_SURGERY where id = ' + EGV_CURRENT_PROCEDURENUMBER);\r\ndm.xdsImages.Close;\r\nopendataset_j(dm.xdsImages,' select IMAGENUMBER, IMAGE, SEQUENCE, SELECTED, LABEL, COMMENTS, ' +\r\n ' GILABELTEXT, GILABELTEXTCOLOR, GILABELBKCOLOR ' +\r\n ' from imagesevault where procedurenumber = ' + EGV_CURRENT_PROCEDURENUMBER +\r\n ' order by SEQUENCE');\r\npnlSideDataWidth_p := pnlSidedata.Width;\r\ntmGeneral.Enabled := true; //for quality indicators\r\n\r\n//asm document.title = \"Argus Med-GPT\"; end;\r\n\r\nend;\r\n\r\nfunction TfrmUDF_ProcReport_EV.GetJSSection(JSONObject: TJSONObject; const aSectionStr: string): string;\r\nvar i: integer; item_value: string; JSONArray: TJSONArray;\r\n begin\r\n //showmessage(JSONObject.GetJSONValue('FND') );\r\n{ result := '';\r\n try\r\n if JSONObject.TryGetValue(aSectionStr, JSONArray) then\r\n for i := 0 to JSONArray.Count - 1 do\r\n begin\r\n item_value := JSONArray.Items[I].Value;\r\n if (item_value <> '') and (UpperCase(item_value) <> 'N/A') then\r\n begin\r\n if result = ''\r\n then result := item_value\r\n else result := result + char(13) + item_value;\r\n end;\r\n end;\r\n except\r\n On E: Exception do Showmessage(E.Message)\r\n end; }\r\n end;\r\nprocedure TfrmUDF_ProcReport_EV.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n btnShowBottom := TBitBtn.Create(Self);\r\n btnSubmit_CERNER := TBitBtn.Create(Self);\r\n pnlSideDataButtons := TPanel.Create(Self);\r\n lbDictatedReport := TLabel.Create(Self);\r\n btnParseReport := TBitBtn.Create(Self);\r\n WebButton1 := TButton.Create(Self);\r\n pnlImages := TPanel.Create(Self);\r\n WebDBImageControl1 := TDBImageControl.Create(Self);\r\n ImageGrid := TDBResponsiveGrid.Create(Self);\r\n pmImages := TPopupMenu.Create(Self);\r\n Delete1 := TMenuItem.Create(Self);\r\n Print1 := TMenuItem.Create(Self);\r\n tmGeneral := TTimer.Create(Self);\r\n\r\n pnlBottom.BeforeLoadDFMValues;\r\n pnlFormButtons.BeforeLoadDFMValues;\r\n btnShowBottom.BeforeLoadDFMValues;\r\n pnlReportButtons.BeforeLoadDFMValues;\r\n btnRefresh_RPT.BeforeLoadDFMValues;\r\n btnClose_RPT.BeforeLoadDFMValues;\r\n btnSubmit_CERNER.BeforeLoadDFMValues;\r\n pnlSideData.BeforeLoadDFMValues;\r\n sbSideData.BeforeLoadDFMValues;\r\n sb6.BeforeLoadDFMValues;\r\n WebPanel9.BeforeLoadDFMValues;\r\n WebLabel26.BeforeLoadDFMValues;\r\n sb5.BeforeLoadDFMValues;\r\n WebPanel12.BeforeLoadDFMValues;\r\n WebLabel27.BeforeLoadDFMValues;\r\n sb4.BeforeLoadDFMValues;\r\n WebPanel22.BeforeLoadDFMValues;\r\n WebLabel28.BeforeLoadDFMValues;\r\n sb3.BeforeLoadDFMValues;\r\n WebPanel25.BeforeLoadDFMValues;\r\n WebLabel29.BeforeLoadDFMValues;\r\n sb2.BeforeLoadDFMValues;\r\n WebPanel30.BeforeLoadDFMValues;\r\n WebLabel30.BeforeLoadDFMValues;\r\n sb1.BeforeLoadDFMValues;\r\n WebPanel32.BeforeLoadDFMValues;\r\n WebLabel31.BeforeLoadDFMValues;\r\n sb7.BeforeLoadDFMValues;\r\n WebPanel34.BeforeLoadDFMValues;\r\n WebLabel32.BeforeLoadDFMValues;\r\n sb101.BeforeLoadDFMValues;\r\n WebPanel10.BeforeLoadDFMValues;\r\n WebLabel1.BeforeLoadDFMValues;\r\n SG1.BeforeLoadDFMValues;\r\n sb102.BeforeLoadDFMValues;\r\n WebPanel23.BeforeLoadDFMValues;\r\n WebLabel73.BeforeLoadDFMValues;\r\n SG2.BeforeLoadDFMValues;\r\n sb103.BeforeLoadDFMValues;\r\n WebPanel35.BeforeLoadDFMValues;\r\n WebLabel74.BeforeLoadDFMValues;\r\n SG3.BeforeLoadDFMValues;\r\n pnlSideDataButtons.BeforeLoadDFMValues;\r\n lbDictatedReport.BeforeLoadDFMValues;\r\n btnParseReport.BeforeLoadDFMValues;\r\n WebButton1.BeforeLoadDFMValues;\r\n pnlSUBFORM_DIV.BeforeLoadDFMValues;\r\n pnlDataBlocks.BeforeLoadDFMValues;\r\n SubForm_DIV.BeforeLoadDFMValues;\r\n b26.BeforeLoadDFMValues;\r\n WebPanel13.BeforeLoadDFMValues;\r\n WebLabel8.BeforeLoadDFMValues;\r\n B101.BeforeLoadDFMValues;\r\n WebPanel14.BeforeLoadDFMValues;\r\n WebLabel18.BeforeLoadDFMValues;\r\n G1.BeforeLoadDFMValues;\r\n B25.BeforeLoadDFMValues;\r\n WebPanel11.BeforeLoadDFMValues;\r\n WebLabel7.BeforeLoadDFMValues;\r\n B20.BeforeLoadDFMValues;\r\n WebPanel95.BeforeLoadDFMValues;\r\n WebLabel47.BeforeLoadDFMValues;\r\n B21.BeforeLoadDFMValues;\r\n WebPanel2.BeforeLoadDFMValues;\r\n WebLabel3.BeforeLoadDFMValues;\r\n B22.BeforeLoadDFMValues;\r\n WebPanel4.BeforeLoadDFMValues;\r\n WebLabel4.BeforeLoadDFMValues;\r\n b23.BeforeLoadDFMValues;\r\n WebPanel6.BeforeLoadDFMValues;\r\n WebLabel5.BeforeLoadDFMValues;\r\n B18.BeforeLoadDFMValues;\r\n WebPanel111.BeforeLoadDFMValues;\r\n WebLabel55.BeforeLoadDFMValues;\r\n B19.BeforeLoadDFMValues;\r\n WebPanel93.BeforeLoadDFMValues;\r\n WebLabel46.BeforeLoadDFMValues;\r\n B24.BeforeLoadDFMValues;\r\n WebPanel8.BeforeLoadDFMValues;\r\n WebLabel6.BeforeLoadDFMValues;\r\n B29.BeforeLoadDFMValues;\r\n WebPanel19.BeforeLoadDFMValues;\r\n WebLabel11.BeforeLoadDFMValues;\r\n B28.BeforeLoadDFMValues;\r\n WebPanel17.BeforeLoadDFMValues;\r\n WebLabel10.BeforeLoadDFMValues;\r\n B27.BeforeLoadDFMValues;\r\n WebPanel15.BeforeLoadDFMValues;\r\n WebLabel9.BeforeLoadDFMValues;\r\n B16.BeforeLoadDFMValues;\r\n WebPanel107.BeforeLoadDFMValues;\r\n WebLabel53.BeforeLoadDFMValues;\r\n B17.BeforeLoadDFMValues;\r\n WebPanel109.BeforeLoadDFMValues;\r\n WebLabel54.BeforeLoadDFMValues;\r\n B15.BeforeLoadDFMValues;\r\n WebPanel97.BeforeLoadDFMValues;\r\n WebLabel48.BeforeLoadDFMValues;\r\n B14.BeforeLoadDFMValues;\r\n WebPanel99.BeforeLoadDFMValues;\r\n WebLabel49.BeforeLoadDFMValues;\r\n B13.BeforeLoadDFMValues;\r\n WebPanel101.BeforeLoadDFMValues;\r\n WebLabel50.BeforeLoadDFMValues;\r\n B12.BeforeLoadDFMValues;\r\n WebPanel103.BeforeLoadDFMValues;\r\n WebLabel51.BeforeLoadDFMValues;\r\n B11.BeforeLoadDFMValues;\r\n WebPanel105.BeforeLoadDFMValues;\r\n WebLabel52.BeforeLoadDFMValues;\r\n B6.BeforeLoadDFMValues;\r\n WebPanel80.BeforeLoadDFMValues;\r\n WebLabel41.BeforeLoadDFMValues;\r\n B7.BeforeLoadDFMValues;\r\n WebPanel82.BeforeLoadDFMValues;\r\n WebLabel42.BeforeLoadDFMValues;\r\n B8.BeforeLoadDFMValues;\r\n WebPanel86.BeforeLoadDFMValues;\r\n WebLabel43.BeforeLoadDFMValues;\r\n B9.BeforeLoadDFMValues;\r\n WebPanel88.BeforeLoadDFMValues;\r\n WebLabel44.BeforeLoadDFMValues;\r\n B10.BeforeLoadDFMValues;\r\n WebPanel91.BeforeLoadDFMValues;\r\n WebLabel45.BeforeLoadDFMValues;\r\n B5.BeforeLoadDFMValues;\r\n WebPanel74.BeforeLoadDFMValues;\r\n WebLabel38.BeforeLoadDFMValues;\r\n B4.BeforeLoadDFMValues;\r\n WebPanel78.BeforeLoadDFMValues;\r\n WebLabel40.BeforeLoadDFMValues;\r\n B3.BeforeLoadDFMValues;\r\n WebPanel72.BeforeLoadDFMValues;\r\n WebLabel37.BeforeLoadDFMValues;\r\n B2.BeforeLoadDFMValues;\r\n WebPanel76.BeforeLoadDFMValues;\r\n WebLabel39.BeforeLoadDFMValues;\r\n B1.BeforeLoadDFMValues;\r\n WebPanel70.BeforeLoadDFMValues;\r\n WebLabel36.BeforeLoadDFMValues;\r\n B30.BeforeLoadDFMValues;\r\n WebPanel21.BeforeLoadDFMValues;\r\n WebLabel12.BeforeLoadDFMValues;\r\n B100.BeforeLoadDFMValues;\r\n WebPanel3.BeforeLoadDFMValues;\r\n WebLabel14.BeforeLoadDFMValues;\r\n G9.BeforeLoadDFMValues;\r\n B102.BeforeLoadDFMValues;\r\n WebPanel24.BeforeLoadDFMValues;\r\n WebLabel21.BeforeLoadDFMValues;\r\n G2.BeforeLoadDFMValues;\r\n B105.BeforeLoadDFMValues;\r\n WebPanel26.BeforeLoadDFMValues;\r\n WebLabel22.BeforeLoadDFMValues;\r\n G5.BeforeLoadDFMValues;\r\n B104.BeforeLoadDFMValues;\r\n WebPanel18.BeforeLoadDFMValues;\r\n WebLabel19.BeforeLoadDFMValues;\r\n G4.BeforeLoadDFMValues;\r\n B103.BeforeLoadDFMValues;\r\n WebPanel7.BeforeLoadDFMValues;\r\n WebLabel17.BeforeLoadDFMValues;\r\n G3.BeforeLoadDFMValues;\r\n B106.BeforeLoadDFMValues;\r\n WebPanel20.BeforeLoadDFMValues;\r\n WebLabel20.BeforeLoadDFMValues;\r\n G6.BeforeLoadDFMValues;\r\n B107.BeforeLoadDFMValues;\r\n WebPanel27.BeforeLoadDFMValues;\r\n WebLabel23.BeforeLoadDFMValues;\r\n G7.BeforeLoadDFMValues;\r\n B108.BeforeLoadDFMValues;\r\n WebPanel29.BeforeLoadDFMValues;\r\n WebLabel24.BeforeLoadDFMValues;\r\n G8.BeforeLoadDFMValues;\r\n wmWaitMessage.BeforeLoadDFMValues;\r\n viewpdf.BeforeLoadDFMValues;\r\n B31.BeforeLoadDFMValues;\r\n WebPanel5.BeforeLoadDFMValues;\r\n WebLabel16.BeforeLoadDFMValues;\r\n B32.BeforeLoadDFMValues;\r\n WebPanel16.BeforeLoadDFMValues;\r\n WebLabel25.BeforeLoadDFMValues;\r\n B33.BeforeLoadDFMValues;\r\n WebPanel28.BeforeLoadDFMValues;\r\n WebLabel33.BeforeLoadDFMValues;\r\n B34.BeforeLoadDFMValues;\r\n WebPanel33.BeforeLoadDFMValues;\r\n WebLabel34.BeforeLoadDFMValues;\r\n B35.BeforeLoadDFMValues;\r\n WebPanel36.BeforeLoadDFMValues;\r\n WebLabel35.BeforeLoadDFMValues;\r\n B36.BeforeLoadDFMValues;\r\n WebPanel38.BeforeLoadDFMValues;\r\n WebLabel56.BeforeLoadDFMValues;\r\n B37.BeforeLoadDFMValues;\r\n WebPanel40.BeforeLoadDFMValues;\r\n WebLabel57.BeforeLoadDFMValues;\r\n B38.BeforeLoadDFMValues;\r\n WebPanel42.BeforeLoadDFMValues;\r\n WebLabel58.BeforeLoadDFMValues;\r\n B39.BeforeLoadDFMValues;\r\n WebPanel44.BeforeLoadDFMValues;\r\n WebLabel59.BeforeLoadDFMValues;\r\n B40.BeforeLoadDFMValues;\r\n WebPanel46.BeforeLoadDFMValues;\r\n WebLabel60.BeforeLoadDFMValues;\r\n B41.BeforeLoadDFMValues;\r\n WebPanel48.BeforeLoadDFMValues;\r\n WebLabel61.BeforeLoadDFMValues;\r\n B42.BeforeLoadDFMValues;\r\n WebPanel50.BeforeLoadDFMValues;\r\n WebLabel62.BeforeLoadDFMValues;\r\n B43.BeforeLoadDFMValues;\r\n WebPanel52.BeforeLoadDFMValues;\r\n WebLabel63.BeforeLoadDFMValues;\r\n B44.BeforeLoadDFMValues;\r\n WebPanel54.BeforeLoadDFMValues;\r\n WebLabel64.BeforeLoadDFMValues;\r\n B45.BeforeLoadDFMValues;\r\n WebPanel56.BeforeLoadDFMValues;\r\n WebLabel65.BeforeLoadDFMValues;\r\n B46.BeforeLoadDFMValues;\r\n WebPanel58.BeforeLoadDFMValues;\r\n WebLabel66.BeforeLoadDFMValues;\r\n B47.BeforeLoadDFMValues;\r\n WebPanel60.BeforeLoadDFMValues;\r\n WebLabel67.BeforeLoadDFMValues;\r\n B48.BeforeLoadDFMValues;\r\n WebPanel62.BeforeLoadDFMValues;\r\n WebLabel68.BeforeLoadDFMValues;\r\n B49.BeforeLoadDFMValues;\r\n WebPanel64.BeforeLoadDFMValues;\r\n WebLabel69.BeforeLoadDFMValues;\r\n B50.BeforeLoadDFMValues;\r\n WebPanel66.BeforeLoadDFMValues;\r\n WebLabel70.BeforeLoadDFMValues;\r\n pnlImages.BeforeLoadDFMValues;\r\n WebDBImageControl1.BeforeLoadDFMValues;\r\n ImageGrid.BeforeLoadDFMValues;\r\n pmImages.BeforeLoadDFMValues;\r\n Delete1.BeforeLoadDFMValues;\r\n Print1.BeforeLoadDFMValues;\r\n tmGeneral.BeforeLoadDFMValues;\r\n try\r\n btnShowBottom.SetParentComponent(pnlFormButtons);\r\n btnShowBottom.Name := 'btnShowBottom';\r\n btnShowBottom.Left := 172;\r\n btnShowBottom.Top := 0;\r\n btnShowBottom.Width := 40;\r\n btnShowBottom.Height := 41;\r\n btnShowBottom.Cursor := crHandPoint;\r\n btnShowBottom.Hint := 'Quality Indicators';\r\n btnShowBottom.Align := alRight;\r\n btnShowBottom.Caption := '';\r\n btnShowBottom.Color := clNone;\r\n btnShowBottom.ElementClassName := 'btn_icon';\r\n btnShowBottom.Font.Charset := DEFAULT_CHARSET;\r\n btnShowBottom.Font.Color := clGray;\r\n btnShowBottom.Font.Height := -16;\r\n btnShowBottom.Font.Name := 'Tahoma';\r\n btnShowBottom.Font.Style := [];\r\n btnShowBottom.HeightPercent := 100.000000000000000000;\r\n btnShowBottom.MaterialGlyph := 'apps';\r\n btnShowBottom.MaterialGlyphSize := 1;\r\n btnShowBottom.ParentFont := False;\r\n btnShowBottom.ShowHint := True;\r\n btnShowBottom.TabOrder := 10;\r\n btnShowBottom.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnShowBottom, Self, 'OnClick', 'btnShowBottomClick');\r\n btnRefresh_RPT.Left := 97;\r\n btnClose_RPT.Left := 137;\r\n btnSubmit_CERNER.SetParentComponent(pnlReportButtons);\r\n btnSubmit_CERNER.Name := 'btnSubmit_CERNER';\r\n btnSubmit_CERNER.Left := 177;\r\n btnSubmit_CERNER.Top := 0;\r\n btnSubmit_CERNER.Width := 40;\r\n btnSubmit_CERNER.Height := 41;\r\n btnSubmit_CERNER.Cursor := crHandPoint;\r\n btnSubmit_CERNER.Hint := 'Upload Report to CERNER';\r\n btnSubmit_CERNER.Align := alRight;\r\n btnSubmit_CERNER.Caption := '';\r\n btnSubmit_CERNER.Color := clNone;\r\n btnSubmit_CERNER.ElementClassName := 'btn_icon';\r\n btnSubmit_CERNER.Font.Charset := DEFAULT_CHARSET;\r\n btnSubmit_CERNER.Font.Color := clGray;\r\n btnSubmit_CERNER.Font.Height := -13;\r\n btnSubmit_CERNER.Font.Name := 'Tahoma';\r\n btnSubmit_CERNER.Font.Style := [];\r\n btnSubmit_CERNER.HeightPercent := 100.000000000000000000;\r\n btnSubmit_CERNER.ParentFont := False;\r\n btnSubmit_CERNER.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnSubmit_CERNER, Self, 'OnClick', 'btnSubmit_CERNERClick');\r\n SetEvent(btnSubmit_CERNER, Self, 'OnMouseMove', 'btnCloseMouseMove');\r\n sbSideData.Top := 25;\r\n sbSideData.Height := 873;\r\n WebLabel26.Height := 28;\r\n WebLabel27.Height := 28;\r\n WebLabel28.Height := 28;\r\n WebLabel29.Height := 28;\r\n WebLabel30.Height := 28;\r\n sb1.Top := 3;\r\n WebLabel31.Height := 28;\r\n WebLabel32.Height := 28;\r\n WebLabel1.Height := 28;\r\n SG1.Columns.Clear;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n WebLabel73.Height := 28;\r\n SG2.Columns.Clear;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n WebLabel74.Height := 28;\r\n SG3.Columns.Clear;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n pnlSideDataButtons.SetParentComponent(pnlSideData);\r\n pnlSideDataButtons.Name := 'pnlSideDataButtons';\r\n pnlSideDataButtons.Left := 0;\r\n pnlSideDataButtons.Top := 0;\r\n pnlSideDataButtons.Width := 316;\r\n pnlSideDataButtons.Height := 25;\r\n pnlSideDataButtons.ElementClassName := 'block_title';\r\n pnlSideDataButtons.Align := alTop;\r\n pnlSideDataButtons.Alignment := taLeftJustify;\r\n pnlSideDataButtons.BorderColor := clWhite;\r\n pnlSideDataButtons.BorderStyle := bsNone;\r\n pnlSideDataButtons.ChildOrder := 1;\r\n pnlSideDataButtons.Color := clWhite;\r\n pnlSideDataButtons.TabOrder := 1;\r\n lbDictatedReport.SetParentComponent(pnlSideDataButtons);\r\n lbDictatedReport.Name := 'lbDictatedReport';\r\n lbDictatedReport.Left := 0;\r\n lbDictatedReport.Top := 0;\r\n lbDictatedReport.Width := 226;\r\n lbDictatedReport.Height := 25;\r\n lbDictatedReport.Align := alClient;\r\n lbDictatedReport.Caption := 'Dictated Report';\r\n lbDictatedReport.ElementClassName := 'block_title';\r\n lbDictatedReport.HeightPercent := 100.000000000000000000;\r\n lbDictatedReport.WidthPercent := 100.000000000000000000;\r\n btnParseReport.SetParentComponent(pnlSideDataButtons);\r\n btnParseReport.Name := 'btnParseReport';\r\n btnParseReport.Left := 226;\r\n btnParseReport.Top := 0;\r\n btnParseReport.Width := 90;\r\n btnParseReport.Height := 25;\r\n btnParseReport.Cursor := crHandPoint;\r\n btnParseReport.Hint := 'Analyse';\r\n btnParseReport.Align := alRight;\r\n btnParseReport.Caption := '';\r\n btnParseReport.ChildOrder := 87;\r\n btnParseReport.Color := clNone;\r\n btnParseReport.ElementClassName := 'btn_icon';\r\n btnParseReport.Font.Charset := DEFAULT_CHARSET;\r\n btnParseReport.Font.Color := clGray;\r\n btnParseReport.Font.Height := -13;\r\n btnParseReport.Font.Name := 'Tahoma';\r\n btnParseReport.Font.Style := [];\r\n btnParseReport.HeightPercent := 100.000000000000000000;\r\n btnParseReport.MaterialGlyph := 'check';\r\n btnParseReport.MaterialGlyphSize := 1;\r\n btnParseReport.ParentFont := False;\r\n btnParseReport.TabOrder := 6;\r\n btnParseReport.WidthPercent := 9.000000000000000000;\r\n SetEvent(btnParseReport, Self, 'OnClick', 'btnParseReportClick');\r\n WebButton1.SetParentComponent(pnlSideDataButtons);\r\n WebButton1.Name := 'WebButton1';\r\n WebButton1.Left := 96;\r\n WebButton1.Top := 6;\r\n WebButton1.Width := 105;\r\n WebButton1.Height := 25;\r\n WebButton1.Caption := 'WebButton1';\r\n WebButton1.ChildOrder := 1;\r\n WebButton1.HeightPercent := 100.000000000000000000;\r\n WebButton1.Visible := False;\r\n WebButton1.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebButton1, Self, 'OnClick', 'WebButton1Click');\r\n pnlSUBFORM_DIV.Width := 907;\r\n pnlDataBlocks.Width := 907;\r\n SubForm_DIV.Width := 907;\r\n WebLabel8.Height := 28;\r\n WebLabel18.Height := 28;\r\n G1.Columns.Clear;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n WebLabel7.Height := 28;\r\n WebLabel47.Height := 28;\r\n WebLabel3.Height := 28;\r\n WebLabel4.Height := 28;\r\n WebLabel5.Height := 28;\r\n WebLabel55.Height := 28;\r\n WebLabel46.Height := 28;\r\n WebLabel6.Height := 28;\r\n WebLabel11.Height := 28;\r\n WebLabel10.Height := 28;\r\n WebLabel9.Height := 28;\r\n WebLabel53.Height := 28;\r\n WebLabel54.Height := 28;\r\n WebLabel48.Height := 28;\r\n WebLabel49.Height := 28;\r\n WebLabel50.Height := 28;\r\n WebLabel51.Height := 28;\r\n WebLabel52.Height := 28;\r\n WebLabel41.Height := 28;\r\n WebLabel42.Height := 28;\r\n WebLabel43.Height := 28;\r\n WebLabel44.Height := 28;\r\n WebLabel45.Height := 28;\r\n WebLabel38.Height := 28;\r\n WebLabel40.Height := 28;\r\n WebLabel37.Height := 28;\r\n WebLabel39.Height := 28;\r\n WebLabel36.Height := 24;\r\n WebLabel12.Height := 28;\r\n WebLabel14.Height := 28;\r\n G9.Columns.Clear;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n WebLabel21.Height := 28;\r\n G2.Columns.Clear;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n WebLabel22.Height := 28;\r\n G5.Columns.Clear;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n WebLabel19.Height := 28;\r\n G4.Columns.Clear;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n WebLabel17.Height := 28;\r\n G3.Columns.Clear;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n WebLabel20.Height := 28;\r\n G6.Columns.Clear;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n WebLabel23.Height := 28;\r\n G7.Columns.Clear;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n WebLabel24.Height := 28;\r\n G8.Columns.Clear;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n wmWaitMessage.Top := 75;\r\n wmWaitMessage.Picture.LoadFromFile('UDF_ProcReport_EV.SubForm_DIV.wmWaitMessage.Picture.gif');\r\n viewpdf.Left := 689;\r\n viewpdf.Top := 415;\r\n WebLabel16.Height := 28;\r\n WebLabel25.Height := 28;\r\n WebLabel33.Height := 28;\r\n WebLabel34.Height := 28;\r\n WebLabel35.Height := 28;\r\n WebLabel56.Height := 28;\r\n WebLabel57.Height := 28;\r\n WebLabel58.Height := 28;\r\n WebLabel59.Height := 28;\r\n WebLabel60.Height := 28;\r\n WebLabel61.Height := 28;\r\n WebLabel62.Height := 28;\r\n WebLabel63.Height := 28;\r\n WebLabel64.Height := 28;\r\n WebLabel65.Height := 28;\r\n WebLabel66.Height := 28;\r\n WebLabel67.Height := 28;\r\n WebLabel68.Height := 28;\r\n WebLabel69.Height := 28;\r\n WebLabel70.Height := 28;\r\n pnlImages.SetParentComponent(Self);\r\n pnlImages.Name := 'pnlImages';\r\n pnlImages.Left := 910;\r\n pnlImages.Top := 35;\r\n pnlImages.Width := 213;\r\n pnlImages.Height := 898;\r\n pnlImages.Align := alRight;\r\n pnlImages.BorderColor := clWhite;\r\n pnlImages.BorderStyle := bsNone;\r\n pnlImages.ChildOrder := 9;\r\n pnlImages.Color := clWhite;\r\n pnlImages.TabOrder := 5;\r\n WebDBImageControl1.SetParentComponent(pnlImages);\r\n WebDBImageControl1.Name := 'WebDBImageControl1';\r\n WebDBImageControl1.Left := 0;\r\n WebDBImageControl1.Top := 0;\r\n WebDBImageControl1.Width := 213;\r\n WebDBImageControl1.Height := 183;\r\n WebDBImageControl1.HeightPercent := 100.000000000000000000;\r\n WebDBImageControl1.WidthPercent := 100.000000000000000000;\r\n WebDBImageControl1.Align := alTop;\r\n WebDBImageControl1.ChildOrder := 1;\r\n WebDBImageControl1.DataField := 'IMAGEBASE64_DATA';\r\n WebDBImageControl1.DataSource := DM.dsImageDiagram;\r\n ImageGrid.SetParentComponent(pnlImages);\r\n ImageGrid.Name := 'ImageGrid';\r\n ImageGrid.AlignWithMargins := True;\r\n ImageGrid.Left := 3;\r\n ImageGrid.Top := 186;\r\n ImageGrid.Width := 207;\r\n ImageGrid.Height := 709;\r\n ImageGrid.Align := alClient;\r\n ImageGrid.ChildOrder := 23;\r\n ImageGrid.ItemIndex := 0;\r\n ImageGrid.Options.ItemGap := 20;\r\n ImageGrid.Options.ItemHeight := 190;\r\n ImageGrid.Options.ItemSelectedBorderColor := clRed;\r\n ImageGrid.Options.ItemSelectedTextColor := clRed;\r\n ImageGrid.Options.ItemTemplate := '
(%GILABELTEXT%) (%LABEL%)
\"Image\"
(%COMMENTS%)
';\r\n ImageGrid.Options.ItemWidthMin := 140;\r\n SetEvent(ImageGrid, Self, 'OnMouseMove', 'ImageGridMouseMove');\r\n SetEvent(ImageGrid, Self, 'OnItemCreated', 'ImageGridItemCreated');\r\n SetEvent(ImageGrid, Self, 'OnItemClick', 'ImageGridItemClick');\r\n ImageGrid.DataSource := DM.dsImages;\r\n pmImages.SetParentComponent(Self);\r\n pmImages.Name := 'pmImages';\r\n SetEvent(pmImages, Self, 'OnPopup', 'pmImagesPopup');\r\n pmImages.Appearance.HamburgerMenu.Caption := 'Menu';\r\n pmImages.Appearance.HoverColor := 14671839;\r\n pmImages.Appearance.SubmenuIndicator := '►';\r\n pmImages.ElementItemClassName := 'drop-label';\r\n pmImages.Font.Charset := DEFAULT_CHARSET;\r\n pmImages.Font.Color := clWindowText;\r\n pmImages.Font.Height := -11;\r\n pmImages.Font.Name := 'Tahoma';\r\n pmImages.Font.Style := [];\r\n pmImages.Left := 808;\r\n pmImages.Top := 417;\r\n Delete1.SetParentComponent(pmImages);\r\n Delete1.Name := 'Delete1';\r\n Delete1.Caption := 'Delete';\r\n SetEvent(Delete1, Self, 'OnClick', 'Delete1Click');\r\n Print1.SetParentComponent(pmImages);\r\n Print1.Name := 'Print1';\r\n Print1.Caption := 'Print';\r\n SetEvent(Print1, Self, 'OnClick', 'Print1Click');\r\n tmGeneral.SetParentComponent(Self);\r\n tmGeneral.Name := 'tmGeneral';\r\n tmGeneral.Enabled := False;\r\n SetEvent(tmGeneral, Self, 'OnTimer', 'tmGeneralTimer');\r\n tmGeneral.Left := 11;\r\n tmGeneral.Top := 43;\r\n finally\r\n pnlBottom.AfterLoadDFMValues;\r\n pnlFormButtons.AfterLoadDFMValues;\r\n btnShowBottom.AfterLoadDFMValues;\r\n pnlReportButtons.AfterLoadDFMValues;\r\n btnRefresh_RPT.AfterLoadDFMValues;\r\n btnClose_RPT.AfterLoadDFMValues;\r\n btnSubmit_CERNER.AfterLoadDFMValues;\r\n pnlSideData.AfterLoadDFMValues;\r\n sbSideData.AfterLoadDFMValues;\r\n sb6.AfterLoadDFMValues;\r\n WebPanel9.AfterLoadDFMValues;\r\n WebLabel26.AfterLoadDFMValues;\r\n sb5.AfterLoadDFMValues;\r\n WebPanel12.AfterLoadDFMValues;\r\n WebLabel27.AfterLoadDFMValues;\r\n sb4.AfterLoadDFMValues;\r\n WebPanel22.AfterLoadDFMValues;\r\n WebLabel28.AfterLoadDFMValues;\r\n sb3.AfterLoadDFMValues;\r\n WebPanel25.AfterLoadDFMValues;\r\n WebLabel29.AfterLoadDFMValues;\r\n sb2.AfterLoadDFMValues;\r\n WebPanel30.AfterLoadDFMValues;\r\n WebLabel30.AfterLoadDFMValues;\r\n sb1.AfterLoadDFMValues;\r\n WebPanel32.AfterLoadDFMValues;\r\n WebLabel31.AfterLoadDFMValues;\r\n sb7.AfterLoadDFMValues;\r\n WebPanel34.AfterLoadDFMValues;\r\n WebLabel32.AfterLoadDFMValues;\r\n sb101.AfterLoadDFMValues;\r\n WebPanel10.AfterLoadDFMValues;\r\n WebLabel1.AfterLoadDFMValues;\r\n SG1.AfterLoadDFMValues;\r\n sb102.AfterLoadDFMValues;\r\n WebPanel23.AfterLoadDFMValues;\r\n WebLabel73.AfterLoadDFMValues;\r\n SG2.AfterLoadDFMValues;\r\n sb103.AfterLoadDFMValues;\r\n WebPanel35.AfterLoadDFMValues;\r\n WebLabel74.AfterLoadDFMValues;\r\n SG3.AfterLoadDFMValues;\r\n pnlSideDataButtons.AfterLoadDFMValues;\r\n lbDictatedReport.AfterLoadDFMValues;\r\n btnParseReport.AfterLoadDFMValues;\r\n WebButton1.AfterLoadDFMValues;\r\n pnlSUBFORM_DIV.AfterLoadDFMValues;\r\n pnlDataBlocks.AfterLoadDFMValues;\r\n SubForm_DIV.AfterLoadDFMValues;\r\n b26.AfterLoadDFMValues;\r\n WebPanel13.AfterLoadDFMValues;\r\n WebLabel8.AfterLoadDFMValues;\r\n B101.AfterLoadDFMValues;\r\n WebPanel14.AfterLoadDFMValues;\r\n WebLabel18.AfterLoadDFMValues;\r\n G1.AfterLoadDFMValues;\r\n B25.AfterLoadDFMValues;\r\n WebPanel11.AfterLoadDFMValues;\r\n WebLabel7.AfterLoadDFMValues;\r\n B20.AfterLoadDFMValues;\r\n WebPanel95.AfterLoadDFMValues;\r\n WebLabel47.AfterLoadDFMValues;\r\n B21.AfterLoadDFMValues;\r\n WebPanel2.AfterLoadDFMValues;\r\n WebLabel3.AfterLoadDFMValues;\r\n B22.AfterLoadDFMValues;\r\n WebPanel4.AfterLoadDFMValues;\r\n WebLabel4.AfterLoadDFMValues;\r\n b23.AfterLoadDFMValues;\r\n WebPanel6.AfterLoadDFMValues;\r\n WebLabel5.AfterLoadDFMValues;\r\n B18.AfterLoadDFMValues;\r\n WebPanel111.AfterLoadDFMValues;\r\n WebLabel55.AfterLoadDFMValues;\r\n B19.AfterLoadDFMValues;\r\n WebPanel93.AfterLoadDFMValues;\r\n WebLabel46.AfterLoadDFMValues;\r\n B24.AfterLoadDFMValues;\r\n WebPanel8.AfterLoadDFMValues;\r\n WebLabel6.AfterLoadDFMValues;\r\n B29.AfterLoadDFMValues;\r\n WebPanel19.AfterLoadDFMValues;\r\n WebLabel11.AfterLoadDFMValues;\r\n B28.AfterLoadDFMValues;\r\n WebPanel17.AfterLoadDFMValues;\r\n WebLabel10.AfterLoadDFMValues;\r\n B27.AfterLoadDFMValues;\r\n WebPanel15.AfterLoadDFMValues;\r\n WebLabel9.AfterLoadDFMValues;\r\n B16.AfterLoadDFMValues;\r\n WebPanel107.AfterLoadDFMValues;\r\n WebLabel53.AfterLoadDFMValues;\r\n B17.AfterLoadDFMValues;\r\n WebPanel109.AfterLoadDFMValues;\r\n WebLabel54.AfterLoadDFMValues;\r\n B15.AfterLoadDFMValues;\r\n WebPanel97.AfterLoadDFMValues;\r\n WebLabel48.AfterLoadDFMValues;\r\n B14.AfterLoadDFMValues;\r\n WebPanel99.AfterLoadDFMValues;\r\n WebLabel49.AfterLoadDFMValues;\r\n B13.AfterLoadDFMValues;\r\n WebPanel101.AfterLoadDFMValues;\r\n WebLabel50.AfterLoadDFMValues;\r\n B12.AfterLoadDFMValues;\r\n WebPanel103.AfterLoadDFMValues;\r\n WebLabel51.AfterLoadDFMValues;\r\n B11.AfterLoadDFMValues;\r\n WebPanel105.AfterLoadDFMValues;\r\n WebLabel52.AfterLoadDFMValues;\r\n B6.AfterLoadDFMValues;\r\n WebPanel80.AfterLoadDFMValues;\r\n WebLabel41.AfterLoadDFMValues;\r\n B7.AfterLoadDFMValues;\r\n WebPanel82.AfterLoadDFMValues;\r\n WebLabel42.AfterLoadDFMValues;\r\n B8.AfterLoadDFMValues;\r\n WebPanel86.AfterLoadDFMValues;\r\n WebLabel43.AfterLoadDFMValues;\r\n B9.AfterLoadDFMValues;\r\n WebPanel88.AfterLoadDFMValues;\r\n WebLabel44.AfterLoadDFMValues;\r\n B10.AfterLoadDFMValues;\r\n WebPanel91.AfterLoadDFMValues;\r\n WebLabel45.AfterLoadDFMValues;\r\n B5.AfterLoadDFMValues;\r\n WebPanel74.AfterLoadDFMValues;\r\n WebLabel38.AfterLoadDFMValues;\r\n B4.AfterLoadDFMValues;\r\n WebPanel78.AfterLoadDFMValues;\r\n WebLabel40.AfterLoadDFMValues;\r\n B3.AfterLoadDFMValues;\r\n WebPanel72.AfterLoadDFMValues;\r\n WebLabel37.AfterLoadDFMValues;\r\n B2.AfterLoadDFMValues;\r\n WebPanel76.AfterLoadDFMValues;\r\n WebLabel39.AfterLoadDFMValues;\r\n B1.AfterLoadDFMValues;\r\n WebPanel70.AfterLoadDFMValues;\r\n WebLabel36.AfterLoadDFMValues;\r\n B30.AfterLoadDFMValues;\r\n WebPanel21.AfterLoadDFMValues;\r\n WebLabel12.AfterLoadDFMValues;\r\n B100.AfterLoadDFMValues;\r\n WebPanel3.AfterLoadDFMValues;\r\n WebLabel14.AfterLoadDFMValues;\r\n G9.AfterLoadDFMValues;\r\n B102.AfterLoadDFMValues;\r\n WebPanel24.AfterLoadDFMValues;\r\n WebLabel21.AfterLoadDFMValues;\r\n G2.AfterLoadDFMValues;\r\n B105.AfterLoadDFMValues;\r\n WebPanel26.AfterLoadDFMValues;\r\n WebLabel22.AfterLoadDFMValues;\r\n G5.AfterLoadDFMValues;\r\n B104.AfterLoadDFMValues;\r\n WebPanel18.AfterLoadDFMValues;\r\n WebLabel19.AfterLoadDFMValues;\r\n G4.AfterLoadDFMValues;\r\n B103.AfterLoadDFMValues;\r\n WebPanel7.AfterLoadDFMValues;\r\n WebLabel17.AfterLoadDFMValues;\r\n G3.AfterLoadDFMValues;\r\n B106.AfterLoadDFMValues;\r\n WebPanel20.AfterLoadDFMValues;\r\n WebLabel20.AfterLoadDFMValues;\r\n G6.AfterLoadDFMValues;\r\n B107.AfterLoadDFMValues;\r\n WebPanel27.AfterLoadDFMValues;\r\n WebLabel23.AfterLoadDFMValues;\r\n G7.AfterLoadDFMValues;\r\n B108.AfterLoadDFMValues;\r\n WebPanel29.AfterLoadDFMValues;\r\n WebLabel24.AfterLoadDFMValues;\r\n G8.AfterLoadDFMValues;\r\n wmWaitMessage.AfterLoadDFMValues;\r\n viewpdf.AfterLoadDFMValues;\r\n B31.AfterLoadDFMValues;\r\n WebPanel5.AfterLoadDFMValues;\r\n WebLabel16.AfterLoadDFMValues;\r\n B32.AfterLoadDFMValues;\r\n WebPanel16.AfterLoadDFMValues;\r\n WebLabel25.AfterLoadDFMValues;\r\n B33.AfterLoadDFMValues;\r\n WebPanel28.AfterLoadDFMValues;\r\n WebLabel33.AfterLoadDFMValues;\r\n B34.AfterLoadDFMValues;\r\n WebPanel33.AfterLoadDFMValues;\r\n WebLabel34.AfterLoadDFMValues;\r\n B35.AfterLoadDFMValues;\r\n WebPanel36.AfterLoadDFMValues;\r\n WebLabel35.AfterLoadDFMValues;\r\n B36.AfterLoadDFMValues;\r\n WebPanel38.AfterLoadDFMValues;\r\n WebLabel56.AfterLoadDFMValues;\r\n B37.AfterLoadDFMValues;\r\n WebPanel40.AfterLoadDFMValues;\r\n WebLabel57.AfterLoadDFMValues;\r\n B38.AfterLoadDFMValues;\r\n WebPanel42.AfterLoadDFMValues;\r\n WebLabel58.AfterLoadDFMValues;\r\n B39.AfterLoadDFMValues;\r\n WebPanel44.AfterLoadDFMValues;\r\n WebLabel59.AfterLoadDFMValues;\r\n B40.AfterLoadDFMValues;\r\n WebPanel46.AfterLoadDFMValues;\r\n WebLabel60.AfterLoadDFMValues;\r\n B41.AfterLoadDFMValues;\r\n WebPanel48.AfterLoadDFMValues;\r\n WebLabel61.AfterLoadDFMValues;\r\n B42.AfterLoadDFMValues;\r\n WebPanel50.AfterLoadDFMValues;\r\n WebLabel62.AfterLoadDFMValues;\r\n B43.AfterLoadDFMValues;\r\n WebPanel52.AfterLoadDFMValues;\r\n WebLabel63.AfterLoadDFMValues;\r\n B44.AfterLoadDFMValues;\r\n WebPanel54.AfterLoadDFMValues;\r\n WebLabel64.AfterLoadDFMValues;\r\n B45.AfterLoadDFMValues;\r\n WebPanel56.AfterLoadDFMValues;\r\n WebLabel65.AfterLoadDFMValues;\r\n B46.AfterLoadDFMValues;\r\n WebPanel58.AfterLoadDFMValues;\r\n WebLabel66.AfterLoadDFMValues;\r\n B47.AfterLoadDFMValues;\r\n WebPanel60.AfterLoadDFMValues;\r\n WebLabel67.AfterLoadDFMValues;\r\n B48.AfterLoadDFMValues;\r\n WebPanel62.AfterLoadDFMValues;\r\n WebLabel68.AfterLoadDFMValues;\r\n B49.AfterLoadDFMValues;\r\n WebPanel64.AfterLoadDFMValues;\r\n WebLabel69.AfterLoadDFMValues;\r\n B50.AfterLoadDFMValues;\r\n WebPanel66.AfterLoadDFMValues;\r\n WebLabel70.AfterLoadDFMValues;\r\n pnlImages.AfterLoadDFMValues;\r\n WebDBImageControl1.AfterLoadDFMValues;\r\n ImageGrid.AfterLoadDFMValues;\r\n pmImages.AfterLoadDFMValues;\r\n Delete1.AfterLoadDFMValues;\r\n Print1.AfterLoadDFMValues;\r\n tmGeneral.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit UDF_ProcReport_Q;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Variants, System.Classes, System.types, Vcl.Graphics,\r\n Vcl.Controls, Vcl.Forms, Vcl.Dialogs, EditForm_Base, VCL.TMSFNCTypes,\r\n VCL.TMSFNCUtils, VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes, WEBLib.Grids,\r\n WEBLib.WebCtrls, Vcl.Imaging.GIFImg, WEBLib.Controls, WEBLib.Dialogs,\r\n Vcl.Grids, WEBLib.DBCtrls, WEBLib.ExtCtrls, WEBLib.Buttons, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, VCL.TMSFNCCustomControl, VCL.TMSFNCSwitch, Vcl.Menus,\r\n WEBLib.Menus, JS, XData.Web.Client, Weblib.JSON;\r\n\r\ntype\r\n TfrmUDF_ProcReport_Q = class(TfrmEditForm_Base)\r\n pnlImages: TPanel;\r\n ImageGrid: TDBResponsiveGrid;\r\n WebDBImageControl1: TDBImageControl;\r\n pmImages: TPopupMenu;\r\n Delete1: TMenuItem;\r\n Print1: TMenuItem;\r\n pnlSideDataButtons: TPanel;\r\n btnParseReport: TBitBtn;\r\n btnSubmit_CERNER: TBitBtn;\r\n lbDictatedReport: TLabel;\r\n btnShowBottom: TBitBtn;\r\n tmGeneral: TTimer;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure Delete1Click(Sender: TObject);\r\n procedure Print1Click(Sender: TObject);\r\n procedure ImageGridMouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure btnParseReportClick(Sender: TObject);\r\n function GetJSSection(JSONObject: TJSONObject; const aSectionStr: string): string;\r\n procedure tbReportChange(Sender: TObject);\r\n procedure btnSubmit_CERNERClick(Sender: TObject);\r\n procedure pmImagesPopup(Sender: TObject);\r\n procedure btnShowBottomClick(Sender: TObject);\r\n procedure tmGeneralTimer(Sender: TObject);\r\n procedure ImageGridItemClick(Sender: TObject; Index: Integer);\r\n procedure ImageGridItemCreated(Sender: TObject; Index: Integer);\r\n procedure ImageGridItemGetFieldValue(Sender: TObject; Index: Integer;\r\n AFieldName: string; var AValue: string);\r\n private\r\n { Private declarations }\r\n mouse_x, mouse_y: integer;\r\n public\r\n { Public declarations }\r\n\r\n procedure ImageMenu;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmUDF_ProcReport_Q: TfrmUDF_ProcReport_Q;\r\n pnlSideDataWidth_p : integer;\r\n\r\n\r\nimplementation\r\n\r\n{$R *.dfm}\r\n\r\nuses DataModule, Common, Main;\r\n\r\nprocedure TfrmUDF_ProcReport_Q.ImageMenu;\r\n begin\r\n //showmessage(frmUDF_ProcReport_Q.Name);\r\n // showmessage(inttostr(imagegrid.ItemIndex));\r\n //showmessage(inttostr(mouse_x) + ' - ' + inttostr(mouse_y));\r\n pmImages.Popup(mouse_x, mouse_y);\r\n end;\r\n\r\n\r\nprocedure TfrmUDF_ProcReport_Q.pmImagesPopup(Sender: TObject);\r\nbegin\r\n inherited;\r\npmImages.visible := true;\r\npmImages.tag := 1;\r\nend;\r\n\r\nprocedure TfrmUDF_ProcReport_Q.Delete1Click(Sender: TObject);\r\n\r\nvar sql_p: string;\r\n\r\n procedure OnDlgResult(Result: TDialogResult);\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p: string;\r\n begin\r\n dm.xdsImages.Delete;\r\n end;\r\n\r\n begin\r\n if Result = mrYes\r\n then begin\r\n sql_p := 'delete from imagesevault where procedurenumber = ' +\r\n EGV_CURRENT_PROCEDURENUMBER + ' and IMAGENUMBER = ' + dm.xdsImagesIMAGENUMBER.asstring +\r\n ' and FACILITYID = ' + EGV_FACILITYID;\r\n //showmessage(sql_p);\r\n dm.XDataWebClient1.RawInvoke('IReportService.ExecQuery',[sql_p, egv_facilityid, '0'], @OnResult);\r\n end;\r\n end;\r\nbegin\r\n inherited;\r\nfrmmain.mdGenDialog.ShowDialog\r\n('Delete the image ?', WEBLib.Dialogs.mtConfirmation, [], @OnDlgResult);\r\nend;\r\n\r\nprocedure TfrmUDF_ProcReport_Q.ImageGridItemClick(Sender: TObject;\r\n Index: Integer);\r\nbegin\r\n inherited;\r\n imagemenu;\r\nend;\r\n\r\nprocedure TfrmUDF_ProcReport_Q.ImageGridItemCreated(Sender: TObject;\r\n Index: Integer);\r\nbegin\r\n inherited;\r\n { //UDF_ImageCapture.frmUDF_ImageCapture\r\nif dm.xdsImagesSELECTED.AsString = 'T'\r\nthen imagegrid.Items[index].HTML := stringreplace(frmMain.mImageGridHTML_selected.text, 'openimagemenu', 'openimagemenu_q',[rfIgnoreCase])\r\nelse imagegrid.Items[index].HTML := stringreplace(frmMain.mImageGridHTML_notselected.text, 'openimagemenu', 'openimagemenu_q',[rfIgnoreCase]);\r\n// showmessage(imagegrid.Items[index].HTML);\r\n //showmessage(dm.xdsImagessequence.AsString + ' - ' + dm.xdsImagesLABEL.AsString + ' - ' + dm.xdsImagesCOMMENTS.AsString);\r\n imagegrid.Items[index].HTML :=\r\n stringreplace(imagegrid.Items[index].HTML, '(%LABEL%)', dm.xdsImagesLABEL.AsString,[rfReplaceAll]);\r\n imagegrid.Items[index].HTML :=\r\n stringreplace(imagegrid.Items[index].HTML, '(%COMMENTS%)', dm.xdsImagesCOMMENTS.AsString,[rfReplaceAll]);\r\n imagegrid.Items[index].HTML :=\r\n copy(imagegrid.Items[index].HTML, 1, pos('(%IMAGEBASE64%)', imagegrid.Items[index].HTML) - 1 ) +\r\n dm.xdsImagesIMAGEBASE64.AsString +\r\n copy(imagegrid.Items[index].HTML, pos('(%IMAGEBASE64%)', imagegrid.Items[index].HTML) + 15, length(imagegrid.Items[index].HTML))\r\n }\r\nend;\r\n\r\nprocedure TfrmUDF_ProcReport_Q.ImageGridItemGetFieldValue(Sender: TObject;\r\n Index: Integer; AFieldName: string; var AValue: string);\r\nbegin\r\n inherited;\r\n\r\n\r\n// showmessage(afieldname + ' - ' + avalue);\r\nend;\r\n\r\nprocedure TfrmUDF_ProcReport_Q.ImageGridMouseMove(Sender: TObject;\r\n Shift: TShiftState; X, Y: Integer);\r\n var P: TPoint;\r\nbegin\r\n inherited;\r\nif pmImages.tag = 1\r\nthen begin\r\n pmImages.tag := 0;\r\n pmImages.visible := false;\r\n end;\r\n\r\nP.x := x;\r\nP.y := y;\r\nP := ImageGrid.clienttoscreen(P);\r\nP := self.ScreenToClient(P);\r\nmouse_x := P.x;\r\nmouse_y := P.y;\r\nend;\r\n\r\nprocedure TfrmUDF_ProcReport_Q.Print1Click(Sender: TObject);\r\nvar s, sql_p: string;\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p: string;\r\n begin\r\n dm.xdsImages.Edit;\r\n if dm.xdsImagesSELECTED.AsString = 'T'\r\n then dm.xdsImagesSELECTED.AsString := 'F'\r\n else dm.xdsImagesSELECTED.AsString := 'T';\r\n dm.xdsImages.Post;\r\n end;\r\n\r\nbegin\r\n inherited;\r\n// showmessage(inttostr(imagegrid.ItemIndex));\r\nif dm.xdsImagesSELECTED.AsString = 'T'\r\nthen s := 'F'\r\nelse s := 'T';\r\n\r\nsql_p := 'update imagesevault set SELECTED = ' + quotedstr(s) + ' where procedurenumber = ' +\r\n EGV_CURRENT_PROCEDURENUMBER + ' and IMAGENUMBER = ' + dm.xdsImagesIMAGENUMBER.asstring;\r\n//showmessage(sql_p);\r\ndm.XDataWebClient1.RawInvoke('IReportService.ExecQuery',[sql_p, egv_facilityid, '0'], @OnResult);\r\nend;\r\n\r\nprocedure TfrmUDF_ProcReport_Q.tbReportChange(Sender: TObject);\r\nbegin\r\n inherited;\r\npnlImages.Visible := (tbReport.State = ssOFF);\r\npnlSidedata.Visible := (tbReport.State = ssOFF);\r\nend;\r\n\r\nprocedure TfrmUDF_ProcReport_Q.tmGeneralTimer(Sender: TObject);\r\nbegin\r\n inherited;\r\ntmGeneral.Enabled := false;\r\nbtnShowBottomClick(btnShowBottom);\r\nend;\r\n\r\nprocedure TfrmUDF_ProcReport_Q.btnParseReportClick(Sender: TObject);\r\nvar s,s1,s2,s3: string; JSONObject_p: TJSONObject; m: TMemo;\r\n\r\n function GetStr(JSONObject: TJSONObject; const aSectionStr, aMemoSection: string; aValue_Skip: string=''; aBlock: TPanel=nil): string;\r\n var\r\n found_str: string;\r\n item_value: string;\r\n JSONArray: TJSONArray;\r\n i: integer;\r\n begin\r\n result := '';\r\n found_str := '';\r\n //if JSONObject.TryGetValue(JSONArray) then\r\n //if JSONObject.TryGetValue(aSectionStr, JSONArray) then\r\n JSONArray := JSONObject.GetValue(aSectionStr) as TJsonArray;\r\n //JSONArray := JSONObject.GetValue(aSectionStr);\r\n if JSONArray <> nil then\r\n begin\r\n for i := 0 to JSONArray.Count - 1 do\r\n begin\r\n item_value := JSONArray.Items[I].Value;\r\n if (item_value <> '') and (UpperCase(item_value) <> 'N/A') then\r\n begin\r\n if found_str <> '' then\r\n found_str := found_str + ' ';\r\n found_str := found_str + item_value;\r\n end;\r\n end;\r\n\r\n result := found_str;\r\n\r\n // put in a memo block\r\n m := nil;\r\n if aBlock = nil\r\n then begin\r\n if aMemoSection <> ''\r\n then m := BlockGetMemoByTitle(aMemoSection, Subform_div);\r\n end\r\n else begin\r\n m := BlockGetMemo(aBlock);\r\n //showmessage(aBlock.Name);\r\n end;\r\n\r\n if (m <> nil)\r\n then if uppercase(trim(found_str)) <> uppercase(aValue_Skip)\r\n then begin\r\n m.Text := found_str;\r\n m.Tag := 1;\r\n BlockApplyDependencies((m.Parent as Tpanel), m.Text);\r\n end;\r\n end\r\n else\r\n //showmessage('nil');\r\n end;\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p: string;\r\n begin\r\n frmmain.wmWaitMessage.hide;\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n JSONObject_p := TJSONObject.ParseJSONValue(Response_p) as TJSONObject;\r\n\r\n// JSONArray := TJSONArray(TJSONObject.ParseJSONValue(JSONArrayString));\r\n // showmessage(Response_p);\r\n\r\n GetStr(JSONObject_p, 'IND', 'Indications');\r\n GetStr(JSONObject_p, 'DIAG', 'Diagnosis');\r\n GetStr(JSONObject_p, 'FND', 'Findings');\r\n GetStr(JSONObject_p, 'RCM', 'Recommendations');\r\n GetStr(JSONObject_p, 'EOE', 'Extent of Exam');\r\n GetStr(JSONObject_p, 'COMPL', 'Complications');\r\n GetStr(JSONObject_p, 'INSUF', 'insufflation');\r\n GetStr(JSONObject_p, 'LIM', 'Limitations');\r\n GetStr(JSONObject_p, 'MED', 'Medications');\r\n\r\n s := GetStr(JSONObject_p, 'POLYP-COUNT', '', 'N/A', B26); //showmessage(s);\r\n m := BlockGetMemo(B25);\r\n if m <> nil\r\n then begin\r\n if (s <> '') and (s <> '0') // can be 'N/A' - skip\r\n then m.Text := 'Yes'\r\n else m.Text := 'No';\r\n BlockApplyDependencies((m.Parent as Tpanel), m.Text);\r\n m.Tag := 1; // updated\r\n end;\r\n\r\n s := GetStr(JSONObject_p, 'POLYP-POLYPECTOMY', '', 'N/A', B28);\r\n m := BlockGetMemo(B27);\r\n if m <> nil\r\n then begin\r\n if (s <> '') and (s <> '0') // can be 'N/A' - skip\r\n then m.Text := 'Yes'\r\n else m.Text := 'No';\r\n BlockApplyDependencies((m.Parent as Tpanel), m.Text);\r\n m.Tag := 1; // updated\r\n end;\r\n\r\n s := GetStr(JSONObject_p, 'POLYP-REM_CPLT', '', 'N/A', B30);\r\n m := BlockGetMemo(B31);\r\n if m <> nil\r\n then begin\r\n if (s <> '') and (s <> '0') // can be 'N/A' - skip\r\n then m.Text := 'Yes'\r\n else m.Text := 'No';\r\n BlockApplyDependencies((m.Parent as Tpanel), m.Text);\r\n m.Tag := 1; // updated\r\n end;\r\n\r\n s := GetStr(JSONObject_p, 'POLYP-SPECIMEN', '', 'N/A', B35);\r\n m := BlockGetMemo(B34);\r\n if m <> nil\r\n then begin\r\n if (s <> '') and (s <> '0') // can be 'N/A' - skip\r\n then m.Text := 'Yes'\r\n else m.Text := 'No';\r\n BlockApplyDependencies((m.Parent as Tpanel), m.Text);\r\n m.Tag := 1; // updated\r\n end;\r\n\r\n s := GetStr(JSONObject_p, 'POLYP-REM_PART', '', 'N/A', B41);\r\n m := BlockGetMemo(B29);\r\n if m <> nil\r\n then begin\r\n if (s <> '') and (s <> '0') // can be 'N/A' - skip\r\n then m.Text := 'Yes'\r\n else m.Text := 'No';\r\n BlockApplyDependencies((m.Parent as Tpanel), m.Text);\r\n m.Tag := 1; // updated\r\n end;\r\n\r\n s := GetStr(JSONObject_p, 'POLYP-TATTOED', '', 'N/A', B32);\r\n m := BlockGetMemo(B32);\r\n if m <> nil\r\n then begin\r\n if (s <> '') and (s <> '0') // can be 'N/A' - skip\r\n then m.Text := 'Yes'\r\n else m.Text := 'No';\r\n BlockApplyDependencies((m.Parent as Tpanel), m.Text);\r\n m.Tag := 1; // updated\r\n end;\r\n\r\n s := GetStr(JSONObject_p, 'POLYP-BIOPSY', '', 'N/A', B33);\r\n\r\n s1 := GetStr(JSONObject_p, 'BBP-L', '', 'N/A', B37); //BBP-L', 'Boston Bowel Prep - Left Colon\r\n s2 := GetStr(JSONObject_p, 'BBP-T', '', 'N/A', B38); //BBP-T', 'Boston Bowel Prep - Transverse\r\n s3 := GetStr(JSONObject_p, 'BBP-R', '', 'N/A', B39); //BBP-R', 'Boston Bowel Prep - Right Colon\r\n\r\n if s1 = '' then s1 := '0';\r\n if s2 = '' then s2 := '0';\r\n if s3 = '' then s3 := '0';\r\n BlockGetMemo(B46).text := inttostr(strtoint(s1) + strtoint(s2) + strtoint(s3));\r\n BlockGetMemo(B46).Tag := 1; // updated\r\n\r\n if (strtoint(s1) + strtoint(s2) + strtoint(s3)) >= 6 then\r\n BlockGetMemo(B40).text := 'Adequate'\r\n else\r\n if (s1 <> '0') or (s2 <> '0') or (s3 <> '0') then\r\n BlockGetMemo(B40).text := 'Inadequate'\r\n else\r\n BlockGetMemo(B40).text := '';\r\n\r\n\r\n StretchAllMemos(Subform_div);\r\n\r\n {'IND', //Indications);\r\n 'DIAG', //Diagnosis);\r\n 'FND', //Findings);\r\n\r\n 'RCM', //Recommendations);\r\n 'EOE', //ExtentOfExam);\r\n 'LIM', //Limitations);\r\n 'COMPL', //Complications);\r\n 'DISC-SCORE', //DiscomfortScore);\r\n 'INSUF', //Insufflation);\r\n 'INS-TECH', //InsertionTechnique);\r\n\r\n // rbBostonLeft.\r\n 'BBP-L'\r\n // rbBostonTransv\r\n 'BBP-T'\r\n // rbBostonRight.\r\n 'BBP-R'\r\n\r\n\r\n //PolypFound\r\n 'POLYP-COUNT'));\r\n //Polypectopy\r\n 'POLYP-POLYPECTOMY'\r\n //PRemoved\r\n 'POLYP-REM_PART'\r\n //PolypRetr\r\n 'POLYP-REM_CPLT'\r\n //PolypTattooed\r\n 'POLYP-TATTOED'\r\n //BiopsyObt\r\n 'POLYP-BIOPSY'\r\n //Specimen\r\n 'POLYP-SPECIMEN'\r\n //HemoAchieved\r\n 'POLYP-HEMOSTASIS'\r\n //Medications\r\n 'MED' }\r\n end;\r\n\r\nbegin\r\n inherited;\r\n\r\nif pnlSidedata.Width = 30\r\n then begin\r\n sbSideData.Visible := true;\r\n lbDictatedReport.Visible := true;\r\n pnlSidedata.Width := pnlSideDataWidth_p;\r\n WebFormResize(getcurrentform);\r\n exit;\r\n end\r\n else begin\r\n pnlSideDataWidth_p := pnlSidedata.Width;\r\n pnlSidedata.Width := 30;\r\n sbSideData.Visible := false;\r\n lbDictatedReport.Visible := false;\r\n WebFormResize(getcurrentform);\r\n end;\r\n\r\nif not frmmain.wmWaitMessage.showing then begin frmmain.wmWaitMessage.tag := 0; frmmain.wmWaitMessage.show; end;\r\nif EGV_FACILITYTOKEN = '' then s := EGV_FACILITY\r\n else s := EGV_FACILITY + ',' + EGV_FACILITYTOKEN;\r\n //showmessage(s);\r\n //showmessage(sm1.text);\r\ndm.XDataWebClient1.RawInvoke('IReportService.QAI_ParseReport',\r\n [s, sm1.text], @OnResult);\r\nend;\r\n\r\nprocedure TfrmUDF_ProcReport_Q.btnShowBottomClick(Sender: TObject);\r\nvar i: integer;\r\nbegin\r\n inherited;\r\n if (sender as TControl).Tag = 0\r\n then (sender as TControl).Tag := 1\r\n else (sender as TControl).Tag := 0;\r\n\r\nif (sender as TControl).Tag = 1\r\nthen begin\r\n (sender as TBitBtn).hint := 'Quality Indicators';\r\n (sender as TBitBtn).caption := '';\r\n for i := 1 to 24\r\n do begin\r\n if (not (self.FindComponent('B'+inttostr(i)) as TPanel).Visible) and\r\n ((self.FindComponent('B'+inttostr(i)) as TPanel).tag = 2)\r\n then begin\r\n (self.FindComponent('B'+inttostr(i)) as TPanel).Visible := true;\r\n (self.FindComponent('B'+inttostr(i)) as TPanel).tag := 0;\r\n end;\r\n end;\r\n for i := 25 to 50\r\n do begin\r\n if (self.FindComponent('B'+inttostr(i)) as TPanel).Visible\r\n then begin\r\n (self.FindComponent('B'+inttostr(i)) as TPanel).Visible := false;\r\n (self.FindComponent('B'+inttostr(i)) as TPanel).tag := 2;\r\n end;\r\n end;\r\n end;\r\n\r\nif (sender as TControl).Tag = 0\r\nthen begin\r\n (sender as TBitBtn).hint := 'Report';\r\n (sender as TBitBtn).caption := '';\r\n for i := 1 to 24\r\n do begin\r\n if (self.FindComponent('B'+inttostr(i)) as TPanel).Visible\r\n then begin\r\n (self.FindComponent('B'+inttostr(i)) as TPanel).Visible := false;\r\n (self.FindComponent('B'+inttostr(i)) as TPanel).tag := 2;\r\n end;\r\n end;\r\n for i := 25 to 50\r\n do begin\r\n if (not (self.FindComponent('B'+inttostr(i)) as TPanel).Visible) and\r\n ((self.FindComponent('B'+inttostr(i)) as TPanel).tag = 2)\r\n then begin\r\n (self.FindComponent('B'+inttostr(i)) as TPanel).Visible := true;\r\n (self.FindComponent('B'+inttostr(i)) as TPanel).tag := 0;\r\n end;\r\n end;\r\n end;\r\n\r\norganizeblocks((b1.parent as TScrollBox));\r\nStretchAllMemos(Subform_div);\r\n\r\nend;\r\n\r\nprocedure TfrmUDF_ProcReport_Q.btnSubmit_CERNERClick(Sender: TObject);\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p: string;\r\n begin\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n // showmessage('file submission response:: '+ response_p);\r\n showmessage('File has been successfuly submitted.');\r\n end;\r\n\r\nbegin\r\n// inherited;\r\n{showmessage(ELV_REPORTFILENAME +' - ' +\r\n ELV_PATIENTCERNERID +' - ' +\r\n ELV_CERNERPATIENT_NAME +' - ' +\r\n ELV_CERNERPROVIDER_CODE +' - ' +\r\n ELV_CERNERECOUNTER_DATE +' - ' +\r\n ELV_CERNERENCOUNTER_TIME +' - ' +\r\n ELV_CERNERENCOUNTER_ID ); }\r\n\r\ndm.XDataWebClient1.RawInvoke('IReportService.CERNER_SubmitFile',\r\n[ELV_REPORTFILENAME,\r\n ELV_PATIENTCERNERID,\r\n ELV_CERNERPATIENT_NAME,\r\n ELV_CERNERPROVIDER_CODE,\r\n ELV_CERNERECOUNTER_DATE,\r\n ELV_CERNERENCOUNTER_TIME,\r\n ELV_CERNERENCOUNTER_ID], @OnResult);\r\nend;\r\n\r\nprocedure TfrmUDF_ProcReport_Q.WebFormShow(Sender: TObject);\r\nbegin\r\n\r\n inherited;\r\nResizeButtons(pnlSideDataButtons);\r\n\r\n//imagegrid.Options.itemtemplate := frmMain.mImageGridHTML_notselected.Text;\r\n\r\nfrmUDF_ProcReport_Q := self;\r\n\r\ndm.xdsImageDiagram.Close;\r\nopendataset_j(dm.xdsImageDiagram,'select TRACTIMAGE as IMAGE from PROCEDURE_SURGERY where id = ' + EGV_CURRENT_PROCEDURENUMBER +\r\n ' and facilityid = ' + EGV_FACILITYID);\r\ndm.xdsImages.Close;\r\nopendataset_j(dm.xdsImages,'QLINICAL_IMAGES');\r\n\r\npnlSideDataWidth_p := pnlSidedata.Width;\r\ntmGeneral.Enabled := true; //for quality indicators\r\nend;\r\n\r\nfunction TfrmUDF_ProcReport_Q.GetJSSection(JSONObject: TJSONObject; const aSectionStr: string): string;\r\nvar i: integer; item_value: string; JSONArray: TJSONArray;\r\n begin\r\n //showmessage(JSONObject.GetJSONValue('FND') );\r\n{ result := '';\r\n try\r\n if JSONObject.TryGetValue(aSectionStr, JSONArray) then\r\n for i := 0 to JSONArray.Count - 1 do\r\n begin\r\n item_value := JSONArray.Items[I].Value;\r\n if (item_value <> '') and (UpperCase(item_value) <> 'N/A') then\r\n begin\r\n if result = ''\r\n then result := item_value\r\n else result := result + char(13) + item_value;\r\n end;\r\n end;\r\n except\r\n On E: Exception do Showmessage(E.Message)\r\n end; }\r\n end;\r\nprocedure TfrmUDF_ProcReport_Q.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n btnShowBottom := TBitBtn.Create(Self);\r\n btnSubmit_CERNER := TBitBtn.Create(Self);\r\n pnlSideDataButtons := TPanel.Create(Self);\r\n lbDictatedReport := TLabel.Create(Self);\r\n btnParseReport := TBitBtn.Create(Self);\r\n pnlImages := TPanel.Create(Self);\r\n WebDBImageControl1 := TDBImageControl.Create(Self);\r\n ImageGrid := TDBResponsiveGrid.Create(Self);\r\n pmImages := TPopupMenu.Create(Self);\r\n Delete1 := TMenuItem.Create(Self);\r\n Print1 := TMenuItem.Create(Self);\r\n tmGeneral := TTimer.Create(Self);\r\n\r\n pnlBottom.BeforeLoadDFMValues;\r\n pnlFormButtons.BeforeLoadDFMValues;\r\n btnShowBottom.BeforeLoadDFMValues;\r\n pnlReportButtons.BeforeLoadDFMValues;\r\n btnRefresh_RPT.BeforeLoadDFMValues;\r\n btnClose_RPT.BeforeLoadDFMValues;\r\n btnSubmit_CERNER.BeforeLoadDFMValues;\r\n pnlSideData.BeforeLoadDFMValues;\r\n sbSideData.BeforeLoadDFMValues;\r\n sb6.BeforeLoadDFMValues;\r\n WebPanel9.BeforeLoadDFMValues;\r\n WebLabel26.BeforeLoadDFMValues;\r\n sb5.BeforeLoadDFMValues;\r\n WebPanel12.BeforeLoadDFMValues;\r\n WebLabel27.BeforeLoadDFMValues;\r\n sb4.BeforeLoadDFMValues;\r\n WebPanel22.BeforeLoadDFMValues;\r\n WebLabel28.BeforeLoadDFMValues;\r\n sb3.BeforeLoadDFMValues;\r\n WebPanel25.BeforeLoadDFMValues;\r\n WebLabel29.BeforeLoadDFMValues;\r\n sb2.BeforeLoadDFMValues;\r\n WebPanel30.BeforeLoadDFMValues;\r\n WebLabel30.BeforeLoadDFMValues;\r\n sb1.BeforeLoadDFMValues;\r\n WebPanel32.BeforeLoadDFMValues;\r\n WebLabel31.BeforeLoadDFMValues;\r\n sb7.BeforeLoadDFMValues;\r\n WebPanel34.BeforeLoadDFMValues;\r\n WebLabel32.BeforeLoadDFMValues;\r\n sb101.BeforeLoadDFMValues;\r\n WebPanel10.BeforeLoadDFMValues;\r\n WebLabel1.BeforeLoadDFMValues;\r\n SG1.BeforeLoadDFMValues;\r\n sb102.BeforeLoadDFMValues;\r\n WebPanel23.BeforeLoadDFMValues;\r\n WebLabel73.BeforeLoadDFMValues;\r\n SG2.BeforeLoadDFMValues;\r\n sb103.BeforeLoadDFMValues;\r\n WebPanel35.BeforeLoadDFMValues;\r\n WebLabel74.BeforeLoadDFMValues;\r\n SG3.BeforeLoadDFMValues;\r\n pnlSideDataButtons.BeforeLoadDFMValues;\r\n lbDictatedReport.BeforeLoadDFMValues;\r\n btnParseReport.BeforeLoadDFMValues;\r\n pnlSUBFORM_DIV.BeforeLoadDFMValues;\r\n pnlDataBlocks.BeforeLoadDFMValues;\r\n SubForm_DIV.BeforeLoadDFMValues;\r\n b26.BeforeLoadDFMValues;\r\n WebPanel13.BeforeLoadDFMValues;\r\n WebLabel8.BeforeLoadDFMValues;\r\n B101.BeforeLoadDFMValues;\r\n WebPanel14.BeforeLoadDFMValues;\r\n WebLabel18.BeforeLoadDFMValues;\r\n G1.BeforeLoadDFMValues;\r\n B25.BeforeLoadDFMValues;\r\n WebPanel11.BeforeLoadDFMValues;\r\n WebLabel7.BeforeLoadDFMValues;\r\n B20.BeforeLoadDFMValues;\r\n WebPanel95.BeforeLoadDFMValues;\r\n WebLabel47.BeforeLoadDFMValues;\r\n B21.BeforeLoadDFMValues;\r\n WebPanel2.BeforeLoadDFMValues;\r\n WebLabel3.BeforeLoadDFMValues;\r\n B22.BeforeLoadDFMValues;\r\n WebPanel4.BeforeLoadDFMValues;\r\n WebLabel4.BeforeLoadDFMValues;\r\n b23.BeforeLoadDFMValues;\r\n WebPanel6.BeforeLoadDFMValues;\r\n WebLabel5.BeforeLoadDFMValues;\r\n B18.BeforeLoadDFMValues;\r\n WebPanel111.BeforeLoadDFMValues;\r\n WebLabel55.BeforeLoadDFMValues;\r\n B19.BeforeLoadDFMValues;\r\n WebPanel93.BeforeLoadDFMValues;\r\n WebLabel46.BeforeLoadDFMValues;\r\n B24.BeforeLoadDFMValues;\r\n WebPanel8.BeforeLoadDFMValues;\r\n WebLabel6.BeforeLoadDFMValues;\r\n B29.BeforeLoadDFMValues;\r\n WebPanel19.BeforeLoadDFMValues;\r\n WebLabel11.BeforeLoadDFMValues;\r\n B28.BeforeLoadDFMValues;\r\n WebPanel17.BeforeLoadDFMValues;\r\n WebLabel10.BeforeLoadDFMValues;\r\n B27.BeforeLoadDFMValues;\r\n WebPanel15.BeforeLoadDFMValues;\r\n WebLabel9.BeforeLoadDFMValues;\r\n B16.BeforeLoadDFMValues;\r\n WebPanel107.BeforeLoadDFMValues;\r\n WebLabel53.BeforeLoadDFMValues;\r\n B17.BeforeLoadDFMValues;\r\n WebPanel109.BeforeLoadDFMValues;\r\n WebLabel54.BeforeLoadDFMValues;\r\n B15.BeforeLoadDFMValues;\r\n WebPanel97.BeforeLoadDFMValues;\r\n WebLabel48.BeforeLoadDFMValues;\r\n B14.BeforeLoadDFMValues;\r\n WebPanel99.BeforeLoadDFMValues;\r\n WebLabel49.BeforeLoadDFMValues;\r\n B13.BeforeLoadDFMValues;\r\n WebPanel101.BeforeLoadDFMValues;\r\n WebLabel50.BeforeLoadDFMValues;\r\n B12.BeforeLoadDFMValues;\r\n WebPanel103.BeforeLoadDFMValues;\r\n WebLabel51.BeforeLoadDFMValues;\r\n B11.BeforeLoadDFMValues;\r\n WebPanel105.BeforeLoadDFMValues;\r\n WebLabel52.BeforeLoadDFMValues;\r\n B6.BeforeLoadDFMValues;\r\n WebPanel80.BeforeLoadDFMValues;\r\n WebLabel41.BeforeLoadDFMValues;\r\n B7.BeforeLoadDFMValues;\r\n WebPanel82.BeforeLoadDFMValues;\r\n WebLabel42.BeforeLoadDFMValues;\r\n B8.BeforeLoadDFMValues;\r\n WebPanel86.BeforeLoadDFMValues;\r\n WebLabel43.BeforeLoadDFMValues;\r\n B9.BeforeLoadDFMValues;\r\n WebPanel88.BeforeLoadDFMValues;\r\n WebLabel44.BeforeLoadDFMValues;\r\n B10.BeforeLoadDFMValues;\r\n WebPanel91.BeforeLoadDFMValues;\r\n WebLabel45.BeforeLoadDFMValues;\r\n B5.BeforeLoadDFMValues;\r\n WebPanel74.BeforeLoadDFMValues;\r\n WebLabel38.BeforeLoadDFMValues;\r\n B4.BeforeLoadDFMValues;\r\n WebPanel78.BeforeLoadDFMValues;\r\n WebLabel40.BeforeLoadDFMValues;\r\n B3.BeforeLoadDFMValues;\r\n WebPanel72.BeforeLoadDFMValues;\r\n WebLabel37.BeforeLoadDFMValues;\r\n B2.BeforeLoadDFMValues;\r\n WebPanel76.BeforeLoadDFMValues;\r\n WebLabel39.BeforeLoadDFMValues;\r\n B1.BeforeLoadDFMValues;\r\n WebPanel70.BeforeLoadDFMValues;\r\n WebLabel36.BeforeLoadDFMValues;\r\n B30.BeforeLoadDFMValues;\r\n WebPanel21.BeforeLoadDFMValues;\r\n WebLabel12.BeforeLoadDFMValues;\r\n B100.BeforeLoadDFMValues;\r\n WebPanel3.BeforeLoadDFMValues;\r\n WebLabel14.BeforeLoadDFMValues;\r\n G9.BeforeLoadDFMValues;\r\n B102.BeforeLoadDFMValues;\r\n WebPanel24.BeforeLoadDFMValues;\r\n WebLabel21.BeforeLoadDFMValues;\r\n G2.BeforeLoadDFMValues;\r\n B105.BeforeLoadDFMValues;\r\n WebPanel26.BeforeLoadDFMValues;\r\n WebLabel22.BeforeLoadDFMValues;\r\n G5.BeforeLoadDFMValues;\r\n B104.BeforeLoadDFMValues;\r\n WebPanel18.BeforeLoadDFMValues;\r\n WebLabel19.BeforeLoadDFMValues;\r\n G4.BeforeLoadDFMValues;\r\n B103.BeforeLoadDFMValues;\r\n WebPanel7.BeforeLoadDFMValues;\r\n WebLabel17.BeforeLoadDFMValues;\r\n G3.BeforeLoadDFMValues;\r\n B106.BeforeLoadDFMValues;\r\n WebPanel20.BeforeLoadDFMValues;\r\n WebLabel20.BeforeLoadDFMValues;\r\n G6.BeforeLoadDFMValues;\r\n B107.BeforeLoadDFMValues;\r\n WebPanel27.BeforeLoadDFMValues;\r\n WebLabel23.BeforeLoadDFMValues;\r\n G7.BeforeLoadDFMValues;\r\n B108.BeforeLoadDFMValues;\r\n WebPanel29.BeforeLoadDFMValues;\r\n WebLabel24.BeforeLoadDFMValues;\r\n G8.BeforeLoadDFMValues;\r\n wmWaitMessage.BeforeLoadDFMValues;\r\n viewpdf.BeforeLoadDFMValues;\r\n B31.BeforeLoadDFMValues;\r\n WebPanel5.BeforeLoadDFMValues;\r\n WebLabel16.BeforeLoadDFMValues;\r\n B32.BeforeLoadDFMValues;\r\n WebPanel16.BeforeLoadDFMValues;\r\n WebLabel25.BeforeLoadDFMValues;\r\n B33.BeforeLoadDFMValues;\r\n WebPanel28.BeforeLoadDFMValues;\r\n WebLabel33.BeforeLoadDFMValues;\r\n B34.BeforeLoadDFMValues;\r\n WebPanel33.BeforeLoadDFMValues;\r\n WebLabel34.BeforeLoadDFMValues;\r\n B35.BeforeLoadDFMValues;\r\n WebPanel36.BeforeLoadDFMValues;\r\n WebLabel35.BeforeLoadDFMValues;\r\n B36.BeforeLoadDFMValues;\r\n WebPanel38.BeforeLoadDFMValues;\r\n WebLabel56.BeforeLoadDFMValues;\r\n B37.BeforeLoadDFMValues;\r\n WebPanel40.BeforeLoadDFMValues;\r\n WebLabel57.BeforeLoadDFMValues;\r\n B38.BeforeLoadDFMValues;\r\n WebPanel42.BeforeLoadDFMValues;\r\n WebLabel58.BeforeLoadDFMValues;\r\n B39.BeforeLoadDFMValues;\r\n WebPanel44.BeforeLoadDFMValues;\r\n WebLabel59.BeforeLoadDFMValues;\r\n B40.BeforeLoadDFMValues;\r\n WebPanel46.BeforeLoadDFMValues;\r\n WebLabel60.BeforeLoadDFMValues;\r\n B41.BeforeLoadDFMValues;\r\n WebPanel48.BeforeLoadDFMValues;\r\n WebLabel61.BeforeLoadDFMValues;\r\n B42.BeforeLoadDFMValues;\r\n WebPanel50.BeforeLoadDFMValues;\r\n WebLabel62.BeforeLoadDFMValues;\r\n B43.BeforeLoadDFMValues;\r\n WebPanel52.BeforeLoadDFMValues;\r\n WebLabel63.BeforeLoadDFMValues;\r\n B44.BeforeLoadDFMValues;\r\n WebPanel54.BeforeLoadDFMValues;\r\n WebLabel64.BeforeLoadDFMValues;\r\n B45.BeforeLoadDFMValues;\r\n WebPanel56.BeforeLoadDFMValues;\r\n WebLabel65.BeforeLoadDFMValues;\r\n B46.BeforeLoadDFMValues;\r\n WebPanel58.BeforeLoadDFMValues;\r\n WebLabel66.BeforeLoadDFMValues;\r\n B47.BeforeLoadDFMValues;\r\n WebPanel60.BeforeLoadDFMValues;\r\n WebLabel67.BeforeLoadDFMValues;\r\n B48.BeforeLoadDFMValues;\r\n WebPanel62.BeforeLoadDFMValues;\r\n WebLabel68.BeforeLoadDFMValues;\r\n B49.BeforeLoadDFMValues;\r\n WebPanel64.BeforeLoadDFMValues;\r\n WebLabel69.BeforeLoadDFMValues;\r\n B50.BeforeLoadDFMValues;\r\n WebPanel66.BeforeLoadDFMValues;\r\n WebLabel70.BeforeLoadDFMValues;\r\n pnlImages.BeforeLoadDFMValues;\r\n WebDBImageControl1.BeforeLoadDFMValues;\r\n ImageGrid.BeforeLoadDFMValues;\r\n pmImages.BeforeLoadDFMValues;\r\n Delete1.BeforeLoadDFMValues;\r\n Print1.BeforeLoadDFMValues;\r\n tmGeneral.BeforeLoadDFMValues;\r\n try\r\n btnShowBottom.SetParentComponent(pnlFormButtons);\r\n btnShowBottom.Name := 'btnShowBottom';\r\n btnShowBottom.Left := 172;\r\n btnShowBottom.Top := 0;\r\n btnShowBottom.Width := 40;\r\n btnShowBottom.Height := 41;\r\n btnShowBottom.Cursor := crHandPoint;\r\n btnShowBottom.Hint := 'Quality Indicators';\r\n btnShowBottom.Align := alRight;\r\n btnShowBottom.Caption := '';\r\n btnShowBottom.Color := clNone;\r\n btnShowBottom.ElementClassName := 'btn_icon';\r\n btnShowBottom.Font.Charset := DEFAULT_CHARSET;\r\n btnShowBottom.Font.Color := clGray;\r\n btnShowBottom.Font.Height := -16;\r\n btnShowBottom.Font.Name := 'Tahoma';\r\n btnShowBottom.Font.Style := [];\r\n btnShowBottom.HeightPercent := 100.000000000000000000;\r\n btnShowBottom.MaterialGlyph := 'apps';\r\n btnShowBottom.MaterialGlyphSize := 1;\r\n btnShowBottom.ParentFont := False;\r\n btnShowBottom.ShowHint := True;\r\n btnShowBottom.TabOrder := 10;\r\n btnShowBottom.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnShowBottom, Self, 'OnClick', 'btnShowBottomClick');\r\n btnRefresh_RPT.Left := 97;\r\n btnClose_RPT.Left := 137;\r\n btnSubmit_CERNER.SetParentComponent(pnlReportButtons);\r\n btnSubmit_CERNER.Name := 'btnSubmit_CERNER';\r\n btnSubmit_CERNER.Left := 177;\r\n btnSubmit_CERNER.Top := 0;\r\n btnSubmit_CERNER.Width := 40;\r\n btnSubmit_CERNER.Height := 41;\r\n btnSubmit_CERNER.Cursor := crHandPoint;\r\n btnSubmit_CERNER.Hint := 'Upload Report to CERNER';\r\n btnSubmit_CERNER.Align := alRight;\r\n btnSubmit_CERNER.Caption := '';\r\n btnSubmit_CERNER.Color := clNone;\r\n btnSubmit_CERNER.ElementClassName := 'btn_icon';\r\n btnSubmit_CERNER.Font.Charset := DEFAULT_CHARSET;\r\n btnSubmit_CERNER.Font.Color := clGray;\r\n btnSubmit_CERNER.Font.Height := -13;\r\n btnSubmit_CERNER.Font.Name := 'Tahoma';\r\n btnSubmit_CERNER.Font.Style := [];\r\n btnSubmit_CERNER.HeightPercent := 100.000000000000000000;\r\n btnSubmit_CERNER.ParentFont := False;\r\n btnSubmit_CERNER.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnSubmit_CERNER, Self, 'OnClick', 'btnSubmit_CERNERClick');\r\n SetEvent(btnSubmit_CERNER, Self, 'OnMouseMove', 'btnCloseMouseMove');\r\n sbSideData.Top := 25;\r\n sbSideData.Height := 873;\r\n WebLabel26.Height := 28;\r\n WebLabel27.Height := 28;\r\n WebLabel28.Height := 28;\r\n WebLabel29.Height := 28;\r\n WebLabel30.Height := 28;\r\n sb1.Top := 3;\r\n WebLabel31.Height := 28;\r\n WebLabel32.Height := 28;\r\n WebLabel1.Height := 28;\r\n SG1.Columns.Clear;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n with SG1.Columns.Add do\r\n begin\r\n end;\r\n WebLabel73.Height := 28;\r\n SG2.Columns.Clear;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n with SG2.Columns.Add do\r\n begin\r\n end;\r\n WebLabel74.Height := 28;\r\n SG3.Columns.Clear;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n with SG3.Columns.Add do\r\n begin\r\n end;\r\n pnlSideDataButtons.SetParentComponent(pnlSideData);\r\n pnlSideDataButtons.Name := 'pnlSideDataButtons';\r\n pnlSideDataButtons.Left := 0;\r\n pnlSideDataButtons.Top := 0;\r\n pnlSideDataButtons.Width := 316;\r\n pnlSideDataButtons.Height := 25;\r\n pnlSideDataButtons.ElementClassName := 'block_title';\r\n pnlSideDataButtons.Align := alTop;\r\n pnlSideDataButtons.Alignment := taLeftJustify;\r\n pnlSideDataButtons.BorderColor := clWhite;\r\n pnlSideDataButtons.BorderStyle := bsNone;\r\n pnlSideDataButtons.ChildOrder := 1;\r\n pnlSideDataButtons.Color := clWhite;\r\n pnlSideDataButtons.TabOrder := 1;\r\n lbDictatedReport.SetParentComponent(pnlSideDataButtons);\r\n lbDictatedReport.Name := 'lbDictatedReport';\r\n lbDictatedReport.Left := 0;\r\n lbDictatedReport.Top := 0;\r\n lbDictatedReport.Width := 226;\r\n lbDictatedReport.Height := 25;\r\n lbDictatedReport.Align := alClient;\r\n lbDictatedReport.Caption := 'Dictated Report';\r\n lbDictatedReport.ElementClassName := 'block_title';\r\n lbDictatedReport.HeightPercent := 100.000000000000000000;\r\n lbDictatedReport.WidthPercent := 100.000000000000000000;\r\n btnParseReport.SetParentComponent(pnlSideDataButtons);\r\n btnParseReport.Name := 'btnParseReport';\r\n btnParseReport.Left := 226;\r\n btnParseReport.Top := 0;\r\n btnParseReport.Width := 90;\r\n btnParseReport.Height := 25;\r\n btnParseReport.Cursor := crHandPoint;\r\n btnParseReport.Hint := 'Analyse';\r\n btnParseReport.Align := alRight;\r\n btnParseReport.Caption := '';\r\n btnParseReport.ChildOrder := 87;\r\n btnParseReport.Color := clNone;\r\n btnParseReport.ElementClassName := 'btn_icon';\r\n btnParseReport.Font.Charset := DEFAULT_CHARSET;\r\n btnParseReport.Font.Color := clGray;\r\n btnParseReport.Font.Height := -13;\r\n btnParseReport.Font.Name := 'Tahoma';\r\n btnParseReport.Font.Style := [];\r\n btnParseReport.HeightPercent := 100.000000000000000000;\r\n btnParseReport.MaterialGlyph := 'check';\r\n btnParseReport.MaterialGlyphSize := 1;\r\n btnParseReport.ParentFont := False;\r\n btnParseReport.TabOrder := 6;\r\n btnParseReport.WidthPercent := 9.000000000000000000;\r\n SetEvent(btnParseReport, Self, 'OnClick', 'btnParseReportClick');\r\n pnlSUBFORM_DIV.Width := 907;\r\n pnlDataBlocks.Width := 907;\r\n SubForm_DIV.Width := 907;\r\n WebLabel8.Height := 28;\r\n WebLabel18.Height := 28;\r\n G1.Columns.Clear;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n with G1.Columns.Add do\r\n begin\r\n end;\r\n WebLabel7.Height := 28;\r\n WebLabel47.Height := 28;\r\n WebLabel3.Height := 28;\r\n WebLabel4.Height := 28;\r\n WebLabel5.Height := 28;\r\n WebLabel55.Height := 28;\r\n WebLabel46.Height := 28;\r\n WebLabel6.Height := 28;\r\n WebLabel11.Height := 28;\r\n WebLabel10.Height := 28;\r\n WebLabel9.Height := 28;\r\n WebLabel53.Height := 28;\r\n WebLabel54.Height := 28;\r\n WebLabel48.Height := 28;\r\n WebLabel49.Height := 28;\r\n WebLabel50.Height := 28;\r\n WebLabel51.Height := 28;\r\n WebLabel52.Height := 28;\r\n WebLabel41.Height := 28;\r\n WebLabel42.Height := 28;\r\n WebLabel43.Height := 28;\r\n WebLabel44.Height := 28;\r\n WebLabel45.Height := 28;\r\n WebLabel38.Height := 28;\r\n WebLabel40.Height := 28;\r\n WebLabel37.Height := 28;\r\n WebLabel39.Height := 28;\r\n WebLabel36.Height := 24;\r\n WebLabel12.Height := 28;\r\n WebLabel14.Height := 28;\r\n G9.Columns.Clear;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n with G9.Columns.Add do\r\n begin\r\n end;\r\n WebLabel21.Height := 28;\r\n G2.Columns.Clear;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n with G2.Columns.Add do\r\n begin\r\n end;\r\n WebLabel22.Height := 28;\r\n G5.Columns.Clear;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n with G5.Columns.Add do\r\n begin\r\n end;\r\n WebLabel19.Height := 28;\r\n G4.Columns.Clear;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n with G4.Columns.Add do\r\n begin\r\n end;\r\n WebLabel17.Height := 28;\r\n G3.Columns.Clear;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n with G3.Columns.Add do\r\n begin\r\n end;\r\n WebLabel20.Height := 28;\r\n G6.Columns.Clear;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n with G6.Columns.Add do\r\n begin\r\n end;\r\n WebLabel23.Height := 28;\r\n G7.Columns.Clear;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n with G7.Columns.Add do\r\n begin\r\n end;\r\n WebLabel24.Height := 28;\r\n G8.Columns.Clear;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n with G8.Columns.Add do\r\n begin\r\n end;\r\n wmWaitMessage.Picture.LoadFromFile('UDF_ProcReport_Q.SubForm_DIV.wmWaitMessage.Picture.gif');\r\n viewpdf.Left := 689;\r\n viewpdf.Top := 415;\r\n WebLabel16.Height := 28;\r\n WebLabel25.Height := 28;\r\n WebLabel33.Height := 28;\r\n WebLabel34.Height := 28;\r\n WebLabel35.Height := 28;\r\n WebLabel56.Height := 28;\r\n WebLabel57.Height := 28;\r\n WebLabel58.Height := 28;\r\n WebLabel59.Height := 28;\r\n WebLabel60.Height := 28;\r\n WebLabel61.Height := 28;\r\n WebLabel62.Height := 28;\r\n WebLabel63.Height := 28;\r\n WebLabel64.Height := 28;\r\n WebLabel65.Height := 28;\r\n WebLabel66.Height := 28;\r\n WebLabel67.Height := 28;\r\n WebLabel68.Height := 28;\r\n WebLabel69.Height := 28;\r\n WebLabel70.Height := 28;\r\n pnlImages.SetParentComponent(Self);\r\n pnlImages.Name := 'pnlImages';\r\n pnlImages.Left := 910;\r\n pnlImages.Top := 35;\r\n pnlImages.Width := 213;\r\n pnlImages.Height := 898;\r\n pnlImages.Align := alRight;\r\n pnlImages.BorderColor := clWhite;\r\n pnlImages.BorderStyle := bsNone;\r\n pnlImages.ChildOrder := 9;\r\n pnlImages.Color := clWhite;\r\n pnlImages.TabOrder := 5;\r\n WebDBImageControl1.SetParentComponent(pnlImages);\r\n WebDBImageControl1.Name := 'WebDBImageControl1';\r\n WebDBImageControl1.Left := 0;\r\n WebDBImageControl1.Top := 0;\r\n WebDBImageControl1.Width := 213;\r\n WebDBImageControl1.Height := 183;\r\n WebDBImageControl1.HeightPercent := 100.000000000000000000;\r\n WebDBImageControl1.WidthPercent := 100.000000000000000000;\r\n WebDBImageControl1.Align := alTop;\r\n WebDBImageControl1.ChildOrder := 1;\r\n WebDBImageControl1.DataField := 'IMAGEBASE64_DATA';\r\n WebDBImageControl1.DataSource := DM.dsImageDiagram;\r\n ImageGrid.SetParentComponent(pnlImages);\r\n ImageGrid.Name := 'ImageGrid';\r\n ImageGrid.AlignWithMargins := True;\r\n ImageGrid.Left := 3;\r\n ImageGrid.Top := 186;\r\n ImageGrid.Width := 207;\r\n ImageGrid.Height := 709;\r\n ImageGrid.Align := alClient;\r\n ImageGrid.ChildOrder := 23;\r\n ImageGrid.ItemIndex := 0;\r\n ImageGrid.Options.ItemGap := 20;\r\n ImageGrid.Options.ItemHeight := 190;\r\n ImageGrid.Options.ItemSelectedBorderColor := clRed;\r\n ImageGrid.Options.ItemSelectedTextColor := clRed;\r\n ImageGrid.Options.ItemTemplate := '
(%GILABELTEXT%) (%LABEL%)
\"Image\"
(%COMMENTS%)
';\r\n ImageGrid.Options.ItemWidthMin := 140;\r\n SetEvent(ImageGrid, Self, 'OnMouseMove', 'ImageGridMouseMove');\r\n SetEvent(ImageGrid, Self, 'OnItemCreated', 'ImageGridItemCreated');\r\n SetEvent(ImageGrid, Self, 'OnItemGetFieldValue', 'ImageGridItemGetFieldValue');\r\n SetEvent(ImageGrid, Self, 'OnItemClick', 'ImageGridItemClick');\r\n ImageGrid.DataSource := DM.dsImages;\r\n pmImages.SetParentComponent(Self);\r\n pmImages.Name := 'pmImages';\r\n SetEvent(pmImages, Self, 'OnPopup', 'pmImagesPopup');\r\n pmImages.Appearance.HamburgerMenu.Caption := 'Menu';\r\n pmImages.Appearance.HoverColor := 14671839;\r\n pmImages.Appearance.SubmenuIndicator := '►';\r\n pmImages.ElementItemClassName := 'drop-label';\r\n pmImages.Font.Charset := DEFAULT_CHARSET;\r\n pmImages.Font.Color := clWindowText;\r\n pmImages.Font.Height := -11;\r\n pmImages.Font.Name := 'Tahoma';\r\n pmImages.Font.Style := [];\r\n pmImages.Left := 776;\r\n pmImages.Top := 409;\r\n Delete1.SetParentComponent(pmImages);\r\n Delete1.Name := 'Delete1';\r\n Delete1.Caption := 'Delete';\r\n SetEvent(Delete1, Self, 'OnClick', 'Delete1Click');\r\n Print1.SetParentComponent(pmImages);\r\n Print1.Name := 'Print1';\r\n Print1.Caption := 'Print';\r\n SetEvent(Print1, Self, 'OnClick', 'Print1Click');\r\n tmGeneral.SetParentComponent(Self);\r\n tmGeneral.Name := 'tmGeneral';\r\n tmGeneral.Enabled := False;\r\n SetEvent(tmGeneral, Self, 'OnTimer', 'tmGeneralTimer');\r\n tmGeneral.Left := 11;\r\n tmGeneral.Top := 43;\r\n finally\r\n pnlBottom.AfterLoadDFMValues;\r\n pnlFormButtons.AfterLoadDFMValues;\r\n btnShowBottom.AfterLoadDFMValues;\r\n pnlReportButtons.AfterLoadDFMValues;\r\n btnRefresh_RPT.AfterLoadDFMValues;\r\n btnClose_RPT.AfterLoadDFMValues;\r\n btnSubmit_CERNER.AfterLoadDFMValues;\r\n pnlSideData.AfterLoadDFMValues;\r\n sbSideData.AfterLoadDFMValues;\r\n sb6.AfterLoadDFMValues;\r\n WebPanel9.AfterLoadDFMValues;\r\n WebLabel26.AfterLoadDFMValues;\r\n sb5.AfterLoadDFMValues;\r\n WebPanel12.AfterLoadDFMValues;\r\n WebLabel27.AfterLoadDFMValues;\r\n sb4.AfterLoadDFMValues;\r\n WebPanel22.AfterLoadDFMValues;\r\n WebLabel28.AfterLoadDFMValues;\r\n sb3.AfterLoadDFMValues;\r\n WebPanel25.AfterLoadDFMValues;\r\n WebLabel29.AfterLoadDFMValues;\r\n sb2.AfterLoadDFMValues;\r\n WebPanel30.AfterLoadDFMValues;\r\n WebLabel30.AfterLoadDFMValues;\r\n sb1.AfterLoadDFMValues;\r\n WebPanel32.AfterLoadDFMValues;\r\n WebLabel31.AfterLoadDFMValues;\r\n sb7.AfterLoadDFMValues;\r\n WebPanel34.AfterLoadDFMValues;\r\n WebLabel32.AfterLoadDFMValues;\r\n sb101.AfterLoadDFMValues;\r\n WebPanel10.AfterLoadDFMValues;\r\n WebLabel1.AfterLoadDFMValues;\r\n SG1.AfterLoadDFMValues;\r\n sb102.AfterLoadDFMValues;\r\n WebPanel23.AfterLoadDFMValues;\r\n WebLabel73.AfterLoadDFMValues;\r\n SG2.AfterLoadDFMValues;\r\n sb103.AfterLoadDFMValues;\r\n WebPanel35.AfterLoadDFMValues;\r\n WebLabel74.AfterLoadDFMValues;\r\n SG3.AfterLoadDFMValues;\r\n pnlSideDataButtons.AfterLoadDFMValues;\r\n lbDictatedReport.AfterLoadDFMValues;\r\n btnParseReport.AfterLoadDFMValues;\r\n pnlSUBFORM_DIV.AfterLoadDFMValues;\r\n pnlDataBlocks.AfterLoadDFMValues;\r\n SubForm_DIV.AfterLoadDFMValues;\r\n b26.AfterLoadDFMValues;\r\n WebPanel13.AfterLoadDFMValues;\r\n WebLabel8.AfterLoadDFMValues;\r\n B101.AfterLoadDFMValues;\r\n WebPanel14.AfterLoadDFMValues;\r\n WebLabel18.AfterLoadDFMValues;\r\n G1.AfterLoadDFMValues;\r\n B25.AfterLoadDFMValues;\r\n WebPanel11.AfterLoadDFMValues;\r\n WebLabel7.AfterLoadDFMValues;\r\n B20.AfterLoadDFMValues;\r\n WebPanel95.AfterLoadDFMValues;\r\n WebLabel47.AfterLoadDFMValues;\r\n B21.AfterLoadDFMValues;\r\n WebPanel2.AfterLoadDFMValues;\r\n WebLabel3.AfterLoadDFMValues;\r\n B22.AfterLoadDFMValues;\r\n WebPanel4.AfterLoadDFMValues;\r\n WebLabel4.AfterLoadDFMValues;\r\n b23.AfterLoadDFMValues;\r\n WebPanel6.AfterLoadDFMValues;\r\n WebLabel5.AfterLoadDFMValues;\r\n B18.AfterLoadDFMValues;\r\n WebPanel111.AfterLoadDFMValues;\r\n WebLabel55.AfterLoadDFMValues;\r\n B19.AfterLoadDFMValues;\r\n WebPanel93.AfterLoadDFMValues;\r\n WebLabel46.AfterLoadDFMValues;\r\n B24.AfterLoadDFMValues;\r\n WebPanel8.AfterLoadDFMValues;\r\n WebLabel6.AfterLoadDFMValues;\r\n B29.AfterLoadDFMValues;\r\n WebPanel19.AfterLoadDFMValues;\r\n WebLabel11.AfterLoadDFMValues;\r\n B28.AfterLoadDFMValues;\r\n WebPanel17.AfterLoadDFMValues;\r\n WebLabel10.AfterLoadDFMValues;\r\n B27.AfterLoadDFMValues;\r\n WebPanel15.AfterLoadDFMValues;\r\n WebLabel9.AfterLoadDFMValues;\r\n B16.AfterLoadDFMValues;\r\n WebPanel107.AfterLoadDFMValues;\r\n WebLabel53.AfterLoadDFMValues;\r\n B17.AfterLoadDFMValues;\r\n WebPanel109.AfterLoadDFMValues;\r\n WebLabel54.AfterLoadDFMValues;\r\n B15.AfterLoadDFMValues;\r\n WebPanel97.AfterLoadDFMValues;\r\n WebLabel48.AfterLoadDFMValues;\r\n B14.AfterLoadDFMValues;\r\n WebPanel99.AfterLoadDFMValues;\r\n WebLabel49.AfterLoadDFMValues;\r\n B13.AfterLoadDFMValues;\r\n WebPanel101.AfterLoadDFMValues;\r\n WebLabel50.AfterLoadDFMValues;\r\n B12.AfterLoadDFMValues;\r\n WebPanel103.AfterLoadDFMValues;\r\n WebLabel51.AfterLoadDFMValues;\r\n B11.AfterLoadDFMValues;\r\n WebPanel105.AfterLoadDFMValues;\r\n WebLabel52.AfterLoadDFMValues;\r\n B6.AfterLoadDFMValues;\r\n WebPanel80.AfterLoadDFMValues;\r\n WebLabel41.AfterLoadDFMValues;\r\n B7.AfterLoadDFMValues;\r\n WebPanel82.AfterLoadDFMValues;\r\n WebLabel42.AfterLoadDFMValues;\r\n B8.AfterLoadDFMValues;\r\n WebPanel86.AfterLoadDFMValues;\r\n WebLabel43.AfterLoadDFMValues;\r\n B9.AfterLoadDFMValues;\r\n WebPanel88.AfterLoadDFMValues;\r\n WebLabel44.AfterLoadDFMValues;\r\n B10.AfterLoadDFMValues;\r\n WebPanel91.AfterLoadDFMValues;\r\n WebLabel45.AfterLoadDFMValues;\r\n B5.AfterLoadDFMValues;\r\n WebPanel74.AfterLoadDFMValues;\r\n WebLabel38.AfterLoadDFMValues;\r\n B4.AfterLoadDFMValues;\r\n WebPanel78.AfterLoadDFMValues;\r\n WebLabel40.AfterLoadDFMValues;\r\n B3.AfterLoadDFMValues;\r\n WebPanel72.AfterLoadDFMValues;\r\n WebLabel37.AfterLoadDFMValues;\r\n B2.AfterLoadDFMValues;\r\n WebPanel76.AfterLoadDFMValues;\r\n WebLabel39.AfterLoadDFMValues;\r\n B1.AfterLoadDFMValues;\r\n WebPanel70.AfterLoadDFMValues;\r\n WebLabel36.AfterLoadDFMValues;\r\n B30.AfterLoadDFMValues;\r\n WebPanel21.AfterLoadDFMValues;\r\n WebLabel12.AfterLoadDFMValues;\r\n B100.AfterLoadDFMValues;\r\n WebPanel3.AfterLoadDFMValues;\r\n WebLabel14.AfterLoadDFMValues;\r\n G9.AfterLoadDFMValues;\r\n B102.AfterLoadDFMValues;\r\n WebPanel24.AfterLoadDFMValues;\r\n WebLabel21.AfterLoadDFMValues;\r\n G2.AfterLoadDFMValues;\r\n B105.AfterLoadDFMValues;\r\n WebPanel26.AfterLoadDFMValues;\r\n WebLabel22.AfterLoadDFMValues;\r\n G5.AfterLoadDFMValues;\r\n B104.AfterLoadDFMValues;\r\n WebPanel18.AfterLoadDFMValues;\r\n WebLabel19.AfterLoadDFMValues;\r\n G4.AfterLoadDFMValues;\r\n B103.AfterLoadDFMValues;\r\n WebPanel7.AfterLoadDFMValues;\r\n WebLabel17.AfterLoadDFMValues;\r\n G3.AfterLoadDFMValues;\r\n B106.AfterLoadDFMValues;\r\n WebPanel20.AfterLoadDFMValues;\r\n WebLabel20.AfterLoadDFMValues;\r\n G6.AfterLoadDFMValues;\r\n B107.AfterLoadDFMValues;\r\n WebPanel27.AfterLoadDFMValues;\r\n WebLabel23.AfterLoadDFMValues;\r\n G7.AfterLoadDFMValues;\r\n B108.AfterLoadDFMValues;\r\n WebPanel29.AfterLoadDFMValues;\r\n WebLabel24.AfterLoadDFMValues;\r\n G8.AfterLoadDFMValues;\r\n wmWaitMessage.AfterLoadDFMValues;\r\n viewpdf.AfterLoadDFMValues;\r\n B31.AfterLoadDFMValues;\r\n WebPanel5.AfterLoadDFMValues;\r\n WebLabel16.AfterLoadDFMValues;\r\n B32.AfterLoadDFMValues;\r\n WebPanel16.AfterLoadDFMValues;\r\n WebLabel25.AfterLoadDFMValues;\r\n B33.AfterLoadDFMValues;\r\n WebPanel28.AfterLoadDFMValues;\r\n WebLabel33.AfterLoadDFMValues;\r\n B34.AfterLoadDFMValues;\r\n WebPanel33.AfterLoadDFMValues;\r\n WebLabel34.AfterLoadDFMValues;\r\n B35.AfterLoadDFMValues;\r\n WebPanel36.AfterLoadDFMValues;\r\n WebLabel35.AfterLoadDFMValues;\r\n B36.AfterLoadDFMValues;\r\n WebPanel38.AfterLoadDFMValues;\r\n WebLabel56.AfterLoadDFMValues;\r\n B37.AfterLoadDFMValues;\r\n WebPanel40.AfterLoadDFMValues;\r\n WebLabel57.AfterLoadDFMValues;\r\n B38.AfterLoadDFMValues;\r\n WebPanel42.AfterLoadDFMValues;\r\n WebLabel58.AfterLoadDFMValues;\r\n B39.AfterLoadDFMValues;\r\n WebPanel44.AfterLoadDFMValues;\r\n WebLabel59.AfterLoadDFMValues;\r\n B40.AfterLoadDFMValues;\r\n WebPanel46.AfterLoadDFMValues;\r\n WebLabel60.AfterLoadDFMValues;\r\n B41.AfterLoadDFMValues;\r\n WebPanel48.AfterLoadDFMValues;\r\n WebLabel61.AfterLoadDFMValues;\r\n B42.AfterLoadDFMValues;\r\n WebPanel50.AfterLoadDFMValues;\r\n WebLabel62.AfterLoadDFMValues;\r\n B43.AfterLoadDFMValues;\r\n WebPanel52.AfterLoadDFMValues;\r\n WebLabel63.AfterLoadDFMValues;\r\n B44.AfterLoadDFMValues;\r\n WebPanel54.AfterLoadDFMValues;\r\n WebLabel64.AfterLoadDFMValues;\r\n B45.AfterLoadDFMValues;\r\n WebPanel56.AfterLoadDFMValues;\r\n WebLabel65.AfterLoadDFMValues;\r\n B46.AfterLoadDFMValues;\r\n WebPanel58.AfterLoadDFMValues;\r\n WebLabel66.AfterLoadDFMValues;\r\n B47.AfterLoadDFMValues;\r\n WebPanel60.AfterLoadDFMValues;\r\n WebLabel67.AfterLoadDFMValues;\r\n B48.AfterLoadDFMValues;\r\n WebPanel62.AfterLoadDFMValues;\r\n WebLabel68.AfterLoadDFMValues;\r\n B49.AfterLoadDFMValues;\r\n WebPanel64.AfterLoadDFMValues;\r\n WebLabel69.AfterLoadDFMValues;\r\n B50.AfterLoadDFMValues;\r\n WebPanel66.AfterLoadDFMValues;\r\n WebLabel70.AfterLoadDFMValues;\r\n pnlImages.AfterLoadDFMValues;\r\n WebDBImageControl1.AfterLoadDFMValues;\r\n ImageGrid.AfterLoadDFMValues;\r\n pmImages.AfterLoadDFMValues;\r\n Delete1.AfterLoadDFMValues;\r\n Print1.AfterLoadDFMValues;\r\n tmGeneral.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit UDF_CernerPatients;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,\r\n Vcl.Controls, Vcl.Forms, Vcl.Dialogs, ListForm_Base, VCL.TMSFNCTypes,\r\n VCL.TMSFNCUtils, VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes, WEBLib.Grids,\r\n WEBLib.ExtCtrls, Vcl.Imaging.GIFImg, WEBLib.Dialogs, WEBLib.Controls,\r\n WEBLib.WebCtrls, WEBLib.Calendar, Vcl.Grids, WEBLib.DBCtrls, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, VCL.TMSFNCCustomControl, VCL.TMSFNCSwitch, WEBLib.Buttons,\r\n XData.Web.Client;\r\n\r\ntype\r\n TfrmUDF_CernerPatients = class(TfrmListForm_Base)\r\n btnAddPatientFromCerner: TBitBtn;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure grdDynamicGridClick(Sender: TObject);\r\n procedure btnCustom1MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure btnAddPatientFromCernerClick(Sender: TObject);\r\n procedure M1Change(Sender: TObject);\r\n procedure btnGridRefreshClick(Sender: TObject);\r\n private\r\n { Private declarations }\r\n public\r\n { Public declarations }\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmUDF_CernerPatients: TfrmUDF_CernerPatients;\r\n\r\nimplementation\r\n\r\n{$R *.dfm}\r\n\r\nuses Common, DataModule, Main;\r\n\r\nprocedure TfrmUDF_CernerPatients.btnAddPatientFromCernerClick(Sender: TObject);\r\nvar sql_p: string;\r\nbegin\r\n inherited;\r\n showmessage(EGV_FACILITYDBNAME);\r\nif pos('QLINICAL', UPPERCASE(EGV_FACILITYDBNAME)) = 0\r\nthen sql_p := ' if not exists (select * from patients where p_pid = ' +\r\n quotedstr(grdDynamicGrid.DataSource.DataSet.FieldByName('C1').AsString) + ') ' +\r\n ' insert into patients(P_PID, FIRSTNAME, LASTNAME, P_ENAME, P_SEX, P_DOB, ADDRESS1, CITY, STATE, ZIP, PHONE, EMAIL) ' +\r\n ' values( '\r\nelse sql_p := ' if not exists (select * from patients where p_pid = ' +\r\n quotedstr(grdDynamicGrid.DataSource.DataSet.FieldByName('C1').AsString) +\r\n ' and facilityid = ' + EGV_FACILITYID + ') ' +\r\n ' insert into patients(FACILITYID, P_PID, FIRSTNAME, LASTNAME, P_ENAME, P_SEX, P_DOB, ADDRESS1, CITY, STATE, ZIP, PHONE, EMAIL) ' +\r\n ' values( ' + EGV_FACILITYID + ', ';\r\n\r\nsql_p := sql_p +\r\n\r\n quotedstr(grdDynamicGrid.DataSource.DataSet.FieldByName('C1').AsString) + ', ' +\r\n quotedstr(grdDynamicGrid.DataSource.DataSet.FieldByName('C2').AsString) + ', ' +\r\n quotedstr(grdDynamicGrid.DataSource.DataSet.FieldByName('C3').AsString) + ', ' +\r\n quotedstr(grdDynamicGrid.DataSource.DataSet.FieldByName('C4').AsString) + ', ' +\r\n\r\n quotedstr(uppercase(copy(grdDynamicGrid.DataSource.DataSet.FieldByName('C6').AsString,1,1))) + ', ' +\r\n\r\n quotedstr( formatdatetime('YYYY.MM.DD',\r\n strtodate(grdDynamicGrid.DataSource.DataSet.FieldByName('C7').AsString))) + ', ' +\r\n\r\n quotedstr(grdDynamicGrid.DataSource.DataSet.FieldByName('C8').AsString) + ', ' +\r\n quotedstr(grdDynamicGrid.DataSource.DataSet.FieldByName('C9').AsString) + ', ' +\r\n quotedstr(grdDynamicGrid.DataSource.DataSet.FieldByName('C10').AsString) + ', ' +\r\n quotedstr(grdDynamicGrid.DataSource.DataSet.FieldByName('C11').AsString) + ', ' +\r\n quotedstr(grdDynamicGrid.DataSource.DataSet.FieldByName('C12').AsString) + ', ' +\r\n quotedstr(grdDynamicGrid.DataSource.DataSet.FieldByName('C13').AsString) + ') ';\r\n\r\n\r\n // showmessage(sql_p);\r\nif dm.XDataWebConnection2.Connected then dm.XDataWebClient2.RawInvoke('IReportService.ExecQuery',[sql_p, egv_facilityid, '0'], nil);\r\nbtnCustom1Click(btnCustom1); // open medgpt form\r\nend;\r\n\r\nprocedure TfrmUDF_CernerPatients.btnCustom1MouseMove(Sender: TObject;\r\n Shift: TShiftState; X, Y: Integer);\r\nbegin\r\nif not grdDynamicGrid.DataSource.dataset.active then exit;\r\n\r\n inherited;\r\n\r\nELV_PATIENTCERNERID := grdDynamicGrid.DataSource.DataSet.FieldByName('C1').AsString;\r\nELV_CERNERPATIENT_NAME := grdDynamicGrid.DataSource.DataSet.FieldByName('C2').AsString + ' ' +\r\n grdDynamicGrid.DataSource.DataSet.FieldByName('C3').AsString;\r\n\r\nEGV_CURRENT_MRN := grdDynamicGrid.DataSource.DataSet.FieldByName('C1').AsString;\r\nEGV_CURRENT_PATIENTNAME := grdDynamicGrid.DataSource.DataSet.FieldByName('C2').AsString + ' ' +\r\n grdDynamicGrid.DataSource.DataSet.FieldByName('C3').AsString;\r\nend;\r\n\r\nprocedure TfrmUDF_CernerPatients.btnGridRefreshClick(Sender: TObject);\r\nbegin\r\n inherited;\r\nbtnCernerSearch.Visible := false;\r\nend;\r\n\r\nprocedure TfrmUDF_CernerPatients.grdDynamicGridClick(Sender: TObject);\r\nbegin\r\n inherited;\r\n\r\nELV_PATIENTCERNERID := grdDynamicGrid.DataSource.DataSet.FieldByName('C1').AsString;\r\nELV_CERNERPATIENT_NAME := grdDynamicGrid.DataSource.DataSet.FieldByName('C2').AsString + ' ' +\r\n grdDynamicGrid.DataSource.DataSet.FieldByName('C3').AsString;\r\n\r\nEGV_CURRENT_MRN := grdDynamicGrid.DataSource.DataSet.FieldByName('C1').AsString;\r\nEGV_CURRENT_PATIENTNAME := grdDynamicGrid.DataSource.DataSet.FieldByName('C2').AsString + ' ' +\r\n grdDynamicGrid.DataSource.DataSet.FieldByName('C3').AsString;\r\n//showmessage('1: ' + ELV_PATIENTCERNERID);\r\nend;\r\n\r\nprocedure TfrmUDF_CernerPatients.M1Change(Sender: TObject);\r\nbegin\r\n// inherited;\r\n(sender as Tmemo).Text := stringreplace((sender as Tmemo).Text, chr(10), '', [rfReplaceAll]);\r\n\r\nend;\r\n\r\nprocedure TfrmUDF_CernerPatients.WebFormShow(Sender: TObject);\r\n\r\nbegin\r\n\r\n//if not frmmain.wmWaitMessage.showing then begin frmmain.wmWaitMessage.tag := 1; frmmain.wmWaitMessage.show; end;\r\n\r\n inherited;\r\n\r\n//asm document.title = \"Argus Med-GPT\"; end;\r\n\r\nmemo.Visible := false;\r\nend;\r\n\r\nprocedure TfrmUDF_CernerPatients.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n btnAddPatientFromCerner := TBitBtn.Create(Self);\r\n\r\n pnlBottom.BeforeLoadDFMValues;\r\n pnlFormButtons.BeforeLoadDFMValues;\r\n btnAddPatientFromCerner.BeforeLoadDFMValues;\r\n pnlMain.BeforeLoadDFMValues;\r\n pnlSearch.BeforeLoadDFMValues;\r\n sbSearch.BeforeLoadDFMValues;\r\n B6.BeforeLoadDFMValues;\r\n WebPanel2.BeforeLoadDFMValues;\r\n WebLabel1.BeforeLoadDFMValues;\r\n B5.BeforeLoadDFMValues;\r\n WebPanel4.BeforeLoadDFMValues;\r\n WebLabel2.BeforeLoadDFMValues;\r\n B4.BeforeLoadDFMValues;\r\n WebPanel6.BeforeLoadDFMValues;\r\n WebLabel3.BeforeLoadDFMValues;\r\n B3.BeforeLoadDFMValues;\r\n WebPanel8.BeforeLoadDFMValues;\r\n WebLabel4.BeforeLoadDFMValues;\r\n B2.BeforeLoadDFMValues;\r\n WebPanel10.BeforeLoadDFMValues;\r\n WebLabel5.BeforeLoadDFMValues;\r\n B1.BeforeLoadDFMValues;\r\n WebPanel12.BeforeLoadDFMValues;\r\n WebLabel6.BeforeLoadDFMValues;\r\n B7.BeforeLoadDFMValues;\r\n WebPanel70.BeforeLoadDFMValues;\r\n WebLabel36.BeforeLoadDFMValues;\r\n B8.BeforeLoadDFMValues;\r\n WebPanel3.BeforeLoadDFMValues;\r\n WebLabel12.BeforeLoadDFMValues;\r\n B9.BeforeLoadDFMValues;\r\n WebPanel7.BeforeLoadDFMValues;\r\n WebLabel13.BeforeLoadDFMValues;\r\n B10.BeforeLoadDFMValues;\r\n WebPanel11.BeforeLoadDFMValues;\r\n WebLabel14.BeforeLoadDFMValues;\r\n B11.BeforeLoadDFMValues;\r\n WebPanel9.BeforeLoadDFMValues;\r\n WebLabel7.BeforeLoadDFMValues;\r\n B12.BeforeLoadDFMValues;\r\n WebPanel14.BeforeLoadDFMValues;\r\n WebLabel9.BeforeLoadDFMValues;\r\n B13.BeforeLoadDFMValues;\r\n WebPanel16.BeforeLoadDFMValues;\r\n WebLabel15.BeforeLoadDFMValues;\r\n B14.BeforeLoadDFMValues;\r\n WebPanel18.BeforeLoadDFMValues;\r\n WebLabel16.BeforeLoadDFMValues;\r\n B15.BeforeLoadDFMValues;\r\n WebPanel20.BeforeLoadDFMValues;\r\n WebLabel17.BeforeLoadDFMValues;\r\n B16.BeforeLoadDFMValues;\r\n WebPanel22.BeforeLoadDFMValues;\r\n WebLabel18.BeforeLoadDFMValues;\r\n B17.BeforeLoadDFMValues;\r\n WebPanel24.BeforeLoadDFMValues;\r\n WebLabel19.BeforeLoadDFMValues;\r\n B18.BeforeLoadDFMValues;\r\n WebPanel26.BeforeLoadDFMValues;\r\n WebLabel20.BeforeLoadDFMValues;\r\n B19.BeforeLoadDFMValues;\r\n WebPanel28.BeforeLoadDFMValues;\r\n WebLabel21.BeforeLoadDFMValues;\r\n B20.BeforeLoadDFMValues;\r\n WebPanel30.BeforeLoadDFMValues;\r\n WebLabel22.BeforeLoadDFMValues;\r\n grdDynamicGrid.BeforeLoadDFMValues;\r\n mdDialogDelete.BeforeLoadDFMValues;\r\n pnlFormCaption.BeforeLoadDFMValues;\r\n wmWaitMessage.BeforeLoadDFMValues;\r\n try\r\n btnAddPatientFromCerner.SetParentComponent(pnlFormButtons);\r\n btnAddPatientFromCerner.Name := 'btnAddPatientFromCerner';\r\n btnAddPatientFromCerner.Left := 274;\r\n btnAddPatientFromCerner.Top := 0;\r\n btnAddPatientFromCerner.Width := 76;\r\n btnAddPatientFromCerner.Height := 41;\r\n btnAddPatientFromCerner.Cursor := crHandPoint;\r\n btnAddPatientFromCerner.Hint := 'Add to Local DB';\r\n btnAddPatientFromCerner.Align := alRight;\r\n btnAddPatientFromCerner.Caption := '';\r\n btnAddPatientFromCerner.Color := clNone;\r\n btnAddPatientFromCerner.ElementClassName := 'btn_icon';\r\n btnAddPatientFromCerner.Font.Charset := DEFAULT_CHARSET;\r\n btnAddPatientFromCerner.Font.Color := clGray;\r\n btnAddPatientFromCerner.Font.Height := -13;\r\n btnAddPatientFromCerner.Font.Name := 'Tahoma';\r\n btnAddPatientFromCerner.Font.Style := [];\r\n btnAddPatientFromCerner.HeightPercent := 100.000000000000000000;\r\n btnAddPatientFromCerner.MaterialGlyphSize := 1;\r\n btnAddPatientFromCerner.ParentFont := False;\r\n btnAddPatientFromCerner.ShowHint := True;\r\n btnAddPatientFromCerner.WidthStyle := ssAuto;\r\n btnAddPatientFromCerner.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnAddPatientFromCerner, Self, 'OnClick', 'btnAddPatientFromCernerClick');\r\n SetEvent(btnAddPatientFromCerner, Self, 'OnMouseMove', 'btnCustom1MouseMove');\r\n WebLabel1.Height := 28;\r\n WebLabel2.Height := 28;\r\n WebLabel3.Height := 28;\r\n WebLabel4.Height := 28;\r\n WebLabel5.Height := 28;\r\n WebLabel6.Height := 28;\r\n WebLabel36.Height := 28;\r\n WebLabel12.Height := 28;\r\n WebLabel13.Height := 28;\r\n WebLabel14.Height := 28;\r\n WebLabel7.Height := 28;\r\n WebLabel9.Height := 28;\r\n WebLabel15.Height := 28;\r\n WebLabel16.Height := 28;\r\n WebLabel17.Height := 28;\r\n WebLabel18.Height := 28;\r\n WebLabel19.Height := 28;\r\n WebLabel20.Height := 28;\r\n WebLabel21.Height := 28;\r\n WebLabel22.Height := 28;\r\n grdDynamicGrid.Columns.Clear;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n end;\r\n with grdDynamicGrid.Columns.Add do\r\n begin\r\n end;\r\n mdDialogDelete.CustomButtons.Clear;\r\n with mdDialogDelete.CustomButtons.Add do\r\n begin\r\n end;\r\n pnlFormCaption.Caption := '';\r\n wmWaitMessage.Picture.LoadFromFile('UDF_CernerPatients.wmWaitMessage.Picture.gif');\r\n finally\r\n pnlBottom.AfterLoadDFMValues;\r\n pnlFormButtons.AfterLoadDFMValues;\r\n btnAddPatientFromCerner.AfterLoadDFMValues;\r\n pnlMain.AfterLoadDFMValues;\r\n pnlSearch.AfterLoadDFMValues;\r\n sbSearch.AfterLoadDFMValues;\r\n B6.AfterLoadDFMValues;\r\n WebPanel2.AfterLoadDFMValues;\r\n WebLabel1.AfterLoadDFMValues;\r\n B5.AfterLoadDFMValues;\r\n WebPanel4.AfterLoadDFMValues;\r\n WebLabel2.AfterLoadDFMValues;\r\n B4.AfterLoadDFMValues;\r\n WebPanel6.AfterLoadDFMValues;\r\n WebLabel3.AfterLoadDFMValues;\r\n B3.AfterLoadDFMValues;\r\n WebPanel8.AfterLoadDFMValues;\r\n WebLabel4.AfterLoadDFMValues;\r\n B2.AfterLoadDFMValues;\r\n WebPanel10.AfterLoadDFMValues;\r\n WebLabel5.AfterLoadDFMValues;\r\n B1.AfterLoadDFMValues;\r\n WebPanel12.AfterLoadDFMValues;\r\n WebLabel6.AfterLoadDFMValues;\r\n B7.AfterLoadDFMValues;\r\n WebPanel70.AfterLoadDFMValues;\r\n WebLabel36.AfterLoadDFMValues;\r\n B8.AfterLoadDFMValues;\r\n WebPanel3.AfterLoadDFMValues;\r\n WebLabel12.AfterLoadDFMValues;\r\n B9.AfterLoadDFMValues;\r\n WebPanel7.AfterLoadDFMValues;\r\n WebLabel13.AfterLoadDFMValues;\r\n B10.AfterLoadDFMValues;\r\n WebPanel11.AfterLoadDFMValues;\r\n WebLabel14.AfterLoadDFMValues;\r\n B11.AfterLoadDFMValues;\r\n WebPanel9.AfterLoadDFMValues;\r\n WebLabel7.AfterLoadDFMValues;\r\n B12.AfterLoadDFMValues;\r\n WebPanel14.AfterLoadDFMValues;\r\n WebLabel9.AfterLoadDFMValues;\r\n B13.AfterLoadDFMValues;\r\n WebPanel16.AfterLoadDFMValues;\r\n WebLabel15.AfterLoadDFMValues;\r\n B14.AfterLoadDFMValues;\r\n WebPanel18.AfterLoadDFMValues;\r\n WebLabel16.AfterLoadDFMValues;\r\n B15.AfterLoadDFMValues;\r\n WebPanel20.AfterLoadDFMValues;\r\n WebLabel17.AfterLoadDFMValues;\r\n B16.AfterLoadDFMValues;\r\n WebPanel22.AfterLoadDFMValues;\r\n WebLabel18.AfterLoadDFMValues;\r\n B17.AfterLoadDFMValues;\r\n WebPanel24.AfterLoadDFMValues;\r\n WebLabel19.AfterLoadDFMValues;\r\n B18.AfterLoadDFMValues;\r\n WebPanel26.AfterLoadDFMValues;\r\n WebLabel20.AfterLoadDFMValues;\r\n B19.AfterLoadDFMValues;\r\n WebPanel28.AfterLoadDFMValues;\r\n WebLabel21.AfterLoadDFMValues;\r\n B20.AfterLoadDFMValues;\r\n WebPanel30.AfterLoadDFMValues;\r\n WebLabel22.AfterLoadDFMValues;\r\n grdDynamicGrid.AfterLoadDFMValues;\r\n mdDialogDelete.AfterLoadDFMValues;\r\n pnlFormCaption.AfterLoadDFMValues;\r\n wmWaitMessage.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit Settings;\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, Vcl.Controls,\r\n WEBLib.ExtCtrls, WEBLib.Buttons, WEBLib.ComCtrls, System.StrUtils,\r\n WEBLib.DBCtrls, XData.Web.JsonDataset, XData.Web.Dataset, XData.Web.Client,\r\n Data.DB;\r\n\r\ntype\r\n TfrmSettings = class(TForm)\r\n pnlFormButtons: TPanel;\r\n btnPost: TBitBtn;\r\n btnCancel: TBitBtn;\r\n pcSettings: TPageControl;\r\n psGeneral: TTabSheet;\r\n psmainmenu: TTabSheet;\r\n lblBlockDefaultWidth: TLabel;\r\n seFormColumns: TSpinEdit;\r\n cbShowHiddenBlocksInDesign: TCheckBox;\r\n cbFormColumnsAuto: TCheckBox;\r\n seBlockDefaultWidth: TSpinEdit;\r\n cbShowCommonPicklist: TCheckBox;\r\n pnlPKLMenuContainer: TPanel;\r\n WebMemo1: TMemo;\r\n cbMainMenuTitles: TCheckBox;\r\n WebLabel1: TLabel;\r\n WebLabel2: TLabel;\r\n edtDateFormat: TEdit;\r\n edtTimeFormat: TEdit;\r\n WebLabel3: TLabel;\r\n WebLabel4: TLabel;\r\n edtTimeAM: TEdit;\r\n edtTimePM: TEdit;\r\n WebLabel5: TLabel;\r\n lblColumns: TLabel;\r\n WebSplitter1: TSplitter;\r\n WebPanel1: TPanel;\r\n WebScrollBox1: TScrollBox;\r\n l1: TLabel;\r\n l2: TLabel;\r\n l3: TLabel;\r\n l5: TLabel;\r\n l6: TLabel;\r\n l7: TLabel;\r\n l8: TLabel;\r\n l9: TLabel;\r\n l4: TLabel;\r\n WebLabel6: TLabel;\r\n WebLabel7: TLabel;\r\n WebLabel8: TLabel;\r\n WebLabel9: TLabel;\r\n WebLabel10: TLabel;\r\n cb1: TComboBox;\r\n me1: TEdit;\r\n me2: TEdit;\r\n me3: TEdit;\r\n e5: TEdit;\r\n e6: TEdit;\r\n e7: TEdit;\r\n e8: TEdit;\r\n e9: TEdit;\r\n e11: TEdit;\r\n e12: TEdit;\r\n e13: TEdit;\r\n e15: TEdit;\r\n e16: TEdit;\r\n e17: TEdit;\r\n e19: TEdit;\r\n e20: TEdit;\r\n pnlListButtons: TPanel;\r\n WebBitBtn3: TBitBtn;\r\n WebBitBtn4: TBitBtn;\r\n WebLabel11: TLabel;\r\n WebLabel12: TLabel;\r\n l10: TLabel;\r\n e21: TEdit;\r\n e23: TEdit;\r\n WebLabel14: TLabel;\r\n l11: TLabel;\r\n e25: TEdit;\r\n e24: TEdit;\r\n WebLabel16: TLabel;\r\n l12: TLabel;\r\n e27: TEdit;\r\n e28: TEdit;\r\n e29: TEdit;\r\n WebLabel18: TLabel;\r\n l13: TLabel;\r\n e31: TEdit;\r\n e32: TEdit;\r\n psManagement: TTabSheet;\r\n btnLoadFromDB: TBitBtn;\r\n btnSaveToDB: TBitBtn;\r\n cbFromFacility: TComboBox;\r\n xdsfacilities: TXDataWebDataSet;\r\n xdsfacilitiesOriginalITEM: TStringField;\r\n WebMemo2: TMemo;\r\n btnCopy: TBitBtn;\r\n cbToFacility: TComboBox;\r\n lbQPKLSectionName: TLabel;\r\n WebLabel13: TLabel;\r\n WebMemo3: TMemo;\r\n btnRemoveFromDB: TBitBtn;\r\n e33: TEdit;\r\n e41: TEdit;\r\n e40: TEdit;\r\n e39: TEdit;\r\n e37: TEdit;\r\n e36: TEdit;\r\n e35: TEdit;\r\n me5: TEdit;\r\n pnlFormCaption: TPanel;\r\n WebLabel15: TLabel;\r\n seBlockDefaultHeight: TSpinEdit;\r\n cbAutosaveDesigndata: TCheckBox;\r\n cbNoHorizontalLineUp: TCheckBox;\r\n psQAI: TTabSheet;\r\n WebLabel25: TLabel;\r\n seScreenBigW: TSpinEdit;\r\n WebLabel26: TLabel;\r\n seScreenBigH: TSpinEdit;\r\n WebLabel27: TLabel;\r\n seScreenMediumW: TSpinEdit;\r\n WebLabel28: TLabel;\r\n seScreenMediumH: TSpinEdit;\r\n WebLabel29: TLabel;\r\n seScreenSmallW: TSpinEdit;\r\n WebLabel30: TLabel;\r\n seScreenSmallH: TSpinEdit;\r\n WebLabel31: TLabel;\r\n WebLabel32: TLabel;\r\n WebLabel33: TLabel;\r\n me4: TMemo;\r\n e10: TMemo;\r\n e14: TMemo;\r\n e22: TMemo;\r\n e18: TMemo;\r\n e26: TMemo;\r\n e34: TMemo;\r\n e30: TMemo;\r\n e38: TMemo;\r\n e42: TMemo;\r\n e6_2: TEdit;\r\n rgVideoSource: TRadioGroup;\r\n edtVideoSourceFile: TEdit;\r\n pcQAI: TPageControl;\r\n psDBQuery: TTabSheet;\r\n memQAI_Select: TMemo;\r\n psXMLResult: TTabSheet;\r\n memViewXML: TMemo;\r\n pcQAISheet3: TTabSheet;\r\n WebLabel17: TLabel;\r\n WebLabel19: TLabel;\r\n WebLabel20: TLabel;\r\n WebLabel21: TLabel;\r\n WebLabel22: TLabel;\r\n WebLabel23: TLabel;\r\n WebLabel24: TLabel;\r\n WebLabel34: TLabel;\r\n WebLabel35: TLabel;\r\n edWaitMessageIcon: TEdit;\r\n edServerMessageIcon: TEdit;\r\n edQuestionIcon: TEdit;\r\n edAnswerIcon: TEdit;\r\n clrWaitMessage: TColorPicker;\r\n clrServerMessage: TColorPicker;\r\n clrQuestion: TColorPicker;\r\n clrAnswer: TColorPicker;\r\n clrWaitMessageIcon: TColorPicker;\r\n clrServerMessageIcon: TColorPicker;\r\n clrQuestionIcon: TColorPicker;\r\n clrAnswericon: TColorPicker;\r\n edDefaultFilesToUpload: TEdit;\r\n edDEEAULTBIDDINGDOCSTOUPLOAD: TEdit;\r\n cbBiddingDocs: TCheckBox;\r\n cbEpic: TCheckBox;\r\n cbCerner: TCheckBox;\r\n cbVoiceControlActive: TCheckBox;\r\n cbVoiceCommands: TCheckBox;\r\n cbVoiceDictation: TCheckBox;\r\n WebLabel36: TLabel;\r\n WebMemo4: TMemo;\r\n procedure btnCancelClick(Sender: TObject);\r\n procedure btnPostClick(Sender: TObject);\r\n procedure WebFormShow(Sender: TObject);\r\n procedure cbFormColumnsAutoClick(Sender: TObject);\r\n procedure pcSettingsChange(Sender: TObject);\r\n procedure WebFormClose(Sender: TObject; var Action: TCloseAction);\r\n procedure btnLoadFromDBClick(Sender: TObject);\r\n procedure btnSaveToDBClick(Sender: TObject);\r\n procedure cb1Change(Sender: TObject);\r\n procedure WebBitBtn4Click(Sender: TObject);\r\n procedure WebBitBtn3Click(Sender: TObject);\r\n function BuildMenuLine: string;\r\n procedure xdsfacilitiesAfterOpen(Dataset: TDataSet);\r\n procedure btnCopyClick(Sender: TObject);\r\n procedure btnRemoveFromDBClick(Sender: TObject);\r\n procedure pcQAIChange(Sender: TObject);\r\n procedure rgVideoSourceChange(Sender: TObject);\r\n procedure WebFormResize(Sender: TObject);\r\n private\r\n { Private declarations }\r\n Save_EGV_SHOWCOMMONPICKLIST: Boolean;\r\n public\r\n { Public declarations }\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmSettings: TfrmSettings;\r\n\r\nimplementation\r\n\r\n{$R *.dfm}\r\n\r\nuses common, DataModule, picklist, Main;\r\n\r\nprocedure TfrmSettings.btnCancelClick(Sender: TObject);\r\nbegin\r\n self.Close;\r\nend;\r\n\r\nprocedure TfrmSettings.btnLoadFromDBClick(Sender: TObject);\r\n procedure OnDlgResult(Result: TDialogResult);\r\n begin\r\n if Result = mrYes then\r\n begin\r\n // ShowMessage('Load LS');\r\n LS_Load;\r\n end;\r\n end;\r\n\r\nbegin\r\n frmmain.mdGenDialog.ShowDialog\r\n ('Loading from DB will overwrite the current design settings with the data from DB. '\r\n + 'Do you want to proceed? ', WEBLib.Dialogs.mtConfirmation, [],\r\n @OnDlgResult);\r\nend;\r\n\r\nprocedure TfrmSettings.btnPostClick(Sender: TObject);\r\nbegin\r\n dm.EGV_LOCALSTORAGE.Values['EGV_SCREENBIGW'] := inttostr(seScreenBigW.value);\r\n dm.EGV_LOCALSTORAGE.Values['EGV_SCREENBIGH'] := inttostr(seScreenBigH.value);\r\n dm.EGV_LOCALSTORAGE.Values['EGV_SCREENMEDIUMW'] := inttostr(seScreenMediumW.value);\r\n dm.EGV_LOCALSTORAGE.Values['EGV_SCREENMEDIUMH'] := inttostr(seScreenMediumH.value);\r\n dm.EGV_LOCALSTORAGE.Values['EGV_SCREENSMALLW'] := inttostr(seScreenSmallW.value);\r\n dm.EGV_LOCALSTORAGE.Values['EGV_SCREENSMALLH'] := inttostr(seScreenSmallH.value);\r\n dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS'] := inttostr(seFormColumns.value);\r\n egv_formcolumns := seFormColumns.value;\r\n\r\n cbFormColumnsAutoClick(nil);\r\n\r\n if rgVideoSource.ItemIndex = 0\r\n then dm.EGV_LOCALSTORAGE.Values['EGV_VIDEOSOURCE'] := 'STREAM'\r\n else dm.EGV_LOCALSTORAGE.Values['EGV_VIDEOSOURCE'] := 'FILE';\r\n dm.EGV_LOCALSTORAGE.Values['EGV_VIDEOSOURCEFILE'] := edtVIDEOSOURCEFILE.Text;\r\n\r\n if cbBiddingDocs.checked\r\n then dm.EGV_LOCALSTORAGE.Values['EGV_QAI_BIDDINGDOCS'] := '1'\r\n else dm.EGV_LOCALSTORAGE.Values['EGV_QAI_BIDDINGDOCS'] := '0';\r\n EGV_QAI_BIDDINGDOCS := dm.EGV_LOCALSTORAGE.Values['EGV_QAI_BIDDINGDOCS'];\r\n\r\n if cbFormColumnsAuto.checked\r\n then dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNSAUTO'] := '1'\r\n else dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNSAUTO'] := '0';\r\n\r\n if cbEpic.checked\r\n then dm.EGV_LOCALSTORAGE.Values['EGV_EPIC'] := '1'\r\n else dm.EGV_LOCALSTORAGE.Values['EGV_EPIC'] := '0';\r\n\r\n if cbCerner.checked\r\n then dm.EGV_LOCALSTORAGE.Values['EGV_CERNER'] := '1'\r\n else dm.EGV_LOCALSTORAGE.Values['EGV_CERNER'] := '0';\r\n\r\n EGV_FORMCOLUMNSAUTO := (dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNSAUTO'] = '1');\r\n\r\n if cbNoHorizontalLineUp.checked\r\n then dm.EGV_LOCALSTORAGE.Values['EGV_NOHORIZONTALLINEUP'] := '1'\r\n else dm.EGV_LOCALSTORAGE.Values['EGV_NOHORIZONTALLINEUP'] := '0';\r\n EGV_NOHORIZONTALLINEUP := (dm.EGV_LOCALSTORAGE.Values['EGV_NOHORIZONTALLINEUP'] = '1');\r\n\r\n dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH'] := inttostr(seBlockDefaultWidth.value);\r\n EGV_BLOCKDEFAULTWIDTH := seBlockDefaultWidth.value;\r\n dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTHEIGHT'] := inttostr(seBlockDefaultHeight.value);\r\n EGV_BLOCKDEFAULTHEIGHT := seBlockDefaultHeight.value;\r\n\r\n if cbShowHiddenBlocksInDesign.checked\r\n then dm.EGV_LOCALSTORAGE.Values['EGV_SHOWHIDDENBLOCKSINDESIGN'] := '1'\r\n else dm.EGV_LOCALSTORAGE.Values['EGV_SHOWHIDDENBLOCKSINDESIGN'] := '0';\r\n EGV_SHOWHIDDENBLOCKSINDESIGN := cbShowHiddenBlocksInDesign.checked;\r\n\r\n if cbVoiceControlActive.checked\r\n then dm.EGV_LOCALSTORAGE.Values['EGV_VOICECONTROLACTIVE'] := '1'\r\n else dm.EGV_LOCALSTORAGE.Values['EGV_VOICECONTROLACTIVE'] := '0';\r\n\r\n if cbVoiceCommands.checked\r\n then dm.EGV_LOCALSTORAGE.Values['EGV_VOICECOMMANDS'] := '1'\r\n else dm.EGV_LOCALSTORAGE.Values['EGV_VOICECOMMANDS'] := '0';\r\n\r\n if cbVoiceDictation.checked\r\n then dm.EGV_LOCALSTORAGE.Values['EGV_VOICEDICTATION'] := '1'\r\n else dm.EGV_LOCALSTORAGE.Values['EGV_VOICEDICTATION'] := '0';\r\n\r\n\r\n if cbAutosaveDesigndata.checked\r\n then dm.EGV_LOCALSTORAGE.Values['EGV_AUTOSAVEDESIGNDATA'] := '1'\r\n else dm.EGV_LOCALSTORAGE.Values['EGV_AUTOSAVEDESIGNDATA'] := '0';\r\n\r\n\r\n if cbShowCommonPicklist.checked\r\n then dm.EGV_LOCALSTORAGE.Values['EGV_SHOWCOMMONPICKLIST'] := '1'\r\n else dm.EGV_LOCALSTORAGE.Values['EGV_SHOWCOMMONPICKLIST'] := '0';\r\n EGV_SHOWCOMMONPICKLIST := cbShowCommonPicklist.checked;\r\n\r\n if cbMainMenuTitles.checked\r\n then dm.EGV_LOCALSTORAGE.Values['EGV_MAINMENUTITLES'] := '1'\r\n else dm.EGV_LOCALSTORAGE.Values['EGV_MAINMENUTITLES'] := '0';\r\n\r\n dm.EGV_LOCALSTORAGE.Values['EGV_DATEFORMAT'] := edtDateFormat.Text;\r\n dm.EGV_LOCALSTORAGE.Values['EGV_TIMEFORMAT'] := edtTimeFormat.Text;\r\n dm.EGV_LOCALSTORAGE.Values['EGV_TIMEAM'] := edtTimeAM.Text;\r\n dm.EGV_LOCALSTORAGE.Values['EGV_TIMEPM'] := edtTimePM.Text;\r\n\r\n dm.EGV_LOCALSTORAGE.Values['QAI_SELECT'] := memQAI_Select.Text;\r\n\r\ndm.EGV_LOCALSTORAGE.Values['EGV_QAI_WAITMESSAGECOLOR'] := ColortoString(clrWAITMESSAGE.color) ;\r\ndm.EGV_LOCALSTORAGE.Values['EGV_QAI_SERVERMESSAGECOLOR'] := ColortoString(clrSERVERMESSAGE.color) ;\r\ndm.EGV_LOCALSTORAGE.Values['EGV_QAI_QUESTIONCOLOR'] := ColortoString(clrQUESTION.color) ;\r\ndm.EGV_LOCALSTORAGE.Values['EGV_QAI_ANSWERCOLOR'] := ColortoString(clrANSWER.color) ;\r\n\r\ndm.EGV_LOCALSTORAGE.Values['EGV_QAI_WAITMESSAGEICON'] := edWAITMESSAGEICON.text ;\r\ndm.EGV_LOCALSTORAGE.Values['EGV_QAI_SERVERMESSAGEICON'] := edSERVERMESSAGEICON.text ;\r\ndm.EGV_LOCALSTORAGE.Values['EGV_QAI_QUESTIONICON'] := edQUESTIONICON.text ;\r\ndm.EGV_LOCALSTORAGE.Values['EGV_QAI_ANSWERICON'] := edANSWERICON.text ;\r\n\r\ndm.EGV_LOCALSTORAGE.Values['EGV_QAI_WAITMESSAGEICONCOLOR'] := ColortoString(clrWAITMESSAGEICON.color) ;\r\ndm.EGV_LOCALSTORAGE.Values['EGV_QAI_SERVERMESSAGEICONCOLOR'] := ColortoString(clrSERVERMESSAGEICON.color);\r\ndm.EGV_LOCALSTORAGE.Values['EGV_QAI_QUESTIONICONCOLOR'] := ColortoString(clrQUESTIONICON.color);\r\ndm.EGV_LOCALSTORAGE.Values['EGV_QAI_ANSWERICONCOLOR'] := ColortoString(clrANSWERICON.color);\r\n\r\ndm.EGV_LOCALSTORAGE.Values['EGV_QAI_DEFAULTFILESTOUPLOAD'] := edDEFAULTFILESTOUPLOAD.text;\r\ndm.EGV_LOCALSTORAGE.Values['EGV_QAI_DEFAULTBIDDINGDOCSTOUPLOAD']:= edDEEAULTBIDDINGDOCSTOUPLOAD.text;\r\n CustomizeDateTimeFormats;\r\n CreateMainMenu;\r\n LS_Save;\r\n\r\n SetSystemVariablesFromStorage;\r\n\r\n self.Close;\r\nend;\r\n\r\nprocedure TfrmSettings.btnSaveToDBClick(Sender: TObject);\r\n procedure OnDlgResult(Result: TDialogResult);\r\n begin\r\n if Result = mrYes then\r\n begin\r\n // ShowMessage('Save LS');\r\n LS_Save;\r\n end;\r\n end;\r\n\r\nbegin\r\n frmmain.mdGenDialog.ShowDialog\r\n ('Saving to DB will overwrite all design data saved in DB with yor current settings.'\r\n + 'Do you want to proceed? ', WEBLib.Dialogs.mtConfirmation, [],\r\n @OnDlgResult);\r\nend;\r\n\r\nprocedure TfrmSettings.cb1Change(Sender: TObject);\r\nvar\r\n i: integer;\r\nbegin\r\n with GetCurrentForm() do\r\n begin\r\n if cb1.Text = 'M' then\r\n begin\r\n for i := 1 to 3 do\r\n (findcomponent('e' + inttostr(i)) as TControl).visible := true;\r\n for i := 4 to 32 do\r\n (findcomponent('e' + inttostr(i)) as TControl).visible := false;\r\n for i := 1 to 3 do\r\n (findcomponent('e' + inttostr(i)) as TControl).visible := true;\r\n (findcomponent('l2') as TLabel).visible := true;\r\n for i := 3 to 13 do\r\n (findcomponent('l' + inttostr(i)) as TLabel).visible := false;\r\n e6_2.visible := false; // report template name\r\n end\r\n else\r\n begin\r\n for i := 1 to 3 do\r\n (findcomponent('e' + inttostr(i)) as TControl).visible := false;\r\n for i := 4 to 32 do\r\n (findcomponent('e' + inttostr(i)) as TControl).visible := true;\r\n for i := 1 to 3 do\r\n (findcomponent('e' + inttostr(i)) as TControl).visible := false;\r\n (findcomponent('l2') as TLabel).visible := false;\r\n for i := 3 to 13 do\r\n (findcomponent('l' + inttostr(i)) as TLabel).visible := true;\r\n e6_2.visible := true; // report template name\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TfrmSettings.cbFormColumnsAutoClick(Sender: TObject);\r\nbegin\r\n lblColumns.Enabled := (not cbFormColumnsAuto.checked);\r\n seFormColumns.Enabled := (not cbFormColumnsAuto.checked);\r\n lblBlockDefaultWidth.Enabled := (cbFormColumnsAuto.checked);\r\n seBlockDefaultWidth.Enabled := (cbFormColumnsAuto.checked);\r\nend;\r\n\r\nprocedure TfrmSettings.btnCopyClick(Sender: TObject);\r\nbegin\r\n { if cbFromFacility.ItemIndex = cbToFacility.itemindex\r\n then begin\r\n Showmessage('[From] and [To] facilities cannot be the same.');\r\n exit;\r\n end; }\r\n // showmessage(trim(copy(cbFromFacility.text, 1, pos('~', cbFromFacility.text) - 1)));\r\n // showmessage(trim(copy(cbToFacility.text, 1, pos('~', cbToFacility.text) - 1)));\r\n // exit;\r\n APPSettings_Copy(trim(copy(cbFromFacility.Text, 1,\r\n pos('~', cbFromFacility.Text) - 1)),\r\n trim(copy(cbToFacility.Text, 1, pos('~', cbToFacility.Text) - 1)));\r\nend;\r\n\r\nprocedure TfrmSettings.btnRemoveFromDBClick(Sender: TObject);\r\n procedure OnDlgResult(Result: TDialogResult);\r\n begin\r\n if Result = mrYes then\r\n begin\r\n ShowMessage('Remove from DB for facility ' + EGV_FACILITYID);\r\n APPSettings_Copy(EGV_FACILITYID, EGV_FACILITYID);\r\n end;\r\n end;\r\n\r\nbegin\r\n frmmain.mdGenDialog.ShowDialog('All connected user [' + EGV_USERNAME +\r\n '] settings/design data will be removed from the DB for facility ' +\r\n EGV_FACILITYID + '-' + EGV_FACILITY + '. ' + 'Do you want to proceed? ',\r\n WEBLib.Dialogs.mtConfirmation, [], @OnDlgResult);\r\nend;\r\n\r\nprocedure TfrmSettings.WebBitBtn3Click(Sender: TObject);\r\nvar\r\n s: string;\r\nbegin\r\n s := BuildMenuLine;\r\n dm.xdsPicklist.Append;\r\n dm.xdsPicklistIDENT_VALUE.AsString := s;\r\n dm.xdsPicklist.Post;\r\n DataSetApplyUpdate(dm.xdsPicklist, 'I', 1);\r\nend;\r\n\r\nprocedure TfrmSettings.WebBitBtn4Click(Sender: TObject);\r\nbegin\r\n dm.xdsPicklist.edit;\r\n dm.xdsPicklistIDENT_VALUE.AsString := BuildMenuLine;\r\n dm.xdsPicklist.Post;\r\nend;\r\n\r\nprocedure TfrmSettings.WebFormClose(Sender: TObject; var Action: TCloseAction);\r\nbegin\r\nEGV_SHOWCOMMONPICKLIST := Save_EGV_SHOWCOMMONPICKLIST;\r\n{ if assigned(egv_subform2) then\r\n egv_subform2.Close;}\r\n HideFormContainer(true);\r\nend;\r\n\r\nprocedure TfrmSettings.WebFormResize(Sender: TObject);\r\nbegin\r\npcQAI.Left := 15;\r\npcQAI.Top := 15;\r\npcQAI.Width := psQAI.Width - 30;\r\npcQAI.Height := psQAI.Height - 30;\r\nend;\r\n\r\nprocedure TfrmSettings.WebFormShow(Sender: TObject);\r\nbegin\r\n Save_EGV_SHOWCOMMONPICKLIST := EGV_SHOWCOMMONPICKLIST;\r\n EGV_SHOWCOMMONPICKLIST := false; // can be true only for reg. picklists\r\n\r\n if dm.EGV_LOCALSTORAGE.Values['EGV_SCREENBIGW'] = '' then dm.EGV_LOCALSTORAGE.Values['EGV_SCREENBIGW'] := '0' ;\r\n if dm.EGV_LOCALSTORAGE.Values['EGV_SCREENBIGH'] = '' then dm.EGV_LOCALSTORAGE.Values['EGV_SCREENBIGH'] := '0' ;\r\n if dm.EGV_LOCALSTORAGE.Values['EGV_SCREENMEDIUMW'] = '' then dm.EGV_LOCALSTORAGE.Values['EGV_SCREENMEDIUMW'] := '0' ;\r\n if dm.EGV_LOCALSTORAGE.Values['EGV_SCREENMEDIUMH'] = '' then dm.EGV_LOCALSTORAGE.Values['EGV_SCREENMEDIUMH'] := '0' ;\r\n if dm.EGV_LOCALSTORAGE.Values['EGV_SCREENSMALLW'] = '' then dm.EGV_LOCALSTORAGE.Values['EGV_SCREENSMALLW'] := '0' ;\r\n if dm.EGV_LOCALSTORAGE.Values['EGV_SCREENSMALLH'] = '' then dm.EGV_LOCALSTORAGE.Values['EGV_SCREENSMALLH'] := '0' ;\r\n\r\n if dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS'] = '' then dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS'] := '0' ;\r\n if dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH'] = '' then dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH'] := '0' ;\r\n if dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTHEIGHT'] = '' then dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTHEIGHT'] := '0' ;\r\n\r\n if (dm.EGV_LOCALSTORAGE.Values['EGV_VIDEOSOURCE'] = '') or (dm.EGV_LOCALSTORAGE.Values['EGV_VIDEOSOURCE'] = 'STREAM')\r\n then rgVideoSource.ItemIndex := 0\r\n else rgVideoSource.ItemIndex := 1;\r\n edtVIDEOSOURCEFILE.Text := dm.EGV_LOCALSTORAGE.Values['EGV_VIDEOSOURCEFILE'];\r\n edtVideoSourceFile.Visible := (rgVideoSource.ItemIndex = 1);\r\n\r\n pcSettings.ActivePageIndex := 0;\r\n pcQAI.ActivePageIndex := 0;\r\n\r\n {seScreenBigW.value := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_SCREENBIGW']); // showmessage( dm.EGV_LOCALSTORAGE.Values['EGV_SCREENBIGH']);\r\n seScreenBigH.value := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_SCREENBIGH']); // showmessage( dm.EGV_LOCALSTORAGE.Values['EGV_SCREENMEDIUMW']);\r\n\r\n seScreenMediumW.value := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_SCREENMEDIUMW']); // showmessage( dm.EGV_LOCALSTORAGE.Values['EGV_SCREENMEDIUMH']);\r\n seScreenMediumH.value := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_SCREENMEDIUMH']); // showmessage( dm.EGV_LOCALSTORAGE.Values['EGV_SCREENSMALLW']);\r\n\r\n seScreenSmallW.value := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_SCREENSMALLW']); // showmessage( dm.EGV_LOCALSTORAGE.Values['EGV_SCREENSMALLH']);\r\n seScreenSmallH.value := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_SCREENSMALLH']); // showmessage( dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS']);\r\n }\r\n seFormColumns.value := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS']); // showmessage( dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH']);\r\n seBlockDefaultWidth.value := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH']); // showmessage( dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTHEIGHT']);\r\n seBlockDefaultHeight.value := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTHEIGHT']); // showmessage( dm.EGV_LOCALSTORAGE.Values['!!!']);\r\n\r\n cbShowHiddenBlocksInDesign.checked := (dm.EGV_LOCALSTORAGE.Values['EGV_SHOWHIDDENBLOCKSINDESIGN'] = '1');\r\n cbVoiceControlActive.checked := (dm.EGV_LOCALSTORAGE.Values['EGV_VOICECONTROLACTIVE'] = '1');\r\n cbVoiceCommands.checked := (dm.EGV_LOCALSTORAGE.Values['EGV_VOICECOMMANDS'] = '1');\r\n cbVoiceDictation.checked := (dm.EGV_LOCALSTORAGE.Values['EGV_VOICEDICTATION'] = '1');\r\n\r\n cbAutoSaveDesignData.checked := (dm.EGV_LOCALSTORAGE.Values['EGV_AUTOSAVEDESIGNDATA'] = '1');\r\n cbFormColumnsAuto.checked := (dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNSAUTO'] = '1');\r\n cbEpic.checked := (dm.EGV_LOCALSTORAGE.Values['EGV_EPIC'] = '1');\r\n cbCerner.checked := (dm.EGV_LOCALSTORAGE.Values['EGV_CERNER'] = '1');\r\n cbNoHorizontalLineUp.checked := (dm.EGV_LOCALSTORAGE.Values['EGV_NOHORIZONTALLINEUP'] = '1');\r\n cbShowCommonPicklist.checked := (dm.EGV_LOCALSTORAGE.Values['EGV_SHOWCOMMONPICKLIST'] = '1');\r\n cbShowCommonPicklist.checked := (dm.EGV_LOCALSTORAGE.Values['EGV_SHOWCOMMONPICKLIST'] = '1');\r\n cbMainMenuTitles.checked := (dm.EGV_LOCALSTORAGE.Values['EGV_MAINMENUTITLES'] = '1');\r\n { seBlockDefaultWidth.value := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH']);\r\n seBlockDefaultHeight.value := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTHEIGHT']); }\r\n cbFormColumnsAutoClick(nil);\r\n edtDateFormat.Text := dm.EGV_LOCALSTORAGE.Values['EGV_DATEFORMAT'];\r\n edtTimeFormat.Text := dm.EGV_LOCALSTORAGE.Values['EGV_TIMEFORMAT'];\r\n edtTimeAM.Text := dm.EGV_LOCALSTORAGE.Values['EGV_TIMEAM'];\r\n edtTimePM.Text := dm.EGV_LOCALSTORAGE.Values['EGV_TIMEPM'];\r\n memQAI_Select.Text := dm.EGV_LOCALSTORAGE.Values['QAI_SELECT'];\r\n\r\nclrWAITMESSAGE.color := stringtocolor(dm.EGV_LOCALSTORAGE.Values['EGV_QAI_WAITMESSAGECOLOR'] );\r\nclrSERVERMESSAGE.color := stringtocolor(dm.EGV_LOCALSTORAGE.Values['EGV_QAI_SERVERMESSAGECOLOR'] );\r\nclrQUESTION.color := stringtocolor(dm.EGV_LOCALSTORAGE.Values['EGV_QAI_QUESTIONCOLOR']);\r\nclrANSWER.color := stringtocolor(dm.EGV_LOCALSTORAGE.Values['EGV_QAI_ANSWERCOLOR'] );\r\n\r\nedWAITMESSAGEICON.text := dm.EGV_LOCALSTORAGE.Values['EGV_QAI_WAITMESSAGEICON'] ;\r\nedSERVERMESSAGEICON.text := dm.EGV_LOCALSTORAGE.Values['EGV_QAI_SERVERMESSAGEICON'] ;\r\nedQUESTIONICON.text := dm.EGV_LOCALSTORAGE.Values['EGV_QAI_QUESTIONICON'] ;\r\nedANSWERICON.text := dm.EGV_LOCALSTORAGE.Values['EGV_QAI_ANSWERICON'] ;\r\n\r\nclrWAITMESSAGEICON.color := stringtocolor(dm.EGV_LOCALSTORAGE.Values['EGV_QAI_WAITMESSAGEICONCOLOR'] );\r\nclrSERVERMESSAGEICON.color := stringtocolor(dm.EGV_LOCALSTORAGE.Values['EGV_QAI_SERVERMESSAGEICONCOLOR'] );\r\nclrQUESTIONICON.color := stringtocolor(dm.EGV_LOCALSTORAGE.Values['EGV_QAI_QUESTIONICONCOLOR'] );\r\nclrANSWERICON.color := stringtocolor(dm.EGV_LOCALSTORAGE.Values['EGV_QAI_ANSWERICONCOLOR'] );\r\n\r\ncbBiddingDocs.checked := (dm.EGV_LOCALSTORAGE.Values['EGV_QAI_BIDDINGDOCS'] = '1');\r\n\r\nedDEFAULTFILESTOUPLOAD.text := dm.EGV_LOCALSTORAGE.Values['EGV_QAI_DEFAULTFILESTOUPLOAD'];\r\nedDEEAULTBIDDINGDOCSTOUPLOAD.text := dm.EGV_LOCALSTORAGE.Values['EGV_QAI_DEFAULTBIDDINGDOCSTOUPLOAD'];\r\n\r\nResizeButtons(pnlListButtons);\r\nResizeButtons(pnlFormButtons);\r\nend;\r\n\r\nprocedure TfrmSettings.xdsfacilitiesAfterOpen(Dataset: TDataSet);\r\nvar\r\n i, j: integer;\r\nbegin\r\n cbFromFacility.Clear;\r\n cbToFacility.Clear;\r\n i := 0;\r\n j := -1;\r\n while not Dataset.eof do\r\n begin\r\n cbFromFacility.Items.Add(Dataset.FieldByName('Original.ITEM').AsString);\r\n cbToFacility.Items.Add(Dataset.FieldByName('Original.ITEM').AsString);\r\n // showmessage(trim(copy(cbfacilities.Items[i], 1, pos('~', cbfacilities.Items[i]) - 1)));\r\n if EGV_FACILITYID = trim(copy(cbFromFacility.Items[i], 1,\r\n pos('~', cbFromFacility.Items[i]) - 1)) then\r\n j := i;\r\n Dataset.Next;\r\n i := i + 1;\r\n end;\r\n if j <> -1 then\r\n begin\r\n cbFromFacility.ItemIndex := j;\r\n cbToFacility.ItemIndex := j;\r\n end;\r\nend;\r\n\r\nprocedure TfrmSettings.pcQAIChange(Sender: TObject);\r\nvar sql_p: string;\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var Response_p: string;\r\n begin\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n // showmessage('loaded form defaults: '+ response_p);\r\n memViewXML.text := Response_p;\r\n end;\r\n\r\nbegin\r\nsql_p := memQAI_Select.Text;\r\nsql_p := insertkeyvalues(sql_p);\r\n//showmessage(sql_p);\r\nif pcQAI.ActivePageIndex = 1\r\nthen if dm.XDataWebConnection2.Connected then dm.XDataWebClient2.RawInvoke('IReportService.GetColumnData',[sql_p , egv_facilityid, '0'], @OnResult);\r\n\r\nend;\r\n\r\nprocedure TfrmSettings.pcSettingsChange(Sender: TObject);\r\nvar\r\n s: string;\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n begin\r\n xdsfacilities.Close;\r\n try\r\n xdsfacilities.SetJsonData(Response_to_JSArray(Response));\r\n except\r\n // showmessage('Error loading List. Check DB Select statement');\r\n // string(TJSObject(Response.Result)['value']));\r\n end;\r\n xdsfacilities.Open;\r\n end;\r\n\r\nbegin\r\n if pcSettings.ActivePageIndex = 1 then\r\n begin\r\n EGV_CHILD_FORM_CAPTION := 'Main menu items';\r\n EGV_PKLTARGETMEMO := nil;\r\n EGV_PKLTARGETMEMONAME := '';\r\n EGV_PKLEDITMODE := true;\r\n EGV_SECTIONNAME := 'QAPPBUILDER_MAIN_MENU';\r\n Application.CreateForm(TfrmPickList, pnlPKLMenuContainer.ElementID,\r\n getsubform());\r\n end;\r\n if pcSettings.ActivePageIndex = 2 then\r\n begin\r\n s := 'select cast(FACILITYID as varchar(3)) + ' + quotedstr('~') +\r\n ' + facilityname as ITEM from facility order by FACILITYID';\r\n // showmessage(s);\r\n if dm.XDataWebConnection1.Connected then dm.XDataWebClient1.RawInvoke('IReportService.OpenQuery', [s, EGV_FACILITYID, '1'], @OnResult)\r\n end;\r\n\r\nend;\r\n\r\nprocedure TfrmSettings.rgVideoSourceChange(Sender: TObject);\r\nbegin\r\nedtVideoSourceFile.Visible := (rgVideoSource.ItemIndex = 1);\r\nend;\r\n\r\nfunction TfrmSettings.BuildMenuLine: string;\r\nvar\r\n i: integer;\r\n s: string;\r\nbegin\r\n with GetCurrentForm() do\r\n begin\r\n if (findcomponent('cb1') as TComboBox).Text = 'M' then\r\n begin\r\n s := 'M';\r\n for i := 1 to 5\r\n do begin\r\n if findcomponent('me' + inttostr(i)) is TEdit then s := s + '^' + (findcomponent('me' + inttostr(i)) as TEdit).Text;\r\n if findcomponent('me' + inttostr(i)) is Tmemo then s := s + '^' + (findcomponent('me' + inttostr(i)) as TMemo).Text;\r\n end;\r\n end\r\n else\r\n begin\r\n s := 'F';\r\n for i := 5 to 42\r\n do begin\r\n if findcomponent('e' + inttostr(i)) is TEdit then s := s + '^' + (findcomponent('e' + inttostr(i)) as TEdit).Text;\r\n if findcomponent('e' + inttostr(i)) is Tmemo then s := s + '^' + (findcomponent('e' + inttostr(i)) as TMemo).Text;\r\n if i = 6 then s := s + '^' + e6_2.Text; // report template name\r\n\r\n end;\r\n end;\r\n end;\r\n Result := s;\r\nend;\r\n\r\nprocedure TfrmSettings.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n pnlFormButtons := TPanel.Create(Self);\r\n btnPost := TBitBtn.Create(Self);\r\n btnCancel := TBitBtn.Create(Self);\r\n pcSettings := TPageControl.Create(Self);\r\n psGeneral := TTabSheet.Create(Self);\r\n lblBlockDefaultWidth := TLabel.Create(Self);\r\n WebLabel1 := TLabel.Create(Self);\r\n WebLabel2 := TLabel.Create(Self);\r\n WebLabel3 := TLabel.Create(Self);\r\n WebLabel4 := TLabel.Create(Self);\r\n WebLabel5 := TLabel.Create(Self);\r\n lblColumns := TLabel.Create(Self);\r\n WebLabel15 := TLabel.Create(Self);\r\n WebLabel25 := TLabel.Create(Self);\r\n WebLabel26 := TLabel.Create(Self);\r\n WebLabel27 := TLabel.Create(Self);\r\n WebLabel28 := TLabel.Create(Self);\r\n WebLabel29 := TLabel.Create(Self);\r\n WebLabel30 := TLabel.Create(Self);\r\n WebLabel31 := TLabel.Create(Self);\r\n WebLabel32 := TLabel.Create(Self);\r\n WebLabel33 := TLabel.Create(Self);\r\n WebLabel36 := TLabel.Create(Self);\r\n seFormColumns := TSpinEdit.Create(Self);\r\n cbShowHiddenBlocksInDesign := TCheckBox.Create(Self);\r\n cbFormColumnsAuto := TCheckBox.Create(Self);\r\n seBlockDefaultWidth := TSpinEdit.Create(Self);\r\n cbShowCommonPicklist := TCheckBox.Create(Self);\r\n cbMainMenuTitles := TCheckBox.Create(Self);\r\n edtDateFormat := TEdit.Create(Self);\r\n edtTimeFormat := TEdit.Create(Self);\r\n edtTimeAM := TEdit.Create(Self);\r\n edtTimePM := TEdit.Create(Self);\r\n WebMemo3 := TMemo.Create(Self);\r\n seBlockDefaultHeight := TSpinEdit.Create(Self);\r\n cbAutosaveDesigndata := TCheckBox.Create(Self);\r\n cbNoHorizontalLineUp := TCheckBox.Create(Self);\r\n seScreenBigW := TSpinEdit.Create(Self);\r\n seScreenBigH := TSpinEdit.Create(Self);\r\n seScreenMediumW := TSpinEdit.Create(Self);\r\n seScreenMediumH := TSpinEdit.Create(Self);\r\n seScreenSmallW := TSpinEdit.Create(Self);\r\n seScreenSmallH := TSpinEdit.Create(Self);\r\n rgVideoSource := TRadioGroup.Create(Self);\r\n edtVideoSourceFile := TEdit.Create(Self);\r\n cbVoiceControlActive := TCheckBox.Create(Self);\r\n cbVoiceCommands := TCheckBox.Create(Self);\r\n cbVoiceDictation := TCheckBox.Create(Self);\r\n psmainmenu := TTabSheet.Create(Self);\r\n pnlPKLMenuContainer := TPanel.Create(Self);\r\n WebMemo1 := TMemo.Create(Self);\r\n WebSplitter1 := TSplitter.Create(Self);\r\n WebPanel1 := TPanel.Create(Self);\r\n WebLabel11 := TLabel.Create(Self);\r\n WebScrollBox1 := TScrollBox.Create(Self);\r\n l1 := TLabel.Create(Self);\r\n l2 := TLabel.Create(Self);\r\n l3 := TLabel.Create(Self);\r\n l5 := TLabel.Create(Self);\r\n l6 := TLabel.Create(Self);\r\n l7 := TLabel.Create(Self);\r\n l8 := TLabel.Create(Self);\r\n l9 := TLabel.Create(Self);\r\n l4 := TLabel.Create(Self);\r\n WebLabel6 := TLabel.Create(Self);\r\n WebLabel7 := TLabel.Create(Self);\r\n WebLabel8 := TLabel.Create(Self);\r\n WebLabel9 := TLabel.Create(Self);\r\n WebLabel10 := TLabel.Create(Self);\r\n WebLabel12 := TLabel.Create(Self);\r\n l10 := TLabel.Create(Self);\r\n WebLabel14 := TLabel.Create(Self);\r\n l11 := TLabel.Create(Self);\r\n WebLabel16 := TLabel.Create(Self);\r\n l12 := TLabel.Create(Self);\r\n WebLabel18 := TLabel.Create(Self);\r\n l13 := TLabel.Create(Self);\r\n cb1 := TComboBox.Create(Self);\r\n me1 := TEdit.Create(Self);\r\n me2 := TEdit.Create(Self);\r\n me3 := TEdit.Create(Self);\r\n e5 := TEdit.Create(Self);\r\n e6 := TEdit.Create(Self);\r\n e7 := TEdit.Create(Self);\r\n e8 := TEdit.Create(Self);\r\n e9 := TEdit.Create(Self);\r\n e11 := TEdit.Create(Self);\r\n e12 := TEdit.Create(Self);\r\n e13 := TEdit.Create(Self);\r\n e15 := TEdit.Create(Self);\r\n e16 := TEdit.Create(Self);\r\n e17 := TEdit.Create(Self);\r\n e19 := TEdit.Create(Self);\r\n e20 := TEdit.Create(Self);\r\n e21 := TEdit.Create(Self);\r\n e23 := TEdit.Create(Self);\r\n e25 := TEdit.Create(Self);\r\n e24 := TEdit.Create(Self);\r\n e27 := TEdit.Create(Self);\r\n e28 := TEdit.Create(Self);\r\n e29 := TEdit.Create(Self);\r\n e31 := TEdit.Create(Self);\r\n e32 := TEdit.Create(Self);\r\n e33 := TEdit.Create(Self);\r\n e41 := TEdit.Create(Self);\r\n e40 := TEdit.Create(Self);\r\n e39 := TEdit.Create(Self);\r\n e37 := TEdit.Create(Self);\r\n e36 := TEdit.Create(Self);\r\n e35 := TEdit.Create(Self);\r\n me5 := TEdit.Create(Self);\r\n me4 := TMemo.Create(Self);\r\n e10 := TMemo.Create(Self);\r\n e14 := TMemo.Create(Self);\r\n e22 := TMemo.Create(Self);\r\n e18 := TMemo.Create(Self);\r\n e26 := TMemo.Create(Self);\r\n e34 := TMemo.Create(Self);\r\n e30 := TMemo.Create(Self);\r\n e38 := TMemo.Create(Self);\r\n e42 := TMemo.Create(Self);\r\n e6_2 := TEdit.Create(Self);\r\n pnlListButtons := TPanel.Create(Self);\r\n WebBitBtn3 := TBitBtn.Create(Self);\r\n WebBitBtn4 := TBitBtn.Create(Self);\r\n WebMemo4 := TMemo.Create(Self);\r\n psManagement := TTabSheet.Create(Self);\r\n lbQPKLSectionName := TLabel.Create(Self);\r\n WebLabel13 := TLabel.Create(Self);\r\n btnLoadFromDB := TBitBtn.Create(Self);\r\n btnSaveToDB := TBitBtn.Create(Self);\r\n cbFromFacility := TComboBox.Create(Self);\r\n WebMemo2 := TMemo.Create(Self);\r\n btnCopy := TBitBtn.Create(Self);\r\n cbToFacility := TComboBox.Create(Self);\r\n btnRemoveFromDB := TBitBtn.Create(Self);\r\n psQAI := TTabSheet.Create(Self);\r\n pcQAI := TPageControl.Create(Self);\r\n pcQAISheet3 := TTabSheet.Create(Self);\r\n WebLabel17 := TLabel.Create(Self);\r\n WebLabel19 := TLabel.Create(Self);\r\n WebLabel20 := TLabel.Create(Self);\r\n WebLabel21 := TLabel.Create(Self);\r\n WebLabel22 := TLabel.Create(Self);\r\n WebLabel23 := TLabel.Create(Self);\r\n WebLabel24 := TLabel.Create(Self);\r\n WebLabel34 := TLabel.Create(Self);\r\n WebLabel35 := TLabel.Create(Self);\r\n edWaitMessageIcon := TEdit.Create(Self);\r\n edServerMessageIcon := TEdit.Create(Self);\r\n edQuestionIcon := TEdit.Create(Self);\r\n edAnswerIcon := TEdit.Create(Self);\r\n clrWaitMessage := TColorPicker.Create(Self);\r\n clrServerMessage := TColorPicker.Create(Self);\r\n clrQuestion := TColorPicker.Create(Self);\r\n clrAnswer := TColorPicker.Create(Self);\r\n clrWaitMessageIcon := TColorPicker.Create(Self);\r\n clrServerMessageIcon := TColorPicker.Create(Self);\r\n clrQuestionIcon := TColorPicker.Create(Self);\r\n clrAnswericon := TColorPicker.Create(Self);\r\n edDefaultFilesToUpload := TEdit.Create(Self);\r\n edDEEAULTBIDDINGDOCSTOUPLOAD := TEdit.Create(Self);\r\n cbBiddingDocs := TCheckBox.Create(Self);\r\n cbEpic := TCheckBox.Create(Self);\r\n cbCerner := TCheckBox.Create(Self);\r\n psDBQuery := TTabSheet.Create(Self);\r\n memQAI_Select := TMemo.Create(Self);\r\n psXMLResult := TTabSheet.Create(Self);\r\n memViewXML := TMemo.Create(Self);\r\n pnlFormCaption := TPanel.Create(Self);\r\n xdsfacilities := TXDataWebDataSet.Create(Self);\r\n xdsfacilitiesOriginalITEM := TStringField.Create(Self);\r\n\r\n pnlFormButtons.BeforeLoadDFMValues;\r\n btnPost.BeforeLoadDFMValues;\r\n btnCancel.BeforeLoadDFMValues;\r\n pcSettings.BeforeLoadDFMValues;\r\n psGeneral.BeforeLoadDFMValues;\r\n lblBlockDefaultWidth.BeforeLoadDFMValues;\r\n WebLabel1.BeforeLoadDFMValues;\r\n WebLabel2.BeforeLoadDFMValues;\r\n WebLabel3.BeforeLoadDFMValues;\r\n WebLabel4.BeforeLoadDFMValues;\r\n WebLabel5.BeforeLoadDFMValues;\r\n lblColumns.BeforeLoadDFMValues;\r\n WebLabel15.BeforeLoadDFMValues;\r\n WebLabel25.BeforeLoadDFMValues;\r\n WebLabel26.BeforeLoadDFMValues;\r\n WebLabel27.BeforeLoadDFMValues;\r\n WebLabel28.BeforeLoadDFMValues;\r\n WebLabel29.BeforeLoadDFMValues;\r\n WebLabel30.BeforeLoadDFMValues;\r\n WebLabel31.BeforeLoadDFMValues;\r\n WebLabel32.BeforeLoadDFMValues;\r\n WebLabel33.BeforeLoadDFMValues;\r\n WebLabel36.BeforeLoadDFMValues;\r\n seFormColumns.BeforeLoadDFMValues;\r\n cbShowHiddenBlocksInDesign.BeforeLoadDFMValues;\r\n cbFormColumnsAuto.BeforeLoadDFMValues;\r\n seBlockDefaultWidth.BeforeLoadDFMValues;\r\n cbShowCommonPicklist.BeforeLoadDFMValues;\r\n cbMainMenuTitles.BeforeLoadDFMValues;\r\n edtDateFormat.BeforeLoadDFMValues;\r\n edtTimeFormat.BeforeLoadDFMValues;\r\n edtTimeAM.BeforeLoadDFMValues;\r\n edtTimePM.BeforeLoadDFMValues;\r\n WebMemo3.BeforeLoadDFMValues;\r\n seBlockDefaultHeight.BeforeLoadDFMValues;\r\n cbAutosaveDesigndata.BeforeLoadDFMValues;\r\n cbNoHorizontalLineUp.BeforeLoadDFMValues;\r\n seScreenBigW.BeforeLoadDFMValues;\r\n seScreenBigH.BeforeLoadDFMValues;\r\n seScreenMediumW.BeforeLoadDFMValues;\r\n seScreenMediumH.BeforeLoadDFMValues;\r\n seScreenSmallW.BeforeLoadDFMValues;\r\n seScreenSmallH.BeforeLoadDFMValues;\r\n rgVideoSource.BeforeLoadDFMValues;\r\n edtVideoSourceFile.BeforeLoadDFMValues;\r\n cbVoiceControlActive.BeforeLoadDFMValues;\r\n cbVoiceCommands.BeforeLoadDFMValues;\r\n cbVoiceDictation.BeforeLoadDFMValues;\r\n psmainmenu.BeforeLoadDFMValues;\r\n pnlPKLMenuContainer.BeforeLoadDFMValues;\r\n WebMemo1.BeforeLoadDFMValues;\r\n WebSplitter1.BeforeLoadDFMValues;\r\n WebPanel1.BeforeLoadDFMValues;\r\n WebLabel11.BeforeLoadDFMValues;\r\n WebScrollBox1.BeforeLoadDFMValues;\r\n l1.BeforeLoadDFMValues;\r\n l2.BeforeLoadDFMValues;\r\n l3.BeforeLoadDFMValues;\r\n l5.BeforeLoadDFMValues;\r\n l6.BeforeLoadDFMValues;\r\n l7.BeforeLoadDFMValues;\r\n l8.BeforeLoadDFMValues;\r\n l9.BeforeLoadDFMValues;\r\n l4.BeforeLoadDFMValues;\r\n WebLabel6.BeforeLoadDFMValues;\r\n WebLabel7.BeforeLoadDFMValues;\r\n WebLabel8.BeforeLoadDFMValues;\r\n WebLabel9.BeforeLoadDFMValues;\r\n WebLabel10.BeforeLoadDFMValues;\r\n WebLabel12.BeforeLoadDFMValues;\r\n l10.BeforeLoadDFMValues;\r\n WebLabel14.BeforeLoadDFMValues;\r\n l11.BeforeLoadDFMValues;\r\n WebLabel16.BeforeLoadDFMValues;\r\n l12.BeforeLoadDFMValues;\r\n WebLabel18.BeforeLoadDFMValues;\r\n l13.BeforeLoadDFMValues;\r\n cb1.BeforeLoadDFMValues;\r\n me1.BeforeLoadDFMValues;\r\n me2.BeforeLoadDFMValues;\r\n me3.BeforeLoadDFMValues;\r\n e5.BeforeLoadDFMValues;\r\n e6.BeforeLoadDFMValues;\r\n e7.BeforeLoadDFMValues;\r\n e8.BeforeLoadDFMValues;\r\n e9.BeforeLoadDFMValues;\r\n e11.BeforeLoadDFMValues;\r\n e12.BeforeLoadDFMValues;\r\n e13.BeforeLoadDFMValues;\r\n e15.BeforeLoadDFMValues;\r\n e16.BeforeLoadDFMValues;\r\n e17.BeforeLoadDFMValues;\r\n e19.BeforeLoadDFMValues;\r\n e20.BeforeLoadDFMValues;\r\n e21.BeforeLoadDFMValues;\r\n e23.BeforeLoadDFMValues;\r\n e25.BeforeLoadDFMValues;\r\n e24.BeforeLoadDFMValues;\r\n e27.BeforeLoadDFMValues;\r\n e28.BeforeLoadDFMValues;\r\n e29.BeforeLoadDFMValues;\r\n e31.BeforeLoadDFMValues;\r\n e32.BeforeLoadDFMValues;\r\n e33.BeforeLoadDFMValues;\r\n e41.BeforeLoadDFMValues;\r\n e40.BeforeLoadDFMValues;\r\n e39.BeforeLoadDFMValues;\r\n e37.BeforeLoadDFMValues;\r\n e36.BeforeLoadDFMValues;\r\n e35.BeforeLoadDFMValues;\r\n me5.BeforeLoadDFMValues;\r\n me4.BeforeLoadDFMValues;\r\n e10.BeforeLoadDFMValues;\r\n e14.BeforeLoadDFMValues;\r\n e22.BeforeLoadDFMValues;\r\n e18.BeforeLoadDFMValues;\r\n e26.BeforeLoadDFMValues;\r\n e34.BeforeLoadDFMValues;\r\n e30.BeforeLoadDFMValues;\r\n e38.BeforeLoadDFMValues;\r\n e42.BeforeLoadDFMValues;\r\n e6_2.BeforeLoadDFMValues;\r\n pnlListButtons.BeforeLoadDFMValues;\r\n WebBitBtn3.BeforeLoadDFMValues;\r\n WebBitBtn4.BeforeLoadDFMValues;\r\n WebMemo4.BeforeLoadDFMValues;\r\n psManagement.BeforeLoadDFMValues;\r\n lbQPKLSectionName.BeforeLoadDFMValues;\r\n WebLabel13.BeforeLoadDFMValues;\r\n btnLoadFromDB.BeforeLoadDFMValues;\r\n btnSaveToDB.BeforeLoadDFMValues;\r\n cbFromFacility.BeforeLoadDFMValues;\r\n WebMemo2.BeforeLoadDFMValues;\r\n btnCopy.BeforeLoadDFMValues;\r\n cbToFacility.BeforeLoadDFMValues;\r\n btnRemoveFromDB.BeforeLoadDFMValues;\r\n psQAI.BeforeLoadDFMValues;\r\n pcQAI.BeforeLoadDFMValues;\r\n pcQAISheet3.BeforeLoadDFMValues;\r\n WebLabel17.BeforeLoadDFMValues;\r\n WebLabel19.BeforeLoadDFMValues;\r\n WebLabel20.BeforeLoadDFMValues;\r\n WebLabel21.BeforeLoadDFMValues;\r\n WebLabel22.BeforeLoadDFMValues;\r\n WebLabel23.BeforeLoadDFMValues;\r\n WebLabel24.BeforeLoadDFMValues;\r\n WebLabel34.BeforeLoadDFMValues;\r\n WebLabel35.BeforeLoadDFMValues;\r\n edWaitMessageIcon.BeforeLoadDFMValues;\r\n edServerMessageIcon.BeforeLoadDFMValues;\r\n edQuestionIcon.BeforeLoadDFMValues;\r\n edAnswerIcon.BeforeLoadDFMValues;\r\n clrWaitMessage.BeforeLoadDFMValues;\r\n clrServerMessage.BeforeLoadDFMValues;\r\n clrQuestion.BeforeLoadDFMValues;\r\n clrAnswer.BeforeLoadDFMValues;\r\n clrWaitMessageIcon.BeforeLoadDFMValues;\r\n clrServerMessageIcon.BeforeLoadDFMValues;\r\n clrQuestionIcon.BeforeLoadDFMValues;\r\n clrAnswericon.BeforeLoadDFMValues;\r\n edDefaultFilesToUpload.BeforeLoadDFMValues;\r\n edDEEAULTBIDDINGDOCSTOUPLOAD.BeforeLoadDFMValues;\r\n cbBiddingDocs.BeforeLoadDFMValues;\r\n cbEpic.BeforeLoadDFMValues;\r\n cbCerner.BeforeLoadDFMValues;\r\n psDBQuery.BeforeLoadDFMValues;\r\n memQAI_Select.BeforeLoadDFMValues;\r\n psXMLResult.BeforeLoadDFMValues;\r\n memViewXML.BeforeLoadDFMValues;\r\n pnlFormCaption.BeforeLoadDFMValues;\r\n xdsfacilities.BeforeLoadDFMValues;\r\n xdsfacilitiesOriginalITEM.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmSettings';\r\n Width := 1383;\r\n Height := 5000;\r\n SetEvent(Self, 'OnClose', 'WebFormClose');\r\n SetEvent(Self, 'OnResize', 'WebFormResize');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n pnlFormButtons.SetParentComponent(Self);\r\n pnlFormButtons.Name := 'pnlFormButtons';\r\n pnlFormButtons.Left := 0;\r\n pnlFormButtons.Top := 4959;\r\n pnlFormButtons.Width := 1383;\r\n pnlFormButtons.Height := 41;\r\n pnlFormButtons.Align := alBottom;\r\n pnlFormButtons.BorderColor := clWhite;\r\n pnlFormButtons.BorderStyle := bsNone;\r\n pnlFormButtons.ChildOrder := 5;\r\n pnlFormButtons.Color := clWhite;\r\n pnlFormButtons.TabOrder := 0;\r\n btnPost.SetParentComponent(pnlFormButtons);\r\n btnPost.Name := 'btnPost';\r\n btnPost.Left := 1203;\r\n btnPost.Top := 0;\r\n btnPost.Width := 90;\r\n btnPost.Height := 41;\r\n btnPost.Cursor := crHandPoint;\r\n btnPost.Hint := 'Post';\r\n btnPost.Align := alRight;\r\n btnPost.Caption := '';\r\n btnPost.ChildOrder := 87;\r\n btnPost.Color := clNone;\r\n btnPost.ElementClassName := 'btn_icon';\r\n btnPost.Font.Charset := DEFAULT_CHARSET;\r\n btnPost.Font.Color := clGray;\r\n btnPost.Font.Height := -16;\r\n btnPost.Font.Name := 'Tahoma';\r\n btnPost.Font.Style := [];\r\n btnPost.HeightPercent := 100.000000000000000000;\r\n btnPost.MaterialGlyph := 'check';\r\n btnPost.MaterialGlyphSize := 1;\r\n btnPost.ParentFont := False;\r\n btnPost.ShowHint := True;\r\n btnPost.TabOrder := 6;\r\n btnPost.WidthPercent := 9.000000000000000000;\r\n SetEvent(btnPost, Self, 'OnClick', 'btnPostClick');\r\n btnCancel.SetParentComponent(pnlFormButtons);\r\n btnCancel.Name := 'btnCancel';\r\n btnCancel.Left := 1293;\r\n btnCancel.Top := 0;\r\n btnCancel.Width := 90;\r\n btnCancel.Height := 41;\r\n btnCancel.Cursor := crHandPoint;\r\n btnCancel.Hint := 'Cancel';\r\n btnCancel.Align := alRight;\r\n btnCancel.Caption := '';\r\n btnCancel.ChildOrder := 86;\r\n btnCancel.Color := clNone;\r\n btnCancel.ElementClassName := 'btn_icon';\r\n btnCancel.Font.Charset := DEFAULT_CHARSET;\r\n btnCancel.Font.Color := clGray;\r\n btnCancel.Font.Height := -16;\r\n btnCancel.Font.Name := 'Tahoma';\r\n btnCancel.Font.Style := [];\r\n btnCancel.HeightPercent := 100.000000000000000000;\r\n btnCancel.MaterialGlyph := 'close';\r\n btnCancel.MaterialGlyphSize := 1;\r\n btnCancel.ParentFont := False;\r\n btnCancel.ShowHint := True;\r\n btnCancel.TabOrder := 7;\r\n btnCancel.WidthPercent := 9.000000000000000000;\r\n SetEvent(btnCancel, Self, 'OnClick', 'btnCancelClick');\r\n pcSettings.SetParentComponent(Self);\r\n pcSettings.Name := 'pcSettings';\r\n pcSettings.Left := 0;\r\n pcSettings.Top := 41;\r\n pcSettings.Width := 1383;\r\n pcSettings.Height := 4918;\r\n pcSettings.Align := alClient;\r\n pcSettings.ChildOrder := 8;\r\n pcSettings.Font.Charset := DEFAULT_CHARSET;\r\n pcSettings.Font.Color := clWindowText;\r\n pcSettings.Font.Height := -16;\r\n pcSettings.Font.Name := 'Tahoma';\r\n pcSettings.Font.Style := [];\r\n pcSettings.TabIndex := 1;\r\n pcSettings.ParentFont := False;\r\n pcSettings.TabOrder := 1;\r\n SetEvent(pcSettings, Self, 'OnChange', 'pcSettingsChange');\r\n psGeneral.SetParentComponent(pcSettings);\r\n psGeneral.Name := 'psGeneral';\r\n psGeneral.Left := 0;\r\n psGeneral.Top := 20;\r\n psGeneral.Width := 1383;\r\n psGeneral.Height := 4898;\r\n psGeneral.Cursor := crIBeam;\r\n psGeneral.ElementClassName := 'BOX_NO_BORDER';\r\n psGeneral.Caption := 'General';\r\n psGeneral.Font.Charset := DEFAULT_CHARSET;\r\n psGeneral.Font.Color := clWindowText;\r\n psGeneral.Font.Height := -11;\r\n psGeneral.Font.Name := 'Tahoma';\r\n psGeneral.Font.Style := [];\r\n psGeneral.ParentFont := False;\r\n lblBlockDefaultWidth.SetParentComponent(psGeneral);\r\n lblBlockDefaultWidth.Name := 'lblBlockDefaultWidth';\r\n lblBlockDefaultWidth.Left := 135;\r\n lblBlockDefaultWidth.Top := 83;\r\n lblBlockDefaultWidth.Width := 93;\r\n lblBlockDefaultWidth.Height := 13;\r\n lblBlockDefaultWidth.Caption := 'Block Default Width';\r\n lblBlockDefaultWidth.ElementClassName := 'text_normal';\r\n lblBlockDefaultWidth.ElementFont := efCSS;\r\n lblBlockDefaultWidth.HeightPercent := 100.000000000000000000;\r\n lblBlockDefaultWidth.WidthPercent := 100.000000000000000000;\r\n WebLabel1.SetParentComponent(psGeneral);\r\n WebLabel1.Name := 'WebLabel1';\r\n WebLabel1.Left := 32;\r\n WebLabel1.Top := 297;\r\n WebLabel1.Width := 60;\r\n WebLabel1.Height := 13;\r\n WebLabel1.Caption := 'Date Format';\r\n WebLabel1.ElementClassName := 'text_normal';\r\n WebLabel1.ElementFont := efCSS;\r\n WebLabel1.HeightPercent := 100.000000000000000000;\r\n WebLabel1.WidthPercent := 100.000000000000000000;\r\n WebLabel2.SetParentComponent(psGeneral);\r\n WebLabel2.Name := 'WebLabel2';\r\n WebLabel2.Left := 32;\r\n WebLabel2.Top := 325;\r\n WebLabel2.Width := 59;\r\n WebLabel2.Height := 13;\r\n WebLabel2.Caption := 'Time Format';\r\n WebLabel2.ElementClassName := 'text_normal';\r\n WebLabel2.ElementFont := efCSS;\r\n WebLabel2.HeightPercent := 100.000000000000000000;\r\n WebLabel2.WidthPercent := 100.000000000000000000;\r\n WebLabel3.SetParentComponent(psGeneral);\r\n WebLabel3.Name := 'WebLabel3';\r\n WebLabel3.Left := 276;\r\n WebLabel3.Top := 340;\r\n WebLabel3.Width := 14;\r\n WebLabel3.Height := 13;\r\n WebLabel3.Caption := 'am';\r\n WebLabel3.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel3.Font.Color := clGray;\r\n WebLabel3.Font.Height := -11;\r\n WebLabel3.Font.Name := 'Tahoma';\r\n WebLabel3.Font.Style := [];\r\n WebLabel3.HeightPercent := 100.000000000000000000;\r\n WebLabel3.ParentFont := False;\r\n WebLabel3.WidthPercent := 100.000000000000000000;\r\n WebLabel4.SetParentComponent(psGeneral);\r\n WebLabel4.Name := 'WebLabel4';\r\n WebLabel4.Left := 318;\r\n WebLabel4.Top := 340;\r\n WebLabel4.Width := 14;\r\n WebLabel4.Height := 13;\r\n WebLabel4.Caption := 'pm';\r\n WebLabel4.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel4.Font.Color := clGray;\r\n WebLabel4.Font.Height := -11;\r\n WebLabel4.Font.Name := 'Tahoma';\r\n WebLabel4.Font.Style := [];\r\n WebLabel4.HeightPercent := 100.000000000000000000;\r\n WebLabel4.ParentFont := False;\r\n WebLabel4.WidthPercent := 100.000000000000000000;\r\n WebLabel5.SetParentComponent(psGeneral);\r\n WebLabel5.Name := 'WebLabel5';\r\n WebLabel5.Left := 32;\r\n WebLabel5.Top := 32;\r\n WebLabel5.Width := 98;\r\n WebLabel5.Height := 13;\r\n WebLabel5.Caption := 'Form Data Blocks';\r\n WebLabel5.ElementClassName := 'text_normal_bold';\r\n WebLabel5.ElementFont := efCSS;\r\n WebLabel5.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel5.Font.Color := clWindowText;\r\n WebLabel5.Font.Height := -11;\r\n WebLabel5.Font.Name := 'Tahoma';\r\n WebLabel5.Font.Style := [fsBold];\r\n WebLabel5.HeightPercent := 100.000000000000000000;\r\n WebLabel5.ParentFont := False;\r\n WebLabel5.WidthPercent := 100.000000000000000000;\r\n lblColumns.SetParentComponent(psGeneral);\r\n lblColumns.Name := 'lblColumns';\r\n lblColumns.Left := 188;\r\n lblColumns.Top := 54;\r\n lblColumns.Width := 40;\r\n lblColumns.Height := 13;\r\n lblColumns.Caption := 'Columns';\r\n lblColumns.ElementClassName := 'text_normal';\r\n lblColumns.ElementFont := efCSS;\r\n lblColumns.HeightPercent := 100.000000000000000000;\r\n lblColumns.WidthPercent := 100.000000000000000000;\r\n WebLabel15.SetParentComponent(psGeneral);\r\n WebLabel15.Name := 'WebLabel15';\r\n WebLabel15.Left := 135;\r\n WebLabel15.Top := 109;\r\n WebLabel15.Width := 96;\r\n WebLabel15.Height := 13;\r\n WebLabel15.Caption := 'Block Default Height';\r\n WebLabel15.ElementClassName := 'text_normal';\r\n WebLabel15.ElementFont := efCSS;\r\n WebLabel15.HeightPercent := 100.000000000000000000;\r\n WebLabel15.WidthPercent := 100.000000000000000000;\r\n WebLabel25.SetParentComponent(psGeneral);\r\n WebLabel25.Name := 'WebLabel25';\r\n WebLabel25.Left := 415;\r\n WebLabel25.Top := 28;\r\n WebLabel25.Width := 65;\r\n WebLabel25.Height := 13;\r\n WebLabel25.Caption := 'Screen Size';\r\n WebLabel25.ElementClassName := 'text_normal_bold';\r\n WebLabel25.ElementFont := efCSS;\r\n WebLabel25.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel25.Font.Color := clWindowText;\r\n WebLabel25.Font.Height := -11;\r\n WebLabel25.Font.Name := 'Tahoma';\r\n WebLabel25.Font.Style := [fsBold];\r\n WebLabel25.HeightPercent := 100.000000000000000000;\r\n WebLabel25.ParentFont := False;\r\n WebLabel25.WidthPercent := 100.000000000000000000;\r\n WebLabel26.SetParentComponent(psGeneral);\r\n WebLabel26.Name := 'WebLabel26';\r\n WebLabel26.Left := 479;\r\n WebLabel26.Top := 83;\r\n WebLabel26.Width := 10;\r\n WebLabel26.Height := 13;\r\n WebLabel26.Caption := ' - ';\r\n WebLabel26.ElementClassName := 'text_normal';\r\n WebLabel26.ElementFont := efCSS;\r\n WebLabel26.HeightPercent := 100.000000000000000000;\r\n WebLabel26.WidthPercent := 100.000000000000000000;\r\n WebLabel27.SetParentComponent(psGeneral);\r\n WebLabel27.Name := 'WebLabel27';\r\n WebLabel27.Left := 566;\r\n WebLabel27.Top := 83;\r\n WebLabel27.Width := 27;\r\n WebLabel27.Height := 13;\r\n WebLabel27.Caption := 'Large';\r\n WebLabel27.ElementClassName := 'text_normal';\r\n WebLabel27.ElementFont := efCSS;\r\n WebLabel27.HeightPercent := 100.000000000000000000;\r\n WebLabel27.WidthPercent := 100.000000000000000000;\r\n WebLabel28.SetParentComponent(psGeneral);\r\n WebLabel28.Name := 'WebLabel28';\r\n WebLabel28.Left := 479;\r\n WebLabel28.Top := 113;\r\n WebLabel28.Width := 10;\r\n WebLabel28.Height := 13;\r\n WebLabel28.Caption := ' - ';\r\n WebLabel28.ElementClassName := 'text_normal';\r\n WebLabel28.ElementFont := efCSS;\r\n WebLabel28.HeightPercent := 100.000000000000000000;\r\n WebLabel28.WidthPercent := 100.000000000000000000;\r\n WebLabel29.SetParentComponent(psGeneral);\r\n WebLabel29.Name := 'WebLabel29';\r\n WebLabel29.Left := 566;\r\n WebLabel29.Top := 111;\r\n WebLabel29.Width := 36;\r\n WebLabel29.Height := 13;\r\n WebLabel29.Caption := 'Medium';\r\n WebLabel29.ElementClassName := 'text_normal';\r\n WebLabel29.ElementFont := efCSS;\r\n WebLabel29.HeightPercent := 100.000000000000000000;\r\n WebLabel29.WidthPercent := 100.000000000000000000;\r\n WebLabel30.SetParentComponent(psGeneral);\r\n WebLabel30.Name := 'WebLabel30';\r\n WebLabel30.Left := 479;\r\n WebLabel30.Top := 137;\r\n WebLabel30.Width := 10;\r\n WebLabel30.Height := 13;\r\n WebLabel30.Caption := ' - ';\r\n WebLabel30.ElementClassName := 'text_normal';\r\n WebLabel30.ElementFont := efCSS;\r\n WebLabel30.HeightPercent := 100.000000000000000000;\r\n WebLabel30.WidthPercent := 100.000000000000000000;\r\n WebLabel31.SetParentComponent(psGeneral);\r\n WebLabel31.Name := 'WebLabel31';\r\n WebLabel31.Left := 566;\r\n WebLabel31.Top := 137;\r\n WebLabel31.Width := 24;\r\n WebLabel31.Height := 13;\r\n WebLabel31.Caption := 'Small';\r\n WebLabel31.ElementClassName := 'text_normal';\r\n WebLabel31.ElementFont := efCSS;\r\n WebLabel31.HeightPercent := 100.000000000000000000;\r\n WebLabel31.WidthPercent := 100.000000000000000000;\r\n WebLabel32.SetParentComponent(psGeneral);\r\n WebLabel32.Name := 'WebLabel32';\r\n WebLabel32.Left := 416;\r\n WebLabel32.Top := 56;\r\n WebLabel32.Width := 28;\r\n WebLabel32.Height := 13;\r\n WebLabel32.Caption := 'Width';\r\n WebLabel32.ElementClassName := 'text_normal';\r\n WebLabel32.ElementFont := efCSS;\r\n WebLabel32.HeightPercent := 100.000000000000000000;\r\n WebLabel32.WidthPercent := 100.000000000000000000;\r\n WebLabel33.SetParentComponent(psGeneral);\r\n WebLabel33.Name := 'WebLabel33';\r\n WebLabel33.Left := 495;\r\n WebLabel33.Top := 56;\r\n WebLabel33.Width := 31;\r\n WebLabel33.Height := 13;\r\n WebLabel33.Caption := 'Height';\r\n WebLabel33.ElementClassName := 'text_normal';\r\n WebLabel33.ElementFont := efCSS;\r\n WebLabel33.HeightPercent := 100.000000000000000000;\r\n WebLabel33.WidthPercent := 100.000000000000000000;\r\n WebLabel36.SetParentComponent(psGeneral);\r\n WebLabel36.Name := 'WebLabel36';\r\n WebLabel36.Left := 32;\r\n WebLabel36.Top := 376;\r\n WebLabel36.Width := 70;\r\n WebLabel36.Height := 13;\r\n WebLabel36.Caption := 'Voice Control: ';\r\n WebLabel36.ElementClassName := 'text_normal';\r\n WebLabel36.ElementFont := efCSS;\r\n WebLabel36.HeightPercent := 100.000000000000000000;\r\n WebLabel36.WidthPercent := 100.000000000000000000;\r\n seFormColumns.SetParentComponent(psGeneral);\r\n seFormColumns.Name := 'seFormColumns';\r\n seFormColumns.Left := 249;\r\n seFormColumns.Top := 50;\r\n seFormColumns.Width := 57;\r\n seFormColumns.Height := 25;\r\n seFormColumns.Cursor := crIBeam;\r\n seFormColumns.ElementClassName := 'box_bottomborder_font_normal';\r\n seFormColumns.Align := alCustom;\r\n seFormColumns.AutoSize := False;\r\n seFormColumns.BorderStyle := bsSingle;\r\n seFormColumns.ChildOrder := 5;\r\n seFormColumns.Color := clWhite;\r\n seFormColumns.ElementFont := efCSS;\r\n seFormColumns.Font.Charset := DEFAULT_CHARSET;\r\n seFormColumns.Font.Color := clWindowText;\r\n seFormColumns.Font.Height := -16;\r\n seFormColumns.Font.Name := 'Tahoma';\r\n seFormColumns.Font.Style := [];\r\n seFormColumns.Increment := 1;\r\n seFormColumns.MaxValue := 100;\r\n seFormColumns.MinValue := 0;\r\n seFormColumns.ParentFont := False;\r\n seFormColumns.Role := '';\r\n seFormColumns.Value := 0;\r\n cbShowHiddenBlocksInDesign.SetParentComponent(psGeneral);\r\n cbShowHiddenBlocksInDesign.Name := 'cbShowHiddenBlocksInDesign';\r\n cbShowHiddenBlocksInDesign.Left := 32;\r\n cbShowHiddenBlocksInDesign.Top := 136;\r\n cbShowHiddenBlocksInDesign.Width := 326;\r\n cbShowHiddenBlocksInDesign.Height := 22;\r\n cbShowHiddenBlocksInDesign.Cursor := crHandPoint;\r\n cbShowHiddenBlocksInDesign.Caption := 'Show Hidden Items in Design';\r\n cbShowHiddenBlocksInDesign.Checked := True;\r\n cbShowHiddenBlocksInDesign.ChildOrder := 2;\r\n cbShowHiddenBlocksInDesign.ElementLabelClassName := 'text_normal';\r\n cbShowHiddenBlocksInDesign.ElementFont := efCSS;\r\n cbShowHiddenBlocksInDesign.HeightPercent := 100.000000000000000000;\r\n cbShowHiddenBlocksInDesign.State := cbChecked;\r\n cbShowHiddenBlocksInDesign.WidthPercent := 100.000000000000000000;\r\n cbFormColumnsAuto.SetParentComponent(psGeneral);\r\n cbFormColumnsAuto.Name := 'cbFormColumnsAuto';\r\n cbFormColumnsAuto.Left := 32;\r\n cbFormColumnsAuto.Top := 53;\r\n cbFormColumnsAuto.Width := 150;\r\n cbFormColumnsAuto.Height := 17;\r\n cbFormColumnsAuto.Cursor := crHandPoint;\r\n cbFormColumnsAuto.Caption := 'Variable Block Width';\r\n cbFormColumnsAuto.ChildOrder := 3;\r\n cbFormColumnsAuto.ElementLabelClassName := 'text_normal';\r\n cbFormColumnsAuto.ElementFont := efCSS;\r\n cbFormColumnsAuto.HeightPercent := 100.000000000000000000;\r\n cbFormColumnsAuto.WidthPercent := 100.000000000000000000;\r\n SetEvent(cbFormColumnsAuto, Self, 'OnClick', 'cbFormColumnsAutoClick');\r\n seBlockDefaultWidth.SetParentComponent(psGeneral);\r\n seBlockDefaultWidth.Name := 'seBlockDefaultWidth';\r\n seBlockDefaultWidth.Left := 248;\r\n seBlockDefaultWidth.Top := 78;\r\n seBlockDefaultWidth.Width := 110;\r\n seBlockDefaultWidth.Height := 25;\r\n seBlockDefaultWidth.Cursor := crIBeam;\r\n seBlockDefaultWidth.ElementClassName := 'box_bottomborder_font_normal';\r\n seBlockDefaultWidth.Align := alCustom;\r\n seBlockDefaultWidth.AutoSize := False;\r\n seBlockDefaultWidth.BorderStyle := bsSingle;\r\n seBlockDefaultWidth.ChildOrder := 5;\r\n seBlockDefaultWidth.Color := 16185849;\r\n seBlockDefaultWidth.ElementFont := efCSS;\r\n seBlockDefaultWidth.Font.Charset := DEFAULT_CHARSET;\r\n seBlockDefaultWidth.Font.Color := clWindowText;\r\n seBlockDefaultWidth.Font.Height := -16;\r\n seBlockDefaultWidth.Font.Name := 'Tahoma';\r\n seBlockDefaultWidth.Font.Style := [];\r\n seBlockDefaultWidth.Increment := 10;\r\n seBlockDefaultWidth.MaxValue := 3000;\r\n seBlockDefaultWidth.MinValue := 50;\r\n seBlockDefaultWidth.ParentFont := False;\r\n seBlockDefaultWidth.Role := '';\r\n seBlockDefaultWidth.Value := 1;\r\n cbShowCommonPicklist.SetParentComponent(psGeneral);\r\n cbShowCommonPicklist.Name := 'cbShowCommonPicklist';\r\n cbShowCommonPicklist.Left := 32;\r\n cbShowCommonPicklist.Top := 180;\r\n cbShowCommonPicklist.Width := 313;\r\n cbShowCommonPicklist.Height := 22;\r\n cbShowCommonPicklist.Cursor := crHandPoint;\r\n cbShowCommonPicklist.Caption := 'Show Common Picklist';\r\n cbShowCommonPicklist.Checked := True;\r\n cbShowCommonPicklist.ChildOrder := 2;\r\n cbShowCommonPicklist.ElementLabelClassName := 'text_normal';\r\n cbShowCommonPicklist.ElementFont := efCSS;\r\n cbShowCommonPicklist.HeightPercent := 100.000000000000000000;\r\n cbShowCommonPicklist.State := cbChecked;\r\n cbShowCommonPicklist.WidthPercent := 100.000000000000000000;\r\n cbMainMenuTitles.SetParentComponent(psGeneral);\r\n cbMainMenuTitles.Name := 'cbMainMenuTitles';\r\n cbMainMenuTitles.Left := 32;\r\n cbMainMenuTitles.Top := 203;\r\n cbMainMenuTitles.Width := 313;\r\n cbMainMenuTitles.Height := 22;\r\n cbMainMenuTitles.Cursor := crHandPoint;\r\n cbMainMenuTitles.Caption := 'Main Menu Titles';\r\n cbMainMenuTitles.Checked := True;\r\n cbMainMenuTitles.ChildOrder := 2;\r\n cbMainMenuTitles.ElementLabelClassName := 'text_normal';\r\n cbMainMenuTitles.ElementFont := efCSS;\r\n cbMainMenuTitles.HeightPercent := 100.000000000000000000;\r\n cbMainMenuTitles.State := cbChecked;\r\n cbMainMenuTitles.WidthPercent := 100.000000000000000000;\r\n edtDateFormat.SetParentComponent(psGeneral);\r\n edtDateFormat.Name := 'edtDateFormat';\r\n edtDateFormat.Left := 116;\r\n edtDateFormat.Top := 294;\r\n edtDateFormat.Width := 156;\r\n edtDateFormat.Height := 22;\r\n edtDateFormat.Cursor := crIBeam;\r\n edtDateFormat.ChildOrder := 10;\r\n edtDateFormat.ElementClassName := 'box_bottomborder_font_normal';\r\n edtDateFormat.ElementFont := efCSS;\r\n edtDateFormat.HeightPercent := 100.000000000000000000;\r\n edtDateFormat.WidthPercent := 100.000000000000000000;\r\n edtTimeFormat.SetParentComponent(psGeneral);\r\n edtTimeFormat.Name := 'edtTimeFormat';\r\n edtTimeFormat.Left := 116;\r\n edtTimeFormat.Top := 322;\r\n edtTimeFormat.Width := 156;\r\n edtTimeFormat.Height := 22;\r\n edtTimeFormat.Cursor := crIBeam;\r\n edtTimeFormat.ChildOrder := 11;\r\n edtTimeFormat.ElementClassName := 'box_bottomborder_font_normal';\r\n edtTimeFormat.ElementFont := efCSS;\r\n edtTimeFormat.HeightPercent := 100.000000000000000000;\r\n edtTimeFormat.WidthPercent := 100.000000000000000000;\r\n edtTimeAM.SetParentComponent(psGeneral);\r\n edtTimeAM.Name := 'edtTimeAM';\r\n edtTimeAM.Left := 275;\r\n edtTimeAM.Top := 322;\r\n edtTimeAM.Width := 40;\r\n edtTimeAM.Height := 22;\r\n edtTimeAM.Cursor := crIBeam;\r\n edtTimeAM.ChildOrder := 10;\r\n edtTimeAM.ElementClassName := 'box_bottomborder_font_normal';\r\n edtTimeAM.ElementFont := efCSS;\r\n edtTimeAM.HeightPercent := 100.000000000000000000;\r\n edtTimeAM.WidthPercent := 100.000000000000000000;\r\n edtTimePM.SetParentComponent(psGeneral);\r\n edtTimePM.Name := 'edtTimePM';\r\n edtTimePM.Left := 318;\r\n edtTimePM.Top := 322;\r\n edtTimePM.Width := 40;\r\n edtTimePM.Height := 22;\r\n edtTimePM.Cursor := crIBeam;\r\n edtTimePM.ChildOrder := 11;\r\n edtTimePM.ElementClassName := 'box_bottomborder_font_normal';\r\n edtTimePM.ElementFont := efCSS;\r\n edtTimePM.HeightPercent := 100.000000000000000000;\r\n edtTimePM.WidthPercent := 100.000000000000000000;\r\n WebMemo3.SetParentComponent(psGeneral);\r\n WebMemo3.Name := 'WebMemo3';\r\n WebMemo3.Left := 416;\r\n WebMemo3.Top := 294;\r\n WebMemo3.Width := 327;\r\n WebMemo3.Height := 110;\r\n WebMemo3.BorderStyle := bsNone;\r\n WebMemo3.Font.Charset := ANSI_CHARSET;\r\n WebMemo3.Font.Color := clWindowText;\r\n WebMemo3.Font.Height := -16;\r\n WebMemo3.Font.Name := 'Courier New';\r\n WebMemo3.Font.Style := [];\r\n WebMemo3.HeightPercent := 100.000000000000000000;\r\n WebMemo3.Lines.BeginUpdate;\r\n try\r\n WebMemo3.Lines.Clear;\r\n WebMemo3.Lines.Add('c - Displays the date ');\r\n WebMemo3.Lines.Add('using the format given by the ');\r\n WebMemo3.Lines.Add('ShortDateFormat global variable, ');\r\n WebMemo3.Lines.Add('followed by the time using the ');\r\n WebMemo3.Lines.Add('format given by the ');\r\n WebMemo3.Lines.Add('LongTimeFormat global variable. ');\r\n WebMemo3.Lines.Add('The time is not displayed if the ');\r\n WebMemo3.Lines.Add('date-time value indicates ');\r\n WebMemo3.Lines.Add('midnight precisely.');\r\n WebMemo3.Lines.Add('d - Displays the day as ');\r\n WebMemo3.Lines.Add('a number without a leading zero ');\r\n WebMemo3.Lines.Add('(1-31).');\r\n WebMemo3.Lines.Add('dd - Displays the day as ');\r\n WebMemo3.Lines.Add('a number with a leading zero ');\r\n WebMemo3.Lines.Add('(01-31).');\r\n WebMemo3.Lines.Add('ddd - Displays the day as ');\r\n WebMemo3.Lines.Add('an abbreviation (Sun-Sat) using ');\r\n WebMemo3.Lines.Add('the strings given by the ');\r\n WebMemo3.Lines.Add('ShortDayNames global variable.');\r\n WebMemo3.Lines.Add('dddd - Displays the day as ');\r\n WebMemo3.Lines.Add('a full name (Sunday-Saturday) ');\r\n WebMemo3.Lines.Add('using the strings given by the ');\r\n WebMemo3.Lines.Add('LongDayNames global variable.');\r\n WebMemo3.Lines.Add('ddddd - Displays the date ');\r\n WebMemo3.Lines.Add('using the format given by the ');\r\n WebMemo3.Lines.Add('ShortDateFormat global variable.');\r\n WebMemo3.Lines.Add('dddddd - Displays the date ');\r\n WebMemo3.Lines.Add('using the format given by the ');\r\n WebMemo3.Lines.Add('LongDateFormat global variable.');\r\n WebMemo3.Lines.Add('e - (Windows only) ');\r\n WebMemo3.Lines.Add('Displays the year in the current ');\r\n WebMemo3.Lines.Add('period/era as a number without a ');\r\n WebMemo3.Lines.Add('leading zero (Japanese, Korean, ');\r\n WebMemo3.Lines.Add('and Taiwanese locales only).');\r\n WebMemo3.Lines.Add('ee - (Windows only) ');\r\n WebMemo3.Lines.Add('Displays the year in the current ');\r\n WebMemo3.Lines.Add('period/era as a number with a ');\r\n WebMemo3.Lines.Add('leading zero (Japanese, Korean, ');\r\n WebMemo3.Lines.Add('and Taiwanese locales only).');\r\n WebMemo3.Lines.Add('g - (Windows only) ');\r\n WebMemo3.Lines.Add('Displays the period/era as an ');\r\n WebMemo3.Lines.Add('abbreviation (Japanese and ');\r\n WebMemo3.Lines.Add('Taiwanese locales only).');\r\n WebMemo3.Lines.Add('gg - (Windows only) ');\r\n WebMemo3.Lines.Add('Displays the period/era as a ');\r\n WebMemo3.Lines.Add('full name (Japanese and ');\r\n WebMemo3.Lines.Add('Taiwanese locales only).');\r\n WebMemo3.Lines.Add('m - Displays the month ');\r\n WebMemo3.Lines.Add('as a number without a leading ');\r\n WebMemo3.Lines.Add('zero (1-12). If the m specifier ');\r\n WebMemo3.Lines.Add('immediately follows an h or hh ');\r\n WebMemo3.Lines.Add('specifier, the minute rather ');\r\n WebMemo3.Lines.Add('than the month is displayed.');\r\n WebMemo3.Lines.Add('mm - Displays the month ');\r\n WebMemo3.Lines.Add('as a number with a leading zero ');\r\n WebMemo3.Lines.Add('(01-12). If the mm specifier ');\r\n WebMemo3.Lines.Add('immediately follows an h or hh ');\r\n WebMemo3.Lines.Add('specifier, the minute rather ');\r\n WebMemo3.Lines.Add('than the month is displayed.');\r\n WebMemo3.Lines.Add('mmm - Displays the month ');\r\n WebMemo3.Lines.Add('as an abbreviation (Jan-Dec) ');\r\n WebMemo3.Lines.Add('using the strings given by the ');\r\n WebMemo3.Lines.Add('ShortMonthNames global variable.');\r\n WebMemo3.Lines.Add('mmmm - Displays the month ');\r\n WebMemo3.Lines.Add('as a full name (January-');\r\n WebMemo3.Lines.Add('December) using the strings ');\r\n WebMemo3.Lines.Add('given by the LongMonthNames ');\r\n WebMemo3.Lines.Add('global variable.');\r\n WebMemo3.Lines.Add('yy - Displays the year as ');\r\n WebMemo3.Lines.Add('a two-digit number (00-99).');\r\n WebMemo3.Lines.Add('yyyy - Displays the year as ');\r\n WebMemo3.Lines.Add('a four-digit number (0000-9999).');\r\n WebMemo3.Lines.Add('h - Displays the hour ');\r\n WebMemo3.Lines.Add('without a leading zero (0-23).');\r\n WebMemo3.Lines.Add('hh - Displays the hour ');\r\n WebMemo3.Lines.Add('with a leading zero (00-23).');\r\n WebMemo3.Lines.Add('n - Displays the minute ');\r\n WebMemo3.Lines.Add('without a leading zero (0-59).');\r\n WebMemo3.Lines.Add('nn - Displays the minute ');\r\n WebMemo3.Lines.Add('with a leading zero (00-59).');\r\n WebMemo3.Lines.Add('s - Displays the second ');\r\n WebMemo3.Lines.Add('without a leading zero (0-59).');\r\n WebMemo3.Lines.Add('ss - Displays the second ');\r\n WebMemo3.Lines.Add('with a leading zero (00-59).');\r\n WebMemo3.Lines.Add('z - Displays the ');\r\n WebMemo3.Lines.Add('millisecond without a leading ');\r\n WebMemo3.Lines.Add('zero (0-999).');\r\n WebMemo3.Lines.Add('zzz - Displays the ');\r\n WebMemo3.Lines.Add('millisecond with a leading zero ');\r\n WebMemo3.Lines.Add('(000-999).');\r\n WebMemo3.Lines.Add('t - Displays the time ');\r\n WebMemo3.Lines.Add('using the format given by the ');\r\n WebMemo3.Lines.Add('ShortTimeFormat global variable.');\r\n WebMemo3.Lines.Add('tt - Displays the time ');\r\n WebMemo3.Lines.Add('using the format given by the ');\r\n WebMemo3.Lines.Add('LongTimeFormat global variable.');\r\n WebMemo3.Lines.Add('am/pm - Uses the 12-hour ');\r\n WebMemo3.Lines.Add('clock for the preceding h or hh ');\r\n WebMemo3.Lines.Add('specifier, and displays '#39'am'#39' for ');\r\n WebMemo3.Lines.Add('any hour before noon, and '#39'pm'#39' ');\r\n WebMemo3.Lines.Add('for any hour after noon. The ');\r\n WebMemo3.Lines.Add('am/pm specifier can use lower, ');\r\n WebMemo3.Lines.Add('upper, or mixed case, and the ');\r\n WebMemo3.Lines.Add('result is displayed accordingly.');\r\n WebMemo3.Lines.Add('a/p - Uses the 12-hour ');\r\n WebMemo3.Lines.Add('clock for the preceding h or hh ');\r\n WebMemo3.Lines.Add('specifier, and displays '#39'a'#39' for ');\r\n WebMemo3.Lines.Add('any hour before noon, and '#39'p'#39' ');\r\n WebMemo3.Lines.Add('for any hour after noon. The a/p ');\r\n WebMemo3.Lines.Add('specifier can use lower, upper, ');\r\n WebMemo3.Lines.Add('or mixed case, and the result is ');\r\n WebMemo3.Lines.Add('displayed accordingly.');\r\n WebMemo3.Lines.Add('ampm - Uses the 12-hour ');\r\n WebMemo3.Lines.Add('clock for the preceding h or hh ');\r\n WebMemo3.Lines.Add('specifier, and displays the ');\r\n WebMemo3.Lines.Add('contents of the TimeAMString ');\r\n WebMemo3.Lines.Add('global variable for any hour ');\r\n WebMemo3.Lines.Add('before noon, and the contents of ');\r\n WebMemo3.Lines.Add('the TimePMString global variable ');\r\n WebMemo3.Lines.Add('for any hour after noon.');\r\n WebMemo3.Lines.Add('/ - Displays the date ');\r\n WebMemo3.Lines.Add('separator character given by the ');\r\n WebMemo3.Lines.Add('DateSeparator global variable.');\r\n WebMemo3.Lines.Add(': - Displays the time ');\r\n WebMemo3.Lines.Add('separator character given by the ');\r\n WebMemo3.Lines.Add('TimeSeparator global variable.');\r\n WebMemo3.Lines.Add(#39'xx'#39'/\"xx\" - Characters enclosed ');\r\n WebMemo3.Lines.Add('in single or double quotation ');\r\n WebMemo3.Lines.Add('marks are displayed as such, and ');\r\n WebMemo3.Lines.Add('do not affect formatting.');\r\n finally\r\n WebMemo3.Lines.EndUpdate;\r\n end;\r\n WebMemo3.ParentFont := False;\r\n WebMemo3.SelLength := 0;\r\n WebMemo3.SelStart := 3849;\r\n WebMemo3.ShowFocus := False;\r\n WebMemo3.WidthPercent := 100.000000000000000000;\r\n seBlockDefaultHeight.SetParentComponent(psGeneral);\r\n seBlockDefaultHeight.Name := 'seBlockDefaultHeight';\r\n seBlockDefaultHeight.Left := 248;\r\n seBlockDefaultHeight.Top := 104;\r\n seBlockDefaultHeight.Width := 110;\r\n seBlockDefaultHeight.Height := 25;\r\n seBlockDefaultHeight.Cursor := crIBeam;\r\n seBlockDefaultHeight.ElementClassName := 'box_bottomborder_font_normal';\r\n seBlockDefaultHeight.Align := alCustom;\r\n seBlockDefaultHeight.AutoSize := False;\r\n seBlockDefaultHeight.BorderStyle := bsSingle;\r\n seBlockDefaultHeight.ChildOrder := 5;\r\n seBlockDefaultHeight.Color := 16185849;\r\n seBlockDefaultHeight.ElementFont := efCSS;\r\n seBlockDefaultHeight.Font.Charset := DEFAULT_CHARSET;\r\n seBlockDefaultHeight.Font.Color := clWindowText;\r\n seBlockDefaultHeight.Font.Height := -16;\r\n seBlockDefaultHeight.Font.Name := 'Tahoma';\r\n seBlockDefaultHeight.Font.Style := [];\r\n seBlockDefaultHeight.Increment := 10;\r\n seBlockDefaultHeight.MaxValue := 3000;\r\n seBlockDefaultHeight.MinValue := 50;\r\n seBlockDefaultHeight.ParentFont := False;\r\n seBlockDefaultHeight.Role := '';\r\n seBlockDefaultHeight.Value := 1;\r\n cbAutosaveDesigndata.SetParentComponent(psGeneral);\r\n cbAutosaveDesigndata.Name := 'cbAutosaveDesigndata';\r\n cbAutosaveDesigndata.Left := 32;\r\n cbAutosaveDesigndata.Top := 158;\r\n cbAutosaveDesigndata.Width := 326;\r\n cbAutosaveDesigndata.Height := 22;\r\n cbAutosaveDesigndata.Cursor := crHandPoint;\r\n cbAutosaveDesigndata.Caption := 'Autosave when Switching Design Mode';\r\n cbAutosaveDesigndata.Checked := True;\r\n cbAutosaveDesigndata.ChildOrder := 2;\r\n cbAutosaveDesigndata.ElementLabelClassName := 'text_normal';\r\n cbAutosaveDesigndata.ElementFont := efCSS;\r\n cbAutosaveDesigndata.HeightPercent := 100.000000000000000000;\r\n cbAutosaveDesigndata.State := cbChecked;\r\n cbAutosaveDesigndata.WidthPercent := 100.000000000000000000;\r\n cbNoHorizontalLineUp.SetParentComponent(psGeneral);\r\n cbNoHorizontalLineUp.Name := 'cbNoHorizontalLineUp';\r\n cbNoHorizontalLineUp.Left := 32;\r\n cbNoHorizontalLineUp.Top := 225;\r\n cbNoHorizontalLineUp.Width := 313;\r\n cbNoHorizontalLineUp.Height := 22;\r\n cbNoHorizontalLineUp.Cursor := crHandPoint;\r\n cbNoHorizontalLineUp.Caption := 'No Hirizontal Line Up for Data Blocks';\r\n cbNoHorizontalLineUp.Checked := True;\r\n cbNoHorizontalLineUp.ChildOrder := 2;\r\n cbNoHorizontalLineUp.ElementLabelClassName := 'text_normal';\r\n cbNoHorizontalLineUp.ElementFont := efCSS;\r\n cbNoHorizontalLineUp.HeightPercent := 100.000000000000000000;\r\n cbNoHorizontalLineUp.State := cbChecked;\r\n cbNoHorizontalLineUp.WidthPercent := 100.000000000000000000;\r\n seScreenBigW.SetParentComponent(psGeneral);\r\n seScreenBigW.Name := 'seScreenBigW';\r\n seScreenBigW.Left := 416;\r\n seScreenBigW.Top := 75;\r\n seScreenBigW.Width := 57;\r\n seScreenBigW.Height := 25;\r\n seScreenBigW.Cursor := crIBeam;\r\n seScreenBigW.ElementClassName := 'box_bottomborder_font_normal';\r\n seScreenBigW.Align := alCustom;\r\n seScreenBigW.AutoSize := False;\r\n seScreenBigW.BorderStyle := bsSingle;\r\n seScreenBigW.ChildOrder := 5;\r\n seScreenBigW.Color := clWhite;\r\n seScreenBigW.ElementFont := efCSS;\r\n seScreenBigW.Font.Charset := DEFAULT_CHARSET;\r\n seScreenBigW.Font.Color := clWindowText;\r\n seScreenBigW.Font.Height := -16;\r\n seScreenBigW.Font.Name := 'Tahoma';\r\n seScreenBigW.Font.Style := [];\r\n seScreenBigW.Increment := 1;\r\n seScreenBigW.MaxValue := 10000;\r\n seScreenBigW.MinValue := 0;\r\n seScreenBigW.ParentFont := False;\r\n seScreenBigW.Role := '';\r\n seScreenBigW.Value := 0;\r\n seScreenBigH.SetParentComponent(psGeneral);\r\n seScreenBigH.Name := 'seScreenBigH';\r\n seScreenBigH.Left := 495;\r\n seScreenBigH.Top := 75;\r\n seScreenBigH.Width := 57;\r\n seScreenBigH.Height := 25;\r\n seScreenBigH.Cursor := crIBeam;\r\n seScreenBigH.ElementClassName := 'box_bottomborder_font_normal';\r\n seScreenBigH.Align := alCustom;\r\n seScreenBigH.AutoSize := False;\r\n seScreenBigH.BorderStyle := bsSingle;\r\n seScreenBigH.ChildOrder := 5;\r\n seScreenBigH.Color := clWhite;\r\n seScreenBigH.ElementFont := efCSS;\r\n seScreenBigH.Font.Charset := DEFAULT_CHARSET;\r\n seScreenBigH.Font.Color := clWindowText;\r\n seScreenBigH.Font.Height := -16;\r\n seScreenBigH.Font.Name := 'Tahoma';\r\n seScreenBigH.Font.Style := [];\r\n seScreenBigH.Increment := 1;\r\n seScreenBigH.MaxValue := 10000;\r\n seScreenBigH.MinValue := 0;\r\n seScreenBigH.ParentFont := False;\r\n seScreenBigH.Role := '';\r\n seScreenBigH.Value := 0;\r\n seScreenMediumW.SetParentComponent(psGeneral);\r\n seScreenMediumW.Name := 'seScreenMediumW';\r\n seScreenMediumW.Left := 416;\r\n seScreenMediumW.Top := 103;\r\n seScreenMediumW.Width := 57;\r\n seScreenMediumW.Height := 25;\r\n seScreenMediumW.Cursor := crIBeam;\r\n seScreenMediumW.ElementClassName := 'box_bottomborder_font_normal';\r\n seScreenMediumW.Align := alCustom;\r\n seScreenMediumW.AutoSize := False;\r\n seScreenMediumW.BorderStyle := bsSingle;\r\n seScreenMediumW.ChildOrder := 5;\r\n seScreenMediumW.Color := clWhite;\r\n seScreenMediumW.ElementFont := efCSS;\r\n seScreenMediumW.Font.Charset := DEFAULT_CHARSET;\r\n seScreenMediumW.Font.Color := clWindowText;\r\n seScreenMediumW.Font.Height := -16;\r\n seScreenMediumW.Font.Name := 'Tahoma';\r\n seScreenMediumW.Font.Style := [];\r\n seScreenMediumW.Increment := 1;\r\n seScreenMediumW.MaxValue := 10000;\r\n seScreenMediumW.MinValue := 0;\r\n seScreenMediumW.ParentFont := False;\r\n seScreenMediumW.Role := '';\r\n seScreenMediumW.Value := 0;\r\n seScreenMediumH.SetParentComponent(psGeneral);\r\n seScreenMediumH.Name := 'seScreenMediumH';\r\n seScreenMediumH.Left := 495;\r\n seScreenMediumH.Top := 103;\r\n seScreenMediumH.Width := 57;\r\n seScreenMediumH.Height := 25;\r\n seScreenMediumH.Cursor := crIBeam;\r\n seScreenMediumH.ElementClassName := 'box_bottomborder_font_normal';\r\n seScreenMediumH.Align := alCustom;\r\n seScreenMediumH.AutoSize := False;\r\n seScreenMediumH.BorderStyle := bsSingle;\r\n seScreenMediumH.ChildOrder := 5;\r\n seScreenMediumH.Color := clWhite;\r\n seScreenMediumH.ElementFont := efCSS;\r\n seScreenMediumH.Font.Charset := DEFAULT_CHARSET;\r\n seScreenMediumH.Font.Color := clWindowText;\r\n seScreenMediumH.Font.Height := -16;\r\n seScreenMediumH.Font.Name := 'Tahoma';\r\n seScreenMediumH.Font.Style := [];\r\n seScreenMediumH.Increment := 1;\r\n seScreenMediumH.MaxValue := 10000;\r\n seScreenMediumH.MinValue := 0;\r\n seScreenMediumH.ParentFont := False;\r\n seScreenMediumH.Role := '';\r\n seScreenMediumH.Value := 0;\r\n seScreenSmallW.SetParentComponent(psGeneral);\r\n seScreenSmallW.Name := 'seScreenSmallW';\r\n seScreenSmallW.Left := 416;\r\n seScreenSmallW.Top := 129;\r\n seScreenSmallW.Width := 57;\r\n seScreenSmallW.Height := 25;\r\n seScreenSmallW.Cursor := crIBeam;\r\n seScreenSmallW.ElementClassName := 'box_bottomborder_font_normal';\r\n seScreenSmallW.Align := alCustom;\r\n seScreenSmallW.AutoSize := False;\r\n seScreenSmallW.BorderStyle := bsSingle;\r\n seScreenSmallW.ChildOrder := 5;\r\n seScreenSmallW.Color := clWhite;\r\n seScreenSmallW.ElementFont := efCSS;\r\n seScreenSmallW.Font.Charset := DEFAULT_CHARSET;\r\n seScreenSmallW.Font.Color := clWindowText;\r\n seScreenSmallW.Font.Height := -16;\r\n seScreenSmallW.Font.Name := 'Tahoma';\r\n seScreenSmallW.Font.Style := [];\r\n seScreenSmallW.Increment := 1;\r\n seScreenSmallW.MaxValue := 10000;\r\n seScreenSmallW.MinValue := 0;\r\n seScreenSmallW.ParentFont := False;\r\n seScreenSmallW.Role := '';\r\n seScreenSmallW.Value := 0;\r\n seScreenSmallH.SetParentComponent(psGeneral);\r\n seScreenSmallH.Name := 'seScreenSmallH';\r\n seScreenSmallH.Left := 495;\r\n seScreenSmallH.Top := 129;\r\n seScreenSmallH.Width := 57;\r\n seScreenSmallH.Height := 25;\r\n seScreenSmallH.Cursor := crIBeam;\r\n seScreenSmallH.ElementClassName := 'box_bottomborder_font_normal';\r\n seScreenSmallH.Align := alCustom;\r\n seScreenSmallH.AutoSize := False;\r\n seScreenSmallH.BorderStyle := bsSingle;\r\n seScreenSmallH.ChildOrder := 5;\r\n seScreenSmallH.Color := clWhite;\r\n seScreenSmallH.ElementFont := efCSS;\r\n seScreenSmallH.Font.Charset := DEFAULT_CHARSET;\r\n seScreenSmallH.Font.Color := clWindowText;\r\n seScreenSmallH.Font.Height := -16;\r\n seScreenSmallH.Font.Name := 'Tahoma';\r\n seScreenSmallH.Font.Style := [];\r\n seScreenSmallH.Increment := 1;\r\n seScreenSmallH.MaxValue := 10000;\r\n seScreenSmallH.MinValue := 0;\r\n seScreenSmallH.ParentFont := False;\r\n seScreenSmallH.Role := '';\r\n seScreenSmallH.Value := 0;\r\n rgVideoSource.SetParentComponent(psGeneral);\r\n rgVideoSource.Name := 'rgVideoSource';\r\n rgVideoSource.Left := 415;\r\n rgVideoSource.Top := 164;\r\n rgVideoSource.Width := 242;\r\n rgVideoSource.Height := 57;\r\n rgVideoSource.Caption := 'Video Source';\r\n rgVideoSource.ChildOrder := 39;\r\n rgVideoSource.Columns := 2;\r\n rgVideoSource.ElementLegendClassName := 'text_normal';\r\n rgVideoSource.ElementFont := efCSS;\r\n rgVideoSource.ItemIndex := 0;\r\n rgVideoSource.Items.BeginUpdate;\r\n try\r\n rgVideoSource.Items.Clear;\r\n rgVideoSource.Items.Add('Live stream');\r\n rgVideoSource.Items.Add('Video File');\r\n finally\r\n rgVideoSource.Items.EndUpdate;\r\n end;\r\n rgVideoSource.Role := '';\r\n rgVideoSource.TabOrder := 20;\r\n SetEvent(rgVideoSource, Self, 'OnChange', 'rgVideoSourceChange');\r\n edtVideoSourceFile.SetParentComponent(psGeneral);\r\n edtVideoSourceFile.Name := 'edtVideoSourceFile';\r\n edtVideoSourceFile.Left := 416;\r\n edtVideoSourceFile.Top := 227;\r\n edtVideoSourceFile.Width := 410;\r\n edtVideoSourceFile.Height := 22;\r\n edtVideoSourceFile.Cursor := crIBeam;\r\n edtVideoSourceFile.ChildOrder := 10;\r\n edtVideoSourceFile.ElementClassName := 'box_bottomborder_font_normal';\r\n edtVideoSourceFile.ElementFont := efCSS;\r\n edtVideoSourceFile.HeightPercent := 100.000000000000000000;\r\n edtVideoSourceFile.WidthPercent := 100.000000000000000000;\r\n cbVoiceControlActive.SetParentComponent(psGeneral);\r\n cbVoiceControlActive.Name := 'cbVoiceControlActive';\r\n cbVoiceControlActive.Left := 32;\r\n cbVoiceControlActive.Top := 392;\r\n cbVoiceControlActive.Width := 250;\r\n cbVoiceControlActive.Height := 22;\r\n cbVoiceControlActive.Cursor := crHandPoint;\r\n cbVoiceControlActive.Caption := 'Active by Default';\r\n cbVoiceControlActive.Checked := True;\r\n cbVoiceControlActive.ChildOrder := 2;\r\n cbVoiceControlActive.ElementLabelClassName := 'text_normal';\r\n cbVoiceControlActive.ElementFont := efCSS;\r\n cbVoiceControlActive.HeightPercent := 100.000000000000000000;\r\n cbVoiceControlActive.State := cbChecked;\r\n cbVoiceControlActive.WidthPercent := 100.000000000000000000;\r\n cbVoiceCommands.SetParentComponent(psGeneral);\r\n cbVoiceCommands.Name := 'cbVoiceCommands';\r\n cbVoiceCommands.Left := 32;\r\n cbVoiceCommands.Top := 411;\r\n cbVoiceCommands.Width := 250;\r\n cbVoiceCommands.Height := 22;\r\n cbVoiceCommands.Cursor := crHandPoint;\r\n cbVoiceCommands.Caption := 'Navigation Commands';\r\n cbVoiceCommands.Checked := True;\r\n cbVoiceCommands.ChildOrder := 2;\r\n cbVoiceCommands.ElementLabelClassName := 'text_normal';\r\n cbVoiceCommands.ElementFont := efCSS;\r\n cbVoiceCommands.HeightPercent := 100.000000000000000000;\r\n cbVoiceCommands.State := cbChecked;\r\n cbVoiceCommands.WidthPercent := 100.000000000000000000;\r\n cbVoiceDictation.SetParentComponent(psGeneral);\r\n cbVoiceDictation.Name := 'cbVoiceDictation';\r\n cbVoiceDictation.Left := 32;\r\n cbVoiceDictation.Top := 431;\r\n cbVoiceDictation.Width := 250;\r\n cbVoiceDictation.Height := 22;\r\n cbVoiceDictation.Cursor := crHandPoint;\r\n cbVoiceDictation.Caption := 'Dictation';\r\n cbVoiceDictation.Checked := True;\r\n cbVoiceDictation.ChildOrder := 2;\r\n cbVoiceDictation.ElementLabelClassName := 'text_normal';\r\n cbVoiceDictation.ElementFont := efCSS;\r\n cbVoiceDictation.HeightPercent := 100.000000000000000000;\r\n cbVoiceDictation.State := cbChecked;\r\n cbVoiceDictation.WidthPercent := 100.000000000000000000;\r\n psmainmenu.SetParentComponent(pcSettings);\r\n psmainmenu.Name := 'psmainmenu';\r\n psmainmenu.Left := 0;\r\n psmainmenu.Top := 20;\r\n psmainmenu.Width := 1383;\r\n psmainmenu.Height := 4898;\r\n psmainmenu.ElementClassName := 'BOX_NO_BORDER';\r\n psmainmenu.Caption := 'Main Menu';\r\n psmainmenu.ChildOrder := 1;\r\n psmainmenu.Font.Charset := DEFAULT_CHARSET;\r\n psmainmenu.Font.Color := clWindowText;\r\n psmainmenu.Font.Height := -11;\r\n psmainmenu.Font.Name := 'Tahoma';\r\n psmainmenu.Font.Style := [];\r\n psmainmenu.ParentFont := False;\r\n pnlPKLMenuContainer.SetParentComponent(psmainmenu);\r\n pnlPKLMenuContainer.Name := 'pnlPKLMenuContainer';\r\n pnlPKLMenuContainer.Left := 0;\r\n pnlPKLMenuContainer.Top := 0;\r\n pnlPKLMenuContainer.Width := 918;\r\n pnlPKLMenuContainer.Height := 4833;\r\n pnlPKLMenuContainer.Align := alClient;\r\n pnlPKLMenuContainer.BorderColor := clWhite;\r\n pnlPKLMenuContainer.BorderStyle := bsNone;\r\n pnlPKLMenuContainer.Color := clWhite;\r\n pnlPKLMenuContainer.ElementFont := efCSS;\r\n pnlPKLMenuContainer.TabOrder := 0;\r\n WebMemo1.SetParentComponent(psmainmenu);\r\n WebMemo1.Name := 'WebMemo1';\r\n WebMemo1.Left := 0;\r\n WebMemo1.Top := 4833;\r\n WebMemo1.Width := 1383;\r\n WebMemo1.Height := 65;\r\n WebMemo1.Align := alBottom;\r\n WebMemo1.BorderStyle := bsNone;\r\n WebMemo1.ElementClassName := 'block_memo';\r\n WebMemo1.ElementFont := efCSS;\r\n WebMemo1.Font.Charset := DEFAULT_CHARSET;\r\n WebMemo1.Font.Color := clWindowText;\r\n WebMemo1.Font.Height := -13;\r\n WebMemo1.Font.Name := 'Tahoma';\r\n WebMemo1.Font.Style := [];\r\n WebMemo1.HeightPercent := 100.000000000000000000;\r\n WebMemo1.Lines.BeginUpdate;\r\n try\r\n WebMemo1.Lines.Clear;\r\n WebMemo1.Lines.Add('- M^Icon^Title^Form_Name^API_call');\r\n WebMemo1.Lines.Add('- F^Form_Name^Form_Caption^Button1_caption^Button1_form^Button1_icon^Button1_API_Call ...');\r\n WebMemo1.Lines.Add(' API Call: .Function[Parameter 1; ...]');\r\n WebMemo1.Lines.Add('- *[Menu Item Title] - Auto click when application starts');\r\n finally\r\n WebMemo1.Lines.EndUpdate;\r\n end;\r\n WebMemo1.ParentFont := False;\r\n WebMemo1.SelLength := 0;\r\n WebMemo1.SelStart := 0;\r\n WebMemo1.ShowFocus := False;\r\n WebMemo1.WidthPercent := 100.000000000000000000;\r\n WebSplitter1.SetParentComponent(psmainmenu);\r\n WebSplitter1.Name := 'WebSplitter1';\r\n WebSplitter1.Left := 918;\r\n WebSplitter1.Top := 0;\r\n WebSplitter1.Width := 10;\r\n WebSplitter1.Height := 4833;\r\n WebSplitter1.Align := alRight;\r\n WebSplitter1.ChildOrder := 3;\r\n WebSplitter1.Color := clWhite;\r\n WebPanel1.SetParentComponent(psmainmenu);\r\n WebPanel1.Name := 'WebPanel1';\r\n WebPanel1.Left := 928;\r\n WebPanel1.Top := 0;\r\n WebPanel1.Width := 455;\r\n WebPanel1.Height := 4833;\r\n WebPanel1.Align := alRight;\r\n WebPanel1.BorderColor := clWhite;\r\n WebPanel1.BorderStyle := bsNone;\r\n WebPanel1.ChildOrder := 3;\r\n WebPanel1.Color := clWhite;\r\n WebPanel1.TabOrder := 3;\r\n WebLabel11.SetParentComponent(WebPanel1);\r\n WebLabel11.Name := 'WebLabel11';\r\n WebLabel11.Left := 0;\r\n WebLabel11.Top := 4776;\r\n WebLabel11.Width := 455;\r\n WebLabel11.Height := 16;\r\n WebLabel11.Align := alBottom;\r\n WebLabel11.ElementClassName := 'BOX_NO_BORDER_FONT_BOLD';\r\n WebLabel11.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel11.Font.Color := clWindowText;\r\n WebLabel11.Font.Height := -13;\r\n WebLabel11.Font.Name := 'Tahoma';\r\n WebLabel11.Font.Style := [fsBold];\r\n WebLabel11.HeightPercent := 100.000000000000000000;\r\n WebLabel11.ParentFont := False;\r\n WebLabel11.Transparent := False;\r\n WebLabel11.WidthPercent := 100.000000000000000000;\r\n WebScrollBox1.SetParentComponent(WebPanel1);\r\n WebScrollBox1.Name := 'WebScrollBox1';\r\n WebScrollBox1.Left := 0;\r\n WebScrollBox1.Top := 0;\r\n WebScrollBox1.Width := 455;\r\n WebScrollBox1.Height := 4688;\r\n WebScrollBox1.Align := alClient;\r\n WebScrollBox1.BorderStyle := bsNone;\r\n WebScrollBox1.ChildOrder := 3;\r\n WebScrollBox1.Color := clWhite;\r\n WebScrollBox1.ScrollBars := ssVertical;\r\n l1.SetParentComponent(WebScrollBox1);\r\n l1.Name := 'l1';\r\n l1.Left := 0;\r\n l1.Top := 0;\r\n l1.Width := 455;\r\n l1.Height := 16;\r\n l1.Align := alTop;\r\n l1.Caption := 'Type ';\r\n l1.ElementClassName := 'text_normal_bold';\r\n l1.ElementFont := efCSS;\r\n l1.Font.Charset := DEFAULT_CHARSET;\r\n l1.Font.Color := clWindowText;\r\n l1.Font.Height := -13;\r\n l1.Font.Name := 'Tahoma';\r\n l1.Font.Style := [fsBold];\r\n l1.HeightPercent := 100.000000000000000000;\r\n l1.ParentFont := False;\r\n l1.Transparent := False;\r\n l1.WidthPercent := 100.000000000000000000;\r\n l2.SetParentComponent(WebScrollBox1);\r\n l2.Name := 'l2';\r\n l2.Left := 0;\r\n l2.Top := 40;\r\n l2.Width := 455;\r\n l2.Height := 16;\r\n l2.Align := alTop;\r\n l2.Caption := 'Menu Item Description';\r\n l2.ElementClassName := 'text_normal_bold';\r\n l2.ElementFont := efCSS;\r\n l2.Font.Charset := DEFAULT_CHARSET;\r\n l2.Font.Color := clWindowText;\r\n l2.Font.Height := -13;\r\n l2.Font.Name := 'Tahoma';\r\n l2.Font.Style := [fsBold];\r\n l2.HeightPercent := 100.000000000000000000;\r\n l2.ParentFont := False;\r\n l2.Transparent := False;\r\n l2.WidthPercent := 100.000000000000000000;\r\n l3.SetParentComponent(WebScrollBox1);\r\n l3.Name := 'l3';\r\n l3.Left := 0;\r\n l3.Top := 344;\r\n l3.Width := 455;\r\n l3.Height := 16;\r\n l3.Align := alTop;\r\n l3.Caption := 'Form Description';\r\n l3.ElementClassName := 'text_normal_bold';\r\n l3.ElementFont := efCSS;\r\n l3.Font.Charset := DEFAULT_CHARSET;\r\n l3.Font.Color := clWindowText;\r\n l3.Font.Height := -13;\r\n l3.Font.Name := 'Tahoma';\r\n l3.Font.Style := [fsBold];\r\n l3.HeightPercent := 100.000000000000000000;\r\n l3.ParentFont := False;\r\n l3.Transparent := False;\r\n l3.WidthPercent := 100.000000000000000000;\r\n l5.SetParentComponent(WebScrollBox1);\r\n l5.Name := 'l5';\r\n l5.Left := 0;\r\n l5.Top := 458;\r\n l5.Width := 455;\r\n l5.Height := 16;\r\n l5.Align := alTop;\r\n l5.Caption := '1.';\r\n l5.ElementClassName := 'text_normal_bold';\r\n l5.ElementFont := efCSS;\r\n l5.Font.Charset := DEFAULT_CHARSET;\r\n l5.Font.Color := clWindowText;\r\n l5.Font.Height := -13;\r\n l5.Font.Name := 'Tahoma';\r\n l5.Font.Style := [];\r\n l5.HeightPercent := 100.000000000000000000;\r\n l5.ParentFont := False;\r\n l5.Transparent := False;\r\n l5.WidthPercent := 100.000000000000000000;\r\n l6.SetParentComponent(WebScrollBox1);\r\n l6.Name := 'l6';\r\n l6.Left := 0;\r\n l6.Top := 756;\r\n l6.Width := 455;\r\n l6.Height := 16;\r\n l6.Align := alTop;\r\n l6.Caption := '2.';\r\n l6.ElementClassName := 'text_normal_bold';\r\n l6.ElementFont := efCSS;\r\n l6.Font.Charset := DEFAULT_CHARSET;\r\n l6.Font.Color := clWindowText;\r\n l6.Font.Height := -13;\r\n l6.Font.Name := 'Tahoma';\r\n l6.Font.Style := [fsBold];\r\n l6.HeightPercent := 100.000000000000000000;\r\n l6.ParentFont := False;\r\n l6.ShowHint := True;\r\n l6.Transparent := False;\r\n l6.WidthPercent := 100.000000000000000000;\r\n l7.SetParentComponent(WebScrollBox1);\r\n l7.Name := 'l7';\r\n l7.Left := 0;\r\n l7.Top := 1054;\r\n l7.Width := 455;\r\n l7.Height := 16;\r\n l7.Align := alTop;\r\n l7.Caption := '3.';\r\n l7.ElementClassName := 'text_normal_bold';\r\n l7.ElementFont := efCSS;\r\n l7.Font.Charset := DEFAULT_CHARSET;\r\n l7.Font.Color := clWindowText;\r\n l7.Font.Height := -13;\r\n l7.Font.Name := 'Tahoma';\r\n l7.Font.Style := [fsBold];\r\n l7.HeightPercent := 100.000000000000000000;\r\n l7.ParentFont := False;\r\n l7.ShowHint := True;\r\n l7.Transparent := False;\r\n l7.WidthPercent := 100.000000000000000000;\r\n l8.SetParentComponent(WebScrollBox1);\r\n l8.Name := 'l8';\r\n l8.Left := 0;\r\n l8.Top := 1352;\r\n l8.Width := 455;\r\n l8.Height := 16;\r\n l8.Align := alTop;\r\n l8.Caption := '4.';\r\n l8.ElementClassName := 'text_normal_bold';\r\n l8.ElementFont := efCSS;\r\n l8.Font.Charset := DEFAULT_CHARSET;\r\n l8.Font.Color := clWindowText;\r\n l8.Font.Height := -13;\r\n l8.Font.Name := 'Tahoma';\r\n l8.Font.Style := [fsBold];\r\n l8.HeightPercent := 100.000000000000000000;\r\n l8.ParentFont := False;\r\n l8.ShowHint := True;\r\n l8.Transparent := False;\r\n l8.WidthPercent := 100.000000000000000000;\r\n l9.SetParentComponent(WebScrollBox1);\r\n l9.Name := 'l9';\r\n l9.Left := 0;\r\n l9.Top := 1650;\r\n l9.Width := 455;\r\n l9.Height := 16;\r\n l9.Align := alTop;\r\n l9.Caption := '5.';\r\n l9.ElementClassName := 'text_normal_bold';\r\n l9.ElementFont := efCSS;\r\n l9.Font.Charset := DEFAULT_CHARSET;\r\n l9.Font.Color := clWindowText;\r\n l9.Font.Height := -13;\r\n l9.Font.Name := 'Tahoma';\r\n l9.Font.Style := [fsBold];\r\n l9.HeightPercent := 100.000000000000000000;\r\n l9.ParentFont := False;\r\n l9.ShowHint := True;\r\n l9.Transparent := False;\r\n l9.WidthPercent := 100.000000000000000000;\r\n l4.SetParentComponent(WebScrollBox1);\r\n l4.Name := 'l4';\r\n l4.Left := 0;\r\n l4.Top := 442;\r\n l4.Width := 455;\r\n l4.Height := 16;\r\n l4.Align := alTop;\r\n l4.Caption := 'Form buttons';\r\n l4.ElementClassName := 'text_normal_bold';\r\n l4.ElementFont := efCSS;\r\n l4.Font.Charset := DEFAULT_CHARSET;\r\n l4.Font.Color := clWindowText;\r\n l4.Font.Height := -13;\r\n l4.Font.Name := 'Tahoma';\r\n l4.Font.Style := [fsBold];\r\n l4.HeightPercent := 100.000000000000000000;\r\n l4.ParentFont := False;\r\n l4.Transparent := False;\r\n l4.WidthPercent := 100.000000000000000000;\r\n WebLabel6.SetParentComponent(WebScrollBox1);\r\n WebLabel6.Name := 'WebLabel6';\r\n WebLabel6.Left := 0;\r\n WebLabel6.Top := 1038;\r\n WebLabel6.Width := 455;\r\n WebLabel6.Height := 16;\r\n WebLabel6.Align := alTop;\r\n WebLabel6.ElementClassName := 'BOX_NO_BORDER_FONT_BOLD';\r\n WebLabel6.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel6.Font.Color := clWindowText;\r\n WebLabel6.Font.Height := -13;\r\n WebLabel6.Font.Name := 'Tahoma';\r\n WebLabel6.Font.Style := [fsBold];\r\n WebLabel6.HeightPercent := 100.000000000000000000;\r\n WebLabel6.ParentFont := False;\r\n WebLabel6.ShowHint := True;\r\n WebLabel6.Transparent := False;\r\n WebLabel6.WidthPercent := 100.000000000000000000;\r\n WebLabel7.SetParentComponent(WebScrollBox1);\r\n WebLabel7.Name := 'WebLabel7';\r\n WebLabel7.Left := 0;\r\n WebLabel7.Top := 740;\r\n WebLabel7.Width := 455;\r\n WebLabel7.Height := 16;\r\n WebLabel7.Align := alTop;\r\n WebLabel7.ElementClassName := 'BOX_NO_BORDER_FONT_BOLD';\r\n WebLabel7.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel7.Font.Color := clWindowText;\r\n WebLabel7.Font.Height := -13;\r\n WebLabel7.Font.Name := 'Tahoma';\r\n WebLabel7.Font.Style := [fsBold];\r\n WebLabel7.HeightPercent := 100.000000000000000000;\r\n WebLabel7.ParentFont := False;\r\n WebLabel7.ShowHint := True;\r\n WebLabel7.Transparent := False;\r\n WebLabel7.WidthPercent := 100.000000000000000000;\r\n WebLabel8.SetParentComponent(WebScrollBox1);\r\n WebLabel8.Name := 'WebLabel8';\r\n WebLabel8.Left := 0;\r\n WebLabel8.Top := 1336;\r\n WebLabel8.Width := 455;\r\n WebLabel8.Height := 16;\r\n WebLabel8.Align := alTop;\r\n WebLabel8.ElementClassName := 'BOX_NO_BORDER_FONT_BOLD';\r\n WebLabel8.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel8.Font.Color := clWindowText;\r\n WebLabel8.Font.Height := -13;\r\n WebLabel8.Font.Name := 'Tahoma';\r\n WebLabel8.Font.Style := [fsBold];\r\n WebLabel8.HeightPercent := 100.000000000000000000;\r\n WebLabel8.ParentFont := False;\r\n WebLabel8.ShowHint := True;\r\n WebLabel8.Transparent := False;\r\n WebLabel8.WidthPercent := 100.000000000000000000;\r\n WebLabel9.SetParentComponent(WebScrollBox1);\r\n WebLabel9.Name := 'WebLabel9';\r\n WebLabel9.Left := 0;\r\n WebLabel9.Top := 426;\r\n WebLabel9.Width := 455;\r\n WebLabel9.Height := 16;\r\n WebLabel9.Align := alTop;\r\n WebLabel9.ElementClassName := 'BOX_NO_BORDER_FONT_BOLD';\r\n WebLabel9.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel9.Font.Color := clWindowText;\r\n WebLabel9.Font.Height := -13;\r\n WebLabel9.Font.Name := 'Tahoma';\r\n WebLabel9.Font.Style := [fsBold];\r\n WebLabel9.HeightPercent := 100.000000000000000000;\r\n WebLabel9.ParentFont := False;\r\n WebLabel9.Transparent := False;\r\n WebLabel9.WidthPercent := 100.000000000000000000;\r\n WebLabel10.SetParentComponent(WebScrollBox1);\r\n WebLabel10.Name := 'WebLabel10';\r\n WebLabel10.Left := 0;\r\n WebLabel10.Top := 1634;\r\n WebLabel10.Width := 455;\r\n WebLabel10.Height := 16;\r\n WebLabel10.Align := alTop;\r\n WebLabel10.ElementClassName := 'BOX_NO_BORDER_FONT_BOLD';\r\n WebLabel10.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel10.Font.Color := clWindowText;\r\n WebLabel10.Font.Height := -13;\r\n WebLabel10.Font.Name := 'Tahoma';\r\n WebLabel10.Font.Style := [fsBold];\r\n WebLabel10.HeightPercent := 100.000000000000000000;\r\n WebLabel10.ParentFont := False;\r\n WebLabel10.ShowHint := True;\r\n WebLabel10.Transparent := False;\r\n WebLabel10.WidthPercent := 100.000000000000000000;\r\n WebLabel12.SetParentComponent(WebScrollBox1);\r\n WebLabel12.Name := 'WebLabel12';\r\n WebLabel12.Left := 0;\r\n WebLabel12.Top := 1932;\r\n WebLabel12.Width := 455;\r\n WebLabel12.Height := 16;\r\n WebLabel12.Align := alTop;\r\n WebLabel12.ElementClassName := 'BOX_NO_BORDER_FONT_BOLD';\r\n WebLabel12.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel12.Font.Color := clWindowText;\r\n WebLabel12.Font.Height := -13;\r\n WebLabel12.Font.Name := 'Tahoma';\r\n WebLabel12.Font.Style := [fsBold];\r\n WebLabel12.HeightPercent := 100.000000000000000000;\r\n WebLabel12.ParentFont := False;\r\n WebLabel12.ShowHint := True;\r\n WebLabel12.Transparent := False;\r\n WebLabel12.WidthPercent := 100.000000000000000000;\r\n l10.SetParentComponent(WebScrollBox1);\r\n l10.Name := 'l10';\r\n l10.Left := 0;\r\n l10.Top := 1948;\r\n l10.Width := 455;\r\n l10.Height := 16;\r\n l10.Align := alTop;\r\n l10.Caption := '6.';\r\n l10.ElementClassName := 'text_normal_bold';\r\n l10.ElementFont := efCSS;\r\n l10.Font.Charset := DEFAULT_CHARSET;\r\n l10.Font.Color := clWindowText;\r\n l10.Font.Height := -13;\r\n l10.Font.Name := 'Tahoma';\r\n l10.Font.Style := [fsBold];\r\n l10.HeightPercent := 100.000000000000000000;\r\n l10.ParentFont := False;\r\n l10.ShowHint := True;\r\n l10.Transparent := False;\r\n l10.WidthPercent := 100.000000000000000000;\r\n WebLabel14.SetParentComponent(WebScrollBox1);\r\n WebLabel14.Name := 'WebLabel14';\r\n WebLabel14.Left := 0;\r\n WebLabel14.Top := 2528;\r\n WebLabel14.Width := 455;\r\n WebLabel14.Height := 16;\r\n WebLabel14.Align := alTop;\r\n WebLabel14.ElementClassName := 'BOX_NO_BORDER_FONT_BOLD';\r\n WebLabel14.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel14.Font.Color := clWindowText;\r\n WebLabel14.Font.Height := -13;\r\n WebLabel14.Font.Name := 'Tahoma';\r\n WebLabel14.Font.Style := [fsBold];\r\n WebLabel14.HeightPercent := 100.000000000000000000;\r\n WebLabel14.ParentFont := False;\r\n WebLabel14.Transparent := False;\r\n WebLabel14.WidthPercent := 100.000000000000000000;\r\n l11.SetParentComponent(WebScrollBox1);\r\n l11.Name := 'l11';\r\n l11.Left := 0;\r\n l11.Top := 2246;\r\n l11.Width := 455;\r\n l11.Height := 16;\r\n l11.Align := alTop;\r\n l11.Caption := '7.';\r\n l11.ElementClassName := 'text_normal_bold';\r\n l11.ElementFont := efCSS;\r\n l11.Font.Charset := DEFAULT_CHARSET;\r\n l11.Font.Color := clWindowText;\r\n l11.Font.Height := -13;\r\n l11.Font.Name := 'Tahoma';\r\n l11.Font.Style := [fsBold];\r\n l11.HeightPercent := 100.000000000000000000;\r\n l11.ParentFont := False;\r\n l11.Transparent := False;\r\n l11.WidthPercent := 100.000000000000000000;\r\n WebLabel16.SetParentComponent(WebScrollBox1);\r\n WebLabel16.Name := 'WebLabel16';\r\n WebLabel16.Left := 0;\r\n WebLabel16.Top := 2230;\r\n WebLabel16.Width := 455;\r\n WebLabel16.Height := 16;\r\n WebLabel16.Align := alTop;\r\n WebLabel16.ElementClassName := 'BOX_NO_BORDER_FONT_BOLD';\r\n WebLabel16.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel16.Font.Color := clWindowText;\r\n WebLabel16.Font.Height := -13;\r\n WebLabel16.Font.Name := 'Tahoma';\r\n WebLabel16.Font.Style := [fsBold];\r\n WebLabel16.HeightPercent := 100.000000000000000000;\r\n WebLabel16.ParentFont := False;\r\n WebLabel16.Transparent := False;\r\n WebLabel16.WidthPercent := 100.000000000000000000;\r\n l12.SetParentComponent(WebScrollBox1);\r\n l12.Name := 'l12';\r\n l12.Left := 0;\r\n l12.Top := 2544;\r\n l12.Width := 455;\r\n l12.Height := 16;\r\n l12.Align := alTop;\r\n l12.Caption := '8.';\r\n l12.ElementClassName := 'text_normal_bold';\r\n l12.ElementFont := efCSS;\r\n l12.Font.Charset := DEFAULT_CHARSET;\r\n l12.Font.Color := clWindowText;\r\n l12.Font.Height := -13;\r\n l12.Font.Name := 'Tahoma';\r\n l12.Font.Style := [fsBold];\r\n l12.HeightPercent := 100.000000000000000000;\r\n l12.ParentFont := False;\r\n l12.Transparent := False;\r\n l12.WidthPercent := 100.000000000000000000;\r\n WebLabel18.SetParentComponent(WebScrollBox1);\r\n WebLabel18.Name := 'WebLabel18';\r\n WebLabel18.Left := 0;\r\n WebLabel18.Top := 2826;\r\n WebLabel18.Width := 455;\r\n WebLabel18.Height := 16;\r\n WebLabel18.Align := alTop;\r\n WebLabel18.ElementClassName := 'BOX_NO_BORDER_FONT_BOLD';\r\n WebLabel18.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel18.Font.Color := clWindowText;\r\n WebLabel18.Font.Height := -13;\r\n WebLabel18.Font.Name := 'Tahoma';\r\n WebLabel18.Font.Style := [fsBold];\r\n WebLabel18.HeightPercent := 100.000000000000000000;\r\n WebLabel18.ParentFont := False;\r\n WebLabel18.Transparent := False;\r\n WebLabel18.WidthPercent := 100.000000000000000000;\r\n l13.SetParentComponent(WebScrollBox1);\r\n l13.Name := 'l13';\r\n l13.Left := 0;\r\n l13.Top := 2842;\r\n l13.Width := 455;\r\n l13.Height := 16;\r\n l13.Align := alTop;\r\n l13.Caption := '9.';\r\n l13.ElementClassName := 'text_normal_bold';\r\n l13.ElementFont := efCSS;\r\n l13.Font.Charset := DEFAULT_CHARSET;\r\n l13.Font.Color := clWindowText;\r\n l13.Font.Height := -13;\r\n l13.Font.Name := 'Tahoma';\r\n l13.Font.Style := [fsBold];\r\n l13.HeightPercent := 100.000000000000000000;\r\n l13.ParentFont := False;\r\n l13.Transparent := False;\r\n l13.WidthPercent := 100.000000000000000000;\r\n cb1.SetParentComponent(WebScrollBox1);\r\n cb1.Name := 'cb1';\r\n cb1.Left := 0;\r\n cb1.Top := 16;\r\n cb1.Width := 455;\r\n cb1.Height := 24;\r\n cb1.Hint := '\"M\" - menu item, \"F\" - form';\r\n cb1.Align := alTop;\r\n cb1.ElementClassName := 'box_bottomborder_font_normal';\r\n cb1.ElementFont := efCSS;\r\n cb1.Font.Charset := DEFAULT_CHARSET;\r\n cb1.Font.Color := clWindowText;\r\n cb1.Font.Height := -13;\r\n cb1.Font.Name := 'Tahoma';\r\n cb1.Font.Style := [];\r\n cb1.HeightPercent := 100.000000000000000000;\r\n cb1.ParentFont := False;\r\n cb1.ShowFocus := False;\r\n cb1.ShowHint := True;\r\n cb1.Text := '';\r\n cb1.WidthPercent := 100.000000000000000000;\r\n SetEvent(cb1, Self, 'OnChange', 'cb1Change');\r\n cb1.ItemIndex := -1;\r\n cb1.Items.BeginUpdate;\r\n try\r\n cb1.Items.Clear;\r\n cb1.Items.Add('M');\r\n cb1.Items.Add('F');\r\n finally\r\n cb1.Items.EndUpdate;\r\n end;\r\n me1.SetParentComponent(WebScrollBox1);\r\n me1.Name := 'me1';\r\n me1.Left := 0;\r\n me1.Top := 56;\r\n me1.Width := 455;\r\n me1.Height := 22;\r\n me1.Hint := 'Icon';\r\n me1.Align := alTop;\r\n me1.ChildOrder := 1;\r\n me1.ElementClassName := 'box_bottomborder_font_normal';\r\n me1.ElementFont := efCSS;\r\n me1.Font.Charset := DEFAULT_CHARSET;\r\n me1.Font.Color := clWindowText;\r\n me1.Font.Height := -13;\r\n me1.Font.Name := 'Tahoma';\r\n me1.Font.Style := [];\r\n me1.HeightPercent := 100.000000000000000000;\r\n me1.ParentFont := False;\r\n me1.ShowFocus := False;\r\n me1.ShowHint := True;\r\n me1.WidthPercent := 100.000000000000000000;\r\n me2.SetParentComponent(WebScrollBox1);\r\n me2.Name := 'me2';\r\n me2.Left := 0;\r\n me2.Top := 78;\r\n me2.Width := 455;\r\n me2.Height := 22;\r\n me2.Hint := 'Title';\r\n me2.Align := alTop;\r\n me2.ChildOrder := 2;\r\n me2.ElementClassName := 'box_bottomborder_font_normal';\r\n me2.ElementFont := efCSS;\r\n me2.Font.Charset := DEFAULT_CHARSET;\r\n me2.Font.Color := clWindowText;\r\n me2.Font.Height := -13;\r\n me2.Font.Name := 'Tahoma';\r\n me2.Font.Style := [];\r\n me2.HeightPercent := 100.000000000000000000;\r\n me2.ParentFont := False;\r\n me2.ShowFocus := False;\r\n me2.ShowHint := True;\r\n me2.WidthPercent := 100.000000000000000000;\r\n me3.SetParentComponent(WebScrollBox1);\r\n me3.Name := 'me3';\r\n me3.Left := 0;\r\n me3.Top := 100;\r\n me3.Width := 455;\r\n me3.Height := 22;\r\n me3.Hint := 'Form to Call';\r\n me3.Align := alTop;\r\n me3.ChildOrder := 4;\r\n me3.ElementClassName := 'box_bottomborder_font_normal';\r\n me3.ElementFont := efCSS;\r\n me3.Font.Charset := DEFAULT_CHARSET;\r\n me3.Font.Color := clWindowText;\r\n me3.Font.Height := -13;\r\n me3.Font.Name := 'Tahoma';\r\n me3.Font.Style := [];\r\n me3.HeightPercent := 100.000000000000000000;\r\n me3.ParentFont := False;\r\n me3.ShowFocus := False;\r\n me3.ShowHint := True;\r\n me3.WidthPercent := 100.000000000000000000;\r\n e5.SetParentComponent(WebScrollBox1);\r\n e5.Name := 'e5';\r\n e5.Left := 0;\r\n e5.Top := 360;\r\n e5.Width := 455;\r\n e5.Height := 22;\r\n e5.Hint := 'Name';\r\n e5.Align := alTop;\r\n e5.ChildOrder := 5;\r\n e5.ElementClassName := 'box_bottomborder_font_normal';\r\n e5.ElementFont := efCSS;\r\n e5.Font.Charset := DEFAULT_CHARSET;\r\n e5.Font.Color := clWindowText;\r\n e5.Font.Height := -13;\r\n e5.Font.Name := 'Tahoma';\r\n e5.Font.Style := [];\r\n e5.HeightPercent := 100.000000000000000000;\r\n e5.ParentFont := False;\r\n e5.ShowFocus := False;\r\n e5.ShowHint := True;\r\n e5.WidthPercent := 100.000000000000000000;\r\n e6.SetParentComponent(WebScrollBox1);\r\n e6.Name := 'e6';\r\n e6.Left := 0;\r\n e6.Top := 382;\r\n e6.Width := 455;\r\n e6.Height := 22;\r\n e6.Hint := 'Caption';\r\n e6.Align := alTop;\r\n e6.ChildOrder := 4;\r\n e6.ElementClassName := 'box_bottomborder_font_normal';\r\n e6.ElementFont := efCSS;\r\n e6.Font.Charset := DEFAULT_CHARSET;\r\n e6.Font.Color := clWindowText;\r\n e6.Font.Height := -13;\r\n e6.Font.Name := 'Tahoma';\r\n e6.Font.Style := [];\r\n e6.HeightPercent := 100.000000000000000000;\r\n e6.ParentFont := False;\r\n e6.ShowFocus := False;\r\n e6.ShowHint := True;\r\n e6.WidthPercent := 100.000000000000000000;\r\n e7.SetParentComponent(WebScrollBox1);\r\n e7.Name := 'e7';\r\n e7.Left := 0;\r\n e7.Top := 474;\r\n e7.Width := 455;\r\n e7.Height := 22;\r\n e7.Hint := 'Caption';\r\n e7.Align := alTop;\r\n e7.ChildOrder := 5;\r\n e7.ElementClassName := 'box_bottomborder_font_normal';\r\n e7.ElementFont := efCSS;\r\n e7.Font.Charset := DEFAULT_CHARSET;\r\n e7.Font.Color := clWindowText;\r\n e7.Font.Height := -13;\r\n e7.Font.Name := 'Tahoma';\r\n e7.Font.Style := [];\r\n e7.HeightPercent := 100.000000000000000000;\r\n e7.ParentFont := False;\r\n e7.ShowFocus := False;\r\n e7.ShowHint := True;\r\n e7.WidthPercent := 100.000000000000000000;\r\n e8.SetParentComponent(WebScrollBox1);\r\n e8.Name := 'e8';\r\n e8.Left := 0;\r\n e8.Top := 496;\r\n e8.Width := 455;\r\n e8.Height := 22;\r\n e8.Hint := 'Form to call';\r\n e8.Align := alTop;\r\n e8.ChildOrder := 6;\r\n e8.ElementClassName := 'box_bottomborder_font_normal';\r\n e8.ElementFont := efCSS;\r\n e8.Font.Charset := DEFAULT_CHARSET;\r\n e8.Font.Color := clWindowText;\r\n e8.Font.Height := -13;\r\n e8.Font.Name := 'Tahoma';\r\n e8.Font.Style := [];\r\n e8.HeightPercent := 100.000000000000000000;\r\n e8.ParentFont := False;\r\n e8.ShowFocus := False;\r\n e8.ShowHint := True;\r\n e8.WidthPercent := 100.000000000000000000;\r\n e9.SetParentComponent(WebScrollBox1);\r\n e9.Name := 'e9';\r\n e9.Left := 0;\r\n e9.Top := 518;\r\n e9.Width := 455;\r\n e9.Height := 22;\r\n e9.Hint := 'Icon';\r\n e9.Align := alTop;\r\n e9.ChildOrder := 4;\r\n e9.ElementClassName := 'box_bottomborder_font_normal';\r\n e9.ElementFont := efCSS;\r\n e9.Font.Charset := DEFAULT_CHARSET;\r\n e9.Font.Color := clWindowText;\r\n e9.Font.Height := -13;\r\n e9.Font.Name := 'Tahoma';\r\n e9.Font.Style := [];\r\n e9.HeightPercent := 100.000000000000000000;\r\n e9.ParentFont := False;\r\n e9.ShowFocus := False;\r\n e9.ShowHint := True;\r\n e9.WidthPercent := 100.000000000000000000;\r\n e11.SetParentComponent(WebScrollBox1);\r\n e11.Name := 'e11';\r\n e11.Left := 0;\r\n e11.Top := 772;\r\n e11.Width := 455;\r\n e11.Height := 22;\r\n e11.Hint := 'Caption';\r\n e11.Align := alTop;\r\n e11.ChildOrder := 6;\r\n e11.ElementClassName := 'box_bottomborder_font_normal';\r\n e11.ElementFont := efCSS;\r\n e11.Font.Charset := DEFAULT_CHARSET;\r\n e11.Font.Color := clWindowText;\r\n e11.Font.Height := -13;\r\n e11.Font.Name := 'Tahoma';\r\n e11.Font.Style := [];\r\n e11.HeightPercent := 100.000000000000000000;\r\n e11.ParentFont := False;\r\n e11.ShowFocus := False;\r\n e11.ShowHint := True;\r\n e11.WidthPercent := 100.000000000000000000;\r\n e12.SetParentComponent(WebScrollBox1);\r\n e12.Name := 'e12';\r\n e12.Left := 0;\r\n e12.Top := 794;\r\n e12.Width := 455;\r\n e12.Height := 22;\r\n e12.Hint := 'Form to call';\r\n e12.Align := alTop;\r\n e12.ChildOrder := 4;\r\n e12.ElementClassName := 'box_bottomborder_font_normal';\r\n e12.ElementFont := efCSS;\r\n e12.Font.Charset := DEFAULT_CHARSET;\r\n e12.Font.Color := clWindowText;\r\n e12.Font.Height := -13;\r\n e12.Font.Name := 'Tahoma';\r\n e12.Font.Style := [];\r\n e12.HeightPercent := 100.000000000000000000;\r\n e12.ParentFont := False;\r\n e12.ShowFocus := False;\r\n e12.ShowHint := True;\r\n e12.WidthPercent := 100.000000000000000000;\r\n e13.SetParentComponent(WebScrollBox1);\r\n e13.Name := 'e13';\r\n e13.Left := 0;\r\n e13.Top := 816;\r\n e13.Width := 455;\r\n e13.Height := 22;\r\n e13.Hint := 'Icon';\r\n e13.Align := alTop;\r\n e13.ChildOrder := 5;\r\n e13.ElementClassName := 'box_bottomborder_font_normal';\r\n e13.ElementFont := efCSS;\r\n e13.Font.Charset := DEFAULT_CHARSET;\r\n e13.Font.Color := clWindowText;\r\n e13.Font.Height := -13;\r\n e13.Font.Name := 'Tahoma';\r\n e13.Font.Style := [];\r\n e13.HeightPercent := 100.000000000000000000;\r\n e13.ParentFont := False;\r\n e13.ShowFocus := False;\r\n e13.ShowHint := True;\r\n e13.WidthPercent := 100.000000000000000000;\r\n e15.SetParentComponent(WebScrollBox1);\r\n e15.Name := 'e15';\r\n e15.Left := 0;\r\n e15.Top := 1070;\r\n e15.Width := 455;\r\n e15.Height := 22;\r\n e15.Hint := 'Caption';\r\n e15.Align := alTop;\r\n e15.ChildOrder := 4;\r\n e15.ElementClassName := 'box_bottomborder_font_normal';\r\n e15.ElementFont := efCSS;\r\n e15.Font.Charset := DEFAULT_CHARSET;\r\n e15.Font.Color := clWindowText;\r\n e15.Font.Height := -13;\r\n e15.Font.Name := 'Tahoma';\r\n e15.Font.Style := [];\r\n e15.HeightPercent := 100.000000000000000000;\r\n e15.ParentFont := False;\r\n e15.ShowFocus := False;\r\n e15.ShowHint := True;\r\n e15.WidthPercent := 100.000000000000000000;\r\n e16.SetParentComponent(WebScrollBox1);\r\n e16.Name := 'e16';\r\n e16.Left := 0;\r\n e16.Top := 1092;\r\n e16.Width := 455;\r\n e16.Height := 22;\r\n e16.Hint := 'Form to call';\r\n e16.Align := alTop;\r\n e16.ChildOrder := 5;\r\n e16.ElementClassName := 'box_bottomborder_font_normal';\r\n e16.ElementFont := efCSS;\r\n e16.Font.Charset := DEFAULT_CHARSET;\r\n e16.Font.Color := clWindowText;\r\n e16.Font.Height := -13;\r\n e16.Font.Name := 'Tahoma';\r\n e16.Font.Style := [];\r\n e16.HeightPercent := 100.000000000000000000;\r\n e16.ParentFont := False;\r\n e16.ShowFocus := False;\r\n e16.ShowHint := True;\r\n e16.WidthPercent := 100.000000000000000000;\r\n e17.SetParentComponent(WebScrollBox1);\r\n e17.Name := 'e17';\r\n e17.Left := 0;\r\n e17.Top := 1114;\r\n e17.Width := 455;\r\n e17.Height := 22;\r\n e17.Hint := 'Icon';\r\n e17.Align := alTop;\r\n e17.ChildOrder := 6;\r\n e17.ElementClassName := 'box_bottomborder_font_normal';\r\n e17.ElementFont := efCSS;\r\n e17.Font.Charset := DEFAULT_CHARSET;\r\n e17.Font.Color := clWindowText;\r\n e17.Font.Height := -13;\r\n e17.Font.Name := 'Tahoma';\r\n e17.Font.Style := [];\r\n e17.HeightPercent := 100.000000000000000000;\r\n e17.ParentFont := False;\r\n e17.ShowFocus := False;\r\n e17.ShowHint := True;\r\n e17.WidthPercent := 100.000000000000000000;\r\n e19.SetParentComponent(WebScrollBox1);\r\n e19.Name := 'e19';\r\n e19.Left := 0;\r\n e19.Top := 1368;\r\n e19.Width := 455;\r\n e19.Height := 22;\r\n e19.Hint := 'Caption';\r\n e19.Align := alTop;\r\n e19.ChildOrder := 6;\r\n e19.ElementClassName := 'box_bottomborder_font_normal';\r\n e19.ElementFont := efCSS;\r\n e19.Font.Charset := DEFAULT_CHARSET;\r\n e19.Font.Color := clWindowText;\r\n e19.Font.Height := -13;\r\n e19.Font.Name := 'Tahoma';\r\n e19.Font.Style := [];\r\n e19.HeightPercent := 100.000000000000000000;\r\n e19.ParentFont := False;\r\n e19.ShowFocus := False;\r\n e19.ShowHint := True;\r\n e19.WidthPercent := 100.000000000000000000;\r\n e20.SetParentComponent(WebScrollBox1);\r\n e20.Name := 'e20';\r\n e20.Left := 0;\r\n e20.Top := 1390;\r\n e20.Width := 455;\r\n e20.Height := 22;\r\n e20.Hint := 'Form to call';\r\n e20.Align := alTop;\r\n e20.ChildOrder := 5;\r\n e20.ElementClassName := 'box_bottomborder_font_normal';\r\n e20.ElementFont := efCSS;\r\n e20.Font.Charset := DEFAULT_CHARSET;\r\n e20.Font.Color := clWindowText;\r\n e20.Font.Height := -13;\r\n e20.Font.Name := 'Tahoma';\r\n e20.Font.Style := [];\r\n e20.HeightPercent := 100.000000000000000000;\r\n e20.ParentFont := False;\r\n e20.ShowFocus := False;\r\n e20.ShowHint := True;\r\n e20.WidthPercent := 100.000000000000000000;\r\n e21.SetParentComponent(WebScrollBox1);\r\n e21.Name := 'e21';\r\n e21.Left := 0;\r\n e21.Top := 1412;\r\n e21.Width := 455;\r\n e21.Height := 22;\r\n e21.Hint := 'Icon';\r\n e21.Align := alTop;\r\n e21.ChildOrder := 4;\r\n e21.ElementClassName := 'box_bottomborder_font_normal';\r\n e21.ElementFont := efCSS;\r\n e21.Font.Charset := DEFAULT_CHARSET;\r\n e21.Font.Color := clWindowText;\r\n e21.Font.Height := -13;\r\n e21.Font.Name := 'Tahoma';\r\n e21.Font.Style := [];\r\n e21.HeightPercent := 100.000000000000000000;\r\n e21.ParentFont := False;\r\n e21.ShowFocus := False;\r\n e21.ShowHint := True;\r\n e21.WidthPercent := 100.000000000000000000;\r\n e23.SetParentComponent(WebScrollBox1);\r\n e23.Name := 'e23';\r\n e23.Left := 0;\r\n e23.Top := 1666;\r\n e23.Width := 455;\r\n e23.Height := 22;\r\n e23.Hint := 'Caption';\r\n e23.Align := alTop;\r\n e23.ChildOrder := 5;\r\n e23.ElementClassName := 'box_bottomborder_font_normal';\r\n e23.ElementFont := efCSS;\r\n e23.Font.Charset := DEFAULT_CHARSET;\r\n e23.Font.Color := clWindowText;\r\n e23.Font.Height := -13;\r\n e23.Font.Name := 'Tahoma';\r\n e23.Font.Style := [];\r\n e23.HeightPercent := 100.000000000000000000;\r\n e23.ParentFont := False;\r\n e23.ShowFocus := False;\r\n e23.ShowHint := True;\r\n e23.WidthPercent := 100.000000000000000000;\r\n e25.SetParentComponent(WebScrollBox1);\r\n e25.Name := 'e25';\r\n e25.Left := 0;\r\n e25.Top := 1710;\r\n e25.Width := 455;\r\n e25.Height := 22;\r\n e25.Hint := 'Icon';\r\n e25.Align := alTop;\r\n e25.ChildOrder := 6;\r\n e25.ElementClassName := 'box_bottomborder_font_normal';\r\n e25.ElementFont := efCSS;\r\n e25.Font.Charset := DEFAULT_CHARSET;\r\n e25.Font.Color := clWindowText;\r\n e25.Font.Height := -13;\r\n e25.Font.Name := 'Tahoma';\r\n e25.Font.Style := [];\r\n e25.HeightPercent := 100.000000000000000000;\r\n e25.ParentFont := False;\r\n e25.ShowFocus := False;\r\n e25.ShowHint := True;\r\n e25.WidthPercent := 100.000000000000000000;\r\n e24.SetParentComponent(WebScrollBox1);\r\n e24.Name := 'e24';\r\n e24.Left := 0;\r\n e24.Top := 1688;\r\n e24.Width := 455;\r\n e24.Height := 22;\r\n e24.Hint := 'Form to call';\r\n e24.Align := alTop;\r\n e24.ChildOrder := 5;\r\n e24.ElementClassName := 'box_bottomborder_font_normal';\r\n e24.ElementFont := efCSS;\r\n e24.Font.Charset := DEFAULT_CHARSET;\r\n e24.Font.Color := clWindowText;\r\n e24.Font.Height := -13;\r\n e24.Font.Name := 'Tahoma';\r\n e24.Font.Style := [];\r\n e24.HeightPercent := 100.000000000000000000;\r\n e24.ParentFont := False;\r\n e24.ShowFocus := False;\r\n e24.ShowHint := True;\r\n e24.WidthPercent := 100.000000000000000000;\r\n e27.SetParentComponent(WebScrollBox1);\r\n e27.Name := 'e27';\r\n e27.Left := 0;\r\n e27.Top := 1964;\r\n e27.Width := 455;\r\n e27.Height := 22;\r\n e27.Hint := 'Caption';\r\n e27.Align := alTop;\r\n e27.ChildOrder := 4;\r\n e27.ElementClassName := 'box_bottomborder_font_normal';\r\n e27.ElementFont := efCSS;\r\n e27.Font.Charset := DEFAULT_CHARSET;\r\n e27.Font.Color := clWindowText;\r\n e27.Font.Height := -13;\r\n e27.Font.Name := 'Tahoma';\r\n e27.Font.Style := [];\r\n e27.HeightPercent := 100.000000000000000000;\r\n e27.ParentFont := False;\r\n e27.ShowFocus := False;\r\n e27.ShowHint := True;\r\n e27.WidthPercent := 100.000000000000000000;\r\n e28.SetParentComponent(WebScrollBox1);\r\n e28.Name := 'e28';\r\n e28.Left := 0;\r\n e28.Top := 1986;\r\n e28.Width := 455;\r\n e28.Height := 22;\r\n e28.Hint := 'Form to call';\r\n e28.Align := alTop;\r\n e28.ChildOrder := 6;\r\n e28.ElementClassName := 'box_bottomborder_font_normal';\r\n e28.ElementFont := efCSS;\r\n e28.Font.Charset := DEFAULT_CHARSET;\r\n e28.Font.Color := clWindowText;\r\n e28.Font.Height := -13;\r\n e28.Font.Name := 'Tahoma';\r\n e28.Font.Style := [];\r\n e28.HeightPercent := 100.000000000000000000;\r\n e28.ParentFont := False;\r\n e28.ShowFocus := False;\r\n e28.ShowHint := True;\r\n e28.WidthPercent := 100.000000000000000000;\r\n e29.SetParentComponent(WebScrollBox1);\r\n e29.Name := 'e29';\r\n e29.Left := 0;\r\n e29.Top := 2008;\r\n e29.Width := 455;\r\n e29.Height := 22;\r\n e29.Hint := 'Icon';\r\n e29.Align := alTop;\r\n e29.ChildOrder := 5;\r\n e29.ElementClassName := 'box_bottomborder_font_normal';\r\n e29.ElementFont := efCSS;\r\n e29.Font.Charset := DEFAULT_CHARSET;\r\n e29.Font.Color := clWindowText;\r\n e29.Font.Height := -13;\r\n e29.Font.Name := 'Tahoma';\r\n e29.Font.Style := [];\r\n e29.HeightPercent := 100.000000000000000000;\r\n e29.ParentFont := False;\r\n e29.ShowFocus := False;\r\n e29.ShowHint := True;\r\n e29.WidthPercent := 100.000000000000000000;\r\n e31.SetParentComponent(WebScrollBox1);\r\n e31.Name := 'e31';\r\n e31.Left := 0;\r\n e31.Top := 2262;\r\n e31.Width := 455;\r\n e31.Height := 22;\r\n e31.Hint := 'Caption';\r\n e31.Align := alTop;\r\n e31.ChildOrder := 6;\r\n e31.ElementClassName := 'box_bottomborder_font_normal';\r\n e31.ElementFont := efCSS;\r\n e31.Font.Charset := DEFAULT_CHARSET;\r\n e31.Font.Color := clWindowText;\r\n e31.Font.Height := -13;\r\n e31.Font.Name := 'Tahoma';\r\n e31.Font.Style := [];\r\n e31.HeightPercent := 100.000000000000000000;\r\n e31.ParentFont := False;\r\n e31.ShowFocus := False;\r\n e31.ShowHint := True;\r\n e31.WidthPercent := 100.000000000000000000;\r\n e32.SetParentComponent(WebScrollBox1);\r\n e32.Name := 'e32';\r\n e32.Left := 0;\r\n e32.Top := 2284;\r\n e32.Width := 455;\r\n e32.Height := 22;\r\n e32.Hint := 'Form to call';\r\n e32.Align := alTop;\r\n e32.ChildOrder := 5;\r\n e32.ElementClassName := 'box_bottomborder_font_normal';\r\n e32.ElementFont := efCSS;\r\n e32.Font.Charset := DEFAULT_CHARSET;\r\n e32.Font.Color := clWindowText;\r\n e32.Font.Height := -13;\r\n e32.Font.Name := 'Tahoma';\r\n e32.Font.Style := [];\r\n e32.HeightPercent := 100.000000000000000000;\r\n e32.ParentFont := False;\r\n e32.ShowFocus := False;\r\n e32.ShowHint := True;\r\n e32.WidthPercent := 100.000000000000000000;\r\n e33.SetParentComponent(WebScrollBox1);\r\n e33.Name := 'e33';\r\n e33.Left := 0;\r\n e33.Top := 2306;\r\n e33.Width := 455;\r\n e33.Height := 22;\r\n e33.Hint := 'Icon';\r\n e33.Align := alTop;\r\n e33.ChildOrder := 5;\r\n e33.ElementClassName := 'box_bottomborder_font_normal';\r\n e33.ElementFont := efCSS;\r\n e33.Font.Charset := DEFAULT_CHARSET;\r\n e33.Font.Color := clWindowText;\r\n e33.Font.Height := -13;\r\n e33.Font.Name := 'Tahoma';\r\n e33.Font.Style := [];\r\n e33.HeightPercent := 100.000000000000000000;\r\n e33.ParentFont := False;\r\n e33.ShowFocus := False;\r\n e33.ShowHint := True;\r\n e33.WidthPercent := 100.000000000000000000;\r\n e41.SetParentComponent(WebScrollBox1);\r\n e41.Name := 'e41';\r\n e41.Left := 0;\r\n e41.Top := 2902;\r\n e41.Width := 455;\r\n e41.Height := 22;\r\n e41.Hint := 'Icon';\r\n e41.Align := alTop;\r\n e41.ChildOrder := 5;\r\n e41.ElementClassName := 'box_bottomborder_font_normal';\r\n e41.ElementFont := efCSS;\r\n e41.Font.Charset := DEFAULT_CHARSET;\r\n e41.Font.Color := clWindowText;\r\n e41.Font.Height := -13;\r\n e41.Font.Name := 'Tahoma';\r\n e41.Font.Style := [];\r\n e41.HeightPercent := 100.000000000000000000;\r\n e41.ParentFont := False;\r\n e41.ShowFocus := False;\r\n e41.ShowHint := True;\r\n e41.WidthPercent := 100.000000000000000000;\r\n e40.SetParentComponent(WebScrollBox1);\r\n e40.Name := 'e40';\r\n e40.Left := 0;\r\n e40.Top := 2880;\r\n e40.Width := 455;\r\n e40.Height := 22;\r\n e40.Hint := 'Form to call';\r\n e40.Align := alTop;\r\n e40.ChildOrder := 5;\r\n e40.ElementClassName := 'box_bottomborder_font_normal';\r\n e40.ElementFont := efCSS;\r\n e40.Font.Charset := DEFAULT_CHARSET;\r\n e40.Font.Color := clWindowText;\r\n e40.Font.Height := -13;\r\n e40.Font.Name := 'Tahoma';\r\n e40.Font.Style := [];\r\n e40.HeightPercent := 100.000000000000000000;\r\n e40.ParentFont := False;\r\n e40.ShowFocus := False;\r\n e40.ShowHint := True;\r\n e40.WidthPercent := 100.000000000000000000;\r\n e39.SetParentComponent(WebScrollBox1);\r\n e39.Name := 'e39';\r\n e39.Left := 0;\r\n e39.Top := 2858;\r\n e39.Width := 455;\r\n e39.Height := 22;\r\n e39.Hint := 'Caption';\r\n e39.Align := alTop;\r\n e39.ChildOrder := 5;\r\n e39.ElementClassName := 'box_bottomborder_font_normal';\r\n e39.ElementFont := efCSS;\r\n e39.Font.Charset := DEFAULT_CHARSET;\r\n e39.Font.Color := clWindowText;\r\n e39.Font.Height := -13;\r\n e39.Font.Name := 'Tahoma';\r\n e39.Font.Style := [];\r\n e39.HeightPercent := 100.000000000000000000;\r\n e39.ParentFont := False;\r\n e39.ShowFocus := False;\r\n e39.ShowHint := True;\r\n e39.WidthPercent := 100.000000000000000000;\r\n e37.SetParentComponent(WebScrollBox1);\r\n e37.Name := 'e37';\r\n e37.Left := 0;\r\n e37.Top := 2604;\r\n e37.Width := 455;\r\n e37.Height := 22;\r\n e37.Hint := 'Icon';\r\n e37.Align := alTop;\r\n e37.ChildOrder := 5;\r\n e37.ElementClassName := 'box_bottomborder_font_normal';\r\n e37.ElementFont := efCSS;\r\n e37.Font.Charset := DEFAULT_CHARSET;\r\n e37.Font.Color := clWindowText;\r\n e37.Font.Height := -13;\r\n e37.Font.Name := 'Tahoma';\r\n e37.Font.Style := [];\r\n e37.HeightPercent := 100.000000000000000000;\r\n e37.ParentFont := False;\r\n e37.ShowFocus := False;\r\n e37.ShowHint := True;\r\n e37.WidthPercent := 100.000000000000000000;\r\n e36.SetParentComponent(WebScrollBox1);\r\n e36.Name := 'e36';\r\n e36.Left := 0;\r\n e36.Top := 2582;\r\n e36.Width := 455;\r\n e36.Height := 22;\r\n e36.Hint := 'Form to call';\r\n e36.Align := alTop;\r\n e36.ChildOrder := 5;\r\n e36.ElementClassName := 'box_bottomborder_font_normal';\r\n e36.ElementFont := efCSS;\r\n e36.Font.Charset := DEFAULT_CHARSET;\r\n e36.Font.Color := clWindowText;\r\n e36.Font.Height := -13;\r\n e36.Font.Name := 'Tahoma';\r\n e36.Font.Style := [];\r\n e36.HeightPercent := 100.000000000000000000;\r\n e36.ParentFont := False;\r\n e36.ShowFocus := False;\r\n e36.ShowHint := True;\r\n e36.WidthPercent := 100.000000000000000000;\r\n e35.SetParentComponent(WebScrollBox1);\r\n e35.Name := 'e35';\r\n e35.Left := 0;\r\n e35.Top := 2560;\r\n e35.Width := 455;\r\n e35.Height := 22;\r\n e35.Hint := 'Caption';\r\n e35.Align := alTop;\r\n e35.ChildOrder := 5;\r\n e35.ElementClassName := 'box_bottomborder_font_normal';\r\n e35.ElementFont := efCSS;\r\n e35.Font.Charset := DEFAULT_CHARSET;\r\n e35.Font.Color := clWindowText;\r\n e35.Font.Height := -13;\r\n e35.Font.Name := 'Tahoma';\r\n e35.Font.Style := [];\r\n e35.HeightPercent := 100.000000000000000000;\r\n e35.ParentFont := False;\r\n e35.ShowFocus := False;\r\n e35.ShowHint := True;\r\n e35.WidthPercent := 100.000000000000000000;\r\n me5.SetParentComponent(WebScrollBox1);\r\n me5.Name := 'me5';\r\n me5.Left := 0;\r\n me5.Top := 322;\r\n me5.Width := 455;\r\n me5.Height := 22;\r\n me5.Hint := 'Master Item Caption';\r\n me5.Align := alTop;\r\n me5.ChildOrder := 4;\r\n me5.ElementClassName := 'box_bottomborder_font_normal';\r\n me5.ElementFont := efCSS;\r\n me5.Font.Charset := DEFAULT_CHARSET;\r\n me5.Font.Color := clWindowText;\r\n me5.Font.Height := -13;\r\n me5.Font.Name := 'Tahoma';\r\n me5.Font.Style := [];\r\n me5.HeightPercent := 100.000000000000000000;\r\n me5.ParentFont := False;\r\n me5.ShowFocus := False;\r\n me5.ShowHint := True;\r\n me5.WidthPercent := 100.000000000000000000;\r\n me4.SetParentComponent(WebScrollBox1);\r\n me4.Name := 'me4';\r\n me4.Left := 0;\r\n me4.Top := 122;\r\n me4.Width := 455;\r\n me4.Height := 200;\r\n me4.Hint := 'API call / SQL script';\r\n me4.Align := alTop;\r\n me4.ElementClassName := 'box_bottomborder_font_big';\r\n me4.ElementFont := efCSS;\r\n me4.HeightPercent := 100.000000000000000000;\r\n me4.SelLength := 0;\r\n me4.SelStart := 0;\r\n me4.ShowHint := True;\r\n me4.WidthPercent := 100.000000000000000000;\r\n e10.SetParentComponent(WebScrollBox1);\r\n e10.Name := 'e10';\r\n e10.Left := 0;\r\n e10.Top := 540;\r\n e10.Width := 455;\r\n e10.Height := 200;\r\n e10.Hint := 'API call / SQL script';\r\n e10.Align := alTop;\r\n e10.ElementClassName := 'box_bottomborder_font_big';\r\n e10.ElementFont := efCSS;\r\n e10.HeightPercent := 100.000000000000000000;\r\n e10.SelLength := 0;\r\n e10.SelStart := 0;\r\n e10.ShowHint := True;\r\n e10.WidthPercent := 100.000000000000000000;\r\n e14.SetParentComponent(WebScrollBox1);\r\n e14.Name := 'e14';\r\n e14.Left := 0;\r\n e14.Top := 838;\r\n e14.Width := 455;\r\n e14.Height := 200;\r\n e14.Hint := 'API call / SQL script';\r\n e14.Align := alTop;\r\n e14.ElementClassName := 'box_bottomborder_font_big';\r\n e14.ElementFont := efCSS;\r\n e14.HeightPercent := 100.000000000000000000;\r\n e14.SelLength := 0;\r\n e14.SelStart := 0;\r\n e14.ShowHint := True;\r\n e14.WidthPercent := 100.000000000000000000;\r\n e22.SetParentComponent(WebScrollBox1);\r\n e22.Name := 'e22';\r\n e22.Left := 0;\r\n e22.Top := 1434;\r\n e22.Width := 455;\r\n e22.Height := 200;\r\n e22.Hint := 'API call / SQL script';\r\n e22.Align := alTop;\r\n e22.ElementClassName := 'box_bottomborder_font_big';\r\n e22.ElementFont := efCSS;\r\n e22.HeightPercent := 100.000000000000000000;\r\n e22.SelLength := 0;\r\n e22.SelStart := 0;\r\n e22.ShowHint := True;\r\n e22.WidthPercent := 100.000000000000000000;\r\n e18.SetParentComponent(WebScrollBox1);\r\n e18.Name := 'e18';\r\n e18.Left := 0;\r\n e18.Top := 1136;\r\n e18.Width := 455;\r\n e18.Height := 200;\r\n e18.Hint := 'API call / SQL script';\r\n e18.Align := alTop;\r\n e18.ElementClassName := 'box_bottomborder_font_big';\r\n e18.ElementFont := efCSS;\r\n e18.HeightPercent := 100.000000000000000000;\r\n e18.SelLength := 0;\r\n e18.SelStart := 0;\r\n e18.ShowHint := True;\r\n e18.WidthPercent := 100.000000000000000000;\r\n e26.SetParentComponent(WebScrollBox1);\r\n e26.Name := 'e26';\r\n e26.Left := 0;\r\n e26.Top := 1732;\r\n e26.Width := 455;\r\n e26.Height := 200;\r\n e26.Hint := 'API call / SQL script';\r\n e26.Align := alTop;\r\n e26.ElementClassName := 'box_bottomborder_font_big';\r\n e26.ElementFont := efCSS;\r\n e26.HeightPercent := 100.000000000000000000;\r\n e26.SelLength := 0;\r\n e26.SelStart := 0;\r\n e26.ShowHint := True;\r\n e26.WidthPercent := 100.000000000000000000;\r\n e34.SetParentComponent(WebScrollBox1);\r\n e34.Name := 'e34';\r\n e34.Left := 0;\r\n e34.Top := 2328;\r\n e34.Width := 455;\r\n e34.Height := 200;\r\n e34.Hint := 'API call / SQL script';\r\n e34.Align := alTop;\r\n e34.ElementClassName := 'box_bottomborder_font_big';\r\n e34.ElementFont := efCSS;\r\n e34.HeightPercent := 100.000000000000000000;\r\n e34.SelLength := 0;\r\n e34.SelStart := 0;\r\n e34.ShowHint := True;\r\n e34.WidthPercent := 100.000000000000000000;\r\n e30.SetParentComponent(WebScrollBox1);\r\n e30.Name := 'e30';\r\n e30.Left := 0;\r\n e30.Top := 2030;\r\n e30.Width := 455;\r\n e30.Height := 200;\r\n e30.Hint := 'API call / SQL script';\r\n e30.Align := alTop;\r\n e30.ElementClassName := 'box_bottomborder_font_big';\r\n e30.ElementFont := efCSS;\r\n e30.HeightPercent := 100.000000000000000000;\r\n e30.SelLength := 0;\r\n e30.SelStart := 0;\r\n e30.ShowHint := True;\r\n e30.WidthPercent := 100.000000000000000000;\r\n e38.SetParentComponent(WebScrollBox1);\r\n e38.Name := 'e38';\r\n e38.Left := 0;\r\n e38.Top := 2626;\r\n e38.Width := 455;\r\n e38.Height := 200;\r\n e38.Hint := 'API call / SQL script';\r\n e38.Align := alTop;\r\n e38.ElementClassName := 'box_bottomborder_font_big';\r\n e38.ElementFont := efCSS;\r\n e38.HeightPercent := 100.000000000000000000;\r\n e38.SelLength := 0;\r\n e38.SelStart := 0;\r\n e38.ShowHint := True;\r\n e38.WidthPercent := 100.000000000000000000;\r\n e42.SetParentComponent(WebScrollBox1);\r\n e42.Name := 'e42';\r\n e42.Left := 0;\r\n e42.Top := 2924;\r\n e42.Width := 455;\r\n e42.Height := 200;\r\n e42.Hint := 'API call / SQL script';\r\n e42.Align := alTop;\r\n e42.ElementClassName := 'box_bottomborder_font_big';\r\n e42.ElementFont := efCSS;\r\n e42.HeightPercent := 100.000000000000000000;\r\n e42.SelLength := 0;\r\n e42.SelStart := 0;\r\n e42.ShowHint := True;\r\n e42.WidthPercent := 100.000000000000000000;\r\n e6_2.SetParentComponent(WebScrollBox1);\r\n e6_2.Name := 'e6_2';\r\n e6_2.Left := 0;\r\n e6_2.Top := 404;\r\n e6_2.Width := 455;\r\n e6_2.Height := 22;\r\n e6_2.Hint := 'report Template Name';\r\n e6_2.Align := alTop;\r\n e6_2.ChildOrder := 4;\r\n e6_2.ElementClassName := 'box_bottomborder_font_normal';\r\n e6_2.ElementFont := efCSS;\r\n e6_2.Font.Charset := DEFAULT_CHARSET;\r\n e6_2.Font.Color := clWindowText;\r\n e6_2.Font.Height := -13;\r\n e6_2.Font.Name := 'Tahoma';\r\n e6_2.Font.Style := [];\r\n e6_2.HeightPercent := 100.000000000000000000;\r\n e6_2.ParentFont := False;\r\n e6_2.ShowFocus := False;\r\n e6_2.ShowHint := True;\r\n e6_2.WidthPercent := 100.000000000000000000;\r\n pnlListButtons.SetParentComponent(WebPanel1);\r\n pnlListButtons.Name := 'pnlListButtons';\r\n pnlListButtons.Left := 0;\r\n pnlListButtons.Top := 4792;\r\n pnlListButtons.Width := 455;\r\n pnlListButtons.Height := 41;\r\n pnlListButtons.Align := alBottom;\r\n pnlListButtons.BorderColor := clWhite;\r\n pnlListButtons.BorderStyle := bsNone;\r\n pnlListButtons.ChildOrder := 5;\r\n pnlListButtons.Color := clWhite;\r\n pnlListButtons.TabOrder := 1;\r\n WebBitBtn3.SetParentComponent(pnlListButtons);\r\n WebBitBtn3.Name := 'WebBitBtn3';\r\n WebBitBtn3.Left := 365;\r\n WebBitBtn3.Top := 0;\r\n WebBitBtn3.Width := 90;\r\n WebBitBtn3.Height := 41;\r\n WebBitBtn3.Cursor := crHandPoint;\r\n WebBitBtn3.Hint := 'New as New Item';\r\n WebBitBtn3.Align := alRight;\r\n WebBitBtn3.Caption := '';\r\n WebBitBtn3.ChildOrder := 87;\r\n WebBitBtn3.Color := clNone;\r\n WebBitBtn3.ElementClassName := 'btn_icon';\r\n WebBitBtn3.Font.Charset := DEFAULT_CHARSET;\r\n WebBitBtn3.Font.Color := clGray;\r\n WebBitBtn3.Font.Height := -16;\r\n WebBitBtn3.Font.Name := 'Tahoma';\r\n WebBitBtn3.Font.Style := [];\r\n WebBitBtn3.HeightPercent := 100.000000000000000000;\r\n WebBitBtn3.MaterialGlyph := 'add_circle';\r\n WebBitBtn3.MaterialGlyphSize := 1;\r\n WebBitBtn3.ParentFont := False;\r\n WebBitBtn3.ShowHint := True;\r\n WebBitBtn3.TabOrder := 6;\r\n WebBitBtn3.WidthPercent := 9.000000000000000000;\r\n SetEvent(WebBitBtn3, Self, 'OnClick', 'WebBitBtn3Click');\r\n WebBitBtn4.SetParentComponent(pnlListButtons);\r\n WebBitBtn4.Name := 'WebBitBtn4';\r\n WebBitBtn4.Left := 275;\r\n WebBitBtn4.Top := 0;\r\n WebBitBtn4.Width := 90;\r\n WebBitBtn4.Height := 41;\r\n WebBitBtn4.Cursor := crHandPoint;\r\n WebBitBtn4.Hint := 'Update Item';\r\n WebBitBtn4.Align := alRight;\r\n WebBitBtn4.Caption := '';\r\n WebBitBtn4.ChildOrder := 87;\r\n WebBitBtn4.Color := clNone;\r\n WebBitBtn4.ElementClassName := 'btn_icon';\r\n WebBitBtn4.Font.Charset := DEFAULT_CHARSET;\r\n WebBitBtn4.Font.Color := clGray;\r\n WebBitBtn4.Font.Height := -16;\r\n WebBitBtn4.Font.Name := 'Tahoma';\r\n WebBitBtn4.Font.Style := [];\r\n WebBitBtn4.HeightPercent := 100.000000000000000000;\r\n WebBitBtn4.MaterialGlyph := 'check_circle';\r\n WebBitBtn4.MaterialGlyphSize := 1;\r\n WebBitBtn4.ParentFont := False;\r\n WebBitBtn4.ShowHint := True;\r\n WebBitBtn4.TabOrder := 6;\r\n WebBitBtn4.WidthPercent := 9.000000000000000000;\r\n SetEvent(WebBitBtn4, Self, 'OnClick', 'WebBitBtn4Click');\r\n WebMemo4.SetParentComponent(WebPanel1);\r\n WebMemo4.Name := 'WebMemo4';\r\n WebMemo4.Left := 0;\r\n WebMemo4.Top := 4688;\r\n WebMemo4.Width := 455;\r\n WebMemo4.Height := 88;\r\n WebMemo4.Align := alBottom;\r\n WebMemo4.BorderStyle := bsNone;\r\n WebMemo4.ElementClassName := 'box_bottomborder_font_normal';\r\n WebMemo4.ElementFont := efCSS;\r\n WebMemo4.Font.Charset := DEFAULT_CHARSET;\r\n WebMemo4.Font.Color := clWindowText;\r\n WebMemo4.Font.Height := -13;\r\n WebMemo4.Font.Name := 'Tahoma';\r\n WebMemo4.Font.Style := [];\r\n WebMemo4.HeightPercent := 100.000000000000000000;\r\n WebMemo4.Lines.BeginUpdate;\r\n try\r\n WebMemo4.Lines.Clear;\r\n WebMemo4.Lines.Add('API Call: ReportService.'#39'Function Name'#39', '#39'Param1'#39'; '#39'param2'#39'; ...');\r\n WebMemo4.Lines.Add('SQL: Use @result variable to return data. Return data format: ');\r\n WebMemo4.Lines.Add('['#39'_SYSTEM_VARIABLE_NAME'#39']'#39'Value'#39);\r\n WebMemo4.Lines.Add('Example: set @result = '#39'['#39' + '#39'_CURENT_PROCEDURENUMBER'#39' + '#39']'#39' + ');\r\n WebMemo4.Lines.Add(#39'string_value'#39';');\r\n finally\r\n WebMemo4.Lines.EndUpdate;\r\n end;\r\n WebMemo4.ParentFont := False;\r\n WebMemo4.ScrollBars := ssNone;\r\n WebMemo4.SelLength := 0;\r\n WebMemo4.SelStart := 0;\r\n WebMemo4.ShowFocus := False;\r\n WebMemo4.WidthPercent := 100.000000000000000000;\r\n psManagement.SetParentComponent(pcSettings);\r\n psManagement.Name := 'psManagement';\r\n psManagement.Left := 0;\r\n psManagement.Top := 20;\r\n psManagement.Width := 1383;\r\n psManagement.Height := 4898;\r\n psManagement.ElementClassName := 'BOX_NO_BORDER';\r\n psManagement.Caption := 'Management';\r\n psManagement.ChildOrder := 2;\r\n lbQPKLSectionName.SetParentComponent(psManagement);\r\n lbQPKLSectionName.Name := 'lbQPKLSectionName';\r\n lbQPKLSectionName.Left := 3;\r\n lbQPKLSectionName.Top := 80;\r\n lbQPKLSectionName.Width := 24;\r\n lbQPKLSectionName.Height := 13;\r\n lbQPKLSectionName.Caption := 'From';\r\n lbQPKLSectionName.Font.Charset := DEFAULT_CHARSET;\r\n lbQPKLSectionName.Font.Color := clSilver;\r\n lbQPKLSectionName.Font.Height := -11;\r\n lbQPKLSectionName.Font.Name := 'Tahoma';\r\n lbQPKLSectionName.Font.Style := [];\r\n lbQPKLSectionName.HeightPercent := 100.000000000000000000;\r\n lbQPKLSectionName.ParentFont := False;\r\n lbQPKLSectionName.WidthPercent := 100.000000000000000000;\r\n WebLabel13.SetParentComponent(psManagement);\r\n WebLabel13.Name := 'WebLabel13';\r\n WebLabel13.Left := 3;\r\n WebLabel13.Top := 127;\r\n WebLabel13.Width := 12;\r\n WebLabel13.Height := 13;\r\n WebLabel13.Caption := 'To';\r\n WebLabel13.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel13.Font.Color := clSilver;\r\n WebLabel13.Font.Height := -11;\r\n WebLabel13.Font.Name := 'Tahoma';\r\n WebLabel13.Font.Style := [];\r\n WebLabel13.HeightPercent := 100.000000000000000000;\r\n WebLabel13.ParentFont := False;\r\n WebLabel13.WidthPercent := 100.000000000000000000;\r\n btnLoadFromDB.SetParentComponent(psManagement);\r\n btnLoadFromDB.Name := 'btnLoadFromDB';\r\n btnLoadFromDB.Left := 99;\r\n btnLoadFromDB.Top := 16;\r\n btnLoadFromDB.Width := 90;\r\n btnLoadFromDB.Height := 41;\r\n btnLoadFromDB.Cursor := crHandPoint;\r\n btnLoadFromDB.Hint := 'Load Data Control Settings from the database to the Browser Local Storage';\r\n btnLoadFromDB.Caption := 'Load from DB';\r\n btnLoadFromDB.ChildOrder := 87;\r\n btnLoadFromDB.Color := clNone;\r\n btnLoadFromDB.ElementClassName := 'btn btn-outline-warning';\r\n btnLoadFromDB.Font.Charset := DEFAULT_CHARSET;\r\n btnLoadFromDB.Font.Color := clGray;\r\n btnLoadFromDB.Font.Height := -16;\r\n btnLoadFromDB.Font.Name := 'Tahoma';\r\n btnLoadFromDB.Font.Style := [];\r\n btnLoadFromDB.HeightPercent := 100.000000000000000000;\r\n btnLoadFromDB.MaterialGlyph := 'check';\r\n btnLoadFromDB.MaterialGlyphSize := 1;\r\n btnLoadFromDB.ParentFont := False;\r\n btnLoadFromDB.ShowHint := True;\r\n btnLoadFromDB.TabOrder := 6;\r\n btnLoadFromDB.WidthPercent := 9.000000000000000000;\r\n SetEvent(btnLoadFromDB, Self, 'OnClick', 'btnLoadFromDBClick');\r\n btnSaveToDB.SetParentComponent(psManagement);\r\n btnSaveToDB.Name := 'btnSaveToDB';\r\n btnSaveToDB.Left := 3;\r\n btnSaveToDB.Top := 15;\r\n btnSaveToDB.Width := 90;\r\n btnSaveToDB.Height := 41;\r\n btnSaveToDB.Cursor := crHandPoint;\r\n btnSaveToDB.Hint := 'Save current Data Control Settings from the Browser Local Storage to the database';\r\n btnSaveToDB.Caption := 'Save to DB';\r\n btnSaveToDB.ChildOrder := 87;\r\n btnSaveToDB.Color := clNone;\r\n btnSaveToDB.ElementClassName := 'btn btn-outline-warning';\r\n btnSaveToDB.Font.Charset := DEFAULT_CHARSET;\r\n btnSaveToDB.Font.Color := clGray;\r\n btnSaveToDB.Font.Height := -16;\r\n btnSaveToDB.Font.Name := 'Tahoma';\r\n btnSaveToDB.Font.Style := [];\r\n btnSaveToDB.HeightPercent := 100.000000000000000000;\r\n btnSaveToDB.MaterialGlyph := 'check';\r\n btnSaveToDB.MaterialGlyphSize := 1;\r\n btnSaveToDB.ParentFont := False;\r\n btnSaveToDB.ShowHint := True;\r\n btnSaveToDB.TabOrder := 6;\r\n btnSaveToDB.WidthPercent := 9.000000000000000000;\r\n SetEvent(btnSaveToDB, Self, 'OnClick', 'btnSaveToDBClick');\r\n cbFromFacility.SetParentComponent(psManagement);\r\n cbFromFacility.Name := 'cbFromFacility';\r\n cbFromFacility.Left := 3;\r\n cbFromFacility.Top := 94;\r\n cbFromFacility.Width := 502;\r\n cbFromFacility.Height := 27;\r\n cbFromFacility.ElementClassName := 'box_bottomborder_font_normal';\r\n cbFromFacility.ElementFont := efCSS;\r\n cbFromFacility.HeightPercent := 100.000000000000000000;\r\n cbFromFacility.ShowFocus := False;\r\n cbFromFacility.WidthPercent := 100.000000000000000000;\r\n cbFromFacility.ItemIndex := -1;\r\n WebMemo2.SetParentComponent(psManagement);\r\n WebMemo2.Name := 'WebMemo2';\r\n WebMemo2.Left := 3;\r\n WebMemo2.Top := 255;\r\n WebMemo2.Width := 614;\r\n WebMemo2.Height := 177;\r\n WebMemo2.BorderStyle := bsNone;\r\n WebMemo2.ElementClassName := 'block_memo';\r\n WebMemo2.ElementFont := efCSS;\r\n WebMemo2.HeightPercent := 100.000000000000000000;\r\n WebMemo2.Lines.BeginUpdate;\r\n try\r\n WebMemo2.Lines.Clear;\r\n WebMemo2.Lines.Add('[ Save - Current Application settings will be saved in the database. ');\r\n WebMemo2.Lines.Add(' This is usually done automatically when user changes ');\r\n WebMemo2.Lines.Add(' application settings.');\r\n WebMemo2.Lines.Add(' Load - Application settings will be loaded from the database. This ');\r\n WebMemo2.Lines.Add(' usually happens automatically when user logs in.');\r\n WebMemo2.Lines.Add(' Copy - All applicaion settings including main menu and design data ');\r\n WebMemo2.Lines.Add(' will be copied from the '#39'source'#39' facility to the '#39'target'#39'.');\r\n WebMemo2.Lines.Add(']');\r\n finally\r\n WebMemo2.Lines.EndUpdate;\r\n end;\r\n WebMemo2.SelLength := 0;\r\n WebMemo2.SelStart := 456;\r\n WebMemo2.WidthPercent := 100.000000000000000000;\r\n btnCopy.SetParentComponent(psManagement);\r\n btnCopy.Name := 'btnCopy';\r\n btnCopy.Left := 3;\r\n btnCopy.Top := 186;\r\n btnCopy.Width := 90;\r\n btnCopy.Height := 41;\r\n btnCopy.Cursor := crHandPoint;\r\n btnCopy.Hint := 'Copy Appliaction all settings between facilities';\r\n btnCopy.Caption := 'Copy';\r\n btnCopy.ChildOrder := 87;\r\n btnCopy.Color := clNone;\r\n btnCopy.ElementClassName := 'btn btn-outline-warning';\r\n btnCopy.Font.Charset := DEFAULT_CHARSET;\r\n btnCopy.Font.Color := clGray;\r\n btnCopy.Font.Height := -16;\r\n btnCopy.Font.Name := 'Tahoma';\r\n btnCopy.Font.Style := [];\r\n btnCopy.HeightPercent := 100.000000000000000000;\r\n btnCopy.MaterialGlyph := 'check';\r\n btnCopy.MaterialGlyphSize := 1;\r\n btnCopy.ParentFont := False;\r\n btnCopy.ShowHint := True;\r\n btnCopy.TabOrder := 6;\r\n btnCopy.WidthPercent := 9.000000000000000000;\r\n SetEvent(btnCopy, Self, 'OnClick', 'btnCopyClick');\r\n cbToFacility.SetParentComponent(psManagement);\r\n cbToFacility.Name := 'cbToFacility';\r\n cbToFacility.Left := 3;\r\n cbToFacility.Top := 146;\r\n cbToFacility.Width := 502;\r\n cbToFacility.Height := 27;\r\n cbToFacility.ElementClassName := 'box_bottomborder_font_normal';\r\n cbToFacility.ElementFont := efCSS;\r\n cbToFacility.HeightPercent := 100.000000000000000000;\r\n cbToFacility.ShowFocus := False;\r\n cbToFacility.WidthPercent := 100.000000000000000000;\r\n cbToFacility.ItemIndex := -1;\r\n btnRemoveFromDB.SetParentComponent(psManagement);\r\n btnRemoveFromDB.Name := 'btnRemoveFromDB';\r\n btnRemoveFromDB.Left := 195;\r\n btnRemoveFromDB.Top := 16;\r\n btnRemoveFromDB.Width := 90;\r\n btnRemoveFromDB.Height := 41;\r\n btnRemoveFromDB.Cursor := crHandPoint;\r\n btnRemoveFromDB.Hint := 'Remove connected user settings from the database';\r\n btnRemoveFromDB.Caption := 'Remove from DB';\r\n btnRemoveFromDB.ChildOrder := 87;\r\n btnRemoveFromDB.Color := clNone;\r\n btnRemoveFromDB.ElementClassName := 'btn btn-outline-danger';\r\n btnRemoveFromDB.Font.Charset := DEFAULT_CHARSET;\r\n btnRemoveFromDB.Font.Color := clGray;\r\n btnRemoveFromDB.Font.Height := -16;\r\n btnRemoveFromDB.Font.Name := 'Tahoma';\r\n btnRemoveFromDB.Font.Style := [];\r\n btnRemoveFromDB.HeightPercent := 100.000000000000000000;\r\n btnRemoveFromDB.MaterialGlyph := 'check';\r\n btnRemoveFromDB.MaterialGlyphSize := 1;\r\n btnRemoveFromDB.ParentFont := False;\r\n btnRemoveFromDB.ShowHint := True;\r\n btnRemoveFromDB.TabOrder := 6;\r\n btnRemoveFromDB.WidthPercent := 9.000000000000000000;\r\n SetEvent(btnRemoveFromDB, Self, 'OnClick', 'btnRemoveFromDBClick');\r\n psQAI.SetParentComponent(pcSettings);\r\n psQAI.Name := 'psQAI';\r\n psQAI.Left := 0;\r\n psQAI.Top := 20;\r\n psQAI.Width := 1383;\r\n psQAI.Height := 4898;\r\n psQAI.Caption := 'Qlinical AI';\r\n psQAI.ChildOrder := 3;\r\n pcQAI.SetParentComponent(psQAI);\r\n pcQAI.Name := 'pcQAI';\r\n pcQAI.Left := 21;\r\n pcQAI.Top := 28;\r\n pcQAI.Width := 772;\r\n pcQAI.Height := 467;\r\n pcQAI.HeightPercent := 95.000000000000000000;\r\n pcQAI.WidthPercent := 95.000000000000000000;\r\n pcQAI.ChildOrder := 1;\r\n pcQAI.TabIndex := 0;\r\n pcQAI.TabOrder := 0;\r\n SetEvent(pcQAI, Self, 'OnChange', 'pcQAIChange');\r\n pcQAISheet3.SetParentComponent(pcQAI);\r\n pcQAISheet3.Name := 'pcQAISheet3';\r\n pcQAISheet3.Left := 0;\r\n pcQAISheet3.Top := 20;\r\n pcQAISheet3.Width := 772;\r\n pcQAISheet3.Height := 447;\r\n pcQAISheet3.Align := alClient;\r\n pcQAISheet3.Caption := 'Chat';\r\n pcQAISheet3.ChildOrder := 2;\r\n WebLabel17.SetParentComponent(pcQAISheet3);\r\n WebLabel17.Name := 'WebLabel17';\r\n WebLabel17.Left := 205;\r\n WebLabel17.Top := 14;\r\n WebLabel17.Width := 38;\r\n WebLabel17.Height := 19;\r\n WebLabel17.Caption := 'Color';\r\n WebLabel17.ElementLabelClassName := 'text_normal';\r\n WebLabel17.ElementFont := efCSS;\r\n WebLabel17.HeightPercent := 100.000000000000000000;\r\n WebLabel17.WidthPercent := 100.000000000000000000;\r\n WebLabel19.SetParentComponent(pcQAISheet3);\r\n WebLabel19.Name := 'WebLabel19';\r\n WebLabel19.Left := 4;\r\n WebLabel19.Top := 39;\r\n WebLabel19.Width := 95;\r\n WebLabel19.Height := 19;\r\n WebLabel19.Caption := 'Wait Message';\r\n WebLabel19.ElementLabelClassName := 'text_normal';\r\n WebLabel19.ElementFont := efCSS;\r\n WebLabel19.HeightPercent := 100.000000000000000000;\r\n WebLabel19.WidthPercent := 100.000000000000000000;\r\n WebLabel20.SetParentComponent(pcQAISheet3);\r\n WebLabel20.Name := 'WebLabel20';\r\n WebLabel20.Left := 4;\r\n WebLabel20.Top := 67;\r\n WebLabel20.Width := 181;\r\n WebLabel20.Height := 19;\r\n WebLabel20.Caption := 'Server Response Message';\r\n WebLabel20.ElementLabelClassName := 'text_normal';\r\n WebLabel20.ElementFont := efCSS;\r\n WebLabel20.HeightPercent := 100.000000000000000000;\r\n WebLabel20.WidthPercent := 100.000000000000000000;\r\n WebLabel21.SetParentComponent(pcQAISheet3);\r\n WebLabel21.Name := 'WebLabel21';\r\n WebLabel21.Left := 4;\r\n WebLabel21.Top := 95;\r\n WebLabel21.Width := 127;\r\n WebLabel21.Height := 19;\r\n WebLabel21.Caption := 'Question Message';\r\n WebLabel21.ElementLabelClassName := 'text_normal';\r\n WebLabel21.ElementFont := efCSS;\r\n WebLabel21.HeightPercent := 100.000000000000000000;\r\n WebLabel21.WidthPercent := 100.000000000000000000;\r\n WebLabel22.SetParentComponent(pcQAISheet3);\r\n WebLabel22.Name := 'WebLabel22';\r\n WebLabel22.Left := 3;\r\n WebLabel22.Top := 126;\r\n WebLabel22.Width := 117;\r\n WebLabel22.Height := 19;\r\n WebLabel22.Caption := 'Answer Message';\r\n WebLabel22.ElementLabelClassName := 'text_normal';\r\n WebLabel22.ElementFont := efCSS;\r\n WebLabel22.HeightPercent := 100.000000000000000000;\r\n WebLabel22.WidthPercent := 100.000000000000000000;\r\n WebLabel23.SetParentComponent(pcQAISheet3);\r\n WebLabel23.Name := 'WebLabel23';\r\n WebLabel23.Left := 274;\r\n WebLabel23.Top := 14;\r\n WebLabel23.Width := 101;\r\n WebLabel23.Height := 19;\r\n WebLabel23.Caption := 'Icon file name';\r\n WebLabel23.ElementLabelClassName := 'text_normal';\r\n WebLabel23.ElementFont := efCSS;\r\n WebLabel23.HeightPercent := 100.000000000000000000;\r\n WebLabel23.WidthPercent := 100.000000000000000000;\r\n WebLabel24.SetParentComponent(pcQAISheet3);\r\n WebLabel24.Name := 'WebLabel24';\r\n WebLabel24.Left := 517;\r\n WebLabel24.Top := 14;\r\n WebLabel24.Width := 74;\r\n WebLabel24.Height := 19;\r\n WebLabel24.Caption := 'Icon Color';\r\n WebLabel24.ElementLabelClassName := 'text_normal';\r\n WebLabel24.ElementFont := efCSS;\r\n WebLabel24.HeightPercent := 100.000000000000000000;\r\n WebLabel24.Visible := False;\r\n WebLabel24.WidthPercent := 100.000000000000000000;\r\n WebLabel34.SetParentComponent(pcQAISheet3);\r\n WebLabel34.Name := 'WebLabel34';\r\n WebLabel34.Left := 3;\r\n WebLabel34.Top := 305;\r\n WebLabel34.Width := 198;\r\n WebLabel34.Height := 13;\r\n WebLabel34.Caption := 'Default files to Upload ( separeted by '#39','#39' )';\r\n WebLabel34.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel34.Font.Color := clGray;\r\n WebLabel34.Font.Height := -11;\r\n WebLabel34.Font.Name := 'Tahoma';\r\n WebLabel34.Font.Style := [];\r\n WebLabel34.HeightPercent := 100.000000000000000000;\r\n WebLabel34.ParentFont := False;\r\n WebLabel34.WidthPercent := 100.000000000000000000;\r\n WebLabel35.SetParentComponent(pcQAISheet3);\r\n WebLabel35.Name := 'WebLabel35';\r\n WebLabel35.Left := 3;\r\n WebLabel35.Top := 212;\r\n WebLabel35.Width := 269;\r\n WebLabel35.Height := 13;\r\n WebLabel35.Caption := 'Default Bidding Documents to Upload ( separated by '#39','#39' )';\r\n WebLabel35.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel35.Font.Color := clGray;\r\n WebLabel35.Font.Height := -11;\r\n WebLabel35.Font.Name := 'Tahoma';\r\n WebLabel35.Font.Style := [];\r\n WebLabel35.HeightPercent := 100.000000000000000000;\r\n WebLabel35.ParentFont := False;\r\n WebLabel35.WidthPercent := 100.000000000000000000;\r\n edWaitMessageIcon.SetParentComponent(pcQAISheet3);\r\n edWaitMessageIcon.Name := 'edWaitMessageIcon';\r\n edWaitMessageIcon.Left := 274;\r\n edWaitMessageIcon.Top := 39;\r\n edWaitMessageIcon.Width := 209;\r\n edWaitMessageIcon.Height := 22;\r\n edWaitMessageIcon.ChildOrder := 15;\r\n edWaitMessageIcon.HeightPercent := 100.000000000000000000;\r\n edWaitMessageIcon.WidthPercent := 100.000000000000000000;\r\n edServerMessageIcon.SetParentComponent(pcQAISheet3);\r\n edServerMessageIcon.Name := 'edServerMessageIcon';\r\n edServerMessageIcon.Left := 274;\r\n edServerMessageIcon.Top := 67;\r\n edServerMessageIcon.Width := 209;\r\n edServerMessageIcon.Height := 22;\r\n edServerMessageIcon.ChildOrder := 15;\r\n edServerMessageIcon.HeightPercent := 100.000000000000000000;\r\n edServerMessageIcon.WidthPercent := 100.000000000000000000;\r\n edQuestionIcon.SetParentComponent(pcQAISheet3);\r\n edQuestionIcon.Name := 'edQuestionIcon';\r\n edQuestionIcon.Left := 274;\r\n edQuestionIcon.Top := 95;\r\n edQuestionIcon.Width := 209;\r\n edQuestionIcon.Height := 22;\r\n edQuestionIcon.ChildOrder := 15;\r\n edQuestionIcon.HeightPercent := 100.000000000000000000;\r\n edQuestionIcon.WidthPercent := 100.000000000000000000;\r\n edAnswerIcon.SetParentComponent(pcQAISheet3);\r\n edAnswerIcon.Name := 'edAnswerIcon';\r\n edAnswerIcon.Left := 274;\r\n edAnswerIcon.Top := 123;\r\n edAnswerIcon.Width := 209;\r\n edAnswerIcon.Height := 22;\r\n edAnswerIcon.ChildOrder := 15;\r\n edAnswerIcon.HeightPercent := 100.000000000000000000;\r\n edAnswerIcon.WidthPercent := 100.000000000000000000;\r\n clrWaitMessage.SetParentComponent(pcQAISheet3);\r\n clrWaitMessage.Name := 'clrWaitMessage';\r\n clrWaitMessage.Left := 205;\r\n clrWaitMessage.Top := 39;\r\n clrWaitMessage.Width := 29;\r\n clrWaitMessage.Height := 22;\r\n clrWaitMessage.ElementClassName := 'BOX_NO_BORDER';\r\n clrWaitMessage.ChildOrder := 19;\r\n clrWaitMessage.Color := clWhite;\r\n clrWaitMessage.Role := '';\r\n clrServerMessage.SetParentComponent(pcQAISheet3);\r\n clrServerMessage.Name := 'clrServerMessage';\r\n clrServerMessage.Left := 205;\r\n clrServerMessage.Top := 67;\r\n clrServerMessage.Width := 29;\r\n clrServerMessage.Height := 22;\r\n clrServerMessage.ElementClassName := 'BOX_NO_BORDER';\r\n clrServerMessage.ChildOrder := 19;\r\n clrServerMessage.Color := clWhite;\r\n clrServerMessage.Role := '';\r\n clrQuestion.SetParentComponent(pcQAISheet3);\r\n clrQuestion.Name := 'clrQuestion';\r\n clrQuestion.Left := 205;\r\n clrQuestion.Top := 95;\r\n clrQuestion.Width := 29;\r\n clrQuestion.Height := 22;\r\n clrQuestion.ElementClassName := 'BOX_NO_BORDER';\r\n clrQuestion.ChildOrder := 19;\r\n clrQuestion.Color := clWhite;\r\n clrQuestion.Role := '';\r\n clrAnswer.SetParentComponent(pcQAISheet3);\r\n clrAnswer.Name := 'clrAnswer';\r\n clrAnswer.Left := 205;\r\n clrAnswer.Top := 123;\r\n clrAnswer.Width := 29;\r\n clrAnswer.Height := 22;\r\n clrAnswer.ElementClassName := 'BOX_NO_BORDER';\r\n clrAnswer.ChildOrder := 19;\r\n clrAnswer.Color := clWhite;\r\n clrAnswer.Role := '';\r\n clrWaitMessageIcon.SetParentComponent(pcQAISheet3);\r\n clrWaitMessageIcon.Name := 'clrWaitMessageIcon';\r\n clrWaitMessageIcon.Left := 517;\r\n clrWaitMessageIcon.Top := 39;\r\n clrWaitMessageIcon.Width := 29;\r\n clrWaitMessageIcon.Height := 22;\r\n clrWaitMessageIcon.ElementClassName := 'BOX_NO_BORDER';\r\n clrWaitMessageIcon.ChildOrder := 19;\r\n clrWaitMessageIcon.Color := clWhite;\r\n clrWaitMessageIcon.Role := '';\r\n clrWaitMessageIcon.Visible := False;\r\n clrServerMessageIcon.SetParentComponent(pcQAISheet3);\r\n clrServerMessageIcon.Name := 'clrServerMessageIcon';\r\n clrServerMessageIcon.Left := 517;\r\n clrServerMessageIcon.Top := 67;\r\n clrServerMessageIcon.Width := 29;\r\n clrServerMessageIcon.Height := 22;\r\n clrServerMessageIcon.ElementClassName := 'BOX_NO_BORDER';\r\n clrServerMessageIcon.ChildOrder := 19;\r\n clrServerMessageIcon.Color := clWhite;\r\n clrServerMessageIcon.Role := '';\r\n clrServerMessageIcon.Visible := False;\r\n clrQuestionIcon.SetParentComponent(pcQAISheet3);\r\n clrQuestionIcon.Name := 'clrQuestionIcon';\r\n clrQuestionIcon.Left := 517;\r\n clrQuestionIcon.Top := 95;\r\n clrQuestionIcon.Width := 29;\r\n clrQuestionIcon.Height := 22;\r\n clrQuestionIcon.ElementClassName := 'BOX_NO_BORDER';\r\n clrQuestionIcon.ChildOrder := 19;\r\n clrQuestionIcon.Color := clWhite;\r\n clrQuestionIcon.Role := '';\r\n clrQuestionIcon.Visible := False;\r\n clrAnswericon.SetParentComponent(pcQAISheet3);\r\n clrAnswericon.Name := 'clrAnswericon';\r\n clrAnswericon.Left := 517;\r\n clrAnswericon.Top := 123;\r\n clrAnswericon.Width := 29;\r\n clrAnswericon.Height := 22;\r\n clrAnswericon.ElementClassName := 'BOX_NO_BORDER';\r\n clrAnswericon.ChildOrder := 19;\r\n clrAnswericon.Color := clWhite;\r\n clrAnswericon.Role := '';\r\n clrAnswericon.Visible := False;\r\n edDefaultFilesToUpload.SetParentComponent(pcQAISheet3);\r\n edDefaultFilesToUpload.Name := 'edDefaultFilesToUpload';\r\n edDefaultFilesToUpload.Left := 3;\r\n edDefaultFilesToUpload.Top := 283;\r\n edDefaultFilesToUpload.Width := 543;\r\n edDefaultFilesToUpload.Height := 22;\r\n edDefaultFilesToUpload.Cursor := crIBeam;\r\n edDefaultFilesToUpload.ChildOrder := 10;\r\n edDefaultFilesToUpload.ElementClassName := 'box_bottomborder_font_normal';\r\n edDefaultFilesToUpload.ElementFont := efCSS;\r\n edDefaultFilesToUpload.HeightPercent := 100.000000000000000000;\r\n edDefaultFilesToUpload.WidthPercent := 100.000000000000000000;\r\n edDEEAULTBIDDINGDOCSTOUPLOAD.SetParentComponent(pcQAISheet3);\r\n edDEEAULTBIDDINGDOCSTOUPLOAD.Name := 'edDEEAULTBIDDINGDOCSTOUPLOAD';\r\n edDEEAULTBIDDINGDOCSTOUPLOAD.Left := 3;\r\n edDEEAULTBIDDINGDOCSTOUPLOAD.Top := 191;\r\n edDEEAULTBIDDINGDOCSTOUPLOAD.Width := 543;\r\n edDEEAULTBIDDINGDOCSTOUPLOAD.Height := 22;\r\n edDEEAULTBIDDINGDOCSTOUPLOAD.Cursor := crIBeam;\r\n edDEEAULTBIDDINGDOCSTOUPLOAD.ChildOrder := 11;\r\n edDEEAULTBIDDINGDOCSTOUPLOAD.ElementClassName := 'box_bottomborder_font_normal';\r\n edDEEAULTBIDDINGDOCSTOUPLOAD.ElementFont := efCSS;\r\n edDEEAULTBIDDINGDOCSTOUPLOAD.HeightPercent := 100.000000000000000000;\r\n edDEEAULTBIDDINGDOCSTOUPLOAD.WidthPercent := 100.000000000000000000;\r\n cbBiddingDocs.SetParentComponent(pcQAISheet3);\r\n cbBiddingDocs.Name := 'cbBiddingDocs';\r\n cbBiddingDocs.Left := 3;\r\n cbBiddingDocs.Top := 166;\r\n cbBiddingDocs.Width := 313;\r\n cbBiddingDocs.Height := 22;\r\n cbBiddingDocs.Cursor := crHandPoint;\r\n cbBiddingDocs.Caption := 'Bidding Documents Upload';\r\n cbBiddingDocs.Checked := True;\r\n cbBiddingDocs.ChildOrder := 2;\r\n cbBiddingDocs.ElementLabelClassName := 'text_normal';\r\n cbBiddingDocs.ElementFont := efCSS;\r\n cbBiddingDocs.HeightPercent := 100.000000000000000000;\r\n cbBiddingDocs.State := cbChecked;\r\n cbBiddingDocs.WidthPercent := 100.000000000000000000;\r\n cbEpic.SetParentComponent(pcQAISheet3);\r\n cbEpic.Name := 'cbEpic';\r\n cbEpic.Left := 3;\r\n cbEpic.Top := 257;\r\n cbEpic.Width := 59;\r\n cbEpic.Height := 20;\r\n cbEpic.Cursor := crHandPoint;\r\n cbEpic.Caption := 'EPIC';\r\n cbEpic.ChildOrder := 3;\r\n cbEpic.ElementLabelClassName := 'text_normal';\r\n cbEpic.ElementFont := efCSS;\r\n cbEpic.HeightPercent := 100.000000000000000000;\r\n cbEpic.WidthPercent := 100.000000000000000000;\r\n SetEvent(cbEpic, Self, 'OnClick', 'cbFormColumnsAutoClick');\r\n cbCerner.SetParentComponent(pcQAISheet3);\r\n cbCerner.Name := 'cbCerner';\r\n cbCerner.Left := 83;\r\n cbCerner.Top := 257;\r\n cbCerner.Width := 90;\r\n cbCerner.Height := 20;\r\n cbCerner.Cursor := crHandPoint;\r\n cbCerner.Caption := 'CERNER';\r\n cbCerner.ChildOrder := 3;\r\n cbCerner.ElementLabelClassName := 'text_normal';\r\n cbCerner.ElementFont := efCSS;\r\n cbCerner.HeightPercent := 100.000000000000000000;\r\n cbCerner.WidthPercent := 100.000000000000000000;\r\n SetEvent(cbCerner, Self, 'OnClick', 'cbFormColumnsAutoClick');\r\n psDBQuery.SetParentComponent(pcQAI);\r\n psDBQuery.Name := 'psDBQuery';\r\n psDBQuery.Left := 0;\r\n psDBQuery.Top := 20;\r\n psDBQuery.Width := 772;\r\n psDBQuery.Height := 447;\r\n psDBQuery.Caption := 'DB Query';\r\n psDBQuery.ChildOrder := 3;\r\n memQAI_Select.SetParentComponent(psDBQuery);\r\n memQAI_Select.Name := 'memQAI_Select';\r\n memQAI_Select.Left := 0;\r\n memQAI_Select.Top := 0;\r\n memQAI_Select.Width := 772;\r\n memQAI_Select.Height := 447;\r\n memQAI_Select.Align := alClient;\r\n memQAI_Select.BorderStyle := bsNone;\r\n memQAI_Select.ElementClassName := 'block_memo';\r\n memQAI_Select.ElementFont := efCSS;\r\n memQAI_Select.HeightPercent := 100.000000000000000000;\r\n memQAI_Select.SelLength := 0;\r\n memQAI_Select.SelStart := 0;\r\n memQAI_Select.WidthPercent := 100.000000000000000000;\r\n psXMLResult.SetParentComponent(pcQAI);\r\n psXMLResult.Name := 'psXMLResult';\r\n psXMLResult.Left := 0;\r\n psXMLResult.Top := 20;\r\n psXMLResult.Width := 772;\r\n psXMLResult.Height := 447;\r\n psXMLResult.Caption := 'XML Result';\r\n psXMLResult.ChildOrder := 1;\r\n memViewXML.SetParentComponent(psXMLResult);\r\n memViewXML.Name := 'memViewXML';\r\n memViewXML.Left := 0;\r\n memViewXML.Top := 0;\r\n memViewXML.Width := 772;\r\n memViewXML.Height := 447;\r\n memViewXML.Align := alClient;\r\n memViewXML.BorderStyle := bsNone;\r\n memViewXML.ElementClassName := 'block_memo';\r\n memViewXML.ElementFont := efCSS;\r\n memViewXML.HeightPercent := 100.000000000000000000;\r\n memViewXML.SelLength := 0;\r\n memViewXML.SelStart := 0;\r\n memViewXML.WidthPercent := 100.000000000000000000;\r\n pnlFormCaption.SetParentComponent(Self);\r\n pnlFormCaption.Name := 'pnlFormCaption';\r\n pnlFormCaption.Left := 0;\r\n pnlFormCaption.Top := 0;\r\n pnlFormCaption.Width := 1383;\r\n pnlFormCaption.Height := 41;\r\n pnlFormCaption.ElementClassName := 'form_caption';\r\n pnlFormCaption.HeightStyle := ssAuto;\r\n pnlFormCaption.Align := alTop;\r\n pnlFormCaption.BorderColor := clWhite;\r\n pnlFormCaption.BorderStyle := bsNone;\r\n pnlFormCaption.Caption := 'Settings';\r\n pnlFormCaption.ChildOrder := 9;\r\n pnlFormCaption.ElementFont := efCSS;\r\n pnlFormCaption.Font.Charset := DEFAULT_CHARSET;\r\n pnlFormCaption.Font.Color := clWindowText;\r\n pnlFormCaption.Font.Height := -16;\r\n pnlFormCaption.Font.Name := 'Tahoma';\r\n pnlFormCaption.Font.Style := [];\r\n pnlFormCaption.ParentFont := False;\r\n pnlFormCaption.TabOrder := 2;\r\n xdsfacilities.SetParentComponent(Self);\r\n xdsfacilities.Name := 'xdsfacilities';\r\n xdsfacilities.AfterOpen := xdsfacilitiesAfterOpen;\r\n xdsfacilities.Left := 352;\r\n xdsfacilities.Top := 256;\r\n xdsfacilitiesOriginalITEM.SetParentComponent(xdsfacilities);\r\n xdsfacilitiesOriginalITEM.Name := 'xdsfacilitiesOriginalITEM';\r\n xdsfacilitiesOriginalITEM.FieldName := 'Original.ITEM';\r\n xdsfacilitiesOriginalITEM.Size := 1024;\r\n finally\r\n pnlFormButtons.AfterLoadDFMValues;\r\n btnPost.AfterLoadDFMValues;\r\n btnCancel.AfterLoadDFMValues;\r\n pcSettings.AfterLoadDFMValues;\r\n psGeneral.AfterLoadDFMValues;\r\n lblBlockDefaultWidth.AfterLoadDFMValues;\r\n WebLabel1.AfterLoadDFMValues;\r\n WebLabel2.AfterLoadDFMValues;\r\n WebLabel3.AfterLoadDFMValues;\r\n WebLabel4.AfterLoadDFMValues;\r\n WebLabel5.AfterLoadDFMValues;\r\n lblColumns.AfterLoadDFMValues;\r\n WebLabel15.AfterLoadDFMValues;\r\n WebLabel25.AfterLoadDFMValues;\r\n WebLabel26.AfterLoadDFMValues;\r\n WebLabel27.AfterLoadDFMValues;\r\n WebLabel28.AfterLoadDFMValues;\r\n WebLabel29.AfterLoadDFMValues;\r\n WebLabel30.AfterLoadDFMValues;\r\n WebLabel31.AfterLoadDFMValues;\r\n WebLabel32.AfterLoadDFMValues;\r\n WebLabel33.AfterLoadDFMValues;\r\n WebLabel36.AfterLoadDFMValues;\r\n seFormColumns.AfterLoadDFMValues;\r\n cbShowHiddenBlocksInDesign.AfterLoadDFMValues;\r\n cbFormColumnsAuto.AfterLoadDFMValues;\r\n seBlockDefaultWidth.AfterLoadDFMValues;\r\n cbShowCommonPicklist.AfterLoadDFMValues;\r\n cbMainMenuTitles.AfterLoadDFMValues;\r\n edtDateFormat.AfterLoadDFMValues;\r\n edtTimeFormat.AfterLoadDFMValues;\r\n edtTimeAM.AfterLoadDFMValues;\r\n edtTimePM.AfterLoadDFMValues;\r\n WebMemo3.AfterLoadDFMValues;\r\n seBlockDefaultHeight.AfterLoadDFMValues;\r\n cbAutosaveDesigndata.AfterLoadDFMValues;\r\n cbNoHorizontalLineUp.AfterLoadDFMValues;\r\n seScreenBigW.AfterLoadDFMValues;\r\n seScreenBigH.AfterLoadDFMValues;\r\n seScreenMediumW.AfterLoadDFMValues;\r\n seScreenMediumH.AfterLoadDFMValues;\r\n seScreenSmallW.AfterLoadDFMValues;\r\n seScreenSmallH.AfterLoadDFMValues;\r\n rgVideoSource.AfterLoadDFMValues;\r\n edtVideoSourceFile.AfterLoadDFMValues;\r\n cbVoiceControlActive.AfterLoadDFMValues;\r\n cbVoiceCommands.AfterLoadDFMValues;\r\n cbVoiceDictation.AfterLoadDFMValues;\r\n psmainmenu.AfterLoadDFMValues;\r\n pnlPKLMenuContainer.AfterLoadDFMValues;\r\n WebMemo1.AfterLoadDFMValues;\r\n WebSplitter1.AfterLoadDFMValues;\r\n WebPanel1.AfterLoadDFMValues;\r\n WebLabel11.AfterLoadDFMValues;\r\n WebScrollBox1.AfterLoadDFMValues;\r\n l1.AfterLoadDFMValues;\r\n l2.AfterLoadDFMValues;\r\n l3.AfterLoadDFMValues;\r\n l5.AfterLoadDFMValues;\r\n l6.AfterLoadDFMValues;\r\n l7.AfterLoadDFMValues;\r\n l8.AfterLoadDFMValues;\r\n l9.AfterLoadDFMValues;\r\n l4.AfterLoadDFMValues;\r\n WebLabel6.AfterLoadDFMValues;\r\n WebLabel7.AfterLoadDFMValues;\r\n WebLabel8.AfterLoadDFMValues;\r\n WebLabel9.AfterLoadDFMValues;\r\n WebLabel10.AfterLoadDFMValues;\r\n WebLabel12.AfterLoadDFMValues;\r\n l10.AfterLoadDFMValues;\r\n WebLabel14.AfterLoadDFMValues;\r\n l11.AfterLoadDFMValues;\r\n WebLabel16.AfterLoadDFMValues;\r\n l12.AfterLoadDFMValues;\r\n WebLabel18.AfterLoadDFMValues;\r\n l13.AfterLoadDFMValues;\r\n cb1.AfterLoadDFMValues;\r\n me1.AfterLoadDFMValues;\r\n me2.AfterLoadDFMValues;\r\n me3.AfterLoadDFMValues;\r\n e5.AfterLoadDFMValues;\r\n e6.AfterLoadDFMValues;\r\n e7.AfterLoadDFMValues;\r\n e8.AfterLoadDFMValues;\r\n e9.AfterLoadDFMValues;\r\n e11.AfterLoadDFMValues;\r\n e12.AfterLoadDFMValues;\r\n e13.AfterLoadDFMValues;\r\n e15.AfterLoadDFMValues;\r\n e16.AfterLoadDFMValues;\r\n e17.AfterLoadDFMValues;\r\n e19.AfterLoadDFMValues;\r\n e20.AfterLoadDFMValues;\r\n e21.AfterLoadDFMValues;\r\n e23.AfterLoadDFMValues;\r\n e25.AfterLoadDFMValues;\r\n e24.AfterLoadDFMValues;\r\n e27.AfterLoadDFMValues;\r\n e28.AfterLoadDFMValues;\r\n e29.AfterLoadDFMValues;\r\n e31.AfterLoadDFMValues;\r\n e32.AfterLoadDFMValues;\r\n e33.AfterLoadDFMValues;\r\n e41.AfterLoadDFMValues;\r\n e40.AfterLoadDFMValues;\r\n e39.AfterLoadDFMValues;\r\n e37.AfterLoadDFMValues;\r\n e36.AfterLoadDFMValues;\r\n e35.AfterLoadDFMValues;\r\n me5.AfterLoadDFMValues;\r\n me4.AfterLoadDFMValues;\r\n e10.AfterLoadDFMValues;\r\n e14.AfterLoadDFMValues;\r\n e22.AfterLoadDFMValues;\r\n e18.AfterLoadDFMValues;\r\n e26.AfterLoadDFMValues;\r\n e34.AfterLoadDFMValues;\r\n e30.AfterLoadDFMValues;\r\n e38.AfterLoadDFMValues;\r\n e42.AfterLoadDFMValues;\r\n e6_2.AfterLoadDFMValues;\r\n pnlListButtons.AfterLoadDFMValues;\r\n WebBitBtn3.AfterLoadDFMValues;\r\n WebBitBtn4.AfterLoadDFMValues;\r\n WebMemo4.AfterLoadDFMValues;\r\n psManagement.AfterLoadDFMValues;\r\n lbQPKLSectionName.AfterLoadDFMValues;\r\n WebLabel13.AfterLoadDFMValues;\r\n btnLoadFromDB.AfterLoadDFMValues;\r\n btnSaveToDB.AfterLoadDFMValues;\r\n cbFromFacility.AfterLoadDFMValues;\r\n WebMemo2.AfterLoadDFMValues;\r\n btnCopy.AfterLoadDFMValues;\r\n cbToFacility.AfterLoadDFMValues;\r\n btnRemoveFromDB.AfterLoadDFMValues;\r\n psQAI.AfterLoadDFMValues;\r\n pcQAI.AfterLoadDFMValues;\r\n pcQAISheet3.AfterLoadDFMValues;\r\n WebLabel17.AfterLoadDFMValues;\r\n WebLabel19.AfterLoadDFMValues;\r\n WebLabel20.AfterLoadDFMValues;\r\n WebLabel21.AfterLoadDFMValues;\r\n WebLabel22.AfterLoadDFMValues;\r\n WebLabel23.AfterLoadDFMValues;\r\n WebLabel24.AfterLoadDFMValues;\r\n WebLabel34.AfterLoadDFMValues;\r\n WebLabel35.AfterLoadDFMValues;\r\n edWaitMessageIcon.AfterLoadDFMValues;\r\n edServerMessageIcon.AfterLoadDFMValues;\r\n edQuestionIcon.AfterLoadDFMValues;\r\n edAnswerIcon.AfterLoadDFMValues;\r\n clrWaitMessage.AfterLoadDFMValues;\r\n clrServerMessage.AfterLoadDFMValues;\r\n clrQuestion.AfterLoadDFMValues;\r\n clrAnswer.AfterLoadDFMValues;\r\n clrWaitMessageIcon.AfterLoadDFMValues;\r\n clrServerMessageIcon.AfterLoadDFMValues;\r\n clrQuestionIcon.AfterLoadDFMValues;\r\n clrAnswericon.AfterLoadDFMValues;\r\n edDefaultFilesToUpload.AfterLoadDFMValues;\r\n edDEEAULTBIDDINGDOCSTOUPLOAD.AfterLoadDFMValues;\r\n cbBiddingDocs.AfterLoadDFMValues;\r\n cbEpic.AfterLoadDFMValues;\r\n cbCerner.AfterLoadDFMValues;\r\n psDBQuery.AfterLoadDFMValues;\r\n memQAI_Select.AfterLoadDFMValues;\r\n psXMLResult.AfterLoadDFMValues;\r\n memViewXML.AfterLoadDFMValues;\r\n pnlFormCaption.AfterLoadDFMValues;\r\n xdsfacilities.AfterLoadDFMValues;\r\n xdsfacilitiesOriginalITEM.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit Login_New;\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, Vcl.Controls,\r\n WEBLib.Buttons, WEBLib.ExtCtrls, XData.Web.Client, WebLib.WebTools, StrUtils;\r\n\r\ntype\r\n TfrmLogin_New = class(TForm)\r\n WebPanel1: TPanel;\r\n pnlLogin: TPanel;\r\n WebLabel1: TLabel;\r\n WebLabel2: TLabel;\r\n WebLabel3: TLabel;\r\n WebLabel4: TLabel;\r\n WebLinkLabel1: TLinkLabel;\r\n edtname: TEdit;\r\n edtPassword: TEdit;\r\n WebCheckBox1: TCheckBox;\r\n btnLogin: TBitBtn;\r\n WebBitBtn4: TBitBtn;\r\n WebPanel3: TPanel;\r\n htmlLogo: THTMLContainer;\r\n lblCopyright: TLabel;\r\n procedure edtnameEnter(Sender: TObject);\r\n procedure edtnameExit(Sender: TObject);\r\n procedure edtPasswordExit(Sender: TObject);\r\n procedure WebBitBtn4Click(Sender: TObject);\r\n procedure WebFormCreate(Sender: TObject);\r\n procedure edtnameKeyDown(Sender: TObject; var Key: Word;\r\n Shift: TShiftState);\r\n procedure btnLoginClick(Sender: TObject);\r\n procedure WebFormShow(Sender: TObject);\r\n procedure AuthenticateUser(EmailID, PassWord: String);\r\n procedure WebFormResize(Sender: TObject);\r\n private\r\n { Private declarations }\r\n public\r\n { Public declarations }\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmLogin_New: TfrmLogin_New;\r\n\r\nimplementation\r\n\r\n{$R *.dfm}\r\n\r\nuses Common, DataModule;\r\n\r\nprocedure TfrmLogin_New.WebBitBtn4Click(Sender: TObject);\r\nbegin\r\n//\r\nif edtPassword.PasswordChar = #0\r\nthen begin\r\n edtPassword.PasswordChar := '*';\r\n (sender as TBitBtn).Caption := '';\r\n end\r\nelse begin\r\n edtPassword.PasswordChar := #0;\r\n (sender as TBitBtn).Caption := '';\r\n end;\r\nend;\r\n\r\nprocedure TfrmLogin_New.btnLoginClick(Sender: TObject);\r\nvar msg_p: string;\r\nbegin\r\n EGV_SPECIALITY := '';\r\n msg_p := '';\r\n if edtName.Text = Emptystr\r\n then msg_p := 'Login Cannot be Empty'\r\n else if edtPassword.Text = Emptystr\r\n then msg_p := 'Password Cannot be Empty';\r\nif msg_p <> ''\r\nthen begin\r\n showmessage(msg_p);\r\n // webtoast1.items[0].Body :='

' + msg_p + '

';\r\n //webtoast1.items[0].Show;\r\n exit;\r\n end;\r\n\r\n EGV_USERLOGINNAME := edtName.Text;\r\n EGV_USERLOGINPASSWORD := edtPassword.Text;\r\n\r\n AuthenticateUser(edtName.Text, edtPassword.Text);\r\nend;\r\n\r\nprocedure TfrmLogin_New.edtnameEnter(Sender: TObject);\r\nbegin\r\n(sender as TEdit).text := '';\r\n(sender as TEdit).ElementClassName := 'box_bottomborder_font_xxxbig';\r\n\r\n\r\n//'password_input_enter';\r\nend;\r\n\r\nprocedure TfrmLogin_New.edtnameExit(Sender: TObject);\r\nbegin\r\nif (sender as TEdit).text = 'Enter your username'\r\nthen (sender as TEdit).ElementClassName := 'user_input'\r\nelse if (sender as TEdit).text = ''\r\n then begin\r\n (sender as TEdit).text := 'Enter your username';\r\n (sender as TEdit).ElementClassName := 'user_input';\r\n end\r\n else (sender as TEdit).ElementClassName := 'box_bottomborder_font_xxxbig';\r\nend;\r\n\r\nprocedure TfrmLogin_New.edtnameKeyDown(Sender: TObject; var Key: Word;\r\n Shift: TShiftState);\r\nbegin\r\nif (Key = VK_RETURN) then btnLoginClick(nil);\r\nend;\r\n\r\nprocedure TfrmLogin_New.edtPasswordExit(Sender: TObject);\r\nbegin\r\nif (sender as TEdit).text = '*****'\r\nthen (sender as TEdit).ElementClassName := 'password_input'\r\nelse if (sender as TEdit).text = ''\r\n then begin\r\n (sender as TEdit).text := '*****';\r\n (sender as TEdit).ElementClassName := 'password_input';\r\n end\r\n else (sender as TEdit).ElementClassName := 'box_bottomborder_font_xxxbig';\r\nend;\r\n\r\nprocedure TfrmLogin_New.WebFormCreate(Sender: TObject);\r\nbegin\r\nhtmllogo.HTML.Text := insertkeyvalues(''+\r\n''+\r\n''+\r\n''+\r\n'');\r\nend;\r\n\r\nprocedure TfrmLogin_New.WebFormResize(Sender: TObject);\r\nbegin\r\nlblCopyRight.Caption := 'Copyright ' + chr(169) + ' 2024 Utech Products Inc. All rights reserved';\r\nend;\r\n\r\nprocedure TfrmLogin_New.WebFormShow(Sender: TObject);\r\nvar token_p: string;\r\n\r\n { procedure OnResult(Response: TXDataClientResponse);\r\n var\r\n Response_p: string;\r\n begin\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n // showmessage(response_p);\r\n end; }\r\n\r\nbegin\r\n//Set the screen size:\r\nEGV_SCREENSIZE := '';\r\n\r\nif dm.EGV_LOCALSTORAGE.Values['EGV_SCREENBIGW'] = '' then dm.EGV_LOCALSTORAGE.Values['EGV_SCREENBIGW'] := '1920' ;\r\nif dm.EGV_LOCALSTORAGE.Values['EGV_SCREENBIGH'] = '' then dm.EGV_LOCALSTORAGE.Values['EGV_SCREENBIGH'] := '1080' ;\r\nif dm.EGV_LOCALSTORAGE.Values['EGV_SCREENMEDIUMW'] = '' then dm.EGV_LOCALSTORAGE.Values['EGV_SCREENMEDIUMW'] := '0' ;\r\nif dm.EGV_LOCALSTORAGE.Values['EGV_SCREENMEDIUMH'] = '' then dm.EGV_LOCALSTORAGE.Values['EGV_SCREENMEDIUMH'] := '0' ;\r\n\r\n{if (self.width >= strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_SCREENBIGW'])) and\r\n (self.height >= strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_SCREENBIGH']) ) then EGV_SCREENSIZE := ''\r\nelse if (self.width >= strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_SCREENMEDIUMW'])) and\r\n (self.height >= strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_SCREENMEDIUMH']) ) then EGV_SCREENSIZE := 'M'\r\n else EGV_SCREENSIZE := 'S'; }\r\n\r\nEGV_CALLERID := getqueryparam('CALLER_ID');\r\nEGV_PATIENTFHIRID := getqueryparam('EPIC_FHIRPATID');\r\nEGV_CURRENT_PATIENTNAME := trim(getqueryparam('EPIC_FNAME') + ' ' + getqueryparam('EPIC_LNAME'));\r\nEGV_CURRENT_PATIENTDOB := getqueryparam('EPIC_DOB');\r\n\r\n//showmessage('Caller ID: ' + EGV_CALLERID);\r\n\r\n//showmessage('Called from EPIC. FHIR ID = ' + EGV_PATIENTFHIRID);\r\n//token_p := getqueryparam('launch');\r\n{\r\ntoken_p := copy(token_p, pos('.', token_p) + 1, length(token_p));\r\ntoken_p := copy(token_p, 1, pos('.', token_p) - 1); }\r\n\r\n//showmessage(token_p);\r\n//'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJ1cm46b2lkOmZoaXIiLCJjbGllbnRfaWQiOiJjMjJjMjhlMS0wNDYwLTQyNTMtOTdiMC0wODc5ZTJjMzhlZmEiLCJlcGljLmVjaSI6InVybjplcGljOk9wZW4uRXBpYy1jdXJyZW50IiwiZXBpYy5tZXRhZGF0YSI6IkktQjNTLWY1akt0MXdwNm9adzVaTkpleEoxTVlpRkVtRkJsWFlxazVxQS14azhtU011RzdTMC1XYmphbTBabzhFOFN1UWNsOG4tVWdvR1kyX1JsMGNQelpPWU5aVkpEdjhLQl9SX0YyeEpacDRmcXRqbURnT0x3XzZDYndSU3E3IiwiZXBpYy50b2tlbnR5cGUiOiJsYXVuY2giLCJleHAiOjE3MTgxOTYwMzUsImlhdCI6MTcxODE5NTczNSwiaXNzIjoidXJuOm9pZDpmaGlyIiwianRpIjoiZTViY2FhNjQtYWZkNS00NzQ3LWI0ZWMtZjM1MWRlYjhhNzZjIiwibmJmIjoxNzE4MTk1NzM1LCJzdWIiOiJldk5wLUtoWXdPT3FBWm4xcFoyZW51QTMifQ.jFJOruFO2NEgEsCCdS3tf_XUDwRzJWA0nMHS4uPo5Sz40yYFzaDMu4lWI9u1ZpheBh8hH0CCFyv-0PMU40fUW7e1qXTtX51H2yRS23DITMGK3MfUUFF6SysHEwLzncUs-7pLRiBzgAH5XhoYfJe46uze3Bfjw8mwnSFMz1Xq_oX3y9fQ5Cm-YciV5MynWUozU6a20Ythy8lyNbpzc7zdu8JvHANVFrpDNxqaGMt3sr7QtZp6BpmdgN2NTyBOqaVNBJ3zjsmLvEABggHzrXUDxQ0-p4HdFM20rGcpPmTEW1Y_OcSpd1-3iD5K22MVVTcJOy4Xeld2DbjNIGDmYJz7tA';\r\n//dm.XDataWebClient1.RawInvoke('IReportService.EPIC_DecodeJWT', [token_p, 'epic.metadata'], @OnResult);\r\n\r\n//if EGV_PATIENTFHIRID <> '' then EGV_CALLERID := 'EPIC';\r\n\r\nif EGV_CALLERID <> ''\r\nthen begin // showmessage('2');\r\n // WebLabel2.Visible := false;\r\n // pnlLogo.Visible := true;\r\n // here we use the login provided in URL parameters.\r\n //Each client has a login and is linked to it's facility which defines all settings and design.\r\n // ...\r\n //\r\n if uppercase(copy(EGV_CALLERID,1,4)) = 'EPIC' then edtName.text := copy(EGV_CALLERID, 5, length(EGV_CALLERID));\r\n if uppercase(copy(EGV_CALLERID,1,5)) = 'CERNER' then edtName.text := copy(EGV_CALLERID, 6, length(EGV_CALLERID));\r\n\r\n //'zohair@endosoft.com'; //'alvdmeer@outlook.com';\r\n // edtPassword.text := 'Endo1234!';\r\n // btnLoginClick(nil); // not manual click\r\n end;\r\nend;\r\n\r\nprocedure TfrmLogin_New.AuthenticateUser(EmailID, PassWord: String);\r\nvar\r\n DBPassword, DPassword, UserIDPass: String;\r\n cnt: Integer;\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var\r\n Response_p, s, s2, msg_p: string;\r\n begin\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n //showmessage(response_p);\r\n if pos('Error:', Response_p) > 0\r\n then begin\r\n Showmessage(Response_p);\r\n //webtoast1.items[0].header :=\r\n //'
Login faild
';\r\n //webtoast1.items[0].Body :='

' + Response_p + '

';\r\n //webtoast1.items[0].Show; }\r\n exit;\r\n end;\r\n {FacilityID_p + '#' +\r\n FacilityNAME_p + '#' +\r\n ArgusMedGPTServer.MAIN_SQLServer + '#' +\r\n ArgusMedGPTServer.MAIN_DatabaseName + '#' +\r\n ArgusMedGPTServer.MAIN_User + '#' +\r\n AES256Encrypt(ArgusMedGPTServer.MAIN_Password\r\n }\r\n egv_FacilityID := splitstring(response_p,'#')[0];\r\n EGV_FACILITYTOKEN := splitstring(response_p,'#')[1];\r\n EGV_FACILITYLIST := splitstring(response_p,'#')[2];\r\n EGV_DBSERVICEURL := splitstring(response_p,'#')[3];\r\n EGV_DBSERVER := splitstring(response_p,'#')[4];\r\n EGV_FACILITYDBNAME := splitstring(response_p,'#')[5];\r\n EGV_FACILITYDBUSER := splitstring(response_p,'#')[6];\r\n EGV_FACILITYDBPASSWORD := window.atob(trim(splitstring(response_p,'#')[6]));\r\n\r\n { egv_FacilityID := copy(Response_p, 1, pos('#', Response_p) - 1);\r\n s := copy(Response_p, pos('#', Response_p) + 1, length(Response_p));\r\n EGV_FACILITYDBNAME := copy(s, pos('#', s) + 1, 1024);\r\n s := copy(s, 1, pos('#', s) - 1); }\r\n //showmessage(EGV_FACILITYTOKEN);\r\n s := copy(EGV_FACILITYLIST,2,length(EGV_FACILITYLIST) - 2);\r\n EGV_FACILITYLIST := s;\r\n if pos(',',s) > 0\r\n then egv_Facility := copy(s, 1, pos(',', s) - 1)\r\n else egv_Facility := s;\r\n egv_USERID := EmailID;\r\n\r\n dm.XDataWebConnection1.Connected := false;\r\n dm.XDataWebConnection1.Tag := 1;\r\n // showmessage('Connecting to XDATA server: ' + dm.XDataWebConnection1.URL);\r\n // try\r\n dm.XDataWebConnection1.connected := true;\r\n { except\r\n on E: Exception do\r\n begin\r\n Showmessage('Main server connection error: ' + E.message);\r\n end;\r\n\r\n end; }\r\n\r\n if EGV_DBSERVICEURL <> ''\r\n then dm.XDataWebConnection2.URL := EGV_DBSERVICEURL\r\n else dm.XDataWebConnection2.URL := dm.XDataWebConnection1.URL;\r\n dm.XDataWebConnection2.Connected := false;\r\n // try\r\n dm.XDataWebConnection2.connected := true;\r\n { except\r\n on E: Exception do\r\n begin\r\n Showmessage('Local server connection error: ' + E.message);\r\n end;\r\n end; }\r\n\r\n \r\n end;\r\n\r\nbegin\r\n // showmessage(EmailID);\r\n // showmessage(PassWord);\r\n\r\n dm.XDataWebClient1.RawInvoke('IReportService.Checkuser', [EmailID, PassWord], @OnResult);\r\nend;\r\n\r\n\r\nprocedure TfrmLogin_New.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n WebPanel1 := TPanel.Create(Self);\r\n lblCopyright := TLabel.Create(Self);\r\n pnlLogin := TPanel.Create(Self);\r\n WebLabel1 := TLabel.Create(Self);\r\n WebLabel2 := TLabel.Create(Self);\r\n WebLabel3 := TLabel.Create(Self);\r\n WebLabel4 := TLabel.Create(Self);\r\n WebLinkLabel1 := TLinkLabel.Create(Self);\r\n edtname := TEdit.Create(Self);\r\n edtPassword := TEdit.Create(Self);\r\n WebCheckBox1 := TCheckBox.Create(Self);\r\n btnLogin := TBitBtn.Create(Self);\r\n WebBitBtn4 := TBitBtn.Create(Self);\r\n WebPanel3 := TPanel.Create(Self);\r\n htmlLogo := THTMLContainer.Create(Self);\r\n\r\n WebPanel1.BeforeLoadDFMValues;\r\n lblCopyright.BeforeLoadDFMValues;\r\n pnlLogin.BeforeLoadDFMValues;\r\n WebLabel1.BeforeLoadDFMValues;\r\n WebLabel2.BeforeLoadDFMValues;\r\n WebLabel3.BeforeLoadDFMValues;\r\n WebLabel4.BeforeLoadDFMValues;\r\n WebLinkLabel1.BeforeLoadDFMValues;\r\n edtname.BeforeLoadDFMValues;\r\n edtPassword.BeforeLoadDFMValues;\r\n WebCheckBox1.BeforeLoadDFMValues;\r\n btnLogin.BeforeLoadDFMValues;\r\n WebBitBtn4.BeforeLoadDFMValues;\r\n WebPanel3.BeforeLoadDFMValues;\r\n htmlLogo.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmLogin_New';\r\n Width := 1139;\r\n Height := 611;\r\n SetEvent(Self, 'OnCreate', 'WebFormCreate');\r\n SetEvent(Self, 'OnResize', 'WebFormResize');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n WebPanel1.SetParentComponent(Self);\r\n WebPanel1.Name := 'WebPanel1';\r\n WebPanel1.Left := 0;\r\n WebPanel1.Top := 0;\r\n WebPanel1.Width := 1139;\r\n WebPanel1.Height := 611;\r\n WebPanel1.Cursor := crHandPoint;\r\n WebPanel1.ElementClassName := 'loginform';\r\n WebPanel1.Align := alClient;\r\n WebPanel1.BorderColor := clWhite;\r\n WebPanel1.BorderStyle := bsNone;\r\n WebPanel1.Color := clWhite;\r\n WebPanel1.TabOrder := 0;\r\n lblCopyright.SetParentComponent(WebPanel1);\r\n lblCopyright.Name := 'lblCopyright';\r\n lblCopyright.Left := 121;\r\n lblCopyright.Top := 495;\r\n lblCopyright.Width := 799;\r\n lblCopyright.Height := 13;\r\n lblCopyright.Alignment := taCenter;\r\n lblCopyright.AutoSize := False;\r\n lblCopyright.Caption := 'Copyright ';\r\n lblCopyright.ElementClassName := 'Copyright_Label';\r\n lblCopyright.ElementFont := efCSS;\r\n lblCopyright.ElementPosition := epIgnore;\r\n lblCopyright.HeightStyle := ssAuto;\r\n lblCopyright.HeightPercent := 100.000000000000000000;\r\n lblCopyright.WidthPercent := 100.000000000000000000;\r\n pnlLogin.SetParentComponent(WebPanel1);\r\n pnlLogin.Name := 'pnlLogin';\r\n pnlLogin.Left := 120;\r\n pnlLogin.Top := 40;\r\n pnlLogin.Width := 825;\r\n pnlLogin.Height := 409;\r\n pnlLogin.ElementClassName := 'loginpanel';\r\n pnlLogin.BorderColor := clWhite;\r\n pnlLogin.BorderStyle := bsNone;\r\n pnlLogin.ChildOrder := 8;\r\n pnlLogin.Color := clWhite;\r\n pnlLogin.ElementPosition := epIgnore;\r\n pnlLogin.TabOrder := 0;\r\n WebLabel1.SetParentComponent(pnlLogin);\r\n WebLabel1.Name := 'WebLabel1';\r\n WebLabel1.Left := 450;\r\n WebLabel1.Top := 41;\r\n WebLabel1.Width := 33;\r\n WebLabel1.Height := 13;\r\n WebLabel1.Caption := 'Sign In';\r\n WebLabel1.ElementClassName := 'caption1';\r\n WebLabel1.ElementFont := efCSS;\r\n WebLabel1.HeightPercent := 100.000000000000000000;\r\n WebLabel1.WidthPercent := 100.000000000000000000;\r\n WebLabel2.SetParentComponent(pnlLogin);\r\n WebLabel2.Name := 'WebLabel2';\r\n WebLabel2.Left := 450;\r\n WebLabel2.Top := 68;\r\n WebLabel2.Width := 130;\r\n WebLabel2.Height := 13;\r\n WebLabel2.Caption := 'With your MedGPT account';\r\n WebLabel2.ElementClassName := 'caption2';\r\n WebLabel2.ElementFont := efCSS;\r\n WebLabel2.HeightPercent := 100.000000000000000000;\r\n WebLabel2.WidthPercent := 100.000000000000000000;\r\n WebLabel3.SetParentComponent(pnlLogin);\r\n WebLabel3.Name := 'WebLabel3';\r\n WebLabel3.Left := 450;\r\n WebLabel3.Top := 113;\r\n WebLabel3.Width := 61;\r\n WebLabel3.Height := 13;\r\n WebLabel3.Caption := 'User Name *';\r\n WebLabel3.ElementClassName := 'user_label';\r\n WebLabel3.ElementFont := efCSS;\r\n WebLabel3.HeightPercent := 100.000000000000000000;\r\n WebLabel3.WidthPercent := 100.000000000000000000;\r\n WebLabel4.SetParentComponent(pnlLogin);\r\n WebLabel4.Name := 'WebLabel4';\r\n WebLabel4.Left := 450;\r\n WebLabel4.Top := 183;\r\n WebLabel4.Width := 55;\r\n WebLabel4.Height := 13;\r\n WebLabel4.Caption := 'Password *';\r\n WebLabel4.ElementClassName := 'password_label';\r\n WebLabel4.ElementFont := efCSS;\r\n WebLabel4.HeightPercent := 100.000000000000000000;\r\n WebLabel4.WidthPercent := 100.000000000000000000;\r\n WebLinkLabel1.SetParentComponent(pnlLogin);\r\n WebLinkLabel1.Name := 'WebLinkLabel1';\r\n WebLinkLabel1.Left := 624;\r\n WebLinkLabel1.Top := 238;\r\n WebLinkLabel1.Width := 165;\r\n WebLinkLabel1.Height := 19;\r\n WebLinkLabel1.Alignment := taRightJustify;\r\n WebLinkLabel1.AutoSize := False;\r\n WebLinkLabel1.ElementClassName := 'forgotpassword_label';\r\n WebLinkLabel1.ElementFont := efCSS;\r\n WebLinkLabel1.Font.Charset := DEFAULT_CHARSET;\r\n WebLinkLabel1.Font.Color := clWindowText;\r\n WebLinkLabel1.Font.Height := -16;\r\n WebLinkLabel1.Font.Name := 'Tahoma';\r\n WebLinkLabel1.Font.Style := [];\r\n WebLinkLabel1.ParentFont := False;\r\n WebLinkLabel1.HeightPercent := 100.000000000000000000;\r\n WebLinkLabel1.WidthPercent := 100.000000000000000000;\r\n WebLinkLabel1.Caption := 'Forgot password';\r\n edtname.SetParentComponent(pnlLogin);\r\n edtname.Name := 'edtname';\r\n edtname.Left := 450;\r\n edtname.Top := 132;\r\n edtname.Width := 339;\r\n edtname.Height := 30;\r\n edtname.ChildOrder := 4;\r\n edtname.ElementClassName := 'user_input';\r\n edtname.ElementFont := efCSS;\r\n edtname.HeightPercent := 100.000000000000000000;\r\n edtname.ShowFocus := False;\r\n edtname.Text := 'Enter your username';\r\n edtname.WidthPercent := 100.000000000000000000;\r\n SetEvent(edtname, Self, 'OnEnter', 'edtnameEnter');\r\n SetEvent(edtname, Self, 'OnExit', 'edtnameExit');\r\n SetEvent(edtname, Self, 'OnKeyDown', 'edtnameKeyDown');\r\n edtPassword.SetParentComponent(pnlLogin);\r\n edtPassword.Name := 'edtPassword';\r\n edtPassword.Left := 450;\r\n edtPassword.Top := 202;\r\n edtPassword.Width := 339;\r\n edtPassword.Height := 30;\r\n edtPassword.ChildOrder := 5;\r\n edtPassword.ElementClassName := 'password_input';\r\n edtPassword.ElementFont := efCSS;\r\n edtPassword.HeightPercent := 100.000000000000000000;\r\n edtPassword.PasswordChar := '*';\r\n edtPassword.ShowFocus := False;\r\n edtPassword.Text := '*****';\r\n edtPassword.WidthPercent := 100.000000000000000000;\r\n SetEvent(edtPassword, Self, 'OnEnter', 'edtnameEnter');\r\n SetEvent(edtPassword, Self, 'OnExit', 'edtPasswordExit');\r\n SetEvent(edtPassword, Self, 'OnKeyDown', 'edtnameKeyDown');\r\n WebCheckBox1.SetParentComponent(pnlLogin);\r\n WebCheckBox1.Name := 'WebCheckBox1';\r\n WebCheckBox1.Left := 450;\r\n WebCheckBox1.Top := 238;\r\n WebCheckBox1.Width := 130;\r\n WebCheckBox1.Height := 22;\r\n WebCheckBox1.Caption := 'Remember me';\r\n WebCheckBox1.ChildOrder := 6;\r\n WebCheckBox1.ElementClassName := 'rememberme_box';\r\n WebCheckBox1.ElementFont := efCSS;\r\n WebCheckBox1.Font.Charset := DEFAULT_CHARSET;\r\n WebCheckBox1.Font.Color := clWindowText;\r\n WebCheckBox1.Font.Height := -16;\r\n WebCheckBox1.Font.Name := 'Tahoma';\r\n WebCheckBox1.Font.Style := [];\r\n WebCheckBox1.HeightPercent := 100.000000000000000000;\r\n WebCheckBox1.ParentFont := False;\r\n WebCheckBox1.WidthPercent := 100.000000000000000000;\r\n btnLogin.SetParentComponent(pnlLogin);\r\n btnLogin.Name := 'btnLogin';\r\n btnLogin.Left := 450;\r\n btnLogin.Top := 306;\r\n btnLogin.Width := 339;\r\n btnLogin.Height := 48;\r\n btnLogin.Caption := 'Login';\r\n btnLogin.Color := clNone;\r\n btnLogin.ElementClassName := 'loginbutton';\r\n btnLogin.ElementFont := efCSS;\r\n btnLogin.HeightPercent := 100.000000000000000000;\r\n btnLogin.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnLogin, Self, 'OnClick', 'btnLoginClick');\r\n WebBitBtn4.SetParentComponent(pnlLogin);\r\n WebBitBtn4.Name := 'WebBitBtn4';\r\n WebBitBtn4.Left := 765;\r\n WebBitBtn4.Top := 204;\r\n WebBitBtn4.Width := 21;\r\n WebBitBtn4.Height := 26;\r\n WebBitBtn4.Cursor := crHandPoint;\r\n WebBitBtn4.Caption := '';\r\n WebBitBtn4.Color := clNone;\r\n WebBitBtn4.Flat := True;\r\n WebBitBtn4.HeightPercent := 100.000000000000000000;\r\n WebBitBtn4.MaterialGlyphSize := 15;\r\n WebBitBtn4.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebBitBtn4, Self, 'OnClick', 'WebBitBtn4Click');\r\n WebPanel3.SetParentComponent(pnlLogin);\r\n WebPanel3.Name := 'WebPanel3';\r\n WebPanel3.Left := 0;\r\n WebPanel3.Top := 0;\r\n WebPanel3.Width := 409;\r\n WebPanel3.Height := 409;\r\n WebPanel3.ElementClassName := 'logopanel';\r\n WebPanel3.Align := alLeft;\r\n WebPanel3.BorderColor := clWhite;\r\n WebPanel3.BorderStyle := bsNone;\r\n WebPanel3.ChildOrder := 10;\r\n WebPanel3.Color := clWhite;\r\n WebPanel3.ElementFont := efCSS;\r\n WebPanel3.TabOrder := 5;\r\n htmlLogo.SetParentComponent(WebPanel3);\r\n htmlLogo.Name := 'htmlLogo';\r\n htmlLogo.Left := 0;\r\n htmlLogo.Top := 0;\r\n htmlLogo.Width := 409;\r\n htmlLogo.Height := 409;\r\n htmlLogo.Align := alClient;\r\n htmlLogo.ChildOrder := 2;\r\n htmlLogo.ElementFont := efCSS;\r\n htmlLogo.ScrollStyle := ssVertical;\r\n finally\r\n WebPanel1.AfterLoadDFMValues;\r\n lblCopyright.AfterLoadDFMValues;\r\n pnlLogin.AfterLoadDFMValues;\r\n WebLabel1.AfterLoadDFMValues;\r\n WebLabel2.AfterLoadDFMValues;\r\n WebLabel3.AfterLoadDFMValues;\r\n WebLabel4.AfterLoadDFMValues;\r\n WebLinkLabel1.AfterLoadDFMValues;\r\n edtname.AfterLoadDFMValues;\r\n edtPassword.AfterLoadDFMValues;\r\n WebCheckBox1.AfterLoadDFMValues;\r\n btnLogin.AfterLoadDFMValues;\r\n WebBitBtn4.AfterLoadDFMValues;\r\n WebPanel3.AfterLoadDFMValues;\r\n htmlLogo.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","unit DataModule;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Modules, Data.DB, WEBLIB.Dialogs, WEBLib.Forms,\r\n XData.Web.JsonDataset, XData.Web.Dataset, WEBLib.Storage, XData.Web.Connection,\r\n XData.Web.Client, WEBLib.DB, System.Math, WEBLib.DBCtrls, WEBLib.CDS, WEBLib.ExtCtrls,\r\n WEBLib.StdCtrls, System.StrUtils, WEBLib.REST;\r\n\r\ntype\r\n TDM = class(TDataModule)\r\n XDataWebConnection1: TXDataWebConnection;\r\n EGV_LOCALSTORAGE: TLocalStorage;\r\n XDataWebClient1: TXDataWebClient;\r\n dsQPKL_DynamicData: TDataSource;\r\n xdsQPKL_DynamicData: TXDataWebDataSet;\r\n xdsQPKL_DynamicDataOriginalITEM: TStringField;\r\n dsPickList: TDataSource;\r\n xdsMainMenu: TXDataWebDataSet;\r\n xdsMainMenuOriginalIDENT_VALUE: TStringField;\r\n xdsMainMenuOriginalVISIBLE: TIntegerField;\r\n xdsPicklist: TXDataWebDataSet;\r\n xdsPicklistcVISIBLE: TStringField;\r\n xdsPicklistSECTION_NAME: TStringField;\r\n xdsPicklistIDENT_NAME: TStringField;\r\n xdsPicklistIDENT_VALUE: TStringField;\r\n xdsPicklistFACILITYID: TIntegerField;\r\n xdsPicklistSPECIALITY: TStringField;\r\n xdsPicklistVISIBLE: TIntegerField;\r\n xdsPicklistUSERID: TStringField;\r\n xdsDynamicGrid1: TXDataWebDataSet;\r\n dsDynamicGrid1: TDataSource;\r\n xdsDynamicGrid1C1: TStringField;\r\n xdsDynamicGrid1C2: TStringField;\r\n xdsDynamicGrid1C3: TStringField;\r\n xdsDynamicGrid1C4: TStringField;\r\n xdsDynamicGrid1C5: TStringField;\r\n xdsDynamicGrid1C6: TStringField;\r\n xdsDynamicGrid1C7: TStringField;\r\n xdsDynamicGrid1C8: TStringField;\r\n xdsDynamicGrid1C9: TStringField;\r\n xdsDynamicGrid1C10: TStringField;\r\n xdsDynamicGrid1_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid1_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid1_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid1_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid1_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid1C11: TStringField;\r\n xdsDynamicGrid1C12: TStringField;\r\n xdsDynamicGrid1C13: TStringField;\r\n xdsDynamicGrid1C15: TStringField;\r\n xdsDynamicGrid1C16: TStringField;\r\n xdsDynamicGrid1C17: TStringField;\r\n xdsDynamicGrid1C18: TStringField;\r\n xdsDynamicGrid1C19: TStringField;\r\n xdsDynamicGrid1_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid2: TXDataWebDataSet;\r\n dsDynamicGrid2: TDataSource;\r\n xdsDynamicGrid2C1: TStringField;\r\n xdsDynamicGrid2C2: TStringField;\r\n xdsDynamicGrid2C3: TStringField;\r\n xdsDynamicGrid2C4: TStringField;\r\n xdsDynamicGrid2C5: TStringField;\r\n xdsDynamicGrid2C6: TStringField;\r\n xdsDynamicGrid2C7: TStringField;\r\n xdsDynamicGrid2C8: TStringField;\r\n xdsDynamicGrid2C9: TStringField;\r\n xdsDynamicGrid2C10: TStringField;\r\n xdsDynamicGrid2C11: TStringField;\r\n xdsDynamicGrid2C12: TStringField;\r\n xdsDynamicGrid2C13: TStringField;\r\n xdsDynamicGrid2C15: TStringField;\r\n xdsDynamicGrid2C16: TStringField;\r\n xdsDynamicGrid2C17: TStringField;\r\n xdsDynamicGrid2C18: TStringField;\r\n xdsDynamicGrid2C19: TStringField;\r\n xdsDynamicGrid2C20: TStringField;\r\n xdsDynamicGrid2_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid2_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid2_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid2_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid2_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid2_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid3: TXDataWebDataSet;\r\n dsDynamicGrid3: TDataSource;\r\n xdsDynamicGrid4: TXDataWebDataSet;\r\n dsDynamicGrid4: TDataSource;\r\n xdsDynamicGrid5: TXDataWebDataSet;\r\n dsDynamicGrid5: TDataSource;\r\n xdsDynamicGrid3C1: TStringField;\r\n xdsDynamicGrid3C2: TStringField;\r\n xdsDynamicGrid3C3: TStringField;\r\n xdsDynamicGrid3C4: TStringField;\r\n xdsDynamicGrid3C5: TStringField;\r\n xdsDynamicGrid3C6: TStringField;\r\n xdsDynamicGrid3C7: TStringField;\r\n xdsDynamicGrid3C8: TStringField;\r\n xdsDynamicGrid3C9: TStringField;\r\n xdsDynamicGrid3C10: TStringField;\r\n xdsDynamicGrid3C11: TStringField;\r\n xdsDynamicGrid3C12: TStringField;\r\n xdsDynamicGrid3C13: TStringField;\r\n xdsDynamicGrid3C15: TStringField;\r\n xdsDynamicGrid3C16: TStringField;\r\n xdsDynamicGrid3C17: TStringField;\r\n xdsDynamicGrid3C18: TStringField;\r\n xdsDynamicGrid3C19: TStringField;\r\n xdsDynamicGrid3C20: TStringField;\r\n xdsDynamicGrid3_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid3_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid3_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid3_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid3_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid3_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid4C1: TStringField;\r\n xdsDynamicGrid4C2: TStringField;\r\n xdsDynamicGrid4C3: TStringField;\r\n xdsDynamicGrid4C4: TStringField;\r\n xdsDynamicGrid4C5: TStringField;\r\n xdsDynamicGrid4C6: TStringField;\r\n xdsDynamicGrid4C7: TStringField;\r\n xdsDynamicGrid4C8: TStringField;\r\n xdsDynamicGrid4C9: TStringField;\r\n xdsDynamicGrid4C10: TStringField;\r\n xdsDynamicGrid4C11: TStringField;\r\n xdsDynamicGrid4C12: TStringField;\r\n xdsDynamicGrid4C13: TStringField;\r\n xdsDynamicGrid4C15: TStringField;\r\n xdsDynamicGrid4C16: TStringField;\r\n xdsDynamicGrid4C17: TStringField;\r\n xdsDynamicGrid4C18: TStringField;\r\n xdsDynamicGrid4C19: TStringField;\r\n xdsDynamicGrid4C20: TStringField;\r\n xdsDynamicGrid4_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid4_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid4_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid4_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid4_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid4_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid5C1: TStringField;\r\n xdsDynamicGrid5C2: TStringField;\r\n xdsDynamicGrid5C3: TStringField;\r\n xdsDynamicGrid5C4: TStringField;\r\n xdsDynamicGrid5C5: TStringField;\r\n xdsDynamicGrid5C6: TStringField;\r\n xdsDynamicGrid5C7: TStringField;\r\n xdsDynamicGrid5C8: TStringField;\r\n xdsDynamicGrid5C9: TStringField;\r\n xdsDynamicGrid5C10: TStringField;\r\n xdsDynamicGrid5C11: TStringField;\r\n xdsDynamicGrid5C12: TStringField;\r\n xdsDynamicGrid5C13: TStringField;\r\n xdsDynamicGrid5C15: TStringField;\r\n xdsDynamicGrid5C16: TStringField;\r\n xdsDynamicGrid5C17: TStringField;\r\n xdsDynamicGrid5C18: TStringField;\r\n xdsDynamicGrid5C19: TStringField;\r\n xdsDynamicGrid5C20: TStringField;\r\n xdsDynamicGrid5_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid5_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid5_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid5_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid5_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid5_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid1_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid1_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid2_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid3_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid4_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid5_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid2_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid3_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid4_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid5_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid1NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid2NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid3NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid4NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid5NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid6: TXDataWebDataSet;\r\n dsDynamicGrid6: TDataSource;\r\n xdsDynamicGrid7: TXDataWebDataSet;\r\n dsDynamicGrid7: TDataSource;\r\n xdsDynamicGrid8: TXDataWebDataSet;\r\n dsDynamicGrid8: TDataSource;\r\n xdsDynamicGrid9: TXDataWebDataSet;\r\n dsDynamicGrid9: TDataSource;\r\n xdsDynamicGrid10: TXDataWebDataSet;\r\n dsDynamicGrid110: TDataSource;\r\n xdsDynamicGrid11: TXDataWebDataSet;\r\n dsDynamicGrid11: TDataSource;\r\n xdsDynamicGrid12: TXDataWebDataSet;\r\n dsDynamicGrid12: TDataSource;\r\n xdsDynamicGrid13: TXDataWebDataSet;\r\n dsDynamicGrid13: TDataSource;\r\n xdsDynamicGrid14: TXDataWebDataSet;\r\n dsDynamicGrid14: TDataSource;\r\n xdsDynamicGrid15: TXDataWebDataSet;\r\n dsDynamicGrid15: TDataSource;\r\n xdsDynamicGrid16: TXDataWebDataSet;\r\n dsDynamicGrid16: TDataSource;\r\n xdsDynamicGrid17: TXDataWebDataSet;\r\n dsDynamicGrid17: TDataSource;\r\n xdsDynamicGrid18: TXDataWebDataSet;\r\n dsDynamicGrid18: TDataSource;\r\n xdsDynamicGrid19: TXDataWebDataSet;\r\n dsDynamicGrid19: TDataSource;\r\n xdsDynamicGrid20: TXDataWebDataSet;\r\n dsDynamicGrid20: TDataSource;\r\n xdsDynamicGrid21: TXDataWebDataSet;\r\n dsDynamicGrid21: TDataSource;\r\n xdsDynamicGrid22: TXDataWebDataSet;\r\n dsDynamicGrid22: TDataSource;\r\n xdsDynamicGrid23: TXDataWebDataSet;\r\n dsDynamicGrid23: TDataSource;\r\n xdsDynamicGrid24: TXDataWebDataSet;\r\n dsDynamicGrid1524: TDataSource;\r\n xdsDynamicGrid25: TXDataWebDataSet;\r\n dsDynamicGrid25: TDataSource;\r\n xdsDynamicGrid26: TXDataWebDataSet;\r\n dsDynamicGrid26: TDataSource;\r\n xdsDynamicGrid27: TXDataWebDataSet;\r\n dsDynamicGrid27: TDataSource;\r\n xdsDynamicGrid28: TXDataWebDataSet;\r\n dsDynamicGrid28: TDataSource;\r\n xdsDynamicGrid29: TXDataWebDataSet;\r\n dsDynamicGrid29: TDataSource;\r\n xdsDynamicGrid30: TXDataWebDataSet;\r\n dsDynamicGrid30: TDataSource;\r\n xdsDynamicGrid6C1: TStringField;\r\n xdsDynamicGrid6C2: TStringField;\r\n xdsDynamicGrid6C3: TStringField;\r\n xdsDynamicGrid6C4: TStringField;\r\n xdsDynamicGrid6C5: TStringField;\r\n xdsDynamicGrid6C6: TStringField;\r\n xdsDynamicGrid6C7: TStringField;\r\n xdsDynamicGrid6C8: TStringField;\r\n xdsDynamicGrid6C9: TStringField;\r\n xdsDynamicGrid6C11: TStringField;\r\n xdsDynamicGrid6C10: TStringField;\r\n xdsDynamicGrid6C12: TStringField;\r\n xdsDynamicGrid6C15: TStringField;\r\n xdsDynamicGrid6C13: TStringField;\r\n xdsDynamicGrid6C16: TStringField;\r\n xdsDynamicGrid6C17: TStringField;\r\n xdsDynamicGrid6C18: TStringField;\r\n xdsDynamicGrid6C19: TStringField;\r\n xdsDynamicGrid6C20: TStringField;\r\n xdsDynamicGrid6_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid6_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid6_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid6_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid6_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid6_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid6_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid6_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid6NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid7C1: TStringField;\r\n xdsDynamicGrid7C2: TStringField;\r\n xdsDynamicGrid7C3: TStringField;\r\n xdsDynamicGrid7C4: TStringField;\r\n xdsDynamicGrid7C5: TStringField;\r\n xdsDynamicGrid7C6: TStringField;\r\n xdsDynamicGrid7C7: TStringField;\r\n xdsDynamicGrid7C8: TStringField;\r\n xdsDynamicGrid7C9: TStringField;\r\n xdsDynamicGrid7C11: TStringField;\r\n xdsDynamicGrid7C10: TStringField;\r\n xdsDynamicGrid7C12: TStringField;\r\n xdsDynamicGrid7C15: TStringField;\r\n xdsDynamicGrid7C13: TStringField;\r\n xdsDynamicGrid7C16: TStringField;\r\n xdsDynamicGrid7C17: TStringField;\r\n xdsDynamicGrid7C18: TStringField;\r\n xdsDynamicGrid7C19: TStringField;\r\n xdsDynamicGrid7C20: TStringField;\r\n xdsDynamicGrid7_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid7_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid7_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid7_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid7_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid7_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid7_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid7_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid7NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid8C1: TStringField;\r\n xdsDynamicGrid8C2: TStringField;\r\n xdsDynamicGrid8C3: TStringField;\r\n xdsDynamicGrid8C4: TStringField;\r\n xdsDynamicGrid8C5: TStringField;\r\n xdsDynamicGrid8C6: TStringField;\r\n xdsDynamicGrid8C7: TStringField;\r\n xdsDynamicGrid8C8: TStringField;\r\n xdsDynamicGrid8C9: TStringField;\r\n xdsDynamicGrid8C11: TStringField;\r\n xdsDynamicGrid8C10: TStringField;\r\n xdsDynamicGrid8C12: TStringField;\r\n xdsDynamicGrid8C15: TStringField;\r\n xdsDynamicGrid8C13: TStringField;\r\n xdsDynamicGrid8C16: TStringField;\r\n xdsDynamicGrid8C17: TStringField;\r\n xdsDynamicGrid8C18: TStringField;\r\n xdsDynamicGrid8C19: TStringField;\r\n xdsDynamicGrid8C20: TStringField;\r\n xdsDynamicGrid8_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid8_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid8_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid8_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid8_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid8_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid8_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid8_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid8NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid9C1: TStringField;\r\n xdsDynamicGrid9C2: TStringField;\r\n xdsDynamicGrid9C3: TStringField;\r\n xdsDynamicGrid9C4: TStringField;\r\n xdsDynamicGrid9C5: TStringField;\r\n xdsDynamicGrid9C6: TStringField;\r\n xdsDynamicGrid9C7: TStringField;\r\n xdsDynamicGrid9C8: TStringField;\r\n xdsDynamicGrid9C9: TStringField;\r\n xdsDynamicGrid9C11: TStringField;\r\n xdsDynamicGrid9C10: TStringField;\r\n xdsDynamicGrid9C12: TStringField;\r\n xdsDynamicGrid9C15: TStringField;\r\n xdsDynamicGrid9C13: TStringField;\r\n xdsDynamicGrid9C16: TStringField;\r\n xdsDynamicGrid9C17: TStringField;\r\n xdsDynamicGrid9C18: TStringField;\r\n xdsDynamicGrid9C19: TStringField;\r\n xdsDynamicGrid9C20: TStringField;\r\n xdsDynamicGrid9_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid9_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid9_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid9_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid9_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid9_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid9_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid9_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid9NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid10C1: TStringField;\r\n xdsDynamicGrid10C2: TStringField;\r\n xdsDynamicGrid10C3: TStringField;\r\n xdsDynamicGrid10C4: TStringField;\r\n xdsDynamicGrid10C5: TStringField;\r\n xdsDynamicGrid10C6: TStringField;\r\n xdsDynamicGrid10C7: TStringField;\r\n xdsDynamicGrid10C8: TStringField;\r\n xdsDynamicGrid10C9: TStringField;\r\n xdsDynamicGrid10C11: TStringField;\r\n xdsDynamicGrid10C10: TStringField;\r\n xdsDynamicGrid10C12: TStringField;\r\n xdsDynamicGrid10C15: TStringField;\r\n xdsDynamicGrid10C13: TStringField;\r\n xdsDynamicGrid10C16: TStringField;\r\n xdsDynamicGrid10C17: TStringField;\r\n xdsDynamicGrid10C18: TStringField;\r\n xdsDynamicGrid10C19: TStringField;\r\n xdsDynamicGrid10C20: TStringField;\r\n xdsDynamicGrid10_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid10_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid10_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid10_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid10_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid10_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid10_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid10_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid10NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid11C1: TStringField;\r\n xdsDynamicGrid11C2: TStringField;\r\n xdsDynamicGrid11C3: TStringField;\r\n xdsDynamicGrid11C4: TStringField;\r\n xdsDynamicGrid11C5: TStringField;\r\n xdsDynamicGrid11C6: TStringField;\r\n xdsDynamicGrid11C7: TStringField;\r\n xdsDynamicGrid11C8: TStringField;\r\n xdsDynamicGrid11C9: TStringField;\r\n xdsDynamicGrid11C11: TStringField;\r\n xdsDynamicGrid11C10: TStringField;\r\n xdsDynamicGrid11C12: TStringField;\r\n xdsDynamicGrid11C15: TStringField;\r\n xdsDynamicGrid11C13: TStringField;\r\n xdsDynamicGrid11C16: TStringField;\r\n xdsDynamicGrid11C17: TStringField;\r\n xdsDynamicGrid11C18: TStringField;\r\n xdsDynamicGrid11C19: TStringField;\r\n xdsDynamicGrid11C20: TStringField;\r\n xdsDynamicGrid11_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid11_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid11_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid11_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid11_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid11_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid11_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid11_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid11NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid12C1: TStringField;\r\n xdsDynamicGrid12C2: TStringField;\r\n xdsDynamicGrid12C3: TStringField;\r\n xdsDynamicGrid12C4: TStringField;\r\n xdsDynamicGrid12C5: TStringField;\r\n xdsDynamicGrid12C6: TStringField;\r\n xdsDynamicGrid12C7: TStringField;\r\n xdsDynamicGrid12C8: TStringField;\r\n xdsDynamicGrid12C9: TStringField;\r\n xdsDynamicGrid12C11: TStringField;\r\n xdsDynamicGrid12C10: TStringField;\r\n xdsDynamicGrid12C12: TStringField;\r\n xdsDynamicGrid12C15: TStringField;\r\n xdsDynamicGrid12C13: TStringField;\r\n xdsDynamicGrid12C16: TStringField;\r\n xdsDynamicGrid12C17: TStringField;\r\n xdsDynamicGrid12C18: TStringField;\r\n xdsDynamicGrid12C19: TStringField;\r\n xdsDynamicGrid12C20: TStringField;\r\n xdsDynamicGrid12_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid12_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid12_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid12_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid12_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid12_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid12_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid12_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid12NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid13C1: TStringField;\r\n xdsDynamicGrid13C2: TStringField;\r\n xdsDynamicGrid13C3: TStringField;\r\n xdsDynamicGrid13C4: TStringField;\r\n xdsDynamicGrid13C5: TStringField;\r\n xdsDynamicGrid13C6: TStringField;\r\n xdsDynamicGrid13C7: TStringField;\r\n xdsDynamicGrid13C8: TStringField;\r\n xdsDynamicGrid13C9: TStringField;\r\n xdsDynamicGrid13C11: TStringField;\r\n xdsDynamicGrid13C10: TStringField;\r\n xdsDynamicGrid13C12: TStringField;\r\n xdsDynamicGrid13C15: TStringField;\r\n xdsDynamicGrid13C13: TStringField;\r\n xdsDynamicGrid13C16: TStringField;\r\n xdsDynamicGrid13C17: TStringField;\r\n xdsDynamicGrid13C18: TStringField;\r\n xdsDynamicGrid13C19: TStringField;\r\n xdsDynamicGrid13C20: TStringField;\r\n xdsDynamicGrid13_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid13_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid13_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid13_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid13_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid13_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid13_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid13_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid13NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid14C1: TStringField;\r\n xdsDynamicGrid14C2: TStringField;\r\n xdsDynamicGrid14C3: TStringField;\r\n xdsDynamicGrid14C4: TStringField;\r\n xdsDynamicGrid14C5: TStringField;\r\n xdsDynamicGrid14C6: TStringField;\r\n xdsDynamicGrid14C7: TStringField;\r\n xdsDynamicGrid14C8: TStringField;\r\n xdsDynamicGrid14C9: TStringField;\r\n xdsDynamicGrid14C11: TStringField;\r\n xdsDynamicGrid14C10: TStringField;\r\n xdsDynamicGrid14C12: TStringField;\r\n xdsDynamicGrid14C15: TStringField;\r\n xdsDynamicGrid14C13: TStringField;\r\n xdsDynamicGrid14C16: TStringField;\r\n xdsDynamicGrid14C17: TStringField;\r\n xdsDynamicGrid14C18: TStringField;\r\n xdsDynamicGrid14C19: TStringField;\r\n xdsDynamicGrid14C20: TStringField;\r\n xdsDynamicGrid14_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid14_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid14_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid14_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid14_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid14_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid14_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid14_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid14NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid15C1: TStringField;\r\n xdsDynamicGrid15C2: TStringField;\r\n xdsDynamicGrid15C3: TStringField;\r\n xdsDynamicGrid15C4: TStringField;\r\n xdsDynamicGrid15C5: TStringField;\r\n xdsDynamicGrid15C6: TStringField;\r\n xdsDynamicGrid15C7: TStringField;\r\n xdsDynamicGrid15C8: TStringField;\r\n xdsDynamicGrid15C9: TStringField;\r\n xdsDynamicGrid15C11: TStringField;\r\n xdsDynamicGrid15C10: TStringField;\r\n xdsDynamicGrid15C12: TStringField;\r\n xdsDynamicGrid15C15: TStringField;\r\n xdsDynamicGrid15C13: TStringField;\r\n xdsDynamicGrid15C16: TStringField;\r\n xdsDynamicGrid15C17: TStringField;\r\n xdsDynamicGrid15C18: TStringField;\r\n xdsDynamicGrid15C19: TStringField;\r\n xdsDynamicGrid15C20: TStringField;\r\n xdsDynamicGrid15_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid15_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid15_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid15_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid15_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid15_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid15_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid15_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid15NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid16C1: TStringField;\r\n xdsDynamicGrid16C2: TStringField;\r\n xdsDynamicGrid16C3: TStringField;\r\n xdsDynamicGrid16C4: TStringField;\r\n xdsDynamicGrid16C5: TStringField;\r\n xdsDynamicGrid16C6: TStringField;\r\n xdsDynamicGrid16C7: TStringField;\r\n xdsDynamicGrid16C8: TStringField;\r\n xdsDynamicGrid16C9: TStringField;\r\n xdsDynamicGrid16C11: TStringField;\r\n xdsDynamicGrid16C10: TStringField;\r\n xdsDynamicGrid16C12: TStringField;\r\n xdsDynamicGrid16C15: TStringField;\r\n xdsDynamicGrid16C13: TStringField;\r\n xdsDynamicGrid16C16: TStringField;\r\n xdsDynamicGrid16C17: TStringField;\r\n xdsDynamicGrid16C18: TStringField;\r\n xdsDynamicGrid16C19: TStringField;\r\n xdsDynamicGrid16C20: TStringField;\r\n xdsDynamicGrid16_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid16_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid16_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid16_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid16_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid16_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid16_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid16_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid16NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid17C1: TStringField;\r\n xdsDynamicGrid17C2: TStringField;\r\n xdsDynamicGrid17C3: TStringField;\r\n xdsDynamicGrid17C4: TStringField;\r\n xdsDynamicGrid17C5: TStringField;\r\n xdsDynamicGrid17C6: TStringField;\r\n xdsDynamicGrid17C7: TStringField;\r\n xdsDynamicGrid17C8: TStringField;\r\n xdsDynamicGrid17C9: TStringField;\r\n xdsDynamicGrid17C11: TStringField;\r\n xdsDynamicGrid17C10: TStringField;\r\n xdsDynamicGrid17C12: TStringField;\r\n xdsDynamicGrid17C15: TStringField;\r\n xdsDynamicGrid17C13: TStringField;\r\n xdsDynamicGrid17C16: TStringField;\r\n xdsDynamicGrid17C17: TStringField;\r\n xdsDynamicGrid17C18: TStringField;\r\n xdsDynamicGrid17C19: TStringField;\r\n xdsDynamicGrid17C20: TStringField;\r\n xdsDynamicGrid17_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid17_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid17_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid17_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid17_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid17_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid17_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid17_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid17NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid18C1: TStringField;\r\n xdsDynamicGrid18C2: TStringField;\r\n xdsDynamicGrid18C3: TStringField;\r\n xdsDynamicGrid18C4: TStringField;\r\n xdsDynamicGrid18C5: TStringField;\r\n xdsDynamicGrid18C6: TStringField;\r\n xdsDynamicGrid18C7: TStringField;\r\n xdsDynamicGrid18C8: TStringField;\r\n xdsDynamicGrid18C9: TStringField;\r\n xdsDynamicGrid18C11: TStringField;\r\n xdsDynamicGrid18C10: TStringField;\r\n xdsDynamicGrid18C12: TStringField;\r\n xdsDynamicGrid18C15: TStringField;\r\n xdsDynamicGrid18C13: TStringField;\r\n xdsDynamicGrid18C16: TStringField;\r\n xdsDynamicGrid18C17: TStringField;\r\n xdsDynamicGrid18C18: TStringField;\r\n xdsDynamicGrid18C19: TStringField;\r\n xdsDynamicGrid18C20: TStringField;\r\n xdsDynamicGrid18_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid18_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid18_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid18_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid18_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid18_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid18_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid18_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid18NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid19C1: TStringField;\r\n xdsDynamicGrid19C2: TStringField;\r\n xdsDynamicGrid19C3: TStringField;\r\n xdsDynamicGrid19C4: TStringField;\r\n xdsDynamicGrid19C5: TStringField;\r\n xdsDynamicGrid19C6: TStringField;\r\n xdsDynamicGrid19C7: TStringField;\r\n xdsDynamicGrid19C8: TStringField;\r\n xdsDynamicGrid19C9: TStringField;\r\n xdsDynamicGrid19C11: TStringField;\r\n xdsDynamicGrid19C10: TStringField;\r\n xdsDynamicGrid19C12: TStringField;\r\n xdsDynamicGrid19C15: TStringField;\r\n xdsDynamicGrid19C13: TStringField;\r\n xdsDynamicGrid19C16: TStringField;\r\n xdsDynamicGrid19C17: TStringField;\r\n xdsDynamicGrid19C18: TStringField;\r\n xdsDynamicGrid19C19: TStringField;\r\n xdsDynamicGrid19C20: TStringField;\r\n xdsDynamicGrid19_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid19_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid19_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid19_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid19_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid19_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid19_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid19_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid19NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid20C1: TStringField;\r\n xdsDynamicGrid20C2: TStringField;\r\n xdsDynamicGrid20C3: TStringField;\r\n xdsDynamicGrid20C4: TStringField;\r\n xdsDynamicGrid20C5: TStringField;\r\n xdsDynamicGrid20C6: TStringField;\r\n xdsDynamicGrid20C7: TStringField;\r\n xdsDynamicGrid20C8: TStringField;\r\n xdsDynamicGrid20C9: TStringField;\r\n xdsDynamicGrid20C11: TStringField;\r\n xdsDynamicGrid20C10: TStringField;\r\n xdsDynamicGrid20C12: TStringField;\r\n xdsDynamicGrid20C15: TStringField;\r\n xdsDynamicGrid20C13: TStringField;\r\n xdsDynamicGrid20C16: TStringField;\r\n xdsDynamicGrid20C17: TStringField;\r\n xdsDynamicGrid20C18: TStringField;\r\n xdsDynamicGrid20C19: TStringField;\r\n xdsDynamicGrid20C20: TStringField;\r\n xdsDynamicGrid20_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid20_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid20_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid20_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid20_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid20_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid20_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid20_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid20NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid21C1: TStringField;\r\n xdsDynamicGrid21C2: TStringField;\r\n xdsDynamicGrid21C3: TStringField;\r\n xdsDynamicGrid21C4: TStringField;\r\n xdsDynamicGrid21C5: TStringField;\r\n xdsDynamicGrid21C6: TStringField;\r\n xdsDynamicGrid21C7: TStringField;\r\n xdsDynamicGrid21C8: TStringField;\r\n xdsDynamicGrid21C9: TStringField;\r\n xdsDynamicGrid21C11: TStringField;\r\n xdsDynamicGrid21C10: TStringField;\r\n xdsDynamicGrid21C12: TStringField;\r\n xdsDynamicGrid21C15: TStringField;\r\n xdsDynamicGrid21C13: TStringField;\r\n xdsDynamicGrid21C16: TStringField;\r\n xdsDynamicGrid21C17: TStringField;\r\n xdsDynamicGrid21C18: TStringField;\r\n xdsDynamicGrid21C19: TStringField;\r\n xdsDynamicGrid21C20: TStringField;\r\n xdsDynamicGrid21_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid21_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid21_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid21_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid21_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid21_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid21_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid21_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid21NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid22C1: TStringField;\r\n xdsDynamicGrid22C2: TStringField;\r\n xdsDynamicGrid22C3: TStringField;\r\n xdsDynamicGrid22C4: TStringField;\r\n xdsDynamicGrid22C5: TStringField;\r\n xdsDynamicGrid22C6: TStringField;\r\n xdsDynamicGrid22C7: TStringField;\r\n xdsDynamicGrid22C8: TStringField;\r\n xdsDynamicGrid22C9: TStringField;\r\n xdsDynamicGrid22C11: TStringField;\r\n xdsDynamicGrid22C10: TStringField;\r\n xdsDynamicGrid22C12: TStringField;\r\n xdsDynamicGrid22C15: TStringField;\r\n xdsDynamicGrid22C13: TStringField;\r\n xdsDynamicGrid22C16: TStringField;\r\n xdsDynamicGrid22C17: TStringField;\r\n xdsDynamicGrid22C18: TStringField;\r\n xdsDynamicGrid22C19: TStringField;\r\n xdsDynamicGrid22C20: TStringField;\r\n xdsDynamicGrid22_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid22_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid22_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid22_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid22_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid22_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid22_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid22_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid22NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid23C1: TStringField;\r\n xdsDynamicGrid23C2: TStringField;\r\n xdsDynamicGrid23C3: TStringField;\r\n xdsDynamicGrid23C4: TStringField;\r\n xdsDynamicGrid23C5: TStringField;\r\n xdsDynamicGrid23C6: TStringField;\r\n xdsDynamicGrid23C7: TStringField;\r\n xdsDynamicGrid23C8: TStringField;\r\n xdsDynamicGrid23C9: TStringField;\r\n xdsDynamicGrid23C11: TStringField;\r\n xdsDynamicGrid23C10: TStringField;\r\n xdsDynamicGrid23C12: TStringField;\r\n xdsDynamicGrid23C15: TStringField;\r\n xdsDynamicGrid23C13: TStringField;\r\n xdsDynamicGrid23C16: TStringField;\r\n xdsDynamicGrid23C17: TStringField;\r\n xdsDynamicGrid23C18: TStringField;\r\n xdsDynamicGrid23C19: TStringField;\r\n xdsDynamicGrid23C20: TStringField;\r\n xdsDynamicGrid23_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid23_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid23_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid23_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid23_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid23_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid23_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid23_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid23NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid24C1: TStringField;\r\n xdsDynamicGrid24C2: TStringField;\r\n xdsDynamicGrid24C3: TStringField;\r\n xdsDynamicGrid24C4: TStringField;\r\n xdsDynamicGrid24C5: TStringField;\r\n xdsDynamicGrid24C6: TStringField;\r\n xdsDynamicGrid24C7: TStringField;\r\n xdsDynamicGrid24C8: TStringField;\r\n xdsDynamicGrid24C9: TStringField;\r\n xdsDynamicGrid24C11: TStringField;\r\n xdsDynamicGrid24C10: TStringField;\r\n xdsDynamicGrid24C12: TStringField;\r\n xdsDynamicGrid24C15: TStringField;\r\n xdsDynamicGrid24C13: TStringField;\r\n xdsDynamicGrid24C16: TStringField;\r\n xdsDynamicGrid24C17: TStringField;\r\n xdsDynamicGrid24C18: TStringField;\r\n xdsDynamicGrid24C19: TStringField;\r\n xdsDynamicGrid24C20: TStringField;\r\n xdsDynamicGrid24_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid24_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid24_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid24_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid24_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid24_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid24_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid24_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid24NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid25C1: TStringField;\r\n xdsDynamicGrid25C2: TStringField;\r\n xdsDynamicGrid25C3: TStringField;\r\n xdsDynamicGrid25C4: TStringField;\r\n xdsDynamicGrid25C5: TStringField;\r\n xdsDynamicGrid25C6: TStringField;\r\n xdsDynamicGrid25C7: TStringField;\r\n xdsDynamicGrid25C8: TStringField;\r\n xdsDynamicGrid25C9: TStringField;\r\n xdsDynamicGrid25C11: TStringField;\r\n xdsDynamicGrid25C10: TStringField;\r\n xdsDynamicGrid25C12: TStringField;\r\n xdsDynamicGrid25C15: TStringField;\r\n xdsDynamicGrid25C13: TStringField;\r\n xdsDynamicGrid25C16: TStringField;\r\n xdsDynamicGrid25C17: TStringField;\r\n xdsDynamicGrid25C18: TStringField;\r\n xdsDynamicGrid25C19: TStringField;\r\n xdsDynamicGrid25C20: TStringField;\r\n xdsDynamicGrid25_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid25_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid25_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid25_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid25_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid25_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid25_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid25_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid25NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid26C1: TStringField;\r\n xdsDynamicGrid26C2: TStringField;\r\n xdsDynamicGrid26C3: TStringField;\r\n xdsDynamicGrid26C4: TStringField;\r\n xdsDynamicGrid26C5: TStringField;\r\n xdsDynamicGrid26C6: TStringField;\r\n xdsDynamicGrid26C7: TStringField;\r\n xdsDynamicGrid26C8: TStringField;\r\n xdsDynamicGrid26C9: TStringField;\r\n xdsDynamicGrid26C11: TStringField;\r\n xdsDynamicGrid26C10: TStringField;\r\n xdsDynamicGrid26C12: TStringField;\r\n xdsDynamicGrid26C15: TStringField;\r\n xdsDynamicGrid26C13: TStringField;\r\n xdsDynamicGrid26C16: TStringField;\r\n xdsDynamicGrid26C17: TStringField;\r\n xdsDynamicGrid26C18: TStringField;\r\n xdsDynamicGrid26C19: TStringField;\r\n xdsDynamicGrid26C20: TStringField;\r\n xdsDynamicGrid26_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid26_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid26_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid26_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid26_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid26_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid26_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid26_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid26NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid27C1: TStringField;\r\n xdsDynamicGrid27C2: TStringField;\r\n xdsDynamicGrid27C3: TStringField;\r\n xdsDynamicGrid27C4: TStringField;\r\n xdsDynamicGrid27C5: TStringField;\r\n xdsDynamicGrid27C6: TStringField;\r\n xdsDynamicGrid27C7: TStringField;\r\n xdsDynamicGrid27C8: TStringField;\r\n xdsDynamicGrid27C9: TStringField;\r\n xdsDynamicGrid27C11: TStringField;\r\n xdsDynamicGrid27C10: TStringField;\r\n xdsDynamicGrid27C12: TStringField;\r\n xdsDynamicGrid27C15: TStringField;\r\n xdsDynamicGrid27C13: TStringField;\r\n xdsDynamicGrid27C16: TStringField;\r\n xdsDynamicGrid27C17: TStringField;\r\n xdsDynamicGrid27C18: TStringField;\r\n xdsDynamicGrid27C19: TStringField;\r\n xdsDynamicGrid27C20: TStringField;\r\n xdsDynamicGrid27_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid27_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid27_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid27_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid27_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid27_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid27_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid27_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid27NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid28C1: TStringField;\r\n xdsDynamicGrid28C2: TStringField;\r\n xdsDynamicGrid28C3: TStringField;\r\n xdsDynamicGrid28C4: TStringField;\r\n xdsDynamicGrid28C5: TStringField;\r\n xdsDynamicGrid28C6: TStringField;\r\n xdsDynamicGrid28C7: TStringField;\r\n xdsDynamicGrid28C8: TStringField;\r\n xdsDynamicGrid28C9: TStringField;\r\n xdsDynamicGrid28C11: TStringField;\r\n xdsDynamicGrid28C10: TStringField;\r\n xdsDynamicGrid28C12: TStringField;\r\n xdsDynamicGrid28C15: TStringField;\r\n xdsDynamicGrid28C13: TStringField;\r\n xdsDynamicGrid28C16: TStringField;\r\n xdsDynamicGrid28C17: TStringField;\r\n xdsDynamicGrid28C18: TStringField;\r\n xdsDynamicGrid28C19: TStringField;\r\n xdsDynamicGrid28C20: TStringField;\r\n xdsDynamicGrid28_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid28_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid28_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid28_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid28_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid28_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid28_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid28_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid28NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid29C1: TStringField;\r\n xdsDynamicGrid29C2: TStringField;\r\n xdsDynamicGrid29C3: TStringField;\r\n xdsDynamicGrid29C4: TStringField;\r\n xdsDynamicGrid29C5: TStringField;\r\n xdsDynamicGrid29C6: TStringField;\r\n xdsDynamicGrid29C7: TStringField;\r\n xdsDynamicGrid29C8: TStringField;\r\n xdsDynamicGrid29C9: TStringField;\r\n xdsDynamicGrid29C11: TStringField;\r\n xdsDynamicGrid29C10: TStringField;\r\n xdsDynamicGrid29C12: TStringField;\r\n xdsDynamicGrid29C15: TStringField;\r\n xdsDynamicGrid29C13: TStringField;\r\n xdsDynamicGrid29C16: TStringField;\r\n xdsDynamicGrid29C17: TStringField;\r\n xdsDynamicGrid29C18: TStringField;\r\n xdsDynamicGrid29C19: TStringField;\r\n xdsDynamicGrid29C20: TStringField;\r\n xdsDynamicGrid29_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid29_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid29_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid29_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid29_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid29_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid29_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid29_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid29NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid30C1: TStringField;\r\n xdsDynamicGrid30C2: TStringField;\r\n xdsDynamicGrid30C3: TStringField;\r\n xdsDynamicGrid30C4: TStringField;\r\n xdsDynamicGrid30C5: TStringField;\r\n xdsDynamicGrid30C6: TStringField;\r\n xdsDynamicGrid30C7: TStringField;\r\n xdsDynamicGrid30C8: TStringField;\r\n xdsDynamicGrid30C9: TStringField;\r\n xdsDynamicGrid30C11: TStringField;\r\n xdsDynamicGrid30C10: TStringField;\r\n xdsDynamicGrid30C12: TStringField;\r\n xdsDynamicGrid30C15: TStringField;\r\n xdsDynamicGrid30C13: TStringField;\r\n xdsDynamicGrid30C16: TStringField;\r\n xdsDynamicGrid30C17: TStringField;\r\n xdsDynamicGrid30C18: TStringField;\r\n xdsDynamicGrid30C19: TStringField;\r\n xdsDynamicGrid30C20: TStringField;\r\n xdsDynamicGrid30_CURRENT_NURSE2: TStringField;\r\n xdsDynamicGrid30_CURRENT_NURSE1: TStringField;\r\n xdsDynamicGrid30_CURRENT_PROVIDER: TStringField;\r\n xdsDynamicGrid30_CURRENT_PROCEDURENUMBER: TStringField;\r\n xdsDynamicGrid30_CURRENT_MRN: TStringField;\r\n xdsDynamicGrid30_CURRENT_APPTNAME: TStringField;\r\n xdsDynamicGrid30_CURRENT_MEDID: TStringField;\r\n xdsDynamicGrid30_CURRENT_PROBLEMID: TStringField;\r\n xdsDynamicGrid30NEW_RECORD: TIntegerField;\r\n xdsDynamicGrid1_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid1_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid2_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid3_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid4_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid5_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid6_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid7_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid8_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid9_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid10_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid11_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid12_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid13_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid14_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid15_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid16_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid17_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid18_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid19_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid20_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid21_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid22_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid23_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid24_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid25_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid26_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid27_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid28_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid29_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid30_CURRENT_REFPHYCODE: TStringField;\r\n xdsDynamicGrid2_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid3_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid4_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid5_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid6_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid7_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid8_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid9_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid10_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid11_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid12_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid13_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid14_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid15_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid16_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid17_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid18_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid19_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid20_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid21_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid22_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid23_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid24_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid25_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid26_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid27_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid28_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid29_CURRENT_ALLERGYID: TStringField;\r\n xdsDynamicGrid30_CURRENT_ALLERGYID: TStringField;\r\n xdsPicklistNOTES: TBlobField;\r\n WebHttpRequest1: THttpRequest;\r\n EGV_SESSIONSTORAGE: TSessionStorage;\r\n xdsDynamicGrid1_CURRENTPROC_IMAGECOUNT: TStringField;\r\n xdsDynamicGrid1_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid1_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid2_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid2_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid2_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid3_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid3_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid3_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid4_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid4_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid4_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid5_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid5_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid5_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid6_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid6_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid6_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid7_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid7_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid7_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid8_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid8_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid8_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid9_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid9_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid9_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid10_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid10_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid10_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid11_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid11_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid11_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid12_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid12_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid12_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid13_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid13_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid13_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid14_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid14_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid14_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid15_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid15_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid15_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid16_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid16_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid16_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid17_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid17_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid17_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid18_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid18_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid18_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid19_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid19_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid19_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid20_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid20_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid20_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid21_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid21_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid21_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid22_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid22_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid22_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid23_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid23_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid23_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid24_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid24_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid24_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid25_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid25_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid25_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid26_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid26_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid26_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid27_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid27_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid27_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid28_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid28_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid28_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid29_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid29_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid29_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid30_CURRENT_PATIENTNAME: TStringField;\r\n xdsDynamicGrid30_CURRENT_PATIENTDOB: TStringField;\r\n xdsDynamicGrid30_CURRENT_PROCIMAGECOUNT: TStringField;\r\n xdsDynamicGrid1C14: TStringField;\r\n xdsDynamicGrid2C14: TStringField;\r\n xdsDynamicGrid3C14: TStringField;\r\n xdsDynamicGrid4C14: TStringField;\r\n xdsDynamicGrid10C14: TStringField;\r\n xdsDynamicGrid5C14: TStringField;\r\n xdsDynamicGrid6C14: TStringField;\r\n xdsDynamicGrid7C14: TStringField;\r\n xdsDynamicGrid8C14: TStringField;\r\n xdsDynamicGrid9C14: TStringField;\r\n xdsDynamicGrid11C14: TStringField;\r\n xdsDynamicGrid12C14: TStringField;\r\n xdsDynamicGrid13C14: TStringField;\r\n xdsDynamicGrid14C14: TStringField;\r\n xdsDynamicGrid15C14: TStringField;\r\n xdsDynamicGrid16C14: TStringField;\r\n xdsDynamicGrid17C14: TStringField;\r\n xdsDynamicGrid18C14: TStringField;\r\n xdsDynamicGrid19C14: TStringField;\r\n xdsDynamicGrid20C14: TStringField;\r\n xdsDynamicGrid21C14: TStringField;\r\n xdsDynamicGrid22C14: TStringField;\r\n xdsDynamicGrid23C14: TStringField;\r\n xdsDynamicGrid24C14: TStringField;\r\n xdsDynamicGrid25C14: TStringField;\r\n xdsDynamicGrid26C14: TStringField;\r\n xdsDynamicGrid27C14: TStringField;\r\n xdsDynamicGrid28C14: TStringField;\r\n xdsDynamicGrid29C14: TStringField;\r\n xdsDynamicGrid30C14: TStringField;\r\n xdsDynamicGrid1_CURRENT_APPTTYPE: TStringField;\r\n xdsDynamicGrid2_CURRENT_APPTTYPE: TStringField;\r\n xdsDynamicGrid3_CURRENT_APPTTYPE: TStringField;\r\n xdsDynamicGrid4_CURRENT_APPTTYPE: TStringField;\r\n xdsDynamicGrid5_CURRENT_APPTTYPE: TStringField;\r\n xdsDynamicGrid1_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid2_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid3_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid4_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid5_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid6_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid7_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid8_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid9_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid10_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid11_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid12_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid13_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid14_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid15_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid16_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid17_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid18_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid19_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid20_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid21_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid22_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid23_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid24_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid25_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid26_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid27_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid28_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid29_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid30_CURRENT_APPTDATE: TStringField;\r\n xdsDynamicGrid1_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid2_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid3_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid4_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid5_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid6_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid7_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid8_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid9_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid10_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid11_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid12_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid13_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid14_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid15_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid16_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid17_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid18_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid19_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid20_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid21_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid22_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid23_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid24_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid25_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid26_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid27_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid28_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid29_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid30_PATIENTFHIRID: TStringField;\r\n xdsDynamicGrid1_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid2_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid3_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid4_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid5_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid6_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid7_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid8_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid9_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid10_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid11_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid12_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid13_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid14_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid15_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid16_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid17_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid18_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid19_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid20_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid21_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid22_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid23_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid24_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid25_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid26_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid27_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid28_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid29_PATIENTCERNERID: TStringField;\r\n xdsDynamicGrid30_PATIENTCERNERID: TStringField;\r\n xdsImages: TXDataWebDataSet;\r\n dsImages: TDataSource;\r\n xdsImagesIMAGE: TBlobField;\r\n xdsImagesIMAGEBASE64: TMemoField;\r\n xdsDynamicGrid1C20: TMemoField;\r\n xdsImagesIMAGEBASE64_DATA: TMemoField;\r\n XDataWebConnection2: TXDataWebConnection;\r\n XDataWebClient2: TXDataWebClient;\r\n xdsImagesIMAGENUMBER: TIntegerField;\r\n xdsImagesSELECTED: TStringField;\r\n xdsImagesLABEL: TStringField;\r\n xdsImagesSEQUENCE: TIntegerField;\r\n xdsImageDiagram: TXDataWebDataSet;\r\n dsImageDiagram: TDataSource;\r\n xdsImageDiagramIMAGE: TBlobField;\r\n xdsImageDiagramIMAGEBASE64: TMemoField;\r\n xdsImageDiagramIMAGEBASE64_DATA: TMemoField;\r\n xdsImagesCOMMENTS: TStringField;\r\n xdsImagesFILENAME: TStringField;\r\n xdsDynamicGrid1EGV_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid2_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid3_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid4_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid6_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid7_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid8_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid9_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid10_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid11_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid12_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid13_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid14_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid15_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid16_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid17_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid18_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid19_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid20_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid21_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid22_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid23_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid24_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid25_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid26_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid27_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid28_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid29_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid30_SETUPFACILITYID: TStringField;\r\n xdsDynamicGrid1_USERID: TStringField;\r\n xdsDynamicGrid2_USERID: TStringField;\r\n xdsDynamicGrid3_USERID: TStringField;\r\n xdsDynamicGrid4_USERID: TStringField;\r\n xdsDynamicGrid5_USERID: TStringField;\r\n xdsDynamicGrid6_USERID: TStringField;\r\n xdsDynamicGrid7_USERID: TStringField;\r\n xdsDynamicGrid8_USERID: TStringField;\r\n xdsDynamicGrid9_USERID: TStringField;\r\n xdsDynamicGrid10_USERID: TStringField;\r\n xdsDynamicGrid11_USERID: TStringField;\r\n xdsDynamicGrid12_USERID: TStringField;\r\n xdsDynamicGrid13_USERID: TStringField;\r\n xdsDynamicGrid14_USERID: TStringField;\r\n xdsDynamicGrid15_USERID: TStringField;\r\n xdsDynamicGrid16_USERID: TStringField;\r\n xdsDynamicGrid17_USERID: TStringField;\r\n xdsDynamicGrid18_USERID: TStringField;\r\n xdsDynamicGrid19_USERID: TStringField;\r\n xdsDynamicGrid20_USERID: TStringField;\r\n xdsDynamicGrid21_USERID: TStringField;\r\n xdsDynamicGrid22_USERID: TStringField;\r\n xdsDynamicGrid23_USERID: TStringField;\r\n xdsDynamicGrid24_USERID: TStringField;\r\n xdsDynamicGrid25_USERID: TStringField;\r\n xdsDynamicGrid26_USERID: TStringField;\r\n xdsDynamicGrid27_USERID: TStringField;\r\n xdsDynamicGrid28_USERID: TStringField;\r\n xdsDynamicGrid29_USERID: TStringField;\r\n xdsDynamicGrid30_USERID: TStringField;\r\n xdsImagesBORDER_COLOR: TStringField;\r\n xdsImagesGILABELTEXT: TStringField;\r\n xdsImagesGILABELTEXTCOLOR_HEX: TStringField;\r\n xdsImagesGILABELBKCOLOR_HEX: TStringField;\r\n xdsImagesGILABELTEXTCOLOR: TIntegerField;\r\n xdsImagesGILABELBKCOLOR: TIntegerField;\r\n procedure xdsQPKL_DynamicDataAfterOpen(DataSet: TDataSet);\r\n procedure WebDataModuleCreate(Sender: TObject);\r\n procedure xdsPicklistNewRecord(DataSet: TDataSet);\r\n procedure xdsPicklistCalcFields(DataSet: TDataSet);\r\n procedure xdsPicklistBeforeInsert(DataSet: TDataSet);\r\n procedure xdsPicklistBeforeDelete(DataSet: TDataSet);\r\n procedure xdsPicklistAfterClose(DataSet: TDataSet);\r\n procedure xdsPicklistAfterOpen(DataSet: TDataSet);\r\n procedure xdsPicklistBeforePost(DataSet: TDataSet);\r\n procedure xdsMainMenuAfterOpen(DataSet: TDataSet);\r\n procedure XDataWebConnection1Connect(Sender: TObject);\r\n procedure xdsPicklistBeforeOpen(DataSet: TDataSet);\r\n procedure xdsDynamicGrid1AfterOpen(DataSet: TDataSet);\r\n procedure xdsDynamicGrid1NewRecord(DataSet: TDataSet);\r\n procedure xdsDynamicGrid1AfterEdit(DataSet: TDataSet);\r\n procedure xdsDynamicGrid1AfterClose(DataSet: TDataSet);\r\n procedure xdsPicklistBeforeEdit(DataSet: TDataSet);\r\n procedure xdsImagesAfterOpen(DataSet: TDataSet);\r\n procedure XDataWebConnection2Error(Error: TXDataWebConnectionError);\r\n procedure XDataWebConnection1Error(Error: TXDataWebConnectionError);\r\n procedure xdsImagesCalcFields(DataSet: TDataSet);\r\n procedure xdsImageDiagramAfterOpen(DataSet: TDataSet);\r\n\r\n private\r\n { Private declarations }\r\n public\r\n { Public declarations }\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n DM: TDM;\r\n\r\nimplementation\r\n\r\n{%CLASSGROUP 'Vcl.Controls.TControl'}\r\n\r\n{$R *.dfm}\r\nuses common, Picklist, main, Settings, Login_new;\r\n\r\nprocedure TDM.WebDataModuleCreate(Sender: TObject);\r\nvar url_p: string;\r\nbegin\r\negv_facilitycode := '';\r\n\r\n//https://enrtest.qlinical.com/ENR_XDATASERVER - service on the test server\r\n//http://rome-tsapp/ENR_XDATASERVER - service on the computer with the project\r\n\r\nELV_APPLICATIONURL := window.location.href;\r\n\r\nif pos('localhost:8000', window.location.href) > 0\r\nthen begin\r\n egv_ServerbaseURL := 'https://test.ArgusMedGPT.com/ArgusMedGPT';\r\n\r\n egv_ReportsURL := 'https://test.ArgusMedGPT.com/REPORTS';\r\n egv_DocumentsURL := 'https://test.ArgusMedGPT.com/QlinicalReports';\r\n egv_ImagesURL := 'https://test.ArgusMedGPT.com/Images';\r\n elv_VideoDLLPath := 'https://test.ArgusMedGPT.com/Videodll.Dll/main';\r\n\r\n //example // https://test.ArgusMedGPT.com/REPORTS/NURHISTORY_127_28_1_1.pdf\r\n {\r\n egv_ServerbaseURL := 'https://enrtest.qlinical.com/ArgusMedGPT';\r\n egv_ReportsURL := 'https://enrtest.qlinical.com/REPORTS';\r\n egv_DocumentsURL := 'https://enrtest.qlinical.com/QlinicalReports';\r\n egv_ImagesURL := 'https://enrtest.qlinical.com/Images';\r\n elv_VideoDLLPath := 'https://enrtest.qlinical.com/Videodll.Dll/main';}\r\n\r\n { egv_ServerbaseURL := 'https://enrtest.qlinical.com/ENR_XDATASERVER';\r\n egv_ReportsURL := 'https://enrtest.qlinical.com/REPORTS';\r\n egv_DocumentsURL := 'https://enrtest.qlinical.com/QlinicalReports';\r\n egv_ImagesURL := 'https://enrtest.qlinical.com/Images';\r\n elv_VideoDLLPath := 'https://enrtest.qlinical.com/Videodll.Dll/main'; }\r\n\r\n { egv_ServerbaseURL := 'http://rome-tsapp/ENR_XDATASERVER';\r\n egv_ReportsURL := 'http://rome-tsapp/REPORTS';\r\n egv_DocumentsURL := 'http://rome-tsapp/QlinicalReports'\r\n egv_ImagesURL := 'http://rome-tsapp/Images';\r\n elv_VideoDLLPath := 'http://rome-tsapp/Videodll.Dll/main'; }\r\n\r\n end\r\nelse begin\r\n url_p := window.location.href;\r\n if pos('?', url_p) <> 0\r\n then url_p := copy(url_p,1,pos('?',url_p) -1);\r\n\r\n egv_ServerbaseURL := url_p +'ArgusMedGPT';\r\n\r\n egv_ReportsURL := url_p +'REPORTS';\r\n egv_DocumentsURL := url_p +'QlinicalReports';\r\n egv_ImagesURL := url_p +'Images';\r\n elv_VideoDLLPath := url_p +'Videodll.Dll/main';\r\n\r\n {egv_ServerbaseURL := window.location.href +'ENR_XDATASERVER';\r\n egv_ReportsURL := window.location.href +'REPORTS';\r\n egv_DocumentsURL := window.location.href +'QlinicalReports';\r\n egv_ImagesURL := window.location.href +'Images';\r\n elv_VideoDLLPath := window.location.href +'Videodll.Dll/main'; }\r\n end;\r\n\r\n\r\n // ArgusMedGPT\r\n\r\n\r\nXDataWebConnection1.URL := egv_ServerbaseURL;\r\n//showmessage(XDataWebConnection1.URL);\r\nXDataWebConnection1.Connected := false;\r\nXDataWebConnection1.Connected := true;\r\negv_subform := nil;\r\n\r\nend;\r\n\r\nprocedure TDM.XDataWebConnection1Connect(Sender: TObject);\r\nvar s: string; Y,M,D,H,MN,SC,MS: word;\r\nbegin // showmessage('on connect');\r\n\r\nif XDataWebConnection1.tag = 0\r\nthen begin\r\n //showmessage('tag = 0');\r\n Application.CreateForm(TfrmLogin_new, frmLogin_new);\r\n end;\r\nif XDataWebConnection1.tag = 1\r\nthen begin\r\n XDataWebConnection1.tag := 0;\r\n //Create User Session ID\r\n DecodeDate(date,Y,M,D);\r\n DecodeTime(time,H,MN,SC,MS);\r\n ELV_SESSIONID := inttostr(Y)+inttostr(M)+inttostr(D)+inttostr(H)+inttostr(MN)+inttostr(SC)+inttostr(MS);\r\n EGV_USERNAME := EGV_USERID;\r\n EGV_USERROLE := 'ADMINISTRATOR'; // to have user role in dbaccessuser table\r\n // showmessage(EGV_USERROLE);\r\n //Load settings and open main form\r\n // showmessage('load starts');\r\n LS_Load\r\n end;\r\nend;\r\n\r\nprocedure TDM.XDataWebConnection1Error(Error: TXDataWebConnectionError);\r\nbegin\r\n//Showmessage('Error connecting to Main service: ' + Error.ErrorMessage);\r\nXDataWebConnection2.Tag := -1;\r\nend;\r\n\r\nprocedure TDM.XDataWebConnection2Error(Error: TXDataWebConnectionError);\r\nbegin\r\n//Showmessage('Error connecting to Local service: ' + Error.ErrorMessage);\r\nXDataWebConnection2.Tag := -1;\r\nend;\r\n\r\nprocedure TDM.xdsDynamicGrid1AfterClose(DataSet: TDataSet);\r\nbegin\r\ndataset.tag := 0; // released\r\nend;\r\n\r\nprocedure TDM.xdsDynamicGrid1AfterEdit(DataSet: TDataSet);\r\nbegin\r\nif (Dataset.findfield('NEW_RECORD') <> nil) and (Dataset.fieldbyname('NEW_RECORD').asinteger = 0)\r\nthen Dataset.fieldbyname('NEW_RECORD').asinteger := 2;\r\nend;\r\n\r\nprocedure TDM.xdsDynamicGrid1AfterOpen(DataSet: TDataSet);\r\nvar ds_p: TDataSource; i: integer;\r\nbegin\r\n//showmessage('records: ' + inttostr(dataset.RecordCount) + ' MRN: ' + EGV_CURRENT_MRN);\r\ndataset.Tag := 1; // in use;\r\nPrepareFieldsdata_J(Dataset);\r\n\r\nif (EGV_RECNO > 0) and (EGV_RECNO < dataset.RecordCount)\r\nthen begin\r\n dataset.RecNo := EGV_RECNO;\r\n EGV_RECNO := 0;\r\n end;\r\nSetKeyVariablesFromDataSet(dataset);\r\n\r\n//if IsSystemKeysChanged()\r\n//then begin\r\n DBF_GetPostBlocks(frmmain.sbLogoBox, 0, frmmain);\r\n DBF_GetPostBlocks(frmmain.sbAlertBoxes, 0, frmmain);\r\n DBF_GetPostBlocks(frmmain.sbInfoBoxes, 0, frmmain);\r\n// end;\r\n\r\nif getcurrentform <> nil\r\nthen begin\r\n for i := 0 to getcurrentform.componentcount - 1\r\n do begin\r\n if (getcurrentform.components[i] is TDBGrid) and assigned( (getcurrentform.components[i] as TDBGrid).datasource ) and\r\n ((getcurrentform.components[i] as TDBGrid).datasource.DataSet.Name = dataset.Name)\r\n then begin //showmessage('1');\r\n ds_p := (getcurrentform.components[i] as TDBGrid).datasource;\r\n (getcurrentform.components[i] as TDBGrid).datasource := nil;\r\n (getcurrentform.components[i] as TDBGrid).datasource := ds_p;\r\n end;\r\n end;\r\n end;\r\n\r\n//showmessage(inttostr(dataset.recordcount));\r\n{if getcurrentform.findcomponent('tmCloseWaitMessage') <> nil\r\nthen (getcurrentform.findcomponent('tmCloseWaitMessage') as twebtimer).enabled := true;}\r\n\r\nend;\r\n\r\nprocedure TDM.xdsDynamicGrid1NewRecord(DataSet: TDataSet);\r\nbegin\r\nDataset.fieldbyname('NEW_RECORD').asinteger := 1;\r\nend;\r\n\r\nprocedure TDM.xdsMainMenuAfterOpen(DataSet: TDataSet);\r\nbegin\r\n// showmessage('calling loadmainMenu');\r\n// load main menu , apply design and read data from db for data blocks ( Alert boxes, ...)\r\nLoadMainMenu;\r\n\r\n{GetPostFormDesignData(frmmain.name, 'V', 0, frmmain.sbLogoBox,1);\r\nGetPostFormDesignData(frmmain.name, 'P', 0, frmmain.sbLogoBox,1);\r\nGetPostFormDesignData(frmmain.name, 'T', 0, frmmain.sbLogoBox,1);\r\n\r\nGetPostFormDesignData(frmmain.name, 'V', 0, frmmain.sbAlertBoxes,5);\r\nGetPostFormDesignData(frmmain.name, 'P', 0, frmmain.sbAlertBoxes,5);\r\nGetPostFormDesignData(frmmain.name, 'T', 0, frmmain.sbAlertBoxes,5);\r\n\r\nGetPostFormDesignData(frmmain.name, 'V', 0, frmmain.sbInfoBoxes,5);\r\nGetPostFormDesignData(frmmain.name, 'P', 0, frmmain.sbInfoBoxes,5);\r\nGetPostFormDesignData(frmmain.name, 'T', 0, frmmain.sbInfoBoxes,5);\r\n\r\nDBF_GetPostBlocks(frmmain.sbLogoBox, 0, frmmain);\r\nDBF_GetPostBlocks(frmmain.sbAlertBoxes, 0, frmmain);\r\nDBF_GetPostBlocks(frmmain.sbInfoBoxes, 0, frmmain); }\r\n\r\n//showmessage('2');\r\nend;\r\n\r\nprocedure TDM.xdsPicklistAfterClose(DataSet: TDataSet);\r\nbegin\r\nEGV_PKLNEXTID := -1;\r\nend;\r\n\r\nprocedure TDM.xdsPicklistAfterOpen(DataSet: TDataSet);\r\nbegin\r\n//showmessage('after open:' + dataset.fields[0].asstring);\r\nPrepareFieldsdata_J(Dataset);\r\nEGV_PKLNEXTID := -1;\r\nend;\r\n\r\nprocedure TDM.xdsPicklistBeforeDelete(DataSet: TDataSet);\r\nbegin\r\nif (DataSet.FieldByName('FACILITYID').asinteger <> strtoint(egv_facilityid))\r\nthen begin\r\n Showmessage('Item cannot be deleted.');\r\n abort;\r\n end;\r\nDataSetApplyUpdate(DataSet, 'D', 1);\r\nend;\r\n\r\nprocedure TDM.xdsPicklistBeforeEdit(DataSet: TDataSet);\r\nbegin\r\nif (DataSet.FieldByName('FACILITYID').asinteger <> strtoint(egv_facilityid))\r\nthen begin\r\n Showmessage('Item cannot be modified.');\r\n abort;\r\n end;\r\nend;\r\n\r\nprocedure TDM.xdsPicklistBeforeInsert(DataSet: TDataSet);\r\nvar id_p, lastid_p: integer; s, idstr_p: string;\r\nbegin\r\n dataset.first;\r\n if EGV_PKLNEXTID = -1\r\n then begin\r\n lastid_p := -1;\r\n while not dataset.eof\r\n do begin\r\n if dataset.fieldbyname('FACILITYID').asstring = egv_facilityid\r\n then begin\r\n s := dataset.fieldbyname('IDENT_NAME').asstring;\r\n s := stringreplace(s, dataset.fieldbyname('SECTION_NAME').asstring,'',[rfIgnorecase]);\r\n s := stringreplace(s, 'MAIN_MENU','',[rfIgnorecase]); // old items\r\n // showmessage(dataset.fieldbyname('SECTION_NAME').asstring);\r\n if pos('_', s) = 0\r\n then id_p := 0\r\n else begin\r\n s := stringreplace(s, '_','',[]);\r\n // showmessage('2 - '+s);\r\n if s <> ''\r\n then id_p := strtoint(s)\r\n else id_p := 0;\r\n end;\r\n lastid_p := max(lastid_p, id_p);\r\n end;\r\n dataset.Next;\r\n\r\n end;\r\n EGV_PKLNEXTID := lastid_p;\r\n end;\r\n\r\n EGV_PKLNEXTID := EGV_PKLNEXTID + 1; //showmessage(inttostr(EGV_PKLNEXTID));\r\nend;\r\n\r\nprocedure TDM.xdsPicklistBeforeOpen(DataSet: TDataSet);\r\nvar i: integer;\r\nbegin\r\n//showmessage(inttostr(dataset.fielddefs.count));\r\n//showmessage('before open');\r\nPrepareFields_J(dataset);\r\n\r\nend;\r\n\r\nprocedure TDM.xdsPicklistBeforePost(DataSet: TDataSet);\r\nbegin\r\nif Dataset.State = dsEdit then DataSetApplyUpdate(DataSet, 'U', 1);\r\nif Dataset.State = dsInsert then DataSetApplyUpdate(DataSet, 'I', 1);\r\nend;\r\n\r\nprocedure TDM.xdsPicklistCalcFields(DataSet: TDataSet);\r\nbegin\r\nif xdsPickList.fields[6].asinteger = 1\r\nthen xdsPickListCVISIBLE.asstring := ' '\r\nelse xdsPickListCVISIBLE.asstring := '[ x ]'\r\nend;\r\n\r\nprocedure TDM.xdsPicklistNewRecord(DataSet: TDataSet);\r\nbegin\r\n DataSet.FieldByName('USERID').AsString := 'SYSDBA'; // + EGV_FACILITYID; //EGV_USERID;\r\n DataSet.FieldByName('SECTION_NAME').AsString := EGV_SECTIONNAME;\r\n\r\n DataSet.FieldByName('IDENT_NAME').AsString := EGV_SECTIONNAME + '_' + inttostr(EGV_PKLNEXTID).PadLeft(5,'0');\r\n\r\n DataSet.FieldByName('FACILITYID').AsString := EGV_FACILITYID;\r\n DataSet.FieldByName('SPECIALITY').AsString := EGV_SPECIALITY;\r\n DataSet.FieldByName('VISIBLE').AsInteger := 1;\r\nend;\r\n\r\nprocedure TDM.xdsQPKL_DynamicDataAfterOpen(DataSet: TDataSet);\r\nbegin\r\n//if EGV_CURRENTBLOCK = nil then exit;\r\n\r\n{if frmmain.rgBlockRadioGroup.tag = 1\r\nthen common.QPKL_LoadFromDataset( (Dataset as TXDataWebDataset), 'Original.ITEM',nil, '', EGV_USEQPKL_CACHE)\r\nelse common.QPKL_LoadFromDataset( (Dataset as TXDataWebDataset), 'Original.ITEM',nil, '', EGV_USEQPKL_CACHE); }\r\ncommon.QPKL_LoadFromDataset( (Dataset as TXDataWebDataset), 'Original.ITEM',nil, '', EGV_USEQPKL_CACHE);\r\n\r\nend;\r\n\r\nprocedure TDM.xdsImageDiagramAfterOpen(DataSet: TDataSet);\r\nvar base64_image: string; i: integer;\r\nbegin\r\n//showmessage('after open');\r\nPrepareFieldsdata_J(Dataset);\r\n//base64_image := window.btoa(DataSet.FieldByName('Image').AsString);\r\n//showmessage('after open: ' + base64_image);\r\n//frmmain.webimagecontrol1.url := 'data:image/jpeg;base64,' + base64_image;\r\n\r\n//'data:image/jpeg;base64,' + DataSet.FieldByName('Image').AsString;\r\ndataset.First;\r\nwhile not dataset.Eof\r\ndo begin\r\n base64_image := window.btoa(DataSet.FieldByName('Image').AsString);\r\n dataset.Edit;\r\n dataset.FieldByName('IMAGEBASE64').AsString := 'data:image/jpeg;base64,' + base64_image;\r\n dataset.FieldByName('IMAGEBASE64_DATA').AsString := base64_image;\r\n dataset.Post;\r\n dataset.Next;\r\n end;\r\ndataset.First;\r\ndataset.Tag := 1; // ready.\r\nend;\r\n\r\nprocedure TDM.xdsImagesAfterOpen(DataSet: TDataSet);\r\nvar base64_image: string; i: integer;\r\nbegin\r\n//showmessage('after open');\r\nPrepareFieldsdata_J(Dataset);\r\n//base64_image := window.btoa(DataSet.FieldByName('Image').AsString);\r\n//showmessage('after open: ' + base64_image);\r\n//frmmain.webimagecontrol1.url := 'data:image/jpeg;base64,' + base64_image;\r\n\r\n//'data:image/jpeg;base64,' + DataSet.FieldByName('Image').AsString;\r\n\r\n//for i := 0 to dataset.Fields.Count - 1\r\n//do showmessage(dataset.Fields[i].FieldName);\r\n\r\ndataset.First;\r\nwhile not dataset.Eof\r\ndo begin\r\n base64_image := window.btoa(DataSet.FieldByName('Image').AsString);\r\n dataset.Edit;\r\n dataset.FieldByName('IMAGEBASE64').AsString := 'data:image/jpeg;base64,' + base64_image;\r\n dataset.FieldByName('IMAGEBASE64_DATA').AsString := base64_image;\r\n { if dataset.FieldByName('SELECTED').AsString = 'T'\r\n then dataset.FieldByName('BORDER_COLOR').AsString := 'Yellow'\r\n else dataset.FieldByName('BORDER_COLOR').AsString := '#ccc'; }\r\n dataset.Post;\r\n dataset.Next;\r\n end;\r\ndataset.First;\r\ndataset.Tag := 1; // ready.\r\n//showmessage('finish');\r\nend;\r\n\r\nprocedure TDM.xdsImagesCalcFields(DataSet: TDataSet);\r\nbegin\r\n//dataset.FieldByName('BORDER_COLOR').AsString := 'Yellow';\r\n\r\nif dataset.FindField('SELECTED') <> nil\r\nthen begin\r\n if ( dataset.FieldByName('SELECTED').AsString = 'T')\r\n then dataset.FieldByName('BORDER_COLOR').AsString := 'Yellow'\r\n else dataset.FieldByName('BORDER_COLOR').AsString := '#ccc';\r\n end;\r\n\r\nif dataset.FindField('GILABELTEXTCOLOR') <> nil\r\nthen begin\r\n dataset.FieldByName('GILABELTEXTCOLOR_HEX').AsString := DecimalColorToHex(dataset.FieldByName('GILABELTEXTCOLOR').AsInteger);\r\n // showmessage(dataset.FieldByName('GILABELTEXTCOLOR_HEX').AsString);\r\n end;\r\nif (dataset.FindField('GILABELBKCOLOR') <> nil) and (dataset.FieldByName('GILABELBKCOLOR').AsString <> '')\r\nthen begin\r\n dataset.FieldByName('GILABELBKCOLOR_HEX').AsString := DecimalColorToHex(dataset.FieldByName('GILABELBKCOLOR').AsInteger);\r\n // showmessage(dataset.FieldByName('GILABELBKCOLOR_HEX').AsString);\r\n end;\r\nend;\r\n\r\nprocedure TDM.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n XDataWebConnection1 := TXDataWebConnection.Create(Self);\r\n EGV_LOCALSTORAGE := TLocalStorage.Create(Self);\r\n XDataWebClient1 := TXDataWebClient.Create(Self);\r\n dsQPKL_DynamicData := TDataSource.Create(Self);\r\n xdsQPKL_DynamicData := TXDataWebDataSet.Create(Self);\r\n xdsQPKL_DynamicDataOriginalITEM := TStringField.Create(Self);\r\n dsPickList := TDataSource.Create(Self);\r\n xdsMainMenu := TXDataWebDataSet.Create(Self);\r\n xdsMainMenuOriginalIDENT_VALUE := TStringField.Create(Self);\r\n xdsMainMenuOriginalVISIBLE := TIntegerField.Create(Self);\r\n xdsPicklist := TXDataWebDataSet.Create(Self);\r\n xdsPicklistUSERID := TStringField.Create(Self);\r\n xdsPicklistSECTION_NAME := TStringField.Create(Self);\r\n xdsPicklistIDENT_NAME := TStringField.Create(Self);\r\n xdsPicklistIDENT_VALUE := TStringField.Create(Self);\r\n xdsPicklistFACILITYID := TIntegerField.Create(Self);\r\n xdsPicklistSPECIALITY := TStringField.Create(Self);\r\n xdsPicklistVISIBLE := TIntegerField.Create(Self);\r\n xdsPicklistcVISIBLE := TStringField.Create(Self);\r\n xdsPicklistNOTES := TBlobField.Create(Self);\r\n xdsDynamicGrid1 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid1C1 := TStringField.Create(Self);\r\n xdsDynamicGrid1C2 := TStringField.Create(Self);\r\n xdsDynamicGrid1C3 := TStringField.Create(Self);\r\n xdsDynamicGrid1C4 := TStringField.Create(Self);\r\n xdsDynamicGrid1C5 := TStringField.Create(Self);\r\n xdsDynamicGrid1C6 := TStringField.Create(Self);\r\n xdsDynamicGrid1C7 := TStringField.Create(Self);\r\n xdsDynamicGrid1C8 := TStringField.Create(Self);\r\n xdsDynamicGrid1C9 := TStringField.Create(Self);\r\n xdsDynamicGrid1C10 := TStringField.Create(Self);\r\n xdsDynamicGrid1C11 := TStringField.Create(Self);\r\n xdsDynamicGrid1C12 := TStringField.Create(Self);\r\n xdsDynamicGrid1C13 := TStringField.Create(Self);\r\n xdsDynamicGrid1C14 := TStringField.Create(Self);\r\n xdsDynamicGrid1C15 := TStringField.Create(Self);\r\n xdsDynamicGrid1C16 := TStringField.Create(Self);\r\n xdsDynamicGrid1C17 := TStringField.Create(Self);\r\n xdsDynamicGrid1C18 := TStringField.Create(Self);\r\n xdsDynamicGrid1C19 := TStringField.Create(Self);\r\n xdsDynamicGrid1C20 := TMemoField.Create(Self);\r\n xdsDynamicGrid1_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid1_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid1_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid1_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid1_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid1_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid1_CURRENT_APPTTYPE := TStringField.Create(Self);\r\n xdsDynamicGrid1_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid1_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid1_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid1_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid1_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid1_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid1_CURRENTPROC_IMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid1_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid1_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid1_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid1EGV_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid1_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid1NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid1 := TDataSource.Create(Self);\r\n xdsDynamicGrid2 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid2C1 := TStringField.Create(Self);\r\n xdsDynamicGrid2C2 := TStringField.Create(Self);\r\n xdsDynamicGrid2C3 := TStringField.Create(Self);\r\n xdsDynamicGrid2C4 := TStringField.Create(Self);\r\n xdsDynamicGrid2C5 := TStringField.Create(Self);\r\n xdsDynamicGrid2C6 := TStringField.Create(Self);\r\n xdsDynamicGrid2C7 := TStringField.Create(Self);\r\n xdsDynamicGrid2C8 := TStringField.Create(Self);\r\n xdsDynamicGrid2C9 := TStringField.Create(Self);\r\n xdsDynamicGrid2C10 := TStringField.Create(Self);\r\n xdsDynamicGrid2C11 := TStringField.Create(Self);\r\n xdsDynamicGrid2C12 := TStringField.Create(Self);\r\n xdsDynamicGrid2C13 := TStringField.Create(Self);\r\n xdsDynamicGrid2C14 := TStringField.Create(Self);\r\n xdsDynamicGrid2C15 := TStringField.Create(Self);\r\n xdsDynamicGrid2C16 := TStringField.Create(Self);\r\n xdsDynamicGrid2C17 := TStringField.Create(Self);\r\n xdsDynamicGrid2C18 := TStringField.Create(Self);\r\n xdsDynamicGrid2C19 := TStringField.Create(Self);\r\n xdsDynamicGrid2C20 := TStringField.Create(Self);\r\n xdsDynamicGrid2_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid2_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid2_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid2_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid2_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid2_CURRENT_APPTTYPE := TStringField.Create(Self);\r\n xdsDynamicGrid2_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid2_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid2_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid2_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid2_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid2_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid2_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid2_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid2_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid2_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid2_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid2_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid2_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid2NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid2 := TDataSource.Create(Self);\r\n xdsDynamicGrid3 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid3C1 := TStringField.Create(Self);\r\n xdsDynamicGrid3C2 := TStringField.Create(Self);\r\n xdsDynamicGrid3C3 := TStringField.Create(Self);\r\n xdsDynamicGrid3C4 := TStringField.Create(Self);\r\n xdsDynamicGrid3C5 := TStringField.Create(Self);\r\n xdsDynamicGrid3C6 := TStringField.Create(Self);\r\n xdsDynamicGrid3C7 := TStringField.Create(Self);\r\n xdsDynamicGrid3C8 := TStringField.Create(Self);\r\n xdsDynamicGrid3C9 := TStringField.Create(Self);\r\n xdsDynamicGrid3C10 := TStringField.Create(Self);\r\n xdsDynamicGrid3C11 := TStringField.Create(Self);\r\n xdsDynamicGrid3C12 := TStringField.Create(Self);\r\n xdsDynamicGrid3C13 := TStringField.Create(Self);\r\n xdsDynamicGrid3C14 := TStringField.Create(Self);\r\n xdsDynamicGrid3C15 := TStringField.Create(Self);\r\n xdsDynamicGrid3C16 := TStringField.Create(Self);\r\n xdsDynamicGrid3C17 := TStringField.Create(Self);\r\n xdsDynamicGrid3C18 := TStringField.Create(Self);\r\n xdsDynamicGrid3C19 := TStringField.Create(Self);\r\n xdsDynamicGrid3C20 := TStringField.Create(Self);\r\n xdsDynamicGrid3_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid3_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid3_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid3_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid3_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid3_CURRENT_APPTTYPE := TStringField.Create(Self);\r\n xdsDynamicGrid3_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid3_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid3_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid3_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid3_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid3_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid3_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid3_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid3_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid3_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid3_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid3_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid3_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid3NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid3 := TDataSource.Create(Self);\r\n xdsDynamicGrid4 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid4C1 := TStringField.Create(Self);\r\n xdsDynamicGrid4C2 := TStringField.Create(Self);\r\n xdsDynamicGrid4C3 := TStringField.Create(Self);\r\n xdsDynamicGrid4C4 := TStringField.Create(Self);\r\n xdsDynamicGrid4C5 := TStringField.Create(Self);\r\n xdsDynamicGrid4C6 := TStringField.Create(Self);\r\n xdsDynamicGrid4C7 := TStringField.Create(Self);\r\n xdsDynamicGrid4C8 := TStringField.Create(Self);\r\n xdsDynamicGrid4C9 := TStringField.Create(Self);\r\n xdsDynamicGrid4C10 := TStringField.Create(Self);\r\n xdsDynamicGrid4C11 := TStringField.Create(Self);\r\n xdsDynamicGrid4C12 := TStringField.Create(Self);\r\n xdsDynamicGrid4C13 := TStringField.Create(Self);\r\n xdsDynamicGrid4C14 := TStringField.Create(Self);\r\n xdsDynamicGrid4C15 := TStringField.Create(Self);\r\n xdsDynamicGrid4C16 := TStringField.Create(Self);\r\n xdsDynamicGrid4C17 := TStringField.Create(Self);\r\n xdsDynamicGrid4C18 := TStringField.Create(Self);\r\n xdsDynamicGrid4C19 := TStringField.Create(Self);\r\n xdsDynamicGrid4C20 := TStringField.Create(Self);\r\n xdsDynamicGrid4_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid4_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid4_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid4_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid4_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid4_CURRENT_APPTTYPE := TStringField.Create(Self);\r\n xdsDynamicGrid4_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid4_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid4_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid4_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid4_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid4_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid4_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid4_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid4_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid4_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid4_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid4_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid4_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid4NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid4 := TDataSource.Create(Self);\r\n xdsDynamicGrid5 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid5C1 := TStringField.Create(Self);\r\n xdsDynamicGrid5C2 := TStringField.Create(Self);\r\n xdsDynamicGrid5C3 := TStringField.Create(Self);\r\n xdsDynamicGrid5C4 := TStringField.Create(Self);\r\n xdsDynamicGrid5C5 := TStringField.Create(Self);\r\n xdsDynamicGrid5C6 := TStringField.Create(Self);\r\n xdsDynamicGrid5C7 := TStringField.Create(Self);\r\n xdsDynamicGrid5C8 := TStringField.Create(Self);\r\n xdsDynamicGrid5C9 := TStringField.Create(Self);\r\n xdsDynamicGrid5C10 := TStringField.Create(Self);\r\n xdsDynamicGrid5C11 := TStringField.Create(Self);\r\n xdsDynamicGrid5C12 := TStringField.Create(Self);\r\n xdsDynamicGrid5C13 := TStringField.Create(Self);\r\n xdsDynamicGrid5C14 := TStringField.Create(Self);\r\n xdsDynamicGrid5C15 := TStringField.Create(Self);\r\n xdsDynamicGrid5C16 := TStringField.Create(Self);\r\n xdsDynamicGrid5C17 := TStringField.Create(Self);\r\n xdsDynamicGrid5C18 := TStringField.Create(Self);\r\n xdsDynamicGrid5C19 := TStringField.Create(Self);\r\n xdsDynamicGrid5C20 := TStringField.Create(Self);\r\n xdsDynamicGrid5_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid5_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid5_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid5_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid5_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid5_CURRENT_APPTTYPE := TStringField.Create(Self);\r\n xdsDynamicGrid5_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid5_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid5_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid5_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid5_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid5_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid5_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid5_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid5_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid5_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid5_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid5_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid5NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid5 := TDataSource.Create(Self);\r\n xdsDynamicGrid6 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid6C1 := TStringField.Create(Self);\r\n xdsDynamicGrid6C2 := TStringField.Create(Self);\r\n xdsDynamicGrid6C3 := TStringField.Create(Self);\r\n xdsDynamicGrid6C4 := TStringField.Create(Self);\r\n xdsDynamicGrid6C5 := TStringField.Create(Self);\r\n xdsDynamicGrid6C6 := TStringField.Create(Self);\r\n xdsDynamicGrid6C7 := TStringField.Create(Self);\r\n xdsDynamicGrid6C8 := TStringField.Create(Self);\r\n xdsDynamicGrid6C9 := TStringField.Create(Self);\r\n xdsDynamicGrid6C11 := TStringField.Create(Self);\r\n xdsDynamicGrid6C10 := TStringField.Create(Self);\r\n xdsDynamicGrid6C12 := TStringField.Create(Self);\r\n xdsDynamicGrid6C14 := TStringField.Create(Self);\r\n xdsDynamicGrid6C15 := TStringField.Create(Self);\r\n xdsDynamicGrid6C13 := TStringField.Create(Self);\r\n xdsDynamicGrid6C16 := TStringField.Create(Self);\r\n xdsDynamicGrid6C17 := TStringField.Create(Self);\r\n xdsDynamicGrid6C18 := TStringField.Create(Self);\r\n xdsDynamicGrid6C19 := TStringField.Create(Self);\r\n xdsDynamicGrid6C20 := TStringField.Create(Self);\r\n xdsDynamicGrid6_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid6_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid6_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid6_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid6_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid6_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid6_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid6_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid6_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid6_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid6_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid6_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid6_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid6_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid6_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid6_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid6_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid6_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid6NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid6 := TDataSource.Create(Self);\r\n xdsDynamicGrid7 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid7C1 := TStringField.Create(Self);\r\n xdsDynamicGrid7C2 := TStringField.Create(Self);\r\n xdsDynamicGrid7C3 := TStringField.Create(Self);\r\n xdsDynamicGrid7C4 := TStringField.Create(Self);\r\n xdsDynamicGrid7C5 := TStringField.Create(Self);\r\n xdsDynamicGrid7C6 := TStringField.Create(Self);\r\n xdsDynamicGrid7C7 := TStringField.Create(Self);\r\n xdsDynamicGrid7C8 := TStringField.Create(Self);\r\n xdsDynamicGrid7C9 := TStringField.Create(Self);\r\n xdsDynamicGrid7C11 := TStringField.Create(Self);\r\n xdsDynamicGrid7C10 := TStringField.Create(Self);\r\n xdsDynamicGrid7C12 := TStringField.Create(Self);\r\n xdsDynamicGrid7C14 := TStringField.Create(Self);\r\n xdsDynamicGrid7C15 := TStringField.Create(Self);\r\n xdsDynamicGrid7C13 := TStringField.Create(Self);\r\n xdsDynamicGrid7C16 := TStringField.Create(Self);\r\n xdsDynamicGrid7C17 := TStringField.Create(Self);\r\n xdsDynamicGrid7C18 := TStringField.Create(Self);\r\n xdsDynamicGrid7C19 := TStringField.Create(Self);\r\n xdsDynamicGrid7C20 := TStringField.Create(Self);\r\n xdsDynamicGrid7_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid7_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid7_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid7_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid7_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid7_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid7_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid7_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid7_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid7_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid7_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid7_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid7_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid7_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid7_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid7_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid7_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid7_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid7NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid7 := TDataSource.Create(Self);\r\n xdsDynamicGrid8 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid8C1 := TStringField.Create(Self);\r\n xdsDynamicGrid8C2 := TStringField.Create(Self);\r\n xdsDynamicGrid8C3 := TStringField.Create(Self);\r\n xdsDynamicGrid8C4 := TStringField.Create(Self);\r\n xdsDynamicGrid8C5 := TStringField.Create(Self);\r\n xdsDynamicGrid8C6 := TStringField.Create(Self);\r\n xdsDynamicGrid8C7 := TStringField.Create(Self);\r\n xdsDynamicGrid8C8 := TStringField.Create(Self);\r\n xdsDynamicGrid8C9 := TStringField.Create(Self);\r\n xdsDynamicGrid8C11 := TStringField.Create(Self);\r\n xdsDynamicGrid8C10 := TStringField.Create(Self);\r\n xdsDynamicGrid8C12 := TStringField.Create(Self);\r\n xdsDynamicGrid8C14 := TStringField.Create(Self);\r\n xdsDynamicGrid8C15 := TStringField.Create(Self);\r\n xdsDynamicGrid8C13 := TStringField.Create(Self);\r\n xdsDynamicGrid8C16 := TStringField.Create(Self);\r\n xdsDynamicGrid8C17 := TStringField.Create(Self);\r\n xdsDynamicGrid8C18 := TStringField.Create(Self);\r\n xdsDynamicGrid8C19 := TStringField.Create(Self);\r\n xdsDynamicGrid8C20 := TStringField.Create(Self);\r\n xdsDynamicGrid8_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid8_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid8_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid8_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid8_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid8_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid8_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid8_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid8_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid8_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid8_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid8_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid8_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid8_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid8_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid8_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid8_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid8_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid8NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid8 := TDataSource.Create(Self);\r\n xdsDynamicGrid9 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid9C1 := TStringField.Create(Self);\r\n xdsDynamicGrid9C2 := TStringField.Create(Self);\r\n xdsDynamicGrid9C3 := TStringField.Create(Self);\r\n xdsDynamicGrid9C4 := TStringField.Create(Self);\r\n xdsDynamicGrid9C5 := TStringField.Create(Self);\r\n xdsDynamicGrid9C6 := TStringField.Create(Self);\r\n xdsDynamicGrid9C7 := TStringField.Create(Self);\r\n xdsDynamicGrid9C8 := TStringField.Create(Self);\r\n xdsDynamicGrid9C9 := TStringField.Create(Self);\r\n xdsDynamicGrid9C11 := TStringField.Create(Self);\r\n xdsDynamicGrid9C10 := TStringField.Create(Self);\r\n xdsDynamicGrid9C12 := TStringField.Create(Self);\r\n xdsDynamicGrid9C14 := TStringField.Create(Self);\r\n xdsDynamicGrid9C15 := TStringField.Create(Self);\r\n xdsDynamicGrid9C13 := TStringField.Create(Self);\r\n xdsDynamicGrid9C16 := TStringField.Create(Self);\r\n xdsDynamicGrid9C17 := TStringField.Create(Self);\r\n xdsDynamicGrid9C18 := TStringField.Create(Self);\r\n xdsDynamicGrid9C19 := TStringField.Create(Self);\r\n xdsDynamicGrid9C20 := TStringField.Create(Self);\r\n xdsDynamicGrid9_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid9_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid9_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid9_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid9_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid9_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid9_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid9_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid9_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid9_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid9_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid9_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid9_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid9_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid9_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid9_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid9_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid9_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid9NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid9 := TDataSource.Create(Self);\r\n xdsDynamicGrid10 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid10C1 := TStringField.Create(Self);\r\n xdsDynamicGrid10C2 := TStringField.Create(Self);\r\n xdsDynamicGrid10C3 := TStringField.Create(Self);\r\n xdsDynamicGrid10C4 := TStringField.Create(Self);\r\n xdsDynamicGrid10C5 := TStringField.Create(Self);\r\n xdsDynamicGrid10C6 := TStringField.Create(Self);\r\n xdsDynamicGrid10C7 := TStringField.Create(Self);\r\n xdsDynamicGrid10C8 := TStringField.Create(Self);\r\n xdsDynamicGrid10C9 := TStringField.Create(Self);\r\n xdsDynamicGrid10C11 := TStringField.Create(Self);\r\n xdsDynamicGrid10C10 := TStringField.Create(Self);\r\n xdsDynamicGrid10C12 := TStringField.Create(Self);\r\n xdsDynamicGrid10C13 := TStringField.Create(Self);\r\n xdsDynamicGrid10C14 := TStringField.Create(Self);\r\n xdsDynamicGrid10C15 := TStringField.Create(Self);\r\n xdsDynamicGrid10C16 := TStringField.Create(Self);\r\n xdsDynamicGrid10C17 := TStringField.Create(Self);\r\n xdsDynamicGrid10C18 := TStringField.Create(Self);\r\n xdsDynamicGrid10C19 := TStringField.Create(Self);\r\n xdsDynamicGrid10C20 := TStringField.Create(Self);\r\n xdsDynamicGrid10_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid10_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid10_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid10_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid10_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid10_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid10_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid10_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid10_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid10_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid10_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid10_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid10_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid10_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid10_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid10_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid10_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid10_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid10NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid110 := TDataSource.Create(Self);\r\n xdsDynamicGrid11 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid11C1 := TStringField.Create(Self);\r\n xdsDynamicGrid11C2 := TStringField.Create(Self);\r\n xdsDynamicGrid11C3 := TStringField.Create(Self);\r\n xdsDynamicGrid11C4 := TStringField.Create(Self);\r\n xdsDynamicGrid11C5 := TStringField.Create(Self);\r\n xdsDynamicGrid11C6 := TStringField.Create(Self);\r\n xdsDynamicGrid11C7 := TStringField.Create(Self);\r\n xdsDynamicGrid11C8 := TStringField.Create(Self);\r\n xdsDynamicGrid11C9 := TStringField.Create(Self);\r\n xdsDynamicGrid11C11 := TStringField.Create(Self);\r\n xdsDynamicGrid11C10 := TStringField.Create(Self);\r\n xdsDynamicGrid11C12 := TStringField.Create(Self);\r\n xdsDynamicGrid11C14 := TStringField.Create(Self);\r\n xdsDynamicGrid11C15 := TStringField.Create(Self);\r\n xdsDynamicGrid11C13 := TStringField.Create(Self);\r\n xdsDynamicGrid11C16 := TStringField.Create(Self);\r\n xdsDynamicGrid11C17 := TStringField.Create(Self);\r\n xdsDynamicGrid11C18 := TStringField.Create(Self);\r\n xdsDynamicGrid11C19 := TStringField.Create(Self);\r\n xdsDynamicGrid11C20 := TStringField.Create(Self);\r\n xdsDynamicGrid11_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid11_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid11_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid11_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid11_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid11_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid11_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid11_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid11_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid11_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid11_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid11_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid11_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid11_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid11_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid11_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid11_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid11_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid11NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid11 := TDataSource.Create(Self);\r\n xdsDynamicGrid12 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid12C1 := TStringField.Create(Self);\r\n xdsDynamicGrid12C2 := TStringField.Create(Self);\r\n xdsDynamicGrid12C3 := TStringField.Create(Self);\r\n xdsDynamicGrid12C4 := TStringField.Create(Self);\r\n xdsDynamicGrid12C5 := TStringField.Create(Self);\r\n xdsDynamicGrid12C6 := TStringField.Create(Self);\r\n xdsDynamicGrid12C7 := TStringField.Create(Self);\r\n xdsDynamicGrid12C8 := TStringField.Create(Self);\r\n xdsDynamicGrid12C9 := TStringField.Create(Self);\r\n xdsDynamicGrid12C11 := TStringField.Create(Self);\r\n xdsDynamicGrid12C10 := TStringField.Create(Self);\r\n xdsDynamicGrid12C12 := TStringField.Create(Self);\r\n xdsDynamicGrid12C14 := TStringField.Create(Self);\r\n xdsDynamicGrid12C15 := TStringField.Create(Self);\r\n xdsDynamicGrid12C13 := TStringField.Create(Self);\r\n xdsDynamicGrid12C16 := TStringField.Create(Self);\r\n xdsDynamicGrid12C17 := TStringField.Create(Self);\r\n xdsDynamicGrid12C18 := TStringField.Create(Self);\r\n xdsDynamicGrid12C19 := TStringField.Create(Self);\r\n xdsDynamicGrid12C20 := TStringField.Create(Self);\r\n xdsDynamicGrid12_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid12_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid12_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid12_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid12_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid12_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid12_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid12_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid12_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid12_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid12_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid12_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid12_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid12_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid12_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid12_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid12_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid12_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid12NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid12 := TDataSource.Create(Self);\r\n xdsDynamicGrid13 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid13C1 := TStringField.Create(Self);\r\n xdsDynamicGrid13C2 := TStringField.Create(Self);\r\n xdsDynamicGrid13C3 := TStringField.Create(Self);\r\n xdsDynamicGrid13C4 := TStringField.Create(Self);\r\n xdsDynamicGrid13C5 := TStringField.Create(Self);\r\n xdsDynamicGrid13C6 := TStringField.Create(Self);\r\n xdsDynamicGrid13C7 := TStringField.Create(Self);\r\n xdsDynamicGrid13C8 := TStringField.Create(Self);\r\n xdsDynamicGrid13C9 := TStringField.Create(Self);\r\n xdsDynamicGrid13C11 := TStringField.Create(Self);\r\n xdsDynamicGrid13C10 := TStringField.Create(Self);\r\n xdsDynamicGrid13C12 := TStringField.Create(Self);\r\n xdsDynamicGrid13C14 := TStringField.Create(Self);\r\n xdsDynamicGrid13C15 := TStringField.Create(Self);\r\n xdsDynamicGrid13C13 := TStringField.Create(Self);\r\n xdsDynamicGrid13C16 := TStringField.Create(Self);\r\n xdsDynamicGrid13C17 := TStringField.Create(Self);\r\n xdsDynamicGrid13C18 := TStringField.Create(Self);\r\n xdsDynamicGrid13C19 := TStringField.Create(Self);\r\n xdsDynamicGrid13C20 := TStringField.Create(Self);\r\n xdsDynamicGrid13_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid13_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid13_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid13_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid13_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid13_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid13_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid13_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid13_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid13_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid13_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid13_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid13_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid13_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid13_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid13_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid13_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid13_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid13NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid13 := TDataSource.Create(Self);\r\n xdsDynamicGrid14 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid14C1 := TStringField.Create(Self);\r\n xdsDynamicGrid14C2 := TStringField.Create(Self);\r\n xdsDynamicGrid14C3 := TStringField.Create(Self);\r\n xdsDynamicGrid14C4 := TStringField.Create(Self);\r\n xdsDynamicGrid14C5 := TStringField.Create(Self);\r\n xdsDynamicGrid14C6 := TStringField.Create(Self);\r\n xdsDynamicGrid14C7 := TStringField.Create(Self);\r\n xdsDynamicGrid14C8 := TStringField.Create(Self);\r\n xdsDynamicGrid14C9 := TStringField.Create(Self);\r\n xdsDynamicGrid14C11 := TStringField.Create(Self);\r\n xdsDynamicGrid14C10 := TStringField.Create(Self);\r\n xdsDynamicGrid14C12 := TStringField.Create(Self);\r\n xdsDynamicGrid14C14 := TStringField.Create(Self);\r\n xdsDynamicGrid14C15 := TStringField.Create(Self);\r\n xdsDynamicGrid14C13 := TStringField.Create(Self);\r\n xdsDynamicGrid14C16 := TStringField.Create(Self);\r\n xdsDynamicGrid14C17 := TStringField.Create(Self);\r\n xdsDynamicGrid14C18 := TStringField.Create(Self);\r\n xdsDynamicGrid14C19 := TStringField.Create(Self);\r\n xdsDynamicGrid14C20 := TStringField.Create(Self);\r\n xdsDynamicGrid14_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid14_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid14_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid14_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid14_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid14_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid14_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid14_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid14_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid14_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid14_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid14_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid14_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid14_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid14_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid14_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid14_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid14_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid14NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid14 := TDataSource.Create(Self);\r\n xdsDynamicGrid15 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid15C1 := TStringField.Create(Self);\r\n xdsDynamicGrid15C2 := TStringField.Create(Self);\r\n xdsDynamicGrid15C3 := TStringField.Create(Self);\r\n xdsDynamicGrid15C4 := TStringField.Create(Self);\r\n xdsDynamicGrid15C5 := TStringField.Create(Self);\r\n xdsDynamicGrid15C6 := TStringField.Create(Self);\r\n xdsDynamicGrid15C7 := TStringField.Create(Self);\r\n xdsDynamicGrid15C8 := TStringField.Create(Self);\r\n xdsDynamicGrid15C9 := TStringField.Create(Self);\r\n xdsDynamicGrid15C11 := TStringField.Create(Self);\r\n xdsDynamicGrid15C10 := TStringField.Create(Self);\r\n xdsDynamicGrid15C12 := TStringField.Create(Self);\r\n xdsDynamicGrid15C14 := TStringField.Create(Self);\r\n xdsDynamicGrid15C15 := TStringField.Create(Self);\r\n xdsDynamicGrid15C13 := TStringField.Create(Self);\r\n xdsDynamicGrid15C16 := TStringField.Create(Self);\r\n xdsDynamicGrid15C17 := TStringField.Create(Self);\r\n xdsDynamicGrid15C18 := TStringField.Create(Self);\r\n xdsDynamicGrid15C19 := TStringField.Create(Self);\r\n xdsDynamicGrid15C20 := TStringField.Create(Self);\r\n xdsDynamicGrid15_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid15_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid15_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid15_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid15_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid15_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid15_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid15_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid15_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid15_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid15_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid15_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid15_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid15_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid15_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid15_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid15_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid15_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid15NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid15 := TDataSource.Create(Self);\r\n xdsDynamicGrid16 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid16C1 := TStringField.Create(Self);\r\n xdsDynamicGrid16C2 := TStringField.Create(Self);\r\n xdsDynamicGrid16C3 := TStringField.Create(Self);\r\n xdsDynamicGrid16C4 := TStringField.Create(Self);\r\n xdsDynamicGrid16C5 := TStringField.Create(Self);\r\n xdsDynamicGrid16C6 := TStringField.Create(Self);\r\n xdsDynamicGrid16C7 := TStringField.Create(Self);\r\n xdsDynamicGrid16C8 := TStringField.Create(Self);\r\n xdsDynamicGrid16C9 := TStringField.Create(Self);\r\n xdsDynamicGrid16C11 := TStringField.Create(Self);\r\n xdsDynamicGrid16C10 := TStringField.Create(Self);\r\n xdsDynamicGrid16C12 := TStringField.Create(Self);\r\n xdsDynamicGrid16C14 := TStringField.Create(Self);\r\n xdsDynamicGrid16C15 := TStringField.Create(Self);\r\n xdsDynamicGrid16C13 := TStringField.Create(Self);\r\n xdsDynamicGrid16C16 := TStringField.Create(Self);\r\n xdsDynamicGrid16C17 := TStringField.Create(Self);\r\n xdsDynamicGrid16C18 := TStringField.Create(Self);\r\n xdsDynamicGrid16C19 := TStringField.Create(Self);\r\n xdsDynamicGrid16C20 := TStringField.Create(Self);\r\n xdsDynamicGrid16_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid16_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid16_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid16_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid16_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid16_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid16_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid16_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid16_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid16_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid16_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid16_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid16_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid16_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid16_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid16_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid16_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid16_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid16NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid16 := TDataSource.Create(Self);\r\n xdsDynamicGrid17 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid17C1 := TStringField.Create(Self);\r\n xdsDynamicGrid17C2 := TStringField.Create(Self);\r\n xdsDynamicGrid17C3 := TStringField.Create(Self);\r\n xdsDynamicGrid17C4 := TStringField.Create(Self);\r\n xdsDynamicGrid17C5 := TStringField.Create(Self);\r\n xdsDynamicGrid17C6 := TStringField.Create(Self);\r\n xdsDynamicGrid17C7 := TStringField.Create(Self);\r\n xdsDynamicGrid17C8 := TStringField.Create(Self);\r\n xdsDynamicGrid17C9 := TStringField.Create(Self);\r\n xdsDynamicGrid17C11 := TStringField.Create(Self);\r\n xdsDynamicGrid17C10 := TStringField.Create(Self);\r\n xdsDynamicGrid17C12 := TStringField.Create(Self);\r\n xdsDynamicGrid17C14 := TStringField.Create(Self);\r\n xdsDynamicGrid17C15 := TStringField.Create(Self);\r\n xdsDynamicGrid17C13 := TStringField.Create(Self);\r\n xdsDynamicGrid17C16 := TStringField.Create(Self);\r\n xdsDynamicGrid17C17 := TStringField.Create(Self);\r\n xdsDynamicGrid17C18 := TStringField.Create(Self);\r\n xdsDynamicGrid17C19 := TStringField.Create(Self);\r\n xdsDynamicGrid17C20 := TStringField.Create(Self);\r\n xdsDynamicGrid17_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid17_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid17_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid17_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid17_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid17_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid17_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid17_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid17_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid17_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid17_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid17_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid17_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid17_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid17_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid17_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid17_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid17_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid17NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid17 := TDataSource.Create(Self);\r\n xdsDynamicGrid18 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid18C1 := TStringField.Create(Self);\r\n xdsDynamicGrid18C2 := TStringField.Create(Self);\r\n xdsDynamicGrid18C3 := TStringField.Create(Self);\r\n xdsDynamicGrid18C4 := TStringField.Create(Self);\r\n xdsDynamicGrid18C5 := TStringField.Create(Self);\r\n xdsDynamicGrid18C6 := TStringField.Create(Self);\r\n xdsDynamicGrid18C7 := TStringField.Create(Self);\r\n xdsDynamicGrid18C8 := TStringField.Create(Self);\r\n xdsDynamicGrid18C9 := TStringField.Create(Self);\r\n xdsDynamicGrid18C11 := TStringField.Create(Self);\r\n xdsDynamicGrid18C10 := TStringField.Create(Self);\r\n xdsDynamicGrid18C12 := TStringField.Create(Self);\r\n xdsDynamicGrid18C14 := TStringField.Create(Self);\r\n xdsDynamicGrid18C15 := TStringField.Create(Self);\r\n xdsDynamicGrid18C13 := TStringField.Create(Self);\r\n xdsDynamicGrid18C16 := TStringField.Create(Self);\r\n xdsDynamicGrid18C17 := TStringField.Create(Self);\r\n xdsDynamicGrid18C18 := TStringField.Create(Self);\r\n xdsDynamicGrid18C19 := TStringField.Create(Self);\r\n xdsDynamicGrid18C20 := TStringField.Create(Self);\r\n xdsDynamicGrid18_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid18_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid18_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid18_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid18_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid18_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid18_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid18_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid18_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid18_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid18_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid18_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid18_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid18_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid18_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid18_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid18_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid18_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid18NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid18 := TDataSource.Create(Self);\r\n xdsDynamicGrid19 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid19C1 := TStringField.Create(Self);\r\n xdsDynamicGrid19C2 := TStringField.Create(Self);\r\n xdsDynamicGrid19C3 := TStringField.Create(Self);\r\n xdsDynamicGrid19C4 := TStringField.Create(Self);\r\n xdsDynamicGrid19C5 := TStringField.Create(Self);\r\n xdsDynamicGrid19C6 := TStringField.Create(Self);\r\n xdsDynamicGrid19C7 := TStringField.Create(Self);\r\n xdsDynamicGrid19C8 := TStringField.Create(Self);\r\n xdsDynamicGrid19C9 := TStringField.Create(Self);\r\n xdsDynamicGrid19C11 := TStringField.Create(Self);\r\n xdsDynamicGrid19C10 := TStringField.Create(Self);\r\n xdsDynamicGrid19C12 := TStringField.Create(Self);\r\n xdsDynamicGrid19C14 := TStringField.Create(Self);\r\n xdsDynamicGrid19C15 := TStringField.Create(Self);\r\n xdsDynamicGrid19C13 := TStringField.Create(Self);\r\n xdsDynamicGrid19C16 := TStringField.Create(Self);\r\n xdsDynamicGrid19C17 := TStringField.Create(Self);\r\n xdsDynamicGrid19C18 := TStringField.Create(Self);\r\n xdsDynamicGrid19C19 := TStringField.Create(Self);\r\n xdsDynamicGrid19C20 := TStringField.Create(Self);\r\n xdsDynamicGrid19_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid19_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid19_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid19_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid19_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid19_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid19_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid19_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid19_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid19_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid19_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid19_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid19_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid19_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid19_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid19_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid19_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid19_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid19NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid19 := TDataSource.Create(Self);\r\n xdsDynamicGrid20 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid20C1 := TStringField.Create(Self);\r\n xdsDynamicGrid20C2 := TStringField.Create(Self);\r\n xdsDynamicGrid20C3 := TStringField.Create(Self);\r\n xdsDynamicGrid20C4 := TStringField.Create(Self);\r\n xdsDynamicGrid20C5 := TStringField.Create(Self);\r\n xdsDynamicGrid20C6 := TStringField.Create(Self);\r\n xdsDynamicGrid20C7 := TStringField.Create(Self);\r\n xdsDynamicGrid20C8 := TStringField.Create(Self);\r\n xdsDynamicGrid20C9 := TStringField.Create(Self);\r\n xdsDynamicGrid20C11 := TStringField.Create(Self);\r\n xdsDynamicGrid20C10 := TStringField.Create(Self);\r\n xdsDynamicGrid20C12 := TStringField.Create(Self);\r\n xdsDynamicGrid20C14 := TStringField.Create(Self);\r\n xdsDynamicGrid20C15 := TStringField.Create(Self);\r\n xdsDynamicGrid20C13 := TStringField.Create(Self);\r\n xdsDynamicGrid20C16 := TStringField.Create(Self);\r\n xdsDynamicGrid20C17 := TStringField.Create(Self);\r\n xdsDynamicGrid20C18 := TStringField.Create(Self);\r\n xdsDynamicGrid20C19 := TStringField.Create(Self);\r\n xdsDynamicGrid20C20 := TStringField.Create(Self);\r\n xdsDynamicGrid20_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid20_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid20_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid20_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid20_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid20_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid20_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid20_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid20_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid20_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid20_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid20_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid20_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid20_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid20_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid20_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid20_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid20_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid20NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid20 := TDataSource.Create(Self);\r\n xdsDynamicGrid21 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid21C1 := TStringField.Create(Self);\r\n xdsDynamicGrid21C2 := TStringField.Create(Self);\r\n xdsDynamicGrid21C3 := TStringField.Create(Self);\r\n xdsDynamicGrid21C4 := TStringField.Create(Self);\r\n xdsDynamicGrid21C5 := TStringField.Create(Self);\r\n xdsDynamicGrid21C6 := TStringField.Create(Self);\r\n xdsDynamicGrid21C7 := TStringField.Create(Self);\r\n xdsDynamicGrid21C8 := TStringField.Create(Self);\r\n xdsDynamicGrid21C9 := TStringField.Create(Self);\r\n xdsDynamicGrid21C11 := TStringField.Create(Self);\r\n xdsDynamicGrid21C10 := TStringField.Create(Self);\r\n xdsDynamicGrid21C12 := TStringField.Create(Self);\r\n xdsDynamicGrid21C14 := TStringField.Create(Self);\r\n xdsDynamicGrid21C15 := TStringField.Create(Self);\r\n xdsDynamicGrid21C13 := TStringField.Create(Self);\r\n xdsDynamicGrid21C16 := TStringField.Create(Self);\r\n xdsDynamicGrid21C17 := TStringField.Create(Self);\r\n xdsDynamicGrid21C18 := TStringField.Create(Self);\r\n xdsDynamicGrid21C19 := TStringField.Create(Self);\r\n xdsDynamicGrid21C20 := TStringField.Create(Self);\r\n xdsDynamicGrid21_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid21_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid21_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid21_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid21_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid21_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid21_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid21_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid21_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid21_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid21_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid21_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid21_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid21_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid21_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid21_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid21_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid21_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid21NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid21 := TDataSource.Create(Self);\r\n xdsDynamicGrid22 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid22C1 := TStringField.Create(Self);\r\n xdsDynamicGrid22C2 := TStringField.Create(Self);\r\n xdsDynamicGrid22C3 := TStringField.Create(Self);\r\n xdsDynamicGrid22C4 := TStringField.Create(Self);\r\n xdsDynamicGrid22C5 := TStringField.Create(Self);\r\n xdsDynamicGrid22C6 := TStringField.Create(Self);\r\n xdsDynamicGrid22C7 := TStringField.Create(Self);\r\n xdsDynamicGrid22C8 := TStringField.Create(Self);\r\n xdsDynamicGrid22C9 := TStringField.Create(Self);\r\n xdsDynamicGrid22C11 := TStringField.Create(Self);\r\n xdsDynamicGrid22C10 := TStringField.Create(Self);\r\n xdsDynamicGrid22C12 := TStringField.Create(Self);\r\n xdsDynamicGrid22C14 := TStringField.Create(Self);\r\n xdsDynamicGrid22C15 := TStringField.Create(Self);\r\n xdsDynamicGrid22C13 := TStringField.Create(Self);\r\n xdsDynamicGrid22C16 := TStringField.Create(Self);\r\n xdsDynamicGrid22C17 := TStringField.Create(Self);\r\n xdsDynamicGrid22C18 := TStringField.Create(Self);\r\n xdsDynamicGrid22C19 := TStringField.Create(Self);\r\n xdsDynamicGrid22C20 := TStringField.Create(Self);\r\n xdsDynamicGrid22_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid22_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid22_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid22_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid22_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid22_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid22_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid22_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid22_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid22_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid22_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid22_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid22_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid22_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid22_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid22_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid22_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid22_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid22NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid22 := TDataSource.Create(Self);\r\n xdsDynamicGrid23 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid23C1 := TStringField.Create(Self);\r\n xdsDynamicGrid23C2 := TStringField.Create(Self);\r\n xdsDynamicGrid23C3 := TStringField.Create(Self);\r\n xdsDynamicGrid23C4 := TStringField.Create(Self);\r\n xdsDynamicGrid23C5 := TStringField.Create(Self);\r\n xdsDynamicGrid23C6 := TStringField.Create(Self);\r\n xdsDynamicGrid23C7 := TStringField.Create(Self);\r\n xdsDynamicGrid23C8 := TStringField.Create(Self);\r\n xdsDynamicGrid23C9 := TStringField.Create(Self);\r\n xdsDynamicGrid23C11 := TStringField.Create(Self);\r\n xdsDynamicGrid23C10 := TStringField.Create(Self);\r\n xdsDynamicGrid23C12 := TStringField.Create(Self);\r\n xdsDynamicGrid23C14 := TStringField.Create(Self);\r\n xdsDynamicGrid23C15 := TStringField.Create(Self);\r\n xdsDynamicGrid23C13 := TStringField.Create(Self);\r\n xdsDynamicGrid23C16 := TStringField.Create(Self);\r\n xdsDynamicGrid23C17 := TStringField.Create(Self);\r\n xdsDynamicGrid23C18 := TStringField.Create(Self);\r\n xdsDynamicGrid23C19 := TStringField.Create(Self);\r\n xdsDynamicGrid23C20 := TStringField.Create(Self);\r\n xdsDynamicGrid23_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid23_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid23_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid23_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid23_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid23_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid23_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid23_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid23_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid23_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid23_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid23_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid23_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid23_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid23_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid23_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid23_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid23_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid23NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid23 := TDataSource.Create(Self);\r\n xdsDynamicGrid24 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid24C1 := TStringField.Create(Self);\r\n xdsDynamicGrid24C2 := TStringField.Create(Self);\r\n xdsDynamicGrid24C3 := TStringField.Create(Self);\r\n xdsDynamicGrid24C4 := TStringField.Create(Self);\r\n xdsDynamicGrid24C5 := TStringField.Create(Self);\r\n xdsDynamicGrid24C6 := TStringField.Create(Self);\r\n xdsDynamicGrid24C7 := TStringField.Create(Self);\r\n xdsDynamicGrid24C8 := TStringField.Create(Self);\r\n xdsDynamicGrid24C9 := TStringField.Create(Self);\r\n xdsDynamicGrid24C11 := TStringField.Create(Self);\r\n xdsDynamicGrid24C10 := TStringField.Create(Self);\r\n xdsDynamicGrid24C12 := TStringField.Create(Self);\r\n xdsDynamicGrid24C14 := TStringField.Create(Self);\r\n xdsDynamicGrid24C15 := TStringField.Create(Self);\r\n xdsDynamicGrid24C13 := TStringField.Create(Self);\r\n xdsDynamicGrid24C16 := TStringField.Create(Self);\r\n xdsDynamicGrid24C17 := TStringField.Create(Self);\r\n xdsDynamicGrid24C18 := TStringField.Create(Self);\r\n xdsDynamicGrid24C19 := TStringField.Create(Self);\r\n xdsDynamicGrid24C20 := TStringField.Create(Self);\r\n xdsDynamicGrid24_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid24_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid24_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid24_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid24_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid24_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid24_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid24_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid24_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid24_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid24_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid24_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid24_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid24_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid24_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid24_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid24_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid24_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid24NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid1524 := TDataSource.Create(Self);\r\n xdsDynamicGrid25 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid25C1 := TStringField.Create(Self);\r\n xdsDynamicGrid25C2 := TStringField.Create(Self);\r\n xdsDynamicGrid25C3 := TStringField.Create(Self);\r\n xdsDynamicGrid25C4 := TStringField.Create(Self);\r\n xdsDynamicGrid25C5 := TStringField.Create(Self);\r\n xdsDynamicGrid25C6 := TStringField.Create(Self);\r\n xdsDynamicGrid25C7 := TStringField.Create(Self);\r\n xdsDynamicGrid25C8 := TStringField.Create(Self);\r\n xdsDynamicGrid25C9 := TStringField.Create(Self);\r\n xdsDynamicGrid25C11 := TStringField.Create(Self);\r\n xdsDynamicGrid25C10 := TStringField.Create(Self);\r\n xdsDynamicGrid25C12 := TStringField.Create(Self);\r\n xdsDynamicGrid25C14 := TStringField.Create(Self);\r\n xdsDynamicGrid25C15 := TStringField.Create(Self);\r\n xdsDynamicGrid25C13 := TStringField.Create(Self);\r\n xdsDynamicGrid25C16 := TStringField.Create(Self);\r\n xdsDynamicGrid25C17 := TStringField.Create(Self);\r\n xdsDynamicGrid25C18 := TStringField.Create(Self);\r\n xdsDynamicGrid25C19 := TStringField.Create(Self);\r\n xdsDynamicGrid25C20 := TStringField.Create(Self);\r\n xdsDynamicGrid25_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid25_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid25_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid25_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid25_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid25_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid25_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid25_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid25_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid25_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid25_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid25_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid25_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid25_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid25_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid25_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid25_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid25_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid25NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid25 := TDataSource.Create(Self);\r\n xdsDynamicGrid26 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid26C1 := TStringField.Create(Self);\r\n xdsDynamicGrid26C2 := TStringField.Create(Self);\r\n xdsDynamicGrid26C3 := TStringField.Create(Self);\r\n xdsDynamicGrid26C4 := TStringField.Create(Self);\r\n xdsDynamicGrid26C5 := TStringField.Create(Self);\r\n xdsDynamicGrid26C6 := TStringField.Create(Self);\r\n xdsDynamicGrid26C7 := TStringField.Create(Self);\r\n xdsDynamicGrid26C8 := TStringField.Create(Self);\r\n xdsDynamicGrid26C9 := TStringField.Create(Self);\r\n xdsDynamicGrid26C11 := TStringField.Create(Self);\r\n xdsDynamicGrid26C10 := TStringField.Create(Self);\r\n xdsDynamicGrid26C12 := TStringField.Create(Self);\r\n xdsDynamicGrid26C14 := TStringField.Create(Self);\r\n xdsDynamicGrid26C15 := TStringField.Create(Self);\r\n xdsDynamicGrid26C13 := TStringField.Create(Self);\r\n xdsDynamicGrid26C16 := TStringField.Create(Self);\r\n xdsDynamicGrid26C17 := TStringField.Create(Self);\r\n xdsDynamicGrid26C18 := TStringField.Create(Self);\r\n xdsDynamicGrid26C19 := TStringField.Create(Self);\r\n xdsDynamicGrid26C20 := TStringField.Create(Self);\r\n xdsDynamicGrid26_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid26_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid26_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid26_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid26_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid26_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid26_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid26_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid26_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid26_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid26_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid26_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid26_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid26_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid26_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid26_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid26_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid26_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid26NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid26 := TDataSource.Create(Self);\r\n xdsDynamicGrid27 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid27C1 := TStringField.Create(Self);\r\n xdsDynamicGrid27C2 := TStringField.Create(Self);\r\n xdsDynamicGrid27C3 := TStringField.Create(Self);\r\n xdsDynamicGrid27C4 := TStringField.Create(Self);\r\n xdsDynamicGrid27C5 := TStringField.Create(Self);\r\n xdsDynamicGrid27C6 := TStringField.Create(Self);\r\n xdsDynamicGrid27C7 := TStringField.Create(Self);\r\n xdsDynamicGrid27C8 := TStringField.Create(Self);\r\n xdsDynamicGrid27C9 := TStringField.Create(Self);\r\n xdsDynamicGrid27C11 := TStringField.Create(Self);\r\n xdsDynamicGrid27C10 := TStringField.Create(Self);\r\n xdsDynamicGrid27C12 := TStringField.Create(Self);\r\n xdsDynamicGrid27C14 := TStringField.Create(Self);\r\n xdsDynamicGrid27C15 := TStringField.Create(Self);\r\n xdsDynamicGrid27C13 := TStringField.Create(Self);\r\n xdsDynamicGrid27C16 := TStringField.Create(Self);\r\n xdsDynamicGrid27C17 := TStringField.Create(Self);\r\n xdsDynamicGrid27C18 := TStringField.Create(Self);\r\n xdsDynamicGrid27C19 := TStringField.Create(Self);\r\n xdsDynamicGrid27C20 := TStringField.Create(Self);\r\n xdsDynamicGrid27_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid27_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid27_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid27_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid27_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid27_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid27_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid27_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid27_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid27_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid27_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid27_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid27_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid27_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid27_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid27_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid27_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid27_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid27NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid27 := TDataSource.Create(Self);\r\n xdsDynamicGrid28 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid28C1 := TStringField.Create(Self);\r\n xdsDynamicGrid28C2 := TStringField.Create(Self);\r\n xdsDynamicGrid28C3 := TStringField.Create(Self);\r\n xdsDynamicGrid28C4 := TStringField.Create(Self);\r\n xdsDynamicGrid28C5 := TStringField.Create(Self);\r\n xdsDynamicGrid28C6 := TStringField.Create(Self);\r\n xdsDynamicGrid28C7 := TStringField.Create(Self);\r\n xdsDynamicGrid28C8 := TStringField.Create(Self);\r\n xdsDynamicGrid28C9 := TStringField.Create(Self);\r\n xdsDynamicGrid28C11 := TStringField.Create(Self);\r\n xdsDynamicGrid28C10 := TStringField.Create(Self);\r\n xdsDynamicGrid28C12 := TStringField.Create(Self);\r\n xdsDynamicGrid28C14 := TStringField.Create(Self);\r\n xdsDynamicGrid28C15 := TStringField.Create(Self);\r\n xdsDynamicGrid28C13 := TStringField.Create(Self);\r\n xdsDynamicGrid28C16 := TStringField.Create(Self);\r\n xdsDynamicGrid28C17 := TStringField.Create(Self);\r\n xdsDynamicGrid28C18 := TStringField.Create(Self);\r\n xdsDynamicGrid28C19 := TStringField.Create(Self);\r\n xdsDynamicGrid28C20 := TStringField.Create(Self);\r\n xdsDynamicGrid28_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid28_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid28_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid28_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid28_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid28_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid28_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid28_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid28_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid28_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid28_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid28_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid28_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid28_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid28_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid28_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid28_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid28_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid28NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid28 := TDataSource.Create(Self);\r\n xdsDynamicGrid29 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid29C1 := TStringField.Create(Self);\r\n xdsDynamicGrid29C2 := TStringField.Create(Self);\r\n xdsDynamicGrid29C3 := TStringField.Create(Self);\r\n xdsDynamicGrid29C4 := TStringField.Create(Self);\r\n xdsDynamicGrid29C5 := TStringField.Create(Self);\r\n xdsDynamicGrid29C6 := TStringField.Create(Self);\r\n xdsDynamicGrid29C7 := TStringField.Create(Self);\r\n xdsDynamicGrid29C8 := TStringField.Create(Self);\r\n xdsDynamicGrid29C9 := TStringField.Create(Self);\r\n xdsDynamicGrid29C11 := TStringField.Create(Self);\r\n xdsDynamicGrid29C10 := TStringField.Create(Self);\r\n xdsDynamicGrid29C12 := TStringField.Create(Self);\r\n xdsDynamicGrid29C14 := TStringField.Create(Self);\r\n xdsDynamicGrid29C15 := TStringField.Create(Self);\r\n xdsDynamicGrid29C13 := TStringField.Create(Self);\r\n xdsDynamicGrid29C16 := TStringField.Create(Self);\r\n xdsDynamicGrid29C17 := TStringField.Create(Self);\r\n xdsDynamicGrid29C18 := TStringField.Create(Self);\r\n xdsDynamicGrid29C19 := TStringField.Create(Self);\r\n xdsDynamicGrid29C20 := TStringField.Create(Self);\r\n xdsDynamicGrid29_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid29_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid29_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid29_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid29_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid29_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid29_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid29_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid29_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid29_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid29_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid29_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid29_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid29_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid29_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid29_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid29_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid29_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid29NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid29 := TDataSource.Create(Self);\r\n xdsDynamicGrid30 := TXDataWebDataSet.Create(Self);\r\n xdsDynamicGrid30C1 := TStringField.Create(Self);\r\n xdsDynamicGrid30C2 := TStringField.Create(Self);\r\n xdsDynamicGrid30C3 := TStringField.Create(Self);\r\n xdsDynamicGrid30C4 := TStringField.Create(Self);\r\n xdsDynamicGrid30C5 := TStringField.Create(Self);\r\n xdsDynamicGrid30C6 := TStringField.Create(Self);\r\n xdsDynamicGrid30C7 := TStringField.Create(Self);\r\n xdsDynamicGrid30C8 := TStringField.Create(Self);\r\n xdsDynamicGrid30C9 := TStringField.Create(Self);\r\n xdsDynamicGrid30C11 := TStringField.Create(Self);\r\n xdsDynamicGrid30C10 := TStringField.Create(Self);\r\n xdsDynamicGrid30C12 := TStringField.Create(Self);\r\n xdsDynamicGrid30C14 := TStringField.Create(Self);\r\n xdsDynamicGrid30C15 := TStringField.Create(Self);\r\n xdsDynamicGrid30C13 := TStringField.Create(Self);\r\n xdsDynamicGrid30C16 := TStringField.Create(Self);\r\n xdsDynamicGrid30C17 := TStringField.Create(Self);\r\n xdsDynamicGrid30C18 := TStringField.Create(Self);\r\n xdsDynamicGrid30C19 := TStringField.Create(Self);\r\n xdsDynamicGrid30C20 := TStringField.Create(Self);\r\n xdsDynamicGrid30_CURRENT_NURSE2 := TStringField.Create(Self);\r\n xdsDynamicGrid30_CURRENT_NURSE1 := TStringField.Create(Self);\r\n xdsDynamicGrid30_CURRENT_PROVIDER := TStringField.Create(Self);\r\n xdsDynamicGrid30_CURRENT_PROCEDURENUMBER := TStringField.Create(Self);\r\n xdsDynamicGrid30_CURRENT_MRN := TStringField.Create(Self);\r\n xdsDynamicGrid30_CURRENT_APPTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid30_CURRENT_MEDID := TStringField.Create(Self);\r\n xdsDynamicGrid30_CURRENT_PROBLEMID := TStringField.Create(Self);\r\n xdsDynamicGrid30_CURRENT_ALLERGYID := TStringField.Create(Self);\r\n xdsDynamicGrid30_CURRENT_REFPHYCODE := TStringField.Create(Self);\r\n xdsDynamicGrid30_CURRENT_PATIENTNAME := TStringField.Create(Self);\r\n xdsDynamicGrid30_CURRENT_PATIENTDOB := TStringField.Create(Self);\r\n xdsDynamicGrid30_CURRENT_PROCIMAGECOUNT := TStringField.Create(Self);\r\n xdsDynamicGrid30_CURRENT_APPTDATE := TStringField.Create(Self);\r\n xdsDynamicGrid30_PATIENTFHIRID := TStringField.Create(Self);\r\n xdsDynamicGrid30_PATIENTCERNERID := TStringField.Create(Self);\r\n xdsDynamicGrid30_SETUPFACILITYID := TStringField.Create(Self);\r\n xdsDynamicGrid30_USERID := TStringField.Create(Self);\r\n xdsDynamicGrid30NEW_RECORD := TIntegerField.Create(Self);\r\n dsDynamicGrid30 := TDataSource.Create(Self);\r\n WebHttpRequest1 := THttpRequest.Create(Self);\r\n EGV_SESSIONSTORAGE := TSessionStorage.Create(Self);\r\n xdsImages := TXDataWebDataSet.Create(Self);\r\n xdsImagesIMAGE := TBlobField.Create(Self);\r\n xdsImagesIMAGEBASE64 := TMemoField.Create(Self);\r\n xdsImagesIMAGEBASE64_DATA := TMemoField.Create(Self);\r\n xdsImagesIMAGENUMBER := TIntegerField.Create(Self);\r\n xdsImagesSELECTED := TStringField.Create(Self);\r\n xdsImagesLABEL := TStringField.Create(Self);\r\n xdsImagesSEQUENCE := TIntegerField.Create(Self);\r\n xdsImagesCOMMENTS := TStringField.Create(Self);\r\n xdsImagesFILENAME := TStringField.Create(Self);\r\n xdsImagesBORDER_COLOR := TStringField.Create(Self);\r\n xdsImagesGILABELTEXT := TStringField.Create(Self);\r\n xdsImagesGILABELTEXTCOLOR := TIntegerField.Create(Self);\r\n xdsImagesGILABELBKCOLOR := TIntegerField.Create(Self);\r\n xdsImagesGILABELTEXTCOLOR_HEX := TStringField.Create(Self);\r\n xdsImagesGILABELBKCOLOR_HEX := TStringField.Create(Self);\r\n dsImages := TDataSource.Create(Self);\r\n XDataWebConnection2 := TXDataWebConnection.Create(Self);\r\n XDataWebClient2 := TXDataWebClient.Create(Self);\r\n xdsImageDiagram := TXDataWebDataSet.Create(Self);\r\n xdsImageDiagramIMAGE := TBlobField.Create(Self);\r\n xdsImageDiagramIMAGEBASE64 := TMemoField.Create(Self);\r\n xdsImageDiagramIMAGEBASE64_DATA := TMemoField.Create(Self);\r\n dsImageDiagram := TDataSource.Create(Self);\r\n\r\n XDataWebConnection1.BeforeLoadDFMValues;\r\n EGV_LOCALSTORAGE.BeforeLoadDFMValues;\r\n XDataWebClient1.BeforeLoadDFMValues;\r\n dsQPKL_DynamicData.BeforeLoadDFMValues;\r\n xdsQPKL_DynamicData.BeforeLoadDFMValues;\r\n xdsQPKL_DynamicDataOriginalITEM.BeforeLoadDFMValues;\r\n dsPickList.BeforeLoadDFMValues;\r\n xdsMainMenu.BeforeLoadDFMValues;\r\n xdsMainMenuOriginalIDENT_VALUE.BeforeLoadDFMValues;\r\n xdsMainMenuOriginalVISIBLE.BeforeLoadDFMValues;\r\n xdsPicklist.BeforeLoadDFMValues;\r\n xdsPicklistUSERID.BeforeLoadDFMValues;\r\n xdsPicklistSECTION_NAME.BeforeLoadDFMValues;\r\n xdsPicklistIDENT_NAME.BeforeLoadDFMValues;\r\n xdsPicklistIDENT_VALUE.BeforeLoadDFMValues;\r\n xdsPicklistFACILITYID.BeforeLoadDFMValues;\r\n xdsPicklistSPECIALITY.BeforeLoadDFMValues;\r\n xdsPicklistVISIBLE.BeforeLoadDFMValues;\r\n xdsPicklistcVISIBLE.BeforeLoadDFMValues;\r\n xdsPicklistNOTES.BeforeLoadDFMValues;\r\n xdsDynamicGrid1.BeforeLoadDFMValues;\r\n xdsDynamicGrid1C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid1C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid1C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid1C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid1C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid1C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid1C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid1C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid1C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid1C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid1C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid1C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid1C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid1C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid1C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid1C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid1C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid1C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid1C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid1C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_APPTTYPE.BeforeLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid1_CURRENTPROC_IMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid1_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid1_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid1EGV_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid1_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid1NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid1.BeforeLoadDFMValues;\r\n xdsDynamicGrid2.BeforeLoadDFMValues;\r\n xdsDynamicGrid2C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid2C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid2C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid2C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid2C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid2C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid2C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid2C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid2C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid2C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid2C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid2C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid2C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid2C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid2C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid2C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid2C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid2C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid2C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid2C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_APPTTYPE.BeforeLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid2_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid2_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid2_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid2_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid2NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid2.BeforeLoadDFMValues;\r\n xdsDynamicGrid3.BeforeLoadDFMValues;\r\n xdsDynamicGrid3C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid3C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid3C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid3C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid3C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid3C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid3C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid3C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid3C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid3C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid3C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid3C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid3C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid3C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid3C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid3C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid3C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid3C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid3C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid3C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_APPTTYPE.BeforeLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid3_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid3_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid3_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid3_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid3NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid3.BeforeLoadDFMValues;\r\n xdsDynamicGrid4.BeforeLoadDFMValues;\r\n xdsDynamicGrid4C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid4C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid4C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid4C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid4C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid4C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid4C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid4C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid4C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid4C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid4C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid4C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid4C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid4C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid4C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid4C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid4C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid4C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid4C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid4C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_APPTTYPE.BeforeLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid4_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid4_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid4_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid4_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid4NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid4.BeforeLoadDFMValues;\r\n xdsDynamicGrid5.BeforeLoadDFMValues;\r\n xdsDynamicGrid5C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid5C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid5C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid5C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid5C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid5C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid5C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid5C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid5C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid5C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid5C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid5C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid5C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid5C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid5C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid5C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid5C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid5C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid5C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid5C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_APPTTYPE.BeforeLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid5_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid5_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid5_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid5NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid5.BeforeLoadDFMValues;\r\n xdsDynamicGrid6.BeforeLoadDFMValues;\r\n xdsDynamicGrid6C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid6C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid6C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid6C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid6C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid6C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid6C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid6C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid6C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid6C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid6C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid6C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid6C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid6C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid6C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid6C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid6C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid6C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid6C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid6C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid6_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid6_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid6_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid6_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid6NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid6.BeforeLoadDFMValues;\r\n xdsDynamicGrid7.BeforeLoadDFMValues;\r\n xdsDynamicGrid7C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid7C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid7C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid7C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid7C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid7C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid7C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid7C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid7C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid7C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid7C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid7C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid7C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid7C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid7C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid7C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid7C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid7C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid7C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid7C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid7_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid7_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid7_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid7_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid7NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid7.BeforeLoadDFMValues;\r\n xdsDynamicGrid8.BeforeLoadDFMValues;\r\n xdsDynamicGrid8C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid8C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid8C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid8C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid8C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid8C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid8C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid8C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid8C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid8C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid8C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid8C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid8C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid8C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid8C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid8C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid8C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid8C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid8C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid8C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid8_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid8_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid8_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid8_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid8NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid8.BeforeLoadDFMValues;\r\n xdsDynamicGrid9.BeforeLoadDFMValues;\r\n xdsDynamicGrid9C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid9C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid9C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid9C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid9C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid9C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid9C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid9C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid9C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid9C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid9C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid9C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid9C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid9C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid9C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid9C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid9C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid9C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid9C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid9C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid9_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid9_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid9_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid9_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid9NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid9.BeforeLoadDFMValues;\r\n xdsDynamicGrid10.BeforeLoadDFMValues;\r\n xdsDynamicGrid10C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid10C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid10C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid10C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid10C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid10C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid10C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid10C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid10C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid10C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid10C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid10C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid10C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid10C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid10C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid10C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid10C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid10C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid10C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid10C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid10_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid10_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid10_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid10_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid10NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid110.BeforeLoadDFMValues;\r\n xdsDynamicGrid11.BeforeLoadDFMValues;\r\n xdsDynamicGrid11C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid11C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid11C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid11C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid11C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid11C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid11C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid11C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid11C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid11C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid11C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid11C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid11C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid11C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid11C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid11C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid11C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid11C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid11C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid11C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid11_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid11_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid11_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid11_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid11NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid11.BeforeLoadDFMValues;\r\n xdsDynamicGrid12.BeforeLoadDFMValues;\r\n xdsDynamicGrid12C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid12C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid12C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid12C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid12C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid12C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid12C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid12C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid12C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid12C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid12C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid12C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid12C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid12C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid12C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid12C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid12C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid12C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid12C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid12C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid12_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid12_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid12_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid12_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid12NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid12.BeforeLoadDFMValues;\r\n xdsDynamicGrid13.BeforeLoadDFMValues;\r\n xdsDynamicGrid13C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid13C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid13C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid13C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid13C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid13C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid13C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid13C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid13C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid13C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid13C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid13C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid13C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid13C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid13C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid13C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid13C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid13C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid13C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid13C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid13_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid13_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid13_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid13_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid13NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid13.BeforeLoadDFMValues;\r\n xdsDynamicGrid14.BeforeLoadDFMValues;\r\n xdsDynamicGrid14C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid14C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid14C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid14C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid14C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid14C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid14C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid14C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid14C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid14C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid14C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid14C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid14C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid14C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid14C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid14C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid14C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid14C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid14C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid14C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid14_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid14_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid14_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid14_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid14NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid14.BeforeLoadDFMValues;\r\n xdsDynamicGrid15.BeforeLoadDFMValues;\r\n xdsDynamicGrid15C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid15C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid15C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid15C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid15C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid15C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid15C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid15C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid15C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid15C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid15C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid15C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid15C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid15C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid15C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid15C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid15C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid15C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid15C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid15C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid15_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid15_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid15_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid15_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid15NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid15.BeforeLoadDFMValues;\r\n xdsDynamicGrid16.BeforeLoadDFMValues;\r\n xdsDynamicGrid16C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid16C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid16C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid16C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid16C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid16C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid16C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid16C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid16C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid16C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid16C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid16C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid16C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid16C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid16C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid16C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid16C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid16C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid16C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid16C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid16_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid16_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid16_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid16_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid16NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid16.BeforeLoadDFMValues;\r\n xdsDynamicGrid17.BeforeLoadDFMValues;\r\n xdsDynamicGrid17C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid17C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid17C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid17C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid17C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid17C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid17C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid17C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid17C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid17C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid17C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid17C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid17C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid17C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid17C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid17C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid17C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid17C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid17C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid17C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid17_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid17_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid17_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid17_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid17NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid17.BeforeLoadDFMValues;\r\n xdsDynamicGrid18.BeforeLoadDFMValues;\r\n xdsDynamicGrid18C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid18C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid18C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid18C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid18C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid18C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid18C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid18C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid18C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid18C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid18C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid18C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid18C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid18C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid18C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid18C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid18C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid18C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid18C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid18C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid18_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid18_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid18_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid18_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid18NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid18.BeforeLoadDFMValues;\r\n xdsDynamicGrid19.BeforeLoadDFMValues;\r\n xdsDynamicGrid19C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid19C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid19C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid19C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid19C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid19C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid19C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid19C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid19C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid19C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid19C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid19C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid19C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid19C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid19C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid19C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid19C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid19C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid19C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid19C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid19_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid19_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid19_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid19_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid19NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid19.BeforeLoadDFMValues;\r\n xdsDynamicGrid20.BeforeLoadDFMValues;\r\n xdsDynamicGrid20C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid20C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid20C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid20C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid20C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid20C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid20C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid20C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid20C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid20C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid20C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid20C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid20C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid20C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid20C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid20C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid20C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid20C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid20C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid20C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid20_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid20_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid20_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid20_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid20NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid20.BeforeLoadDFMValues;\r\n xdsDynamicGrid21.BeforeLoadDFMValues;\r\n xdsDynamicGrid21C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid21C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid21C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid21C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid21C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid21C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid21C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid21C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid21C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid21C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid21C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid21C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid21C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid21C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid21C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid21C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid21C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid21C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid21C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid21C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid21_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid21_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid21_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid21_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid21NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid21.BeforeLoadDFMValues;\r\n xdsDynamicGrid22.BeforeLoadDFMValues;\r\n xdsDynamicGrid22C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid22C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid22C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid22C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid22C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid22C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid22C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid22C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid22C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid22C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid22C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid22C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid22C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid22C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid22C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid22C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid22C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid22C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid22C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid22C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid22_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid22_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid22_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid22_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid22NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid22.BeforeLoadDFMValues;\r\n xdsDynamicGrid23.BeforeLoadDFMValues;\r\n xdsDynamicGrid23C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid23C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid23C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid23C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid23C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid23C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid23C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid23C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid23C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid23C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid23C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid23C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid23C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid23C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid23C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid23C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid23C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid23C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid23C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid23C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid23_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid23_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid23_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid23_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid23NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid23.BeforeLoadDFMValues;\r\n xdsDynamicGrid24.BeforeLoadDFMValues;\r\n xdsDynamicGrid24C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid24C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid24C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid24C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid24C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid24C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid24C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid24C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid24C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid24C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid24C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid24C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid24C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid24C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid24C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid24C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid24C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid24C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid24C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid24C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid24_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid24_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid24_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid24_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid24NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid1524.BeforeLoadDFMValues;\r\n xdsDynamicGrid25.BeforeLoadDFMValues;\r\n xdsDynamicGrid25C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid25C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid25C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid25C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid25C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid25C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid25C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid25C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid25C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid25C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid25C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid25C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid25C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid25C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid25C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid25C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid25C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid25C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid25C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid25C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid25_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid25_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid25_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid25_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid25NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid25.BeforeLoadDFMValues;\r\n xdsDynamicGrid26.BeforeLoadDFMValues;\r\n xdsDynamicGrid26C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid26C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid26C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid26C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid26C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid26C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid26C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid26C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid26C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid26C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid26C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid26C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid26C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid26C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid26C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid26C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid26C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid26C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid26C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid26C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid26_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid26_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid26_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid26_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid26NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid26.BeforeLoadDFMValues;\r\n xdsDynamicGrid27.BeforeLoadDFMValues;\r\n xdsDynamicGrid27C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid27C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid27C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid27C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid27C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid27C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid27C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid27C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid27C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid27C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid27C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid27C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid27C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid27C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid27C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid27C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid27C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid27C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid27C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid27C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid27_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid27_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid27_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid27_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid27NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid27.BeforeLoadDFMValues;\r\n xdsDynamicGrid28.BeforeLoadDFMValues;\r\n xdsDynamicGrid28C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid28C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid28C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid28C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid28C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid28C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid28C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid28C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid28C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid28C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid28C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid28C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid28C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid28C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid28C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid28C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid28C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid28C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid28C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid28C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid28_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid28_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid28_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid28_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid28NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid28.BeforeLoadDFMValues;\r\n xdsDynamicGrid29.BeforeLoadDFMValues;\r\n xdsDynamicGrid29C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid29C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid29C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid29C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid29C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid29C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid29C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid29C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid29C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid29C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid29C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid29C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid29C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid29C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid29C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid29C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid29C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid29C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid29C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid29C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid29_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid29_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid29_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid29_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid29NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid29.BeforeLoadDFMValues;\r\n xdsDynamicGrid30.BeforeLoadDFMValues;\r\n xdsDynamicGrid30C1.BeforeLoadDFMValues;\r\n xdsDynamicGrid30C2.BeforeLoadDFMValues;\r\n xdsDynamicGrid30C3.BeforeLoadDFMValues;\r\n xdsDynamicGrid30C4.BeforeLoadDFMValues;\r\n xdsDynamicGrid30C5.BeforeLoadDFMValues;\r\n xdsDynamicGrid30C6.BeforeLoadDFMValues;\r\n xdsDynamicGrid30C7.BeforeLoadDFMValues;\r\n xdsDynamicGrid30C8.BeforeLoadDFMValues;\r\n xdsDynamicGrid30C9.BeforeLoadDFMValues;\r\n xdsDynamicGrid30C11.BeforeLoadDFMValues;\r\n xdsDynamicGrid30C10.BeforeLoadDFMValues;\r\n xdsDynamicGrid30C12.BeforeLoadDFMValues;\r\n xdsDynamicGrid30C14.BeforeLoadDFMValues;\r\n xdsDynamicGrid30C15.BeforeLoadDFMValues;\r\n xdsDynamicGrid30C13.BeforeLoadDFMValues;\r\n xdsDynamicGrid30C16.BeforeLoadDFMValues;\r\n xdsDynamicGrid30C17.BeforeLoadDFMValues;\r\n xdsDynamicGrid30C18.BeforeLoadDFMValues;\r\n xdsDynamicGrid30C19.BeforeLoadDFMValues;\r\n xdsDynamicGrid30C20.BeforeLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_NURSE2.BeforeLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_NURSE1.BeforeLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_PROVIDER.BeforeLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_PROCEDURENUMBER.BeforeLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_MRN.BeforeLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_APPTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_MEDID.BeforeLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_PROBLEMID.BeforeLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_ALLERGYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_REFPHYCODE.BeforeLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_PATIENTNAME.BeforeLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_PATIENTDOB.BeforeLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_PROCIMAGECOUNT.BeforeLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_APPTDATE.BeforeLoadDFMValues;\r\n xdsDynamicGrid30_PATIENTFHIRID.BeforeLoadDFMValues;\r\n xdsDynamicGrid30_PATIENTCERNERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid30_SETUPFACILITYID.BeforeLoadDFMValues;\r\n xdsDynamicGrid30_USERID.BeforeLoadDFMValues;\r\n xdsDynamicGrid30NEW_RECORD.BeforeLoadDFMValues;\r\n dsDynamicGrid30.BeforeLoadDFMValues;\r\n WebHttpRequest1.BeforeLoadDFMValues;\r\n EGV_SESSIONSTORAGE.BeforeLoadDFMValues;\r\n xdsImages.BeforeLoadDFMValues;\r\n xdsImagesIMAGE.BeforeLoadDFMValues;\r\n xdsImagesIMAGEBASE64.BeforeLoadDFMValues;\r\n xdsImagesIMAGEBASE64_DATA.BeforeLoadDFMValues;\r\n xdsImagesIMAGENUMBER.BeforeLoadDFMValues;\r\n xdsImagesSELECTED.BeforeLoadDFMValues;\r\n xdsImagesLABEL.BeforeLoadDFMValues;\r\n xdsImagesSEQUENCE.BeforeLoadDFMValues;\r\n xdsImagesCOMMENTS.BeforeLoadDFMValues;\r\n xdsImagesFILENAME.BeforeLoadDFMValues;\r\n xdsImagesBORDER_COLOR.BeforeLoadDFMValues;\r\n xdsImagesGILABELTEXT.BeforeLoadDFMValues;\r\n xdsImagesGILABELTEXTCOLOR.BeforeLoadDFMValues;\r\n xdsImagesGILABELBKCOLOR.BeforeLoadDFMValues;\r\n xdsImagesGILABELTEXTCOLOR_HEX.BeforeLoadDFMValues;\r\n xdsImagesGILABELBKCOLOR_HEX.BeforeLoadDFMValues;\r\n dsImages.BeforeLoadDFMValues;\r\n XDataWebConnection2.BeforeLoadDFMValues;\r\n XDataWebClient2.BeforeLoadDFMValues;\r\n xdsImageDiagram.BeforeLoadDFMValues;\r\n xdsImageDiagramIMAGE.BeforeLoadDFMValues;\r\n xdsImageDiagramIMAGEBASE64.BeforeLoadDFMValues;\r\n xdsImageDiagramIMAGEBASE64_DATA.BeforeLoadDFMValues;\r\n dsImageDiagram.BeforeLoadDFMValues;\r\n try\r\n Name := 'DM';\r\n SetEvent(Self, 'OnCreate', 'WebDataModuleCreate');\r\n Height := 641;\r\n Width := 950;\r\n XDataWebConnection1.SetParentComponent(Self);\r\n XDataWebConnection1.Name := 'XDataWebConnection1';\r\n XDataWebConnection1.URL := 'https://test.ArgusMedGPT.com/ArgusMedGPT';\r\n SetEvent(XDataWebConnection1, Self, 'OnConnect', 'XDataWebConnection1Connect');\r\n SetEvent(XDataWebConnection1, Self, 'OnError', 'XDataWebConnection1Error');\r\n XDataWebConnection1.Left := 48;\r\n XDataWebConnection1.Top := 8;\r\n EGV_LOCALSTORAGE.SetParentComponent(Self);\r\n EGV_LOCALSTORAGE.Name := 'EGV_LOCALSTORAGE';\r\n EGV_LOCALSTORAGE.Left := 167;\r\n EGV_LOCALSTORAGE.Top := 8;\r\n XDataWebClient1.SetParentComponent(Self);\r\n XDataWebClient1.Name := 'XDataWebClient1';\r\n XDataWebClient1.Connection := XDataWebConnection1;\r\n XDataWebClient1.Left := 48;\r\n XDataWebClient1.Top := 56;\r\n dsQPKL_DynamicData.SetParentComponent(Self);\r\n dsQPKL_DynamicData.Name := 'dsQPKL_DynamicData';\r\n dsQPKL_DynamicData.Left := 287;\r\n dsQPKL_DynamicData.Top := 48;\r\n xdsQPKL_DynamicData.SetParentComponent(Self);\r\n xdsQPKL_DynamicData.Name := 'xdsQPKL_DynamicData';\r\n xdsQPKL_DynamicData.AfterOpen := xdsQPKL_DynamicDataAfterOpen;\r\n xdsQPKL_DynamicData.Left := 287;\r\n xdsQPKL_DynamicData.Top := 8;\r\n xdsQPKL_DynamicDataOriginalITEM.SetParentComponent(xdsQPKL_DynamicData);\r\n xdsQPKL_DynamicDataOriginalITEM.Name := 'xdsQPKL_DynamicDataOriginalITEM';\r\n xdsQPKL_DynamicDataOriginalITEM.FieldName := 'Original.ITEM';\r\n xdsQPKL_DynamicDataOriginalITEM.Size := 1024;\r\n dsPickList.SetParentComponent(Self);\r\n dsPickList.Name := 'dsPickList';\r\n dsPickList.DataSet := xdsPicklist;\r\n dsPickList.Left := 48;\r\n dsPickList.Top := 312;\r\n xdsMainMenu.SetParentComponent(Self);\r\n xdsMainMenu.Name := 'xdsMainMenu';\r\n xdsMainMenu.AfterOpen := xdsMainMenuAfterOpen;\r\n xdsMainMenu.EntitySetName := 'INI_IDENT';\r\n xdsMainMenu.Left := 48;\r\n xdsMainMenu.Top := 352;\r\n xdsMainMenuOriginalIDENT_VALUE.SetParentComponent(xdsMainMenu);\r\n xdsMainMenuOriginalIDENT_VALUE.Name := 'xdsMainMenuOriginalIDENT_VALUE';\r\n xdsMainMenuOriginalIDENT_VALUE.Tag := -1;\r\n xdsMainMenuOriginalIDENT_VALUE.FieldName := 'Original.IDENT_VALUE';\r\n xdsMainMenuOriginalIDENT_VALUE.Size := 1024;\r\n xdsMainMenuOriginalVISIBLE.SetParentComponent(xdsMainMenu);\r\n xdsMainMenuOriginalVISIBLE.Name := 'xdsMainMenuOriginalVISIBLE';\r\n xdsMainMenuOriginalVISIBLE.Tag := -1;\r\n xdsMainMenuOriginalVISIBLE.FieldName := 'Original.VISIBLE';\r\n xdsPicklist.SetParentComponent(Self);\r\n xdsPicklist.Name := 'xdsPicklist';\r\n xdsPicklist.BeforeOpen := xdsPicklistBeforeOpen;\r\n xdsPicklist.AfterOpen := xdsPicklistAfterOpen;\r\n xdsPicklist.AfterClose := xdsPicklistAfterClose;\r\n xdsPicklist.BeforeInsert := xdsPicklistBeforeInsert;\r\n xdsPicklist.BeforeEdit := xdsPicklistBeforeEdit;\r\n xdsPicklist.BeforePost := xdsPicklistBeforePost;\r\n xdsPicklist.BeforeDelete := xdsPicklistBeforeDelete;\r\n SetEvent(xdsPicklist, Self, 'OnCalcFields', 'xdsPicklistCalcFields');\r\n SetEvent(xdsPicklist, Self, 'OnNewRecord', 'xdsPicklistNewRecord');\r\n xdsPicklist.EntitySetName := 'INI_IDENT';\r\n xdsPicklist.Left := 48;\r\n xdsPicklist.Top := 272;\r\n xdsPicklistUSERID.SetParentComponent(xdsPicklist);\r\n xdsPicklistUSERID.Name := 'xdsPicklistUSERID';\r\n xdsPicklistUSERID.Tag := 1;\r\n xdsPicklistUSERID.FieldName := 'USERID';\r\n xdsPicklistUSERID.Required := True;\r\n xdsPicklistUSERID.Size := 30;\r\n xdsPicklistSECTION_NAME.SetParentComponent(xdsPicklist);\r\n xdsPicklistSECTION_NAME.Name := 'xdsPicklistSECTION_NAME';\r\n xdsPicklistSECTION_NAME.Tag := 1;\r\n xdsPicklistSECTION_NAME.FieldName := 'SECTION_NAME';\r\n xdsPicklistSECTION_NAME.Required := True;\r\n xdsPicklistSECTION_NAME.Size := 50;\r\n xdsPicklistIDENT_NAME.SetParentComponent(xdsPicklist);\r\n xdsPicklistIDENT_NAME.Name := 'xdsPicklistIDENT_NAME';\r\n xdsPicklistIDENT_NAME.Tag := 1;\r\n xdsPicklistIDENT_NAME.FieldName := 'IDENT_NAME';\r\n xdsPicklistIDENT_NAME.Required := True;\r\n xdsPicklistIDENT_NAME.Size := 50;\r\n xdsPicklistIDENT_VALUE.SetParentComponent(xdsPicklist);\r\n xdsPicklistIDENT_VALUE.Name := 'xdsPicklistIDENT_VALUE';\r\n xdsPicklistIDENT_VALUE.FieldName := 'IDENT_VALUE';\r\n xdsPicklistIDENT_VALUE.Size := 6000;\r\n xdsPicklistFACILITYID.SetParentComponent(xdsPicklist);\r\n xdsPicklistFACILITYID.Name := 'xdsPicklistFACILITYID';\r\n xdsPicklistFACILITYID.Tag := 1;\r\n xdsPicklistFACILITYID.FieldName := 'FACILITYID';\r\n xdsPicklistFACILITYID.Required := True;\r\n xdsPicklistSPECIALITY.SetParentComponent(xdsPicklist);\r\n xdsPicklistSPECIALITY.Name := 'xdsPicklistSPECIALITY';\r\n xdsPicklistSPECIALITY.Tag := 1;\r\n xdsPicklistSPECIALITY.FieldName := 'SPECIALITY';\r\n xdsPicklistSPECIALITY.Required := True;\r\n xdsPicklistVISIBLE.SetParentComponent(xdsPicklist);\r\n xdsPicklistVISIBLE.Name := 'xdsPicklistVISIBLE';\r\n xdsPicklistVISIBLE.FieldName := 'VISIBLE';\r\n xdsPicklistcVISIBLE.SetParentComponent(xdsPicklist);\r\n xdsPicklistcVISIBLE.Name := 'xdsPicklistcVISIBLE';\r\n xdsPicklistcVISIBLE.Tag := -1;\r\n xdsPicklistcVISIBLE.FieldKind := fkCalculated;\r\n xdsPicklistcVISIBLE.FieldName := 'cVISIBLE';\r\n xdsPicklistcVISIBLE.Calculated := True;\r\n xdsPicklistNOTES.SetParentComponent(xdsPicklist);\r\n xdsPicklistNOTES.Name := 'xdsPicklistNOTES';\r\n xdsPicklistNOTES.FieldName := 'NOTES';\r\n xdsDynamicGrid1.SetParentComponent(Self);\r\n xdsDynamicGrid1.Name := 'xdsDynamicGrid1';\r\n xdsDynamicGrid1.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid1.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid1.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid1, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid1.Left := 395;\r\n xdsDynamicGrid1.Top := 8;\r\n xdsDynamicGrid1C1.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1C1.Name := 'xdsDynamicGrid1C1';\r\n xdsDynamicGrid1C1.FieldName := 'C1';\r\n xdsDynamicGrid1C1.Size := 1024;\r\n xdsDynamicGrid1C2.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1C2.Name := 'xdsDynamicGrid1C2';\r\n xdsDynamicGrid1C2.FieldName := 'C2';\r\n xdsDynamicGrid1C2.Size := 1024;\r\n xdsDynamicGrid1C3.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1C3.Name := 'xdsDynamicGrid1C3';\r\n xdsDynamicGrid1C3.FieldName := 'C3';\r\n xdsDynamicGrid1C3.Size := 1024;\r\n xdsDynamicGrid1C4.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1C4.Name := 'xdsDynamicGrid1C4';\r\n xdsDynamicGrid1C4.FieldName := 'C4';\r\n xdsDynamicGrid1C4.Size := 1024;\r\n xdsDynamicGrid1C5.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1C5.Name := 'xdsDynamicGrid1C5';\r\n xdsDynamicGrid1C5.FieldName := 'C5';\r\n xdsDynamicGrid1C5.Size := 1024;\r\n xdsDynamicGrid1C6.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1C6.Name := 'xdsDynamicGrid1C6';\r\n xdsDynamicGrid1C6.FieldName := 'C6';\r\n xdsDynamicGrid1C6.Size := 1024;\r\n xdsDynamicGrid1C7.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1C7.Name := 'xdsDynamicGrid1C7';\r\n xdsDynamicGrid1C7.FieldName := 'C7';\r\n xdsDynamicGrid1C7.Size := 1024;\r\n xdsDynamicGrid1C8.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1C8.Name := 'xdsDynamicGrid1C8';\r\n xdsDynamicGrid1C8.FieldName := 'C8';\r\n xdsDynamicGrid1C8.Size := 1024;\r\n xdsDynamicGrid1C9.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1C9.Name := 'xdsDynamicGrid1C9';\r\n xdsDynamicGrid1C9.FieldName := 'C9';\r\n xdsDynamicGrid1C9.Size := 1024;\r\n xdsDynamicGrid1C10.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1C10.Name := 'xdsDynamicGrid1C10';\r\n xdsDynamicGrid1C10.FieldName := 'C10';\r\n xdsDynamicGrid1C10.Size := 1024;\r\n xdsDynamicGrid1C11.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1C11.Name := 'xdsDynamicGrid1C11';\r\n xdsDynamicGrid1C11.FieldName := 'C11';\r\n xdsDynamicGrid1C11.Size := 1024;\r\n xdsDynamicGrid1C12.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1C12.Name := 'xdsDynamicGrid1C12';\r\n xdsDynamicGrid1C12.FieldName := 'C12';\r\n xdsDynamicGrid1C12.Size := 1024;\r\n xdsDynamicGrid1C13.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1C13.Name := 'xdsDynamicGrid1C13';\r\n xdsDynamicGrid1C13.FieldName := 'C13';\r\n xdsDynamicGrid1C13.Size := 1024;\r\n xdsDynamicGrid1C14.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1C14.Name := 'xdsDynamicGrid1C14';\r\n xdsDynamicGrid1C14.FieldName := 'C14';\r\n xdsDynamicGrid1C14.Size := 1024;\r\n xdsDynamicGrid1C15.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1C15.Name := 'xdsDynamicGrid1C15';\r\n xdsDynamicGrid1C15.FieldName := 'C15';\r\n xdsDynamicGrid1C15.Size := 1024;\r\n xdsDynamicGrid1C16.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1C16.Name := 'xdsDynamicGrid1C16';\r\n xdsDynamicGrid1C16.FieldName := 'C16';\r\n xdsDynamicGrid1C16.Size := 1024;\r\n xdsDynamicGrid1C17.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1C17.Name := 'xdsDynamicGrid1C17';\r\n xdsDynamicGrid1C17.FieldName := 'C17';\r\n xdsDynamicGrid1C17.Size := 1024;\r\n xdsDynamicGrid1C18.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1C18.Name := 'xdsDynamicGrid1C18';\r\n xdsDynamicGrid1C18.FieldName := 'C18';\r\n xdsDynamicGrid1C18.Size := 1024;\r\n xdsDynamicGrid1C19.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1C19.Name := 'xdsDynamicGrid1C19';\r\n xdsDynamicGrid1C19.FieldName := 'C19';\r\n xdsDynamicGrid1C19.Size := 1024;\r\n xdsDynamicGrid1C20.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1C20.Name := 'xdsDynamicGrid1C20';\r\n xdsDynamicGrid1C20.FieldName := 'C20';\r\n xdsDynamicGrid1C20.BlobType := ftMemo;\r\n xdsDynamicGrid1_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1_CURRENT_NURSE2.Name := 'xdsDynamicGrid1_CURRENT_NURSE2';\r\n xdsDynamicGrid1_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid1_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid1_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1_CURRENT_NURSE1.Name := 'xdsDynamicGrid1_CURRENT_NURSE1';\r\n xdsDynamicGrid1_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid1_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid1_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1_CURRENT_PROVIDER.Name := 'xdsDynamicGrid1_CURRENT_PROVIDER';\r\n xdsDynamicGrid1_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid1_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid1_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid1_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid1_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid1_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid1_CURRENT_MRN.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1_CURRENT_MRN.Name := 'xdsDynamicGrid1_CURRENT_MRN';\r\n xdsDynamicGrid1_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid1_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid1_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1_CURRENT_APPTNAME.Name := 'xdsDynamicGrid1_CURRENT_APPTNAME';\r\n xdsDynamicGrid1_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid1_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid1_CURRENT_APPTTYPE.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1_CURRENT_APPTTYPE.Name := 'xdsDynamicGrid1_CURRENT_APPTTYPE';\r\n xdsDynamicGrid1_CURRENT_APPTTYPE.DisplayWidth := 256;\r\n xdsDynamicGrid1_CURRENT_APPTTYPE.FieldName := '_CURRENT_APPTTYPE';\r\n xdsDynamicGrid1_CURRENT_APPTTYPE.Size := 256;\r\n xdsDynamicGrid1_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1_CURRENT_MEDID.Name := 'xdsDynamicGrid1_CURRENT_MEDID';\r\n xdsDynamicGrid1_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid1_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid1_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid1_CURRENT_PROBLEMID';\r\n xdsDynamicGrid1_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid1_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid1_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid1_CURRENT_ALLERGYID';\r\n xdsDynamicGrid1_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid1_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid1_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid1_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid1_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid1_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid1_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid1_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid1_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid1_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid1_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid1_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid1_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid1_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid1_CURRENTPROC_IMAGECOUNT.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1_CURRENTPROC_IMAGECOUNT.Name := 'xdsDynamicGrid1_CURRENTPROC_IMAGECOUNT';\r\n xdsDynamicGrid1_CURRENTPROC_IMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid1_CURRENTPROC_IMAGECOUNT.Size := 256;\r\n xdsDynamicGrid1_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1_CURRENT_APPTDATE.Name := 'xdsDynamicGrid1_CURRENT_APPTDATE';\r\n xdsDynamicGrid1_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid1_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid1_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1_PATIENTFHIRID.Name := 'xdsDynamicGrid1_PATIENTFHIRID';\r\n xdsDynamicGrid1_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid1_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid1_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1_PATIENTCERNERID.Name := 'xdsDynamicGrid1_PATIENTCERNERID';\r\n xdsDynamicGrid1_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid1_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid1EGV_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1EGV_SETUPFACILITYID.Name := 'xdsDynamicGrid1EGV_SETUPFACILITYID';\r\n xdsDynamicGrid1EGV_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid1EGV_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid1_USERID.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1_USERID.Name := 'xdsDynamicGrid1_USERID';\r\n xdsDynamicGrid1_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid1_USERID.Size := 256;\r\n xdsDynamicGrid1NEW_RECORD.SetParentComponent(xdsDynamicGrid1);\r\n xdsDynamicGrid1NEW_RECORD.Name := 'xdsDynamicGrid1NEW_RECORD';\r\n xdsDynamicGrid1NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid1.SetParentComponent(Self);\r\n dsDynamicGrid1.Name := 'dsDynamicGrid1';\r\n dsDynamicGrid1.DataSet := xdsDynamicGrid1;\r\n dsDynamicGrid1.Left := 395;\r\n dsDynamicGrid1.Top := 48;\r\n xdsDynamicGrid2.SetParentComponent(Self);\r\n xdsDynamicGrid2.Name := 'xdsDynamicGrid2';\r\n xdsDynamicGrid2.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid2.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid2.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid2, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid2.Left := 491;\r\n xdsDynamicGrid2.Top := 8;\r\n xdsDynamicGrid2C1.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2C1.Name := 'xdsDynamicGrid2C1';\r\n xdsDynamicGrid2C1.FieldName := 'C1';\r\n xdsDynamicGrid2C1.Size := 1024;\r\n xdsDynamicGrid2C2.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2C2.Name := 'xdsDynamicGrid2C2';\r\n xdsDynamicGrid2C2.FieldName := 'C2';\r\n xdsDynamicGrid2C2.Size := 1024;\r\n xdsDynamicGrid2C3.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2C3.Name := 'xdsDynamicGrid2C3';\r\n xdsDynamicGrid2C3.FieldName := 'C3';\r\n xdsDynamicGrid2C3.Size := 1024;\r\n xdsDynamicGrid2C4.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2C4.Name := 'xdsDynamicGrid2C4';\r\n xdsDynamicGrid2C4.FieldName := 'C4';\r\n xdsDynamicGrid2C4.Size := 1024;\r\n xdsDynamicGrid2C5.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2C5.Name := 'xdsDynamicGrid2C5';\r\n xdsDynamicGrid2C5.FieldName := 'C5';\r\n xdsDynamicGrid2C5.Size := 1024;\r\n xdsDynamicGrid2C6.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2C6.Name := 'xdsDynamicGrid2C6';\r\n xdsDynamicGrid2C6.FieldName := 'C6';\r\n xdsDynamicGrid2C6.Size := 1024;\r\n xdsDynamicGrid2C7.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2C7.Name := 'xdsDynamicGrid2C7';\r\n xdsDynamicGrid2C7.FieldName := 'C7';\r\n xdsDynamicGrid2C7.Size := 1024;\r\n xdsDynamicGrid2C8.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2C8.Name := 'xdsDynamicGrid2C8';\r\n xdsDynamicGrid2C8.FieldName := 'C8';\r\n xdsDynamicGrid2C8.Size := 1024;\r\n xdsDynamicGrid2C9.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2C9.Name := 'xdsDynamicGrid2C9';\r\n xdsDynamicGrid2C9.FieldName := 'C9';\r\n xdsDynamicGrid2C9.Size := 1024;\r\n xdsDynamicGrid2C10.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2C10.Name := 'xdsDynamicGrid2C10';\r\n xdsDynamicGrid2C10.FieldName := 'C10';\r\n xdsDynamicGrid2C10.Size := 1024;\r\n xdsDynamicGrid2C11.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2C11.Name := 'xdsDynamicGrid2C11';\r\n xdsDynamicGrid2C11.FieldName := 'C11';\r\n xdsDynamicGrid2C11.Size := 1024;\r\n xdsDynamicGrid2C12.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2C12.Name := 'xdsDynamicGrid2C12';\r\n xdsDynamicGrid2C12.FieldName := 'C12';\r\n xdsDynamicGrid2C12.Size := 1024;\r\n xdsDynamicGrid2C13.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2C13.Name := 'xdsDynamicGrid2C13';\r\n xdsDynamicGrid2C13.FieldName := 'C13';\r\n xdsDynamicGrid2C13.Size := 1024;\r\n xdsDynamicGrid2C14.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2C14.Name := 'xdsDynamicGrid2C14';\r\n xdsDynamicGrid2C14.FieldName := 'C14';\r\n xdsDynamicGrid2C14.Size := 1024;\r\n xdsDynamicGrid2C15.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2C15.Name := 'xdsDynamicGrid2C15';\r\n xdsDynamicGrid2C15.FieldName := 'C15';\r\n xdsDynamicGrid2C15.Size := 1024;\r\n xdsDynamicGrid2C16.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2C16.Name := 'xdsDynamicGrid2C16';\r\n xdsDynamicGrid2C16.FieldName := 'C16';\r\n xdsDynamicGrid2C16.Size := 1024;\r\n xdsDynamicGrid2C17.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2C17.Name := 'xdsDynamicGrid2C17';\r\n xdsDynamicGrid2C17.FieldName := 'C17';\r\n xdsDynamicGrid2C17.Size := 1024;\r\n xdsDynamicGrid2C18.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2C18.Name := 'xdsDynamicGrid2C18';\r\n xdsDynamicGrid2C18.FieldName := 'C18';\r\n xdsDynamicGrid2C18.Size := 1024;\r\n xdsDynamicGrid2C19.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2C19.Name := 'xdsDynamicGrid2C19';\r\n xdsDynamicGrid2C19.FieldName := 'C19';\r\n xdsDynamicGrid2C19.Size := 1024;\r\n xdsDynamicGrid2C20.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2C20.Name := 'xdsDynamicGrid2C20';\r\n xdsDynamicGrid2C20.FieldName := 'C20';\r\n xdsDynamicGrid2C20.Size := 1024;\r\n xdsDynamicGrid2_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2_CURRENT_NURSE2.Name := 'xdsDynamicGrid2_CURRENT_NURSE2';\r\n xdsDynamicGrid2_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid2_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid2_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2_CURRENT_NURSE1.Name := 'xdsDynamicGrid2_CURRENT_NURSE1';\r\n xdsDynamicGrid2_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid2_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid2_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2_CURRENT_PROVIDER.Name := 'xdsDynamicGrid2_CURRENT_PROVIDER';\r\n xdsDynamicGrid2_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid2_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid2_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid2_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid2_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid2_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid2_CURRENT_MRN.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2_CURRENT_MRN.Name := 'xdsDynamicGrid2_CURRENT_MRN';\r\n xdsDynamicGrid2_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid2_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid2_CURRENT_APPTTYPE.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2_CURRENT_APPTTYPE.Name := 'xdsDynamicGrid2_CURRENT_APPTTYPE';\r\n xdsDynamicGrid2_CURRENT_APPTTYPE.DisplayWidth := 256;\r\n xdsDynamicGrid2_CURRENT_APPTTYPE.FieldName := '_CURRENT_APPTTYPE';\r\n xdsDynamicGrid2_CURRENT_APPTTYPE.Size := 256;\r\n xdsDynamicGrid2_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2_CURRENT_APPTNAME.Name := 'xdsDynamicGrid2_CURRENT_APPTNAME';\r\n xdsDynamicGrid2_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid2_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid2_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2_CURRENT_MEDID.Name := 'xdsDynamicGrid2_CURRENT_MEDID';\r\n xdsDynamicGrid2_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid2_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid2_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid2_CURRENT_PROBLEMID';\r\n xdsDynamicGrid2_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid2_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid2_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid2_CURRENT_ALLERGYID';\r\n xdsDynamicGrid2_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid2_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid2_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid2_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid2_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid2_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid2_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid2_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid2_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid2_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid2_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid2_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid2_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid2_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid2_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2_CURRENT_APPTDATE.Name := 'xdsDynamicGrid2_CURRENT_APPTDATE';\r\n xdsDynamicGrid2_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid2_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid2_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid2_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid2_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid2_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid2_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2_PATIENTFHIRID.Name := 'xdsDynamicGrid2_PATIENTFHIRID';\r\n xdsDynamicGrid2_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid2_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid2_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2_PATIENTCERNERID.Name := 'xdsDynamicGrid2_PATIENTCERNERID';\r\n xdsDynamicGrid2_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid2_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid2_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2_SETUPFACILITYID.Name := 'xdsDynamicGrid2_SETUPFACILITYID';\r\n xdsDynamicGrid2_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid2_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid2_USERID.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2_USERID.Name := 'xdsDynamicGrid2_USERID';\r\n xdsDynamicGrid2_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid2_USERID.Size := 256;\r\n xdsDynamicGrid2NEW_RECORD.SetParentComponent(xdsDynamicGrid2);\r\n xdsDynamicGrid2NEW_RECORD.Name := 'xdsDynamicGrid2NEW_RECORD';\r\n xdsDynamicGrid2NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid2.SetParentComponent(Self);\r\n dsDynamicGrid2.Name := 'dsDynamicGrid2';\r\n dsDynamicGrid2.DataSet := xdsDynamicGrid2;\r\n dsDynamicGrid2.Left := 491;\r\n dsDynamicGrid2.Top := 48;\r\n xdsDynamicGrid3.SetParentComponent(Self);\r\n xdsDynamicGrid3.Name := 'xdsDynamicGrid3';\r\n xdsDynamicGrid3.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid3.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid3.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid3, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid3.Left := 611;\r\n xdsDynamicGrid3.Top := 8;\r\n xdsDynamicGrid3C1.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3C1.Name := 'xdsDynamicGrid3C1';\r\n xdsDynamicGrid3C1.FieldName := 'C1';\r\n xdsDynamicGrid3C1.Size := 1024;\r\n xdsDynamicGrid3C2.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3C2.Name := 'xdsDynamicGrid3C2';\r\n xdsDynamicGrid3C2.FieldName := 'C2';\r\n xdsDynamicGrid3C2.Size := 1024;\r\n xdsDynamicGrid3C3.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3C3.Name := 'xdsDynamicGrid3C3';\r\n xdsDynamicGrid3C3.FieldName := 'C3';\r\n xdsDynamicGrid3C3.Size := 1024;\r\n xdsDynamicGrid3C4.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3C4.Name := 'xdsDynamicGrid3C4';\r\n xdsDynamicGrid3C4.FieldName := 'C4';\r\n xdsDynamicGrid3C4.Size := 1024;\r\n xdsDynamicGrid3C5.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3C5.Name := 'xdsDynamicGrid3C5';\r\n xdsDynamicGrid3C5.FieldName := 'C5';\r\n xdsDynamicGrid3C5.Size := 1024;\r\n xdsDynamicGrid3C6.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3C6.Name := 'xdsDynamicGrid3C6';\r\n xdsDynamicGrid3C6.FieldName := 'C6';\r\n xdsDynamicGrid3C6.Size := 1024;\r\n xdsDynamicGrid3C7.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3C7.Name := 'xdsDynamicGrid3C7';\r\n xdsDynamicGrid3C7.FieldName := 'C7';\r\n xdsDynamicGrid3C7.Size := 1024;\r\n xdsDynamicGrid3C8.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3C8.Name := 'xdsDynamicGrid3C8';\r\n xdsDynamicGrid3C8.FieldName := 'C8';\r\n xdsDynamicGrid3C8.Size := 1024;\r\n xdsDynamicGrid3C9.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3C9.Name := 'xdsDynamicGrid3C9';\r\n xdsDynamicGrid3C9.FieldName := 'C9';\r\n xdsDynamicGrid3C9.Size := 1024;\r\n xdsDynamicGrid3C10.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3C10.Name := 'xdsDynamicGrid3C10';\r\n xdsDynamicGrid3C10.FieldName := 'C10';\r\n xdsDynamicGrid3C10.Size := 1024;\r\n xdsDynamicGrid3C11.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3C11.Name := 'xdsDynamicGrid3C11';\r\n xdsDynamicGrid3C11.FieldName := 'C11';\r\n xdsDynamicGrid3C11.Size := 1024;\r\n xdsDynamicGrid3C12.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3C12.Name := 'xdsDynamicGrid3C12';\r\n xdsDynamicGrid3C12.FieldName := 'C12';\r\n xdsDynamicGrid3C12.Size := 1024;\r\n xdsDynamicGrid3C13.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3C13.Name := 'xdsDynamicGrid3C13';\r\n xdsDynamicGrid3C13.FieldName := 'C13';\r\n xdsDynamicGrid3C13.Size := 1024;\r\n xdsDynamicGrid3C14.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3C14.Name := 'xdsDynamicGrid3C14';\r\n xdsDynamicGrid3C14.FieldName := 'C14';\r\n xdsDynamicGrid3C14.Size := 1024;\r\n xdsDynamicGrid3C15.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3C15.Name := 'xdsDynamicGrid3C15';\r\n xdsDynamicGrid3C15.FieldName := 'C15';\r\n xdsDynamicGrid3C15.Size := 1024;\r\n xdsDynamicGrid3C16.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3C16.Name := 'xdsDynamicGrid3C16';\r\n xdsDynamicGrid3C16.FieldName := 'C16';\r\n xdsDynamicGrid3C16.Size := 1024;\r\n xdsDynamicGrid3C17.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3C17.Name := 'xdsDynamicGrid3C17';\r\n xdsDynamicGrid3C17.FieldName := 'C17';\r\n xdsDynamicGrid3C17.Size := 1024;\r\n xdsDynamicGrid3C18.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3C18.Name := 'xdsDynamicGrid3C18';\r\n xdsDynamicGrid3C18.FieldName := 'C18';\r\n xdsDynamicGrid3C18.Size := 1024;\r\n xdsDynamicGrid3C19.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3C19.Name := 'xdsDynamicGrid3C19';\r\n xdsDynamicGrid3C19.FieldName := 'C19';\r\n xdsDynamicGrid3C19.Size := 1024;\r\n xdsDynamicGrid3C20.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3C20.Name := 'xdsDynamicGrid3C20';\r\n xdsDynamicGrid3C20.FieldName := 'C20';\r\n xdsDynamicGrid3C20.Size := 1024;\r\n xdsDynamicGrid3_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3_CURRENT_NURSE2.Name := 'xdsDynamicGrid3_CURRENT_NURSE2';\r\n xdsDynamicGrid3_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid3_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid3_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3_CURRENT_NURSE1.Name := 'xdsDynamicGrid3_CURRENT_NURSE1';\r\n xdsDynamicGrid3_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid3_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid3_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3_CURRENT_PROVIDER.Name := 'xdsDynamicGrid3_CURRENT_PROVIDER';\r\n xdsDynamicGrid3_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid3_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid3_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid3_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid3_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid3_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid3_CURRENT_MRN.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3_CURRENT_MRN.Name := 'xdsDynamicGrid3_CURRENT_MRN';\r\n xdsDynamicGrid3_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid3_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid3_CURRENT_APPTTYPE.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3_CURRENT_APPTTYPE.Name := 'xdsDynamicGrid3_CURRENT_APPTTYPE';\r\n xdsDynamicGrid3_CURRENT_APPTTYPE.DisplayWidth := 256;\r\n xdsDynamicGrid3_CURRENT_APPTTYPE.FieldName := '_CURRENT_APPTTYPE';\r\n xdsDynamicGrid3_CURRENT_APPTTYPE.Size := 256;\r\n xdsDynamicGrid3_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3_CURRENT_APPTNAME.Name := 'xdsDynamicGrid3_CURRENT_APPTNAME';\r\n xdsDynamicGrid3_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid3_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid3_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3_CURRENT_MEDID.Name := 'xdsDynamicGrid3_CURRENT_MEDID';\r\n xdsDynamicGrid3_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid3_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid3_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid3_CURRENT_PROBLEMID';\r\n xdsDynamicGrid3_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid3_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid3_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid3_CURRENT_ALLERGYID';\r\n xdsDynamicGrid3_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid3_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid3_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid3_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid3_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid3_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid3_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid3_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid3_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid3_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid3_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid3_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid3_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid3_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid3_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid3_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid3_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid3_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid3_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3_CURRENT_APPTDATE.Name := 'xdsDynamicGrid3_CURRENT_APPTDATE';\r\n xdsDynamicGrid3_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid3_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid3_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3_PATIENTFHIRID.Name := 'xdsDynamicGrid3_PATIENTFHIRID';\r\n xdsDynamicGrid3_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid3_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid3_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3_PATIENTCERNERID.Name := 'xdsDynamicGrid3_PATIENTCERNERID';\r\n xdsDynamicGrid3_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid3_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid3_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3_SETUPFACILITYID.Name := 'xdsDynamicGrid3_SETUPFACILITYID';\r\n xdsDynamicGrid3_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid3_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid3_USERID.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3_USERID.Name := 'xdsDynamicGrid3_USERID';\r\n xdsDynamicGrid3_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid3_USERID.Size := 256;\r\n xdsDynamicGrid3NEW_RECORD.SetParentComponent(xdsDynamicGrid3);\r\n xdsDynamicGrid3NEW_RECORD.Name := 'xdsDynamicGrid3NEW_RECORD';\r\n xdsDynamicGrid3NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid3.SetParentComponent(Self);\r\n dsDynamicGrid3.Name := 'dsDynamicGrid3';\r\n dsDynamicGrid3.DataSet := xdsDynamicGrid3;\r\n dsDynamicGrid3.Left := 611;\r\n dsDynamicGrid3.Top := 48;\r\n xdsDynamicGrid4.SetParentComponent(Self);\r\n xdsDynamicGrid4.Name := 'xdsDynamicGrid4';\r\n xdsDynamicGrid4.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid4.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid4.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid4, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid4.Left := 723;\r\n xdsDynamicGrid4.Top := 8;\r\n xdsDynamicGrid4C1.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4C1.Name := 'xdsDynamicGrid4C1';\r\n xdsDynamicGrid4C1.FieldName := 'C1';\r\n xdsDynamicGrid4C1.Size := 1024;\r\n xdsDynamicGrid4C2.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4C2.Name := 'xdsDynamicGrid4C2';\r\n xdsDynamicGrid4C2.FieldName := 'C2';\r\n xdsDynamicGrid4C2.Size := 1024;\r\n xdsDynamicGrid4C3.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4C3.Name := 'xdsDynamicGrid4C3';\r\n xdsDynamicGrid4C3.FieldName := 'C3';\r\n xdsDynamicGrid4C3.Size := 1024;\r\n xdsDynamicGrid4C4.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4C4.Name := 'xdsDynamicGrid4C4';\r\n xdsDynamicGrid4C4.FieldName := 'C4';\r\n xdsDynamicGrid4C4.Size := 1024;\r\n xdsDynamicGrid4C5.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4C5.Name := 'xdsDynamicGrid4C5';\r\n xdsDynamicGrid4C5.FieldName := 'C5';\r\n xdsDynamicGrid4C5.Size := 1024;\r\n xdsDynamicGrid4C6.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4C6.Name := 'xdsDynamicGrid4C6';\r\n xdsDynamicGrid4C6.FieldName := 'C6';\r\n xdsDynamicGrid4C6.Size := 1024;\r\n xdsDynamicGrid4C7.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4C7.Name := 'xdsDynamicGrid4C7';\r\n xdsDynamicGrid4C7.FieldName := 'C7';\r\n xdsDynamicGrid4C7.Size := 1024;\r\n xdsDynamicGrid4C8.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4C8.Name := 'xdsDynamicGrid4C8';\r\n xdsDynamicGrid4C8.FieldName := 'C8';\r\n xdsDynamicGrid4C8.Size := 1024;\r\n xdsDynamicGrid4C9.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4C9.Name := 'xdsDynamicGrid4C9';\r\n xdsDynamicGrid4C9.FieldName := 'C9';\r\n xdsDynamicGrid4C9.Size := 1024;\r\n xdsDynamicGrid4C10.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4C10.Name := 'xdsDynamicGrid4C10';\r\n xdsDynamicGrid4C10.FieldName := 'C10';\r\n xdsDynamicGrid4C10.Size := 1024;\r\n xdsDynamicGrid4C11.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4C11.Name := 'xdsDynamicGrid4C11';\r\n xdsDynamicGrid4C11.FieldName := 'C11';\r\n xdsDynamicGrid4C11.Size := 1024;\r\n xdsDynamicGrid4C12.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4C12.Name := 'xdsDynamicGrid4C12';\r\n xdsDynamicGrid4C12.FieldName := 'C12';\r\n xdsDynamicGrid4C12.Size := 1024;\r\n xdsDynamicGrid4C13.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4C13.Name := 'xdsDynamicGrid4C13';\r\n xdsDynamicGrid4C13.FieldName := 'C13';\r\n xdsDynamicGrid4C13.Size := 1024;\r\n xdsDynamicGrid4C14.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4C14.Name := 'xdsDynamicGrid4C14';\r\n xdsDynamicGrid4C14.FieldName := 'C14';\r\n xdsDynamicGrid4C14.Size := 1024;\r\n xdsDynamicGrid4C15.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4C15.Name := 'xdsDynamicGrid4C15';\r\n xdsDynamicGrid4C15.FieldName := 'C15';\r\n xdsDynamicGrid4C15.Size := 1024;\r\n xdsDynamicGrid4C16.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4C16.Name := 'xdsDynamicGrid4C16';\r\n xdsDynamicGrid4C16.FieldName := 'C16';\r\n xdsDynamicGrid4C16.Size := 1024;\r\n xdsDynamicGrid4C17.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4C17.Name := 'xdsDynamicGrid4C17';\r\n xdsDynamicGrid4C17.FieldName := 'C17';\r\n xdsDynamicGrid4C17.Size := 1024;\r\n xdsDynamicGrid4C18.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4C18.Name := 'xdsDynamicGrid4C18';\r\n xdsDynamicGrid4C18.FieldName := 'C18';\r\n xdsDynamicGrid4C18.Size := 1024;\r\n xdsDynamicGrid4C19.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4C19.Name := 'xdsDynamicGrid4C19';\r\n xdsDynamicGrid4C19.FieldName := 'C19';\r\n xdsDynamicGrid4C19.Size := 1024;\r\n xdsDynamicGrid4C20.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4C20.Name := 'xdsDynamicGrid4C20';\r\n xdsDynamicGrid4C20.FieldName := 'C20';\r\n xdsDynamicGrid4C20.Size := 1024;\r\n xdsDynamicGrid4_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4_CURRENT_NURSE2.Name := 'xdsDynamicGrid4_CURRENT_NURSE2';\r\n xdsDynamicGrid4_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid4_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid4_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4_CURRENT_NURSE1.Name := 'xdsDynamicGrid4_CURRENT_NURSE1';\r\n xdsDynamicGrid4_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid4_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid4_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4_CURRENT_PROVIDER.Name := 'xdsDynamicGrid4_CURRENT_PROVIDER';\r\n xdsDynamicGrid4_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid4_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid4_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid4_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid4_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid4_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid4_CURRENT_MRN.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4_CURRENT_MRN.Name := 'xdsDynamicGrid4_CURRENT_MRN';\r\n xdsDynamicGrid4_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid4_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid4_CURRENT_APPTTYPE.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4_CURRENT_APPTTYPE.Name := 'xdsDynamicGrid4_CURRENT_APPTTYPE';\r\n xdsDynamicGrid4_CURRENT_APPTTYPE.DisplayWidth := 256;\r\n xdsDynamicGrid4_CURRENT_APPTTYPE.FieldName := '_CURRENT_APPTTYPE';\r\n xdsDynamicGrid4_CURRENT_APPTTYPE.Size := 256;\r\n xdsDynamicGrid4_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4_CURRENT_APPTNAME.Name := 'xdsDynamicGrid4_CURRENT_APPTNAME';\r\n xdsDynamicGrid4_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid4_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid4_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4_CURRENT_MEDID.Name := 'xdsDynamicGrid4_CURRENT_MEDID';\r\n xdsDynamicGrid4_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid4_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid4_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid4_CURRENT_PROBLEMID';\r\n xdsDynamicGrid4_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid4_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid4_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid4_CURRENT_ALLERGYID';\r\n xdsDynamicGrid4_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid4_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid4_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid4_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid4_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid4_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid4_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid4_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid4_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid4_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid4_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid4_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid4_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid4_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid4_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4_CURRENT_APPTDATE.Name := 'xdsDynamicGrid4_CURRENT_APPTDATE';\r\n xdsDynamicGrid4_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid4_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid4_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid4_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid4_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid4_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid4_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4_PATIENTFHIRID.Name := 'xdsDynamicGrid4_PATIENTFHIRID';\r\n xdsDynamicGrid4_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid4_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid4_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4_PATIENTCERNERID.Name := 'xdsDynamicGrid4_PATIENTCERNERID';\r\n xdsDynamicGrid4_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid4_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid4_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4_SETUPFACILITYID.Name := 'xdsDynamicGrid4_SETUPFACILITYID';\r\n xdsDynamicGrid4_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid4_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid4_USERID.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4_USERID.Name := 'xdsDynamicGrid4_USERID';\r\n xdsDynamicGrid4_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid4_USERID.Size := 256;\r\n xdsDynamicGrid4NEW_RECORD.SetParentComponent(xdsDynamicGrid4);\r\n xdsDynamicGrid4NEW_RECORD.Name := 'xdsDynamicGrid4NEW_RECORD';\r\n xdsDynamicGrid4NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid4.SetParentComponent(Self);\r\n dsDynamicGrid4.Name := 'dsDynamicGrid4';\r\n dsDynamicGrid4.DataSet := xdsDynamicGrid4;\r\n dsDynamicGrid4.Left := 723;\r\n dsDynamicGrid4.Top := 48;\r\n xdsDynamicGrid5.SetParentComponent(Self);\r\n xdsDynamicGrid5.Name := 'xdsDynamicGrid5';\r\n xdsDynamicGrid5.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid5.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid5.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid5, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid5.Left := 843;\r\n xdsDynamicGrid5.Top := 8;\r\n xdsDynamicGrid5C1.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5C1.Name := 'xdsDynamicGrid5C1';\r\n xdsDynamicGrid5C1.FieldName := 'C1';\r\n xdsDynamicGrid5C1.Size := 1024;\r\n xdsDynamicGrid5C2.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5C2.Name := 'xdsDynamicGrid5C2';\r\n xdsDynamicGrid5C2.FieldName := 'C2';\r\n xdsDynamicGrid5C2.Size := 1024;\r\n xdsDynamicGrid5C3.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5C3.Name := 'xdsDynamicGrid5C3';\r\n xdsDynamicGrid5C3.FieldName := 'C3';\r\n xdsDynamicGrid5C3.Size := 1024;\r\n xdsDynamicGrid5C4.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5C4.Name := 'xdsDynamicGrid5C4';\r\n xdsDynamicGrid5C4.FieldName := 'C4';\r\n xdsDynamicGrid5C4.Size := 1024;\r\n xdsDynamicGrid5C5.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5C5.Name := 'xdsDynamicGrid5C5';\r\n xdsDynamicGrid5C5.FieldName := 'C5';\r\n xdsDynamicGrid5C5.Size := 1024;\r\n xdsDynamicGrid5C6.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5C6.Name := 'xdsDynamicGrid5C6';\r\n xdsDynamicGrid5C6.FieldName := 'C6';\r\n xdsDynamicGrid5C6.Size := 1024;\r\n xdsDynamicGrid5C7.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5C7.Name := 'xdsDynamicGrid5C7';\r\n xdsDynamicGrid5C7.FieldName := 'C7';\r\n xdsDynamicGrid5C7.Size := 1024;\r\n xdsDynamicGrid5C8.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5C8.Name := 'xdsDynamicGrid5C8';\r\n xdsDynamicGrid5C8.FieldName := 'C8';\r\n xdsDynamicGrid5C8.Size := 1024;\r\n xdsDynamicGrid5C9.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5C9.Name := 'xdsDynamicGrid5C9';\r\n xdsDynamicGrid5C9.FieldName := 'C9';\r\n xdsDynamicGrid5C9.Size := 1024;\r\n xdsDynamicGrid5C10.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5C10.Name := 'xdsDynamicGrid5C10';\r\n xdsDynamicGrid5C10.FieldName := 'C10';\r\n xdsDynamicGrid5C10.Size := 1024;\r\n xdsDynamicGrid5C11.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5C11.Name := 'xdsDynamicGrid5C11';\r\n xdsDynamicGrid5C11.FieldName := 'C11';\r\n xdsDynamicGrid5C11.Size := 1024;\r\n xdsDynamicGrid5C12.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5C12.Name := 'xdsDynamicGrid5C12';\r\n xdsDynamicGrid5C12.FieldName := 'C12';\r\n xdsDynamicGrid5C12.Size := 1024;\r\n xdsDynamicGrid5C13.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5C13.Name := 'xdsDynamicGrid5C13';\r\n xdsDynamicGrid5C13.FieldName := 'C13';\r\n xdsDynamicGrid5C13.Size := 1024;\r\n xdsDynamicGrid5C14.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5C14.Name := 'xdsDynamicGrid5C14';\r\n xdsDynamicGrid5C14.FieldName := 'C14';\r\n xdsDynamicGrid5C14.Size := 1024;\r\n xdsDynamicGrid5C15.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5C15.Name := 'xdsDynamicGrid5C15';\r\n xdsDynamicGrid5C15.FieldName := 'C15';\r\n xdsDynamicGrid5C15.Size := 1024;\r\n xdsDynamicGrid5C16.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5C16.Name := 'xdsDynamicGrid5C16';\r\n xdsDynamicGrid5C16.FieldName := 'C16';\r\n xdsDynamicGrid5C16.Size := 1024;\r\n xdsDynamicGrid5C17.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5C17.Name := 'xdsDynamicGrid5C17';\r\n xdsDynamicGrid5C17.FieldName := 'C17';\r\n xdsDynamicGrid5C17.Size := 1024;\r\n xdsDynamicGrid5C18.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5C18.Name := 'xdsDynamicGrid5C18';\r\n xdsDynamicGrid5C18.FieldName := 'C18';\r\n xdsDynamicGrid5C18.Size := 1024;\r\n xdsDynamicGrid5C19.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5C19.Name := 'xdsDynamicGrid5C19';\r\n xdsDynamicGrid5C19.FieldName := 'C19';\r\n xdsDynamicGrid5C19.Size := 1024;\r\n xdsDynamicGrid5C20.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5C20.Name := 'xdsDynamicGrid5C20';\r\n xdsDynamicGrid5C20.FieldName := 'C20';\r\n xdsDynamicGrid5C20.Size := 1024;\r\n xdsDynamicGrid5_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5_CURRENT_NURSE2.Name := 'xdsDynamicGrid5_CURRENT_NURSE2';\r\n xdsDynamicGrid5_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid5_CURRENT_NURSE2.Size := 128;\r\n xdsDynamicGrid5_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5_CURRENT_NURSE1.Name := 'xdsDynamicGrid5_CURRENT_NURSE1';\r\n xdsDynamicGrid5_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid5_CURRENT_NURSE1.Size := 128;\r\n xdsDynamicGrid5_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5_CURRENT_PROVIDER.Name := 'xdsDynamicGrid5_CURRENT_PROVIDER';\r\n xdsDynamicGrid5_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid5_CURRENT_PROVIDER.Size := 128;\r\n xdsDynamicGrid5_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid5_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid5_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid5_CURRENT_PROCEDURENUMBER.Size := 64;\r\n xdsDynamicGrid5_CURRENT_MRN.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5_CURRENT_MRN.Name := 'xdsDynamicGrid5_CURRENT_MRN';\r\n xdsDynamicGrid5_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid5_CURRENT_MRN.Size := 64;\r\n xdsDynamicGrid5_CURRENT_APPTTYPE.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5_CURRENT_APPTTYPE.Name := 'xdsDynamicGrid5_CURRENT_APPTTYPE';\r\n xdsDynamicGrid5_CURRENT_APPTTYPE.DisplayWidth := 256;\r\n xdsDynamicGrid5_CURRENT_APPTTYPE.FieldName := '_CURRENT_APPTTYPE';\r\n xdsDynamicGrid5_CURRENT_APPTTYPE.Size := 256;\r\n xdsDynamicGrid5_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5_CURRENT_APPTNAME.Name := 'xdsDynamicGrid5_CURRENT_APPTNAME';\r\n xdsDynamicGrid5_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid5_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid5_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5_CURRENT_MEDID.Name := 'xdsDynamicGrid5_CURRENT_MEDID';\r\n xdsDynamicGrid5_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid5_CURRENT_MEDID.Size := 128;\r\n xdsDynamicGrid5_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid5_CURRENT_PROBLEMID';\r\n xdsDynamicGrid5_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid5_CURRENT_PROBLEMID.Size := 16;\r\n xdsDynamicGrid5_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid5_CURRENT_ALLERGYID';\r\n xdsDynamicGrid5_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid5_CURRENT_ALLERGYID.Size := 16;\r\n xdsDynamicGrid5_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid5_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid5_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid5_CURRENT_REFPHYCODE.Size := 16;\r\n xdsDynamicGrid5_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid5_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid5_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid5_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid5_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid5_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid5_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5_CURRENT_APPTDATE.Name := 'xdsDynamicGrid5_CURRENT_APPTDATE';\r\n xdsDynamicGrid5_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid5_CURRENT_APPTDATE.Size := 128;\r\n xdsDynamicGrid5_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid5_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid5_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid5_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5_PATIENTFHIRID.Name := 'xdsDynamicGrid5_PATIENTFHIRID';\r\n xdsDynamicGrid5_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid5_PATIENTFHIRID.Size := 128;\r\n xdsDynamicGrid5_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5_PATIENTCERNERID.Name := 'xdsDynamicGrid5_PATIENTCERNERID';\r\n xdsDynamicGrid5_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid5_PATIENTCERNERID.Size := 128;\r\n xdsDynamicGrid5_USERID.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5_USERID.Name := 'xdsDynamicGrid5_USERID';\r\n xdsDynamicGrid5_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid5_USERID.Size := 256;\r\n xdsDynamicGrid5NEW_RECORD.SetParentComponent(xdsDynamicGrid5);\r\n xdsDynamicGrid5NEW_RECORD.Name := 'xdsDynamicGrid5NEW_RECORD';\r\n xdsDynamicGrid5NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid5.SetParentComponent(Self);\r\n dsDynamicGrid5.Name := 'dsDynamicGrid5';\r\n dsDynamicGrid5.DataSet := xdsDynamicGrid5;\r\n dsDynamicGrid5.Left := 843;\r\n dsDynamicGrid5.Top := 48;\r\n xdsDynamicGrid6.SetParentComponent(Self);\r\n xdsDynamicGrid6.Name := 'xdsDynamicGrid6';\r\n xdsDynamicGrid6.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid6.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid6.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid6, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid6.Left := 395;\r\n xdsDynamicGrid6.Top := 96;\r\n xdsDynamicGrid6C1.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6C1.Name := 'xdsDynamicGrid6C1';\r\n xdsDynamicGrid6C1.FieldName := 'C1';\r\n xdsDynamicGrid6C1.Size := 1024;\r\n xdsDynamicGrid6C2.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6C2.Name := 'xdsDynamicGrid6C2';\r\n xdsDynamicGrid6C2.FieldName := 'C2';\r\n xdsDynamicGrid6C2.Size := 1024;\r\n xdsDynamicGrid6C3.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6C3.Name := 'xdsDynamicGrid6C3';\r\n xdsDynamicGrid6C3.FieldName := 'C3';\r\n xdsDynamicGrid6C3.Size := 1024;\r\n xdsDynamicGrid6C4.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6C4.Name := 'xdsDynamicGrid6C4';\r\n xdsDynamicGrid6C4.FieldName := 'C4';\r\n xdsDynamicGrid6C4.Size := 1024;\r\n xdsDynamicGrid6C5.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6C5.Name := 'xdsDynamicGrid6C5';\r\n xdsDynamicGrid6C5.FieldName := 'C5';\r\n xdsDynamicGrid6C5.Size := 1024;\r\n xdsDynamicGrid6C6.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6C6.Name := 'xdsDynamicGrid6C6';\r\n xdsDynamicGrid6C6.FieldName := 'C6';\r\n xdsDynamicGrid6C6.Size := 1024;\r\n xdsDynamicGrid6C7.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6C7.Name := 'xdsDynamicGrid6C7';\r\n xdsDynamicGrid6C7.FieldName := 'C7';\r\n xdsDynamicGrid6C7.Size := 1024;\r\n xdsDynamicGrid6C8.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6C8.Name := 'xdsDynamicGrid6C8';\r\n xdsDynamicGrid6C8.FieldName := 'C8';\r\n xdsDynamicGrid6C8.Size := 1024;\r\n xdsDynamicGrid6C9.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6C9.Name := 'xdsDynamicGrid6C9';\r\n xdsDynamicGrid6C9.FieldName := 'C9';\r\n xdsDynamicGrid6C9.Size := 1024;\r\n xdsDynamicGrid6C11.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6C11.Name := 'xdsDynamicGrid6C11';\r\n xdsDynamicGrid6C11.FieldName := 'C11';\r\n xdsDynamicGrid6C11.Size := 1024;\r\n xdsDynamicGrid6C10.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6C10.Name := 'xdsDynamicGrid6C10';\r\n xdsDynamicGrid6C10.FieldName := 'C10';\r\n xdsDynamicGrid6C10.Size := 1024;\r\n xdsDynamicGrid6C12.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6C12.Name := 'xdsDynamicGrid6C12';\r\n xdsDynamicGrid6C12.FieldName := 'C12';\r\n xdsDynamicGrid6C12.Size := 1024;\r\n xdsDynamicGrid6C14.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6C14.Name := 'xdsDynamicGrid6C14';\r\n xdsDynamicGrid6C14.FieldName := 'C14';\r\n xdsDynamicGrid6C14.Size := 1024;\r\n xdsDynamicGrid6C15.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6C15.Name := 'xdsDynamicGrid6C15';\r\n xdsDynamicGrid6C15.FieldName := 'C15';\r\n xdsDynamicGrid6C15.Size := 1024;\r\n xdsDynamicGrid6C13.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6C13.Name := 'xdsDynamicGrid6C13';\r\n xdsDynamicGrid6C13.FieldName := 'C13';\r\n xdsDynamicGrid6C13.Size := 1024;\r\n xdsDynamicGrid6C16.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6C16.Name := 'xdsDynamicGrid6C16';\r\n xdsDynamicGrid6C16.FieldName := 'C16';\r\n xdsDynamicGrid6C16.Size := 1024;\r\n xdsDynamicGrid6C17.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6C17.Name := 'xdsDynamicGrid6C17';\r\n xdsDynamicGrid6C17.FieldName := 'C17';\r\n xdsDynamicGrid6C17.Size := 1024;\r\n xdsDynamicGrid6C18.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6C18.Name := 'xdsDynamicGrid6C18';\r\n xdsDynamicGrid6C18.FieldName := 'C18';\r\n xdsDynamicGrid6C18.Size := 1024;\r\n xdsDynamicGrid6C19.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6C19.Name := 'xdsDynamicGrid6C19';\r\n xdsDynamicGrid6C19.FieldName := 'C19';\r\n xdsDynamicGrid6C19.Size := 1024;\r\n xdsDynamicGrid6C20.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6C20.Name := 'xdsDynamicGrid6C20';\r\n xdsDynamicGrid6C20.FieldName := 'C20';\r\n xdsDynamicGrid6C20.Size := 1024;\r\n xdsDynamicGrid6_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6_CURRENT_NURSE2.Name := 'xdsDynamicGrid6_CURRENT_NURSE2';\r\n xdsDynamicGrid6_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid6_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid6_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6_CURRENT_NURSE1.Name := 'xdsDynamicGrid6_CURRENT_NURSE1';\r\n xdsDynamicGrid6_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid6_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid6_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6_CURRENT_PROVIDER.Name := 'xdsDynamicGrid6_CURRENT_PROVIDER';\r\n xdsDynamicGrid6_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid6_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid6_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid6_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid6_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid6_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid6_CURRENT_MRN.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6_CURRENT_MRN.Name := 'xdsDynamicGrid6_CURRENT_MRN';\r\n xdsDynamicGrid6_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid6_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid6_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6_CURRENT_APPTNAME.Name := 'xdsDynamicGrid6_CURRENT_APPTNAME';\r\n xdsDynamicGrid6_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid6_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid6_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6_CURRENT_MEDID.Name := 'xdsDynamicGrid6_CURRENT_MEDID';\r\n xdsDynamicGrid6_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid6_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid6_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid6_CURRENT_PROBLEMID';\r\n xdsDynamicGrid6_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid6_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid6_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid6_CURRENT_ALLERGYID';\r\n xdsDynamicGrid6_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid6_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid6_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid6_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid6_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid6_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid6_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid6_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid6_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid6_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid6_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid6_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid6_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid6_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid6_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6_CURRENT_APPTDATE.Name := 'xdsDynamicGrid6_CURRENT_APPTDATE';\r\n xdsDynamicGrid6_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid6_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid6_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid6_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid6_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid6_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid6_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6_PATIENTFHIRID.Name := 'xdsDynamicGrid6_PATIENTFHIRID';\r\n xdsDynamicGrid6_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid6_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid6_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6_PATIENTCERNERID.Name := 'xdsDynamicGrid6_PATIENTCERNERID';\r\n xdsDynamicGrid6_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid6_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid6_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6_SETUPFACILITYID.Name := 'xdsDynamicGrid6_SETUPFACILITYID';\r\n xdsDynamicGrid6_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid6_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid6_USERID.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6_USERID.Name := 'xdsDynamicGrid6_USERID';\r\n xdsDynamicGrid6_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid6_USERID.Size := 256;\r\n xdsDynamicGrid6NEW_RECORD.SetParentComponent(xdsDynamicGrid6);\r\n xdsDynamicGrid6NEW_RECORD.Name := 'xdsDynamicGrid6NEW_RECORD';\r\n xdsDynamicGrid6NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid6.SetParentComponent(Self);\r\n dsDynamicGrid6.Name := 'dsDynamicGrid6';\r\n dsDynamicGrid6.DataSet := xdsDynamicGrid6;\r\n dsDynamicGrid6.Left := 395;\r\n dsDynamicGrid6.Top := 136;\r\n xdsDynamicGrid7.SetParentComponent(Self);\r\n xdsDynamicGrid7.Name := 'xdsDynamicGrid7';\r\n xdsDynamicGrid7.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid7.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid7.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid7, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid7.Left := 491;\r\n xdsDynamicGrid7.Top := 96;\r\n xdsDynamicGrid7C1.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7C1.Name := 'xdsDynamicGrid7C1';\r\n xdsDynamicGrid7C1.FieldName := 'C1';\r\n xdsDynamicGrid7C1.Size := 1024;\r\n xdsDynamicGrid7C2.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7C2.Name := 'xdsDynamicGrid7C2';\r\n xdsDynamicGrid7C2.FieldName := 'C2';\r\n xdsDynamicGrid7C2.Size := 1024;\r\n xdsDynamicGrid7C3.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7C3.Name := 'xdsDynamicGrid7C3';\r\n xdsDynamicGrid7C3.FieldName := 'C3';\r\n xdsDynamicGrid7C3.Size := 1024;\r\n xdsDynamicGrid7C4.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7C4.Name := 'xdsDynamicGrid7C4';\r\n xdsDynamicGrid7C4.FieldName := 'C4';\r\n xdsDynamicGrid7C4.Size := 1024;\r\n xdsDynamicGrid7C5.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7C5.Name := 'xdsDynamicGrid7C5';\r\n xdsDynamicGrid7C5.FieldName := 'C5';\r\n xdsDynamicGrid7C5.Size := 1024;\r\n xdsDynamicGrid7C6.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7C6.Name := 'xdsDynamicGrid7C6';\r\n xdsDynamicGrid7C6.FieldName := 'C6';\r\n xdsDynamicGrid7C6.Size := 1024;\r\n xdsDynamicGrid7C7.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7C7.Name := 'xdsDynamicGrid7C7';\r\n xdsDynamicGrid7C7.FieldName := 'C7';\r\n xdsDynamicGrid7C7.Size := 1024;\r\n xdsDynamicGrid7C8.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7C8.Name := 'xdsDynamicGrid7C8';\r\n xdsDynamicGrid7C8.FieldName := 'C8';\r\n xdsDynamicGrid7C8.Size := 1024;\r\n xdsDynamicGrid7C9.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7C9.Name := 'xdsDynamicGrid7C9';\r\n xdsDynamicGrid7C9.FieldName := 'C9';\r\n xdsDynamicGrid7C9.Size := 1024;\r\n xdsDynamicGrid7C11.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7C11.Name := 'xdsDynamicGrid7C11';\r\n xdsDynamicGrid7C11.FieldName := 'C11';\r\n xdsDynamicGrid7C11.Size := 1024;\r\n xdsDynamicGrid7C10.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7C10.Name := 'xdsDynamicGrid7C10';\r\n xdsDynamicGrid7C10.FieldName := 'C10';\r\n xdsDynamicGrid7C10.Size := 1024;\r\n xdsDynamicGrid7C12.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7C12.Name := 'xdsDynamicGrid7C12';\r\n xdsDynamicGrid7C12.FieldName := 'C12';\r\n xdsDynamicGrid7C12.Size := 1024;\r\n xdsDynamicGrid7C14.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7C14.Name := 'xdsDynamicGrid7C14';\r\n xdsDynamicGrid7C14.FieldName := 'C14';\r\n xdsDynamicGrid7C14.Size := 1024;\r\n xdsDynamicGrid7C15.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7C15.Name := 'xdsDynamicGrid7C15';\r\n xdsDynamicGrid7C15.FieldName := 'C15';\r\n xdsDynamicGrid7C15.Size := 1024;\r\n xdsDynamicGrid7C13.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7C13.Name := 'xdsDynamicGrid7C13';\r\n xdsDynamicGrid7C13.FieldName := 'C13';\r\n xdsDynamicGrid7C13.Size := 1024;\r\n xdsDynamicGrid7C16.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7C16.Name := 'xdsDynamicGrid7C16';\r\n xdsDynamicGrid7C16.FieldName := 'C16';\r\n xdsDynamicGrid7C16.Size := 1024;\r\n xdsDynamicGrid7C17.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7C17.Name := 'xdsDynamicGrid7C17';\r\n xdsDynamicGrid7C17.FieldName := 'C17';\r\n xdsDynamicGrid7C17.Size := 1024;\r\n xdsDynamicGrid7C18.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7C18.Name := 'xdsDynamicGrid7C18';\r\n xdsDynamicGrid7C18.FieldName := 'C18';\r\n xdsDynamicGrid7C18.Size := 1024;\r\n xdsDynamicGrid7C19.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7C19.Name := 'xdsDynamicGrid7C19';\r\n xdsDynamicGrid7C19.FieldName := 'C19';\r\n xdsDynamicGrid7C19.Size := 1024;\r\n xdsDynamicGrid7C20.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7C20.Name := 'xdsDynamicGrid7C20';\r\n xdsDynamicGrid7C20.FieldName := 'C20';\r\n xdsDynamicGrid7C20.Size := 1024;\r\n xdsDynamicGrid7_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7_CURRENT_NURSE2.Name := 'xdsDynamicGrid7_CURRENT_NURSE2';\r\n xdsDynamicGrid7_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid7_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid7_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7_CURRENT_NURSE1.Name := 'xdsDynamicGrid7_CURRENT_NURSE1';\r\n xdsDynamicGrid7_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid7_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid7_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7_CURRENT_PROVIDER.Name := 'xdsDynamicGrid7_CURRENT_PROVIDER';\r\n xdsDynamicGrid7_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid7_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid7_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid7_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid7_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid7_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid7_CURRENT_MRN.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7_CURRENT_MRN.Name := 'xdsDynamicGrid7_CURRENT_MRN';\r\n xdsDynamicGrid7_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid7_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid7_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7_CURRENT_APPTNAME.Name := 'xdsDynamicGrid7_CURRENT_APPTNAME';\r\n xdsDynamicGrid7_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid7_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid7_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7_CURRENT_MEDID.Name := 'xdsDynamicGrid7_CURRENT_MEDID';\r\n xdsDynamicGrid7_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid7_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid7_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid7_CURRENT_PROBLEMID';\r\n xdsDynamicGrid7_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid7_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid7_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid7_CURRENT_ALLERGYID';\r\n xdsDynamicGrid7_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid7_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid7_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid7_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid7_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid7_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid7_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid7_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid7_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid7_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid7_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid7_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid7_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid7_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid7_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid7_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid7_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid7_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid7_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7_CURRENT_APPTDATE.Name := 'xdsDynamicGrid7_CURRENT_APPTDATE';\r\n xdsDynamicGrid7_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid7_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid7_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7_PATIENTFHIRID.Name := 'xdsDynamicGrid7_PATIENTFHIRID';\r\n xdsDynamicGrid7_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid7_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid7_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7_PATIENTCERNERID.Name := 'xdsDynamicGrid7_PATIENTCERNERID';\r\n xdsDynamicGrid7_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid7_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid7_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7_SETUPFACILITYID.Name := 'xdsDynamicGrid7_SETUPFACILITYID';\r\n xdsDynamicGrid7_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid7_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid7_USERID.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7_USERID.Name := 'xdsDynamicGrid7_USERID';\r\n xdsDynamicGrid7_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid7_USERID.Size := 256;\r\n xdsDynamicGrid7NEW_RECORD.SetParentComponent(xdsDynamicGrid7);\r\n xdsDynamicGrid7NEW_RECORD.Name := 'xdsDynamicGrid7NEW_RECORD';\r\n xdsDynamicGrid7NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid7.SetParentComponent(Self);\r\n dsDynamicGrid7.Name := 'dsDynamicGrid7';\r\n dsDynamicGrid7.DataSet := xdsDynamicGrid7;\r\n dsDynamicGrid7.Left := 491;\r\n dsDynamicGrid7.Top := 136;\r\n xdsDynamicGrid8.SetParentComponent(Self);\r\n xdsDynamicGrid8.Name := 'xdsDynamicGrid8';\r\n xdsDynamicGrid8.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid8.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid8.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid8, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid8.Left := 611;\r\n xdsDynamicGrid8.Top := 96;\r\n xdsDynamicGrid8C1.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8C1.Name := 'xdsDynamicGrid8C1';\r\n xdsDynamicGrid8C1.FieldName := 'C1';\r\n xdsDynamicGrid8C1.Size := 1024;\r\n xdsDynamicGrid8C2.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8C2.Name := 'xdsDynamicGrid8C2';\r\n xdsDynamicGrid8C2.FieldName := 'C2';\r\n xdsDynamicGrid8C2.Size := 1024;\r\n xdsDynamicGrid8C3.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8C3.Name := 'xdsDynamicGrid8C3';\r\n xdsDynamicGrid8C3.FieldName := 'C3';\r\n xdsDynamicGrid8C3.Size := 1024;\r\n xdsDynamicGrid8C4.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8C4.Name := 'xdsDynamicGrid8C4';\r\n xdsDynamicGrid8C4.FieldName := 'C4';\r\n xdsDynamicGrid8C4.Size := 1024;\r\n xdsDynamicGrid8C5.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8C5.Name := 'xdsDynamicGrid8C5';\r\n xdsDynamicGrid8C5.FieldName := 'C5';\r\n xdsDynamicGrid8C5.Size := 1024;\r\n xdsDynamicGrid8C6.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8C6.Name := 'xdsDynamicGrid8C6';\r\n xdsDynamicGrid8C6.FieldName := 'C6';\r\n xdsDynamicGrid8C6.Size := 1024;\r\n xdsDynamicGrid8C7.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8C7.Name := 'xdsDynamicGrid8C7';\r\n xdsDynamicGrid8C7.FieldName := 'C7';\r\n xdsDynamicGrid8C7.Size := 1024;\r\n xdsDynamicGrid8C8.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8C8.Name := 'xdsDynamicGrid8C8';\r\n xdsDynamicGrid8C8.FieldName := 'C8';\r\n xdsDynamicGrid8C8.Size := 1024;\r\n xdsDynamicGrid8C9.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8C9.Name := 'xdsDynamicGrid8C9';\r\n xdsDynamicGrid8C9.FieldName := 'C9';\r\n xdsDynamicGrid8C9.Size := 1024;\r\n xdsDynamicGrid8C11.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8C11.Name := 'xdsDynamicGrid8C11';\r\n xdsDynamicGrid8C11.FieldName := 'C11';\r\n xdsDynamicGrid8C11.Size := 1024;\r\n xdsDynamicGrid8C10.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8C10.Name := 'xdsDynamicGrid8C10';\r\n xdsDynamicGrid8C10.FieldName := 'C10';\r\n xdsDynamicGrid8C10.Size := 1024;\r\n xdsDynamicGrid8C12.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8C12.Name := 'xdsDynamicGrid8C12';\r\n xdsDynamicGrid8C12.FieldName := 'C12';\r\n xdsDynamicGrid8C12.Size := 1024;\r\n xdsDynamicGrid8C14.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8C14.Name := 'xdsDynamicGrid8C14';\r\n xdsDynamicGrid8C14.FieldName := 'C14';\r\n xdsDynamicGrid8C14.Size := 1024;\r\n xdsDynamicGrid8C15.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8C15.Name := 'xdsDynamicGrid8C15';\r\n xdsDynamicGrid8C15.FieldName := 'C15';\r\n xdsDynamicGrid8C15.Size := 1024;\r\n xdsDynamicGrid8C13.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8C13.Name := 'xdsDynamicGrid8C13';\r\n xdsDynamicGrid8C13.FieldName := 'C13';\r\n xdsDynamicGrid8C13.Size := 1024;\r\n xdsDynamicGrid8C16.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8C16.Name := 'xdsDynamicGrid8C16';\r\n xdsDynamicGrid8C16.FieldName := 'C16';\r\n xdsDynamicGrid8C16.Size := 1024;\r\n xdsDynamicGrid8C17.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8C17.Name := 'xdsDynamicGrid8C17';\r\n xdsDynamicGrid8C17.FieldName := 'C17';\r\n xdsDynamicGrid8C17.Size := 1024;\r\n xdsDynamicGrid8C18.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8C18.Name := 'xdsDynamicGrid8C18';\r\n xdsDynamicGrid8C18.FieldName := 'C18';\r\n xdsDynamicGrid8C18.Size := 1024;\r\n xdsDynamicGrid8C19.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8C19.Name := 'xdsDynamicGrid8C19';\r\n xdsDynamicGrid8C19.FieldName := 'C19';\r\n xdsDynamicGrid8C19.Size := 1024;\r\n xdsDynamicGrid8C20.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8C20.Name := 'xdsDynamicGrid8C20';\r\n xdsDynamicGrid8C20.FieldName := 'C20';\r\n xdsDynamicGrid8C20.Size := 1024;\r\n xdsDynamicGrid8_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8_CURRENT_NURSE2.Name := 'xdsDynamicGrid8_CURRENT_NURSE2';\r\n xdsDynamicGrid8_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid8_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid8_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8_CURRENT_NURSE1.Name := 'xdsDynamicGrid8_CURRENT_NURSE1';\r\n xdsDynamicGrid8_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid8_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid8_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8_CURRENT_PROVIDER.Name := 'xdsDynamicGrid8_CURRENT_PROVIDER';\r\n xdsDynamicGrid8_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid8_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid8_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid8_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid8_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid8_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid8_CURRENT_MRN.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8_CURRENT_MRN.Name := 'xdsDynamicGrid8_CURRENT_MRN';\r\n xdsDynamicGrid8_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid8_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid8_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8_CURRENT_APPTNAME.Name := 'xdsDynamicGrid8_CURRENT_APPTNAME';\r\n xdsDynamicGrid8_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid8_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid8_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8_CURRENT_MEDID.Name := 'xdsDynamicGrid8_CURRENT_MEDID';\r\n xdsDynamicGrid8_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid8_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid8_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid8_CURRENT_PROBLEMID';\r\n xdsDynamicGrid8_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid8_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid8_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid8_CURRENT_ALLERGYID';\r\n xdsDynamicGrid8_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid8_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid8_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid8_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid8_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid8_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid8_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid8_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid8_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid8_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid8_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid8_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid8_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid8_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid8_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid8_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid8_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid8_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid8_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8_CURRENT_APPTDATE.Name := 'xdsDynamicGrid8_CURRENT_APPTDATE';\r\n xdsDynamicGrid8_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid8_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid8_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8_PATIENTFHIRID.Name := 'xdsDynamicGrid8_PATIENTFHIRID';\r\n xdsDynamicGrid8_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid8_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid8_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8_PATIENTCERNERID.Name := 'xdsDynamicGrid8_PATIENTCERNERID';\r\n xdsDynamicGrid8_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid8_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid8_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8_SETUPFACILITYID.Name := 'xdsDynamicGrid8_SETUPFACILITYID';\r\n xdsDynamicGrid8_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid8_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid8_USERID.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8_USERID.Name := 'xdsDynamicGrid8_USERID';\r\n xdsDynamicGrid8_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid8_USERID.Size := 256;\r\n xdsDynamicGrid8NEW_RECORD.SetParentComponent(xdsDynamicGrid8);\r\n xdsDynamicGrid8NEW_RECORD.Name := 'xdsDynamicGrid8NEW_RECORD';\r\n xdsDynamicGrid8NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid8.SetParentComponent(Self);\r\n dsDynamicGrid8.Name := 'dsDynamicGrid8';\r\n dsDynamicGrid8.DataSet := xdsDynamicGrid8;\r\n dsDynamicGrid8.Left := 611;\r\n dsDynamicGrid8.Top := 136;\r\n xdsDynamicGrid9.SetParentComponent(Self);\r\n xdsDynamicGrid9.Name := 'xdsDynamicGrid9';\r\n xdsDynamicGrid9.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid9.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid9.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid9, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid9.Left := 723;\r\n xdsDynamicGrid9.Top := 96;\r\n xdsDynamicGrid9C1.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9C1.Name := 'xdsDynamicGrid9C1';\r\n xdsDynamicGrid9C1.FieldName := 'C1';\r\n xdsDynamicGrid9C1.Size := 1024;\r\n xdsDynamicGrid9C2.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9C2.Name := 'xdsDynamicGrid9C2';\r\n xdsDynamicGrid9C2.FieldName := 'C2';\r\n xdsDynamicGrid9C2.Size := 1024;\r\n xdsDynamicGrid9C3.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9C3.Name := 'xdsDynamicGrid9C3';\r\n xdsDynamicGrid9C3.FieldName := 'C3';\r\n xdsDynamicGrid9C3.Size := 1024;\r\n xdsDynamicGrid9C4.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9C4.Name := 'xdsDynamicGrid9C4';\r\n xdsDynamicGrid9C4.FieldName := 'C4';\r\n xdsDynamicGrid9C4.Size := 1024;\r\n xdsDynamicGrid9C5.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9C5.Name := 'xdsDynamicGrid9C5';\r\n xdsDynamicGrid9C5.FieldName := 'C5';\r\n xdsDynamicGrid9C5.Size := 1024;\r\n xdsDynamicGrid9C6.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9C6.Name := 'xdsDynamicGrid9C6';\r\n xdsDynamicGrid9C6.FieldName := 'C6';\r\n xdsDynamicGrid9C6.Size := 1024;\r\n xdsDynamicGrid9C7.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9C7.Name := 'xdsDynamicGrid9C7';\r\n xdsDynamicGrid9C7.FieldName := 'C7';\r\n xdsDynamicGrid9C7.Size := 1024;\r\n xdsDynamicGrid9C8.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9C8.Name := 'xdsDynamicGrid9C8';\r\n xdsDynamicGrid9C8.FieldName := 'C8';\r\n xdsDynamicGrid9C8.Size := 1024;\r\n xdsDynamicGrid9C9.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9C9.Name := 'xdsDynamicGrid9C9';\r\n xdsDynamicGrid9C9.FieldName := 'C9';\r\n xdsDynamicGrid9C9.Size := 1024;\r\n xdsDynamicGrid9C11.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9C11.Name := 'xdsDynamicGrid9C11';\r\n xdsDynamicGrid9C11.FieldName := 'C11';\r\n xdsDynamicGrid9C11.Size := 1024;\r\n xdsDynamicGrid9C10.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9C10.Name := 'xdsDynamicGrid9C10';\r\n xdsDynamicGrid9C10.FieldName := 'C10';\r\n xdsDynamicGrid9C10.Size := 1024;\r\n xdsDynamicGrid9C12.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9C12.Name := 'xdsDynamicGrid9C12';\r\n xdsDynamicGrid9C12.FieldName := 'C12';\r\n xdsDynamicGrid9C12.Size := 1024;\r\n xdsDynamicGrid9C14.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9C14.Name := 'xdsDynamicGrid9C14';\r\n xdsDynamicGrid9C14.FieldName := 'C14';\r\n xdsDynamicGrid9C14.Size := 1024;\r\n xdsDynamicGrid9C15.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9C15.Name := 'xdsDynamicGrid9C15';\r\n xdsDynamicGrid9C15.FieldName := 'C15';\r\n xdsDynamicGrid9C15.Size := 1024;\r\n xdsDynamicGrid9C13.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9C13.Name := 'xdsDynamicGrid9C13';\r\n xdsDynamicGrid9C13.FieldName := 'C13';\r\n xdsDynamicGrid9C13.Size := 1024;\r\n xdsDynamicGrid9C16.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9C16.Name := 'xdsDynamicGrid9C16';\r\n xdsDynamicGrid9C16.FieldName := 'C16';\r\n xdsDynamicGrid9C16.Size := 1024;\r\n xdsDynamicGrid9C17.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9C17.Name := 'xdsDynamicGrid9C17';\r\n xdsDynamicGrid9C17.FieldName := 'C17';\r\n xdsDynamicGrid9C17.Size := 1024;\r\n xdsDynamicGrid9C18.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9C18.Name := 'xdsDynamicGrid9C18';\r\n xdsDynamicGrid9C18.FieldName := 'C18';\r\n xdsDynamicGrid9C18.Size := 1024;\r\n xdsDynamicGrid9C19.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9C19.Name := 'xdsDynamicGrid9C19';\r\n xdsDynamicGrid9C19.FieldName := 'C19';\r\n xdsDynamicGrid9C19.Size := 1024;\r\n xdsDynamicGrid9C20.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9C20.Name := 'xdsDynamicGrid9C20';\r\n xdsDynamicGrid9C20.FieldName := 'C20';\r\n xdsDynamicGrid9C20.Size := 1024;\r\n xdsDynamicGrid9_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9_CURRENT_NURSE2.Name := 'xdsDynamicGrid9_CURRENT_NURSE2';\r\n xdsDynamicGrid9_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid9_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid9_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9_CURRENT_NURSE1.Name := 'xdsDynamicGrid9_CURRENT_NURSE1';\r\n xdsDynamicGrid9_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid9_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid9_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9_CURRENT_PROVIDER.Name := 'xdsDynamicGrid9_CURRENT_PROVIDER';\r\n xdsDynamicGrid9_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid9_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid9_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid9_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid9_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid9_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid9_CURRENT_MRN.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9_CURRENT_MRN.Name := 'xdsDynamicGrid9_CURRENT_MRN';\r\n xdsDynamicGrid9_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid9_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid9_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9_CURRENT_APPTNAME.Name := 'xdsDynamicGrid9_CURRENT_APPTNAME';\r\n xdsDynamicGrid9_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid9_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid9_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9_CURRENT_MEDID.Name := 'xdsDynamicGrid9_CURRENT_MEDID';\r\n xdsDynamicGrid9_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid9_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid9_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid9_CURRENT_PROBLEMID';\r\n xdsDynamicGrid9_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid9_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid9_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid9_CURRENT_ALLERGYID';\r\n xdsDynamicGrid9_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid9_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid9_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid9_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid9_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid9_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid9_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid9_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid9_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid9_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid9_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid9_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid9_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid9_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid9_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid9_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid9_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid9_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid9_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9_CURRENT_APPTDATE.Name := 'xdsDynamicGrid9_CURRENT_APPTDATE';\r\n xdsDynamicGrid9_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid9_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid9_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9_PATIENTFHIRID.Name := 'xdsDynamicGrid9_PATIENTFHIRID';\r\n xdsDynamicGrid9_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid9_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid9_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9_PATIENTCERNERID.Name := 'xdsDynamicGrid9_PATIENTCERNERID';\r\n xdsDynamicGrid9_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid9_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid9_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9_SETUPFACILITYID.Name := 'xdsDynamicGrid9_SETUPFACILITYID';\r\n xdsDynamicGrid9_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid9_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid9_USERID.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9_USERID.Name := 'xdsDynamicGrid9_USERID';\r\n xdsDynamicGrid9_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid9_USERID.Size := 256;\r\n xdsDynamicGrid9NEW_RECORD.SetParentComponent(xdsDynamicGrid9);\r\n xdsDynamicGrid9NEW_RECORD.Name := 'xdsDynamicGrid9NEW_RECORD';\r\n xdsDynamicGrid9NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid9.SetParentComponent(Self);\r\n dsDynamicGrid9.Name := 'dsDynamicGrid9';\r\n dsDynamicGrid9.DataSet := xdsDynamicGrid9;\r\n dsDynamicGrid9.Left := 723;\r\n dsDynamicGrid9.Top := 136;\r\n xdsDynamicGrid10.SetParentComponent(Self);\r\n xdsDynamicGrid10.Name := 'xdsDynamicGrid10';\r\n xdsDynamicGrid10.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid10.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid10.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid10, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid10.Left := 843;\r\n xdsDynamicGrid10.Top := 96;\r\n xdsDynamicGrid10C1.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10C1.Name := 'xdsDynamicGrid10C1';\r\n xdsDynamicGrid10C1.FieldName := 'C1';\r\n xdsDynamicGrid10C1.Size := 1024;\r\n xdsDynamicGrid10C2.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10C2.Name := 'xdsDynamicGrid10C2';\r\n xdsDynamicGrid10C2.FieldName := 'C2';\r\n xdsDynamicGrid10C2.Size := 1024;\r\n xdsDynamicGrid10C3.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10C3.Name := 'xdsDynamicGrid10C3';\r\n xdsDynamicGrid10C3.FieldName := 'C3';\r\n xdsDynamicGrid10C3.Size := 1024;\r\n xdsDynamicGrid10C4.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10C4.Name := 'xdsDynamicGrid10C4';\r\n xdsDynamicGrid10C4.FieldName := 'C4';\r\n xdsDynamicGrid10C4.Size := 1024;\r\n xdsDynamicGrid10C5.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10C5.Name := 'xdsDynamicGrid10C5';\r\n xdsDynamicGrid10C5.FieldName := 'C5';\r\n xdsDynamicGrid10C5.Size := 1024;\r\n xdsDynamicGrid10C6.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10C6.Name := 'xdsDynamicGrid10C6';\r\n xdsDynamicGrid10C6.FieldName := 'C6';\r\n xdsDynamicGrid10C6.Size := 1024;\r\n xdsDynamicGrid10C7.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10C7.Name := 'xdsDynamicGrid10C7';\r\n xdsDynamicGrid10C7.FieldName := 'C7';\r\n xdsDynamicGrid10C7.Size := 1024;\r\n xdsDynamicGrid10C8.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10C8.Name := 'xdsDynamicGrid10C8';\r\n xdsDynamicGrid10C8.FieldName := 'C8';\r\n xdsDynamicGrid10C8.Size := 1024;\r\n xdsDynamicGrid10C9.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10C9.Name := 'xdsDynamicGrid10C9';\r\n xdsDynamicGrid10C9.FieldName := 'C9';\r\n xdsDynamicGrid10C9.Size := 1024;\r\n xdsDynamicGrid10C11.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10C11.Name := 'xdsDynamicGrid10C11';\r\n xdsDynamicGrid10C11.FieldName := 'C11';\r\n xdsDynamicGrid10C11.Size := 1024;\r\n xdsDynamicGrid10C10.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10C10.Name := 'xdsDynamicGrid10C10';\r\n xdsDynamicGrid10C10.FieldName := 'C10';\r\n xdsDynamicGrid10C10.Size := 1024;\r\n xdsDynamicGrid10C12.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10C12.Name := 'xdsDynamicGrid10C12';\r\n xdsDynamicGrid10C12.FieldName := 'C12';\r\n xdsDynamicGrid10C12.Size := 1024;\r\n xdsDynamicGrid10C13.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10C13.Name := 'xdsDynamicGrid10C13';\r\n xdsDynamicGrid10C13.FieldName := 'C13';\r\n xdsDynamicGrid10C13.Size := 1024;\r\n xdsDynamicGrid10C14.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10C14.Name := 'xdsDynamicGrid10C14';\r\n xdsDynamicGrid10C14.FieldName := 'C14';\r\n xdsDynamicGrid10C14.Size := 1024;\r\n xdsDynamicGrid10C15.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10C15.Name := 'xdsDynamicGrid10C15';\r\n xdsDynamicGrid10C15.FieldName := 'C15';\r\n xdsDynamicGrid10C15.Size := 1024;\r\n xdsDynamicGrid10C16.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10C16.Name := 'xdsDynamicGrid10C16';\r\n xdsDynamicGrid10C16.FieldName := 'C16';\r\n xdsDynamicGrid10C16.Size := 1024;\r\n xdsDynamicGrid10C17.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10C17.Name := 'xdsDynamicGrid10C17';\r\n xdsDynamicGrid10C17.FieldName := 'C17';\r\n xdsDynamicGrid10C17.Size := 1024;\r\n xdsDynamicGrid10C18.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10C18.Name := 'xdsDynamicGrid10C18';\r\n xdsDynamicGrid10C18.FieldName := 'C18';\r\n xdsDynamicGrid10C18.Size := 1024;\r\n xdsDynamicGrid10C19.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10C19.Name := 'xdsDynamicGrid10C19';\r\n xdsDynamicGrid10C19.FieldName := 'C19';\r\n xdsDynamicGrid10C19.Size := 1024;\r\n xdsDynamicGrid10C20.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10C20.Name := 'xdsDynamicGrid10C20';\r\n xdsDynamicGrid10C20.FieldName := 'C20';\r\n xdsDynamicGrid10C20.Size := 1024;\r\n xdsDynamicGrid10_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10_CURRENT_NURSE2.Name := 'xdsDynamicGrid10_CURRENT_NURSE2';\r\n xdsDynamicGrid10_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid10_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid10_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10_CURRENT_NURSE1.Name := 'xdsDynamicGrid10_CURRENT_NURSE1';\r\n xdsDynamicGrid10_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid10_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid10_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10_CURRENT_PROVIDER.Name := 'xdsDynamicGrid10_CURRENT_PROVIDER';\r\n xdsDynamicGrid10_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid10_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid10_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid10_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid10_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid10_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid10_CURRENT_MRN.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10_CURRENT_MRN.Name := 'xdsDynamicGrid10_CURRENT_MRN';\r\n xdsDynamicGrid10_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid10_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid10_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10_CURRENT_APPTNAME.Name := 'xdsDynamicGrid10_CURRENT_APPTNAME';\r\n xdsDynamicGrid10_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid10_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid10_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10_CURRENT_MEDID.Name := 'xdsDynamicGrid10_CURRENT_MEDID';\r\n xdsDynamicGrid10_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid10_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid10_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid10_CURRENT_PROBLEMID';\r\n xdsDynamicGrid10_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid10_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid10_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid10_CURRENT_ALLERGYID';\r\n xdsDynamicGrid10_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid10_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid10_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid10_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid10_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid10_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid10_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid10_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid10_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid10_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid10_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid10_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid10_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid10_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid10_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid10_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid10_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid10_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid10_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10_CURRENT_APPTDATE.Name := 'xdsDynamicGrid10_CURRENT_APPTDATE';\r\n xdsDynamicGrid10_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid10_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid10_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10_PATIENTFHIRID.Name := 'xdsDynamicGrid10_PATIENTFHIRID';\r\n xdsDynamicGrid10_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid10_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid10_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10_PATIENTCERNERID.Name := 'xdsDynamicGrid10_PATIENTCERNERID';\r\n xdsDynamicGrid10_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid10_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid10_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10_SETUPFACILITYID.Name := 'xdsDynamicGrid10_SETUPFACILITYID';\r\n xdsDynamicGrid10_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid10_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid10_USERID.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10_USERID.Name := 'xdsDynamicGrid10_USERID';\r\n xdsDynamicGrid10_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid10_USERID.Size := 256;\r\n xdsDynamicGrid10NEW_RECORD.SetParentComponent(xdsDynamicGrid10);\r\n xdsDynamicGrid10NEW_RECORD.Name := 'xdsDynamicGrid10NEW_RECORD';\r\n xdsDynamicGrid10NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid110.SetParentComponent(Self);\r\n dsDynamicGrid110.Name := 'dsDynamicGrid110';\r\n dsDynamicGrid110.DataSet := xdsDynamicGrid10;\r\n dsDynamicGrid110.Left := 843;\r\n dsDynamicGrid110.Top := 136;\r\n xdsDynamicGrid11.SetParentComponent(Self);\r\n xdsDynamicGrid11.Name := 'xdsDynamicGrid11';\r\n xdsDynamicGrid11.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid11.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid11.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid11, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid11.Left := 395;\r\n xdsDynamicGrid11.Top := 176;\r\n xdsDynamicGrid11C1.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11C1.Name := 'xdsDynamicGrid11C1';\r\n xdsDynamicGrid11C1.FieldName := 'C1';\r\n xdsDynamicGrid11C1.Size := 1024;\r\n xdsDynamicGrid11C2.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11C2.Name := 'xdsDynamicGrid11C2';\r\n xdsDynamicGrid11C2.FieldName := 'C2';\r\n xdsDynamicGrid11C2.Size := 1024;\r\n xdsDynamicGrid11C3.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11C3.Name := 'xdsDynamicGrid11C3';\r\n xdsDynamicGrid11C3.FieldName := 'C3';\r\n xdsDynamicGrid11C3.Size := 1024;\r\n xdsDynamicGrid11C4.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11C4.Name := 'xdsDynamicGrid11C4';\r\n xdsDynamicGrid11C4.FieldName := 'C4';\r\n xdsDynamicGrid11C4.Size := 1024;\r\n xdsDynamicGrid11C5.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11C5.Name := 'xdsDynamicGrid11C5';\r\n xdsDynamicGrid11C5.FieldName := 'C5';\r\n xdsDynamicGrid11C5.Size := 1024;\r\n xdsDynamicGrid11C6.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11C6.Name := 'xdsDynamicGrid11C6';\r\n xdsDynamicGrid11C6.FieldName := 'C6';\r\n xdsDynamicGrid11C6.Size := 1024;\r\n xdsDynamicGrid11C7.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11C7.Name := 'xdsDynamicGrid11C7';\r\n xdsDynamicGrid11C7.FieldName := 'C7';\r\n xdsDynamicGrid11C7.Size := 1024;\r\n xdsDynamicGrid11C8.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11C8.Name := 'xdsDynamicGrid11C8';\r\n xdsDynamicGrid11C8.FieldName := 'C8';\r\n xdsDynamicGrid11C8.Size := 1024;\r\n xdsDynamicGrid11C9.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11C9.Name := 'xdsDynamicGrid11C9';\r\n xdsDynamicGrid11C9.FieldName := 'C9';\r\n xdsDynamicGrid11C9.Size := 1024;\r\n xdsDynamicGrid11C11.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11C11.Name := 'xdsDynamicGrid11C11';\r\n xdsDynamicGrid11C11.FieldName := 'C11';\r\n xdsDynamicGrid11C11.Size := 1024;\r\n xdsDynamicGrid11C10.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11C10.Name := 'xdsDynamicGrid11C10';\r\n xdsDynamicGrid11C10.FieldName := 'C10';\r\n xdsDynamicGrid11C10.Size := 1024;\r\n xdsDynamicGrid11C12.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11C12.Name := 'xdsDynamicGrid11C12';\r\n xdsDynamicGrid11C12.FieldName := 'C12';\r\n xdsDynamicGrid11C12.Size := 1024;\r\n xdsDynamicGrid11C14.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11C14.Name := 'xdsDynamicGrid11C14';\r\n xdsDynamicGrid11C14.FieldName := 'C14';\r\n xdsDynamicGrid11C14.Size := 1024;\r\n xdsDynamicGrid11C15.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11C15.Name := 'xdsDynamicGrid11C15';\r\n xdsDynamicGrid11C15.FieldName := 'C15';\r\n xdsDynamicGrid11C15.Size := 1024;\r\n xdsDynamicGrid11C13.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11C13.Name := 'xdsDynamicGrid11C13';\r\n xdsDynamicGrid11C13.FieldName := 'C13';\r\n xdsDynamicGrid11C13.Size := 1024;\r\n xdsDynamicGrid11C16.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11C16.Name := 'xdsDynamicGrid11C16';\r\n xdsDynamicGrid11C16.FieldName := 'C16';\r\n xdsDynamicGrid11C16.Size := 1024;\r\n xdsDynamicGrid11C17.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11C17.Name := 'xdsDynamicGrid11C17';\r\n xdsDynamicGrid11C17.FieldName := 'C17';\r\n xdsDynamicGrid11C17.Size := 1024;\r\n xdsDynamicGrid11C18.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11C18.Name := 'xdsDynamicGrid11C18';\r\n xdsDynamicGrid11C18.FieldName := 'C18';\r\n xdsDynamicGrid11C18.Size := 1024;\r\n xdsDynamicGrid11C19.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11C19.Name := 'xdsDynamicGrid11C19';\r\n xdsDynamicGrid11C19.FieldName := 'C19';\r\n xdsDynamicGrid11C19.Size := 1024;\r\n xdsDynamicGrid11C20.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11C20.Name := 'xdsDynamicGrid11C20';\r\n xdsDynamicGrid11C20.FieldName := 'C20';\r\n xdsDynamicGrid11C20.Size := 1024;\r\n xdsDynamicGrid11_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11_CURRENT_NURSE2.Name := 'xdsDynamicGrid11_CURRENT_NURSE2';\r\n xdsDynamicGrid11_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid11_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid11_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11_CURRENT_NURSE1.Name := 'xdsDynamicGrid11_CURRENT_NURSE1';\r\n xdsDynamicGrid11_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid11_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid11_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11_CURRENT_PROVIDER.Name := 'xdsDynamicGrid11_CURRENT_PROVIDER';\r\n xdsDynamicGrid11_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid11_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid11_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid11_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid11_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid11_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid11_CURRENT_MRN.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11_CURRENT_MRN.Name := 'xdsDynamicGrid11_CURRENT_MRN';\r\n xdsDynamicGrid11_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid11_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid11_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11_CURRENT_APPTNAME.Name := 'xdsDynamicGrid11_CURRENT_APPTNAME';\r\n xdsDynamicGrid11_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid11_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid11_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11_CURRENT_MEDID.Name := 'xdsDynamicGrid11_CURRENT_MEDID';\r\n xdsDynamicGrid11_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid11_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid11_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid11_CURRENT_PROBLEMID';\r\n xdsDynamicGrid11_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid11_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid11_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid11_CURRENT_ALLERGYID';\r\n xdsDynamicGrid11_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid11_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid11_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid11_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid11_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid11_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid11_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid11_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid11_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid11_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid11_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid11_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid11_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid11_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid11_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid11_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid11_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid11_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid11_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11_CURRENT_APPTDATE.Name := 'xdsDynamicGrid11_CURRENT_APPTDATE';\r\n xdsDynamicGrid11_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid11_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid11_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11_PATIENTFHIRID.Name := 'xdsDynamicGrid11_PATIENTFHIRID';\r\n xdsDynamicGrid11_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid11_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid11_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11_PATIENTCERNERID.Name := 'xdsDynamicGrid11_PATIENTCERNERID';\r\n xdsDynamicGrid11_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid11_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid11_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11_SETUPFACILITYID.Name := 'xdsDynamicGrid11_SETUPFACILITYID';\r\n xdsDynamicGrid11_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid11_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid11_USERID.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11_USERID.Name := 'xdsDynamicGrid11_USERID';\r\n xdsDynamicGrid11_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid11_USERID.Size := 256;\r\n xdsDynamicGrid11NEW_RECORD.SetParentComponent(xdsDynamicGrid11);\r\n xdsDynamicGrid11NEW_RECORD.Name := 'xdsDynamicGrid11NEW_RECORD';\r\n xdsDynamicGrid11NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid11.SetParentComponent(Self);\r\n dsDynamicGrid11.Name := 'dsDynamicGrid11';\r\n dsDynamicGrid11.DataSet := xdsDynamicGrid11;\r\n dsDynamicGrid11.Left := 395;\r\n dsDynamicGrid11.Top := 224;\r\n xdsDynamicGrid12.SetParentComponent(Self);\r\n xdsDynamicGrid12.Name := 'xdsDynamicGrid12';\r\n xdsDynamicGrid12.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid12.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid12.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid12, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid12.Left := 491;\r\n xdsDynamicGrid12.Top := 176;\r\n xdsDynamicGrid12C1.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12C1.Name := 'xdsDynamicGrid12C1';\r\n xdsDynamicGrid12C1.FieldName := 'C1';\r\n xdsDynamicGrid12C1.Size := 1024;\r\n xdsDynamicGrid12C2.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12C2.Name := 'xdsDynamicGrid12C2';\r\n xdsDynamicGrid12C2.FieldName := 'C2';\r\n xdsDynamicGrid12C2.Size := 1024;\r\n xdsDynamicGrid12C3.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12C3.Name := 'xdsDynamicGrid12C3';\r\n xdsDynamicGrid12C3.FieldName := 'C3';\r\n xdsDynamicGrid12C3.Size := 1024;\r\n xdsDynamicGrid12C4.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12C4.Name := 'xdsDynamicGrid12C4';\r\n xdsDynamicGrid12C4.FieldName := 'C4';\r\n xdsDynamicGrid12C4.Size := 1024;\r\n xdsDynamicGrid12C5.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12C5.Name := 'xdsDynamicGrid12C5';\r\n xdsDynamicGrid12C5.FieldName := 'C5';\r\n xdsDynamicGrid12C5.Size := 1024;\r\n xdsDynamicGrid12C6.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12C6.Name := 'xdsDynamicGrid12C6';\r\n xdsDynamicGrid12C6.FieldName := 'C6';\r\n xdsDynamicGrid12C6.Size := 1024;\r\n xdsDynamicGrid12C7.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12C7.Name := 'xdsDynamicGrid12C7';\r\n xdsDynamicGrid12C7.FieldName := 'C7';\r\n xdsDynamicGrid12C7.Size := 1024;\r\n xdsDynamicGrid12C8.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12C8.Name := 'xdsDynamicGrid12C8';\r\n xdsDynamicGrid12C8.FieldName := 'C8';\r\n xdsDynamicGrid12C8.Size := 1024;\r\n xdsDynamicGrid12C9.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12C9.Name := 'xdsDynamicGrid12C9';\r\n xdsDynamicGrid12C9.FieldName := 'C9';\r\n xdsDynamicGrid12C9.Size := 1024;\r\n xdsDynamicGrid12C11.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12C11.Name := 'xdsDynamicGrid12C11';\r\n xdsDynamicGrid12C11.FieldName := 'C11';\r\n xdsDynamicGrid12C11.Size := 1024;\r\n xdsDynamicGrid12C10.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12C10.Name := 'xdsDynamicGrid12C10';\r\n xdsDynamicGrid12C10.FieldName := 'C10';\r\n xdsDynamicGrid12C10.Size := 1024;\r\n xdsDynamicGrid12C12.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12C12.Name := 'xdsDynamicGrid12C12';\r\n xdsDynamicGrid12C12.FieldName := 'C12';\r\n xdsDynamicGrid12C12.Size := 1024;\r\n xdsDynamicGrid12C14.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12C14.Name := 'xdsDynamicGrid12C14';\r\n xdsDynamicGrid12C14.FieldName := 'C14';\r\n xdsDynamicGrid12C14.Size := 1024;\r\n xdsDynamicGrid12C15.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12C15.Name := 'xdsDynamicGrid12C15';\r\n xdsDynamicGrid12C15.FieldName := 'C15';\r\n xdsDynamicGrid12C15.Size := 1024;\r\n xdsDynamicGrid12C13.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12C13.Name := 'xdsDynamicGrid12C13';\r\n xdsDynamicGrid12C13.FieldName := 'C13';\r\n xdsDynamicGrid12C13.Size := 1024;\r\n xdsDynamicGrid12C16.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12C16.Name := 'xdsDynamicGrid12C16';\r\n xdsDynamicGrid12C16.FieldName := 'C16';\r\n xdsDynamicGrid12C16.Size := 1024;\r\n xdsDynamicGrid12C17.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12C17.Name := 'xdsDynamicGrid12C17';\r\n xdsDynamicGrid12C17.FieldName := 'C17';\r\n xdsDynamicGrid12C17.Size := 1024;\r\n xdsDynamicGrid12C18.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12C18.Name := 'xdsDynamicGrid12C18';\r\n xdsDynamicGrid12C18.FieldName := 'C18';\r\n xdsDynamicGrid12C18.Size := 1024;\r\n xdsDynamicGrid12C19.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12C19.Name := 'xdsDynamicGrid12C19';\r\n xdsDynamicGrid12C19.FieldName := 'C19';\r\n xdsDynamicGrid12C19.Size := 1024;\r\n xdsDynamicGrid12C20.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12C20.Name := 'xdsDynamicGrid12C20';\r\n xdsDynamicGrid12C20.FieldName := 'C20';\r\n xdsDynamicGrid12C20.Size := 1024;\r\n xdsDynamicGrid12_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12_CURRENT_NURSE2.Name := 'xdsDynamicGrid12_CURRENT_NURSE2';\r\n xdsDynamicGrid12_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid12_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid12_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12_CURRENT_NURSE1.Name := 'xdsDynamicGrid12_CURRENT_NURSE1';\r\n xdsDynamicGrid12_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid12_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid12_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12_CURRENT_PROVIDER.Name := 'xdsDynamicGrid12_CURRENT_PROVIDER';\r\n xdsDynamicGrid12_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid12_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid12_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid12_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid12_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid12_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid12_CURRENT_MRN.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12_CURRENT_MRN.Name := 'xdsDynamicGrid12_CURRENT_MRN';\r\n xdsDynamicGrid12_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid12_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid12_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12_CURRENT_APPTNAME.Name := 'xdsDynamicGrid12_CURRENT_APPTNAME';\r\n xdsDynamicGrid12_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid12_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid12_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12_CURRENT_MEDID.Name := 'xdsDynamicGrid12_CURRENT_MEDID';\r\n xdsDynamicGrid12_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid12_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid12_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid12_CURRENT_PROBLEMID';\r\n xdsDynamicGrid12_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid12_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid12_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid12_CURRENT_ALLERGYID';\r\n xdsDynamicGrid12_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid12_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid12_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid12_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid12_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid12_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid12_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid12_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid12_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid12_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid12_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid12_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid12_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid12_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid12_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid12_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid12_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid12_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid12_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12_CURRENT_APPTDATE.Name := 'xdsDynamicGrid12_CURRENT_APPTDATE';\r\n xdsDynamicGrid12_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid12_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid12_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12_PATIENTFHIRID.Name := 'xdsDynamicGrid12_PATIENTFHIRID';\r\n xdsDynamicGrid12_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid12_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid12_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12_PATIENTCERNERID.Name := 'xdsDynamicGrid12_PATIENTCERNERID';\r\n xdsDynamicGrid12_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid12_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid12_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12_SETUPFACILITYID.Name := 'xdsDynamicGrid12_SETUPFACILITYID';\r\n xdsDynamicGrid12_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid12_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid12_USERID.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12_USERID.Name := 'xdsDynamicGrid12_USERID';\r\n xdsDynamicGrid12_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid12_USERID.Size := 256;\r\n xdsDynamicGrid12NEW_RECORD.SetParentComponent(xdsDynamicGrid12);\r\n xdsDynamicGrid12NEW_RECORD.Name := 'xdsDynamicGrid12NEW_RECORD';\r\n xdsDynamicGrid12NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid12.SetParentComponent(Self);\r\n dsDynamicGrid12.Name := 'dsDynamicGrid12';\r\n dsDynamicGrid12.DataSet := xdsDynamicGrid12;\r\n dsDynamicGrid12.Left := 491;\r\n dsDynamicGrid12.Top := 224;\r\n xdsDynamicGrid13.SetParentComponent(Self);\r\n xdsDynamicGrid13.Name := 'xdsDynamicGrid13';\r\n xdsDynamicGrid13.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid13.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid13.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid13, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid13.Left := 611;\r\n xdsDynamicGrid13.Top := 176;\r\n xdsDynamicGrid13C1.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13C1.Name := 'xdsDynamicGrid13C1';\r\n xdsDynamicGrid13C1.FieldName := 'C1';\r\n xdsDynamicGrid13C1.Size := 1024;\r\n xdsDynamicGrid13C2.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13C2.Name := 'xdsDynamicGrid13C2';\r\n xdsDynamicGrid13C2.FieldName := 'C2';\r\n xdsDynamicGrid13C2.Size := 1024;\r\n xdsDynamicGrid13C3.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13C3.Name := 'xdsDynamicGrid13C3';\r\n xdsDynamicGrid13C3.FieldName := 'C3';\r\n xdsDynamicGrid13C3.Size := 1024;\r\n xdsDynamicGrid13C4.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13C4.Name := 'xdsDynamicGrid13C4';\r\n xdsDynamicGrid13C4.FieldName := 'C4';\r\n xdsDynamicGrid13C4.Size := 1024;\r\n xdsDynamicGrid13C5.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13C5.Name := 'xdsDynamicGrid13C5';\r\n xdsDynamicGrid13C5.FieldName := 'C5';\r\n xdsDynamicGrid13C5.Size := 1024;\r\n xdsDynamicGrid13C6.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13C6.Name := 'xdsDynamicGrid13C6';\r\n xdsDynamicGrid13C6.FieldName := 'C6';\r\n xdsDynamicGrid13C6.Size := 1024;\r\n xdsDynamicGrid13C7.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13C7.Name := 'xdsDynamicGrid13C7';\r\n xdsDynamicGrid13C7.FieldName := 'C7';\r\n xdsDynamicGrid13C7.Size := 1024;\r\n xdsDynamicGrid13C8.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13C8.Name := 'xdsDynamicGrid13C8';\r\n xdsDynamicGrid13C8.FieldName := 'C8';\r\n xdsDynamicGrid13C8.Size := 1024;\r\n xdsDynamicGrid13C9.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13C9.Name := 'xdsDynamicGrid13C9';\r\n xdsDynamicGrid13C9.FieldName := 'C9';\r\n xdsDynamicGrid13C9.Size := 1024;\r\n xdsDynamicGrid13C11.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13C11.Name := 'xdsDynamicGrid13C11';\r\n xdsDynamicGrid13C11.FieldName := 'C11';\r\n xdsDynamicGrid13C11.Size := 1024;\r\n xdsDynamicGrid13C10.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13C10.Name := 'xdsDynamicGrid13C10';\r\n xdsDynamicGrid13C10.FieldName := 'C10';\r\n xdsDynamicGrid13C10.Size := 1024;\r\n xdsDynamicGrid13C12.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13C12.Name := 'xdsDynamicGrid13C12';\r\n xdsDynamicGrid13C12.FieldName := 'C12';\r\n xdsDynamicGrid13C12.Size := 1024;\r\n xdsDynamicGrid13C14.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13C14.Name := 'xdsDynamicGrid13C14';\r\n xdsDynamicGrid13C14.FieldName := 'C14';\r\n xdsDynamicGrid13C14.Size := 1024;\r\n xdsDynamicGrid13C15.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13C15.Name := 'xdsDynamicGrid13C15';\r\n xdsDynamicGrid13C15.FieldName := 'C15';\r\n xdsDynamicGrid13C15.Size := 1024;\r\n xdsDynamicGrid13C13.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13C13.Name := 'xdsDynamicGrid13C13';\r\n xdsDynamicGrid13C13.FieldName := 'C13';\r\n xdsDynamicGrid13C13.Size := 1024;\r\n xdsDynamicGrid13C16.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13C16.Name := 'xdsDynamicGrid13C16';\r\n xdsDynamicGrid13C16.FieldName := 'C16';\r\n xdsDynamicGrid13C16.Size := 1024;\r\n xdsDynamicGrid13C17.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13C17.Name := 'xdsDynamicGrid13C17';\r\n xdsDynamicGrid13C17.FieldName := 'C17';\r\n xdsDynamicGrid13C17.Size := 1024;\r\n xdsDynamicGrid13C18.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13C18.Name := 'xdsDynamicGrid13C18';\r\n xdsDynamicGrid13C18.FieldName := 'C18';\r\n xdsDynamicGrid13C18.Size := 1024;\r\n xdsDynamicGrid13C19.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13C19.Name := 'xdsDynamicGrid13C19';\r\n xdsDynamicGrid13C19.FieldName := 'C19';\r\n xdsDynamicGrid13C19.Size := 1024;\r\n xdsDynamicGrid13C20.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13C20.Name := 'xdsDynamicGrid13C20';\r\n xdsDynamicGrid13C20.FieldName := 'C20';\r\n xdsDynamicGrid13C20.Size := 1024;\r\n xdsDynamicGrid13_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13_CURRENT_NURSE2.Name := 'xdsDynamicGrid13_CURRENT_NURSE2';\r\n xdsDynamicGrid13_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid13_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid13_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13_CURRENT_NURSE1.Name := 'xdsDynamicGrid13_CURRENT_NURSE1';\r\n xdsDynamicGrid13_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid13_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid13_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13_CURRENT_PROVIDER.Name := 'xdsDynamicGrid13_CURRENT_PROVIDER';\r\n xdsDynamicGrid13_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid13_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid13_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid13_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid13_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid13_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid13_CURRENT_MRN.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13_CURRENT_MRN.Name := 'xdsDynamicGrid13_CURRENT_MRN';\r\n xdsDynamicGrid13_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid13_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid13_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13_CURRENT_APPTNAME.Name := 'xdsDynamicGrid13_CURRENT_APPTNAME';\r\n xdsDynamicGrid13_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid13_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid13_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13_CURRENT_MEDID.Name := 'xdsDynamicGrid13_CURRENT_MEDID';\r\n xdsDynamicGrid13_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid13_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid13_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid13_CURRENT_PROBLEMID';\r\n xdsDynamicGrid13_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid13_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid13_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid13_CURRENT_ALLERGYID';\r\n xdsDynamicGrid13_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid13_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid13_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid13_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid13_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid13_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid13_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid13_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid13_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid13_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid13_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid13_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid13_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid13_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid13_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid13_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid13_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid13_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid13_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13_CURRENT_APPTDATE.Name := 'xdsDynamicGrid13_CURRENT_APPTDATE';\r\n xdsDynamicGrid13_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid13_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid13_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13_PATIENTFHIRID.Name := 'xdsDynamicGrid13_PATIENTFHIRID';\r\n xdsDynamicGrid13_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid13_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid13_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13_PATIENTCERNERID.Name := 'xdsDynamicGrid13_PATIENTCERNERID';\r\n xdsDynamicGrid13_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid13_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid13_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13_SETUPFACILITYID.Name := 'xdsDynamicGrid13_SETUPFACILITYID';\r\n xdsDynamicGrid13_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid13_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid13_USERID.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13_USERID.Name := 'xdsDynamicGrid13_USERID';\r\n xdsDynamicGrid13_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid13_USERID.Size := 256;\r\n xdsDynamicGrid13NEW_RECORD.SetParentComponent(xdsDynamicGrid13);\r\n xdsDynamicGrid13NEW_RECORD.Name := 'xdsDynamicGrid13NEW_RECORD';\r\n xdsDynamicGrid13NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid13.SetParentComponent(Self);\r\n dsDynamicGrid13.Name := 'dsDynamicGrid13';\r\n dsDynamicGrid13.DataSet := xdsDynamicGrid13;\r\n dsDynamicGrid13.Left := 611;\r\n dsDynamicGrid13.Top := 224;\r\n xdsDynamicGrid14.SetParentComponent(Self);\r\n xdsDynamicGrid14.Name := 'xdsDynamicGrid14';\r\n xdsDynamicGrid14.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid14.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid14.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid14, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid14.Left := 723;\r\n xdsDynamicGrid14.Top := 176;\r\n xdsDynamicGrid14C1.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14C1.Name := 'xdsDynamicGrid14C1';\r\n xdsDynamicGrid14C1.FieldName := 'C1';\r\n xdsDynamicGrid14C1.Size := 1024;\r\n xdsDynamicGrid14C2.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14C2.Name := 'xdsDynamicGrid14C2';\r\n xdsDynamicGrid14C2.FieldName := 'C2';\r\n xdsDynamicGrid14C2.Size := 1024;\r\n xdsDynamicGrid14C3.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14C3.Name := 'xdsDynamicGrid14C3';\r\n xdsDynamicGrid14C3.FieldName := 'C3';\r\n xdsDynamicGrid14C3.Size := 1024;\r\n xdsDynamicGrid14C4.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14C4.Name := 'xdsDynamicGrid14C4';\r\n xdsDynamicGrid14C4.FieldName := 'C4';\r\n xdsDynamicGrid14C4.Size := 1024;\r\n xdsDynamicGrid14C5.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14C5.Name := 'xdsDynamicGrid14C5';\r\n xdsDynamicGrid14C5.FieldName := 'C5';\r\n xdsDynamicGrid14C5.Size := 1024;\r\n xdsDynamicGrid14C6.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14C6.Name := 'xdsDynamicGrid14C6';\r\n xdsDynamicGrid14C6.FieldName := 'C6';\r\n xdsDynamicGrid14C6.Size := 1024;\r\n xdsDynamicGrid14C7.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14C7.Name := 'xdsDynamicGrid14C7';\r\n xdsDynamicGrid14C7.FieldName := 'C7';\r\n xdsDynamicGrid14C7.Size := 1024;\r\n xdsDynamicGrid14C8.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14C8.Name := 'xdsDynamicGrid14C8';\r\n xdsDynamicGrid14C8.FieldName := 'C8';\r\n xdsDynamicGrid14C8.Size := 1024;\r\n xdsDynamicGrid14C9.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14C9.Name := 'xdsDynamicGrid14C9';\r\n xdsDynamicGrid14C9.FieldName := 'C9';\r\n xdsDynamicGrid14C9.Size := 1024;\r\n xdsDynamicGrid14C11.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14C11.Name := 'xdsDynamicGrid14C11';\r\n xdsDynamicGrid14C11.FieldName := 'C11';\r\n xdsDynamicGrid14C11.Size := 1024;\r\n xdsDynamicGrid14C10.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14C10.Name := 'xdsDynamicGrid14C10';\r\n xdsDynamicGrid14C10.FieldName := 'C10';\r\n xdsDynamicGrid14C10.Size := 1024;\r\n xdsDynamicGrid14C12.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14C12.Name := 'xdsDynamicGrid14C12';\r\n xdsDynamicGrid14C12.FieldName := 'C12';\r\n xdsDynamicGrid14C12.Size := 1024;\r\n xdsDynamicGrid14C14.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14C14.Name := 'xdsDynamicGrid14C14';\r\n xdsDynamicGrid14C14.FieldName := 'C14';\r\n xdsDynamicGrid14C14.Size := 1024;\r\n xdsDynamicGrid14C15.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14C15.Name := 'xdsDynamicGrid14C15';\r\n xdsDynamicGrid14C15.FieldName := 'C15';\r\n xdsDynamicGrid14C15.Size := 1024;\r\n xdsDynamicGrid14C13.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14C13.Name := 'xdsDynamicGrid14C13';\r\n xdsDynamicGrid14C13.FieldName := 'C13';\r\n xdsDynamicGrid14C13.Size := 1024;\r\n xdsDynamicGrid14C16.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14C16.Name := 'xdsDynamicGrid14C16';\r\n xdsDynamicGrid14C16.FieldName := 'C16';\r\n xdsDynamicGrid14C16.Size := 1024;\r\n xdsDynamicGrid14C17.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14C17.Name := 'xdsDynamicGrid14C17';\r\n xdsDynamicGrid14C17.FieldName := 'C17';\r\n xdsDynamicGrid14C17.Size := 1024;\r\n xdsDynamicGrid14C18.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14C18.Name := 'xdsDynamicGrid14C18';\r\n xdsDynamicGrid14C18.FieldName := 'C18';\r\n xdsDynamicGrid14C18.Size := 1024;\r\n xdsDynamicGrid14C19.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14C19.Name := 'xdsDynamicGrid14C19';\r\n xdsDynamicGrid14C19.FieldName := 'C19';\r\n xdsDynamicGrid14C19.Size := 1024;\r\n xdsDynamicGrid14C20.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14C20.Name := 'xdsDynamicGrid14C20';\r\n xdsDynamicGrid14C20.FieldName := 'C20';\r\n xdsDynamicGrid14C20.Size := 1024;\r\n xdsDynamicGrid14_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14_CURRENT_NURSE2.Name := 'xdsDynamicGrid14_CURRENT_NURSE2';\r\n xdsDynamicGrid14_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid14_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid14_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14_CURRENT_NURSE1.Name := 'xdsDynamicGrid14_CURRENT_NURSE1';\r\n xdsDynamicGrid14_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid14_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid14_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14_CURRENT_PROVIDER.Name := 'xdsDynamicGrid14_CURRENT_PROVIDER';\r\n xdsDynamicGrid14_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid14_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid14_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid14_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid14_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid14_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid14_CURRENT_MRN.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14_CURRENT_MRN.Name := 'xdsDynamicGrid14_CURRENT_MRN';\r\n xdsDynamicGrid14_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid14_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid14_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14_CURRENT_APPTNAME.Name := 'xdsDynamicGrid14_CURRENT_APPTNAME';\r\n xdsDynamicGrid14_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid14_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid14_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14_CURRENT_MEDID.Name := 'xdsDynamicGrid14_CURRENT_MEDID';\r\n xdsDynamicGrid14_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid14_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid14_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid14_CURRENT_PROBLEMID';\r\n xdsDynamicGrid14_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid14_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid14_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid14_CURRENT_ALLERGYID';\r\n xdsDynamicGrid14_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid14_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid14_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid14_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid14_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid14_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid14_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid14_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid14_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid14_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid14_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid14_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid14_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid14_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid14_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid14_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid14_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid14_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid14_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14_CURRENT_APPTDATE.Name := 'xdsDynamicGrid14_CURRENT_APPTDATE';\r\n xdsDynamicGrid14_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid14_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid14_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14_PATIENTFHIRID.Name := 'xdsDynamicGrid14_PATIENTFHIRID';\r\n xdsDynamicGrid14_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid14_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid14_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14_PATIENTCERNERID.Name := 'xdsDynamicGrid14_PATIENTCERNERID';\r\n xdsDynamicGrid14_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid14_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid14_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14_SETUPFACILITYID.Name := 'xdsDynamicGrid14_SETUPFACILITYID';\r\n xdsDynamicGrid14_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid14_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid14_USERID.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14_USERID.Name := 'xdsDynamicGrid14_USERID';\r\n xdsDynamicGrid14_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid14_USERID.Size := 256;\r\n xdsDynamicGrid14NEW_RECORD.SetParentComponent(xdsDynamicGrid14);\r\n xdsDynamicGrid14NEW_RECORD.Name := 'xdsDynamicGrid14NEW_RECORD';\r\n xdsDynamicGrid14NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid14.SetParentComponent(Self);\r\n dsDynamicGrid14.Name := 'dsDynamicGrid14';\r\n dsDynamicGrid14.DataSet := xdsDynamicGrid14;\r\n dsDynamicGrid14.Left := 723;\r\n dsDynamicGrid14.Top := 224;\r\n xdsDynamicGrid15.SetParentComponent(Self);\r\n xdsDynamicGrid15.Name := 'xdsDynamicGrid15';\r\n xdsDynamicGrid15.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid15.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid15.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid15, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid15.Left := 843;\r\n xdsDynamicGrid15.Top := 176;\r\n xdsDynamicGrid15C1.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15C1.Name := 'xdsDynamicGrid15C1';\r\n xdsDynamicGrid15C1.FieldName := 'C1';\r\n xdsDynamicGrid15C1.Size := 1024;\r\n xdsDynamicGrid15C2.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15C2.Name := 'xdsDynamicGrid15C2';\r\n xdsDynamicGrid15C2.FieldName := 'C2';\r\n xdsDynamicGrid15C2.Size := 1024;\r\n xdsDynamicGrid15C3.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15C3.Name := 'xdsDynamicGrid15C3';\r\n xdsDynamicGrid15C3.FieldName := 'C3';\r\n xdsDynamicGrid15C3.Size := 1024;\r\n xdsDynamicGrid15C4.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15C4.Name := 'xdsDynamicGrid15C4';\r\n xdsDynamicGrid15C4.FieldName := 'C4';\r\n xdsDynamicGrid15C4.Size := 1024;\r\n xdsDynamicGrid15C5.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15C5.Name := 'xdsDynamicGrid15C5';\r\n xdsDynamicGrid15C5.FieldName := 'C5';\r\n xdsDynamicGrid15C5.Size := 1024;\r\n xdsDynamicGrid15C6.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15C6.Name := 'xdsDynamicGrid15C6';\r\n xdsDynamicGrid15C6.FieldName := 'C6';\r\n xdsDynamicGrid15C6.Size := 1024;\r\n xdsDynamicGrid15C7.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15C7.Name := 'xdsDynamicGrid15C7';\r\n xdsDynamicGrid15C7.FieldName := 'C7';\r\n xdsDynamicGrid15C7.Size := 1024;\r\n xdsDynamicGrid15C8.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15C8.Name := 'xdsDynamicGrid15C8';\r\n xdsDynamicGrid15C8.FieldName := 'C8';\r\n xdsDynamicGrid15C8.Size := 1024;\r\n xdsDynamicGrid15C9.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15C9.Name := 'xdsDynamicGrid15C9';\r\n xdsDynamicGrid15C9.FieldName := 'C9';\r\n xdsDynamicGrid15C9.Size := 1024;\r\n xdsDynamicGrid15C11.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15C11.Name := 'xdsDynamicGrid15C11';\r\n xdsDynamicGrid15C11.FieldName := 'C11';\r\n xdsDynamicGrid15C11.Size := 1024;\r\n xdsDynamicGrid15C10.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15C10.Name := 'xdsDynamicGrid15C10';\r\n xdsDynamicGrid15C10.FieldName := 'C10';\r\n xdsDynamicGrid15C10.Size := 1024;\r\n xdsDynamicGrid15C12.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15C12.Name := 'xdsDynamicGrid15C12';\r\n xdsDynamicGrid15C12.FieldName := 'C12';\r\n xdsDynamicGrid15C12.Size := 1024;\r\n xdsDynamicGrid15C14.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15C14.Name := 'xdsDynamicGrid15C14';\r\n xdsDynamicGrid15C14.FieldName := 'C14';\r\n xdsDynamicGrid15C14.Size := 1024;\r\n xdsDynamicGrid15C15.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15C15.Name := 'xdsDynamicGrid15C15';\r\n xdsDynamicGrid15C15.FieldName := 'C15';\r\n xdsDynamicGrid15C15.Size := 1024;\r\n xdsDynamicGrid15C13.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15C13.Name := 'xdsDynamicGrid15C13';\r\n xdsDynamicGrid15C13.FieldName := 'C13';\r\n xdsDynamicGrid15C13.Size := 1024;\r\n xdsDynamicGrid15C16.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15C16.Name := 'xdsDynamicGrid15C16';\r\n xdsDynamicGrid15C16.FieldName := 'C16';\r\n xdsDynamicGrid15C16.Size := 1024;\r\n xdsDynamicGrid15C17.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15C17.Name := 'xdsDynamicGrid15C17';\r\n xdsDynamicGrid15C17.FieldName := 'C17';\r\n xdsDynamicGrid15C17.Size := 1024;\r\n xdsDynamicGrid15C18.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15C18.Name := 'xdsDynamicGrid15C18';\r\n xdsDynamicGrid15C18.FieldName := 'C18';\r\n xdsDynamicGrid15C18.Size := 1024;\r\n xdsDynamicGrid15C19.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15C19.Name := 'xdsDynamicGrid15C19';\r\n xdsDynamicGrid15C19.FieldName := 'C19';\r\n xdsDynamicGrid15C19.Size := 1024;\r\n xdsDynamicGrid15C20.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15C20.Name := 'xdsDynamicGrid15C20';\r\n xdsDynamicGrid15C20.FieldName := 'C20';\r\n xdsDynamicGrid15C20.Size := 1024;\r\n xdsDynamicGrid15_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15_CURRENT_NURSE2.Name := 'xdsDynamicGrid15_CURRENT_NURSE2';\r\n xdsDynamicGrid15_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid15_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid15_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15_CURRENT_NURSE1.Name := 'xdsDynamicGrid15_CURRENT_NURSE1';\r\n xdsDynamicGrid15_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid15_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid15_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15_CURRENT_PROVIDER.Name := 'xdsDynamicGrid15_CURRENT_PROVIDER';\r\n xdsDynamicGrid15_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid15_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid15_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid15_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid15_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid15_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid15_CURRENT_MRN.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15_CURRENT_MRN.Name := 'xdsDynamicGrid15_CURRENT_MRN';\r\n xdsDynamicGrid15_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid15_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid15_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15_CURRENT_APPTNAME.Name := 'xdsDynamicGrid15_CURRENT_APPTNAME';\r\n xdsDynamicGrid15_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid15_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid15_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15_CURRENT_MEDID.Name := 'xdsDynamicGrid15_CURRENT_MEDID';\r\n xdsDynamicGrid15_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid15_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid15_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid15_CURRENT_PROBLEMID';\r\n xdsDynamicGrid15_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid15_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid15_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid15_CURRENT_ALLERGYID';\r\n xdsDynamicGrid15_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid15_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid15_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid15_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid15_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid15_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid15_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid15_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid15_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid15_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid15_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid15_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid15_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid15_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid15_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid15_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid15_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid15_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid15_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15_CURRENT_APPTDATE.Name := 'xdsDynamicGrid15_CURRENT_APPTDATE';\r\n xdsDynamicGrid15_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid15_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid15_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15_PATIENTFHIRID.Name := 'xdsDynamicGrid15_PATIENTFHIRID';\r\n xdsDynamicGrid15_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid15_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid15_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15_PATIENTCERNERID.Name := 'xdsDynamicGrid15_PATIENTCERNERID';\r\n xdsDynamicGrid15_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid15_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid15_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15_SETUPFACILITYID.Name := 'xdsDynamicGrid15_SETUPFACILITYID';\r\n xdsDynamicGrid15_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid15_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid15_USERID.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15_USERID.Name := 'xdsDynamicGrid15_USERID';\r\n xdsDynamicGrid15_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid15_USERID.Size := 256;\r\n xdsDynamicGrid15NEW_RECORD.SetParentComponent(xdsDynamicGrid15);\r\n xdsDynamicGrid15NEW_RECORD.Name := 'xdsDynamicGrid15NEW_RECORD';\r\n xdsDynamicGrid15NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid15.SetParentComponent(Self);\r\n dsDynamicGrid15.Name := 'dsDynamicGrid15';\r\n dsDynamicGrid15.DataSet := xdsDynamicGrid15;\r\n dsDynamicGrid15.Left := 843;\r\n dsDynamicGrid15.Top := 224;\r\n xdsDynamicGrid16.SetParentComponent(Self);\r\n xdsDynamicGrid16.Name := 'xdsDynamicGrid16';\r\n xdsDynamicGrid16.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid16.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid16.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid16, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid16.Left := 395;\r\n xdsDynamicGrid16.Top := 264;\r\n xdsDynamicGrid16C1.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16C1.Name := 'xdsDynamicGrid16C1';\r\n xdsDynamicGrid16C1.FieldName := 'C1';\r\n xdsDynamicGrid16C1.Size := 1024;\r\n xdsDynamicGrid16C2.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16C2.Name := 'xdsDynamicGrid16C2';\r\n xdsDynamicGrid16C2.FieldName := 'C2';\r\n xdsDynamicGrid16C2.Size := 1024;\r\n xdsDynamicGrid16C3.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16C3.Name := 'xdsDynamicGrid16C3';\r\n xdsDynamicGrid16C3.FieldName := 'C3';\r\n xdsDynamicGrid16C3.Size := 1024;\r\n xdsDynamicGrid16C4.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16C4.Name := 'xdsDynamicGrid16C4';\r\n xdsDynamicGrid16C4.FieldName := 'C4';\r\n xdsDynamicGrid16C4.Size := 1024;\r\n xdsDynamicGrid16C5.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16C5.Name := 'xdsDynamicGrid16C5';\r\n xdsDynamicGrid16C5.FieldName := 'C5';\r\n xdsDynamicGrid16C5.Size := 1024;\r\n xdsDynamicGrid16C6.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16C6.Name := 'xdsDynamicGrid16C6';\r\n xdsDynamicGrid16C6.FieldName := 'C6';\r\n xdsDynamicGrid16C6.Size := 1024;\r\n xdsDynamicGrid16C7.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16C7.Name := 'xdsDynamicGrid16C7';\r\n xdsDynamicGrid16C7.FieldName := 'C7';\r\n xdsDynamicGrid16C7.Size := 1024;\r\n xdsDynamicGrid16C8.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16C8.Name := 'xdsDynamicGrid16C8';\r\n xdsDynamicGrid16C8.FieldName := 'C8';\r\n xdsDynamicGrid16C8.Size := 1024;\r\n xdsDynamicGrid16C9.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16C9.Name := 'xdsDynamicGrid16C9';\r\n xdsDynamicGrid16C9.FieldName := 'C9';\r\n xdsDynamicGrid16C9.Size := 1024;\r\n xdsDynamicGrid16C11.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16C11.Name := 'xdsDynamicGrid16C11';\r\n xdsDynamicGrid16C11.FieldName := 'C11';\r\n xdsDynamicGrid16C11.Size := 1024;\r\n xdsDynamicGrid16C10.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16C10.Name := 'xdsDynamicGrid16C10';\r\n xdsDynamicGrid16C10.FieldName := 'C10';\r\n xdsDynamicGrid16C10.Size := 1024;\r\n xdsDynamicGrid16C12.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16C12.Name := 'xdsDynamicGrid16C12';\r\n xdsDynamicGrid16C12.FieldName := 'C12';\r\n xdsDynamicGrid16C12.Size := 1024;\r\n xdsDynamicGrid16C14.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16C14.Name := 'xdsDynamicGrid16C14';\r\n xdsDynamicGrid16C14.FieldName := 'C14';\r\n xdsDynamicGrid16C14.Size := 1024;\r\n xdsDynamicGrid16C15.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16C15.Name := 'xdsDynamicGrid16C15';\r\n xdsDynamicGrid16C15.FieldName := 'C15';\r\n xdsDynamicGrid16C15.Size := 1024;\r\n xdsDynamicGrid16C13.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16C13.Name := 'xdsDynamicGrid16C13';\r\n xdsDynamicGrid16C13.FieldName := 'C13';\r\n xdsDynamicGrid16C13.Size := 1024;\r\n xdsDynamicGrid16C16.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16C16.Name := 'xdsDynamicGrid16C16';\r\n xdsDynamicGrid16C16.FieldName := 'C16';\r\n xdsDynamicGrid16C16.Size := 1024;\r\n xdsDynamicGrid16C17.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16C17.Name := 'xdsDynamicGrid16C17';\r\n xdsDynamicGrid16C17.FieldName := 'C17';\r\n xdsDynamicGrid16C17.Size := 1024;\r\n xdsDynamicGrid16C18.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16C18.Name := 'xdsDynamicGrid16C18';\r\n xdsDynamicGrid16C18.FieldName := 'C18';\r\n xdsDynamicGrid16C18.Size := 1024;\r\n xdsDynamicGrid16C19.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16C19.Name := 'xdsDynamicGrid16C19';\r\n xdsDynamicGrid16C19.FieldName := 'C19';\r\n xdsDynamicGrid16C19.Size := 1024;\r\n xdsDynamicGrid16C20.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16C20.Name := 'xdsDynamicGrid16C20';\r\n xdsDynamicGrid16C20.FieldName := 'C20';\r\n xdsDynamicGrid16C20.Size := 1024;\r\n xdsDynamicGrid16_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16_CURRENT_NURSE2.Name := 'xdsDynamicGrid16_CURRENT_NURSE2';\r\n xdsDynamicGrid16_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid16_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid16_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16_CURRENT_NURSE1.Name := 'xdsDynamicGrid16_CURRENT_NURSE1';\r\n xdsDynamicGrid16_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid16_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid16_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16_CURRENT_PROVIDER.Name := 'xdsDynamicGrid16_CURRENT_PROVIDER';\r\n xdsDynamicGrid16_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid16_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid16_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid16_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid16_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid16_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid16_CURRENT_MRN.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16_CURRENT_MRN.Name := 'xdsDynamicGrid16_CURRENT_MRN';\r\n xdsDynamicGrid16_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid16_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid16_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16_CURRENT_APPTNAME.Name := 'xdsDynamicGrid16_CURRENT_APPTNAME';\r\n xdsDynamicGrid16_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid16_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid16_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16_CURRENT_MEDID.Name := 'xdsDynamicGrid16_CURRENT_MEDID';\r\n xdsDynamicGrid16_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid16_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid16_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid16_CURRENT_PROBLEMID';\r\n xdsDynamicGrid16_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid16_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid16_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid16_CURRENT_ALLERGYID';\r\n xdsDynamicGrid16_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid16_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid16_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid16_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid16_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid16_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid16_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid16_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid16_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid16_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid16_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid16_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid16_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid16_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid16_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid16_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid16_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid16_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid16_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16_CURRENT_APPTDATE.Name := 'xdsDynamicGrid16_CURRENT_APPTDATE';\r\n xdsDynamicGrid16_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid16_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid16_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16_PATIENTFHIRID.Name := 'xdsDynamicGrid16_PATIENTFHIRID';\r\n xdsDynamicGrid16_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid16_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid16_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16_PATIENTCERNERID.Name := 'xdsDynamicGrid16_PATIENTCERNERID';\r\n xdsDynamicGrid16_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid16_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid16_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16_SETUPFACILITYID.Name := 'xdsDynamicGrid16_SETUPFACILITYID';\r\n xdsDynamicGrid16_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid16_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid16_USERID.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16_USERID.Name := 'xdsDynamicGrid16_USERID';\r\n xdsDynamicGrid16_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid16_USERID.Size := 256;\r\n xdsDynamicGrid16NEW_RECORD.SetParentComponent(xdsDynamicGrid16);\r\n xdsDynamicGrid16NEW_RECORD.Name := 'xdsDynamicGrid16NEW_RECORD';\r\n xdsDynamicGrid16NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid16.SetParentComponent(Self);\r\n dsDynamicGrid16.Name := 'dsDynamicGrid16';\r\n dsDynamicGrid16.DataSet := xdsDynamicGrid16;\r\n dsDynamicGrid16.Left := 395;\r\n dsDynamicGrid16.Top := 304;\r\n xdsDynamicGrid17.SetParentComponent(Self);\r\n xdsDynamicGrid17.Name := 'xdsDynamicGrid17';\r\n xdsDynamicGrid17.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid17.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid17.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid17, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid17.Left := 491;\r\n xdsDynamicGrid17.Top := 270;\r\n xdsDynamicGrid17C1.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17C1.Name := 'xdsDynamicGrid17C1';\r\n xdsDynamicGrid17C1.FieldName := 'C1';\r\n xdsDynamicGrid17C1.Size := 1024;\r\n xdsDynamicGrid17C2.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17C2.Name := 'xdsDynamicGrid17C2';\r\n xdsDynamicGrid17C2.FieldName := 'C2';\r\n xdsDynamicGrid17C2.Size := 1024;\r\n xdsDynamicGrid17C3.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17C3.Name := 'xdsDynamicGrid17C3';\r\n xdsDynamicGrid17C3.FieldName := 'C3';\r\n xdsDynamicGrid17C3.Size := 1024;\r\n xdsDynamicGrid17C4.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17C4.Name := 'xdsDynamicGrid17C4';\r\n xdsDynamicGrid17C4.FieldName := 'C4';\r\n xdsDynamicGrid17C4.Size := 1024;\r\n xdsDynamicGrid17C5.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17C5.Name := 'xdsDynamicGrid17C5';\r\n xdsDynamicGrid17C5.FieldName := 'C5';\r\n xdsDynamicGrid17C5.Size := 1024;\r\n xdsDynamicGrid17C6.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17C6.Name := 'xdsDynamicGrid17C6';\r\n xdsDynamicGrid17C6.FieldName := 'C6';\r\n xdsDynamicGrid17C6.Size := 1024;\r\n xdsDynamicGrid17C7.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17C7.Name := 'xdsDynamicGrid17C7';\r\n xdsDynamicGrid17C7.FieldName := 'C7';\r\n xdsDynamicGrid17C7.Size := 1024;\r\n xdsDynamicGrid17C8.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17C8.Name := 'xdsDynamicGrid17C8';\r\n xdsDynamicGrid17C8.FieldName := 'C8';\r\n xdsDynamicGrid17C8.Size := 1024;\r\n xdsDynamicGrid17C9.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17C9.Name := 'xdsDynamicGrid17C9';\r\n xdsDynamicGrid17C9.FieldName := 'C9';\r\n xdsDynamicGrid17C9.Size := 1024;\r\n xdsDynamicGrid17C11.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17C11.Name := 'xdsDynamicGrid17C11';\r\n xdsDynamicGrid17C11.FieldName := 'C11';\r\n xdsDynamicGrid17C11.Size := 1024;\r\n xdsDynamicGrid17C10.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17C10.Name := 'xdsDynamicGrid17C10';\r\n xdsDynamicGrid17C10.FieldName := 'C10';\r\n xdsDynamicGrid17C10.Size := 1024;\r\n xdsDynamicGrid17C12.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17C12.Name := 'xdsDynamicGrid17C12';\r\n xdsDynamicGrid17C12.FieldName := 'C12';\r\n xdsDynamicGrid17C12.Size := 1024;\r\n xdsDynamicGrid17C14.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17C14.Name := 'xdsDynamicGrid17C14';\r\n xdsDynamicGrid17C14.FieldName := 'C14';\r\n xdsDynamicGrid17C14.Size := 1024;\r\n xdsDynamicGrid17C15.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17C15.Name := 'xdsDynamicGrid17C15';\r\n xdsDynamicGrid17C15.FieldName := 'C15';\r\n xdsDynamicGrid17C15.Size := 1024;\r\n xdsDynamicGrid17C13.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17C13.Name := 'xdsDynamicGrid17C13';\r\n xdsDynamicGrid17C13.FieldName := 'C13';\r\n xdsDynamicGrid17C13.Size := 1024;\r\n xdsDynamicGrid17C16.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17C16.Name := 'xdsDynamicGrid17C16';\r\n xdsDynamicGrid17C16.FieldName := 'C16';\r\n xdsDynamicGrid17C16.Size := 1024;\r\n xdsDynamicGrid17C17.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17C17.Name := 'xdsDynamicGrid17C17';\r\n xdsDynamicGrid17C17.FieldName := 'C17';\r\n xdsDynamicGrid17C17.Size := 1024;\r\n xdsDynamicGrid17C18.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17C18.Name := 'xdsDynamicGrid17C18';\r\n xdsDynamicGrid17C18.FieldName := 'C18';\r\n xdsDynamicGrid17C18.Size := 1024;\r\n xdsDynamicGrid17C19.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17C19.Name := 'xdsDynamicGrid17C19';\r\n xdsDynamicGrid17C19.FieldName := 'C19';\r\n xdsDynamicGrid17C19.Size := 1024;\r\n xdsDynamicGrid17C20.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17C20.Name := 'xdsDynamicGrid17C20';\r\n xdsDynamicGrid17C20.FieldName := 'C20';\r\n xdsDynamicGrid17C20.Size := 1024;\r\n xdsDynamicGrid17_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17_CURRENT_NURSE2.Name := 'xdsDynamicGrid17_CURRENT_NURSE2';\r\n xdsDynamicGrid17_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid17_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid17_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17_CURRENT_NURSE1.Name := 'xdsDynamicGrid17_CURRENT_NURSE1';\r\n xdsDynamicGrid17_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid17_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid17_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17_CURRENT_PROVIDER.Name := 'xdsDynamicGrid17_CURRENT_PROVIDER';\r\n xdsDynamicGrid17_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid17_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid17_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid17_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid17_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid17_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid17_CURRENT_MRN.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17_CURRENT_MRN.Name := 'xdsDynamicGrid17_CURRENT_MRN';\r\n xdsDynamicGrid17_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid17_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid17_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17_CURRENT_APPTNAME.Name := 'xdsDynamicGrid17_CURRENT_APPTNAME';\r\n xdsDynamicGrid17_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid17_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid17_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17_CURRENT_MEDID.Name := 'xdsDynamicGrid17_CURRENT_MEDID';\r\n xdsDynamicGrid17_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid17_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid17_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid17_CURRENT_PROBLEMID';\r\n xdsDynamicGrid17_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid17_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid17_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid17_CURRENT_ALLERGYID';\r\n xdsDynamicGrid17_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid17_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid17_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid17_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid17_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid17_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid17_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid17_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid17_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid17_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid17_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid17_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid17_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid17_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid17_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid17_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid17_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid17_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid17_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17_CURRENT_APPTDATE.Name := 'xdsDynamicGrid17_CURRENT_APPTDATE';\r\n xdsDynamicGrid17_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid17_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid17_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17_PATIENTFHIRID.Name := 'xdsDynamicGrid17_PATIENTFHIRID';\r\n xdsDynamicGrid17_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid17_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid17_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17_PATIENTCERNERID.Name := 'xdsDynamicGrid17_PATIENTCERNERID';\r\n xdsDynamicGrid17_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid17_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid17_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17_SETUPFACILITYID.Name := 'xdsDynamicGrid17_SETUPFACILITYID';\r\n xdsDynamicGrid17_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid17_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid17_USERID.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17_USERID.Name := 'xdsDynamicGrid17_USERID';\r\n xdsDynamicGrid17_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid17_USERID.Size := 256;\r\n xdsDynamicGrid17NEW_RECORD.SetParentComponent(xdsDynamicGrid17);\r\n xdsDynamicGrid17NEW_RECORD.Name := 'xdsDynamicGrid17NEW_RECORD';\r\n xdsDynamicGrid17NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid17.SetParentComponent(Self);\r\n dsDynamicGrid17.Name := 'dsDynamicGrid17';\r\n dsDynamicGrid17.DataSet := xdsDynamicGrid17;\r\n dsDynamicGrid17.Left := 491;\r\n dsDynamicGrid17.Top := 304;\r\n xdsDynamicGrid18.SetParentComponent(Self);\r\n xdsDynamicGrid18.Name := 'xdsDynamicGrid18';\r\n xdsDynamicGrid18.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid18.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid18.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid18, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid18.Left := 611;\r\n xdsDynamicGrid18.Top := 264;\r\n xdsDynamicGrid18C1.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18C1.Name := 'xdsDynamicGrid18C1';\r\n xdsDynamicGrid18C1.FieldName := 'C1';\r\n xdsDynamicGrid18C1.Size := 1024;\r\n xdsDynamicGrid18C2.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18C2.Name := 'xdsDynamicGrid18C2';\r\n xdsDynamicGrid18C2.FieldName := 'C2';\r\n xdsDynamicGrid18C2.Size := 1024;\r\n xdsDynamicGrid18C3.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18C3.Name := 'xdsDynamicGrid18C3';\r\n xdsDynamicGrid18C3.FieldName := 'C3';\r\n xdsDynamicGrid18C3.Size := 1024;\r\n xdsDynamicGrid18C4.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18C4.Name := 'xdsDynamicGrid18C4';\r\n xdsDynamicGrid18C4.FieldName := 'C4';\r\n xdsDynamicGrid18C4.Size := 1024;\r\n xdsDynamicGrid18C5.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18C5.Name := 'xdsDynamicGrid18C5';\r\n xdsDynamicGrid18C5.FieldName := 'C5';\r\n xdsDynamicGrid18C5.Size := 1024;\r\n xdsDynamicGrid18C6.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18C6.Name := 'xdsDynamicGrid18C6';\r\n xdsDynamicGrid18C6.FieldName := 'C6';\r\n xdsDynamicGrid18C6.Size := 1024;\r\n xdsDynamicGrid18C7.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18C7.Name := 'xdsDynamicGrid18C7';\r\n xdsDynamicGrid18C7.FieldName := 'C7';\r\n xdsDynamicGrid18C7.Size := 1024;\r\n xdsDynamicGrid18C8.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18C8.Name := 'xdsDynamicGrid18C8';\r\n xdsDynamicGrid18C8.FieldName := 'C8';\r\n xdsDynamicGrid18C8.Size := 1024;\r\n xdsDynamicGrid18C9.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18C9.Name := 'xdsDynamicGrid18C9';\r\n xdsDynamicGrid18C9.FieldName := 'C9';\r\n xdsDynamicGrid18C9.Size := 1024;\r\n xdsDynamicGrid18C11.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18C11.Name := 'xdsDynamicGrid18C11';\r\n xdsDynamicGrid18C11.FieldName := 'C11';\r\n xdsDynamicGrid18C11.Size := 1024;\r\n xdsDynamicGrid18C10.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18C10.Name := 'xdsDynamicGrid18C10';\r\n xdsDynamicGrid18C10.FieldName := 'C10';\r\n xdsDynamicGrid18C10.Size := 1024;\r\n xdsDynamicGrid18C12.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18C12.Name := 'xdsDynamicGrid18C12';\r\n xdsDynamicGrid18C12.FieldName := 'C12';\r\n xdsDynamicGrid18C12.Size := 1024;\r\n xdsDynamicGrid18C14.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18C14.Name := 'xdsDynamicGrid18C14';\r\n xdsDynamicGrid18C14.FieldName := 'C14';\r\n xdsDynamicGrid18C14.Size := 1024;\r\n xdsDynamicGrid18C15.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18C15.Name := 'xdsDynamicGrid18C15';\r\n xdsDynamicGrid18C15.FieldName := 'C15';\r\n xdsDynamicGrid18C15.Size := 1024;\r\n xdsDynamicGrid18C13.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18C13.Name := 'xdsDynamicGrid18C13';\r\n xdsDynamicGrid18C13.FieldName := 'C13';\r\n xdsDynamicGrid18C13.Size := 1024;\r\n xdsDynamicGrid18C16.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18C16.Name := 'xdsDynamicGrid18C16';\r\n xdsDynamicGrid18C16.FieldName := 'C16';\r\n xdsDynamicGrid18C16.Size := 1024;\r\n xdsDynamicGrid18C17.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18C17.Name := 'xdsDynamicGrid18C17';\r\n xdsDynamicGrid18C17.FieldName := 'C17';\r\n xdsDynamicGrid18C17.Size := 1024;\r\n xdsDynamicGrid18C18.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18C18.Name := 'xdsDynamicGrid18C18';\r\n xdsDynamicGrid18C18.FieldName := 'C18';\r\n xdsDynamicGrid18C18.Size := 1024;\r\n xdsDynamicGrid18C19.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18C19.Name := 'xdsDynamicGrid18C19';\r\n xdsDynamicGrid18C19.FieldName := 'C19';\r\n xdsDynamicGrid18C19.Size := 1024;\r\n xdsDynamicGrid18C20.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18C20.Name := 'xdsDynamicGrid18C20';\r\n xdsDynamicGrid18C20.FieldName := 'C20';\r\n xdsDynamicGrid18C20.Size := 1024;\r\n xdsDynamicGrid18_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18_CURRENT_NURSE2.Name := 'xdsDynamicGrid18_CURRENT_NURSE2';\r\n xdsDynamicGrid18_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid18_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid18_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18_CURRENT_NURSE1.Name := 'xdsDynamicGrid18_CURRENT_NURSE1';\r\n xdsDynamicGrid18_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid18_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid18_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18_CURRENT_PROVIDER.Name := 'xdsDynamicGrid18_CURRENT_PROVIDER';\r\n xdsDynamicGrid18_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid18_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid18_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid18_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid18_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid18_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid18_CURRENT_MRN.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18_CURRENT_MRN.Name := 'xdsDynamicGrid18_CURRENT_MRN';\r\n xdsDynamicGrid18_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid18_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid18_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18_CURRENT_APPTNAME.Name := 'xdsDynamicGrid18_CURRENT_APPTNAME';\r\n xdsDynamicGrid18_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid18_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid18_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18_CURRENT_MEDID.Name := 'xdsDynamicGrid18_CURRENT_MEDID';\r\n xdsDynamicGrid18_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid18_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid18_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid18_CURRENT_PROBLEMID';\r\n xdsDynamicGrid18_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid18_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid18_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid18_CURRENT_ALLERGYID';\r\n xdsDynamicGrid18_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid18_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid18_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid18_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid18_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid18_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid18_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid18_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid18_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid18_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid18_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid18_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid18_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid18_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid18_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid18_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid18_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid18_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid18_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18_CURRENT_APPTDATE.Name := 'xdsDynamicGrid18_CURRENT_APPTDATE';\r\n xdsDynamicGrid18_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid18_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid18_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18_PATIENTFHIRID.Name := 'xdsDynamicGrid18_PATIENTFHIRID';\r\n xdsDynamicGrid18_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid18_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid18_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18_PATIENTCERNERID.Name := 'xdsDynamicGrid18_PATIENTCERNERID';\r\n xdsDynamicGrid18_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid18_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid18_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18_SETUPFACILITYID.Name := 'xdsDynamicGrid18_SETUPFACILITYID';\r\n xdsDynamicGrid18_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid18_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid18_USERID.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18_USERID.Name := 'xdsDynamicGrid18_USERID';\r\n xdsDynamicGrid18_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid18_USERID.Size := 256;\r\n xdsDynamicGrid18NEW_RECORD.SetParentComponent(xdsDynamicGrid18);\r\n xdsDynamicGrid18NEW_RECORD.Name := 'xdsDynamicGrid18NEW_RECORD';\r\n xdsDynamicGrid18NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid18.SetParentComponent(Self);\r\n dsDynamicGrid18.Name := 'dsDynamicGrid18';\r\n dsDynamicGrid18.DataSet := xdsDynamicGrid18;\r\n dsDynamicGrid18.Left := 611;\r\n dsDynamicGrid18.Top := 304;\r\n xdsDynamicGrid19.SetParentComponent(Self);\r\n xdsDynamicGrid19.Name := 'xdsDynamicGrid19';\r\n xdsDynamicGrid19.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid19.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid19.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid19, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid19.Left := 723;\r\n xdsDynamicGrid19.Top := 264;\r\n xdsDynamicGrid19C1.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19C1.Name := 'xdsDynamicGrid19C1';\r\n xdsDynamicGrid19C1.FieldName := 'C1';\r\n xdsDynamicGrid19C1.Size := 1024;\r\n xdsDynamicGrid19C2.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19C2.Name := 'xdsDynamicGrid19C2';\r\n xdsDynamicGrid19C2.FieldName := 'C2';\r\n xdsDynamicGrid19C2.Size := 1024;\r\n xdsDynamicGrid19C3.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19C3.Name := 'xdsDynamicGrid19C3';\r\n xdsDynamicGrid19C3.FieldName := 'C3';\r\n xdsDynamicGrid19C3.Size := 1024;\r\n xdsDynamicGrid19C4.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19C4.Name := 'xdsDynamicGrid19C4';\r\n xdsDynamicGrid19C4.FieldName := 'C4';\r\n xdsDynamicGrid19C4.Size := 1024;\r\n xdsDynamicGrid19C5.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19C5.Name := 'xdsDynamicGrid19C5';\r\n xdsDynamicGrid19C5.FieldName := 'C5';\r\n xdsDynamicGrid19C5.Size := 1024;\r\n xdsDynamicGrid19C6.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19C6.Name := 'xdsDynamicGrid19C6';\r\n xdsDynamicGrid19C6.FieldName := 'C6';\r\n xdsDynamicGrid19C6.Size := 1024;\r\n xdsDynamicGrid19C7.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19C7.Name := 'xdsDynamicGrid19C7';\r\n xdsDynamicGrid19C7.FieldName := 'C7';\r\n xdsDynamicGrid19C7.Size := 1024;\r\n xdsDynamicGrid19C8.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19C8.Name := 'xdsDynamicGrid19C8';\r\n xdsDynamicGrid19C8.FieldName := 'C8';\r\n xdsDynamicGrid19C8.Size := 1024;\r\n xdsDynamicGrid19C9.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19C9.Name := 'xdsDynamicGrid19C9';\r\n xdsDynamicGrid19C9.FieldName := 'C9';\r\n xdsDynamicGrid19C9.Size := 1024;\r\n xdsDynamicGrid19C11.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19C11.Name := 'xdsDynamicGrid19C11';\r\n xdsDynamicGrid19C11.FieldName := 'C11';\r\n xdsDynamicGrid19C11.Size := 1024;\r\n xdsDynamicGrid19C10.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19C10.Name := 'xdsDynamicGrid19C10';\r\n xdsDynamicGrid19C10.FieldName := 'C10';\r\n xdsDynamicGrid19C10.Size := 1024;\r\n xdsDynamicGrid19C12.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19C12.Name := 'xdsDynamicGrid19C12';\r\n xdsDynamicGrid19C12.FieldName := 'C12';\r\n xdsDynamicGrid19C12.Size := 1024;\r\n xdsDynamicGrid19C14.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19C14.Name := 'xdsDynamicGrid19C14';\r\n xdsDynamicGrid19C14.FieldName := 'C14';\r\n xdsDynamicGrid19C14.Size := 1024;\r\n xdsDynamicGrid19C15.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19C15.Name := 'xdsDynamicGrid19C15';\r\n xdsDynamicGrid19C15.FieldName := 'C15';\r\n xdsDynamicGrid19C15.Size := 1024;\r\n xdsDynamicGrid19C13.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19C13.Name := 'xdsDynamicGrid19C13';\r\n xdsDynamicGrid19C13.FieldName := 'C13';\r\n xdsDynamicGrid19C13.Size := 1024;\r\n xdsDynamicGrid19C16.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19C16.Name := 'xdsDynamicGrid19C16';\r\n xdsDynamicGrid19C16.FieldName := 'C16';\r\n xdsDynamicGrid19C16.Size := 1024;\r\n xdsDynamicGrid19C17.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19C17.Name := 'xdsDynamicGrid19C17';\r\n xdsDynamicGrid19C17.FieldName := 'C17';\r\n xdsDynamicGrid19C17.Size := 1024;\r\n xdsDynamicGrid19C18.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19C18.Name := 'xdsDynamicGrid19C18';\r\n xdsDynamicGrid19C18.FieldName := 'C18';\r\n xdsDynamicGrid19C18.Size := 1024;\r\n xdsDynamicGrid19C19.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19C19.Name := 'xdsDynamicGrid19C19';\r\n xdsDynamicGrid19C19.FieldName := 'C19';\r\n xdsDynamicGrid19C19.Size := 1024;\r\n xdsDynamicGrid19C20.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19C20.Name := 'xdsDynamicGrid19C20';\r\n xdsDynamicGrid19C20.FieldName := 'C20';\r\n xdsDynamicGrid19C20.Size := 1024;\r\n xdsDynamicGrid19_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19_CURRENT_NURSE2.Name := 'xdsDynamicGrid19_CURRENT_NURSE2';\r\n xdsDynamicGrid19_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid19_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid19_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19_CURRENT_NURSE1.Name := 'xdsDynamicGrid19_CURRENT_NURSE1';\r\n xdsDynamicGrid19_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid19_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid19_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19_CURRENT_PROVIDER.Name := 'xdsDynamicGrid19_CURRENT_PROVIDER';\r\n xdsDynamicGrid19_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid19_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid19_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid19_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid19_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid19_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid19_CURRENT_MRN.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19_CURRENT_MRN.Name := 'xdsDynamicGrid19_CURRENT_MRN';\r\n xdsDynamicGrid19_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid19_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid19_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19_CURRENT_APPTNAME.Name := 'xdsDynamicGrid19_CURRENT_APPTNAME';\r\n xdsDynamicGrid19_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid19_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid19_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19_CURRENT_MEDID.Name := 'xdsDynamicGrid19_CURRENT_MEDID';\r\n xdsDynamicGrid19_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid19_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid19_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid19_CURRENT_PROBLEMID';\r\n xdsDynamicGrid19_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid19_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid19_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid19_CURRENT_ALLERGYID';\r\n xdsDynamicGrid19_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid19_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid19_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid19_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid19_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid19_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid19_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid19_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid19_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid19_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid19_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid19_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid19_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid19_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid19_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid19_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid19_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid19_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid19_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19_CURRENT_APPTDATE.Name := 'xdsDynamicGrid19_CURRENT_APPTDATE';\r\n xdsDynamicGrid19_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid19_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid19_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19_PATIENTFHIRID.Name := 'xdsDynamicGrid19_PATIENTFHIRID';\r\n xdsDynamicGrid19_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid19_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid19_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19_PATIENTCERNERID.Name := 'xdsDynamicGrid19_PATIENTCERNERID';\r\n xdsDynamicGrid19_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid19_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid19_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19_SETUPFACILITYID.Name := 'xdsDynamicGrid19_SETUPFACILITYID';\r\n xdsDynamicGrid19_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid19_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid19_USERID.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19_USERID.Name := 'xdsDynamicGrid19_USERID';\r\n xdsDynamicGrid19_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid19_USERID.Size := 256;\r\n xdsDynamicGrid19NEW_RECORD.SetParentComponent(xdsDynamicGrid19);\r\n xdsDynamicGrid19NEW_RECORD.Name := 'xdsDynamicGrid19NEW_RECORD';\r\n xdsDynamicGrid19NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid19.SetParentComponent(Self);\r\n dsDynamicGrid19.Name := 'dsDynamicGrid19';\r\n dsDynamicGrid19.DataSet := xdsDynamicGrid19;\r\n dsDynamicGrid19.Left := 723;\r\n dsDynamicGrid19.Top := 304;\r\n xdsDynamicGrid20.SetParentComponent(Self);\r\n xdsDynamicGrid20.Name := 'xdsDynamicGrid20';\r\n xdsDynamicGrid20.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid20.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid20.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid20, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid20.Left := 843;\r\n xdsDynamicGrid20.Top := 264;\r\n xdsDynamicGrid20C1.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20C1.Name := 'xdsDynamicGrid20C1';\r\n xdsDynamicGrid20C1.FieldName := 'C1';\r\n xdsDynamicGrid20C1.Size := 1024;\r\n xdsDynamicGrid20C2.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20C2.Name := 'xdsDynamicGrid20C2';\r\n xdsDynamicGrid20C2.FieldName := 'C2';\r\n xdsDynamicGrid20C2.Size := 1024;\r\n xdsDynamicGrid20C3.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20C3.Name := 'xdsDynamicGrid20C3';\r\n xdsDynamicGrid20C3.FieldName := 'C3';\r\n xdsDynamicGrid20C3.Size := 1024;\r\n xdsDynamicGrid20C4.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20C4.Name := 'xdsDynamicGrid20C4';\r\n xdsDynamicGrid20C4.FieldName := 'C4';\r\n xdsDynamicGrid20C4.Size := 1024;\r\n xdsDynamicGrid20C5.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20C5.Name := 'xdsDynamicGrid20C5';\r\n xdsDynamicGrid20C5.FieldName := 'C5';\r\n xdsDynamicGrid20C5.Size := 1024;\r\n xdsDynamicGrid20C6.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20C6.Name := 'xdsDynamicGrid20C6';\r\n xdsDynamicGrid20C6.FieldName := 'C6';\r\n xdsDynamicGrid20C6.Size := 1024;\r\n xdsDynamicGrid20C7.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20C7.Name := 'xdsDynamicGrid20C7';\r\n xdsDynamicGrid20C7.FieldName := 'C7';\r\n xdsDynamicGrid20C7.Size := 1024;\r\n xdsDynamicGrid20C8.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20C8.Name := 'xdsDynamicGrid20C8';\r\n xdsDynamicGrid20C8.FieldName := 'C8';\r\n xdsDynamicGrid20C8.Size := 1024;\r\n xdsDynamicGrid20C9.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20C9.Name := 'xdsDynamicGrid20C9';\r\n xdsDynamicGrid20C9.FieldName := 'C9';\r\n xdsDynamicGrid20C9.Size := 1024;\r\n xdsDynamicGrid20C11.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20C11.Name := 'xdsDynamicGrid20C11';\r\n xdsDynamicGrid20C11.FieldName := 'C11';\r\n xdsDynamicGrid20C11.Size := 1024;\r\n xdsDynamicGrid20C10.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20C10.Name := 'xdsDynamicGrid20C10';\r\n xdsDynamicGrid20C10.FieldName := 'C10';\r\n xdsDynamicGrid20C10.Size := 1024;\r\n xdsDynamicGrid20C12.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20C12.Name := 'xdsDynamicGrid20C12';\r\n xdsDynamicGrid20C12.FieldName := 'C12';\r\n xdsDynamicGrid20C12.Size := 1024;\r\n xdsDynamicGrid20C14.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20C14.Name := 'xdsDynamicGrid20C14';\r\n xdsDynamicGrid20C14.FieldName := 'C14';\r\n xdsDynamicGrid20C14.Size := 1024;\r\n xdsDynamicGrid20C15.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20C15.Name := 'xdsDynamicGrid20C15';\r\n xdsDynamicGrid20C15.FieldName := 'C15';\r\n xdsDynamicGrid20C15.Size := 1024;\r\n xdsDynamicGrid20C13.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20C13.Name := 'xdsDynamicGrid20C13';\r\n xdsDynamicGrid20C13.FieldName := 'C13';\r\n xdsDynamicGrid20C13.Size := 1024;\r\n xdsDynamicGrid20C16.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20C16.Name := 'xdsDynamicGrid20C16';\r\n xdsDynamicGrid20C16.FieldName := 'C16';\r\n xdsDynamicGrid20C16.Size := 1024;\r\n xdsDynamicGrid20C17.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20C17.Name := 'xdsDynamicGrid20C17';\r\n xdsDynamicGrid20C17.FieldName := 'C17';\r\n xdsDynamicGrid20C17.Size := 1024;\r\n xdsDynamicGrid20C18.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20C18.Name := 'xdsDynamicGrid20C18';\r\n xdsDynamicGrid20C18.FieldName := 'C18';\r\n xdsDynamicGrid20C18.Size := 1024;\r\n xdsDynamicGrid20C19.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20C19.Name := 'xdsDynamicGrid20C19';\r\n xdsDynamicGrid20C19.FieldName := 'C19';\r\n xdsDynamicGrid20C19.Size := 1024;\r\n xdsDynamicGrid20C20.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20C20.Name := 'xdsDynamicGrid20C20';\r\n xdsDynamicGrid20C20.FieldName := 'C20';\r\n xdsDynamicGrid20C20.Size := 1024;\r\n xdsDynamicGrid20_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20_CURRENT_NURSE2.Name := 'xdsDynamicGrid20_CURRENT_NURSE2';\r\n xdsDynamicGrid20_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid20_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid20_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20_CURRENT_NURSE1.Name := 'xdsDynamicGrid20_CURRENT_NURSE1';\r\n xdsDynamicGrid20_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid20_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid20_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20_CURRENT_PROVIDER.Name := 'xdsDynamicGrid20_CURRENT_PROVIDER';\r\n xdsDynamicGrid20_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid20_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid20_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid20_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid20_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid20_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid20_CURRENT_MRN.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20_CURRENT_MRN.Name := 'xdsDynamicGrid20_CURRENT_MRN';\r\n xdsDynamicGrid20_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid20_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid20_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20_CURRENT_APPTNAME.Name := 'xdsDynamicGrid20_CURRENT_APPTNAME';\r\n xdsDynamicGrid20_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid20_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid20_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20_CURRENT_MEDID.Name := 'xdsDynamicGrid20_CURRENT_MEDID';\r\n xdsDynamicGrid20_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid20_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid20_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid20_CURRENT_PROBLEMID';\r\n xdsDynamicGrid20_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid20_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid20_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid20_CURRENT_ALLERGYID';\r\n xdsDynamicGrid20_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid20_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid20_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid20_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid20_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid20_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid20_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid20_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid20_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid20_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid20_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid20_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid20_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid20_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid20_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid20_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid20_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid20_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid20_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20_CURRENT_APPTDATE.Name := 'xdsDynamicGrid20_CURRENT_APPTDATE';\r\n xdsDynamicGrid20_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid20_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid20_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20_PATIENTFHIRID.Name := 'xdsDynamicGrid20_PATIENTFHIRID';\r\n xdsDynamicGrid20_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid20_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid20_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20_PATIENTCERNERID.Name := 'xdsDynamicGrid20_PATIENTCERNERID';\r\n xdsDynamicGrid20_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid20_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid20_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20_SETUPFACILITYID.Name := 'xdsDynamicGrid20_SETUPFACILITYID';\r\n xdsDynamicGrid20_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid20_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid20_USERID.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20_USERID.Name := 'xdsDynamicGrid20_USERID';\r\n xdsDynamicGrid20_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid20_USERID.Size := 256;\r\n xdsDynamicGrid20NEW_RECORD.SetParentComponent(xdsDynamicGrid20);\r\n xdsDynamicGrid20NEW_RECORD.Name := 'xdsDynamicGrid20NEW_RECORD';\r\n xdsDynamicGrid20NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid20.SetParentComponent(Self);\r\n dsDynamicGrid20.Name := 'dsDynamicGrid20';\r\n dsDynamicGrid20.DataSet := xdsDynamicGrid20;\r\n dsDynamicGrid20.Left := 843;\r\n dsDynamicGrid20.Top := 304;\r\n xdsDynamicGrid21.SetParentComponent(Self);\r\n xdsDynamicGrid21.Name := 'xdsDynamicGrid21';\r\n xdsDynamicGrid21.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid21.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid21.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid21, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid21.Left := 395;\r\n xdsDynamicGrid21.Top := 352;\r\n xdsDynamicGrid21C1.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21C1.Name := 'xdsDynamicGrid21C1';\r\n xdsDynamicGrid21C1.FieldName := 'C1';\r\n xdsDynamicGrid21C1.Size := 1024;\r\n xdsDynamicGrid21C2.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21C2.Name := 'xdsDynamicGrid21C2';\r\n xdsDynamicGrid21C2.FieldName := 'C2';\r\n xdsDynamicGrid21C2.Size := 1024;\r\n xdsDynamicGrid21C3.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21C3.Name := 'xdsDynamicGrid21C3';\r\n xdsDynamicGrid21C3.FieldName := 'C3';\r\n xdsDynamicGrid21C3.Size := 1024;\r\n xdsDynamicGrid21C4.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21C4.Name := 'xdsDynamicGrid21C4';\r\n xdsDynamicGrid21C4.FieldName := 'C4';\r\n xdsDynamicGrid21C4.Size := 1024;\r\n xdsDynamicGrid21C5.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21C5.Name := 'xdsDynamicGrid21C5';\r\n xdsDynamicGrid21C5.FieldName := 'C5';\r\n xdsDynamicGrid21C5.Size := 1024;\r\n xdsDynamicGrid21C6.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21C6.Name := 'xdsDynamicGrid21C6';\r\n xdsDynamicGrid21C6.FieldName := 'C6';\r\n xdsDynamicGrid21C6.Size := 1024;\r\n xdsDynamicGrid21C7.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21C7.Name := 'xdsDynamicGrid21C7';\r\n xdsDynamicGrid21C7.FieldName := 'C7';\r\n xdsDynamicGrid21C7.Size := 1024;\r\n xdsDynamicGrid21C8.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21C8.Name := 'xdsDynamicGrid21C8';\r\n xdsDynamicGrid21C8.FieldName := 'C8';\r\n xdsDynamicGrid21C8.Size := 1024;\r\n xdsDynamicGrid21C9.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21C9.Name := 'xdsDynamicGrid21C9';\r\n xdsDynamicGrid21C9.FieldName := 'C9';\r\n xdsDynamicGrid21C9.Size := 1024;\r\n xdsDynamicGrid21C11.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21C11.Name := 'xdsDynamicGrid21C11';\r\n xdsDynamicGrid21C11.FieldName := 'C11';\r\n xdsDynamicGrid21C11.Size := 1024;\r\n xdsDynamicGrid21C10.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21C10.Name := 'xdsDynamicGrid21C10';\r\n xdsDynamicGrid21C10.FieldName := 'C10';\r\n xdsDynamicGrid21C10.Size := 1024;\r\n xdsDynamicGrid21C12.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21C12.Name := 'xdsDynamicGrid21C12';\r\n xdsDynamicGrid21C12.FieldName := 'C12';\r\n xdsDynamicGrid21C12.Size := 1024;\r\n xdsDynamicGrid21C14.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21C14.Name := 'xdsDynamicGrid21C14';\r\n xdsDynamicGrid21C14.FieldName := 'C14';\r\n xdsDynamicGrid21C14.Size := 1024;\r\n xdsDynamicGrid21C15.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21C15.Name := 'xdsDynamicGrid21C15';\r\n xdsDynamicGrid21C15.FieldName := 'C15';\r\n xdsDynamicGrid21C15.Size := 1024;\r\n xdsDynamicGrid21C13.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21C13.Name := 'xdsDynamicGrid21C13';\r\n xdsDynamicGrid21C13.FieldName := 'C13';\r\n xdsDynamicGrid21C13.Size := 1024;\r\n xdsDynamicGrid21C16.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21C16.Name := 'xdsDynamicGrid21C16';\r\n xdsDynamicGrid21C16.FieldName := 'C16';\r\n xdsDynamicGrid21C16.Size := 1024;\r\n xdsDynamicGrid21C17.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21C17.Name := 'xdsDynamicGrid21C17';\r\n xdsDynamicGrid21C17.FieldName := 'C17';\r\n xdsDynamicGrid21C17.Size := 1024;\r\n xdsDynamicGrid21C18.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21C18.Name := 'xdsDynamicGrid21C18';\r\n xdsDynamicGrid21C18.FieldName := 'C18';\r\n xdsDynamicGrid21C18.Size := 1024;\r\n xdsDynamicGrid21C19.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21C19.Name := 'xdsDynamicGrid21C19';\r\n xdsDynamicGrid21C19.FieldName := 'C19';\r\n xdsDynamicGrid21C19.Size := 1024;\r\n xdsDynamicGrid21C20.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21C20.Name := 'xdsDynamicGrid21C20';\r\n xdsDynamicGrid21C20.FieldName := 'C20';\r\n xdsDynamicGrid21C20.Size := 1024;\r\n xdsDynamicGrid21_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21_CURRENT_NURSE2.Name := 'xdsDynamicGrid21_CURRENT_NURSE2';\r\n xdsDynamicGrid21_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid21_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid21_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21_CURRENT_NURSE1.Name := 'xdsDynamicGrid21_CURRENT_NURSE1';\r\n xdsDynamicGrid21_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid21_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid21_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21_CURRENT_PROVIDER.Name := 'xdsDynamicGrid21_CURRENT_PROVIDER';\r\n xdsDynamicGrid21_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid21_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid21_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid21_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid21_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid21_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid21_CURRENT_MRN.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21_CURRENT_MRN.Name := 'xdsDynamicGrid21_CURRENT_MRN';\r\n xdsDynamicGrid21_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid21_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid21_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21_CURRENT_APPTNAME.Name := 'xdsDynamicGrid21_CURRENT_APPTNAME';\r\n xdsDynamicGrid21_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid21_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid21_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21_CURRENT_MEDID.Name := 'xdsDynamicGrid21_CURRENT_MEDID';\r\n xdsDynamicGrid21_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid21_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid21_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid21_CURRENT_PROBLEMID';\r\n xdsDynamicGrid21_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid21_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid21_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid21_CURRENT_ALLERGYID';\r\n xdsDynamicGrid21_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid21_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid21_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid21_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid21_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid21_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid21_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid21_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid21_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid21_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid21_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid21_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid21_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid21_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid21_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid21_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid21_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid21_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid21_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21_CURRENT_APPTDATE.Name := 'xdsDynamicGrid21_CURRENT_APPTDATE';\r\n xdsDynamicGrid21_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid21_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid21_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21_PATIENTFHIRID.Name := 'xdsDynamicGrid21_PATIENTFHIRID';\r\n xdsDynamicGrid21_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid21_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid21_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21_PATIENTCERNERID.Name := 'xdsDynamicGrid21_PATIENTCERNERID';\r\n xdsDynamicGrid21_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid21_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid21_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21_SETUPFACILITYID.Name := 'xdsDynamicGrid21_SETUPFACILITYID';\r\n xdsDynamicGrid21_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid21_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid21_USERID.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21_USERID.Name := 'xdsDynamicGrid21_USERID';\r\n xdsDynamicGrid21_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid21_USERID.Size := 256;\r\n xdsDynamicGrid21NEW_RECORD.SetParentComponent(xdsDynamicGrid21);\r\n xdsDynamicGrid21NEW_RECORD.Name := 'xdsDynamicGrid21NEW_RECORD';\r\n xdsDynamicGrid21NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid21.SetParentComponent(Self);\r\n dsDynamicGrid21.Name := 'dsDynamicGrid21';\r\n dsDynamicGrid21.DataSet := xdsDynamicGrid21;\r\n dsDynamicGrid21.Left := 395;\r\n dsDynamicGrid21.Top := 392;\r\n xdsDynamicGrid22.SetParentComponent(Self);\r\n xdsDynamicGrid22.Name := 'xdsDynamicGrid22';\r\n xdsDynamicGrid22.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid22.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid22.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid22, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid22.Left := 491;\r\n xdsDynamicGrid22.Top := 352;\r\n xdsDynamicGrid22C1.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22C1.Name := 'xdsDynamicGrid22C1';\r\n xdsDynamicGrid22C1.FieldName := 'C1';\r\n xdsDynamicGrid22C1.Size := 1024;\r\n xdsDynamicGrid22C2.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22C2.Name := 'xdsDynamicGrid22C2';\r\n xdsDynamicGrid22C2.FieldName := 'C2';\r\n xdsDynamicGrid22C2.Size := 1024;\r\n xdsDynamicGrid22C3.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22C3.Name := 'xdsDynamicGrid22C3';\r\n xdsDynamicGrid22C3.FieldName := 'C3';\r\n xdsDynamicGrid22C3.Size := 1024;\r\n xdsDynamicGrid22C4.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22C4.Name := 'xdsDynamicGrid22C4';\r\n xdsDynamicGrid22C4.FieldName := 'C4';\r\n xdsDynamicGrid22C4.Size := 1024;\r\n xdsDynamicGrid22C5.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22C5.Name := 'xdsDynamicGrid22C5';\r\n xdsDynamicGrid22C5.FieldName := 'C5';\r\n xdsDynamicGrid22C5.Size := 1024;\r\n xdsDynamicGrid22C6.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22C6.Name := 'xdsDynamicGrid22C6';\r\n xdsDynamicGrid22C6.FieldName := 'C6';\r\n xdsDynamicGrid22C6.Size := 1024;\r\n xdsDynamicGrid22C7.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22C7.Name := 'xdsDynamicGrid22C7';\r\n xdsDynamicGrid22C7.FieldName := 'C7';\r\n xdsDynamicGrid22C7.Size := 1024;\r\n xdsDynamicGrid22C8.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22C8.Name := 'xdsDynamicGrid22C8';\r\n xdsDynamicGrid22C8.FieldName := 'C8';\r\n xdsDynamicGrid22C8.Size := 1024;\r\n xdsDynamicGrid22C9.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22C9.Name := 'xdsDynamicGrid22C9';\r\n xdsDynamicGrid22C9.FieldName := 'C9';\r\n xdsDynamicGrid22C9.Size := 1024;\r\n xdsDynamicGrid22C11.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22C11.Name := 'xdsDynamicGrid22C11';\r\n xdsDynamicGrid22C11.FieldName := 'C11';\r\n xdsDynamicGrid22C11.Size := 1024;\r\n xdsDynamicGrid22C10.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22C10.Name := 'xdsDynamicGrid22C10';\r\n xdsDynamicGrid22C10.FieldName := 'C10';\r\n xdsDynamicGrid22C10.Size := 1024;\r\n xdsDynamicGrid22C12.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22C12.Name := 'xdsDynamicGrid22C12';\r\n xdsDynamicGrid22C12.FieldName := 'C12';\r\n xdsDynamicGrid22C12.Size := 1024;\r\n xdsDynamicGrid22C14.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22C14.Name := 'xdsDynamicGrid22C14';\r\n xdsDynamicGrid22C14.FieldName := 'C14';\r\n xdsDynamicGrid22C14.Size := 1024;\r\n xdsDynamicGrid22C15.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22C15.Name := 'xdsDynamicGrid22C15';\r\n xdsDynamicGrid22C15.FieldName := 'C15';\r\n xdsDynamicGrid22C15.Size := 1024;\r\n xdsDynamicGrid22C13.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22C13.Name := 'xdsDynamicGrid22C13';\r\n xdsDynamicGrid22C13.FieldName := 'C13';\r\n xdsDynamicGrid22C13.Size := 1024;\r\n xdsDynamicGrid22C16.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22C16.Name := 'xdsDynamicGrid22C16';\r\n xdsDynamicGrid22C16.FieldName := 'C16';\r\n xdsDynamicGrid22C16.Size := 1024;\r\n xdsDynamicGrid22C17.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22C17.Name := 'xdsDynamicGrid22C17';\r\n xdsDynamicGrid22C17.FieldName := 'C17';\r\n xdsDynamicGrid22C17.Size := 1024;\r\n xdsDynamicGrid22C18.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22C18.Name := 'xdsDynamicGrid22C18';\r\n xdsDynamicGrid22C18.FieldName := 'C18';\r\n xdsDynamicGrid22C18.Size := 1024;\r\n xdsDynamicGrid22C19.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22C19.Name := 'xdsDynamicGrid22C19';\r\n xdsDynamicGrid22C19.FieldName := 'C19';\r\n xdsDynamicGrid22C19.Size := 1024;\r\n xdsDynamicGrid22C20.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22C20.Name := 'xdsDynamicGrid22C20';\r\n xdsDynamicGrid22C20.FieldName := 'C20';\r\n xdsDynamicGrid22C20.Size := 1024;\r\n xdsDynamicGrid22_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22_CURRENT_NURSE2.Name := 'xdsDynamicGrid22_CURRENT_NURSE2';\r\n xdsDynamicGrid22_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid22_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid22_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22_CURRENT_NURSE1.Name := 'xdsDynamicGrid22_CURRENT_NURSE1';\r\n xdsDynamicGrid22_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid22_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid22_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22_CURRENT_PROVIDER.Name := 'xdsDynamicGrid22_CURRENT_PROVIDER';\r\n xdsDynamicGrid22_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid22_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid22_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid22_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid22_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid22_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid22_CURRENT_MRN.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22_CURRENT_MRN.Name := 'xdsDynamicGrid22_CURRENT_MRN';\r\n xdsDynamicGrid22_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid22_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid22_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22_CURRENT_APPTNAME.Name := 'xdsDynamicGrid22_CURRENT_APPTNAME';\r\n xdsDynamicGrid22_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid22_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid22_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22_CURRENT_MEDID.Name := 'xdsDynamicGrid22_CURRENT_MEDID';\r\n xdsDynamicGrid22_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid22_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid22_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid22_CURRENT_PROBLEMID';\r\n xdsDynamicGrid22_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid22_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid22_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid22_CURRENT_ALLERGYID';\r\n xdsDynamicGrid22_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid22_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid22_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid22_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid22_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid22_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid22_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid22_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid22_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid22_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid22_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid22_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid22_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid22_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid22_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid22_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid22_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid22_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid22_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22_CURRENT_APPTDATE.Name := 'xdsDynamicGrid22_CURRENT_APPTDATE';\r\n xdsDynamicGrid22_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid22_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid22_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22_PATIENTFHIRID.Name := 'xdsDynamicGrid22_PATIENTFHIRID';\r\n xdsDynamicGrid22_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid22_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid22_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22_PATIENTCERNERID.Name := 'xdsDynamicGrid22_PATIENTCERNERID';\r\n xdsDynamicGrid22_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid22_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid22_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22_SETUPFACILITYID.Name := 'xdsDynamicGrid22_SETUPFACILITYID';\r\n xdsDynamicGrid22_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid22_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid22_USERID.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22_USERID.Name := 'xdsDynamicGrid22_USERID';\r\n xdsDynamicGrid22_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid22_USERID.Size := 256;\r\n xdsDynamicGrid22NEW_RECORD.SetParentComponent(xdsDynamicGrid22);\r\n xdsDynamicGrid22NEW_RECORD.Name := 'xdsDynamicGrid22NEW_RECORD';\r\n xdsDynamicGrid22NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid22.SetParentComponent(Self);\r\n dsDynamicGrid22.Name := 'dsDynamicGrid22';\r\n dsDynamicGrid22.DataSet := xdsDynamicGrid22;\r\n dsDynamicGrid22.Left := 491;\r\n dsDynamicGrid22.Top := 392;\r\n xdsDynamicGrid23.SetParentComponent(Self);\r\n xdsDynamicGrid23.Name := 'xdsDynamicGrid23';\r\n xdsDynamicGrid23.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid23.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid23.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid23, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid23.Left := 611;\r\n xdsDynamicGrid23.Top := 352;\r\n xdsDynamicGrid23C1.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23C1.Name := 'xdsDynamicGrid23C1';\r\n xdsDynamicGrid23C1.FieldName := 'C1';\r\n xdsDynamicGrid23C1.Size := 1024;\r\n xdsDynamicGrid23C2.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23C2.Name := 'xdsDynamicGrid23C2';\r\n xdsDynamicGrid23C2.FieldName := 'C2';\r\n xdsDynamicGrid23C2.Size := 1024;\r\n xdsDynamicGrid23C3.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23C3.Name := 'xdsDynamicGrid23C3';\r\n xdsDynamicGrid23C3.FieldName := 'C3';\r\n xdsDynamicGrid23C3.Size := 1024;\r\n xdsDynamicGrid23C4.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23C4.Name := 'xdsDynamicGrid23C4';\r\n xdsDynamicGrid23C4.FieldName := 'C4';\r\n xdsDynamicGrid23C4.Size := 1024;\r\n xdsDynamicGrid23C5.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23C5.Name := 'xdsDynamicGrid23C5';\r\n xdsDynamicGrid23C5.FieldName := 'C5';\r\n xdsDynamicGrid23C5.Size := 1024;\r\n xdsDynamicGrid23C6.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23C6.Name := 'xdsDynamicGrid23C6';\r\n xdsDynamicGrid23C6.FieldName := 'C6';\r\n xdsDynamicGrid23C6.Size := 1024;\r\n xdsDynamicGrid23C7.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23C7.Name := 'xdsDynamicGrid23C7';\r\n xdsDynamicGrid23C7.FieldName := 'C7';\r\n xdsDynamicGrid23C7.Size := 1024;\r\n xdsDynamicGrid23C8.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23C8.Name := 'xdsDynamicGrid23C8';\r\n xdsDynamicGrid23C8.FieldName := 'C8';\r\n xdsDynamicGrid23C8.Size := 1024;\r\n xdsDynamicGrid23C9.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23C9.Name := 'xdsDynamicGrid23C9';\r\n xdsDynamicGrid23C9.FieldName := 'C9';\r\n xdsDynamicGrid23C9.Size := 1024;\r\n xdsDynamicGrid23C11.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23C11.Name := 'xdsDynamicGrid23C11';\r\n xdsDynamicGrid23C11.FieldName := 'C11';\r\n xdsDynamicGrid23C11.Size := 1024;\r\n xdsDynamicGrid23C10.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23C10.Name := 'xdsDynamicGrid23C10';\r\n xdsDynamicGrid23C10.FieldName := 'C10';\r\n xdsDynamicGrid23C10.Size := 1024;\r\n xdsDynamicGrid23C12.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23C12.Name := 'xdsDynamicGrid23C12';\r\n xdsDynamicGrid23C12.FieldName := 'C12';\r\n xdsDynamicGrid23C12.Size := 1024;\r\n xdsDynamicGrid23C14.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23C14.Name := 'xdsDynamicGrid23C14';\r\n xdsDynamicGrid23C14.FieldName := 'C14';\r\n xdsDynamicGrid23C14.Size := 1024;\r\n xdsDynamicGrid23C15.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23C15.Name := 'xdsDynamicGrid23C15';\r\n xdsDynamicGrid23C15.FieldName := 'C15';\r\n xdsDynamicGrid23C15.Size := 1024;\r\n xdsDynamicGrid23C13.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23C13.Name := 'xdsDynamicGrid23C13';\r\n xdsDynamicGrid23C13.FieldName := 'C13';\r\n xdsDynamicGrid23C13.Size := 1024;\r\n xdsDynamicGrid23C16.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23C16.Name := 'xdsDynamicGrid23C16';\r\n xdsDynamicGrid23C16.FieldName := 'C16';\r\n xdsDynamicGrid23C16.Size := 1024;\r\n xdsDynamicGrid23C17.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23C17.Name := 'xdsDynamicGrid23C17';\r\n xdsDynamicGrid23C17.FieldName := 'C17';\r\n xdsDynamicGrid23C17.Size := 1024;\r\n xdsDynamicGrid23C18.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23C18.Name := 'xdsDynamicGrid23C18';\r\n xdsDynamicGrid23C18.FieldName := 'C18';\r\n xdsDynamicGrid23C18.Size := 1024;\r\n xdsDynamicGrid23C19.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23C19.Name := 'xdsDynamicGrid23C19';\r\n xdsDynamicGrid23C19.FieldName := 'C19';\r\n xdsDynamicGrid23C19.Size := 1024;\r\n xdsDynamicGrid23C20.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23C20.Name := 'xdsDynamicGrid23C20';\r\n xdsDynamicGrid23C20.FieldName := 'C20';\r\n xdsDynamicGrid23C20.Size := 1024;\r\n xdsDynamicGrid23_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23_CURRENT_NURSE2.Name := 'xdsDynamicGrid23_CURRENT_NURSE2';\r\n xdsDynamicGrid23_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid23_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid23_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23_CURRENT_NURSE1.Name := 'xdsDynamicGrid23_CURRENT_NURSE1';\r\n xdsDynamicGrid23_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid23_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid23_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23_CURRENT_PROVIDER.Name := 'xdsDynamicGrid23_CURRENT_PROVIDER';\r\n xdsDynamicGrid23_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid23_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid23_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid23_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid23_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid23_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid23_CURRENT_MRN.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23_CURRENT_MRN.Name := 'xdsDynamicGrid23_CURRENT_MRN';\r\n xdsDynamicGrid23_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid23_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid23_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23_CURRENT_APPTNAME.Name := 'xdsDynamicGrid23_CURRENT_APPTNAME';\r\n xdsDynamicGrid23_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid23_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid23_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23_CURRENT_MEDID.Name := 'xdsDynamicGrid23_CURRENT_MEDID';\r\n xdsDynamicGrid23_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid23_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid23_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid23_CURRENT_PROBLEMID';\r\n xdsDynamicGrid23_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid23_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid23_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid23_CURRENT_ALLERGYID';\r\n xdsDynamicGrid23_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid23_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid23_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid23_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid23_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid23_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid23_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid23_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid23_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid23_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid23_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid23_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid23_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid23_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid23_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid23_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid23_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid23_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid23_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23_CURRENT_APPTDATE.Name := 'xdsDynamicGrid23_CURRENT_APPTDATE';\r\n xdsDynamicGrid23_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid23_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid23_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23_PATIENTFHIRID.Name := 'xdsDynamicGrid23_PATIENTFHIRID';\r\n xdsDynamicGrid23_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid23_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid23_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23_PATIENTCERNERID.Name := 'xdsDynamicGrid23_PATIENTCERNERID';\r\n xdsDynamicGrid23_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid23_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid23_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23_SETUPFACILITYID.Name := 'xdsDynamicGrid23_SETUPFACILITYID';\r\n xdsDynamicGrid23_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid23_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid23_USERID.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23_USERID.Name := 'xdsDynamicGrid23_USERID';\r\n xdsDynamicGrid23_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid23_USERID.Size := 256;\r\n xdsDynamicGrid23NEW_RECORD.SetParentComponent(xdsDynamicGrid23);\r\n xdsDynamicGrid23NEW_RECORD.Name := 'xdsDynamicGrid23NEW_RECORD';\r\n xdsDynamicGrid23NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid23.SetParentComponent(Self);\r\n dsDynamicGrid23.Name := 'dsDynamicGrid23';\r\n dsDynamicGrid23.DataSet := xdsDynamicGrid23;\r\n dsDynamicGrid23.Left := 611;\r\n dsDynamicGrid23.Top := 392;\r\n xdsDynamicGrid24.SetParentComponent(Self);\r\n xdsDynamicGrid24.Name := 'xdsDynamicGrid24';\r\n xdsDynamicGrid24.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid24.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid24.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid24, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid24.Left := 723;\r\n xdsDynamicGrid24.Top := 352;\r\n xdsDynamicGrid24C1.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24C1.Name := 'xdsDynamicGrid24C1';\r\n xdsDynamicGrid24C1.FieldName := 'C1';\r\n xdsDynamicGrid24C1.Size := 1024;\r\n xdsDynamicGrid24C2.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24C2.Name := 'xdsDynamicGrid24C2';\r\n xdsDynamicGrid24C2.FieldName := 'C2';\r\n xdsDynamicGrid24C2.Size := 1024;\r\n xdsDynamicGrid24C3.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24C3.Name := 'xdsDynamicGrid24C3';\r\n xdsDynamicGrid24C3.FieldName := 'C3';\r\n xdsDynamicGrid24C3.Size := 1024;\r\n xdsDynamicGrid24C4.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24C4.Name := 'xdsDynamicGrid24C4';\r\n xdsDynamicGrid24C4.FieldName := 'C4';\r\n xdsDynamicGrid24C4.Size := 1024;\r\n xdsDynamicGrid24C5.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24C5.Name := 'xdsDynamicGrid24C5';\r\n xdsDynamicGrid24C5.FieldName := 'C5';\r\n xdsDynamicGrid24C5.Size := 1024;\r\n xdsDynamicGrid24C6.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24C6.Name := 'xdsDynamicGrid24C6';\r\n xdsDynamicGrid24C6.FieldName := 'C6';\r\n xdsDynamicGrid24C6.Size := 1024;\r\n xdsDynamicGrid24C7.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24C7.Name := 'xdsDynamicGrid24C7';\r\n xdsDynamicGrid24C7.FieldName := 'C7';\r\n xdsDynamicGrid24C7.Size := 1024;\r\n xdsDynamicGrid24C8.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24C8.Name := 'xdsDynamicGrid24C8';\r\n xdsDynamicGrid24C8.FieldName := 'C8';\r\n xdsDynamicGrid24C8.Size := 1024;\r\n xdsDynamicGrid24C9.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24C9.Name := 'xdsDynamicGrid24C9';\r\n xdsDynamicGrid24C9.FieldName := 'C9';\r\n xdsDynamicGrid24C9.Size := 1024;\r\n xdsDynamicGrid24C11.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24C11.Name := 'xdsDynamicGrid24C11';\r\n xdsDynamicGrid24C11.FieldName := 'C11';\r\n xdsDynamicGrid24C11.Size := 1024;\r\n xdsDynamicGrid24C10.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24C10.Name := 'xdsDynamicGrid24C10';\r\n xdsDynamicGrid24C10.FieldName := 'C10';\r\n xdsDynamicGrid24C10.Size := 1024;\r\n xdsDynamicGrid24C12.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24C12.Name := 'xdsDynamicGrid24C12';\r\n xdsDynamicGrid24C12.FieldName := 'C12';\r\n xdsDynamicGrid24C12.Size := 1024;\r\n xdsDynamicGrid24C14.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24C14.Name := 'xdsDynamicGrid24C14';\r\n xdsDynamicGrid24C14.FieldName := 'C14';\r\n xdsDynamicGrid24C14.Size := 1024;\r\n xdsDynamicGrid24C15.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24C15.Name := 'xdsDynamicGrid24C15';\r\n xdsDynamicGrid24C15.FieldName := 'C15';\r\n xdsDynamicGrid24C15.Size := 1024;\r\n xdsDynamicGrid24C13.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24C13.Name := 'xdsDynamicGrid24C13';\r\n xdsDynamicGrid24C13.FieldName := 'C13';\r\n xdsDynamicGrid24C13.Size := 1024;\r\n xdsDynamicGrid24C16.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24C16.Name := 'xdsDynamicGrid24C16';\r\n xdsDynamicGrid24C16.FieldName := 'C16';\r\n xdsDynamicGrid24C16.Size := 1024;\r\n xdsDynamicGrid24C17.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24C17.Name := 'xdsDynamicGrid24C17';\r\n xdsDynamicGrid24C17.FieldName := 'C17';\r\n xdsDynamicGrid24C17.Size := 1024;\r\n xdsDynamicGrid24C18.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24C18.Name := 'xdsDynamicGrid24C18';\r\n xdsDynamicGrid24C18.FieldName := 'C18';\r\n xdsDynamicGrid24C18.Size := 1024;\r\n xdsDynamicGrid24C19.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24C19.Name := 'xdsDynamicGrid24C19';\r\n xdsDynamicGrid24C19.FieldName := 'C19';\r\n xdsDynamicGrid24C19.Size := 1024;\r\n xdsDynamicGrid24C20.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24C20.Name := 'xdsDynamicGrid24C20';\r\n xdsDynamicGrid24C20.FieldName := 'C20';\r\n xdsDynamicGrid24C20.Size := 1024;\r\n xdsDynamicGrid24_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24_CURRENT_NURSE2.Name := 'xdsDynamicGrid24_CURRENT_NURSE2';\r\n xdsDynamicGrid24_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid24_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid24_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24_CURRENT_NURSE1.Name := 'xdsDynamicGrid24_CURRENT_NURSE1';\r\n xdsDynamicGrid24_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid24_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid24_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24_CURRENT_PROVIDER.Name := 'xdsDynamicGrid24_CURRENT_PROVIDER';\r\n xdsDynamicGrid24_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid24_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid24_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid24_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid24_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid24_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid24_CURRENT_MRN.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24_CURRENT_MRN.Name := 'xdsDynamicGrid24_CURRENT_MRN';\r\n xdsDynamicGrid24_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid24_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid24_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24_CURRENT_APPTNAME.Name := 'xdsDynamicGrid24_CURRENT_APPTNAME';\r\n xdsDynamicGrid24_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid24_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid24_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24_CURRENT_MEDID.Name := 'xdsDynamicGrid24_CURRENT_MEDID';\r\n xdsDynamicGrid24_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid24_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid24_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid24_CURRENT_PROBLEMID';\r\n xdsDynamicGrid24_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid24_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid24_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid24_CURRENT_ALLERGYID';\r\n xdsDynamicGrid24_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid24_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid24_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid24_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid24_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid24_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid24_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid24_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid24_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid24_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid24_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid24_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid24_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid24_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid24_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid24_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid24_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid24_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid24_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24_CURRENT_APPTDATE.Name := 'xdsDynamicGrid24_CURRENT_APPTDATE';\r\n xdsDynamicGrid24_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid24_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid24_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24_PATIENTFHIRID.Name := 'xdsDynamicGrid24_PATIENTFHIRID';\r\n xdsDynamicGrid24_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid24_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid24_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24_PATIENTCERNERID.Name := 'xdsDynamicGrid24_PATIENTCERNERID';\r\n xdsDynamicGrid24_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid24_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid24_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24_SETUPFACILITYID.Name := 'xdsDynamicGrid24_SETUPFACILITYID';\r\n xdsDynamicGrid24_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid24_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid24_USERID.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24_USERID.Name := 'xdsDynamicGrid24_USERID';\r\n xdsDynamicGrid24_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid24_USERID.Size := 256;\r\n xdsDynamicGrid24NEW_RECORD.SetParentComponent(xdsDynamicGrid24);\r\n xdsDynamicGrid24NEW_RECORD.Name := 'xdsDynamicGrid24NEW_RECORD';\r\n xdsDynamicGrid24NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid1524.SetParentComponent(Self);\r\n dsDynamicGrid1524.Name := 'dsDynamicGrid1524';\r\n dsDynamicGrid1524.DataSet := xdsDynamicGrid24;\r\n dsDynamicGrid1524.Left := 723;\r\n dsDynamicGrid1524.Top := 392;\r\n xdsDynamicGrid25.SetParentComponent(Self);\r\n xdsDynamicGrid25.Name := 'xdsDynamicGrid25';\r\n xdsDynamicGrid25.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid25.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid25.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid25, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid25.Left := 843;\r\n xdsDynamicGrid25.Top := 352;\r\n xdsDynamicGrid25C1.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25C1.Name := 'xdsDynamicGrid25C1';\r\n xdsDynamicGrid25C1.FieldName := 'C1';\r\n xdsDynamicGrid25C1.Size := 1024;\r\n xdsDynamicGrid25C2.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25C2.Name := 'xdsDynamicGrid25C2';\r\n xdsDynamicGrid25C2.FieldName := 'C2';\r\n xdsDynamicGrid25C2.Size := 1024;\r\n xdsDynamicGrid25C3.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25C3.Name := 'xdsDynamicGrid25C3';\r\n xdsDynamicGrid25C3.FieldName := 'C3';\r\n xdsDynamicGrid25C3.Size := 1024;\r\n xdsDynamicGrid25C4.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25C4.Name := 'xdsDynamicGrid25C4';\r\n xdsDynamicGrid25C4.FieldName := 'C4';\r\n xdsDynamicGrid25C4.Size := 1024;\r\n xdsDynamicGrid25C5.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25C5.Name := 'xdsDynamicGrid25C5';\r\n xdsDynamicGrid25C5.FieldName := 'C5';\r\n xdsDynamicGrid25C5.Size := 1024;\r\n xdsDynamicGrid25C6.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25C6.Name := 'xdsDynamicGrid25C6';\r\n xdsDynamicGrid25C6.FieldName := 'C6';\r\n xdsDynamicGrid25C6.Size := 1024;\r\n xdsDynamicGrid25C7.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25C7.Name := 'xdsDynamicGrid25C7';\r\n xdsDynamicGrid25C7.FieldName := 'C7';\r\n xdsDynamicGrid25C7.Size := 1024;\r\n xdsDynamicGrid25C8.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25C8.Name := 'xdsDynamicGrid25C8';\r\n xdsDynamicGrid25C8.FieldName := 'C8';\r\n xdsDynamicGrid25C8.Size := 1024;\r\n xdsDynamicGrid25C9.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25C9.Name := 'xdsDynamicGrid25C9';\r\n xdsDynamicGrid25C9.FieldName := 'C9';\r\n xdsDynamicGrid25C9.Size := 1024;\r\n xdsDynamicGrid25C11.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25C11.Name := 'xdsDynamicGrid25C11';\r\n xdsDynamicGrid25C11.FieldName := 'C11';\r\n xdsDynamicGrid25C11.Size := 1024;\r\n xdsDynamicGrid25C10.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25C10.Name := 'xdsDynamicGrid25C10';\r\n xdsDynamicGrid25C10.FieldName := 'C10';\r\n xdsDynamicGrid25C10.Size := 1024;\r\n xdsDynamicGrid25C12.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25C12.Name := 'xdsDynamicGrid25C12';\r\n xdsDynamicGrid25C12.FieldName := 'C12';\r\n xdsDynamicGrid25C12.Size := 1024;\r\n xdsDynamicGrid25C14.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25C14.Name := 'xdsDynamicGrid25C14';\r\n xdsDynamicGrid25C14.FieldName := 'C14';\r\n xdsDynamicGrid25C14.Size := 1024;\r\n xdsDynamicGrid25C15.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25C15.Name := 'xdsDynamicGrid25C15';\r\n xdsDynamicGrid25C15.FieldName := 'C15';\r\n xdsDynamicGrid25C15.Size := 1024;\r\n xdsDynamicGrid25C13.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25C13.Name := 'xdsDynamicGrid25C13';\r\n xdsDynamicGrid25C13.FieldName := 'C13';\r\n xdsDynamicGrid25C13.Size := 1024;\r\n xdsDynamicGrid25C16.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25C16.Name := 'xdsDynamicGrid25C16';\r\n xdsDynamicGrid25C16.FieldName := 'C16';\r\n xdsDynamicGrid25C16.Size := 1024;\r\n xdsDynamicGrid25C17.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25C17.Name := 'xdsDynamicGrid25C17';\r\n xdsDynamicGrid25C17.FieldName := 'C17';\r\n xdsDynamicGrid25C17.Size := 1024;\r\n xdsDynamicGrid25C18.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25C18.Name := 'xdsDynamicGrid25C18';\r\n xdsDynamicGrid25C18.FieldName := 'C18';\r\n xdsDynamicGrid25C18.Size := 1024;\r\n xdsDynamicGrid25C19.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25C19.Name := 'xdsDynamicGrid25C19';\r\n xdsDynamicGrid25C19.FieldName := 'C19';\r\n xdsDynamicGrid25C19.Size := 1024;\r\n xdsDynamicGrid25C20.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25C20.Name := 'xdsDynamicGrid25C20';\r\n xdsDynamicGrid25C20.FieldName := 'C20';\r\n xdsDynamicGrid25C20.Size := 1024;\r\n xdsDynamicGrid25_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25_CURRENT_NURSE2.Name := 'xdsDynamicGrid25_CURRENT_NURSE2';\r\n xdsDynamicGrid25_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid25_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid25_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25_CURRENT_NURSE1.Name := 'xdsDynamicGrid25_CURRENT_NURSE1';\r\n xdsDynamicGrid25_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid25_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid25_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25_CURRENT_PROVIDER.Name := 'xdsDynamicGrid25_CURRENT_PROVIDER';\r\n xdsDynamicGrid25_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid25_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid25_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid25_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid25_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid25_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid25_CURRENT_MRN.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25_CURRENT_MRN.Name := 'xdsDynamicGrid25_CURRENT_MRN';\r\n xdsDynamicGrid25_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid25_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid25_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25_CURRENT_APPTNAME.Name := 'xdsDynamicGrid25_CURRENT_APPTNAME';\r\n xdsDynamicGrid25_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid25_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid25_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25_CURRENT_MEDID.Name := 'xdsDynamicGrid25_CURRENT_MEDID';\r\n xdsDynamicGrid25_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid25_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid25_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid25_CURRENT_PROBLEMID';\r\n xdsDynamicGrid25_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid25_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid25_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid25_CURRENT_ALLERGYID';\r\n xdsDynamicGrid25_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid25_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid25_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid25_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid25_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid25_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid25_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid25_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid25_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid25_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid25_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid25_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid25_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid25_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid25_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid25_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid25_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid25_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid25_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25_CURRENT_APPTDATE.Name := 'xdsDynamicGrid25_CURRENT_APPTDATE';\r\n xdsDynamicGrid25_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid25_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid25_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25_PATIENTFHIRID.Name := 'xdsDynamicGrid25_PATIENTFHIRID';\r\n xdsDynamicGrid25_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid25_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid25_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25_PATIENTCERNERID.Name := 'xdsDynamicGrid25_PATIENTCERNERID';\r\n xdsDynamicGrid25_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid25_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid25_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25_SETUPFACILITYID.Name := 'xdsDynamicGrid25_SETUPFACILITYID';\r\n xdsDynamicGrid25_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid25_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid25_USERID.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25_USERID.Name := 'xdsDynamicGrid25_USERID';\r\n xdsDynamicGrid25_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid25_USERID.Size := 256;\r\n xdsDynamicGrid25NEW_RECORD.SetParentComponent(xdsDynamicGrid25);\r\n xdsDynamicGrid25NEW_RECORD.Name := 'xdsDynamicGrid25NEW_RECORD';\r\n xdsDynamicGrid25NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid25.SetParentComponent(Self);\r\n dsDynamicGrid25.Name := 'dsDynamicGrid25';\r\n dsDynamicGrid25.DataSet := xdsDynamicGrid25;\r\n dsDynamicGrid25.Left := 843;\r\n dsDynamicGrid25.Top := 392;\r\n xdsDynamicGrid26.SetParentComponent(Self);\r\n xdsDynamicGrid26.Name := 'xdsDynamicGrid26';\r\n xdsDynamicGrid26.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid26.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid26.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid26, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid26.Left := 395;\r\n xdsDynamicGrid26.Top := 432;\r\n xdsDynamicGrid26C1.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26C1.Name := 'xdsDynamicGrid26C1';\r\n xdsDynamicGrid26C1.FieldName := 'C1';\r\n xdsDynamicGrid26C1.Size := 1024;\r\n xdsDynamicGrid26C2.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26C2.Name := 'xdsDynamicGrid26C2';\r\n xdsDynamicGrid26C2.FieldName := 'C2';\r\n xdsDynamicGrid26C2.Size := 1024;\r\n xdsDynamicGrid26C3.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26C3.Name := 'xdsDynamicGrid26C3';\r\n xdsDynamicGrid26C3.FieldName := 'C3';\r\n xdsDynamicGrid26C3.Size := 1024;\r\n xdsDynamicGrid26C4.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26C4.Name := 'xdsDynamicGrid26C4';\r\n xdsDynamicGrid26C4.FieldName := 'C4';\r\n xdsDynamicGrid26C4.Size := 1024;\r\n xdsDynamicGrid26C5.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26C5.Name := 'xdsDynamicGrid26C5';\r\n xdsDynamicGrid26C5.FieldName := 'C5';\r\n xdsDynamicGrid26C5.Size := 1024;\r\n xdsDynamicGrid26C6.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26C6.Name := 'xdsDynamicGrid26C6';\r\n xdsDynamicGrid26C6.FieldName := 'C6';\r\n xdsDynamicGrid26C6.Size := 1024;\r\n xdsDynamicGrid26C7.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26C7.Name := 'xdsDynamicGrid26C7';\r\n xdsDynamicGrid26C7.FieldName := 'C7';\r\n xdsDynamicGrid26C7.Size := 1024;\r\n xdsDynamicGrid26C8.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26C8.Name := 'xdsDynamicGrid26C8';\r\n xdsDynamicGrid26C8.FieldName := 'C8';\r\n xdsDynamicGrid26C8.Size := 1024;\r\n xdsDynamicGrid26C9.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26C9.Name := 'xdsDynamicGrid26C9';\r\n xdsDynamicGrid26C9.FieldName := 'C9';\r\n xdsDynamicGrid26C9.Size := 1024;\r\n xdsDynamicGrid26C11.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26C11.Name := 'xdsDynamicGrid26C11';\r\n xdsDynamicGrid26C11.FieldName := 'C11';\r\n xdsDynamicGrid26C11.Size := 1024;\r\n xdsDynamicGrid26C10.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26C10.Name := 'xdsDynamicGrid26C10';\r\n xdsDynamicGrid26C10.FieldName := 'C10';\r\n xdsDynamicGrid26C10.Size := 1024;\r\n xdsDynamicGrid26C12.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26C12.Name := 'xdsDynamicGrid26C12';\r\n xdsDynamicGrid26C12.FieldName := 'C12';\r\n xdsDynamicGrid26C12.Size := 1024;\r\n xdsDynamicGrid26C14.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26C14.Name := 'xdsDynamicGrid26C14';\r\n xdsDynamicGrid26C14.FieldName := 'C14';\r\n xdsDynamicGrid26C14.Size := 1024;\r\n xdsDynamicGrid26C15.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26C15.Name := 'xdsDynamicGrid26C15';\r\n xdsDynamicGrid26C15.FieldName := 'C15';\r\n xdsDynamicGrid26C15.Size := 1024;\r\n xdsDynamicGrid26C13.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26C13.Name := 'xdsDynamicGrid26C13';\r\n xdsDynamicGrid26C13.FieldName := 'C13';\r\n xdsDynamicGrid26C13.Size := 1024;\r\n xdsDynamicGrid26C16.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26C16.Name := 'xdsDynamicGrid26C16';\r\n xdsDynamicGrid26C16.FieldName := 'C16';\r\n xdsDynamicGrid26C16.Size := 1024;\r\n xdsDynamicGrid26C17.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26C17.Name := 'xdsDynamicGrid26C17';\r\n xdsDynamicGrid26C17.FieldName := 'C17';\r\n xdsDynamicGrid26C17.Size := 1024;\r\n xdsDynamicGrid26C18.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26C18.Name := 'xdsDynamicGrid26C18';\r\n xdsDynamicGrid26C18.FieldName := 'C18';\r\n xdsDynamicGrid26C18.Size := 1024;\r\n xdsDynamicGrid26C19.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26C19.Name := 'xdsDynamicGrid26C19';\r\n xdsDynamicGrid26C19.FieldName := 'C19';\r\n xdsDynamicGrid26C19.Size := 1024;\r\n xdsDynamicGrid26C20.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26C20.Name := 'xdsDynamicGrid26C20';\r\n xdsDynamicGrid26C20.FieldName := 'C20';\r\n xdsDynamicGrid26C20.Size := 1024;\r\n xdsDynamicGrid26_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26_CURRENT_NURSE2.Name := 'xdsDynamicGrid26_CURRENT_NURSE2';\r\n xdsDynamicGrid26_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid26_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid26_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26_CURRENT_NURSE1.Name := 'xdsDynamicGrid26_CURRENT_NURSE1';\r\n xdsDynamicGrid26_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid26_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid26_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26_CURRENT_PROVIDER.Name := 'xdsDynamicGrid26_CURRENT_PROVIDER';\r\n xdsDynamicGrid26_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid26_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid26_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid26_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid26_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid26_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid26_CURRENT_MRN.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26_CURRENT_MRN.Name := 'xdsDynamicGrid26_CURRENT_MRN';\r\n xdsDynamicGrid26_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid26_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid26_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26_CURRENT_APPTNAME.Name := 'xdsDynamicGrid26_CURRENT_APPTNAME';\r\n xdsDynamicGrid26_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid26_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid26_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26_CURRENT_MEDID.Name := 'xdsDynamicGrid26_CURRENT_MEDID';\r\n xdsDynamicGrid26_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid26_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid26_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid26_CURRENT_PROBLEMID';\r\n xdsDynamicGrid26_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid26_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid26_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid26_CURRENT_ALLERGYID';\r\n xdsDynamicGrid26_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid26_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid26_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid26_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid26_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid26_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid26_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid26_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid26_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid26_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid26_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid26_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid26_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid26_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid26_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid26_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid26_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid26_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid26_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26_CURRENT_APPTDATE.Name := 'xdsDynamicGrid26_CURRENT_APPTDATE';\r\n xdsDynamicGrid26_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid26_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid26_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26_PATIENTFHIRID.Name := 'xdsDynamicGrid26_PATIENTFHIRID';\r\n xdsDynamicGrid26_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid26_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid26_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26_PATIENTCERNERID.Name := 'xdsDynamicGrid26_PATIENTCERNERID';\r\n xdsDynamicGrid26_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid26_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid26_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26_SETUPFACILITYID.Name := 'xdsDynamicGrid26_SETUPFACILITYID';\r\n xdsDynamicGrid26_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid26_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid26_USERID.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26_USERID.Name := 'xdsDynamicGrid26_USERID';\r\n xdsDynamicGrid26_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid26_USERID.Size := 256;\r\n xdsDynamicGrid26NEW_RECORD.SetParentComponent(xdsDynamicGrid26);\r\n xdsDynamicGrid26NEW_RECORD.Name := 'xdsDynamicGrid26NEW_RECORD';\r\n xdsDynamicGrid26NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid26.SetParentComponent(Self);\r\n dsDynamicGrid26.Name := 'dsDynamicGrid26';\r\n dsDynamicGrid26.DataSet := xdsDynamicGrid26;\r\n dsDynamicGrid26.Left := 395;\r\n dsDynamicGrid26.Top := 480;\r\n xdsDynamicGrid27.SetParentComponent(Self);\r\n xdsDynamicGrid27.Name := 'xdsDynamicGrid27';\r\n xdsDynamicGrid27.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid27.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid27.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid27, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid27.Left := 491;\r\n xdsDynamicGrid27.Top := 432;\r\n xdsDynamicGrid27C1.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27C1.Name := 'xdsDynamicGrid27C1';\r\n xdsDynamicGrid27C1.FieldName := 'C1';\r\n xdsDynamicGrid27C1.Size := 1024;\r\n xdsDynamicGrid27C2.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27C2.Name := 'xdsDynamicGrid27C2';\r\n xdsDynamicGrid27C2.FieldName := 'C2';\r\n xdsDynamicGrid27C2.Size := 1024;\r\n xdsDynamicGrid27C3.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27C3.Name := 'xdsDynamicGrid27C3';\r\n xdsDynamicGrid27C3.FieldName := 'C3';\r\n xdsDynamicGrid27C3.Size := 1024;\r\n xdsDynamicGrid27C4.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27C4.Name := 'xdsDynamicGrid27C4';\r\n xdsDynamicGrid27C4.FieldName := 'C4';\r\n xdsDynamicGrid27C4.Size := 1024;\r\n xdsDynamicGrid27C5.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27C5.Name := 'xdsDynamicGrid27C5';\r\n xdsDynamicGrid27C5.FieldName := 'C5';\r\n xdsDynamicGrid27C5.Size := 1024;\r\n xdsDynamicGrid27C6.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27C6.Name := 'xdsDynamicGrid27C6';\r\n xdsDynamicGrid27C6.FieldName := 'C6';\r\n xdsDynamicGrid27C6.Size := 1024;\r\n xdsDynamicGrid27C7.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27C7.Name := 'xdsDynamicGrid27C7';\r\n xdsDynamicGrid27C7.FieldName := 'C7';\r\n xdsDynamicGrid27C7.Size := 1024;\r\n xdsDynamicGrid27C8.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27C8.Name := 'xdsDynamicGrid27C8';\r\n xdsDynamicGrid27C8.FieldName := 'C8';\r\n xdsDynamicGrid27C8.Size := 1024;\r\n xdsDynamicGrid27C9.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27C9.Name := 'xdsDynamicGrid27C9';\r\n xdsDynamicGrid27C9.FieldName := 'C9';\r\n xdsDynamicGrid27C9.Size := 1024;\r\n xdsDynamicGrid27C11.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27C11.Name := 'xdsDynamicGrid27C11';\r\n xdsDynamicGrid27C11.FieldName := 'C11';\r\n xdsDynamicGrid27C11.Size := 1024;\r\n xdsDynamicGrid27C10.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27C10.Name := 'xdsDynamicGrid27C10';\r\n xdsDynamicGrid27C10.FieldName := 'C10';\r\n xdsDynamicGrid27C10.Size := 1024;\r\n xdsDynamicGrid27C12.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27C12.Name := 'xdsDynamicGrid27C12';\r\n xdsDynamicGrid27C12.FieldName := 'C12';\r\n xdsDynamicGrid27C12.Size := 1024;\r\n xdsDynamicGrid27C14.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27C14.Name := 'xdsDynamicGrid27C14';\r\n xdsDynamicGrid27C14.FieldName := 'C14';\r\n xdsDynamicGrid27C14.Size := 1024;\r\n xdsDynamicGrid27C15.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27C15.Name := 'xdsDynamicGrid27C15';\r\n xdsDynamicGrid27C15.FieldName := 'C15';\r\n xdsDynamicGrid27C15.Size := 1024;\r\n xdsDynamicGrid27C13.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27C13.Name := 'xdsDynamicGrid27C13';\r\n xdsDynamicGrid27C13.FieldName := 'C13';\r\n xdsDynamicGrid27C13.Size := 1024;\r\n xdsDynamicGrid27C16.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27C16.Name := 'xdsDynamicGrid27C16';\r\n xdsDynamicGrid27C16.FieldName := 'C16';\r\n xdsDynamicGrid27C16.Size := 1024;\r\n xdsDynamicGrid27C17.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27C17.Name := 'xdsDynamicGrid27C17';\r\n xdsDynamicGrid27C17.FieldName := 'C17';\r\n xdsDynamicGrid27C17.Size := 1024;\r\n xdsDynamicGrid27C18.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27C18.Name := 'xdsDynamicGrid27C18';\r\n xdsDynamicGrid27C18.FieldName := 'C18';\r\n xdsDynamicGrid27C18.Size := 1024;\r\n xdsDynamicGrid27C19.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27C19.Name := 'xdsDynamicGrid27C19';\r\n xdsDynamicGrid27C19.FieldName := 'C19';\r\n xdsDynamicGrid27C19.Size := 1024;\r\n xdsDynamicGrid27C20.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27C20.Name := 'xdsDynamicGrid27C20';\r\n xdsDynamicGrid27C20.FieldName := 'C20';\r\n xdsDynamicGrid27C20.Size := 1024;\r\n xdsDynamicGrid27_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27_CURRENT_NURSE2.Name := 'xdsDynamicGrid27_CURRENT_NURSE2';\r\n xdsDynamicGrid27_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid27_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid27_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27_CURRENT_NURSE1.Name := 'xdsDynamicGrid27_CURRENT_NURSE1';\r\n xdsDynamicGrid27_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid27_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid27_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27_CURRENT_PROVIDER.Name := 'xdsDynamicGrid27_CURRENT_PROVIDER';\r\n xdsDynamicGrid27_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid27_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid27_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid27_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid27_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid27_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid27_CURRENT_MRN.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27_CURRENT_MRN.Name := 'xdsDynamicGrid27_CURRENT_MRN';\r\n xdsDynamicGrid27_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid27_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid27_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27_CURRENT_APPTNAME.Name := 'xdsDynamicGrid27_CURRENT_APPTNAME';\r\n xdsDynamicGrid27_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid27_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid27_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27_CURRENT_MEDID.Name := 'xdsDynamicGrid27_CURRENT_MEDID';\r\n xdsDynamicGrid27_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid27_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid27_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid27_CURRENT_PROBLEMID';\r\n xdsDynamicGrid27_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid27_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid27_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid27_CURRENT_ALLERGYID';\r\n xdsDynamicGrid27_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid27_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid27_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid27_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid27_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid27_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid27_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid27_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid27_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid27_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid27_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid27_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid27_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid27_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid27_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid27_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid27_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid27_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid27_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27_CURRENT_APPTDATE.Name := 'xdsDynamicGrid27_CURRENT_APPTDATE';\r\n xdsDynamicGrid27_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid27_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid27_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27_PATIENTFHIRID.Name := 'xdsDynamicGrid27_PATIENTFHIRID';\r\n xdsDynamicGrid27_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid27_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid27_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27_PATIENTCERNERID.Name := 'xdsDynamicGrid27_PATIENTCERNERID';\r\n xdsDynamicGrid27_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid27_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid27_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27_SETUPFACILITYID.Name := 'xdsDynamicGrid27_SETUPFACILITYID';\r\n xdsDynamicGrid27_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid27_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid27_USERID.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27_USERID.Name := 'xdsDynamicGrid27_USERID';\r\n xdsDynamicGrid27_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid27_USERID.Size := 256;\r\n xdsDynamicGrid27NEW_RECORD.SetParentComponent(xdsDynamicGrid27);\r\n xdsDynamicGrid27NEW_RECORD.Name := 'xdsDynamicGrid27NEW_RECORD';\r\n xdsDynamicGrid27NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid27.SetParentComponent(Self);\r\n dsDynamicGrid27.Name := 'dsDynamicGrid27';\r\n dsDynamicGrid27.DataSet := xdsDynamicGrid27;\r\n dsDynamicGrid27.Left := 491;\r\n dsDynamicGrid27.Top := 480;\r\n xdsDynamicGrid28.SetParentComponent(Self);\r\n xdsDynamicGrid28.Name := 'xdsDynamicGrid28';\r\n xdsDynamicGrid28.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid28.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid28.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid28, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid28.Left := 611;\r\n xdsDynamicGrid28.Top := 432;\r\n xdsDynamicGrid28C1.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28C1.Name := 'xdsDynamicGrid28C1';\r\n xdsDynamicGrid28C1.FieldName := 'C1';\r\n xdsDynamicGrid28C1.Size := 1024;\r\n xdsDynamicGrid28C2.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28C2.Name := 'xdsDynamicGrid28C2';\r\n xdsDynamicGrid28C2.FieldName := 'C2';\r\n xdsDynamicGrid28C2.Size := 1024;\r\n xdsDynamicGrid28C3.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28C3.Name := 'xdsDynamicGrid28C3';\r\n xdsDynamicGrid28C3.FieldName := 'C3';\r\n xdsDynamicGrid28C3.Size := 1024;\r\n xdsDynamicGrid28C4.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28C4.Name := 'xdsDynamicGrid28C4';\r\n xdsDynamicGrid28C4.FieldName := 'C4';\r\n xdsDynamicGrid28C4.Size := 1024;\r\n xdsDynamicGrid28C5.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28C5.Name := 'xdsDynamicGrid28C5';\r\n xdsDynamicGrid28C5.FieldName := 'C5';\r\n xdsDynamicGrid28C5.Size := 1024;\r\n xdsDynamicGrid28C6.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28C6.Name := 'xdsDynamicGrid28C6';\r\n xdsDynamicGrid28C6.FieldName := 'C6';\r\n xdsDynamicGrid28C6.Size := 1024;\r\n xdsDynamicGrid28C7.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28C7.Name := 'xdsDynamicGrid28C7';\r\n xdsDynamicGrid28C7.FieldName := 'C7';\r\n xdsDynamicGrid28C7.Size := 1024;\r\n xdsDynamicGrid28C8.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28C8.Name := 'xdsDynamicGrid28C8';\r\n xdsDynamicGrid28C8.FieldName := 'C8';\r\n xdsDynamicGrid28C8.Size := 1024;\r\n xdsDynamicGrid28C9.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28C9.Name := 'xdsDynamicGrid28C9';\r\n xdsDynamicGrid28C9.FieldName := 'C9';\r\n xdsDynamicGrid28C9.Size := 1024;\r\n xdsDynamicGrid28C11.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28C11.Name := 'xdsDynamicGrid28C11';\r\n xdsDynamicGrid28C11.FieldName := 'C11';\r\n xdsDynamicGrid28C11.Size := 1024;\r\n xdsDynamicGrid28C10.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28C10.Name := 'xdsDynamicGrid28C10';\r\n xdsDynamicGrid28C10.FieldName := 'C10';\r\n xdsDynamicGrid28C10.Size := 1024;\r\n xdsDynamicGrid28C12.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28C12.Name := 'xdsDynamicGrid28C12';\r\n xdsDynamicGrid28C12.FieldName := 'C12';\r\n xdsDynamicGrid28C12.Size := 1024;\r\n xdsDynamicGrid28C14.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28C14.Name := 'xdsDynamicGrid28C14';\r\n xdsDynamicGrid28C14.FieldName := 'C14';\r\n xdsDynamicGrid28C14.Size := 1024;\r\n xdsDynamicGrid28C15.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28C15.Name := 'xdsDynamicGrid28C15';\r\n xdsDynamicGrid28C15.FieldName := 'C15';\r\n xdsDynamicGrid28C15.Size := 1024;\r\n xdsDynamicGrid28C13.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28C13.Name := 'xdsDynamicGrid28C13';\r\n xdsDynamicGrid28C13.FieldName := 'C13';\r\n xdsDynamicGrid28C13.Size := 1024;\r\n xdsDynamicGrid28C16.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28C16.Name := 'xdsDynamicGrid28C16';\r\n xdsDynamicGrid28C16.FieldName := 'C16';\r\n xdsDynamicGrid28C16.Size := 1024;\r\n xdsDynamicGrid28C17.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28C17.Name := 'xdsDynamicGrid28C17';\r\n xdsDynamicGrid28C17.FieldName := 'C17';\r\n xdsDynamicGrid28C17.Size := 1024;\r\n xdsDynamicGrid28C18.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28C18.Name := 'xdsDynamicGrid28C18';\r\n xdsDynamicGrid28C18.FieldName := 'C18';\r\n xdsDynamicGrid28C18.Size := 1024;\r\n xdsDynamicGrid28C19.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28C19.Name := 'xdsDynamicGrid28C19';\r\n xdsDynamicGrid28C19.FieldName := 'C19';\r\n xdsDynamicGrid28C19.Size := 1024;\r\n xdsDynamicGrid28C20.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28C20.Name := 'xdsDynamicGrid28C20';\r\n xdsDynamicGrid28C20.FieldName := 'C20';\r\n xdsDynamicGrid28C20.Size := 1024;\r\n xdsDynamicGrid28_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28_CURRENT_NURSE2.Name := 'xdsDynamicGrid28_CURRENT_NURSE2';\r\n xdsDynamicGrid28_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid28_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid28_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28_CURRENT_NURSE1.Name := 'xdsDynamicGrid28_CURRENT_NURSE1';\r\n xdsDynamicGrid28_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid28_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid28_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28_CURRENT_PROVIDER.Name := 'xdsDynamicGrid28_CURRENT_PROVIDER';\r\n xdsDynamicGrid28_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid28_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid28_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid28_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid28_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid28_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid28_CURRENT_MRN.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28_CURRENT_MRN.Name := 'xdsDynamicGrid28_CURRENT_MRN';\r\n xdsDynamicGrid28_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid28_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid28_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28_CURRENT_APPTNAME.Name := 'xdsDynamicGrid28_CURRENT_APPTNAME';\r\n xdsDynamicGrid28_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid28_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid28_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28_CURRENT_MEDID.Name := 'xdsDynamicGrid28_CURRENT_MEDID';\r\n xdsDynamicGrid28_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid28_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid28_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid28_CURRENT_PROBLEMID';\r\n xdsDynamicGrid28_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid28_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid28_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid28_CURRENT_ALLERGYID';\r\n xdsDynamicGrid28_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid28_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid28_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid28_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid28_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid28_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid28_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid28_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid28_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid28_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid28_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid28_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid28_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid28_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid28_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid28_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid28_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid28_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid28_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28_CURRENT_APPTDATE.Name := 'xdsDynamicGrid28_CURRENT_APPTDATE';\r\n xdsDynamicGrid28_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid28_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid28_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28_PATIENTFHIRID.Name := 'xdsDynamicGrid28_PATIENTFHIRID';\r\n xdsDynamicGrid28_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid28_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid28_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28_PATIENTCERNERID.Name := 'xdsDynamicGrid28_PATIENTCERNERID';\r\n xdsDynamicGrid28_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid28_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid28_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28_SETUPFACILITYID.Name := 'xdsDynamicGrid28_SETUPFACILITYID';\r\n xdsDynamicGrid28_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid28_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid28_USERID.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28_USERID.Name := 'xdsDynamicGrid28_USERID';\r\n xdsDynamicGrid28_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid28_USERID.Size := 256;\r\n xdsDynamicGrid28NEW_RECORD.SetParentComponent(xdsDynamicGrid28);\r\n xdsDynamicGrid28NEW_RECORD.Name := 'xdsDynamicGrid28NEW_RECORD';\r\n xdsDynamicGrid28NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid28.SetParentComponent(Self);\r\n dsDynamicGrid28.Name := 'dsDynamicGrid28';\r\n dsDynamicGrid28.DataSet := xdsDynamicGrid28;\r\n dsDynamicGrid28.Left := 611;\r\n dsDynamicGrid28.Top := 480;\r\n xdsDynamicGrid29.SetParentComponent(Self);\r\n xdsDynamicGrid29.Name := 'xdsDynamicGrid29';\r\n xdsDynamicGrid29.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid29.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid29.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid29, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid29.Left := 723;\r\n xdsDynamicGrid29.Top := 432;\r\n xdsDynamicGrid29C1.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29C1.Name := 'xdsDynamicGrid29C1';\r\n xdsDynamicGrid29C1.FieldName := 'C1';\r\n xdsDynamicGrid29C1.Size := 1024;\r\n xdsDynamicGrid29C2.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29C2.Name := 'xdsDynamicGrid29C2';\r\n xdsDynamicGrid29C2.FieldName := 'C2';\r\n xdsDynamicGrid29C2.Size := 1024;\r\n xdsDynamicGrid29C3.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29C3.Name := 'xdsDynamicGrid29C3';\r\n xdsDynamicGrid29C3.FieldName := 'C3';\r\n xdsDynamicGrid29C3.Size := 1024;\r\n xdsDynamicGrid29C4.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29C4.Name := 'xdsDynamicGrid29C4';\r\n xdsDynamicGrid29C4.FieldName := 'C4';\r\n xdsDynamicGrid29C4.Size := 1024;\r\n xdsDynamicGrid29C5.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29C5.Name := 'xdsDynamicGrid29C5';\r\n xdsDynamicGrid29C5.FieldName := 'C5';\r\n xdsDynamicGrid29C5.Size := 1024;\r\n xdsDynamicGrid29C6.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29C6.Name := 'xdsDynamicGrid29C6';\r\n xdsDynamicGrid29C6.FieldName := 'C6';\r\n xdsDynamicGrid29C6.Size := 1024;\r\n xdsDynamicGrid29C7.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29C7.Name := 'xdsDynamicGrid29C7';\r\n xdsDynamicGrid29C7.FieldName := 'C7';\r\n xdsDynamicGrid29C7.Size := 1024;\r\n xdsDynamicGrid29C8.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29C8.Name := 'xdsDynamicGrid29C8';\r\n xdsDynamicGrid29C8.FieldName := 'C8';\r\n xdsDynamicGrid29C8.Size := 1024;\r\n xdsDynamicGrid29C9.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29C9.Name := 'xdsDynamicGrid29C9';\r\n xdsDynamicGrid29C9.FieldName := 'C9';\r\n xdsDynamicGrid29C9.Size := 1024;\r\n xdsDynamicGrid29C11.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29C11.Name := 'xdsDynamicGrid29C11';\r\n xdsDynamicGrid29C11.FieldName := 'C11';\r\n xdsDynamicGrid29C11.Size := 1024;\r\n xdsDynamicGrid29C10.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29C10.Name := 'xdsDynamicGrid29C10';\r\n xdsDynamicGrid29C10.FieldName := 'C10';\r\n xdsDynamicGrid29C10.Size := 1024;\r\n xdsDynamicGrid29C12.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29C12.Name := 'xdsDynamicGrid29C12';\r\n xdsDynamicGrid29C12.FieldName := 'C12';\r\n xdsDynamicGrid29C12.Size := 1024;\r\n xdsDynamicGrid29C14.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29C14.Name := 'xdsDynamicGrid29C14';\r\n xdsDynamicGrid29C14.FieldName := 'C14';\r\n xdsDynamicGrid29C14.Size := 1024;\r\n xdsDynamicGrid29C15.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29C15.Name := 'xdsDynamicGrid29C15';\r\n xdsDynamicGrid29C15.FieldName := 'C15';\r\n xdsDynamicGrid29C15.Size := 1024;\r\n xdsDynamicGrid29C13.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29C13.Name := 'xdsDynamicGrid29C13';\r\n xdsDynamicGrid29C13.FieldName := 'C13';\r\n xdsDynamicGrid29C13.Size := 1024;\r\n xdsDynamicGrid29C16.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29C16.Name := 'xdsDynamicGrid29C16';\r\n xdsDynamicGrid29C16.FieldName := 'C16';\r\n xdsDynamicGrid29C16.Size := 1024;\r\n xdsDynamicGrid29C17.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29C17.Name := 'xdsDynamicGrid29C17';\r\n xdsDynamicGrid29C17.FieldName := 'C17';\r\n xdsDynamicGrid29C17.Size := 1024;\r\n xdsDynamicGrid29C18.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29C18.Name := 'xdsDynamicGrid29C18';\r\n xdsDynamicGrid29C18.FieldName := 'C18';\r\n xdsDynamicGrid29C18.Size := 1024;\r\n xdsDynamicGrid29C19.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29C19.Name := 'xdsDynamicGrid29C19';\r\n xdsDynamicGrid29C19.FieldName := 'C19';\r\n xdsDynamicGrid29C19.Size := 1024;\r\n xdsDynamicGrid29C20.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29C20.Name := 'xdsDynamicGrid29C20';\r\n xdsDynamicGrid29C20.FieldName := 'C20';\r\n xdsDynamicGrid29C20.Size := 1024;\r\n xdsDynamicGrid29_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29_CURRENT_NURSE2.Name := 'xdsDynamicGrid29_CURRENT_NURSE2';\r\n xdsDynamicGrid29_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid29_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid29_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29_CURRENT_NURSE1.Name := 'xdsDynamicGrid29_CURRENT_NURSE1';\r\n xdsDynamicGrid29_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid29_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid29_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29_CURRENT_PROVIDER.Name := 'xdsDynamicGrid29_CURRENT_PROVIDER';\r\n xdsDynamicGrid29_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid29_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid29_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid29_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid29_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid29_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid29_CURRENT_MRN.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29_CURRENT_MRN.Name := 'xdsDynamicGrid29_CURRENT_MRN';\r\n xdsDynamicGrid29_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid29_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid29_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29_CURRENT_APPTNAME.Name := 'xdsDynamicGrid29_CURRENT_APPTNAME';\r\n xdsDynamicGrid29_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid29_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid29_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29_CURRENT_MEDID.Name := 'xdsDynamicGrid29_CURRENT_MEDID';\r\n xdsDynamicGrid29_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid29_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid29_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid29_CURRENT_PROBLEMID';\r\n xdsDynamicGrid29_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid29_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid29_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid29_CURRENT_ALLERGYID';\r\n xdsDynamicGrid29_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid29_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid29_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid29_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid29_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid29_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid29_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid29_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid29_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid29_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid29_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid29_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid29_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid29_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid29_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid29_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid29_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid29_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid29_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29_CURRENT_APPTDATE.Name := 'xdsDynamicGrid29_CURRENT_APPTDATE';\r\n xdsDynamicGrid29_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid29_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid29_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29_PATIENTFHIRID.Name := 'xdsDynamicGrid29_PATIENTFHIRID';\r\n xdsDynamicGrid29_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid29_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid29_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29_PATIENTCERNERID.Name := 'xdsDynamicGrid29_PATIENTCERNERID';\r\n xdsDynamicGrid29_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid29_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid29_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29_SETUPFACILITYID.Name := 'xdsDynamicGrid29_SETUPFACILITYID';\r\n xdsDynamicGrid29_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid29_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid29_USERID.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29_USERID.Name := 'xdsDynamicGrid29_USERID';\r\n xdsDynamicGrid29_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid29_USERID.Size := 256;\r\n xdsDynamicGrid29NEW_RECORD.SetParentComponent(xdsDynamicGrid29);\r\n xdsDynamicGrid29NEW_RECORD.Name := 'xdsDynamicGrid29NEW_RECORD';\r\n xdsDynamicGrid29NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid29.SetParentComponent(Self);\r\n dsDynamicGrid29.Name := 'dsDynamicGrid29';\r\n dsDynamicGrid29.DataSet := xdsDynamicGrid29;\r\n dsDynamicGrid29.Left := 723;\r\n dsDynamicGrid29.Top := 480;\r\n xdsDynamicGrid30.SetParentComponent(Self);\r\n xdsDynamicGrid30.Name := 'xdsDynamicGrid30';\r\n xdsDynamicGrid30.AfterOpen := xdsDynamicGrid1AfterOpen;\r\n xdsDynamicGrid30.AfterClose := xdsDynamicGrid1AfterClose;\r\n xdsDynamicGrid30.AfterEdit := xdsDynamicGrid1AfterEdit;\r\n SetEvent(xdsDynamicGrid30, Self, 'OnNewRecord', 'xdsDynamicGrid1NewRecord');\r\n xdsDynamicGrid30.Left := 843;\r\n xdsDynamicGrid30.Top := 432;\r\n xdsDynamicGrid30C1.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30C1.Name := 'xdsDynamicGrid30C1';\r\n xdsDynamicGrid30C1.FieldName := 'C1';\r\n xdsDynamicGrid30C1.Size := 1024;\r\n xdsDynamicGrid30C2.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30C2.Name := 'xdsDynamicGrid30C2';\r\n xdsDynamicGrid30C2.FieldName := 'C2';\r\n xdsDynamicGrid30C2.Size := 1024;\r\n xdsDynamicGrid30C3.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30C3.Name := 'xdsDynamicGrid30C3';\r\n xdsDynamicGrid30C3.FieldName := 'C3';\r\n xdsDynamicGrid30C3.Size := 1024;\r\n xdsDynamicGrid30C4.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30C4.Name := 'xdsDynamicGrid30C4';\r\n xdsDynamicGrid30C4.FieldName := 'C4';\r\n xdsDynamicGrid30C4.Size := 1024;\r\n xdsDynamicGrid30C5.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30C5.Name := 'xdsDynamicGrid30C5';\r\n xdsDynamicGrid30C5.FieldName := 'C5';\r\n xdsDynamicGrid30C5.Size := 1024;\r\n xdsDynamicGrid30C6.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30C6.Name := 'xdsDynamicGrid30C6';\r\n xdsDynamicGrid30C6.FieldName := 'C6';\r\n xdsDynamicGrid30C6.Size := 1024;\r\n xdsDynamicGrid30C7.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30C7.Name := 'xdsDynamicGrid30C7';\r\n xdsDynamicGrid30C7.FieldName := 'C7';\r\n xdsDynamicGrid30C7.Size := 1024;\r\n xdsDynamicGrid30C8.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30C8.Name := 'xdsDynamicGrid30C8';\r\n xdsDynamicGrid30C8.FieldName := 'C8';\r\n xdsDynamicGrid30C8.Size := 1024;\r\n xdsDynamicGrid30C9.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30C9.Name := 'xdsDynamicGrid30C9';\r\n xdsDynamicGrid30C9.FieldName := 'C9';\r\n xdsDynamicGrid30C9.Size := 1024;\r\n xdsDynamicGrid30C11.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30C11.Name := 'xdsDynamicGrid30C11';\r\n xdsDynamicGrid30C11.FieldName := 'C11';\r\n xdsDynamicGrid30C11.Size := 1024;\r\n xdsDynamicGrid30C10.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30C10.Name := 'xdsDynamicGrid30C10';\r\n xdsDynamicGrid30C10.FieldName := 'C10';\r\n xdsDynamicGrid30C10.Size := 1024;\r\n xdsDynamicGrid30C12.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30C12.Name := 'xdsDynamicGrid30C12';\r\n xdsDynamicGrid30C12.FieldName := 'C12';\r\n xdsDynamicGrid30C12.Size := 1024;\r\n xdsDynamicGrid30C14.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30C14.Name := 'xdsDynamicGrid30C14';\r\n xdsDynamicGrid30C14.FieldName := 'C14';\r\n xdsDynamicGrid30C14.Size := 1024;\r\n xdsDynamicGrid30C15.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30C15.Name := 'xdsDynamicGrid30C15';\r\n xdsDynamicGrid30C15.FieldName := 'C15';\r\n xdsDynamicGrid30C15.Size := 1024;\r\n xdsDynamicGrid30C13.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30C13.Name := 'xdsDynamicGrid30C13';\r\n xdsDynamicGrid30C13.FieldName := 'C13';\r\n xdsDynamicGrid30C13.Size := 1024;\r\n xdsDynamicGrid30C16.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30C16.Name := 'xdsDynamicGrid30C16';\r\n xdsDynamicGrid30C16.FieldName := 'C16';\r\n xdsDynamicGrid30C16.Size := 1024;\r\n xdsDynamicGrid30C17.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30C17.Name := 'xdsDynamicGrid30C17';\r\n xdsDynamicGrid30C17.FieldName := 'C17';\r\n xdsDynamicGrid30C17.Size := 1024;\r\n xdsDynamicGrid30C18.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30C18.Name := 'xdsDynamicGrid30C18';\r\n xdsDynamicGrid30C18.FieldName := 'C18';\r\n xdsDynamicGrid30C18.Size := 1024;\r\n xdsDynamicGrid30C19.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30C19.Name := 'xdsDynamicGrid30C19';\r\n xdsDynamicGrid30C19.FieldName := 'C19';\r\n xdsDynamicGrid30C19.Size := 1024;\r\n xdsDynamicGrid30C20.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30C20.Name := 'xdsDynamicGrid30C20';\r\n xdsDynamicGrid30C20.FieldName := 'C20';\r\n xdsDynamicGrid30C20.Size := 1024;\r\n xdsDynamicGrid30_CURRENT_NURSE2.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30_CURRENT_NURSE2.Name := 'xdsDynamicGrid30_CURRENT_NURSE2';\r\n xdsDynamicGrid30_CURRENT_NURSE2.FieldName := '_CURRENT_NURSE2';\r\n xdsDynamicGrid30_CURRENT_NURSE2.Size := 256;\r\n xdsDynamicGrid30_CURRENT_NURSE1.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30_CURRENT_NURSE1.Name := 'xdsDynamicGrid30_CURRENT_NURSE1';\r\n xdsDynamicGrid30_CURRENT_NURSE1.FieldName := '_CURRENT_NURSE1';\r\n xdsDynamicGrid30_CURRENT_NURSE1.Size := 256;\r\n xdsDynamicGrid30_CURRENT_PROVIDER.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30_CURRENT_PROVIDER.Name := 'xdsDynamicGrid30_CURRENT_PROVIDER';\r\n xdsDynamicGrid30_CURRENT_PROVIDER.FieldName := '_CURRENT_PROVIDER';\r\n xdsDynamicGrid30_CURRENT_PROVIDER.Size := 256;\r\n xdsDynamicGrid30_CURRENT_PROCEDURENUMBER.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30_CURRENT_PROCEDURENUMBER.Name := 'xdsDynamicGrid30_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid30_CURRENT_PROCEDURENUMBER.FieldName := '_CURRENT_PROCEDURENUMBER';\r\n xdsDynamicGrid30_CURRENT_PROCEDURENUMBER.Size := 256;\r\n xdsDynamicGrid30_CURRENT_MRN.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30_CURRENT_MRN.Name := 'xdsDynamicGrid30_CURRENT_MRN';\r\n xdsDynamicGrid30_CURRENT_MRN.FieldName := '_CURRENT_MRN';\r\n xdsDynamicGrid30_CURRENT_MRN.Size := 256;\r\n xdsDynamicGrid30_CURRENT_APPTNAME.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30_CURRENT_APPTNAME.Name := 'xdsDynamicGrid30_CURRENT_APPTNAME';\r\n xdsDynamicGrid30_CURRENT_APPTNAME.FieldName := '_CURRENT_APPTNAME';\r\n xdsDynamicGrid30_CURRENT_APPTNAME.Size := 256;\r\n xdsDynamicGrid30_CURRENT_MEDID.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30_CURRENT_MEDID.Name := 'xdsDynamicGrid30_CURRENT_MEDID';\r\n xdsDynamicGrid30_CURRENT_MEDID.FieldName := '_CURRENT_MEDID';\r\n xdsDynamicGrid30_CURRENT_MEDID.Size := 256;\r\n xdsDynamicGrid30_CURRENT_PROBLEMID.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30_CURRENT_PROBLEMID.Name := 'xdsDynamicGrid30_CURRENT_PROBLEMID';\r\n xdsDynamicGrid30_CURRENT_PROBLEMID.FieldName := '_CURRENT_PROBLEMID';\r\n xdsDynamicGrid30_CURRENT_PROBLEMID.Size := 256;\r\n xdsDynamicGrid30_CURRENT_ALLERGYID.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30_CURRENT_ALLERGYID.Name := 'xdsDynamicGrid30_CURRENT_ALLERGYID';\r\n xdsDynamicGrid30_CURRENT_ALLERGYID.FieldName := '_CURRENT_ALLERGYID';\r\n xdsDynamicGrid30_CURRENT_ALLERGYID.Size := 256;\r\n xdsDynamicGrid30_CURRENT_REFPHYCODE.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30_CURRENT_REFPHYCODE.Name := 'xdsDynamicGrid30_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid30_CURRENT_REFPHYCODE.FieldName := '_CURRENT_REFPHYCODE';\r\n xdsDynamicGrid30_CURRENT_REFPHYCODE.Size := 256;\r\n xdsDynamicGrid30_CURRENT_PATIENTNAME.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30_CURRENT_PATIENTNAME.Name := 'xdsDynamicGrid30_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid30_CURRENT_PATIENTNAME.FieldName := '_CURRENT_PATIENTNAME';\r\n xdsDynamicGrid30_CURRENT_PATIENTNAME.Size := 256;\r\n xdsDynamicGrid30_CURRENT_PATIENTDOB.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30_CURRENT_PATIENTDOB.Name := 'xdsDynamicGrid30_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid30_CURRENT_PATIENTDOB.FieldName := '_CURRENT_PATIENTDOB';\r\n xdsDynamicGrid30_CURRENT_PATIENTDOB.Size := 256;\r\n xdsDynamicGrid30_CURRENT_PROCIMAGECOUNT.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30_CURRENT_PROCIMAGECOUNT.Name := 'xdsDynamicGrid30_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid30_CURRENT_PROCIMAGECOUNT.FieldName := '_CURRENT_PROCIMAGECOUNT';\r\n xdsDynamicGrid30_CURRENT_PROCIMAGECOUNT.Size := 256;\r\n xdsDynamicGrid30_CURRENT_APPTDATE.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30_CURRENT_APPTDATE.Name := 'xdsDynamicGrid30_CURRENT_APPTDATE';\r\n xdsDynamicGrid30_CURRENT_APPTDATE.FieldName := '_CURRENT_APPTDATE';\r\n xdsDynamicGrid30_CURRENT_APPTDATE.Size := 256;\r\n xdsDynamicGrid30_PATIENTFHIRID.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30_PATIENTFHIRID.Name := 'xdsDynamicGrid30_PATIENTFHIRID';\r\n xdsDynamicGrid30_PATIENTFHIRID.FieldName := '_PATIENTFHIRID';\r\n xdsDynamicGrid30_PATIENTFHIRID.Size := 256;\r\n xdsDynamicGrid30_PATIENTCERNERID.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30_PATIENTCERNERID.Name := 'xdsDynamicGrid30_PATIENTCERNERID';\r\n xdsDynamicGrid30_PATIENTCERNERID.FieldName := '_PATIENTCERNERID';\r\n xdsDynamicGrid30_PATIENTCERNERID.Size := 256;\r\n xdsDynamicGrid30_SETUPFACILITYID.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30_SETUPFACILITYID.Name := 'xdsDynamicGrid30_SETUPFACILITYID';\r\n xdsDynamicGrid30_SETUPFACILITYID.FieldName := '_SETUPFACILITYID';\r\n xdsDynamicGrid30_SETUPFACILITYID.Size := 256;\r\n xdsDynamicGrid30_USERID.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30_USERID.Name := 'xdsDynamicGrid30_USERID';\r\n xdsDynamicGrid30_USERID.FieldName := '_USERID';\r\n xdsDynamicGrid30_USERID.Size := 256;\r\n xdsDynamicGrid30NEW_RECORD.SetParentComponent(xdsDynamicGrid30);\r\n xdsDynamicGrid30NEW_RECORD.Name := 'xdsDynamicGrid30NEW_RECORD';\r\n xdsDynamicGrid30NEW_RECORD.FieldName := 'NEW_RECORD';\r\n dsDynamicGrid30.SetParentComponent(Self);\r\n dsDynamicGrid30.Name := 'dsDynamicGrid30';\r\n dsDynamicGrid30.DataSet := xdsDynamicGrid30;\r\n dsDynamicGrid30.Left := 843;\r\n dsDynamicGrid30.Top := 480;\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 := 48;\r\n WebHttpRequest1.Top := 416;\r\n EGV_SESSIONSTORAGE.SetParentComponent(Self);\r\n EGV_SESSIONSTORAGE.Name := 'EGV_SESSIONSTORAGE';\r\n EGV_SESSIONSTORAGE.Left := 167;\r\n EGV_SESSIONSTORAGE.Top := 48;\r\n xdsImages.SetParentComponent(Self);\r\n xdsImages.Name := 'xdsImages';\r\n xdsImages.AfterOpen := xdsImagesAfterOpen;\r\n SetEvent(xdsImages, Self, 'OnCalcFields', 'xdsImagesCalcFields');\r\n xdsImages.Left := 48;\r\n xdsImages.Top := 480;\r\n xdsImagesIMAGE.SetParentComponent(xdsImages);\r\n xdsImagesIMAGE.Name := 'xdsImagesIMAGE';\r\n xdsImagesIMAGE.FieldName := 'IMAGE';\r\n xdsImagesIMAGEBASE64.SetParentComponent(xdsImages);\r\n xdsImagesIMAGEBASE64.Name := 'xdsImagesIMAGEBASE64';\r\n xdsImagesIMAGEBASE64.FieldName := 'IMAGEBASE64';\r\n xdsImagesIMAGEBASE64.BlobType := ftMemo;\r\n xdsImagesIMAGEBASE64_DATA.SetParentComponent(xdsImages);\r\n xdsImagesIMAGEBASE64_DATA.Name := 'xdsImagesIMAGEBASE64_DATA';\r\n xdsImagesIMAGEBASE64_DATA.FieldName := 'IMAGEBASE64_DATA';\r\n xdsImagesIMAGEBASE64_DATA.BlobType := ftMemo;\r\n xdsImagesIMAGENUMBER.SetParentComponent(xdsImages);\r\n xdsImagesIMAGENUMBER.Name := 'xdsImagesIMAGENUMBER';\r\n xdsImagesIMAGENUMBER.FieldName := 'IMAGENUMBER';\r\n xdsImagesSELECTED.SetParentComponent(xdsImages);\r\n xdsImagesSELECTED.Name := 'xdsImagesSELECTED';\r\n xdsImagesSELECTED.FieldName := 'SELECTED';\r\n xdsImagesSELECTED.Size := 1;\r\n xdsImagesLABEL.SetParentComponent(xdsImages);\r\n xdsImagesLABEL.Name := 'xdsImagesLABEL';\r\n xdsImagesLABEL.FieldName := 'LABEL';\r\n xdsImagesLABEL.Size := 128;\r\n xdsImagesSEQUENCE.SetParentComponent(xdsImages);\r\n xdsImagesSEQUENCE.Name := 'xdsImagesSEQUENCE';\r\n xdsImagesSEQUENCE.FieldName := 'SEQUENCE';\r\n xdsImagesCOMMENTS.SetParentComponent(xdsImages);\r\n xdsImagesCOMMENTS.Name := 'xdsImagesCOMMENTS';\r\n xdsImagesCOMMENTS.FieldName := 'COMMENTS';\r\n xdsImagesCOMMENTS.Size := 128;\r\n xdsImagesFILENAME.SetParentComponent(xdsImages);\r\n xdsImagesFILENAME.Name := 'xdsImagesFILENAME';\r\n xdsImagesFILENAME.FieldName := 'FILENAME';\r\n xdsImagesFILENAME.Size := 1024;\r\n xdsImagesBORDER_COLOR.SetParentComponent(xdsImages);\r\n xdsImagesBORDER_COLOR.Name := 'xdsImagesBORDER_COLOR';\r\n xdsImagesBORDER_COLOR.FieldKind := fkCalculated;\r\n xdsImagesBORDER_COLOR.FieldName := 'BORDER_COLOR';\r\n xdsImagesBORDER_COLOR.Calculated := True;\r\n xdsImagesGILABELTEXT.SetParentComponent(xdsImages);\r\n xdsImagesGILABELTEXT.Name := 'xdsImagesGILABELTEXT';\r\n xdsImagesGILABELTEXT.FieldName := 'GILABELTEXT';\r\n xdsImagesGILABELTEXT.Size := 64;\r\n xdsImagesGILABELTEXTCOLOR.SetParentComponent(xdsImages);\r\n xdsImagesGILABELTEXTCOLOR.Name := 'xdsImagesGILABELTEXTCOLOR';\r\n xdsImagesGILABELTEXTCOLOR.FieldName := 'GILABELTEXTCOLOR';\r\n xdsImagesGILABELBKCOLOR.SetParentComponent(xdsImages);\r\n xdsImagesGILABELBKCOLOR.Name := 'xdsImagesGILABELBKCOLOR';\r\n xdsImagesGILABELBKCOLOR.FieldName := 'GILABELBKCOLOR';\r\n xdsImagesGILABELTEXTCOLOR_HEX.SetParentComponent(xdsImages);\r\n xdsImagesGILABELTEXTCOLOR_HEX.Name := 'xdsImagesGILABELTEXTCOLOR_HEX';\r\n xdsImagesGILABELTEXTCOLOR_HEX.FieldKind := fkCalculated;\r\n xdsImagesGILABELTEXTCOLOR_HEX.FieldName := 'GILABELTEXTCOLOR_HEX';\r\n xdsImagesGILABELTEXTCOLOR_HEX.Size := 64;\r\n xdsImagesGILABELTEXTCOLOR_HEX.Calculated := True;\r\n xdsImagesGILABELBKCOLOR_HEX.SetParentComponent(xdsImages);\r\n xdsImagesGILABELBKCOLOR_HEX.Name := 'xdsImagesGILABELBKCOLOR_HEX';\r\n xdsImagesGILABELBKCOLOR_HEX.FieldKind := fkCalculated;\r\n xdsImagesGILABELBKCOLOR_HEX.FieldName := 'GILABELBKCOLOR_HEX';\r\n xdsImagesGILABELBKCOLOR_HEX.Size := 64;\r\n xdsImagesGILABELBKCOLOR_HEX.Calculated := True;\r\n dsImages.SetParentComponent(Self);\r\n dsImages.Name := 'dsImages';\r\n dsImages.DataSet := xdsImages;\r\n dsImages.Left := 48;\r\n dsImages.Top := 528;\r\n XDataWebConnection2.SetParentComponent(Self);\r\n XDataWebConnection2.Name := 'XDataWebConnection2';\r\n XDataWebConnection2.URL := 'https://Test.ArgusMedGPT.com/ArgusMedGPT';\r\n SetEvent(XDataWebConnection2, Self, 'OnError', 'XDataWebConnection2Error');\r\n XDataWebConnection2.Left := 48;\r\n XDataWebConnection2.Top := 128;\r\n XDataWebClient2.SetParentComponent(Self);\r\n XDataWebClient2.Name := 'XDataWebClient2';\r\n XDataWebClient2.Connection := XDataWebConnection2;\r\n XDataWebClient2.Left := 48;\r\n XDataWebClient2.Top := 176;\r\n xdsImageDiagram.SetParentComponent(Self);\r\n xdsImageDiagram.Name := 'xdsImageDiagram';\r\n xdsImageDiagram.AfterOpen := xdsImageDiagramAfterOpen;\r\n xdsImageDiagram.Left := 128;\r\n xdsImageDiagram.Top := 480;\r\n xdsImageDiagramIMAGE.SetParentComponent(xdsImageDiagram);\r\n xdsImageDiagramIMAGE.Name := 'xdsImageDiagramIMAGE';\r\n xdsImageDiagramIMAGE.FieldName := 'IMAGE';\r\n xdsImageDiagramIMAGEBASE64.SetParentComponent(xdsImageDiagram);\r\n xdsImageDiagramIMAGEBASE64.Name := 'xdsImageDiagramIMAGEBASE64';\r\n xdsImageDiagramIMAGEBASE64.FieldName := 'IMAGEBASE64';\r\n xdsImageDiagramIMAGEBASE64.BlobType := ftMemo;\r\n xdsImageDiagramIMAGEBASE64_DATA.SetParentComponent(xdsImageDiagram);\r\n xdsImageDiagramIMAGEBASE64_DATA.Name := 'xdsImageDiagramIMAGEBASE64_DATA';\r\n xdsImageDiagramIMAGEBASE64_DATA.FieldName := 'IMAGEBASE64_DATA';\r\n xdsImageDiagramIMAGEBASE64_DATA.BlobType := ftMemo;\r\n dsImageDiagram.SetParentComponent(Self);\r\n dsImageDiagram.Name := 'dsImageDiagram';\r\n dsImageDiagram.DataSet := xdsImageDiagram;\r\n dsImageDiagram.Left := 128;\r\n dsImageDiagram.Top := 528;\r\n finally\r\n XDataWebConnection1.AfterLoadDFMValues;\r\n EGV_LOCALSTORAGE.AfterLoadDFMValues;\r\n XDataWebClient1.AfterLoadDFMValues;\r\n dsQPKL_DynamicData.AfterLoadDFMValues;\r\n xdsQPKL_DynamicData.AfterLoadDFMValues;\r\n xdsQPKL_DynamicDataOriginalITEM.AfterLoadDFMValues;\r\n dsPickList.AfterLoadDFMValues;\r\n xdsMainMenu.AfterLoadDFMValues;\r\n xdsMainMenuOriginalIDENT_VALUE.AfterLoadDFMValues;\r\n xdsMainMenuOriginalVISIBLE.AfterLoadDFMValues;\r\n xdsPicklist.AfterLoadDFMValues;\r\n xdsPicklistUSERID.AfterLoadDFMValues;\r\n xdsPicklistSECTION_NAME.AfterLoadDFMValues;\r\n xdsPicklistIDENT_NAME.AfterLoadDFMValues;\r\n xdsPicklistIDENT_VALUE.AfterLoadDFMValues;\r\n xdsPicklistFACILITYID.AfterLoadDFMValues;\r\n xdsPicklistSPECIALITY.AfterLoadDFMValues;\r\n xdsPicklistVISIBLE.AfterLoadDFMValues;\r\n xdsPicklistcVISIBLE.AfterLoadDFMValues;\r\n xdsPicklistNOTES.AfterLoadDFMValues;\r\n xdsDynamicGrid1.AfterLoadDFMValues;\r\n xdsDynamicGrid1C1.AfterLoadDFMValues;\r\n xdsDynamicGrid1C2.AfterLoadDFMValues;\r\n xdsDynamicGrid1C3.AfterLoadDFMValues;\r\n xdsDynamicGrid1C4.AfterLoadDFMValues;\r\n xdsDynamicGrid1C5.AfterLoadDFMValues;\r\n xdsDynamicGrid1C6.AfterLoadDFMValues;\r\n xdsDynamicGrid1C7.AfterLoadDFMValues;\r\n xdsDynamicGrid1C8.AfterLoadDFMValues;\r\n xdsDynamicGrid1C9.AfterLoadDFMValues;\r\n xdsDynamicGrid1C10.AfterLoadDFMValues;\r\n xdsDynamicGrid1C11.AfterLoadDFMValues;\r\n xdsDynamicGrid1C12.AfterLoadDFMValues;\r\n xdsDynamicGrid1C13.AfterLoadDFMValues;\r\n xdsDynamicGrid1C14.AfterLoadDFMValues;\r\n xdsDynamicGrid1C15.AfterLoadDFMValues;\r\n xdsDynamicGrid1C16.AfterLoadDFMValues;\r\n xdsDynamicGrid1C17.AfterLoadDFMValues;\r\n xdsDynamicGrid1C18.AfterLoadDFMValues;\r\n xdsDynamicGrid1C19.AfterLoadDFMValues;\r\n xdsDynamicGrid1C20.AfterLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_APPTTYPE.AfterLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid1_CURRENTPROC_IMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid1_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid1_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid1_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid1EGV_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid1_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid1NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid1.AfterLoadDFMValues;\r\n xdsDynamicGrid2.AfterLoadDFMValues;\r\n xdsDynamicGrid2C1.AfterLoadDFMValues;\r\n xdsDynamicGrid2C2.AfterLoadDFMValues;\r\n xdsDynamicGrid2C3.AfterLoadDFMValues;\r\n xdsDynamicGrid2C4.AfterLoadDFMValues;\r\n xdsDynamicGrid2C5.AfterLoadDFMValues;\r\n xdsDynamicGrid2C6.AfterLoadDFMValues;\r\n xdsDynamicGrid2C7.AfterLoadDFMValues;\r\n xdsDynamicGrid2C8.AfterLoadDFMValues;\r\n xdsDynamicGrid2C9.AfterLoadDFMValues;\r\n xdsDynamicGrid2C10.AfterLoadDFMValues;\r\n xdsDynamicGrid2C11.AfterLoadDFMValues;\r\n xdsDynamicGrid2C12.AfterLoadDFMValues;\r\n xdsDynamicGrid2C13.AfterLoadDFMValues;\r\n xdsDynamicGrid2C14.AfterLoadDFMValues;\r\n xdsDynamicGrid2C15.AfterLoadDFMValues;\r\n xdsDynamicGrid2C16.AfterLoadDFMValues;\r\n xdsDynamicGrid2C17.AfterLoadDFMValues;\r\n xdsDynamicGrid2C18.AfterLoadDFMValues;\r\n xdsDynamicGrid2C19.AfterLoadDFMValues;\r\n xdsDynamicGrid2C20.AfterLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_APPTTYPE.AfterLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid2_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid2_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid2_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid2_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid2_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid2NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid2.AfterLoadDFMValues;\r\n xdsDynamicGrid3.AfterLoadDFMValues;\r\n xdsDynamicGrid3C1.AfterLoadDFMValues;\r\n xdsDynamicGrid3C2.AfterLoadDFMValues;\r\n xdsDynamicGrid3C3.AfterLoadDFMValues;\r\n xdsDynamicGrid3C4.AfterLoadDFMValues;\r\n xdsDynamicGrid3C5.AfterLoadDFMValues;\r\n xdsDynamicGrid3C6.AfterLoadDFMValues;\r\n xdsDynamicGrid3C7.AfterLoadDFMValues;\r\n xdsDynamicGrid3C8.AfterLoadDFMValues;\r\n xdsDynamicGrid3C9.AfterLoadDFMValues;\r\n xdsDynamicGrid3C10.AfterLoadDFMValues;\r\n xdsDynamicGrid3C11.AfterLoadDFMValues;\r\n xdsDynamicGrid3C12.AfterLoadDFMValues;\r\n xdsDynamicGrid3C13.AfterLoadDFMValues;\r\n xdsDynamicGrid3C14.AfterLoadDFMValues;\r\n xdsDynamicGrid3C15.AfterLoadDFMValues;\r\n xdsDynamicGrid3C16.AfterLoadDFMValues;\r\n xdsDynamicGrid3C17.AfterLoadDFMValues;\r\n xdsDynamicGrid3C18.AfterLoadDFMValues;\r\n xdsDynamicGrid3C19.AfterLoadDFMValues;\r\n xdsDynamicGrid3C20.AfterLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_APPTTYPE.AfterLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid3_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid3_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid3_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid3_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid3_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid3NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid3.AfterLoadDFMValues;\r\n xdsDynamicGrid4.AfterLoadDFMValues;\r\n xdsDynamicGrid4C1.AfterLoadDFMValues;\r\n xdsDynamicGrid4C2.AfterLoadDFMValues;\r\n xdsDynamicGrid4C3.AfterLoadDFMValues;\r\n xdsDynamicGrid4C4.AfterLoadDFMValues;\r\n xdsDynamicGrid4C5.AfterLoadDFMValues;\r\n xdsDynamicGrid4C6.AfterLoadDFMValues;\r\n xdsDynamicGrid4C7.AfterLoadDFMValues;\r\n xdsDynamicGrid4C8.AfterLoadDFMValues;\r\n xdsDynamicGrid4C9.AfterLoadDFMValues;\r\n xdsDynamicGrid4C10.AfterLoadDFMValues;\r\n xdsDynamicGrid4C11.AfterLoadDFMValues;\r\n xdsDynamicGrid4C12.AfterLoadDFMValues;\r\n xdsDynamicGrid4C13.AfterLoadDFMValues;\r\n xdsDynamicGrid4C14.AfterLoadDFMValues;\r\n xdsDynamicGrid4C15.AfterLoadDFMValues;\r\n xdsDynamicGrid4C16.AfterLoadDFMValues;\r\n xdsDynamicGrid4C17.AfterLoadDFMValues;\r\n xdsDynamicGrid4C18.AfterLoadDFMValues;\r\n xdsDynamicGrid4C19.AfterLoadDFMValues;\r\n xdsDynamicGrid4C20.AfterLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_APPTTYPE.AfterLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid4_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid4_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid4_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid4_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid4_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid4NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid4.AfterLoadDFMValues;\r\n xdsDynamicGrid5.AfterLoadDFMValues;\r\n xdsDynamicGrid5C1.AfterLoadDFMValues;\r\n xdsDynamicGrid5C2.AfterLoadDFMValues;\r\n xdsDynamicGrid5C3.AfterLoadDFMValues;\r\n xdsDynamicGrid5C4.AfterLoadDFMValues;\r\n xdsDynamicGrid5C5.AfterLoadDFMValues;\r\n xdsDynamicGrid5C6.AfterLoadDFMValues;\r\n xdsDynamicGrid5C7.AfterLoadDFMValues;\r\n xdsDynamicGrid5C8.AfterLoadDFMValues;\r\n xdsDynamicGrid5C9.AfterLoadDFMValues;\r\n xdsDynamicGrid5C10.AfterLoadDFMValues;\r\n xdsDynamicGrid5C11.AfterLoadDFMValues;\r\n xdsDynamicGrid5C12.AfterLoadDFMValues;\r\n xdsDynamicGrid5C13.AfterLoadDFMValues;\r\n xdsDynamicGrid5C14.AfterLoadDFMValues;\r\n xdsDynamicGrid5C15.AfterLoadDFMValues;\r\n xdsDynamicGrid5C16.AfterLoadDFMValues;\r\n xdsDynamicGrid5C17.AfterLoadDFMValues;\r\n xdsDynamicGrid5C18.AfterLoadDFMValues;\r\n xdsDynamicGrid5C19.AfterLoadDFMValues;\r\n xdsDynamicGrid5C20.AfterLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_APPTTYPE.AfterLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid5_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid5_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid5_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid5_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid5NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid5.AfterLoadDFMValues;\r\n xdsDynamicGrid6.AfterLoadDFMValues;\r\n xdsDynamicGrid6C1.AfterLoadDFMValues;\r\n xdsDynamicGrid6C2.AfterLoadDFMValues;\r\n xdsDynamicGrid6C3.AfterLoadDFMValues;\r\n xdsDynamicGrid6C4.AfterLoadDFMValues;\r\n xdsDynamicGrid6C5.AfterLoadDFMValues;\r\n xdsDynamicGrid6C6.AfterLoadDFMValues;\r\n xdsDynamicGrid6C7.AfterLoadDFMValues;\r\n xdsDynamicGrid6C8.AfterLoadDFMValues;\r\n xdsDynamicGrid6C9.AfterLoadDFMValues;\r\n xdsDynamicGrid6C11.AfterLoadDFMValues;\r\n xdsDynamicGrid6C10.AfterLoadDFMValues;\r\n xdsDynamicGrid6C12.AfterLoadDFMValues;\r\n xdsDynamicGrid6C14.AfterLoadDFMValues;\r\n xdsDynamicGrid6C15.AfterLoadDFMValues;\r\n xdsDynamicGrid6C13.AfterLoadDFMValues;\r\n xdsDynamicGrid6C16.AfterLoadDFMValues;\r\n xdsDynamicGrid6C17.AfterLoadDFMValues;\r\n xdsDynamicGrid6C18.AfterLoadDFMValues;\r\n xdsDynamicGrid6C19.AfterLoadDFMValues;\r\n xdsDynamicGrid6C20.AfterLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid6_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid6_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid6_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid6_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid6_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid6NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid6.AfterLoadDFMValues;\r\n xdsDynamicGrid7.AfterLoadDFMValues;\r\n xdsDynamicGrid7C1.AfterLoadDFMValues;\r\n xdsDynamicGrid7C2.AfterLoadDFMValues;\r\n xdsDynamicGrid7C3.AfterLoadDFMValues;\r\n xdsDynamicGrid7C4.AfterLoadDFMValues;\r\n xdsDynamicGrid7C5.AfterLoadDFMValues;\r\n xdsDynamicGrid7C6.AfterLoadDFMValues;\r\n xdsDynamicGrid7C7.AfterLoadDFMValues;\r\n xdsDynamicGrid7C8.AfterLoadDFMValues;\r\n xdsDynamicGrid7C9.AfterLoadDFMValues;\r\n xdsDynamicGrid7C11.AfterLoadDFMValues;\r\n xdsDynamicGrid7C10.AfterLoadDFMValues;\r\n xdsDynamicGrid7C12.AfterLoadDFMValues;\r\n xdsDynamicGrid7C14.AfterLoadDFMValues;\r\n xdsDynamicGrid7C15.AfterLoadDFMValues;\r\n xdsDynamicGrid7C13.AfterLoadDFMValues;\r\n xdsDynamicGrid7C16.AfterLoadDFMValues;\r\n xdsDynamicGrid7C17.AfterLoadDFMValues;\r\n xdsDynamicGrid7C18.AfterLoadDFMValues;\r\n xdsDynamicGrid7C19.AfterLoadDFMValues;\r\n xdsDynamicGrid7C20.AfterLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid7_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid7_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid7_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid7_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid7_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid7NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid7.AfterLoadDFMValues;\r\n xdsDynamicGrid8.AfterLoadDFMValues;\r\n xdsDynamicGrid8C1.AfterLoadDFMValues;\r\n xdsDynamicGrid8C2.AfterLoadDFMValues;\r\n xdsDynamicGrid8C3.AfterLoadDFMValues;\r\n xdsDynamicGrid8C4.AfterLoadDFMValues;\r\n xdsDynamicGrid8C5.AfterLoadDFMValues;\r\n xdsDynamicGrid8C6.AfterLoadDFMValues;\r\n xdsDynamicGrid8C7.AfterLoadDFMValues;\r\n xdsDynamicGrid8C8.AfterLoadDFMValues;\r\n xdsDynamicGrid8C9.AfterLoadDFMValues;\r\n xdsDynamicGrid8C11.AfterLoadDFMValues;\r\n xdsDynamicGrid8C10.AfterLoadDFMValues;\r\n xdsDynamicGrid8C12.AfterLoadDFMValues;\r\n xdsDynamicGrid8C14.AfterLoadDFMValues;\r\n xdsDynamicGrid8C15.AfterLoadDFMValues;\r\n xdsDynamicGrid8C13.AfterLoadDFMValues;\r\n xdsDynamicGrid8C16.AfterLoadDFMValues;\r\n xdsDynamicGrid8C17.AfterLoadDFMValues;\r\n xdsDynamicGrid8C18.AfterLoadDFMValues;\r\n xdsDynamicGrid8C19.AfterLoadDFMValues;\r\n xdsDynamicGrid8C20.AfterLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid8_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid8_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid8_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid8_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid8_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid8NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid8.AfterLoadDFMValues;\r\n xdsDynamicGrid9.AfterLoadDFMValues;\r\n xdsDynamicGrid9C1.AfterLoadDFMValues;\r\n xdsDynamicGrid9C2.AfterLoadDFMValues;\r\n xdsDynamicGrid9C3.AfterLoadDFMValues;\r\n xdsDynamicGrid9C4.AfterLoadDFMValues;\r\n xdsDynamicGrid9C5.AfterLoadDFMValues;\r\n xdsDynamicGrid9C6.AfterLoadDFMValues;\r\n xdsDynamicGrid9C7.AfterLoadDFMValues;\r\n xdsDynamicGrid9C8.AfterLoadDFMValues;\r\n xdsDynamicGrid9C9.AfterLoadDFMValues;\r\n xdsDynamicGrid9C11.AfterLoadDFMValues;\r\n xdsDynamicGrid9C10.AfterLoadDFMValues;\r\n xdsDynamicGrid9C12.AfterLoadDFMValues;\r\n xdsDynamicGrid9C14.AfterLoadDFMValues;\r\n xdsDynamicGrid9C15.AfterLoadDFMValues;\r\n xdsDynamicGrid9C13.AfterLoadDFMValues;\r\n xdsDynamicGrid9C16.AfterLoadDFMValues;\r\n xdsDynamicGrid9C17.AfterLoadDFMValues;\r\n xdsDynamicGrid9C18.AfterLoadDFMValues;\r\n xdsDynamicGrid9C19.AfterLoadDFMValues;\r\n xdsDynamicGrid9C20.AfterLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid9_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid9_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid9_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid9_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid9_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid9NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid9.AfterLoadDFMValues;\r\n xdsDynamicGrid10.AfterLoadDFMValues;\r\n xdsDynamicGrid10C1.AfterLoadDFMValues;\r\n xdsDynamicGrid10C2.AfterLoadDFMValues;\r\n xdsDynamicGrid10C3.AfterLoadDFMValues;\r\n xdsDynamicGrid10C4.AfterLoadDFMValues;\r\n xdsDynamicGrid10C5.AfterLoadDFMValues;\r\n xdsDynamicGrid10C6.AfterLoadDFMValues;\r\n xdsDynamicGrid10C7.AfterLoadDFMValues;\r\n xdsDynamicGrid10C8.AfterLoadDFMValues;\r\n xdsDynamicGrid10C9.AfterLoadDFMValues;\r\n xdsDynamicGrid10C11.AfterLoadDFMValues;\r\n xdsDynamicGrid10C10.AfterLoadDFMValues;\r\n xdsDynamicGrid10C12.AfterLoadDFMValues;\r\n xdsDynamicGrid10C13.AfterLoadDFMValues;\r\n xdsDynamicGrid10C14.AfterLoadDFMValues;\r\n xdsDynamicGrid10C15.AfterLoadDFMValues;\r\n xdsDynamicGrid10C16.AfterLoadDFMValues;\r\n xdsDynamicGrid10C17.AfterLoadDFMValues;\r\n xdsDynamicGrid10C18.AfterLoadDFMValues;\r\n xdsDynamicGrid10C19.AfterLoadDFMValues;\r\n xdsDynamicGrid10C20.AfterLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid10_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid10_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid10_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid10_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid10_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid10NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid110.AfterLoadDFMValues;\r\n xdsDynamicGrid11.AfterLoadDFMValues;\r\n xdsDynamicGrid11C1.AfterLoadDFMValues;\r\n xdsDynamicGrid11C2.AfterLoadDFMValues;\r\n xdsDynamicGrid11C3.AfterLoadDFMValues;\r\n xdsDynamicGrid11C4.AfterLoadDFMValues;\r\n xdsDynamicGrid11C5.AfterLoadDFMValues;\r\n xdsDynamicGrid11C6.AfterLoadDFMValues;\r\n xdsDynamicGrid11C7.AfterLoadDFMValues;\r\n xdsDynamicGrid11C8.AfterLoadDFMValues;\r\n xdsDynamicGrid11C9.AfterLoadDFMValues;\r\n xdsDynamicGrid11C11.AfterLoadDFMValues;\r\n xdsDynamicGrid11C10.AfterLoadDFMValues;\r\n xdsDynamicGrid11C12.AfterLoadDFMValues;\r\n xdsDynamicGrid11C14.AfterLoadDFMValues;\r\n xdsDynamicGrid11C15.AfterLoadDFMValues;\r\n xdsDynamicGrid11C13.AfterLoadDFMValues;\r\n xdsDynamicGrid11C16.AfterLoadDFMValues;\r\n xdsDynamicGrid11C17.AfterLoadDFMValues;\r\n xdsDynamicGrid11C18.AfterLoadDFMValues;\r\n xdsDynamicGrid11C19.AfterLoadDFMValues;\r\n xdsDynamicGrid11C20.AfterLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid11_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid11_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid11_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid11_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid11_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid11NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid11.AfterLoadDFMValues;\r\n xdsDynamicGrid12.AfterLoadDFMValues;\r\n xdsDynamicGrid12C1.AfterLoadDFMValues;\r\n xdsDynamicGrid12C2.AfterLoadDFMValues;\r\n xdsDynamicGrid12C3.AfterLoadDFMValues;\r\n xdsDynamicGrid12C4.AfterLoadDFMValues;\r\n xdsDynamicGrid12C5.AfterLoadDFMValues;\r\n xdsDynamicGrid12C6.AfterLoadDFMValues;\r\n xdsDynamicGrid12C7.AfterLoadDFMValues;\r\n xdsDynamicGrid12C8.AfterLoadDFMValues;\r\n xdsDynamicGrid12C9.AfterLoadDFMValues;\r\n xdsDynamicGrid12C11.AfterLoadDFMValues;\r\n xdsDynamicGrid12C10.AfterLoadDFMValues;\r\n xdsDynamicGrid12C12.AfterLoadDFMValues;\r\n xdsDynamicGrid12C14.AfterLoadDFMValues;\r\n xdsDynamicGrid12C15.AfterLoadDFMValues;\r\n xdsDynamicGrid12C13.AfterLoadDFMValues;\r\n xdsDynamicGrid12C16.AfterLoadDFMValues;\r\n xdsDynamicGrid12C17.AfterLoadDFMValues;\r\n xdsDynamicGrid12C18.AfterLoadDFMValues;\r\n xdsDynamicGrid12C19.AfterLoadDFMValues;\r\n xdsDynamicGrid12C20.AfterLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid12_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid12_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid12_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid12_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid12_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid12NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid12.AfterLoadDFMValues;\r\n xdsDynamicGrid13.AfterLoadDFMValues;\r\n xdsDynamicGrid13C1.AfterLoadDFMValues;\r\n xdsDynamicGrid13C2.AfterLoadDFMValues;\r\n xdsDynamicGrid13C3.AfterLoadDFMValues;\r\n xdsDynamicGrid13C4.AfterLoadDFMValues;\r\n xdsDynamicGrid13C5.AfterLoadDFMValues;\r\n xdsDynamicGrid13C6.AfterLoadDFMValues;\r\n xdsDynamicGrid13C7.AfterLoadDFMValues;\r\n xdsDynamicGrid13C8.AfterLoadDFMValues;\r\n xdsDynamicGrid13C9.AfterLoadDFMValues;\r\n xdsDynamicGrid13C11.AfterLoadDFMValues;\r\n xdsDynamicGrid13C10.AfterLoadDFMValues;\r\n xdsDynamicGrid13C12.AfterLoadDFMValues;\r\n xdsDynamicGrid13C14.AfterLoadDFMValues;\r\n xdsDynamicGrid13C15.AfterLoadDFMValues;\r\n xdsDynamicGrid13C13.AfterLoadDFMValues;\r\n xdsDynamicGrid13C16.AfterLoadDFMValues;\r\n xdsDynamicGrid13C17.AfterLoadDFMValues;\r\n xdsDynamicGrid13C18.AfterLoadDFMValues;\r\n xdsDynamicGrid13C19.AfterLoadDFMValues;\r\n xdsDynamicGrid13C20.AfterLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid13_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid13_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid13_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid13_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid13_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid13NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid13.AfterLoadDFMValues;\r\n xdsDynamicGrid14.AfterLoadDFMValues;\r\n xdsDynamicGrid14C1.AfterLoadDFMValues;\r\n xdsDynamicGrid14C2.AfterLoadDFMValues;\r\n xdsDynamicGrid14C3.AfterLoadDFMValues;\r\n xdsDynamicGrid14C4.AfterLoadDFMValues;\r\n xdsDynamicGrid14C5.AfterLoadDFMValues;\r\n xdsDynamicGrid14C6.AfterLoadDFMValues;\r\n xdsDynamicGrid14C7.AfterLoadDFMValues;\r\n xdsDynamicGrid14C8.AfterLoadDFMValues;\r\n xdsDynamicGrid14C9.AfterLoadDFMValues;\r\n xdsDynamicGrid14C11.AfterLoadDFMValues;\r\n xdsDynamicGrid14C10.AfterLoadDFMValues;\r\n xdsDynamicGrid14C12.AfterLoadDFMValues;\r\n xdsDynamicGrid14C14.AfterLoadDFMValues;\r\n xdsDynamicGrid14C15.AfterLoadDFMValues;\r\n xdsDynamicGrid14C13.AfterLoadDFMValues;\r\n xdsDynamicGrid14C16.AfterLoadDFMValues;\r\n xdsDynamicGrid14C17.AfterLoadDFMValues;\r\n xdsDynamicGrid14C18.AfterLoadDFMValues;\r\n xdsDynamicGrid14C19.AfterLoadDFMValues;\r\n xdsDynamicGrid14C20.AfterLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid14_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid14_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid14_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid14_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid14_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid14NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid14.AfterLoadDFMValues;\r\n xdsDynamicGrid15.AfterLoadDFMValues;\r\n xdsDynamicGrid15C1.AfterLoadDFMValues;\r\n xdsDynamicGrid15C2.AfterLoadDFMValues;\r\n xdsDynamicGrid15C3.AfterLoadDFMValues;\r\n xdsDynamicGrid15C4.AfterLoadDFMValues;\r\n xdsDynamicGrid15C5.AfterLoadDFMValues;\r\n xdsDynamicGrid15C6.AfterLoadDFMValues;\r\n xdsDynamicGrid15C7.AfterLoadDFMValues;\r\n xdsDynamicGrid15C8.AfterLoadDFMValues;\r\n xdsDynamicGrid15C9.AfterLoadDFMValues;\r\n xdsDynamicGrid15C11.AfterLoadDFMValues;\r\n xdsDynamicGrid15C10.AfterLoadDFMValues;\r\n xdsDynamicGrid15C12.AfterLoadDFMValues;\r\n xdsDynamicGrid15C14.AfterLoadDFMValues;\r\n xdsDynamicGrid15C15.AfterLoadDFMValues;\r\n xdsDynamicGrid15C13.AfterLoadDFMValues;\r\n xdsDynamicGrid15C16.AfterLoadDFMValues;\r\n xdsDynamicGrid15C17.AfterLoadDFMValues;\r\n xdsDynamicGrid15C18.AfterLoadDFMValues;\r\n xdsDynamicGrid15C19.AfterLoadDFMValues;\r\n xdsDynamicGrid15C20.AfterLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid15_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid15_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid15_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid15_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid15_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid15NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid15.AfterLoadDFMValues;\r\n xdsDynamicGrid16.AfterLoadDFMValues;\r\n xdsDynamicGrid16C1.AfterLoadDFMValues;\r\n xdsDynamicGrid16C2.AfterLoadDFMValues;\r\n xdsDynamicGrid16C3.AfterLoadDFMValues;\r\n xdsDynamicGrid16C4.AfterLoadDFMValues;\r\n xdsDynamicGrid16C5.AfterLoadDFMValues;\r\n xdsDynamicGrid16C6.AfterLoadDFMValues;\r\n xdsDynamicGrid16C7.AfterLoadDFMValues;\r\n xdsDynamicGrid16C8.AfterLoadDFMValues;\r\n xdsDynamicGrid16C9.AfterLoadDFMValues;\r\n xdsDynamicGrid16C11.AfterLoadDFMValues;\r\n xdsDynamicGrid16C10.AfterLoadDFMValues;\r\n xdsDynamicGrid16C12.AfterLoadDFMValues;\r\n xdsDynamicGrid16C14.AfterLoadDFMValues;\r\n xdsDynamicGrid16C15.AfterLoadDFMValues;\r\n xdsDynamicGrid16C13.AfterLoadDFMValues;\r\n xdsDynamicGrid16C16.AfterLoadDFMValues;\r\n xdsDynamicGrid16C17.AfterLoadDFMValues;\r\n xdsDynamicGrid16C18.AfterLoadDFMValues;\r\n xdsDynamicGrid16C19.AfterLoadDFMValues;\r\n xdsDynamicGrid16C20.AfterLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid16_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid16_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid16_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid16_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid16_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid16NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid16.AfterLoadDFMValues;\r\n xdsDynamicGrid17.AfterLoadDFMValues;\r\n xdsDynamicGrid17C1.AfterLoadDFMValues;\r\n xdsDynamicGrid17C2.AfterLoadDFMValues;\r\n xdsDynamicGrid17C3.AfterLoadDFMValues;\r\n xdsDynamicGrid17C4.AfterLoadDFMValues;\r\n xdsDynamicGrid17C5.AfterLoadDFMValues;\r\n xdsDynamicGrid17C6.AfterLoadDFMValues;\r\n xdsDynamicGrid17C7.AfterLoadDFMValues;\r\n xdsDynamicGrid17C8.AfterLoadDFMValues;\r\n xdsDynamicGrid17C9.AfterLoadDFMValues;\r\n xdsDynamicGrid17C11.AfterLoadDFMValues;\r\n xdsDynamicGrid17C10.AfterLoadDFMValues;\r\n xdsDynamicGrid17C12.AfterLoadDFMValues;\r\n xdsDynamicGrid17C14.AfterLoadDFMValues;\r\n xdsDynamicGrid17C15.AfterLoadDFMValues;\r\n xdsDynamicGrid17C13.AfterLoadDFMValues;\r\n xdsDynamicGrid17C16.AfterLoadDFMValues;\r\n xdsDynamicGrid17C17.AfterLoadDFMValues;\r\n xdsDynamicGrid17C18.AfterLoadDFMValues;\r\n xdsDynamicGrid17C19.AfterLoadDFMValues;\r\n xdsDynamicGrid17C20.AfterLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid17_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid17_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid17_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid17_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid17_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid17NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid17.AfterLoadDFMValues;\r\n xdsDynamicGrid18.AfterLoadDFMValues;\r\n xdsDynamicGrid18C1.AfterLoadDFMValues;\r\n xdsDynamicGrid18C2.AfterLoadDFMValues;\r\n xdsDynamicGrid18C3.AfterLoadDFMValues;\r\n xdsDynamicGrid18C4.AfterLoadDFMValues;\r\n xdsDynamicGrid18C5.AfterLoadDFMValues;\r\n xdsDynamicGrid18C6.AfterLoadDFMValues;\r\n xdsDynamicGrid18C7.AfterLoadDFMValues;\r\n xdsDynamicGrid18C8.AfterLoadDFMValues;\r\n xdsDynamicGrid18C9.AfterLoadDFMValues;\r\n xdsDynamicGrid18C11.AfterLoadDFMValues;\r\n xdsDynamicGrid18C10.AfterLoadDFMValues;\r\n xdsDynamicGrid18C12.AfterLoadDFMValues;\r\n xdsDynamicGrid18C14.AfterLoadDFMValues;\r\n xdsDynamicGrid18C15.AfterLoadDFMValues;\r\n xdsDynamicGrid18C13.AfterLoadDFMValues;\r\n xdsDynamicGrid18C16.AfterLoadDFMValues;\r\n xdsDynamicGrid18C17.AfterLoadDFMValues;\r\n xdsDynamicGrid18C18.AfterLoadDFMValues;\r\n xdsDynamicGrid18C19.AfterLoadDFMValues;\r\n xdsDynamicGrid18C20.AfterLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid18_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid18_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid18_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid18_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid18_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid18NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid18.AfterLoadDFMValues;\r\n xdsDynamicGrid19.AfterLoadDFMValues;\r\n xdsDynamicGrid19C1.AfterLoadDFMValues;\r\n xdsDynamicGrid19C2.AfterLoadDFMValues;\r\n xdsDynamicGrid19C3.AfterLoadDFMValues;\r\n xdsDynamicGrid19C4.AfterLoadDFMValues;\r\n xdsDynamicGrid19C5.AfterLoadDFMValues;\r\n xdsDynamicGrid19C6.AfterLoadDFMValues;\r\n xdsDynamicGrid19C7.AfterLoadDFMValues;\r\n xdsDynamicGrid19C8.AfterLoadDFMValues;\r\n xdsDynamicGrid19C9.AfterLoadDFMValues;\r\n xdsDynamicGrid19C11.AfterLoadDFMValues;\r\n xdsDynamicGrid19C10.AfterLoadDFMValues;\r\n xdsDynamicGrid19C12.AfterLoadDFMValues;\r\n xdsDynamicGrid19C14.AfterLoadDFMValues;\r\n xdsDynamicGrid19C15.AfterLoadDFMValues;\r\n xdsDynamicGrid19C13.AfterLoadDFMValues;\r\n xdsDynamicGrid19C16.AfterLoadDFMValues;\r\n xdsDynamicGrid19C17.AfterLoadDFMValues;\r\n xdsDynamicGrid19C18.AfterLoadDFMValues;\r\n xdsDynamicGrid19C19.AfterLoadDFMValues;\r\n xdsDynamicGrid19C20.AfterLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid19_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid19_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid19_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid19_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid19_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid19NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid19.AfterLoadDFMValues;\r\n xdsDynamicGrid20.AfterLoadDFMValues;\r\n xdsDynamicGrid20C1.AfterLoadDFMValues;\r\n xdsDynamicGrid20C2.AfterLoadDFMValues;\r\n xdsDynamicGrid20C3.AfterLoadDFMValues;\r\n xdsDynamicGrid20C4.AfterLoadDFMValues;\r\n xdsDynamicGrid20C5.AfterLoadDFMValues;\r\n xdsDynamicGrid20C6.AfterLoadDFMValues;\r\n xdsDynamicGrid20C7.AfterLoadDFMValues;\r\n xdsDynamicGrid20C8.AfterLoadDFMValues;\r\n xdsDynamicGrid20C9.AfterLoadDFMValues;\r\n xdsDynamicGrid20C11.AfterLoadDFMValues;\r\n xdsDynamicGrid20C10.AfterLoadDFMValues;\r\n xdsDynamicGrid20C12.AfterLoadDFMValues;\r\n xdsDynamicGrid20C14.AfterLoadDFMValues;\r\n xdsDynamicGrid20C15.AfterLoadDFMValues;\r\n xdsDynamicGrid20C13.AfterLoadDFMValues;\r\n xdsDynamicGrid20C16.AfterLoadDFMValues;\r\n xdsDynamicGrid20C17.AfterLoadDFMValues;\r\n xdsDynamicGrid20C18.AfterLoadDFMValues;\r\n xdsDynamicGrid20C19.AfterLoadDFMValues;\r\n xdsDynamicGrid20C20.AfterLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid20_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid20_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid20_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid20_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid20_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid20NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid20.AfterLoadDFMValues;\r\n xdsDynamicGrid21.AfterLoadDFMValues;\r\n xdsDynamicGrid21C1.AfterLoadDFMValues;\r\n xdsDynamicGrid21C2.AfterLoadDFMValues;\r\n xdsDynamicGrid21C3.AfterLoadDFMValues;\r\n xdsDynamicGrid21C4.AfterLoadDFMValues;\r\n xdsDynamicGrid21C5.AfterLoadDFMValues;\r\n xdsDynamicGrid21C6.AfterLoadDFMValues;\r\n xdsDynamicGrid21C7.AfterLoadDFMValues;\r\n xdsDynamicGrid21C8.AfterLoadDFMValues;\r\n xdsDynamicGrid21C9.AfterLoadDFMValues;\r\n xdsDynamicGrid21C11.AfterLoadDFMValues;\r\n xdsDynamicGrid21C10.AfterLoadDFMValues;\r\n xdsDynamicGrid21C12.AfterLoadDFMValues;\r\n xdsDynamicGrid21C14.AfterLoadDFMValues;\r\n xdsDynamicGrid21C15.AfterLoadDFMValues;\r\n xdsDynamicGrid21C13.AfterLoadDFMValues;\r\n xdsDynamicGrid21C16.AfterLoadDFMValues;\r\n xdsDynamicGrid21C17.AfterLoadDFMValues;\r\n xdsDynamicGrid21C18.AfterLoadDFMValues;\r\n xdsDynamicGrid21C19.AfterLoadDFMValues;\r\n xdsDynamicGrid21C20.AfterLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid21_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid21_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid21_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid21_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid21_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid21NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid21.AfterLoadDFMValues;\r\n xdsDynamicGrid22.AfterLoadDFMValues;\r\n xdsDynamicGrid22C1.AfterLoadDFMValues;\r\n xdsDynamicGrid22C2.AfterLoadDFMValues;\r\n xdsDynamicGrid22C3.AfterLoadDFMValues;\r\n xdsDynamicGrid22C4.AfterLoadDFMValues;\r\n xdsDynamicGrid22C5.AfterLoadDFMValues;\r\n xdsDynamicGrid22C6.AfterLoadDFMValues;\r\n xdsDynamicGrid22C7.AfterLoadDFMValues;\r\n xdsDynamicGrid22C8.AfterLoadDFMValues;\r\n xdsDynamicGrid22C9.AfterLoadDFMValues;\r\n xdsDynamicGrid22C11.AfterLoadDFMValues;\r\n xdsDynamicGrid22C10.AfterLoadDFMValues;\r\n xdsDynamicGrid22C12.AfterLoadDFMValues;\r\n xdsDynamicGrid22C14.AfterLoadDFMValues;\r\n xdsDynamicGrid22C15.AfterLoadDFMValues;\r\n xdsDynamicGrid22C13.AfterLoadDFMValues;\r\n xdsDynamicGrid22C16.AfterLoadDFMValues;\r\n xdsDynamicGrid22C17.AfterLoadDFMValues;\r\n xdsDynamicGrid22C18.AfterLoadDFMValues;\r\n xdsDynamicGrid22C19.AfterLoadDFMValues;\r\n xdsDynamicGrid22C20.AfterLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid22_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid22_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid22_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid22_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid22_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid22NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid22.AfterLoadDFMValues;\r\n xdsDynamicGrid23.AfterLoadDFMValues;\r\n xdsDynamicGrid23C1.AfterLoadDFMValues;\r\n xdsDynamicGrid23C2.AfterLoadDFMValues;\r\n xdsDynamicGrid23C3.AfterLoadDFMValues;\r\n xdsDynamicGrid23C4.AfterLoadDFMValues;\r\n xdsDynamicGrid23C5.AfterLoadDFMValues;\r\n xdsDynamicGrid23C6.AfterLoadDFMValues;\r\n xdsDynamicGrid23C7.AfterLoadDFMValues;\r\n xdsDynamicGrid23C8.AfterLoadDFMValues;\r\n xdsDynamicGrid23C9.AfterLoadDFMValues;\r\n xdsDynamicGrid23C11.AfterLoadDFMValues;\r\n xdsDynamicGrid23C10.AfterLoadDFMValues;\r\n xdsDynamicGrid23C12.AfterLoadDFMValues;\r\n xdsDynamicGrid23C14.AfterLoadDFMValues;\r\n xdsDynamicGrid23C15.AfterLoadDFMValues;\r\n xdsDynamicGrid23C13.AfterLoadDFMValues;\r\n xdsDynamicGrid23C16.AfterLoadDFMValues;\r\n xdsDynamicGrid23C17.AfterLoadDFMValues;\r\n xdsDynamicGrid23C18.AfterLoadDFMValues;\r\n xdsDynamicGrid23C19.AfterLoadDFMValues;\r\n xdsDynamicGrid23C20.AfterLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid23_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid23_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid23_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid23_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid23_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid23NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid23.AfterLoadDFMValues;\r\n xdsDynamicGrid24.AfterLoadDFMValues;\r\n xdsDynamicGrid24C1.AfterLoadDFMValues;\r\n xdsDynamicGrid24C2.AfterLoadDFMValues;\r\n xdsDynamicGrid24C3.AfterLoadDFMValues;\r\n xdsDynamicGrid24C4.AfterLoadDFMValues;\r\n xdsDynamicGrid24C5.AfterLoadDFMValues;\r\n xdsDynamicGrid24C6.AfterLoadDFMValues;\r\n xdsDynamicGrid24C7.AfterLoadDFMValues;\r\n xdsDynamicGrid24C8.AfterLoadDFMValues;\r\n xdsDynamicGrid24C9.AfterLoadDFMValues;\r\n xdsDynamicGrid24C11.AfterLoadDFMValues;\r\n xdsDynamicGrid24C10.AfterLoadDFMValues;\r\n xdsDynamicGrid24C12.AfterLoadDFMValues;\r\n xdsDynamicGrid24C14.AfterLoadDFMValues;\r\n xdsDynamicGrid24C15.AfterLoadDFMValues;\r\n xdsDynamicGrid24C13.AfterLoadDFMValues;\r\n xdsDynamicGrid24C16.AfterLoadDFMValues;\r\n xdsDynamicGrid24C17.AfterLoadDFMValues;\r\n xdsDynamicGrid24C18.AfterLoadDFMValues;\r\n xdsDynamicGrid24C19.AfterLoadDFMValues;\r\n xdsDynamicGrid24C20.AfterLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid24_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid24_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid24_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid24_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid24_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid24NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid1524.AfterLoadDFMValues;\r\n xdsDynamicGrid25.AfterLoadDFMValues;\r\n xdsDynamicGrid25C1.AfterLoadDFMValues;\r\n xdsDynamicGrid25C2.AfterLoadDFMValues;\r\n xdsDynamicGrid25C3.AfterLoadDFMValues;\r\n xdsDynamicGrid25C4.AfterLoadDFMValues;\r\n xdsDynamicGrid25C5.AfterLoadDFMValues;\r\n xdsDynamicGrid25C6.AfterLoadDFMValues;\r\n xdsDynamicGrid25C7.AfterLoadDFMValues;\r\n xdsDynamicGrid25C8.AfterLoadDFMValues;\r\n xdsDynamicGrid25C9.AfterLoadDFMValues;\r\n xdsDynamicGrid25C11.AfterLoadDFMValues;\r\n xdsDynamicGrid25C10.AfterLoadDFMValues;\r\n xdsDynamicGrid25C12.AfterLoadDFMValues;\r\n xdsDynamicGrid25C14.AfterLoadDFMValues;\r\n xdsDynamicGrid25C15.AfterLoadDFMValues;\r\n xdsDynamicGrid25C13.AfterLoadDFMValues;\r\n xdsDynamicGrid25C16.AfterLoadDFMValues;\r\n xdsDynamicGrid25C17.AfterLoadDFMValues;\r\n xdsDynamicGrid25C18.AfterLoadDFMValues;\r\n xdsDynamicGrid25C19.AfterLoadDFMValues;\r\n xdsDynamicGrid25C20.AfterLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid25_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid25_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid25_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid25_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid25_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid25NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid25.AfterLoadDFMValues;\r\n xdsDynamicGrid26.AfterLoadDFMValues;\r\n xdsDynamicGrid26C1.AfterLoadDFMValues;\r\n xdsDynamicGrid26C2.AfterLoadDFMValues;\r\n xdsDynamicGrid26C3.AfterLoadDFMValues;\r\n xdsDynamicGrid26C4.AfterLoadDFMValues;\r\n xdsDynamicGrid26C5.AfterLoadDFMValues;\r\n xdsDynamicGrid26C6.AfterLoadDFMValues;\r\n xdsDynamicGrid26C7.AfterLoadDFMValues;\r\n xdsDynamicGrid26C8.AfterLoadDFMValues;\r\n xdsDynamicGrid26C9.AfterLoadDFMValues;\r\n xdsDynamicGrid26C11.AfterLoadDFMValues;\r\n xdsDynamicGrid26C10.AfterLoadDFMValues;\r\n xdsDynamicGrid26C12.AfterLoadDFMValues;\r\n xdsDynamicGrid26C14.AfterLoadDFMValues;\r\n xdsDynamicGrid26C15.AfterLoadDFMValues;\r\n xdsDynamicGrid26C13.AfterLoadDFMValues;\r\n xdsDynamicGrid26C16.AfterLoadDFMValues;\r\n xdsDynamicGrid26C17.AfterLoadDFMValues;\r\n xdsDynamicGrid26C18.AfterLoadDFMValues;\r\n xdsDynamicGrid26C19.AfterLoadDFMValues;\r\n xdsDynamicGrid26C20.AfterLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid26_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid26_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid26_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid26_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid26_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid26NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid26.AfterLoadDFMValues;\r\n xdsDynamicGrid27.AfterLoadDFMValues;\r\n xdsDynamicGrid27C1.AfterLoadDFMValues;\r\n xdsDynamicGrid27C2.AfterLoadDFMValues;\r\n xdsDynamicGrid27C3.AfterLoadDFMValues;\r\n xdsDynamicGrid27C4.AfterLoadDFMValues;\r\n xdsDynamicGrid27C5.AfterLoadDFMValues;\r\n xdsDynamicGrid27C6.AfterLoadDFMValues;\r\n xdsDynamicGrid27C7.AfterLoadDFMValues;\r\n xdsDynamicGrid27C8.AfterLoadDFMValues;\r\n xdsDynamicGrid27C9.AfterLoadDFMValues;\r\n xdsDynamicGrid27C11.AfterLoadDFMValues;\r\n xdsDynamicGrid27C10.AfterLoadDFMValues;\r\n xdsDynamicGrid27C12.AfterLoadDFMValues;\r\n xdsDynamicGrid27C14.AfterLoadDFMValues;\r\n xdsDynamicGrid27C15.AfterLoadDFMValues;\r\n xdsDynamicGrid27C13.AfterLoadDFMValues;\r\n xdsDynamicGrid27C16.AfterLoadDFMValues;\r\n xdsDynamicGrid27C17.AfterLoadDFMValues;\r\n xdsDynamicGrid27C18.AfterLoadDFMValues;\r\n xdsDynamicGrid27C19.AfterLoadDFMValues;\r\n xdsDynamicGrid27C20.AfterLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid27_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid27_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid27_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid27_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid27_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid27NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid27.AfterLoadDFMValues;\r\n xdsDynamicGrid28.AfterLoadDFMValues;\r\n xdsDynamicGrid28C1.AfterLoadDFMValues;\r\n xdsDynamicGrid28C2.AfterLoadDFMValues;\r\n xdsDynamicGrid28C3.AfterLoadDFMValues;\r\n xdsDynamicGrid28C4.AfterLoadDFMValues;\r\n xdsDynamicGrid28C5.AfterLoadDFMValues;\r\n xdsDynamicGrid28C6.AfterLoadDFMValues;\r\n xdsDynamicGrid28C7.AfterLoadDFMValues;\r\n xdsDynamicGrid28C8.AfterLoadDFMValues;\r\n xdsDynamicGrid28C9.AfterLoadDFMValues;\r\n xdsDynamicGrid28C11.AfterLoadDFMValues;\r\n xdsDynamicGrid28C10.AfterLoadDFMValues;\r\n xdsDynamicGrid28C12.AfterLoadDFMValues;\r\n xdsDynamicGrid28C14.AfterLoadDFMValues;\r\n xdsDynamicGrid28C15.AfterLoadDFMValues;\r\n xdsDynamicGrid28C13.AfterLoadDFMValues;\r\n xdsDynamicGrid28C16.AfterLoadDFMValues;\r\n xdsDynamicGrid28C17.AfterLoadDFMValues;\r\n xdsDynamicGrid28C18.AfterLoadDFMValues;\r\n xdsDynamicGrid28C19.AfterLoadDFMValues;\r\n xdsDynamicGrid28C20.AfterLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid28_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid28_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid28_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid28_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid28_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid28NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid28.AfterLoadDFMValues;\r\n xdsDynamicGrid29.AfterLoadDFMValues;\r\n xdsDynamicGrid29C1.AfterLoadDFMValues;\r\n xdsDynamicGrid29C2.AfterLoadDFMValues;\r\n xdsDynamicGrid29C3.AfterLoadDFMValues;\r\n xdsDynamicGrid29C4.AfterLoadDFMValues;\r\n xdsDynamicGrid29C5.AfterLoadDFMValues;\r\n xdsDynamicGrid29C6.AfterLoadDFMValues;\r\n xdsDynamicGrid29C7.AfterLoadDFMValues;\r\n xdsDynamicGrid29C8.AfterLoadDFMValues;\r\n xdsDynamicGrid29C9.AfterLoadDFMValues;\r\n xdsDynamicGrid29C11.AfterLoadDFMValues;\r\n xdsDynamicGrid29C10.AfterLoadDFMValues;\r\n xdsDynamicGrid29C12.AfterLoadDFMValues;\r\n xdsDynamicGrid29C14.AfterLoadDFMValues;\r\n xdsDynamicGrid29C15.AfterLoadDFMValues;\r\n xdsDynamicGrid29C13.AfterLoadDFMValues;\r\n xdsDynamicGrid29C16.AfterLoadDFMValues;\r\n xdsDynamicGrid29C17.AfterLoadDFMValues;\r\n xdsDynamicGrid29C18.AfterLoadDFMValues;\r\n xdsDynamicGrid29C19.AfterLoadDFMValues;\r\n xdsDynamicGrid29C20.AfterLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid29_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid29_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid29_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid29_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid29_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid29NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid29.AfterLoadDFMValues;\r\n xdsDynamicGrid30.AfterLoadDFMValues;\r\n xdsDynamicGrid30C1.AfterLoadDFMValues;\r\n xdsDynamicGrid30C2.AfterLoadDFMValues;\r\n xdsDynamicGrid30C3.AfterLoadDFMValues;\r\n xdsDynamicGrid30C4.AfterLoadDFMValues;\r\n xdsDynamicGrid30C5.AfterLoadDFMValues;\r\n xdsDynamicGrid30C6.AfterLoadDFMValues;\r\n xdsDynamicGrid30C7.AfterLoadDFMValues;\r\n xdsDynamicGrid30C8.AfterLoadDFMValues;\r\n xdsDynamicGrid30C9.AfterLoadDFMValues;\r\n xdsDynamicGrid30C11.AfterLoadDFMValues;\r\n xdsDynamicGrid30C10.AfterLoadDFMValues;\r\n xdsDynamicGrid30C12.AfterLoadDFMValues;\r\n xdsDynamicGrid30C14.AfterLoadDFMValues;\r\n xdsDynamicGrid30C15.AfterLoadDFMValues;\r\n xdsDynamicGrid30C13.AfterLoadDFMValues;\r\n xdsDynamicGrid30C16.AfterLoadDFMValues;\r\n xdsDynamicGrid30C17.AfterLoadDFMValues;\r\n xdsDynamicGrid30C18.AfterLoadDFMValues;\r\n xdsDynamicGrid30C19.AfterLoadDFMValues;\r\n xdsDynamicGrid30C20.AfterLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_NURSE2.AfterLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_NURSE1.AfterLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_PROVIDER.AfterLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_PROCEDURENUMBER.AfterLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_MRN.AfterLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_APPTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_MEDID.AfterLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_PROBLEMID.AfterLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_ALLERGYID.AfterLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_REFPHYCODE.AfterLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_PATIENTNAME.AfterLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_PATIENTDOB.AfterLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_PROCIMAGECOUNT.AfterLoadDFMValues;\r\n xdsDynamicGrid30_CURRENT_APPTDATE.AfterLoadDFMValues;\r\n xdsDynamicGrid30_PATIENTFHIRID.AfterLoadDFMValues;\r\n xdsDynamicGrid30_PATIENTCERNERID.AfterLoadDFMValues;\r\n xdsDynamicGrid30_SETUPFACILITYID.AfterLoadDFMValues;\r\n xdsDynamicGrid30_USERID.AfterLoadDFMValues;\r\n xdsDynamicGrid30NEW_RECORD.AfterLoadDFMValues;\r\n dsDynamicGrid30.AfterLoadDFMValues;\r\n WebHttpRequest1.AfterLoadDFMValues;\r\n EGV_SESSIONSTORAGE.AfterLoadDFMValues;\r\n xdsImages.AfterLoadDFMValues;\r\n xdsImagesIMAGE.AfterLoadDFMValues;\r\n xdsImagesIMAGEBASE64.AfterLoadDFMValues;\r\n xdsImagesIMAGEBASE64_DATA.AfterLoadDFMValues;\r\n xdsImagesIMAGENUMBER.AfterLoadDFMValues;\r\n xdsImagesSELECTED.AfterLoadDFMValues;\r\n xdsImagesLABEL.AfterLoadDFMValues;\r\n xdsImagesSEQUENCE.AfterLoadDFMValues;\r\n xdsImagesCOMMENTS.AfterLoadDFMValues;\r\n xdsImagesFILENAME.AfterLoadDFMValues;\r\n xdsImagesBORDER_COLOR.AfterLoadDFMValues;\r\n xdsImagesGILABELTEXT.AfterLoadDFMValues;\r\n xdsImagesGILABELTEXTCOLOR.AfterLoadDFMValues;\r\n xdsImagesGILABELBKCOLOR.AfterLoadDFMValues;\r\n xdsImagesGILABELTEXTCOLOR_HEX.AfterLoadDFMValues;\r\n xdsImagesGILABELBKCOLOR_HEX.AfterLoadDFMValues;\r\n dsImages.AfterLoadDFMValues;\r\n XDataWebConnection2.AfterLoadDFMValues;\r\n XDataWebClient2.AfterLoadDFMValues;\r\n xdsImageDiagram.AfterLoadDFMValues;\r\n xdsImageDiagramIMAGE.AfterLoadDFMValues;\r\n xdsImageDiagramIMAGEBASE64.AfterLoadDFMValues;\r\n xdsImageDiagramIMAGEBASE64_DATA.AfterLoadDFMValues;\r\n dsImageDiagram.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit Picklist;\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 WEBLib.Buttons, VCL.TMSFNCCustomControl, VCL.TMSFNCSwitch, WEBLib.ExtCtrls,\r\n Vcl.Grids, WEBLib.DBCtrls, Vcl.Controls, WEBLib.WebCtrls, Data.DB, XData.Web.Client,\r\n System.StrUtils,\r\n WEBLib.Clipboard, WEBLib.Grids;\r\n\r\ntype\r\n TfrmPicklist = class(TForm)\r\n PKL_DIV: THTMLDiv;\r\n WebLabel34: TLabel;\r\n pnlBottom: TPanel;\r\n pnlPKL: TPanel;\r\n memoPKL_Edit: TMemo;\r\n memoPKL: TMemo;\r\n grdData: TDBGrid;\r\n WebLabel15: TLabel;\r\n WebMemo1: TMemo;\r\n ClipBoard: TClipboard;\r\n WebPanel1: TPanel;\r\n btnPKLSwitchMode: TTMSFNCSwitch;\r\n pnlButtons: TPanel;\r\n btnPKL_CopyItems: TBitBtn;\r\n btnPKL_HideShowItem: TBitBtn;\r\n btnPKL_HideCommon: TBitBtn;\r\n btnPKL_UP: TBitBtn;\r\n btnPKL_DOWN: TBitBtn;\r\n btnAlphaBetize: TBitBtn;\r\n btnAdd: TBitBtn;\r\n btnPaste: TBitBtn;\r\n btnDelete: TBitBtn;\r\n btnClose: TBitBtn;\r\n btnSave: TBitBtn;\r\n pnlFormCaption: TPanel;\r\n procedure btnCloseClick(Sender: TObject);\r\n procedure WebFormShow(Sender: TObject);\r\n procedure grdDataCanEditCell(Sender: TObject; ACol, ARow: Integer;\r\n var CanEdit: Boolean);\r\n procedure grdDataClick(Sender: TObject);\r\n procedure grdDataDblClick(Sender: TObject);\r\n procedure grdDataGetCellChildren(Sender: TObject; ACol, ARow: Integer;\r\n AField: TField; AValue: string; AElement: TJSHTMLElementRecord);\r\n procedure grdDataKeyPress(Sender: TObject; var Key: Char);\r\n procedure grdDataMouseLeave(Sender: TObject);\r\n procedure btnSaveClick(Sender: TObject);\r\n procedure btnDeleteClick(Sender: TObject);\r\n procedure btnPasteClick(Sender: TObject);\r\n procedure btnPKLSwitchModeChange(Sender: TObject);\r\n procedure memoPKL_EditEnter(Sender: TObject);\r\n procedure memoPKL_EditExit(Sender: TObject);\r\n procedure btnAlphaBetizeClick(Sender: TObject);\r\n procedure btnPKL_DOWNClick(Sender: TObject);\r\n procedure btnPKL_UPClick(Sender: TObject);\r\n procedure btnPKL_HideCommonClick(Sender: TObject);\r\n procedure btnPKL_HideShowItemClick(Sender: TObject);\r\n procedure btnPKL_CopyItemsClick(Sender: TObject);\r\n procedure WebFormClose(Sender: TObject; var Action: TCloseAction);\r\n procedure WebFormResize(Sender: TObject);\r\n procedure grdDataKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);\r\n\r\n private\r\n { Private declarations }\r\n public\r\n { Public declarations }\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmPicklist: TfrmPicklist;\r\n CommonItemsHidden_p: boolean=false;\r\n\r\nimplementation\r\n\r\n{$R *.dfm}\r\n\r\nuses main, datamodule, Common;\r\n\r\nprocedure TfrmPicklist.btnAlphaBetizeClick(Sender: TObject);\r\nvar s: string;\r\nprocedure OnResult(Response: TXDataClientResponse);\r\nbegin\r\nEGV_CURRENTDYNAMICGRID := grdData;\r\npklopen;\r\nend;\r\n\r\nbegin\r\ndm.xdsPicklist.First;\r\ns := '';\r\nwhile not dm.xdsPicklist.eof\r\ndo begin\r\n s := s + dm.xdsPicklistIDENT_VALUE.asstring;\r\n dm.xdsPicklist.next;\r\nend;\r\ndm.xdsPicklist.First;\r\nif IsAllDigit(s)\r\nthen begin\r\n Showmessage('List contains digital items only and cannot be alphabetized');\r\n exit;\r\n end;\r\n\r\ndm.XDataWebClient1.RawInvoke('IReportService.PKL_Alphabetize', [EGV_FACILITYID, EGV_SECTIONNAME, EGV_SPECIALITY, '1'], @OnResult);\r\n\r\nend;\r\n\r\nprocedure TfrmPicklist.btnCloseClick(Sender: TObject);\r\nbegin\r\n{frmmain.FormContainer1.Visible:=true;\r\nfrmmain.FormContainer2.Visible:=false;\r\nfrmmain.FormContainer3.Visible:=false; }\r\nRefreshGridDatasources(getpreviousform);\r\nself.Close;\r\n\r\nend;\r\n\r\nprocedure TfrmPicklist.btnDeleteClick(Sender: TObject);\r\nbegin\r\ndm.xdsPicklist.Delete;\r\nend;\r\n\r\nprocedure TfrmPicklist.btnPasteClick(Sender: TObject);\r\nvar i: integer;\r\nbegin\r\nmemoPKL_EDIT.Text := stringreplace(memoPKL_EDIT.Text,chr(10), chr(10)+chr(13), [rfReplaceAll]);\r\nfor i:= 0 to memoPKL_EDIT.Lines.Count - 1\r\ndo begin\r\n if trim(memoPKL_EDIT.Lines[i]) <> ''\r\n then begin\r\n dm.xdsPicklist.Append;\r\n dm.xdsPicklistIDENT_VALUE.AsString := memoPKL_EDIT.Lines[i];\r\n dm.xdsPicklist.Post;\r\n dm.xdsPicklist.First;\r\n dm.xdsPicklist.Last;\r\n end;\r\n //DataSetApplyUpdate(dm.xdsPicklist, 'I', 1);\r\n // apply happens in After_Insert.\r\n end;\r\ndm.xdsPicklist.first;\r\nwhile not dm.xdsPicklist.eof do dm.xdsPicklist.Next;\r\n\r\nmemoPKL_EDIT.Text := 'Paste / Type your Items-to-Add here and click ';\r\n// Disable picklist buttons if not your facility\r\nbtnPKL_UP.Visible := (dm.xdsPicklistFACILITYID.asstring = egv_facilityid );\r\nbtnPKL_DOWN.Visible := (dm.xdsPicklistFACILITYID.asstring = egv_facilityid );\r\nbtnAlphabetize.Visible := (dm.xdsPicklistFACILITYID.asstring = egv_facilityid );\r\nbtnDelete.Visible := (dm.xdsPicklistFACILITYID.asstring = egv_facilityid );\r\n\r\nbtnPaste.Visible := false;\r\nend;\r\n\r\nprocedure TfrmPicklist.btnSaveClick(Sender: TObject);\r\nbegin\r\nif Assigned(egv_pkltargetmemo) and ( trim(memoPKL.Text) <> trim(egv_pkltargetmemo.text) )\r\nthen begin\r\n egv_pkltargetmemo.text := trim(memoPKL.Text);\r\n egv_pkltargetmemo.Tag := 1; // updated\r\n BlockApplyDependencies((EGV_PKLTARGETMEMO.Parent as TPanel), EGV_PKLTARGETMEMO.text);\r\n StretchMemo(egv_pkltargetmemo);\r\n end;\r\nbtnCloseclick(nil);\r\nend;\r\n\r\nprocedure TfrmPicklist.btnPKLSwitchModeChange(Sender: TObject);\r\nbegin\r\nEGV_PKLEDITMODE := (btnPKLSwitchMode.state = ssON);\r\nEGV_CURRENTDYNAMICGRID := grdData;\r\nPKLOpen;\r\n\r\n//btnClose.Visible := (( not btnPKLSwitchMode.checked ) and Assigned(EGV_PKLTARGETMEMO));\r\n\r\n//btnpaste.Visible := ( btnSwitch.checked );\r\n//btnAdd.Visible := ( btnSwitch.checked );\r\nbtnDelete.Visible := ( btnPKLSwitchMode.checked );\r\nbtnAlphabetize.Visible := ( btnPKLSwitchMode.checked );\r\nbtnPKL_UP.Visible := ( btnPKLSwitchMode.checked );\r\nbtnPKL_DOWN.Visible := ( btnPKLSwitchMode.checked );\r\nbtnPKL_HideShowItem.Visible := ( btnPKLSwitchMode.checked );\r\nbtnPKL_HideCommon.Visible := ( btnPKLSwitchMode.checked );\r\n\r\nif btnPKLSwitchMode.state = ssOn\r\nthen begin\r\n grdData.columns[2].width := 50;\r\n memoPKL_Edit.visible := true;\r\n memoPKL.visible := false;\r\n grdData.Options := grdData.Options + [goEditing];\r\n memoPKL_Edit.Text := 'Paste / Type your Items-to-Add here and click ';\r\n end\r\nelse begin\r\n grdData.columns[2].width := 0;\r\n memoPKL_Edit.visible := false;\r\n memoPKL.visible := true;\r\n grdData.Options := grdData.Options - [goEditing];\r\n end;\r\nend;\r\n\r\nprocedure TfrmPicklist.btnPKL_CopyItemsClick(Sender: TObject);\r\nbegin\r\ngrdData.DataSource.DataSet.First;\r\nWebMemo1.Clear;\r\nwhile not grdData.DataSource.DataSet.Eof\r\ndo begin\r\n WebMemo1.Lines.add(grdData.DataSource.DataSet.FieldByName('IDENT_VALUE').AsString);\r\n grdData.DataSource.DataSet.Next;\r\n end;\r\nClipboard.CopyToClipboard(WebMemo1.Text);\r\ngrdData.DataSource.DataSet.First;\r\nend;\r\n\r\nprocedure TfrmPicklist.btnPKL_DOWNClick(Sender: TObject);\r\nvar s1, s2: string; i1, i2: integer;\r\nbegin\r\nif dm.xdsPicklistFACILITYID.asstring <> egv_facilityid then exit;\r\ns1 := dm.xdsPicklistIDENT_VALUE.asstring;\r\ni1 := dm.xdsPicklistVISIBLE.asinteger;\r\ndm.xdsPicklist.next;\r\nif dm.xdsPicklist.eof then exit;\r\n\r\nif dm.xdsPicklistFACILITYID.asstring <> egv_facilityid then exit;\r\n\r\ns2 := dm.xdsPicklistIDENT_VALUE.asstring;\r\ni2 := dm.xdsPicklistVISIBLE.asinteger;\r\ndm.xdsPicklist.edit;\r\ndm.xdsPicklistIDENT_VALUE.asstring := s1;\r\ndm.xdsPicklistVISIBLE.asinteger := i1;\r\ndm.xdsPicklist.post;\r\ndm.xdsPicklist.prior;\r\ndm.xdsPicklist.edit;\r\ndm.xdsPicklistIDENT_VALUE.asstring := s2;\r\ndm.xdsPicklistVISIBLE.asinteger := i2;\r\ndm.xdsPicklist.post;\r\ndm.xdsPicklist.next;\r\nend;\r\n\r\nprocedure TfrmPicklist.btnPKL_HideCommonClick(Sender: TObject);\r\nvar beforeedit_p: TDatasetNotifyEvent;\r\nbegin\r\nif not CommonItemsHidden_p\r\nthen CommonItemsHidden_p := true\r\nelse CommonItemsHidden_p := false;\r\n\r\nbeforeedit_p := dm.xdsPicklist.BeforeEdit;\r\ndm.xdsPicklist.BeforeEdit := nil;\r\ndm.xdsPicklist.First;\r\nwhile not dm.xdsPicklist.eof\r\ndo begin\r\n if dm.xdsPicklistFACILITYID.AsInteger = 1\r\n then begin\r\n dm.xdsPicklist.Edit;\r\n if CommonItemsHidden_p\r\n then dm.xdsPicklistVISIBLE.AsInteger := 1\r\n else dm.xdsPicklistVISIBLE.AsInteger := 0;\r\n dm.xdsPicklist.Post;\r\n end;\r\n dm.xdsPicklist.next;\r\n end;\r\ndm.xdsPicklist.BeforeEdit := beforeedit_p;\r\nend;\r\n\r\nprocedure TfrmPicklist.btnPKL_HideShowItemClick(Sender: TObject);\r\nvar event_p: TDataSetNotifyEvent;\r\nbegin\r\ntry\r\nevent_p := dm.xdsPicklist.BeforeEdit;\r\n dm.xdsPicklist.BeforeEdit := nil;\r\n dm.xdsPicklist.Edit;\r\n if dm.xdsPicklistVISIBLE.AsInteger = 0\r\n then dm.xdsPicklistVISIBLE.AsInteger := 1\r\n else dm.xdsPicklistVISIBLE.AsInteger := 0;\r\n dm.xdsPicklist.Post;\r\nfinally\r\n dm.xdsPicklist.BeforeEdit := event_p;\r\nend;\r\nend;\r\n\r\nprocedure TfrmPicklist.btnPKL_UPClick(Sender: TObject);\r\nvar s1, s2: string; i1, i2: integer;\r\nbegin\r\nif dm.xdsPicklistFACILITYID.asstring <> egv_facilityid then exit;\r\ns1 := dm.xdsPicklistIDENT_VALUE.asstring;\r\ni1 := dm.xdsPicklistVISIBLE.asinteger;\r\ndm.xdsPicklist.prior;\r\nif dm.xdsPicklistIDENT_VALUE.asstring = s1 then exit;\r\ns2 := dm.xdsPicklistIDENT_VALUE.asstring;\r\ni2 := dm.xdsPicklistVISIBLE.asinteger;\r\ndm.xdsPicklist.edit;\r\ndm.xdsPicklistIDENT_VALUE.asstring := s1;\r\ndm.xdsPicklistVISIBLE.asinteger := i1;\r\ndm.xdsPicklist.Post;\r\n\r\ndm.xdsPicklist.next;\r\ndm.xdsPicklist.edit;\r\ndm.xdsPicklistIDENT_VALUE.asstring := s2;\r\ndm.xdsPicklistVISIBLE.asinteger := i2;\r\ndm.xdsPicklist.Post;\r\n\r\ndm.xdsPicklist.prior;\r\n\r\nend;\r\n\r\nprocedure TfrmPicklist.grdDataCanEditCell(Sender: TObject; ACol, ARow: Integer;\r\n var CanEdit: Boolean);\r\nbegin\r\n//CanEdit := (Acol = 0);\r\nend;\r\n\r\nprocedure TfrmPicklist.grdDataClick(Sender: TObject);\r\nvar i: integer;\r\nbegin\r\nif not dm.xdsPicklist.isEmpty then dm.xdsPicklist.RecNo := grdData.row;\r\n\r\nif uppercase(GetCurrentForm.Name) = 'FRMSETTINGS' then ParseAndShowMainMenuLine;\r\nif GetPreviousForm <> nil then if uppercase(GetPreviousForm.Name) = 'FRMDYNAMICGRIDSETUP' then ParseAndShowGridSetupLine;\r\n\r\nend;\r\n\r\nprocedure TfrmPicklist.grdDataDblClick(Sender: TObject);\r\nvar s: string;\r\nbegin\r\n//showmessage(inttostr(dm.xdsPicklist.RECNO));\r\n//showmessage(inttostr(grdData.row));\r\nif btnPKLSwitchMode.Checked then exit;\r\n\r\ns := stringreplace(dm.xdsPicklistIDENT_VALUE.AsString, chr(13), '', [rfReplaceAll]);\r\ns := stringreplace(s, chr(10), '', [rfReplaceAll]);\r\ns := trim(s);\r\nif trim(memoPKL.Text) = ''\r\nthen memoPKL.Text := s\r\nelse memoPKL.Text := trim(memoPKL.Text) + ', ' + s;\r\nend;\r\n\r\nprocedure TfrmPicklist.grdDataGetCellChildren(Sender: TObject; ACol,\r\n ARow: Integer; AField: TField; AValue: string;\r\n AElement: TJSHTMLElementRecord);\r\nbegin\r\n\r\nif ((Sender as TDBGrid).datasource.dataset.fields[4].asinteger <> strtoint(egv_facilityid) ) and\r\n ((Sender as TDBGrid).Columns[ACol].datafield = '') and (ARow > 0)\r\nthen AElement.element.style.setProperty('background-color', 'orange');\r\nend;\r\n\r\nprocedure TfrmPicklist.grdDataKeyPress(Sender: TObject; var Key: Char);\r\nbegin\r\nif (btnPKLSwitchMode.state = ssON) and (dm.xdsPickList.fieldbyname('FACILITYID').asinteger = strtoint(egv_facilityid))\r\nthen begin\r\n grdData.datasource.dataset.edit;\r\nend;\r\nend;\r\n\r\nprocedure TfrmPicklist.grdDataKeyUp(Sender: TObject; var Key: Word;\r\n Shift: TShiftState);\r\nbegin\r\nif uppercase(GetCurrentForm.Name) = 'FRMSETTINGS' then ParseAndShowMainMenuLine;\r\nif GetPreviousForm <> nil then if uppercase(GetPreviousForm.Name) = 'FRMDYNAMICGRIDSETUP' then ParseAndShowGridSetupLine;\r\nend;\r\n\r\nprocedure TfrmPicklist.grdDataMouseLeave(Sender: TObject);\r\nbegin\r\n//Post and commit\r\nif dm.xdsPicklist.state in [dsEdit, dsInsert] then dm.xdsPicklist.post;\r\n//dm.xdsPicklist.ApplyUpdates;\r\nend;\r\n\r\nprocedure TfrmPicklist.memoPKL_EditEnter(Sender: TObject);\r\nbegin\r\nmemoPKL_Edit.Clear;\r\nbtnpaste.Visible := true;\r\nend;\r\n\r\nprocedure TfrmPicklist.memoPKL_EditExit(Sender: TObject);\r\nbegin\r\nif (memoPKL_Edit.Text = '')\r\nthen begin\r\n memoPKL_Edit.Text := 'Paste / Type your Items-to-Add here and click ';\r\n btnPaste.Visible := false;\r\n end;\r\nend;\r\n\r\nprocedure TfrmPicklist.WebFormClose(Sender: TObject; var Action: TCloseAction);\r\nvar prevform_p: TForm;\r\nbegin\r\nprevform_p := getpreviousform;\r\nHideFormContainer(true);\r\ngrdData.DataSource := nil;\r\n{\r\nwith frmmain\r\ndo begin\r\nif Assigned(egv_subform3)\r\nthen begin\r\n ActiveFormContainer(2);\r\n egv_subform3 := nil;\r\n end\r\nelse begin\r\n ActiveFormContainer(1);\r\n egv_subform2 := nil;\r\n end;\r\nend; }\r\nif EGV_PKLMODE = 0\r\nthen begin\r\n egv_pkltargetmemo := nil;\r\n egv_pkltargetmemoname := '';\r\n egv_pkltargetmemoblock := nil;\r\n end;\r\nEGV_PKLMODE := 0;\r\n if assigned(prevform_p)\r\nthen prevform_p.Realign;\r\nend;\r\n\r\nprocedure TfrmPicklist.WebFormResize(Sender: TObject);\r\nbegin //showmessage('1');\r\nGrid_AdjustColumns(grdData, false);\r\nResizebuttons(pnlButtons);\r\nend;\r\n\r\nprocedure TfrmPicklist.WebFormShow(Sender: TObject);\r\nbegin\r\n\r\ngrdData.columns[2].width := 0;\r\n\r\nmemoPKL.align := alClient;\r\nmemoPKL_Edit.align := alClient;\r\n\r\npnlBottom.align := alBottom;\r\npnlPKL.align := alBottom;\r\nweblabel34.align := alBottom;\r\n\r\ngrdData.align := alClient;\r\ngrdData.columns[0].width := grdData.width - 100;\r\n\r\npnlFormCaption.caption := EGV_CHILD_FORM_CAPTION;\r\n\r\nbtnPKLSwitchMode.Visible := true;\r\nbtnPKLSwitchMode.state := ssOff;\r\n\r\nif Assigned(EGV_PKLTARGETMEMO) then memoPKL.text := EGV_PKLTARGETMEMO.text;\r\n\r\nPKL_Div.align := alClient;\r\n\r\ngrdData.DataSource := dm.dsPickList;\r\n\r\nif EGV_PKLEDITMODE\r\nthen begin\r\n if (btnPKLSwitchMode.state = ssON)\r\n then begin\r\n EGV_CURRENTDYNAMICGRID := grdData;\r\n PKLOpen;\r\n end\r\n else btnPKLSwitchMode.state := ssON;\r\n end\r\nelse begin\r\n if (btnPKLSwitchMode.state = ssOFF)\r\n then begin\r\n EGV_CURRENTDYNAMICGRID := grdData;\r\n PKLOpen;\r\n end\r\n else btnPKLSwitchMode.state := ssOFF;\r\n end;\r\n\r\nbtnSave.Visible := Assigned(EGV_PKLTARGETMEMO);\r\nbtnClose.Visible := (not Assigned(EGV_GRIDTOSETUP));\r\nend;\r\n\r\n\r\n\r\nprocedure TfrmPicklist.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n PKL_DIV := THTMLDiv.Create(Self);\r\n WebLabel34 := TLabel.Create(Self);\r\n WebLabel15 := TLabel.Create(Self);\r\n pnlBottom := TPanel.Create(Self);\r\n WebPanel1 := TPanel.Create(Self);\r\n btnPKLSwitchMode := TTMSFNCSwitch.Create(Self);\r\n pnlButtons := TPanel.Create(Self);\r\n btnPKL_CopyItems := TBitBtn.Create(Self);\r\n btnPKL_HideShowItem := TBitBtn.Create(Self);\r\n btnPKL_HideCommon := TBitBtn.Create(Self);\r\n btnPKL_UP := TBitBtn.Create(Self);\r\n btnPKL_DOWN := TBitBtn.Create(Self);\r\n btnAlphaBetize := TBitBtn.Create(Self);\r\n btnAdd := TBitBtn.Create(Self);\r\n btnPaste := TBitBtn.Create(Self);\r\n btnDelete := TBitBtn.Create(Self);\r\n btnClose := TBitBtn.Create(Self);\r\n btnSave := TBitBtn.Create(Self);\r\n pnlPKL := TPanel.Create(Self);\r\n memoPKL_Edit := TMemo.Create(Self);\r\n memoPKL := TMemo.Create(Self);\r\n grdData := TDBGrid.Create(Self);\r\n WebMemo1 := TMemo.Create(Self);\r\n pnlFormCaption := TPanel.Create(Self);\r\n ClipBoard := TClipboard.Create(Self);\r\n\r\n PKL_DIV.BeforeLoadDFMValues;\r\n WebLabel34.BeforeLoadDFMValues;\r\n WebLabel15.BeforeLoadDFMValues;\r\n pnlBottom.BeforeLoadDFMValues;\r\n WebPanel1.BeforeLoadDFMValues;\r\n btnPKLSwitchMode.BeforeLoadDFMValues;\r\n pnlButtons.BeforeLoadDFMValues;\r\n btnPKL_CopyItems.BeforeLoadDFMValues;\r\n btnPKL_HideShowItem.BeforeLoadDFMValues;\r\n btnPKL_HideCommon.BeforeLoadDFMValues;\r\n btnPKL_UP.BeforeLoadDFMValues;\r\n btnPKL_DOWN.BeforeLoadDFMValues;\r\n btnAlphaBetize.BeforeLoadDFMValues;\r\n btnAdd.BeforeLoadDFMValues;\r\n btnPaste.BeforeLoadDFMValues;\r\n btnDelete.BeforeLoadDFMValues;\r\n btnClose.BeforeLoadDFMValues;\r\n btnSave.BeforeLoadDFMValues;\r\n pnlPKL.BeforeLoadDFMValues;\r\n memoPKL_Edit.BeforeLoadDFMValues;\r\n memoPKL.BeforeLoadDFMValues;\r\n grdData.BeforeLoadDFMValues;\r\n WebMemo1.BeforeLoadDFMValues;\r\n pnlFormCaption.BeforeLoadDFMValues;\r\n ClipBoard.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmPicklist';\r\n Width := 1385;\r\n Height := 647;\r\n SetEvent(Self, 'OnClose', 'WebFormClose');\r\n SetEvent(Self, 'OnResize', 'WebFormResize');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n PKL_DIV.SetParentComponent(Self);\r\n PKL_DIV.Name := 'PKL_DIV';\r\n PKL_DIV.Left := 0;\r\n PKL_DIV.Top := 0;\r\n PKL_DIV.Width := 1385;\r\n PKL_DIV.Height := 647;\r\n PKL_DIV.Align := alClient;\r\n PKL_DIV.Role := '';\r\n WebLabel34.SetParentComponent(PKL_DIV);\r\n WebLabel34.Name := 'WebLabel34';\r\n WebLabel34.Left := 0;\r\n WebLabel34.Top := 41;\r\n WebLabel34.Width := 1385;\r\n WebLabel34.Height := 17;\r\n WebLabel34.Align := alTop;\r\n WebLabel34.AutoSize := False;\r\n WebLabel34.Color := 15921906;\r\n WebLabel34.HeightPercent := 100.000000000000000000;\r\n WebLabel34.WidthPercent := 100.000000000000000000;\r\n WebLabel15.SetParentComponent(PKL_DIV);\r\n WebLabel15.Name := 'WebLabel15';\r\n WebLabel15.Left := 0;\r\n WebLabel15.Top := 593;\r\n WebLabel15.Width := 1385;\r\n WebLabel15.Height := 13;\r\n WebLabel15.Align := alBottom;\r\n WebLabel15.HeightPercent := 100.000000000000000000;\r\n WebLabel15.WidthPercent := 100.000000000000000000;\r\n pnlBottom.SetParentComponent(PKL_DIV);\r\n pnlBottom.Name := 'pnlBottom';\r\n pnlBottom.Left := 0;\r\n pnlBottom.Top := 606;\r\n pnlBottom.Width := 1385;\r\n pnlBottom.Height := 41;\r\n pnlBottom.Align := alBottom;\r\n pnlBottom.BorderStyle := bsNone;\r\n pnlBottom.ChildOrder := 5;\r\n pnlBottom.Color := clWhite;\r\n pnlBottom.TabOrder := 0;\r\n WebPanel1.SetParentComponent(pnlBottom);\r\n WebPanel1.Name := 'WebPanel1';\r\n WebPanel1.Left := 0;\r\n WebPanel1.Top := 0;\r\n WebPanel1.Width := 89;\r\n WebPanel1.Height := 41;\r\n WebPanel1.Align := alLeft;\r\n WebPanel1.BorderColor := clNone;\r\n WebPanel1.BorderStyle := bsNone;\r\n WebPanel1.ChildOrder := 7;\r\n WebPanel1.Color := clWhite;\r\n WebPanel1.TabOrder := 0;\r\n btnPKLSwitchMode.SetParentComponent(WebPanel1);\r\n btnPKLSwitchMode.Name := 'btnPKLSwitchMode';\r\n btnPKLSwitchMode.Left := 4;\r\n btnPKLSwitchMode.Top := 8;\r\n btnPKLSwitchMode.Width := 77;\r\n btnPKLSwitchMode.Height := 27;\r\n btnPKLSwitchMode.Cursor := crHandPoint;\r\n btnPKLSwitchMode.ParentDoubleBuffered := False;\r\n btnPKLSwitchMode.Color := clBtnFace;\r\n btnPKLSwitchMode.DoubleBuffered := True;\r\n btnPKLSwitchMode.TabOrder := 0;\r\n btnPKLSwitchMode.AppearanceOff.Fill.Color := -1;\r\n btnPKLSwitchMode.AppearanceOff.Font.Charset := DEFAULT_CHARSET;\r\n btnPKLSwitchMode.AppearanceOff.Font.Color := clBlack;\r\n btnPKLSwitchMode.AppearanceOff.Font.Height := -16;\r\n btnPKLSwitchMode.AppearanceOff.Font.Name := 'Tahoma';\r\n btnPKLSwitchMode.AppearanceOff.Font.Style := [];\r\n btnPKLSwitchMode.AppearanceOff.Text := 'Edit';\r\n btnPKLSwitchMode.AppearanceOn.Fill.Color := 16748574;\r\n btnPKLSwitchMode.AppearanceOn.Font.Charset := DEFAULT_CHARSET;\r\n btnPKLSwitchMode.AppearanceOn.Font.Color := clWhite;\r\n btnPKLSwitchMode.AppearanceOn.Font.Height := -16;\r\n btnPKLSwitchMode.AppearanceOn.Font.Name := 'Tahoma';\r\n btnPKLSwitchMode.AppearanceOn.Font.Style := [];\r\n btnPKLSwitchMode.AppearanceOn.Text := 'Edit';\r\n btnPKLSwitchMode.AnimationFactor := 8;\r\n btnPKLSwitchMode.Layout := sloExtended;\r\n btnPKLSwitchMode.Rounded := True;\r\n SetEvent(btnPKLSwitchMode, Self, 'OnChange', 'btnPKLSwitchModeChange');\r\n pnlButtons.SetParentComponent(pnlBottom);\r\n pnlButtons.Name := 'pnlButtons';\r\n pnlButtons.Left := 89;\r\n pnlButtons.Top := 0;\r\n pnlButtons.Width := 1296;\r\n pnlButtons.Height := 41;\r\n pnlButtons.Align := alClient;\r\n pnlButtons.BorderColor := clNone;\r\n pnlButtons.BorderStyle := bsNone;\r\n pnlButtons.ChildOrder := 1;\r\n pnlButtons.Color := clWhite;\r\n pnlButtons.TabOrder := 1;\r\n btnPKL_CopyItems.SetParentComponent(pnlButtons);\r\n btnPKL_CopyItems.Name := 'btnPKL_CopyItems';\r\n btnPKL_CopyItems.Left := 1116;\r\n btnPKL_CopyItems.Top := 0;\r\n btnPKL_CopyItems.Width := 90;\r\n btnPKL_CopyItems.Height := 41;\r\n btnPKL_CopyItems.Cursor := crHandPoint;\r\n btnPKL_CopyItems.Hint := 'Copy';\r\n btnPKL_CopyItems.Align := alRight;\r\n btnPKL_CopyItems.Caption := '';\r\n btnPKL_CopyItems.Color := clNone;\r\n btnPKL_CopyItems.ElementClassName := 'btn_icon';\r\n btnPKL_CopyItems.Font.Charset := DEFAULT_CHARSET;\r\n btnPKL_CopyItems.Font.Color := clGray;\r\n btnPKL_CopyItems.Font.Height := -16;\r\n btnPKL_CopyItems.Font.Name := 'Tahoma';\r\n btnPKL_CopyItems.Font.Style := [];\r\n btnPKL_CopyItems.HeightPercent := 100.000000000000000000;\r\n btnPKL_CopyItems.MaterialGlyph := 'content_copy';\r\n btnPKL_CopyItems.MaterialGlyphSize := 1;\r\n btnPKL_CopyItems.ParentFont := False;\r\n btnPKL_CopyItems.ShowHint := True;\r\n btnPKL_CopyItems.TabOrder := 1;\r\n btnPKL_CopyItems.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnPKL_CopyItems, Self, 'OnClick', 'btnPKL_CopyItemsClick');\r\n btnPKL_HideShowItem.SetParentComponent(pnlButtons);\r\n btnPKL_HideShowItem.Name := 'btnPKL_HideShowItem';\r\n btnPKL_HideShowItem.Left := 846;\r\n btnPKL_HideShowItem.Top := 0;\r\n btnPKL_HideShowItem.Width := 90;\r\n btnPKL_HideShowItem.Height := 41;\r\n btnPKL_HideShowItem.Cursor := crHandPoint;\r\n btnPKL_HideShowItem.Hint := 'Hide / Show Item';\r\n btnPKL_HideShowItem.Align := alRight;\r\n btnPKL_HideShowItem.Caption := '';\r\n btnPKL_HideShowItem.Color := clNone;\r\n btnPKL_HideShowItem.ElementClassName := 'btn_icon';\r\n btnPKL_HideShowItem.Font.Charset := DEFAULT_CHARSET;\r\n btnPKL_HideShowItem.Font.Color := clGray;\r\n btnPKL_HideShowItem.Font.Height := -16;\r\n btnPKL_HideShowItem.Font.Name := 'Tahoma';\r\n btnPKL_HideShowItem.Font.Style := [];\r\n btnPKL_HideShowItem.HeightPercent := 100.000000000000000000;\r\n btnPKL_HideShowItem.MaterialGlyph := 'swap_vertical_circle';\r\n btnPKL_HideShowItem.MaterialGlyphSize := 1;\r\n btnPKL_HideShowItem.ParentFont := False;\r\n btnPKL_HideShowItem.ShowHint := True;\r\n btnPKL_HideShowItem.TabOrder := 1;\r\n btnPKL_HideShowItem.Visible := False;\r\n btnPKL_HideShowItem.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnPKL_HideShowItem, Self, 'OnClick', 'btnPKL_HideShowItemClick');\r\n btnPKL_HideCommon.SetParentComponent(pnlButtons);\r\n btnPKL_HideCommon.Name := 'btnPKL_HideCommon';\r\n btnPKL_HideCommon.Left := 756;\r\n btnPKL_HideCommon.Top := 0;\r\n btnPKL_HideCommon.Width := 90;\r\n btnPKL_HideCommon.Height := 41;\r\n btnPKL_HideCommon.Cursor := crHandPoint;\r\n btnPKL_HideCommon.Hint := 'Hide / Show Default';\r\n btnPKL_HideCommon.Align := alRight;\r\n btnPKL_HideCommon.Caption := '';\r\n btnPKL_HideCommon.Color := clNone;\r\n btnPKL_HideCommon.ElementClassName := 'btn_icon';\r\n btnPKL_HideCommon.Font.Charset := DEFAULT_CHARSET;\r\n btnPKL_HideCommon.Font.Color := clGray;\r\n btnPKL_HideCommon.Font.Height := -16;\r\n btnPKL_HideCommon.Font.Name := 'Tahoma';\r\n btnPKL_HideCommon.Font.Style := [];\r\n btnPKL_HideCommon.HeightPercent := 100.000000000000000000;\r\n btnPKL_HideCommon.MaterialGlyph := 'visibility_off';\r\n btnPKL_HideCommon.MaterialGlyphSize := 1;\r\n btnPKL_HideCommon.ParentFont := False;\r\n btnPKL_HideCommon.ShowHint := True;\r\n btnPKL_HideCommon.TabOrder := 3;\r\n btnPKL_HideCommon.Visible := False;\r\n btnPKL_HideCommon.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnPKL_HideCommon, Self, 'OnClick', 'btnPKL_HideCommonClick');\r\n btnPKL_UP.SetParentComponent(pnlButtons);\r\n btnPKL_UP.Name := 'btnPKL_UP';\r\n btnPKL_UP.Left := 486;\r\n btnPKL_UP.Top := 0;\r\n btnPKL_UP.Width := 90;\r\n btnPKL_UP.Height := 41;\r\n btnPKL_UP.Cursor := crHandPoint;\r\n btnPKL_UP.Hint := 'Item Up';\r\n btnPKL_UP.Align := alRight;\r\n btnPKL_UP.Caption := '';\r\n btnPKL_UP.Color := clNone;\r\n btnPKL_UP.ElementClassName := 'btn_icon';\r\n btnPKL_UP.Font.Charset := DEFAULT_CHARSET;\r\n btnPKL_UP.Font.Color := clGray;\r\n btnPKL_UP.Font.Height := -16;\r\n btnPKL_UP.Font.Name := 'Tahoma';\r\n btnPKL_UP.Font.Style := [];\r\n btnPKL_UP.HeightPercent := 100.000000000000000000;\r\n btnPKL_UP.MaterialGlyph := 'arrow_drop_up';\r\n btnPKL_UP.MaterialGlyphSize := 1;\r\n btnPKL_UP.ParentFont := False;\r\n btnPKL_UP.ShowHint := True;\r\n btnPKL_UP.TabOrder := 4;\r\n btnPKL_UP.Visible := False;\r\n btnPKL_UP.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnPKL_UP, Self, 'OnClick', 'btnPKL_UPClick');\r\n btnPKL_DOWN.SetParentComponent(pnlButtons);\r\n btnPKL_DOWN.Name := 'btnPKL_DOWN';\r\n btnPKL_DOWN.Left := 396;\r\n btnPKL_DOWN.Top := 0;\r\n btnPKL_DOWN.Width := 90;\r\n btnPKL_DOWN.Height := 41;\r\n btnPKL_DOWN.Cursor := crHandPoint;\r\n btnPKL_DOWN.Hint := 'Item Down';\r\n btnPKL_DOWN.Align := alRight;\r\n btnPKL_DOWN.Caption := '';\r\n btnPKL_DOWN.Color := clNone;\r\n btnPKL_DOWN.ElementClassName := 'btn_icon';\r\n btnPKL_DOWN.Font.Charset := DEFAULT_CHARSET;\r\n btnPKL_DOWN.Font.Color := clGray;\r\n btnPKL_DOWN.Font.Height := -16;\r\n btnPKL_DOWN.Font.Name := 'Tahoma';\r\n btnPKL_DOWN.Font.Style := [];\r\n btnPKL_DOWN.HeightPercent := 100.000000000000000000;\r\n btnPKL_DOWN.MaterialGlyph := 'arrow_drop_down';\r\n btnPKL_DOWN.MaterialGlyphSize := 1;\r\n btnPKL_DOWN.ParentFont := False;\r\n btnPKL_DOWN.ShowHint := True;\r\n btnPKL_DOWN.TabOrder := 5;\r\n btnPKL_DOWN.Visible := False;\r\n btnPKL_DOWN.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnPKL_DOWN, Self, 'OnClick', 'btnPKL_DOWNClick');\r\n btnAlphaBetize.SetParentComponent(pnlButtons);\r\n btnAlphaBetize.Name := 'btnAlphaBetize';\r\n btnAlphaBetize.Left := 576;\r\n btnAlphaBetize.Top := 0;\r\n btnAlphaBetize.Width := 90;\r\n btnAlphaBetize.Height := 41;\r\n btnAlphaBetize.Cursor := crHandPoint;\r\n btnAlphaBetize.Hint := 'Aplphabetize';\r\n btnAlphaBetize.Align := alRight;\r\n btnAlphaBetize.Caption := '';\r\n btnAlphaBetize.Color := clNone;\r\n btnAlphaBetize.ElementClassName := 'btn_icon';\r\n btnAlphaBetize.Font.Charset := DEFAULT_CHARSET;\r\n btnAlphaBetize.Font.Color := clGray;\r\n btnAlphaBetize.Font.Height := -16;\r\n btnAlphaBetize.Font.Name := 'Tahoma';\r\n btnAlphaBetize.Font.Style := [];\r\n btnAlphaBetize.HeightPercent := 100.000000000000000000;\r\n btnAlphaBetize.MaterialGlyph := 'filter_list';\r\n btnAlphaBetize.MaterialGlyphSize := 1;\r\n btnAlphaBetize.ParentFont := False;\r\n btnAlphaBetize.ShowHint := True;\r\n btnAlphaBetize.TabOrder := 6;\r\n btnAlphaBetize.Visible := False;\r\n btnAlphaBetize.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnAlphaBetize, Self, 'OnClick', 'btnAlphaBetizeClick');\r\n btnAdd.SetParentComponent(pnlButtons);\r\n btnAdd.Name := 'btnAdd';\r\n btnAdd.Left := 306;\r\n btnAdd.Top := 0;\r\n btnAdd.Width := 90;\r\n btnAdd.Height := 41;\r\n btnAdd.Cursor := crHandPoint;\r\n btnAdd.Hint := 'Add';\r\n btnAdd.Align := alRight;\r\n btnAdd.Caption := '';\r\n btnAdd.Color := clNone;\r\n btnAdd.ElementClassName := 'btn_icon';\r\n btnAdd.Font.Charset := DEFAULT_CHARSET;\r\n btnAdd.Font.Color := clGray;\r\n btnAdd.Font.Height := -16;\r\n btnAdd.Font.Name := 'Tahoma';\r\n btnAdd.Font.Style := [];\r\n btnAdd.HeightPercent := 100.000000000000000000;\r\n btnAdd.MaterialGlyph := 'add';\r\n btnAdd.MaterialGlyphSize := 1;\r\n btnAdd.ParentFont := False;\r\n btnAdd.ShowHint := True;\r\n btnAdd.TabOrder := 7;\r\n btnAdd.Visible := False;\r\n btnAdd.WidthPercent := 10.000000000000000000;\r\n btnPaste.SetParentComponent(pnlButtons);\r\n btnPaste.Name := 'btnPaste';\r\n btnPaste.Left := 666;\r\n btnPaste.Top := 0;\r\n btnPaste.Width := 90;\r\n btnPaste.Height := 41;\r\n btnPaste.Cursor := crHandPoint;\r\n btnPaste.Hint := 'Add List';\r\n btnPaste.Align := alRight;\r\n btnPaste.Caption := '';\r\n btnPaste.Color := clNone;\r\n btnPaste.ElementClassName := 'btn_icon';\r\n btnPaste.Font.Charset := DEFAULT_CHARSET;\r\n btnPaste.Font.Color := clGray;\r\n btnPaste.Font.Height := -16;\r\n btnPaste.Font.Name := 'Tahoma';\r\n btnPaste.Font.Style := [];\r\n btnPaste.HeightPercent := 100.000000000000000000;\r\n btnPaste.MaterialGlyph := 'list';\r\n btnPaste.MaterialGlyphSize := 1;\r\n btnPaste.ParentFont := False;\r\n btnPaste.ShowHint := True;\r\n btnPaste.TabOrder := 8;\r\n btnPaste.Visible := False;\r\n btnPaste.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnPaste, Self, 'OnClick', 'btnPasteClick');\r\n btnDelete.SetParentComponent(pnlButtons);\r\n btnDelete.Name := 'btnDelete';\r\n btnDelete.Left := 936;\r\n btnDelete.Top := 0;\r\n btnDelete.Width := 90;\r\n btnDelete.Height := 41;\r\n btnDelete.Cursor := crHandPoint;\r\n btnDelete.Hint := 'Delete';\r\n btnDelete.Align := alRight;\r\n btnDelete.Caption := '';\r\n btnDelete.Color := clNone;\r\n btnDelete.ElementClassName := 'btn_icon';\r\n btnDelete.Font.Charset := DEFAULT_CHARSET;\r\n btnDelete.Font.Color := clGray;\r\n btnDelete.Font.Height := -16;\r\n btnDelete.Font.Name := 'Tahoma';\r\n btnDelete.Font.Style := [];\r\n btnDelete.HeightPercent := 100.000000000000000000;\r\n btnDelete.MaterialGlyph := 'delete';\r\n btnDelete.MaterialGlyphSize := 1;\r\n btnDelete.ParentFont := False;\r\n btnDelete.ShowHint := True;\r\n btnDelete.TabOrder := 9;\r\n btnDelete.Visible := False;\r\n btnDelete.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnDelete, Self, 'OnClick', 'btnDeleteClick');\r\n btnClose.SetParentComponent(pnlButtons);\r\n btnClose.Name := 'btnClose';\r\n btnClose.Left := 1026;\r\n btnClose.Top := 0;\r\n btnClose.Width := 90;\r\n btnClose.Height := 41;\r\n btnClose.Cursor := crHandPoint;\r\n btnClose.Hint := 'Close';\r\n btnClose.Align := alRight;\r\n btnClose.Caption := '';\r\n btnClose.Color := clNone;\r\n btnClose.ElementClassName := 'btn_icon';\r\n btnClose.Font.Charset := DEFAULT_CHARSET;\r\n btnClose.Font.Color := clGray;\r\n btnClose.Font.Height := -16;\r\n btnClose.Font.Name := 'Tahoma';\r\n btnClose.Font.Style := [];\r\n btnClose.HeightPercent := 100.000000000000000000;\r\n btnClose.MaterialGlyph := 'exit_to_app';\r\n btnClose.MaterialGlyphSize := 1;\r\n btnClose.ParentFont := False;\r\n btnClose.ShowHint := True;\r\n btnClose.TabOrder := 10;\r\n btnClose.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnClose, Self, 'OnClick', 'btnCloseClick');\r\n btnSave.SetParentComponent(pnlButtons);\r\n btnSave.Name := 'btnSave';\r\n btnSave.Left := 1206;\r\n btnSave.Top := 0;\r\n btnSave.Width := 90;\r\n btnSave.Height := 41;\r\n btnSave.Cursor := crHandPoint;\r\n btnSave.Hint := 'Save';\r\n btnSave.Align := alRight;\r\n btnSave.Caption := '';\r\n btnSave.Color := clNone;\r\n btnSave.ElementClassName := 'btn_icon';\r\n btnSave.Font.Charset := DEFAULT_CHARSET;\r\n btnSave.Font.Color := clGray;\r\n btnSave.Font.Height := -16;\r\n btnSave.Font.Name := 'Tahoma';\r\n btnSave.Font.Style := [];\r\n btnSave.HeightPercent := 100.000000000000000000;\r\n btnSave.MaterialGlyph := 'save';\r\n btnSave.MaterialGlyphSize := 1;\r\n btnSave.ParentFont := False;\r\n btnSave.ShowHint := True;\r\n btnSave.TabOrder := 11;\r\n btnSave.WidthPercent := 10.000000000000000000;\r\n SetEvent(btnSave, Self, 'OnClick', 'btnSaveClick');\r\n pnlPKL.SetParentComponent(PKL_DIV);\r\n pnlPKL.Name := 'pnlPKL';\r\n pnlPKL.Left := 0;\r\n pnlPKL.Top := 409;\r\n pnlPKL.Width := 1385;\r\n pnlPKL.Height := 184;\r\n pnlPKL.HeightStyle := ssPercent;\r\n pnlPKL.HeightPercent := 25.000000000000000000;\r\n pnlPKL.Align := alBottom;\r\n pnlPKL.BorderStyle := bsNone;\r\n pnlPKL.ChildOrder := 4;\r\n pnlPKL.Color := clWhite;\r\n pnlPKL.TabOrder := 1;\r\n memoPKL_Edit.SetParentComponent(pnlPKL);\r\n memoPKL_Edit.Name := 'memoPKL_Edit';\r\n memoPKL_Edit.Left := 24;\r\n memoPKL_Edit.Top := 44;\r\n memoPKL_Edit.Width := 1784;\r\n memoPKL_Edit.Height := 79;\r\n memoPKL_Edit.Align := alCustom;\r\n memoPKL_Edit.BorderStyle := bsNone;\r\n memoPKL_Edit.Color := 15921906;\r\n memoPKL_Edit.Font.Charset := DEFAULT_CHARSET;\r\n memoPKL_Edit.Font.Color := clWindowText;\r\n memoPKL_Edit.Font.Height := -16;\r\n memoPKL_Edit.Font.Name := 'Tahoma';\r\n memoPKL_Edit.Font.Style := [fsBold];\r\n memoPKL_Edit.HeightPercent := 100.000000000000000000;\r\n memoPKL_Edit.Lines.BeginUpdate;\r\n try\r\n memoPKL_Edit.Lines.Clear;\r\n memoPKL_Edit.Lines.Add('Paste / Type your Items-to-Add here and click ');\r\n finally\r\n memoPKL_Edit.Lines.EndUpdate;\r\n end;\r\n memoPKL_Edit.ParentFont := False;\r\n memoPKL_Edit.SelLength := 0;\r\n memoPKL_Edit.SelStart := 58;\r\n memoPKL_Edit.ShowFocus := False;\r\n memoPKL_Edit.Visible := False;\r\n memoPKL_Edit.WidthPercent := 100.000000000000000000;\r\n memoPKL_Edit.WordWrap := False;\r\n SetEvent(memoPKL_Edit, Self, 'OnEnter', 'memoPKL_EditEnter');\r\n SetEvent(memoPKL_Edit, Self, 'OnExit', 'memoPKL_EditExit');\r\n memoPKL.SetParentComponent(pnlPKL);\r\n memoPKL.Name := 'memoPKL';\r\n memoPKL.Left := 3;\r\n memoPKL.Top := 101;\r\n memoPKL.Width := 1784;\r\n memoPKL.Height := 77;\r\n memoPKL.Align := alCustom;\r\n memoPKL.BorderStyle := bsNone;\r\n memoPKL.Color := 15921906;\r\n memoPKL.Font.Charset := DEFAULT_CHARSET;\r\n memoPKL.Font.Color := clWindowText;\r\n memoPKL.Font.Height := -16;\r\n memoPKL.Font.Name := 'Tahoma';\r\n memoPKL.Font.Style := [fsBold];\r\n memoPKL.HeightPercent := 100.000000000000000000;\r\n memoPKL.ParentFont := False;\r\n memoPKL.SelLength := 0;\r\n memoPKL.SelStart := 0;\r\n memoPKL.ShowFocus := False;\r\n memoPKL.WidthPercent := 100.000000000000000000;\r\n grdData.SetParentComponent(PKL_DIV);\r\n grdData.Name := 'grdData';\r\n grdData.Left := 0;\r\n grdData.Top := 58;\r\n grdData.Width := 1385;\r\n grdData.Height := 351;\r\n grdData.Align := alClient;\r\n grdData.BorderStyle := bsNone;\r\n grdData.Columns.Clear;\r\n with grdData.Columns.Add do\r\n begin\r\n ElementClassName := 'text-wrap';\r\n DataField := 'IDENT_VALUE';\r\n Width := 500;\r\n end;\r\n with grdData.Columns.Add do\r\n begin\r\n Width := 3;\r\n end;\r\n with grdData.Columns.Add do\r\n begin\r\n DataField := 'cVISIBLE';\r\n Title := 'Hide';\r\n Width := 50;\r\n end;\r\n grdData.DragMode := dmAutomatic;\r\n grdData.FixedFont.Charset := DEFAULT_CHARSET;\r\n grdData.FixedFont.Color := clWindowText;\r\n grdData.FixedFont.Height := -11;\r\n grdData.FixedFont.Name := 'Tahoma';\r\n grdData.FixedFont.Style := [];\r\n grdData.FixedColor := clWhite;\r\n grdData.FixedCols := 0;\r\n grdData.Font.Charset := DEFAULT_CHARSET;\r\n grdData.Font.Color := clGray;\r\n grdData.Font.Height := -16;\r\n grdData.Font.Name := 'Tahoma';\r\n grdData.Font.Style := [];\r\n grdData.GridLineColor := clWhite;\r\n grdData.Options := [goFixedVertLine,goFixedHorzLine,goVertLine,goHorzLine];\r\n grdData.ParentFont := False;\r\n grdData.TabOrder := 2;\r\n grdData.HeightPercent := 100.000000000000000000;\r\n grdData.WidthPercent := 100.000000000000000000;\r\n SetEvent(grdData, Self, 'OnCanEditCell', 'grdDataCanEditCell');\r\n SetEvent(grdData, Self, 'OnClick', 'grdDataClick');\r\n SetEvent(grdData, Self, 'OnDblClick', 'grdDataDblClick');\r\n SetEvent(grdData, Self, 'OnGetCellChildren', 'grdDataGetCellChildren');\r\n SetEvent(grdData, Self, 'OnKeyPress', 'grdDataKeyPress');\r\n SetEvent(grdData, Self, 'OnKeyUp', 'grdDataKeyUp');\r\n SetEvent(grdData, Self, 'OnMouseLeave', 'grdDataMouseLeave');\r\n grdData.ColWidths[0] := 500;\r\n grdData.ColWidths[1] := 3;\r\n grdData.ColWidths[2] := 50;\r\n grdData.RowHeights[0] := 22;\r\n grdData.RowHeights[1] := 22;\r\n grdData.RowHeights[2] := 22;\r\n grdData.RowHeights[3] := 22;\r\n grdData.RowHeights[4] := 22;\r\n WebMemo1.SetParentComponent(PKL_DIV);\r\n WebMemo1.Name := 'WebMemo1';\r\n WebMemo1.Left := 712;\r\n WebMemo1.Top := 112;\r\n WebMemo1.Width := 185;\r\n WebMemo1.Height := 89;\r\n WebMemo1.HeightPercent := 100.000000000000000000;\r\n WebMemo1.Lines.BeginUpdate;\r\n try\r\n WebMemo1.Lines.Clear;\r\n WebMemo1.Lines.Add('WebMemo1');\r\n finally\r\n WebMemo1.Lines.EndUpdate;\r\n end;\r\n WebMemo1.SelLength := 0;\r\n WebMemo1.SelStart := 0;\r\n WebMemo1.Visible := False;\r\n WebMemo1.WidthPercent := 100.000000000000000000;\r\n pnlFormCaption.SetParentComponent(PKL_DIV);\r\n pnlFormCaption.Name := 'pnlFormCaption';\r\n pnlFormCaption.Left := 0;\r\n pnlFormCaption.Top := 0;\r\n pnlFormCaption.Width := 1385;\r\n pnlFormCaption.Height := 41;\r\n pnlFormCaption.ElementClassName := 'form_caption';\r\n pnlFormCaption.HeightStyle := ssAuto;\r\n pnlFormCaption.Align := alTop;\r\n pnlFormCaption.BorderColor := clWhite;\r\n pnlFormCaption.BorderStyle := bsNone;\r\n pnlFormCaption.Caption := 'Form Caption';\r\n pnlFormCaption.ChildOrder := 9;\r\n pnlFormCaption.ElementFont := efCSS;\r\n pnlFormCaption.Font.Charset := DEFAULT_CHARSET;\r\n pnlFormCaption.Font.Color := clWindowText;\r\n pnlFormCaption.Font.Height := -16;\r\n pnlFormCaption.Font.Name := 'Tahoma';\r\n pnlFormCaption.Font.Style := [];\r\n pnlFormCaption.ParentFont := False;\r\n pnlFormCaption.TabOrder := 4;\r\n ClipBoard.SetParentComponent(Self);\r\n ClipBoard.Name := 'ClipBoard';\r\n ClipBoard.Left := 603;\r\n ClipBoard.Top := 112;\r\n finally\r\n PKL_DIV.AfterLoadDFMValues;\r\n WebLabel34.AfterLoadDFMValues;\r\n WebLabel15.AfterLoadDFMValues;\r\n pnlBottom.AfterLoadDFMValues;\r\n WebPanel1.AfterLoadDFMValues;\r\n btnPKLSwitchMode.AfterLoadDFMValues;\r\n pnlButtons.AfterLoadDFMValues;\r\n btnPKL_CopyItems.AfterLoadDFMValues;\r\n btnPKL_HideShowItem.AfterLoadDFMValues;\r\n btnPKL_HideCommon.AfterLoadDFMValues;\r\n btnPKL_UP.AfterLoadDFMValues;\r\n btnPKL_DOWN.AfterLoadDFMValues;\r\n btnAlphaBetize.AfterLoadDFMValues;\r\n btnAdd.AfterLoadDFMValues;\r\n btnPaste.AfterLoadDFMValues;\r\n btnDelete.AfterLoadDFMValues;\r\n btnClose.AfterLoadDFMValues;\r\n btnSave.AfterLoadDFMValues;\r\n pnlPKL.AfterLoadDFMValues;\r\n memoPKL_Edit.AfterLoadDFMValues;\r\n memoPKL.AfterLoadDFMValues;\r\n grdData.AfterLoadDFMValues;\r\n WebMemo1.AfterLoadDFMValues;\r\n pnlFormCaption.AfterLoadDFMValues;\r\n ClipBoard.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 }\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.Imaging.jpeg;\r\n\r\ninterface\r\n\r\nimplementation\r\n\r\nbegin\r\nasm\r\nend;\r\n\r\n\r\nend.\r\n","unit Login;\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, Vcl.Controls,\r\n WEBLib.WebCtrls, WEBLib.Buttons, WEBLib.ExtCtrls, XData.Web.Client,\r\n Vcl.Imaging.jpeg, WEBLib.Toast, WebLib.WebTools;\r\n\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 Vcl.Mask, WEBLib.Mask, WEBLib.ExtCtrls, XData.Web.Client, Windows,\r\n WEBLib.Toast, Vcl.Imaging.jpeg, WebLib.Storage, WEBLib.ClientConnector; }\r\n\r\ntype\r\n TfrmLogin = class(TForm)\r\n WebPanel1: TPanel;\r\n btnLogin: TButton;\r\n edtname: TEdit;\r\n edtPassword: TEdit;\r\n WebBitBtn1: TBitBtn;\r\n WebBitBtn2: TBitBtn;\r\n WebLabel1: TLabel;\r\n WebBitBtn4: TBitBtn;\r\n WebLabel2: TLabel;\r\n WebLabel3: TLabel;\r\n WebToast1: TToast;\r\n pnlLogo: TPanel;\r\n htmlLogo: THTMLContainer;\r\n procedure btnLoginClick(Sender: TObject);\r\n procedure AuthenticateUser(EmailID, PassWord: String);\r\n procedure WebFormResize(Sender: TObject);\r\n procedure edtnameKeyDown(Sender: TObject; var Key: Word;\r\n Shift: TShiftState);\r\n procedure edtPasswordKeyDown(Sender: TObject; var Key: Word;\r\n Shift: TShiftState);\r\n procedure WebFormShow(Sender: TObject);\r\n procedure WebFormCreate(Sender: TObject);\r\n private\r\n { Private declarations }\r\n public\r\n { Public declarations }\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmLogin: TfrmLogin;\r\n\r\nimplementation\r\n\r\n{$R *.dfm}\r\n\r\nuses Common, DataModule, Main;\r\n\r\nprocedure TfrmLogin.edtnameKeyDown(Sender: TObject; var Key: Word;\r\n Shift: TShiftState);\r\nbegin\r\nif (Key = VK_RETURN) then btnLoginClick(nil);\r\nend;\r\n\r\nprocedure TfrmLogin.edtPasswordKeyDown(Sender: TObject; var Key: Word;\r\n Shift: TShiftState);\r\nbegin\r\nif (Key = VK_RETURN) then btnLoginClick(nil);\r\nend;\r\n\r\nprocedure TfrmLogin.btnLoginClick(Sender: TObject);\r\nvar msg_p: string;\r\nbegin\r\n EGV_SPECIALITY := '';\r\n msg_p := '';\r\n if edtName.Text = Emptystr\r\n then msg_p := 'Login Cannot be Empty'\r\n else if edtPassword.Text = Emptystr\r\n then msg_p := 'Password Cannot be Empty';\r\nif msg_p <> ''\r\nthen begin\r\n showmessage(msg_p);\r\n // webtoast1.items[0].Body :='

' + msg_p + '

';\r\n //webtoast1.items[0].Show;\r\n exit;\r\n end;\r\n AuthenticateUser(edtName.Text, edtPassword.Text);\r\nend;\r\n\r\nprocedure TfrmLogin.WebFormCreate(Sender: TObject);\r\nbegin\r\n//showmessage('create');\r\nhtmlLogo.HTML.text := InsertKeyValues(htmlLogo.HTML.Text);\r\nend;\r\n\r\nprocedure TfrmLogin.WebFormResize(Sender: TObject);\r\nbegin\r\n webpanel1.Top := (self.height - webpanel1.Height) div 2;\r\n webpanel1.left := (self.width - webpanel1.Width) div 2;\r\nend;\r\n\r\nprocedure TfrmLogin.WebFormShow(Sender: TObject);\r\nvar token_p: string;\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var\r\n Response_p: string;\r\n begin\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n // showmessage(response_p);\r\n end;\r\n\r\nbegin //showmessage('1');\r\n\r\n\r\n// URl example to pass the the patient info:\r\n{\r\n\r\nhttps://ArgusMedGPT.com/?EHRSOURCE=EPIC&CALLER_ID=zohair@endosoft.com&FHIRPATID=%FHIRPATID%&FNAME=%FNAME%&LNAME=%LNAME%&DOB=%DOB%\r\n ... CERNER ...\r\n}\r\n//Set the screen size:\r\nif (self.width >= strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_SCREENBIGW'])) and\r\n (self.height >= strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_SCREENBIGH']) ) then EGV_SCREENSIZE := ''\r\nelse if (self.width >= strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_SCREENMEDIUMW'])) and\r\n (self.height >= strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_SCREENMEDIUMH']) ) then EGV_SCREENSIZE := 'M'\r\n else EGV_SCREENSIZE := 'S';\r\n\r\nELV_EHRSOURCE := getqueryparam('EHRSOURCE');\r\nEGV_CALLERID := getqueryparam('CALLER_ID');\r\nEGV_PATIENTFHIRID := getqueryparam('FHIRPATID');\r\nEGV_CURRENT_PATIENTNAME := trim(getqueryparam('FNAME') + ' ' + getqueryparam('LNAME'));\r\nEGV_CURRENT_PATIENTDOB := getqueryparam('DOB');\r\n\r\nif ELV_EHRSOURCE = 'CERNER'\r\nthen begin\r\n ELV_PATIENTCERNERID := EGV_PATIENTFHIRID;\r\n ELV_CERNERPATIENT_NAME := EGV_CURRENT_PATIENTNAME;\r\n end;\r\nif ELV_EHRSOURCE = 'EPIC'\r\nthen begin\r\n ELV_PATIENTEPICID := EGV_PATIENTFHIRID;\r\n ELV_EPICPATIENT_NAME := EGV_CURRENT_PATIENTNAME;\r\n end;\r\n\r\n//showmessage('screen size: ' + EGV_SCREENSIZE);\r\n\r\n//showmessage('Called from EPIC. FHIR ID = ' + EGV_PATIENTFHIRID);\r\n//token_p := getqueryparam('launch');\r\n{\r\ntoken_p := copy(token_p, pos('.', token_p) + 1, length(token_p));\r\ntoken_p := copy(token_p, 1, pos('.', token_p) - 1); }\r\n\r\n//showmessage(token_p);\r\n//'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJ1cm46b2lkOmZoaXIiLCJjbGllbnRfaWQiOiJjMjJjMjhlMS0wNDYwLTQyNTMtOTdiMC0wODc5ZTJjMzhlZmEiLCJlcGljLmVjaSI6InVybjplcGljOk9wZW4uRXBpYy1jdXJyZW50IiwiZXBpYy5tZXRhZGF0YSI6IkktQjNTLWY1akt0MXdwNm9adzVaTkpleEoxTVlpRkVtRkJsWFlxazVxQS14azhtU011RzdTMC1XYmphbTBabzhFOFN1UWNsOG4tVWdvR1kyX1JsMGNQelpPWU5aVkpEdjhLQl9SX0YyeEpacDRmcXRqbURnT0x3XzZDYndSU3E3IiwiZXBpYy50b2tlbnR5cGUiOiJsYXVuY2giLCJleHAiOjE3MTgxOTYwMzUsImlhdCI6MTcxODE5NTczNSwiaXNzIjoidXJuOm9pZDpmaGlyIiwianRpIjoiZTViY2FhNjQtYWZkNS00NzQ3LWI0ZWMtZjM1MWRlYjhhNzZjIiwibmJmIjoxNzE4MTk1NzM1LCJzdWIiOiJldk5wLUtoWXdPT3FBWm4xcFoyZW51QTMifQ.jFJOruFO2NEgEsCCdS3tf_XUDwRzJWA0nMHS4uPo5Sz40yYFzaDMu4lWI9u1ZpheBh8hH0CCFyv-0PMU40fUW7e1qXTtX51H2yRS23DITMGK3MfUUFF6SysHEwLzncUs-7pLRiBzgAH5XhoYfJe46uze3Bfjw8mwnSFMz1Xq_oX3y9fQ5Cm-YciV5MynWUozU6a20Ythy8lyNbpzc7zdu8JvHANVFrpDNxqaGMt3sr7QtZp6BpmdgN2NTyBOqaVNBJ3zjsmLvEABggHzrXUDxQ0-p4HdFM20rGcpPmTEW1Y_OcSpd1-3iD5K22MVVTcJOy4Xeld2DbjNIGDmYJz7tA';\r\n//dm.XDataWebClient1.RawInvoke('IReportService.EPIC_DecodeJWT', [token_p, 'epic.metadata'], @OnResult);\r\n\r\n//if EGV_PATIENTFHIRID <> '' then EGV_CALLERID := 'EPIC';\r\n\r\nif EGV_CALLERID <> ''\r\nthen begin // showmessage('2');\r\n WebLabel2.Visible := false;\r\n pnlLogo.Visible := true;\r\n // here we use the login provided in URL parameters.\r\n //Each client has a login and is linked to it's facility which defines all settings and design.\r\n // ...\r\n //\r\n edtName.text := 'zohair@endosoft.com';\r\n edtPassword.text := 'Endo1234!';\r\n btnLoginClick(nil); // login\r\n end;\r\nend;\r\n\r\nprocedure TfrmLogin.AuthenticateUser(EmailID, PassWord: String);\r\nvar\r\n DBPassword, DPassword, UserIDPass: String;\r\n cnt: Integer;\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var\r\n Response_p, s, s2, msg_p: string;\r\n begin\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n // showmessage(response_p);\r\n if pos('Error:', Response_p) > 0\r\n then begin\r\n Showmessage(Response_p);\r\n //webtoast1.items[0].header :=\r\n //'
Login faild
';\r\n //webtoast1.items[0].Body :='

' + Response_p + '

';\r\n //webtoast1.items[0].Show; }\r\n exit;\r\n end;\r\n egv_FacilityID := copy(Response_p, 1, pos('#', Response_p) - 1);\r\n s := copy(Response_p, pos('#', Response_p) + 1, length(Response_p));\r\n EGV_FACILITYDBNAME := copy(s, pos('#', s) + 1, 1024);\r\n s := copy(s, 1, pos('#', s) - 1);\r\n s := copy(s,2,length(s) - 2);\r\n EGV_FACILITYLIST := s;\r\n if pos(',',s) > 0\r\n then egv_Facility := copy(s, 1, pos(',', s) - 1)\r\n else egv_Facility := s;\r\n egv_USERID := EmailID;\r\n // change server URL to connect to the right copy of it which serves our database\r\n dm.XDataWebConnection1.Tag := 1;\r\n dm.XDataWebConnection1.Connected := false;\r\n dm.XDataWebConnection1.URL := egv_serverbaseURL; // + '_' + EGV_FACILITYDBNAME;\r\n //LoadUsers;\r\n // showmessage('Connecting to XDATA server: ' + dm.XDataWebConnection1.URL);\r\n dm.XDataWebConnection1.connected := true;\r\n end;\r\n\r\nbegin\r\n // showmessage(EmailID);\r\n // showmessage(PassWord);\r\n\r\n dm.XDataWebClient1.RawInvoke('IReportService.Checkuser', [EmailID, PassWord], @OnResult);\r\nend;\r\n\r\nprocedure TfrmLogin.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n WebPanel1 := TPanel.Create(Self);\r\n WebLabel1 := TLabel.Create(Self);\r\n WebLabel2 := TLabel.Create(Self);\r\n WebLabel3 := TLabel.Create(Self);\r\n btnLogin := TButton.Create(Self);\r\n edtname := TEdit.Create(Self);\r\n edtPassword := TEdit.Create(Self);\r\n WebBitBtn1 := TBitBtn.Create(Self);\r\n WebBitBtn2 := TBitBtn.Create(Self);\r\n WebBitBtn4 := TBitBtn.Create(Self);\r\n pnlLogo := TPanel.Create(Self);\r\n htmlLogo := THTMLContainer.Create(Self);\r\n WebToast1 := TToast.Create(Self);\r\n\r\n WebPanel1.BeforeLoadDFMValues;\r\n WebLabel1.BeforeLoadDFMValues;\r\n WebLabel2.BeforeLoadDFMValues;\r\n WebLabel3.BeforeLoadDFMValues;\r\n btnLogin.BeforeLoadDFMValues;\r\n edtname.BeforeLoadDFMValues;\r\n edtPassword.BeforeLoadDFMValues;\r\n WebBitBtn1.BeforeLoadDFMValues;\r\n WebBitBtn2.BeforeLoadDFMValues;\r\n WebBitBtn4.BeforeLoadDFMValues;\r\n pnlLogo.BeforeLoadDFMValues;\r\n htmlLogo.BeforeLoadDFMValues;\r\n WebToast1.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmLogin';\r\n Width := 807;\r\n Height := 488;\r\n Caption := 'Argus Med-GPT';\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 Shadow := False;\r\n ShowClose := False;\r\n SetEvent(Self, 'OnCreate', 'WebFormCreate');\r\n SetEvent(Self, 'OnResize', 'WebFormResize');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n WebPanel1.SetParentComponent(Self);\r\n WebPanel1.Name := 'WebPanel1';\r\n WebPanel1.Left := 8;\r\n WebPanel1.Top := 9;\r\n WebPanel1.Width := 521;\r\n WebPanel1.Height := 393;\r\n WebPanel1.ElementClassName := 'loginbox';\r\n WebPanel1.WidthPercent := 30.000000000000000000;\r\n WebPanel1.BorderStyle := bsNone;\r\n WebPanel1.Color := 7105644;\r\n WebPanel1.ElementFont := efCSS;\r\n WebPanel1.TabOrder := 0;\r\n WebLabel1.SetParentComponent(WebPanel1);\r\n WebLabel1.Name := 'WebLabel1';\r\n WebLabel1.Left := 38;\r\n WebLabel1.Top := 19;\r\n WebLabel1.Width := 507;\r\n WebLabel1.Height := 33;\r\n WebLabel1.Alignment := taCenter;\r\n WebLabel1.Caption := 'Sign in using your Argus Med-GPT Account';\r\n WebLabel1.ElementClassName := 'caption';\r\n WebLabel1.ElementFont := efCSS;\r\n WebLabel1.ElementPosition := epRelative;\r\n WebLabel1.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel1.Font.Color := clBlack;\r\n WebLabel1.Font.Height := -27;\r\n WebLabel1.Font.Name := 'Tahoma';\r\n WebLabel1.Font.Style := [];\r\n WebLabel1.HeightPercent := 100.000000000000000000;\r\n WebLabel1.ParentFont := False;\r\n WebLabel1.WidthPercent := 100.000000000000000000;\r\n WebLabel2.SetParentComponent(WebPanel1);\r\n WebLabel2.Name := 'WebLabel2';\r\n WebLabel2.Left := 0;\r\n WebLabel2.Top := 0;\r\n WebLabel2.Width := 521;\r\n WebLabel2.Height := 13;\r\n WebLabel2.Align := alTop;\r\n WebLabel2.HeightPercent := 100.000000000000000000;\r\n WebLabel2.WidthPercent := 100.000000000000000000;\r\n WebLabel3.SetParentComponent(WebPanel1);\r\n WebLabel3.Name := 'WebLabel3';\r\n WebLabel3.Left := 106;\r\n WebLabel3.Top := 291;\r\n WebLabel3.Width := 109;\r\n WebLabel3.Height := 16;\r\n WebLabel3.Cursor := crHandPoint;\r\n WebLabel3.Caption := 'Forgot password';\r\n WebLabel3.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel3.Font.Color := clBlack;\r\n WebLabel3.Font.Height := -13;\r\n WebLabel3.Font.Name := 'Tahoma';\r\n WebLabel3.Font.Style := [fsBold];\r\n WebLabel3.HeightPercent := 100.000000000000000000;\r\n WebLabel3.ParentFont := False;\r\n WebLabel3.WidthPercent := 100.000000000000000000;\r\n btnLogin.SetParentComponent(WebPanel1);\r\n btnLogin.Name := 'btnLogin';\r\n btnLogin.Left := 106;\r\n btnLogin.Top := 231;\r\n btnLogin.Width := 300;\r\n btnLogin.Height := 54;\r\n btnLogin.Cursor := crHandPoint;\r\n btnLogin.Caption := 'Login';\r\n btnLogin.ElementClassName := 'loginbutton';\r\n btnLogin.ElementFont := efCSS;\r\n btnLogin.HeightPercent := 100.000000000000000000;\r\n btnLogin.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnLogin, Self, 'OnClick', 'btnLoginClick');\r\n edtname.SetParentComponent(WebPanel1);\r\n edtname.Name := 'edtname';\r\n edtname.Left := 106;\r\n edtname.Top := 80;\r\n edtname.Width := 300;\r\n edtname.Height := 54;\r\n edtname.TabStop := False;\r\n edtname.ChildOrder := 1;\r\n edtname.ElementClassName := 'input';\r\n edtname.ElementFont := efCSS;\r\n edtname.Font.Charset := DEFAULT_CHARSET;\r\n edtname.Font.Color := clBlack;\r\n edtname.Font.Height := -11;\r\n edtname.Font.Name := 'Tahoma';\r\n edtname.Font.Style := [];\r\n edtname.HeightPercent := 100.000000000000000000;\r\n edtname.ParentFont := False;\r\n edtname.TextHint := 'User Name';\r\n edtname.WidthPercent := 100.000000000000000000;\r\n SetEvent(edtname, Self, 'OnKeyDown', 'edtnameKeyDown');\r\n edtPassword.SetParentComponent(WebPanel1);\r\n edtPassword.Name := 'edtPassword';\r\n edtPassword.Left := 106;\r\n edtPassword.Top := 152;\r\n edtPassword.Width := 300;\r\n edtPassword.Height := 54;\r\n edtPassword.ChildOrder := 2;\r\n edtPassword.ElementClassName := 'input';\r\n edtPassword.ElementFont := efCSS;\r\n edtPassword.HeightPercent := 100.000000000000000000;\r\n edtPassword.PasswordChar := '*';\r\n edtPassword.TextHint := 'Password';\r\n edtPassword.WidthPercent := 100.000000000000000000;\r\n SetEvent(edtPassword, Self, 'OnKeyDown', 'edtPasswordKeyDown');\r\n WebBitBtn1.SetParentComponent(WebPanel1);\r\n WebBitBtn1.Name := 'WebBitBtn1';\r\n WebBitBtn1.Left := 360;\r\n WebBitBtn1.Top := 91;\r\n WebBitBtn1.Width := 41;\r\n WebBitBtn1.Height := 33;\r\n WebBitBtn1.Color := clNone;\r\n WebBitBtn1.ElementClassName := 'icon';\r\n WebBitBtn1.Flat := True;\r\n WebBitBtn1.HeightPercent := 100.000000000000000000;\r\n WebBitBtn1.MaterialGlyph := 'person';\r\n WebBitBtn1.MaterialGlyphSize := 36;\r\n WebBitBtn1.WidthPercent := 100.000000000000000000;\r\n WebBitBtn2.SetParentComponent(WebPanel1);\r\n WebBitBtn2.Name := 'WebBitBtn2';\r\n WebBitBtn2.Left := 360;\r\n WebBitBtn2.Top := 163;\r\n WebBitBtn2.Width := 41;\r\n WebBitBtn2.Height := 33;\r\n WebBitBtn2.Color := clNone;\r\n WebBitBtn2.ElementClassName := 'icon';\r\n WebBitBtn2.Flat := True;\r\n WebBitBtn2.HeightPercent := 100.000000000000000000;\r\n WebBitBtn2.MaterialGlyph := 'vpn_key';\r\n WebBitBtn2.MaterialGlyphSize := 36;\r\n WebBitBtn2.WidthPercent := 100.000000000000000000;\r\n WebBitBtn4.SetParentComponent(WebPanel1);\r\n WebBitBtn4.Name := 'WebBitBtn4';\r\n WebBitBtn4.Left := 360;\r\n WebBitBtn4.Top := 235;\r\n WebBitBtn4.Width := 41;\r\n WebBitBtn4.Height := 33;\r\n WebBitBtn4.Color := clNone;\r\n WebBitBtn4.ElementClassName := 'icon';\r\n WebBitBtn4.Flat := True;\r\n WebBitBtn4.HeightPercent := 100.000000000000000000;\r\n WebBitBtn4.MaterialGlyph := 'exit_to_app';\r\n WebBitBtn4.MaterialGlyphSize := 36;\r\n WebBitBtn4.WidthPercent := 100.000000000000000000;\r\n pnlLogo.SetParentComponent(WebPanel1);\r\n pnlLogo.Name := 'pnlLogo';\r\n pnlLogo.Left := 232;\r\n pnlLogo.Top := 317;\r\n pnlLogo.Width := 521;\r\n pnlLogo.Height := 380;\r\n pnlLogo.BorderStyle := bsNone;\r\n pnlLogo.ChildOrder := 9;\r\n pnlLogo.TabOrder := 6;\r\n pnlLogo.Visible := False;\r\n htmlLogo.SetParentComponent(pnlLogo);\r\n htmlLogo.Name := 'htmlLogo';\r\n htmlLogo.Left := 152;\r\n htmlLogo.Top := 199;\r\n htmlLogo.Width := 521;\r\n htmlLogo.Height := 380;\r\n htmlLogo.ChildOrder := 2;\r\n htmlLogo.HTML.BeginUpdate;\r\n try\r\n htmlLogo.HTML.Clear;\r\n htmlLogo.HTML.Add('');\r\n htmlLogo.HTML.Add('');\r\n htmlLogo.HTML.Add('');\r\n htmlLogo.HTML.Add('');\r\n htmlLogo.HTML.Add('');\r\n htmlLogo.HTML.Add('');\r\n htmlLogo.HTML.Add('');\r\n finally\r\n htmlLogo.HTML.EndUpdate;\r\n end;\r\n htmlLogo.ScrollStyle := ssVertical;\r\n WebToast1.SetParentComponent(Self);\r\n WebToast1.Name := 'WebToast1';\r\n WebToast1.Items.Clear;\r\n with WebToast1.Items.Add do\r\n begin\r\n Time := ttNone;\r\n end;\r\n WebToast1.Position := tpTopRight;\r\n WebToast1.Left := 464;\r\n WebToast1.Top := 40;\r\n finally\r\n WebPanel1.AfterLoadDFMValues;\r\n WebLabel1.AfterLoadDFMValues;\r\n WebLabel2.AfterLoadDFMValues;\r\n WebLabel3.AfterLoadDFMValues;\r\n btnLogin.AfterLoadDFMValues;\r\n edtname.AfterLoadDFMValues;\r\n edtPassword.AfterLoadDFMValues;\r\n WebBitBtn1.AfterLoadDFMValues;\r\n WebBitBtn2.AfterLoadDFMValues;\r\n WebBitBtn4.AfterLoadDFMValues;\r\n pnlLogo.AfterLoadDFMValues;\r\n htmlLogo.AfterLoadDFMValues;\r\n WebToast1.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","unit Main;\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.Buttons, WEBLib.ExtCtrls, WEBLib.WebCtrls, VCL.TMSFNCTypes,\r\n VCL.TMSFNCUtils, VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes,\r\n VCL.TMSFNCCustomControl, VCL.TMSFNCHTMLText, VCL.TMSFNCListBox,\r\n VCL.TMSFNCCheckedListBox, WEBLib.Calendar, VCL.TMSFNCSwitch,\r\n WEBLib.ContinuousScroll, WEBLib.Lists, WEBLib.ComCtrls, Vcl.Imaging.GIFImg,\r\n Vcl.Imaging.pngimage, StrUtils, XData.Web.Client, Vcl.Mask, WEBLib.Mask, WebLib.WebTools,\r\n Weblib.lang, Types, Vcl.Menus, WEBLib.Menus,VCL.TMSFNCCustomPicker,\r\n VCL.TMSFNCDigitalTimePicker, WEBLib.JQCtrls,\r\n WEBLib.REST, Vcl.Grids, WEBLib.DBCtrls, WEBLib.Grids, WEBLib.SpeechRecognition,\r\n System.Generics.Collections;\r\n\r\ntype\r\n TfrmMain = class(TForm)\r\n tmQPKLFilter: TTimer;\r\n pmBlockMenu: TPopupMenu;\r\n miCurrentDate: TMenuItem;\r\n miTimePicker: TMenuItem;\r\n miCalendar: TMenuItem;\r\n miDefault: TMenuItem;\r\n miClear: TMenuItem;\r\n miDBFieldSetup: TMenuItem;\r\n miQPKLSetup: TMenuItem;\r\n miCurrentTime: TMenuItem;\r\n httpCall: THttpRequest;\r\n tmGenTimer: TTimer;\r\n miClearCache: TMenuItem;\r\n pnlMainMenu: TPanel;\r\n sbLogoBox: TScrollBox;\r\n pnlLogo: TPanel;\r\n WebPanel28: TPanel;\r\n WebLabel13: TLabel;\r\n WebMemo12: TMemo;\r\n WebHTMLContainer11: THTMLContainer;\r\n sbMenu: TScrollBox;\r\n div_mainmenucontainer: THTMLDiv;\r\n mm_mode: TBitBtn;\r\n mm1: TBitBtn;\r\n mm2: TBitBtn;\r\n mm3: TBitBtn;\r\n mm4: TBitBtn;\r\n mm5: TBitBtn;\r\n mm6: TBitBtn;\r\n mm7: TBitBtn;\r\n mm8: TBitBtn;\r\n mm9: TBitBtn;\r\n mm10: TBitBtn;\r\n mm11: TBitBtn;\r\n mm12: TBitBtn;\r\n mm13: TBitBtn;\r\n mm14: TBitBtn;\r\n mm15: TBitBtn;\r\n mm16: TBitBtn;\r\n mm17: TBitBtn;\r\n mm18: TBitBtn;\r\n mm19: TBitBtn;\r\n mm20: TBitBtn;\r\n pnlFormArea: TPanel;\r\n pnlTopBanners: TPanel;\r\n sbAlertBoxes: TScrollBox;\r\n B1: TPanel;\r\n WebPanel70: TPanel;\r\n WebLabel36: TLabel;\r\n M1: TMemo;\r\n htmlAlert5: THTMLContainer;\r\n B2: TPanel;\r\n WebPanel6: TPanel;\r\n WebLabel1: TLabel;\r\n M2: TMemo;\r\n htmlAlert1: THTMLContainer;\r\n B3: TPanel;\r\n WebPanel8: TPanel;\r\n WebLabel2: TLabel;\r\n M3: TMemo;\r\n htmlAlert2: THTMLContainer;\r\n B5: TPanel;\r\n WebPanel12: TPanel;\r\n WebLabel4: TLabel;\r\n M5: TMemo;\r\n htmlAlert4: THTMLContainer;\r\n B4: TPanel;\r\n WebPanel10: TPanel;\r\n WebLabel3: TLabel;\r\n M4: TMemo;\r\n htmlAlert3: THTMLContainer;\r\n WebPanel5: TPanel;\r\n lblLocation: TLabel;\r\n pnlControlHolder: TPanel;\r\n lbImage_Y_X: TLabel;\r\n lblMemodataText: TLabel;\r\n btnDesign_Hide: TSpeedButton;\r\n btnClearBlockData: TSpeedButton;\r\n btnDefaultBlockData: TSpeedButton;\r\n btnDesignGrid: TSpeedButton;\r\n btnQuickPickListMoreItems: TSpeedButton;\r\n btnDBField_Settings: TSpeedButton;\r\n btnInsertCurrentDate: TSpeedButton;\r\n btnQPKLDatePicker: TSpeedButton;\r\n cbPickListType: TComboBox;\r\n cldQPKLCalendar: TCalendar;\r\n WebPanel174: TPanel;\r\n edtDesign_BlockTitleEdit: TEdit;\r\n pnlQPKLHeader: TPanel;\r\n btnCloseQuickPicklist: TSpeedButton;\r\n seQPKLValue: TSpinEdit;\r\n edQPKLFilter: TEdit;\r\n WebSpeedButton1: TSpeedButton;\r\n clQuickPicklist: TTMSFNCCheckedListBox;\r\n btnQPKLTimePicker: TSpeedButton;\r\n btnAddRecord: TSpeedButton;\r\n btnDeleteRecord: TSpeedButton;\r\n memGridColumns: TMemo;\r\n btnBlockGridPost: TSpeedButton;\r\n edtPicklistCustomForm: TEdit;\r\n edtEditMask: TMaskEdit;\r\n btnBlockMenu: TSpeedButton;\r\n pnlQPKLTimePicker: TPanel;\r\n btnCloseTimePicker: TSpeedButton;\r\n mdGenDialog: TMessageDlg;\r\n tmQPKLTimePicker: TDateTimePicker;\r\n btnUseSelectedTime: TSpeedButton;\r\n dpBlockDatePicker: TDateTimePicker;\r\n rgBlockRadioGroup: TRadioGroup;\r\n seBlockSpinEdit: TSpinEdit;\r\n btnTest: TBitBtn;\r\n memo_autoheight: TMemo;\r\n html_heightCalculator: TScrollBox;\r\n HTMLMemoDataText: THTMLContainer;\r\n pnlDesignSettings: TPanel;\r\n lblBlockDefaultWidth: TLabel;\r\n lblColumns: TLabel;\r\n seFormColumns: TSpinEdit;\r\n cbFormColumnsAuto: TCheckBox;\r\n seBlockDefaultWidth: TSpinEdit;\r\n cbShowHiddenBlocksInDesign: TCheckBox;\r\n wbBrowser: TBrowserControl;\r\n cbNoHorizontallineUp: TCheckBox;\r\n pnlFormBottomBar: TPanel;\r\n sbInfoBoxes: TScrollBox;\r\n B6: TPanel;\r\n WebPanel7: TPanel;\r\n WebLabel8: TLabel;\r\n WebMemo4: TMemo;\r\n WebHTMLContainer6: THTMLContainer;\r\n B7: TPanel;\r\n WebPanel9: TPanel;\r\n WebLabel9: TLabel;\r\n WebMemo5: TMemo;\r\n WebHTMLContainer7: THTMLContainer;\r\n B8: TPanel;\r\n WebPanel17: TPanel;\r\n WebLabel10: TLabel;\r\n WebMemo7: TMemo;\r\n WebHTMLContainer8: THTMLContainer;\r\n B9: TPanel;\r\n WebPanel19: TPanel;\r\n WebLabel11: TLabel;\r\n WebMemo8: TMemo;\r\n WebHTMLContainer9: THTMLContainer;\r\n B10: TPanel;\r\n WebPanel21: TPanel;\r\n WebLabel12: TLabel;\r\n WebMemo9: TMemo;\r\n WebHTMLContainer10: THTMLContainer;\r\n FormContainer1: THTMLDiv;\r\n FormContainer2: THTMLDiv;\r\n FormContainer3: THTMLDiv;\r\n FormContainer4: THTMLDiv;\r\n FormContainer5: THTMLDiv;\r\n FormContainer6: THTMLDiv;\r\n FormContainer7: THTMLDiv;\r\n FormContainer8: THTMLDiv;\r\n FormContainer9: THTMLDiv;\r\n btnLogout: TBitBtn;\r\n btnMenu_Settings: TBitBtn;\r\n wmWaitMessage: TWaitMessage;\r\n pnlBottomBar: TPanel;\r\n WebLabel6: TLabel;\r\n btnSwitch_Design: TTMSFNCSwitch;\r\n cbCurrentFacilityName: TComboBox;\r\n WebLabel5: TLabel;\r\n edtArgusIndicator: TEdit;\r\n edtQPKLCacheIndicator: TEdit;\r\n rgScreenSize: TRadioGroup;\r\n WebButton1: TButton;\r\n WebButton4: TButton;\r\n ind_DBService: TBitBtn;\r\n WebInputMessageDlg1: TInputMessageDlg;\r\n btnDesign_Clone: TTMSFNCSwitch;\r\n WebSpeechRecognition_base: TSpeechRecognition;\r\n btnMicStart_base: TBitBtn;\r\n tmCloseCacheIndicator: TTimer;\r\n tmRemoveVoiceCommand: TTimer;\r\n WebMemo1: TMemo;\r\n\r\n procedure mm_modeClick(Sender: TObject);\r\n procedure mm1Click(Sender: TObject);\r\n procedure mm1MouseLeave(Sender: TObject);\r\n procedure mm1MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure btnCloseQuickPicklistClick(Sender: TObject);\r\n procedure btnDesign_HideClick(Sender: TObject);\r\n procedure _SwitchFormDesign(Sender: TObject);\r\n procedure _BlockShowDBFieldSettings(Sender: TObject);\r\n procedure clQuickPicklistItemCheckChanged(Sender: TObject;\r\n AItem: TTMSFNCCheckedListBoxItem);\r\n procedure clQuickPicklistItemClick(Sender: TObject;\r\n AItem: TTMSFNCListBoxItem);\r\n procedure btnClearBlockDataClick(Sender: TObject);\r\n procedure tmQPKLFilterTimer(Sender: TObject);\r\n procedure edQPKLFilterChange(Sender: TObject);\r\n procedure cbPickListTypeChange(Sender: TObject);\r\n procedure cbPickListTypeMouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure WebFormShow(Sender: TObject);\r\n procedure btnInsertCurrentDateClick(Sender: TObject);\r\n procedure btnQPKLDatePickerClick(Sender: TObject);\r\n procedure cldQPKLCalendarMouseLeave(Sender: TObject);\r\n procedure cldQPKLCalendarDateSelected(Sender: TObject; ADate: TDateTime);\r\n procedure B1MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure B1MouseLeave(Sender: TObject);\r\n procedure WebLabel36MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure WebLabel36DblClick(Sender: TObject);\r\n procedure _BlockDragDrop(Sender, Source: TObject; X, Y: Integer);\r\n procedure _BlockDragOverTitle(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);\r\n procedure WebFormResize(Sender: TObject);\r\n procedure btnDefaultBlockDataClick(Sender: TObject);\r\n procedure edtDesign_BlockTitleEditDblClick(Sender: TObject);\r\n procedure btnQPKLTimePickerClick(Sender: TObject);\r\n procedure btnUseSelectedTimeClick(Sender: TObject);\r\n procedure btnDesignGridClick(Sender: TObject);\r\n procedure btnBlockGridPostClick(Sender: TObject);\r\n procedure btnAddRecordClick(Sender: TObject);\r\n procedure btnDeleteRecordClick(Sender: TObject);\r\n procedure edtPicklistCustomFormChange(Sender: TObject);\r\n procedure M1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);\r\n procedure edtEditMaskMouseLeave(Sender: TObject);\r\n procedure WebFormCreate(Sender: TObject);\r\n procedure WebLabel8DragDrop(Sender, Source: TObject; X, Y: Integer);\r\n procedure cbCurrentFacilityNameChange(Sender: TObject);\r\n procedure WebButton4Click(Sender: TObject);\r\n procedure clQuickPicklistMouseLeave(Sender: TObject);\r\n procedure cbFormColumnsAutoClick(Sender: TObject);\r\n procedure seFormColumnsChange(Sender: TObject);\r\n procedure cbShowHiddenBlocksInDesignClick(Sender: TObject);\r\n procedure WebFormMouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure btnBlockMenuClick(Sender: TObject);\r\n procedure miCurrentDateClick(Sender: TObject);\r\n procedure miCalendarClick(Sender: TObject);\r\n procedure miTimePickerClick(Sender: TObject);\r\n procedure miDefaultClick(Sender: TObject);\r\n procedure miClearClick(Sender: TObject);\r\n procedure miDBFieldSetupClick(Sender: TObject);\r\n procedure miQPKLSetupClick(Sender: TObject);\r\n procedure btnCloseTimePickerClick(Sender: TObject);\r\n procedure seBlockDefaultWidthChange(Sender: TObject);\r\n procedure RefreshActiveForm(Sender: TObject);\r\n procedure edtPicklistCustomFormMouseMove(Sender: TObject;\r\n Shift: TShiftState; X, Y: Integer);\r\n procedure btnBlockMenuMouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure miCurrentTimeClick(Sender: TObject);\r\n procedure tmQPKLTimePickerChange(Sender: TObject);\r\n procedure rgBlockRadioGroupChange(Sender: TObject);\r\n procedure seBlockSpinEditChange(Sender: TObject);\r\n procedure edtDesign_BlockTitleEditChange(Sender: TObject);\r\n procedure tmCloseCacheIndicatorTimer(Sender: TObject);\r\n procedure httpCallResponse(Sender: TObject; AResponse: string);\r\n procedure tmGenTimerTimer(Sender: TObject);\r\n procedure dpBlockDatePickerChange(Sender: TObject);\r\n procedure miClearCacheClick(Sender: TObject);\r\n procedure WebHTMLContainer11Click(Sender: TObject);\r\n procedure WebBitBtn4Click(Sender: TObject);\r\n procedure cbNoHorizontallineUpClick(Sender: TObject);\r\n procedure WebPanel70MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure WebPanel7MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure M1DragOver(Sender, Source: TObject; X, Y: Integer;\r\n State: TDragState; var Accept: Boolean);\r\n procedure rgScreenSizeChange(Sender: TObject);\r\n procedure ind_DBServiceMouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\n procedure btnMenu_SettingsClick(Sender: TObject);\r\n procedure btnSwitch_DesignKeyDown(Sender: TObject; var Key: Word;\r\n Shift: TShiftState);\r\n procedure btnSwitch_DesignClick(Sender: TObject);\r\n procedure btnMenu_SettingsKeyDown(Sender: TObject; var Key: Word;\r\n Shift: TShiftState);\r\n procedure WebSpeechRecognition_baseEnd(Sender: TObject);\r\n procedure WebSpeechRecognition_baseNoResultMatch(Sender: TObject;\r\n Phrases: TStrings);\r\n procedure WebSpeechRecognition_baseStart(Sender: TObject);\r\n procedure btnMicStart_baseClick(Sender: TObject);\r\n procedure WebSpeechRecognition_baseCommands2Command(Sender: TObject;\r\n Parameters: TStrings);\r\n procedure WebSpeechRecognition_baseCommands3Command(Sender: TObject;\r\n Parameters: TStrings);\r\n procedure WebSpeechRecognition_baseCommands4Command(Sender: TObject;\r\n Parameters: TStrings);\r\n procedure WebSpeechRecognition_baseCommands5Command(Sender: TObject;\r\n Parameters: TStrings);\r\n procedure WebSpeechRecognition_baseCommands6Command(Sender: TObject;\r\n Parameters: TStrings);\r\n procedure WebSpeechRecognition_baseCommands7Command(Sender: TObject;\r\n Parameters: TStrings);\r\n procedure WebSpeechRecognition_baseCommands8Command(Sender: TObject;\r\n Parameters: TStrings);\r\n procedure WebSpeechRecognition_baseCommands9Command(Sender: TObject;\r\n Parameters: TStrings);\r\n procedure tmRemoveVoiceCommandTimer(Sender: TObject);\r\n\r\n private\r\n { Private declarations }\r\n FormIsActive_p: boolean;\r\n public\r\n { Public declarations }\r\n procedure RealignCurrentForm;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmMain: TfrmMain;\r\n password_p: string;\r\n\r\nimplementation\r\n\r\n{$R *.dfm}\r\n\r\nuses picklist,\r\nCommon, Settings, datamodule, Login, Login_New;\r\n\r\nprocedure TfrmMain.btnCloseQuickPicklistClick(Sender: TObject);\r\nbegin\r\nQPKLSaveAndClose(Sender);\r\nend;\r\n\r\nprocedure TfrmMain.btnDefaultBlockDataClick(Sender: TObject);\r\nbegin\r\n//get and apply default data to blcok\r\nGetPostFormDefaultsdata(getcurrentformname, 0, ((sender as TSpeedButton).Parent as TPanel).Parent as TPanel);\r\nStretchAllMemos(GetCurrentFormDiv);\r\nend;\r\n\r\nprocedure TfrmMain.btnDeleteRecordClick(Sender: TObject);\r\nbegin\r\nBlock_DeleteGridRecord(Sender);\r\nend;\r\n\r\nprocedure TfrmMain.btnDesignGridClick(Sender: TObject);\r\nbegin\r\nBlock_GridSetUp(Sender);\r\nend;\r\n\r\nprocedure TfrmMain.btnDesign_HideClick(Sender: TObject);\r\nbegin\r\nBlock_Hide_Show(Sender);\r\nend;\r\n\r\nprocedure TfrmMain.btnInsertCurrentDateClick(Sender: TObject);\r\nbegin\r\nBlockInsertDate(date);\r\nend;\r\n\r\nprocedure TfrmMain.btnMenu_SettingsClick(Sender: TObject);\r\nbegin\r\n//WebInputMessageDlg1.Show;\r\npassword_p := '';\r\nif (sender as TBitBtn).Tag = 1\r\nthen mm1click(Sender);\r\n(sender as TBitBtn).Tag := 0;\r\n(sender as TBitBtn).Hint := 'Settings';\r\nend;\r\n\r\nprocedure TfrmMain.btnMenu_SettingsKeyDown(Sender: TObject; var Key: Word;\r\n Shift: TShiftState);\r\nbegin\r\npassword_p := password_p + chr(key);\r\nif uppercase(password_p) = 'SYSADMIN'\r\nthen begin\r\n (sender as TBitBtn).Tag := 1;\r\n (sender as TBitBtn).Hint := 'Settings';\r\n btnMenu_SettingsClick((sender as TBitBtn));\r\n end;\r\nend;\r\n\r\nprocedure TfrmMain.btnMicStart_baseClick(Sender: TObject);\r\nbegin\r\n if not ELV_SPEECH_STARTED And ELV_SPEECH_FIRSTSTART then\r\n begin\r\n WebSpeechRecognition_base.Start; //showmessage('start');\r\n end\r\n else if not ELV_SPEECH_STARTED then\r\n begin\r\n WebSpeechRecognition_base.Resume; //showmessage('resume');\r\n end\r\n else\r\n begin\r\n WebSpeechRecognition_base.Abort; //showmessage('abort');\r\n end;\r\nend;\r\n\r\nprocedure TfrmMain.mm1Click(Sender: TObject);\r\nvar i: integer; containername_p: string;\r\nbegin\r\nEGV_PKLTARGETMEMO := nil;\r\n//showmessage(inttostr((sender as TWebBitBtn).childorder) + ' ' + (sender as TWebBitBtn).Name );\r\nif (trim(dm.egv_localstorage.values['MAINMENU_MASTER' + uppercase((Sender as TBitBtn).name)]) = '')\r\nthen ShowHideSubItems(Sender as TBitBtn);\r\n\r\nif uppercase(dm.egv_localstorage.values['MAINMENU_API' + uppercase((sender as TBitBtn).name)]) = 'ARGUS'\r\nthen begin\r\n // showmessage('1');\r\n CallArgus;\r\n exit;\r\n end;\r\n\r\nif ('SETTINGS' <> uppercase(trim((sender as TBitBtn).Hint))) and ('SETTINGS' <> uppercase(trim((sender as TBitBtn).caption))) and\r\n (dm.egv_localstorage.values['MAINMENU_FRM' + uppercase((sender as TBitBtn).name)] = '')\r\nthen exit;\r\n\r\nif (Sender as TBitBtn).Tag = 0 // if first level item clciked. Otherwise keep the forms open.\r\nthen ReleaseSubForms(true)\r\nelse ReleaseSubForms(true, (Sender as TBitBtn).Tag);\r\n\r\ncontainername_p := getformcontainer().name;\r\n\r\nfor i := 0 to div_mainmenucontainer.ControlCount - 1\r\ndo if (div_mainmenucontainer.Controls[i] is TBitBtn) and ( uppercase((div_mainmenucontainer.Controls[i] as TBitBtn).name) <> 'MM_MODE')\r\nthen if ((div_mainmenucontainer.Controls[i] as TBitBtn).Tag = 0) or\r\n ((div_mainmenucontainer.Controls[i] as TBitBtn).Tag = 1)\r\n then (div_mainmenucontainer.Controls[i] as TBitBtn).ElementClassName := 'mm_reg'\r\n else (div_mainmenucontainer.Controls[i] as TBitBtn).ElementClassName := 'mmd_reg';\r\n\r\nbtnMenu_Settings.ElementClassName := 'mm_reg';\r\n\r\nif ((sender as TBitBtn).tag = 0) or ((sender as TBitBtn).tag = 1)\r\nthen (sender as TBitBtn).ElementClassName := 'mm_click'\r\nelse (sender as TBitBtn).ElementClassName := 'mmd_click';\r\n\r\nEGV_FORM_LEVEL := 1;\r\nEGV_SUBFORMCAPTION := (sender as TBitBtn).Caption;\r\n\r\n\r\ndm.egv_localstorage.values['CURRENTFORMNAME_' + inttostr(getsubform())] :=\r\n dm.egv_localstorage.values['MAINMENU_FRM' + uppercase((sender as TBitBtn).name)];\r\nEGV_CURRENTFORMNAME := dm.egv_localstorage.values['MAINMENU_FRM' + uppercase((sender as TBitBtn).name)];\r\n\r\n//EGV_REPORTTEMPLATENAME := dm.egv_localstorage.values['MAINMENU_RPT_' + (sender as TwebBitBtn).name];\r\n\r\nEGV_CURRENTFORMNAME_L2 := dm.egv_localstorage.values['MAINMENU_FRM_2' + uppercase((sender as TBitBtn).name)];\r\n\r\n//Settings\r\n//showmessage((sender as TwebBitBtn).Hint);\r\nif ('SETTINGS' = uppercase(trim((sender as TBitBtn).Hint))) or ('SETTINGS' = uppercase(trim((sender as TBitBtn).caption)))\r\nthen begin\r\n// showmessage('settings clicked: ' + dm.EGV_SESSIONSTORAGE.values['EGV_QAI_CERNERTOKEN']);\r\n if containername_p = 'FormContainer1' then Application.CreateForm(TfrmSettings, formcontainer1.ElementID, egv_subform);\r\n if containername_p = 'FormContainer2' then Application.CreateForm(TfrmSettings, formcontainer2.ElementID, egv_subform2);\r\n if containername_p = 'FormContainer3' then Application.CreateForm(TfrmSettings, formcontainer3.ElementID, egv_subform3);\r\n if containername_p = 'FormContainer4' then Application.CreateForm(TfrmSettings, formcontainer4.ElementID, egv_subform4);\r\n if containername_p = 'FormContainer5' then Application.CreateForm(TfrmSettings, formcontainer5.ElementID, egv_subform5);\r\n if containername_p = 'FormContainer6' then Application.CreateForm(TfrmSettings, formcontainer5.ElementID, egv_subform6);\r\n if containername_p = 'FormContainer7' then Application.CreateForm(TfrmSettings, formcontainer5.ElementID, egv_subform7);\r\n if containername_p = 'FormContainer8' then Application.CreateForm(TfrmSettings, formcontainer5.ElementID, egv_subform8);\r\n if containername_p = 'FormContainer9' then Application.CreateForm(TfrmSettings, formcontainer5.ElementID, egv_subform9);\r\n end\r\nelse CallFormPrepare(containername_p,0, uppercase(dm.egv_localstorage.values['MAINMENU_API' + uppercase((sender as TBitBtn).name)]) ,true); //CallForm(containername_p);\r\nend;\r\n\r\nprocedure TfrmMain.mm1MouseLeave(Sender: TObject);\r\nbegin\r\nif ('SETTINGS' <> uppercase(trim((sender as TBitBtn).Hint))) and ('SETTINGS' <> uppercase(trim((sender as TBitBtn).caption))) and\r\n (dm.egv_localstorage.values['MAINMENU_FRM' + uppercase((sender as TBitBtn).name)] = '') and\r\n (dm.egv_localstorage.values['MAINMENU_API' + uppercase((sender as TBitBtn).name)] = '')\r\nthen exit;\r\n\r\n{if (sender as TWebBitBtn).ElementClassName = 'btn mm_item_hover'\r\nthen (sender as TWebBitBtn).ElementClassName := 'btn mm_item_regular'; }\r\nend;\r\n\r\nprocedure TfrmMain.mm1MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\nbegin // showmessage((sender as TWebBitBtn).ElementClassName);\r\nif ('SETTINGS' <> uppercase(trim((sender as TBitBtn).Hint))) and ('SETTINGS' <> uppercase(trim((sender as TBitBtn).caption))) and\r\n (dm.egv_localstorage.values['MAINMENU_FRM' + uppercase((sender as TBitBtn).name)] = '') and\r\n (dm.egv_localstorage.values['MAINMENU_API' + uppercase((sender as TBitBtn).name)] = '')\r\nthen exit;\r\n\r\n{if (sender as TWebBitBtn).ElementClassName = 'btn mm_item_regular'\r\nthen (sender as TWebBitBtn).ElementClassName := 'btn mm_item_hover'; }\r\nend;\r\n\r\nprocedure TfrmMain.mm_modeClick(Sender: TObject);\r\nvar i: integer; c: TBitBtn;\r\nbegin\r\n//showmessage(inttostr(htmlAlert1.width));\r\n//showmessage(inttostr(b2.width));\r\n\r\n\r\n//if webpanel4.Visible then showmessage('1');\r\n\r\nfor i := 0 to div_mainmenucontainer.ControlCount - 1\r\ndo if div_mainmenucontainer.Controls[i] is TBitBtn\r\nthen begin\r\n c := (div_mainmenucontainer.Controls[i] as TBitBtn);\r\n if pnlMainMenu.ElementClassName = 'mainmenu_wide'\r\n then c.caption := trim(stringreplace(c.caption,c.hint,'',[rfReplaceAll]))\r\n else c.caption := c.Caption + ' ' + c.Hint;\r\n end;\r\n\r\nif pnlMainMenu.ElementClassName <> 'mainmenu_wide'\r\nthen begin\r\n // btnMenu_Settings.hint := btnMenu_Settings.Caption;\r\n btnMenu_Settings.caption := btnMenu_Settings.caption + ' ' + btnMenu_Settings.hint;\r\n // btnLogout.hint := btnLogout.Caption;\r\n btnLogout.caption := btnLogout.caption + ' ' + btnLogout.hint;\r\n end\r\nelse begin\r\n btnMenu_Settings.caption := trim(stringreplace(btnMenu_Settings.caption,btnMenu_Settings.hint,'',[rfReplaceAll]));\r\n btnLogout.caption := trim(stringreplace(btnLogout.caption,btnLogout.hint,'',[rfReplaceAll]));\r\n end;\r\n\r\nif pnlMainMenu.ElementClassName = 'mainmenu_wide'\r\nthen pnlMainMenu.ElementClassName := 'mainmenu_narrow'\r\nelse pnlMainMenu.ElementClassName := 'mainmenu_wide';\r\n\r\ndiv_mainmenucontainer.Width := pnlMainMenu.Width + 1;\r\n//(sender as TWebBitBtn).ElementClassName := 'btn btn-light';\r\n\r\npnlMainMenu.Width := pnlMainMenu.Width + 1;\r\npnlMainMenu.Width := pnlMainMenu.Width - 1;\r\n\r\n{sbLogobox.Align := alNone;\r\nsbLogobox.Align := alClient; }\r\n\r\nif getcurrentform() <> nil\r\nthen begin\r\n getcurrentform().Realign;\r\n // to call form resize\r\n getcurrentform().width := getcurrentform().Width - 1;\r\n getcurrentform().width := getcurrentform().Width + 1;\r\n end;\r\n\r\n\r\nself.Realign;\r\n//showmessage(inttostr(sbLogoBox.width));\r\n\r\ntmGenTimer.tag := 1;\r\ntmGenTimer.Enabled := true;\r\n\r\n//Resizeformblocks(sbLogoBox,1,false);\r\nend;\r\n\r\nprocedure TfrmMain.miClearCacheClick(Sender: TObject);\r\nbegin\r\nQPKLClearCache;\r\nend;\r\n\r\nprocedure TfrmMain.miQPKLSetupClick(Sender: TObject);\r\nbegin\r\n//showmessage(EGV_CURRENT_APPTTYPE);\r\n QPKLShowSettings(Sender);\r\nend;\r\n\r\nprocedure TfrmMain.seBlockDefaultWidthChange(Sender: TObject);\r\nbegin\r\ndm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH_' + getcurrentformname] := inttostr(seBlockDefaultWidth.value);\r\negv_blockdefaultwidth := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH_' + getcurrentformname]);\r\nRefreshActiveForm(Sender);\r\nend;\r\n\r\nprocedure TfrmMain.seBlockSpinEditChange(Sender: TObject);\r\nbegin\r\nif BlockGetMemo(EGV_CURRENTBLOCK) <> nil\r\nthen begin\r\n BlockGetMemo(EGV_CURRENTBLOCK).Text := inttostr(seBlockSpinEdit.Value);\r\n BlockGetMemo(EGV_CURRENTBLOCK).Tag := 1; // Modified. To be saved in DB\r\n end;\r\nend;\r\n\r\nprocedure TfrmMain.seFormColumnsChange(Sender: TObject);\r\nbegin\r\ndm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS_' + getcurrentformname] := inttostr(seFormColumns.value);\r\nEGV_FORMCOLUMNS := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS_' + getcurrentformname]);\r\nRefreshActiveForm(Sender);\r\nend;\r\n\r\nprocedure TfrmMain._SwitchFormDesign(Sender: TObject);\r\nbegin\r\nif ((sender as TTMSFNCSwitch).State = ssON) and ((sender as TTMSFNCSwitch).Tag <> 1)\r\n then begin\r\n (sender as TTMSFNCSwitch).OnChange := nil;\r\n (sender as TTMSFNCSwitch).State := ssOFF;\r\n //(sender as TTMSFNCSwitch).AppearanceOff.Fill.Color := $00C1D6FF;\r\n (sender as TTMSFNCSwitch).setfocus;\r\n (sender as TTMSFNCSwitch).OnChange := btnDesign_Clone.OnChange;\r\n exit;\r\n end;\r\nif ((sender as TTMSFNCSwitch).State = ssOFF)\r\nthen (sender as TTMSFNCSwitch).Tag := 0;\r\n(sender as TTMSFNCSwitch).Hint := 'Design';\r\n\r\nif (getcurrentform <> nil) and ( getcurrentform.FindComponent('btnClearBlockCustomPositioning') <> nil )\r\nthen (getcurrentform.FindComponent('btnClearBlockCustomPositioning') as TBitBtn).Visible := ((sender as TTMSFNCSwitch).State = ssON);\r\nif (getcurrentform <> nil) and ( getcurrentform.FindComponent('btnClearBlockCustomSizes') <> nil )\r\nthen (getcurrentform.FindComponent('btnClearBlockCustomSizes') as TBitBtn).Visible := ((sender as TTMSFNCSwitch).State = ssON);\r\nif (getcurrentform <> nil) and ( getcurrentform.FindComponent('btnFixBlockPositions') <> nil )\r\nthen (getcurrentform.FindComponent('btnFixBlockPositions') as TBitBtn).Visible := ((sender as TTMSFNCSwitch).State = ssON);\r\nif (getcurrentform <> nil) and ( getcurrentform.FindComponent('btnGridSetUp') <> nil )\r\nthen (getcurrentform.FindComponent('btnGridSetUp') as TBitBtn).Visible := ((sender as TTMSFNCSwitch).State = ssON);\r\n\r\nif (sender as TTMSFNCSwitch).State = ssON\r\nthen begin // showmessage('2');\r\n // showmessage('1. design clciked - '+inttostr((getcurrentform.FindComponent('pnlSideData') as TWebPanel).width));\r\n sbLogoBox.Visible := true;\r\n pnlTopBanners.Visible := true;\r\n pnlFormBottomBar.Visible := true;\r\n // showmessage('2');\r\n if (getcurrentform <> nil) and ( getcurrentform.FindComponent('sbSideData') <> nil ) and\r\n ((getcurrentform.FindComponent('pnlSideData') as TPanel).width < 100)\r\n then (getcurrentform.FindComponent('pnlSideData') as TPanel).width := 100;\r\n //showmessage('2. design clciked - '+inttostr((getcurrentform.FindComponent('pnlSideData') as TWebPanel).width));\r\n if (getcurrentform <> nil) and ( getcurrentform.FindComponent('sbSearch') <> nil )\r\n then (getcurrentform.FindComponent('pnlSearch') as TPanel).height := 100;\r\n // showmessage('3. design clciked - '+inttostr((getcurrentform.FindComponent('pnlSideData') as TWebPanel).width));\r\n\r\n // edit form designer options. if no form-specific then use global\r\n pnlDesignSettings.height := 70;\r\n if dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS_' + getcurrentformname]= ''\r\n then seFormColumns.value := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS'])\r\n else seFormColumns.value := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS_' + getcurrentformname]);\r\n // showmessage('3. design clciked - '+inttostr((getcurrentform.FindComponent('pnlSideData') as TWebPanel).width));\r\n //showmessage('EGV_BLOCKDEFAULTWIDTH_' + getcurrentformname);\r\n //showmessage(dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH_' + getcurrentformname]);\r\n if dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH_' + getcurrentformname]= ''\r\n then seBlockDefaultWidth.value := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH'])\r\n else seBlockdefaultWidth.value := strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH_' + getcurrentformname]);\r\n\r\n if (dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNSAUTO_' + getcurrentformname] = '')\r\n then cbFormColumnsAuto.checked := (dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNSAUTO'] = '1')\r\n else cbFormColumnsAuto.checked := (dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNSAUTO_' + getcurrentformname] = '1');\r\n\r\n if (dm.EGV_LOCALSTORAGE.Values['EGV_NOHORIZONTALLINEUP_' + getcurrentformname] = '')\r\n then cbNoHorizontallineUp.checked := (dm.EGV_LOCALSTORAGE.Values['EGV_NOHORIZONTALLINEUP'] = '1')\r\n else cbNoHorizontallineUp.checked := (dm.EGV_LOCALSTORAGE.Values['EGV_NOHORIZONTALLINEUP_' + getcurrentformname] = '1');\r\n\r\n cbShowHiddenBlocksInDesign.Checked := EGV_SHOWHIDDENBLOCKSINDESIGN;\r\n\r\n lblColumns.Enabled := ( not cbFormColumnsAuto.Checked);\r\n seFormcolumns.Enabled := ( not cbFormColumnsAuto.Checked);\r\n lblBlockDefaultWidth.enabled := (cbFormColumnsAuto.checked);\r\n seBlockDefaultWidth.enabled := (cbFormColumnsAuto.checked);\r\n // showmessage('3. design clciked - '+inttostr((getcurrentform.FindComponent('pnlSideData') as TWebPanel).width));\r\n end\r\nelse begin\r\n if (getcurrentform <> nil) and ( getcurrentform.FindComponent('sbSideData') <> nil )\r\n then StretchAllMemos((getcurrentform.FindComponent('sbSideData') as TScrollBox));\r\n\r\n if (getcurrentform <> nil) and ( getcurrentform.FindComponent('pnlSearch') <> nil )\r\n then (getcurrentform.FindComponent('pnlSearch') as TPanel).height := 45;\r\n\r\n pnlDesignSettings.height := 0;\r\n if (getcurrentform <> nil) and ( getcurrentform.FindComponent('sbSideData') <> nil )\r\n then dm.EGV_LOCALSTORAGE.Values['EGV_SIDEDATAWIDTH_' + getcurrentformname] :=\r\n inttostr((getcurrentform.FindComponent('sbSideData') as TScrollBox).Width);\r\n\r\n dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNS_' + getcurrentformname] := inttostr(seFormColumns.value);\r\n dm.EGV_LOCALSTORAGE.Values['EGV_BLOCKDEFAULTWIDTH_' + getcurrentformname] := inttostr(seBlockDefaultWidth.value);\r\n\r\n if cbFormColumnsAuto.checked\r\n then dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNSAUTO_' + getcurrentformname] := '1'\r\n else dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNSAUTO_' + getcurrentformname] := '0';\r\n\r\n if cbNoHorizontallineUp.checked\r\n then dm.EGV_LOCALSTORAGE.Values['EGV_NOHORIZONTALLINEUP_' + getcurrentformname] := '1'\r\n else dm.EGV_LOCALSTORAGE.Values['EGV_NOHORIZONTALLINEUP_' + getcurrentformname] := '0';\r\n\r\n if cbShowHiddenBlocksInDesign.checked\r\n then dm.EGV_LOCALSTORAGE.Values['EGV_SHOWHIDDENBLOCKSINDESIGN'] := '1'\r\n else dm.EGV_LOCALSTORAGE.Values['EGV_SHOWHIDDENBLOCKSINDESIGN'] := '0';\r\n\r\n // Save local variable in DB\r\n //showmessage('LS_Save');\r\n end;\r\n\r\nSwitchFormDesign(frmmain, sbLogoBox, 1);\r\nSwitchFormDesign(frmmain, sbAlertBoxes, 5);\r\nSwitchFormDesign(frmmain, sbInfoBoxes, 5);\r\n// showmessage('TfrmMain._SwitchFormDesign');\r\n// showmessage('4. design clciked - '+inttostr((getcurrentform.FindComponent('pnlSideData') as TWebPanel).width));\r\nif assigned(getcurrentform)\r\nthen begin\r\n if assigned(getcurrentform.findcomponent('sbSearch'))\r\n then SwitchFormDesign(GetCurrentForm, (getcurrentform.findcomponent('sbSearch') as Tscrollbox), 20, false);\r\n // showmessage('start SwitchFormDesign for sbSideData');\r\n if assigned(getcurrentform.findcomponent('sbSideData'))\r\n then SwitchFormDesign(GetCurrentForm, (getcurrentform.findcomponent('sbSideData') as Tscrollbox), 1, false);\r\n // showmessage('start SwitchFormDesign for SUBFORM_DIV');\r\n SwitchFormDesign(GetCurrentForm);\r\n end;\r\n// showmessage('5. design clciked - '+inttostr((getcurrentform.FindComponent('pnlSideData') as TWebPanel).width));\r\nif ((sender as TTMSFNCSwitch).State = ssOFF) and (dm.EGV_LOCALSTORAGE.Values['EGV_AUTOSAVEDESIGNDATA'] = '1')\r\nthen LS_Save;\r\n\r\nself.Realign;\r\nif assigned(getcurrentform) then getcurrentform().Realign;\r\n\r\n//showmessage('6. design clciked - '+inttostr((getcurrentform.FindComponent('pnlSideData') as TWebPanel).width));\r\nend;\r\n\r\nprocedure TfrmMain.edQPKLFilterChange(Sender: TObject);\r\nbegin\r\ntmQPKLFilter.Enabled := false;\r\ntmQPKLFilter.Enabled := true;\r\nend;\r\n\r\nprocedure TfrmMain.edtDesign_BlockTitleEditChange(Sender: TObject);\r\nbegin\r\nif edtDesign_BlockTitleEdit.text = ''\r\nthen edtDesign_BlockTitleEdit.Text := ' ';\r\n\r\nend;\r\n\r\nprocedure TfrmMain.edtDesign_BlockTitleEditDblClick(Sender: TObject);\r\nbegin\r\nif btnSwitch_Design.State = ssOn\r\nthen FinishBlockTitleEdit(Sender);\r\nend;\r\n\r\nprocedure TfrmMain.edtEditMaskMouseLeave(Sender: TObject);\r\nbegin\r\n//BlockEditBoxMouseLeave(Sender);\r\nend;\r\n\r\nprocedure TfrmMain.edtPicklistCustomFormChange(Sender: TObject);\r\nbegin\r\ndm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_CUSTOMFORM'] := frmMain.edtPicklistCustomForm.text;\r\nend;\r\n\r\nprocedure TfrmMain.edtPicklistCustomFormMouseMove(Sender: TObject;\r\n Shift: TShiftState; X, Y: Integer);\r\nbegin\r\n edtPicklistCustomForm.Hint := edtPicklistCustomForm.Text;\r\nend;\r\n\r\nprocedure TfrmMain.httpCallResponse(Sender: TObject; AResponse: string);\r\nbegin\r\n //showmessage('Argus Server Response: ' + AResponse);\r\nend;\r\n\r\nprocedure TfrmMain.ind_DBServiceMouseMove(Sender: TObject; Shift: TShiftState;\r\n X, Y: Integer);\r\nbegin\r\nif ind_DBService.ElementClassName = 'db_indicator_on'\r\nthen ind_DBService.Hint := 'Server: ' + EGV_DBSERVER + ', DB: ' + EGV_FACILITYDBNAME +')'\r\nelse ind_DBService.Hint := 'DB is not available';\r\nend;\r\n\r\nprocedure TfrmMain.cbNoHorizontallineUpClick(Sender: TObject);\r\nbegin\r\nif cbNoHorizontallineUp.checked\r\nthen dm.EGV_LOCALSTORAGE.Values['EGV_NOHORIZONTALLINEUP_' + getcurrentformname] := '1'\r\nelse dm.EGV_LOCALSTORAGE.Values['EGV_NOHORIZONTALLINEUP_' + getcurrentformname] := '0';\r\nif getcurrentformname <> ''\r\nthen EGV_NOHORIZONTALLINEUP := (dm.EGV_LOCALSTORAGE.Values['EGV_NOHORIZONTALLINEUP_' + getcurrentformname] = '1');\r\n//showmessage(dm.EGV_LOCALSTORAGE.Values['EGV_NOHORIZONTALLINEUP_' + getcurrentformname]);\r\nRefreshActiveForm(Sender);\r\nend;\r\n\r\nprocedure TfrmMain.tmCloseCacheIndicatorTimer(Sender: TObject);\r\nbegin\r\n(sender as TTimer).Enabled := false;\r\nedtQPKLCacheIndicator.Visible := false;\r\nend;\r\n\r\nprocedure TfrmMain.tmGenTimerTimer(Sender: TObject);\r\nvar panel_p: TScrollBox;\r\nbegin\r\ntmGenTimer.Interval := 1;\r\n//(sender as TWebTimer).Enabled := false;\r\n//showmessage(inttostr(tmGenTimer.Tag));\r\nif tmGenTimer.Tag = 0 then begin (sender as TTimer).Enabled := false; exit; end;\r\n\r\nif tmGenTimer.Tag = 1 // frmMain form\r\nthen begin\r\n if (sbLogoBox.tag = 1) and (sbAlertBoxes.tag = 1) and (sbInfoBoxes.tag = 1)\r\n then begin\r\n (sender as TTimer).Enabled := false;\r\n Resizeformblocks(sbLogoBox,1,false); //showmessage('1');\r\n Resizeformblocks(sbAlertBoxes,5,false);\r\n Resizeformblocks(sbInfoBoxes,5,false);\r\n end;\r\n if getcurrentform = nil\r\n then pnlTopBanners.Visible := false\r\n end;\r\nif tmGenTimer.Tag = 2 // Editform_base form\r\nthen begin\r\n panel_p := (getcurrentform.FindComponent('SUBFORM_DIV') as TScrollBox);\r\n if (getcurrentform.FindComponent('sbSideData') as TScrollBox).Tag = 1\r\n then begin\r\n (sender as TTimer).Enabled := false;\r\n panel_p.Visible := true;\r\n\r\n DBF_GetPostBlocks(panel_p, 0); //get block data\r\n ResizeFormBlocks(panel_p, egv_formcolumns);\r\n StretchAllMemos(panel_p);\r\n Form_AdjustGrids(getcurrentform);\r\n\r\n DBF_GetPostBlocks((getcurrentform.FindComponent('sbSideData') as TScrollBox), 0); //get block data\r\n Resizeformblocks((getcurrentform.FindComponent('sbSideData') as TScrollBox),1,false);\r\n StretchAllMemos((getcurrentform.FindComponent('sbSideData') as TScrollBox));\r\n end;\r\n end;\r\nif tmGenTimer.Tag = 3 // ListForm_Base form\r\nthen begin\r\n panel_p := (getcurrentform.FindComponent('sbSearch') as TScrollBox);\r\n if panel_p.Tag = 1\r\n then begin // showmessage('1');\r\n (sender as TTimer).Enabled := false;\r\n Resizeformblocks(panel_p,20,false);\r\n end;\r\n end;\r\nif tmGenTimer.Tag = 4 // PickForm\r\nthen begin\r\n panel_p := (getcurrentform.FindComponent('SUBFORM_DIV') as TScrollBox);\r\n if Panel_p.Tag = 1\r\n then begin\r\n (sender as TTimer).Enabled := false;\r\n ResizeFormBlocks(panel_p, egv_formcolumns);\r\n StretchAllMemos(panel_p);\r\n Form_AdjustGrids(getcurrentform);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TfrmMain.tmQPKLFilterTimer(Sender: TObject);\r\nbegin\r\ntmQPKLFilter.Enabled := false;\r\nEGV_QPKLFILTER := edQPKLFilter.Text;\r\nQPKL_LoadFromDataset(dm.xdsQPKL_DynamicData, 'Original.ITEM');\r\nend;\r\n\r\nprocedure TfrmMain.tmQPKLTimePickerChange(Sender: TObject);\r\nbegin\r\n//BlockInsertTimeSelected(tmQPKLTimePicker.Time);\r\nBlockInsertTimeSelected(tmQPKLTimePicker.Time);\r\nend;\r\n\r\nprocedure TfrmMain.tmRemoveVoiceCommandTimer(Sender: TObject);\r\nbegin\r\nif (ELV_SPEECHRECEIVER <> nil) and (ELV_SPEECHRECEIVER.Text <> '')\r\nthen ELV_SPEECHRECEIVER.Text := stringreplace(ELV_SPEECHRECEIVER.Text, ELV_SPEECHCOMMAND, '', [rfIgnoreCase]);\r\n(sender as TTimer).Enabled := false;\r\nend;\r\n\r\nprocedure TfrmMain.WebBitBtn4Click(Sender: TObject);\r\n\r\nprocedure OnDlgResult(Result: TDialogResult);\r\n begin\r\n if Result = mrYes then\r\n begin\r\n application.Navigate('logout.html');\r\n self.Close;\r\n self.Destroy;\r\n end;\r\n end;\r\n\r\nbegin\r\nfrmmain.mdGenDialog.ShowDialog\r\n('Do you want to logout?', WEBLib.Dialogs.mtConfirmation, [],\r\n @OnDlgResult);\r\n\r\nend;\r\n\r\nprocedure TfrmMain.WebButton4Click(Sender: TObject);\r\nvar sb: TBytes;\r\nBegin\r\n{showmessage(memgridcolumns.text);\r\n\r\nwebmemo2.text := GetArgusURL;\r\n\r\nwbBrowser.Visible := true;\r\nwbBrowser.URL := webmemo1.Text; }\r\n\r\n//showmessage(formatsettings.ShortTimeFormat);\r\n//formatdatetime('mm/dd/yyyy',date,egv_formatsettings)\r\n//showmessage(EGV_CURRENT_APPTNAME);\r\n\r\n//webimagecontrol1.LoadFromURL(egv_imagesurl+'/img/'+'28/001/634/1.jpg');\r\n\r\n//opendataset_j(dm.xdsImages,'select top 10 IMAGE from imagesevault where procedurenumber = 37168');\r\n\r\n//showmessage(ParseArgusXml(''));\r\n//Application.CreateForm(TfrmLogin_New, frmLogin_New);\r\n\r\nend;\r\n\r\nprocedure TfrmMain.WebFormCreate(Sender: TObject);\r\nvar s, s2: string;\r\nbegin\r\n\r\n ELV_SPEECH_FIRSTSTART := true;\r\n\r\n//showmessage('form created');\r\nFormIsActive_p := false;\r\ns := EGV_FACILITYLIST;\r\n//s := s + ',1,2,3';\r\n while s <> ''\r\n do begin\r\n if pos(',', s) > 0\r\n then begin\r\n s2 := copy(s, 1, pos(',', s) - 1);\r\n s := copy(s, pos(',', s) + 1, length(s))\r\n end\r\n else begin\r\n s2 := s;\r\n s := '';\r\n end;\r\n cbCurrentFacilityName.Items.Add(s2);\r\n end;\r\n\r\ncbCurrentFacilityName.ItemIndex := 0;\r\n//lblCurrentFacility.Caption := EGV_FACILITY + '(' + EGV_FACILITYID + ')';\r\nend;\r\n\r\nprocedure TfrmMain.WebFormMouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\nbegin\r\n //webmemo2.Text := inttostr(x) + ' : ' + inttostr(y);\r\n{ if pnlDBFieldSettings.Visible and (\r\n (pnlDBFieldSettings.Top > y) or\r\n (pnlDBFieldSettings.left > x) or\r\n ((pnlDBFieldSettings.Top + pnlDBFieldSettings.Height) < y) or\r\n ((pnlDBFieldSettings.left + pnlDBFieldSettings.width) < x))\r\nthen btnSaveDBFieldSettingsClick(btnSaveDBFieldSettings); }\r\nend;\r\n\r\nprocedure TfrmMain.WebFormResize(Sender: TObject);\r\nbegin // showmessage(inttostr(sbmenu.Width));\r\n//showmessage('Form resize');\r\n//showmessage('screen size: ' + egv_screensize);\r\n\r\nif FormIsActive_p\r\nthen begin\r\n ResizeFormBlocks(sblogoBox, 1, false); // showmessage(' resize 1');\r\n ResizeFormBlocks(sbAlertBoxes, 5, false); // showmessage(' resize 2');\r\n ResizeFormBlocks(sbInfoBoxes, 5, false); // showmessage(' resize 3');\r\n end;\r\n{if ((self.Width < 700) and (sbmenu.Width > 40)) or ((self.Width > 700) and (sbmenu.Width = 40))\r\nthen mm_mode.Click;}\r\nhtml_heightCalculator.Top := -100;\r\n\r\n// Screen size\r\n{if (self.width >= strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_SCREENBIGW'])) and\r\n (self.height >= strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_SCREENBIGH']) ) then EGV_SCREENSIZE := ''\r\nelse if (self.width >= strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_SCREENMEDIUMW'])) and\r\n (self.height >= strtoint(dm.EGV_LOCALSTORAGE.Values['EGV_SCREENMEDIUMH']) ) then EGV_SCREENSIZE := 'M'\r\n else EGV_SCREENSIZE := 'S';\r\nif EGV_SCREENSIZE = '' then rgScreenSize.ItemIndex := 0;\r\nif EGV_SCREENSIZE = 'M' then rgScreenSize.ItemIndex := 1;\r\nif EGV_SCREENSIZE = 'S' then rgScreenSize.ItemIndex := 2;\r\n\r\nif btnSwitch_Design.State = ssON\r\nthen _SwitchFormDesign(btnSwitch_Design); }\r\n\r\nend;\r\n\r\nprocedure TfrmMain.WebFormShow(Sender: TObject);\r\nbegin\r\n//showmessage(application.Version);\r\nif EGV_SCREENSIZE = '' then rgScreenSize.ItemIndex := 0;\r\nif EGV_SCREENSIZE = 'M' then rgScreenSize.ItemIndex := 1;\r\nif EGV_SCREENSIZE = 'S' then rgScreenSize.ItemIndex := 2;\r\n\r\n{\r\nbtnMenu_Settings.Visible := (trim(EGV_USERROLE) <> '') and (uppercase(EGV_USERROLE) = 'ADMINISTRATOR');\r\nbtnSwitch_Design.Visible := (trim(EGV_USERROLE) <> '') and (uppercase(EGV_USERROLE) = 'ADMINISTRATOR'); )\r\n\r\n{function GetQueryParam(AName: string): string;\r\nfunction HasQueryParam(AName: string; var AValue: string): boolean;\r\n}\r\n\r\n//showmessage(EGV_CURRENT_MRN);\r\nFormIsActive_p := true;\r\n //LS_Load;\r\n\r\n pnlDesignSettings.Height := 0;\r\n // Customize Formnat setting\r\n CustomizeDateTimeFormats;\r\n // showmessage('start show');\r\n// CreateMainMenu;\r\n\r\n SetSystemVariablesFromStorage; //showmessage('1');\r\n\r\n FormContainer1.Align := alClient;\r\n FormContainer2.Align := alClient;\r\n FormContainer3.Align := alClient;\r\n FormContainer4.Align := alClient;\r\n FormContainer5.Align := alClient;\r\n FormContainer6.Align := alClient;\r\n FormContainer7.Align := alClient;\r\n FormContainer8.Align := alClient;\r\n FormContainer9.Align := alClient;\r\n\r\n {StretchAllMemos(sbLogoBox); // showmessage('2');\r\n StretchAllMemos(sbAlertBoxes); // showmessage('3');\r\n StretchAllMemos(sbInfoBoxes); // showmessage('4'); }\r\nGetPostFormDesignData(frmmain.name, 'V', 0, frmmain.sbLogoBox,1);\r\nGetPostFormDesignData(frmmain.name, 'P', 0, frmmain.sbLogoBox,1);\r\nGetPostFormDesignData(frmmain.name, 'T', 0, frmmain.sbLogoBox,1, true);\r\n\r\nGetPostFormDesignData(frmmain.name, 'V', 0, frmmain.sbAlertBoxes,5);\r\nGetPostFormDesignData(frmmain.name, 'P', 0, frmmain.sbAlertBoxes,5);\r\nGetPostFormDesignData(frmmain.name, 'T', 0, frmmain.sbAlertBoxes,5, true);\r\n\r\nGetPostFormDesignData(frmmain.name, 'V', 0, frmmain.sbInfoBoxes,5);\r\nGetPostFormDesignData(frmmain.name, 'P', 0, frmmain.sbInfoBoxes,5);\r\nGetPostFormDesignData(frmmain.name, 'T', 0, frmmain.sbInfoBoxes,5, true);\r\n\r\nDBF_GetPostBlocks(frmmain.sbLogoBox, 0, frmmain);\r\nDBF_GetPostBlocks(frmmain.sbAlertBoxes, 0, frmmain);\r\nDBF_GetPostBlocks(frmmain.sbInfoBoxes, 0, frmmain);\r\n\r\n CreateMainMenu;\r\n\r\n{tmGenTimer.tag := 1;\r\ntmGenTimer.Enabled := true; }\r\nif dm.XDataWebConnection2.connected\r\nthen ind_DBService.ElementClassName := 'db_indicator_on'\r\nelse ind_DBService.ElementClassName := 'db_indicator_off';\r\n\r\nif dm.EGV_LOCALSTORAGE.Values['EGV_VOICECONTROLACTIVE'] = '1'\r\nthen btnMicStart_baseClick(nil);\r\n\r\nend;\r\n\r\nprocedure TfrmMain.WebHTMLContainer11Click(Sender: TObject);\r\nvar s: string;\r\nbegin\r\ns := (Sender as THTMLContainer).HTML.text;\r\n (Sender as THTMLContainer).HTML.text := '123';\r\n (Sender as THTMLContainer).HTML.text := s;\r\nend;\r\n\r\nprocedure TfrmMain.WebLabel36DblClick(Sender: TObject);\r\nbegin\r\nBlockTitleEdit(Sender);\r\nend;\r\n\r\nprocedure TfrmMain.WebLabel36MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\nbegin\r\n//if frmmain.cldQPKLCalendar.Visible then exit;\r\nBlock_MouseMove((((Sender as TControl).parent as TPanel).Parent as TPanel),[],0,0,'btnDBField_Settings', frmmain);\r\nend;\r\n\r\nprocedure TfrmMain.WebLabel8DragDrop(Sender, Source: TObject; X, Y: Integer);\r\nbegin\r\nBlockDragDrop(Sender, Source, X, Y, frmmain, sbInfoBoxes, 5);\r\nend;\r\n\r\nprocedure TfrmMain.WebPanel70MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\nbegin\r\nBlock_MouseMove(((Sender as TControl).parent as TPanel),[],0,0,'btnDBField_Settings', frmmain);\r\nend;\r\n\r\nprocedure TfrmMain.WebPanel7MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\nbegin\r\nBlock_MouseMove(((Sender as TControl).parent as TPanel),[],0,0,'btnDBField_Settings', frmmain);\r\nend;\r\n\r\nprocedure TfrmMain.WebSpeechRecognition_baseCommands2Command(Sender: TObject;\r\n Parameters: TStrings);\r\nbegin\r\nSpeechProcess('GO', Parameters);\r\nend;\r\n\r\nprocedure TfrmMain.WebSpeechRecognition_baseCommands3Command(Sender: TObject;\r\n Parameters: TStrings);\r\nbegin\r\nSpeechProcess('QUESTION', Parameters);\r\nend;\r\n\r\nprocedure TfrmMain.WebSpeechRecognition_baseCommands4Command(Sender: TObject;\r\n Parameters: TStrings);\r\nbegin\r\nSpeechProcess('SEARCH', Parameters);\r\nend;\r\n\r\nprocedure TfrmMain.WebSpeechRecognition_baseCommands5Command(Sender: TObject;\r\n Parameters: TStrings);\r\nbegin\r\nSpeechProcess('CLEAR TEXT', Parameters);\r\nend;\r\n\r\nprocedure TfrmMain.WebSpeechRecognition_baseCommands6Command(Sender: TObject;\r\n Parameters: TStrings);\r\nbegin\r\nSpeechProcess('START', Parameters);\r\nend;\r\n\r\nprocedure TfrmMain.WebSpeechRecognition_baseCommands7Command(Sender: TObject;\r\n Parameters: TStrings);\r\nbegin\r\nSpeechProcess('STOP', Parameters);\r\nend;\r\n\r\nprocedure TfrmMain.WebSpeechRecognition_baseCommands8Command(Sender: TObject;\r\n Parameters: TStrings);\r\nbegin\r\nSpeechProcess('CAPTURE', Parameters);\r\nend;\r\n\r\nprocedure TfrmMain.WebSpeechRecognition_baseCommands9Command(Sender: TObject;\r\n Parameters: TStrings);\r\nbegin\r\nSpeechProcess('CLOSE', Parameters);\r\nend;\r\n\r\nprocedure TfrmMain.WebSpeechRecognition_baseEnd(Sender: TObject);\r\nbegin\r\nELV_SPEECH_STARTED := false;\r\n //btnMicStart.MaterialGlyph := 'mic_off';\r\nbtnMicStart_base.caption := '';\r\nend;\r\n\r\nprocedure TfrmMain.WebSpeechRecognition_baseStart(Sender: TObject);\r\nbegin\r\nELV_SPEECH_STARTED := true;\r\nELV_SPEECH_FIRSTSTART := false;\r\n//btnMicStart.MaterialGlyph := 'mic';\r\nbtnMicStart_base.caption := '';\r\nend;\r\n\r\nprocedure TfrmMain.WebSpeechRecognition_baseNoResultMatch(\r\n Sender: TObject; Phrases: TStrings);\r\nvar s: string; i: integer;\r\nbegin\r\n//showmessage(Phrases[0]);\r\n if (dm.EGV_LOCALSTORAGE.Values['EGV_VOICEDICTATION'] = '1') and (ELV_SPEECHRECEIVER <> nil)\r\n then begin\r\n ELV_SPEECHRECEIVER.Text := ELV_SPEECHRECEIVER.Text + ' ' + Phrases[0];\r\n if ELV_SPEECHTARGET <> nil\r\n then begin\r\n ELV_SPEECHTARGET.Text := ELV_SPEECHRECEIVER.Text;\r\n StretchMemo(ELV_SPEECHTARGET);\r\n if ELV_SPEECHTARGET.Tag = 0\r\n then ELV_SPEECHTARGET.Tag := 1; // updated. post it.\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TfrmMain.btnCloseTimePickerClick(Sender: TObject);\r\nbegin\r\n//pnlQPKLTimePicker.Visible := false;\r\nend;\r\n\r\nprocedure TfrmMain.btnBlockMenuClick(Sender: TObject);\r\nvar P: Tpoint; shift_p: integer;\r\nbegin\r\n{if pmBlockMenu.Tag = 1\r\nthen begin\r\n pmBlockMenu.Tag := 0;\r\n pmBlockMenu.Visible := false;\r\n exit;\r\n end; }\r\n\r\n { P.x := EGV_CURRENTBLOCK.Left;\r\n P.y := ((Sender as TWebMemo).parent as TWebPanel).top - 3;\r\n P := (((Sender as TWebMemo).parent as TWebPanel).parent as TWebControl).clienttoscreen(P); }\r\n\r\n// pmBlockMenu.Appearance.BackgroundColor := ((sender as TWebControl).Parent as TWebpanel).color;\r\n//showmessage('1');\r\nshift_p := 0;\r\nif (uppercase(EGV_CURRENTBLOCK.Parent.name) = 'SBSEARCH')\r\nthen shift_p := (EGV_CURRENTBLOCK.Parent as TScrollBox).ScrollLeft;\r\n\r\n P.x := EGV_CURRENTBLOCK.left + EGV_CURRENTBLOCK.width - 130;\r\n P.y := EGV_CURRENTBLOCK.top + 22;\r\n // P := (EGV_CURRENTBLOCK.parent as TWebControl).clienttoscreen(P);\r\n P := (EGV_CURRENTBLOCK.Parent as TControl).clienttoscreen(P);\r\n // pmBlockMenu.Popup(p.X , P.Y);\r\n\r\n // showmessage(EGV_BLOCKUNIQUEID );\r\n // pmBlockMenu.Visible := true;\r\n pmBlockMenu.Popup(p.X - shift_p, P.Y - (EGV_CURRENTBLOCK.parent as TScrollBox).ScrollTop);\r\n // pmBlockMenu.Tag := 1;\r\nend;\r\n\r\nprocedure TfrmMain.btnBlockMenuMouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\nbegin\r\n//btnBlockMenuClick(Sender);\r\nend;\r\n\r\nprocedure TfrmMain.btnAddRecordClick(Sender: TObject);\r\nbegin\r\n//Block_GridPost(Sender);\r\n Block_GridNewRecord(Sender);\r\nend;\r\n\r\nprocedure TfrmMain.btnBlockGridPostClick(Sender: TObject);\r\nbegin\r\nBlock_GridPost(Sender);\r\nend;\r\n\r\nprocedure TfrmMain.M1DragOver(Sender, Source: TObject; X, Y: Integer;\r\n State: TDragState; var Accept: Boolean);\r\nbegin\r\n Accept := true;\r\nend;\r\n\r\nprocedure TfrmMain.M1MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\nbegin\r\n//if frmmain.cldQPKLCalendar.Visible then exit;\r\nBlock_MouseMove(((Sender as TControl).parent as TPanel),[],0,0,'btnDBField_Settings', frmmain);\r\nend;\r\n\r\nprocedure TfrmMain.B1MouseLeave(Sender: TObject);\r\nbegin\r\n//if frmmain.cldQPKLCalendar.Visible then exit;\r\nBlock_MouseLeave(Sender);\r\nend;\r\n\r\nprocedure TfrmMain.B1MouseMove(Sender: TObject; Shift: TShiftState; X,\r\n Y: Integer);\r\nbegin\r\n//if frmmain.cldQPKLCalendar.Visible then exit;\r\nBlock_MouseMove(Sender, Shift, X, Y, 'btnDBField_Settings', frmmain);\r\nend;\r\n\r\nprocedure TfrmMain.btnQPKLDatePickerClick(Sender: TObject);\r\nbegin\r\nBlockInsertFromCalendar(Sender);\r\nend;\r\n\r\nprocedure TfrmMain.btnQPKLTimePickerClick(Sender: TObject);\r\nbegin\r\nBlockInsertFromTimePicker(Sender);\r\nend;\r\n\r\nprocedure TfrmMain.btnSwitch_DesignClick(Sender: TObject);\r\nbegin\r\npassword_p := '';\r\nend;\r\n\r\nprocedure TfrmMain.btnSwitch_DesignKeyDown(Sender: TObject; var Key: Word;\r\n Shift: TShiftState);\r\nbegin\r\npassword_p := password_p + chr(key);\r\nif uppercase(password_p) = 'SYSADMIN'\r\nthen begin\r\n (sender as TTMSFNCSwitch).Tag := 1;\r\n (sender as TTMSFNCSwitch).OnChange := nil;\r\n //(sender as TTMSFNCSwitch).AppearanceOff.Fill.Color := clNone;\r\n (sender as TTMSFNCSwitch).OnChange := btnDesign_Clone.OnChange;\r\n (sender as TTMSFNCSwitch).Hint := 'Design';\r\n btnSwitch_Design.State := ssON;\r\n end;\r\nend;\r\n\r\nprocedure TfrmMain.btnUseSelectedTimeClick(Sender: TObject);\r\nbegin\r\nBlockInsertTimeSelected(tmQPKLTimePicker.Time);\r\nend;\r\n\r\nprocedure TfrmMain.miCalendarClick(Sender: TObject);\r\nbegin\r\nBlockInsertFromDatePicker(Sender);\r\nend;\r\n\r\nprocedure TfrmMain.cbCurrentFacilityNameChange(Sender: TObject);\r\n\r\n procedure OnGetFACILITYCODE_Response(Response: TXDataClientResponse);\r\n begin\r\n EGV_FACILITYCODE := string(TJSObject(Response.Result)['value']);\r\n //showmessage(dm.EGV_FACILITYCODE);\r\n ResizeFormBlocks(sbLogoBox, 1, false); //showmessage('2');\r\n ResizeFormBlocks(sbAlertBoxes, 5, false); //showmessage('2');\r\n ResizeFormBlocks(sbInfoBoxes, 5, false);\r\n end;\r\n\r\nbegin\r\n\r\nEGV_FACILITY := cbCurrentFacilityName.Text;\r\n//Get facility CODE\r\ndm.XDataWebClient1.RawInvoke('IReportService.GetColumnData',\r\n [' select FACILITYCODE from FACILITY where ' +\r\n ' FACILITYID = ' + egv_facilityid +\r\n ' and FACILITYNAME = ' + quotedstr(egv_facility), egv_facilityid, '1'], @OnGetFACILITYCODE_Response);\r\n\r\nend;\r\n\r\nprocedure TfrmMain.cbFormColumnsAutoClick(Sender: TObject);\r\nbegin\r\nlblColumns.Enabled := ( not cbFormColumnsAuto.Checked);\r\nseFormcolumns.Enabled := ( not cbFormColumnsAuto.Checked);\r\nlblBlockDefaultWidth.enabled := (cbFormColumnsAuto.checked);\r\nseBlockDefaultWidth.enabled := (cbFormColumnsAuto.checked);\r\n\r\nif cbFormColumnsAuto.checked\r\nthen dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNSAUTO_' + getcurrentformname] := '1'\r\nelse dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNSAUTO_' + getcurrentformname] := '0';\r\nif getcurrentformname <> ''\r\nthen EGV_FORMCOLUMNSAUTO := (dm.EGV_LOCALSTORAGE.Values['EGV_FORMCOLUMNSAUTO_' + getcurrentformname] = '1');\r\nRefreshActiveForm(Sender);\r\nend;\r\n\r\nprocedure TfrmMain.cbPickListTypeChange(Sender: TObject);\r\nbegin\r\n BlockSetPickListType(Sender);\r\nend;\r\n\r\nprocedure TfrmMain.cbPickListTypeMouseMove(Sender: TObject; Shift: TShiftState;\r\n X, Y: Integer);\r\nbegin\r\n (sender as Tcombobox).Hint := (sender as Tcombobox).Text;\r\nend;\r\n\r\nprocedure TfrmMain.cbShowHiddenBlocksInDesignClick(Sender: TObject);\r\nbegin\r\nEGV_SHOWHIDDENBLOCKSINDESIGN := cbShowHiddenBlocksInDesign.checked;\r\n_SwitchFormDesign(btnSwitch_Design);\r\nend;\r\n\r\nprocedure TfrmMain.cldQPKLCalendarDateSelected(Sender: TObject;\r\n ADate: TDateTime);\r\nbegin\r\nBlockCalendarDateSelected(Sender, ADate);\r\nend;\r\n\r\nprocedure TfrmMain.cldQPKLCalendarMouseLeave(Sender: TObject);\r\nbegin\r\ncldQPKLCalendar.visible := false;\r\nend;\r\n\r\nprocedure TfrmMain.clQuickPicklistItemCheckChanged(Sender: TObject;\r\n AItem: TTMSFNCCheckedListBoxItem);\r\nbegin\r\nif dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SINGLE'] = '1'\r\nthen btnCloseQuickPickListClick(nil);\r\nend;\r\n\r\nprocedure TfrmMain.clQuickPicklistItemClick(Sender: TObject;\r\n AItem: TTMSFNCListBoxItem);\r\nbegin\r\n//webmemo6.text := AItem.text;\r\nAItem.checked := (not AItem.checked);\r\nif dm.EGV_LOCALSTORAGE.values['Q_' + EGV_BLOCKUNIQUEID + '_SINGLE'] = '1'\r\nthen btnCloseQuickPickListClick(nil);\r\nend;\r\n\r\nprocedure TfrmMain.clQuickPicklistMouseLeave(Sender: TObject);\r\nbegin\r\n//frmmain.btnCloseQuickPickListClick(nil);\r\nend;\r\n\r\nprocedure TfrmMain.dpBlockDatePickerChange(Sender: TObject);\r\nbegin\r\n BlockInsertDate(dpBlockDatePicker.Date);\r\nend;\r\n\r\nprocedure TfrmMain.miCurrentTimeClick(Sender: TObject);\r\nbegin\r\nBlockInsertCurrentTime(Sender);\r\nend;\r\n\r\nprocedure TfrmMain.miCurrentDateClick(Sender: TObject);\r\nbegin\r\nBlockInsertDate(date);\r\nend;\r\n\r\nprocedure TfrmMain.miTimePickerClick(Sender: TObject);\r\nbegin\r\nBlockInsertFromTimePicker(Sender);\r\nend;\r\n\r\nprocedure TfrmMain.miDBFieldSetupClick(Sender: TObject);\r\nbegin\r\nBlockShowDBFieldSettings;\r\nend;\r\n\r\nprocedure TfrmMain.miDefaultClick(Sender: TObject);\r\nbegin\r\n//get and apply default data to blcok\r\nGetPostFormDefaultsdata(getcurrentformname, 0, EGV_CURRENTBLOCK);\r\nStretchAllMemos(GetCurrentFormDiv);\r\nend;\r\n\r\nprocedure TfrmMain.miClearClick(Sender: TObject);\r\nbegin\r\nBlockClearData(Sender);\r\nend;\r\n\r\nprocedure TfrmMain.btnClearBlockDataClick(Sender: TObject);\r\nbegin\r\nBlockClearData(Sender);\r\nend;\r\n\r\nprocedure TfrmMain._BlockShowDBFieldSettings(Sender: TObject);\r\nbegin\r\nBlockShowDBFieldSettings;\r\nend;\r\n\r\nprocedure TfrmMain._BlockDragDrop(Sender, Source: TObject; X, Y: Integer);\r\nbegin\r\nBlockDragDrop(Sender, Source, X, Y, frmmain, sbAlertBoxes, 5);\r\nend;\r\n\r\nprocedure TfrmMain._BlockDragOverTitle(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);\r\nbegin\r\nBlockDragOverTitle(Sender, Source, X, Y, State, Accept);\r\nend;\r\n\r\nprocedure TfrmMain.RefreshActiveForm(Sender: TObject);\r\nbegin\r\nif assigned(getcurrentform)\r\nthen begin\r\n if assigned(getcurrentform.findcomponent('sbSearch'))\r\n then SwitchFormDesign(GetCurrentForm, (getcurrentform.findcomponent('sbSearch') as Tscrollbox), 20);\r\n if assigned(getcurrentform.findcomponent('sbSideData'))\r\n then SwitchFormDesign(GetCurrentForm, (getcurrentform.findcomponent('sbSideData') as Tscrollbox), 1);\r\n\r\n SwitchFormDesign(GetCurrentForm);\r\n\r\n if (getcurrentform.FindComponent('Subform_DIV') <> nil)\r\n then begin\r\n // ResizeFormBlocks((getcurrentform.FindComponent('Subform_DIV') as TWebScrollBox), (sender as TWebSpinEdit).Value );\r\n // OrganizeBlocks((getcurrentform.FindComponent('Subform_DIV') as TWebScrollBox));\r\n StretchAllMemos((getcurrentform.FindComponent('Subform_DIV') as TScrollBox));\r\n Form_AdjustGrids(getcurrentform);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TfrmMain.rgBlockRadioGroupChange(Sender: TObject);\r\nbegin\r\n{if\r\nBlockGetMemo(EGV_CURRENTBLOCK) <> nil\r\nthen begin\r\n BlockGetMemo(EGV_CURRENTBLOCK).Text := rgBlockRadioGroup.Items[rgBlockRadioGroup.ItemIndex];\r\n BlockGetMemo(EGV_CURRENTBLOCK).Tag := 1; // Modified. To be saved in DB\r\n BlockApplyDependencies(EGV_CURRENTBLOCK, rgBlockRadioGroup.Items[rgBlockRadioGroup.ItemIndex]);\r\n end; }\r\nend;\r\n\r\nprocedure TfrmMain.rgScreenSizeChange(Sender: TObject);\r\nbegin\r\nif rgScreenSize.ItemIndex = 0 then EGV_SCREENSIZE := '';\r\nif rgScreenSize.ItemIndex = 1 then EGV_SCREENSIZE := 'M';\r\nif rgScreenSize.ItemIndex = 2 then EGV_SCREENSIZE := 'S';\r\n {\r\nReleaseSubForms(true);\r\n\r\nGetPostFormDesignData(frmmain.name, 'V', 0, frmmain.sbLogoBox,1);\r\nGetPostFormDesignData(frmmain.name, 'P', 0, frmmain.sbLogoBox,1);\r\nGetPostFormDesignData(frmmain.name, 'T', 0, frmmain.sbLogoBox,1, true);\r\n\r\nGetPostFormDesignData(frmmain.name, 'V', 0, frmmain.sbAlertBoxes,5);\r\nGetPostFormDesignData(frmmain.name, 'P', 0, frmmain.sbAlertBoxes,5);\r\nGetPostFormDesignData(frmmain.name, 'T', 0, frmmain.sbAlertBoxes,5, true);\r\n\r\nGetPostFormDesignData(frmmain.name, 'V', 0, frmmain.sbInfoBoxes,5);\r\nGetPostFormDesignData(frmmain.name, 'P', 0, frmmain.sbInfoBoxes,5);\r\nGetPostFormDesignData(frmmain.name, 'T', 0, frmmain.sbInfoBoxes,5, true); }\r\n\r\nend;\r\n\r\nprocedure TfrmMain.RealignCurrentForm;\r\nbegin\r\n//WebFormResize(nil);\r\nfrmmain.width := frmmain.width- 1;\r\nfrmmain.width := frmmain.width+ 1;\r\nif GetCurrentForm <> nil\r\nthen GetCurrentForm.Realign;\r\nend;\r\n\r\nprocedure TfrmMain.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n pnlMainMenu := TPanel.Create(Self);\r\n sbLogoBox := TScrollBox.Create(Self);\r\n pnlLogo := TPanel.Create(Self);\r\n WebPanel28 := TPanel.Create(Self);\r\n WebLabel13 := TLabel.Create(Self);\r\n WebMemo12 := TMemo.Create(Self);\r\n WebHTMLContainer11 := THTMLContainer.Create(Self);\r\n sbMenu := TScrollBox.Create(Self);\r\n div_mainmenucontainer := THTMLDiv.Create(Self);\r\n mm_mode := TBitBtn.Create(Self);\r\n mm1 := TBitBtn.Create(Self);\r\n mm2 := TBitBtn.Create(Self);\r\n mm3 := TBitBtn.Create(Self);\r\n mm4 := TBitBtn.Create(Self);\r\n mm5 := TBitBtn.Create(Self);\r\n mm6 := TBitBtn.Create(Self);\r\n mm7 := TBitBtn.Create(Self);\r\n mm8 := TBitBtn.Create(Self);\r\n mm9 := TBitBtn.Create(Self);\r\n mm10 := TBitBtn.Create(Self);\r\n mm11 := TBitBtn.Create(Self);\r\n mm12 := TBitBtn.Create(Self);\r\n mm13 := TBitBtn.Create(Self);\r\n mm14 := TBitBtn.Create(Self);\r\n mm15 := TBitBtn.Create(Self);\r\n mm16 := TBitBtn.Create(Self);\r\n mm17 := TBitBtn.Create(Self);\r\n mm18 := TBitBtn.Create(Self);\r\n mm19 := TBitBtn.Create(Self);\r\n mm20 := TBitBtn.Create(Self);\r\n btnLogout := TBitBtn.Create(Self);\r\n btnMenu_Settings := TBitBtn.Create(Self);\r\n pnlFormArea := TPanel.Create('C3');\r\n pnlTopBanners := TPanel.Create(Self);\r\n sbAlertBoxes := TScrollBox.Create(Self);\r\n B1 := TPanel.Create(Self);\r\n WebPanel70 := TPanel.Create(Self);\r\n WebLabel36 := TLabel.Create(Self);\r\n M1 := TMemo.Create(Self);\r\n htmlAlert5 := THTMLContainer.Create(Self);\r\n B2 := TPanel.Create(Self);\r\n WebPanel6 := TPanel.Create(Self);\r\n WebLabel1 := TLabel.Create(Self);\r\n M2 := TMemo.Create(Self);\r\n htmlAlert1 := THTMLContainer.Create(Self);\r\n B3 := TPanel.Create(Self);\r\n WebPanel8 := TPanel.Create(Self);\r\n WebLabel2 := TLabel.Create(Self);\r\n M3 := TMemo.Create(Self);\r\n htmlAlert2 := THTMLContainer.Create(Self);\r\n B5 := TPanel.Create(Self);\r\n WebPanel12 := TPanel.Create(Self);\r\n WebLabel4 := TLabel.Create(Self);\r\n M5 := TMemo.Create(Self);\r\n htmlAlert4 := THTMLContainer.Create(Self);\r\n B4 := TPanel.Create(Self);\r\n WebPanel10 := TPanel.Create(Self);\r\n WebLabel3 := TLabel.Create(Self);\r\n M4 := TMemo.Create(Self);\r\n htmlAlert3 := THTMLContainer.Create(Self);\r\n WebPanel5 := TPanel.Create(Self);\r\n lblLocation := TLabel.Create(Self);\r\n pnlControlHolder := TPanel.Create(Self);\r\n lbImage_Y_X := TLabel.Create(Self);\r\n lblMemodataText := TLabel.Create(Self);\r\n btnDesign_Hide := TSpeedButton.Create(Self);\r\n btnClearBlockData := TSpeedButton.Create(Self);\r\n btnDefaultBlockData := TSpeedButton.Create(Self);\r\n btnDesignGrid := TSpeedButton.Create(Self);\r\n btnQuickPickListMoreItems := TSpeedButton.Create(Self);\r\n btnDBField_Settings := TSpeedButton.Create(Self);\r\n btnInsertCurrentDate := TSpeedButton.Create(Self);\r\n btnQPKLDatePicker := TSpeedButton.Create(Self);\r\n cbPickListType := TComboBox.Create(Self);\r\n cldQPKLCalendar := TCalendar.Create(Self);\r\n WebPanel174 := TPanel.Create(Self);\r\n edtDesign_BlockTitleEdit := TEdit.Create(Self);\r\n pnlQPKLHeader := TPanel.Create(Self);\r\n btnCloseQuickPicklist := TSpeedButton.Create(Self);\r\n seQPKLValue := TSpinEdit.Create(Self);\r\n edQPKLFilter := TEdit.Create(Self);\r\n WebSpeedButton1 := TSpeedButton.Create(Self);\r\n clQuickPicklist := TTMSFNCCheckedListBox.Create(Self);\r\n btnQPKLTimePicker := TSpeedButton.Create(Self);\r\n btnAddRecord := TSpeedButton.Create(Self);\r\n btnDeleteRecord := TSpeedButton.Create(Self);\r\n memGridColumns := TMemo.Create(Self);\r\n btnBlockGridPost := TSpeedButton.Create(Self);\r\n edtPicklistCustomForm := TEdit.Create(Self);\r\n edtEditMask := TMaskEdit.Create(Self);\r\n btnBlockMenu := TSpeedButton.Create(Self);\r\n pnlQPKLTimePicker := TPanel.Create(Self);\r\n btnCloseTimePicker := TSpeedButton.Create(Self);\r\n mdGenDialog := TMessageDlg.Create(Self);\r\n tmQPKLTimePicker := TDateTimePicker.Create(Self);\r\n btnUseSelectedTime := TSpeedButton.Create(Self);\r\n dpBlockDatePicker := TDateTimePicker.Create(Self);\r\n rgBlockRadioGroup := TRadioGroup.Create(Self);\r\n seBlockSpinEdit := TSpinEdit.Create(Self);\r\n btnTest := TBitBtn.Create(Self);\r\n memo_autoheight := TMemo.Create(Self);\r\n wmWaitMessage := TWaitMessage.Create(Self);\r\n html_heightCalculator := TScrollBox.Create(Self);\r\n HTMLMemoDataText := THTMLContainer.Create(Self);\r\n pnlDesignSettings := TPanel.Create(Self);\r\n lblBlockDefaultWidth := TLabel.Create(Self);\r\n lblColumns := TLabel.Create(Self);\r\n seFormColumns := TSpinEdit.Create(Self);\r\n cbFormColumnsAuto := TCheckBox.Create(Self);\r\n seBlockDefaultWidth := TSpinEdit.Create(Self);\r\n cbShowHiddenBlocksInDesign := TCheckBox.Create(Self);\r\n wbBrowser := TBrowserControl.Create(Self);\r\n cbNoHorizontallineUp := TCheckBox.Create(Self);\r\n rgScreenSize := TRadioGroup.Create(Self);\r\n WebButton1 := TButton.Create(Self);\r\n WebButton4 := TButton.Create(Self);\r\n pnlFormBottomBar := TPanel.Create(Self);\r\n sbInfoBoxes := TScrollBox.Create(Self);\r\n B6 := TPanel.Create(Self);\r\n WebPanel7 := TPanel.Create(Self);\r\n WebLabel8 := TLabel.Create(Self);\r\n WebMemo4 := TMemo.Create(Self);\r\n WebHTMLContainer6 := THTMLContainer.Create(Self);\r\n B7 := TPanel.Create(Self);\r\n WebPanel9 := TPanel.Create(Self);\r\n WebLabel9 := TLabel.Create(Self);\r\n WebMemo5 := TMemo.Create(Self);\r\n WebHTMLContainer7 := THTMLContainer.Create(Self);\r\n B8 := TPanel.Create(Self);\r\n WebPanel17 := TPanel.Create(Self);\r\n WebLabel10 := TLabel.Create(Self);\r\n WebMemo7 := TMemo.Create(Self);\r\n WebHTMLContainer8 := THTMLContainer.Create(Self);\r\n B9 := TPanel.Create(Self);\r\n WebPanel19 := TPanel.Create(Self);\r\n WebLabel11 := TLabel.Create(Self);\r\n WebMemo8 := TMemo.Create(Self);\r\n WebHTMLContainer9 := THTMLContainer.Create(Self);\r\n B10 := TPanel.Create(Self);\r\n WebPanel21 := TPanel.Create(Self);\r\n WebLabel12 := TLabel.Create(Self);\r\n WebMemo9 := TMemo.Create(Self);\r\n WebHTMLContainer10 := THTMLContainer.Create(Self);\r\n FormContainer1 := THTMLDiv.Create('FC1');\r\n FormContainer2 := THTMLDiv.Create('FC@');\r\n FormContainer3 := THTMLDiv.Create('FC3');\r\n FormContainer4 := THTMLDiv.Create('FC4');\r\n FormContainer5 := THTMLDiv.Create('FC5');\r\n FormContainer6 := THTMLDiv.Create('FC6');\r\n FormContainer7 := THTMLDiv.Create('FC7');\r\n FormContainer8 := THTMLDiv.Create('FC8');\r\n FormContainer9 := THTMLDiv.Create('FC9');\r\n WebInputMessageDlg1 := TInputMessageDlg.Create(Self);\r\n WebMemo1 := TMemo.Create(Self);\r\n pnlBottomBar := TPanel.Create(Self);\r\n WebLabel6 := TLabel.Create(Self);\r\n WebLabel5 := TLabel.Create(Self);\r\n btnSwitch_Design := TTMSFNCSwitch.Create(Self);\r\n cbCurrentFacilityName := TComboBox.Create(Self);\r\n edtArgusIndicator := TEdit.Create(Self);\r\n edtQPKLCacheIndicator := TEdit.Create(Self);\r\n ind_DBService := TBitBtn.Create(Self);\r\n btnDesign_Clone := TTMSFNCSwitch.Create(Self);\r\n btnMicStart_base := TBitBtn.Create(Self);\r\n tmQPKLFilter := TTimer.Create(Self);\r\n pmBlockMenu := TPopupMenu.Create(Self);\r\n miCurrentDate := TMenuItem.Create(Self);\r\n miCurrentTime := TMenuItem.Create(Self);\r\n miCalendar := TMenuItem.Create(Self);\r\n miTimePicker := TMenuItem.Create(Self);\r\n miDefault := TMenuItem.Create(Self);\r\n miClear := TMenuItem.Create(Self);\r\n miDBFieldSetup := TMenuItem.Create(Self);\r\n miQPKLSetup := TMenuItem.Create(Self);\r\n miClearCache := TMenuItem.Create(Self);\r\n httpCall := THttpRequest.Create(Self);\r\n tmGenTimer := TTimer.Create(Self);\r\n WebSpeechRecognition_base := TSpeechRecognition.Create(Self);\r\n tmCloseCacheIndicator := TTimer.Create(Self);\r\n tmRemoveVoiceCommand := TTimer.Create(Self);\r\n\r\n pnlMainMenu.BeforeLoadDFMValues;\r\n sbLogoBox.BeforeLoadDFMValues;\r\n pnlLogo.BeforeLoadDFMValues;\r\n WebPanel28.BeforeLoadDFMValues;\r\n WebLabel13.BeforeLoadDFMValues;\r\n WebMemo12.BeforeLoadDFMValues;\r\n WebHTMLContainer11.BeforeLoadDFMValues;\r\n sbMenu.BeforeLoadDFMValues;\r\n div_mainmenucontainer.BeforeLoadDFMValues;\r\n mm_mode.BeforeLoadDFMValues;\r\n mm1.BeforeLoadDFMValues;\r\n mm2.BeforeLoadDFMValues;\r\n mm3.BeforeLoadDFMValues;\r\n mm4.BeforeLoadDFMValues;\r\n mm5.BeforeLoadDFMValues;\r\n mm6.BeforeLoadDFMValues;\r\n mm7.BeforeLoadDFMValues;\r\n mm8.BeforeLoadDFMValues;\r\n mm9.BeforeLoadDFMValues;\r\n mm10.BeforeLoadDFMValues;\r\n mm11.BeforeLoadDFMValues;\r\n mm12.BeforeLoadDFMValues;\r\n mm13.BeforeLoadDFMValues;\r\n mm14.BeforeLoadDFMValues;\r\n mm15.BeforeLoadDFMValues;\r\n mm16.BeforeLoadDFMValues;\r\n mm17.BeforeLoadDFMValues;\r\n mm18.BeforeLoadDFMValues;\r\n mm19.BeforeLoadDFMValues;\r\n mm20.BeforeLoadDFMValues;\r\n btnLogout.BeforeLoadDFMValues;\r\n btnMenu_Settings.BeforeLoadDFMValues;\r\n pnlFormArea.BeforeLoadDFMValues;\r\n pnlTopBanners.BeforeLoadDFMValues;\r\n sbAlertBoxes.BeforeLoadDFMValues;\r\n B1.BeforeLoadDFMValues;\r\n WebPanel70.BeforeLoadDFMValues;\r\n WebLabel36.BeforeLoadDFMValues;\r\n M1.BeforeLoadDFMValues;\r\n htmlAlert5.BeforeLoadDFMValues;\r\n B2.BeforeLoadDFMValues;\r\n WebPanel6.BeforeLoadDFMValues;\r\n WebLabel1.BeforeLoadDFMValues;\r\n M2.BeforeLoadDFMValues;\r\n htmlAlert1.BeforeLoadDFMValues;\r\n B3.BeforeLoadDFMValues;\r\n WebPanel8.BeforeLoadDFMValues;\r\n WebLabel2.BeforeLoadDFMValues;\r\n M3.BeforeLoadDFMValues;\r\n htmlAlert2.BeforeLoadDFMValues;\r\n B5.BeforeLoadDFMValues;\r\n WebPanel12.BeforeLoadDFMValues;\r\n WebLabel4.BeforeLoadDFMValues;\r\n M5.BeforeLoadDFMValues;\r\n htmlAlert4.BeforeLoadDFMValues;\r\n B4.BeforeLoadDFMValues;\r\n WebPanel10.BeforeLoadDFMValues;\r\n WebLabel3.BeforeLoadDFMValues;\r\n M4.BeforeLoadDFMValues;\r\n htmlAlert3.BeforeLoadDFMValues;\r\n WebPanel5.BeforeLoadDFMValues;\r\n lblLocation.BeforeLoadDFMValues;\r\n pnlControlHolder.BeforeLoadDFMValues;\r\n lbImage_Y_X.BeforeLoadDFMValues;\r\n lblMemodataText.BeforeLoadDFMValues;\r\n btnDesign_Hide.BeforeLoadDFMValues;\r\n btnClearBlockData.BeforeLoadDFMValues;\r\n btnDefaultBlockData.BeforeLoadDFMValues;\r\n btnDesignGrid.BeforeLoadDFMValues;\r\n btnQuickPickListMoreItems.BeforeLoadDFMValues;\r\n btnDBField_Settings.BeforeLoadDFMValues;\r\n btnInsertCurrentDate.BeforeLoadDFMValues;\r\n btnQPKLDatePicker.BeforeLoadDFMValues;\r\n cbPickListType.BeforeLoadDFMValues;\r\n cldQPKLCalendar.BeforeLoadDFMValues;\r\n WebPanel174.BeforeLoadDFMValues;\r\n edtDesign_BlockTitleEdit.BeforeLoadDFMValues;\r\n pnlQPKLHeader.BeforeLoadDFMValues;\r\n btnCloseQuickPicklist.BeforeLoadDFMValues;\r\n seQPKLValue.BeforeLoadDFMValues;\r\n edQPKLFilter.BeforeLoadDFMValues;\r\n WebSpeedButton1.BeforeLoadDFMValues;\r\n clQuickPicklist.BeforeLoadDFMValues;\r\n btnQPKLTimePicker.BeforeLoadDFMValues;\r\n btnAddRecord.BeforeLoadDFMValues;\r\n btnDeleteRecord.BeforeLoadDFMValues;\r\n memGridColumns.BeforeLoadDFMValues;\r\n btnBlockGridPost.BeforeLoadDFMValues;\r\n edtPicklistCustomForm.BeforeLoadDFMValues;\r\n edtEditMask.BeforeLoadDFMValues;\r\n btnBlockMenu.BeforeLoadDFMValues;\r\n pnlQPKLTimePicker.BeforeLoadDFMValues;\r\n btnCloseTimePicker.BeforeLoadDFMValues;\r\n mdGenDialog.BeforeLoadDFMValues;\r\n tmQPKLTimePicker.BeforeLoadDFMValues;\r\n btnUseSelectedTime.BeforeLoadDFMValues;\r\n dpBlockDatePicker.BeforeLoadDFMValues;\r\n rgBlockRadioGroup.BeforeLoadDFMValues;\r\n seBlockSpinEdit.BeforeLoadDFMValues;\r\n btnTest.BeforeLoadDFMValues;\r\n memo_autoheight.BeforeLoadDFMValues;\r\n wmWaitMessage.BeforeLoadDFMValues;\r\n html_heightCalculator.BeforeLoadDFMValues;\r\n HTMLMemoDataText.BeforeLoadDFMValues;\r\n pnlDesignSettings.BeforeLoadDFMValues;\r\n lblBlockDefaultWidth.BeforeLoadDFMValues;\r\n lblColumns.BeforeLoadDFMValues;\r\n seFormColumns.BeforeLoadDFMValues;\r\n cbFormColumnsAuto.BeforeLoadDFMValues;\r\n seBlockDefaultWidth.BeforeLoadDFMValues;\r\n cbShowHiddenBlocksInDesign.BeforeLoadDFMValues;\r\n wbBrowser.BeforeLoadDFMValues;\r\n cbNoHorizontallineUp.BeforeLoadDFMValues;\r\n rgScreenSize.BeforeLoadDFMValues;\r\n WebButton1.BeforeLoadDFMValues;\r\n WebButton4.BeforeLoadDFMValues;\r\n pnlFormBottomBar.BeforeLoadDFMValues;\r\n sbInfoBoxes.BeforeLoadDFMValues;\r\n B6.BeforeLoadDFMValues;\r\n WebPanel7.BeforeLoadDFMValues;\r\n WebLabel8.BeforeLoadDFMValues;\r\n WebMemo4.BeforeLoadDFMValues;\r\n WebHTMLContainer6.BeforeLoadDFMValues;\r\n B7.BeforeLoadDFMValues;\r\n WebPanel9.BeforeLoadDFMValues;\r\n WebLabel9.BeforeLoadDFMValues;\r\n WebMemo5.BeforeLoadDFMValues;\r\n WebHTMLContainer7.BeforeLoadDFMValues;\r\n B8.BeforeLoadDFMValues;\r\n WebPanel17.BeforeLoadDFMValues;\r\n WebLabel10.BeforeLoadDFMValues;\r\n WebMemo7.BeforeLoadDFMValues;\r\n WebHTMLContainer8.BeforeLoadDFMValues;\r\n B9.BeforeLoadDFMValues;\r\n WebPanel19.BeforeLoadDFMValues;\r\n WebLabel11.BeforeLoadDFMValues;\r\n WebMemo8.BeforeLoadDFMValues;\r\n WebHTMLContainer9.BeforeLoadDFMValues;\r\n B10.BeforeLoadDFMValues;\r\n WebPanel21.BeforeLoadDFMValues;\r\n WebLabel12.BeforeLoadDFMValues;\r\n WebMemo9.BeforeLoadDFMValues;\r\n WebHTMLContainer10.BeforeLoadDFMValues;\r\n FormContainer1.BeforeLoadDFMValues;\r\n FormContainer2.BeforeLoadDFMValues;\r\n FormContainer3.BeforeLoadDFMValues;\r\n FormContainer4.BeforeLoadDFMValues;\r\n FormContainer5.BeforeLoadDFMValues;\r\n FormContainer6.BeforeLoadDFMValues;\r\n FormContainer7.BeforeLoadDFMValues;\r\n FormContainer8.BeforeLoadDFMValues;\r\n FormContainer9.BeforeLoadDFMValues;\r\n WebInputMessageDlg1.BeforeLoadDFMValues;\r\n WebMemo1.BeforeLoadDFMValues;\r\n pnlBottomBar.BeforeLoadDFMValues;\r\n WebLabel6.BeforeLoadDFMValues;\r\n WebLabel5.BeforeLoadDFMValues;\r\n btnSwitch_Design.BeforeLoadDFMValues;\r\n cbCurrentFacilityName.BeforeLoadDFMValues;\r\n edtArgusIndicator.BeforeLoadDFMValues;\r\n edtQPKLCacheIndicator.BeforeLoadDFMValues;\r\n ind_DBService.BeforeLoadDFMValues;\r\n btnDesign_Clone.BeforeLoadDFMValues;\r\n btnMicStart_base.BeforeLoadDFMValues;\r\n tmQPKLFilter.BeforeLoadDFMValues;\r\n pmBlockMenu.BeforeLoadDFMValues;\r\n miCurrentDate.BeforeLoadDFMValues;\r\n miCurrentTime.BeforeLoadDFMValues;\r\n miCalendar.BeforeLoadDFMValues;\r\n miTimePicker.BeforeLoadDFMValues;\r\n miDefault.BeforeLoadDFMValues;\r\n miClear.BeforeLoadDFMValues;\r\n miDBFieldSetup.BeforeLoadDFMValues;\r\n miQPKLSetup.BeforeLoadDFMValues;\r\n miClearCache.BeforeLoadDFMValues;\r\n httpCall.BeforeLoadDFMValues;\r\n tmGenTimer.BeforeLoadDFMValues;\r\n WebSpeechRecognition_base.BeforeLoadDFMValues;\r\n tmCloseCacheIndicator.BeforeLoadDFMValues;\r\n tmRemoveVoiceCommand.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmMain';\r\n Top := -77;\r\n Width := 1419;\r\n Height := 1200;\r\n ElementClassName := 'main_block_memo';\r\n SetEvent(Self, 'OnCreate', 'WebFormCreate');\r\n SetEvent(Self, 'OnMouseMove', 'WebFormMouseMove');\r\n SetEvent(Self, 'OnResize', 'WebFormResize');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n pnlMainMenu.SetParentComponent(Self);\r\n pnlMainMenu.Name := 'pnlMainMenu';\r\n pnlMainMenu.Left := 0;\r\n pnlMainMenu.Top := 0;\r\n pnlMainMenu.Width := 169;\r\n pnlMainMenu.Height := 1168;\r\n pnlMainMenu.ElementClassName := 'mainmenu_wide';\r\n pnlMainMenu.WidthStyle := ssAuto;\r\n pnlMainMenu.Align := alLeft;\r\n pnlMainMenu.BorderColor := clWhite;\r\n pnlMainMenu.BorderStyle := bsNone;\r\n pnlMainMenu.ChildOrder := 20;\r\n pnlMainMenu.Color := clWhite;\r\n pnlMainMenu.TabOrder := 0;\r\n sbLogoBox.SetParentComponent(pnlMainMenu);\r\n sbLogoBox.Name := 'sbLogoBox';\r\n sbLogoBox.Left := 0;\r\n sbLogoBox.Top := 0;\r\n sbLogoBox.Width := 169;\r\n sbLogoBox.Height := 113;\r\n sbLogoBox.ElementClassName := 'main_top_logo';\r\n sbLogoBox.WidthStyle := ssAuto;\r\n sbLogoBox.HeightPercent := 90.000000000000000000;\r\n sbLogoBox.Align := alTop;\r\n sbLogoBox.BorderStyle := bsNone;\r\n sbLogoBox.ChildOrder := 5;\r\n pnlLogo.SetParentComponent(sbLogoBox);\r\n pnlLogo.Name := 'pnlLogo';\r\n pnlLogo.Tag := -2;\r\n pnlLogo.Left := 11;\r\n pnlLogo.Top := 9;\r\n pnlLogo.Width := 151;\r\n pnlLogo.Height := 95;\r\n pnlLogo.ElementClassName := 'data_block';\r\n pnlLogo.HeightStyle := ssPercent;\r\n pnlLogo.HeightPercent := 90.000000000000000000;\r\n pnlLogo.BorderColor := clWhite;\r\n pnlLogo.ChildOrder := 5;\r\n pnlLogo.Color := 16185849;\r\n pnlLogo.Font.Charset := ANSI_CHARSET;\r\n pnlLogo.Font.Color := clBlack;\r\n pnlLogo.Font.Height := -13;\r\n pnlLogo.Font.Name := 'Tahoma';\r\n pnlLogo.Font.Style := [];\r\n pnlLogo.ParentFont := False;\r\n pnlLogo.TabOrder := 0;\r\n SetEvent(pnlLogo, Self, 'OnMouseLeave', 'B1MouseLeave');\r\n SetEvent(pnlLogo, Self, 'OnMouseMove', 'B1MouseMove');\r\n WebPanel28.SetParentComponent(pnlLogo);\r\n WebPanel28.Name := 'WebPanel28';\r\n WebPanel28.Left := 0;\r\n WebPanel28.Top := 0;\r\n WebPanel28.Width := 151;\r\n WebPanel28.Height := 28;\r\n WebPanel28.Align := alTop;\r\n WebPanel28.BorderStyle := bsNone;\r\n WebPanel28.ChildOrder := 2;\r\n WebPanel28.Color := clWhite;\r\n WebPanel28.ElementFont := efCSS;\r\n WebPanel28.TabOrder := 0;\r\n WebLabel13.SetParentComponent(WebPanel28);\r\n WebLabel13.Name := 'WebLabel13';\r\n WebLabel13.Left := 0;\r\n WebLabel13.Top := 0;\r\n WebLabel13.Width := 151;\r\n WebLabel13.Height := 28;\r\n WebLabel13.Align := alClient;\r\n WebLabel13.Alignment := taCenter;\r\n WebLabel13.Caption := 'Logo';\r\n WebLabel13.DragMode := dmAutomatic;\r\n WebLabel13.ElementClassName := 'block_title';\r\n WebLabel13.ElementFont := efCSS;\r\n WebLabel13.Font.Charset := ANSI_CHARSET;\r\n WebLabel13.Font.Color := clNavy;\r\n WebLabel13.Font.Height := -13;\r\n WebLabel13.Font.Name := 'Segoe UI Emoji';\r\n WebLabel13.Font.Style := [fsBold];\r\n WebLabel13.HeightPercent := 100.000000000000000000;\r\n WebLabel13.ParentFont := False;\r\n WebLabel13.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel13, Self, 'OnDblClick', 'WebLabel36DblClick');\r\n SetEvent(WebLabel13, Self, 'OnMouseMove', 'WebLabel36MouseMove');\r\n SetEvent(WebLabel13, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel13, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebMemo12.SetParentComponent(pnlLogo);\r\n WebMemo12.Name := 'WebMemo12';\r\n WebMemo12.Left := 0;\r\n WebMemo12.Top := 71;\r\n WebMemo12.Width := 151;\r\n WebMemo12.Height := 24;\r\n WebMemo12.Align := alBottom;\r\n WebMemo12.BorderStyle := bsNone;\r\n WebMemo12.ElementClassName := 'block_memo';\r\n WebMemo12.ElementFont := efCSS;\r\n WebMemo12.Font.Charset := ANSI_CHARSET;\r\n WebMemo12.Font.Color := clBlack;\r\n WebMemo12.Font.Height := -16;\r\n WebMemo12.Font.Name := 'Tahoma';\r\n WebMemo12.Font.Style := [];\r\n WebMemo12.HeightPercent := 100.000000000000000000;\r\n WebMemo12.ParentFont := False;\r\n WebMemo12.ReadOnly := True;\r\n WebMemo12.SelLength := 0;\r\n WebMemo12.SelStart := 0;\r\n WebMemo12.ShowFocus := False;\r\n WebMemo12.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebMemo12, Self, 'OnMouseMove', 'M1MouseMove');\r\n WebHTMLContainer11.SetParentComponent(pnlLogo);\r\n WebHTMLContainer11.Name := 'WebHTMLContainer11';\r\n WebHTMLContainer11.Left := 0;\r\n WebHTMLContainer11.Top := 30;\r\n WebHTMLContainer11.Width := 151;\r\n WebHTMLContainer11.Height := 41;\r\n WebHTMLContainer11.Align := alBottom;\r\n WebHTMLContainer11.ChildOrder := 2;\r\n WebHTMLContainer11.ScrollStyle := ssVertical;\r\n WebHTMLContainer11.Visible := False;\r\n SetEvent(WebHTMLContainer11, Self, 'OnClick', 'WebHTMLContainer11Click');\r\n SetEvent(WebHTMLContainer11, Self, 'OnMouseMove', 'M1MouseMove');\r\n sbMenu.SetParentComponent(pnlMainMenu);\r\n sbMenu.Name := 'sbMenu';\r\n sbMenu.Left := 0;\r\n sbMenu.Top := 113;\r\n sbMenu.Width := 169;\r\n sbMenu.Height := 995;\r\n sbMenu.ElementClassName := 'transparent_panel';\r\n sbMenu.Align := alClient;\r\n sbMenu.AutoScroll := True;\r\n sbMenu.BorderStyle := bsNone;\r\n sbMenu.ChildOrder := 1;\r\n sbMenu.Color := 16185849;\r\n sbMenu.ScrollBars := ssVertical;\r\n div_mainmenucontainer.SetParentComponent(sbMenu);\r\n div_mainmenucontainer.Name := 'div_mainmenucontainer';\r\n div_mainmenucontainer.Left := 0;\r\n div_mainmenucontainer.Top := 0;\r\n div_mainmenucontainer.Width := 169;\r\n div_mainmenucontainer.Height := 995;\r\n div_mainmenucontainer.Align := alClient;\r\n div_mainmenucontainer.ChildOrder := 2;\r\n div_mainmenucontainer.Role := '';\r\n mm_mode.SetParentComponent(div_mainmenucontainer);\r\n mm_mode.Name := 'mm_mode';\r\n mm_mode.Left := 0;\r\n mm_mode.Top := 0;\r\n mm_mode.Width := 169;\r\n mm_mode.Height := 30;\r\n mm_mode.Cursor := crHandPoint;\r\n mm_mode.Align := alTop;\r\n mm_mode.Alignment := taLeftJustify;\r\n mm_mode.Caption := ' ';\r\n mm_mode.ChildOrder := 1;\r\n mm_mode.Color := clNone;\r\n mm_mode.ElementClassName := 'mm_mode';\r\n mm_mode.ElementFont := efCSS;\r\n mm_mode.ElementPosition := epRelative;\r\n mm_mode.Flat := True;\r\n mm_mode.HeightStyle := ssAuto;\r\n mm_mode.HeightPercent := 100.000000000000000000;\r\n mm_mode.MaterialGlyphSize := 24;\r\n mm_mode.ShowHint := True;\r\n mm_mode.WidthPercent := 100.000000000000000000;\r\n SetEvent(mm_mode, Self, 'OnClick', 'mm_modeClick');\r\n mm1.SetParentComponent(div_mainmenucontainer);\r\n mm1.Name := 'mm1';\r\n mm1.Left := 0;\r\n mm1.Top := 30;\r\n mm1.Width := 169;\r\n mm1.Height := 30;\r\n mm1.Cursor := crHandPoint;\r\n mm1.Align := alTop;\r\n mm1.Alignment := taLeftJustify;\r\n mm1.Caption := 'Item1';\r\n mm1.ChildOrder := 2;\r\n mm1.Color := clNone;\r\n mm1.ElementClassName := 'mm_reg';\r\n mm1.ElementFont := efCSS;\r\n mm1.ElementPosition := epRelative;\r\n mm1.Flat := True;\r\n mm1.HeightStyle := ssAuto;\r\n mm1.HeightPercent := 100.000000000000000000;\r\n mm1.MaterialGlyph := 'local_pizza';\r\n mm1.MaterialGlyphSize := 30;\r\n mm1.ShowHint := True;\r\n mm1.Visible := False;\r\n mm1.WidthStyle := ssAuto;\r\n mm1.WidthPercent := 100.000000000000000000;\r\n SetEvent(mm1, Self, 'OnClick', 'mm1Click');\r\n SetEvent(mm1, Self, 'OnMouseMove', 'mm1MouseMove');\r\n SetEvent(mm1, Self, 'OnMouseLeave', 'mm1MouseLeave');\r\n mm2.SetParentComponent(div_mainmenucontainer);\r\n mm2.Name := 'mm2';\r\n mm2.Left := 0;\r\n mm2.Top := 60;\r\n mm2.Width := 169;\r\n mm2.Height := 30;\r\n mm2.Cursor := crHandPoint;\r\n mm2.Align := alTop;\r\n mm2.Alignment := taLeftJustify;\r\n mm2.Caption := 'Item2';\r\n mm2.ChildOrder := 3;\r\n mm2.Color := clNone;\r\n mm2.ElementClassName := 'mm_reg';\r\n mm2.ElementFont := efCSS;\r\n mm2.ElementPosition := epRelative;\r\n mm2.Flat := True;\r\n mm2.HeightStyle := ssAuto;\r\n mm2.HeightPercent := 100.000000000000000000;\r\n mm2.MaterialGlyph := 'local_activity';\r\n mm2.MaterialGlyphSize := 30;\r\n mm2.ShowHint := True;\r\n mm2.Visible := False;\r\n mm2.WidthStyle := ssAuto;\r\n mm2.WidthPercent := 100.000000000000000000;\r\n SetEvent(mm2, Self, 'OnClick', 'mm1Click');\r\n SetEvent(mm2, Self, 'OnMouseMove', 'mm1MouseMove');\r\n SetEvent(mm2, Self, 'OnMouseLeave', 'mm1MouseLeave');\r\n mm3.SetParentComponent(div_mainmenucontainer);\r\n mm3.Name := 'mm3';\r\n mm3.Left := 0;\r\n mm3.Top := 90;\r\n mm3.Width := 169;\r\n mm3.Height := 30;\r\n mm3.Cursor := crHandPoint;\r\n mm3.Align := alTop;\r\n mm3.Alignment := taLeftJustify;\r\n mm3.Caption := 'Item3';\r\n mm3.ChildOrder := 4;\r\n mm3.Color := clNone;\r\n mm3.ElementClassName := 'mm_reg';\r\n mm3.ElementFont := efCSS;\r\n mm3.ElementPosition := epRelative;\r\n mm3.Flat := True;\r\n mm3.HeightStyle := ssAuto;\r\n mm3.HeightPercent := 100.000000000000000000;\r\n mm3.MaterialGlyph := 'adjust';\r\n mm3.MaterialGlyphSize := 30;\r\n mm3.ShowHint := True;\r\n mm3.Visible := False;\r\n mm3.WidthStyle := ssAuto;\r\n mm3.WidthPercent := 100.000000000000000000;\r\n SetEvent(mm3, Self, 'OnClick', 'mm1Click');\r\n SetEvent(mm3, Self, 'OnMouseMove', 'mm1MouseMove');\r\n SetEvent(mm3, Self, 'OnMouseLeave', 'mm1MouseLeave');\r\n mm4.SetParentComponent(div_mainmenucontainer);\r\n mm4.Name := 'mm4';\r\n mm4.Left := 0;\r\n mm4.Top := 120;\r\n mm4.Width := 169;\r\n mm4.Height := 30;\r\n mm4.Cursor := crHandPoint;\r\n mm4.Align := alTop;\r\n mm4.Alignment := taLeftJustify;\r\n mm4.Caption := 'Item4';\r\n mm4.ChildOrder := 5;\r\n mm4.Color := clNone;\r\n mm4.ElementClassName := 'mm_reg';\r\n mm4.ElementFont := efCSS;\r\n mm4.ElementPosition := epRelative;\r\n mm4.Flat := True;\r\n mm4.HeightStyle := ssAuto;\r\n mm4.HeightPercent := 100.000000000000000000;\r\n mm4.MaterialGlyph := 'adjust';\r\n mm4.MaterialGlyphSize := 30;\r\n mm4.ShowHint := True;\r\n mm4.Visible := False;\r\n mm4.WidthStyle := ssAuto;\r\n mm4.WidthPercent := 100.000000000000000000;\r\n SetEvent(mm4, Self, 'OnClick', 'mm1Click');\r\n SetEvent(mm4, Self, 'OnMouseMove', 'mm1MouseMove');\r\n SetEvent(mm4, Self, 'OnMouseLeave', 'mm1MouseLeave');\r\n mm5.SetParentComponent(div_mainmenucontainer);\r\n mm5.Name := 'mm5';\r\n mm5.Left := 0;\r\n mm5.Top := 150;\r\n mm5.Width := 169;\r\n mm5.Height := 30;\r\n mm5.Cursor := crHandPoint;\r\n mm5.Align := alTop;\r\n mm5.Alignment := taLeftJustify;\r\n mm5.Caption := 'Item5';\r\n mm5.ChildOrder := 6;\r\n mm5.Color := clNone;\r\n mm5.ElementClassName := 'mm_reg';\r\n mm5.ElementFont := efCSS;\r\n mm5.ElementPosition := epRelative;\r\n mm5.Flat := True;\r\n mm5.HeightStyle := ssAuto;\r\n mm5.HeightPercent := 100.000000000000000000;\r\n mm5.MaterialGlyph := 'adjust';\r\n mm5.MaterialGlyphSize := 30;\r\n mm5.ShowHint := True;\r\n mm5.Visible := False;\r\n mm5.WidthStyle := ssAuto;\r\n mm5.WidthPercent := 100.000000000000000000;\r\n SetEvent(mm5, Self, 'OnClick', 'mm1Click');\r\n SetEvent(mm5, Self, 'OnMouseMove', 'mm1MouseMove');\r\n SetEvent(mm5, Self, 'OnMouseLeave', 'mm1MouseLeave');\r\n mm6.SetParentComponent(div_mainmenucontainer);\r\n mm6.Name := 'mm6';\r\n mm6.Left := 0;\r\n mm6.Top := 180;\r\n mm6.Width := 169;\r\n mm6.Height := 30;\r\n mm6.Cursor := crHandPoint;\r\n mm6.Align := alTop;\r\n mm6.Alignment := taLeftJustify;\r\n mm6.Caption := 'Item6';\r\n mm6.ChildOrder := 7;\r\n mm6.Color := clNone;\r\n mm6.ElementClassName := 'mm_reg';\r\n mm6.ElementFont := efCSS;\r\n mm6.ElementPosition := epRelative;\r\n mm6.Flat := True;\r\n mm6.HeightStyle := ssAuto;\r\n mm6.HeightPercent := 100.000000000000000000;\r\n mm6.MaterialGlyph := 'adjust';\r\n mm6.MaterialGlyphSize := 30;\r\n mm6.ShowHint := True;\r\n mm6.Visible := False;\r\n mm6.WidthStyle := ssAuto;\r\n mm6.WidthPercent := 100.000000000000000000;\r\n SetEvent(mm6, Self, 'OnClick', 'mm1Click');\r\n SetEvent(mm6, Self, 'OnMouseMove', 'mm1MouseMove');\r\n SetEvent(mm6, Self, 'OnMouseLeave', 'mm1MouseLeave');\r\n mm7.SetParentComponent(div_mainmenucontainer);\r\n mm7.Name := 'mm7';\r\n mm7.Left := 0;\r\n mm7.Top := 210;\r\n mm7.Width := 169;\r\n mm7.Height := 30;\r\n mm7.Cursor := crHandPoint;\r\n mm7.Align := alTop;\r\n mm7.Alignment := taLeftJustify;\r\n mm7.Caption := 'Item7';\r\n mm7.ChildOrder := 8;\r\n mm7.Color := clNone;\r\n mm7.ElementClassName := 'mm_reg';\r\n mm7.ElementFont := efCSS;\r\n mm7.ElementPosition := epRelative;\r\n mm7.Flat := True;\r\n mm7.HeightStyle := ssAuto;\r\n mm7.HeightPercent := 100.000000000000000000;\r\n mm7.MaterialGlyph := 'adjust';\r\n mm7.MaterialGlyphSize := 30;\r\n mm7.ShowHint := True;\r\n mm7.Visible := False;\r\n mm7.WidthStyle := ssAuto;\r\n mm7.WidthPercent := 100.000000000000000000;\r\n SetEvent(mm7, Self, 'OnClick', 'mm1Click');\r\n SetEvent(mm7, Self, 'OnMouseMove', 'mm1MouseMove');\r\n SetEvent(mm7, Self, 'OnMouseLeave', 'mm1MouseLeave');\r\n mm8.SetParentComponent(div_mainmenucontainer);\r\n mm8.Name := 'mm8';\r\n mm8.Left := 0;\r\n mm8.Top := 240;\r\n mm8.Width := 169;\r\n mm8.Height := 30;\r\n mm8.Cursor := crHandPoint;\r\n mm8.Align := alTop;\r\n mm8.Alignment := taLeftJustify;\r\n mm8.Caption := 'Item8';\r\n mm8.ChildOrder := 9;\r\n mm8.Color := clNone;\r\n mm8.ElementClassName := 'mm_reg';\r\n mm8.ElementFont := efCSS;\r\n mm8.ElementPosition := epRelative;\r\n mm8.Flat := True;\r\n mm8.HeightStyle := ssAuto;\r\n mm8.HeightPercent := 100.000000000000000000;\r\n mm8.MaterialGlyph := 'adjust';\r\n mm8.MaterialGlyphSize := 30;\r\n mm8.ShowHint := True;\r\n mm8.Visible := False;\r\n mm8.WidthStyle := ssAuto;\r\n mm8.WidthPercent := 100.000000000000000000;\r\n SetEvent(mm8, Self, 'OnClick', 'mm1Click');\r\n SetEvent(mm8, Self, 'OnMouseMove', 'mm1MouseMove');\r\n SetEvent(mm8, Self, 'OnMouseLeave', 'mm1MouseLeave');\r\n mm9.SetParentComponent(div_mainmenucontainer);\r\n mm9.Name := 'mm9';\r\n mm9.Left := 0;\r\n mm9.Top := 270;\r\n mm9.Width := 169;\r\n mm9.Height := 30;\r\n mm9.Cursor := crHandPoint;\r\n mm9.Align := alTop;\r\n mm9.Alignment := taLeftJustify;\r\n mm9.Caption := 'item9';\r\n mm9.ChildOrder := 10;\r\n mm9.Color := clNone;\r\n mm9.ElementClassName := 'mm_reg';\r\n mm9.ElementFont := efCSS;\r\n mm9.ElementPosition := epRelative;\r\n mm9.Flat := True;\r\n mm9.HeightStyle := ssAuto;\r\n mm9.HeightPercent := 100.000000000000000000;\r\n mm9.MaterialGlyph := 'adjust';\r\n mm9.MaterialGlyphSize := 30;\r\n mm9.ShowHint := True;\r\n mm9.Visible := False;\r\n mm9.WidthStyle := ssAuto;\r\n mm9.WidthPercent := 100.000000000000000000;\r\n SetEvent(mm9, Self, 'OnClick', 'mm1Click');\r\n SetEvent(mm9, Self, 'OnMouseMove', 'mm1MouseMove');\r\n SetEvent(mm9, Self, 'OnMouseLeave', 'mm1MouseLeave');\r\n mm10.SetParentComponent(div_mainmenucontainer);\r\n mm10.Name := 'mm10';\r\n mm10.Left := 0;\r\n mm10.Top := 300;\r\n mm10.Width := 169;\r\n mm10.Height := 30;\r\n mm10.Cursor := crHandPoint;\r\n mm10.Align := alTop;\r\n mm10.Alignment := taLeftJustify;\r\n mm10.Caption := 'Item10';\r\n mm10.ChildOrder := 11;\r\n mm10.Color := clNone;\r\n mm10.ElementClassName := 'mm_reg';\r\n mm10.ElementFont := efCSS;\r\n mm10.ElementPosition := epRelative;\r\n mm10.Flat := True;\r\n mm10.HeightStyle := ssAuto;\r\n mm10.HeightPercent := 100.000000000000000000;\r\n mm10.MaterialGlyph := 'adjust';\r\n mm10.MaterialGlyphSize := 30;\r\n mm10.ShowHint := True;\r\n mm10.Visible := False;\r\n mm10.WidthStyle := ssAuto;\r\n mm10.WidthPercent := 100.000000000000000000;\r\n SetEvent(mm10, Self, 'OnClick', 'mm1Click');\r\n SetEvent(mm10, Self, 'OnMouseMove', 'mm1MouseMove');\r\n SetEvent(mm10, Self, 'OnMouseLeave', 'mm1MouseLeave');\r\n mm11.SetParentComponent(div_mainmenucontainer);\r\n mm11.Name := 'mm11';\r\n mm11.Left := 0;\r\n mm11.Top := 330;\r\n mm11.Width := 169;\r\n mm11.Height := 30;\r\n mm11.Cursor := crHandPoint;\r\n mm11.Align := alTop;\r\n mm11.Alignment := taLeftJustify;\r\n mm11.Caption := 'Item11';\r\n mm11.ChildOrder := 12;\r\n mm11.Color := clNone;\r\n mm11.ElementClassName := 'mm_reg';\r\n mm11.ElementFont := efCSS;\r\n mm11.ElementPosition := epRelative;\r\n mm11.Flat := True;\r\n mm11.HeightStyle := ssAuto;\r\n mm11.HeightPercent := 100.000000000000000000;\r\n mm11.MaterialGlyph := 'adjust';\r\n mm11.MaterialGlyphSize := 30;\r\n mm11.ShowHint := True;\r\n mm11.Visible := False;\r\n mm11.WidthStyle := ssAuto;\r\n mm11.WidthPercent := 100.000000000000000000;\r\n SetEvent(mm11, Self, 'OnClick', 'mm1Click');\r\n SetEvent(mm11, Self, 'OnMouseMove', 'mm1MouseMove');\r\n SetEvent(mm11, Self, 'OnMouseLeave', 'mm1MouseLeave');\r\n mm12.SetParentComponent(div_mainmenucontainer);\r\n mm12.Name := 'mm12';\r\n mm12.Left := 0;\r\n mm12.Top := 360;\r\n mm12.Width := 169;\r\n mm12.Height := 30;\r\n mm12.Cursor := crHandPoint;\r\n mm12.Align := alTop;\r\n mm12.Alignment := taLeftJustify;\r\n mm12.Caption := 'Item12';\r\n mm12.ChildOrder := 13;\r\n mm12.Color := clNone;\r\n mm12.ElementClassName := 'mm_reg';\r\n mm12.ElementFont := efCSS;\r\n mm12.ElementPosition := epRelative;\r\n mm12.Flat := True;\r\n mm12.HeightStyle := ssAuto;\r\n mm12.HeightPercent := 100.000000000000000000;\r\n mm12.MaterialGlyph := 'adjust';\r\n mm12.MaterialGlyphSize := 30;\r\n mm12.ShowHint := True;\r\n mm12.Visible := False;\r\n mm12.WidthStyle := ssAuto;\r\n mm12.WidthPercent := 100.000000000000000000;\r\n SetEvent(mm12, Self, 'OnClick', 'mm1Click');\r\n SetEvent(mm12, Self, 'OnMouseMove', 'mm1MouseMove');\r\n SetEvent(mm12, Self, 'OnMouseLeave', 'mm1MouseLeave');\r\n mm13.SetParentComponent(div_mainmenucontainer);\r\n mm13.Name := 'mm13';\r\n mm13.Left := 0;\r\n mm13.Top := 390;\r\n mm13.Width := 169;\r\n mm13.Height := 30;\r\n mm13.Cursor := crHandPoint;\r\n mm13.Align := alTop;\r\n mm13.Alignment := taLeftJustify;\r\n mm13.Caption := 'Item13';\r\n mm13.ChildOrder := 14;\r\n mm13.Color := clNone;\r\n mm13.ElementClassName := 'mm_reg';\r\n mm13.ElementFont := efCSS;\r\n mm13.ElementPosition := epRelative;\r\n mm13.Flat := True;\r\n mm13.HeightStyle := ssAuto;\r\n mm13.HeightPercent := 100.000000000000000000;\r\n mm13.MaterialGlyph := 'adjust';\r\n mm13.MaterialGlyphSize := 30;\r\n mm13.ShowHint := True;\r\n mm13.Visible := False;\r\n mm13.WidthStyle := ssAuto;\r\n mm13.WidthPercent := 100.000000000000000000;\r\n SetEvent(mm13, Self, 'OnClick', 'mm1Click');\r\n SetEvent(mm13, Self, 'OnMouseMove', 'mm1MouseMove');\r\n SetEvent(mm13, Self, 'OnMouseLeave', 'mm1MouseLeave');\r\n mm14.SetParentComponent(div_mainmenucontainer);\r\n mm14.Name := 'mm14';\r\n mm14.Left := 0;\r\n mm14.Top := 420;\r\n mm14.Width := 169;\r\n mm14.Height := 30;\r\n mm14.Cursor := crHandPoint;\r\n mm14.Align := alTop;\r\n mm14.Alignment := taLeftJustify;\r\n mm14.Caption := 'Item14';\r\n mm14.ChildOrder := 15;\r\n mm14.Color := clNone;\r\n mm14.ElementClassName := 'mm_reg';\r\n mm14.ElementFont := efCSS;\r\n mm14.ElementPosition := epRelative;\r\n mm14.Flat := True;\r\n mm14.HeightStyle := ssAuto;\r\n mm14.HeightPercent := 100.000000000000000000;\r\n mm14.MaterialGlyph := 'adjust';\r\n mm14.MaterialGlyphSize := 30;\r\n mm14.ShowHint := True;\r\n mm14.Visible := False;\r\n mm14.WidthStyle := ssAuto;\r\n mm14.WidthPercent := 100.000000000000000000;\r\n SetEvent(mm14, Self, 'OnClick', 'mm1Click');\r\n SetEvent(mm14, Self, 'OnMouseMove', 'mm1MouseMove');\r\n SetEvent(mm14, Self, 'OnMouseLeave', 'mm1MouseLeave');\r\n mm15.SetParentComponent(div_mainmenucontainer);\r\n mm15.Name := 'mm15';\r\n mm15.Left := 0;\r\n mm15.Top := 450;\r\n mm15.Width := 169;\r\n mm15.Height := 30;\r\n mm15.Cursor := crHandPoint;\r\n mm15.Align := alTop;\r\n mm15.Alignment := taLeftJustify;\r\n mm15.Caption := 'Item15';\r\n mm15.ChildOrder := 16;\r\n mm15.Color := clNone;\r\n mm15.ElementClassName := 'mm_reg';\r\n mm15.ElementFont := efCSS;\r\n mm15.ElementPosition := epRelative;\r\n mm15.Flat := True;\r\n mm15.HeightStyle := ssAuto;\r\n mm15.HeightPercent := 100.000000000000000000;\r\n mm15.MaterialGlyph := 'adjust';\r\n mm15.MaterialGlyphSize := 30;\r\n mm15.ShowHint := True;\r\n mm15.Visible := False;\r\n mm15.WidthStyle := ssAuto;\r\n mm15.WidthPercent := 100.000000000000000000;\r\n SetEvent(mm15, Self, 'OnClick', 'mm1Click');\r\n SetEvent(mm15, Self, 'OnMouseMove', 'mm1MouseMove');\r\n SetEvent(mm15, Self, 'OnMouseLeave', 'mm1MouseLeave');\r\n mm16.SetParentComponent(div_mainmenucontainer);\r\n mm16.Name := 'mm16';\r\n mm16.Left := 0;\r\n mm16.Top := 480;\r\n mm16.Width := 169;\r\n mm16.Height := 30;\r\n mm16.Cursor := crHandPoint;\r\n mm16.Align := alTop;\r\n mm16.Alignment := taLeftJustify;\r\n mm16.Caption := 'Item16';\r\n mm16.ChildOrder := 17;\r\n mm16.Color := clNone;\r\n mm16.ElementClassName := 'mm_reg';\r\n mm16.ElementFont := efCSS;\r\n mm16.ElementPosition := epRelative;\r\n mm16.Flat := True;\r\n mm16.HeightStyle := ssAuto;\r\n mm16.HeightPercent := 100.000000000000000000;\r\n mm16.MaterialGlyph := 'adjust';\r\n mm16.MaterialGlyphSize := 30;\r\n mm16.ShowHint := True;\r\n mm16.Visible := False;\r\n mm16.WidthStyle := ssAuto;\r\n mm16.WidthPercent := 100.000000000000000000;\r\n SetEvent(mm16, Self, 'OnClick', 'mm1Click');\r\n SetEvent(mm16, Self, 'OnMouseMove', 'mm1MouseMove');\r\n SetEvent(mm16, Self, 'OnMouseLeave', 'mm1MouseLeave');\r\n mm17.SetParentComponent(div_mainmenucontainer);\r\n mm17.Name := 'mm17';\r\n mm17.Left := 0;\r\n mm17.Top := 510;\r\n mm17.Width := 169;\r\n mm17.Height := 30;\r\n mm17.Cursor := crHandPoint;\r\n mm17.Align := alTop;\r\n mm17.Alignment := taLeftJustify;\r\n mm17.Caption := 'Item17';\r\n mm17.ChildOrder := 18;\r\n mm17.Color := clNone;\r\n mm17.ElementClassName := 'mm_reg';\r\n mm17.ElementFont := efCSS;\r\n mm17.ElementPosition := epRelative;\r\n mm17.Flat := True;\r\n mm17.HeightStyle := ssAuto;\r\n mm17.HeightPercent := 100.000000000000000000;\r\n mm17.MaterialGlyph := 'adjust';\r\n mm17.MaterialGlyphSize := 30;\r\n mm17.ShowHint := True;\r\n mm17.Visible := False;\r\n mm17.WidthStyle := ssAuto;\r\n mm17.WidthPercent := 100.000000000000000000;\r\n SetEvent(mm17, Self, 'OnClick', 'mm1Click');\r\n SetEvent(mm17, Self, 'OnMouseMove', 'mm1MouseMove');\r\n SetEvent(mm17, Self, 'OnMouseLeave', 'mm1MouseLeave');\r\n mm18.SetParentComponent(div_mainmenucontainer);\r\n mm18.Name := 'mm18';\r\n mm18.Left := 0;\r\n mm18.Top := 540;\r\n mm18.Width := 169;\r\n mm18.Height := 30;\r\n mm18.Cursor := crHandPoint;\r\n mm18.Align := alTop;\r\n mm18.Alignment := taLeftJustify;\r\n mm18.Caption := 'Item18';\r\n mm18.ChildOrder := 19;\r\n mm18.Color := clNone;\r\n mm18.ElementClassName := 'mm_reg';\r\n mm18.ElementFont := efCSS;\r\n mm18.ElementPosition := epRelative;\r\n mm18.Flat := True;\r\n mm18.HeightStyle := ssAuto;\r\n mm18.HeightPercent := 100.000000000000000000;\r\n mm18.MaterialGlyph := 'adjust';\r\n mm18.MaterialGlyphSize := 30;\r\n mm18.ShowHint := True;\r\n mm18.Visible := False;\r\n mm18.WidthStyle := ssAuto;\r\n mm18.WidthPercent := 100.000000000000000000;\r\n SetEvent(mm18, Self, 'OnClick', 'mm1Click');\r\n SetEvent(mm18, Self, 'OnMouseMove', 'mm1MouseMove');\r\n SetEvent(mm18, Self, 'OnMouseLeave', 'mm1MouseLeave');\r\n mm19.SetParentComponent(div_mainmenucontainer);\r\n mm19.Name := 'mm19';\r\n mm19.Left := 0;\r\n mm19.Top := 570;\r\n mm19.Width := 169;\r\n mm19.Height := 30;\r\n mm19.Cursor := crHandPoint;\r\n mm19.Align := alTop;\r\n mm19.Alignment := taLeftJustify;\r\n mm19.Caption := 'Item19';\r\n mm19.ChildOrder := 20;\r\n mm19.Color := clNone;\r\n mm19.ElementClassName := 'mm_reg';\r\n mm19.ElementFont := efCSS;\r\n mm19.ElementPosition := epRelative;\r\n mm19.Flat := True;\r\n mm19.HeightStyle := ssAuto;\r\n mm19.HeightPercent := 100.000000000000000000;\r\n mm19.MaterialGlyph := 'adjust';\r\n mm19.MaterialGlyphSize := 30;\r\n mm19.ShowHint := True;\r\n mm19.Visible := False;\r\n mm19.WidthStyle := ssAuto;\r\n mm19.WidthPercent := 100.000000000000000000;\r\n SetEvent(mm19, Self, 'OnClick', 'mm1Click');\r\n SetEvent(mm19, Self, 'OnMouseMove', 'mm1MouseMove');\r\n SetEvent(mm19, Self, 'OnMouseLeave', 'mm1MouseLeave');\r\n mm20.SetParentComponent(div_mainmenucontainer);\r\n mm20.Name := 'mm20';\r\n mm20.Left := 0;\r\n mm20.Top := 600;\r\n mm20.Width := 169;\r\n mm20.Height := 30;\r\n mm20.Cursor := crHandPoint;\r\n mm20.Align := alTop;\r\n mm20.Alignment := taLeftJustify;\r\n mm20.Caption := 'Item20';\r\n mm20.ChildOrder := 21;\r\n mm20.Color := clNone;\r\n mm20.ElementClassName := 'mm_reg';\r\n mm20.ElementFont := efCSS;\r\n mm20.ElementPosition := epRelative;\r\n mm20.Flat := True;\r\n mm20.HeightStyle := ssAuto;\r\n mm20.HeightPercent := 100.000000000000000000;\r\n mm20.MaterialGlyph := 'adjust';\r\n mm20.MaterialGlyphSize := 30;\r\n mm20.ShowHint := True;\r\n mm20.Visible := False;\r\n mm20.WidthStyle := ssAuto;\r\n mm20.WidthPercent := 100.000000000000000000;\r\n SetEvent(mm20, Self, 'OnClick', 'mm1Click');\r\n SetEvent(mm20, Self, 'OnMouseMove', 'mm1MouseMove');\r\n SetEvent(mm20, Self, 'OnMouseLeave', 'mm1MouseLeave');\r\n btnLogout.SetParentComponent(pnlMainMenu);\r\n btnLogout.Name := 'btnLogout';\r\n btnLogout.Left := 0;\r\n btnLogout.Top := 1138;\r\n btnLogout.Width := 169;\r\n btnLogout.Height := 30;\r\n btnLogout.Cursor := crHandPoint;\r\n btnLogout.Hint := 'Logout';\r\n btnLogout.Align := alBottom;\r\n btnLogout.Alignment := taLeftJustify;\r\n btnLogout.Caption := '';\r\n btnLogout.ChildOrder := 23;\r\n btnLogout.Color := clNone;\r\n btnLogout.ElementClassName := 'mm_reg';\r\n btnLogout.ElementFont := efCSS;\r\n btnLogout.Flat := True;\r\n btnLogout.HeightStyle := ssAuto;\r\n btnLogout.HeightPercent := 100.000000000000000000;\r\n btnLogout.MaterialGlyphSize := 35;\r\n btnLogout.ShowHint := True;\r\n btnLogout.WidthStyle := ssAuto;\r\n btnLogout.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnLogout, Self, 'OnClick', 'WebBitBtn4Click');\r\n SetEvent(btnLogout, Self, 'OnMouseMove', 'mm1MouseMove');\r\n SetEvent(btnLogout, Self, 'OnMouseLeave', 'mm1MouseLeave');\r\n btnMenu_Settings.SetParentComponent(pnlMainMenu);\r\n btnMenu_Settings.Name := 'btnMenu_Settings';\r\n btnMenu_Settings.Left := 0;\r\n btnMenu_Settings.Top := 1108;\r\n btnMenu_Settings.Width := 169;\r\n btnMenu_Settings.Height := 30;\r\n btnMenu_Settings.Cursor := crHandPoint;\r\n btnMenu_Settings.Hint := 'Settings';\r\n btnMenu_Settings.Align := alBottom;\r\n btnMenu_Settings.Alignment := taLeftJustify;\r\n btnMenu_Settings.Caption := '';\r\n btnMenu_Settings.ChildOrder := 22;\r\n btnMenu_Settings.Color := clNone;\r\n btnMenu_Settings.ElementClassName := 'mm_reg';\r\n btnMenu_Settings.ElementFont := efCSS;\r\n btnMenu_Settings.Flat := True;\r\n btnMenu_Settings.HeightStyle := ssAuto;\r\n btnMenu_Settings.HeightPercent := 100.000000000000000000;\r\n btnMenu_Settings.MaterialGlyphSize := 35;\r\n btnMenu_Settings.ShowHint := True;\r\n btnMenu_Settings.WidthStyle := ssAuto;\r\n btnMenu_Settings.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnMenu_Settings, Self, 'OnClick', 'btnMenu_SettingsClick');\r\n SetEvent(btnMenu_Settings, Self, 'OnKeyDown', 'btnMenu_SettingsKeyDown');\r\n SetEvent(btnMenu_Settings, Self, 'OnMouseMove', 'mm1MouseMove');\r\n SetEvent(btnMenu_Settings, Self, 'OnMouseLeave', 'mm1MouseLeave');\r\n pnlFormArea.SetParentComponent(Self);\r\n pnlFormArea.Name := 'pnlFormArea';\r\n pnlFormArea.Left := 169;\r\n pnlFormArea.Top := 0;\r\n pnlFormArea.Width := 1250;\r\n pnlFormArea.Height := 1168;\r\n pnlFormArea.Align := alClient;\r\n pnlFormArea.BorderColor := clWhite;\r\n pnlFormArea.BorderStyle := bsNone;\r\n pnlFormArea.ChildOrder := 10;\r\n pnlFormArea.Color := clWhite;\r\n pnlFormArea.TabOrder := 1;\r\n pnlTopBanners.SetParentComponent(pnlFormArea);\r\n pnlTopBanners.Name := 'pnlTopBanners';\r\n pnlTopBanners.Left := 0;\r\n pnlTopBanners.Top := 0;\r\n pnlTopBanners.Width := 1250;\r\n pnlTopBanners.Height := 137;\r\n pnlTopBanners.ElementClassName := 'main_top_bar';\r\n pnlTopBanners.HeightStyle := ssAuto;\r\n pnlTopBanners.HeightPercent := 15.000000000000000000;\r\n pnlTopBanners.Align := alTop;\r\n pnlTopBanners.BorderStyle := bsNone;\r\n pnlTopBanners.ChildOrder := 2;\r\n pnlTopBanners.TabOrder := 0;\r\n pnlTopBanners.Visible := False;\r\n sbAlertBoxes.SetParentComponent(pnlTopBanners);\r\n sbAlertBoxes.Name := 'sbAlertBoxes';\r\n sbAlertBoxes.Left := 0;\r\n sbAlertBoxes.Top := 0;\r\n sbAlertBoxes.Width := 1250;\r\n sbAlertBoxes.Height := 137;\r\n sbAlertBoxes.ElementClassName := 'main_top_alert';\r\n sbAlertBoxes.Align := alClient;\r\n sbAlertBoxes.BorderStyle := bsNone;\r\n sbAlertBoxes.ChildOrder := 2;\r\n sbAlertBoxes.Color := 16185849;\r\n sbAlertBoxes.ScrollBars := ssNone;\r\n B1.SetParentComponent(sbAlertBoxes);\r\n B1.Name := 'B1';\r\n B1.Tag := -2;\r\n B1.Left := 217;\r\n B1.Top := 3;\r\n B1.Width := 132;\r\n B1.Height := 119;\r\n B1.ElementClassName := 'data_block';\r\n B1.HeightStyle := ssPercent;\r\n B1.HeightPercent := 90.000000000000000000;\r\n B1.BorderColor := clWhite;\r\n B1.ChildOrder := 5;\r\n B1.Color := 16185849;\r\n B1.Font.Charset := ANSI_CHARSET;\r\n B1.Font.Color := clBlack;\r\n B1.Font.Height := -13;\r\n B1.Font.Name := 'Tahoma';\r\n B1.Font.Style := [];\r\n B1.ParentFont := False;\r\n B1.TabOrder := 0;\r\n SetEvent(B1, Self, 'OnMouseLeave', 'B1MouseLeave');\r\n SetEvent(B1, Self, 'OnMouseMove', 'B1MouseMove');\r\n WebPanel70.SetParentComponent(B1);\r\n WebPanel70.Name := 'WebPanel70';\r\n WebPanel70.Left := 0;\r\n WebPanel70.Top := 0;\r\n WebPanel70.Width := 132;\r\n WebPanel70.Height := 28;\r\n WebPanel70.ElementClassName := 'block_top';\r\n WebPanel70.HeightStyle := ssAuto;\r\n WebPanel70.Align := alTop;\r\n WebPanel70.BorderStyle := bsNone;\r\n WebPanel70.ChildOrder := 2;\r\n WebPanel70.Color := clWhite;\r\n WebPanel70.DragMode := dmAutomatic;\r\n WebPanel70.ElementFont := efCSS;\r\n WebPanel70.TabOrder := 0;\r\n SetEvent(WebPanel70, Self, 'OnDblClick', 'WebLabel36DblClick');\r\n SetEvent(WebPanel70, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel70, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel70, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel36.SetParentComponent(WebPanel70);\r\n WebLabel36.Name := 'WebLabel36';\r\n WebLabel36.Left := 0;\r\n WebLabel36.Top := 0;\r\n WebLabel36.Width := 75;\r\n WebLabel36.Height := 28;\r\n WebLabel36.Cursor := crDrag;\r\n WebLabel36.Align := alLeft;\r\n WebLabel36.Alignment := taCenter;\r\n WebLabel36.Caption := 'Alert box 1';\r\n WebLabel36.DragMode := dmAutomatic;\r\n WebLabel36.ElementClassName := 'block_title';\r\n WebLabel36.ElementLabelClassName := 'block_title';\r\n WebLabel36.ElementFont := efCSS;\r\n WebLabel36.Font.Charset := ANSI_CHARSET;\r\n WebLabel36.Font.Color := clNavy;\r\n WebLabel36.Font.Height := -13;\r\n WebLabel36.Font.Name := 'Segoe UI Emoji';\r\n WebLabel36.Font.Style := [fsBold];\r\n WebLabel36.HeightPercent := 100.000000000000000000;\r\n WebLabel36.ParentFont := False;\r\n WebLabel36.WidthStyle := ssAuto;\r\n WebLabel36.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel36, Self, 'OnDblClick', 'WebLabel36DblClick');\r\n SetEvent(WebLabel36, Self, 'OnMouseMove', 'WebLabel36MouseMove');\r\n SetEvent(WebLabel36, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel36, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n M1.SetParentComponent(B1);\r\n M1.Name := 'M1';\r\n M1.Left := 0;\r\n M1.Top := 95;\r\n M1.Width := 132;\r\n M1.Height := 24;\r\n M1.Align := alBottom;\r\n M1.BorderStyle := bsNone;\r\n M1.ElementClassName := 'block_memo';\r\n M1.ElementFont := efCSS;\r\n M1.Font.Charset := ANSI_CHARSET;\r\n M1.Font.Color := clBlack;\r\n M1.Font.Height := -16;\r\n M1.Font.Name := 'Tahoma';\r\n M1.Font.Style := [];\r\n M1.HeightPercent := 100.000000000000000000;\r\n M1.ParentFont := False;\r\n M1.ReadOnly := True;\r\n M1.SelLength := 0;\r\n M1.SelStart := 0;\r\n M1.ShowFocus := False;\r\n M1.WidthPercent := 100.000000000000000000;\r\n SetEvent(M1, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M1, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M1, Self, 'OnDragOver', 'M1DragOver');\r\n htmlAlert5.SetParentComponent(B1);\r\n htmlAlert5.Name := 'htmlAlert5';\r\n htmlAlert5.Left := 0;\r\n htmlAlert5.Top := 65;\r\n htmlAlert5.Width := 132;\r\n htmlAlert5.Height := 30;\r\n htmlAlert5.Align := alBottom;\r\n htmlAlert5.ChildOrder := 2;\r\n htmlAlert5.Visible := False;\r\n SetEvent(htmlAlert5, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(htmlAlert5, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(htmlAlert5, Self, 'OnDragOver', 'M1DragOver');\r\n B2.SetParentComponent(sbAlertBoxes);\r\n B2.Name := 'B2';\r\n B2.Tag := -2;\r\n B2.Left := 431;\r\n B2.Top := 3;\r\n B2.Width := 132;\r\n B2.Height := 119;\r\n B2.ElementClassName := 'data_block';\r\n B2.HeightStyle := ssPercent;\r\n B2.HeightPercent := 90.000000000000000000;\r\n B2.BorderColor := clWhite;\r\n B2.ChildOrder := 5;\r\n B2.Color := 16185849;\r\n B2.Font.Charset := ANSI_CHARSET;\r\n B2.Font.Color := clBlack;\r\n B2.Font.Height := -13;\r\n B2.Font.Name := 'Tahoma';\r\n B2.Font.Style := [];\r\n B2.ParentFont := False;\r\n B2.TabOrder := 1;\r\n SetEvent(B2, Self, 'OnMouseLeave', 'B1MouseLeave');\r\n SetEvent(B2, Self, 'OnMouseMove', 'B1MouseMove');\r\n WebPanel6.SetParentComponent(B2);\r\n WebPanel6.Name := 'WebPanel6';\r\n WebPanel6.Left := 0;\r\n WebPanel6.Top := 0;\r\n WebPanel6.Width := 132;\r\n WebPanel6.Height := 28;\r\n WebPanel6.ElementClassName := 'block_top';\r\n WebPanel6.HeightStyle := ssAuto;\r\n WebPanel6.Align := alTop;\r\n WebPanel6.BorderStyle := bsNone;\r\n WebPanel6.ChildOrder := 2;\r\n WebPanel6.Color := clWhite;\r\n WebPanel6.DragMode := dmAutomatic;\r\n WebPanel6.ElementFont := efCSS;\r\n WebPanel6.TabOrder := 0;\r\n SetEvent(WebPanel6, Self, 'OnDblClick', 'WebLabel36DblClick');\r\n SetEvent(WebPanel6, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel6, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel6, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel1.SetParentComponent(WebPanel6);\r\n WebLabel1.Name := 'WebLabel1';\r\n WebLabel1.Left := 0;\r\n WebLabel1.Top := 0;\r\n WebLabel1.Width := 75;\r\n WebLabel1.Height := 28;\r\n WebLabel1.Cursor := crDrag;\r\n WebLabel1.Align := alLeft;\r\n WebLabel1.Alignment := taCenter;\r\n WebLabel1.Caption := 'Alert box 2';\r\n WebLabel1.Color := 16185849;\r\n WebLabel1.DragMode := dmAutomatic;\r\n WebLabel1.ElementClassName := 'block_title';\r\n WebLabel1.ElementLabelClassName := 'block_title';\r\n WebLabel1.ElementFont := efCSS;\r\n WebLabel1.Font.Charset := ANSI_CHARSET;\r\n WebLabel1.Font.Color := clNavy;\r\n WebLabel1.Font.Height := -13;\r\n WebLabel1.Font.Name := 'Segoe UI Emoji';\r\n WebLabel1.Font.Style := [fsBold];\r\n WebLabel1.HeightPercent := 100.000000000000000000;\r\n WebLabel1.ParentFont := False;\r\n WebLabel1.WidthStyle := ssAuto;\r\n WebLabel1.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel1, Self, 'OnDblClick', 'WebLabel36DblClick');\r\n SetEvent(WebLabel1, Self, 'OnMouseMove', 'WebLabel36MouseMove');\r\n SetEvent(WebLabel1, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel1, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n M2.SetParentComponent(B2);\r\n M2.Name := 'M2';\r\n M2.Left := 0;\r\n M2.Top := 95;\r\n M2.Width := 132;\r\n M2.Height := 24;\r\n M2.Align := alBottom;\r\n M2.BorderStyle := bsNone;\r\n M2.ElementClassName := 'block_memo';\r\n M2.ElementFont := efCSS;\r\n M2.Font.Charset := ANSI_CHARSET;\r\n M2.Font.Color := clBlack;\r\n M2.Font.Height := -16;\r\n M2.Font.Name := 'Tahoma';\r\n M2.Font.Style := [];\r\n M2.HeightPercent := 100.000000000000000000;\r\n M2.ParentFont := False;\r\n M2.ReadOnly := True;\r\n M2.SelLength := 0;\r\n M2.SelStart := 0;\r\n M2.ShowFocus := False;\r\n M2.WidthPercent := 100.000000000000000000;\r\n SetEvent(M2, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M2, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M2, Self, 'OnDragOver', 'M1DragOver');\r\n htmlAlert1.SetParentComponent(B2);\r\n htmlAlert1.Name := 'htmlAlert1';\r\n htmlAlert1.Left := 0;\r\n htmlAlert1.Top := 65;\r\n htmlAlert1.Width := 132;\r\n htmlAlert1.Height := 30;\r\n htmlAlert1.Align := alBottom;\r\n htmlAlert1.ChildOrder := 2;\r\n htmlAlert1.Visible := False;\r\n SetEvent(htmlAlert1, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(htmlAlert1, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(htmlAlert1, Self, 'OnDragOver', 'M1DragOver');\r\n B3.SetParentComponent(sbAlertBoxes);\r\n B3.Name := 'B3';\r\n B3.Tag := -2;\r\n B3.Left := 637;\r\n B3.Top := 9;\r\n B3.Width := 132;\r\n B3.Height := 119;\r\n B3.ElementClassName := 'data_block';\r\n B3.HeightStyle := ssPercent;\r\n B3.HeightPercent := 90.000000000000000000;\r\n B3.BorderColor := clWhite;\r\n B3.ChildOrder := 5;\r\n B3.Color := 16185849;\r\n B3.Font.Charset := ANSI_CHARSET;\r\n B3.Font.Color := clBlack;\r\n B3.Font.Height := -13;\r\n B3.Font.Name := 'Tahoma';\r\n B3.Font.Style := [];\r\n B3.ParentFont := False;\r\n B3.TabOrder := 2;\r\n SetEvent(B3, Self, 'OnMouseLeave', 'B1MouseLeave');\r\n SetEvent(B3, Self, 'OnMouseMove', 'B1MouseMove');\r\n WebPanel8.SetParentComponent(B3);\r\n WebPanel8.Name := 'WebPanel8';\r\n WebPanel8.Left := 0;\r\n WebPanel8.Top := 0;\r\n WebPanel8.Width := 132;\r\n WebPanel8.Height := 28;\r\n WebPanel8.ElementClassName := 'block_top';\r\n WebPanel8.HeightStyle := ssAuto;\r\n WebPanel8.Align := alTop;\r\n WebPanel8.BorderStyle := bsNone;\r\n WebPanel8.ChildOrder := 2;\r\n WebPanel8.Color := clWhite;\r\n WebPanel8.DragMode := dmAutomatic;\r\n WebPanel8.ElementFont := efCSS;\r\n WebPanel8.TabOrder := 0;\r\n SetEvent(WebPanel8, Self, 'OnDblClick', 'WebLabel36DblClick');\r\n SetEvent(WebPanel8, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel8, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel8, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel2.SetParentComponent(WebPanel8);\r\n WebLabel2.Name := 'WebLabel2';\r\n WebLabel2.Left := 0;\r\n WebLabel2.Top := 0;\r\n WebLabel2.Width := 75;\r\n WebLabel2.Height := 28;\r\n WebLabel2.Cursor := crDrag;\r\n WebLabel2.Align := alLeft;\r\n WebLabel2.Alignment := taCenter;\r\n WebLabel2.Caption := 'Alert box 3';\r\n WebLabel2.Color := 16185849;\r\n WebLabel2.DragMode := dmAutomatic;\r\n WebLabel2.ElementClassName := 'block_title';\r\n WebLabel2.ElementLabelClassName := 'block_title';\r\n WebLabel2.ElementFont := efCSS;\r\n WebLabel2.Font.Charset := ANSI_CHARSET;\r\n WebLabel2.Font.Color := clNavy;\r\n WebLabel2.Font.Height := -13;\r\n WebLabel2.Font.Name := 'Segoe UI Emoji';\r\n WebLabel2.Font.Style := [fsBold];\r\n WebLabel2.HeightPercent := 100.000000000000000000;\r\n WebLabel2.ParentFont := False;\r\n WebLabel2.WidthStyle := ssAuto;\r\n WebLabel2.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel2, Self, 'OnDblClick', 'WebLabel36DblClick');\r\n SetEvent(WebLabel2, Self, 'OnMouseMove', 'WebLabel36MouseMove');\r\n SetEvent(WebLabel2, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel2, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n M3.SetParentComponent(B3);\r\n M3.Name := 'M3';\r\n M3.Left := 0;\r\n M3.Top := 95;\r\n M3.Width := 132;\r\n M3.Height := 24;\r\n M3.Align := alBottom;\r\n M3.BorderStyle := bsNone;\r\n M3.ElementClassName := 'block_memo';\r\n M3.ElementFont := efCSS;\r\n M3.Font.Charset := ANSI_CHARSET;\r\n M3.Font.Color := clBlack;\r\n M3.Font.Height := -16;\r\n M3.Font.Name := 'Tahoma';\r\n M3.Font.Style := [];\r\n M3.HeightPercent := 100.000000000000000000;\r\n M3.ParentFont := False;\r\n M3.ReadOnly := True;\r\n M3.SelLength := 0;\r\n M3.SelStart := 0;\r\n M3.ShowFocus := False;\r\n M3.WidthPercent := 100.000000000000000000;\r\n SetEvent(M3, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M3, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M3, Self, 'OnDragOver', 'M1DragOver');\r\n htmlAlert2.SetParentComponent(B3);\r\n htmlAlert2.Name := 'htmlAlert2';\r\n htmlAlert2.Left := 0;\r\n htmlAlert2.Top := 65;\r\n htmlAlert2.Width := 132;\r\n htmlAlert2.Height := 30;\r\n htmlAlert2.Align := alBottom;\r\n htmlAlert2.ChildOrder := 2;\r\n htmlAlert2.Visible := False;\r\n SetEvent(htmlAlert2, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(htmlAlert2, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(htmlAlert2, Self, 'OnDragOver', 'M1DragOver');\r\n B5.SetParentComponent(sbAlertBoxes);\r\n B5.Name := 'B5';\r\n B5.Tag := -2;\r\n B5.Left := 981;\r\n B5.Top := 7;\r\n B5.Width := 132;\r\n B5.Height := 119;\r\n B5.ElementClassName := 'data_block';\r\n B5.HeightStyle := ssPercent;\r\n B5.HeightPercent := 90.000000000000000000;\r\n B5.BorderColor := clWhite;\r\n B5.ChildOrder := 5;\r\n B5.Color := 16185849;\r\n B5.Font.Charset := ANSI_CHARSET;\r\n B5.Font.Color := clBlack;\r\n B5.Font.Height := -13;\r\n B5.Font.Name := 'Tahoma';\r\n B5.Font.Style := [];\r\n B5.ParentFont := False;\r\n B5.TabOrder := 3;\r\n SetEvent(B5, Self, 'OnMouseLeave', 'B1MouseLeave');\r\n SetEvent(B5, Self, 'OnMouseMove', 'B1MouseMove');\r\n WebPanel12.SetParentComponent(B5);\r\n WebPanel12.Name := 'WebPanel12';\r\n WebPanel12.Left := 0;\r\n WebPanel12.Top := 0;\r\n WebPanel12.Width := 132;\r\n WebPanel12.Height := 28;\r\n WebPanel12.ElementClassName := 'block_top';\r\n WebPanel12.HeightStyle := ssAuto;\r\n WebPanel12.Align := alTop;\r\n WebPanel12.BorderStyle := bsNone;\r\n WebPanel12.ChildOrder := 2;\r\n WebPanel12.Color := clWhite;\r\n WebPanel12.DragMode := dmAutomatic;\r\n WebPanel12.ElementFont := efCSS;\r\n WebPanel12.TabOrder := 0;\r\n SetEvent(WebPanel12, Self, 'OnDblClick', 'WebLabel36DblClick');\r\n SetEvent(WebPanel12, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel12, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel12, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel4.SetParentComponent(WebPanel12);\r\n WebLabel4.Name := 'WebLabel4';\r\n WebLabel4.Left := 0;\r\n WebLabel4.Top := 0;\r\n WebLabel4.Width := 75;\r\n WebLabel4.Height := 28;\r\n WebLabel4.Cursor := crDrag;\r\n WebLabel4.Align := alLeft;\r\n WebLabel4.Alignment := taCenter;\r\n WebLabel4.Caption := 'Alert box 5';\r\n WebLabel4.Color := 16185849;\r\n WebLabel4.DragMode := dmAutomatic;\r\n WebLabel4.ElementClassName := 'block_title';\r\n WebLabel4.ElementLabelClassName := 'block_title';\r\n WebLabel4.ElementFont := efCSS;\r\n WebLabel4.Font.Charset := ANSI_CHARSET;\r\n WebLabel4.Font.Color := clNavy;\r\n WebLabel4.Font.Height := -13;\r\n WebLabel4.Font.Name := 'Segoe UI Emoji';\r\n WebLabel4.Font.Style := [fsBold];\r\n WebLabel4.HeightPercent := 100.000000000000000000;\r\n WebLabel4.ParentFont := False;\r\n WebLabel4.WidthStyle := ssAuto;\r\n WebLabel4.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel4, Self, 'OnDblClick', 'WebLabel36DblClick');\r\n SetEvent(WebLabel4, Self, 'OnMouseMove', 'WebLabel36MouseMove');\r\n SetEvent(WebLabel4, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel4, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n M5.SetParentComponent(B5);\r\n M5.Name := 'M5';\r\n M5.Left := 0;\r\n M5.Top := 95;\r\n M5.Width := 132;\r\n M5.Height := 24;\r\n M5.Align := alBottom;\r\n M5.BorderStyle := bsNone;\r\n M5.ElementClassName := 'block_memo';\r\n M5.ElementFont := efCSS;\r\n M5.Font.Charset := ANSI_CHARSET;\r\n M5.Font.Color := clBlack;\r\n M5.Font.Height := -16;\r\n M5.Font.Name := 'Tahoma';\r\n M5.Font.Style := [];\r\n M5.HeightPercent := 100.000000000000000000;\r\n M5.ParentFont := False;\r\n M5.ReadOnly := True;\r\n M5.SelLength := 0;\r\n M5.SelStart := 0;\r\n M5.ShowFocus := False;\r\n M5.WidthPercent := 100.000000000000000000;\r\n SetEvent(M5, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M5, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M5, Self, 'OnDragOver', 'M1DragOver');\r\n htmlAlert4.SetParentComponent(B5);\r\n htmlAlert4.Name := 'htmlAlert4';\r\n htmlAlert4.Left := 0;\r\n htmlAlert4.Top := 65;\r\n htmlAlert4.Width := 132;\r\n htmlAlert4.Height := 30;\r\n htmlAlert4.Align := alBottom;\r\n htmlAlert4.ChildOrder := 2;\r\n htmlAlert4.Visible := False;\r\n SetEvent(htmlAlert4, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(htmlAlert4, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(htmlAlert4, Self, 'OnDragOver', 'M1DragOver');\r\n B4.SetParentComponent(sbAlertBoxes);\r\n B4.Name := 'B4';\r\n B4.Tag := -2;\r\n B4.Left := 794;\r\n B4.Top := 7;\r\n B4.Width := 132;\r\n B4.Height := 119;\r\n B4.ElementClassName := 'data_block';\r\n B4.HeightStyle := ssPercent;\r\n B4.HeightPercent := 90.000000000000000000;\r\n B4.BorderColor := clWhite;\r\n B4.ChildOrder := 5;\r\n B4.Color := 16185849;\r\n B4.Font.Charset := ANSI_CHARSET;\r\n B4.Font.Color := clBlack;\r\n B4.Font.Height := -13;\r\n B4.Font.Name := 'Tahoma';\r\n B4.Font.Style := [];\r\n B4.ParentFont := False;\r\n B4.TabOrder := 4;\r\n SetEvent(B4, Self, 'OnMouseLeave', 'B1MouseLeave');\r\n SetEvent(B4, Self, 'OnMouseMove', 'B1MouseMove');\r\n WebPanel10.SetParentComponent(B4);\r\n WebPanel10.Name := 'WebPanel10';\r\n WebPanel10.Left := 0;\r\n WebPanel10.Top := 0;\r\n WebPanel10.Width := 132;\r\n WebPanel10.Height := 28;\r\n WebPanel10.ElementClassName := 'block_top';\r\n WebPanel10.HeightStyle := ssAuto;\r\n WebPanel10.Align := alTop;\r\n WebPanel10.BorderStyle := bsNone;\r\n WebPanel10.ChildOrder := 2;\r\n WebPanel10.Color := clWhite;\r\n WebPanel10.DragMode := dmAutomatic;\r\n WebPanel10.ElementFont := efCSS;\r\n WebPanel10.TabOrder := 0;\r\n SetEvent(WebPanel10, Self, 'OnDblClick', 'WebLabel36DblClick');\r\n SetEvent(WebPanel10, Self, 'OnMouseMove', 'WebPanel70MouseMove');\r\n SetEvent(WebPanel10, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebPanel10, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel3.SetParentComponent(WebPanel10);\r\n WebLabel3.Name := 'WebLabel3';\r\n WebLabel3.Left := 0;\r\n WebLabel3.Top := 0;\r\n WebLabel3.Width := 75;\r\n WebLabel3.Height := 28;\r\n WebLabel3.Cursor := crDrag;\r\n WebLabel3.Align := alLeft;\r\n WebLabel3.Alignment := taCenter;\r\n WebLabel3.Caption := 'Alert box 4';\r\n WebLabel3.Color := 16185849;\r\n WebLabel3.DragMode := dmAutomatic;\r\n WebLabel3.ElementClassName := 'block_title';\r\n WebLabel3.ElementLabelClassName := 'block_title';\r\n WebLabel3.ElementFont := efCSS;\r\n WebLabel3.Font.Charset := ANSI_CHARSET;\r\n WebLabel3.Font.Color := clNavy;\r\n WebLabel3.Font.Height := -13;\r\n WebLabel3.Font.Name := 'Segoe UI Emoji';\r\n WebLabel3.Font.Style := [fsBold];\r\n WebLabel3.HeightPercent := 100.000000000000000000;\r\n WebLabel3.ParentFont := False;\r\n WebLabel3.WidthStyle := ssAuto;\r\n WebLabel3.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel3, Self, 'OnDblClick', 'WebLabel36DblClick');\r\n SetEvent(WebLabel3, Self, 'OnMouseMove', 'WebLabel36MouseMove');\r\n SetEvent(WebLabel3, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(WebLabel3, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n M4.SetParentComponent(B4);\r\n M4.Name := 'M4';\r\n M4.Left := 0;\r\n M4.Top := 95;\r\n M4.Width := 132;\r\n M4.Height := 24;\r\n M4.Align := alBottom;\r\n M4.BorderStyle := bsNone;\r\n M4.ElementClassName := 'block_memo';\r\n M4.ElementFont := efCSS;\r\n M4.Font.Charset := ANSI_CHARSET;\r\n M4.Font.Color := clBlack;\r\n M4.Font.Height := -16;\r\n M4.Font.Name := 'Tahoma';\r\n M4.Font.Style := [];\r\n M4.HeightPercent := 100.000000000000000000;\r\n M4.ParentFont := False;\r\n M4.ReadOnly := True;\r\n M4.SelLength := 0;\r\n M4.SelStart := 0;\r\n M4.ShowFocus := False;\r\n M4.WidthPercent := 100.000000000000000000;\r\n SetEvent(M4, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(M4, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(M4, Self, 'OnDragOver', 'M1DragOver');\r\n htmlAlert3.SetParentComponent(B4);\r\n htmlAlert3.Name := 'htmlAlert3';\r\n htmlAlert3.Left := 0;\r\n htmlAlert3.Top := 65;\r\n htmlAlert3.Width := 132;\r\n htmlAlert3.Height := 30;\r\n htmlAlert3.Align := alBottom;\r\n htmlAlert3.ChildOrder := 2;\r\n htmlAlert3.Visible := False;\r\n SetEvent(htmlAlert3, Self, 'OnMouseMove', 'M1MouseMove');\r\n SetEvent(htmlAlert3, Self, 'OnDragDrop', '_BlockDragDrop');\r\n SetEvent(htmlAlert3, Self, 'OnDragOver', 'M1DragOver');\r\n WebPanel5.SetParentComponent(pnlFormArea);\r\n WebPanel5.Name := 'WebPanel5';\r\n WebPanel5.Left := 0;\r\n WebPanel5.Top := 137;\r\n WebPanel5.Width := 1250;\r\n WebPanel5.Height := 18;\r\n WebPanel5.ElementClassName := 'main_top_currentform';\r\n WebPanel5.HeightStyle := ssAuto;\r\n WebPanel5.Align := alTop;\r\n WebPanel5.BorderStyle := bsNone;\r\n WebPanel5.ChildOrder := 17;\r\n WebPanel5.TabOrder := 1;\r\n lblLocation.SetParentComponent(WebPanel5);\r\n lblLocation.Name := 'lblLocation';\r\n lblLocation.Left := 0;\r\n lblLocation.Top := 0;\r\n lblLocation.Width := 4;\r\n lblLocation.Height := 16;\r\n lblLocation.ElementLabelClassName := 'text_normal';\r\n lblLocation.ElementFont := efCSS;\r\n lblLocation.Font.Charset := DEFAULT_CHARSET;\r\n lblLocation.Font.Color := clGray;\r\n lblLocation.Font.Height := -13;\r\n lblLocation.Font.Name := 'Tahoma';\r\n lblLocation.Font.Style := [fsBold];\r\n lblLocation.HeightPercent := 100.000000000000000000;\r\n lblLocation.ParentFont := False;\r\n lblLocation.WidthPercent := 100.000000000000000000;\r\n pnlControlHolder.SetParentComponent(pnlFormArea);\r\n pnlControlHolder.Name := 'pnlControlHolder';\r\n pnlControlHolder.Left := 73;\r\n pnlControlHolder.Top := 174;\r\n pnlControlHolder.Width := 853;\r\n pnlControlHolder.Height := 389;\r\n pnlControlHolder.ChildOrder := 23;\r\n pnlControlHolder.TabOrder := 2;\r\n pnlControlHolder.Visible := False;\r\n lbImage_Y_X.SetParentComponent(pnlControlHolder);\r\n lbImage_Y_X.Name := 'lbImage_Y_X';\r\n lbImage_Y_X.Left := 216;\r\n lbImage_Y_X.Top := 342;\r\n lbImage_Y_X.Width := 94;\r\n lbImage_Y_X.Height := 19;\r\n lbImage_Y_X.Caption := 'Image_Y_X';\r\n lbImage_Y_X.ElementClassName := 'diagram_hint';\r\n lbImage_Y_X.ElementFont := efCSS;\r\n lbImage_Y_X.Font.Charset := DEFAULT_CHARSET;\r\n lbImage_Y_X.Font.Color := clWindowText;\r\n lbImage_Y_X.Font.Height := -16;\r\n lbImage_Y_X.Font.Name := 'Tahoma';\r\n lbImage_Y_X.Font.Style := [fsBold];\r\n lbImage_Y_X.HeightStyle := ssAuto;\r\n lbImage_Y_X.HeightPercent := 100.000000000000000000;\r\n lbImage_Y_X.ParentFont := False;\r\n lbImage_Y_X.WordWrap := True;\r\n lbImage_Y_X.WidthPercent := 100.000000000000000000;\r\n lblMemodataText.SetParentComponent(pnlControlHolder);\r\n lblMemodataText.Name := 'lblMemodataText';\r\n lblMemodataText.Left := 627;\r\n lblMemodataText.Top := 254;\r\n lblMemodataText.Width := 82;\r\n lblMemodataText.Height := 13;\r\n lblMemodataText.AutoSize := False;\r\n lblMemodataText.Caption := 'lblMemodataText';\r\n lblMemodataText.ElementClassName := 'text_autoheight';\r\n lblMemodataText.ElementLabelClassName := 'text_autoheight';\r\n lblMemodataText.HeightStyle := ssAuto;\r\n lblMemodataText.HeightPercent := 100.000000000000000000;\r\n lblMemodataText.Visible := False;\r\n lblMemodataText.WordWrap := True;\r\n lblMemodataText.WidthPercent := 100.000000000000000000;\r\n btnDesign_Hide.SetParentComponent(pnlControlHolder);\r\n btnDesign_Hide.Name := 'btnDesign_Hide';\r\n btnDesign_Hide.Left := 35;\r\n btnDesign_Hide.Top := 33;\r\n btnDesign_Hide.Width := 22;\r\n btnDesign_Hide.Height := 24;\r\n btnDesign_Hide.Cursor := crHandPoint;\r\n btnDesign_Hide.Hint := 'Hide / Show';\r\n btnDesign_Hide.Color := clNone;\r\n btnDesign_Hide.ElementClassName := 'btn btn-warning';\r\n btnDesign_Hide.Flat := True;\r\n btnDesign_Hide.HeightPercent := 100.000000000000000000;\r\n btnDesign_Hide.MaterialGlyph := 'visibility_off';\r\n btnDesign_Hide.ShowHint := True;\r\n btnDesign_Hide.TabOrder := 0;\r\n btnDesign_Hide.Visible := False;\r\n btnDesign_Hide.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnDesign_Hide, Self, 'OnClick', 'btnDesign_HideClick');\r\n btnClearBlockData.SetParentComponent(pnlControlHolder);\r\n btnClearBlockData.Name := 'btnClearBlockData';\r\n btnClearBlockData.Left := 33;\r\n btnClearBlockData.Top := 86;\r\n btnClearBlockData.Width := 22;\r\n btnClearBlockData.Height := 24;\r\n btnClearBlockData.Cursor := crHandPoint;\r\n btnClearBlockData.Hint := 'Clear';\r\n btnClearBlockData.Color := clNone;\r\n btnClearBlockData.Flat := True;\r\n btnClearBlockData.HeightPercent := 100.000000000000000000;\r\n btnClearBlockData.MaterialGlyph := 'delete_sweep';\r\n btnClearBlockData.ShowHint := True;\r\n btnClearBlockData.TabOrder := 1;\r\n btnClearBlockData.Visible := False;\r\n btnClearBlockData.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnClearBlockData, Self, 'OnClick', 'btnClearBlockDataClick');\r\n btnDefaultBlockData.SetParentComponent(pnlControlHolder);\r\n btnDefaultBlockData.Name := 'btnDefaultBlockData';\r\n btnDefaultBlockData.Left := 61;\r\n btnDefaultBlockData.Top := 116;\r\n btnDefaultBlockData.Width := 22;\r\n btnDefaultBlockData.Height := 24;\r\n btnDefaultBlockData.Cursor := crHandPoint;\r\n btnDefaultBlockData.Hint := 'Default Value';\r\n btnDefaultBlockData.Color := clNone;\r\n btnDefaultBlockData.Flat := True;\r\n btnDefaultBlockData.HeightPercent := 100.000000000000000000;\r\n btnDefaultBlockData.MaterialGlyph := 'replay';\r\n btnDefaultBlockData.ShowHint := True;\r\n btnDefaultBlockData.TabOrder := 2;\r\n btnDefaultBlockData.Visible := False;\r\n btnDefaultBlockData.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnDefaultBlockData, Self, 'OnClick', 'btnDefaultBlockDataClick');\r\n btnDesignGrid.SetParentComponent(pnlControlHolder);\r\n btnDesignGrid.Name := 'btnDesignGrid';\r\n btnDesignGrid.Left := 338;\r\n btnDesignGrid.Top := 260;\r\n btnDesignGrid.Width := 22;\r\n btnDesignGrid.Height := 24;\r\n btnDesignGrid.Cursor := crHandPoint;\r\n btnDesignGrid.Hint := 'Grid Columns';\r\n btnDesignGrid.Caption := '';\r\n btnDesignGrid.Color := clNone;\r\n btnDesignGrid.ElementClassName := 'btn_icon';\r\n btnDesignGrid.ElementFont := efCSS;\r\n btnDesignGrid.Flat := True;\r\n btnDesignGrid.HeightPercent := 100.000000000000000000;\r\n btnDesignGrid.ShowHint := True;\r\n btnDesignGrid.TabOrder := 3;\r\n btnDesignGrid.Visible := False;\r\n btnDesignGrid.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnDesignGrid, Self, 'OnClick', 'btnDesignGridClick');\r\n btnQuickPickListMoreItems.SetParentComponent(pnlControlHolder);\r\n btnQuickPickListMoreItems.Name := 'btnQuickPickListMoreItems';\r\n btnQuickPickListMoreItems.Left := 776;\r\n btnQuickPickListMoreItems.Top := 86;\r\n btnQuickPickListMoreItems.Width := 22;\r\n btnQuickPickListMoreItems.Height := 27;\r\n btnQuickPickListMoreItems.Hint := 'More Items';\r\n btnQuickPickListMoreItems.Align := alCustom;\r\n btnQuickPickListMoreItems.Color := clNone;\r\n btnQuickPickListMoreItems.Enabled := False;\r\n btnQuickPickListMoreItems.ElementClassName := 'btn btn-light';\r\n btnQuickPickListMoreItems.HeightPercent := 100.000000000000000000;\r\n btnQuickPickListMoreItems.MaterialGlyph := 'more_vert';\r\n btnQuickPickListMoreItems.ShowHint := True;\r\n btnQuickPickListMoreItems.TabOrder := 4;\r\n btnQuickPickListMoreItems.WidthPercent := 100.000000000000000000;\r\n btnDBField_Settings.SetParentComponent(pnlControlHolder);\r\n btnDBField_Settings.Name := 'btnDBField_Settings';\r\n btnDBField_Settings.Left := 61;\r\n btnDBField_Settings.Top := 86;\r\n btnDBField_Settings.Width := 22;\r\n btnDBField_Settings.Height := 24;\r\n btnDBField_Settings.Cursor := crHandPoint;\r\n btnDBField_Settings.Hint := 'DB Field Settings';\r\n btnDBField_Settings.Align := alCustom;\r\n btnDBField_Settings.Color := clNone;\r\n btnDBField_Settings.Flat := True;\r\n btnDBField_Settings.HeightPercent := 100.000000000000000000;\r\n btnDBField_Settings.MaterialGlyph := 'settings';\r\n btnDBField_Settings.ShowHint := True;\r\n btnDBField_Settings.TabOrder := 5;\r\n btnDBField_Settings.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnDBField_Settings, Self, 'OnClick', '_BlockShowDBFieldSettings');\r\n btnInsertCurrentDate.SetParentComponent(pnlControlHolder);\r\n btnInsertCurrentDate.Name := 'btnInsertCurrentDate';\r\n btnInsertCurrentDate.Left := 33;\r\n btnInsertCurrentDate.Top := 120;\r\n btnInsertCurrentDate.Width := 22;\r\n btnInsertCurrentDate.Height := 24;\r\n btnInsertCurrentDate.Cursor := crHandPoint;\r\n btnInsertCurrentDate.Hint := 'Current Date';\r\n btnInsertCurrentDate.Color := clNone;\r\n btnInsertCurrentDate.Flat := True;\r\n btnInsertCurrentDate.HeightPercent := 100.000000000000000000;\r\n btnInsertCurrentDate.MaterialGlyph := 'today';\r\n btnInsertCurrentDate.ShowHint := True;\r\n btnInsertCurrentDate.TabOrder := 6;\r\n btnInsertCurrentDate.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnInsertCurrentDate, Self, 'OnClick', 'btnInsertCurrentDateClick');\r\n btnQPKLDatePicker.SetParentComponent(pnlControlHolder);\r\n btnQPKLDatePicker.Name := 'btnQPKLDatePicker';\r\n btnQPKLDatePicker.Left := 61;\r\n btnQPKLDatePicker.Top := 150;\r\n btnQPKLDatePicker.Width := 22;\r\n btnQPKLDatePicker.Height := 24;\r\n btnQPKLDatePicker.Cursor := crHandPoint;\r\n btnQPKLDatePicker.Hint := 'Calendar';\r\n btnQPKLDatePicker.Color := clNone;\r\n btnQPKLDatePicker.Flat := True;\r\n btnQPKLDatePicker.HeightPercent := 100.000000000000000000;\r\n btnQPKLDatePicker.MaterialGlyph := 'date_range';\r\n btnQPKLDatePicker.ShowHint := True;\r\n btnQPKLDatePicker.TabOrder := 7;\r\n btnQPKLDatePicker.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnQPKLDatePicker, Self, 'OnClick', 'btnQPKLDatePickerClick');\r\n cbPickListType.SetParentComponent(pnlControlHolder);\r\n cbPickListType.Name := 'cbPickListType';\r\n cbPickListType.Left := 26;\r\n cbPickListType.Top := 324;\r\n cbPickListType.Width := 85;\r\n cbPickListType.Height := 21;\r\n cbPickListType.Color := 15461355;\r\n cbPickListType.ElementClassName := 'BOX_NO_BORDER_BLOCK_TITLE_COLOR';\r\n cbPickListType.HeightPercent := 100.000000000000000000;\r\n cbPickListType.ShowFocus := False;\r\n cbPickListType.ShowHint := True;\r\n cbPickListType.Text := 'List>Memo';\r\n cbPickListType.WidthPercent := 20.000000000000000000;\r\n SetEvent(cbPickListType, Self, 'OnChange', 'cbPickListTypeChange');\r\n SetEvent(cbPickListType, Self, 'OnMouseMove', 'cbPickListTypeMouseMove');\r\n cbPickListType.ItemIndex := 3;\r\n cbPickListType.Items.BeginUpdate;\r\n try\r\n cbPickListType.Items.Clear;\r\n cbPickListType.Items.Add('Pick List');\r\n cbPickListType.Items.Add('Multi Level');\r\n cbPickListType.Items.Add('Form');\r\n cbPickListType.Items.Add('List>Memo');\r\n cbPickListType.Items.Add('List>Grid');\r\n cbPickListType.Items.Add('Custom');\r\n cbPickListType.Items.Add('None');\r\n finally\r\n cbPickListType.Items.EndUpdate;\r\n end;\r\n cldQPKLCalendar.SetParentComponent(pnlControlHolder);\r\n cldQPKLCalendar.Name := 'cldQPKLCalendar';\r\n cldQPKLCalendar.Left := 106;\r\n cldQPKLCalendar.Top := 93;\r\n cldQPKLCalendar.Width := 181;\r\n cldQPKLCalendar.Height := 143;\r\n cldQPKLCalendar.ChildOrder := 8;\r\n cldQPKLCalendar.Visible := False;\r\n cldQPKLCalendar.TabOrder := 9;\r\n cldQPKLCalendar.SelectedDate := 44767.000000000000000000;\r\n cldQPKLCalendar.Year := 2022;\r\n cldQPKLCalendar.Month := 7;\r\n cldQPKLCalendar.Day := 25;\r\n cldQPKLCalendar.NameOfMonths.January := 'January';\r\n cldQPKLCalendar.NameOfMonths.February := 'February';\r\n cldQPKLCalendar.NameOfMonths.March := 'March';\r\n cldQPKLCalendar.NameOfMonths.April := 'April';\r\n cldQPKLCalendar.NameOfMonths.May := 'May';\r\n cldQPKLCalendar.NameOfMonths.June := 'June';\r\n cldQPKLCalendar.NameOfMonths.July := 'July';\r\n cldQPKLCalendar.NameOfMonths.August := 'August';\r\n cldQPKLCalendar.NameOfMonths.September := 'September';\r\n cldQPKLCalendar.NameOfMonths.October := 'October';\r\n cldQPKLCalendar.NameOfMonths.November := 'November';\r\n cldQPKLCalendar.NameOfMonths.December := 'December';\r\n cldQPKLCalendar.NameOfDays.Sunday := 'Sun';\r\n cldQPKLCalendar.NameOfDays.Monday := 'Mon';\r\n cldQPKLCalendar.NameOfDays.Tuesday := 'Tue';\r\n cldQPKLCalendar.NameOfDays.Wednesday := 'Wed';\r\n cldQPKLCalendar.NameOfDays.Thursday := 'Thu';\r\n cldQPKLCalendar.NameOfDays.Friday := 'Fri';\r\n cldQPKLCalendar.NameOfDays.Saturday := 'Sat';\r\n SetEvent(cldQPKLCalendar, Self, 'OnDateSelected', 'cldQPKLCalendarDateSelected');\r\n SetEvent(cldQPKLCalendar, Self, 'OnMouseLeave', 'cldQPKLCalendarMouseLeave');\r\n WebPanel174.SetParentComponent(pnlControlHolder);\r\n WebPanel174.Name := 'WebPanel174';\r\n WebPanel174.Left := 106;\r\n WebPanel174.Top := 16;\r\n WebPanel174.Width := 300;\r\n WebPanel174.Height := 35;\r\n WebPanel174.Caption := 'WebPanel174';\r\n WebPanel174.ChildOrder := 3;\r\n WebPanel174.TabOrder := 10;\r\n edtDesign_BlockTitleEdit.SetParentComponent(WebPanel174);\r\n edtDesign_BlockTitleEdit.Name := 'edtDesign_BlockTitleEdit';\r\n edtDesign_BlockTitleEdit.Left := 0;\r\n edtDesign_BlockTitleEdit.Top := 0;\r\n edtDesign_BlockTitleEdit.Width := 300;\r\n edtDesign_BlockTitleEdit.Height := 35;\r\n edtDesign_BlockTitleEdit.Align := alClient;\r\n edtDesign_BlockTitleEdit.BorderStyle := bsNone;\r\n edtDesign_BlockTitleEdit.ChildOrder := 2;\r\n edtDesign_BlockTitleEdit.Font.Charset := DEFAULT_CHARSET;\r\n edtDesign_BlockTitleEdit.Font.Color := clRed;\r\n edtDesign_BlockTitleEdit.Font.Height := -19;\r\n edtDesign_BlockTitleEdit.Font.Name := 'Tahoma';\r\n edtDesign_BlockTitleEdit.Font.Style := [fsBold];\r\n edtDesign_BlockTitleEdit.HeightPercent := 100.000000000000000000;\r\n edtDesign_BlockTitleEdit.ParentFont := False;\r\n edtDesign_BlockTitleEdit.ShowFocus := False;\r\n edtDesign_BlockTitleEdit.Text := 'edtDesign_BlockTitleEdit';\r\n edtDesign_BlockTitleEdit.Visible := False;\r\n edtDesign_BlockTitleEdit.WidthPercent := 100.000000000000000000;\r\n SetEvent(edtDesign_BlockTitleEdit, Self, 'OnChange', 'edtDesign_BlockTitleEditChange');\r\n SetEvent(edtDesign_BlockTitleEdit, Self, 'OnDblClick', 'edtDesign_BlockTitleEditDblClick');\r\n pnlQPKLHeader.SetParentComponent(pnlControlHolder);\r\n pnlQPKLHeader.Name := 'pnlQPKLHeader';\r\n pnlQPKLHeader.Left := 448;\r\n pnlQPKLHeader.Top := 16;\r\n pnlQPKLHeader.Width := 321;\r\n pnlQPKLHeader.Height := 25;\r\n pnlQPKLHeader.ElementClassName := 'BOX_NO_BORDER_BLOCK_TITLE_COLOR';\r\n pnlQPKLHeader.BorderColor := clWhite;\r\n pnlQPKLHeader.BorderStyle := bsNone;\r\n pnlQPKLHeader.ChildOrder := 20;\r\n pnlQPKLHeader.Color := clWhite;\r\n pnlQPKLHeader.TabOrder := 11;\r\n btnCloseQuickPicklist.SetParentComponent(pnlQPKLHeader);\r\n btnCloseQuickPicklist.Name := 'btnCloseQuickPicklist';\r\n btnCloseQuickPicklist.Left := 0;\r\n btnCloseQuickPicklist.Top := 0;\r\n btnCloseQuickPicklist.Width := 22;\r\n btnCloseQuickPicklist.Height := 25;\r\n btnCloseQuickPicklist.Cursor := crHandPoint;\r\n btnCloseQuickPicklist.Hint := 'Save and Close';\r\n btnCloseQuickPicklist.Align := alLeft;\r\n btnCloseQuickPicklist.Color := clNone;\r\n btnCloseQuickPicklist.ElementClassName := 'btn_icon';\r\n btnCloseQuickPicklist.ElementFont := efCSS;\r\n btnCloseQuickPicklist.Flat := True;\r\n btnCloseQuickPicklist.HeightPercent := 100.000000000000000000;\r\n btnCloseQuickPicklist.MaterialGlyph := 'check';\r\n btnCloseQuickPicklist.ShowHint := True;\r\n btnCloseQuickPicklist.TabOrder := 0;\r\n btnCloseQuickPicklist.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnCloseQuickPicklist, Self, 'OnClick', 'btnCloseQuickPicklistClick');\r\n seQPKLValue.SetParentComponent(pnlQPKLHeader);\r\n seQPKLValue.Name := 'seQPKLValue';\r\n seQPKLValue.Left := 22;\r\n seQPKLValue.Top := 0;\r\n seQPKLValue.Width := 61;\r\n seQPKLValue.Height := 25;\r\n seQPKLValue.Hint := 'Item Value';\r\n seQPKLValue.ElementClassName := 'box_bottomborder_font_normal';\r\n seQPKLValue.Align := alLeft;\r\n seQPKLValue.AutoSize := False;\r\n seQPKLValue.BorderStyle := bsNone;\r\n seQPKLValue.ChildOrder := 8;\r\n seQPKLValue.Color := clNone;\r\n seQPKLValue.ElementFont := efCSS;\r\n seQPKLValue.Increment := 1;\r\n seQPKLValue.MaxValue := 1000;\r\n seQPKLValue.MinValue := -1000;\r\n seQPKLValue.Role := '';\r\n seQPKLValue.ShowFocus := False;\r\n seQPKLValue.ShowHint := True;\r\n seQPKLValue.Value := 0;\r\n edQPKLFilter.SetParentComponent(pnlQPKLHeader);\r\n edQPKLFilter.Name := 'edQPKLFilter';\r\n edQPKLFilter.Left := 105;\r\n edQPKLFilter.Top := 0;\r\n edQPKLFilter.Width := 121;\r\n edQPKLFilter.Height := 25;\r\n edQPKLFilter.Hint := 'Filter';\r\n edQPKLFilter.Align := alLeft;\r\n edQPKLFilter.BorderStyle := bsNone;\r\n edQPKLFilter.ChildOrder := 9;\r\n edQPKLFilter.Color := clWhite;\r\n edQPKLFilter.ElementClassName := 'box_bottomborder_font_normal';\r\n edQPKLFilter.ElementFont := efCSS;\r\n edQPKLFilter.HeightPercent := 100.000000000000000000;\r\n edQPKLFilter.ShowFocus := False;\r\n edQPKLFilter.ShowHint := True;\r\n edQPKLFilter.WidthPercent := 100.000000000000000000;\r\n SetEvent(edQPKLFilter, Self, 'OnChange', 'edQPKLFilterChange');\r\n WebSpeedButton1.SetParentComponent(pnlQPKLHeader);\r\n WebSpeedButton1.Name := 'WebSpeedButton1';\r\n WebSpeedButton1.Left := 83;\r\n WebSpeedButton1.Top := 0;\r\n WebSpeedButton1.Width := 22;\r\n WebSpeedButton1.Height := 25;\r\n WebSpeedButton1.Cursor := crHandPoint;\r\n WebSpeedButton1.Hint := 'Search';\r\n WebSpeedButton1.Align := alLeft;\r\n WebSpeedButton1.Color := clNone;\r\n WebSpeedButton1.ElementClassName := 'btn_icon';\r\n WebSpeedButton1.ElementFont := efCSS;\r\n WebSpeedButton1.Flat := True;\r\n WebSpeedButton1.HeightPercent := 100.000000000000000000;\r\n WebSpeedButton1.MaterialGlyph := 'search';\r\n WebSpeedButton1.ShowHint := True;\r\n WebSpeedButton1.TabOrder := 3;\r\n WebSpeedButton1.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebSpeedButton1, Self, 'OnClick', 'btnAddRecordClick');\r\n clQuickPicklist.SetParentComponent(pnlControlHolder);\r\n clQuickPicklist.Name := 'clQuickPicklist';\r\n clQuickPicklist.Left := 502;\r\n clQuickPicklist.Top := 61;\r\n clQuickPicklist.Width := 268;\r\n clQuickPicklist.Height := 71;\r\n clQuickPicklist.Cursor := crHandPoint;\r\n clQuickPicklist.AllowFocus := False;\r\n clQuickPicklist.ParentDoubleBuffered := False;\r\n clQuickPicklist.Color := clNone;\r\n clQuickPicklist.DoubleBuffered := True;\r\n clQuickPicklist.Font.Charset := DEFAULT_CHARSET;\r\n clQuickPicklist.Font.Color := clGray;\r\n clQuickPicklist.Font.Height := -16;\r\n clQuickPicklist.Font.Name := 'Tahoma';\r\n clQuickPicklist.Font.Style := [];\r\n clQuickPicklist.ParentFont := False;\r\n clQuickPicklist.TabOrder := 12;\r\n clQuickPicklist.Visible := False;\r\n SetEvent(clQuickPicklist, Self, 'OnMouseLeave', 'clQuickPicklistMouseLeave');\r\n clQuickPicklist.Stroke.Color := 13882323;\r\n clQuickPicklist.ItemsAppearance.Font.Charset := DEFAULT_CHARSET;\r\n clQuickPicklist.ItemsAppearance.Font.Color := clSilver;\r\n clQuickPicklist.ItemsAppearance.Font.Height := -13;\r\n clQuickPicklist.ItemsAppearance.Font.Name := 'Tahoma';\r\n clQuickPicklist.ItemsAppearance.Font.Style := [];\r\n clQuickPicklist.ItemsAppearance.Fill.Color := -1;\r\n clQuickPicklist.ItemsAppearance.Stroke.Kind := gskNone;\r\n clQuickPicklist.ItemsAppearance.Stroke.Color := 11119017;\r\n clQuickPicklist.ItemsAppearance.SelectedFill.Color := 16748574;\r\n clQuickPicklist.ItemsAppearance.SelectedStroke.Kind := gskNone;\r\n clQuickPicklist.ItemsAppearance.SelectedStroke.Color := 15658734;\r\n clQuickPicklist.ItemsAppearance.DisabledFill.Color := 11119017;\r\n clQuickPicklist.ItemsAppearance.DisabledStroke.Kind := gskNone;\r\n clQuickPicklist.ItemsAppearance.DisabledStroke.Color := 11119017;\r\n clQuickPicklist.ItemsAppearance.HeightMode := lihmVariable;\r\n clQuickPicklist.ItemsAppearance.FixedHeight := 25.000000000000000000;\r\n clQuickPicklist.ItemsAppearance.ShowFocus := False;\r\n clQuickPicklist.DefaultItem.WordWrapping := True;\r\n clQuickPicklist.Items.Clear;\r\n with clQuickPicklist.Items.Add do\r\n begin\r\n Text := 'Mercedes';\r\n WordWrapping := True;\r\n end;\r\n with clQuickPicklist.Items.Add do\r\n begin\r\n Text := 'Audi';\r\n WordWrapping := True;\r\n end;\r\n with clQuickPicklist.Items.Add do\r\n begin\r\n Text := 'BMW';\r\n WordWrapping := True;\r\n end;\r\n with clQuickPicklist.Items.Add do\r\n begin\r\n Text := 'Land Rover';\r\n WordWrapping := True;\r\n end;\r\n with clQuickPicklist.Items.Add do\r\n begin\r\n Text := 'Bugatti';\r\n WordWrapping := True;\r\n end;\r\n clQuickPicklist.Header.Visible := True;\r\n clQuickPicklist.Header.Text := 'Header';\r\n clQuickPicklist.Header.Fill.Color := 15658734;\r\n clQuickPicklist.Header.Font.Charset := DEFAULT_CHARSET;\r\n clQuickPicklist.Header.Font.Color := 15658734;\r\n clQuickPicklist.Header.Font.Height := -16;\r\n clQuickPicklist.Header.Font.Name := 'Tahoma';\r\n clQuickPicklist.Header.Font.Style := [];\r\n clQuickPicklist.Header.Stroke.Kind := gskNone;\r\n clQuickPicklist.Header.Stroke.Color := 11119017;\r\n clQuickPicklist.Header.WordWrapping := True;\r\n clQuickPicklist.Header.Size := 25.000000000000000000;\r\n clQuickPicklist.Header.SortIndicatorColor := 11829830;\r\n clQuickPicklist.VerticalScrollBarVisible := False;\r\n SetEvent(clQuickPicklist, Self, 'OnItemClick', 'clQuickPicklistItemClick');\r\n SetEvent(clQuickPicklist, Self, 'OnItemCheckChanged', 'clQuickPicklistItemCheckChanged');\r\n btnQPKLTimePicker.SetParentComponent(pnlControlHolder);\r\n btnQPKLTimePicker.Name := 'btnQPKLTimePicker';\r\n btnQPKLTimePicker.Left := 33;\r\n btnQPKLTimePicker.Top := 150;\r\n btnQPKLTimePicker.Width := 22;\r\n btnQPKLTimePicker.Height := 24;\r\n btnQPKLTimePicker.Cursor := crHandPoint;\r\n btnQPKLTimePicker.Hint := 'Time ';\r\n btnQPKLTimePicker.Color := clNone;\r\n btnQPKLTimePicker.Flat := True;\r\n btnQPKLTimePicker.HeightPercent := 100.000000000000000000;\r\n btnQPKLTimePicker.MaterialGlyph := 'timer';\r\n btnQPKLTimePicker.ShowHint := True;\r\n btnQPKLTimePicker.TabOrder := 13;\r\n btnQPKLTimePicker.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnQPKLTimePicker, Self, 'OnClick', 'btnQPKLTimePickerClick');\r\n btnAddRecord.SetParentComponent(pnlControlHolder);\r\n btnAddRecord.Name := 'btnAddRecord';\r\n btnAddRecord.Left := 254;\r\n btnAddRecord.Top := 261;\r\n btnAddRecord.Width := 22;\r\n btnAddRecord.Height := 24;\r\n btnAddRecord.Cursor := crHandPoint;\r\n btnAddRecord.Hint := 'New Record';\r\n btnAddRecord.Color := clNone;\r\n btnAddRecord.ElementClassName := 'btn_icon';\r\n btnAddRecord.ElementFont := efCSS;\r\n btnAddRecord.Flat := True;\r\n btnAddRecord.HeightPercent := 100.000000000000000000;\r\n btnAddRecord.MaterialGlyph := 'add';\r\n btnAddRecord.ShowHint := True;\r\n btnAddRecord.TabOrder := 14;\r\n btnAddRecord.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnAddRecord, Self, 'OnClick', 'btnAddRecordClick');\r\n btnDeleteRecord.SetParentComponent(pnlControlHolder);\r\n btnDeleteRecord.Name := 'btnDeleteRecord';\r\n btnDeleteRecord.Left := 310;\r\n btnDeleteRecord.Top := 261;\r\n btnDeleteRecord.Width := 22;\r\n btnDeleteRecord.Height := 24;\r\n btnDeleteRecord.Cursor := crHandPoint;\r\n btnDeleteRecord.Hint := 'Delete';\r\n btnDeleteRecord.Color := clNone;\r\n btnDeleteRecord.ElementClassName := 'btn_icon';\r\n btnDeleteRecord.ElementFont := efCSS;\r\n btnDeleteRecord.Flat := True;\r\n btnDeleteRecord.HeightPercent := 100.000000000000000000;\r\n btnDeleteRecord.MaterialGlyph := 'remove';\r\n btnDeleteRecord.ShowHint := True;\r\n btnDeleteRecord.TabOrder := 15;\r\n btnDeleteRecord.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnDeleteRecord, Self, 'OnClick', 'btnDeleteRecordClick');\r\n memGridColumns.SetParentComponent(pnlControlHolder);\r\n memGridColumns.Name := 'memGridColumns';\r\n memGridColumns.Left := 293;\r\n memGridColumns.Top := 89;\r\n memGridColumns.Width := 203;\r\n memGridColumns.Height := 71;\r\n memGridColumns.HeightPercent := 100.000000000000000000;\r\n memGridColumns.Lines.BeginUpdate;\r\n try\r\n memGridColumns.Lines.Clear;\r\n memGridColumns.Lines.Add('memGridColumns');\r\n finally\r\n memGridColumns.Lines.EndUpdate;\r\n end;\r\n memGridColumns.SelLength := 0;\r\n memGridColumns.SelStart := 0;\r\n memGridColumns.Visible := False;\r\n memGridColumns.WidthPercent := 100.000000000000000000;\r\n btnBlockGridPost.SetParentComponent(pnlControlHolder);\r\n btnBlockGridPost.Name := 'btnBlockGridPost';\r\n btnBlockGridPost.Left := 282;\r\n btnBlockGridPost.Top := 261;\r\n btnBlockGridPost.Width := 22;\r\n btnBlockGridPost.Height := 24;\r\n btnBlockGridPost.Cursor := crHandPoint;\r\n btnBlockGridPost.Hint := 'Post';\r\n btnBlockGridPost.Color := clNone;\r\n btnBlockGridPost.ElementClassName := 'btn_icon';\r\n btnBlockGridPost.ElementFont := efCSS;\r\n btnBlockGridPost.Flat := True;\r\n btnBlockGridPost.HeightPercent := 100.000000000000000000;\r\n btnBlockGridPost.MaterialGlyph := 'check';\r\n btnBlockGridPost.ShowHint := True;\r\n btnBlockGridPost.TabOrder := 17;\r\n btnBlockGridPost.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnBlockGridPost, Self, 'OnClick', 'btnBlockGridPostClick');\r\n edtPicklistCustomForm.SetParentComponent(pnlControlHolder);\r\n edtPicklistCustomForm.Name := 'edtPicklistCustomForm';\r\n edtPicklistCustomForm.Left := 117;\r\n edtPicklistCustomForm.Top := 263;\r\n edtPicklistCustomForm.Width := 100;\r\n edtPicklistCustomForm.Height := 22;\r\n edtPicklistCustomForm.ChildOrder := 20;\r\n edtPicklistCustomForm.ElementClassName := 'BOX_BOTTOMBORDER_TITLE_COLOR';\r\n edtPicklistCustomForm.HeightPercent := 100.000000000000000000;\r\n edtPicklistCustomForm.ShowFocus := False;\r\n edtPicklistCustomForm.ShowHint := True;\r\n edtPicklistCustomForm.WidthPercent := 20.000000000000000000;\r\n SetEvent(edtPicklistCustomForm, Self, 'OnChange', 'edtPicklistCustomFormChange');\r\n SetEvent(edtPicklistCustomForm, Self, 'OnMouseMove', 'edtPicklistCustomFormMouseMove');\r\n edtEditMask.SetParentComponent(pnlControlHolder);\r\n edtEditMask.Name := 'edtEditMask';\r\n edtEditMask.Left := 293;\r\n edtEditMask.Top := 166;\r\n edtEditMask.Width := 181;\r\n edtEditMask.Height := 21;\r\n edtEditMask.TabOrder := 19;\r\n edtEditMask.Text := '';\r\n edtEditMask.Visible := False;\r\n SetEvent(edtEditMask, Self, 'OnMouseLeave', 'edtEditMaskMouseLeave');\r\n edtEditMask.ShowFocus := False;\r\n edtEditMask.HeightPercent := 100.000000000000000000;\r\n edtEditMask.WidthPercent := 100.000000000000000000;\r\n btnBlockMenu.SetParentComponent(pnlControlHolder);\r\n btnBlockMenu.Name := 'btnBlockMenu';\r\n btnBlockMenu.Left := 366;\r\n btnBlockMenu.Top := 261;\r\n btnBlockMenu.Width := 22;\r\n btnBlockMenu.Height := 24;\r\n btnBlockMenu.Cursor := crHandPoint;\r\n btnBlockMenu.Color := clNone;\r\n btnBlockMenu.ElementClassName := 'btn_icon_nohighlight';\r\n btnBlockMenu.ElementFont := efCSS;\r\n btnBlockMenu.Flat := True;\r\n btnBlockMenu.HeightPercent := 100.000000000000000000;\r\n btnBlockMenu.MaterialGlyph := 'more_vert';\r\n btnBlockMenu.ShowHint := True;\r\n btnBlockMenu.TabOrder := 20;\r\n btnBlockMenu.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnBlockMenu, Self, 'OnClick', 'btnBlockMenuClick');\r\n SetEvent(btnBlockMenu, Self, 'OnMouseMove', 'btnBlockMenuMouseMove');\r\n pnlQPKLTimePicker.SetParentComponent(pnlControlHolder);\r\n pnlQPKLTimePicker.Name := 'pnlQPKLTimePicker';\r\n pnlQPKLTimePicker.Left := 297;\r\n pnlQPKLTimePicker.Top := 57;\r\n pnlQPKLTimePicker.Width := 109;\r\n pnlQPKLTimePicker.Height := 26;\r\n pnlQPKLTimePicker.ElementClassName := 'BOX_BOTTOMBORDER_TITLE_COLOR';\r\n pnlQPKLTimePicker.BorderColor := clWhite;\r\n pnlQPKLTimePicker.BorderStyle := bsNone;\r\n pnlQPKLTimePicker.ChildOrder := 23;\r\n pnlQPKLTimePicker.Color := clWhite;\r\n pnlQPKLTimePicker.TabOrder := 21;\r\n pnlQPKLTimePicker.Visible := False;\r\n btnCloseTimePicker.SetParentComponent(pnlQPKLTimePicker);\r\n btnCloseTimePicker.Name := 'btnCloseTimePicker';\r\n btnCloseTimePicker.Left := 22;\r\n btnCloseTimePicker.Top := 0;\r\n btnCloseTimePicker.Width := 22;\r\n btnCloseTimePicker.Height := 26;\r\n btnCloseTimePicker.Cursor := crHandPoint;\r\n btnCloseTimePicker.Hint := 'Save and Close';\r\n btnCloseTimePicker.Color := clNone;\r\n btnCloseTimePicker.ElementClassName := 'btn btn-light';\r\n btnCloseTimePicker.HeightPercent := 100.000000000000000000;\r\n btnCloseTimePicker.MaterialGlyph := 'clear';\r\n btnCloseTimePicker.ShowHint := True;\r\n btnCloseTimePicker.TabOrder := 0;\r\n btnCloseTimePicker.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnCloseTimePicker, Self, 'OnClick', 'btnCloseTimePickerClick');\r\n mdGenDialog.SetParentComponent(pnlControlHolder);\r\n mdGenDialog.Name := 'mdGenDialog';\r\n mdGenDialog.Left := 31;\r\n mdGenDialog.Top := 3;\r\n mdGenDialog.Width := 24;\r\n mdGenDialog.Height := 24;\r\n mdGenDialog.ElementClassName := 'modal-fullscreen-sm-down';\r\n mdGenDialog.Buttons := [];\r\n mdGenDialog.CustomButtons.Clear;\r\n with mdGenDialog.CustomButtons.Add do\r\n begin\r\n Caption := 'Yes';\r\n ElementClassName := 'btn-outline-success';\r\n end;\r\n with mdGenDialog.CustomButtons.Add do\r\n begin\r\n Caption := 'No';\r\n ElementClassName := 'btn-outline-secondary';\r\n end;\r\n mdGenDialog.Opacity := 0.100000000000000000;\r\n mdGenDialog.ElementButtonClassName := 'btn';\r\n tmQPKLTimePicker.SetParentComponent(pnlControlHolder);\r\n tmQPKLTimePicker.Name := 'tmQPKLTimePicker';\r\n tmQPKLTimePicker.Left := 432;\r\n tmQPKLTimePicker.Top := 212;\r\n tmQPKLTimePicker.Width := 137;\r\n tmQPKLTimePicker.Height := 26;\r\n tmQPKLTimePicker.ElementClassName := 'block_timepicker';\r\n tmQPKLTimePicker.HeightStyle := ssAuto;\r\n tmQPKLTimePicker.WidthStyle := ssAuto;\r\n tmQPKLTimePicker.BorderStyle := bsNone;\r\n tmQPKLTimePicker.ChildOrder := 18;\r\n tmQPKLTimePicker.Color := clWhite;\r\n tmQPKLTimePicker.Date := 44930.463200324080000000;\r\n tmQPKLTimePicker.ElementFont := efCSS;\r\n tmQPKLTimePicker.Kind := dtkTime;\r\n tmQPKLTimePicker.Role := '';\r\n tmQPKLTimePicker.ShowFocus := False;\r\n tmQPKLTimePicker.ShowSeconds := False;\r\n tmQPKLTimePicker.Text := '';\r\n tmQPKLTimePicker.Visible := False;\r\n SetEvent(tmQPKLTimePicker, Self, 'OnChange', 'tmQPKLTimePickerChange');\r\n btnUseSelectedTime.SetParentComponent(pnlControlHolder);\r\n btnUseSelectedTime.Name := 'btnUseSelectedTime';\r\n btnUseSelectedTime.Left := 603;\r\n btnUseSelectedTime.Top := 210;\r\n btnUseSelectedTime.Width := 22;\r\n btnUseSelectedTime.Height := 26;\r\n btnUseSelectedTime.Cursor := crHandPoint;\r\n btnUseSelectedTime.Hint := 'Save and Close';\r\n btnUseSelectedTime.Color := clNone;\r\n btnUseSelectedTime.ElementClassName := 'btn btn-light';\r\n btnUseSelectedTime.HeightPercent := 100.000000000000000000;\r\n btnUseSelectedTime.MaterialGlyph := 'check';\r\n btnUseSelectedTime.ShowHint := True;\r\n btnUseSelectedTime.TabOrder := 24;\r\n btnUseSelectedTime.Visible := False;\r\n btnUseSelectedTime.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnUseSelectedTime, Self, 'OnClick', 'btnUseSelectedTimeClick');\r\n dpBlockDatePicker.SetParentComponent(pnlControlHolder);\r\n dpBlockDatePicker.Name := 'dpBlockDatePicker';\r\n dpBlockDatePicker.Left := 432;\r\n dpBlockDatePicker.Top := 244;\r\n dpBlockDatePicker.Width := 73;\r\n dpBlockDatePicker.Height := 22;\r\n dpBlockDatePicker.ElementClassName := 'block_datepicker';\r\n dpBlockDatePicker.HeightStyle := ssAuto;\r\n dpBlockDatePicker.WidthStyle := ssAuto;\r\n dpBlockDatePicker.BorderStyle := bsNone;\r\n dpBlockDatePicker.ChildOrder := 7;\r\n dpBlockDatePicker.Color := clWhite;\r\n dpBlockDatePicker.Date := 45252.401108414350000000;\r\n dpBlockDatePicker.ElementFont := efCSS;\r\n dpBlockDatePicker.Role := '';\r\n dpBlockDatePicker.ShowFocus := False;\r\n dpBlockDatePicker.ShowSeconds := False;\r\n dpBlockDatePicker.Text := '';\r\n dpBlockDatePicker.Visible := False;\r\n SetEvent(dpBlockDatePicker, Self, 'OnChange', 'dpBlockDatePickerChange');\r\n rgBlockRadioGroup.SetParentComponent(pnlControlHolder);\r\n rgBlockRadioGroup.Name := 'rgBlockRadioGroup';\r\n rgBlockRadioGroup.Left := 432;\r\n rgBlockRadioGroup.Top := 272;\r\n rgBlockRadioGroup.Width := 129;\r\n rgBlockRadioGroup.Height := 41;\r\n rgBlockRadioGroup.ElementClassName := 'block_radiobuttons';\r\n rgBlockRadioGroup.Caption := '';\r\n rgBlockRadioGroup.ChildOrder := 26;\r\n rgBlockRadioGroup.Columns := 2;\r\n rgBlockRadioGroup.ItemIndex := -1;\r\n rgBlockRadioGroup.Role := '';\r\n rgBlockRadioGroup.TabOrder := 26;\r\n rgBlockRadioGroup.Visible := False;\r\n SetEvent(rgBlockRadioGroup, Self, 'OnChange', 'rgBlockRadioGroupChange');\r\n seBlockSpinEdit.SetParentComponent(pnlControlHolder);\r\n seBlockSpinEdit.Name := 'seBlockSpinEdit';\r\n seBlockSpinEdit.Left := 432;\r\n seBlockSpinEdit.Top := 322;\r\n seBlockSpinEdit.Width := 67;\r\n seBlockSpinEdit.Height := 22;\r\n seBlockSpinEdit.Hint := 'Item Value';\r\n seBlockSpinEdit.ElementClassName := 'block_spinedit';\r\n seBlockSpinEdit.HeightStyle := ssAuto;\r\n seBlockSpinEdit.WidthStyle := ssAuto;\r\n seBlockSpinEdit.AutoSize := False;\r\n seBlockSpinEdit.BorderStyle := bsNone;\r\n seBlockSpinEdit.ChildOrder := 8;\r\n seBlockSpinEdit.Color := clWhite;\r\n seBlockSpinEdit.ElementFont := efCSS;\r\n seBlockSpinEdit.Increment := 1;\r\n seBlockSpinEdit.MaxValue := 10000;\r\n seBlockSpinEdit.MinValue := 0;\r\n seBlockSpinEdit.Role := '';\r\n seBlockSpinEdit.ShowFocus := False;\r\n seBlockSpinEdit.Value := 0;\r\n seBlockSpinEdit.Visible := False;\r\n SetEvent(seBlockSpinEdit, Self, 'OnChange', 'seBlockSpinEditChange');\r\n btnTest.SetParentComponent(pnlControlHolder);\r\n btnTest.Name := 'btnTest';\r\n btnTest.Left := 730;\r\n btnTest.Top := 151;\r\n btnTest.Width := 52;\r\n btnTest.Height := 60;\r\n btnTest.Color := clNone;\r\n btnTest.HeightPercent := 100.000000000000000000;\r\n btnTest.MaterialGlyph := 'forum';\r\n btnTest.MaterialGlyphSize := 48;\r\n btnTest.Visible := False;\r\n btnTest.WidthPercent := 100.000000000000000000;\r\n memo_autoheight.SetParentComponent(pnlControlHolder);\r\n memo_autoheight.Name := 'memo_autoheight';\r\n memo_autoheight.Left := 628;\r\n memo_autoheight.Top := 273;\r\n memo_autoheight.Width := 69;\r\n memo_autoheight.Height := 21;\r\n memo_autoheight.ElementClassName := 'text_autoheight';\r\n memo_autoheight.ElementFont := efCSS;\r\n memo_autoheight.HeightStyle := ssAuto;\r\n memo_autoheight.HeightPercent := 100.000000000000000000;\r\n memo_autoheight.Lines.BeginUpdate;\r\n try\r\n memo_autoheight.Lines.Clear;\r\n memo_autoheight.Lines.Add('memo_auto');\r\n memo_autoheight.Lines.Add('height');\r\n finally\r\n memo_autoheight.Lines.EndUpdate;\r\n end;\r\n memo_autoheight.SelLength := 0;\r\n memo_autoheight.SelStart := 17;\r\n memo_autoheight.Visible := False;\r\n memo_autoheight.WidthPercent := 100.000000000000000000;\r\n wmWaitMessage.SetParentComponent(pnlControlHolder);\r\n wmWaitMessage.Name := 'wmWaitMessage';\r\n wmWaitMessage.Left := 81;\r\n wmWaitMessage.Top := 56;\r\n wmWaitMessage.Width := 24;\r\n wmWaitMessage.Height := 24;\r\n wmWaitMessage.Opacity := 0.200000000000000000;\r\n wmWaitMessage.Picture.LoadFromFile('Main.pnlControlHolder.wmWaitMessage.Picture.gif');\r\n html_heightCalculator.SetParentComponent(pnlFormArea);\r\n html_heightCalculator.Name := 'html_heightCalculator';\r\n html_heightCalculator.Left := 998;\r\n html_heightCalculator.Top := 452;\r\n html_heightCalculator.Width := 252;\r\n html_heightCalculator.Height := 77;\r\n html_heightCalculator.ElementClassName := 'block_memo';\r\n html_heightCalculator.BorderStyle := bsSingle;\r\n html_heightCalculator.ChildOrder := 12;\r\n HTMLMemoDataText.SetParentComponent(html_heightCalculator);\r\n HTMLMemoDataText.Name := 'HTMLMemoDataText';\r\n HTMLMemoDataText.Left := 17;\r\n HTMLMemoDataText.Top := 19;\r\n HTMLMemoDataText.Width := 163;\r\n HTMLMemoDataText.Height := 18;\r\n HTMLMemoDataText.ElementClassName := 'text_autoheight';\r\n HTMLMemoDataText.HeightStyle := ssAuto;\r\n HTMLMemoDataText.ChildOrder := 7;\r\n HTMLMemoDataText.ElementFont := efCSS;\r\n pnlDesignSettings.SetParentComponent(pnlFormArea);\r\n pnlDesignSettings.Name := 'pnlDesignSettings';\r\n pnlDesignSettings.Left := 0;\r\n pnlDesignSettings.Top := 1040;\r\n pnlDesignSettings.Width := 1250;\r\n pnlDesignSettings.Height := 58;\r\n pnlDesignSettings.ElementClassName := 'main_menu_design_settings';\r\n pnlDesignSettings.Align := alBottom;\r\n pnlDesignSettings.BorderColor := clWhite;\r\n pnlDesignSettings.BorderStyle := bsNone;\r\n pnlDesignSettings.ChildOrder := 10;\r\n pnlDesignSettings.Color := 16185849;\r\n pnlDesignSettings.TabOrder := 4;\r\n lblBlockDefaultWidth.SetParentComponent(pnlDesignSettings);\r\n lblBlockDefaultWidth.Name := 'lblBlockDefaultWidth';\r\n lblBlockDefaultWidth.Left := 325;\r\n lblBlockDefaultWidth.Top := 7;\r\n lblBlockDefaultWidth.Width := 65;\r\n lblBlockDefaultWidth.Height := 13;\r\n lblBlockDefaultWidth.AutoSize := False;\r\n lblBlockDefaultWidth.Caption := 'Block Default Width';\r\n lblBlockDefaultWidth.ElementLabelClassName := 'text_normal';\r\n lblBlockDefaultWidth.ElementFont := efCSS;\r\n lblBlockDefaultWidth.HeightStyle := ssAuto;\r\n lblBlockDefaultWidth.HeightPercent := 100.000000000000000000;\r\n lblBlockDefaultWidth.WidthPercent := 100.000000000000000000;\r\n lblColumns.SetParentComponent(pnlDesignSettings);\r\n lblColumns.Name := 'lblColumns';\r\n lblColumns.Left := 187;\r\n lblColumns.Top := 7;\r\n lblColumns.Width := 50;\r\n lblColumns.Height := 13;\r\n lblColumns.AutoSize := False;\r\n lblColumns.Caption := 'Columns';\r\n lblColumns.ElementLabelClassName := 'text_normal';\r\n lblColumns.ElementFont := efCSS;\r\n lblColumns.HeightStyle := ssAuto;\r\n lblColumns.HeightPercent := 100.000000000000000000;\r\n lblColumns.WidthPercent := 100.000000000000000000;\r\n seFormColumns.SetParentComponent(pnlDesignSettings);\r\n seFormColumns.Name := 'seFormColumns';\r\n seFormColumns.Left := 244;\r\n seFormColumns.Top := 2;\r\n seFormColumns.Width := 70;\r\n seFormColumns.Height := 25;\r\n seFormColumns.ElementClassName := 'box_bottomborder_font_xxbig';\r\n seFormColumns.Align := alCustom;\r\n seFormColumns.AutoSize := False;\r\n seFormColumns.BorderStyle := bsSingle;\r\n seFormColumns.ChildOrder := 5;\r\n seFormColumns.Color := clWhite;\r\n seFormColumns.ElementFont := efCSS;\r\n seFormColumns.Font.Charset := DEFAULT_CHARSET;\r\n seFormColumns.Font.Color := clWindowText;\r\n seFormColumns.Font.Height := -16;\r\n seFormColumns.Font.Name := 'Tahoma';\r\n seFormColumns.Font.Style := [];\r\n seFormColumns.Increment := 1;\r\n seFormColumns.MaxValue := 100;\r\n seFormColumns.MinValue := 0;\r\n seFormColumns.ParentFont := False;\r\n seFormColumns.Role := '';\r\n seFormColumns.Value := 1;\r\n SetEvent(seFormColumns, Self, 'OnChange', 'seFormColumnsChange');\r\n cbFormColumnsAuto.SetParentComponent(pnlDesignSettings);\r\n cbFormColumnsAuto.Name := 'cbFormColumnsAuto';\r\n cbFormColumnsAuto.Left := 17;\r\n cbFormColumnsAuto.Top := 7;\r\n cbFormColumnsAuto.Width := 161;\r\n cbFormColumnsAuto.Height := 18;\r\n cbFormColumnsAuto.Caption := 'Variable Block Width';\r\n cbFormColumnsAuto.ChildOrder := 3;\r\n cbFormColumnsAuto.ElementLabelClassName := 'text_normal';\r\n cbFormColumnsAuto.ElementFont := efCSS;\r\n cbFormColumnsAuto.HeightStyle := ssAuto;\r\n cbFormColumnsAuto.HeightPercent := 100.000000000000000000;\r\n cbFormColumnsAuto.WidthPercent := 100.000000000000000000;\r\n SetEvent(cbFormColumnsAuto, Self, 'OnClick', 'cbFormColumnsAutoClick');\r\n seBlockDefaultWidth.SetParentComponent(pnlDesignSettings);\r\n seBlockDefaultWidth.Name := 'seBlockDefaultWidth';\r\n seBlockDefaultWidth.Left := 393;\r\n seBlockDefaultWidth.Top := 2;\r\n seBlockDefaultWidth.Width := 70;\r\n seBlockDefaultWidth.Height := 25;\r\n seBlockDefaultWidth.ElementClassName := 'box_bottomborder_font_xxbig';\r\n seBlockDefaultWidth.Align := alCustom;\r\n seBlockDefaultWidth.AutoSize := False;\r\n seBlockDefaultWidth.BorderStyle := bsSingle;\r\n seBlockDefaultWidth.ChildOrder := 5;\r\n seBlockDefaultWidth.Color := 16185849;\r\n seBlockDefaultWidth.ElementFont := efCSS;\r\n seBlockDefaultWidth.Font.Charset := DEFAULT_CHARSET;\r\n seBlockDefaultWidth.Font.Color := clWindowText;\r\n seBlockDefaultWidth.Font.Height := -16;\r\n seBlockDefaultWidth.Font.Name := 'Tahoma';\r\n seBlockDefaultWidth.Font.Style := [];\r\n seBlockDefaultWidth.Increment := 10;\r\n seBlockDefaultWidth.MaxValue := 3000;\r\n seBlockDefaultWidth.MinValue := 50;\r\n seBlockDefaultWidth.ParentFont := False;\r\n seBlockDefaultWidth.Role := '';\r\n seBlockDefaultWidth.Value := 50;\r\n SetEvent(seBlockDefaultWidth, Self, 'OnChange', 'seBlockDefaultWidthChange');\r\n cbShowHiddenBlocksInDesign.SetParentComponent(pnlDesignSettings);\r\n cbShowHiddenBlocksInDesign.Name := 'cbShowHiddenBlocksInDesign';\r\n cbShowHiddenBlocksInDesign.Left := 17;\r\n cbShowHiddenBlocksInDesign.Top := 31;\r\n cbShowHiddenBlocksInDesign.Width := 161;\r\n cbShowHiddenBlocksInDesign.Height := 17;\r\n cbShowHiddenBlocksInDesign.Caption := 'Shw Hidden Blocks';\r\n cbShowHiddenBlocksInDesign.ChildOrder := 2;\r\n cbShowHiddenBlocksInDesign.ElementLabelClassName := 'text_normal';\r\n cbShowHiddenBlocksInDesign.ElementFont := efCSS;\r\n cbShowHiddenBlocksInDesign.HeightPercent := 100.000000000000000000;\r\n cbShowHiddenBlocksInDesign.WidthPercent := 100.000000000000000000;\r\n SetEvent(cbShowHiddenBlocksInDesign, Self, 'OnClick', 'cbShowHiddenBlocksInDesignClick');\r\n wbBrowser.SetParentComponent(pnlDesignSettings);\r\n wbBrowser.Name := 'wbBrowser';\r\n wbBrowser.Left := 1208;\r\n wbBrowser.Top := 0;\r\n wbBrowser.Width := 42;\r\n wbBrowser.Height := 58;\r\n wbBrowser.Align := alRight;\r\n wbBrowser.ChildOrder := 18;\r\n wbBrowser.Sandbox := [stAllowForms,stAllowModals,stAllowOrientationLock,stAllowPointerLock,stAllowPopups,stAllowPopupsToEscapeSandbox,stAllowPresentation,stAllowSameOrigin,stAllowScripts,stAllowTopNavigation,stAllowTopNavigationByUserActivation];\r\n wbBrowser.Visible := False;\r\n cbNoHorizontallineUp.SetParentComponent(pnlDesignSettings);\r\n cbNoHorizontallineUp.Name := 'cbNoHorizontallineUp';\r\n cbNoHorizontallineUp.Left := 184;\r\n cbNoHorizontallineUp.Top := 31;\r\n cbNoHorizontallineUp.Width := 193;\r\n cbNoHorizontallineUp.Height := 17;\r\n cbNoHorizontallineUp.Caption := 'No Horizontal Lne Up';\r\n cbNoHorizontallineUp.ChildOrder := 2;\r\n cbNoHorizontallineUp.ElementLabelClassName := 'text_normal';\r\n cbNoHorizontallineUp.ElementFont := efCSS;\r\n cbNoHorizontallineUp.HeightPercent := 100.000000000000000000;\r\n cbNoHorizontallineUp.WidthPercent := 100.000000000000000000;\r\n SetEvent(cbNoHorizontallineUp, Self, 'OnClick', 'cbNoHorizontallineUpClick');\r\n rgScreenSize.SetParentComponent(pnlDesignSettings);\r\n rgScreenSize.Name := 'rgScreenSize';\r\n rgScreenSize.Left := 472;\r\n rgScreenSize.Top := 2;\r\n rgScreenSize.Width := 177;\r\n rgScreenSize.Height := 50;\r\n rgScreenSize.Caption := 'Current Screen Size';\r\n rgScreenSize.ChildOrder := 9;\r\n rgScreenSize.Columns := 3;\r\n rgScreenSize.ItemIndex := 0;\r\n rgScreenSize.Items.BeginUpdate;\r\n try\r\n rgScreenSize.Items.Clear;\r\n rgScreenSize.Items.Add('Large');\r\n rgScreenSize.Items.Add('Medium');\r\n rgScreenSize.Items.Add('Small');\r\n finally\r\n rgScreenSize.Items.EndUpdate;\r\n end;\r\n rgScreenSize.Role := '';\r\n rgScreenSize.TabOrder := 6;\r\n SetEvent(rgScreenSize, Self, 'OnChange', 'rgScreenSizeChange');\r\n WebButton1.SetParentComponent(pnlDesignSettings);\r\n WebButton1.Name := 'WebButton1';\r\n WebButton1.Left := 800;\r\n WebButton1.Top := 16;\r\n WebButton1.Width := 96;\r\n WebButton1.Height := 25;\r\n WebButton1.Caption := 'Edit Image';\r\n WebButton1.ChildOrder := 10;\r\n WebButton1.HeightPercent := 100.000000000000000000;\r\n WebButton1.Visible := False;\r\n WebButton1.WidthPercent := 100.000000000000000000;\r\n WebButton4.SetParentComponent(pnlDesignSettings);\r\n WebButton4.Name := 'WebButton4';\r\n WebButton4.Left := 673;\r\n WebButton4.Top := 17;\r\n WebButton4.Width := 96;\r\n WebButton4.Height := 35;\r\n WebButton4.Caption := ' FontAwesome 5';\r\n WebButton4.ChildOrder := 5;\r\n WebButton4.Font.Charset := DEFAULT_CHARSET;\r\n WebButton4.Font.Color := clGray;\r\n WebButton4.Font.Height := -16;\r\n WebButton4.Font.Name := 'Tahoma';\r\n WebButton4.Font.Style := [];\r\n WebButton4.HeightPercent := 100.000000000000000000;\r\n WebButton4.ParentFont := False;\r\n WebButton4.Visible := False;\r\n WebButton4.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebButton4, Self, 'OnClick', 'WebButton4Click');\r\n pnlFormBottomBar.SetParentComponent(pnlFormArea);\r\n pnlFormBottomBar.Name := 'pnlFormBottomBar';\r\n pnlFormBottomBar.Left := 0;\r\n pnlFormBottomBar.Top := 1098;\r\n pnlFormBottomBar.Width := 1250;\r\n pnlFormBottomBar.Height := 70;\r\n pnlFormBottomBar.ElementClassName := 'main_bottom_bar';\r\n pnlFormBottomBar.HeightStyle := ssAuto;\r\n pnlFormBottomBar.Align := alBottom;\r\n pnlFormBottomBar.BorderStyle := bsNone;\r\n pnlFormBottomBar.ChildOrder := 2;\r\n pnlFormBottomBar.Color := 16185849;\r\n pnlFormBottomBar.TabOrder := 5;\r\n sbInfoBoxes.SetParentComponent(pnlFormBottomBar);\r\n sbInfoBoxes.Name := 'sbInfoBoxes';\r\n sbInfoBoxes.Left := 0;\r\n sbInfoBoxes.Top := 0;\r\n sbInfoBoxes.Width := 1250;\r\n sbInfoBoxes.Height := 70;\r\n sbInfoBoxes.ElementClassName := 'main_bottom_panels';\r\n sbInfoBoxes.Align := alClient;\r\n sbInfoBoxes.BorderStyle := bsNone;\r\n sbInfoBoxes.ChildOrder := 2;\r\n sbInfoBoxes.Color := 16185849;\r\n sbInfoBoxes.ScrollBars := ssNone;\r\n B6.SetParentComponent(sbInfoBoxes);\r\n B6.Name := 'B6';\r\n B6.Tag := -2;\r\n B6.Left := 45;\r\n B6.Top := 6;\r\n B6.Width := 100;\r\n B6.Height := 60;\r\n B6.ElementClassName := 'data_block';\r\n B6.BorderColor := clWhite;\r\n B6.ChildOrder := 1;\r\n B6.Color := 16185849;\r\n B6.Font.Charset := ANSI_CHARSET;\r\n B6.Font.Color := clBlack;\r\n B6.Font.Height := -13;\r\n B6.Font.Name := 'Tahoma';\r\n B6.Font.Style := [];\r\n B6.ParentFont := False;\r\n B6.TabOrder := 0;\r\n SetEvent(B6, Self, 'OnMouseLeave', 'B1MouseLeave');\r\n SetEvent(B6, Self, 'OnMouseMove', 'B1MouseMove');\r\n WebPanel7.SetParentComponent(B6);\r\n WebPanel7.Name := 'WebPanel7';\r\n WebPanel7.Left := 0;\r\n WebPanel7.Top := 0;\r\n WebPanel7.Width := 100;\r\n WebPanel7.Height := 20;\r\n WebPanel7.ElementClassName := 'block_top';\r\n WebPanel7.HeightStyle := ssAuto;\r\n WebPanel7.Align := alTop;\r\n WebPanel7.BorderStyle := bsNone;\r\n WebPanel7.ChildOrder := 2;\r\n WebPanel7.Color := clWhite;\r\n WebPanel7.DragMode := dmAutomatic;\r\n WebPanel7.ElementFont := efCSS;\r\n WebPanel7.TabOrder := 0;\r\n SetEvent(WebPanel7, Self, 'OnDblClick', 'WebLabel36DblClick');\r\n SetEvent(WebPanel7, Self, 'OnMouseMove', 'WebPanel7MouseMove');\r\n SetEvent(WebPanel7, Self, 'OnDragDrop', 'WebLabel8DragDrop');\r\n SetEvent(WebPanel7, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel8.SetParentComponent(WebPanel7);\r\n WebLabel8.Name := 'WebLabel8';\r\n WebLabel8.Left := 0;\r\n WebLabel8.Top := 0;\r\n WebLabel8.Width := 63;\r\n WebLabel8.Height := 20;\r\n WebLabel8.Align := alLeft;\r\n WebLabel8.Caption := 'Info Box1';\r\n WebLabel8.Color := 16185849;\r\n WebLabel8.DragMode := dmAutomatic;\r\n WebLabel8.ElementClassName := 'block_title';\r\n WebLabel8.ElementLabelClassName := 'block_title';\r\n WebLabel8.ElementFont := efCSS;\r\n WebLabel8.Font.Charset := ANSI_CHARSET;\r\n WebLabel8.Font.Color := clNavy;\r\n WebLabel8.Font.Height := -13;\r\n WebLabel8.Font.Name := 'Segoe UI Emoji';\r\n WebLabel8.Font.Style := [fsBold];\r\n WebLabel8.HeightPercent := 100.000000000000000000;\r\n WebLabel8.ParentFont := False;\r\n WebLabel8.WidthStyle := ssAuto;\r\n WebLabel8.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel8, Self, 'OnDblClick', 'WebLabel36DblClick');\r\n SetEvent(WebLabel8, Self, 'OnMouseMove', 'WebLabel36MouseMove');\r\n SetEvent(WebLabel8, Self, 'OnDragDrop', 'WebLabel8DragDrop');\r\n SetEvent(WebLabel8, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebMemo4.SetParentComponent(B6);\r\n WebMemo4.Name := 'WebMemo4';\r\n WebMemo4.Left := 0;\r\n WebMemo4.Top := 51;\r\n WebMemo4.Width := 100;\r\n WebMemo4.Height := 9;\r\n WebMemo4.Align := alBottom;\r\n WebMemo4.BorderStyle := bsNone;\r\n WebMemo4.ElementClassName := 'block_memo';\r\n WebMemo4.ElementFont := efCSS;\r\n WebMemo4.Font.Charset := ANSI_CHARSET;\r\n WebMemo4.Font.Color := clBlack;\r\n WebMemo4.Font.Height := -16;\r\n WebMemo4.Font.Name := 'Tahoma';\r\n WebMemo4.Font.Style := [];\r\n WebMemo4.HeightPercent := 100.000000000000000000;\r\n WebMemo4.ParentFont := False;\r\n WebMemo4.ReadOnly := True;\r\n WebMemo4.SelLength := 0;\r\n WebMemo4.SelStart := 0;\r\n WebMemo4.ShowFocus := False;\r\n WebMemo4.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebMemo4, Self, 'OnMouseMove', 'M1MouseMove');\r\n WebHTMLContainer6.SetParentComponent(B6);\r\n WebHTMLContainer6.Name := 'WebHTMLContainer6';\r\n WebHTMLContainer6.Left := 0;\r\n WebHTMLContainer6.Top := 41;\r\n WebHTMLContainer6.Width := 100;\r\n WebHTMLContainer6.Height := 10;\r\n WebHTMLContainer6.Align := alBottom;\r\n WebHTMLContainer6.ChildOrder := 2;\r\n WebHTMLContainer6.ScrollStyle := ssVertical;\r\n WebHTMLContainer6.Visible := False;\r\n SetEvent(WebHTMLContainer6, Self, 'OnMouseMove', 'M1MouseMove');\r\n B7.SetParentComponent(sbInfoBoxes);\r\n B7.Name := 'B7';\r\n B7.Tag := -2;\r\n B7.Left := 197;\r\n B7.Top := 1;\r\n B7.Width := 100;\r\n B7.Height := 60;\r\n B7.ElementClassName := 'data_block';\r\n B7.BorderColor := clWhite;\r\n B7.ChildOrder := 2;\r\n B7.Color := 16185849;\r\n B7.Font.Charset := ANSI_CHARSET;\r\n B7.Font.Color := clBlack;\r\n B7.Font.Height := -13;\r\n B7.Font.Name := 'Tahoma';\r\n B7.Font.Style := [];\r\n B7.ParentFont := False;\r\n B7.TabOrder := 1;\r\n SetEvent(B7, Self, 'OnMouseLeave', 'B1MouseLeave');\r\n SetEvent(B7, Self, 'OnMouseMove', 'B1MouseMove');\r\n WebPanel9.SetParentComponent(B7);\r\n WebPanel9.Name := 'WebPanel9';\r\n WebPanel9.Left := 0;\r\n WebPanel9.Top := 0;\r\n WebPanel9.Width := 100;\r\n WebPanel9.Height := 20;\r\n WebPanel9.ElementClassName := 'block_top';\r\n WebPanel9.HeightStyle := ssAuto;\r\n WebPanel9.Align := alTop;\r\n WebPanel9.BorderStyle := bsNone;\r\n WebPanel9.ChildOrder := 2;\r\n WebPanel9.Color := clWhite;\r\n WebPanel9.DragMode := dmAutomatic;\r\n WebPanel9.ElementFont := efCSS;\r\n WebPanel9.TabOrder := 0;\r\n SetEvent(WebPanel9, Self, 'OnDblClick', 'WebLabel36DblClick');\r\n SetEvent(WebPanel9, Self, 'OnMouseMove', 'WebPanel7MouseMove');\r\n SetEvent(WebPanel9, Self, 'OnDragDrop', 'WebLabel8DragDrop');\r\n SetEvent(WebPanel9, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel9.SetParentComponent(WebPanel9);\r\n WebLabel9.Name := 'WebLabel9';\r\n WebLabel9.Left := 0;\r\n WebLabel9.Top := 0;\r\n WebLabel9.Width := 63;\r\n WebLabel9.Height := 20;\r\n WebLabel9.Align := alLeft;\r\n WebLabel9.Caption := 'Info Box2';\r\n WebLabel9.Color := 16185849;\r\n WebLabel9.DragMode := dmAutomatic;\r\n WebLabel9.ElementClassName := 'block_title';\r\n WebLabel9.ElementLabelClassName := 'block_title';\r\n WebLabel9.ElementFont := efCSS;\r\n WebLabel9.Font.Charset := ANSI_CHARSET;\r\n WebLabel9.Font.Color := clNavy;\r\n WebLabel9.Font.Height := -13;\r\n WebLabel9.Font.Name := 'Segoe UI Emoji';\r\n WebLabel9.Font.Style := [fsBold];\r\n WebLabel9.HeightPercent := 100.000000000000000000;\r\n WebLabel9.ParentFont := False;\r\n WebLabel9.WidthStyle := ssAuto;\r\n WebLabel9.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel9, Self, 'OnDblClick', 'WebLabel36DblClick');\r\n SetEvent(WebLabel9, Self, 'OnMouseMove', 'WebLabel36MouseMove');\r\n SetEvent(WebLabel9, Self, 'OnDragDrop', 'WebLabel8DragDrop');\r\n SetEvent(WebLabel9, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebMemo5.SetParentComponent(B7);\r\n WebMemo5.Name := 'WebMemo5';\r\n WebMemo5.Left := 0;\r\n WebMemo5.Top := 51;\r\n WebMemo5.Width := 100;\r\n WebMemo5.Height := 9;\r\n WebMemo5.Align := alBottom;\r\n WebMemo5.BorderStyle := bsNone;\r\n WebMemo5.ElementClassName := 'block_memo';\r\n WebMemo5.ElementFont := efCSS;\r\n WebMemo5.Font.Charset := ANSI_CHARSET;\r\n WebMemo5.Font.Color := clBlack;\r\n WebMemo5.Font.Height := -16;\r\n WebMemo5.Font.Name := 'Tahoma';\r\n WebMemo5.Font.Style := [];\r\n WebMemo5.HeightPercent := 100.000000000000000000;\r\n WebMemo5.ParentFont := False;\r\n WebMemo5.ReadOnly := True;\r\n WebMemo5.SelLength := 0;\r\n WebMemo5.SelStart := 0;\r\n WebMemo5.ShowFocus := False;\r\n WebMemo5.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebMemo5, Self, 'OnMouseMove', 'M1MouseMove');\r\n WebHTMLContainer7.SetParentComponent(B7);\r\n WebHTMLContainer7.Name := 'WebHTMLContainer7';\r\n WebHTMLContainer7.Left := 0;\r\n WebHTMLContainer7.Top := 41;\r\n WebHTMLContainer7.Width := 100;\r\n WebHTMLContainer7.Height := 10;\r\n WebHTMLContainer7.Align := alBottom;\r\n WebHTMLContainer7.ChildOrder := 2;\r\n WebHTMLContainer7.ScrollStyle := ssVertical;\r\n WebHTMLContainer7.Visible := False;\r\n SetEvent(WebHTMLContainer7, Self, 'OnMouseMove', 'M1MouseMove');\r\n B8.SetParentComponent(sbInfoBoxes);\r\n B8.Name := 'B8';\r\n B8.Tag := -2;\r\n B8.Left := 349;\r\n B8.Top := 1;\r\n B8.Width := 100;\r\n B8.Height := 60;\r\n B8.ElementClassName := 'data_block';\r\n B8.BorderColor := clWhite;\r\n B8.ChildOrder := 3;\r\n B8.Color := 16185849;\r\n B8.Font.Charset := ANSI_CHARSET;\r\n B8.Font.Color := clBlack;\r\n B8.Font.Height := -13;\r\n B8.Font.Name := 'Tahoma';\r\n B8.Font.Style := [];\r\n B8.ParentFont := False;\r\n B8.TabOrder := 2;\r\n SetEvent(B8, Self, 'OnMouseLeave', 'B1MouseLeave');\r\n SetEvent(B8, Self, 'OnMouseMove', 'B1MouseMove');\r\n WebPanel17.SetParentComponent(B8);\r\n WebPanel17.Name := 'WebPanel17';\r\n WebPanel17.Left := 0;\r\n WebPanel17.Top := 0;\r\n WebPanel17.Width := 100;\r\n WebPanel17.Height := 20;\r\n WebPanel17.ElementClassName := 'block_top';\r\n WebPanel17.HeightStyle := ssAuto;\r\n WebPanel17.Align := alTop;\r\n WebPanel17.BorderStyle := bsNone;\r\n WebPanel17.ChildOrder := 2;\r\n WebPanel17.Color := clWhite;\r\n WebPanel17.DragMode := dmAutomatic;\r\n WebPanel17.ElementFont := efCSS;\r\n WebPanel17.TabOrder := 0;\r\n SetEvent(WebPanel17, Self, 'OnDblClick', 'WebLabel36DblClick');\r\n SetEvent(WebPanel17, Self, 'OnMouseMove', 'WebPanel7MouseMove');\r\n SetEvent(WebPanel17, Self, 'OnDragDrop', 'WebLabel8DragDrop');\r\n SetEvent(WebPanel17, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel10.SetParentComponent(WebPanel17);\r\n WebLabel10.Name := 'WebLabel10';\r\n WebLabel10.Left := 0;\r\n WebLabel10.Top := 0;\r\n WebLabel10.Width := 63;\r\n WebLabel10.Height := 20;\r\n WebLabel10.Align := alLeft;\r\n WebLabel10.Caption := 'Info Box3';\r\n WebLabel10.Color := 16185849;\r\n WebLabel10.DragMode := dmAutomatic;\r\n WebLabel10.ElementClassName := 'block_title';\r\n WebLabel10.ElementLabelClassName := 'block_title';\r\n WebLabel10.ElementFont := efCSS;\r\n WebLabel10.Font.Charset := ANSI_CHARSET;\r\n WebLabel10.Font.Color := clNavy;\r\n WebLabel10.Font.Height := -13;\r\n WebLabel10.Font.Name := 'Segoe UI Emoji';\r\n WebLabel10.Font.Style := [fsBold];\r\n WebLabel10.HeightPercent := 100.000000000000000000;\r\n WebLabel10.ParentFont := False;\r\n WebLabel10.WidthStyle := ssAuto;\r\n WebLabel10.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel10, Self, 'OnDblClick', 'WebLabel36DblClick');\r\n SetEvent(WebLabel10, Self, 'OnMouseMove', 'WebLabel36MouseMove');\r\n SetEvent(WebLabel10, Self, 'OnDragDrop', 'WebLabel8DragDrop');\r\n SetEvent(WebLabel10, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebMemo7.SetParentComponent(B8);\r\n WebMemo7.Name := 'WebMemo7';\r\n WebMemo7.Left := 0;\r\n WebMemo7.Top := 51;\r\n WebMemo7.Width := 100;\r\n WebMemo7.Height := 9;\r\n WebMemo7.Align := alBottom;\r\n WebMemo7.BorderStyle := bsNone;\r\n WebMemo7.ElementClassName := 'block_memo';\r\n WebMemo7.ElementFont := efCSS;\r\n WebMemo7.Font.Charset := ANSI_CHARSET;\r\n WebMemo7.Font.Color := clBlack;\r\n WebMemo7.Font.Height := -16;\r\n WebMemo7.Font.Name := 'Tahoma';\r\n WebMemo7.Font.Style := [];\r\n WebMemo7.HeightPercent := 100.000000000000000000;\r\n WebMemo7.ParentFont := False;\r\n WebMemo7.ReadOnly := True;\r\n WebMemo7.SelLength := 0;\r\n WebMemo7.SelStart := 0;\r\n WebMemo7.ShowFocus := False;\r\n WebMemo7.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebMemo7, Self, 'OnMouseMove', 'M1MouseMove');\r\n WebHTMLContainer8.SetParentComponent(B8);\r\n WebHTMLContainer8.Name := 'WebHTMLContainer8';\r\n WebHTMLContainer8.Left := 0;\r\n WebHTMLContainer8.Top := 41;\r\n WebHTMLContainer8.Width := 100;\r\n WebHTMLContainer8.Height := 10;\r\n WebHTMLContainer8.Align := alBottom;\r\n WebHTMLContainer8.ChildOrder := 2;\r\n WebHTMLContainer8.ScrollStyle := ssVertical;\r\n WebHTMLContainer8.Visible := False;\r\n SetEvent(WebHTMLContainer8, Self, 'OnMouseMove', 'M1MouseMove');\r\n B9.SetParentComponent(sbInfoBoxes);\r\n B9.Name := 'B9';\r\n B9.Tag := -2;\r\n B9.Left := 509;\r\n B9.Top := 1;\r\n B9.Width := 100;\r\n B9.Height := 60;\r\n B9.ElementClassName := 'data_block';\r\n B9.BorderColor := clWhite;\r\n B9.ChildOrder := 4;\r\n B9.Color := 16185849;\r\n B9.Font.Charset := ANSI_CHARSET;\r\n B9.Font.Color := clBlack;\r\n B9.Font.Height := -13;\r\n B9.Font.Name := 'Tahoma';\r\n B9.Font.Style := [];\r\n B9.ParentFont := False;\r\n B9.TabOrder := 3;\r\n SetEvent(B9, Self, 'OnMouseLeave', 'B1MouseLeave');\r\n SetEvent(B9, Self, 'OnMouseMove', 'B1MouseMove');\r\n WebPanel19.SetParentComponent(B9);\r\n WebPanel19.Name := 'WebPanel19';\r\n WebPanel19.Left := 0;\r\n WebPanel19.Top := 0;\r\n WebPanel19.Width := 100;\r\n WebPanel19.Height := 20;\r\n WebPanel19.ElementClassName := 'block_top';\r\n WebPanel19.HeightStyle := ssAuto;\r\n WebPanel19.Align := alTop;\r\n WebPanel19.BorderStyle := bsNone;\r\n WebPanel19.ChildOrder := 2;\r\n WebPanel19.Color := clWhite;\r\n WebPanel19.DragMode := dmAutomatic;\r\n WebPanel19.ElementFont := efCSS;\r\n WebPanel19.TabOrder := 0;\r\n SetEvent(WebPanel19, Self, 'OnDblClick', 'WebLabel36DblClick');\r\n SetEvent(WebPanel19, Self, 'OnMouseMove', 'WebPanel7MouseMove');\r\n SetEvent(WebPanel19, Self, 'OnDragDrop', 'WebLabel8DragDrop');\r\n SetEvent(WebPanel19, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel11.SetParentComponent(WebPanel19);\r\n WebLabel11.Name := 'WebLabel11';\r\n WebLabel11.Left := 0;\r\n WebLabel11.Top := 0;\r\n WebLabel11.Width := 63;\r\n WebLabel11.Height := 20;\r\n WebLabel11.Align := alLeft;\r\n WebLabel11.Caption := 'Info Box4';\r\n WebLabel11.Color := 16185849;\r\n WebLabel11.DragMode := dmAutomatic;\r\n WebLabel11.ElementClassName := 'block_title';\r\n WebLabel11.ElementLabelClassName := 'block_title';\r\n WebLabel11.ElementFont := efCSS;\r\n WebLabel11.Font.Charset := ANSI_CHARSET;\r\n WebLabel11.Font.Color := clNavy;\r\n WebLabel11.Font.Height := -13;\r\n WebLabel11.Font.Name := 'Segoe UI Emoji';\r\n WebLabel11.Font.Style := [fsBold];\r\n WebLabel11.HeightPercent := 100.000000000000000000;\r\n WebLabel11.ParentFont := False;\r\n WebLabel11.WidthStyle := ssAuto;\r\n WebLabel11.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel11, Self, 'OnDblClick', 'WebLabel36DblClick');\r\n SetEvent(WebLabel11, Self, 'OnMouseMove', 'WebLabel36MouseMove');\r\n SetEvent(WebLabel11, Self, 'OnDragDrop', 'WebLabel8DragDrop');\r\n SetEvent(WebLabel11, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebMemo8.SetParentComponent(B9);\r\n WebMemo8.Name := 'WebMemo8';\r\n WebMemo8.Left := 0;\r\n WebMemo8.Top := 51;\r\n WebMemo8.Width := 100;\r\n WebMemo8.Height := 9;\r\n WebMemo8.Align := alBottom;\r\n WebMemo8.BorderStyle := bsNone;\r\n WebMemo8.ElementClassName := 'block_memo';\r\n WebMemo8.ElementFont := efCSS;\r\n WebMemo8.Font.Charset := ANSI_CHARSET;\r\n WebMemo8.Font.Color := clBlack;\r\n WebMemo8.Font.Height := -16;\r\n WebMemo8.Font.Name := 'Tahoma';\r\n WebMemo8.Font.Style := [];\r\n WebMemo8.HeightPercent := 100.000000000000000000;\r\n WebMemo8.ParentFont := False;\r\n WebMemo8.ReadOnly := True;\r\n WebMemo8.SelLength := 0;\r\n WebMemo8.SelStart := 0;\r\n WebMemo8.ShowFocus := False;\r\n WebMemo8.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebMemo8, Self, 'OnMouseMove', 'M1MouseMove');\r\n WebHTMLContainer9.SetParentComponent(B9);\r\n WebHTMLContainer9.Name := 'WebHTMLContainer9';\r\n WebHTMLContainer9.Left := 0;\r\n WebHTMLContainer9.Top := 41;\r\n WebHTMLContainer9.Width := 100;\r\n WebHTMLContainer9.Height := 10;\r\n WebHTMLContainer9.Align := alBottom;\r\n WebHTMLContainer9.ChildOrder := 2;\r\n WebHTMLContainer9.ScrollStyle := ssVertical;\r\n WebHTMLContainer9.Visible := False;\r\n SetEvent(WebHTMLContainer9, Self, 'OnMouseMove', 'M1MouseMove');\r\n B10.SetParentComponent(sbInfoBoxes);\r\n B10.Name := 'B10';\r\n B10.Tag := -2;\r\n B10.Left := 658;\r\n B10.Top := 1;\r\n B10.Width := 100;\r\n B10.Height := 60;\r\n B10.ElementClassName := 'data_block';\r\n B10.BorderColor := clWhite;\r\n B10.ChildOrder := 5;\r\n B10.Color := 16185849;\r\n B10.Font.Charset := ANSI_CHARSET;\r\n B10.Font.Color := clBlack;\r\n B10.Font.Height := -13;\r\n B10.Font.Name := 'Tahoma';\r\n B10.Font.Style := [];\r\n B10.ParentFont := False;\r\n B10.TabOrder := 4;\r\n SetEvent(B10, Self, 'OnMouseLeave', 'B1MouseLeave');\r\n SetEvent(B10, Self, 'OnMouseMove', 'B1MouseMove');\r\n WebPanel21.SetParentComponent(B10);\r\n WebPanel21.Name := 'WebPanel21';\r\n WebPanel21.Left := 0;\r\n WebPanel21.Top := 0;\r\n WebPanel21.Width := 100;\r\n WebPanel21.Height := 20;\r\n WebPanel21.ElementClassName := 'block_top';\r\n WebPanel21.HeightStyle := ssAuto;\r\n WebPanel21.Align := alTop;\r\n WebPanel21.BorderStyle := bsNone;\r\n WebPanel21.ChildOrder := 2;\r\n WebPanel21.Color := clWhite;\r\n WebPanel21.DragMode := dmAutomatic;\r\n WebPanel21.ElementFont := efCSS;\r\n WebPanel21.TabOrder := 0;\r\n SetEvent(WebPanel21, Self, 'OnDblClick', 'WebLabel36DblClick');\r\n SetEvent(WebPanel21, Self, 'OnMouseMove', 'WebPanel7MouseMove');\r\n SetEvent(WebPanel21, Self, 'OnDragDrop', 'WebLabel8DragDrop');\r\n SetEvent(WebPanel21, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebLabel12.SetParentComponent(WebPanel21);\r\n WebLabel12.Name := 'WebLabel12';\r\n WebLabel12.Left := 0;\r\n WebLabel12.Top := 0;\r\n WebLabel12.Width := 63;\r\n WebLabel12.Height := 20;\r\n WebLabel12.Align := alLeft;\r\n WebLabel12.Caption := 'Info Box5';\r\n WebLabel12.Color := 16185849;\r\n WebLabel12.DragMode := dmAutomatic;\r\n WebLabel12.ElementClassName := 'block_title';\r\n WebLabel12.ElementLabelClassName := 'block_title';\r\n WebLabel12.ElementFont := efCSS;\r\n WebLabel12.Font.Charset := ANSI_CHARSET;\r\n WebLabel12.Font.Color := clNavy;\r\n WebLabel12.Font.Height := -13;\r\n WebLabel12.Font.Name := 'Segoe UI Emoji';\r\n WebLabel12.Font.Style := [fsBold];\r\n WebLabel12.HeightPercent := 100.000000000000000000;\r\n WebLabel12.ParentFont := False;\r\n WebLabel12.WidthStyle := ssAuto;\r\n WebLabel12.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebLabel12, Self, 'OnDblClick', 'WebLabel36DblClick');\r\n SetEvent(WebLabel12, Self, 'OnMouseMove', 'WebLabel36MouseMove');\r\n SetEvent(WebLabel12, Self, 'OnDragDrop', 'WebLabel8DragDrop');\r\n SetEvent(WebLabel12, Self, 'OnDragOver', '_BlockDragOverTitle');\r\n WebMemo9.SetParentComponent(B10);\r\n WebMemo9.Name := 'WebMemo9';\r\n WebMemo9.Left := 0;\r\n WebMemo9.Top := 51;\r\n WebMemo9.Width := 100;\r\n WebMemo9.Height := 9;\r\n WebMemo9.Align := alBottom;\r\n WebMemo9.BorderStyle := bsNone;\r\n WebMemo9.ElementClassName := 'block_memo';\r\n WebMemo9.ElementFont := efCSS;\r\n WebMemo9.Font.Charset := ANSI_CHARSET;\r\n WebMemo9.Font.Color := clBlack;\r\n WebMemo9.Font.Height := -16;\r\n WebMemo9.Font.Name := 'Tahoma';\r\n WebMemo9.Font.Style := [];\r\n WebMemo9.HeightPercent := 100.000000000000000000;\r\n WebMemo9.ParentFont := False;\r\n WebMemo9.ReadOnly := True;\r\n WebMemo9.SelLength := 0;\r\n WebMemo9.SelStart := 0;\r\n WebMemo9.ShowFocus := False;\r\n WebMemo9.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebMemo9, Self, 'OnMouseMove', 'M1MouseMove');\r\n WebHTMLContainer10.SetParentComponent(B10);\r\n WebHTMLContainer10.Name := 'WebHTMLContainer10';\r\n WebHTMLContainer10.Left := 0;\r\n WebHTMLContainer10.Top := 41;\r\n WebHTMLContainer10.Width := 100;\r\n WebHTMLContainer10.Height := 10;\r\n WebHTMLContainer10.Align := alBottom;\r\n WebHTMLContainer10.ChildOrder := 2;\r\n WebHTMLContainer10.ScrollStyle := ssVertical;\r\n WebHTMLContainer10.Visible := False;\r\n SetEvent(WebHTMLContainer10, Self, 'OnMouseMove', 'M1MouseMove');\r\n FormContainer1.SetParentComponent(pnlFormArea);\r\n FormContainer1.Name := 'FormContainer1';\r\n FormContainer1.AlignWithMargins := True;\r\n FormContainer1.Left := 957;\r\n FormContainer1.Top := 166;\r\n FormContainer1.Width := 290;\r\n FormContainer1.Height := 25;\r\n FormContainer1.Margins.Left := 15;\r\n FormContainer1.ChildOrder := 4;\r\n FormContainer1.Role := '';\r\n FormContainer1.Visible := False;\r\n FormContainer2.SetParentComponent(pnlFormArea);\r\n FormContainer2.Name := 'FormContainer2';\r\n FormContainer2.AlignWithMargins := True;\r\n FormContainer2.Left := 960;\r\n FormContainer2.Top := 197;\r\n FormContainer2.Width := 290;\r\n FormContainer2.Height := 25;\r\n FormContainer2.Margins.Left := 15;\r\n FormContainer2.ChildOrder := 4;\r\n FormContainer2.Role := '';\r\n FormContainer2.Visible := False;\r\n FormContainer3.SetParentComponent(pnlFormArea);\r\n FormContainer3.Name := 'FormContainer3';\r\n FormContainer3.AlignWithMargins := True;\r\n FormContainer3.Left := 960;\r\n FormContainer3.Top := 229;\r\n FormContainer3.Width := 290;\r\n FormContainer3.Height := 25;\r\n FormContainer3.Margins.Left := 15;\r\n FormContainer3.ChildOrder := 4;\r\n FormContainer3.Role := '';\r\n FormContainer3.Visible := False;\r\n FormContainer4.SetParentComponent(pnlFormArea);\r\n FormContainer4.Name := 'FormContainer4';\r\n FormContainer4.AlignWithMargins := True;\r\n FormContainer4.Left := 960;\r\n FormContainer4.Top := 261;\r\n FormContainer4.Width := 290;\r\n FormContainer4.Height := 25;\r\n FormContainer4.Margins.Left := 15;\r\n FormContainer4.ChildOrder := 4;\r\n FormContainer4.Role := '';\r\n FormContainer4.Visible := False;\r\n FormContainer5.SetParentComponent(pnlFormArea);\r\n FormContainer5.Name := 'FormContainer5';\r\n FormContainer5.AlignWithMargins := True;\r\n FormContainer5.Left := 960;\r\n FormContainer5.Top := 293;\r\n FormContainer5.Width := 290;\r\n FormContainer5.Height := 25;\r\n FormContainer5.Margins.Left := 15;\r\n FormContainer5.ChildOrder := 4;\r\n FormContainer5.Role := '';\r\n FormContainer5.Visible := False;\r\n FormContainer6.SetParentComponent(pnlFormArea);\r\n FormContainer6.Name := 'FormContainer6';\r\n FormContainer6.AlignWithMargins := True;\r\n FormContainer6.Left := 960;\r\n FormContainer6.Top := 326;\r\n FormContainer6.Width := 290;\r\n FormContainer6.Height := 25;\r\n FormContainer6.Margins.Left := 15;\r\n FormContainer6.ChildOrder := 4;\r\n FormContainer6.Role := '';\r\n FormContainer6.Visible := False;\r\n FormContainer7.SetParentComponent(pnlFormArea);\r\n FormContainer7.Name := 'FormContainer7';\r\n FormContainer7.AlignWithMargins := True;\r\n FormContainer7.Left := 960;\r\n FormContainer7.Top := 357;\r\n FormContainer7.Width := 290;\r\n FormContainer7.Height := 25;\r\n FormContainer7.Margins.Left := 15;\r\n FormContainer7.ChildOrder := 4;\r\n FormContainer7.Role := '';\r\n FormContainer7.Visible := False;\r\n FormContainer8.SetParentComponent(pnlFormArea);\r\n FormContainer8.Name := 'FormContainer8';\r\n FormContainer8.AlignWithMargins := True;\r\n FormContainer8.Left := 960;\r\n FormContainer8.Top := 389;\r\n FormContainer8.Width := 290;\r\n FormContainer8.Height := 25;\r\n FormContainer8.Margins.Left := 15;\r\n FormContainer8.ChildOrder := 4;\r\n FormContainer8.Role := '';\r\n FormContainer8.Visible := False;\r\n FormContainer9.SetParentComponent(pnlFormArea);\r\n FormContainer9.Name := 'FormContainer9';\r\n FormContainer9.AlignWithMargins := True;\r\n FormContainer9.Left := 960;\r\n FormContainer9.Top := 421;\r\n FormContainer9.Width := 290;\r\n FormContainer9.Height := 25;\r\n FormContainer9.Margins.Left := 15;\r\n FormContainer9.ChildOrder := 4;\r\n FormContainer9.Role := '';\r\n FormContainer9.Visible := False;\r\n WebInputMessageDlg1.SetParentComponent(pnlFormArea);\r\n WebInputMessageDlg1.Name := 'WebInputMessageDlg1';\r\n WebInputMessageDlg1.Left := 653;\r\n WebInputMessageDlg1.Top := 465;\r\n WebInputMessageDlg1.Width := 24;\r\n WebInputMessageDlg1.Height := 24;\r\n WebInputMessageDlg1.Buttons := [];\r\n WebInputMessageDlg1.CustomButtons.Clear;\r\n with WebInputMessageDlg1.CustomButtons.Add do\r\n begin\r\n end;\r\n WebInputMessageDlg1.DialogType := mtWarning;\r\n WebInputMessageDlg1.Message := 'Password';\r\n WebInputMessageDlg1.Opacity := 0.800000000000000000;\r\n WebInputMessageDlg1.ElementButtonClassName := 'password_okbutton';\r\n WebMemo1.SetParentComponent(pnlFormArea);\r\n WebMemo1.Name := 'WebMemo1';\r\n WebMemo1.Left := 831;\r\n WebMemo1.Top := 391;\r\n WebMemo1.Width := 80;\r\n WebMemo1.Height := 216;\r\n WebMemo1.Font.Charset := DEFAULT_CHARSET;\r\n WebMemo1.Font.Color := clWindowText;\r\n WebMemo1.Font.Height := -16;\r\n WebMemo1.Font.Name := 'Tahoma';\r\n WebMemo1.Font.Style := [];\r\n WebMemo1.HeightPercent := 100.000000000000000000;\r\n WebMemo1.Lines.BeginUpdate;\r\n try\r\n WebMemo1.Lines.Clear;\r\n WebMemo1.Lines.Add('');\r\n WebMemo1.Lines.Add('');\r\n WebMemo1.Lines.Add('
');\r\n WebMemo1.Lines.Add('
(%LABEL%)
');\r\n WebMemo1.Lines.Add('');\r\n WebMemo1.Lines.Add('
');\r\n WebMemo1.Lines.Add(' \"Image\"');\r\n WebMemo1.Lines.Add(' ');\r\n WebMemo1.Lines.Add(' ');\r\n WebMemo1.Lines.Add(' ');\r\n WebMemo1.Lines.Add('
');\r\n WebMemo1.Lines.Add('
(%COMMENTS%)
');\r\n WebMemo1.Lines.Add('
');\r\n WebMemo1.Lines.Add('');\r\n finally\r\n WebMemo1.Lines.EndUpdate;\r\n end;\r\n WebMemo1.ParentFont := False;\r\n WebMemo1.SelLength := 0;\r\n WebMemo1.SelStart := 0;\r\n WebMemo1.Visible := False;\r\n WebMemo1.WidthPercent := 100.000000000000000000;\r\n pnlBottomBar.SetParentComponent(Self);\r\n pnlBottomBar.Name := 'pnlBottomBar';\r\n pnlBottomBar.Left := 0;\r\n pnlBottomBar.Top := 1168;\r\n pnlBottomBar.Width := 1419;\r\n pnlBottomBar.Height := 32;\r\n pnlBottomBar.ElementClassName := 'main_bottom_bar';\r\n pnlBottomBar.Align := alBottom;\r\n pnlBottomBar.BorderStyle := bsNone;\r\n pnlBottomBar.ChildOrder := 17;\r\n pnlBottomBar.ElementFont := efCSS;\r\n pnlBottomBar.TabOrder := 2;\r\n WebLabel6.SetParentComponent(pnlBottomBar);\r\n WebLabel6.Name := 'WebLabel6';\r\n WebLabel6.Left := 0;\r\n WebLabel6.Top := 0;\r\n WebLabel6.Width := 4;\r\n WebLabel6.Height := 16;\r\n WebLabel6.ElementLabelClassName := 'text_normal';\r\n WebLabel6.ElementFont := efCSS;\r\n WebLabel6.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel6.Font.Color := clGray;\r\n WebLabel6.Font.Height := -13;\r\n WebLabel6.Font.Name := 'Tahoma';\r\n WebLabel6.Font.Style := [fsBold];\r\n WebLabel6.HeightPercent := 100.000000000000000000;\r\n WebLabel6.ParentFont := False;\r\n WebLabel6.WidthPercent := 100.000000000000000000;\r\n WebLabel5.SetParentComponent(pnlBottomBar);\r\n WebLabel5.Name := 'WebLabel5';\r\n WebLabel5.Left := 1360;\r\n WebLabel5.Top := 0;\r\n WebLabel5.Width := 59;\r\n WebLabel5.Height := 32;\r\n WebLabel5.Align := alRight;\r\n WebLabel5.Alignment := taCenter;\r\n WebLabel5.AutoSize := False;\r\n WebLabel5.Caption := '1.0.135';\r\n WebLabel5.ElementClassName := 'text_xbig_bold';\r\n WebLabel5.ElementFont := efCSS;\r\n WebLabel5.HeightStyle := ssAuto;\r\n WebLabel5.HeightPercent := 100.000000000000000000;\r\n WebLabel5.WidthPercent := 100.000000000000000000;\r\n btnSwitch_Design.SetParentComponent(pnlBottomBar);\r\n btnSwitch_Design.Name := 'btnSwitch_Design';\r\n btnSwitch_Design.Left := 3;\r\n btnSwitch_Design.Top := -1;\r\n btnSwitch_Design.Width := 89;\r\n btnSwitch_Design.Height := 32;\r\n btnSwitch_Design.Hint := 'Design ( Password is Required )';\r\n btnSwitch_Design.ParentDoubleBuffered := False;\r\n btnSwitch_Design.Color := clBtnFace;\r\n btnSwitch_Design.DoubleBuffered := True;\r\n btnSwitch_Design.ParentShowHint := False;\r\n btnSwitch_Design.ShowHint := True;\r\n btnSwitch_Design.TabOrder := 0;\r\n SetEvent(btnSwitch_Design, Self, 'OnClick', 'btnSwitch_DesignClick');\r\n SetEvent(btnSwitch_Design, Self, 'OnKeyDown', 'btnSwitch_DesignKeyDown');\r\n btnSwitch_Design.AppearanceOff.Fill.Color := -1;\r\n btnSwitch_Design.AppearanceOff.Font.Charset := DEFAULT_CHARSET;\r\n btnSwitch_Design.AppearanceOff.Font.Color := clBlack;\r\n btnSwitch_Design.AppearanceOff.Font.Height := -13;\r\n btnSwitch_Design.AppearanceOff.Font.Name := 'Tahoma';\r\n btnSwitch_Design.AppearanceOff.Font.Style := [];\r\n btnSwitch_Design.AppearanceOff.Text := 'Design';\r\n btnSwitch_Design.AppearanceOn.Fill.Color := 43519;\r\n btnSwitch_Design.AppearanceOn.Font.Charset := DEFAULT_CHARSET;\r\n btnSwitch_Design.AppearanceOn.Font.Color := clBlack;\r\n btnSwitch_Design.AppearanceOn.Font.Height := -13;\r\n btnSwitch_Design.AppearanceOn.Font.Name := 'Tahoma';\r\n btnSwitch_Design.AppearanceOn.Font.Style := [];\r\n btnSwitch_Design.AppearanceOn.Text := 'Design';\r\n btnSwitch_Design.AnimationFactor := 8;\r\n btnSwitch_Design.Layout := sloExtended;\r\n btnSwitch_Design.Rounded := True;\r\n SetEvent(btnSwitch_Design, Self, 'OnChange', '_SwitchFormDesign');\r\n cbCurrentFacilityName.SetParentComponent(pnlBottomBar);\r\n cbCurrentFacilityName.Name := 'cbCurrentFacilityName';\r\n cbCurrentFacilityName.Left := 113;\r\n cbCurrentFacilityName.Top := 6;\r\n cbCurrentFacilityName.Width := 271;\r\n cbCurrentFacilityName.Height := 21;\r\n cbCurrentFacilityName.ElementClassName := 'box_bottomborder_font_normal';\r\n cbCurrentFacilityName.Font.Charset := DEFAULT_CHARSET;\r\n cbCurrentFacilityName.Font.Color := clGray;\r\n cbCurrentFacilityName.Font.Height := -11;\r\n cbCurrentFacilityName.Font.Name := 'Tahoma';\r\n cbCurrentFacilityName.Font.Style := [];\r\n cbCurrentFacilityName.HeightPercent := 100.000000000000000000;\r\n cbCurrentFacilityName.ParentFont := False;\r\n cbCurrentFacilityName.WidthPercent := 50.000000000000000000;\r\n SetEvent(cbCurrentFacilityName, Self, 'OnChange', 'cbCurrentFacilityNameChange');\r\n cbCurrentFacilityName.ItemIndex := -1;\r\n edtArgusIndicator.SetParentComponent(pnlBottomBar);\r\n edtArgusIndicator.Name := 'edtArgusIndicator';\r\n edtArgusIndicator.Left := 1312;\r\n edtArgusIndicator.Top := 0;\r\n edtArgusIndicator.Width := 48;\r\n edtArgusIndicator.Height := 32;\r\n edtArgusIndicator.Align := alRight;\r\n edtArgusIndicator.Alignment := taCenter;\r\n edtArgusIndicator.ChildOrder := 1;\r\n edtArgusIndicator.ElementClassName := 'argus_indicator';\r\n edtArgusIndicator.ElementFont := efCSS;\r\n edtArgusIndicator.HeightStyle := ssAuto;\r\n edtArgusIndicator.HeightPercent := 100.000000000000000000;\r\n edtArgusIndicator.ReadOnly := True;\r\n edtArgusIndicator.Text := 'Argus';\r\n edtArgusIndicator.Visible := False;\r\n edtArgusIndicator.WidthPercent := 100.000000000000000000;\r\n edtQPKLCacheIndicator.SetParentComponent(pnlBottomBar);\r\n edtQPKLCacheIndicator.Name := 'edtQPKLCacheIndicator';\r\n edtQPKLCacheIndicator.Left := 1272;\r\n edtQPKLCacheIndicator.Top := 0;\r\n edtQPKLCacheIndicator.Width := 40;\r\n edtQPKLCacheIndicator.Height := 32;\r\n edtQPKLCacheIndicator.Align := alRight;\r\n edtQPKLCacheIndicator.Alignment := taCenter;\r\n edtQPKLCacheIndicator.ChildOrder := 1;\r\n edtQPKLCacheIndicator.ElementClassName := 'cache_indicator';\r\n edtQPKLCacheIndicator.ElementFont := efCSS;\r\n edtQPKLCacheIndicator.HeightStyle := ssAuto;\r\n edtQPKLCacheIndicator.HeightPercent := 100.000000000000000000;\r\n edtQPKLCacheIndicator.ReadOnly := True;\r\n edtQPKLCacheIndicator.Text := 'Cache';\r\n edtQPKLCacheIndicator.Visible := False;\r\n edtQPKLCacheIndicator.WidthPercent := 100.000000000000000000;\r\n ind_DBService.SetParentComponent(pnlBottomBar);\r\n ind_DBService.Name := 'ind_DBService';\r\n ind_DBService.Left := 1242;\r\n ind_DBService.Top := 0;\r\n ind_DBService.Width := 30;\r\n ind_DBService.Height := 32;\r\n ind_DBService.Cursor := crHandPoint;\r\n ind_DBService.Hint := 'turn the microphone on/off';\r\n ind_DBService.Margins.Left := 1;\r\n ind_DBService.Margins.Top := 1;\r\n ind_DBService.Margins.Right := 1;\r\n ind_DBService.Margins.Bottom := 1;\r\n ind_DBService.Align := alRight;\r\n ind_DBService.Caption := '';\r\n ind_DBService.Color := clNone;\r\n ind_DBService.ElementClassName := 'db_indicator_on';\r\n ind_DBService.ElementFont := efCSS;\r\n ind_DBService.Font.Charset := DEFAULT_CHARSET;\r\n ind_DBService.Font.Color := clWindowText;\r\n ind_DBService.Font.Height := -11;\r\n ind_DBService.Font.Name := 'Tahoma';\r\n ind_DBService.Font.Style := [];\r\n ind_DBService.HeightPercent := 100.000000000000000000;\r\n ind_DBService.ParentFont := False;\r\n ind_DBService.ShowHint := True;\r\n ind_DBService.WidthPercent := 100.000000000000000000;\r\n SetEvent(ind_DBService, Self, 'OnMouseMove', 'ind_DBServiceMouseMove');\r\n btnDesign_Clone.SetParentComponent(pnlBottomBar);\r\n btnDesign_Clone.Name := 'btnDesign_Clone';\r\n btnDesign_Clone.Left := 440;\r\n btnDesign_Clone.Top := 1;\r\n btnDesign_Clone.Width := 89;\r\n btnDesign_Clone.Height := 32;\r\n btnDesign_Clone.Hint := 'Design';\r\n btnDesign_Clone.ParentDoubleBuffered := False;\r\n btnDesign_Clone.Color := clBtnFace;\r\n btnDesign_Clone.DoubleBuffered := True;\r\n btnDesign_Clone.ParentShowHint := False;\r\n btnDesign_Clone.ShowHint := True;\r\n btnDesign_Clone.TabOrder := 5;\r\n btnDesign_Clone.Visible := False;\r\n SetEvent(btnDesign_Clone, Self, 'OnClick', 'btnSwitch_DesignClick');\r\n SetEvent(btnDesign_Clone, Self, 'OnKeyDown', 'btnSwitch_DesignKeyDown');\r\n btnDesign_Clone.AppearanceOff.Fill.Color := -1;\r\n btnDesign_Clone.AppearanceOff.Font.Charset := DEFAULT_CHARSET;\r\n btnDesign_Clone.AppearanceOff.Font.Color := clBlack;\r\n btnDesign_Clone.AppearanceOff.Font.Height := -13;\r\n btnDesign_Clone.AppearanceOff.Font.Name := 'Tahoma';\r\n btnDesign_Clone.AppearanceOff.Font.Style := [];\r\n btnDesign_Clone.AppearanceOff.Text := 'Design';\r\n btnDesign_Clone.AppearanceOn.Fill.Color := 43519;\r\n btnDesign_Clone.AppearanceOn.Font.Charset := DEFAULT_CHARSET;\r\n btnDesign_Clone.AppearanceOn.Font.Color := clBlack;\r\n btnDesign_Clone.AppearanceOn.Font.Height := -13;\r\n btnDesign_Clone.AppearanceOn.Font.Name := 'Tahoma';\r\n btnDesign_Clone.AppearanceOn.Font.Style := [];\r\n btnDesign_Clone.AppearanceOn.Text := 'Design';\r\n btnDesign_Clone.AnimationFactor := 8;\r\n btnDesign_Clone.Layout := sloExtended;\r\n btnDesign_Clone.Rounded := True;\r\n SetEvent(btnDesign_Clone, Self, 'OnChange', '_SwitchFormDesign');\r\n btnMicStart_base.SetParentComponent(pnlBottomBar);\r\n btnMicStart_base.Name := 'btnMicStart_base';\r\n btnMicStart_base.Left := 1206;\r\n btnMicStart_base.Top := 0;\r\n btnMicStart_base.Width := 36;\r\n btnMicStart_base.Height := 32;\r\n btnMicStart_base.Cursor := crHandPoint;\r\n btnMicStart_base.Hint := 'turn the microphone on/off';\r\n btnMicStart_base.Margins.Left := 1;\r\n btnMicStart_base.Margins.Top := 1;\r\n btnMicStart_base.Margins.Right := 1;\r\n btnMicStart_base.Margins.Bottom := 1;\r\n btnMicStart_base.Align := alRight;\r\n btnMicStart_base.Caption := '';\r\n btnMicStart_base.Color := clNone;\r\n btnMicStart_base.ElementClassName := 'btn_icon';\r\n btnMicStart_base.ElementFont := efCSS;\r\n btnMicStart_base.Font.Charset := DEFAULT_CHARSET;\r\n btnMicStart_base.Font.Color := clWindowText;\r\n btnMicStart_base.Font.Height := -11;\r\n btnMicStart_base.Font.Name := 'Tahoma';\r\n btnMicStart_base.Font.Style := [];\r\n btnMicStart_base.HeightPercent := 100.000000000000000000;\r\n btnMicStart_base.ParentFont := False;\r\n btnMicStart_base.ShowHint := True;\r\n btnMicStart_base.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnMicStart_base, Self, 'OnClick', 'btnMicStart_baseClick');\r\n tmQPKLFilter.SetParentComponent(Self);\r\n tmQPKLFilter.Name := 'tmQPKLFilter';\r\n tmQPKLFilter.Enabled := False;\r\n SetEvent(tmQPKLFilter, Self, 'OnTimer', 'tmQPKLFilterTimer');\r\n tmQPKLFilter.Left := 763;\r\n tmQPKLFilter.Top := 312;\r\n pmBlockMenu.SetParentComponent(Self);\r\n pmBlockMenu.Name := 'pmBlockMenu';\r\n pmBlockMenu.Appearance.BackgroundColor := 16448250;\r\n pmBlockMenu.Appearance.HamburgerMenu.Caption := 'Menu';\r\n pmBlockMenu.Appearance.HoverColor := 14671839;\r\n pmBlockMenu.Appearance.HoverFontColor := clBlack;\r\n pmBlockMenu.Appearance.ImageSize := 0;\r\n pmBlockMenu.Appearance.SubmenuIndicator := '►';\r\n pmBlockMenu.ElementItemClassName := 'drop-label';\r\n pmBlockMenu.Font.Charset := DEFAULT_CHARSET;\r\n pmBlockMenu.Font.Color := clWindowText;\r\n pmBlockMenu.Font.Height := -11;\r\n pmBlockMenu.Font.Name := 'Tahoma';\r\n pmBlockMenu.Font.Style := [];\r\n pmBlockMenu.Left := 257;\r\n pmBlockMenu.Top := 386;\r\n miCurrentDate.SetParentComponent(pmBlockMenu);\r\n miCurrentDate.Name := 'miCurrentDate';\r\n miCurrentDate.Caption := 'Current Date';\r\n SetEvent(miCurrentDate, Self, 'OnClick', 'miCurrentDateClick');\r\n miCurrentTime.SetParentComponent(pmBlockMenu);\r\n miCurrentTime.Name := 'miCurrentTime';\r\n miCurrentTime.Caption := 'Current Time';\r\n SetEvent(miCurrentTime, Self, 'OnClick', 'miCurrentTimeClick');\r\n miCalendar.SetParentComponent(pmBlockMenu);\r\n miCalendar.Name := 'miCalendar';\r\n miCalendar.Caption := 'Date';\r\n SetEvent(miCalendar, Self, 'OnClick', 'miCalendarClick');\r\n miTimePicker.SetParentComponent(pmBlockMenu);\r\n miTimePicker.Name := 'miTimePicker';\r\n miTimePicker.Caption := 'Time';\r\n SetEvent(miTimePicker, Self, 'OnClick', 'miTimePickerClick');\r\n miDefault.SetParentComponent(pmBlockMenu);\r\n miDefault.Name := 'miDefault';\r\n miDefault.Caption := 'Default';\r\n SetEvent(miDefault, Self, 'OnClick', 'miDefaultClick');\r\n miClear.SetParentComponent(pmBlockMenu);\r\n miClear.Name := 'miClear';\r\n miClear.Caption := 'Clear';\r\n SetEvent(miClear, Self, 'OnClick', 'miClearClick');\r\n miDBFieldSetup.SetParentComponent(pmBlockMenu);\r\n miDBFieldSetup.Name := 'miDBFieldSetup';\r\n miDBFieldSetup.Caption := 'Data Source SetUp';\r\n SetEvent(miDBFieldSetup, Self, 'OnClick', 'miDBFieldSetupClick');\r\n miQPKLSetup.SetParentComponent(pmBlockMenu);\r\n miQPKLSetup.Name := 'miQPKLSetup';\r\n miQPKLSetup.Caption := 'Pick-List Setup';\r\n SetEvent(miQPKLSetup, Self, 'OnClick', 'miQPKLSetupClick');\r\n miClearCache.SetParentComponent(pmBlockMenu);\r\n miClearCache.Name := 'miClearCache';\r\n miClearCache.Caption := 'Clear Cache';\r\n SetEvent(miClearCache, Self, 'OnClick', 'miClearCacheClick');\r\n httpCall.SetParentComponent(Self);\r\n httpCall.Name := 'httpCall';\r\n httpCall.Command := httpPOST;\r\n httpCall.Headers.BeginUpdate;\r\n try\r\n httpCall.Headers.Clear;\r\n httpCall.Headers.Add('Cache-Control=no-cache, no-store, must-revalidate');\r\n finally\r\n httpCall.Headers.EndUpdate;\r\n end;\r\n SetEvent(httpCall, Self, 'OnResponse', 'httpCallResponse');\r\n httpCall.Left := 833;\r\n httpCall.Top := 314;\r\n tmGenTimer.SetParentComponent(Self);\r\n tmGenTimer.Name := 'tmGenTimer';\r\n tmGenTimer.Enabled := False;\r\n tmGenTimer.Interval := 1;\r\n SetEvent(tmGenTimer, Self, 'OnTimer', 'tmGenTimerTimer');\r\n tmGenTimer.Left := 211;\r\n tmGenTimer.Top := 24;\r\n WebSpeechRecognition_base.SetParentComponent(Self);\r\n WebSpeechRecognition_base.Name := 'WebSpeechRecognition_base';\r\n WebSpeechRecognition_base.Language := 'en-US';\r\n WebSpeechRecognition_base.Commands.Clear;\r\n with WebSpeechRecognition_base.Commands.Add do\r\n begin\r\n Value := 'Save';\r\n Tag := 0;\r\n end;\r\n with WebSpeechRecognition_base.Commands.Add do\r\n begin\r\n Value := 'Refresh';\r\n Tag := 0;\r\n end;\r\n with WebSpeechRecognition_base.Commands.Add do\r\n begin\r\n Value := 'go *object';\r\n Tag := 0;\r\n SetEvent(Self, 'OnCommand', 'WebSpeechRecognition_baseCommands2Command');\r\n end;\r\n with WebSpeechRecognition_base.Commands.Add do\r\n begin\r\n Value := 'question';\r\n Tag := 0;\r\n SetEvent(Self, 'OnCommand', 'WebSpeechRecognition_baseCommands3Command');\r\n end;\r\n with WebSpeechRecognition_base.Commands.Add do\r\n begin\r\n Value := 'Search';\r\n Tag := 0;\r\n SetEvent(Self, 'OnCommand', 'WebSpeechRecognition_baseCommands4Command');\r\n end;\r\n with WebSpeechRecognition_base.Commands.Add do\r\n begin\r\n Value := 'clear text';\r\n Tag := 0;\r\n SetEvent(Self, 'OnCommand', 'WebSpeechRecognition_baseCommands5Command');\r\n end;\r\n with WebSpeechRecognition_base.Commands.Add do\r\n begin\r\n Value := 'start';\r\n Tag := 0;\r\n SetEvent(Self, 'OnCommand', 'WebSpeechRecognition_baseCommands6Command');\r\n end;\r\n with WebSpeechRecognition_base.Commands.Add do\r\n begin\r\n Value := 'stop';\r\n Tag := 0;\r\n SetEvent(Self, 'OnCommand', 'WebSpeechRecognition_baseCommands7Command');\r\n end;\r\n with WebSpeechRecognition_base.Commands.Add do\r\n begin\r\n Value := 'capture';\r\n Tag := 0;\r\n SetEvent(Self, 'OnCommand', 'WebSpeechRecognition_baseCommands8Command');\r\n end;\r\n with WebSpeechRecognition_base.Commands.Add do\r\n begin\r\n Value := 'close *object';\r\n Tag := 0;\r\n SetEvent(Self, 'OnCommand', 'WebSpeechRecognition_baseCommands9Command');\r\n end;\r\n SetEvent(WebSpeechRecognition_base, Self, 'OnNoResultMatch', 'WebSpeechRecognition_baseNoResultMatch');\r\n SetEvent(WebSpeechRecognition_base, Self, 'OnStart', 'WebSpeechRecognition_baseStart');\r\n SetEvent(WebSpeechRecognition_base, Self, 'OnEnd', 'WebSpeechRecognition_baseEnd');\r\n WebSpeechRecognition_base.Left := 1035;\r\n WebSpeechRecognition_base.Top := 203;\r\n tmCloseCacheIndicator.SetParentComponent(Self);\r\n tmCloseCacheIndicator.Name := 'tmCloseCacheIndicator';\r\n tmCloseCacheIndicator.Interval := 1;\r\n SetEvent(tmCloseCacheIndicator, Self, 'OnTimer', 'tmCloseCacheIndicatorTimer');\r\n tmCloseCacheIndicator.Left := 890;\r\n tmCloseCacheIndicator.Top := 206;\r\n tmRemoveVoiceCommand.SetParentComponent(Self);\r\n tmRemoveVoiceCommand.Name := 'tmRemoveVoiceCommand';\r\n tmRemoveVoiceCommand.Enabled := False;\r\n SetEvent(tmRemoveVoiceCommand, Self, 'OnTimer', 'tmRemoveVoiceCommandTimer');\r\n tmRemoveVoiceCommand.Left := 299;\r\n tmRemoveVoiceCommand.Top := 32;\r\n finally\r\n pnlMainMenu.AfterLoadDFMValues;\r\n sbLogoBox.AfterLoadDFMValues;\r\n pnlLogo.AfterLoadDFMValues;\r\n WebPanel28.AfterLoadDFMValues;\r\n WebLabel13.AfterLoadDFMValues;\r\n WebMemo12.AfterLoadDFMValues;\r\n WebHTMLContainer11.AfterLoadDFMValues;\r\n sbMenu.AfterLoadDFMValues;\r\n div_mainmenucontainer.AfterLoadDFMValues;\r\n mm_mode.AfterLoadDFMValues;\r\n mm1.AfterLoadDFMValues;\r\n mm2.AfterLoadDFMValues;\r\n mm3.AfterLoadDFMValues;\r\n mm4.AfterLoadDFMValues;\r\n mm5.AfterLoadDFMValues;\r\n mm6.AfterLoadDFMValues;\r\n mm7.AfterLoadDFMValues;\r\n mm8.AfterLoadDFMValues;\r\n mm9.AfterLoadDFMValues;\r\n mm10.AfterLoadDFMValues;\r\n mm11.AfterLoadDFMValues;\r\n mm12.AfterLoadDFMValues;\r\n mm13.AfterLoadDFMValues;\r\n mm14.AfterLoadDFMValues;\r\n mm15.AfterLoadDFMValues;\r\n mm16.AfterLoadDFMValues;\r\n mm17.AfterLoadDFMValues;\r\n mm18.AfterLoadDFMValues;\r\n mm19.AfterLoadDFMValues;\r\n mm20.AfterLoadDFMValues;\r\n btnLogout.AfterLoadDFMValues;\r\n btnMenu_Settings.AfterLoadDFMValues;\r\n pnlFormArea.AfterLoadDFMValues;\r\n pnlTopBanners.AfterLoadDFMValues;\r\n sbAlertBoxes.AfterLoadDFMValues;\r\n B1.AfterLoadDFMValues;\r\n WebPanel70.AfterLoadDFMValues;\r\n WebLabel36.AfterLoadDFMValues;\r\n M1.AfterLoadDFMValues;\r\n htmlAlert5.AfterLoadDFMValues;\r\n B2.AfterLoadDFMValues;\r\n WebPanel6.AfterLoadDFMValues;\r\n WebLabel1.AfterLoadDFMValues;\r\n M2.AfterLoadDFMValues;\r\n htmlAlert1.AfterLoadDFMValues;\r\n B3.AfterLoadDFMValues;\r\n WebPanel8.AfterLoadDFMValues;\r\n WebLabel2.AfterLoadDFMValues;\r\n M3.AfterLoadDFMValues;\r\n htmlAlert2.AfterLoadDFMValues;\r\n B5.AfterLoadDFMValues;\r\n WebPanel12.AfterLoadDFMValues;\r\n WebLabel4.AfterLoadDFMValues;\r\n M5.AfterLoadDFMValues;\r\n htmlAlert4.AfterLoadDFMValues;\r\n B4.AfterLoadDFMValues;\r\n WebPanel10.AfterLoadDFMValues;\r\n WebLabel3.AfterLoadDFMValues;\r\n M4.AfterLoadDFMValues;\r\n htmlAlert3.AfterLoadDFMValues;\r\n WebPanel5.AfterLoadDFMValues;\r\n lblLocation.AfterLoadDFMValues;\r\n pnlControlHolder.AfterLoadDFMValues;\r\n lbImage_Y_X.AfterLoadDFMValues;\r\n lblMemodataText.AfterLoadDFMValues;\r\n btnDesign_Hide.AfterLoadDFMValues;\r\n btnClearBlockData.AfterLoadDFMValues;\r\n btnDefaultBlockData.AfterLoadDFMValues;\r\n btnDesignGrid.AfterLoadDFMValues;\r\n btnQuickPickListMoreItems.AfterLoadDFMValues;\r\n btnDBField_Settings.AfterLoadDFMValues;\r\n btnInsertCurrentDate.AfterLoadDFMValues;\r\n btnQPKLDatePicker.AfterLoadDFMValues;\r\n cbPickListType.AfterLoadDFMValues;\r\n cldQPKLCalendar.AfterLoadDFMValues;\r\n WebPanel174.AfterLoadDFMValues;\r\n edtDesign_BlockTitleEdit.AfterLoadDFMValues;\r\n pnlQPKLHeader.AfterLoadDFMValues;\r\n btnCloseQuickPicklist.AfterLoadDFMValues;\r\n seQPKLValue.AfterLoadDFMValues;\r\n edQPKLFilter.AfterLoadDFMValues;\r\n WebSpeedButton1.AfterLoadDFMValues;\r\n clQuickPicklist.AfterLoadDFMValues;\r\n btnQPKLTimePicker.AfterLoadDFMValues;\r\n btnAddRecord.AfterLoadDFMValues;\r\n btnDeleteRecord.AfterLoadDFMValues;\r\n memGridColumns.AfterLoadDFMValues;\r\n btnBlockGridPost.AfterLoadDFMValues;\r\n edtPicklistCustomForm.AfterLoadDFMValues;\r\n edtEditMask.AfterLoadDFMValues;\r\n btnBlockMenu.AfterLoadDFMValues;\r\n pnlQPKLTimePicker.AfterLoadDFMValues;\r\n btnCloseTimePicker.AfterLoadDFMValues;\r\n mdGenDialog.AfterLoadDFMValues;\r\n tmQPKLTimePicker.AfterLoadDFMValues;\r\n btnUseSelectedTime.AfterLoadDFMValues;\r\n dpBlockDatePicker.AfterLoadDFMValues;\r\n rgBlockRadioGroup.AfterLoadDFMValues;\r\n seBlockSpinEdit.AfterLoadDFMValues;\r\n btnTest.AfterLoadDFMValues;\r\n memo_autoheight.AfterLoadDFMValues;\r\n wmWaitMessage.AfterLoadDFMValues;\r\n html_heightCalculator.AfterLoadDFMValues;\r\n HTMLMemoDataText.AfterLoadDFMValues;\r\n pnlDesignSettings.AfterLoadDFMValues;\r\n lblBlockDefaultWidth.AfterLoadDFMValues;\r\n lblColumns.AfterLoadDFMValues;\r\n seFormColumns.AfterLoadDFMValues;\r\n cbFormColumnsAuto.AfterLoadDFMValues;\r\n seBlockDefaultWidth.AfterLoadDFMValues;\r\n cbShowHiddenBlocksInDesign.AfterLoadDFMValues;\r\n wbBrowser.AfterLoadDFMValues;\r\n cbNoHorizontallineUp.AfterLoadDFMValues;\r\n rgScreenSize.AfterLoadDFMValues;\r\n WebButton1.AfterLoadDFMValues;\r\n WebButton4.AfterLoadDFMValues;\r\n pnlFormBottomBar.AfterLoadDFMValues;\r\n sbInfoBoxes.AfterLoadDFMValues;\r\n B6.AfterLoadDFMValues;\r\n WebPanel7.AfterLoadDFMValues;\r\n WebLabel8.AfterLoadDFMValues;\r\n WebMemo4.AfterLoadDFMValues;\r\n WebHTMLContainer6.AfterLoadDFMValues;\r\n B7.AfterLoadDFMValues;\r\n WebPanel9.AfterLoadDFMValues;\r\n WebLabel9.AfterLoadDFMValues;\r\n WebMemo5.AfterLoadDFMValues;\r\n WebHTMLContainer7.AfterLoadDFMValues;\r\n B8.AfterLoadDFMValues;\r\n WebPanel17.AfterLoadDFMValues;\r\n WebLabel10.AfterLoadDFMValues;\r\n WebMemo7.AfterLoadDFMValues;\r\n WebHTMLContainer8.AfterLoadDFMValues;\r\n B9.AfterLoadDFMValues;\r\n WebPanel19.AfterLoadDFMValues;\r\n WebLabel11.AfterLoadDFMValues;\r\n WebMemo8.AfterLoadDFMValues;\r\n WebHTMLContainer9.AfterLoadDFMValues;\r\n B10.AfterLoadDFMValues;\r\n WebPanel21.AfterLoadDFMValues;\r\n WebLabel12.AfterLoadDFMValues;\r\n WebMemo9.AfterLoadDFMValues;\r\n WebHTMLContainer10.AfterLoadDFMValues;\r\n FormContainer1.AfterLoadDFMValues;\r\n FormContainer2.AfterLoadDFMValues;\r\n FormContainer3.AfterLoadDFMValues;\r\n FormContainer4.AfterLoadDFMValues;\r\n FormContainer5.AfterLoadDFMValues;\r\n FormContainer6.AfterLoadDFMValues;\r\n FormContainer7.AfterLoadDFMValues;\r\n FormContainer8.AfterLoadDFMValues;\r\n FormContainer9.AfterLoadDFMValues;\r\n WebInputMessageDlg1.AfterLoadDFMValues;\r\n WebMemo1.AfterLoadDFMValues;\r\n pnlBottomBar.AfterLoadDFMValues;\r\n WebLabel6.AfterLoadDFMValues;\r\n WebLabel5.AfterLoadDFMValues;\r\n btnSwitch_Design.AfterLoadDFMValues;\r\n cbCurrentFacilityName.AfterLoadDFMValues;\r\n edtArgusIndicator.AfterLoadDFMValues;\r\n edtQPKLCacheIndicator.AfterLoadDFMValues;\r\n ind_DBService.AfterLoadDFMValues;\r\n btnDesign_Clone.AfterLoadDFMValues;\r\n btnMicStart_base.AfterLoadDFMValues;\r\n tmQPKLFilter.AfterLoadDFMValues;\r\n pmBlockMenu.AfterLoadDFMValues;\r\n miCurrentDate.AfterLoadDFMValues;\r\n miCurrentTime.AfterLoadDFMValues;\r\n miCalendar.AfterLoadDFMValues;\r\n miTimePicker.AfterLoadDFMValues;\r\n miDefault.AfterLoadDFMValues;\r\n miClear.AfterLoadDFMValues;\r\n miDBFieldSetup.AfterLoadDFMValues;\r\n miQPKLSetup.AfterLoadDFMValues;\r\n miClearCache.AfterLoadDFMValues;\r\n httpCall.AfterLoadDFMValues;\r\n tmGenTimer.AfterLoadDFMValues;\r\n WebSpeechRecognition_base.AfterLoadDFMValues;\r\n tmCloseCacheIndicator.AfterLoadDFMValues;\r\n tmRemoveVoiceCommand.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n\r\n\r\n","unit LoginMain;\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 Vcl.Mask, WEBLib.Mask, WEBLib.ExtCtrls, XData.Web.Client, \r\nWEBLib.Toast, Vcl.Imaging.jpeg, WebLib.Storage, WEBLib.ClientConnector;\r\n\r\ntype\r\n TfrmLoginMain = class(TForm)\r\n pnlLogin: TPanel;\r\n btnLogin: TButton;\r\n lblSignIn: TLabel;\r\n WebToast1: TToast;\r\n imgClient: TImageControl;\r\n lblWarning: TLabel;\r\n lblPoweredBy: TLabel;\r\n imgEndosoft: TImageControl;\r\n lblQlinical: TLinkLabel;\r\n pnlTerms: TPanel;\r\n pnlAcceptTerms: TPanel;\r\n btnAccept: TButton;\r\n cTerms: THTMLContainer;\r\n htmlContQlinical: THTMLContainer;\r\n btnTerms: TButton;\r\n btnPrivacy: TButton;\r\n btnDisclaimer: TButton;\r\n cDaddy: THTMLContainer;\r\n edtName: TEdit;\r\n edtPassword: TEdit;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure btnLoginClick(Sender: TObject);\r\n procedure edtNameKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);\r\n procedure btnAcceptClick(Sender: TObject);\r\n procedure btnTermsClick(Sender: TObject);\r\n procedure btnPrivacyClick(Sender: TObject);\r\n procedure btnDisclaimerClick(Sender: TObject);\r\n procedure WebFormResize(Sender: TObject);\r\n private\r\n { Private declarations }\r\n procedure AuthenticateUser(EmailID, PassWord: String);\r\n public\r\n { Public declarations }\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmLoginMain: TfrmLoginMain;\r\n\r\nconst\r\n LoginImages: Array[0 .. 4] of String = ('illustration.jpg', 'illustration2.jpg',\r\n 'illustration3.jpg', 'illustration4.jpg', 'illustration5.jpg');\r\n\r\nimplementation\r\n\r\n{$R *.dfm}\r\n\r\nuses DATAMODULE, Main, Common;\r\n\r\nprocedure TfrmLoginMain.AuthenticateUser(EmailID, PassWord: String);\r\nvar\r\n DBPassword, DPassword, UserIDPass: String;\r\n cnt: Integer;\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var\r\n Response_p, s, s2, msg_p: string;\r\n begin\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n // showmessage(response_p);\r\n if pos('Error:', Response_p) > 0\r\n then begin\r\n Showmessage(Response_p);\r\n exit;\r\n end;\r\n\r\n // dm.egv_FacilityID := Response_p;\r\n // Response_p := string(TJSObject(Response.Result)['value']);\r\n egv_FacilityID := copy(Response_p, 1, pos('#', Response_p) - 1);\r\n\r\n s := copy(Response_p, pos('#', Response_p) + 1, length(Response_p));\r\n EGV_FACILITYDBNAME := copy(s, pos('#', s) + 1, 1024);\r\n\r\n s := copy(s, 1, pos('#', s) - 1);\r\n s := copy(s,2,length(s) - 2);\r\n EGV_FACILITYLIST := s;\r\n if pos(',',s) > 0\r\n then egv_Facility := copy(s, 1, pos(',', s) - 1)\r\n else egv_Facility := s;\r\n egv_USERID := EmailID;\r\n // dm.EGV_USERID := dm.egv_USERID;\r\n // dm.EGV_FACILITYID := dm.egv_FacilityID;\r\n\r\n // change server URL to connect to the right copy of it which serves our database\r\n dm.XDataWebConnection1.Tag := 1;\r\n dm.XDataWebConnection1.Connected := false;\r\n dm.XDataWebConnection1.URL := egv_serverbaseURL; // + '_' + EGV_FACILITYDBNAME;\r\n //LoadUsers;\r\n //showmessage('Connecting to XDATA server: ' + dm.XDataWebConnection1.URL);\r\n dm.XDataWebConnection1.connected := true;\r\n\r\n {\r\n egv_UserName := xdsUsersEMAIL.AsString;\r\n egv_UserFullName := xdsUsersFULLNAME.AsString;\r\n EGV_USERROLE := xdsUsersUSERROLE.AsString;\r\n }\r\n end;\r\n\r\nbegin\r\n //showmessage('User Authentication starts');\r\n // showmessage(dm.XDataWebConnection1.URL);\r\n //dm.egv_FacilityID_p := '-1';\r\n // showmessage(emailid);\r\n // showmessage(password);\r\n dm.XDataWebClient1.RawInvoke('IReportService.Checkuser', [EmailID, PassWord], @OnResult);\r\nend;\r\n\r\nprocedure TfrmLoginMain.btnAcceptClick(Sender: TObject);\r\nbegin\r\n pnlTerms.Visible := False;\r\n imgClient.Visible := True;\r\nend;\r\n\r\nprocedure TfrmLoginMain.btnDisclaimerClick(Sender: TObject);\r\nbegin\r\n imgClient.Visible := False;\r\n pnlTerms.Visible := False;\r\n pnlTerms.Visible := True;\r\n cTerms.HTML.Clear;\r\n cTerms.HTML.LoadFromFile('Images/Disclaimer.html');\r\nend;\r\n\r\nprocedure TfrmLoginMain.btnLoginClick(Sender: TObject);\r\nvar msg_p: string;\r\n\r\nbegin //showmessage('Logn clicked');\r\n\r\n//showmessage(window.location.href); // current url in the browser\r\n\r\n EGV_SPECIALITY := '';\r\n msg_p := '';\r\n if edtName.Text = Emptystr\r\n then msg_p := 'Login Cannot be Empty'\r\n else if edtPassword.Text = Emptystr\r\n then msg_p := 'Password Cannot be Empty';\r\n // showmessage('password checked');\r\nif msg_p <> ''\r\nthen begin\r\n showmessage(msg_p);\r\n {\r\n webtoast1.items[0].Body :='

' + msg_p + '

';\r\n webtoast1.items[0].Show; }\r\n exit;\r\n end;\r\n//showmessage(edtpassword.text);\r\n AuthenticateUser(edtName.Text, edtPassword.Text);\r\nend;\r\n\r\nprocedure TfrmLoginMain.btnPrivacyClick(Sender: TObject);\r\nbegin\r\n imgClient.Visible := False;\r\n pnlTerms.Visible := False;\r\n pnlTerms.Visible := True;\r\n cTerms.HTML.Clear;\r\n cTerms.HTML.LoadFromFile('Images/ServicePrivacy.html');\r\nend;\r\n\r\nprocedure TfrmLoginMain.btnTermsClick(Sender: TObject);\r\nbegin\r\n imgClient.Visible := False;\r\n pnlTerms.Visible := False;\r\n pnlTerms.Visible := True;\r\n cTerms.HTML.Clear;\r\n cTerms.HTML.LoadFromFile('Images/TermofCondition.html');\r\nend;\r\n\r\nprocedure TfrmLoginMain.edtNameKeyUp(Sender: TObject; var Key: Word;\r\n Shift: TShiftState);\r\nbegin\r\n if Key = VK_RETURN then\r\n btnLoginClick(nil);\r\nend;\r\n\r\nprocedure TfrmLoginMain.WebFormResize(Sender: TObject);\r\nbegin\r\nif pnlLogin.Width >= self.width\r\nthen pnlLogin.Width := self.width\r\nelse pnlLogin.Width := 400;\r\nend;\r\n\r\nprocedure TfrmLoginMain.WebFormShow(Sender: TObject);\r\nvar ls_p: TLocalStorage;\r\nbegin\r\n//showmessage('1');\r\n//try\r\n//ls_p := TWebLocalStorage.Create;\r\n\r\n{if ls_p.Count = 0\r\nthen begin\r\n ls_p.Values['WEB_SERVER_URL'] := 'http://172.16.1.107:8000';\r\n ls_p.Values['XDATA_SERVER_URL'] := 'http://172.16.1.107:80/ENR_XDATASERVER';\r\n ls_p.Values['REPORT_FOLDER_PATH'] := 'C:\\INETPUB\\ENRWEB\\REPORTS';\r\n ls_p.Values['REPORT_FOLDER_URL'] := 'http://172.16.1.107:8000/REPORTS';\r\n end; }\r\n//finally\r\n//ls_p.free;\r\n//end;\r\n\r\n// edtName.SetFocus;\r\n\r\nif pos('http://localhost:8000/', window.location.href) = 0\r\nthen imgClient.Picture.LoadFromFile('Images\\' + LoginImages[Random(5)]);\r\n\r\nend;\r\n\r\nprocedure TfrmLoginMain.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n imgClient := TImageControl.Create(Self);\r\n pnlLogin := TPanel.Create(Self);\r\n lblSignIn := TLabel.Create(Self);\r\n lblWarning := TLabel.Create(Self);\r\n lblPoweredBy := TLabel.Create(Self);\r\n imgEndosoft := TImageControl.Create(Self);\r\n lblQlinical := TLinkLabel.Create(Self);\r\n btnLogin := TButton.Create(Self);\r\n htmlContQlinical := THTMLContainer.Create(Self);\r\n btnTerms := TButton.Create(Self);\r\n btnPrivacy := TButton.Create(Self);\r\n btnDisclaimer := TButton.Create(Self);\r\n cDaddy := THTMLContainer.Create(Self);\r\n edtName := TEdit.Create(Self);\r\n edtPassword := TEdit.Create(Self);\r\n pnlTerms := TPanel.Create(Self);\r\n pnlAcceptTerms := TPanel.Create(Self);\r\n btnAccept := TButton.Create(Self);\r\n cTerms := THTMLContainer.Create(Self);\r\n WebToast1 := TToast.Create(Self);\r\n\r\n imgClient.BeforeLoadDFMValues;\r\n pnlLogin.BeforeLoadDFMValues;\r\n lblSignIn.BeforeLoadDFMValues;\r\n lblWarning.BeforeLoadDFMValues;\r\n lblPoweredBy.BeforeLoadDFMValues;\r\n imgEndosoft.BeforeLoadDFMValues;\r\n lblQlinical.BeforeLoadDFMValues;\r\n btnLogin.BeforeLoadDFMValues;\r\n htmlContQlinical.BeforeLoadDFMValues;\r\n btnTerms.BeforeLoadDFMValues;\r\n btnPrivacy.BeforeLoadDFMValues;\r\n btnDisclaimer.BeforeLoadDFMValues;\r\n cDaddy.BeforeLoadDFMValues;\r\n edtName.BeforeLoadDFMValues;\r\n edtPassword.BeforeLoadDFMValues;\r\n pnlTerms.BeforeLoadDFMValues;\r\n pnlAcceptTerms.BeforeLoadDFMValues;\r\n btnAccept.BeforeLoadDFMValues;\r\n cTerms.BeforeLoadDFMValues;\r\n WebToast1.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmLoginMain';\r\n Width := 640;\r\n Height := 480;\r\n SetEvent(Self, 'OnResize', 'WebFormResize');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n imgClient.SetParentComponent(Self);\r\n imgClient.Name := 'imgClient';\r\n imgClient.Left := 0;\r\n imgClient.Top := 0;\r\n imgClient.Width := 246;\r\n imgClient.Height := 480;\r\n imgClient.HeightPercent := 100.000000000000000000;\r\n imgClient.WidthPercent := 100.000000000000000000;\r\n imgClient.Align := alClient;\r\n imgClient.ChildOrder := 4;\r\n imgClient.Picture.LoadFromFile('LoginMain.imgClient.Picture.jpg');\r\n pnlLogin.SetParentComponent(Self);\r\n pnlLogin.Name := 'pnlLogin';\r\n pnlLogin.Left := 246;\r\n pnlLogin.Top := 0;\r\n pnlLogin.Width := 394;\r\n pnlLogin.Height := 480;\r\n pnlLogin.HeightPercent := 100.000000000000000000;\r\n pnlLogin.WidthPercent := 100.000000000000000000;\r\n pnlLogin.Align := alRight;\r\n pnlLogin.BorderColor := clSilver;\r\n pnlLogin.BorderStyle := bsNone;\r\n pnlLogin.ChildOrder := 1;\r\n pnlLogin.Color := clWindow;\r\n lblSignIn.SetParentComponent(pnlLogin);\r\n lblSignIn.Name := 'lblSignIn';\r\n lblSignIn.Left := 16;\r\n lblSignIn.Top := 144;\r\n lblSignIn.Width := 190;\r\n lblSignIn.Height := 16;\r\n lblSignIn.Caption := 'Sign in with your Qlinical Account';\r\n lblSignIn.Font.Charset := DEFAULT_CHARSET;\r\n lblSignIn.Font.Color := clWindowText;\r\n lblSignIn.Font.Height := -13;\r\n lblSignIn.Font.Name := 'Tahoma';\r\n lblSignIn.Font.Style := [];\r\n lblSignIn.HeightPercent := 100.000000000000000000;\r\n lblSignIn.ParentFont := False;\r\n lblSignIn.WidthPercent := 100.000000000000000000;\r\n lblWarning.SetParentComponent(pnlLogin);\r\n lblWarning.Name := 'lblWarning';\r\n lblWarning.Left := 16;\r\n lblWarning.Top := 304;\r\n lblWarning.Width := 360;\r\n lblWarning.Height := 13;\r\n lblWarning.Caption := 'By signing in , you are agreeing to the Qlinical \"Terms of Use\" and \"Privacy\"';\r\n lblWarning.Font.Charset := DEFAULT_CHARSET;\r\n lblWarning.Font.Color := clWindowText;\r\n lblWarning.Font.Height := -11;\r\n lblWarning.Font.Name := 'Tahoma';\r\n lblWarning.Font.Style := [];\r\n lblWarning.HeightPercent := 100.000000000000000000;\r\n lblWarning.ParentFont := False;\r\n lblWarning.WordWrap := True;\r\n lblWarning.WidthPercent := 100.000000000000000000;\r\n lblPoweredBy.SetParentComponent(pnlLogin);\r\n lblPoweredBy.Name := 'lblPoweredBy';\r\n lblPoweredBy.Left := 16;\r\n lblPoweredBy.Top := 384;\r\n lblPoweredBy.Width := 57;\r\n lblPoweredBy.Height := 13;\r\n lblPoweredBy.Anchors := [akLeft,akBottom];\r\n lblPoweredBy.Caption := 'Powered By';\r\n lblPoweredBy.Font.Charset := DEFAULT_CHARSET;\r\n lblPoweredBy.Font.Color := clWindowText;\r\n lblPoweredBy.Font.Height := -11;\r\n lblPoweredBy.Font.Name := 'Tahoma';\r\n lblPoweredBy.Font.Style := [fsItalic];\r\n lblPoweredBy.HeightPercent := 100.000000000000000000;\r\n lblPoweredBy.ParentFont := False;\r\n lblPoweredBy.WidthPercent := 100.000000000000000000;\r\n imgEndosoft.SetParentComponent(pnlLogin);\r\n imgEndosoft.Name := 'imgEndosoft';\r\n imgEndosoft.Left := 16;\r\n imgEndosoft.Top := 400;\r\n imgEndosoft.Width := 120;\r\n imgEndosoft.Height := 23;\r\n imgEndosoft.HeightPercent := 100.000000000000000000;\r\n imgEndosoft.WidthPercent := 100.000000000000000000;\r\n imgEndosoft.Anchors := [akLeft,akBottom];\r\n imgEndosoft.ChildOrder := 4;\r\n imgEndosoft.Picture.LoadFromFile('LoginMain.pnlLogin.imgEndosoft.Picture.jpg');\r\n lblQlinical.SetParentComponent(pnlLogin);\r\n lblQlinical.Name := 'lblQlinical';\r\n lblQlinical.Left := 146;\r\n lblQlinical.Top := 403;\r\n lblQlinical.Width := 101;\r\n lblQlinical.Height := 16;\r\n lblQlinical.Anchors := [akLeft,akBottom];\r\n lblQlinical.Font.Charset := DEFAULT_CHARSET;\r\n lblQlinical.Font.Color := clWindowText;\r\n lblQlinical.Font.Height := -13;\r\n lblQlinical.Font.Name := 'Tahoma';\r\n lblQlinical.Font.Style := [];\r\n lblQlinical.ParentFont := False;\r\n lblQlinical.HeightPercent := 100.000000000000000000;\r\n lblQlinical.WidthPercent := 100.000000000000000000;\r\n lblQlinical.Caption := 'www.qlinical.com';\r\n btnLogin.SetParentComponent(pnlLogin);\r\n btnLogin.Name := 'btnLogin';\r\n btnLogin.Left := 16;\r\n btnLogin.Top := 257;\r\n btnLogin.Width := 96;\r\n btnLogin.Height := 41;\r\n btnLogin.Caption := 'Sign in';\r\n btnLogin.ElementClassName := 'btn btn-info';\r\n btnLogin.Font.Charset := DEFAULT_CHARSET;\r\n btnLogin.Font.Color := clWindowText;\r\n btnLogin.Font.Height := -13;\r\n btnLogin.Font.Name := 'Tahoma';\r\n btnLogin.Font.Style := [];\r\n btnLogin.HeightPercent := 100.000000000000000000;\r\n btnLogin.ParentFont := False;\r\n btnLogin.TabOrder := 2;\r\n btnLogin.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnLogin, Self, 'OnClick', 'btnLoginClick');\r\n htmlContQlinical.SetParentComponent(pnlLogin);\r\n htmlContQlinical.Name := 'htmlContQlinical';\r\n htmlContQlinical.Left := 16;\r\n htmlContQlinical.Top := 3;\r\n htmlContQlinical.Width := 219;\r\n htmlContQlinical.Height := 107;\r\n htmlContQlinical.HeightPercent := 100.000000000000000000;\r\n htmlContQlinical.WidthPercent := 100.000000000000000000;\r\n htmlContQlinical.ChildOrder := 13;\r\n htmlContQlinical.HTML.BeginUpdate;\r\n try\r\n htmlContQlinical.HTML.Clear;\r\n htmlContQlinical.HTML.Add('');\r\n htmlContQlinical.HTML.Add('\"www.qlinical.com\"');\r\n finally\r\n htmlContQlinical.HTML.EndUpdate;\r\n end;\r\n btnTerms.SetParentComponent(pnlLogin);\r\n btnTerms.Name := 'btnTerms';\r\n btnTerms.Left := 8;\r\n btnTerms.Top := 432;\r\n btnTerms.Width := 85;\r\n btnTerms.Height := 25;\r\n btnTerms.Anchors := [akLeft,akBottom];\r\n btnTerms.Caption := 'Terms Of Use';\r\n btnTerms.ChildOrder := 13;\r\n btnTerms.ElementClassName := 'bg-white';\r\n btnTerms.Font.Charset := DEFAULT_CHARSET;\r\n btnTerms.Font.Color := clWindowText;\r\n btnTerms.Font.Height := -13;\r\n btnTerms.Font.Name := 'Tahoma';\r\n btnTerms.Font.Style := [];\r\n btnTerms.HeightPercent := 100.000000000000000000;\r\n btnTerms.ParentFont := False;\r\n btnTerms.TabOrder := 2;\r\n btnTerms.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnTerms, Self, 'OnClick', 'btnTermsClick');\r\n btnPrivacy.SetParentComponent(pnlLogin);\r\n btnPrivacy.Name := 'btnPrivacy';\r\n btnPrivacy.Left := 96;\r\n btnPrivacy.Top := 432;\r\n btnPrivacy.Width := 54;\r\n btnPrivacy.Height := 25;\r\n btnPrivacy.Anchors := [akLeft,akBottom];\r\n btnPrivacy.Caption := 'Privacy';\r\n btnPrivacy.ChildOrder := 13;\r\n btnPrivacy.ElementClassName := 'bg-white';\r\n btnPrivacy.Font.Charset := DEFAULT_CHARSET;\r\n btnPrivacy.Font.Color := clWindowText;\r\n btnPrivacy.Font.Height := -13;\r\n btnPrivacy.Font.Name := 'Tahoma';\r\n btnPrivacy.Font.Style := [];\r\n btnPrivacy.HeightPercent := 100.000000000000000000;\r\n btnPrivacy.ParentFont := False;\r\n btnPrivacy.TabOrder := 2;\r\n btnPrivacy.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnPrivacy, Self, 'OnClick', 'btnPrivacyClick');\r\n btnDisclaimer.SetParentComponent(pnlLogin);\r\n btnDisclaimer.Name := 'btnDisclaimer';\r\n btnDisclaimer.Left := 155;\r\n btnDisclaimer.Top := 432;\r\n btnDisclaimer.Width := 85;\r\n btnDisclaimer.Height := 25;\r\n btnDisclaimer.Anchors := [akLeft,akBottom];\r\n btnDisclaimer.Caption := 'Disclaimer';\r\n btnDisclaimer.ChildOrder := 13;\r\n btnDisclaimer.ElementClassName := 'bg-white';\r\n btnDisclaimer.Font.Charset := DEFAULT_CHARSET;\r\n btnDisclaimer.Font.Color := clWindowText;\r\n btnDisclaimer.Font.Height := -13;\r\n btnDisclaimer.Font.Name := 'Tahoma';\r\n btnDisclaimer.Font.Style := [];\r\n btnDisclaimer.HeightPercent := 100.000000000000000000;\r\n btnDisclaimer.ParentFont := False;\r\n btnDisclaimer.TabOrder := 2;\r\n btnDisclaimer.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnDisclaimer, Self, 'OnClick', 'btnDisclaimerClick');\r\n cDaddy.SetParentComponent(pnlLogin);\r\n cDaddy.Name := 'cDaddy';\r\n cDaddy.Left := 246;\r\n cDaddy.Top := 422;\r\n cDaddy.Width := 137;\r\n cDaddy.Height := 48;\r\n cDaddy.HeightPercent := 100.000000000000000000;\r\n cDaddy.WidthPercent := 100.000000000000000000;\r\n cDaddy.Anchors := [akLeft,akBottom];\r\n cDaddy.ChildOrder := 13;\r\n cDaddy.HTML.BeginUpdate;\r\n try\r\n cDaddy.HTML.Clear;\r\n cDaddy.HTML.Add('');\r\n finally\r\n cDaddy.HTML.EndUpdate;\r\n end;\r\n edtName.SetParentComponent(pnlLogin);\r\n edtName.Name := 'edtName';\r\n edtName.Left := 16;\r\n edtName.Top := 168;\r\n edtName.Width := 364;\r\n edtName.Height := 27;\r\n edtName.ChildOrder := 14;\r\n edtName.Font.Charset := DEFAULT_CHARSET;\r\n edtName.Font.Color := clWindowText;\r\n edtName.Font.Height := -16;\r\n edtName.Font.Name := 'Tahoma';\r\n edtName.Font.Style := [];\r\n edtName.HeightPercent := 100.000000000000000000;\r\n edtName.ParentFont := False;\r\n edtName.TextHint := 'Email ID';\r\n edtName.WidthStyle := ssPercent;\r\n edtName.WidthPercent := 80.000000000000000000;\r\n SetEvent(edtName, Self, 'OnKeyUp', 'edtNameKeyUp');\r\n edtPassword.SetParentComponent(pnlLogin);\r\n edtPassword.Name := 'edtPassword';\r\n edtPassword.Left := 16;\r\n edtPassword.Top := 213;\r\n edtPassword.Width := 364;\r\n edtPassword.Height := 27;\r\n edtPassword.ChildOrder := 14;\r\n edtPassword.Font.Charset := DEFAULT_CHARSET;\r\n edtPassword.Font.Color := clWindowText;\r\n edtPassword.Font.Height := -16;\r\n edtPassword.Font.Name := 'Tahoma';\r\n edtPassword.Font.Style := [];\r\n edtPassword.HeightPercent := 100.000000000000000000;\r\n edtPassword.ParentFont := False;\r\n edtPassword.PasswordChar := '*';\r\n edtPassword.TextHint := 'Password';\r\n edtPassword.WidthStyle := ssPercent;\r\n edtPassword.WidthPercent := 80.000000000000000000;\r\n SetEvent(edtPassword, Self, 'OnKeyUp', 'edtNameKeyUp');\r\n pnlTerms.SetParentComponent(Self);\r\n pnlTerms.Name := 'pnlTerms';\r\n pnlTerms.Left := 0;\r\n pnlTerms.Top := 0;\r\n pnlTerms.Width := 246;\r\n pnlTerms.Height := 480;\r\n pnlTerms.HeightPercent := 100.000000000000000000;\r\n pnlTerms.WidthPercent := 100.000000000000000000;\r\n pnlTerms.Align := alClient;\r\n pnlTerms.BorderColor := clSilver;\r\n pnlTerms.BorderStyle := bsNone;\r\n pnlTerms.ChildOrder := 2;\r\n pnlTerms.Color := clWindow;\r\n pnlTerms.Visible := False;\r\n pnlAcceptTerms.SetParentComponent(pnlTerms);\r\n pnlAcceptTerms.Name := 'pnlAcceptTerms';\r\n pnlAcceptTerms.AlignWithMargins := True;\r\n pnlAcceptTerms.Left := 3;\r\n pnlAcceptTerms.Top := 428;\r\n pnlAcceptTerms.Width := 240;\r\n pnlAcceptTerms.Height := 32;\r\n pnlAcceptTerms.Margins.Bottom := 20;\r\n pnlAcceptTerms.HeightPercent := 100.000000000000000000;\r\n pnlAcceptTerms.WidthPercent := 100.000000000000000000;\r\n pnlAcceptTerms.Align := alBottom;\r\n pnlAcceptTerms.BorderColor := clSilver;\r\n pnlAcceptTerms.BorderStyle := bsNone;\r\n pnlAcceptTerms.ChildOrder := 1;\r\n pnlAcceptTerms.Color := clWindow;\r\n btnAccept.SetParentComponent(pnlAcceptTerms);\r\n btnAccept.Name := 'btnAccept';\r\n btnAccept.Left := 127;\r\n btnAccept.Top := 0;\r\n btnAccept.Width := 96;\r\n btnAccept.Height := 32;\r\n btnAccept.Anchors := [akTop,akRight];\r\n btnAccept.Caption := 'Accept';\r\n btnAccept.ElementClassName := 'btn btn-info';\r\n btnAccept.Font.Charset := DEFAULT_CHARSET;\r\n btnAccept.Font.Color := clWindowText;\r\n btnAccept.Font.Height := -13;\r\n btnAccept.Font.Name := 'Tahoma';\r\n btnAccept.Font.Style := [];\r\n btnAccept.HeightPercent := 100.000000000000000000;\r\n btnAccept.ParentFont := False;\r\n btnAccept.TabOrder := 2;\r\n btnAccept.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnAccept, Self, 'OnClick', 'btnAcceptClick');\r\n cTerms.SetParentComponent(pnlTerms);\r\n cTerms.Name := 'cTerms';\r\n cTerms.AlignWithMargins := True;\r\n cTerms.Left := 20;\r\n cTerms.Top := 20;\r\n cTerms.Width := 206;\r\n cTerms.Height := 385;\r\n cTerms.Margins.Left := 20;\r\n cTerms.Margins.Top := 20;\r\n cTerms.Margins.Right := 20;\r\n cTerms.Margins.Bottom := 20;\r\n cTerms.HeightPercent := 100.000000000000000000;\r\n cTerms.WidthPercent := 100.000000000000000000;\r\n cTerms.Align := alClient;\r\n cTerms.ChildOrder := 1;\r\n WebToast1.SetParentComponent(Self);\r\n WebToast1.Name := 'WebToast1';\r\n WebToast1.Items.Clear;\r\n with WebToast1.Items.Add do\r\n begin\r\n AutoHide := True;\r\n Time := ttNone;\r\n Header := '

ENR

';\r\n end;\r\n WebToast1.Position := tpTopRight;\r\n WebToast1.Left := 496;\r\n WebToast1.Top := 8;\r\n finally\r\n imgClient.AfterLoadDFMValues;\r\n pnlLogin.AfterLoadDFMValues;\r\n lblSignIn.AfterLoadDFMValues;\r\n lblWarning.AfterLoadDFMValues;\r\n lblPoweredBy.AfterLoadDFMValues;\r\n imgEndosoft.AfterLoadDFMValues;\r\n lblQlinical.AfterLoadDFMValues;\r\n btnLogin.AfterLoadDFMValues;\r\n htmlContQlinical.AfterLoadDFMValues;\r\n btnTerms.AfterLoadDFMValues;\r\n btnPrivacy.AfterLoadDFMValues;\r\n btnDisclaimer.AfterLoadDFMValues;\r\n cDaddy.AfterLoadDFMValues;\r\n edtName.AfterLoadDFMValues;\r\n edtPassword.AfterLoadDFMValues;\r\n pnlTerms.AfterLoadDFMValues;\r\n pnlAcceptTerms.AfterLoadDFMValues;\r\n btnAccept.AfterLoadDFMValues;\r\n cTerms.AfterLoadDFMValues;\r\n WebToast1.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit Login2;\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, Vcl.Controls,\r\n WEBLib.WebCtrls, WEBLib.Buttons, WEBLib.ExtCtrls, XData.Web.Client;\r\n\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 Vcl.Mask, WEBLib.Mask, WEBLib.ExtCtrls, XData.Web.Client, Windows,\r\n WEBLib.Toast, Vcl.Imaging.jpeg, WebLib.Storage, WEBLib.ClientConnector; }\r\n\r\ntype\r\n TfrmLogin2 = class(TForm)\r\n WebPanel2: TPanel;\r\n WebLabel1: TLabel;\r\n WebLabel2: TLabel;\r\n WebButton1: TButton;\r\n edtname: TEdit;\r\n edtPassword: TEdit;\r\n WebBitBtn1: TBitBtn;\r\n WebBitBtn2: TBitBtn;\r\n WebBitBtn4: TBitBtn;\r\n procedure WebButton1Click(Sender: TObject);\r\n procedure AuthenticateUser(EmailID, PassWord: String);\r\n procedure WebFormShow(Sender: TObject);\r\n private\r\n { Private declarations }\r\n public\r\n { Public declarations }\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmLogin2: TfrmLogin2;\r\n\r\nimplementation\r\n\r\n{$R *.dfm}\r\n\r\nuses Common, DataModule, Main;\r\n\r\nprocedure TfrmLogin2.WebButton1Click(Sender: TObject);\r\nvar msg_p: string;\r\nbegin\r\n EGV_SPECIALITY := '';\r\n msg_p := '';\r\n if edtName.Text = Emptystr\r\n then msg_p := 'Login Cannot be Empty'\r\n else if edtPassword.Text = Emptystr\r\n then msg_p := 'Password Cannot be Empty';\r\nif msg_p <> ''\r\nthen begin\r\n showmessage(msg_p);\r\n exit;\r\n end;\r\n AuthenticateUser(edtName.Text, edtPassword.Text);\r\nend;\r\n\r\nprocedure TfrmLogin2.WebFormShow(Sender: TObject);\r\nbegin\r\n{ webpanel1.Top := (self.height - webpanel1.Height) div 2;\r\n webpanel1.left := (self.width - webpanel1.Width) div 2; }\r\nend;\r\n\r\nprocedure TfrmLogin2.AuthenticateUser(EmailID, PassWord: String);\r\nvar\r\n DBPassword, DPassword, UserIDPass: String;\r\n cnt: Integer;\r\n\r\n procedure OnResult(Response: TXDataClientResponse);\r\n var\r\n Response_p, s, s2, msg_p: string;\r\n begin\r\n Response_p := string(TJSObject(Response.Result)['value']);\r\n if pos('Error:', Response_p) > 0\r\n then begin\r\n Showmessage(Response_p);\r\n exit;\r\n end;\r\n egv_FacilityID := copy(Response_p, 1, pos('#', Response_p) - 1);\r\n s := copy(Response_p, pos('#', Response_p) + 1, length(Response_p));\r\n EGV_FACILITYDBNAME := copy(s, pos('#', s) + 1, 1024);\r\n s := copy(s, 1, pos('#', s) - 1);\r\n s := copy(s,2,length(s) - 2);\r\n EGV_FACILITYLIST := s;\r\n if pos(',',s) > 0\r\n then egv_Facility := copy(s, 1, pos(',', s) - 1)\r\n else egv_Facility := s;\r\n egv_USERID := EmailID;\r\n // change server URL to connect to the right copy of it which serves our database\r\n dm.XDataWebConnection1.Tag := 1;\r\n dm.XDataWebConnection1.Connected := false;\r\n dm.XDataWebConnection1.URL := egv_serverbaseURL; // + '_' + EGV_FACILITYDBNAME;\r\n //LoadUsers;\r\n //showmessage('Connecting to XDATA server: ' + dm.XDataWebConnection1.URL);\r\n dm.XDataWebConnection1.connected := true;\r\n end;\r\n\r\nbegin\r\n dm.XDataWebClient1.RawInvoke('IReportService.Checkuser', [EmailID, PassWord], @OnResult);\r\nend;\r\n\r\nprocedure TfrmLogin2.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n WebPanel2 := TPanel.Create(Self);\r\n WebLabel1 := TLabel.Create(Self);\r\n WebLabel2 := TLabel.Create(Self);\r\n WebButton1 := TButton.Create(Self);\r\n edtname := TEdit.Create(Self);\r\n edtPassword := TEdit.Create(Self);\r\n WebBitBtn1 := TBitBtn.Create(Self);\r\n WebBitBtn2 := TBitBtn.Create(Self);\r\n WebBitBtn4 := TBitBtn.Create(Self);\r\n\r\n WebPanel2.BeforeLoadDFMValues;\r\n WebLabel1.BeforeLoadDFMValues;\r\n WebLabel2.BeforeLoadDFMValues;\r\n WebButton1.BeforeLoadDFMValues;\r\n edtname.BeforeLoadDFMValues;\r\n edtPassword.BeforeLoadDFMValues;\r\n WebBitBtn1.BeforeLoadDFMValues;\r\n WebBitBtn2.BeforeLoadDFMValues;\r\n WebBitBtn4.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmLogin2';\r\n Width := 538;\r\n Height := 410;\r\n Caption := 'Login';\r\n ElementClassName := 'loginform';\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 Shadow := False;\r\n ShowClose := False;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n WebPanel2.SetParentComponent(Self);\r\n WebPanel2.Name := 'WebPanel2';\r\n WebPanel2.Left := 8;\r\n WebPanel2.Top := 8;\r\n WebPanel2.Width := 521;\r\n WebPanel2.Height := 393;\r\n WebPanel2.ElementClassName := 'loginbox';\r\n WebPanel2.HeightStyle := ssAuto;\r\n WebPanel2.WidthStyle := ssAuto;\r\n WebPanel2.HeightPercent := 100.000000000000000000;\r\n WebPanel2.WidthPercent := 30.000000000000000000;\r\n WebPanel2.BorderColor := clSilver;\r\n WebPanel2.BorderStyle := bsNone;\r\n WebPanel2.Color := 7105644;\r\n WebPanel2.ElementFont := efCSS;\r\n WebPanel2.ElementPosition := epRelative;\r\n WebLabel1.SetParentComponent(WebPanel2);\r\n WebLabel1.Name := 'WebLabel1';\r\n WebLabel1.Left := 0;\r\n WebLabel1.Top := 13;\r\n WebLabel1.Width := 393;\r\n WebLabel1.Height := 33;\r\n WebLabel1.Align := alTop;\r\n WebLabel1.Alignment := taCenter;\r\n WebLabel1.Caption := 'Sign in with your Qlinical Account';\r\n WebLabel1.ElementClassName := 'caption';\r\n WebLabel1.Font.Charset := DEFAULT_CHARSET;\r\n WebLabel1.Font.Color := clBlack;\r\n WebLabel1.Font.Height := -27;\r\n WebLabel1.Font.Name := 'Tahoma';\r\n WebLabel1.Font.Style := [];\r\n WebLabel1.HeightPercent := 100.000000000000000000;\r\n WebLabel1.ParentFont := False;\r\n WebLabel1.WidthPercent := 100.000000000000000000;\r\n WebLabel2.SetParentComponent(WebPanel2);\r\n WebLabel2.Name := 'WebLabel2';\r\n WebLabel2.Left := 0;\r\n WebLabel2.Top := 0;\r\n WebLabel2.Width := 3;\r\n WebLabel2.Height := 13;\r\n WebLabel2.Align := alTop;\r\n WebLabel2.HeightPercent := 100.000000000000000000;\r\n WebLabel2.WidthPercent := 100.000000000000000000;\r\n WebButton1.SetParentComponent(WebPanel2);\r\n WebButton1.Name := 'WebButton1';\r\n WebButton1.Left := 106;\r\n WebButton1.Top := 226;\r\n WebButton1.Width := 300;\r\n WebButton1.Height := 54;\r\n WebButton1.Caption := 'Login';\r\n WebButton1.ChildOrder := 2;\r\n WebButton1.ElementClassName := 'loginbutton';\r\n WebButton1.ElementFont := efCSS;\r\n WebButton1.HeightPercent := 100.000000000000000000;\r\n WebButton1.WidthPercent := 100.000000000000000000;\r\n SetEvent(WebButton1, Self, 'OnClick', 'WebButton1Click');\r\n edtname.SetParentComponent(WebPanel2);\r\n edtname.Name := 'edtname';\r\n edtname.Left := 106;\r\n edtname.Top := 80;\r\n edtname.Width := 300;\r\n edtname.Height := 54;\r\n edtname.TabStop := False;\r\n edtname.ChildOrder := 1;\r\n edtname.ElementClassName := 'input';\r\n edtname.ElementFont := efCSS;\r\n edtname.Font.Charset := DEFAULT_CHARSET;\r\n edtname.Font.Color := clBlack;\r\n edtname.Font.Height := -11;\r\n edtname.Font.Name := 'Tahoma';\r\n edtname.Font.Style := [];\r\n edtname.HeightPercent := 100.000000000000000000;\r\n edtname.ParentFont := False;\r\n edtname.TextHint := 'User Name';\r\n edtname.WidthPercent := 100.000000000000000000;\r\n edtPassword.SetParentComponent(WebPanel2);\r\n edtPassword.Name := 'edtPassword';\r\n edtPassword.Left := 106;\r\n edtPassword.Top := 152;\r\n edtPassword.Width := 300;\r\n edtPassword.Height := 54;\r\n edtPassword.ChildOrder := 2;\r\n edtPassword.ElementClassName := 'input';\r\n edtPassword.ElementFont := efCSS;\r\n edtPassword.HeightPercent := 100.000000000000000000;\r\n edtPassword.PasswordChar := '*';\r\n edtPassword.TextHint := 'Password';\r\n edtPassword.WidthPercent := 100.000000000000000000;\r\n WebBitBtn1.SetParentComponent(WebPanel2);\r\n WebBitBtn1.Name := 'WebBitBtn1';\r\n WebBitBtn1.Left := 360;\r\n WebBitBtn1.Top := 91;\r\n WebBitBtn1.Width := 41;\r\n WebBitBtn1.Height := 33;\r\n WebBitBtn1.Color := clNone;\r\n WebBitBtn1.ElementClassName := 'icon';\r\n WebBitBtn1.Flat := True;\r\n WebBitBtn1.HeightPercent := 100.000000000000000000;\r\n WebBitBtn1.MaterialGlyph := 'person';\r\n WebBitBtn1.MaterialGlyphSize := 36;\r\n WebBitBtn1.WidthPercent := 100.000000000000000000;\r\n WebBitBtn2.SetParentComponent(WebPanel2);\r\n WebBitBtn2.Name := 'WebBitBtn2';\r\n WebBitBtn2.Left := 360;\r\n WebBitBtn2.Top := 163;\r\n WebBitBtn2.Width := 41;\r\n WebBitBtn2.Height := 33;\r\n WebBitBtn2.Color := clNone;\r\n WebBitBtn2.ElementClassName := 'icon';\r\n WebBitBtn2.Flat := True;\r\n WebBitBtn2.HeightPercent := 100.000000000000000000;\r\n WebBitBtn2.MaterialGlyph := 'vpn_key';\r\n WebBitBtn2.MaterialGlyphSize := 36;\r\n WebBitBtn2.WidthPercent := 100.000000000000000000;\r\n WebBitBtn4.SetParentComponent(WebPanel2);\r\n WebBitBtn4.Name := 'WebBitBtn4';\r\n WebBitBtn4.Left := 360;\r\n WebBitBtn4.Top := 235;\r\n WebBitBtn4.Width := 41;\r\n WebBitBtn4.Height := 33;\r\n WebBitBtn4.Color := clNone;\r\n WebBitBtn4.ElementClassName := 'icon';\r\n WebBitBtn4.Flat := True;\r\n WebBitBtn4.HeightPercent := 100.000000000000000000;\r\n WebBitBtn4.MaterialGlyph := 'exit_to_app';\r\n WebBitBtn4.MaterialGlyphSize := 36;\r\n WebBitBtn4.WidthPercent := 100.000000000000000000;\r\n finally\r\n WebPanel2.AfterLoadDFMValues;\r\n WebLabel1.AfterLoadDFMValues;\r\n WebLabel2.AfterLoadDFMValues;\r\n WebButton1.AfterLoadDFMValues;\r\n edtname.AfterLoadDFMValues;\r\n edtPassword.AfterLoadDFMValues;\r\n WebBitBtn1.AfterLoadDFMValues;\r\n WebBitBtn2.AfterLoadDFMValues;\r\n WebBitBtn4.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","program Q_APPBuilder;\r\n\r\nuses\r\n Vcl.Forms,\r\n WebLib.WebTools,\r\n WEBLib.Forms,\r\n WebLib.Lang,\r\n Main in 'Main.pas'{*.html},\r\n Common in 'Common.pas',\r\n DataModule in 'DataModule.pas',\r\n Settings in 'Settings.pas',\r\n Picklist in 'Picklist.pas'{*.html},\r\n PickForm in 'PickForm.pas'{*.html},\r\n ReportForm in 'ReportForm.pas'{*.html},\r\n DynamicGridSetup in 'DynamicGridSetup.pas'{*.html},\r\n UDF_Schedule in 'UDF_Schedule.pas',\r\n MultiLevelPickForm in 'MultiLevelPickForm.pas',\r\n LoginMain in 'LoginMain.pas',\r\n QAI_FileUpload in 'QAI_FileUpload.pas'{*.html},\r\n QPKLSettings in 'QPKLSettings.pas'{*.html},\r\n Login2 in 'Login2.pas'{*.html},\r\n Login in 'Login.pas',\r\n UDF_QAI in 'UDF_QAI.pas',\r\n DBFieldSettings in 'DBFieldSettings.pas',\r\n UDF_ImageEditor in 'UDF_ImageEditor.pas'{*.html},\r\n UDF_CustomForm in 'UDF_CustomForm.pas',\r\n UDF_ImageCapture in 'UDF_ImageCapture.pas'{*.html},\r\n Login_New in 'Login_New.pas'{*.html},\r\n EditForm_Base in 'EditForm_Base.pas',\r\n UDF_ProcReport_Q in 'UDF_ProcReport_Q.pas',\r\n UDF_ProcReport_EV in 'UDF_ProcReport_EV.pas',\r\n ListForm_Base in 'ListForm_Base.pas',\r\n UDF_CernerPatients in 'UDF_CernerPatients.pas',\r\n UDF_CernerAPI in 'UDF_CernerAPI.pas';\r\n\r\n{$R *.res}\r\n\r\n//var form_p: TWebform;\r\n\r\nbegin\r\n Application.Initialize;\r\n Application.MainFormOnTaskbar := True;\r\n Application.CreateFormDirect(TDM, DM);\r\n {Application.CreateForm(TfrmLogin, frmLogin);\r\n Application.CreateForm(TfrmUDF_QAI, frmUDF_QAI);\r\n Application.CreateForm(TfrmDBFieldSettings, frmDBFieldSettings); }\r\n\r\n //showmessage('ISS: ' + GetQueryParam('iss') + char(13) + 'LAUNCH: ' + GetQueryParam('launch'));\r\n\r\n{if uppercase(GetQueryParam('CALLER_ID')) = ''\r\nthen Application.MainForm := frmLogin;\r\nelse begin\r\n if uppercase(GetQueryParam('CALLER_ID')) = 'QLINICAL'\r\n then begin\r\n EGV_CURRENT_MRN := GetQueryParam('PATIENT_MRN');\r\n EGV_CURRENT_PATIENTNAME := GetQueryParam('PATIENT_NAME');\r\n EGV_CURRENT_PATIENTDOB := GetQueryParam('PATIENT_DOB');\r\n EGV_PATIENTFHIRID := GetQueryParam('PATIENT_FHIRID');\r\n end;\r\n\r\n // change server URL to connect to the right copy of it which serves our database\r\n dm.XDataWebConnection1.Tag := 1;\r\n dm.XDataWebConnection1.Connected := false;\r\n dm.XDataWebConnection1.URL := egv_serverbaseURL + '_' + EGV_FACILITYDBNAME;\r\n //LoadUsers;\r\n // showmessage('Connecting to XDATA server: ' + dm.XDataWebConnection1.URL);\r\n dm.XDataWebConnection1.connected := true;\r\n end; }\r\n\r\n\r\n Application.Run;\r\n\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;A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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;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,GAA7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,qCHr+BD,qCGq+BC;AAsRE;AAkBG;AA5PN;AACP;AADO;aACP;AADO;;AACP;AADO;;;AACP;AADO;AAQG;AACV;AADU;aACV;AADU;;AACV;AADU;;;AACV,qBH5nBa,+BG4nBb;AADU;AAQA;AACV;AADU;aACV,4BACA;AAFU;;AACV;AACA;AAFU;;;AACV,0BHpoBa,+BGooBb;AACA;AAFU;AASA;AACV;AACA;AACA;AAHU;aACV,kBACA,IAAA,0CACA,oCADA;AAFU;;AACV;AACA;AACA;AAHU;;;AACV,qBH7oBa,+BG6oBb;AACA,iCH9oBa,+BG8oBb;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,uBH/pBa,+BG+pBb;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,iCHllBW,6BGklBX;AACA;AAHmB;AAUR;;aACX;AADW;;AACX;AADW;;;AACX,wBH5sBa,+BG4sBb;AADW;AAQD;AACV;AADU;aACV;AADU;;AACV;AADU;;;AACV;AADU;AAQE;AACZ;AACA;AAFY;aACZ,wBACA;AAFY;;AACZ;AACA;AAFY;;;AACZ,wBH3mBW,6BG2mBX;AACA,4BH5mBW,6BG4mBX;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,wBH5pBW,6BG4pBX;AACA,4BH7pBW,6BG6pBX;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,uBHvyBa,+BGuyBb;AACA,uBHxyBa,+BGwyBb;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,0BJpvCa,kCIovCb;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,0B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G;AACA,uBAAG;AACL,qBAAG;AACL,mBAAG;AACJ,kBAAG;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,yBAnoHK,qBAmoHL;AACA,6BApkHS,yBAokHT;AACA,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;AAPsB;AAmBK;AAG7B,UAAI,mBAAa,KAAC,IAAlB,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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c,YAAd,GAA6B;AAC7B,wBAAc,WAAd,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,K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AGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAxLS;AAAU;AArqEnB,mBAsWc;AAMZ;AAu6BsB;AAAf;AAEP,eAAU,cAAQ,CAAW,cAAC,MAAD,EAAoB,cAAC,MAAD,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OAHlC;AAFsB;AAhyLf;AAac;AACF;AAdZ;AAiBC;;;AAEN;AACA;AAAO;AAAM;AAAQ;AAHf;;;;;AAk/LgB;AAExB,UAAI,UAAM,KAAG,KAAb;AAEE,qBAAS;AACT;OAHF;AAFwB;AAkBD;AAEvB,UAAI,SAAK,KAAG,KAAZ;AAEE,oBAAQ;AACR;OAHF;AAFuB;AATE;AAEzB,UAAI,WAAO,KAAG,KAAd;AAEE,sBAAU;AACV;OAHF;AAFyB;AAlBC;AAE1B,UAAI,YAAQ,KAAG,KAAf;AAEE,uBAAW;AACX;OAHF;AAF0B;AAND;AAEzB,UAAY,cAAD,QAAX,EACE,cAAQ,CAAC,IAAD,CADV;AAFyB;AATA;AAEzB;AACA,mBAAS;AACT,kBAAQ;AACR,oBAAU;AACV,qBAAW;AANe;AAAD;AAXF;AAEvB,UAAc,aAAH,eAAP,MAAO,CAAX;AAEE,qBAAiB,OAAP,OAAU,aAAH,CAAY;AAC7B,sBAAkB,OAAP,OAAU,aAAH,CAAY;AAC9B,oBAAgB,OAAP,OAAU,aAAH,CAAY;AAC5B,uBAAmB,OAAP,OAAU,aAAH,CAAY;OALjC;AAFuB;AA/8Lf;AAWY;AAIL;AACD;AACE;AACC;AAlBT;AAwBA;;;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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wCAAT,CgB0TlD;AACC,gChB31BV,0CgB21BU;AACG,mChBx6BV,6CgBw6BU;AACD;AACL,6Bf1qBV,uCe0qBU;AACG,gChBj7BV,0CgBi7BU;AACQ,wChBl6BV,kDgBk6BU;AACP,iChBl6BV,2CgBk6BU;AACE,mChBl6BV,6CgBk6BU;AACI,uChBl6BV,iDgBk6BU;AACR;AACH,4BfhlBV,sCeglBU;AACE;AACO;AACF,mChBn7BZ,2CgBm7BY;AACP;AACK;AACJ,6BpBz0BR,8BoBy0BQ;AACD;AACM;AACN;AACK;AACD;AACH,6BAlIF,6BAkIE;AACG;AACD;AACH;AACS,qChB/6BV,+CgB+6BU;AACL;AACL;AACI;AACF;AACO;AACF,kChBt8BX,2CgBs8BW;AACF,gChBr4BP,6CgBq4BO;AACD,+BhBt4BN,6CgBs4BM;AACG,kChBv4BT,6CgBu4BS;AACD,iChBl4BX,0CgBk4BW;AACC,kChBl4BP,+CgBk4BO;AACH,+BhBp4BT,0CgBo4BS;AACI,mChB14BX,4CgB04BW;AACF,iChB34BT,4CgB24BS;AACE,mChBx4BP,gDgBw4BO;AACC,oChB94BX,6CgB84BW;AACA,oChB/4BX,6CgB+4BW;AACL,+BhBh5BN,6CgBg5BM;AACD,8BhBj5BL,6CgBi5BK;AACI,kChBt4BP,+CgBs4BO;AACA,kChBx4BP,+CgBw4BO;AACD,iChBt4BP,8CgBs4BO;AACE,mChBx4BP,gDgBw4BO;AAtDb;AAyDG;;;AAED;AA0lIyB;;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;A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,kBAA1B;AAAI;AACF,gBAAG,CAAC,KAAK,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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ErD,+CqB7EqD,CAAnD;AAEC;;AACA;;AACD;;AACH;;AACC;;AA+BJ;AA3BO;;;AAEhB;AACA;AACA;AACA;AACA;AACA;AAPgB;;;;;;AAivFuB;AAEzC,uBAAY,OAAO,CAAC,KAAD;AAFsB;AAqCH;AAEtC;AACA;AACA;AAEA,uBAAa;AACb,YAAO,WAAM;AAEb,UAAG,CAAY,CAAC,GAAD,SAAf,EACE,MADF;AAGA,UAAG,cAAU,KAAE,iCAAf;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,IAA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AACA;AACA;AACA;AACA;AAlB4B;AApRK;AAE/B;AACA;AACA;AAEA,YAAQ;AACR,YAAO;AACP,YAAO,kCAAW,CAAC,MAAD;AAGpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AArBiC;AAyDD;AAE9B;AACA;AAAK;AACL;AAEA,YAAQ;AACR,YAAO;AACP,aAAQ,kCAAW,CAAC,UAAD;AACnB,aAAQ,kCAAW,CAAC,YAAD;AAGrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAxBgC;AA4BD;AAG7B;AACA;AAAK;AACL;AAEA,YAAQ;AACR,YAAO;AACP,aAAQ,kCAAW,CAAC,UAAD;AACnB,aAAQ,kCAAW,CAAC,YAAD;AAGrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA3B+B;AA5DG;AAIhC;AACA;AAAK;AACL;AAEA,YAAQ;AACR,YAAO;AACP,aAAQ,kCAAW,CAAC,UAAD;AACnB,aAAQ,kCAAW,CAAC,YAAD;AAGrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA5BkC;AA2FH;AAE7B;AACA;AAEA,YAAQ;AACR,YAAO;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAhB+B;AAoBA;AAE7B;AACA;AACA;AAEA,YAAQ;AAEH;AACL,UADK,IACL;AAAW,cAAO;AAClB,gBAFK,IAEL;AAAO,cAAO;AACd,gBAHK,IAGL;AAAS,cAAO;AAChB,gBAJK,IAIL;AAAU,cAAO;AACjB,gBALK,IAKL;AAAU,cAAO;AACjB,gBANK,IAML,qCAAQ,MAAO,cAAf;AAGA,YAAO;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAjC+B;AAqCA;AAE7B;AACA;AAAI;AACJ;AACA;AAEA,YAAQ;AAER,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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;AArMmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6sM2B;AAEhD,UAAG,qBAAiB,KAAG,KAAvB,EACE,qBAAgB,OAAO,CAAC,KAAD,CADzB;AAFgD;AAyCC;AAGjD,UAAG,sBAAkB,KAAG,KAAxB,EACE,sBAAiB,OAAO,CAAC,KAAD,CAD1B;AAHiD;AAcC;AAGlD,UAAG,uBAAmB,KAAG,KAAzB,EACE,uBAAkB,OAAO,CAAC,KAAD,CAD3B;AAHkD;AA7DN;AAE5C,UAAG,iBA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,CAAI,EAAG,CAAE,GAAE,CAAF,CAAK,ElGhjCN,EAA2B,EAA2B,EAC/C,CkG+iCf;AAVX;AAAa;AAvBR;AAttCd,GAstCc,iBAttCd;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,6EACM,uEACR,gEACA,0DACG,kEAEE,qDACE,6DACH,qDACD,2EACU,iEACF,oFACF,yEACI,+GACiB,qGAC9B,8CACC,iDACI,6DACE,iEACC,6GACM,+EACZ,+EACgB,wGACP,wFACG,yFACE,8HACR,sFACK,qFACD,iFACD,4EACQ,mGACE,6EAClB,sDACK,8DACD,gEACU,iFACA,gFACT,mEACF,8DAjHV;AAFT;ACDA,iBAKS,wDALT;;;;AAWkB,0BAAU,UAAP,UAAO,GAAI,CAAJ;AACX,yBAAG;AAIN,iDAAO,CAAP;AAAF,qBAA6B,IAAK,GAAlC;AAEY,gCAAG,cAAC,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,CAA7B;AAMZ;;AAIH;;AAKG;;AACG,sCADH,qCACG;AAEF;;AACG,uCADH,sCACG;AAEN;;AACM;;AAEJ;;AACC,oCADD,qCACC;AAkGL;AAmCC;AAyDJ;AAynBC;AAuOC;AAueG;AAjHF;AA+PC;AArGE;AAgCW;AAgCI;AAWT;AAtmDJ;;AAEF;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,sBACA,IAAA,wBACA,IAAA,8BACA,0CAFA;AAFS;;AACT;AACA;AACA;AACA;AAJS;;;AACT;AACA,wBAHU,0BAGV;AACA;AACA,+BAxCW,2BAwCX;AAJS;AAMH,mCANG,iCAMH;AAEI;AACV;AACA;AACA;AACA;AAEA;AANU;;mBAKV;AALU;;;aACV,sBACA,IAAA,0BACA,IAAA,wCACA,IAAA,wBACA,IAAA,6BACA,kCAJA;AAFU;;AACV;AACA;AACA;AACA;AACA;AACA;AANU;;;AACV;AACA,yBAphCW,2BAohCX;AACA,gCAlhCY,4BAkhCZ;AACA;AACA,2BAhDO,uBAgDP;AACA;AANU;AAQK,4CARL,kCAQK;AAGF;;;kBACb;AADa;;;aACb;AADa;;AACb;AADa;;;AACb,0BAJe,+BAIf;AADa;AAIM,4EAAoB,UAOjC,sBAPiC,EAAiB,QAf9C,0BAe8C,CAArC;AACH,yEAAoB,UAM9B,sBAN8B,EAAiB,QALxC,6BAKwC,CAArC;AAMV;;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAzEM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwpGuB;;AAGb;AAGhB;AACA;AACA;AAKF,YAAG,kBAAa,GAAE,CAAlB,EACE,yBAAkB,mBAAlB,CADF;AAGA,YAAG,CAAI,QAAP;AAEE,cAAG,kBAAa,GAAE,CAAlB;AAEE,4BAAW,cAAQ,CAAC,kBAAD,CAAnB;AACA,qBAAO,yBAAiC,OAAb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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;AA2CF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA5LY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8VsB;AAEpC;AACA,UAAG,gBAAO,gBAAgB,SAA1B,EAAwC,gBAAO,2BAA2B,CAAC,IAAD,CAA1E;AACA,uCAAsB,CAAC,2BC/OmB,ED+OpB;AACtB,UAAI;AALgC;AAqMF;AAGlC,4BAAkB;AAClB,+BAAqB;AACrB,yBAAqB;AACrB,oCAAqB;AAKhB,sBAAO,iBAAiB,eAAC,CAAS,yDAAT;AAM9B,UAAG,4BAAkB,KAAG,IAAxB;AAEK,mCAAc,QAAC,CAAQ,yBAAc,CAAC,4BAAD,CAAmB,MAAwC,GAAhC,GAAF,GAAQ,2BAAc,MAAhB,GAAwB,GAAF,GAAQ,4BAAiB,MAApG;AACf,gCAAoB;AACpB,oCAAwB;AACxB,iBAAI,QAAC,CAAQ,qBAAgB,QAAC,EAAzB;AACL,iCAAoB,WAAC,CAAa,KAAb;OAN1B;AASA,UAA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E,sCAAO,U1HqF3B,2B0HrF2B,CAAP;AACA,sCAAO,U1HoF3B,2B0HpF2B,CAAP;AACE,wCAAO,U1HmF7B,2B0HnF6B,CAAP;AAjCT;AA4CpB;AAtDF,GAyDc,wCAzDd;ACAA,4BAES,0pBAFT;;;AAemB;;;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAmEA;AACA;AACA;AACA;AA7fe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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B2HgY+B,EAAQ,U3HhYvC,2B2HgYuC,EAAY,kBAAG,iBAA9B;AACA,0CAAO,U3HjY/B,2B2HiY+B,EAAgB,SlH4gC3C,gCkH5gC2C,EAAgB,kBACjE,iBAD0B;AAEI,8CAAO,U3HnYnC,2B2HmYmC,EAAgB,SlH0gC/C,gCkH1gC+C,EAAgB,kBACrE,iBAD8B;AAEhB,8BAAO,U3HrYnB,2B2HqYmB,CAAP;AACD,6BAAO,U3HtYlB,2B2HsYkB,CAAP;AArfD;AAqgBjB;AAphBF,GAshBc,6BAthBd;ACAA,4BAES,yhBAFT;;;AAcmB;;;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;AAqEA;AACA;AACA;AAEA;AACA;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ACV,qBAAU;AACV,cAAG;AACH,qBAAU;AACV,qBAAU;AACV,cAAG;AACH,qBAAU;AACV,qBAAU;AACV,cAAG;AACH,qBAAU;AACV,qBAAU;AACV,gBAAK;AACL,qBAAU;AACV,oBAAS;AACT,cAAG;AACH,gBAAK;AACL,qBAAU;AACV,qBAAU;AACV,cAAG;AACH,gBAAK;AACL,qBAAU;AACV,qBAAU;AACV,cAAG;AACH,6BAAkB;AAClB,2BAAgB;AAChB,yBAAc;AACd,yBAAc;AACd,wBAAa;AACb,sBAAW;AACX,cAAG;AACH,qBAAU;AACV,oBAAS;AACT,eAAI;AACJ,qBAAU;AACV,qBAAU;AACV,aAAE;AACF,cAAG;AACH,qBAAU;AACV,oBAAS;AACT,cAAG;AACH,qBAAU;AACV,qBAAU;AACV,cAAG;AACH,oBAAS;AACT,oBAAS;AACT,cAAG;AACH,oBAAS;AACT,oBAAS;AACT,cAAG;AACH,oBAAS;AACT,oBAAS;AACT,cAAG;AACH,sBAAW;AACX,qBAAU;AACV,cAAG;AACH,qBAAU;AACV,qBAAU;AACV,cAAG;AACH,oBAAS;AACT,oBAAS;AACT,cAAG;AACH,qBAAU;AACV,qBAAU;AACV,cAAG;AACH,qBAAU;AACV,qBAAU;AACV,cAAG;AACH,qBAAU;AACV,oBAAS;AACT,cAAG;AACH,sBAAW;AACX,qBAAU;AACV,cAAG;AACH,sBAAW;AACX,qBAAU;AACV,cAAG;AACH,qBAAU;AACV,qBAAU;AACV,cAAG;AACH,qBAAU;AACV,qBAAU;AACV,cAAG;AACH,sBAAW;AACX,qBAAU;AACV,cAAG;AACH,sBAAW;AACX,qBAAU;AACV,cAAG;AACH,sBAAW;AACX,qBAAU;AACV,aAAE;AACF,qBAAU;AACV,qBAAU;AACV,aAAE;AACF,qBAAU;AACV,qBAAU;AACV,aAAE;AACF,qBAAU;AACV,qBAAU;AACV,aAAE;AACF,qBAAU;AACV,qBAAU;AACV,cAAG;AACH,qBAAU;AACV,qBAAU;AACV,aAAE;AACF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2BAA+B;AAC/B,+BAA8B;AAS9B;AAMA,gCAAgC;AAEhC,qBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AAEtB;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA,qCAAoC;AACpC,qCAAoC;AACpC,iCAAoC;AACpC,oCAAoC;AACpC;AAEA,yBAAoC;AACpC,iCAAoC;AACpC,gCAAoC;AACpC,2BAAoC;AAEpC,qBAAoC;AACpC,8BAAoC;AACpC,4BAAoC;AACpC,4BAAoC;AACpC,uBAAoC;AACpC,qBAAoC;AAEpC;AACA;AAGA,8BAAoC;AACpC,gCAAoC;AACpC,8BAAoC;AAEpC,2BAAoC;AACpC,+BAAoC;AACpC,+BAAoC;AAEpC;AACA;AAEA,gCAAgC;AAGhC;AA/aJ,GAmbc,2TAnbd;AuBAA,uBAES,yTAFT;;;AAYc;;;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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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,UjJoGxB,2BiJpGwB,CAAP;AACD,kCAAO,UjJmGvB,2BiJnGuB,CAAP;AACI,sCAAO,UjJkG3B,2BiJlG2B,CAAP;AACA,sCAAO,UjJiG3B,2BiJjG2B,CAAP;AACF,oCAAO,UjJgGzB,2BiJhGyB,CAAP;AACC,qCAAO,UjJ+F1B,2BiJ/F0B,EAAkB,mBAC1C,SxI2+CE,gCwI3+CF,CADiB;AAED,oCAAO,UjJ6FzB,2BiJ7FyB,CAAP;AACF,kCAAO,UjJ4FvB,2BiJ5FuB,CAAP;AACK,uCAAQ,uBAAU,uBAAlB;AACH,oCAAO,UjJ0FzB,2BiJ1FyB,CAAP;AA1BZ;AAkCb;AA5CF,GA8Cc,sBA9Cd;ACAA,yBAES,qTAFT;;;AAWK;;;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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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AACP,4BvH2bI,sCuH3bJ;AACA,2BxHmkBK,uCwHnkBL;AACA,0BxHsRG,qCwHtRH;AACA,8BxHqRG,qCwHrRH;AACA,6BpHuLK,sCoHvLL;AACA,6BpHsLK,sCoHtLL;AACA,4BxH4FI,sCwH5FJ;AACA,6BpHoLK,sCoHpLL;AACA,4BxH0FI,sCwH1FJ;AACA,4BxHyFI,sCwHzFJ;AACA,4B9BgEI,mC8BhEJ;AACA,0BvHgbI,sCuHhbJ;AACA,2BvHs6BY,8CuHt6BZ;AACuB,oCAAO,UrJgGzB,2BqJhGyB,CAAP;AACG,uCAAQ,uBAAU,uBAAlB;AACH,oCAAO,UrJ8FzB,2BqJ9FyB,CAAP;AACC,qCAAO,UrJ6F1B,2BqJ7F0B,EAAkB,mBAC1C,S5Iy+CE,gC4Iz+CF,CADiB;AAEI,yCAAO,UrJ2F9B,2BqJ3F8B,EAAkB,mBAC9C,S5Iu+CE,gC4Iv+CF,CADqB;AAEP,kCAAO,UrJyFvB,2BqJzFuB,CAAP;AACE,oCAAO,UrJwFzB,2BqJxFyB,CAAP;AAtBhB;AA8BT;AA9CF,GAgDc,6BAhDd;ACAA,mBAES,o3BAFT;;;AAmBU;;;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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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