From 4697fe00baac07f5a4ea685415a2086f72c25e64 Mon Sep 17 00:00:00 2001 From: "wanderlan.anjos@gmail.com" Date: Sat, 30 Mar 2013 20:46:36 +0000 Subject: [PATCH] Updating examples for Ext JS 4.2 --- ExtJSWrapper/Ext.pas | 38143 ++++++++++++++------------- ExtJSWrapper/ExtFixes.txt | 66 +- ExtJSWrapper/ExtToPascal.dpr | 41 +- ExtJSWrapper/ExtToPascal.dsk | 512 +- ExtPascalSamples/BasicTabPanel.pas | 2 +- ExtPascalSamples/LayoutWindow.pas | 2 +- ExtPascalSamples/MessageBoxes.pas | 18 +- ExtPascalSamples/Session.pas | 5 +- ExtPascalUtils.pas | 10 +- 9 files changed, 20058 insertions(+), 18741 deletions(-) diff --git a/ExtJSWrapper/Ext.pas b/ExtJSWrapper/Ext.pas index 51e79d2..e5a1b5f 100644 --- a/ExtJSWrapper/Ext.pas +++ b/ExtJSWrapper/Ext.pas @@ -1,6 +1,6 @@ unit Ext; -// Generated by JSToPascal v.0.9.9, at 28/03/2013 10:27:47 +// Generated by JSToPascal v.0.9.9, at 30/03/2013 17:28:36 // from "\extpascal\ext-4.2.0\src interface @@ -350,6 +350,7 @@ TExtPickerMonth = class; TExtPickerTime = class; TExtPluginManagerSingleton = class; TExtProgressBar = class; + TExtProgressWaitConfig = class; TExtResizer = class; TExtResizerBorderSplitter = class; TExtResizerBorderSplitterTracker = class; @@ -402,6 +403,7 @@ TExtSelectionRowModel = class; TExtSelectionTreeModel = class; TExtShadow = class; TExtShadowPoolSingleton = class; + TExtShowConfig = class; TExtSliderMulti = class; TExtSliderSingle = class; TExtSliderThumb = class; @@ -481,7 +483,8 @@ TExtXTemplateCompiler = class; TExtXTemplateParser = class; TExtZIndexManager = class; - TExtDataRecord = class(TExtObject); + TExtCompositeElement = class(TExtObject); + TExtDataRecord = TExtDataModel; TExtDataStorePageMap = class(TExtObject); TExtDomAbstractElementFly = class(TExtObject); TExtElement = class(TExtObject); @@ -493,6 +496,113 @@ TExtFocusManager = class(TExtObject); TExtSliderMultiSlider = class(TExtObject); TExtUtilHistory = class(TExtObject); + TExtProgressWaitConfig = class(TExtFunction) + private + FAnimate : Boolean; + FDuration : Integer; + FFn : TExtFunction; + FIncrement : Integer; // 10 + FInterval : Integer; // 1000 + FScope : TExtObject; + FText : String; + procedure SetFAnimate(Value : Boolean); + procedure SetFDuration(Value : Integer); + procedure SetFFn(Value : TExtFunction); + procedure SetFIncrement(Value : Integer); + procedure SetFInterval(Value : Integer); + procedure SetFScope(Value : TExtObject); + procedure SetFText(Value : String); + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + property Animate : Boolean read FAnimate write SetFAnimate; + property Duration : Integer read FDuration write SetFDuration; + property Fn : TExtFunction read FFn write SetFFn; + property Increment : Integer read FIncrement write SetFIncrement; + property Interval : Integer read FInterval write SetFInterval; + property Scope : TExtObject read FScope write SetFScope; + property Text : String read FText write SetFText; + end; + + TExtShowConfig = class(TExtFunction) + private + FAnimTarget : String; + FButtons : Integer; + FClosable : Boolean; // true + FCls : String; + FDefaultFocus : String; + FDefaultTextHeight : Integer; // 75 + FFn : TExtFunction; + FIcon : String; + FIconCls : String; + FMaxWidth : Integer; // 600 + FMinWidth : Integer; // 100 + FModal : Boolean; // true + FMsg : String; + FMultiline : Boolean; + FProgress : Boolean; + FProgressText : String; + FPrompt : Boolean; + FProxyDrag : Boolean; + FScope : TExtObject; + FTitle : String; + FValue : String; + FWait : Boolean; + FWaitConfig : TExtProgressWaitConfig; + FWidth : Integer; + procedure SetFAnimTarget(Value : String); + procedure SetFButtons(Value : Integer); + procedure SetFClosable(Value : Boolean); + procedure SetFCls(Value : String); + procedure SetFDefaultFocus(Value : String); + procedure SetFDefaultTextHeight(Value : Integer); + procedure SetFFn(Value : TExtFunction); + procedure SetFIcon(Value : String); + procedure SetFIconCls(Value : String); + procedure SetFMaxWidth(Value : Integer); + procedure SetFMinWidth(Value : Integer); + procedure SetFModal(Value : Boolean); + procedure SetFMsg(Value : String); + procedure SetFMultiline(Value : Boolean); + procedure SetFProgress(Value : Boolean); + procedure SetFProgressText(Value : String); + procedure SetFPrompt(Value : Boolean); + procedure SetFProxyDrag(Value : Boolean); + procedure SetFScope(Value : TExtObject); + procedure SetFTitle(Value : String); + procedure SetFValue(Value : String); + procedure SetFWait(Value : Boolean); + procedure SetFWaitConfig(Value : TExtProgressWaitConfig); + procedure SetFWidth(Value : Integer); + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + property AnimTarget : String read FAnimTarget write SetFAnimTarget; + property Buttons : Integer read FButtons write SetFButtons; + property Closable : Boolean read FClosable write SetFClosable; + property Cls : String read FCls write SetFCls; + property DefaultFocus : String read FDefaultFocus write SetFDefaultFocus; + property DefaultTextHeight : Integer read FDefaultTextHeight write SetFDefaultTextHeight; + property Fn : TExtFunction read FFn write SetFFn; + property Icon : String read FIcon write SetFIcon; + property IconCls : String read FIconCls write SetFIconCls; + property MaxWidth : Integer read FMaxWidth write SetFMaxWidth; + property MinWidth : Integer read FMinWidth write SetFMinWidth; + property Modal : Boolean read FModal write SetFModal; + property Msg : String read FMsg write SetFMsg; + property Multiline : Boolean read FMultiline write SetFMultiline; + property Progress : Boolean read FProgress write SetFProgress; + property ProgressText : String read FProgressText write SetFProgressText; + property Prompt : Boolean read FPrompt write SetFPrompt; + property ProxyDrag : Boolean read FProxyDrag write SetFProxyDrag; + property Scope : TExtObject read FScope write SetFScope; + property Title : String read FTitle write SetFTitle; + property Value : String read FValue write SetFValue; + property Wait : Boolean read FWait write SetFWait; + property WaitConfig : TExtProgressWaitConfig read FWaitConfig write SetFWaitConfig; + property Width : Integer read FWidth write SetFWidth; + end; + // Procedural types for events TExtAbstractComponent TExtAbstractComponentOnActivate = procedure(This : TExtAbstractComponent) of object; TExtAbstractComponentOnAdded = procedure(This : TExtAbstractComponent; Container : TExtContainer; Pos : Integer) of object; @@ -545,8 +655,10 @@ TExtAbstractComponent = class(TExtFunction) FDisabled : Boolean; FDisabledCls : String; FDraggable : Boolean; + FDraggable_ : Boolean; FFloating : Boolean; FFrame : Boolean; + FFrameSize : TExtObject; FHasListeners : TExtObject; FHeight : Integer; FHidden : Boolean; @@ -554,6 +666,7 @@ TExtAbstractComponent = class(TExtFunction) FHtml : String; FHtmlObject : TExtObject; FId : String; + FIsComponent : Boolean; FIsObservable : Boolean; FItemId : String; FListeners : TExtObject; @@ -567,6 +680,7 @@ TExtAbstractComponent = class(TExtFunction) FMinHeight : Integer; FMinWidth : Integer; FOverCls : String; + FOwnerCt : TExtContainer; FPadding : Integer; FPaddingString : String; FPlugins : TExtObjectList; @@ -574,6 +688,7 @@ TExtAbstractComponent = class(TExtFunction) FPluginsObject : TExtObject; FPluginsPlugin : TExtAbstractPlugin; FRenderData : TExtObject; + FRendered : Boolean; FRenderSelectors : TExtObject; FRenderTo : String; FRenderToElement : TExtElement; @@ -642,8 +757,10 @@ TExtAbstractComponent = class(TExtFunction) procedure SetFDisabled(Value : Boolean); procedure SetFDisabledCls(Value : String); procedure SetFDraggable(Value : Boolean); + procedure SetFDraggable_(Value : Boolean); procedure SetFFloating(Value : Boolean); procedure SetFFrame(Value : Boolean); + procedure SetFFrameSize(Value : TExtObject); procedure SetFHasListeners(Value : TExtObject); procedure SetFHeight(Value : Integer); procedure SetFHidden(Value : Boolean); @@ -651,6 +768,7 @@ TExtAbstractComponent = class(TExtFunction) procedure SetFHtml(Value : String); procedure SetFHtmlObject(Value : TExtObject); procedure SetFId(Value : String); + procedure SetFIsComponent(Value : Boolean); procedure SetFIsObservable(Value : Boolean); procedure SetFItemId(Value : String); procedure SetFListeners(Value : TExtObject); @@ -664,6 +782,7 @@ TExtAbstractComponent = class(TExtFunction) procedure SetFMinHeight(Value : Integer); procedure SetFMinWidth(Value : Integer); procedure SetFOverCls(Value : String); + procedure SetFOwnerCt(Value : TExtContainer); procedure SetFPadding(Value : Integer); procedure SetFPaddingString(Value : String); procedure SetFPlugins(Value : TExtObjectList); @@ -671,6 +790,7 @@ TExtAbstractComponent = class(TExtFunction) procedure SetFPluginsObject(Value : TExtObject); procedure SetFPluginsPlugin(Value : TExtAbstractPlugin); procedure SetFRenderData(Value : TExtObject); + procedure SetFRendered(Value : Boolean); procedure SetFRenderSelectors(Value : TExtObject); procedure SetFRenderTo(Value : String); procedure SetFRenderToElement(Value : TExtElement); @@ -738,7 +858,7 @@ TExtAbstractComponent = class(TExtFunction) function CalculateConstrainedPosition(ConstrainTo : String = ''; ProposedPosition : TArrayOfInteger = nil; Local : Boolean = false; ProposedSize : TArrayOfInteger = nil) : TExtFunction; overload; function ClearListeners : TExtFunction; function ClearManagedListeners : TExtFunction; - constructor Create; + constructor Create; overload; function Disable(Silent : Boolean = false) : TExtFunction; function DoAutoRender : TExtFunction; function DoComponentLayout : TExtFunction; @@ -856,8 +976,10 @@ TExtAbstractComponent = class(TExtFunction) property Disabled : Boolean read FDisabled write SetFDisabled; property DisabledCls : String read FDisabledCls write SetFDisabledCls; property Draggable : Boolean read FDraggable write SetFDraggable; + property Draggable_ : Boolean read FDraggable_ write SetFDraggable_; property Floating : Boolean read FFloating write SetFFloating; property Frame : Boolean read FFrame write SetFFrame; + property FrameSize : TExtObject read FFrameSize write SetFFrameSize; property HasListeners : TExtObject read FHasListeners write SetFHasListeners; property Height : Integer read FHeight write SetFHeight; property Hidden : Boolean read FHidden write SetFHidden; @@ -865,6 +987,7 @@ TExtAbstractComponent = class(TExtFunction) property Html : String read FHtml write SetFHtml; property HtmlObject : TExtObject read FHtmlObject write SetFHtmlObject; property Id : String read FId write SetFId; + property IsComponent : Boolean read FIsComponent write SetFIsComponent; property IsObservable : Boolean read FIsObservable write SetFIsObservable; property ItemId : String read FItemId write SetFItemId; property Listeners : TExtObject read FListeners write SetFListeners; @@ -878,6 +1001,7 @@ TExtAbstractComponent = class(TExtFunction) property MinHeight : Integer read FMinHeight write SetFMinHeight; property MinWidth : Integer read FMinWidth write SetFMinWidth; property OverCls : String read FOverCls write SetFOverCls; + property OwnerCt : TExtContainer read FOwnerCt write SetFOwnerCt; property Padding : Integer read FPadding write SetFPadding; property PaddingString : String read FPaddingString write SetFPaddingString; property Plugins : TExtObjectList read FPlugins write SetFPlugins; @@ -885,6 +1009,7 @@ TExtAbstractComponent = class(TExtFunction) property PluginsObject : TExtObject read FPluginsObject write SetFPluginsObject; property PluginsPlugin : TExtAbstractPlugin read FPluginsPlugin write SetFPluginsPlugin; property RenderData : TExtObject read FRenderData write SetFRenderData; + property Rendered : Boolean read FRendered write SetFRendered; property RenderSelectors : TExtObject read FRenderSelectors write SetFRenderSelectors; property RenderTo : String read FRenderTo write SetFRenderTo; property RenderToElement : TExtElement read FRenderToElement write SetFRenderToElement; @@ -933,18 +1058,6 @@ TExtAbstractComponent = class(TExtFunction) property OnStatesave : TExtAbstractComponentOnStatesave read FOnStatesave write SetFOnStatesave; end; - TExtViewNodeCache = class(TExtAbstractComponent) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Clear(RemoveDom : Boolean = false) : TExtFunction; - function Fill(Els : TExtObjectList) : TExtFunction; - function IndexOf(El : Integer) : TExtFunction; overload; - function RemoveElement(El : Integer; RemoveDom : Boolean = false) : TExtFunction; overload; - function ReplaceElement(El : Integer; Replacement : String; DomReplace : Boolean = false) : TExtFunction; overload; - function Scroll(NewRecords : TExtObjectList; Direction : Integer; RemoveCount : Integer) : TExtFunction; - end; - // Procedural types for events TExtGridLockingLockable TExtGridLockingLockableOnFilterchange = procedure of object; TExtGridLockingLockableOnLockcolumn = procedure(This : TExtGridLockingLockable; Column : TExtGridColumn) of object; @@ -997,26 +1110,40 @@ TExtGridLockingLockable = class(TExtAbstractComponent) property OnUnlockcolumn : TExtGridLockingLockableOnUnlockcolumn read FOnUnlockcolumn write SetFOnUnlockcolumn; end; - TExtFxQueue = class(TExtAbstractComponent) + TExtFxTarget = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create(Target : TExtComponent); overload; end; - TExtFxTarget = class(TExtAbstractComponent) + TExtViewNodeCache = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create(Target : TExtComponent); overload; + function Clear(RemoveDom : Boolean = false) : TExtFunction; + function Fill(Els : TExtObjectList) : TExtFunction; + function IndexOf(El : Integer) : TExtFunction; overload; + function RemoveElement(El : Integer; RemoveDom : Boolean = false) : TExtFunction; overload; + function ReplaceElement(El : Integer; Replacement : String; DomReplace : Boolean = false) : TExtFunction; overload; + function Scroll(NewRecords : TExtObjectList; Direction : Integer; RemoveCount : Integer) : TExtFunction; end; - TExtGridPluginBufferedRendererTableView = class(TExtAbstractComponent) + TExtUtilTextMetrics = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function Bind(El : String) : TExtFunction; overload; + constructor Create(BindTo : String; FixedWidth : Integer = 0); overload; + function GetHeight(Text : String) : TExtFunction; + function GetSize(Text : String) : TExtFunction; + function GetTextWidth(Text : String; Min : Integer = 0; Max : Integer = 0) : TExtFunction; + function GetWidth(Text : String) : TExtFunction; + function Measure(El : String; Text : String; FixedWidth : Integer = 0) : TExtFunction; overload; + function SetFixedWidth(Width : Integer) : TExtFunction; end; - TExtGridPluginBufferedRendererTreeView = class(TExtAbstractComponent) + TExtGridPluginBufferedRendererTableView = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} @@ -1058,112 +1185,10 @@ TExtGridLockingView = class(TExtAbstractComponent) property Listeners : TExtObject read FListeners write SetFListeners; end; - TExtUtilTextMetrics = class(TExtAbstractComponent) + TExtGridPluginBufferedRendererTreeView = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Bind(El : String) : TExtFunction; overload; - constructor Create(BindTo : String; FixedWidth : Integer = 0); overload; - function GetHeight(Text : String) : TExtFunction; - function GetSize(Text : String) : TExtFunction; - function GetTextWidth(Text : String; Min : Integer = 0; Max : Integer = 0) : TExtFunction; - function GetWidth(Text : String) : TExtFunction; - function Measure(El : String; Text : String; FixedWidth : Integer = 0) : TExtFunction; overload; - function SetFixedWidth(Width : Integer) : TExtFunction; - end; - - // Procedural types for events TExtFxAnim - TExtFxAnimOnAfteranimate = procedure(This : TExtFxAnim; StartTime : TDateTime) of object; - TExtFxAnimOnBeforeanimate = procedure(This : TExtFxAnim) of object; - TExtFxAnimOnLastframe = procedure(This : TExtFxAnim; StartTime : TDateTime) of object; - - TExtFxAnim = class(TExtAbstractComponent) - private - FAlternate : Boolean; - FCallback : TExtFunction; - FDelay : Integer; - FDuration : Integer; - FDynamic : Boolean; - FEasing : String; - FFrom : TExtObject; - FHasListeners : TExtObject; - FIsObservable : Boolean; - FIterations : Integer; - FKeyframes : TExtObject; - FListeners : TExtObject; - FReverse : Boolean; - FScope : TExtFunction; - FTarget : String; - FTargetObject : TExtObject; - FToJS : TExtObject; - FOnAfteranimate : TExtFxAnimOnAfteranimate; - FOnBeforeanimate : TExtFxAnimOnBeforeanimate; - FOnLastframe : TExtFxAnimOnLastframe; - procedure SetFAlternate(Value : Boolean); - procedure SetFCallback(Value : TExtFunction); - procedure SetFDelay(Value : Integer); - procedure SetFDuration(Value : Integer); - procedure SetFDynamic(Value : Boolean); - procedure SetFEasing(Value : String); - procedure SetFFrom(Value : TExtObject); - procedure SetFHasListeners(Value : TExtObject); - procedure SetFIsObservable(Value : Boolean); - procedure SetFIterations(Value : Integer); - procedure SetFKeyframes(Value : TExtObject); - procedure SetFListeners(Value : TExtObject); - procedure SetFReverse(Value : Boolean); - procedure SetFScope(Value : TExtFunction); - procedure SetFTarget(Value : String); - procedure SetFTargetObject(Value : TExtObject); - procedure SetFToJS(Value : TExtObject); - procedure SetFOnAfteranimate(Value : TExtFxAnimOnAfteranimate); - procedure SetFOnBeforeanimate(Value : TExtFxAnimOnBeforeanimate); - procedure SetFOnLastframe(Value : TExtFxAnimOnLastframe); - protected - procedure InitDefaults; override; - procedure HandleEvent(const AEvtName: string); override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function AddEvents(EventNames : String) : TExtFunction; overload; - function AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; overload; - function AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; overload; - function ClearListeners : TExtFunction; - function ClearManagedListeners : TExtFunction; - constructor Create; - function EnableBubble(EventNames : String) : TExtFunction; overload; - function EndJS : TExtFunction; - function FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; - function FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; - function HasListener(EventName : String) : TExtFunction; - function RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; - function RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; - function RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; overload; - function ResumeEvent(EventName : String) : TExtFunction; - function ResumeEvents : TExtFunction; - function SuspendEvent(EventName : String) : TExtFunction; - function SuspendEvents(QueueSuspended : Boolean) : TExtFunction; - destructor Destroy; override; - property Alternate : Boolean read FAlternate write SetFAlternate; - property Callback : TExtFunction read FCallback write SetFCallback; - property Delay : Integer read FDelay write SetFDelay; - property Duration : Integer read FDuration write SetFDuration; - property Dynamic : Boolean read FDynamic write SetFDynamic; - property Easing : String read FEasing write SetFEasing; - property From : TExtObject read FFrom write SetFFrom; - property HasListeners : TExtObject read FHasListeners write SetFHasListeners; - property IsObservable : Boolean read FIsObservable write SetFIsObservable; - property Iterations : Integer read FIterations write SetFIterations; - property Keyframes : TExtObject read FKeyframes write SetFKeyframes; - property Listeners : TExtObject read FListeners write SetFListeners; - property Reverse : Boolean read FReverse write SetFReverse; - property Scope : TExtFunction read FScope write SetFScope; - property Target : String read FTarget write SetFTarget; - property TargetObject : TExtObject read FTargetObject write SetFTargetObject; - property ToJS : TExtObject read FToJS write SetFToJS; - property OnAfteranimate : TExtFxAnimOnAfteranimate read FOnAfteranimate write SetFOnAfteranimate; - property OnBeforeanimate : TExtFxAnimOnBeforeanimate read FOnBeforeanimate write SetFOnBeforeanimate; - property OnLastframe : TExtFxAnimOnLastframe read FOnLastframe write SetFOnLastframe; end; // Procedural types for events TExtFxAnimator @@ -1178,6 +1203,7 @@ TExtFxAnimator = class(TExtAbstractComponent) FDynamic : Boolean; FEasing : String; FHasListeners : TExtObject; + FIsAnimator : Boolean; FIsObservable : Boolean; FIterations : Integer; // 1 FKeyframes : TExtObject; @@ -1191,6 +1217,7 @@ TExtFxAnimator = class(TExtAbstractComponent) procedure SetFDynamic(Value : Boolean); procedure SetFEasing(Value : String); procedure SetFHasListeners(Value : TExtObject); + procedure SetFIsAnimator(Value : Boolean); procedure SetFIsObservable(Value : Boolean); procedure SetFIterations(Value : Integer); procedure SetFKeyframes(Value : TExtObject); @@ -1229,6 +1256,7 @@ TExtFxAnimator = class(TExtAbstractComponent) property Dynamic : Boolean read FDynamic write SetFDynamic; property Easing : String read FEasing write SetFEasing; property HasListeners : TExtObject read FHasListeners write SetFHasListeners; + property IsAnimator : Boolean read FIsAnimator write SetFIsAnimator; property IsObservable : Boolean read FIsObservable write SetFIsObservable; property Iterations : Integer read FIterations write SetFIterations; property Keyframes : TExtObject read FKeyframes write SetFKeyframes; @@ -1239,28 +1267,10 @@ TExtFxAnimator = class(TExtAbstractComponent) property OnKeyframe : TExtFxAnimatorOnKeyframe read FOnKeyframe write SetFOnKeyframe; end; - TExtFormFieldVTypesSingleton = class(TExtAbstractComponent) - private - FAlphanumText : String; // 'This field should only contain letters, numbers and _' - FAlphaText : String; // 'This field should only contain letters and _' - FEmailMask : TRegExp; - FEmailText : String; // 'This field should be an e-mail address in the format' - FUrlText : String; // 'This field should be a URL in the format' - procedure SetFAlphanumText(Value : String); - procedure SetFAlphaText(Value : String); - procedure SetFEmailMask(Value : TRegExp); - procedure SetFEmailText(Value : String); - procedure SetFUrlText(Value : String); - protected - procedure InitDefaults; override; + TExtFxCubicBezierSingleton = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - property AlphanumText : String read FAlphanumText write SetFAlphanumText; - property AlphaText : String read FAlphaText write SetFAlphaText; - property EmailMask : TRegExp read FEmailMask write SetFEmailMask; - property EmailText : String read FEmailText write SetFEmailText; - property UrlText : String read FUrlText write SetFUrlText; end; // Procedural types for events TExtFormLabelable @@ -1298,7 +1308,9 @@ TExtFormLabelable = class(TExtAbstractComponent) FBeforeSubTpl : String; FBeforeSubTplList : TExtObjectList; FBeforeSubTplTemplate : TExtXTemplate; + FBodyEl : TExtElement; FClearCls : String; + FErrorEl : TExtElement; FErrorMsgCls : String; FFieldBodyCls : String; FFieldLabel : String; @@ -1306,15 +1318,15 @@ TExtFormLabelable = class(TExtAbstractComponent) FHideEmptyLabel : Boolean; FHideLabel : Boolean; FInvalidCls : String; - FLabelableRenderTpl : String; - FLabelableRenderTplList : TExtObjectList; - FLabelableRenderTplTemplate : TExtXTemplate; + FIsFieldLabelable : Boolean; FLabelAlign : String; FLabelAttrTpl : String; FLabelAttrTplList : TExtObjectList; FLabelAttrTplTemplate : TExtXTemplate; + FLabelCell : TExtElement; FLabelCls : String; FLabelClsExtra : String; + FLabelEl : TExtElement; FLabelPad : Integer; FLabelSeparator : String; FLabelStyle : String; @@ -1352,7 +1364,9 @@ TExtFormLabelable = class(TExtAbstractComponent) procedure SetFBeforeSubTpl(Value : String); procedure SetFBeforeSubTplList(Value : TExtObjectList); procedure SetFBeforeSubTplTemplate(Value : TExtXTemplate); + procedure SetFBodyEl(Value : TExtElement); procedure SetFClearCls(Value : String); + procedure SetFErrorEl(Value : TExtElement); procedure SetFErrorMsgCls(Value : String); procedure SetFFieldBodyCls(Value : String); procedure SetFFieldLabel(Value : String); @@ -1360,15 +1374,15 @@ TExtFormLabelable = class(TExtAbstractComponent) procedure SetFHideEmptyLabel(Value : Boolean); procedure SetFHideLabel(Value : Boolean); procedure SetFInvalidCls(Value : String); - procedure SetFLabelableRenderTpl(Value : String); - procedure SetFLabelableRenderTplList(Value : TExtObjectList); - procedure SetFLabelableRenderTplTemplate(Value : TExtXTemplate); + procedure SetFIsFieldLabelable(Value : Boolean); procedure SetFLabelAlign(Value : String); procedure SetFLabelAttrTpl(Value : String); procedure SetFLabelAttrTplList(Value : TExtObjectList); procedure SetFLabelAttrTplTemplate(Value : TExtXTemplate); + procedure SetFLabelCell(Value : TExtElement); procedure SetFLabelCls(Value : String); procedure SetFLabelClsExtra(Value : String); + procedure SetFLabelEl(Value : TExtElement); procedure SetFLabelPad(Value : Integer); procedure SetFLabelSeparator(Value : String); procedure SetFLabelStyle(Value : String); @@ -1389,6 +1403,7 @@ TExtFormLabelable = class(TExtAbstractComponent) function GetLabelWidth : TExtFunction; function HasActiveError : TExtFunction; function HasVisibleLabel : TExtFunction; + function InitLabelable : TExtFunction; function SetActiveError(Msg : String) : TExtFunction; function SetActiveErrors(Errors : TExtObjectList) : TExtFunction; function SetFieldDefaults(Defaults : TExtObject) : TExtFunction; @@ -1426,7 +1441,9 @@ TExtFormLabelable = class(TExtAbstractComponent) property BeforeSubTpl : String read FBeforeSubTpl write SetFBeforeSubTpl; property BeforeSubTplList : TExtObjectList read FBeforeSubTplList write SetFBeforeSubTplList; property BeforeSubTplTemplate : TExtXTemplate read FBeforeSubTplTemplate write SetFBeforeSubTplTemplate; + property BodyEl : TExtElement read FBodyEl write SetFBodyEl; property ClearCls : String read FClearCls write SetFClearCls; + property ErrorEl : TExtElement read FErrorEl write SetFErrorEl; property ErrorMsgCls : String read FErrorMsgCls write SetFErrorMsgCls; property FieldBodyCls : String read FFieldBodyCls write SetFFieldBodyCls; property FieldLabel : String read FFieldLabel write SetFFieldLabel; @@ -1434,15 +1451,15 @@ TExtFormLabelable = class(TExtAbstractComponent) property HideEmptyLabel : Boolean read FHideEmptyLabel write SetFHideEmptyLabel; property HideLabel : Boolean read FHideLabel write SetFHideLabel; property InvalidCls : String read FInvalidCls write SetFInvalidCls; - property LabelableRenderTpl : String read FLabelableRenderTpl write SetFLabelableRenderTpl; - property LabelableRenderTplList : TExtObjectList read FLabelableRenderTplList write SetFLabelableRenderTplList; - property LabelableRenderTplTemplate : TExtXTemplate read FLabelableRenderTplTemplate write SetFLabelableRenderTplTemplate; + property IsFieldLabelable : Boolean read FIsFieldLabelable write SetFIsFieldLabelable; property LabelAlign : String read FLabelAlign write SetFLabelAlign; property LabelAttrTpl : String read FLabelAttrTpl write SetFLabelAttrTpl; property LabelAttrTplList : TExtObjectList read FLabelAttrTplList write SetFLabelAttrTplList; property LabelAttrTplTemplate : TExtXTemplate read FLabelAttrTplTemplate write SetFLabelAttrTplTemplate; + property LabelCell : TExtElement read FLabelCell write SetFLabelCell; property LabelCls : String read FLabelCls write SetFLabelCls; property LabelClsExtra : String read FLabelClsExtra write SetFLabelClsExtra; + property LabelEl : TExtElement read FLabelEl write SetFLabelEl; property LabelPad : Integer read FLabelPad write SetFLabelPad; property LabelSeparator : String read FLabelSeparator write SetFLabelSeparator; property LabelStyle : String read FLabelStyle write SetFLabelStyle; @@ -1452,18 +1469,101 @@ TExtFormLabelable = class(TExtAbstractComponent) property OnErrorchange : TExtFormLabelableOnErrorchange read FOnErrorchange write SetFOnErrorchange; end; - TExtFxManagerSingleton = class(TExtAbstractComponent) + // Procedural types for events TExtFxAnim + TExtFxAnimOnAfteranimate = procedure(This : TExtFxAnim; StartTime : TDateTime) of object; + TExtFxAnimOnBeforeanimate = procedure(This : TExtFxAnim) of object; + TExtFxAnimOnLastframe = procedure(This : TExtFxAnim; StartTime : TDateTime) of object; + + TExtFxAnim = class(TExtAbstractComponent) private - FInterval : Integer; // 16 - procedure SetFInterval(Value : Integer); + FAlternate : Boolean; + FCallback : TExtFunction; + FDelay : Integer; + FDuration : Integer; + FDynamic : Boolean; + FEasing : String; + FFrom : TExtObject; + FHasListeners : TExtObject; + FIsAnimation : Boolean; + FIsObservable : Boolean; + FIterations : Integer; + FKeyframes : TExtObject; + FListeners : TExtObject; + FReverse : Boolean; + FScope : TExtFunction; + FTarget : String; + FTargetObject : TExtObject; + FToJS : TExtObject; + FOnAfteranimate : TExtFxAnimOnAfteranimate; + FOnBeforeanimate : TExtFxAnimOnBeforeanimate; + FOnLastframe : TExtFxAnimOnLastframe; + procedure SetFAlternate(Value : Boolean); + procedure SetFCallback(Value : TExtFunction); + procedure SetFDelay(Value : Integer); + procedure SetFDuration(Value : Integer); + procedure SetFDynamic(Value : Boolean); + procedure SetFEasing(Value : String); + procedure SetFFrom(Value : TExtObject); + procedure SetFHasListeners(Value : TExtObject); + procedure SetFIsAnimation(Value : Boolean); + procedure SetFIsObservable(Value : Boolean); + procedure SetFIterations(Value : Integer); + procedure SetFKeyframes(Value : TExtObject); + procedure SetFListeners(Value : TExtObject); + procedure SetFReverse(Value : Boolean); + procedure SetFScope(Value : TExtFunction); + procedure SetFTarget(Value : String); + procedure SetFTargetObject(Value : TExtObject); + procedure SetFToJS(Value : TExtObject); + procedure SetFOnAfteranimate(Value : TExtFxAnimOnAfteranimate); + procedure SetFOnBeforeanimate(Value : TExtFxAnimOnBeforeanimate); + procedure SetFOnLastframe(Value : TExtFxAnimOnLastframe); protected procedure InitDefaults; override; + procedure HandleEvent(const AEvtName: string); override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function AddAnim(Anim : TExtFxAnim) : TExtFunction; - function RemoveAnim(Anim : TExtFxAnim) : TExtFunction; - property Interval : Integer read FInterval write SetFInterval; + function AddEvents(EventNames : String) : TExtFunction; overload; + function AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; overload; + function AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; overload; + function ClearListeners : TExtFunction; + function ClearManagedListeners : TExtFunction; + constructor Create; + function EnableBubble(EventNames : String) : TExtFunction; overload; + function EndJS : TExtFunction; + function FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; + function FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; + function HasListener(EventName : String) : TExtFunction; + function RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; + function RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; + function RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; overload; + function ResumeEvent(EventName : String) : TExtFunction; + function ResumeEvents : TExtFunction; + function SuspendEvent(EventName : String) : TExtFunction; + function SuspendEvents(QueueSuspended : Boolean) : TExtFunction; + destructor Destroy; override; + property Alternate : Boolean read FAlternate write SetFAlternate; + property Callback : TExtFunction read FCallback write SetFCallback; + property Delay : Integer read FDelay write SetFDelay; + property Duration : Integer read FDuration write SetFDuration; + property Dynamic : Boolean read FDynamic write SetFDynamic; + property Easing : String read FEasing write SetFEasing; + property From : TExtObject read FFrom write SetFFrom; + property HasListeners : TExtObject read FHasListeners write SetFHasListeners; + property IsAnimation : Boolean read FIsAnimation write SetFIsAnimation; + property IsObservable : Boolean read FIsObservable write SetFIsObservable; + property Iterations : Integer read FIterations write SetFIterations; + property Keyframes : TExtObject read FKeyframes write SetFKeyframes; + property Listeners : TExtObject read FListeners write SetFListeners; + property Reverse : Boolean read FReverse write SetFReverse; + property Scope : TExtFunction read FScope write SetFScope; + property Target : String read FTarget write SetFTarget; + property TargetObject : TExtObject read FTargetObject write SetFTargetObject; + property ToJS : TExtObject read FToJS write SetFToJS; + property OnAfteranimate : TExtFxAnimOnAfteranimate read FOnAfteranimate write SetFOnAfteranimate; + property OnBeforeanimate : TExtFxAnimOnBeforeanimate read FOnBeforeanimate write SetFOnBeforeanimate; + property OnLastframe : TExtFxAnimOnLastframe read FOnLastframe write SetFOnLastframe; end; TExtFxPropertyHandler = class(TExtAbstractComponent) @@ -1472,7 +1572,7 @@ TExtFxPropertyHandler = class(TExtAbstractComponent) {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtFxCubicBezierSingleton = class(TExtAbstractComponent) + TExtFxQueue = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} @@ -1484,6 +1584,20 @@ TExtFxEasingSingleton = class(TExtAbstractComponent) {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; + TExtFxManagerSingleton = class(TExtAbstractComponent) + private + FInterval : Integer; // 16 + procedure SetFInterval(Value : Integer); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function AddAnim(Anim : TExtFxAnim) : TExtFunction; + function RemoveAnim(Anim : TExtFxAnim) : TExtFunction; + property Interval : Integer read FInterval write SetFInterval; + end; + TExtLayoutContextItem = class(TExtAbstractComponent) private FState : TExtObject; @@ -1669,11 +1783,13 @@ TExtGridScroller = class(TExtAbstractComponent) TExtUtilSortable = class(TExtAbstractComponent) private FDefaultSortDirection : String; + FIsSortable : Boolean; FSorters : TExtObjectList; FSorters_ : TExtObjectList; FSortersList : TExtObjectList; FSortRoot : String; procedure SetFDefaultSortDirection(Value : String); + procedure SetFIsSortable(Value : Boolean); procedure SetFSorters(Value : TExtObjectList); procedure SetFSorters_(Value : TExtObjectList); procedure SetFSortersList(Value : TExtObjectList); @@ -1688,6 +1804,7 @@ TExtUtilSortable = class(TExtAbstractComponent) function Sort(Sorters : String = ''; Direction : String = '') : TExtFunction; overload; destructor Destroy; override; property DefaultSortDirection : String read FDefaultSortDirection write SetFDefaultSortDirection; + property IsSortable : Boolean read FIsSortable write SetFIsSortable; property Sorters : TExtObjectList read FSorters write SetFSorters; property Sorters_ : TExtObjectList read FSorters_ write SetFSorters_; property SortersList : TExtObjectList read FSortersList write SetFSortersList; @@ -1793,60 +1910,28 @@ TExtLayoutClassList = class(TExtAbstractComponent) function RemoveMany : TExtFunction; end; - TExtXTemplateParser = class(TExtAbstractComponent) - private - FLevel : Integer; - procedure SetFLevel(Value : Integer); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function DoCase(Action : String; Actions : TExtObject) : TExtFunction; - function DoDefault : TExtFunction; - function DoElse : TExtFunction; - function DoElseIf(Action : String; Actions : TExtObject) : TExtFunction; - function DoEnd(TypeJS : String; Actions : TExtObject) : TExtFunction; - function DoEval(Text : String) : TExtFunction; - function DoExec(Action : String; Actions : TExtObject) : TExtFunction; - function DoExpr(Expr : String) : TExtFunction; - function DoFor(Action : String; Actions : TExtObject) : TExtFunction; - function DoForEach(Action : String; Actions : TExtObject) : TExtFunction; - function DoIf(Action : String; Actions : TExtObject) : TExtFunction; - function DoSwitch(Action : String; Actions : TExtObject) : TExtFunction; - function DoTag : TExtFunction; - function DoText(Text : String) : TExtFunction; - function DoTplExtEmptyFnParse : TExtFunction; - property Level : Integer read FLevel write SetFLevel; - end; - - TExtDomCompositeElementLite = class(TExtAbstractComponent) + TExtFormFieldVTypesSingleton = class(TExtAbstractComponent) private - FElements : TExtObjectList; - FIsComposite : Boolean; - procedure SetFElements(Value : TExtObjectList); - procedure SetFIsComposite(Value : Boolean); + FAlphanumText : String; // 'This field should only contain letters, numbers and _' + FAlphaText : String; // 'This field should only contain letters and _' + FEmailMask : TRegExp; + FEmailText : String; // 'This field should be an e-mail address in the format' + FUrlText : String; // 'This field should be a URL in the format' + procedure SetFAlphanumText(Value : String); + procedure SetFAlphaText(Value : String); + procedure SetFEmailMask(Value : TRegExp); + procedure SetFEmailText(Value : String); + procedure SetFUrlText(Value : String); protected procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Add(Els : TExtDomCompositeElement) : TExtFunction; overload; - function Clear(RemoveDom : Boolean = false) : TExtFunction; - function Contains(El : Integer) : TExtFunction; overload; - constructor Create; - function Each(Fn : TExtFunction; FnEl : TExtDomElement; FnC : TExtDomCompositeElement; FnIndex : Integer; Scope : TExtObject = nil) : TExtFunction; - function Fill(Els : TExtDomCompositeElement) : TExtFunction; overload; - function Filter(Selector : String; SelectorEl : TExtDomElement; SelectorIndex : Integer) : TExtFunction; overload; - function First : TExtFunction; - function GetCount : TExtFunction; - function IndexOf(El : Integer) : TExtFunction; overload; - function Item(Index : Integer) : TExtFunction; - function Last : TExtFunction; - function RemoveElement(El : Integer; RemoveDom : Boolean = false) : TExtFunction; overload; - function ReplaceElement(El : Integer; Replacement : String; DomReplace : Boolean = false) : TExtFunction; overload; - function Slice(Start : Integer = 0; EndJS : Integer = 0) : TExtFunction; - destructor Destroy; override; - property Elements : TExtObjectList read FElements write SetFElements; - property IsComposite : Boolean read FIsComposite write SetFIsComposite; + property AlphanumText : String read FAlphanumText write SetFAlphanumText; + property AlphaText : String read FAlphaText write SetFAlphaText; + property EmailMask : TRegExp read FEmailMask write SetFEmailMask; + property EmailText : String read FEmailText write SetFEmailText; + property UrlText : String read FUrlText write SetFUrlText; end; TExtDomElement_anim = class(TExtAbstractComponent) @@ -1865,19 +1950,13 @@ TExtDomElement_anim = class(TExtAbstractComponent) function SwitchOff(Options : TExtObject = nil) : TExtFunction; end; - TExtDomAbstractHelper = class(TExtAbstractComponent) + TExtDomElement_dd = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Append(El : String; O : String; ReturnElement : Boolean = false) : TExtFunction; overload; - function ApplyStyles(El : String; Styles : String) : TExtFunction; overload; - function GenerateStyles(Styles : TExtObject; Buffer : TExtObjectList = nil) : TExtFunction; - function InsertAfter(El : String; O : TExtObject; ReturnElement : Boolean = false) : TExtFunction; overload; - function InsertBefore(El : String; O : String; ReturnElement : Boolean = false) : TExtFunction; overload; - function InsertFirst(El : String; O : String; ReturnElement : Boolean = false) : TExtFunction; overload; - function InsertHtml(Where : String; El : THTMLElement; Html : String) : TExtFunction; overload; - function Markup(Spec : TExtObject) : TExtFunction; - function Overwrite(El : String; O : String; ReturnElement : Boolean = false) : TExtFunction; overload; + function InitDD(Group : String; Config : TExtObject; Overrides : TExtObject) : TExtFunction; + function InitDDProxy(Group : String; Config : TExtObject; Overrides : TExtObject) : TExtFunction; + function InitDDTarget(Group : String; Config : TExtObject; Overrides : TExtObject) : TExtFunction; end; TExtDomAbstractQuery = class(TExtAbstractComponent) @@ -1889,21 +1968,35 @@ TExtDomAbstractQuery = class(TExtAbstractComponent) function SelectNode(Selector : String; Root : String = '') : TExtFunction; overload; end; - TExtDomElement_position = class(TExtAbstractComponent) + TExtDomCompositeElementLite = class(TExtAbstractComponent) + private + FElements : TExtObjectList; + FIsComposite : Boolean; + procedure SetFElements(Value : TExtObjectList); + procedure SetFIsComposite(Value : Boolean); + protected + procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Center(CenterIn : String) : TExtFunction; overload; - function ClearPositioning(Value : String = '') : TExtFunction; - function GetLocalX : TExtFunction; - function GetLocalXY : TExtFunction; - function GetLocalY : TExtFunction; - function GetPositioning(AutoPx : Boolean = false) : TExtFunction; - function GetX : TExtFunction; - function GetXY : TExtFunction; - function GetY : TExtFunction; - function Position(Pos : String = ''; ZIndex : Integer = 0; X : Integer = 0; Y : Integer = 0) : TExtFunction; - function SetPositioning(PosCfg : TExtObject) : TExtFunction; + function Add(Els : TExtDomCompositeElement) : TExtFunction; overload; + function Clear(RemoveDom : Boolean = false) : TExtFunction; + function Contains(El : Integer) : TExtFunction; overload; + constructor Create; + function Each(Fn : TExtFunction; FnEl : TExtDomElement; FnC : TExtDomCompositeElement; FnIndex : Integer; Scope : TExtObject = nil) : TExtFunction; + function Fill(Els : TExtDomCompositeElement) : TExtFunction; overload; + function Filter(Selector : String; SelectorEl : TExtDomElement; SelectorIndex : Integer) : TExtFunction; overload; + function First : TExtFunction; + function GetCount : TExtFunction; + function IndexOf(El : Integer) : TExtFunction; overload; + function Item(Index : Integer) : TExtFunction; + function Last : TExtFunction; + function RemoveElement(El : Integer; RemoveDom : Boolean = false) : TExtFunction; overload; + function ReplaceElement(El : Integer; Replacement : String; DomReplace : Boolean = false) : TExtFunction; overload; + function Slice(Start : Integer = 0; EndJS : Integer = 0) : TExtFunction; + destructor Destroy; override; + property Elements : TExtObjectList read FElements write SetFElements; + property IsComposite : Boolean read FIsComposite write SetFIsComposite; end; TExtDomElement_scroll = class(TExtAbstractComponent) @@ -1922,13 +2015,25 @@ TExtDomElement_scroll = class(TExtAbstractComponent) function SetScrollTop(Top : Integer) : TExtFunction; end; - TExtDomElement_dd = class(TExtAbstractComponent) + TExtDomElement_style = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function InitDD(Group : String; Config : TExtObject; Overrides : TExtObject) : TExtFunction; - function InitDDProxy(Group : String; Config : TExtObject; Overrides : TExtObject) : TExtFunction; - function InitDDTarget(Group : String; Config : TExtObject; Overrides : TExtObject) : TExtFunction; + function AddClsOnClick(ClassName : String; TestFn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; + function AddClsOnFocus(ClassName : String; TestFn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; + function AddClsOnOver(ClassName : String; TestFn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; + function BoxWrap(ClassJS : String = '') : TExtFunction; + function ClearOpacity : TExtFunction; + function Clip : TExtFunction; + function GetColor(Attr : String; DefaultValue : String; Prefix : String = '') : TExtFunction; + function GetComputedHeight : TExtFunction; + function GetComputedWidth : TExtFunction; + function GetFrameWidth(Sides : String) : TExtFunction; + function GetStyleSize : TExtFunction; + function Selectable : TExtFunction; + function SetOpacity(Opacity : Integer; Animate : Boolean = false) : TExtFunction; overload; + function Unclip : TExtFunction; + function Unselectable : TExtFunction; end; TExtDomElement_fx = class(TExtAbstractComponent) @@ -1941,18 +2046,21 @@ TExtDomElement_fx = class(TExtAbstractComponent) function Toggle(Animate : Boolean = false) : TExtFunction; overload; end; - TExtDirectTransaction = class(TExtAbstractComponent) - private - FProvider : TExtDirectProvider; - procedure SetFProvider(Value : TExtDirectProvider); - protected - procedure InitDefaults; override; + TExtDomElement_position = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; overload; - destructor Destroy; override; - property Provider : TExtDirectProvider read FProvider write SetFProvider; + function Center(CenterIn : String) : TExtFunction; overload; + function ClearPositioning(Value : String = '') : TExtFunction; + function GetLocalX : TExtFunction; + function GetLocalXY : TExtFunction; + function GetLocalY : TExtFunction; + function GetPositioning(AutoPx : Boolean = false) : TExtFunction; + function GetX : TExtFunction; + function GetXY : TExtFunction; + function GetY : TExtFunction; + function Position(Pos : String = ''; ZIndex : Integer = 0; X : Integer = 0; Y : Integer = 0) : TExtFunction; + function SetPositioning(PosCfg : TExtObject) : TExtFunction; end; TExtDomAbstractElement = class(TExtAbstractComponent) @@ -1975,65 +2083,21 @@ TExtDomAbstractElement = class(TExtAbstractComponent) property IsFly : Boolean read FIsFly write SetFIsFly; end; - // Procedural types for events TExtDirectProvider - TExtDirectProviderOnConnect = procedure(Provider : TExtDirectProvider) of object; - TExtDirectProviderOnData = procedure(Provider : TExtDirectProvider; E : TExtDirectEvent) of object; - TExtDirectProviderOnDisconnect = procedure(Provider : TExtDirectProvider) of object; - TExtDirectProviderOnException = procedure of object; - - TExtDirectProvider = class(TExtAbstractComponent) - private - FHasListeners : TExtObject; - FId : String; - FIsObservable : Boolean; - FListeners : TExtObject; - FRelayedEvents : TExtObjectList; - FOnConnect : TExtDirectProviderOnConnect; - FOnData : TExtDirectProviderOnData; - FOnDisconnect : TExtDirectProviderOnDisconnect; - FOnException : TExtDirectProviderOnException; - procedure SetFHasListeners(Value : TExtObject); - procedure SetFId(Value : String); - procedure SetFIsObservable(Value : Boolean); - procedure SetFListeners(Value : TExtObject); - procedure SetFRelayedEvents(Value : TExtObjectList); - procedure SetFOnConnect(Value : TExtDirectProviderOnConnect); - procedure SetFOnData(Value : TExtDirectProviderOnData); - procedure SetFOnDisconnect(Value : TExtDirectProviderOnDisconnect); - procedure SetFOnException(Value : TExtDirectProviderOnException); - protected - procedure InitDefaults; override; - procedure HandleEvent(const AEvtName: string); override; + TExtDomAbstractElement_insertion = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function AddEvents(EventNames : String) : TExtFunction; overload; - function AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; overload; - function AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; overload; - function ClearListeners : TExtFunction; - function ClearManagedListeners : TExtFunction; - constructor Create; - function EnableBubble(EventNames : String) : TExtFunction; overload; - function FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; - function FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; - function HasListener(EventName : String) : TExtFunction; - function RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; - function RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; - function RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; overload; - function ResumeEvent(EventName : String) : TExtFunction; - function ResumeEvents : TExtFunction; - function SuspendEvent(EventName : String) : TExtFunction; - function SuspendEvents(QueueSuspended : Boolean) : TExtFunction; - destructor Destroy; override; - property HasListeners : TExtObject read FHasListeners write SetFHasListeners; - property Id : String read FId write SetFId; - property IsObservable : Boolean read FIsObservable write SetFIsObservable; - property Listeners : TExtObject read FListeners write SetFListeners; - property RelayedEvents : TExtObjectList read FRelayedEvents write SetFRelayedEvents; - property OnConnect : TExtDirectProviderOnConnect read FOnConnect write SetFOnConnect; - property OnData : TExtDirectProviderOnData read FOnData write SetFOnData; - property OnDisconnect : TExtDirectProviderOnDisconnect read FOnDisconnect write SetFOnDisconnect; - property OnException : TExtDirectProviderOnException read FOnException write SetFOnException; + function AppendChild(El : String; ReturnDom : Boolean = false) : TExtFunction; overload; + function AppendTo(El : String) : TExtFunction; overload; + function CreateChild(Config : TExtObject; InsertBefore : THTMLElement = nil; ReturnDom : Boolean = false) : TExtFunction; + function InsertAfter(El : String) : TExtFunction; overload; + function InsertBefore(El : String) : TExtFunction; overload; + function InsertFirst(El : String) : TExtFunction; overload; + function InsertHtml(Where : String; Html : String; ReturnEl : Boolean = false) : TExtFunction; + function InsertSibling(El : String; Where : String = ''; ReturnDom : Boolean = false) : TExtFunction; overload; + function Replace(El : String) : TExtFunction; overload; + function ReplaceWith(El : String) : TExtFunction; overload; + function Wrap(Config : TExtObject = nil; ReturnDom : Boolean = false; Selector : String = '') : TExtFunction; end; TExtDirectRemotingMethod = class(TExtAbstractComponent) @@ -2043,29 +2107,18 @@ TExtDirectRemotingMethod = class(TExtAbstractComponent) function GetCallData(Args : TExtObjectList) : TExtFunction; end; - TExtDomAbstractElement_style = class(TExtAbstractComponent) + TExtDirectTransaction = class(TExtAbstractComponent) + private + FProvider : TExtDirectProvider; + procedure SetFProvider(Value : TExtDirectProvider); + protected + procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function ApplyStyles(Styles : String) : TExtFunction; overload; - function GetBorderWidth(Side : String) : TExtFunction; - function GetHeight(ContentHeight : Boolean = false) : TExtFunction; - function GetMargin(Sides : String = '') : TExtFunction; - function GetPadding(Side : String) : TExtFunction; - function GetSize(ContentSize : Boolean = false) : TExtFunction; - function GetStyle(PropertyJS : String; InlineJS : Boolean = false) : TExtFunction; overload; - function GetViewSize : TExtFunction; - function GetWidth(ContentWidth : Boolean = false) : TExtFunction; - function IsStyle(Style : String; Value : String) : TExtFunction; - function IsTransparent(Prop : String) : TExtFunction; - function Mask(Msg : String = ''; MsgCls : String = '') : TExtFunction; - function RadioCls(ClassName : String) : TExtFunction; overload; - function Repaint : TExtFunction; - function SetHeight(Height : Integer) : TExtFunction; overload; - function SetSize(Width : Integer; Height : Integer) : TExtFunction; overload; - function SetStyle(PropertyJS : String; Value : String = '') : TExtFunction; overload; - function SetWidth(Width : Integer) : TExtFunction; overload; - function Unmask : TExtFunction; + constructor Create; overload; + destructor Destroy; override; + property Provider : TExtDirectProvider read FProvider write SetFProvider; end; TExtDomAbstractElement_traversal = class(TExtAbstractComponent) @@ -2086,21 +2139,19 @@ TExtDomAbstractElement_traversal = class(TExtAbstractComponent) function Up(Selector : String; Limit : Integer = 0; ReturnDom : Boolean = false) : TExtFunction; overload; end; - TExtDomAbstractElement_insertion = class(TExtAbstractComponent) + TExtDomAbstractHelper = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function AppendChild(El : String; ReturnDom : Boolean = false) : TExtFunction; overload; - function AppendTo(El : String) : TExtFunction; overload; - function CreateChild(Config : TExtObject; InsertBefore : THTMLElement = nil; ReturnDom : Boolean = false) : TExtFunction; - function InsertAfter(El : String) : TExtFunction; overload; - function InsertBefore(El : String) : TExtFunction; overload; - function InsertFirst(El : String) : TExtFunction; overload; - function InsertHtml(Where : String; Html : String; ReturnEl : Boolean = false) : TExtFunction; - function InsertSibling(El : String; Where : String = ''; ReturnDom : Boolean = false) : TExtFunction; overload; - function Replace(El : String) : TExtFunction; overload; - function ReplaceWith(El : String) : TExtFunction; overload; - function Wrap(Config : TExtObject = nil; ReturnDom : Boolean = false; Selector : String = '') : TExtFunction; + function Append(El : String; O : String; ReturnElement : Boolean = false) : TExtFunction; overload; + function ApplyStyles(El : String; Styles : String) : TExtFunction; overload; + function GenerateStyles(Styles : TExtObject; Buffer : TExtObjectList = nil) : TExtFunction; + function InsertAfter(El : String; O : TExtObject; ReturnElement : Boolean = false) : TExtFunction; overload; + function InsertBefore(El : String; O : String; ReturnElement : Boolean = false) : TExtFunction; overload; + function InsertFirst(El : String; O : String; ReturnElement : Boolean = false) : TExtFunction; overload; + function InsertHtml(Where : String; El : THTMLElement; Html : String) : TExtFunction; overload; + function Markup(Spec : TExtObject) : TExtFunction; + function Overwrite(El : String; O : String; ReturnElement : Boolean = false) : TExtFunction; overload; end; TExtDomAbstractElement_static = class(TExtAbstractComponent) @@ -2122,38 +2173,29 @@ TExtDomAbstractElement_static = class(TExtAbstractComponent) function UnitizeBox(Box : Integer; Units : String) : TExtFunction; overload; end; - TExtEventObjectImplSingleton = class(TExtAbstractComponent) - private - FAltKey : Boolean; - FCtrlKey : Boolean; - FShiftKey : Boolean; - procedure SetFAltKey(Value : Boolean); - procedure SetFCtrlKey(Value : Boolean); - procedure SetFShiftKey(Value : Boolean); + TExtDomAbstractElement_style = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function CorrectWheelDelta(Delta : Integer) : TExtFunction; - function GetCharCode : TExtFunction; - function GetKey : TExtFunction; - function GetPoint : TExtFunction; - function GetRelatedTarget(Selector : String = ''; MaxDepth : Integer = 0; ReturnEl : Boolean = false) : TExtFunction; overload; - function GetTarget(Selector : String = ''; MaxDepth : Integer = 0; ReturnEl : Boolean = false) : TExtFunction; overload; - function GetWheelDelta : TExtFunction; - function GetWheelDeltas : TExtFunction; - function GetX : TExtFunction; - function GetXY : TExtFunction; - function GetY : TExtFunction; - function HasModifier : TExtFunction; - function IsNavKeyPress : TExtFunction; - function IsSpecialKey : TExtFunction; - function PreventDefault : TExtFunction; - function StopEvent : TExtFunction; - function StopPropagation : TExtFunction; - function Within(El : String; Related : Boolean = false; AllowEl : Boolean = false) : TExtFunction; overload; - property AltKey : Boolean read FAltKey write SetFAltKey; - property CtrlKey : Boolean read FCtrlKey write SetFCtrlKey; - property ShiftKey : Boolean read FShiftKey write SetFShiftKey; + function ApplyStyles(Styles : String) : TExtFunction; overload; + function GetBorderWidth(Side : String) : TExtFunction; + function GetHeight(ContentHeight : Boolean = false) : TExtFunction; + function GetMargin(Sides : String = '') : TExtFunction; + function GetPadding(Side : String) : TExtFunction; + function GetSize(ContentSize : Boolean = false) : TExtFunction; + function GetStyle(PropertyJS : String; InlineJS : Boolean = false) : TExtFunction; overload; + function GetViewSize : TExtFunction; + function GetWidth(ContentWidth : Boolean = false) : TExtFunction; + function IsStyle(Style : String; Value : String) : TExtFunction; + function IsTransparent(Prop : String) : TExtFunction; + function Mask(Msg : String = ''; MsgCls : String = '') : TExtFunction; + function RadioCls(ClassName : String) : TExtFunction; overload; + function Repaint : TExtFunction; + function SetHeight(Height : Integer) : TExtFunction; overload; + function SetSize(Width : Integer; Height : Integer) : TExtFunction; overload; + function SetStyle(PropertyJS : String; Value : String = '') : TExtFunction; overload; + function SetWidth(Width : Integer) : TExtFunction; overload; + function Unmask : TExtFunction; end; // Procedural types for events TExtFocusManagerSingleton @@ -2224,53 +2266,13 @@ TExtFocusManagerSingleton = class(TExtAbstractComponent) property OnEnable : TExtFocusManagerSingletonOnEnable read FOnEnable write SetFOnEnable; end; - TExtDrawSurface = class(TExtAbstractComponent) - private - FHasListeners : TExtObject; - FHeight : Integer; - FIsObservable : Boolean; - FItems : TExtObjectList; - FListeners : TExtObject; - FWidth : Integer; - procedure SetFHasListeners(Value : TExtObject); - procedure SetFHeight(Value : Integer); - procedure SetFIsObservable(Value : Boolean); - procedure SetFItems(Value : TExtObjectList); - procedure SetFListeners(Value : TExtObject); - procedure SetFWidth(Value : Integer); - protected - procedure InitDefaults; override; + TExtFoo = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function AddEvents(EventNames : String) : TExtFunction; overload; - function AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; overload; - function AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; overload; - function ClearListeners : TExtFunction; - function ClearManagedListeners : TExtFunction; - constructor Create; - function EnableBubble(EventNames : String) : TExtFunction; overload; - function FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; - function FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; - function GetGroup(Id : String) : TExtFunction; - function HasListener(EventName : String) : TExtFunction; - function RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; - function Remove(Sprite : TExtDrawSprite; DestroySprite : Boolean) : TExtFunction; - function RemoveAll(DestroySprites : Boolean) : TExtFunction; - function RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; - function RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; overload; - function ResumeEvent(EventName : String) : TExtFunction; - function ResumeEvents : TExtFunction; - function SetSize(W : Integer; H : Integer) : TExtFunction; - function SuspendEvent(EventName : String) : TExtFunction; - function SuspendEvents(QueueSuspended : Boolean) : TExtFunction; - destructor Destroy; override; - property HasListeners : TExtObject read FHasListeners write SetFHasListeners; - property Height : Integer read FHeight write SetFHeight; - property IsObservable : Boolean read FIsObservable write SetFIsObservable; - property Items : TExtObjectList read FItems write SetFItems; - property Listeners : TExtObject read FListeners write SetFListeners; - property Width : Integer read FWidth write SetFWidth; + constructor Create(Config : String); overload; + function Handle(Err : TExtError) : TExtFunction; + function ToString : TExtFunction; end; // Procedural types for events TExtElementLoader @@ -2385,50 +2387,38 @@ TExtElementLoader = class(TExtAbstractComponent) property OnLoad : TExtElementLoaderOnLoad read FOnLoad write SetFOnLoad; end; - TExtFormField = class(TExtAbstractComponent) + TExtEventObjectImplSingleton = class(TExtAbstractComponent) private - FDisabled : Boolean; - FName : String; - FOriginalValue : TExtObject; - FSubmitValue : Boolean; - FValidateOnChange : Boolean; - FValue : TExtObject; - procedure SetFDisabled(Value : Boolean); - procedure SetFName(Value : String); - procedure SetFOriginalValue(Value : TExtObject); - procedure SetFSubmitValue(Value : Boolean); - procedure SetFValidateOnChange(Value : Boolean); - procedure SetFValue(Value : TExtObject); - protected - procedure InitDefaults; override; + FAltKey : Boolean; + FCtrlKey : Boolean; + FShiftKey : Boolean; + procedure SetFAltKey(Value : Boolean); + procedure SetFCtrlKey(Value : Boolean); + procedure SetFShiftKey(Value : Boolean); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function BatchChanges(Fn : TExtObject) : TExtFunction; - function CheckChange : TExtFunction; - function CheckDirty : TExtFunction; - constructor Create; - function ExtractFileInput : TExtFunction; - function GetErrors(Value : TExtObject) : TExtFunction; - function GetModelData : TExtFunction; - function GetName : TExtFunction; - function GetSubmitData : TExtFunction; - function GetValue : TExtFunction; - function IsDirty : TExtFunction; - function IsEqual(Value1 : TExtObject; Value2 : TExtObject) : TExtFunction; - function IsFileUpload : TExtFunction; - function IsValid : TExtFunction; - function Reset : TExtFunction; - function ResetOriginalValue : TExtFunction; - function SetValue(Value : TExtObject) : TExtFunction; - function Validate : TExtFunction; - destructor Destroy; override; - property Disabled : Boolean read FDisabled write SetFDisabled; - property Name : String read FName write SetFName; - property OriginalValue : TExtObject read FOriginalValue write SetFOriginalValue; - property SubmitValue : Boolean read FSubmitValue write SetFSubmitValue; - property ValidateOnChange : Boolean read FValidateOnChange write SetFValidateOnChange; - property Value : TExtObject read FValue write SetFValue; + function CorrectWheelDelta(Delta : Integer) : TExtFunction; + function GetCharCode : TExtFunction; + function GetKey : TExtFunction; + function GetPoint : TExtFunction; + function GetRelatedTarget(Selector : String = ''; MaxDepth : Integer = 0; ReturnEl : Boolean = false) : TExtFunction; overload; + function GetTarget(Selector : String = ''; MaxDepth : Integer = 0; ReturnEl : Boolean = false) : TExtFunction; overload; + function GetWheelDelta : TExtFunction; + function GetWheelDeltas : TExtFunction; + function GetX : TExtFunction; + function GetXY : TExtFunction; + function GetY : TExtFunction; + function HasModifier : TExtFunction; + function IsNavKeyPress : TExtFunction; + function IsSpecialKey : TExtFunction; + function PreventDefault : TExtFunction; + function StopEvent : TExtFunction; + function StopPropagation : TExtFunction; + function Within(El : String; Related : Boolean = false; AllowEl : Boolean = false) : TExtFunction; overload; + property AltKey : Boolean read FAltKey write SetFAltKey; + property CtrlKey : Boolean read FCtrlKey write SetFCtrlKey; + property ShiftKey : Boolean read FShiftKey write SetFShiftKey; end; // Procedural types for events TExtFormFieldAncestor @@ -2456,13 +2446,29 @@ TExtFormFieldAncestor = class(TExtAbstractComponent) property OnFieldvaliditychange : TExtFormFieldAncestorOnFieldvaliditychange read FOnFieldvaliditychange write SetFOnFieldvaliditychange; end; - TExtFoo = class(TExtAbstractComponent) + TExtXTemplateParser = class(TExtAbstractComponent) + private + FLevel : Integer; + procedure SetFLevel(Value : Integer); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create(Config : String); overload; - function Handle(Err : TExtError) : TExtFunction; - function ToString : TExtFunction; + function DoCase(Action : String; Actions : TExtObject) : TExtFunction; + function DoDefault : TExtFunction; + function DoElse : TExtFunction; + function DoElseIf(Action : String; Actions : TExtObject) : TExtFunction; + function DoEnd(TypeJS : String; Actions : TExtObject) : TExtFunction; + function DoEval(Text : String) : TExtFunction; + function DoExec(Action : String; Actions : TExtObject) : TExtFunction; + function DoExpr(Expr : String) : TExtFunction; + function DoFor(Action : String; Actions : TExtObject) : TExtFunction; + function DoForEach(Action : String; Actions : TExtObject) : TExtFunction; + function DoIf(Action : String; Actions : TExtObject) : TExtFunction; + function DoSwitch(Action : String; Actions : TExtObject) : TExtFunction; + function DoTag : TExtFunction; + function DoText(Text : String) : TExtFunction; + function DoTplExtEmptyFnParse : TExtFunction; + property Level : Integer read FLevel write SetFLevel; end; TExtFormAction = class(TExtAbstractComponent) @@ -2530,46 +2536,70 @@ TExtFormAction = class(TExtAbstractComponent) property WaitTitle : String read FWaitTitle write SetFWaitTitle; end; - TExtDrawColor = class(TExtAbstractComponent) + TExtFormField = class(TExtAbstractComponent) private - FLightnessFactor : Integer; // 0 - procedure SetFLightnessFactor(Value : Integer); + FDisabled : Boolean; + FIsFormField : Boolean; + FName : String; + FOriginalValue : TExtObject; + FSubmitValue : Boolean; + FValidateOnChange : Boolean; + FValue : TExtObject; + procedure SetFDisabled(Value : Boolean); + procedure SetFIsFormField(Value : Boolean); + procedure SetFName(Value : String); + procedure SetFOriginalValue(Value : TExtObject); + procedure SetFSubmitValue(Value : Boolean); + procedure SetFValidateOnChange(Value : Boolean); + procedure SetFValue(Value : TExtObject); protected procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; overload; - function FromHSL(H : Integer; S : Integer; L : Integer) : TExtFunction; - function FromString(Str : String) : TExtFunction; - function GetBlue : TExtFunction; - function GetDarker(Factor : Integer) : TExtFunction; - function GetGrayscale : TExtFunction; - function GetGreen : TExtFunction; - function GetHSL : TExtFunction; - function GetLighter(Factor : Integer) : TExtFunction; - function GetRed : TExtFunction; - function GetRGB : TExtFunction; - function ToHex(Color : String) : TExtFunction; overload; - function ToString : TExtFunction; - property LightnessFactor : Integer read FLightnessFactor write SetFLightnessFactor; - end; - - TExtDrawEngineImageExporterSingleton = class(TExtAbstractComponent) - private - FDefaultUrl : String; - FHeightParam : String; - FSupportedTypes : TExtObjectList; - FSvgParam : String; - FTypeParam : String; - FWidthParam : String; - procedure SetFDefaultUrl(Value : String); - procedure SetFHeightParam(Value : String); - procedure SetFSupportedTypes(Value : TExtObjectList); - procedure SetFSvgParam(Value : String); - procedure SetFTypeParam(Value : String); - procedure SetFWidthParam(Value : String); - protected + function BatchChanges(Fn : TExtObject) : TExtFunction; + function CheckChange : TExtFunction; + function CheckDirty : TExtFunction; + constructor Create; + function ExtractFileInput : TExtFunction; + function GetErrors(Value : TExtObject) : TExtFunction; + function GetModelData : TExtFunction; + function GetName : TExtFunction; + function GetSubmitData : TExtFunction; + function GetValue : TExtFunction; + function IsDirty : TExtFunction; + function IsEqual(Value1 : TExtObject; Value2 : TExtObject) : TExtFunction; + function IsFileUpload : TExtFunction; + function IsValid : TExtFunction; + function Reset : TExtFunction; + function ResetOriginalValue : TExtFunction; + function SetValue(Value : TExtObject) : TExtFunction; + function Validate : TExtFunction; + destructor Destroy; override; + property Disabled : Boolean read FDisabled write SetFDisabled; + property IsFormField : Boolean read FIsFormField write SetFIsFormField; + property Name : String read FName write SetFName; + property OriginalValue : TExtObject read FOriginalValue write SetFOriginalValue; + property SubmitValue : Boolean read FSubmitValue write SetFSubmitValue; + property ValidateOnChange : Boolean read FValidateOnChange write SetFValidateOnChange; + property Value : TExtObject read FValue write SetFValue; + end; + + TExtDrawEngineImageExporterSingleton = class(TExtAbstractComponent) + private + FDefaultUrl : String; + FHeightParam : String; + FSupportedTypes : TExtObjectList; + FSvgParam : String; + FTypeParam : String; + FWidthParam : String; + procedure SetFDefaultUrl(Value : String); + procedure SetFHeightParam(Value : String); + procedure SetFSupportedTypes(Value : TExtObjectList); + procedure SetFSvgParam(Value : String); + procedure SetFTypeParam(Value : String); + procedure SetFWidthParam(Value : String); + protected procedure InitDefaults; override; public function JSClassName : string; override; @@ -2584,25 +2614,11 @@ TExtDrawEngineImageExporterSingleton = class(TExtAbstractComponent) property WidthParam : String read FWidthParam write SetFWidthParam; end; - TExtDomElement_style = class(TExtAbstractComponent) + TExtDrawEngineSvgExporterSingleton = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function AddClsOnClick(ClassName : String; TestFn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; - function AddClsOnFocus(ClassName : String; TestFn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; - function AddClsOnOver(ClassName : String; TestFn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; - function BoxWrap(ClassJS : String = '') : TExtFunction; - function ClearOpacity : TExtFunction; - function Clip : TExtFunction; - function GetColor(Attr : String; DefaultValue : String; Prefix : String = '') : TExtFunction; - function GetComputedHeight : TExtFunction; - function GetComputedWidth : TExtFunction; - function GetFrameWidth(Sides : String) : TExtFunction; - function GetStyleSize : TExtFunction; - function Selectable : TExtFunction; - function SetOpacity(Opacity : Integer; Animate : Boolean = false) : TExtFunction; overload; - function Unclip : TExtFunction; - function Unselectable : TExtFunction; + function Generate(Surface : TExtDrawSurface; Config : TExtObject = nil) : TExtFunction; end; TExtDomLayer = class(TExtAbstractComponent) @@ -2650,12 +2666,29 @@ TExtDomLayer = class(TExtAbstractComponent) property Zindex : Integer read FZindex write SetFZindex; end; - TExtDrawSingleton = class(TExtAbstractComponent) + TExtDrawColor = class(TExtAbstractComponent) + private + FLightnessFactor : Integer; // 0 + procedure SetFLightnessFactor(Value : Integer); + protected + procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function SnapEndsByDate(From : TDateTime; ToJS : TDateTime; StepsMax : Integer; LockEnds : Boolean) : TExtFunction; - function SnapEndsByDateAndStep(From : TDateTime; ToJS : TDateTime; Step : TExtObjectList; LockEnds : Boolean) : TExtFunction; + constructor Create; overload; + function FromHSL(H : Integer; S : Integer; L : Integer) : TExtFunction; + function FromString(Str : String) : TExtFunction; + function GetBlue : TExtFunction; + function GetDarker(Factor : Integer) : TExtFunction; + function GetGrayscale : TExtFunction; + function GetGreen : TExtFunction; + function GetHSL : TExtFunction; + function GetLighter(Factor : Integer) : TExtFunction; + function GetRed : TExtFunction; + function GetRGB : TExtFunction; + function ToHex(Color : String) : TExtFunction; overload; + function ToString : TExtFunction; + property LightnessFactor : Integer read FLightnessFactor write SetFLightnessFactor; end; TExtDrawSprite = class(TExtAbstractComponent) @@ -2771,11 +2804,53 @@ TExtDrawSprite = class(TExtAbstractComponent) property Y : Integer read FY write SetFY; end; - TExtDrawEngineSvgExporterSingleton = class(TExtAbstractComponent) + TExtDrawSurface = class(TExtAbstractComponent) + private + FHasListeners : TExtObject; + FHeight : Integer; + FIsObservable : Boolean; + FItems : TExtObjectList; + FListeners : TExtObject; + FWidth : Integer; + procedure SetFHasListeners(Value : TExtObject); + procedure SetFHeight(Value : Integer); + procedure SetFIsObservable(Value : Boolean); + procedure SetFItems(Value : TExtObjectList); + procedure SetFListeners(Value : TExtObject); + procedure SetFWidth(Value : Integer); + protected + procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Generate(Surface : TExtDrawSurface; Config : TExtObject = nil) : TExtFunction; + function AddEvents(EventNames : String) : TExtFunction; overload; + function AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; overload; + function AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; overload; + function ClearListeners : TExtFunction; + function ClearManagedListeners : TExtFunction; + constructor Create; overload; + function EnableBubble(EventNames : String) : TExtFunction; overload; + function FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; + function FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; + function GetGroup(Id : String) : TExtFunction; + function HasListener(EventName : String) : TExtFunction; + function RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; + function Remove(Sprite : TExtDrawSprite; DestroySprite : Boolean) : TExtFunction; + function RemoveAll(DestroySprites : Boolean) : TExtFunction; + function RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; + function RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; overload; + function ResumeEvent(EventName : String) : TExtFunction; + function ResumeEvents : TExtFunction; + function SetSize(W : Integer; H : Integer) : TExtFunction; + function SuspendEvent(EventName : String) : TExtFunction; + function SuspendEvents(QueueSuspended : Boolean) : TExtFunction; + destructor Destroy; override; + property HasListeners : TExtObject read FHasListeners write SetFHasListeners; + property Height : Integer read FHeight write SetFHeight; + property IsObservable : Boolean read FIsObservable write SetFIsObservable; + property Items : TExtObjectList read FItems write SetFItems; + property Listeners : TExtObject read FListeners write SetFListeners; + property Width : Integer read FWidth write SetFWidth; end; TExtDrawMatrix = class(TExtAbstractComponent) @@ -2784,6 +2859,33 @@ TExtDrawMatrix = class(TExtAbstractComponent) {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; + TExtDrawSingleton = class(TExtAbstractComponent) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function SnapEndsByDate(From : TDateTime; ToJS : TDateTime; StepsMax : Integer; LockEnds : Boolean) : TExtFunction; + function SnapEndsByDateAndStep(From : TDateTime; ToJS : TDateTime; Step : TExtObjectList; LockEnds : Boolean) : TExtFunction; + end; + + TExtPanelProxy = class(TExtAbstractComponent) + private + FInsertProxy : Boolean; + FMoveOnDrag : Boolean; + procedure SetFInsertProxy(Value : Boolean); + procedure SetFMoveOnDrag(Value : Boolean); + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function GetEl : TExtFunction; + function GetGhost : TExtFunction; + function GetProxy : TExtFunction; + function Hide : TExtFunction; + function MoveProxy(ParentNode : THTMLElement; Before : THTMLElement = nil) : TExtFunction; + function Show : TExtFunction; + property InsertProxy : Boolean read FInsertProxy write SetFInsertProxy; + property MoveOnDrag : Boolean read FMoveOnDrag write SetFMoveOnDrag; + end; + TExtShadowPoolSingleton = class(TExtAbstractComponent) public function JSClassName : string; override; @@ -2794,8 +2896,10 @@ TExtSliderThumb = class(TExtAbstractComponent) private FConstrain : Boolean; FSlider : TExtSliderMultiSlider; + FSlider_ : TExtSliderMultiSlider; procedure SetFConstrain(Value : Boolean); procedure SetFSlider(Value : TExtSliderMultiSlider); + procedure SetFSlider_(Value : TExtSliderMultiSlider); protected procedure InitDefaults; override; public @@ -2809,6 +2913,7 @@ TExtSliderThumb = class(TExtAbstractComponent) destructor Destroy; override; property Constrain : Boolean read FConstrain write SetFConstrain; property Slider : TExtSliderMultiSlider read FSlider write SetFSlider; + property Slider_ : TExtSliderMultiSlider read FSlider_ write SetFSlider_; end; TExtRtlViewTable = class(TExtAbstractComponent) @@ -3067,6 +3172,7 @@ TExtUtilFilter = class(TExtAbstractComponent) private FAnyMatch : Boolean; FCaseSensitive : Boolean; + FDisabled : Boolean; FExactMatch : Boolean; FFilterFn : TExtFunction; FId : String; @@ -3076,6 +3182,7 @@ TExtUtilFilter = class(TExtAbstractComponent) FValue : String; procedure SetFAnyMatch(Value : Boolean); procedure SetFCaseSensitive(Value : Boolean); + procedure SetFDisabled(Value : Boolean); procedure SetFExactMatch(Value : Boolean); procedure SetFFilterFn(Value : TExtFunction); procedure SetFId(Value : String); @@ -3092,6 +3199,7 @@ TExtUtilFilter = class(TExtAbstractComponent) function SetValue(Value : String) : TExtFunction; property AnyMatch : Boolean read FAnyMatch write SetFAnyMatch; property CaseSensitive : Boolean read FCaseSensitive write SetFCaseSensitive; + property Disabled : Boolean read FDisabled write SetFDisabled; property ExactMatch : Boolean read FExactMatch write SetFExactMatch; property FilterFn : TExtFunction read FFilterFn write SetFFilterFn; property Id : String read FId write SetFId; @@ -3211,8 +3319,10 @@ TExtTemplate = class(TExtAbstractComponent) private FCompiled : Boolean; FDisableFormats : Boolean; + FIsTemplate : Boolean; procedure SetFCompiled(Value : Boolean); procedure SetFDisableFormats(Value : Boolean); + procedure SetFIsTemplate(Value : Boolean); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} @@ -3228,6 +3338,7 @@ TExtTemplate = class(TExtAbstractComponent) function SetJS(Html : String; Compile : Boolean = false) : TExtFunction; property Compiled : Boolean read FCompiled write SetFCompiled; property DisableFormats : Boolean read FDisableFormats write SetFDisableFormats; + property IsTemplate : Boolean read FIsTemplate write SetFIsTemplate; end; TExtUtilKeyNav = class(TExtAbstractComponent) @@ -3319,7 +3430,7 @@ TExtUtilHashMap = class(TExtAbstractComponent) function Clone : TExtFunction; function Contains(Value : TExtObject) : TExtFunction; function ContainsKey(Key : String) : TExtFunction; - constructor Create; + constructor Create(Config : TExtObject = nil); function Each(Fn : TExtFunction; FnKey : String; FnValue : Integer; FnLength : Integer; Scope : TExtObject = nil) : TExtFunction; function EnableBubble(EventNames : String) : TExtFunction; overload; function FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; @@ -3354,10 +3465,12 @@ TExtUtilAbstractMixedCollection = class(TExtAbstractComponent) private FAllowFunctions : Boolean; FHasListeners : TExtObject; + FIsMixedCollection : Boolean; FIsObservable : Boolean; FListeners : TExtObject; procedure SetFAllowFunctions(Value : Boolean); procedure SetFHasListeners(Value : TExtObject); + procedure SetFIsMixedCollection(Value : Boolean); procedure SetFIsObservable(Value : Boolean); procedure SetFListeners(Value : TExtObject); public @@ -3414,6 +3527,7 @@ TExtUtilAbstractMixedCollection = class(TExtAbstractComponent) function UpdateKey(OldKey : TExtObject; NewKey : TExtObject) : TExtFunction; property AllowFunctions : Boolean read FAllowFunctions write SetFAllowFunctions; property HasListeners : TExtObject read FHasListeners write SetFHasListeners; + property IsMixedCollection : Boolean read FIsMixedCollection write SetFIsMixedCollection; property IsObservable : Boolean read FIsObservable write SetFIsObservable; property Listeners : TExtObject read FListeners write SetFListeners; end; @@ -3482,25 +3596,13 @@ TExtUtilHistorySingleton = class(TExtAbstractComponent) property OnReady : TExtUtilHistorySingletonOnReady read FOnReady write SetFOnReady; end; - TExtRtlPanelHeader = class(TExtAbstractComponent) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - - TExtRtlDomElement_position = class(TExtAbstractComponent) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - TExtRtlDomElement_scroll = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtRtlDomElement_anim = class(TExtAbstractComponent) + TExtRtlDomElement_static = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} @@ -3512,7 +3614,7 @@ TExtRtlDomElement_insertion = class(TExtAbstractComponent) {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtRtlEventObjectImpl = class(TExtAbstractComponent) + TExtRtlDomElement_position = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} @@ -3524,7 +3626,7 @@ TExtRtlFormFieldSpinner = class(TExtAbstractComponent) {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtRtlDomElement_static = class(TExtAbstractComponent) + TExtRtlFormFieldTrigger = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} @@ -3536,7 +3638,7 @@ TExtRtlDomLayer = class(TExtAbstractComponent) {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtPerfAccumulator = class(TExtAbstractComponent) + TExtRtlEventObjectImpl = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} @@ -3548,23 +3650,106 @@ TExtPerfMonitorSingleton = class(TExtAbstractComponent) {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtPanelProxy = class(TExtAbstractComponent) + TExtResizer = class(TExtAbstractComponent) private - FInsertProxy : Boolean; - FMoveOnDrag : Boolean; - procedure SetFInsertProxy(Value : Boolean); - procedure SetFMoveOnDrag(Value : Boolean); + FConstrainTo : TExtElement; + FConstrainToRegion : TExtUtilRegion; + FDynamic : Boolean; + FEl : TExtElement; + FHandles : String; // 's e se' + FHasListeners : TExtObject; + FHeight : Integer; + FHeightIncrement : Integer; + FIsObservable : Boolean; + FListeners : TExtObject; + FMaxHeight : Integer; + FMaxWidth : Integer; + FMinHeight : Integer; + FMinWidth : Integer; + FOriginalTarget : TExtElement; + FOriginalTargetComponent : TExtComponent; + FPinned : Boolean; + FPreserveRatio : Boolean; + FResizeTracker : TExtResizerResizeTracker; + FTarget : TExtElement; + FTargetComponent : TExtComponent; + FTransparent : Boolean; + FWidth : Integer; + FWidthIncrement : Integer; + procedure SetFConstrainTo(Value : TExtElement); + procedure SetFConstrainToRegion(Value : TExtUtilRegion); + procedure SetFDynamic(Value : Boolean); + procedure SetFEl(Value : TExtElement); + procedure SetFHandles(Value : String); + procedure SetFHasListeners(Value : TExtObject); + procedure SetFHeight(Value : Integer); + procedure SetFHeightIncrement(Value : Integer); + procedure SetFIsObservable(Value : Boolean); + procedure SetFListeners(Value : TExtObject); + procedure SetFMaxHeight(Value : Integer); + procedure SetFMaxWidth(Value : Integer); + procedure SetFMinHeight(Value : Integer); + procedure SetFMinWidth(Value : Integer); + procedure SetFOriginalTarget(Value : TExtElement); + procedure SetFOriginalTargetComponent(Value : TExtComponent); + procedure SetFPinned(Value : Boolean); + procedure SetFPreserveRatio(Value : Boolean); + procedure SetFResizeTracker(Value : TExtResizerResizeTracker); + procedure SetFTarget(Value : TExtElement); + procedure SetFTargetComponent(Value : TExtComponent); + procedure SetFTransparent(Value : Boolean); + procedure SetFWidth(Value : Integer); + procedure SetFWidthIncrement(Value : Integer); + protected + procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function AddEvents(EventNames : String) : TExtFunction; overload; + function AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; overload; + function AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; overload; + function ClearListeners : TExtFunction; + function ClearManagedListeners : TExtFunction; + constructor Create; + function EnableBubble(EventNames : String) : TExtFunction; overload; + function FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; + function FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; function GetEl : TExtFunction; - function GetGhost : TExtFunction; - function GetProxy : TExtFunction; - function Hide : TExtFunction; - function MoveProxy(ParentNode : THTMLElement; Before : THTMLElement = nil) : TExtFunction; - function Show : TExtFunction; - property InsertProxy : Boolean read FInsertProxy write SetFInsertProxy; - property MoveOnDrag : Boolean read FMoveOnDrag write SetFMoveOnDrag; + function GetTarget : TExtFunction; + function HasListener(EventName : String) : TExtFunction; + function RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; + function RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; + function RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; overload; + function ResizeTo(Width : Integer; Height : Integer) : TExtFunction; + function ResumeEvent(EventName : String) : TExtFunction; + function ResumeEvents : TExtFunction; + function SuspendEvent(EventName : String) : TExtFunction; + function SuspendEvents(QueueSuspended : Boolean) : TExtFunction; + destructor Destroy; override; + property ConstrainTo : TExtElement read FConstrainTo write SetFConstrainTo; + property ConstrainToRegion : TExtUtilRegion read FConstrainToRegion write SetFConstrainToRegion; + property Dynamic : Boolean read FDynamic write SetFDynamic; + property El : TExtElement read FEl write SetFEl; + property Handles : String read FHandles write SetFHandles; + property HasListeners : TExtObject read FHasListeners write SetFHasListeners; + property Height : Integer read FHeight write SetFHeight; + property HeightIncrement : Integer read FHeightIncrement write SetFHeightIncrement; + property IsObservable : Boolean read FIsObservable write SetFIsObservable; + property Listeners : TExtObject read FListeners write SetFListeners; + property MaxHeight : Integer read FMaxHeight write SetFMaxHeight; + property MaxWidth : Integer read FMaxWidth write SetFMaxWidth; + property MinHeight : Integer read FMinHeight write SetFMinHeight; + property MinWidth : Integer read FMinWidth write SetFMinWidth; + property OriginalTarget : TExtElement read FOriginalTarget write SetFOriginalTarget; + property OriginalTargetComponent : TExtComponent read FOriginalTargetComponent write SetFOriginalTargetComponent; + property Pinned : Boolean read FPinned write SetFPinned; + property PreserveRatio : Boolean read FPreserveRatio write SetFPreserveRatio; + property ResizeTracker : TExtResizerResizeTracker read FResizeTracker write SetFResizeTracker; + property Target : TExtElement read FTarget write SetFTarget; + property TargetComponent : TExtComponent read FTargetComponent write SetFTargetComponent; + property Transparent : Boolean read FTransparent write SetFTransparent; + property Width : Integer read FWidth write SetFWidth; + property WidthIncrement : Integer read FWidthIncrement write SetFWidthIncrement; end; TExtUtilObservable = class(TExtAbstractComponent) @@ -3603,7 +3788,7 @@ TExtUtilObservable = class(TExtAbstractComponent) property Listeners : TExtObject read FListeners write SetFListeners; end; - TExtRtlButton = class(TExtAbstractComponent) + TExtPerfAccumulator = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} @@ -3615,106 +3800,10 @@ TExtRtlDdDD = class(TExtAbstractComponent) {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtResizer = class(TExtAbstractComponent) - private - FConstrainTo : TExtElement; - FConstrainToRegion : TExtUtilRegion; - FDynamic : Boolean; - FEl : TExtElement; - FHandles : String; // 's e se' - FHasListeners : TExtObject; - FHeight : Integer; - FHeightIncrement : Integer; - FIsObservable : Boolean; - FListeners : TExtObject; - FMaxHeight : Integer; - FMaxWidth : Integer; - FMinHeight : Integer; - FMinWidth : Integer; - FOriginalTarget : TExtElement; - FOriginalTargetComponent : TExtComponent; - FPinned : Boolean; - FPreserveRatio : Boolean; - FResizeTracker : TExtResizerResizeTracker; - FTarget : TExtElement; - FTargetComponent : TExtComponent; - FTransparent : Boolean; - FWidth : Integer; - FWidthIncrement : Integer; - procedure SetFConstrainTo(Value : TExtElement); - procedure SetFConstrainToRegion(Value : TExtUtilRegion); - procedure SetFDynamic(Value : Boolean); - procedure SetFEl(Value : TExtElement); - procedure SetFHandles(Value : String); - procedure SetFHasListeners(Value : TExtObject); - procedure SetFHeight(Value : Integer); - procedure SetFHeightIncrement(Value : Integer); - procedure SetFIsObservable(Value : Boolean); - procedure SetFListeners(Value : TExtObject); - procedure SetFMaxHeight(Value : Integer); - procedure SetFMaxWidth(Value : Integer); - procedure SetFMinHeight(Value : Integer); - procedure SetFMinWidth(Value : Integer); - procedure SetFOriginalTarget(Value : TExtElement); - procedure SetFOriginalTargetComponent(Value : TExtComponent); - procedure SetFPinned(Value : Boolean); - procedure SetFPreserveRatio(Value : Boolean); - procedure SetFResizeTracker(Value : TExtResizerResizeTracker); - procedure SetFTarget(Value : TExtElement); - procedure SetFTargetComponent(Value : TExtComponent); - procedure SetFTransparent(Value : Boolean); - procedure SetFWidth(Value : Integer); - procedure SetFWidthIncrement(Value : Integer); - protected - procedure InitDefaults; override; + TExtRtlDomElement_anim = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function AddEvents(EventNames : String) : TExtFunction; overload; - function AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; overload; - function AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; overload; - function ClearListeners : TExtFunction; - function ClearManagedListeners : TExtFunction; - constructor Create; - function EnableBubble(EventNames : String) : TExtFunction; overload; - function FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; - function FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; - function GetEl : TExtFunction; - function GetTarget : TExtFunction; - function HasListener(EventName : String) : TExtFunction; - function RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; - function RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; - function RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; overload; - function ResizeTo(Width : Integer; Height : Integer) : TExtFunction; - function ResumeEvent(EventName : String) : TExtFunction; - function ResumeEvents : TExtFunction; - function SuspendEvent(EventName : String) : TExtFunction; - function SuspendEvents(QueueSuspended : Boolean) : TExtFunction; - destructor Destroy; override; - property ConstrainTo : TExtElement read FConstrainTo write SetFConstrainTo; - property ConstrainToRegion : TExtUtilRegion read FConstrainToRegion write SetFConstrainToRegion; - property Dynamic : Boolean read FDynamic write SetFDynamic; - property El : TExtElement read FEl write SetFEl; - property Handles : String read FHandles write SetFHandles; - property HasListeners : TExtObject read FHasListeners write SetFHasListeners; - property Height : Integer read FHeight write SetFHeight; - property HeightIncrement : Integer read FHeightIncrement write SetFHeightIncrement; - property IsObservable : Boolean read FIsObservable write SetFIsObservable; - property Listeners : TExtObject read FListeners write SetFListeners; - property MaxHeight : Integer read FMaxHeight write SetFMaxHeight; - property MaxWidth : Integer read FMaxWidth write SetFMaxWidth; - property MinHeight : Integer read FMinHeight write SetFMinHeight; - property MinWidth : Integer read FMinWidth write SetFMinWidth; - property OriginalTarget : TExtElement read FOriginalTarget write SetFOriginalTarget; - property OriginalTargetComponent : TExtComponent read FOriginalTargetComponent write SetFOriginalTargetComponent; - property Pinned : Boolean read FPinned write SetFPinned; - property PreserveRatio : Boolean read FPreserveRatio write SetFPreserveRatio; - property ResizeTracker : TExtResizerResizeTracker read FResizeTracker write SetFResizeTracker; - property Target : TExtElement read FTarget write SetFTarget; - property TargetComponent : TExtComponent read FTargetComponent write SetFTargetComponent; - property Transparent : Boolean read FTransparent write SetFTransparent; - property Width : Integer read FWidth write SetFWidth; - property WidthIncrement : Integer read FWidthIncrement write SetFWidthIncrement; end; TExtRtlAbstractComponent = class(TExtAbstractComponent) @@ -3727,7 +3816,7 @@ TExtRtlAbstractComponent = class(TExtAbstractComponent) property Rtl : Boolean read FRtl write SetFRtl; end; - TExtRtlLayoutContainerBoxOverflowScroller = class(TExtAbstractComponent) + TExtRtlButton = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} @@ -3739,7 +3828,7 @@ TExtRtlLayoutContainerColumn = class(TExtAbstractComponent) {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtRtlLayoutContainerAbsolute = class(TExtAbstractComponent) + TExtRtlLayoutContainerHBox = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} @@ -3751,7 +3840,7 @@ TExtRtlLayoutContainerBox = class(TExtAbstractComponent) {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtRtlLayoutContextItem = class(TExtAbstractComponent) + TExtRtlLayoutContainerBoxOverflowScroller = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} @@ -3763,7 +3852,7 @@ TExtRtlPanel = class(TExtAbstractComponent) {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtRtlLayoutContainerHBox = class(TExtAbstractComponent) + TExtRtlPanelHeader = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} @@ -3775,7 +3864,7 @@ TExtRtlLayoutContainerVBox = class(TExtAbstractComponent) {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtRtlGridPluginHeaderResizer = class(TExtAbstractComponent) + TExtRtlLayoutContextItem = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} @@ -3787,7 +3876,7 @@ TExtRtlGridPluginRowEditing = class(TExtAbstractComponent) {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtRtlFormFieldTrigger = class(TExtAbstractComponent) + TExtRtlGridRowEditor = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} @@ -3799,7 +3888,7 @@ TExtRtlGridColumn = class(TExtAbstractComponent) {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtRtlLayoutComponentFieldText = class(TExtAbstractComponent) + TExtRtlGridPluginHeaderResizer = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} @@ -3811,7 +3900,7 @@ TExtRtlLayoutComponentFieldTrigger = class(TExtAbstractComponent) {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtRtlGridRowEditor = class(TExtAbstractComponent) + TExtRtlLayoutContainerAbsolute = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} @@ -3823,59 +3912,40 @@ TExtRtlLayoutComponentDock = class(TExtAbstractComponent) {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - // Procedural types for events TExtDataTree - TExtDataTreeOnAppend = procedure of object; - TExtDataTreeOnBeforeappend = procedure of object; - TExtDataTreeOnBeforecollapse = procedure of object; - TExtDataTreeOnBeforeexpand = procedure of object; - TExtDataTreeOnBeforeinsert = procedure of object; - TExtDataTreeOnBeforemove = procedure of object; - TExtDataTreeOnBeforeremove = procedure of object; - TExtDataTreeOnCollapse = procedure of object; - TExtDataTreeOnExpand = procedure of object; - TExtDataTreeOnInsert = procedure of object; - TExtDataTreeOnMove = procedure of object; - TExtDataTreeOnRemove = procedure of object; - TExtDataTreeOnRootchange = procedure(Root : TExtDataModel) of object; - TExtDataTreeOnSort = procedure of object; + TExtRtlLayoutComponentFieldText = class(TExtAbstractComponent) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; - TExtDataTree = class(TExtAbstractComponent) + // Procedural types for events TExtDirectProvider + TExtDirectProviderOnConnect = procedure(Provider : TExtDirectProvider) of object; + TExtDirectProviderOnData = procedure(Provider : TExtDirectProvider; E : TExtDirectEvent) of object; + TExtDirectProviderOnDisconnect = procedure(Provider : TExtDirectProvider) of object; + TExtDirectProviderOnException = procedure of object; + + TExtDirectProvider = class(TExtAbstractComponent) private FHasListeners : TExtObject; + FId : String; FIsObservable : Boolean; FListeners : TExtObject; - FOnAppend : TExtDataTreeOnAppend; - FOnBeforeappend : TExtDataTreeOnBeforeappend; - FOnBeforecollapse : TExtDataTreeOnBeforecollapse; - FOnBeforeexpand : TExtDataTreeOnBeforeexpand; - FOnBeforeinsert : TExtDataTreeOnBeforeinsert; - FOnBeforemove : TExtDataTreeOnBeforemove; - FOnBeforeremove : TExtDataTreeOnBeforeremove; - FOnCollapse : TExtDataTreeOnCollapse; - FOnExpand : TExtDataTreeOnExpand; - FOnInsert : TExtDataTreeOnInsert; - FOnMove : TExtDataTreeOnMove; - FOnRemove : TExtDataTreeOnRemove; - FOnRootchange : TExtDataTreeOnRootchange; - FOnSort : TExtDataTreeOnSort; + FRelayedEvents : TExtObjectList; + FOnConnect : TExtDirectProviderOnConnect; + FOnData : TExtDirectProviderOnData; + FOnDisconnect : TExtDirectProviderOnDisconnect; + FOnException : TExtDirectProviderOnException; procedure SetFHasListeners(Value : TExtObject); + procedure SetFId(Value : String); procedure SetFIsObservable(Value : Boolean); procedure SetFListeners(Value : TExtObject); - procedure SetFOnAppend(Value : TExtDataTreeOnAppend); - procedure SetFOnBeforeappend(Value : TExtDataTreeOnBeforeappend); - procedure SetFOnBeforecollapse(Value : TExtDataTreeOnBeforecollapse); - procedure SetFOnBeforeexpand(Value : TExtDataTreeOnBeforeexpand); - procedure SetFOnBeforeinsert(Value : TExtDataTreeOnBeforeinsert); - procedure SetFOnBeforemove(Value : TExtDataTreeOnBeforemove); - procedure SetFOnBeforeremove(Value : TExtDataTreeOnBeforeremove); - procedure SetFOnCollapse(Value : TExtDataTreeOnCollapse); - procedure SetFOnExpand(Value : TExtDataTreeOnExpand); - procedure SetFOnInsert(Value : TExtDataTreeOnInsert); - procedure SetFOnMove(Value : TExtDataTreeOnMove); - procedure SetFOnRemove(Value : TExtDataTreeOnRemove); - procedure SetFOnRootchange(Value : TExtDataTreeOnRootchange); - procedure SetFOnSort(Value : TExtDataTreeOnSort); + procedure SetFRelayedEvents(Value : TExtObjectList); + procedure SetFOnConnect(Value : TExtDirectProviderOnConnect); + procedure SetFOnData(Value : TExtDirectProviderOnData); + procedure SetFOnDisconnect(Value : TExtDirectProviderOnDisconnect); + procedure SetFOnException(Value : TExtDirectProviderOnException); protected + procedure InitDefaults; override; procedure HandleEvent(const AEvtName: string); override; public function JSClassName : string; override; @@ -3889,152 +3959,104 @@ TExtDataTree = class(TExtAbstractComponent) function EnableBubble(EventNames : String) : TExtFunction; overload; function FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; function FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; - function GetNodeById(Id : String) : TExtFunction; function HasListener(EventName : String) : TExtFunction; function RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; function RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; function RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; overload; - function RemoveRootNode : TExtFunction; function ResumeEvent(EventName : String) : TExtFunction; function ResumeEvents : TExtFunction; function SuspendEvent(EventName : String) : TExtFunction; function SuspendEvents(QueueSuspended : Boolean) : TExtFunction; + destructor Destroy; override; property HasListeners : TExtObject read FHasListeners write SetFHasListeners; + property Id : String read FId write SetFId; property IsObservable : Boolean read FIsObservable write SetFIsObservable; property Listeners : TExtObject read FListeners write SetFListeners; - property OnAppend : TExtDataTreeOnAppend read FOnAppend write SetFOnAppend; - property OnBeforeappend : TExtDataTreeOnBeforeappend read FOnBeforeappend write SetFOnBeforeappend; - property OnBeforecollapse : TExtDataTreeOnBeforecollapse read FOnBeforecollapse write SetFOnBeforecollapse; - property OnBeforeexpand : TExtDataTreeOnBeforeexpand read FOnBeforeexpand write SetFOnBeforeexpand; - property OnBeforeinsert : TExtDataTreeOnBeforeinsert read FOnBeforeinsert write SetFOnBeforeinsert; - property OnBeforemove : TExtDataTreeOnBeforemove read FOnBeforemove write SetFOnBeforemove; - property OnBeforeremove : TExtDataTreeOnBeforeremove read FOnBeforeremove write SetFOnBeforeremove; - property OnCollapse : TExtDataTreeOnCollapse read FOnCollapse write SetFOnCollapse; - property OnExpand : TExtDataTreeOnExpand read FOnExpand write SetFOnExpand; - property OnInsert : TExtDataTreeOnInsert read FOnInsert write SetFOnInsert; - property OnMove : TExtDataTreeOnMove read FOnMove write SetFOnMove; - property OnRemove : TExtDataTreeOnRemove read FOnRemove write SetFOnRemove; - property OnRootchange : TExtDataTreeOnRootchange read FOnRootchange write SetFOnRootchange; - property OnSort : TExtDataTreeOnSort read FOnSort write SetFOnSort; + property RelayedEvents : TExtObjectList read FRelayedEvents write SetFRelayedEvents; + property OnConnect : TExtDirectProviderOnConnect read FOnConnect write SetFOnConnect; + property OnData : TExtDirectProviderOnData read FOnData write SetFOnData; + property OnDisconnect : TExtDirectProviderOnDisconnect read FOnDisconnect write SetFOnDisconnect; + property OnException : TExtDirectProviderOnException read FOnException write SetFOnException; end; - TExtDataOperation = class(TExtAbstractComponent) + TExtDataAssociationHasOne = class(TExtAbstractComponent) private - FAction : String; - FActionCommitRecordsRe : TRegExp; - FActionSkipSyncRe : TRegExp; - FBatch : TExtDataBatch; - FCallback : TExtFunction; - FFilters : TExtObjectList; - FGroupers : TExtObjectList; - FLimit : Integer; - FParams : TExtObject; - FScope : TExtObject; - FSorters : TExtObjectList; - FStart : Integer; - FSynchronous : Boolean; - procedure SetFAction(Value : String); - procedure SetFActionCommitRecordsRe(Value : TRegExp); - procedure SetFActionSkipSyncRe(Value : TRegExp); - procedure SetFBatch(Value : TExtDataBatch); - procedure SetFCallback(Value : TExtFunction); - procedure SetFFilters(Value : TExtObjectList); - procedure SetFGroupers(Value : TExtObjectList); - procedure SetFLimit(Value : Integer); - procedure SetFParams(Value : TExtObject); - procedure SetFScope(Value : TExtObject); - procedure SetFSorters(Value : TExtObjectList); - procedure SetFStart(Value : Integer); - procedure SetFSynchronous(Value : Boolean); + FForeignKey : String; // '_id' + FGetterName : String; // 'get' + FSetterName : String; // 'set' + FTypeJS : String; + procedure SetFForeignKey(Value : String); + procedure SetFGetterName(Value : String); + procedure SetFSetterName(Value : String); + procedure SetFTypeJS(Value : String); protected procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function AllowWrite : TExtFunction; - function CommitRecords(ServerRecords : TExtObjectList) : TExtFunction; - constructor Create; overload; - function GetError : TExtFunction; - function GetRecords : TExtFunction; - function GetResultSet : TExtFunction; - function HasException : TExtFunction; - function IsComplete : TExtFunction; - function IsRunning : TExtFunction; - function IsStarted : TExtFunction; - function SetCompleted : TExtFunction; - function SetException(Error : String = '') : TExtFunction; overload; - function SetStarted : TExtFunction; - function SetSuccessful : TExtFunction; - function WasSuccessful : TExtFunction; - destructor Destroy; override; - property Action : String read FAction write SetFAction; - property ActionCommitRecordsRe : TRegExp read FActionCommitRecordsRe write SetFActionCommitRecordsRe; - property ActionSkipSyncRe : TRegExp read FActionSkipSyncRe write SetFActionSkipSyncRe; - property Batch : TExtDataBatch read FBatch write SetFBatch; - property Callback : TExtFunction read FCallback write SetFCallback; - property Filters : TExtObjectList read FFilters write SetFFilters; - property Groupers : TExtObjectList read FGroupers write SetFGroupers; - property Limit : Integer read FLimit write SetFLimit; - property Params : TExtObject read FParams write SetFParams; - property Scope : TExtObject read FScope write SetFScope; - property Sorters : TExtObjectList read FSorters write SetFSorters; - property Start : Integer read FStart write SetFStart; - property Synchronous : Boolean read FSynchronous write SetFSynchronous; - end; - - TExtContainerMonitor = class(TExtAbstractComponent) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; + property ForeignKey : String read FForeignKey write SetFForeignKey; + property GetterName : String read FGetterName write SetFGetterName; + property SetterName : String read FSetterName write SetFSetterName; + property TypeJS : String read FTypeJS write SetFTypeJS; end; - TExtChartTip = class(TExtAbstractComponent) + TExtDataAssociationHasMany = class(TExtAbstractComponent) + private + FFilterProperty : String; + FForeignKey : String; // '_id' + FName : String; + FStoreConfig : TExtObject; + FTypeJS : String; + procedure SetFFilterProperty(Value : String); + procedure SetFForeignKey(Value : String); + procedure SetFName(Value : String); + procedure SetFStoreConfig(Value : TExtObject); + procedure SetFTypeJS(Value : String); + protected + procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; + destructor Destroy; override; + property FilterProperty : String read FFilterProperty write SetFFilterProperty; + property ForeignKey : String read FForeignKey write SetFForeignKey; + property Name : String read FName write SetFName; + property StoreConfig : TExtObject read FStoreConfig write SetFStoreConfig; + property TypeJS : String read FTypeJS write SetFTypeJS; end; - // Procedural types for events TExtDataProxy - TExtDataProxyOnMetachange = procedure(This : TExtDataProxy; Meta : TExtObject) of object; - - TExtDataProxy = class(TExtAbstractComponent) + TExtDataBatch = class(TExtAbstractComponent) private - FBatchActions : Boolean; // true - FBatchOrder : String; // 'create,update,destroy' + FAutoStart : Boolean; + FCurrent : Integer; + FHasException : Boolean; FHasListeners : TExtObject; + FIsComplete : Boolean; FIsObservable : Boolean; - FIsProxy : Boolean; + FIsRunning : Boolean; FListeners : TExtObject; - FModel : String; - FModelModel : TExtDataModel; - FReader : TExtObject; - FReaderReader : TExtDataReader; - FReaderString : String; - FWriter : TExtObject; - FWriterString : String; - FWriterWriter : TExtDataWriter; - FOnMetachange : TExtDataProxyOnMetachange; - procedure SetFBatchActions(Value : Boolean); - procedure SetFBatchOrder(Value : String); + FOperations : TExtObjectList; + FPauseOnException : Boolean; + FTotal : Integer; + procedure SetFAutoStart(Value : Boolean); + procedure SetFCurrent(Value : Integer); + procedure SetFHasException(Value : Boolean); procedure SetFHasListeners(Value : TExtObject); + procedure SetFIsComplete(Value : Boolean); procedure SetFIsObservable(Value : Boolean); - procedure SetFIsProxy(Value : Boolean); + procedure SetFIsRunning(Value : Boolean); procedure SetFListeners(Value : TExtObject); - procedure SetFModel(Value : String); - procedure SetFModelModel(Value : TExtDataModel); - procedure SetFReader(Value : TExtObject); - procedure SetFReaderReader(Value : TExtDataReader); - procedure SetFReaderString(Value : String); - procedure SetFWriter(Value : TExtObject); - procedure SetFWriterString(Value : String); - procedure SetFWriterWriter(Value : TExtDataWriter); - procedure SetFOnMetachange(Value : TExtDataProxyOnMetachange); + procedure SetFOperations(Value : TExtObjectList); + procedure SetFPauseOnException(Value : Boolean); + procedure SetFTotal(Value : Integer); protected procedure InitDefaults; override; - procedure HandleEvent(const AEvtName: string); override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function Add(Operation : TExtObject) : TExtFunction; function AddEvents(EventNames : String) : TExtFunction; overload; function AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; overload; function AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; overload; @@ -4044,36 +4066,30 @@ TExtDataProxy = class(TExtAbstractComponent) function EnableBubble(EventNames : String) : TExtFunction; overload; function FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; function FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; - function GetModel : TExtFunction; - function GetReader : TExtFunction; - function GetWriter : TExtFunction; function HasListener(EventName : String) : TExtFunction; + function Pause : TExtFunction; function RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; function RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; function RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; overload; function ResumeEvent(EventName : String) : TExtFunction; function ResumeEvents : TExtFunction; - function SetModel(Model : String; SetOnStore : Boolean) : TExtFunction; overload; - function SetReader(Reader : String) : TExtFunction; overload; - function SetWriter(Writer : String) : TExtFunction; overload; + function Retry : TExtFunction; + function RunOperation(Index : Integer) : TExtFunction; + function Start : TExtFunction; function SuspendEvent(EventName : String) : TExtFunction; function SuspendEvents(QueueSuspended : Boolean) : TExtFunction; destructor Destroy; override; - property BatchActions : Boolean read FBatchActions write SetFBatchActions; - property BatchOrder : String read FBatchOrder write SetFBatchOrder; + property AutoStart : Boolean read FAutoStart write SetFAutoStart; + property Current : Integer read FCurrent write SetFCurrent; + property HasException : Boolean read FHasException write SetFHasException; property HasListeners : TExtObject read FHasListeners write SetFHasListeners; + property IsComplete : Boolean read FIsComplete write SetFIsComplete; property IsObservable : Boolean read FIsObservable write SetFIsObservable; - property IsProxy : Boolean read FIsProxy write SetFIsProxy; + property IsRunning : Boolean read FIsRunning write SetFIsRunning; property Listeners : TExtObject read FListeners write SetFListeners; - property Model : String read FModel write SetFModel; - property ModelModel : TExtDataModel read FModelModel write SetFModelModel; - property Reader : TExtObject read FReader write SetFReader; - property ReaderReader : TExtDataReader read FReaderReader write SetFReaderReader; - property ReaderString : String read FReaderString write SetFReaderString; - property Writer : TExtObject read FWriter write SetFWriter; - property WriterString : String read FWriterString write SetFWriterString; - property WriterWriter : TExtDataWriter read FWriterWriter write SetFWriterWriter; - property OnMetachange : TExtDataProxyOnMetachange read FOnMetachange write SetFOnMetachange; + property Operations : TExtObjectList read FOperations write SetFOperations; + property PauseOnException : Boolean read FPauseOnException write SetFPauseOnException; + property Total : Integer read FTotal write SetFTotal; end; TExtDataFlashBinaryXhr = class(TExtAbstractComponent) @@ -4103,44 +4119,111 @@ TExtDataFlashBinaryXhr = class(TExtAbstractComponent) property Status : Integer read FStatus write SetFStatus; end; - TExtChartThemeBase = class(TExtAbstractComponent) + // Procedural types for events TExtDataConnection + TExtDataConnectionOnBeforerequest = procedure(Conn : TExtDataConnection; Options : TExtObject) of object; + TExtDataConnectionOnRequestcomplete = procedure(Conn : TExtDataConnection; Response : TExtObject; Options : TExtObject) of object; + TExtDataConnectionOnRequestexception = procedure(Conn : TExtDataConnection; Response : TExtObject; Options : TExtObject) of object; + + TExtDataConnection = class(TExtAbstractComponent) + private + FAutoAbort : Boolean; + FBinary : Boolean; + FCors : Boolean; + FDefaultHeaders : TExtObject; + FDisableCaching : Boolean; + FDisableCachingParam : String; + FExtraParams : TExtObject; + FHasListeners : TExtObject; + FIsObservable : Boolean; + FListeners : TExtObject; + FMethod : String; + FTimeout : Integer; + FWithCredentials : Boolean; + FOnBeforerequest : TExtDataConnectionOnBeforerequest; + FOnRequestcomplete : TExtDataConnectionOnRequestcomplete; + FOnRequestexception : TExtDataConnectionOnRequestexception; + procedure SetFAutoAbort(Value : Boolean); + procedure SetFBinary(Value : Boolean); + procedure SetFCors(Value : Boolean); + procedure SetFDefaultHeaders(Value : TExtObject); + procedure SetFDisableCaching(Value : Boolean); + procedure SetFDisableCachingParam(Value : String); + procedure SetFExtraParams(Value : TExtObject); + procedure SetFHasListeners(Value : TExtObject); + procedure SetFIsObservable(Value : Boolean); + procedure SetFListeners(Value : TExtObject); + procedure SetFMethod(Value : String); + procedure SetFTimeout(Value : Integer); + procedure SetFWithCredentials(Value : Boolean); + procedure SetFOnBeforerequest(Value : TExtDataConnectionOnBeforerequest); + procedure SetFOnRequestcomplete(Value : TExtDataConnectionOnRequestcomplete); + procedure SetFOnRequestexception(Value : TExtDataConnectionOnRequestexception); + protected + procedure InitDefaults; override; + procedure HandleEvent(const AEvtName: string); override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function Abort(Request : TExtObject = nil) : TExtFunction; + function AbortAll : TExtFunction; + function AddEvents(EventNames : String) : TExtFunction; overload; + function AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; overload; + function AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; overload; + function ClearListeners : TExtFunction; + function ClearManagedListeners : TExtFunction; + constructor Create; + function EnableBubble(EventNames : String) : TExtFunction; overload; + function FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; + function FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; + function HasListener(EventName : String) : TExtFunction; + function IsLoading(Request : TExtObject = nil) : TExtFunction; + function ParseStatus(Status : Integer) : TExtFunction; + function RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; + function RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; + function RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; overload; + function Request(Options : TExtObject; OptionsUrl : String; OptionsParams : String; OptionsMethod : String; OptionsCallback : TExtFunction; OptionsCallbackOptions : TExtObject; OptionsCallbackSuccess : Boolean; OptionsCallbackResponse : TExtObject; OptionsSuccess : TExtFunction; OptionsSuccessResponse : TExtObject; OptionsSuccessOptions : TExtObject; OptionsFailure : TExtFunction; OptionsFailureResponse : TExtObject; OptionsFailureOptions : TExtObject; OptionsScope : TExtObject; OptionsTimeout : Integer; OptionsForm : String; OptionsIsUpload : Boolean; OptionsHeaders : TExtObject; OptionsXmlData : TExtObject; OptionsJsonData : String; OptionsBinaryData : TExtObjectList; OptionsDisableCaching : Boolean; OptionsWithCredentials : Boolean; OptionsBinary : Boolean) : TExtFunction; overload; + function ResumeEvent(EventName : String) : TExtFunction; + function ResumeEvents : TExtFunction; + function SetOptions(Options : TExtObject; Scope : TExtObject) : TExtFunction; + function SuspendEvent(EventName : String) : TExtFunction; + function SuspendEvents(QueueSuspended : Boolean) : TExtFunction; + function Upload(Form : String; Url : String; Params : String; Options : TExtObject) : TExtFunction; overload; + destructor Destroy; override; + property AutoAbort : Boolean read FAutoAbort write SetFAutoAbort; + property Binary : Boolean read FBinary write SetFBinary; + property Cors : Boolean read FCors write SetFCors; + property DefaultHeaders : TExtObject read FDefaultHeaders write SetFDefaultHeaders; + property DisableCaching : Boolean read FDisableCaching write SetFDisableCaching; + property DisableCachingParam : String read FDisableCachingParam write SetFDisableCachingParam; + property ExtraParams : TExtObject read FExtraParams write SetFExtraParams; + property HasListeners : TExtObject read FHasListeners write SetFHasListeners; + property IsObservable : Boolean read FIsObservable write SetFIsObservable; + property Listeners : TExtObject read FListeners write SetFListeners; + property Method : String read FMethod write SetFMethod; + property Timeout : Integer read FTimeout write SetFTimeout; + property WithCredentials : Boolean read FWithCredentials write SetFWithCredentials; + property OnBeforerequest : TExtDataConnectionOnBeforerequest read FOnBeforerequest write SetFOnBeforerequest; + property OnRequestcomplete : TExtDataConnectionOnRequestcomplete read FOnRequestcomplete write SetFOnRequestcomplete; + property OnRequestexception : TExtDataConnectionOnRequestexception read FOnRequestexception write SetFOnRequestexception; end; - TExtDataValidationsSingleton = class(TExtAbstractComponent) + TExtContainerDockingContainer = class(TExtAbstractComponent) private - FEmailMessage : String; - FEmailRe : TRegExp; - FExclusionMessage : String; - FFormatMessage : String; - FInclusionMessage : String; - FLengthMessage : String; - FPresenceMessage : String; - procedure SetFEmailMessage(Value : String); - procedure SetFEmailRe(Value : TRegExp); - procedure SetFExclusionMessage(Value : String); - procedure SetFFormatMessage(Value : String); - procedure SetFInclusionMessage(Value : String); - procedure SetFLengthMessage(Value : String); - procedure SetFPresenceMessage(Value : String); + FDefaultDockWeights : TExtObject; + procedure SetFDefaultDockWeights(Value : TExtObject); + protected + procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Email(Config : TExtObject; Email : String) : TExtFunction; - function Exclusion(Config : TExtObject; Value : String) : TExtFunction; - function Format(Config : TExtObject; Value : String) : TExtFunction; - function Inclusion(Config : TExtObject; Value : String) : TExtFunction; - function Length(Config : TExtObject; Value : String) : TExtFunction; - function Presence(Config : TExtObject; Value : TExtObject) : TExtFunction; - property EmailMessage : String read FEmailMessage write SetFEmailMessage; - property EmailRe : TRegExp read FEmailRe write SetFEmailRe; - property ExclusionMessage : String read FExclusionMessage write SetFExclusionMessage; - property FormatMessage : String read FFormatMessage write SetFFormatMessage; - property InclusionMessage : String read FInclusionMessage write SetFInclusionMessage; - property LengthMessage : String read FLengthMessage write SetFLengthMessage; - property PresenceMessage : String read FPresenceMessage write SetFPresenceMessage; + function AddDocked(Component : TExtObject; Pos : Integer = 0) : TExtFunction; overload; + constructor Create; + function GetDockedComponent(Comp : Integer) : TExtFunction; overload; + function GetDockedItems(Selector : String; BeforeBody : Boolean) : TExtFunction; + function InsertDocked(Pos : Integer; Component : TExtObject) : TExtFunction; overload; + function RemoveDocked(Item : TExtComponent; AutoDestroy : Boolean = false) : TExtFunction; + destructor Destroy; override; + property DefaultDockWeights : TExtObject read FDefaultDockWeights write SetFDefaultDockWeights; end; TExtZIndexManager = class(TExtAbstractComponent) @@ -4160,15 +4243,346 @@ TExtZIndexManager = class(TExtAbstractComponent) function Unregister(Comp : TExtComponent) : TExtFunction; end; - TExtDataModel = class(TExtAbstractComponent) - private - FAssociations : TExtObjectList; - FBelongsTo : String; + TExtContainerMonitor = class(TExtAbstractComponent) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + + TExtDataAssociationBelongsTo = class(TExtAbstractComponent) + private + FForeignKey : String; // '_id' + FGetterName : String; // 'get' + FSetterName : String; // 'set' + FTypeJS : String; + procedure SetFForeignKey(Value : String); + procedure SetFGetterName(Value : String); + procedure SetFSetterName(Value : String); + procedure SetFTypeJS(Value : String); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; + property ForeignKey : String read FForeignKey write SetFForeignKey; + property GetterName : String read FGetterName write SetFGetterName; + property SetterName : String read FSetterName write SetFSetterName; + property TypeJS : String read FTypeJS write SetFTypeJS; + end; + + TExtDataAssociation = class(TExtAbstractComponent) + private + FAssociatedModel : String; + FAssociatedName : String; + FAssociationKey : String; + FModel : String; + FOwnerModel : String; + FOwnerName : String; + FPrimaryKey : String; + FReader : TExtDataReader; + procedure SetFAssociatedModel(Value : String); + procedure SetFAssociatedName(Value : String); + procedure SetFAssociationKey(Value : String); + procedure SetFModel(Value : String); + procedure SetFOwnerModel(Value : String); + procedure SetFOwnerName(Value : String); + procedure SetFPrimaryKey(Value : String); + procedure SetFReader(Value : TExtDataReader); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; + function GetReader : TExtFunction; + destructor Destroy; override; + property AssociatedModel : String read FAssociatedModel write SetFAssociatedModel; + property AssociatedName : String read FAssociatedName write SetFAssociatedName; + property AssociationKey : String read FAssociationKey write SetFAssociationKey; + property Model : String read FModel write SetFModel; + property OwnerModel : String read FOwnerModel write SetFOwnerModel; + property OwnerName : String read FOwnerName write SetFOwnerName; + property PrimaryKey : String read FPrimaryKey write SetFPrimaryKey; + property Reader : TExtDataReader read FReader write SetFReader; + end; + + TExtDataRequest = class(TExtAbstractComponent) + private + FAction : String; + FMethod : String; + FParams : TExtObject; + FUrl : String; + procedure SetFAction(Value : String); + procedure SetFMethod(Value : String); + procedure SetFParams(Value : TExtObject); + procedure SetFUrl(Value : String); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; overload; + destructor Destroy; override; + property Action : String read FAction write SetFAction; + property Method : String read FMethod write SetFMethod; + property Params : TExtObject read FParams write SetFParams; + property Url : String read FUrl write SetFUrl; + end; + + // Procedural types for events TExtDataProxy + TExtDataProxyOnMetachange = procedure(This : TExtDataProxy; Meta : TExtObject) of object; + + TExtDataProxy = class(TExtAbstractComponent) + private + FBatchActions : Boolean; // true + FBatchOrder : String; // 'create,update,destroy' + FHasListeners : TExtObject; + FIsObservable : Boolean; + FIsProxy : Boolean; + FListeners : TExtObject; + FModel : String; + FModelModel : TExtDataModel; + FReader : TExtObject; + FReaderReader : TExtDataReader; + FReaderString : String; + FWriter : TExtObject; + FWriterString : String; + FWriterWriter : TExtDataWriter; + FOnMetachange : TExtDataProxyOnMetachange; + procedure SetFBatchActions(Value : Boolean); + procedure SetFBatchOrder(Value : String); + procedure SetFHasListeners(Value : TExtObject); + procedure SetFIsObservable(Value : Boolean); + procedure SetFIsProxy(Value : Boolean); + procedure SetFListeners(Value : TExtObject); + procedure SetFModel(Value : String); + procedure SetFModelModel(Value : TExtDataModel); + procedure SetFReader(Value : TExtObject); + procedure SetFReaderReader(Value : TExtDataReader); + procedure SetFReaderString(Value : String); + procedure SetFWriter(Value : TExtObject); + procedure SetFWriterString(Value : String); + procedure SetFWriterWriter(Value : TExtDataWriter); + procedure SetFOnMetachange(Value : TExtDataProxyOnMetachange); + protected + procedure InitDefaults; override; + procedure HandleEvent(const AEvtName: string); override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function AddEvents(EventNames : String) : TExtFunction; overload; + function AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; overload; + function AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; overload; + function ClearListeners : TExtFunction; + function ClearManagedListeners : TExtFunction; + constructor Create; overload; + function EnableBubble(EventNames : String) : TExtFunction; overload; + function FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; + function FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; + function GetModel : TExtFunction; + function GetReader : TExtFunction; + function GetWriter : TExtFunction; + function HasListener(EventName : String) : TExtFunction; + function RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; + function RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; + function RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; overload; + function ResumeEvent(EventName : String) : TExtFunction; + function ResumeEvents : TExtFunction; + function SetModel(Model : String; SetOnStore : Boolean) : TExtFunction; overload; + function SetReader(Reader : String) : TExtFunction; overload; + function SetWriter(Writer : String) : TExtFunction; overload; + function SuspendEvent(EventName : String) : TExtFunction; + function SuspendEvents(QueueSuspended : Boolean) : TExtFunction; + destructor Destroy; override; + property BatchActions : Boolean read FBatchActions write SetFBatchActions; + property BatchOrder : String read FBatchOrder write SetFBatchOrder; + property HasListeners : TExtObject read FHasListeners write SetFHasListeners; + property IsObservable : Boolean read FIsObservable write SetFIsObservable; + property IsProxy : Boolean read FIsProxy write SetFIsProxy; + property Listeners : TExtObject read FListeners write SetFListeners; + property Model : String read FModel write SetFModel; + property ModelModel : TExtDataModel read FModelModel write SetFModelModel; + property Reader : TExtObject read FReader write SetFReader; + property ReaderReader : TExtDataReader read FReaderReader write SetFReaderReader; + property ReaderString : String read FReaderString write SetFReaderString; + property Writer : TExtObject read FWriter write SetFWriter; + property WriterString : String read FWriterString write SetFWriterString; + property WriterWriter : TExtDataWriter read FWriterWriter write SetFWriterWriter; + property OnMetachange : TExtDataProxyOnMetachange read FOnMetachange write SetFOnMetachange; + end; + + TExtDataResultSet = class(TExtAbstractComponent) + private + FCount : Integer; + FLoaded : Boolean; + FRecords : TExtObjectList; + FSuccess : Boolean; + FTotal : Integer; + FTotalRecords : Integer; + procedure SetFCount(Value : Integer); + procedure SetFLoaded(Value : Boolean); + procedure SetFRecords(Value : TExtObjectList); + procedure SetFSuccess(Value : Boolean); + procedure SetFTotal(Value : Integer); + procedure SetFTotalRecords(Value : Integer); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; + destructor Destroy; override; + property Count : Integer read FCount write SetFCount; + property Loaded : Boolean read FLoaded write SetFLoaded; + property Records : TExtObjectList read FRecords write SetFRecords; + property Success : Boolean read FSuccess write SetFSuccess; + property Total : Integer read FTotal write SetFTotal; + property TotalRecords : Integer read FTotalRecords write SetFTotalRecords; + end; + + // Procedural types for events TExtDataTree + TExtDataTreeOnAppend = procedure of object; + TExtDataTreeOnBeforeappend = procedure of object; + TExtDataTreeOnBeforecollapse = procedure of object; + TExtDataTreeOnBeforeexpand = procedure of object; + TExtDataTreeOnBeforeinsert = procedure of object; + TExtDataTreeOnBeforemove = procedure of object; + TExtDataTreeOnBeforeremove = procedure of object; + TExtDataTreeOnCollapse = procedure of object; + TExtDataTreeOnExpand = procedure of object; + TExtDataTreeOnInsert = procedure of object; + TExtDataTreeOnMove = procedure of object; + TExtDataTreeOnRemove = procedure of object; + TExtDataTreeOnRootchange = procedure(Root : TExtDataModel) of object; + TExtDataTreeOnSort = procedure of object; + + TExtDataTree = class(TExtAbstractComponent) + private + FHasListeners : TExtObject; + FIsObservable : Boolean; + FListeners : TExtObject; + FOnAppend : TExtDataTreeOnAppend; + FOnBeforeappend : TExtDataTreeOnBeforeappend; + FOnBeforecollapse : TExtDataTreeOnBeforecollapse; + FOnBeforeexpand : TExtDataTreeOnBeforeexpand; + FOnBeforeinsert : TExtDataTreeOnBeforeinsert; + FOnBeforemove : TExtDataTreeOnBeforemove; + FOnBeforeremove : TExtDataTreeOnBeforeremove; + FOnCollapse : TExtDataTreeOnCollapse; + FOnExpand : TExtDataTreeOnExpand; + FOnInsert : TExtDataTreeOnInsert; + FOnMove : TExtDataTreeOnMove; + FOnRemove : TExtDataTreeOnRemove; + FOnRootchange : TExtDataTreeOnRootchange; + FOnSort : TExtDataTreeOnSort; + procedure SetFHasListeners(Value : TExtObject); + procedure SetFIsObservable(Value : Boolean); + procedure SetFListeners(Value : TExtObject); + procedure SetFOnAppend(Value : TExtDataTreeOnAppend); + procedure SetFOnBeforeappend(Value : TExtDataTreeOnBeforeappend); + procedure SetFOnBeforecollapse(Value : TExtDataTreeOnBeforecollapse); + procedure SetFOnBeforeexpand(Value : TExtDataTreeOnBeforeexpand); + procedure SetFOnBeforeinsert(Value : TExtDataTreeOnBeforeinsert); + procedure SetFOnBeforemove(Value : TExtDataTreeOnBeforemove); + procedure SetFOnBeforeremove(Value : TExtDataTreeOnBeforeremove); + procedure SetFOnCollapse(Value : TExtDataTreeOnCollapse); + procedure SetFOnExpand(Value : TExtDataTreeOnExpand); + procedure SetFOnInsert(Value : TExtDataTreeOnInsert); + procedure SetFOnMove(Value : TExtDataTreeOnMove); + procedure SetFOnRemove(Value : TExtDataTreeOnRemove); + procedure SetFOnRootchange(Value : TExtDataTreeOnRootchange); + procedure SetFOnSort(Value : TExtDataTreeOnSort); + protected + procedure HandleEvent(const AEvtName: string); override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function AddEvents(EventNames : String) : TExtFunction; overload; + function AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; overload; + function AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; overload; + function ClearListeners : TExtFunction; + function ClearManagedListeners : TExtFunction; + constructor Create(Root : TExtDataNodeInterface = nil); + function EnableBubble(EventNames : String) : TExtFunction; overload; + function FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; + function FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; + function GetNodeById(Id : String) : TExtFunction; + function GetRootNode : TExtFunction; + function HasListener(EventName : String) : TExtFunction; + function RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; + function RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; + function RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; overload; + function RemoveRootNode : TExtFunction; + function ResumeEvent(EventName : String) : TExtFunction; + function ResumeEvents : TExtFunction; + function SetRootNode(Node : TExtDataNodeInterface) : TExtFunction; + function SuspendEvent(EventName : String) : TExtFunction; + function SuspendEvents(QueueSuspended : Boolean) : TExtFunction; + property HasListeners : TExtObject read FHasListeners write SetFHasListeners; + property IsObservable : Boolean read FIsObservable write SetFIsObservable; + property Listeners : TExtObject read FListeners write SetFListeners; + property OnAppend : TExtDataTreeOnAppend read FOnAppend write SetFOnAppend; + property OnBeforeappend : TExtDataTreeOnBeforeappend read FOnBeforeappend write SetFOnBeforeappend; + property OnBeforecollapse : TExtDataTreeOnBeforecollapse read FOnBeforecollapse write SetFOnBeforecollapse; + property OnBeforeexpand : TExtDataTreeOnBeforeexpand read FOnBeforeexpand write SetFOnBeforeexpand; + property OnBeforeinsert : TExtDataTreeOnBeforeinsert read FOnBeforeinsert write SetFOnBeforeinsert; + property OnBeforemove : TExtDataTreeOnBeforemove read FOnBeforemove write SetFOnBeforemove; + property OnBeforeremove : TExtDataTreeOnBeforeremove read FOnBeforeremove write SetFOnBeforeremove; + property OnCollapse : TExtDataTreeOnCollapse read FOnCollapse write SetFOnCollapse; + property OnExpand : TExtDataTreeOnExpand read FOnExpand write SetFOnExpand; + property OnInsert : TExtDataTreeOnInsert read FOnInsert write SetFOnInsert; + property OnMove : TExtDataTreeOnMove read FOnMove write SetFOnMove; + property OnRemove : TExtDataTreeOnRemove read FOnRemove write SetFOnRemove; + property OnRootchange : TExtDataTreeOnRootchange read FOnRootchange write SetFOnRootchange; + property OnSort : TExtDataTreeOnSort read FOnSort write SetFOnSort; + end; + + TExtDataSortTypesSingleton = class(TExtAbstractComponent) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function AsDate(S : TExtObject) : TExtFunction; + function AsFloat(S : TExtObject) : TExtFunction; + function AsInt(S : TExtObject) : TExtFunction; + function AsUCString(S : TExtObject) : TExtFunction; + function AsUCText(S : TExtObject) : TExtFunction; + end; + + TExtDataJsonPSingleton = class(TExtAbstractComponent) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function Abort(Request : String = '') : TExtFunction; overload; + end; + + TExtDataIdGenerator = class(TExtAbstractComponent) + private + FId : String; + FIsGenerator : Boolean; + procedure SetFId(Value : String); + procedure SetFIsGenerator(Value : Boolean); + public + function JSClassName : string; override; + class function All : TExtObject; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function Get(Config : String) : TExtFunction; overload; + property Id : String read FId write SetFId; + property IsGenerator : Boolean read FIsGenerator write SetFIsGenerator; + end; + + TExtDataModel = class(TExtAbstractComponent) + private + FAssociations : TExtObjectList; + FBelongsTo : String; FBelongsToList : TExtObjectList; FBelongsToObject : TExtObject; FClientIdProperty : String; FDefaultProxyType : String; // 'ajax' + FDirty : Boolean; + FEditing : Boolean; FFields : TExtObjectList; + FFields_ : TExtObjectList; FFieldsList : TExtObjectList; FHasMany : String; FHasManyList : TExtObjectList; @@ -4178,8 +4592,9 @@ TExtDataModel = class(TExtAbstractComponent) FIdProperty : String; // 'id' FIdPropertyField : TExtDataField; FIdPropertyObject : TExtObject; + FIsModel : Boolean; FModified : TExtObject; - FPersistenceProperty : String; // 'data' + FPhantom : Boolean; FProxy : String; FProxyObject : TExtObject; FProxyProxy : TExtDataProxy; @@ -4192,7 +4607,10 @@ TExtDataModel = class(TExtAbstractComponent) procedure SetFBelongsToObject(Value : TExtObject); procedure SetFClientIdProperty(Value : String); procedure SetFDefaultProxyType(Value : String); + procedure SetFDirty(Value : Boolean); + procedure SetFEditing(Value : Boolean); procedure SetFFields(Value : TExtObjectList); + procedure SetFFields_(Value : TExtObjectList); procedure SetFFieldsList(Value : TExtObjectList); procedure SetFHasMany(Value : String); procedure SetFHasManyList(Value : TExtObjectList); @@ -4202,8 +4620,9 @@ TExtDataModel = class(TExtAbstractComponent) procedure SetFIdProperty(Value : String); procedure SetFIdPropertyField(Value : TExtDataField); procedure SetFIdPropertyObject(Value : TExtObject); + procedure SetFIsModel(Value : Boolean); procedure SetFModified(Value : TExtObject); - procedure SetFPersistenceProperty(Value : String); + procedure SetFPhantom(Value : Boolean); procedure SetFProxy(Value : String); procedure SetFProxyObject(Value : TExtObject); procedure SetFProxyProxy(Value : TExtDataProxy); @@ -4219,7 +4638,7 @@ TExtDataModel = class(TExtAbstractComponent) function CancelEdit : TExtFunction; function Commit(Silent : Boolean = false; ModifiedFieldNames : TExtObjectList = nil) : TExtFunction; function Copy(Id : String = '') : TExtFunction; - constructor Create; + constructor Create(Data : TExtObjectList); function EndEdit(Silent : Boolean = false; ModifiedFieldNames : TExtObjectList = nil) : TExtFunction; function Get(FieldName : String) : TExtFunction; function GetAssociatedData : TExtFunction; @@ -4244,7 +4663,10 @@ TExtDataModel = class(TExtAbstractComponent) property BelongsToObject : TExtObject read FBelongsToObject write SetFBelongsToObject; property ClientIdProperty : String read FClientIdProperty write SetFClientIdProperty; property DefaultProxyType : String read FDefaultProxyType write SetFDefaultProxyType; + property Dirty : Boolean read FDirty write SetFDirty; + property Editing : Boolean read FEditing write SetFEditing; property Fields : TExtObjectList read FFields write SetFFields; + property Fields_ : TExtObjectList read FFields_ write SetFFields_; property FieldsList : TExtObjectList read FFieldsList write SetFFieldsList; property HasMany : String read FHasMany write SetFHasMany; property HasManyList : TExtObjectList read FHasManyList write SetFHasManyList; @@ -4254,8 +4676,9 @@ TExtDataModel = class(TExtAbstractComponent) property IdProperty : String read FIdProperty write SetFIdProperty; property IdPropertyField : TExtDataField read FIdPropertyField write SetFIdPropertyField; property IdPropertyObject : TExtObject read FIdPropertyObject write SetFIdPropertyObject; + property IsModel : Boolean read FIsModel write SetFIsModel; property Modified : TExtObject read FModified write SetFModified; - property PersistenceProperty : String read FPersistenceProperty write SetFPersistenceProperty; + property Phantom : Boolean read FPhantom write SetFPhantom; property Proxy : String read FProxy write SetFProxy; property ProxyObject : TExtObject read FProxyObject write SetFProxyObject; property ProxyProxy : TExtDataProxy read FProxyProxy write SetFProxyProxy; @@ -4264,6 +4687,70 @@ TExtDataModel = class(TExtAbstractComponent) property Validations : TExtObjectList read FValidations write SetFValidations; end; + TExtDataOperation = class(TExtAbstractComponent) + private + FAction : String; + FActionCommitRecordsRe : TRegExp; + FActionSkipSyncRe : TRegExp; + FBatch : TExtDataBatch; + FCallback : TExtFunction; + FFilters : TExtObjectList; + FGroupers : TExtObjectList; + FLimit : Integer; + FParams : TExtObject; + FScope : TExtObject; + FSorters : TExtObjectList; + FStart : Integer; + FSynchronous : Boolean; + procedure SetFAction(Value : String); + procedure SetFActionCommitRecordsRe(Value : TRegExp); + procedure SetFActionSkipSyncRe(Value : TRegExp); + procedure SetFBatch(Value : TExtDataBatch); + procedure SetFCallback(Value : TExtFunction); + procedure SetFFilters(Value : TExtObjectList); + procedure SetFGroupers(Value : TExtObjectList); + procedure SetFLimit(Value : Integer); + procedure SetFParams(Value : TExtObject); + procedure SetFScope(Value : TExtObject); + procedure SetFSorters(Value : TExtObjectList); + procedure SetFStart(Value : Integer); + procedure SetFSynchronous(Value : Boolean); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function AllowWrite : TExtFunction; + function CommitRecords(ServerRecords : TExtObjectList) : TExtFunction; + constructor Create; overload; + function GetError : TExtFunction; + function GetRecords : TExtFunction; + function GetResultSet : TExtFunction; + function HasException : TExtFunction; + function IsComplete : TExtFunction; + function IsRunning : TExtFunction; + function IsStarted : TExtFunction; + function SetCompleted : TExtFunction; + function SetException(Error : String = '') : TExtFunction; overload; + function SetStarted : TExtFunction; + function SetSuccessful : TExtFunction; + function WasSuccessful : TExtFunction; + destructor Destroy; override; + property Action : String read FAction write SetFAction; + property ActionCommitRecordsRe : TRegExp read FActionCommitRecordsRe write SetFActionCommitRecordsRe; + property ActionSkipSyncRe : TRegExp read FActionSkipSyncRe write SetFActionSkipSyncRe; + property Batch : TExtDataBatch read FBatch write SetFBatch; + property Callback : TExtFunction read FCallback write SetFCallback; + property Filters : TExtObjectList read FFilters write SetFFilters; + property Groupers : TExtObjectList read FGroupers write SetFGroupers; + property Limit : Integer read FLimit write SetFLimit; + property Params : TExtObject read FParams write SetFParams; + property Scope : TExtObject read FScope write SetFScope; + property Sorters : TExtObjectList read FSorters write SetFSorters; + property Start : Integer read FStart write SetFStart; + property Synchronous : Boolean read FSynchronous write SetFSynchronous; + end; + // Procedural types for events TExtDataNodeInterface TExtDataNodeInterfaceOnAppend = procedure(This : TExtDataNodeInterface; Node : TExtDataNodeInterface; Index : Integer) of object; TExtDataNodeInterfaceOnBeforeappend = procedure(This : TExtDataNodeInterface; Node : TExtDataNodeInterface) of object; @@ -4462,389 +4949,197 @@ TExtDataNodeInterface = class(TExtAbstractComponent) property OnSort : TExtDataNodeInterfaceOnSort read FOnSort write SetFOnSort; end; - TExtDataTypesSingleton = class(TExtAbstractComponent) + TExtComponentQuerySingleton = class(TExtAbstractComponent) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function IsJS(Component : TExtComponent; Selector : String) : TExtFunction; + function Query(Selector : String; Root : TExtContainer = nil) : TExtFunction; + end; + + TExtButtonManagerSingleton = class(TExtAbstractComponent) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + + TExtAppEventDomain = class(TExtAbstractComponent) private - FStripRe : TRegExp; - procedure SetFStripRe(Value : TRegExp); + FIdProperty : String; + procedure SetFIdProperty(Value : String); public function JSClassName : string; override; - class function AUTO : TExtObject; - class function BOOL : TExtObject; - class function BOOLEAN : TExtObject; - class function DATE : TExtObject; - class function FLOAT : TExtObject; - class function INT : TExtObject; - class function INTEGER : TExtObject; - class function NUMBER : TExtObject; - class function STRINGJS : TExtObject; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - property StripRe : TRegExp read FStripRe write SetFStripRe; + property IdProperty : String read FIdProperty write SetFIdProperty; end; - TExtAppController = class(TExtAbstractComponent) + TExtChartAxisAbstract = class(TExtAbstractComponent) private - FRefs : TExtObjectList; - FStores : TExtObjectList; - FViews : TExtObjectList; - procedure SetFRefs(Value : TExtObjectList); - procedure SetFStores(Value : TExtObjectList); - procedure SetFViews(Value : TExtObjectList); + FFields : TExtObjectList; + FLabelJS : TExtChartLabel; + procedure SetFFields(Value : TExtObjectList); + procedure SetFLabelJS(Value : TExtChartLabel); protected procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function AddRef(Refs : TExtObject) : TExtFunction; overload; - function Control(Selectors : String; Listeners : TExtObject = nil) : TExtFunction; overload; constructor Create; overload; - function GetApplication : TExtFunction; - function GetController(Id : String) : TExtFunction; - function GetModel(Name : String) : TExtFunction; - function GetStore(Name : String) : TExtFunction; - function GetView(Name : String) : TExtFunction; - function HasRef : TExtFunction; - function Listen(ToJS : TExtObject) : TExtFunction; destructor Destroy; override; - property Refs : TExtObjectList read FRefs write SetFRefs; - property Stores : TExtObjectList read FStores write SetFStores; - property Views : TExtObjectList read FViews write SetFViews; + property Fields : TExtObjectList read FFields write SetFFields; + property LabelJS : TExtChartLabel read FLabelJS write SetFLabelJS; end; - TExtContainerDockingContainer = class(TExtAbstractComponent) + TExtChartHighlight = class(TExtAbstractComponent) private - FDefaultDockWeights : TExtObject; - procedure SetFDefaultDockWeights(Value : TExtObject); + FHighlight : Boolean; + FHighlightCfg : TExtObject; + FHighlightObject : TExtObject; + procedure SetFHighlight(Value : Boolean); + procedure SetFHighlightCfg(Value : TExtObject); + procedure SetFHighlightObject(Value : TExtObject); protected procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function AddDocked(Component : TExtObject; Pos : Integer = 0) : TExtFunction; overload; constructor Create; - function GetDockedComponent(Comp : Integer) : TExtFunction; overload; - function GetDockedItems(Selector : String; BeforeBody : Boolean) : TExtFunction; - function InsertDocked(Pos : Integer; Component : TExtObject) : TExtFunction; overload; - function RemoveDocked(Item : TExtComponent; AutoDestroy : Boolean = false) : TExtFunction; + function HighlightItem(Item : TExtObject) : TExtFunction; + function UnHighlightItem : TExtFunction; destructor Destroy; override; - property DefaultDockWeights : TExtObject read FDefaultDockWeights write SetFDefaultDockWeights; + property Highlight : Boolean read FHighlight write SetFHighlight; + property HighlightCfg : TExtObject read FHighlightCfg write SetFHighlightCfg; + property HighlightObject : TExtObject read FHighlightObject write SetFHighlightObject; end; - TExtDataSortTypesSingleton = class(TExtAbstractComponent) + TExtChartCallout = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function AsDate(S : TExtObject) : TExtFunction; - function AsFloat(S : TExtObject) : TExtFunction; - function AsInt(S : TExtObject) : TExtFunction; - function AsUCString(S : TExtObject) : TExtFunction; - function AsUCText(S : TExtObject) : TExtFunction; end; - TExtChartShapeSingleton = class(TExtAbstractComponent) + TExtAbstractPlugin = class(TExtAbstractComponent) + private + FIsPlugin : Boolean; + FPluginId : String; + procedure SetFIsPlugin(Value : Boolean); + procedure SetFPluginId(Value : String); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function Disable : TExtFunction; + property IsPlugin : Boolean read FIsPlugin write SetFIsPlugin; + property PluginId : String read FPluginId write SetFPluginId; end; - TExtDataAssociationBelongsTo = class(TExtAbstractComponent) + TExtAbstractManager = class(TExtAbstractComponent) private - FForeignKey : String; // '_id' - FGetterName : String; // 'get' - FSetterName : String; // 'set' - FTypeJS : String; - procedure SetFForeignKey(Value : String); - procedure SetFGetterName(Value : String); - procedure SetFSetterName(Value : String); - procedure SetFTypeJS(Value : String); - protected - procedure InitDefaults; override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - property ForeignKey : String read FForeignKey write SetFForeignKey; - property GetterName : String read FGetterName write SetFGetterName; - property SetterName : String read FSetterName write SetFSetterName; - property TypeJS : String read FTypeJS write SetFTypeJS; - end; - - TExtButtonManagerSingleton = class(TExtAbstractComponent) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - - TExtDataAssociationHasMany = class(TExtAbstractComponent) - private - FFilterProperty : String; - FForeignKey : String; // '_id' - FName : String; - FStoreConfig : TExtObject; - FTypeJS : String; - procedure SetFFilterProperty(Value : String); - procedure SetFForeignKey(Value : String); - procedure SetFName(Value : String); - procedure SetFStoreConfig(Value : TExtObject); - procedure SetFTypeJS(Value : String); + FAll : TExtUtilHashMap; + procedure SetFAll(Value : TExtUtilHashMap); protected procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} constructor Create; + function Each(Fn : TExtFunction; FnKey : String; FnValue : Integer; FnLength : Integer; FnReturn : Boolean; Scope : TExtObject) : TExtFunction; + function Get(Id : String) : TExtFunction; + function GetCount : TExtFunction; + function IsRegistered(TypeJS : String) : TExtFunction; + function OnAvailable(Id : String; Fn : TExtFunction; Scope : TExtObject) : TExtFunction; + function Register(Item : TExtObject) : TExtFunction; + function RegisterType(TypeJS : String; Cls : TExtFunction) : TExtFunction; + function Unregister(Item : TExtObject) : TExtFunction; destructor Destroy; override; - property FilterProperty : String read FFilterProperty write SetFFilterProperty; - property ForeignKey : String read FForeignKey write SetFForeignKey; - property Name : String read FName write SetFName; - property StoreConfig : TExtObject read FStoreConfig write SetFStoreConfig; - property TypeJS : String read FTypeJS write SetFTypeJS; + property All : TExtUtilHashMap read FAll write SetFAll; end; - TExtDataBatch = class(TExtAbstractComponent) + TExtAction = class(TExtAbstractComponent) private - FAutoStart : Boolean; - FCurrent : Integer; - FHasException : Boolean; - FHasListeners : TExtObject; - FIsComplete : Boolean; - FIsObservable : Boolean; - FIsRunning : Boolean; - FListeners : TExtObject; - FOperations : TExtObjectList; - FPauseOnException : Boolean; - FTotal : Integer; - procedure SetFAutoStart(Value : Boolean); - procedure SetFCurrent(Value : Integer); - procedure SetFHasException(Value : Boolean); - procedure SetFHasListeners(Value : TExtObject); - procedure SetFIsComplete(Value : Boolean); - procedure SetFIsObservable(Value : Boolean); - procedure SetFIsRunning(Value : Boolean); - procedure SetFListeners(Value : TExtObject); - procedure SetFOperations(Value : TExtObjectList); - procedure SetFPauseOnException(Value : Boolean); - procedure SetFTotal(Value : Integer); + FDisabled : Boolean; + FHandler : TExtFunction; + FHidden : Boolean; + FIconCls : String; + FIsAction : Boolean; + FItemId : String; + FScope : TExtObject; + FText : String; + procedure SetFDisabled(Value : Boolean); + procedure SetFHandler(Value : TExtFunction); + procedure SetFHidden(Value : Boolean); + procedure SetFIconCls(Value : String); + procedure SetFIsAction(Value : Boolean); + procedure SetFItemId(Value : String); + procedure SetFScope(Value : TExtObject); + procedure SetFText(Value : String); protected procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Add(Operation : TExtObject) : TExtFunction; - function AddEvents(EventNames : String) : TExtFunction; overload; - function AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; overload; - function AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; overload; - function ClearListeners : TExtFunction; - function ClearManagedListeners : TExtFunction; constructor Create; - function EnableBubble(EventNames : String) : TExtFunction; overload; - function FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; - function FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; - function HasListener(EventName : String) : TExtFunction; - function Pause : TExtFunction; - function RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; - function RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; - function RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; overload; - function ResumeEvent(EventName : String) : TExtFunction; - function ResumeEvents : TExtFunction; - function Retry : TExtFunction; - function RunOperation(Index : Integer) : TExtFunction; - function Start : TExtFunction; - function SuspendEvent(EventName : String) : TExtFunction; - function SuspendEvents(QueueSuspended : Boolean) : TExtFunction; + function Disable : TExtFunction; + function Each(Fn : TExtFunction; Scope : TExtObject) : TExtFunction; + function Enable : TExtFunction; + function Execute(Args : TExtObjectList) : TExtFunction; + function GetIconCls : TExtFunction; + function GetText : TExtFunction; + function Hide : TExtFunction; + function IsDisabled : TExtFunction; + function IsHidden : TExtFunction; + function SetDisabled(Disabled : Boolean) : TExtFunction; + function SetHandler(Fn : TExtFunction; Scope : TExtObject) : TExtFunction; + function SetHidden(Hidden : Boolean) : TExtFunction; + function SetIconCls(Cls : String) : TExtFunction; + function SetText(Text : String) : TExtFunction; + function Show : TExtFunction; destructor Destroy; override; - property AutoStart : Boolean read FAutoStart write SetFAutoStart; - property Current : Integer read FCurrent write SetFCurrent; - property HasException : Boolean read FHasException write SetFHasException; - property HasListeners : TExtObject read FHasListeners write SetFHasListeners; - property IsComplete : Boolean read FIsComplete write SetFIsComplete; - property IsObservable : Boolean read FIsObservable write SetFIsObservable; - property IsRunning : Boolean read FIsRunning write SetFIsRunning; - property Listeners : TExtObject read FListeners write SetFListeners; - property Operations : TExtObjectList read FOperations write SetFOperations; - property PauseOnException : Boolean read FPauseOnException write SetFPauseOnException; - property Total : Integer read FTotal write SetFTotal; - end; - - TExtDataAssociationHasOne = class(TExtAbstractComponent) - private - FForeignKey : String; // '_id' - FGetterName : String; // 'get' - FSetterName : String; // 'set' - FTypeJS : String; - procedure SetFForeignKey(Value : String); - procedure SetFGetterName(Value : String); - procedure SetFSetterName(Value : String); - procedure SetFTypeJS(Value : String); - protected - procedure InitDefaults; override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - property ForeignKey : String read FForeignKey write SetFForeignKey; - property GetterName : String read FGetterName write SetFGetterName; - property SetterName : String read FSetterName write SetFSetterName; - property TypeJS : String read FTypeJS write SetFTypeJS; - end; - - TExtAppEventDomain = class(TExtAbstractComponent) - private - FIdProperty : String; - procedure SetFIdProperty(Value : String); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - property IdProperty : String read FIdProperty write SetFIdProperty; + property Disabled : Boolean read FDisabled write SetFDisabled; + property Handler : TExtFunction read FHandler write SetFHandler; + property Hidden : Boolean read FHidden write SetFHidden; + property IconCls : String read FIconCls write SetFIconCls; + property IsAction : Boolean read FIsAction write SetFIsAction; + property ItemId : String read FItemId write SetFItemId; + property Scope : TExtObject read FScope write SetFScope; + property Text : String read FText write SetFText; end; - // Procedural types for events TExtDataConnection - TExtDataConnectionOnBeforerequest = procedure(Conn : TExtDataConnection; Options : TExtObject) of object; - TExtDataConnectionOnRequestcomplete = procedure(Conn : TExtDataConnection; Response : TExtObject; Options : TExtObject) of object; - TExtDataConnectionOnRequestexception = procedure(Conn : TExtDataConnection; Response : TExtObject; Options : TExtObject) of object; - - TExtDataConnection = class(TExtAbstractComponent) - private - FAutoAbort : Boolean; - FBinary : Boolean; - FCors : Boolean; - FDefaultHeaders : TExtObject; - FDisableCaching : Boolean; - FDisableCachingParam : String; - FExtraParams : TExtObject; - FHasListeners : TExtObject; - FIsObservable : Boolean; - FListeners : TExtObject; - FMethod : String; - FTimeout : Integer; - FWithCredentials : Boolean; - FOnBeforerequest : TExtDataConnectionOnBeforerequest; - FOnRequestcomplete : TExtDataConnectionOnRequestcomplete; - FOnRequestexception : TExtDataConnectionOnRequestexception; - procedure SetFAutoAbort(Value : Boolean); - procedure SetFBinary(Value : Boolean); - procedure SetFCors(Value : Boolean); - procedure SetFDefaultHeaders(Value : TExtObject); - procedure SetFDisableCaching(Value : Boolean); - procedure SetFDisableCachingParam(Value : String); - procedure SetFExtraParams(Value : TExtObject); - procedure SetFHasListeners(Value : TExtObject); - procedure SetFIsObservable(Value : Boolean); - procedure SetFListeners(Value : TExtObject); - procedure SetFMethod(Value : String); - procedure SetFTimeout(Value : Integer); - procedure SetFWithCredentials(Value : Boolean); - procedure SetFOnBeforerequest(Value : TExtDataConnectionOnBeforerequest); - procedure SetFOnRequestcomplete(Value : TExtDataConnectionOnRequestcomplete); - procedure SetFOnRequestexception(Value : TExtDataConnectionOnRequestexception); - protected - procedure InitDefaults; override; - procedure HandleEvent(const AEvtName: string); override; + TExtAppEventBusSingleton = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Abort(Request : TExtObject = nil) : TExtFunction; - function AbortAll : TExtFunction; - function AddEvents(EventNames : String) : TExtFunction; overload; - function AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; overload; - function AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; overload; - function ClearListeners : TExtFunction; - function ClearManagedListeners : TExtFunction; - constructor Create; - function EnableBubble(EventNames : String) : TExtFunction; overload; - function FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; - function FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; - function HasListener(EventName : String) : TExtFunction; - function IsLoading(Request : TExtObject = nil) : TExtFunction; - function ParseStatus(Status : Integer) : TExtFunction; - function RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; - function RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; - function RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; overload; - function Request(Options : TExtObject; OptionsUrl : String; OptionsParams : String; OptionsMethod : String; OptionsCallback : TExtFunction; OptionsCallbackOptions : TExtObject; OptionsCallbackSuccess : Boolean; OptionsCallbackResponse : TExtObject; OptionsSuccess : TExtFunction; OptionsSuccessResponse : TExtObject; OptionsSuccessOptions : TExtObject; OptionsFailure : TExtFunction; OptionsFailureResponse : TExtObject; OptionsFailureOptions : TExtObject; OptionsScope : TExtObject; OptionsTimeout : Integer; OptionsForm : String; OptionsIsUpload : Boolean; OptionsHeaders : TExtObject; OptionsXmlData : TExtObject; OptionsJsonData : String; OptionsBinaryData : TExtObjectList; OptionsDisableCaching : Boolean; OptionsWithCredentials : Boolean; OptionsBinary : Boolean) : TExtFunction; overload; - function ResumeEvent(EventName : String) : TExtFunction; - function ResumeEvents : TExtFunction; - function SetOptions(Options : TExtObject; Scope : TExtObject) : TExtFunction; - function SuspendEvent(EventName : String) : TExtFunction; - function SuspendEvents(QueueSuspended : Boolean) : TExtFunction; - function Upload(Form : String; Url : String; Params : String; Options : TExtObject) : TExtFunction; overload; - destructor Destroy; override; - property AutoAbort : Boolean read FAutoAbort write SetFAutoAbort; - property Binary : Boolean read FBinary write SetFBinary; - property Cors : Boolean read FCors write SetFCors; - property DefaultHeaders : TExtObject read FDefaultHeaders write SetFDefaultHeaders; - property DisableCaching : Boolean read FDisableCaching write SetFDisableCaching; - property DisableCachingParam : String read FDisableCachingParam write SetFDisableCachingParam; - property ExtraParams : TExtObject read FExtraParams write SetFExtraParams; - property HasListeners : TExtObject read FHasListeners write SetFHasListeners; - property IsObservable : Boolean read FIsObservable write SetFIsObservable; - property Listeners : TExtObject read FListeners write SetFListeners; - property Method : String read FMethod write SetFMethod; - property Timeout : Integer read FTimeout write SetFTimeout; - property WithCredentials : Boolean read FWithCredentials write SetFWithCredentials; - property OnBeforerequest : TExtDataConnectionOnBeforerequest read FOnBeforerequest write SetFOnBeforerequest; - property OnRequestcomplete : TExtDataConnectionOnRequestcomplete read FOnRequestcomplete write SetFOnRequestcomplete; - property OnRequestexception : TExtDataConnectionOnRequestexception read FOnRequestexception write SetFOnRequestexception; + function Control(Selectors : TExtObject; Controller : TExtAppController) : TExtFunction; + function Listen(ToJS : TExtObject; Controller : TExtAppController) : TExtFunction; + function Unlisten(ControllerId : String) : TExtFunction; end; - TExtChartAxisAbstract = class(TExtAbstractComponent) + TExtAppController = class(TExtAbstractComponent) private - FFields : TExtObjectList; - FLabelJS : TExtChartLabel; - procedure SetFFields(Value : TExtObjectList); - procedure SetFLabelJS(Value : TExtChartLabel); + FRefs : TExtObjectList; + FStores : TExtObjectList; + FViews : TExtObjectList; + procedure SetFRefs(Value : TExtObjectList); + procedure SetFStores(Value : TExtObjectList); + procedure SetFViews(Value : TExtObjectList); protected procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function AddRef(Refs : TExtObject) : TExtFunction; overload; + function Control(Selectors : String; Listeners : TExtObject = nil) : TExtFunction; overload; constructor Create; overload; + function GetApplication : TExtFunction; + function GetController(Id : String) : TExtFunction; + function GetModel(Name : String) : TExtFunction; + function GetStore(Name : String) : TExtFunction; + function GetView(Name : String) : TExtFunction; + function HasRef : TExtFunction; + function Listen(ToJS : TExtObject) : TExtFunction; destructor Destroy; override; - property Fields : TExtObjectList read FFields write SetFFields; - property LabelJS : TExtChartLabel read FLabelJS write SetFLabelJS; - end; - - TExtDataAssociation = class(TExtAbstractComponent) - private - FAssociatedModel : String; - FAssociatedName : String; - FAssociationKey : String; - FModel : String; - FOwnerModel : String; - FOwnerName : String; - FPrimaryKey : String; - FReader : TExtDataReader; - procedure SetFAssociatedModel(Value : String); - procedure SetFAssociatedName(Value : String); - procedure SetFAssociationKey(Value : String); - procedure SetFModel(Value : String); - procedure SetFOwnerModel(Value : String); - procedure SetFOwnerName(Value : String); - procedure SetFPrimaryKey(Value : String); - procedure SetFReader(Value : TExtDataReader); - protected - procedure InitDefaults; override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - function GetReader : TExtFunction; - destructor Destroy; override; - property AssociatedModel : String read FAssociatedModel write SetFAssociatedModel; - property AssociatedName : String read FAssociatedName write SetFAssociatedName; - property AssociationKey : String read FAssociationKey write SetFAssociationKey; - property Model : String read FModel write SetFModel; - property OwnerModel : String read FOwnerModel write SetFOwnerModel; - property OwnerName : String read FOwnerName write SetFOwnerName; - property PrimaryKey : String read FPrimaryKey write SetFPrimaryKey; - property Reader : TExtDataReader read FReader write SetFReader; - end; - - TExtAppEventBusSingleton = class(TExtAbstractComponent) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Control(Selectors : TExtObject; Controller : TExtAppController) : TExtFunction; - function Listen(ToJS : TExtObject; Controller : TExtAppController) : TExtFunction; - function Unlisten(ControllerId : String) : TExtFunction; + property Refs : TExtObjectList read FRefs write SetFRefs; + property Stores : TExtObjectList read FStores write SetFStores; + property Views : TExtObjectList read FViews write SetFViews; end; TExtChartTheme = class(TExtAbstractComponent) @@ -4853,79 +5148,151 @@ TExtChartTheme = class(TExtAbstractComponent) {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtDataRequest = class(TExtAbstractComponent) - private - FAction : String; - FMethod : String; - FParams : TExtObject; - FUrl : String; - procedure SetFAction(Value : String); - procedure SetFMethod(Value : String); - procedure SetFParams(Value : TExtObject); - procedure SetFUrl(Value : String); - protected - procedure InitDefaults; override; + TExtChartShapeSingleton = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; overload; - destructor Destroy; override; - property Action : String read FAction write SetFAction; - property Method : String read FMethod write SetFMethod; - property Params : TExtObject read FParams write SetFParams; - property Url : String read FUrl write SetFUrl; end; - TExtDataResultSet = class(TExtAbstractComponent) - private - FCount : Integer; - FLoaded : Boolean; - FRecords : TExtObjectList; - FSuccess : Boolean; - FTotal : Integer; - FTotalRecords : Integer; - procedure SetFCount(Value : Integer); - procedure SetFLoaded(Value : Boolean); - procedure SetFRecords(Value : TExtObjectList); - procedure SetFSuccess(Value : Boolean); - procedure SetFTotal(Value : Integer); - procedure SetFTotalRecords(Value : Integer); - protected - procedure InitDefaults; override; + TExtChartThemeBase = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - destructor Destroy; override; - property Count : Integer read FCount write SetFCount; - property Loaded : Boolean read FLoaded write SetFLoaded; - property Records : TExtObjectList read FRecords write SetFRecords; - property Success : Boolean read FSuccess write SetFSuccess; - property Total : Integer read FTotal write SetFTotal; - property TotalRecords : Integer read FTotalRecords write SetFTotalRecords; end; - TExtChartLabel = class(TExtAbstractComponent) + // Enumerated types for properties + TRegionEnum = (reNorth, reSouth, reEast, reWest, reCenter); + + TExtComponent = class(TExtAbstractComponent) private - FLabelJS : TExtObject; - procedure SetFLabelJS(Value : TExtObject); + FAnchor : String; + FAutoScroll : Boolean; + FCmargins : String; + FColumnWidth : Integer; + FColumnWidthString : String; + FConstrain : Boolean; + FConstrainTo : TExtUtilRegion; + FConstrainToElement : TExtElement; + FDefaultAlign : String; + FDraggable : Boolean; + FDraggableObject : TExtObject; + FFixed : Boolean; + FFloating : Boolean; + FFloatParent : TExtContainer; + FFocusOnToFront : Boolean; + FFormBind : Boolean; + FMaxSize : Integer; + FMinSize : Integer; + FOverflowX : String; + FOverflowY : String; + FRegion : TRegionEnum; + FResizable : Boolean; + FResizableObject : TExtObject; + FResizeHandles : String; + FShadow : String; + FShadowBoolean : Boolean; + FShadowOffset : Integer; + FSplit : Boolean; + FToFrontOnShow : Boolean; + FZIndexManager : TExtZIndexManager; + FZIndexParent : TExtContainer; + procedure SetFAnchor(Value : String); + procedure SetFAutoScroll(Value : Boolean); + procedure SetFCmargins(Value : String); + procedure SetFColumnWidth(Value : Integer); + procedure SetFColumnWidthString(Value : String); + procedure SetFConstrain(Value : Boolean); + procedure SetFConstrainTo(Value : TExtUtilRegion); + procedure SetFConstrainToElement(Value : TExtElement); + procedure SetFDefaultAlign(Value : String); + procedure SetFDraggable(Value : Boolean); + procedure SetFDraggableObject(Value : TExtObject); + procedure SetFFixed(Value : Boolean); + procedure SetFFloating(Value : Boolean); + procedure SetFFloatParent(Value : TExtContainer); + procedure SetFFocusOnToFront(Value : Boolean); + procedure SetFFormBind(Value : Boolean); + procedure SetFMaxSize(Value : Integer); + procedure SetFMinSize(Value : Integer); + procedure SetFOverflowX(Value : String); + procedure SetFOverflowY(Value : String); + procedure SetFRegion(Value : TRegionEnum); + procedure SetFResizable(Value : Boolean); + procedure SetFResizableObject(Value : TExtObject); + procedure SetFResizeHandles(Value : String); + procedure SetFShadow(Value : String); + procedure SetFShadowBoolean(Value : Boolean); + procedure SetFShadowOffset(Value : Integer); + procedure SetFSplit(Value : Boolean); + procedure SetFToFrontOnShow(Value : Boolean); + procedure SetFZIndexManager(Value : TExtZIndexManager); + procedure SetFZIndexParent(Value : TExtContainer); protected procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; + function Bubble(Fn : TExtFunction; Scope : TExtObject = nil; Args : TExtObjectList = nil) : TExtFunction; + function Center : TExtFunction; + function CloneConfig(Overrides : TExtObject) : TExtFunction; + constructor Create; overload; + function DoConstrain(ConstrainTo : String = '') : TExtFunction; overload; + function FindParentBy(Fn : TExtFunction) : TExtFunction; + function FindParentByType(Xtype : String) : TExtFunction; overload; + function Focus(SelectText : Boolean = false; Delay : Boolean = false) : TExtFunction; overload; + function GetPosition(Local : Boolean = false) : TExtFunction; + function GetXType : TExtFunction; + function Hide(AnimateTarget : String = ''; Callback : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; overload; + function ScrollBy(DeltaX : Integer; DeltaY : Boolean; Animate : Boolean) : TExtFunction; overload; + function SetActive(Active : Boolean = false; NewActive : TExtComponent = nil) : TExtFunction; + function SetAutoScroll(Scroll : Boolean) : TExtFunction; + function SetLoading(Load : Boolean; TargetEl : Boolean = false) : TExtFunction; overload; + function SetOverflowXY(OverflowX : String; OverflowY : String) : TExtFunction; + function SetPagePosition(X : Integer; Y : Integer = 0; Animate : Boolean = false) : TExtFunction; overload; + function Show(AnimateTarget : String = ''; Callback : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; overload; + function ShowAt(X : Integer; Y : Integer = 0; Animate : Boolean = false) : TExtFunction; overload; + function ShowBy(Component : TExtComponent; Position : String = ''; Offsets : TArrayOfInteger = nil) : TExtFunction; overload; + function ToBack : TExtFunction; + function ToFront(PreventFocus : Boolean = false) : TExtFunction; + function UpdateBox(Box : TExtObject) : TExtFunction; destructor Destroy; override; - property LabelJS : TExtObject read FLabelJS write SetFLabelJS; + property Anchor : String read FAnchor write SetFAnchor; + property AutoScroll : Boolean read FAutoScroll write SetFAutoScroll; + property Cmargins : String read FCmargins write SetFCmargins; + property ColumnWidth : Integer read FColumnWidth write SetFColumnWidth; + property ColumnWidthString : String read FColumnWidthString write SetFColumnWidthString; + property Constrain : Boolean read FConstrain write SetFConstrain; + property ConstrainTo : TExtUtilRegion read FConstrainTo write SetFConstrainTo; + property ConstrainToElement : TExtElement read FConstrainToElement write SetFConstrainToElement; + property DefaultAlign : String read FDefaultAlign write SetFDefaultAlign; + property Draggable : Boolean read FDraggable write SetFDraggable; + property DraggableObject : TExtObject read FDraggableObject write SetFDraggableObject; + property Fixed : Boolean read FFixed write SetFFixed; + property Floating : Boolean read FFloating write SetFFloating; + property FloatParent : TExtContainer read FFloatParent write SetFFloatParent; + property FocusOnToFront : Boolean read FFocusOnToFront write SetFFocusOnToFront; + property FormBind : Boolean read FFormBind write SetFFormBind; + property MaxSize : Integer read FMaxSize write SetFMaxSize; + property MinSize : Integer read FMinSize write SetFMinSize; + property OverflowX : String read FOverflowX write SetFOverflowX; + property OverflowY : String read FOverflowY write SetFOverflowY; + property Region : TRegionEnum read FRegion write SetFRegion; + property Resizable : Boolean read FResizable write SetFResizable; + property ResizableObject : TExtObject read FResizableObject write SetFResizableObject; + property ResizeHandles : String read FResizeHandles write SetFResizeHandles; + property Shadow : String read FShadow write SetFShadow; + property ShadowBoolean : Boolean read FShadowBoolean write SetFShadowBoolean; + property ShadowOffset : Integer read FShadowOffset write SetFShadowOffset; + property Split : Boolean read FSplit write SetFSplit; + property ToFrontOnShow : Boolean read FToFrontOnShow write SetFToFrontOnShow; + property ZIndexManager : TExtZIndexManager read FZIndexManager write SetFZIndexManager; + property ZIndexParent : TExtContainer read FZIndexParent write SetFZIndexParent; end; - TExtDirectEvent = class(TExtAbstractComponent) + TExtChartTip = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create(Config : TExtObject = nil); - function GetData : TExtFunction; - function GetName : TExtFunction; end; TExtChartLegend = class(TExtAbstractComponent) @@ -4978,231 +5345,18 @@ TExtChartLegend = class(TExtAbstractComponent) property Y : Integer read FY write SetFY; end; - TExtAction = class(TExtAbstractComponent) + TExtChartLabel = class(TExtAbstractComponent) private - FDisabled : Boolean; - FHandler : TExtFunction; - FHidden : Boolean; - FIconCls : String; - FIsAction : Boolean; - FItemId : String; - FScope : TExtObject; - FText : String; - procedure SetFDisabled(Value : Boolean); - procedure SetFHandler(Value : TExtFunction); - procedure SetFHidden(Value : Boolean); - procedure SetFIconCls(Value : String); - procedure SetFIsAction(Value : Boolean); - procedure SetFItemId(Value : String); - procedure SetFScope(Value : TExtObject); - procedure SetFText(Value : String); + FLabelJS : TExtObject; + procedure SetFLabelJS(Value : TExtObject); protected procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} constructor Create; - function Disable : TExtFunction; - function Each(Fn : TExtFunction; Scope : TExtObject) : TExtFunction; - function Enable : TExtFunction; - function Execute(Args : TExtObjectList) : TExtFunction; - function GetIconCls : TExtFunction; - function GetText : TExtFunction; - function Hide : TExtFunction; - function IsDisabled : TExtFunction; - function IsHidden : TExtFunction; - function SetDisabled(Disabled : Boolean) : TExtFunction; - function SetHandler(Fn : TExtFunction; Scope : TExtObject) : TExtFunction; - function SetHidden(Hidden : Boolean) : TExtFunction; - function SetIconCls(Cls : String) : TExtFunction; - function SetText(Text : String) : TExtFunction; - function Show : TExtFunction; destructor Destroy; override; - property Disabled : Boolean read FDisabled write SetFDisabled; - property Handler : TExtFunction read FHandler write SetFHandler; - property Hidden : Boolean read FHidden write SetFHidden; - property IconCls : String read FIconCls write SetFIconCls; - property IsAction : Boolean read FIsAction write SetFIsAction; - property ItemId : String read FItemId write SetFItemId; - property Scope : TExtObject read FScope write SetFScope; - property Text : String read FText write SetFText; - end; - - // Procedural types for events TExtDdDragTracker - TExtDdDragTrackerOnBeforestart = procedure(This : TExtDdDragTracker; E : TExtObject) of object; - TExtDdDragTrackerOnDrag = procedure(This : TExtDdDragTracker; E : TExtObject) of object; - TExtDdDragTrackerOnDragend = procedure(This : TExtDdDragTracker; E : TExtObject) of object; - TExtDdDragTrackerOnDragstart = procedure(This : TExtDdDragTracker; E : TExtObject) of object; - TExtDdDragTrackerOnMousedown = procedure(This : TExtDdDragTracker; E : TExtObject) of object; - TExtDdDragTrackerOnMousemove = procedure(This : TExtDdDragTracker; E : TExtObject) of object; - TExtDdDragTrackerOnMouseout = procedure(This : TExtDdDragTracker; E : TExtObject) of object; - TExtDdDragTrackerOnMouseover = procedure(This : TExtDdDragTracker; E : TExtObject; Target : THTMLElement) of object; - TExtDdDragTrackerOnMouseup = procedure(This : TExtDdDragTracker; E : TExtObject) of object; - - TExtDdDragTracker = class(TExtAbstractComponent) - private - FAutoStart : Boolean; - FAutoStartInteger : Integer; - FConstrainTo : TExtUtilRegion; - FConstrainToElement : TExtElement; - FDelegate : String; - FHasListeners : TExtObject; - FIsObservable : Boolean; - FListeners : TExtObject; - FOverCls : String; - FPreventDefault : Boolean; - FStopEvent : Boolean; - FTolerance : Integer; - FTrackOver : Boolean; - FOnBeforestart : TExtDdDragTrackerOnBeforestart; - FOnDrag : TExtDdDragTrackerOnDrag; - FOnDragend : TExtDdDragTrackerOnDragend; - FOnDragstart : TExtDdDragTrackerOnDragstart; - FOnMousedown : TExtDdDragTrackerOnMousedown; - FOnMousemove : TExtDdDragTrackerOnMousemove; - FOnMouseout : TExtDdDragTrackerOnMouseout; - FOnMouseover : TExtDdDragTrackerOnMouseover; - FOnMouseup : TExtDdDragTrackerOnMouseup; - procedure SetFAutoStart(Value : Boolean); - procedure SetFAutoStartInteger(Value : Integer); - procedure SetFConstrainTo(Value : TExtUtilRegion); - procedure SetFConstrainToElement(Value : TExtElement); - procedure SetFDelegate(Value : String); - procedure SetFHasListeners(Value : TExtObject); - procedure SetFIsObservable(Value : Boolean); - procedure SetFListeners(Value : TExtObject); - procedure SetFOverCls(Value : String); - procedure SetFPreventDefault(Value : Boolean); - procedure SetFStopEvent(Value : Boolean); - procedure SetFTolerance(Value : Integer); - procedure SetFTrackOver(Value : Boolean); - procedure SetFOnBeforestart(Value : TExtDdDragTrackerOnBeforestart); - procedure SetFOnDrag(Value : TExtDdDragTrackerOnDrag); - procedure SetFOnDragend(Value : TExtDdDragTrackerOnDragend); - procedure SetFOnDragstart(Value : TExtDdDragTrackerOnDragstart); - procedure SetFOnMousedown(Value : TExtDdDragTrackerOnMousedown); - procedure SetFOnMousemove(Value : TExtDdDragTrackerOnMousemove); - procedure SetFOnMouseout(Value : TExtDdDragTrackerOnMouseout); - procedure SetFOnMouseover(Value : TExtDdDragTrackerOnMouseover); - procedure SetFOnMouseup(Value : TExtDdDragTrackerOnMouseup); - protected - procedure InitDefaults; override; - procedure HandleEvent(const AEvtName: string); override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function AddEvents(EventNames : String) : TExtFunction; overload; - function AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; overload; - function AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; overload; - function ClearListeners : TExtFunction; - function ClearManagedListeners : TExtFunction; - constructor Create; - function EnableBubble(EventNames : String) : TExtFunction; overload; - function FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; - function FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; - function GetDragTarget : TExtFunction; - function GetOffset(ConstrainMode : String = '') : TExtFunction; - function HasListener(EventName : String) : TExtFunction; - function InitEl(El : TExtElement) : TExtFunction; overload; - function RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; - function RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; - function RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; overload; - function ResumeEvent(EventName : String) : TExtFunction; - function ResumeEvents : TExtFunction; - function SuspendEvent(EventName : String) : TExtFunction; - function SuspendEvents(QueueSuspended : Boolean) : TExtFunction; - destructor Destroy; override; - property AutoStart : Boolean read FAutoStart write SetFAutoStart; - property AutoStartInteger : Integer read FAutoStartInteger write SetFAutoStartInteger; - property ConstrainTo : TExtUtilRegion read FConstrainTo write SetFConstrainTo; - property ConstrainToElement : TExtElement read FConstrainToElement write SetFConstrainToElement; - property Delegate : String read FDelegate write SetFDelegate; - property HasListeners : TExtObject read FHasListeners write SetFHasListeners; - property IsObservable : Boolean read FIsObservable write SetFIsObservable; - property Listeners : TExtObject read FListeners write SetFListeners; - property OverCls : String read FOverCls write SetFOverCls; - property PreventDefault : Boolean read FPreventDefault write SetFPreventDefault; - property StopEvent : Boolean read FStopEvent write SetFStopEvent; - property Tolerance : Integer read FTolerance write SetFTolerance; - property TrackOver : Boolean read FTrackOver write SetFTrackOver; - property OnBeforestart : TExtDdDragTrackerOnBeforestart read FOnBeforestart write SetFOnBeforestart; - property OnDrag : TExtDdDragTrackerOnDrag read FOnDrag write SetFOnDrag; - property OnDragend : TExtDdDragTrackerOnDragend read FOnDragend write SetFOnDragend; - property OnDragstart : TExtDdDragTrackerOnDragstart read FOnDragstart write SetFOnDragstart; - property OnMousedown : TExtDdDragTrackerOnMousedown read FOnMousedown write SetFOnMousedown; - property OnMousemove : TExtDdDragTrackerOnMousemove read FOnMousemove write SetFOnMousemove; - property OnMouseout : TExtDdDragTrackerOnMouseout read FOnMouseout write SetFOnMouseout; - property OnMouseover : TExtDdDragTrackerOnMouseover read FOnMouseover write SetFOnMouseover; - property OnMouseup : TExtDdDragTrackerOnMouseup read FOnMouseup write SetFOnMouseup; - end; - - TExtAbstractPlugin = class(TExtAbstractComponent) - private - FPluginId : String; - procedure SetFPluginId(Value : String); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Disable : TExtFunction; - property PluginId : String read FPluginId write SetFPluginId; - end; - - TExtDiagLayoutContextItem = class(TExtAbstractComponent) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - - TExtDataIdGenerator = class(TExtAbstractComponent) - private - FId : String; - procedure SetFId(Value : String); - public - function JSClassName : string; override; - class function All : TExtObject; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Get(Config : String) : TExtFunction; overload; - property Id : String read FId write SetFId; - end; - - TExtDdRegistrySingleton = class(TExtAbstractComponent) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function GetHandle(Id : String) : TExtFunction; overload; - function GetHandleFromEvent(E : TEvent) : TExtFunction; - function GetTarget(Id : String) : TExtFunction; overload; - function GetTargetFromEvent(E : TEvent) : TExtFunction; - function Register(Element : String; Data : TExtObject; DataHandles : TExtObjectList; DataIsHandle : Boolean) : TExtFunction; overload; - function Unregister(Element : String) : TExtFunction; overload; - end; - - TExtAbstractManager = class(TExtAbstractComponent) - private - FAll : TExtUtilHashMap; - procedure SetFAll(Value : TExtUtilHashMap); - protected - procedure InitDefaults; override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - function Each(Fn : TExtFunction; FnKey : String; FnValue : Integer; FnLength : Integer; FnReturn : Boolean; Scope : TExtObject) : TExtFunction; - function Get(Id : String) : TExtFunction; - function GetCount : TExtFunction; - function IsRegistered(TypeJS : String) : TExtFunction; - function OnAvailable(Id : String; Fn : TExtFunction; Scope : TExtObject) : TExtFunction; - function Register(Item : TExtObject) : TExtFunction; - function RegisterType(TypeJS : String; Cls : TExtFunction) : TExtFunction; - function Unregister(Item : TExtObject) : TExtFunction; - destructor Destroy; override; - property All : TExtUtilHashMap read FAll write SetFAll; - end; - - TExtDiagLayoutContext = class(TExtAbstractComponent) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + property LabelJS : TExtObject read FLabelJS write SetFLabelJS; end; TExtChartMask = class(TExtAbstractComponent) @@ -5219,198 +5373,6 @@ TExtChartMask = class(TExtAbstractComponent) property MaskString : String read FMaskString write SetFMaskString; end; - TExtDdScrollManagerSingleton = class(TExtAbstractComponent) - private - FDdGroup : String; - procedure SetFDdGroup(Value : String); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function RefreshCache : TExtFunction; - property DdGroup : String read FDdGroup write SetFDdGroup; - end; - - TExtDdDragDropManagerSingleton = class(TExtAbstractComponent) - private - FClickPixelThresh : Integer; - FClickTimeThresh : Integer; - FDragCls : String; - FLocationCache : TExtObject; - FMode : Integer; - FNotifyOccluded : Boolean; - FPreventDefault : Boolean; - FStopPropagation : Boolean; - FUseCache : Boolean; - procedure SetFClickPixelThresh(Value : Integer); - procedure SetFClickTimeThresh(Value : Integer); - procedure SetFDragCls(Value : String); - procedure SetFLocationCache(Value : TExtObject); - procedure SetFMode(Value : Integer); - procedure SetFNotifyOccluded(Value : Boolean); - procedure SetFPreventDefault(Value : Boolean); - procedure SetFStopPropagation(Value : Boolean); - procedure SetFUseCache(Value : Boolean); - protected - procedure InitDefaults; override; - public - function JSClassName : string; override; - class function INTERSECT : Integer; - class function POINT : Integer; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function GetBestMatch(Dds : TExtObjectList) : TExtFunction; - function GetCss(Id : String) : TExtFunction; - function GetDDById(Id : String) : TExtFunction; - function GetLocation(ODD : TExtDdDragDrop) : TExtFunction; - function GetPosY(El : THTMLElement) : TExtFunction; - function GetRelated(P_oDD : TExtDdDragDrop; BTargetsOnly : Boolean) : TExtFunction; - function GetScrollLeft : TExtFunction; - function GetScrollTop : TExtFunction; - function GetStyle(El : THTMLElement; Param : String) : TExtFunction; - function HandleWasClicked(Node : THTMLElement) : TExtFunction; - function IsDragDrop(Id : String) : TExtFunction; - function IsHandle(Id : String) : TExtFunction; - function IsLegalTarget(ODD : TExtDdDragDrop; OTargetDD : TExtDdDragDrop) : TExtFunction; - function IsTypeOfDD(The : TExtObject) : TExtFunction; - function MoveToEl(MoveEl : THTMLElement; TargetEl : THTMLElement) : TExtFunction; - function NumericSort(A : Integer; B : Integer) : TExtFunction; - function RefreshCache(Groups : TExtObject) : TExtFunction; - function RegDragDrop(ODD : TExtDdDragDrop; SGroup : String) : TExtFunction; - function RegHandle(SDDId : String; SHandleId : String) : TExtFunction; - function StartDrag(X : Integer; Y : Integer) : TExtFunction; - function StopEvent(E : TEvent) : TExtFunction; - function SwapNode(N1 : THTMLElement; N2 : THTMLElement) : TExtFunction; - function VerifyEl(El : THTMLElement) : TExtFunction; - destructor Destroy; override; - property ClickPixelThresh : Integer read FClickPixelThresh write SetFClickPixelThresh; - property ClickTimeThresh : Integer read FClickTimeThresh write SetFClickTimeThresh; - property DragCls : String read FDragCls write SetFDragCls; - property LocationCache : TExtObject read FLocationCache write SetFLocationCache; - property Mode : Integer read FMode write SetFMode; - property NotifyOccluded : Boolean read FNotifyOccluded write SetFNotifyOccluded; - property PreventDefault : Boolean read FPreventDefault write SetFPreventDefault; - property StopPropagation : Boolean read FStopPropagation write SetFStopPropagation; - property UseCache : Boolean read FUseCache write SetFUseCache; - end; - - // Enumerated types for properties - TRegionEnum = (reNorth, reSouth, reEast, reWest, reCenter); - - TExtComponent = class(TExtAbstractComponent) - private - FAutoScroll : Boolean; - FColumnWidth : Integer; - FColumnWidthString : String; - FConstrain : Boolean; - FConstrainTo : TExtUtilRegion; - FConstrainToElement : TExtElement; - FDefaultAlign : String; - FDraggable : Boolean; - FDraggableObject : TExtObject; - FFixed : Boolean; - FFloating : Boolean; - FFocusOnToFront : Boolean; - FFormBind : Boolean; - FOverflowX : String; - FOverflowY : String; - FRegion : TRegionEnum; - FResizable : Boolean; - FResizableObject : TExtObject; - FResizeHandles : String; - FShadow : String; - FShadowBoolean : Boolean; - FShadowOffset : Integer; - FToFrontOnShow : Boolean; - procedure SetFAutoScroll(Value : Boolean); - procedure SetFColumnWidth(Value : Integer); - procedure SetFColumnWidthString(Value : String); - procedure SetFConstrain(Value : Boolean); - procedure SetFConstrainTo(Value : TExtUtilRegion); - procedure SetFConstrainToElement(Value : TExtElement); - procedure SetFDefaultAlign(Value : String); - procedure SetFDraggable(Value : Boolean); - procedure SetFDraggableObject(Value : TExtObject); - procedure SetFFixed(Value : Boolean); - procedure SetFFloating(Value : Boolean); - procedure SetFFocusOnToFront(Value : Boolean); - procedure SetFFormBind(Value : Boolean); - procedure SetFOverflowX(Value : String); - procedure SetFOverflowY(Value : String); - procedure SetFRegion(Value : TRegionEnum); - procedure SetFResizable(Value : Boolean); - procedure SetFResizableObject(Value : TExtObject); - procedure SetFResizeHandles(Value : String); - procedure SetFShadow(Value : String); - procedure SetFShadowBoolean(Value : Boolean); - procedure SetFShadowOffset(Value : Integer); - procedure SetFToFrontOnShow(Value : Boolean); - protected - procedure InitDefaults; override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Bubble(Fn : TExtFunction; Scope : TExtObject = nil; Args : TExtObjectList = nil) : TExtFunction; - function Center : TExtFunction; - function CloneConfig(Overrides : TExtObject) : TExtFunction; - constructor Create; overload; - function DoConstrain(ConstrainTo : String = '') : TExtFunction; overload; - function FindParentBy(Fn : TExtFunction) : TExtFunction; - function FindParentByType(Xtype : String) : TExtFunction; overload; - function Focus(SelectText : Boolean = false; Delay : Boolean = false) : TExtFunction; overload; - function GetPosition(Local : Boolean = false) : TExtFunction; - function GetXType : TExtFunction; - function Hide(AnimateTarget : String = ''; Callback : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; overload; - function ScrollBy(DeltaX : Integer; DeltaY : Boolean; Animate : Boolean) : TExtFunction; overload; - function SetActive(Active : Boolean = false; NewActive : TExtComponent = nil) : TExtFunction; - function SetAutoScroll(Scroll : Boolean) : TExtFunction; - function SetLoading(Load : Boolean; TargetEl : Boolean = false) : TExtFunction; overload; - function SetOverflowXY(OverflowX : String; OverflowY : String) : TExtFunction; - function SetPagePosition(X : Integer; Y : Integer = 0; Animate : Boolean = false) : TExtFunction; overload; - function Show(AnimateTarget : String = ''; Callback : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; overload; - function ShowAt(X : Integer; Y : Integer = 0; Animate : Boolean = false) : TExtFunction; overload; - function ShowBy(Component : TExtComponent; Position : String = ''; Offsets : TArrayOfInteger = nil) : TExtFunction; overload; - function ToBack : TExtFunction; - function ToFront(PreventFocus : Boolean = false) : TExtFunction; - function UpdateBox(Box : TExtObject) : TExtFunction; - destructor Destroy; override; - property AutoScroll : Boolean read FAutoScroll write SetFAutoScroll; - property ColumnWidth : Integer read FColumnWidth write SetFColumnWidth; - property ColumnWidthString : String read FColumnWidthString write SetFColumnWidthString; - property Constrain : Boolean read FConstrain write SetFConstrain; - property ConstrainTo : TExtUtilRegion read FConstrainTo write SetFConstrainTo; - property ConstrainToElement : TExtElement read FConstrainToElement write SetFConstrainToElement; - property DefaultAlign : String read FDefaultAlign write SetFDefaultAlign; - property Draggable : Boolean read FDraggable write SetFDraggable; - property DraggableObject : TExtObject read FDraggableObject write SetFDraggableObject; - property Fixed : Boolean read FFixed write SetFFixed; - property Floating : Boolean read FFloating write SetFFloating; - property FocusOnToFront : Boolean read FFocusOnToFront write SetFFocusOnToFront; - property FormBind : Boolean read FFormBind write SetFFormBind; - property OverflowX : String read FOverflowX write SetFOverflowX; - property OverflowY : String read FOverflowY write SetFOverflowY; - property Region : TRegionEnum read FRegion write SetFRegion; - property Resizable : Boolean read FResizable write SetFResizable; - property ResizableObject : TExtObject read FResizableObject write SetFResizableObject; - property ResizeHandles : String read FResizeHandles write SetFResizeHandles; - property Shadow : String read FShadow write SetFShadow; - property ShadowBoolean : Boolean read FShadowBoolean write SetFShadowBoolean; - property ShadowOffset : Integer read FShadowOffset write SetFShadowOffset; - property ToFrontOnShow : Boolean read FToFrontOnShow write SetFToFrontOnShow; - end; - - TExtChartCallout = class(TExtAbstractComponent) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - - TExtChartNavigation = class(TExtAbstractComponent) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function RestoreZoom : TExtFunction; - function SetZoom : TExtFunction; - end; - // Procedural types for events TExtChartSeries TExtChartSeriesOnTitlechange = procedure(Title : String; Index : Integer) of object; @@ -5494,6 +5456,14 @@ TExtChartSeries = class(TExtAbstractComponent) property OnTitlechange : TExtChartSeriesOnTitlechange read FOnTitlechange write SetFOnTitlechange; end; + TExtChartNavigation = class(TExtAbstractComponent) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function RestoreZoom : TExtFunction; + function SetZoom : TExtFunction; + end; + // Procedural types for events TExtDirectManagerSingleton TExtDirectManagerSingletonOnEvent = procedure(Event : TExtDirectEvent; Provider : TExtDirectProvider) of object; TExtDirectManagerSingletonOnException = procedure(Event : TExtDirectEvent) of object; @@ -5542,12 +5512,24 @@ TExtDirectManagerSingleton = class(TExtAbstractComponent) property OnException : TExtDirectManagerSingletonOnException read FOnException write SetFOnException; end; - TExtComponentQuerySingleton = class(TExtAbstractComponent) + TExtDirectEvent = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function IsJS(Component : TExtComponent; Selector : String) : TExtFunction; - function Query(Selector : String; Root : TExtContainer = nil) : TExtFunction; + constructor Create(Config : TExtObject = nil); + function GetData : TExtFunction; + function GetName : TExtFunction; + end; + + TExtDdScrollManagerSingleton = class(TExtAbstractComponent) + private + FDdGroup : String; + procedure SetFDdGroup(Value : String); + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function RefreshCache : TExtFunction; + property DdGroup : String read FDdGroup write SetFDdGroup; end; TExtDdDragDrop = class(TExtAbstractComponent) @@ -5637,133 +5619,541 @@ TExtDdDragDrop = class(TExtAbstractComponent) property YTicks : TArrayOfInteger read FYTicks write SetFYTicks; end; - TExtDataJsonPSingleton = class(TExtAbstractComponent) + TExtDataValidationsSingleton = class(TExtAbstractComponent) + private + FEmailMessage : String; + FEmailRe : TRegExp; + FExclusionMessage : String; + FFormatMessage : String; + FInclusionMessage : String; + FLengthMessage : String; + FPresenceMessage : String; + procedure SetFEmailMessage(Value : String); + procedure SetFEmailRe(Value : TRegExp); + procedure SetFExclusionMessage(Value : String); + procedure SetFFormatMessage(Value : String); + procedure SetFInclusionMessage(Value : String); + procedure SetFLengthMessage(Value : String); + procedure SetFPresenceMessage(Value : String); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Abort(Request : String = '') : TExtFunction; overload; + function Email(Config : TExtObject; Email : String) : TExtFunction; + function Exclusion(Config : TExtObject; Value : String) : TExtFunction; + function Format(Config : TExtObject; Value : String) : TExtFunction; + function Inclusion(Config : TExtObject; Value : String) : TExtFunction; + function Length(Config : TExtObject; Value : String) : TExtFunction; + function Presence(Config : TExtObject; Value : TExtObject) : TExtFunction; + property EmailMessage : String read FEmailMessage write SetFEmailMessage; + property EmailRe : TRegExp read FEmailRe write SetFEmailRe; + property ExclusionMessage : String read FExclusionMessage write SetFExclusionMessage; + property FormatMessage : String read FFormatMessage write SetFFormatMessage; + property InclusionMessage : String read FInclusionMessage write SetFInclusionMessage; + property LengthMessage : String read FLengthMessage write SetFLengthMessage; + property PresenceMessage : String read FPresenceMessage write SetFPresenceMessage; end; - TExtChartHighlight = class(TExtAbstractComponent) - private - FHighlight : Boolean; - FHighlightCfg : TExtObject; - FHighlightObject : TExtObject; - procedure SetFHighlight(Value : Boolean); - procedure SetFHighlightCfg(Value : TExtObject); - procedure SetFHighlightObject(Value : TExtObject); - protected - procedure InitDefaults; override; + TExtDiagLayoutContext = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - function HighlightItem(Item : TExtObject) : TExtFunction; - function UnHighlightItem : TExtFunction; - destructor Destroy; override; - property Highlight : Boolean read FHighlight write SetFHighlight; - property HighlightCfg : TExtObject read FHighlightCfg write SetFHighlightCfg; - property HighlightObject : TExtObject read FHighlightObject write SetFHighlightObject; end; - TExtGridFeatureGroupStore = class(TExtUtilObservable) + TExtDataTypesSingleton = class(TExtAbstractComponent) + private + FStripRe : TRegExp; + procedure SetFStripRe(Value : TRegExp); public function JSClassName : string; override; + class function AUTO : TExtObject; + class function BOOL : TExtObject; + class function BOOLEAN : TExtObject; + class function DATE : TExtObject; + class function FLOAT : TExtObject; + class function INT : TExtObject; + class function INTEGER : TExtObject; + class function NUMBER : TExtObject; + class function STRINGJS : TExtObject; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + property StripRe : TRegExp read FStripRe write SetFStripRe; end; - TExtFxTargetSprite = class(TExtFxTarget) + TExtDdRegistrySingleton = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function GetHandle(Id : String) : TExtFunction; overload; + function GetHandleFromEvent(E : TEvent) : TExtFunction; + function GetTarget(Id : String) : TExtFunction; overload; + function GetTargetFromEvent(E : TEvent) : TExtFunction; + function Register(Element : String; Data : TExtObject; DataHandles : TExtObjectList; DataIsHandle : Boolean) : TExtFunction; overload; + function Unregister(Element : String) : TExtFunction; overload; end; - TExtChartAxis = class(TExtChartAxisAbstract) + // Procedural types for events TExtDdDragTracker + TExtDdDragTrackerOnBeforestart = procedure(This : TExtDdDragTracker; E : TExtObject) of object; + TExtDdDragTrackerOnDrag = procedure(This : TExtDdDragTracker; E : TExtObject) of object; + TExtDdDragTrackerOnDragend = procedure(This : TExtDdDragTracker; E : TExtObject) of object; + TExtDdDragTrackerOnDragstart = procedure(This : TExtDdDragTracker; E : TExtObject) of object; + TExtDdDragTrackerOnMousedown = procedure(This : TExtDdDragTracker; E : TExtObject) of object; + TExtDdDragTrackerOnMousemove = procedure(This : TExtDdDragTracker; E : TExtObject) of object; + TExtDdDragTrackerOnMouseout = procedure(This : TExtDdDragTracker; E : TExtObject) of object; + TExtDdDragTrackerOnMouseover = procedure(This : TExtDdDragTracker; E : TExtObject; Target : THTMLElement) of object; + TExtDdDragTrackerOnMouseup = procedure(This : TExtDdDragTracker; E : TExtObject) of object; + + TExtDdDragTracker = class(TExtAbstractComponent) private - FAdjustEnd : Boolean; - FDashSize : Integer; - FGrid : Boolean; - FGridObject : TExtObject; - FLength : Integer; - FMajorTickSteps : Integer; - FMinorTickSteps : Integer; - FPosition : String; - FTitle : String; - FWidth : Integer; - procedure SetFAdjustEnd(Value : Boolean); - procedure SetFDashSize(Value : Integer); - procedure SetFGrid(Value : Boolean); - procedure SetFGridObject(Value : TExtObject); - procedure SetFLength(Value : Integer); - procedure SetFMajorTickSteps(Value : Integer); - procedure SetFMinorTickSteps(Value : Integer); - procedure SetFPosition(Value : String); - procedure SetFTitle(Value : String); - procedure SetFWidth(Value : Integer); - protected - procedure InitDefaults; override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + FActive : Boolean; + FAutoStart : Boolean; + FAutoStartInteger : Integer; + FConstrainTo : TExtUtilRegion; + FConstrainToElement : TExtElement; + FDelegate : String; + FDragTarget : THTMLElement; + FHasListeners : TExtObject; + FIsObservable : Boolean; + FListeners : TExtObject; + FOverCls : String; + FPreventDefault : Boolean; + FStopEvent : Boolean; + FTolerance : Integer; + FTrackOver : Boolean; + FOnBeforestart : TExtDdDragTrackerOnBeforestart; + FOnDrag : TExtDdDragTrackerOnDrag; + FOnDragend : TExtDdDragTrackerOnDragend; + FOnDragstart : TExtDdDragTrackerOnDragstart; + FOnMousedown : TExtDdDragTrackerOnMousedown; + FOnMousemove : TExtDdDragTrackerOnMousemove; + FOnMouseout : TExtDdDragTrackerOnMouseout; + FOnMouseover : TExtDdDragTrackerOnMouseover; + FOnMouseup : TExtDdDragTrackerOnMouseup; + procedure SetFActive(Value : Boolean); + procedure SetFAutoStart(Value : Boolean); + procedure SetFAutoStartInteger(Value : Integer); + procedure SetFConstrainTo(Value : TExtUtilRegion); + procedure SetFConstrainToElement(Value : TExtElement); + procedure SetFDelegate(Value : String); + procedure SetFDragTarget(Value : THTMLElement); + procedure SetFHasListeners(Value : TExtObject); + procedure SetFIsObservable(Value : Boolean); + procedure SetFListeners(Value : TExtObject); + procedure SetFOverCls(Value : String); + procedure SetFPreventDefault(Value : Boolean); + procedure SetFStopEvent(Value : Boolean); + procedure SetFTolerance(Value : Integer); + procedure SetFTrackOver(Value : Boolean); + procedure SetFOnBeforestart(Value : TExtDdDragTrackerOnBeforestart); + procedure SetFOnDrag(Value : TExtDdDragTrackerOnDrag); + procedure SetFOnDragend(Value : TExtDdDragTrackerOnDragend); + procedure SetFOnDragstart(Value : TExtDdDragTrackerOnDragstart); + procedure SetFOnMousedown(Value : TExtDdDragTrackerOnMousedown); + procedure SetFOnMousemove(Value : TExtDdDragTrackerOnMousemove); + procedure SetFOnMouseout(Value : TExtDdDragTrackerOnMouseout); + procedure SetFOnMouseover(Value : TExtDdDragTrackerOnMouseover); + procedure SetFOnMouseup(Value : TExtDdDragTrackerOnMouseup); + protected + procedure InitDefaults; override; + procedure HandleEvent(const AEvtName: string); override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function AddEvents(EventNames : String) : TExtFunction; overload; + function AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; overload; + function AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; overload; + function ClearListeners : TExtFunction; + function ClearManagedListeners : TExtFunction; constructor Create; - function DrawAxis : TExtFunction; - function DrawGrid : TExtFunction; - function DrawLabel : TExtFunction; - function SetTitle(Title : String) : TExtFunction; + function EnableBubble(EventNames : String) : TExtFunction; overload; + function FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; + function FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; + function GetDragTarget : TExtFunction; + function GetOffset(ConstrainMode : String = '') : TExtFunction; + function HasListener(EventName : String) : TExtFunction; + function InitEl(El : TExtElement) : TExtFunction; overload; + function RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; + function RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; + function RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; overload; + function ResumeEvent(EventName : String) : TExtFunction; + function ResumeEvents : TExtFunction; + function SuspendEvent(EventName : String) : TExtFunction; + function SuspendEvents(QueueSuspended : Boolean) : TExtFunction; destructor Destroy; override; - property AdjustEnd : Boolean read FAdjustEnd write SetFAdjustEnd; - property DashSize : Integer read FDashSize write SetFDashSize; - property Grid : Boolean read FGrid write SetFGrid; - property GridObject : TExtObject read FGridObject write SetFGridObject; - property Length : Integer read FLength write SetFLength; - property MajorTickSteps : Integer read FMajorTickSteps write SetFMajorTickSteps; - property MinorTickSteps : Integer read FMinorTickSteps write SetFMinorTickSteps; - property Position : String read FPosition write SetFPosition; - property Title : String read FTitle write SetFTitle; - property Width : Integer read FWidth write SetFWidth; + property Active : Boolean read FActive write SetFActive; + property AutoStart : Boolean read FAutoStart write SetFAutoStart; + property AutoStartInteger : Integer read FAutoStartInteger write SetFAutoStartInteger; + property ConstrainTo : TExtUtilRegion read FConstrainTo write SetFConstrainTo; + property ConstrainToElement : TExtElement read FConstrainToElement write SetFConstrainToElement; + property Delegate : String read FDelegate write SetFDelegate; + property DragTarget : THTMLElement read FDragTarget write SetFDragTarget; + property HasListeners : TExtObject read FHasListeners write SetFHasListeners; + property IsObservable : Boolean read FIsObservable write SetFIsObservable; + property Listeners : TExtObject read FListeners write SetFListeners; + property OverCls : String read FOverCls write SetFOverCls; + property PreventDefault : Boolean read FPreventDefault write SetFPreventDefault; + property StopEvent : Boolean read FStopEvent write SetFStopEvent; + property Tolerance : Integer read FTolerance write SetFTolerance; + property TrackOver : Boolean read FTrackOver write SetFTrackOver; + property OnBeforestart : TExtDdDragTrackerOnBeforestart read FOnBeforestart write SetFOnBeforestart; + property OnDrag : TExtDdDragTrackerOnDrag read FOnDrag write SetFOnDrag; + property OnDragend : TExtDdDragTrackerOnDragend read FOnDragend write SetFOnDragend; + property OnDragstart : TExtDdDragTrackerOnDragstart read FOnDragstart write SetFOnDragstart; + property OnMousedown : TExtDdDragTrackerOnMousedown read FOnMousedown write SetFOnMousedown; + property OnMousemove : TExtDdDragTrackerOnMousemove read FOnMousemove write SetFOnMousemove; + property OnMouseout : TExtDdDragTrackerOnMouseout read FOnMouseout write SetFOnMouseout; + property OnMouseover : TExtDdDragTrackerOnMouseover read FOnMouseover write SetFOnMouseover; + property OnMouseup : TExtDdDragTrackerOnMouseup read FOnMouseup write SetFOnMouseup; end; - TExtLayoutContainer = class(TExtLayout) + TExtDiagLayoutContextItem = class(TExtAbstractComponent) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + + TExtDdDragDropManagerSingleton = class(TExtAbstractComponent) private - FItemCls : String; - FOverflowPadderEl : TExtElement; - procedure SetFItemCls(Value : String); - procedure SetFOverflowPadderEl(Value : TExtElement); + FClickPixelThresh : Integer; + FClickTimeThresh : Integer; + FDragCls : String; + FLocationCache : TExtObject; + FMode : Integer; + FNotifyOccluded : Boolean; + FPreventDefault : Boolean; + FStopPropagation : Boolean; + FUseCache : Boolean; + procedure SetFClickPixelThresh(Value : Integer); + procedure SetFClickTimeThresh(Value : Integer); + procedure SetFDragCls(Value : String); + procedure SetFLocationCache(Value : TExtObject); + procedure SetFMode(Value : Integer); + procedure SetFNotifyOccluded(Value : Boolean); + procedure SetFPreventDefault(Value : Boolean); + procedure SetFStopPropagation(Value : Boolean); + procedure SetFUseCache(Value : Boolean); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + class function INTERSECT : Integer; + class function POINT : Integer; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function GetBestMatch(Dds : TExtObjectList) : TExtFunction; + function GetCss(Id : String) : TExtFunction; + function GetDDById(Id : String) : TExtFunction; + function GetLocation(ODD : TExtDdDragDrop) : TExtFunction; + function GetPosY(El : THTMLElement) : TExtFunction; + function GetRelated(P_oDD : TExtDdDragDrop; BTargetsOnly : Boolean) : TExtFunction; + function GetScrollLeft : TExtFunction; + function GetScrollTop : TExtFunction; + function GetStyle(El : THTMLElement; Param : String) : TExtFunction; + function HandleWasClicked(Node : THTMLElement) : TExtFunction; + function IsDragDrop(Id : String) : TExtFunction; + function IsHandle(Id : String) : TExtFunction; + function IsLegalTarget(ODD : TExtDdDragDrop; OTargetDD : TExtDdDragDrop) : TExtFunction; + function IsTypeOfDD(The : TExtObject) : TExtFunction; + function MoveToEl(MoveEl : THTMLElement; TargetEl : THTMLElement) : TExtFunction; + function NumericSort(A : Integer; B : Integer) : TExtFunction; + function RefreshCache(Groups : TExtObject) : TExtFunction; + function RegDragDrop(ODD : TExtDdDragDrop; SGroup : String) : TExtFunction; + function RegHandle(SDDId : String; SHandleId : String) : TExtFunction; + function StartDrag(X : Integer; Y : Integer) : TExtFunction; + function StopEvent(E : TEvent) : TExtFunction; + function SwapNode(N1 : THTMLElement; N2 : THTMLElement) : TExtFunction; + function VerifyEl(El : THTMLElement) : TExtFunction; + destructor Destroy; override; + property ClickPixelThresh : Integer read FClickPixelThresh write SetFClickPixelThresh; + property ClickTimeThresh : Integer read FClickTimeThresh write SetFClickTimeThresh; + property DragCls : String read FDragCls write SetFDragCls; + property LocationCache : TExtObject read FLocationCache write SetFLocationCache; + property Mode : Integer read FMode write SetFMode; + property NotifyOccluded : Boolean read FNotifyOccluded write SetFNotifyOccluded; + property PreventDefault : Boolean read FPreventDefault write SetFPreventDefault; + property StopPropagation : Boolean read FStopPropagation write SetFStopPropagation; + property UseCache : Boolean read FUseCache write SetFUseCache; + end; + + TExtGridPluginBufferedRenderer = class(TExtAbstractPlugin) + private + FPosition : Integer; + FSynchronousRender : Boolean; + FVariableRowHeight : Boolean; + procedure SetFPosition(Value : Integer); + procedure SetFSynchronousRender(Value : Boolean); + procedure SetFVariableRowHeight(Value : Boolean); + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function ScrollTo(RecordIdx : Integer; DoSelect : Boolean; Callback : TExtFunction; CallbackRecordIdx : Integer; CallbackRecord : TExtDataModel; Scope : TExtObject) : TExtFunction; + property Position : Integer read FPosition write SetFPosition; + property SynchronousRender : Boolean read FSynchronousRender write SetFSynchronousRender; + property VariableRowHeight : Boolean read FVariableRowHeight write SetFVariableRowHeight; + end; + + TExtModelManagerSingleton = class(TExtAbstractManager) + private + FAssociationStack : TExtObjectList; + procedure SetFAssociationStack(Value : TExtObjectList); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function GetModel(Id : String) : TExtFunction; overload; + destructor Destroy; override; + property AssociationStack : TExtObjectList read FAssociationStack write SetFAssociationStack; + end; + + TExtChartSeriesCartesian = class(TExtChartSeries) + private + FAxis : String; + FAxisList : TExtObjectList; + FXField : String; + FYField : String; + FYFieldList : TExtObjectList; + procedure SetFAxis(Value : String); + procedure SetFAxisList(Value : TExtObjectList); + procedure SetFXField(Value : String); + procedure SetFYField(Value : String); + procedure SetFYFieldList(Value : TExtObjectList); protected procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function AddChildEls : TExtFunction; - function BeginLayout : TExtFunction; constructor Create; - function GetElementTarget : TExtFunction; - function GetLayoutItems : TExtFunction; - function GetRenderTarget : TExtFunction; - function GetTarget : TExtFunction; - function RemoveChildEls(TestFn : TExtFunction) : TExtFunction; + function GetMinMaxXValues : TExtFunction; + function GetMinMaxYValues : TExtFunction; destructor Destroy; override; - property ItemCls : String read FItemCls write SetFItemCls; - property OverflowPadderEl : TExtElement read FOverflowPadderEl write SetFOverflowPadderEl; + property Axis : String read FAxis write SetFAxis; + property AxisList : TExtObjectList read FAxisList write SetFAxisList; + property XField : String read FXField write SetFXField; + property YField : String read FYField write SetFYField; + property YFieldList : TExtObjectList read FYFieldList write SetFYFieldList; end; - TExtMenuKeyNav = class(TExtUtilKeyNav) + TExtGridPluginHeaderReorderer = class(TExtAbstractPlugin) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtUtilLruCache = class(TExtUtilHashMap) + TExtGridPluginHeaderResizer = class(TExtAbstractPlugin) private - FMaxSize : Integer; - procedure SetFMaxSize(Value : Integer); + FDynamic : Boolean; + procedure SetFDynamic(Value : Boolean); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Clone : TExtFunction; - function Each(Fn : TExtFunction; Scope : TExtObject; Reverse : Boolean = false) : TExtFunction; - function Prune : TExtFunction; - property MaxSize : Integer read FMaxSize write SetFMaxSize; + property Dynamic : Boolean read FDynamic write SetFDynamic; + end; + + // Procedural types for events TExtGridPluginRowExpander + TExtGridPluginRowExpanderOnCollapsebody = procedure(RowNode : THTMLElement; RecordJS : TExtDataModel; ExpandRow : THTMLElement) of object; + TExtGridPluginRowExpanderOnExpandbody = procedure(RowNode : THTMLElement; RecordJS : TExtDataModel; ExpandRow : THTMLElement) of object; + + TExtGridPluginRowExpander = class(TExtAbstractPlugin) + private + FExpandOnDblClick : Boolean; + FExpandOnEnter : Boolean; + FSelectRowOnExpand : Boolean; + FOnCollapsebody : TExtGridPluginRowExpanderOnCollapsebody; + FOnExpandbody : TExtGridPluginRowExpanderOnExpandbody; + procedure SetFExpandOnDblClick(Value : Boolean); + procedure SetFExpandOnEnter(Value : Boolean); + procedure SetFSelectRowOnExpand(Value : Boolean); + procedure SetFOnCollapsebody(Value : TExtGridPluginRowExpanderOnCollapsebody); + procedure SetFOnExpandbody(Value : TExtGridPluginRowExpanderOnExpandbody); + protected + procedure HandleEvent(const AEvtName: string); override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + property ExpandOnDblClick : Boolean read FExpandOnDblClick write SetFExpandOnDblClick; + property ExpandOnEnter : Boolean read FExpandOnEnter write SetFExpandOnEnter; + property SelectRowOnExpand : Boolean read FSelectRowOnExpand write SetFSelectRowOnExpand; + property OnCollapsebody : TExtGridPluginRowExpanderOnCollapsebody read FOnCollapsebody write SetFOnCollapsebody; + property OnExpandbody : TExtGridPluginRowExpanderOnExpandbody read FOnExpandbody write SetFOnExpandbody; + end; + + TExtGridPluginDivRenderer = class(TExtAbstractPlugin) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + + TExtGridPluginDragDrop = class(TExtAbstractPlugin) + private + FContainerScroll : TExtObject; + FContainerScrollBoolean : Boolean; + FDdGroup : String; + FDragGroup : String; + FDropGroup : String; + FEnableDrag : Boolean; + FEnableDrop : Boolean; + procedure SetFContainerScroll(Value : TExtObject); + procedure SetFContainerScrollBoolean(Value : Boolean); + procedure SetFDdGroup(Value : String); + procedure SetFDragGroup(Value : String); + procedure SetFDropGroup(Value : String); + procedure SetFEnableDrag(Value : Boolean); + procedure SetFEnableDrop(Value : Boolean); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; + destructor Destroy; override; + property ContainerScroll : TExtObject read FContainerScroll write SetFContainerScroll; + property ContainerScrollBoolean : Boolean read FContainerScrollBoolean write SetFContainerScrollBoolean; + property DdGroup : String read FDdGroup write SetFDdGroup; + property DragGroup : String read FDragGroup write SetFDragGroup; + property DropGroup : String read FDropGroup write SetFDropGroup; + property EnableDrag : Boolean read FEnableDrag write SetFEnableDrag; + property EnableDrop : Boolean read FEnableDrop write SetFEnableDrop; + end; + + TExtGridPluginEditing = class(TExtAbstractPlugin) + private + FClicksToEdit : Integer; + FEditing : Boolean; + FHasListeners : TExtObject; + FIsObservable : Boolean; + FListeners : TExtObject; + FTriggerEvent : String; + procedure SetFClicksToEdit(Value : Integer); + procedure SetFEditing(Value : Boolean); + procedure SetFHasListeners(Value : TExtObject); + procedure SetFIsObservable(Value : Boolean); + procedure SetFListeners(Value : TExtObject); + procedure SetFTriggerEvent(Value : String); + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function AddEvents(EventNames : String) : TExtFunction; overload; + function AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; overload; + function AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; overload; + function CancelEdit : TExtFunction; + function ClearListeners : TExtFunction; + function ClearManagedListeners : TExtFunction; + function CompleteEdit : TExtFunction; + constructor Create; + function EnableBubble(EventNames : String) : TExtFunction; overload; + function FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; + function FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; + function HasListener(EventName : String) : TExtFunction; + function RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; + function RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; + function RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; overload; + function ResumeEvent(EventName : String) : TExtFunction; + function ResumeEvents : TExtFunction; + function SuspendEvent(EventName : String) : TExtFunction; + function SuspendEvents(QueueSuspended : Boolean) : TExtFunction; + property ClicksToEdit : Integer read FClicksToEdit write SetFClicksToEdit; + property Editing : Boolean read FEditing write SetFEditing; + property HasListeners : TExtObject read FHasListeners write SetFHasListeners; + property IsObservable : Boolean read FIsObservable write SetFIsObservable; + property Listeners : TExtObject read FListeners write SetFListeners; + property TriggerEvent : String read FTriggerEvent write SetFTriggerEvent; + end; + + TExtChartSeriesGauge = class(TExtChartSeries) + private + FAngleField : String; + FDonut : Boolean; + FDonutInteger : Integer; + FHighlightDuration : Integer; + FNeedle : Boolean; + FShowInLegend : Boolean; + FStyle : TExtObject; + procedure SetFAngleField(Value : String); + procedure SetFDonut(Value : Boolean); + procedure SetFDonutInteger(Value : Integer); + procedure SetFHighlightDuration(Value : Integer); + procedure SetFNeedle(Value : Boolean); + procedure SetFShowInLegend(Value : Boolean); + procedure SetFStyle(Value : TExtObject); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; + function DrawSeries : TExtFunction; + function GetLegendColor(Info : TExtObject) : TExtFunction; + function SetValue : TExtFunction; + destructor Destroy; override; + property AngleField : String read FAngleField write SetFAngleField; + property Donut : Boolean read FDonut write SetFDonut; + property DonutInteger : Integer read FDonutInteger write SetFDonutInteger; + property HighlightDuration : Integer read FHighlightDuration write SetFHighlightDuration; + property Needle : Boolean read FNeedle write SetFNeedle; + property ShowInLegend : Boolean read FShowInLegend write SetFShowInLegend; + property Style : TExtObject read FStyle write SetFStyle; + end; + + // Procedural types for events TExtPickerMonth + TExtPickerMonthOnCancelclick = procedure(This : TExtPickerMonth) of object; + TExtPickerMonthOnMonthclick = procedure(This : TExtPickerMonth; Value : TExtObjectList) of object; + TExtPickerMonthOnMonthdblclick = procedure(This : TExtPickerMonth; Value : TExtObjectList) of object; + TExtPickerMonthOnOkclick = procedure(This : TExtPickerMonth; Value : TExtObjectList) of object; + TExtPickerMonthOnSelect = procedure(This : TExtPickerMonth; Value : TExtObjectList) of object; + TExtPickerMonthOnYearclick = procedure(This : TExtPickerMonth; Value : TExtObjectList) of object; + TExtPickerMonthOnYeardblclick = procedure(This : TExtPickerMonth; Value : TExtObjectList) of object; + + TExtPickerMonth = class(TExtComponent) + private + FBaseCls : String; + FCancelText : String; + FOkText : String; + FSelectedCls : String; + FShowButtons : Boolean; + FValue : TDateTime; + FValueTArrayOfInteger : TArrayOfInteger; + FOnCancelclick : TExtPickerMonthOnCancelclick; + FOnMonthclick : TExtPickerMonthOnMonthclick; + FOnMonthdblclick : TExtPickerMonthOnMonthdblclick; + FOnOkclick : TExtPickerMonthOnOkclick; + FOnSelect : TExtPickerMonthOnSelect; + FOnYearclick : TExtPickerMonthOnYearclick; + FOnYeardblclick : TExtPickerMonthOnYeardblclick; + procedure SetFBaseCls(Value : String); + procedure SetFCancelText(Value : String); + procedure SetFOkText(Value : String); + procedure SetFSelectedCls(Value : String); + procedure SetFShowButtons(Value : Boolean); + procedure SetFValue(Value : TDateTime); + procedure SetFValueTArrayOfInteger(Value : TArrayOfInteger); + procedure SetFOnCancelclick(Value : TExtPickerMonthOnCancelclick); + procedure SetFOnMonthclick(Value : TExtPickerMonthOnMonthclick); + procedure SetFOnMonthdblclick(Value : TExtPickerMonthOnMonthdblclick); + procedure SetFOnOkclick(Value : TExtPickerMonthOnOkclick); + procedure SetFOnSelect(Value : TExtPickerMonthOnSelect); + procedure SetFOnYearclick(Value : TExtPickerMonthOnYearclick); + procedure SetFOnYeardblclick(Value : TExtPickerMonthOnYeardblclick); + protected + procedure HandleEvent(const AEvtName: string); override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function AdjustYear(Offset : Integer = 0) : TExtFunction; + function GetValue : TExtFunction; + function HasSelection : TExtFunction; + function SetValue(Value : TArrayOfInteger) : TExtFunction; overload; + property BaseCls : String read FBaseCls write SetFBaseCls; + property CancelText : String read FCancelText write SetFCancelText; + property OkText : String read FOkText write SetFOkText; + property SelectedCls : String read FSelectedCls write SetFSelectedCls; + property ShowButtons : Boolean read FShowButtons write SetFShowButtons; + property Value : TDateTime read FValue write SetFValue; + property ValueTArrayOfInteger : TArrayOfInteger read FValueTArrayOfInteger write SetFValueTArrayOfInteger; + property OnCancelclick : TExtPickerMonthOnCancelclick read FOnCancelclick write SetFOnCancelclick; + property OnMonthclick : TExtPickerMonthOnMonthclick read FOnMonthclick write SetFOnMonthclick; + property OnMonthdblclick : TExtPickerMonthOnMonthdblclick read FOnMonthdblclick write SetFOnMonthdblclick; + property OnOkclick : TExtPickerMonthOnOkclick read FOnOkclick write SetFOnOkclick; + property OnSelect : TExtPickerMonthOnSelect read FOnSelect write SetFOnSelect; + property OnYearclick : TExtPickerMonthOnYearclick read FOnYearclick write SetFOnYearclick; + property OnYeardblclick : TExtPickerMonthOnYeardblclick read FOnYeardblclick write SetFOnYeardblclick; end; // Procedural types for events TExtButton @@ -5793,6 +6183,7 @@ TExtButton = class(TExtComponent) FCls : String; FDestroyMenu : Boolean; FDisabled : Boolean; + FDisabled_ : Boolean; FEnableToggle : Boolean; FFocusCls : String; FGlyph : Integer; @@ -5800,11 +6191,13 @@ TExtButton = class(TExtComponent) FHandleMouseEvents : Boolean; FHandler : TExtFunction; FHidden : Boolean; + FHidden_ : Boolean; FHref : String; FHrefTarget : String; FIcon : String; FIconAlign : String; FIconCls : String; + FIsAction : Boolean; FMenu : TExtMenu; FMenu_ : TExtMenu; FMenuActiveCls : String; @@ -5816,6 +6209,7 @@ TExtButton = class(TExtComponent) FOverflowText : String; FParams : TExtObject; FPressed : Boolean; + FPressed_ : Boolean; FPressedCls : String; FPreventDefault : Boolean; FRepeatJS : Boolean; @@ -5824,6 +6218,7 @@ TExtButton = class(TExtComponent) FScope : TExtObject; FShowEmptyMenu : Boolean; FTabIndex : Integer; + FTemplate : TExtTemplate; FText : String; FTextAlign : String; FToggleGroup : String; @@ -5852,6 +6247,7 @@ TExtButton = class(TExtComponent) procedure SetFCls(Value : String); procedure SetFDestroyMenu(Value : Boolean); procedure SetFDisabled(Value : Boolean); + procedure SetFDisabled_(Value : Boolean); procedure SetFEnableToggle(Value : Boolean); procedure SetFFocusCls(Value : String); procedure SetFGlyph(Value : Integer); @@ -5859,11 +6255,13 @@ TExtButton = class(TExtComponent) procedure SetFHandleMouseEvents(Value : Boolean); procedure SetFHandler(Value : TExtFunction); procedure SetFHidden(Value : Boolean); + procedure SetFHidden_(Value : Boolean); procedure SetFHref(Value : String); procedure SetFHrefTarget(Value : String); procedure SetFIcon(Value : String); procedure SetFIconAlign(Value : String); procedure SetFIconCls(Value : String); + procedure SetFIsAction(Value : Boolean); procedure SetFMenu(Value : TExtMenu); procedure SetFMenu_(Value : TExtMenu); procedure SetFMenuActiveCls(Value : String); @@ -5875,6 +6273,7 @@ TExtButton = class(TExtComponent) procedure SetFOverflowText(Value : String); procedure SetFParams(Value : TExtObject); procedure SetFPressed(Value : Boolean); + procedure SetFPressed_(Value : Boolean); procedure SetFPressedCls(Value : String); procedure SetFPreventDefault(Value : Boolean); procedure SetFRepeatJS(Value : Boolean); @@ -5883,6 +6282,7 @@ TExtButton = class(TExtComponent) procedure SetFScope(Value : TExtObject); procedure SetFShowEmptyMenu(Value : Boolean); procedure SetFTabIndex(Value : Integer); + procedure SetFTemplate(Value : TExtTemplate); procedure SetFText(Value : String); procedure SetFTextAlign(Value : String); procedure SetFToggleGroup(Value : String); @@ -5935,6 +6335,7 @@ TExtButton = class(TExtComponent) property Cls : String read FCls write SetFCls; property DestroyMenu : Boolean read FDestroyMenu write SetFDestroyMenu; property Disabled : Boolean read FDisabled write SetFDisabled; + property Disabled_ : Boolean read FDisabled_ write SetFDisabled_; property EnableToggle : Boolean read FEnableToggle write SetFEnableToggle; property FocusCls : String read FFocusCls write SetFFocusCls; property Glyph : Integer read FGlyph write SetFGlyph; @@ -5942,11 +6343,13 @@ TExtButton = class(TExtComponent) property HandleMouseEvents : Boolean read FHandleMouseEvents write SetFHandleMouseEvents; property Handler : TExtFunction read FHandler write SetFHandler; property Hidden : Boolean read FHidden write SetFHidden; + property Hidden_ : Boolean read FHidden_ write SetFHidden_; property Href : String read FHref write SetFHref; property HrefTarget : String read FHrefTarget write SetFHrefTarget; property Icon : String read FIcon write SetFIcon; property IconAlign : String read FIconAlign write SetFIconAlign; property IconCls : String read FIconCls write SetFIconCls; + property IsAction : Boolean read FIsAction write SetFIsAction; property Menu : TExtMenu read FMenu write SetFMenu; property Menu_ : TExtMenu read FMenu_ write SetFMenu_; property MenuActiveCls : String read FMenuActiveCls write SetFMenuActiveCls; @@ -5958,6 +6361,7 @@ TExtButton = class(TExtComponent) property OverflowText : String read FOverflowText write SetFOverflowText; property Params : TExtObject read FParams write SetFParams; property Pressed : Boolean read FPressed write SetFPressed; + property Pressed_ : Boolean read FPressed_ write SetFPressed_; property PressedCls : String read FPressedCls write SetFPressedCls; property PreventDefault : Boolean read FPreventDefault write SetFPreventDefault; property RepeatJS : Boolean read FRepeatJS write SetFRepeatJS; @@ -5966,6 +6370,7 @@ TExtButton = class(TExtComponent) property Scope : TExtObject read FScope write SetFScope; property ShowEmptyMenu : Boolean read FShowEmptyMenu write SetFShowEmptyMenu; property TabIndex : Integer read FTabIndex write SetFTabIndex; + property Template : TExtTemplate read FTemplate write SetFTemplate; property Text : String read FText write SetFText; property TextAlign : String read FTextAlign write SetFTextAlign; property ToggleGroup : String read FToggleGroup write SetFToggleGroup; @@ -5987,121 +6392,7 @@ TExtButton = class(TExtComponent) property OnToggle : TExtButtonOnToggle read FOnToggle write SetFOnToggle; end; - TExtChartSeriesPie = class(TExtChartSeries) - private - FAngleField : String; - FColorSet : TExtObjectList; - FDonut : Boolean; - FDonutInteger : Integer; - FField : String; - FHighlightDuration : Integer; - FLengthField : String; - FShowInLegend : Boolean; - FStyle : TExtObject; - FXField : String; - procedure SetFAngleField(Value : String); - procedure SetFColorSet(Value : TExtObjectList); - procedure SetFDonut(Value : Boolean); - procedure SetFDonutInteger(Value : Integer); - procedure SetFField(Value : String); - procedure SetFHighlightDuration(Value : Integer); - procedure SetFLengthField(Value : String); - procedure SetFShowInLegend(Value : Boolean); - procedure SetFStyle(Value : TExtObject); - procedure SetFXField(Value : String); - protected - procedure InitDefaults; override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - function DrawSeries : TExtFunction; - function GetLegendColor(Info : TExtObject) : TExtFunction; - function HighlightItem(Info : TExtObject) : TExtFunction; - function UnHighlightItem(Info : TExtObject) : TExtFunction; - destructor Destroy; override; - property AngleField : String read FAngleField write SetFAngleField; - property ColorSet : TExtObjectList read FColorSet write SetFColorSet; - property Donut : Boolean read FDonut write SetFDonut; - property DonutInteger : Integer read FDonutInteger write SetFDonutInteger; - property Field : String read FField write SetFField; - property HighlightDuration : Integer read FHighlightDuration write SetFHighlightDuration; - property LengthField : String read FLengthField write SetFLengthField; - property ShowInLegend : Boolean read FShowInLegend write SetFShowInLegend; - property Style : TExtObject read FStyle write SetFStyle; - property XField : String read FXField write SetFXField; - end; - - TExtViewBoundListKeyNav = class(TExtUtilKeyNav) - private - FBoundList : TExtViewBoundList; - procedure SetFBoundList(Value : TExtViewBoundList); - protected - procedure InitDefaults; override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - function HighlightAt(Index : Integer) : TExtFunction; - function SelectHighlighted : TExtFunction; - destructor Destroy; override; - property BoundList : TExtViewBoundList read FBoundList write SetFBoundList; - end; - - TExtChartSeriesRadar = class(TExtChartSeries) - private - FMarkerConfig : TExtObject; - FShowMarkers : Boolean; - FStyle : TExtObject; - FXField : String; - FYField : String; - procedure SetFMarkerConfig(Value : TExtObject); - procedure SetFShowMarkers(Value : Boolean); - procedure SetFStyle(Value : TExtObject); - procedure SetFXField(Value : String); - procedure SetFYField(Value : String); - protected - procedure InitDefaults; override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - function DrawSeries : TExtFunction; - destructor Destroy; override; - property MarkerConfig : TExtObject read FMarkerConfig write SetFMarkerConfig; - property ShowMarkers : Boolean read FShowMarkers write SetFShowMarkers; - property Style : TExtObject read FStyle write SetFStyle; - property XField : String read FXField write SetFXField; - property YField : String read FYField write SetFYField; - end; - - TExtModelManagerSingleton = class(TExtAbstractManager) - private - FAssociationStack : TExtObjectList; - procedure SetFAssociationStack(Value : TExtObjectList); - protected - procedure InitDefaults; override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function GetModel(Id : String) : TExtFunction; overload; - destructor Destroy; override; - property AssociationStack : TExtObjectList read FAssociationStack write SetFAssociationStack; - end; - - TExtGridFeature = class(TExtUtilObservable) - private - FIsFeature : Boolean; - procedure SetFIsFeature(Value : Boolean); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Disable : TExtFunction; - function Enable : TExtFunction; - property IsFeature : Boolean read FIsFeature write SetFIsFeature; - end; - - TExtChartMaskLayer = class(TExtComponent) + TExtGridFeatureGroupStore = class(TExtUtilObservable) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} @@ -6231,142 +6522,341 @@ TExtViewAbstractView = class(TExtComponent) property OnViewready : TExtViewAbstractViewOnViewready read FOnViewready write SetFOnViewready; end; - TExtStateLocalStorageProvider = class(TExtStateProvider) + TExtGridFeature = class(TExtUtilObservable) + private + FIsFeature : Boolean; + procedure SetFIsFeature(Value : Boolean); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function Disable : TExtFunction; + function Enable : TExtFunction; + property IsFeature : Boolean read FIsFeature write SetFIsFeature; end; - TExtUtilTaskManagerSingleton = class(TExtUtilTaskRunner) + TExtChartSeriesRadar = class(TExtChartSeries) + private + FMarkerConfig : TExtObject; + FShowMarkers : Boolean; + FStyle : TExtObject; + FXField : String; + FYField : String; + procedure SetFMarkerConfig(Value : TExtObject); + procedure SetFShowMarkers(Value : Boolean); + procedure SetFStyle(Value : TExtObject); + procedure SetFXField(Value : String); + procedure SetFYField(Value : String); + protected + procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; + function DrawSeries : TExtFunction; + destructor Destroy; override; + property MarkerConfig : TExtObject read FMarkerConfig write SetFMarkerConfig; + property ShowMarkers : Boolean read FShowMarkers write SetFShowMarkers; + property Style : TExtObject read FStyle write SetFStyle; + property XField : String read FXField write SetFXField; + property YField : String read FYField write SetFYField; end; - TExtChartAxisGauge = class(TExtChartAxisAbstract) + // Procedural types for events TExtPickerDate + TExtPickerDateOnSelect = procedure(This : TExtPickerDate; Date : TDateTime) of object; + + TExtPickerDate = class(TExtComponent) private - FMargin : Integer; - FMaximum : Integer; - FMinimum : Integer; - FSteps : Integer; - FTitle : String; - procedure SetFMargin(Value : Integer); - procedure SetFMaximum(Value : Integer); - procedure SetFMinimum(Value : Integer); - procedure SetFSteps(Value : Integer); - procedure SetFTitle(Value : String); + FAriaTitle : String; + FAriaTitleDateFormat : String; + FBaseCls : String; + FDayNames : TExtObjectList; + FDisableAnim : Boolean; + FDisabledCellCls : String; + FDisabledDates : TExtObjectList; + FDisabledDatesRE : TRegExp; + FDisabledDatesText : String; + FDisabledDays : TArrayOfInteger; + FDisabledDaysText : String; + FFocusOnShow : Boolean; + FFormat : String; + FHandler : TExtFunction; + FKeyNavConfig : TExtObject; + FLongDayFormat : String; + FMaxDate : TDateTime; + FMaxText : String; + FMinDate : TDateTime; + FMinText : String; + FMonthNames : TExtObjectList; + FMonthYearFormat : String; + FMonthYearText : String; + FNextText : String; + FPrevText : String; + FScope : TExtObject; + FSelectedCls : String; + FShowToday : Boolean; + FStartDay : Integer; // 0 + FTodayText : String; + FTodayTip : String; + FOnSelect : TExtPickerDateOnSelect; + procedure SetFAriaTitle(Value : String); + procedure SetFAriaTitleDateFormat(Value : String); + procedure SetFBaseCls(Value : String); + procedure SetFDayNames(Value : TExtObjectList); + procedure SetFDisableAnim(Value : Boolean); + procedure SetFDisabledCellCls(Value : String); + procedure SetFDisabledDates(Value : TExtObjectList); + procedure SetFDisabledDatesRE(Value : TRegExp); + procedure SetFDisabledDatesText(Value : String); + procedure SetFDisabledDays(Value : TArrayOfInteger); + procedure SetFDisabledDaysText(Value : String); + procedure SetFFocusOnShow(Value : Boolean); + procedure SetFFormat(Value : String); + procedure SetFHandler(Value : TExtFunction); + procedure SetFKeyNavConfig(Value : TExtObject); + procedure SetFLongDayFormat(Value : String); + procedure SetFMaxDate(Value : TDateTime); + procedure SetFMaxText(Value : String); + procedure SetFMinDate(Value : TDateTime); + procedure SetFMinText(Value : String); + procedure SetFMonthNames(Value : TExtObjectList); + procedure SetFMonthYearFormat(Value : String); + procedure SetFMonthYearText(Value : String); + procedure SetFNextText(Value : String); + procedure SetFPrevText(Value : String); + procedure SetFScope(Value : TExtObject); + procedure SetFSelectedCls(Value : String); + procedure SetFShowToday(Value : Boolean); + procedure SetFStartDay(Value : Integer); + procedure SetFTodayText(Value : String); + procedure SetFTodayTip(Value : String); + procedure SetFOnSelect(Value : TExtPickerDateOnSelect); + protected + procedure InitDefaults; override; + procedure HandleEvent(const AEvtName: string); override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function SetTitle(Title : String) : TExtFunction; - property Margin : Integer read FMargin write SetFMargin; - property Maximum : Integer read FMaximum write SetFMaximum; - property Minimum : Integer read FMinimum write SetFMinimum; - property Steps : Integer read FSteps write SetFSteps; - property Title : String read FTitle write SetFTitle; + constructor Create; + function GetDayInitial : TExtFunction; + function GetValue : TExtFunction; + function HideMonthPicker(Animate : Boolean = false) : TExtFunction; + function SelectToday : TExtFunction; + function SetDisabledDates(DisabledDates : TExtObjectList) : TExtFunction; overload; + function SetDisabledDays(DisabledDays : TArrayOfInteger) : TExtFunction; + function SetMaxDate(Value : TDateTime) : TExtFunction; + function SetMinDate(Value : TDateTime) : TExtFunction; + function SetValue(Value : TDateTime) : TExtFunction; + function ShowMonthPicker(Animate : Boolean = false) : TExtFunction; + function ShowNextMonth(E : TExtObject) : TExtFunction; + function ShowNextYear : TExtFunction; + function ShowPrevMonth(E : TExtObject) : TExtFunction; + function ShowPrevYear : TExtFunction; + destructor Destroy; override; + property AriaTitle : String read FAriaTitle write SetFAriaTitle; + property AriaTitleDateFormat : String read FAriaTitleDateFormat write SetFAriaTitleDateFormat; + property BaseCls : String read FBaseCls write SetFBaseCls; + property DayNames : TExtObjectList read FDayNames write SetFDayNames; + property DisableAnim : Boolean read FDisableAnim write SetFDisableAnim; + property DisabledCellCls : String read FDisabledCellCls write SetFDisabledCellCls; + property DisabledDates : TExtObjectList read FDisabledDates write SetFDisabledDates; + property DisabledDatesRE : TRegExp read FDisabledDatesRE write SetFDisabledDatesRE; + property DisabledDatesText : String read FDisabledDatesText write SetFDisabledDatesText; + property DisabledDays : TArrayOfInteger read FDisabledDays write SetFDisabledDays; + property DisabledDaysText : String read FDisabledDaysText write SetFDisabledDaysText; + property FocusOnShow : Boolean read FFocusOnShow write SetFFocusOnShow; + property Format : String read FFormat write SetFFormat; + property Handler : TExtFunction read FHandler write SetFHandler; + property KeyNavConfig : TExtObject read FKeyNavConfig write SetFKeyNavConfig; + property LongDayFormat : String read FLongDayFormat write SetFLongDayFormat; + property MaxDate : TDateTime read FMaxDate write SetFMaxDate; + property MaxText : String read FMaxText write SetFMaxText; + property MinDate : TDateTime read FMinDate write SetFMinDate; + property MinText : String read FMinText write SetFMinText; + property MonthNames : TExtObjectList read FMonthNames write SetFMonthNames; + property MonthYearFormat : String read FMonthYearFormat write SetFMonthYearFormat; + property MonthYearText : String read FMonthYearText write SetFMonthYearText; + property NextText : String read FNextText write SetFNextText; + property PrevText : String read FPrevText write SetFPrevText; + property Scope : TExtObject read FScope write SetFScope; + property SelectedCls : String read FSelectedCls write SetFSelectedCls; + property ShowToday : Boolean read FShowToday write SetFShowToday; + property StartDay : Integer read FStartDay write SetFStartDay; + property TodayText : String read FTodayText write SetFTodayText; + property TodayTip : String read FTodayTip write SetFTodayTip; + property OnSelect : TExtPickerDateOnSelect read FOnSelect write SetFOnSelect; end; - TExtChartSeriesCartesian = class(TExtChartSeries) + TExtDrawEngineVml = class(TExtDrawSurface) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function AddGradient(Gradient : TExtObject) : TExtFunction; + end; + + // Procedural types for events TExtPanelTool + TExtPanelToolOnClick = procedure(This : TExtPanelTool; E : TExtEventObject) of object; + + TExtPanelTool = class(TExtComponent) private - FAxis : String; - FAxisList : TExtObjectList; + FHandler : TExtFunction; + FIsTool : Boolean; + FScope : TExtObject; + FStopEvent : Boolean; + FTooltip : String; + FTooltipObject : TExtObject; + FTooltipType : String; + FTypeJS : String; + FOnClick : TExtPanelToolOnClick; + procedure SetFHandler(Value : TExtFunction); + procedure SetFIsTool(Value : Boolean); + procedure SetFScope(Value : TExtObject); + procedure SetFStopEvent(Value : Boolean); + procedure SetFTooltip(Value : String); + procedure SetFTooltipObject(Value : TExtObject); + procedure SetFTooltipType(Value : String); + procedure SetFTypeJS(Value : String); + procedure SetFOnClick(Value : TExtPanelToolOnClick); + protected + procedure InitDefaults; override; + procedure HandleEvent(const AEvtName: string); override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; + function SetType(TypeJS : String) : TExtFunction; + destructor Destroy; override; + property Handler : TExtFunction read FHandler write SetFHandler; + property IsTool : Boolean read FIsTool write SetFIsTool; + property Scope : TExtObject read FScope write SetFScope; + property StopEvent : Boolean read FStopEvent write SetFStopEvent; + property Tooltip : String read FTooltip write SetFTooltip; + property TooltipObject : TExtObject read FTooltipObject write SetFTooltipObject; + property TooltipType : String read FTooltipType write SetFTooltipType; + property TypeJS : String read FTypeJS write SetFTypeJS; + property OnClick : TExtPanelToolOnClick read FOnClick write SetFOnClick; + end; + + TExtChartSeriesPie = class(TExtChartSeries) + private + FAngleField : String; + FColorSet : TExtObjectList; + FDonut : Boolean; + FDonutInteger : Integer; + FField : String; + FHighlightDuration : Integer; + FLengthField : String; + FShowInLegend : Boolean; + FStyle : TExtObject; FXField : String; - FYField : String; - FYFieldList : TExtObjectList; - procedure SetFAxis(Value : String); - procedure SetFAxisList(Value : TExtObjectList); + procedure SetFAngleField(Value : String); + procedure SetFColorSet(Value : TExtObjectList); + procedure SetFDonut(Value : Boolean); + procedure SetFDonutInteger(Value : Integer); + procedure SetFField(Value : String); + procedure SetFHighlightDuration(Value : Integer); + procedure SetFLengthField(Value : String); + procedure SetFShowInLegend(Value : Boolean); + procedure SetFStyle(Value : TExtObject); procedure SetFXField(Value : String); - procedure SetFYField(Value : String); - procedure SetFYFieldList(Value : TExtObjectList); protected procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} constructor Create; - function GetMinMaxXValues : TExtFunction; - function GetMinMaxYValues : TExtFunction; + function DrawSeries : TExtFunction; + function GetLegendColor(Info : TExtObject) : TExtFunction; + function HighlightItem(Info : TExtObject) : TExtFunction; + function UnHighlightItem(Info : TExtObject) : TExtFunction; destructor Destroy; override; - property Axis : String read FAxis write SetFAxis; - property AxisList : TExtObjectList read FAxisList write SetFAxisList; + property AngleField : String read FAngleField write SetFAngleField; + property ColorSet : TExtObjectList read FColorSet write SetFColorSet; + property Donut : Boolean read FDonut write SetFDonut; + property DonutInteger : Integer read FDonutInteger write SetFDonutInteger; + property Field : String read FField write SetFField; + property HighlightDuration : Integer read FHighlightDuration write SetFHighlightDuration; + property LengthField : String read FLengthField write SetFLengthField; + property ShowInLegend : Boolean read FShowInLegend write SetFShowInLegend; + property Style : TExtObject read FStyle write SetFStyle; property XField : String read FXField write SetFXField; - property YField : String read FYField write SetFYField; - property YFieldList : TExtObjectList read FYFieldList write SetFYFieldList; end; - TExtDataField = class(TExtDataModel) + // Procedural types for events TExtPickerColor + TExtPickerColorOnSelect = procedure(This : TExtPickerColor; Color : String) of object; + + TExtPickerColor = class(TExtComponent) private - FDateFormat : String; - FDateReadFormat : String; - FDateWriteFormat : String; - FDefaultValue : TExtObject; - FMapping : String; - FMappingInteger : Integer; - FPersist : Boolean; // true - FSerialize : TExtFunction; - FSortDir : String; // 'ASC' - FSortType : TExtFunction; - FSortTypeString : String; - FUseNull : Boolean; - procedure SetFDateFormat(Value : String); - procedure SetFDateReadFormat(Value : String); - procedure SetFDateWriteFormat(Value : String); - procedure SetFDefaultValue(Value : TExtObject); - procedure SetFMapping(Value : String); - procedure SetFMappingInteger(Value : Integer); - procedure SetFPersist(Value : Boolean); - procedure SetFSerialize(Value : TExtFunction); - procedure SetFSortDir(Value : String); - procedure SetFSortType(Value : TExtFunction); - procedure SetFSortTypeString(Value : String); - procedure SetFUseNull(Value : Boolean); + FAllowReselect : Boolean; + FClickEvent : String; + FColors : TExtObjectList; + FComponentCls : String; + FHandler : TExtFunction; + FItemCls : String; + FScope : TExtObject; + FSelectedCls : String; + FValue : String; + FOnSelect : TExtPickerColorOnSelect; + procedure SetFAllowReselect(Value : Boolean); + procedure SetFClickEvent(Value : String); + procedure SetFColors(Value : TExtObjectList); + procedure SetFComponentCls(Value : String); + procedure SetFHandler(Value : TExtFunction); + procedure SetFItemCls(Value : String); + procedure SetFScope(Value : TExtObject); + procedure SetFSelectedCls(Value : String); + procedure SetFValue(Value : String); + procedure SetFOnSelect(Value : TExtPickerColorOnSelect); protected procedure InitDefaults; override; + procedure HandleEvent(const AEvtName: string); override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} constructor Create; + function GetValue : TExtFunction; + function Select(Color : String; SuppressEvent : Boolean = false) : TExtFunction; destructor Destroy; override; - property DateFormat : String read FDateFormat write SetFDateFormat; - property DateReadFormat : String read FDateReadFormat write SetFDateReadFormat; - property DateWriteFormat : String read FDateWriteFormat write SetFDateWriteFormat; - property DefaultValue : TExtObject read FDefaultValue write SetFDefaultValue; - property Mapping : String read FMapping write SetFMapping; - property MappingInteger : Integer read FMappingInteger write SetFMappingInteger; - property Persist : Boolean read FPersist write SetFPersist; - property Serialize : TExtFunction read FSerialize write SetFSerialize; - property SortDir : String read FSortDir write SetFSortDir; - property SortType : TExtFunction read FSortType write SetFSortType; - property SortTypeString : String read FSortTypeString write SetFSortTypeString; - property UseNull : Boolean read FUseNull write SetFUseNull; + property AllowReselect : Boolean read FAllowReselect write SetFAllowReselect; + property ClickEvent : String read FClickEvent write SetFClickEvent; + property Colors : TExtObjectList read FColors write SetFColors; + property ComponentCls : String read FComponentCls write SetFComponentCls; + property Handler : TExtFunction read FHandler write SetFHandler; + property ItemCls : String read FItemCls write SetFItemCls; + property Scope : TExtObject read FScope write SetFScope; + property SelectedCls : String read FSelectedCls write SetFSelectedCls; + property Value : String read FValue write SetFValue; + property OnSelect : TExtPickerColorOnSelect read FOnSelect write SetFOnSelect; end; - // Procedural types for events TExtGridPluginRowExpander - TExtGridPluginRowExpanderOnCollapsebody = procedure(RowNode : THTMLElement; RecordJS : TExtDataModel; ExpandRow : THTMLElement) of object; - TExtGridPluginRowExpanderOnExpandbody = procedure(RowNode : THTMLElement; RecordJS : TExtDataModel; ExpandRow : THTMLElement) of object; + TExtDdDD = class(TExtDdDragDrop) + private + FScroll : Boolean; + procedure SetFScroll(Value : Boolean); + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function AlignElWithMouse(El : THTMLElement; IPageX : Integer; IPageY : Integer) : TExtFunction; + function ApplyConfig : TExtFunction; + function AutoOffset(IPageX : Integer; IPageY : Integer) : TExtFunction; + function B4Drag : TExtFunction; + function B4MouseDown : TExtFunction; + function CachePosition(IPageX : Integer = 0; IPageY : Integer = 0) : TExtFunction; + function SetDelta(IDeltaX : Integer; IDeltaY : Integer) : TExtFunction; + function SetDragElPos(IPageX : Integer; IPageY : Integer) : TExtFunction; + property Scroll : Boolean read FScroll write SetFScroll; + end; - TExtGridPluginRowExpander = class(TExtAbstractPlugin) + TExtUtilLruCache = class(TExtUtilHashMap) private - FExpandOnDblClick : Boolean; - FExpandOnEnter : Boolean; - FSelectRowOnExpand : Boolean; - FOnCollapsebody : TExtGridPluginRowExpanderOnCollapsebody; - FOnExpandbody : TExtGridPluginRowExpanderOnExpandbody; - procedure SetFExpandOnDblClick(Value : Boolean); - procedure SetFExpandOnEnter(Value : Boolean); - procedure SetFSelectRowOnExpand(Value : Boolean); - procedure SetFOnCollapsebody(Value : TExtGridPluginRowExpanderOnCollapsebody); - procedure SetFOnExpandbody(Value : TExtGridPluginRowExpanderOnExpandbody); - protected - procedure HandleEvent(const AEvtName: string); override; + FMaxSize : Integer; + procedure SetFMaxSize(Value : Integer); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - property ExpandOnDblClick : Boolean read FExpandOnDblClick write SetFExpandOnDblClick; - property ExpandOnEnter : Boolean read FExpandOnEnter write SetFExpandOnEnter; - property SelectRowOnExpand : Boolean read FSelectRowOnExpand write SetFSelectRowOnExpand; - property OnCollapsebody : TExtGridPluginRowExpanderOnCollapsebody read FOnCollapsebody write SetFOnCollapsebody; - property OnExpandbody : TExtGridPluginRowExpanderOnExpandbody read FOnExpandbody write SetFOnExpandbody; + function Clone : TExtFunction; + function Each(Fn : TExtFunction; Scope : TExtObject; Reverse : Boolean = false) : TExtFunction; + function Prune : TExtFunction; + property MaxSize : Integer read FMaxSize write SetFMaxSize; end; TExtGridProperty = class(TExtDataModel) @@ -6375,77 +6865,10 @@ TExtGridProperty = class(TExtDataModel) {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - // Procedural types for events TExtLayoutContainerBoxOverflowScroller - TExtLayoutContainerBoxOverflowScrollerOnScroll = procedure(Scroller : TExtLayoutContainerBoxOverflowScroller; NewPosition : Integer; Animate : Boolean) of object; - - TExtLayoutContainerBoxOverflowScroller = class(TExtLayoutContainerBoxOverflowNone) - private - FAfterCtCls : String; - FAfterScrollerCls : String; - FAnimateScroll : Boolean; - FBeforeCtCls : String; - FBeforeScrollerCls : String; - FHasListeners : TExtObject; - FIsObservable : Boolean; - FListeners : TExtObject; - FScrollDuration : Integer; - FScrollerCls : String; - FScrollIncrement : Integer; - FScrollRepeatInterval : Integer; - FWheelIncrement : Integer; - FOnScroll : TExtLayoutContainerBoxOverflowScrollerOnScroll; - procedure SetFAfterCtCls(Value : String); - procedure SetFAfterScrollerCls(Value : String); - procedure SetFAnimateScroll(Value : Boolean); - procedure SetFBeforeCtCls(Value : String); - procedure SetFBeforeScrollerCls(Value : String); - procedure SetFHasListeners(Value : TExtObject); - procedure SetFIsObservable(Value : Boolean); - procedure SetFListeners(Value : TExtObject); - procedure SetFScrollDuration(Value : Integer); - procedure SetFScrollerCls(Value : String); - procedure SetFScrollIncrement(Value : Integer); - procedure SetFScrollRepeatInterval(Value : Integer); - procedure SetFWheelIncrement(Value : Integer); - procedure SetFOnScroll(Value : TExtLayoutContainerBoxOverflowScrollerOnScroll); - protected - procedure HandleEvent(const AEvtName: string); override; + TExtDataGroup = class(TExtUtilObservable) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function AddEvents(EventNames : String) : TExtFunction; overload; - function AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; overload; - function AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; overload; - function ClearListeners : TExtFunction; - function ClearManagedListeners : TExtFunction; - constructor Create; - function EnableBubble(EventNames : String) : TExtFunction; overload; - function FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; - function FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; - function GetScrollPosition : TExtFunction; - function HasListener(EventName : String) : TExtFunction; - function RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; - function RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; - function RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; overload; - function ResumeEvent(EventName : String) : TExtFunction; - function ResumeEvents : TExtFunction; - function ScrollToItem(Item : Integer; Animate : Boolean) : TExtFunction; overload; - function SuspendEvent(EventName : String) : TExtFunction; - function SuspendEvents(QueueSuspended : Boolean) : TExtFunction; - property AfterCtCls : String read FAfterCtCls write SetFAfterCtCls; - property AfterScrollerCls : String read FAfterScrollerCls write SetFAfterScrollerCls; - property AnimateScroll : Boolean read FAnimateScroll write SetFAnimateScroll; - property BeforeCtCls : String read FBeforeCtCls write SetFBeforeCtCls; - property BeforeScrollerCls : String read FBeforeScrollerCls write SetFBeforeScrollerCls; - property HasListeners : TExtObject read FHasListeners write SetFHasListeners; - property IsObservable : Boolean read FIsObservable write SetFIsObservable; - property Listeners : TExtObject read FListeners write SetFListeners; - property ScrollDuration : Integer read FScrollDuration write SetFScrollDuration; - property ScrollerCls : String read FScrollerCls write SetFScrollerCls; - property ScrollIncrement : Integer read FScrollIncrement write SetFScrollIncrement; - property ScrollRepeatInterval : Integer read FScrollRepeatInterval write SetFScrollRepeatInterval; - property WheelIncrement : Integer read FWheelIncrement write SetFWheelIncrement; - property OnScroll : TExtLayoutContainerBoxOverflowScrollerOnScroll read FOnScroll write SetFOnScroll; end; // Enumerated types for properties @@ -6456,13 +6879,18 @@ TExtSelectionModel = class(TExtUtilObservable) FAllowDeselect : Boolean; FMode : TModeEnum; FPruneRemoved : Boolean; + FSelected : TExtObjectList; procedure SetFAllowDeselect(Value : Boolean); procedure SetFMode(Value : TModeEnum); procedure SetFPruneRemoved(Value : Boolean); + procedure SetFSelected(Value : TExtObjectList); + protected + procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} function BindStore(Store : String = '') : TExtFunction; overload; + constructor Create; function Deselect(Records : Integer; SuppressEvent : Boolean = false) : TExtFunction; overload; function DeselectAll(SuppressEvent : Boolean = false) : TExtFunction; function DeselectRange(StartRow : Integer; EndRow : Integer) : TExtFunction; overload; @@ -6482,17 +6910,290 @@ TExtSelectionModel = class(TExtUtilObservable) function SetLastFocused(RecordJS : TExtDataModel) : TExtFunction; function SetLocked(Locked : Boolean) : TExtFunction; function SetSelectionMode(SelMode : String) : TExtFunction; + destructor Destroy; override; property AllowDeselect : Boolean read FAllowDeselect write SetFAllowDeselect; property Mode : TModeEnum read FMode write SetFMode; property PruneRemoved : Boolean read FPruneRemoved write SetFPruneRemoved; + property Selected : TExtObjectList read FSelected write SetFSelected; end; - TExtLayoutComponent = class(TExtLayout) + // Procedural types for events TExtDomElement + TExtDomElementOnAbort = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnBlur = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnChange = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnClick = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnContextmenu = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnDblclick = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnDOMActivate = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnDOMAttrModified = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnDOMCharacterDataModified = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnDOMFocusIn = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnDOMFocusOut = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnDOMNodeInserted = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnDOMNodeInsertedIntoDocument = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnDOMNodeRemoved = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnDOMNodeRemovedFromDocument = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnDOMSubtreeModified = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnError = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnFocus = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnKeydown = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnKeypress = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnKeyup = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnLoad = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnMousedown = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnMouseenter = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnMouseleave = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnMousemove = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnMouseout = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnMouseover = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnMouseup = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnReset = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnResize = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnScroll = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnSelect = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnSubmit = procedure(E : TExtEventObject; T : THTMLElement) of object; + TExtDomElementOnUnload = procedure(E : TExtEventObject; T : THTMLElement) of object; + + TExtDomElement = class(TExtDomAbstractElement) + private + FAutoBoxAdjust : Boolean; + FOnAbort : TExtDomElementOnAbort; + FOnBlur : TExtDomElementOnBlur; + FOnChange : TExtDomElementOnChange; + FOnClick : TExtDomElementOnClick; + FOnContextmenu : TExtDomElementOnContextmenu; + FOnDblclick : TExtDomElementOnDblclick; + FOnDOMActivate : TExtDomElementOnDOMActivate; + FOnDOMAttrModified : TExtDomElementOnDOMAttrModified; + FOnDOMCharacterDataModified : TExtDomElementOnDOMCharacterDataModified; + FOnDOMFocusIn : TExtDomElementOnDOMFocusIn; + FOnDOMFocusOut : TExtDomElementOnDOMFocusOut; + FOnDOMNodeInserted : TExtDomElementOnDOMNodeInserted; + FOnDOMNodeInsertedIntoDocument : TExtDomElementOnDOMNodeInsertedIntoDocument; + FOnDOMNodeRemoved : TExtDomElementOnDOMNodeRemoved; + FOnDOMNodeRemovedFromDocument : TExtDomElementOnDOMNodeRemovedFromDocument; + FOnDOMSubtreeModified : TExtDomElementOnDOMSubtreeModified; + FOnError : TExtDomElementOnError; + FOnFocus : TExtDomElementOnFocus; + FOnKeydown : TExtDomElementOnKeydown; + FOnKeypress : TExtDomElementOnKeypress; + FOnKeyup : TExtDomElementOnKeyup; + FOnLoad : TExtDomElementOnLoad; + FOnMousedown : TExtDomElementOnMousedown; + FOnMouseenter : TExtDomElementOnMouseenter; + FOnMouseleave : TExtDomElementOnMouseleave; + FOnMousemove : TExtDomElementOnMousemove; + FOnMouseout : TExtDomElementOnMouseout; + FOnMouseover : TExtDomElementOnMouseover; + FOnMouseup : TExtDomElementOnMouseup; + FOnReset : TExtDomElementOnReset; + FOnResize : TExtDomElementOnResize; + FOnScroll : TExtDomElementOnScroll; + FOnSelect : TExtDomElementOnSelect; + FOnSubmit : TExtDomElementOnSubmit; + FOnUnload : TExtDomElementOnUnload; + procedure SetFAutoBoxAdjust(Value : Boolean); + procedure SetFOnAbort(Value : TExtDomElementOnAbort); + procedure SetFOnBlur(Value : TExtDomElementOnBlur); + procedure SetFOnChange(Value : TExtDomElementOnChange); + procedure SetFOnClick(Value : TExtDomElementOnClick); + procedure SetFOnContextmenu(Value : TExtDomElementOnContextmenu); + procedure SetFOnDblclick(Value : TExtDomElementOnDblclick); + procedure SetFOnDOMActivate(Value : TExtDomElementOnDOMActivate); + procedure SetFOnDOMAttrModified(Value : TExtDomElementOnDOMAttrModified); + procedure SetFOnDOMCharacterDataModified(Value : TExtDomElementOnDOMCharacterDataModified); + procedure SetFOnDOMFocusIn(Value : TExtDomElementOnDOMFocusIn); + procedure SetFOnDOMFocusOut(Value : TExtDomElementOnDOMFocusOut); + procedure SetFOnDOMNodeInserted(Value : TExtDomElementOnDOMNodeInserted); + procedure SetFOnDOMNodeInsertedIntoDocument(Value : TExtDomElementOnDOMNodeInsertedIntoDocument); + procedure SetFOnDOMNodeRemoved(Value : TExtDomElementOnDOMNodeRemoved); + procedure SetFOnDOMNodeRemovedFromDocument(Value : TExtDomElementOnDOMNodeRemovedFromDocument); + procedure SetFOnDOMSubtreeModified(Value : TExtDomElementOnDOMSubtreeModified); + procedure SetFOnError(Value : TExtDomElementOnError); + procedure SetFOnFocus(Value : TExtDomElementOnFocus); + procedure SetFOnKeydown(Value : TExtDomElementOnKeydown); + procedure SetFOnKeypress(Value : TExtDomElementOnKeypress); + procedure SetFOnKeyup(Value : TExtDomElementOnKeyup); + procedure SetFOnLoad(Value : TExtDomElementOnLoad); + procedure SetFOnMousedown(Value : TExtDomElementOnMousedown); + procedure SetFOnMouseenter(Value : TExtDomElementOnMouseenter); + procedure SetFOnMouseleave(Value : TExtDomElementOnMouseleave); + procedure SetFOnMousemove(Value : TExtDomElementOnMousemove); + procedure SetFOnMouseout(Value : TExtDomElementOnMouseout); + procedure SetFOnMouseover(Value : TExtDomElementOnMouseover); + procedure SetFOnMouseup(Value : TExtDomElementOnMouseup); + procedure SetFOnReset(Value : TExtDomElementOnReset); + procedure SetFOnResize(Value : TExtDomElementOnResize); + procedure SetFOnScroll(Value : TExtDomElementOnScroll); + procedure SetFOnSelect(Value : TExtDomElementOnSelect); + procedure SetFOnSubmit(Value : TExtDomElementOnSubmit); + procedure SetFOnUnload(Value : TExtDomElementOnUnload); + protected + procedure HandleEvent(const AEvtName: string); override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function AddKeyListener(Key : Integer; Key_ : Integer; KeyShift : Boolean; KeyCtrl : Boolean; KeyAlt : Boolean; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; overload; + function AddKeyMap(Config : TExtObject) : TExtFunction; + function Clean(ForceReclean : Boolean = false) : TExtFunction; + function CreateProxy(Config : String; RenderTo : String = ''; MatchBox : Boolean = false) : TExtFunction; overload; + function CreateShim : TExtFunction; + function EnableDisplayMode(Display : String = '') : TExtFunction; + function GetLoader : TExtFunction; + function IsDisplayed : TExtFunction; + function IsFocusable : TExtFunction; + function IsMasked : TExtFunction; + function IsVisible(Deep : Boolean = false) : TExtFunction; + function Load : TExtFunction; + function Mask(Msg : String = ''; MsgCls : String = '') : TExtFunction; + function MonitorMouseLeave(Delay : Integer; Handler : TExtFunction; Scope : TExtObject = nil) : TExtFunction; + function NeedsTabIndex : TExtFunction; + function On(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; + function PurgeAllListeners : TExtFunction; + function RelayEvent(EventName : String; Observable : TExtObject) : TExtFunction; + function RemoveAllListeners : TExtFunction; + function SwallowEvent(EventName : String; PreventDefault : Boolean = false) : TExtFunction; overload; + function Un(EventName : String; Fn : TExtFunction; Scope : TExtObject) : TExtFunction; + function Unmask : TExtFunction; + function Update(Html : String; LoadScripts : Boolean = false; Callback : TExtFunction = nil) : TExtFunction; + property AutoBoxAdjust : Boolean read FAutoBoxAdjust write SetFAutoBoxAdjust; + property OnAbort : TExtDomElementOnAbort read FOnAbort write SetFOnAbort; + property OnBlur : TExtDomElementOnBlur read FOnBlur write SetFOnBlur; + property OnChange : TExtDomElementOnChange read FOnChange write SetFOnChange; + property OnClick : TExtDomElementOnClick read FOnClick write SetFOnClick; + property OnContextmenu : TExtDomElementOnContextmenu read FOnContextmenu write SetFOnContextmenu; + property OnDblclick : TExtDomElementOnDblclick read FOnDblclick write SetFOnDblclick; + property OnDOMActivate : TExtDomElementOnDOMActivate read FOnDOMActivate write SetFOnDOMActivate; + property OnDOMAttrModified : TExtDomElementOnDOMAttrModified read FOnDOMAttrModified write SetFOnDOMAttrModified; + property OnDOMCharacterDataModified : TExtDomElementOnDOMCharacterDataModified read FOnDOMCharacterDataModified write SetFOnDOMCharacterDataModified; + property OnDOMFocusIn : TExtDomElementOnDOMFocusIn read FOnDOMFocusIn write SetFOnDOMFocusIn; + property OnDOMFocusOut : TExtDomElementOnDOMFocusOut read FOnDOMFocusOut write SetFOnDOMFocusOut; + property OnDOMNodeInserted : TExtDomElementOnDOMNodeInserted read FOnDOMNodeInserted write SetFOnDOMNodeInserted; + property OnDOMNodeInsertedIntoDocument : TExtDomElementOnDOMNodeInsertedIntoDocument read FOnDOMNodeInsertedIntoDocument write SetFOnDOMNodeInsertedIntoDocument; + property OnDOMNodeRemoved : TExtDomElementOnDOMNodeRemoved read FOnDOMNodeRemoved write SetFOnDOMNodeRemoved; + property OnDOMNodeRemovedFromDocument : TExtDomElementOnDOMNodeRemovedFromDocument read FOnDOMNodeRemovedFromDocument write SetFOnDOMNodeRemovedFromDocument; + property OnDOMSubtreeModified : TExtDomElementOnDOMSubtreeModified read FOnDOMSubtreeModified write SetFOnDOMSubtreeModified; + property OnError : TExtDomElementOnError read FOnError write SetFOnError; + property OnFocus : TExtDomElementOnFocus read FOnFocus write SetFOnFocus; + property OnKeydown : TExtDomElementOnKeydown read FOnKeydown write SetFOnKeydown; + property OnKeypress : TExtDomElementOnKeypress read FOnKeypress write SetFOnKeypress; + property OnKeyup : TExtDomElementOnKeyup read FOnKeyup write SetFOnKeyup; + property OnLoad : TExtDomElementOnLoad read FOnLoad write SetFOnLoad; + property OnMousedown : TExtDomElementOnMousedown read FOnMousedown write SetFOnMousedown; + property OnMouseenter : TExtDomElementOnMouseenter read FOnMouseenter write SetFOnMouseenter; + property OnMouseleave : TExtDomElementOnMouseleave read FOnMouseleave write SetFOnMouseleave; + property OnMousemove : TExtDomElementOnMousemove read FOnMousemove write SetFOnMousemove; + property OnMouseout : TExtDomElementOnMouseout read FOnMouseout write SetFOnMouseout; + property OnMouseover : TExtDomElementOnMouseover read FOnMouseover write SetFOnMouseover; + property OnMouseup : TExtDomElementOnMouseup read FOnMouseup write SetFOnMouseup; + property OnReset : TExtDomElementOnReset read FOnReset write SetFOnReset; + property OnResize : TExtDomElementOnResize read FOnResize write SetFOnResize; + property OnScroll : TExtDomElementOnScroll read FOnScroll write SetFOnScroll; + property OnSelect : TExtDomElementOnSelect read FOnSelect write SetFOnSelect; + property OnSubmit : TExtDomElementOnSubmit read FOnSubmit write SetFOnSubmit; + property OnUnload : TExtDomElementOnUnload read FOnUnload write SetFOnUnload; + end; + + TExtChartAxisGauge = class(TExtChartAxisAbstract) + private + FMargin : Integer; + FMaximum : Integer; + FMinimum : Integer; + FSteps : Integer; + FTitle : String; + procedure SetFMargin(Value : Integer); + procedure SetFMaximum(Value : Integer); + procedure SetFMinimum(Value : Integer); + procedure SetFSteps(Value : Integer); + procedure SetFTitle(Value : String); + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function SetTitle(Title : String) : TExtFunction; + property Margin : Integer read FMargin write SetFMargin; + property Maximum : Integer read FMaximum write SetFMaximum; + property Minimum : Integer read FMinimum write SetFMinimum; + property Steps : Integer read FSteps write SetFSteps; + property Title : String read FTitle write SetFTitle; + end; + + TExtLoadMask = class(TExtComponent) + private + FConstrain : Boolean; + FFixed : Boolean; + FFocusOnToFront : Boolean; + FMaskCls : String; + FMsg : String; + FMsgCls : String; + FShadow : String; + FShadowBoolean : Boolean; + FShadowOffset : Integer; + FStore : TExtDataStore; + FTarget : TExtComponent; + FUseMsg : Boolean; + FUseTargetEl : Boolean; + procedure SetFConstrain(Value : Boolean); + procedure SetFFixed(Value : Boolean); + procedure SetFFocusOnToFront(Value : Boolean); + procedure SetFMaskCls(Value : String); + procedure SetFMsg(Value : String); + procedure SetFMsgCls(Value : String); + procedure SetFShadow(Value : String); + procedure SetFShadowBoolean(Value : Boolean); + procedure SetFShadowOffset(Value : Integer); + procedure SetFStore(Value : TExtDataStore); + procedure SetFTarget(Value : TExtComponent); + procedure SetFUseMsg(Value : Boolean); + procedure SetFUseTargetEl(Value : Boolean); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function BindStore(Store : TExtDataStore) : TExtFunction; + function Center : TExtFunction; + constructor Create; overload; + function DoConstrain(ConstrainTo : String = '') : TExtFunction; overload; + function GetStore : TExtFunction; + function SetActive(Active : Boolean = false; NewActive : TExtComponent = nil) : TExtFunction; + function ToBack : TExtFunction; + function ToFront(PreventFocus : Boolean = false) : TExtFunction; + destructor Destroy; override; + property Constrain : Boolean read FConstrain write SetFConstrain; + property Fixed : Boolean read FFixed write SetFFixed; + property FocusOnToFront : Boolean read FFocusOnToFront write SetFFocusOnToFront; + property MaskCls : String read FMaskCls write SetFMaskCls; + property Msg : String read FMsg write SetFMsg; + property MsgCls : String read FMsgCls write SetFMsgCls; + property Shadow : String read FShadow write SetFShadow; + property ShadowBoolean : Boolean read FShadowBoolean write SetFShadowBoolean; + property ShadowOffset : Integer read FShadowOffset write SetFShadowOffset; + property Store : TExtDataStore read FStore write SetFStore; + property Target : TExtComponent read FTarget write SetFTarget; + property UseMsg : Boolean read FUseMsg write SetFUseMsg; + property UseTargetEl : Boolean read FUseTargetEl write SetFUseTargetEl; + end; + + TExtDataWriter = class(TExtDataModel) + private + FIsWriter : Boolean; + FWriteRecordId : Boolean; + procedure SetFIsWriter(Value : Boolean); + procedure SetFWriteRecordId(Value : Boolean); + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create(Config : TExtObject = nil); + function GetRecordData(RecordJS : TExtDataModel; Operation : TExtDataOperation = nil) : TExtFunction; + function Write(Request : TExtDataRequest) : TExtFunction; + property IsWriter : Boolean read FIsWriter write SetFIsWriter; + property WriteRecordId : Boolean read FWriteRecordId write SetFWriteRecordId; + end; + + TExtChartMaskLayer = class(TExtComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function GetRenderTarget : TExtFunction; - function GetTarget : TExtFunction; end; TExtLayoutContainerBoxOverflowMenu = class(TExtLayoutContainerBoxOverflowNone) @@ -6515,126 +7216,269 @@ TExtLayoutContainerBoxOverflowMenu = class(TExtLayoutContainerBoxOverflowNone) property TriggerButtonCls : String read FTriggerButtonCls write SetFTriggerButtonCls; end; - TExtDataGroup = class(TExtUtilObservable) + // Procedural types for events TExtLayoutContainerBoxOverflowScroller + TExtLayoutContainerBoxOverflowScrollerOnScroll = procedure(Scroller : TExtLayoutContainerBoxOverflowScroller; NewPosition : Integer; Animate : Boolean) of object; + + TExtLayoutContainerBoxOverflowScroller = class(TExtLayoutContainerBoxOverflowNone) + private + FAfterCtCls : String; + FAfterScrollerCls : String; + FAnimateScroll : Boolean; + FBeforeCtCls : String; + FBeforeScrollerCls : String; + FHasListeners : TExtObject; + FIsObservable : Boolean; + FListeners : TExtObject; + FScrollDuration : Integer; + FScrollerCls : String; + FScrollIncrement : Integer; + FScrollRepeatInterval : Integer; + FWheelIncrement : Integer; + FOnScroll : TExtLayoutContainerBoxOverflowScrollerOnScroll; + procedure SetFAfterCtCls(Value : String); + procedure SetFAfterScrollerCls(Value : String); + procedure SetFAnimateScroll(Value : Boolean); + procedure SetFBeforeCtCls(Value : String); + procedure SetFBeforeScrollerCls(Value : String); + procedure SetFHasListeners(Value : TExtObject); + procedure SetFIsObservable(Value : Boolean); + procedure SetFListeners(Value : TExtObject); + procedure SetFScrollDuration(Value : Integer); + procedure SetFScrollerCls(Value : String); + procedure SetFScrollIncrement(Value : Integer); + procedure SetFScrollRepeatInterval(Value : Integer); + procedure SetFWheelIncrement(Value : Integer); + procedure SetFOnScroll(Value : TExtLayoutContainerBoxOverflowScrollerOnScroll); + protected + procedure HandleEvent(const AEvtName: string); override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function AddEvents(EventNames : String) : TExtFunction; overload; + function AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; overload; + function AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; overload; + function ClearListeners : TExtFunction; + function ClearManagedListeners : TExtFunction; + constructor Create; + function EnableBubble(EventNames : String) : TExtFunction; overload; + function FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; + function FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; + function GetScrollPosition : TExtFunction; + function HasListener(EventName : String) : TExtFunction; + function RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; + function RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; + function RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; overload; + function ResumeEvent(EventName : String) : TExtFunction; + function ResumeEvents : TExtFunction; + function ScrollToItem(Item : Integer; Animate : Boolean) : TExtFunction; overload; + function SuspendEvent(EventName : String) : TExtFunction; + function SuspendEvents(QueueSuspended : Boolean) : TExtFunction; + property AfterCtCls : String read FAfterCtCls write SetFAfterCtCls; + property AfterScrollerCls : String read FAfterScrollerCls write SetFAfterScrollerCls; + property AnimateScroll : Boolean read FAnimateScroll write SetFAnimateScroll; + property BeforeCtCls : String read FBeforeCtCls write SetFBeforeCtCls; + property BeforeScrollerCls : String read FBeforeScrollerCls write SetFBeforeScrollerCls; + property HasListeners : TExtObject read FHasListeners write SetFHasListeners; + property IsObservable : Boolean read FIsObservable write SetFIsObservable; + property Listeners : TExtObject read FListeners write SetFListeners; + property ScrollDuration : Integer read FScrollDuration write SetFScrollDuration; + property ScrollerCls : String read FScrollerCls write SetFScrollerCls; + property ScrollIncrement : Integer read FScrollIncrement write SetFScrollIncrement; + property ScrollRepeatInterval : Integer read FScrollRepeatInterval write SetFScrollRepeatInterval; + property WheelIncrement : Integer read FWheelIncrement write SetFWheelIncrement; + property OnScroll : TExtLayoutContainerBoxOverflowScrollerOnScroll read FOnScroll write SetFOnScroll; end; - TExtImg = class(TExtComponent) + TExtLayoutContainer = class(TExtLayout) private - FAlt : String; - FGlyph : Integer; - FGlyphString : String; - FImgCls : String; - FSrc : String; - FTitle : String; - procedure SetFAlt(Value : String); - procedure SetFGlyph(Value : Integer); - procedure SetFGlyphString(Value : String); - procedure SetFImgCls(Value : String); - procedure SetFSrc(Value : String); - procedure SetFTitle(Value : String); + FItemCls : String; + FOverflowPadderEl : TExtElement; + procedure SetFItemCls(Value : String); + procedure SetFOverflowPadderEl(Value : TExtElement); + protected + procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function SetSrc(Src : String) : TExtFunction; - property Alt : String read FAlt write SetFAlt; - property Glyph : Integer read FGlyph write SetFGlyph; - property GlyphString : String read FGlyphString write SetFGlyphString; - property ImgCls : String read FImgCls write SetFImgCls; - property Src : String read FSrc write SetFSrc; - property Title : String read FTitle write SetFTitle; + function AddChildEls : TExtFunction; + function BeginLayout : TExtFunction; + constructor Create; + function GetElementTarget : TExtFunction; + function GetLayoutItems : TExtFunction; + function GetRenderTarget : TExtFunction; + function GetTarget : TExtFunction; + function RemoveChildEls(TestFn : TExtFunction) : TExtFunction; + destructor Destroy; override; + property ItemCls : String read FItemCls write SetFItemCls; + property OverflowPadderEl : TExtElement read FOverflowPadderEl write SetFOverflowPadderEl; end; - TExtGridPluginHeaderResizer = class(TExtAbstractPlugin) + TExtDdStatusProxy = class(TExtComponent) private - FDynamic : Boolean; - procedure SetFDynamic(Value : Boolean); + FDropAllowed : String; + FDropNotAllowed : String; + procedure SetFDropAllowed(Value : String); + procedure SetFDropNotAllowed(Value : String); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - property Dynamic : Boolean read FDynamic write SetFDynamic; + function GetGhost : TExtFunction; + function Hide(Clear : Boolean) : TExtFunction; + function Repair(Xy : TArrayOfInteger; Callback : TExtFunction; Scope : TExtObject) : TExtFunction; + function Reset(ClearGhost : Boolean) : TExtFunction; + function SetStatus(CssClass : String) : TExtFunction; + function Stop : TExtFunction; + function Sync : TExtFunction; + function Update(Html : String) : TExtFunction; overload; + property DropAllowed : String read FDropAllowed write SetFDropAllowed; + property DropNotAllowed : String read FDropNotAllowed write SetFDropNotAllowed; end; - TExtUtilPoint = class(TExtUtilRegion) + TExtDomCompositeElement = class(TExtDomCompositeElementLite) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create(X : Integer; Y : Integer); - function Equals(P : TExtObject) : TExtFunction; overload; - function FromEvent(E : TEvent) : TExtFunction; overload; - function IsContainedBy(Region : TExtComponent) : TExtFunction; overload; - function IsWithin(P : TExtObject; Threshold : Integer) : TExtFunction; overload; - function RoundedEquals(P : TExtObject) : TExtFunction; overload; - function ToString : TExtFunction; end; - TExtChartSeriesGauge = class(TExtChartSeries) + TExtStateLocalStorageProvider = class(TExtStateProvider) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + + TExtStateCookieProvider = class(TExtStateProvider) private - FAngleField : String; - FDonut : Boolean; - FDonutInteger : Integer; - FHighlightDuration : Integer; - FNeedle : Boolean; - FShowInLegend : Boolean; - FStyle : TExtObject; - procedure SetFAngleField(Value : String); - procedure SetFDonut(Value : Boolean); - procedure SetFDonutInteger(Value : Integer); - procedure SetFHighlightDuration(Value : Integer); - procedure SetFNeedle(Value : Boolean); - procedure SetFShowInLegend(Value : Boolean); - procedure SetFStyle(Value : TExtObject); + FDomain : String; // 'www' + FExpires : TDateTime; + FPath : String; // '/' + FSecure : Boolean; + procedure SetFDomain(Value : String); + procedure SetFExpires(Value : TDateTime); + procedure SetFPath(Value : String); + procedure SetFSecure(Value : Boolean); protected procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - function DrawSeries : TExtFunction; - function GetLegendColor(Info : TExtObject) : TExtFunction; - function SetValue : TExtFunction; - destructor Destroy; override; - property AngleField : String read FAngleField write SetFAngleField; - property Donut : Boolean read FDonut write SetFDonut; - property DonutInteger : Integer read FDonutInteger write SetFDonutInteger; - property HighlightDuration : Integer read FHighlightDuration write SetFHighlightDuration; - property Needle : Boolean read FNeedle write SetFNeedle; - property ShowInLegend : Boolean read FShowInLegend write SetFShowInLegend; - property Style : TExtObject read FStyle write SetFStyle; + constructor Create; overload; + property Domain : String read FDomain write SetFDomain; + property Expires : TDateTime read FExpires write SetFExpires; + property Path : String read FPath write SetFPath; + property Secure : Boolean read FSecure write SetFSecure; end; - TExtGridPluginBufferedRenderer = class(TExtAbstractPlugin) + TExtUtilMixedCollection = class(TExtUtilAbstractMixedCollection) private - FPosition : Integer; - FSynchronousRender : Boolean; - FVariableRowHeight : Boolean; - procedure SetFPosition(Value : Integer); - procedure SetFSynchronousRender(Value : Boolean); - procedure SetFVariableRowHeight(Value : Boolean); + FAllowFunctions : Boolean; + FDefaultSortDirection : String; + FIsSortable : Boolean; + FSorters : TExtObjectList; + FSorters_ : TExtObjectList; + FSortersList : TExtObjectList; + FSortRoot : String; + procedure SetFAllowFunctions(Value : Boolean); + procedure SetFDefaultSortDirection(Value : String); + procedure SetFIsSortable(Value : Boolean); + procedure SetFSorters(Value : TExtObjectList); + procedure SetFSorters_(Value : TExtObjectList); + procedure SetFSortersList(Value : TExtObjectList); + procedure SetFSortRoot(Value : String); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function ScrollTo(RecordIdx : Integer; DoSelect : Boolean; Callback : TExtFunction; CallbackRecordIdx : Integer; CallbackRecord : TExtDataModel; Scope : TExtObject) : TExtFunction; - property Position : Integer read FPosition write SetFPosition; - property SynchronousRender : Boolean read FSynchronousRender write SetFSynchronousRender; - property VariableRowHeight : Boolean read FVariableRowHeight write SetFVariableRowHeight; + constructor Create(Config : TExtObject; ConfigAllowFunctions : Boolean = false; ConfigGetKey : TExtFunction = nil); + function FindInsertionIndex(NewItem : TExtObject; SorterFn : TExtFunction = nil) : TExtFunction; + function GenerateComparator : TExtFunction; + function Reorder(Mapping : TExtObject) : TExtFunction; + function Sort(Sorters : String = ''; Direction : String = '') : TExtFunction; overload; + function SortBy(SorterFn : TExtFunction) : TExtFunction; + function SortByKey(Direction : String = ''; Fn : TExtFunction = nil) : TExtFunction; + property AllowFunctions : Boolean read FAllowFunctions write SetFAllowFunctions; + property DefaultSortDirection : String read FDefaultSortDirection write SetFDefaultSortDirection; + property IsSortable : Boolean read FIsSortable write SetFIsSortable; + property Sorters : TExtObjectList read FSorters write SetFSorters; + property Sorters_ : TExtObjectList read FSorters_ write SetFSorters_; + property SortersList : TExtObjectList read FSortersList write SetFSortersList; + property SortRoot : String read FSortRoot write SetFSortRoot; end; - // Procedural types for events TExtMenuItem - TExtMenuItemOnActivate = procedure(Item : TExtMenuItem) of object; - TExtMenuItemOnClick = procedure(Item : TExtMenuItem; E : TExtEventObject) of object; - TExtMenuItemOnDeactivate = procedure(Item : TExtMenuItem) of object; - TExtMenuItemOnIconchange = procedure(This : TExtMenuItem; OldIcon : String; NewIcon : String) of object; - TExtMenuItemOnTextchange = procedure(This : TExtMenuItem; OldText : String; NewText : String) of object; + TExtDataProxyClient = class(TExtDataProxy) + private + FIsSynchronous : Boolean; + procedure SetFIsSynchronous(Value : Boolean); + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function Clear : TExtFunction; + property IsSynchronous : Boolean read FIsSynchronous write SetFIsSynchronous; + end; - TExtMenuItem = class(TExtComponent) + TExtChartAxis = class(TExtChartAxisAbstract) private - FActiveCls : String; - FCanActivate : Boolean; - FClickHideDelay : Integer; - FDestroyMenu : Boolean; + FAdjustEnd : Boolean; + FDashSize : Integer; + FGrid : Boolean; + FGridObject : TExtObject; + FLength : Integer; + FMajorTickSteps : Integer; + FMinorTickSteps : Integer; + FPosition : String; + FTitle : String; + FWidth : Integer; + procedure SetFAdjustEnd(Value : Boolean); + procedure SetFDashSize(Value : Integer); + procedure SetFGrid(Value : Boolean); + procedure SetFGridObject(Value : TExtObject); + procedure SetFLength(Value : Integer); + procedure SetFMajorTickSteps(Value : Integer); + procedure SetFMinorTickSteps(Value : Integer); + procedure SetFPosition(Value : String); + procedure SetFTitle(Value : String); + procedure SetFWidth(Value : Integer); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; + function DrawAxis : TExtFunction; + function DrawGrid : TExtFunction; + function DrawLabel : TExtFunction; + function SetTitle(Title : String) : TExtFunction; + destructor Destroy; override; + property AdjustEnd : Boolean read FAdjustEnd write SetFAdjustEnd; + property DashSize : Integer read FDashSize write SetFDashSize; + property Grid : Boolean read FGrid write SetFGrid; + property GridObject : TExtObject read FGridObject write SetFGridObject; + property Length : Integer read FLength write SetFLength; + property MajorTickSteps : Integer read FMajorTickSteps write SetFMajorTickSteps; + property MinorTickSteps : Integer read FMinorTickSteps write SetFMinorTickSteps; + property Position : String read FPosition write SetFPosition; + property Title : String read FTitle write SetFTitle; + property Width : Integer read FWidth write SetFWidth; + end; + + TExtUtilTaskManagerSingleton = class(TExtUtilTaskRunner) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + + // Procedural types for events TExtMenuItem + TExtMenuItemOnActivate = procedure(Item : TExtMenuItem) of object; + TExtMenuItemOnClick = procedure(Item : TExtMenuItem; E : TExtEventObject) of object; + TExtMenuItemOnDeactivate = procedure(Item : TExtMenuItem) of object; + TExtMenuItemOnIconchange = procedure(This : TExtMenuItem; OldIcon : String; NewIcon : String) of object; + TExtMenuItemOnTextchange = procedure(This : TExtMenuItem; OldText : String; NewText : String) of object; + + TExtMenuItem = class(TExtComponent) + private + FActivated : Boolean; + FActiveCls : String; + FCanActivate : Boolean; + FClickHideDelay : Integer; + FDestroyMenu : Boolean; FDisabledCls : String; FGlyph : Integer; FGlyphString : String; @@ -6645,10 +7489,12 @@ TExtMenuItem = class(TExtComponent) FIcon : String; FIconCls : String; FMenu : TExtMenu; + FMenu_ : TExtMenu; FMenuAlign : String; FMenuExpandDelay : Integer; FMenuHideDelay : Integer; FMenuObject : TExtObject; + FParentMenu : TExtMenu; FPlain : Boolean; FText : String; FTooltip : String; @@ -6659,6 +7505,7 @@ TExtMenuItem = class(TExtComponent) FOnDeactivate : TExtMenuItemOnDeactivate; FOnIconchange : TExtMenuItemOnIconchange; FOnTextchange : TExtMenuItemOnTextchange; + procedure SetFActivated(Value : Boolean); procedure SetFActiveCls(Value : String); procedure SetFCanActivate(Value : Boolean); procedure SetFClickHideDelay(Value : Integer); @@ -6673,10 +7520,12 @@ TExtMenuItem = class(TExtComponent) procedure SetFIcon(Value : String); procedure SetFIconCls(Value : String); procedure SetFMenu(Value : TExtMenu); + procedure SetFMenu_(Value : TExtMenu); procedure SetFMenuAlign(Value : String); procedure SetFMenuExpandDelay(Value : Integer); procedure SetFMenuHideDelay(Value : Integer); procedure SetFMenuObject(Value : TExtObject); + procedure SetFParentMenu(Value : TExtMenu); procedure SetFPlain(Value : Boolean); procedure SetFText(Value : String); procedure SetFTooltip(Value : String); @@ -6701,6 +7550,7 @@ TExtMenuItem = class(TExtComponent) function SetText(Text : String) : TExtFunction; function SetTooltip(Tooltip : String) : TExtFunction; overload; destructor Destroy; override; + property Activated : Boolean read FActivated write SetFActivated; property ActiveCls : String read FActiveCls write SetFActiveCls; property CanActivate : Boolean read FCanActivate write SetFCanActivate; property ClickHideDelay : Integer read FClickHideDelay write SetFClickHideDelay; @@ -6715,10 +7565,12 @@ TExtMenuItem = class(TExtComponent) property Icon : String read FIcon write SetFIcon; property IconCls : String read FIconCls write SetFIconCls; property Menu : TExtMenu read FMenu write SetFMenu; + property Menu_ : TExtMenu read FMenu_ write SetFMenu_; property MenuAlign : String read FMenuAlign write SetFMenuAlign; property MenuExpandDelay : Integer read FMenuExpandDelay write SetFMenuExpandDelay; property MenuHideDelay : Integer read FMenuHideDelay write SetFMenuHideDelay; property MenuObject : TExtObject read FMenuObject write SetFMenuObject; + property ParentMenu : TExtMenu read FParentMenu write SetFParentMenu; property Plain : Boolean read FPlain write SetFPlain; property Text : String read FText write SetFText; property Tooltip : String read FTooltip write SetFTooltip; @@ -6731,336 +7583,45 @@ TExtMenuItem = class(TExtComponent) property OnTextchange : TExtMenuItemOnTextchange read FOnTextchange write SetFOnTextchange; end; - TExtStateCookieProvider = class(TExtStateProvider) - private - FDomain : String; // 'www' - FExpires : TDateTime; - FPath : String; // '/' - FSecure : Boolean; - procedure SetFDomain(Value : String); - procedure SetFExpires(Value : TDateTime); - procedure SetFPath(Value : String); - procedure SetFSecure(Value : Boolean); - protected - procedure InitDefaults; override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; overload; - property Domain : String read FDomain write SetFDomain; - property Expires : TDateTime read FExpires write SetFExpires; - property Path : String read FPath write SetFPath; - property Secure : Boolean read FSecure write SetFSecure; - end; - - TExtUtilMixedCollection = class(TExtUtilAbstractMixedCollection) - private - FAllowFunctions : Boolean; - FDefaultSortDirection : String; - FSorters : TExtObjectList; - FSorters_ : TExtObjectList; - FSortersList : TExtObjectList; - FSortRoot : String; - procedure SetFAllowFunctions(Value : Boolean); - procedure SetFDefaultSortDirection(Value : String); - procedure SetFSorters(Value : TExtObjectList); - procedure SetFSorters_(Value : TExtObjectList); - procedure SetFSortersList(Value : TExtObjectList); - procedure SetFSortRoot(Value : String); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create(Config : TExtObject; ConfigAllowFunctions : Boolean = false; ConfigGetKey : TExtFunction = nil); - function FindInsertionIndex(NewItem : TExtObject; SorterFn : TExtFunction = nil) : TExtFunction; - function GenerateComparator : TExtFunction; - function Reorder(Mapping : TExtObject) : TExtFunction; - function Sort(Sorters : String = ''; Direction : String = '') : TExtFunction; overload; - function SortBy(SorterFn : TExtFunction) : TExtFunction; - function SortByKey(Direction : String = ''; Fn : TExtFunction = nil) : TExtFunction; - property AllowFunctions : Boolean read FAllowFunctions write SetFAllowFunctions; - property DefaultSortDirection : String read FDefaultSortDirection write SetFDefaultSortDirection; - property Sorters : TExtObjectList read FSorters write SetFSorters; - property Sorters_ : TExtObjectList read FSorters_ write SetFSorters_; - property SortersList : TExtObjectList read FSortersList write SetFSortersList; - property SortRoot : String read FSortRoot write SetFSortRoot; - end; - - TExtGridPluginDragDrop = class(TExtAbstractPlugin) - private - FContainerScroll : TExtObject; - FContainerScrollBoolean : Boolean; - FDdGroup : String; - FDragGroup : String; - FDropGroup : String; - FEnableDrag : Boolean; - FEnableDrop : Boolean; - procedure SetFContainerScroll(Value : TExtObject); - procedure SetFContainerScrollBoolean(Value : Boolean); - procedure SetFDdGroup(Value : String); - procedure SetFDragGroup(Value : String); - procedure SetFDropGroup(Value : String); - procedure SetFEnableDrag(Value : Boolean); - procedure SetFEnableDrop(Value : Boolean); - protected - procedure InitDefaults; override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - destructor Destroy; override; - property ContainerScroll : TExtObject read FContainerScroll write SetFContainerScroll; - property ContainerScrollBoolean : Boolean read FContainerScrollBoolean write SetFContainerScrollBoolean; - property DdGroup : String read FDdGroup write SetFDdGroup; - property DragGroup : String read FDragGroup write SetFDragGroup; - property DropGroup : String read FDropGroup write SetFDropGroup; - property EnableDrag : Boolean read FEnableDrag write SetFEnableDrag; - property EnableDrop : Boolean read FEnableDrop write SetFEnableDrop; - end; - - TExtGridPluginEditing = class(TExtAbstractPlugin) - private - FClicksToEdit : Integer; - FEditing : Boolean; - FHasListeners : TExtObject; - FIsObservable : Boolean; - FListeners : TExtObject; - FTriggerEvent : String; - procedure SetFClicksToEdit(Value : Integer); - procedure SetFEditing(Value : Boolean); - procedure SetFHasListeners(Value : TExtObject); - procedure SetFIsObservable(Value : Boolean); - procedure SetFListeners(Value : TExtObject); - procedure SetFTriggerEvent(Value : String); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function AddEvents(EventNames : String) : TExtFunction; overload; - function AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; overload; - function AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; overload; - function CancelEdit : TExtFunction; - function ClearListeners : TExtFunction; - function ClearManagedListeners : TExtFunction; - function CompleteEdit : TExtFunction; - constructor Create; - function EnableBubble(EventNames : String) : TExtFunction; overload; - function FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; - function FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; - function HasListener(EventName : String) : TExtFunction; - function RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; - function RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; - function RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; overload; - function ResumeEvent(EventName : String) : TExtFunction; - function ResumeEvents : TExtFunction; - function SuspendEvent(EventName : String) : TExtFunction; - function SuspendEvents(QueueSuspended : Boolean) : TExtFunction; - property ClicksToEdit : Integer read FClicksToEdit write SetFClicksToEdit; - property Editing : Boolean read FEditing write SetFEditing; - property HasListeners : TExtObject read FHasListeners write SetFHasListeners; - property IsObservable : Boolean read FIsObservable write SetFIsObservable; - property Listeners : TExtObject read FListeners write SetFListeners; - property TriggerEvent : String read FTriggerEvent write SetFTriggerEvent; - end; - - TExtGridPluginHeaderReorderer = class(TExtAbstractPlugin) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - - TExtDataProxyClient = class(TExtDataProxy) - private - FIsSynchronous : Boolean; - procedure SetFIsSynchronous(Value : Boolean); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Clear : TExtFunction; - property IsSynchronous : Boolean read FIsSynchronous write SetFIsSynchronous; - end; - - TExtLoadMask = class(TExtComponent) - private - FConstrain : Boolean; - FFixed : Boolean; - FFocusOnToFront : Boolean; - FMaskCls : String; - FMsg : String; - FMsgCls : String; - FShadow : String; - FShadowBoolean : Boolean; - FShadowOffset : Integer; - FStore : TExtDataStore; - FTarget : TExtComponent; - FUseMsg : Boolean; - FUseTargetEl : Boolean; - procedure SetFConstrain(Value : Boolean); - procedure SetFFixed(Value : Boolean); - procedure SetFFocusOnToFront(Value : Boolean); - procedure SetFMaskCls(Value : String); - procedure SetFMsg(Value : String); - procedure SetFMsgCls(Value : String); - procedure SetFShadow(Value : String); - procedure SetFShadowBoolean(Value : Boolean); - procedure SetFShadowOffset(Value : Integer); - procedure SetFStore(Value : TExtDataStore); - procedure SetFTarget(Value : TExtComponent); - procedure SetFUseMsg(Value : Boolean); - procedure SetFUseTargetEl(Value : Boolean); - protected - procedure InitDefaults; override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function BindStore(Store : TExtDataStore) : TExtFunction; - function Center : TExtFunction; - constructor Create; overload; - function DoConstrain(ConstrainTo : String = '') : TExtFunction; overload; - function GetStore : TExtFunction; - function SetActive(Active : Boolean = false; NewActive : TExtComponent = nil) : TExtFunction; - function ToBack : TExtFunction; - function ToFront(PreventFocus : Boolean = false) : TExtFunction; - destructor Destroy; override; - property Constrain : Boolean read FConstrain write SetFConstrain; - property Fixed : Boolean read FFixed write SetFFixed; - property FocusOnToFront : Boolean read FFocusOnToFront write SetFFocusOnToFront; - property MaskCls : String read FMaskCls write SetFMaskCls; - property Msg : String read FMsg write SetFMsg; - property MsgCls : String read FMsgCls write SetFMsgCls; - property Shadow : String read FShadow write SetFShadow; - property ShadowBoolean : Boolean read FShadowBoolean write SetFShadowBoolean; - property ShadowOffset : Integer read FShadowOffset write SetFShadowOffset; - property Store : TExtDataStore read FStore write SetFStore; - property Target : TExtComponent read FTarget write SetFTarget; - property UseMsg : Boolean read FUseMsg write SetFUseMsg; - property UseTargetEl : Boolean read FUseTargetEl write SetFUseTargetEl; - end; - - TExtGridPluginDivRenderer = class(TExtAbstractPlugin) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - - TExtDataAbstractStore = class(TExtDataModel) - private - FFilters : TExtObjectList; - procedure SetFFilters(Value : TExtObjectList); - protected - procedure InitDefaults; override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - function GetModifiedRecords : TExtFunction; - function GetNewRecords : TExtFunction; - function GetProxy : TExtFunction; - function GetRemovedRecords : TExtFunction; - function GetUpdatedRecords : TExtFunction; - function Load(Options : TExtObject = nil) : TExtFunction; - function Reload(Options : TExtObject) : TExtFunction; - function ResumeAutoSync : TExtFunction; - function SetProxy(Proxy : String) : TExtFunction; overload; - function SuspendAutoSync : TExtFunction; - function Sync(Options : TExtObject = nil; OptionsBatch : TExtDataBatch = nil; OptionsCallback : TExtFunction = nil; OptionsCallbackBatch : TExtDataBatch = nil; OptionsCallbackOptions : TExtObject = nil; OptionsSuccess : TExtFunction = nil; OptionsSuccessBatch : TExtDataBatch = nil; OptionsSuccessOptions : TExtObject = nil; OptionsFailure : TExtFunction = nil; OptionsFailureBatch : TExtDataBatch = nil; OptionsFailureOptions : TExtObject = nil; OptionsScope : TExtObject = nil) : TExtFunction; overload; - destructor Destroy; override; - property Filters : TExtObjectList read FFilters write SetFFilters; - end; - - TExtFormActionLoad = class(TExtFormAction) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - - TExtResizerSplitterTracker = class(TExtDdDragTracker) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - - TExtDataTreeModel = class(TExtDataModel) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - - TExtAppApplication = class(TExtAppController) - private - FAppFolder : String; - FAppProperty : String; - FAutoCreateViewport : Boolean; - FControllers : TExtObjectList; - FEnableQuickTips : Boolean; - FName : String; - FNamespaces : TExtObjectList; - FPaths : TExtObject; - FScope : TExtObject; - procedure SetFAppFolder(Value : String); - procedure SetFAppProperty(Value : String); - procedure SetFAutoCreateViewport(Value : Boolean); - procedure SetFControllers(Value : TExtObjectList); - procedure SetFEnableQuickTips(Value : Boolean); - procedure SetFName(Value : String); - procedure SetFNamespaces(Value : TExtObjectList); - procedure SetFPaths(Value : TExtObject); - procedure SetFScope(Value : TExtObject); - protected - procedure InitDefaults; override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; overload; - destructor Destroy; override; - property AppFolder : String read FAppFolder write SetFAppFolder; - property AppProperty : String read FAppProperty write SetFAppProperty; - property AutoCreateViewport : Boolean read FAutoCreateViewport write SetFAutoCreateViewport; - property Controllers : TExtObjectList read FControllers write SetFControllers; - property EnableQuickTips : Boolean read FEnableQuickTips write SetFEnableQuickTips; - property Name : String read FName write SetFName; - property Namespaces : TExtObjectList read FNamespaces write SetFNamespaces; - property Paths : TExtObject read FPaths write SetFPaths; - property Scope : TExtObject read FScope write SetFScope; - end; - - TExtDataUuidGenerator = class(TExtDataIdGenerator) - private - FVersion : Integer; - procedure SetFVersion(Value : Integer); + TExtUtilPoint = class(TExtUtilRegion) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Reconfigure : TExtFunction; - property Version : Integer read FVersion write SetFVersion; + constructor Create(X : Integer; Y : Integer); + function Equals(P : TExtObject) : TExtFunction; overload; + function FromEvent(E : TEvent) : TExtFunction; overload; + function IsContainedBy(Region : TExtComponent) : TExtFunction; overload; + function IsWithin(P : TExtObject; Threshold : Integer) : TExtFunction; overload; + function RoundedEquals(P : TExtObject) : TExtFunction; overload; + function ToString : TExtFunction; end; - TExtFlashComponent = class(TExtComponent) + TExtDataField = class(TExtDataModel) private - FBackgroundColor : String; - FExpressInstall : Boolean; - FFlashAttributes : TExtObject; - FFlashParams : TExtObject; - FFlashVars : TExtObject; - FFlashVersion : String; - FSwf : TExtElement; - FSwfHeight : String; // '100%' - FSwfHeightInteger : Integer; - FSwfWidth : String; // '100%' - FSwfWidthInteger : Integer; - FUrl : String; - FWmode : String; - procedure SetFBackgroundColor(Value : String); - procedure SetFExpressInstall(Value : Boolean); - procedure SetFFlashAttributes(Value : TExtObject); - procedure SetFFlashParams(Value : TExtObject); - procedure SetFFlashVars(Value : TExtObject); - procedure SetFFlashVersion(Value : String); - procedure SetFSwf(Value : TExtElement); - procedure SetFSwfHeight(Value : String); - procedure SetFSwfHeightInteger(Value : Integer); - procedure SetFSwfWidth(Value : String); - procedure SetFSwfWidthInteger(Value : Integer); - procedure SetFUrl(Value : String); - procedure SetFWmode(Value : String); + FDateFormat : String; + FDateReadFormat : String; + FDateWriteFormat : String; + FDefaultValue : TExtObject; + FMapping : Integer; + FMappingString : String; + FPersist : Boolean; // true + FSerialize : TExtFunction; + FSortDir : String; // 'ASC' + FSortType : TExtFunction; + FSortTypeString : String; + FUseNull : Boolean; + procedure SetFDateFormat(Value : String); + procedure SetFDateReadFormat(Value : String); + procedure SetFDateWriteFormat(Value : String); + procedure SetFDefaultValue(Value : TExtObject); + procedure SetFMapping(Value : Integer); + procedure SetFMappingString(Value : String); + procedure SetFPersist(Value : Boolean); + procedure SetFSerialize(Value : TExtFunction); + procedure SetFSortDir(Value : String); + procedure SetFSortType(Value : TExtFunction); + procedure SetFSortTypeString(Value : String); + procedure SetFUseNull(Value : Boolean); protected procedure InitDefaults; override; public @@ -7068,774 +7629,122 @@ TExtFlashComponent = class(TExtComponent) {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} constructor Create; destructor Destroy; override; - property BackgroundColor : String read FBackgroundColor write SetFBackgroundColor; - property ExpressInstall : Boolean read FExpressInstall write SetFExpressInstall; - property FlashAttributes : TExtObject read FFlashAttributes write SetFFlashAttributes; - property FlashParams : TExtObject read FFlashParams write SetFFlashParams; - property FlashVars : TExtObject read FFlashVars write SetFFlashVars; - property FlashVersion : String read FFlashVersion write SetFFlashVersion; - property Swf : TExtElement read FSwf write SetFSwf; - property SwfHeight : String read FSwfHeight write SetFSwfHeight; - property SwfHeightInteger : Integer read FSwfHeightInteger write SetFSwfHeightInteger; - property SwfWidth : String read FSwfWidth write SetFSwfWidth; - property SwfWidthInteger : Integer read FSwfWidthInteger write SetFSwfWidthInteger; - property Url : String read FUrl write SetFUrl; - property Wmode : String read FWmode write SetFWmode; - end; - - TExtFormActionSubmit = class(TExtFormAction) - private - FClientValidation : Boolean; - procedure SetFClientValidation(Value : Boolean); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - property ClientValidation : Boolean read FClientValidation write SetFClientValidation; + property DateFormat : String read FDateFormat write SetFDateFormat; + property DateReadFormat : String read FDateReadFormat write SetFDateReadFormat; + property DateWriteFormat : String read FDateWriteFormat write SetFDateWriteFormat; + property DefaultValue : TExtObject read FDefaultValue write SetFDefaultValue; + property Mapping : Integer read FMapping write SetFMapping; + property MappingString : String read FMappingString write SetFMappingString; + property Persist : Boolean read FPersist write SetFPersist; + property Serialize : TExtFunction read FSerialize write SetFSerialize; + property SortDir : String read FSortDir write SetFSortDir; + property SortType : TExtFunction read FSortType write SetFSortType; + property SortTypeString : String read FSortTypeString write SetFSortTypeString; + property UseNull : Boolean read FUseNull write SetFUseNull; end; - // Procedural types for events TExtFormFieldBase - TExtFormFieldBaseOnErrorchange = procedure(This : TExtFormLabelable; Error : String) of object; - - TExtFormFieldBase = class(TExtComponent) + TExtImg = class(TExtComponent) private - FActiveError : String; - FActiveErrorsTpl : String; - FActiveErrorsTplList : TExtObjectList; - FActiveErrorsTplTemplate : TExtXTemplate; - FAfterBodyEl : String; - FAfterBodyElList : TExtObjectList; - FAfterBodyElTemplate : TExtXTemplate; - FAfterLabelTextTpl : String; - FAfterLabelTextTplList : TExtObjectList; - FAfterLabelTextTplTemplate : TExtXTemplate; - FAfterLabelTpl : String; - FAfterLabelTplList : TExtObjectList; - FAfterLabelTplTemplate : TExtXTemplate; - FAfterSubTpl : String; - FAfterSubTplList : TExtObjectList; - FAfterSubTplTemplate : TExtXTemplate; - FAutoFitErrors : Boolean; - FBaseBodyCls : String; - FBeforeBodyEl : String; - FBeforeBodyElList : TExtObjectList; - FBeforeBodyElTemplate : TExtXTemplate; - FBeforeLabelTextTpl : String; - FBeforeLabelTextTplList : TExtObjectList; - FBeforeLabelTextTplTemplate : TExtXTemplate; - FBeforeLabelTpl : String; - FBeforeLabelTplList : TExtObjectList; - FBeforeLabelTplTemplate : TExtXTemplate; - FBeforeSubTpl : String; - FBeforeSubTplList : TExtObjectList; - FBeforeSubTplTemplate : TExtXTemplate; - FCheckChangeBuffer : Integer; // 50 - FCheckChangeEvents : TExtObjectList; - FClearCls : String; - FDirtyCls : String; - FDisabled : Boolean; - FErrorMsgCls : String; - FFieldBodyCls : String; - FFieldCls : String; - FFieldLabel : String; - FFieldStyle : String; - FFocusCls : String; - FFormItemCls : String; - FHideEmptyLabel : Boolean; - FHideLabel : Boolean; - FInputAttrTpl : String; - FInputAttrTplList : TExtObjectList; - FInputAttrTplTemplate : TExtXTemplate; - FInputEl : TExtElement; - FInputId : String; - FInputType : String; - FInvalidCls : String; - FInvalidText : String; - FLabelableRenderTpl : String; - FLabelableRenderTplList : TExtObjectList; - FLabelableRenderTplTemplate : TExtXTemplate; - FLabelAlign : String; - FLabelAttrTpl : String; - FLabelAttrTplList : TExtObjectList; - FLabelAttrTplTemplate : TExtXTemplate; - FLabelCls : String; - FLabelClsExtra : String; - FLabelPad : Integer; - FLabelSeparator : String; - FLabelStyle : String; - FLabelWidth : Integer; - FMsgTarget : String; - FName : String; - FOriginalValue : TExtObject; - FPreventMark : Boolean; - FReadOnly : Boolean; - FReadOnlyCls : String; - FSubmitValue : Boolean; - FTabIndex : Integer; - FValidateOnBlur : Boolean; - FValidateOnChange : Boolean; - FValue : TExtObject; - FOnErrorchange : TExtFormFieldBaseOnErrorchange; - procedure SetFActiveError(Value : String); - procedure SetFActiveErrorsTpl(Value : String); - procedure SetFActiveErrorsTplList(Value : TExtObjectList); - procedure SetFActiveErrorsTplTemplate(Value : TExtXTemplate); - procedure SetFAfterBodyEl(Value : String); - procedure SetFAfterBodyElList(Value : TExtObjectList); - procedure SetFAfterBodyElTemplate(Value : TExtXTemplate); - procedure SetFAfterLabelTextTpl(Value : String); - procedure SetFAfterLabelTextTplList(Value : TExtObjectList); - procedure SetFAfterLabelTextTplTemplate(Value : TExtXTemplate); - procedure SetFAfterLabelTpl(Value : String); - procedure SetFAfterLabelTplList(Value : TExtObjectList); - procedure SetFAfterLabelTplTemplate(Value : TExtXTemplate); - procedure SetFAfterSubTpl(Value : String); - procedure SetFAfterSubTplList(Value : TExtObjectList); - procedure SetFAfterSubTplTemplate(Value : TExtXTemplate); - procedure SetFAutoFitErrors(Value : Boolean); - procedure SetFBaseBodyCls(Value : String); - procedure SetFBeforeBodyEl(Value : String); - procedure SetFBeforeBodyElList(Value : TExtObjectList); - procedure SetFBeforeBodyElTemplate(Value : TExtXTemplate); - procedure SetFBeforeLabelTextTpl(Value : String); - procedure SetFBeforeLabelTextTplList(Value : TExtObjectList); - procedure SetFBeforeLabelTextTplTemplate(Value : TExtXTemplate); - procedure SetFBeforeLabelTpl(Value : String); - procedure SetFBeforeLabelTplList(Value : TExtObjectList); - procedure SetFBeforeLabelTplTemplate(Value : TExtXTemplate); - procedure SetFBeforeSubTpl(Value : String); - procedure SetFBeforeSubTplList(Value : TExtObjectList); - procedure SetFBeforeSubTplTemplate(Value : TExtXTemplate); - procedure SetFCheckChangeBuffer(Value : Integer); - procedure SetFCheckChangeEvents(Value : TExtObjectList); - procedure SetFClearCls(Value : String); - procedure SetFDirtyCls(Value : String); - procedure SetFDisabled(Value : Boolean); - procedure SetFErrorMsgCls(Value : String); - procedure SetFFieldBodyCls(Value : String); - procedure SetFFieldCls(Value : String); - procedure SetFFieldLabel(Value : String); - procedure SetFFieldStyle(Value : String); - procedure SetFFocusCls(Value : String); - procedure SetFFormItemCls(Value : String); - procedure SetFHideEmptyLabel(Value : Boolean); - procedure SetFHideLabel(Value : Boolean); - procedure SetFInputAttrTpl(Value : String); - procedure SetFInputAttrTplList(Value : TExtObjectList); - procedure SetFInputAttrTplTemplate(Value : TExtXTemplate); - procedure SetFInputEl(Value : TExtElement); - procedure SetFInputId(Value : String); - procedure SetFInputType(Value : String); - procedure SetFInvalidCls(Value : String); - procedure SetFInvalidText(Value : String); - procedure SetFLabelableRenderTpl(Value : String); - procedure SetFLabelableRenderTplList(Value : TExtObjectList); - procedure SetFLabelableRenderTplTemplate(Value : TExtXTemplate); - procedure SetFLabelAlign(Value : String); - procedure SetFLabelAttrTpl(Value : String); - procedure SetFLabelAttrTplList(Value : TExtObjectList); - procedure SetFLabelAttrTplTemplate(Value : TExtXTemplate); - procedure SetFLabelCls(Value : String); - procedure SetFLabelClsExtra(Value : String); - procedure SetFLabelPad(Value : Integer); - procedure SetFLabelSeparator(Value : String); - procedure SetFLabelStyle(Value : String); - procedure SetFLabelWidth(Value : Integer); - procedure SetFMsgTarget(Value : String); - procedure SetFName(Value : String); - procedure SetFOriginalValue(Value : TExtObject); - procedure SetFPreventMark(Value : Boolean); - procedure SetFReadOnly(Value : Boolean); - procedure SetFReadOnlyCls(Value : String); - procedure SetFSubmitValue(Value : Boolean); - procedure SetFTabIndex(Value : Integer); - procedure SetFValidateOnBlur(Value : Boolean); - procedure SetFValidateOnChange(Value : Boolean); - procedure SetFValue(Value : TExtObject); - procedure SetFOnErrorchange(Value : TExtFormFieldBaseOnErrorchange); - protected - procedure InitDefaults; override; - procedure HandleEvent(const AEvtName: string); override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function BatchChanges(Fn : TExtObject) : TExtFunction; - function CheckChange : TExtFunction; - function CheckDirty : TExtFunction; - function ClearInvalid : TExtFunction; - constructor Create; - function ExtractFileInput : TExtFunction; - function GetActiveError : TExtFunction; - function GetActiveErrors : TExtFunction; - function GetErrors(Value : TExtObject) : TExtFunction; - function GetInputId : TExtFunction; - function GetLabelWidth : TExtFunction; - function GetModelData : TExtFunction; - function GetName : TExtFunction; - function GetRawValue : TExtFunction; - function GetSubmitData : TExtFunction; - function GetSubmitValue : TExtFunction; - function GetSubTplMarkup : TExtFunction; - function GetValue : TExtFunction; - function HasActiveError : TExtFunction; - function HasVisibleLabel : TExtFunction; - function IsDirty : TExtFunction; - function IsEqual(Value1 : TExtObject; Value2 : TExtObject) : TExtFunction; - function IsFileUpload : TExtFunction; - function IsValid : TExtFunction; - function MarkInvalid(Errors : String) : TExtFunction; overload; - function Reset : TExtFunction; - function ResetOriginalValue : TExtFunction; - function SetActiveError(Msg : String) : TExtFunction; - function SetActiveErrors(Errors : TExtObjectList) : TExtFunction; - function SetFieldDefaults(Defaults : TExtObject) : TExtFunction; - function SetFieldLabel(LabelJS : String) : TExtFunction; - function SetFieldStyle(Style : String) : TExtFunction; overload; - function SetRawValue(Value : TExtObject) : TExtFunction; - function SetReadOnly(ReadOnly : Boolean) : TExtFunction; - function SetValue(Value : TExtObject) : TExtFunction; - function TrimLabelSeparator : TExtFunction; - function UnsetActiveError : TExtFunction; - function Validate : TExtFunction; - function ValidateValue(Value : TExtObject) : TExtFunction; - function ValueToRaw(Value : TExtObject) : TExtFunction; - destructor Destroy; override; - property ActiveError : String read FActiveError write SetFActiveError; - property ActiveErrorsTpl : String read FActiveErrorsTpl write SetFActiveErrorsTpl; - property ActiveErrorsTplList : TExtObjectList read FActiveErrorsTplList write SetFActiveErrorsTplList; - property ActiveErrorsTplTemplate : TExtXTemplate read FActiveErrorsTplTemplate write SetFActiveErrorsTplTemplate; - property AfterBodyEl : String read FAfterBodyEl write SetFAfterBodyEl; - property AfterBodyElList : TExtObjectList read FAfterBodyElList write SetFAfterBodyElList; - property AfterBodyElTemplate : TExtXTemplate read FAfterBodyElTemplate write SetFAfterBodyElTemplate; - property AfterLabelTextTpl : String read FAfterLabelTextTpl write SetFAfterLabelTextTpl; - property AfterLabelTextTplList : TExtObjectList read FAfterLabelTextTplList write SetFAfterLabelTextTplList; - property AfterLabelTextTplTemplate : TExtXTemplate read FAfterLabelTextTplTemplate write SetFAfterLabelTextTplTemplate; - property AfterLabelTpl : String read FAfterLabelTpl write SetFAfterLabelTpl; - property AfterLabelTplList : TExtObjectList read FAfterLabelTplList write SetFAfterLabelTplList; - property AfterLabelTplTemplate : TExtXTemplate read FAfterLabelTplTemplate write SetFAfterLabelTplTemplate; - property AfterSubTpl : String read FAfterSubTpl write SetFAfterSubTpl; - property AfterSubTplList : TExtObjectList read FAfterSubTplList write SetFAfterSubTplList; - property AfterSubTplTemplate : TExtXTemplate read FAfterSubTplTemplate write SetFAfterSubTplTemplate; - property AutoFitErrors : Boolean read FAutoFitErrors write SetFAutoFitErrors; - property BaseBodyCls : String read FBaseBodyCls write SetFBaseBodyCls; - property BeforeBodyEl : String read FBeforeBodyEl write SetFBeforeBodyEl; - property BeforeBodyElList : TExtObjectList read FBeforeBodyElList write SetFBeforeBodyElList; - property BeforeBodyElTemplate : TExtXTemplate read FBeforeBodyElTemplate write SetFBeforeBodyElTemplate; - property BeforeLabelTextTpl : String read FBeforeLabelTextTpl write SetFBeforeLabelTextTpl; - property BeforeLabelTextTplList : TExtObjectList read FBeforeLabelTextTplList write SetFBeforeLabelTextTplList; - property BeforeLabelTextTplTemplate : TExtXTemplate read FBeforeLabelTextTplTemplate write SetFBeforeLabelTextTplTemplate; - property BeforeLabelTpl : String read FBeforeLabelTpl write SetFBeforeLabelTpl; - property BeforeLabelTplList : TExtObjectList read FBeforeLabelTplList write SetFBeforeLabelTplList; - property BeforeLabelTplTemplate : TExtXTemplate read FBeforeLabelTplTemplate write SetFBeforeLabelTplTemplate; - property BeforeSubTpl : String read FBeforeSubTpl write SetFBeforeSubTpl; - property BeforeSubTplList : TExtObjectList read FBeforeSubTplList write SetFBeforeSubTplList; - property BeforeSubTplTemplate : TExtXTemplate read FBeforeSubTplTemplate write SetFBeforeSubTplTemplate; - property CheckChangeBuffer : Integer read FCheckChangeBuffer write SetFCheckChangeBuffer; - property CheckChangeEvents : TExtObjectList read FCheckChangeEvents write SetFCheckChangeEvents; - property ClearCls : String read FClearCls write SetFClearCls; - property DirtyCls : String read FDirtyCls write SetFDirtyCls; - property Disabled : Boolean read FDisabled write SetFDisabled; - property ErrorMsgCls : String read FErrorMsgCls write SetFErrorMsgCls; - property FieldBodyCls : String read FFieldBodyCls write SetFFieldBodyCls; - property FieldCls : String read FFieldCls write SetFFieldCls; - property FieldLabel : String read FFieldLabel write SetFFieldLabel; - property FieldStyle : String read FFieldStyle write SetFFieldStyle; - property FocusCls : String read FFocusCls write SetFFocusCls; - property FormItemCls : String read FFormItemCls write SetFFormItemCls; - property HideEmptyLabel : Boolean read FHideEmptyLabel write SetFHideEmptyLabel; - property HideLabel : Boolean read FHideLabel write SetFHideLabel; - property InputAttrTpl : String read FInputAttrTpl write SetFInputAttrTpl; - property InputAttrTplList : TExtObjectList read FInputAttrTplList write SetFInputAttrTplList; - property InputAttrTplTemplate : TExtXTemplate read FInputAttrTplTemplate write SetFInputAttrTplTemplate; - property InputEl : TExtElement read FInputEl write SetFInputEl; - property InputId : String read FInputId write SetFInputId; - property InputType : String read FInputType write SetFInputType; - property InvalidCls : String read FInvalidCls write SetFInvalidCls; - property InvalidText : String read FInvalidText write SetFInvalidText; - property LabelableRenderTpl : String read FLabelableRenderTpl write SetFLabelableRenderTpl; - property LabelableRenderTplList : TExtObjectList read FLabelableRenderTplList write SetFLabelableRenderTplList; - property LabelableRenderTplTemplate : TExtXTemplate read FLabelableRenderTplTemplate write SetFLabelableRenderTplTemplate; - property LabelAlign : String read FLabelAlign write SetFLabelAlign; - property LabelAttrTpl : String read FLabelAttrTpl write SetFLabelAttrTpl; - property LabelAttrTplList : TExtObjectList read FLabelAttrTplList write SetFLabelAttrTplList; - property LabelAttrTplTemplate : TExtXTemplate read FLabelAttrTplTemplate write SetFLabelAttrTplTemplate; - property LabelCls : String read FLabelCls write SetFLabelCls; - property LabelClsExtra : String read FLabelClsExtra write SetFLabelClsExtra; - property LabelPad : Integer read FLabelPad write SetFLabelPad; - property LabelSeparator : String read FLabelSeparator write SetFLabelSeparator; - property LabelStyle : String read FLabelStyle write SetFLabelStyle; - property LabelWidth : Integer read FLabelWidth write SetFLabelWidth; - property MsgTarget : String read FMsgTarget write SetFMsgTarget; - property Name : String read FName write SetFName; - property OriginalValue : TExtObject read FOriginalValue write SetFOriginalValue; - property PreventMark : Boolean read FPreventMark write SetFPreventMark; - property ReadOnly : Boolean read FReadOnly write SetFReadOnly; - property ReadOnlyCls : String read FReadOnlyCls write SetFReadOnlyCls; - property SubmitValue : Boolean read FSubmitValue write SetFSubmitValue; - property TabIndex : Integer read FTabIndex write SetFTabIndex; - property ValidateOnBlur : Boolean read FValidateOnBlur write SetFValidateOnBlur; - property ValidateOnChange : Boolean read FValidateOnChange write SetFValidateOnChange; - property Value : TExtObject read FValue write SetFValue; - property OnErrorchange : TExtFormFieldBaseOnErrorchange read FOnErrorchange write SetFOnErrorchange; - end; - - TExtResizerHandle = class(TExtComponent) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - - TExtDataSequentialIdGenerator = class(TExtDataIdGenerator) - private - FPrefix : String; - FSeed : Integer; - procedure SetFPrefix(Value : String); - procedure SetFSeed(Value : Integer); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Generate : TExtFunction; - property Prefix : String read FPrefix write SetFPrefix; - property Seed : Integer read FSeed write SetFSeed; - end; - - TExtResizerResizeTracker = class(TExtDdDragTracker) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function CreateProxy(Target : TExtComponent) : TExtFunction; overload; - end; - - TExtFormBasic = class(TExtUtilObservable) - private - FApi : TExtObject; - FBaseParams : TExtObject; - FErrorReader : TExtObject; - FErrorReaderReader : TExtDataReader; - FJsonSubmit : Boolean; - FMethod : String; - FParamOrder : String; - FParamOrderList : TExtObjectList; - FParamsAsHash : Boolean; - FReader : TExtObject; - FReaderReader : TExtDataReader; - FStandardSubmit : Boolean; - FTimeout : Integer; - FTrackResetOnLoad : Boolean; - FUrl : String; - FWaitMsgTarget : String; - FWaitMsgTargetElement : TExtElement; - FWaitMsgTargetTHTMLElement : THTMLElement; - FWaitTitle : String; - procedure SetFApi(Value : TExtObject); - procedure SetFBaseParams(Value : TExtObject); - procedure SetFErrorReader(Value : TExtObject); - procedure SetFErrorReaderReader(Value : TExtDataReader); - procedure SetFJsonSubmit(Value : Boolean); - procedure SetFMethod(Value : String); - procedure SetFParamOrder(Value : String); - procedure SetFParamOrderList(Value : TExtObjectList); - procedure SetFParamsAsHash(Value : Boolean); - procedure SetFReader(Value : TExtObject); - procedure SetFReaderReader(Value : TExtDataReader); - procedure SetFStandardSubmit(Value : Boolean); - procedure SetFTimeout(Value : Integer); - procedure SetFTrackResetOnLoad(Value : Boolean); - procedure SetFUrl(Value : String); - procedure SetFWaitMsgTarget(Value : String); - procedure SetFWaitMsgTargetElement(Value : TExtElement); - procedure SetFWaitMsgTargetTHTMLElement(Value : THTMLElement); - procedure SetFWaitTitle(Value : String); - protected - procedure InitDefaults; override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function ApplyIfToFields(Obj : TExtObject) : TExtFunction; - function ApplyToFields(Obj : TExtObject) : TExtFunction; - function CheckDirty : TExtFunction; - function CheckValidity : TExtFunction; - function ClearInvalid : TExtFunction; - constructor Create; - function DoAction(Action : String; Options : TExtObject = nil; OptionsUrl : String = ''; OptionsMethod : String = ''; OptionsParams : String = ''; OptionsHeaders : TExtObject = nil; OptionsSuccess : TExtFunction = nil; OptionsSuccessForm : TExtFormBasic = nil; OptionsSuccessAction : TExtFormAction = nil; OptionsFailure : TExtFunction = nil; OptionsFailureForm : TExtFormBasic = nil; OptionsFailureAction : TExtFormAction = nil; OptionsScope : TExtObject = nil; OptionsClientValidation : Boolean = false) : TExtFunction; overload; - function FindField(Id : String) : TExtFunction; - function GetFields : TExtFunction; - function GetFieldValues(DirtyOnly : Boolean = false) : TExtFunction; - function GetRecord : TExtFunction; - function GetValues(AsString : Boolean = false; DirtyOnly : Boolean = false; IncludeEmptyText : Boolean = false; UseDataValues : Boolean = false) : TExtFunction; - function HasInvalidField : TExtFunction; - function HasUpload : TExtFunction; - function IsDirty : TExtFunction; - function IsValid : TExtFunction; - function Load(Options : TExtObject) : TExtFunction; - function LoadRecord(RecordJS : TExtDataModel) : TExtFunction; - function MarkInvalid(Errors : TExtDataErrors) : TExtFunction; overload; - function Reset(ResetRecord : Boolean = false) : TExtFunction; - function SetValues(Values : TExtObject) : TExtFunction; overload; - function Submit(Options : TExtObject) : TExtFunction; - function UpdateRecord(RecordJS : TExtDataModel = nil) : TExtFunction; - destructor Destroy; override; - property Api : TExtObject read FApi write SetFApi; - property BaseParams : TExtObject read FBaseParams write SetFBaseParams; - property ErrorReader : TExtObject read FErrorReader write SetFErrorReader; - property ErrorReaderReader : TExtDataReader read FErrorReaderReader write SetFErrorReaderReader; - property JsonSubmit : Boolean read FJsonSubmit write SetFJsonSubmit; - property Method : String read FMethod write SetFMethod; - property ParamOrder : String read FParamOrder write SetFParamOrder; - property ParamOrderList : TExtObjectList read FParamOrderList write SetFParamOrderList; - property ParamsAsHash : Boolean read FParamsAsHash write SetFParamsAsHash; - property Reader : TExtObject read FReader write SetFReader; - property ReaderReader : TExtDataReader read FReaderReader write SetFReaderReader; - property StandardSubmit : Boolean read FStandardSubmit write SetFStandardSubmit; - property Timeout : Integer read FTimeout write SetFTimeout; - property TrackResetOnLoad : Boolean read FTrackResetOnLoad write SetFTrackResetOnLoad; - property Url : String read FUrl write SetFUrl; - property WaitMsgTarget : String read FWaitMsgTarget write SetFWaitMsgTarget; - property WaitMsgTargetElement : TExtElement read FWaitMsgTargetElement write SetFWaitMsgTargetElement; - property WaitMsgTargetTHTMLElement : THTMLElement read FWaitMsgTargetTHTMLElement write SetFWaitMsgTargetTHTMLElement; - property WaitTitle : String read FWaitTitle write SetFWaitTitle; - end; - - TExtUtilComponentDragger = class(TExtDdDragTracker) - private - FConstrain : Boolean; - FConstrainDelegate : Boolean; - FDelegate : String; - FDelegateElement : TExtElement; - procedure SetFConstrain(Value : Boolean); - procedure SetFConstrainDelegate(Value : Boolean); - procedure SetFDelegate(Value : String); - procedure SetFDelegateElement(Value : TExtElement); - protected - procedure InitDefaults; override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; overload; - destructor Destroy; override; - property Constrain : Boolean read FConstrain write SetFConstrain; - property ConstrainDelegate : Boolean read FConstrainDelegate write SetFConstrainDelegate; - property Delegate : String read FDelegate write SetFDelegate; - property DelegateElement : TExtElement read FDelegateElement write SetFDelegateElement; - end; - - TExtResizerSplitter = class(TExtComponent) - private - FCollapsedCls : String; - FCollapseOnDblClick : Boolean; - FCollapseTarget : String; - FCollapseTargetPanel : TExtPanel; - FCollapsible : Boolean; - FDefaultSplitMax : Integer; - FDefaultSplitMin : Integer; - FPerformCollapse : Boolean; - FSize : Integer; - procedure SetFCollapsedCls(Value : String); - procedure SetFCollapseOnDblClick(Value : Boolean); - procedure SetFCollapseTarget(Value : String); - procedure SetFCollapseTargetPanel(Value : TExtPanel); - procedure SetFCollapsible(Value : Boolean); - procedure SetFDefaultSplitMax(Value : Integer); - procedure SetFDefaultSplitMin(Value : Integer); - procedure SetFPerformCollapse(Value : Boolean); - procedure SetFSize(Value : Integer); - protected - procedure InitDefaults; override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - destructor Destroy; override; - property CollapsedCls : String read FCollapsedCls write SetFCollapsedCls; - property CollapseOnDblClick : Boolean read FCollapseOnDblClick write SetFCollapseOnDblClick; - property CollapseTarget : String read FCollapseTarget write SetFCollapseTarget; - property CollapseTargetPanel : TExtPanel read FCollapseTargetPanel write SetFCollapseTargetPanel; - property Collapsible : Boolean read FCollapsible write SetFCollapsible; - property DefaultSplitMax : Integer read FDefaultSplitMax write SetFDefaultSplitMax; - property DefaultSplitMin : Integer read FDefaultSplitMin write SetFDefaultSplitMin; - property PerformCollapse : Boolean read FPerformCollapse write SetFPerformCollapse; - property Size : Integer read FSize write SetFSize; - end; - - TExtDataWriter = class(TExtDataModel) - private - FIsWriter : Boolean; - FWriteRecordId : Boolean; - procedure SetFIsWriter(Value : Boolean); - procedure SetFWriteRecordId(Value : Boolean); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create(Config : TExtObject = nil); - function GetRecordData(RecordJS : TExtDataModel; Operation : TExtDataOperation = nil) : TExtFunction; - function Write(Request : TExtDataRequest) : TExtFunction; - property IsWriter : Boolean read FIsWriter write SetFIsWriter; - property WriteRecordId : Boolean read FWriteRecordId write SetFWriteRecordId; - end; - - TExtDomCompositeElement = class(TExtDomCompositeElementLite) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - - TExtComponentManagerSingleton = class(TExtAbstractManager) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create(Config : TExtObject; DefaultType : String = ''); - end; - - // Procedural types for events TExtDomElement - TExtDomElementOnAbort = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnBlur = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnChange = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnClick = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnContextmenu = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnDblclick = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnDOMActivate = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnDOMAttrModified = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnDOMCharacterDataModified = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnDOMFocusIn = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnDOMFocusOut = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnDOMNodeInserted = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnDOMNodeInsertedIntoDocument = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnDOMNodeRemoved = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnDOMNodeRemovedFromDocument = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnDOMSubtreeModified = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnError = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnFocus = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnKeydown = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnKeypress = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnKeyup = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnLoad = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnMousedown = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnMouseenter = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnMouseleave = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnMousemove = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnMouseout = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnMouseover = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnMouseup = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnReset = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnResize = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnScroll = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnSelect = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnSubmit = procedure(E : TExtEventObject; T : THTMLElement) of object; - TExtDomElementOnUnload = procedure(E : TExtEventObject; T : THTMLElement) of object; - - TExtDomElement = class(TExtDomAbstractElement) - private - FAutoBoxAdjust : Boolean; - FOnAbort : TExtDomElementOnAbort; - FOnBlur : TExtDomElementOnBlur; - FOnChange : TExtDomElementOnChange; - FOnClick : TExtDomElementOnClick; - FOnContextmenu : TExtDomElementOnContextmenu; - FOnDblclick : TExtDomElementOnDblclick; - FOnDOMActivate : TExtDomElementOnDOMActivate; - FOnDOMAttrModified : TExtDomElementOnDOMAttrModified; - FOnDOMCharacterDataModified : TExtDomElementOnDOMCharacterDataModified; - FOnDOMFocusIn : TExtDomElementOnDOMFocusIn; - FOnDOMFocusOut : TExtDomElementOnDOMFocusOut; - FOnDOMNodeInserted : TExtDomElementOnDOMNodeInserted; - FOnDOMNodeInsertedIntoDocument : TExtDomElementOnDOMNodeInsertedIntoDocument; - FOnDOMNodeRemoved : TExtDomElementOnDOMNodeRemoved; - FOnDOMNodeRemovedFromDocument : TExtDomElementOnDOMNodeRemovedFromDocument; - FOnDOMSubtreeModified : TExtDomElementOnDOMSubtreeModified; - FOnError : TExtDomElementOnError; - FOnFocus : TExtDomElementOnFocus; - FOnKeydown : TExtDomElementOnKeydown; - FOnKeypress : TExtDomElementOnKeypress; - FOnKeyup : TExtDomElementOnKeyup; - FOnLoad : TExtDomElementOnLoad; - FOnMousedown : TExtDomElementOnMousedown; - FOnMouseenter : TExtDomElementOnMouseenter; - FOnMouseleave : TExtDomElementOnMouseleave; - FOnMousemove : TExtDomElementOnMousemove; - FOnMouseout : TExtDomElementOnMouseout; - FOnMouseover : TExtDomElementOnMouseover; - FOnMouseup : TExtDomElementOnMouseup; - FOnReset : TExtDomElementOnReset; - FOnResize : TExtDomElementOnResize; - FOnScroll : TExtDomElementOnScroll; - FOnSelect : TExtDomElementOnSelect; - FOnSubmit : TExtDomElementOnSubmit; - FOnUnload : TExtDomElementOnUnload; - procedure SetFAutoBoxAdjust(Value : Boolean); - procedure SetFOnAbort(Value : TExtDomElementOnAbort); - procedure SetFOnBlur(Value : TExtDomElementOnBlur); - procedure SetFOnChange(Value : TExtDomElementOnChange); - procedure SetFOnClick(Value : TExtDomElementOnClick); - procedure SetFOnContextmenu(Value : TExtDomElementOnContextmenu); - procedure SetFOnDblclick(Value : TExtDomElementOnDblclick); - procedure SetFOnDOMActivate(Value : TExtDomElementOnDOMActivate); - procedure SetFOnDOMAttrModified(Value : TExtDomElementOnDOMAttrModified); - procedure SetFOnDOMCharacterDataModified(Value : TExtDomElementOnDOMCharacterDataModified); - procedure SetFOnDOMFocusIn(Value : TExtDomElementOnDOMFocusIn); - procedure SetFOnDOMFocusOut(Value : TExtDomElementOnDOMFocusOut); - procedure SetFOnDOMNodeInserted(Value : TExtDomElementOnDOMNodeInserted); - procedure SetFOnDOMNodeInsertedIntoDocument(Value : TExtDomElementOnDOMNodeInsertedIntoDocument); - procedure SetFOnDOMNodeRemoved(Value : TExtDomElementOnDOMNodeRemoved); - procedure SetFOnDOMNodeRemovedFromDocument(Value : TExtDomElementOnDOMNodeRemovedFromDocument); - procedure SetFOnDOMSubtreeModified(Value : TExtDomElementOnDOMSubtreeModified); - procedure SetFOnError(Value : TExtDomElementOnError); - procedure SetFOnFocus(Value : TExtDomElementOnFocus); - procedure SetFOnKeydown(Value : TExtDomElementOnKeydown); - procedure SetFOnKeypress(Value : TExtDomElementOnKeypress); - procedure SetFOnKeyup(Value : TExtDomElementOnKeyup); - procedure SetFOnLoad(Value : TExtDomElementOnLoad); - procedure SetFOnMousedown(Value : TExtDomElementOnMousedown); - procedure SetFOnMouseenter(Value : TExtDomElementOnMouseenter); - procedure SetFOnMouseleave(Value : TExtDomElementOnMouseleave); - procedure SetFOnMousemove(Value : TExtDomElementOnMousemove); - procedure SetFOnMouseout(Value : TExtDomElementOnMouseout); - procedure SetFOnMouseover(Value : TExtDomElementOnMouseover); - procedure SetFOnMouseup(Value : TExtDomElementOnMouseup); - procedure SetFOnReset(Value : TExtDomElementOnReset); - procedure SetFOnResize(Value : TExtDomElementOnResize); - procedure SetFOnScroll(Value : TExtDomElementOnScroll); - procedure SetFOnSelect(Value : TExtDomElementOnSelect); - procedure SetFOnSubmit(Value : TExtDomElementOnSubmit); - procedure SetFOnUnload(Value : TExtDomElementOnUnload); - protected - procedure HandleEvent(const AEvtName: string); override; + FAlt : String; + FGlyph : Integer; + FGlyphString : String; + FImgCls : String; + FSrc : String; + FTitle : String; + procedure SetFAlt(Value : String); + procedure SetFGlyph(Value : Integer); + procedure SetFGlyphString(Value : String); + procedure SetFImgCls(Value : String); + procedure SetFSrc(Value : String); + procedure SetFTitle(Value : String); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Clean(ForceReclean : Boolean = false) : TExtFunction; - function CreateProxy(Config : String; RenderTo : String = ''; MatchBox : Boolean = false) : TExtFunction; overload; - function GetLoader : TExtFunction; - function IsFocusable : TExtFunction; - function Load : TExtFunction; - function MonitorMouseLeave(Delay : Integer; Handler : TExtFunction; Scope : TExtObject = nil) : TExtFunction; - function NeedsTabIndex : TExtFunction; - function On(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; - function PurgeAllListeners : TExtFunction; - function RelayEvent(EventName : String; Observable : TExtObject) : TExtFunction; - function RemoveAllListeners : TExtFunction; - function SwallowEvent(EventName : String; PreventDefault : Boolean = false) : TExtFunction; overload; - function Un(EventName : String; Fn : TExtFunction; Scope : TExtObject) : TExtFunction; - function Update(Html : String; LoadScripts : Boolean = false; Callback : TExtFunction = nil) : TExtFunction; - property AutoBoxAdjust : Boolean read FAutoBoxAdjust write SetFAutoBoxAdjust; - property OnAbort : TExtDomElementOnAbort read FOnAbort write SetFOnAbort; - property OnBlur : TExtDomElementOnBlur read FOnBlur write SetFOnBlur; - property OnChange : TExtDomElementOnChange read FOnChange write SetFOnChange; - property OnClick : TExtDomElementOnClick read FOnClick write SetFOnClick; - property OnContextmenu : TExtDomElementOnContextmenu read FOnContextmenu write SetFOnContextmenu; - property OnDblclick : TExtDomElementOnDblclick read FOnDblclick write SetFOnDblclick; - property OnDOMActivate : TExtDomElementOnDOMActivate read FOnDOMActivate write SetFOnDOMActivate; - property OnDOMAttrModified : TExtDomElementOnDOMAttrModified read FOnDOMAttrModified write SetFOnDOMAttrModified; - property OnDOMCharacterDataModified : TExtDomElementOnDOMCharacterDataModified read FOnDOMCharacterDataModified write SetFOnDOMCharacterDataModified; - property OnDOMFocusIn : TExtDomElementOnDOMFocusIn read FOnDOMFocusIn write SetFOnDOMFocusIn; - property OnDOMFocusOut : TExtDomElementOnDOMFocusOut read FOnDOMFocusOut write SetFOnDOMFocusOut; - property OnDOMNodeInserted : TExtDomElementOnDOMNodeInserted read FOnDOMNodeInserted write SetFOnDOMNodeInserted; - property OnDOMNodeInsertedIntoDocument : TExtDomElementOnDOMNodeInsertedIntoDocument read FOnDOMNodeInsertedIntoDocument write SetFOnDOMNodeInsertedIntoDocument; - property OnDOMNodeRemoved : TExtDomElementOnDOMNodeRemoved read FOnDOMNodeRemoved write SetFOnDOMNodeRemoved; - property OnDOMNodeRemovedFromDocument : TExtDomElementOnDOMNodeRemovedFromDocument read FOnDOMNodeRemovedFromDocument write SetFOnDOMNodeRemovedFromDocument; - property OnDOMSubtreeModified : TExtDomElementOnDOMSubtreeModified read FOnDOMSubtreeModified write SetFOnDOMSubtreeModified; - property OnError : TExtDomElementOnError read FOnError write SetFOnError; - property OnFocus : TExtDomElementOnFocus read FOnFocus write SetFOnFocus; - property OnKeydown : TExtDomElementOnKeydown read FOnKeydown write SetFOnKeydown; - property OnKeypress : TExtDomElementOnKeypress read FOnKeypress write SetFOnKeypress; - property OnKeyup : TExtDomElementOnKeyup read FOnKeyup write SetFOnKeyup; - property OnLoad : TExtDomElementOnLoad read FOnLoad write SetFOnLoad; - property OnMousedown : TExtDomElementOnMousedown read FOnMousedown write SetFOnMousedown; - property OnMouseenter : TExtDomElementOnMouseenter read FOnMouseenter write SetFOnMouseenter; - property OnMouseleave : TExtDomElementOnMouseleave read FOnMouseleave write SetFOnMouseleave; - property OnMousemove : TExtDomElementOnMousemove read FOnMousemove write SetFOnMousemove; - property OnMouseout : TExtDomElementOnMouseout read FOnMouseout write SetFOnMouseout; - property OnMouseover : TExtDomElementOnMouseover read FOnMouseover write SetFOnMouseover; - property OnMouseup : TExtDomElementOnMouseup read FOnMouseup write SetFOnMouseup; - property OnReset : TExtDomElementOnReset read FOnReset write SetFOnReset; - property OnResize : TExtDomElementOnResize read FOnResize write SetFOnResize; - property OnScroll : TExtDomElementOnScroll read FOnScroll write SetFOnScroll; - property OnSelect : TExtDomElementOnSelect read FOnSelect write SetFOnSelect; - property OnSubmit : TExtDomElementOnSubmit read FOnSubmit write SetFOnSubmit; - property OnUnload : TExtDomElementOnUnload read FOnUnload write SetFOnUnload; + function SetSrc(Src : String) : TExtFunction; + property Alt : String read FAlt write SetFAlt; + property Glyph : Integer read FGlyph write SetFGlyph; + property GlyphString : String read FGlyphString write SetFGlyphString; + property ImgCls : String read FImgCls write SetFImgCls; + property Src : String read FSrc write SetFSrc; + property Title : String read FTitle write SetFTitle; end; - TExtDdStatusProxy = class(TExtComponent) - private - FDropAllowed : String; - FDropNotAllowed : String; - procedure SetFDropAllowed(Value : String); - procedure SetFDropNotAllowed(Value : String); + TExtMenuKeyNav = class(TExtUtilKeyNav) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function GetGhost : TExtFunction; - function Hide(Clear : Boolean) : TExtFunction; - function Repair(Xy : TArrayOfInteger; Callback : TExtFunction; Scope : TExtObject) : TExtFunction; - function Reset(ClearGhost : Boolean) : TExtFunction; - function SetStatus(CssClass : String) : TExtFunction; - function Stop : TExtFunction; - function Sync : TExtFunction; - function Update(Html : String) : TExtFunction; overload; - property DropAllowed : String read FDropAllowed write SetFDropAllowed; - property DropNotAllowed : String read FDropNotAllowed write SetFDropNotAllowed; end; - TExtDirectRemotingEvent = class(TExtDirectEvent) + TExtLayoutComponent = class(TExtLayout) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function GetTransaction : TExtFunction; + function GetRenderTarget : TExtFunction; + function GetTarget : TExtFunction; end; - TExtDirectJsonProvider = class(TExtDirectProvider) + TExtPluginManagerSingleton = class(TExtAbstractManager) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function CreateEvent(Response : TExtObject) : TExtFunction; - function CreateEvents(Response : TExtObject) : TExtFunction; + constructor Create(Config : TExtObject; DefaultType : TExtFunction = nil); + function FindByType(TypeJS : String; DefaultsOnly : Boolean) : TExtFunction; end; - TExtComponentLoader = class(TExtElementLoader) + TExtAppDomainDirectSingleton = class(TExtAppEventDomain) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + + TExtFormLabel = class(TExtComponent) private - FLoadMask : Boolean; - FLoadMaskObject : TExtObject; - FRenderer : String; - FRendererFunction : TExtFunction; - FScripts : Boolean; - FTarget : TExtComponent; - FTargetString : String; - procedure SetFLoadMask(Value : Boolean); - procedure SetFLoadMaskObject(Value : TExtObject); - procedure SetFRenderer(Value : String); - procedure SetFRendererFunction(Value : TExtFunction); - procedure SetFScripts(Value : Boolean); - procedure SetFTarget(Value : TExtComponent); - procedure SetFTargetString(Value : String); - protected - procedure InitDefaults; override; + FForId : String; + FHtml : String; + FText : String; + procedure SetFForId(Value : String); + procedure SetFHtml(Value : String); + procedure SetFText(Value : String); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - function SetTarget(Target : String) : TExtFunction; overload; - destructor Destroy; override; - property LoadMask : Boolean read FLoadMask write SetFLoadMask; - property LoadMaskObject : TExtObject read FLoadMaskObject write SetFLoadMaskObject; - property Renderer : String read FRenderer write SetFRenderer; - property RendererFunction : TExtFunction read FRendererFunction write SetFRendererFunction; - property Scripts : Boolean read FScripts write SetFScripts; - property Target : TExtComponent read FTarget write SetFTarget; - property TargetString : String read FTargetString write SetFTargetString; + function SetText(Text : String; Encode : Boolean = false) : TExtFunction; + property ForId : String read FForId write SetFForId; + property Html : String read FHtml write SetFHtml; + property Text : String read FText write SetFText; end; - TExtDdDDTarget = class(TExtDdDragDrop) + TExtAppDomainControllerSingleton = class(TExtAppEventDomain) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create(Id : String; SGroup : String; Config : TExtObject); end; - TExtDrawEngineSvg = class(TExtDrawSurface) + TExtAppDomainComponentSingleton = class(TExtAppEventDomain) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function ApplyZIndex(Sprite : TExtDrawSprite) : TExtFunction; - function GetRegion : TExtFunction; - function HasCls(Sprite : TExtDrawSprite; ClassName : String) : TExtFunction; + end; + + TExtDirectRemotingEvent = class(TExtDirectEvent) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function GetTransaction : TExtFunction; + end; + + TExtDataSequentialIdGenerator = class(TExtDataIdGenerator) + private + FPrefix : String; + FSeed : Integer; + procedure SetFPrefix(Value : String); + procedure SetFSeed(Value : Integer); + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function Generate : TExtFunction; + property Prefix : String read FPrefix write SetFPrefix; + property Seed : Integer read FSeed write SetFSeed; end; // Procedural types for events TExtContainerAbstractContainer @@ -7847,8 +7756,8 @@ TExtDrawEngineSvg = class(TExtDrawSurface) TExtContainerAbstractContainer = class(TExtComponent) private - FActiveItem : String; - FActiveItemInteger : Integer; + FActiveItem : Integer; + FActiveItemString : String; FAutoDestroy : Boolean; FBubbleEvents : TExtObjectList; FDefaults : TExtObject; @@ -7864,8 +7773,8 @@ TExtContainerAbstractContainer = class(TExtComponent) FOnBeforeadd : TExtContainerAbstractContainerOnBeforeadd; FOnBeforeremove : TExtContainerAbstractContainerOnBeforeremove; FOnRemove : TExtContainerAbstractContainerOnRemove; - procedure SetFActiveItem(Value : String); - procedure SetFActiveItemInteger(Value : Integer); + procedure SetFActiveItem(Value : Integer); + procedure SetFActiveItemString(Value : String); procedure SetFAutoDestroy(Value : Boolean); procedure SetFBubbleEvents(Value : TExtObjectList); procedure SetFDefaults(Value : TExtObject); @@ -7905,8 +7814,8 @@ TExtContainerAbstractContainer = class(TExtComponent) function Remove(Component : String; AutoDestroy : Boolean = false) : TExtFunction; overload; function RemoveAll(AutoDestroy : Boolean = false) : TExtFunction; destructor Destroy; override; - property ActiveItem : String read FActiveItem write SetFActiveItem; - property ActiveItemInteger : Integer read FActiveItemInteger write SetFActiveItemInteger; + property ActiveItem : Integer read FActiveItem write SetFActiveItem; + property ActiveItemString : String read FActiveItemString write SetFActiveItemString; property AutoDestroy : Boolean read FAutoDestroy write SetFAutoDestroy; property BubbleEvents : TExtObjectList read FBubbleEvents write SetFBubbleEvents; property Defaults : TExtObject read FDefaults write SetFDefaults; @@ -7924,11 +7833,274 @@ TExtContainerAbstractContainer = class(TExtComponent) property OnRemove : TExtContainerAbstractContainerOnRemove read FOnRemove write SetFOnRemove; end; - TExtDrawEngineVml = class(TExtDrawSurface) + TExtFlashComponent = class(TExtComponent) + private + FBackgroundColor : String; + FExpressInstall : Boolean; + FFlashAttributes : TExtObject; + FFlashParams : TExtObject; + FFlashVars : TExtObject; + FFlashVersion : String; + FSwf : TExtElement; + FSwfHeight : Integer; // 100 + FSwfHeightString : String; + FSwfWidth : Integer; // 100 + FSwfWidthString : String; + FUrl : String; + FWmode : String; + procedure SetFBackgroundColor(Value : String); + procedure SetFExpressInstall(Value : Boolean); + procedure SetFFlashAttributes(Value : TExtObject); + procedure SetFFlashParams(Value : TExtObject); + procedure SetFFlashVars(Value : TExtObject); + procedure SetFFlashVersion(Value : String); + procedure SetFSwf(Value : TExtElement); + procedure SetFSwfHeight(Value : Integer); + procedure SetFSwfHeightString(Value : String); + procedure SetFSwfWidth(Value : Integer); + procedure SetFSwfWidthString(Value : String); + procedure SetFUrl(Value : String); + procedure SetFWmode(Value : String); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; + destructor Destroy; override; + property BackgroundColor : String read FBackgroundColor write SetFBackgroundColor; + property ExpressInstall : Boolean read FExpressInstall write SetFExpressInstall; + property FlashAttributes : TExtObject read FFlashAttributes write SetFFlashAttributes; + property FlashParams : TExtObject read FFlashParams write SetFFlashParams; + property FlashVars : TExtObject read FFlashVars write SetFFlashVars; + property FlashVersion : String read FFlashVersion write SetFFlashVersion; + property Swf : TExtElement read FSwf write SetFSwf; + property SwfHeight : Integer read FSwfHeight write SetFSwfHeight; + property SwfHeightString : String read FSwfHeightString write SetFSwfHeightString; + property SwfWidth : Integer read FSwfWidth write SetFSwfWidth; + property SwfWidthString : String read FSwfWidthString write SetFSwfWidthString; + property Url : String read FUrl write SetFUrl; + property Wmode : String read FWmode write SetFWmode; + end; + + TExtFormBasic = class(TExtUtilObservable) + private + FApi : TExtObject; + FBaseParams : TExtObject; + FErrorReader : TExtObject; + FErrorReaderReader : TExtDataReader; + FJsonSubmit : Boolean; + FMethod : String; + FOwner : TExtContainer; + FParamOrder : String; + FParamOrderList : TExtObjectList; + FParamsAsHash : Boolean; + FReader : TExtObject; + FReaderReader : TExtDataReader; + FStandardSubmit : Boolean; + FTimeout : Integer; + FTrackResetOnLoad : Boolean; + FUrl : String; + FWaitMsgTarget : String; + FWaitMsgTargetElement : TExtElement; + FWaitMsgTargetTHTMLElement : THTMLElement; + FWaitTitle : String; + procedure SetFApi(Value : TExtObject); + procedure SetFBaseParams(Value : TExtObject); + procedure SetFErrorReader(Value : TExtObject); + procedure SetFErrorReaderReader(Value : TExtDataReader); + procedure SetFJsonSubmit(Value : Boolean); + procedure SetFMethod(Value : String); + procedure SetFOwner(Value : TExtContainer); + procedure SetFParamOrder(Value : String); + procedure SetFParamOrderList(Value : TExtObjectList); + procedure SetFParamsAsHash(Value : Boolean); + procedure SetFReader(Value : TExtObject); + procedure SetFReaderReader(Value : TExtDataReader); + procedure SetFStandardSubmit(Value : Boolean); + procedure SetFTimeout(Value : Integer); + procedure SetFTrackResetOnLoad(Value : Boolean); + procedure SetFUrl(Value : String); + procedure SetFWaitMsgTarget(Value : String); + procedure SetFWaitMsgTargetElement(Value : TExtElement); + procedure SetFWaitMsgTargetTHTMLElement(Value : THTMLElement); + procedure SetFWaitTitle(Value : String); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function ApplyIfToFields(Obj : TExtObject) : TExtFunction; + function ApplyToFields(Obj : TExtObject) : TExtFunction; + function CheckDirty : TExtFunction; + function CheckValidity : TExtFunction; + function ClearInvalid : TExtFunction; + constructor Create; + function DoAction(Action : String; Options : TExtObject = nil; OptionsUrl : String = ''; OptionsMethod : String = ''; OptionsParams : String = ''; OptionsHeaders : TExtObject = nil; OptionsSuccess : TExtFunction = nil; OptionsSuccessForm : TExtFormBasic = nil; OptionsSuccessAction : TExtFormAction = nil; OptionsFailure : TExtFunction = nil; OptionsFailureForm : TExtFormBasic = nil; OptionsFailureAction : TExtFormAction = nil; OptionsScope : TExtObject = nil; OptionsClientValidation : Boolean = false) : TExtFunction; overload; + function FindField(Id : String) : TExtFunction; + function GetFields : TExtFunction; + function GetFieldValues(DirtyOnly : Boolean = false) : TExtFunction; + function GetRecord : TExtFunction; + function GetValues(AsString : Boolean = false; DirtyOnly : Boolean = false; IncludeEmptyText : Boolean = false; UseDataValues : Boolean = false) : TExtFunction; + function HasInvalidField : TExtFunction; + function HasUpload : TExtFunction; + function IsDirty : TExtFunction; + function IsValid : TExtFunction; + function Load(Options : TExtObject) : TExtFunction; + function LoadRecord(RecordJS : TExtDataModel) : TExtFunction; + function MarkInvalid(Errors : TExtDataErrors) : TExtFunction; overload; + function Reset(ResetRecord : Boolean = false) : TExtFunction; + function SetValues(Values : TExtObject) : TExtFunction; overload; + function Submit(Options : TExtObject) : TExtFunction; + function UpdateRecord(RecordJS : TExtDataModel = nil) : TExtFunction; + destructor Destroy; override; + property Api : TExtObject read FApi write SetFApi; + property BaseParams : TExtObject read FBaseParams write SetFBaseParams; + property ErrorReader : TExtObject read FErrorReader write SetFErrorReader; + property ErrorReaderReader : TExtDataReader read FErrorReaderReader write SetFErrorReaderReader; + property JsonSubmit : Boolean read FJsonSubmit write SetFJsonSubmit; + property Method : String read FMethod write SetFMethod; + property Owner : TExtContainer read FOwner write SetFOwner; + property ParamOrder : String read FParamOrder write SetFParamOrder; + property ParamOrderList : TExtObjectList read FParamOrderList write SetFParamOrderList; + property ParamsAsHash : Boolean read FParamsAsHash write SetFParamsAsHash; + property Reader : TExtObject read FReader write SetFReader; + property ReaderReader : TExtDataReader read FReaderReader write SetFReaderReader; + property StandardSubmit : Boolean read FStandardSubmit write SetFStandardSubmit; + property Timeout : Integer read FTimeout write SetFTimeout; + property TrackResetOnLoad : Boolean read FTrackResetOnLoad write SetFTrackResetOnLoad; + property Url : String read FUrl write SetFUrl; + property WaitMsgTarget : String read FWaitMsgTarget write SetFWaitMsgTarget; + property WaitMsgTargetElement : TExtElement read FWaitMsgTargetElement write SetFWaitMsgTargetElement; + property WaitMsgTargetTHTMLElement : THTMLElement read FWaitMsgTargetTHTMLElement write SetFWaitMsgTargetTHTMLElement; + property WaitTitle : String read FWaitTitle write SetFWaitTitle; + end; + + TExtUtilGrouper = class(TExtUtilSorter) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function GetGroupString(Instance : TExtDataModel) : TExtFunction; + end; + + TExtAppDomainGlobalSingleton = class(TExtAppEventDomain) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + + TExtComponentLoader = class(TExtElementLoader) + private + FLoadMask : Boolean; + FLoadMaskObject : TExtObject; + FRenderer : String; + FRendererFunction : TExtFunction; + FScripts : Boolean; + FTarget : TExtComponent; + FTargetString : String; + procedure SetFLoadMask(Value : Boolean); + procedure SetFLoadMaskObject(Value : TExtObject); + procedure SetFRenderer(Value : String); + procedure SetFRendererFunction(Value : TExtFunction); + procedure SetFScripts(Value : Boolean); + procedure SetFTarget(Value : TExtComponent); + procedure SetFTargetString(Value : String); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; + function SetTarget(Target : String) : TExtFunction; overload; + destructor Destroy; override; + property LoadMask : Boolean read FLoadMask write SetFLoadMask; + property LoadMaskObject : TExtObject read FLoadMaskObject write SetFLoadMaskObject; + property Renderer : String read FRenderer write SetFRenderer; + property RendererFunction : TExtFunction read FRendererFunction write SetFRendererFunction; + property Scripts : Boolean read FScripts write SetFScripts; + property Target : TExtComponent read FTarget write SetFTarget; + property TargetString : String read FTargetString write SetFTargetString; + end; + + TExtDomHelperSingleton = class(TExtDomAbstractHelper) + private + FUseDom : Boolean; + procedure SetFUseDom(Value : Boolean); + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function CreateDom(O : String) : TExtFunction; overload; + function CreateHtml : TExtFunction; + function CreateTemplate(O : TExtObject) : TExtFunction; + function Overwrite(El : String; O : String; ReturnElement : Boolean = false) : TExtFunction; overload; + property UseDom : Boolean read FUseDom write SetFUseDom; + end; + + TExtDataAbstractStore = class(TExtDataModel) + private + FFilters : TExtObjectList; + procedure SetFFilters(Value : TExtObjectList); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; + function GetModifiedRecords : TExtFunction; + function GetNewRecords : TExtFunction; + function GetProxy : TExtFunction; + function GetRemovedRecords : TExtFunction; + function GetUpdatedRecords : TExtFunction; + function Load(Options : TExtObject = nil) : TExtFunction; + function Reload(Options : TExtObject) : TExtFunction; + function ResumeAutoSync : TExtFunction; + function SetProxy(Proxy : String) : TExtFunction; overload; + function SuspendAutoSync : TExtFunction; + function Sync(Options : TExtObject = nil; OptionsBatch : TExtDataBatch = nil; OptionsCallback : TExtFunction = nil; OptionsCallbackBatch : TExtDataBatch = nil; OptionsCallbackOptions : TExtObject = nil; OptionsSuccess : TExtFunction = nil; OptionsSuccessBatch : TExtDataBatch = nil; OptionsSuccessOptions : TExtObject = nil; OptionsFailure : TExtFunction = nil; OptionsFailureBatch : TExtDataBatch = nil; OptionsFailureOptions : TExtObject = nil; OptionsScope : TExtObject = nil) : TExtFunction; overload; + destructor Destroy; override; + property Filters : TExtObjectList read FFilters write SetFFilters; + end; + + TExtDrawComponent = class(TExtComponent) + private + FAutoSize : Boolean; + FEnginePriority : TExtObjectList; + FGradients : TExtObjectList; + FItems : TExtObjectList; + FSurface : TExtDrawSurface; + FViewBox : Boolean; + procedure SetFAutoSize(Value : Boolean); + procedure SetFEnginePriority(Value : TExtObjectList); + procedure SetFGradients(Value : TExtObjectList); + procedure SetFItems(Value : TExtObjectList); + procedure SetFSurface(Value : TExtDrawSurface); + procedure SetFViewBox(Value : Boolean); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; + destructor Destroy; override; + property AutoSize : Boolean read FAutoSize write SetFAutoSize; + property EnginePriority : TExtObjectList read FEnginePriority write SetFEnginePriority; + property Gradients : TExtObjectList read FGradients write SetFGradients; + property Items : TExtObjectList read FItems write SetFItems; + property Surface : TExtDrawSurface read FSurface write SetFSurface; + property ViewBox : Boolean read FViewBox write SetFViewBox; + end; + + TExtDdDDTarget = class(TExtDdDragDrop) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create(Id : String; SGroup : String; Config : TExtObject); + end; + + TExtXTemplateCompiler = class(TExtXTemplateParser) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function AddGradient(Gradient : TExtObject) : TExtFunction; end; TExtAjaxSingleton = class(TExtDataConnection) @@ -7962,195 +8134,188 @@ TExtAjaxSingleton = class(TExtDataConnection) property Url : String read FUrl write SetFUrl; end; - TExtDomHelperSingleton = class(TExtDomAbstractHelper) + TExtUtilComponentDragger = class(TExtDdDragTracker) private - FUseDom : Boolean; - procedure SetFUseDom(Value : Boolean); + FConstrain : Boolean; + FConstrainDelegate : Boolean; + FDelegate : String; + FDelegateElement : TExtElement; + procedure SetFConstrain(Value : Boolean); + procedure SetFConstrainDelegate(Value : Boolean); + procedure SetFDelegate(Value : String); + procedure SetFDelegateElement(Value : TExtElement); + protected + procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function CreateDom(O : String) : TExtFunction; overload; - function CreateHtml : TExtFunction; - function CreateTemplate(O : TExtObject) : TExtFunction; - function Overwrite(El : String; O : String; ReturnElement : Boolean = false) : TExtFunction; overload; - property UseDom : Boolean read FUseDom write SetFUseDom; + constructor Create; overload; + destructor Destroy; override; + property Constrain : Boolean read FConstrain write SetFConstrain; + property ConstrainDelegate : Boolean read FConstrainDelegate write SetFConstrainDelegate; + property Delegate : String read FDelegate write SetFDelegate; + property DelegateElement : TExtElement read FDelegateElement write SetFDelegateElement; end; - TExtDdDD = class(TExtDdDragDrop) + TExtUtilClickRepeater = class(TExtUtilObservable) private - FScroll : Boolean; - procedure SetFScroll(Value : Boolean); + FAccelerate : Boolean; + FDelay : Integer; + FEl : String; + FElElement : TExtElement; + FElTHTMLElement : THTMLElement; + FInterval : Integer; + FPressedCls : String; + FPreventDefault : Boolean; + FStopDefault : Boolean; + procedure SetFAccelerate(Value : Boolean); + procedure SetFDelay(Value : Integer); + procedure SetFEl(Value : String); + procedure SetFElElement(Value : TExtElement); + procedure SetFElTHTMLElement(Value : THTMLElement); + procedure SetFInterval(Value : Integer); + procedure SetFPressedCls(Value : String); + procedure SetFPreventDefault(Value : Boolean); + procedure SetFStopDefault(Value : Boolean); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; + function Disable : TExtFunction; + function Enable : TExtFunction; + function SetDisabled(Disabled : Boolean) : TExtFunction; + destructor Destroy; override; + property Accelerate : Boolean read FAccelerate write SetFAccelerate; + property Delay : Integer read FDelay write SetFDelay; + property El : String read FEl write SetFEl; + property ElElement : TExtElement read FElElement write SetFElElement; + property ElTHTMLElement : THTMLElement read FElTHTMLElement write SetFElTHTMLElement; + property Interval : Integer read FInterval write SetFInterval; + property PressedCls : String read FPressedCls write SetFPressedCls; + property PreventDefault : Boolean read FPreventDefault write SetFPreventDefault; + property StopDefault : Boolean read FStopDefault write SetFStopDefault; + end; + + TExtComponentManagerSingleton = class(TExtAbstractManager) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create(Config : TExtObject; DefaultType : String = ''); + end; + + TExtXTemplate = class(TExtTemplate) + private + FDefinitions : String; + FDefinitionsList : TExtObjectList; + procedure SetFDefinitions(Value : String); + procedure SetFDefinitionsList(Value : TExtObjectList); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function Compile : TExtFunction; + constructor Create; + destructor Destroy; override; + property Definitions : String read FDefinitions write SetFDefinitions; + property DefinitionsList : TExtObjectList read FDefinitionsList write SetFDefinitionsList; + end; + + TExtAppApplication = class(TExtAppController) + private + FAppFolder : String; + FAppProperty : String; + FAutoCreateViewport : Boolean; + FControllers : TExtObjectList; + FEnableQuickTips : Boolean; + FName : String; + FNamespaces : TExtObjectList; + FPaths : TExtObject; + FScope : TExtObject; + procedure SetFAppFolder(Value : String); + procedure SetFAppProperty(Value : String); + procedure SetFAutoCreateViewport(Value : Boolean); + procedure SetFControllers(Value : TExtObjectList); + procedure SetFEnableQuickTips(Value : Boolean); + procedure SetFName(Value : String); + procedure SetFNamespaces(Value : TExtObjectList); + procedure SetFPaths(Value : TExtObject); + procedure SetFScope(Value : TExtObject); + protected + procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function AlignElWithMouse(El : THTMLElement; IPageX : Integer; IPageY : Integer) : TExtFunction; - function ApplyConfig : TExtFunction; - function AutoOffset(IPageX : Integer; IPageY : Integer) : TExtFunction; - function B4Drag : TExtFunction; - function B4MouseDown : TExtFunction; - function CachePosition(IPageX : Integer = 0; IPageY : Integer = 0) : TExtFunction; - function SetDelta(IDeltaX : Integer; IDeltaY : Integer) : TExtFunction; - function SetDragElPos(IPageX : Integer; IPageY : Integer) : TExtFunction; - property Scroll : Boolean read FScroll write SetFScroll; + constructor Create; overload; + destructor Destroy; override; + property AppFolder : String read FAppFolder write SetFAppFolder; + property AppProperty : String read FAppProperty write SetFAppProperty; + property AutoCreateViewport : Boolean read FAutoCreateViewport write SetFAutoCreateViewport; + property Controllers : TExtObjectList read FControllers write SetFControllers; + property EnableQuickTips : Boolean read FEnableQuickTips write SetFEnableQuickTips; + property Name : String read FName write SetFName; + property Namespaces : TExtObjectList read FNamespaces write SetFNamespaces; + property Paths : TExtObject read FPaths write SetFPaths; + property Scope : TExtObject read FScope write SetFScope; end; - TExtDrawComponent = class(TExtComponent) + TExtDataUuidGenerator = class(TExtDataIdGenerator) private - FAutoSize : Boolean; - FEnginePriority : TExtObjectList; - FGradients : TExtObjectList; - FItems : TExtObjectList; - FSurface : TExtDrawSurface; - FViewBox : Boolean; - procedure SetFAutoSize(Value : Boolean); - procedure SetFEnginePriority(Value : TExtObjectList); - procedure SetFGradients(Value : TExtObjectList); - procedure SetFItems(Value : TExtObjectList); - procedure SetFSurface(Value : TExtDrawSurface); - procedure SetFViewBox(Value : Boolean); + FSalt : Integer; + FSaltObject : TExtObject; + FTimestamp : Integer; + FTimestampObject : TExtObject; + FVersion : Integer; + procedure SetFSalt(Value : Integer); + procedure SetFSaltObject(Value : TExtObject); + procedure SetFTimestamp(Value : Integer); + procedure SetFTimestampObject(Value : TExtObject); + procedure SetFVersion(Value : Integer); protected procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} constructor Create; + function Reconfigure : TExtFunction; destructor Destroy; override; - property AutoSize : Boolean read FAutoSize write SetFAutoSize; - property EnginePriority : TExtObjectList read FEnginePriority write SetFEnginePriority; - property Gradients : TExtObjectList read FGradients write SetFGradients; - property Items : TExtObjectList read FItems write SetFItems; - property Surface : TExtDrawSurface read FSurface write SetFSurface; - property ViewBox : Boolean read FViewBox write SetFViewBox; + property Salt : Integer read FSalt write SetFSalt; + property SaltObject : TExtObject read FSaltObject write SetFSaltObject; + property Timestamp : Integer read FTimestamp write SetFTimestamp; + property TimestampObject : TExtObject read FTimestampObject write SetFTimestampObject; + property Version : Integer read FVersion write SetFVersion; end; - TExtAppDomainStoreSingleton = class(TExtAppEventDomain) + TExtDataTreeModel = class(TExtDataModel) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtPluginManagerSingleton = class(TExtAbstractManager) + TExtToolbarSpacer = class(TExtComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create(Config : TExtObject; DefaultType : TExtFunction = nil); - function FindByType(TypeJS : String; DefaultsOnly : Boolean) : TExtFunction; end; - TExtToolbarFill = class(TExtComponent) - private - FIsFill : Boolean; - procedure SetFIsFill(Value : Boolean); + TExtFxTargetSprite = class(TExtFxTarget) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - property IsFill : Boolean read FIsFill write SetFIsFill; end; - TExtTreePluginTreeViewDragDrop = class(TExtAbstractPlugin) - private - FAllowContainerDrops : Boolean; - FAllowParentInserts : Boolean; - FAppendOnly : Boolean; - FContainerScroll : TExtObject; - FContainerScrollBoolean : Boolean; - FDdGroup : String; - FDisplayField : String; - FDropGroup : String; - FEnableDrag : Boolean; - FEnableDrop : Boolean; - FExpandDelay : String; - FNodeHighlightColor : String; - FNodeHighlightOnDrop : Boolean; - FNodeHighlightOnRepair : Boolean; - FSortOnDrop : Boolean; - procedure SetFAllowContainerDrops(Value : Boolean); - procedure SetFAllowParentInserts(Value : Boolean); - procedure SetFAppendOnly(Value : Boolean); - procedure SetFContainerScroll(Value : TExtObject); - procedure SetFContainerScrollBoolean(Value : Boolean); - procedure SetFDdGroup(Value : String); - procedure SetFDisplayField(Value : String); - procedure SetFDropGroup(Value : String); - procedure SetFEnableDrag(Value : Boolean); - procedure SetFEnableDrop(Value : Boolean); - procedure SetFExpandDelay(Value : String); - procedure SetFNodeHighlightColor(Value : String); - procedure SetFNodeHighlightOnDrop(Value : Boolean); - procedure SetFNodeHighlightOnRepair(Value : Boolean); - procedure SetFSortOnDrop(Value : Boolean); - protected - procedure InitDefaults; override; + TExtFormActionLoad = class(TExtFormAction) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - destructor Destroy; override; - property AllowContainerDrops : Boolean read FAllowContainerDrops write SetFAllowContainerDrops; - property AllowParentInserts : Boolean read FAllowParentInserts write SetFAllowParentInserts; - property AppendOnly : Boolean read FAppendOnly write SetFAppendOnly; - property ContainerScroll : TExtObject read FContainerScroll write SetFContainerScroll; - property ContainerScrollBoolean : Boolean read FContainerScrollBoolean write SetFContainerScrollBoolean; - property DdGroup : String read FDdGroup write SetFDdGroup; - property DisplayField : String read FDisplayField write SetFDisplayField; - property DropGroup : String read FDropGroup write SetFDropGroup; - property EnableDrag : Boolean read FEnableDrag write SetFEnableDrag; - property EnableDrop : Boolean read FEnableDrop write SetFEnableDrop; - property ExpandDelay : String read FExpandDelay write SetFExpandDelay; - property NodeHighlightColor : String read FNodeHighlightColor write SetFNodeHighlightColor; - property NodeHighlightOnDrop : Boolean read FNodeHighlightOnDrop write SetFNodeHighlightOnDrop; - property NodeHighlightOnRepair : Boolean read FNodeHighlightOnRepair write SetFNodeHighlightOnRepair; - property SortOnDrop : Boolean read FSortOnDrop write SetFSortOnDrop; end; - // Procedural types for events TExtProgressBar - TExtProgressBarOnUpdate = procedure(This : TExtProgressBar; Value : Integer; Text : String) of object; - - TExtProgressBar = class(TExtComponent) - private - FAnimate : Boolean; - FAnimateObject : TExtObject; - FBaseCls : String; - FId : String; - FText : String; - FTextEl : String; - FTextElElement : TExtElement; - FTextElTHTMLElement : THTMLElement; - FValue : Integer; - FOnUpdate : TExtProgressBarOnUpdate; - procedure SetFAnimate(Value : Boolean); - procedure SetFAnimateObject(Value : TExtObject); - procedure SetFBaseCls(Value : String); - procedure SetFId(Value : String); - procedure SetFText(Value : String); - procedure SetFTextEl(Value : String); - procedure SetFTextElElement(Value : TExtElement); - procedure SetFTextElTHTMLElement(Value : THTMLElement); - procedure SetFValue(Value : Integer); - procedure SetFOnUpdate(Value : TExtProgressBarOnUpdate); - protected - procedure InitDefaults; override; - procedure HandleEvent(const AEvtName: string); override; + TExtFxTargetElement = class(TExtFxTarget) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - function IsWaiting : TExtFunction; - function Reset(Hide : Boolean = false) : TExtFunction; - function UpdateProgress(Value : Integer = 0; Text : String = ''; Animate : Boolean = false) : TExtFunction; - function UpdateText(Text : String = '') : TExtFunction; - function Wait(Config : TExtObject = nil; ConfigDuration : Integer = 0; ConfigInterval : Integer = 0; ConfigAnimate : Boolean = false; ConfigIncrement : Integer = 0; ConfigText : String = ''; ConfigFn : TExtFunction = nil; ConfigScope : TExtObject = nil) : TExtFunction; - destructor Destroy; override; - property Animate : Boolean read FAnimate write SetFAnimate; - property AnimateObject : TExtObject read FAnimateObject write SetFAnimateObject; - property BaseCls : String read FBaseCls write SetFBaseCls; - property Id : String read FId write SetFId; - property Text : String read FText write SetFText; - property TextEl : String read FTextEl write SetFTextEl; - property TextElElement : TExtElement read FTextElElement write SetFTextElElement; - property TextElTHTMLElement : THTMLElement read FTextElTHTMLElement write SetFTextElTHTMLElement; - property Value : Integer read FValue write SetFValue; - property OnUpdate : TExtProgressBarOnUpdate read FOnUpdate write SetFOnUpdate; end; TExtDataProxyServer = class(TExtDataProxy) @@ -8221,81 +8386,47 @@ TExtDataProxyServer = class(TExtDataProxy) property Url : String read FUrl write SetFUrl; end; - TExtDataReader = class(TExtDataModel) + TExtViewBoundListKeyNav = class(TExtUtilKeyNav) + private + FBoundList : TExtViewBoundList; + procedure SetFBoundList(Value : TExtViewBoundList); + protected + procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; + function HighlightAt(Index : Integer) : TExtFunction; + function SelectHighlighted : TExtFunction; + destructor Destroy; override; + property BoundList : TExtViewBoundList read FBoundList write SetFBoundList; end; - // Procedural types for events TExtPickerDate - TExtPickerDateOnSelect = procedure(This : TExtPickerDate; Date : TDateTime) of object; + // Procedural types for events TExtProgressBar + TExtProgressBarOnUpdate = procedure(This : TExtProgressBar; Value : Integer; Text : String) of object; - TExtPickerDate = class(TExtComponent) + TExtProgressBar = class(TExtComponent) private - FAriaTitle : String; - FAriaTitleDateFormat : String; + FAnimate : Boolean; + FAnimateObject : TExtObject; FBaseCls : String; - FDayNames : TExtObjectList; - FDisableAnim : Boolean; - FDisabledCellCls : String; - FDisabledDates : TExtObjectList; - FDisabledDatesRE : TRegExp; - FDisabledDatesText : String; - FDisabledDays : TArrayOfInteger; - FDisabledDaysText : String; - FFocusOnShow : Boolean; - FFormat : String; - FHandler : TExtFunction; - FKeyNavConfig : TExtObject; - FLongDayFormat : String; - FMaxDate : TDateTime; - FMaxText : String; - FMinDate : TDateTime; - FMinText : String; - FMonthNames : TExtObjectList; - FMonthYearFormat : String; - FMonthYearText : String; - FNextText : String; - FPrevText : String; - FScope : TExtObject; - FSelectedCls : String; - FShowToday : Boolean; - FStartDay : Integer; // 0 - FTodayText : String; - FTodayTip : String; - FOnSelect : TExtPickerDateOnSelect; - procedure SetFAriaTitle(Value : String); - procedure SetFAriaTitleDateFormat(Value : String); + FId : String; + FText : String; + FTextEl : String; + FTextElElement : TExtElement; + FTextElTHTMLElement : THTMLElement; + FValue : Integer; + FOnUpdate : TExtProgressBarOnUpdate; + procedure SetFAnimate(Value : Boolean); + procedure SetFAnimateObject(Value : TExtObject); procedure SetFBaseCls(Value : String); - procedure SetFDayNames(Value : TExtObjectList); - procedure SetFDisableAnim(Value : Boolean); - procedure SetFDisabledCellCls(Value : String); - procedure SetFDisabledDates(Value : TExtObjectList); - procedure SetFDisabledDatesRE(Value : TRegExp); - procedure SetFDisabledDatesText(Value : String); - procedure SetFDisabledDays(Value : TArrayOfInteger); - procedure SetFDisabledDaysText(Value : String); - procedure SetFFocusOnShow(Value : Boolean); - procedure SetFFormat(Value : String); - procedure SetFHandler(Value : TExtFunction); - procedure SetFKeyNavConfig(Value : TExtObject); - procedure SetFLongDayFormat(Value : String); - procedure SetFMaxDate(Value : TDateTime); - procedure SetFMaxText(Value : String); - procedure SetFMinDate(Value : TDateTime); - procedure SetFMinText(Value : String); - procedure SetFMonthNames(Value : TExtObjectList); - procedure SetFMonthYearFormat(Value : String); - procedure SetFMonthYearText(Value : String); - procedure SetFNextText(Value : String); - procedure SetFPrevText(Value : String); - procedure SetFScope(Value : TExtObject); - procedure SetFSelectedCls(Value : String); - procedure SetFShowToday(Value : Boolean); - procedure SetFStartDay(Value : Integer); - procedure SetFTodayText(Value : String); - procedure SetFTodayTip(Value : String); - procedure SetFOnSelect(Value : TExtPickerDateOnSelect); + procedure SetFId(Value : String); + procedure SetFText(Value : String); + procedure SetFTextEl(Value : String); + procedure SetFTextElElement(Value : TExtElement); + procedure SetFTextElTHTMLElement(Value : THTMLElement); + procedure SetFValue(Value : Integer); + procedure SetFOnUpdate(Value : TExtProgressBarOnUpdate); protected procedure InitDefaults; override; procedure HandleEvent(const AEvtName: string); override; @@ -8303,378 +8434,658 @@ TExtPickerDate = class(TExtComponent) function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} constructor Create; - function GetDayInitial : TExtFunction; - function GetValue : TExtFunction; - function HideMonthPicker(Animate : Boolean = false) : TExtFunction; - function SelectToday : TExtFunction; - function SetDisabledDates(DisabledDates : TExtObjectList) : TExtFunction; overload; - function SetDisabledDays(DisabledDays : TArrayOfInteger) : TExtFunction; - function SetMaxDate(Value : TDateTime) : TExtFunction; - function SetMinDate(Value : TDateTime) : TExtFunction; - function SetValue(Value : TDateTime) : TExtFunction; - function ShowMonthPicker(Animate : Boolean = false) : TExtFunction; - function ShowNextMonth(E : TExtObject) : TExtFunction; - function ShowNextYear : TExtFunction; - function ShowPrevMonth(E : TExtObject) : TExtFunction; - function ShowPrevYear : TExtFunction; + function IsWaiting : TExtFunction; + function Reset(Hide : Boolean = false) : TExtFunction; + function UpdateProgress(Value : Integer = 0; Text : String = ''; Animate : Boolean = false) : TExtFunction; + function UpdateText(Text : String = '') : TExtFunction; + function Wait(Config : TExtObject = nil; ConfigDuration : Integer = 0; ConfigInterval : Integer = 0; ConfigAnimate : Boolean = false; ConfigIncrement : Integer = 0; ConfigText : String = ''; ConfigFn : TExtFunction = nil; ConfigScope : TExtObject = nil) : TExtFunction; destructor Destroy; override; - property AriaTitle : String read FAriaTitle write SetFAriaTitle; - property AriaTitleDateFormat : String read FAriaTitleDateFormat write SetFAriaTitleDateFormat; + property Animate : Boolean read FAnimate write SetFAnimate; + property AnimateObject : TExtObject read FAnimateObject write SetFAnimateObject; property BaseCls : String read FBaseCls write SetFBaseCls; - property DayNames : TExtObjectList read FDayNames write SetFDayNames; - property DisableAnim : Boolean read FDisableAnim write SetFDisableAnim; - property DisabledCellCls : String read FDisabledCellCls write SetFDisabledCellCls; - property DisabledDates : TExtObjectList read FDisabledDates write SetFDisabledDates; - property DisabledDatesRE : TRegExp read FDisabledDatesRE write SetFDisabledDatesRE; - property DisabledDatesText : String read FDisabledDatesText write SetFDisabledDatesText; - property DisabledDays : TArrayOfInteger read FDisabledDays write SetFDisabledDays; - property DisabledDaysText : String read FDisabledDaysText write SetFDisabledDaysText; - property FocusOnShow : Boolean read FFocusOnShow write SetFFocusOnShow; - property Format : String read FFormat write SetFFormat; - property Handler : TExtFunction read FHandler write SetFHandler; - property KeyNavConfig : TExtObject read FKeyNavConfig write SetFKeyNavConfig; - property LongDayFormat : String read FLongDayFormat write SetFLongDayFormat; - property MaxDate : TDateTime read FMaxDate write SetFMaxDate; - property MaxText : String read FMaxText write SetFMaxText; - property MinDate : TDateTime read FMinDate write SetFMinDate; - property MinText : String read FMinText write SetFMinText; - property MonthNames : TExtObjectList read FMonthNames write SetFMonthNames; - property MonthYearFormat : String read FMonthYearFormat write SetFMonthYearFormat; - property MonthYearText : String read FMonthYearText write SetFMonthYearText; - property NextText : String read FNextText write SetFNextText; - property PrevText : String read FPrevText write SetFPrevText; - property Scope : TExtObject read FScope write SetFScope; - property SelectedCls : String read FSelectedCls write SetFSelectedCls; - property ShowToday : Boolean read FShowToday write SetFShowToday; - property StartDay : Integer read FStartDay write SetFStartDay; - property TodayText : String read FTodayText write SetFTodayText; - property TodayTip : String read FTodayTip write SetFTodayTip; - property OnSelect : TExtPickerDateOnSelect read FOnSelect write SetFOnSelect; + property Id : String read FId write SetFId; + property Text : String read FText write SetFText; + property TextEl : String read FTextEl write SetFTextEl; + property TextElElement : TExtElement read FTextElElement write SetFTextElElement; + property TextElTHTMLElement : THTMLElement read FTextElTHTMLElement write SetFTextElTHTMLElement; + property Value : Integer read FValue write SetFValue; + property OnUpdate : TExtProgressBarOnUpdate read FOnUpdate write SetFOnUpdate; end; - TExtToolbarSpacer = class(TExtComponent) + TExtToolbarFill = class(TExtComponent) + private + FIsFill : Boolean; + procedure SetFIsFill(Value : Boolean); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + property IsFill : Boolean read FIsFill write SetFIsFill; end; - // Procedural types for events TExtPickerMonth - TExtPickerMonthOnCancelclick = procedure(This : TExtPickerMonth) of object; - TExtPickerMonthOnMonthclick = procedure(This : TExtPickerMonth; Value : TExtObjectList) of object; - TExtPickerMonthOnMonthdblclick = procedure(This : TExtPickerMonth; Value : TExtObjectList) of object; - TExtPickerMonthOnOkclick = procedure(This : TExtPickerMonth; Value : TExtObjectList) of object; - TExtPickerMonthOnSelect = procedure(This : TExtPickerMonth; Value : TExtObjectList) of object; - TExtPickerMonthOnYearclick = procedure(This : TExtPickerMonth; Value : TExtObjectList) of object; - TExtPickerMonthOnYeardblclick = procedure(This : TExtPickerMonth; Value : TExtObjectList) of object; + TExtDrawEngineSvg = class(TExtDrawSurface) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function ApplyZIndex(Sprite : TExtDrawSprite) : TExtFunction; + function GetRegion : TExtFunction; + function HasCls(Sprite : TExtDrawSprite; ClassName : String) : TExtFunction; + end; - TExtPickerMonth = class(TExtComponent) + TExtToolbarItem = class(TExtComponent) private - FBaseCls : String; - FCancelText : String; - FOkText : String; - FSelectedCls : String; - FShowButtons : Boolean; - FValue : TDateTime; - FValueTArrayOfInteger : TArrayOfInteger; - FOnCancelclick : TExtPickerMonthOnCancelclick; - FOnMonthclick : TExtPickerMonthOnMonthclick; - FOnMonthdblclick : TExtPickerMonthOnMonthdblclick; - FOnOkclick : TExtPickerMonthOnOkclick; - FOnSelect : TExtPickerMonthOnSelect; - FOnYearclick : TExtPickerMonthOnYearclick; - FOnYeardblclick : TExtPickerMonthOnYeardblclick; - procedure SetFBaseCls(Value : String); - procedure SetFCancelText(Value : String); - procedure SetFOkText(Value : String); - procedure SetFSelectedCls(Value : String); - procedure SetFShowButtons(Value : Boolean); - procedure SetFValue(Value : TDateTime); - procedure SetFValueTArrayOfInteger(Value : TArrayOfInteger); - procedure SetFOnCancelclick(Value : TExtPickerMonthOnCancelclick); - procedure SetFOnMonthclick(Value : TExtPickerMonthOnMonthclick); - procedure SetFOnMonthdblclick(Value : TExtPickerMonthOnMonthdblclick); - procedure SetFOnOkclick(Value : TExtPickerMonthOnOkclick); - procedure SetFOnSelect(Value : TExtPickerMonthOnSelect); - procedure SetFOnYearclick(Value : TExtPickerMonthOnYearclick); - procedure SetFOnYeardblclick(Value : TExtPickerMonthOnYeardblclick); + FOverflowText : String; + procedure SetFOverflowText(Value : String); + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + property OverflowText : String read FOverflowText write SetFOverflowText; + end; + + TExtDataReader = class(TExtDataModel) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + + TExtFormActionSubmit = class(TExtFormAction) + private + FClientValidation : Boolean; + procedure SetFClientValidation(Value : Boolean); + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + property ClientValidation : Boolean read FClientValidation write SetFClientValidation; + end; + + TExtResizerResizeTracker = class(TExtDdDragTracker) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function CreateProxy(Target : TExtComponent) : TExtFunction; overload; + end; + + TExtResizerSplitterTracker = class(TExtDdDragTracker) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + + TExtResizerSplitter = class(TExtComponent) + private + FCollapsedCls : String; + FCollapseOnDblClick : Boolean; + FCollapseTarget : String; + FCollapseTargetPanel : TExtPanel; + FCollapsible : Boolean; + FDefaultSplitMax : Integer; + FDefaultSplitMin : Integer; + FOrientation : String; + FPerformCollapse : Boolean; + FSize : Integer; + procedure SetFCollapsedCls(Value : String); + procedure SetFCollapseOnDblClick(Value : Boolean); + procedure SetFCollapseTarget(Value : String); + procedure SetFCollapseTargetPanel(Value : TExtPanel); + procedure SetFCollapsible(Value : Boolean); + procedure SetFDefaultSplitMax(Value : Integer); + procedure SetFDefaultSplitMin(Value : Integer); + procedure SetFOrientation(Value : String); + procedure SetFPerformCollapse(Value : Boolean); + procedure SetFSize(Value : Integer); protected - procedure HandleEvent(const AEvtName: string); override; + procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function AdjustYear(Offset : Integer = 0) : TExtFunction; - function GetValue : TExtFunction; - function HasSelection : TExtFunction; - function SetValue(Value : TArrayOfInteger) : TExtFunction; overload; - property BaseCls : String read FBaseCls write SetFBaseCls; - property CancelText : String read FCancelText write SetFCancelText; - property OkText : String read FOkText write SetFOkText; - property SelectedCls : String read FSelectedCls write SetFSelectedCls; - property ShowButtons : Boolean read FShowButtons write SetFShowButtons; - property Value : TDateTime read FValue write SetFValue; - property ValueTArrayOfInteger : TArrayOfInteger read FValueTArrayOfInteger write SetFValueTArrayOfInteger; - property OnCancelclick : TExtPickerMonthOnCancelclick read FOnCancelclick write SetFOnCancelclick; - property OnMonthclick : TExtPickerMonthOnMonthclick read FOnMonthclick write SetFOnMonthclick; - property OnMonthdblclick : TExtPickerMonthOnMonthdblclick read FOnMonthdblclick write SetFOnMonthdblclick; - property OnOkclick : TExtPickerMonthOnOkclick read FOnOkclick write SetFOnOkclick; - property OnSelect : TExtPickerMonthOnSelect read FOnSelect write SetFOnSelect; - property OnYearclick : TExtPickerMonthOnYearclick read FOnYearclick write SetFOnYearclick; - property OnYeardblclick : TExtPickerMonthOnYeardblclick read FOnYeardblclick write SetFOnYeardblclick; + constructor Create; + destructor Destroy; override; + property CollapsedCls : String read FCollapsedCls write SetFCollapsedCls; + property CollapseOnDblClick : Boolean read FCollapseOnDblClick write SetFCollapseOnDblClick; + property CollapseTarget : String read FCollapseTarget write SetFCollapseTarget; + property CollapseTargetPanel : TExtPanel read FCollapseTargetPanel write SetFCollapseTargetPanel; + property Collapsible : Boolean read FCollapsible write SetFCollapsible; + property DefaultSplitMax : Integer read FDefaultSplitMax write SetFDefaultSplitMax; + property DefaultSplitMin : Integer read FDefaultSplitMin write SetFDefaultSplitMin; + property Orientation : String read FOrientation write SetFOrientation; + property PerformCollapse : Boolean read FPerformCollapse write SetFPerformCollapse; + property Size : Integer read FSize write SetFSize; + end; + + TExtTreePluginTreeViewDragDrop = class(TExtAbstractPlugin) + private + FAllowContainerDrops : Boolean; + FAllowParentInserts : Boolean; + FAppendOnly : Boolean; + FContainerScroll : TExtObject; + FContainerScrollBoolean : Boolean; + FDdGroup : String; + FDisplayField : String; + FDropGroup : String; + FEnableDrag : Boolean; + FEnableDrop : Boolean; + FExpandDelay : String; + FNodeHighlightColor : String; + FNodeHighlightOnDrop : Boolean; + FNodeHighlightOnRepair : Boolean; + FSortOnDrop : Boolean; + procedure SetFAllowContainerDrops(Value : Boolean); + procedure SetFAllowParentInserts(Value : Boolean); + procedure SetFAppendOnly(Value : Boolean); + procedure SetFContainerScroll(Value : TExtObject); + procedure SetFContainerScrollBoolean(Value : Boolean); + procedure SetFDdGroup(Value : String); + procedure SetFDisplayField(Value : String); + procedure SetFDropGroup(Value : String); + procedure SetFEnableDrag(Value : Boolean); + procedure SetFEnableDrop(Value : Boolean); + procedure SetFExpandDelay(Value : String); + procedure SetFNodeHighlightColor(Value : String); + procedure SetFNodeHighlightOnDrop(Value : Boolean); + procedure SetFNodeHighlightOnRepair(Value : Boolean); + procedure SetFSortOnDrop(Value : Boolean); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; + destructor Destroy; override; + property AllowContainerDrops : Boolean read FAllowContainerDrops write SetFAllowContainerDrops; + property AllowParentInserts : Boolean read FAllowParentInserts write SetFAllowParentInserts; + property AppendOnly : Boolean read FAppendOnly write SetFAppendOnly; + property ContainerScroll : TExtObject read FContainerScroll write SetFContainerScroll; + property ContainerScrollBoolean : Boolean read FContainerScrollBoolean write SetFContainerScrollBoolean; + property DdGroup : String read FDdGroup write SetFDdGroup; + property DisplayField : String read FDisplayField write SetFDisplayField; + property DropGroup : String read FDropGroup write SetFDropGroup; + property EnableDrag : Boolean read FEnableDrag write SetFEnableDrag; + property EnableDrop : Boolean read FEnableDrop write SetFEnableDrop; + property ExpandDelay : String read FExpandDelay write SetFExpandDelay; + property NodeHighlightColor : String read FNodeHighlightColor write SetFNodeHighlightColor; + property NodeHighlightOnDrop : Boolean read FNodeHighlightOnDrop write SetFNodeHighlightOnDrop; + property NodeHighlightOnRepair : Boolean read FNodeHighlightOnRepair write SetFNodeHighlightOnRepair; + property SortOnDrop : Boolean read FSortOnDrop write SetFSortOnDrop; end; - TExtFormLabel = class(TExtComponent) - private - FForId : String; - FHtml : String; - FText : String; - procedure SetFForId(Value : String); - procedure SetFHtml(Value : String); - procedure SetFText(Value : String); + TExtResizerHandle = class(TExtComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function SetText(Text : String; Encode : Boolean = false) : TExtFunction; - property ForId : String read FForId write SetFForId; - property Html : String read FHtml write SetFHtml; - property Text : String read FText write SetFText; end; - TExtToolbarItem = class(TExtComponent) - private - FOverflowText : String; - procedure SetFOverflowText(Value : String); + TExtDirectJsonProvider = class(TExtDirectProvider) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - property OverflowText : String read FOverflowText write SetFOverflowText; + function CreateEvent(Response : TExtObject) : TExtFunction; + function CreateEvents(Response : TExtObject) : TExtFunction; end; - // Procedural types for events TExtPickerColor - TExtPickerColorOnSelect = procedure(This : TExtPickerColor; Color : String) of object; + // Procedural types for events TExtFormFieldBase + TExtFormFieldBaseOnErrorchange = procedure(This : TExtFormLabelable; Error : String) of object; - TExtPickerColor = class(TExtComponent) + TExtFormFieldBase = class(TExtComponent) private - FAllowReselect : Boolean; - FClickEvent : String; - FComponentCls : String; - FHandler : TExtFunction; - FItemCls : String; - FScope : TExtObject; - FSelectedCls : String; - FValue : String; - FOnSelect : TExtPickerColorOnSelect; - procedure SetFAllowReselect(Value : Boolean); - procedure SetFClickEvent(Value : String); - procedure SetFComponentCls(Value : String); - procedure SetFHandler(Value : TExtFunction); - procedure SetFItemCls(Value : String); - procedure SetFScope(Value : TExtObject); - procedure SetFSelectedCls(Value : String); - procedure SetFValue(Value : String); - procedure SetFOnSelect(Value : TExtPickerColorOnSelect); + FActiveError : String; + FActiveErrorsTpl : String; + FActiveErrorsTplList : TExtObjectList; + FActiveErrorsTplTemplate : TExtXTemplate; + FAfterBodyEl : String; + FAfterBodyElList : TExtObjectList; + FAfterBodyElTemplate : TExtXTemplate; + FAfterLabelTextTpl : String; + FAfterLabelTextTplList : TExtObjectList; + FAfterLabelTextTplTemplate : TExtXTemplate; + FAfterLabelTpl : String; + FAfterLabelTplList : TExtObjectList; + FAfterLabelTplTemplate : TExtXTemplate; + FAfterSubTpl : String; + FAfterSubTplList : TExtObjectList; + FAfterSubTplTemplate : TExtXTemplate; + FAutoFitErrors : Boolean; + FBaseBodyCls : String; + FBeforeBodyEl : String; + FBeforeBodyElList : TExtObjectList; + FBeforeBodyElTemplate : TExtXTemplate; + FBeforeLabelTextTpl : String; + FBeforeLabelTextTplList : TExtObjectList; + FBeforeLabelTextTplTemplate : TExtXTemplate; + FBeforeLabelTpl : String; + FBeforeLabelTplList : TExtObjectList; + FBeforeLabelTplTemplate : TExtXTemplate; + FBeforeSubTpl : String; + FBeforeSubTplList : TExtObjectList; + FBeforeSubTplTemplate : TExtXTemplate; + FBodyEl : TExtElement; + FCheckChangeBuffer : Integer; // 50 + FCheckChangeEvents : TExtObjectList; + FClearCls : String; + FDirtyCls : String; + FDisabled : Boolean; + FErrorEl : TExtElement; + FErrorMsgCls : String; + FFieldBodyCls : String; + FFieldCls : String; + FFieldLabel : String; + FFieldStyle : String; + FFocusCls : String; + FFormItemCls : String; + FHideEmptyLabel : Boolean; + FHideLabel : Boolean; + FInputAttrTpl : String; + FInputAttrTplList : TExtObjectList; + FInputAttrTplTemplate : TExtXTemplate; + FInputEl : TExtElement; + FInputId : String; + FInputType : String; + FInvalidCls : String; + FInvalidText : String; + FIsFieldLabelable : Boolean; + FIsFormField : Boolean; + FLabelAlign : String; + FLabelAttrTpl : String; + FLabelAttrTplList : TExtObjectList; + FLabelAttrTplTemplate : TExtXTemplate; + FLabelCell : TExtElement; + FLabelCls : String; + FLabelClsExtra : String; + FLabelEl : TExtElement; + FLabelPad : Integer; + FLabelSeparator : String; + FLabelStyle : String; + FLabelWidth : Integer; + FMsgTarget : String; + FName : String; + FOriginalValue : TExtObject; + FPreventMark : Boolean; + FReadOnly : Boolean; + FReadOnlyCls : String; + FSubmitValue : Boolean; + FTabIndex : Integer; + FValidateOnBlur : Boolean; + FValidateOnChange : Boolean; + FValue : TExtObject; + FOnErrorchange : TExtFormFieldBaseOnErrorchange; + procedure SetFActiveError(Value : String); + procedure SetFActiveErrorsTpl(Value : String); + procedure SetFActiveErrorsTplList(Value : TExtObjectList); + procedure SetFActiveErrorsTplTemplate(Value : TExtXTemplate); + procedure SetFAfterBodyEl(Value : String); + procedure SetFAfterBodyElList(Value : TExtObjectList); + procedure SetFAfterBodyElTemplate(Value : TExtXTemplate); + procedure SetFAfterLabelTextTpl(Value : String); + procedure SetFAfterLabelTextTplList(Value : TExtObjectList); + procedure SetFAfterLabelTextTplTemplate(Value : TExtXTemplate); + procedure SetFAfterLabelTpl(Value : String); + procedure SetFAfterLabelTplList(Value : TExtObjectList); + procedure SetFAfterLabelTplTemplate(Value : TExtXTemplate); + procedure SetFAfterSubTpl(Value : String); + procedure SetFAfterSubTplList(Value : TExtObjectList); + procedure SetFAfterSubTplTemplate(Value : TExtXTemplate); + procedure SetFAutoFitErrors(Value : Boolean); + procedure SetFBaseBodyCls(Value : String); + procedure SetFBeforeBodyEl(Value : String); + procedure SetFBeforeBodyElList(Value : TExtObjectList); + procedure SetFBeforeBodyElTemplate(Value : TExtXTemplate); + procedure SetFBeforeLabelTextTpl(Value : String); + procedure SetFBeforeLabelTextTplList(Value : TExtObjectList); + procedure SetFBeforeLabelTextTplTemplate(Value : TExtXTemplate); + procedure SetFBeforeLabelTpl(Value : String); + procedure SetFBeforeLabelTplList(Value : TExtObjectList); + procedure SetFBeforeLabelTplTemplate(Value : TExtXTemplate); + procedure SetFBeforeSubTpl(Value : String); + procedure SetFBeforeSubTplList(Value : TExtObjectList); + procedure SetFBeforeSubTplTemplate(Value : TExtXTemplate); + procedure SetFBodyEl(Value : TExtElement); + procedure SetFCheckChangeBuffer(Value : Integer); + procedure SetFCheckChangeEvents(Value : TExtObjectList); + procedure SetFClearCls(Value : String); + procedure SetFDirtyCls(Value : String); + procedure SetFDisabled(Value : Boolean); + procedure SetFErrorEl(Value : TExtElement); + procedure SetFErrorMsgCls(Value : String); + procedure SetFFieldBodyCls(Value : String); + procedure SetFFieldCls(Value : String); + procedure SetFFieldLabel(Value : String); + procedure SetFFieldStyle(Value : String); + procedure SetFFocusCls(Value : String); + procedure SetFFormItemCls(Value : String); + procedure SetFHideEmptyLabel(Value : Boolean); + procedure SetFHideLabel(Value : Boolean); + procedure SetFInputAttrTpl(Value : String); + procedure SetFInputAttrTplList(Value : TExtObjectList); + procedure SetFInputAttrTplTemplate(Value : TExtXTemplate); + procedure SetFInputEl(Value : TExtElement); + procedure SetFInputId(Value : String); + procedure SetFInputType(Value : String); + procedure SetFInvalidCls(Value : String); + procedure SetFInvalidText(Value : String); + procedure SetFIsFieldLabelable(Value : Boolean); + procedure SetFIsFormField(Value : Boolean); + procedure SetFLabelAlign(Value : String); + procedure SetFLabelAttrTpl(Value : String); + procedure SetFLabelAttrTplList(Value : TExtObjectList); + procedure SetFLabelAttrTplTemplate(Value : TExtXTemplate); + procedure SetFLabelCell(Value : TExtElement); + procedure SetFLabelCls(Value : String); + procedure SetFLabelClsExtra(Value : String); + procedure SetFLabelEl(Value : TExtElement); + procedure SetFLabelPad(Value : Integer); + procedure SetFLabelSeparator(Value : String); + procedure SetFLabelStyle(Value : String); + procedure SetFLabelWidth(Value : Integer); + procedure SetFMsgTarget(Value : String); + procedure SetFName(Value : String); + procedure SetFOriginalValue(Value : TExtObject); + procedure SetFPreventMark(Value : Boolean); + procedure SetFReadOnly(Value : Boolean); + procedure SetFReadOnlyCls(Value : String); + procedure SetFSubmitValue(Value : Boolean); + procedure SetFTabIndex(Value : Integer); + procedure SetFValidateOnBlur(Value : Boolean); + procedure SetFValidateOnChange(Value : Boolean); + procedure SetFValue(Value : TExtObject); + procedure SetFOnErrorchange(Value : TExtFormFieldBaseOnErrorchange); protected procedure InitDefaults; override; procedure HandleEvent(const AEvtName: string); override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function BatchChanges(Fn : TExtObject) : TExtFunction; + function CheckChange : TExtFunction; + function CheckDirty : TExtFunction; + function ClearInvalid : TExtFunction; constructor Create; + function ExtractFileInput : TExtFunction; + function GetActiveError : TExtFunction; + function GetActiveErrors : TExtFunction; + function GetErrors(Value : TExtObject) : TExtFunction; + function GetInputId : TExtFunction; + function GetLabelWidth : TExtFunction; + function GetModelData : TExtFunction; + function GetName : TExtFunction; + function GetRawValue : TExtFunction; + function GetSubmitData : TExtFunction; + function GetSubmitValue : TExtFunction; + function GetSubTplMarkup : TExtFunction; function GetValue : TExtFunction; - function Select(Color : String; SuppressEvent : Boolean = false) : TExtFunction; + function HasActiveError : TExtFunction; + function HasVisibleLabel : TExtFunction; + function InitLabelable : TExtFunction; + function IsDirty : TExtFunction; + function IsEqual(Value1 : TExtObject; Value2 : TExtObject) : TExtFunction; + function IsFileUpload : TExtFunction; + function IsValid : TExtFunction; + function MarkInvalid(Errors : String) : TExtFunction; overload; + function Reset : TExtFunction; + function ResetOriginalValue : TExtFunction; + function SetActiveError(Msg : String) : TExtFunction; + function SetActiveErrors(Errors : TExtObjectList) : TExtFunction; + function SetFieldDefaults(Defaults : TExtObject) : TExtFunction; + function SetFieldLabel(LabelJS : String) : TExtFunction; + function SetFieldStyle(Style : String) : TExtFunction; overload; + function SetRawValue(Value : TExtObject) : TExtFunction; + function SetReadOnly(ReadOnly : Boolean) : TExtFunction; + function SetValue(Value : TExtObject) : TExtFunction; + function TrimLabelSeparator : TExtFunction; + function UnsetActiveError : TExtFunction; + function Validate : TExtFunction; + function ValidateValue(Value : TExtObject) : TExtFunction; + function ValueToRaw(Value : TExtObject) : TExtFunction; destructor Destroy; override; - property AllowReselect : Boolean read FAllowReselect write SetFAllowReselect; - property ClickEvent : String read FClickEvent write SetFClickEvent; - property ComponentCls : String read FComponentCls write SetFComponentCls; - property Handler : TExtFunction read FHandler write SetFHandler; - property ItemCls : String read FItemCls write SetFItemCls; - property Scope : TExtObject read FScope write SetFScope; - property SelectedCls : String read FSelectedCls write SetFSelectedCls; - property Value : String read FValue write SetFValue; - property OnSelect : TExtPickerColorOnSelect read FOnSelect write SetFOnSelect; - end; - - TExtAppDomainComponentSingleton = class(TExtAppEventDomain) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + property ActiveError : String read FActiveError write SetFActiveError; + property ActiveErrorsTpl : String read FActiveErrorsTpl write SetFActiveErrorsTpl; + property ActiveErrorsTplList : TExtObjectList read FActiveErrorsTplList write SetFActiveErrorsTplList; + property ActiveErrorsTplTemplate : TExtXTemplate read FActiveErrorsTplTemplate write SetFActiveErrorsTplTemplate; + property AfterBodyEl : String read FAfterBodyEl write SetFAfterBodyEl; + property AfterBodyElList : TExtObjectList read FAfterBodyElList write SetFAfterBodyElList; + property AfterBodyElTemplate : TExtXTemplate read FAfterBodyElTemplate write SetFAfterBodyElTemplate; + property AfterLabelTextTpl : String read FAfterLabelTextTpl write SetFAfterLabelTextTpl; + property AfterLabelTextTplList : TExtObjectList read FAfterLabelTextTplList write SetFAfterLabelTextTplList; + property AfterLabelTextTplTemplate : TExtXTemplate read FAfterLabelTextTplTemplate write SetFAfterLabelTextTplTemplate; + property AfterLabelTpl : String read FAfterLabelTpl write SetFAfterLabelTpl; + property AfterLabelTplList : TExtObjectList read FAfterLabelTplList write SetFAfterLabelTplList; + property AfterLabelTplTemplate : TExtXTemplate read FAfterLabelTplTemplate write SetFAfterLabelTplTemplate; + property AfterSubTpl : String read FAfterSubTpl write SetFAfterSubTpl; + property AfterSubTplList : TExtObjectList read FAfterSubTplList write SetFAfterSubTplList; + property AfterSubTplTemplate : TExtXTemplate read FAfterSubTplTemplate write SetFAfterSubTplTemplate; + property AutoFitErrors : Boolean read FAutoFitErrors write SetFAutoFitErrors; + property BaseBodyCls : String read FBaseBodyCls write SetFBaseBodyCls; + property BeforeBodyEl : String read FBeforeBodyEl write SetFBeforeBodyEl; + property BeforeBodyElList : TExtObjectList read FBeforeBodyElList write SetFBeforeBodyElList; + property BeforeBodyElTemplate : TExtXTemplate read FBeforeBodyElTemplate write SetFBeforeBodyElTemplate; + property BeforeLabelTextTpl : String read FBeforeLabelTextTpl write SetFBeforeLabelTextTpl; + property BeforeLabelTextTplList : TExtObjectList read FBeforeLabelTextTplList write SetFBeforeLabelTextTplList; + property BeforeLabelTextTplTemplate : TExtXTemplate read FBeforeLabelTextTplTemplate write SetFBeforeLabelTextTplTemplate; + property BeforeLabelTpl : String read FBeforeLabelTpl write SetFBeforeLabelTpl; + property BeforeLabelTplList : TExtObjectList read FBeforeLabelTplList write SetFBeforeLabelTplList; + property BeforeLabelTplTemplate : TExtXTemplate read FBeforeLabelTplTemplate write SetFBeforeLabelTplTemplate; + property BeforeSubTpl : String read FBeforeSubTpl write SetFBeforeSubTpl; + property BeforeSubTplList : TExtObjectList read FBeforeSubTplList write SetFBeforeSubTplList; + property BeforeSubTplTemplate : TExtXTemplate read FBeforeSubTplTemplate write SetFBeforeSubTplTemplate; + property BodyEl : TExtElement read FBodyEl write SetFBodyEl; + property CheckChangeBuffer : Integer read FCheckChangeBuffer write SetFCheckChangeBuffer; + property CheckChangeEvents : TExtObjectList read FCheckChangeEvents write SetFCheckChangeEvents; + property ClearCls : String read FClearCls write SetFClearCls; + property DirtyCls : String read FDirtyCls write SetFDirtyCls; + property Disabled : Boolean read FDisabled write SetFDisabled; + property ErrorEl : TExtElement read FErrorEl write SetFErrorEl; + property ErrorMsgCls : String read FErrorMsgCls write SetFErrorMsgCls; + property FieldBodyCls : String read FFieldBodyCls write SetFFieldBodyCls; + property FieldCls : String read FFieldCls write SetFFieldCls; + property FieldLabel : String read FFieldLabel write SetFFieldLabel; + property FieldStyle : String read FFieldStyle write SetFFieldStyle; + property FocusCls : String read FFocusCls write SetFFocusCls; + property FormItemCls : String read FFormItemCls write SetFFormItemCls; + property HideEmptyLabel : Boolean read FHideEmptyLabel write SetFHideEmptyLabel; + property HideLabel : Boolean read FHideLabel write SetFHideLabel; + property InputAttrTpl : String read FInputAttrTpl write SetFInputAttrTpl; + property InputAttrTplList : TExtObjectList read FInputAttrTplList write SetFInputAttrTplList; + property InputAttrTplTemplate : TExtXTemplate read FInputAttrTplTemplate write SetFInputAttrTplTemplate; + property InputEl : TExtElement read FInputEl write SetFInputEl; + property InputId : String read FInputId write SetFInputId; + property InputType : String read FInputType write SetFInputType; + property InvalidCls : String read FInvalidCls write SetFInvalidCls; + property InvalidText : String read FInvalidText write SetFInvalidText; + property IsFieldLabelable : Boolean read FIsFieldLabelable write SetFIsFieldLabelable; + property IsFormField : Boolean read FIsFormField write SetFIsFormField; + property LabelAlign : String read FLabelAlign write SetFLabelAlign; + property LabelAttrTpl : String read FLabelAttrTpl write SetFLabelAttrTpl; + property LabelAttrTplList : TExtObjectList read FLabelAttrTplList write SetFLabelAttrTplList; + property LabelAttrTplTemplate : TExtXTemplate read FLabelAttrTplTemplate write SetFLabelAttrTplTemplate; + property LabelCell : TExtElement read FLabelCell write SetFLabelCell; + property LabelCls : String read FLabelCls write SetFLabelCls; + property LabelClsExtra : String read FLabelClsExtra write SetFLabelClsExtra; + property LabelEl : TExtElement read FLabelEl write SetFLabelEl; + property LabelPad : Integer read FLabelPad write SetFLabelPad; + property LabelSeparator : String read FLabelSeparator write SetFLabelSeparator; + property LabelStyle : String read FLabelStyle write SetFLabelStyle; + property LabelWidth : Integer read FLabelWidth write SetFLabelWidth; + property MsgTarget : String read FMsgTarget write SetFMsgTarget; + property Name : String read FName write SetFName; + property OriginalValue : TExtObject read FOriginalValue write SetFOriginalValue; + property PreventMark : Boolean read FPreventMark write SetFPreventMark; + property ReadOnly : Boolean read FReadOnly write SetFReadOnly; + property ReadOnlyCls : String read FReadOnlyCls write SetFReadOnlyCls; + property SubmitValue : Boolean read FSubmitValue write SetFSubmitValue; + property TabIndex : Integer read FTabIndex write SetFTabIndex; + property ValidateOnBlur : Boolean read FValidateOnBlur write SetFValidateOnBlur; + property ValidateOnChange : Boolean read FValidateOnChange write SetFValidateOnChange; + property Value : TExtObject read FValue write SetFValue; + property OnErrorchange : TExtFormFieldBaseOnErrorchange read FOnErrorchange write SetFOnErrorchange; end; - // Procedural types for events TExtPanelTool - TExtPanelToolOnClick = procedure(This : TExtPanelTool; E : TExtEventObject) of object; - - TExtPanelTool = class(TExtComponent) - private - FHandler : TExtFunction; - FScope : TExtObject; - FStopEvent : Boolean; - FTooltip : String; - FTooltipObject : TExtObject; - FTooltipType : String; - FTypeJS : String; - FOnClick : TExtPanelToolOnClick; - procedure SetFHandler(Value : TExtFunction); - procedure SetFScope(Value : TExtObject); - procedure SetFStopEvent(Value : Boolean); - procedure SetFTooltip(Value : String); - procedure SetFTooltipObject(Value : TExtObject); - procedure SetFTooltipType(Value : String); - procedure SetFTypeJS(Value : String); - procedure SetFOnClick(Value : TExtPanelToolOnClick); - protected - procedure InitDefaults; override; - procedure HandleEvent(const AEvtName: string); override; + TExtAppDomainStoreSingleton = class(TExtAppEventDomain) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - function SetType(TypeJS : String) : TExtFunction; - destructor Destroy; override; - property Handler : TExtFunction read FHandler write SetFHandler; - property Scope : TExtObject read FScope write SetFScope; - property StopEvent : Boolean read FStopEvent write SetFStopEvent; - property Tooltip : String read FTooltip write SetFTooltip; - property TooltipObject : TExtObject read FTooltipObject write SetFTooltipObject; - property TooltipType : String read FTooltipType write SetFTooltipType; - property TypeJS : String read FTypeJS write SetFTypeJS; - property OnClick : TExtPanelToolOnClick read FOnClick write SetFOnClick; end; - TExtAppDomainControllerSingleton = class(TExtAppEventDomain) + TExtFxTargetComponent = class(TExtFxTarget) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtUtilClickRepeater = class(TExtUtilObservable) + TExtLayoutContainerTable = class(TExtLayoutContainer) private - FAccelerate : Boolean; - FDelay : Integer; - FEl : String; - FElElement : TExtElement; - FElTHTMLElement : THTMLElement; - FInterval : Integer; - FPressedCls : String; - FPreventDefault : Boolean; - FStopDefault : Boolean; - procedure SetFAccelerate(Value : Boolean); - procedure SetFDelay(Value : Integer); - procedure SetFEl(Value : String); - procedure SetFElElement(Value : TExtElement); - procedure SetFElTHTMLElement(Value : THTMLElement); - procedure SetFInterval(Value : Integer); - procedure SetFPressedCls(Value : String); - procedure SetFPreventDefault(Value : Boolean); - procedure SetFStopDefault(Value : Boolean); + FColumns : Integer; + FTableAttrs : TExtObject; + FTdAttrs : TExtObject; + FTrAttrs : TExtObject; + procedure SetFColumns(Value : Integer); + procedure SetFTableAttrs(Value : TExtObject); + procedure SetFTdAttrs(Value : TExtObject); + procedure SetFTrAttrs(Value : TExtObject); protected procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} constructor Create; - function Disable : TExtFunction; - function Enable : TExtFunction; - function SetDisabled(Disabled : Boolean) : TExtFunction; destructor Destroy; override; - property Accelerate : Boolean read FAccelerate write SetFAccelerate; - property Delay : Integer read FDelay write SetFDelay; - property El : String read FEl write SetFEl; - property ElElement : TExtElement read FElElement write SetFElElement; - property ElTHTMLElement : THTMLElement read FElTHTMLElement write SetFElTHTMLElement; - property Interval : Integer read FInterval write SetFInterval; - property PressedCls : String read FPressedCls write SetFPressedCls; - property PreventDefault : Boolean read FPreventDefault write SetFPreventDefault; - property StopDefault : Boolean read FStopDefault write SetFStopDefault; - end; - - TExtXTemplateCompiler = class(TExtXTemplateParser) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + property Columns : Integer read FColumns write SetFColumns; + property TableAttrs : TExtObject read FTableAttrs write SetFTableAttrs; + property TdAttrs : TExtObject read FTdAttrs write SetFTdAttrs; + property TrAttrs : TExtObject read FTrAttrs write SetFTrAttrs; end; - TExtFxTargetElement = class(TExtFxTarget) + TExtLayoutContainerCheckboxGroup = class(TExtLayoutContainer) + private + FAutoFlex : Boolean; + procedure SetFAutoFlex(Value : Boolean); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + property AutoFlex : Boolean read FAutoFlex write SetFAutoFlex; end; - TExtFxTargetComponent = class(TExtFxTarget) + TExtChartTipSurface = class(TExtDrawComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtUtilGrouper = class(TExtUtilSorter) + TExtLayoutContainerEditor = class(TExtLayoutContainer) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function GetGroupString(Instance : TExtDataModel) : TExtFunction; end; - TExtAppDomainGlobalSingleton = class(TExtAppEventDomain) + TExtLayoutContainerForm = class(TExtLayoutContainer) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function CalculateOverflow(OwnerContext : TExtLayoutContextItem; ContainerSize : TExtObject; Dimensions : Integer) : TExtFunction; + function DoRenderPadder : TExtFunction; end; - TExtAppDomainDirectSingleton = class(TExtAppEventDomain) + TExtLayoutContainerFit = class(TExtLayoutContainer) + private + FDefaultMargins : TExtObject; + procedure SetFDefaultMargins(Value : TExtObject); + protected + procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; + destructor Destroy; override; + property DefaultMargins : TExtObject read FDefaultMargins write SetFDefaultMargins; end; - TExtXTemplate = class(TExtTemplate) + TExtChartSeriesBar = class(TExtChartSeriesCartesian) private - FDefinitions : String; - FDefinitionsList : TExtObjectList; - procedure SetFDefinitions(Value : String); - procedure SetFDefinitionsList(Value : TExtObjectList); + FColumn : Boolean; + FGroupGutter : Integer; + FGutter : Integer; + FStacked : Boolean; + FXPadding : Integer; + FXPaddingObject : TExtObject; + FYPadding : Integer; + FYPaddingObject : TExtObject; + procedure SetFColumn(Value : Boolean); + procedure SetFGroupGutter(Value : Integer); + procedure SetFGutter(Value : Integer); + procedure SetFStacked(Value : Boolean); + procedure SetFXPadding(Value : Integer); + procedure SetFXPaddingObject(Value : TExtObject); + procedure SetFYPadding(Value : Integer); + procedure SetFYPaddingObject(Value : TExtObject); protected procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Compile : TExtFunction; constructor Create; + function DrawSeries : TExtFunction; + function GetLegendColor : TExtFunction; destructor Destroy; override; - property Definitions : String read FDefinitions write SetFDefinitions; - property DefinitionsList : TExtObjectList read FDefinitionsList write SetFDefinitionsList; + property Column : Boolean read FColumn write SetFColumn; + property GroupGutter : Integer read FGroupGutter write SetFGroupGutter; + property Gutter : Integer read FGutter write SetFGutter; + property Stacked : Boolean read FStacked write SetFStacked; + property XPadding : Integer read FXPadding write SetFXPadding; + property XPaddingObject : TExtObject read FXPaddingObject write SetFXPaddingObject; + property YPadding : Integer read FYPadding write SetFYPadding; + property YPaddingObject : TExtObject read FYPaddingObject write SetFYPaddingObject; end; - TExtLayoutContainerBorder = class(TExtLayoutContainer) + TExtChartSeriesArea = class(TExtChartSeriesCartesian) private - FPadding : Integer; - FPaddingObject : TExtObject; - FPaddingString : String; - FRegionWeights : TExtObject; - FSplit : Boolean; - FSplitterResize : Boolean; - procedure SetFPadding(Value : Integer); - procedure SetFPaddingObject(Value : TExtObject); - procedure SetFPaddingString(Value : String); - procedure SetFRegionWeights(Value : TExtObject); - procedure SetFSplit(Value : Boolean); - procedure SetFSplitterResize(Value : Boolean); + FStyle : TExtObject; + procedure SetFStyle(Value : TExtObject); protected procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} constructor Create; + function DrawSeries : TExtFunction; + function GetLegendColor(Item : TExtObject) : TExtFunction; + function HighlightItem(Info : TExtObject) : TExtFunction; + function HighlightSeries(Item : TExtObject) : TExtFunction; + function UnHighlightItem(Item : TExtObject) : TExtFunction; + function UnHighlightSeries(Item : TExtObject) : TExtFunction; destructor Destroy; override; - property Padding : Integer read FPadding write SetFPadding; - property PaddingObject : TExtObject read FPaddingObject write SetFPaddingObject; - property PaddingString : String read FPaddingString write SetFPaddingString; - property RegionWeights : TExtObject read FRegionWeights write SetFRegionWeights; - property Split : Boolean read FSplit write SetFSplit; - property SplitterResize : Boolean read FSplitterResize write SetFSplitterResize; + property Style : TExtObject read FStyle write SetFStyle; + end; + + TExtDrawCompositeSprite = class(TExtUtilMixedCollection) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function AddCls(Cls : String) : TExtFunction; + function Animate(Config : TExtObject) : TExtFunction; + function GetActiveAnimation : TExtFunction; + function GetBBox : TExtFunction; + function Hide(Redraw : Boolean) : TExtFunction; + function Redraw : TExtFunction; + function RemoveCls(Cls : String) : TExtFunction; + function SequenceFx : TExtFunction; + function SetAttributes(Attrs : TExtObject; Redraw : Boolean) : TExtFunction; + function SetStyle(Style : String) : TExtFunction; + function Show(Redraw : Boolean) : TExtFunction; + function StopAnimation : TExtFunction; + function SyncFx : TExtFunction; end; - TExtChartSeriesScatter = class(TExtChartSeriesCartesian) + TExtChartSeriesLine = class(TExtChartSeriesCartesian) private + FFill : Boolean; FMarkerConfig : TExtObject; + FSelectionTolerance : Integer; + FShowMarkers : Boolean; + FSmooth : Boolean; + FSmoothInteger : Integer; FStyle : TExtObject; + procedure SetFFill(Value : Boolean); procedure SetFMarkerConfig(Value : TExtObject); + procedure SetFSelectionTolerance(Value : Integer); + procedure SetFShowMarkers(Value : Boolean); + procedure SetFSmooth(Value : Boolean); + procedure SetFSmoothInteger(Value : Integer); procedure SetFStyle(Value : TExtObject); protected procedure InitDefaults; override; @@ -8684,74 +9095,40 @@ TExtChartSeriesScatter = class(TExtChartSeriesCartesian) constructor Create; function DrawSeries : TExtFunction; destructor Destroy; override; + property Fill : Boolean read FFill write SetFFill; property MarkerConfig : TExtObject read FMarkerConfig write SetFMarkerConfig; + property SelectionTolerance : Integer read FSelectionTolerance write SetFSelectionTolerance; + property ShowMarkers : Boolean read FShowMarkers write SetFShowMarkers; + property Smooth : Boolean read FSmooth write SetFSmooth; + property SmoothInteger : Integer read FSmoothInteger write SetFSmoothInteger; property Style : TExtObject read FStyle write SetFStyle; end; - TExtChartTipSurface = class(TExtDrawComponent) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - - TExtLayoutContainerBox = class(TExtLayoutContainer) + TExtDdDDProxy = class(TExtDdDD) private - FDefaultMargins : TExtObject; - FFlex : Integer; - FPack : String; - FPadding : String; - FStretchMaxPartner : String; - FStretchMaxPartnerComponent : TExtComponent; - procedure SetFDefaultMargins(Value : TExtObject); - procedure SetFFlex(Value : Integer); - procedure SetFPack(Value : String); - procedure SetFPadding(Value : String); - procedure SetFStretchMaxPartner(Value : String); - procedure SetFStretchMaxPartnerComponent(Value : TExtComponent); - protected - procedure InitDefaults; override; + FCenterFrame : Boolean; + FResizeFrame : Boolean; + procedure SetFCenterFrame(Value : Boolean); + procedure SetFResizeFrame(Value : Boolean); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - destructor Destroy; override; - property DefaultMargins : TExtObject read FDefaultMargins write SetFDefaultMargins; - property Flex : Integer read FFlex write SetFFlex; - property Pack : String read FPack write SetFPack; - property Padding : String read FPadding write SetFPadding; - property StretchMaxPartner : String read FStretchMaxPartner write SetFStretchMaxPartner; - property StretchMaxPartnerComponent : TExtComponent read FStretchMaxPartnerComponent write SetFStretchMaxPartnerComponent; + function CreateFrame : TExtFunction; + function InitFrame : TExtFunction; + property CenterFrame : Boolean read FCenterFrame write SetFCenterFrame; + property ResizeFrame : Boolean read FResizeFrame write SetFResizeFrame; end; - TExtLayoutContainerTable = class(TExtLayoutContainer) - private - FColumns : Integer; - FTableAttrs : TExtObject; - FTdAttrs : TExtObject; - FTrAttrs : TExtObject; - procedure SetFColumns(Value : Integer); - procedure SetFTableAttrs(Value : TExtObject); - procedure SetFTdAttrs(Value : TExtObject); - procedure SetFTrAttrs(Value : TExtObject); - protected - procedure InitDefaults; override; + TExtResizerBorderSplitter = class(TExtResizerSplitter) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - destructor Destroy; override; - property Columns : Integer read FColumns write SetFColumns; - property TableAttrs : TExtObject read FTableAttrs write SetFTableAttrs; - property TdAttrs : TExtObject read FTdAttrs write SetFTdAttrs; - property TrAttrs : TExtObject read FTrAttrs write SetFTrAttrs; end; - TExtLayoutContainerForm = class(TExtLayoutContainer) + TExtResizerBorderSplitterTracker = class(TExtResizerSplitterTracker) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function CalculateOverflow(OwnerContext : TExtLayoutContextItem; ContainerSize : TExtObject; Dimensions : Integer) : TExtFunction; - function DoRenderPadder : TExtFunction; end; TExtMenuSeparator = class(TExtMenuItem) @@ -8764,24 +9141,52 @@ TExtMenuSeparator = class(TExtMenuItem) property SeparatorCls : String read FSeparatorCls write SetFSeparatorCls; end; - TExtResizerBorderSplitter = class(TExtResizerSplitter) + TExtDataWriterXml = class(TExtDataWriter) + private + FDefaultDocumentRoot : String; + FDocumentRoot : String; // 'xmlData' + FHeader : String; + FRecordJS : String; // 'record' + procedure SetFDefaultDocumentRoot(Value : String); + procedure SetFDocumentRoot(Value : String); + procedure SetFHeader(Value : String); + procedure SetFRecordJS(Value : String); + protected + procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; + property DefaultDocumentRoot : String read FDefaultDocumentRoot write SetFDefaultDocumentRoot; + property DocumentRoot : String read FDocumentRoot write SetFDocumentRoot; + property Header : String read FHeader write SetFHeader; + property RecordJS : String read FRecordJS write SetFRecordJS; end; - TExtDataErrors = class(TExtUtilMixedCollection) + TExtDataWriterJson = class(TExtDataWriter) + private + FAllowSingle : Boolean; + FEncode : Boolean; + FExpandData : Boolean; + FRoot : String; + procedure SetFAllowSingle(Value : Boolean); + procedure SetFEncode(Value : Boolean); + procedure SetFExpandData(Value : Boolean); + procedure SetFRoot(Value : String); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function GetByField(FieldName : String) : TExtFunction; - function IsValid : TExtFunction; + property AllowSingle : Boolean read FAllowSingle write SetFAllowSingle; + property Encode : Boolean read FEncode write SetFEncode; + property ExpandData : Boolean read FExpandData write SetFExpandData; + property Root : String read FRoot write SetFRoot; end; - TExtResizerBorderSplitterTracker = class(TExtResizerSplitterTracker) + TExtContainer = class(TExtContainerAbstractContainer) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function GetChildByElement(El : String; Deep : Boolean) : TExtFunction; overload; end; // Procedural types for events TExtMenuCheckItem @@ -8836,19 +9241,11 @@ TExtMenuCheckItem = class(TExtMenuItem) property OnCheckchange : TExtMenuCheckItemOnCheckchange read FOnCheckchange write SetFOnCheckchange; end; - TExtLayoutContainerCheckboxGroup = class(TExtLayoutContainer) - private - FAutoFlex : Boolean; - procedure SetFAutoFlex(Value : Boolean); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - property AutoFlex : Boolean read FAutoFlex write SetFAutoFlex; - end; - - TExtChartSeriesArea = class(TExtChartSeriesCartesian) + TExtChartSeriesScatter = class(TExtChartSeriesCartesian) private + FMarkerConfig : TExtObject; FStyle : TExtObject; + procedure SetFMarkerConfig(Value : TExtObject); procedure SetFStyle(Value : TExtObject); protected procedure InitDefaults; override; @@ -8857,110 +9254,89 @@ TExtChartSeriesArea = class(TExtChartSeriesCartesian) {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} constructor Create; function DrawSeries : TExtFunction; - function GetLegendColor(Item : TExtObject) : TExtFunction; - function HighlightItem(Info : TExtObject) : TExtFunction; - function HighlightSeries(Item : TExtObject) : TExtFunction; - function UnHighlightItem(Item : TExtObject) : TExtFunction; - function UnHighlightSeries(Item : TExtObject) : TExtFunction; destructor Destroy; override; + property MarkerConfig : TExtObject read FMarkerConfig write SetFMarkerConfig; property Style : TExtObject read FStyle write SetFStyle; end; - TExtContainer = class(TExtContainerAbstractContainer) + TExtDataErrors = class(TExtUtilMixedCollection) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function GetChildByElement(El : String; Deep : Boolean) : TExtFunction; overload; + function GetByField(FieldName : String) : TExtFunction; + function IsValid : TExtFunction; end; - TExtChartSeriesBar = class(TExtChartSeriesCartesian) + TExtDdDropTarget = class(TExtDdDDTarget) private - FColumn : Boolean; - FGroupGutter : Integer; - FGutter : Integer; - FStacked : Boolean; - FXPadding : Integer; - FXPaddingObject : TExtObject; - FYPadding : Integer; - FYPaddingObject : TExtObject; - procedure SetFColumn(Value : Boolean); - procedure SetFGroupGutter(Value : Integer); - procedure SetFGutter(Value : Integer); - procedure SetFStacked(Value : Boolean); - procedure SetFXPadding(Value : Integer); - procedure SetFXPaddingObject(Value : TExtObject); - procedure SetFYPadding(Value : Integer); - procedure SetFYPaddingObject(Value : TExtObject); - protected - procedure InitDefaults; override; + FDdGroup : String; + FDropAllowed : String; + FDropNotAllowed : String; + FOverClass : String; + procedure SetFDdGroup(Value : String); + procedure SetFDropAllowed(Value : String); + procedure SetFDropNotAllowed(Value : String); + procedure SetFOverClass(Value : String); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - function DrawSeries : TExtFunction; - function GetLegendColor : TExtFunction; - destructor Destroy; override; - property Column : Boolean read FColumn write SetFColumn; - property GroupGutter : Integer read FGroupGutter write SetFGroupGutter; - property Gutter : Integer read FGutter write SetFGutter; - property Stacked : Boolean read FStacked write SetFStacked; - property XPadding : Integer read FXPadding write SetFXPadding; - property XPaddingObject : TExtObject read FXPaddingObject write SetFXPaddingObject; - property YPadding : Integer read FYPadding write SetFYPadding; - property YPaddingObject : TExtObject read FYPaddingObject write SetFYPaddingObject; + property DdGroup : String read FDdGroup write SetFDdGroup; + property DropAllowed : String read FDropAllowed write SetFDropAllowed; + property DropNotAllowed : String read FDropNotAllowed write SetFDropNotAllowed; + property OverClass : String read FOverClass write SetFOverClass; end; - TExtLayoutContainerFit = class(TExtLayoutContainer) + TExtFxTargetCompositeSprite = class(TExtFxTargetSprite) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + + TExtFxTargetElementCSS = class(TExtFxTargetElement) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + + TExtToolbarTextItem = class(TExtToolbarItem) private - FDefaultMargins : TExtObject; - procedure SetFDefaultMargins(Value : TExtObject); - protected - procedure InitDefaults; override; + FText : String; + procedure SetFText(Value : String); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - destructor Destroy; override; - property DefaultMargins : TExtObject read FDefaultMargins write SetFDefaultMargins; + function SetText(Text : String) : TExtFunction; + property Text : String read FText write SetFText; end; - TExtChartSeriesLine = class(TExtChartSeriesCartesian) + TExtFxTargetCompositeElement = class(TExtFxTargetElement) private - FFill : Boolean; - FMarkerConfig : TExtObject; - FSelectionTolerance : Integer; - FShowMarkers : Boolean; - FSmooth : Boolean; - FSmoothInteger : Integer; - FStyle : TExtObject; - procedure SetFFill(Value : Boolean); - procedure SetFMarkerConfig(Value : TExtObject); - procedure SetFSelectionTolerance(Value : Integer); - procedure SetFShowMarkers(Value : Boolean); - procedure SetFSmooth(Value : Boolean); - procedure SetFSmoothInteger(Value : Integer); - procedure SetFStyle(Value : TExtObject); - protected - procedure InitDefaults; override; + FIsComposite : Boolean; + procedure SetFIsComposite(Value : Boolean); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - function DrawSeries : TExtFunction; - destructor Destroy; override; - property Fill : Boolean read FFill write SetFFill; - property MarkerConfig : TExtObject read FMarkerConfig write SetFMarkerConfig; - property SelectionTolerance : Integer read FSelectionTolerance write SetFSelectionTolerance; - property ShowMarkers : Boolean read FShowMarkers write SetFShowMarkers; - property Smooth : Boolean read FSmooth write SetFSmooth; - property SmoothInteger : Integer read FSmoothInteger write SetFSmoothInteger; - property Style : TExtObject read FStyle write SetFStyle; + property IsComposite : Boolean read FIsComposite write SetFIsComposite; end; - TExtLayoutContainerEditor = class(TExtLayoutContainer) + TExtDataReaderXml = class(TExtDataReader) + private + FNamespace : String; + FRecordJS : String; + FXmlData : TExtObject; + procedure SetFNamespace(Value : String); + procedure SetFRecordJS(Value : String); + procedure SetFXmlData(Value : TExtObject); + protected + procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; + destructor Destroy; override; + property Namespace : String read FNamespace write SetFNamespace; + property RecordJS : String read FRecordJS write SetFRecordJS; + property XmlData : TExtObject read FXmlData write SetFXmlData; end; TExtDataReaderJson = class(TExtDataReader) @@ -9005,205 +9381,244 @@ TExtDataProxyWebStorage = class(TExtDataProxyClient) property Id : String read FId write SetFId; end; - TExtDrawText = class(TExtDrawComponent) - private - FDegrees : Integer; - FStyleSelector : String; - FText : String; - procedure SetFDegrees(Value : Integer); - procedure SetFStyleSelector(Value : String); - procedure SetFText(Value : String); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function SetAngle(Degrees : Integer) : TExtFunction; - function SetText(T : String) : TExtFunction; - property Degrees : Integer read FDegrees write SetFDegrees; - property StyleSelector : String read FStyleSelector write SetFStyleSelector; - property Text : String read FText write SetFText; - end; - - TExtToolbarSeparator = class(TExtToolbarItem) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - - TExtFormRadioManagerSingleton = class(TExtUtilMixedCollection) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - - TExtDataReaderXml = class(TExtDataReader) - private - FNamespace : String; - FRecordJS : String; - FXmlData : TExtObject; - procedure SetFNamespace(Value : String); - procedure SetFRecordJS(Value : String); - procedure SetFXmlData(Value : TExtObject); - protected - procedure InitDefaults; override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - destructor Destroy; override; - property Namespace : String read FNamespace write SetFNamespace; - property RecordJS : String read FRecordJS write SetFRecordJS; - property XmlData : TExtObject read FXmlData write SetFXmlData; - end; - - TExtFxTargetCompositeElement = class(TExtFxTargetElement) - private - FIsComposite : Boolean; - procedure SetFIsComposite(Value : Boolean); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - property IsComposite : Boolean read FIsComposite write SetFIsComposite; - end; - - TExtDataProxyMemory = class(TExtDataProxyClient) - private - FData : TExtObject; - FEnablePaging : Boolean; - procedure SetFData(Value : TExtObject); - procedure SetFEnablePaging(Value : Boolean); - protected - procedure InitDefaults; override; + TExtGridFeatureRowBody = class(TExtGridFeature) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - function Read(Operation : TExtDataOperation; Callback : TExtFunction; Scope : TExtObject) : TExtFunction; - function Update(Operation : TExtDataOperation; Callback : TExtFunction; Scope : TExtObject) : TExtFunction; - destructor Destroy; override; - property Data : TExtObject read FData write SetFData; - property EnablePaging : Boolean read FEnablePaging write SetFEnablePaging; + function SetupRowData(Data : TExtObject; Idx : Integer; RecordJS : TExtDataModel; Orig : TExtObject) : TExtFunction; end; - // Procedural types for events TExtButtonSplit - TExtButtonSplitOnArrowclick = procedure(This : TExtButtonSplit; E : TExtDirectEvent) of object; - - TExtButtonSplit = class(TExtButton) - private - FArrowHandler : TExtFunction; - FArrowTooltip : String; - FOnArrowclick : TExtButtonSplitOnArrowclick; - procedure SetFArrowHandler(Value : TExtFunction); - procedure SetFArrowTooltip(Value : String); - procedure SetFOnArrowclick(Value : TExtButtonSplitOnArrowclick); - protected - procedure HandleEvent(const AEvtName: string); override; + TExtGridFeatureRowWrap = class(TExtGridFeature) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function SetArrowHandler(Handler : TExtFunction; Scope : TExtObject = nil) : TExtFunction; - property ArrowHandler : TExtFunction read FArrowHandler write SetFArrowHandler; - property ArrowTooltip : String read FArrowTooltip write SetFArrowTooltip; - property OnArrowclick : TExtButtonSplitOnArrowclick read FOnArrowclick write SetFOnArrowclick; end; - // Procedural types for events TExtTab - TExtTabOnActivate = procedure(This : TExtTab) of object; - TExtTabOnBeforeclose = procedure(Tab : TExtTab) of object; - TExtTabOnClose = procedure(Tab : TExtTab) of object; - TExtTabOnDeactivate = procedure(This : TExtTab) of object; + // Procedural types for events TExtView + TExtViewOnBeforecontainerclick = procedure(This : TExtView; E : TExtEventObject) of object; + TExtViewOnBeforecontainercontextmenu = procedure(This : TExtView; E : TExtEventObject) of object; + TExtViewOnBeforecontainerdblclick = procedure(This : TExtView; E : TExtEventObject) of object; + TExtViewOnBeforecontainerkeydown = procedure(This : TExtView; E : TExtEventObject) of object; + TExtViewOnBeforecontainermousedown = procedure(This : TExtView; E : TExtEventObject) of object; + TExtViewOnBeforecontainermouseout = procedure(This : TExtView; E : TExtEventObject) of object; + TExtViewOnBeforecontainermouseover = procedure(This : TExtView; E : TExtEventObject) of object; + TExtViewOnBeforecontainermouseup = procedure(This : TExtView; E : TExtEventObject) of object; + TExtViewOnBeforeitemclick = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; + TExtViewOnBeforeitemcontextmenu = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; + TExtViewOnBeforeitemdblclick = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; + TExtViewOnBeforeitemkeydown = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; + TExtViewOnBeforeitemmousedown = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; + TExtViewOnBeforeitemmouseenter = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; + TExtViewOnBeforeitemmouseleave = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; + TExtViewOnBeforeitemmouseup = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; + TExtViewOnContainerclick = procedure(This : TExtView; E : TExtEventObject) of object; + TExtViewOnContainercontextmenu = procedure(This : TExtView; E : TExtEventObject) of object; + TExtViewOnContainerdblclick = procedure(This : TExtView; E : TExtEventObject) of object; + TExtViewOnContainerkeydown = procedure(This : TExtView; E : TExtEventObject) of object; + TExtViewOnContainermouseout = procedure(This : TExtView; E : TExtEventObject) of object; + TExtViewOnContainermouseover = procedure(This : TExtView; E : TExtEventObject) of object; + TExtViewOnContainermouseup = procedure(This : TExtView; E : TExtEventObject) of object; + TExtViewOnHighlightitem = procedure(View : TExtView; Node : TExtElement) of object; + TExtViewOnItemclick = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; + TExtViewOnItemcontextmenu = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; + TExtViewOnItemdblclick = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; + TExtViewOnItemkeydown = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; + TExtViewOnItemmousedown = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; + TExtViewOnItemmouseenter = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; + TExtViewOnItemmouseleave = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; + TExtViewOnItemmouseup = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; + TExtViewOnUnhighlightitem = procedure(View : TExtView; Node : TExtElement) of object; - TExtTab = class(TExtButton) + TExtView = class(TExtViewAbstractView) private - FActive : Boolean; - FActiveCls : String; - FClosable : Boolean; - FClosable_ : Boolean; - FClosableCls : String; - FCloseText : String; - FDisabledCls : String; - FOnActivate : TExtTabOnActivate; - FOnBeforeclose : TExtTabOnBeforeclose; - FOnClose : TExtTabOnClose; - FOnDeactivate : TExtTabOnDeactivate; - procedure SetFActive(Value : Boolean); - procedure SetFActiveCls(Value : String); - procedure SetFClosable(Value : Boolean); - procedure SetFClosable_(Value : Boolean); - procedure SetFClosableCls(Value : String); - procedure SetFCloseText(Value : String); - procedure SetFDisabledCls(Value : String); - procedure SetFOnActivate(Value : TExtTabOnActivate); - procedure SetFOnBeforeclose(Value : TExtTabOnBeforeclose); - procedure SetFOnClose(Value : TExtTabOnClose); - procedure SetFOnDeactivate(Value : TExtTabOnDeactivate); - protected - procedure HandleEvent(const AEvtName: string); override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function SetCard(Card : TExtComponent) : TExtFunction; - function SetClosable(Closable : Boolean) : TExtFunction; - property Active : Boolean read FActive write SetFActive; - property ActiveCls : String read FActiveCls write SetFActiveCls; - property Closable : Boolean read FClosable write SetFClosable; - property Closable_ : Boolean read FClosable_ write SetFClosable_; - property ClosableCls : String read FClosableCls write SetFClosableCls; - property CloseText : String read FCloseText write SetFCloseText; - property DisabledCls : String read FDisabledCls write SetFDisabledCls; - property OnActivate : TExtTabOnActivate read FOnActivate write SetFOnActivate; - property OnBeforeclose : TExtTabOnBeforeclose read FOnBeforeclose write SetFOnBeforeclose; - property OnClose : TExtTabOnClose read FOnClose write SetFOnClose; - property OnDeactivate : TExtTabOnDeactivate read FOnDeactivate write SetFOnDeactivate; - end; - - TExtFxTargetCompositeSprite = class(TExtFxTargetSprite) + FMouseOverOutBuffer : Integer; + FOnBeforecontainerclick : TExtViewOnBeforecontainerclick; + FOnBeforecontainercontextmenu : TExtViewOnBeforecontainercontextmenu; + FOnBeforecontainerdblclick : TExtViewOnBeforecontainerdblclick; + FOnBeforecontainerkeydown : TExtViewOnBeforecontainerkeydown; + FOnBeforecontainermousedown : TExtViewOnBeforecontainermousedown; + FOnBeforecontainermouseout : TExtViewOnBeforecontainermouseout; + FOnBeforecontainermouseover : TExtViewOnBeforecontainermouseover; + FOnBeforecontainermouseup : TExtViewOnBeforecontainermouseup; + FOnBeforeitemclick : TExtViewOnBeforeitemclick; + FOnBeforeitemcontextmenu : TExtViewOnBeforeitemcontextmenu; + FOnBeforeitemdblclick : TExtViewOnBeforeitemdblclick; + FOnBeforeitemkeydown : TExtViewOnBeforeitemkeydown; + FOnBeforeitemmousedown : TExtViewOnBeforeitemmousedown; + FOnBeforeitemmouseenter : TExtViewOnBeforeitemmouseenter; + FOnBeforeitemmouseleave : TExtViewOnBeforeitemmouseleave; + FOnBeforeitemmouseup : TExtViewOnBeforeitemmouseup; + FOnContainerclick : TExtViewOnContainerclick; + FOnContainercontextmenu : TExtViewOnContainercontextmenu; + FOnContainerdblclick : TExtViewOnContainerdblclick; + FOnContainerkeydown : TExtViewOnContainerkeydown; + FOnContainermouseout : TExtViewOnContainermouseout; + FOnContainermouseover : TExtViewOnContainermouseover; + FOnContainermouseup : TExtViewOnContainermouseup; + FOnHighlightitem : TExtViewOnHighlightitem; + FOnItemclick : TExtViewOnItemclick; + FOnItemcontextmenu : TExtViewOnItemcontextmenu; + FOnItemdblclick : TExtViewOnItemdblclick; + FOnItemkeydown : TExtViewOnItemkeydown; + FOnItemmousedown : TExtViewOnItemmousedown; + FOnItemmouseenter : TExtViewOnItemmouseenter; + FOnItemmouseleave : TExtViewOnItemmouseleave; + FOnItemmouseup : TExtViewOnItemmouseup; + FOnUnhighlightitem : TExtViewOnUnhighlightitem; + procedure SetFMouseOverOutBuffer(Value : Integer); + procedure SetFOnBeforecontainerclick(Value : TExtViewOnBeforecontainerclick); + procedure SetFOnBeforecontainercontextmenu(Value : TExtViewOnBeforecontainercontextmenu); + procedure SetFOnBeforecontainerdblclick(Value : TExtViewOnBeforecontainerdblclick); + procedure SetFOnBeforecontainerkeydown(Value : TExtViewOnBeforecontainerkeydown); + procedure SetFOnBeforecontainermousedown(Value : TExtViewOnBeforecontainermousedown); + procedure SetFOnBeforecontainermouseout(Value : TExtViewOnBeforecontainermouseout); + procedure SetFOnBeforecontainermouseover(Value : TExtViewOnBeforecontainermouseover); + procedure SetFOnBeforecontainermouseup(Value : TExtViewOnBeforecontainermouseup); + procedure SetFOnBeforeitemclick(Value : TExtViewOnBeforeitemclick); + procedure SetFOnBeforeitemcontextmenu(Value : TExtViewOnBeforeitemcontextmenu); + procedure SetFOnBeforeitemdblclick(Value : TExtViewOnBeforeitemdblclick); + procedure SetFOnBeforeitemkeydown(Value : TExtViewOnBeforeitemkeydown); + procedure SetFOnBeforeitemmousedown(Value : TExtViewOnBeforeitemmousedown); + procedure SetFOnBeforeitemmouseenter(Value : TExtViewOnBeforeitemmouseenter); + procedure SetFOnBeforeitemmouseleave(Value : TExtViewOnBeforeitemmouseleave); + procedure SetFOnBeforeitemmouseup(Value : TExtViewOnBeforeitemmouseup); + procedure SetFOnContainerclick(Value : TExtViewOnContainerclick); + procedure SetFOnContainercontextmenu(Value : TExtViewOnContainercontextmenu); + procedure SetFOnContainerdblclick(Value : TExtViewOnContainerdblclick); + procedure SetFOnContainerkeydown(Value : TExtViewOnContainerkeydown); + procedure SetFOnContainermouseout(Value : TExtViewOnContainermouseout); + procedure SetFOnContainermouseover(Value : TExtViewOnContainermouseover); + procedure SetFOnContainermouseup(Value : TExtViewOnContainermouseup); + procedure SetFOnHighlightitem(Value : TExtViewOnHighlightitem); + procedure SetFOnItemclick(Value : TExtViewOnItemclick); + procedure SetFOnItemcontextmenu(Value : TExtViewOnItemcontextmenu); + procedure SetFOnItemdblclick(Value : TExtViewOnItemdblclick); + procedure SetFOnItemkeydown(Value : TExtViewOnItemkeydown); + procedure SetFOnItemmousedown(Value : TExtViewOnItemmousedown); + procedure SetFOnItemmouseenter(Value : TExtViewOnItemmouseenter); + procedure SetFOnItemmouseleave(Value : TExtViewOnItemmouseleave); + procedure SetFOnItemmouseup(Value : TExtViewOnItemmouseup); + procedure SetFOnUnhighlightitem(Value : TExtViewOnUnhighlightitem); + protected + procedure HandleEvent(const AEvtName: string); override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function ClearHighlight : TExtFunction; + function FocusNode(Rec : TExtDataModel) : TExtFunction; + function HighlightItem(Item : THTMLElement) : TExtFunction; + property MouseOverOutBuffer : Integer read FMouseOverOutBuffer write SetFMouseOverOutBuffer; + property OnBeforecontainerclick : TExtViewOnBeforecontainerclick read FOnBeforecontainerclick write SetFOnBeforecontainerclick; + property OnBeforecontainercontextmenu : TExtViewOnBeforecontainercontextmenu read FOnBeforecontainercontextmenu write SetFOnBeforecontainercontextmenu; + property OnBeforecontainerdblclick : TExtViewOnBeforecontainerdblclick read FOnBeforecontainerdblclick write SetFOnBeforecontainerdblclick; + property OnBeforecontainerkeydown : TExtViewOnBeforecontainerkeydown read FOnBeforecontainerkeydown write SetFOnBeforecontainerkeydown; + property OnBeforecontainermousedown : TExtViewOnBeforecontainermousedown read FOnBeforecontainermousedown write SetFOnBeforecontainermousedown; + property OnBeforecontainermouseout : TExtViewOnBeforecontainermouseout read FOnBeforecontainermouseout write SetFOnBeforecontainermouseout; + property OnBeforecontainermouseover : TExtViewOnBeforecontainermouseover read FOnBeforecontainermouseover write SetFOnBeforecontainermouseover; + property OnBeforecontainermouseup : TExtViewOnBeforecontainermouseup read FOnBeforecontainermouseup write SetFOnBeforecontainermouseup; + property OnBeforeitemclick : TExtViewOnBeforeitemclick read FOnBeforeitemclick write SetFOnBeforeitemclick; + property OnBeforeitemcontextmenu : TExtViewOnBeforeitemcontextmenu read FOnBeforeitemcontextmenu write SetFOnBeforeitemcontextmenu; + property OnBeforeitemdblclick : TExtViewOnBeforeitemdblclick read FOnBeforeitemdblclick write SetFOnBeforeitemdblclick; + property OnBeforeitemkeydown : TExtViewOnBeforeitemkeydown read FOnBeforeitemkeydown write SetFOnBeforeitemkeydown; + property OnBeforeitemmousedown : TExtViewOnBeforeitemmousedown read FOnBeforeitemmousedown write SetFOnBeforeitemmousedown; + property OnBeforeitemmouseenter : TExtViewOnBeforeitemmouseenter read FOnBeforeitemmouseenter write SetFOnBeforeitemmouseenter; + property OnBeforeitemmouseleave : TExtViewOnBeforeitemmouseleave read FOnBeforeitemmouseleave write SetFOnBeforeitemmouseleave; + property OnBeforeitemmouseup : TExtViewOnBeforeitemmouseup read FOnBeforeitemmouseup write SetFOnBeforeitemmouseup; + property OnContainerclick : TExtViewOnContainerclick read FOnContainerclick write SetFOnContainerclick; + property OnContainercontextmenu : TExtViewOnContainercontextmenu read FOnContainercontextmenu write SetFOnContainercontextmenu; + property OnContainerdblclick : TExtViewOnContainerdblclick read FOnContainerdblclick write SetFOnContainerdblclick; + property OnContainerkeydown : TExtViewOnContainerkeydown read FOnContainerkeydown write SetFOnContainerkeydown; + property OnContainermouseout : TExtViewOnContainermouseout read FOnContainermouseout write SetFOnContainermouseout; + property OnContainermouseover : TExtViewOnContainermouseover read FOnContainermouseover write SetFOnContainermouseover; + property OnContainermouseup : TExtViewOnContainermouseup read FOnContainermouseup write SetFOnContainermouseup; + property OnHighlightitem : TExtViewOnHighlightitem read FOnHighlightitem write SetFOnHighlightitem; + property OnItemclick : TExtViewOnItemclick read FOnItemclick write SetFOnItemclick; + property OnItemcontextmenu : TExtViewOnItemcontextmenu read FOnItemcontextmenu write SetFOnItemcontextmenu; + property OnItemdblclick : TExtViewOnItemdblclick read FOnItemdblclick write SetFOnItemdblclick; + property OnItemkeydown : TExtViewOnItemkeydown read FOnItemkeydown write SetFOnItemkeydown; + property OnItemmousedown : TExtViewOnItemmousedown read FOnItemmousedown write SetFOnItemmousedown; + property OnItemmouseenter : TExtViewOnItemmouseenter read FOnItemmouseenter write SetFOnItemmouseenter; + property OnItemmouseleave : TExtViewOnItemmouseleave read FOnItemmouseleave write SetFOnItemmouseleave; + property OnItemmouseup : TExtViewOnItemmouseup read FOnItemmouseup write SetFOnItemmouseup; + property OnUnhighlightitem : TExtViewOnUnhighlightitem read FOnUnhighlightitem write SetFOnUnhighlightitem; end; - TExtFxTargetElementCSS = class(TExtFxTargetElement) + TExtGridFeatureGrouping = class(TExtGridFeature) + private + FCollapsible : Boolean; + FDepthToIndent : Integer; + FEnableGroupingMenu : Boolean; + FEnableNoGroups : Boolean; + FGroupByText : String; + FGroupHeaderTpl : String; + FGroupHeaderTplList : TExtObjectList; + FGroupHeaderTplTemplate : TExtTemplate; + FHideGroupedHeader : Boolean; + FRemoteRoot : String; + FShowGroupsText : String; + FStartCollapsed : Boolean; + procedure SetFCollapsible(Value : Boolean); + procedure SetFDepthToIndent(Value : Integer); + procedure SetFEnableGroupingMenu(Value : Boolean); + procedure SetFEnableNoGroups(Value : Boolean); + procedure SetFGroupByText(Value : String); + procedure SetFGroupHeaderTpl(Value : String); + procedure SetFGroupHeaderTplList(Value : TExtObjectList); + procedure SetFGroupHeaderTplTemplate(Value : TExtTemplate); + procedure SetFHideGroupedHeader(Value : Boolean); + procedure SetFRemoteRoot(Value : String); + procedure SetFShowGroupsText(Value : String); + procedure SetFStartCollapsed(Value : Boolean); + protected + procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function Collapse(GroupName : String; Focus : Boolean) : TExtFunction; + function CollapseAll : TExtFunction; + constructor Create; + function Expand(GroupName : String; Focus : Boolean) : TExtFunction; + function ExpandAll : TExtFunction; + function GetRecordGroup(RecordJS : TExtDataModel) : TExtFunction; + function IsExpanded(GroupName : String) : TExtFunction; + destructor Destroy; override; + property Collapsible : Boolean read FCollapsible write SetFCollapsible; + property DepthToIndent : Integer read FDepthToIndent write SetFDepthToIndent; + property EnableGroupingMenu : Boolean read FEnableGroupingMenu write SetFEnableGroupingMenu; + property EnableNoGroups : Boolean read FEnableNoGroups write SetFEnableNoGroups; + property GroupByText : String read FGroupByText write SetFGroupByText; + property GroupHeaderTpl : String read FGroupHeaderTpl write SetFGroupHeaderTpl; + property GroupHeaderTplList : TExtObjectList read FGroupHeaderTplList write SetFGroupHeaderTplList; + property GroupHeaderTplTemplate : TExtTemplate read FGroupHeaderTplTemplate write SetFGroupHeaderTplTemplate; + property HideGroupedHeader : Boolean read FHideGroupedHeader write SetFHideGroupedHeader; + property RemoteRoot : String read FRemoteRoot write SetFRemoteRoot; + property ShowGroupsText : String read FShowGroupsText write SetFShowGroupsText; + property StartCollapsed : Boolean read FStartCollapsed write SetFStartCollapsed; end; - TExtDataWriterJson = class(TExtDataWriter) - private - FAllowSingle : Boolean; - FEncode : Boolean; - FExpandData : Boolean; - FRoot : String; - procedure SetFAllowSingle(Value : Boolean); - procedure SetFEncode(Value : Boolean); - procedure SetFExpandData(Value : Boolean); - procedure SetFRoot(Value : String); + TExtToolbarSeparator = class(TExtToolbarItem) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - property AllowSingle : Boolean read FAllowSingle write SetFAllowSingle; - property Encode : Boolean read FEncode write SetFEncode; - property ExpandData : Boolean read FExpandData write SetFExpandData; - property Root : String read FRoot write SetFRoot; end; - TExtFormActionDirectSubmit = class(TExtFormActionSubmit) + TExtDirectExceptionEvent = class(TExtDirectRemotingEvent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtFormActionStandardSubmit = class(TExtFormActionSubmit) + TExtGridFeatureAbstractSummary = class(TExtGridFeature) private - FTarget : String; - procedure SetFTarget(Value : String); + FRemoteRoot : String; + procedure SetFRemoteRoot(Value : String); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - property Target : String read FTarget write SetFTarget; + property RemoteRoot : String read FRemoteRoot write SetFRemoteRoot; end; - TExtFormCheckboxManagerSingleton = class(TExtUtilMixedCollection) + TExtFormRadioManagerSingleton = class(TExtUtilMixedCollection) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} @@ -9318,140 +9733,145 @@ TExtDataStoreManagerSingleton = class(TExtUtilMixedCollection) function Unregister(Stores : String) : TExtFunction; overload; end; + TExtFormFieldCheckbox = class(TExtFormFieldBase) + private + FAfterBoxLabelTextTpl : String; + FAfterBoxLabelTextTplList : TExtObjectList; + FAfterBoxLabelTextTplTemplate : TExtXTemplate; + FAfterBoxLabelTpl : String; + FAfterBoxLabelTplList : TExtObjectList; + FAfterBoxLabelTplTemplate : TExtXTemplate; + FBeforeBoxLabelTextTpl : String; + FBeforeBoxLabelTextTplList : TExtObjectList; + FBeforeBoxLabelTextTplTemplate : TExtXTemplate; + FBeforeBoxLabelTpl : String; + FBeforeBoxLabelTplList : TExtObjectList; + FBeforeBoxLabelTplTemplate : TExtXTemplate; + FBoxLabel : String; + FBoxLabelAlign : String; + FBoxLabelAttrTpl : String; + FBoxLabelAttrTplList : TExtObjectList; + FBoxLabelAttrTplTemplate : TExtXTemplate; + FBoxLabelCls : String; + FBoxLabelEl : TExtElement; + FChecked : Boolean; + FCheckedCls : String; + FFieldBodyCls : String; + FFieldCls : String; + FFocusCls : String; + FHandler : TExtFunction; + FInputValue : String; + FIsCheckbox : Boolean; + FOriginalValue : TExtObject; + FScope : TExtObject; + FUncheckedValue : String; + procedure SetFAfterBoxLabelTextTpl(Value : String); + procedure SetFAfterBoxLabelTextTplList(Value : TExtObjectList); + procedure SetFAfterBoxLabelTextTplTemplate(Value : TExtXTemplate); + procedure SetFAfterBoxLabelTpl(Value : String); + procedure SetFAfterBoxLabelTplList(Value : TExtObjectList); + procedure SetFAfterBoxLabelTplTemplate(Value : TExtXTemplate); + procedure SetFBeforeBoxLabelTextTpl(Value : String); + procedure SetFBeforeBoxLabelTextTplList(Value : TExtObjectList); + procedure SetFBeforeBoxLabelTextTplTemplate(Value : TExtXTemplate); + procedure SetFBeforeBoxLabelTpl(Value : String); + procedure SetFBeforeBoxLabelTplList(Value : TExtObjectList); + procedure SetFBeforeBoxLabelTplTemplate(Value : TExtXTemplate); + procedure SetFBoxLabel(Value : String); + procedure SetFBoxLabelAlign(Value : String); + procedure SetFBoxLabelAttrTpl(Value : String); + procedure SetFBoxLabelAttrTplList(Value : TExtObjectList); + procedure SetFBoxLabelAttrTplTemplate(Value : TExtXTemplate); + procedure SetFBoxLabelCls(Value : String); + procedure SetFBoxLabelEl(Value : TExtElement); + procedure SetFChecked(Value : Boolean); + procedure SetFCheckedCls(Value : String); + procedure SetFFieldBodyCls(Value : String); + procedure SetFFieldCls(Value : String); + procedure SetFFocusCls(Value : String); + procedure SetFHandler(Value : TExtFunction); + procedure SetFInputValue(Value : String); + procedure SetFIsCheckbox(Value : Boolean); + procedure SetFOriginalValue(Value : TExtObject); + procedure SetFScope(Value : TExtObject); + procedure SetFUncheckedValue(Value : String); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; + function GetRawValue : TExtFunction; + function GetSubmitValue : TExtFunction; + function GetValue : TExtFunction; + function SetBoxLabel(BoxLabel : String) : TExtFunction; + function SetRawValue(Value : Boolean) : TExtFunction; overload; + function SetValue(Checked : Boolean) : TExtFunction; overload; + destructor Destroy; override; + property AfterBoxLabelTextTpl : String read FAfterBoxLabelTextTpl write SetFAfterBoxLabelTextTpl; + property AfterBoxLabelTextTplList : TExtObjectList read FAfterBoxLabelTextTplList write SetFAfterBoxLabelTextTplList; + property AfterBoxLabelTextTplTemplate : TExtXTemplate read FAfterBoxLabelTextTplTemplate write SetFAfterBoxLabelTextTplTemplate; + property AfterBoxLabelTpl : String read FAfterBoxLabelTpl write SetFAfterBoxLabelTpl; + property AfterBoxLabelTplList : TExtObjectList read FAfterBoxLabelTplList write SetFAfterBoxLabelTplList; + property AfterBoxLabelTplTemplate : TExtXTemplate read FAfterBoxLabelTplTemplate write SetFAfterBoxLabelTplTemplate; + property BeforeBoxLabelTextTpl : String read FBeforeBoxLabelTextTpl write SetFBeforeBoxLabelTextTpl; + property BeforeBoxLabelTextTplList : TExtObjectList read FBeforeBoxLabelTextTplList write SetFBeforeBoxLabelTextTplList; + property BeforeBoxLabelTextTplTemplate : TExtXTemplate read FBeforeBoxLabelTextTplTemplate write SetFBeforeBoxLabelTextTplTemplate; + property BeforeBoxLabelTpl : String read FBeforeBoxLabelTpl write SetFBeforeBoxLabelTpl; + property BeforeBoxLabelTplList : TExtObjectList read FBeforeBoxLabelTplList write SetFBeforeBoxLabelTplList; + property BeforeBoxLabelTplTemplate : TExtXTemplate read FBeforeBoxLabelTplTemplate write SetFBeforeBoxLabelTplTemplate; + property BoxLabel : String read FBoxLabel write SetFBoxLabel; + property BoxLabelAlign : String read FBoxLabelAlign write SetFBoxLabelAlign; + property BoxLabelAttrTpl : String read FBoxLabelAttrTpl write SetFBoxLabelAttrTpl; + property BoxLabelAttrTplList : TExtObjectList read FBoxLabelAttrTplList write SetFBoxLabelAttrTplList; + property BoxLabelAttrTplTemplate : TExtXTemplate read FBoxLabelAttrTplTemplate write SetFBoxLabelAttrTplTemplate; + property BoxLabelCls : String read FBoxLabelCls write SetFBoxLabelCls; + property BoxLabelEl : TExtElement read FBoxLabelEl write SetFBoxLabelEl; + property Checked : Boolean read FChecked write SetFChecked; + property CheckedCls : String read FCheckedCls write SetFCheckedCls; + property FieldBodyCls : String read FFieldBodyCls write SetFFieldBodyCls; + property FieldCls : String read FFieldCls write SetFFieldCls; + property FocusCls : String read FFocusCls write SetFFocusCls; + property Handler : TExtFunction read FHandler write SetFHandler; + property InputValue : String read FInputValue write SetFInputValue; + property IsCheckbox : Boolean read FIsCheckbox write SetFIsCheckbox; + property OriginalValue : TExtObject read FOriginalValue write SetFOriginalValue; + property Scope : TExtObject read FScope write SetFScope; + property UncheckedValue : String read FUncheckedValue write SetFUncheckedValue; + end; + + TExtFormCheckboxManagerSingleton = class(TExtUtilMixedCollection) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + TExtFormActionDirectLoad = class(TExtFormActionLoad) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtDataStore = class(TExtDataAbstractStore) + TExtFormActionDirectSubmit = class(TExtFormActionSubmit) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + + TExtFormActionStandardSubmit = class(TExtFormActionSubmit) private - FAutoDestroy : Boolean; - FBuffered : Boolean; - FClearOnPageLoad : Boolean; - FClearRemovedOnLoad : Boolean; - FData : TExtObjectList; - FData_ : TExtObjectList; - FData_Map : TExtDataStorePageMap; - FDataList : TExtObjectList; - FGroupDir : String; - FGroupers : TExtObjectList; - FGroupField : String; - FLeadingBufferZone : Integer; - FPageSize : Integer; // 25 - FProxy : String; - FProxyObject : TExtObject; - FProxyProxy : TExtDataProxy; - FPurgePageCount : Integer; - FRemoteFilter : Boolean; - FRemoteGroup : Boolean; - FRemoteSort : Boolean; - FSortOnFilter : Boolean; - FTrailingBufferZone : Integer; - procedure SetFAutoDestroy(Value : Boolean); - procedure SetFBuffered(Value : Boolean); - procedure SetFClearOnPageLoad(Value : Boolean); - procedure SetFClearRemovedOnLoad(Value : Boolean); - procedure SetFData(Value : TExtObjectList); - procedure SetFData_(Value : TExtObjectList); - procedure SetFData_Map(Value : TExtDataStorePageMap); - procedure SetFDataList(Value : TExtObjectList); - procedure SetFGroupDir(Value : String); - procedure SetFGroupers(Value : TExtObjectList); - procedure SetFGroupField(Value : String); - procedure SetFLeadingBufferZone(Value : Integer); - procedure SetFPageSize(Value : Integer); - procedure SetFProxy(Value : String); - procedure SetFProxyObject(Value : TExtObject); - procedure SetFProxyProxy(Value : TExtDataProxy); - procedure SetFPurgePageCount(Value : Integer); - procedure SetFRemoteFilter(Value : Boolean); - procedure SetFRemoteGroup(Value : Boolean); - procedure SetFRemoteSort(Value : Boolean); - procedure SetFSortOnFilter(Value : Boolean); - procedure SetFTrailingBufferZone(Value : Integer); - protected - procedure InitDefaults; override; + FTarget : String; + procedure SetFTarget(Value : String); + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + property Target : String read FTarget write SetFTarget; + end; + + TExtFormFieldFileButton = class(TExtButton) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Add(Model : TExtDataModel) : TExtFunction; overload; - function AddFilter(Filters : TExtObjectList; ApplyFilters : Boolean = false) : TExtFunction; overload; - function AddSorted(RecordJS : TExtDataRecord) : TExtFunction; - function Aggregate(Fn : TExtFunction; Scope : TExtObject = nil; Grouped : Boolean = false; Args : TExtObjectList = nil) : TExtFunction; - function Average(Field : String; Grouped : Boolean = false) : TExtFunction; - function ClearGrouping : TExtFunction; - function Collect(DataIndex : String; AllowNull : Boolean = false; BypassFilter : Boolean = false) : TExtFunction; - function CommitChanges : TExtFunction; - function Count(Grouped : Boolean = false) : TExtFunction; - constructor Create; - function Each(Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; - function Filter(Filters : String = ''; Value : String = '') : TExtFunction; overload; - function FilterBy(Fn : TExtFunction; FnRecord : TExtDataModel; FnId : TExtObject; Scope : TExtObject = nil) : TExtFunction; - function Find(FieldName : String; Value : String; StartIndex : Integer = 0; AnyMatch : Boolean = false; CaseSensitive : Boolean = false; ExactMatch : Boolean = false) : TExtFunction; overload; - function FindBy(Fn : TExtFunction; FnRecord : TExtDataModel; FnId : TExtObject; Scope : TExtObject = nil; StartIndex : Integer = 0) : TExtFunction; - function FindExact(FieldName : String; Value : TExtObject; StartIndex : Integer = 0) : TExtFunction; - function FindRecord(FieldName : String; Value : String; StartIndex : Integer = 0; AnyMatch : Boolean = false; CaseSensitive : Boolean = false; ExactMatch : Boolean = false) : TExtFunction; overload; - function First(Grouped : Boolean = false) : TExtFunction; - function GetAt(Index : Integer) : TExtFunction; - function GetById(Id : String) : TExtFunction; - function GetCount : TExtFunction; - function GetGroups(GroupName : String = '') : TExtFunction; - function GetGroupString(Instance : TExtDataModel) : TExtFunction; - function GetPageFromRecordIndex(Index : Integer) : TExtFunction; - function GetRange(Start : Integer; EndJS : Integer; Options : TExtObject = nil; OptionsCallback : TExtObject = nil; OptionsCallbackRange : TExtObjectList = nil; OptionsCallbackStart : Integer = 0; OptionsCallbackEnd : Integer = 0; OptionsCallbackOptions : Integer = 0) : TExtFunction; - function GetTotalCount : TExtFunction; - function Group(Groupers : String; Direction : String = '') : TExtFunction; overload; - function IndexOf(RecordJS : TExtDataModel) : TExtFunction; - function IndexOfId(Id : String) : TExtFunction; - function IndexOfTotal(RecordJS : TExtDataModel) : TExtFunction; - function Insert(Index : Integer; Records : TExtObjectList) : TExtFunction; - function IsFiltered : TExtFunction; - function IsGrouped : TExtFunction; - function Last(Grouped : Boolean = false) : TExtFunction; - function Load(Options : TExtFunction = nil) : TExtFunction; overload; - function LoadData(Data : TExtObjectList; Append : Boolean = false) : TExtFunction; overload; - function LoadPage(Page : Integer; Options : TExtObject = nil) : TExtFunction; - function LoadRawData(Data : TExtObjectList; Append : Boolean = false) : TExtFunction; - function LoadRecords(Records : TExtObjectList; Options : TExtObject; OptionsAddRecords : Boolean = false; Param : Integer = 0) : TExtFunction; - function Max(Field : String; Grouped : Boolean = false) : TExtFunction; - function Min(Field : String; Grouped : Boolean = false) : TExtFunction; - function NextPage(Options : TExtObject) : TExtFunction; - function Prefetch(Options : TExtObject = nil) : TExtFunction; - function PrefetchPage(Page : Integer; Options : TExtObject = nil) : TExtFunction; - function PrefetchRange : TExtFunction; - function PreviousPage(Options : TExtObject) : TExtFunction; - function Query(PropertyJS : String; Value : String; AnyMatch : Boolean = false; CaseSensitive : Boolean = false; ExactMatch : Boolean = false) : TExtFunction; overload; - function QueryBy(Fn : TExtFunction; FnRecord : TExtDataModel; FnId : TExtObject; Scope : TExtObject = nil) : TExtFunction; - function RejectChanges : TExtFunction; - function Remove(Records : Integer) : TExtFunction; overload; - function RemoveAll(Silent : Boolean = false) : TExtFunction; - function RemoveAt(Index : Integer; Count : Integer = 0) : TExtFunction; - function RemoveFilter(ToRemove : String; ApplyFilters : Boolean = false) : TExtFunction; - function Sum(Field : String; Grouped : Boolean = false) : TExtFunction; - destructor Destroy; override; - property AutoDestroy : Boolean read FAutoDestroy write SetFAutoDestroy; - property Buffered : Boolean read FBuffered write SetFBuffered; - property ClearOnPageLoad : Boolean read FClearOnPageLoad write SetFClearOnPageLoad; - property ClearRemovedOnLoad : Boolean read FClearRemovedOnLoad write SetFClearRemovedOnLoad; - property Data : TExtObjectList read FData write SetFData; - property Data_ : TExtObjectList read FData_ write SetFData_; - property Data_Map : TExtDataStorePageMap read FData_Map write SetFData_Map; - property DataList : TExtObjectList read FDataList write SetFDataList; - property GroupDir : String read FGroupDir write SetFGroupDir; - property Groupers : TExtObjectList read FGroupers write SetFGroupers; - property GroupField : String read FGroupField write SetFGroupField; - property LeadingBufferZone : Integer read FLeadingBufferZone write SetFLeadingBufferZone; - property PageSize : Integer read FPageSize write SetFPageSize; - property Proxy : String read FProxy write SetFProxy; - property ProxyObject : TExtObject read FProxyObject write SetFProxyObject; - property ProxyProxy : TExtDataProxy read FProxyProxy write SetFProxyProxy; - property PurgePageCount : Integer read FPurgePageCount write SetFPurgePageCount; - property RemoteFilter : Boolean read FRemoteFilter write SetFRemoteFilter; - property RemoteGroup : Boolean read FRemoteGroup write SetFRemoteGroup; - property RemoteSort : Boolean read FRemoteSort write SetFRemoteSort; - property SortOnFilter : Boolean read FSortOnFilter write SetFSortOnFilter; - property TrailingBufferZone : Integer read FTrailingBufferZone write SetFTrailingBufferZone; end; TExtFormFieldHidden = class(TExtFormFieldBase) @@ -9574,116 +9994,233 @@ TExtFormFieldText = class(TExtFormFieldBase) property OnKeyup : TExtFormFieldTextOnKeyup read FOnKeyup write SetFOnKeyup; end; - TExtToolbarTextItem = class(TExtToolbarItem) - private - FText : String; - procedure SetFText(Value : String); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function SetText(Text : String) : TExtFunction; - property Text : String read FText write SetFText; - end; + // Procedural types for events TExtDirectRemotingProvider + TExtDirectRemotingProviderOnBeforecall = procedure(Provider : TExtDirectRemotingProvider; Transaction : TExtDirectTransaction; Meta : TExtObject) of object; + TExtDirectRemotingProviderOnBeforecallback = procedure(Provider : TExtDirectRemotingProvider; Transaction : TExtDirectTransaction) of object; + TExtDirectRemotingProviderOnCall = procedure(Provider : TExtDirectRemotingProvider; Transaction : TExtDirectTransaction; Meta : TExtObject) of object; + + TExtDirectRemotingProvider = class(TExtDirectJsonProvider) + private + FActions : TExtObject; + FDisableNestedActions : Boolean; + FEnableBuffer : Integer; + FEnableBufferBoolean : Boolean; + FEnableUrlEncode : String; + FMaxRetries : Integer; + FNamespace : String; + FNamespaceObject : TExtObject; + FTimeout : Integer; + FUrl : String; + FOnBeforecall : TExtDirectRemotingProviderOnBeforecall; + FOnBeforecallback : TExtDirectRemotingProviderOnBeforecallback; + FOnCall : TExtDirectRemotingProviderOnCall; + procedure SetFActions(Value : TExtObject); + procedure SetFDisableNestedActions(Value : Boolean); + procedure SetFEnableBuffer(Value : Integer); + procedure SetFEnableBufferBoolean(Value : Boolean); + procedure SetFEnableUrlEncode(Value : String); + procedure SetFMaxRetries(Value : Integer); + procedure SetFNamespace(Value : String); + procedure SetFNamespaceObject(Value : TExtObject); + procedure SetFTimeout(Value : Integer); + procedure SetFUrl(Value : String); + procedure SetFOnBeforecall(Value : TExtDirectRemotingProviderOnBeforecall); + procedure SetFOnBeforecallback(Value : TExtDirectRemotingProviderOnBeforecallback); + procedure SetFOnCall(Value : TExtDirectRemotingProviderOnCall); + protected + procedure InitDefaults; override; + procedure HandleEvent(const AEvtName: string); override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function Connect : TExtFunction; + constructor Create; + function Disconnect : TExtFunction; + function IsConnected : TExtFunction; + destructor Destroy; override; + property Actions : TExtObject read FActions write SetFActions; + property DisableNestedActions : Boolean read FDisableNestedActions write SetFDisableNestedActions; + property EnableBuffer : Integer read FEnableBuffer write SetFEnableBuffer; + property EnableBufferBoolean : Boolean read FEnableBufferBoolean write SetFEnableBufferBoolean; + property EnableUrlEncode : String read FEnableUrlEncode write SetFEnableUrlEncode; + property MaxRetries : Integer read FMaxRetries write SetFMaxRetries; + property Namespace : String read FNamespace write SetFNamespace; + property NamespaceObject : TExtObject read FNamespaceObject write SetFNamespaceObject; + property Timeout : Integer read FTimeout write SetFTimeout; + property Url : String read FUrl write SetFUrl; + property OnBeforecall : TExtDirectRemotingProviderOnBeforecall read FOnBeforecall write SetFOnBeforecall; + property OnBeforecallback : TExtDirectRemotingProviderOnBeforecallback read FOnBeforecallback write SetFOnBeforecallback; + property OnCall : TExtDirectRemotingProviderOnCall read FOnCall write SetFOnCall; + end; + + TExtDataStore = class(TExtDataAbstractStore) + private + FAutoDestroy : Boolean; + FBuffered : Boolean; + FClearOnPageLoad : Boolean; + FClearRemovedOnLoad : Boolean; + FCurrentPage : Integer; + FData : TExtObjectList; + FData_ : TExtObjectList; + FData_Map : TExtDataStorePageMap; + FDataList : TExtObjectList; + FGroupDir : String; + FGroupers : TExtObjectList; + FGroupField : String; + FLeadingBufferZone : Integer; + FPageSize : Integer; // 25 + FProxy : String; + FProxyObject : TExtObject; + FProxyProxy : TExtDataProxy; + FPurgePageCount : Integer; + FRemoteFilter : Boolean; + FRemoteGroup : Boolean; + FRemoteSort : Boolean; + FSortOnFilter : Boolean; + FTrailingBufferZone : Integer; + procedure SetFAutoDestroy(Value : Boolean); + procedure SetFBuffered(Value : Boolean); + procedure SetFClearOnPageLoad(Value : Boolean); + procedure SetFClearRemovedOnLoad(Value : Boolean); + procedure SetFCurrentPage(Value : Integer); + procedure SetFData(Value : TExtObjectList); + procedure SetFData_(Value : TExtObjectList); + procedure SetFData_Map(Value : TExtDataStorePageMap); + procedure SetFDataList(Value : TExtObjectList); + procedure SetFGroupDir(Value : String); + procedure SetFGroupers(Value : TExtObjectList); + procedure SetFGroupField(Value : String); + procedure SetFLeadingBufferZone(Value : Integer); + procedure SetFPageSize(Value : Integer); + procedure SetFProxy(Value : String); + procedure SetFProxyObject(Value : TExtObject); + procedure SetFProxyProxy(Value : TExtDataProxy); + procedure SetFPurgePageCount(Value : Integer); + procedure SetFRemoteFilter(Value : Boolean); + procedure SetFRemoteGroup(Value : Boolean); + procedure SetFRemoteSort(Value : Boolean); + procedure SetFSortOnFilter(Value : Boolean); + procedure SetFTrailingBufferZone(Value : Integer); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function Add(Model : TExtDataModel) : TExtFunction; overload; + function AddFilter(Filters : TExtObjectList; ApplyFilters : Boolean = false) : TExtFunction; overload; + function AddSorted(RecordJS : TExtDataRecord) : TExtFunction; + function Aggregate(Fn : TExtFunction; Scope : TExtObject = nil; Grouped : Boolean = false; Args : TExtObjectList = nil) : TExtFunction; + function Average(Field : String; Grouped : Boolean = false) : TExtFunction; + function ClearGrouping : TExtFunction; + function Collect(DataIndex : String; AllowNull : Boolean = false; BypassFilter : Boolean = false) : TExtFunction; + function CommitChanges : TExtFunction; + function Count(Grouped : Boolean = false) : TExtFunction; + constructor Create; + function Each(Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; + function Filter(Filters : String = ''; Value : String = '') : TExtFunction; overload; + function FilterBy(Fn : TExtFunction; FnRecord : TExtDataModel; FnId : TExtObject; Scope : TExtObject = nil) : TExtFunction; + function Find(FieldName : String; Value : String; StartIndex : Integer = 0; AnyMatch : Boolean = false; CaseSensitive : Boolean = false; ExactMatch : Boolean = false) : TExtFunction; overload; + function FindBy(Fn : TExtFunction; FnRecord : TExtDataModel; FnId : TExtObject; Scope : TExtObject = nil; StartIndex : Integer = 0) : TExtFunction; + function FindExact(FieldName : String; Value : TExtObject; StartIndex : Integer = 0) : TExtFunction; + function FindRecord(FieldName : String; Value : String; StartIndex : Integer = 0; AnyMatch : Boolean = false; CaseSensitive : Boolean = false; ExactMatch : Boolean = false) : TExtFunction; overload; + function First(Grouped : Boolean = false) : TExtFunction; + function GetAt(Index : Integer) : TExtFunction; + function GetById(Id : String) : TExtFunction; + function GetCount : TExtFunction; + function GetGroups(GroupName : String = '') : TExtFunction; + function GetGroupString(Instance : TExtDataModel) : TExtFunction; + function GetPageFromRecordIndex(Index : Integer) : TExtFunction; + function GetRange(Start : Integer; EndJS : Integer; Options : TExtObject = nil; OptionsCallback : TExtObject = nil; OptionsCallbackRange : TExtObjectList = nil; OptionsCallbackStart : Integer = 0; OptionsCallbackEnd : Integer = 0; OptionsCallbackOptions : Integer = 0) : TExtFunction; + function GetTotalCount : TExtFunction; + function Group(Groupers : String; Direction : String = '') : TExtFunction; overload; + function IndexOf(RecordJS : TExtDataModel) : TExtFunction; + function IndexOfId(Id : String) : TExtFunction; + function IndexOfTotal(RecordJS : TExtDataModel) : TExtFunction; + function Insert(Index : Integer; Records : TExtObjectList) : TExtFunction; + function IsFiltered : TExtFunction; + function IsGrouped : TExtFunction; + function Last(Grouped : Boolean = false) : TExtFunction; + function Load(Options : TExtFunction = nil) : TExtFunction; overload; + function LoadData(Data : TExtObjectList; Append : Boolean = false) : TExtFunction; overload; + function LoadPage(Page : Integer; Options : TExtObject = nil) : TExtFunction; + function LoadRawData(Data : TExtObjectList; Append : Boolean = false) : TExtFunction; + function LoadRecords(Records : TExtObjectList; Options : TExtObject; OptionsAddRecords : Boolean = false; Param : Integer = 0) : TExtFunction; + function Max(Field : String; Grouped : Boolean = false) : TExtFunction; + function Min(Field : String; Grouped : Boolean = false) : TExtFunction; + function NextPage(Options : TExtObject) : TExtFunction; + function Prefetch(Options : TExtObject = nil) : TExtFunction; + function PrefetchPage(Page : Integer; Options : TExtObject = nil) : TExtFunction; + function PrefetchRange : TExtFunction; + function PreviousPage(Options : TExtObject) : TExtFunction; + function Query(PropertyJS : String; Value : String; AnyMatch : Boolean = false; CaseSensitive : Boolean = false; ExactMatch : Boolean = false) : TExtFunction; overload; + function QueryBy(Fn : TExtFunction; FnRecord : TExtDataModel; FnId : TExtObject; Scope : TExtObject = nil) : TExtFunction; + function RejectChanges : TExtFunction; + function Remove(Records : Integer) : TExtFunction; overload; + function RemoveAll(Silent : Boolean = false) : TExtFunction; + function RemoveAt(Index : Integer; Count : Integer = 0) : TExtFunction; + function RemoveFilter(ToRemove : String; ApplyFilters : Boolean = false) : TExtFunction; + function Sum(Field : String; Grouped : Boolean = false) : TExtFunction; + destructor Destroy; override; + property AutoDestroy : Boolean read FAutoDestroy write SetFAutoDestroy; + property Buffered : Boolean read FBuffered write SetFBuffered; + property ClearOnPageLoad : Boolean read FClearOnPageLoad write SetFClearOnPageLoad; + property ClearRemovedOnLoad : Boolean read FClearRemovedOnLoad write SetFClearRemovedOnLoad; + property CurrentPage : Integer read FCurrentPage write SetFCurrentPage; + property Data : TExtObjectList read FData write SetFData; + property Data_ : TExtObjectList read FData_ write SetFData_; + property Data_Map : TExtDataStorePageMap read FData_Map write SetFData_Map; + property DataList : TExtObjectList read FDataList write SetFDataList; + property GroupDir : String read FGroupDir write SetFGroupDir; + property Groupers : TExtObjectList read FGroupers write SetFGroupers; + property GroupField : String read FGroupField write SetFGroupField; + property LeadingBufferZone : Integer read FLeadingBufferZone write SetFLeadingBufferZone; + property PageSize : Integer read FPageSize write SetFPageSize; + property Proxy : String read FProxy write SetFProxy; + property ProxyObject : TExtObject read FProxyObject write SetFProxyObject; + property ProxyProxy : TExtDataProxy read FProxyProxy write SetFProxyProxy; + property PurgePageCount : Integer read FPurgePageCount write SetFPurgePageCount; + property RemoteFilter : Boolean read FRemoteFilter write SetFRemoteFilter; + property RemoteGroup : Boolean read FRemoteGroup write SetFRemoteGroup; + property RemoteSort : Boolean read FRemoteSort write SetFRemoteSort; + property SortOnFilter : Boolean read FSortOnFilter write SetFSortOnFilter; + property TrailingBufferZone : Integer read FTrailingBufferZone write SetFTrailingBufferZone; + end; + + // Procedural types for events TExtDirectPollingProvider + TExtDirectPollingProviderOnBeforepoll = procedure(This : TExtDirectPollingProvider) of object; + TExtDirectPollingProviderOnPoll = procedure(This : TExtDirectPollingProvider) of object; - TExtFormFieldCheckbox = class(TExtFormFieldBase) + TExtDirectPollingProvider = class(TExtDirectJsonProvider) private - FAfterBoxLabelTextTpl : String; - FAfterBoxLabelTextTplList : TExtObjectList; - FAfterBoxLabelTextTplTemplate : TExtXTemplate; - FAfterBoxLabelTpl : String; - FAfterBoxLabelTplList : TExtObjectList; - FAfterBoxLabelTplTemplate : TExtXTemplate; - FBeforeBoxLabelTextTpl : String; - FBeforeBoxLabelTextTplList : TExtObjectList; - FBeforeBoxLabelTextTplTemplate : TExtXTemplate; - FBeforeBoxLabelTpl : String; - FBeforeBoxLabelTplList : TExtObjectList; - FBeforeBoxLabelTplTemplate : TExtXTemplate; - FBoxLabel : String; - FBoxLabelAlign : String; - FBoxLabelAttrTpl : String; - FBoxLabelAttrTplList : TExtObjectList; - FBoxLabelAttrTplTemplate : TExtXTemplate; - FBoxLabelCls : String; - FChecked : Boolean; - FCheckedCls : String; - FFieldBodyCls : String; - FFieldCls : String; - FFocusCls : String; - FHandler : TExtFunction; - FInputValue : String; - FOriginalValue : TExtObject; - FScope : TExtObject; - FUncheckedValue : String; - procedure SetFAfterBoxLabelTextTpl(Value : String); - procedure SetFAfterBoxLabelTextTplList(Value : TExtObjectList); - procedure SetFAfterBoxLabelTextTplTemplate(Value : TExtXTemplate); - procedure SetFAfterBoxLabelTpl(Value : String); - procedure SetFAfterBoxLabelTplList(Value : TExtObjectList); - procedure SetFAfterBoxLabelTplTemplate(Value : TExtXTemplate); - procedure SetFBeforeBoxLabelTextTpl(Value : String); - procedure SetFBeforeBoxLabelTextTplList(Value : TExtObjectList); - procedure SetFBeforeBoxLabelTextTplTemplate(Value : TExtXTemplate); - procedure SetFBeforeBoxLabelTpl(Value : String); - procedure SetFBeforeBoxLabelTplList(Value : TExtObjectList); - procedure SetFBeforeBoxLabelTplTemplate(Value : TExtXTemplate); - procedure SetFBoxLabel(Value : String); - procedure SetFBoxLabelAlign(Value : String); - procedure SetFBoxLabelAttrTpl(Value : String); - procedure SetFBoxLabelAttrTplList(Value : TExtObjectList); - procedure SetFBoxLabelAttrTplTemplate(Value : TExtXTemplate); - procedure SetFBoxLabelCls(Value : String); - procedure SetFChecked(Value : Boolean); - procedure SetFCheckedCls(Value : String); - procedure SetFFieldBodyCls(Value : String); - procedure SetFFieldCls(Value : String); - procedure SetFFocusCls(Value : String); - procedure SetFHandler(Value : TExtFunction); - procedure SetFInputValue(Value : String); - procedure SetFOriginalValue(Value : TExtObject); - procedure SetFScope(Value : TExtObject); - procedure SetFUncheckedValue(Value : String); + FBaseParams : TExtObject; + FInterval : Integer; // 3 + FUrl : String; + FUrlFunction : TExtFunction; + FOnBeforepoll : TExtDirectPollingProviderOnBeforepoll; + FOnPoll : TExtDirectPollingProviderOnPoll; + procedure SetFBaseParams(Value : TExtObject); + procedure SetFInterval(Value : Integer); + procedure SetFUrl(Value : String); + procedure SetFUrlFunction(Value : TExtFunction); + procedure SetFOnBeforepoll(Value : TExtDirectPollingProviderOnBeforepoll); + procedure SetFOnPoll(Value : TExtDirectPollingProviderOnPoll); protected procedure InitDefaults; override; + procedure HandleEvent(const AEvtName: string); override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function Connect : TExtFunction; constructor Create; - function GetRawValue : TExtFunction; - function GetSubmitValue : TExtFunction; - function GetValue : TExtFunction; - function SetBoxLabel(BoxLabel : String) : TExtFunction; - function SetRawValue(Value : Boolean) : TExtFunction; overload; - function SetValue(Checked : Boolean) : TExtFunction; overload; + function Disconnect : TExtFunction; + function IsConnected : TExtFunction; destructor Destroy; override; - property AfterBoxLabelTextTpl : String read FAfterBoxLabelTextTpl write SetFAfterBoxLabelTextTpl; - property AfterBoxLabelTextTplList : TExtObjectList read FAfterBoxLabelTextTplList write SetFAfterBoxLabelTextTplList; - property AfterBoxLabelTextTplTemplate : TExtXTemplate read FAfterBoxLabelTextTplTemplate write SetFAfterBoxLabelTextTplTemplate; - property AfterBoxLabelTpl : String read FAfterBoxLabelTpl write SetFAfterBoxLabelTpl; - property AfterBoxLabelTplList : TExtObjectList read FAfterBoxLabelTplList write SetFAfterBoxLabelTplList; - property AfterBoxLabelTplTemplate : TExtXTemplate read FAfterBoxLabelTplTemplate write SetFAfterBoxLabelTplTemplate; - property BeforeBoxLabelTextTpl : String read FBeforeBoxLabelTextTpl write SetFBeforeBoxLabelTextTpl; - property BeforeBoxLabelTextTplList : TExtObjectList read FBeforeBoxLabelTextTplList write SetFBeforeBoxLabelTextTplList; - property BeforeBoxLabelTextTplTemplate : TExtXTemplate read FBeforeBoxLabelTextTplTemplate write SetFBeforeBoxLabelTextTplTemplate; - property BeforeBoxLabelTpl : String read FBeforeBoxLabelTpl write SetFBeforeBoxLabelTpl; - property BeforeBoxLabelTplList : TExtObjectList read FBeforeBoxLabelTplList write SetFBeforeBoxLabelTplList; - property BeforeBoxLabelTplTemplate : TExtXTemplate read FBeforeBoxLabelTplTemplate write SetFBeforeBoxLabelTplTemplate; - property BoxLabel : String read FBoxLabel write SetFBoxLabel; - property BoxLabelAlign : String read FBoxLabelAlign write SetFBoxLabelAlign; - property BoxLabelAttrTpl : String read FBoxLabelAttrTpl write SetFBoxLabelAttrTpl; - property BoxLabelAttrTplList : TExtObjectList read FBoxLabelAttrTplList write SetFBoxLabelAttrTplList; - property BoxLabelAttrTplTemplate : TExtXTemplate read FBoxLabelAttrTplTemplate write SetFBoxLabelAttrTplTemplate; - property BoxLabelCls : String read FBoxLabelCls write SetFBoxLabelCls; - property Checked : Boolean read FChecked write SetFChecked; - property CheckedCls : String read FCheckedCls write SetFCheckedCls; - property FieldBodyCls : String read FFieldBodyCls write SetFFieldBodyCls; - property FieldCls : String read FFieldCls write SetFFieldCls; - property FocusCls : String read FFocusCls write SetFFocusCls; - property Handler : TExtFunction read FHandler write SetFHandler; - property InputValue : String read FInputValue write SetFInputValue; - property OriginalValue : TExtObject read FOriginalValue write SetFOriginalValue; - property Scope : TExtObject read FScope write SetFScope; - property UncheckedValue : String read FUncheckedValue write SetFUncheckedValue; + property BaseParams : TExtObject read FBaseParams write SetFBaseParams; + property Interval : Integer read FInterval write SetFInterval; + property Url : String read FUrl write SetFUrl; + property UrlFunction : TExtFunction read FUrlFunction write SetFUrlFunction; + property OnBeforepoll : TExtDirectPollingProviderOnBeforepoll read FOnBeforepoll write SetFOnBeforepoll; + property OnPoll : TExtDirectPollingProviderOnPoll read FOnPoll write SetFOnPoll; end; TExtFormFieldDisplay = class(TExtFormFieldBase) @@ -9709,177 +10246,78 @@ TExtFormFieldDisplay = class(TExtFormFieldBase) property Scope : TExtObject read FScope write SetFScope; end; - TExtFormFieldFileButton = class(TExtButton) + TExtLayoutComponentAuto = class(TExtLayoutComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - // Procedural types for events TExtChart - TExtChartOnBeforerefresh = procedure(This : TExtChart) of object; - TExtChartOnRefresh = procedure(This : TExtChart) of object; - - TExtChart = class(TExtDrawComponent) + TExtLayoutContainerAuto = class(TExtLayoutContainer) private - FAnimate : Boolean; - FAnimateObject : TExtObject; - FAxes : TExtObjectList; - FBackground : TExtObject; - FBackgroundBoolean : Boolean; - FGradients : TExtObjectList; - FHasListeners : TExtObject; - FInsetPadding : Integer; // 10 - FIsObservable : Boolean; - FLegend : Boolean; - FLegendObject : TExtObject; - FListeners : TExtObject; - FMask : Boolean; - FMaskString : String; - FSeries : TExtObjectList; - FStore : TExtDataStore; - FTheme : String; - FOnBeforerefresh : TExtChartOnBeforerefresh; - FOnRefresh : TExtChartOnRefresh; - procedure SetFAnimate(Value : Boolean); - procedure SetFAnimateObject(Value : TExtObject); - procedure SetFAxes(Value : TExtObjectList); - procedure SetFBackground(Value : TExtObject); - procedure SetFBackgroundBoolean(Value : Boolean); - procedure SetFGradients(Value : TExtObjectList); - procedure SetFHasListeners(Value : TExtObject); - procedure SetFInsetPadding(Value : Integer); - procedure SetFIsObservable(Value : Boolean); - procedure SetFLegend(Value : Boolean); - procedure SetFLegendObject(Value : TExtObject); - procedure SetFListeners(Value : TExtObject); - procedure SetFMask(Value : Boolean); - procedure SetFMaskString(Value : String); - procedure SetFSeries(Value : TExtObjectList); - procedure SetFStore(Value : TExtDataStore); - procedure SetFTheme(Value : String); - procedure SetFOnBeforerefresh(Value : TExtChartOnBeforerefresh); - procedure SetFOnRefresh(Value : TExtChartOnRefresh); - protected - procedure InitDefaults; override; - procedure HandleEvent(const AEvtName: string); override; + FManageOverflow : Boolean; + FManagePadding : Boolean; + FReserveScrollbar : Boolean; + procedure SetFManageOverflow(Value : Boolean); + procedure SetFManagePadding(Value : Boolean); + procedure SetFReserveScrollbar(Value : Boolean); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function AddEvents(EventNames : String) : TExtFunction; overload; - function AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; overload; - function AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; overload; - function BindStore(Store : String = '') : TExtFunction; overload; - function ClearListeners : TExtFunction; - function ClearManagedListeners : TExtFunction; - constructor Create; - function EnableBubble(EventNames : String) : TExtFunction; overload; - function FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; - function FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; - function GetStore : TExtFunction; - function HasListener(EventName : String) : TExtFunction; - function Redraw(Resize : Boolean = false) : TExtFunction; - function RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; - function RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; - function RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; overload; - function RestoreZoom : TExtFunction; - function ResumeEvent(EventName : String) : TExtFunction; - function ResumeEvents : TExtFunction; - function Save(Config : TExtObject = nil) : TExtFunction; - function SetZoom : TExtFunction; - function SuspendEvent(EventName : String) : TExtFunction; - function SuspendEvents(QueueSuspended : Boolean) : TExtFunction; - destructor Destroy; override; - property Animate : Boolean read FAnimate write SetFAnimate; - property AnimateObject : TExtObject read FAnimateObject write SetFAnimateObject; - property Axes : TExtObjectList read FAxes write SetFAxes; - property Background : TExtObject read FBackground write SetFBackground; - property BackgroundBoolean : Boolean read FBackgroundBoolean write SetFBackgroundBoolean; - property Gradients : TExtObjectList read FGradients write SetFGradients; - property HasListeners : TExtObject read FHasListeners write SetFHasListeners; - property InsetPadding : Integer read FInsetPadding write SetFInsetPadding; - property IsObservable : Boolean read FIsObservable write SetFIsObservable; - property Legend : Boolean read FLegend write SetFLegend; - property LegendObject : TExtObject read FLegendObject write SetFLegendObject; - property Listeners : TExtObject read FListeners write SetFListeners; - property Mask : Boolean read FMask write SetFMask; - property MaskString : String read FMaskString write SetFMaskString; - property Series : TExtObjectList read FSeries write SetFSeries; - property Store : TExtDataStore read FStore write SetFStore; - property Theme : String read FTheme write SetFTheme; - property OnBeforerefresh : TExtChartOnBeforerefresh read FOnBeforerefresh write SetFOnBeforerefresh; - property OnRefresh : TExtChartOnRefresh read FOnRefresh write SetFOnRefresh; + property ManageOverflow : Boolean read FManageOverflow write SetFManageOverflow; + property ManagePadding : Boolean read FManagePadding write SetFManagePadding; + property ReserveScrollbar : Boolean read FReserveScrollbar write SetFReserveScrollbar; end; - // Procedural types for events TExtSelectionRowModel - TExtSelectionRowModelOnBeforedeselect = procedure(This : TExtSelectionRowModel; RecordJS : TExtDataModel; Index : Integer) of object; - TExtSelectionRowModelOnBeforeselect = procedure(This : TExtSelectionRowModel; RecordJS : TExtDataModel; Index : Integer) of object; - TExtSelectionRowModelOnDeselect = procedure(This : TExtSelectionRowModel; RecordJS : TExtDataModel; Index : Integer) of object; - TExtSelectionRowModelOnSelect = procedure(This : TExtSelectionRowModel; RecordJS : TExtDataModel; Index : Integer) of object; - - TExtSelectionRowModel = class(TExtSelectionModel) + TExtDrawText = class(TExtDrawComponent) private - FEnableKeyNav : Boolean; - FIgnoreRightMouseSelection : Boolean; - FOnBeforedeselect : TExtSelectionRowModelOnBeforedeselect; - FOnBeforeselect : TExtSelectionRowModelOnBeforeselect; - FOnDeselect : TExtSelectionRowModelOnDeselect; - FOnSelect : TExtSelectionRowModelOnSelect; - procedure SetFEnableKeyNav(Value : Boolean); - procedure SetFIgnoreRightMouseSelection(Value : Boolean); - procedure SetFOnBeforedeselect(Value : TExtSelectionRowModelOnBeforedeselect); - procedure SetFOnBeforeselect(Value : TExtSelectionRowModelOnBeforeselect); - procedure SetFOnDeselect(Value : TExtSelectionRowModelOnDeselect); - procedure SetFOnSelect(Value : TExtSelectionRowModelOnSelect); - protected - procedure HandleEvent(const AEvtName: string); override; + FDegrees : Integer; + FStyleSelector : String; + FText : String; + procedure SetFDegrees(Value : Integer); + procedure SetFStyleSelector(Value : String); + procedure SetFText(Value : String); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function GetCurrentPosition : TExtFunction; - function SelectNext(KeepExisting : Boolean = false; SuppressEvent : Boolean = false) : TExtFunction; - function SelectPrevious(KeepExisting : Boolean = false; SuppressEvent : Boolean = false) : TExtFunction; - property EnableKeyNav : Boolean read FEnableKeyNav write SetFEnableKeyNav; - property IgnoreRightMouseSelection : Boolean read FIgnoreRightMouseSelection write SetFIgnoreRightMouseSelection; - property OnBeforedeselect : TExtSelectionRowModelOnBeforedeselect read FOnBeforedeselect write SetFOnBeforedeselect; - property OnBeforeselect : TExtSelectionRowModelOnBeforeselect read FOnBeforeselect write SetFOnBeforeselect; - property OnDeselect : TExtSelectionRowModelOnDeselect read FOnDeselect write SetFOnDeselect; - property OnSelect : TExtSelectionRowModelOnSelect read FOnSelect write SetFOnSelect; + function SetAngle(Degrees : Integer) : TExtFunction; + function SetText(T : String) : TExtFunction; + property Degrees : Integer read FDegrees write SetFDegrees; + property StyleSelector : String read FStyleSelector write SetFStyleSelector; + property Text : String read FText write SetFText; end; - TExtLayoutComponentAuto = class(TExtLayoutComponent) + TExtDataProxyAjax = class(TExtDataProxyServer) + private + FActionMethods : TExtObject; + FBinary : Boolean; + FHeaders : TExtObject; + procedure SetFActionMethods(Value : TExtObject); + procedure SetFBinary(Value : Boolean); + procedure SetFHeaders(Value : TExtObject); + protected + procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; + function GetMethod(Request : TExtDataRequest) : TExtFunction; + destructor Destroy; override; + property ActionMethods : TExtObject read FActionMethods write SetFActionMethods; + property Binary : Boolean read FBinary write SetFBinary; + property Headers : TExtObject read FHeaders write SetFHeaders; end; - // Procedural types for events TExtSelectionDataViewModel - TExtSelectionDataViewModelOnBeforedeselect = procedure(This : TExtSelectionDataViewModel; RecordJS : TExtDataModel) of object; - TExtSelectionDataViewModelOnBeforeselect = procedure(This : TExtSelectionDataViewModel; RecordJS : TExtDataModel) of object; - TExtSelectionDataViewModelOnDeselect = procedure(This : TExtSelectionDataViewModel; RecordJS : TExtDataModel) of object; - TExtSelectionDataViewModelOnSelect = procedure(This : TExtSelectionDataViewModel; RecordJS : TExtDataModel) of object; - - TExtSelectionDataViewModel = class(TExtSelectionModel) + TExtChartAxisCategory = class(TExtChartAxis) private - FEnableKeyNav : Boolean; - FOnBeforedeselect : TExtSelectionDataViewModelOnBeforedeselect; - FOnBeforeselect : TExtSelectionDataViewModelOnBeforeselect; - FOnDeselect : TExtSelectionDataViewModelOnDeselect; - FOnSelect : TExtSelectionDataViewModelOnSelect; - procedure SetFEnableKeyNav(Value : Boolean); - procedure SetFOnBeforedeselect(Value : TExtSelectionDataViewModelOnBeforedeselect); - procedure SetFOnBeforeselect(Value : TExtSelectionDataViewModelOnBeforeselect); - procedure SetFOnDeselect(Value : TExtSelectionDataViewModelOnDeselect); - procedure SetFOnSelect(Value : TExtSelectionDataViewModelOnSelect); - protected - procedure HandleEvent(const AEvtName: string); override; + FCalculateCategoryCount : Boolean; + FCategoryNames : String; + procedure SetFCalculateCategoryCount(Value : Boolean); + procedure SetFCategoryNames(Value : String); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - property EnableKeyNav : Boolean read FEnableKeyNav write SetFEnableKeyNav; - property OnBeforedeselect : TExtSelectionDataViewModelOnBeforedeselect read FOnBeforedeselect write SetFOnBeforedeselect; - property OnBeforeselect : TExtSelectionDataViewModelOnBeforeselect read FOnBeforeselect write SetFOnBeforeselect; - property OnDeselect : TExtSelectionDataViewModelOnDeselect read FOnDeselect write SetFOnDeselect; - property OnSelect : TExtSelectionDataViewModelOnSelect read FOnSelect write SetFOnSelect; + property CalculateCategoryCount : Boolean read FCalculateCategoryCount write SetFCalculateCategoryCount; + property CategoryNames : String read FCategoryNames write SetFCategoryNames; end; // Procedural types for events TExtSliderMulti @@ -9897,6 +10335,7 @@ TExtSliderMulti = class(TExtFormFieldBase) FConstrainThumbs : Boolean; FDecimalPrecision : Integer; FDecimalPrecisionBoolean : Boolean; + FDragging : Boolean; FIncrement : Integer; FKeyIncrement : Integer; FMaxValue : Integer; @@ -9920,6 +10359,7 @@ TExtSliderMulti = class(TExtFormFieldBase) procedure SetFConstrainThumbs(Value : Boolean); procedure SetFDecimalPrecision(Value : Integer); procedure SetFDecimalPrecisionBoolean(Value : Boolean); + procedure SetFDragging(Value : Boolean); procedure SetFIncrement(Value : Integer); procedure SetFKeyIncrement(Value : Integer); procedure SetFMaxValue(Value : Integer); @@ -9958,6 +10398,7 @@ TExtSliderMulti = class(TExtFormFieldBase) property ConstrainThumbs : Boolean read FConstrainThumbs write SetFConstrainThumbs; property DecimalPrecision : Integer read FDecimalPrecision write SetFDecimalPrecision; property DecimalPrecisionBoolean : Boolean read FDecimalPrecisionBoolean write SetFDecimalPrecisionBoolean; + property Dragging : Boolean read FDragging write SetFDragging; property Increment : Integer read FIncrement write SetFIncrement; property KeyIncrement : Integer read FKeyIncrement write SetFKeyIncrement; property MaxValue : Integer read FMaxValue write SetFMaxValue; @@ -9978,185 +10419,70 @@ TExtSliderMulti = class(TExtFormFieldBase) property OnDragstart : TExtSliderMultiOnDragstart read FOnDragstart write SetFOnDragstart; end; - TExtChartAxisNumeric = class(TExtChartAxis) - private - FAdjustMaximumByMajorUnit : Boolean; - FAdjustMinimumByMajorUnit : Boolean; - FConstrain : Boolean; - FDecimals : Integer; - FMaximum : Integer; - FMinimum : Integer; - FPosition : String; - procedure SetFAdjustMaximumByMajorUnit(Value : Boolean); - procedure SetFAdjustMinimumByMajorUnit(Value : Boolean); - procedure SetFConstrain(Value : Boolean); - procedure SetFDecimals(Value : Integer); - procedure SetFMaximum(Value : Integer); - procedure SetFMinimum(Value : Integer); - procedure SetFPosition(Value : String); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - property AdjustMaximumByMajorUnit : Boolean read FAdjustMaximumByMajorUnit write SetFAdjustMaximumByMajorUnit; - property AdjustMinimumByMajorUnit : Boolean read FAdjustMinimumByMajorUnit write SetFAdjustMinimumByMajorUnit; - property Constrain : Boolean read FConstrain write SetFConstrain; - property Decimals : Integer read FDecimals write SetFDecimals; - property Maximum : Integer read FMaximum write SetFMaximum; - property Minimum : Integer read FMinimum write SetFMinimum; - property Position : String read FPosition write SetFPosition; - end; - - TExtDdDDProxy = class(TExtDdDD) - private - FCenterFrame : Boolean; - FResizeFrame : Boolean; - procedure SetFCenterFrame(Value : Boolean); - procedure SetFResizeFrame(Value : Boolean); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function CreateFrame : TExtFunction; - function InitFrame : TExtFunction; - property CenterFrame : Boolean read FCenterFrame write SetFCenterFrame; - property ResizeFrame : Boolean read FResizeFrame write SetFResizeFrame; - end; - - TExtDdDropTarget = class(TExtDdDDTarget) - private - FDdGroup : String; - FDropAllowed : String; - FDropNotAllowed : String; - FOverClass : String; - procedure SetFDdGroup(Value : String); - procedure SetFDropAllowed(Value : String); - procedure SetFDropNotAllowed(Value : String); - procedure SetFOverClass(Value : String); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - property DdGroup : String read FDdGroup write SetFDdGroup; - property DropAllowed : String read FDropAllowed write SetFDropAllowed; - property DropNotAllowed : String read FDropNotAllowed write SetFDropNotAllowed; - property OverClass : String read FOverClass write SetFOverClass; - end; - - // Procedural types for events TExtDirectRemotingProvider - TExtDirectRemotingProviderOnBeforecall = procedure(Provider : TExtDirectRemotingProvider; Transaction : TExtDirectTransaction; Meta : TExtObject) of object; - TExtDirectRemotingProviderOnBeforecallback = procedure(Provider : TExtDirectRemotingProvider; Transaction : TExtDirectTransaction) of object; - TExtDirectRemotingProviderOnCall = procedure(Provider : TExtDirectRemotingProvider; Transaction : TExtDirectTransaction; Meta : TExtObject) of object; - - TExtDirectRemotingProvider = class(TExtDirectJsonProvider) - private - FActions : TExtObject; - FDisableNestedActions : Boolean; - FEnableBuffer : Integer; - FEnableBufferBoolean : Boolean; - FEnableUrlEncode : String; - FMaxRetries : Integer; - FNamespace : String; - FNamespaceObject : TExtObject; - FTimeout : Integer; - FUrl : String; - FOnBeforecall : TExtDirectRemotingProviderOnBeforecall; - FOnBeforecallback : TExtDirectRemotingProviderOnBeforecallback; - FOnCall : TExtDirectRemotingProviderOnCall; - procedure SetFActions(Value : TExtObject); - procedure SetFDisableNestedActions(Value : Boolean); - procedure SetFEnableBuffer(Value : Integer); - procedure SetFEnableBufferBoolean(Value : Boolean); - procedure SetFEnableUrlEncode(Value : String); - procedure SetFMaxRetries(Value : Integer); - procedure SetFNamespace(Value : String); - procedure SetFNamespaceObject(Value : TExtObject); - procedure SetFTimeout(Value : Integer); - procedure SetFUrl(Value : String); - procedure SetFOnBeforecall(Value : TExtDirectRemotingProviderOnBeforecall); - procedure SetFOnBeforecallback(Value : TExtDirectRemotingProviderOnBeforecallback); - procedure SetFOnCall(Value : TExtDirectRemotingProviderOnCall); - protected - procedure InitDefaults; override; - procedure HandleEvent(const AEvtName: string); override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Connect : TExtFunction; - constructor Create; - function Disconnect : TExtFunction; - function IsConnected : TExtFunction; - destructor Destroy; override; - property Actions : TExtObject read FActions write SetFActions; - property DisableNestedActions : Boolean read FDisableNestedActions write SetFDisableNestedActions; - property EnableBuffer : Integer read FEnableBuffer write SetFEnableBuffer; - property EnableBufferBoolean : Boolean read FEnableBufferBoolean write SetFEnableBufferBoolean; - property EnableUrlEncode : String read FEnableUrlEncode write SetFEnableUrlEncode; - property MaxRetries : Integer read FMaxRetries write SetFMaxRetries; - property Namespace : String read FNamespace write SetFNamespace; - property NamespaceObject : TExtObject read FNamespaceObject write SetFNamespaceObject; - property Timeout : Integer read FTimeout write SetFTimeout; - property Url : String read FUrl write SetFUrl; - property OnBeforecall : TExtDirectRemotingProviderOnBeforecall read FOnBeforecall write SetFOnBeforecall; - property OnBeforecallback : TExtDirectRemotingProviderOnBeforecallback read FOnBeforecallback write SetFOnBeforecallback; - property OnCall : TExtDirectRemotingProviderOnCall read FOnCall write SetFOnCall; - end; - - // Procedural types for events TExtDirectPollingProvider - TExtDirectPollingProviderOnBeforepoll = procedure(This : TExtDirectPollingProvider) of object; - TExtDirectPollingProviderOnPoll = procedure(This : TExtDirectPollingProvider) of object; + // Procedural types for events TExtSelectionRowModel + TExtSelectionRowModelOnBeforedeselect = procedure(This : TExtSelectionRowModel; RecordJS : TExtDataModel; Index : Integer) of object; + TExtSelectionRowModelOnBeforeselect = procedure(This : TExtSelectionRowModel; RecordJS : TExtDataModel; Index : Integer) of object; + TExtSelectionRowModelOnDeselect = procedure(This : TExtSelectionRowModel; RecordJS : TExtDataModel; Index : Integer) of object; + TExtSelectionRowModelOnSelect = procedure(This : TExtSelectionRowModel; RecordJS : TExtDataModel; Index : Integer) of object; - TExtDirectPollingProvider = class(TExtDirectJsonProvider) + TExtSelectionRowModel = class(TExtSelectionModel) private - FBaseParams : TExtObject; - FInterval : Integer; // 3 - FUrl : String; - FUrlFunction : TExtFunction; - FOnBeforepoll : TExtDirectPollingProviderOnBeforepoll; - FOnPoll : TExtDirectPollingProviderOnPoll; - procedure SetFBaseParams(Value : TExtObject); - procedure SetFInterval(Value : Integer); - procedure SetFUrl(Value : String); - procedure SetFUrlFunction(Value : TExtFunction); - procedure SetFOnBeforepoll(Value : TExtDirectPollingProviderOnBeforepoll); - procedure SetFOnPoll(Value : TExtDirectPollingProviderOnPoll); + FEnableKeyNav : Boolean; + FIgnoreRightMouseSelection : Boolean; + FOnBeforedeselect : TExtSelectionRowModelOnBeforedeselect; + FOnBeforeselect : TExtSelectionRowModelOnBeforeselect; + FOnDeselect : TExtSelectionRowModelOnDeselect; + FOnSelect : TExtSelectionRowModelOnSelect; + procedure SetFEnableKeyNav(Value : Boolean); + procedure SetFIgnoreRightMouseSelection(Value : Boolean); + procedure SetFOnBeforedeselect(Value : TExtSelectionRowModelOnBeforedeselect); + procedure SetFOnBeforeselect(Value : TExtSelectionRowModelOnBeforeselect); + procedure SetFOnDeselect(Value : TExtSelectionRowModelOnDeselect); + procedure SetFOnSelect(Value : TExtSelectionRowModelOnSelect); protected - procedure InitDefaults; override; procedure HandleEvent(const AEvtName: string); override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Connect : TExtFunction; - constructor Create; - function Disconnect : TExtFunction; - function IsConnected : TExtFunction; - destructor Destroy; override; - property BaseParams : TExtObject read FBaseParams write SetFBaseParams; - property Interval : Integer read FInterval write SetFInterval; - property Url : String read FUrl write SetFUrl; - property UrlFunction : TExtFunction read FUrlFunction write SetFUrlFunction; - property OnBeforepoll : TExtDirectPollingProviderOnBeforepoll read FOnBeforepoll write SetFOnBeforepoll; - property OnPoll : TExtDirectPollingProviderOnPoll read FOnPoll write SetFOnPoll; + function GetCurrentPosition : TExtFunction; + function SelectNext(KeepExisting : Boolean = false; SuppressEvent : Boolean = false) : TExtFunction; + function SelectPrevious(KeepExisting : Boolean = false; SuppressEvent : Boolean = false) : TExtFunction; + property EnableKeyNav : Boolean read FEnableKeyNav write SetFEnableKeyNav; + property IgnoreRightMouseSelection : Boolean read FIgnoreRightMouseSelection write SetFIgnoreRightMouseSelection; + property OnBeforedeselect : TExtSelectionRowModelOnBeforedeselect read FOnBeforedeselect write SetFOnBeforedeselect; + property OnBeforeselect : TExtSelectionRowModelOnBeforeselect read FOnBeforeselect write SetFOnBeforeselect; + property OnDeselect : TExtSelectionRowModelOnDeselect read FOnDeselect write SetFOnDeselect; + property OnSelect : TExtSelectionRowModelOnSelect read FOnSelect write SetFOnSelect; end; - TExtLayoutContainerAuto = class(TExtLayoutContainer) - private - FManageOverflow : Boolean; - FManagePadding : Boolean; - FReserveScrollbar : Boolean; - procedure SetFManageOverflow(Value : Boolean); - procedure SetFManagePadding(Value : Boolean); - procedure SetFReserveScrollbar(Value : Boolean); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - property ManageOverflow : Boolean read FManageOverflow write SetFManageOverflow; - property ManagePadding : Boolean read FManagePadding write SetFManagePadding; - property ReserveScrollbar : Boolean read FReserveScrollbar write SetFReserveScrollbar; - end; + // Procedural types for events TExtSelectionDataViewModel + TExtSelectionDataViewModelOnBeforedeselect = procedure(This : TExtSelectionDataViewModel; RecordJS : TExtDataModel) of object; + TExtSelectionDataViewModelOnBeforeselect = procedure(This : TExtSelectionDataViewModel; RecordJS : TExtDataModel) of object; + TExtSelectionDataViewModelOnDeselect = procedure(This : TExtSelectionDataViewModel; RecordJS : TExtDataModel) of object; + TExtSelectionDataViewModelOnSelect = procedure(This : TExtSelectionDataViewModel; RecordJS : TExtDataModel) of object; - TExtLayoutComponentDock = class(TExtLayoutComponent) + TExtSelectionDataViewModel = class(TExtSelectionModel) + private + FEnableKeyNav : Boolean; + FOnBeforedeselect : TExtSelectionDataViewModelOnBeforedeselect; + FOnBeforeselect : TExtSelectionDataViewModelOnBeforeselect; + FOnDeselect : TExtSelectionDataViewModelOnDeselect; + FOnSelect : TExtSelectionDataViewModelOnSelect; + procedure SetFEnableKeyNav(Value : Boolean); + procedure SetFOnBeforedeselect(Value : TExtSelectionDataViewModelOnBeforedeselect); + procedure SetFOnBeforeselect(Value : TExtSelectionDataViewModelOnBeforeselect); + procedure SetFOnDeselect(Value : TExtSelectionDataViewModelOnDeselect); + procedure SetFOnSelect(Value : TExtSelectionDataViewModelOnSelect); + protected + procedure HandleEvent(const AEvtName: string); override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function InvalidateAxes : TExtFunction; + property EnableKeyNav : Boolean read FEnableKeyNav write SetFEnableKeyNav; + property OnBeforedeselect : TExtSelectionDataViewModelOnBeforedeselect read FOnBeforedeselect write SetFOnBeforedeselect; + property OnBeforeselect : TExtSelectionDataViewModelOnBeforeselect read FOnBeforeselect write SetFOnBeforeselect; + property OnDeselect : TExtSelectionDataViewModelOnDeselect read FOnDeselect write SetFOnDeselect; + property OnSelect : TExtSelectionDataViewModelOnSelect read FOnSelect write SetFOnSelect; end; // Procedural types for events TExtSelectionCellModel @@ -10189,328 +10515,304 @@ TExtSelectionCellModel = class(TExtSelectionModel) property OnSelect : TExtSelectionCellModelOnSelect read FOnSelect write SetFOnSelect; end; - TExtDirectExceptionEvent = class(TExtDirectRemotingEvent) + TExtLayoutComponentDock = class(TExtLayoutComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function InvalidateAxes : TExtFunction; end; - TExtGridFeatureRowWrap = class(TExtGridFeature) + TExtChartAxisNumeric = class(TExtChartAxis) + private + FAdjustMaximumByMajorUnit : Boolean; + FAdjustMinimumByMajorUnit : Boolean; + FConstrain : Boolean; + FDecimals : Integer; + FMaximum : Integer; + FMinimum : Integer; + FPosition : String; + procedure SetFAdjustMaximumByMajorUnit(Value : Boolean); + procedure SetFAdjustMinimumByMajorUnit(Value : Boolean); + procedure SetFConstrain(Value : Boolean); + procedure SetFDecimals(Value : Integer); + procedure SetFMaximum(Value : Integer); + procedure SetFMinimum(Value : Integer); + procedure SetFPosition(Value : String); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + property AdjustMaximumByMajorUnit : Boolean read FAdjustMaximumByMajorUnit write SetFAdjustMaximumByMajorUnit; + property AdjustMinimumByMajorUnit : Boolean read FAdjustMinimumByMajorUnit write SetFAdjustMinimumByMajorUnit; + property Constrain : Boolean read FConstrain write SetFConstrain; + property Decimals : Integer read FDecimals write SetFDecimals; + property Maximum : Integer read FMaximum write SetFMaximum; + property Minimum : Integer read FMinimum write SetFMinimum; + property Position : String read FPosition write SetFPosition; end; - // Procedural types for events TExtView - TExtViewOnBeforecontainerclick = procedure(This : TExtView; E : TExtEventObject) of object; - TExtViewOnBeforecontainercontextmenu = procedure(This : TExtView; E : TExtEventObject) of object; - TExtViewOnBeforecontainerdblclick = procedure(This : TExtView; E : TExtEventObject) of object; - TExtViewOnBeforecontainerkeydown = procedure(This : TExtView; E : TExtEventObject) of object; - TExtViewOnBeforecontainermousedown = procedure(This : TExtView; E : TExtEventObject) of object; - TExtViewOnBeforecontainermouseout = procedure(This : TExtView; E : TExtEventObject) of object; - TExtViewOnBeforecontainermouseover = procedure(This : TExtView; E : TExtEventObject) of object; - TExtViewOnBeforecontainermouseup = procedure(This : TExtView; E : TExtEventObject) of object; - TExtViewOnBeforeitemclick = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; - TExtViewOnBeforeitemcontextmenu = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; - TExtViewOnBeforeitemdblclick = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; - TExtViewOnBeforeitemkeydown = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; - TExtViewOnBeforeitemmousedown = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; - TExtViewOnBeforeitemmouseenter = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; - TExtViewOnBeforeitemmouseleave = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; - TExtViewOnBeforeitemmouseup = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; - TExtViewOnContainerclick = procedure(This : TExtView; E : TExtEventObject) of object; - TExtViewOnContainercontextmenu = procedure(This : TExtView; E : TExtEventObject) of object; - TExtViewOnContainerdblclick = procedure(This : TExtView; E : TExtEventObject) of object; - TExtViewOnContainerkeydown = procedure(This : TExtView; E : TExtEventObject) of object; - TExtViewOnContainermouseout = procedure(This : TExtView; E : TExtEventObject) of object; - TExtViewOnContainermouseover = procedure(This : TExtView; E : TExtEventObject) of object; - TExtViewOnContainermouseup = procedure(This : TExtView; E : TExtEventObject) of object; - TExtViewOnHighlightitem = procedure(View : TExtView; Node : TExtElement) of object; - TExtViewOnItemclick = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; - TExtViewOnItemcontextmenu = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; - TExtViewOnItemdblclick = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; - TExtViewOnItemkeydown = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; - TExtViewOnItemmousedown = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; - TExtViewOnItemmouseenter = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; - TExtViewOnItemmouseleave = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; - TExtViewOnItemmouseup = procedure(This : TExtView; RecordJS : TExtDataModel; Item : THTMLElement; Index : Integer; E : TExtEventObject) of object; - TExtViewOnUnhighlightitem = procedure(View : TExtView; Node : TExtElement) of object; + // Procedural types for events TExtChart + TExtChartOnBeforerefresh = procedure(This : TExtChart) of object; + TExtChartOnRefresh = procedure(This : TExtChart) of object; - TExtView = class(TExtViewAbstractView) + TExtChart = class(TExtDrawComponent) private - FMouseOverOutBuffer : Integer; - FOnBeforecontainerclick : TExtViewOnBeforecontainerclick; - FOnBeforecontainercontextmenu : TExtViewOnBeforecontainercontextmenu; - FOnBeforecontainerdblclick : TExtViewOnBeforecontainerdblclick; - FOnBeforecontainerkeydown : TExtViewOnBeforecontainerkeydown; - FOnBeforecontainermousedown : TExtViewOnBeforecontainermousedown; - FOnBeforecontainermouseout : TExtViewOnBeforecontainermouseout; - FOnBeforecontainermouseover : TExtViewOnBeforecontainermouseover; - FOnBeforecontainermouseup : TExtViewOnBeforecontainermouseup; - FOnBeforeitemclick : TExtViewOnBeforeitemclick; - FOnBeforeitemcontextmenu : TExtViewOnBeforeitemcontextmenu; - FOnBeforeitemdblclick : TExtViewOnBeforeitemdblclick; - FOnBeforeitemkeydown : TExtViewOnBeforeitemkeydown; - FOnBeforeitemmousedown : TExtViewOnBeforeitemmousedown; - FOnBeforeitemmouseenter : TExtViewOnBeforeitemmouseenter; - FOnBeforeitemmouseleave : TExtViewOnBeforeitemmouseleave; - FOnBeforeitemmouseup : TExtViewOnBeforeitemmouseup; - FOnContainerclick : TExtViewOnContainerclick; - FOnContainercontextmenu : TExtViewOnContainercontextmenu; - FOnContainerdblclick : TExtViewOnContainerdblclick; - FOnContainerkeydown : TExtViewOnContainerkeydown; - FOnContainermouseout : TExtViewOnContainermouseout; - FOnContainermouseover : TExtViewOnContainermouseover; - FOnContainermouseup : TExtViewOnContainermouseup; - FOnHighlightitem : TExtViewOnHighlightitem; - FOnItemclick : TExtViewOnItemclick; - FOnItemcontextmenu : TExtViewOnItemcontextmenu; - FOnItemdblclick : TExtViewOnItemdblclick; - FOnItemkeydown : TExtViewOnItemkeydown; - FOnItemmousedown : TExtViewOnItemmousedown; - FOnItemmouseenter : TExtViewOnItemmouseenter; - FOnItemmouseleave : TExtViewOnItemmouseleave; - FOnItemmouseup : TExtViewOnItemmouseup; - FOnUnhighlightitem : TExtViewOnUnhighlightitem; - procedure SetFMouseOverOutBuffer(Value : Integer); - procedure SetFOnBeforecontainerclick(Value : TExtViewOnBeforecontainerclick); - procedure SetFOnBeforecontainercontextmenu(Value : TExtViewOnBeforecontainercontextmenu); - procedure SetFOnBeforecontainerdblclick(Value : TExtViewOnBeforecontainerdblclick); - procedure SetFOnBeforecontainerkeydown(Value : TExtViewOnBeforecontainerkeydown); - procedure SetFOnBeforecontainermousedown(Value : TExtViewOnBeforecontainermousedown); - procedure SetFOnBeforecontainermouseout(Value : TExtViewOnBeforecontainermouseout); - procedure SetFOnBeforecontainermouseover(Value : TExtViewOnBeforecontainermouseover); - procedure SetFOnBeforecontainermouseup(Value : TExtViewOnBeforecontainermouseup); - procedure SetFOnBeforeitemclick(Value : TExtViewOnBeforeitemclick); - procedure SetFOnBeforeitemcontextmenu(Value : TExtViewOnBeforeitemcontextmenu); - procedure SetFOnBeforeitemdblclick(Value : TExtViewOnBeforeitemdblclick); - procedure SetFOnBeforeitemkeydown(Value : TExtViewOnBeforeitemkeydown); - procedure SetFOnBeforeitemmousedown(Value : TExtViewOnBeforeitemmousedown); - procedure SetFOnBeforeitemmouseenter(Value : TExtViewOnBeforeitemmouseenter); - procedure SetFOnBeforeitemmouseleave(Value : TExtViewOnBeforeitemmouseleave); - procedure SetFOnBeforeitemmouseup(Value : TExtViewOnBeforeitemmouseup); - procedure SetFOnContainerclick(Value : TExtViewOnContainerclick); - procedure SetFOnContainercontextmenu(Value : TExtViewOnContainercontextmenu); - procedure SetFOnContainerdblclick(Value : TExtViewOnContainerdblclick); - procedure SetFOnContainerkeydown(Value : TExtViewOnContainerkeydown); - procedure SetFOnContainermouseout(Value : TExtViewOnContainermouseout); - procedure SetFOnContainermouseover(Value : TExtViewOnContainermouseover); - procedure SetFOnContainermouseup(Value : TExtViewOnContainermouseup); - procedure SetFOnHighlightitem(Value : TExtViewOnHighlightitem); - procedure SetFOnItemclick(Value : TExtViewOnItemclick); - procedure SetFOnItemcontextmenu(Value : TExtViewOnItemcontextmenu); - procedure SetFOnItemdblclick(Value : TExtViewOnItemdblclick); - procedure SetFOnItemkeydown(Value : TExtViewOnItemkeydown); - procedure SetFOnItemmousedown(Value : TExtViewOnItemmousedown); - procedure SetFOnItemmouseenter(Value : TExtViewOnItemmouseenter); - procedure SetFOnItemmouseleave(Value : TExtViewOnItemmouseleave); - procedure SetFOnItemmouseup(Value : TExtViewOnItemmouseup); - procedure SetFOnUnhighlightitem(Value : TExtViewOnUnhighlightitem); + FAnimate : Boolean; + FAnimateObject : TExtObject; + FAxes : TExtObjectList; + FBackground : TExtObject; + FBackgroundBoolean : Boolean; + FGradients : TExtObjectList; + FHasListeners : TExtObject; + FInsetPadding : Integer; // 10 + FIsObservable : Boolean; + FLegend : Boolean; + FLegendObject : TExtObject; + FListeners : TExtObject; + FMask : Boolean; + FMaskString : String; + FSeries : TExtObjectList; + FStore : TExtDataStore; + FTheme : String; + FOnBeforerefresh : TExtChartOnBeforerefresh; + FOnRefresh : TExtChartOnRefresh; + procedure SetFAnimate(Value : Boolean); + procedure SetFAnimateObject(Value : TExtObject); + procedure SetFAxes(Value : TExtObjectList); + procedure SetFBackground(Value : TExtObject); + procedure SetFBackgroundBoolean(Value : Boolean); + procedure SetFGradients(Value : TExtObjectList); + procedure SetFHasListeners(Value : TExtObject); + procedure SetFInsetPadding(Value : Integer); + procedure SetFIsObservable(Value : Boolean); + procedure SetFLegend(Value : Boolean); + procedure SetFLegendObject(Value : TExtObject); + procedure SetFListeners(Value : TExtObject); + procedure SetFMask(Value : Boolean); + procedure SetFMaskString(Value : String); + procedure SetFSeries(Value : TExtObjectList); + procedure SetFStore(Value : TExtDataStore); + procedure SetFTheme(Value : String); + procedure SetFOnBeforerefresh(Value : TExtChartOnBeforerefresh); + procedure SetFOnRefresh(Value : TExtChartOnRefresh); protected + procedure InitDefaults; override; procedure HandleEvent(const AEvtName: string); override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function ClearHighlight : TExtFunction; - function FocusNode(Rec : TExtDataModel) : TExtFunction; - function HighlightItem(Item : THTMLElement) : TExtFunction; - property MouseOverOutBuffer : Integer read FMouseOverOutBuffer write SetFMouseOverOutBuffer; - property OnBeforecontainerclick : TExtViewOnBeforecontainerclick read FOnBeforecontainerclick write SetFOnBeforecontainerclick; - property OnBeforecontainercontextmenu : TExtViewOnBeforecontainercontextmenu read FOnBeforecontainercontextmenu write SetFOnBeforecontainercontextmenu; - property OnBeforecontainerdblclick : TExtViewOnBeforecontainerdblclick read FOnBeforecontainerdblclick write SetFOnBeforecontainerdblclick; - property OnBeforecontainerkeydown : TExtViewOnBeforecontainerkeydown read FOnBeforecontainerkeydown write SetFOnBeforecontainerkeydown; - property OnBeforecontainermousedown : TExtViewOnBeforecontainermousedown read FOnBeforecontainermousedown write SetFOnBeforecontainermousedown; - property OnBeforecontainermouseout : TExtViewOnBeforecontainermouseout read FOnBeforecontainermouseout write SetFOnBeforecontainermouseout; - property OnBeforecontainermouseover : TExtViewOnBeforecontainermouseover read FOnBeforecontainermouseover write SetFOnBeforecontainermouseover; - property OnBeforecontainermouseup : TExtViewOnBeforecontainermouseup read FOnBeforecontainermouseup write SetFOnBeforecontainermouseup; - property OnBeforeitemclick : TExtViewOnBeforeitemclick read FOnBeforeitemclick write SetFOnBeforeitemclick; - property OnBeforeitemcontextmenu : TExtViewOnBeforeitemcontextmenu read FOnBeforeitemcontextmenu write SetFOnBeforeitemcontextmenu; - property OnBeforeitemdblclick : TExtViewOnBeforeitemdblclick read FOnBeforeitemdblclick write SetFOnBeforeitemdblclick; - property OnBeforeitemkeydown : TExtViewOnBeforeitemkeydown read FOnBeforeitemkeydown write SetFOnBeforeitemkeydown; - property OnBeforeitemmousedown : TExtViewOnBeforeitemmousedown read FOnBeforeitemmousedown write SetFOnBeforeitemmousedown; - property OnBeforeitemmouseenter : TExtViewOnBeforeitemmouseenter read FOnBeforeitemmouseenter write SetFOnBeforeitemmouseenter; - property OnBeforeitemmouseleave : TExtViewOnBeforeitemmouseleave read FOnBeforeitemmouseleave write SetFOnBeforeitemmouseleave; - property OnBeforeitemmouseup : TExtViewOnBeforeitemmouseup read FOnBeforeitemmouseup write SetFOnBeforeitemmouseup; - property OnContainerclick : TExtViewOnContainerclick read FOnContainerclick write SetFOnContainerclick; - property OnContainercontextmenu : TExtViewOnContainercontextmenu read FOnContainercontextmenu write SetFOnContainercontextmenu; - property OnContainerdblclick : TExtViewOnContainerdblclick read FOnContainerdblclick write SetFOnContainerdblclick; - property OnContainerkeydown : TExtViewOnContainerkeydown read FOnContainerkeydown write SetFOnContainerkeydown; - property OnContainermouseout : TExtViewOnContainermouseout read FOnContainermouseout write SetFOnContainermouseout; - property OnContainermouseover : TExtViewOnContainermouseover read FOnContainermouseover write SetFOnContainermouseover; - property OnContainermouseup : TExtViewOnContainermouseup read FOnContainermouseup write SetFOnContainermouseup; - property OnHighlightitem : TExtViewOnHighlightitem read FOnHighlightitem write SetFOnHighlightitem; - property OnItemclick : TExtViewOnItemclick read FOnItemclick write SetFOnItemclick; - property OnItemcontextmenu : TExtViewOnItemcontextmenu read FOnItemcontextmenu write SetFOnItemcontextmenu; - property OnItemdblclick : TExtViewOnItemdblclick read FOnItemdblclick write SetFOnItemdblclick; - property OnItemkeydown : TExtViewOnItemkeydown read FOnItemkeydown write SetFOnItemkeydown; - property OnItemmousedown : TExtViewOnItemmousedown read FOnItemmousedown write SetFOnItemmousedown; - property OnItemmouseenter : TExtViewOnItemmouseenter read FOnItemmouseenter write SetFOnItemmouseenter; - property OnItemmouseleave : TExtViewOnItemmouseleave read FOnItemmouseleave write SetFOnItemmouseleave; - property OnItemmouseup : TExtViewOnItemmouseup read FOnItemmouseup write SetFOnItemmouseup; - property OnUnhighlightitem : TExtViewOnUnhighlightitem read FOnUnhighlightitem write SetFOnUnhighlightitem; - end; - - TExtChartAxisCategory = class(TExtChartAxis) - private - FCalculateCategoryCount : Boolean; - FCategoryNames : String; - procedure SetFCalculateCategoryCount(Value : Boolean); - procedure SetFCategoryNames(Value : String); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - property CalculateCategoryCount : Boolean read FCalculateCategoryCount write SetFCalculateCategoryCount; - property CategoryNames : String read FCategoryNames write SetFCategoryNames; + function AddEvents(EventNames : String) : TExtFunction; overload; + function AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; overload; + function AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; overload; + function BindStore(Store : String = '') : TExtFunction; overload; + function ClearListeners : TExtFunction; + function ClearManagedListeners : TExtFunction; + constructor Create; + function EnableBubble(EventNames : String) : TExtFunction; overload; + function FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; + function FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; + function GetStore : TExtFunction; + function HasListener(EventName : String) : TExtFunction; + function Redraw(Resize : Boolean = false) : TExtFunction; + function RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; + function RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; + function RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; overload; + function RestoreZoom : TExtFunction; + function ResumeEvent(EventName : String) : TExtFunction; + function ResumeEvents : TExtFunction; + function Save(Config : TExtObject = nil) : TExtFunction; + function SetZoom : TExtFunction; + function SuspendEvent(EventName : String) : TExtFunction; + function SuspendEvents(QueueSuspended : Boolean) : TExtFunction; + destructor Destroy; override; + property Animate : Boolean read FAnimate write SetFAnimate; + property AnimateObject : TExtObject read FAnimateObject write SetFAnimateObject; + property Axes : TExtObjectList read FAxes write SetFAxes; + property Background : TExtObject read FBackground write SetFBackground; + property BackgroundBoolean : Boolean read FBackgroundBoolean write SetFBackgroundBoolean; + property Gradients : TExtObjectList read FGradients write SetFGradients; + property HasListeners : TExtObject read FHasListeners write SetFHasListeners; + property InsetPadding : Integer read FInsetPadding write SetFInsetPadding; + property IsObservable : Boolean read FIsObservable write SetFIsObservable; + property Legend : Boolean read FLegend write SetFLegend; + property LegendObject : TExtObject read FLegendObject write SetFLegendObject; + property Listeners : TExtObject read FListeners write SetFListeners; + property Mask : Boolean read FMask write SetFMask; + property MaskString : String read FMaskString write SetFMaskString; + property Series : TExtObjectList read FSeries write SetFSeries; + property Store : TExtDataStore read FStore write SetFStore; + property Theme : String read FTheme write SetFTheme; + property OnBeforerefresh : TExtChartOnBeforerefresh read FOnBeforerefresh write SetFOnBeforerefresh; + property OnRefresh : TExtChartOnRefresh read FOnRefresh write SetFOnRefresh; end; - TExtGridFeatureAbstractSummary = class(TExtGridFeature) + TExtLayoutContainerBox = class(TExtLayoutContainer) private - FRemoteRoot : String; - procedure SetFRemoteRoot(Value : String); + FDefaultMargins : TExtObject; + FFlex : Integer; + FPack : String; + FPadding : String; + FStretchMaxPartner : String; + FStretchMaxPartnerComponent : TExtComponent; + procedure SetFDefaultMargins(Value : TExtObject); + procedure SetFFlex(Value : Integer); + procedure SetFPack(Value : String); + procedure SetFPadding(Value : String); + procedure SetFStretchMaxPartner(Value : String); + procedure SetFStretchMaxPartnerComponent(Value : TExtComponent); + protected + procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - property RemoteRoot : String read FRemoteRoot write SetFRemoteRoot; + constructor Create; + destructor Destroy; override; + property DefaultMargins : TExtObject read FDefaultMargins write SetFDefaultMargins; + property Flex : Integer read FFlex write SetFFlex; + property Pack : String read FPack write SetFPack; + property Padding : String read FPadding write SetFPadding; + property StretchMaxPartner : String read FStretchMaxPartner write SetFStretchMaxPartner; + property StretchMaxPartnerComponent : TExtComponent read FStretchMaxPartnerComponent write SetFStretchMaxPartnerComponent; end; - TExtGridFeatureGrouping = class(TExtGridFeature) + TExtDataProxyMemory = class(TExtDataProxyClient) private - FCollapsible : Boolean; - FDepthToIndent : Integer; - FEnableGroupingMenu : Boolean; - FEnableNoGroups : Boolean; - FGroupByText : String; - FGroupHeaderTpl : String; - FGroupHeaderTplList : TExtObjectList; - FGroupHeaderTplTemplate : TExtTemplate; - FHideGroupedHeader : Boolean; - FRemoteRoot : String; - FShowGroupsText : String; - FStartCollapsed : Boolean; - procedure SetFCollapsible(Value : Boolean); - procedure SetFDepthToIndent(Value : Integer); - procedure SetFEnableGroupingMenu(Value : Boolean); - procedure SetFEnableNoGroups(Value : Boolean); - procedure SetFGroupByText(Value : String); - procedure SetFGroupHeaderTpl(Value : String); - procedure SetFGroupHeaderTplList(Value : TExtObjectList); - procedure SetFGroupHeaderTplTemplate(Value : TExtTemplate); - procedure SetFHideGroupedHeader(Value : Boolean); - procedure SetFRemoteRoot(Value : String); - procedure SetFShowGroupsText(Value : String); - procedure SetFStartCollapsed(Value : Boolean); + FData : TExtObject; + FEnablePaging : Boolean; + procedure SetFData(Value : TExtObject); + procedure SetFEnablePaging(Value : Boolean); protected procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Collapse(GroupName : String; Focus : Boolean) : TExtFunction; - function CollapseAll : TExtFunction; constructor Create; - function Expand(GroupName : String; Focus : Boolean) : TExtFunction; - function ExpandAll : TExtFunction; - function GetRecordGroup(RecordJS : TExtDataModel) : TExtFunction; - function IsExpanded(GroupName : String) : TExtFunction; + function Read(Operation : TExtDataOperation; Callback : TExtFunction; Scope : TExtObject) : TExtFunction; + function Update(Operation : TExtDataOperation; Callback : TExtFunction; Scope : TExtObject) : TExtFunction; destructor Destroy; override; - property Collapsible : Boolean read FCollapsible write SetFCollapsible; - property DepthToIndent : Integer read FDepthToIndent write SetFDepthToIndent; - property EnableGroupingMenu : Boolean read FEnableGroupingMenu write SetFEnableGroupingMenu; - property EnableNoGroups : Boolean read FEnableNoGroups write SetFEnableNoGroups; - property GroupByText : String read FGroupByText write SetFGroupByText; - property GroupHeaderTpl : String read FGroupHeaderTpl write SetFGroupHeaderTpl; - property GroupHeaderTplList : TExtObjectList read FGroupHeaderTplList write SetFGroupHeaderTplList; - property GroupHeaderTplTemplate : TExtTemplate read FGroupHeaderTplTemplate write SetFGroupHeaderTplTemplate; - property HideGroupedHeader : Boolean read FHideGroupedHeader write SetFHideGroupedHeader; - property RemoteRoot : String read FRemoteRoot write SetFRemoteRoot; - property ShowGroupsText : String read FShowGroupsText write SetFShowGroupsText; - property StartCollapsed : Boolean read FStartCollapsed write SetFStartCollapsed; + property Data : TExtObject read FData write SetFData; + property EnablePaging : Boolean read FEnablePaging write SetFEnablePaging; end; - TExtGridFeatureRowBody = class(TExtGridFeature) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function SetupRowData(Data : TExtObject; Idx : Integer; RecordJS : TExtDataModel; Orig : TExtObject) : TExtFunction; - end; + // Procedural types for events TExtButtonSplit + TExtButtonSplitOnArrowclick = procedure(This : TExtButtonSplit; E : TExtDirectEvent) of object; - TExtDataProxyJsonP = class(TExtDataProxyServer) + TExtButtonSplit = class(TExtButton) private - FAutoAppendParams : Boolean; // true - FCallbackKey : String; - FRecordParam : String; - procedure SetFAutoAppendParams(Value : Boolean); - procedure SetFCallbackKey(Value : String); - procedure SetFRecordParam(Value : String); + FArrowHandler : TExtFunction; + FArrowTooltip : String; + FOnArrowclick : TExtButtonSplitOnArrowclick; + procedure SetFArrowHandler(Value : TExtFunction); + procedure SetFArrowTooltip(Value : String); + procedure SetFOnArrowclick(Value : TExtButtonSplitOnArrowclick); protected - procedure InitDefaults; override; + procedure HandleEvent(const AEvtName: string); override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Abort : TExtFunction; - function BuildUrl(Request : TExtDataRequest) : TExtFunction; - constructor Create; - function EncodeRecords(Records : TExtObjectList) : TExtFunction; - property AutoAppendParams : Boolean read FAutoAppendParams write SetFAutoAppendParams; - property CallbackKey : String read FCallbackKey write SetFCallbackKey; - property RecordParam : String read FRecordParam write SetFRecordParam; + function SetArrowHandler(Handler : TExtFunction; Scope : TExtObject = nil) : TExtFunction; + property ArrowHandler : TExtFunction read FArrowHandler write SetFArrowHandler; + property ArrowTooltip : String read FArrowTooltip write SetFArrowTooltip; + property OnArrowclick : TExtButtonSplitOnArrowclick read FOnArrowclick write SetFOnArrowclick; end; - TExtGridPluginRowEditing = class(TExtGridPluginEditing) + // Procedural types for events TExtTab + TExtTabOnActivate = procedure(This : TExtTab) of object; + TExtTabOnBeforeclose = procedure(Tab : TExtTab) of object; + TExtTabOnClose = procedure(Tab : TExtTab) of object; + TExtTabOnDeactivate = procedure(This : TExtTab) of object; + + TExtTab = class(TExtButton) private - FAutoCancel : Boolean; - FClicksToMoveEditor : Integer; - FErrorSummary : Boolean; - procedure SetFAutoCancel(Value : Boolean); - procedure SetFClicksToMoveEditor(Value : Integer); - procedure SetFErrorSummary(Value : Boolean); + FActive : Boolean; + FActiveCls : String; + FClosable : Boolean; + FClosable_ : Boolean; + FClosableCls : String; + FCloseText : String; + FDisabledCls : String; + FIsTab : Boolean; + FOnActivate : TExtTabOnActivate; + FOnBeforeclose : TExtTabOnBeforeclose; + FOnClose : TExtTabOnClose; + FOnDeactivate : TExtTabOnDeactivate; + procedure SetFActive(Value : Boolean); + procedure SetFActiveCls(Value : String); + procedure SetFClosable(Value : Boolean); + procedure SetFClosable_(Value : Boolean); + procedure SetFClosableCls(Value : String); + procedure SetFCloseText(Value : String); + procedure SetFDisabledCls(Value : String); + procedure SetFIsTab(Value : Boolean); + procedure SetFOnActivate(Value : TExtTabOnActivate); + procedure SetFOnBeforeclose(Value : TExtTabOnBeforeclose); + procedure SetFOnClose(Value : TExtTabOnClose); + procedure SetFOnDeactivate(Value : TExtTabOnDeactivate); + protected + procedure HandleEvent(const AEvtName: string); override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function StartEdit(RecordJS : TExtDataModel; ColumnHeader : TExtDataModel) : TExtFunction; - property AutoCancel : Boolean read FAutoCancel write SetFAutoCancel; - property ClicksToMoveEditor : Integer read FClicksToMoveEditor write SetFClicksToMoveEditor; - property ErrorSummary : Boolean read FErrorSummary write SetFErrorSummary; + function SetCard(Card : TExtComponent) : TExtFunction; + function SetClosable(Closable : Boolean) : TExtFunction; + property Active : Boolean read FActive write SetFActive; + property ActiveCls : String read FActiveCls write SetFActiveCls; + property Closable : Boolean read FClosable write SetFClosable; + property Closable_ : Boolean read FClosable_ write SetFClosable_; + property ClosableCls : String read FClosableCls write SetFClosableCls; + property CloseText : String read FCloseText write SetFCloseText; + property DisabledCls : String read FDisabledCls write SetFDisabledCls; + property IsTab : Boolean read FIsTab write SetFIsTab; + property OnActivate : TExtTabOnActivate read FOnActivate write SetFOnActivate; + property OnBeforeclose : TExtTabOnBeforeclose read FOnBeforeclose write SetFOnBeforeclose; + property OnClose : TExtTabOnClose read FOnClose write SetFOnClose; + property OnDeactivate : TExtTabOnDeactivate read FOnDeactivate write SetFOnDeactivate; end; - TExtDataWriterXml = class(TExtDataWriter) + TExtGridPluginRowEditing = class(TExtGridPluginEditing) private - FDefaultDocumentRoot : String; - FDocumentRoot : String; // 'xmlData' - FHeader : String; - FRecordJS : String; // 'record' - procedure SetFDefaultDocumentRoot(Value : String); - procedure SetFDocumentRoot(Value : String); - procedure SetFHeader(Value : String); - procedure SetFRecordJS(Value : String); - protected - procedure InitDefaults; override; + FAutoCancel : Boolean; + FClicksToMoveEditor : Integer; + FErrorSummary : Boolean; + procedure SetFAutoCancel(Value : Boolean); + procedure SetFClicksToMoveEditor(Value : Integer); + procedure SetFErrorSummary(Value : Boolean); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - property DefaultDocumentRoot : String read FDefaultDocumentRoot write SetFDefaultDocumentRoot; - property DocumentRoot : String read FDocumentRoot write SetFDocumentRoot; - property Header : String read FHeader write SetFHeader; - property RecordJS : String read FRecordJS write SetFRecordJS; + function StartEdit(RecordJS : TExtDataModel; ColumnHeader : TExtDataModel) : TExtFunction; + property AutoCancel : Boolean read FAutoCancel write SetFAutoCancel; + property ClicksToMoveEditor : Integer read FClicksToMoveEditor write SetFClicksToMoveEditor; + property ErrorSummary : Boolean read FErrorSummary write SetFErrorSummary; end; - TExtDrawCompositeSprite = class(TExtUtilMixedCollection) + // Procedural types for events TExtGridPluginCellEditing + TExtGridPluginCellEditingOnBeforeedit = procedure(Editor : TExtGridPluginCellEditing; E : TExtObject) of object; + TExtGridPluginCellEditingOnCanceledit = procedure(Editor : TExtGridPluginCellEditing; E : TExtObject) of object; + TExtGridPluginCellEditingOnEdit = procedure(Editor : TExtGridPluginCellEditing; E : TExtObject) of object; + TExtGridPluginCellEditingOnValidateedit = procedure(Editor : TExtGridPluginCellEditing; E : TExtObject) of object; + + TExtGridPluginCellEditing = class(TExtGridPluginEditing) + private + FOnBeforeedit : TExtGridPluginCellEditingOnBeforeedit; + FOnCanceledit : TExtGridPluginCellEditingOnCanceledit; + FOnEdit : TExtGridPluginCellEditingOnEdit; + FOnValidateedit : TExtGridPluginCellEditingOnValidateedit; + procedure SetFOnBeforeedit(Value : TExtGridPluginCellEditingOnBeforeedit); + procedure SetFOnCanceledit(Value : TExtGridPluginCellEditingOnCanceledit); + procedure SetFOnEdit(Value : TExtGridPluginCellEditingOnEdit); + procedure SetFOnValidateedit(Value : TExtGridPluginCellEditingOnValidateedit); + protected + procedure HandleEvent(const AEvtName: string); override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function AddCls(Cls : String) : TExtFunction; - function Animate(Config : TExtObject) : TExtFunction; - function GetActiveAnimation : TExtFunction; - function GetBBox : TExtFunction; - function Hide(Redraw : Boolean) : TExtFunction; - function Redraw : TExtFunction; - function RemoveCls(Cls : String) : TExtFunction; - function SequenceFx : TExtFunction; - function SetAttributes(Attrs : TExtObject; Redraw : Boolean) : TExtFunction; - function SetStyle(Style : String) : TExtFunction; - function Show(Redraw : Boolean) : TExtFunction; - function StopAnimation : TExtFunction; - function SyncFx : TExtFunction; + function CancelEdit : TExtFunction; + function StartEdit(RecordJS : Integer; ColumnHeader : Integer) : TExtFunction; overload; + function StartEditByPosition(Position : TExtObject) : TExtFunction; + property OnBeforeedit : TExtGridPluginCellEditingOnBeforeedit read FOnBeforeedit write SetFOnBeforeedit; + property OnCanceledit : TExtGridPluginCellEditingOnCanceledit read FOnCanceledit write SetFOnCanceledit; + property OnEdit : TExtGridPluginCellEditingOnEdit read FOnEdit write SetFOnEdit; + property OnValidateedit : TExtGridPluginCellEditingOnValidateedit read FOnValidateedit write SetFOnValidateedit; end; TExtDataProxyDirect = class(TExtDataProxyServer) @@ -10545,65 +10847,55 @@ TExtDataProxyDirect = class(TExtDataProxyServer) property ParamsAsHash : Boolean read FParamsAsHash write SetFParamsAsHash; end; - TExtDataProxyAjax = class(TExtDataProxyServer) + TExtDataProxyJsonP = class(TExtDataProxyServer) private - FBinary : Boolean; - FHeaders : TExtObject; - procedure SetFBinary(Value : Boolean); - procedure SetFHeaders(Value : TExtObject); + FAutoAppendParams : Boolean; // true + FCallbackKey : String; + FRecordParam : String; + procedure SetFAutoAppendParams(Value : Boolean); + procedure SetFCallbackKey(Value : String); + procedure SetFRecordParam(Value : String); protected procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function Abort : TExtFunction; + function BuildUrl(Request : TExtDataRequest) : TExtFunction; constructor Create; - function GetMethod(Request : TExtDataRequest) : TExtFunction; - destructor Destroy; override; - property Binary : Boolean read FBinary write SetFBinary; - property Headers : TExtObject read FHeaders write SetFHeaders; + function EncodeRecords(Records : TExtObjectList) : TExtFunction; + property AutoAppendParams : Boolean read FAutoAppendParams write SetFAutoAppendParams; + property CallbackKey : String read FCallbackKey write SetFCallbackKey; + property RecordParam : String read FRecordParam write SetFRecordParam; end; - // Procedural types for events TExtGridPluginCellEditing - TExtGridPluginCellEditingOnBeforeedit = procedure(Editor : TExtGridPluginCellEditing; E : TExtObject) of object; - TExtGridPluginCellEditingOnCanceledit = procedure(Editor : TExtGridPluginCellEditing; E : TExtObject) of object; - TExtGridPluginCellEditingOnEdit = procedure(Editor : TExtGridPluginCellEditing; E : TExtObject) of object; - TExtGridPluginCellEditingOnValidateedit = procedure(Editor : TExtGridPluginCellEditing; E : TExtObject) of object; - - TExtGridPluginCellEditing = class(TExtGridPluginEditing) + TExtLayoutContainerBorder = class(TExtLayoutContainer) private - FOnBeforeedit : TExtGridPluginCellEditingOnBeforeedit; - FOnCanceledit : TExtGridPluginCellEditingOnCanceledit; - FOnEdit : TExtGridPluginCellEditingOnEdit; - FOnValidateedit : TExtGridPluginCellEditingOnValidateedit; - procedure SetFOnBeforeedit(Value : TExtGridPluginCellEditingOnBeforeedit); - procedure SetFOnCanceledit(Value : TExtGridPluginCellEditingOnCanceledit); - procedure SetFOnEdit(Value : TExtGridPluginCellEditingOnEdit); - procedure SetFOnValidateedit(Value : TExtGridPluginCellEditingOnValidateedit); + FPadding : Integer; + FPaddingObject : TExtObject; + FPaddingString : String; + FRegionWeights : TExtObject; + FSplit : Boolean; + FSplitterResize : Boolean; + procedure SetFPadding(Value : Integer); + procedure SetFPaddingObject(Value : TExtObject); + procedure SetFPaddingString(Value : String); + procedure SetFRegionWeights(Value : TExtObject); + procedure SetFSplit(Value : Boolean); + procedure SetFSplitterResize(Value : Boolean); protected - procedure HandleEvent(const AEvtName: string); override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function CancelEdit : TExtFunction; - function StartEdit(RecordJS : Integer; ColumnHeader : Integer) : TExtFunction; overload; - function StartEditByPosition(Position : TExtObject) : TExtFunction; - property OnBeforeedit : TExtGridPluginCellEditingOnBeforeedit read FOnBeforeedit write SetFOnBeforeedit; - property OnCanceledit : TExtGridPluginCellEditingOnCanceledit read FOnCanceledit write SetFOnCanceledit; - property OnEdit : TExtGridPluginCellEditingOnEdit read FOnEdit write SetFOnEdit; - property OnValidateedit : TExtGridPluginCellEditingOnValidateedit read FOnValidateedit write SetFOnValidateedit; - end; - - TExtChartAxisRadial = class(TExtChartAxisNumeric) - private - FMaximum : Integer; - FSteps : Integer; - procedure SetFMaximum(Value : Integer); - procedure SetFSteps(Value : Integer); + procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - property Maximum : Integer read FMaximum write SetFMaximum; - property Steps : Integer read FSteps write SetFSteps; + constructor Create; + destructor Destroy; override; + property Padding : Integer read FPadding write SetFPadding; + property PaddingObject : TExtObject read FPaddingObject write SetFPaddingObject; + property PaddingString : String read FPaddingString write SetFPaddingString; + property RegionWeights : TExtObject read FRegionWeights write SetFRegionWeights; + property Split : Boolean read FSplit write SetFSplit; + property SplitterResize : Boolean read FSplitterResize write SetFSplitterResize; end; TExtSelectionCheckboxModel = class(TExtSelectionRowModel) @@ -10634,14 +10926,6 @@ TExtSelectionCheckboxModel = class(TExtSelectionRowModel) property ShowHeaderCheckbox : Boolean read FShowHeaderCheckbox write SetFShowHeaderCheckbox; end; - TExtChartLegendItem = class(TExtDrawCompositeSprite) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function CreateLegend : TExtFunction; - function UpdatePosition(RelativeTo : TExtObject = nil) : TExtFunction; - end; - TExtChartAxisTime = class(TExtChartAxisNumeric) private FConstrain : Boolean; @@ -10671,50 +10955,12 @@ TExtChartAxisTime = class(TExtChartAxisNumeric) property ToDate : TDateTime read FToDate write SetFToDate; end; - TExtSelectionTreeModel = class(TExtSelectionRowModel) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - - // Procedural types for events TExtButtonCycle - TExtButtonCycleOnChange = procedure(This : TExtButtonCycle; Item : TExtMenuCheckItem) of object; - - TExtButtonCycle = class(TExtButtonSplit) - private - FChangeHandler : TExtFunction; - FForceGlyph : Integer; - FForceGlyphString : String; - FForceIcon : String; - FMenu : TExtMenu; - FPrependText : String; - FShowText : Boolean; - FOnChange : TExtButtonCycleOnChange; - procedure SetFChangeHandler(Value : TExtFunction); - procedure SetFForceGlyph(Value : Integer); - procedure SetFForceGlyphString(Value : String); - procedure SetFForceIcon(Value : String); - procedure SetFMenu(Value : TExtMenu); - procedure SetFPrependText(Value : String); - procedure SetFShowText(Value : Boolean); - procedure SetFOnChange(Value : TExtButtonCycleOnChange); - protected - procedure InitDefaults; override; - procedure HandleEvent(const AEvtName: string); override; + TExtChartLegendItem = class(TExtDrawCompositeSprite) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - function ToggleSelected : TExtFunction; - destructor Destroy; override; - property ChangeHandler : TExtFunction read FChangeHandler write SetFChangeHandler; - property ForceGlyph : Integer read FForceGlyph write SetFForceGlyph; - property ForceGlyphString : String read FForceGlyphString write SetFForceGlyphString; - property ForceIcon : String read FForceIcon write SetFForceIcon; - property Menu : TExtMenu read FMenu write SetFMenu; - property PrependText : String read FPrependText write SetFPrependText; - property ShowText : Boolean read FShowText write SetFShowText; - property OnChange : TExtButtonCycleOnChange read FOnChange write SetFOnChange; + function CreateLegend : TExtFunction; + function UpdatePosition(RelativeTo : TExtObject = nil) : TExtFunction; end; // Procedural types for events TExtToolbar @@ -10724,6 +10970,7 @@ TExtToolbar = class(TExtContainer) private FDefaultButtonUI : String; FEnableOverflow : Boolean; + FIsToolbar : Boolean; FLayout : TExtEnumsLayout; FLayoutObject : TExtObject; FMenuTriggerCls : String; @@ -10731,6 +10978,7 @@ TExtToolbar = class(TExtContainer) FOnOverflowchange : TExtToolbarOnOverflowchange; procedure SetFDefaultButtonUI(Value : String); procedure SetFEnableOverflow(Value : Boolean); + procedure SetFIsToolbar(Value : Boolean); procedure SetFLayout(Value : TExtEnumsLayout); procedure SetFLayoutObject(Value : TExtObject); procedure SetFMenuTriggerCls(Value : String); @@ -10746,6 +10994,7 @@ TExtToolbar = class(TExtContainer) destructor Destroy; override; property DefaultButtonUI : String read FDefaultButtonUI write SetFDefaultButtonUI; property EnableOverflow : Boolean read FEnableOverflow write SetFEnableOverflow; + property IsToolbar : Boolean read FIsToolbar write SetFIsToolbar; property Layout : TExtEnumsLayout read FLayout write SetFLayout; property LayoutObject : TExtObject read FLayoutObject write SetFLayoutObject; property MenuTriggerCls : String read FMenuTriggerCls write SetFMenuTriggerCls; @@ -10779,38 +11028,362 @@ TExtChartSeriesColumn = class(TExtChartSeriesBar) property YPaddingObject : TExtObject read FYPaddingObject write SetFYPaddingObject; end; - TExtSliderSingle = class(TExtSliderMulti) + // Procedural types for events TExtButtonCycle + TExtButtonCycleOnChange = procedure(This : TExtButtonCycle; Item : TExtMenuCheckItem) of object; + + TExtButtonCycle = class(TExtButtonSplit) + private + FChangeHandler : TExtFunction; + FForceGlyph : Integer; + FForceGlyphString : String; + FForceIcon : String; + FMenu : TExtMenu; + FPrependText : String; + FShowText : Boolean; + FOnChange : TExtButtonCycleOnChange; + procedure SetFChangeHandler(Value : TExtFunction); + procedure SetFForceGlyph(Value : Integer); + procedure SetFForceGlyphString(Value : String); + procedure SetFForceIcon(Value : String); + procedure SetFMenu(Value : TExtMenu); + procedure SetFPrependText(Value : String); + procedure SetFShowText(Value : Boolean); + procedure SetFOnChange(Value : TExtButtonCycleOnChange); + protected + procedure InitDefaults; override; + procedure HandleEvent(const AEvtName: string); override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; + function ToggleSelected : TExtFunction; + destructor Destroy; override; + property ChangeHandler : TExtFunction read FChangeHandler write SetFChangeHandler; + property ForceGlyph : Integer read FForceGlyph write SetFForceGlyph; + property ForceGlyphString : String read FForceGlyphString write SetFForceGlyphString; + property ForceIcon : String read FForceIcon write SetFForceIcon; + property Menu : TExtMenu read FMenu write SetFMenu; + property PrependText : String read FPrependText write SetFPrependText; + property ShowText : Boolean read FShowText write SetFShowText; + property OnChange : TExtButtonCycleOnChange read FOnChange write SetFOnChange; + end; + + TExtSliderSingle = class(TExtSliderMulti) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function GetValue : TExtFunction; + function SetValue(Value : Integer; Animate : Boolean = false) : TExtFunction; + end; + + TExtDdDropZone = class(TExtDdDropTarget) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function GetTargetFromEvent(E : TEvent) : TExtFunction; + function OnNodeEnter(NodeData : TExtObject; Source : TExtDdDragSource; E : TEvent; Data : TExtObject) : TExtFunction; + end; + + TExtSelectionTreeModel = class(TExtSelectionRowModel) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + + TExtChartAxisRadial = class(TExtChartAxisNumeric) + private + FMaximum : Integer; + FSteps : Integer; + procedure SetFMaximum(Value : Integer); + procedure SetFSteps(Value : Integer); + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + property Maximum : Integer read FMaximum write SetFMaximum; + property Steps : Integer read FSteps write SetFSteps; + end; + + TExtLayoutComponentBoundList = class(TExtLayoutComponentAuto) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + + TExtLayoutComponentButton = class(TExtLayoutComponentAuto) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + + TExtLayoutComponentBody = class(TExtLayoutComponentAuto) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + + // Procedural types for events TExtEditor + TExtEditorOnBeforecomplete = procedure(This : TExtEditor; Value : TExtObject; StartValue : TExtObject) of object; + TExtEditorOnBeforestartedit = procedure(This : TExtEditor; BoundEl : TExtElement; Value : TExtObject) of object; + TExtEditorOnCanceledit = procedure(This : TExtEditor; Value : TExtObject; StartValue : TExtObject) of object; + TExtEditorOnComplete = procedure(This : TExtEditor; Value : TExtObject; StartValue : TExtObject) of object; + TExtEditorOnSpecialkey = procedure(This : TExtEditor; Field : TExtFormField; Event : TExtEventObject) of object; + TExtEditorOnStartedit = procedure(This : TExtEditor; BoundEl : TExtElement; Value : TExtObject) of object; + + TExtEditor = class(TExtContainer) + private + FAlignment : String; + FAllowBlur : Boolean; + FAutoSize : Boolean; + FAutoSizeObject : TExtObject; + FCancelOnEsc : Boolean; + FCompleteOnEnter : Boolean; + FConstrain : Boolean; + FField : TExtFormField; + FHideEl : Boolean; + FIgnoreNoChange : Boolean; + FOffsets : TArrayOfInteger; + FParentEl : String; + FParentElElement : TExtElement; + FParentElTHTMLElement : THTMLElement; + FRevertInvalid : Boolean; + FShadow : Boolean; + FShadowString : String; + FSwallowKeys : Boolean; + FUpdateEl : Boolean; + FValue : TExtObject; + FOnBeforecomplete : TExtEditorOnBeforecomplete; + FOnBeforestartedit : TExtEditorOnBeforestartedit; + FOnCanceledit : TExtEditorOnCanceledit; + FOnComplete : TExtEditorOnComplete; + FOnSpecialkey : TExtEditorOnSpecialkey; + FOnStartedit : TExtEditorOnStartedit; + procedure SetFAlignment(Value : String); + procedure SetFAllowBlur(Value : Boolean); + procedure SetFAutoSize(Value : Boolean); + procedure SetFAutoSizeObject(Value : TExtObject); + procedure SetFCancelOnEsc(Value : Boolean); + procedure SetFCompleteOnEnter(Value : Boolean); + procedure SetFConstrain(Value : Boolean); + procedure SetFField(Value : TExtFormField); + procedure SetFHideEl(Value : Boolean); + procedure SetFIgnoreNoChange(Value : Boolean); + procedure SetFOffsets(Value : TArrayOfInteger); + procedure SetFParentEl(Value : String); + procedure SetFParentElElement(Value : TExtElement); + procedure SetFParentElTHTMLElement(Value : THTMLElement); + procedure SetFRevertInvalid(Value : Boolean); + procedure SetFShadow(Value : Boolean); + procedure SetFShadowString(Value : String); + procedure SetFSwallowKeys(Value : Boolean); + procedure SetFUpdateEl(Value : Boolean); + procedure SetFValue(Value : TExtObject); + procedure SetFOnBeforecomplete(Value : TExtEditorOnBeforecomplete); + procedure SetFOnBeforestartedit(Value : TExtEditorOnBeforestartedit); + procedure SetFOnCanceledit(Value : TExtEditorOnCanceledit); + procedure SetFOnComplete(Value : TExtEditorOnComplete); + procedure SetFOnSpecialkey(Value : TExtEditorOnSpecialkey); + procedure SetFOnStartedit(Value : TExtEditorOnStartedit); + protected + procedure InitDefaults; override; + procedure HandleEvent(const AEvtName: string); override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function CancelEdit(RemainVisible : Boolean = false) : TExtFunction; + function CompleteEdit(RemainVisible : Boolean = false) : TExtFunction; + constructor Create; + function GetValue : TExtFunction; + function Realign(AutoSize : Boolean = false) : TExtFunction; + function SetValue(Value : TExtObject) : TExtFunction; + function StartEdit(El : String; Value : String = '') : TExtFunction; overload; + destructor Destroy; override; + property Alignment : String read FAlignment write SetFAlignment; + property AllowBlur : Boolean read FAllowBlur write SetFAllowBlur; + property AutoSize : Boolean read FAutoSize write SetFAutoSize; + property AutoSizeObject : TExtObject read FAutoSizeObject write SetFAutoSizeObject; + property CancelOnEsc : Boolean read FCancelOnEsc write SetFCancelOnEsc; + property CompleteOnEnter : Boolean read FCompleteOnEnter write SetFCompleteOnEnter; + property Constrain : Boolean read FConstrain write SetFConstrain; + property Field : TExtFormField read FField write SetFField; + property HideEl : Boolean read FHideEl write SetFHideEl; + property IgnoreNoChange : Boolean read FIgnoreNoChange write SetFIgnoreNoChange; + property Offsets : TArrayOfInteger read FOffsets write SetFOffsets; + property ParentEl : String read FParentEl write SetFParentEl; + property ParentElElement : TExtElement read FParentElElement write SetFParentElElement; + property ParentElTHTMLElement : THTMLElement read FParentElTHTMLElement write SetFParentElTHTMLElement; + property RevertInvalid : Boolean read FRevertInvalid write SetFRevertInvalid; + property Shadow : Boolean read FShadow write SetFShadow; + property ShadowString : String read FShadowString write SetFShadowString; + property SwallowKeys : Boolean read FSwallowKeys write SetFSwallowKeys; + property UpdateEl : Boolean read FUpdateEl write SetFUpdateEl; + property Value : TExtObject read FValue write SetFValue; + property OnBeforecomplete : TExtEditorOnBeforecomplete read FOnBeforecomplete write SetFOnBeforecomplete; + property OnBeforestartedit : TExtEditorOnBeforestartedit read FOnBeforestartedit write SetFOnBeforestartedit; + property OnCanceledit : TExtEditorOnCanceledit read FOnCanceledit write SetFOnCanceledit; + property OnComplete : TExtEditorOnComplete read FOnComplete write SetFOnComplete; + property OnSpecialkey : TExtEditorOnSpecialkey read FOnSpecialkey write SetFOnSpecialkey; + property OnStartedit : TExtEditorOnStartedit read FOnStartedit write SetFOnStartedit; + end; + + TExtDataNodeStore = class(TExtDataStore) + private + FIsNodeStore : Boolean; + FNode : TExtDataModel; + FRecursive : Boolean; + FRootVisible : Boolean; + FTreeStore : TExtDataTreeStore; + procedure SetFIsNodeStore(Value : Boolean); + procedure SetFNode(Value : TExtDataModel); + procedure SetFRecursive(Value : Boolean); + procedure SetFRootVisible(Value : Boolean); + procedure SetFTreeStore(Value : TExtDataTreeStore); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; + destructor Destroy; override; + property IsNodeStore : Boolean read FIsNodeStore write SetFIsNodeStore; + property Node : TExtDataModel read FNode write SetFNode; + property Recursive : Boolean read FRecursive write SetFRecursive; + property RootVisible : Boolean read FRootVisible write SetFRootVisible; + property TreeStore : TExtDataTreeStore read FTreeStore write SetFTreeStore; + end; + + TExtLayoutComponentDraw = class(TExtLayoutComponentAuto) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + + TExtViewTableLayout = class(TExtLayoutComponentAuto) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + + TExtFormFieldTrigger = class(TExtFormFieldText) + private + FEditable : Boolean; + FGrow : Boolean; + FHideTrigger : Boolean; + FInputCell : TExtElement; + FReadOnly : Boolean; + FRepeatTriggerClick : Boolean; + FSelectOnFocus : Boolean; + FTriggerCls : String; + FTriggerEl : TExtCompositeElement; + FTriggerWrap : TExtElement; + procedure SetFEditable(Value : Boolean); + procedure SetFGrow(Value : Boolean); + procedure SetFHideTrigger(Value : Boolean); + procedure SetFInputCell(Value : TExtElement); + procedure SetFReadOnly(Value : Boolean); + procedure SetFRepeatTriggerClick(Value : Boolean); + procedure SetFSelectOnFocus(Value : Boolean); + procedure SetFTriggerCls(Value : String); + procedure SetFTriggerEl(Value : TExtCompositeElement); + procedure SetFTriggerWrap(Value : TExtElement); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; + destructor Destroy; override; + property Editable : Boolean read FEditable write SetFEditable; + property Grow : Boolean read FGrow write SetFGrow; + property HideTrigger : Boolean read FHideTrigger write SetFHideTrigger; + property InputCell : TExtElement read FInputCell write SetFInputCell; + property ReadOnly : Boolean read FReadOnly write SetFReadOnly; + property RepeatTriggerClick : Boolean read FRepeatTriggerClick write SetFRepeatTriggerClick; + property SelectOnFocus : Boolean read FSelectOnFocus write SetFSelectOnFocus; + property TriggerCls : String read FTriggerCls write SetFTriggerCls; + property TriggerEl : TExtCompositeElement read FTriggerEl write SetFTriggerEl; + property TriggerWrap : TExtElement read FTriggerWrap write SetFTriggerWrap; + end; + + TExtDataJsonStore = class(TExtDataStore) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + + TExtLayoutComponentField = class(TExtLayoutComponentAuto) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function DestroyTip : TExtFunction; + function ElementIdApplyIf : TExtFunction; + function GetErrorStrategy : TExtFunction; + function GetLabelStrategy : TExtFunction; + function InitTip : TExtFunction; + function QtipApplyIf : TExtFunction; + function SideApplyIf : TExtFunction; + function TitleApplyIf : TExtFunction; + function TopExtApplyIf : TExtFunction; + function UnderApplyIf : TExtFunction; + end; + + TExtViewTable = class(TExtView) + private + FBody : TExtDomAbstractElementFly; + FEnableTextSelection : Boolean; + FFirstCls : String; + FLastCls : String; + FMarkDirty : Boolean; + FStripeRows : Boolean; + procedure SetFBody(Value : TExtDomAbstractElementFly); + procedure SetFEnableTextSelection(Value : Boolean); + procedure SetFFirstCls(Value : String); + procedure SetFLastCls(Value : String); + procedure SetFMarkDirty(Value : Boolean); + procedure SetFStripeRows(Value : Boolean); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function AddRowCls(RowInfo : Integer; Cls : String) : TExtFunction; overload; + function AutoSizeColumn(Header : Integer) : TExtFunction; overload; + constructor Create; + function FocusRow(RowIdx : Integer) : TExtFunction; overload; + function GetBodySelector : TExtFunction; + function GetCellSelector(Header : TExtGridColumn = nil) : TExtFunction; + function GetColumnSizerSelector : TExtFunction; + function GetDataRowSelector : TExtFunction; + function GetFeature(Id : String) : TExtFunction; + function GetItemSelector : TExtFunction; + function GetNode(NodeInfo : Integer; DataRow : Boolean = false) : TExtFunction; overload; + function GetNodeContainerSelector : TExtFunction; + function Refresh : TExtFunction; + function RemoveRowCls(RowInfo : Integer; Cls : String) : TExtFunction; overload; + function WalkRecs(StartRec : TExtDataModel; Distance : Integer) : TExtFunction; + function WalkRows(StartRow : Integer; Distance : Integer) : TExtFunction; + destructor Destroy; override; + property Body : TExtDomAbstractElementFly read FBody write SetFBody; + property EnableTextSelection : Boolean read FEnableTextSelection write SetFEnableTextSelection; + property FirstCls : String read FFirstCls write SetFFirstCls; + property LastCls : String read FLastCls write SetFLastCls; + property MarkDirty : Boolean read FMarkDirty write SetFMarkDirty; + property StripeRows : Boolean read FStripeRows write SetFStripeRows; + end; + + TExtGridRowEditorButtons = class(TExtContainer) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function GetValue : TExtFunction; - function SetValue(Value : Integer; Animate : Boolean = false) : TExtFunction; end; - TExtFormFieldRadio = class(TExtFormFieldCheckbox) + TExtGridFeatureSummary = class(TExtGridFeatureAbstractSummary) private - FFocusCls : String; - procedure SetFFocusCls(Value : String); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function GetGroupValue : TExtFunction; - function GetSubmitValue : TExtFunction; - function SetValue(Value : Boolean) : TExtFunction; overload; - property FocusCls : String read FFocusCls write SetFFocusCls; - end; - - TExtGridPropertyStore = class(TExtDataStore) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create(Grid : TExtGridPanel; Source : TExtObject); - end; - - TExtGridRowEditorButtons = class(TExtContainer) + FDock : String; + procedure SetFDock(Value : String); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + property Dock : String read FDock write SetFDock; end; // Procedural types for events TExtGridHeaderContainer @@ -10829,6 +11402,7 @@ TExtGridHeaderContainer = class(TExtContainer) private FDefaultWidth : Integer; FEnableColumnHide : Boolean; + FIsGroupHeader : Boolean; FSealed : Boolean; FSortable : Boolean; FWeight : Integer; @@ -10844,6 +11418,7 @@ TExtGridHeaderContainer = class(TExtContainer) FOnSortchange : TExtGridHeaderContainerOnSortchange; procedure SetFDefaultWidth(Value : Integer); procedure SetFEnableColumnHide(Value : Boolean); + procedure SetFIsGroupHeader(Value : Boolean); procedure SetFSealed(Value : Boolean); procedure SetFSortable(Value : Boolean); procedure SetFWeight(Value : Integer); @@ -10873,6 +11448,7 @@ TExtGridHeaderContainer = class(TExtContainer) function GetVisibleHeaderClosestToIndex(Index : Integer) : TExtFunction; property DefaultWidth : Integer read FDefaultWidth write SetFDefaultWidth; property EnableColumnHide : Boolean read FEnableColumnHide write SetFEnableColumnHide; + property IsGroupHeader : Boolean read FIsGroupHeader write SetFIsGroupHeader; property Sealed : Boolean read FSealed write SetFSealed; property Sortable : Boolean read FSortable write SetFSortable; property Weight : Integer read FWeight write SetFWeight; @@ -10888,125 +11464,43 @@ TExtGridHeaderContainer = class(TExtContainer) property OnSortchange : TExtGridHeaderContainerOnSortchange read FOnSortchange write SetFOnSortchange; end; - // Procedural types for events TExtFormFieldSet - TExtFormFieldSetOnFielderrorchange = procedure(This : TExtFormFieldAncestor; The : TExtFormLabelable; Error : String) of object; - TExtFormFieldSetOnFieldvaliditychange = procedure(This : TExtFormFieldAncestor; The : TExtFormLabelable; IsValid : String) of object; - - TExtFormFieldSet = class(TExtContainer) - private - FBaseCls : String; - FCheckboxCmp : TExtFormFieldCheckbox; - FCheckboxName : String; - FCheckboxToggle : Boolean; - FCollapsed : Boolean; - FCollapsible : Boolean; - FFieldDefaults : TExtObject; - FLayout : TExtEnumsLayout; - FLayoutObject : TExtObject; - FTitle : String; - FToggleCmp : TExtPanelTool; - FToggleOnTitleClick : Boolean; - FOnFielderrorchange : TExtFormFieldSetOnFielderrorchange; - FOnFieldvaliditychange : TExtFormFieldSetOnFieldvaliditychange; - procedure SetFBaseCls(Value : String); - procedure SetFCheckboxCmp(Value : TExtFormFieldCheckbox); - procedure SetFCheckboxName(Value : String); - procedure SetFCheckboxToggle(Value : Boolean); - procedure SetFCollapsed(Value : Boolean); - procedure SetFCollapsible(Value : Boolean); - procedure SetFFieldDefaults(Value : TExtObject); - procedure SetFLayout(Value : TExtEnumsLayout); - procedure SetFLayoutObject(Value : TExtObject); - procedure SetFTitle(Value : String); - procedure SetFToggleCmp(Value : TExtPanelTool); - procedure SetFToggleOnTitleClick(Value : Boolean); - procedure SetFOnFielderrorchange(Value : TExtFormFieldSetOnFielderrorchange); - procedure SetFOnFieldvaliditychange(Value : TExtFormFieldSetOnFieldvaliditychange); - protected - procedure InitDefaults; override; - procedure HandleEvent(const AEvtName: string); override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Collapse : TExtFunction; - constructor Create; - function Expand : TExtFunction; - function SetTitle(Title : String) : TExtFunction; - function Toggle : TExtFunction; - destructor Destroy; override; - property BaseCls : String read FBaseCls write SetFBaseCls; - property CheckboxCmp : TExtFormFieldCheckbox read FCheckboxCmp write SetFCheckboxCmp; - property CheckboxName : String read FCheckboxName write SetFCheckboxName; - property CheckboxToggle : Boolean read FCheckboxToggle write SetFCheckboxToggle; - property Collapsed : Boolean read FCollapsed write SetFCollapsed; - property Collapsible : Boolean read FCollapsible write SetFCollapsible; - property FieldDefaults : TExtObject read FFieldDefaults write SetFFieldDefaults; - property Layout : TExtEnumsLayout read FLayout write SetFLayout; - property LayoutObject : TExtObject read FLayoutObject write SetFLayoutObject; - property Title : String read FTitle write SetFTitle; - property ToggleCmp : TExtPanelTool read FToggleCmp write SetFToggleCmp; - property ToggleOnTitleClick : Boolean read FToggleOnTitleClick write SetFToggleOnTitleClick; - property OnFielderrorchange : TExtFormFieldSetOnFielderrorchange read FOnFielderrorchange write SetFOnFielderrorchange; - property OnFieldvaliditychange : TExtFormFieldSetOnFieldvaliditychange read FOnFieldvaliditychange write SetFOnFieldvaliditychange; - end; - - TExtDataProxyLocalStorage = class(TExtDataProxyWebStorage) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - - TExtLayoutComponentBoundList = class(TExtLayoutComponentAuto) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - - TExtLayoutComponentButton = class(TExtLayoutComponentAuto) + TExtGridFeatureGroupingSummary = class(TExtGridFeatureGrouping) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtLayoutComponentDraw = class(TExtLayoutComponentAuto) + TExtGridColumnComponentLayout = class(TExtLayoutComponentAuto) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtDataNodeStore = class(TExtDataStore) + TExtViewBoundList = class(TExtView) private - FNode : TExtDataModel; - FRecursive : Boolean; - FRootVisible : Boolean; - FTreeStore : TExtDataTreeStore; - procedure SetFNode(Value : TExtDataModel); - procedure SetFRecursive(Value : Boolean); - procedure SetFRootVisible(Value : Boolean); - procedure SetFTreeStore(Value : TExtDataTreeStore); + FDisplayField : String; + FPageSize : Integer; + FPagingToolbar : TExtToolbarPaging; + FTpl : String; + FTplTemplate : TExtXTemplate; + procedure SetFDisplayField(Value : String); + procedure SetFPageSize(Value : Integer); + procedure SetFPagingToolbar(Value : TExtToolbarPaging); + procedure SetFTpl(Value : String); + procedure SetFTplTemplate(Value : TExtXTemplate); protected procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} constructor Create; + function GetInnerTpl(DisplayField : String) : TExtFunction; destructor Destroy; override; - property Node : TExtDataModel read FNode write SetFNode; - property Recursive : Boolean read FRecursive write SetFRecursive; - property RootVisible : Boolean read FRootVisible write SetFRootVisible; - property TreeStore : TExtDataTreeStore read FTreeStore write SetFTreeStore; - end; - - TExtDataJsonStore = class(TExtDataStore) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - - TExtLayoutComponentBody = class(TExtLayoutComponentAuto) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + property DisplayField : String read FDisplayField write SetFDisplayField; + property PageSize : Integer read FPageSize write SetFPageSize; + property PagingToolbar : TExtToolbarPaging read FPagingToolbar write SetFPagingToolbar; + property Tpl : String read FTpl write SetFTpl; + property TplTemplate : TExtXTemplate read FTplTemplate write SetFTplTemplate; end; TExtFxTargetCompositeElementCSS = class(TExtFxTargetCompositeElement) @@ -11015,57 +11509,20 @@ TExtFxTargetCompositeElementCSS = class(TExtFxTargetCompositeElement) {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtViewTable = class(TExtView) - private - FBody : TExtDomAbstractElementFly; - FEnableTextSelection : Boolean; - FFirstCls : String; - FLastCls : String; - FMarkDirty : Boolean; - FStripeRows : Boolean; - procedure SetFBody(Value : TExtDomAbstractElementFly); - procedure SetFEnableTextSelection(Value : Boolean); - procedure SetFFirstCls(Value : String); - procedure SetFLastCls(Value : String); - procedure SetFMarkDirty(Value : Boolean); - procedure SetFStripeRows(Value : Boolean); - protected - procedure InitDefaults; override; + TExtDataReaderArray = class(TExtDataReaderJson) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function AddRowCls(RowInfo : Integer; Cls : String) : TExtFunction; overload; - function AutoSizeColumn(Header : Integer) : TExtFunction; overload; - constructor Create; - function FocusRow(RowIdx : Integer) : TExtFunction; overload; - function GetBodySelector : TExtFunction; - function GetCellSelector(Header : TExtGridColumn = nil) : TExtFunction; - function GetColumnSizerSelector : TExtFunction; - function GetDataRowSelector : TExtFunction; - function GetFeature(Id : String) : TExtFunction; - function GetItemSelector : TExtFunction; - function GetNode(NodeInfo : Integer; DataRow : Boolean = false) : TExtFunction; overload; - function GetNodeContainerSelector : TExtFunction; - function Refresh : TExtFunction; - function RemoveRowCls(RowInfo : Integer; Cls : String) : TExtFunction; overload; - function WalkRecs(StartRec : TExtDataModel; Distance : Integer) : TExtFunction; - function WalkRows(StartRow : Integer; Distance : Integer) : TExtFunction; - destructor Destroy; override; - property Body : TExtDomAbstractElementFly read FBody write SetFBody; - property EnableTextSelection : Boolean read FEnableTextSelection write SetFEnableTextSelection; - property FirstCls : String read FFirstCls write SetFFirstCls; - property LastCls : String read FLastCls write SetFLastCls; - property MarkDirty : Boolean read FMarkDirty write SetFMarkDirty; - property StripeRows : Boolean read FStripeRows write SetFStripeRows; end; - TExtViewTableLayout = class(TExtLayoutComponentAuto) + TExtGridPropertyStore = class(TExtDataStore) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create(Grid : TExtGridPanel; Source : TExtObject); end; - TExtDataReaderArray = class(TExtDataReaderJson) + TExtDataProxyLocalStorage = class(TExtDataProxyWebStorage) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} @@ -11079,9 +11536,11 @@ TExtDataProxySessionStorage = class(TExtDataProxyWebStorage) TExtDataProxyRest = class(TExtDataProxyAjax) private + FActionMethods : TExtObject; FAppendId : Boolean; // true FBatchActions : Boolean; FFormat : String; + procedure SetFActionMethods(Value : TExtObject); procedure SetFAppendId(Value : Boolean); procedure SetFBatchActions(Value : Boolean); procedure SetFFormat(Value : String); @@ -11092,85 +11551,13 @@ TExtDataProxyRest = class(TExtDataProxyAjax) {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} function BuildUrl(Request : TExtObject) : TExtFunction; constructor Create; + destructor Destroy; override; + property ActionMethods : TExtObject read FActionMethods write SetFActionMethods; property AppendId : Boolean read FAppendId write SetFAppendId; property BatchActions : Boolean read FBatchActions write SetFBatchActions; property Format : String read FFormat write SetFFormat; end; - TExtViewBoundList = class(TExtView) - private - FDisplayField : String; - FPageSize : Integer; - FTpl : String; - FTplTemplate : TExtXTemplate; - procedure SetFDisplayField(Value : String); - procedure SetFPageSize(Value : Integer); - procedure SetFTpl(Value : String); - procedure SetFTplTemplate(Value : TExtXTemplate); - protected - procedure InitDefaults; override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - function GetInnerTpl(DisplayField : String) : TExtFunction; - destructor Destroy; override; - property DisplayField : String read FDisplayField write SetFDisplayField; - property PageSize : Integer read FPageSize write SetFPageSize; - property Tpl : String read FTpl write SetFTpl; - property TplTemplate : TExtXTemplate read FTplTemplate write SetFTplTemplate; - end; - - TExtGridFeatureGroupingSummary = class(TExtGridFeatureGrouping) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - - TExtGridFeatureSummary = class(TExtGridFeatureAbstractSummary) - private - FDock : String; - procedure SetFDock(Value : String); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - property Dock : String read FDock write SetFDock; - end; - - TExtFormFieldTrigger = class(TExtFormFieldText) - private - FEditable : Boolean; - FGrow : Boolean; - FHideTrigger : Boolean; - FReadOnly : Boolean; - FRepeatTriggerClick : Boolean; - FSelectOnFocus : Boolean; - FTriggerCls : String; - procedure SetFEditable(Value : Boolean); - procedure SetFGrow(Value : Boolean); - procedure SetFHideTrigger(Value : Boolean); - procedure SetFReadOnly(Value : Boolean); - procedure SetFRepeatTriggerClick(Value : Boolean); - procedure SetFSelectOnFocus(Value : Boolean); - procedure SetFTriggerCls(Value : String); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - property Editable : Boolean read FEditable write SetFEditable; - property Grow : Boolean read FGrow write SetFGrow; - property HideTrigger : Boolean read FHideTrigger write SetFHideTrigger; - property ReadOnly : Boolean read FReadOnly write SetFReadOnly; - property RepeatTriggerClick : Boolean read FRepeatTriggerClick write SetFRepeatTriggerClick; - property SelectOnFocus : Boolean read FSelectOnFocus write SetFSelectOnFocus; - property TriggerCls : String read FTriggerCls write SetFTriggerCls; - end; - - TExtGridColumnComponentLayout = class(TExtLayoutComponentAuto) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - // Procedural types for events TExtFormFieldTextArea TExtFormFieldTextAreaOnAutosize = procedure(This : TExtFormFieldTextArea; Height : Integer) of object; @@ -11209,128 +11596,10 @@ TExtFormFieldTextArea = class(TExtFormFieldText) property OnAutosize : TExtFormFieldTextAreaOnAutosize read FOnAutosize write SetFOnAutosize; end; - // Enumerated types for properties - TAlignRoundingMethodEnum = (alRound, alFloor, alCeil); - - TExtLayoutContainerVBox = class(TExtLayoutContainerBox) - private - FAlign : String; - FAlignRoundingMethod : TAlignRoundingMethodEnum; - FConstrainAlign : Boolean; - procedure SetFAlign(Value : String); - procedure SetFAlignRoundingMethod(Value : TAlignRoundingMethodEnum); - procedure SetFConstrainAlign(Value : Boolean); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - property Align : String read FAlign write SetFAlign; - property AlignRoundingMethod : TAlignRoundingMethodEnum read FAlignRoundingMethod write SetFAlignRoundingMethod; - property ConstrainAlign : Boolean read FConstrainAlign write SetFConstrainAlign; - end; - - TExtDataDirectStore = class(TExtDataStore) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - - TExtDataBufferStore = class(TExtDataStore) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - - TExtLayoutContainerCard = class(TExtLayoutContainerFit) - private - FDeferredRender : Boolean; - procedure SetFDeferredRender(Value : Boolean); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function GetActiveItem : TExtFunction; - function GetNext : TExtFunction; - function GetPrev : TExtFunction; - function Next : TExtFunction; - function Prev : TExtFunction; - function SetActiveItem(NewCard : Integer) : TExtFunction; overload; - property DeferredRender : Boolean read FDeferredRender write SetFDeferredRender; - end; - - TExtLayoutContainerColumn = class(TExtLayoutContainerAuto) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - - TExtLayoutContainerHBox = class(TExtLayoutContainerBox) - private - FAlign : String; - FAlignRoundingMethod : TAlignRoundingMethodEnum; - FConstrainAlign : Boolean; - procedure SetFAlign(Value : String); - procedure SetFAlignRoundingMethod(Value : TAlignRoundingMethodEnum); - procedure SetFConstrainAlign(Value : Boolean); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - property Align : String read FAlign write SetFAlign; - property AlignRoundingMethod : TAlignRoundingMethodEnum read FAlignRoundingMethod write SetFAlignRoundingMethod; - property ConstrainAlign : Boolean read FConstrainAlign write SetFConstrainAlign; - end; - - TExtDdDropZone = class(TExtDdDropTarget) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function GetTargetFromEvent(E : TEvent) : TExtFunction; - function OnNodeEnter(NodeData : TExtObject; Source : TExtDdDragSource; E : TEvent; Data : TExtObject) : TExtFunction; - end; - - TExtDataArrayStore = class(TExtDataStore) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - - TExtContainerViewport = class(TExtContainer) - private - FIsViewport : Boolean; - procedure SetFIsViewport(Value : Boolean); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - property IsViewport : Boolean read FIsViewport write SetFIsViewport; - end; - - TExtDdDragSource = class(TExtDdDDProxy) - private - FAnimRepair : Boolean; - FDdGroup : String; - FDropAllowed : String; - FDropNotAllowed : String; - FRepairHighlightColor : String; - procedure SetFAnimRepair(Value : Boolean); - procedure SetFDdGroup(Value : String); - procedure SetFDropAllowed(Value : String); - procedure SetFDropNotAllowed(Value : String); - procedure SetFRepairHighlightColor(Value : String); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create(El : String; Config : TExtObject = nil); overload; - function GetDragData : TExtFunction; - function GetProxy : TExtFunction; - function HideProxy : TExtFunction; - property AnimRepair : Boolean read FAnimRepair write SetFAnimRepair; - property DdGroup : String read FDdGroup write SetFDdGroup; - property DropAllowed : String read FDropAllowed write SetFDropAllowed; - property DropNotAllowed : String read FDropNotAllowed write SetFDropNotAllowed; - property RepairHighlightColor : String read FRepairHighlightColor write SetFRepairHighlightColor; - end; - TExtPanelAbstractPanel = class(TExtContainer) private FBaseCls : String; + FBody : TExtDomElement; FBodyBorder : Boolean; FBodyCls : String; FBodyClsList : TExtObjectList; @@ -11339,11 +11608,14 @@ TExtPanelAbstractPanel = class(TExtContainer) FBodyStyle : String; FBodyStyleFunction : TExtFunction; FBodyStyleObject : TExtObject; + FContentPaddingProperty : String; FDefaultDockWeights : TExtObject; FDockedItems : TExtObjectList; + FIsPanel : Boolean; FShrinkWrapDock : Boolean; FShrinkWrapDockInteger : Integer; procedure SetFBaseCls(Value : String); + procedure SetFBody(Value : TExtDomElement); procedure SetFBodyBorder(Value : Boolean); procedure SetFBodyCls(Value : String); procedure SetFBodyClsList(Value : TExtObjectList); @@ -11352,8 +11624,10 @@ TExtPanelAbstractPanel = class(TExtContainer) procedure SetFBodyStyle(Value : String); procedure SetFBodyStyleFunction(Value : TExtFunction); procedure SetFBodyStyleObject(Value : TExtObject); + procedure SetFContentPaddingProperty(Value : String); procedure SetFDefaultDockWeights(Value : TExtObject); procedure SetFDockedItems(Value : TExtObjectList); + procedure SetFIsPanel(Value : Boolean); procedure SetFShrinkWrapDock(Value : Boolean); procedure SetFShrinkWrapDockInteger(Value : Integer); protected @@ -11373,6 +11647,7 @@ TExtPanelAbstractPanel = class(TExtContainer) function SetBodyStyle(Style : String; Value : String) : TExtFunction; destructor Destroy; override; property BaseCls : String read FBaseCls write SetFBaseCls; + property Body : TExtDomElement read FBody write SetFBody; property BodyBorder : Boolean read FBodyBorder write SetFBodyBorder; property BodyCls : String read FBodyCls write SetFBodyCls; property BodyClsList : TExtObjectList read FBodyClsList write SetFBodyClsList; @@ -11381,168 +11656,104 @@ TExtPanelAbstractPanel = class(TExtContainer) property BodyStyle : String read FBodyStyle write SetFBodyStyle; property BodyStyleFunction : TExtFunction read FBodyStyleFunction write SetFBodyStyleFunction; property BodyStyleObject : TExtObject read FBodyStyleObject write SetFBodyStyleObject; + property ContentPaddingProperty : String read FContentPaddingProperty write SetFContentPaddingProperty; property DefaultDockWeights : TExtObject read FDefaultDockWeights write SetFDefaultDockWeights; property DockedItems : TExtObjectList read FDockedItems write SetFDockedItems; + property IsPanel : Boolean read FIsPanel write SetFIsPanel; property ShrinkWrapDock : Boolean read FShrinkWrapDock write SetFShrinkWrapDock; property ShrinkWrapDockInteger : Integer read FShrinkWrapDockInteger write SetFShrinkWrapDockInteger; end; - // Procedural types for events TExtPanelHeader - TExtPanelHeaderOnClick = procedure(This : TExtPanelHeader; E : TExtEventObject) of object; - TExtPanelHeaderOnDblclick = procedure(This : TExtPanelHeader; E : TExtEventObject) of object; - - TExtPanelHeader = class(TExtContainer) + TExtContainerViewport = class(TExtContainer) private - FGlyph : Integer; - FGlyphString : String; - FIcon : String; - FIconCls : String; - FTitle : String; - FTitleAlign : String; // 's natural * behavior depending on the css direction property - `' - FTitlePosition : Integer; - FOnClick : TExtPanelHeaderOnClick; - FOnDblclick : TExtPanelHeaderOnDblclick; - procedure SetFGlyph(Value : Integer); - procedure SetFGlyphString(Value : String); - procedure SetFIcon(Value : String); - procedure SetFIconCls(Value : String); - procedure SetFTitle(Value : String); - procedure SetFTitleAlign(Value : String); - procedure SetFTitlePosition(Value : Integer); - procedure SetFOnClick(Value : TExtPanelHeaderOnClick); - procedure SetFOnDblclick(Value : TExtPanelHeaderOnDblclick); - protected - procedure InitDefaults; override; - procedure HandleEvent(const AEvtName: string); override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function AddTool(Tool : TExtObject) : TExtFunction; - constructor Create; - function GetTools : TExtFunction; - function SetGlyph(Glyph : Integer) : TExtFunction; overload; - function SetIcon(Icon : String) : TExtFunction; - function SetIconCls(Cls : String) : TExtFunction; - function SetTitle(Title : String) : TExtFunction; - property Glyph : Integer read FGlyph write SetFGlyph; - property GlyphString : String read FGlyphString write SetFGlyphString; - property Icon : String read FIcon write SetFIcon; - property IconCls : String read FIconCls write SetFIconCls; - property Title : String read FTitle write SetFTitle; - property TitleAlign : String read FTitleAlign write SetFTitleAlign; - property TitlePosition : Integer read FTitlePosition write SetFTitlePosition; - property OnClick : TExtPanelHeaderOnClick read FOnClick write SetFOnClick; - property OnDblclick : TExtPanelHeaderOnDblclick read FOnDblclick write SetFOnDblclick; - end; - - TExtLayoutComponentProgressBar = class(TExtLayoutComponentAuto) + FIsViewport : Boolean; + procedure SetFIsViewport(Value : Boolean); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + property IsViewport : Boolean read FIsViewport write SetFIsViewport; end; - // Procedural types for events TExtEditor - TExtEditorOnBeforecomplete = procedure(This : TExtEditor; Value : TExtObject; StartValue : TExtObject) of object; - TExtEditorOnBeforestartedit = procedure(This : TExtEditor; BoundEl : TExtElement; Value : TExtObject) of object; - TExtEditorOnCanceledit = procedure(This : TExtEditor; Value : TExtObject; StartValue : TExtObject) of object; - TExtEditorOnComplete = procedure(This : TExtEditor; Value : TExtObject; StartValue : TExtObject) of object; - TExtEditorOnSpecialkey = procedure(This : TExtEditor; Field : TExtFormField; Event : TExtEventObject) of object; - TExtEditorOnStartedit = procedure(This : TExtEditor; BoundEl : TExtElement; Value : TExtObject) of object; + // Enumerated types for properties + TAlignRoundingMethodEnum = (alRound, alFloor, alCeil); - TExtEditor = class(TExtContainer) + TExtLayoutContainerVBox = class(TExtLayoutContainerBox) private - FAlignment : String; - FAllowBlur : Boolean; - FAutoSize : Boolean; - FAutoSizeObject : TExtObject; - FCancelOnEsc : Boolean; - FCompleteOnEnter : Boolean; - FConstrain : Boolean; - FField : TExtFormField; - FHideEl : Boolean; - FIgnoreNoChange : Boolean; - FOffsets : TArrayOfInteger; - FParentEl : String; - FParentElElement : TExtElement; - FParentElTHTMLElement : THTMLElement; - FRevertInvalid : Boolean; - FShadow : Boolean; - FShadowString : String; - FSwallowKeys : Boolean; - FUpdateEl : Boolean; - FValue : TExtObject; - FOnBeforecomplete : TExtEditorOnBeforecomplete; - FOnBeforestartedit : TExtEditorOnBeforestartedit; - FOnCanceledit : TExtEditorOnCanceledit; - FOnComplete : TExtEditorOnComplete; - FOnSpecialkey : TExtEditorOnSpecialkey; - FOnStartedit : TExtEditorOnStartedit; - procedure SetFAlignment(Value : String); - procedure SetFAllowBlur(Value : Boolean); - procedure SetFAutoSize(Value : Boolean); - procedure SetFAutoSizeObject(Value : TExtObject); - procedure SetFCancelOnEsc(Value : Boolean); - procedure SetFCompleteOnEnter(Value : Boolean); - procedure SetFConstrain(Value : Boolean); - procedure SetFField(Value : TExtFormField); - procedure SetFHideEl(Value : Boolean); - procedure SetFIgnoreNoChange(Value : Boolean); - procedure SetFOffsets(Value : TArrayOfInteger); - procedure SetFParentEl(Value : String); - procedure SetFParentElElement(Value : TExtElement); - procedure SetFParentElTHTMLElement(Value : THTMLElement); - procedure SetFRevertInvalid(Value : Boolean); - procedure SetFShadow(Value : Boolean); - procedure SetFShadowString(Value : String); - procedure SetFSwallowKeys(Value : Boolean); - procedure SetFUpdateEl(Value : Boolean); - procedure SetFValue(Value : TExtObject); - procedure SetFOnBeforecomplete(Value : TExtEditorOnBeforecomplete); - procedure SetFOnBeforestartedit(Value : TExtEditorOnBeforestartedit); - procedure SetFOnCanceledit(Value : TExtEditorOnCanceledit); - procedure SetFOnComplete(Value : TExtEditorOnComplete); - procedure SetFOnSpecialkey(Value : TExtEditorOnSpecialkey); - procedure SetFOnStartedit(Value : TExtEditorOnStartedit); + FAlign : String; + FAlignRoundingMethod : TAlignRoundingMethodEnum; + FConstrainAlign : Boolean; + procedure SetFAlign(Value : String); + procedure SetFAlignRoundingMethod(Value : TAlignRoundingMethodEnum); + procedure SetFConstrainAlign(Value : Boolean); + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + property Align : String read FAlign write SetFAlign; + property AlignRoundingMethod : TAlignRoundingMethodEnum read FAlignRoundingMethod write SetFAlignRoundingMethod; + property ConstrainAlign : Boolean read FConstrainAlign write SetFConstrainAlign; + end; + + TExtDataDirectStore = class(TExtDataStore) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + + // Procedural types for events TExtPanelHeader + TExtPanelHeaderOnClick = procedure(This : TExtPanelHeader; E : TExtEventObject) of object; + TExtPanelHeaderOnDblclick = procedure(This : TExtPanelHeader; E : TExtEventObject) of object; + + TExtPanelHeader = class(TExtContainer) + private + FGlyph : Integer; + FGlyphString : String; + FIcon : String; + FIconCls : String; + FIsHeader : Boolean; + FTitle : String; + FTitleAlign : String; // 's natural * behavior depending on the css direction property - `' + FTitlePosition : Integer; + FOnClick : TExtPanelHeaderOnClick; + FOnDblclick : TExtPanelHeaderOnDblclick; + procedure SetFGlyph(Value : Integer); + procedure SetFGlyphString(Value : String); + procedure SetFIcon(Value : String); + procedure SetFIconCls(Value : String); + procedure SetFIsHeader(Value : Boolean); + procedure SetFTitle(Value : String); + procedure SetFTitleAlign(Value : String); + procedure SetFTitlePosition(Value : Integer); + procedure SetFOnClick(Value : TExtPanelHeaderOnClick); + procedure SetFOnDblclick(Value : TExtPanelHeaderOnDblclick); protected procedure InitDefaults; override; procedure HandleEvent(const AEvtName: string); override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function CancelEdit(RemainVisible : Boolean = false) : TExtFunction; - function CompleteEdit(RemainVisible : Boolean = false) : TExtFunction; + function AddTool(Tool : TExtObject) : TExtFunction; constructor Create; - function GetValue : TExtFunction; - function Realign(AutoSize : Boolean = false) : TExtFunction; - function SetValue(Value : TExtObject) : TExtFunction; - function StartEdit(El : String; Value : String = '') : TExtFunction; overload; - destructor Destroy; override; - property Alignment : String read FAlignment write SetFAlignment; - property AllowBlur : Boolean read FAllowBlur write SetFAllowBlur; - property AutoSize : Boolean read FAutoSize write SetFAutoSize; - property AutoSizeObject : TExtObject read FAutoSizeObject write SetFAutoSizeObject; - property CancelOnEsc : Boolean read FCancelOnEsc write SetFCancelOnEsc; - property CompleteOnEnter : Boolean read FCompleteOnEnter write SetFCompleteOnEnter; - property Constrain : Boolean read FConstrain write SetFConstrain; - property Field : TExtFormField read FField write SetFField; - property HideEl : Boolean read FHideEl write SetFHideEl; - property IgnoreNoChange : Boolean read FIgnoreNoChange write SetFIgnoreNoChange; - property Offsets : TArrayOfInteger read FOffsets write SetFOffsets; - property ParentEl : String read FParentEl write SetFParentEl; - property ParentElElement : TExtElement read FParentElElement write SetFParentElElement; - property ParentElTHTMLElement : THTMLElement read FParentElTHTMLElement write SetFParentElTHTMLElement; - property RevertInvalid : Boolean read FRevertInvalid write SetFRevertInvalid; - property Shadow : Boolean read FShadow write SetFShadow; - property ShadowString : String read FShadowString write SetFShadowString; - property SwallowKeys : Boolean read FSwallowKeys write SetFSwallowKeys; - property UpdateEl : Boolean read FUpdateEl write SetFUpdateEl; - property Value : TExtObject read FValue write SetFValue; - property OnBeforecomplete : TExtEditorOnBeforecomplete read FOnBeforecomplete write SetFOnBeforecomplete; - property OnBeforestartedit : TExtEditorOnBeforestartedit read FOnBeforestartedit write SetFOnBeforestartedit; - property OnCanceledit : TExtEditorOnCanceledit read FOnCanceledit write SetFOnCanceledit; - property OnComplete : TExtEditorOnComplete read FOnComplete write SetFOnComplete; - property OnSpecialkey : TExtEditorOnSpecialkey read FOnSpecialkey write SetFOnSpecialkey; - property OnStartedit : TExtEditorOnStartedit read FOnStartedit write SetFOnStartedit; + function GetTools : TExtFunction; + function SetGlyph(Glyph : Integer) : TExtFunction; overload; + function SetIcon(Icon : String) : TExtFunction; + function SetIconCls(Cls : String) : TExtFunction; + function SetTitle(Title : String) : TExtFunction; + property Glyph : Integer read FGlyph write SetFGlyph; + property GlyphString : String read FGlyphString write SetFGlyphString; + property Icon : String read FIcon write SetFIcon; + property IconCls : String read FIconCls write SetFIconCls; + property IsHeader : Boolean read FIsHeader write SetFIsHeader; + property Title : String read FTitle write SetFTitle; + property TitleAlign : String read FTitleAlign write SetFTitleAlign; + property TitlePosition : Integer read FTitlePosition write SetFTitlePosition; + property OnClick : TExtPanelHeaderOnClick read FOnClick write SetFOnClick; + property OnDblclick : TExtPanelHeaderOnDblclick read FOnDblclick write SetFOnDblclick; + end; + + TExtDataArrayStore = class(TExtDataStore) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; // Procedural types for events TExtFormFieldContainer @@ -11582,9 +11793,11 @@ TExtFormFieldContainer = class(TExtContainer) FBeforeSubTpl : String; FBeforeSubTplList : TExtObjectList; FBeforeSubTplTemplate : TExtXTemplate; + FBodyEl : TExtElement; FClearCls : String; FCombineErrors : Boolean; FCombineLabels : Boolean; + FErrorEl : TExtElement; FErrorMsgCls : String; FFieldBodyCls : String; FFieldDefaults : TExtObject; @@ -11593,16 +11806,16 @@ TExtFormFieldContainer = class(TExtContainer) FHideEmptyLabel : Boolean; FHideLabel : Boolean; FInvalidCls : String; - FLabelableRenderTpl : String; - FLabelableRenderTplList : TExtObjectList; - FLabelableRenderTplTemplate : TExtXTemplate; + FIsFieldLabelable : Boolean; FLabelAlign : String; FLabelAttrTpl : String; FLabelAttrTplList : TExtObjectList; FLabelAttrTplTemplate : TExtXTemplate; + FLabelCell : TExtElement; FLabelCls : String; FLabelClsExtra : String; FLabelConnector : String; // ',' + FLabelEl : TExtElement; FLabelPad : Integer; FLabelSeparator : String; FLabelStyle : String; @@ -11642,9 +11855,11 @@ TExtFormFieldContainer = class(TExtContainer) procedure SetFBeforeSubTpl(Value : String); procedure SetFBeforeSubTplList(Value : TExtObjectList); procedure SetFBeforeSubTplTemplate(Value : TExtXTemplate); + procedure SetFBodyEl(Value : TExtElement); procedure SetFClearCls(Value : String); procedure SetFCombineErrors(Value : Boolean); procedure SetFCombineLabels(Value : Boolean); + procedure SetFErrorEl(Value : TExtElement); procedure SetFErrorMsgCls(Value : String); procedure SetFFieldBodyCls(Value : String); procedure SetFFieldDefaults(Value : TExtObject); @@ -11653,16 +11868,16 @@ TExtFormFieldContainer = class(TExtContainer) procedure SetFHideEmptyLabel(Value : Boolean); procedure SetFHideLabel(Value : Boolean); procedure SetFInvalidCls(Value : String); - procedure SetFLabelableRenderTpl(Value : String); - procedure SetFLabelableRenderTplList(Value : TExtObjectList); - procedure SetFLabelableRenderTplTemplate(Value : TExtXTemplate); + procedure SetFIsFieldLabelable(Value : Boolean); procedure SetFLabelAlign(Value : String); procedure SetFLabelAttrTpl(Value : String); procedure SetFLabelAttrTplList(Value : TExtObjectList); procedure SetFLabelAttrTplTemplate(Value : TExtXTemplate); + procedure SetFLabelCell(Value : TExtElement); procedure SetFLabelCls(Value : String); procedure SetFLabelClsExtra(Value : String); procedure SetFLabelConnector(Value : String); + procedure SetFLabelEl(Value : TExtElement); procedure SetFLabelPad(Value : Integer); procedure SetFLabelSeparator(Value : String); procedure SetFLabelStyle(Value : String); @@ -11686,6 +11901,7 @@ TExtFormFieldContainer = class(TExtContainer) function GetLabelWidth : TExtFunction; function HasActiveError : TExtFunction; function HasVisibleLabel : TExtFunction; + function InitLabelable : TExtFunction; function SetActiveError(Msg : String) : TExtFunction; function SetActiveErrors(Errors : TExtObjectList) : TExtFunction; function SetFieldDefaults(Defaults : TExtObject) : TExtFunction; @@ -11722,9 +11938,11 @@ TExtFormFieldContainer = class(TExtContainer) property BeforeSubTpl : String read FBeforeSubTpl write SetFBeforeSubTpl; property BeforeSubTplList : TExtObjectList read FBeforeSubTplList write SetFBeforeSubTplList; property BeforeSubTplTemplate : TExtXTemplate read FBeforeSubTplTemplate write SetFBeforeSubTplTemplate; + property BodyEl : TExtElement read FBodyEl write SetFBodyEl; property ClearCls : String read FClearCls write SetFClearCls; property CombineErrors : Boolean read FCombineErrors write SetFCombineErrors; property CombineLabels : Boolean read FCombineLabels write SetFCombineLabels; + property ErrorEl : TExtElement read FErrorEl write SetFErrorEl; property ErrorMsgCls : String read FErrorMsgCls write SetFErrorMsgCls; property FieldBodyCls : String read FFieldBodyCls write SetFFieldBodyCls; property FieldDefaults : TExtObject read FFieldDefaults write SetFFieldDefaults; @@ -11733,16 +11951,16 @@ TExtFormFieldContainer = class(TExtContainer) property HideEmptyLabel : Boolean read FHideEmptyLabel write SetFHideEmptyLabel; property HideLabel : Boolean read FHideLabel write SetFHideLabel; property InvalidCls : String read FInvalidCls write SetFInvalidCls; - property LabelableRenderTpl : String read FLabelableRenderTpl write SetFLabelableRenderTpl; - property LabelableRenderTplList : TExtObjectList read FLabelableRenderTplList write SetFLabelableRenderTplList; - property LabelableRenderTplTemplate : TExtXTemplate read FLabelableRenderTplTemplate write SetFLabelableRenderTplTemplate; + property IsFieldLabelable : Boolean read FIsFieldLabelable write SetFIsFieldLabelable; property LabelAlign : String read FLabelAlign write SetFLabelAlign; property LabelAttrTpl : String read FLabelAttrTpl write SetFLabelAttrTpl; property LabelAttrTplList : TExtObjectList read FLabelAttrTplList write SetFLabelAttrTplList; property LabelAttrTplTemplate : TExtXTemplate read FLabelAttrTplTemplate write SetFLabelAttrTplTemplate; + property LabelCell : TExtElement read FLabelCell write SetFLabelCell; property LabelCls : String read FLabelCls write SetFLabelCls; property LabelClsExtra : String read FLabelClsExtra write SetFLabelClsExtra; property LabelConnector : String read FLabelConnector write SetFLabelConnector; + property LabelEl : TExtElement read FLabelEl write SetFLabelEl; property LabelPad : Integer read FLabelPad write SetFLabelPad; property LabelSeparator : String read FLabelSeparator write SetFLabelSeparator; property LabelStyle : String read FLabelStyle write SetFLabelStyle; @@ -11754,125 +11972,543 @@ TExtFormFieldContainer = class(TExtContainer) property OnFieldvaliditychange : TExtFormFieldContainerOnFieldvaliditychange read FOnFieldvaliditychange write SetFOnFieldvaliditychange; end; + TExtDataXmlStore = class(TExtDataStore) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + + TExtDataBufferStore = class(TExtDataStore) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + + TExtLayoutContainerHBox = class(TExtLayoutContainerBox) + private + FAlign : String; + FAlignRoundingMethod : TAlignRoundingMethodEnum; + FConstrainAlign : Boolean; + procedure SetFAlign(Value : String); + procedure SetFAlignRoundingMethod(Value : TAlignRoundingMethodEnum); + procedure SetFConstrainAlign(Value : Boolean); + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + property Align : String read FAlign write SetFAlign; + property AlignRoundingMethod : TAlignRoundingMethodEnum read FAlignRoundingMethod write SetFAlignRoundingMethod; + property ConstrainAlign : Boolean read FConstrainAlign write SetFConstrainAlign; + end; + + TExtFormFieldRadio = class(TExtFormFieldCheckbox) + private + FFocusCls : String; + FIsRadio : Boolean; + procedure SetFFocusCls(Value : String); + procedure SetFIsRadio(Value : Boolean); + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function GetGroupValue : TExtFunction; + function GetSubmitValue : TExtFunction; + function SetValue(Value : Boolean) : TExtFunction; overload; + property FocusCls : String read FFocusCls write SetFFocusCls; + property IsRadio : Boolean read FIsRadio write SetFIsRadio; + end; + + TExtLayoutContainerAnchor = class(TExtLayoutContainerAuto) + private + FAnchor : String; + FAnchorSize : Integer; + FAnchorSizeObject : TExtObject; + FDefaultAnchor : String; + procedure SetFAnchor(Value : String); + procedure SetFAnchorSize(Value : Integer); + procedure SetFAnchorSizeObject(Value : TExtObject); + procedure SetFDefaultAnchor(Value : String); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; + destructor Destroy; override; + property Anchor : String read FAnchor write SetFAnchor; + property AnchorSize : Integer read FAnchorSize write SetFAnchorSize; + property AnchorSizeObject : TExtObject read FAnchorSizeObject write SetFAnchorSizeObject; + property DefaultAnchor : String read FDefaultAnchor write SetFDefaultAnchor; + end; + + // Procedural types for events TExtFormFieldSet + TExtFormFieldSetOnFielderrorchange = procedure(This : TExtFormFieldAncestor; The : TExtFormLabelable; Error : String) of object; + TExtFormFieldSetOnFieldvaliditychange = procedure(This : TExtFormFieldAncestor; The : TExtFormLabelable; IsValid : String) of object; + + TExtFormFieldSet = class(TExtContainer) + private + FBaseCls : String; + FCheckboxCmp : TExtFormFieldCheckbox; + FCheckboxName : String; + FCheckboxToggle : Boolean; + FCollapsed : Boolean; + FCollapsible : Boolean; + FFieldDefaults : TExtObject; + FLayout : TExtEnumsLayout; + FLayoutObject : TExtObject; + FLegend : TExtComponent; + FTitle : String; + FToggleCmp : TExtPanelTool; + FToggleOnTitleClick : Boolean; + FOnFielderrorchange : TExtFormFieldSetOnFielderrorchange; + FOnFieldvaliditychange : TExtFormFieldSetOnFieldvaliditychange; + procedure SetFBaseCls(Value : String); + procedure SetFCheckboxCmp(Value : TExtFormFieldCheckbox); + procedure SetFCheckboxName(Value : String); + procedure SetFCheckboxToggle(Value : Boolean); + procedure SetFCollapsed(Value : Boolean); + procedure SetFCollapsible(Value : Boolean); + procedure SetFFieldDefaults(Value : TExtObject); + procedure SetFLayout(Value : TExtEnumsLayout); + procedure SetFLayoutObject(Value : TExtObject); + procedure SetFLegend(Value : TExtComponent); + procedure SetFTitle(Value : String); + procedure SetFToggleCmp(Value : TExtPanelTool); + procedure SetFToggleOnTitleClick(Value : Boolean); + procedure SetFOnFielderrorchange(Value : TExtFormFieldSetOnFielderrorchange); + procedure SetFOnFieldvaliditychange(Value : TExtFormFieldSetOnFieldvaliditychange); + protected + procedure InitDefaults; override; + procedure HandleEvent(const AEvtName: string); override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function Collapse : TExtFunction; + constructor Create; + function Expand : TExtFunction; + function SetTitle(Title : String) : TExtFunction; + function Toggle : TExtFunction; + destructor Destroy; override; + property BaseCls : String read FBaseCls write SetFBaseCls; + property CheckboxCmp : TExtFormFieldCheckbox read FCheckboxCmp write SetFCheckboxCmp; + property CheckboxName : String read FCheckboxName write SetFCheckboxName; + property CheckboxToggle : Boolean read FCheckboxToggle write SetFCheckboxToggle; + property Collapsed : Boolean read FCollapsed write SetFCollapsed; + property Collapsible : Boolean read FCollapsible write SetFCollapsible; + property FieldDefaults : TExtObject read FFieldDefaults write SetFFieldDefaults; + property Layout : TExtEnumsLayout read FLayout write SetFLayout; + property LayoutObject : TExtObject read FLayoutObject write SetFLayoutObject; + property Legend : TExtComponent read FLegend write SetFLegend; + property Title : String read FTitle write SetFTitle; + property ToggleCmp : TExtPanelTool read FToggleCmp write SetFToggleCmp; + property ToggleOnTitleClick : Boolean read FToggleOnTitleClick write SetFToggleOnTitleClick; + property OnFielderrorchange : TExtFormFieldSetOnFielderrorchange read FOnFielderrorchange write SetFOnFielderrorchange; + property OnFieldvaliditychange : TExtFormFieldSetOnFieldvaliditychange read FOnFieldvaliditychange write SetFOnFieldvaliditychange; + end; + TExtDataJsonPStore = class(TExtDataStore) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtLayoutContainerAnchor = class(TExtLayoutContainerAuto) + TExtLayoutComponentProgressBar = class(TExtLayoutComponentAuto) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + + TExtLayoutContainerCard = class(TExtLayoutContainerFit) + private + FDeferredRender : Boolean; + procedure SetFDeferredRender(Value : Boolean); + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function GetActiveItem : TExtFunction; + function GetNext : TExtFunction; + function GetPrev : TExtFunction; + function Next : TExtFunction; + function Prev : TExtFunction; + function SetActiveItem(NewCard : Integer) : TExtFunction; overload; + property DeferredRender : Boolean read FDeferredRender write SetFDeferredRender; + end; + + TExtLayoutContainerColumn = class(TExtLayoutContainerAuto) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + + TExtDdDragSource = class(TExtDdDDProxy) + private + FAnimRepair : Boolean; + FDdGroup : String; + FDropAllowed : String; + FDropNotAllowed : String; + FRepairHighlightColor : String; + procedure SetFAnimRepair(Value : Boolean); + procedure SetFDdGroup(Value : String); + procedure SetFDropAllowed(Value : String); + procedure SetFDropNotAllowed(Value : String); + procedure SetFRepairHighlightColor(Value : String); + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create(El : String; Config : TExtObject = nil); overload; + function GetDragData : TExtFunction; + function GetProxy : TExtFunction; + function HideProxy : TExtFunction; + property AnimRepair : Boolean read FAnimRepair write SetFAnimRepair; + property DdGroup : String read FDdGroup write SetFDdGroup; + property DropAllowed : String read FDropAllowed write SetFDropAllowed; + property DropNotAllowed : String read FDropNotAllowed write SetFDropNotAllowed; + property RepairHighlightColor : String read FRepairHighlightColor write SetFRepairHighlightColor; + end; + + TExtViewDropZone = class(TExtDdDropZone) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + + TExtFormCheckboxGroup = class(TExtFormFieldContainer) + private + FAllowBlank : Boolean; + FBlankText : String; + FColumns : Integer; + FColumnsString : String; + FColumnsTArrayOfInteger : TArrayOfInteger; + FDisabled : Boolean; + FFieldBodyCls : String; + FIsFormField : Boolean; + FItems : TExtObjectList; + FItemsList : TExtObjectList; + FName : String; + FOriginalValue : TExtObject; + FSubmitValue : Boolean; + FValidateOnChange : Boolean; + FValue : TExtObject; + FVertical : Boolean; + procedure SetFAllowBlank(Value : Boolean); + procedure SetFBlankText(Value : String); + procedure SetFColumns(Value : Integer); + procedure SetFColumnsString(Value : String); + procedure SetFColumnsTArrayOfInteger(Value : TArrayOfInteger); + procedure SetFDisabled(Value : Boolean); + procedure SetFFieldBodyCls(Value : String); + procedure SetFIsFormField(Value : Boolean); + procedure SetFItems(Value : TExtObjectList); + procedure SetFItemsList(Value : TExtObjectList); + procedure SetFName(Value : String); + procedure SetFOriginalValue(Value : TExtObject); + procedure SetFSubmitValue(Value : Boolean); + procedure SetFValidateOnChange(Value : Boolean); + procedure SetFValue(Value : TExtObject); + procedure SetFVertical(Value : Boolean); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function BatchChanges(Fn : TExtObject) : TExtFunction; + function CheckChange : TExtFunction; + function CheckDirty : TExtFunction; + constructor Create; + function ExtractFileInput : TExtFunction; + function GetChecked : TExtFunction; + function GetErrors : TExtFunction; + function GetModelData : TExtFunction; + function GetName : TExtFunction; + function GetSubmitData : TExtFunction; + function GetValue : TExtFunction; + function IsDirty : TExtFunction; + function IsEqual(Value1 : TExtObject; Value2 : TExtObject) : TExtFunction; + function IsFileUpload : TExtFunction; + function IsValid : TExtFunction; + function Reset : TExtFunction; + function ResetOriginalValue : TExtFunction; + function SetValue(Value : TExtObject) : TExtFunction; + function Validate : TExtFunction; + destructor Destroy; override; + property AllowBlank : Boolean read FAllowBlank write SetFAllowBlank; + property BlankText : String read FBlankText write SetFBlankText; + property Columns : Integer read FColumns write SetFColumns; + property ColumnsString : String read FColumnsString write SetFColumnsString; + property ColumnsTArrayOfInteger : TArrayOfInteger read FColumnsTArrayOfInteger write SetFColumnsTArrayOfInteger; + property Disabled : Boolean read FDisabled write SetFDisabled; + property FieldBodyCls : String read FFieldBodyCls write SetFFieldBodyCls; + property IsFormField : Boolean read FIsFormField write SetFIsFormField; + property Items : TExtObjectList read FItems write SetFItems; + property ItemsList : TExtObjectList read FItemsList write SetFItemsList; + property Name : String read FName write SetFName; + property OriginalValue : TExtObject read FOriginalValue write SetFOriginalValue; + property SubmitValue : Boolean read FSubmitValue write SetFSubmitValue; + property ValidateOnChange : Boolean read FValidateOnChange write SetFValidateOnChange; + property Value : TExtObject read FValue write SetFValue; + property Vertical : Boolean read FVertical write SetFVertical; + end; + + TExtGridColumn = class(TExtGridHeaderContainer) + private + FAlign : String; + FColumns : TExtObjectList; + FDataIndex : String; + FDraggable : Boolean; + FEditor : TExtObject; + FEditorString : String; + FEditRenderer : TExtFunction; + FEmptyCellText : String; + FGroupable : Boolean; + FHideable : Boolean; + FIsHeader : Boolean; + FLockable : Boolean; + FLocked : Boolean; + FMenuDisabled : Boolean; + FMenuText : String; + FRenderer : TExtFunction; + FRendererString : String; + FResizable : Boolean; + FScope : TExtObject; + FSortable : Boolean; + FStateId : String; + FTdCls : String; + FText : String; + FTextEl : TExtElement; + FTooltip : String; + FTooltipType : String; + FTriggerEl : TExtElement; + procedure SetFAlign(Value : String); + procedure SetFColumns(Value : TExtObjectList); + procedure SetFDataIndex(Value : String); + procedure SetFDraggable(Value : Boolean); + procedure SetFEditor(Value : TExtObject); + procedure SetFEditorString(Value : String); + procedure SetFEditRenderer(Value : TExtFunction); + procedure SetFEmptyCellText(Value : String); + procedure SetFGroupable(Value : Boolean); + procedure SetFHideable(Value : Boolean); + procedure SetFIsHeader(Value : Boolean); + procedure SetFLockable(Value : Boolean); + procedure SetFLocked(Value : Boolean); + procedure SetFMenuDisabled(Value : Boolean); + procedure SetFMenuText(Value : String); + procedure SetFRenderer(Value : TExtFunction); + procedure SetFRendererString(Value : String); + procedure SetFResizable(Value : Boolean); + procedure SetFScope(Value : TExtObject); + procedure SetFSortable(Value : Boolean); + procedure SetFStateId(Value : String); + procedure SetFTdCls(Value : String); + procedure SetFText(Value : String); + procedure SetFTextEl(Value : TExtElement); + procedure SetFTooltip(Value : String); + procedure SetFTooltipType(Value : String); + procedure SetFTriggerEl(Value : TExtElement); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function AutoSize(The : Integer) : TExtFunction; overload; + constructor Create; + function GetIndex : TExtFunction; + function GetSortParam : TExtFunction; + function GetVisibleIndex : TExtFunction; + function IsHideable : TExtFunction; + function IsLockable : TExtFunction; + function SetText(Text : String) : TExtFunction; + destructor Destroy; override; + property Align : String read FAlign write SetFAlign; + property Columns : TExtObjectList read FColumns write SetFColumns; + property DataIndex : String read FDataIndex write SetFDataIndex; + property Draggable : Boolean read FDraggable write SetFDraggable; + property Editor : TExtObject read FEditor write SetFEditor; + property EditorString : String read FEditorString write SetFEditorString; + property EditRenderer : TExtFunction read FEditRenderer write SetFEditRenderer; + property EmptyCellText : String read FEmptyCellText write SetFEmptyCellText; + property Groupable : Boolean read FGroupable write SetFGroupable; + property Hideable : Boolean read FHideable write SetFHideable; + property IsHeader : Boolean read FIsHeader write SetFIsHeader; + property Lockable : Boolean read FLockable write SetFLockable; + property Locked : Boolean read FLocked write SetFLocked; + property MenuDisabled : Boolean read FMenuDisabled write SetFMenuDisabled; + property MenuText : String read FMenuText write SetFMenuText; + property Renderer : TExtFunction read FRenderer write SetFRenderer; + property RendererString : String read FRendererString write SetFRendererString; + property Resizable : Boolean read FResizable write SetFResizable; + property Scope : TExtObject read FScope write SetFScope; + property Sortable : Boolean read FSortable write SetFSortable; + property StateId : String read FStateId write SetFStateId; + property TdCls : String read FTdCls write SetFTdCls; + property Text : String read FText write SetFText; + property TextEl : TExtElement read FTextEl write SetFTextEl; + property Tooltip : String read FTooltip write SetFTooltip; + property TooltipType : String read FTooltipType write SetFTooltipType; + property TriggerEl : TExtElement read FTriggerEl write SetFTriggerEl; + end; + + // Procedural types for events TExtTreeView + TExtTreeViewOnAfteritemcollapse = procedure(Node : TExtDataNodeInterface; Index : Integer; Item : THTMLElement) of object; + TExtTreeViewOnAfteritemexpand = procedure(Node : TExtDataNodeInterface; Index : Integer; Item : THTMLElement) of object; + TExtTreeViewOnNodedragover = procedure(TargetNode : TExtDataNodeInterface; Position : String; DragData : TExtObject; E : TExtEventObject) of object; + + TExtTreeView = class(TExtViewTable) + private + FAnimate : Boolean; + FDeferInitialRefresh : Boolean; + FIsTreeView : Boolean; + FRootVisible : Boolean; + FOnAfteritemcollapse : TExtTreeViewOnAfteritemcollapse; + FOnAfteritemexpand : TExtTreeViewOnAfteritemexpand; + FOnNodedragover : TExtTreeViewOnNodedragover; + procedure SetFAnimate(Value : Boolean); + procedure SetFDeferInitialRefresh(Value : Boolean); + procedure SetFIsTreeView(Value : Boolean); + procedure SetFRootVisible(Value : Boolean); + procedure SetFOnAfteritemcollapse(Value : TExtTreeViewOnAfteritemcollapse); + procedure SetFOnAfteritemexpand(Value : TExtTreeViewOnAfteritemexpand); + procedure SetFOnNodedragover(Value : TExtTreeViewOnNodedragover); + protected + procedure HandleEvent(const AEvtName: string); override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function Collapse(RecordJS : TExtDataModel; Deep : Boolean = false; Callback : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; + function Expand(RecordJS : TExtDataModel; Deep : Boolean = false; Callback : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; + function GetTreeStore : TExtFunction; + function Toggle(RecordJS : TExtDataModel; Deep : Boolean = false; Callback : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; + property Animate : Boolean read FAnimate write SetFAnimate; + property DeferInitialRefresh : Boolean read FDeferInitialRefresh write SetFDeferInitialRefresh; + property IsTreeView : Boolean read FIsTreeView write SetFIsTreeView; + property RootVisible : Boolean read FRootVisible write SetFRootVisible; + property OnAfteritemcollapse : TExtTreeViewOnAfteritemcollapse read FOnAfteritemcollapse write SetFOnAfteritemcollapse; + property OnAfteritemexpand : TExtTreeViewOnAfteritemexpand read FOnAfteritemexpand write SetFOnAfteritemexpand; + property OnNodedragover : TExtTreeViewOnNodedragover read FOnNodedragover write SetFOnNodedragover; + end; + + // Procedural types for events TExtFormFieldPicker + TExtFormFieldPickerOnCollapse = procedure(Field : TExtFormFieldPicker) of object; + TExtFormFieldPickerOnExpand = procedure(Field : TExtFormFieldPicker) of object; + TExtFormFieldPickerOnSelect = procedure(Field : TExtFormFieldPicker; Value : TExtObject) of object; + + TExtFormFieldPicker = class(TExtFormFieldTrigger) + private + FEditable : Boolean; + FIsExpanded : Boolean; + FMatchFieldWidth : Boolean; // true + FOpenCls : String; + FPickerAlign : String; // 'tl-bl?' + FOnCollapse : TExtFormFieldPickerOnCollapse; + FOnExpand : TExtFormFieldPickerOnExpand; + FOnSelect : TExtFormFieldPickerOnSelect; + procedure SetFEditable(Value : Boolean); + procedure SetFIsExpanded(Value : Boolean); + procedure SetFMatchFieldWidth(Value : Boolean); + procedure SetFOpenCls(Value : String); + procedure SetFPickerAlign(Value : String); + procedure SetFOnCollapse(Value : TExtFormFieldPickerOnCollapse); + procedure SetFOnExpand(Value : TExtFormFieldPickerOnExpand); + procedure SetFOnSelect(Value : TExtFormFieldPickerOnSelect); + protected + procedure InitDefaults; override; + procedure HandleEvent(const AEvtName: string); override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function Collapse : TExtFunction; + constructor Create; + function Expand : TExtFunction; + function GetPicker : TExtFunction; + property Editable : Boolean read FEditable write SetFEditable; + property IsExpanded : Boolean read FIsExpanded write SetFIsExpanded; + property MatchFieldWidth : Boolean read FMatchFieldWidth write SetFMatchFieldWidth; + property OpenCls : String read FOpenCls write SetFOpenCls; + property PickerAlign : String read FPickerAlign write SetFPickerAlign; + property OnCollapse : TExtFormFieldPickerOnCollapse read FOnCollapse write SetFOnCollapse; + property OnExpand : TExtFormFieldPickerOnExpand read FOnExpand write SetFOnExpand; + property OnSelect : TExtFormFieldPickerOnSelect read FOnSelect write SetFOnSelect; + end; + + TExtFormFieldSpinner = class(TExtFormFieldTrigger) private - FAnchor : String; - FAnchorSize : Integer; - FAnchorSizeObject : TExtObject; - FDefaultAnchor : String; - procedure SetFAnchor(Value : String); - procedure SetFAnchorSize(Value : Integer); - procedure SetFAnchorSizeObject(Value : TExtObject); - procedure SetFDefaultAnchor(Value : String); + FKeyNavEnabled : Boolean; // true + FMouseWheelEnabled : Boolean; // true + FRepeatTriggerClick : Boolean; // true + FSpinDownEl : TExtElement; + FSpinDownEnabled : Boolean; // true + FSpinUpEl : TExtElement; + FSpinUpEnabled : Boolean; // true + procedure SetFKeyNavEnabled(Value : Boolean); + procedure SetFMouseWheelEnabled(Value : Boolean); + procedure SetFRepeatTriggerClick(Value : Boolean); + procedure SetFSpinDownEl(Value : TExtElement); + procedure SetFSpinDownEnabled(Value : Boolean); + procedure SetFSpinUpEl(Value : TExtElement); + procedure SetFSpinUpEnabled(Value : Boolean); protected procedure InitDefaults; override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} constructor Create; + function GetTriggerWidth : TExtFunction; + function SetSpinDownEnabled(Enabled : Boolean) : TExtFunction; + function SetSpinUpEnabled(Enabled : Boolean) : TExtFunction; + function SpinDown : TExtFunction; + function SpinUp : TExtFunction; destructor Destroy; override; - property Anchor : String read FAnchor write SetFAnchor; - property AnchorSize : Integer read FAnchorSize write SetFAnchorSize; - property AnchorSizeObject : TExtObject read FAnchorSizeObject write SetFAnchorSizeObject; - property DefaultAnchor : String read FDefaultAnchor write SetFDefaultAnchor; - end; - - TExtLayoutComponentField = class(TExtLayoutComponentAuto) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function DestroyTip : TExtFunction; - function ElementIdApplyIf : TExtFunction; - function GetErrorStrategy : TExtFunction; - function GetLabelStrategy : TExtFunction; - function InitTip : TExtFunction; - function QtipApplyIf : TExtFunction; - function SideApplyIf : TExtFunction; - function TitleApplyIf : TExtFunction; - function TopExtApplyIf : TExtFunction; - function UnderApplyIf : TExtFunction; + property KeyNavEnabled : Boolean read FKeyNavEnabled write SetFKeyNavEnabled; + property MouseWheelEnabled : Boolean read FMouseWheelEnabled write SetFMouseWheelEnabled; + property RepeatTriggerClick : Boolean read FRepeatTriggerClick write SetFRepeatTriggerClick; + property SpinDownEl : TExtElement read FSpinDownEl write SetFSpinDownEl; + property SpinDownEnabled : Boolean read FSpinDownEnabled write SetFSpinDownEnabled; + property SpinUpEl : TExtElement read FSpinUpEl write SetFSpinUpEl; + property SpinUpEnabled : Boolean read FSpinUpEnabled write SetFSpinUpEnabled; end; - TExtDataXmlStore = class(TExtDataStore) + TExtGridCellEditor = class(TExtEditor) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - // Procedural types for events TExtToolbarPaging - TExtToolbarPagingOnBeforechange = procedure(This : TExtToolbarPaging; Page : Integer) of object; - TExtToolbarPagingOnChange = procedure(This : TExtToolbarPaging; PageData : TExtObject) of object; - - TExtToolbarPaging = class(TExtToolbar) + TExtFormFieldFile = class(TExtFormFieldTrigger) private - FAfterPageText : String; - FBeforePageText : String; - FDisplayInfo : Boolean; - FDisplayMsg : String; - FEmptyMsg : String; - FFirstText : String; - FInputItemWidth : Integer; - FLastText : String; - FNextText : String; - FPrependButtons : Boolean; - FPrevText : String; - FRefreshText : String; - FStore : TExtDataStore; - FOnBeforechange : TExtToolbarPagingOnBeforechange; - FOnChange : TExtToolbarPagingOnChange; - procedure SetFAfterPageText(Value : String); - procedure SetFBeforePageText(Value : String); - procedure SetFDisplayInfo(Value : Boolean); - procedure SetFDisplayMsg(Value : String); - procedure SetFEmptyMsg(Value : String); - procedure SetFFirstText(Value : String); - procedure SetFInputItemWidth(Value : Integer); - procedure SetFLastText(Value : String); - procedure SetFNextText(Value : String); - procedure SetFPrependButtons(Value : Boolean); - procedure SetFPrevText(Value : String); - procedure SetFRefreshText(Value : String); - procedure SetFStore(Value : TExtDataStore); - procedure SetFOnBeforechange(Value : TExtToolbarPagingOnBeforechange); - procedure SetFOnChange(Value : TExtToolbarPagingOnChange); + FButton : TExtButton; + FButtonConfig : TExtObject; + FButtonMargin : Integer; + FButtonOnly : Boolean; + FButtonText : String; + FClearOnSubmit : Boolean; + FFieldBodyCls : String; + FFileInputEl : TExtElement; + FReadOnly : Boolean; + procedure SetFButton(Value : TExtButton); + procedure SetFButtonConfig(Value : TExtObject); + procedure SetFButtonMargin(Value : Integer); + procedure SetFButtonOnly(Value : Boolean); + procedure SetFButtonText(Value : String); + procedure SetFClearOnSubmit(Value : Boolean); + procedure SetFFieldBodyCls(Value : String); + procedure SetFFileInputEl(Value : TExtElement); + procedure SetFReadOnly(Value : Boolean); protected procedure InitDefaults; override; - procedure HandleEvent(const AEvtName: string); override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Bind(Store : TExtDataStore) : TExtFunction; - function BindStore(Store : String = '') : TExtFunction; overload; constructor Create; - function DoRefresh : TExtFunction; - function GetStore : TExtFunction; - function MoveFirst : TExtFunction; - function MoveLast : TExtFunction; - function MoveNext : TExtFunction; - function MovePrevious : TExtFunction; - function Unbind(Store : TExtDataStore) : TExtFunction; + function GetTriggerMarkup : TExtFunction; + function SetValueExtEmptyFnReset : TExtFunction; destructor Destroy; override; - property AfterPageText : String read FAfterPageText write SetFAfterPageText; - property BeforePageText : String read FBeforePageText write SetFBeforePageText; - property DisplayInfo : Boolean read FDisplayInfo write SetFDisplayInfo; - property DisplayMsg : String read FDisplayMsg write SetFDisplayMsg; - property EmptyMsg : String read FEmptyMsg write SetFEmptyMsg; - property FirstText : String read FFirstText write SetFFirstText; - property InputItemWidth : Integer read FInputItemWidth write SetFInputItemWidth; - property LastText : String read FLastText write SetFLastText; - property NextText : String read FNextText write SetFNextText; - property PrependButtons : Boolean read FPrependButtons write SetFPrependButtons; - property PrevText : String read FPrevText write SetFPrevText; - property RefreshText : String read FRefreshText write SetFRefreshText; - property Store : TExtDataStore read FStore write SetFStore; - property OnBeforechange : TExtToolbarPagingOnBeforechange read FOnBeforechange write SetFOnBeforechange; - property OnChange : TExtToolbarPagingOnChange read FOnChange write SetFOnChange; + property Button : TExtButton read FButton write SetFButton; + property ButtonConfig : TExtObject read FButtonConfig write SetFButtonConfig; + property ButtonMargin : Integer read FButtonMargin write SetFButtonMargin; + property ButtonOnly : Boolean read FButtonOnly write SetFButtonOnly; + property ButtonText : String read FButtonText write SetFButtonText; + property ClearOnSubmit : Boolean read FClearOnSubmit write SetFClearOnSubmit; + property FieldBodyCls : String read FFieldBodyCls write SetFFieldBodyCls; + property FileInputEl : TExtElement read FFileInputEl write SetFFileInputEl; + property ReadOnly : Boolean read FReadOnly write SetFReadOnly; end; // Procedural types for events TExtFormFieldHtmlEditor @@ -11916,6 +12552,7 @@ TExtFormFieldHtmlEditor = class(TExtFormFieldContainer) FIframeAttrTpl : String; FIframeAttrTplList : TExtObjectList; FIframeAttrTplTemplate : TExtXTemplate; + FIsFormField : Boolean; FName : String; FOriginalValue : TExtObject; FSubmitValue : Boolean; @@ -11958,6 +12595,7 @@ TExtFormFieldHtmlEditor = class(TExtFormFieldContainer) procedure SetFIframeAttrTpl(Value : String); procedure SetFIframeAttrTplList(Value : TExtObjectList); procedure SetFIframeAttrTplTemplate(Value : TExtXTemplate); + procedure SetFIsFormField(Value : Boolean); procedure SetFName(Value : String); procedure SetFOriginalValue(Value : TExtObject); procedure SetFSubmitValue(Value : Boolean); @@ -12027,6 +12665,7 @@ TExtFormFieldHtmlEditor = class(TExtFormFieldContainer) property IframeAttrTpl : String read FIframeAttrTpl write SetFIframeAttrTpl; property IframeAttrTplList : TExtObjectList read FIframeAttrTplList write SetFIframeAttrTplList; property IframeAttrTplTemplate : TExtXTemplate read FIframeAttrTplTemplate write SetFIframeAttrTplTemplate; + property IsFormField : Boolean read FIsFormField write SetFIsFormField; property Name : String read FName write SetFName; property OriginalValue : TExtObject read FOriginalValue write SetFOriginalValue; property SubmitValue : Boolean read FSubmitValue write SetFSubmitValue; @@ -12042,258 +12681,115 @@ TExtFormFieldHtmlEditor = class(TExtFormFieldContainer) property OnSync : TExtFormFieldHtmlEditorOnSync read FOnSync write SetFOnSync; end; - TExtFormFieldFile = class(TExtFormFieldTrigger) - private - FButtonConfig : TExtObject; - FButtonMargin : Integer; - FButtonOnly : Boolean; - FButtonText : String; - FClearOnSubmit : Boolean; - FFieldBodyCls : String; - FReadOnly : Boolean; - procedure SetFButtonConfig(Value : TExtObject); - procedure SetFButtonMargin(Value : Integer); - procedure SetFButtonOnly(Value : Boolean); - procedure SetFButtonText(Value : String); - procedure SetFClearOnSubmit(Value : Boolean); - procedure SetFFieldBodyCls(Value : String); - procedure SetFReadOnly(Value : Boolean); - protected - procedure InitDefaults; override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - function GetTriggerMarkup : TExtFunction; - function SetValueExtEmptyFnReset : TExtFunction; - destructor Destroy; override; - property ButtonConfig : TExtObject read FButtonConfig write SetFButtonConfig; - property ButtonMargin : Integer read FButtonMargin write SetFButtonMargin; - property ButtonOnly : Boolean read FButtonOnly write SetFButtonOnly; - property ButtonText : String read FButtonText write SetFButtonText; - property ClearOnSubmit : Boolean read FClearOnSubmit write SetFClearOnSubmit; - property FieldBodyCls : String read FFieldBodyCls write SetFFieldBodyCls; - property ReadOnly : Boolean read FReadOnly write SetFReadOnly; - end; + // Procedural types for events TExtToolbarPaging + TExtToolbarPagingOnBeforechange = procedure(This : TExtToolbarPaging; Page : Integer) of object; + TExtToolbarPagingOnChange = procedure(This : TExtToolbarPaging; PageData : TExtObject) of object; - TExtDdDragZone = class(TExtDdDragSource) + TExtToolbarPaging = class(TExtToolbar) private - FContainerScroll : TExtObject; - FContainerScrollBoolean : Boolean; - FScrollEl : String; - FScrollElElement : TExtDomElement; - FScrollElTHTMLElement : THTMLElement; - procedure SetFContainerScroll(Value : TExtObject); - procedure SetFContainerScrollBoolean(Value : Boolean); - procedure SetFScrollEl(Value : String); - procedure SetFScrollElElement(Value : TExtDomElement); - procedure SetFScrollElTHTMLElement(Value : THTMLElement); + FAfterPageText : String; + FBeforePageText : String; + FDisplayInfo : Boolean; + FDisplayMsg : String; + FEmptyMsg : String; + FFirstText : String; + FInputItemWidth : Integer; + FLastText : String; + FNextText : String; + FPrependButtons : Boolean; + FPrevText : String; + FRefreshText : String; + FStore : TExtDataStore; + FOnBeforechange : TExtToolbarPagingOnBeforechange; + FOnChange : TExtToolbarPagingOnChange; + procedure SetFAfterPageText(Value : String); + procedure SetFBeforePageText(Value : String); + procedure SetFDisplayInfo(Value : Boolean); + procedure SetFDisplayMsg(Value : String); + procedure SetFEmptyMsg(Value : String); + procedure SetFFirstText(Value : String); + procedure SetFInputItemWidth(Value : Integer); + procedure SetFLastText(Value : String); + procedure SetFNextText(Value : String); + procedure SetFPrependButtons(Value : Boolean); + procedure SetFPrevText(Value : String); + procedure SetFRefreshText(Value : String); + procedure SetFStore(Value : TExtDataStore); + procedure SetFOnBeforechange(Value : TExtToolbarPagingOnBeforechange); + procedure SetFOnChange(Value : TExtToolbarPagingOnChange); protected procedure InitDefaults; override; + procedure HandleEvent(const AEvtName: string); override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function Bind(Store : TExtDataStore) : TExtFunction; + function BindStore(Store : String = '') : TExtFunction; overload; constructor Create; - function GetDragData(E : TEvent) : TExtFunction; + function DoRefresh : TExtFunction; + function GetStore : TExtFunction; + function MoveFirst : TExtFunction; + function MoveLast : TExtFunction; + function MoveNext : TExtFunction; + function MovePrevious : TExtFunction; + function Unbind(Store : TExtDataStore) : TExtFunction; destructor Destroy; override; - property ContainerScroll : TExtObject read FContainerScroll write SetFContainerScroll; - property ContainerScrollBoolean : Boolean read FContainerScrollBoolean write SetFContainerScrollBoolean; - property ScrollEl : String read FScrollEl write SetFScrollEl; - property ScrollElElement : TExtDomElement read FScrollElElement write SetFScrollElElement; - property ScrollElTHTMLElement : THTMLElement read FScrollElTHTMLElement write SetFScrollElTHTMLElement; + property AfterPageText : String read FAfterPageText write SetFAfterPageText; + property BeforePageText : String read FBeforePageText write SetFBeforePageText; + property DisplayInfo : Boolean read FDisplayInfo write SetFDisplayInfo; + property DisplayMsg : String read FDisplayMsg write SetFDisplayMsg; + property EmptyMsg : String read FEmptyMsg write SetFEmptyMsg; + property FirstText : String read FFirstText write SetFFirstText; + property InputItemWidth : Integer read FInputItemWidth write SetFInputItemWidth; + property LastText : String read FLastText write SetFLastText; + property NextText : String read FNextText write SetFNextText; + property PrependButtons : Boolean read FPrependButtons write SetFPrependButtons; + property PrevText : String read FPrevText write SetFPrevText; + property RefreshText : String read FRefreshText write SetFRefreshText; + property Store : TExtDataStore read FStore write SetFStore; + property OnBeforechange : TExtToolbarPagingOnBeforechange read FOnBeforechange write SetFOnBeforechange; + property OnChange : TExtToolbarPagingOnChange read FOnChange write SetFOnChange; end; - TExtDrawSpriteDD = class(TExtDdDragSource) + TExtLayoutContainerAbsolute = class(TExtLayoutContainerAnchor) + private + FIgnoreOnContentChange : Boolean; + procedure SetFIgnoreOnContentChange(Value : Boolean); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + property IgnoreOnContentChange : Boolean read FIgnoreOnContentChange write SetFIgnoreOnContentChange; end; - // Procedural types for events TExtTreeView - TExtTreeViewOnAfteritemcollapse = procedure(Node : TExtDataNodeInterface; Index : Integer; Item : THTMLElement) of object; - TExtTreeViewOnAfteritemexpand = procedure(Node : TExtDataNodeInterface; Index : Integer; Item : THTMLElement) of object; - TExtTreeViewOnNodedragover = procedure(TargetNode : TExtDataNodeInterface; Position : String; DragData : TExtObject; E : TExtEventObject) of object; - - TExtTreeView = class(TExtViewTable) + TExtLayoutContainerAccordion = class(TExtLayoutContainerVBox) private + FActiveOnTop : Boolean; FAnimate : Boolean; - FDeferInitialRefresh : Boolean; - FRootVisible : Boolean; - FOnAfteritemcollapse : TExtTreeViewOnAfteritemcollapse; - FOnAfteritemexpand : TExtTreeViewOnAfteritemexpand; - FOnNodedragover : TExtTreeViewOnNodedragover; + FAutoWidth : Boolean; + FCollapseFirst : Boolean; + FFill : Boolean; + FHideCollapseTool : Boolean; + FMulti : Boolean; + FTitleCollapse : Boolean; + procedure SetFActiveOnTop(Value : Boolean); procedure SetFAnimate(Value : Boolean); - procedure SetFDeferInitialRefresh(Value : Boolean); - procedure SetFRootVisible(Value : Boolean); - procedure SetFOnAfteritemcollapse(Value : TExtTreeViewOnAfteritemcollapse); - procedure SetFOnAfteritemexpand(Value : TExtTreeViewOnAfteritemexpand); - procedure SetFOnNodedragover(Value : TExtTreeViewOnNodedragover); - protected - procedure HandleEvent(const AEvtName: string); override; + procedure SetFAutoWidth(Value : Boolean); + procedure SetFCollapseFirst(Value : Boolean); + procedure SetFFill(Value : Boolean); + procedure SetFHideCollapseTool(Value : Boolean); + procedure SetFMulti(Value : Boolean); + procedure SetFTitleCollapse(Value : Boolean); public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Collapse(RecordJS : TExtDataModel; Deep : Boolean = false; Callback : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; - function Expand(RecordJS : TExtDataModel; Deep : Boolean = false; Callback : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; - function GetTreeStore : TExtFunction; - function Toggle(RecordJS : TExtDataModel; Deep : Boolean = false; Callback : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; + property ActiveOnTop : Boolean read FActiveOnTop write SetFActiveOnTop; property Animate : Boolean read FAnimate write SetFAnimate; - property DeferInitialRefresh : Boolean read FDeferInitialRefresh write SetFDeferInitialRefresh; - property RootVisible : Boolean read FRootVisible write SetFRootVisible; - property OnAfteritemcollapse : TExtTreeViewOnAfteritemcollapse read FOnAfteritemcollapse write SetFOnAfteritemcollapse; - property OnAfteritemexpand : TExtTreeViewOnAfteritemexpand read FOnAfteritemexpand write SetFOnAfteritemexpand; - property OnNodedragover : TExtTreeViewOnNodedragover read FOnNodedragover write SetFOnNodedragover; - end; - - TExtFormFieldSpinner = class(TExtFormFieldTrigger) - private - FKeyNavEnabled : Boolean; // true - FMouseWheelEnabled : Boolean; // true - FRepeatTriggerClick : Boolean; // true - FSpinDownEl : TExtElement; - FSpinDownEnabled : Boolean; // true - FSpinUpEl : TExtElement; - FSpinUpEnabled : Boolean; // true - procedure SetFKeyNavEnabled(Value : Boolean); - procedure SetFMouseWheelEnabled(Value : Boolean); - procedure SetFRepeatTriggerClick(Value : Boolean); - procedure SetFSpinDownEl(Value : TExtElement); - procedure SetFSpinDownEnabled(Value : Boolean); - procedure SetFSpinUpEl(Value : TExtElement); - procedure SetFSpinUpEnabled(Value : Boolean); - protected - procedure InitDefaults; override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create; - function GetTriggerWidth : TExtFunction; - function SetSpinDownEnabled(Enabled : Boolean) : TExtFunction; - function SetSpinUpEnabled(Enabled : Boolean) : TExtFunction; - function SpinDown : TExtFunction; - function SpinUp : TExtFunction; - destructor Destroy; override; - property KeyNavEnabled : Boolean read FKeyNavEnabled write SetFKeyNavEnabled; - property MouseWheelEnabled : Boolean read FMouseWheelEnabled write SetFMouseWheelEnabled; - property RepeatTriggerClick : Boolean read FRepeatTriggerClick write SetFRepeatTriggerClick; - property SpinDownEl : TExtElement read FSpinDownEl write SetFSpinDownEl; - property SpinDownEnabled : Boolean read FSpinDownEnabled write SetFSpinDownEnabled; - property SpinUpEl : TExtElement read FSpinUpEl write SetFSpinUpEl; - property SpinUpEnabled : Boolean read FSpinUpEnabled write SetFSpinUpEnabled; - end; - - // Procedural types for events TExtFormFieldPicker - TExtFormFieldPickerOnCollapse = procedure(Field : TExtFormFieldPicker) of object; - TExtFormFieldPickerOnExpand = procedure(Field : TExtFormFieldPicker) of object; - TExtFormFieldPickerOnSelect = procedure(Field : TExtFormFieldPicker; Value : TExtObject) of object; - - TExtFormFieldPicker = class(TExtFormFieldTrigger) - private - FEditable : Boolean; - FMatchFieldWidth : Boolean; // true - FOpenCls : String; - FPickerAlign : String; // 'tl-bl?' - FOnCollapse : TExtFormFieldPickerOnCollapse; - FOnExpand : TExtFormFieldPickerOnExpand; - FOnSelect : TExtFormFieldPickerOnSelect; - procedure SetFEditable(Value : Boolean); - procedure SetFMatchFieldWidth(Value : Boolean); - procedure SetFOpenCls(Value : String); - procedure SetFPickerAlign(Value : String); - procedure SetFOnCollapse(Value : TExtFormFieldPickerOnCollapse); - procedure SetFOnExpand(Value : TExtFormFieldPickerOnExpand); - procedure SetFOnSelect(Value : TExtFormFieldPickerOnSelect); - protected - procedure InitDefaults; override; - procedure HandleEvent(const AEvtName: string); override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function Collapse : TExtFunction; - constructor Create; - function Expand : TExtFunction; - function GetPicker : TExtFunction; - property Editable : Boolean read FEditable write SetFEditable; - property MatchFieldWidth : Boolean read FMatchFieldWidth write SetFMatchFieldWidth; - property OpenCls : String read FOpenCls write SetFOpenCls; - property PickerAlign : String read FPickerAlign write SetFPickerAlign; - property OnCollapse : TExtFormFieldPickerOnCollapse read FOnCollapse write SetFOnCollapse; - property OnExpand : TExtFormFieldPickerOnExpand read FOnExpand write SetFOnExpand; - property OnSelect : TExtFormFieldPickerOnSelect read FOnSelect write SetFOnSelect; - end; - - TExtFormCheckboxGroup = class(TExtFormFieldContainer) - private - FAllowBlank : Boolean; - FBlankText : String; - FColumns : String; - FColumnsInteger : Integer; - FColumnsTArrayOfInteger : TArrayOfInteger; - FDisabled : Boolean; - FFieldBodyCls : String; - FItems : TExtObjectList; - FItemsList : TExtObjectList; - FName : String; - FOriginalValue : TExtObject; - FSubmitValue : Boolean; - FValidateOnChange : Boolean; - FValue : TExtObject; - FVertical : Boolean; - procedure SetFAllowBlank(Value : Boolean); - procedure SetFBlankText(Value : String); - procedure SetFColumns(Value : String); - procedure SetFColumnsInteger(Value : Integer); - procedure SetFColumnsTArrayOfInteger(Value : TArrayOfInteger); - procedure SetFDisabled(Value : Boolean); - procedure SetFFieldBodyCls(Value : String); - procedure SetFItems(Value : TExtObjectList); - procedure SetFItemsList(Value : TExtObjectList); - procedure SetFName(Value : String); - procedure SetFOriginalValue(Value : TExtObject); - procedure SetFSubmitValue(Value : Boolean); - procedure SetFValidateOnChange(Value : Boolean); - procedure SetFValue(Value : TExtObject); - procedure SetFVertical(Value : Boolean); - protected - procedure InitDefaults; override; - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function BatchChanges(Fn : TExtObject) : TExtFunction; - function CheckChange : TExtFunction; - function CheckDirty : TExtFunction; - constructor Create; - function ExtractFileInput : TExtFunction; - function GetChecked : TExtFunction; - function GetErrors : TExtFunction; - function GetModelData : TExtFunction; - function GetName : TExtFunction; - function GetSubmitData : TExtFunction; - function GetValue : TExtFunction; - function IsDirty : TExtFunction; - function IsEqual(Value1 : TExtObject; Value2 : TExtObject) : TExtFunction; - function IsFileUpload : TExtFunction; - function IsValid : TExtFunction; - function Reset : TExtFunction; - function ResetOriginalValue : TExtFunction; - function SetValue(Value : TExtObject) : TExtFunction; - function Validate : TExtFunction; - destructor Destroy; override; - property AllowBlank : Boolean read FAllowBlank write SetFAllowBlank; - property BlankText : String read FBlankText write SetFBlankText; - property Columns : String read FColumns write SetFColumns; - property ColumnsInteger : Integer read FColumnsInteger write SetFColumnsInteger; - property ColumnsTArrayOfInteger : TArrayOfInteger read FColumnsTArrayOfInteger write SetFColumnsTArrayOfInteger; - property Disabled : Boolean read FDisabled write SetFDisabled; - property FieldBodyCls : String read FFieldBodyCls write SetFFieldBodyCls; - property Items : TExtObjectList read FItems write SetFItems; - property ItemsList : TExtObjectList read FItemsList write SetFItemsList; - property Name : String read FName write SetFName; - property OriginalValue : TExtObject read FOriginalValue write SetFOriginalValue; - property SubmitValue : Boolean read FSubmitValue write SetFSubmitValue; - property ValidateOnChange : Boolean read FValidateOnChange write SetFValidateOnChange; - property Value : TExtObject read FValue write SetFValue; - property Vertical : Boolean read FVertical write SetFVertical; + property AutoWidth : Boolean read FAutoWidth write SetFAutoWidth; + property CollapseFirst : Boolean read FCollapseFirst write SetFCollapseFirst; + property Fill : Boolean read FFill write SetFFill; + property HideCollapseTool : Boolean read FHideCollapseTool write SetFHideCollapseTool; + property Multi : Boolean read FMulti write SetFMulti; + property TitleCollapse : Boolean read FTitleCollapse write SetFTitleCollapse; end; TExtLayoutComponentFieldText = class(TExtLayoutComponentField) @@ -12308,25 +12804,7 @@ TExtLayoutComponentFieldTrigger = class(TExtLayoutComponentField) {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtLayoutComponentFieldSlider = class(TExtLayoutComponentField) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - - TExtLayoutComponentFieldFieldContainer = class(TExtLayoutComponentField) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - - TExtLayoutComponentFieldSet = class(TExtLayoutComponentBody) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - - TExtPanelDD = class(TExtDdDragSource) + TExtDrawSpriteDD = class(TExtDdDragSource) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} @@ -12357,6 +12835,36 @@ TExtPickerTime = class(TExtViewBoundList) property MinValue : TDateTime read FMinValue write SetFMinValue; end; + TExtDdDragZone = class(TExtDdDragSource) + private + FContainerScroll : TExtObject; + FContainerScrollBoolean : Boolean; + FDragData : TExtObject; + FScrollEl : String; + FScrollElElement : TExtDomElement; + FScrollElTHTMLElement : THTMLElement; + procedure SetFContainerScroll(Value : TExtObject); + procedure SetFContainerScrollBoolean(Value : Boolean); + procedure SetFDragData(Value : TExtObject); + procedure SetFScrollEl(Value : String); + procedure SetFScrollElElement(Value : TExtDomElement); + procedure SetFScrollElTHTMLElement(Value : THTMLElement); + protected + procedure InitDefaults; override; + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create; + function GetDragData(E : TEvent) : TExtFunction; + destructor Destroy; override; + property ContainerScroll : TExtObject read FContainerScroll write SetFContainerScroll; + property ContainerScrollBoolean : Boolean read FContainerScrollBoolean write SetFContainerScrollBoolean; + property DragData : TExtObject read FDragData write SetFDragData; + property ScrollEl : String read FScrollEl write SetFScrollEl; + property ScrollElElement : TExtDomElement read FScrollElElement write SetFScrollElElement; + property ScrollElTHTMLElement : THTMLElement read FScrollElTHTMLElement write SetFScrollElTHTMLElement; + end; + TExtPanel = class(TExtPanelAbstractPanel) private FAnimCollapse : Boolean; @@ -12504,54 +13012,19 @@ TExtPanel = class(TExtPanelAbstractPanel) property ToolsList : TExtObjectList read FToolsList write SetFToolsList; end; - TExtLayoutContainerAbsolute = class(TExtLayoutContainerAnchor) - private - FIgnoreOnContentChange : Boolean; - procedure SetFIgnoreOnContentChange(Value : Boolean); - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - property IgnoreOnContentChange : Boolean read FIgnoreOnContentChange write SetFIgnoreOnContentChange; - end; - - TExtLayoutContainerAccordion = class(TExtLayoutContainerVBox) - private - FActiveOnTop : Boolean; - FAnimate : Boolean; - FAutoWidth : Boolean; - FCollapseFirst : Boolean; - FFill : Boolean; - FHideCollapseTool : Boolean; - FMulti : Boolean; - FTitleCollapse : Boolean; - procedure SetFActiveOnTop(Value : Boolean); - procedure SetFAnimate(Value : Boolean); - procedure SetFAutoWidth(Value : Boolean); - procedure SetFCollapseFirst(Value : Boolean); - procedure SetFFill(Value : Boolean); - procedure SetFHideCollapseTool(Value : Boolean); - procedure SetFMulti(Value : Boolean); - procedure SetFTitleCollapse(Value : Boolean); + TExtPanelDD = class(TExtDdDragSource) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - property ActiveOnTop : Boolean read FActiveOnTop write SetFActiveOnTop; - property Animate : Boolean read FAnimate write SetFAnimate; - property AutoWidth : Boolean read FAutoWidth write SetFAutoWidth; - property CollapseFirst : Boolean read FCollapseFirst write SetFCollapseFirst; - property Fill : Boolean read FFill write SetFFill; - property HideCollapseTool : Boolean read FHideCollapseTool write SetFHideCollapseTool; - property Multi : Boolean read FMulti write SetFMulti; - property TitleCollapse : Boolean read FTitleCollapse write SetFTitleCollapse; end; - TExtGridView = class(TExtViewTable) + TExtLayoutComponentFieldSlider = class(TExtLayoutComponentField) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtViewDropZone = class(TExtDdDropZone) + TExtGridLockingHeaderContainer = class(TExtGridHeaderContainer) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} @@ -12562,150 +13035,63 @@ TExtViewDropZone = class(TExtDdDropZone) TExtTabBar = class(TExtPanelHeader) private + FIsTabBar : Boolean; FPlain : Boolean; - FTitle : String; FOnChange : TExtTabBarOnChange; + procedure SetFIsTabBar(Value : Boolean); procedure SetFPlain(Value : Boolean); - procedure SetFTitle(Value : String); procedure SetFOnChange(Value : TExtTabBarOnChange); protected procedure HandleEvent(const AEvtName: string); override; public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + property IsTabBar : Boolean read FIsTabBar write SetFIsTabBar; property Plain : Boolean read FPlain write SetFPlain; - property Title : String read FTitle write SetFTitle; property OnChange : TExtTabBarOnChange read FOnChange write SetFOnChange; end; - TExtGridCellEditor = class(TExtEditor) + TExtGridColumnLayout = class(TExtLayoutContainerHBox) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtGridColumn = class(TExtGridHeaderContainer) - private - FAlign : String; - FColumns : TExtObjectList; - FDataIndex : String; - FDraggable : Boolean; - FEditor : TExtObject; - FEditorString : String; - FEditRenderer : TExtFunction; - FEmptyCellText : String; - FGroupable : Boolean; - FHideable : Boolean; - FIsHeader : Boolean; - FLockable : Boolean; - FLocked : Boolean; - FMenuDisabled : Boolean; - FMenuText : String; - FRenderer : TExtFunction; - FRendererString : String; - FResizable : Boolean; - FScope : TExtObject; - FSortable : Boolean; - FStateId : String; - FTdCls : String; - FText : String; - FTextEl : TExtElement; - FTooltip : String; - FTooltipType : String; - FTriggerEl : TExtElement; - procedure SetFAlign(Value : String); - procedure SetFColumns(Value : TExtObjectList); - procedure SetFDataIndex(Value : String); - procedure SetFDraggable(Value : Boolean); - procedure SetFEditor(Value : TExtObject); - procedure SetFEditorString(Value : String); - procedure SetFEditRenderer(Value : TExtFunction); - procedure SetFEmptyCellText(Value : String); - procedure SetFGroupable(Value : Boolean); - procedure SetFHideable(Value : Boolean); - procedure SetFIsHeader(Value : Boolean); - procedure SetFLockable(Value : Boolean); - procedure SetFLocked(Value : Boolean); - procedure SetFMenuDisabled(Value : Boolean); - procedure SetFMenuText(Value : String); - procedure SetFRenderer(Value : TExtFunction); - procedure SetFRendererString(Value : String); - procedure SetFResizable(Value : Boolean); - procedure SetFScope(Value : TExtObject); - procedure SetFSortable(Value : Boolean); - procedure SetFStateId(Value : String); - procedure SetFTdCls(Value : String); - procedure SetFText(Value : String); - procedure SetFTextEl(Value : TExtElement); - procedure SetFTooltip(Value : String); - procedure SetFTooltipType(Value : String); - procedure SetFTriggerEl(Value : TExtElement); - protected - procedure InitDefaults; override; + TExtGridHeaderDropZone = class(TExtDdDropZone) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - function AutoSize(The : Integer) : TExtFunction; overload; - constructor Create; - function GetIndex : TExtFunction; - function GetSortParam : TExtFunction; - function GetVisibleIndex : TExtFunction; - function IsHideable : TExtFunction; - function IsLockable : TExtFunction; - function SetText(Text : String) : TExtFunction; - destructor Destroy; override; - property Align : String read FAlign write SetFAlign; - property Columns : TExtObjectList read FColumns write SetFColumns; - property DataIndex : String read FDataIndex write SetFDataIndex; - property Draggable : Boolean read FDraggable write SetFDraggable; - property Editor : TExtObject read FEditor write SetFEditor; - property EditorString : String read FEditorString write SetFEditorString; - property EditRenderer : TExtFunction read FEditRenderer write SetFEditRenderer; - property EmptyCellText : String read FEmptyCellText write SetFEmptyCellText; - property Groupable : Boolean read FGroupable write SetFGroupable; - property Hideable : Boolean read FHideable write SetFHideable; - property IsHeader : Boolean read FIsHeader write SetFIsHeader; - property Lockable : Boolean read FLockable write SetFLockable; - property Locked : Boolean read FLocked write SetFLocked; - property MenuDisabled : Boolean read FMenuDisabled write SetFMenuDisabled; - property MenuText : String read FMenuText write SetFMenuText; - property Renderer : TExtFunction read FRenderer write SetFRenderer; - property RendererString : String read FRendererString write SetFRendererString; - property Resizable : Boolean read FResizable write SetFResizable; - property Scope : TExtObject read FScope write SetFScope; - property Sortable : Boolean read FSortable write SetFSortable; - property StateId : String read FStateId write SetFStateId; - property TdCls : String read FTdCls write SetFTdCls; - property Text : String read FText write SetFText; - property TextEl : TExtElement read FTextEl write SetFTextEl; - property Tooltip : String read FTooltip write SetFTooltip; - property TooltipType : String read FTooltipType write SetFTooltipType; - property TriggerEl : TExtElement read FTriggerEl write SetFTriggerEl; end; - TExtGridLockingHeaderContainer = class(TExtGridHeaderContainer) + TExtGridPropertyHeaderContainer = class(TExtGridHeaderContainer) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + constructor Create(Grid : TExtGridPropertyGrid; Source : TExtObject); end; - TExtGridHeaderDropZone = class(TExtDdDropZone) + TExtLayoutComponentFieldSet = class(TExtLayoutComponentBody) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtGridColumnLayout = class(TExtLayoutContainerHBox) + TExtLayoutComponentFieldFieldContainer = class(TExtLayoutComponentField) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; - TExtGridPropertyHeaderContainer = class(TExtGridHeaderContainer) + TExtGridView = class(TExtViewTable) + public + function JSClassName : string; override; + {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + end; + + TExtViewDragZone = class(TExtDdDragZone) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - constructor Create(Grid : TExtGridPropertyGrid; Source : TExtObject); end; TExtWindow = class(TExtPanel) @@ -12718,9 +13104,9 @@ TExtWindow = class(TExtPanel) FConstrain : Boolean; FConstrainHeader : Boolean; FDd : TExtUtilComponentDragger; - FDefaultFocus : String; + FDefaultFocus : Integer; FDefaultFocusComponent : TExtComponent; - FDefaultFocusInteger : Integer; + FDefaultFocusString : String; FDraggable : Boolean; FExpandOnShow : Boolean; FGhost : Boolean; @@ -12746,9 +13132,9 @@ TExtWindow = class(TExtPanel) procedure SetFConstrain(Value : Boolean); procedure SetFConstrainHeader(Value : Boolean); procedure SetFDd(Value : TExtUtilComponentDragger); - procedure SetFDefaultFocus(Value : String); + procedure SetFDefaultFocus(Value : Integer); procedure SetFDefaultFocusComponent(Value : TExtComponent); - procedure SetFDefaultFocusInteger(Value : Integer); + procedure SetFDefaultFocusString(Value : String); procedure SetFDraggable(Value : Boolean); procedure SetFExpandOnShow(Value : Boolean); procedure SetFGhost(Value : Boolean); @@ -12786,9 +13172,9 @@ TExtWindow = class(TExtPanel) property Constrain : Boolean read FConstrain write SetFConstrain; property ConstrainHeader : Boolean read FConstrainHeader write SetFConstrainHeader; property Dd : TExtUtilComponentDragger read FDd write SetFDd; - property DefaultFocus : String read FDefaultFocus write SetFDefaultFocus; + property DefaultFocus : Integer read FDefaultFocus write SetFDefaultFocus; property DefaultFocusComponent : TExtComponent read FDefaultFocusComponent write SetFDefaultFocusComponent; - property DefaultFocusInteger : Integer read FDefaultFocusInteger write SetFDefaultFocusInteger; + property DefaultFocusString : String read FDefaultFocusString write SetFDefaultFocusString; property Draggable : Boolean read FDraggable write SetFDraggable; property ExpandOnShow : Boolean read FExpandOnShow write SetFExpandOnShow; property Ghost : Boolean read FGhost write SetFGhost; @@ -12808,12 +13194,6 @@ TExtWindow = class(TExtPanel) property Y : Integer read FY write SetFY; end; - TExtViewDragZone = class(TExtDdDragZone) - public - function JSClassName : string; override; - {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} - end; - TExtGridColumnNumber = class(TExtGridColumn) private FFormat : String; @@ -13072,6 +13452,7 @@ TExtFormFieldComboBox = class(TExtFormFieldPicker) FForceSelection : Boolean; FGrowToLongestValue : Boolean; FHiddenName : String; + FLastQuery : String; FListConfig : TExtObject; FMultiSelect : Boolean; FPageSize : Integer; @@ -13105,6 +13486,7 @@ TExtFormFieldComboBox = class(TExtFormFieldPicker) procedure SetFForceSelection(Value : Boolean); procedure SetFGrowToLongestValue(Value : Boolean); procedure SetFHiddenName(Value : String); + procedure SetFLastQuery(Value : String); procedure SetFListConfig(Value : TExtObject); procedure SetFMultiSelect(Value : Boolean); procedure SetFPageSize(Value : Integer); @@ -13155,6 +13537,7 @@ TExtFormFieldComboBox = class(TExtFormFieldPicker) property ForceSelection : Boolean read FForceSelection write SetFForceSelection; property GrowToLongestValue : Boolean read FGrowToLongestValue write SetFGrowToLongestValue; property HiddenName : String read FHiddenName write SetFHiddenName; + property LastQuery : String read FLastQuery write SetFLastQuery; property ListConfig : TExtObject read FListConfig write SetFListConfig; property MultiSelect : Boolean read FMultiSelect write SetFMultiSelect; property PageSize : Integer read FPageSize write SetFPageSize; @@ -13192,6 +13575,7 @@ TExtGridColumnAction = class(TExtGridColumn) FIconCls : String; FIsDisabled : TExtFunction; FItems : TExtObjectList; + FItems_ : TExtObjectList; FMenuText : String; FScope : TExtObject; FStopSelection : Boolean; @@ -13205,6 +13589,7 @@ TExtGridColumnAction = class(TExtGridColumn) procedure SetFIconCls(Value : String); procedure SetFIsDisabled(Value : TExtFunction); procedure SetFItems(Value : TExtObjectList); + procedure SetFItems_(Value : TExtObjectList); procedure SetFMenuText(Value : String); procedure SetFScope(Value : TExtObject); procedure SetFStopSelection(Value : Boolean); @@ -13227,6 +13612,7 @@ TExtGridColumnAction = class(TExtGridColumn) property IconCls : String read FIconCls write SetFIconCls; property IsDisabled : TExtFunction read FIsDisabled write SetFIsDisabled; property Items : TExtObjectList read FItems write SetFItems; + property Items_ : TExtObjectList read FItems_ write SetFItems_; property MenuText : String read FMenuText write SetFMenuText; property Scope : TExtObject read FScope write SetFScope; property StopSelection : Boolean read FStopSelection write SetFStopSelection; @@ -13415,6 +13801,7 @@ TExtPanelTable = class(TExtPanel) FFeatures : TExtObjectList; FFeaturesList : TExtObjectList; FForceFit : Boolean; + FHasView : Boolean; FHideHeaders : Boolean; FOptimizedColumnMove : Boolean; FRowLines : Boolean; @@ -13429,7 +13816,6 @@ TExtPanelTable = class(TExtPanel) FVerticalScroller : TExtObject; FView : TExtViewTable; FViewConfig : TExtObject; - FViewType : String; FOnBeforecellclick : TExtPanelTableOnBeforecellclick; FOnBeforecellcontextmenu : TExtPanelTableOnBeforecellcontextmenu; FOnBeforecelldblclick : TExtPanelTableOnBeforecelldblclick; @@ -13499,6 +13885,7 @@ TExtPanelTable = class(TExtPanel) procedure SetFFeatures(Value : TExtObjectList); procedure SetFFeaturesList(Value : TExtObjectList); procedure SetFForceFit(Value : Boolean); + procedure SetFHasView(Value : Boolean); procedure SetFHideHeaders(Value : Boolean); procedure SetFOptimizedColumnMove(Value : Boolean); procedure SetFRowLines(Value : Boolean); @@ -13513,7 +13900,6 @@ TExtPanelTable = class(TExtPanel) procedure SetFVerticalScroller(Value : TExtObject); procedure SetFView(Value : TExtViewTable); procedure SetFViewConfig(Value : TExtObject); - procedure SetFViewType(Value : String); procedure SetFOnBeforecellclick(Value : TExtPanelTableOnBeforecellclick); procedure SetFOnBeforecellcontextmenu(Value : TExtPanelTableOnBeforecellcontextmenu); procedure SetFOnBeforecelldblclick(Value : TExtPanelTableOnBeforecelldblclick); @@ -13591,6 +13977,7 @@ TExtPanelTable = class(TExtPanel) property Features : TExtObjectList read FFeatures write SetFFeatures; property FeaturesList : TExtObjectList read FFeaturesList write SetFFeaturesList; property ForceFit : Boolean read FForceFit write SetFForceFit; + property HasView : Boolean read FHasView write SetFHasView; property HideHeaders : Boolean read FHideHeaders write SetFHideHeaders; property OptimizedColumnMove : Boolean read FOptimizedColumnMove write SetFOptimizedColumnMove; property RowLines : Boolean read FRowLines write SetFRowLines; @@ -13605,7 +13992,6 @@ TExtPanelTable = class(TExtPanel) property VerticalScroller : TExtObject read FVerticalScroller write SetFVerticalScroller; property View : TExtViewTable read FView write SetFView; property ViewConfig : TExtObject read FViewConfig write SetFViewConfig; - property ViewType : String read FViewType write SetFViewType; property OnBeforecellclick : TExtPanelTableOnBeforecellclick read FOnBeforecellclick write SetFOnBeforecellclick; property OnBeforecellcontextmenu : TExtPanelTableOnBeforecellcontextmenu read FOnBeforecellcontextmenu write SetFOnBeforecellcontextmenu; property OnBeforecelldblclick : TExtPanelTableOnBeforecelldblclick read FOnBeforecelldblclick write SetFOnBeforecelldblclick; @@ -13710,11 +14096,11 @@ TExtTip = class(TExtPanel) TExtTabPanel = class(TExtPanel) private - FActiveItem : String; - FActiveItemInteger : Integer; - FActiveTab : String; + FActiveItem : Integer; + FActiveItemString : String; + FActiveTab : Integer; FActiveTabComponent : TExtComponent; - FActiveTabInteger : Integer; + FActiveTabString : String; FDeferredRender : Boolean; FItemCls : String; FLayout : TExtEnumsLayout; @@ -13726,11 +14112,11 @@ TExtTabPanel = class(TExtPanel) FTabBar : TExtObject; FTabBar_ : TExtTabBar; FTabPosition : TTabPositionEnum; - procedure SetFActiveItem(Value : String); - procedure SetFActiveItemInteger(Value : Integer); - procedure SetFActiveTab(Value : String); + procedure SetFActiveItem(Value : Integer); + procedure SetFActiveItemString(Value : String); + procedure SetFActiveTab(Value : Integer); procedure SetFActiveTabComponent(Value : TExtComponent); - procedure SetFActiveTabInteger(Value : Integer); + procedure SetFActiveTabString(Value : String); procedure SetFDeferredRender(Value : Boolean); procedure SetFItemCls(Value : String); procedure SetFLayout(Value : TExtEnumsLayout); @@ -13752,11 +14138,11 @@ TExtTabPanel = class(TExtPanel) function GetTabBar : TExtFunction; function SetActiveTab(Card : Integer) : TExtFunction; overload; destructor Destroy; override; - property ActiveItem : String read FActiveItem write SetFActiveItem; - property ActiveItemInteger : Integer read FActiveItemInteger write SetFActiveItemInteger; - property ActiveTab : String read FActiveTab write SetFActiveTab; + property ActiveItem : Integer read FActiveItem write SetFActiveItem; + property ActiveItemString : String read FActiveItemString write SetFActiveItemString; + property ActiveTab : Integer read FActiveTab write SetFActiveTab; property ActiveTabComponent : TExtComponent read FActiveTabComponent write SetFActiveTabComponent; - property ActiveTabInteger : Integer read FActiveTabInteger write SetFActiveTabInteger; + property ActiveTabString : String read FActiveTabString write SetFActiveTabString; property DeferredRender : Boolean read FDeferredRender write SetFDeferredRender; property ItemCls : String read FItemCls write SetFItemCls; property Layout : TExtEnumsLayout read FLayout write SetFLayout; @@ -13802,9 +14188,9 @@ TExtMenu = class(TExtPanel) FFloating : Boolean; FHidden : Boolean; // true FIgnoreParentClicks : Boolean; - FLayout : TExtEnumsLayout; - FLayoutObject : TExtObject; + FIsMenu : Boolean; FMinWidth : Integer; + FParentMenu : TExtMenu; FPlain : Boolean; FShowSeparator : Boolean; FOnClick : TExtMenuOnClick; @@ -13816,9 +14202,9 @@ TExtMenu = class(TExtPanel) procedure SetFFloating(Value : Boolean); procedure SetFHidden(Value : Boolean); procedure SetFIgnoreParentClicks(Value : Boolean); - procedure SetFLayout(Value : TExtEnumsLayout); - procedure SetFLayoutObject(Value : TExtObject); + procedure SetFIsMenu(Value : Boolean); procedure SetFMinWidth(Value : Integer); + procedure SetFParentMenu(Value : TExtMenu); procedure SetFPlain(Value : Boolean); procedure SetFShowSeparator(Value : Boolean); procedure SetFOnClick(Value : TExtMenuOnClick); @@ -13840,9 +14226,9 @@ TExtMenu = class(TExtPanel) property Floating : Boolean read FFloating write SetFFloating; property Hidden : Boolean read FHidden write SetFHidden; property IgnoreParentClicks : Boolean read FIgnoreParentClicks write SetFIgnoreParentClicks; - property Layout : TExtEnumsLayout read FLayout write SetFLayout; - property LayoutObject : TExtObject read FLayoutObject write SetFLayoutObject; + property IsMenu : Boolean read FIsMenu write SetFIsMenu; property MinWidth : Integer read FMinWidth write SetFMinWidth; + property ParentMenu : TExtMenu read FParentMenu write SetFParentMenu; property Plain : Boolean read FPlain write SetFPlain; property ShowSeparator : Boolean read FShowSeparator write SetFShowSeparator; property OnClick : TExtMenuOnClick read FOnClick write SetFOnClick; @@ -13878,6 +14264,7 @@ TExtTipToolTip = class(TExtTip) FTargetElement : TExtElement; FTargetString : String; FTrackMouse : Boolean; + FTriggerElement : THTMLElement; procedure SetFAnchor(Value : String); procedure SetFAnchorOffset(Value : Integer); procedure SetFAnchorToTarget(Value : Boolean); @@ -13891,6 +14278,7 @@ TExtTipToolTip = class(TExtTip) procedure SetFTargetElement(Value : TExtElement); procedure SetFTargetString(Value : String); procedure SetFTrackMouse(Value : Boolean); + procedure SetFTriggerElement(Value : THTMLElement); protected procedure InitDefaults; override; public @@ -13914,6 +14302,7 @@ TExtTipToolTip = class(TExtTip) property TargetElement : TExtElement read FTargetElement write SetFTargetElement; property TargetString : String read FTargetString write SetFTargetString; property TrackMouse : Boolean read FTrackMouse write SetFTrackMouse; + property TriggerElement : THTMLElement read FTriggerElement write SetFTriggerElement; end; // Procedural types for events TExtTreePanel @@ -14119,7 +14508,7 @@ TExtWindowMessageBox = class(TExtWindow) function Progress(Title : String; Msg : String; ProgressText : String = '') : TExtFunction; function Prompt(Title : String; Msg : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Multiline : Boolean = false; Value : String = '') : TExtFunction; overload; function SetIcon(Icon : String; Width : Integer = 0; Height : Integer = 0) : TExtFunction; - function Show(Config : TExtObject; ConfigAnimateTarget : String; ConfigButtons : Integer = 0; ConfigClosable : Boolean = false; ConfigCls : String = ''; ConfigDefaultTextHeight : Integer = 0; ConfigFn : TExtFunction = nil; ConfigFnButtonId : String = ''; ConfigFnText : String = ''; ConfigFnOpt : TExtObject = nil; ConfigButtonText : TExtObject = nil; ConfigScope : TExtObject = nil; ConfigIcon : String = ''; ConfigIconCls : String = ''; ConfigDefaultFocus : String = ''; ConfigMaxWidth : Integer = 0; ConfigMinWidth : Integer = 0; ConfigModal : Boolean = false; ConfigMsg : String = ''; ConfigMultiline : Boolean = false; ConfigProgress : Boolean = false; ConfigProgressText : String = ''; ConfigPrompt : Boolean = false; ConfigProxyDrag : Boolean = false; ConfigTitle : String = ''; ConfigValue : String = ''; ConfigWait : Boolean = false; ConfigWaitConfig : TExtObject = nil; ConfigWidth : Integer = 0) : TExtFunction; overload; + function Show(Config : TExtShowConfig) : TExtFunction; function UpdateProgress(Value : Integer = 0; ProgressText : String = ''; Msg : String = '') : TExtFunction; function Wait(Msg : String; Title : String = ''; Config : TExtObject = nil) : TExtFunction; end; @@ -14297,22 +14686,34 @@ TExtGridPropertyGrid = class(TExtGridPanel) end; TExtMessageBoxSingleton = class(TExtWindowMessageBox) + private public function JSClassName : string; override; + class function CANCEL : Integer; + class function ERROR : String; + class function INFO : String; + class function NO : Integer; + class function OK : Integer; + class function OKCANCEL : Integer; + class function QUESTION : String; + class function WARNING : String; + class function YES : Integer; + class function YESNO : Integer; + class function YESNOCANCEL : Integer; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} end; var - ExtFormFieldVTypes : TExtFormFieldVTypesSingleton; - ExtFxManager : TExtFxManagerSingleton; ExtFxCubicBezier : TExtFxCubicBezierSingleton; ExtFxEasing : TExtFxEasingSingleton; + ExtFxManager : TExtFxManagerSingleton; ExtMenuManager : TExtMenuManagerSingleton; - ExtEventObjectImpl : TExtEventObjectImplSingleton; + ExtFormFieldVTypes : TExtFormFieldVTypesSingleton; ExtFocusManager : TExtFocusManagerSingleton; + ExtEventObjectImpl : TExtEventObjectImplSingleton; ExtDrawEngineImageExporter : TExtDrawEngineImageExporterSingleton; - ExtDraw : TExtDrawSingleton; ExtDrawEngineSvgExporter : TExtDrawEngineSvgExporterSingleton; + ExtDraw : TExtDrawSingleton; ExtShadowPool : TExtShadowPoolSingleton; ExtStateManager : TExtStateManagerSingleton; ExtUtilCookies : TExtUtilCookiesSingleton; @@ -14321,36 +14722,206 @@ TExtMessageBoxSingleton = class(TExtWindowMessageBox) ExtUtilInflector : TExtUtilInflectorSingleton; ExtUtilHistory : TExtUtilHistorySingleton; ExtPerfMonitor : TExtPerfMonitorSingleton; - ExtDataValidations : TExtDataValidationsSingleton; - ExtDataTypes : TExtDataTypesSingleton; ExtDataSortTypes : TExtDataSortTypesSingleton; - ExtChartShape : TExtChartShapeSingleton; + ExtDataJsonP : TExtDataJsonPSingleton; + ExtComponentQuery : TExtComponentQuerySingleton; ExtButtonManager : TExtButtonManagerSingleton; ExtAppEventBus : TExtAppEventBusSingleton; - ExtDdRegistry : TExtDdRegistrySingleton; + ExtChartShape : TExtChartShapeSingleton; + ExtDirectManager : TExtDirectManagerSingleton; ExtDdScrollManager : TExtDdScrollManagerSingleton; + ExtDataValidations : TExtDataValidationsSingleton; + ExtDataTypes : TExtDataTypesSingleton; + ExtDdRegistry : TExtDdRegistrySingleton; ExtDdDragDropManager : TExtDdDragDropManagerSingleton; - ExtDirectManager : TExtDirectManagerSingleton; - ExtComponentQuery : TExtComponentQuerySingleton; - ExtDataJsonP : TExtDataJsonPSingleton; ExtModelManager : TExtModelManagerSingleton; ExtUtilTaskManager : TExtUtilTaskManagerSingleton; - ExtComponentManager : TExtComponentManagerSingleton; - ExtAjax : TExtAjaxSingleton; - ExtDomHelper : TExtDomHelperSingleton; - ExtAppDomainStore : TExtAppDomainStoreSingleton; ExtPluginManager : TExtPluginManagerSingleton; - ExtAppDomainComponent : TExtAppDomainComponentSingleton; + ExtAppDomainDirect : TExtAppDomainDirectSingleton; ExtAppDomainController : TExtAppDomainControllerSingleton; + ExtAppDomainComponent : TExtAppDomainComponentSingleton; ExtAppDomainGlobal : TExtAppDomainGlobalSingleton; - ExtAppDomainDirect : TExtAppDomainDirectSingleton; + ExtDomHelper : TExtDomHelperSingleton; + ExtAjax : TExtAjaxSingleton; + ExtComponentManager : TExtComponentManagerSingleton; + ExtAppDomainStore : TExtAppDomainStoreSingleton; ExtFormRadioManager : TExtFormRadioManagerSingleton; - ExtFormCheckboxManager : TExtFormCheckboxManagerSingleton; ExtDataStoreManager : TExtDataStoreManagerSingleton; + ExtFormCheckboxManager : TExtFormCheckboxManagerSingleton; ExtMessageBox : TExtMessageBoxSingleton; implementation +procedure TExtProgressWaitConfig.SetFAnimate(Value : Boolean); begin + FAnimate := Value; + JSCode('animate:' + VarToJSON([Value])); +end; + +procedure TExtProgressWaitConfig.SetFDuration(Value : Integer); begin + FDuration := Value; + JSCode('duration:' + VarToJSON([Value])); +end; + +procedure TExtProgressWaitConfig.SetFFn(Value : TExtFunction); begin + FFn := Value; + JSCode('fn:' + VarToJSON([Value, true])); +end; + +procedure TExtProgressWaitConfig.SetFIncrement(Value : Integer); begin + FIncrement := Value; + JSCode('increment:' + VarToJSON([Value])); +end; + +procedure TExtProgressWaitConfig.SetFInterval(Value : Integer); begin + FInterval := Value; + JSCode('interval:' + VarToJSON([Value])); +end; + +procedure TExtProgressWaitConfig.SetFScope(Value : TExtObject); begin + FScope := Value; + Value.DeleteFromGarbage; + JSCode('scope:' + VarToJSON([Value, false])); +end; + +procedure TExtProgressWaitConfig.SetFText(Value : String); begin + FText := Value; + JSCode('text:' + VarToJSON([Value])); +end; + +function TExtProgressWaitConfig.JSClassName : string; begin + Result := 'Object'; +end; + +{$IFDEF FPC}constructor TExtProgressWaitConfig.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +procedure TExtShowConfig.SetFAnimTarget(Value : String); begin + FAnimTarget := Value; + JSCode('animTarget:' + VarToJSON([Value])); +end; + +procedure TExtShowConfig.SetFButtons(Value : Integer); begin + FButtons := Value; + JSCode('buttons:' + VarToJSON([Value])); +end; + +procedure TExtShowConfig.SetFClosable(Value : Boolean); begin + FClosable := Value; + JSCode('closable:' + VarToJSON([Value])); +end; + +procedure TExtShowConfig.SetFCls(Value : String); begin + FCls := Value; + JSCode('cls:' + VarToJSON([Value])); +end; + +procedure TExtShowConfig.SetFDefaultFocus(Value : String); begin + FDefaultFocus := Value; + JSCode('defaultFocus:' + VarToJSON([Value])); +end; + +procedure TExtShowConfig.SetFDefaultTextHeight(Value : Integer); begin + FDefaultTextHeight := Value; + JSCode('defaultTextHeight:' + VarToJSON([Value])); +end; + +procedure TExtShowConfig.SetFFn(Value : TExtFunction); begin + FFn := Value; + JSCode('fn:' + VarToJSON([Value, true])); +end; + +procedure TExtShowConfig.SetFIcon(Value : String); begin + FIcon := Value; + JSCode('icon:' + VarToJSON([Value])); +end; + +procedure TExtShowConfig.SetFIconCls(Value : String); begin + FIconCls := Value; + JSCode('iconCls:' + VarToJSON([Value])); +end; + +procedure TExtShowConfig.SetFMaxWidth(Value : Integer); begin + FMaxWidth := Value; + JSCode('maxWidth:' + VarToJSON([Value])); +end; + +procedure TExtShowConfig.SetFMinWidth(Value : Integer); begin + FMinWidth := Value; + JSCode('minWidth:' + VarToJSON([Value])); +end; + +procedure TExtShowConfig.SetFModal(Value : Boolean); begin + FModal := Value; + JSCode('modal:' + VarToJSON([Value])); +end; + +procedure TExtShowConfig.SetFMsg(Value : String); begin + FMsg := Value; + JSCode('msg:' + VarToJSON([Value])); +end; + +procedure TExtShowConfig.SetFMultiline(Value : Boolean); begin + FMultiline := Value; + JSCode('multiline:' + VarToJSON([Value])); +end; + +procedure TExtShowConfig.SetFProgress(Value : Boolean); begin + FProgress := Value; + JSCode('progress:' + VarToJSON([Value])); +end; + +procedure TExtShowConfig.SetFProgressText(Value : String); begin + FProgressText := Value; + JSCode('progressText:' + VarToJSON([Value])); +end; + +procedure TExtShowConfig.SetFPrompt(Value : Boolean); begin + FPrompt := Value; + JSCode('prompt:' + VarToJSON([Value])); +end; + +procedure TExtShowConfig.SetFProxyDrag(Value : Boolean); begin + FProxyDrag := Value; + JSCode('proxyDrag:' + VarToJSON([Value])); +end; + +procedure TExtShowConfig.SetFScope(Value : TExtObject); begin + FScope := Value; + Value.DeleteFromGarbage; + JSCode('scope:' + VarToJSON([Value, false])); +end; + +procedure TExtShowConfig.SetFTitle(Value : String); begin + FTitle := Value; + JSCode('title:' + VarToJSON([Value])); +end; + +procedure TExtShowConfig.SetFValue(Value : String); begin + FValue := Value; + JSCode('value:' + VarToJSON([Value])); +end; + +procedure TExtShowConfig.SetFWait(Value : Boolean); begin + FWait := Value; + JSCode('wait:' + VarToJSON([Value])); +end; + +procedure TExtShowConfig.SetFWaitConfig(Value : TExtProgressWaitConfig); begin + FWaitConfig := Value; + Value.DeleteFromGarbage; + JSCode('waitConfig:' + VarToJSON([Value, false])); +end; + +procedure TExtShowConfig.SetFWidth(Value : Integer); begin + FWidth := Value; + JSCode('width:' + VarToJSON([Value])); +end; + +function TExtShowConfig.JSClassName : string; begin + Result := 'Object'; +end; + +{$IFDEF FPC}constructor TExtShowConfig.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + procedure TExtAbstractComponent.SetFAutoEl(Value : String); begin FAutoEl := Value; JSCode('autoEl:' + VarToJSON([Value])); @@ -14473,6 +15044,11 @@ procedure TExtAbstractComponent.SetFDraggable(Value : Boolean); begin JSCode('draggable:' + VarToJSON([Value])); end; +procedure TExtAbstractComponent.SetFDraggable_(Value : Boolean); begin + FDraggable_ := Value; + JSCode(JSName + '.draggable=' + VarToJSON([Value]) + ';'); +end; + procedure TExtAbstractComponent.SetFFloating(Value : Boolean); begin FFloating := Value; JSCode('floating:' + VarToJSON([Value])); @@ -14483,6 +15059,12 @@ procedure TExtAbstractComponent.SetFFrame(Value : Boolean); begin JSCode('frame:' + VarToJSON([Value])); end; +procedure TExtAbstractComponent.SetFFrameSize(Value : TExtObject); begin + FFrameSize := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.frameSize=' + VarToJSON([Value, false]) + ';'); +end; + procedure TExtAbstractComponent.SetFHasListeners(Value : TExtObject); begin FHasListeners := Value; Value.DeleteFromGarbage; @@ -14523,6 +15105,11 @@ procedure TExtAbstractComponent.SetFId(Value : String); begin JSCode('id:' + VarToJSON([Value])); end; +procedure TExtAbstractComponent.SetFIsComponent(Value : Boolean); begin + FIsComponent := Value; + JSCode(JSName + '.isComponent=' + VarToJSON([Value]) + ';'); +end; + procedure TExtAbstractComponent.SetFIsObservable(Value : Boolean); begin FIsObservable := Value; JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); @@ -14594,6 +15181,12 @@ procedure TExtAbstractComponent.SetFOverCls(Value : String); begin JSCode('overCls:' + VarToJSON([Value])); end; +procedure TExtAbstractComponent.SetFOwnerCt(Value : TExtContainer); begin + FOwnerCt := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.ownerCt=' + VarToJSON([Value, false]) + ';'); +end; + procedure TExtAbstractComponent.SetFPadding(Value : Integer); begin FPadding := Value; JSCode('padding:' + VarToJSON([Value])); @@ -14634,6 +15227,11 @@ procedure TExtAbstractComponent.SetFRenderData(Value : TExtObject); begin JSCode('renderData:' + VarToJSON([Value, false])); end; +procedure TExtAbstractComponent.SetFRendered(Value : Boolean); begin + FRendered := Value; + JSCode(JSName + '.rendered=' + VarToJSON([Value]) + ';'); +end; + procedure TExtAbstractComponent.SetFRenderSelectors(Value : TExtObject); begin FRenderSelectors := Value; Value.DeleteFromGarbage; @@ -14968,11 +15566,13 @@ procedure TExtAbstractComponent.InitDefaults; begin FChildEls := TExtObjectList.Create(Self, 'childEls'); FComponentLayoutObject := TExtObject.CreateInternal(Self, 'componentLayout'); FData := TExtObject.CreateInternal(Self, 'data'); + FFrameSize := TExtObject.CreateInternal(Self, 'frameSize'); FHasListeners := TExtObject.CreateInternal(Self, 'hasListeners'); FHtmlObject := TExtObject.CreateInternal(Self, 'html'); FListeners := TExtObject.CreateInternal(Self, 'listeners'); FLoader := TExtComponentLoader.CreateInternal(Self, 'loader'); FLoaderObject := TExtObject.CreateInternal(Self, 'loader'); + FOwnerCt := TExtContainer.CreateInternal(Self, 'ownerCt'); FPlugins := TExtObjectList.Create(Self, 'plugins'); FPluginsList := TExtObjectList.Create(Self, 'plugins'); FPluginsObject := TExtObject.CreateInternal(Self, 'plugins'); @@ -15547,11 +16147,13 @@ destructor TExtAbstractComponent.Destroy; begin FChildEls.Free; FComponentLayoutObject.Free; FData.Free; + FFrameSize.Free; FHasListeners.Free; FHtmlObject.Free; FListeners.Free; FLoader.Free; FLoaderObject.Free; + FOwnerCt.Free; FPlugins.Free; FPluginsList.Free; FPluginsObject.Free; @@ -15625,42 +16227,6 @@ procedure TExtAbstractComponent.HandleEvent(const AEvtName : string); begin FOnStatesave(TExtStateStateful(ParamAsObject('This')), TExtObject(ParamAsObject('State'))); end; -function TExtViewNodeCache.JSClassName : string; begin - Result := 'Ext.view.NodeCache'; -end; - -{$IFDEF FPC}constructor TExtViewNodeCache.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtViewNodeCache.Clear(RemoveDom : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.clear(' + VarToJSON([RemoveDom]) + ');', 'TExtViewNodeCache'); - Result := Self; -end; - -function TExtViewNodeCache.Fill(Els : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fill(' + VarToJSON(Els) + ');', 'TExtViewNodeCache'); - Result := Self; -end; - -function TExtViewNodeCache.IndexOf(El : Integer) : TExtFunction; begin - JSCode(JSName + '.indexOf(' + VarToJSON([El]) + ');', 'TExtViewNodeCache'); - Result := Self; -end; - -function TExtViewNodeCache.RemoveElement(El : Integer; RemoveDom : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.removeElement(' + VarToJSON([El, RemoveDom]) + ');', 'TExtViewNodeCache'); - Result := Self; -end; - -function TExtViewNodeCache.ReplaceElement(El : Integer; Replacement : String; DomReplace : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.replaceElement(' + VarToJSON([El, Replacement, DomReplace]) + ');', 'TExtViewNodeCache'); - Result := Self; -end; - -function TExtViewNodeCache.Scroll(NewRecords : TExtObjectList; Direction : Integer; RemoveCount : Integer) : TExtFunction; begin - JSCode(JSName + '.scroll(' + VarToJSON(NewRecords) + ',' + VarToJSON([Direction, RemoveCount]) + ');', 'TExtViewNodeCache'); - Result := Self; -end; - procedure TExtGridLockingLockable.SetFLockedGridConfig(Value : TExtObject); begin FLockedGridConfig := Value; Value.DeleteFromGarbage; @@ -15778,12 +16344,6 @@ procedure TExtGridLockingLockable.HandleEvent(const AEvtName : string); begin FOnUnlockcolumn(TExtGridLockingLockable(ParamAsObject('This')), TExtGridColumn(ParamAsObject('Column'))); end; -function TExtFxQueue.JSClassName : string; begin - Result := 'Ext.fx.Queue'; -end; - -{$IFDEF FPC}constructor TExtFxQueue.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - function TExtFxTarget.JSClassName : string; begin Result := 'Ext.fx.target.Target'; end; @@ -15795,128 +16355,39 @@ constructor TExtFxTarget.Create(Target : TExtComponent); begin InitDefaults; end; -function TExtGridPluginBufferedRendererTableView.JSClassName : string; begin - Result := 'Ext.grid.plugin.BufferedRendererTableView'; -end; - -{$IFDEF FPC}constructor TExtGridPluginBufferedRendererTableView.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtGridPluginBufferedRendererTreeView.JSClassName : string; begin - Result := 'Ext.grid.plugin.BufferedRendererTreeView'; -end; - -{$IFDEF FPC}constructor TExtGridPluginBufferedRendererTreeView.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtGridLockingView.SetFHasListeners(Value : TExtObject); begin - FHasListeners := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.hasListeners=' + VarToJSON([Value, false]) + ';'); -end; - -procedure TExtGridLockingView.SetFIsLockingView(Value : Boolean); begin - FIsLockingView := Value; - JSCode(JSName + '.isLockingView=' + VarToJSON([Value]) + ';'); -end; - -procedure TExtGridLockingView.SetFIsObservable(Value : Boolean); begin - FIsObservable := Value; - JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); -end; - -procedure TExtGridLockingView.SetFListeners(Value : TExtObject); begin - FListeners := Value; - Value.DeleteFromGarbage; - JSCode('listeners:' + VarToJSON([Value, false])); -end; - -function TExtGridLockingView.JSClassName : string; begin - Result := 'Ext.grid.locking.View'; -end; - -{$IFDEF FPC}constructor TExtGridLockingView.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtGridLockingView.AddEvents(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtGridLockingView'); - Result := Self; -end; - -function TExtGridLockingView.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtGridLockingView'); - Result := Self; -end; - -function TExtGridLockingView.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtGridLockingView'); - Result := Self; -end; - -function TExtGridLockingView.ClearListeners : TExtFunction; begin - JSCode(JSName + '.clearListeners();', 'TExtGridLockingView'); - Result := Self; -end; - -function TExtGridLockingView.ClearManagedListeners : TExtFunction; begin - JSCode(JSName + '.clearManagedListeners();', 'TExtGridLockingView'); - Result := Self; -end; - -constructor TExtGridLockingView.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; -end; - -function TExtGridLockingView.EnableBubble(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtGridLockingView'); - Result := Self; -end; - -function TExtGridLockingView.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtGridLockingView'); - Result := Self; -end; - -function TExtGridLockingView.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtGridLockingView'); - Result := Self; -end; - -function TExtGridLockingView.HasListener(EventName : String) : TExtFunction; begin - JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtGridLockingView'); - Result := Self; +function TExtViewNodeCache.JSClassName : string; begin + Result := 'Ext.view.NodeCache'; end; -function TExtGridLockingView.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin - JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtGridLockingView'); - Result := Self; -end; +{$IFDEF FPC}constructor TExtViewNodeCache.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtGridLockingView.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtGridLockingView'); +function TExtViewNodeCache.Clear(RemoveDom : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.clear(' + VarToJSON([RemoveDom]) + ');', 'TExtViewNodeCache'); Result := Self; end; -function TExtGridLockingView.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtGridLockingView'); +function TExtViewNodeCache.Fill(Els : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fill(' + VarToJSON(Els) + ');', 'TExtViewNodeCache'); Result := Self; end; -function TExtGridLockingView.ResumeEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtGridLockingView'); +function TExtViewNodeCache.IndexOf(El : Integer) : TExtFunction; begin + JSCode(JSName + '.indexOf(' + VarToJSON([El]) + ');', 'TExtViewNodeCache'); Result := Self; end; -function TExtGridLockingView.ResumeEvents : TExtFunction; begin - JSCode(JSName + '.resumeEvents();', 'TExtGridLockingView'); +function TExtViewNodeCache.RemoveElement(El : Integer; RemoveDom : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.removeElement(' + VarToJSON([El, RemoveDom]) + ');', 'TExtViewNodeCache'); Result := Self; end; -function TExtGridLockingView.SuspendEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtGridLockingView'); +function TExtViewNodeCache.ReplaceElement(El : Integer; Replacement : String; DomReplace : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.replaceElement(' + VarToJSON([El, Replacement, DomReplace]) + ');', 'TExtViewNodeCache'); Result := Self; end; -function TExtGridLockingView.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin - JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtGridLockingView'); +function TExtViewNodeCache.Scroll(NewRecords : TExtObjectList; Direction : Integer; RemoveCount : Integer) : TExtFunction; begin + JSCode(JSName + '.scroll(' + VarToJSON(NewRecords) + ',' + VarToJSON([Direction, RemoveCount]) + ');', 'TExtViewNodeCache'); Result := Self; end; @@ -15966,248 +16437,130 @@ function TExtUtilTextMetrics.SetFixedWidth(Width : Integer) : TExtFunction; begi Result := Self; end; -procedure TExtFxAnim.SetFAlternate(Value : Boolean); begin - FAlternate := Value; - JSCode('alternate:' + VarToJSON([Value])); -end; - -procedure TExtFxAnim.SetFCallback(Value : TExtFunction); begin - FCallback := Value; - JSCode('callback:' + VarToJSON([Value, true])); -end; - -procedure TExtFxAnim.SetFDelay(Value : Integer); begin - FDelay := Value; - JSCode('delay:' + VarToJSON([Value])); -end; - -procedure TExtFxAnim.SetFDuration(Value : Integer); begin - FDuration := Value; - JSCode('duration:' + VarToJSON([Value])); -end; - -procedure TExtFxAnim.SetFDynamic(Value : Boolean); begin - FDynamic := Value; - JSCode('dynamic:' + VarToJSON([Value])); -end; - -procedure TExtFxAnim.SetFEasing(Value : String); begin - FEasing := Value; - JSCode('easing:' + VarToJSON([Value])); +function TExtGridPluginBufferedRendererTableView.JSClassName : string; begin + Result := 'Ext.grid.plugin.BufferedRendererTableView'; end; -procedure TExtFxAnim.SetFFrom(Value : TExtObject); begin - FFrom := Value; - Value.DeleteFromGarbage; - JSCode('from:' + VarToJSON([Value, false])); -end; +{$IFDEF FPC}constructor TExtGridPluginBufferedRendererTableView.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtFxAnim.SetFHasListeners(Value : TExtObject); begin +procedure TExtGridLockingView.SetFHasListeners(Value : TExtObject); begin FHasListeners := Value; Value.DeleteFromGarbage; JSCode(JSName + '.hasListeners=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtFxAnim.SetFIsObservable(Value : Boolean); begin - FIsObservable := Value; - JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); -end; - -procedure TExtFxAnim.SetFIterations(Value : Integer); begin - FIterations := Value; - JSCode('iterations:' + VarToJSON([Value])); +procedure TExtGridLockingView.SetFIsLockingView(Value : Boolean); begin + FIsLockingView := Value; + JSCode(JSName + '.isLockingView=' + VarToJSON([Value]) + ';'); end; -procedure TExtFxAnim.SetFKeyframes(Value : TExtObject); begin - FKeyframes := Value; - Value.DeleteFromGarbage; - JSCode('keyframes:' + VarToJSON([Value, false])); +procedure TExtGridLockingView.SetFIsObservable(Value : Boolean); begin + FIsObservable := Value; + JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); end; -procedure TExtFxAnim.SetFListeners(Value : TExtObject); begin +procedure TExtGridLockingView.SetFListeners(Value : TExtObject); begin FListeners := Value; Value.DeleteFromGarbage; JSCode('listeners:' + VarToJSON([Value, false])); end; -procedure TExtFxAnim.SetFReverse(Value : Boolean); begin - FReverse := Value; - JSCode('reverse:' + VarToJSON([Value])); -end; - -procedure TExtFxAnim.SetFScope(Value : TExtFunction); begin - FScope := Value; - JSCode('scope:' + VarToJSON([Value, true])); -end; - -procedure TExtFxAnim.SetFTarget(Value : String); begin - FTarget := Value; - JSCode('target:' + VarToJSON([Value])); -end; - -procedure TExtFxAnim.SetFTargetObject(Value : TExtObject); begin - FTargetObject := Value; - Value.DeleteFromGarbage; - JSCode('target:' + VarToJSON([Value, false])); -end; - -procedure TExtFxAnim.SetFToJS(Value : TExtObject); begin - FToJS := Value; - Value.DeleteFromGarbage; - JSCode('toJS:' + VarToJSON([Value, false])); -end; - -procedure TExtFxAnim.SetFOnAfteranimate(Value : TExtFxAnimOnAfteranimate); begin - if Assigned(FOnAfteranimate) then - JSCode(JSName+'.events ["afteranimate"].listeners=[];'); - if Assigned(Value) then - AddListener('afteranimate', Ajax('afteranimate', ['This', '%0.nm','StartTime', '%1'], true)); - FOnAfteranimate := Value; -end; - -procedure TExtFxAnim.SetFOnBeforeanimate(Value : TExtFxAnimOnBeforeanimate); begin - if Assigned(FOnBeforeanimate) then - JSCode(JSName+'.events ["beforeanimate"].listeners=[];'); - if Assigned(Value) then - AddListener('beforeanimate', Ajax('beforeanimate', ['This', '%0.nm'], true)); - FOnBeforeanimate := Value; -end; - -procedure TExtFxAnim.SetFOnLastframe(Value : TExtFxAnimOnLastframe); begin - if Assigned(FOnLastframe) then - JSCode(JSName+'.events ["lastframe"].listeners=[];'); - if Assigned(Value) then - AddListener('lastframe', Ajax('lastframe', ['This', '%0.nm','StartTime', '%1'], true)); - FOnLastframe := Value; -end; - -function TExtFxAnim.JSClassName : string; begin - Result := 'Ext.fx.Anim'; -end; - -procedure TExtFxAnim.InitDefaults; begin - inherited; - FFrom := TExtObject.CreateInternal(Self, 'from'); - FHasListeners := TExtObject.CreateInternal(Self, 'hasListeners'); - FKeyframes := TExtObject.CreateInternal(Self, 'keyframes'); - FListeners := TExtObject.CreateInternal(Self, 'listeners'); - FTargetObject := TExtObject.CreateInternal(Self, 'target'); - FToJS := TExtObject.CreateInternal(Self, 'toJS'); +function TExtGridLockingView.JSClassName : string; begin + Result := 'Ext.grid.locking.View'; end; -{$IFDEF FPC}constructor TExtFxAnim.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtGridLockingView.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtFxAnim.AddEvents(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtFxAnim'); +function TExtGridLockingView.AddEvents(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtGridLockingView'); Result := Self; end; -function TExtFxAnim.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtFxAnim'); +function TExtGridLockingView.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtGridLockingView'); Result := Self; end; -function TExtFxAnim.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtFxAnim'); +function TExtGridLockingView.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtGridLockingView'); Result := Self; end; -function TExtFxAnim.ClearListeners : TExtFunction; begin - JSCode(JSName + '.clearListeners();', 'TExtFxAnim'); +function TExtGridLockingView.ClearListeners : TExtFunction; begin + JSCode(JSName + '.clearListeners();', 'TExtGridLockingView'); Result := Self; end; -function TExtFxAnim.ClearManagedListeners : TExtFunction; begin - JSCode(JSName + '.clearManagedListeners();', 'TExtFxAnim'); +function TExtGridLockingView.ClearManagedListeners : TExtFunction; begin + JSCode(JSName + '.clearManagedListeners();', 'TExtGridLockingView'); Result := Self; end; -constructor TExtFxAnim.Create; begin +constructor TExtGridLockingView.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -function TExtFxAnim.EnableBubble(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtFxAnim'); - Result := Self; -end; - -function TExtFxAnim.EndJS : TExtFunction; begin - JSCode(JSName + '.end();', 'TExtFxAnim'); +function TExtGridLockingView.EnableBubble(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtGridLockingView'); Result := Self; end; -function TExtFxAnim.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtFxAnim'); +function TExtGridLockingView.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtGridLockingView'); Result := Self; end; -function TExtFxAnim.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtFxAnim'); +function TExtGridLockingView.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtGridLockingView'); Result := Self; end; -function TExtFxAnim.HasListener(EventName : String) : TExtFunction; begin - JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtFxAnim'); +function TExtGridLockingView.HasListener(EventName : String) : TExtFunction; begin + JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtGridLockingView'); Result := Self; end; -function TExtFxAnim.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin - JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtFxAnim'); +function TExtGridLockingView.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin + JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtGridLockingView'); Result := Self; end; -function TExtFxAnim.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtFxAnim'); +function TExtGridLockingView.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtGridLockingView'); Result := Self; end; -function TExtFxAnim.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtFxAnim'); +function TExtGridLockingView.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtGridLockingView'); Result := Self; end; -function TExtFxAnim.ResumeEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtFxAnim'); +function TExtGridLockingView.ResumeEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtGridLockingView'); Result := Self; end; -function TExtFxAnim.ResumeEvents : TExtFunction; begin - JSCode(JSName + '.resumeEvents();', 'TExtFxAnim'); +function TExtGridLockingView.ResumeEvents : TExtFunction; begin + JSCode(JSName + '.resumeEvents();', 'TExtGridLockingView'); Result := Self; end; -function TExtFxAnim.SuspendEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtFxAnim'); +function TExtGridLockingView.SuspendEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtGridLockingView'); Result := Self; end; -function TExtFxAnim.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin - JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtFxAnim'); +function TExtGridLockingView.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin + JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtGridLockingView'); Result := Self; end; -destructor TExtFxAnim.Destroy; begin - try - FFrom.Free; - FHasListeners.Free; - FKeyframes.Free; - FListeners.Free; - FTargetObject.Free; - FToJS.Free; - except end; - inherited; +function TExtGridPluginBufferedRendererTreeView.JSClassName : string; begin + Result := 'Ext.grid.plugin.BufferedRendererTreeView'; end; -procedure TExtFxAnim.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'afteranimate') and Assigned(FOnAfteranimate) then - FOnAfteranimate(TExtFxAnim(ParamAsObject('This')), ParamAsTDateTime('StartTime')) - else if (AEvtName = 'beforeanimate') and Assigned(FOnBeforeanimate) then - FOnBeforeanimate(TExtFxAnim(ParamAsObject('This'))) - else if (AEvtName = 'lastframe') and Assigned(FOnLastframe) then - FOnLastframe(TExtFxAnim(ParamAsObject('This')), ParamAsTDateTime('StartTime')); -end; +{$IFDEF FPC}constructor TExtGridPluginBufferedRendererTreeView.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} procedure TExtFxAnimator.SetFDelay(Value : Integer); begin FDelay := Value; @@ -16235,6 +16588,11 @@ procedure TExtFxAnimator.SetFHasListeners(Value : TExtObject); begin JSCode(JSName + '.hasListeners=' + VarToJSON([Value, false]) + ';'); end; +procedure TExtFxAnimator.SetFIsAnimator(Value : Boolean); begin + FIsAnimator := Value; + JSCode(JSName + '.isAnimator=' + VarToJSON([Value]) + ';'); +end; + procedure TExtFxAnimator.SetFIsObservable(Value : Boolean); begin FIsObservable := Value; JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); @@ -16414,44 +16772,11 @@ procedure TExtFxAnimator.HandleEvent(const AEvtName : string); begin FOnKeyframe(TExtFxAnimator(ParamAsObject('This')), ParamAsInteger('Keyframe')); end; -procedure TExtFormFieldVTypesSingleton.SetFAlphanumText(Value : String); begin - FAlphanumText := Value; - JSCode(JSName + '.alphanumText=' + VarToJSON([Value]) + ';'); -end; - -procedure TExtFormFieldVTypesSingleton.SetFAlphaText(Value : String); begin - FAlphaText := Value; - JSCode(JSName + '.alphaText=' + VarToJSON([Value]) + ';'); -end; - -procedure TExtFormFieldVTypesSingleton.SetFEmailMask(Value : TRegExp); begin - FEmailMask := Value; - JSCode(JSName + '.emailMask=' + VarToJSON([#3 +Value]) + ';'); -end; - -procedure TExtFormFieldVTypesSingleton.SetFEmailText(Value : String); begin - FEmailText := Value; - JSCode(JSName + '.emailText=' + VarToJSON([Value]) + ';'); -end; - -procedure TExtFormFieldVTypesSingleton.SetFUrlText(Value : String); begin - FUrlText := Value; - JSCode(JSName + '.urlText=' + VarToJSON([Value]) + ';'); -end; - -function TExtFormFieldVTypesSingleton.JSClassName : string; begin - Result := 'Ext.form.field.VTypes'; -end; - -procedure TExtFormFieldVTypesSingleton.InitDefaults; begin - inherited; - FAlphanumText := 'This field should only contain letters, numbers and _'; - FAlphaText := 'This field should only contain letters and _'; - FEmailText := 'This field should be an e-mail address in the format'; - FUrlText := 'This field should be a URL in the format'; +function TExtFxCubicBezierSingleton.JSClassName : string; begin + Result := 'Ext.fx.CubicBezier'; end; -{$IFDEF FPC}constructor TExtFormFieldVTypesSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtFxCubicBezierSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} procedure TExtFormLabelable.SetFActiveError(Value : String); begin FActiveError := Value; @@ -16624,11 +16949,23 @@ procedure TExtFormLabelable.SetFBeforeSubTplTemplate(Value : TExtXTemplate); beg JSCode('beforeSubTpl:' + VarToJSON([Value, false])); end; +procedure TExtFormLabelable.SetFBodyEl(Value : TExtElement); begin + FBodyEl := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.bodyEl=' + VarToJSON([Value, false]) + ';'); +end; + procedure TExtFormLabelable.SetFClearCls(Value : String); begin FClearCls := Value; JSCode('clearCls:' + VarToJSON([Value])); end; +procedure TExtFormLabelable.SetFErrorEl(Value : TExtElement); begin + FErrorEl := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.errorEl=' + VarToJSON([Value, false]) + ';'); +end; + procedure TExtFormLabelable.SetFErrorMsgCls(Value : String); begin FErrorMsgCls := Value; JSCode('errorMsgCls:' + VarToJSON([Value])); @@ -16667,21 +17004,9 @@ procedure TExtFormLabelable.SetFInvalidCls(Value : String); begin JSCode('invalidCls:' + VarToJSON([Value])); end; -procedure TExtFormLabelable.SetFLabelableRenderTpl(Value : String); begin - FLabelableRenderTpl := Value; - JSCode('labelableRenderTpl:' + VarToJSON([Value])); -end; - -procedure TExtFormLabelable.SetFLabelableRenderTplList(Value : TExtObjectList); begin - FLabelableRenderTplList := Value; - Value.DeleteFromGarbage; - JSCode('labelableRenderTpl:' + VarToJSON([Value, false])); -end; - -procedure TExtFormLabelable.SetFLabelableRenderTplTemplate(Value : TExtXTemplate); begin - FLabelableRenderTplTemplate := Value; - Value.DeleteFromGarbage; - JSCode('labelableRenderTpl:' + VarToJSON([Value, false])); +procedure TExtFormLabelable.SetFIsFieldLabelable(Value : Boolean); begin + FIsFieldLabelable := Value; + JSCode(JSName + '.isFieldLabelable=' + VarToJSON([Value]) + ';'); end; procedure TExtFormLabelable.SetFLabelAlign(Value : String); begin @@ -16706,6 +17031,12 @@ procedure TExtFormLabelable.SetFLabelAttrTplTemplate(Value : TExtXTemplate); beg JSCode('labelAttrTpl:' + VarToJSON([Value, false])); end; +procedure TExtFormLabelable.SetFLabelCell(Value : TExtElement); begin + FLabelCell := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.labelCell=' + VarToJSON([Value, false]) + ';'); +end; + procedure TExtFormLabelable.SetFLabelCls(Value : String); begin FLabelCls := Value; JSCode('labelCls:' + VarToJSON([Value])); @@ -16716,6 +17047,12 @@ procedure TExtFormLabelable.SetFLabelClsExtra(Value : String); begin JSCode('labelClsExtra:' + VarToJSON([Value])); end; +procedure TExtFormLabelable.SetFLabelEl(Value : TExtElement); begin + FLabelEl := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.labelEl=' + VarToJSON([Value, false]) + ';'); +end; + procedure TExtFormLabelable.SetFLabelPad(Value : Integer); begin FLabelPad := Value; JSCode('labelPad:' + VarToJSON([Value])); @@ -16778,10 +17115,12 @@ procedure TExtFormLabelable.InitDefaults; begin FBeforeLabelTplTemplate := TExtXTemplate.CreateInternal(Self, 'beforeLabelTpl'); FBeforeSubTplList := TExtObjectList.Create(Self, 'beforeSubTpl'); FBeforeSubTplTemplate := TExtXTemplate.CreateInternal(Self, 'beforeSubTpl'); - FLabelableRenderTplList := TExtObjectList.Create(Self, 'labelableRenderTpl'); - FLabelableRenderTplTemplate := TExtXTemplate.CreateInternal(Self, 'labelableRenderTpl'); + FBodyEl := TExtElement.CreateInternal(Self, 'bodyEl'); + FErrorEl := TExtElement.CreateInternal(Self, 'errorEl'); FLabelAttrTplList := TExtObjectList.Create(Self, 'labelAttrTpl'); FLabelAttrTplTemplate := TExtXTemplate.CreateInternal(Self, 'labelAttrTpl'); + FLabelCell := TExtElement.CreateInternal(Self, 'labelCell'); + FLabelEl := TExtElement.CreateInternal(Self, 'labelEl'); end; {$IFDEF FPC}constructor TExtFormLabelable.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} @@ -16821,6 +17160,11 @@ function TExtFormLabelable.HasVisibleLabel : TExtFunction; begin Result := Self; end; +function TExtFormLabelable.InitLabelable : TExtFunction; begin + JSCode(JSName + '.initLabelable();', 'TExtFormLabelable'); + Result := Self; +end; + function TExtFormLabelable.SetActiveError(Msg : String) : TExtFunction; begin JSCode(JSName + '.setActiveError(' + VarToJSON([Msg]) + ');', 'TExtFormLabelable'); Result := Self; @@ -16871,10 +17215,12 @@ destructor TExtFormLabelable.Destroy; begin FBeforeLabelTplTemplate.Free; FBeforeSubTplList.Free; FBeforeSubTplTemplate.Free; - FLabelableRenderTplList.Free; - FLabelableRenderTplTemplate.Free; + FBodyEl.Free; + FErrorEl.Free; FLabelAttrTplList.Free; FLabelAttrTplTemplate.Free; + FLabelCell.Free; + FLabelEl.Free; except end; inherited; end; @@ -16885,43 +17231,265 @@ procedure TExtFormLabelable.HandleEvent(const AEvtName : string); begin FOnErrorchange(TExtFormLabelable(ParamAsObject('This')), ParamAsString('Error')); end; -procedure TExtFxManagerSingleton.SetFInterval(Value : Integer); begin - FInterval := Value; - JSCode('interval:' + VarToJSON([Value])); +procedure TExtFxAnim.SetFAlternate(Value : Boolean); begin + FAlternate := Value; + JSCode('alternate:' + VarToJSON([Value])); end; -function TExtFxManagerSingleton.JSClassName : string; begin - Result := 'Ext.fx.Manager'; +procedure TExtFxAnim.SetFCallback(Value : TExtFunction); begin + FCallback := Value; + JSCode('callback:' + VarToJSON([Value, true])); end; -procedure TExtFxManagerSingleton.InitDefaults; begin +procedure TExtFxAnim.SetFDelay(Value : Integer); begin + FDelay := Value; + JSCode('delay:' + VarToJSON([Value])); +end; + +procedure TExtFxAnim.SetFDuration(Value : Integer); begin + FDuration := Value; + JSCode('duration:' + VarToJSON([Value])); +end; + +procedure TExtFxAnim.SetFDynamic(Value : Boolean); begin + FDynamic := Value; + JSCode('dynamic:' + VarToJSON([Value])); +end; + +procedure TExtFxAnim.SetFEasing(Value : String); begin + FEasing := Value; + JSCode('easing:' + VarToJSON([Value])); +end; + +procedure TExtFxAnim.SetFFrom(Value : TExtObject); begin + FFrom := Value; + Value.DeleteFromGarbage; + JSCode('from:' + VarToJSON([Value, false])); +end; + +procedure TExtFxAnim.SetFHasListeners(Value : TExtObject); begin + FHasListeners := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.hasListeners=' + VarToJSON([Value, false]) + ';'); +end; + +procedure TExtFxAnim.SetFIsAnimation(Value : Boolean); begin + FIsAnimation := Value; + JSCode(JSName + '.isAnimation=' + VarToJSON([Value]) + ';'); +end; + +procedure TExtFxAnim.SetFIsObservable(Value : Boolean); begin + FIsObservable := Value; + JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); +end; + +procedure TExtFxAnim.SetFIterations(Value : Integer); begin + FIterations := Value; + JSCode('iterations:' + VarToJSON([Value])); +end; + +procedure TExtFxAnim.SetFKeyframes(Value : TExtObject); begin + FKeyframes := Value; + Value.DeleteFromGarbage; + JSCode('keyframes:' + VarToJSON([Value, false])); +end; + +procedure TExtFxAnim.SetFListeners(Value : TExtObject); begin + FListeners := Value; + Value.DeleteFromGarbage; + JSCode('listeners:' + VarToJSON([Value, false])); +end; + +procedure TExtFxAnim.SetFReverse(Value : Boolean); begin + FReverse := Value; + JSCode('reverse:' + VarToJSON([Value])); +end; + +procedure TExtFxAnim.SetFScope(Value : TExtFunction); begin + FScope := Value; + JSCode('scope:' + VarToJSON([Value, true])); +end; + +procedure TExtFxAnim.SetFTarget(Value : String); begin + FTarget := Value; + JSCode('target:' + VarToJSON([Value])); +end; + +procedure TExtFxAnim.SetFTargetObject(Value : TExtObject); begin + FTargetObject := Value; + Value.DeleteFromGarbage; + JSCode('target:' + VarToJSON([Value, false])); +end; + +procedure TExtFxAnim.SetFToJS(Value : TExtObject); begin + FToJS := Value; + Value.DeleteFromGarbage; + JSCode('toJS:' + VarToJSON([Value, false])); +end; + +procedure TExtFxAnim.SetFOnAfteranimate(Value : TExtFxAnimOnAfteranimate); begin + if Assigned(FOnAfteranimate) then + JSCode(JSName+'.events ["afteranimate"].listeners=[];'); + if Assigned(Value) then + AddListener('afteranimate', Ajax('afteranimate', ['This', '%0.nm','StartTime', '%1'], true)); + FOnAfteranimate := Value; +end; + +procedure TExtFxAnim.SetFOnBeforeanimate(Value : TExtFxAnimOnBeforeanimate); begin + if Assigned(FOnBeforeanimate) then + JSCode(JSName+'.events ["beforeanimate"].listeners=[];'); + if Assigned(Value) then + AddListener('beforeanimate', Ajax('beforeanimate', ['This', '%0.nm'], true)); + FOnBeforeanimate := Value; +end; + +procedure TExtFxAnim.SetFOnLastframe(Value : TExtFxAnimOnLastframe); begin + if Assigned(FOnLastframe) then + JSCode(JSName+'.events ["lastframe"].listeners=[];'); + if Assigned(Value) then + AddListener('lastframe', Ajax('lastframe', ['This', '%0.nm','StartTime', '%1'], true)); + FOnLastframe := Value; +end; + +function TExtFxAnim.JSClassName : string; begin + Result := 'Ext.fx.Anim'; +end; + +procedure TExtFxAnim.InitDefaults; begin inherited; - FInterval := 16; + FFrom := TExtObject.CreateInternal(Self, 'from'); + FHasListeners := TExtObject.CreateInternal(Self, 'hasListeners'); + FKeyframes := TExtObject.CreateInternal(Self, 'keyframes'); + FListeners := TExtObject.CreateInternal(Self, 'listeners'); + FTargetObject := TExtObject.CreateInternal(Self, 'target'); + FToJS := TExtObject.CreateInternal(Self, 'toJS'); end; -{$IFDEF FPC}constructor TExtFxManagerSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtFxAnim.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtFxManagerSingleton.AddAnim(Anim : TExtFxAnim) : TExtFunction; begin - JSCode(JSName + '.addAnim(' + VarToJSON([Anim, false]) + ');', 'TExtFxManagerSingleton'); +function TExtFxAnim.AddEvents(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtFxAnim'); Result := Self; end; -function TExtFxManagerSingleton.RemoveAnim(Anim : TExtFxAnim) : TExtFunction; begin - JSCode(JSName + '.removeAnim(' + VarToJSON([Anim, false]) + ');', 'TExtFxManagerSingleton'); +function TExtFxAnim.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtFxAnim'); + Result := Self; +end; + +function TExtFxAnim.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtFxAnim'); + Result := Self; +end; + +function TExtFxAnim.ClearListeners : TExtFunction; begin + JSCode(JSName + '.clearListeners();', 'TExtFxAnim'); + Result := Self; +end; + +function TExtFxAnim.ClearManagedListeners : TExtFunction; begin + JSCode(JSName + '.clearManagedListeners();', 'TExtFxAnim'); + Result := Self; +end; + +constructor TExtFxAnim.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; +end; + +function TExtFxAnim.EnableBubble(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtFxAnim'); + Result := Self; +end; + +function TExtFxAnim.EndJS : TExtFunction; begin + JSCode(JSName + '.end();', 'TExtFxAnim'); Result := Self; end; +function TExtFxAnim.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtFxAnim'); + Result := Self; +end; + +function TExtFxAnim.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtFxAnim'); + Result := Self; +end; + +function TExtFxAnim.HasListener(EventName : String) : TExtFunction; begin + JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtFxAnim'); + Result := Self; +end; + +function TExtFxAnim.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin + JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtFxAnim'); + Result := Self; +end; + +function TExtFxAnim.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtFxAnim'); + Result := Self; +end; + +function TExtFxAnim.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtFxAnim'); + Result := Self; +end; + +function TExtFxAnim.ResumeEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtFxAnim'); + Result := Self; +end; + +function TExtFxAnim.ResumeEvents : TExtFunction; begin + JSCode(JSName + '.resumeEvents();', 'TExtFxAnim'); + Result := Self; +end; + +function TExtFxAnim.SuspendEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtFxAnim'); + Result := Self; +end; + +function TExtFxAnim.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin + JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtFxAnim'); + Result := Self; +end; + +destructor TExtFxAnim.Destroy; begin + try + FFrom.Free; + FHasListeners.Free; + FKeyframes.Free; + FListeners.Free; + FTargetObject.Free; + FToJS.Free; + except end; + inherited; +end; + +procedure TExtFxAnim.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'afteranimate') and Assigned(FOnAfteranimate) then + FOnAfteranimate(TExtFxAnim(ParamAsObject('This')), ParamAsTDateTime('StartTime')) + else if (AEvtName = 'beforeanimate') and Assigned(FOnBeforeanimate) then + FOnBeforeanimate(TExtFxAnim(ParamAsObject('This'))) + else if (AEvtName = 'lastframe') and Assigned(FOnLastframe) then + FOnLastframe(TExtFxAnim(ParamAsObject('This')), ParamAsTDateTime('StartTime')); +end; + function TExtFxPropertyHandler.JSClassName : string; begin Result := 'Ext.fx.PropertyHandler'; end; {$IFDEF FPC}constructor TExtFxPropertyHandler.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtFxCubicBezierSingleton.JSClassName : string; begin - Result := 'Ext.fx.CubicBezier'; +function TExtFxQueue.JSClassName : string; begin + Result := 'Ext.fx.Queue'; end; -{$IFDEF FPC}constructor TExtFxCubicBezierSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtFxQueue.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} function TExtFxEasingSingleton.JSClassName : string; begin Result := 'Ext.fx.Easing'; @@ -16929,6 +17497,32 @@ function TExtFxEasingSingleton.JSClassName : string; begin {$IFDEF FPC}constructor TExtFxEasingSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtFxManagerSingleton.SetFInterval(Value : Integer); begin + FInterval := Value; + JSCode('interval:' + VarToJSON([Value])); +end; + +function TExtFxManagerSingleton.JSClassName : string; begin + Result := 'Ext.fx.Manager'; +end; + +procedure TExtFxManagerSingleton.InitDefaults; begin + inherited; + FInterval := 16; +end; + +{$IFDEF FPC}constructor TExtFxManagerSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtFxManagerSingleton.AddAnim(Anim : TExtFxAnim) : TExtFunction; begin + JSCode(JSName + '.addAnim(' + VarToJSON([Anim, false]) + ');', 'TExtFxManagerSingleton'); + Result := Self; +end; + +function TExtFxManagerSingleton.RemoveAnim(Anim : TExtFxAnim) : TExtFunction; begin + JSCode(JSName + '.removeAnim(' + VarToJSON([Anim, false]) + ');', 'TExtFxManagerSingleton'); + Result := Self; +end; + procedure TExtLayoutContextItem.SetFState(Value : TExtObject); begin FState := Value; Value.DeleteFromGarbage; @@ -17440,6 +18034,11 @@ procedure TExtUtilSortable.SetFDefaultSortDirection(Value : String); begin JSCode('defaultSortDirection:' + VarToJSON([Value])); end; +procedure TExtUtilSortable.SetFIsSortable(Value : Boolean); begin + FIsSortable := Value; + JSCode(JSName + '.isSortable=' + VarToJSON([Value]) + ';'); +end; + procedure TExtUtilSortable.SetFSorters(Value : TExtObjectList); begin FSorters := Value; Value.DeleteFromGarbage; @@ -17759,89 +18358,140 @@ function TExtLayoutClassList.RemoveMany : TExtFunction; begin Result := Self; end; -procedure TExtXTemplateParser.SetFLevel(Value : Integer); begin - FLevel := Value; - JSCode(JSName + '.level=' + VarToJSON([Value]) + ';'); +procedure TExtFormFieldVTypesSingleton.SetFAlphanumText(Value : String); begin + FAlphanumText := Value; + JSCode(JSName + '.alphanumText=' + VarToJSON([Value]) + ';'); end; -function TExtXTemplateParser.JSClassName : string; begin - Result := 'Ext.XTemplateParser'; +procedure TExtFormFieldVTypesSingleton.SetFAlphaText(Value : String); begin + FAlphaText := Value; + JSCode(JSName + '.alphaText=' + VarToJSON([Value]) + ';'); end; -{$IFDEF FPC}constructor TExtXTemplateParser.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtFormFieldVTypesSingleton.SetFEmailMask(Value : TRegExp); begin + FEmailMask := Value; + JSCode(JSName + '.emailMask=' + VarToJSON([#3 +Value]) + ';'); +end; -function TExtXTemplateParser.DoCase(Action : String; Actions : TExtObject) : TExtFunction; begin - JSCode(JSName + '.// doCase(' + VarToJSON([Action, Actions, false]) + ');', 'TExtXTemplateParser'); +procedure TExtFormFieldVTypesSingleton.SetFEmailText(Value : String); begin + FEmailText := Value; + JSCode(JSName + '.emailText=' + VarToJSON([Value]) + ';'); +end; + +procedure TExtFormFieldVTypesSingleton.SetFUrlText(Value : String); begin + FUrlText := Value; + JSCode(JSName + '.urlText=' + VarToJSON([Value]) + ';'); +end; + +function TExtFormFieldVTypesSingleton.JSClassName : string; begin + Result := 'Ext.form.field.VTypes'; +end; + +procedure TExtFormFieldVTypesSingleton.InitDefaults; begin + inherited; + FAlphanumText := 'This field should only contain letters, numbers and _'; + FAlphaText := 'This field should only contain letters and _'; + FEmailText := 'This field should be an e-mail address in the format'; + FUrlText := 'This field should be a URL in the format'; +end; + +{$IFDEF FPC}constructor TExtFormFieldVTypesSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDomElement_anim.JSClassName : string; begin + Result := 'Ext.dom.Elementanim'; +end; + +{$IFDEF FPC}constructor TExtDomElement_anim.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDomElement_anim.Animate(Config : TExtObject) : TExtFunction; begin + JSCode(JSName + '.animate(' + VarToJSON([Config, false]) + ');', 'TExtDomElement_anim'); Result := Self; end; -function TExtXTemplateParser.DoDefault : TExtFunction; begin - JSCode(JSName + '.// doDefault();', 'TExtXTemplateParser'); +function TExtDomElement_anim.FadeIn(Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.fadeIn(' + VarToJSON([Options, false]) + ');', 'TExtDomElement_anim'); Result := Self; end; -function TExtXTemplateParser.DoElse : TExtFunction; begin - JSCode(JSName + '.// doElse();', 'TExtXTemplateParser'); +function TExtDomElement_anim.FadeOut(Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.fadeOut(' + VarToJSON([Options, false]) + ');', 'TExtDomElement_anim'); Result := Self; end; -function TExtXTemplateParser.DoElseIf(Action : String; Actions : TExtObject) : TExtFunction; begin - JSCode(JSName + '.// doElseIf(' + VarToJSON([Action, Actions, false]) + ');', 'TExtXTemplateParser'); +function TExtDomElement_anim.Frame(Color : String = ''; Count : Integer = 0; Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.frame(' + VarToJSON([Color, Count, Options, false]) + ');', 'TExtDomElement_anim'); Result := Self; end; -function TExtXTemplateParser.DoEnd(TypeJS : String; Actions : TExtObject) : TExtFunction; begin - JSCode(JSName + '.// doEnd(' + VarToJSON([TypeJS, Actions, false]) + ');', 'TExtXTemplateParser'); +function TExtDomElement_anim.Ghost(Anchor : String = ''; Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.ghost(' + VarToJSON([Anchor, Options, false]) + ');', 'TExtDomElement_anim'); Result := Self; end; -function TExtXTemplateParser.DoEval(Text : String) : TExtFunction; begin - JSCode(JSName + '.// doEval(' + VarToJSON([Text]) + ');', 'TExtXTemplateParser'); +function TExtDomElement_anim.Highlight(Color : String = ''; Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.highlight(' + VarToJSON([Color, Options, false]) + ');', 'TExtDomElement_anim'); Result := Self; end; -function TExtXTemplateParser.DoExec(Action : String; Actions : TExtObject) : TExtFunction; begin - JSCode(JSName + '.// doExec(' + VarToJSON([Action, Actions, false]) + ');', 'TExtXTemplateParser'); +function TExtDomElement_anim.Puff(Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.puff(' + VarToJSON([Options, false]) + ');', 'TExtDomElement_anim'); Result := Self; end; -function TExtXTemplateParser.DoExpr(Expr : String) : TExtFunction; begin - JSCode(JSName + '.// doExpr(' + VarToJSON([Expr]) + ');', 'TExtXTemplateParser'); +function TExtDomElement_anim.SlideIn(Anchor : String = ''; Options : TExtObject = nil; OptionsPreserveScroll : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.slideIn(' + VarToJSON([Anchor, Options, false, OptionsPreserveScroll]) + ');', 'TExtDomElement_anim'); Result := Self; end; -function TExtXTemplateParser.DoFor(Action : String; Actions : TExtObject) : TExtFunction; begin - JSCode(JSName + '.// doFor(' + VarToJSON([Action, Actions, false]) + ');', 'TExtXTemplateParser'); +function TExtDomElement_anim.SlideOut(Anchor : String = ''; Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.slideOut(' + VarToJSON([Anchor, Options, false]) + ');', 'TExtDomElement_anim'); Result := Self; end; -function TExtXTemplateParser.DoForEach(Action : String; Actions : TExtObject) : TExtFunction; begin - JSCode(JSName + '.// doForEach(' + VarToJSON([Action, Actions, false]) + ');', 'TExtXTemplateParser'); +function TExtDomElement_anim.SwitchOff(Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.switchOff(' + VarToJSON([Options, false]) + ');', 'TExtDomElement_anim'); Result := Self; end; -function TExtXTemplateParser.DoIf(Action : String; Actions : TExtObject) : TExtFunction; begin - JSCode(JSName + '.// doIf(' + VarToJSON([Action, Actions, false]) + ');', 'TExtXTemplateParser'); +function TExtDomElement_dd.JSClassName : string; begin + Result := 'Ext.dom.Elementdd'; +end; + +{$IFDEF FPC}constructor TExtDomElement_dd.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDomElement_dd.InitDD(Group : String; Config : TExtObject; Overrides : TExtObject) : TExtFunction; begin + JSCode(JSName + '.initDD(' + VarToJSON([Group, Config, false, Overrides, false]) + ');', 'TExtDomElement_dd'); Result := Self; end; -function TExtXTemplateParser.DoSwitch(Action : String; Actions : TExtObject) : TExtFunction; begin - JSCode(JSName + '.// doSwitch(' + VarToJSON([Action, Actions, false]) + ');', 'TExtXTemplateParser'); +function TExtDomElement_dd.InitDDProxy(Group : String; Config : TExtObject; Overrides : TExtObject) : TExtFunction; begin + JSCode(JSName + '.initDDProxy(' + VarToJSON([Group, Config, false, Overrides, false]) + ');', 'TExtDomElement_dd'); Result := Self; end; -function TExtXTemplateParser.DoTag : TExtFunction; begin - JSCode(JSName + '.// doTag();', 'TExtXTemplateParser'); +function TExtDomElement_dd.InitDDTarget(Group : String; Config : TExtObject; Overrides : TExtObject) : TExtFunction; begin + JSCode(JSName + '.initDDTarget(' + VarToJSON([Group, Config, false, Overrides, false]) + ');', 'TExtDomElement_dd'); Result := Self; end; -function TExtXTemplateParser.DoText(Text : String) : TExtFunction; begin - JSCode(JSName + '.// doText(' + VarToJSON([Text]) + ');', 'TExtXTemplateParser'); +function TExtDomAbstractQuery.JSClassName : string; begin + Result := 'Ext.dom.AbstractQuery'; +end; + +{$IFDEF FPC}constructor TExtDomAbstractQuery.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDomAbstractQuery.IsJS(El : String; Selector : String) : TExtFunction; begin + JSCode(JSName + '.is(' + VarToJSON([El, Selector]) + ');', 'TExtDomAbstractQuery'); Result := Self; end; -function TExtXTemplateParser.DoTplExtEmptyFnParse : TExtFunction; begin - JSCode(JSName + '.doTpl: Ext.emptyFn, parse();', 'TExtXTemplateParser'); +function TExtDomAbstractQuery.Select(Selector : String; Root : String = '') : TExtFunction; begin + JSCode(JSName + '.select(' + VarToJSON([Selector, Root]) + ');', 'TExtDomAbstractQuery'); + Result := Self; +end; + +function TExtDomAbstractQuery.SelectNode(Selector : String; Root : String = '') : TExtFunction; begin + JSCode(JSName + '.selectNode(' + VarToJSON([Selector, Root]) + ');', 'TExtDomAbstractQuery'); Result := Self; end; @@ -17949,195 +18599,6 @@ destructor TExtDomCompositeElementLite.Destroy; begin inherited; end; -function TExtDomElement_anim.JSClassName : string; begin - Result := 'Ext.dom.Elementanim'; -end; - -{$IFDEF FPC}constructor TExtDomElement_anim.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDomElement_anim.Animate(Config : TExtObject) : TExtFunction; begin - JSCode(JSName + '.animate(' + VarToJSON([Config, false]) + ');', 'TExtDomElement_anim'); - Result := Self; -end; - -function TExtDomElement_anim.FadeIn(Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.fadeIn(' + VarToJSON([Options, false]) + ');', 'TExtDomElement_anim'); - Result := Self; -end; - -function TExtDomElement_anim.FadeOut(Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.fadeOut(' + VarToJSON([Options, false]) + ');', 'TExtDomElement_anim'); - Result := Self; -end; - -function TExtDomElement_anim.Frame(Color : String = ''; Count : Integer = 0; Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.frame(' + VarToJSON([Color, Count, Options, false]) + ');', 'TExtDomElement_anim'); - Result := Self; -end; - -function TExtDomElement_anim.Ghost(Anchor : String = ''; Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.ghost(' + VarToJSON([Anchor, Options, false]) + ');', 'TExtDomElement_anim'); - Result := Self; -end; - -function TExtDomElement_anim.Highlight(Color : String = ''; Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.highlight(' + VarToJSON([Color, Options, false]) + ');', 'TExtDomElement_anim'); - Result := Self; -end; - -function TExtDomElement_anim.Puff(Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.puff(' + VarToJSON([Options, false]) + ');', 'TExtDomElement_anim'); - Result := Self; -end; - -function TExtDomElement_anim.SlideIn(Anchor : String = ''; Options : TExtObject = nil; OptionsPreserveScroll : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.slideIn(' + VarToJSON([Anchor, Options, false, OptionsPreserveScroll]) + ');', 'TExtDomElement_anim'); - Result := Self; -end; - -function TExtDomElement_anim.SlideOut(Anchor : String = ''; Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.slideOut(' + VarToJSON([Anchor, Options, false]) + ');', 'TExtDomElement_anim'); - Result := Self; -end; - -function TExtDomElement_anim.SwitchOff(Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.switchOff(' + VarToJSON([Options, false]) + ');', 'TExtDomElement_anim'); - Result := Self; -end; - -function TExtDomAbstractHelper.JSClassName : string; begin - Result := 'Ext.dom.AbstractHelper'; -end; - -{$IFDEF FPC}constructor TExtDomAbstractHelper.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDomAbstractHelper.Append(El : String; O : String; ReturnElement : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.append(' + VarToJSON([El, O, ReturnElement]) + ');', 'TExtDomAbstractHelper'); - Result := Self; -end; - -function TExtDomAbstractHelper.ApplyStyles(El : String; Styles : String) : TExtFunction; begin - JSCode(JSName + '.applyStyles(' + VarToJSON([El, Styles]) + ');', 'TExtDomAbstractHelper'); - Result := Self; -end; - -function TExtDomAbstractHelper.GenerateStyles(Styles : TExtObject; Buffer : TExtObjectList = nil) : TExtFunction; begin - JSCode(JSName + '.generateStyles(' + VarToJSON([Styles, false]) + ',' + VarToJSON(Buffer) + ');', 'TExtDomAbstractHelper'); - Result := Self; -end; - -function TExtDomAbstractHelper.InsertAfter(El : String; O : TExtObject; ReturnElement : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.insertAfter(' + VarToJSON([El, O, false, ReturnElement]) + ');', 'TExtDomAbstractHelper'); - Result := Self; -end; - -function TExtDomAbstractHelper.InsertBefore(El : String; O : String; ReturnElement : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.insertBefore(' + VarToJSON([El, O, ReturnElement]) + ');', 'TExtDomAbstractHelper'); - Result := Self; -end; - -function TExtDomAbstractHelper.InsertFirst(El : String; O : String; ReturnElement : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.insertFirst(' + VarToJSON([El, O, ReturnElement]) + ');', 'TExtDomAbstractHelper'); - Result := Self; -end; - -function TExtDomAbstractHelper.InsertHtml(Where : String; El : THTMLElement; Html : String) : TExtFunction; begin - JSCode(JSName + '.insertHtml(' + VarToJSON([Where, El, false, Html]) + ');', 'TExtDomAbstractHelper'); - Result := Self; -end; - -function TExtDomAbstractHelper.Markup(Spec : TExtObject) : TExtFunction; begin - JSCode(JSName + '.markup(' + VarToJSON([Spec, false]) + ');', 'TExtDomAbstractHelper'); - Result := Self; -end; - -function TExtDomAbstractHelper.Overwrite(El : String; O : String; ReturnElement : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.overwrite(' + VarToJSON([El, O, ReturnElement]) + ');', 'TExtDomAbstractHelper'); - Result := Self; -end; - -function TExtDomAbstractQuery.JSClassName : string; begin - Result := 'Ext.dom.AbstractQuery'; -end; - -{$IFDEF FPC}constructor TExtDomAbstractQuery.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDomAbstractQuery.IsJS(El : String; Selector : String) : TExtFunction; begin - JSCode(JSName + '.is(' + VarToJSON([El, Selector]) + ');', 'TExtDomAbstractQuery'); - Result := Self; -end; - -function TExtDomAbstractQuery.Select(Selector : String; Root : String = '') : TExtFunction; begin - JSCode(JSName + '.select(' + VarToJSON([Selector, Root]) + ');', 'TExtDomAbstractQuery'); - Result := Self; -end; - -function TExtDomAbstractQuery.SelectNode(Selector : String; Root : String = '') : TExtFunction; begin - JSCode(JSName + '.selectNode(' + VarToJSON([Selector, Root]) + ');', 'TExtDomAbstractQuery'); - Result := Self; -end; - -function TExtDomElement_position.JSClassName : string; begin - Result := 'Ext.dom.Elementposition'; -end; - -{$IFDEF FPC}constructor TExtDomElement_position.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDomElement_position.Center(CenterIn : String) : TExtFunction; begin - JSCode(JSName + '.center(' + VarToJSON([CenterIn]) + ');', 'TExtDomElement_position'); - Result := Self; -end; - -function TExtDomElement_position.ClearPositioning(Value : String = '') : TExtFunction; begin - JSCode(JSName + '.clearPositioning(' + VarToJSON([Value]) + ');', 'TExtDomElement_position'); - Result := Self; -end; - -function TExtDomElement_position.GetLocalX : TExtFunction; begin - JSCode(JSName + '.getLocalX();', 'TExtDomElement_position'); - Result := Self; -end; - -function TExtDomElement_position.GetLocalXY : TExtFunction; begin - JSCode(JSName + '.getLocalXY();', 'TExtDomElement_position'); - Result := Self; -end; - -function TExtDomElement_position.GetLocalY : TExtFunction; begin - JSCode(JSName + '.getLocalY();', 'TExtDomElement_position'); - Result := Self; -end; - -function TExtDomElement_position.GetPositioning(AutoPx : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.getPositioning(' + VarToJSON([AutoPx]) + ');', 'TExtDomElement_position'); - Result := Self; -end; - -function TExtDomElement_position.GetX : TExtFunction; begin - JSCode(JSName + '.getX();', 'TExtDomElement_position'); - Result := Self; -end; - -function TExtDomElement_position.GetXY : TExtFunction; begin - JSCode(JSName + '.getXY();', 'TExtDomElement_position'); - Result := Self; -end; - -function TExtDomElement_position.GetY : TExtFunction; begin - JSCode(JSName + '.getY();', 'TExtDomElement_position'); - Result := Self; -end; - -function TExtDomElement_position.Position(Pos : String = ''; ZIndex : Integer = 0; X : Integer = 0; Y : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.position(' + VarToJSON([Pos, ZIndex, X, Y]) + ');', 'TExtDomElement_position'); - Result := Self; -end; - -function TExtDomElement_position.SetPositioning(PosCfg : TExtObject) : TExtFunction; begin - JSCode(JSName + '.setPositioning(' + VarToJSON([PosCfg, false]) + ');', 'TExtDomElement_position'); - Result := Self; -end; - function TExtDomElement_scroll.JSClassName : string; begin Result := 'Ext.dom.Elementscroll'; end; @@ -18194,403 +18655,305 @@ function TExtDomElement_scroll.SetScrollTop(Top : Integer) : TExtFunction; begin Result := Self; end; -function TExtDomElement_dd.JSClassName : string; begin - Result := 'Ext.dom.Elementdd'; +function TExtDomElement_style.JSClassName : string; begin + Result := 'Ext.dom.Elementstyle'; end; -{$IFDEF FPC}constructor TExtDomElement_dd.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtDomElement_style.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtDomElement_dd.InitDD(Group : String; Config : TExtObject; Overrides : TExtObject) : TExtFunction; begin - JSCode(JSName + '.initDD(' + VarToJSON([Group, Config, false, Overrides, false]) + ');', 'TExtDomElement_dd'); +function TExtDomElement_style.AddClsOnClick(ClassName : String; TestFn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.addClsOnClick(' + VarToJSON([ClassName, TestFn, true, Scope, false]) + ');', 'TExtDomElement_style'); Result := Self; end; -function TExtDomElement_dd.InitDDProxy(Group : String; Config : TExtObject; Overrides : TExtObject) : TExtFunction; begin - JSCode(JSName + '.initDDProxy(' + VarToJSON([Group, Config, false, Overrides, false]) + ');', 'TExtDomElement_dd'); +function TExtDomElement_style.AddClsOnFocus(ClassName : String; TestFn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.addClsOnFocus(' + VarToJSON([ClassName, TestFn, true, Scope, false]) + ');', 'TExtDomElement_style'); Result := Self; end; -function TExtDomElement_dd.InitDDTarget(Group : String; Config : TExtObject; Overrides : TExtObject) : TExtFunction; begin - JSCode(JSName + '.initDDTarget(' + VarToJSON([Group, Config, false, Overrides, false]) + ');', 'TExtDomElement_dd'); +function TExtDomElement_style.AddClsOnOver(ClassName : String; TestFn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.addClsOnOver(' + VarToJSON([ClassName, TestFn, true, Scope, false]) + ');', 'TExtDomElement_style'); Result := Self; end; -function TExtDomElement_fx.JSClassName : string; begin - Result := 'Ext.dom.Elementfx'; -end; - -{$IFDEF FPC}constructor TExtDomElement_fx.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDomElement_fx.Hide(Animate : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.hide(' + VarToJSON([Animate]) + ');', 'TExtDomElement_fx'); +function TExtDomElement_style.BoxWrap(ClassJS : String = '') : TExtFunction; begin + JSCode(JSName + '.boxWrap(' + VarToJSON([ClassJS]) + ');', 'TExtDomElement_style'); Result := Self; end; -function TExtDomElement_fx.SetDisplayed(Value : Boolean) : TExtFunction; begin - JSCode(JSName + '.setDisplayed(' + VarToJSON([Value]) + ');', 'TExtDomElement_fx'); +function TExtDomElement_style.ClearOpacity : TExtFunction; begin + JSCode(JSName + '.clearOpacity();', 'TExtDomElement_style'); Result := Self; end; -function TExtDomElement_fx.Show(Animate : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.show(' + VarToJSON([Animate]) + ');', 'TExtDomElement_fx'); +function TExtDomElement_style.Clip : TExtFunction; begin + JSCode(JSName + '.clip();', 'TExtDomElement_style'); Result := Self; end; -function TExtDomElement_fx.Toggle(Animate : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.toggle(' + VarToJSON([Animate]) + ');', 'TExtDomElement_fx'); +function TExtDomElement_style.GetColor(Attr : String; DefaultValue : String; Prefix : String = '') : TExtFunction; begin + JSCode(JSName + '.getColor(' + VarToJSON([Attr, DefaultValue, Prefix]) + ');', 'TExtDomElement_style'); Result := Self; end; -procedure TExtDirectTransaction.SetFProvider(Value : TExtDirectProvider); begin - FProvider := Value; - Value.DeleteFromGarbage; - JSCode('provider:' + VarToJSON([Value, false])); -end; - -function TExtDirectTransaction.JSClassName : string; begin - Result := 'Ext.direct.Transaction'; -end; - -procedure TExtDirectTransaction.InitDefaults; begin - inherited; - FProvider := TExtDirectProvider.CreateInternal(Self, 'provider'); -end; - -{$IFDEF FPC}constructor TExtDirectTransaction.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtDirectTransaction.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; -end; - -destructor TExtDirectTransaction.Destroy; begin - try - FProvider.Free; - except end; - inherited; -end; - -procedure TExtDomAbstractElement.SetFDefaultUnit(Value : String); begin - FDefaultUnit := Value; - JSCode(JSName + '.defaultUnit=' + VarToJSON([Value]) + ';'); -end; - -procedure TExtDomAbstractElement.SetFDom(Value : THTMLElement); begin - FDom := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.dom=' + VarToJSON([Value, false]) + ';'); -end; - -procedure TExtDomAbstractElement.SetFId(Value : String); begin - FId := Value; - JSCode(JSName + '.id=' + VarToJSON([Value]) + ';'); -end; - -procedure TExtDomAbstractElement.SetFIsFly(Value : Boolean); begin - FIsFly := Value; - JSCode(JSName + '.isFly=' + VarToJSON([Value]) + ';'); -end; - -function TExtDomAbstractElement.JSClassName : string; begin - Result := 'Ext.dom.AbstractElement'; -end; - -{$IFDEF FPC}constructor TExtDomAbstractElement.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDomAbstractElement.Fly(Dom : String; Named : String = '') : TExtFunction; begin - JSCode(JSName + '.fly(' + VarToJSON([Dom, Named]) + ');', 'TExtDomAbstractElement'); +function TExtDomElement_style.GetComputedHeight : TExtFunction; begin + JSCode(JSName + '.getComputedHeight();', 'TExtDomElement_style'); Result := Self; end; -procedure TExtDirectProvider.SetFHasListeners(Value : TExtObject); begin - FHasListeners := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.hasListeners=' + VarToJSON([Value, false]) + ';'); -end; - -procedure TExtDirectProvider.SetFId(Value : String); begin - FId := Value; - JSCode('id:' + VarToJSON([Value])); -end; - -procedure TExtDirectProvider.SetFIsObservable(Value : Boolean); begin - FIsObservable := Value; - JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); -end; - -procedure TExtDirectProvider.SetFListeners(Value : TExtObject); begin - FListeners := Value; - Value.DeleteFromGarbage; - JSCode('listeners:' + VarToJSON([Value, false])); +function TExtDomElement_style.GetComputedWidth : TExtFunction; begin + JSCode(JSName + '.getComputedWidth();', 'TExtDomElement_style'); + Result := Self; end; -procedure TExtDirectProvider.SetFRelayedEvents(Value : TExtObjectList); begin - FRelayedEvents := Value; - Value.DeleteFromGarbage; - JSCode('relayedEvents:' + VarToJSON([Value, false])); +function TExtDomElement_style.GetFrameWidth(Sides : String) : TExtFunction; begin + JSCode(JSName + '.getFrameWidth(' + VarToJSON([Sides]) + ');', 'TExtDomElement_style'); + Result := Self; end; -procedure TExtDirectProvider.SetFOnConnect(Value : TExtDirectProviderOnConnect); begin - if Assigned(FOnConnect) then - JSCode(JSName+'.events ["connect"].listeners=[];'); - if Assigned(Value) then - AddListener('connect', Ajax('connect', ['Provider', '%0.nm'], true)); - FOnConnect := Value; +function TExtDomElement_style.GetStyleSize : TExtFunction; begin + JSCode(JSName + '.getStyleSize();', 'TExtDomElement_style'); + Result := Self; end; -procedure TExtDirectProvider.SetFOnData(Value : TExtDirectProviderOnData); begin - if Assigned(FOnData) then - JSCode(JSName+'.events ["data"].listeners=[];'); - if Assigned(Value) then - AddListener('data', Ajax('data', ['Provider', '%0.nm','E', '%1.nm'], true)); - FOnData := Value; +function TExtDomElement_style.Selectable : TExtFunction; begin + JSCode(JSName + '.selectable();', 'TExtDomElement_style'); + Result := Self; end; -procedure TExtDirectProvider.SetFOnDisconnect(Value : TExtDirectProviderOnDisconnect); begin - if Assigned(FOnDisconnect) then - JSCode(JSName+'.events ["disconnect"].listeners=[];'); - if Assigned(Value) then - AddListener('disconnect', Ajax('disconnect', ['Provider', '%0.nm'], true)); - FOnDisconnect := Value; +function TExtDomElement_style.SetOpacity(Opacity : Integer; Animate : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.setOpacity(' + VarToJSON([Opacity, Animate]) + ');', 'TExtDomElement_style'); + Result := Self; end; -procedure TExtDirectProvider.SetFOnException(Value : TExtDirectProviderOnException); begin - if Assigned(FOnException) then - JSCode(JSName+'.events ["exception"].listeners=[];'); - if Assigned(Value) then - AddListener('exception', Ajax('exception', [], true)); - FOnException := Value; +function TExtDomElement_style.Unclip : TExtFunction; begin + JSCode(JSName + '.unclip();', 'TExtDomElement_style'); + Result := Self; end; -function TExtDirectProvider.JSClassName : string; begin - Result := 'Ext.direct.Provider'; +function TExtDomElement_style.Unselectable : TExtFunction; begin + JSCode(JSName + '.unselectable();', 'TExtDomElement_style'); + Result := Self; end; -procedure TExtDirectProvider.InitDefaults; begin - inherited; - FHasListeners := TExtObject.CreateInternal(Self, 'hasListeners'); - FListeners := TExtObject.CreateInternal(Self, 'listeners'); - FRelayedEvents := TExtObjectList.Create(Self, 'relayedEvents'); +function TExtDomElement_fx.JSClassName : string; begin + Result := 'Ext.dom.Elementfx'; end; -{$IFDEF FPC}constructor TExtDirectProvider.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDirectProvider.AddEvents(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtDirectProvider'); - Result := Self; -end; +{$IFDEF FPC}constructor TExtDomElement_fx.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtDirectProvider.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtDirectProvider'); +function TExtDomElement_fx.Hide(Animate : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.hide(' + VarToJSON([Animate]) + ');', 'TExtDomElement_fx'); Result := Self; end; -function TExtDirectProvider.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtDirectProvider'); +function TExtDomElement_fx.SetDisplayed(Value : Boolean) : TExtFunction; begin + JSCode(JSName + '.setDisplayed(' + VarToJSON([Value]) + ');', 'TExtDomElement_fx'); Result := Self; end; -function TExtDirectProvider.ClearListeners : TExtFunction; begin - JSCode(JSName + '.clearListeners();', 'TExtDirectProvider'); +function TExtDomElement_fx.Show(Animate : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.show(' + VarToJSON([Animate]) + ');', 'TExtDomElement_fx'); Result := Self; end; -function TExtDirectProvider.ClearManagedListeners : TExtFunction; begin - JSCode(JSName + '.clearManagedListeners();', 'TExtDirectProvider'); +function TExtDomElement_fx.Toggle(Animate : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.toggle(' + VarToJSON([Animate]) + ');', 'TExtDomElement_fx'); Result := Self; end; -constructor TExtDirectProvider.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +function TExtDomElement_position.JSClassName : string; begin + Result := 'Ext.dom.Elementposition'; end; -function TExtDirectProvider.EnableBubble(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtDirectProvider'); +{$IFDEF FPC}constructor TExtDomElement_position.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDomElement_position.Center(CenterIn : String) : TExtFunction; begin + JSCode(JSName + '.center(' + VarToJSON([CenterIn]) + ');', 'TExtDomElement_position'); Result := Self; end; -function TExtDirectProvider.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDirectProvider'); +function TExtDomElement_position.ClearPositioning(Value : String = '') : TExtFunction; begin + JSCode(JSName + '.clearPositioning(' + VarToJSON([Value]) + ');', 'TExtDomElement_position'); Result := Self; end; -function TExtDirectProvider.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDirectProvider'); +function TExtDomElement_position.GetLocalX : TExtFunction; begin + JSCode(JSName + '.getLocalX();', 'TExtDomElement_position'); Result := Self; end; -function TExtDirectProvider.HasListener(EventName : String) : TExtFunction; begin - JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtDirectProvider'); +function TExtDomElement_position.GetLocalXY : TExtFunction; begin + JSCode(JSName + '.getLocalXY();', 'TExtDomElement_position'); Result := Self; end; -function TExtDirectProvider.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin - JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtDirectProvider'); +function TExtDomElement_position.GetLocalY : TExtFunction; begin + JSCode(JSName + '.getLocalY();', 'TExtDomElement_position'); Result := Self; end; -function TExtDirectProvider.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtDirectProvider'); +function TExtDomElement_position.GetPositioning(AutoPx : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.getPositioning(' + VarToJSON([AutoPx]) + ');', 'TExtDomElement_position'); Result := Self; end; -function TExtDirectProvider.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtDirectProvider'); +function TExtDomElement_position.GetX : TExtFunction; begin + JSCode(JSName + '.getX();', 'TExtDomElement_position'); Result := Self; end; -function TExtDirectProvider.ResumeEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtDirectProvider'); +function TExtDomElement_position.GetXY : TExtFunction; begin + JSCode(JSName + '.getXY();', 'TExtDomElement_position'); Result := Self; end; -function TExtDirectProvider.ResumeEvents : TExtFunction; begin - JSCode(JSName + '.resumeEvents();', 'TExtDirectProvider'); +function TExtDomElement_position.GetY : TExtFunction; begin + JSCode(JSName + '.getY();', 'TExtDomElement_position'); Result := Self; end; -function TExtDirectProvider.SuspendEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtDirectProvider'); +function TExtDomElement_position.Position(Pos : String = ''; ZIndex : Integer = 0; X : Integer = 0; Y : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.position(' + VarToJSON([Pos, ZIndex, X, Y]) + ');', 'TExtDomElement_position'); Result := Self; end; -function TExtDirectProvider.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin - JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtDirectProvider'); +function TExtDomElement_position.SetPositioning(PosCfg : TExtObject) : TExtFunction; begin + JSCode(JSName + '.setPositioning(' + VarToJSON([PosCfg, false]) + ');', 'TExtDomElement_position'); Result := Self; end; -destructor TExtDirectProvider.Destroy; begin - try - FHasListeners.Free; - FListeners.Free; - FRelayedEvents.Free; - except end; - inherited; +procedure TExtDomAbstractElement.SetFDefaultUnit(Value : String); begin + FDefaultUnit := Value; + JSCode(JSName + '.defaultUnit=' + VarToJSON([Value]) + ';'); end; -procedure TExtDirectProvider.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'connect') and Assigned(FOnConnect) then - FOnConnect(TExtDirectProvider(ParamAsObject('Provider'))) - else if (AEvtName = 'data') and Assigned(FOnData) then - FOnData(TExtDirectProvider(ParamAsObject('Provider')), TExtDirectEvent(ParamAsObject('E'))) - else if (AEvtName = 'disconnect') and Assigned(FOnDisconnect) then - FOnDisconnect(TExtDirectProvider(ParamAsObject('Provider'))) - else if (AEvtName = 'exception') and Assigned(FOnException) then - FOnException(); +procedure TExtDomAbstractElement.SetFDom(Value : THTMLElement); begin + FDom := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.dom=' + VarToJSON([Value, false]) + ';'); end; -function TExtDirectRemotingMethod.JSClassName : string; begin - Result := 'Ext.direct.RemotingMethod'; +procedure TExtDomAbstractElement.SetFId(Value : String); begin + FId := Value; + JSCode(JSName + '.id=' + VarToJSON([Value]) + ';'); end; -{$IFDEF FPC}constructor TExtDirectRemotingMethod.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDirectRemotingMethod.GetCallData(Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.getCallData(' + VarToJSON(Args) + ');', 'TExtDirectRemotingMethod'); - Result := Self; +procedure TExtDomAbstractElement.SetFIsFly(Value : Boolean); begin + FIsFly := Value; + JSCode(JSName + '.isFly=' + VarToJSON([Value]) + ';'); end; -function TExtDomAbstractElement_style.JSClassName : string; begin - Result := 'Ext.dom.AbstractElementstyle'; +function TExtDomAbstractElement.JSClassName : string; begin + Result := 'Ext.dom.AbstractElement'; end; -{$IFDEF FPC}constructor TExtDomAbstractElement_style.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtDomAbstractElement.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtDomAbstractElement_style.ApplyStyles(Styles : String) : TExtFunction; begin - JSCode(JSName + '.applyStyles(' + VarToJSON([Styles]) + ');', 'TExtDomAbstractElement_style'); +function TExtDomAbstractElement.Fly(Dom : String; Named : String = '') : TExtFunction; begin + JSCode(JSName + '.fly(' + VarToJSON([Dom, Named]) + ');', 'TExtDomAbstractElement'); Result := Self; end; -function TExtDomAbstractElement_style.GetBorderWidth(Side : String) : TExtFunction; begin - JSCode(JSName + '.getBorderWidth(' + VarToJSON([Side]) + ');', 'TExtDomAbstractElement_style'); - Result := Self; +function TExtDomAbstractElement_insertion.JSClassName : string; begin + Result := 'Ext.dom.AbstractElementinsertion'; end; -function TExtDomAbstractElement_style.GetHeight(ContentHeight : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.getHeight(' + VarToJSON([ContentHeight]) + ');', 'TExtDomAbstractElement_style'); +{$IFDEF FPC}constructor TExtDomAbstractElement_insertion.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDomAbstractElement_insertion.AppendChild(El : String; ReturnDom : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.appendChild(' + VarToJSON([El, ReturnDom]) + ');', 'TExtDomAbstractElement_insertion'); Result := Self; end; -function TExtDomAbstractElement_style.GetMargin(Sides : String = '') : TExtFunction; begin - JSCode(JSName + '.getMargin(' + VarToJSON([Sides]) + ');', 'TExtDomAbstractElement_style'); +function TExtDomAbstractElement_insertion.AppendTo(El : String) : TExtFunction; begin + JSCode(JSName + '.appendTo(' + VarToJSON([El]) + ');', 'TExtDomAbstractElement_insertion'); Result := Self; end; -function TExtDomAbstractElement_style.GetPadding(Side : String) : TExtFunction; begin - JSCode(JSName + '.getPadding(' + VarToJSON([Side]) + ');', 'TExtDomAbstractElement_style'); +function TExtDomAbstractElement_insertion.CreateChild(Config : TExtObject; InsertBefore : THTMLElement = nil; ReturnDom : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.createChild(' + VarToJSON([Config, false, InsertBefore, false, ReturnDom]) + ');', 'TExtDomAbstractElement_insertion'); Result := Self; end; -function TExtDomAbstractElement_style.GetSize(ContentSize : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.getSize(' + VarToJSON([ContentSize]) + ');', 'TExtDomAbstractElement_style'); +function TExtDomAbstractElement_insertion.InsertAfter(El : String) : TExtFunction; begin + JSCode(JSName + '.insertAfter(' + VarToJSON([El]) + ');', 'TExtDomAbstractElement_insertion'); Result := Self; end; -function TExtDomAbstractElement_style.GetStyle(PropertyJS : String; InlineJS : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.getStyle(' + VarToJSON([PropertyJS, InlineJS]) + ');', 'TExtDomAbstractElement_style'); +function TExtDomAbstractElement_insertion.InsertBefore(El : String) : TExtFunction; begin + JSCode(JSName + '.insertBefore(' + VarToJSON([El]) + ');', 'TExtDomAbstractElement_insertion'); Result := Self; end; -function TExtDomAbstractElement_style.GetViewSize : TExtFunction; begin - JSCode(JSName + '.getViewSize();', 'TExtDomAbstractElement_style'); +function TExtDomAbstractElement_insertion.InsertFirst(El : String) : TExtFunction; begin + JSCode(JSName + '.insertFirst(' + VarToJSON([El]) + ');', 'TExtDomAbstractElement_insertion'); Result := Self; end; -function TExtDomAbstractElement_style.GetWidth(ContentWidth : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.getWidth(' + VarToJSON([ContentWidth]) + ');', 'TExtDomAbstractElement_style'); +function TExtDomAbstractElement_insertion.InsertHtml(Where : String; Html : String; ReturnEl : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.insertHtml(' + VarToJSON([Where, Html, ReturnEl]) + ');', 'TExtDomAbstractElement_insertion'); Result := Self; end; -function TExtDomAbstractElement_style.IsStyle(Style : String; Value : String) : TExtFunction; begin - JSCode(JSName + '.isStyle(' + VarToJSON([Style, Value]) + ');', 'TExtDomAbstractElement_style'); +function TExtDomAbstractElement_insertion.InsertSibling(El : String; Where : String = ''; ReturnDom : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.insertSibling(' + VarToJSON([El, Where, ReturnDom]) + ');', 'TExtDomAbstractElement_insertion'); Result := Self; end; -function TExtDomAbstractElement_style.IsTransparent(Prop : String) : TExtFunction; begin - JSCode(JSName + '.isTransparent(' + VarToJSON([Prop]) + ');', 'TExtDomAbstractElement_style'); +function TExtDomAbstractElement_insertion.Replace(El : String) : TExtFunction; begin + JSCode(JSName + '.replace(' + VarToJSON([El]) + ');', 'TExtDomAbstractElement_insertion'); Result := Self; end; -function TExtDomAbstractElement_style.Mask(Msg : String = ''; MsgCls : String = '') : TExtFunction; begin - JSCode(JSName + '.mask(' + VarToJSON([Msg, MsgCls]) + ');', 'TExtDomAbstractElement_style'); +function TExtDomAbstractElement_insertion.ReplaceWith(El : String) : TExtFunction; begin + JSCode(JSName + '.replaceWith(' + VarToJSON([El]) + ');', 'TExtDomAbstractElement_insertion'); Result := Self; end; -function TExtDomAbstractElement_style.RadioCls(ClassName : String) : TExtFunction; begin - JSCode(JSName + '.radioCls(' + VarToJSON([ClassName]) + ');', 'TExtDomAbstractElement_style'); +function TExtDomAbstractElement_insertion.Wrap(Config : TExtObject = nil; ReturnDom : Boolean = false; Selector : String = '') : TExtFunction; begin + JSCode(JSName + '.wrap(' + VarToJSON([Config, false, ReturnDom, Selector]) + ');', 'TExtDomAbstractElement_insertion'); Result := Self; end; -function TExtDomAbstractElement_style.Repaint : TExtFunction; begin - JSCode(JSName + '.repaint();', 'TExtDomAbstractElement_style'); - Result := Self; +function TExtDirectRemotingMethod.JSClassName : string; begin + Result := 'Ext.direct.RemotingMethod'; end; -function TExtDomAbstractElement_style.SetHeight(Height : Integer) : TExtFunction; begin - JSCode(JSName + '.setHeight(' + VarToJSON([Height]) + ');', 'TExtDomAbstractElement_style'); +{$IFDEF FPC}constructor TExtDirectRemotingMethod.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDirectRemotingMethod.GetCallData(Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.getCallData(' + VarToJSON(Args) + ');', 'TExtDirectRemotingMethod'); Result := Self; end; -function TExtDomAbstractElement_style.SetSize(Width : Integer; Height : Integer) : TExtFunction; begin - JSCode(JSName + '.setSize(' + VarToJSON([Width, Height]) + ');', 'TExtDomAbstractElement_style'); - Result := Self; +procedure TExtDirectTransaction.SetFProvider(Value : TExtDirectProvider); begin + FProvider := Value; + Value.DeleteFromGarbage; + JSCode('provider:' + VarToJSON([Value, false])); end; -function TExtDomAbstractElement_style.SetStyle(PropertyJS : String; Value : String = '') : TExtFunction; begin - JSCode(JSName + '.setStyle(' + VarToJSON([PropertyJS, Value]) + ');', 'TExtDomAbstractElement_style'); - Result := Self; +function TExtDirectTransaction.JSClassName : string; begin + Result := 'Ext.direct.Transaction'; end; -function TExtDomAbstractElement_style.SetWidth(Width : Integer) : TExtFunction; begin - JSCode(JSName + '.setWidth(' + VarToJSON([Width]) + ');', 'TExtDomAbstractElement_style'); - Result := Self; +procedure TExtDirectTransaction.InitDefaults; begin + inherited; + FProvider := TExtDirectProvider.CreateInternal(Self, 'provider'); end; -function TExtDomAbstractElement_style.Unmask : TExtFunction; begin - JSCode(JSName + '.unmask();', 'TExtDomAbstractElement_style'); - Result := Self; +{$IFDEF FPC}constructor TExtDirectTransaction.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtDirectTransaction.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; +end; + +destructor TExtDirectTransaction.Destroy; begin + try + FProvider.Free; + except end; + inherited; end; function TExtDomAbstractElement_traversal.JSClassName : string; begin @@ -18659,64 +19022,54 @@ function TExtDomAbstractElement_traversal.Up(Selector : String; Limit : Integer Result := Self; end; -function TExtDomAbstractElement_insertion.JSClassName : string; begin - Result := 'Ext.dom.AbstractElementinsertion'; -end; - -{$IFDEF FPC}constructor TExtDomAbstractElement_insertion.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDomAbstractElement_insertion.AppendChild(El : String; ReturnDom : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.appendChild(' + VarToJSON([El, ReturnDom]) + ');', 'TExtDomAbstractElement_insertion'); - Result := Self; +function TExtDomAbstractHelper.JSClassName : string; begin + Result := 'Ext.dom.AbstractHelper'; end; -function TExtDomAbstractElement_insertion.AppendTo(El : String) : TExtFunction; begin - JSCode(JSName + '.appendTo(' + VarToJSON([El]) + ');', 'TExtDomAbstractElement_insertion'); - Result := Self; -end; +{$IFDEF FPC}constructor TExtDomAbstractHelper.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtDomAbstractElement_insertion.CreateChild(Config : TExtObject; InsertBefore : THTMLElement = nil; ReturnDom : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.createChild(' + VarToJSON([Config, false, InsertBefore, false, ReturnDom]) + ');', 'TExtDomAbstractElement_insertion'); +function TExtDomAbstractHelper.Append(El : String; O : String; ReturnElement : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.append(' + VarToJSON([El, O, ReturnElement]) + ');', 'TExtDomAbstractHelper'); Result := Self; end; -function TExtDomAbstractElement_insertion.InsertAfter(El : String) : TExtFunction; begin - JSCode(JSName + '.insertAfter(' + VarToJSON([El]) + ');', 'TExtDomAbstractElement_insertion'); +function TExtDomAbstractHelper.ApplyStyles(El : String; Styles : String) : TExtFunction; begin + JSCode(JSName + '.applyStyles(' + VarToJSON([El, Styles]) + ');', 'TExtDomAbstractHelper'); Result := Self; end; -function TExtDomAbstractElement_insertion.InsertBefore(El : String) : TExtFunction; begin - JSCode(JSName + '.insertBefore(' + VarToJSON([El]) + ');', 'TExtDomAbstractElement_insertion'); +function TExtDomAbstractHelper.GenerateStyles(Styles : TExtObject; Buffer : TExtObjectList = nil) : TExtFunction; begin + JSCode(JSName + '.generateStyles(' + VarToJSON([Styles, false]) + ',' + VarToJSON(Buffer) + ');', 'TExtDomAbstractHelper'); Result := Self; end; -function TExtDomAbstractElement_insertion.InsertFirst(El : String) : TExtFunction; begin - JSCode(JSName + '.insertFirst(' + VarToJSON([El]) + ');', 'TExtDomAbstractElement_insertion'); +function TExtDomAbstractHelper.InsertAfter(El : String; O : TExtObject; ReturnElement : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.insertAfter(' + VarToJSON([El, O, false, ReturnElement]) + ');', 'TExtDomAbstractHelper'); Result := Self; end; -function TExtDomAbstractElement_insertion.InsertHtml(Where : String; Html : String; ReturnEl : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.insertHtml(' + VarToJSON([Where, Html, ReturnEl]) + ');', 'TExtDomAbstractElement_insertion'); +function TExtDomAbstractHelper.InsertBefore(El : String; O : String; ReturnElement : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.insertBefore(' + VarToJSON([El, O, ReturnElement]) + ');', 'TExtDomAbstractHelper'); Result := Self; end; -function TExtDomAbstractElement_insertion.InsertSibling(El : String; Where : String = ''; ReturnDom : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.insertSibling(' + VarToJSON([El, Where, ReturnDom]) + ');', 'TExtDomAbstractElement_insertion'); +function TExtDomAbstractHelper.InsertFirst(El : String; O : String; ReturnElement : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.insertFirst(' + VarToJSON([El, O, ReturnElement]) + ');', 'TExtDomAbstractHelper'); Result := Self; end; -function TExtDomAbstractElement_insertion.Replace(El : String) : TExtFunction; begin - JSCode(JSName + '.replace(' + VarToJSON([El]) + ');', 'TExtDomAbstractElement_insertion'); +function TExtDomAbstractHelper.InsertHtml(Where : String; El : THTMLElement; Html : String) : TExtFunction; begin + JSCode(JSName + '.insertHtml(' + VarToJSON([Where, El, false, Html]) + ');', 'TExtDomAbstractHelper'); Result := Self; end; -function TExtDomAbstractElement_insertion.ReplaceWith(El : String) : TExtFunction; begin - JSCode(JSName + '.replaceWith(' + VarToJSON([El]) + ');', 'TExtDomAbstractElement_insertion'); +function TExtDomAbstractHelper.Markup(Spec : TExtObject) : TExtFunction; begin + JSCode(JSName + '.markup(' + VarToJSON([Spec, false]) + ');', 'TExtDomAbstractHelper'); Result := Self; end; -function TExtDomAbstractElement_insertion.Wrap(Config : TExtObject = nil; ReturnDom : Boolean = false; Selector : String = '') : TExtFunction; begin - JSCode(JSName + '.wrap(' + VarToJSON([Config, false, ReturnDom, Selector]) + ');', 'TExtDomAbstractElement_insertion'); +function TExtDomAbstractHelper.Overwrite(El : String; O : String; ReturnElement : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.overwrite(' + VarToJSON([El, O, ReturnElement]) + ');', 'TExtDomAbstractHelper'); Result := Self; end; @@ -18791,114 +19144,104 @@ function TExtDomAbstractElement_static.UnitizeBox(Box : Integer; Units : String) Result := Self; end; -procedure TExtEventObjectImplSingleton.SetFAltKey(Value : Boolean); begin - FAltKey := Value; - JSCode(JSName + '.altKey=' + VarToJSON([Value]) + ';'); -end; - -procedure TExtEventObjectImplSingleton.SetFCtrlKey(Value : Boolean); begin - FCtrlKey := Value; - JSCode(JSName + '.ctrlKey=' + VarToJSON([Value]) + ';'); +function TExtDomAbstractElement_style.JSClassName : string; begin + Result := 'Ext.dom.AbstractElementstyle'; end; -procedure TExtEventObjectImplSingleton.SetFShiftKey(Value : Boolean); begin - FShiftKey := Value; - JSCode(JSName + '.shiftKey=' + VarToJSON([Value]) + ';'); -end; +{$IFDEF FPC}constructor TExtDomAbstractElement_style.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtEventObjectImplSingleton.JSClassName : string; begin - Result := 'Ext.EventObjectImpl'; +function TExtDomAbstractElement_style.ApplyStyles(Styles : String) : TExtFunction; begin + JSCode(JSName + '.applyStyles(' + VarToJSON([Styles]) + ');', 'TExtDomAbstractElement_style'); + Result := Self; end; -{$IFDEF FPC}constructor TExtEventObjectImplSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtEventObjectImplSingleton.CorrectWheelDelta(Delta : Integer) : TExtFunction; begin - JSCode(JSName + '.correctWheelDelta(' + VarToJSON([Delta]) + ');', 'TExtEventObjectImplSingleton'); +function TExtDomAbstractElement_style.GetBorderWidth(Side : String) : TExtFunction; begin + JSCode(JSName + '.getBorderWidth(' + VarToJSON([Side]) + ');', 'TExtDomAbstractElement_style'); Result := Self; end; -function TExtEventObjectImplSingleton.GetCharCode : TExtFunction; begin - JSCode(JSName + '.getCharCode();', 'TExtEventObjectImplSingleton'); +function TExtDomAbstractElement_style.GetHeight(ContentHeight : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.getHeight(' + VarToJSON([ContentHeight]) + ');', 'TExtDomAbstractElement_style'); Result := Self; end; -function TExtEventObjectImplSingleton.GetKey : TExtFunction; begin - JSCode(JSName + '.getKey();', 'TExtEventObjectImplSingleton'); +function TExtDomAbstractElement_style.GetMargin(Sides : String = '') : TExtFunction; begin + JSCode(JSName + '.getMargin(' + VarToJSON([Sides]) + ');', 'TExtDomAbstractElement_style'); Result := Self; end; -function TExtEventObjectImplSingleton.GetPoint : TExtFunction; begin - JSCode(JSName + '.getPoint();', 'TExtEventObjectImplSingleton'); +function TExtDomAbstractElement_style.GetPadding(Side : String) : TExtFunction; begin + JSCode(JSName + '.getPadding(' + VarToJSON([Side]) + ');', 'TExtDomAbstractElement_style'); Result := Self; end; -function TExtEventObjectImplSingleton.GetRelatedTarget(Selector : String = ''; MaxDepth : Integer = 0; ReturnEl : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.getRelatedTarget(' + VarToJSON([Selector, MaxDepth, ReturnEl]) + ');', 'TExtEventObjectImplSingleton'); +function TExtDomAbstractElement_style.GetSize(ContentSize : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.getSize(' + VarToJSON([ContentSize]) + ');', 'TExtDomAbstractElement_style'); Result := Self; end; -function TExtEventObjectImplSingleton.GetTarget(Selector : String = ''; MaxDepth : Integer = 0; ReturnEl : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.getTarget(' + VarToJSON([Selector, MaxDepth, ReturnEl]) + ');', 'TExtEventObjectImplSingleton'); +function TExtDomAbstractElement_style.GetStyle(PropertyJS : String; InlineJS : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.getStyle(' + VarToJSON([PropertyJS, InlineJS]) + ');', 'TExtDomAbstractElement_style'); Result := Self; end; -function TExtEventObjectImplSingleton.GetWheelDelta : TExtFunction; begin - JSCode(JSName + '.getWheelDelta();', 'TExtEventObjectImplSingleton'); +function TExtDomAbstractElement_style.GetViewSize : TExtFunction; begin + JSCode(JSName + '.getViewSize();', 'TExtDomAbstractElement_style'); Result := Self; end; -function TExtEventObjectImplSingleton.GetWheelDeltas : TExtFunction; begin - JSCode(JSName + '.getWheelDeltas();', 'TExtEventObjectImplSingleton'); +function TExtDomAbstractElement_style.GetWidth(ContentWidth : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.getWidth(' + VarToJSON([ContentWidth]) + ');', 'TExtDomAbstractElement_style'); Result := Self; end; -function TExtEventObjectImplSingleton.GetX : TExtFunction; begin - JSCode(JSName + '.getX();', 'TExtEventObjectImplSingleton'); +function TExtDomAbstractElement_style.IsStyle(Style : String; Value : String) : TExtFunction; begin + JSCode(JSName + '.isStyle(' + VarToJSON([Style, Value]) + ');', 'TExtDomAbstractElement_style'); Result := Self; end; -function TExtEventObjectImplSingleton.GetXY : TExtFunction; begin - JSCode(JSName + '.getXY();', 'TExtEventObjectImplSingleton'); +function TExtDomAbstractElement_style.IsTransparent(Prop : String) : TExtFunction; begin + JSCode(JSName + '.isTransparent(' + VarToJSON([Prop]) + ');', 'TExtDomAbstractElement_style'); Result := Self; end; -function TExtEventObjectImplSingleton.GetY : TExtFunction; begin - JSCode(JSName + '.getY();', 'TExtEventObjectImplSingleton'); +function TExtDomAbstractElement_style.Mask(Msg : String = ''; MsgCls : String = '') : TExtFunction; begin + JSCode(JSName + '.mask(' + VarToJSON([Msg, MsgCls]) + ');', 'TExtDomAbstractElement_style'); Result := Self; end; -function TExtEventObjectImplSingleton.HasModifier : TExtFunction; begin - JSCode(JSName + '.hasModifier();', 'TExtEventObjectImplSingleton'); +function TExtDomAbstractElement_style.RadioCls(ClassName : String) : TExtFunction; begin + JSCode(JSName + '.radioCls(' + VarToJSON([ClassName]) + ');', 'TExtDomAbstractElement_style'); Result := Self; end; -function TExtEventObjectImplSingleton.IsNavKeyPress : TExtFunction; begin - JSCode(JSName + '.isNavKeyPress();', 'TExtEventObjectImplSingleton'); +function TExtDomAbstractElement_style.Repaint : TExtFunction; begin + JSCode(JSName + '.repaint();', 'TExtDomAbstractElement_style'); Result := Self; end; -function TExtEventObjectImplSingleton.IsSpecialKey : TExtFunction; begin - JSCode(JSName + '.isSpecialKey();', 'TExtEventObjectImplSingleton'); +function TExtDomAbstractElement_style.SetHeight(Height : Integer) : TExtFunction; begin + JSCode(JSName + '.setHeight(' + VarToJSON([Height]) + ');', 'TExtDomAbstractElement_style'); Result := Self; end; -function TExtEventObjectImplSingleton.PreventDefault : TExtFunction; begin - JSCode(JSName + '.preventDefault();', 'TExtEventObjectImplSingleton'); +function TExtDomAbstractElement_style.SetSize(Width : Integer; Height : Integer) : TExtFunction; begin + JSCode(JSName + '.setSize(' + VarToJSON([Width, Height]) + ');', 'TExtDomAbstractElement_style'); Result := Self; end; -function TExtEventObjectImplSingleton.StopEvent : TExtFunction; begin - JSCode(JSName + '.stopEvent();', 'TExtEventObjectImplSingleton'); +function TExtDomAbstractElement_style.SetStyle(PropertyJS : String; Value : String = '') : TExtFunction; begin + JSCode(JSName + '.setStyle(' + VarToJSON([PropertyJS, Value]) + ');', 'TExtDomAbstractElement_style'); Result := Self; end; -function TExtEventObjectImplSingleton.StopPropagation : TExtFunction; begin - JSCode(JSName + '.stopPropagation();', 'TExtEventObjectImplSingleton'); +function TExtDomAbstractElement_style.SetWidth(Width : Integer) : TExtFunction; begin + JSCode(JSName + '.setWidth(' + VarToJSON([Width]) + ');', 'TExtDomAbstractElement_style'); Result := Self; end; -function TExtEventObjectImplSingleton.Within(El : String; Related : Boolean = false; AllowEl : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.within(' + VarToJSON([El, Related, AllowEl]) + ');', 'TExtEventObjectImplSingleton'); +function TExtDomAbstractElement_style.Unmask : TExtFunction; begin + JSCode(JSName + '.unmask();', 'TExtDomAbstractElement_style'); Result := Self; end; @@ -19109,166 +19452,27 @@ procedure TExtFocusManagerSingleton.HandleEvent(const AEvtName : string); begin FOnEnable(TExtFocusManager(ParamAsObject('Fm'))); end; -procedure TExtDrawSurface.SetFHasListeners(Value : TExtObject); begin - FHasListeners := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.hasListeners=' + VarToJSON([Value, false]) + ';'); -end; - -procedure TExtDrawSurface.SetFHeight(Value : Integer); begin - FHeight := Value; - JSCode('height:' + VarToJSON([Value])); -end; - -procedure TExtDrawSurface.SetFIsObservable(Value : Boolean); begin - FIsObservable := Value; - JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); -end; - -procedure TExtDrawSurface.SetFItems(Value : TExtObjectList); begin - FItems := Value; - Value.DeleteFromGarbage; - JSCode('items:' + VarToJSON([Value, false])); -end; - -procedure TExtDrawSurface.SetFListeners(Value : TExtObject); begin - FListeners := Value; - Value.DeleteFromGarbage; - JSCode('listeners:' + VarToJSON([Value, false])); -end; - -procedure TExtDrawSurface.SetFWidth(Value : Integer); begin - FWidth := Value; - JSCode('width:' + VarToJSON([Value])); -end; - -function TExtDrawSurface.JSClassName : string; begin - Result := 'Ext.draw.Surface'; -end; - -procedure TExtDrawSurface.InitDefaults; begin - inherited; - FHasListeners := TExtObject.CreateInternal(Self, 'hasListeners'); - FItems := TExtObjectList.Create(Self, 'items'); - FListeners := TExtObject.CreateInternal(Self, 'listeners'); -end; - -{$IFDEF FPC}constructor TExtDrawSurface.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDrawSurface.AddEvents(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtDrawSurface'); - Result := Self; -end; - -function TExtDrawSurface.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtDrawSurface'); - Result := Self; -end; - -function TExtDrawSurface.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtDrawSurface'); - Result := Self; -end; - -function TExtDrawSurface.ClearListeners : TExtFunction; begin - JSCode(JSName + '.clearListeners();', 'TExtDrawSurface'); - Result := Self; +function TExtFoo.JSClassName : string; begin + Result := 'Ext.Foo'; end; -function TExtDrawSurface.ClearManagedListeners : TExtFunction; begin - JSCode(JSName + '.clearManagedListeners();', 'TExtDrawSurface'); - Result := Self; -end; +{$IFDEF FPC}constructor TExtFoo.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtDrawSurface.Create; begin - CreateVar(JSClassName + '({});'); +constructor TExtFoo.Create(Config : String); begin + CreateVar(JSClassName + '(' + VarToJSON([Config]) + ');'); InitDefaults; end; -function TExtDrawSurface.EnableBubble(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtDrawSurface'); - Result := Self; -end; - -function TExtDrawSurface.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDrawSurface'); - Result := Self; -end; - -function TExtDrawSurface.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDrawSurface'); - Result := Self; -end; - -function TExtDrawSurface.GetGroup(Id : String) : TExtFunction; begin - JSCode(JSName + '.getGroup(' + VarToJSON([Id]) + ');', 'TExtDrawSurface'); - Result := Self; -end; - -function TExtDrawSurface.HasListener(EventName : String) : TExtFunction; begin - JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtDrawSurface'); - Result := Self; -end; - -function TExtDrawSurface.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin - JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtDrawSurface'); - Result := Self; -end; - -function TExtDrawSurface.Remove(Sprite : TExtDrawSprite; DestroySprite : Boolean) : TExtFunction; begin - JSCode(JSName + '.remove(' + VarToJSON([Sprite, false, DestroySprite]) + ');', 'TExtDrawSurface'); - Result := Self; -end; - -function TExtDrawSurface.RemoveAll(DestroySprites : Boolean) : TExtFunction; begin - JSCode(JSName + '.removeAll(' + VarToJSON([DestroySprites]) + ');', 'TExtDrawSurface'); - Result := Self; -end; - -function TExtDrawSurface.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtDrawSurface'); - Result := Self; -end; - -function TExtDrawSurface.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtDrawSurface'); - Result := Self; -end; - -function TExtDrawSurface.ResumeEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtDrawSurface'); - Result := Self; -end; - -function TExtDrawSurface.ResumeEvents : TExtFunction; begin - JSCode(JSName + '.resumeEvents();', 'TExtDrawSurface'); - Result := Self; -end; - -function TExtDrawSurface.SetSize(W : Integer; H : Integer) : TExtFunction; begin - JSCode(JSName + '.setSize(' + VarToJSON([W, H]) + ');', 'TExtDrawSurface'); - Result := Self; -end; - -function TExtDrawSurface.SuspendEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtDrawSurface'); +function TExtFoo.Handle(Err : TExtError) : TExtFunction; begin + JSCode(JSName + '.handle(' + VarToJSON([Err, false]) + ');', 'TExtFoo'); Result := Self; end; -function TExtDrawSurface.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin - JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtDrawSurface'); +function TExtFoo.ToString : TExtFunction; begin + JSCode(JSName + '.toString();', 'TExtFoo'); Result := Self; end; -destructor TExtDrawSurface.Destroy; begin - try - FHasListeners.Free; - FItems.Free; - FListeners.Free; - except end; - inherited; -end; - procedure TExtElementLoader.SetFAjaxOptions(Value : TExtObject); begin FAjaxOptions := Value; Value.DeleteFromGarbage; @@ -19569,149 +19773,115 @@ procedure TExtElementLoader.HandleEvent(const AEvtName : string); begin FOnLoad(TExtElementLoader(ParamAsObject('This')), TExtObject(ParamAsObject('Response')), TExtObject(ParamAsObject('Options'))); end; -procedure TExtFormField.SetFDisabled(Value : Boolean); begin - FDisabled := Value; - JSCode('disabled:' + VarToJSON([Value])); -end; - -procedure TExtFormField.SetFName(Value : String); begin - FName := Value; - JSCode('name:' + VarToJSON([Value])); -end; - -procedure TExtFormField.SetFOriginalValue(Value : TExtObject); begin - FOriginalValue := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.originalValue=' + VarToJSON([Value, false]) + ';'); -end; - -procedure TExtFormField.SetFSubmitValue(Value : Boolean); begin - FSubmitValue := Value; - JSCode('submitValue:' + VarToJSON([Value])); -end; - -procedure TExtFormField.SetFValidateOnChange(Value : Boolean); begin - FValidateOnChange := Value; - JSCode('validateOnChange:' + VarToJSON([Value])); +procedure TExtEventObjectImplSingleton.SetFAltKey(Value : Boolean); begin + FAltKey := Value; + JSCode(JSName + '.altKey=' + VarToJSON([Value]) + ';'); end; -procedure TExtFormField.SetFValue(Value : TExtObject); begin - FValue := Value; - Value.DeleteFromGarbage; - if not ConfigAvailable(JSName) then - SetValue(Value) - else - JSCode('value:' + VarToJSON([Value, false])); +procedure TExtEventObjectImplSingleton.SetFCtrlKey(Value : Boolean); begin + FCtrlKey := Value; + JSCode(JSName + '.ctrlKey=' + VarToJSON([Value]) + ';'); end; -function TExtFormField.JSClassName : string; begin - Result := 'Ext.form.field.Field'; +procedure TExtEventObjectImplSingleton.SetFShiftKey(Value : Boolean); begin + FShiftKey := Value; + JSCode(JSName + '.shiftKey=' + VarToJSON([Value]) + ';'); end; -procedure TExtFormField.InitDefaults; begin - inherited; - FOriginalValue := TExtObject.CreateInternal(Self, 'originalValue'); - FValue := TExtObject.CreateInternal(Self, 'value'); +function TExtEventObjectImplSingleton.JSClassName : string; begin + Result := 'Ext.EventObjectImpl'; end; -{$IFDEF FPC}constructor TExtFormField.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtEventObjectImplSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtFormField.BatchChanges(Fn : TExtObject) : TExtFunction; begin - JSCode(JSName + '.batchChanges(' + VarToJSON([Fn, false]) + ');', 'TExtFormField'); +function TExtEventObjectImplSingleton.CorrectWheelDelta(Delta : Integer) : TExtFunction; begin + JSCode(JSName + '.correctWheelDelta(' + VarToJSON([Delta]) + ');', 'TExtEventObjectImplSingleton'); Result := Self; end; -function TExtFormField.CheckChange : TExtFunction; begin - JSCode(JSName + '.checkChange();', 'TExtFormField'); +function TExtEventObjectImplSingleton.GetCharCode : TExtFunction; begin + JSCode(JSName + '.getCharCode();', 'TExtEventObjectImplSingleton'); Result := Self; end; -function TExtFormField.CheckDirty : TExtFunction; begin - JSCode(JSName + '.checkDirty();', 'TExtFormField'); +function TExtEventObjectImplSingleton.GetKey : TExtFunction; begin + JSCode(JSName + '.getKey();', 'TExtEventObjectImplSingleton'); Result := Self; end; -constructor TExtFormField.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; -end; - -function TExtFormField.ExtractFileInput : TExtFunction; begin - JSCode(JSName + '.extractFileInput();', 'TExtFormField'); +function TExtEventObjectImplSingleton.GetPoint : TExtFunction; begin + JSCode(JSName + '.getPoint();', 'TExtEventObjectImplSingleton'); Result := Self; end; -function TExtFormField.GetErrors(Value : TExtObject) : TExtFunction; begin - JSCode(JSName + '.getErrors(' + VarToJSON([Value, false]) + ');', 'TExtFormField'); +function TExtEventObjectImplSingleton.GetRelatedTarget(Selector : String = ''; MaxDepth : Integer = 0; ReturnEl : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.getRelatedTarget(' + VarToJSON([Selector, MaxDepth, ReturnEl]) + ');', 'TExtEventObjectImplSingleton'); Result := Self; end; -function TExtFormField.GetModelData : TExtFunction; begin - JSCode(JSName + '.getModelData();', 'TExtFormField'); +function TExtEventObjectImplSingleton.GetTarget(Selector : String = ''; MaxDepth : Integer = 0; ReturnEl : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.getTarget(' + VarToJSON([Selector, MaxDepth, ReturnEl]) + ');', 'TExtEventObjectImplSingleton'); Result := Self; end; -function TExtFormField.GetName : TExtFunction; begin - JSCode(JSName + '.getName();', 'TExtFormField'); +function TExtEventObjectImplSingleton.GetWheelDelta : TExtFunction; begin + JSCode(JSName + '.getWheelDelta();', 'TExtEventObjectImplSingleton'); Result := Self; end; -function TExtFormField.GetSubmitData : TExtFunction; begin - JSCode(JSName + '.getSubmitData();', 'TExtFormField'); +function TExtEventObjectImplSingleton.GetWheelDeltas : TExtFunction; begin + JSCode(JSName + '.getWheelDeltas();', 'TExtEventObjectImplSingleton'); Result := Self; end; -function TExtFormField.GetValue : TExtFunction; begin - JSCode(JSName + '.getValue();', 'TExtFormField'); +function TExtEventObjectImplSingleton.GetX : TExtFunction; begin + JSCode(JSName + '.getX();', 'TExtEventObjectImplSingleton'); Result := Self; end; -function TExtFormField.IsDirty : TExtFunction; begin - JSCode(JSName + '.isDirty();', 'TExtFormField'); +function TExtEventObjectImplSingleton.GetXY : TExtFunction; begin + JSCode(JSName + '.getXY();', 'TExtEventObjectImplSingleton'); Result := Self; end; -function TExtFormField.IsEqual(Value1 : TExtObject; Value2 : TExtObject) : TExtFunction; begin - JSCode(JSName + '.isEqual(' + VarToJSON([Value1, false, Value2, false]) + ');', 'TExtFormField'); +function TExtEventObjectImplSingleton.GetY : TExtFunction; begin + JSCode(JSName + '.getY();', 'TExtEventObjectImplSingleton'); Result := Self; end; -function TExtFormField.IsFileUpload : TExtFunction; begin - JSCode(JSName + '.isFileUpload();', 'TExtFormField'); +function TExtEventObjectImplSingleton.HasModifier : TExtFunction; begin + JSCode(JSName + '.hasModifier();', 'TExtEventObjectImplSingleton'); Result := Self; end; -function TExtFormField.IsValid : TExtFunction; begin - JSCode(JSName + '.isValid();', 'TExtFormField'); +function TExtEventObjectImplSingleton.IsNavKeyPress : TExtFunction; begin + JSCode(JSName + '.isNavKeyPress();', 'TExtEventObjectImplSingleton'); Result := Self; end; -function TExtFormField.Reset : TExtFunction; begin - JSCode(JSName + '.reset();', 'TExtFormField'); +function TExtEventObjectImplSingleton.IsSpecialKey : TExtFunction; begin + JSCode(JSName + '.isSpecialKey();', 'TExtEventObjectImplSingleton'); Result := Self; end; -function TExtFormField.ResetOriginalValue : TExtFunction; begin - JSCode(JSName + '.resetOriginalValue();', 'TExtFormField'); +function TExtEventObjectImplSingleton.PreventDefault : TExtFunction; begin + JSCode(JSName + '.preventDefault();', 'TExtEventObjectImplSingleton'); Result := Self; end; -function TExtFormField.SetValue(Value : TExtObject) : TExtFunction; begin - JSCode(JSName + '.setValue(' + VarToJSON([Value, false]) + ');', 'TExtFormField'); +function TExtEventObjectImplSingleton.StopEvent : TExtFunction; begin + JSCode(JSName + '.stopEvent();', 'TExtEventObjectImplSingleton'); Result := Self; end; -function TExtFormField.Validate : TExtFunction; begin - JSCode(JSName + '.validate();', 'TExtFormField'); +function TExtEventObjectImplSingleton.StopPropagation : TExtFunction; begin + JSCode(JSName + '.stopPropagation();', 'TExtEventObjectImplSingleton'); Result := Self; end; -destructor TExtFormField.Destroy; begin - try - FOriginalValue.Free; - FValue.Free; - except end; - inherited; +function TExtEventObjectImplSingleton.Within(El : String; Related : Boolean = false; AllowEl : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.within(' + VarToJSON([El, Related, AllowEl]) + ');', 'TExtEventObjectImplSingleton'); + Result := Self; end; procedure TExtFormFieldAncestor.SetFFieldDefaults(Value : TExtObject); begin @@ -19767,24 +19937,89 @@ procedure TExtFormFieldAncestor.HandleEvent(const AEvtName : string); begin FOnFieldvaliditychange(TExtFormFieldAncestor(ParamAsObject('This')), TExtFormLabelable(ParamAsObject('The')), ParamAsString('IsValid')); end; -function TExtFoo.JSClassName : string; begin - Result := 'Ext.Foo'; +procedure TExtXTemplateParser.SetFLevel(Value : Integer); begin + FLevel := Value; + JSCode(JSName + '.level=' + VarToJSON([Value]) + ';'); end; -{$IFDEF FPC}constructor TExtFoo.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtXTemplateParser.JSClassName : string; begin + Result := 'Ext.XTemplateParser'; +end; -constructor TExtFoo.Create(Config : String); begin - CreateVar(JSClassName + '(' + VarToJSON([Config]) + ');'); - InitDefaults; +{$IFDEF FPC}constructor TExtXTemplateParser.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtXTemplateParser.DoCase(Action : String; Actions : TExtObject) : TExtFunction; begin + JSCode(JSName + '.// doCase(' + VarToJSON([Action, Actions, false]) + ');', 'TExtXTemplateParser'); + Result := Self; end; -function TExtFoo.Handle(Err : TExtError) : TExtFunction; begin - JSCode(JSName + '.handle(' + VarToJSON([Err, false]) + ');', 'TExtFoo'); +function TExtXTemplateParser.DoDefault : TExtFunction; begin + JSCode(JSName + '.// doDefault();', 'TExtXTemplateParser'); Result := Self; end; -function TExtFoo.ToString : TExtFunction; begin - JSCode(JSName + '.toString();', 'TExtFoo'); +function TExtXTemplateParser.DoElse : TExtFunction; begin + JSCode(JSName + '.// doElse();', 'TExtXTemplateParser'); + Result := Self; +end; + +function TExtXTemplateParser.DoElseIf(Action : String; Actions : TExtObject) : TExtFunction; begin + JSCode(JSName + '.// doElseIf(' + VarToJSON([Action, Actions, false]) + ');', 'TExtXTemplateParser'); + Result := Self; +end; + +function TExtXTemplateParser.DoEnd(TypeJS : String; Actions : TExtObject) : TExtFunction; begin + JSCode(JSName + '.// doEnd(' + VarToJSON([TypeJS, Actions, false]) + ');', 'TExtXTemplateParser'); + Result := Self; +end; + +function TExtXTemplateParser.DoEval(Text : String) : TExtFunction; begin + JSCode(JSName + '.// doEval(' + VarToJSON([Text]) + ');', 'TExtXTemplateParser'); + Result := Self; +end; + +function TExtXTemplateParser.DoExec(Action : String; Actions : TExtObject) : TExtFunction; begin + JSCode(JSName + '.// doExec(' + VarToJSON([Action, Actions, false]) + ');', 'TExtXTemplateParser'); + Result := Self; +end; + +function TExtXTemplateParser.DoExpr(Expr : String) : TExtFunction; begin + JSCode(JSName + '.// doExpr(' + VarToJSON([Expr]) + ');', 'TExtXTemplateParser'); + Result := Self; +end; + +function TExtXTemplateParser.DoFor(Action : String; Actions : TExtObject) : TExtFunction; begin + JSCode(JSName + '.// doFor(' + VarToJSON([Action, Actions, false]) + ');', 'TExtXTemplateParser'); + Result := Self; +end; + +function TExtXTemplateParser.DoForEach(Action : String; Actions : TExtObject) : TExtFunction; begin + JSCode(JSName + '.// doForEach(' + VarToJSON([Action, Actions, false]) + ');', 'TExtXTemplateParser'); + Result := Self; +end; + +function TExtXTemplateParser.DoIf(Action : String; Actions : TExtObject) : TExtFunction; begin + JSCode(JSName + '.// doIf(' + VarToJSON([Action, Actions, false]) + ');', 'TExtXTemplateParser'); + Result := Self; +end; + +function TExtXTemplateParser.DoSwitch(Action : String; Actions : TExtObject) : TExtFunction; begin + JSCode(JSName + '.// doSwitch(' + VarToJSON([Action, Actions, false]) + ');', 'TExtXTemplateParser'); + Result := Self; +end; + +function TExtXTemplateParser.DoTag : TExtFunction; begin + JSCode(JSName + '.// doTag();', 'TExtXTemplateParser'); + Result := Self; +end; + +function TExtXTemplateParser.DoText(Text : String) : TExtFunction; begin + JSCode(JSName + '.// doText(' + VarToJSON([Text]) + ');', 'TExtXTemplateParser'); + Result := Self; +end; + +function TExtXTemplateParser.DoTplExtEmptyFnParse : TExtFunction; begin + JSCode(JSName + '.doTpl: Ext.emptyFn, parse();', 'TExtXTemplateParser'); Result := Self; end; @@ -19917,87 +20152,156 @@ destructor TExtFormAction.Destroy; begin inherited; end; -procedure TExtDrawColor.SetFLightnessFactor(Value : Integer); begin - FLightnessFactor := Value; - JSCode('lightnessFactor:' + VarToJSON([Value])); +procedure TExtFormField.SetFDisabled(Value : Boolean); begin + FDisabled := Value; + JSCode('disabled:' + VarToJSON([Value])); end; -function TExtDrawColor.JSClassName : string; begin - Result := 'Ext.draw.Color'; +procedure TExtFormField.SetFIsFormField(Value : Boolean); begin + FIsFormField := Value; + JSCode(JSName + '.isFormField=' + VarToJSON([Value]) + ';'); end; -procedure TExtDrawColor.InitDefaults; begin +procedure TExtFormField.SetFName(Value : String); begin + FName := Value; + JSCode('name:' + VarToJSON([Value])); +end; + +procedure TExtFormField.SetFOriginalValue(Value : TExtObject); begin + FOriginalValue := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.originalValue=' + VarToJSON([Value, false]) + ';'); +end; + +procedure TExtFormField.SetFSubmitValue(Value : Boolean); begin + FSubmitValue := Value; + JSCode('submitValue:' + VarToJSON([Value])); +end; + +procedure TExtFormField.SetFValidateOnChange(Value : Boolean); begin + FValidateOnChange := Value; + JSCode('validateOnChange:' + VarToJSON([Value])); +end; + +procedure TExtFormField.SetFValue(Value : TExtObject); begin + FValue := Value; + Value.DeleteFromGarbage; + if not ConfigAvailable(JSName) then + SetValue(Value) + else + JSCode('value:' + VarToJSON([Value, false])); +end; + +function TExtFormField.JSClassName : string; begin + Result := 'Ext.form.field.Field'; +end; + +procedure TExtFormField.InitDefaults; begin inherited; - FLightnessFactor := 0; + FOriginalValue := TExtObject.CreateInternal(Self, 'originalValue'); + FValue := TExtObject.CreateInternal(Self, 'value'); end; -{$IFDEF FPC}constructor TExtDrawColor.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtFormField.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtDrawColor.Create; begin +function TExtFormField.BatchChanges(Fn : TExtObject) : TExtFunction; begin + JSCode(JSName + '.batchChanges(' + VarToJSON([Fn, false]) + ');', 'TExtFormField'); + Result := Self; +end; + +function TExtFormField.CheckChange : TExtFunction; begin + JSCode(JSName + '.checkChange();', 'TExtFormField'); + Result := Self; +end; + +function TExtFormField.CheckDirty : TExtFunction; begin + JSCode(JSName + '.checkDirty();', 'TExtFormField'); + Result := Self; +end; + +constructor TExtFormField.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -function TExtDrawColor.FromHSL(H : Integer; S : Integer; L : Integer) : TExtFunction; begin - JSCode(JSName + '.fromHSL(' + VarToJSON([H, S, L]) + ');', 'TExtDrawColor'); +function TExtFormField.ExtractFileInput : TExtFunction; begin + JSCode(JSName + '.extractFileInput();', 'TExtFormField'); Result := Self; end; -function TExtDrawColor.FromString(Str : String) : TExtFunction; begin - JSCode(JSName + '.fromString(' + VarToJSON([Str]) + ');', 'TExtDrawColor'); +function TExtFormField.GetErrors(Value : TExtObject) : TExtFunction; begin + JSCode(JSName + '.getErrors(' + VarToJSON([Value, false]) + ');', 'TExtFormField'); Result := Self; end; -function TExtDrawColor.GetBlue : TExtFunction; begin - JSCode(JSName + '.getBlue();', 'TExtDrawColor'); +function TExtFormField.GetModelData : TExtFunction; begin + JSCode(JSName + '.getModelData();', 'TExtFormField'); Result := Self; end; -function TExtDrawColor.GetDarker(Factor : Integer) : TExtFunction; begin - JSCode(JSName + '.getDarker(' + VarToJSON([Factor]) + ');', 'TExtDrawColor'); +function TExtFormField.GetName : TExtFunction; begin + JSCode(JSName + '.getName();', 'TExtFormField'); Result := Self; end; -function TExtDrawColor.GetGrayscale : TExtFunction; begin - JSCode(JSName + '.getGrayscale();', 'TExtDrawColor'); +function TExtFormField.GetSubmitData : TExtFunction; begin + JSCode(JSName + '.getSubmitData();', 'TExtFormField'); Result := Self; end; -function TExtDrawColor.GetGreen : TExtFunction; begin - JSCode(JSName + '.getGreen();', 'TExtDrawColor'); +function TExtFormField.GetValue : TExtFunction; begin + JSCode(JSName + '.getValue();', 'TExtFormField'); Result := Self; end; -function TExtDrawColor.GetHSL : TExtFunction; begin - JSCode(JSName + '.getHSL();', 'TExtDrawColor'); +function TExtFormField.IsDirty : TExtFunction; begin + JSCode(JSName + '.isDirty();', 'TExtFormField'); Result := Self; end; -function TExtDrawColor.GetLighter(Factor : Integer) : TExtFunction; begin - JSCode(JSName + '.getLighter(' + VarToJSON([Factor]) + ');', 'TExtDrawColor'); +function TExtFormField.IsEqual(Value1 : TExtObject; Value2 : TExtObject) : TExtFunction; begin + JSCode(JSName + '.isEqual(' + VarToJSON([Value1, false, Value2, false]) + ');', 'TExtFormField'); Result := Self; end; -function TExtDrawColor.GetRed : TExtFunction; begin - JSCode(JSName + '.getRed();', 'TExtDrawColor'); +function TExtFormField.IsFileUpload : TExtFunction; begin + JSCode(JSName + '.isFileUpload();', 'TExtFormField'); Result := Self; end; -function TExtDrawColor.GetRGB : TExtFunction; begin - JSCode(JSName + '.getRGB();', 'TExtDrawColor'); +function TExtFormField.IsValid : TExtFunction; begin + JSCode(JSName + '.isValid();', 'TExtFormField'); Result := Self; end; -function TExtDrawColor.ToHex(Color : String) : TExtFunction; begin - JSCode(JSName + '.toHex(' + VarToJSON([Color]) + ');', 'TExtDrawColor'); +function TExtFormField.Reset : TExtFunction; begin + JSCode(JSName + '.reset();', 'TExtFormField'); Result := Self; end; -function TExtDrawColor.ToString : TExtFunction; begin - JSCode(JSName + '.toString();', 'TExtDrawColor'); +function TExtFormField.ResetOriginalValue : TExtFunction; begin + JSCode(JSName + '.resetOriginalValue();', 'TExtFormField'); + Result := Self; +end; + +function TExtFormField.SetValue(Value : TExtObject) : TExtFunction; begin + JSCode(JSName + '.setValue(' + VarToJSON([Value, false]) + ');', 'TExtFormField'); Result := Self; end; +function TExtFormField.Validate : TExtFunction; begin + JSCode(JSName + '.validate();', 'TExtFormField'); + Result := Self; +end; + +destructor TExtFormField.Destroy; begin + try + FOriginalValue.Free; + FValue.Free; + except end; + inherited; +end; + procedure TExtDrawEngineImageExporterSingleton.SetFDefaultUrl(Value : String); begin FDefaultUrl := Value; JSCode(JSName + '.defaultUrl=' + VarToJSON([Value]) + ';'); @@ -20052,84 +20356,14 @@ destructor TExtDrawEngineImageExporterSingleton.Destroy; begin inherited; end; -function TExtDomElement_style.JSClassName : string; begin - Result := 'Ext.dom.Elementstyle'; -end; - -{$IFDEF FPC}constructor TExtDomElement_style.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDomElement_style.AddClsOnClick(ClassName : String; TestFn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.addClsOnClick(' + VarToJSON([ClassName, TestFn, true, Scope, false]) + ');', 'TExtDomElement_style'); - Result := Self; -end; - -function TExtDomElement_style.AddClsOnFocus(ClassName : String; TestFn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.addClsOnFocus(' + VarToJSON([ClassName, TestFn, true, Scope, false]) + ');', 'TExtDomElement_style'); - Result := Self; -end; - -function TExtDomElement_style.AddClsOnOver(ClassName : String; TestFn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.addClsOnOver(' + VarToJSON([ClassName, TestFn, true, Scope, false]) + ');', 'TExtDomElement_style'); - Result := Self; -end; - -function TExtDomElement_style.BoxWrap(ClassJS : String = '') : TExtFunction; begin - JSCode(JSName + '.boxWrap(' + VarToJSON([ClassJS]) + ');', 'TExtDomElement_style'); - Result := Self; -end; - -function TExtDomElement_style.ClearOpacity : TExtFunction; begin - JSCode(JSName + '.clearOpacity();', 'TExtDomElement_style'); - Result := Self; -end; - -function TExtDomElement_style.Clip : TExtFunction; begin - JSCode(JSName + '.clip();', 'TExtDomElement_style'); - Result := Self; -end; - -function TExtDomElement_style.GetColor(Attr : String; DefaultValue : String; Prefix : String = '') : TExtFunction; begin - JSCode(JSName + '.getColor(' + VarToJSON([Attr, DefaultValue, Prefix]) + ');', 'TExtDomElement_style'); - Result := Self; -end; - -function TExtDomElement_style.GetComputedHeight : TExtFunction; begin - JSCode(JSName + '.getComputedHeight();', 'TExtDomElement_style'); - Result := Self; -end; - -function TExtDomElement_style.GetComputedWidth : TExtFunction; begin - JSCode(JSName + '.getComputedWidth();', 'TExtDomElement_style'); - Result := Self; -end; - -function TExtDomElement_style.GetFrameWidth(Sides : String) : TExtFunction; begin - JSCode(JSName + '.getFrameWidth(' + VarToJSON([Sides]) + ');', 'TExtDomElement_style'); - Result := Self; -end; - -function TExtDomElement_style.GetStyleSize : TExtFunction; begin - JSCode(JSName + '.getStyleSize();', 'TExtDomElement_style'); - Result := Self; -end; - -function TExtDomElement_style.Selectable : TExtFunction; begin - JSCode(JSName + '.selectable();', 'TExtDomElement_style'); - Result := Self; -end; - -function TExtDomElement_style.SetOpacity(Opacity : Integer; Animate : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.setOpacity(' + VarToJSON([Opacity, Animate]) + ');', 'TExtDomElement_style'); - Result := Self; +function TExtDrawEngineSvgExporterSingleton.JSClassName : string; begin + Result := 'Ext.draw.engine.SvgExporter'; end; -function TExtDomElement_style.Unclip : TExtFunction; begin - JSCode(JSName + '.unclip();', 'TExtDomElement_style'); - Result := Self; -end; +{$IFDEF FPC}constructor TExtDrawEngineSvgExporterSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtDomElement_style.Unselectable : TExtFunction; begin - JSCode(JSName + '.unselectable();', 'TExtDomElement_style'); +function TExtDrawEngineSvgExporterSingleton.Generate(Surface : TExtDrawSurface; Config : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.generate(' + VarToJSON([Surface, false, Config, false]) + ');', 'TExtDrawEngineSvgExporterSingleton'); Result := Self; end; @@ -20220,19 +20454,84 @@ destructor TExtDomLayer.Destroy; begin inherited; end; -function TExtDrawSingleton.JSClassName : string; begin - Result := 'Ext.draw.Draw'; +procedure TExtDrawColor.SetFLightnessFactor(Value : Integer); begin + FLightnessFactor := Value; + JSCode('lightnessFactor:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtDrawSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtDrawColor.JSClassName : string; begin + Result := 'Ext.draw.Color'; +end; -function TExtDrawSingleton.SnapEndsByDate(From : TDateTime; ToJS : TDateTime; StepsMax : Integer; LockEnds : Boolean) : TExtFunction; begin - JSCode(JSName + '.snapEndsByDate(' + VarToJSON([From, ToJS, StepsMax, LockEnds]) + ');', 'TExtDrawSingleton'); +procedure TExtDrawColor.InitDefaults; begin + inherited; + FLightnessFactor := 0; +end; + +{$IFDEF FPC}constructor TExtDrawColor.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtDrawColor.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; +end; + +function TExtDrawColor.FromHSL(H : Integer; S : Integer; L : Integer) : TExtFunction; begin + JSCode(JSName + '.fromHSL(' + VarToJSON([H, S, L]) + ');', 'TExtDrawColor'); Result := Self; end; -function TExtDrawSingleton.SnapEndsByDateAndStep(From : TDateTime; ToJS : TDateTime; Step : TExtObjectList; LockEnds : Boolean) : TExtFunction; begin - JSCode(JSName + '.snapEndsByDateAndStep(' + VarToJSON([From, ToJS]) + ',' + VarToJSON(Step) + ',' + VarToJSON([LockEnds]) + ');', 'TExtDrawSingleton'); +function TExtDrawColor.FromString(Str : String) : TExtFunction; begin + JSCode(JSName + '.fromString(' + VarToJSON([Str]) + ');', 'TExtDrawColor'); + Result := Self; +end; + +function TExtDrawColor.GetBlue : TExtFunction; begin + JSCode(JSName + '.getBlue();', 'TExtDrawColor'); + Result := Self; +end; + +function TExtDrawColor.GetDarker(Factor : Integer) : TExtFunction; begin + JSCode(JSName + '.getDarker(' + VarToJSON([Factor]) + ');', 'TExtDrawColor'); + Result := Self; +end; + +function TExtDrawColor.GetGrayscale : TExtFunction; begin + JSCode(JSName + '.getGrayscale();', 'TExtDrawColor'); + Result := Self; +end; + +function TExtDrawColor.GetGreen : TExtFunction; begin + JSCode(JSName + '.getGreen();', 'TExtDrawColor'); + Result := Self; +end; + +function TExtDrawColor.GetHSL : TExtFunction; begin + JSCode(JSName + '.getHSL();', 'TExtDrawColor'); + Result := Self; +end; + +function TExtDrawColor.GetLighter(Factor : Integer) : TExtFunction; begin + JSCode(JSName + '.getLighter(' + VarToJSON([Factor]) + ');', 'TExtDrawColor'); + Result := Self; +end; + +function TExtDrawColor.GetRed : TExtFunction; begin + JSCode(JSName + '.getRed();', 'TExtDrawColor'); + Result := Self; +end; + +function TExtDrawColor.GetRGB : TExtFunction; begin + JSCode(JSName + '.getRGB();', 'TExtDrawColor'); + Result := Self; +end; + +function TExtDrawColor.ToHex(Color : String) : TExtFunction; begin + JSCode(JSName + '.toHex(' + VarToJSON([Color]) + ');', 'TExtDrawColor'); + Result := Self; +end; + +function TExtDrawColor.ToString : TExtFunction; begin + JSCode(JSName + '.toString();', 'TExtDrawColor'); Result := Self; end; @@ -20539,23 +20838,234 @@ destructor TExtDrawSprite.Destroy; begin inherited; end; -function TExtDrawEngineSvgExporterSingleton.JSClassName : string; begin - Result := 'Ext.draw.engine.SvgExporter'; +procedure TExtDrawSurface.SetFHasListeners(Value : TExtObject); begin + FHasListeners := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.hasListeners=' + VarToJSON([Value, false]) + ';'); end; -{$IFDEF FPC}constructor TExtDrawEngineSvgExporterSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtDrawSurface.SetFHeight(Value : Integer); begin + FHeight := Value; + JSCode('height:' + VarToJSON([Value])); +end; -function TExtDrawEngineSvgExporterSingleton.Generate(Surface : TExtDrawSurface; Config : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.generate(' + VarToJSON([Surface, false, Config, false]) + ');', 'TExtDrawEngineSvgExporterSingleton'); +procedure TExtDrawSurface.SetFIsObservable(Value : Boolean); begin + FIsObservable := Value; + JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); +end; + +procedure TExtDrawSurface.SetFItems(Value : TExtObjectList); begin + FItems := Value; + Value.DeleteFromGarbage; + JSCode('items:' + VarToJSON([Value, false])); +end; + +procedure TExtDrawSurface.SetFListeners(Value : TExtObject); begin + FListeners := Value; + Value.DeleteFromGarbage; + JSCode('listeners:' + VarToJSON([Value, false])); +end; + +procedure TExtDrawSurface.SetFWidth(Value : Integer); begin + FWidth := Value; + JSCode('width:' + VarToJSON([Value])); +end; + +function TExtDrawSurface.JSClassName : string; begin + Result := 'Ext.draw.Surface'; +end; + +procedure TExtDrawSurface.InitDefaults; begin + inherited; + FHasListeners := TExtObject.CreateInternal(Self, 'hasListeners'); + FItems := TExtObjectList.Create(Self, 'items'); + FListeners := TExtObject.CreateInternal(Self, 'listeners'); +end; + +{$IFDEF FPC}constructor TExtDrawSurface.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDrawSurface.AddEvents(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtDrawSurface'); + Result := Self; +end; + +function TExtDrawSurface.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtDrawSurface'); + Result := Self; +end; + +function TExtDrawSurface.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtDrawSurface'); + Result := Self; +end; + +function TExtDrawSurface.ClearListeners : TExtFunction; begin + JSCode(JSName + '.clearListeners();', 'TExtDrawSurface'); + Result := Self; +end; + +function TExtDrawSurface.ClearManagedListeners : TExtFunction; begin + JSCode(JSName + '.clearManagedListeners();', 'TExtDrawSurface'); + Result := Self; +end; + +constructor TExtDrawSurface.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; +end; + +function TExtDrawSurface.EnableBubble(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtDrawSurface'); + Result := Self; +end; + +function TExtDrawSurface.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDrawSurface'); + Result := Self; +end; + +function TExtDrawSurface.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDrawSurface'); Result := Self; end; +function TExtDrawSurface.GetGroup(Id : String) : TExtFunction; begin + JSCode(JSName + '.getGroup(' + VarToJSON([Id]) + ');', 'TExtDrawSurface'); + Result := Self; +end; + +function TExtDrawSurface.HasListener(EventName : String) : TExtFunction; begin + JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtDrawSurface'); + Result := Self; +end; + +function TExtDrawSurface.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin + JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtDrawSurface'); + Result := Self; +end; + +function TExtDrawSurface.Remove(Sprite : TExtDrawSprite; DestroySprite : Boolean) : TExtFunction; begin + JSCode(JSName + '.remove(' + VarToJSON([Sprite, false, DestroySprite]) + ');', 'TExtDrawSurface'); + Result := Self; +end; + +function TExtDrawSurface.RemoveAll(DestroySprites : Boolean) : TExtFunction; begin + JSCode(JSName + '.removeAll(' + VarToJSON([DestroySprites]) + ');', 'TExtDrawSurface'); + Result := Self; +end; + +function TExtDrawSurface.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtDrawSurface'); + Result := Self; +end; + +function TExtDrawSurface.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtDrawSurface'); + Result := Self; +end; + +function TExtDrawSurface.ResumeEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtDrawSurface'); + Result := Self; +end; + +function TExtDrawSurface.ResumeEvents : TExtFunction; begin + JSCode(JSName + '.resumeEvents();', 'TExtDrawSurface'); + Result := Self; +end; + +function TExtDrawSurface.SetSize(W : Integer; H : Integer) : TExtFunction; begin + JSCode(JSName + '.setSize(' + VarToJSON([W, H]) + ');', 'TExtDrawSurface'); + Result := Self; +end; + +function TExtDrawSurface.SuspendEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtDrawSurface'); + Result := Self; +end; + +function TExtDrawSurface.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin + JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtDrawSurface'); + Result := Self; +end; + +destructor TExtDrawSurface.Destroy; begin + try + FHasListeners.Free; + FItems.Free; + FListeners.Free; + except end; + inherited; +end; + function TExtDrawMatrix.JSClassName : string; begin Result := 'Ext.draw.Matrix'; end; {$IFDEF FPC}constructor TExtDrawMatrix.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtDrawSingleton.JSClassName : string; begin + Result := 'Ext.draw.Draw'; +end; + +{$IFDEF FPC}constructor TExtDrawSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDrawSingleton.SnapEndsByDate(From : TDateTime; ToJS : TDateTime; StepsMax : Integer; LockEnds : Boolean) : TExtFunction; begin + JSCode(JSName + '.snapEndsByDate(' + VarToJSON([From, ToJS, StepsMax, LockEnds]) + ');', 'TExtDrawSingleton'); + Result := Self; +end; + +function TExtDrawSingleton.SnapEndsByDateAndStep(From : TDateTime; ToJS : TDateTime; Step : TExtObjectList; LockEnds : Boolean) : TExtFunction; begin + JSCode(JSName + '.snapEndsByDateAndStep(' + VarToJSON([From, ToJS]) + ',' + VarToJSON(Step) + ',' + VarToJSON([LockEnds]) + ');', 'TExtDrawSingleton'); + Result := Self; +end; + +procedure TExtPanelProxy.SetFInsertProxy(Value : Boolean); begin + FInsertProxy := Value; + JSCode('insertProxy:' + VarToJSON([Value])); +end; + +procedure TExtPanelProxy.SetFMoveOnDrag(Value : Boolean); begin + FMoveOnDrag := Value; + JSCode('moveOnDrag:' + VarToJSON([Value])); +end; + +function TExtPanelProxy.JSClassName : string; begin + Result := 'Ext.panel.Proxy'; +end; + +{$IFDEF FPC}constructor TExtPanelProxy.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtPanelProxy.GetEl : TExtFunction; begin + JSCode(JSName + '.getEl();', 'TExtPanelProxy'); + Result := Self; +end; + +function TExtPanelProxy.GetGhost : TExtFunction; begin + JSCode(JSName + '.getGhost();', 'TExtPanelProxy'); + Result := Self; +end; + +function TExtPanelProxy.GetProxy : TExtFunction; begin + JSCode(JSName + '.getProxy();', 'TExtPanelProxy'); + Result := Self; +end; + +function TExtPanelProxy.Hide : TExtFunction; begin + JSCode(JSName + '.hide();', 'TExtPanelProxy'); + Result := Self; +end; + +function TExtPanelProxy.MoveProxy(ParentNode : THTMLElement; Before : THTMLElement = nil) : TExtFunction; begin + JSCode(JSName + '.moveProxy(' + VarToJSON([ParentNode, false, Before, false]) + ');', 'TExtPanelProxy'); + Result := Self; +end; + +function TExtPanelProxy.Show : TExtFunction; begin + JSCode(JSName + '.show();', 'TExtPanelProxy'); + Result := Self; +end; + function TExtShadowPoolSingleton.JSClassName : string; begin Result := 'Ext.ShadowPool'; end; @@ -20573,6 +21083,12 @@ procedure TExtSliderThumb.SetFSlider(Value : TExtSliderMultiSlider); begin JSCode('slider:' + VarToJSON([Value, false])); end; +procedure TExtSliderThumb.SetFSlider_(Value : TExtSliderMultiSlider); begin + FSlider_ := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.slider=' + VarToJSON([Value, false]) + ';'); +end; + function TExtSliderThumb.JSClassName : string; begin Result := 'Ext.slider.Thumb'; end; @@ -20580,6 +21096,7 @@ function TExtSliderThumb.JSClassName : string; begin procedure TExtSliderThumb.InitDefaults; begin inherited; FSlider := TExtSliderMultiSlider.CreateInternal(Self, 'slider'); + FSlider_ := TExtSliderMultiSlider.CreateInternal(Self, 'slider'); end; {$IFDEF FPC}constructor TExtSliderThumb.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} @@ -20612,6 +21129,7 @@ function TExtSliderThumb.Render : TExtFunction; begin destructor TExtSliderThumb.Destroy; begin try FSlider.Free; + FSlider_.Free; except end; inherited; end; @@ -21261,6 +21779,11 @@ procedure TExtUtilFilter.SetFCaseSensitive(Value : Boolean); begin JSCode('caseSensitive:' + VarToJSON([Value])); end; +procedure TExtUtilFilter.SetFDisabled(Value : Boolean); begin + FDisabled := Value; + JSCode(JSName + '.disabled=' + VarToJSON([Value]) + ';'); +end; + procedure TExtUtilFilter.SetFExactMatch(Value : Boolean); begin FExactMatch := Value; JSCode('exactMatch:' + VarToJSON([Value])); @@ -21582,6 +22105,11 @@ procedure TExtTemplate.SetFDisableFormats(Value : Boolean); begin JSCode('disableFormats:' + VarToJSON([Value])); end; +procedure TExtTemplate.SetFIsTemplate(Value : Boolean); begin + FIsTemplate := Value; + JSCode(JSName + '.isTemplate=' + VarToJSON([Value]) + ';'); +end; + function TExtTemplate.JSClassName : string; begin Result := 'Ext.Template'; end; @@ -21860,8 +22388,9 @@ function TExtUtilHashMap.ContainsKey(Key : String) : TExtFunction; begin Result := Self; end; -constructor TExtUtilHashMap.Create; begin - CreateVar(JSClassName + '({});'); +constructor TExtUtilHashMap.Create(Config : TExtObject = nil); begin + if Config = nil then CreateVar(JSClassName + '({});') else + CreateVar(JSClassName + '(' + VarToJSON([Config, false]) + ');'); InitDefaults; end; @@ -21988,6 +22517,11 @@ procedure TExtUtilAbstractMixedCollection.SetFHasListeners(Value : TExtObject); JSCode(JSName + '.hasListeners=' + VarToJSON([Value, false]) + ';'); end; +procedure TExtUtilAbstractMixedCollection.SetFIsMixedCollection(Value : Boolean); begin + FIsMixedCollection := Value; + JSCode(JSName + '.isMixedCollection=' + VarToJSON([Value]) + ';'); +end; + procedure TExtUtilAbstractMixedCollection.SetFIsObservable(Value : Boolean); begin FIsObservable := Value; JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); @@ -22340,1187 +22874,1743 @@ function TExtUtilHistorySingleton.JSClassName : string; begin {$IFDEF FPC}constructor TExtUtilHistorySingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtUtilHistorySingleton.Add(Token : String; PreventDuplicates : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.add(' + VarToJSON([Token, PreventDuplicates]) + ');', 'TExtUtilHistorySingleton'); - Result := Self; +function TExtUtilHistorySingleton.Add(Token : String; PreventDuplicates : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.add(' + VarToJSON([Token, PreventDuplicates]) + ');', 'TExtUtilHistorySingleton'); + Result := Self; +end; + +function TExtUtilHistorySingleton.AddEvents(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtUtilHistorySingleton'); + Result := Self; +end; + +function TExtUtilHistorySingleton.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtUtilHistorySingleton'); + Result := Self; +end; + +function TExtUtilHistorySingleton.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtUtilHistorySingleton'); + Result := Self; +end; + +function TExtUtilHistorySingleton.Back : TExtFunction; begin + JSCode(JSName + '.back();', 'TExtUtilHistorySingleton'); + Result := Self; +end; + +function TExtUtilHistorySingleton.ClearListeners : TExtFunction; begin + JSCode(JSName + '.clearListeners();', 'TExtUtilHistorySingleton'); + Result := Self; +end; + +function TExtUtilHistorySingleton.ClearManagedListeners : TExtFunction; begin + JSCode(JSName + '.clearManagedListeners();', 'TExtUtilHistorySingleton'); + Result := Self; +end; + +constructor TExtUtilHistorySingleton.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; +end; + +function TExtUtilHistorySingleton.EnableBubble(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtUtilHistorySingleton'); + Result := Self; +end; + +function TExtUtilHistorySingleton.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtUtilHistorySingleton'); + Result := Self; +end; + +function TExtUtilHistorySingleton.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtUtilHistorySingleton'); + Result := Self; +end; + +function TExtUtilHistorySingleton.Forward : TExtFunction; begin + JSCode(JSName + '.forward();', 'TExtUtilHistorySingleton'); + Result := Self; +end; + +function TExtUtilHistorySingleton.GetToken : TExtFunction; begin + JSCode(JSName + '.getToken();', 'TExtUtilHistorySingleton'); + Result := Self; +end; + +function TExtUtilHistorySingleton.HasListener(EventName : String) : TExtFunction; begin + JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtUtilHistorySingleton'); + Result := Self; +end; + +function TExtUtilHistorySingleton.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin + JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtUtilHistorySingleton'); + Result := Self; +end; + +function TExtUtilHistorySingleton.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtUtilHistorySingleton'); + Result := Self; +end; + +function TExtUtilHistorySingleton.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtUtilHistorySingleton'); + Result := Self; +end; + +function TExtUtilHistorySingleton.ResumeEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtUtilHistorySingleton'); + Result := Self; +end; + +function TExtUtilHistorySingleton.ResumeEvents : TExtFunction; begin + JSCode(JSName + '.resumeEvents();', 'TExtUtilHistorySingleton'); + Result := Self; +end; + +function TExtUtilHistorySingleton.SuspendEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtUtilHistorySingleton'); + Result := Self; +end; + +function TExtUtilHistorySingleton.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin + JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtUtilHistorySingleton'); + Result := Self; +end; + +procedure TExtUtilHistorySingleton.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'change') and Assigned(FOnChange) then + FOnChange(ParamAsString('Token')) + else if (AEvtName = 'ready') and Assigned(FOnReady) then + FOnReady(TExtUtilHistory(ParamAsObject('The'))); +end; + +function TExtRtlDomElement_scroll.JSClassName : string; begin + Result := 'Ext.rtl.dom.Elementscroll'; +end; + +{$IFDEF FPC}constructor TExtRtlDomElement_scroll.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtRtlDomElement_static.JSClassName : string; begin + Result := 'Ext.rtl.dom.Elementstatic'; +end; + +{$IFDEF FPC}constructor TExtRtlDomElement_static.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtRtlDomElement_insertion.JSClassName : string; begin + Result := 'Ext.rtl.dom.Elementinsertion'; +end; + +{$IFDEF FPC}constructor TExtRtlDomElement_insertion.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtRtlDomElement_position.JSClassName : string; begin + Result := 'Ext.rtl.dom.Elementposition'; +end; + +{$IFDEF FPC}constructor TExtRtlDomElement_position.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtRtlFormFieldSpinner.JSClassName : string; begin + Result := 'Ext.rtl.form.field.Spinner'; +end; + +{$IFDEF FPC}constructor TExtRtlFormFieldSpinner.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtRtlFormFieldTrigger.JSClassName : string; begin + Result := 'Ext.rtl.form.field.Trigger'; +end; + +{$IFDEF FPC}constructor TExtRtlFormFieldTrigger.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtRtlDomLayer.JSClassName : string; begin + Result := 'Ext.rtl.dom.Layer'; +end; + +{$IFDEF FPC}constructor TExtRtlDomLayer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtRtlEventObjectImpl.JSClassName : string; begin + Result := 'Ext.rtl.EventObjectImpl'; +end; + +{$IFDEF FPC}constructor TExtRtlEventObjectImpl.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtPerfMonitorSingleton.JSClassName : string; begin + Result := 'Ext.perf.Monitor'; +end; + +{$IFDEF FPC}constructor TExtPerfMonitorSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +procedure TExtResizer.SetFConstrainTo(Value : TExtElement); begin + FConstrainTo := Value; + Value.DeleteFromGarbage; + JSCode('constrainTo:' + VarToJSON([Value, false])); +end; + +procedure TExtResizer.SetFConstrainToRegion(Value : TExtUtilRegion); begin + FConstrainToRegion := Value; + Value.DeleteFromGarbage; + JSCode('constrainTo:' + VarToJSON([Value, false])); +end; + +procedure TExtResizer.SetFDynamic(Value : Boolean); begin + FDynamic := Value; + JSCode('dynamic:' + VarToJSON([Value])); +end; + +procedure TExtResizer.SetFEl(Value : TExtElement); begin + FEl := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.el=' + VarToJSON([Value, false]) + ';'); +end; + +procedure TExtResizer.SetFHandles(Value : String); begin + FHandles := Value; + JSCode('handles:' + VarToJSON([Value])); +end; + +procedure TExtResizer.SetFHasListeners(Value : TExtObject); begin + FHasListeners := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.hasListeners=' + VarToJSON([Value, false]) + ';'); +end; + +procedure TExtResizer.SetFHeight(Value : Integer); begin + FHeight := Value; + JSCode('height:' + VarToJSON([Value])); +end; + +procedure TExtResizer.SetFHeightIncrement(Value : Integer); begin + FHeightIncrement := Value; + JSCode('heightIncrement:' + VarToJSON([Value])); +end; + +procedure TExtResizer.SetFIsObservable(Value : Boolean); begin + FIsObservable := Value; + JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); +end; + +procedure TExtResizer.SetFListeners(Value : TExtObject); begin + FListeners := Value; + Value.DeleteFromGarbage; + JSCode('listeners:' + VarToJSON([Value, false])); +end; + +procedure TExtResizer.SetFMaxHeight(Value : Integer); begin + FMaxHeight := Value; + JSCode('maxHeight:' + VarToJSON([Value])); +end; + +procedure TExtResizer.SetFMaxWidth(Value : Integer); begin + FMaxWidth := Value; + JSCode('maxWidth:' + VarToJSON([Value])); +end; + +procedure TExtResizer.SetFMinHeight(Value : Integer); begin + FMinHeight := Value; + JSCode('minHeight:' + VarToJSON([Value])); +end; + +procedure TExtResizer.SetFMinWidth(Value : Integer); begin + FMinWidth := Value; + JSCode('minWidth:' + VarToJSON([Value])); +end; + +procedure TExtResizer.SetFOriginalTarget(Value : TExtElement); begin + FOriginalTarget := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.originalTarget=' + VarToJSON([Value, false]) + ';'); +end; + +procedure TExtResizer.SetFOriginalTargetComponent(Value : TExtComponent); begin + FOriginalTargetComponent := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.originalTarget=' + VarToJSON([Value, false]) + ';'); +end; + +procedure TExtResizer.SetFPinned(Value : Boolean); begin + FPinned := Value; + JSCode('pinned:' + VarToJSON([Value])); +end; + +procedure TExtResizer.SetFPreserveRatio(Value : Boolean); begin + FPreserveRatio := Value; + JSCode('preserveRatio:' + VarToJSON([Value])); +end; + +procedure TExtResizer.SetFResizeTracker(Value : TExtResizerResizeTracker); begin + FResizeTracker := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.resizeTracker=' + VarToJSON([Value, false]) + ';'); +end; + +procedure TExtResizer.SetFTarget(Value : TExtElement); begin + FTarget := Value; + Value.DeleteFromGarbage; + JSCode('target:' + VarToJSON([Value, false])); +end; + +procedure TExtResizer.SetFTargetComponent(Value : TExtComponent); begin + FTargetComponent := Value; + Value.DeleteFromGarbage; + JSCode('target:' + VarToJSON([Value, false])); +end; + +procedure TExtResizer.SetFTransparent(Value : Boolean); begin + FTransparent := Value; + JSCode('transparent:' + VarToJSON([Value])); +end; + +procedure TExtResizer.SetFWidth(Value : Integer); begin + FWidth := Value; + JSCode('width:' + VarToJSON([Value])); +end; + +procedure TExtResizer.SetFWidthIncrement(Value : Integer); begin + FWidthIncrement := Value; + JSCode('widthIncrement:' + VarToJSON([Value])); +end; + +function TExtResizer.JSClassName : string; begin + Result := 'Ext.resizer.Resizer'; +end; + +procedure TExtResizer.InitDefaults; begin + inherited; + FConstrainTo := TExtElement.CreateInternal(Self, 'constrainTo'); + FConstrainToRegion := TExtUtilRegion.CreateInternal(Self, 'constrainTo'); + FEl := TExtElement.CreateInternal(Self, 'el'); + FHandles := 's e se'; + FHasListeners := TExtObject.CreateInternal(Self, 'hasListeners'); + FListeners := TExtObject.CreateInternal(Self, 'listeners'); + FOriginalTarget := TExtElement.CreateInternal(Self, 'originalTarget'); + FOriginalTargetComponent := TExtComponent.CreateInternal(Self, 'originalTarget'); + FResizeTracker := TExtResizerResizeTracker.CreateInternal(Self, 'resizeTracker'); + FTarget := TExtElement.CreateInternal(Self, 'target'); + FTargetComponent := TExtComponent.CreateInternal(Self, 'target'); +end; + +{$IFDEF FPC}constructor TExtResizer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtResizer.AddEvents(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtResizer'); + Result := Self; +end; + +function TExtResizer.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtResizer'); + Result := Self; +end; + +function TExtResizer.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtResizer'); + Result := Self; +end; + +function TExtResizer.ClearListeners : TExtFunction; begin + JSCode(JSName + '.clearListeners();', 'TExtResizer'); + Result := Self; +end; + +function TExtResizer.ClearManagedListeners : TExtFunction; begin + JSCode(JSName + '.clearManagedListeners();', 'TExtResizer'); + Result := Self; +end; + +constructor TExtResizer.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; +end; + +function TExtResizer.EnableBubble(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtResizer'); + Result := Self; +end; + +function TExtResizer.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtResizer'); + Result := Self; +end; + +function TExtResizer.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtResizer'); + Result := Self; +end; + +function TExtResizer.GetEl : TExtFunction; begin + JSCode(JSName + '.getEl();', 'TExtResizer'); + Result := Self; +end; + +function TExtResizer.GetTarget : TExtFunction; begin + JSCode(JSName + '.getTarget();', 'TExtResizer'); + Result := Self; +end; + +function TExtResizer.HasListener(EventName : String) : TExtFunction; begin + JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtResizer'); + Result := Self; +end; + +function TExtResizer.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin + JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtResizer'); + Result := Self; +end; + +function TExtResizer.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtResizer'); + Result := Self; +end; + +function TExtResizer.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtResizer'); + Result := Self; +end; + +function TExtResizer.ResizeTo(Width : Integer; Height : Integer) : TExtFunction; begin + JSCode(JSName + '.resizeTo(' + VarToJSON([Width, Height]) + ');', 'TExtResizer'); + Result := Self; +end; + +function TExtResizer.ResumeEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtResizer'); + Result := Self; +end; + +function TExtResizer.ResumeEvents : TExtFunction; begin + JSCode(JSName + '.resumeEvents();', 'TExtResizer'); + Result := Self; +end; + +function TExtResizer.SuspendEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtResizer'); + Result := Self; +end; + +function TExtResizer.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin + JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtResizer'); + Result := Self; +end; + +destructor TExtResizer.Destroy; begin + try + FConstrainTo.Free; + FConstrainToRegion.Free; + FEl.Free; + FHasListeners.Free; + FListeners.Free; + FOriginalTarget.Free; + FOriginalTargetComponent.Free; + FResizeTracker.Free; + FTarget.Free; + FTargetComponent.Free; + except end; + inherited; +end; + +procedure TExtUtilObservable.SetFHasListeners(Value : TExtObject); begin + FHasListeners := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.hasListeners=' + VarToJSON([Value, false]) + ';'); +end; + +procedure TExtUtilObservable.SetFIsObservable(Value : Boolean); begin + FIsObservable := Value; + JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); +end; + +procedure TExtUtilObservable.SetFListeners(Value : TExtObject); begin + FListeners := Value; + Value.DeleteFromGarbage; + JSCode('listeners:' + VarToJSON([Value, false])); +end; + +function TExtUtilObservable.JSClassName : string; begin + Result := 'Ext.util.Observable'; end; -function TExtUtilHistorySingleton.AddEvents(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtUtilHistorySingleton'); - Result := Self; +procedure TExtUtilObservable.InitDefaults; begin + inherited; + FHasListeners := TExtObject.CreateInternal(Self, 'hasListeners'); + FListeners := TExtObject.CreateInternal(Self, 'listeners'); end; -function TExtUtilHistorySingleton.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtUtilHistorySingleton'); +{$IFDEF FPC}constructor TExtUtilObservable.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtUtilObservable.AddEvents(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtUtilObservable'); Result := Self; end; -function TExtUtilHistorySingleton.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtUtilHistorySingleton'); +function TExtUtilObservable.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtUtilObservable'); Result := Self; end; -function TExtUtilHistorySingleton.Back : TExtFunction; begin - JSCode(JSName + '.back();', 'TExtUtilHistorySingleton'); +function TExtUtilObservable.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtUtilObservable'); Result := Self; end; -function TExtUtilHistorySingleton.ClearListeners : TExtFunction; begin - JSCode(JSName + '.clearListeners();', 'TExtUtilHistorySingleton'); +function TExtUtilObservable.ClearListeners : TExtFunction; begin + JSCode(JSName + '.clearListeners();', 'TExtUtilObservable'); Result := Self; end; -function TExtUtilHistorySingleton.ClearManagedListeners : TExtFunction; begin - JSCode(JSName + '.clearManagedListeners();', 'TExtUtilHistorySingleton'); +function TExtUtilObservable.ClearManagedListeners : TExtFunction; begin + JSCode(JSName + '.clearManagedListeners();', 'TExtUtilObservable'); Result := Self; end; -constructor TExtUtilHistorySingleton.Create; begin +constructor TExtUtilObservable.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -function TExtUtilHistorySingleton.EnableBubble(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtUtilHistorySingleton'); +function TExtUtilObservable.EnableBubble(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtUtilObservable'); Result := Self; end; -function TExtUtilHistorySingleton.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtUtilHistorySingleton'); +function TExtUtilObservable.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtUtilObservable'); Result := Self; end; -function TExtUtilHistorySingleton.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtUtilHistorySingleton'); +function TExtUtilObservable.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtUtilObservable'); Result := Self; end; -function TExtUtilHistorySingleton.Forward : TExtFunction; begin - JSCode(JSName + '.forward();', 'TExtUtilHistorySingleton'); +function TExtUtilObservable.HasListener(EventName : String) : TExtFunction; begin + JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtUtilObservable'); Result := Self; end; -function TExtUtilHistorySingleton.GetToken : TExtFunction; begin - JSCode(JSName + '.getToken();', 'TExtUtilHistorySingleton'); +function TExtUtilObservable.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin + JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtUtilObservable'); Result := Self; end; -function TExtUtilHistorySingleton.HasListener(EventName : String) : TExtFunction; begin - JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtUtilHistorySingleton'); +function TExtUtilObservable.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtUtilObservable'); Result := Self; end; -function TExtUtilHistorySingleton.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin - JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtUtilHistorySingleton'); +function TExtUtilObservable.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtUtilObservable'); Result := Self; end; -function TExtUtilHistorySingleton.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtUtilHistorySingleton'); +function TExtUtilObservable.ResumeEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtUtilObservable'); Result := Self; end; -function TExtUtilHistorySingleton.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtUtilHistorySingleton'); +function TExtUtilObservable.ResumeEvents : TExtFunction; begin + JSCode(JSName + '.resumeEvents();', 'TExtUtilObservable'); Result := Self; end; -function TExtUtilHistorySingleton.ResumeEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtUtilHistorySingleton'); +function TExtUtilObservable.SuspendEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtUtilObservable'); Result := Self; end; -function TExtUtilHistorySingleton.ResumeEvents : TExtFunction; begin - JSCode(JSName + '.resumeEvents();', 'TExtUtilHistorySingleton'); +function TExtUtilObservable.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin + JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtUtilObservable'); Result := Self; end; -function TExtUtilHistorySingleton.SuspendEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtUtilHistorySingleton'); - Result := Self; +destructor TExtUtilObservable.Destroy; begin + try + FHasListeners.Free; + FListeners.Free; + except end; + inherited; end; -function TExtUtilHistorySingleton.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin - JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtUtilHistorySingleton'); - Result := Self; +function TExtPerfAccumulator.JSClassName : string; begin + Result := 'Ext.perf.Accumulator'; end; -procedure TExtUtilHistorySingleton.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'change') and Assigned(FOnChange) then - FOnChange(ParamAsString('Token')) - else if (AEvtName = 'ready') and Assigned(FOnReady) then - FOnReady(TExtUtilHistory(ParamAsObject('The'))); -end; +{$IFDEF FPC}constructor TExtPerfAccumulator.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtRtlPanelHeader.JSClassName : string; begin - Result := 'Ext.rtl.panel.Header'; +function TExtRtlDdDD.JSClassName : string; begin + Result := 'Ext.rtl.dd.DD'; end; -{$IFDEF FPC}constructor TExtRtlPanelHeader.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtRtlDdDD.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtRtlDomElement_position.JSClassName : string; begin - Result := 'Ext.rtl.dom.Elementposition'; +function TExtRtlDomElement_anim.JSClassName : string; begin + Result := 'Ext.rtl.dom.Elementanim'; end; -{$IFDEF FPC}constructor TExtRtlDomElement_position.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtRtlDomElement_anim.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtRtlDomElement_scroll.JSClassName : string; begin - Result := 'Ext.rtl.dom.Elementscroll'; +procedure TExtRtlAbstractComponent.SetFRtl(Value : Boolean); begin + FRtl := Value; + JSCode('rtl:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtRtlDomElement_scroll.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtRtlAbstractComponent.JSClassName : string; begin + Result := 'Ext.rtl.AbstractComponent'; +end; -function TExtRtlDomElement_anim.JSClassName : string; begin - Result := 'Ext.rtl.dom.Elementanim'; +{$IFDEF FPC}constructor TExtRtlAbstractComponent.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtRtlButton.JSClassName : string; begin + Result := 'Ext.rtl.button.Button'; end; -{$IFDEF FPC}constructor TExtRtlDomElement_anim.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtRtlButton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtRtlDomElement_insertion.JSClassName : string; begin - Result := 'Ext.rtl.dom.Elementinsertion'; +function TExtRtlLayoutContainerColumn.JSClassName : string; begin + Result := 'Ext.rtl.layout.container.Column'; end; -{$IFDEF FPC}constructor TExtRtlDomElement_insertion.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtRtlLayoutContainerColumn.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtRtlEventObjectImpl.JSClassName : string; begin - Result := 'Ext.rtl.EventObjectImpl'; +function TExtRtlLayoutContainerHBox.JSClassName : string; begin + Result := 'Ext.rtl.layout.container.HBox'; end; -{$IFDEF FPC}constructor TExtRtlEventObjectImpl.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtRtlLayoutContainerHBox.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtRtlFormFieldSpinner.JSClassName : string; begin - Result := 'Ext.rtl.form.field.Spinner'; +function TExtRtlLayoutContainerBox.JSClassName : string; begin + Result := 'Ext.rtl.layout.container.Box'; end; -{$IFDEF FPC}constructor TExtRtlFormFieldSpinner.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtRtlLayoutContainerBox.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtRtlDomElement_static.JSClassName : string; begin - Result := 'Ext.rtl.dom.Elementstatic'; +function TExtRtlLayoutContainerBoxOverflowScroller.JSClassName : string; begin + Result := 'Ext.rtl.layout.container.boxOverflow.Scroller'; end; -{$IFDEF FPC}constructor TExtRtlDomElement_static.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtRtlLayoutContainerBoxOverflowScroller.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtRtlDomLayer.JSClassName : string; begin - Result := 'Ext.rtl.dom.Layer'; +function TExtRtlPanel.JSClassName : string; begin + Result := 'Ext.rtl.panel.Panel'; end; -{$IFDEF FPC}constructor TExtRtlDomLayer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtRtlPanel.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtPerfAccumulator.JSClassName : string; begin - Result := 'Ext.perf.Accumulator'; +function TExtRtlPanelHeader.JSClassName : string; begin + Result := 'Ext.rtl.panel.Header'; end; -{$IFDEF FPC}constructor TExtPerfAccumulator.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtRtlPanelHeader.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtPerfMonitorSingleton.JSClassName : string; begin - Result := 'Ext.perf.Monitor'; +function TExtRtlLayoutContainerVBox.JSClassName : string; begin + Result := 'Ext.rtl.layout.container.VBox'; end; -{$IFDEF FPC}constructor TExtPerfMonitorSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtRtlLayoutContainerVBox.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtPanelProxy.SetFInsertProxy(Value : Boolean); begin - FInsertProxy := Value; - JSCode('insertProxy:' + VarToJSON([Value])); +function TExtRtlLayoutContextItem.JSClassName : string; begin + Result := 'Ext.rtl.layout.ContextItem'; end; -procedure TExtPanelProxy.SetFMoveOnDrag(Value : Boolean); begin - FMoveOnDrag := Value; - JSCode('moveOnDrag:' + VarToJSON([Value])); +{$IFDEF FPC}constructor TExtRtlLayoutContextItem.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtRtlGridPluginRowEditing.JSClassName : string; begin + Result := 'Ext.rtl.grid.plugin.RowEditing'; end; -function TExtPanelProxy.JSClassName : string; begin - Result := 'Ext.panel.Proxy'; +{$IFDEF FPC}constructor TExtRtlGridPluginRowEditing.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtRtlGridRowEditor.JSClassName : string; begin + Result := 'Ext.rtl.grid.RowEditor'; end; -{$IFDEF FPC}constructor TExtPanelProxy.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtRtlGridRowEditor.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtPanelProxy.GetEl : TExtFunction; begin - JSCode(JSName + '.getEl();', 'TExtPanelProxy'); - Result := Self; +function TExtRtlGridColumn.JSClassName : string; begin + Result := 'Ext.rtl.grid.column.Column'; end; -function TExtPanelProxy.GetGhost : TExtFunction; begin - JSCode(JSName + '.getGhost();', 'TExtPanelProxy'); - Result := Self; +{$IFDEF FPC}constructor TExtRtlGridColumn.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtRtlGridPluginHeaderResizer.JSClassName : string; begin + Result := 'Ext.rtl.grid.plugin.HeaderResizer'; end; -function TExtPanelProxy.GetProxy : TExtFunction; begin - JSCode(JSName + '.getProxy();', 'TExtPanelProxy'); - Result := Self; +{$IFDEF FPC}constructor TExtRtlGridPluginHeaderResizer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtRtlLayoutComponentFieldTrigger.JSClassName : string; begin + Result := 'Ext.rtl.layout.component.field.Trigger'; end; -function TExtPanelProxy.Hide : TExtFunction; begin - JSCode(JSName + '.hide();', 'TExtPanelProxy'); - Result := Self; +{$IFDEF FPC}constructor TExtRtlLayoutComponentFieldTrigger.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtRtlLayoutContainerAbsolute.JSClassName : string; begin + Result := 'Ext.rtl.layout.container.Absolute'; end; -function TExtPanelProxy.MoveProxy(ParentNode : THTMLElement; Before : THTMLElement = nil) : TExtFunction; begin - JSCode(JSName + '.moveProxy(' + VarToJSON([ParentNode, false, Before, false]) + ');', 'TExtPanelProxy'); - Result := Self; +{$IFDEF FPC}constructor TExtRtlLayoutContainerAbsolute.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtRtlLayoutComponentDock.JSClassName : string; begin + Result := 'Ext.rtl.layout.component.Dock'; end; -function TExtPanelProxy.Show : TExtFunction; begin - JSCode(JSName + '.show();', 'TExtPanelProxy'); - Result := Self; +{$IFDEF FPC}constructor TExtRtlLayoutComponentDock.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtRtlLayoutComponentFieldText.JSClassName : string; begin + Result := 'Ext.rtl.layout.component.field.Text'; end; -procedure TExtUtilObservable.SetFHasListeners(Value : TExtObject); begin +{$IFDEF FPC}constructor TExtRtlLayoutComponentFieldText.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +procedure TExtDirectProvider.SetFHasListeners(Value : TExtObject); begin FHasListeners := Value; Value.DeleteFromGarbage; JSCode(JSName + '.hasListeners=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtUtilObservable.SetFIsObservable(Value : Boolean); begin +procedure TExtDirectProvider.SetFId(Value : String); begin + FId := Value; + JSCode('id:' + VarToJSON([Value])); +end; + +procedure TExtDirectProvider.SetFIsObservable(Value : Boolean); begin FIsObservable := Value; JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); end; -procedure TExtUtilObservable.SetFListeners(Value : TExtObject); begin +procedure TExtDirectProvider.SetFListeners(Value : TExtObject); begin FListeners := Value; Value.DeleteFromGarbage; JSCode('listeners:' + VarToJSON([Value, false])); end; -function TExtUtilObservable.JSClassName : string; begin - Result := 'Ext.util.Observable'; +procedure TExtDirectProvider.SetFRelayedEvents(Value : TExtObjectList); begin + FRelayedEvents := Value; + Value.DeleteFromGarbage; + JSCode('relayedEvents:' + VarToJSON([Value, false])); end; -procedure TExtUtilObservable.InitDefaults; begin +procedure TExtDirectProvider.SetFOnConnect(Value : TExtDirectProviderOnConnect); begin + if Assigned(FOnConnect) then + JSCode(JSName+'.events ["connect"].listeners=[];'); + if Assigned(Value) then + AddListener('connect', Ajax('connect', ['Provider', '%0.nm'], true)); + FOnConnect := Value; +end; + +procedure TExtDirectProvider.SetFOnData(Value : TExtDirectProviderOnData); begin + if Assigned(FOnData) then + JSCode(JSName+'.events ["data"].listeners=[];'); + if Assigned(Value) then + AddListener('data', Ajax('data', ['Provider', '%0.nm','E', '%1.nm'], true)); + FOnData := Value; +end; + +procedure TExtDirectProvider.SetFOnDisconnect(Value : TExtDirectProviderOnDisconnect); begin + if Assigned(FOnDisconnect) then + JSCode(JSName+'.events ["disconnect"].listeners=[];'); + if Assigned(Value) then + AddListener('disconnect', Ajax('disconnect', ['Provider', '%0.nm'], true)); + FOnDisconnect := Value; +end; + +procedure TExtDirectProvider.SetFOnException(Value : TExtDirectProviderOnException); begin + if Assigned(FOnException) then + JSCode(JSName+'.events ["exception"].listeners=[];'); + if Assigned(Value) then + AddListener('exception', Ajax('exception', [], true)); + FOnException := Value; +end; + +function TExtDirectProvider.JSClassName : string; begin + Result := 'Ext.direct.Provider'; +end; + +procedure TExtDirectProvider.InitDefaults; begin inherited; FHasListeners := TExtObject.CreateInternal(Self, 'hasListeners'); FListeners := TExtObject.CreateInternal(Self, 'listeners'); + FRelayedEvents := TExtObjectList.Create(Self, 'relayedEvents'); end; -{$IFDEF FPC}constructor TExtUtilObservable.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtDirectProvider.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtUtilObservable.AddEvents(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtUtilObservable'); +function TExtDirectProvider.AddEvents(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtDirectProvider'); Result := Self; end; -function TExtUtilObservable.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtUtilObservable'); +function TExtDirectProvider.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtDirectProvider'); Result := Self; end; -function TExtUtilObservable.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtUtilObservable'); +function TExtDirectProvider.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtDirectProvider'); Result := Self; end; -function TExtUtilObservable.ClearListeners : TExtFunction; begin - JSCode(JSName + '.clearListeners();', 'TExtUtilObservable'); +function TExtDirectProvider.ClearListeners : TExtFunction; begin + JSCode(JSName + '.clearListeners();', 'TExtDirectProvider'); Result := Self; end; -function TExtUtilObservable.ClearManagedListeners : TExtFunction; begin - JSCode(JSName + '.clearManagedListeners();', 'TExtUtilObservable'); +function TExtDirectProvider.ClearManagedListeners : TExtFunction; begin + JSCode(JSName + '.clearManagedListeners();', 'TExtDirectProvider'); Result := Self; end; -constructor TExtUtilObservable.Create; begin +constructor TExtDirectProvider.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -function TExtUtilObservable.EnableBubble(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtUtilObservable'); +function TExtDirectProvider.EnableBubble(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtDirectProvider'); Result := Self; end; -function TExtUtilObservable.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtUtilObservable'); +function TExtDirectProvider.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDirectProvider'); Result := Self; end; -function TExtUtilObservable.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtUtilObservable'); +function TExtDirectProvider.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDirectProvider'); Result := Self; end; -function TExtUtilObservable.HasListener(EventName : String) : TExtFunction; begin - JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtUtilObservable'); +function TExtDirectProvider.HasListener(EventName : String) : TExtFunction; begin + JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtDirectProvider'); Result := Self; end; -function TExtUtilObservable.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin - JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtUtilObservable'); +function TExtDirectProvider.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin + JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtDirectProvider'); Result := Self; end; -function TExtUtilObservable.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtUtilObservable'); +function TExtDirectProvider.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtDirectProvider'); Result := Self; end; -function TExtUtilObservable.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtUtilObservable'); +function TExtDirectProvider.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtDirectProvider'); Result := Self; end; -function TExtUtilObservable.ResumeEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtUtilObservable'); +function TExtDirectProvider.ResumeEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtDirectProvider'); Result := Self; end; -function TExtUtilObservable.ResumeEvents : TExtFunction; begin - JSCode(JSName + '.resumeEvents();', 'TExtUtilObservable'); +function TExtDirectProvider.ResumeEvents : TExtFunction; begin + JSCode(JSName + '.resumeEvents();', 'TExtDirectProvider'); Result := Self; end; -function TExtUtilObservable.SuspendEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtUtilObservable'); +function TExtDirectProvider.SuspendEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtDirectProvider'); Result := Self; end; -function TExtUtilObservable.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin - JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtUtilObservable'); +function TExtDirectProvider.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin + JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtDirectProvider'); Result := Self; end; -destructor TExtUtilObservable.Destroy; begin +destructor TExtDirectProvider.Destroy; begin try FHasListeners.Free; FListeners.Free; + FRelayedEvents.Free; except end; inherited; end; -function TExtRtlButton.JSClassName : string; begin - Result := 'Ext.rtl.button.Button'; +procedure TExtDirectProvider.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'connect') and Assigned(FOnConnect) then + FOnConnect(TExtDirectProvider(ParamAsObject('Provider'))) + else if (AEvtName = 'data') and Assigned(FOnData) then + FOnData(TExtDirectProvider(ParamAsObject('Provider')), TExtDirectEvent(ParamAsObject('E'))) + else if (AEvtName = 'disconnect') and Assigned(FOnDisconnect) then + FOnDisconnect(TExtDirectProvider(ParamAsObject('Provider'))) + else if (AEvtName = 'exception') and Assigned(FOnException) then + FOnException(); end; -{$IFDEF FPC}constructor TExtRtlButton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtDataAssociationHasOne.SetFForeignKey(Value : String); begin + FForeignKey := Value; + JSCode('foreignKey:' + VarToJSON([Value])); +end; -function TExtRtlDdDD.JSClassName : string; begin - Result := 'Ext.rtl.dd.DD'; +procedure TExtDataAssociationHasOne.SetFGetterName(Value : String); begin + FGetterName := Value; + JSCode('getterName:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtRtlDdDD.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtDataAssociationHasOne.SetFSetterName(Value : String); begin + FSetterName := Value; + JSCode('setterName:' + VarToJSON([Value])); +end; -procedure TExtResizer.SetFConstrainTo(Value : TExtElement); begin - FConstrainTo := Value; - Value.DeleteFromGarbage; - JSCode('constrainTo:' + VarToJSON([Value, false])); +procedure TExtDataAssociationHasOne.SetFTypeJS(Value : String); begin + FTypeJS := Value; + JSCode('typeJS:' + VarToJSON([Value])); end; -procedure TExtResizer.SetFConstrainToRegion(Value : TExtUtilRegion); begin - FConstrainToRegion := Value; - Value.DeleteFromGarbage; - JSCode('constrainTo:' + VarToJSON([Value, false])); +function TExtDataAssociationHasOne.JSClassName : string; begin + Result := 'Ext.data.association.HasOne'; end; -procedure TExtResizer.SetFDynamic(Value : Boolean); begin - FDynamic := Value; - JSCode('dynamic:' + VarToJSON([Value])); +procedure TExtDataAssociationHasOne.InitDefaults; begin + inherited; + FForeignKey := '_id'; + FGetterName := 'get'; + FSetterName := 'set'; end; -procedure TExtResizer.SetFEl(Value : TExtElement); begin - FEl := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.el=' + VarToJSON([Value, false]) + ';'); +{$IFDEF FPC}constructor TExtDataAssociationHasOne.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtDataAssociationHasOne.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtResizer.SetFHandles(Value : String); begin - FHandles := Value; - JSCode('handles:' + VarToJSON([Value])); +procedure TExtDataAssociationHasMany.SetFFilterProperty(Value : String); begin + FFilterProperty := Value; + JSCode('filterProperty:' + VarToJSON([Value])); end; -procedure TExtResizer.SetFHasListeners(Value : TExtObject); begin - FHasListeners := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.hasListeners=' + VarToJSON([Value, false]) + ';'); +procedure TExtDataAssociationHasMany.SetFForeignKey(Value : String); begin + FForeignKey := Value; + JSCode('foreignKey:' + VarToJSON([Value])); end; -procedure TExtResizer.SetFHeight(Value : Integer); begin - FHeight := Value; - JSCode('height:' + VarToJSON([Value])); +procedure TExtDataAssociationHasMany.SetFName(Value : String); begin + FName := Value; + JSCode('name:' + VarToJSON([Value])); end; -procedure TExtResizer.SetFHeightIncrement(Value : Integer); begin - FHeightIncrement := Value; - JSCode('heightIncrement:' + VarToJSON([Value])); +procedure TExtDataAssociationHasMany.SetFStoreConfig(Value : TExtObject); begin + FStoreConfig := Value; + Value.DeleteFromGarbage; + JSCode('storeConfig:' + VarToJSON([Value, false])); end; -procedure TExtResizer.SetFIsObservable(Value : Boolean); begin - FIsObservable := Value; - JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); +procedure TExtDataAssociationHasMany.SetFTypeJS(Value : String); begin + FTypeJS := Value; + JSCode('typeJS:' + VarToJSON([Value])); end; -procedure TExtResizer.SetFListeners(Value : TExtObject); begin - FListeners := Value; - Value.DeleteFromGarbage; - JSCode('listeners:' + VarToJSON([Value, false])); +function TExtDataAssociationHasMany.JSClassName : string; begin + Result := 'Ext.data.association.HasMany'; end; -procedure TExtResizer.SetFMaxHeight(Value : Integer); begin - FMaxHeight := Value; - JSCode('maxHeight:' + VarToJSON([Value])); +procedure TExtDataAssociationHasMany.InitDefaults; begin + inherited; + FForeignKey := '_id'; + FStoreConfig := TExtObject.CreateInternal(Self, 'storeConfig'); end; -procedure TExtResizer.SetFMaxWidth(Value : Integer); begin - FMaxWidth := Value; - JSCode('maxWidth:' + VarToJSON([Value])); +{$IFDEF FPC}constructor TExtDataAssociationHasMany.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtDataAssociationHasMany.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtResizer.SetFMinHeight(Value : Integer); begin - FMinHeight := Value; - JSCode('minHeight:' + VarToJSON([Value])); +destructor TExtDataAssociationHasMany.Destroy; begin + try + FStoreConfig.Free; + except end; + inherited; end; -procedure TExtResizer.SetFMinWidth(Value : Integer); begin - FMinWidth := Value; - JSCode('minWidth:' + VarToJSON([Value])); +procedure TExtDataBatch.SetFAutoStart(Value : Boolean); begin + FAutoStart := Value; + JSCode('autoStart:' + VarToJSON([Value])); end; -procedure TExtResizer.SetFOriginalTarget(Value : TExtElement); begin - FOriginalTarget := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.originalTarget=' + VarToJSON([Value, false]) + ';'); +procedure TExtDataBatch.SetFCurrent(Value : Integer); begin + FCurrent := Value; + JSCode(JSName + '.current=' + VarToJSON([Value]) + ';'); end; -procedure TExtResizer.SetFOriginalTargetComponent(Value : TExtComponent); begin - FOriginalTargetComponent := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.originalTarget=' + VarToJSON([Value, false]) + ';'); +procedure TExtDataBatch.SetFHasException(Value : Boolean); begin + FHasException := Value; + JSCode(JSName + '.hasException=' + VarToJSON([Value]) + ';'); end; -procedure TExtResizer.SetFPinned(Value : Boolean); begin - FPinned := Value; - JSCode('pinned:' + VarToJSON([Value])); +procedure TExtDataBatch.SetFHasListeners(Value : TExtObject); begin + FHasListeners := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.hasListeners=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtResizer.SetFPreserveRatio(Value : Boolean); begin - FPreserveRatio := Value; - JSCode('preserveRatio:' + VarToJSON([Value])); +procedure TExtDataBatch.SetFIsComplete(Value : Boolean); begin + FIsComplete := Value; + JSCode(JSName + '.isComplete=' + VarToJSON([Value]) + ';'); end; -procedure TExtResizer.SetFResizeTracker(Value : TExtResizerResizeTracker); begin - FResizeTracker := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.resizeTracker=' + VarToJSON([Value, false]) + ';'); +procedure TExtDataBatch.SetFIsObservable(Value : Boolean); begin + FIsObservable := Value; + JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); end; -procedure TExtResizer.SetFTarget(Value : TExtElement); begin - FTarget := Value; - Value.DeleteFromGarbage; - JSCode('target:' + VarToJSON([Value, false])); +procedure TExtDataBatch.SetFIsRunning(Value : Boolean); begin + FIsRunning := Value; + JSCode(JSName + '.isRunning=' + VarToJSON([Value]) + ';'); end; -procedure TExtResizer.SetFTargetComponent(Value : TExtComponent); begin - FTargetComponent := Value; +procedure TExtDataBatch.SetFListeners(Value : TExtObject); begin + FListeners := Value; Value.DeleteFromGarbage; - JSCode('target:' + VarToJSON([Value, false])); + JSCode('listeners:' + VarToJSON([Value, false])); end; -procedure TExtResizer.SetFTransparent(Value : Boolean); begin - FTransparent := Value; - JSCode('transparent:' + VarToJSON([Value])); +procedure TExtDataBatch.SetFOperations(Value : TExtObjectList); begin + FOperations := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.operations=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtResizer.SetFWidth(Value : Integer); begin - FWidth := Value; - JSCode('width:' + VarToJSON([Value])); +procedure TExtDataBatch.SetFPauseOnException(Value : Boolean); begin + FPauseOnException := Value; + JSCode('pauseOnException:' + VarToJSON([Value])); end; -procedure TExtResizer.SetFWidthIncrement(Value : Integer); begin - FWidthIncrement := Value; - JSCode('widthIncrement:' + VarToJSON([Value])); +procedure TExtDataBatch.SetFTotal(Value : Integer); begin + FTotal := Value; + JSCode(JSName + '.total=' + VarToJSON([Value]) + ';'); end; -function TExtResizer.JSClassName : string; begin - Result := 'Ext.resizer.Resizer'; +function TExtDataBatch.JSClassName : string; begin + Result := 'Ext.data.Batch'; end; -procedure TExtResizer.InitDefaults; begin +procedure TExtDataBatch.InitDefaults; begin inherited; - FConstrainTo := TExtElement.CreateInternal(Self, 'constrainTo'); - FConstrainToRegion := TExtUtilRegion.CreateInternal(Self, 'constrainTo'); - FEl := TExtElement.CreateInternal(Self, 'el'); - FHandles := 's e se'; FHasListeners := TExtObject.CreateInternal(Self, 'hasListeners'); FListeners := TExtObject.CreateInternal(Self, 'listeners'); - FOriginalTarget := TExtElement.CreateInternal(Self, 'originalTarget'); - FOriginalTargetComponent := TExtComponent.CreateInternal(Self, 'originalTarget'); - FResizeTracker := TExtResizerResizeTracker.CreateInternal(Self, 'resizeTracker'); - FTarget := TExtElement.CreateInternal(Self, 'target'); - FTargetComponent := TExtComponent.CreateInternal(Self, 'target'); + FOperations := TExtObjectList.Create(Self, 'operations'); end; -{$IFDEF FPC}constructor TExtResizer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtDataBatch.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtResizer.AddEvents(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtResizer'); +function TExtDataBatch.Add(Operation : TExtObject) : TExtFunction; begin + JSCode(JSName + '.add(' + VarToJSON([Operation, false]) + ');', 'TExtDataBatch'); Result := Self; end; -function TExtResizer.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtResizer'); +function TExtDataBatch.AddEvents(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtDataBatch'); Result := Self; end; -function TExtResizer.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtResizer'); +function TExtDataBatch.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtDataBatch'); Result := Self; end; -function TExtResizer.ClearListeners : TExtFunction; begin - JSCode(JSName + '.clearListeners();', 'TExtResizer'); +function TExtDataBatch.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtDataBatch'); Result := Self; end; -function TExtResizer.ClearManagedListeners : TExtFunction; begin - JSCode(JSName + '.clearManagedListeners();', 'TExtResizer'); +function TExtDataBatch.ClearListeners : TExtFunction; begin + JSCode(JSName + '.clearListeners();', 'TExtDataBatch'); Result := Self; end; -constructor TExtResizer.Create; begin +function TExtDataBatch.ClearManagedListeners : TExtFunction; begin + JSCode(JSName + '.clearManagedListeners();', 'TExtDataBatch'); + Result := Self; +end; + +constructor TExtDataBatch.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -function TExtResizer.EnableBubble(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtResizer'); +function TExtDataBatch.EnableBubble(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtDataBatch'); Result := Self; end; -function TExtResizer.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtResizer'); +function TExtDataBatch.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDataBatch'); Result := Self; end; -function TExtResizer.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtResizer'); +function TExtDataBatch.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDataBatch'); Result := Self; end; -function TExtResizer.GetEl : TExtFunction; begin - JSCode(JSName + '.getEl();', 'TExtResizer'); +function TExtDataBatch.HasListener(EventName : String) : TExtFunction; begin + JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtDataBatch'); Result := Self; end; -function TExtResizer.GetTarget : TExtFunction; begin - JSCode(JSName + '.getTarget();', 'TExtResizer'); +function TExtDataBatch.Pause : TExtFunction; begin + JSCode(JSName + '.pause();', 'TExtDataBatch'); Result := Self; end; -function TExtResizer.HasListener(EventName : String) : TExtFunction; begin - JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtResizer'); +function TExtDataBatch.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin + JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtDataBatch'); Result := Self; end; -function TExtResizer.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin - JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtResizer'); +function TExtDataBatch.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtDataBatch'); Result := Self; end; -function TExtResizer.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtResizer'); +function TExtDataBatch.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtDataBatch'); Result := Self; end; -function TExtResizer.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtResizer'); +function TExtDataBatch.ResumeEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtDataBatch'); Result := Self; end; -function TExtResizer.ResizeTo(Width : Integer; Height : Integer) : TExtFunction; begin - JSCode(JSName + '.resizeTo(' + VarToJSON([Width, Height]) + ');', 'TExtResizer'); +function TExtDataBatch.ResumeEvents : TExtFunction; begin + JSCode(JSName + '.resumeEvents();', 'TExtDataBatch'); Result := Self; end; -function TExtResizer.ResumeEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtResizer'); +function TExtDataBatch.Retry : TExtFunction; begin + JSCode(JSName + '.retry();', 'TExtDataBatch'); Result := Self; end; -function TExtResizer.ResumeEvents : TExtFunction; begin - JSCode(JSName + '.resumeEvents();', 'TExtResizer'); +function TExtDataBatch.RunOperation(Index : Integer) : TExtFunction; begin + JSCode(JSName + '.runOperation(' + VarToJSON([Index]) + ');', 'TExtDataBatch'); Result := Self; end; -function TExtResizer.SuspendEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtResizer'); +function TExtDataBatch.Start : TExtFunction; begin + JSCode(JSName + '.start();', 'TExtDataBatch'); Result := Self; end; -function TExtResizer.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin - JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtResizer'); +function TExtDataBatch.SuspendEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtDataBatch'); Result := Self; end; -destructor TExtResizer.Destroy; begin +function TExtDataBatch.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin + JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtDataBatch'); + Result := Self; +end; + +destructor TExtDataBatch.Destroy; begin try - FConstrainTo.Free; - FConstrainToRegion.Free; - FEl.Free; FHasListeners.Free; FListeners.Free; - FOriginalTarget.Free; - FOriginalTargetComponent.Free; - FResizeTracker.Free; - FTarget.Free; - FTargetComponent.Free; + FOperations.Free; except end; inherited; end; -procedure TExtRtlAbstractComponent.SetFRtl(Value : Boolean); begin - FRtl := Value; - JSCode('rtl:' + VarToJSON([Value])); +procedure TExtDataFlashBinaryXhr.SetFReadyState(Value : Integer); begin + FReadyState := Value; + JSCode(JSName + '.readyState=' + VarToJSON([Value]) + ';'); end; -function TExtRtlAbstractComponent.JSClassName : string; begin - Result := 'Ext.rtl.AbstractComponent'; +procedure TExtDataFlashBinaryXhr.SetFResponseBytes(Value : TExtObjectList); begin + FResponseBytes := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.responseBytes=' + VarToJSON([Value, false]) + ';'); end; -{$IFDEF FPC}constructor TExtRtlAbstractComponent.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtDataFlashBinaryXhr.SetFStatus(Value : Integer); begin + FStatus := Value; + JSCode(JSName + '.status=' + VarToJSON([Value]) + ';'); +end; -function TExtRtlLayoutContainerBoxOverflowScroller.JSClassName : string; begin - Result := 'Ext.rtl.layout.container.boxOverflow.Scroller'; +function TExtDataFlashBinaryXhr.JSClassName : string; begin + Result := 'Ext.data.flash.BinaryXhr'; end; -{$IFDEF FPC}constructor TExtRtlLayoutContainerBoxOverflowScroller.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtDataFlashBinaryXhr.InitDefaults; begin + inherited; + FResponseBytes := TExtObjectList.Create(Self, 'responseBytes'); +end; -function TExtRtlLayoutContainerColumn.JSClassName : string; begin - Result := 'Ext.rtl.layout.container.Column'; +{$IFDEF FPC}constructor TExtDataFlashBinaryXhr.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDataFlashBinaryXhr.Abort : TExtFunction; begin + JSCode(JSName + '.abort();', 'TExtDataFlashBinaryXhr'); + Result := Self; end; -{$IFDEF FPC}constructor TExtRtlLayoutContainerColumn.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +constructor TExtDataFlashBinaryXhr.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; +end; -function TExtRtlLayoutContainerAbsolute.JSClassName : string; begin - Result := 'Ext.rtl.layout.container.Absolute'; +function TExtDataFlashBinaryXhr.GetAllResponseHeaders : TExtFunction; begin + JSCode(JSName + '.getAllResponseHeaders();', 'TExtDataFlashBinaryXhr'); + Result := Self; end; -{$IFDEF FPC}constructor TExtRtlLayoutContainerAbsolute.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtDataFlashBinaryXhr.GetResponseHeader : TExtFunction; begin + JSCode(JSName + '.getResponseHeader();', 'TExtDataFlashBinaryXhr'); + Result := Self; +end; -function TExtRtlLayoutContainerBox.JSClassName : string; begin - Result := 'Ext.rtl.layout.container.Box'; +function TExtDataFlashBinaryXhr.Open : TExtFunction; begin + JSCode(JSName + '.open();', 'TExtDataFlashBinaryXhr'); + Result := Self; end; -{$IFDEF FPC}constructor TExtRtlLayoutContainerBox.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtDataFlashBinaryXhr.OverrideMimeType : TExtFunction; begin + JSCode(JSName + '.overrideMimeType();', 'TExtDataFlashBinaryXhr'); + Result := Self; +end; -function TExtRtlLayoutContextItem.JSClassName : string; begin - Result := 'Ext.rtl.layout.ContextItem'; +function TExtDataFlashBinaryXhr.Send(Body : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.send(' + VarToJSON(Body) + ');', 'TExtDataFlashBinaryXhr'); + Result := Self; end; -{$IFDEF FPC}constructor TExtRtlLayoutContextItem.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtDataFlashBinaryXhr.SetRequestHeader : TExtFunction; begin + JSCode(JSName + '.setRequestHeader();', 'TExtDataFlashBinaryXhr'); + Result := Self; +end; -function TExtRtlPanel.JSClassName : string; begin - Result := 'Ext.rtl.panel.Panel'; +destructor TExtDataFlashBinaryXhr.Destroy; begin + try + FResponseBytes.Free; + except end; + inherited; end; -{$IFDEF FPC}constructor TExtRtlPanel.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtDataConnection.SetFAutoAbort(Value : Boolean); begin + FAutoAbort := Value; + JSCode('autoAbort:' + VarToJSON([Value])); +end; -function TExtRtlLayoutContainerHBox.JSClassName : string; begin - Result := 'Ext.rtl.layout.container.HBox'; +procedure TExtDataConnection.SetFBinary(Value : Boolean); begin + FBinary := Value; + JSCode('binary:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtRtlLayoutContainerHBox.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtDataConnection.SetFCors(Value : Boolean); begin + FCors := Value; + JSCode('cors:' + VarToJSON([Value])); +end; -function TExtRtlLayoutContainerVBox.JSClassName : string; begin - Result := 'Ext.rtl.layout.container.VBox'; +procedure TExtDataConnection.SetFDefaultHeaders(Value : TExtObject); begin + FDefaultHeaders := Value; + Value.DeleteFromGarbage; + JSCode('defaultHeaders:' + VarToJSON([Value, false])); end; -{$IFDEF FPC}constructor TExtRtlLayoutContainerVBox.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtDataConnection.SetFDisableCaching(Value : Boolean); begin + FDisableCaching := Value; + JSCode('disableCaching:' + VarToJSON([Value])); +end; -function TExtRtlGridPluginHeaderResizer.JSClassName : string; begin - Result := 'Ext.rtl.grid.plugin.HeaderResizer'; +procedure TExtDataConnection.SetFDisableCachingParam(Value : String); begin + FDisableCachingParam := Value; + JSCode('disableCachingParam:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtRtlGridPluginHeaderResizer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtDataConnection.SetFExtraParams(Value : TExtObject); begin + FExtraParams := Value; + Value.DeleteFromGarbage; + JSCode('extraParams:' + VarToJSON([Value, false])); +end; -function TExtRtlGridPluginRowEditing.JSClassName : string; begin - Result := 'Ext.rtl.grid.plugin.RowEditing'; +procedure TExtDataConnection.SetFHasListeners(Value : TExtObject); begin + FHasListeners := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.hasListeners=' + VarToJSON([Value, false]) + ';'); end; -{$IFDEF FPC}constructor TExtRtlGridPluginRowEditing.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtDataConnection.SetFIsObservable(Value : Boolean); begin + FIsObservable := Value; + JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); +end; -function TExtRtlFormFieldTrigger.JSClassName : string; begin - Result := 'Ext.rtl.form.field.Trigger'; +procedure TExtDataConnection.SetFListeners(Value : TExtObject); begin + FListeners := Value; + Value.DeleteFromGarbage; + JSCode('listeners:' + VarToJSON([Value, false])); end; -{$IFDEF FPC}constructor TExtRtlFormFieldTrigger.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtDataConnection.SetFMethod(Value : String); begin + FMethod := Value; + JSCode('method:' + VarToJSON([Value])); +end; -function TExtRtlGridColumn.JSClassName : string; begin - Result := 'Ext.rtl.grid.column.Column'; +procedure TExtDataConnection.SetFTimeout(Value : Integer); begin + FTimeout := Value; + JSCode('timeout:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtRtlGridColumn.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtDataConnection.SetFWithCredentials(Value : Boolean); begin + FWithCredentials := Value; + JSCode('withCredentials:' + VarToJSON([Value])); +end; -function TExtRtlLayoutComponentFieldText.JSClassName : string; begin - Result := 'Ext.rtl.layout.component.field.Text'; +procedure TExtDataConnection.SetFOnBeforerequest(Value : TExtDataConnectionOnBeforerequest); begin + if Assigned(FOnBeforerequest) then + JSCode(JSName+'.events ["beforerequest"].listeners=[];'); + if Assigned(Value) then + AddListener('beforerequest', Ajax('beforerequest', ['Conn', '%0.nm','Options', '%1.nm'], true)); + FOnBeforerequest := Value; end; -{$IFDEF FPC}constructor TExtRtlLayoutComponentFieldText.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtDataConnection.SetFOnRequestcomplete(Value : TExtDataConnectionOnRequestcomplete); begin + if Assigned(FOnRequestcomplete) then + JSCode(JSName+'.events ["requestcomplete"].listeners=[];'); + if Assigned(Value) then + AddListener('requestcomplete', Ajax('requestcomplete', ['Conn', '%0.nm','Response', '%1.nm','Options', '%2.nm'], true)); + FOnRequestcomplete := Value; +end; -function TExtRtlLayoutComponentFieldTrigger.JSClassName : string; begin - Result := 'Ext.rtl.layout.component.field.Trigger'; +procedure TExtDataConnection.SetFOnRequestexception(Value : TExtDataConnectionOnRequestexception); begin + if Assigned(FOnRequestexception) then + JSCode(JSName+'.events ["requestexception"].listeners=[];'); + if Assigned(Value) then + AddListener('requestexception', Ajax('requestexception', ['Conn', '%0.nm','Response', '%1.nm','Options', '%2.nm'], true)); + FOnRequestexception := Value; end; -{$IFDEF FPC}constructor TExtRtlLayoutComponentFieldTrigger.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtDataConnection.JSClassName : string; begin + Result := 'Ext.data.Connection'; +end; -function TExtRtlGridRowEditor.JSClassName : string; begin - Result := 'Ext.rtl.grid.RowEditor'; +procedure TExtDataConnection.InitDefaults; begin + inherited; + FDefaultHeaders := TExtObject.CreateInternal(Self, 'defaultHeaders'); + FExtraParams := TExtObject.CreateInternal(Self, 'extraParams'); + FHasListeners := TExtObject.CreateInternal(Self, 'hasListeners'); + FListeners := TExtObject.CreateInternal(Self, 'listeners'); end; -{$IFDEF FPC}constructor TExtRtlGridRowEditor.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtDataConnection.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtRtlLayoutComponentDock.JSClassName : string; begin - Result := 'Ext.rtl.layout.component.Dock'; +function TExtDataConnection.Abort(Request : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.abort(' + VarToJSON([Request, false]) + ');', 'TExtDataConnection'); + Result := Self; end; -{$IFDEF FPC}constructor TExtRtlLayoutComponentDock.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtDataConnection.AbortAll : TExtFunction; begin + JSCode(JSName + '.abortAll();', 'TExtDataConnection'); + Result := Self; +end; -procedure TExtDataTree.SetFHasListeners(Value : TExtObject); begin - FHasListeners := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.hasListeners=' + VarToJSON([Value, false]) + ';'); +function TExtDataConnection.AddEvents(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtDataConnection'); + Result := Self; end; -procedure TExtDataTree.SetFIsObservable(Value : Boolean); begin - FIsObservable := Value; - JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); +function TExtDataConnection.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtDataConnection'); + Result := Self; end; -procedure TExtDataTree.SetFListeners(Value : TExtObject); begin - FListeners := Value; - Value.DeleteFromGarbage; - JSCode('listeners:' + VarToJSON([Value, false])); +function TExtDataConnection.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtDataConnection'); + Result := Self; end; -procedure TExtDataTree.SetFOnAppend(Value : TExtDataTreeOnAppend); begin - if Assigned(FOnAppend) then - JSCode(JSName+'.events ["append"].listeners=[];'); - if Assigned(Value) then - AddListener('append', Ajax('append', [], true)); - FOnAppend := Value; +function TExtDataConnection.ClearListeners : TExtFunction; begin + JSCode(JSName + '.clearListeners();', 'TExtDataConnection'); + Result := Self; end; -procedure TExtDataTree.SetFOnBeforeappend(Value : TExtDataTreeOnBeforeappend); begin - if Assigned(FOnBeforeappend) then - JSCode(JSName+'.events ["beforeappend"].listeners=[];'); - if Assigned(Value) then - AddListener('beforeappend', Ajax('beforeappend', [], true)); - FOnBeforeappend := Value; +function TExtDataConnection.ClearManagedListeners : TExtFunction; begin + JSCode(JSName + '.clearManagedListeners();', 'TExtDataConnection'); + Result := Self; end; -procedure TExtDataTree.SetFOnBeforecollapse(Value : TExtDataTreeOnBeforecollapse); begin - if Assigned(FOnBeforecollapse) then - JSCode(JSName+'.events ["beforecollapse"].listeners=[];'); - if Assigned(Value) then - AddListener('beforecollapse', Ajax('beforecollapse', [], true)); - FOnBeforecollapse := Value; +constructor TExtDataConnection.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtDataTree.SetFOnBeforeexpand(Value : TExtDataTreeOnBeforeexpand); begin - if Assigned(FOnBeforeexpand) then - JSCode(JSName+'.events ["beforeexpand"].listeners=[];'); - if Assigned(Value) then - AddListener('beforeexpand', Ajax('beforeexpand', [], true)); - FOnBeforeexpand := Value; +function TExtDataConnection.EnableBubble(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtDataConnection'); + Result := Self; end; -procedure TExtDataTree.SetFOnBeforeinsert(Value : TExtDataTreeOnBeforeinsert); begin - if Assigned(FOnBeforeinsert) then - JSCode(JSName+'.events ["beforeinsert"].listeners=[];'); - if Assigned(Value) then - AddListener('beforeinsert', Ajax('beforeinsert', [], true)); - FOnBeforeinsert := Value; +function TExtDataConnection.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDataConnection'); + Result := Self; end; -procedure TExtDataTree.SetFOnBeforemove(Value : TExtDataTreeOnBeforemove); begin - if Assigned(FOnBeforemove) then - JSCode(JSName+'.events ["beforemove"].listeners=[];'); - if Assigned(Value) then - AddListener('beforemove', Ajax('beforemove', [], true)); - FOnBeforemove := Value; +function TExtDataConnection.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDataConnection'); + Result := Self; end; -procedure TExtDataTree.SetFOnBeforeremove(Value : TExtDataTreeOnBeforeremove); begin - if Assigned(FOnBeforeremove) then - JSCode(JSName+'.events ["beforeremove"].listeners=[];'); - if Assigned(Value) then - AddListener('beforeremove', Ajax('beforeremove', [], true)); - FOnBeforeremove := Value; +function TExtDataConnection.HasListener(EventName : String) : TExtFunction; begin + JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtDataConnection'); + Result := Self; end; -procedure TExtDataTree.SetFOnCollapse(Value : TExtDataTreeOnCollapse); begin - if Assigned(FOnCollapse) then - JSCode(JSName+'.events ["collapse"].listeners=[];'); - if Assigned(Value) then - AddListener('collapse', Ajax('collapse', [], true)); - FOnCollapse := Value; +function TExtDataConnection.IsLoading(Request : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.isLoading(' + VarToJSON([Request, false]) + ');', 'TExtDataConnection'); + Result := Self; end; -procedure TExtDataTree.SetFOnExpand(Value : TExtDataTreeOnExpand); begin - if Assigned(FOnExpand) then - JSCode(JSName+'.events ["expand"].listeners=[];'); - if Assigned(Value) then - AddListener('expand', Ajax('expand', [], true)); - FOnExpand := Value; +function TExtDataConnection.ParseStatus(Status : Integer) : TExtFunction; begin + JSCode(JSName + '.parseStatus(' + VarToJSON([Status]) + ');', 'TExtDataConnection'); + Result := Self; end; -procedure TExtDataTree.SetFOnInsert(Value : TExtDataTreeOnInsert); begin - if Assigned(FOnInsert) then - JSCode(JSName+'.events ["insert"].listeners=[];'); - if Assigned(Value) then - AddListener('insert', Ajax('insert', [], true)); - FOnInsert := Value; +function TExtDataConnection.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin + JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtDataConnection'); + Result := Self; end; -procedure TExtDataTree.SetFOnMove(Value : TExtDataTreeOnMove); begin - if Assigned(FOnMove) then - JSCode(JSName+'.events ["move"].listeners=[];'); - if Assigned(Value) then - AddListener('move', Ajax('move', [], true)); - FOnMove := Value; +function TExtDataConnection.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtDataConnection'); + Result := Self; +end; + +function TExtDataConnection.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtDataConnection'); + Result := Self; +end; + +function TExtDataConnection.Request(Options : TExtObject; OptionsUrl : String; OptionsParams : String; OptionsMethod : String; OptionsCallback : TExtFunction; OptionsCallbackOptions : TExtObject; OptionsCallbackSuccess : Boolean; OptionsCallbackResponse : TExtObject; OptionsSuccess : TExtFunction; OptionsSuccessResponse : TExtObject; OptionsSuccessOptions : TExtObject; OptionsFailure : TExtFunction; OptionsFailureResponse : TExtObject; OptionsFailureOptions : TExtObject; OptionsScope : TExtObject; OptionsTimeout : Integer; OptionsForm : String; OptionsIsUpload : Boolean; OptionsHeaders : TExtObject; OptionsXmlData : TExtObject; OptionsJsonData : String; OptionsBinaryData : TExtObjectList; OptionsDisableCaching : Boolean; OptionsWithCredentials : Boolean; OptionsBinary : Boolean) : TExtFunction; begin + JSCode(JSName + '.request(' + VarToJSON([Options, false, OptionsUrl, OptionsParams, OptionsMethod, OptionsCallback, true, OptionsCallbackOptions, false, OptionsCallbackSuccess, OptionsCallbackResponse, false, OptionsSuccess, true, OptionsSuccessResponse, false, OptionsSuccessOptions, false, OptionsFailure, true, OptionsFailureResponse, false, OptionsFailureOptions, false, OptionsScope, false, OptionsTimeout, OptionsForm, OptionsIsUpload, OptionsHeaders, false, OptionsXmlData, false, OptionsJsonData]) + ',' + VarToJSON(OptionsBinaryData) + ',' + VarToJSON([OptionsDisableCaching, OptionsWithCredentials, OptionsBinary]) + ');', 'TExtDataConnection'); + Result := Self; +end; + +function TExtDataConnection.ResumeEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtDataConnection'); + Result := Self; +end; + +function TExtDataConnection.ResumeEvents : TExtFunction; begin + JSCode(JSName + '.resumeEvents();', 'TExtDataConnection'); + Result := Self; +end; + +function TExtDataConnection.SetOptions(Options : TExtObject; Scope : TExtObject) : TExtFunction; begin + JSCode(JSName + '.setOptions(' + VarToJSON([Options, false, Scope, false]) + ');', 'TExtDataConnection'); + Result := Self; +end; + +function TExtDataConnection.SuspendEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtDataConnection'); + Result := Self; +end; + +function TExtDataConnection.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin + JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtDataConnection'); + Result := Self; +end; + +function TExtDataConnection.Upload(Form : String; Url : String; Params : String; Options : TExtObject) : TExtFunction; begin + JSCode(JSName + '.upload(' + VarToJSON([Form, Url, Params, Options, false]) + ');', 'TExtDataConnection'); + Result := Self; +end; + +destructor TExtDataConnection.Destroy; begin + try + FDefaultHeaders.Free; + FExtraParams.Free; + FHasListeners.Free; + FListeners.Free; + except end; + inherited; end; -procedure TExtDataTree.SetFOnRemove(Value : TExtDataTreeOnRemove); begin - if Assigned(FOnRemove) then - JSCode(JSName+'.events ["remove"].listeners=[];'); - if Assigned(Value) then - AddListener('remove', Ajax('remove', [], true)); - FOnRemove := Value; +procedure TExtDataConnection.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'beforerequest') and Assigned(FOnBeforerequest) then + FOnBeforerequest(TExtDataConnection(ParamAsObject('Conn')), TExtObject(ParamAsObject('Options'))) + else if (AEvtName = 'requestcomplete') and Assigned(FOnRequestcomplete) then + FOnRequestcomplete(TExtDataConnection(ParamAsObject('Conn')), TExtObject(ParamAsObject('Response')), TExtObject(ParamAsObject('Options'))) + else if (AEvtName = 'requestexception') and Assigned(FOnRequestexception) then + FOnRequestexception(TExtDataConnection(ParamAsObject('Conn')), TExtObject(ParamAsObject('Response')), TExtObject(ParamAsObject('Options'))); end; -procedure TExtDataTree.SetFOnRootchange(Value : TExtDataTreeOnRootchange); begin - if Assigned(FOnRootchange) then - JSCode(JSName+'.events ["rootchange"].listeners=[];'); - if Assigned(Value) then - AddListener('rootchange', Ajax('rootchange', ['Root', '%0.nm'], true)); - FOnRootchange := Value; +procedure TExtContainerDockingContainer.SetFDefaultDockWeights(Value : TExtObject); begin + FDefaultDockWeights := Value; + Value.DeleteFromGarbage; + JSCode('defaultDockWeights:' + VarToJSON([Value, false])); end; -procedure TExtDataTree.SetFOnSort(Value : TExtDataTreeOnSort); begin - if Assigned(FOnSort) then - JSCode(JSName+'.events ["sort"].listeners=[];'); - if Assigned(Value) then - AddListener('sort', Ajax('sort', [], true)); - FOnSort := Value; +function TExtContainerDockingContainer.JSClassName : string; begin + Result := 'Ext.container.DockingContainer'; end; -function TExtDataTree.JSClassName : string; begin - Result := 'Ext.data.Tree'; +procedure TExtContainerDockingContainer.InitDefaults; begin + inherited; + FDefaultDockWeights := TExtObject.CreateInternal(Self, 'defaultDockWeights'); end; -{$IFDEF FPC}constructor TExtDataTree.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtContainerDockingContainer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtDataTree.AddEvents(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtDataTree'); +function TExtContainerDockingContainer.AddDocked(Component : TExtObject; Pos : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.addDocked(' + VarToJSON([Component, false, Pos]) + ');', 'TExtContainerDockingContainer'); Result := Self; end; -function TExtDataTree.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtDataTree'); - Result := Self; +constructor TExtContainerDockingContainer.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -function TExtDataTree.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtDataTree'); +function TExtContainerDockingContainer.GetDockedComponent(Comp : Integer) : TExtFunction; begin + JSCode(JSName + '.getDockedComponent(' + VarToJSON([Comp]) + ');', 'TExtContainerDockingContainer'); Result := Self; end; -function TExtDataTree.ClearListeners : TExtFunction; begin - JSCode(JSName + '.clearListeners();', 'TExtDataTree'); +function TExtContainerDockingContainer.GetDockedItems(Selector : String; BeforeBody : Boolean) : TExtFunction; begin + JSCode(JSName + '.getDockedItems(' + VarToJSON([Selector, BeforeBody]) + ');', 'TExtContainerDockingContainer'); Result := Self; end; -function TExtDataTree.ClearManagedListeners : TExtFunction; begin - JSCode(JSName + '.clearManagedListeners();', 'TExtDataTree'); +function TExtContainerDockingContainer.InsertDocked(Pos : Integer; Component : TExtObject) : TExtFunction; begin + JSCode(JSName + '.insertDocked(' + VarToJSON([Pos, Component, false]) + ');', 'TExtContainerDockingContainer'); Result := Self; end; -constructor TExtDataTree.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +function TExtContainerDockingContainer.RemoveDocked(Item : TExtComponent; AutoDestroy : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.removeDocked(' + VarToJSON([Item, false, AutoDestroy]) + ');', 'TExtContainerDockingContainer'); + Result := Self; end; -function TExtDataTree.EnableBubble(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtDataTree'); - Result := Self; +destructor TExtContainerDockingContainer.Destroy; begin + try + FDefaultDockWeights.Free; + except end; + inherited; end; -function TExtDataTree.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDataTree'); - Result := Self; +function TExtZIndexManager.JSClassName : string; begin + Result := 'Ext.ZIndexManager'; end; -function TExtDataTree.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDataTree'); +{$IFDEF FPC}constructor TExtZIndexManager.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtZIndexManager.BringToFront(Comp : String) : TExtFunction; begin + JSCode(JSName + '.bringToFront(' + VarToJSON([Comp]) + ');', 'TExtZIndexManager'); Result := Self; end; -function TExtDataTree.GetNodeById(Id : String) : TExtFunction; begin - JSCode(JSName + '.getNodeById(' + VarToJSON([Id]) + ');', 'TExtDataTree'); +function TExtZIndexManager.Each(Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.each(' + VarToJSON([Fn, true, Scope, false]) + ');', 'TExtZIndexManager'); Result := Self; end; -function TExtDataTree.HasListener(EventName : String) : TExtFunction; begin - JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtDataTree'); +function TExtZIndexManager.EachBottomUp(Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.eachBottomUp(' + VarToJSON([Fn, true, Scope, false]) + ');', 'TExtZIndexManager'); Result := Self; end; -function TExtDataTree.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin - JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtDataTree'); +function TExtZIndexManager.EachTopDown(Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.eachTopDown(' + VarToJSON([Fn, true, Scope, false]) + ');', 'TExtZIndexManager'); Result := Self; end; -function TExtDataTree.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtDataTree'); +function TExtZIndexManager.Get(Id : String) : TExtFunction; begin + JSCode(JSName + '.get(' + VarToJSON([Id]) + ');', 'TExtZIndexManager'); Result := Self; end; -function TExtDataTree.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtDataTree'); +function TExtZIndexManager.GetActive : TExtFunction; begin + JSCode(JSName + '.getActive();', 'TExtZIndexManager'); Result := Self; end; -function TExtDataTree.RemoveRootNode : TExtFunction; begin - JSCode(JSName + '.removeRootNode();', 'TExtDataTree'); +function TExtZIndexManager.GetBy(Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.getBy(' + VarToJSON([Fn, true, Scope, false]) + ');', 'TExtZIndexManager'); Result := Self; end; -function TExtDataTree.ResumeEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtDataTree'); +function TExtZIndexManager.HideAll : TExtFunction; begin + JSCode(JSName + '.hideAll();', 'TExtZIndexManager'); Result := Self; end; -function TExtDataTree.ResumeEvents : TExtFunction; begin - JSCode(JSName + '.resumeEvents();', 'TExtDataTree'); +function TExtZIndexManager.Register(Comp : TExtComponent) : TExtFunction; begin + JSCode(JSName + '.register(' + VarToJSON([Comp, false]) + ');', 'TExtZIndexManager'); Result := Self; end; -function TExtDataTree.SuspendEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtDataTree'); +function TExtZIndexManager.SendToBack(Comp : String) : TExtFunction; begin + JSCode(JSName + '.sendToBack(' + VarToJSON([Comp]) + ');', 'TExtZIndexManager'); Result := Self; end; -function TExtDataTree.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin - JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtDataTree'); +function TExtZIndexManager.Unregister(Comp : TExtComponent) : TExtFunction; begin + JSCode(JSName + '.unregister(' + VarToJSON([Comp, false]) + ');', 'TExtZIndexManager'); Result := Self; end; -procedure TExtDataTree.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'append') and Assigned(FOnAppend) then - FOnAppend() - else if (AEvtName = 'beforeappend') and Assigned(FOnBeforeappend) then - FOnBeforeappend() - else if (AEvtName = 'beforecollapse') and Assigned(FOnBeforecollapse) then - FOnBeforecollapse() - else if (AEvtName = 'beforeexpand') and Assigned(FOnBeforeexpand) then - FOnBeforeexpand() - else if (AEvtName = 'beforeinsert') and Assigned(FOnBeforeinsert) then - FOnBeforeinsert() - else if (AEvtName = 'beforemove') and Assigned(FOnBeforemove) then - FOnBeforemove() - else if (AEvtName = 'beforeremove') and Assigned(FOnBeforeremove) then - FOnBeforeremove() - else if (AEvtName = 'collapse') and Assigned(FOnCollapse) then - FOnCollapse() - else if (AEvtName = 'expand') and Assigned(FOnExpand) then - FOnExpand() - else if (AEvtName = 'insert') and Assigned(FOnInsert) then - FOnInsert() - else if (AEvtName = 'move') and Assigned(FOnMove) then - FOnMove() - else if (AEvtName = 'remove') and Assigned(FOnRemove) then - FOnRemove() - else if (AEvtName = 'rootchange') and Assigned(FOnRootchange) then - FOnRootchange(TExtDataModel(ParamAsObject('Root'))) - else if (AEvtName = 'sort') and Assigned(FOnSort) then - FOnSort(); +function TExtContainerMonitor.JSClassName : string; begin + Result := 'Ext.container.Monitor'; end; -procedure TExtDataOperation.SetFAction(Value : String); begin - FAction := Value; - JSCode('action:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtContainerMonitor.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtDataOperation.SetFActionCommitRecordsRe(Value : TRegExp); begin - FActionCommitRecordsRe := Value; - JSCode(JSName + '.actionCommitRecordsRe=' + VarToJSON([#3 +Value]) + ';'); +procedure TExtDataAssociationBelongsTo.SetFForeignKey(Value : String); begin + FForeignKey := Value; + JSCode('foreignKey:' + VarToJSON([Value])); end; -procedure TExtDataOperation.SetFActionSkipSyncRe(Value : TRegExp); begin - FActionSkipSyncRe := Value; - JSCode(JSName + '.actionSkipSyncRe=' + VarToJSON([#3 +Value]) + ';'); +procedure TExtDataAssociationBelongsTo.SetFGetterName(Value : String); begin + FGetterName := Value; + JSCode('getterName:' + VarToJSON([Value])); end; -procedure TExtDataOperation.SetFBatch(Value : TExtDataBatch); begin - FBatch := Value; - Value.DeleteFromGarbage; - JSCode('batch:' + VarToJSON([Value, false])); +procedure TExtDataAssociationBelongsTo.SetFSetterName(Value : String); begin + FSetterName := Value; + JSCode('setterName:' + VarToJSON([Value])); end; -procedure TExtDataOperation.SetFCallback(Value : TExtFunction); begin - FCallback := Value; - JSCode('callback:' + VarToJSON([Value, true])); +procedure TExtDataAssociationBelongsTo.SetFTypeJS(Value : String); begin + FTypeJS := Value; + JSCode('typeJS:' + VarToJSON([Value])); end; -procedure TExtDataOperation.SetFFilters(Value : TExtObjectList); begin - FFilters := Value; - Value.DeleteFromGarbage; - JSCode('filters:' + VarToJSON([Value, false])); +function TExtDataAssociationBelongsTo.JSClassName : string; begin + Result := 'Ext.data.association.BelongsTo'; end; -procedure TExtDataOperation.SetFGroupers(Value : TExtObjectList); begin - FGroupers := Value; - Value.DeleteFromGarbage; - JSCode('groupers:' + VarToJSON([Value, false])); +procedure TExtDataAssociationBelongsTo.InitDefaults; begin + inherited; + FForeignKey := '_id'; + FGetterName := 'get'; + FSetterName := 'set'; end; -procedure TExtDataOperation.SetFLimit(Value : Integer); begin - FLimit := Value; - JSCode('limit:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtDataAssociationBelongsTo.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtDataOperation.SetFParams(Value : TExtObject); begin - FParams := Value; - Value.DeleteFromGarbage; - JSCode('params:' + VarToJSON([Value, false])); +constructor TExtDataAssociationBelongsTo.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtDataOperation.SetFScope(Value : TExtObject); begin - FScope := Value; - Value.DeleteFromGarbage; - JSCode('scope:' + VarToJSON([Value, false])); +procedure TExtDataAssociation.SetFAssociatedModel(Value : String); begin + FAssociatedModel := Value; + JSCode('associatedModel:' + VarToJSON([Value])); end; -procedure TExtDataOperation.SetFSorters(Value : TExtObjectList); begin - FSorters := Value; - Value.DeleteFromGarbage; - JSCode('sorters:' + VarToJSON([Value, false])); +procedure TExtDataAssociation.SetFAssociatedName(Value : String); begin + FAssociatedName := Value; + JSCode(JSName + '.associatedName=' + VarToJSON([Value]) + ';'); end; -procedure TExtDataOperation.SetFStart(Value : Integer); begin - FStart := Value; - JSCode('start:' + VarToJSON([Value])); +procedure TExtDataAssociation.SetFAssociationKey(Value : String); begin + FAssociationKey := Value; + JSCode('associationKey:' + VarToJSON([Value])); end; -procedure TExtDataOperation.SetFSynchronous(Value : Boolean); begin - FSynchronous := Value; - JSCode('synchronous:' + VarToJSON([Value])); +procedure TExtDataAssociation.SetFModel(Value : String); begin + FModel := Value; + JSCode('model:' + VarToJSON([Value])); end; -function TExtDataOperation.JSClassName : string; begin - Result := 'Ext.data.Operation'; +procedure TExtDataAssociation.SetFOwnerModel(Value : String); begin + FOwnerModel := Value; + JSCode('ownerModel:' + VarToJSON([Value])); end; -procedure TExtDataOperation.InitDefaults; begin - inherited; - FBatch := TExtDataBatch.CreateInternal(Self, 'batch'); - FFilters := TExtObjectList.Create(Self, 'filters'); - FGroupers := TExtObjectList.Create(Self, 'groupers'); - FParams := TExtObject.CreateInternal(Self, 'params'); - FScope := TExtObject.CreateInternal(Self, 'scope'); - FSorters := TExtObjectList.Create(Self, 'sorters'); +procedure TExtDataAssociation.SetFOwnerName(Value : String); begin + FOwnerName := Value; + JSCode(JSName + '.ownerName=' + VarToJSON([Value]) + ';'); end; -{$IFDEF FPC}constructor TExtDataOperation.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDataOperation.AllowWrite : TExtFunction; begin - JSCode(JSName + '.allowWrite();', 'TExtDataOperation'); - Result := Self; +procedure TExtDataAssociation.SetFPrimaryKey(Value : String); begin + FPrimaryKey := Value; + JSCode('primaryKey:' + VarToJSON([Value])); end; -function TExtDataOperation.CommitRecords(ServerRecords : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.commitRecords(' + VarToJSON(ServerRecords) + ');', 'TExtDataOperation'); - Result := Self; +procedure TExtDataAssociation.SetFReader(Value : TExtDataReader); begin + FReader := Value; + Value.DeleteFromGarbage; + JSCode('reader:' + VarToJSON([Value, false])); end; -constructor TExtDataOperation.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +function TExtDataAssociation.JSClassName : string; begin + Result := 'Ext.data.association.Association'; end; -function TExtDataOperation.GetError : TExtFunction; begin - JSCode(JSName + '.getError();', 'TExtDataOperation'); - Result := Self; +procedure TExtDataAssociation.InitDefaults; begin + inherited; + FReader := TExtDataReader.CreateInternal(Self, 'reader'); end; -function TExtDataOperation.GetRecords : TExtFunction; begin - JSCode(JSName + '.getRecords();', 'TExtDataOperation'); - Result := Self; -end; +{$IFDEF FPC}constructor TExtDataAssociation.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtDataOperation.GetResultSet : TExtFunction; begin - JSCode(JSName + '.getResultSet();', 'TExtDataOperation'); - Result := Self; +constructor TExtDataAssociation.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -function TExtDataOperation.HasException : TExtFunction; begin - JSCode(JSName + '.hasException();', 'TExtDataOperation'); +function TExtDataAssociation.GetReader : TExtFunction; begin + JSCode(JSName + '.getReader();', 'TExtDataAssociation'); Result := Self; end; -function TExtDataOperation.IsComplete : TExtFunction; begin - JSCode(JSName + '.isComplete();', 'TExtDataOperation'); - Result := Self; +destructor TExtDataAssociation.Destroy; begin + try + FReader.Free; + except end; + inherited; end; -function TExtDataOperation.IsRunning : TExtFunction; begin - JSCode(JSName + '.isRunning();', 'TExtDataOperation'); - Result := Self; +procedure TExtDataRequest.SetFAction(Value : String); begin + FAction := Value; + JSCode('action:' + VarToJSON([Value])); end; -function TExtDataOperation.IsStarted : TExtFunction; begin - JSCode(JSName + '.isStarted();', 'TExtDataOperation'); - Result := Self; +procedure TExtDataRequest.SetFMethod(Value : String); begin + FMethod := Value; + JSCode('method:' + VarToJSON([Value])); end; -function TExtDataOperation.SetCompleted : TExtFunction; begin - JSCode(JSName + '.setCompleted();', 'TExtDataOperation'); - Result := Self; +procedure TExtDataRequest.SetFParams(Value : TExtObject); begin + FParams := Value; + Value.DeleteFromGarbage; + JSCode('params:' + VarToJSON([Value, false])); end; -function TExtDataOperation.SetException(Error : String = '') : TExtFunction; begin - JSCode(JSName + '.setException(' + VarToJSON([Error]) + ');', 'TExtDataOperation'); - Result := Self; +procedure TExtDataRequest.SetFUrl(Value : String); begin + FUrl := Value; + JSCode('url:' + VarToJSON([Value])); end; -function TExtDataOperation.SetStarted : TExtFunction; begin - JSCode(JSName + '.setStarted();', 'TExtDataOperation'); - Result := Self; +function TExtDataRequest.JSClassName : string; begin + Result := 'Ext.data.Request'; end; -function TExtDataOperation.SetSuccessful : TExtFunction; begin - JSCode(JSName + '.setSuccessful();', 'TExtDataOperation'); - Result := Self; +procedure TExtDataRequest.InitDefaults; begin + inherited; + FParams := TExtObject.CreateInternal(Self, 'params'); end; -function TExtDataOperation.WasSuccessful : TExtFunction; begin - JSCode(JSName + '.wasSuccessful();', 'TExtDataOperation'); - Result := Self; +{$IFDEF FPC}constructor TExtDataRequest.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtDataRequest.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -destructor TExtDataOperation.Destroy; begin +destructor TExtDataRequest.Destroy; begin try - FBatch.Free; - FFilters.Free; - FGroupers.Free; FParams.Free; - FScope.Free; - FSorters.Free; except end; inherited; end; -function TExtContainerMonitor.JSClassName : string; begin - Result := 'Ext.container.Monitor'; -end; - -{$IFDEF FPC}constructor TExtContainerMonitor.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtChartTip.JSClassName : string; begin - Result := 'Ext.chart.Tip'; -end; - -{$IFDEF FPC}constructor TExtChartTip.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - procedure TExtDataProxy.SetFBatchActions(Value : Boolean); begin FBatchActions := Value; JSCode('batchActions:' + VarToJSON([Value])); @@ -23718,259 +24808,444 @@ function TExtDataProxy.ResumeEvents : TExtFunction; begin Result := Self; end; -function TExtDataProxy.SetModel(Model : String; SetOnStore : Boolean) : TExtFunction; begin - JSCode(JSName + '.setModel(' + VarToJSON([Model, SetOnStore]) + ');', 'TExtDataProxy'); - Result := Self; +function TExtDataProxy.SetModel(Model : String; SetOnStore : Boolean) : TExtFunction; begin + JSCode(JSName + '.setModel(' + VarToJSON([Model, SetOnStore]) + ');', 'TExtDataProxy'); + Result := Self; +end; + +function TExtDataProxy.SetReader(Reader : String) : TExtFunction; begin + JSCode(JSName + '.setReader(' + VarToJSON([Reader]) + ');', 'TExtDataProxy'); + Result := Self; +end; + +function TExtDataProxy.SetWriter(Writer : String) : TExtFunction; begin + JSCode(JSName + '.setWriter(' + VarToJSON([Writer]) + ');', 'TExtDataProxy'); + Result := Self; +end; + +function TExtDataProxy.SuspendEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtDataProxy'); + Result := Self; +end; + +function TExtDataProxy.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin + JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtDataProxy'); + Result := Self; +end; + +destructor TExtDataProxy.Destroy; begin + try + FHasListeners.Free; + FListeners.Free; + FModelModel.Free; + FReader.Free; + FReaderReader.Free; + FWriter.Free; + FWriterWriter.Free; + except end; + inherited; +end; + +procedure TExtDataProxy.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'metachange') and Assigned(FOnMetachange) then + FOnMetachange(TExtDataProxy(ParamAsObject('This')), TExtObject(ParamAsObject('Meta'))); +end; + +procedure TExtDataResultSet.SetFCount(Value : Integer); begin + FCount := Value; + JSCode('count:' + VarToJSON([Value])); +end; + +procedure TExtDataResultSet.SetFLoaded(Value : Boolean); begin + FLoaded := Value; + JSCode('loaded:' + VarToJSON([Value])); +end; + +procedure TExtDataResultSet.SetFRecords(Value : TExtObjectList); begin + FRecords := Value; + Value.DeleteFromGarbage; + JSCode('records:' + VarToJSON([Value, false])); +end; + +procedure TExtDataResultSet.SetFSuccess(Value : Boolean); begin + FSuccess := Value; + JSCode('success:' + VarToJSON([Value])); +end; + +procedure TExtDataResultSet.SetFTotal(Value : Integer); begin + FTotal := Value; + JSCode('total:' + VarToJSON([Value])); +end; + +procedure TExtDataResultSet.SetFTotalRecords(Value : Integer); begin + FTotalRecords := Value; + JSCode(JSName + '.totalRecords=' + VarToJSON([Value]) + ';'); +end; + +function TExtDataResultSet.JSClassName : string; begin + Result := 'Ext.data.ResultSet'; +end; + +procedure TExtDataResultSet.InitDefaults; begin + inherited; + FRecords := TExtObjectList.Create(Self, 'records'); +end; + +{$IFDEF FPC}constructor TExtDataResultSet.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtDataResultSet.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; +end; + +destructor TExtDataResultSet.Destroy; begin + try + FRecords.Free; + except end; + inherited; +end; + +procedure TExtDataTree.SetFHasListeners(Value : TExtObject); begin + FHasListeners := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.hasListeners=' + VarToJSON([Value, false]) + ';'); +end; + +procedure TExtDataTree.SetFIsObservable(Value : Boolean); begin + FIsObservable := Value; + JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); +end; + +procedure TExtDataTree.SetFListeners(Value : TExtObject); begin + FListeners := Value; + Value.DeleteFromGarbage; + JSCode('listeners:' + VarToJSON([Value, false])); +end; + +procedure TExtDataTree.SetFOnAppend(Value : TExtDataTreeOnAppend); begin + if Assigned(FOnAppend) then + JSCode(JSName+'.events ["append"].listeners=[];'); + if Assigned(Value) then + AddListener('append', Ajax('append', [], true)); + FOnAppend := Value; +end; + +procedure TExtDataTree.SetFOnBeforeappend(Value : TExtDataTreeOnBeforeappend); begin + if Assigned(FOnBeforeappend) then + JSCode(JSName+'.events ["beforeappend"].listeners=[];'); + if Assigned(Value) then + AddListener('beforeappend', Ajax('beforeappend', [], true)); + FOnBeforeappend := Value; +end; + +procedure TExtDataTree.SetFOnBeforecollapse(Value : TExtDataTreeOnBeforecollapse); begin + if Assigned(FOnBeforecollapse) then + JSCode(JSName+'.events ["beforecollapse"].listeners=[];'); + if Assigned(Value) then + AddListener('beforecollapse', Ajax('beforecollapse', [], true)); + FOnBeforecollapse := Value; +end; + +procedure TExtDataTree.SetFOnBeforeexpand(Value : TExtDataTreeOnBeforeexpand); begin + if Assigned(FOnBeforeexpand) then + JSCode(JSName+'.events ["beforeexpand"].listeners=[];'); + if Assigned(Value) then + AddListener('beforeexpand', Ajax('beforeexpand', [], true)); + FOnBeforeexpand := Value; end; -function TExtDataProxy.SetReader(Reader : String) : TExtFunction; begin - JSCode(JSName + '.setReader(' + VarToJSON([Reader]) + ');', 'TExtDataProxy'); - Result := Self; +procedure TExtDataTree.SetFOnBeforeinsert(Value : TExtDataTreeOnBeforeinsert); begin + if Assigned(FOnBeforeinsert) then + JSCode(JSName+'.events ["beforeinsert"].listeners=[];'); + if Assigned(Value) then + AddListener('beforeinsert', Ajax('beforeinsert', [], true)); + FOnBeforeinsert := Value; end; -function TExtDataProxy.SetWriter(Writer : String) : TExtFunction; begin - JSCode(JSName + '.setWriter(' + VarToJSON([Writer]) + ');', 'TExtDataProxy'); - Result := Self; +procedure TExtDataTree.SetFOnBeforemove(Value : TExtDataTreeOnBeforemove); begin + if Assigned(FOnBeforemove) then + JSCode(JSName+'.events ["beforemove"].listeners=[];'); + if Assigned(Value) then + AddListener('beforemove', Ajax('beforemove', [], true)); + FOnBeforemove := Value; end; -function TExtDataProxy.SuspendEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtDataProxy'); - Result := Self; +procedure TExtDataTree.SetFOnBeforeremove(Value : TExtDataTreeOnBeforeremove); begin + if Assigned(FOnBeforeremove) then + JSCode(JSName+'.events ["beforeremove"].listeners=[];'); + if Assigned(Value) then + AddListener('beforeremove', Ajax('beforeremove', [], true)); + FOnBeforeremove := Value; end; -function TExtDataProxy.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin - JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtDataProxy'); - Result := Self; +procedure TExtDataTree.SetFOnCollapse(Value : TExtDataTreeOnCollapse); begin + if Assigned(FOnCollapse) then + JSCode(JSName+'.events ["collapse"].listeners=[];'); + if Assigned(Value) then + AddListener('collapse', Ajax('collapse', [], true)); + FOnCollapse := Value; end; -destructor TExtDataProxy.Destroy; begin - try - FHasListeners.Free; - FListeners.Free; - FModelModel.Free; - FReader.Free; - FReaderReader.Free; - FWriter.Free; - FWriterWriter.Free; - except end; - inherited; +procedure TExtDataTree.SetFOnExpand(Value : TExtDataTreeOnExpand); begin + if Assigned(FOnExpand) then + JSCode(JSName+'.events ["expand"].listeners=[];'); + if Assigned(Value) then + AddListener('expand', Ajax('expand', [], true)); + FOnExpand := Value; end; -procedure TExtDataProxy.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'metachange') and Assigned(FOnMetachange) then - FOnMetachange(TExtDataProxy(ParamAsObject('This')), TExtObject(ParamAsObject('Meta'))); +procedure TExtDataTree.SetFOnInsert(Value : TExtDataTreeOnInsert); begin + if Assigned(FOnInsert) then + JSCode(JSName+'.events ["insert"].listeners=[];'); + if Assigned(Value) then + AddListener('insert', Ajax('insert', [], true)); + FOnInsert := Value; end; -procedure TExtDataFlashBinaryXhr.SetFReadyState(Value : Integer); begin - FReadyState := Value; - JSCode(JSName + '.readyState=' + VarToJSON([Value]) + ';'); +procedure TExtDataTree.SetFOnMove(Value : TExtDataTreeOnMove); begin + if Assigned(FOnMove) then + JSCode(JSName+'.events ["move"].listeners=[];'); + if Assigned(Value) then + AddListener('move', Ajax('move', [], true)); + FOnMove := Value; end; -procedure TExtDataFlashBinaryXhr.SetFResponseBytes(Value : TExtObjectList); begin - FResponseBytes := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.responseBytes=' + VarToJSON([Value, false]) + ';'); +procedure TExtDataTree.SetFOnRemove(Value : TExtDataTreeOnRemove); begin + if Assigned(FOnRemove) then + JSCode(JSName+'.events ["remove"].listeners=[];'); + if Assigned(Value) then + AddListener('remove', Ajax('remove', [], true)); + FOnRemove := Value; end; -procedure TExtDataFlashBinaryXhr.SetFStatus(Value : Integer); begin - FStatus := Value; - JSCode(JSName + '.status=' + VarToJSON([Value]) + ';'); +procedure TExtDataTree.SetFOnRootchange(Value : TExtDataTreeOnRootchange); begin + if Assigned(FOnRootchange) then + JSCode(JSName+'.events ["rootchange"].listeners=[];'); + if Assigned(Value) then + AddListener('rootchange', Ajax('rootchange', ['Root', '%0.nm'], true)); + FOnRootchange := Value; end; -function TExtDataFlashBinaryXhr.JSClassName : string; begin - Result := 'Ext.data.flash.BinaryXhr'; +procedure TExtDataTree.SetFOnSort(Value : TExtDataTreeOnSort); begin + if Assigned(FOnSort) then + JSCode(JSName+'.events ["sort"].listeners=[];'); + if Assigned(Value) then + AddListener('sort', Ajax('sort', [], true)); + FOnSort := Value; end; -procedure TExtDataFlashBinaryXhr.InitDefaults; begin - inherited; - FResponseBytes := TExtObjectList.Create(Self, 'responseBytes'); +function TExtDataTree.JSClassName : string; begin + Result := 'Ext.data.Tree'; end; -{$IFDEF FPC}constructor TExtDataFlashBinaryXhr.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtDataTree.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtDataFlashBinaryXhr.Abort : TExtFunction; begin - JSCode(JSName + '.abort();', 'TExtDataFlashBinaryXhr'); +function TExtDataTree.AddEvents(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtDataTree'); Result := Self; end; -constructor TExtDataFlashBinaryXhr.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; -end; - -function TExtDataFlashBinaryXhr.GetAllResponseHeaders : TExtFunction; begin - JSCode(JSName + '.getAllResponseHeaders();', 'TExtDataFlashBinaryXhr'); +function TExtDataTree.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtDataTree'); Result := Self; end; -function TExtDataFlashBinaryXhr.GetResponseHeader : TExtFunction; begin - JSCode(JSName + '.getResponseHeader();', 'TExtDataFlashBinaryXhr'); +function TExtDataTree.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtDataTree'); Result := Self; end; -function TExtDataFlashBinaryXhr.Open : TExtFunction; begin - JSCode(JSName + '.open();', 'TExtDataFlashBinaryXhr'); +function TExtDataTree.ClearListeners : TExtFunction; begin + JSCode(JSName + '.clearListeners();', 'TExtDataTree'); Result := Self; end; -function TExtDataFlashBinaryXhr.OverrideMimeType : TExtFunction; begin - JSCode(JSName + '.overrideMimeType();', 'TExtDataFlashBinaryXhr'); +function TExtDataTree.ClearManagedListeners : TExtFunction; begin + JSCode(JSName + '.clearManagedListeners();', 'TExtDataTree'); Result := Self; end; -function TExtDataFlashBinaryXhr.Send(Body : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.send(' + VarToJSON(Body) + ');', 'TExtDataFlashBinaryXhr'); - Result := Self; +constructor TExtDataTree.Create(Root : TExtDataNodeInterface = nil); begin + CreateVar(JSClassName + '(' + VarToJSON([Root, false]) + ');'); + InitDefaults; end; -function TExtDataFlashBinaryXhr.SetRequestHeader : TExtFunction; begin - JSCode(JSName + '.setRequestHeader();', 'TExtDataFlashBinaryXhr'); +function TExtDataTree.EnableBubble(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtDataTree'); Result := Self; end; -destructor TExtDataFlashBinaryXhr.Destroy; begin - try - FResponseBytes.Free; - except end; - inherited; -end; - -function TExtChartThemeBase.JSClassName : string; begin - Result := 'Ext.chart.theme.Base'; +function TExtDataTree.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDataTree'); + Result := Self; end; -{$IFDEF FPC}constructor TExtChartThemeBase.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtDataValidationsSingleton.SetFEmailMessage(Value : String); begin - FEmailMessage := Value; - JSCode(JSName + '.emailMessage=' + VarToJSON([Value]) + ';'); +function TExtDataTree.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDataTree'); + Result := Self; end; -procedure TExtDataValidationsSingleton.SetFEmailRe(Value : TRegExp); begin - FEmailRe := Value; - JSCode(JSName + '.emailRe=' + VarToJSON([#3 +Value]) + ';'); +function TExtDataTree.GetNodeById(Id : String) : TExtFunction; begin + JSCode(JSName + '.getNodeById(' + VarToJSON([Id]) + ');', 'TExtDataTree'); + Result := Self; end; -procedure TExtDataValidationsSingleton.SetFExclusionMessage(Value : String); begin - FExclusionMessage := Value; - JSCode(JSName + '.exclusionMessage=' + VarToJSON([Value]) + ';'); +function TExtDataTree.GetRootNode : TExtFunction; begin + JSCode(JSName + '.getRootNode();', 'TExtDataTree'); + Result := Self; end; -procedure TExtDataValidationsSingleton.SetFFormatMessage(Value : String); begin - FFormatMessage := Value; - JSCode(JSName + '.formatMessage=' + VarToJSON([Value]) + ';'); +function TExtDataTree.HasListener(EventName : String) : TExtFunction; begin + JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtDataTree'); + Result := Self; end; -procedure TExtDataValidationsSingleton.SetFInclusionMessage(Value : String); begin - FInclusionMessage := Value; - JSCode(JSName + '.inclusionMessage=' + VarToJSON([Value]) + ';'); +function TExtDataTree.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin + JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtDataTree'); + Result := Self; end; -procedure TExtDataValidationsSingleton.SetFLengthMessage(Value : String); begin - FLengthMessage := Value; - JSCode(JSName + '.lengthMessage=' + VarToJSON([Value]) + ';'); +function TExtDataTree.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtDataTree'); + Result := Self; end; -procedure TExtDataValidationsSingleton.SetFPresenceMessage(Value : String); begin - FPresenceMessage := Value; - JSCode(JSName + '.presenceMessage=' + VarToJSON([Value]) + ';'); +function TExtDataTree.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtDataTree'); + Result := Self; end; -function TExtDataValidationsSingleton.JSClassName : string; begin - Result := 'Ext.data.validations'; +function TExtDataTree.RemoveRootNode : TExtFunction; begin + JSCode(JSName + '.removeRootNode();', 'TExtDataTree'); + Result := Self; end; -{$IFDEF FPC}constructor TExtDataValidationsSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDataValidationsSingleton.Email(Config : TExtObject; Email : String) : TExtFunction; begin - JSCode(JSName + '.email(' + VarToJSON([Config, false, Email]) + ');', 'TExtDataValidationsSingleton'); +function TExtDataTree.ResumeEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtDataTree'); Result := Self; end; -function TExtDataValidationsSingleton.Exclusion(Config : TExtObject; Value : String) : TExtFunction; begin - JSCode(JSName + '.exclusion(' + VarToJSON([Config, false, Value]) + ');', 'TExtDataValidationsSingleton'); +function TExtDataTree.ResumeEvents : TExtFunction; begin + JSCode(JSName + '.resumeEvents();', 'TExtDataTree'); Result := Self; end; -function TExtDataValidationsSingleton.Format(Config : TExtObject; Value : String) : TExtFunction; begin - JSCode(JSName + '.format(' + VarToJSON([Config, false, Value]) + ');', 'TExtDataValidationsSingleton'); +function TExtDataTree.SetRootNode(Node : TExtDataNodeInterface) : TExtFunction; begin + JSCode(JSName + '.setRootNode(' + VarToJSON([Node, false]) + ');', 'TExtDataTree'); Result := Self; end; -function TExtDataValidationsSingleton.Inclusion(Config : TExtObject; Value : String) : TExtFunction; begin - JSCode(JSName + '.inclusion(' + VarToJSON([Config, false, Value]) + ');', 'TExtDataValidationsSingleton'); +function TExtDataTree.SuspendEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtDataTree'); Result := Self; end; -function TExtDataValidationsSingleton.Length(Config : TExtObject; Value : String) : TExtFunction; begin - JSCode(JSName + '.length(' + VarToJSON([Config, false, Value]) + ');', 'TExtDataValidationsSingleton'); +function TExtDataTree.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin + JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtDataTree'); Result := Self; end; -function TExtDataValidationsSingleton.Presence(Config : TExtObject; Value : TExtObject) : TExtFunction; begin - JSCode(JSName + '.presence(' + VarToJSON([Config, false, Value, false]) + ');', 'TExtDataValidationsSingleton'); - Result := Self; +procedure TExtDataTree.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'append') and Assigned(FOnAppend) then + FOnAppend() + else if (AEvtName = 'beforeappend') and Assigned(FOnBeforeappend) then + FOnBeforeappend() + else if (AEvtName = 'beforecollapse') and Assigned(FOnBeforecollapse) then + FOnBeforecollapse() + else if (AEvtName = 'beforeexpand') and Assigned(FOnBeforeexpand) then + FOnBeforeexpand() + else if (AEvtName = 'beforeinsert') and Assigned(FOnBeforeinsert) then + FOnBeforeinsert() + else if (AEvtName = 'beforemove') and Assigned(FOnBeforemove) then + FOnBeforemove() + else if (AEvtName = 'beforeremove') and Assigned(FOnBeforeremove) then + FOnBeforeremove() + else if (AEvtName = 'collapse') and Assigned(FOnCollapse) then + FOnCollapse() + else if (AEvtName = 'expand') and Assigned(FOnExpand) then + FOnExpand() + else if (AEvtName = 'insert') and Assigned(FOnInsert) then + FOnInsert() + else if (AEvtName = 'move') and Assigned(FOnMove) then + FOnMove() + else if (AEvtName = 'remove') and Assigned(FOnRemove) then + FOnRemove() + else if (AEvtName = 'rootchange') and Assigned(FOnRootchange) then + FOnRootchange(TExtDataModel(ParamAsObject('Root'))) + else if (AEvtName = 'sort') and Assigned(FOnSort) then + FOnSort(); end; -function TExtZIndexManager.JSClassName : string; begin - Result := 'Ext.ZIndexManager'; +function TExtDataSortTypesSingleton.JSClassName : string; begin + Result := 'Ext.data.SortTypes'; end; -{$IFDEF FPC}constructor TExtZIndexManager.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtDataSortTypesSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtZIndexManager.BringToFront(Comp : String) : TExtFunction; begin - JSCode(JSName + '.bringToFront(' + VarToJSON([Comp]) + ');', 'TExtZIndexManager'); +function TExtDataSortTypesSingleton.AsDate(S : TExtObject) : TExtFunction; begin + JSCode(JSName + '.asDate(' + VarToJSON([S, false]) + ');', 'TExtDataSortTypesSingleton'); Result := Self; end; -function TExtZIndexManager.Each(Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.each(' + VarToJSON([Fn, true, Scope, false]) + ');', 'TExtZIndexManager'); +function TExtDataSortTypesSingleton.AsFloat(S : TExtObject) : TExtFunction; begin + JSCode(JSName + '.asFloat(' + VarToJSON([S, false]) + ');', 'TExtDataSortTypesSingleton'); Result := Self; end; -function TExtZIndexManager.EachBottomUp(Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.eachBottomUp(' + VarToJSON([Fn, true, Scope, false]) + ');', 'TExtZIndexManager'); +function TExtDataSortTypesSingleton.AsInt(S : TExtObject) : TExtFunction; begin + JSCode(JSName + '.asInt(' + VarToJSON([S, false]) + ');', 'TExtDataSortTypesSingleton'); Result := Self; end; -function TExtZIndexManager.EachTopDown(Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.eachTopDown(' + VarToJSON([Fn, true, Scope, false]) + ');', 'TExtZIndexManager'); +function TExtDataSortTypesSingleton.AsUCString(S : TExtObject) : TExtFunction; begin + JSCode(JSName + '.asUCString(' + VarToJSON([S, false]) + ');', 'TExtDataSortTypesSingleton'); Result := Self; end; -function TExtZIndexManager.Get(Id : String) : TExtFunction; begin - JSCode(JSName + '.get(' + VarToJSON([Id]) + ');', 'TExtZIndexManager'); +function TExtDataSortTypesSingleton.AsUCText(S : TExtObject) : TExtFunction; begin + JSCode(JSName + '.asUCText(' + VarToJSON([S, false]) + ');', 'TExtDataSortTypesSingleton'); Result := Self; end; -function TExtZIndexManager.GetActive : TExtFunction; begin - JSCode(JSName + '.getActive();', 'TExtZIndexManager'); - Result := Self; +function TExtDataJsonPSingleton.JSClassName : string; begin + Result := 'Ext.data.JsonP'; end; -function TExtZIndexManager.GetBy(Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.getBy(' + VarToJSON([Fn, true, Scope, false]) + ');', 'TExtZIndexManager'); +{$IFDEF FPC}constructor TExtDataJsonPSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDataJsonPSingleton.Abort(Request : String = '') : TExtFunction; begin + JSCode(JSName + '.abort(' + VarToJSON([Request]) + ');', 'TExtDataJsonPSingleton'); Result := Self; end; -function TExtZIndexManager.HideAll : TExtFunction; begin - JSCode(JSName + '.hideAll();', 'TExtZIndexManager'); - Result := Self; +procedure TExtDataIdGenerator.SetFId(Value : String); begin + FId := Value; + JSCode('id:' + VarToJSON([Value])); end; -function TExtZIndexManager.Register(Comp : TExtComponent) : TExtFunction; begin - JSCode(JSName + '.register(' + VarToJSON([Comp, false]) + ');', 'TExtZIndexManager'); - Result := Self; +procedure TExtDataIdGenerator.SetFIsGenerator(Value : Boolean); begin + FIsGenerator := Value; + JSCode(JSName + '.isGenerator=' + VarToJSON([Value]) + ';'); end; -function TExtZIndexManager.SendToBack(Comp : String) : TExtFunction; begin - JSCode(JSName + '.sendToBack(' + VarToJSON([Comp]) + ');', 'TExtZIndexManager'); - Result := Self; +function TExtDataIdGenerator.JSClassName : string; begin + Result := 'Ext.data.IdGenerator'; end; -function TExtZIndexManager.Unregister(Comp : TExtComponent) : TExtFunction; begin - JSCode(JSName + '.unregister(' + VarToJSON([Comp, false]) + ');', 'TExtZIndexManager'); +class function TExtDataIdGenerator.All : TExtObject; +const + lAll : TExtObject = nil; +begin + if lAll = nil then lAll := TExtObject.CreateSingleton('Ext.data.IdGenerator.All'); + Result := lAll +end; + +{$IFDEF FPC}constructor TExtDataIdGenerator.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDataIdGenerator.Get(Config : String) : TExtFunction; begin + JSCode(JSName + '.get(' + VarToJSON([Config]) + ');', 'TExtDataIdGenerator'); Result := Self; end; @@ -24007,12 +25282,28 @@ procedure TExtDataModel.SetFDefaultProxyType(Value : String); begin JSCode('defaultProxyType:' + VarToJSON([Value])); end; +procedure TExtDataModel.SetFDirty(Value : Boolean); begin + FDirty := Value; + JSCode(JSName + '.dirty=' + VarToJSON([Value]) + ';'); +end; + +procedure TExtDataModel.SetFEditing(Value : Boolean); begin + FEditing := Value; + JSCode(JSName + '.editing=' + VarToJSON([Value]) + ';'); +end; + procedure TExtDataModel.SetFFields(Value : TExtObjectList); begin FFields := Value; Value.DeleteFromGarbage; JSCode('fields:' + VarToJSON([Value, false])); end; +procedure TExtDataModel.SetFFields_(Value : TExtObjectList); begin + FFields_ := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.fields=' + VarToJSON([Value, false]) + ';'); +end; + procedure TExtDataModel.SetFFieldsList(Value : TExtObjectList); begin FFieldsList := Value; Value.DeleteFromGarbage; @@ -24064,15 +25355,20 @@ procedure TExtDataModel.SetFIdPropertyObject(Value : TExtObject); begin JSCode('idProperty:' + VarToJSON([Value, false])); end; +procedure TExtDataModel.SetFIsModel(Value : Boolean); begin + FIsModel := Value; + JSCode(JSName + '.isModel=' + VarToJSON([Value]) + ';'); +end; + procedure TExtDataModel.SetFModified(Value : TExtObject); begin FModified := Value; Value.DeleteFromGarbage; JSCode(JSName + '.modified=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtDataModel.SetFPersistenceProperty(Value : String); begin - FPersistenceProperty := Value; - JSCode('persistenceProperty:' + VarToJSON([Value])); +procedure TExtDataModel.SetFPhantom(Value : Boolean); begin + FPhantom := Value; + JSCode(JSName + '.phantom=' + VarToJSON([Value]) + ';'); end; procedure TExtDataModel.SetFProxy(Value : String); begin @@ -24124,6 +25420,7 @@ procedure TExtDataModel.InitDefaults; begin FBelongsToObject := TExtObject.CreateInternal(Self, 'belongsTo'); FDefaultProxyType := 'ajax'; FFields := TExtObjectList.Create(Self, 'fields'); + FFields_ := TExtObjectList.Create(Self, 'fields'); FFieldsList := TExtObjectList.Create(Self, 'fields'); FHasManyList := TExtObjectList.Create(Self, 'hasMany'); FHasManyObject := TExtObject.CreateInternal(Self, 'hasMany'); @@ -24132,7 +25429,6 @@ procedure TExtDataModel.InitDefaults; begin FIdPropertyField := TExtDataField.CreateInternal(Self, 'idProperty'); FIdPropertyObject := TExtObject.CreateInternal(Self, 'idProperty'); FModified := TExtObject.CreateInternal(Self, 'modified'); - FPersistenceProperty := 'data'; FProxyObject := TExtObject.CreateInternal(Self, 'proxy'); FProxyProxy := TExtDataProxy.CreateInternal(Self, 'proxy'); FRaw := TExtObject.CreateInternal(Self, 'raw'); @@ -24140,136 +25436,311 @@ procedure TExtDataModel.InitDefaults; begin FValidations := TExtObjectList.Create(Self, 'validations'); end; -{$IFDEF FPC}constructor TExtDataModel.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDataModel.BeginEdit : TExtFunction; begin - JSCode(JSName + '.beginEdit();', 'TExtDataModel'); - Result := Self; +{$IFDEF FPC}constructor TExtDataModel.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDataModel.BeginEdit : TExtFunction; begin + JSCode(JSName + '.beginEdit();', 'TExtDataModel'); + Result := Self; +end; + +function TExtDataModel.CancelEdit : TExtFunction; begin + JSCode(JSName + '.cancelEdit();', 'TExtDataModel'); + Result := Self; +end; + +function TExtDataModel.Commit(Silent : Boolean = false; ModifiedFieldNames : TExtObjectList = nil) : TExtFunction; begin + JSCode(JSName + '.commit(' + VarToJSON([Silent]) + ',' + VarToJSON(ModifiedFieldNames) + ');', 'TExtDataModel'); + Result := Self; +end; + +function TExtDataModel.Copy(Id : String = '') : TExtFunction; begin + JSCode(JSName + '.copy(' + VarToJSON([Id]) + ');', 'TExtDataModel'); + Result := Self; +end; + +constructor TExtDataModel.Create(Data : TExtObjectList); begin + CreateVar(JSClassName + '(' + VarToJSON(Data) + ');'); + InitDefaults; +end; + +function TExtDataModel.EndEdit(Silent : Boolean = false; ModifiedFieldNames : TExtObjectList = nil) : TExtFunction; begin + JSCode(JSName + '.endEdit(' + VarToJSON([Silent]) + ',' + VarToJSON(ModifiedFieldNames) + ');', 'TExtDataModel'); + Result := Self; +end; + +function TExtDataModel.Get(FieldName : String) : TExtFunction; begin + JSCode(JSName + '.get(' + VarToJSON([FieldName]) + ');', 'TExtDataModel'); + Result := Self; +end; + +function TExtDataModel.GetAssociatedData : TExtFunction; begin + JSCode(JSName + '.getAssociatedData();', 'TExtDataModel'); + Result := Self; +end; + +function TExtDataModel.GetChanges : TExtFunction; begin + JSCode(JSName + '.getChanges();', 'TExtDataModel'); + Result := Self; +end; + +function TExtDataModel.GetData(IncludeAssociated : Boolean) : TExtFunction; begin + JSCode(JSName + '.getData(' + VarToJSON([IncludeAssociated]) + ');', 'TExtDataModel'); + Result := Self; +end; + +function TExtDataModel.GetId : TExtFunction; begin + JSCode(JSName + '.getId();', 'TExtDataModel'); + Result := Self; +end; + +function TExtDataModel.GetProxy : TExtFunction; begin + JSCode(JSName + '.getProxy();', 'TExtDataModel'); + Result := Self; +end; + +function TExtDataModel.IsModified(FieldName : String) : TExtFunction; begin + JSCode(JSName + '.isModified(' + VarToJSON([FieldName]) + ');', 'TExtDataModel'); + Result := Self; +end; + +function TExtDataModel.IsValid : TExtFunction; begin + JSCode(JSName + '.isValid();', 'TExtDataModel'); + Result := Self; +end; + +function TExtDataModel.Join(Store : TExtDataStore) : TExtFunction; begin + JSCode(JSName + '.join(' + VarToJSON([Store, false]) + ');', 'TExtDataModel'); + Result := Self; +end; + +function TExtDataModel.Reject(Silent : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.reject(' + VarToJSON([Silent]) + ');', 'TExtDataModel'); + Result := Self; +end; + +function TExtDataModel.Save(Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.save(' + VarToJSON([Options, false]) + ');', 'TExtDataModel'); + Result := Self; +end; + +function TExtDataModel.SetDirty : TExtFunction; begin + JSCode(JSName + '.setDirty();', 'TExtDataModel'); + Result := Self; +end; + +function TExtDataModel.SetId(Id : Integer) : TExtFunction; begin + JSCode(JSName + '.setId(' + VarToJSON([Id]) + ');', 'TExtDataModel'); + Result := Self; +end; + +function TExtDataModel.SetJS(FieldName : String; NewValue : TExtObject) : TExtFunction; begin + JSCode(JSName + '.set(' + VarToJSON([FieldName, NewValue, false]) + ');', 'TExtDataModel'); + Result := Self; +end; + +function TExtDataModel.SetProxy(Proxy : String) : TExtFunction; begin + JSCode(JSName + '.setProxy(' + VarToJSON([Proxy]) + ');', 'TExtDataModel'); + Result := Self; +end; + +function TExtDataModel.Validate : TExtFunction; begin + JSCode(JSName + '.validate();', 'TExtDataModel'); + Result := Self; +end; + +destructor TExtDataModel.Destroy; begin + try + FAssociations.Free; + FBelongsToList.Free; + FBelongsToObject.Free; + FFields.Free; + FFields_.Free; + FFieldsList.Free; + FHasManyList.Free; + FHasManyObject.Free; + FIdgenObject.Free; + FIdPropertyField.Free; + FIdPropertyObject.Free; + FModified.Free; + FProxyObject.Free; + FProxyProxy.Free; + FRaw.Free; + FStores.Free; + FValidations.Free; + except end; + inherited; +end; + +procedure TExtDataOperation.SetFAction(Value : String); begin + FAction := Value; + JSCode('action:' + VarToJSON([Value])); +end; + +procedure TExtDataOperation.SetFActionCommitRecordsRe(Value : TRegExp); begin + FActionCommitRecordsRe := Value; + JSCode(JSName + '.actionCommitRecordsRe=' + VarToJSON([#3 +Value]) + ';'); +end; + +procedure TExtDataOperation.SetFActionSkipSyncRe(Value : TRegExp); begin + FActionSkipSyncRe := Value; + JSCode(JSName + '.actionSkipSyncRe=' + VarToJSON([#3 +Value]) + ';'); +end; + +procedure TExtDataOperation.SetFBatch(Value : TExtDataBatch); begin + FBatch := Value; + Value.DeleteFromGarbage; + JSCode('batch:' + VarToJSON([Value, false])); +end; + +procedure TExtDataOperation.SetFCallback(Value : TExtFunction); begin + FCallback := Value; + JSCode('callback:' + VarToJSON([Value, true])); +end; + +procedure TExtDataOperation.SetFFilters(Value : TExtObjectList); begin + FFilters := Value; + Value.DeleteFromGarbage; + JSCode('filters:' + VarToJSON([Value, false])); +end; + +procedure TExtDataOperation.SetFGroupers(Value : TExtObjectList); begin + FGroupers := Value; + Value.DeleteFromGarbage; + JSCode('groupers:' + VarToJSON([Value, false])); +end; + +procedure TExtDataOperation.SetFLimit(Value : Integer); begin + FLimit := Value; + JSCode('limit:' + VarToJSON([Value])); +end; + +procedure TExtDataOperation.SetFParams(Value : TExtObject); begin + FParams := Value; + Value.DeleteFromGarbage; + JSCode('params:' + VarToJSON([Value, false])); end; -function TExtDataModel.CancelEdit : TExtFunction; begin - JSCode(JSName + '.cancelEdit();', 'TExtDataModel'); - Result := Self; +procedure TExtDataOperation.SetFScope(Value : TExtObject); begin + FScope := Value; + Value.DeleteFromGarbage; + JSCode('scope:' + VarToJSON([Value, false])); end; -function TExtDataModel.Commit(Silent : Boolean = false; ModifiedFieldNames : TExtObjectList = nil) : TExtFunction; begin - JSCode(JSName + '.commit(' + VarToJSON([Silent]) + ',' + VarToJSON(ModifiedFieldNames) + ');', 'TExtDataModel'); - Result := Self; +procedure TExtDataOperation.SetFSorters(Value : TExtObjectList); begin + FSorters := Value; + Value.DeleteFromGarbage; + JSCode('sorters:' + VarToJSON([Value, false])); end; -function TExtDataModel.Copy(Id : String = '') : TExtFunction; begin - JSCode(JSName + '.copy(' + VarToJSON([Id]) + ');', 'TExtDataModel'); - Result := Self; +procedure TExtDataOperation.SetFStart(Value : Integer); begin + FStart := Value; + JSCode('start:' + VarToJSON([Value])); end; -constructor TExtDataModel.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtDataOperation.SetFSynchronous(Value : Boolean); begin + FSynchronous := Value; + JSCode('synchronous:' + VarToJSON([Value])); end; -function TExtDataModel.EndEdit(Silent : Boolean = false; ModifiedFieldNames : TExtObjectList = nil) : TExtFunction; begin - JSCode(JSName + '.endEdit(' + VarToJSON([Silent]) + ',' + VarToJSON(ModifiedFieldNames) + ');', 'TExtDataModel'); - Result := Self; +function TExtDataOperation.JSClassName : string; begin + Result := 'Ext.data.Operation'; end; -function TExtDataModel.Get(FieldName : String) : TExtFunction; begin - JSCode(JSName + '.get(' + VarToJSON([FieldName]) + ');', 'TExtDataModel'); - Result := Self; +procedure TExtDataOperation.InitDefaults; begin + inherited; + FBatch := TExtDataBatch.CreateInternal(Self, 'batch'); + FFilters := TExtObjectList.Create(Self, 'filters'); + FGroupers := TExtObjectList.Create(Self, 'groupers'); + FParams := TExtObject.CreateInternal(Self, 'params'); + FScope := TExtObject.CreateInternal(Self, 'scope'); + FSorters := TExtObjectList.Create(Self, 'sorters'); end; -function TExtDataModel.GetAssociatedData : TExtFunction; begin - JSCode(JSName + '.getAssociatedData();', 'TExtDataModel'); +{$IFDEF FPC}constructor TExtDataOperation.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDataOperation.AllowWrite : TExtFunction; begin + JSCode(JSName + '.allowWrite();', 'TExtDataOperation'); Result := Self; end; -function TExtDataModel.GetChanges : TExtFunction; begin - JSCode(JSName + '.getChanges();', 'TExtDataModel'); +function TExtDataOperation.CommitRecords(ServerRecords : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.commitRecords(' + VarToJSON(ServerRecords) + ');', 'TExtDataOperation'); Result := Self; end; -function TExtDataModel.GetData(IncludeAssociated : Boolean) : TExtFunction; begin - JSCode(JSName + '.getData(' + VarToJSON([IncludeAssociated]) + ');', 'TExtDataModel'); - Result := Self; +constructor TExtDataOperation.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -function TExtDataModel.GetId : TExtFunction; begin - JSCode(JSName + '.getId();', 'TExtDataModel'); +function TExtDataOperation.GetError : TExtFunction; begin + JSCode(JSName + '.getError();', 'TExtDataOperation'); Result := Self; end; -function TExtDataModel.GetProxy : TExtFunction; begin - JSCode(JSName + '.getProxy();', 'TExtDataModel'); +function TExtDataOperation.GetRecords : TExtFunction; begin + JSCode(JSName + '.getRecords();', 'TExtDataOperation'); Result := Self; end; -function TExtDataModel.IsModified(FieldName : String) : TExtFunction; begin - JSCode(JSName + '.isModified(' + VarToJSON([FieldName]) + ');', 'TExtDataModel'); +function TExtDataOperation.GetResultSet : TExtFunction; begin + JSCode(JSName + '.getResultSet();', 'TExtDataOperation'); Result := Self; end; -function TExtDataModel.IsValid : TExtFunction; begin - JSCode(JSName + '.isValid();', 'TExtDataModel'); +function TExtDataOperation.HasException : TExtFunction; begin + JSCode(JSName + '.hasException();', 'TExtDataOperation'); Result := Self; end; -function TExtDataModel.Join(Store : TExtDataStore) : TExtFunction; begin - JSCode(JSName + '.join(' + VarToJSON([Store, false]) + ');', 'TExtDataModel'); +function TExtDataOperation.IsComplete : TExtFunction; begin + JSCode(JSName + '.isComplete();', 'TExtDataOperation'); Result := Self; end; -function TExtDataModel.Reject(Silent : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.reject(' + VarToJSON([Silent]) + ');', 'TExtDataModel'); +function TExtDataOperation.IsRunning : TExtFunction; begin + JSCode(JSName + '.isRunning();', 'TExtDataOperation'); Result := Self; end; -function TExtDataModel.Save(Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.save(' + VarToJSON([Options, false]) + ');', 'TExtDataModel'); +function TExtDataOperation.IsStarted : TExtFunction; begin + JSCode(JSName + '.isStarted();', 'TExtDataOperation'); Result := Self; end; -function TExtDataModel.SetDirty : TExtFunction; begin - JSCode(JSName + '.setDirty();', 'TExtDataModel'); +function TExtDataOperation.SetCompleted : TExtFunction; begin + JSCode(JSName + '.setCompleted();', 'TExtDataOperation'); Result := Self; end; -function TExtDataModel.SetId(Id : Integer) : TExtFunction; begin - JSCode(JSName + '.setId(' + VarToJSON([Id]) + ');', 'TExtDataModel'); +function TExtDataOperation.SetException(Error : String = '') : TExtFunction; begin + JSCode(JSName + '.setException(' + VarToJSON([Error]) + ');', 'TExtDataOperation'); Result := Self; end; -function TExtDataModel.SetJS(FieldName : String; NewValue : TExtObject) : TExtFunction; begin - JSCode(JSName + '.set(' + VarToJSON([FieldName, NewValue, false]) + ');', 'TExtDataModel'); +function TExtDataOperation.SetStarted : TExtFunction; begin + JSCode(JSName + '.setStarted();', 'TExtDataOperation'); Result := Self; end; -function TExtDataModel.SetProxy(Proxy : String) : TExtFunction; begin - JSCode(JSName + '.setProxy(' + VarToJSON([Proxy]) + ');', 'TExtDataModel'); +function TExtDataOperation.SetSuccessful : TExtFunction; begin + JSCode(JSName + '.setSuccessful();', 'TExtDataOperation'); Result := Self; end; -function TExtDataModel.Validate : TExtFunction; begin - JSCode(JSName + '.validate();', 'TExtDataModel'); +function TExtDataOperation.WasSuccessful : TExtFunction; begin + JSCode(JSName + '.wasSuccessful();', 'TExtDataOperation'); Result := Self; end; -destructor TExtDataModel.Destroy; begin +destructor TExtDataOperation.Destroy; begin try - FAssociations.Free; - FBelongsToList.Free; - FBelongsToObject.Free; - FFields.Free; - FFieldsList.Free; - FHasManyList.Free; - FHasManyObject.Free; - FIdgenObject.Free; - FIdPropertyField.Free; - FIdPropertyObject.Free; - FModified.Free; - FProxyObject.Free; - FProxyProxy.Free; - FRaw.Free; - FStores.Free; - FValidations.Free; + FBatch.Free; + FFilters.Free; + FGroupers.Free; + FParams.Free; + FScope.Free; + FSorters.Free; except end; inherited; end; @@ -24800,1132 +26271,823 @@ procedure TExtDataNodeInterface.HandleEvent(const AEvtName : string); begin FOnSort(TExtDataNodeInterface(ParamAsObject('This')), TExtObjectList(ParamAsObject('ChildNodes'))); end; -procedure TExtDataTypesSingleton.SetFStripRe(Value : TRegExp); begin - FStripRe := Value; - JSCode(JSName + '.stripRe=' + VarToJSON([#3 +Value]) + ';'); -end; - -function TExtDataTypesSingleton.JSClassName : string; begin - Result := 'Ext.data.Types'; -end; - -class function TExtDataTypesSingleton.AUTO : TExtObject; -const - lAUTO : TExtObject = nil; -begin - if lAUTO = nil then lAUTO := TExtObject.CreateSingleton('Ext.data.Types.AUTO'); - Result := lAUTO -end; - -class function TExtDataTypesSingleton.BOOL : TExtObject; -const - lBOOL : TExtObject = nil; -begin - if lBOOL = nil then lBOOL := TExtObject.CreateSingleton('Ext.data.Types.BOOL'); - Result := lBOOL -end; - -class function TExtDataTypesSingleton.BOOLEAN : TExtObject; -const - lBOOLEAN : TExtObject = nil; -begin - if lBOOLEAN = nil then lBOOLEAN := TExtObject.CreateSingleton('Ext.data.Types.BOOLEAN'); - Result := lBOOLEAN -end; - -class function TExtDataTypesSingleton.DATE : TExtObject; -const - lDATE : TExtObject = nil; -begin - if lDATE = nil then lDATE := TExtObject.CreateSingleton('Ext.data.Types.DATE'); - Result := lDATE -end; - -class function TExtDataTypesSingleton.FLOAT : TExtObject; -const - lFLOAT : TExtObject = nil; -begin - if lFLOAT = nil then lFLOAT := TExtObject.CreateSingleton('Ext.data.Types.FLOAT'); - Result := lFLOAT -end; - -class function TExtDataTypesSingleton.INT : TExtObject; -const - lINT : TExtObject = nil; -begin - if lINT = nil then lINT := TExtObject.CreateSingleton('Ext.data.Types.INT'); - Result := lINT -end; - -class function TExtDataTypesSingleton.INTEGER : TExtObject; -const - lINTEGER : TExtObject = nil; -begin - if lINTEGER = nil then lINTEGER := TExtObject.CreateSingleton('Ext.data.Types.INTEGER'); - Result := lINTEGER -end; - -class function TExtDataTypesSingleton.NUMBER : TExtObject; -const - lNUMBER : TExtObject = nil; -begin - if lNUMBER = nil then lNUMBER := TExtObject.CreateSingleton('Ext.data.Types.NUMBER'); - Result := lNUMBER -end; - -class function TExtDataTypesSingleton.STRINGJS : TExtObject; -const - lSTRINGJS : TExtObject = nil; -begin - if lSTRINGJS = nil then lSTRINGJS := TExtObject.CreateSingleton('Ext.data.Types.STRINGJS'); - Result := lSTRINGJS -end; - -{$IFDEF FPC}constructor TExtDataTypesSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtAppController.SetFRefs(Value : TExtObjectList); begin - FRefs := Value; - Value.DeleteFromGarbage; - JSCode('refs:' + VarToJSON([Value, false])); -end; - -procedure TExtAppController.SetFStores(Value : TExtObjectList); begin - FStores := Value; - Value.DeleteFromGarbage; - JSCode('stores:' + VarToJSON([Value, false])); -end; - -procedure TExtAppController.SetFViews(Value : TExtObjectList); begin - FViews := Value; - Value.DeleteFromGarbage; - JSCode('views:' + VarToJSON([Value, false])); -end; - -function TExtAppController.JSClassName : string; begin - Result := 'Ext.app.Controller'; -end; - -procedure TExtAppController.InitDefaults; begin - inherited; - FRefs := TExtObjectList.Create(Self, 'refs'); - FStores := TExtObjectList.Create(Self, 'stores'); - FViews := TExtObjectList.Create(Self, 'views'); -end; - -{$IFDEF FPC}constructor TExtAppController.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtAppController.AddRef(Refs : TExtObject) : TExtFunction; begin - JSCode(JSName + '.addRef(' + VarToJSON([Refs, false]) + ');', 'TExtAppController'); - Result := Self; -end; - -function TExtAppController.Control(Selectors : String; Listeners : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.control(' + VarToJSON([Selectors, Listeners, false]) + ');', 'TExtAppController'); - Result := Self; -end; - -constructor TExtAppController.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; -end; - -function TExtAppController.GetApplication : TExtFunction; begin - JSCode(JSName + '.getApplication();', 'TExtAppController'); - Result := Self; -end; - -function TExtAppController.GetController(Id : String) : TExtFunction; begin - JSCode(JSName + '.getController(' + VarToJSON([Id]) + ');', 'TExtAppController'); - Result := Self; -end; - -function TExtAppController.GetModel(Name : String) : TExtFunction; begin - JSCode(JSName + '.getModel(' + VarToJSON([Name]) + ');', 'TExtAppController'); - Result := Self; -end; - -function TExtAppController.GetStore(Name : String) : TExtFunction; begin - JSCode(JSName + '.getStore(' + VarToJSON([Name]) + ');', 'TExtAppController'); - Result := Self; -end; - -function TExtAppController.GetView(Name : String) : TExtFunction; begin - JSCode(JSName + '.getView(' + VarToJSON([Name]) + ');', 'TExtAppController'); - Result := Self; -end; - -function TExtAppController.HasRef : TExtFunction; begin - JSCode(JSName + '.hasRef();', 'TExtAppController'); - Result := Self; -end; - -function TExtAppController.Listen(ToJS : TExtObject) : TExtFunction; begin - JSCode(JSName + '.listen(' + VarToJSON([ToJS, false]) + ');', 'TExtAppController'); - Result := Self; -end; - -destructor TExtAppController.Destroy; begin - try - FRefs.Free; - FStores.Free; - FViews.Free; - except end; - inherited; -end; - -procedure TExtContainerDockingContainer.SetFDefaultDockWeights(Value : TExtObject); begin - FDefaultDockWeights := Value; - Value.DeleteFromGarbage; - JSCode('defaultDockWeights:' + VarToJSON([Value, false])); -end; - -function TExtContainerDockingContainer.JSClassName : string; begin - Result := 'Ext.container.DockingContainer'; -end; - -procedure TExtContainerDockingContainer.InitDefaults; begin - inherited; - FDefaultDockWeights := TExtObject.CreateInternal(Self, 'defaultDockWeights'); -end; - -{$IFDEF FPC}constructor TExtContainerDockingContainer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtContainerDockingContainer.AddDocked(Component : TExtObject; Pos : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.addDocked(' + VarToJSON([Component, false, Pos]) + ');', 'TExtContainerDockingContainer'); - Result := Self; -end; - -constructor TExtContainerDockingContainer.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; -end; - -function TExtContainerDockingContainer.GetDockedComponent(Comp : Integer) : TExtFunction; begin - JSCode(JSName + '.getDockedComponent(' + VarToJSON([Comp]) + ');', 'TExtContainerDockingContainer'); - Result := Self; -end; - -function TExtContainerDockingContainer.GetDockedItems(Selector : String; BeforeBody : Boolean) : TExtFunction; begin - JSCode(JSName + '.getDockedItems(' + VarToJSON([Selector, BeforeBody]) + ');', 'TExtContainerDockingContainer'); - Result := Self; -end; - -function TExtContainerDockingContainer.InsertDocked(Pos : Integer; Component : TExtObject) : TExtFunction; begin - JSCode(JSName + '.insertDocked(' + VarToJSON([Pos, Component, false]) + ');', 'TExtContainerDockingContainer'); - Result := Self; -end; - -function TExtContainerDockingContainer.RemoveDocked(Item : TExtComponent; AutoDestroy : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.removeDocked(' + VarToJSON([Item, false, AutoDestroy]) + ');', 'TExtContainerDockingContainer'); - Result := Self; -end; - -destructor TExtContainerDockingContainer.Destroy; begin - try - FDefaultDockWeights.Free; - except end; - inherited; -end; - -function TExtDataSortTypesSingleton.JSClassName : string; begin - Result := 'Ext.data.SortTypes'; -end; - -{$IFDEF FPC}constructor TExtDataSortTypesSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDataSortTypesSingleton.AsDate(S : TExtObject) : TExtFunction; begin - JSCode(JSName + '.asDate(' + VarToJSON([S, false]) + ');', 'TExtDataSortTypesSingleton'); - Result := Self; -end; - -function TExtDataSortTypesSingleton.AsFloat(S : TExtObject) : TExtFunction; begin - JSCode(JSName + '.asFloat(' + VarToJSON([S, false]) + ');', 'TExtDataSortTypesSingleton'); - Result := Self; +function TExtComponentQuerySingleton.JSClassName : string; begin + Result := 'Ext.ComponentQuery'; end; -function TExtDataSortTypesSingleton.AsInt(S : TExtObject) : TExtFunction; begin - JSCode(JSName + '.asInt(' + VarToJSON([S, false]) + ');', 'TExtDataSortTypesSingleton'); - Result := Self; -end; +{$IFDEF FPC}constructor TExtComponentQuerySingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtDataSortTypesSingleton.AsUCString(S : TExtObject) : TExtFunction; begin - JSCode(JSName + '.asUCString(' + VarToJSON([S, false]) + ');', 'TExtDataSortTypesSingleton'); +function TExtComponentQuerySingleton.IsJS(Component : TExtComponent; Selector : String) : TExtFunction; begin + JSCode(JSName + '.is(' + VarToJSON([Component, false, Selector]) + ');', 'TExtComponentQuerySingleton'); Result := Self; end; -function TExtDataSortTypesSingleton.AsUCText(S : TExtObject) : TExtFunction; begin - JSCode(JSName + '.asUCText(' + VarToJSON([S, false]) + ');', 'TExtDataSortTypesSingleton'); +function TExtComponentQuerySingleton.Query(Selector : String; Root : TExtContainer = nil) : TExtFunction; begin + JSCode(JSName + '.query(' + VarToJSON([Selector, Root, false]) + ');', 'TExtComponentQuerySingleton'); Result := Self; end; -function TExtChartShapeSingleton.JSClassName : string; begin - Result := 'Ext.chart.Shape'; -end; - -{$IFDEF FPC}constructor TExtChartShapeSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtDataAssociationBelongsTo.SetFForeignKey(Value : String); begin - FForeignKey := Value; - JSCode('foreignKey:' + VarToJSON([Value])); -end; - -procedure TExtDataAssociationBelongsTo.SetFGetterName(Value : String); begin - FGetterName := Value; - JSCode('getterName:' + VarToJSON([Value])); -end; - -procedure TExtDataAssociationBelongsTo.SetFSetterName(Value : String); begin - FSetterName := Value; - JSCode('setterName:' + VarToJSON([Value])); -end; - -procedure TExtDataAssociationBelongsTo.SetFTypeJS(Value : String); begin - FTypeJS := Value; - JSCode('typeJS:' + VarToJSON([Value])); -end; - -function TExtDataAssociationBelongsTo.JSClassName : string; begin - Result := 'Ext.data.association.BelongsTo'; -end; - -procedure TExtDataAssociationBelongsTo.InitDefaults; begin - inherited; - FForeignKey := '_id'; - FGetterName := 'get'; - FSetterName := 'set'; -end; - -{$IFDEF FPC}constructor TExtDataAssociationBelongsTo.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtDataAssociationBelongsTo.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; -end; - function TExtButtonManagerSingleton.JSClassName : string; begin - Result := 'Ext.button.Manager'; -end; - -{$IFDEF FPC}constructor TExtButtonManagerSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtDataAssociationHasMany.SetFFilterProperty(Value : String); begin - FFilterProperty := Value; - JSCode('filterProperty:' + VarToJSON([Value])); -end; - -procedure TExtDataAssociationHasMany.SetFForeignKey(Value : String); begin - FForeignKey := Value; - JSCode('foreignKey:' + VarToJSON([Value])); -end; - -procedure TExtDataAssociationHasMany.SetFName(Value : String); begin - FName := Value; - JSCode('name:' + VarToJSON([Value])); -end; - -procedure TExtDataAssociationHasMany.SetFStoreConfig(Value : TExtObject); begin - FStoreConfig := Value; - Value.DeleteFromGarbage; - JSCode('storeConfig:' + VarToJSON([Value, false])); -end; - -procedure TExtDataAssociationHasMany.SetFTypeJS(Value : String); begin - FTypeJS := Value; - JSCode('typeJS:' + VarToJSON([Value])); -end; - -function TExtDataAssociationHasMany.JSClassName : string; begin - Result := 'Ext.data.association.HasMany'; -end; - -procedure TExtDataAssociationHasMany.InitDefaults; begin - inherited; - FForeignKey := '_id'; - FStoreConfig := TExtObject.CreateInternal(Self, 'storeConfig'); -end; - -{$IFDEF FPC}constructor TExtDataAssociationHasMany.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtDataAssociationHasMany.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; -end; - -destructor TExtDataAssociationHasMany.Destroy; begin - try - FStoreConfig.Free; - except end; - inherited; -end; - -procedure TExtDataBatch.SetFAutoStart(Value : Boolean); begin - FAutoStart := Value; - JSCode('autoStart:' + VarToJSON([Value])); -end; - -procedure TExtDataBatch.SetFCurrent(Value : Integer); begin - FCurrent := Value; - JSCode(JSName + '.current=' + VarToJSON([Value]) + ';'); -end; - -procedure TExtDataBatch.SetFHasException(Value : Boolean); begin - FHasException := Value; - JSCode(JSName + '.hasException=' + VarToJSON([Value]) + ';'); -end; - -procedure TExtDataBatch.SetFHasListeners(Value : TExtObject); begin - FHasListeners := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.hasListeners=' + VarToJSON([Value, false]) + ';'); + Result := 'Ext.button.Manager'; end; -procedure TExtDataBatch.SetFIsComplete(Value : Boolean); begin - FIsComplete := Value; - JSCode(JSName + '.isComplete=' + VarToJSON([Value]) + ';'); -end; +{$IFDEF FPC}constructor TExtButtonManagerSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtDataBatch.SetFIsObservable(Value : Boolean); begin - FIsObservable := Value; - JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); +procedure TExtAppEventDomain.SetFIdProperty(Value : String); begin + FIdProperty := Value; + JSCode('idProperty:' + VarToJSON([Value])); end; -procedure TExtDataBatch.SetFIsRunning(Value : Boolean); begin - FIsRunning := Value; - JSCode(JSName + '.isRunning=' + VarToJSON([Value]) + ';'); +function TExtAppEventDomain.JSClassName : string; begin + Result := 'Ext.app.EventDomain'; end; -procedure TExtDataBatch.SetFListeners(Value : TExtObject); begin - FListeners := Value; +{$IFDEF FPC}constructor TExtAppEventDomain.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +procedure TExtChartAxisAbstract.SetFFields(Value : TExtObjectList); begin + FFields := Value; Value.DeleteFromGarbage; - JSCode('listeners:' + VarToJSON([Value, false])); + JSCode('fields:' + VarToJSON([Value, false])); end; -procedure TExtDataBatch.SetFOperations(Value : TExtObjectList); begin - FOperations := Value; +procedure TExtChartAxisAbstract.SetFLabelJS(Value : TExtChartLabel); begin + FLabelJS := Value; Value.DeleteFromGarbage; - JSCode(JSName + '.operations=' + VarToJSON([Value, false]) + ';'); + JSCode('labelJS:' + VarToJSON([Value, false])); end; -procedure TExtDataBatch.SetFPauseOnException(Value : Boolean); begin - FPauseOnException := Value; - JSCode('pauseOnException:' + VarToJSON([Value])); +function TExtChartAxisAbstract.JSClassName : string; begin + Result := 'Ext.chart.axis.Abstract'; end; -procedure TExtDataBatch.SetFTotal(Value : Integer); begin - FTotal := Value; - JSCode(JSName + '.total=' + VarToJSON([Value]) + ';'); +procedure TExtChartAxisAbstract.InitDefaults; begin + inherited; + FFields := TExtObjectList.Create(Self, 'fields'); + FLabelJS := TExtChartLabel.CreateInternal(Self, 'labelJS'); end; -function TExtDataBatch.JSClassName : string; begin - Result := 'Ext.data.Batch'; +{$IFDEF FPC}constructor TExtChartAxisAbstract.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtChartAxisAbstract.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtDataBatch.InitDefaults; begin +destructor TExtChartAxisAbstract.Destroy; begin + try + FFields.Free; + FLabelJS.Free; + except end; inherited; - FHasListeners := TExtObject.CreateInternal(Self, 'hasListeners'); - FListeners := TExtObject.CreateInternal(Self, 'listeners'); - FOperations := TExtObjectList.Create(Self, 'operations'); end; -{$IFDEF FPC}constructor TExtDataBatch.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDataBatch.Add(Operation : TExtObject) : TExtFunction; begin - JSCode(JSName + '.add(' + VarToJSON([Operation, false]) + ');', 'TExtDataBatch'); - Result := Self; +procedure TExtChartHighlight.SetFHighlight(Value : Boolean); begin + FHighlight := Value; + JSCode('highlight:' + VarToJSON([Value])); end; -function TExtDataBatch.AddEvents(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtDataBatch'); - Result := Self; +procedure TExtChartHighlight.SetFHighlightCfg(Value : TExtObject); begin + FHighlightCfg := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.highlightCfg=' + VarToJSON([Value, false]) + ';'); end; -function TExtDataBatch.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtDataBatch'); - Result := Self; +procedure TExtChartHighlight.SetFHighlightObject(Value : TExtObject); begin + FHighlightObject := Value; + Value.DeleteFromGarbage; + JSCode('highlight:' + VarToJSON([Value, false])); end; -function TExtDataBatch.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtDataBatch'); - Result := Self; +function TExtChartHighlight.JSClassName : string; begin + Result := 'Ext.chart.Highlight'; end; -function TExtDataBatch.ClearListeners : TExtFunction; begin - JSCode(JSName + '.clearListeners();', 'TExtDataBatch'); - Result := Self; +procedure TExtChartHighlight.InitDefaults; begin + inherited; + FHighlightCfg := TExtObject.CreateInternal(Self, 'highlightCfg'); + FHighlightObject := TExtObject.CreateInternal(Self, 'highlight'); end; -function TExtDataBatch.ClearManagedListeners : TExtFunction; begin - JSCode(JSName + '.clearManagedListeners();', 'TExtDataBatch'); - Result := Self; -end; +{$IFDEF FPC}constructor TExtChartHighlight.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtDataBatch.Create; begin +constructor TExtChartHighlight.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -function TExtDataBatch.EnableBubble(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtDataBatch'); +function TExtChartHighlight.HighlightItem(Item : TExtObject) : TExtFunction; begin + JSCode(JSName + '.highlightItem(' + VarToJSON([Item, false]) + ');', 'TExtChartHighlight'); Result := Self; end; -function TExtDataBatch.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDataBatch'); +function TExtChartHighlight.UnHighlightItem : TExtFunction; begin + JSCode(JSName + '.unHighlightItem();', 'TExtChartHighlight'); Result := Self; end; -function TExtDataBatch.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDataBatch'); - Result := Self; +destructor TExtChartHighlight.Destroy; begin + try + FHighlightCfg.Free; + FHighlightObject.Free; + except end; + inherited; end; -function TExtDataBatch.HasListener(EventName : String) : TExtFunction; begin - JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtDataBatch'); - Result := Self; +function TExtChartCallout.JSClassName : string; begin + Result := 'Ext.chart.Callout'; end; -function TExtDataBatch.Pause : TExtFunction; begin - JSCode(JSName + '.pause();', 'TExtDataBatch'); - Result := Self; -end; +{$IFDEF FPC}constructor TExtChartCallout.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtDataBatch.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin - JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtDataBatch'); - Result := Self; +procedure TExtAbstractPlugin.SetFIsPlugin(Value : Boolean); begin + FIsPlugin := Value; + JSCode(JSName + '.isPlugin=' + VarToJSON([Value]) + ';'); end; -function TExtDataBatch.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtDataBatch'); - Result := Self; +procedure TExtAbstractPlugin.SetFPluginId(Value : String); begin + FPluginId := Value; + JSCode('pluginId:' + VarToJSON([Value])); end; -function TExtDataBatch.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtDataBatch'); - Result := Self; +function TExtAbstractPlugin.JSClassName : string; begin + Result := 'Ext.AbstractPlugin'; end; -function TExtDataBatch.ResumeEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtDataBatch'); +{$IFDEF FPC}constructor TExtAbstractPlugin.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtAbstractPlugin.Disable : TExtFunction; begin + JSCode(JSName + '.disable();', 'TExtAbstractPlugin'); Result := Self; end; -function TExtDataBatch.ResumeEvents : TExtFunction; begin - JSCode(JSName + '.resumeEvents();', 'TExtDataBatch'); - Result := Self; +procedure TExtAbstractManager.SetFAll(Value : TExtUtilHashMap); begin + FAll := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.all=' + VarToJSON([Value, false]) + ';'); end; -function TExtDataBatch.Retry : TExtFunction; begin - JSCode(JSName + '.retry();', 'TExtDataBatch'); - Result := Self; +function TExtAbstractManager.JSClassName : string; begin + Result := 'Ext.AbstractManager'; end; -function TExtDataBatch.RunOperation(Index : Integer) : TExtFunction; begin - JSCode(JSName + '.runOperation(' + VarToJSON([Index]) + ');', 'TExtDataBatch'); - Result := Self; +procedure TExtAbstractManager.InitDefaults; begin + inherited; + FAll := TExtUtilHashMap.CreateInternal(Self, 'all'); end; -function TExtDataBatch.Start : TExtFunction; begin - JSCode(JSName + '.start();', 'TExtDataBatch'); - Result := Self; +{$IFDEF FPC}constructor TExtAbstractManager.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtAbstractManager.Create; begin + CreateVarAlt(JSClassName + '.create({});'); + InitDefaults; end; -function TExtDataBatch.SuspendEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtDataBatch'); +function TExtAbstractManager.Each(Fn : TExtFunction; FnKey : String; FnValue : Integer; FnLength : Integer; FnReturn : Boolean; Scope : TExtObject) : TExtFunction; begin + JSCode(JSName + '.each(' + VarToJSON([Fn, true, FnKey, FnValue, FnLength, FnReturn, Scope, false]) + ');', 'TExtAbstractManager'); Result := Self; end; -function TExtDataBatch.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin - JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtDataBatch'); +function TExtAbstractManager.Get(Id : String) : TExtFunction; begin + JSCode(JSName + '.get(' + VarToJSON([Id]) + ');', 'TExtAbstractManager'); Result := Self; end; -destructor TExtDataBatch.Destroy; begin - try - FHasListeners.Free; - FListeners.Free; - FOperations.Free; - except end; - inherited; +function TExtAbstractManager.GetCount : TExtFunction; begin + JSCode(JSName + '.getCount();', 'TExtAbstractManager'); + Result := Self; end; -procedure TExtDataAssociationHasOne.SetFForeignKey(Value : String); begin - FForeignKey := Value; - JSCode('foreignKey:' + VarToJSON([Value])); +function TExtAbstractManager.IsRegistered(TypeJS : String) : TExtFunction; begin + JSCode(JSName + '.isRegistered(' + VarToJSON([TypeJS]) + ');', 'TExtAbstractManager'); + Result := Self; end; -procedure TExtDataAssociationHasOne.SetFGetterName(Value : String); begin - FGetterName := Value; - JSCode('getterName:' + VarToJSON([Value])); +function TExtAbstractManager.OnAvailable(Id : String; Fn : TExtFunction; Scope : TExtObject) : TExtFunction; begin + JSCode(JSName + '.onAvailable(' + VarToJSON([Id, Fn, true, Scope, false]) + ');', 'TExtAbstractManager'); + Result := Self; end; -procedure TExtDataAssociationHasOne.SetFSetterName(Value : String); begin - FSetterName := Value; - JSCode('setterName:' + VarToJSON([Value])); +function TExtAbstractManager.Register(Item : TExtObject) : TExtFunction; begin + JSCode(JSName + '.register(' + VarToJSON([Item, false]) + ');', 'TExtAbstractManager'); + Result := Self; end; -procedure TExtDataAssociationHasOne.SetFTypeJS(Value : String); begin - FTypeJS := Value; - JSCode('typeJS:' + VarToJSON([Value])); +function TExtAbstractManager.RegisterType(TypeJS : String; Cls : TExtFunction) : TExtFunction; begin + JSCode(JSName + '.registerType(' + VarToJSON([TypeJS, Cls, true]) + ');', 'TExtAbstractManager'); + Result := Self; end; -function TExtDataAssociationHasOne.JSClassName : string; begin - Result := 'Ext.data.association.HasOne'; +function TExtAbstractManager.Unregister(Item : TExtObject) : TExtFunction; begin + JSCode(JSName + '.unregister(' + VarToJSON([Item, false]) + ');', 'TExtAbstractManager'); + Result := Self; end; -procedure TExtDataAssociationHasOne.InitDefaults; begin +destructor TExtAbstractManager.Destroy; begin + try + FAll.Free; + except end; inherited; - FForeignKey := '_id'; - FGetterName := 'get'; - FSetterName := 'set'; end; -{$IFDEF FPC}constructor TExtDataAssociationHasOne.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtDataAssociationHasOne.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtAction.SetFDisabled(Value : Boolean); begin + FDisabled := Value; + if not ConfigAvailable(JSName) then + SetDisabled(Value) + else + JSCode('disabled:' + VarToJSON([Value])); end; -procedure TExtAppEventDomain.SetFIdProperty(Value : String); begin - FIdProperty := Value; - JSCode('idProperty:' + VarToJSON([Value])); +procedure TExtAction.SetFHandler(Value : TExtFunction); begin + FHandler := Value; + if not ConfigAvailable(JSName) then + SetHandler(Value, nil) + else + JSCode('handler:' + VarToJSON([Value, true])); end; -function TExtAppEventDomain.JSClassName : string; begin - Result := 'Ext.app.EventDomain'; +procedure TExtAction.SetFHidden(Value : Boolean); begin + FHidden := Value; + if not ConfigAvailable(JSName) then + SetHidden(Value) + else + JSCode('hidden:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtAppEventDomain.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtDataConnection.SetFAutoAbort(Value : Boolean); begin - FAutoAbort := Value; - JSCode('autoAbort:' + VarToJSON([Value])); +procedure TExtAction.SetFIconCls(Value : String); begin + FIconCls := Value; + if not ConfigAvailable(JSName) then + SetIconCls(Value) + else + JSCode('iconCls:' + VarToJSON([Value])); end; -procedure TExtDataConnection.SetFBinary(Value : Boolean); begin - FBinary := Value; - JSCode('binary:' + VarToJSON([Value])); +procedure TExtAction.SetFIsAction(Value : Boolean); begin + FIsAction := Value; + JSCode(JSName + '.isAction=' + VarToJSON([Value]) + ';'); end; -procedure TExtDataConnection.SetFCors(Value : Boolean); begin - FCors := Value; - JSCode('cors:' + VarToJSON([Value])); +procedure TExtAction.SetFItemId(Value : String); begin + FItemId := Value; + JSCode('itemId:' + VarToJSON([Value])); end; -procedure TExtDataConnection.SetFDefaultHeaders(Value : TExtObject); begin - FDefaultHeaders := Value; +procedure TExtAction.SetFScope(Value : TExtObject); begin + FScope := Value; Value.DeleteFromGarbage; - JSCode('defaultHeaders:' + VarToJSON([Value, false])); + JSCode('scope:' + VarToJSON([Value, false])); end; -procedure TExtDataConnection.SetFDisableCaching(Value : Boolean); begin - FDisableCaching := Value; - JSCode('disableCaching:' + VarToJSON([Value])); +procedure TExtAction.SetFText(Value : String); begin + FText := Value; + if not ConfigAvailable(JSName) then + SetText(Value) + else + JSCode('text:' + VarToJSON([Value])); end; -procedure TExtDataConnection.SetFDisableCachingParam(Value : String); begin - FDisableCachingParam := Value; - JSCode('disableCachingParam:' + VarToJSON([Value])); +function TExtAction.JSClassName : string; begin + Result := 'Ext.Action'; end; -procedure TExtDataConnection.SetFExtraParams(Value : TExtObject); begin - FExtraParams := Value; - Value.DeleteFromGarbage; - JSCode('extraParams:' + VarToJSON([Value, false])); +procedure TExtAction.InitDefaults; begin + inherited; + FScope := TExtObject.CreateInternal(Self, 'scope'); end; -procedure TExtDataConnection.SetFHasListeners(Value : TExtObject); begin - FHasListeners := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.hasListeners=' + VarToJSON([Value, false]) + ';'); -end; +{$IFDEF FPC}constructor TExtAction.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtDataConnection.SetFIsObservable(Value : Boolean); begin - FIsObservable := Value; - JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); +constructor TExtAction.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtDataConnection.SetFListeners(Value : TExtObject); begin - FListeners := Value; - Value.DeleteFromGarbage; - JSCode('listeners:' + VarToJSON([Value, false])); +function TExtAction.Disable : TExtFunction; begin + JSCode(JSName + '.disable();', 'TExtAction'); + Result := Self; end; -procedure TExtDataConnection.SetFMethod(Value : String); begin - FMethod := Value; - JSCode('method:' + VarToJSON([Value])); +function TExtAction.Each(Fn : TExtFunction; Scope : TExtObject) : TExtFunction; begin + JSCode(JSName + '.each(' + VarToJSON([Fn, true, Scope, false]) + ');', 'TExtAction'); + Result := Self; end; -procedure TExtDataConnection.SetFTimeout(Value : Integer); begin - FTimeout := Value; - JSCode('timeout:' + VarToJSON([Value])); +function TExtAction.Enable : TExtFunction; begin + JSCode(JSName + '.enable();', 'TExtAction'); + Result := Self; end; -procedure TExtDataConnection.SetFWithCredentials(Value : Boolean); begin - FWithCredentials := Value; - JSCode('withCredentials:' + VarToJSON([Value])); +function TExtAction.Execute(Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.execute(' + VarToJSON(Args) + ');', 'TExtAction'); + Result := Self; end; -procedure TExtDataConnection.SetFOnBeforerequest(Value : TExtDataConnectionOnBeforerequest); begin - if Assigned(FOnBeforerequest) then - JSCode(JSName+'.events ["beforerequest"].listeners=[];'); - if Assigned(Value) then - AddListener('beforerequest', Ajax('beforerequest', ['Conn', '%0.nm','Options', '%1.nm'], true)); - FOnBeforerequest := Value; +function TExtAction.GetIconCls : TExtFunction; begin + JSCode(JSName + '.getIconCls();', 'TExtAction'); + Result := Self; end; -procedure TExtDataConnection.SetFOnRequestcomplete(Value : TExtDataConnectionOnRequestcomplete); begin - if Assigned(FOnRequestcomplete) then - JSCode(JSName+'.events ["requestcomplete"].listeners=[];'); - if Assigned(Value) then - AddListener('requestcomplete', Ajax('requestcomplete', ['Conn', '%0.nm','Response', '%1.nm','Options', '%2.nm'], true)); - FOnRequestcomplete := Value; +function TExtAction.GetText : TExtFunction; begin + JSCode(JSName + '.getText();', 'TExtAction'); + Result := Self; end; -procedure TExtDataConnection.SetFOnRequestexception(Value : TExtDataConnectionOnRequestexception); begin - if Assigned(FOnRequestexception) then - JSCode(JSName+'.events ["requestexception"].listeners=[];'); - if Assigned(Value) then - AddListener('requestexception', Ajax('requestexception', ['Conn', '%0.nm','Response', '%1.nm','Options', '%2.nm'], true)); - FOnRequestexception := Value; +function TExtAction.Hide : TExtFunction; begin + JSCode(JSName + '.hide();', 'TExtAction'); + Result := Self; end; -function TExtDataConnection.JSClassName : string; begin - Result := 'Ext.data.Connection'; +function TExtAction.IsDisabled : TExtFunction; begin + JSCode(JSName + '.isDisabled();', 'TExtAction'); + Result := Self; end; -procedure TExtDataConnection.InitDefaults; begin - inherited; - FDefaultHeaders := TExtObject.CreateInternal(Self, 'defaultHeaders'); - FExtraParams := TExtObject.CreateInternal(Self, 'extraParams'); - FHasListeners := TExtObject.CreateInternal(Self, 'hasListeners'); - FListeners := TExtObject.CreateInternal(Self, 'listeners'); +function TExtAction.IsHidden : TExtFunction; begin + JSCode(JSName + '.isHidden();', 'TExtAction'); + Result := Self; end; -{$IFDEF FPC}constructor TExtDataConnection.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDataConnection.Abort(Request : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.abort(' + VarToJSON([Request, false]) + ');', 'TExtDataConnection'); +function TExtAction.SetDisabled(Disabled : Boolean) : TExtFunction; begin + JSCode(JSName + '.setDisabled(' + VarToJSON([Disabled]) + ');', 'TExtAction'); Result := Self; end; -function TExtDataConnection.AbortAll : TExtFunction; begin - JSCode(JSName + '.abortAll();', 'TExtDataConnection'); +function TExtAction.SetHandler(Fn : TExtFunction; Scope : TExtObject) : TExtFunction; begin + JSCode(JSName + '.setHandler(' + VarToJSON([Fn, true, Scope, false]) + ');', 'TExtAction'); Result := Self; end; -function TExtDataConnection.AddEvents(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtDataConnection'); +function TExtAction.SetHidden(Hidden : Boolean) : TExtFunction; begin + JSCode(JSName + '.setHidden(' + VarToJSON([Hidden]) + ');', 'TExtAction'); Result := Self; end; -function TExtDataConnection.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtDataConnection'); +function TExtAction.SetIconCls(Cls : String) : TExtFunction; begin + JSCode(JSName + '.setIconCls(' + VarToJSON([Cls]) + ');', 'TExtAction'); Result := Self; end; -function TExtDataConnection.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtDataConnection'); +function TExtAction.SetText(Text : String) : TExtFunction; begin + JSCode(JSName + '.setText(' + VarToJSON([Text]) + ');', 'TExtAction'); Result := Self; end; -function TExtDataConnection.ClearListeners : TExtFunction; begin - JSCode(JSName + '.clearListeners();', 'TExtDataConnection'); +function TExtAction.Show : TExtFunction; begin + JSCode(JSName + '.show();', 'TExtAction'); Result := Self; end; -function TExtDataConnection.ClearManagedListeners : TExtFunction; begin - JSCode(JSName + '.clearManagedListeners();', 'TExtDataConnection'); - Result := Self; +destructor TExtAction.Destroy; begin + try + FScope.Free; + except end; + inherited; end; -constructor TExtDataConnection.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +function TExtAppEventBusSingleton.JSClassName : string; begin + Result := 'Ext.app.EventBus'; end; -function TExtDataConnection.EnableBubble(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtDataConnection'); +{$IFDEF FPC}constructor TExtAppEventBusSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtAppEventBusSingleton.Control(Selectors : TExtObject; Controller : TExtAppController) : TExtFunction; begin + JSCode(JSName + '.control(' + VarToJSON([Selectors, false, Controller, false]) + ');', 'TExtAppEventBusSingleton'); Result := Self; end; -function TExtDataConnection.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDataConnection'); +function TExtAppEventBusSingleton.Listen(ToJS : TExtObject; Controller : TExtAppController) : TExtFunction; begin + JSCode(JSName + '.listen(' + VarToJSON([ToJS, false, Controller, false]) + ');', 'TExtAppEventBusSingleton'); Result := Self; end; -function TExtDataConnection.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDataConnection'); +function TExtAppEventBusSingleton.Unlisten(ControllerId : String) : TExtFunction; begin + JSCode(JSName + '.unlisten(' + VarToJSON([ControllerId]) + ');', 'TExtAppEventBusSingleton'); Result := Self; end; -function TExtDataConnection.HasListener(EventName : String) : TExtFunction; begin - JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtDataConnection'); - Result := Self; +procedure TExtAppController.SetFRefs(Value : TExtObjectList); begin + FRefs := Value; + Value.DeleteFromGarbage; + JSCode('refs:' + VarToJSON([Value, false])); end; -function TExtDataConnection.IsLoading(Request : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.isLoading(' + VarToJSON([Request, false]) + ');', 'TExtDataConnection'); - Result := Self; +procedure TExtAppController.SetFStores(Value : TExtObjectList); begin + FStores := Value; + Value.DeleteFromGarbage; + JSCode('stores:' + VarToJSON([Value, false])); end; -function TExtDataConnection.ParseStatus(Status : Integer) : TExtFunction; begin - JSCode(JSName + '.parseStatus(' + VarToJSON([Status]) + ');', 'TExtDataConnection'); - Result := Self; +procedure TExtAppController.SetFViews(Value : TExtObjectList); begin + FViews := Value; + Value.DeleteFromGarbage; + JSCode('views:' + VarToJSON([Value, false])); end; -function TExtDataConnection.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin - JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtDataConnection'); - Result := Self; +function TExtAppController.JSClassName : string; begin + Result := 'Ext.app.Controller'; end; -function TExtDataConnection.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtDataConnection'); - Result := Self; +procedure TExtAppController.InitDefaults; begin + inherited; + FRefs := TExtObjectList.Create(Self, 'refs'); + FStores := TExtObjectList.Create(Self, 'stores'); + FViews := TExtObjectList.Create(Self, 'views'); end; -function TExtDataConnection.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtDataConnection'); +{$IFDEF FPC}constructor TExtAppController.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtAppController.AddRef(Refs : TExtObject) : TExtFunction; begin + JSCode(JSName + '.addRef(' + VarToJSON([Refs, false]) + ');', 'TExtAppController'); Result := Self; end; -function TExtDataConnection.Request(Options : TExtObject; OptionsUrl : String; OptionsParams : String; OptionsMethod : String; OptionsCallback : TExtFunction; OptionsCallbackOptions : TExtObject; OptionsCallbackSuccess : Boolean; OptionsCallbackResponse : TExtObject; OptionsSuccess : TExtFunction; OptionsSuccessResponse : TExtObject; OptionsSuccessOptions : TExtObject; OptionsFailure : TExtFunction; OptionsFailureResponse : TExtObject; OptionsFailureOptions : TExtObject; OptionsScope : TExtObject; OptionsTimeout : Integer; OptionsForm : String; OptionsIsUpload : Boolean; OptionsHeaders : TExtObject; OptionsXmlData : TExtObject; OptionsJsonData : String; OptionsBinaryData : TExtObjectList; OptionsDisableCaching : Boolean; OptionsWithCredentials : Boolean; OptionsBinary : Boolean) : TExtFunction; begin - JSCode(JSName + '.request(' + VarToJSON([Options, false, OptionsUrl, OptionsParams, OptionsMethod, OptionsCallback, true, OptionsCallbackOptions, false, OptionsCallbackSuccess, OptionsCallbackResponse, false, OptionsSuccess, true, OptionsSuccessResponse, false, OptionsSuccessOptions, false, OptionsFailure, true, OptionsFailureResponse, false, OptionsFailureOptions, false, OptionsScope, false, OptionsTimeout, OptionsForm, OptionsIsUpload, OptionsHeaders, false, OptionsXmlData, false, OptionsJsonData]) + ',' + VarToJSON(OptionsBinaryData) + ',' + VarToJSON([OptionsDisableCaching, OptionsWithCredentials, OptionsBinary]) + ');', 'TExtDataConnection'); +function TExtAppController.Control(Selectors : String; Listeners : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.control(' + VarToJSON([Selectors, Listeners, false]) + ');', 'TExtAppController'); Result := Self; end; -function TExtDataConnection.ResumeEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtDataConnection'); +constructor TExtAppController.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; +end; + +function TExtAppController.GetApplication : TExtFunction; begin + JSCode(JSName + '.getApplication();', 'TExtAppController'); Result := Self; end; -function TExtDataConnection.ResumeEvents : TExtFunction; begin - JSCode(JSName + '.resumeEvents();', 'TExtDataConnection'); +function TExtAppController.GetController(Id : String) : TExtFunction; begin + JSCode(JSName + '.getController(' + VarToJSON([Id]) + ');', 'TExtAppController'); Result := Self; end; -function TExtDataConnection.SetOptions(Options : TExtObject; Scope : TExtObject) : TExtFunction; begin - JSCode(JSName + '.setOptions(' + VarToJSON([Options, false, Scope, false]) + ');', 'TExtDataConnection'); +function TExtAppController.GetModel(Name : String) : TExtFunction; begin + JSCode(JSName + '.getModel(' + VarToJSON([Name]) + ');', 'TExtAppController'); Result := Self; end; -function TExtDataConnection.SuspendEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtDataConnection'); +function TExtAppController.GetStore(Name : String) : TExtFunction; begin + JSCode(JSName + '.getStore(' + VarToJSON([Name]) + ');', 'TExtAppController'); Result := Self; end; -function TExtDataConnection.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin - JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtDataConnection'); +function TExtAppController.GetView(Name : String) : TExtFunction; begin + JSCode(JSName + '.getView(' + VarToJSON([Name]) + ');', 'TExtAppController'); Result := Self; end; -function TExtDataConnection.Upload(Form : String; Url : String; Params : String; Options : TExtObject) : TExtFunction; begin - JSCode(JSName + '.upload(' + VarToJSON([Form, Url, Params, Options, false]) + ');', 'TExtDataConnection'); +function TExtAppController.HasRef : TExtFunction; begin + JSCode(JSName + '.hasRef();', 'TExtAppController'); + Result := Self; +end; + +function TExtAppController.Listen(ToJS : TExtObject) : TExtFunction; begin + JSCode(JSName + '.listen(' + VarToJSON([ToJS, false]) + ');', 'TExtAppController'); Result := Self; end; -destructor TExtDataConnection.Destroy; begin +destructor TExtAppController.Destroy; begin try - FDefaultHeaders.Free; - FExtraParams.Free; - FHasListeners.Free; - FListeners.Free; + FRefs.Free; + FStores.Free; + FViews.Free; except end; inherited; end; -procedure TExtDataConnection.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'beforerequest') and Assigned(FOnBeforerequest) then - FOnBeforerequest(TExtDataConnection(ParamAsObject('Conn')), TExtObject(ParamAsObject('Options'))) - else if (AEvtName = 'requestcomplete') and Assigned(FOnRequestcomplete) then - FOnRequestcomplete(TExtDataConnection(ParamAsObject('Conn')), TExtObject(ParamAsObject('Response')), TExtObject(ParamAsObject('Options'))) - else if (AEvtName = 'requestexception') and Assigned(FOnRequestexception) then - FOnRequestexception(TExtDataConnection(ParamAsObject('Conn')), TExtObject(ParamAsObject('Response')), TExtObject(ParamAsObject('Options'))); +function TExtChartTheme.JSClassName : string; begin + Result := 'Ext.chart.theme.Theme'; end; -procedure TExtChartAxisAbstract.SetFFields(Value : TExtObjectList); begin - FFields := Value; - Value.DeleteFromGarbage; - JSCode('fields:' + VarToJSON([Value, false])); +{$IFDEF FPC}constructor TExtChartTheme.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtChartShapeSingleton.JSClassName : string; begin + Result := 'Ext.chart.Shape'; end; -procedure TExtChartAxisAbstract.SetFLabelJS(Value : TExtChartLabel); begin - FLabelJS := Value; - Value.DeleteFromGarbage; - JSCode('labelJS:' + VarToJSON([Value, false])); +{$IFDEF FPC}constructor TExtChartShapeSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtChartThemeBase.JSClassName : string; begin + Result := 'Ext.chart.theme.Base'; end; -function TExtChartAxisAbstract.JSClassName : string; begin - Result := 'Ext.chart.axis.Abstract'; +{$IFDEF FPC}constructor TExtChartThemeBase.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +procedure TExtComponent.SetFAnchor(Value : String); begin + FAnchor := Value; + JSCode('anchor:' + VarToJSON([Value])); end; -procedure TExtChartAxisAbstract.InitDefaults; begin - inherited; - FFields := TExtObjectList.Create(Self, 'fields'); - FLabelJS := TExtChartLabel.CreateInternal(Self, 'labelJS'); +procedure TExtComponent.SetFAutoScroll(Value : Boolean); begin + FAutoScroll := Value; + if not ConfigAvailable(JSName) then + SetAutoScroll(Value) + else + JSCode('autoScroll:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtChartAxisAbstract.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtComponent.SetFCmargins(Value : String); begin + FCmargins := Value; + JSCode('cmargins:' + VarToJSON([Value])); +end; -constructor TExtChartAxisAbstract.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtComponent.SetFColumnWidth(Value : Integer); begin + FColumnWidth := Value; + JSCode('columnWidth:' + VarToJSON([Value])); end; -destructor TExtChartAxisAbstract.Destroy; begin - try - FFields.Free; - FLabelJS.Free; - except end; - inherited; +procedure TExtComponent.SetFColumnWidthString(Value : String); begin + FColumnWidthString := Value; + JSCode('columnWidth:' + VarToJSON([Value])); end; -procedure TExtDataAssociation.SetFAssociatedModel(Value : String); begin - FAssociatedModel := Value; - JSCode('associatedModel:' + VarToJSON([Value])); +procedure TExtComponent.SetFConstrain(Value : Boolean); begin + FConstrain := Value; + JSCode('constrain:' + VarToJSON([Value])); end; -procedure TExtDataAssociation.SetFAssociatedName(Value : String); begin - FAssociatedName := Value; - JSCode(JSName + '.associatedName=' + VarToJSON([Value]) + ';'); +procedure TExtComponent.SetFConstrainTo(Value : TExtUtilRegion); begin + FConstrainTo := Value; + Value.DeleteFromGarbage; + JSCode('constrainTo:' + VarToJSON([Value, false])); end; -procedure TExtDataAssociation.SetFAssociationKey(Value : String); begin - FAssociationKey := Value; - JSCode('associationKey:' + VarToJSON([Value])); +procedure TExtComponent.SetFConstrainToElement(Value : TExtElement); begin + FConstrainToElement := Value; + Value.DeleteFromGarbage; + JSCode('constrainTo:' + VarToJSON([Value, false])); end; -procedure TExtDataAssociation.SetFModel(Value : String); begin - FModel := Value; - JSCode('model:' + VarToJSON([Value])); +procedure TExtComponent.SetFDefaultAlign(Value : String); begin + FDefaultAlign := Value; + JSCode('defaultAlign:' + VarToJSON([Value])); end; -procedure TExtDataAssociation.SetFOwnerModel(Value : String); begin - FOwnerModel := Value; - JSCode('ownerModel:' + VarToJSON([Value])); +procedure TExtComponent.SetFDraggable(Value : Boolean); begin + FDraggable := Value; + JSCode('draggable:' + VarToJSON([Value])); end; -procedure TExtDataAssociation.SetFOwnerName(Value : String); begin - FOwnerName := Value; - JSCode(JSName + '.ownerName=' + VarToJSON([Value]) + ';'); +procedure TExtComponent.SetFDraggableObject(Value : TExtObject); begin + FDraggableObject := Value; + Value.DeleteFromGarbage; + JSCode('draggable:' + VarToJSON([Value, false])); end; -procedure TExtDataAssociation.SetFPrimaryKey(Value : String); begin - FPrimaryKey := Value; - JSCode('primaryKey:' + VarToJSON([Value])); +procedure TExtComponent.SetFFixed(Value : Boolean); begin + FFixed := Value; + JSCode('fixed:' + VarToJSON([Value])); end; -procedure TExtDataAssociation.SetFReader(Value : TExtDataReader); begin - FReader := Value; +procedure TExtComponent.SetFFloating(Value : Boolean); begin + FFloating := Value; + JSCode('floating:' + VarToJSON([Value])); +end; + +procedure TExtComponent.SetFFloatParent(Value : TExtContainer); begin + FFloatParent := Value; Value.DeleteFromGarbage; - JSCode('reader:' + VarToJSON([Value, false])); + JSCode(JSName + '.floatParent=' + VarToJSON([Value, false]) + ';'); end; -function TExtDataAssociation.JSClassName : string; begin - Result := 'Ext.data.association.Association'; +procedure TExtComponent.SetFFocusOnToFront(Value : Boolean); begin + FFocusOnToFront := Value; + JSCode('focusOnToFront:' + VarToJSON([Value])); end; -procedure TExtDataAssociation.InitDefaults; begin - inherited; - FReader := TExtDataReader.CreateInternal(Self, 'reader'); +procedure TExtComponent.SetFFormBind(Value : Boolean); begin + FFormBind := Value; + JSCode('formBind:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtDataAssociation.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtComponent.SetFMaxSize(Value : Integer); begin + FMaxSize := Value; + JSCode('maxSize:' + VarToJSON([Value])); +end; -constructor TExtDataAssociation.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtComponent.SetFMinSize(Value : Integer); begin + FMinSize := Value; + JSCode('minSize:' + VarToJSON([Value])); end; -function TExtDataAssociation.GetReader : TExtFunction; begin - JSCode(JSName + '.getReader();', 'TExtDataAssociation'); - Result := Self; +procedure TExtComponent.SetFOverflowX(Value : String); begin + FOverflowX := Value; + JSCode('overflowX:' + VarToJSON([Value])); end; -destructor TExtDataAssociation.Destroy; begin - try - FReader.Free; - except end; - inherited; +procedure TExtComponent.SetFOverflowY(Value : String); begin + FOverflowY := Value; + JSCode('overflowY:' + VarToJSON([Value])); end; -function TExtAppEventBusSingleton.JSClassName : string; begin - Result := 'Ext.app.EventBus'; +procedure TExtComponent.SetFRegion(Value : TRegionEnum); begin + FRegion := Value; + JSCode('region:"' + EnumToJSString(TypeInfo(TRegionEnum), ord(Value)) + '"'); end; -{$IFDEF FPC}constructor TExtAppEventBusSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtComponent.SetFResizable(Value : Boolean); begin + FResizable := Value; + JSCode('resizable:' + VarToJSON([Value])); +end; -function TExtAppEventBusSingleton.Control(Selectors : TExtObject; Controller : TExtAppController) : TExtFunction; begin - JSCode(JSName + '.control(' + VarToJSON([Selectors, false, Controller, false]) + ');', 'TExtAppEventBusSingleton'); - Result := Self; +procedure TExtComponent.SetFResizableObject(Value : TExtObject); begin + FResizableObject := Value; + Value.DeleteFromGarbage; + JSCode('resizable:' + VarToJSON([Value, false])); end; -function TExtAppEventBusSingleton.Listen(ToJS : TExtObject; Controller : TExtAppController) : TExtFunction; begin - JSCode(JSName + '.listen(' + VarToJSON([ToJS, false, Controller, false]) + ');', 'TExtAppEventBusSingleton'); - Result := Self; +procedure TExtComponent.SetFResizeHandles(Value : String); begin + FResizeHandles := Value; + JSCode('resizeHandles:' + VarToJSON([Value])); end; -function TExtAppEventBusSingleton.Unlisten(ControllerId : String) : TExtFunction; begin - JSCode(JSName + '.unlisten(' + VarToJSON([ControllerId]) + ');', 'TExtAppEventBusSingleton'); - Result := Self; +procedure TExtComponent.SetFShadow(Value : String); begin + FShadow := Value; + JSCode('shadow:' + VarToJSON([Value])); end; -function TExtChartTheme.JSClassName : string; begin - Result := 'Ext.chart.theme.Theme'; +procedure TExtComponent.SetFShadowBoolean(Value : Boolean); begin + FShadowBoolean := Value; + JSCode('shadow:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtChartTheme.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtComponent.SetFShadowOffset(Value : Integer); begin + FShadowOffset := Value; + JSCode('shadowOffset:' + VarToJSON([Value])); +end; -procedure TExtDataRequest.SetFAction(Value : String); begin - FAction := Value; - JSCode('action:' + VarToJSON([Value])); +procedure TExtComponent.SetFSplit(Value : Boolean); begin + FSplit := Value; + JSCode('split:' + VarToJSON([Value])); end; -procedure TExtDataRequest.SetFMethod(Value : String); begin - FMethod := Value; - JSCode('method:' + VarToJSON([Value])); +procedure TExtComponent.SetFToFrontOnShow(Value : Boolean); begin + FToFrontOnShow := Value; + JSCode('toFrontOnShow:' + VarToJSON([Value])); end; -procedure TExtDataRequest.SetFParams(Value : TExtObject); begin - FParams := Value; +procedure TExtComponent.SetFZIndexManager(Value : TExtZIndexManager); begin + FZIndexManager := Value; Value.DeleteFromGarbage; - JSCode('params:' + VarToJSON([Value, false])); + JSCode(JSName + '.zIndexManager=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtDataRequest.SetFUrl(Value : String); begin - FUrl := Value; - JSCode('url:' + VarToJSON([Value])); +procedure TExtComponent.SetFZIndexParent(Value : TExtContainer); begin + FZIndexParent := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.zIndexParent=' + VarToJSON([Value, false]) + ';'); end; -function TExtDataRequest.JSClassName : string; begin - Result := 'Ext.data.Request'; +function TExtComponent.JSClassName : string; begin + Result := 'Ext.Component'; end; -procedure TExtDataRequest.InitDefaults; begin +procedure TExtComponent.InitDefaults; begin inherited; - FParams := TExtObject.CreateInternal(Self, 'params'); + FConstrainTo := TExtUtilRegion.CreateInternal(Self, 'constrainTo'); + FConstrainToElement := TExtElement.CreateInternal(Self, 'constrainTo'); + FDraggableObject := TExtObject.CreateInternal(Self, 'draggable'); + FFloatParent := TExtContainer.CreateInternal(Self, 'floatParent'); + FResizableObject := TExtObject.CreateInternal(Self, 'resizable'); + FZIndexManager := TExtZIndexManager.CreateInternal(Self, 'zIndexManager'); + FZIndexParent := TExtContainer.CreateInternal(Self, 'zIndexParent'); end; -{$IFDEF FPC}constructor TExtDataRequest.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtComponent.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtDataRequest.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +function TExtComponent.Bubble(Fn : TExtFunction; Scope : TExtObject = nil; Args : TExtObjectList = nil) : TExtFunction; begin + JSCode(JSName + '.bubble(' + VarToJSON([Fn, true, Scope, false]) + ',' + VarToJSON(Args) + ');', 'TExtComponent'); + Result := Self; end; -destructor TExtDataRequest.Destroy; begin - try - FParams.Free; - except end; - inherited; +function TExtComponent.Center : TExtFunction; begin + JSCode(JSName + '.center();', 'TExtComponent'); + Result := Self; end; -procedure TExtDataResultSet.SetFCount(Value : Integer); begin - FCount := Value; - JSCode('count:' + VarToJSON([Value])); +function TExtComponent.CloneConfig(Overrides : TExtObject) : TExtFunction; begin + JSCode(JSName + '.cloneConfig(' + VarToJSON([Overrides, false]) + ');', 'TExtComponent'); + Result := Self; end; -procedure TExtDataResultSet.SetFLoaded(Value : Boolean); begin - FLoaded := Value; - JSCode('loaded:' + VarToJSON([Value])); +constructor TExtComponent.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtDataResultSet.SetFRecords(Value : TExtObjectList); begin - FRecords := Value; - Value.DeleteFromGarbage; - JSCode('records:' + VarToJSON([Value, false])); +function TExtComponent.DoConstrain(ConstrainTo : String = '') : TExtFunction; begin + JSCode(JSName + '.doConstrain(' + VarToJSON([ConstrainTo]) + ');', 'TExtComponent'); + Result := Self; end; -procedure TExtDataResultSet.SetFSuccess(Value : Boolean); begin - FSuccess := Value; - JSCode('success:' + VarToJSON([Value])); +function TExtComponent.FindParentBy(Fn : TExtFunction) : TExtFunction; begin + JSCode(JSName + '.findParentBy(' + VarToJSON([Fn, true]) + ');', 'TExtComponent'); + Result := Self; end; -procedure TExtDataResultSet.SetFTotal(Value : Integer); begin - FTotal := Value; - JSCode('total:' + VarToJSON([Value])); +function TExtComponent.FindParentByType(Xtype : String) : TExtFunction; begin + JSCode(JSName + '.findParentByType(' + VarToJSON([Xtype]) + ');', 'TExtComponent'); + Result := Self; end; -procedure TExtDataResultSet.SetFTotalRecords(Value : Integer); begin - FTotalRecords := Value; - JSCode(JSName + '.totalRecords=' + VarToJSON([Value]) + ';'); +function TExtComponent.Focus(SelectText : Boolean = false; Delay : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.focus(' + VarToJSON([SelectText, Delay]) + ');', 'TExtComponent'); + Result := Self; end; -function TExtDataResultSet.JSClassName : string; begin - Result := 'Ext.data.ResultSet'; +function TExtComponent.GetPosition(Local : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.getPosition(' + VarToJSON([Local]) + ');', 'TExtComponent'); + Result := Self; end; -procedure TExtDataResultSet.InitDefaults; begin - inherited; - FRecords := TExtObjectList.Create(Self, 'records'); +function TExtComponent.GetXType : TExtFunction; begin + JSCode(JSName + '.getXType();', 'TExtComponent'); + Result := Self; end; -{$IFDEF FPC}constructor TExtDataResultSet.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtDataResultSet.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +function TExtComponent.Hide(AnimateTarget : String = ''; Callback : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.hide(' + VarToJSON([AnimateTarget, Callback, true, Scope, false]) + ');', 'TExtComponent'); + Result := Self; end; -destructor TExtDataResultSet.Destroy; begin - try - FRecords.Free; - except end; - inherited; +function TExtComponent.ScrollBy(DeltaX : Integer; DeltaY : Boolean; Animate : Boolean) : TExtFunction; begin + JSCode(JSName + '.scrollBy(' + VarToJSON([DeltaX, DeltaY, Animate]) + ');', 'TExtComponent'); + Result := Self; end; -procedure TExtChartLabel.SetFLabelJS(Value : TExtObject); begin - FLabelJS := Value; - Value.DeleteFromGarbage; - JSCode('labelJS:' + VarToJSON([Value, false])); +function TExtComponent.SetActive(Active : Boolean = false; NewActive : TExtComponent = nil) : TExtFunction; begin + JSCode(JSName + '.setActive(' + VarToJSON([Active, NewActive, false]) + ');', 'TExtComponent'); + Result := Self; end; -function TExtChartLabel.JSClassName : string; begin - Result := 'Ext.chart.Label'; +function TExtComponent.SetAutoScroll(Scroll : Boolean) : TExtFunction; begin + JSCode(JSName + '.setAutoScroll(' + VarToJSON([Scroll]) + ');', 'TExtComponent'); + Result := Self; end; -procedure TExtChartLabel.InitDefaults; begin - inherited; - FLabelJS := TExtObject.CreateInternal(Self, 'labelJS'); +function TExtComponent.SetLoading(Load : Boolean; TargetEl : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.setLoading(' + VarToJSON([Load, TargetEl]) + ');', 'TExtComponent'); + Result := Self; end; -{$IFDEF FPC}constructor TExtChartLabel.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtComponent.SetOverflowXY(OverflowX : String; OverflowY : String) : TExtFunction; begin + JSCode(JSName + '.setOverflowXY(' + VarToJSON([OverflowX, OverflowY]) + ');', 'TExtComponent'); + Result := Self; +end; -constructor TExtChartLabel.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +function TExtComponent.SetPagePosition(X : Integer; Y : Integer = 0; Animate : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.setPagePosition(' + VarToJSON([X, Y, Animate]) + ');', 'TExtComponent'); + Result := Self; end; -destructor TExtChartLabel.Destroy; begin - try - FLabelJS.Free; - except end; - inherited; +function TExtComponent.Show(AnimateTarget : String = ''; Callback : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.show(' + VarToJSON([AnimateTarget, Callback, true, Scope, false]) + ');', 'TExtComponent'); + Result := Self; end; -function TExtDirectEvent.JSClassName : string; begin - Result := 'Ext.direct.Event'; +function TExtComponent.ShowAt(X : Integer; Y : Integer = 0; Animate : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.showAt(' + VarToJSON([X, Y, Animate]) + ');', 'TExtComponent'); + Result := Self; end; -{$IFDEF FPC}constructor TExtDirectEvent.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtComponent.ShowBy(Component : TExtComponent; Position : String = ''; Offsets : TArrayOfInteger = nil) : TExtFunction; begin + JSCode(JSName + '.showBy(' + VarToJSON([Component, false, Position, Offsets]) + ');', 'TExtComponent'); + Result := Self; +end; -constructor TExtDirectEvent.Create(Config : TExtObject = nil); begin - if Config = nil then CreateVar(JSClassName + '({});') else - CreateVar(JSClassName + '(' + VarToJSON([Config, false]) + ');'); - InitDefaults; +function TExtComponent.ToBack : TExtFunction; begin + JSCode(JSName + '.toBack();', 'TExtComponent'); + Result := Self; end; -function TExtDirectEvent.GetData : TExtFunction; begin - JSCode(JSName + '.getData();', 'TExtDirectEvent'); +function TExtComponent.ToFront(PreventFocus : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.toFront(' + VarToJSON([PreventFocus]) + ');', 'TExtComponent'); Result := Self; end; -function TExtDirectEvent.GetName : TExtFunction; begin - JSCode(JSName + '.getName();', 'TExtDirectEvent'); +function TExtComponent.UpdateBox(Box : TExtObject) : TExtFunction; begin + JSCode(JSName + '.updateBox(' + VarToJSON([Box, false]) + ');', 'TExtComponent'); Result := Self; end; +destructor TExtComponent.Destroy; begin + try + FConstrainTo.Free; + FConstrainToElement.Free; + FDraggableObject.Free; + FFloatParent.Free; + FResizableObject.Free; + FZIndexManager.Free; + FZIndexParent.Free; + except end; + inherited; +end; + +function TExtChartTip.JSClassName : string; begin + Result := 'Ext.chart.Tip'; +end; + +{$IFDEF FPC}constructor TExtChartTip.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + procedure TExtChartLegend.SetFBoxFill(Value : String); begin FBoxFill := Value; JSCode('boxFill:' + VarToJSON([Value])); @@ -25997,641 +27159,508 @@ function TExtChartLegend.JSClassName : string; begin procedure TExtChartLegend.InitDefaults; begin inherited; - FBoxZIndex := 100; -end; - -{$IFDEF FPC}constructor TExtChartLegend.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtChartLegend.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; -end; - -function TExtChartLegend.Toggle(Show : Boolean) : TExtFunction; begin - JSCode(JSName + '.toggle(' + VarToJSON([Show]) + ');', 'TExtChartLegend'); - Result := Self; -end; - -procedure TExtAction.SetFDisabled(Value : Boolean); begin - FDisabled := Value; - if not ConfigAvailable(JSName) then - SetDisabled(Value) - else - JSCode('disabled:' + VarToJSON([Value])); -end; - -procedure TExtAction.SetFHandler(Value : TExtFunction); begin - FHandler := Value; - if not ConfigAvailable(JSName) then - SetHandler(Value, nil) - else - JSCode('handler:' + VarToJSON([Value, true])); -end; - -procedure TExtAction.SetFHidden(Value : Boolean); begin - FHidden := Value; - if not ConfigAvailable(JSName) then - SetHidden(Value) - else - JSCode('hidden:' + VarToJSON([Value])); -end; - -procedure TExtAction.SetFIconCls(Value : String); begin - FIconCls := Value; - if not ConfigAvailable(JSName) then - SetIconCls(Value) - else - JSCode('iconCls:' + VarToJSON([Value])); -end; - -procedure TExtAction.SetFIsAction(Value : Boolean); begin - FIsAction := Value; - JSCode(JSName + '.isAction=' + VarToJSON([Value]) + ';'); -end; - -procedure TExtAction.SetFItemId(Value : String); begin - FItemId := Value; - JSCode('itemId:' + VarToJSON([Value])); -end; - -procedure TExtAction.SetFScope(Value : TExtObject); begin - FScope := Value; - Value.DeleteFromGarbage; - JSCode('scope:' + VarToJSON([Value, false])); -end; - -procedure TExtAction.SetFText(Value : String); begin - FText := Value; - if not ConfigAvailable(JSName) then - SetText(Value) - else - JSCode('text:' + VarToJSON([Value])); -end; - -function TExtAction.JSClassName : string; begin - Result := 'Ext.Action'; -end; - -procedure TExtAction.InitDefaults; begin - inherited; - FScope := TExtObject.CreateInternal(Self, 'scope'); -end; - -{$IFDEF FPC}constructor TExtAction.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtAction.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; -end; - -function TExtAction.Disable : TExtFunction; begin - JSCode(JSName + '.disable();', 'TExtAction'); - Result := Self; -end; - -function TExtAction.Each(Fn : TExtFunction; Scope : TExtObject) : TExtFunction; begin - JSCode(JSName + '.each(' + VarToJSON([Fn, true, Scope, false]) + ');', 'TExtAction'); - Result := Self; -end; - -function TExtAction.Enable : TExtFunction; begin - JSCode(JSName + '.enable();', 'TExtAction'); - Result := Self; -end; - -function TExtAction.Execute(Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.execute(' + VarToJSON(Args) + ');', 'TExtAction'); - Result := Self; -end; - -function TExtAction.GetIconCls : TExtFunction; begin - JSCode(JSName + '.getIconCls();', 'TExtAction'); - Result := Self; -end; - -function TExtAction.GetText : TExtFunction; begin - JSCode(JSName + '.getText();', 'TExtAction'); - Result := Self; -end; - -function TExtAction.Hide : TExtFunction; begin - JSCode(JSName + '.hide();', 'TExtAction'); - Result := Self; -end; - -function TExtAction.IsDisabled : TExtFunction; begin - JSCode(JSName + '.isDisabled();', 'TExtAction'); - Result := Self; -end; - -function TExtAction.IsHidden : TExtFunction; begin - JSCode(JSName + '.isHidden();', 'TExtAction'); - Result := Self; + FBoxZIndex := 100; end; -function TExtAction.SetDisabled(Disabled : Boolean) : TExtFunction; begin - JSCode(JSName + '.setDisabled(' + VarToJSON([Disabled]) + ');', 'TExtAction'); - Result := Self; +{$IFDEF FPC}constructor TExtChartLegend.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtChartLegend.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -function TExtAction.SetHandler(Fn : TExtFunction; Scope : TExtObject) : TExtFunction; begin - JSCode(JSName + '.setHandler(' + VarToJSON([Fn, true, Scope, false]) + ');', 'TExtAction'); +function TExtChartLegend.Toggle(Show : Boolean) : TExtFunction; begin + JSCode(JSName + '.toggle(' + VarToJSON([Show]) + ');', 'TExtChartLegend'); Result := Self; end; -function TExtAction.SetHidden(Hidden : Boolean) : TExtFunction; begin - JSCode(JSName + '.setHidden(' + VarToJSON([Hidden]) + ');', 'TExtAction'); - Result := Self; +procedure TExtChartLabel.SetFLabelJS(Value : TExtObject); begin + FLabelJS := Value; + Value.DeleteFromGarbage; + JSCode('labelJS:' + VarToJSON([Value, false])); end; -function TExtAction.SetIconCls(Cls : String) : TExtFunction; begin - JSCode(JSName + '.setIconCls(' + VarToJSON([Cls]) + ');', 'TExtAction'); - Result := Self; +function TExtChartLabel.JSClassName : string; begin + Result := 'Ext.chart.Label'; end; -function TExtAction.SetText(Text : String) : TExtFunction; begin - JSCode(JSName + '.setText(' + VarToJSON([Text]) + ');', 'TExtAction'); - Result := Self; +procedure TExtChartLabel.InitDefaults; begin + inherited; + FLabelJS := TExtObject.CreateInternal(Self, 'labelJS'); end; -function TExtAction.Show : TExtFunction; begin - JSCode(JSName + '.show();', 'TExtAction'); - Result := Self; +{$IFDEF FPC}constructor TExtChartLabel.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtChartLabel.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -destructor TExtAction.Destroy; begin +destructor TExtChartLabel.Destroy; begin try - FScope.Free; + FLabelJS.Free; except end; inherited; end; -procedure TExtDdDragTracker.SetFAutoStart(Value : Boolean); begin - FAutoStart := Value; - JSCode('autoStart:' + VarToJSON([Value])); +procedure TExtChartMask.SetFMask(Value : Boolean); begin + FMask := Value; + JSCode('mask:' + VarToJSON([Value])); end; -procedure TExtDdDragTracker.SetFAutoStartInteger(Value : Integer); begin - FAutoStartInteger := Value; - JSCode('autoStart:' + VarToJSON([Value])); +procedure TExtChartMask.SetFMaskString(Value : String); begin + FMaskString := Value; + JSCode('mask:' + VarToJSON([Value])); end; -procedure TExtDdDragTracker.SetFConstrainTo(Value : TExtUtilRegion); begin - FConstrainTo := Value; - Value.DeleteFromGarbage; - JSCode('constrainTo:' + VarToJSON([Value, false])); +function TExtChartMask.JSClassName : string; begin + Result := 'Ext.chart.Mask'; end; -procedure TExtDdDragTracker.SetFConstrainToElement(Value : TExtElement); begin - FConstrainToElement := Value; - Value.DeleteFromGarbage; - JSCode('constrainTo:' + VarToJSON([Value, false])); -end; +{$IFDEF FPC}constructor TExtChartMask.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtDdDragTracker.SetFDelegate(Value : String); begin - FDelegate := Value; - JSCode('delegate:' + VarToJSON([Value])); +constructor TExtChartMask.Create(Config : TExtObject = nil); begin + if Config = nil then CreateVar(JSClassName + '({});') else + CreateVar(JSClassName + '(' + VarToJSON([Config, false]) + ');'); + InitDefaults; end; -procedure TExtDdDragTracker.SetFHasListeners(Value : TExtObject); begin +procedure TExtChartSeries.SetFHasListeners(Value : TExtObject); begin FHasListeners := Value; Value.DeleteFromGarbage; JSCode(JSName + '.hasListeners=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtDdDragTracker.SetFIsObservable(Value : Boolean); begin +procedure TExtChartSeries.SetFHighlight(Value : Boolean); begin + FHighlight := Value; + JSCode('highlight:' + VarToJSON([Value])); +end; + +procedure TExtChartSeries.SetFHighlightCfg(Value : TExtObject); begin + FHighlightCfg := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.highlightCfg=' + VarToJSON([Value, false]) + ';'); +end; + +procedure TExtChartSeries.SetFHighlightObject(Value : TExtObject); begin + FHighlightObject := Value; + Value.DeleteFromGarbage; + JSCode('highlight:' + VarToJSON([Value, false])); +end; + +procedure TExtChartSeries.SetFIsObservable(Value : Boolean); begin FIsObservable := Value; JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); end; -procedure TExtDdDragTracker.SetFListeners(Value : TExtObject); begin +procedure TExtChartSeries.SetFLabelJS(Value : TExtObject); begin + FLabelJS := Value; + Value.DeleteFromGarbage; + JSCode('labelJS:' + VarToJSON([Value, false])); +end; + +procedure TExtChartSeries.SetFListeners(Value : TExtObject); begin FListeners := Value; Value.DeleteFromGarbage; JSCode('listeners:' + VarToJSON([Value, false])); end; -procedure TExtDdDragTracker.SetFOverCls(Value : String); begin - FOverCls := Value; - JSCode('overCls:' + VarToJSON([Value])); +procedure TExtChartSeries.SetFRenderer(Value : TExtFunction); begin + FRenderer := Value; + JSCode('renderer:' + VarToJSON([Value, true])); end; -procedure TExtDdDragTracker.SetFPreventDefault(Value : Boolean); begin - FPreventDefault := Value; - JSCode('preventDefault:' + VarToJSON([Value])); +procedure TExtChartSeries.SetFShadowAttributes(Value : TExtObjectList); begin + FShadowAttributes := Value; + Value.DeleteFromGarbage; + JSCode('shadowAttributes:' + VarToJSON([Value, false])); end; -procedure TExtDdDragTracker.SetFStopEvent(Value : Boolean); begin - FStopEvent := Value; - JSCode('stopEvent:' + VarToJSON([Value])); +procedure TExtChartSeries.SetFShowInLegend(Value : Boolean); begin + FShowInLegend := Value; + JSCode('showInLegend:' + VarToJSON([Value])); end; -procedure TExtDdDragTracker.SetFTolerance(Value : Integer); begin - FTolerance := Value; - JSCode('tolerance:' + VarToJSON([Value])); +procedure TExtChartSeries.SetFTips(Value : TExtObject); begin + FTips := Value; + Value.DeleteFromGarbage; + JSCode('tips:' + VarToJSON([Value, false])); end; -procedure TExtDdDragTracker.SetFTrackOver(Value : Boolean); begin - FTrackOver := Value; - JSCode('trackOver:' + VarToJSON([Value])); +procedure TExtChartSeries.SetFTitle(Value : String); begin + FTitle := Value; + JSCode('title:' + VarToJSON([Value])); end; -procedure TExtDdDragTracker.SetFOnBeforestart(Value : TExtDdDragTrackerOnBeforestart); begin - if Assigned(FOnBeforestart) then - JSCode(JSName+'.events ["beforestart"].listeners=[];'); - if Assigned(Value) then - AddListener('beforestart', Ajax('beforestart', ['This', '%0.nm','E', '%1.nm'], true)); - FOnBeforestart := Value; +procedure TExtChartSeries.SetFTypeJS(Value : String); begin + FTypeJS := Value; + JSCode('typeJS:' + VarToJSON([Value])); end; -procedure TExtDdDragTracker.SetFOnDrag(Value : TExtDdDragTrackerOnDrag); begin - if Assigned(FOnDrag) then - JSCode(JSName+'.events ["drag"].listeners=[];'); +procedure TExtChartSeries.SetFOnTitlechange(Value : TExtChartSeriesOnTitlechange); begin + if Assigned(FOnTitlechange) then + JSCode(JSName+'.events ["titlechange"].listeners=[];'); if Assigned(Value) then - AddListener('drag', Ajax('drag', ['This', '%0.nm','E', '%1.nm'], true)); - FOnDrag := Value; + AddListener('titlechange', Ajax('titlechange', ['Title', '%0','Index', '%1'], true)); + FOnTitlechange := Value; end; -procedure TExtDdDragTracker.SetFOnDragend(Value : TExtDdDragTrackerOnDragend); begin - if Assigned(FOnDragend) then - JSCode(JSName+'.events ["dragend"].listeners=[];'); - if Assigned(Value) then - AddListener('dragend', Ajax('dragend', ['This', '%0.nm','E', '%1.nm'], true)); - FOnDragend := Value; +function TExtChartSeries.JSClassName : string; begin + Result := 'Ext.chart.series.Series'; end; -procedure TExtDdDragTracker.SetFOnDragstart(Value : TExtDdDragTrackerOnDragstart); begin - if Assigned(FOnDragstart) then - JSCode(JSName+'.events ["dragstart"].listeners=[];'); - if Assigned(Value) then - AddListener('dragstart', Ajax('dragstart', ['This', '%0.nm','E', '%1.nm'], true)); - FOnDragstart := Value; +procedure TExtChartSeries.InitDefaults; begin + inherited; + FHasListeners := TExtObject.CreateInternal(Self, 'hasListeners'); + FHighlightCfg := TExtObject.CreateInternal(Self, 'highlightCfg'); + FHighlightObject := TExtObject.CreateInternal(Self, 'highlight'); + FLabelJS := TExtObject.CreateInternal(Self, 'labelJS'); + FListeners := TExtObject.CreateInternal(Self, 'listeners'); + FShadowAttributes := TExtObjectList.Create(Self, 'shadowAttributes'); + FTips := TExtObject.CreateInternal(Self, 'tips'); end; -procedure TExtDdDragTracker.SetFOnMousedown(Value : TExtDdDragTrackerOnMousedown); begin - if Assigned(FOnMousedown) then - JSCode(JSName+'.events ["mousedown"].listeners=[];'); - if Assigned(Value) then - AddListener('mousedown', Ajax('mousedown', ['This', '%0.nm','E', '%1.nm'], true)); - FOnMousedown := Value; -end; +{$IFDEF FPC}constructor TExtChartSeries.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtDdDragTracker.SetFOnMousemove(Value : TExtDdDragTrackerOnMousemove); begin - if Assigned(FOnMousemove) then - JSCode(JSName+'.events ["mousemove"].listeners=[];'); - if Assigned(Value) then - AddListener('mousemove', Ajax('mousemove', ['This', '%0.nm','E', '%1.nm'], true)); - FOnMousemove := Value; +function TExtChartSeries.AddEvents(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtChartSeries'); + Result := Self; end; -procedure TExtDdDragTracker.SetFOnMouseout(Value : TExtDdDragTrackerOnMouseout); begin - if Assigned(FOnMouseout) then - JSCode(JSName+'.events ["mouseout"].listeners=[];'); - if Assigned(Value) then - AddListener('mouseout', Ajax('mouseout', ['This', '%0.nm','E', '%1.nm'], true)); - FOnMouseout := Value; +function TExtChartSeries.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtChartSeries'); + Result := Self; end; -procedure TExtDdDragTracker.SetFOnMouseover(Value : TExtDdDragTrackerOnMouseover); begin - if Assigned(FOnMouseover) then - JSCode(JSName+'.events ["mouseover"].listeners=[];'); - if Assigned(Value) then - AddListener('mouseover', Ajax('mouseover', ['This', '%0.nm','E', '%1.nm','Target', '%2.nm'], true)); - FOnMouseover := Value; +function TExtChartSeries.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtChartSeries'); + Result := Self; end; -procedure TExtDdDragTracker.SetFOnMouseup(Value : TExtDdDragTrackerOnMouseup); begin - if Assigned(FOnMouseup) then - JSCode(JSName+'.events ["mouseup"].listeners=[];'); - if Assigned(Value) then - AddListener('mouseup', Ajax('mouseup', ['This', '%0.nm','E', '%1.nm'], true)); - FOnMouseup := Value; +function TExtChartSeries.ClearListeners : TExtFunction; begin + JSCode(JSName + '.clearListeners();', 'TExtChartSeries'); + Result := Self; end; -function TExtDdDragTracker.JSClassName : string; begin - Result := 'Ext.dd.DragTracker'; +function TExtChartSeries.ClearManagedListeners : TExtFunction; begin + JSCode(JSName + '.clearManagedListeners();', 'TExtChartSeries'); + Result := Self; end; -procedure TExtDdDragTracker.InitDefaults; begin - inherited; - FConstrainTo := TExtUtilRegion.CreateInternal(Self, 'constrainTo'); - FConstrainToElement := TExtElement.CreateInternal(Self, 'constrainTo'); - FHasListeners := TExtObject.CreateInternal(Self, 'hasListeners'); - FListeners := TExtObject.CreateInternal(Self, 'listeners'); +constructor TExtChartSeries.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -{$IFDEF FPC}constructor TExtDdDragTracker.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtChartSeries.EachRecord(Fn : TExtFunction; Scope : TExtObject) : TExtFunction; begin + JSCode(JSName + '.eachRecord(' + VarToJSON([Fn, true, Scope, false]) + ');', 'TExtChartSeries'); + Result := Self; +end; -function TExtDdDragTracker.AddEvents(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtDdDragTracker'); +function TExtChartSeries.EnableBubble(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtChartSeries'); Result := Self; end; -function TExtDdDragTracker.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtDdDragTracker'); +function TExtChartSeries.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtChartSeries'); Result := Self; end; -function TExtDdDragTracker.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtDdDragTracker'); +function TExtChartSeries.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtChartSeries'); Result := Self; end; -function TExtDdDragTracker.ClearListeners : TExtFunction; begin - JSCode(JSName + '.clearListeners();', 'TExtDdDragTracker'); +function TExtChartSeries.GetItemForPoint(X : Integer; Y : Integer) : TExtFunction; begin + JSCode(JSName + '.getItemForPoint(' + VarToJSON([X, Y]) + ');', 'TExtChartSeries'); Result := Self; end; -function TExtDdDragTracker.ClearManagedListeners : TExtFunction; begin - JSCode(JSName + '.clearManagedListeners();', 'TExtDdDragTracker'); +function TExtChartSeries.GetLegendColor : TExtFunction; begin + JSCode(JSName + '.getLegendColor();', 'TExtChartSeries'); Result := Self; end; -constructor TExtDdDragTracker.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +function TExtChartSeries.GetRecordCount : TExtFunction; begin + JSCode(JSName + '.getRecordCount();', 'TExtChartSeries'); + Result := Self; end; -function TExtDdDragTracker.EnableBubble(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtDdDragTracker'); +function TExtChartSeries.HasListener(EventName : String) : TExtFunction; begin + JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtChartSeries'); Result := Self; end; -function TExtDdDragTracker.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDdDragTracker'); +function TExtChartSeries.HideAll : TExtFunction; begin + JSCode(JSName + '.hideAll();', 'TExtChartSeries'); Result := Self; end; -function TExtDdDragTracker.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDdDragTracker'); +function TExtChartSeries.HighlightItem(Item : TExtObject) : TExtFunction; begin + JSCode(JSName + '.highlightItem(' + VarToJSON([Item, false]) + ');', 'TExtChartSeries'); Result := Self; end; -function TExtDdDragTracker.GetDragTarget : TExtFunction; begin - JSCode(JSName + '.getDragTarget();', 'TExtDdDragTracker'); +function TExtChartSeries.IsExcluded : TExtFunction; begin + JSCode(JSName + '.isExcluded();', 'TExtChartSeries'); Result := Self; end; -function TExtDdDragTracker.GetOffset(ConstrainMode : String = '') : TExtFunction; begin - JSCode(JSName + '.getOffset(' + VarToJSON([ConstrainMode]) + ');', 'TExtDdDragTracker'); +function TExtChartSeries.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin + JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtChartSeries'); Result := Self; end; -function TExtDdDragTracker.HasListener(EventName : String) : TExtFunction; begin - JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtDdDragTracker'); +function TExtChartSeries.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtChartSeries'); Result := Self; end; -function TExtDdDragTracker.InitEl(El : TExtElement) : TExtFunction; begin - JSCode(JSName + '.initEl(' + VarToJSON([El, false]) + ');', 'TExtDdDragTracker'); +function TExtChartSeries.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtChartSeries'); Result := Self; end; -function TExtDdDragTracker.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin - JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtDdDragTracker'); +function TExtChartSeries.ResumeEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtChartSeries'); Result := Self; end; -function TExtDdDragTracker.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtDdDragTracker'); +function TExtChartSeries.ResumeEvents : TExtFunction; begin + JSCode(JSName + '.resumeEvents();', 'TExtChartSeries'); Result := Self; end; -function TExtDdDragTracker.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtDdDragTracker'); +function TExtChartSeries.SetTitle(Index : Integer; Title : String) : TExtFunction; begin + JSCode(JSName + '.setTitle(' + VarToJSON([Index, Title]) + ');', 'TExtChartSeries'); Result := Self; end; -function TExtDdDragTracker.ResumeEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtDdDragTracker'); +function TExtChartSeries.ShowAll : TExtFunction; begin + JSCode(JSName + '.showAll();', 'TExtChartSeries'); Result := Self; end; -function TExtDdDragTracker.ResumeEvents : TExtFunction; begin - JSCode(JSName + '.resumeEvents();', 'TExtDdDragTracker'); +function TExtChartSeries.SuspendEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtChartSeries'); Result := Self; end; -function TExtDdDragTracker.SuspendEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtDdDragTracker'); +function TExtChartSeries.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin + JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtChartSeries'); Result := Self; end; -function TExtDdDragTracker.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin - JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtDdDragTracker'); +function TExtChartSeries.UnHighlightItem : TExtFunction; begin + JSCode(JSName + '.unHighlightItem();', 'TExtChartSeries'); Result := Self; end; -destructor TExtDdDragTracker.Destroy; begin +destructor TExtChartSeries.Destroy; begin try - FConstrainTo.Free; - FConstrainToElement.Free; FHasListeners.Free; + FHighlightCfg.Free; + FHighlightObject.Free; + FLabelJS.Free; FListeners.Free; + FShadowAttributes.Free; + FTips.Free; except end; inherited; end; -procedure TExtDdDragTracker.HandleEvent(const AEvtName : string); begin +procedure TExtChartSeries.HandleEvent(const AEvtName : string); begin inherited; - if (AEvtName = 'beforestart') and Assigned(FOnBeforestart) then - FOnBeforestart(TExtDdDragTracker(ParamAsObject('This')), TExtObject(ParamAsObject('E'))) - else if (AEvtName = 'drag') and Assigned(FOnDrag) then - FOnDrag(TExtDdDragTracker(ParamAsObject('This')), TExtObject(ParamAsObject('E'))) - else if (AEvtName = 'dragend') and Assigned(FOnDragend) then - FOnDragend(TExtDdDragTracker(ParamAsObject('This')), TExtObject(ParamAsObject('E'))) - else if (AEvtName = 'dragstart') and Assigned(FOnDragstart) then - FOnDragstart(TExtDdDragTracker(ParamAsObject('This')), TExtObject(ParamAsObject('E'))) - else if (AEvtName = 'mousedown') and Assigned(FOnMousedown) then - FOnMousedown(TExtDdDragTracker(ParamAsObject('This')), TExtObject(ParamAsObject('E'))) - else if (AEvtName = 'mousemove') and Assigned(FOnMousemove) then - FOnMousemove(TExtDdDragTracker(ParamAsObject('This')), TExtObject(ParamAsObject('E'))) - else if (AEvtName = 'mouseout') and Assigned(FOnMouseout) then - FOnMouseout(TExtDdDragTracker(ParamAsObject('This')), TExtObject(ParamAsObject('E'))) - else if (AEvtName = 'mouseover') and Assigned(FOnMouseover) then - FOnMouseover(TExtDdDragTracker(ParamAsObject('This')), TExtObject(ParamAsObject('E')), THTMLElement(ParamAsObject('Target'))) - else if (AEvtName = 'mouseup') and Assigned(FOnMouseup) then - FOnMouseup(TExtDdDragTracker(ParamAsObject('This')), TExtObject(ParamAsObject('E'))); -end; - -procedure TExtAbstractPlugin.SetFPluginId(Value : String); begin - FPluginId := Value; - JSCode('pluginId:' + VarToJSON([Value])); + if (AEvtName = 'titlechange') and Assigned(FOnTitlechange) then + FOnTitlechange(ParamAsString('Title'), ParamAsInteger('Index')); end; -function TExtAbstractPlugin.JSClassName : string; begin - Result := 'Ext.AbstractPlugin'; +function TExtChartNavigation.JSClassName : string; begin + Result := 'Ext.chart.Navigation'; end; -{$IFDEF FPC}constructor TExtAbstractPlugin.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtChartNavigation.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtAbstractPlugin.Disable : TExtFunction; begin - JSCode(JSName + '.disable();', 'TExtAbstractPlugin'); +function TExtChartNavigation.RestoreZoom : TExtFunction; begin + JSCode(JSName + '.restoreZoom();', 'TExtChartNavigation'); Result := Self; end; -function TExtDiagLayoutContextItem.JSClassName : string; begin - Result := 'Ext.diag.layout.ContextItem'; +function TExtChartNavigation.SetZoom : TExtFunction; begin + JSCode(JSName + '.setZoom();', 'TExtChartNavigation'); + Result := Self; end; -{$IFDEF FPC}constructor TExtDiagLayoutContextItem.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtDataIdGenerator.SetFId(Value : String); begin - FId := Value; - JSCode('id:' + VarToJSON([Value])); +procedure TExtDirectManagerSingleton.SetFHasListeners(Value : TExtObject); begin + FHasListeners := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.hasListeners=' + VarToJSON([Value, false]) + ';'); end; -function TExtDataIdGenerator.JSClassName : string; begin - Result := 'Ext.data.IdGenerator'; +procedure TExtDirectManagerSingleton.SetFIsObservable(Value : Boolean); begin + FIsObservable := Value; + JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); end; -class function TExtDataIdGenerator.All : TExtObject; -const - lAll : TExtObject = nil; -begin - if lAll = nil then lAll := TExtObject.CreateSingleton('Ext.data.IdGenerator.All'); - Result := lAll +procedure TExtDirectManagerSingleton.SetFListeners(Value : TExtObject); begin + FListeners := Value; + Value.DeleteFromGarbage; + JSCode('listeners:' + VarToJSON([Value, false])); end; -{$IFDEF FPC}constructor TExtDataIdGenerator.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtDirectManagerSingleton.SetFOnEvent(Value : TExtDirectManagerSingletonOnEvent); begin + if Assigned(FOnEvent) then + JSCode(JSName+'.events ["event"].listeners=[];'); + if Assigned(Value) then + AddListener('event', Ajax('event', ['Event', '%0.nm','Provider', '%1.nm'], true)); + FOnEvent := Value; +end; -function TExtDataIdGenerator.Get(Config : String) : TExtFunction; begin - JSCode(JSName + '.get(' + VarToJSON([Config]) + ');', 'TExtDataIdGenerator'); - Result := Self; +procedure TExtDirectManagerSingleton.SetFOnException(Value : TExtDirectManagerSingletonOnException); begin + if Assigned(FOnException) then + JSCode(JSName+'.events ["exception"].listeners=[];'); + if Assigned(Value) then + AddListener('exception', Ajax('exception', ['Event', '%0.nm'], true)); + FOnException := Value; end; -function TExtDdRegistrySingleton.JSClassName : string; begin - Result := 'Ext.dd.Registry'; +function TExtDirectManagerSingleton.JSClassName : string; begin + Result := 'Ext.direct.Manager'; end; -{$IFDEF FPC}constructor TExtDdRegistrySingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtDirectManagerSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtDdRegistrySingleton.GetHandle(Id : String) : TExtFunction; begin - JSCode(JSName + '.getHandle(' + VarToJSON([Id]) + ');', 'TExtDdRegistrySingleton'); +function TExtDirectManagerSingleton.AddEvents(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtDirectManagerSingleton'); Result := Self; end; -function TExtDdRegistrySingleton.GetHandleFromEvent(E : TEvent) : TExtFunction; begin - JSCode(JSName + '.getHandleFromEvent(' + VarToJSON([E, false]) + ');', 'TExtDdRegistrySingleton'); +function TExtDirectManagerSingleton.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtDirectManagerSingleton'); Result := Self; end; -function TExtDdRegistrySingleton.GetTarget(Id : String) : TExtFunction; begin - JSCode(JSName + '.getTarget(' + VarToJSON([Id]) + ');', 'TExtDdRegistrySingleton'); +function TExtDirectManagerSingleton.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtDirectManagerSingleton'); Result := Self; end; -function TExtDdRegistrySingleton.GetTargetFromEvent(E : TEvent) : TExtFunction; begin - JSCode(JSName + '.getTargetFromEvent(' + VarToJSON([E, false]) + ');', 'TExtDdRegistrySingleton'); +function TExtDirectManagerSingleton.AddProvider(Provider : TExtDirectProvider) : TExtFunction; begin + JSCode(JSName + '.addProvider(' + VarToJSON([Provider, false]) + ');', 'TExtDirectManagerSingleton'); Result := Self; end; -function TExtDdRegistrySingleton.Register(Element : String; Data : TExtObject; DataHandles : TExtObjectList; DataIsHandle : Boolean) : TExtFunction; begin - JSCode(JSName + '.register(' + VarToJSON([Element, Data, false]) + ',' + VarToJSON(DataHandles) + ',' + VarToJSON([DataIsHandle]) + ');', 'TExtDdRegistrySingleton'); +function TExtDirectManagerSingleton.ClearListeners : TExtFunction; begin + JSCode(JSName + '.clearListeners();', 'TExtDirectManagerSingleton'); Result := Self; end; -function TExtDdRegistrySingleton.Unregister(Element : String) : TExtFunction; begin - JSCode(JSName + '.unregister(' + VarToJSON([Element]) + ');', 'TExtDdRegistrySingleton'); +function TExtDirectManagerSingleton.ClearManagedListeners : TExtFunction; begin + JSCode(JSName + '.clearManagedListeners();', 'TExtDirectManagerSingleton'); Result := Self; end; -procedure TExtAbstractManager.SetFAll(Value : TExtUtilHashMap); begin - FAll := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.all=' + VarToJSON([Value, false]) + ';'); -end; - -function TExtAbstractManager.JSClassName : string; begin - Result := 'Ext.AbstractManager'; -end; - -procedure TExtAbstractManager.InitDefaults; begin - inherited; - FAll := TExtUtilHashMap.CreateInternal(Self, 'all'); +constructor TExtDirectManagerSingleton.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -{$IFDEF FPC}constructor TExtAbstractManager.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtAbstractManager.Create; begin - CreateVarAlt(JSClassName + '.create({});'); - InitDefaults; +function TExtDirectManagerSingleton.EnableBubble(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtDirectManagerSingleton'); + Result := Self; end; -function TExtAbstractManager.Each(Fn : TExtFunction; FnKey : String; FnValue : Integer; FnLength : Integer; FnReturn : Boolean; Scope : TExtObject) : TExtFunction; begin - JSCode(JSName + '.each(' + VarToJSON([Fn, true, FnKey, FnValue, FnLength, FnReturn, Scope, false]) + ');', 'TExtAbstractManager'); +function TExtDirectManagerSingleton.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDirectManagerSingleton'); Result := Self; end; -function TExtAbstractManager.Get(Id : String) : TExtFunction; begin - JSCode(JSName + '.get(' + VarToJSON([Id]) + ');', 'TExtAbstractManager'); +function TExtDirectManagerSingleton.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDirectManagerSingleton'); Result := Self; end; -function TExtAbstractManager.GetCount : TExtFunction; begin - JSCode(JSName + '.getCount();', 'TExtAbstractManager'); +function TExtDirectManagerSingleton.GetProvider(Id : String) : TExtFunction; begin + JSCode(JSName + '.getProvider(' + VarToJSON([Id]) + ');', 'TExtDirectManagerSingleton'); Result := Self; end; -function TExtAbstractManager.IsRegistered(TypeJS : String) : TExtFunction; begin - JSCode(JSName + '.isRegistered(' + VarToJSON([TypeJS]) + ');', 'TExtAbstractManager'); +function TExtDirectManagerSingleton.HasListener(EventName : String) : TExtFunction; begin + JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtDirectManagerSingleton'); Result := Self; end; -function TExtAbstractManager.OnAvailable(Id : String; Fn : TExtFunction; Scope : TExtObject) : TExtFunction; begin - JSCode(JSName + '.onAvailable(' + VarToJSON([Id, Fn, true, Scope, false]) + ');', 'TExtAbstractManager'); +function TExtDirectManagerSingleton.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin + JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtDirectManagerSingleton'); Result := Self; end; -function TExtAbstractManager.Register(Item : TExtObject) : TExtFunction; begin - JSCode(JSName + '.register(' + VarToJSON([Item, false]) + ');', 'TExtAbstractManager'); +function TExtDirectManagerSingleton.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtDirectManagerSingleton'); Result := Self; end; -function TExtAbstractManager.RegisterType(TypeJS : String; Cls : TExtFunction) : TExtFunction; begin - JSCode(JSName + '.registerType(' + VarToJSON([TypeJS, Cls, true]) + ');', 'TExtAbstractManager'); +function TExtDirectManagerSingleton.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtDirectManagerSingleton'); Result := Self; end; -function TExtAbstractManager.Unregister(Item : TExtObject) : TExtFunction; begin - JSCode(JSName + '.unregister(' + VarToJSON([Item, false]) + ');', 'TExtAbstractManager'); +function TExtDirectManagerSingleton.RemoveProvider(Provider : String) : TExtFunction; begin + JSCode(JSName + '.removeProvider(' + VarToJSON([Provider]) + ');', 'TExtDirectManagerSingleton'); Result := Self; end; -destructor TExtAbstractManager.Destroy; begin - try - FAll.Free; - except end; - inherited; +function TExtDirectManagerSingleton.ResumeEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtDirectManagerSingleton'); + Result := Self; end; -function TExtDiagLayoutContext.JSClassName : string; begin - Result := 'Ext.diag.layout.Context'; +function TExtDirectManagerSingleton.ResumeEvents : TExtFunction; begin + JSCode(JSName + '.resumeEvents();', 'TExtDirectManagerSingleton'); + Result := Self; end; -{$IFDEF FPC}constructor TExtDiagLayoutContext.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtDirectManagerSingleton.SuspendEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtDirectManagerSingleton'); + Result := Self; +end; -procedure TExtChartMask.SetFMask(Value : Boolean); begin - FMask := Value; - JSCode('mask:' + VarToJSON([Value])); +function TExtDirectManagerSingleton.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin + JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtDirectManagerSingleton'); + Result := Self; end; -procedure TExtChartMask.SetFMaskString(Value : String); begin - FMaskString := Value; - JSCode('mask:' + VarToJSON([Value])); +procedure TExtDirectManagerSingleton.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'event') and Assigned(FOnEvent) then + FOnEvent(TExtDirectEvent(ParamAsObject('Event')), TExtDirectProvider(ParamAsObject('Provider'))) + else if (AEvtName = 'exception') and Assigned(FOnException) then + FOnException(TExtDirectEvent(ParamAsObject('Event'))); end; -function TExtChartMask.JSClassName : string; begin - Result := 'Ext.chart.Mask'; +function TExtDirectEvent.JSClassName : string; begin + Result := 'Ext.direct.Event'; end; -{$IFDEF FPC}constructor TExtChartMask.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtDirectEvent.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtChartMask.Create(Config : TExtObject = nil); begin +constructor TExtDirectEvent.Create(Config : TExtObject = nil); begin if Config = nil then CreateVar(JSClassName + '({});') else CreateVar(JSClassName + '(' + VarToJSON([Config, false]) + ');'); InitDefaults; end; +function TExtDirectEvent.GetData : TExtFunction; begin + JSCode(JSName + '.getData();', 'TExtDirectEvent'); + Result := Self; +end; + +function TExtDirectEvent.GetName : TExtFunction; begin + JSCode(JSName + '.getName();', 'TExtDirectEvent'); + Result := Self; +end; + procedure TExtDdScrollManagerSingleton.SetFDdGroup(Value : String); begin FDdGroup := Value; JSCode(JSName + '.ddGroup=' + VarToJSON([Value]) + ';'); @@ -26648,1418 +27677,1534 @@ function TExtDdScrollManagerSingleton.RefreshCache : TExtFunction; begin Result := Self; end; -procedure TExtDdDragDropManagerSingleton.SetFClickPixelThresh(Value : Integer); begin - FClickPixelThresh := Value; - JSCode(JSName + '.clickPixelThresh=' + VarToJSON([Value]) + ';'); +procedure TExtDdDragDrop.SetFAvailable(Value : Boolean); begin + FAvailable := Value; + JSCode(JSName + '.available=' + VarToJSON([Value]) + ';'); end; -procedure TExtDdDragDropManagerSingleton.SetFClickTimeThresh(Value : Integer); begin - FClickTimeThresh := Value; - JSCode(JSName + '.clickTimeThresh=' + VarToJSON([Value]) + ';'); +procedure TExtDdDragDrop.SetFConfig(Value : TExtObject); begin + FConfig := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.config=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtDdDragDropManagerSingleton.SetFDragCls(Value : String); begin - FDragCls := Value; - JSCode(JSName + '.dragCls=' + VarToJSON([Value]) + ';'); +procedure TExtDdDragDrop.SetFDefaultPadding(Value : TExtObject); begin + FDefaultPadding := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.defaultPadding=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtDdDragDropManagerSingleton.SetFLocationCache(Value : TExtObject); begin - FLocationCache := Value; +procedure TExtDdDragDrop.SetFGroups(Value : TExtObject); begin + FGroups := Value; Value.DeleteFromGarbage; - JSCode(JSName + '.locationCache=' + VarToJSON([Value, false]) + ';'); + JSCode(JSName + '.groups=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtDdDragDropManagerSingleton.SetFMode(Value : Integer); begin - FMode := Value; - JSCode(JSName + '.mode=' + VarToJSON([Value]) + ';'); +procedure TExtDdDragDrop.SetFHasOuterHandles(Value : Boolean); begin + FHasOuterHandles := Value; + JSCode(JSName + '.hasOuterHandles=' + VarToJSON([Value]) + ';'); end; -procedure TExtDdDragDropManagerSingleton.SetFNotifyOccluded(Value : Boolean); begin - FNotifyOccluded := Value; - JSCode(JSName + '.notifyOccluded=' + VarToJSON([Value]) + ';'); +procedure TExtDdDragDrop.SetFId(Value : String); begin + FId := Value; + JSCode(JSName + '.id=' + VarToJSON([Value]) + ';'); end; -procedure TExtDdDragDropManagerSingleton.SetFPreventDefault(Value : Boolean); begin - FPreventDefault := Value; - JSCode(JSName + '.preventDefault=' + VarToJSON([Value]) + ';'); +procedure TExtDdDragDrop.SetFIgnoreSelf(Value : Boolean); begin + FIgnoreSelf := Value; + JSCode(JSName + '.ignoreSelf=' + VarToJSON([Value]) + ';'); end; -procedure TExtDdDragDropManagerSingleton.SetFStopPropagation(Value : Boolean); begin - FStopPropagation := Value; - JSCode(JSName + '.stopPropagation=' + VarToJSON([Value]) + ';'); +procedure TExtDdDragDrop.SetFInvalidHandleClasses(Value : TExtObjectList); begin + FInvalidHandleClasses := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.invalidHandleClasses=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtDdDragDropManagerSingleton.SetFUseCache(Value : Boolean); begin - FUseCache := Value; - JSCode(JSName + '.useCache=' + VarToJSON([Value]) + ';'); +procedure TExtDdDragDrop.SetFInvalidHandleTypes(Value : TExtObject); begin + FInvalidHandleTypes := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.invalidHandleTypes=' + VarToJSON([Value, false]) + ';'); end; -function TExtDdDragDropManagerSingleton.JSClassName : string; begin - Result := 'Ext.dd.DragDropManager'; +procedure TExtDdDragDrop.SetFIsTarget(Value : Boolean); begin + FIsTarget := Value; + JSCode(JSName + '.isTarget=' + VarToJSON([Value]) + ';'); end; -class function TExtDdDragDropManagerSingleton.INTERSECT : Integer; begin - Result := 0 +procedure TExtDdDragDrop.SetFMaintainOffset(Value : Boolean); begin + FMaintainOffset := Value; + JSCode(JSName + '.maintainOffset=' + VarToJSON([Value]) + ';'); end; -class function TExtDdDragDropManagerSingleton.POINT : Integer; begin - Result := 0 +procedure TExtDdDragDrop.SetFMoveOnly(Value : Boolean); begin + FMoveOnly := Value; + JSCode(JSName + '.moveOnly=' + VarToJSON([Value]) + ';'); end; -procedure TExtDdDragDropManagerSingleton.InitDefaults; begin - inherited; - FLocationCache := TExtObject.CreateInternal(Self, 'locationCache'); +procedure TExtDdDragDrop.SetFPadding(Value : TArrayOfInteger); begin + FPadding := Value; + JSCode(JSName + '.padding=' + ArrayToJSON(Value) + ';'); end; -{$IFDEF FPC}constructor TExtDdDragDropManagerSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDdDragDropManagerSingleton.GetBestMatch(Dds : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.getBestMatch(' + VarToJSON(Dds) + ');', 'TExtDdDragDropManagerSingleton'); - Result := Self; +procedure TExtDdDragDrop.SetFPrimaryButtonOnly(Value : Boolean); begin + FPrimaryButtonOnly := Value; + JSCode(JSName + '.primaryButtonOnly=' + VarToJSON([Value]) + ';'); end; -function TExtDdDragDropManagerSingleton.GetCss(Id : String) : TExtFunction; begin - JSCode(JSName + '.getCss(' + VarToJSON([Id]) + ');', 'TExtDdDragDropManagerSingleton'); - Result := Self; +procedure TExtDdDragDrop.SetFXTicks(Value : TArrayOfInteger); begin + FXTicks := Value; + JSCode(JSName + '.xTicks=' + ArrayToJSON(Value) + ';'); end; -function TExtDdDragDropManagerSingleton.GetDDById(Id : String) : TExtFunction; begin - JSCode(JSName + '.getDDById(' + VarToJSON([Id]) + ');', 'TExtDdDragDropManagerSingleton'); - Result := Self; +procedure TExtDdDragDrop.SetFYTicks(Value : TArrayOfInteger); begin + FYTicks := Value; + JSCode(JSName + '.yTicks=' + ArrayToJSON(Value) + ';'); end; -function TExtDdDragDropManagerSingleton.GetLocation(ODD : TExtDdDragDrop) : TExtFunction; begin - JSCode(JSName + '.getLocation(' + VarToJSON([ODD, false]) + ');', 'TExtDdDragDropManagerSingleton'); - Result := Self; +function TExtDdDragDrop.JSClassName : string; begin + Result := 'Ext.dd.DragDrop'; end; -function TExtDdDragDropManagerSingleton.GetPosY(El : THTMLElement) : TExtFunction; begin - JSCode(JSName + '.getPosY(' + VarToJSON([El, false]) + ');', 'TExtDdDragDropManagerSingleton'); - Result := Self; +procedure TExtDdDragDrop.InitDefaults; begin + inherited; + FConfig := TExtObject.CreateInternal(Self, 'config'); + FDefaultPadding := TExtObject.CreateInternal(Self, 'defaultPadding'); + FGroups := TExtObject.CreateInternal(Self, 'groups'); + FIgnoreSelf := true; + FInvalidHandleClasses := TExtObjectList.Create(Self, 'invalidHandleClasses'); + FInvalidHandleTypes := TExtObject.CreateInternal(Self, 'invalidHandleTypes'); end; -function TExtDdDragDropManagerSingleton.GetRelated(P_oDD : TExtDdDragDrop; BTargetsOnly : Boolean) : TExtFunction; begin - JSCode(JSName + '.getRelated(' + VarToJSON([P_oDD, false, BTargetsOnly]) + ');', 'TExtDdDragDropManagerSingleton'); - Result := Self; -end; +{$IFDEF FPC}constructor TExtDdDragDrop.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtDdDragDropManagerSingleton.GetScrollLeft : TExtFunction; begin - JSCode(JSName + '.getScrollLeft();', 'TExtDdDragDropManagerSingleton'); +function TExtDdDragDrop.AddInvalidHandleClass(CssClass : String) : TExtFunction; begin + JSCode(JSName + '.addInvalidHandleClass(' + VarToJSON([CssClass]) + ');', 'TExtDdDragDrop'); Result := Self; end; -function TExtDdDragDropManagerSingleton.GetScrollTop : TExtFunction; begin - JSCode(JSName + '.getScrollTop();', 'TExtDdDragDropManagerSingleton'); +function TExtDdDragDrop.AddInvalidHandleId(Id : String) : TExtFunction; begin + JSCode(JSName + '.addInvalidHandleId(' + VarToJSON([Id]) + ');', 'TExtDdDragDrop'); Result := Self; end; -function TExtDdDragDropManagerSingleton.GetStyle(El : THTMLElement; Param : String) : TExtFunction; begin - JSCode(JSName + '.getStyle(' + VarToJSON([El, false, Param]) + ');', 'TExtDdDragDropManagerSingleton'); +function TExtDdDragDrop.AddInvalidHandleType(TagName : String) : TExtFunction; begin + JSCode(JSName + '.addInvalidHandleType(' + VarToJSON([TagName]) + ');', 'TExtDdDragDrop'); Result := Self; end; -function TExtDdDragDropManagerSingleton.HandleWasClicked(Node : THTMLElement) : TExtFunction; begin - JSCode(JSName + '.handleWasClicked(' + VarToJSON([Node, false]) + ');', 'TExtDdDragDropManagerSingleton'); +function TExtDdDragDrop.AddToGroup(SGroup : String) : TExtFunction; begin + JSCode(JSName + '.addToGroup(' + VarToJSON([SGroup]) + ');', 'TExtDdDragDrop'); Result := Self; end; -function TExtDdDragDropManagerSingleton.IsDragDrop(Id : String) : TExtFunction; begin - JSCode(JSName + '.isDragDrop(' + VarToJSON([Id]) + ');', 'TExtDdDragDropManagerSingleton'); +function TExtDdDragDrop.ApplyConfig : TExtFunction; begin + JSCode(JSName + '.applyConfig();', 'TExtDdDragDrop'); Result := Self; end; -function TExtDdDragDropManagerSingleton.IsHandle(Id : String) : TExtFunction; begin - JSCode(JSName + '.isHandle(' + VarToJSON([Id]) + ');', 'TExtDdDragDropManagerSingleton'); +function TExtDdDragDrop.ClearConstraints : TExtFunction; begin + JSCode(JSName + '.clearConstraints();', 'TExtDdDragDrop'); Result := Self; end; -function TExtDdDragDropManagerSingleton.IsLegalTarget(ODD : TExtDdDragDrop; OTargetDD : TExtDdDragDrop) : TExtFunction; begin - JSCode(JSName + '.isLegalTarget(' + VarToJSON([ODD, false, OTargetDD, false]) + ');', 'TExtDdDragDropManagerSingleton'); +function TExtDdDragDrop.ClearTicks : TExtFunction; begin + JSCode(JSName + '.clearTicks();', 'TExtDdDragDrop'); Result := Self; end; -function TExtDdDragDropManagerSingleton.IsTypeOfDD(The : TExtObject) : TExtFunction; begin - JSCode(JSName + '.isTypeOfDD(' + VarToJSON([The, false]) + ');', 'TExtDdDragDropManagerSingleton'); +function TExtDdDragDrop.ConstrainTo(ConstrainTo : String; Pad : Integer = 0; InContent : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.constrainTo(' + VarToJSON([ConstrainTo, Pad, InContent]) + ');', 'TExtDdDragDrop'); Result := Self; end; -function TExtDdDragDropManagerSingleton.MoveToEl(MoveEl : THTMLElement; TargetEl : THTMLElement) : TExtFunction; begin - JSCode(JSName + '.moveToEl(' + VarToJSON([MoveEl, false, TargetEl, false]) + ');', 'TExtDdDragDropManagerSingleton'); - Result := Self; +constructor TExtDdDragDrop.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -function TExtDdDragDropManagerSingleton.NumericSort(A : Integer; B : Integer) : TExtFunction; begin - JSCode(JSName + '.numericSort(' + VarToJSON([A, B]) + ');', 'TExtDdDragDropManagerSingleton'); +function TExtDdDragDrop.GetDragEl : TExtFunction; begin + JSCode(JSName + '.getDragEl();', 'TExtDdDragDrop'); Result := Self; end; -function TExtDdDragDropManagerSingleton.RefreshCache(Groups : TExtObject) : TExtFunction; begin - JSCode(JSName + '.refreshCache(' + VarToJSON([Groups, false]) + ');', 'TExtDdDragDropManagerSingleton'); +function TExtDdDragDrop.GetEl : TExtFunction; begin + JSCode(JSName + '.getEl();', 'TExtDdDragDrop'); Result := Self; end; -function TExtDdDragDropManagerSingleton.RegDragDrop(ODD : TExtDdDragDrop; SGroup : String) : TExtFunction; begin - JSCode(JSName + '.regDragDrop(' + VarToJSON([ODD, false, SGroup]) + ');', 'TExtDdDragDropManagerSingleton'); +function TExtDdDragDrop.Init(Id : String; SGroup : String; Config : TExtObject) : TExtFunction; begin + JSCode(JSName + '.init(' + VarToJSON([Id, SGroup, Config, false]) + ');', 'TExtDdDragDrop'); Result := Self; end; -function TExtDdDragDropManagerSingleton.RegHandle(SDDId : String; SHandleId : String) : TExtFunction; begin - JSCode(JSName + '.regHandle(' + VarToJSON([SDDId, SHandleId]) + ');', 'TExtDdDragDropManagerSingleton'); +function TExtDdDragDrop.InitTarget(Id : String; SGroup : String; Config : TExtObject) : TExtFunction; begin + JSCode(JSName + '.initTarget(' + VarToJSON([Id, SGroup, Config, false]) + ');', 'TExtDdDragDrop'); Result := Self; end; -function TExtDdDragDropManagerSingleton.StartDrag(X : Integer; Y : Integer) : TExtFunction; begin - JSCode(JSName + '.startDrag(' + VarToJSON([X, Y]) + ');', 'TExtDdDragDropManagerSingleton'); +function TExtDdDragDrop.IsLocked : TExtFunction; begin + JSCode(JSName + '.isLocked();', 'TExtDdDragDrop'); Result := Self; end; -function TExtDdDragDropManagerSingleton.StopEvent(E : TEvent) : TExtFunction; begin - JSCode(JSName + '.stopEvent(' + VarToJSON([E, false]) + ');', 'TExtDdDragDropManagerSingleton'); +function TExtDdDragDrop.IsValidHandleChild(Node : THTMLElement) : TExtFunction; begin + JSCode(JSName + '.isValidHandleChild(' + VarToJSON([Node, false]) + ');', 'TExtDdDragDrop'); Result := Self; end; -function TExtDdDragDropManagerSingleton.SwapNode(N1 : THTMLElement; N2 : THTMLElement) : TExtFunction; begin - JSCode(JSName + '.swapNode(' + VarToJSON([N1, false, N2, false]) + ');', 'TExtDdDragDropManagerSingleton'); +function TExtDdDragDrop.RemoveFromGroup(SGroup : String) : TExtFunction; begin + JSCode(JSName + '.removeFromGroup(' + VarToJSON([SGroup]) + ');', 'TExtDdDragDrop'); Result := Self; end; -function TExtDdDragDropManagerSingleton.VerifyEl(El : THTMLElement) : TExtFunction; begin - JSCode(JSName + '.verifyEl(' + VarToJSON([El, false]) + ');', 'TExtDdDragDropManagerSingleton'); +function TExtDdDragDrop.RemoveInvalidHandleClass(CssClass : String) : TExtFunction; begin + JSCode(JSName + '.removeInvalidHandleClass(' + VarToJSON([CssClass]) + ');', 'TExtDdDragDrop'); Result := Self; end; -destructor TExtDdDragDropManagerSingleton.Destroy; begin - try - FLocationCache.Free; - except end; - inherited; -end; - -procedure TExtComponent.SetFAutoScroll(Value : Boolean); begin - FAutoScroll := Value; - if not ConfigAvailable(JSName) then - SetAutoScroll(Value) - else - JSCode('autoScroll:' + VarToJSON([Value])); +function TExtDdDragDrop.RemoveInvalidHandleId(Id : String) : TExtFunction; begin + JSCode(JSName + '.removeInvalidHandleId(' + VarToJSON([Id]) + ');', 'TExtDdDragDrop'); + Result := Self; end; -procedure TExtComponent.SetFColumnWidth(Value : Integer); begin - FColumnWidth := Value; - JSCode('columnWidth:' + VarToJSON([Value])); +function TExtDdDragDrop.RemoveInvalidHandleType(TagName : String) : TExtFunction; begin + JSCode(JSName + '.removeInvalidHandleType(' + VarToJSON([TagName]) + ');', 'TExtDdDragDrop'); + Result := Self; end; -procedure TExtComponent.SetFColumnWidthString(Value : String); begin - FColumnWidthString := Value; - JSCode('columnWidth:' + VarToJSON([Value])); +function TExtDdDragDrop.ResetConstraints(MaintainOffset : Boolean) : TExtFunction; begin + JSCode(JSName + '.resetConstraints(' + VarToJSON([MaintainOffset]) + ');', 'TExtDdDragDrop'); + Result := Self; end; -procedure TExtComponent.SetFConstrain(Value : Boolean); begin - FConstrain := Value; - JSCode('constrain:' + VarToJSON([Value])); +function TExtDdDragDrop.SetDragElId(Id : String) : TExtFunction; begin + JSCode(JSName + '.setDragElId(' + VarToJSON([Id]) + ');', 'TExtDdDragDrop'); + Result := Self; end; -procedure TExtComponent.SetFConstrainTo(Value : TExtUtilRegion); begin - FConstrainTo := Value; - Value.DeleteFromGarbage; - JSCode('constrainTo:' + VarToJSON([Value, false])); +function TExtDdDragDrop.SetHandleElId(Id : String) : TExtFunction; begin + JSCode(JSName + '.setHandleElId(' + VarToJSON([Id]) + ');', 'TExtDdDragDrop'); + Result := Self; end; -procedure TExtComponent.SetFConstrainToElement(Value : TExtElement); begin - FConstrainToElement := Value; - Value.DeleteFromGarbage; - JSCode('constrainTo:' + VarToJSON([Value, false])); +function TExtDdDragDrop.SetInitPosition(DiffX : Integer; DiffY : Integer) : TExtFunction; begin + JSCode(JSName + '.setInitPosition(' + VarToJSON([DiffX, DiffY]) + ');', 'TExtDdDragDrop'); + Result := Self; end; -procedure TExtComponent.SetFDefaultAlign(Value : String); begin - FDefaultAlign := Value; - JSCode('defaultAlign:' + VarToJSON([Value])); +function TExtDdDragDrop.SetOuterHandleElId(Id : String) : TExtFunction; begin + JSCode(JSName + '.setOuterHandleElId(' + VarToJSON([Id]) + ');', 'TExtDdDragDrop'); + Result := Self; end; -procedure TExtComponent.SetFDraggable(Value : Boolean); begin - FDraggable := Value; - JSCode('draggable:' + VarToJSON([Value])); +function TExtDdDragDrop.SetPadding(ITop : Integer; IRight : Integer; IBot : Integer; ILeft : Integer) : TExtFunction; begin + JSCode(JSName + '.setPadding(' + VarToJSON([ITop, IRight, IBot, ILeft]) + ');', 'TExtDdDragDrop'); + Result := Self; end; -procedure TExtComponent.SetFDraggableObject(Value : TExtObject); begin - FDraggableObject := Value; - Value.DeleteFromGarbage; - JSCode('draggable:' + VarToJSON([Value, false])); +function TExtDdDragDrop.SetXConstraint(ILeft : Integer; IRight : Integer; ITickSize : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.setXConstraint(' + VarToJSON([ILeft, IRight, ITickSize]) + ');', 'TExtDdDragDrop'); + Result := Self; end; -procedure TExtComponent.SetFFixed(Value : Boolean); begin - FFixed := Value; - JSCode('fixed:' + VarToJSON([Value])); +function TExtDdDragDrop.SetYConstraint(IUp : Integer; IDown : Integer; ITickSize : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.setYConstraint(' + VarToJSON([IUp, IDown, ITickSize]) + ');', 'TExtDdDragDrop'); + Result := Self; end; -procedure TExtComponent.SetFFloating(Value : Boolean); begin - FFloating := Value; - JSCode('floating:' + VarToJSON([Value])); +function TExtDdDragDrop.ToString : TExtFunction; begin + JSCode(JSName + '.toString();', 'TExtDdDragDrop'); + Result := Self; end; -procedure TExtComponent.SetFFocusOnToFront(Value : Boolean); begin - FFocusOnToFront := Value; - JSCode('focusOnToFront:' + VarToJSON([Value])); +function TExtDdDragDrop.Unreg : TExtFunction; begin + JSCode(JSName + '.unreg();', 'TExtDdDragDrop'); + Result := Self; end; -procedure TExtComponent.SetFFormBind(Value : Boolean); begin - FFormBind := Value; - JSCode('formBind:' + VarToJSON([Value])); +destructor TExtDdDragDrop.Destroy; begin + try + FConfig.Free; + FDefaultPadding.Free; + FGroups.Free; + FInvalidHandleClasses.Free; + FInvalidHandleTypes.Free; + except end; + inherited; end; -procedure TExtComponent.SetFOverflowX(Value : String); begin - FOverflowX := Value; - JSCode('overflowX:' + VarToJSON([Value])); +procedure TExtDataValidationsSingleton.SetFEmailMessage(Value : String); begin + FEmailMessage := Value; + JSCode(JSName + '.emailMessage=' + VarToJSON([Value]) + ';'); end; -procedure TExtComponent.SetFOverflowY(Value : String); begin - FOverflowY := Value; - JSCode('overflowY:' + VarToJSON([Value])); +procedure TExtDataValidationsSingleton.SetFEmailRe(Value : TRegExp); begin + FEmailRe := Value; + JSCode(JSName + '.emailRe=' + VarToJSON([#3 +Value]) + ';'); end; -procedure TExtComponent.SetFRegion(Value : TRegionEnum); begin - FRegion := Value; - JSCode('region:"' + EnumToJSString(TypeInfo(TRegionEnum), ord(Value)) + '"'); +procedure TExtDataValidationsSingleton.SetFExclusionMessage(Value : String); begin + FExclusionMessage := Value; + JSCode(JSName + '.exclusionMessage=' + VarToJSON([Value]) + ';'); end; -procedure TExtComponent.SetFResizable(Value : Boolean); begin - FResizable := Value; - JSCode('resizable:' + VarToJSON([Value])); +procedure TExtDataValidationsSingleton.SetFFormatMessage(Value : String); begin + FFormatMessage := Value; + JSCode(JSName + '.formatMessage=' + VarToJSON([Value]) + ';'); end; -procedure TExtComponent.SetFResizableObject(Value : TExtObject); begin - FResizableObject := Value; - Value.DeleteFromGarbage; - JSCode('resizable:' + VarToJSON([Value, false])); +procedure TExtDataValidationsSingleton.SetFInclusionMessage(Value : String); begin + FInclusionMessage := Value; + JSCode(JSName + '.inclusionMessage=' + VarToJSON([Value]) + ';'); end; -procedure TExtComponent.SetFResizeHandles(Value : String); begin - FResizeHandles := Value; - JSCode('resizeHandles:' + VarToJSON([Value])); +procedure TExtDataValidationsSingleton.SetFLengthMessage(Value : String); begin + FLengthMessage := Value; + JSCode(JSName + '.lengthMessage=' + VarToJSON([Value]) + ';'); end; -procedure TExtComponent.SetFShadow(Value : String); begin - FShadow := Value; - JSCode('shadow:' + VarToJSON([Value])); +procedure TExtDataValidationsSingleton.SetFPresenceMessage(Value : String); begin + FPresenceMessage := Value; + JSCode(JSName + '.presenceMessage=' + VarToJSON([Value]) + ';'); end; -procedure TExtComponent.SetFShadowBoolean(Value : Boolean); begin - FShadowBoolean := Value; - JSCode('shadow:' + VarToJSON([Value])); +function TExtDataValidationsSingleton.JSClassName : string; begin + Result := 'Ext.data.validations'; end; -procedure TExtComponent.SetFShadowOffset(Value : Integer); begin - FShadowOffset := Value; - JSCode('shadowOffset:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtDataValidationsSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtComponent.SetFToFrontOnShow(Value : Boolean); begin - FToFrontOnShow := Value; - JSCode('toFrontOnShow:' + VarToJSON([Value])); +function TExtDataValidationsSingleton.Email(Config : TExtObject; Email : String) : TExtFunction; begin + JSCode(JSName + '.email(' + VarToJSON([Config, false, Email]) + ');', 'TExtDataValidationsSingleton'); + Result := Self; end; -function TExtComponent.JSClassName : string; begin - Result := 'Ext.Component'; +function TExtDataValidationsSingleton.Exclusion(Config : TExtObject; Value : String) : TExtFunction; begin + JSCode(JSName + '.exclusion(' + VarToJSON([Config, false, Value]) + ');', 'TExtDataValidationsSingleton'); + Result := Self; end; -procedure TExtComponent.InitDefaults; begin - inherited; - FConstrainTo := TExtUtilRegion.CreateInternal(Self, 'constrainTo'); - FConstrainToElement := TExtElement.CreateInternal(Self, 'constrainTo'); - FDraggableObject := TExtObject.CreateInternal(Self, 'draggable'); - FResizableObject := TExtObject.CreateInternal(Self, 'resizable'); +function TExtDataValidationsSingleton.Format(Config : TExtObject; Value : String) : TExtFunction; begin + JSCode(JSName + '.format(' + VarToJSON([Config, false, Value]) + ');', 'TExtDataValidationsSingleton'); + Result := Self; end; -{$IFDEF FPC}constructor TExtComponent.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtComponent.Bubble(Fn : TExtFunction; Scope : TExtObject = nil; Args : TExtObjectList = nil) : TExtFunction; begin - JSCode(JSName + '.bubble(' + VarToJSON([Fn, true, Scope, false]) + ',' + VarToJSON(Args) + ');', 'TExtComponent'); +function TExtDataValidationsSingleton.Inclusion(Config : TExtObject; Value : String) : TExtFunction; begin + JSCode(JSName + '.inclusion(' + VarToJSON([Config, false, Value]) + ');', 'TExtDataValidationsSingleton'); Result := Self; end; -function TExtComponent.Center : TExtFunction; begin - JSCode(JSName + '.center();', 'TExtComponent'); +function TExtDataValidationsSingleton.Length(Config : TExtObject; Value : String) : TExtFunction; begin + JSCode(JSName + '.length(' + VarToJSON([Config, false, Value]) + ');', 'TExtDataValidationsSingleton'); Result := Self; end; -function TExtComponent.CloneConfig(Overrides : TExtObject) : TExtFunction; begin - JSCode(JSName + '.cloneConfig(' + VarToJSON([Overrides, false]) + ');', 'TExtComponent'); +function TExtDataValidationsSingleton.Presence(Config : TExtObject; Value : TExtObject) : TExtFunction; begin + JSCode(JSName + '.presence(' + VarToJSON([Config, false, Value, false]) + ');', 'TExtDataValidationsSingleton'); Result := Self; end; -constructor TExtComponent.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +function TExtDiagLayoutContext.JSClassName : string; begin + Result := 'Ext.diag.layout.Context'; end; -function TExtComponent.DoConstrain(ConstrainTo : String = '') : TExtFunction; begin - JSCode(JSName + '.doConstrain(' + VarToJSON([ConstrainTo]) + ');', 'TExtComponent'); - Result := Self; +{$IFDEF FPC}constructor TExtDiagLayoutContext.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +procedure TExtDataTypesSingleton.SetFStripRe(Value : TRegExp); begin + FStripRe := Value; + JSCode(JSName + '.stripRe=' + VarToJSON([#3 +Value]) + ';'); end; -function TExtComponent.FindParentBy(Fn : TExtFunction) : TExtFunction; begin - JSCode(JSName + '.findParentBy(' + VarToJSON([Fn, true]) + ');', 'TExtComponent'); - Result := Self; +function TExtDataTypesSingleton.JSClassName : string; begin + Result := 'Ext.data.Types'; end; -function TExtComponent.FindParentByType(Xtype : String) : TExtFunction; begin - JSCode(JSName + '.findParentByType(' + VarToJSON([Xtype]) + ');', 'TExtComponent'); - Result := Self; +class function TExtDataTypesSingleton.AUTO : TExtObject; +const + lAUTO : TExtObject = nil; +begin + if lAUTO = nil then lAUTO := TExtObject.CreateSingleton('Ext.data.Types.AUTO'); + Result := lAUTO end; -function TExtComponent.Focus(SelectText : Boolean = false; Delay : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.focus(' + VarToJSON([SelectText, Delay]) + ');', 'TExtComponent'); - Result := Self; +class function TExtDataTypesSingleton.BOOL : TExtObject; +const + lBOOL : TExtObject = nil; +begin + if lBOOL = nil then lBOOL := TExtObject.CreateSingleton('Ext.data.Types.BOOL'); + Result := lBOOL end; -function TExtComponent.GetPosition(Local : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.getPosition(' + VarToJSON([Local]) + ');', 'TExtComponent'); - Result := Self; +class function TExtDataTypesSingleton.BOOLEAN : TExtObject; +const + lBOOLEAN : TExtObject = nil; +begin + if lBOOLEAN = nil then lBOOLEAN := TExtObject.CreateSingleton('Ext.data.Types.BOOLEAN'); + Result := lBOOLEAN end; -function TExtComponent.GetXType : TExtFunction; begin - JSCode(JSName + '.getXType();', 'TExtComponent'); - Result := Self; +class function TExtDataTypesSingleton.DATE : TExtObject; +const + lDATE : TExtObject = nil; +begin + if lDATE = nil then lDATE := TExtObject.CreateSingleton('Ext.data.Types.DATE'); + Result := lDATE end; -function TExtComponent.Hide(AnimateTarget : String = ''; Callback : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.hide(' + VarToJSON([AnimateTarget, Callback, true, Scope, false]) + ');', 'TExtComponent'); - Result := Self; +class function TExtDataTypesSingleton.FLOAT : TExtObject; +const + lFLOAT : TExtObject = nil; +begin + if lFLOAT = nil then lFLOAT := TExtObject.CreateSingleton('Ext.data.Types.FLOAT'); + Result := lFLOAT end; -function TExtComponent.ScrollBy(DeltaX : Integer; DeltaY : Boolean; Animate : Boolean) : TExtFunction; begin - JSCode(JSName + '.scrollBy(' + VarToJSON([DeltaX, DeltaY, Animate]) + ');', 'TExtComponent'); - Result := Self; +class function TExtDataTypesSingleton.INT : TExtObject; +const + lINT : TExtObject = nil; +begin + if lINT = nil then lINT := TExtObject.CreateSingleton('Ext.data.Types.INT'); + Result := lINT end; -function TExtComponent.SetActive(Active : Boolean = false; NewActive : TExtComponent = nil) : TExtFunction; begin - JSCode(JSName + '.setActive(' + VarToJSON([Active, NewActive, false]) + ');', 'TExtComponent'); - Result := Self; +class function TExtDataTypesSingleton.INTEGER : TExtObject; +const + lINTEGER : TExtObject = nil; +begin + if lINTEGER = nil then lINTEGER := TExtObject.CreateSingleton('Ext.data.Types.INTEGER'); + Result := lINTEGER end; -function TExtComponent.SetAutoScroll(Scroll : Boolean) : TExtFunction; begin - JSCode(JSName + '.setAutoScroll(' + VarToJSON([Scroll]) + ');', 'TExtComponent'); - Result := Self; +class function TExtDataTypesSingleton.NUMBER : TExtObject; +const + lNUMBER : TExtObject = nil; +begin + if lNUMBER = nil then lNUMBER := TExtObject.CreateSingleton('Ext.data.Types.NUMBER'); + Result := lNUMBER end; -function TExtComponent.SetLoading(Load : Boolean; TargetEl : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.setLoading(' + VarToJSON([Load, TargetEl]) + ');', 'TExtComponent'); - Result := Self; +class function TExtDataTypesSingleton.STRINGJS : TExtObject; +const + lSTRINGJS : TExtObject = nil; +begin + if lSTRINGJS = nil then lSTRINGJS := TExtObject.CreateSingleton('Ext.data.Types.STRINGJS'); + Result := lSTRINGJS end; -function TExtComponent.SetOverflowXY(OverflowX : String; OverflowY : String) : TExtFunction; begin - JSCode(JSName + '.setOverflowXY(' + VarToJSON([OverflowX, OverflowY]) + ');', 'TExtComponent'); - Result := Self; -end; +{$IFDEF FPC}constructor TExtDataTypesSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtComponent.SetPagePosition(X : Integer; Y : Integer = 0; Animate : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.setPagePosition(' + VarToJSON([X, Y, Animate]) + ');', 'TExtComponent'); - Result := Self; +function TExtDdRegistrySingleton.JSClassName : string; begin + Result := 'Ext.dd.Registry'; end; -function TExtComponent.Show(AnimateTarget : String = ''; Callback : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.show(' + VarToJSON([AnimateTarget, Callback, true, Scope, false]) + ');', 'TExtComponent'); +{$IFDEF FPC}constructor TExtDdRegistrySingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDdRegistrySingleton.GetHandle(Id : String) : TExtFunction; begin + JSCode(JSName + '.getHandle(' + VarToJSON([Id]) + ');', 'TExtDdRegistrySingleton'); Result := Self; end; -function TExtComponent.ShowAt(X : Integer; Y : Integer = 0; Animate : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.showAt(' + VarToJSON([X, Y, Animate]) + ');', 'TExtComponent'); +function TExtDdRegistrySingleton.GetHandleFromEvent(E : TEvent) : TExtFunction; begin + JSCode(JSName + '.getHandleFromEvent(' + VarToJSON([E, false]) + ');', 'TExtDdRegistrySingleton'); Result := Self; end; -function TExtComponent.ShowBy(Component : TExtComponent; Position : String = ''; Offsets : TArrayOfInteger = nil) : TExtFunction; begin - JSCode(JSName + '.showBy(' + VarToJSON([Component, false, Position, Offsets]) + ');', 'TExtComponent'); +function TExtDdRegistrySingleton.GetTarget(Id : String) : TExtFunction; begin + JSCode(JSName + '.getTarget(' + VarToJSON([Id]) + ');', 'TExtDdRegistrySingleton'); Result := Self; end; -function TExtComponent.ToBack : TExtFunction; begin - JSCode(JSName + '.toBack();', 'TExtComponent'); +function TExtDdRegistrySingleton.GetTargetFromEvent(E : TEvent) : TExtFunction; begin + JSCode(JSName + '.getTargetFromEvent(' + VarToJSON([E, false]) + ');', 'TExtDdRegistrySingleton'); Result := Self; end; -function TExtComponent.ToFront(PreventFocus : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.toFront(' + VarToJSON([PreventFocus]) + ');', 'TExtComponent'); +function TExtDdRegistrySingleton.Register(Element : String; Data : TExtObject; DataHandles : TExtObjectList; DataIsHandle : Boolean) : TExtFunction; begin + JSCode(JSName + '.register(' + VarToJSON([Element, Data, false]) + ',' + VarToJSON(DataHandles) + ',' + VarToJSON([DataIsHandle]) + ');', 'TExtDdRegistrySingleton'); Result := Self; end; -function TExtComponent.UpdateBox(Box : TExtObject) : TExtFunction; begin - JSCode(JSName + '.updateBox(' + VarToJSON([Box, false]) + ');', 'TExtComponent'); +function TExtDdRegistrySingleton.Unregister(Element : String) : TExtFunction; begin + JSCode(JSName + '.unregister(' + VarToJSON([Element]) + ');', 'TExtDdRegistrySingleton'); Result := Self; end; -destructor TExtComponent.Destroy; begin - try - FConstrainTo.Free; - FConstrainToElement.Free; - FDraggableObject.Free; - FResizableObject.Free; - except end; - inherited; +procedure TExtDdDragTracker.SetFActive(Value : Boolean); begin + FActive := Value; + JSCode(JSName + '.active=' + VarToJSON([Value]) + ';'); end; -function TExtChartCallout.JSClassName : string; begin - Result := 'Ext.chart.Callout'; +procedure TExtDdDragTracker.SetFAutoStart(Value : Boolean); begin + FAutoStart := Value; + JSCode('autoStart:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtChartCallout.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtDdDragTracker.SetFAutoStartInteger(Value : Integer); begin + FAutoStartInteger := Value; + JSCode('autoStart:' + VarToJSON([Value])); +end; -function TExtChartNavigation.JSClassName : string; begin - Result := 'Ext.chart.Navigation'; +procedure TExtDdDragTracker.SetFConstrainTo(Value : TExtUtilRegion); begin + FConstrainTo := Value; + Value.DeleteFromGarbage; + JSCode('constrainTo:' + VarToJSON([Value, false])); end; -{$IFDEF FPC}constructor TExtChartNavigation.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtDdDragTracker.SetFConstrainToElement(Value : TExtElement); begin + FConstrainToElement := Value; + Value.DeleteFromGarbage; + JSCode('constrainTo:' + VarToJSON([Value, false])); +end; -function TExtChartNavigation.RestoreZoom : TExtFunction; begin - JSCode(JSName + '.restoreZoom();', 'TExtChartNavigation'); - Result := Self; +procedure TExtDdDragTracker.SetFDelegate(Value : String); begin + FDelegate := Value; + JSCode('delegate:' + VarToJSON([Value])); end; -function TExtChartNavigation.SetZoom : TExtFunction; begin - JSCode(JSName + '.setZoom();', 'TExtChartNavigation'); - Result := Self; +procedure TExtDdDragTracker.SetFDragTarget(Value : THTMLElement); begin + FDragTarget := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.dragTarget=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtChartSeries.SetFHasListeners(Value : TExtObject); begin +procedure TExtDdDragTracker.SetFHasListeners(Value : TExtObject); begin FHasListeners := Value; Value.DeleteFromGarbage; JSCode(JSName + '.hasListeners=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtChartSeries.SetFHighlight(Value : Boolean); begin - FHighlight := Value; - JSCode('highlight:' + VarToJSON([Value])); +procedure TExtDdDragTracker.SetFIsObservable(Value : Boolean); begin + FIsObservable := Value; + JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); end; -procedure TExtChartSeries.SetFHighlightCfg(Value : TExtObject); begin - FHighlightCfg := Value; +procedure TExtDdDragTracker.SetFListeners(Value : TExtObject); begin + FListeners := Value; Value.DeleteFromGarbage; - JSCode(JSName + '.highlightCfg=' + VarToJSON([Value, false]) + ';'); + JSCode('listeners:' + VarToJSON([Value, false])); end; -procedure TExtChartSeries.SetFHighlightObject(Value : TExtObject); begin - FHighlightObject := Value; - Value.DeleteFromGarbage; - JSCode('highlight:' + VarToJSON([Value, false])); +procedure TExtDdDragTracker.SetFOverCls(Value : String); begin + FOverCls := Value; + JSCode('overCls:' + VarToJSON([Value])); end; -procedure TExtChartSeries.SetFIsObservable(Value : Boolean); begin - FIsObservable := Value; - JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); +procedure TExtDdDragTracker.SetFPreventDefault(Value : Boolean); begin + FPreventDefault := Value; + JSCode('preventDefault:' + VarToJSON([Value])); end; -procedure TExtChartSeries.SetFLabelJS(Value : TExtObject); begin - FLabelJS := Value; - Value.DeleteFromGarbage; - JSCode('labelJS:' + VarToJSON([Value, false])); +procedure TExtDdDragTracker.SetFStopEvent(Value : Boolean); begin + FStopEvent := Value; + JSCode('stopEvent:' + VarToJSON([Value])); end; -procedure TExtChartSeries.SetFListeners(Value : TExtObject); begin - FListeners := Value; - Value.DeleteFromGarbage; - JSCode('listeners:' + VarToJSON([Value, false])); +procedure TExtDdDragTracker.SetFTolerance(Value : Integer); begin + FTolerance := Value; + JSCode('tolerance:' + VarToJSON([Value])); end; -procedure TExtChartSeries.SetFRenderer(Value : TExtFunction); begin - FRenderer := Value; - JSCode('renderer:' + VarToJSON([Value, true])); +procedure TExtDdDragTracker.SetFTrackOver(Value : Boolean); begin + FTrackOver := Value; + JSCode('trackOver:' + VarToJSON([Value])); end; -procedure TExtChartSeries.SetFShadowAttributes(Value : TExtObjectList); begin - FShadowAttributes := Value; - Value.DeleteFromGarbage; - JSCode('shadowAttributes:' + VarToJSON([Value, false])); +procedure TExtDdDragTracker.SetFOnBeforestart(Value : TExtDdDragTrackerOnBeforestart); begin + if Assigned(FOnBeforestart) then + JSCode(JSName+'.events ["beforestart"].listeners=[];'); + if Assigned(Value) then + AddListener('beforestart', Ajax('beforestart', ['This', '%0.nm','E', '%1.nm'], true)); + FOnBeforestart := Value; end; -procedure TExtChartSeries.SetFShowInLegend(Value : Boolean); begin - FShowInLegend := Value; - JSCode('showInLegend:' + VarToJSON([Value])); +procedure TExtDdDragTracker.SetFOnDrag(Value : TExtDdDragTrackerOnDrag); begin + if Assigned(FOnDrag) then + JSCode(JSName+'.events ["drag"].listeners=[];'); + if Assigned(Value) then + AddListener('drag', Ajax('drag', ['This', '%0.nm','E', '%1.nm'], true)); + FOnDrag := Value; end; -procedure TExtChartSeries.SetFTips(Value : TExtObject); begin - FTips := Value; - Value.DeleteFromGarbage; - JSCode('tips:' + VarToJSON([Value, false])); +procedure TExtDdDragTracker.SetFOnDragend(Value : TExtDdDragTrackerOnDragend); begin + if Assigned(FOnDragend) then + JSCode(JSName+'.events ["dragend"].listeners=[];'); + if Assigned(Value) then + AddListener('dragend', Ajax('dragend', ['This', '%0.nm','E', '%1.nm'], true)); + FOnDragend := Value; end; -procedure TExtChartSeries.SetFTitle(Value : String); begin - FTitle := Value; - JSCode('title:' + VarToJSON([Value])); +procedure TExtDdDragTracker.SetFOnDragstart(Value : TExtDdDragTrackerOnDragstart); begin + if Assigned(FOnDragstart) then + JSCode(JSName+'.events ["dragstart"].listeners=[];'); + if Assigned(Value) then + AddListener('dragstart', Ajax('dragstart', ['This', '%0.nm','E', '%1.nm'], true)); + FOnDragstart := Value; end; -procedure TExtChartSeries.SetFTypeJS(Value : String); begin - FTypeJS := Value; - JSCode('typeJS:' + VarToJSON([Value])); +procedure TExtDdDragTracker.SetFOnMousedown(Value : TExtDdDragTrackerOnMousedown); begin + if Assigned(FOnMousedown) then + JSCode(JSName+'.events ["mousedown"].listeners=[];'); + if Assigned(Value) then + AddListener('mousedown', Ajax('mousedown', ['This', '%0.nm','E', '%1.nm'], true)); + FOnMousedown := Value; end; -procedure TExtChartSeries.SetFOnTitlechange(Value : TExtChartSeriesOnTitlechange); begin - if Assigned(FOnTitlechange) then - JSCode(JSName+'.events ["titlechange"].listeners=[];'); +procedure TExtDdDragTracker.SetFOnMousemove(Value : TExtDdDragTrackerOnMousemove); begin + if Assigned(FOnMousemove) then + JSCode(JSName+'.events ["mousemove"].listeners=[];'); if Assigned(Value) then - AddListener('titlechange', Ajax('titlechange', ['Title', '%0','Index', '%1'], true)); - FOnTitlechange := Value; + AddListener('mousemove', Ajax('mousemove', ['This', '%0.nm','E', '%1.nm'], true)); + FOnMousemove := Value; end; -function TExtChartSeries.JSClassName : string; begin - Result := 'Ext.chart.series.Series'; +procedure TExtDdDragTracker.SetFOnMouseout(Value : TExtDdDragTrackerOnMouseout); begin + if Assigned(FOnMouseout) then + JSCode(JSName+'.events ["mouseout"].listeners=[];'); + if Assigned(Value) then + AddListener('mouseout', Ajax('mouseout', ['This', '%0.nm','E', '%1.nm'], true)); + FOnMouseout := Value; end; -procedure TExtChartSeries.InitDefaults; begin +procedure TExtDdDragTracker.SetFOnMouseover(Value : TExtDdDragTrackerOnMouseover); begin + if Assigned(FOnMouseover) then + JSCode(JSName+'.events ["mouseover"].listeners=[];'); + if Assigned(Value) then + AddListener('mouseover', Ajax('mouseover', ['This', '%0.nm','E', '%1.nm','Target', '%2.nm'], true)); + FOnMouseover := Value; +end; + +procedure TExtDdDragTracker.SetFOnMouseup(Value : TExtDdDragTrackerOnMouseup); begin + if Assigned(FOnMouseup) then + JSCode(JSName+'.events ["mouseup"].listeners=[];'); + if Assigned(Value) then + AddListener('mouseup', Ajax('mouseup', ['This', '%0.nm','E', '%1.nm'], true)); + FOnMouseup := Value; +end; + +function TExtDdDragTracker.JSClassName : string; begin + Result := 'Ext.dd.DragTracker'; +end; + +procedure TExtDdDragTracker.InitDefaults; begin inherited; + FConstrainTo := TExtUtilRegion.CreateInternal(Self, 'constrainTo'); + FConstrainToElement := TExtElement.CreateInternal(Self, 'constrainTo'); FHasListeners := TExtObject.CreateInternal(Self, 'hasListeners'); - FHighlightCfg := TExtObject.CreateInternal(Self, 'highlightCfg'); - FHighlightObject := TExtObject.CreateInternal(Self, 'highlight'); - FLabelJS := TExtObject.CreateInternal(Self, 'labelJS'); FListeners := TExtObject.CreateInternal(Self, 'listeners'); - FShadowAttributes := TExtObjectList.Create(Self, 'shadowAttributes'); - FTips := TExtObject.CreateInternal(Self, 'tips'); end; -{$IFDEF FPC}constructor TExtChartSeries.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtDdDragTracker.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtChartSeries.AddEvents(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtChartSeries'); +function TExtDdDragTracker.AddEvents(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtDdDragTracker'); Result := Self; end; -function TExtChartSeries.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtChartSeries'); +function TExtDdDragTracker.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtDdDragTracker'); Result := Self; end; -function TExtChartSeries.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtChartSeries'); +function TExtDdDragTracker.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtDdDragTracker'); Result := Self; end; -function TExtChartSeries.ClearListeners : TExtFunction; begin - JSCode(JSName + '.clearListeners();', 'TExtChartSeries'); +function TExtDdDragTracker.ClearListeners : TExtFunction; begin + JSCode(JSName + '.clearListeners();', 'TExtDdDragTracker'); Result := Self; end; -function TExtChartSeries.ClearManagedListeners : TExtFunction; begin - JSCode(JSName + '.clearManagedListeners();', 'TExtChartSeries'); +function TExtDdDragTracker.ClearManagedListeners : TExtFunction; begin + JSCode(JSName + '.clearManagedListeners();', 'TExtDdDragTracker'); Result := Self; end; -constructor TExtChartSeries.Create; begin +constructor TExtDdDragTracker.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -function TExtChartSeries.EachRecord(Fn : TExtFunction; Scope : TExtObject) : TExtFunction; begin - JSCode(JSName + '.eachRecord(' + VarToJSON([Fn, true, Scope, false]) + ');', 'TExtChartSeries'); +function TExtDdDragTracker.EnableBubble(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtDdDragTracker'); Result := Self; end; -function TExtChartSeries.EnableBubble(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtChartSeries'); +function TExtDdDragTracker.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDdDragTracker'); Result := Self; end; -function TExtChartSeries.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtChartSeries'); +function TExtDdDragTracker.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDdDragTracker'); Result := Self; end; -function TExtChartSeries.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtChartSeries'); +function TExtDdDragTracker.GetDragTarget : TExtFunction; begin + JSCode(JSName + '.getDragTarget();', 'TExtDdDragTracker'); Result := Self; end; -function TExtChartSeries.GetItemForPoint(X : Integer; Y : Integer) : TExtFunction; begin - JSCode(JSName + '.getItemForPoint(' + VarToJSON([X, Y]) + ');', 'TExtChartSeries'); +function TExtDdDragTracker.GetOffset(ConstrainMode : String = '') : TExtFunction; begin + JSCode(JSName + '.getOffset(' + VarToJSON([ConstrainMode]) + ');', 'TExtDdDragTracker'); Result := Self; end; -function TExtChartSeries.GetLegendColor : TExtFunction; begin - JSCode(JSName + '.getLegendColor();', 'TExtChartSeries'); +function TExtDdDragTracker.HasListener(EventName : String) : TExtFunction; begin + JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtDdDragTracker'); Result := Self; end; -function TExtChartSeries.GetRecordCount : TExtFunction; begin - JSCode(JSName + '.getRecordCount();', 'TExtChartSeries'); +function TExtDdDragTracker.InitEl(El : TExtElement) : TExtFunction; begin + JSCode(JSName + '.initEl(' + VarToJSON([El, false]) + ');', 'TExtDdDragTracker'); Result := Self; end; -function TExtChartSeries.HasListener(EventName : String) : TExtFunction; begin - JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtChartSeries'); +function TExtDdDragTracker.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin + JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtDdDragTracker'); Result := Self; end; -function TExtChartSeries.HideAll : TExtFunction; begin - JSCode(JSName + '.hideAll();', 'TExtChartSeries'); +function TExtDdDragTracker.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtDdDragTracker'); Result := Self; end; -function TExtChartSeries.HighlightItem(Item : TExtObject) : TExtFunction; begin - JSCode(JSName + '.highlightItem(' + VarToJSON([Item, false]) + ');', 'TExtChartSeries'); +function TExtDdDragTracker.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtDdDragTracker'); Result := Self; end; -function TExtChartSeries.IsExcluded : TExtFunction; begin - JSCode(JSName + '.isExcluded();', 'TExtChartSeries'); +function TExtDdDragTracker.ResumeEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtDdDragTracker'); Result := Self; end; -function TExtChartSeries.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin - JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtChartSeries'); +function TExtDdDragTracker.ResumeEvents : TExtFunction; begin + JSCode(JSName + '.resumeEvents();', 'TExtDdDragTracker'); Result := Self; end; -function TExtChartSeries.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtChartSeries'); +function TExtDdDragTracker.SuspendEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtDdDragTracker'); Result := Self; end; -function TExtChartSeries.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtChartSeries'); +function TExtDdDragTracker.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin + JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtDdDragTracker'); Result := Self; end; -function TExtChartSeries.ResumeEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtChartSeries'); - Result := Self; +destructor TExtDdDragTracker.Destroy; begin + try + FConstrainTo.Free; + FConstrainToElement.Free; + FHasListeners.Free; + FListeners.Free; + except end; + inherited; end; -function TExtChartSeries.ResumeEvents : TExtFunction; begin - JSCode(JSName + '.resumeEvents();', 'TExtChartSeries'); - Result := Self; +procedure TExtDdDragTracker.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'beforestart') and Assigned(FOnBeforestart) then + FOnBeforestart(TExtDdDragTracker(ParamAsObject('This')), TExtObject(ParamAsObject('E'))) + else if (AEvtName = 'drag') and Assigned(FOnDrag) then + FOnDrag(TExtDdDragTracker(ParamAsObject('This')), TExtObject(ParamAsObject('E'))) + else if (AEvtName = 'dragend') and Assigned(FOnDragend) then + FOnDragend(TExtDdDragTracker(ParamAsObject('This')), TExtObject(ParamAsObject('E'))) + else if (AEvtName = 'dragstart') and Assigned(FOnDragstart) then + FOnDragstart(TExtDdDragTracker(ParamAsObject('This')), TExtObject(ParamAsObject('E'))) + else if (AEvtName = 'mousedown') and Assigned(FOnMousedown) then + FOnMousedown(TExtDdDragTracker(ParamAsObject('This')), TExtObject(ParamAsObject('E'))) + else if (AEvtName = 'mousemove') and Assigned(FOnMousemove) then + FOnMousemove(TExtDdDragTracker(ParamAsObject('This')), TExtObject(ParamAsObject('E'))) + else if (AEvtName = 'mouseout') and Assigned(FOnMouseout) then + FOnMouseout(TExtDdDragTracker(ParamAsObject('This')), TExtObject(ParamAsObject('E'))) + else if (AEvtName = 'mouseover') and Assigned(FOnMouseover) then + FOnMouseover(TExtDdDragTracker(ParamAsObject('This')), TExtObject(ParamAsObject('E')), THTMLElement(ParamAsObject('Target'))) + else if (AEvtName = 'mouseup') and Assigned(FOnMouseup) then + FOnMouseup(TExtDdDragTracker(ParamAsObject('This')), TExtObject(ParamAsObject('E'))); end; -function TExtChartSeries.SetTitle(Index : Integer; Title : String) : TExtFunction; begin - JSCode(JSName + '.setTitle(' + VarToJSON([Index, Title]) + ');', 'TExtChartSeries'); - Result := Self; +function TExtDiagLayoutContextItem.JSClassName : string; begin + Result := 'Ext.diag.layout.ContextItem'; end; -function TExtChartSeries.ShowAll : TExtFunction; begin - JSCode(JSName + '.showAll();', 'TExtChartSeries'); - Result := Self; +{$IFDEF FPC}constructor TExtDiagLayoutContextItem.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +procedure TExtDdDragDropManagerSingleton.SetFClickPixelThresh(Value : Integer); begin + FClickPixelThresh := Value; + JSCode(JSName + '.clickPixelThresh=' + VarToJSON([Value]) + ';'); end; -function TExtChartSeries.SuspendEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtChartSeries'); - Result := Self; +procedure TExtDdDragDropManagerSingleton.SetFClickTimeThresh(Value : Integer); begin + FClickTimeThresh := Value; + JSCode(JSName + '.clickTimeThresh=' + VarToJSON([Value]) + ';'); end; -function TExtChartSeries.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin - JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtChartSeries'); - Result := Self; +procedure TExtDdDragDropManagerSingleton.SetFDragCls(Value : String); begin + FDragCls := Value; + JSCode(JSName + '.dragCls=' + VarToJSON([Value]) + ';'); end; -function TExtChartSeries.UnHighlightItem : TExtFunction; begin - JSCode(JSName + '.unHighlightItem();', 'TExtChartSeries'); - Result := Self; +procedure TExtDdDragDropManagerSingleton.SetFLocationCache(Value : TExtObject); begin + FLocationCache := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.locationCache=' + VarToJSON([Value, false]) + ';'); end; -destructor TExtChartSeries.Destroy; begin - try - FHasListeners.Free; - FHighlightCfg.Free; - FHighlightObject.Free; - FLabelJS.Free; - FListeners.Free; - FShadowAttributes.Free; - FTips.Free; - except end; - inherited; +procedure TExtDdDragDropManagerSingleton.SetFMode(Value : Integer); begin + FMode := Value; + JSCode(JSName + '.mode=' + VarToJSON([Value]) + ';'); end; -procedure TExtChartSeries.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'titlechange') and Assigned(FOnTitlechange) then - FOnTitlechange(ParamAsString('Title'), ParamAsInteger('Index')); +procedure TExtDdDragDropManagerSingleton.SetFNotifyOccluded(Value : Boolean); begin + FNotifyOccluded := Value; + JSCode(JSName + '.notifyOccluded=' + VarToJSON([Value]) + ';'); end; -procedure TExtDirectManagerSingleton.SetFHasListeners(Value : TExtObject); begin - FHasListeners := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.hasListeners=' + VarToJSON([Value, false]) + ';'); +procedure TExtDdDragDropManagerSingleton.SetFPreventDefault(Value : Boolean); begin + FPreventDefault := Value; + JSCode(JSName + '.preventDefault=' + VarToJSON([Value]) + ';'); end; -procedure TExtDirectManagerSingleton.SetFIsObservable(Value : Boolean); begin - FIsObservable := Value; - JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); +procedure TExtDdDragDropManagerSingleton.SetFStopPropagation(Value : Boolean); begin + FStopPropagation := Value; + JSCode(JSName + '.stopPropagation=' + VarToJSON([Value]) + ';'); end; -procedure TExtDirectManagerSingleton.SetFListeners(Value : TExtObject); begin - FListeners := Value; - Value.DeleteFromGarbage; - JSCode('listeners:' + VarToJSON([Value, false])); +procedure TExtDdDragDropManagerSingleton.SetFUseCache(Value : Boolean); begin + FUseCache := Value; + JSCode(JSName + '.useCache=' + VarToJSON([Value]) + ';'); end; -procedure TExtDirectManagerSingleton.SetFOnEvent(Value : TExtDirectManagerSingletonOnEvent); begin - if Assigned(FOnEvent) then - JSCode(JSName+'.events ["event"].listeners=[];'); - if Assigned(Value) then - AddListener('event', Ajax('event', ['Event', '%0.nm','Provider', '%1.nm'], true)); - FOnEvent := Value; +function TExtDdDragDropManagerSingleton.JSClassName : string; begin + Result := 'Ext.dd.DragDropManager'; end; -procedure TExtDirectManagerSingleton.SetFOnException(Value : TExtDirectManagerSingletonOnException); begin - if Assigned(FOnException) then - JSCode(JSName+'.events ["exception"].listeners=[];'); - if Assigned(Value) then - AddListener('exception', Ajax('exception', ['Event', '%0.nm'], true)); - FOnException := Value; +class function TExtDdDragDropManagerSingleton.INTERSECT : Integer; begin + Result := 0 end; -function TExtDirectManagerSingleton.JSClassName : string; begin - Result := 'Ext.direct.Manager'; +class function TExtDdDragDropManagerSingleton.POINT : Integer; begin + Result := 0 end; -{$IFDEF FPC}constructor TExtDirectManagerSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtDdDragDropManagerSingleton.InitDefaults; begin + inherited; + FLocationCache := TExtObject.CreateInternal(Self, 'locationCache'); +end; -function TExtDirectManagerSingleton.AddEvents(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtDirectManagerSingleton'); +{$IFDEF FPC}constructor TExtDdDragDropManagerSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDdDragDropManagerSingleton.GetBestMatch(Dds : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.getBestMatch(' + VarToJSON(Dds) + ');', 'TExtDdDragDropManagerSingleton'); Result := Self; end; -function TExtDirectManagerSingleton.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtDirectManagerSingleton'); +function TExtDdDragDropManagerSingleton.GetCss(Id : String) : TExtFunction; begin + JSCode(JSName + '.getCss(' + VarToJSON([Id]) + ');', 'TExtDdDragDropManagerSingleton'); Result := Self; end; -function TExtDirectManagerSingleton.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtDirectManagerSingleton'); +function TExtDdDragDropManagerSingleton.GetDDById(Id : String) : TExtFunction; begin + JSCode(JSName + '.getDDById(' + VarToJSON([Id]) + ');', 'TExtDdDragDropManagerSingleton'); Result := Self; end; -function TExtDirectManagerSingleton.AddProvider(Provider : TExtDirectProvider) : TExtFunction; begin - JSCode(JSName + '.addProvider(' + VarToJSON([Provider, false]) + ');', 'TExtDirectManagerSingleton'); +function TExtDdDragDropManagerSingleton.GetLocation(ODD : TExtDdDragDrop) : TExtFunction; begin + JSCode(JSName + '.getLocation(' + VarToJSON([ODD, false]) + ');', 'TExtDdDragDropManagerSingleton'); Result := Self; end; -function TExtDirectManagerSingleton.ClearListeners : TExtFunction; begin - JSCode(JSName + '.clearListeners();', 'TExtDirectManagerSingleton'); +function TExtDdDragDropManagerSingleton.GetPosY(El : THTMLElement) : TExtFunction; begin + JSCode(JSName + '.getPosY(' + VarToJSON([El, false]) + ');', 'TExtDdDragDropManagerSingleton'); Result := Self; end; -function TExtDirectManagerSingleton.ClearManagedListeners : TExtFunction; begin - JSCode(JSName + '.clearManagedListeners();', 'TExtDirectManagerSingleton'); +function TExtDdDragDropManagerSingleton.GetRelated(P_oDD : TExtDdDragDrop; BTargetsOnly : Boolean) : TExtFunction; begin + JSCode(JSName + '.getRelated(' + VarToJSON([P_oDD, false, BTargetsOnly]) + ');', 'TExtDdDragDropManagerSingleton'); Result := Self; end; -constructor TExtDirectManagerSingleton.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +function TExtDdDragDropManagerSingleton.GetScrollLeft : TExtFunction; begin + JSCode(JSName + '.getScrollLeft();', 'TExtDdDragDropManagerSingleton'); + Result := Self; end; -function TExtDirectManagerSingleton.EnableBubble(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtDirectManagerSingleton'); +function TExtDdDragDropManagerSingleton.GetScrollTop : TExtFunction; begin + JSCode(JSName + '.getScrollTop();', 'TExtDdDragDropManagerSingleton'); Result := Self; end; -function TExtDirectManagerSingleton.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDirectManagerSingleton'); +function TExtDdDragDropManagerSingleton.GetStyle(El : THTMLElement; Param : String) : TExtFunction; begin + JSCode(JSName + '.getStyle(' + VarToJSON([El, false, Param]) + ');', 'TExtDdDragDropManagerSingleton'); Result := Self; end; -function TExtDirectManagerSingleton.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtDirectManagerSingleton'); +function TExtDdDragDropManagerSingleton.HandleWasClicked(Node : THTMLElement) : TExtFunction; begin + JSCode(JSName + '.handleWasClicked(' + VarToJSON([Node, false]) + ');', 'TExtDdDragDropManagerSingleton'); Result := Self; end; -function TExtDirectManagerSingleton.GetProvider(Id : String) : TExtFunction; begin - JSCode(JSName + '.getProvider(' + VarToJSON([Id]) + ');', 'TExtDirectManagerSingleton'); +function TExtDdDragDropManagerSingleton.IsDragDrop(Id : String) : TExtFunction; begin + JSCode(JSName + '.isDragDrop(' + VarToJSON([Id]) + ');', 'TExtDdDragDropManagerSingleton'); Result := Self; end; -function TExtDirectManagerSingleton.HasListener(EventName : String) : TExtFunction; begin - JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtDirectManagerSingleton'); +function TExtDdDragDropManagerSingleton.IsHandle(Id : String) : TExtFunction; begin + JSCode(JSName + '.isHandle(' + VarToJSON([Id]) + ');', 'TExtDdDragDropManagerSingleton'); Result := Self; end; -function TExtDirectManagerSingleton.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin - JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtDirectManagerSingleton'); +function TExtDdDragDropManagerSingleton.IsLegalTarget(ODD : TExtDdDragDrop; OTargetDD : TExtDdDragDrop) : TExtFunction; begin + JSCode(JSName + '.isLegalTarget(' + VarToJSON([ODD, false, OTargetDD, false]) + ');', 'TExtDdDragDropManagerSingleton'); Result := Self; end; -function TExtDirectManagerSingleton.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtDirectManagerSingleton'); +function TExtDdDragDropManagerSingleton.IsTypeOfDD(The : TExtObject) : TExtFunction; begin + JSCode(JSName + '.isTypeOfDD(' + VarToJSON([The, false]) + ');', 'TExtDdDragDropManagerSingleton'); Result := Self; end; -function TExtDirectManagerSingleton.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtDirectManagerSingleton'); +function TExtDdDragDropManagerSingleton.MoveToEl(MoveEl : THTMLElement; TargetEl : THTMLElement) : TExtFunction; begin + JSCode(JSName + '.moveToEl(' + VarToJSON([MoveEl, false, TargetEl, false]) + ');', 'TExtDdDragDropManagerSingleton'); Result := Self; end; -function TExtDirectManagerSingleton.RemoveProvider(Provider : String) : TExtFunction; begin - JSCode(JSName + '.removeProvider(' + VarToJSON([Provider]) + ');', 'TExtDirectManagerSingleton'); +function TExtDdDragDropManagerSingleton.NumericSort(A : Integer; B : Integer) : TExtFunction; begin + JSCode(JSName + '.numericSort(' + VarToJSON([A, B]) + ');', 'TExtDdDragDropManagerSingleton'); + Result := Self; +end; + +function TExtDdDragDropManagerSingleton.RefreshCache(Groups : TExtObject) : TExtFunction; begin + JSCode(JSName + '.refreshCache(' + VarToJSON([Groups, false]) + ');', 'TExtDdDragDropManagerSingleton'); + Result := Self; +end; + +function TExtDdDragDropManagerSingleton.RegDragDrop(ODD : TExtDdDragDrop; SGroup : String) : TExtFunction; begin + JSCode(JSName + '.regDragDrop(' + VarToJSON([ODD, false, SGroup]) + ');', 'TExtDdDragDropManagerSingleton'); + Result := Self; +end; + +function TExtDdDragDropManagerSingleton.RegHandle(SDDId : String; SHandleId : String) : TExtFunction; begin + JSCode(JSName + '.regHandle(' + VarToJSON([SDDId, SHandleId]) + ');', 'TExtDdDragDropManagerSingleton'); Result := Self; end; -function TExtDirectManagerSingleton.ResumeEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtDirectManagerSingleton'); +function TExtDdDragDropManagerSingleton.StartDrag(X : Integer; Y : Integer) : TExtFunction; begin + JSCode(JSName + '.startDrag(' + VarToJSON([X, Y]) + ');', 'TExtDdDragDropManagerSingleton'); Result := Self; end; -function TExtDirectManagerSingleton.ResumeEvents : TExtFunction; begin - JSCode(JSName + '.resumeEvents();', 'TExtDirectManagerSingleton'); +function TExtDdDragDropManagerSingleton.StopEvent(E : TEvent) : TExtFunction; begin + JSCode(JSName + '.stopEvent(' + VarToJSON([E, false]) + ');', 'TExtDdDragDropManagerSingleton'); Result := Self; end; -function TExtDirectManagerSingleton.SuspendEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtDirectManagerSingleton'); +function TExtDdDragDropManagerSingleton.SwapNode(N1 : THTMLElement; N2 : THTMLElement) : TExtFunction; begin + JSCode(JSName + '.swapNode(' + VarToJSON([N1, false, N2, false]) + ');', 'TExtDdDragDropManagerSingleton'); Result := Self; end; -function TExtDirectManagerSingleton.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin - JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtDirectManagerSingleton'); +function TExtDdDragDropManagerSingleton.VerifyEl(El : THTMLElement) : TExtFunction; begin + JSCode(JSName + '.verifyEl(' + VarToJSON([El, false]) + ');', 'TExtDdDragDropManagerSingleton'); Result := Self; end; -procedure TExtDirectManagerSingleton.HandleEvent(const AEvtName : string); begin +destructor TExtDdDragDropManagerSingleton.Destroy; begin + try + FLocationCache.Free; + except end; inherited; - if (AEvtName = 'event') and Assigned(FOnEvent) then - FOnEvent(TExtDirectEvent(ParamAsObject('Event')), TExtDirectProvider(ParamAsObject('Provider'))) - else if (AEvtName = 'exception') and Assigned(FOnException) then - FOnException(TExtDirectEvent(ParamAsObject('Event'))); end; -function TExtComponentQuerySingleton.JSClassName : string; begin - Result := 'Ext.ComponentQuery'; +procedure TExtGridPluginBufferedRenderer.SetFPosition(Value : Integer); begin + FPosition := Value; + JSCode(JSName + '.position=' + VarToJSON([Value]) + ';'); end; -{$IFDEF FPC}constructor TExtComponentQuerySingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtComponentQuerySingleton.IsJS(Component : TExtComponent; Selector : String) : TExtFunction; begin - JSCode(JSName + '.is(' + VarToJSON([Component, false, Selector]) + ');', 'TExtComponentQuerySingleton'); - Result := Self; +procedure TExtGridPluginBufferedRenderer.SetFSynchronousRender(Value : Boolean); begin + FSynchronousRender := Value; + JSCode('synchronousRender:' + VarToJSON([Value])); end; -function TExtComponentQuerySingleton.Query(Selector : String; Root : TExtContainer = nil) : TExtFunction; begin - JSCode(JSName + '.query(' + VarToJSON([Selector, Root, false]) + ');', 'TExtComponentQuerySingleton'); - Result := Self; +procedure TExtGridPluginBufferedRenderer.SetFVariableRowHeight(Value : Boolean); begin + FVariableRowHeight := Value; + JSCode('variableRowHeight:' + VarToJSON([Value])); end; -procedure TExtDdDragDrop.SetFAvailable(Value : Boolean); begin - FAvailable := Value; - JSCode(JSName + '.available=' + VarToJSON([Value]) + ';'); +function TExtGridPluginBufferedRenderer.JSClassName : string; begin + Result := 'Ext.grid.plugin.BufferedRenderer'; end; -procedure TExtDdDragDrop.SetFConfig(Value : TExtObject); begin - FConfig := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.config=' + VarToJSON([Value, false]) + ';'); +{$IFDEF FPC}constructor TExtGridPluginBufferedRenderer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtGridPluginBufferedRenderer.ScrollTo(RecordIdx : Integer; DoSelect : Boolean; Callback : TExtFunction; CallbackRecordIdx : Integer; CallbackRecord : TExtDataModel; Scope : TExtObject) : TExtFunction; begin + JSCode(JSName + '.scrollTo(' + VarToJSON([RecordIdx, DoSelect, Callback, true, CallbackRecordIdx, CallbackRecord, false, Scope, false]) + ');', 'TExtGridPluginBufferedRenderer'); + Result := Self; end; -procedure TExtDdDragDrop.SetFDefaultPadding(Value : TExtObject); begin - FDefaultPadding := Value; +procedure TExtModelManagerSingleton.SetFAssociationStack(Value : TExtObjectList); begin + FAssociationStack := Value; Value.DeleteFromGarbage; - JSCode(JSName + '.defaultPadding=' + VarToJSON([Value, false]) + ';'); + JSCode(JSName + '.associationStack=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtDdDragDrop.SetFGroups(Value : TExtObject); begin - FGroups := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.groups=' + VarToJSON([Value, false]) + ';'); +function TExtModelManagerSingleton.JSClassName : string; begin + Result := 'Ext.ModelManager'; end; -procedure TExtDdDragDrop.SetFHasOuterHandles(Value : Boolean); begin - FHasOuterHandles := Value; - JSCode(JSName + '.hasOuterHandles=' + VarToJSON([Value]) + ';'); +procedure TExtModelManagerSingleton.InitDefaults; begin + inherited; + FAssociationStack := TExtObjectList.Create(Self, 'associationStack'); end; -procedure TExtDdDragDrop.SetFId(Value : String); begin - FId := Value; - JSCode(JSName + '.id=' + VarToJSON([Value]) + ';'); +{$IFDEF FPC}constructor TExtModelManagerSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtModelManagerSingleton.GetModel(Id : String) : TExtFunction; begin + JSCode(JSName + '.getModel(' + VarToJSON([Id]) + ');', 'TExtModelManagerSingleton'); + Result := Self; end; -procedure TExtDdDragDrop.SetFIgnoreSelf(Value : Boolean); begin - FIgnoreSelf := Value; - JSCode(JSName + '.ignoreSelf=' + VarToJSON([Value]) + ';'); +destructor TExtModelManagerSingleton.Destroy; begin + try + FAssociationStack.Free; + except end; + inherited; end; -procedure TExtDdDragDrop.SetFInvalidHandleClasses(Value : TExtObjectList); begin - FInvalidHandleClasses := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.invalidHandleClasses=' + VarToJSON([Value, false]) + ';'); +procedure TExtChartSeriesCartesian.SetFAxis(Value : String); begin + FAxis := Value; + JSCode('axis:' + VarToJSON([Value])); end; -procedure TExtDdDragDrop.SetFInvalidHandleTypes(Value : TExtObject); begin - FInvalidHandleTypes := Value; +procedure TExtChartSeriesCartesian.SetFAxisList(Value : TExtObjectList); begin + FAxisList := Value; Value.DeleteFromGarbage; - JSCode(JSName + '.invalidHandleTypes=' + VarToJSON([Value, false]) + ';'); + JSCode('axis:' + VarToJSON([Value, false])); end; -procedure TExtDdDragDrop.SetFIsTarget(Value : Boolean); begin - FIsTarget := Value; - JSCode(JSName + '.isTarget=' + VarToJSON([Value]) + ';'); +procedure TExtChartSeriesCartesian.SetFXField(Value : String); begin + FXField := Value; + JSCode('xField:' + VarToJSON([Value])); end; -procedure TExtDdDragDrop.SetFMaintainOffset(Value : Boolean); begin - FMaintainOffset := Value; - JSCode(JSName + '.maintainOffset=' + VarToJSON([Value]) + ';'); +procedure TExtChartSeriesCartesian.SetFYField(Value : String); begin + FYField := Value; + JSCode('yField:' + VarToJSON([Value])); end; -procedure TExtDdDragDrop.SetFMoveOnly(Value : Boolean); begin - FMoveOnly := Value; - JSCode(JSName + '.moveOnly=' + VarToJSON([Value]) + ';'); +procedure TExtChartSeriesCartesian.SetFYFieldList(Value : TExtObjectList); begin + FYFieldList := Value; + Value.DeleteFromGarbage; + JSCode('yField:' + VarToJSON([Value, false])); end; -procedure TExtDdDragDrop.SetFPadding(Value : TArrayOfInteger); begin - FPadding := Value; - JSCode(JSName + '.padding=' + ArrayToJSON(Value) + ';'); +function TExtChartSeriesCartesian.JSClassName : string; begin + Result := 'Ext.chart.series.Cartesian'; end; -procedure TExtDdDragDrop.SetFPrimaryButtonOnly(Value : Boolean); begin - FPrimaryButtonOnly := Value; - JSCode(JSName + '.primaryButtonOnly=' + VarToJSON([Value]) + ';'); +procedure TExtChartSeriesCartesian.InitDefaults; begin + inherited; + FAxisList := TExtObjectList.Create(Self, 'axis'); + FYFieldList := TExtObjectList.Create(Self, 'yField'); end; -procedure TExtDdDragDrop.SetFXTicks(Value : TArrayOfInteger); begin - FXTicks := Value; - JSCode(JSName + '.xTicks=' + ArrayToJSON(Value) + ';'); +{$IFDEF FPC}constructor TExtChartSeriesCartesian.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtChartSeriesCartesian.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtDdDragDrop.SetFYTicks(Value : TArrayOfInteger); begin - FYTicks := Value; - JSCode(JSName + '.yTicks=' + ArrayToJSON(Value) + ';'); +function TExtChartSeriesCartesian.GetMinMaxXValues : TExtFunction; begin + JSCode(JSName + '.getMinMaxXValues();', 'TExtChartSeriesCartesian'); + Result := Self; end; -function TExtDdDragDrop.JSClassName : string; begin - Result := 'Ext.dd.DragDrop'; +function TExtChartSeriesCartesian.GetMinMaxYValues : TExtFunction; begin + JSCode(JSName + '.getMinMaxYValues();', 'TExtChartSeriesCartesian'); + Result := Self; end; -procedure TExtDdDragDrop.InitDefaults; begin +destructor TExtChartSeriesCartesian.Destroy; begin + try + FAxisList.Free; + FYFieldList.Free; + except end; inherited; - FConfig := TExtObject.CreateInternal(Self, 'config'); - FDefaultPadding := TExtObject.CreateInternal(Self, 'defaultPadding'); - FGroups := TExtObject.CreateInternal(Self, 'groups'); - FIgnoreSelf := true; - FInvalidHandleClasses := TExtObjectList.Create(Self, 'invalidHandleClasses'); - FInvalidHandleTypes := TExtObject.CreateInternal(Self, 'invalidHandleTypes'); end; -{$IFDEF FPC}constructor TExtDdDragDrop.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDdDragDrop.AddInvalidHandleClass(CssClass : String) : TExtFunction; begin - JSCode(JSName + '.addInvalidHandleClass(' + VarToJSON([CssClass]) + ');', 'TExtDdDragDrop'); - Result := Self; +function TExtGridPluginHeaderReorderer.JSClassName : string; begin + Result := 'Ext.grid.plugin.HeaderReorderer'; end; -function TExtDdDragDrop.AddInvalidHandleId(Id : String) : TExtFunction; begin - JSCode(JSName + '.addInvalidHandleId(' + VarToJSON([Id]) + ');', 'TExtDdDragDrop'); - Result := Self; -end; +{$IFDEF FPC}constructor TExtGridPluginHeaderReorderer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtDdDragDrop.AddInvalidHandleType(TagName : String) : TExtFunction; begin - JSCode(JSName + '.addInvalidHandleType(' + VarToJSON([TagName]) + ');', 'TExtDdDragDrop'); - Result := Self; +procedure TExtGridPluginHeaderResizer.SetFDynamic(Value : Boolean); begin + FDynamic := Value; + JSCode('dynamic:' + VarToJSON([Value])); end; -function TExtDdDragDrop.AddToGroup(SGroup : String) : TExtFunction; begin - JSCode(JSName + '.addToGroup(' + VarToJSON([SGroup]) + ');', 'TExtDdDragDrop'); - Result := Self; +function TExtGridPluginHeaderResizer.JSClassName : string; begin + Result := 'Ext.grid.plugin.HeaderResizer'; end; -function TExtDdDragDrop.ApplyConfig : TExtFunction; begin - JSCode(JSName + '.applyConfig();', 'TExtDdDragDrop'); - Result := Self; -end; +{$IFDEF FPC}constructor TExtGridPluginHeaderResizer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtDdDragDrop.ClearConstraints : TExtFunction; begin - JSCode(JSName + '.clearConstraints();', 'TExtDdDragDrop'); - Result := Self; +procedure TExtGridPluginRowExpander.SetFExpandOnDblClick(Value : Boolean); begin + FExpandOnDblClick := Value; + JSCode('expandOnDblClick:' + VarToJSON([Value])); end; -function TExtDdDragDrop.ClearTicks : TExtFunction; begin - JSCode(JSName + '.clearTicks();', 'TExtDdDragDrop'); - Result := Self; +procedure TExtGridPluginRowExpander.SetFExpandOnEnter(Value : Boolean); begin + FExpandOnEnter := Value; + JSCode('expandOnEnter:' + VarToJSON([Value])); end; -function TExtDdDragDrop.ConstrainTo(ConstrainTo : String; Pad : Integer = 0; InContent : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.constrainTo(' + VarToJSON([ConstrainTo, Pad, InContent]) + ');', 'TExtDdDragDrop'); - Result := Self; +procedure TExtGridPluginRowExpander.SetFSelectRowOnExpand(Value : Boolean); begin + FSelectRowOnExpand := Value; + JSCode('selectRowOnExpand:' + VarToJSON([Value])); end; -constructor TExtDdDragDrop.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtGridPluginRowExpander.SetFOnCollapsebody(Value : TExtGridPluginRowExpanderOnCollapsebody); begin + if Assigned(FOnCollapsebody) then + JSCode(JSName+'.events ["collapsebody"].listeners=[];'); + if Assigned(Value) then + AddListener('collapsebody', Ajax('collapsebody', ['RowNode', '%0.nm','RecordJS', '%1.nm','ExpandRow', '%2.nm'], true)); + FOnCollapsebody := Value; end; -function TExtDdDragDrop.GetDragEl : TExtFunction; begin - JSCode(JSName + '.getDragEl();', 'TExtDdDragDrop'); - Result := Self; +procedure TExtGridPluginRowExpander.SetFOnExpandbody(Value : TExtGridPluginRowExpanderOnExpandbody); begin + if Assigned(FOnExpandbody) then + JSCode(JSName+'.events ["expandbody"].listeners=[];'); + if Assigned(Value) then + AddListener('expandbody', Ajax('expandbody', ['RowNode', '%0.nm','RecordJS', '%1.nm','ExpandRow', '%2.nm'], true)); + FOnExpandbody := Value; end; -function TExtDdDragDrop.GetEl : TExtFunction; begin - JSCode(JSName + '.getEl();', 'TExtDdDragDrop'); - Result := Self; +function TExtGridPluginRowExpander.JSClassName : string; begin + Result := 'Ext.grid.plugin.RowExpander'; end; -function TExtDdDragDrop.Init(Id : String; SGroup : String; Config : TExtObject) : TExtFunction; begin - JSCode(JSName + '.init(' + VarToJSON([Id, SGroup, Config, false]) + ');', 'TExtDdDragDrop'); - Result := Self; +{$IFDEF FPC}constructor TExtGridPluginRowExpander.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +procedure TExtGridPluginRowExpander.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'collapsebody') and Assigned(FOnCollapsebody) then + FOnCollapsebody(THTMLElement(ParamAsObject('RowNode')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('ExpandRow'))) + else if (AEvtName = 'expandbody') and Assigned(FOnExpandbody) then + FOnExpandbody(THTMLElement(ParamAsObject('RowNode')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('ExpandRow'))); end; -function TExtDdDragDrop.InitTarget(Id : String; SGroup : String; Config : TExtObject) : TExtFunction; begin - JSCode(JSName + '.initTarget(' + VarToJSON([Id, SGroup, Config, false]) + ');', 'TExtDdDragDrop'); - Result := Self; +function TExtGridPluginDivRenderer.JSClassName : string; begin + Result := 'Ext.grid.plugin.DivRenderer'; end; -function TExtDdDragDrop.IsLocked : TExtFunction; begin - JSCode(JSName + '.isLocked();', 'TExtDdDragDrop'); - Result := Self; +{$IFDEF FPC}constructor TExtGridPluginDivRenderer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +procedure TExtGridPluginDragDrop.SetFContainerScroll(Value : TExtObject); begin + FContainerScroll := Value; + Value.DeleteFromGarbage; + JSCode('containerScroll:' + VarToJSON([Value, false])); end; -function TExtDdDragDrop.IsValidHandleChild(Node : THTMLElement) : TExtFunction; begin - JSCode(JSName + '.isValidHandleChild(' + VarToJSON([Node, false]) + ');', 'TExtDdDragDrop'); - Result := Self; +procedure TExtGridPluginDragDrop.SetFContainerScrollBoolean(Value : Boolean); begin + FContainerScrollBoolean := Value; + JSCode('containerScroll:' + VarToJSON([Value])); end; -function TExtDdDragDrop.RemoveFromGroup(SGroup : String) : TExtFunction; begin - JSCode(JSName + '.removeFromGroup(' + VarToJSON([SGroup]) + ');', 'TExtDdDragDrop'); - Result := Self; +procedure TExtGridPluginDragDrop.SetFDdGroup(Value : String); begin + FDdGroup := Value; + JSCode('ddGroup:' + VarToJSON([Value])); end; -function TExtDdDragDrop.RemoveInvalidHandleClass(CssClass : String) : TExtFunction; begin - JSCode(JSName + '.removeInvalidHandleClass(' + VarToJSON([CssClass]) + ');', 'TExtDdDragDrop'); - Result := Self; +procedure TExtGridPluginDragDrop.SetFDragGroup(Value : String); begin + FDragGroup := Value; + JSCode('dragGroup:' + VarToJSON([Value])); end; -function TExtDdDragDrop.RemoveInvalidHandleId(Id : String) : TExtFunction; begin - JSCode(JSName + '.removeInvalidHandleId(' + VarToJSON([Id]) + ');', 'TExtDdDragDrop'); - Result := Self; +procedure TExtGridPluginDragDrop.SetFDropGroup(Value : String); begin + FDropGroup := Value; + JSCode('dropGroup:' + VarToJSON([Value])); end; -function TExtDdDragDrop.RemoveInvalidHandleType(TagName : String) : TExtFunction; begin - JSCode(JSName + '.removeInvalidHandleType(' + VarToJSON([TagName]) + ');', 'TExtDdDragDrop'); - Result := Self; +procedure TExtGridPluginDragDrop.SetFEnableDrag(Value : Boolean); begin + FEnableDrag := Value; + JSCode('enableDrag:' + VarToJSON([Value])); end; -function TExtDdDragDrop.ResetConstraints(MaintainOffset : Boolean) : TExtFunction; begin - JSCode(JSName + '.resetConstraints(' + VarToJSON([MaintainOffset]) + ');', 'TExtDdDragDrop'); - Result := Self; +procedure TExtGridPluginDragDrop.SetFEnableDrop(Value : Boolean); begin + FEnableDrop := Value; + JSCode('enableDrop:' + VarToJSON([Value])); end; -function TExtDdDragDrop.SetDragElId(Id : String) : TExtFunction; begin - JSCode(JSName + '.setDragElId(' + VarToJSON([Id]) + ');', 'TExtDdDragDrop'); - Result := Self; +function TExtGridPluginDragDrop.JSClassName : string; begin + Result := 'Ext.grid.plugin.DragDrop'; end; -function TExtDdDragDrop.SetHandleElId(Id : String) : TExtFunction; begin - JSCode(JSName + '.setHandleElId(' + VarToJSON([Id]) + ');', 'TExtDdDragDrop'); - Result := Self; +procedure TExtGridPluginDragDrop.InitDefaults; begin + inherited; + FContainerScroll := TExtObject.CreateInternal(Self, 'containerScroll'); end; -function TExtDdDragDrop.SetInitPosition(DiffX : Integer; DiffY : Integer) : TExtFunction; begin - JSCode(JSName + '.setInitPosition(' + VarToJSON([DiffX, DiffY]) + ');', 'TExtDdDragDrop'); - Result := Self; +{$IFDEF FPC}constructor TExtGridPluginDragDrop.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtGridPluginDragDrop.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -function TExtDdDragDrop.SetOuterHandleElId(Id : String) : TExtFunction; begin - JSCode(JSName + '.setOuterHandleElId(' + VarToJSON([Id]) + ');', 'TExtDdDragDrop'); - Result := Self; +destructor TExtGridPluginDragDrop.Destroy; begin + try + FContainerScroll.Free; + except end; + inherited; end; -function TExtDdDragDrop.SetPadding(ITop : Integer; IRight : Integer; IBot : Integer; ILeft : Integer) : TExtFunction; begin - JSCode(JSName + '.setPadding(' + VarToJSON([ITop, IRight, IBot, ILeft]) + ');', 'TExtDdDragDrop'); - Result := Self; +procedure TExtGridPluginEditing.SetFClicksToEdit(Value : Integer); begin + FClicksToEdit := Value; + JSCode('clicksToEdit:' + VarToJSON([Value])); end; -function TExtDdDragDrop.SetXConstraint(ILeft : Integer; IRight : Integer; ITickSize : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.setXConstraint(' + VarToJSON([ILeft, IRight, ITickSize]) + ');', 'TExtDdDragDrop'); - Result := Self; +procedure TExtGridPluginEditing.SetFEditing(Value : Boolean); begin + FEditing := Value; + JSCode(JSName + '.editing=' + VarToJSON([Value]) + ';'); end; -function TExtDdDragDrop.SetYConstraint(IUp : Integer; IDown : Integer; ITickSize : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.setYConstraint(' + VarToJSON([IUp, IDown, ITickSize]) + ');', 'TExtDdDragDrop'); - Result := Self; +procedure TExtGridPluginEditing.SetFHasListeners(Value : TExtObject); begin + FHasListeners := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.hasListeners=' + VarToJSON([Value, false]) + ';'); end; -function TExtDdDragDrop.ToString : TExtFunction; begin - JSCode(JSName + '.toString();', 'TExtDdDragDrop'); - Result := Self; +procedure TExtGridPluginEditing.SetFIsObservable(Value : Boolean); begin + FIsObservable := Value; + JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); end; -function TExtDdDragDrop.Unreg : TExtFunction; begin - JSCode(JSName + '.unreg();', 'TExtDdDragDrop'); - Result := Self; +procedure TExtGridPluginEditing.SetFListeners(Value : TExtObject); begin + FListeners := Value; + Value.DeleteFromGarbage; + JSCode('listeners:' + VarToJSON([Value, false])); end; -destructor TExtDdDragDrop.Destroy; begin - try - FConfig.Free; - FDefaultPadding.Free; - FGroups.Free; - FInvalidHandleClasses.Free; - FInvalidHandleTypes.Free; - except end; - inherited; +procedure TExtGridPluginEditing.SetFTriggerEvent(Value : String); begin + FTriggerEvent := Value; + JSCode('triggerEvent:' + VarToJSON([Value])); end; -function TExtDataJsonPSingleton.JSClassName : string; begin - Result := 'Ext.data.JsonP'; +function TExtGridPluginEditing.JSClassName : string; begin + Result := 'Ext.grid.plugin.Editing'; end; -{$IFDEF FPC}constructor TExtDataJsonPSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtGridPluginEditing.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtDataJsonPSingleton.Abort(Request : String = '') : TExtFunction; begin - JSCode(JSName + '.abort(' + VarToJSON([Request]) + ');', 'TExtDataJsonPSingleton'); +function TExtGridPluginEditing.AddEvents(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtGridPluginEditing'); Result := Self; end; -procedure TExtChartHighlight.SetFHighlight(Value : Boolean); begin - FHighlight := Value; - JSCode('highlight:' + VarToJSON([Value])); +function TExtGridPluginEditing.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtGridPluginEditing'); + Result := Self; end; -procedure TExtChartHighlight.SetFHighlightCfg(Value : TExtObject); begin - FHighlightCfg := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.highlightCfg=' + VarToJSON([Value, false]) + ';'); +function TExtGridPluginEditing.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtGridPluginEditing'); + Result := Self; end; -procedure TExtChartHighlight.SetFHighlightObject(Value : TExtObject); begin - FHighlightObject := Value; - Value.DeleteFromGarbage; - JSCode('highlight:' + VarToJSON([Value, false])); +function TExtGridPluginEditing.CancelEdit : TExtFunction; begin + JSCode(JSName + '.cancelEdit();', 'TExtGridPluginEditing'); + Result := Self; end; -function TExtChartHighlight.JSClassName : string; begin - Result := 'Ext.chart.Highlight'; +function TExtGridPluginEditing.ClearListeners : TExtFunction; begin + JSCode(JSName + '.clearListeners();', 'TExtGridPluginEditing'); + Result := Self; end; -procedure TExtChartHighlight.InitDefaults; begin - inherited; - FHighlightCfg := TExtObject.CreateInternal(Self, 'highlightCfg'); - FHighlightObject := TExtObject.CreateInternal(Self, 'highlight'); +function TExtGridPluginEditing.ClearManagedListeners : TExtFunction; begin + JSCode(JSName + '.clearManagedListeners();', 'TExtGridPluginEditing'); + Result := Self; end; -{$IFDEF FPC}constructor TExtChartHighlight.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtGridPluginEditing.CompleteEdit : TExtFunction; begin + JSCode(JSName + '.completeEdit();', 'TExtGridPluginEditing'); + Result := Self; +end; -constructor TExtChartHighlight.Create; begin +constructor TExtGridPluginEditing.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -function TExtChartHighlight.HighlightItem(Item : TExtObject) : TExtFunction; begin - JSCode(JSName + '.highlightItem(' + VarToJSON([Item, false]) + ');', 'TExtChartHighlight'); +function TExtGridPluginEditing.EnableBubble(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtGridPluginEditing'); Result := Self; end; -function TExtChartHighlight.UnHighlightItem : TExtFunction; begin - JSCode(JSName + '.unHighlightItem();', 'TExtChartHighlight'); +function TExtGridPluginEditing.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtGridPluginEditing'); Result := Self; end; -destructor TExtChartHighlight.Destroy; begin - try - FHighlightCfg.Free; - FHighlightObject.Free; - except end; - inherited; +function TExtGridPluginEditing.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtGridPluginEditing'); + Result := Self; end; -function TExtGridFeatureGroupStore.JSClassName : string; begin - Result := 'Ext.grid.feature.GroupStore'; +function TExtGridPluginEditing.HasListener(EventName : String) : TExtFunction; begin + JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtGridPluginEditing'); + Result := Self; end; -{$IFDEF FPC}constructor TExtGridFeatureGroupStore.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtGridPluginEditing.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin + JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtGridPluginEditing'); + Result := Self; +end; -function TExtFxTargetSprite.JSClassName : string; begin - Result := 'Ext.fx.target.Sprite'; +function TExtGridPluginEditing.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtGridPluginEditing'); + Result := Self; end; -{$IFDEF FPC}constructor TExtFxTargetSprite.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtGridPluginEditing.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtGridPluginEditing'); + Result := Self; +end; -procedure TExtChartAxis.SetFAdjustEnd(Value : Boolean); begin - FAdjustEnd := Value; - JSCode('adjustEnd:' + VarToJSON([Value])); +function TExtGridPluginEditing.ResumeEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtGridPluginEditing'); + Result := Self; end; -procedure TExtChartAxis.SetFDashSize(Value : Integer); begin - FDashSize := Value; - JSCode('dashSize:' + VarToJSON([Value])); +function TExtGridPluginEditing.ResumeEvents : TExtFunction; begin + JSCode(JSName + '.resumeEvents();', 'TExtGridPluginEditing'); + Result := Self; end; -procedure TExtChartAxis.SetFGrid(Value : Boolean); begin - FGrid := Value; - JSCode('grid:' + VarToJSON([Value])); +function TExtGridPluginEditing.SuspendEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtGridPluginEditing'); + Result := Self; end; -procedure TExtChartAxis.SetFGridObject(Value : TExtObject); begin - FGridObject := Value; - Value.DeleteFromGarbage; - JSCode('grid:' + VarToJSON([Value, false])); +function TExtGridPluginEditing.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin + JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtGridPluginEditing'); + Result := Self; end; -procedure TExtChartAxis.SetFLength(Value : Integer); begin - FLength := Value; - JSCode('length:' + VarToJSON([Value])); +procedure TExtChartSeriesGauge.SetFAngleField(Value : String); begin + FAngleField := Value; + JSCode('angleField:' + VarToJSON([Value])); end; -procedure TExtChartAxis.SetFMajorTickSteps(Value : Integer); begin - FMajorTickSteps := Value; - JSCode('majorTickSteps:' + VarToJSON([Value])); +procedure TExtChartSeriesGauge.SetFDonut(Value : Boolean); begin + FDonut := Value; + JSCode('donut:' + VarToJSON([Value])); end; -procedure TExtChartAxis.SetFMinorTickSteps(Value : Integer); begin - FMinorTickSteps := Value; - JSCode('minorTickSteps:' + VarToJSON([Value])); +procedure TExtChartSeriesGauge.SetFDonutInteger(Value : Integer); begin + FDonutInteger := Value; + JSCode('donut:' + VarToJSON([Value])); end; -procedure TExtChartAxis.SetFPosition(Value : String); begin - FPosition := Value; - JSCode('position:' + VarToJSON([Value])); +procedure TExtChartSeriesGauge.SetFHighlightDuration(Value : Integer); begin + FHighlightDuration := Value; + JSCode('highlightDuration:' + VarToJSON([Value])); end; -procedure TExtChartAxis.SetFTitle(Value : String); begin - FTitle := Value; - if not ConfigAvailable(JSName) then - SetTitle(Value) - else - JSCode('title:' + VarToJSON([Value])); +procedure TExtChartSeriesGauge.SetFNeedle(Value : Boolean); begin + FNeedle := Value; + JSCode('needle:' + VarToJSON([Value])); end; -procedure TExtChartAxis.SetFWidth(Value : Integer); begin - FWidth := Value; - JSCode('width:' + VarToJSON([Value])); +procedure TExtChartSeriesGauge.SetFShowInLegend(Value : Boolean); begin + FShowInLegend := Value; + JSCode('showInLegend:' + VarToJSON([Value])); end; -function TExtChartAxis.JSClassName : string; begin - Result := 'Ext.chart.axis.Axis'; +procedure TExtChartSeriesGauge.SetFStyle(Value : TExtObject); begin + FStyle := Value; + Value.DeleteFromGarbage; + JSCode('style:' + VarToJSON([Value, false])); end; -procedure TExtChartAxis.InitDefaults; begin +function TExtChartSeriesGauge.JSClassName : string; begin + Result := 'Ext.chart.series.Gauge'; +end; + +procedure TExtChartSeriesGauge.InitDefaults; begin inherited; - FGridObject := TExtObject.CreateInternal(Self, 'grid'); + FStyle := TExtObject.CreateInternal(Self, 'style'); end; -{$IFDEF FPC}constructor TExtChartAxis.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtChartSeriesGauge.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtChartAxis.Create; begin +constructor TExtChartSeriesGauge.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -function TExtChartAxis.DrawAxis : TExtFunction; begin - JSCode(JSName + '.drawAxis();', 'TExtChartAxis'); - Result := Self; -end; - -function TExtChartAxis.DrawGrid : TExtFunction; begin - JSCode(JSName + '.drawGrid();', 'TExtChartAxis'); +function TExtChartSeriesGauge.DrawSeries : TExtFunction; begin + JSCode(JSName + '.drawSeries();', 'TExtChartSeriesGauge'); Result := Self; end; -function TExtChartAxis.DrawLabel : TExtFunction; begin - JSCode(JSName + '.drawLabel();', 'TExtChartAxis'); +function TExtChartSeriesGauge.GetLegendColor(Info : TExtObject) : TExtFunction; begin + JSCode(JSName + '.getLegendColor(' + VarToJSON([Info, false]) + ');', 'TExtChartSeriesGauge'); Result := Self; end; -function TExtChartAxis.SetTitle(Title : String) : TExtFunction; begin - JSCode(JSName + '.setTitle(' + VarToJSON([Title]) + ');', 'TExtChartAxis'); +function TExtChartSeriesGauge.SetValue : TExtFunction; begin + JSCode(JSName + '.setValue();', 'TExtChartSeriesGauge'); Result := Self; end; -destructor TExtChartAxis.Destroy; begin +destructor TExtChartSeriesGauge.Destroy; begin try - FGridObject.Free; + FStyle.Free; except end; inherited; end; -procedure TExtLayoutContainer.SetFItemCls(Value : String); begin - FItemCls := Value; - JSCode('itemCls:' + VarToJSON([Value])); +procedure TExtPickerMonth.SetFBaseCls(Value : String); begin + FBaseCls := Value; + JSCode('baseCls:' + VarToJSON([Value])); end; -procedure TExtLayoutContainer.SetFOverflowPadderEl(Value : TExtElement); begin - FOverflowPadderEl := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.overflowPadderEl=' + VarToJSON([Value, false]) + ';'); +procedure TExtPickerMonth.SetFCancelText(Value : String); begin + FCancelText := Value; + JSCode('cancelText:' + VarToJSON([Value])); end; -function TExtLayoutContainer.JSClassName : string; begin - Result := 'Ext.layout.container.Container'; +procedure TExtPickerMonth.SetFOkText(Value : String); begin + FOkText := Value; + JSCode('okText:' + VarToJSON([Value])); end; -procedure TExtLayoutContainer.InitDefaults; begin - inherited; - FOverflowPadderEl := TExtElement.CreateInternal(Self, 'overflowPadderEl'); +procedure TExtPickerMonth.SetFSelectedCls(Value : String); begin + FSelectedCls := Value; + JSCode('selectedCls:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtLayoutContainer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtPickerMonth.SetFShowButtons(Value : Boolean); begin + FShowButtons := Value; + JSCode('showButtons:' + VarToJSON([Value])); +end; -function TExtLayoutContainer.AddChildEls : TExtFunction; begin - JSCode(JSName + '.addChildEls();', 'TExtLayoutContainer'); - Result := Self; +procedure TExtPickerMonth.SetFValue(Value : TDateTime); begin + FValue := Value; + JSCode('value:' + VarToJSON([Value])); end; -function TExtLayoutContainer.BeginLayout : TExtFunction; begin - JSCode(JSName + '.beginLayout();', 'TExtLayoutContainer'); - Result := Self; +procedure TExtPickerMonth.SetFValueTArrayOfInteger(Value : TArrayOfInteger); begin + FValueTArrayOfInteger := Value; + JSCode('value:' + ArrayToJSON(Value)); end; -constructor TExtLayoutContainer.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtPickerMonth.SetFOnCancelclick(Value : TExtPickerMonthOnCancelclick); begin + if Assigned(FOnCancelclick) then + JSCode(JSName+'.events ["cancelclick"].listeners=[];'); + if Assigned(Value) then + AddListener('cancelclick', Ajax('cancelclick', ['This', '%0.nm'], true)); + FOnCancelclick := Value; end; -function TExtLayoutContainer.GetElementTarget : TExtFunction; begin - JSCode(JSName + '.getElementTarget();', 'TExtLayoutContainer'); - Result := Self; +procedure TExtPickerMonth.SetFOnMonthclick(Value : TExtPickerMonthOnMonthclick); begin + if Assigned(FOnMonthclick) then + JSCode(JSName+'.events ["monthclick"].listeners=[];'); + if Assigned(Value) then + AddListener('monthclick', Ajax('monthclick', ['This', '%0.nm','Value', '%1.nm'], true)); + FOnMonthclick := Value; end; -function TExtLayoutContainer.GetLayoutItems : TExtFunction; begin - JSCode(JSName + '.getLayoutItems();', 'TExtLayoutContainer'); - Result := Self; +procedure TExtPickerMonth.SetFOnMonthdblclick(Value : TExtPickerMonthOnMonthdblclick); begin + if Assigned(FOnMonthdblclick) then + JSCode(JSName+'.events ["monthdblclick"].listeners=[];'); + if Assigned(Value) then + AddListener('monthdblclick', Ajax('monthdblclick', ['This', '%0.nm','Value', '%1.nm'], true)); + FOnMonthdblclick := Value; end; -function TExtLayoutContainer.GetRenderTarget : TExtFunction; begin - JSCode(JSName + '.getRenderTarget();', 'TExtLayoutContainer'); - Result := Self; +procedure TExtPickerMonth.SetFOnOkclick(Value : TExtPickerMonthOnOkclick); begin + if Assigned(FOnOkclick) then + JSCode(JSName+'.events ["okclick"].listeners=[];'); + if Assigned(Value) then + AddListener('okclick', Ajax('okclick', ['This', '%0.nm','Value', '%1.nm'], true)); + FOnOkclick := Value; end; -function TExtLayoutContainer.GetTarget : TExtFunction; begin - JSCode(JSName + '.getTarget();', 'TExtLayoutContainer'); - Result := Self; +procedure TExtPickerMonth.SetFOnSelect(Value : TExtPickerMonthOnSelect); begin + if Assigned(FOnSelect) then + JSCode(JSName+'.events ["select"].listeners=[];'); + if Assigned(Value) then + AddListener('select', Ajax('select', ['This', '%0.nm','Value', '%1.nm'], true)); + FOnSelect := Value; end; -function TExtLayoutContainer.RemoveChildEls(TestFn : TExtFunction) : TExtFunction; begin - JSCode(JSName + '.removeChildEls(' + VarToJSON([TestFn, true]) + ');', 'TExtLayoutContainer'); - Result := Self; +procedure TExtPickerMonth.SetFOnYearclick(Value : TExtPickerMonthOnYearclick); begin + if Assigned(FOnYearclick) then + JSCode(JSName+'.events ["yearclick"].listeners=[];'); + if Assigned(Value) then + AddListener('yearclick', Ajax('yearclick', ['This', '%0.nm','Value', '%1.nm'], true)); + FOnYearclick := Value; end; -destructor TExtLayoutContainer.Destroy; begin - try - FOverflowPadderEl.Free; - except end; - inherited; +procedure TExtPickerMonth.SetFOnYeardblclick(Value : TExtPickerMonthOnYeardblclick); begin + if Assigned(FOnYeardblclick) then + JSCode(JSName+'.events ["yeardblclick"].listeners=[];'); + if Assigned(Value) then + AddListener('yeardblclick', Ajax('yeardblclick', ['This', '%0.nm','Value', '%1.nm'], true)); + FOnYeardblclick := Value; end; -function TExtMenuKeyNav.JSClassName : string; begin - Result := 'Ext.menu.KeyNav'; +function TExtPickerMonth.JSClassName : string; begin + Result := 'Ext.picker.Month'; end; -{$IFDEF FPC}constructor TExtMenuKeyNav.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtPickerMonth.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtUtilLruCache.SetFMaxSize(Value : Integer); begin - FMaxSize := Value; - JSCode('maxSize:' + VarToJSON([Value])); +function TExtPickerMonth.AdjustYear(Offset : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.adjustYear(' + VarToJSON([Offset]) + ');', 'TExtPickerMonth'); + Result := Self; end; -function TExtUtilLruCache.JSClassName : string; begin - Result := 'Ext.util.LruCache'; +function TExtPickerMonth.GetValue : TExtFunction; begin + JSCode(JSName + '.getValue();', 'TExtPickerMonth'); + Result := Self; end; -{$IFDEF FPC}constructor TExtUtilLruCache.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtUtilLruCache.Clone : TExtFunction; begin - JSCode(JSName + '.clone();', 'TExtUtilLruCache'); +function TExtPickerMonth.HasSelection : TExtFunction; begin + JSCode(JSName + '.hasSelection();', 'TExtPickerMonth'); Result := Self; end; -function TExtUtilLruCache.Each(Fn : TExtFunction; Scope : TExtObject; Reverse : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.each(' + VarToJSON([Fn, true, Scope, false, Reverse]) + ');', 'TExtUtilLruCache'); +function TExtPickerMonth.SetValue(Value : TArrayOfInteger) : TExtFunction; begin + JSCode(JSName + '.setValue(' + VarToJSON([Value]) + ');', 'TExtPickerMonth'); Result := Self; end; -function TExtUtilLruCache.Prune : TExtFunction; begin - JSCode(JSName + '.prune();', 'TExtUtilLruCache'); - Result := Self; +procedure TExtPickerMonth.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'cancelclick') and Assigned(FOnCancelclick) then + FOnCancelclick(TExtPickerMonth(ParamAsObject('This'))) + else if (AEvtName = 'monthclick') and Assigned(FOnMonthclick) then + FOnMonthclick(TExtPickerMonth(ParamAsObject('This')), TExtObjectList(ParamAsObject('Value'))) + else if (AEvtName = 'monthdblclick') and Assigned(FOnMonthdblclick) then + FOnMonthdblclick(TExtPickerMonth(ParamAsObject('This')), TExtObjectList(ParamAsObject('Value'))) + else if (AEvtName = 'okclick') and Assigned(FOnOkclick) then + FOnOkclick(TExtPickerMonth(ParamAsObject('This')), TExtObjectList(ParamAsObject('Value'))) + else if (AEvtName = 'select') and Assigned(FOnSelect) then + FOnSelect(TExtPickerMonth(ParamAsObject('This')), TExtObjectList(ParamAsObject('Value'))) + else if (AEvtName = 'yearclick') and Assigned(FOnYearclick) then + FOnYearclick(TExtPickerMonth(ParamAsObject('This')), TExtObjectList(ParamAsObject('Value'))) + else if (AEvtName = 'yeardblclick') and Assigned(FOnYeardblclick) then + FOnYeardblclick(TExtPickerMonth(ParamAsObject('This')), TExtObjectList(ParamAsObject('Value'))); end; procedure TExtButton.SetFAllowDepress(Value : Boolean); begin @@ -28105,6 +29250,11 @@ procedure TExtButton.SetFDestroyMenu(Value : Boolean); begin procedure TExtButton.SetFDisabled(Value : Boolean); begin FDisabled := Value; + JSCode(JSName + '.disabled=' + VarToJSON([Value]) + ';'); +end; + +procedure TExtButton.SetFDisabled_(Value : Boolean); begin + FDisabled_ := Value; JSCode('disabled:' + VarToJSON([Value])); end; @@ -28146,6 +29296,11 @@ procedure TExtButton.SetFHandler(Value : TExtFunction); begin procedure TExtButton.SetFHidden(Value : Boolean); begin FHidden := Value; + JSCode(JSName + '.hidden=' + VarToJSON([Value]) + ';'); +end; + +procedure TExtButton.SetFHidden_(Value : Boolean); begin + FHidden_ := Value; JSCode('hidden:' + VarToJSON([Value])); end; @@ -28183,6 +29338,11 @@ procedure TExtButton.SetFIconCls(Value : String); begin JSCode('iconCls:' + VarToJSON([Value])); end; +procedure TExtButton.SetFIsAction(Value : Boolean); begin + FIsAction := Value; + JSCode(JSName + '.isAction=' + VarToJSON([Value]) + ';'); +end; + procedure TExtButton.SetFMenu(Value : TExtMenu); begin FMenu := Value; Value.DeleteFromGarbage; @@ -28242,6 +29402,11 @@ procedure TExtButton.SetFParams(Value : TExtObject); begin procedure TExtButton.SetFPressed(Value : Boolean); begin FPressed := Value; + JSCode(JSName + '.pressed=' + VarToJSON([Value]) + ';'); +end; + +procedure TExtButton.SetFPressed_(Value : Boolean); begin + FPressed_ := Value; JSCode('pressed:' + VarToJSON([Value])); end; @@ -28287,6 +29452,12 @@ procedure TExtButton.SetFTabIndex(Value : Integer); begin JSCode('tabIndex:' + VarToJSON([Value])); end; +procedure TExtButton.SetFTemplate(Value : TExtTemplate); begin + FTemplate := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.template=' + VarToJSON([Value, false]) + ';'); +end; + procedure TExtButton.SetFText(Value : String); begin FText := Value; if not ConfigAvailable(JSName) then @@ -28438,384 +29609,143 @@ procedure TExtButton.InitDefaults; begin FParams := TExtObject.CreateInternal(Self, 'params'); FRepeatJSObject := TExtObject.CreateInternal(Self, 'repeatJS'); FScope := TExtObject.CreateInternal(Self, 'scope'); + FTemplate := TExtTemplate.CreateInternal(Self, 'template'); FTooltipObject := TExtObject.CreateInternal(Self, 'tooltip'); end; -{$IFDEF FPC}constructor TExtButton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtButton.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; -end; - -function TExtButton.GetTemplateArgs : TExtFunction; begin - JSCode(JSName + '.getTemplateArgs();', 'TExtButton'); - Result := Self; -end; - -function TExtButton.GetText : TExtFunction; begin - JSCode(JSName + '.getText();', 'TExtButton'); - Result := Self; -end; - -function TExtButton.HasVisibleMenu : TExtFunction; begin - JSCode(JSName + '.hasVisibleMenu();', 'TExtButton'); - Result := Self; -end; - -function TExtButton.HideMenu : TExtFunction; begin - JSCode(JSName + '.hideMenu();', 'TExtButton'); - Result := Self; -end; - -function TExtButton.SetGlyph(Glyph : Integer) : TExtFunction; begin - JSCode(JSName + '.setGlyph(' + VarToJSON([Glyph]) + ');', 'TExtButton'); - Result := Self; -end; - -function TExtButton.SetHandler(Handler : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.setHandler(' + VarToJSON([Handler, true, Scope, false]) + ');', 'TExtButton'); - Result := Self; -end; - -function TExtButton.SetHref(Href : String) : TExtFunction; begin - JSCode(JSName + '.setHref(' + VarToJSON([Href]) + ');', 'TExtButton'); - Result := Self; -end; - -function TExtButton.SetIcon(Icon : String) : TExtFunction; begin - JSCode(JSName + '.setIcon(' + VarToJSON([Icon]) + ');', 'TExtButton'); - Result := Self; -end; - -function TExtButton.SetIconCls(Cls : String) : TExtFunction; begin - JSCode(JSName + '.setIconCls(' + VarToJSON([Cls]) + ');', 'TExtButton'); - Result := Self; -end; - -function TExtButton.SetParams(Params : TExtObject) : TExtFunction; begin - JSCode(JSName + '.setParams(' + VarToJSON([Params, false]) + ');', 'TExtButton'); - Result := Self; -end; - -function TExtButton.SetScale(Scale : String) : TExtFunction; begin - JSCode(JSName + '.setScale(' + VarToJSON([Scale]) + ');', 'TExtButton'); - Result := Self; -end; - -function TExtButton.SetText(Text : String) : TExtFunction; begin - JSCode(JSName + '.setText(' + VarToJSON([Text]) + ');', 'TExtButton'); - Result := Self; -end; - -function TExtButton.SetTextAlign(Align : String) : TExtFunction; begin - JSCode(JSName + '.setTextAlign(' + VarToJSON([Align]) + ');', 'TExtButton'); - Result := Self; -end; - -function TExtButton.SetTooltip(Tooltip : String) : TExtFunction; begin - JSCode(JSName + '.setTooltip(' + VarToJSON([Tooltip]) + ');', 'TExtButton'); - Result := Self; -end; - -function TExtButton.ShowMenu : TExtFunction; begin - JSCode(JSName + '.showMenu();', 'TExtButton'); - Result := Self; -end; - -function TExtButton.Toggle(State : Boolean = false; SuppressEvent : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.toggle(' + VarToJSON([State, SuppressEvent]) + ');', 'TExtButton'); - Result := Self; -end; - -destructor TExtButton.Destroy; begin - try - FBaseParams.Free; - FMenu.Free; - FMenu_.Free; - FMenuObject.Free; - FParams.Free; - FRepeatJSObject.Free; - FScope.Free; - FTooltipObject.Free; - except end; - inherited; -end; - -procedure TExtButton.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'click') and Assigned(FOnClick) then - FOnClick(TExtButton(ParamAsObject('This')), TExtDirectEvent(ParamAsObject('E'))) - else if (AEvtName = 'glyphchange') and Assigned(FOnGlyphchange) then - FOnGlyphchange(TExtButton(ParamAsObject('This')), ParamAsInteger('NewGlyph'), ParamAsInteger('OldGlyph')) - else if (AEvtName = 'iconchange') and Assigned(FOnIconchange) then - FOnIconchange(TExtButton(ParamAsObject('This')), ParamAsString('OldIcon'), ParamAsString('NewIcon')) - else if (AEvtName = 'menuhide') and Assigned(FOnMenuhide) then - FOnMenuhide(TExtButton(ParamAsObject('This')), TExtMenu(ParamAsObject('Menu'))) - else if (AEvtName = 'menushow') and Assigned(FOnMenushow) then - FOnMenushow(TExtButton(ParamAsObject('This')), TExtMenu(ParamAsObject('Menu'))) - else if (AEvtName = 'menutriggerout') and Assigned(FOnMenutriggerout) then - FOnMenutriggerout(TExtButton(ParamAsObject('This')), TExtMenu(ParamAsObject('Menu')), TExtDirectEvent(ParamAsObject('E'))) - else if (AEvtName = 'menutriggerover') and Assigned(FOnMenutriggerover) then - FOnMenutriggerover(TExtButton(ParamAsObject('This')), TExtMenu(ParamAsObject('Menu')), TExtDirectEvent(ParamAsObject('E'))) - else if (AEvtName = 'mouseout') and Assigned(FOnMouseout) then - FOnMouseout(TExtButton(ParamAsObject('This')), TExtDirectEvent(ParamAsObject('E'))) - else if (AEvtName = 'mouseover') and Assigned(FOnMouseover) then - FOnMouseover(TExtButton(ParamAsObject('This')), TExtDirectEvent(ParamAsObject('E'))) - else if (AEvtName = 'textchange') and Assigned(FOnTextchange) then - FOnTextchange(TExtButton(ParamAsObject('This')), ParamAsString('OldText'), ParamAsString('NewText')) - else if (AEvtName = 'toggle') and Assigned(FOnToggle) then - FOnToggle(TExtButton(ParamAsObject('This')), ParamAsBoolean('Pressed')); -end; - -procedure TExtChartSeriesPie.SetFAngleField(Value : String); begin - FAngleField := Value; - JSCode('angleField:' + VarToJSON([Value])); -end; - -procedure TExtChartSeriesPie.SetFColorSet(Value : TExtObjectList); begin - FColorSet := Value; - Value.DeleteFromGarbage; - JSCode('colorSet:' + VarToJSON([Value, false])); -end; - -procedure TExtChartSeriesPie.SetFDonut(Value : Boolean); begin - FDonut := Value; - JSCode('donut:' + VarToJSON([Value])); -end; - -procedure TExtChartSeriesPie.SetFDonutInteger(Value : Integer); begin - FDonutInteger := Value; - JSCode('donut:' + VarToJSON([Value])); -end; - -procedure TExtChartSeriesPie.SetFField(Value : String); begin - FField := Value; - JSCode('field:' + VarToJSON([Value])); -end; - -procedure TExtChartSeriesPie.SetFHighlightDuration(Value : Integer); begin - FHighlightDuration := Value; - JSCode('highlightDuration:' + VarToJSON([Value])); -end; - -procedure TExtChartSeriesPie.SetFLengthField(Value : String); begin - FLengthField := Value; - JSCode('lengthField:' + VarToJSON([Value])); -end; - -procedure TExtChartSeriesPie.SetFShowInLegend(Value : Boolean); begin - FShowInLegend := Value; - JSCode('showInLegend:' + VarToJSON([Value])); -end; - -procedure TExtChartSeriesPie.SetFStyle(Value : TExtObject); begin - FStyle := Value; - Value.DeleteFromGarbage; - JSCode('style:' + VarToJSON([Value, false])); -end; - -procedure TExtChartSeriesPie.SetFXField(Value : String); begin - FXField := Value; - JSCode('xField:' + VarToJSON([Value])); -end; - -function TExtChartSeriesPie.JSClassName : string; begin - Result := 'Ext.chart.series.Pie'; -end; - -procedure TExtChartSeriesPie.InitDefaults; begin - inherited; - FColorSet := TExtObjectList.Create(Self, 'colorSet'); - FStyle := TExtObject.CreateInternal(Self, 'style'); -end; - -{$IFDEF FPC}constructor TExtChartSeriesPie.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtChartSeriesPie.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; -end; - -function TExtChartSeriesPie.DrawSeries : TExtFunction; begin - JSCode(JSName + '.drawSeries();', 'TExtChartSeriesPie'); - Result := Self; -end; - -function TExtChartSeriesPie.GetLegendColor(Info : TExtObject) : TExtFunction; begin - JSCode(JSName + '.getLegendColor(' + VarToJSON([Info, false]) + ');', 'TExtChartSeriesPie'); - Result := Self; -end; - -function TExtChartSeriesPie.HighlightItem(Info : TExtObject) : TExtFunction; begin - JSCode(JSName + '.highlightItem(' + VarToJSON([Info, false]) + ');', 'TExtChartSeriesPie'); - Result := Self; -end; - -function TExtChartSeriesPie.UnHighlightItem(Info : TExtObject) : TExtFunction; begin - JSCode(JSName + '.unHighlightItem(' + VarToJSON([Info, false]) + ');', 'TExtChartSeriesPie'); - Result := Self; -end; - -destructor TExtChartSeriesPie.Destroy; begin - try - FColorSet.Free; - FStyle.Free; - except end; - inherited; -end; - -procedure TExtViewBoundListKeyNav.SetFBoundList(Value : TExtViewBoundList); begin - FBoundList := Value; - Value.DeleteFromGarbage; - JSCode('boundList:' + VarToJSON([Value, false])); -end; - -function TExtViewBoundListKeyNav.JSClassName : string; begin - Result := 'Ext.view.BoundListKeyNav'; -end; - -procedure TExtViewBoundListKeyNav.InitDefaults; begin - inherited; - FBoundList := TExtViewBoundList.CreateInternal(Self, 'boundList'); -end; - -{$IFDEF FPC}constructor TExtViewBoundListKeyNav.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtViewBoundListKeyNav.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; -end; - -function TExtViewBoundListKeyNav.HighlightAt(Index : Integer) : TExtFunction; begin - JSCode(JSName + '.highlightAt(' + VarToJSON([Index]) + ');', 'TExtViewBoundListKeyNav'); - Result := Self; -end; - -function TExtViewBoundListKeyNav.SelectHighlighted : TExtFunction; begin - JSCode(JSName + '.selectHighlighted();', 'TExtViewBoundListKeyNav'); - Result := Self; -end; - -destructor TExtViewBoundListKeyNav.Destroy; begin - try - FBoundList.Free; - except end; - inherited; -end; - -procedure TExtChartSeriesRadar.SetFMarkerConfig(Value : TExtObject); begin - FMarkerConfig := Value; - Value.DeleteFromGarbage; - JSCode('markerConfig:' + VarToJSON([Value, false])); -end; - -procedure TExtChartSeriesRadar.SetFShowMarkers(Value : Boolean); begin - FShowMarkers := Value; - JSCode('showMarkers:' + VarToJSON([Value])); -end; - -procedure TExtChartSeriesRadar.SetFStyle(Value : TExtObject); begin - FStyle := Value; - Value.DeleteFromGarbage; - JSCode('style:' + VarToJSON([Value, false])); -end; - -procedure TExtChartSeriesRadar.SetFXField(Value : String); begin - FXField := Value; - JSCode('xField:' + VarToJSON([Value])); -end; - -procedure TExtChartSeriesRadar.SetFYField(Value : String); begin - FYField := Value; - JSCode('yField:' + VarToJSON([Value])); -end; - -function TExtChartSeriesRadar.JSClassName : string; begin - Result := 'Ext.chart.series.Radar'; -end; - -procedure TExtChartSeriesRadar.InitDefaults; begin - inherited; - FMarkerConfig := TExtObject.CreateInternal(Self, 'markerConfig'); - FStyle := TExtObject.CreateInternal(Self, 'style'); -end; - -{$IFDEF FPC}constructor TExtChartSeriesRadar.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtButton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtChartSeriesRadar.Create; begin +constructor TExtButton.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -function TExtChartSeriesRadar.DrawSeries : TExtFunction; begin - JSCode(JSName + '.drawSeries();', 'TExtChartSeriesRadar'); +function TExtButton.GetTemplateArgs : TExtFunction; begin + JSCode(JSName + '.getTemplateArgs();', 'TExtButton'); Result := Self; end; -destructor TExtChartSeriesRadar.Destroy; begin - try - FMarkerConfig.Free; - FStyle.Free; - except end; - inherited; +function TExtButton.GetText : TExtFunction; begin + JSCode(JSName + '.getText();', 'TExtButton'); + Result := Self; end; -procedure TExtModelManagerSingleton.SetFAssociationStack(Value : TExtObjectList); begin - FAssociationStack := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.associationStack=' + VarToJSON([Value, false]) + ';'); +function TExtButton.HasVisibleMenu : TExtFunction; begin + JSCode(JSName + '.hasVisibleMenu();', 'TExtButton'); + Result := Self; end; -function TExtModelManagerSingleton.JSClassName : string; begin - Result := 'Ext.ModelManager'; +function TExtButton.HideMenu : TExtFunction; begin + JSCode(JSName + '.hideMenu();', 'TExtButton'); + Result := Self; end; -procedure TExtModelManagerSingleton.InitDefaults; begin - inherited; - FAssociationStack := TExtObjectList.Create(Self, 'associationStack'); +function TExtButton.SetGlyph(Glyph : Integer) : TExtFunction; begin + JSCode(JSName + '.setGlyph(' + VarToJSON([Glyph]) + ');', 'TExtButton'); + Result := Self; end; -{$IFDEF FPC}constructor TExtModelManagerSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtButton.SetHandler(Handler : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.setHandler(' + VarToJSON([Handler, true, Scope, false]) + ');', 'TExtButton'); + Result := Self; +end; -function TExtModelManagerSingleton.GetModel(Id : String) : TExtFunction; begin - JSCode(JSName + '.getModel(' + VarToJSON([Id]) + ');', 'TExtModelManagerSingleton'); +function TExtButton.SetHref(Href : String) : TExtFunction; begin + JSCode(JSName + '.setHref(' + VarToJSON([Href]) + ');', 'TExtButton'); Result := Self; end; -destructor TExtModelManagerSingleton.Destroy; begin - try - FAssociationStack.Free; - except end; - inherited; +function TExtButton.SetIcon(Icon : String) : TExtFunction; begin + JSCode(JSName + '.setIcon(' + VarToJSON([Icon]) + ');', 'TExtButton'); + Result := Self; end; -procedure TExtGridFeature.SetFIsFeature(Value : Boolean); begin - FIsFeature := Value; - JSCode(JSName + '.isFeature=' + VarToJSON([Value]) + ';'); +function TExtButton.SetIconCls(Cls : String) : TExtFunction; begin + JSCode(JSName + '.setIconCls(' + VarToJSON([Cls]) + ');', 'TExtButton'); + Result := Self; end; -function TExtGridFeature.JSClassName : string; begin - Result := 'Ext.grid.feature.Feature'; +function TExtButton.SetParams(Params : TExtObject) : TExtFunction; begin + JSCode(JSName + '.setParams(' + VarToJSON([Params, false]) + ');', 'TExtButton'); + Result := Self; end; -{$IFDEF FPC}constructor TExtGridFeature.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtButton.SetScale(Scale : String) : TExtFunction; begin + JSCode(JSName + '.setScale(' + VarToJSON([Scale]) + ');', 'TExtButton'); + Result := Self; +end; -function TExtGridFeature.Disable : TExtFunction; begin - JSCode(JSName + '.disable();', 'TExtGridFeature'); +function TExtButton.SetText(Text : String) : TExtFunction; begin + JSCode(JSName + '.setText(' + VarToJSON([Text]) + ');', 'TExtButton'); Result := Self; end; -function TExtGridFeature.Enable : TExtFunction; begin - JSCode(JSName + '.enable();', 'TExtGridFeature'); +function TExtButton.SetTextAlign(Align : String) : TExtFunction; begin + JSCode(JSName + '.setTextAlign(' + VarToJSON([Align]) + ');', 'TExtButton'); Result := Self; end; -function TExtChartMaskLayer.JSClassName : string; begin - Result := 'Ext.chart.MaskLayer'; +function TExtButton.SetTooltip(Tooltip : String) : TExtFunction; begin + JSCode(JSName + '.setTooltip(' + VarToJSON([Tooltip]) + ');', 'TExtButton'); + Result := Self; end; -{$IFDEF FPC}constructor TExtChartMaskLayer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtButton.ShowMenu : TExtFunction; begin + JSCode(JSName + '.showMenu();', 'TExtButton'); + Result := Self; +end; + +function TExtButton.Toggle(State : Boolean = false; SuppressEvent : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.toggle(' + VarToJSON([State, SuppressEvent]) + ');', 'TExtButton'); + Result := Self; +end; + +destructor TExtButton.Destroy; begin + try + FBaseParams.Free; + FMenu.Free; + FMenu_.Free; + FMenuObject.Free; + FParams.Free; + FRepeatJSObject.Free; + FScope.Free; + FTemplate.Free; + FTooltipObject.Free; + except end; + inherited; +end; + +procedure TExtButton.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'click') and Assigned(FOnClick) then + FOnClick(TExtButton(ParamAsObject('This')), TExtDirectEvent(ParamAsObject('E'))) + else if (AEvtName = 'glyphchange') and Assigned(FOnGlyphchange) then + FOnGlyphchange(TExtButton(ParamAsObject('This')), ParamAsInteger('NewGlyph'), ParamAsInteger('OldGlyph')) + else if (AEvtName = 'iconchange') and Assigned(FOnIconchange) then + FOnIconchange(TExtButton(ParamAsObject('This')), ParamAsString('OldIcon'), ParamAsString('NewIcon')) + else if (AEvtName = 'menuhide') and Assigned(FOnMenuhide) then + FOnMenuhide(TExtButton(ParamAsObject('This')), TExtMenu(ParamAsObject('Menu'))) + else if (AEvtName = 'menushow') and Assigned(FOnMenushow) then + FOnMenushow(TExtButton(ParamAsObject('This')), TExtMenu(ParamAsObject('Menu'))) + else if (AEvtName = 'menutriggerout') and Assigned(FOnMenutriggerout) then + FOnMenutriggerout(TExtButton(ParamAsObject('This')), TExtMenu(ParamAsObject('Menu')), TExtDirectEvent(ParamAsObject('E'))) + else if (AEvtName = 'menutriggerover') and Assigned(FOnMenutriggerover) then + FOnMenutriggerover(TExtButton(ParamAsObject('This')), TExtMenu(ParamAsObject('Menu')), TExtDirectEvent(ParamAsObject('E'))) + else if (AEvtName = 'mouseout') and Assigned(FOnMouseout) then + FOnMouseout(TExtButton(ParamAsObject('This')), TExtDirectEvent(ParamAsObject('E'))) + else if (AEvtName = 'mouseover') and Assigned(FOnMouseover) then + FOnMouseover(TExtButton(ParamAsObject('This')), TExtDirectEvent(ParamAsObject('E'))) + else if (AEvtName = 'textchange') and Assigned(FOnTextchange) then + FOnTextchange(TExtButton(ParamAsObject('This')), ParamAsString('OldText'), ParamAsString('NewText')) + else if (AEvtName = 'toggle') and Assigned(FOnToggle) then + FOnToggle(TExtButton(ParamAsObject('This')), ParamAsBoolean('Pressed')); +end; + +function TExtGridFeatureGroupStore.JSClassName : string; begin + Result := 'Ext.grid.feature.GroupStore'; +end; + +{$IFDEF FPC}constructor TExtGridFeatureGroupStore.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} procedure TExtViewAbstractView.SetFBlockRefresh(Value : Boolean); begin FBlockRefresh := Value; @@ -29078,481 +30008,794 @@ function TExtViewAbstractView.IsSelected(Node : Integer) : TExtFunction; begin Result := Self; end; -function TExtViewAbstractView.PrepareData(Data : TExtObject; RecordIndex : Integer; RecordJS : TExtDataModel) : TExtFunction; begin - JSCode(JSName + '.prepareData(' + VarToJSON([Data, false, RecordIndex, RecordJS, false]) + ');', 'TExtViewAbstractView'); +function TExtViewAbstractView.PrepareData(Data : TExtObject; RecordIndex : Integer; RecordJS : TExtDataModel) : TExtFunction; begin + JSCode(JSName + '.prepareData(' + VarToJSON([Data, false, RecordIndex, RecordJS, false]) + ');', 'TExtViewAbstractView'); + Result := Self; +end; + +function TExtViewAbstractView.Refresh : TExtFunction; begin + JSCode(JSName + '.refresh();', 'TExtViewAbstractView'); + Result := Self; +end; + +function TExtViewAbstractView.RefreshNode(Index : Integer) : TExtFunction; begin + JSCode(JSName + '.refreshNode(' + VarToJSON([Index]) + ');', 'TExtViewAbstractView'); + Result := Self; +end; + +destructor TExtViewAbstractView.Destroy; begin + try + FItemTplList.Free; + FItemTplTemplate.Free; + FLoadMaskObject.Free; + FStore.Free; + FTplList.Free; + FTplTemplate.Free; + except end; + inherited; +end; + +procedure TExtViewAbstractView.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'beforerefresh') and Assigned(FOnBeforerefresh) then + FOnBeforerefresh(TExtViewAbstractView(ParamAsObject('This'))) + else if (AEvtName = 'itemadd') and Assigned(FOnItemadd) then + FOnItemadd(TExtObjectList(ParamAsObject('Records')), ParamAsInteger('Index'), TExtObjectList(ParamAsObject('Node'))) + else if (AEvtName = 'itemremove') and Assigned(FOnItemremove) then + FOnItemremove(TExtDataModel(ParamAsObject('RecordJS')), ParamAsInteger('Index')) + else if (AEvtName = 'itemupdate') and Assigned(FOnItemupdate) then + FOnItemupdate(TExtDataModel(ParamAsObject('RecordJS')), ParamAsInteger('Index'), THTMLElement(ParamAsObject('Node'))) + else if (AEvtName = 'refresh') and Assigned(FOnRefresh) then + FOnRefresh(TExtViewAbstractView(ParamAsObject('This'))) + else if (AEvtName = 'viewready') and Assigned(FOnViewready) then + FOnViewready(TExtViewAbstractView(ParamAsObject('This'))); +end; + +procedure TExtGridFeature.SetFIsFeature(Value : Boolean); begin + FIsFeature := Value; + JSCode(JSName + '.isFeature=' + VarToJSON([Value]) + ';'); +end; + +function TExtGridFeature.JSClassName : string; begin + Result := 'Ext.grid.feature.Feature'; +end; + +{$IFDEF FPC}constructor TExtGridFeature.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtGridFeature.Disable : TExtFunction; begin + JSCode(JSName + '.disable();', 'TExtGridFeature'); + Result := Self; +end; + +function TExtGridFeature.Enable : TExtFunction; begin + JSCode(JSName + '.enable();', 'TExtGridFeature'); + Result := Self; +end; + +procedure TExtChartSeriesRadar.SetFMarkerConfig(Value : TExtObject); begin + FMarkerConfig := Value; + Value.DeleteFromGarbage; + JSCode('markerConfig:' + VarToJSON([Value, false])); +end; + +procedure TExtChartSeriesRadar.SetFShowMarkers(Value : Boolean); begin + FShowMarkers := Value; + JSCode('showMarkers:' + VarToJSON([Value])); +end; + +procedure TExtChartSeriesRadar.SetFStyle(Value : TExtObject); begin + FStyle := Value; + Value.DeleteFromGarbage; + JSCode('style:' + VarToJSON([Value, false])); +end; + +procedure TExtChartSeriesRadar.SetFXField(Value : String); begin + FXField := Value; + JSCode('xField:' + VarToJSON([Value])); +end; + +procedure TExtChartSeriesRadar.SetFYField(Value : String); begin + FYField := Value; + JSCode('yField:' + VarToJSON([Value])); +end; + +function TExtChartSeriesRadar.JSClassName : string; begin + Result := 'Ext.chart.series.Radar'; +end; + +procedure TExtChartSeriesRadar.InitDefaults; begin + inherited; + FMarkerConfig := TExtObject.CreateInternal(Self, 'markerConfig'); + FStyle := TExtObject.CreateInternal(Self, 'style'); +end; + +{$IFDEF FPC}constructor TExtChartSeriesRadar.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtChartSeriesRadar.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; +end; + +function TExtChartSeriesRadar.DrawSeries : TExtFunction; begin + JSCode(JSName + '.drawSeries();', 'TExtChartSeriesRadar'); + Result := Self; +end; + +destructor TExtChartSeriesRadar.Destroy; begin + try + FMarkerConfig.Free; + FStyle.Free; + except end; + inherited; +end; + +procedure TExtPickerDate.SetFAriaTitle(Value : String); begin + FAriaTitle := Value; + JSCode('ariaTitle:' + VarToJSON([Value])); +end; + +procedure TExtPickerDate.SetFAriaTitleDateFormat(Value : String); begin + FAriaTitleDateFormat := Value; + JSCode('ariaTitleDateFormat:' + VarToJSON([Value])); +end; + +procedure TExtPickerDate.SetFBaseCls(Value : String); begin + FBaseCls := Value; + JSCode('baseCls:' + VarToJSON([Value])); +end; + +procedure TExtPickerDate.SetFDayNames(Value : TExtObjectList); begin + FDayNames := Value; + Value.DeleteFromGarbage; + JSCode('dayNames:' + VarToJSON([Value, false])); +end; + +procedure TExtPickerDate.SetFDisableAnim(Value : Boolean); begin + FDisableAnim := Value; + JSCode('disableAnim:' + VarToJSON([Value])); +end; + +procedure TExtPickerDate.SetFDisabledCellCls(Value : String); begin + FDisabledCellCls := Value; + JSCode('disabledCellCls:' + VarToJSON([Value])); +end; + +procedure TExtPickerDate.SetFDisabledDates(Value : TExtObjectList); begin + FDisabledDates := Value; + Value.DeleteFromGarbage; + if not ConfigAvailable(JSName) then + SetDisabledDates(Value) + else + JSCode('disabledDates:' + VarToJSON([Value, false])); +end; + +procedure TExtPickerDate.SetFDisabledDatesRE(Value : TRegExp); begin + FDisabledDatesRE := Value; + JSCode('disabledDatesRE:' + VarToJSON([#3 +Value])); +end; + +procedure TExtPickerDate.SetFDisabledDatesText(Value : String); begin + FDisabledDatesText := Value; + JSCode('disabledDatesText:' + VarToJSON([Value])); +end; + +procedure TExtPickerDate.SetFDisabledDays(Value : TArrayOfInteger); begin + FDisabledDays := Value; + if not ConfigAvailable(JSName) then + SetDisabledDays(Value) + else + JSCode('disabledDays:' + ArrayToJSON(Value)); +end; + +procedure TExtPickerDate.SetFDisabledDaysText(Value : String); begin + FDisabledDaysText := Value; + JSCode('disabledDaysText:' + VarToJSON([Value])); +end; + +procedure TExtPickerDate.SetFFocusOnShow(Value : Boolean); begin + FFocusOnShow := Value; + JSCode('focusOnShow:' + VarToJSON([Value])); +end; + +procedure TExtPickerDate.SetFFormat(Value : String); begin + FFormat := Value; + JSCode('format:' + VarToJSON([Value])); +end; + +procedure TExtPickerDate.SetFHandler(Value : TExtFunction); begin + FHandler := Value; + JSCode('handler:' + VarToJSON([Value, true])); +end; + +procedure TExtPickerDate.SetFKeyNavConfig(Value : TExtObject); begin + FKeyNavConfig := Value; + Value.DeleteFromGarbage; + JSCode('keyNavConfig:' + VarToJSON([Value, false])); +end; + +procedure TExtPickerDate.SetFLongDayFormat(Value : String); begin + FLongDayFormat := Value; + JSCode('longDayFormat:' + VarToJSON([Value])); +end; + +procedure TExtPickerDate.SetFMaxDate(Value : TDateTime); begin + FMaxDate := Value; + if not ConfigAvailable(JSName) then + SetMaxDate(Value) + else + JSCode('maxDate:' + VarToJSON([Value])); +end; + +procedure TExtPickerDate.SetFMaxText(Value : String); begin + FMaxText := Value; + JSCode('maxText:' + VarToJSON([Value])); +end; + +procedure TExtPickerDate.SetFMinDate(Value : TDateTime); begin + FMinDate := Value; + if not ConfigAvailable(JSName) then + SetMinDate(Value) + else + JSCode('minDate:' + VarToJSON([Value])); +end; + +procedure TExtPickerDate.SetFMinText(Value : String); begin + FMinText := Value; + JSCode('minText:' + VarToJSON([Value])); +end; + +procedure TExtPickerDate.SetFMonthNames(Value : TExtObjectList); begin + FMonthNames := Value; + Value.DeleteFromGarbage; + JSCode('monthNames:' + VarToJSON([Value, false])); +end; + +procedure TExtPickerDate.SetFMonthYearFormat(Value : String); begin + FMonthYearFormat := Value; + JSCode('monthYearFormat:' + VarToJSON([Value])); +end; + +procedure TExtPickerDate.SetFMonthYearText(Value : String); begin + FMonthYearText := Value; + JSCode('monthYearText:' + VarToJSON([Value])); +end; + +procedure TExtPickerDate.SetFNextText(Value : String); begin + FNextText := Value; + JSCode('nextText:' + VarToJSON([Value])); +end; + +procedure TExtPickerDate.SetFPrevText(Value : String); begin + FPrevText := Value; + JSCode('prevText:' + VarToJSON([Value])); +end; + +procedure TExtPickerDate.SetFScope(Value : TExtObject); begin + FScope := Value; + Value.DeleteFromGarbage; + JSCode('scope:' + VarToJSON([Value, false])); +end; + +procedure TExtPickerDate.SetFSelectedCls(Value : String); begin + FSelectedCls := Value; + JSCode('selectedCls:' + VarToJSON([Value])); +end; + +procedure TExtPickerDate.SetFShowToday(Value : Boolean); begin + FShowToday := Value; + JSCode('showToday:' + VarToJSON([Value])); +end; + +procedure TExtPickerDate.SetFStartDay(Value : Integer); begin + FStartDay := Value; + JSCode('startDay:' + VarToJSON([Value])); +end; + +procedure TExtPickerDate.SetFTodayText(Value : String); begin + FTodayText := Value; + JSCode('todayText:' + VarToJSON([Value])); +end; + +procedure TExtPickerDate.SetFTodayTip(Value : String); begin + FTodayTip := Value; + JSCode('todayTip:' + VarToJSON([Value])); +end; + +procedure TExtPickerDate.SetFOnSelect(Value : TExtPickerDateOnSelect); begin + if Assigned(FOnSelect) then + JSCode(JSName+'.events ["select"].listeners=[];'); + if Assigned(Value) then + AddListener('select', Ajax('select', ['This', '%0.nm','Date', '%1'], true)); + FOnSelect := Value; +end; + +function TExtPickerDate.JSClassName : string; begin + Result := 'Ext.picker.Date'; +end; + +procedure TExtPickerDate.InitDefaults; begin + inherited; + FDayNames := TExtObjectList.Create(Self, 'dayNames'); + FDisabledDates := TExtObjectList.Create(Self, 'disabledDates'); + FKeyNavConfig := TExtObject.CreateInternal(Self, 'keyNavConfig'); + FMonthNames := TExtObjectList.Create(Self, 'monthNames'); + FScope := TExtObject.CreateInternal(Self, 'scope'); + FStartDay := 0; +end; + +{$IFDEF FPC}constructor TExtPickerDate.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtPickerDate.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; +end; + +function TExtPickerDate.GetDayInitial : TExtFunction; begin + JSCode(JSName + '.getDayInitial();', 'TExtPickerDate'); + Result := Self; +end; + +function TExtPickerDate.GetValue : TExtFunction; begin + JSCode(JSName + '.getValue();', 'TExtPickerDate'); + Result := Self; +end; + +function TExtPickerDate.HideMonthPicker(Animate : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.hideMonthPicker(' + VarToJSON([Animate]) + ');', 'TExtPickerDate'); + Result := Self; +end; + +function TExtPickerDate.SelectToday : TExtFunction; begin + JSCode(JSName + '.selectToday();', 'TExtPickerDate'); + Result := Self; +end; + +function TExtPickerDate.SetDisabledDates(DisabledDates : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.setDisabledDates(' + VarToJSON(DisabledDates) + ');', 'TExtPickerDate'); + Result := Self; +end; + +function TExtPickerDate.SetDisabledDays(DisabledDays : TArrayOfInteger) : TExtFunction; begin + JSCode(JSName + '.setDisabledDays(' + VarToJSON([DisabledDays]) + ');', 'TExtPickerDate'); + Result := Self; +end; + +function TExtPickerDate.SetMaxDate(Value : TDateTime) : TExtFunction; begin + JSCode(JSName + '.setMaxDate(' + VarToJSON([Value]) + ');', 'TExtPickerDate'); + Result := Self; +end; + +function TExtPickerDate.SetMinDate(Value : TDateTime) : TExtFunction; begin + JSCode(JSName + '.setMinDate(' + VarToJSON([Value]) + ');', 'TExtPickerDate'); + Result := Self; +end; + +function TExtPickerDate.SetValue(Value : TDateTime) : TExtFunction; begin + JSCode(JSName + '.setValue(' + VarToJSON([Value]) + ');', 'TExtPickerDate'); + Result := Self; +end; + +function TExtPickerDate.ShowMonthPicker(Animate : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.showMonthPicker(' + VarToJSON([Animate]) + ');', 'TExtPickerDate'); + Result := Self; +end; + +function TExtPickerDate.ShowNextMonth(E : TExtObject) : TExtFunction; begin + JSCode(JSName + '.showNextMonth(' + VarToJSON([E, false]) + ');', 'TExtPickerDate'); + Result := Self; +end; + +function TExtPickerDate.ShowNextYear : TExtFunction; begin + JSCode(JSName + '.showNextYear();', 'TExtPickerDate'); Result := Self; end; -function TExtViewAbstractView.Refresh : TExtFunction; begin - JSCode(JSName + '.refresh();', 'TExtViewAbstractView'); +function TExtPickerDate.ShowPrevMonth(E : TExtObject) : TExtFunction; begin + JSCode(JSName + '.showPrevMonth(' + VarToJSON([E, false]) + ');', 'TExtPickerDate'); Result := Self; end; -function TExtViewAbstractView.RefreshNode(Index : Integer) : TExtFunction; begin - JSCode(JSName + '.refreshNode(' + VarToJSON([Index]) + ');', 'TExtViewAbstractView'); +function TExtPickerDate.ShowPrevYear : TExtFunction; begin + JSCode(JSName + '.showPrevYear();', 'TExtPickerDate'); Result := Self; end; -destructor TExtViewAbstractView.Destroy; begin +destructor TExtPickerDate.Destroy; begin try - FItemTplList.Free; - FItemTplTemplate.Free; - FLoadMaskObject.Free; - FStore.Free; - FTplList.Free; - FTplTemplate.Free; + FDayNames.Free; + FDisabledDates.Free; + FKeyNavConfig.Free; + FMonthNames.Free; + FScope.Free; except end; inherited; end; -procedure TExtViewAbstractView.HandleEvent(const AEvtName : string); begin +procedure TExtPickerDate.HandleEvent(const AEvtName : string); begin inherited; - if (AEvtName = 'beforerefresh') and Assigned(FOnBeforerefresh) then - FOnBeforerefresh(TExtViewAbstractView(ParamAsObject('This'))) - else if (AEvtName = 'itemadd') and Assigned(FOnItemadd) then - FOnItemadd(TExtObjectList(ParamAsObject('Records')), ParamAsInteger('Index'), TExtObjectList(ParamAsObject('Node'))) - else if (AEvtName = 'itemremove') and Assigned(FOnItemremove) then - FOnItemremove(TExtDataModel(ParamAsObject('RecordJS')), ParamAsInteger('Index')) - else if (AEvtName = 'itemupdate') and Assigned(FOnItemupdate) then - FOnItemupdate(TExtDataModel(ParamAsObject('RecordJS')), ParamAsInteger('Index'), THTMLElement(ParamAsObject('Node'))) - else if (AEvtName = 'refresh') and Assigned(FOnRefresh) then - FOnRefresh(TExtViewAbstractView(ParamAsObject('This'))) - else if (AEvtName = 'viewready') and Assigned(FOnViewready) then - FOnViewready(TExtViewAbstractView(ParamAsObject('This'))); -end; - -function TExtStateLocalStorageProvider.JSClassName : string; begin - Result := 'Ext.state.LocalStorageProvider'; -end; - -{$IFDEF FPC}constructor TExtStateLocalStorageProvider.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtUtilTaskManagerSingleton.JSClassName : string; begin - Result := 'Ext.util.TaskManager'; + if (AEvtName = 'select') and Assigned(FOnSelect) then + FOnSelect(TExtPickerDate(ParamAsObject('This')), ParamAsTDateTime('Date')); end; -{$IFDEF FPC}constructor TExtUtilTaskManagerSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtChartAxisGauge.SetFMargin(Value : Integer); begin - FMargin := Value; - JSCode('margin:' + VarToJSON([Value])); +function TExtDrawEngineVml.JSClassName : string; begin + Result := 'Ext.draw.engine.Vml'; end; -procedure TExtChartAxisGauge.SetFMaximum(Value : Integer); begin - FMaximum := Value; - JSCode('maximum:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtDrawEngineVml.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtChartAxisGauge.SetFMinimum(Value : Integer); begin - FMinimum := Value; - JSCode('minimum:' + VarToJSON([Value])); +function TExtDrawEngineVml.AddGradient(Gradient : TExtObject) : TExtFunction; begin + JSCode(JSName + '.addGradient(' + VarToJSON([Gradient, false]) + ');', 'TExtDrawEngineVml'); + Result := Self; end; -procedure TExtChartAxisGauge.SetFSteps(Value : Integer); begin - FSteps := Value; - JSCode('steps:' + VarToJSON([Value])); +procedure TExtPanelTool.SetFHandler(Value : TExtFunction); begin + FHandler := Value; + JSCode('handler:' + VarToJSON([Value, true])); end; -procedure TExtChartAxisGauge.SetFTitle(Value : String); begin - FTitle := Value; - if not ConfigAvailable(JSName) then - SetTitle(Value) - else - JSCode('title:' + VarToJSON([Value])); +procedure TExtPanelTool.SetFIsTool(Value : Boolean); begin + FIsTool := Value; + JSCode(JSName + '.isTool=' + VarToJSON([Value]) + ';'); end; -function TExtChartAxisGauge.JSClassName : string; begin - Result := 'Ext.chart.axis.Gauge'; +procedure TExtPanelTool.SetFScope(Value : TExtObject); begin + FScope := Value; + Value.DeleteFromGarbage; + JSCode('scope:' + VarToJSON([Value, false])); end; -{$IFDEF FPC}constructor TExtChartAxisGauge.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtChartAxisGauge.SetTitle(Title : String) : TExtFunction; begin - JSCode(JSName + '.setTitle(' + VarToJSON([Title]) + ');', 'TExtChartAxisGauge'); - Result := Self; +procedure TExtPanelTool.SetFStopEvent(Value : Boolean); begin + FStopEvent := Value; + JSCode('stopEvent:' + VarToJSON([Value])); end; -procedure TExtChartSeriesCartesian.SetFAxis(Value : String); begin - FAxis := Value; - JSCode('axis:' + VarToJSON([Value])); +procedure TExtPanelTool.SetFTooltip(Value : String); begin + FTooltip := Value; + JSCode('tooltip:' + VarToJSON([Value])); end; -procedure TExtChartSeriesCartesian.SetFAxisList(Value : TExtObjectList); begin - FAxisList := Value; +procedure TExtPanelTool.SetFTooltipObject(Value : TExtObject); begin + FTooltipObject := Value; Value.DeleteFromGarbage; - JSCode('axis:' + VarToJSON([Value, false])); + JSCode('tooltip:' + VarToJSON([Value, false])); end; -procedure TExtChartSeriesCartesian.SetFXField(Value : String); begin - FXField := Value; - JSCode('xField:' + VarToJSON([Value])); +procedure TExtPanelTool.SetFTooltipType(Value : String); begin + FTooltipType := Value; + JSCode('tooltipType:' + VarToJSON([Value])); end; -procedure TExtChartSeriesCartesian.SetFYField(Value : String); begin - FYField := Value; - JSCode('yField:' + VarToJSON([Value])); +procedure TExtPanelTool.SetFTypeJS(Value : String); begin + FTypeJS := Value; + JSCode('typeJS:' + VarToJSON([Value])); end; -procedure TExtChartSeriesCartesian.SetFYFieldList(Value : TExtObjectList); begin - FYFieldList := Value; - Value.DeleteFromGarbage; - JSCode('yField:' + VarToJSON([Value, false])); +procedure TExtPanelTool.SetFOnClick(Value : TExtPanelToolOnClick); begin + if Assigned(FOnClick) then + JSCode(JSName+'.events ["click"].listeners=[];'); + if Assigned(Value) then + AddListener('click', Ajax('click', ['This', '%0.nm','E', '%1.nm'], true)); + FOnClick := Value; end; -function TExtChartSeriesCartesian.JSClassName : string; begin - Result := 'Ext.chart.series.Cartesian'; +function TExtPanelTool.JSClassName : string; begin + Result := 'Ext.panel.Tool'; end; -procedure TExtChartSeriesCartesian.InitDefaults; begin +procedure TExtPanelTool.InitDefaults; begin inherited; - FAxisList := TExtObjectList.Create(Self, 'axis'); - FYFieldList := TExtObjectList.Create(Self, 'yField'); + FScope := TExtObject.CreateInternal(Self, 'scope'); + FTooltipObject := TExtObject.CreateInternal(Self, 'tooltip'); end; -{$IFDEF FPC}constructor TExtChartSeriesCartesian.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtPanelTool.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtChartSeriesCartesian.Create; begin +constructor TExtPanelTool.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -function TExtChartSeriesCartesian.GetMinMaxXValues : TExtFunction; begin - JSCode(JSName + '.getMinMaxXValues();', 'TExtChartSeriesCartesian'); - Result := Self; -end; - -function TExtChartSeriesCartesian.GetMinMaxYValues : TExtFunction; begin - JSCode(JSName + '.getMinMaxYValues();', 'TExtChartSeriesCartesian'); +function TExtPanelTool.SetType(TypeJS : String) : TExtFunction; begin + JSCode(JSName + '.setType(' + VarToJSON([TypeJS]) + ');', 'TExtPanelTool'); Result := Self; end; -destructor TExtChartSeriesCartesian.Destroy; begin +destructor TExtPanelTool.Destroy; begin try - FAxisList.Free; - FYFieldList.Free; + FScope.Free; + FTooltipObject.Free; except end; inherited; end; -procedure TExtDataField.SetFDateFormat(Value : String); begin - FDateFormat := Value; - JSCode('dateFormat:' + VarToJSON([Value])); -end; - -procedure TExtDataField.SetFDateReadFormat(Value : String); begin - FDateReadFormat := Value; - JSCode('dateReadFormat:' + VarToJSON([Value])); +procedure TExtPanelTool.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'click') and Assigned(FOnClick) then + FOnClick(TExtPanelTool(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))); end; -procedure TExtDataField.SetFDateWriteFormat(Value : String); begin - FDateWriteFormat := Value; - JSCode('dateWriteFormat:' + VarToJSON([Value])); +procedure TExtChartSeriesPie.SetFAngleField(Value : String); begin + FAngleField := Value; + JSCode('angleField:' + VarToJSON([Value])); end; -procedure TExtDataField.SetFDefaultValue(Value : TExtObject); begin - FDefaultValue := Value; +procedure TExtChartSeriesPie.SetFColorSet(Value : TExtObjectList); begin + FColorSet := Value; Value.DeleteFromGarbage; - JSCode('defaultValue:' + VarToJSON([Value, false])); + JSCode('colorSet:' + VarToJSON([Value, false])); end; -procedure TExtDataField.SetFMapping(Value : String); begin - FMapping := Value; - JSCode('mapping:' + VarToJSON([Value])); +procedure TExtChartSeriesPie.SetFDonut(Value : Boolean); begin + FDonut := Value; + JSCode('donut:' + VarToJSON([Value])); end; -procedure TExtDataField.SetFMappingInteger(Value : Integer); begin - FMappingInteger := Value; - JSCode('mapping:' + VarToJSON([Value])); +procedure TExtChartSeriesPie.SetFDonutInteger(Value : Integer); begin + FDonutInteger := Value; + JSCode('donut:' + VarToJSON([Value])); end; -procedure TExtDataField.SetFPersist(Value : Boolean); begin - FPersist := Value; - JSCode('persist:' + VarToJSON([Value])); +procedure TExtChartSeriesPie.SetFField(Value : String); begin + FField := Value; + JSCode('field:' + VarToJSON([Value])); end; -procedure TExtDataField.SetFSerialize(Value : TExtFunction); begin - FSerialize := Value; - JSCode('serialize:' + VarToJSON([Value, true])); +procedure TExtChartSeriesPie.SetFHighlightDuration(Value : Integer); begin + FHighlightDuration := Value; + JSCode('highlightDuration:' + VarToJSON([Value])); end; -procedure TExtDataField.SetFSortDir(Value : String); begin - FSortDir := Value; - JSCode('sortDir:' + VarToJSON([Value])); +procedure TExtChartSeriesPie.SetFLengthField(Value : String); begin + FLengthField := Value; + JSCode('lengthField:' + VarToJSON([Value])); end; -procedure TExtDataField.SetFSortType(Value : TExtFunction); begin - FSortType := Value; - JSCode('sortType:' + VarToJSON([Value, true])); +procedure TExtChartSeriesPie.SetFShowInLegend(Value : Boolean); begin + FShowInLegend := Value; + JSCode('showInLegend:' + VarToJSON([Value])); end; -procedure TExtDataField.SetFSortTypeString(Value : String); begin - FSortTypeString := Value; - JSCode('sortType:' + VarToJSON([Value])); +procedure TExtChartSeriesPie.SetFStyle(Value : TExtObject); begin + FStyle := Value; + Value.DeleteFromGarbage; + JSCode('style:' + VarToJSON([Value, false])); end; -procedure TExtDataField.SetFUseNull(Value : Boolean); begin - FUseNull := Value; - JSCode('useNull:' + VarToJSON([Value])); +procedure TExtChartSeriesPie.SetFXField(Value : String); begin + FXField := Value; + JSCode('xField:' + VarToJSON([Value])); end; -function TExtDataField.JSClassName : string; begin - Result := 'Ext.data.Field'; +function TExtChartSeriesPie.JSClassName : string; begin + Result := 'Ext.chart.series.Pie'; end; -procedure TExtDataField.InitDefaults; begin +procedure TExtChartSeriesPie.InitDefaults; begin inherited; - FDefaultValue := TExtObject.CreateInternal(Self, 'defaultValue'); - FPersist := true; - FSortDir := 'ASC'; + FColorSet := TExtObjectList.Create(Self, 'colorSet'); + FStyle := TExtObject.CreateInternal(Self, 'style'); end; -{$IFDEF FPC}constructor TExtDataField.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtChartSeriesPie.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtDataField.Create; begin +constructor TExtChartSeriesPie.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -destructor TExtDataField.Destroy; begin - try - FDefaultValue.Free; - except end; - inherited; +function TExtChartSeriesPie.DrawSeries : TExtFunction; begin + JSCode(JSName + '.drawSeries();', 'TExtChartSeriesPie'); + Result := Self; end; -procedure TExtGridPluginRowExpander.SetFExpandOnDblClick(Value : Boolean); begin - FExpandOnDblClick := Value; - JSCode('expandOnDblClick:' + VarToJSON([Value])); +function TExtChartSeriesPie.GetLegendColor(Info : TExtObject) : TExtFunction; begin + JSCode(JSName + '.getLegendColor(' + VarToJSON([Info, false]) + ');', 'TExtChartSeriesPie'); + Result := Self; end; -procedure TExtGridPluginRowExpander.SetFExpandOnEnter(Value : Boolean); begin - FExpandOnEnter := Value; - JSCode('expandOnEnter:' + VarToJSON([Value])); +function TExtChartSeriesPie.HighlightItem(Info : TExtObject) : TExtFunction; begin + JSCode(JSName + '.highlightItem(' + VarToJSON([Info, false]) + ');', 'TExtChartSeriesPie'); + Result := Self; end; -procedure TExtGridPluginRowExpander.SetFSelectRowOnExpand(Value : Boolean); begin - FSelectRowOnExpand := Value; - JSCode('selectRowOnExpand:' + VarToJSON([Value])); +function TExtChartSeriesPie.UnHighlightItem(Info : TExtObject) : TExtFunction; begin + JSCode(JSName + '.unHighlightItem(' + VarToJSON([Info, false]) + ');', 'TExtChartSeriesPie'); + Result := Self; end; -procedure TExtGridPluginRowExpander.SetFOnCollapsebody(Value : TExtGridPluginRowExpanderOnCollapsebody); begin - if Assigned(FOnCollapsebody) then - JSCode(JSName+'.events ["collapsebody"].listeners=[];'); - if Assigned(Value) then - AddListener('collapsebody', Ajax('collapsebody', ['RowNode', '%0.nm','RecordJS', '%1.nm','ExpandRow', '%2.nm'], true)); - FOnCollapsebody := Value; +destructor TExtChartSeriesPie.Destroy; begin + try + FColorSet.Free; + FStyle.Free; + except end; + inherited; end; -procedure TExtGridPluginRowExpander.SetFOnExpandbody(Value : TExtGridPluginRowExpanderOnExpandbody); begin - if Assigned(FOnExpandbody) then - JSCode(JSName+'.events ["expandbody"].listeners=[];'); - if Assigned(Value) then - AddListener('expandbody', Ajax('expandbody', ['RowNode', '%0.nm','RecordJS', '%1.nm','ExpandRow', '%2.nm'], true)); - FOnExpandbody := Value; +procedure TExtPickerColor.SetFAllowReselect(Value : Boolean); begin + FAllowReselect := Value; + JSCode('allowReselect:' + VarToJSON([Value])); end; -function TExtGridPluginRowExpander.JSClassName : string; begin - Result := 'Ext.grid.plugin.RowExpander'; +procedure TExtPickerColor.SetFClickEvent(Value : String); begin + FClickEvent := Value; + JSCode('clickEvent:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtGridPluginRowExpander.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtGridPluginRowExpander.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'collapsebody') and Assigned(FOnCollapsebody) then - FOnCollapsebody(THTMLElement(ParamAsObject('RowNode')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('ExpandRow'))) - else if (AEvtName = 'expandbody') and Assigned(FOnExpandbody) then - FOnExpandbody(THTMLElement(ParamAsObject('RowNode')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('ExpandRow'))); +procedure TExtPickerColor.SetFColors(Value : TExtObjectList); begin + FColors := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.colors=' + VarToJSON([Value, false]) + ';'); end; -function TExtGridProperty.JSClassName : string; begin - Result := 'Ext.grid.property.Property'; +procedure TExtPickerColor.SetFComponentCls(Value : String); begin + FComponentCls := Value; + JSCode('componentCls:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtGridProperty.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtLayoutContainerBoxOverflowScroller.SetFAfterCtCls(Value : String); begin - FAfterCtCls := Value; - JSCode('afterCtCls:' + VarToJSON([Value])); +procedure TExtPickerColor.SetFHandler(Value : TExtFunction); begin + FHandler := Value; + JSCode('handler:' + VarToJSON([Value, true])); end; -procedure TExtLayoutContainerBoxOverflowScroller.SetFAfterScrollerCls(Value : String); begin - FAfterScrollerCls := Value; - JSCode('afterScrollerCls:' + VarToJSON([Value])); +procedure TExtPickerColor.SetFItemCls(Value : String); begin + FItemCls := Value; + JSCode('itemCls:' + VarToJSON([Value])); end; -procedure TExtLayoutContainerBoxOverflowScroller.SetFAnimateScroll(Value : Boolean); begin - FAnimateScroll := Value; - JSCode('animateScroll:' + VarToJSON([Value])); +procedure TExtPickerColor.SetFScope(Value : TExtObject); begin + FScope := Value; + Value.DeleteFromGarbage; + JSCode('scope:' + VarToJSON([Value, false])); end; -procedure TExtLayoutContainerBoxOverflowScroller.SetFBeforeCtCls(Value : String); begin - FBeforeCtCls := Value; - JSCode('beforeCtCls:' + VarToJSON([Value])); +procedure TExtPickerColor.SetFSelectedCls(Value : String); begin + FSelectedCls := Value; + JSCode('selectedCls:' + VarToJSON([Value])); end; -procedure TExtLayoutContainerBoxOverflowScroller.SetFBeforeScrollerCls(Value : String); begin - FBeforeScrollerCls := Value; - JSCode('beforeScrollerCls:' + VarToJSON([Value])); +procedure TExtPickerColor.SetFValue(Value : String); begin + FValue := Value; + JSCode('value:' + VarToJSON([Value])); end; -procedure TExtLayoutContainerBoxOverflowScroller.SetFHasListeners(Value : TExtObject); begin - FHasListeners := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.hasListeners=' + VarToJSON([Value, false]) + ';'); +procedure TExtPickerColor.SetFOnSelect(Value : TExtPickerColorOnSelect); begin + if Assigned(FOnSelect) then + JSCode(JSName+'.events ["select"].listeners=[];'); + if Assigned(Value) then + AddListener('select', Ajax('select', ['This', '%0.nm','Color', '%1'], true)); + FOnSelect := Value; end; -procedure TExtLayoutContainerBoxOverflowScroller.SetFIsObservable(Value : Boolean); begin - FIsObservable := Value; - JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); +function TExtPickerColor.JSClassName : string; begin + Result := 'Ext.picker.Color'; end; -procedure TExtLayoutContainerBoxOverflowScroller.SetFListeners(Value : TExtObject); begin - FListeners := Value; - Value.DeleteFromGarbage; - JSCode('listeners:' + VarToJSON([Value, false])); +procedure TExtPickerColor.InitDefaults; begin + inherited; + FColors := TExtObjectList.Create(Self, 'colors'); + FScope := TExtObject.CreateInternal(Self, 'scope'); end; -procedure TExtLayoutContainerBoxOverflowScroller.SetFScrollDuration(Value : Integer); begin - FScrollDuration := Value; - JSCode('scrollDuration:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtPickerColor.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtLayoutContainerBoxOverflowScroller.SetFScrollerCls(Value : String); begin - FScrollerCls := Value; - JSCode('scrollerCls:' + VarToJSON([Value])); +constructor TExtPickerColor.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtLayoutContainerBoxOverflowScroller.SetFScrollIncrement(Value : Integer); begin - FScrollIncrement := Value; - JSCode('scrollIncrement:' + VarToJSON([Value])); +function TExtPickerColor.GetValue : TExtFunction; begin + JSCode(JSName + '.getValue();', 'TExtPickerColor'); + Result := Self; end; -procedure TExtLayoutContainerBoxOverflowScroller.SetFScrollRepeatInterval(Value : Integer); begin - FScrollRepeatInterval := Value; - JSCode('scrollRepeatInterval:' + VarToJSON([Value])); +function TExtPickerColor.Select(Color : String; SuppressEvent : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.select(' + VarToJSON([Color, SuppressEvent]) + ');', 'TExtPickerColor'); + Result := Self; end; -procedure TExtLayoutContainerBoxOverflowScroller.SetFWheelIncrement(Value : Integer); begin - FWheelIncrement := Value; - JSCode('wheelIncrement:' + VarToJSON([Value])); +destructor TExtPickerColor.Destroy; begin + try + FColors.Free; + FScope.Free; + except end; + inherited; end; -procedure TExtLayoutContainerBoxOverflowScroller.SetFOnScroll(Value : TExtLayoutContainerBoxOverflowScrollerOnScroll); begin - if Assigned(FOnScroll) then - JSCode(JSName+'.events ["scroll"].listeners=[];'); - if Assigned(Value) then - AddListener('scroll', Ajax('scroll', ['Scroller', '%0.nm','NewPosition', '%1','Animate', '%2'], true)); - FOnScroll := Value; +procedure TExtPickerColor.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'select') and Assigned(FOnSelect) then + FOnSelect(TExtPickerColor(ParamAsObject('This')), ParamAsString('Color')); end; -function TExtLayoutContainerBoxOverflowScroller.JSClassName : string; begin - Result := 'Ext.layout.container.boxOverflow.Scroller'; +procedure TExtDdDD.SetFScroll(Value : Boolean); begin + FScroll := Value; + JSCode(JSName + '.scroll=' + VarToJSON([Value]) + ';'); end; -{$IFDEF FPC}constructor TExtLayoutContainerBoxOverflowScroller.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtLayoutContainerBoxOverflowScroller.AddEvents(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtLayoutContainerBoxOverflowScroller'); - Result := Self; +function TExtDdDD.JSClassName : string; begin + Result := 'Ext.dd.DD'; end; -function TExtLayoutContainerBoxOverflowScroller.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtLayoutContainerBoxOverflowScroller'); - Result := Self; -end; +{$IFDEF FPC}constructor TExtDdDD.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtLayoutContainerBoxOverflowScroller.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtLayoutContainerBoxOverflowScroller'); +function TExtDdDD.AlignElWithMouse(El : THTMLElement; IPageX : Integer; IPageY : Integer) : TExtFunction; begin + JSCode(JSName + '.alignElWithMouse(' + VarToJSON([El, false, IPageX, IPageY]) + ');', 'TExtDdDD'); Result := Self; end; -function TExtLayoutContainerBoxOverflowScroller.ClearListeners : TExtFunction; begin - JSCode(JSName + '.clearListeners();', 'TExtLayoutContainerBoxOverflowScroller'); +function TExtDdDD.ApplyConfig : TExtFunction; begin + JSCode(JSName + '.applyConfig();', 'TExtDdDD'); Result := Self; end; -function TExtLayoutContainerBoxOverflowScroller.ClearManagedListeners : TExtFunction; begin - JSCode(JSName + '.clearManagedListeners();', 'TExtLayoutContainerBoxOverflowScroller'); +function TExtDdDD.AutoOffset(IPageX : Integer; IPageY : Integer) : TExtFunction; begin + JSCode(JSName + '.autoOffset(' + VarToJSON([IPageX, IPageY]) + ');', 'TExtDdDD'); Result := Self; end; -constructor TExtLayoutContainerBoxOverflowScroller.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; -end; - -function TExtLayoutContainerBoxOverflowScroller.EnableBubble(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtLayoutContainerBoxOverflowScroller'); +function TExtDdDD.B4Drag : TExtFunction; begin + JSCode(JSName + '.b4Drag();', 'TExtDdDD'); Result := Self; end; -function TExtLayoutContainerBoxOverflowScroller.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtLayoutContainerBoxOverflowScroller'); +function TExtDdDD.B4MouseDown : TExtFunction; begin + JSCode(JSName + '.b4MouseDown();', 'TExtDdDD'); Result := Self; end; -function TExtLayoutContainerBoxOverflowScroller.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtLayoutContainerBoxOverflowScroller'); +function TExtDdDD.CachePosition(IPageX : Integer = 0; IPageY : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.cachePosition(' + VarToJSON([IPageX, IPageY]) + ');', 'TExtDdDD'); Result := Self; end; -function TExtLayoutContainerBoxOverflowScroller.GetScrollPosition : TExtFunction; begin - JSCode(JSName + '.getScrollPosition();', 'TExtLayoutContainerBoxOverflowScroller'); +function TExtDdDD.SetDelta(IDeltaX : Integer; IDeltaY : Integer) : TExtFunction; begin + JSCode(JSName + '.setDelta(' + VarToJSON([IDeltaX, IDeltaY]) + ');', 'TExtDdDD'); Result := Self; end; -function TExtLayoutContainerBoxOverflowScroller.HasListener(EventName : String) : TExtFunction; begin - JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtLayoutContainerBoxOverflowScroller'); +function TExtDdDD.SetDragElPos(IPageX : Integer; IPageY : Integer) : TExtFunction; begin + JSCode(JSName + '.setDragElPos(' + VarToJSON([IPageX, IPageY]) + ');', 'TExtDdDD'); Result := Self; end; -function TExtLayoutContainerBoxOverflowScroller.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin - JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtLayoutContainerBoxOverflowScroller'); - Result := Self; +procedure TExtUtilLruCache.SetFMaxSize(Value : Integer); begin + FMaxSize := Value; + JSCode('maxSize:' + VarToJSON([Value])); end; -function TExtLayoutContainerBoxOverflowScroller.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtLayoutContainerBoxOverflowScroller'); - Result := Self; +function TExtUtilLruCache.JSClassName : string; begin + Result := 'Ext.util.LruCache'; end; -function TExtLayoutContainerBoxOverflowScroller.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtLayoutContainerBoxOverflowScroller'); - Result := Self; -end; +{$IFDEF FPC}constructor TExtUtilLruCache.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtLayoutContainerBoxOverflowScroller.ResumeEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtLayoutContainerBoxOverflowScroller'); +function TExtUtilLruCache.Clone : TExtFunction; begin + JSCode(JSName + '.clone();', 'TExtUtilLruCache'); Result := Self; end; -function TExtLayoutContainerBoxOverflowScroller.ResumeEvents : TExtFunction; begin - JSCode(JSName + '.resumeEvents();', 'TExtLayoutContainerBoxOverflowScroller'); +function TExtUtilLruCache.Each(Fn : TExtFunction; Scope : TExtObject; Reverse : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.each(' + VarToJSON([Fn, true, Scope, false, Reverse]) + ');', 'TExtUtilLruCache'); Result := Self; end; -function TExtLayoutContainerBoxOverflowScroller.ScrollToItem(Item : Integer; Animate : Boolean) : TExtFunction; begin - JSCode(JSName + '.scrollToItem(' + VarToJSON([Item, Animate]) + ');', 'TExtLayoutContainerBoxOverflowScroller'); +function TExtUtilLruCache.Prune : TExtFunction; begin + JSCode(JSName + '.prune();', 'TExtUtilLruCache'); Result := Self; end; -function TExtLayoutContainerBoxOverflowScroller.SuspendEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtLayoutContainerBoxOverflowScroller'); - Result := Self; +function TExtGridProperty.JSClassName : string; begin + Result := 'Ext.grid.property.Property'; end; -function TExtLayoutContainerBoxOverflowScroller.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin - JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtLayoutContainerBoxOverflowScroller'); - Result := Self; -end; +{$IFDEF FPC}constructor TExtGridProperty.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtLayoutContainerBoxOverflowScroller.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'scroll') and Assigned(FOnScroll) then - FOnScroll(TExtLayoutContainerBoxOverflowScroller(ParamAsObject('Scroller')), ParamAsInteger('NewPosition'), ParamAsBoolean('Animate')); +function TExtDataGroup.JSClassName : string; begin + Result := 'Ext.data.Group'; end; +{$IFDEF FPC}constructor TExtDataGroup.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + procedure TExtSelectionModel.SetFAllowDeselect(Value : Boolean); begin FAllowDeselect := Value; JSCode('allowDeselect:' + VarToJSON([Value])); @@ -29568,10 +30811,21 @@ procedure TExtSelectionModel.SetFPruneRemoved(Value : Boolean); begin JSCode('pruneRemoved:' + VarToJSON([Value])); end; +procedure TExtSelectionModel.SetFSelected(Value : TExtObjectList); begin + FSelected := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.selected=' + VarToJSON([Value, false]) + ';'); +end; + function TExtSelectionModel.JSClassName : string; begin Result := 'Ext.selection.Model'; end; +procedure TExtSelectionModel.InitDefaults; begin + inherited; + FSelected := TExtObjectList.Create(Self, 'selected'); +end; + {$IFDEF FPC}constructor TExtSelectionModel.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} function TExtSelectionModel.BindStore(Store : String = '') : TExtFunction; begin @@ -29579,6 +30833,11 @@ function TExtSelectionModel.BindStore(Store : String = '') : TExtFunction; begin Result := Self; end; +constructor TExtSelectionModel.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; +end; + function TExtSelectionModel.Deselect(Records : Integer; SuppressEvent : Boolean = false) : TExtFunction; begin JSCode(JSName + '.deselect(' + VarToJSON([Records, SuppressEvent]) + ');', 'TExtSelectionModel'); Result := Self; @@ -29674,2021 +30933,2171 @@ function TExtSelectionModel.SetSelectionMode(SelMode : String) : TExtFunction; b Result := Self; end; -function TExtLayoutComponent.JSClassName : string; begin - Result := 'Ext.layout.component.Component'; -end; - -{$IFDEF FPC}constructor TExtLayoutComponent.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtLayoutComponent.GetRenderTarget : TExtFunction; begin - JSCode(JSName + '.getRenderTarget();', 'TExtLayoutComponent'); - Result := Self; -end; - -function TExtLayoutComponent.GetTarget : TExtFunction; begin - JSCode(JSName + '.getTarget();', 'TExtLayoutComponent'); - Result := Self; -end; - -procedure TExtLayoutContainerBoxOverflowMenu.SetFMenuItems(Value : TExtObjectList); begin - FMenuItems := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.menuItems=' + VarToJSON([Value, false]) + ';'); -end; - -procedure TExtLayoutContainerBoxOverflowMenu.SetFNoItemsMenuText(Value : String); begin - FNoItemsMenuText := Value; - JSCode(JSName + '.noItemsMenuText=' + VarToJSON([Value]) + ';'); -end; - -procedure TExtLayoutContainerBoxOverflowMenu.SetFTriggerButtonCls(Value : String); begin - FTriggerButtonCls := Value; - JSCode('triggerButtonCls:' + VarToJSON([Value])); -end; - -function TExtLayoutContainerBoxOverflowMenu.JSClassName : string; begin - Result := 'Ext.layout.container.boxOverflow.Menu'; -end; - -procedure TExtLayoutContainerBoxOverflowMenu.InitDefaults; begin - inherited; - FMenuItems := TExtObjectList.Create(Self, 'menuItems'); -end; - -{$IFDEF FPC}constructor TExtLayoutContainerBoxOverflowMenu.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtLayoutContainerBoxOverflowMenu.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; -end; - -destructor TExtLayoutContainerBoxOverflowMenu.Destroy; begin +destructor TExtSelectionModel.Destroy; begin try - FMenuItems.Free; + FSelected.Free; except end; inherited; end; -function TExtDataGroup.JSClassName : string; begin - Result := 'Ext.data.Group'; +procedure TExtDomElement.SetFAutoBoxAdjust(Value : Boolean); begin + FAutoBoxAdjust := Value; + JSCode(JSName + '.autoBoxAdjust=' + VarToJSON([Value]) + ';'); end; -{$IFDEF FPC}constructor TExtDataGroup.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtImg.SetFAlt(Value : String); begin - FAlt := Value; - JSCode('alt:' + VarToJSON([Value])); +procedure TExtDomElement.SetFOnAbort(Value : TExtDomElementOnAbort); begin + if Assigned(FOnAbort) then + JSCode(JSName+'.events ["abort"].listeners=[];'); + if Assigned(Value) then + AddListener('abort', Ajax('abort', ['E', '%0.nm','T', '%1.nm'], true)); + FOnAbort := Value; end; -procedure TExtImg.SetFGlyph(Value : Integer); begin - FGlyph := Value; - JSCode('glyph:' + VarToJSON([Value])); +procedure TExtDomElement.SetFOnBlur(Value : TExtDomElementOnBlur); begin + if Assigned(FOnBlur) then + JSCode(JSName+'.events ["blur"].listeners=[];'); + if Assigned(Value) then + AddListener('blur', Ajax('blur', ['E', '%0.nm','T', '%1.nm'], true)); + FOnBlur := Value; end; -procedure TExtImg.SetFGlyphString(Value : String); begin - FGlyphString := Value; - JSCode('glyph:' + VarToJSON([Value])); +procedure TExtDomElement.SetFOnChange(Value : TExtDomElementOnChange); begin + if Assigned(FOnChange) then + JSCode(JSName+'.events ["change"].listeners=[];'); + if Assigned(Value) then + AddListener('change', Ajax('change', ['E', '%0.nm','T', '%1.nm'], true)); + FOnChange := Value; end; -procedure TExtImg.SetFImgCls(Value : String); begin - FImgCls := Value; - JSCode('imgCls:' + VarToJSON([Value])); +procedure TExtDomElement.SetFOnClick(Value : TExtDomElementOnClick); begin + if Assigned(FOnClick) then + JSCode(JSName+'.events ["click"].listeners=[];'); + if Assigned(Value) then + AddListener('click', Ajax('click', ['E', '%0.nm','T', '%1.nm'], true)); + FOnClick := Value; end; -procedure TExtImg.SetFSrc(Value : String); begin - FSrc := Value; - if not ConfigAvailable(JSName) then - SetSrc(Value) - else - JSCode('src:' + VarToJSON([Value])); +procedure TExtDomElement.SetFOnContextmenu(Value : TExtDomElementOnContextmenu); begin + if Assigned(FOnContextmenu) then + JSCode(JSName+'.events ["contextmenu"].listeners=[];'); + if Assigned(Value) then + AddListener('contextmenu', Ajax('contextmenu', ['E', '%0.nm','T', '%1.nm'], true)); + FOnContextmenu := Value; end; -procedure TExtImg.SetFTitle(Value : String); begin - FTitle := Value; - JSCode('title:' + VarToJSON([Value])); +procedure TExtDomElement.SetFOnDblclick(Value : TExtDomElementOnDblclick); begin + if Assigned(FOnDblclick) then + JSCode(JSName+'.events ["dblclick"].listeners=[];'); + if Assigned(Value) then + AddListener('dblclick', Ajax('dblclick', ['E', '%0.nm','T', '%1.nm'], true)); + FOnDblclick := Value; end; -function TExtImg.JSClassName : string; begin - Result := 'Ext.Img'; +procedure TExtDomElement.SetFOnDOMActivate(Value : TExtDomElementOnDOMActivate); begin + if Assigned(FOnDOMActivate) then + JSCode(JSName+'.events ["DOMActivate"].listeners=[];'); + if Assigned(Value) then + AddListener('DOMActivate', Ajax('DOMActivate', ['E', '%0.nm','T', '%1.nm'], true)); + FOnDOMActivate := Value; end; -{$IFDEF FPC}constructor TExtImg.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtImg.SetSrc(Src : String) : TExtFunction; begin - JSCode(JSName + '.setSrc(' + VarToJSON([Src]) + ');', 'TExtImg'); - Result := Self; +procedure TExtDomElement.SetFOnDOMAttrModified(Value : TExtDomElementOnDOMAttrModified); begin + if Assigned(FOnDOMAttrModified) then + JSCode(JSName+'.events ["DOMAttrModified"].listeners=[];'); + if Assigned(Value) then + AddListener('DOMAttrModified', Ajax('DOMAttrModified', ['E', '%0.nm','T', '%1.nm'], true)); + FOnDOMAttrModified := Value; end; -procedure TExtGridPluginHeaderResizer.SetFDynamic(Value : Boolean); begin - FDynamic := Value; - JSCode('dynamic:' + VarToJSON([Value])); +procedure TExtDomElement.SetFOnDOMCharacterDataModified(Value : TExtDomElementOnDOMCharacterDataModified); begin + if Assigned(FOnDOMCharacterDataModified) then + JSCode(JSName+'.events ["DOMCharacterDataModified"].listeners=[];'); + if Assigned(Value) then + AddListener('DOMCharacterDataModified', Ajax('DOMCharacterDataModified', ['E', '%0.nm','T', '%1.nm'], true)); + FOnDOMCharacterDataModified := Value; end; -function TExtGridPluginHeaderResizer.JSClassName : string; begin - Result := 'Ext.grid.plugin.HeaderResizer'; +procedure TExtDomElement.SetFOnDOMFocusIn(Value : TExtDomElementOnDOMFocusIn); begin + if Assigned(FOnDOMFocusIn) then + JSCode(JSName+'.events ["DOMFocusIn"].listeners=[];'); + if Assigned(Value) then + AddListener('DOMFocusIn', Ajax('DOMFocusIn', ['E', '%0.nm','T', '%1.nm'], true)); + FOnDOMFocusIn := Value; end; -{$IFDEF FPC}constructor TExtGridPluginHeaderResizer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtUtilPoint.JSClassName : string; begin - Result := 'Ext.util.Point'; +procedure TExtDomElement.SetFOnDOMFocusOut(Value : TExtDomElementOnDOMFocusOut); begin + if Assigned(FOnDOMFocusOut) then + JSCode(JSName+'.events ["DOMFocusOut"].listeners=[];'); + if Assigned(Value) then + AddListener('DOMFocusOut', Ajax('DOMFocusOut', ['E', '%0.nm','T', '%1.nm'], true)); + FOnDOMFocusOut := Value; end; -{$IFDEF FPC}constructor TExtUtilPoint.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtUtilPoint.Create(X : Integer; Y : Integer); begin - CreateVar(JSClassName + '(' + VarToJSON([X, Y]) + ');'); - InitDefaults; +procedure TExtDomElement.SetFOnDOMNodeInserted(Value : TExtDomElementOnDOMNodeInserted); begin + if Assigned(FOnDOMNodeInserted) then + JSCode(JSName+'.events ["DOMNodeInserted"].listeners=[];'); + if Assigned(Value) then + AddListener('DOMNodeInserted', Ajax('DOMNodeInserted', ['E', '%0.nm','T', '%1.nm'], true)); + FOnDOMNodeInserted := Value; end; -function TExtUtilPoint.Equals(P : TExtObject) : TExtFunction; begin - JSCode(JSName + '.equals(' + VarToJSON([P, false]) + ');', 'TExtUtilPoint'); - Result := Self; +procedure TExtDomElement.SetFOnDOMNodeInsertedIntoDocument(Value : TExtDomElementOnDOMNodeInsertedIntoDocument); begin + if Assigned(FOnDOMNodeInsertedIntoDocument) then + JSCode(JSName+'.events ["DOMNodeInsertedIntoDocument"].listeners=[];'); + if Assigned(Value) then + AddListener('DOMNodeInsertedIntoDocument', Ajax('DOMNodeInsertedIntoDocument', ['E', '%0.nm','T', '%1.nm'], true)); + FOnDOMNodeInsertedIntoDocument := Value; end; -function TExtUtilPoint.FromEvent(E : TEvent) : TExtFunction; begin - JSCode(JSName + '.fromEvent(' + VarToJSON([E, false]) + ');', 'TExtUtilPoint'); - Result := Self; +procedure TExtDomElement.SetFOnDOMNodeRemoved(Value : TExtDomElementOnDOMNodeRemoved); begin + if Assigned(FOnDOMNodeRemoved) then + JSCode(JSName+'.events ["DOMNodeRemoved"].listeners=[];'); + if Assigned(Value) then + AddListener('DOMNodeRemoved', Ajax('DOMNodeRemoved', ['E', '%0.nm','T', '%1.nm'], true)); + FOnDOMNodeRemoved := Value; end; -function TExtUtilPoint.IsContainedBy(Region : TExtComponent) : TExtFunction; begin - JSCode(JSName + '.isContainedBy(' + VarToJSON([Region, false]) + ');', 'TExtUtilPoint'); - Result := Self; +procedure TExtDomElement.SetFOnDOMNodeRemovedFromDocument(Value : TExtDomElementOnDOMNodeRemovedFromDocument); begin + if Assigned(FOnDOMNodeRemovedFromDocument) then + JSCode(JSName+'.events ["DOMNodeRemovedFromDocument"].listeners=[];'); + if Assigned(Value) then + AddListener('DOMNodeRemovedFromDocument', Ajax('DOMNodeRemovedFromDocument', ['E', '%0.nm','T', '%1.nm'], true)); + FOnDOMNodeRemovedFromDocument := Value; end; -function TExtUtilPoint.IsWithin(P : TExtObject; Threshold : Integer) : TExtFunction; begin - JSCode(JSName + '.isWithin(' + VarToJSON([P, false, Threshold]) + ');', 'TExtUtilPoint'); - Result := Self; +procedure TExtDomElement.SetFOnDOMSubtreeModified(Value : TExtDomElementOnDOMSubtreeModified); begin + if Assigned(FOnDOMSubtreeModified) then + JSCode(JSName+'.events ["DOMSubtreeModified"].listeners=[];'); + if Assigned(Value) then + AddListener('DOMSubtreeModified', Ajax('DOMSubtreeModified', ['E', '%0.nm','T', '%1.nm'], true)); + FOnDOMSubtreeModified := Value; end; -function TExtUtilPoint.RoundedEquals(P : TExtObject) : TExtFunction; begin - JSCode(JSName + '.roundedEquals(' + VarToJSON([P, false]) + ');', 'TExtUtilPoint'); - Result := Self; +procedure TExtDomElement.SetFOnError(Value : TExtDomElementOnError); begin + if Assigned(FOnError) then + JSCode(JSName+'.events ["error"].listeners=[];'); + if Assigned(Value) then + AddListener('error', Ajax('error', ['E', '%0.nm','T', '%1.nm'], true)); + FOnError := Value; end; -function TExtUtilPoint.ToString : TExtFunction; begin - JSCode(JSName + '.toString();', 'TExtUtilPoint'); - Result := Self; +procedure TExtDomElement.SetFOnFocus(Value : TExtDomElementOnFocus); begin + if Assigned(FOnFocus) then + JSCode(JSName+'.events ["focus"].listeners=[];'); + if Assigned(Value) then + AddListener('focus', Ajax('focus', ['E', '%0.nm','T', '%1.nm'], true)); + FOnFocus := Value; end; -procedure TExtChartSeriesGauge.SetFAngleField(Value : String); begin - FAngleField := Value; - JSCode('angleField:' + VarToJSON([Value])); +procedure TExtDomElement.SetFOnKeydown(Value : TExtDomElementOnKeydown); begin + if Assigned(FOnKeydown) then + JSCode(JSName+'.events ["keydown"].listeners=[];'); + if Assigned(Value) then + AddListener('keydown', Ajax('keydown', ['E', '%0.nm','T', '%1.nm'], true)); + FOnKeydown := Value; end; -procedure TExtChartSeriesGauge.SetFDonut(Value : Boolean); begin - FDonut := Value; - JSCode('donut:' + VarToJSON([Value])); +procedure TExtDomElement.SetFOnKeypress(Value : TExtDomElementOnKeypress); begin + if Assigned(FOnKeypress) then + JSCode(JSName+'.events ["keypress"].listeners=[];'); + if Assigned(Value) then + AddListener('keypress', Ajax('keypress', ['E', '%0.nm','T', '%1.nm'], true)); + FOnKeypress := Value; end; -procedure TExtChartSeriesGauge.SetFDonutInteger(Value : Integer); begin - FDonutInteger := Value; - JSCode('donut:' + VarToJSON([Value])); +procedure TExtDomElement.SetFOnKeyup(Value : TExtDomElementOnKeyup); begin + if Assigned(FOnKeyup) then + JSCode(JSName+'.events ["keyup"].listeners=[];'); + if Assigned(Value) then + AddListener('keyup', Ajax('keyup', ['E', '%0.nm','T', '%1.nm'], true)); + FOnKeyup := Value; end; -procedure TExtChartSeriesGauge.SetFHighlightDuration(Value : Integer); begin - FHighlightDuration := Value; - JSCode('highlightDuration:' + VarToJSON([Value])); +procedure TExtDomElement.SetFOnLoad(Value : TExtDomElementOnLoad); begin + if Assigned(FOnLoad) then + JSCode(JSName+'.events ["load"].listeners=[];'); + if Assigned(Value) then + AddListener('load', Ajax('load', ['E', '%0.nm','T', '%1.nm'], true)); + FOnLoad := Value; end; -procedure TExtChartSeriesGauge.SetFNeedle(Value : Boolean); begin - FNeedle := Value; - JSCode('needle:' + VarToJSON([Value])); +procedure TExtDomElement.SetFOnMousedown(Value : TExtDomElementOnMousedown); begin + if Assigned(FOnMousedown) then + JSCode(JSName+'.events ["mousedown"].listeners=[];'); + if Assigned(Value) then + AddListener('mousedown', Ajax('mousedown', ['E', '%0.nm','T', '%1.nm'], true)); + FOnMousedown := Value; end; -procedure TExtChartSeriesGauge.SetFShowInLegend(Value : Boolean); begin - FShowInLegend := Value; - JSCode('showInLegend:' + VarToJSON([Value])); +procedure TExtDomElement.SetFOnMouseenter(Value : TExtDomElementOnMouseenter); begin + if Assigned(FOnMouseenter) then + JSCode(JSName+'.events ["mouseenter"].listeners=[];'); + if Assigned(Value) then + AddListener('mouseenter', Ajax('mouseenter', ['E', '%0.nm','T', '%1.nm'], true)); + FOnMouseenter := Value; end; -procedure TExtChartSeriesGauge.SetFStyle(Value : TExtObject); begin - FStyle := Value; - Value.DeleteFromGarbage; - JSCode('style:' + VarToJSON([Value, false])); +procedure TExtDomElement.SetFOnMouseleave(Value : TExtDomElementOnMouseleave); begin + if Assigned(FOnMouseleave) then + JSCode(JSName+'.events ["mouseleave"].listeners=[];'); + if Assigned(Value) then + AddListener('mouseleave', Ajax('mouseleave', ['E', '%0.nm','T', '%1.nm'], true)); + FOnMouseleave := Value; end; -function TExtChartSeriesGauge.JSClassName : string; begin - Result := 'Ext.chart.series.Gauge'; +procedure TExtDomElement.SetFOnMousemove(Value : TExtDomElementOnMousemove); begin + if Assigned(FOnMousemove) then + JSCode(JSName+'.events ["mousemove"].listeners=[];'); + if Assigned(Value) then + AddListener('mousemove', Ajax('mousemove', ['E', '%0.nm','T', '%1.nm'], true)); + FOnMousemove := Value; end; -procedure TExtChartSeriesGauge.InitDefaults; begin - inherited; - FStyle := TExtObject.CreateInternal(Self, 'style'); +procedure TExtDomElement.SetFOnMouseout(Value : TExtDomElementOnMouseout); begin + if Assigned(FOnMouseout) then + JSCode(JSName+'.events ["mouseout"].listeners=[];'); + if Assigned(Value) then + AddListener('mouseout', Ajax('mouseout', ['E', '%0.nm','T', '%1.nm'], true)); + FOnMouseout := Value; end; -{$IFDEF FPC}constructor TExtChartSeriesGauge.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtChartSeriesGauge.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtDomElement.SetFOnMouseover(Value : TExtDomElementOnMouseover); begin + if Assigned(FOnMouseover) then + JSCode(JSName+'.events ["mouseover"].listeners=[];'); + if Assigned(Value) then + AddListener('mouseover', Ajax('mouseover', ['E', '%0.nm','T', '%1.nm'], true)); + FOnMouseover := Value; end; -function TExtChartSeriesGauge.DrawSeries : TExtFunction; begin - JSCode(JSName + '.drawSeries();', 'TExtChartSeriesGauge'); - Result := Self; +procedure TExtDomElement.SetFOnMouseup(Value : TExtDomElementOnMouseup); begin + if Assigned(FOnMouseup) then + JSCode(JSName+'.events ["mouseup"].listeners=[];'); + if Assigned(Value) then + AddListener('mouseup', Ajax('mouseup', ['E', '%0.nm','T', '%1.nm'], true)); + FOnMouseup := Value; end; -function TExtChartSeriesGauge.GetLegendColor(Info : TExtObject) : TExtFunction; begin - JSCode(JSName + '.getLegendColor(' + VarToJSON([Info, false]) + ');', 'TExtChartSeriesGauge'); - Result := Self; +procedure TExtDomElement.SetFOnReset(Value : TExtDomElementOnReset); begin + if Assigned(FOnReset) then + JSCode(JSName+'.events ["reset"].listeners=[];'); + if Assigned(Value) then + AddListener('reset', Ajax('reset', ['E', '%0.nm','T', '%1.nm'], true)); + FOnReset := Value; end; -function TExtChartSeriesGauge.SetValue : TExtFunction; begin - JSCode(JSName + '.setValue();', 'TExtChartSeriesGauge'); - Result := Self; +procedure TExtDomElement.SetFOnResize(Value : TExtDomElementOnResize); begin + if Assigned(FOnResize) then + JSCode(JSName+'.events ["resize"].listeners=[];'); + if Assigned(Value) then + AddListener('resize', Ajax('resize', ['E', '%0.nm','T', '%1.nm'], true)); + FOnResize := Value; end; -destructor TExtChartSeriesGauge.Destroy; begin - try - FStyle.Free; - except end; - inherited; +procedure TExtDomElement.SetFOnScroll(Value : TExtDomElementOnScroll); begin + if Assigned(FOnScroll) then + JSCode(JSName+'.events ["scroll"].listeners=[];'); + if Assigned(Value) then + AddListener('scroll', Ajax('scroll', ['E', '%0.nm','T', '%1.nm'], true)); + FOnScroll := Value; end; -procedure TExtGridPluginBufferedRenderer.SetFPosition(Value : Integer); begin - FPosition := Value; - JSCode(JSName + '.position=' + VarToJSON([Value]) + ';'); +procedure TExtDomElement.SetFOnSelect(Value : TExtDomElementOnSelect); begin + if Assigned(FOnSelect) then + JSCode(JSName+'.events ["select"].listeners=[];'); + if Assigned(Value) then + AddListener('select', Ajax('select', ['E', '%0.nm','T', '%1.nm'], true)); + FOnSelect := Value; end; -procedure TExtGridPluginBufferedRenderer.SetFSynchronousRender(Value : Boolean); begin - FSynchronousRender := Value; - JSCode('synchronousRender:' + VarToJSON([Value])); +procedure TExtDomElement.SetFOnSubmit(Value : TExtDomElementOnSubmit); begin + if Assigned(FOnSubmit) then + JSCode(JSName+'.events ["submit"].listeners=[];'); + if Assigned(Value) then + AddListener('submit', Ajax('submit', ['E', '%0.nm','T', '%1.nm'], true)); + FOnSubmit := Value; end; -procedure TExtGridPluginBufferedRenderer.SetFVariableRowHeight(Value : Boolean); begin - FVariableRowHeight := Value; - JSCode('variableRowHeight:' + VarToJSON([Value])); +procedure TExtDomElement.SetFOnUnload(Value : TExtDomElementOnUnload); begin + if Assigned(FOnUnload) then + JSCode(JSName+'.events ["unload"].listeners=[];'); + if Assigned(Value) then + AddListener('unload', Ajax('unload', ['E', '%0.nm','T', '%1.nm'], true)); + FOnUnload := Value; end; -function TExtGridPluginBufferedRenderer.JSClassName : string; begin - Result := 'Ext.grid.plugin.BufferedRenderer'; +function TExtDomElement.JSClassName : string; begin + Result := 'Ext.dom.Element'; end; -{$IFDEF FPC}constructor TExtGridPluginBufferedRenderer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtDomElement.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtGridPluginBufferedRenderer.ScrollTo(RecordIdx : Integer; DoSelect : Boolean; Callback : TExtFunction; CallbackRecordIdx : Integer; CallbackRecord : TExtDataModel; Scope : TExtObject) : TExtFunction; begin - JSCode(JSName + '.scrollTo(' + VarToJSON([RecordIdx, DoSelect, Callback, true, CallbackRecordIdx, CallbackRecord, false, Scope, false]) + ');', 'TExtGridPluginBufferedRenderer'); +function TExtDomElement.AddKeyListener(Key : Integer; Key_ : Integer; KeyShift : Boolean; KeyCtrl : Boolean; KeyAlt : Boolean; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.addKeyListener(' + VarToJSON([Key, Key_, KeyShift, KeyCtrl, KeyAlt, Fn, true, Scope, false]) + ');', 'TExtDomElement'); Result := Self; end; -procedure TExtMenuItem.SetFActiveCls(Value : String); begin - FActiveCls := Value; - JSCode('activeCls:' + VarToJSON([Value])); -end; - -procedure TExtMenuItem.SetFCanActivate(Value : Boolean); begin - FCanActivate := Value; - JSCode('canActivate:' + VarToJSON([Value])); -end; - -procedure TExtMenuItem.SetFClickHideDelay(Value : Integer); begin - FClickHideDelay := Value; - JSCode('clickHideDelay:' + VarToJSON([Value])); -end; - -procedure TExtMenuItem.SetFDestroyMenu(Value : Boolean); begin - FDestroyMenu := Value; - JSCode('destroyMenu:' + VarToJSON([Value])); -end; - -procedure TExtMenuItem.SetFDisabledCls(Value : String); begin - FDisabledCls := Value; - JSCode('disabledCls:' + VarToJSON([Value])); -end; - -procedure TExtMenuItem.SetFGlyph(Value : Integer); begin - FGlyph := Value; - JSCode('glyph:' + VarToJSON([Value])); -end; - -procedure TExtMenuItem.SetFGlyphString(Value : String); begin - FGlyphString := Value; - JSCode('glyph:' + VarToJSON([Value])); -end; - -procedure TExtMenuItem.SetFHandler(Value : TExtFunction); begin - FHandler := Value; - if not ConfigAvailable(JSName) then - SetHandler(Value) - else - JSCode('handler:' + VarToJSON([Value, true])); -end; - -procedure TExtMenuItem.SetFHideOnClick(Value : Boolean); begin - FHideOnClick := Value; - JSCode('hideOnClick:' + VarToJSON([Value])); -end; - -procedure TExtMenuItem.SetFHref(Value : String); begin - FHref := Value; - JSCode('href:' + VarToJSON([Value])); -end; - -procedure TExtMenuItem.SetFHrefTarget(Value : String); begin - FHrefTarget := Value; - JSCode('hrefTarget:' + VarToJSON([Value])); -end; - -procedure TExtMenuItem.SetFIcon(Value : String); begin - FIcon := Value; - if not ConfigAvailable(JSName) then - SetIcon(Value) - else - JSCode('icon:' + VarToJSON([Value])); -end; - -procedure TExtMenuItem.SetFIconCls(Value : String); begin - FIconCls := Value; - if not ConfigAvailable(JSName) then - SetIconCls(Value) - else - JSCode('iconCls:' + VarToJSON([Value])); -end; - -procedure TExtMenuItem.SetFMenu(Value : TExtMenu); begin - FMenu := Value; - Value.DeleteFromGarbage; - if not ConfigAvailable(JSName) then - SetMenu(Value) - else - JSCode('menu:' + VarToJSON([Value, false])); -end; - -procedure TExtMenuItem.SetFMenuAlign(Value : String); begin - FMenuAlign := Value; - JSCode('menuAlign:' + VarToJSON([Value])); -end; - -procedure TExtMenuItem.SetFMenuExpandDelay(Value : Integer); begin - FMenuExpandDelay := Value; - JSCode('menuExpandDelay:' + VarToJSON([Value])); -end; - -procedure TExtMenuItem.SetFMenuHideDelay(Value : Integer); begin - FMenuHideDelay := Value; - JSCode('menuHideDelay:' + VarToJSON([Value])); -end; - -procedure TExtMenuItem.SetFMenuObject(Value : TExtObject); begin - FMenuObject := Value; - Value.DeleteFromGarbage; - JSCode('menu:' + VarToJSON([Value, false])); -end; - -procedure TExtMenuItem.SetFPlain(Value : Boolean); begin - FPlain := Value; - JSCode('plain:' + VarToJSON([Value])); +function TExtDomElement.AddKeyMap(Config : TExtObject) : TExtFunction; begin + JSCode(JSName + '.addKeyMap(' + VarToJSON([Config, false]) + ');', 'TExtDomElement'); + Result := Self; end; -procedure TExtMenuItem.SetFText(Value : String); begin - FText := Value; - if not ConfigAvailable(JSName) then - SetText(Value) - else - JSCode('text:' + VarToJSON([Value])); +function TExtDomElement.Clean(ForceReclean : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.clean(' + VarToJSON([ForceReclean]) + ');', 'TExtDomElement'); + Result := Self; end; -procedure TExtMenuItem.SetFTooltip(Value : String); begin - FTooltip := Value; - if not ConfigAvailable(JSName) then - SetTooltip(Value) - else - JSCode('tooltip:' + VarToJSON([Value])); +function TExtDomElement.CreateProxy(Config : String; RenderTo : String = ''; MatchBox : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.createProxy(' + VarToJSON([Config, RenderTo, MatchBox]) + ');', 'TExtDomElement'); + Result := Self; end; -procedure TExtMenuItem.SetFTooltipObject(Value : TExtObject); begin - FTooltipObject := Value; - Value.DeleteFromGarbage; - JSCode('tooltip:' + VarToJSON([Value, false])); +function TExtDomElement.CreateShim : TExtFunction; begin + JSCode(JSName + '.createShim();', 'TExtDomElement'); + Result := Self; end; -procedure TExtMenuItem.SetFTooltipType(Value : String); begin - FTooltipType := Value; - JSCode('tooltipType:' + VarToJSON([Value])); +function TExtDomElement.EnableDisplayMode(Display : String = '') : TExtFunction; begin + JSCode(JSName + '.enableDisplayMode(' + VarToJSON([Display]) + ');', 'TExtDomElement'); + Result := Self; end; -procedure TExtMenuItem.SetFOnActivate(Value : TExtMenuItemOnActivate); begin - if Assigned(FOnActivate) then - JSCode(JSName+'.events ["activate"].listeners=[];'); - if Assigned(Value) then - AddListener('activate', Ajax('activate', ['Item', '%0.nm'], true)); - FOnActivate := Value; +function TExtDomElement.GetLoader : TExtFunction; begin + JSCode(JSName + '.getLoader();', 'TExtDomElement'); + Result := Self; end; -procedure TExtMenuItem.SetFOnClick(Value : TExtMenuItemOnClick); begin - if Assigned(FOnClick) then - JSCode(JSName+'.events ["click"].listeners=[];'); - if Assigned(Value) then - AddListener('click', Ajax('click', ['Item', '%0.nm','E', '%1.nm'], true)); - FOnClick := Value; +function TExtDomElement.IsDisplayed : TExtFunction; begin + JSCode(JSName + '.isDisplayed();', 'TExtDomElement'); + Result := Self; end; -procedure TExtMenuItem.SetFOnDeactivate(Value : TExtMenuItemOnDeactivate); begin - if Assigned(FOnDeactivate) then - JSCode(JSName+'.events ["deactivate"].listeners=[];'); - if Assigned(Value) then - AddListener('deactivate', Ajax('deactivate', ['Item', '%0.nm'], true)); - FOnDeactivate := Value; +function TExtDomElement.IsFocusable : TExtFunction; begin + JSCode(JSName + '.isFocusable();', 'TExtDomElement'); + Result := Self; end; -procedure TExtMenuItem.SetFOnIconchange(Value : TExtMenuItemOnIconchange); begin - if Assigned(FOnIconchange) then - JSCode(JSName+'.events ["iconchange"].listeners=[];'); - if Assigned(Value) then - AddListener('iconchange', Ajax('iconchange', ['This', '%0.nm','OldIcon', '%1','NewIcon', '%2'], true)); - FOnIconchange := Value; +function TExtDomElement.IsMasked : TExtFunction; begin + JSCode(JSName + '.isMasked();', 'TExtDomElement'); + Result := Self; end; -procedure TExtMenuItem.SetFOnTextchange(Value : TExtMenuItemOnTextchange); begin - if Assigned(FOnTextchange) then - JSCode(JSName+'.events ["textchange"].listeners=[];'); - if Assigned(Value) then - AddListener('textchange', Ajax('textchange', ['This', '%0.nm','OldText', '%1','NewText', '%2'], true)); - FOnTextchange := Value; +function TExtDomElement.IsVisible(Deep : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.isVisible(' + VarToJSON([Deep]) + ');', 'TExtDomElement'); + Result := Self; end; -function TExtMenuItem.JSClassName : string; begin - Result := 'Ext.menu.Item'; +function TExtDomElement.Load : TExtFunction; begin + JSCode(JSName + '.load();', 'TExtDomElement'); + Result := Self; end; -procedure TExtMenuItem.InitDefaults; begin - inherited; - FMenu := TExtMenu.CreateInternal(Self, 'menu'); - FMenuObject := TExtObject.CreateInternal(Self, 'menu'); - FTooltipObject := TExtObject.CreateInternal(Self, 'tooltip'); +function TExtDomElement.Mask(Msg : String = ''; MsgCls : String = '') : TExtFunction; begin + JSCode(JSName + '.mask(' + VarToJSON([Msg, MsgCls]) + ');', 'TExtDomElement'); + Result := Self; end; -{$IFDEF FPC}constructor TExtMenuItem.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtDomElement.MonitorMouseLeave(Delay : Integer; Handler : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.monitorMouseLeave(' + VarToJSON([Delay, Handler, true, Scope, false]) + ');', 'TExtDomElement'); + Result := Self; +end; -constructor TExtMenuItem.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +function TExtDomElement.NeedsTabIndex : TExtFunction; begin + JSCode(JSName + '.needsTabIndex();', 'TExtDomElement'); + Result := Self; end; -function TExtMenuItem.SetHandler(Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.setHandler(' + VarToJSON([Fn, true, Scope, false]) + ');', 'TExtMenuItem'); +function TExtDomElement.On(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.on(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false]) + ');', 'TExtDomElement'); Result := Self; end; -function TExtMenuItem.SetIcon(Icon : String) : TExtFunction; begin - JSCode(JSName + '.setIcon(' + VarToJSON([Icon]) + ');', 'TExtMenuItem'); +function TExtDomElement.PurgeAllListeners : TExtFunction; begin + JSCode(JSName + '.purgeAllListeners();', 'TExtDomElement'); Result := Self; end; -function TExtMenuItem.SetIconCls(IconCls : String) : TExtFunction; begin - JSCode(JSName + '.setIconCls(' + VarToJSON([IconCls]) + ');', 'TExtMenuItem'); +function TExtDomElement.RelayEvent(EventName : String; Observable : TExtObject) : TExtFunction; begin + JSCode(JSName + '.relayEvent(' + VarToJSON([EventName, Observable, false]) + ');', 'TExtDomElement'); Result := Self; end; -function TExtMenuItem.SetMenu(Menu : TExtMenu; DestroyMenu : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.setMenu(' + VarToJSON([Menu, false, DestroyMenu]) + ');', 'TExtMenuItem'); +function TExtDomElement.RemoveAllListeners : TExtFunction; begin + JSCode(JSName + '.removeAllListeners();', 'TExtDomElement'); Result := Self; end; -function TExtMenuItem.SetText(Text : String) : TExtFunction; begin - JSCode(JSName + '.setText(' + VarToJSON([Text]) + ');', 'TExtMenuItem'); +function TExtDomElement.SwallowEvent(EventName : String; PreventDefault : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.swallowEvent(' + VarToJSON([EventName, PreventDefault]) + ');', 'TExtDomElement'); Result := Self; end; -function TExtMenuItem.SetTooltip(Tooltip : String) : TExtFunction; begin - JSCode(JSName + '.setTooltip(' + VarToJSON([Tooltip]) + ');', 'TExtMenuItem'); +function TExtDomElement.Un(EventName : String; Fn : TExtFunction; Scope : TExtObject) : TExtFunction; begin + JSCode(JSName + '.un(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtDomElement'); Result := Self; end; -destructor TExtMenuItem.Destroy; begin - try - FMenu.Free; - FMenuObject.Free; - FTooltipObject.Free; - except end; - inherited; +function TExtDomElement.Unmask : TExtFunction; begin + JSCode(JSName + '.unmask();', 'TExtDomElement'); + Result := Self; end; -procedure TExtMenuItem.HandleEvent(const AEvtName : string); begin +function TExtDomElement.Update(Html : String; LoadScripts : Boolean = false; Callback : TExtFunction = nil) : TExtFunction; begin + JSCode(JSName + '.update(' + VarToJSON([Html, LoadScripts, Callback, true]) + ');', 'TExtDomElement'); + Result := Self; +end; + +procedure TExtDomElement.HandleEvent(const AEvtName : string); begin inherited; - if (AEvtName = 'activate') and Assigned(FOnActivate) then - FOnActivate(TExtMenuItem(ParamAsObject('Item'))) + if (AEvtName = 'abort') and Assigned(FOnAbort) then + FOnAbort(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'blur') and Assigned(FOnBlur) then + FOnBlur(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'change') and Assigned(FOnChange) then + FOnChange(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) else if (AEvtName = 'click') and Assigned(FOnClick) then - FOnClick(TExtMenuItem(ParamAsObject('Item')), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'deactivate') and Assigned(FOnDeactivate) then - FOnDeactivate(TExtMenuItem(ParamAsObject('Item'))) - else if (AEvtName = 'iconchange') and Assigned(FOnIconchange) then - FOnIconchange(TExtMenuItem(ParamAsObject('This')), ParamAsString('OldIcon'), ParamAsString('NewIcon')) - else if (AEvtName = 'textchange') and Assigned(FOnTextchange) then - FOnTextchange(TExtMenuItem(ParamAsObject('This')), ParamAsString('OldText'), ParamAsString('NewText')); + FOnClick(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'contextmenu') and Assigned(FOnContextmenu) then + FOnContextmenu(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'dblclick') and Assigned(FOnDblclick) then + FOnDblclick(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'DOMActivate') and Assigned(FOnDOMActivate) then + FOnDOMActivate(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'DOMAttrModified') and Assigned(FOnDOMAttrModified) then + FOnDOMAttrModified(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'DOMCharacterDataModified') and Assigned(FOnDOMCharacterDataModified) then + FOnDOMCharacterDataModified(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'DOMFocusIn') and Assigned(FOnDOMFocusIn) then + FOnDOMFocusIn(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'DOMFocusOut') and Assigned(FOnDOMFocusOut) then + FOnDOMFocusOut(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'DOMNodeInserted') and Assigned(FOnDOMNodeInserted) then + FOnDOMNodeInserted(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'DOMNodeInsertedIntoDocument') and Assigned(FOnDOMNodeInsertedIntoDocument) then + FOnDOMNodeInsertedIntoDocument(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'DOMNodeRemoved') and Assigned(FOnDOMNodeRemoved) then + FOnDOMNodeRemoved(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'DOMNodeRemovedFromDocument') and Assigned(FOnDOMNodeRemovedFromDocument) then + FOnDOMNodeRemovedFromDocument(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'DOMSubtreeModified') and Assigned(FOnDOMSubtreeModified) then + FOnDOMSubtreeModified(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'error') and Assigned(FOnError) then + FOnError(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'focus') and Assigned(FOnFocus) then + FOnFocus(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'keydown') and Assigned(FOnKeydown) then + FOnKeydown(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'keypress') and Assigned(FOnKeypress) then + FOnKeypress(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'keyup') and Assigned(FOnKeyup) then + FOnKeyup(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'load') and Assigned(FOnLoad) then + FOnLoad(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'mousedown') and Assigned(FOnMousedown) then + FOnMousedown(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'mouseenter') and Assigned(FOnMouseenter) then + FOnMouseenter(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'mouseleave') and Assigned(FOnMouseleave) then + FOnMouseleave(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'mousemove') and Assigned(FOnMousemove) then + FOnMousemove(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'mouseout') and Assigned(FOnMouseout) then + FOnMouseout(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'mouseover') and Assigned(FOnMouseover) then + FOnMouseover(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'mouseup') and Assigned(FOnMouseup) then + FOnMouseup(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'reset') and Assigned(FOnReset) then + FOnReset(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'resize') and Assigned(FOnResize) then + FOnResize(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'scroll') and Assigned(FOnScroll) then + FOnScroll(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'select') and Assigned(FOnSelect) then + FOnSelect(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'submit') and Assigned(FOnSubmit) then + FOnSubmit(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) + else if (AEvtName = 'unload') and Assigned(FOnUnload) then + FOnUnload(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))); end; -procedure TExtStateCookieProvider.SetFDomain(Value : String); begin - FDomain := Value; - JSCode('domain:' + VarToJSON([Value])); +procedure TExtChartAxisGauge.SetFMargin(Value : Integer); begin + FMargin := Value; + JSCode('margin:' + VarToJSON([Value])); end; -procedure TExtStateCookieProvider.SetFExpires(Value : TDateTime); begin - FExpires := Value; - JSCode('expires:' + VarToJSON([Value])); +procedure TExtChartAxisGauge.SetFMaximum(Value : Integer); begin + FMaximum := Value; + JSCode('maximum:' + VarToJSON([Value])); end; -procedure TExtStateCookieProvider.SetFPath(Value : String); begin - FPath := Value; - JSCode('path:' + VarToJSON([Value])); +procedure TExtChartAxisGauge.SetFMinimum(Value : Integer); begin + FMinimum := Value; + JSCode('minimum:' + VarToJSON([Value])); end; -procedure TExtStateCookieProvider.SetFSecure(Value : Boolean); begin - FSecure := Value; - JSCode('secure:' + VarToJSON([Value])); +procedure TExtChartAxisGauge.SetFSteps(Value : Integer); begin + FSteps := Value; + JSCode('steps:' + VarToJSON([Value])); end; -function TExtStateCookieProvider.JSClassName : string; begin - Result := 'Ext.state.CookieProvider'; +procedure TExtChartAxisGauge.SetFTitle(Value : String); begin + FTitle := Value; + if not ConfigAvailable(JSName) then + SetTitle(Value) + else + JSCode('title:' + VarToJSON([Value])); end; -procedure TExtStateCookieProvider.InitDefaults; begin - inherited; - FDomain := 'www'; - FPath := '/'; +function TExtChartAxisGauge.JSClassName : string; begin + Result := 'Ext.chart.axis.Gauge'; end; -{$IFDEF FPC}constructor TExtStateCookieProvider.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtChartAxisGauge.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtStateCookieProvider.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +function TExtChartAxisGauge.SetTitle(Title : String) : TExtFunction; begin + JSCode(JSName + '.setTitle(' + VarToJSON([Title]) + ');', 'TExtChartAxisGauge'); + Result := Self; end; -procedure TExtUtilMixedCollection.SetFAllowFunctions(Value : Boolean); begin - FAllowFunctions := Value; - JSCode('allowFunctions:' + VarToJSON([Value])); +procedure TExtLoadMask.SetFConstrain(Value : Boolean); begin + FConstrain := Value; + JSCode('constrain:' + VarToJSON([Value])); end; -procedure TExtUtilMixedCollection.SetFDefaultSortDirection(Value : String); begin - FDefaultSortDirection := Value; - JSCode('defaultSortDirection:' + VarToJSON([Value])); +procedure TExtLoadMask.SetFFixed(Value : Boolean); begin + FFixed := Value; + JSCode('fixed:' + VarToJSON([Value])); end; -procedure TExtUtilMixedCollection.SetFSorters(Value : TExtObjectList); begin - FSorters := Value; - Value.DeleteFromGarbage; - JSCode('sorters:' + VarToJSON([Value, false])); +procedure TExtLoadMask.SetFFocusOnToFront(Value : Boolean); begin + FFocusOnToFront := Value; + JSCode('focusOnToFront:' + VarToJSON([Value])); end; -procedure TExtUtilMixedCollection.SetFSorters_(Value : TExtObjectList); begin - FSorters_ := Value; +procedure TExtLoadMask.SetFMaskCls(Value : String); begin + FMaskCls := Value; + JSCode('maskCls:' + VarToJSON([Value])); +end; + +procedure TExtLoadMask.SetFMsg(Value : String); begin + FMsg := Value; + JSCode('msg:' + VarToJSON([Value])); +end; + +procedure TExtLoadMask.SetFMsgCls(Value : String); begin + FMsgCls := Value; + JSCode('msgCls:' + VarToJSON([Value])); +end; + +procedure TExtLoadMask.SetFShadow(Value : String); begin + FShadow := Value; + JSCode('shadow:' + VarToJSON([Value])); +end; + +procedure TExtLoadMask.SetFShadowBoolean(Value : Boolean); begin + FShadowBoolean := Value; + JSCode('shadow:' + VarToJSON([Value])); +end; + +procedure TExtLoadMask.SetFShadowOffset(Value : Integer); begin + FShadowOffset := Value; + JSCode('shadowOffset:' + VarToJSON([Value])); +end; + +procedure TExtLoadMask.SetFStore(Value : TExtDataStore); begin + FStore := Value; Value.DeleteFromGarbage; - JSCode(JSName + '.sorters=' + VarToJSON([Value, false]) + ';'); + JSCode('store:' + VarToJSON([Value, false])); end; -procedure TExtUtilMixedCollection.SetFSortersList(Value : TExtObjectList); begin - FSortersList := Value; +procedure TExtLoadMask.SetFTarget(Value : TExtComponent); begin + FTarget := Value; Value.DeleteFromGarbage; - JSCode('sorters:' + VarToJSON([Value, false])); + JSCode('target:' + VarToJSON([Value, false])); end; -procedure TExtUtilMixedCollection.SetFSortRoot(Value : String); begin - FSortRoot := Value; - JSCode('sortRoot:' + VarToJSON([Value])); +procedure TExtLoadMask.SetFUseMsg(Value : Boolean); begin + FUseMsg := Value; + JSCode('useMsg:' + VarToJSON([Value])); end; -function TExtUtilMixedCollection.JSClassName : string; begin - Result := 'Ext.util.MixedCollection'; +procedure TExtLoadMask.SetFUseTargetEl(Value : Boolean); begin + FUseTargetEl := Value; + JSCode('useTargetEl:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtUtilMixedCollection.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtLoadMask.JSClassName : string; begin + Result := 'Ext.LoadMask'; +end; -constructor TExtUtilMixedCollection.Create(Config : TExtObject; ConfigAllowFunctions : Boolean = false; ConfigGetKey : TExtFunction = nil); begin - CreateVar(JSClassName + '(' + VarToJSON([Config, false, ConfigAllowFunctions, ConfigGetKey, true]) + ');'); - InitDefaults; +procedure TExtLoadMask.InitDefaults; begin + inherited; + FStore := TExtDataStore.CreateInternal(Self, 'store'); + FTarget := TExtComponent.CreateInternal(Self, 'target'); end; -function TExtUtilMixedCollection.FindInsertionIndex(NewItem : TExtObject; SorterFn : TExtFunction = nil) : TExtFunction; begin - JSCode(JSName + '.findInsertionIndex(' + VarToJSON([NewItem, false, SorterFn, true]) + ');', 'TExtUtilMixedCollection'); +{$IFDEF FPC}constructor TExtLoadMask.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtLoadMask.BindStore(Store : TExtDataStore) : TExtFunction; begin + JSCode(JSName + '.bindStore(' + VarToJSON([Store, false]) + ');', 'TExtLoadMask'); Result := Self; end; -function TExtUtilMixedCollection.GenerateComparator : TExtFunction; begin - JSCode(JSName + '.generateComparator();', 'TExtUtilMixedCollection'); +function TExtLoadMask.Center : TExtFunction; begin + JSCode(JSName + '.center();', 'TExtLoadMask'); Result := Self; end; -function TExtUtilMixedCollection.Reorder(Mapping : TExtObject) : TExtFunction; begin - JSCode(JSName + '.reorder(' + VarToJSON([Mapping, false]) + ');', 'TExtUtilMixedCollection'); +constructor TExtLoadMask.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; +end; + +function TExtLoadMask.DoConstrain(ConstrainTo : String = '') : TExtFunction; begin + JSCode(JSName + '.doConstrain(' + VarToJSON([ConstrainTo]) + ');', 'TExtLoadMask'); Result := Self; end; -function TExtUtilMixedCollection.Sort(Sorters : String = ''; Direction : String = '') : TExtFunction; begin - JSCode(JSName + '.sort(' + VarToJSON([Sorters, Direction]) + ');', 'TExtUtilMixedCollection'); +function TExtLoadMask.GetStore : TExtFunction; begin + JSCode(JSName + '.getStore();', 'TExtLoadMask'); Result := Self; end; -function TExtUtilMixedCollection.SortBy(SorterFn : TExtFunction) : TExtFunction; begin - JSCode(JSName + '.sortBy(' + VarToJSON([SorterFn, true]) + ');', 'TExtUtilMixedCollection'); +function TExtLoadMask.SetActive(Active : Boolean = false; NewActive : TExtComponent = nil) : TExtFunction; begin + JSCode(JSName + '.setActive(' + VarToJSON([Active, NewActive, false]) + ');', 'TExtLoadMask'); Result := Self; end; -function TExtUtilMixedCollection.SortByKey(Direction : String = ''; Fn : TExtFunction = nil) : TExtFunction; begin - JSCode(JSName + '.sortByKey(' + VarToJSON([Direction, Fn, true]) + ');', 'TExtUtilMixedCollection'); +function TExtLoadMask.ToBack : TExtFunction; begin + JSCode(JSName + '.toBack();', 'TExtLoadMask'); Result := Self; end; -procedure TExtGridPluginDragDrop.SetFContainerScroll(Value : TExtObject); begin - FContainerScroll := Value; - Value.DeleteFromGarbage; - JSCode('containerScroll:' + VarToJSON([Value, false])); +function TExtLoadMask.ToFront(PreventFocus : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.toFront(' + VarToJSON([PreventFocus]) + ');', 'TExtLoadMask'); + Result := Self; end; -procedure TExtGridPluginDragDrop.SetFContainerScrollBoolean(Value : Boolean); begin - FContainerScrollBoolean := Value; - JSCode('containerScroll:' + VarToJSON([Value])); +destructor TExtLoadMask.Destroy; begin + try + FStore.Free; + FTarget.Free; + except end; + inherited; end; -procedure TExtGridPluginDragDrop.SetFDdGroup(Value : String); begin - FDdGroup := Value; - JSCode('ddGroup:' + VarToJSON([Value])); +procedure TExtDataWriter.SetFIsWriter(Value : Boolean); begin + FIsWriter := Value; + JSCode(JSName + '.isWriter=' + VarToJSON([Value]) + ';'); end; -procedure TExtGridPluginDragDrop.SetFDragGroup(Value : String); begin - FDragGroup := Value; - JSCode('dragGroup:' + VarToJSON([Value])); +procedure TExtDataWriter.SetFWriteRecordId(Value : Boolean); begin + FWriteRecordId := Value; + JSCode('writeRecordId:' + VarToJSON([Value])); end; -procedure TExtGridPluginDragDrop.SetFDropGroup(Value : String); begin - FDropGroup := Value; - JSCode('dropGroup:' + VarToJSON([Value])); +function TExtDataWriter.JSClassName : string; begin + Result := 'Ext.data.writer.Writer'; end; -procedure TExtGridPluginDragDrop.SetFEnableDrag(Value : Boolean); begin - FEnableDrag := Value; - JSCode('enableDrag:' + VarToJSON([Value])); +{$IFDEF FPC}constructor TExtDataWriter.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtDataWriter.Create(Config : TExtObject = nil); begin + if Config = nil then CreateVar(JSClassName + '({});') else + CreateVar(JSClassName + '(' + VarToJSON([Config, false]) + ');'); + InitDefaults; end; -procedure TExtGridPluginDragDrop.SetFEnableDrop(Value : Boolean); begin - FEnableDrop := Value; - JSCode('enableDrop:' + VarToJSON([Value])); +function TExtDataWriter.GetRecordData(RecordJS : TExtDataModel; Operation : TExtDataOperation = nil) : TExtFunction; begin + JSCode(JSName + '.getRecordData(' + VarToJSON([RecordJS, false, Operation, false]) + ');', 'TExtDataWriter'); + Result := Self; end; -function TExtGridPluginDragDrop.JSClassName : string; begin - Result := 'Ext.grid.plugin.DragDrop'; +function TExtDataWriter.Write(Request : TExtDataRequest) : TExtFunction; begin + JSCode(JSName + '.write(' + VarToJSON([Request, false]) + ');', 'TExtDataWriter'); + Result := Self; end; -procedure TExtGridPluginDragDrop.InitDefaults; begin +function TExtChartMaskLayer.JSClassName : string; begin + Result := 'Ext.chart.MaskLayer'; +end; + +{$IFDEF FPC}constructor TExtChartMaskLayer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +procedure TExtLayoutContainerBoxOverflowMenu.SetFMenuItems(Value : TExtObjectList); begin + FMenuItems := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.menuItems=' + VarToJSON([Value, false]) + ';'); +end; + +procedure TExtLayoutContainerBoxOverflowMenu.SetFNoItemsMenuText(Value : String); begin + FNoItemsMenuText := Value; + JSCode(JSName + '.noItemsMenuText=' + VarToJSON([Value]) + ';'); +end; + +procedure TExtLayoutContainerBoxOverflowMenu.SetFTriggerButtonCls(Value : String); begin + FTriggerButtonCls := Value; + JSCode('triggerButtonCls:' + VarToJSON([Value])); +end; + +function TExtLayoutContainerBoxOverflowMenu.JSClassName : string; begin + Result := 'Ext.layout.container.boxOverflow.Menu'; +end; + +procedure TExtLayoutContainerBoxOverflowMenu.InitDefaults; begin inherited; - FContainerScroll := TExtObject.CreateInternal(Self, 'containerScroll'); + FMenuItems := TExtObjectList.Create(Self, 'menuItems'); end; -{$IFDEF FPC}constructor TExtGridPluginDragDrop.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtLayoutContainerBoxOverflowMenu.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtGridPluginDragDrop.Create; begin +constructor TExtLayoutContainerBoxOverflowMenu.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -destructor TExtGridPluginDragDrop.Destroy; begin +destructor TExtLayoutContainerBoxOverflowMenu.Destroy; begin try - FContainerScroll.Free; + FMenuItems.Free; except end; inherited; end; -procedure TExtGridPluginEditing.SetFClicksToEdit(Value : Integer); begin - FClicksToEdit := Value; - JSCode('clicksToEdit:' + VarToJSON([Value])); +procedure TExtLayoutContainerBoxOverflowScroller.SetFAfterCtCls(Value : String); begin + FAfterCtCls := Value; + JSCode('afterCtCls:' + VarToJSON([Value])); end; -procedure TExtGridPluginEditing.SetFEditing(Value : Boolean); begin - FEditing := Value; - JSCode(JSName + '.editing=' + VarToJSON([Value]) + ';'); +procedure TExtLayoutContainerBoxOverflowScroller.SetFAfterScrollerCls(Value : String); begin + FAfterScrollerCls := Value; + JSCode('afterScrollerCls:' + VarToJSON([Value])); end; -procedure TExtGridPluginEditing.SetFHasListeners(Value : TExtObject); begin +procedure TExtLayoutContainerBoxOverflowScroller.SetFAnimateScroll(Value : Boolean); begin + FAnimateScroll := Value; + JSCode('animateScroll:' + VarToJSON([Value])); +end; + +procedure TExtLayoutContainerBoxOverflowScroller.SetFBeforeCtCls(Value : String); begin + FBeforeCtCls := Value; + JSCode('beforeCtCls:' + VarToJSON([Value])); +end; + +procedure TExtLayoutContainerBoxOverflowScroller.SetFBeforeScrollerCls(Value : String); begin + FBeforeScrollerCls := Value; + JSCode('beforeScrollerCls:' + VarToJSON([Value])); +end; + +procedure TExtLayoutContainerBoxOverflowScroller.SetFHasListeners(Value : TExtObject); begin FHasListeners := Value; Value.DeleteFromGarbage; JSCode(JSName + '.hasListeners=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtGridPluginEditing.SetFIsObservable(Value : Boolean); begin +procedure TExtLayoutContainerBoxOverflowScroller.SetFIsObservable(Value : Boolean); begin FIsObservable := Value; JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); end; -procedure TExtGridPluginEditing.SetFListeners(Value : TExtObject); begin +procedure TExtLayoutContainerBoxOverflowScroller.SetFListeners(Value : TExtObject); begin FListeners := Value; Value.DeleteFromGarbage; JSCode('listeners:' + VarToJSON([Value, false])); end; -procedure TExtGridPluginEditing.SetFTriggerEvent(Value : String); begin - FTriggerEvent := Value; - JSCode('triggerEvent:' + VarToJSON([Value])); +procedure TExtLayoutContainerBoxOverflowScroller.SetFScrollDuration(Value : Integer); begin + FScrollDuration := Value; + JSCode('scrollDuration:' + VarToJSON([Value])); end; -function TExtGridPluginEditing.JSClassName : string; begin - Result := 'Ext.grid.plugin.Editing'; +procedure TExtLayoutContainerBoxOverflowScroller.SetFScrollerCls(Value : String); begin + FScrollerCls := Value; + JSCode('scrollerCls:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtGridPluginEditing.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtLayoutContainerBoxOverflowScroller.SetFScrollIncrement(Value : Integer); begin + FScrollIncrement := Value; + JSCode('scrollIncrement:' + VarToJSON([Value])); +end; -function TExtGridPluginEditing.AddEvents(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtGridPluginEditing'); - Result := Self; +procedure TExtLayoutContainerBoxOverflowScroller.SetFScrollRepeatInterval(Value : Integer); begin + FScrollRepeatInterval := Value; + JSCode('scrollRepeatInterval:' + VarToJSON([Value])); +end; + +procedure TExtLayoutContainerBoxOverflowScroller.SetFWheelIncrement(Value : Integer); begin + FWheelIncrement := Value; + JSCode('wheelIncrement:' + VarToJSON([Value])); +end; + +procedure TExtLayoutContainerBoxOverflowScroller.SetFOnScroll(Value : TExtLayoutContainerBoxOverflowScrollerOnScroll); begin + if Assigned(FOnScroll) then + JSCode(JSName+'.events ["scroll"].listeners=[];'); + if Assigned(Value) then + AddListener('scroll', Ajax('scroll', ['Scroller', '%0.nm','NewPosition', '%1','Animate', '%2'], true)); + FOnScroll := Value; end; -function TExtGridPluginEditing.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtGridPluginEditing'); - Result := Self; +function TExtLayoutContainerBoxOverflowScroller.JSClassName : string; begin + Result := 'Ext.layout.container.boxOverflow.Scroller'; end; -function TExtGridPluginEditing.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtGridPluginEditing'); +{$IFDEF FPC}constructor TExtLayoutContainerBoxOverflowScroller.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtLayoutContainerBoxOverflowScroller.AddEvents(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtLayoutContainerBoxOverflowScroller'); Result := Self; end; -function TExtGridPluginEditing.CancelEdit : TExtFunction; begin - JSCode(JSName + '.cancelEdit();', 'TExtGridPluginEditing'); +function TExtLayoutContainerBoxOverflowScroller.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtLayoutContainerBoxOverflowScroller'); Result := Self; end; -function TExtGridPluginEditing.ClearListeners : TExtFunction; begin - JSCode(JSName + '.clearListeners();', 'TExtGridPluginEditing'); +function TExtLayoutContainerBoxOverflowScroller.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtLayoutContainerBoxOverflowScroller'); Result := Self; end; -function TExtGridPluginEditing.ClearManagedListeners : TExtFunction; begin - JSCode(JSName + '.clearManagedListeners();', 'TExtGridPluginEditing'); +function TExtLayoutContainerBoxOverflowScroller.ClearListeners : TExtFunction; begin + JSCode(JSName + '.clearListeners();', 'TExtLayoutContainerBoxOverflowScroller'); Result := Self; end; -function TExtGridPluginEditing.CompleteEdit : TExtFunction; begin - JSCode(JSName + '.completeEdit();', 'TExtGridPluginEditing'); +function TExtLayoutContainerBoxOverflowScroller.ClearManagedListeners : TExtFunction; begin + JSCode(JSName + '.clearManagedListeners();', 'TExtLayoutContainerBoxOverflowScroller'); Result := Self; end; -constructor TExtGridPluginEditing.Create; begin +constructor TExtLayoutContainerBoxOverflowScroller.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -function TExtGridPluginEditing.EnableBubble(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtGridPluginEditing'); +function TExtLayoutContainerBoxOverflowScroller.EnableBubble(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtLayoutContainerBoxOverflowScroller'); Result := Self; end; -function TExtGridPluginEditing.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtGridPluginEditing'); +function TExtLayoutContainerBoxOverflowScroller.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtLayoutContainerBoxOverflowScroller'); Result := Self; end; -function TExtGridPluginEditing.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtGridPluginEditing'); +function TExtLayoutContainerBoxOverflowScroller.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtLayoutContainerBoxOverflowScroller'); Result := Self; end; -function TExtGridPluginEditing.HasListener(EventName : String) : TExtFunction; begin - JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtGridPluginEditing'); +function TExtLayoutContainerBoxOverflowScroller.GetScrollPosition : TExtFunction; begin + JSCode(JSName + '.getScrollPosition();', 'TExtLayoutContainerBoxOverflowScroller'); Result := Self; end; -function TExtGridPluginEditing.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin - JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtGridPluginEditing'); +function TExtLayoutContainerBoxOverflowScroller.HasListener(EventName : String) : TExtFunction; begin + JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtLayoutContainerBoxOverflowScroller'); Result := Self; end; -function TExtGridPluginEditing.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtGridPluginEditing'); +function TExtLayoutContainerBoxOverflowScroller.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin + JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtLayoutContainerBoxOverflowScroller'); Result := Self; end; -function TExtGridPluginEditing.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtGridPluginEditing'); +function TExtLayoutContainerBoxOverflowScroller.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtLayoutContainerBoxOverflowScroller'); Result := Self; end; -function TExtGridPluginEditing.ResumeEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtGridPluginEditing'); +function TExtLayoutContainerBoxOverflowScroller.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtLayoutContainerBoxOverflowScroller'); Result := Self; end; -function TExtGridPluginEditing.ResumeEvents : TExtFunction; begin - JSCode(JSName + '.resumeEvents();', 'TExtGridPluginEditing'); +function TExtLayoutContainerBoxOverflowScroller.ResumeEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtLayoutContainerBoxOverflowScroller'); Result := Self; end; -function TExtGridPluginEditing.SuspendEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtGridPluginEditing'); +function TExtLayoutContainerBoxOverflowScroller.ResumeEvents : TExtFunction; begin + JSCode(JSName + '.resumeEvents();', 'TExtLayoutContainerBoxOverflowScroller'); Result := Self; end; -function TExtGridPluginEditing.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin - JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtGridPluginEditing'); +function TExtLayoutContainerBoxOverflowScroller.ScrollToItem(Item : Integer; Animate : Boolean) : TExtFunction; begin + JSCode(JSName + '.scrollToItem(' + VarToJSON([Item, Animate]) + ');', 'TExtLayoutContainerBoxOverflowScroller'); Result := Self; end; -function TExtGridPluginHeaderReorderer.JSClassName : string; begin - Result := 'Ext.grid.plugin.HeaderReorderer'; +function TExtLayoutContainerBoxOverflowScroller.SuspendEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtLayoutContainerBoxOverflowScroller'); + Result := Self; end; -{$IFDEF FPC}constructor TExtGridPluginHeaderReorderer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtDataProxyClient.SetFIsSynchronous(Value : Boolean); begin - FIsSynchronous := Value; - JSCode(JSName + '.isSynchronous=' + VarToJSON([Value]) + ';'); +function TExtLayoutContainerBoxOverflowScroller.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin + JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtLayoutContainerBoxOverflowScroller'); + Result := Self; end; -function TExtDataProxyClient.JSClassName : string; begin - Result := 'Ext.data.proxy.Client'; +procedure TExtLayoutContainerBoxOverflowScroller.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'scroll') and Assigned(FOnScroll) then + FOnScroll(TExtLayoutContainerBoxOverflowScroller(ParamAsObject('Scroller')), ParamAsInteger('NewPosition'), ParamAsBoolean('Animate')); end; -{$IFDEF FPC}constructor TExtDataProxyClient.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDataProxyClient.Clear : TExtFunction; begin - JSCode(JSName + '.clear();', 'TExtDataProxyClient'); - Result := Self; +procedure TExtLayoutContainer.SetFItemCls(Value : String); begin + FItemCls := Value; + JSCode('itemCls:' + VarToJSON([Value])); end; -procedure TExtLoadMask.SetFConstrain(Value : Boolean); begin - FConstrain := Value; - JSCode('constrain:' + VarToJSON([Value])); +procedure TExtLayoutContainer.SetFOverflowPadderEl(Value : TExtElement); begin + FOverflowPadderEl := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.overflowPadderEl=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtLoadMask.SetFFixed(Value : Boolean); begin - FFixed := Value; - JSCode('fixed:' + VarToJSON([Value])); +function TExtLayoutContainer.JSClassName : string; begin + Result := 'Ext.layout.container.Container'; end; -procedure TExtLoadMask.SetFFocusOnToFront(Value : Boolean); begin - FFocusOnToFront := Value; - JSCode('focusOnToFront:' + VarToJSON([Value])); +procedure TExtLayoutContainer.InitDefaults; begin + inherited; + FOverflowPadderEl := TExtElement.CreateInternal(Self, 'overflowPadderEl'); end; -procedure TExtLoadMask.SetFMaskCls(Value : String); begin - FMaskCls := Value; - JSCode('maskCls:' + VarToJSON([Value])); +{$IFDEF FPC}constructor TExtLayoutContainer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtLayoutContainer.AddChildEls : TExtFunction; begin + JSCode(JSName + '.addChildEls();', 'TExtLayoutContainer'); + Result := Self; end; -procedure TExtLoadMask.SetFMsg(Value : String); begin - FMsg := Value; - JSCode('msg:' + VarToJSON([Value])); +function TExtLayoutContainer.BeginLayout : TExtFunction; begin + JSCode(JSName + '.beginLayout();', 'TExtLayoutContainer'); + Result := Self; end; -procedure TExtLoadMask.SetFMsgCls(Value : String); begin - FMsgCls := Value; - JSCode('msgCls:' + VarToJSON([Value])); +constructor TExtLayoutContainer.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtLoadMask.SetFShadow(Value : String); begin - FShadow := Value; - JSCode('shadow:' + VarToJSON([Value])); +function TExtLayoutContainer.GetElementTarget : TExtFunction; begin + JSCode(JSName + '.getElementTarget();', 'TExtLayoutContainer'); + Result := Self; end; -procedure TExtLoadMask.SetFShadowBoolean(Value : Boolean); begin - FShadowBoolean := Value; - JSCode('shadow:' + VarToJSON([Value])); +function TExtLayoutContainer.GetLayoutItems : TExtFunction; begin + JSCode(JSName + '.getLayoutItems();', 'TExtLayoutContainer'); + Result := Self; end; -procedure TExtLoadMask.SetFShadowOffset(Value : Integer); begin - FShadowOffset := Value; - JSCode('shadowOffset:' + VarToJSON([Value])); +function TExtLayoutContainer.GetRenderTarget : TExtFunction; begin + JSCode(JSName + '.getRenderTarget();', 'TExtLayoutContainer'); + Result := Self; end; -procedure TExtLoadMask.SetFStore(Value : TExtDataStore); begin - FStore := Value; - Value.DeleteFromGarbage; - JSCode('store:' + VarToJSON([Value, false])); +function TExtLayoutContainer.GetTarget : TExtFunction; begin + JSCode(JSName + '.getTarget();', 'TExtLayoutContainer'); + Result := Self; end; -procedure TExtLoadMask.SetFTarget(Value : TExtComponent); begin - FTarget := Value; - Value.DeleteFromGarbage; - JSCode('target:' + VarToJSON([Value, false])); +function TExtLayoutContainer.RemoveChildEls(TestFn : TExtFunction) : TExtFunction; begin + JSCode(JSName + '.removeChildEls(' + VarToJSON([TestFn, true]) + ');', 'TExtLayoutContainer'); + Result := Self; end; -procedure TExtLoadMask.SetFUseMsg(Value : Boolean); begin - FUseMsg := Value; - JSCode('useMsg:' + VarToJSON([Value])); +destructor TExtLayoutContainer.Destroy; begin + try + FOverflowPadderEl.Free; + except end; + inherited; end; -procedure TExtLoadMask.SetFUseTargetEl(Value : Boolean); begin - FUseTargetEl := Value; - JSCode('useTargetEl:' + VarToJSON([Value])); +procedure TExtDdStatusProxy.SetFDropAllowed(Value : String); begin + FDropAllowed := Value; + JSCode('dropAllowed:' + VarToJSON([Value])); end; -function TExtLoadMask.JSClassName : string; begin - Result := 'Ext.LoadMask'; +procedure TExtDdStatusProxy.SetFDropNotAllowed(Value : String); begin + FDropNotAllowed := Value; + JSCode('dropNotAllowed:' + VarToJSON([Value])); end; -procedure TExtLoadMask.InitDefaults; begin - inherited; - FStore := TExtDataStore.CreateInternal(Self, 'store'); - FTarget := TExtComponent.CreateInternal(Self, 'target'); +function TExtDdStatusProxy.JSClassName : string; begin + Result := 'Ext.dd.StatusProxy'; end; -{$IFDEF FPC}constructor TExtLoadMask.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtDdStatusProxy.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtLoadMask.BindStore(Store : TExtDataStore) : TExtFunction; begin - JSCode(JSName + '.bindStore(' + VarToJSON([Store, false]) + ');', 'TExtLoadMask'); +function TExtDdStatusProxy.GetGhost : TExtFunction; begin + JSCode(JSName + '.getGhost();', 'TExtDdStatusProxy'); Result := Self; end; -function TExtLoadMask.Center : TExtFunction; begin - JSCode(JSName + '.center();', 'TExtLoadMask'); +function TExtDdStatusProxy.Hide(Clear : Boolean) : TExtFunction; begin + JSCode(JSName + '.hide(' + VarToJSON([Clear]) + ');', 'TExtDdStatusProxy'); Result := Self; end; -constructor TExtLoadMask.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +function TExtDdStatusProxy.Repair(Xy : TArrayOfInteger; Callback : TExtFunction; Scope : TExtObject) : TExtFunction; begin + JSCode(JSName + '.repair(' + VarToJSON([Xy, Callback, true, Scope, false]) + ');', 'TExtDdStatusProxy'); + Result := Self; end; -function TExtLoadMask.DoConstrain(ConstrainTo : String = '') : TExtFunction; begin - JSCode(JSName + '.doConstrain(' + VarToJSON([ConstrainTo]) + ');', 'TExtLoadMask'); +function TExtDdStatusProxy.Reset(ClearGhost : Boolean) : TExtFunction; begin + JSCode(JSName + '.reset(' + VarToJSON([ClearGhost]) + ');', 'TExtDdStatusProxy'); Result := Self; end; -function TExtLoadMask.GetStore : TExtFunction; begin - JSCode(JSName + '.getStore();', 'TExtLoadMask'); +function TExtDdStatusProxy.SetStatus(CssClass : String) : TExtFunction; begin + JSCode(JSName + '.setStatus(' + VarToJSON([CssClass]) + ');', 'TExtDdStatusProxy'); Result := Self; end; -function TExtLoadMask.SetActive(Active : Boolean = false; NewActive : TExtComponent = nil) : TExtFunction; begin - JSCode(JSName + '.setActive(' + VarToJSON([Active, NewActive, false]) + ');', 'TExtLoadMask'); +function TExtDdStatusProxy.Stop : TExtFunction; begin + JSCode(JSName + '.stop();', 'TExtDdStatusProxy'); Result := Self; end; -function TExtLoadMask.ToBack : TExtFunction; begin - JSCode(JSName + '.toBack();', 'TExtLoadMask'); +function TExtDdStatusProxy.Sync : TExtFunction; begin + JSCode(JSName + '.sync();', 'TExtDdStatusProxy'); Result := Self; end; -function TExtLoadMask.ToFront(PreventFocus : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.toFront(' + VarToJSON([PreventFocus]) + ');', 'TExtLoadMask'); +function TExtDdStatusProxy.Update(Html : String) : TExtFunction; begin + JSCode(JSName + '.update(' + VarToJSON([Html]) + ');', 'TExtDdStatusProxy'); Result := Self; end; -destructor TExtLoadMask.Destroy; begin - try - FStore.Free; - FTarget.Free; - except end; - inherited; +function TExtDomCompositeElement.JSClassName : string; begin + Result := 'Ext.dom.CompositeElement'; end; -function TExtGridPluginDivRenderer.JSClassName : string; begin - Result := 'Ext.grid.plugin.DivRenderer'; +{$IFDEF FPC}constructor TExtDomCompositeElement.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtStateLocalStorageProvider.JSClassName : string; begin + Result := 'Ext.state.LocalStorageProvider'; end; -{$IFDEF FPC}constructor TExtGridPluginDivRenderer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtStateLocalStorageProvider.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtDataAbstractStore.SetFFilters(Value : TExtObjectList); begin - FFilters := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.filters=' + VarToJSON([Value, false]) + ';'); +procedure TExtStateCookieProvider.SetFDomain(Value : String); begin + FDomain := Value; + JSCode('domain:' + VarToJSON([Value])); end; -function TExtDataAbstractStore.JSClassName : string; begin - Result := 'Ext.data.AbstractStore'; +procedure TExtStateCookieProvider.SetFExpires(Value : TDateTime); begin + FExpires := Value; + JSCode('expires:' + VarToJSON([Value])); end; -procedure TExtDataAbstractStore.InitDefaults; begin +procedure TExtStateCookieProvider.SetFPath(Value : String); begin + FPath := Value; + JSCode('path:' + VarToJSON([Value])); +end; + +procedure TExtStateCookieProvider.SetFSecure(Value : Boolean); begin + FSecure := Value; + JSCode('secure:' + VarToJSON([Value])); +end; + +function TExtStateCookieProvider.JSClassName : string; begin + Result := 'Ext.state.CookieProvider'; +end; + +procedure TExtStateCookieProvider.InitDefaults; begin inherited; - FFilters := TExtObjectList.Create(Self, 'filters'); + FDomain := 'www'; + FPath := '/'; end; -{$IFDEF FPC}constructor TExtDataAbstractStore.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtStateCookieProvider.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtDataAbstractStore.Create; begin +constructor TExtStateCookieProvider.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -function TExtDataAbstractStore.GetModifiedRecords : TExtFunction; begin - JSCode(JSName + '.getModifiedRecords();', 'TExtDataAbstractStore'); - Result := Self; +procedure TExtUtilMixedCollection.SetFAllowFunctions(Value : Boolean); begin + FAllowFunctions := Value; + JSCode('allowFunctions:' + VarToJSON([Value])); end; -function TExtDataAbstractStore.GetNewRecords : TExtFunction; begin - JSCode(JSName + '.getNewRecords();', 'TExtDataAbstractStore'); - Result := Self; +procedure TExtUtilMixedCollection.SetFDefaultSortDirection(Value : String); begin + FDefaultSortDirection := Value; + JSCode('defaultSortDirection:' + VarToJSON([Value])); end; -function TExtDataAbstractStore.GetProxy : TExtFunction; begin - JSCode(JSName + '.getProxy();', 'TExtDataAbstractStore'); - Result := Self; +procedure TExtUtilMixedCollection.SetFIsSortable(Value : Boolean); begin + FIsSortable := Value; + JSCode(JSName + '.isSortable=' + VarToJSON([Value]) + ';'); end; -function TExtDataAbstractStore.GetRemovedRecords : TExtFunction; begin - JSCode(JSName + '.getRemovedRecords();', 'TExtDataAbstractStore'); - Result := Self; +procedure TExtUtilMixedCollection.SetFSorters(Value : TExtObjectList); begin + FSorters := Value; + Value.DeleteFromGarbage; + JSCode('sorters:' + VarToJSON([Value, false])); end; -function TExtDataAbstractStore.GetUpdatedRecords : TExtFunction; begin - JSCode(JSName + '.getUpdatedRecords();', 'TExtDataAbstractStore'); - Result := Self; +procedure TExtUtilMixedCollection.SetFSorters_(Value : TExtObjectList); begin + FSorters_ := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.sorters=' + VarToJSON([Value, false]) + ';'); end; -function TExtDataAbstractStore.Load(Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.load(' + VarToJSON([Options, false]) + ');', 'TExtDataAbstractStore'); - Result := Self; +procedure TExtUtilMixedCollection.SetFSortersList(Value : TExtObjectList); begin + FSortersList := Value; + Value.DeleteFromGarbage; + JSCode('sorters:' + VarToJSON([Value, false])); end; -function TExtDataAbstractStore.Reload(Options : TExtObject) : TExtFunction; begin - JSCode(JSName + '.reload(' + VarToJSON([Options, false]) + ');', 'TExtDataAbstractStore'); - Result := Self; +procedure TExtUtilMixedCollection.SetFSortRoot(Value : String); begin + FSortRoot := Value; + JSCode('sortRoot:' + VarToJSON([Value])); end; -function TExtDataAbstractStore.ResumeAutoSync : TExtFunction; begin - JSCode(JSName + '.resumeAutoSync();', 'TExtDataAbstractStore'); +function TExtUtilMixedCollection.JSClassName : string; begin + Result := 'Ext.util.MixedCollection'; +end; + +{$IFDEF FPC}constructor TExtUtilMixedCollection.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtUtilMixedCollection.Create(Config : TExtObject; ConfigAllowFunctions : Boolean = false; ConfigGetKey : TExtFunction = nil); begin + CreateVar(JSClassName + '(' + VarToJSON([Config, false, ConfigAllowFunctions, ConfigGetKey, true]) + ');'); + InitDefaults; +end; + +function TExtUtilMixedCollection.FindInsertionIndex(NewItem : TExtObject; SorterFn : TExtFunction = nil) : TExtFunction; begin + JSCode(JSName + '.findInsertionIndex(' + VarToJSON([NewItem, false, SorterFn, true]) + ');', 'TExtUtilMixedCollection'); Result := Self; end; -function TExtDataAbstractStore.SetProxy(Proxy : String) : TExtFunction; begin - JSCode(JSName + '.setProxy(' + VarToJSON([Proxy]) + ');', 'TExtDataAbstractStore'); +function TExtUtilMixedCollection.GenerateComparator : TExtFunction; begin + JSCode(JSName + '.generateComparator();', 'TExtUtilMixedCollection'); Result := Self; end; -function TExtDataAbstractStore.SuspendAutoSync : TExtFunction; begin - JSCode(JSName + '.suspendAutoSync();', 'TExtDataAbstractStore'); +function TExtUtilMixedCollection.Reorder(Mapping : TExtObject) : TExtFunction; begin + JSCode(JSName + '.reorder(' + VarToJSON([Mapping, false]) + ');', 'TExtUtilMixedCollection'); Result := Self; end; -function TExtDataAbstractStore.Sync(Options : TExtObject = nil; OptionsBatch : TExtDataBatch = nil; OptionsCallback : TExtFunction = nil; OptionsCallbackBatch : TExtDataBatch = nil; OptionsCallbackOptions : TExtObject = nil; OptionsSuccess : TExtFunction = nil; OptionsSuccessBatch : TExtDataBatch = nil; OptionsSuccessOptions : TExtObject = nil; OptionsFailure : TExtFunction = nil; OptionsFailureBatch : TExtDataBatch = nil; OptionsFailureOptions : TExtObject = nil; OptionsScope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.sync(' + VarToJSON([Options, false, OptionsBatch, false, OptionsCallback, true, OptionsCallbackBatch, false, OptionsCallbackOptions, false, OptionsSuccess, true, OptionsSuccessBatch, false, OptionsSuccessOptions, false, OptionsFailure, true, OptionsFailureBatch, false, OptionsFailureOptions, false, OptionsScope, false]) + ');', 'TExtDataAbstractStore'); +function TExtUtilMixedCollection.Sort(Sorters : String = ''; Direction : String = '') : TExtFunction; begin + JSCode(JSName + '.sort(' + VarToJSON([Sorters, Direction]) + ');', 'TExtUtilMixedCollection'); Result := Self; end; -destructor TExtDataAbstractStore.Destroy; begin - try - FFilters.Free; - except end; - inherited; +function TExtUtilMixedCollection.SortBy(SorterFn : TExtFunction) : TExtFunction; begin + JSCode(JSName + '.sortBy(' + VarToJSON([SorterFn, true]) + ');', 'TExtUtilMixedCollection'); + Result := Self; end; -function TExtFormActionLoad.JSClassName : string; begin - Result := 'Ext.form.action.Load'; +function TExtUtilMixedCollection.SortByKey(Direction : String = ''; Fn : TExtFunction = nil) : TExtFunction; begin + JSCode(JSName + '.sortByKey(' + VarToJSON([Direction, Fn, true]) + ');', 'TExtUtilMixedCollection'); + Result := Self; end; -{$IFDEF FPC}constructor TExtFormActionLoad.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtDataProxyClient.SetFIsSynchronous(Value : Boolean); begin + FIsSynchronous := Value; + JSCode(JSName + '.isSynchronous=' + VarToJSON([Value]) + ';'); +end; -function TExtResizerSplitterTracker.JSClassName : string; begin - Result := 'Ext.resizer.SplitterTracker'; +function TExtDataProxyClient.JSClassName : string; begin + Result := 'Ext.data.proxy.Client'; end; -{$IFDEF FPC}constructor TExtResizerSplitterTracker.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtDataProxyClient.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtDataTreeModel.JSClassName : string; begin - Result := 'Ext.data.TreeModel'; +function TExtDataProxyClient.Clear : TExtFunction; begin + JSCode(JSName + '.clear();', 'TExtDataProxyClient'); + Result := Self; end; -{$IFDEF FPC}constructor TExtDataTreeModel.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtAppApplication.SetFAppFolder(Value : String); begin - FAppFolder := Value; - JSCode('appFolder:' + VarToJSON([Value])); +procedure TExtChartAxis.SetFAdjustEnd(Value : Boolean); begin + FAdjustEnd := Value; + JSCode('adjustEnd:' + VarToJSON([Value])); end; -procedure TExtAppApplication.SetFAppProperty(Value : String); begin - FAppProperty := Value; - JSCode('appProperty:' + VarToJSON([Value])); +procedure TExtChartAxis.SetFDashSize(Value : Integer); begin + FDashSize := Value; + JSCode('dashSize:' + VarToJSON([Value])); end; -procedure TExtAppApplication.SetFAutoCreateViewport(Value : Boolean); begin - FAutoCreateViewport := Value; - JSCode('autoCreateViewport:' + VarToJSON([Value])); +procedure TExtChartAxis.SetFGrid(Value : Boolean); begin + FGrid := Value; + JSCode('grid:' + VarToJSON([Value])); end; -procedure TExtAppApplication.SetFControllers(Value : TExtObjectList); begin - FControllers := Value; +procedure TExtChartAxis.SetFGridObject(Value : TExtObject); begin + FGridObject := Value; Value.DeleteFromGarbage; - JSCode('controllers:' + VarToJSON([Value, false])); + JSCode('grid:' + VarToJSON([Value, false])); end; -procedure TExtAppApplication.SetFEnableQuickTips(Value : Boolean); begin - FEnableQuickTips := Value; - JSCode('enableQuickTips:' + VarToJSON([Value])); +procedure TExtChartAxis.SetFLength(Value : Integer); begin + FLength := Value; + JSCode('length:' + VarToJSON([Value])); end; -procedure TExtAppApplication.SetFName(Value : String); begin - FName := Value; - JSCode('name:' + VarToJSON([Value])); +procedure TExtChartAxis.SetFMajorTickSteps(Value : Integer); begin + FMajorTickSteps := Value; + JSCode('majorTickSteps:' + VarToJSON([Value])); end; -procedure TExtAppApplication.SetFNamespaces(Value : TExtObjectList); begin - FNamespaces := Value; - Value.DeleteFromGarbage; - JSCode('namespaces:' + VarToJSON([Value, false])); +procedure TExtChartAxis.SetFMinorTickSteps(Value : Integer); begin + FMinorTickSteps := Value; + JSCode('minorTickSteps:' + VarToJSON([Value])); end; -procedure TExtAppApplication.SetFPaths(Value : TExtObject); begin - FPaths := Value; - Value.DeleteFromGarbage; - JSCode('paths:' + VarToJSON([Value, false])); +procedure TExtChartAxis.SetFPosition(Value : String); begin + FPosition := Value; + JSCode('position:' + VarToJSON([Value])); end; -procedure TExtAppApplication.SetFScope(Value : TExtObject); begin - FScope := Value; - Value.DeleteFromGarbage; - JSCode('scope:' + VarToJSON([Value, false])); +procedure TExtChartAxis.SetFTitle(Value : String); begin + FTitle := Value; + if not ConfigAvailable(JSName) then + SetTitle(Value) + else + JSCode('title:' + VarToJSON([Value])); end; -function TExtAppApplication.JSClassName : string; begin - Result := 'Ext.app.Application'; +procedure TExtChartAxis.SetFWidth(Value : Integer); begin + FWidth := Value; + JSCode('width:' + VarToJSON([Value])); end; -procedure TExtAppApplication.InitDefaults; begin +function TExtChartAxis.JSClassName : string; begin + Result := 'Ext.chart.axis.Axis'; +end; + +procedure TExtChartAxis.InitDefaults; begin inherited; - FControllers := TExtObjectList.Create(Self, 'controllers'); - FNamespaces := TExtObjectList.Create(Self, 'namespaces'); - FPaths := TExtObject.CreateInternal(Self, 'paths'); - FScope := TExtObject.CreateInternal(Self, 'scope'); + FGridObject := TExtObject.CreateInternal(Self, 'grid'); end; -{$IFDEF FPC}constructor TExtAppApplication.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtChartAxis.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtAppApplication.Create; begin +constructor TExtChartAxis.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -destructor TExtAppApplication.Destroy; begin +function TExtChartAxis.DrawAxis : TExtFunction; begin + JSCode(JSName + '.drawAxis();', 'TExtChartAxis'); + Result := Self; +end; + +function TExtChartAxis.DrawGrid : TExtFunction; begin + JSCode(JSName + '.drawGrid();', 'TExtChartAxis'); + Result := Self; +end; + +function TExtChartAxis.DrawLabel : TExtFunction; begin + JSCode(JSName + '.drawLabel();', 'TExtChartAxis'); + Result := Self; +end; + +function TExtChartAxis.SetTitle(Title : String) : TExtFunction; begin + JSCode(JSName + '.setTitle(' + VarToJSON([Title]) + ');', 'TExtChartAxis'); + Result := Self; +end; + +destructor TExtChartAxis.Destroy; begin try - FControllers.Free; - FNamespaces.Free; - FPaths.Free; - FScope.Free; + FGridObject.Free; except end; inherited; end; -procedure TExtDataUuidGenerator.SetFVersion(Value : Integer); begin - FVersion := Value; - JSCode('version:' + VarToJSON([Value])); -end; - -function TExtDataUuidGenerator.JSClassName : string; begin - Result := 'Ext.data.UuidGenerator'; +function TExtUtilTaskManagerSingleton.JSClassName : string; begin + Result := 'Ext.util.TaskManager'; end; -{$IFDEF FPC}constructor TExtDataUuidGenerator.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtUtilTaskManagerSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtDataUuidGenerator.Reconfigure : TExtFunction; begin - JSCode(JSName + '.reconfigure();', 'TExtDataUuidGenerator'); - Result := Self; +procedure TExtMenuItem.SetFActivated(Value : Boolean); begin + FActivated := Value; + JSCode(JSName + '.activated=' + VarToJSON([Value]) + ';'); end; -procedure TExtFlashComponent.SetFBackgroundColor(Value : String); begin - FBackgroundColor := Value; - JSCode('backgroundColor:' + VarToJSON([Value])); +procedure TExtMenuItem.SetFActiveCls(Value : String); begin + FActiveCls := Value; + JSCode('activeCls:' + VarToJSON([Value])); end; -procedure TExtFlashComponent.SetFExpressInstall(Value : Boolean); begin - FExpressInstall := Value; - JSCode('expressInstall:' + VarToJSON([Value])); +procedure TExtMenuItem.SetFCanActivate(Value : Boolean); begin + FCanActivate := Value; + JSCode('canActivate:' + VarToJSON([Value])); end; -procedure TExtFlashComponent.SetFFlashAttributes(Value : TExtObject); begin - FFlashAttributes := Value; - Value.DeleteFromGarbage; - JSCode('flashAttributes:' + VarToJSON([Value, false])); +procedure TExtMenuItem.SetFClickHideDelay(Value : Integer); begin + FClickHideDelay := Value; + JSCode('clickHideDelay:' + VarToJSON([Value])); end; -procedure TExtFlashComponent.SetFFlashParams(Value : TExtObject); begin - FFlashParams := Value; - Value.DeleteFromGarbage; - JSCode('flashParams:' + VarToJSON([Value, false])); +procedure TExtMenuItem.SetFDestroyMenu(Value : Boolean); begin + FDestroyMenu := Value; + JSCode('destroyMenu:' + VarToJSON([Value])); end; -procedure TExtFlashComponent.SetFFlashVars(Value : TExtObject); begin - FFlashVars := Value; - Value.DeleteFromGarbage; - JSCode('flashVars:' + VarToJSON([Value, false])); +procedure TExtMenuItem.SetFDisabledCls(Value : String); begin + FDisabledCls := Value; + JSCode('disabledCls:' + VarToJSON([Value])); end; -procedure TExtFlashComponent.SetFFlashVersion(Value : String); begin - FFlashVersion := Value; - JSCode('flashVersion:' + VarToJSON([Value])); +procedure TExtMenuItem.SetFGlyph(Value : Integer); begin + FGlyph := Value; + JSCode('glyph:' + VarToJSON([Value])); end; -procedure TExtFlashComponent.SetFSwf(Value : TExtElement); begin - FSwf := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.swf=' + VarToJSON([Value, false]) + ';'); +procedure TExtMenuItem.SetFGlyphString(Value : String); begin + FGlyphString := Value; + JSCode('glyph:' + VarToJSON([Value])); end; -procedure TExtFlashComponent.SetFSwfHeight(Value : String); begin - FSwfHeight := Value; - JSCode('swfHeight:' + VarToJSON([Value])); +procedure TExtMenuItem.SetFHandler(Value : TExtFunction); begin + FHandler := Value; + if not ConfigAvailable(JSName) then + SetHandler(Value) + else + JSCode('handler:' + VarToJSON([Value, true])); end; -procedure TExtFlashComponent.SetFSwfHeightInteger(Value : Integer); begin - FSwfHeightInteger := Value; - JSCode('swfHeight:' + VarToJSON([Value])); +procedure TExtMenuItem.SetFHideOnClick(Value : Boolean); begin + FHideOnClick := Value; + JSCode('hideOnClick:' + VarToJSON([Value])); end; -procedure TExtFlashComponent.SetFSwfWidth(Value : String); begin - FSwfWidth := Value; - JSCode('swfWidth:' + VarToJSON([Value])); +procedure TExtMenuItem.SetFHref(Value : String); begin + FHref := Value; + JSCode('href:' + VarToJSON([Value])); end; -procedure TExtFlashComponent.SetFSwfWidthInteger(Value : Integer); begin - FSwfWidthInteger := Value; - JSCode('swfWidth:' + VarToJSON([Value])); +procedure TExtMenuItem.SetFHrefTarget(Value : String); begin + FHrefTarget := Value; + JSCode('hrefTarget:' + VarToJSON([Value])); end; -procedure TExtFlashComponent.SetFUrl(Value : String); begin - FUrl := Value; - JSCode('url:' + VarToJSON([Value])); +procedure TExtMenuItem.SetFIcon(Value : String); begin + FIcon := Value; + if not ConfigAvailable(JSName) then + SetIcon(Value) + else + JSCode('icon:' + VarToJSON([Value])); end; -procedure TExtFlashComponent.SetFWmode(Value : String); begin - FWmode := Value; - JSCode('wmode:' + VarToJSON([Value])); +procedure TExtMenuItem.SetFIconCls(Value : String); begin + FIconCls := Value; + if not ConfigAvailable(JSName) then + SetIconCls(Value) + else + JSCode('iconCls:' + VarToJSON([Value])); end; -function TExtFlashComponent.JSClassName : string; begin - Result := 'Ext.flash.Component'; +procedure TExtMenuItem.SetFMenu(Value : TExtMenu); begin + FMenu := Value; + Value.DeleteFromGarbage; + if not ConfigAvailable(JSName) then + SetMenu(Value) + else + JSCode('menu:' + VarToJSON([Value, false])); end; -procedure TExtFlashComponent.InitDefaults; begin - inherited; - FFlashAttributes := TExtObject.CreateInternal(Self, 'flashAttributes'); - FFlashParams := TExtObject.CreateInternal(Self, 'flashParams'); - FFlashVars := TExtObject.CreateInternal(Self, 'flashVars'); - FSwf := TExtElement.CreateInternal(Self, 'swf'); - FSwfHeight := '100%'; - FSwfWidth := '100%'; +procedure TExtMenuItem.SetFMenu_(Value : TExtMenu); begin + FMenu_ := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.menu=' + VarToJSON([Value, false]) + ';'); end; -{$IFDEF FPC}constructor TExtFlashComponent.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtMenuItem.SetFMenuAlign(Value : String); begin + FMenuAlign := Value; + JSCode('menuAlign:' + VarToJSON([Value])); +end; -constructor TExtFlashComponent.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtMenuItem.SetFMenuExpandDelay(Value : Integer); begin + FMenuExpandDelay := Value; + JSCode('menuExpandDelay:' + VarToJSON([Value])); end; -destructor TExtFlashComponent.Destroy; begin - try - FFlashAttributes.Free; - FFlashParams.Free; - FFlashVars.Free; - FSwf.Free; - except end; - inherited; +procedure TExtMenuItem.SetFMenuHideDelay(Value : Integer); begin + FMenuHideDelay := Value; + JSCode('menuHideDelay:' + VarToJSON([Value])); end; -procedure TExtFormActionSubmit.SetFClientValidation(Value : Boolean); begin - FClientValidation := Value; - JSCode('clientValidation:' + VarToJSON([Value])); +procedure TExtMenuItem.SetFMenuObject(Value : TExtObject); begin + FMenuObject := Value; + Value.DeleteFromGarbage; + JSCode('menu:' + VarToJSON([Value, false])); end; -function TExtFormActionSubmit.JSClassName : string; begin - Result := 'Ext.form.action.Submit'; +procedure TExtMenuItem.SetFParentMenu(Value : TExtMenu); begin + FParentMenu := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.parentMenu=' + VarToJSON([Value, false]) + ';'); end; -{$IFDEF FPC}constructor TExtFormActionSubmit.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtMenuItem.SetFPlain(Value : Boolean); begin + FPlain := Value; + JSCode('plain:' + VarToJSON([Value])); +end; -procedure TExtFormFieldBase.SetFActiveError(Value : String); begin - FActiveError := Value; +procedure TExtMenuItem.SetFText(Value : String); begin + FText := Value; if not ConfigAvailable(JSName) then - SetActiveError(Value) + SetText(Value) else - JSCode('activeError:' + VarToJSON([Value])); + JSCode('text:' + VarToJSON([Value])); end; -procedure TExtFormFieldBase.SetFActiveErrorsTpl(Value : String); begin - FActiveErrorsTpl := Value; - JSCode('activeErrorsTpl:' + VarToJSON([Value])); +procedure TExtMenuItem.SetFTooltip(Value : String); begin + FTooltip := Value; + if not ConfigAvailable(JSName) then + SetTooltip(Value) + else + JSCode('tooltip:' + VarToJSON([Value])); end; -procedure TExtFormFieldBase.SetFActiveErrorsTplList(Value : TExtObjectList); begin - FActiveErrorsTplList := Value; +procedure TExtMenuItem.SetFTooltipObject(Value : TExtObject); begin + FTooltipObject := Value; Value.DeleteFromGarbage; - JSCode('activeErrorsTpl:' + VarToJSON([Value, false])); + JSCode('tooltip:' + VarToJSON([Value, false])); end; -procedure TExtFormFieldBase.SetFActiveErrorsTplTemplate(Value : TExtXTemplate); begin - FActiveErrorsTplTemplate := Value; - Value.DeleteFromGarbage; - JSCode('activeErrorsTpl:' + VarToJSON([Value, false])); +procedure TExtMenuItem.SetFTooltipType(Value : String); begin + FTooltipType := Value; + JSCode('tooltipType:' + VarToJSON([Value])); end; -procedure TExtFormFieldBase.SetFAfterBodyEl(Value : String); begin - FAfterBodyEl := Value; - JSCode('afterBodyEl:' + VarToJSON([Value])); +procedure TExtMenuItem.SetFOnActivate(Value : TExtMenuItemOnActivate); begin + if Assigned(FOnActivate) then + JSCode(JSName+'.events ["activate"].listeners=[];'); + if Assigned(Value) then + AddListener('activate', Ajax('activate', ['Item', '%0.nm'], true)); + FOnActivate := Value; end; -procedure TExtFormFieldBase.SetFAfterBodyElList(Value : TExtObjectList); begin - FAfterBodyElList := Value; - Value.DeleteFromGarbage; - JSCode('afterBodyEl:' + VarToJSON([Value, false])); +procedure TExtMenuItem.SetFOnClick(Value : TExtMenuItemOnClick); begin + if Assigned(FOnClick) then + JSCode(JSName+'.events ["click"].listeners=[];'); + if Assigned(Value) then + AddListener('click', Ajax('click', ['Item', '%0.nm','E', '%1.nm'], true)); + FOnClick := Value; end; -procedure TExtFormFieldBase.SetFAfterBodyElTemplate(Value : TExtXTemplate); begin - FAfterBodyElTemplate := Value; - Value.DeleteFromGarbage; - JSCode('afterBodyEl:' + VarToJSON([Value, false])); +procedure TExtMenuItem.SetFOnDeactivate(Value : TExtMenuItemOnDeactivate); begin + if Assigned(FOnDeactivate) then + JSCode(JSName+'.events ["deactivate"].listeners=[];'); + if Assigned(Value) then + AddListener('deactivate', Ajax('deactivate', ['Item', '%0.nm'], true)); + FOnDeactivate := Value; end; -procedure TExtFormFieldBase.SetFAfterLabelTextTpl(Value : String); begin - FAfterLabelTextTpl := Value; - JSCode('afterLabelTextTpl:' + VarToJSON([Value])); +procedure TExtMenuItem.SetFOnIconchange(Value : TExtMenuItemOnIconchange); begin + if Assigned(FOnIconchange) then + JSCode(JSName+'.events ["iconchange"].listeners=[];'); + if Assigned(Value) then + AddListener('iconchange', Ajax('iconchange', ['This', '%0.nm','OldIcon', '%1','NewIcon', '%2'], true)); + FOnIconchange := Value; end; -procedure TExtFormFieldBase.SetFAfterLabelTextTplList(Value : TExtObjectList); begin - FAfterLabelTextTplList := Value; - Value.DeleteFromGarbage; - JSCode('afterLabelTextTpl:' + VarToJSON([Value, false])); +procedure TExtMenuItem.SetFOnTextchange(Value : TExtMenuItemOnTextchange); begin + if Assigned(FOnTextchange) then + JSCode(JSName+'.events ["textchange"].listeners=[];'); + if Assigned(Value) then + AddListener('textchange', Ajax('textchange', ['This', '%0.nm','OldText', '%1','NewText', '%2'], true)); + FOnTextchange := Value; end; -procedure TExtFormFieldBase.SetFAfterLabelTextTplTemplate(Value : TExtXTemplate); begin - FAfterLabelTextTplTemplate := Value; - Value.DeleteFromGarbage; - JSCode('afterLabelTextTpl:' + VarToJSON([Value, false])); +function TExtMenuItem.JSClassName : string; begin + Result := 'Ext.menu.Item'; end; -procedure TExtFormFieldBase.SetFAfterLabelTpl(Value : String); begin - FAfterLabelTpl := Value; - JSCode('afterLabelTpl:' + VarToJSON([Value])); +procedure TExtMenuItem.InitDefaults; begin + inherited; + FMenu := TExtMenu.CreateInternal(Self, 'menu'); + FMenu_ := TExtMenu.CreateInternal(Self, 'menu'); + FMenuObject := TExtObject.CreateInternal(Self, 'menu'); + FParentMenu := TExtMenu.CreateInternal(Self, 'parentMenu'); + FTooltipObject := TExtObject.CreateInternal(Self, 'tooltip'); end; -procedure TExtFormFieldBase.SetFAfterLabelTplList(Value : TExtObjectList); begin - FAfterLabelTplList := Value; - Value.DeleteFromGarbage; - JSCode('afterLabelTpl:' + VarToJSON([Value, false])); -end; +{$IFDEF FPC}constructor TExtMenuItem.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtFormFieldBase.SetFAfterLabelTplTemplate(Value : TExtXTemplate); begin - FAfterLabelTplTemplate := Value; - Value.DeleteFromGarbage; - JSCode('afterLabelTpl:' + VarToJSON([Value, false])); +constructor TExtMenuItem.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtFormFieldBase.SetFAfterSubTpl(Value : String); begin - FAfterSubTpl := Value; - JSCode('afterSubTpl:' + VarToJSON([Value])); +function TExtMenuItem.SetHandler(Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.setHandler(' + VarToJSON([Fn, true, Scope, false]) + ');', 'TExtMenuItem'); + Result := Self; end; -procedure TExtFormFieldBase.SetFAfterSubTplList(Value : TExtObjectList); begin - FAfterSubTplList := Value; - Value.DeleteFromGarbage; - JSCode('afterSubTpl:' + VarToJSON([Value, false])); +function TExtMenuItem.SetIcon(Icon : String) : TExtFunction; begin + JSCode(JSName + '.setIcon(' + VarToJSON([Icon]) + ');', 'TExtMenuItem'); + Result := Self; end; -procedure TExtFormFieldBase.SetFAfterSubTplTemplate(Value : TExtXTemplate); begin - FAfterSubTplTemplate := Value; - Value.DeleteFromGarbage; - JSCode('afterSubTpl:' + VarToJSON([Value, false])); +function TExtMenuItem.SetIconCls(IconCls : String) : TExtFunction; begin + JSCode(JSName + '.setIconCls(' + VarToJSON([IconCls]) + ');', 'TExtMenuItem'); + Result := Self; end; -procedure TExtFormFieldBase.SetFAutoFitErrors(Value : Boolean); begin - FAutoFitErrors := Value; - JSCode('autoFitErrors:' + VarToJSON([Value])); +function TExtMenuItem.SetMenu(Menu : TExtMenu; DestroyMenu : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.setMenu(' + VarToJSON([Menu, false, DestroyMenu]) + ');', 'TExtMenuItem'); + Result := Self; end; -procedure TExtFormFieldBase.SetFBaseBodyCls(Value : String); begin - FBaseBodyCls := Value; - JSCode('baseBodyCls:' + VarToJSON([Value])); +function TExtMenuItem.SetText(Text : String) : TExtFunction; begin + JSCode(JSName + '.setText(' + VarToJSON([Text]) + ');', 'TExtMenuItem'); + Result := Self; end; -procedure TExtFormFieldBase.SetFBeforeBodyEl(Value : String); begin - FBeforeBodyEl := Value; - JSCode('beforeBodyEl:' + VarToJSON([Value])); +function TExtMenuItem.SetTooltip(Tooltip : String) : TExtFunction; begin + JSCode(JSName + '.setTooltip(' + VarToJSON([Tooltip]) + ');', 'TExtMenuItem'); + Result := Self; end; -procedure TExtFormFieldBase.SetFBeforeBodyElList(Value : TExtObjectList); begin - FBeforeBodyElList := Value; - Value.DeleteFromGarbage; - JSCode('beforeBodyEl:' + VarToJSON([Value, false])); +destructor TExtMenuItem.Destroy; begin + try + FMenu.Free; + FMenu_.Free; + FMenuObject.Free; + FParentMenu.Free; + FTooltipObject.Free; + except end; + inherited; end; -procedure TExtFormFieldBase.SetFBeforeBodyElTemplate(Value : TExtXTemplate); begin - FBeforeBodyElTemplate := Value; - Value.DeleteFromGarbage; - JSCode('beforeBodyEl:' + VarToJSON([Value, false])); +procedure TExtMenuItem.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'activate') and Assigned(FOnActivate) then + FOnActivate(TExtMenuItem(ParamAsObject('Item'))) + else if (AEvtName = 'click') and Assigned(FOnClick) then + FOnClick(TExtMenuItem(ParamAsObject('Item')), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'deactivate') and Assigned(FOnDeactivate) then + FOnDeactivate(TExtMenuItem(ParamAsObject('Item'))) + else if (AEvtName = 'iconchange') and Assigned(FOnIconchange) then + FOnIconchange(TExtMenuItem(ParamAsObject('This')), ParamAsString('OldIcon'), ParamAsString('NewIcon')) + else if (AEvtName = 'textchange') and Assigned(FOnTextchange) then + FOnTextchange(TExtMenuItem(ParamAsObject('This')), ParamAsString('OldText'), ParamAsString('NewText')); end; -procedure TExtFormFieldBase.SetFBeforeLabelTextTpl(Value : String); begin - FBeforeLabelTextTpl := Value; - JSCode('beforeLabelTextTpl:' + VarToJSON([Value])); +function TExtUtilPoint.JSClassName : string; begin + Result := 'Ext.util.Point'; end; -procedure TExtFormFieldBase.SetFBeforeLabelTextTplList(Value : TExtObjectList); begin - FBeforeLabelTextTplList := Value; - Value.DeleteFromGarbage; - JSCode('beforeLabelTextTpl:' + VarToJSON([Value, false])); -end; +{$IFDEF FPC}constructor TExtUtilPoint.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtFormFieldBase.SetFBeforeLabelTextTplTemplate(Value : TExtXTemplate); begin - FBeforeLabelTextTplTemplate := Value; - Value.DeleteFromGarbage; - JSCode('beforeLabelTextTpl:' + VarToJSON([Value, false])); +constructor TExtUtilPoint.Create(X : Integer; Y : Integer); begin + CreateVar(JSClassName + '(' + VarToJSON([X, Y]) + ');'); + InitDefaults; end; -procedure TExtFormFieldBase.SetFBeforeLabelTpl(Value : String); begin - FBeforeLabelTpl := Value; - JSCode('beforeLabelTpl:' + VarToJSON([Value])); +function TExtUtilPoint.Equals(P : TExtObject) : TExtFunction; begin + JSCode(JSName + '.equals(' + VarToJSON([P, false]) + ');', 'TExtUtilPoint'); + Result := Self; end; -procedure TExtFormFieldBase.SetFBeforeLabelTplList(Value : TExtObjectList); begin - FBeforeLabelTplList := Value; - Value.DeleteFromGarbage; - JSCode('beforeLabelTpl:' + VarToJSON([Value, false])); +function TExtUtilPoint.FromEvent(E : TEvent) : TExtFunction; begin + JSCode(JSName + '.fromEvent(' + VarToJSON([E, false]) + ');', 'TExtUtilPoint'); + Result := Self; end; -procedure TExtFormFieldBase.SetFBeforeLabelTplTemplate(Value : TExtXTemplate); begin - FBeforeLabelTplTemplate := Value; - Value.DeleteFromGarbage; - JSCode('beforeLabelTpl:' + VarToJSON([Value, false])); +function TExtUtilPoint.IsContainedBy(Region : TExtComponent) : TExtFunction; begin + JSCode(JSName + '.isContainedBy(' + VarToJSON([Region, false]) + ');', 'TExtUtilPoint'); + Result := Self; end; -procedure TExtFormFieldBase.SetFBeforeSubTpl(Value : String); begin - FBeforeSubTpl := Value; - JSCode('beforeSubTpl:' + VarToJSON([Value])); +function TExtUtilPoint.IsWithin(P : TExtObject; Threshold : Integer) : TExtFunction; begin + JSCode(JSName + '.isWithin(' + VarToJSON([P, false, Threshold]) + ');', 'TExtUtilPoint'); + Result := Self; end; -procedure TExtFormFieldBase.SetFBeforeSubTplList(Value : TExtObjectList); begin - FBeforeSubTplList := Value; - Value.DeleteFromGarbage; - JSCode('beforeSubTpl:' + VarToJSON([Value, false])); +function TExtUtilPoint.RoundedEquals(P : TExtObject) : TExtFunction; begin + JSCode(JSName + '.roundedEquals(' + VarToJSON([P, false]) + ');', 'TExtUtilPoint'); + Result := Self; end; -procedure TExtFormFieldBase.SetFBeforeSubTplTemplate(Value : TExtXTemplate); begin - FBeforeSubTplTemplate := Value; - Value.DeleteFromGarbage; - JSCode('beforeSubTpl:' + VarToJSON([Value, false])); +function TExtUtilPoint.ToString : TExtFunction; begin + JSCode(JSName + '.toString();', 'TExtUtilPoint'); + Result := Self; end; -procedure TExtFormFieldBase.SetFCheckChangeBuffer(Value : Integer); begin - FCheckChangeBuffer := Value; - JSCode('checkChangeBuffer:' + VarToJSON([Value])); +procedure TExtDataField.SetFDateFormat(Value : String); begin + FDateFormat := Value; + JSCode('dateFormat:' + VarToJSON([Value])); end; -procedure TExtFormFieldBase.SetFCheckChangeEvents(Value : TExtObjectList); begin - FCheckChangeEvents := Value; - Value.DeleteFromGarbage; - JSCode('checkChangeEvents:' + VarToJSON([Value, false])); +procedure TExtDataField.SetFDateReadFormat(Value : String); begin + FDateReadFormat := Value; + JSCode('dateReadFormat:' + VarToJSON([Value])); end; -procedure TExtFormFieldBase.SetFClearCls(Value : String); begin - FClearCls := Value; - JSCode('clearCls:' + VarToJSON([Value])); +procedure TExtDataField.SetFDateWriteFormat(Value : String); begin + FDateWriteFormat := Value; + JSCode('dateWriteFormat:' + VarToJSON([Value])); end; -procedure TExtFormFieldBase.SetFDirtyCls(Value : String); begin - FDirtyCls := Value; - JSCode('dirtyCls:' + VarToJSON([Value])); +procedure TExtDataField.SetFDefaultValue(Value : TExtObject); begin + FDefaultValue := Value; + Value.DeleteFromGarbage; + JSCode('defaultValue:' + VarToJSON([Value, false])); end; -procedure TExtFormFieldBase.SetFDisabled(Value : Boolean); begin - FDisabled := Value; - JSCode('disabled:' + VarToJSON([Value])); +procedure TExtDataField.SetFMapping(Value : Integer); begin + FMapping := Value; + JSCode('mapping:' + VarToJSON([Value])); end; -procedure TExtFormFieldBase.SetFErrorMsgCls(Value : String); begin - FErrorMsgCls := Value; - JSCode('errorMsgCls:' + VarToJSON([Value])); +procedure TExtDataField.SetFMappingString(Value : String); begin + FMappingString := Value; + JSCode('mapping:' + VarToJSON([Value])); end; -procedure TExtFormFieldBase.SetFFieldBodyCls(Value : String); begin - FFieldBodyCls := Value; - JSCode('fieldBodyCls:' + VarToJSON([Value])); +procedure TExtDataField.SetFPersist(Value : Boolean); begin + FPersist := Value; + JSCode('persist:' + VarToJSON([Value])); end; -procedure TExtFormFieldBase.SetFFieldCls(Value : String); begin - FFieldCls := Value; - JSCode('fieldCls:' + VarToJSON([Value])); +procedure TExtDataField.SetFSerialize(Value : TExtFunction); begin + FSerialize := Value; + JSCode('serialize:' + VarToJSON([Value, true])); end; -procedure TExtFormFieldBase.SetFFieldLabel(Value : String); begin - FFieldLabel := Value; - if not ConfigAvailable(JSName) then - SetFieldLabel(Value) - else - JSCode('fieldLabel:' + VarToJSON([Value])); +procedure TExtDataField.SetFSortDir(Value : String); begin + FSortDir := Value; + JSCode('sortDir:' + VarToJSON([Value])); end; -procedure TExtFormFieldBase.SetFFieldStyle(Value : String); begin - FFieldStyle := Value; - if not ConfigAvailable(JSName) then - SetFieldStyle(Value) - else - JSCode('fieldStyle:' + VarToJSON([Value])); +procedure TExtDataField.SetFSortType(Value : TExtFunction); begin + FSortType := Value; + JSCode('sortType:' + VarToJSON([Value, true])); end; -procedure TExtFormFieldBase.SetFFocusCls(Value : String); begin - FFocusCls := Value; - JSCode('focusCls:' + VarToJSON([Value])); +procedure TExtDataField.SetFSortTypeString(Value : String); begin + FSortTypeString := Value; + JSCode('sortType:' + VarToJSON([Value])); end; -procedure TExtFormFieldBase.SetFFormItemCls(Value : String); begin - FFormItemCls := Value; - JSCode('formItemCls:' + VarToJSON([Value])); +procedure TExtDataField.SetFUseNull(Value : Boolean); begin + FUseNull := Value; + JSCode('useNull:' + VarToJSON([Value])); end; -procedure TExtFormFieldBase.SetFHideEmptyLabel(Value : Boolean); begin - FHideEmptyLabel := Value; - JSCode('hideEmptyLabel:' + VarToJSON([Value])); +function TExtDataField.JSClassName : string; begin + Result := 'Ext.data.Field'; end; -procedure TExtFormFieldBase.SetFHideLabel(Value : Boolean); begin - FHideLabel := Value; - JSCode('hideLabel:' + VarToJSON([Value])); +procedure TExtDataField.InitDefaults; begin + inherited; + FDefaultValue := TExtObject.CreateInternal(Self, 'defaultValue'); + FPersist := true; + FSortDir := 'ASC'; end; -procedure TExtFormFieldBase.SetFInputAttrTpl(Value : String); begin - FInputAttrTpl := Value; - JSCode('inputAttrTpl:' + VarToJSON([Value])); +{$IFDEF FPC}constructor TExtDataField.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtDataField.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtFormFieldBase.SetFInputAttrTplList(Value : TExtObjectList); begin - FInputAttrTplList := Value; - Value.DeleteFromGarbage; - JSCode('inputAttrTpl:' + VarToJSON([Value, false])); +destructor TExtDataField.Destroy; begin + try + FDefaultValue.Free; + except end; + inherited; end; -procedure TExtFormFieldBase.SetFInputAttrTplTemplate(Value : TExtXTemplate); begin - FInputAttrTplTemplate := Value; - Value.DeleteFromGarbage; - JSCode('inputAttrTpl:' + VarToJSON([Value, false])); +procedure TExtImg.SetFAlt(Value : String); begin + FAlt := Value; + JSCode('alt:' + VarToJSON([Value])); end; -procedure TExtFormFieldBase.SetFInputEl(Value : TExtElement); begin - FInputEl := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.inputEl=' + VarToJSON([Value, false]) + ';'); +procedure TExtImg.SetFGlyph(Value : Integer); begin + FGlyph := Value; + JSCode('glyph:' + VarToJSON([Value])); end; -procedure TExtFormFieldBase.SetFInputId(Value : String); begin - FInputId := Value; - JSCode('inputId:' + VarToJSON([Value])); +procedure TExtImg.SetFGlyphString(Value : String); begin + FGlyphString := Value; + JSCode('glyph:' + VarToJSON([Value])); end; -procedure TExtFormFieldBase.SetFInputType(Value : String); begin - FInputType := Value; - JSCode('inputType:' + VarToJSON([Value])); +procedure TExtImg.SetFImgCls(Value : String); begin + FImgCls := Value; + JSCode('imgCls:' + VarToJSON([Value])); end; -procedure TExtFormFieldBase.SetFInvalidCls(Value : String); begin - FInvalidCls := Value; - JSCode('invalidCls:' + VarToJSON([Value])); +procedure TExtImg.SetFSrc(Value : String); begin + FSrc := Value; + if not ConfigAvailable(JSName) then + SetSrc(Value) + else + JSCode('src:' + VarToJSON([Value])); end; -procedure TExtFormFieldBase.SetFInvalidText(Value : String); begin - FInvalidText := Value; - JSCode('invalidText:' + VarToJSON([Value])); +procedure TExtImg.SetFTitle(Value : String); begin + FTitle := Value; + JSCode('title:' + VarToJSON([Value])); end; -procedure TExtFormFieldBase.SetFLabelableRenderTpl(Value : String); begin - FLabelableRenderTpl := Value; - JSCode('labelableRenderTpl:' + VarToJSON([Value])); +function TExtImg.JSClassName : string; begin + Result := 'Ext.Img'; end; -procedure TExtFormFieldBase.SetFLabelableRenderTplList(Value : TExtObjectList); begin - FLabelableRenderTplList := Value; - Value.DeleteFromGarbage; - JSCode('labelableRenderTpl:' + VarToJSON([Value, false])); -end; +{$IFDEF FPC}constructor TExtImg.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtFormFieldBase.SetFLabelableRenderTplTemplate(Value : TExtXTemplate); begin - FLabelableRenderTplTemplate := Value; - Value.DeleteFromGarbage; - JSCode('labelableRenderTpl:' + VarToJSON([Value, false])); +function TExtImg.SetSrc(Src : String) : TExtFunction; begin + JSCode(JSName + '.setSrc(' + VarToJSON([Src]) + ');', 'TExtImg'); + Result := Self; end; -procedure TExtFormFieldBase.SetFLabelAlign(Value : String); begin - FLabelAlign := Value; - JSCode('labelAlign:' + VarToJSON([Value])); +function TExtMenuKeyNav.JSClassName : string; begin + Result := 'Ext.menu.KeyNav'; end; -procedure TExtFormFieldBase.SetFLabelAttrTpl(Value : String); begin - FLabelAttrTpl := Value; - JSCode('labelAttrTpl:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtMenuKeyNav.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtFormFieldBase.SetFLabelAttrTplList(Value : TExtObjectList); begin - FLabelAttrTplList := Value; - Value.DeleteFromGarbage; - JSCode('labelAttrTpl:' + VarToJSON([Value, false])); +function TExtLayoutComponent.JSClassName : string; begin + Result := 'Ext.layout.component.Component'; end; -procedure TExtFormFieldBase.SetFLabelAttrTplTemplate(Value : TExtXTemplate); begin - FLabelAttrTplTemplate := Value; - Value.DeleteFromGarbage; - JSCode('labelAttrTpl:' + VarToJSON([Value, false])); -end; +{$IFDEF FPC}constructor TExtLayoutComponent.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtFormFieldBase.SetFLabelCls(Value : String); begin - FLabelCls := Value; - JSCode('labelCls:' + VarToJSON([Value])); +function TExtLayoutComponent.GetRenderTarget : TExtFunction; begin + JSCode(JSName + '.getRenderTarget();', 'TExtLayoutComponent'); + Result := Self; end; -procedure TExtFormFieldBase.SetFLabelClsExtra(Value : String); begin - FLabelClsExtra := Value; - JSCode('labelClsExtra:' + VarToJSON([Value])); +function TExtLayoutComponent.GetTarget : TExtFunction; begin + JSCode(JSName + '.getTarget();', 'TExtLayoutComponent'); + Result := Self; end; -procedure TExtFormFieldBase.SetFLabelPad(Value : Integer); begin - FLabelPad := Value; - JSCode('labelPad:' + VarToJSON([Value])); +function TExtPluginManagerSingleton.JSClassName : string; begin + Result := 'Ext.PluginManager'; end; -procedure TExtFormFieldBase.SetFLabelSeparator(Value : String); begin - FLabelSeparator := Value; - JSCode('labelSeparator:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtPluginManagerSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtFormFieldBase.SetFLabelStyle(Value : String); begin - FLabelStyle := Value; - JSCode('labelStyle:' + VarToJSON([Value])); +constructor TExtPluginManagerSingleton.Create(Config : TExtObject; DefaultType : TExtFunction = nil); begin + CreateVarAlt(JSClassName + '.create(' + VarToJSON([Config, false, DefaultType, true]) + ');'); + InitDefaults; end; -procedure TExtFormFieldBase.SetFLabelWidth(Value : Integer); begin - FLabelWidth := Value; - JSCode('labelWidth:' + VarToJSON([Value])); +function TExtPluginManagerSingleton.FindByType(TypeJS : String; DefaultsOnly : Boolean) : TExtFunction; begin + JSCode(JSName + '.findByType(' + VarToJSON([TypeJS, DefaultsOnly]) + ');', 'TExtPluginManagerSingleton'); + Result := Self; end; -procedure TExtFormFieldBase.SetFMsgTarget(Value : String); begin - FMsgTarget := Value; - JSCode('msgTarget:' + VarToJSON([Value])); +function TExtAppDomainDirectSingleton.JSClassName : string; begin + Result := 'Ext.app.domain.Direct'; end; -procedure TExtFormFieldBase.SetFName(Value : String); begin - FName := Value; - JSCode('name:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtAppDomainDirectSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtFormFieldBase.SetFOriginalValue(Value : TExtObject); begin - FOriginalValue := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.originalValue=' + VarToJSON([Value, false]) + ';'); +procedure TExtFormLabel.SetFForId(Value : String); begin + FForId := Value; + JSCode('forId:' + VarToJSON([Value])); end; -procedure TExtFormFieldBase.SetFPreventMark(Value : Boolean); begin - FPreventMark := Value; - JSCode('preventMark:' + VarToJSON([Value])); +procedure TExtFormLabel.SetFHtml(Value : String); begin + FHtml := Value; + JSCode('html:' + VarToJSON([Value])); end; -procedure TExtFormFieldBase.SetFReadOnly(Value : Boolean); begin - FReadOnly := Value; +procedure TExtFormLabel.SetFText(Value : String); begin + FText := Value; if not ConfigAvailable(JSName) then - SetReadOnly(Value) + SetText(Value) else - JSCode('readOnly:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldBase.SetFReadOnlyCls(Value : String); begin - FReadOnlyCls := Value; - JSCode('readOnlyCls:' + VarToJSON([Value])); + JSCode('text:' + VarToJSON([Value])); end; -procedure TExtFormFieldBase.SetFSubmitValue(Value : Boolean); begin - FSubmitValue := Value; - JSCode('submitValue:' + VarToJSON([Value])); +function TExtFormLabel.JSClassName : string; begin + Result := 'Ext.form.Label'; end; -procedure TExtFormFieldBase.SetFTabIndex(Value : Integer); begin - FTabIndex := Value; - JSCode('tabIndex:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtFormLabel.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtFormFieldBase.SetFValidateOnBlur(Value : Boolean); begin - FValidateOnBlur := Value; - JSCode('validateOnBlur:' + VarToJSON([Value])); +function TExtFormLabel.SetText(Text : String; Encode : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.setText(' + VarToJSON([Text, Encode]) + ');', 'TExtFormLabel'); + Result := Self; end; -procedure TExtFormFieldBase.SetFValidateOnChange(Value : Boolean); begin - FValidateOnChange := Value; - JSCode('validateOnChange:' + VarToJSON([Value])); +function TExtAppDomainControllerSingleton.JSClassName : string; begin + Result := 'Ext.app.domain.Controller'; end; -procedure TExtFormFieldBase.SetFValue(Value : TExtObject); begin - FValue := Value; - Value.DeleteFromGarbage; - if not ConfigAvailable(JSName) then - SetValue(Value) - else - JSCode('value:' + VarToJSON([Value, false])); -end; +{$IFDEF FPC}constructor TExtAppDomainControllerSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtFormFieldBase.SetFOnErrorchange(Value : TExtFormFieldBaseOnErrorchange); begin - if Assigned(FOnErrorchange) then - JSCode(JSName+'.events ["errorchange"].listeners=[];'); - if Assigned(Value) then - AddListener('errorchange', Ajax('errorchange', ['This', '%0.nm','Error', '%1'], true)); - FOnErrorchange := Value; +function TExtAppDomainComponentSingleton.JSClassName : string; begin + Result := 'Ext.app.domain.Component'; end; -function TExtFormFieldBase.JSClassName : string; begin - Result := 'Ext.form.field.Base'; -end; +{$IFDEF FPC}constructor TExtAppDomainComponentSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtFormFieldBase.InitDefaults; begin - inherited; - FActiveErrorsTplList := TExtObjectList.Create(Self, 'activeErrorsTpl'); - FActiveErrorsTplTemplate := TExtXTemplate.CreateInternal(Self, 'activeErrorsTpl'); - FAfterBodyElList := TExtObjectList.Create(Self, 'afterBodyEl'); - FAfterBodyElTemplate := TExtXTemplate.CreateInternal(Self, 'afterBodyEl'); - FAfterLabelTextTplList := TExtObjectList.Create(Self, 'afterLabelTextTpl'); - FAfterLabelTextTplTemplate := TExtXTemplate.CreateInternal(Self, 'afterLabelTextTpl'); - FAfterLabelTplList := TExtObjectList.Create(Self, 'afterLabelTpl'); - FAfterLabelTplTemplate := TExtXTemplate.CreateInternal(Self, 'afterLabelTpl'); - FAfterSubTplList := TExtObjectList.Create(Self, 'afterSubTpl'); - FAfterSubTplTemplate := TExtXTemplate.CreateInternal(Self, 'afterSubTpl'); - FBeforeBodyElList := TExtObjectList.Create(Self, 'beforeBodyEl'); - FBeforeBodyElTemplate := TExtXTemplate.CreateInternal(Self, 'beforeBodyEl'); - FBeforeLabelTextTplList := TExtObjectList.Create(Self, 'beforeLabelTextTpl'); - FBeforeLabelTextTplTemplate := TExtXTemplate.CreateInternal(Self, 'beforeLabelTextTpl'); - FBeforeLabelTplList := TExtObjectList.Create(Self, 'beforeLabelTpl'); - FBeforeLabelTplTemplate := TExtXTemplate.CreateInternal(Self, 'beforeLabelTpl'); - FBeforeSubTplList := TExtObjectList.Create(Self, 'beforeSubTpl'); - FBeforeSubTplTemplate := TExtXTemplate.CreateInternal(Self, 'beforeSubTpl'); - FCheckChangeBuffer := 50; - FCheckChangeEvents := TExtObjectList.Create(Self, 'checkChangeEvents'); - FInputAttrTplList := TExtObjectList.Create(Self, 'inputAttrTpl'); - FInputAttrTplTemplate := TExtXTemplate.CreateInternal(Self, 'inputAttrTpl'); - FInputEl := TExtElement.CreateInternal(Self, 'inputEl'); - FLabelableRenderTplList := TExtObjectList.Create(Self, 'labelableRenderTpl'); - FLabelableRenderTplTemplate := TExtXTemplate.CreateInternal(Self, 'labelableRenderTpl'); - FLabelAttrTplList := TExtObjectList.Create(Self, 'labelAttrTpl'); - FLabelAttrTplTemplate := TExtXTemplate.CreateInternal(Self, 'labelAttrTpl'); - FOriginalValue := TExtObject.CreateInternal(Self, 'originalValue'); - FValue := TExtObject.CreateInternal(Self, 'value'); +function TExtDirectRemotingEvent.JSClassName : string; begin + Result := 'Ext.direct.RemotingEvent'; end; -{$IFDEF FPC}constructor TExtFormFieldBase.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtDirectRemotingEvent.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtFormFieldBase.BatchChanges(Fn : TExtObject) : TExtFunction; begin - JSCode(JSName + '.batchChanges(' + VarToJSON([Fn, false]) + ');', 'TExtFormFieldBase'); +function TExtDirectRemotingEvent.GetTransaction : TExtFunction; begin + JSCode(JSName + '.getTransaction();', 'TExtDirectRemotingEvent'); Result := Self; end; -function TExtFormFieldBase.CheckChange : TExtFunction; begin - JSCode(JSName + '.checkChange();', 'TExtFormFieldBase'); - Result := Self; +procedure TExtDataSequentialIdGenerator.SetFPrefix(Value : String); begin + FPrefix := Value; + JSCode('prefix:' + VarToJSON([Value])); end; -function TExtFormFieldBase.CheckDirty : TExtFunction; begin - JSCode(JSName + '.checkDirty();', 'TExtFormFieldBase'); - Result := Self; +procedure TExtDataSequentialIdGenerator.SetFSeed(Value : Integer); begin + FSeed := Value; + JSCode('seed:' + VarToJSON([Value])); end; -function TExtFormFieldBase.ClearInvalid : TExtFunction; begin - JSCode(JSName + '.clearInvalid();', 'TExtFormFieldBase'); +function TExtDataSequentialIdGenerator.JSClassName : string; begin + Result := 'Ext.data.SequentialIdGenerator'; +end; + +{$IFDEF FPC}constructor TExtDataSequentialIdGenerator.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDataSequentialIdGenerator.Generate : TExtFunction; begin + JSCode(JSName + '.generate();', 'TExtDataSequentialIdGenerator'); Result := Self; end; -constructor TExtFormFieldBase.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtContainerAbstractContainer.SetFActiveItem(Value : Integer); begin + FActiveItem := Value; + JSCode('activeItem:' + VarToJSON([Value])); end; -function TExtFormFieldBase.ExtractFileInput : TExtFunction; begin - JSCode(JSName + '.extractFileInput();', 'TExtFormFieldBase'); - Result := Self; +procedure TExtContainerAbstractContainer.SetFActiveItemString(Value : String); begin + FActiveItemString := Value; + JSCode('activeItem:' + VarToJSON([Value])); end; -function TExtFormFieldBase.GetActiveError : TExtFunction; begin - JSCode(JSName + '.getActiveError();', 'TExtFormFieldBase'); - Result := Self; +procedure TExtContainerAbstractContainer.SetFAutoDestroy(Value : Boolean); begin + FAutoDestroy := Value; + JSCode('autoDestroy:' + VarToJSON([Value])); end; -function TExtFormFieldBase.GetActiveErrors : TExtFunction; begin - JSCode(JSName + '.getActiveErrors();', 'TExtFormFieldBase'); - Result := Self; +procedure TExtContainerAbstractContainer.SetFBubbleEvents(Value : TExtObjectList); begin + FBubbleEvents := Value; + Value.DeleteFromGarbage; + JSCode('bubbleEvents:' + VarToJSON([Value, false])); end; -function TExtFormFieldBase.GetErrors(Value : TExtObject) : TExtFunction; begin - JSCode(JSName + '.getErrors(' + VarToJSON([Value, false]) + ');', 'TExtFormFieldBase'); - Result := Self; +procedure TExtContainerAbstractContainer.SetFDefaults(Value : TExtObject); begin + FDefaults := Value; + Value.DeleteFromGarbage; + JSCode('defaults:' + VarToJSON([Value, false])); end; -function TExtFormFieldBase.GetInputId : TExtFunction; begin - JSCode(JSName + '.getInputId();', 'TExtFormFieldBase'); - Result := Self; +procedure TExtContainerAbstractContainer.SetFDefaultsFunction(Value : TExtFunction); begin + FDefaultsFunction := Value; + JSCode('defaults:' + VarToJSON([Value, true])); end; -function TExtFormFieldBase.GetLabelWidth : TExtFunction; begin - JSCode(JSName + '.getLabelWidth();', 'TExtFormFieldBase'); - Result := Self; +procedure TExtContainerAbstractContainer.SetFDefaultType(Value : String); begin + FDefaultType := Value; + JSCode('defaultType:' + VarToJSON([Value])); end; -function TExtFormFieldBase.GetModelData : TExtFunction; begin - JSCode(JSName + '.getModelData();', 'TExtFormFieldBase'); - Result := Self; +procedure TExtContainerAbstractContainer.SetFDetachOnRemove(Value : Boolean); begin + FDetachOnRemove := Value; + JSCode('detachOnRemove:' + VarToJSON([Value])); end; -function TExtFormFieldBase.GetName : TExtFunction; begin - JSCode(JSName + '.getName();', 'TExtFormFieldBase'); - Result := Self; +procedure TExtContainerAbstractContainer.SetFItems(Value : TExtObjectList); begin + FItems := Value; + Value.DeleteFromGarbage; + JSCode('items:' + VarToJSON([Value, false])); end; -function TExtFormFieldBase.GetRawValue : TExtFunction; begin - JSCode(JSName + '.getRawValue();', 'TExtFormFieldBase'); - Result := Self; +procedure TExtContainerAbstractContainer.SetFLayout(Value : TExtEnumsLayout); begin + FLayout := Value; + JSCode('layout:"' + EnumToJSString(TypeInfo(TExtEnumsLayout), ord(Value)) + '"'); end; -function TExtFormFieldBase.GetSubmitData : TExtFunction; begin - JSCode(JSName + '.getSubmitData();', 'TExtFormFieldBase'); - Result := Self; +procedure TExtContainerAbstractContainer.SetFLayoutObject(Value : TExtObject); begin + FLayoutObject := Value; + Value.DeleteFromGarbage; + JSCode('layout:' + VarToJSON([Value, false])); end; -function TExtFormFieldBase.GetSubmitValue : TExtFunction; begin - JSCode(JSName + '.getSubmitValue();', 'TExtFormFieldBase'); - Result := Self; +procedure TExtContainerAbstractContainer.SetFSuspendLayout(Value : Boolean); begin + FSuspendLayout := Value; + JSCode('suspendLayout:' + VarToJSON([Value])); end; -function TExtFormFieldBase.GetSubTplMarkup : TExtFunction; begin - JSCode(JSName + '.getSubTplMarkup();', 'TExtFormFieldBase'); - Result := Self; +procedure TExtContainerAbstractContainer.SetFOnAdd(Value : TExtContainerAbstractContainerOnAdd); begin + if Assigned(FOnAdd) then + JSCode(JSName+'.events ["add"].listeners=[];'); + if Assigned(Value) then + AddListener('add', Ajax('add', ['This', '%0.nm','Component', '%1.nm','Index', '%2'], true)); + FOnAdd := Value; end; -function TExtFormFieldBase.GetValue : TExtFunction; begin - JSCode(JSName + '.getValue();', 'TExtFormFieldBase'); - Result := Self; +procedure TExtContainerAbstractContainer.SetFOnAfterlayout(Value : TExtContainerAbstractContainerOnAfterlayout); begin + if Assigned(FOnAfterlayout) then + JSCode(JSName+'.events ["afterlayout"].listeners=[];'); + if Assigned(Value) then + AddListener('afterlayout', Ajax('afterlayout', ['This', '%0.nm','Layout', '%1.nm'], true)); + FOnAfterlayout := Value; end; -function TExtFormFieldBase.HasActiveError : TExtFunction; begin - JSCode(JSName + '.hasActiveError();', 'TExtFormFieldBase'); - Result := Self; +procedure TExtContainerAbstractContainer.SetFOnBeforeadd(Value : TExtContainerAbstractContainerOnBeforeadd); begin + if Assigned(FOnBeforeadd) then + JSCode(JSName+'.events ["beforeadd"].listeners=[];'); + if Assigned(Value) then + AddListener('beforeadd', Ajax('beforeadd', ['This', '%0.nm','Component', '%1.nm','Index', '%2'], true)); + FOnBeforeadd := Value; end; -function TExtFormFieldBase.HasVisibleLabel : TExtFunction; begin - JSCode(JSName + '.hasVisibleLabel();', 'TExtFormFieldBase'); - Result := Self; +procedure TExtContainerAbstractContainer.SetFOnBeforeremove(Value : TExtContainerAbstractContainerOnBeforeremove); begin + if Assigned(FOnBeforeremove) then + JSCode(JSName+'.events ["beforeremove"].listeners=[];'); + if Assigned(Value) then + AddListener('beforeremove', Ajax('beforeremove', ['This', '%0.nm','Component', '%1.nm'], true)); + FOnBeforeremove := Value; end; -function TExtFormFieldBase.IsDirty : TExtFunction; begin - JSCode(JSName + '.isDirty();', 'TExtFormFieldBase'); - Result := Self; +procedure TExtContainerAbstractContainer.SetFOnRemove(Value : TExtContainerAbstractContainerOnRemove); begin + if Assigned(FOnRemove) then + JSCode(JSName+'.events ["remove"].listeners=[];'); + if Assigned(Value) then + AddListener('remove', Ajax('remove', ['This', '%0.nm','Component', '%1.nm'], true)); + FOnRemove := Value; end; -function TExtFormFieldBase.IsEqual(Value1 : TExtObject; Value2 : TExtObject) : TExtFunction; begin - JSCode(JSName + '.isEqual(' + VarToJSON([Value1, false, Value2, false]) + ');', 'TExtFormFieldBase'); - Result := Self; +function TExtContainerAbstractContainer.JSClassName : string; begin + Result := 'Ext.container.AbstractContainer'; end; -function TExtFormFieldBase.IsFileUpload : TExtFunction; begin - JSCode(JSName + '.isFileUpload();', 'TExtFormFieldBase'); - Result := Self; +procedure TExtContainerAbstractContainer.InitDefaults; begin + inherited; + FBubbleEvents := TExtObjectList.Create(Self, 'bubbleEvents'); + FDefaults := TExtObject.CreateInternal(Self, 'defaults'); + FItems := TExtObjectList.Create(Self, 'items'); + FLayoutObject := TExtObject.CreateInternal(Self, 'layout'); end; -function TExtFormFieldBase.IsValid : TExtFunction; begin - JSCode(JSName + '.isValid();', 'TExtFormFieldBase'); +{$IFDEF FPC}constructor TExtContainerAbstractContainer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtContainerAbstractContainer.Add(Component : TExtComponent) : TExtFunction; begin + JSCode(JSName + '.add(' + VarToJSON([Component, false]) + ');', 'TExtContainerAbstractContainer'); Result := Self; end; -function TExtFormFieldBase.MarkInvalid(Errors : String) : TExtFunction; begin - JSCode(JSName + '.markInvalid(' + VarToJSON([Errors]) + ');', 'TExtFormFieldBase'); +function TExtContainerAbstractContainer.Cascade(Fn : TExtFunction; Scope : TExtObject = nil; Args : TExtObjectList = nil) : TExtFunction; begin + JSCode(JSName + '.cascade(' + VarToJSON([Fn, true, Scope, false]) + ',' + VarToJSON(Args) + ');', 'TExtContainerAbstractContainer'); Result := Self; end; -function TExtFormFieldBase.Reset : TExtFunction; begin - JSCode(JSName + '.reset();', 'TExtFormFieldBase'); +function TExtContainerAbstractContainer.Child(Selector : String = '') : TExtFunction; begin + JSCode(JSName + '.child(' + VarToJSON([Selector]) + ');', 'TExtContainerAbstractContainer'); Result := Self; end; -function TExtFormFieldBase.ResetOriginalValue : TExtFunction; begin - JSCode(JSName + '.resetOriginalValue();', 'TExtFormFieldBase'); +function TExtContainerAbstractContainer.Contains(Comp : TExtComponent; Deep : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.contains(' + VarToJSON([Comp, false, Deep]) + ');', 'TExtContainerAbstractContainer'); Result := Self; end; -function TExtFormFieldBase.SetActiveError(Msg : String) : TExtFunction; begin - JSCode(JSName + '.setActiveError(' + VarToJSON([Msg]) + ');', 'TExtFormFieldBase'); - Result := Self; +constructor TExtContainerAbstractContainer.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -function TExtFormFieldBase.SetActiveErrors(Errors : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.setActiveErrors(' + VarToJSON(Errors) + ');', 'TExtFormFieldBase'); +function TExtContainerAbstractContainer.DoLayout : TExtFunction; begin + JSCode(JSName + '.doLayout();', 'TExtContainerAbstractContainer'); Result := Self; end; -function TExtFormFieldBase.SetFieldDefaults(Defaults : TExtObject) : TExtFunction; begin - JSCode(JSName + '.setFieldDefaults(' + VarToJSON([Defaults, false]) + ');', 'TExtFormFieldBase'); +function TExtContainerAbstractContainer.Down(Selector : String = '') : TExtFunction; begin + JSCode(JSName + '.down(' + VarToJSON([Selector]) + ');', 'TExtContainerAbstractContainer'); Result := Self; end; -function TExtFormFieldBase.SetFieldLabel(LabelJS : String) : TExtFunction; begin - JSCode(JSName + '.setFieldLabel(' + VarToJSON([LabelJS]) + ');', 'TExtFormFieldBase'); +function TExtContainerAbstractContainer.GetComponent(Comp : Integer) : TExtFunction; begin + JSCode(JSName + '.getComponent(' + VarToJSON([Comp]) + ');', 'TExtContainerAbstractContainer'); Result := Self; end; -function TExtFormFieldBase.SetFieldStyle(Style : String) : TExtFunction; begin - JSCode(JSName + '.setFieldStyle(' + VarToJSON([Style]) + ');', 'TExtFormFieldBase'); +function TExtContainerAbstractContainer.GetLayout : TExtFunction; begin + JSCode(JSName + '.getLayout();', 'TExtContainerAbstractContainer'); Result := Self; end; -function TExtFormFieldBase.SetRawValue(Value : TExtObject) : TExtFunction; begin - JSCode(JSName + '.setRawValue(' + VarToJSON([Value, false]) + ');', 'TExtFormFieldBase'); +function TExtContainerAbstractContainer.Insert(Index : Integer; Component : TExtComponent) : TExtFunction; begin + JSCode(JSName + '.insert(' + VarToJSON([Index, Component, false]) + ');', 'TExtContainerAbstractContainer'); Result := Self; end; -function TExtFormFieldBase.SetReadOnly(ReadOnly : Boolean) : TExtFunction; begin - JSCode(JSName + '.setReadOnly(' + VarToJSON([ReadOnly]) + ');', 'TExtFormFieldBase'); +function TExtContainerAbstractContainer.IsAncestor(PossibleDescendant : TExtComponent) : TExtFunction; begin + JSCode(JSName + '.isAncestor(' + VarToJSON([PossibleDescendant, false]) + ');', 'TExtContainerAbstractContainer'); Result := Self; end; -function TExtFormFieldBase.SetValue(Value : TExtObject) : TExtFunction; begin - JSCode(JSName + '.setValue(' + VarToJSON([Value, false]) + ');', 'TExtFormFieldBase'); +function TExtContainerAbstractContainer.Move(FromIdx : Integer; ToIdx : Integer) : TExtFunction; begin + JSCode(JSName + '.move(' + VarToJSON([FromIdx, ToIdx]) + ');', 'TExtContainerAbstractContainer'); Result := Self; end; -function TExtFormFieldBase.TrimLabelSeparator : TExtFunction; begin - JSCode(JSName + '.trimLabelSeparator();', 'TExtFormFieldBase'); +function TExtContainerAbstractContainer.Query(Selector : String = '') : TExtFunction; begin + JSCode(JSName + '.query(' + VarToJSON([Selector]) + ');', 'TExtContainerAbstractContainer'); Result := Self; end; -function TExtFormFieldBase.UnsetActiveError : TExtFunction; begin - JSCode(JSName + '.unsetActiveError();', 'TExtFormFieldBase'); +function TExtContainerAbstractContainer.QueryBy(Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.queryBy(' + VarToJSON([Fn, true, Scope, false]) + ');', 'TExtContainerAbstractContainer'); Result := Self; end; -function TExtFormFieldBase.Validate : TExtFunction; begin - JSCode(JSName + '.validate();', 'TExtFormFieldBase'); +function TExtContainerAbstractContainer.QueryById(Id : String) : TExtFunction; begin + JSCode(JSName + '.queryById(' + VarToJSON([Id]) + ');', 'TExtContainerAbstractContainer'); Result := Self; end; -function TExtFormFieldBase.ValidateValue(Value : TExtObject) : TExtFunction; begin - JSCode(JSName + '.validateValue(' + VarToJSON([Value, false]) + ');', 'TExtFormFieldBase'); +function TExtContainerAbstractContainer.Remove(Component : String; AutoDestroy : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.remove(' + VarToJSON([Component, AutoDestroy]) + ');', 'TExtContainerAbstractContainer'); Result := Self; end; -function TExtFormFieldBase.ValueToRaw(Value : TExtObject) : TExtFunction; begin - JSCode(JSName + '.valueToRaw(' + VarToJSON([Value, false]) + ');', 'TExtFormFieldBase'); +function TExtContainerAbstractContainer.RemoveAll(AutoDestroy : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.removeAll(' + VarToJSON([AutoDestroy]) + ');', 'TExtContainerAbstractContainer'); Result := Self; end; -destructor TExtFormFieldBase.Destroy; begin +destructor TExtContainerAbstractContainer.Destroy; begin try - FActiveErrorsTplList.Free; - FActiveErrorsTplTemplate.Free; - FAfterBodyElList.Free; - FAfterBodyElTemplate.Free; - FAfterLabelTextTplList.Free; - FAfterLabelTextTplTemplate.Free; - FAfterLabelTplList.Free; - FAfterLabelTplTemplate.Free; - FAfterSubTplList.Free; - FAfterSubTplTemplate.Free; - FBeforeBodyElList.Free; - FBeforeBodyElTemplate.Free; - FBeforeLabelTextTplList.Free; - FBeforeLabelTextTplTemplate.Free; - FBeforeLabelTplList.Free; - FBeforeLabelTplTemplate.Free; - FBeforeSubTplList.Free; - FBeforeSubTplTemplate.Free; - FCheckChangeEvents.Free; - FInputAttrTplList.Free; - FInputAttrTplTemplate.Free; - FInputEl.Free; - FLabelableRenderTplList.Free; - FLabelableRenderTplTemplate.Free; - FLabelAttrTplList.Free; - FLabelAttrTplTemplate.Free; - FOriginalValue.Free; - FValue.Free; + FBubbleEvents.Free; + FDefaults.Free; + FItems.Free; + FLayoutObject.Free; except end; inherited; end; -procedure TExtFormFieldBase.HandleEvent(const AEvtName : string); begin +procedure TExtContainerAbstractContainer.HandleEvent(const AEvtName : string); begin inherited; - if (AEvtName = 'errorchange') and Assigned(FOnErrorchange) then - FOnErrorchange(TExtFormLabelable(ParamAsObject('This')), ParamAsString('Error')); + if (AEvtName = 'add') and Assigned(FOnAdd) then + FOnAdd(TExtContainerAbstractContainer(ParamAsObject('This')), TExtComponent(ParamAsObject('Component')), ParamAsInteger('Index')) + else if (AEvtName = 'afterlayout') and Assigned(FOnAfterlayout) then + FOnAfterlayout(TExtContainerAbstractContainer(ParamAsObject('This')), TExtLayoutContainer(ParamAsObject('Layout'))) + else if (AEvtName = 'beforeadd') and Assigned(FOnBeforeadd) then + FOnBeforeadd(TExtContainerAbstractContainer(ParamAsObject('This')), TExtComponent(ParamAsObject('Component')), ParamAsInteger('Index')) + else if (AEvtName = 'beforeremove') and Assigned(FOnBeforeremove) then + FOnBeforeremove(TExtContainerAbstractContainer(ParamAsObject('This')), TExtComponent(ParamAsObject('Component'))) + else if (AEvtName = 'remove') and Assigned(FOnRemove) then + FOnRemove(TExtContainerAbstractContainer(ParamAsObject('This')), TExtComponent(ParamAsObject('Component'))); end; -function TExtResizerHandle.JSClassName : string; begin - Result := 'Ext.resizer.Handle'; +procedure TExtFlashComponent.SetFBackgroundColor(Value : String); begin + FBackgroundColor := Value; + JSCode('backgroundColor:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtResizerHandle.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtFlashComponent.SetFExpressInstall(Value : Boolean); begin + FExpressInstall := Value; + JSCode('expressInstall:' + VarToJSON([Value])); +end; -procedure TExtDataSequentialIdGenerator.SetFPrefix(Value : String); begin - FPrefix := Value; - JSCode('prefix:' + VarToJSON([Value])); +procedure TExtFlashComponent.SetFFlashAttributes(Value : TExtObject); begin + FFlashAttributes := Value; + Value.DeleteFromGarbage; + JSCode('flashAttributes:' + VarToJSON([Value, false])); end; -procedure TExtDataSequentialIdGenerator.SetFSeed(Value : Integer); begin - FSeed := Value; - JSCode('seed:' + VarToJSON([Value])); +procedure TExtFlashComponent.SetFFlashParams(Value : TExtObject); begin + FFlashParams := Value; + Value.DeleteFromGarbage; + JSCode('flashParams:' + VarToJSON([Value, false])); end; -function TExtDataSequentialIdGenerator.JSClassName : string; begin - Result := 'Ext.data.SequentialIdGenerator'; +procedure TExtFlashComponent.SetFFlashVars(Value : TExtObject); begin + FFlashVars := Value; + Value.DeleteFromGarbage; + JSCode('flashVars:' + VarToJSON([Value, false])); +end; + +procedure TExtFlashComponent.SetFFlashVersion(Value : String); begin + FFlashVersion := Value; + JSCode('flashVersion:' + VarToJSON([Value])); +end; + +procedure TExtFlashComponent.SetFSwf(Value : TExtElement); begin + FSwf := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.swf=' + VarToJSON([Value, false]) + ';'); +end; + +procedure TExtFlashComponent.SetFSwfHeight(Value : Integer); begin + FSwfHeight := Value; + JSCode('swfHeight:' + VarToJSON([Value])); +end; + +procedure TExtFlashComponent.SetFSwfHeightString(Value : String); begin + FSwfHeightString := Value; + JSCode('swfHeight:' + VarToJSON([Value])); +end; + +procedure TExtFlashComponent.SetFSwfWidth(Value : Integer); begin + FSwfWidth := Value; + JSCode('swfWidth:' + VarToJSON([Value])); +end; + +procedure TExtFlashComponent.SetFSwfWidthString(Value : String); begin + FSwfWidthString := Value; + JSCode('swfWidth:' + VarToJSON([Value])); +end; + +procedure TExtFlashComponent.SetFUrl(Value : String); begin + FUrl := Value; + JSCode('url:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtDataSequentialIdGenerator.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtFlashComponent.SetFWmode(Value : String); begin + FWmode := Value; + JSCode('wmode:' + VarToJSON([Value])); +end; -function TExtDataSequentialIdGenerator.Generate : TExtFunction; begin - JSCode(JSName + '.generate();', 'TExtDataSequentialIdGenerator'); - Result := Self; +function TExtFlashComponent.JSClassName : string; begin + Result := 'Ext.flash.Component'; end; -function TExtResizerResizeTracker.JSClassName : string; begin - Result := 'Ext.resizer.ResizeTracker'; +procedure TExtFlashComponent.InitDefaults; begin + inherited; + FFlashAttributes := TExtObject.CreateInternal(Self, 'flashAttributes'); + FFlashParams := TExtObject.CreateInternal(Self, 'flashParams'); + FFlashVars := TExtObject.CreateInternal(Self, 'flashVars'); + FSwf := TExtElement.CreateInternal(Self, 'swf'); + FSwfHeight := 100; + FSwfWidth := 100; end; -{$IFDEF FPC}constructor TExtResizerResizeTracker.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtFlashComponent.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtResizerResizeTracker.CreateProxy(Target : TExtComponent) : TExtFunction; begin - JSCode(JSName + '.createProxy(' + VarToJSON([Target, false]) + ');', 'TExtResizerResizeTracker'); - Result := Self; +constructor TExtFlashComponent.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; +end; + +destructor TExtFlashComponent.Destroy; begin + try + FFlashAttributes.Free; + FFlashParams.Free; + FFlashVars.Free; + FSwf.Free; + except end; + inherited; end; procedure TExtFormBasic.SetFApi(Value : TExtObject); begin @@ -31725,6 +33134,12 @@ procedure TExtFormBasic.SetFMethod(Value : String); begin JSCode('method:' + VarToJSON([Value])); end; +procedure TExtFormBasic.SetFOwner(Value : TExtContainer); begin + FOwner := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.owner=' + VarToJSON([Value, false]) + ';'); +end; + procedure TExtFormBasic.SetFParamOrder(Value : String); begin FParamOrder := Value; JSCode('paramOrder:' + VarToJSON([Value])); @@ -31805,6 +33220,7 @@ procedure TExtFormBasic.InitDefaults; begin FBaseParams := TExtObject.CreateInternal(Self, 'baseParams'); FErrorReader := TExtObject.CreateInternal(Self, 'errorReader'); FErrorReaderReader := TExtDataReader.CreateInternal(Self, 'errorReader'); + FOwner := TExtContainer.CreateInternal(Self, 'owner'); FParamOrderList := TExtObjectList.Create(Self, 'paramOrder'); FReader := TExtObject.CreateInternal(Self, 'reader'); FReaderReader := TExtDataReader.CreateInternal(Self, 'reader'); @@ -31928,3771 +33344,4308 @@ function TExtFormBasic.UpdateRecord(RecordJS : TExtDataModel = nil) : TExtFuncti Result := Self; end; -destructor TExtFormBasic.Destroy; begin +destructor TExtFormBasic.Destroy; begin + try + FApi.Free; + FBaseParams.Free; + FErrorReader.Free; + FErrorReaderReader.Free; + FOwner.Free; + FParamOrderList.Free; + FReader.Free; + FReaderReader.Free; + FWaitMsgTargetElement.Free; + except end; + inherited; +end; + +function TExtUtilGrouper.JSClassName : string; begin + Result := 'Ext.util.Grouper'; +end; + +{$IFDEF FPC}constructor TExtUtilGrouper.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtUtilGrouper.GetGroupString(Instance : TExtDataModel) : TExtFunction; begin + JSCode(JSName + '.getGroupString(' + VarToJSON([Instance, false]) + ');', 'TExtUtilGrouper'); + Result := Self; +end; + +function TExtAppDomainGlobalSingleton.JSClassName : string; begin + Result := 'Ext.app.domain.Global'; +end; + +{$IFDEF FPC}constructor TExtAppDomainGlobalSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +procedure TExtComponentLoader.SetFLoadMask(Value : Boolean); begin + FLoadMask := Value; + JSCode('loadMask:' + VarToJSON([Value])); +end; + +procedure TExtComponentLoader.SetFLoadMaskObject(Value : TExtObject); begin + FLoadMaskObject := Value; + Value.DeleteFromGarbage; + JSCode('loadMask:' + VarToJSON([Value, false])); +end; + +procedure TExtComponentLoader.SetFRenderer(Value : String); begin + FRenderer := Value; + JSCode('renderer:' + VarToJSON([Value])); +end; + +procedure TExtComponentLoader.SetFRendererFunction(Value : TExtFunction); begin + FRendererFunction := Value; + JSCode('renderer:' + VarToJSON([Value, true])); +end; + +procedure TExtComponentLoader.SetFScripts(Value : Boolean); begin + FScripts := Value; + JSCode('scripts:' + VarToJSON([Value])); +end; + +procedure TExtComponentLoader.SetFTarget(Value : TExtComponent); begin + FTarget := Value; + Value.DeleteFromGarbage; + JSCode('target:' + VarToJSON([Value, false])); +end; + +procedure TExtComponentLoader.SetFTargetString(Value : String); begin + FTargetString := Value; + JSCode('target:' + VarToJSON([Value])); +end; + +function TExtComponentLoader.JSClassName : string; begin + Result := 'Ext.ComponentLoader'; +end; + +procedure TExtComponentLoader.InitDefaults; begin + inherited; + FLoadMaskObject := TExtObject.CreateInternal(Self, 'loadMask'); + FTarget := TExtComponent.CreateInternal(Self, 'target'); +end; + +{$IFDEF FPC}constructor TExtComponentLoader.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtComponentLoader.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; +end; + +function TExtComponentLoader.SetTarget(Target : String) : TExtFunction; begin + JSCode(JSName + '.setTarget(' + VarToJSON([Target]) + ');', 'TExtComponentLoader'); + Result := Self; +end; + +destructor TExtComponentLoader.Destroy; begin + try + FLoadMaskObject.Free; + FTarget.Free; + except end; + inherited; +end; + +procedure TExtDomHelperSingleton.SetFUseDom(Value : Boolean); begin + FUseDom := Value; + JSCode(JSName + '.useDom=' + VarToJSON([Value]) + ';'); +end; + +function TExtDomHelperSingleton.JSClassName : string; begin + Result := 'Ext.dom.Helper'; +end; + +{$IFDEF FPC}constructor TExtDomHelperSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDomHelperSingleton.CreateDom(O : String) : TExtFunction; begin + JSCode(JSName + '.createDom(' + VarToJSON([O]) + ');', 'TExtDomHelperSingleton'); + Result := Self; +end; + +function TExtDomHelperSingleton.CreateHtml : TExtFunction; begin + JSCode(JSName + '.createHtml();', 'TExtDomHelperSingleton'); + Result := Self; +end; + +function TExtDomHelperSingleton.CreateTemplate(O : TExtObject) : TExtFunction; begin + JSCode(JSName + '.createTemplate(' + VarToJSON([O, false]) + ');', 'TExtDomHelperSingleton'); + Result := Self; +end; + +function TExtDomHelperSingleton.Overwrite(El : String; O : String; ReturnElement : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.overwrite(' + VarToJSON([El, O, ReturnElement]) + ');', 'TExtDomHelperSingleton'); + Result := Self; +end; + +procedure TExtDataAbstractStore.SetFFilters(Value : TExtObjectList); begin + FFilters := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.filters=' + VarToJSON([Value, false]) + ';'); +end; + +function TExtDataAbstractStore.JSClassName : string; begin + Result := 'Ext.data.AbstractStore'; +end; + +procedure TExtDataAbstractStore.InitDefaults; begin + inherited; + FFilters := TExtObjectList.Create(Self, 'filters'); +end; + +{$IFDEF FPC}constructor TExtDataAbstractStore.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtDataAbstractStore.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; +end; + +function TExtDataAbstractStore.GetModifiedRecords : TExtFunction; begin + JSCode(JSName + '.getModifiedRecords();', 'TExtDataAbstractStore'); + Result := Self; +end; + +function TExtDataAbstractStore.GetNewRecords : TExtFunction; begin + JSCode(JSName + '.getNewRecords();', 'TExtDataAbstractStore'); + Result := Self; +end; + +function TExtDataAbstractStore.GetProxy : TExtFunction; begin + JSCode(JSName + '.getProxy();', 'TExtDataAbstractStore'); + Result := Self; +end; + +function TExtDataAbstractStore.GetRemovedRecords : TExtFunction; begin + JSCode(JSName + '.getRemovedRecords();', 'TExtDataAbstractStore'); + Result := Self; +end; + +function TExtDataAbstractStore.GetUpdatedRecords : TExtFunction; begin + JSCode(JSName + '.getUpdatedRecords();', 'TExtDataAbstractStore'); + Result := Self; +end; + +function TExtDataAbstractStore.Load(Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.load(' + VarToJSON([Options, false]) + ');', 'TExtDataAbstractStore'); + Result := Self; +end; + +function TExtDataAbstractStore.Reload(Options : TExtObject) : TExtFunction; begin + JSCode(JSName + '.reload(' + VarToJSON([Options, false]) + ');', 'TExtDataAbstractStore'); + Result := Self; +end; + +function TExtDataAbstractStore.ResumeAutoSync : TExtFunction; begin + JSCode(JSName + '.resumeAutoSync();', 'TExtDataAbstractStore'); + Result := Self; +end; + +function TExtDataAbstractStore.SetProxy(Proxy : String) : TExtFunction; begin + JSCode(JSName + '.setProxy(' + VarToJSON([Proxy]) + ');', 'TExtDataAbstractStore'); + Result := Self; +end; + +function TExtDataAbstractStore.SuspendAutoSync : TExtFunction; begin + JSCode(JSName + '.suspendAutoSync();', 'TExtDataAbstractStore'); + Result := Self; +end; + +function TExtDataAbstractStore.Sync(Options : TExtObject = nil; OptionsBatch : TExtDataBatch = nil; OptionsCallback : TExtFunction = nil; OptionsCallbackBatch : TExtDataBatch = nil; OptionsCallbackOptions : TExtObject = nil; OptionsSuccess : TExtFunction = nil; OptionsSuccessBatch : TExtDataBatch = nil; OptionsSuccessOptions : TExtObject = nil; OptionsFailure : TExtFunction = nil; OptionsFailureBatch : TExtDataBatch = nil; OptionsFailureOptions : TExtObject = nil; OptionsScope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.sync(' + VarToJSON([Options, false, OptionsBatch, false, OptionsCallback, true, OptionsCallbackBatch, false, OptionsCallbackOptions, false, OptionsSuccess, true, OptionsSuccessBatch, false, OptionsSuccessOptions, false, OptionsFailure, true, OptionsFailureBatch, false, OptionsFailureOptions, false, OptionsScope, false]) + ');', 'TExtDataAbstractStore'); + Result := Self; +end; + +destructor TExtDataAbstractStore.Destroy; begin + try + FFilters.Free; + except end; + inherited; +end; + +procedure TExtDrawComponent.SetFAutoSize(Value : Boolean); begin + FAutoSize := Value; + JSCode('autoSize:' + VarToJSON([Value])); +end; + +procedure TExtDrawComponent.SetFEnginePriority(Value : TExtObjectList); begin + FEnginePriority := Value; + Value.DeleteFromGarbage; + JSCode('enginePriority:' + VarToJSON([Value, false])); +end; + +procedure TExtDrawComponent.SetFGradients(Value : TExtObjectList); begin + FGradients := Value; + Value.DeleteFromGarbage; + JSCode('gradients:' + VarToJSON([Value, false])); +end; + +procedure TExtDrawComponent.SetFItems(Value : TExtObjectList); begin + FItems := Value; + Value.DeleteFromGarbage; + JSCode('items:' + VarToJSON([Value, false])); +end; + +procedure TExtDrawComponent.SetFSurface(Value : TExtDrawSurface); begin + FSurface := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.surface=' + VarToJSON([Value, false]) + ';'); +end; + +procedure TExtDrawComponent.SetFViewBox(Value : Boolean); begin + FViewBox := Value; + JSCode('viewBox:' + VarToJSON([Value])); +end; + +function TExtDrawComponent.JSClassName : string; begin + Result := 'Ext.draw.Component'; +end; + +procedure TExtDrawComponent.InitDefaults; begin + inherited; + FEnginePriority := TExtObjectList.Create(Self, 'enginePriority'); + FGradients := TExtObjectList.Create(Self, 'gradients'); + FItems := TExtObjectList.Create(Self, 'items'); + FSurface := TExtDrawSurface.CreateInternal(Self, 'surface'); +end; + +{$IFDEF FPC}constructor TExtDrawComponent.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtDrawComponent.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; +end; + +destructor TExtDrawComponent.Destroy; begin + try + FEnginePriority.Free; + FGradients.Free; + FItems.Free; + FSurface.Free; + except end; + inherited; +end; + +function TExtDdDDTarget.JSClassName : string; begin + Result := 'Ext.dd.DDTarget'; +end; + +{$IFDEF FPC}constructor TExtDdDDTarget.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtDdDDTarget.Create(Id : String; SGroup : String; Config : TExtObject); begin + CreateVar(JSClassName + '(' + VarToJSON([Id, SGroup, Config, false]) + ');'); + InitDefaults; +end; + +function TExtXTemplateCompiler.JSClassName : string; begin + Result := 'Ext.XTemplateCompiler'; +end; + +{$IFDEF FPC}constructor TExtXTemplateCompiler.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +procedure TExtAjaxSingleton.SetFAutoAbort(Value : Boolean); begin + FAutoAbort := Value; + JSCode(JSName + '.autoAbort=' + VarToJSON([Value]) + ';'); +end; + +procedure TExtAjaxSingleton.SetFDefaultHeaders(Value : TExtObject); begin + FDefaultHeaders := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.defaultHeaders=' + VarToJSON([Value, false]) + ';'); +end; + +procedure TExtAjaxSingleton.SetFDisableCaching(Value : Boolean); begin + FDisableCaching := Value; + JSCode(JSName + '.disableCaching=' + VarToJSON([Value]) + ';'); +end; + +procedure TExtAjaxSingleton.SetFExtraParams(Value : TExtObject); begin + FExtraParams := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.extraParams=' + VarToJSON([Value, false]) + ';'); +end; + +procedure TExtAjaxSingleton.SetFMethod(Value : String); begin + FMethod := Value; + JSCode(JSName + '.method=' + VarToJSON([Value]) + ';'); +end; + +procedure TExtAjaxSingleton.SetFTimeout(Value : Integer); begin + FTimeout := Value; + JSCode(JSName + '.timeout=' + VarToJSON([Value]) + ';'); +end; + +procedure TExtAjaxSingleton.SetFUrl(Value : String); begin + FUrl := Value; + JSCode(JSName + '.url=' + VarToJSON([Value]) + ';'); +end; + +function TExtAjaxSingleton.JSClassName : string; begin + Result := 'Ext.Ajax'; +end; + +procedure TExtAjaxSingleton.InitDefaults; begin + inherited; + FDefaultHeaders := TExtObject.CreateInternal(Self, 'defaultHeaders'); + FDisableCaching := true; + FExtraParams := TExtObject.CreateInternal(Self, 'extraParams'); + FTimeout := 30000; +end; + +{$IFDEF FPC}constructor TExtAjaxSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +destructor TExtAjaxSingleton.Destroy; begin + try + FDefaultHeaders.Free; + FExtraParams.Free; + except end; + inherited; +end; + +procedure TExtUtilComponentDragger.SetFConstrain(Value : Boolean); begin + FConstrain := Value; + JSCode('constrain:' + VarToJSON([Value])); +end; + +procedure TExtUtilComponentDragger.SetFConstrainDelegate(Value : Boolean); begin + FConstrainDelegate := Value; + JSCode('constrainDelegate:' + VarToJSON([Value])); +end; + +procedure TExtUtilComponentDragger.SetFDelegate(Value : String); begin + FDelegate := Value; + JSCode('delegate:' + VarToJSON([Value])); +end; + +procedure TExtUtilComponentDragger.SetFDelegateElement(Value : TExtElement); begin + FDelegateElement := Value; + Value.DeleteFromGarbage; + JSCode('delegate:' + VarToJSON([Value, false])); +end; + +function TExtUtilComponentDragger.JSClassName : string; begin + Result := 'Ext.util.ComponentDragger'; +end; + +procedure TExtUtilComponentDragger.InitDefaults; begin + inherited; + FDelegateElement := TExtElement.CreateInternal(Self, 'delegate'); +end; + +{$IFDEF FPC}constructor TExtUtilComponentDragger.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtUtilComponentDragger.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; +end; + +destructor TExtUtilComponentDragger.Destroy; begin + try + FDelegateElement.Free; + except end; + inherited; +end; + +procedure TExtUtilClickRepeater.SetFAccelerate(Value : Boolean); begin + FAccelerate := Value; + JSCode('accelerate:' + VarToJSON([Value])); +end; + +procedure TExtUtilClickRepeater.SetFDelay(Value : Integer); begin + FDelay := Value; + JSCode('delay:' + VarToJSON([Value])); +end; + +procedure TExtUtilClickRepeater.SetFEl(Value : String); begin + FEl := Value; + JSCode('el:' + VarToJSON([Value])); +end; + +procedure TExtUtilClickRepeater.SetFElElement(Value : TExtElement); begin + FElElement := Value; + Value.DeleteFromGarbage; + JSCode('el:' + VarToJSON([Value, false])); +end; + +procedure TExtUtilClickRepeater.SetFElTHTMLElement(Value : THTMLElement); begin + FElTHTMLElement := Value; + Value.DeleteFromGarbage; + JSCode('el:' + VarToJSON([Value, false])); +end; + +procedure TExtUtilClickRepeater.SetFInterval(Value : Integer); begin + FInterval := Value; + JSCode('interval:' + VarToJSON([Value])); +end; + +procedure TExtUtilClickRepeater.SetFPressedCls(Value : String); begin + FPressedCls := Value; + JSCode('pressedCls:' + VarToJSON([Value])); +end; + +procedure TExtUtilClickRepeater.SetFPreventDefault(Value : Boolean); begin + FPreventDefault := Value; + JSCode('preventDefault:' + VarToJSON([Value])); +end; + +procedure TExtUtilClickRepeater.SetFStopDefault(Value : Boolean); begin + FStopDefault := Value; + JSCode('stopDefault:' + VarToJSON([Value])); +end; + +function TExtUtilClickRepeater.JSClassName : string; begin + Result := 'Ext.util.ClickRepeater'; +end; + +procedure TExtUtilClickRepeater.InitDefaults; begin + inherited; + FElElement := TExtElement.CreateInternal(Self, 'el'); +end; + +{$IFDEF FPC}constructor TExtUtilClickRepeater.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtUtilClickRepeater.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; +end; + +function TExtUtilClickRepeater.Disable : TExtFunction; begin + JSCode(JSName + '.disable();', 'TExtUtilClickRepeater'); + Result := Self; +end; + +function TExtUtilClickRepeater.Enable : TExtFunction; begin + JSCode(JSName + '.enable();', 'TExtUtilClickRepeater'); + Result := Self; +end; + +function TExtUtilClickRepeater.SetDisabled(Disabled : Boolean) : TExtFunction; begin + JSCode(JSName + '.setDisabled(' + VarToJSON([Disabled]) + ');', 'TExtUtilClickRepeater'); + Result := Self; +end; + +destructor TExtUtilClickRepeater.Destroy; begin try - FApi.Free; - FBaseParams.Free; - FErrorReader.Free; - FErrorReaderReader.Free; - FParamOrderList.Free; - FReader.Free; - FReaderReader.Free; - FWaitMsgTargetElement.Free; + FElElement.Free; except end; inherited; end; -procedure TExtUtilComponentDragger.SetFConstrain(Value : Boolean); begin - FConstrain := Value; - JSCode('constrain:' + VarToJSON([Value])); +function TExtComponentManagerSingleton.JSClassName : string; begin + Result := 'Ext.ComponentManager'; end; -procedure TExtUtilComponentDragger.SetFConstrainDelegate(Value : Boolean); begin - FConstrainDelegate := Value; - JSCode('constrainDelegate:' + VarToJSON([Value])); +{$IFDEF FPC}constructor TExtComponentManagerSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtComponentManagerSingleton.Create(Config : TExtObject; DefaultType : String = ''); begin + CreateVarAlt(JSClassName + '.create(' + VarToJSON([Config, false, DefaultType]) + ');'); + InitDefaults; end; -procedure TExtUtilComponentDragger.SetFDelegate(Value : String); begin - FDelegate := Value; - JSCode('delegate:' + VarToJSON([Value])); +procedure TExtXTemplate.SetFDefinitions(Value : String); begin + FDefinitions := Value; + JSCode('definitions:' + VarToJSON([Value])); end; -procedure TExtUtilComponentDragger.SetFDelegateElement(Value : TExtElement); begin - FDelegateElement := Value; +procedure TExtXTemplate.SetFDefinitionsList(Value : TExtObjectList); begin + FDefinitionsList := Value; Value.DeleteFromGarbage; - JSCode('delegate:' + VarToJSON([Value, false])); + JSCode('definitions:' + VarToJSON([Value, false])); end; -function TExtUtilComponentDragger.JSClassName : string; begin - Result := 'Ext.util.ComponentDragger'; +function TExtXTemplate.JSClassName : string; begin + Result := 'Ext.XTemplate'; end; -procedure TExtUtilComponentDragger.InitDefaults; begin +procedure TExtXTemplate.InitDefaults; begin inherited; - FDelegateElement := TExtElement.CreateInternal(Self, 'delegate'); + FDefinitionsList := TExtObjectList.Create(Self, 'definitions'); end; -{$IFDEF FPC}constructor TExtUtilComponentDragger.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtXTemplate.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtUtilComponentDragger.Create; begin +function TExtXTemplate.Compile : TExtFunction; begin + JSCode(JSName + '.compile();', 'TExtXTemplate'); + Result := Self; +end; + +constructor TExtXTemplate.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -destructor TExtUtilComponentDragger.Destroy; begin +destructor TExtXTemplate.Destroy; begin try - FDelegateElement.Free; + FDefinitionsList.Free; except end; inherited; end; -procedure TExtResizerSplitter.SetFCollapsedCls(Value : String); begin - FCollapsedCls := Value; - JSCode('collapsedCls:' + VarToJSON([Value])); +procedure TExtAppApplication.SetFAppFolder(Value : String); begin + FAppFolder := Value; + JSCode('appFolder:' + VarToJSON([Value])); end; -procedure TExtResizerSplitter.SetFCollapseOnDblClick(Value : Boolean); begin - FCollapseOnDblClick := Value; - JSCode('collapseOnDblClick:' + VarToJSON([Value])); +procedure TExtAppApplication.SetFAppProperty(Value : String); begin + FAppProperty := Value; + JSCode('appProperty:' + VarToJSON([Value])); end; -procedure TExtResizerSplitter.SetFCollapseTarget(Value : String); begin - FCollapseTarget := Value; - JSCode('collapseTarget:' + VarToJSON([Value])); +procedure TExtAppApplication.SetFAutoCreateViewport(Value : Boolean); begin + FAutoCreateViewport := Value; + JSCode('autoCreateViewport:' + VarToJSON([Value])); end; -procedure TExtResizerSplitter.SetFCollapseTargetPanel(Value : TExtPanel); begin - FCollapseTargetPanel := Value; +procedure TExtAppApplication.SetFControllers(Value : TExtObjectList); begin + FControllers := Value; Value.DeleteFromGarbage; - JSCode('collapseTarget:' + VarToJSON([Value, false])); + JSCode('controllers:' + VarToJSON([Value, false])); end; -procedure TExtResizerSplitter.SetFCollapsible(Value : Boolean); begin - FCollapsible := Value; - JSCode('collapsible:' + VarToJSON([Value])); +procedure TExtAppApplication.SetFEnableQuickTips(Value : Boolean); begin + FEnableQuickTips := Value; + JSCode('enableQuickTips:' + VarToJSON([Value])); end; -procedure TExtResizerSplitter.SetFDefaultSplitMax(Value : Integer); begin - FDefaultSplitMax := Value; - JSCode('defaultSplitMax:' + VarToJSON([Value])); +procedure TExtAppApplication.SetFName(Value : String); begin + FName := Value; + JSCode('name:' + VarToJSON([Value])); end; -procedure TExtResizerSplitter.SetFDefaultSplitMin(Value : Integer); begin - FDefaultSplitMin := Value; - JSCode('defaultSplitMin:' + VarToJSON([Value])); +procedure TExtAppApplication.SetFNamespaces(Value : TExtObjectList); begin + FNamespaces := Value; + Value.DeleteFromGarbage; + JSCode('namespaces:' + VarToJSON([Value, false])); end; -procedure TExtResizerSplitter.SetFPerformCollapse(Value : Boolean); begin - FPerformCollapse := Value; - JSCode('performCollapse:' + VarToJSON([Value])); +procedure TExtAppApplication.SetFPaths(Value : TExtObject); begin + FPaths := Value; + Value.DeleteFromGarbage; + JSCode('paths:' + VarToJSON([Value, false])); end; -procedure TExtResizerSplitter.SetFSize(Value : Integer); begin - FSize := Value; - JSCode('size:' + VarToJSON([Value])); +procedure TExtAppApplication.SetFScope(Value : TExtObject); begin + FScope := Value; + Value.DeleteFromGarbage; + JSCode('scope:' + VarToJSON([Value, false])); end; -function TExtResizerSplitter.JSClassName : string; begin - Result := 'Ext.resizer.Splitter'; +function TExtAppApplication.JSClassName : string; begin + Result := 'Ext.app.Application'; end; -procedure TExtResizerSplitter.InitDefaults; begin +procedure TExtAppApplication.InitDefaults; begin inherited; - FCollapseTargetPanel := TExtPanel.CreateInternal(Self, 'collapseTarget'); + FControllers := TExtObjectList.Create(Self, 'controllers'); + FNamespaces := TExtObjectList.Create(Self, 'namespaces'); + FPaths := TExtObject.CreateInternal(Self, 'paths'); + FScope := TExtObject.CreateInternal(Self, 'scope'); end; -{$IFDEF FPC}constructor TExtResizerSplitter.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtAppApplication.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtResizerSplitter.Create; begin +constructor TExtAppApplication.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -destructor TExtResizerSplitter.Destroy; begin +destructor TExtAppApplication.Destroy; begin try - FCollapseTargetPanel.Free; + FControllers.Free; + FNamespaces.Free; + FPaths.Free; + FScope.Free; except end; inherited; end; -procedure TExtDataWriter.SetFIsWriter(Value : Boolean); begin - FIsWriter := Value; - JSCode(JSName + '.isWriter=' + VarToJSON([Value]) + ';'); -end; - -procedure TExtDataWriter.SetFWriteRecordId(Value : Boolean); begin - FWriteRecordId := Value; - JSCode('writeRecordId:' + VarToJSON([Value])); +procedure TExtDataUuidGenerator.SetFSalt(Value : Integer); begin + FSalt := Value; + JSCode(JSName + '.salt=' + VarToJSON([Value]) + ';'); end; -function TExtDataWriter.JSClassName : string; begin - Result := 'Ext.data.writer.Writer'; +procedure TExtDataUuidGenerator.SetFSaltObject(Value : TExtObject); begin + FSaltObject := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.salt=' + VarToJSON([Value, false]) + ';'); end; -{$IFDEF FPC}constructor TExtDataWriter.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtDataWriter.Create(Config : TExtObject = nil); begin - if Config = nil then CreateVar(JSClassName + '({});') else - CreateVar(JSClassName + '(' + VarToJSON([Config, false]) + ');'); - InitDefaults; +procedure TExtDataUuidGenerator.SetFTimestamp(Value : Integer); begin + FTimestamp := Value; + JSCode(JSName + '.timestamp=' + VarToJSON([Value]) + ';'); end; -function TExtDataWriter.GetRecordData(RecordJS : TExtDataModel; Operation : TExtDataOperation = nil) : TExtFunction; begin - JSCode(JSName + '.getRecordData(' + VarToJSON([RecordJS, false, Operation, false]) + ');', 'TExtDataWriter'); - Result := Self; +procedure TExtDataUuidGenerator.SetFTimestampObject(Value : TExtObject); begin + FTimestampObject := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.timestamp=' + VarToJSON([Value, false]) + ';'); end; -function TExtDataWriter.Write(Request : TExtDataRequest) : TExtFunction; begin - JSCode(JSName + '.write(' + VarToJSON([Request, false]) + ');', 'TExtDataWriter'); - Result := Self; +procedure TExtDataUuidGenerator.SetFVersion(Value : Integer); begin + FVersion := Value; + JSCode('version:' + VarToJSON([Value])); end; -function TExtDomCompositeElement.JSClassName : string; begin - Result := 'Ext.dom.CompositeElement'; +function TExtDataUuidGenerator.JSClassName : string; begin + Result := 'Ext.data.UuidGenerator'; end; -{$IFDEF FPC}constructor TExtDomCompositeElement.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtComponentManagerSingleton.JSClassName : string; begin - Result := 'Ext.ComponentManager'; +procedure TExtDataUuidGenerator.InitDefaults; begin + inherited; + FSaltObject := TExtObject.CreateInternal(Self, 'salt'); + FTimestampObject := TExtObject.CreateInternal(Self, 'timestamp'); end; -{$IFDEF FPC}constructor TExtComponentManagerSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtDataUuidGenerator.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtComponentManagerSingleton.Create(Config : TExtObject; DefaultType : String = ''); begin - CreateVarAlt(JSClassName + '.create(' + VarToJSON([Config, false, DefaultType]) + ');'); +constructor TExtDataUuidGenerator.Create; begin + CreateVar(JSClassName + '({});'); InitDefaults; end; -procedure TExtDomElement.SetFAutoBoxAdjust(Value : Boolean); begin - FAutoBoxAdjust := Value; - JSCode(JSName + '.autoBoxAdjust=' + VarToJSON([Value]) + ';'); +function TExtDataUuidGenerator.Reconfigure : TExtFunction; begin + JSCode(JSName + '.reconfigure();', 'TExtDataUuidGenerator'); + Result := Self; end; -procedure TExtDomElement.SetFOnAbort(Value : TExtDomElementOnAbort); begin - if Assigned(FOnAbort) then - JSCode(JSName+'.events ["abort"].listeners=[];'); - if Assigned(Value) then - AddListener('abort', Ajax('abort', ['E', '%0.nm','T', '%1.nm'], true)); - FOnAbort := Value; +destructor TExtDataUuidGenerator.Destroy; begin + try + FSaltObject.Free; + FTimestampObject.Free; + except end; + inherited; end; -procedure TExtDomElement.SetFOnBlur(Value : TExtDomElementOnBlur); begin - if Assigned(FOnBlur) then - JSCode(JSName+'.events ["blur"].listeners=[];'); - if Assigned(Value) then - AddListener('blur', Ajax('blur', ['E', '%0.nm','T', '%1.nm'], true)); - FOnBlur := Value; +function TExtDataTreeModel.JSClassName : string; begin + Result := 'Ext.data.TreeModel'; end; -procedure TExtDomElement.SetFOnChange(Value : TExtDomElementOnChange); begin - if Assigned(FOnChange) then - JSCode(JSName+'.events ["change"].listeners=[];'); - if Assigned(Value) then - AddListener('change', Ajax('change', ['E', '%0.nm','T', '%1.nm'], true)); - FOnChange := Value; -end; +{$IFDEF FPC}constructor TExtDataTreeModel.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtDomElement.SetFOnClick(Value : TExtDomElementOnClick); begin - if Assigned(FOnClick) then - JSCode(JSName+'.events ["click"].listeners=[];'); - if Assigned(Value) then - AddListener('click', Ajax('click', ['E', '%0.nm','T', '%1.nm'], true)); - FOnClick := Value; +function TExtToolbarSpacer.JSClassName : string; begin + Result := 'Ext.toolbar.Spacer'; end; -procedure TExtDomElement.SetFOnContextmenu(Value : TExtDomElementOnContextmenu); begin - if Assigned(FOnContextmenu) then - JSCode(JSName+'.events ["contextmenu"].listeners=[];'); - if Assigned(Value) then - AddListener('contextmenu', Ajax('contextmenu', ['E', '%0.nm','T', '%1.nm'], true)); - FOnContextmenu := Value; -end; +{$IFDEF FPC}constructor TExtToolbarSpacer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtDomElement.SetFOnDblclick(Value : TExtDomElementOnDblclick); begin - if Assigned(FOnDblclick) then - JSCode(JSName+'.events ["dblclick"].listeners=[];'); - if Assigned(Value) then - AddListener('dblclick', Ajax('dblclick', ['E', '%0.nm','T', '%1.nm'], true)); - FOnDblclick := Value; +function TExtFxTargetSprite.JSClassName : string; begin + Result := 'Ext.fx.target.Sprite'; end; -procedure TExtDomElement.SetFOnDOMActivate(Value : TExtDomElementOnDOMActivate); begin - if Assigned(FOnDOMActivate) then - JSCode(JSName+'.events ["DOMActivate"].listeners=[];'); - if Assigned(Value) then - AddListener('DOMActivate', Ajax('DOMActivate', ['E', '%0.nm','T', '%1.nm'], true)); - FOnDOMActivate := Value; +{$IFDEF FPC}constructor TExtFxTargetSprite.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtFormActionLoad.JSClassName : string; begin + Result := 'Ext.form.action.Load'; end; -procedure TExtDomElement.SetFOnDOMAttrModified(Value : TExtDomElementOnDOMAttrModified); begin - if Assigned(FOnDOMAttrModified) then - JSCode(JSName+'.events ["DOMAttrModified"].listeners=[];'); - if Assigned(Value) then - AddListener('DOMAttrModified', Ajax('DOMAttrModified', ['E', '%0.nm','T', '%1.nm'], true)); - FOnDOMAttrModified := Value; +{$IFDEF FPC}constructor TExtFormActionLoad.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtFxTargetElement.JSClassName : string; begin + Result := 'Ext.fx.target.Element'; end; -procedure TExtDomElement.SetFOnDOMCharacterDataModified(Value : TExtDomElementOnDOMCharacterDataModified); begin - if Assigned(FOnDOMCharacterDataModified) then - JSCode(JSName+'.events ["DOMCharacterDataModified"].listeners=[];'); - if Assigned(Value) then - AddListener('DOMCharacterDataModified', Ajax('DOMCharacterDataModified', ['E', '%0.nm','T', '%1.nm'], true)); - FOnDOMCharacterDataModified := Value; +{$IFDEF FPC}constructor TExtFxTargetElement.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +procedure TExtDataProxyServer.SetFApi(Value : TExtObject); begin + FApi := Value; + Value.DeleteFromGarbage; + JSCode('api:' + VarToJSON([Value, false])); end; -procedure TExtDomElement.SetFOnDOMFocusIn(Value : TExtDomElementOnDOMFocusIn); begin - if Assigned(FOnDOMFocusIn) then - JSCode(JSName+'.events ["DOMFocusIn"].listeners=[];'); - if Assigned(Value) then - AddListener('DOMFocusIn', Ajax('DOMFocusIn', ['E', '%0.nm','T', '%1.nm'], true)); - FOnDOMFocusIn := Value; +procedure TExtDataProxyServer.SetFCacheString(Value : String); begin + FCacheString := Value; + JSCode('cacheString:' + VarToJSON([Value])); end; -procedure TExtDomElement.SetFOnDOMFocusOut(Value : TExtDomElementOnDOMFocusOut); begin - if Assigned(FOnDOMFocusOut) then - JSCode(JSName+'.events ["DOMFocusOut"].listeners=[];'); - if Assigned(Value) then - AddListener('DOMFocusOut', Ajax('DOMFocusOut', ['E', '%0.nm','T', '%1.nm'], true)); - FOnDOMFocusOut := Value; +procedure TExtDataProxyServer.SetFDirectionParam(Value : String); begin + FDirectionParam := Value; + JSCode('directionParam:' + VarToJSON([Value])); end; -procedure TExtDomElement.SetFOnDOMNodeInserted(Value : TExtDomElementOnDOMNodeInserted); begin - if Assigned(FOnDOMNodeInserted) then - JSCode(JSName+'.events ["DOMNodeInserted"].listeners=[];'); - if Assigned(Value) then - AddListener('DOMNodeInserted', Ajax('DOMNodeInserted', ['E', '%0.nm','T', '%1.nm'], true)); - FOnDOMNodeInserted := Value; +procedure TExtDataProxyServer.SetFExtraParams(Value : TExtObject); begin + FExtraParams := Value; + Value.DeleteFromGarbage; + JSCode('extraParams:' + VarToJSON([Value, false])); end; -procedure TExtDomElement.SetFOnDOMNodeInsertedIntoDocument(Value : TExtDomElementOnDOMNodeInsertedIntoDocument); begin - if Assigned(FOnDOMNodeInsertedIntoDocument) then - JSCode(JSName+'.events ["DOMNodeInsertedIntoDocument"].listeners=[];'); - if Assigned(Value) then - AddListener('DOMNodeInsertedIntoDocument', Ajax('DOMNodeInsertedIntoDocument', ['E', '%0.nm','T', '%1.nm'], true)); - FOnDOMNodeInsertedIntoDocument := Value; +procedure TExtDataProxyServer.SetFFilterParam(Value : String); begin + FFilterParam := Value; + JSCode('filterParam:' + VarToJSON([Value])); end; -procedure TExtDomElement.SetFOnDOMNodeRemoved(Value : TExtDomElementOnDOMNodeRemoved); begin - if Assigned(FOnDOMNodeRemoved) then - JSCode(JSName+'.events ["DOMNodeRemoved"].listeners=[];'); - if Assigned(Value) then - AddListener('DOMNodeRemoved', Ajax('DOMNodeRemoved', ['E', '%0.nm','T', '%1.nm'], true)); - FOnDOMNodeRemoved := Value; +procedure TExtDataProxyServer.SetFGroupDirectionParam(Value : String); begin + FGroupDirectionParam := Value; + JSCode('groupDirectionParam:' + VarToJSON([Value])); end; -procedure TExtDomElement.SetFOnDOMNodeRemovedFromDocument(Value : TExtDomElementOnDOMNodeRemovedFromDocument); begin - if Assigned(FOnDOMNodeRemovedFromDocument) then - JSCode(JSName+'.events ["DOMNodeRemovedFromDocument"].listeners=[];'); - if Assigned(Value) then - AddListener('DOMNodeRemovedFromDocument', Ajax('DOMNodeRemovedFromDocument', ['E', '%0.nm','T', '%1.nm'], true)); - FOnDOMNodeRemovedFromDocument := Value; +procedure TExtDataProxyServer.SetFGroupParam(Value : String); begin + FGroupParam := Value; + JSCode('groupParam:' + VarToJSON([Value])); end; -procedure TExtDomElement.SetFOnDOMSubtreeModified(Value : TExtDomElementOnDOMSubtreeModified); begin - if Assigned(FOnDOMSubtreeModified) then - JSCode(JSName+'.events ["DOMSubtreeModified"].listeners=[];'); - if Assigned(Value) then - AddListener('DOMSubtreeModified', Ajax('DOMSubtreeModified', ['E', '%0.nm','T', '%1.nm'], true)); - FOnDOMSubtreeModified := Value; +procedure TExtDataProxyServer.SetFIdParam(Value : String); begin + FIdParam := Value; + JSCode('idParam:' + VarToJSON([Value])); end; -procedure TExtDomElement.SetFOnError(Value : TExtDomElementOnError); begin - if Assigned(FOnError) then - JSCode(JSName+'.events ["error"].listeners=[];'); - if Assigned(Value) then - AddListener('error', Ajax('error', ['E', '%0.nm','T', '%1.nm'], true)); - FOnError := Value; +procedure TExtDataProxyServer.SetFLimitParam(Value : String); begin + FLimitParam := Value; + JSCode('limitParam:' + VarToJSON([Value])); end; -procedure TExtDomElement.SetFOnFocus(Value : TExtDomElementOnFocus); begin - if Assigned(FOnFocus) then - JSCode(JSName+'.events ["focus"].listeners=[];'); - if Assigned(Value) then - AddListener('focus', Ajax('focus', ['E', '%0.nm','T', '%1.nm'], true)); - FOnFocus := Value; +procedure TExtDataProxyServer.SetFNoCache(Value : Boolean); begin + FNoCache := Value; + JSCode('noCache:' + VarToJSON([Value])); end; -procedure TExtDomElement.SetFOnKeydown(Value : TExtDomElementOnKeydown); begin - if Assigned(FOnKeydown) then - JSCode(JSName+'.events ["keydown"].listeners=[];'); - if Assigned(Value) then - AddListener('keydown', Ajax('keydown', ['E', '%0.nm','T', '%1.nm'], true)); - FOnKeydown := Value; +procedure TExtDataProxyServer.SetFPageParam(Value : String); begin + FPageParam := Value; + JSCode('pageParam:' + VarToJSON([Value])); end; -procedure TExtDomElement.SetFOnKeypress(Value : TExtDomElementOnKeypress); begin - if Assigned(FOnKeypress) then - JSCode(JSName+'.events ["keypress"].listeners=[];'); - if Assigned(Value) then - AddListener('keypress', Ajax('keypress', ['E', '%0.nm','T', '%1.nm'], true)); - FOnKeypress := Value; +procedure TExtDataProxyServer.SetFSimpleGroupMode(Value : Boolean); begin + FSimpleGroupMode := Value; + JSCode('simpleGroupMode:' + VarToJSON([Value])); end; -procedure TExtDomElement.SetFOnKeyup(Value : TExtDomElementOnKeyup); begin - if Assigned(FOnKeyup) then - JSCode(JSName+'.events ["keyup"].listeners=[];'); - if Assigned(Value) then - AddListener('keyup', Ajax('keyup', ['E', '%0.nm','T', '%1.nm'], true)); - FOnKeyup := Value; +procedure TExtDataProxyServer.SetFSimpleSortMode(Value : Boolean); begin + FSimpleSortMode := Value; + JSCode('simpleSortMode:' + VarToJSON([Value])); end; -procedure TExtDomElement.SetFOnLoad(Value : TExtDomElementOnLoad); begin - if Assigned(FOnLoad) then - JSCode(JSName+'.events ["load"].listeners=[];'); - if Assigned(Value) then - AddListener('load', Ajax('load', ['E', '%0.nm','T', '%1.nm'], true)); - FOnLoad := Value; +procedure TExtDataProxyServer.SetFSortParam(Value : String); begin + FSortParam := Value; + JSCode('sortParam:' + VarToJSON([Value])); end; -procedure TExtDomElement.SetFOnMousedown(Value : TExtDomElementOnMousedown); begin - if Assigned(FOnMousedown) then - JSCode(JSName+'.events ["mousedown"].listeners=[];'); - if Assigned(Value) then - AddListener('mousedown', Ajax('mousedown', ['E', '%0.nm','T', '%1.nm'], true)); - FOnMousedown := Value; +procedure TExtDataProxyServer.SetFStartParam(Value : String); begin + FStartParam := Value; + JSCode('startParam:' + VarToJSON([Value])); end; -procedure TExtDomElement.SetFOnMouseenter(Value : TExtDomElementOnMouseenter); begin - if Assigned(FOnMouseenter) then - JSCode(JSName+'.events ["mouseenter"].listeners=[];'); - if Assigned(Value) then - AddListener('mouseenter', Ajax('mouseenter', ['E', '%0.nm','T', '%1.nm'], true)); - FOnMouseenter := Value; +procedure TExtDataProxyServer.SetFTimeout(Value : Integer); begin + FTimeout := Value; + JSCode('timeout:' + VarToJSON([Value])); end; -procedure TExtDomElement.SetFOnMouseleave(Value : TExtDomElementOnMouseleave); begin - if Assigned(FOnMouseleave) then - JSCode(JSName+'.events ["mouseleave"].listeners=[];'); - if Assigned(Value) then - AddListener('mouseleave', Ajax('mouseleave', ['E', '%0.nm','T', '%1.nm'], true)); - FOnMouseleave := Value; +procedure TExtDataProxyServer.SetFUrl(Value : String); begin + FUrl := Value; + JSCode('url:' + VarToJSON([Value])); end; -procedure TExtDomElement.SetFOnMousemove(Value : TExtDomElementOnMousemove); begin - if Assigned(FOnMousemove) then - JSCode(JSName+'.events ["mousemove"].listeners=[];'); - if Assigned(Value) then - AddListener('mousemove', Ajax('mousemove', ['E', '%0.nm','T', '%1.nm'], true)); - FOnMousemove := Value; +function TExtDataProxyServer.JSClassName : string; begin + Result := 'Ext.data.proxy.Server'; end; -procedure TExtDomElement.SetFOnMouseout(Value : TExtDomElementOnMouseout); begin - if Assigned(FOnMouseout) then - JSCode(JSName+'.events ["mouseout"].listeners=[];'); - if Assigned(Value) then - AddListener('mouseout', Ajax('mouseout', ['E', '%0.nm','T', '%1.nm'], true)); - FOnMouseout := Value; +procedure TExtDataProxyServer.InitDefaults; begin + inherited; + FApi := TExtObject.CreateInternal(Self, 'api'); + FCacheString := '_dc'; + FExtraParams := TExtObject.CreateInternal(Self, 'extraParams'); + FFilterParam := 'filter'; + FGroupParam := 'group'; + FLimitParam := 'limit'; + FNoCache := true; + FPageParam := 'page'; + FSortParam := 'sort'; + FStartParam := 'start'; + FTimeout := 30000; end; -procedure TExtDomElement.SetFOnMouseover(Value : TExtDomElementOnMouseover); begin - if Assigned(FOnMouseover) then - JSCode(JSName+'.events ["mouseover"].listeners=[];'); - if Assigned(Value) then - AddListener('mouseover', Ajax('mouseover', ['E', '%0.nm','T', '%1.nm'], true)); - FOnMouseover := Value; +{$IFDEF FPC}constructor TExtDataProxyServer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDataProxyServer.BuildRequest(Operation : TExtDataOperation) : TExtFunction; begin + JSCode(JSName + '.buildRequest(' + VarToJSON([Operation, false]) + ');', 'TExtDataProxyServer'); + Result := Self; end; -procedure TExtDomElement.SetFOnMouseup(Value : TExtDomElementOnMouseup); begin - if Assigned(FOnMouseup) then - JSCode(JSName+'.events ["mouseup"].listeners=[];'); - if Assigned(Value) then - AddListener('mouseup', Ajax('mouseup', ['E', '%0.nm','T', '%1.nm'], true)); - FOnMouseup := Value; +function TExtDataProxyServer.BuildUrl(Request : TExtDataRequest) : TExtFunction; begin + JSCode(JSName + '.buildUrl(' + VarToJSON([Request, false]) + ');', 'TExtDataProxyServer'); + Result := Self; end; -procedure TExtDomElement.SetFOnReset(Value : TExtDomElementOnReset); begin - if Assigned(FOnReset) then - JSCode(JSName+'.events ["reset"].listeners=[];'); - if Assigned(Value) then - AddListener('reset', Ajax('reset', ['E', '%0.nm','T', '%1.nm'], true)); - FOnReset := Value; +constructor TExtDataProxyServer.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtDomElement.SetFOnResize(Value : TExtDomElementOnResize); begin - if Assigned(FOnResize) then - JSCode(JSName+'.events ["resize"].listeners=[];'); - if Assigned(Value) then - AddListener('resize', Ajax('resize', ['E', '%0.nm','T', '%1.nm'], true)); - FOnResize := Value; +function TExtDataProxyServer.DoRequest(Operation : TExtDataOperation; Callback : TExtFunction; Scope : TExtObject) : TExtFunction; begin + JSCode(JSName + '.doRequest(' + VarToJSON([Operation, false, Callback, true, Scope, false]) + ');', 'TExtDataProxyServer'); + Result := Self; end; -procedure TExtDomElement.SetFOnScroll(Value : TExtDomElementOnScroll); begin - if Assigned(FOnScroll) then - JSCode(JSName+'.events ["scroll"].listeners=[];'); - if Assigned(Value) then - AddListener('scroll', Ajax('scroll', ['E', '%0.nm','T', '%1.nm'], true)); - FOnScroll := Value; +function TExtDataProxyServer.EncodeFilters(Filters : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.encodeFilters(' + VarToJSON(Filters) + ');', 'TExtDataProxyServer'); + Result := Self; end; -procedure TExtDomElement.SetFOnSelect(Value : TExtDomElementOnSelect); begin - if Assigned(FOnSelect) then - JSCode(JSName+'.events ["select"].listeners=[];'); - if Assigned(Value) then - AddListener('select', Ajax('select', ['E', '%0.nm','T', '%1.nm'], true)); - FOnSelect := Value; +function TExtDataProxyServer.EncodeSorters(Sorters : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.encodeSorters(' + VarToJSON(Sorters) + ');', 'TExtDataProxyServer'); + Result := Self; end; -procedure TExtDomElement.SetFOnSubmit(Value : TExtDomElementOnSubmit); begin - if Assigned(FOnSubmit) then - JSCode(JSName+'.events ["submit"].listeners=[];'); - if Assigned(Value) then - AddListener('submit', Ajax('submit', ['E', '%0.nm','T', '%1.nm'], true)); - FOnSubmit := Value; +function TExtDataProxyServer.SetExtraParam(Name : String; Value : TExtObject) : TExtFunction; begin + JSCode(JSName + '.setExtraParam(' + VarToJSON([Name, Value, false]) + ');', 'TExtDataProxyServer'); + Result := Self; end; -procedure TExtDomElement.SetFOnUnload(Value : TExtDomElementOnUnload); begin - if Assigned(FOnUnload) then - JSCode(JSName+'.events ["unload"].listeners=[];'); - if Assigned(Value) then - AddListener('unload', Ajax('unload', ['E', '%0.nm','T', '%1.nm'], true)); - FOnUnload := Value; +destructor TExtDataProxyServer.Destroy; begin + try + FApi.Free; + FExtraParams.Free; + except end; + inherited; end; -function TExtDomElement.JSClassName : string; begin - Result := 'Ext.dom.Element'; +procedure TExtViewBoundListKeyNav.SetFBoundList(Value : TExtViewBoundList); begin + FBoundList := Value; + Value.DeleteFromGarbage; + JSCode('boundList:' + VarToJSON([Value, false])); end; -{$IFDEF FPC}constructor TExtDomElement.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDomElement.Clean(ForceReclean : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.clean(' + VarToJSON([ForceReclean]) + ');', 'TExtDomElement'); - Result := Self; +function TExtViewBoundListKeyNav.JSClassName : string; begin + Result := 'Ext.view.BoundListKeyNav'; end; -function TExtDomElement.CreateProxy(Config : String; RenderTo : String = ''; MatchBox : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.createProxy(' + VarToJSON([Config, RenderTo, MatchBox]) + ');', 'TExtDomElement'); - Result := Self; +procedure TExtViewBoundListKeyNav.InitDefaults; begin + inherited; + FBoundList := TExtViewBoundList.CreateInternal(Self, 'boundList'); end; -function TExtDomElement.GetLoader : TExtFunction; begin - JSCode(JSName + '.getLoader();', 'TExtDomElement'); - Result := Self; +{$IFDEF FPC}constructor TExtViewBoundListKeyNav.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtViewBoundListKeyNav.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -function TExtDomElement.IsFocusable : TExtFunction; begin - JSCode(JSName + '.isFocusable();', 'TExtDomElement'); +function TExtViewBoundListKeyNav.HighlightAt(Index : Integer) : TExtFunction; begin + JSCode(JSName + '.highlightAt(' + VarToJSON([Index]) + ');', 'TExtViewBoundListKeyNav'); Result := Self; end; -function TExtDomElement.Load : TExtFunction; begin - JSCode(JSName + '.load();', 'TExtDomElement'); +function TExtViewBoundListKeyNav.SelectHighlighted : TExtFunction; begin + JSCode(JSName + '.selectHighlighted();', 'TExtViewBoundListKeyNav'); Result := Self; end; -function TExtDomElement.MonitorMouseLeave(Delay : Integer; Handler : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.monitorMouseLeave(' + VarToJSON([Delay, Handler, true, Scope, false]) + ');', 'TExtDomElement'); - Result := Self; +destructor TExtViewBoundListKeyNav.Destroy; begin + try + FBoundList.Free; + except end; + inherited; end; -function TExtDomElement.NeedsTabIndex : TExtFunction; begin - JSCode(JSName + '.needsTabIndex();', 'TExtDomElement'); - Result := Self; +procedure TExtProgressBar.SetFAnimate(Value : Boolean); begin + FAnimate := Value; + JSCode('animate:' + VarToJSON([Value])); end; -function TExtDomElement.On(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.on(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false]) + ');', 'TExtDomElement'); - Result := Self; +procedure TExtProgressBar.SetFAnimateObject(Value : TExtObject); begin + FAnimateObject := Value; + Value.DeleteFromGarbage; + JSCode('animate:' + VarToJSON([Value, false])); end; -function TExtDomElement.PurgeAllListeners : TExtFunction; begin - JSCode(JSName + '.purgeAllListeners();', 'TExtDomElement'); - Result := Self; +procedure TExtProgressBar.SetFBaseCls(Value : String); begin + FBaseCls := Value; + JSCode('baseCls:' + VarToJSON([Value])); end; -function TExtDomElement.RelayEvent(EventName : String; Observable : TExtObject) : TExtFunction; begin - JSCode(JSName + '.relayEvent(' + VarToJSON([EventName, Observable, false]) + ');', 'TExtDomElement'); - Result := Self; +procedure TExtProgressBar.SetFId(Value : String); begin + FId := Value; + JSCode('id:' + VarToJSON([Value])); end; -function TExtDomElement.RemoveAllListeners : TExtFunction; begin - JSCode(JSName + '.removeAllListeners();', 'TExtDomElement'); - Result := Self; +procedure TExtProgressBar.SetFText(Value : String); begin + FText := Value; + JSCode('text:' + VarToJSON([Value])); end; -function TExtDomElement.SwallowEvent(EventName : String; PreventDefault : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.swallowEvent(' + VarToJSON([EventName, PreventDefault]) + ');', 'TExtDomElement'); - Result := Self; +procedure TExtProgressBar.SetFTextEl(Value : String); begin + FTextEl := Value; + JSCode('textEl:' + VarToJSON([Value])); end; -function TExtDomElement.Un(EventName : String; Fn : TExtFunction; Scope : TExtObject) : TExtFunction; begin - JSCode(JSName + '.un(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtDomElement'); - Result := Self; +procedure TExtProgressBar.SetFTextElElement(Value : TExtElement); begin + FTextElElement := Value; + Value.DeleteFromGarbage; + JSCode('textEl:' + VarToJSON([Value, false])); end; -function TExtDomElement.Update(Html : String; LoadScripts : Boolean = false; Callback : TExtFunction = nil) : TExtFunction; begin - JSCode(JSName + '.update(' + VarToJSON([Html, LoadScripts, Callback, true]) + ');', 'TExtDomElement'); - Result := Self; +procedure TExtProgressBar.SetFTextElTHTMLElement(Value : THTMLElement); begin + FTextElTHTMLElement := Value; + Value.DeleteFromGarbage; + JSCode('textEl:' + VarToJSON([Value, false])); end; -procedure TExtDomElement.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'abort') and Assigned(FOnAbort) then - FOnAbort(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'blur') and Assigned(FOnBlur) then - FOnBlur(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'change') and Assigned(FOnChange) then - FOnChange(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'click') and Assigned(FOnClick) then - FOnClick(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'contextmenu') and Assigned(FOnContextmenu) then - FOnContextmenu(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'dblclick') and Assigned(FOnDblclick) then - FOnDblclick(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'DOMActivate') and Assigned(FOnDOMActivate) then - FOnDOMActivate(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'DOMAttrModified') and Assigned(FOnDOMAttrModified) then - FOnDOMAttrModified(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'DOMCharacterDataModified') and Assigned(FOnDOMCharacterDataModified) then - FOnDOMCharacterDataModified(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'DOMFocusIn') and Assigned(FOnDOMFocusIn) then - FOnDOMFocusIn(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'DOMFocusOut') and Assigned(FOnDOMFocusOut) then - FOnDOMFocusOut(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'DOMNodeInserted') and Assigned(FOnDOMNodeInserted) then - FOnDOMNodeInserted(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'DOMNodeInsertedIntoDocument') and Assigned(FOnDOMNodeInsertedIntoDocument) then - FOnDOMNodeInsertedIntoDocument(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'DOMNodeRemoved') and Assigned(FOnDOMNodeRemoved) then - FOnDOMNodeRemoved(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'DOMNodeRemovedFromDocument') and Assigned(FOnDOMNodeRemovedFromDocument) then - FOnDOMNodeRemovedFromDocument(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'DOMSubtreeModified') and Assigned(FOnDOMSubtreeModified) then - FOnDOMSubtreeModified(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'error') and Assigned(FOnError) then - FOnError(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'focus') and Assigned(FOnFocus) then - FOnFocus(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'keydown') and Assigned(FOnKeydown) then - FOnKeydown(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'keypress') and Assigned(FOnKeypress) then - FOnKeypress(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'keyup') and Assigned(FOnKeyup) then - FOnKeyup(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'load') and Assigned(FOnLoad) then - FOnLoad(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'mousedown') and Assigned(FOnMousedown) then - FOnMousedown(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'mouseenter') and Assigned(FOnMouseenter) then - FOnMouseenter(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'mouseleave') and Assigned(FOnMouseleave) then - FOnMouseleave(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'mousemove') and Assigned(FOnMousemove) then - FOnMousemove(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'mouseout') and Assigned(FOnMouseout) then - FOnMouseout(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'mouseover') and Assigned(FOnMouseover) then - FOnMouseover(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'mouseup') and Assigned(FOnMouseup) then - FOnMouseup(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'reset') and Assigned(FOnReset) then - FOnReset(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'resize') and Assigned(FOnResize) then - FOnResize(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'scroll') and Assigned(FOnScroll) then - FOnScroll(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'select') and Assigned(FOnSelect) then - FOnSelect(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'submit') and Assigned(FOnSubmit) then - FOnSubmit(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))) - else if (AEvtName = 'unload') and Assigned(FOnUnload) then - FOnUnload(TExtEventObject(ParamAsObject('E')), THTMLElement(ParamAsObject('T'))); +procedure TExtProgressBar.SetFValue(Value : Integer); begin + FValue := Value; + JSCode('value:' + VarToJSON([Value])); end; -procedure TExtDdStatusProxy.SetFDropAllowed(Value : String); begin - FDropAllowed := Value; - JSCode('dropAllowed:' + VarToJSON([Value])); +procedure TExtProgressBar.SetFOnUpdate(Value : TExtProgressBarOnUpdate); begin + if Assigned(FOnUpdate) then + JSCode(JSName+'.events ["update"].listeners=[];'); + if Assigned(Value) then + AddListener('update', Ajax('update', ['This', '%0.nm','Value', '%1','Text', '%2'], true)); + FOnUpdate := Value; end; -procedure TExtDdStatusProxy.SetFDropNotAllowed(Value : String); begin - FDropNotAllowed := Value; - JSCode('dropNotAllowed:' + VarToJSON([Value])); +function TExtProgressBar.JSClassName : string; begin + Result := 'Ext.ProgressBar'; end; -function TExtDdStatusProxy.JSClassName : string; begin - Result := 'Ext.dd.StatusProxy'; +procedure TExtProgressBar.InitDefaults; begin + inherited; + FAnimateObject := TExtObject.CreateInternal(Self, 'animate'); + FTextElElement := TExtElement.CreateInternal(Self, 'textEl'); end; -{$IFDEF FPC}constructor TExtDdStatusProxy.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtProgressBar.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtDdStatusProxy.GetGhost : TExtFunction; begin - JSCode(JSName + '.getGhost();', 'TExtDdStatusProxy'); - Result := Self; +constructor TExtProgressBar.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -function TExtDdStatusProxy.Hide(Clear : Boolean) : TExtFunction; begin - JSCode(JSName + '.hide(' + VarToJSON([Clear]) + ');', 'TExtDdStatusProxy'); +function TExtProgressBar.IsWaiting : TExtFunction; begin + JSCode(JSName + '.isWaiting();', 'TExtProgressBar'); Result := Self; end; -function TExtDdStatusProxy.Repair(Xy : TArrayOfInteger; Callback : TExtFunction; Scope : TExtObject) : TExtFunction; begin - JSCode(JSName + '.repair(' + VarToJSON([Xy, Callback, true, Scope, false]) + ');', 'TExtDdStatusProxy'); +function TExtProgressBar.Reset(Hide : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.reset(' + VarToJSON([Hide]) + ');', 'TExtProgressBar'); Result := Self; end; -function TExtDdStatusProxy.Reset(ClearGhost : Boolean) : TExtFunction; begin - JSCode(JSName + '.reset(' + VarToJSON([ClearGhost]) + ');', 'TExtDdStatusProxy'); +function TExtProgressBar.UpdateProgress(Value : Integer = 0; Text : String = ''; Animate : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.updateProgress(' + VarToJSON([Value, Text, Animate]) + ');', 'TExtProgressBar'); Result := Self; end; -function TExtDdStatusProxy.SetStatus(CssClass : String) : TExtFunction; begin - JSCode(JSName + '.setStatus(' + VarToJSON([CssClass]) + ');', 'TExtDdStatusProxy'); +function TExtProgressBar.UpdateText(Text : String = '') : TExtFunction; begin + JSCode(JSName + '.updateText(' + VarToJSON([Text]) + ');', 'TExtProgressBar'); Result := Self; end; -function TExtDdStatusProxy.Stop : TExtFunction; begin - JSCode(JSName + '.stop();', 'TExtDdStatusProxy'); +function TExtProgressBar.Wait(Config : TExtObject = nil; ConfigDuration : Integer = 0; ConfigInterval : Integer = 0; ConfigAnimate : Boolean = false; ConfigIncrement : Integer = 0; ConfigText : String = ''; ConfigFn : TExtFunction = nil; ConfigScope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.wait(' + VarToJSON([Config, false, ConfigDuration, ConfigInterval, ConfigAnimate, ConfigIncrement, ConfigText, ConfigFn, true, ConfigScope, false]) + ');', 'TExtProgressBar'); Result := Self; end; -function TExtDdStatusProxy.Sync : TExtFunction; begin - JSCode(JSName + '.sync();', 'TExtDdStatusProxy'); - Result := Self; +destructor TExtProgressBar.Destroy; begin + try + FAnimateObject.Free; + FTextElElement.Free; + except end; + inherited; end; -function TExtDdStatusProxy.Update(Html : String) : TExtFunction; begin - JSCode(JSName + '.update(' + VarToJSON([Html]) + ');', 'TExtDdStatusProxy'); - Result := Self; +procedure TExtProgressBar.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'update') and Assigned(FOnUpdate) then + FOnUpdate(TExtProgressBar(ParamAsObject('This')), ParamAsInteger('Value'), ParamAsString('Text')); end; -function TExtDirectRemotingEvent.JSClassName : string; begin - Result := 'Ext.direct.RemotingEvent'; +procedure TExtToolbarFill.SetFIsFill(Value : Boolean); begin + FIsFill := Value; + JSCode(JSName + '.isFill=' + VarToJSON([Value]) + ';'); end; -{$IFDEF FPC}constructor TExtDirectRemotingEvent.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDirectRemotingEvent.GetTransaction : TExtFunction; begin - JSCode(JSName + '.getTransaction();', 'TExtDirectRemotingEvent'); - Result := Self; +function TExtToolbarFill.JSClassName : string; begin + Result := 'Ext.toolbar.Fill'; end; -function TExtDirectJsonProvider.JSClassName : string; begin - Result := 'Ext.direct.JsonProvider'; +{$IFDEF FPC}constructor TExtToolbarFill.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDrawEngineSvg.JSClassName : string; begin + Result := 'Ext.draw.engine.Svg'; end; -{$IFDEF FPC}constructor TExtDirectJsonProvider.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtDrawEngineSvg.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtDirectJsonProvider.CreateEvent(Response : TExtObject) : TExtFunction; begin - JSCode(JSName + '.createEvent(' + VarToJSON([Response, false]) + ');', 'TExtDirectJsonProvider'); +function TExtDrawEngineSvg.ApplyZIndex(Sprite : TExtDrawSprite) : TExtFunction; begin + JSCode(JSName + '.applyZIndex(' + VarToJSON([Sprite, false]) + ');', 'TExtDrawEngineSvg'); Result := Self; end; -function TExtDirectJsonProvider.CreateEvents(Response : TExtObject) : TExtFunction; begin - JSCode(JSName + '.createEvents(' + VarToJSON([Response, false]) + ');', 'TExtDirectJsonProvider'); +function TExtDrawEngineSvg.GetRegion : TExtFunction; begin + JSCode(JSName + '.getRegion();', 'TExtDrawEngineSvg'); Result := Self; end; -procedure TExtComponentLoader.SetFLoadMask(Value : Boolean); begin - FLoadMask := Value; - JSCode('loadMask:' + VarToJSON([Value])); -end; - -procedure TExtComponentLoader.SetFLoadMaskObject(Value : TExtObject); begin - FLoadMaskObject := Value; - Value.DeleteFromGarbage; - JSCode('loadMask:' + VarToJSON([Value, false])); +function TExtDrawEngineSvg.HasCls(Sprite : TExtDrawSprite; ClassName : String) : TExtFunction; begin + JSCode(JSName + '.hasCls(' + VarToJSON([Sprite, false, ClassName]) + ');', 'TExtDrawEngineSvg'); + Result := Self; end; -procedure TExtComponentLoader.SetFRenderer(Value : String); begin - FRenderer := Value; - JSCode('renderer:' + VarToJSON([Value])); +procedure TExtToolbarItem.SetFOverflowText(Value : String); begin + FOverflowText := Value; + JSCode('overflowText:' + VarToJSON([Value])); end; -procedure TExtComponentLoader.SetFRendererFunction(Value : TExtFunction); begin - FRendererFunction := Value; - JSCode('renderer:' + VarToJSON([Value, true])); +function TExtToolbarItem.JSClassName : string; begin + Result := 'Ext.toolbar.Item'; end; -procedure TExtComponentLoader.SetFScripts(Value : Boolean); begin - FScripts := Value; - JSCode('scripts:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtToolbarItem.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtComponentLoader.SetFTarget(Value : TExtComponent); begin - FTarget := Value; - Value.DeleteFromGarbage; - JSCode('target:' + VarToJSON([Value, false])); +function TExtDataReader.JSClassName : string; begin + Result := 'Ext.data.reader.Reader'; end; -procedure TExtComponentLoader.SetFTargetString(Value : String); begin - FTargetString := Value; - JSCode('target:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtDataReader.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtComponentLoader.JSClassName : string; begin - Result := 'Ext.ComponentLoader'; +procedure TExtFormActionSubmit.SetFClientValidation(Value : Boolean); begin + FClientValidation := Value; + JSCode('clientValidation:' + VarToJSON([Value])); end; -procedure TExtComponentLoader.InitDefaults; begin - inherited; - FLoadMaskObject := TExtObject.CreateInternal(Self, 'loadMask'); - FTarget := TExtComponent.CreateInternal(Self, 'target'); +function TExtFormActionSubmit.JSClassName : string; begin + Result := 'Ext.form.action.Submit'; end; -{$IFDEF FPC}constructor TExtComponentLoader.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtFormActionSubmit.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtComponentLoader.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +function TExtResizerResizeTracker.JSClassName : string; begin + Result := 'Ext.resizer.ResizeTracker'; end; -function TExtComponentLoader.SetTarget(Target : String) : TExtFunction; begin - JSCode(JSName + '.setTarget(' + VarToJSON([Target]) + ');', 'TExtComponentLoader'); +{$IFDEF FPC}constructor TExtResizerResizeTracker.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtResizerResizeTracker.CreateProxy(Target : TExtComponent) : TExtFunction; begin + JSCode(JSName + '.createProxy(' + VarToJSON([Target, false]) + ');', 'TExtResizerResizeTracker'); Result := Self; end; -destructor TExtComponentLoader.Destroy; begin - try - FLoadMaskObject.Free; - FTarget.Free; - except end; - inherited; +function TExtResizerSplitterTracker.JSClassName : string; begin + Result := 'Ext.resizer.SplitterTracker'; end; -function TExtDdDDTarget.JSClassName : string; begin - Result := 'Ext.dd.DDTarget'; -end; +{$IFDEF FPC}constructor TExtResizerSplitterTracker.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -{$IFDEF FPC}constructor TExtDdDDTarget.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtResizerSplitter.SetFCollapsedCls(Value : String); begin + FCollapsedCls := Value; + JSCode('collapsedCls:' + VarToJSON([Value])); +end; -constructor TExtDdDDTarget.Create(Id : String; SGroup : String; Config : TExtObject); begin - CreateVar(JSClassName + '(' + VarToJSON([Id, SGroup, Config, false]) + ');'); - InitDefaults; +procedure TExtResizerSplitter.SetFCollapseOnDblClick(Value : Boolean); begin + FCollapseOnDblClick := Value; + JSCode('collapseOnDblClick:' + VarToJSON([Value])); end; -function TExtDrawEngineSvg.JSClassName : string; begin - Result := 'Ext.draw.engine.Svg'; +procedure TExtResizerSplitter.SetFCollapseTarget(Value : String); begin + FCollapseTarget := Value; + JSCode('collapseTarget:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtDrawEngineSvg.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtResizerSplitter.SetFCollapseTargetPanel(Value : TExtPanel); begin + FCollapseTargetPanel := Value; + Value.DeleteFromGarbage; + JSCode('collapseTarget:' + VarToJSON([Value, false])); +end; -function TExtDrawEngineSvg.ApplyZIndex(Sprite : TExtDrawSprite) : TExtFunction; begin - JSCode(JSName + '.applyZIndex(' + VarToJSON([Sprite, false]) + ');', 'TExtDrawEngineSvg'); - Result := Self; +procedure TExtResizerSplitter.SetFCollapsible(Value : Boolean); begin + FCollapsible := Value; + JSCode('collapsible:' + VarToJSON([Value])); end; -function TExtDrawEngineSvg.GetRegion : TExtFunction; begin - JSCode(JSName + '.getRegion();', 'TExtDrawEngineSvg'); - Result := Self; +procedure TExtResizerSplitter.SetFDefaultSplitMax(Value : Integer); begin + FDefaultSplitMax := Value; + JSCode('defaultSplitMax:' + VarToJSON([Value])); end; -function TExtDrawEngineSvg.HasCls(Sprite : TExtDrawSprite; ClassName : String) : TExtFunction; begin - JSCode(JSName + '.hasCls(' + VarToJSON([Sprite, false, ClassName]) + ');', 'TExtDrawEngineSvg'); - Result := Self; +procedure TExtResizerSplitter.SetFDefaultSplitMin(Value : Integer); begin + FDefaultSplitMin := Value; + JSCode('defaultSplitMin:' + VarToJSON([Value])); end; -procedure TExtContainerAbstractContainer.SetFActiveItem(Value : String); begin - FActiveItem := Value; - JSCode('activeItem:' + VarToJSON([Value])); +procedure TExtResizerSplitter.SetFOrientation(Value : String); begin + FOrientation := Value; + JSCode(JSName + '.orientation=' + VarToJSON([Value]) + ';'); end; -procedure TExtContainerAbstractContainer.SetFActiveItemInteger(Value : Integer); begin - FActiveItemInteger := Value; - JSCode('activeItem:' + VarToJSON([Value])); +procedure TExtResizerSplitter.SetFPerformCollapse(Value : Boolean); begin + FPerformCollapse := Value; + JSCode('performCollapse:' + VarToJSON([Value])); end; -procedure TExtContainerAbstractContainer.SetFAutoDestroy(Value : Boolean); begin - FAutoDestroy := Value; - JSCode('autoDestroy:' + VarToJSON([Value])); +procedure TExtResizerSplitter.SetFSize(Value : Integer); begin + FSize := Value; + JSCode('size:' + VarToJSON([Value])); end; -procedure TExtContainerAbstractContainer.SetFBubbleEvents(Value : TExtObjectList); begin - FBubbleEvents := Value; - Value.DeleteFromGarbage; - JSCode('bubbleEvents:' + VarToJSON([Value, false])); +function TExtResizerSplitter.JSClassName : string; begin + Result := 'Ext.resizer.Splitter'; end; -procedure TExtContainerAbstractContainer.SetFDefaults(Value : TExtObject); begin - FDefaults := Value; - Value.DeleteFromGarbage; - JSCode('defaults:' + VarToJSON([Value, false])); +procedure TExtResizerSplitter.InitDefaults; begin + inherited; + FCollapseTargetPanel := TExtPanel.CreateInternal(Self, 'collapseTarget'); end; -procedure TExtContainerAbstractContainer.SetFDefaultsFunction(Value : TExtFunction); begin - FDefaultsFunction := Value; - JSCode('defaults:' + VarToJSON([Value, true])); +{$IFDEF FPC}constructor TExtResizerSplitter.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtResizerSplitter.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtContainerAbstractContainer.SetFDefaultType(Value : String); begin - FDefaultType := Value; - JSCode('defaultType:' + VarToJSON([Value])); +destructor TExtResizerSplitter.Destroy; begin + try + FCollapseTargetPanel.Free; + except end; + inherited; end; -procedure TExtContainerAbstractContainer.SetFDetachOnRemove(Value : Boolean); begin - FDetachOnRemove := Value; - JSCode('detachOnRemove:' + VarToJSON([Value])); +procedure TExtTreePluginTreeViewDragDrop.SetFAllowContainerDrops(Value : Boolean); begin + FAllowContainerDrops := Value; + JSCode('allowContainerDrops:' + VarToJSON([Value])); end; -procedure TExtContainerAbstractContainer.SetFItems(Value : TExtObjectList); begin - FItems := Value; - Value.DeleteFromGarbage; - JSCode('items:' + VarToJSON([Value, false])); +procedure TExtTreePluginTreeViewDragDrop.SetFAllowParentInserts(Value : Boolean); begin + FAllowParentInserts := Value; + JSCode('allowParentInserts:' + VarToJSON([Value])); end; -procedure TExtContainerAbstractContainer.SetFLayout(Value : TExtEnumsLayout); begin - FLayout := Value; - JSCode('layout:"' + EnumToJSString(TypeInfo(TExtEnumsLayout), ord(Value)) + '"'); +procedure TExtTreePluginTreeViewDragDrop.SetFAppendOnly(Value : Boolean); begin + FAppendOnly := Value; + JSCode('appendOnly:' + VarToJSON([Value])); end; -procedure TExtContainerAbstractContainer.SetFLayoutObject(Value : TExtObject); begin - FLayoutObject := Value; +procedure TExtTreePluginTreeViewDragDrop.SetFContainerScroll(Value : TExtObject); begin + FContainerScroll := Value; Value.DeleteFromGarbage; - JSCode('layout:' + VarToJSON([Value, false])); + JSCode('containerScroll:' + VarToJSON([Value, false])); end; -procedure TExtContainerAbstractContainer.SetFSuspendLayout(Value : Boolean); begin - FSuspendLayout := Value; - JSCode('suspendLayout:' + VarToJSON([Value])); +procedure TExtTreePluginTreeViewDragDrop.SetFContainerScrollBoolean(Value : Boolean); begin + FContainerScrollBoolean := Value; + JSCode('containerScroll:' + VarToJSON([Value])); end; -procedure TExtContainerAbstractContainer.SetFOnAdd(Value : TExtContainerAbstractContainerOnAdd); begin - if Assigned(FOnAdd) then - JSCode(JSName+'.events ["add"].listeners=[];'); - if Assigned(Value) then - AddListener('add', Ajax('add', ['This', '%0.nm','Component', '%1.nm','Index', '%2'], true)); - FOnAdd := Value; +procedure TExtTreePluginTreeViewDragDrop.SetFDdGroup(Value : String); begin + FDdGroup := Value; + JSCode('ddGroup:' + VarToJSON([Value])); end; -procedure TExtContainerAbstractContainer.SetFOnAfterlayout(Value : TExtContainerAbstractContainerOnAfterlayout); begin - if Assigned(FOnAfterlayout) then - JSCode(JSName+'.events ["afterlayout"].listeners=[];'); - if Assigned(Value) then - AddListener('afterlayout', Ajax('afterlayout', ['This', '%0.nm','Layout', '%1.nm'], true)); - FOnAfterlayout := Value; +procedure TExtTreePluginTreeViewDragDrop.SetFDisplayField(Value : String); begin + FDisplayField := Value; + JSCode('displayField:' + VarToJSON([Value])); end; -procedure TExtContainerAbstractContainer.SetFOnBeforeadd(Value : TExtContainerAbstractContainerOnBeforeadd); begin - if Assigned(FOnBeforeadd) then - JSCode(JSName+'.events ["beforeadd"].listeners=[];'); - if Assigned(Value) then - AddListener('beforeadd', Ajax('beforeadd', ['This', '%0.nm','Component', '%1.nm','Index', '%2'], true)); - FOnBeforeadd := Value; +procedure TExtTreePluginTreeViewDragDrop.SetFDropGroup(Value : String); begin + FDropGroup := Value; + JSCode('dropGroup:' + VarToJSON([Value])); end; -procedure TExtContainerAbstractContainer.SetFOnBeforeremove(Value : TExtContainerAbstractContainerOnBeforeremove); begin - if Assigned(FOnBeforeremove) then - JSCode(JSName+'.events ["beforeremove"].listeners=[];'); - if Assigned(Value) then - AddListener('beforeremove', Ajax('beforeremove', ['This', '%0.nm','Component', '%1.nm'], true)); - FOnBeforeremove := Value; +procedure TExtTreePluginTreeViewDragDrop.SetFEnableDrag(Value : Boolean); begin + FEnableDrag := Value; + JSCode('enableDrag:' + VarToJSON([Value])); end; -procedure TExtContainerAbstractContainer.SetFOnRemove(Value : TExtContainerAbstractContainerOnRemove); begin - if Assigned(FOnRemove) then - JSCode(JSName+'.events ["remove"].listeners=[];'); - if Assigned(Value) then - AddListener('remove', Ajax('remove', ['This', '%0.nm','Component', '%1.nm'], true)); - FOnRemove := Value; +procedure TExtTreePluginTreeViewDragDrop.SetFEnableDrop(Value : Boolean); begin + FEnableDrop := Value; + JSCode('enableDrop:' + VarToJSON([Value])); end; -function TExtContainerAbstractContainer.JSClassName : string; begin - Result := 'Ext.container.AbstractContainer'; +procedure TExtTreePluginTreeViewDragDrop.SetFExpandDelay(Value : String); begin + FExpandDelay := Value; + JSCode('expandDelay:' + VarToJSON([Value])); end; -procedure TExtContainerAbstractContainer.InitDefaults; begin - inherited; - FBubbleEvents := TExtObjectList.Create(Self, 'bubbleEvents'); - FDefaults := TExtObject.CreateInternal(Self, 'defaults'); - FItems := TExtObjectList.Create(Self, 'items'); - FLayoutObject := TExtObject.CreateInternal(Self, 'layout'); +procedure TExtTreePluginTreeViewDragDrop.SetFNodeHighlightColor(Value : String); begin + FNodeHighlightColor := Value; + JSCode('nodeHighlightColor:' + VarToJSON([Value])); +end; + +procedure TExtTreePluginTreeViewDragDrop.SetFNodeHighlightOnDrop(Value : Boolean); begin + FNodeHighlightOnDrop := Value; + JSCode('nodeHighlightOnDrop:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtContainerAbstractContainer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtContainerAbstractContainer.Add(Component : TExtComponent) : TExtFunction; begin - JSCode(JSName + '.add(' + VarToJSON([Component, false]) + ');', 'TExtContainerAbstractContainer'); - Result := Self; +procedure TExtTreePluginTreeViewDragDrop.SetFNodeHighlightOnRepair(Value : Boolean); begin + FNodeHighlightOnRepair := Value; + JSCode('nodeHighlightOnRepair:' + VarToJSON([Value])); end; -function TExtContainerAbstractContainer.Cascade(Fn : TExtFunction; Scope : TExtObject = nil; Args : TExtObjectList = nil) : TExtFunction; begin - JSCode(JSName + '.cascade(' + VarToJSON([Fn, true, Scope, false]) + ',' + VarToJSON(Args) + ');', 'TExtContainerAbstractContainer'); - Result := Self; +procedure TExtTreePluginTreeViewDragDrop.SetFSortOnDrop(Value : Boolean); begin + FSortOnDrop := Value; + JSCode('sortOnDrop:' + VarToJSON([Value])); end; -function TExtContainerAbstractContainer.Child(Selector : String = '') : TExtFunction; begin - JSCode(JSName + '.child(' + VarToJSON([Selector]) + ');', 'TExtContainerAbstractContainer'); - Result := Self; +function TExtTreePluginTreeViewDragDrop.JSClassName : string; begin + Result := 'Ext.tree.plugin.TreeViewDragDrop'; end; -function TExtContainerAbstractContainer.Contains(Comp : TExtComponent; Deep : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.contains(' + VarToJSON([Comp, false, Deep]) + ');', 'TExtContainerAbstractContainer'); - Result := Self; +procedure TExtTreePluginTreeViewDragDrop.InitDefaults; begin + inherited; + FContainerScroll := TExtObject.CreateInternal(Self, 'containerScroll'); end; -constructor TExtContainerAbstractContainer.Create; begin +{$IFDEF FPC}constructor TExtTreePluginTreeViewDragDrop.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtTreePluginTreeViewDragDrop.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -function TExtContainerAbstractContainer.DoLayout : TExtFunction; begin - JSCode(JSName + '.doLayout();', 'TExtContainerAbstractContainer'); - Result := Self; +destructor TExtTreePluginTreeViewDragDrop.Destroy; begin + try + FContainerScroll.Free; + except end; + inherited; end; -function TExtContainerAbstractContainer.Down(Selector : String = '') : TExtFunction; begin - JSCode(JSName + '.down(' + VarToJSON([Selector]) + ');', 'TExtContainerAbstractContainer'); - Result := Self; +function TExtResizerHandle.JSClassName : string; begin + Result := 'Ext.resizer.Handle'; end; -function TExtContainerAbstractContainer.GetComponent(Comp : Integer) : TExtFunction; begin - JSCode(JSName + '.getComponent(' + VarToJSON([Comp]) + ');', 'TExtContainerAbstractContainer'); - Result := Self; -end; +{$IFDEF FPC}constructor TExtResizerHandle.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtContainerAbstractContainer.GetLayout : TExtFunction; begin - JSCode(JSName + '.getLayout();', 'TExtContainerAbstractContainer'); - Result := Self; +function TExtDirectJsonProvider.JSClassName : string; begin + Result := 'Ext.direct.JsonProvider'; end; -function TExtContainerAbstractContainer.Insert(Index : Integer; Component : TExtComponent) : TExtFunction; begin - JSCode(JSName + '.insert(' + VarToJSON([Index, Component, false]) + ');', 'TExtContainerAbstractContainer'); +{$IFDEF FPC}constructor TExtDirectJsonProvider.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDirectJsonProvider.CreateEvent(Response : TExtObject) : TExtFunction; begin + JSCode(JSName + '.createEvent(' + VarToJSON([Response, false]) + ');', 'TExtDirectJsonProvider'); Result := Self; end; -function TExtContainerAbstractContainer.IsAncestor(PossibleDescendant : TExtComponent) : TExtFunction; begin - JSCode(JSName + '.isAncestor(' + VarToJSON([PossibleDescendant, false]) + ');', 'TExtContainerAbstractContainer'); +function TExtDirectJsonProvider.CreateEvents(Response : TExtObject) : TExtFunction; begin + JSCode(JSName + '.createEvents(' + VarToJSON([Response, false]) + ');', 'TExtDirectJsonProvider'); Result := Self; end; -function TExtContainerAbstractContainer.Move(FromIdx : Integer; ToIdx : Integer) : TExtFunction; begin - JSCode(JSName + '.move(' + VarToJSON([FromIdx, ToIdx]) + ');', 'TExtContainerAbstractContainer'); - Result := Self; +procedure TExtFormFieldBase.SetFActiveError(Value : String); begin + FActiveError := Value; + if not ConfigAvailable(JSName) then + SetActiveError(Value) + else + JSCode('activeError:' + VarToJSON([Value])); end; -function TExtContainerAbstractContainer.Query(Selector : String = '') : TExtFunction; begin - JSCode(JSName + '.query(' + VarToJSON([Selector]) + ');', 'TExtContainerAbstractContainer'); - Result := Self; +procedure TExtFormFieldBase.SetFActiveErrorsTpl(Value : String); begin + FActiveErrorsTpl := Value; + JSCode('activeErrorsTpl:' + VarToJSON([Value])); end; -function TExtContainerAbstractContainer.QueryBy(Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.queryBy(' + VarToJSON([Fn, true, Scope, false]) + ');', 'TExtContainerAbstractContainer'); - Result := Self; +procedure TExtFormFieldBase.SetFActiveErrorsTplList(Value : TExtObjectList); begin + FActiveErrorsTplList := Value; + Value.DeleteFromGarbage; + JSCode('activeErrorsTpl:' + VarToJSON([Value, false])); end; -function TExtContainerAbstractContainer.QueryById(Id : String) : TExtFunction; begin - JSCode(JSName + '.queryById(' + VarToJSON([Id]) + ');', 'TExtContainerAbstractContainer'); - Result := Self; +procedure TExtFormFieldBase.SetFActiveErrorsTplTemplate(Value : TExtXTemplate); begin + FActiveErrorsTplTemplate := Value; + Value.DeleteFromGarbage; + JSCode('activeErrorsTpl:' + VarToJSON([Value, false])); end; -function TExtContainerAbstractContainer.Remove(Component : String; AutoDestroy : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.remove(' + VarToJSON([Component, AutoDestroy]) + ');', 'TExtContainerAbstractContainer'); - Result := Self; +procedure TExtFormFieldBase.SetFAfterBodyEl(Value : String); begin + FAfterBodyEl := Value; + JSCode('afterBodyEl:' + VarToJSON([Value])); end; -function TExtContainerAbstractContainer.RemoveAll(AutoDestroy : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.removeAll(' + VarToJSON([AutoDestroy]) + ');', 'TExtContainerAbstractContainer'); - Result := Self; +procedure TExtFormFieldBase.SetFAfterBodyElList(Value : TExtObjectList); begin + FAfterBodyElList := Value; + Value.DeleteFromGarbage; + JSCode('afterBodyEl:' + VarToJSON([Value, false])); end; -destructor TExtContainerAbstractContainer.Destroy; begin - try - FBubbleEvents.Free; - FDefaults.Free; - FItems.Free; - FLayoutObject.Free; - except end; - inherited; +procedure TExtFormFieldBase.SetFAfterBodyElTemplate(Value : TExtXTemplate); begin + FAfterBodyElTemplate := Value; + Value.DeleteFromGarbage; + JSCode('afterBodyEl:' + VarToJSON([Value, false])); end; -procedure TExtContainerAbstractContainer.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'add') and Assigned(FOnAdd) then - FOnAdd(TExtContainerAbstractContainer(ParamAsObject('This')), TExtComponent(ParamAsObject('Component')), ParamAsInteger('Index')) - else if (AEvtName = 'afterlayout') and Assigned(FOnAfterlayout) then - FOnAfterlayout(TExtContainerAbstractContainer(ParamAsObject('This')), TExtLayoutContainer(ParamAsObject('Layout'))) - else if (AEvtName = 'beforeadd') and Assigned(FOnBeforeadd) then - FOnBeforeadd(TExtContainerAbstractContainer(ParamAsObject('This')), TExtComponent(ParamAsObject('Component')), ParamAsInteger('Index')) - else if (AEvtName = 'beforeremove') and Assigned(FOnBeforeremove) then - FOnBeforeremove(TExtContainerAbstractContainer(ParamAsObject('This')), TExtComponent(ParamAsObject('Component'))) - else if (AEvtName = 'remove') and Assigned(FOnRemove) then - FOnRemove(TExtContainerAbstractContainer(ParamAsObject('This')), TExtComponent(ParamAsObject('Component'))); +procedure TExtFormFieldBase.SetFAfterLabelTextTpl(Value : String); begin + FAfterLabelTextTpl := Value; + JSCode('afterLabelTextTpl:' + VarToJSON([Value])); end; -function TExtDrawEngineVml.JSClassName : string; begin - Result := 'Ext.draw.engine.Vml'; +procedure TExtFormFieldBase.SetFAfterLabelTextTplList(Value : TExtObjectList); begin + FAfterLabelTextTplList := Value; + Value.DeleteFromGarbage; + JSCode('afterLabelTextTpl:' + VarToJSON([Value, false])); end; -{$IFDEF FPC}constructor TExtDrawEngineVml.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtFormFieldBase.SetFAfterLabelTextTplTemplate(Value : TExtXTemplate); begin + FAfterLabelTextTplTemplate := Value; + Value.DeleteFromGarbage; + JSCode('afterLabelTextTpl:' + VarToJSON([Value, false])); +end; -function TExtDrawEngineVml.AddGradient(Gradient : TExtObject) : TExtFunction; begin - JSCode(JSName + '.addGradient(' + VarToJSON([Gradient, false]) + ');', 'TExtDrawEngineVml'); - Result := Self; +procedure TExtFormFieldBase.SetFAfterLabelTpl(Value : String); begin + FAfterLabelTpl := Value; + JSCode('afterLabelTpl:' + VarToJSON([Value])); end; -procedure TExtAjaxSingleton.SetFAutoAbort(Value : Boolean); begin - FAutoAbort := Value; - JSCode(JSName + '.autoAbort=' + VarToJSON([Value]) + ';'); +procedure TExtFormFieldBase.SetFAfterLabelTplList(Value : TExtObjectList); begin + FAfterLabelTplList := Value; + Value.DeleteFromGarbage; + JSCode('afterLabelTpl:' + VarToJSON([Value, false])); end; -procedure TExtAjaxSingleton.SetFDefaultHeaders(Value : TExtObject); begin - FDefaultHeaders := Value; +procedure TExtFormFieldBase.SetFAfterLabelTplTemplate(Value : TExtXTemplate); begin + FAfterLabelTplTemplate := Value; Value.DeleteFromGarbage; - JSCode(JSName + '.defaultHeaders=' + VarToJSON([Value, false]) + ';'); + JSCode('afterLabelTpl:' + VarToJSON([Value, false])); end; -procedure TExtAjaxSingleton.SetFDisableCaching(Value : Boolean); begin - FDisableCaching := Value; - JSCode(JSName + '.disableCaching=' + VarToJSON([Value]) + ';'); +procedure TExtFormFieldBase.SetFAfterSubTpl(Value : String); begin + FAfterSubTpl := Value; + JSCode('afterSubTpl:' + VarToJSON([Value])); end; -procedure TExtAjaxSingleton.SetFExtraParams(Value : TExtObject); begin - FExtraParams := Value; +procedure TExtFormFieldBase.SetFAfterSubTplList(Value : TExtObjectList); begin + FAfterSubTplList := Value; Value.DeleteFromGarbage; - JSCode(JSName + '.extraParams=' + VarToJSON([Value, false]) + ';'); + JSCode('afterSubTpl:' + VarToJSON([Value, false])); end; -procedure TExtAjaxSingleton.SetFMethod(Value : String); begin - FMethod := Value; - JSCode(JSName + '.method=' + VarToJSON([Value]) + ';'); +procedure TExtFormFieldBase.SetFAfterSubTplTemplate(Value : TExtXTemplate); begin + FAfterSubTplTemplate := Value; + Value.DeleteFromGarbage; + JSCode('afterSubTpl:' + VarToJSON([Value, false])); end; -procedure TExtAjaxSingleton.SetFTimeout(Value : Integer); begin - FTimeout := Value; - JSCode(JSName + '.timeout=' + VarToJSON([Value]) + ';'); +procedure TExtFormFieldBase.SetFAutoFitErrors(Value : Boolean); begin + FAutoFitErrors := Value; + JSCode('autoFitErrors:' + VarToJSON([Value])); end; -procedure TExtAjaxSingleton.SetFUrl(Value : String); begin - FUrl := Value; - JSCode(JSName + '.url=' + VarToJSON([Value]) + ';'); +procedure TExtFormFieldBase.SetFBaseBodyCls(Value : String); begin + FBaseBodyCls := Value; + JSCode('baseBodyCls:' + VarToJSON([Value])); end; -function TExtAjaxSingleton.JSClassName : string; begin - Result := 'Ext.Ajax'; +procedure TExtFormFieldBase.SetFBeforeBodyEl(Value : String); begin + FBeforeBodyEl := Value; + JSCode('beforeBodyEl:' + VarToJSON([Value])); end; -procedure TExtAjaxSingleton.InitDefaults; begin - inherited; - FDefaultHeaders := TExtObject.CreateInternal(Self, 'defaultHeaders'); - FDisableCaching := true; - FExtraParams := TExtObject.CreateInternal(Self, 'extraParams'); - FTimeout := 30000; +procedure TExtFormFieldBase.SetFBeforeBodyElList(Value : TExtObjectList); begin + FBeforeBodyElList := Value; + Value.DeleteFromGarbage; + JSCode('beforeBodyEl:' + VarToJSON([Value, false])); end; -{$IFDEF FPC}constructor TExtAjaxSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -destructor TExtAjaxSingleton.Destroy; begin - try - FDefaultHeaders.Free; - FExtraParams.Free; - except end; - inherited; +procedure TExtFormFieldBase.SetFBeforeBodyElTemplate(Value : TExtXTemplate); begin + FBeforeBodyElTemplate := Value; + Value.DeleteFromGarbage; + JSCode('beforeBodyEl:' + VarToJSON([Value, false])); end; -procedure TExtDomHelperSingleton.SetFUseDom(Value : Boolean); begin - FUseDom := Value; - JSCode(JSName + '.useDom=' + VarToJSON([Value]) + ';'); +procedure TExtFormFieldBase.SetFBeforeLabelTextTpl(Value : String); begin + FBeforeLabelTextTpl := Value; + JSCode('beforeLabelTextTpl:' + VarToJSON([Value])); end; -function TExtDomHelperSingleton.JSClassName : string; begin - Result := 'Ext.dom.Helper'; +procedure TExtFormFieldBase.SetFBeforeLabelTextTplList(Value : TExtObjectList); begin + FBeforeLabelTextTplList := Value; + Value.DeleteFromGarbage; + JSCode('beforeLabelTextTpl:' + VarToJSON([Value, false])); end; -{$IFDEF FPC}constructor TExtDomHelperSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDomHelperSingleton.CreateDom(O : String) : TExtFunction; begin - JSCode(JSName + '.createDom(' + VarToJSON([O]) + ');', 'TExtDomHelperSingleton'); - Result := Self; +procedure TExtFormFieldBase.SetFBeforeLabelTextTplTemplate(Value : TExtXTemplate); begin + FBeforeLabelTextTplTemplate := Value; + Value.DeleteFromGarbage; + JSCode('beforeLabelTextTpl:' + VarToJSON([Value, false])); end; -function TExtDomHelperSingleton.CreateHtml : TExtFunction; begin - JSCode(JSName + '.createHtml();', 'TExtDomHelperSingleton'); - Result := Self; +procedure TExtFormFieldBase.SetFBeforeLabelTpl(Value : String); begin + FBeforeLabelTpl := Value; + JSCode('beforeLabelTpl:' + VarToJSON([Value])); end; -function TExtDomHelperSingleton.CreateTemplate(O : TExtObject) : TExtFunction; begin - JSCode(JSName + '.createTemplate(' + VarToJSON([O, false]) + ');', 'TExtDomHelperSingleton'); - Result := Self; +procedure TExtFormFieldBase.SetFBeforeLabelTplList(Value : TExtObjectList); begin + FBeforeLabelTplList := Value; + Value.DeleteFromGarbage; + JSCode('beforeLabelTpl:' + VarToJSON([Value, false])); end; -function TExtDomHelperSingleton.Overwrite(El : String; O : String; ReturnElement : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.overwrite(' + VarToJSON([El, O, ReturnElement]) + ');', 'TExtDomHelperSingleton'); - Result := Self; +procedure TExtFormFieldBase.SetFBeforeLabelTplTemplate(Value : TExtXTemplate); begin + FBeforeLabelTplTemplate := Value; + Value.DeleteFromGarbage; + JSCode('beforeLabelTpl:' + VarToJSON([Value, false])); end; -procedure TExtDdDD.SetFScroll(Value : Boolean); begin - FScroll := Value; - JSCode(JSName + '.scroll=' + VarToJSON([Value]) + ';'); +procedure TExtFormFieldBase.SetFBeforeSubTpl(Value : String); begin + FBeforeSubTpl := Value; + JSCode('beforeSubTpl:' + VarToJSON([Value])); end; -function TExtDdDD.JSClassName : string; begin - Result := 'Ext.dd.DD'; +procedure TExtFormFieldBase.SetFBeforeSubTplList(Value : TExtObjectList); begin + FBeforeSubTplList := Value; + Value.DeleteFromGarbage; + JSCode('beforeSubTpl:' + VarToJSON([Value, false])); end; -{$IFDEF FPC}constructor TExtDdDD.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDdDD.AlignElWithMouse(El : THTMLElement; IPageX : Integer; IPageY : Integer) : TExtFunction; begin - JSCode(JSName + '.alignElWithMouse(' + VarToJSON([El, false, IPageX, IPageY]) + ');', 'TExtDdDD'); - Result := Self; +procedure TExtFormFieldBase.SetFBeforeSubTplTemplate(Value : TExtXTemplate); begin + FBeforeSubTplTemplate := Value; + Value.DeleteFromGarbage; + JSCode('beforeSubTpl:' + VarToJSON([Value, false])); end; -function TExtDdDD.ApplyConfig : TExtFunction; begin - JSCode(JSName + '.applyConfig();', 'TExtDdDD'); - Result := Self; +procedure TExtFormFieldBase.SetFBodyEl(Value : TExtElement); begin + FBodyEl := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.bodyEl=' + VarToJSON([Value, false]) + ';'); end; -function TExtDdDD.AutoOffset(IPageX : Integer; IPageY : Integer) : TExtFunction; begin - JSCode(JSName + '.autoOffset(' + VarToJSON([IPageX, IPageY]) + ');', 'TExtDdDD'); - Result := Self; +procedure TExtFormFieldBase.SetFCheckChangeBuffer(Value : Integer); begin + FCheckChangeBuffer := Value; + JSCode('checkChangeBuffer:' + VarToJSON([Value])); end; -function TExtDdDD.B4Drag : TExtFunction; begin - JSCode(JSName + '.b4Drag();', 'TExtDdDD'); - Result := Self; +procedure TExtFormFieldBase.SetFCheckChangeEvents(Value : TExtObjectList); begin + FCheckChangeEvents := Value; + Value.DeleteFromGarbage; + JSCode('checkChangeEvents:' + VarToJSON([Value, false])); end; -function TExtDdDD.B4MouseDown : TExtFunction; begin - JSCode(JSName + '.b4MouseDown();', 'TExtDdDD'); - Result := Self; +procedure TExtFormFieldBase.SetFClearCls(Value : String); begin + FClearCls := Value; + JSCode('clearCls:' + VarToJSON([Value])); end; -function TExtDdDD.CachePosition(IPageX : Integer = 0; IPageY : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.cachePosition(' + VarToJSON([IPageX, IPageY]) + ');', 'TExtDdDD'); - Result := Self; +procedure TExtFormFieldBase.SetFDirtyCls(Value : String); begin + FDirtyCls := Value; + JSCode('dirtyCls:' + VarToJSON([Value])); end; -function TExtDdDD.SetDelta(IDeltaX : Integer; IDeltaY : Integer) : TExtFunction; begin - JSCode(JSName + '.setDelta(' + VarToJSON([IDeltaX, IDeltaY]) + ');', 'TExtDdDD'); - Result := Self; +procedure TExtFormFieldBase.SetFDisabled(Value : Boolean); begin + FDisabled := Value; + JSCode('disabled:' + VarToJSON([Value])); end; -function TExtDdDD.SetDragElPos(IPageX : Integer; IPageY : Integer) : TExtFunction; begin - JSCode(JSName + '.setDragElPos(' + VarToJSON([IPageX, IPageY]) + ');', 'TExtDdDD'); - Result := Self; +procedure TExtFormFieldBase.SetFErrorEl(Value : TExtElement); begin + FErrorEl := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.errorEl=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtDrawComponent.SetFAutoSize(Value : Boolean); begin - FAutoSize := Value; - JSCode('autoSize:' + VarToJSON([Value])); +procedure TExtFormFieldBase.SetFErrorMsgCls(Value : String); begin + FErrorMsgCls := Value; + JSCode('errorMsgCls:' + VarToJSON([Value])); end; -procedure TExtDrawComponent.SetFEnginePriority(Value : TExtObjectList); begin - FEnginePriority := Value; - Value.DeleteFromGarbage; - JSCode('enginePriority:' + VarToJSON([Value, false])); +procedure TExtFormFieldBase.SetFFieldBodyCls(Value : String); begin + FFieldBodyCls := Value; + JSCode('fieldBodyCls:' + VarToJSON([Value])); end; -procedure TExtDrawComponent.SetFGradients(Value : TExtObjectList); begin - FGradients := Value; - Value.DeleteFromGarbage; - JSCode('gradients:' + VarToJSON([Value, false])); +procedure TExtFormFieldBase.SetFFieldCls(Value : String); begin + FFieldCls := Value; + JSCode('fieldCls:' + VarToJSON([Value])); end; -procedure TExtDrawComponent.SetFItems(Value : TExtObjectList); begin - FItems := Value; - Value.DeleteFromGarbage; - JSCode('items:' + VarToJSON([Value, false])); +procedure TExtFormFieldBase.SetFFieldLabel(Value : String); begin + FFieldLabel := Value; + if not ConfigAvailable(JSName) then + SetFieldLabel(Value) + else + JSCode('fieldLabel:' + VarToJSON([Value])); end; -procedure TExtDrawComponent.SetFSurface(Value : TExtDrawSurface); begin - FSurface := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.surface=' + VarToJSON([Value, false]) + ';'); +procedure TExtFormFieldBase.SetFFieldStyle(Value : String); begin + FFieldStyle := Value; + if not ConfigAvailable(JSName) then + SetFieldStyle(Value) + else + JSCode('fieldStyle:' + VarToJSON([Value])); end; -procedure TExtDrawComponent.SetFViewBox(Value : Boolean); begin - FViewBox := Value; - JSCode('viewBox:' + VarToJSON([Value])); +procedure TExtFormFieldBase.SetFFocusCls(Value : String); begin + FFocusCls := Value; + JSCode('focusCls:' + VarToJSON([Value])); end; -function TExtDrawComponent.JSClassName : string; begin - Result := 'Ext.draw.Component'; +procedure TExtFormFieldBase.SetFFormItemCls(Value : String); begin + FFormItemCls := Value; + JSCode('formItemCls:' + VarToJSON([Value])); end; -procedure TExtDrawComponent.InitDefaults; begin - inherited; - FEnginePriority := TExtObjectList.Create(Self, 'enginePriority'); - FGradients := TExtObjectList.Create(Self, 'gradients'); - FItems := TExtObjectList.Create(Self, 'items'); - FSurface := TExtDrawSurface.CreateInternal(Self, 'surface'); +procedure TExtFormFieldBase.SetFHideEmptyLabel(Value : Boolean); begin + FHideEmptyLabel := Value; + JSCode('hideEmptyLabel:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtDrawComponent.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtFormFieldBase.SetFHideLabel(Value : Boolean); begin + FHideLabel := Value; + JSCode('hideLabel:' + VarToJSON([Value])); +end; -constructor TExtDrawComponent.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtFormFieldBase.SetFInputAttrTpl(Value : String); begin + FInputAttrTpl := Value; + JSCode('inputAttrTpl:' + VarToJSON([Value])); end; -destructor TExtDrawComponent.Destroy; begin - try - FEnginePriority.Free; - FGradients.Free; - FItems.Free; - FSurface.Free; - except end; - inherited; +procedure TExtFormFieldBase.SetFInputAttrTplList(Value : TExtObjectList); begin + FInputAttrTplList := Value; + Value.DeleteFromGarbage; + JSCode('inputAttrTpl:' + VarToJSON([Value, false])); end; -function TExtAppDomainStoreSingleton.JSClassName : string; begin - Result := 'Ext.app.domain.Store'; +procedure TExtFormFieldBase.SetFInputAttrTplTemplate(Value : TExtXTemplate); begin + FInputAttrTplTemplate := Value; + Value.DeleteFromGarbage; + JSCode('inputAttrTpl:' + VarToJSON([Value, false])); end; -{$IFDEF FPC}constructor TExtAppDomainStoreSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtFormFieldBase.SetFInputEl(Value : TExtElement); begin + FInputEl := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.inputEl=' + VarToJSON([Value, false]) + ';'); +end; -function TExtPluginManagerSingleton.JSClassName : string; begin - Result := 'Ext.PluginManager'; +procedure TExtFormFieldBase.SetFInputId(Value : String); begin + FInputId := Value; + JSCode('inputId:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtPluginManagerSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtFormFieldBase.SetFInputType(Value : String); begin + FInputType := Value; + JSCode('inputType:' + VarToJSON([Value])); +end; -constructor TExtPluginManagerSingleton.Create(Config : TExtObject; DefaultType : TExtFunction = nil); begin - CreateVarAlt(JSClassName + '.create(' + VarToJSON([Config, false, DefaultType, true]) + ');'); - InitDefaults; +procedure TExtFormFieldBase.SetFInvalidCls(Value : String); begin + FInvalidCls := Value; + JSCode('invalidCls:' + VarToJSON([Value])); end; -function TExtPluginManagerSingleton.FindByType(TypeJS : String; DefaultsOnly : Boolean) : TExtFunction; begin - JSCode(JSName + '.findByType(' + VarToJSON([TypeJS, DefaultsOnly]) + ');', 'TExtPluginManagerSingleton'); - Result := Self; +procedure TExtFormFieldBase.SetFInvalidText(Value : String); begin + FInvalidText := Value; + JSCode('invalidText:' + VarToJSON([Value])); end; -procedure TExtToolbarFill.SetFIsFill(Value : Boolean); begin - FIsFill := Value; - JSCode(JSName + '.isFill=' + VarToJSON([Value]) + ';'); +procedure TExtFormFieldBase.SetFIsFieldLabelable(Value : Boolean); begin + FIsFieldLabelable := Value; + JSCode(JSName + '.isFieldLabelable=' + VarToJSON([Value]) + ';'); end; -function TExtToolbarFill.JSClassName : string; begin - Result := 'Ext.toolbar.Fill'; +procedure TExtFormFieldBase.SetFIsFormField(Value : Boolean); begin + FIsFormField := Value; + JSCode(JSName + '.isFormField=' + VarToJSON([Value]) + ';'); end; -{$IFDEF FPC}constructor TExtToolbarFill.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtFormFieldBase.SetFLabelAlign(Value : String); begin + FLabelAlign := Value; + JSCode('labelAlign:' + VarToJSON([Value])); +end; -procedure TExtTreePluginTreeViewDragDrop.SetFAllowContainerDrops(Value : Boolean); begin - FAllowContainerDrops := Value; - JSCode('allowContainerDrops:' + VarToJSON([Value])); +procedure TExtFormFieldBase.SetFLabelAttrTpl(Value : String); begin + FLabelAttrTpl := Value; + JSCode('labelAttrTpl:' + VarToJSON([Value])); end; -procedure TExtTreePluginTreeViewDragDrop.SetFAllowParentInserts(Value : Boolean); begin - FAllowParentInserts := Value; - JSCode('allowParentInserts:' + VarToJSON([Value])); +procedure TExtFormFieldBase.SetFLabelAttrTplList(Value : TExtObjectList); begin + FLabelAttrTplList := Value; + Value.DeleteFromGarbage; + JSCode('labelAttrTpl:' + VarToJSON([Value, false])); end; -procedure TExtTreePluginTreeViewDragDrop.SetFAppendOnly(Value : Boolean); begin - FAppendOnly := Value; - JSCode('appendOnly:' + VarToJSON([Value])); +procedure TExtFormFieldBase.SetFLabelAttrTplTemplate(Value : TExtXTemplate); begin + FLabelAttrTplTemplate := Value; + Value.DeleteFromGarbage; + JSCode('labelAttrTpl:' + VarToJSON([Value, false])); end; -procedure TExtTreePluginTreeViewDragDrop.SetFContainerScroll(Value : TExtObject); begin - FContainerScroll := Value; +procedure TExtFormFieldBase.SetFLabelCell(Value : TExtElement); begin + FLabelCell := Value; Value.DeleteFromGarbage; - JSCode('containerScroll:' + VarToJSON([Value, false])); + JSCode(JSName + '.labelCell=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtTreePluginTreeViewDragDrop.SetFContainerScrollBoolean(Value : Boolean); begin - FContainerScrollBoolean := Value; - JSCode('containerScroll:' + VarToJSON([Value])); +procedure TExtFormFieldBase.SetFLabelCls(Value : String); begin + FLabelCls := Value; + JSCode('labelCls:' + VarToJSON([Value])); end; -procedure TExtTreePluginTreeViewDragDrop.SetFDdGroup(Value : String); begin - FDdGroup := Value; - JSCode('ddGroup:' + VarToJSON([Value])); +procedure TExtFormFieldBase.SetFLabelClsExtra(Value : String); begin + FLabelClsExtra := Value; + JSCode('labelClsExtra:' + VarToJSON([Value])); end; -procedure TExtTreePluginTreeViewDragDrop.SetFDisplayField(Value : String); begin - FDisplayField := Value; - JSCode('displayField:' + VarToJSON([Value])); +procedure TExtFormFieldBase.SetFLabelEl(Value : TExtElement); begin + FLabelEl := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.labelEl=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtTreePluginTreeViewDragDrop.SetFDropGroup(Value : String); begin - FDropGroup := Value; - JSCode('dropGroup:' + VarToJSON([Value])); +procedure TExtFormFieldBase.SetFLabelPad(Value : Integer); begin + FLabelPad := Value; + JSCode('labelPad:' + VarToJSON([Value])); end; -procedure TExtTreePluginTreeViewDragDrop.SetFEnableDrag(Value : Boolean); begin - FEnableDrag := Value; - JSCode('enableDrag:' + VarToJSON([Value])); +procedure TExtFormFieldBase.SetFLabelSeparator(Value : String); begin + FLabelSeparator := Value; + JSCode('labelSeparator:' + VarToJSON([Value])); end; -procedure TExtTreePluginTreeViewDragDrop.SetFEnableDrop(Value : Boolean); begin - FEnableDrop := Value; - JSCode('enableDrop:' + VarToJSON([Value])); +procedure TExtFormFieldBase.SetFLabelStyle(Value : String); begin + FLabelStyle := Value; + JSCode('labelStyle:' + VarToJSON([Value])); +end; + +procedure TExtFormFieldBase.SetFLabelWidth(Value : Integer); begin + FLabelWidth := Value; + JSCode('labelWidth:' + VarToJSON([Value])); end; -procedure TExtTreePluginTreeViewDragDrop.SetFExpandDelay(Value : String); begin - FExpandDelay := Value; - JSCode('expandDelay:' + VarToJSON([Value])); +procedure TExtFormFieldBase.SetFMsgTarget(Value : String); begin + FMsgTarget := Value; + JSCode('msgTarget:' + VarToJSON([Value])); end; -procedure TExtTreePluginTreeViewDragDrop.SetFNodeHighlightColor(Value : String); begin - FNodeHighlightColor := Value; - JSCode('nodeHighlightColor:' + VarToJSON([Value])); +procedure TExtFormFieldBase.SetFName(Value : String); begin + FName := Value; + JSCode('name:' + VarToJSON([Value])); end; -procedure TExtTreePluginTreeViewDragDrop.SetFNodeHighlightOnDrop(Value : Boolean); begin - FNodeHighlightOnDrop := Value; - JSCode('nodeHighlightOnDrop:' + VarToJSON([Value])); +procedure TExtFormFieldBase.SetFOriginalValue(Value : TExtObject); begin + FOriginalValue := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.originalValue=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtTreePluginTreeViewDragDrop.SetFNodeHighlightOnRepair(Value : Boolean); begin - FNodeHighlightOnRepair := Value; - JSCode('nodeHighlightOnRepair:' + VarToJSON([Value])); +procedure TExtFormFieldBase.SetFPreventMark(Value : Boolean); begin + FPreventMark := Value; + JSCode('preventMark:' + VarToJSON([Value])); end; -procedure TExtTreePluginTreeViewDragDrop.SetFSortOnDrop(Value : Boolean); begin - FSortOnDrop := Value; - JSCode('sortOnDrop:' + VarToJSON([Value])); +procedure TExtFormFieldBase.SetFReadOnly(Value : Boolean); begin + FReadOnly := Value; + if not ConfigAvailable(JSName) then + SetReadOnly(Value) + else + JSCode('readOnly:' + VarToJSON([Value])); end; -function TExtTreePluginTreeViewDragDrop.JSClassName : string; begin - Result := 'Ext.tree.plugin.TreeViewDragDrop'; +procedure TExtFormFieldBase.SetFReadOnlyCls(Value : String); begin + FReadOnlyCls := Value; + JSCode('readOnlyCls:' + VarToJSON([Value])); end; -procedure TExtTreePluginTreeViewDragDrop.InitDefaults; begin - inherited; - FContainerScroll := TExtObject.CreateInternal(Self, 'containerScroll'); +procedure TExtFormFieldBase.SetFSubmitValue(Value : Boolean); begin + FSubmitValue := Value; + JSCode('submitValue:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtTreePluginTreeViewDragDrop.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtTreePluginTreeViewDragDrop.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtFormFieldBase.SetFTabIndex(Value : Integer); begin + FTabIndex := Value; + JSCode('tabIndex:' + VarToJSON([Value])); end; -destructor TExtTreePluginTreeViewDragDrop.Destroy; begin - try - FContainerScroll.Free; - except end; - inherited; +procedure TExtFormFieldBase.SetFValidateOnBlur(Value : Boolean); begin + FValidateOnBlur := Value; + JSCode('validateOnBlur:' + VarToJSON([Value])); end; -procedure TExtProgressBar.SetFAnimate(Value : Boolean); begin - FAnimate := Value; - JSCode('animate:' + VarToJSON([Value])); +procedure TExtFormFieldBase.SetFValidateOnChange(Value : Boolean); begin + FValidateOnChange := Value; + JSCode('validateOnChange:' + VarToJSON([Value])); end; -procedure TExtProgressBar.SetFAnimateObject(Value : TExtObject); begin - FAnimateObject := Value; +procedure TExtFormFieldBase.SetFValue(Value : TExtObject); begin + FValue := Value; Value.DeleteFromGarbage; - JSCode('animate:' + VarToJSON([Value, false])); + if not ConfigAvailable(JSName) then + SetValue(Value) + else + JSCode('value:' + VarToJSON([Value, false])); end; -procedure TExtProgressBar.SetFBaseCls(Value : String); begin - FBaseCls := Value; - JSCode('baseCls:' + VarToJSON([Value])); +procedure TExtFormFieldBase.SetFOnErrorchange(Value : TExtFormFieldBaseOnErrorchange); begin + if Assigned(FOnErrorchange) then + JSCode(JSName+'.events ["errorchange"].listeners=[];'); + if Assigned(Value) then + AddListener('errorchange', Ajax('errorchange', ['This', '%0.nm','Error', '%1'], true)); + FOnErrorchange := Value; end; -procedure TExtProgressBar.SetFId(Value : String); begin - FId := Value; - JSCode('id:' + VarToJSON([Value])); +function TExtFormFieldBase.JSClassName : string; begin + Result := 'Ext.form.field.Base'; end; -procedure TExtProgressBar.SetFText(Value : String); begin - FText := Value; - JSCode('text:' + VarToJSON([Value])); +procedure TExtFormFieldBase.InitDefaults; begin + inherited; + FActiveErrorsTplList := TExtObjectList.Create(Self, 'activeErrorsTpl'); + FActiveErrorsTplTemplate := TExtXTemplate.CreateInternal(Self, 'activeErrorsTpl'); + FAfterBodyElList := TExtObjectList.Create(Self, 'afterBodyEl'); + FAfterBodyElTemplate := TExtXTemplate.CreateInternal(Self, 'afterBodyEl'); + FAfterLabelTextTplList := TExtObjectList.Create(Self, 'afterLabelTextTpl'); + FAfterLabelTextTplTemplate := TExtXTemplate.CreateInternal(Self, 'afterLabelTextTpl'); + FAfterLabelTplList := TExtObjectList.Create(Self, 'afterLabelTpl'); + FAfterLabelTplTemplate := TExtXTemplate.CreateInternal(Self, 'afterLabelTpl'); + FAfterSubTplList := TExtObjectList.Create(Self, 'afterSubTpl'); + FAfterSubTplTemplate := TExtXTemplate.CreateInternal(Self, 'afterSubTpl'); + FBeforeBodyElList := TExtObjectList.Create(Self, 'beforeBodyEl'); + FBeforeBodyElTemplate := TExtXTemplate.CreateInternal(Self, 'beforeBodyEl'); + FBeforeLabelTextTplList := TExtObjectList.Create(Self, 'beforeLabelTextTpl'); + FBeforeLabelTextTplTemplate := TExtXTemplate.CreateInternal(Self, 'beforeLabelTextTpl'); + FBeforeLabelTplList := TExtObjectList.Create(Self, 'beforeLabelTpl'); + FBeforeLabelTplTemplate := TExtXTemplate.CreateInternal(Self, 'beforeLabelTpl'); + FBeforeSubTplList := TExtObjectList.Create(Self, 'beforeSubTpl'); + FBeforeSubTplTemplate := TExtXTemplate.CreateInternal(Self, 'beforeSubTpl'); + FBodyEl := TExtElement.CreateInternal(Self, 'bodyEl'); + FCheckChangeBuffer := 50; + FCheckChangeEvents := TExtObjectList.Create(Self, 'checkChangeEvents'); + FErrorEl := TExtElement.CreateInternal(Self, 'errorEl'); + FInputAttrTplList := TExtObjectList.Create(Self, 'inputAttrTpl'); + FInputAttrTplTemplate := TExtXTemplate.CreateInternal(Self, 'inputAttrTpl'); + FInputEl := TExtElement.CreateInternal(Self, 'inputEl'); + FLabelAttrTplList := TExtObjectList.Create(Self, 'labelAttrTpl'); + FLabelAttrTplTemplate := TExtXTemplate.CreateInternal(Self, 'labelAttrTpl'); + FLabelCell := TExtElement.CreateInternal(Self, 'labelCell'); + FLabelEl := TExtElement.CreateInternal(Self, 'labelEl'); + FOriginalValue := TExtObject.CreateInternal(Self, 'originalValue'); + FValue := TExtObject.CreateInternal(Self, 'value'); end; -procedure TExtProgressBar.SetFTextEl(Value : String); begin - FTextEl := Value; - JSCode('textEl:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtFormFieldBase.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtProgressBar.SetFTextElElement(Value : TExtElement); begin - FTextElElement := Value; - Value.DeleteFromGarbage; - JSCode('textEl:' + VarToJSON([Value, false])); +function TExtFormFieldBase.BatchChanges(Fn : TExtObject) : TExtFunction; begin + JSCode(JSName + '.batchChanges(' + VarToJSON([Fn, false]) + ');', 'TExtFormFieldBase'); + Result := Self; end; -procedure TExtProgressBar.SetFTextElTHTMLElement(Value : THTMLElement); begin - FTextElTHTMLElement := Value; - Value.DeleteFromGarbage; - JSCode('textEl:' + VarToJSON([Value, false])); +function TExtFormFieldBase.CheckChange : TExtFunction; begin + JSCode(JSName + '.checkChange();', 'TExtFormFieldBase'); + Result := Self; end; -procedure TExtProgressBar.SetFValue(Value : Integer); begin - FValue := Value; - JSCode('value:' + VarToJSON([Value])); +function TExtFormFieldBase.CheckDirty : TExtFunction; begin + JSCode(JSName + '.checkDirty();', 'TExtFormFieldBase'); + Result := Self; end; -procedure TExtProgressBar.SetFOnUpdate(Value : TExtProgressBarOnUpdate); begin - if Assigned(FOnUpdate) then - JSCode(JSName+'.events ["update"].listeners=[];'); - if Assigned(Value) then - AddListener('update', Ajax('update', ['This', '%0.nm','Value', '%1','Text', '%2'], true)); - FOnUpdate := Value; +function TExtFormFieldBase.ClearInvalid : TExtFunction; begin + JSCode(JSName + '.clearInvalid();', 'TExtFormFieldBase'); + Result := Self; end; -function TExtProgressBar.JSClassName : string; begin - Result := 'Ext.ProgressBar'; +constructor TExtFormFieldBase.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtProgressBar.InitDefaults; begin - inherited; - FAnimateObject := TExtObject.CreateInternal(Self, 'animate'); - FTextElElement := TExtElement.CreateInternal(Self, 'textEl'); +function TExtFormFieldBase.ExtractFileInput : TExtFunction; begin + JSCode(JSName + '.extractFileInput();', 'TExtFormFieldBase'); + Result := Self; end; -{$IFDEF FPC}constructor TExtProgressBar.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtProgressBar.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +function TExtFormFieldBase.GetActiveError : TExtFunction; begin + JSCode(JSName + '.getActiveError();', 'TExtFormFieldBase'); + Result := Self; end; -function TExtProgressBar.IsWaiting : TExtFunction; begin - JSCode(JSName + '.isWaiting();', 'TExtProgressBar'); +function TExtFormFieldBase.GetActiveErrors : TExtFunction; begin + JSCode(JSName + '.getActiveErrors();', 'TExtFormFieldBase'); Result := Self; end; -function TExtProgressBar.Reset(Hide : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.reset(' + VarToJSON([Hide]) + ');', 'TExtProgressBar'); +function TExtFormFieldBase.GetErrors(Value : TExtObject) : TExtFunction; begin + JSCode(JSName + '.getErrors(' + VarToJSON([Value, false]) + ');', 'TExtFormFieldBase'); Result := Self; end; -function TExtProgressBar.UpdateProgress(Value : Integer = 0; Text : String = ''; Animate : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.updateProgress(' + VarToJSON([Value, Text, Animate]) + ');', 'TExtProgressBar'); +function TExtFormFieldBase.GetInputId : TExtFunction; begin + JSCode(JSName + '.getInputId();', 'TExtFormFieldBase'); Result := Self; end; -function TExtProgressBar.UpdateText(Text : String = '') : TExtFunction; begin - JSCode(JSName + '.updateText(' + VarToJSON([Text]) + ');', 'TExtProgressBar'); +function TExtFormFieldBase.GetLabelWidth : TExtFunction; begin + JSCode(JSName + '.getLabelWidth();', 'TExtFormFieldBase'); Result := Self; end; -function TExtProgressBar.Wait(Config : TExtObject = nil; ConfigDuration : Integer = 0; ConfigInterval : Integer = 0; ConfigAnimate : Boolean = false; ConfigIncrement : Integer = 0; ConfigText : String = ''; ConfigFn : TExtFunction = nil; ConfigScope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.wait(' + VarToJSON([Config, false, ConfigDuration, ConfigInterval, ConfigAnimate, ConfigIncrement, ConfigText, ConfigFn, true, ConfigScope, false]) + ');', 'TExtProgressBar'); +function TExtFormFieldBase.GetModelData : TExtFunction; begin + JSCode(JSName + '.getModelData();', 'TExtFormFieldBase'); Result := Self; end; -destructor TExtProgressBar.Destroy; begin - try - FAnimateObject.Free; - FTextElElement.Free; - except end; - inherited; +function TExtFormFieldBase.GetName : TExtFunction; begin + JSCode(JSName + '.getName();', 'TExtFormFieldBase'); + Result := Self; end; -procedure TExtProgressBar.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'update') and Assigned(FOnUpdate) then - FOnUpdate(TExtProgressBar(ParamAsObject('This')), ParamAsInteger('Value'), ParamAsString('Text')); +function TExtFormFieldBase.GetRawValue : TExtFunction; begin + JSCode(JSName + '.getRawValue();', 'TExtFormFieldBase'); + Result := Self; end; -procedure TExtDataProxyServer.SetFApi(Value : TExtObject); begin - FApi := Value; - Value.DeleteFromGarbage; - JSCode('api:' + VarToJSON([Value, false])); +function TExtFormFieldBase.GetSubmitData : TExtFunction; begin + JSCode(JSName + '.getSubmitData();', 'TExtFormFieldBase'); + Result := Self; end; -procedure TExtDataProxyServer.SetFCacheString(Value : String); begin - FCacheString := Value; - JSCode('cacheString:' + VarToJSON([Value])); +function TExtFormFieldBase.GetSubmitValue : TExtFunction; begin + JSCode(JSName + '.getSubmitValue();', 'TExtFormFieldBase'); + Result := Self; end; -procedure TExtDataProxyServer.SetFDirectionParam(Value : String); begin - FDirectionParam := Value; - JSCode('directionParam:' + VarToJSON([Value])); +function TExtFormFieldBase.GetSubTplMarkup : TExtFunction; begin + JSCode(JSName + '.getSubTplMarkup();', 'TExtFormFieldBase'); + Result := Self; end; -procedure TExtDataProxyServer.SetFExtraParams(Value : TExtObject); begin - FExtraParams := Value; - Value.DeleteFromGarbage; - JSCode('extraParams:' + VarToJSON([Value, false])); +function TExtFormFieldBase.GetValue : TExtFunction; begin + JSCode(JSName + '.getValue();', 'TExtFormFieldBase'); + Result := Self; end; -procedure TExtDataProxyServer.SetFFilterParam(Value : String); begin - FFilterParam := Value; - JSCode('filterParam:' + VarToJSON([Value])); +function TExtFormFieldBase.HasActiveError : TExtFunction; begin + JSCode(JSName + '.hasActiveError();', 'TExtFormFieldBase'); + Result := Self; end; -procedure TExtDataProxyServer.SetFGroupDirectionParam(Value : String); begin - FGroupDirectionParam := Value; - JSCode('groupDirectionParam:' + VarToJSON([Value])); +function TExtFormFieldBase.HasVisibleLabel : TExtFunction; begin + JSCode(JSName + '.hasVisibleLabel();', 'TExtFormFieldBase'); + Result := Self; end; -procedure TExtDataProxyServer.SetFGroupParam(Value : String); begin - FGroupParam := Value; - JSCode('groupParam:' + VarToJSON([Value])); +function TExtFormFieldBase.InitLabelable : TExtFunction; begin + JSCode(JSName + '.initLabelable();', 'TExtFormFieldBase'); + Result := Self; end; -procedure TExtDataProxyServer.SetFIdParam(Value : String); begin - FIdParam := Value; - JSCode('idParam:' + VarToJSON([Value])); +function TExtFormFieldBase.IsDirty : TExtFunction; begin + JSCode(JSName + '.isDirty();', 'TExtFormFieldBase'); + Result := Self; end; -procedure TExtDataProxyServer.SetFLimitParam(Value : String); begin - FLimitParam := Value; - JSCode('limitParam:' + VarToJSON([Value])); +function TExtFormFieldBase.IsEqual(Value1 : TExtObject; Value2 : TExtObject) : TExtFunction; begin + JSCode(JSName + '.isEqual(' + VarToJSON([Value1, false, Value2, false]) + ');', 'TExtFormFieldBase'); + Result := Self; end; -procedure TExtDataProxyServer.SetFNoCache(Value : Boolean); begin - FNoCache := Value; - JSCode('noCache:' + VarToJSON([Value])); +function TExtFormFieldBase.IsFileUpload : TExtFunction; begin + JSCode(JSName + '.isFileUpload();', 'TExtFormFieldBase'); + Result := Self; end; -procedure TExtDataProxyServer.SetFPageParam(Value : String); begin - FPageParam := Value; - JSCode('pageParam:' + VarToJSON([Value])); +function TExtFormFieldBase.IsValid : TExtFunction; begin + JSCode(JSName + '.isValid();', 'TExtFormFieldBase'); + Result := Self; end; -procedure TExtDataProxyServer.SetFSimpleGroupMode(Value : Boolean); begin - FSimpleGroupMode := Value; - JSCode('simpleGroupMode:' + VarToJSON([Value])); +function TExtFormFieldBase.MarkInvalid(Errors : String) : TExtFunction; begin + JSCode(JSName + '.markInvalid(' + VarToJSON([Errors]) + ');', 'TExtFormFieldBase'); + Result := Self; end; -procedure TExtDataProxyServer.SetFSimpleSortMode(Value : Boolean); begin - FSimpleSortMode := Value; - JSCode('simpleSortMode:' + VarToJSON([Value])); +function TExtFormFieldBase.Reset : TExtFunction; begin + JSCode(JSName + '.reset();', 'TExtFormFieldBase'); + Result := Self; end; -procedure TExtDataProxyServer.SetFSortParam(Value : String); begin - FSortParam := Value; - JSCode('sortParam:' + VarToJSON([Value])); +function TExtFormFieldBase.ResetOriginalValue : TExtFunction; begin + JSCode(JSName + '.resetOriginalValue();', 'TExtFormFieldBase'); + Result := Self; end; -procedure TExtDataProxyServer.SetFStartParam(Value : String); begin - FStartParam := Value; - JSCode('startParam:' + VarToJSON([Value])); +function TExtFormFieldBase.SetActiveError(Msg : String) : TExtFunction; begin + JSCode(JSName + '.setActiveError(' + VarToJSON([Msg]) + ');', 'TExtFormFieldBase'); + Result := Self; end; -procedure TExtDataProxyServer.SetFTimeout(Value : Integer); begin - FTimeout := Value; - JSCode('timeout:' + VarToJSON([Value])); +function TExtFormFieldBase.SetActiveErrors(Errors : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.setActiveErrors(' + VarToJSON(Errors) + ');', 'TExtFormFieldBase'); + Result := Self; end; -procedure TExtDataProxyServer.SetFUrl(Value : String); begin - FUrl := Value; - JSCode('url:' + VarToJSON([Value])); +function TExtFormFieldBase.SetFieldDefaults(Defaults : TExtObject) : TExtFunction; begin + JSCode(JSName + '.setFieldDefaults(' + VarToJSON([Defaults, false]) + ');', 'TExtFormFieldBase'); + Result := Self; end; -function TExtDataProxyServer.JSClassName : string; begin - Result := 'Ext.data.proxy.Server'; +function TExtFormFieldBase.SetFieldLabel(LabelJS : String) : TExtFunction; begin + JSCode(JSName + '.setFieldLabel(' + VarToJSON([LabelJS]) + ');', 'TExtFormFieldBase'); + Result := Self; end; -procedure TExtDataProxyServer.InitDefaults; begin - inherited; - FApi := TExtObject.CreateInternal(Self, 'api'); - FCacheString := '_dc'; - FExtraParams := TExtObject.CreateInternal(Self, 'extraParams'); - FFilterParam := 'filter'; - FGroupParam := 'group'; - FLimitParam := 'limit'; - FNoCache := true; - FPageParam := 'page'; - FSortParam := 'sort'; - FStartParam := 'start'; - FTimeout := 30000; +function TExtFormFieldBase.SetFieldStyle(Style : String) : TExtFunction; begin + JSCode(JSName + '.setFieldStyle(' + VarToJSON([Style]) + ');', 'TExtFormFieldBase'); + Result := Self; end; -{$IFDEF FPC}constructor TExtDataProxyServer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtFormFieldBase.SetRawValue(Value : TExtObject) : TExtFunction; begin + JSCode(JSName + '.setRawValue(' + VarToJSON([Value, false]) + ');', 'TExtFormFieldBase'); + Result := Self; +end; -function TExtDataProxyServer.BuildRequest(Operation : TExtDataOperation) : TExtFunction; begin - JSCode(JSName + '.buildRequest(' + VarToJSON([Operation, false]) + ');', 'TExtDataProxyServer'); +function TExtFormFieldBase.SetReadOnly(ReadOnly : Boolean) : TExtFunction; begin + JSCode(JSName + '.setReadOnly(' + VarToJSON([ReadOnly]) + ');', 'TExtFormFieldBase'); Result := Self; end; -function TExtDataProxyServer.BuildUrl(Request : TExtDataRequest) : TExtFunction; begin - JSCode(JSName + '.buildUrl(' + VarToJSON([Request, false]) + ');', 'TExtDataProxyServer'); +function TExtFormFieldBase.SetValue(Value : TExtObject) : TExtFunction; begin + JSCode(JSName + '.setValue(' + VarToJSON([Value, false]) + ');', 'TExtFormFieldBase'); Result := Self; end; -constructor TExtDataProxyServer.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +function TExtFormFieldBase.TrimLabelSeparator : TExtFunction; begin + JSCode(JSName + '.trimLabelSeparator();', 'TExtFormFieldBase'); + Result := Self; end; -function TExtDataProxyServer.DoRequest(Operation : TExtDataOperation; Callback : TExtFunction; Scope : TExtObject) : TExtFunction; begin - JSCode(JSName + '.doRequest(' + VarToJSON([Operation, false, Callback, true, Scope, false]) + ');', 'TExtDataProxyServer'); +function TExtFormFieldBase.UnsetActiveError : TExtFunction; begin + JSCode(JSName + '.unsetActiveError();', 'TExtFormFieldBase'); Result := Self; end; -function TExtDataProxyServer.EncodeFilters(Filters : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.encodeFilters(' + VarToJSON(Filters) + ');', 'TExtDataProxyServer'); +function TExtFormFieldBase.Validate : TExtFunction; begin + JSCode(JSName + '.validate();', 'TExtFormFieldBase'); Result := Self; end; -function TExtDataProxyServer.EncodeSorters(Sorters : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.encodeSorters(' + VarToJSON(Sorters) + ');', 'TExtDataProxyServer'); +function TExtFormFieldBase.ValidateValue(Value : TExtObject) : TExtFunction; begin + JSCode(JSName + '.validateValue(' + VarToJSON([Value, false]) + ');', 'TExtFormFieldBase'); Result := Self; end; -function TExtDataProxyServer.SetExtraParam(Name : String; Value : TExtObject) : TExtFunction; begin - JSCode(JSName + '.setExtraParam(' + VarToJSON([Name, Value, false]) + ');', 'TExtDataProxyServer'); +function TExtFormFieldBase.ValueToRaw(Value : TExtObject) : TExtFunction; begin + JSCode(JSName + '.valueToRaw(' + VarToJSON([Value, false]) + ');', 'TExtFormFieldBase'); Result := Self; end; -destructor TExtDataProxyServer.Destroy; begin +destructor TExtFormFieldBase.Destroy; begin try - FApi.Free; - FExtraParams.Free; + FActiveErrorsTplList.Free; + FActiveErrorsTplTemplate.Free; + FAfterBodyElList.Free; + FAfterBodyElTemplate.Free; + FAfterLabelTextTplList.Free; + FAfterLabelTextTplTemplate.Free; + FAfterLabelTplList.Free; + FAfterLabelTplTemplate.Free; + FAfterSubTplList.Free; + FAfterSubTplTemplate.Free; + FBeforeBodyElList.Free; + FBeforeBodyElTemplate.Free; + FBeforeLabelTextTplList.Free; + FBeforeLabelTextTplTemplate.Free; + FBeforeLabelTplList.Free; + FBeforeLabelTplTemplate.Free; + FBeforeSubTplList.Free; + FBeforeSubTplTemplate.Free; + FBodyEl.Free; + FCheckChangeEvents.Free; + FErrorEl.Free; + FInputAttrTplList.Free; + FInputAttrTplTemplate.Free; + FInputEl.Free; + FLabelAttrTplList.Free; + FLabelAttrTplTemplate.Free; + FLabelCell.Free; + FLabelEl.Free; + FOriginalValue.Free; + FValue.Free; except end; inherited; end; -function TExtDataReader.JSClassName : string; begin - Result := 'Ext.data.reader.Reader'; +procedure TExtFormFieldBase.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'errorchange') and Assigned(FOnErrorchange) then + FOnErrorchange(TExtFormLabelable(ParamAsObject('This')), ParamAsString('Error')); end; -{$IFDEF FPC}constructor TExtDataReader.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtAppDomainStoreSingleton.JSClassName : string; begin + Result := 'Ext.app.domain.Store'; +end; -procedure TExtPickerDate.SetFAriaTitle(Value : String); begin - FAriaTitle := Value; - JSCode('ariaTitle:' + VarToJSON([Value])); +{$IFDEF FPC}constructor TExtAppDomainStoreSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtFxTargetComponent.JSClassName : string; begin + Result := 'Ext.fx.target.Component'; end; -procedure TExtPickerDate.SetFAriaTitleDateFormat(Value : String); begin - FAriaTitleDateFormat := Value; - JSCode('ariaTitleDateFormat:' + VarToJSON([Value])); +{$IFDEF FPC}constructor TExtFxTargetComponent.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +procedure TExtLayoutContainerTable.SetFColumns(Value : Integer); begin + FColumns := Value; + JSCode('columns:' + VarToJSON([Value])); end; -procedure TExtPickerDate.SetFBaseCls(Value : String); begin - FBaseCls := Value; - JSCode('baseCls:' + VarToJSON([Value])); +procedure TExtLayoutContainerTable.SetFTableAttrs(Value : TExtObject); begin + FTableAttrs := Value; + Value.DeleteFromGarbage; + JSCode('tableAttrs:' + VarToJSON([Value, false])); end; -procedure TExtPickerDate.SetFDayNames(Value : TExtObjectList); begin - FDayNames := Value; +procedure TExtLayoutContainerTable.SetFTdAttrs(Value : TExtObject); begin + FTdAttrs := Value; Value.DeleteFromGarbage; - JSCode('dayNames:' + VarToJSON([Value, false])); + JSCode('tdAttrs:' + VarToJSON([Value, false])); end; -procedure TExtPickerDate.SetFDisableAnim(Value : Boolean); begin - FDisableAnim := Value; - JSCode('disableAnim:' + VarToJSON([Value])); +procedure TExtLayoutContainerTable.SetFTrAttrs(Value : TExtObject); begin + FTrAttrs := Value; + Value.DeleteFromGarbage; + JSCode('trAttrs:' + VarToJSON([Value, false])); end; -procedure TExtPickerDate.SetFDisabledCellCls(Value : String); begin - FDisabledCellCls := Value; - JSCode('disabledCellCls:' + VarToJSON([Value])); +function TExtLayoutContainerTable.JSClassName : string; begin + Result := 'Ext.layout.container.Table'; end; -procedure TExtPickerDate.SetFDisabledDates(Value : TExtObjectList); begin - FDisabledDates := Value; - Value.DeleteFromGarbage; - if not ConfigAvailable(JSName) then - SetDisabledDates(Value) - else - JSCode('disabledDates:' + VarToJSON([Value, false])); +procedure TExtLayoutContainerTable.InitDefaults; begin + inherited; + FTableAttrs := TExtObject.CreateInternal(Self, 'tableAttrs'); + FTdAttrs := TExtObject.CreateInternal(Self, 'tdAttrs'); + FTrAttrs := TExtObject.CreateInternal(Self, 'trAttrs'); end; -procedure TExtPickerDate.SetFDisabledDatesRE(Value : TRegExp); begin - FDisabledDatesRE := Value; - JSCode('disabledDatesRE:' + VarToJSON([#3 +Value])); +{$IFDEF FPC}constructor TExtLayoutContainerTable.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtLayoutContainerTable.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtPickerDate.SetFDisabledDatesText(Value : String); begin - FDisabledDatesText := Value; - JSCode('disabledDatesText:' + VarToJSON([Value])); +destructor TExtLayoutContainerTable.Destroy; begin + try + FTableAttrs.Free; + FTdAttrs.Free; + FTrAttrs.Free; + except end; + inherited; end; -procedure TExtPickerDate.SetFDisabledDays(Value : TArrayOfInteger); begin - FDisabledDays := Value; - if not ConfigAvailable(JSName) then - SetDisabledDays(Value) - else - JSCode('disabledDays:' + ArrayToJSON(Value)); +procedure TExtLayoutContainerCheckboxGroup.SetFAutoFlex(Value : Boolean); begin + FAutoFlex := Value; + JSCode('autoFlex:' + VarToJSON([Value])); end; -procedure TExtPickerDate.SetFDisabledDaysText(Value : String); begin - FDisabledDaysText := Value; - JSCode('disabledDaysText:' + VarToJSON([Value])); +function TExtLayoutContainerCheckboxGroup.JSClassName : string; begin + Result := 'Ext.layout.container.CheckboxGroup'; +end; + +{$IFDEF FPC}constructor TExtLayoutContainerCheckboxGroup.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtChartTipSurface.JSClassName : string; begin + Result := 'Ext.chart.TipSurface'; +end; + +{$IFDEF FPC}constructor TExtChartTipSurface.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtLayoutContainerEditor.JSClassName : string; begin + Result := 'Ext.layout.container.Editor'; +end; + +{$IFDEF FPC}constructor TExtLayoutContainerEditor.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtLayoutContainerForm.JSClassName : string; begin + Result := 'Ext.layout.container.Form'; end; -procedure TExtPickerDate.SetFFocusOnShow(Value : Boolean); begin - FFocusOnShow := Value; - JSCode('focusOnShow:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtLayoutContainerForm.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtPickerDate.SetFFormat(Value : String); begin - FFormat := Value; - JSCode('format:' + VarToJSON([Value])); +function TExtLayoutContainerForm.CalculateOverflow(OwnerContext : TExtLayoutContextItem; ContainerSize : TExtObject; Dimensions : Integer) : TExtFunction; begin + JSCode(JSName + '.calculateOverflow(' + VarToJSON([OwnerContext, false, ContainerSize, false, Dimensions]) + ');', 'TExtLayoutContainerForm'); + Result := Self; end; -procedure TExtPickerDate.SetFHandler(Value : TExtFunction); begin - FHandler := Value; - JSCode('handler:' + VarToJSON([Value, true])); +function TExtLayoutContainerForm.DoRenderPadder : TExtFunction; begin + JSCode(JSName + '.doRenderPadder();', 'TExtLayoutContainerForm'); + Result := Self; end; -procedure TExtPickerDate.SetFKeyNavConfig(Value : TExtObject); begin - FKeyNavConfig := Value; +procedure TExtLayoutContainerFit.SetFDefaultMargins(Value : TExtObject); begin + FDefaultMargins := Value; Value.DeleteFromGarbage; - JSCode('keyNavConfig:' + VarToJSON([Value, false])); + JSCode('defaultMargins:' + VarToJSON([Value, false])); end; -procedure TExtPickerDate.SetFLongDayFormat(Value : String); begin - FLongDayFormat := Value; - JSCode('longDayFormat:' + VarToJSON([Value])); +function TExtLayoutContainerFit.JSClassName : string; begin + Result := 'Ext.layout.container.Fit'; end; -procedure TExtPickerDate.SetFMaxDate(Value : TDateTime); begin - FMaxDate := Value; - if not ConfigAvailable(JSName) then - SetMaxDate(Value) - else - JSCode('maxDate:' + VarToJSON([Value])); +procedure TExtLayoutContainerFit.InitDefaults; begin + inherited; + FDefaultMargins := TExtObject.CreateInternal(Self, 'defaultMargins'); end; -procedure TExtPickerDate.SetFMaxText(Value : String); begin - FMaxText := Value; - JSCode('maxText:' + VarToJSON([Value])); +{$IFDEF FPC}constructor TExtLayoutContainerFit.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtLayoutContainerFit.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtPickerDate.SetFMinDate(Value : TDateTime); begin - FMinDate := Value; - if not ConfigAvailable(JSName) then - SetMinDate(Value) - else - JSCode('minDate:' + VarToJSON([Value])); +destructor TExtLayoutContainerFit.Destroy; begin + try + FDefaultMargins.Free; + except end; + inherited; end; -procedure TExtPickerDate.SetFMinText(Value : String); begin - FMinText := Value; - JSCode('minText:' + VarToJSON([Value])); +procedure TExtChartSeriesBar.SetFColumn(Value : Boolean); begin + FColumn := Value; + JSCode('column:' + VarToJSON([Value])); end; -procedure TExtPickerDate.SetFMonthNames(Value : TExtObjectList); begin - FMonthNames := Value; - Value.DeleteFromGarbage; - JSCode('monthNames:' + VarToJSON([Value, false])); +procedure TExtChartSeriesBar.SetFGroupGutter(Value : Integer); begin + FGroupGutter := Value; + JSCode('groupGutter:' + VarToJSON([Value])); end; -procedure TExtPickerDate.SetFMonthYearFormat(Value : String); begin - FMonthYearFormat := Value; - JSCode('monthYearFormat:' + VarToJSON([Value])); +procedure TExtChartSeriesBar.SetFGutter(Value : Integer); begin + FGutter := Value; + JSCode('gutter:' + VarToJSON([Value])); end; -procedure TExtPickerDate.SetFMonthYearText(Value : String); begin - FMonthYearText := Value; - JSCode('monthYearText:' + VarToJSON([Value])); +procedure TExtChartSeriesBar.SetFStacked(Value : Boolean); begin + FStacked := Value; + JSCode('stacked:' + VarToJSON([Value])); end; -procedure TExtPickerDate.SetFNextText(Value : String); begin - FNextText := Value; - JSCode('nextText:' + VarToJSON([Value])); +procedure TExtChartSeriesBar.SetFXPadding(Value : Integer); begin + FXPadding := Value; + JSCode('xPadding:' + VarToJSON([Value])); end; -procedure TExtPickerDate.SetFPrevText(Value : String); begin - FPrevText := Value; - JSCode('prevText:' + VarToJSON([Value])); +procedure TExtChartSeriesBar.SetFXPaddingObject(Value : TExtObject); begin + FXPaddingObject := Value; + Value.DeleteFromGarbage; + JSCode('xPadding:' + VarToJSON([Value, false])); end; -procedure TExtPickerDate.SetFScope(Value : TExtObject); begin - FScope := Value; +procedure TExtChartSeriesBar.SetFYPadding(Value : Integer); begin + FYPadding := Value; + JSCode('yPadding:' + VarToJSON([Value])); +end; + +procedure TExtChartSeriesBar.SetFYPaddingObject(Value : TExtObject); begin + FYPaddingObject := Value; Value.DeleteFromGarbage; - JSCode('scope:' + VarToJSON([Value, false])); + JSCode('yPadding:' + VarToJSON([Value, false])); end; -procedure TExtPickerDate.SetFSelectedCls(Value : String); begin - FSelectedCls := Value; - JSCode('selectedCls:' + VarToJSON([Value])); +function TExtChartSeriesBar.JSClassName : string; begin + Result := 'Ext.chart.series.Bar'; end; -procedure TExtPickerDate.SetFShowToday(Value : Boolean); begin - FShowToday := Value; - JSCode('showToday:' + VarToJSON([Value])); +procedure TExtChartSeriesBar.InitDefaults; begin + inherited; + FXPaddingObject := TExtObject.CreateInternal(Self, 'xPadding'); + FYPaddingObject := TExtObject.CreateInternal(Self, 'yPadding'); end; -procedure TExtPickerDate.SetFStartDay(Value : Integer); begin - FStartDay := Value; - JSCode('startDay:' + VarToJSON([Value])); +{$IFDEF FPC}constructor TExtChartSeriesBar.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtChartSeriesBar.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtPickerDate.SetFTodayText(Value : String); begin - FTodayText := Value; - JSCode('todayText:' + VarToJSON([Value])); +function TExtChartSeriesBar.DrawSeries : TExtFunction; begin + JSCode(JSName + '.drawSeries();', 'TExtChartSeriesBar'); + Result := Self; end; -procedure TExtPickerDate.SetFTodayTip(Value : String); begin - FTodayTip := Value; - JSCode('todayTip:' + VarToJSON([Value])); +function TExtChartSeriesBar.GetLegendColor : TExtFunction; begin + JSCode(JSName + '.getLegendColor();', 'TExtChartSeriesBar'); + Result := Self; end; -procedure TExtPickerDate.SetFOnSelect(Value : TExtPickerDateOnSelect); begin - if Assigned(FOnSelect) then - JSCode(JSName+'.events ["select"].listeners=[];'); - if Assigned(Value) then - AddListener('select', Ajax('select', ['This', '%0.nm','Date', '%1'], true)); - FOnSelect := Value; +destructor TExtChartSeriesBar.Destroy; begin + try + FXPaddingObject.Free; + FYPaddingObject.Free; + except end; + inherited; end; -function TExtPickerDate.JSClassName : string; begin - Result := 'Ext.picker.Date'; +procedure TExtChartSeriesArea.SetFStyle(Value : TExtObject); begin + FStyle := Value; + Value.DeleteFromGarbage; + JSCode('style:' + VarToJSON([Value, false])); end; -procedure TExtPickerDate.InitDefaults; begin +function TExtChartSeriesArea.JSClassName : string; begin + Result := 'Ext.chart.series.Area'; +end; + +procedure TExtChartSeriesArea.InitDefaults; begin inherited; - FDayNames := TExtObjectList.Create(Self, 'dayNames'); - FDisabledDates := TExtObjectList.Create(Self, 'disabledDates'); - FKeyNavConfig := TExtObject.CreateInternal(Self, 'keyNavConfig'); - FMonthNames := TExtObjectList.Create(Self, 'monthNames'); - FScope := TExtObject.CreateInternal(Self, 'scope'); - FStartDay := 0; + FStyle := TExtObject.CreateInternal(Self, 'style'); end; -{$IFDEF FPC}constructor TExtPickerDate.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtChartSeriesArea.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtPickerDate.Create; begin +constructor TExtChartSeriesArea.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -function TExtPickerDate.GetDayInitial : TExtFunction; begin - JSCode(JSName + '.getDayInitial();', 'TExtPickerDate'); +function TExtChartSeriesArea.DrawSeries : TExtFunction; begin + JSCode(JSName + '.drawSeries();', 'TExtChartSeriesArea'); Result := Self; end; -function TExtPickerDate.GetValue : TExtFunction; begin - JSCode(JSName + '.getValue();', 'TExtPickerDate'); +function TExtChartSeriesArea.GetLegendColor(Item : TExtObject) : TExtFunction; begin + JSCode(JSName + '.getLegendColor(' + VarToJSON([Item, false]) + ');', 'TExtChartSeriesArea'); Result := Self; end; -function TExtPickerDate.HideMonthPicker(Animate : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.hideMonthPicker(' + VarToJSON([Animate]) + ');', 'TExtPickerDate'); +function TExtChartSeriesArea.HighlightItem(Info : TExtObject) : TExtFunction; begin + JSCode(JSName + '.highlightItem(' + VarToJSON([Info, false]) + ');', 'TExtChartSeriesArea'); Result := Self; end; -function TExtPickerDate.SelectToday : TExtFunction; begin - JSCode(JSName + '.selectToday();', 'TExtPickerDate'); +function TExtChartSeriesArea.HighlightSeries(Item : TExtObject) : TExtFunction; begin + JSCode(JSName + '.highlightSeries(' + VarToJSON([Item, false]) + ');', 'TExtChartSeriesArea'); Result := Self; end; -function TExtPickerDate.SetDisabledDates(DisabledDates : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.setDisabledDates(' + VarToJSON(DisabledDates) + ');', 'TExtPickerDate'); +function TExtChartSeriesArea.UnHighlightItem(Item : TExtObject) : TExtFunction; begin + JSCode(JSName + '.unHighlightItem(' + VarToJSON([Item, false]) + ');', 'TExtChartSeriesArea'); Result := Self; end; -function TExtPickerDate.SetDisabledDays(DisabledDays : TArrayOfInteger) : TExtFunction; begin - JSCode(JSName + '.setDisabledDays(' + VarToJSON([DisabledDays]) + ');', 'TExtPickerDate'); +function TExtChartSeriesArea.UnHighlightSeries(Item : TExtObject) : TExtFunction; begin + JSCode(JSName + '.unHighlightSeries(' + VarToJSON([Item, false]) + ');', 'TExtChartSeriesArea'); Result := Self; end; -function TExtPickerDate.SetMaxDate(Value : TDateTime) : TExtFunction; begin - JSCode(JSName + '.setMaxDate(' + VarToJSON([Value]) + ');', 'TExtPickerDate'); - Result := Self; +destructor TExtChartSeriesArea.Destroy; begin + try + FStyle.Free; + except end; + inherited; end; -function TExtPickerDate.SetMinDate(Value : TDateTime) : TExtFunction; begin - JSCode(JSName + '.setMinDate(' + VarToJSON([Value]) + ');', 'TExtPickerDate'); - Result := Self; +function TExtDrawCompositeSprite.JSClassName : string; begin + Result := 'Ext.draw.CompositeSprite'; end; -function TExtPickerDate.SetValue(Value : TDateTime) : TExtFunction; begin - JSCode(JSName + '.setValue(' + VarToJSON([Value]) + ');', 'TExtPickerDate'); +{$IFDEF FPC}constructor TExtDrawCompositeSprite.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDrawCompositeSprite.AddCls(Cls : String) : TExtFunction; begin + JSCode(JSName + '.addCls(' + VarToJSON([Cls]) + ');', 'TExtDrawCompositeSprite'); Result := Self; end; -function TExtPickerDate.ShowMonthPicker(Animate : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.showMonthPicker(' + VarToJSON([Animate]) + ');', 'TExtPickerDate'); +function TExtDrawCompositeSprite.Animate(Config : TExtObject) : TExtFunction; begin + JSCode(JSName + '.animate(' + VarToJSON([Config, false]) + ');', 'TExtDrawCompositeSprite'); Result := Self; end; -function TExtPickerDate.ShowNextMonth(E : TExtObject) : TExtFunction; begin - JSCode(JSName + '.showNextMonth(' + VarToJSON([E, false]) + ');', 'TExtPickerDate'); +function TExtDrawCompositeSprite.GetActiveAnimation : TExtFunction; begin + JSCode(JSName + '.getActiveAnimation();', 'TExtDrawCompositeSprite'); Result := Self; end; -function TExtPickerDate.ShowNextYear : TExtFunction; begin - JSCode(JSName + '.showNextYear();', 'TExtPickerDate'); +function TExtDrawCompositeSprite.GetBBox : TExtFunction; begin + JSCode(JSName + '.getBBox();', 'TExtDrawCompositeSprite'); Result := Self; end; -function TExtPickerDate.ShowPrevMonth(E : TExtObject) : TExtFunction; begin - JSCode(JSName + '.showPrevMonth(' + VarToJSON([E, false]) + ');', 'TExtPickerDate'); +function TExtDrawCompositeSprite.Hide(Redraw : Boolean) : TExtFunction; begin + JSCode(JSName + '.hide(' + VarToJSON([Redraw]) + ');', 'TExtDrawCompositeSprite'); Result := Self; end; -function TExtPickerDate.ShowPrevYear : TExtFunction; begin - JSCode(JSName + '.showPrevYear();', 'TExtPickerDate'); +function TExtDrawCompositeSprite.Redraw : TExtFunction; begin + JSCode(JSName + '.redraw();', 'TExtDrawCompositeSprite'); Result := Self; end; -destructor TExtPickerDate.Destroy; begin - try - FDayNames.Free; - FDisabledDates.Free; - FKeyNavConfig.Free; - FMonthNames.Free; - FScope.Free; - except end; - inherited; +function TExtDrawCompositeSprite.RemoveCls(Cls : String) : TExtFunction; begin + JSCode(JSName + '.removeCls(' + VarToJSON([Cls]) + ');', 'TExtDrawCompositeSprite'); + Result := Self; end; -procedure TExtPickerDate.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'select') and Assigned(FOnSelect) then - FOnSelect(TExtPickerDate(ParamAsObject('This')), ParamAsTDateTime('Date')); +function TExtDrawCompositeSprite.SequenceFx : TExtFunction; begin + JSCode(JSName + '.sequenceFx();', 'TExtDrawCompositeSprite'); + Result := Self; end; -function TExtToolbarSpacer.JSClassName : string; begin - Result := 'Ext.toolbar.Spacer'; +function TExtDrawCompositeSprite.SetAttributes(Attrs : TExtObject; Redraw : Boolean) : TExtFunction; begin + JSCode(JSName + '.setAttributes(' + VarToJSON([Attrs, false, Redraw]) + ');', 'TExtDrawCompositeSprite'); + Result := Self; end; -{$IFDEF FPC}constructor TExtToolbarSpacer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtPickerMonth.SetFBaseCls(Value : String); begin - FBaseCls := Value; - JSCode('baseCls:' + VarToJSON([Value])); +function TExtDrawCompositeSprite.SetStyle(Style : String) : TExtFunction; begin + JSCode(JSName + '.setStyle(' + VarToJSON([Style]) + ');', 'TExtDrawCompositeSprite'); + Result := Self; end; -procedure TExtPickerMonth.SetFCancelText(Value : String); begin - FCancelText := Value; - JSCode('cancelText:' + VarToJSON([Value])); +function TExtDrawCompositeSprite.Show(Redraw : Boolean) : TExtFunction; begin + JSCode(JSName + '.show(' + VarToJSON([Redraw]) + ');', 'TExtDrawCompositeSprite'); + Result := Self; end; -procedure TExtPickerMonth.SetFOkText(Value : String); begin - FOkText := Value; - JSCode('okText:' + VarToJSON([Value])); +function TExtDrawCompositeSprite.StopAnimation : TExtFunction; begin + JSCode(JSName + '.stopAnimation();', 'TExtDrawCompositeSprite'); + Result := Self; end; -procedure TExtPickerMonth.SetFSelectedCls(Value : String); begin - FSelectedCls := Value; - JSCode('selectedCls:' + VarToJSON([Value])); +function TExtDrawCompositeSprite.SyncFx : TExtFunction; begin + JSCode(JSName + '.syncFx();', 'TExtDrawCompositeSprite'); + Result := Self; end; -procedure TExtPickerMonth.SetFShowButtons(Value : Boolean); begin - FShowButtons := Value; - JSCode('showButtons:' + VarToJSON([Value])); +procedure TExtChartSeriesLine.SetFFill(Value : Boolean); begin + FFill := Value; + JSCode('fill:' + VarToJSON([Value])); end; -procedure TExtPickerMonth.SetFValue(Value : TDateTime); begin - FValue := Value; - JSCode('value:' + VarToJSON([Value])); +procedure TExtChartSeriesLine.SetFMarkerConfig(Value : TExtObject); begin + FMarkerConfig := Value; + Value.DeleteFromGarbage; + JSCode('markerConfig:' + VarToJSON([Value, false])); end; -procedure TExtPickerMonth.SetFValueTArrayOfInteger(Value : TArrayOfInteger); begin - FValueTArrayOfInteger := Value; - JSCode('value:' + ArrayToJSON(Value)); +procedure TExtChartSeriesLine.SetFSelectionTolerance(Value : Integer); begin + FSelectionTolerance := Value; + JSCode('selectionTolerance:' + VarToJSON([Value])); end; -procedure TExtPickerMonth.SetFOnCancelclick(Value : TExtPickerMonthOnCancelclick); begin - if Assigned(FOnCancelclick) then - JSCode(JSName+'.events ["cancelclick"].listeners=[];'); - if Assigned(Value) then - AddListener('cancelclick', Ajax('cancelclick', ['This', '%0.nm'], true)); - FOnCancelclick := Value; +procedure TExtChartSeriesLine.SetFShowMarkers(Value : Boolean); begin + FShowMarkers := Value; + JSCode('showMarkers:' + VarToJSON([Value])); end; -procedure TExtPickerMonth.SetFOnMonthclick(Value : TExtPickerMonthOnMonthclick); begin - if Assigned(FOnMonthclick) then - JSCode(JSName+'.events ["monthclick"].listeners=[];'); - if Assigned(Value) then - AddListener('monthclick', Ajax('monthclick', ['This', '%0.nm','Value', '%1.nm'], true)); - FOnMonthclick := Value; +procedure TExtChartSeriesLine.SetFSmooth(Value : Boolean); begin + FSmooth := Value; + JSCode('smooth:' + VarToJSON([Value])); end; -procedure TExtPickerMonth.SetFOnMonthdblclick(Value : TExtPickerMonthOnMonthdblclick); begin - if Assigned(FOnMonthdblclick) then - JSCode(JSName+'.events ["monthdblclick"].listeners=[];'); - if Assigned(Value) then - AddListener('monthdblclick', Ajax('monthdblclick', ['This', '%0.nm','Value', '%1.nm'], true)); - FOnMonthdblclick := Value; +procedure TExtChartSeriesLine.SetFSmoothInteger(Value : Integer); begin + FSmoothInteger := Value; + JSCode('smooth:' + VarToJSON([Value])); end; -procedure TExtPickerMonth.SetFOnOkclick(Value : TExtPickerMonthOnOkclick); begin - if Assigned(FOnOkclick) then - JSCode(JSName+'.events ["okclick"].listeners=[];'); - if Assigned(Value) then - AddListener('okclick', Ajax('okclick', ['This', '%0.nm','Value', '%1.nm'], true)); - FOnOkclick := Value; +procedure TExtChartSeriesLine.SetFStyle(Value : TExtObject); begin + FStyle := Value; + Value.DeleteFromGarbage; + JSCode('style:' + VarToJSON([Value, false])); end; -procedure TExtPickerMonth.SetFOnSelect(Value : TExtPickerMonthOnSelect); begin - if Assigned(FOnSelect) then - JSCode(JSName+'.events ["select"].listeners=[];'); - if Assigned(Value) then - AddListener('select', Ajax('select', ['This', '%0.nm','Value', '%1.nm'], true)); - FOnSelect := Value; +function TExtChartSeriesLine.JSClassName : string; begin + Result := 'Ext.chart.series.Line'; end; -procedure TExtPickerMonth.SetFOnYearclick(Value : TExtPickerMonthOnYearclick); begin - if Assigned(FOnYearclick) then - JSCode(JSName+'.events ["yearclick"].listeners=[];'); - if Assigned(Value) then - AddListener('yearclick', Ajax('yearclick', ['This', '%0.nm','Value', '%1.nm'], true)); - FOnYearclick := Value; +procedure TExtChartSeriesLine.InitDefaults; begin + inherited; + FMarkerConfig := TExtObject.CreateInternal(Self, 'markerConfig'); + FStyle := TExtObject.CreateInternal(Self, 'style'); end; -procedure TExtPickerMonth.SetFOnYeardblclick(Value : TExtPickerMonthOnYeardblclick); begin - if Assigned(FOnYeardblclick) then - JSCode(JSName+'.events ["yeardblclick"].listeners=[];'); - if Assigned(Value) then - AddListener('yeardblclick', Ajax('yeardblclick', ['This', '%0.nm','Value', '%1.nm'], true)); - FOnYeardblclick := Value; -end; +{$IFDEF FPC}constructor TExtChartSeriesLine.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtPickerMonth.JSClassName : string; begin - Result := 'Ext.picker.Month'; +constructor TExtChartSeriesLine.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -{$IFDEF FPC}constructor TExtPickerMonth.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtPickerMonth.AdjustYear(Offset : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.adjustYear(' + VarToJSON([Offset]) + ');', 'TExtPickerMonth'); +function TExtChartSeriesLine.DrawSeries : TExtFunction; begin + JSCode(JSName + '.drawSeries();', 'TExtChartSeriesLine'); Result := Self; end; -function TExtPickerMonth.GetValue : TExtFunction; begin - JSCode(JSName + '.getValue();', 'TExtPickerMonth'); - Result := Self; +destructor TExtChartSeriesLine.Destroy; begin + try + FMarkerConfig.Free; + FStyle.Free; + except end; + inherited; end; -function TExtPickerMonth.HasSelection : TExtFunction; begin - JSCode(JSName + '.hasSelection();', 'TExtPickerMonth'); - Result := Self; +procedure TExtDdDDProxy.SetFCenterFrame(Value : Boolean); begin + FCenterFrame := Value; + JSCode(JSName + '.centerFrame=' + VarToJSON([Value]) + ';'); end; -function TExtPickerMonth.SetValue(Value : TArrayOfInteger) : TExtFunction; begin - JSCode(JSName + '.setValue(' + VarToJSON([Value]) + ');', 'TExtPickerMonth'); - Result := Self; +procedure TExtDdDDProxy.SetFResizeFrame(Value : Boolean); begin + FResizeFrame := Value; + JSCode(JSName + '.resizeFrame=' + VarToJSON([Value]) + ';'); end; -procedure TExtPickerMonth.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'cancelclick') and Assigned(FOnCancelclick) then - FOnCancelclick(TExtPickerMonth(ParamAsObject('This'))) - else if (AEvtName = 'monthclick') and Assigned(FOnMonthclick) then - FOnMonthclick(TExtPickerMonth(ParamAsObject('This')), TExtObjectList(ParamAsObject('Value'))) - else if (AEvtName = 'monthdblclick') and Assigned(FOnMonthdblclick) then - FOnMonthdblclick(TExtPickerMonth(ParamAsObject('This')), TExtObjectList(ParamAsObject('Value'))) - else if (AEvtName = 'okclick') and Assigned(FOnOkclick) then - FOnOkclick(TExtPickerMonth(ParamAsObject('This')), TExtObjectList(ParamAsObject('Value'))) - else if (AEvtName = 'select') and Assigned(FOnSelect) then - FOnSelect(TExtPickerMonth(ParamAsObject('This')), TExtObjectList(ParamAsObject('Value'))) - else if (AEvtName = 'yearclick') and Assigned(FOnYearclick) then - FOnYearclick(TExtPickerMonth(ParamAsObject('This')), TExtObjectList(ParamAsObject('Value'))) - else if (AEvtName = 'yeardblclick') and Assigned(FOnYeardblclick) then - FOnYeardblclick(TExtPickerMonth(ParamAsObject('This')), TExtObjectList(ParamAsObject('Value'))); +function TExtDdDDProxy.JSClassName : string; begin + Result := 'Ext.dd.DDProxy'; end; -procedure TExtFormLabel.SetFForId(Value : String); begin - FForId := Value; - JSCode('forId:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtDdDDProxy.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtFormLabel.SetFHtml(Value : String); begin - FHtml := Value; - JSCode('html:' + VarToJSON([Value])); +function TExtDdDDProxy.CreateFrame : TExtFunction; begin + JSCode(JSName + '.createFrame();', 'TExtDdDDProxy'); + Result := Self; end; -procedure TExtFormLabel.SetFText(Value : String); begin - FText := Value; - if not ConfigAvailable(JSName) then - SetText(Value) - else - JSCode('text:' + VarToJSON([Value])); +function TExtDdDDProxy.InitFrame : TExtFunction; begin + JSCode(JSName + '.initFrame();', 'TExtDdDDProxy'); + Result := Self; end; -function TExtFormLabel.JSClassName : string; begin - Result := 'Ext.form.Label'; +function TExtResizerBorderSplitter.JSClassName : string; begin + Result := 'Ext.resizer.BorderSplitter'; end; -{$IFDEF FPC}constructor TExtFormLabel.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtResizerBorderSplitter.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtFormLabel.SetText(Text : String; Encode : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.setText(' + VarToJSON([Text, Encode]) + ');', 'TExtFormLabel'); - Result := Self; +function TExtResizerBorderSplitterTracker.JSClassName : string; begin + Result := 'Ext.resizer.BorderSplitterTracker'; end; -procedure TExtToolbarItem.SetFOverflowText(Value : String); begin - FOverflowText := Value; - JSCode('overflowText:' + VarToJSON([Value])); +{$IFDEF FPC}constructor TExtResizerBorderSplitterTracker.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +procedure TExtMenuSeparator.SetFSeparatorCls(Value : String); begin + FSeparatorCls := Value; + JSCode('separatorCls:' + VarToJSON([Value])); end; -function TExtToolbarItem.JSClassName : string; begin - Result := 'Ext.toolbar.Item'; +function TExtMenuSeparator.JSClassName : string; begin + Result := 'Ext.menu.Separator'; end; -{$IFDEF FPC}constructor TExtToolbarItem.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtMenuSeparator.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtPickerColor.SetFAllowReselect(Value : Boolean); begin - FAllowReselect := Value; - JSCode('allowReselect:' + VarToJSON([Value])); +procedure TExtDataWriterXml.SetFDefaultDocumentRoot(Value : String); begin + FDefaultDocumentRoot := Value; + JSCode('defaultDocumentRoot:' + VarToJSON([Value])); end; -procedure TExtPickerColor.SetFClickEvent(Value : String); begin - FClickEvent := Value; - JSCode('clickEvent:' + VarToJSON([Value])); +procedure TExtDataWriterXml.SetFDocumentRoot(Value : String); begin + FDocumentRoot := Value; + JSCode('documentRoot:' + VarToJSON([Value])); end; -procedure TExtPickerColor.SetFComponentCls(Value : String); begin - FComponentCls := Value; - JSCode('componentCls:' + VarToJSON([Value])); +procedure TExtDataWriterXml.SetFHeader(Value : String); begin + FHeader := Value; + JSCode('header:' + VarToJSON([Value])); end; -procedure TExtPickerColor.SetFHandler(Value : TExtFunction); begin - FHandler := Value; - JSCode('handler:' + VarToJSON([Value, true])); +procedure TExtDataWriterXml.SetFRecordJS(Value : String); begin + FRecordJS := Value; + JSCode('recordJS:' + VarToJSON([Value])); end; -procedure TExtPickerColor.SetFItemCls(Value : String); begin - FItemCls := Value; - JSCode('itemCls:' + VarToJSON([Value])); +function TExtDataWriterXml.JSClassName : string; begin + Result := 'Ext.data.writer.Xml'; end; -procedure TExtPickerColor.SetFScope(Value : TExtObject); begin - FScope := Value; - Value.DeleteFromGarbage; - JSCode('scope:' + VarToJSON([Value, false])); +procedure TExtDataWriterXml.InitDefaults; begin + inherited; + FDocumentRoot := 'xmlData'; + FRecordJS := 'record'; end; -procedure TExtPickerColor.SetFSelectedCls(Value : String); begin - FSelectedCls := Value; - JSCode('selectedCls:' + VarToJSON([Value])); +{$IFDEF FPC}constructor TExtDataWriterXml.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtDataWriterXml.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; +end; + +procedure TExtDataWriterJson.SetFAllowSingle(Value : Boolean); begin + FAllowSingle := Value; + JSCode('allowSingle:' + VarToJSON([Value])); end; -procedure TExtPickerColor.SetFValue(Value : String); begin - FValue := Value; - JSCode('value:' + VarToJSON([Value])); +procedure TExtDataWriterJson.SetFEncode(Value : Boolean); begin + FEncode := Value; + JSCode('encode:' + VarToJSON([Value])); end; -procedure TExtPickerColor.SetFOnSelect(Value : TExtPickerColorOnSelect); begin - if Assigned(FOnSelect) then - JSCode(JSName+'.events ["select"].listeners=[];'); - if Assigned(Value) then - AddListener('select', Ajax('select', ['This', '%0.nm','Color', '%1'], true)); - FOnSelect := Value; +procedure TExtDataWriterJson.SetFExpandData(Value : Boolean); begin + FExpandData := Value; + JSCode('expandData:' + VarToJSON([Value])); end; -function TExtPickerColor.JSClassName : string; begin - Result := 'Ext.picker.Color'; +procedure TExtDataWriterJson.SetFRoot(Value : String); begin + FRoot := Value; + JSCode('root:' + VarToJSON([Value])); end; -procedure TExtPickerColor.InitDefaults; begin - inherited; - FScope := TExtObject.CreateInternal(Self, 'scope'); +function TExtDataWriterJson.JSClassName : string; begin + Result := 'Ext.data.writer.Json'; end; -{$IFDEF FPC}constructor TExtPickerColor.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtDataWriterJson.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtPickerColor.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +function TExtContainer.JSClassName : string; begin + Result := 'Ext.container.Container'; end; -function TExtPickerColor.GetValue : TExtFunction; begin - JSCode(JSName + '.getValue();', 'TExtPickerColor'); - Result := Self; -end; +{$IFDEF FPC}constructor TExtContainer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtPickerColor.Select(Color : String; SuppressEvent : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.select(' + VarToJSON([Color, SuppressEvent]) + ');', 'TExtPickerColor'); +function TExtContainer.GetChildByElement(El : String; Deep : Boolean) : TExtFunction; begin + JSCode(JSName + '.getChildByElement(' + VarToJSON([El, Deep]) + ');', 'TExtContainer'); Result := Self; end; -destructor TExtPickerColor.Destroy; begin - try - FScope.Free; - except end; - inherited; +procedure TExtMenuCheckItem.SetFCheckChangeDisabled(Value : Boolean); begin + FCheckChangeDisabled := Value; + JSCode('checkChangeDisabled:' + VarToJSON([Value])); end; -procedure TExtPickerColor.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'select') and Assigned(FOnSelect) then - FOnSelect(TExtPickerColor(ParamAsObject('This')), ParamAsString('Color')); +procedure TExtMenuCheckItem.SetFChecked(Value : Boolean); begin + FChecked := Value; + if not ConfigAvailable(JSName) then + SetChecked(Value) + else + JSCode('checked:' + VarToJSON([Value])); end; -function TExtAppDomainComponentSingleton.JSClassName : string; begin - Result := 'Ext.app.domain.Component'; +procedure TExtMenuCheckItem.SetFCheckedCls(Value : String); begin + FCheckedCls := Value; + JSCode('checkedCls:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtAppDomainComponentSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtPanelTool.SetFHandler(Value : TExtFunction); begin - FHandler := Value; - JSCode('handler:' + VarToJSON([Value, true])); +procedure TExtMenuCheckItem.SetFCheckHandler(Value : TExtFunction); begin + FCheckHandler := Value; + JSCode('checkHandler:' + VarToJSON([Value, true])); end; -procedure TExtPanelTool.SetFScope(Value : TExtObject); begin - FScope := Value; - Value.DeleteFromGarbage; - JSCode('scope:' + VarToJSON([Value, false])); +procedure TExtMenuCheckItem.SetFGroup(Value : String); begin + FGroup := Value; + JSCode('group:' + VarToJSON([Value])); end; -procedure TExtPanelTool.SetFStopEvent(Value : Boolean); begin - FStopEvent := Value; - JSCode('stopEvent:' + VarToJSON([Value])); +procedure TExtMenuCheckItem.SetFGroupCls(Value : String); begin + FGroupCls := Value; + JSCode('groupCls:' + VarToJSON([Value])); end; -procedure TExtPanelTool.SetFTooltip(Value : String); begin - FTooltip := Value; - JSCode('tooltip:' + VarToJSON([Value])); +procedure TExtMenuCheckItem.SetFHideOnClick(Value : Boolean); begin + FHideOnClick := Value; + JSCode('hideOnClick:' + VarToJSON([Value])); end; -procedure TExtPanelTool.SetFTooltipObject(Value : TExtObject); begin - FTooltipObject := Value; +procedure TExtMenuCheckItem.SetFScope(Value : TExtObject); begin + FScope := Value; Value.DeleteFromGarbage; - JSCode('tooltip:' + VarToJSON([Value, false])); + JSCode('scope:' + VarToJSON([Value, false])); end; -procedure TExtPanelTool.SetFTooltipType(Value : String); begin - FTooltipType := Value; - JSCode('tooltipType:' + VarToJSON([Value])); +procedure TExtMenuCheckItem.SetFUncheckedCls(Value : String); begin + FUncheckedCls := Value; + JSCode('uncheckedCls:' + VarToJSON([Value])); end; -procedure TExtPanelTool.SetFTypeJS(Value : String); begin - FTypeJS := Value; - JSCode('typeJS:' + VarToJSON([Value])); +procedure TExtMenuCheckItem.SetFOnBeforecheckchange(Value : TExtMenuCheckItemOnBeforecheckchange); begin + if Assigned(FOnBeforecheckchange) then + JSCode(JSName+'.events ["beforecheckchange"].listeners=[];'); + if Assigned(Value) then + AddListener('beforecheckchange', Ajax('beforecheckchange', ['This', '%0.nm','Checked', '%1'], true)); + FOnBeforecheckchange := Value; end; -procedure TExtPanelTool.SetFOnClick(Value : TExtPanelToolOnClick); begin - if Assigned(FOnClick) then - JSCode(JSName+'.events ["click"].listeners=[];'); +procedure TExtMenuCheckItem.SetFOnCheckchange(Value : TExtMenuCheckItemOnCheckchange); begin + if Assigned(FOnCheckchange) then + JSCode(JSName+'.events ["checkchange"].listeners=[];'); if Assigned(Value) then - AddListener('click', Ajax('click', ['This', '%0.nm','E', '%1.nm'], true)); - FOnClick := Value; + AddListener('checkchange', Ajax('checkchange', ['This', '%0.nm','Checked', '%1'], true)); + FOnCheckchange := Value; end; -function TExtPanelTool.JSClassName : string; begin - Result := 'Ext.panel.Tool'; +function TExtMenuCheckItem.JSClassName : string; begin + Result := 'Ext.menu.CheckItem'; end; -procedure TExtPanelTool.InitDefaults; begin +procedure TExtMenuCheckItem.InitDefaults; begin inherited; + FHideOnClick := true; FScope := TExtObject.CreateInternal(Self, 'scope'); - FTooltipObject := TExtObject.CreateInternal(Self, 'tooltip'); end; -{$IFDEF FPC}constructor TExtPanelTool.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtMenuCheckItem.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtPanelTool.Create; begin +constructor TExtMenuCheckItem.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -function TExtPanelTool.SetType(TypeJS : String) : TExtFunction; begin - JSCode(JSName + '.setType(' + VarToJSON([TypeJS]) + ');', 'TExtPanelTool'); +function TExtMenuCheckItem.DisableCheckChange : TExtFunction; begin + JSCode(JSName + '.disableCheckChange();', 'TExtMenuCheckItem'); Result := Self; end; -destructor TExtPanelTool.Destroy; begin +function TExtMenuCheckItem.EnableCheckChange : TExtFunction; begin + JSCode(JSName + '.enableCheckChange();', 'TExtMenuCheckItem'); + Result := Self; +end; + +function TExtMenuCheckItem.SetChecked(Checked : Boolean; SuppressEvents : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.setChecked(' + VarToJSON([Checked, SuppressEvents]) + ');', 'TExtMenuCheckItem'); + Result := Self; +end; + +destructor TExtMenuCheckItem.Destroy; begin try FScope.Free; - FTooltipObject.Free; except end; inherited; end; -procedure TExtPanelTool.HandleEvent(const AEvtName : string); begin +procedure TExtMenuCheckItem.HandleEvent(const AEvtName : string); begin inherited; - if (AEvtName = 'click') and Assigned(FOnClick) then - FOnClick(TExtPanelTool(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))); + if (AEvtName = 'beforecheckchange') and Assigned(FOnBeforecheckchange) then + FOnBeforecheckchange(TExtMenuCheckItem(ParamAsObject('This')), ParamAsBoolean('Checked')) + else if (AEvtName = 'checkchange') and Assigned(FOnCheckchange) then + FOnCheckchange(TExtMenuCheckItem(ParamAsObject('This')), ParamAsBoolean('Checked')); end; -function TExtAppDomainControllerSingleton.JSClassName : string; begin - Result := 'Ext.app.domain.Controller'; +procedure TExtChartSeriesScatter.SetFMarkerConfig(Value : TExtObject); begin + FMarkerConfig := Value; + Value.DeleteFromGarbage; + JSCode('markerConfig:' + VarToJSON([Value, false])); end; -{$IFDEF FPC}constructor TExtAppDomainControllerSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtUtilClickRepeater.SetFAccelerate(Value : Boolean); begin - FAccelerate := Value; - JSCode('accelerate:' + VarToJSON([Value])); +procedure TExtChartSeriesScatter.SetFStyle(Value : TExtObject); begin + FStyle := Value; + Value.DeleteFromGarbage; + JSCode('style:' + VarToJSON([Value, false])); end; -procedure TExtUtilClickRepeater.SetFDelay(Value : Integer); begin - FDelay := Value; - JSCode('delay:' + VarToJSON([Value])); +function TExtChartSeriesScatter.JSClassName : string; begin + Result := 'Ext.chart.series.Scatter'; end; -procedure TExtUtilClickRepeater.SetFEl(Value : String); begin - FEl := Value; - JSCode('el:' + VarToJSON([Value])); +procedure TExtChartSeriesScatter.InitDefaults; begin + inherited; + FMarkerConfig := TExtObject.CreateInternal(Self, 'markerConfig'); + FStyle := TExtObject.CreateInternal(Self, 'style'); end; -procedure TExtUtilClickRepeater.SetFElElement(Value : TExtElement); begin - FElElement := Value; - Value.DeleteFromGarbage; - JSCode('el:' + VarToJSON([Value, false])); -end; +{$IFDEF FPC}constructor TExtChartSeriesScatter.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtUtilClickRepeater.SetFElTHTMLElement(Value : THTMLElement); begin - FElTHTMLElement := Value; - Value.DeleteFromGarbage; - JSCode('el:' + VarToJSON([Value, false])); +constructor TExtChartSeriesScatter.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtUtilClickRepeater.SetFInterval(Value : Integer); begin - FInterval := Value; - JSCode('interval:' + VarToJSON([Value])); +function TExtChartSeriesScatter.DrawSeries : TExtFunction; begin + JSCode(JSName + '.drawSeries();', 'TExtChartSeriesScatter'); + Result := Self; end; -procedure TExtUtilClickRepeater.SetFPressedCls(Value : String); begin - FPressedCls := Value; - JSCode('pressedCls:' + VarToJSON([Value])); +destructor TExtChartSeriesScatter.Destroy; begin + try + FMarkerConfig.Free; + FStyle.Free; + except end; + inherited; end; -procedure TExtUtilClickRepeater.SetFPreventDefault(Value : Boolean); begin - FPreventDefault := Value; - JSCode('preventDefault:' + VarToJSON([Value])); +function TExtDataErrors.JSClassName : string; begin + Result := 'Ext.data.Errors'; end; -procedure TExtUtilClickRepeater.SetFStopDefault(Value : Boolean); begin - FStopDefault := Value; - JSCode('stopDefault:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtDataErrors.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtUtilClickRepeater.JSClassName : string; begin - Result := 'Ext.util.ClickRepeater'; +function TExtDataErrors.GetByField(FieldName : String) : TExtFunction; begin + JSCode(JSName + '.getByField(' + VarToJSON([FieldName]) + ');', 'TExtDataErrors'); + Result := Self; end; -procedure TExtUtilClickRepeater.InitDefaults; begin - inherited; - FElElement := TExtElement.CreateInternal(Self, 'el'); +function TExtDataErrors.IsValid : TExtFunction; begin + JSCode(JSName + '.isValid();', 'TExtDataErrors'); + Result := Self; end; -{$IFDEF FPC}constructor TExtUtilClickRepeater.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtUtilClickRepeater.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtDdDropTarget.SetFDdGroup(Value : String); begin + FDdGroup := Value; + JSCode('ddGroup:' + VarToJSON([Value])); end; -function TExtUtilClickRepeater.Disable : TExtFunction; begin - JSCode(JSName + '.disable();', 'TExtUtilClickRepeater'); - Result := Self; +procedure TExtDdDropTarget.SetFDropAllowed(Value : String); begin + FDropAllowed := Value; + JSCode('dropAllowed:' + VarToJSON([Value])); end; -function TExtUtilClickRepeater.Enable : TExtFunction; begin - JSCode(JSName + '.enable();', 'TExtUtilClickRepeater'); - Result := Self; +procedure TExtDdDropTarget.SetFDropNotAllowed(Value : String); begin + FDropNotAllowed := Value; + JSCode('dropNotAllowed:' + VarToJSON([Value])); end; -function TExtUtilClickRepeater.SetDisabled(Disabled : Boolean) : TExtFunction; begin - JSCode(JSName + '.setDisabled(' + VarToJSON([Disabled]) + ');', 'TExtUtilClickRepeater'); - Result := Self; +procedure TExtDdDropTarget.SetFOverClass(Value : String); begin + FOverClass := Value; + JSCode('overClass:' + VarToJSON([Value])); end; -destructor TExtUtilClickRepeater.Destroy; begin - try - FElElement.Free; - except end; - inherited; +function TExtDdDropTarget.JSClassName : string; begin + Result := 'Ext.dd.DropTarget'; end; -function TExtXTemplateCompiler.JSClassName : string; begin - Result := 'Ext.XTemplateCompiler'; +{$IFDEF FPC}constructor TExtDdDropTarget.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtFxTargetCompositeSprite.JSClassName : string; begin + Result := 'Ext.fx.target.CompositeSprite'; end; -{$IFDEF FPC}constructor TExtXTemplateCompiler.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtFxTargetCompositeSprite.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtFxTargetElement.JSClassName : string; begin - Result := 'Ext.fx.target.Element'; +function TExtFxTargetElementCSS.JSClassName : string; begin + Result := 'Ext.fx.target.ElementCSS'; end; -{$IFDEF FPC}constructor TExtFxTargetElement.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtFxTargetElementCSS.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtFxTargetComponent.JSClassName : string; begin - Result := 'Ext.fx.target.Component'; +procedure TExtToolbarTextItem.SetFText(Value : String); begin + FText := Value; + if not ConfigAvailable(JSName) then + SetText(Value) + else + JSCode('text:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtFxTargetComponent.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtUtilGrouper.JSClassName : string; begin - Result := 'Ext.util.Grouper'; +function TExtToolbarTextItem.JSClassName : string; begin + Result := 'Ext.toolbar.TextItem'; end; -{$IFDEF FPC}constructor TExtUtilGrouper.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtToolbarTextItem.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtUtilGrouper.GetGroupString(Instance : TExtDataModel) : TExtFunction; begin - JSCode(JSName + '.getGroupString(' + VarToJSON([Instance, false]) + ');', 'TExtUtilGrouper'); +function TExtToolbarTextItem.SetText(Text : String) : TExtFunction; begin + JSCode(JSName + '.setText(' + VarToJSON([Text]) + ');', 'TExtToolbarTextItem'); Result := Self; end; -function TExtAppDomainGlobalSingleton.JSClassName : string; begin - Result := 'Ext.app.domain.Global'; +procedure TExtFxTargetCompositeElement.SetFIsComposite(Value : Boolean); begin + FIsComposite := Value; + JSCode(JSName + '.isComposite=' + VarToJSON([Value]) + ';'); end; -{$IFDEF FPC}constructor TExtAppDomainGlobalSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtAppDomainDirectSingleton.JSClassName : string; begin - Result := 'Ext.app.domain.Direct'; +function TExtFxTargetCompositeElement.JSClassName : string; begin + Result := 'Ext.fx.target.CompositeElement'; end; -{$IFDEF FPC}constructor TExtAppDomainDirectSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtFxTargetCompositeElement.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtXTemplate.SetFDefinitions(Value : String); begin - FDefinitions := Value; - JSCode('definitions:' + VarToJSON([Value])); +procedure TExtDataReaderXml.SetFNamespace(Value : String); begin + FNamespace := Value; + JSCode('namespace:' + VarToJSON([Value])); end; -procedure TExtXTemplate.SetFDefinitionsList(Value : TExtObjectList); begin - FDefinitionsList := Value; +procedure TExtDataReaderXml.SetFRecordJS(Value : String); begin + FRecordJS := Value; + JSCode('recordJS:' + VarToJSON([Value])); +end; + +procedure TExtDataReaderXml.SetFXmlData(Value : TExtObject); begin + FXmlData := Value; Value.DeleteFromGarbage; - JSCode('definitions:' + VarToJSON([Value, false])); + JSCode(JSName + '.xmlData=' + VarToJSON([Value, false]) + ';'); end; -function TExtXTemplate.JSClassName : string; begin - Result := 'Ext.XTemplate'; +function TExtDataReaderXml.JSClassName : string; begin + Result := 'Ext.data.reader.Xml'; end; -procedure TExtXTemplate.InitDefaults; begin +procedure TExtDataReaderXml.InitDefaults; begin inherited; - FDefinitionsList := TExtObjectList.Create(Self, 'definitions'); + FXmlData := TExtObject.CreateInternal(Self, 'xmlData'); end; -{$IFDEF FPC}constructor TExtXTemplate.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtXTemplate.Compile : TExtFunction; begin - JSCode(JSName + '.compile();', 'TExtXTemplate'); - Result := Self; -end; +{$IFDEF FPC}constructor TExtDataReaderXml.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtXTemplate.Create; begin +constructor TExtDataReaderXml.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -destructor TExtXTemplate.Destroy; begin +destructor TExtDataReaderXml.Destroy; begin try - FDefinitionsList.Free; + FXmlData.Free; except end; inherited; end; -procedure TExtLayoutContainerBorder.SetFPadding(Value : Integer); begin - FPadding := Value; - JSCode('padding:' + VarToJSON([Value])); -end; - -procedure TExtLayoutContainerBorder.SetFPaddingObject(Value : TExtObject); begin - FPaddingObject := Value; +procedure TExtDataReaderJson.SetFJsonData(Value : TExtObject); begin + FJsonData := Value; Value.DeleteFromGarbage; - JSCode('padding:' + VarToJSON([Value, false])); -end; - -procedure TExtLayoutContainerBorder.SetFPaddingString(Value : String); begin - FPaddingString := Value; - JSCode('padding:' + VarToJSON([Value])); + JSCode(JSName + '.jsonData=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtLayoutContainerBorder.SetFRegionWeights(Value : TExtObject); begin - FRegionWeights := Value; - Value.DeleteFromGarbage; - JSCode('regionWeights:' + VarToJSON([Value, false])); +procedure TExtDataReaderJson.SetFMetaProperty(Value : String); begin + FMetaProperty := Value; + JSCode('metaProperty:' + VarToJSON([Value])); end; -procedure TExtLayoutContainerBorder.SetFSplit(Value : Boolean); begin - FSplit := Value; - JSCode('split:' + VarToJSON([Value])); +procedure TExtDataReaderJson.SetFRecordJS(Value : String); begin + FRecordJS := Value; + JSCode('recordJS:' + VarToJSON([Value])); end; -procedure TExtLayoutContainerBorder.SetFSplitterResize(Value : Boolean); begin - FSplitterResize := Value; - JSCode('splitterResize:' + VarToJSON([Value])); +procedure TExtDataReaderJson.SetFUseSimpleAccessors(Value : Boolean); begin + FUseSimpleAccessors := Value; + JSCode('useSimpleAccessors:' + VarToJSON([Value])); end; -function TExtLayoutContainerBorder.JSClassName : string; begin - Result := 'Ext.layout.container.Border'; +function TExtDataReaderJson.JSClassName : string; begin + Result := 'Ext.data.reader.Json'; end; -procedure TExtLayoutContainerBorder.InitDefaults; begin +procedure TExtDataReaderJson.InitDefaults; begin inherited; - FPaddingObject := TExtObject.CreateInternal(Self, 'padding'); - FRegionWeights := TExtObject.CreateInternal(Self, 'regionWeights'); + FJsonData := TExtObject.CreateInternal(Self, 'jsonData'); end; -{$IFDEF FPC}constructor TExtLayoutContainerBorder.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtDataReaderJson.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtLayoutContainerBorder.Create; begin +constructor TExtDataReaderJson.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -destructor TExtLayoutContainerBorder.Destroy; begin +destructor TExtDataReaderJson.Destroy; begin try - FPaddingObject.Free; - FRegionWeights.Free; + FJsonData.Free; except end; inherited; end; -procedure TExtChartSeriesScatter.SetFMarkerConfig(Value : TExtObject); begin - FMarkerConfig := Value; +procedure TExtDataProxyWebStorage.SetFCache(Value : TExtObject); begin + FCache := Value; Value.DeleteFromGarbage; - JSCode('markerConfig:' + VarToJSON([Value, false])); + JSCode(JSName + '.cache=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtChartSeriesScatter.SetFStyle(Value : TExtObject); begin - FStyle := Value; - Value.DeleteFromGarbage; - JSCode('style:' + VarToJSON([Value, false])); +procedure TExtDataProxyWebStorage.SetFId(Value : String); begin + FId := Value; + JSCode('id:' + VarToJSON([Value])); end; -function TExtChartSeriesScatter.JSClassName : string; begin - Result := 'Ext.chart.series.Scatter'; +function TExtDataProxyWebStorage.JSClassName : string; begin + Result := 'Ext.data.proxy.WebStorage'; end; -procedure TExtChartSeriesScatter.InitDefaults; begin +procedure TExtDataProxyWebStorage.InitDefaults; begin inherited; - FMarkerConfig := TExtObject.CreateInternal(Self, 'markerConfig'); - FStyle := TExtObject.CreateInternal(Self, 'style'); + FCache := TExtObject.CreateInternal(Self, 'cache'); end; -{$IFDEF FPC}constructor TExtChartSeriesScatter.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtDataProxyWebStorage.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtChartSeriesScatter.Create; begin +function TExtDataProxyWebStorage.Clear : TExtFunction; begin + JSCode(JSName + '.clear();', 'TExtDataProxyWebStorage'); + Result := Self; +end; + +constructor TExtDataProxyWebStorage.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -function TExtChartSeriesScatter.DrawSeries : TExtFunction; begin - JSCode(JSName + '.drawSeries();', 'TExtChartSeriesScatter'); +function TExtDataProxyWebStorage.SetRecord(RecordJS : TExtDataModel; Id : String = '') : TExtFunction; begin + JSCode(JSName + '.setRecord(' + VarToJSON([RecordJS, false, Id]) + ');', 'TExtDataProxyWebStorage'); Result := Self; end; -destructor TExtChartSeriesScatter.Destroy; begin +destructor TExtDataProxyWebStorage.Destroy; begin try - FMarkerConfig.Free; - FStyle.Free; + FCache.Free; except end; inherited; end; -function TExtChartTipSurface.JSClassName : string; begin - Result := 'Ext.chart.TipSurface'; +function TExtGridFeatureRowBody.JSClassName : string; begin + Result := 'Ext.grid.feature.RowBody'; end; -{$IFDEF FPC}constructor TExtChartTipSurface.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtGridFeatureRowBody.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtLayoutContainerBox.SetFDefaultMargins(Value : TExtObject); begin - FDefaultMargins := Value; - Value.DeleteFromGarbage; - JSCode('defaultMargins:' + VarToJSON([Value, false])); +function TExtGridFeatureRowBody.SetupRowData(Data : TExtObject; Idx : Integer; RecordJS : TExtDataModel; Orig : TExtObject) : TExtFunction; begin + JSCode(JSName + '.setupRowData(' + VarToJSON([Data, false, Idx, RecordJS, false, Orig, false]) + ');', 'TExtGridFeatureRowBody'); + Result := Self; end; -procedure TExtLayoutContainerBox.SetFFlex(Value : Integer); begin - FFlex := Value; - JSCode('flex:' + VarToJSON([Value])); +function TExtGridFeatureRowWrap.JSClassName : string; begin + Result := 'Ext.grid.feature.RowWrap'; end; -procedure TExtLayoutContainerBox.SetFPack(Value : String); begin - FPack := Value; - JSCode('pack:' + VarToJSON([Value])); +{$IFDEF FPC}constructor TExtGridFeatureRowWrap.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +procedure TExtView.SetFMouseOverOutBuffer(Value : Integer); begin + FMouseOverOutBuffer := Value; + JSCode('mouseOverOutBuffer:' + VarToJSON([Value])); end; -procedure TExtLayoutContainerBox.SetFPadding(Value : String); begin - FPadding := Value; - JSCode('padding:' + VarToJSON([Value])); +procedure TExtView.SetFOnBeforecontainerclick(Value : TExtViewOnBeforecontainerclick); begin + if Assigned(FOnBeforecontainerclick) then + JSCode(JSName+'.events ["beforecontainerclick"].listeners=[];'); + if Assigned(Value) then + AddListener('beforecontainerclick', Ajax('beforecontainerclick', ['This', '%0.nm','E', '%1.nm'], true)); + FOnBeforecontainerclick := Value; +end; + +procedure TExtView.SetFOnBeforecontainercontextmenu(Value : TExtViewOnBeforecontainercontextmenu); begin + if Assigned(FOnBeforecontainercontextmenu) then + JSCode(JSName+'.events ["beforecontainercontextmenu"].listeners=[];'); + if Assigned(Value) then + AddListener('beforecontainercontextmenu', Ajax('beforecontainercontextmenu', ['This', '%0.nm','E', '%1.nm'], true)); + FOnBeforecontainercontextmenu := Value; +end; + +procedure TExtView.SetFOnBeforecontainerdblclick(Value : TExtViewOnBeforecontainerdblclick); begin + if Assigned(FOnBeforecontainerdblclick) then + JSCode(JSName+'.events ["beforecontainerdblclick"].listeners=[];'); + if Assigned(Value) then + AddListener('beforecontainerdblclick', Ajax('beforecontainerdblclick', ['This', '%0.nm','E', '%1.nm'], true)); + FOnBeforecontainerdblclick := Value; +end; + +procedure TExtView.SetFOnBeforecontainerkeydown(Value : TExtViewOnBeforecontainerkeydown); begin + if Assigned(FOnBeforecontainerkeydown) then + JSCode(JSName+'.events ["beforecontainerkeydown"].listeners=[];'); + if Assigned(Value) then + AddListener('beforecontainerkeydown', Ajax('beforecontainerkeydown', ['This', '%0.nm','E', '%1.nm'], true)); + FOnBeforecontainerkeydown := Value; +end; + +procedure TExtView.SetFOnBeforecontainermousedown(Value : TExtViewOnBeforecontainermousedown); begin + if Assigned(FOnBeforecontainermousedown) then + JSCode(JSName+'.events ["beforecontainermousedown"].listeners=[];'); + if Assigned(Value) then + AddListener('beforecontainermousedown', Ajax('beforecontainermousedown', ['This', '%0.nm','E', '%1.nm'], true)); + FOnBeforecontainermousedown := Value; end; -procedure TExtLayoutContainerBox.SetFStretchMaxPartner(Value : String); begin - FStretchMaxPartner := Value; - JSCode('stretchMaxPartner:' + VarToJSON([Value])); +procedure TExtView.SetFOnBeforecontainermouseout(Value : TExtViewOnBeforecontainermouseout); begin + if Assigned(FOnBeforecontainermouseout) then + JSCode(JSName+'.events ["beforecontainermouseout"].listeners=[];'); + if Assigned(Value) then + AddListener('beforecontainermouseout', Ajax('beforecontainermouseout', ['This', '%0.nm','E', '%1.nm'], true)); + FOnBeforecontainermouseout := Value; end; -procedure TExtLayoutContainerBox.SetFStretchMaxPartnerComponent(Value : TExtComponent); begin - FStretchMaxPartnerComponent := Value; - Value.DeleteFromGarbage; - JSCode('stretchMaxPartner:' + VarToJSON([Value, false])); +procedure TExtView.SetFOnBeforecontainermouseover(Value : TExtViewOnBeforecontainermouseover); begin + if Assigned(FOnBeforecontainermouseover) then + JSCode(JSName+'.events ["beforecontainermouseover"].listeners=[];'); + if Assigned(Value) then + AddListener('beforecontainermouseover', Ajax('beforecontainermouseover', ['This', '%0.nm','E', '%1.nm'], true)); + FOnBeforecontainermouseover := Value; end; -function TExtLayoutContainerBox.JSClassName : string; begin - Result := 'Ext.layout.container.Box'; +procedure TExtView.SetFOnBeforecontainermouseup(Value : TExtViewOnBeforecontainermouseup); begin + if Assigned(FOnBeforecontainermouseup) then + JSCode(JSName+'.events ["beforecontainermouseup"].listeners=[];'); + if Assigned(Value) then + AddListener('beforecontainermouseup', Ajax('beforecontainermouseup', ['This', '%0.nm','E', '%1.nm'], true)); + FOnBeforecontainermouseup := Value; end; -procedure TExtLayoutContainerBox.InitDefaults; begin - inherited; - FDefaultMargins := TExtObject.CreateInternal(Self, 'defaultMargins'); - FStretchMaxPartnerComponent := TExtComponent.CreateInternal(Self, 'stretchMaxPartner'); +procedure TExtView.SetFOnBeforeitemclick(Value : TExtViewOnBeforeitemclick); begin + if Assigned(FOnBeforeitemclick) then + JSCode(JSName+'.events ["beforeitemclick"].listeners=[];'); + if Assigned(Value) then + AddListener('beforeitemclick', Ajax('beforeitemclick', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); + FOnBeforeitemclick := Value; end; -{$IFDEF FPC}constructor TExtLayoutContainerBox.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtLayoutContainerBox.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtView.SetFOnBeforeitemcontextmenu(Value : TExtViewOnBeforeitemcontextmenu); begin + if Assigned(FOnBeforeitemcontextmenu) then + JSCode(JSName+'.events ["beforeitemcontextmenu"].listeners=[];'); + if Assigned(Value) then + AddListener('beforeitemcontextmenu', Ajax('beforeitemcontextmenu', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); + FOnBeforeitemcontextmenu := Value; end; -destructor TExtLayoutContainerBox.Destroy; begin - try - FDefaultMargins.Free; - FStretchMaxPartnerComponent.Free; - except end; - inherited; +procedure TExtView.SetFOnBeforeitemdblclick(Value : TExtViewOnBeforeitemdblclick); begin + if Assigned(FOnBeforeitemdblclick) then + JSCode(JSName+'.events ["beforeitemdblclick"].listeners=[];'); + if Assigned(Value) then + AddListener('beforeitemdblclick', Ajax('beforeitemdblclick', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); + FOnBeforeitemdblclick := Value; end; -procedure TExtLayoutContainerTable.SetFColumns(Value : Integer); begin - FColumns := Value; - JSCode('columns:' + VarToJSON([Value])); +procedure TExtView.SetFOnBeforeitemkeydown(Value : TExtViewOnBeforeitemkeydown); begin + if Assigned(FOnBeforeitemkeydown) then + JSCode(JSName+'.events ["beforeitemkeydown"].listeners=[];'); + if Assigned(Value) then + AddListener('beforeitemkeydown', Ajax('beforeitemkeydown', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); + FOnBeforeitemkeydown := Value; end; -procedure TExtLayoutContainerTable.SetFTableAttrs(Value : TExtObject); begin - FTableAttrs := Value; - Value.DeleteFromGarbage; - JSCode('tableAttrs:' + VarToJSON([Value, false])); +procedure TExtView.SetFOnBeforeitemmousedown(Value : TExtViewOnBeforeitemmousedown); begin + if Assigned(FOnBeforeitemmousedown) then + JSCode(JSName+'.events ["beforeitemmousedown"].listeners=[];'); + if Assigned(Value) then + AddListener('beforeitemmousedown', Ajax('beforeitemmousedown', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); + FOnBeforeitemmousedown := Value; end; -procedure TExtLayoutContainerTable.SetFTdAttrs(Value : TExtObject); begin - FTdAttrs := Value; - Value.DeleteFromGarbage; - JSCode('tdAttrs:' + VarToJSON([Value, false])); +procedure TExtView.SetFOnBeforeitemmouseenter(Value : TExtViewOnBeforeitemmouseenter); begin + if Assigned(FOnBeforeitemmouseenter) then + JSCode(JSName+'.events ["beforeitemmouseenter"].listeners=[];'); + if Assigned(Value) then + AddListener('beforeitemmouseenter', Ajax('beforeitemmouseenter', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); + FOnBeforeitemmouseenter := Value; end; -procedure TExtLayoutContainerTable.SetFTrAttrs(Value : TExtObject); begin - FTrAttrs := Value; - Value.DeleteFromGarbage; - JSCode('trAttrs:' + VarToJSON([Value, false])); +procedure TExtView.SetFOnBeforeitemmouseleave(Value : TExtViewOnBeforeitemmouseleave); begin + if Assigned(FOnBeforeitemmouseleave) then + JSCode(JSName+'.events ["beforeitemmouseleave"].listeners=[];'); + if Assigned(Value) then + AddListener('beforeitemmouseleave', Ajax('beforeitemmouseleave', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); + FOnBeforeitemmouseleave := Value; end; -function TExtLayoutContainerTable.JSClassName : string; begin - Result := 'Ext.layout.container.Table'; +procedure TExtView.SetFOnBeforeitemmouseup(Value : TExtViewOnBeforeitemmouseup); begin + if Assigned(FOnBeforeitemmouseup) then + JSCode(JSName+'.events ["beforeitemmouseup"].listeners=[];'); + if Assigned(Value) then + AddListener('beforeitemmouseup', Ajax('beforeitemmouseup', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); + FOnBeforeitemmouseup := Value; end; -procedure TExtLayoutContainerTable.InitDefaults; begin - inherited; - FTableAttrs := TExtObject.CreateInternal(Self, 'tableAttrs'); - FTdAttrs := TExtObject.CreateInternal(Self, 'tdAttrs'); - FTrAttrs := TExtObject.CreateInternal(Self, 'trAttrs'); +procedure TExtView.SetFOnContainerclick(Value : TExtViewOnContainerclick); begin + if Assigned(FOnContainerclick) then + JSCode(JSName+'.events ["containerclick"].listeners=[];'); + if Assigned(Value) then + AddListener('containerclick', Ajax('containerclick', ['This', '%0.nm','E', '%1.nm'], true)); + FOnContainerclick := Value; end; -{$IFDEF FPC}constructor TExtLayoutContainerTable.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtLayoutContainerTable.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtView.SetFOnContainercontextmenu(Value : TExtViewOnContainercontextmenu); begin + if Assigned(FOnContainercontextmenu) then + JSCode(JSName+'.events ["containercontextmenu"].listeners=[];'); + if Assigned(Value) then + AddListener('containercontextmenu', Ajax('containercontextmenu', ['This', '%0.nm','E', '%1.nm'], true)); + FOnContainercontextmenu := Value; end; -destructor TExtLayoutContainerTable.Destroy; begin - try - FTableAttrs.Free; - FTdAttrs.Free; - FTrAttrs.Free; - except end; - inherited; +procedure TExtView.SetFOnContainerdblclick(Value : TExtViewOnContainerdblclick); begin + if Assigned(FOnContainerdblclick) then + JSCode(JSName+'.events ["containerdblclick"].listeners=[];'); + if Assigned(Value) then + AddListener('containerdblclick', Ajax('containerdblclick', ['This', '%0.nm','E', '%1.nm'], true)); + FOnContainerdblclick := Value; end; -function TExtLayoutContainerForm.JSClassName : string; begin - Result := 'Ext.layout.container.Form'; +procedure TExtView.SetFOnContainerkeydown(Value : TExtViewOnContainerkeydown); begin + if Assigned(FOnContainerkeydown) then + JSCode(JSName+'.events ["containerkeydown"].listeners=[];'); + if Assigned(Value) then + AddListener('containerkeydown', Ajax('containerkeydown', ['This', '%0.nm','E', '%1.nm'], true)); + FOnContainerkeydown := Value; end; -{$IFDEF FPC}constructor TExtLayoutContainerForm.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtLayoutContainerForm.CalculateOverflow(OwnerContext : TExtLayoutContextItem; ContainerSize : TExtObject; Dimensions : Integer) : TExtFunction; begin - JSCode(JSName + '.calculateOverflow(' + VarToJSON([OwnerContext, false, ContainerSize, false, Dimensions]) + ');', 'TExtLayoutContainerForm'); - Result := Self; +procedure TExtView.SetFOnContainermouseout(Value : TExtViewOnContainermouseout); begin + if Assigned(FOnContainermouseout) then + JSCode(JSName+'.events ["containermouseout"].listeners=[];'); + if Assigned(Value) then + AddListener('containermouseout', Ajax('containermouseout', ['This', '%0.nm','E', '%1.nm'], true)); + FOnContainermouseout := Value; end; -function TExtLayoutContainerForm.DoRenderPadder : TExtFunction; begin - JSCode(JSName + '.doRenderPadder();', 'TExtLayoutContainerForm'); - Result := Self; +procedure TExtView.SetFOnContainermouseover(Value : TExtViewOnContainermouseover); begin + if Assigned(FOnContainermouseover) then + JSCode(JSName+'.events ["containermouseover"].listeners=[];'); + if Assigned(Value) then + AddListener('containermouseover', Ajax('containermouseover', ['This', '%0.nm','E', '%1.nm'], true)); + FOnContainermouseover := Value; end; -procedure TExtMenuSeparator.SetFSeparatorCls(Value : String); begin - FSeparatorCls := Value; - JSCode('separatorCls:' + VarToJSON([Value])); +procedure TExtView.SetFOnContainermouseup(Value : TExtViewOnContainermouseup); begin + if Assigned(FOnContainermouseup) then + JSCode(JSName+'.events ["containermouseup"].listeners=[];'); + if Assigned(Value) then + AddListener('containermouseup', Ajax('containermouseup', ['This', '%0.nm','E', '%1.nm'], true)); + FOnContainermouseup := Value; end; -function TExtMenuSeparator.JSClassName : string; begin - Result := 'Ext.menu.Separator'; +procedure TExtView.SetFOnHighlightitem(Value : TExtViewOnHighlightitem); begin + if Assigned(FOnHighlightitem) then + JSCode(JSName+'.events ["highlightitem"].listeners=[];'); + if Assigned(Value) then + AddListener('highlightitem', Ajax('highlightitem', ['View', '%0.nm','Node', '%1.nm'], true)); + FOnHighlightitem := Value; end; -{$IFDEF FPC}constructor TExtMenuSeparator.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtResizerBorderSplitter.JSClassName : string; begin - Result := 'Ext.resizer.BorderSplitter'; +procedure TExtView.SetFOnItemclick(Value : TExtViewOnItemclick); begin + if Assigned(FOnItemclick) then + JSCode(JSName+'.events ["itemclick"].listeners=[];'); + if Assigned(Value) then + AddListener('itemclick', Ajax('itemclick', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); + FOnItemclick := Value; end; -{$IFDEF FPC}constructor TExtResizerBorderSplitter.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDataErrors.JSClassName : string; begin - Result := 'Ext.data.Errors'; +procedure TExtView.SetFOnItemcontextmenu(Value : TExtViewOnItemcontextmenu); begin + if Assigned(FOnItemcontextmenu) then + JSCode(JSName+'.events ["itemcontextmenu"].listeners=[];'); + if Assigned(Value) then + AddListener('itemcontextmenu', Ajax('itemcontextmenu', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); + FOnItemcontextmenu := Value; end; -{$IFDEF FPC}constructor TExtDataErrors.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDataErrors.GetByField(FieldName : String) : TExtFunction; begin - JSCode(JSName + '.getByField(' + VarToJSON([FieldName]) + ');', 'TExtDataErrors'); - Result := Self; +procedure TExtView.SetFOnItemdblclick(Value : TExtViewOnItemdblclick); begin + if Assigned(FOnItemdblclick) then + JSCode(JSName+'.events ["itemdblclick"].listeners=[];'); + if Assigned(Value) then + AddListener('itemdblclick', Ajax('itemdblclick', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); + FOnItemdblclick := Value; end; -function TExtDataErrors.IsValid : TExtFunction; begin - JSCode(JSName + '.isValid();', 'TExtDataErrors'); - Result := Self; +procedure TExtView.SetFOnItemkeydown(Value : TExtViewOnItemkeydown); begin + if Assigned(FOnItemkeydown) then + JSCode(JSName+'.events ["itemkeydown"].listeners=[];'); + if Assigned(Value) then + AddListener('itemkeydown', Ajax('itemkeydown', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); + FOnItemkeydown := Value; end; -function TExtResizerBorderSplitterTracker.JSClassName : string; begin - Result := 'Ext.resizer.BorderSplitterTracker'; +procedure TExtView.SetFOnItemmousedown(Value : TExtViewOnItemmousedown); begin + if Assigned(FOnItemmousedown) then + JSCode(JSName+'.events ["itemmousedown"].listeners=[];'); + if Assigned(Value) then + AddListener('itemmousedown', Ajax('itemmousedown', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); + FOnItemmousedown := Value; end; -{$IFDEF FPC}constructor TExtResizerBorderSplitterTracker.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtMenuCheckItem.SetFCheckChangeDisabled(Value : Boolean); begin - FCheckChangeDisabled := Value; - JSCode('checkChangeDisabled:' + VarToJSON([Value])); +procedure TExtView.SetFOnItemmouseenter(Value : TExtViewOnItemmouseenter); begin + if Assigned(FOnItemmouseenter) then + JSCode(JSName+'.events ["itemmouseenter"].listeners=[];'); + if Assigned(Value) then + AddListener('itemmouseenter', Ajax('itemmouseenter', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); + FOnItemmouseenter := Value; end; -procedure TExtMenuCheckItem.SetFChecked(Value : Boolean); begin - FChecked := Value; - if not ConfigAvailable(JSName) then - SetChecked(Value) - else - JSCode('checked:' + VarToJSON([Value])); +procedure TExtView.SetFOnItemmouseleave(Value : TExtViewOnItemmouseleave); begin + if Assigned(FOnItemmouseleave) then + JSCode(JSName+'.events ["itemmouseleave"].listeners=[];'); + if Assigned(Value) then + AddListener('itemmouseleave', Ajax('itemmouseleave', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); + FOnItemmouseleave := Value; end; -procedure TExtMenuCheckItem.SetFCheckedCls(Value : String); begin - FCheckedCls := Value; - JSCode('checkedCls:' + VarToJSON([Value])); +procedure TExtView.SetFOnItemmouseup(Value : TExtViewOnItemmouseup); begin + if Assigned(FOnItemmouseup) then + JSCode(JSName+'.events ["itemmouseup"].listeners=[];'); + if Assigned(Value) then + AddListener('itemmouseup', Ajax('itemmouseup', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); + FOnItemmouseup := Value; end; -procedure TExtMenuCheckItem.SetFCheckHandler(Value : TExtFunction); begin - FCheckHandler := Value; - JSCode('checkHandler:' + VarToJSON([Value, true])); +procedure TExtView.SetFOnUnhighlightitem(Value : TExtViewOnUnhighlightitem); begin + if Assigned(FOnUnhighlightitem) then + JSCode(JSName+'.events ["unhighlightitem"].listeners=[];'); + if Assigned(Value) then + AddListener('unhighlightitem', Ajax('unhighlightitem', ['View', '%0.nm','Node', '%1.nm'], true)); + FOnUnhighlightitem := Value; end; -procedure TExtMenuCheckItem.SetFGroup(Value : String); begin - FGroup := Value; - JSCode('group:' + VarToJSON([Value])); +function TExtView.JSClassName : string; begin + Result := 'Ext.view.View'; end; -procedure TExtMenuCheckItem.SetFGroupCls(Value : String); begin - FGroupCls := Value; - JSCode('groupCls:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtView.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtMenuCheckItem.SetFHideOnClick(Value : Boolean); begin - FHideOnClick := Value; - JSCode('hideOnClick:' + VarToJSON([Value])); +function TExtView.ClearHighlight : TExtFunction; begin + JSCode(JSName + '.clearHighlight();', 'TExtView'); + Result := Self; end; -procedure TExtMenuCheckItem.SetFScope(Value : TExtObject); begin - FScope := Value; - Value.DeleteFromGarbage; - JSCode('scope:' + VarToJSON([Value, false])); +function TExtView.FocusNode(Rec : TExtDataModel) : TExtFunction; begin + JSCode(JSName + '.focusNode(' + VarToJSON([Rec, false]) + ');', 'TExtView'); + Result := Self; end; -procedure TExtMenuCheckItem.SetFUncheckedCls(Value : String); begin - FUncheckedCls := Value; - JSCode('uncheckedCls:' + VarToJSON([Value])); +function TExtView.HighlightItem(Item : THTMLElement) : TExtFunction; begin + JSCode(JSName + '.highlightItem(' + VarToJSON([Item, false]) + ');', 'TExtView'); + Result := Self; end; -procedure TExtMenuCheckItem.SetFOnBeforecheckchange(Value : TExtMenuCheckItemOnBeforecheckchange); begin - if Assigned(FOnBeforecheckchange) then - JSCode(JSName+'.events ["beforecheckchange"].listeners=[];'); - if Assigned(Value) then - AddListener('beforecheckchange', Ajax('beforecheckchange', ['This', '%0.nm','Checked', '%1'], true)); - FOnBeforecheckchange := Value; +procedure TExtView.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'beforecontainerclick') and Assigned(FOnBeforecontainerclick) then + FOnBeforecontainerclick(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'beforecontainercontextmenu') and Assigned(FOnBeforecontainercontextmenu) then + FOnBeforecontainercontextmenu(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'beforecontainerdblclick') and Assigned(FOnBeforecontainerdblclick) then + FOnBeforecontainerdblclick(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'beforecontainerkeydown') and Assigned(FOnBeforecontainerkeydown) then + FOnBeforecontainerkeydown(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'beforecontainermousedown') and Assigned(FOnBeforecontainermousedown) then + FOnBeforecontainermousedown(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'beforecontainermouseout') and Assigned(FOnBeforecontainermouseout) then + FOnBeforecontainermouseout(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'beforecontainermouseover') and Assigned(FOnBeforecontainermouseover) then + FOnBeforecontainermouseover(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'beforecontainermouseup') and Assigned(FOnBeforecontainermouseup) then + FOnBeforecontainermouseup(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'beforeitemclick') and Assigned(FOnBeforeitemclick) then + FOnBeforeitemclick(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'beforeitemcontextmenu') and Assigned(FOnBeforeitemcontextmenu) then + FOnBeforeitemcontextmenu(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'beforeitemdblclick') and Assigned(FOnBeforeitemdblclick) then + FOnBeforeitemdblclick(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'beforeitemkeydown') and Assigned(FOnBeforeitemkeydown) then + FOnBeforeitemkeydown(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'beforeitemmousedown') and Assigned(FOnBeforeitemmousedown) then + FOnBeforeitemmousedown(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'beforeitemmouseenter') and Assigned(FOnBeforeitemmouseenter) then + FOnBeforeitemmouseenter(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'beforeitemmouseleave') and Assigned(FOnBeforeitemmouseleave) then + FOnBeforeitemmouseleave(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'beforeitemmouseup') and Assigned(FOnBeforeitemmouseup) then + FOnBeforeitemmouseup(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'containerclick') and Assigned(FOnContainerclick) then + FOnContainerclick(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'containercontextmenu') and Assigned(FOnContainercontextmenu) then + FOnContainercontextmenu(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'containerdblclick') and Assigned(FOnContainerdblclick) then + FOnContainerdblclick(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'containerkeydown') and Assigned(FOnContainerkeydown) then + FOnContainerkeydown(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'containermouseout') and Assigned(FOnContainermouseout) then + FOnContainermouseout(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'containermouseover') and Assigned(FOnContainermouseover) then + FOnContainermouseover(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'containermouseup') and Assigned(FOnContainermouseup) then + FOnContainermouseup(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'highlightitem') and Assigned(FOnHighlightitem) then + FOnHighlightitem(TExtView(ParamAsObject('View')), TExtElement(ParamAsObject('Node'))) + else if (AEvtName = 'itemclick') and Assigned(FOnItemclick) then + FOnItemclick(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'itemcontextmenu') and Assigned(FOnItemcontextmenu) then + FOnItemcontextmenu(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'itemdblclick') and Assigned(FOnItemdblclick) then + FOnItemdblclick(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'itemkeydown') and Assigned(FOnItemkeydown) then + FOnItemkeydown(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'itemmousedown') and Assigned(FOnItemmousedown) then + FOnItemmousedown(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'itemmouseenter') and Assigned(FOnItemmouseenter) then + FOnItemmouseenter(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'itemmouseleave') and Assigned(FOnItemmouseleave) then + FOnItemmouseleave(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'itemmouseup') and Assigned(FOnItemmouseup) then + FOnItemmouseup(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'unhighlightitem') and Assigned(FOnUnhighlightitem) then + FOnUnhighlightitem(TExtView(ParamAsObject('View')), TExtElement(ParamAsObject('Node'))); end; -procedure TExtMenuCheckItem.SetFOnCheckchange(Value : TExtMenuCheckItemOnCheckchange); begin - if Assigned(FOnCheckchange) then - JSCode(JSName+'.events ["checkchange"].listeners=[];'); - if Assigned(Value) then - AddListener('checkchange', Ajax('checkchange', ['This', '%0.nm','Checked', '%1'], true)); - FOnCheckchange := Value; +procedure TExtGridFeatureGrouping.SetFCollapsible(Value : Boolean); begin + FCollapsible := Value; + JSCode('collapsible:' + VarToJSON([Value])); end; -function TExtMenuCheckItem.JSClassName : string; begin - Result := 'Ext.menu.CheckItem'; +procedure TExtGridFeatureGrouping.SetFDepthToIndent(Value : Integer); begin + FDepthToIndent := Value; + JSCode('depthToIndent:' + VarToJSON([Value])); end; -procedure TExtMenuCheckItem.InitDefaults; begin - inherited; - FHideOnClick := true; - FScope := TExtObject.CreateInternal(Self, 'scope'); +procedure TExtGridFeatureGrouping.SetFEnableGroupingMenu(Value : Boolean); begin + FEnableGroupingMenu := Value; + JSCode('enableGroupingMenu:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtMenuCheckItem.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtMenuCheckItem.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtGridFeatureGrouping.SetFEnableNoGroups(Value : Boolean); begin + FEnableNoGroups := Value; + JSCode('enableNoGroups:' + VarToJSON([Value])); end; -function TExtMenuCheckItem.DisableCheckChange : TExtFunction; begin - JSCode(JSName + '.disableCheckChange();', 'TExtMenuCheckItem'); - Result := Self; +procedure TExtGridFeatureGrouping.SetFGroupByText(Value : String); begin + FGroupByText := Value; + JSCode('groupByText:' + VarToJSON([Value])); end; -function TExtMenuCheckItem.EnableCheckChange : TExtFunction; begin - JSCode(JSName + '.enableCheckChange();', 'TExtMenuCheckItem'); - Result := Self; +procedure TExtGridFeatureGrouping.SetFGroupHeaderTpl(Value : String); begin + FGroupHeaderTpl := Value; + JSCode('groupHeaderTpl:' + VarToJSON([Value])); end; -function TExtMenuCheckItem.SetChecked(Checked : Boolean; SuppressEvents : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.setChecked(' + VarToJSON([Checked, SuppressEvents]) + ');', 'TExtMenuCheckItem'); - Result := Self; +procedure TExtGridFeatureGrouping.SetFGroupHeaderTplList(Value : TExtObjectList); begin + FGroupHeaderTplList := Value; + Value.DeleteFromGarbage; + JSCode('groupHeaderTpl:' + VarToJSON([Value, false])); end; -destructor TExtMenuCheckItem.Destroy; begin - try - FScope.Free; - except end; - inherited; +procedure TExtGridFeatureGrouping.SetFGroupHeaderTplTemplate(Value : TExtTemplate); begin + FGroupHeaderTplTemplate := Value; + Value.DeleteFromGarbage; + JSCode('groupHeaderTpl:' + VarToJSON([Value, false])); end; -procedure TExtMenuCheckItem.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'beforecheckchange') and Assigned(FOnBeforecheckchange) then - FOnBeforecheckchange(TExtMenuCheckItem(ParamAsObject('This')), ParamAsBoolean('Checked')) - else if (AEvtName = 'checkchange') and Assigned(FOnCheckchange) then - FOnCheckchange(TExtMenuCheckItem(ParamAsObject('This')), ParamAsBoolean('Checked')); +procedure TExtGridFeatureGrouping.SetFHideGroupedHeader(Value : Boolean); begin + FHideGroupedHeader := Value; + JSCode('hideGroupedHeader:' + VarToJSON([Value])); end; -procedure TExtLayoutContainerCheckboxGroup.SetFAutoFlex(Value : Boolean); begin - FAutoFlex := Value; - JSCode('autoFlex:' + VarToJSON([Value])); +procedure TExtGridFeatureGrouping.SetFRemoteRoot(Value : String); begin + FRemoteRoot := Value; + JSCode('remoteRoot:' + VarToJSON([Value])); end; -function TExtLayoutContainerCheckboxGroup.JSClassName : string; begin - Result := 'Ext.layout.container.CheckboxGroup'; +procedure TExtGridFeatureGrouping.SetFShowGroupsText(Value : String); begin + FShowGroupsText := Value; + JSCode('showGroupsText:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtLayoutContainerCheckboxGroup.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtChartSeriesArea.SetFStyle(Value : TExtObject); begin - FStyle := Value; - Value.DeleteFromGarbage; - JSCode('style:' + VarToJSON([Value, false])); +procedure TExtGridFeatureGrouping.SetFStartCollapsed(Value : Boolean); begin + FStartCollapsed := Value; + JSCode('startCollapsed:' + VarToJSON([Value])); end; -function TExtChartSeriesArea.JSClassName : string; begin - Result := 'Ext.chart.series.Area'; +function TExtGridFeatureGrouping.JSClassName : string; begin + Result := 'Ext.grid.feature.Grouping'; end; -procedure TExtChartSeriesArea.InitDefaults; begin +procedure TExtGridFeatureGrouping.InitDefaults; begin inherited; - FStyle := TExtObject.CreateInternal(Self, 'style'); + FGroupHeaderTplList := TExtObjectList.Create(Self, 'groupHeaderTpl'); + FGroupHeaderTplTemplate := TExtTemplate.CreateInternal(Self, 'groupHeaderTpl'); end; -{$IFDEF FPC}constructor TExtChartSeriesArea.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtGridFeatureGrouping.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtChartSeriesArea.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +function TExtGridFeatureGrouping.Collapse(GroupName : String; Focus : Boolean) : TExtFunction; begin + JSCode(JSName + '.collapse(' + VarToJSON([GroupName, Focus]) + ');', 'TExtGridFeatureGrouping'); + Result := Self; end; -function TExtChartSeriesArea.DrawSeries : TExtFunction; begin - JSCode(JSName + '.drawSeries();', 'TExtChartSeriesArea'); +function TExtGridFeatureGrouping.CollapseAll : TExtFunction; begin + JSCode(JSName + '.collapseAll();', 'TExtGridFeatureGrouping'); Result := Self; end; -function TExtChartSeriesArea.GetLegendColor(Item : TExtObject) : TExtFunction; begin - JSCode(JSName + '.getLegendColor(' + VarToJSON([Item, false]) + ');', 'TExtChartSeriesArea'); - Result := Self; +constructor TExtGridFeatureGrouping.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -function TExtChartSeriesArea.HighlightItem(Info : TExtObject) : TExtFunction; begin - JSCode(JSName + '.highlightItem(' + VarToJSON([Info, false]) + ');', 'TExtChartSeriesArea'); +function TExtGridFeatureGrouping.Expand(GroupName : String; Focus : Boolean) : TExtFunction; begin + JSCode(JSName + '.expand(' + VarToJSON([GroupName, Focus]) + ');', 'TExtGridFeatureGrouping'); Result := Self; end; -function TExtChartSeriesArea.HighlightSeries(Item : TExtObject) : TExtFunction; begin - JSCode(JSName + '.highlightSeries(' + VarToJSON([Item, false]) + ');', 'TExtChartSeriesArea'); +function TExtGridFeatureGrouping.ExpandAll : TExtFunction; begin + JSCode(JSName + '.expandAll();', 'TExtGridFeatureGrouping'); Result := Self; end; -function TExtChartSeriesArea.UnHighlightItem(Item : TExtObject) : TExtFunction; begin - JSCode(JSName + '.unHighlightItem(' + VarToJSON([Item, false]) + ');', 'TExtChartSeriesArea'); +function TExtGridFeatureGrouping.GetRecordGroup(RecordJS : TExtDataModel) : TExtFunction; begin + JSCode(JSName + '.getRecordGroup(' + VarToJSON([RecordJS, false]) + ');', 'TExtGridFeatureGrouping'); Result := Self; end; -function TExtChartSeriesArea.UnHighlightSeries(Item : TExtObject) : TExtFunction; begin - JSCode(JSName + '.unHighlightSeries(' + VarToJSON([Item, false]) + ');', 'TExtChartSeriesArea'); +function TExtGridFeatureGrouping.IsExpanded(GroupName : String) : TExtFunction; begin + JSCode(JSName + '.isExpanded(' + VarToJSON([GroupName]) + ');', 'TExtGridFeatureGrouping'); Result := Self; end; -destructor TExtChartSeriesArea.Destroy; begin +destructor TExtGridFeatureGrouping.Destroy; begin try - FStyle.Free; + FGroupHeaderTplList.Free; + FGroupHeaderTplTemplate.Free; except end; inherited; end; -function TExtContainer.JSClassName : string; begin - Result := 'Ext.container.Container'; +function TExtToolbarSeparator.JSClassName : string; begin + Result := 'Ext.toolbar.Separator'; end; -{$IFDEF FPC}constructor TExtContainer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtToolbarSeparator.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtContainer.GetChildByElement(El : String; Deep : Boolean) : TExtFunction; begin - JSCode(JSName + '.getChildByElement(' + VarToJSON([El, Deep]) + ');', 'TExtContainer'); - Result := Self; +function TExtDirectExceptionEvent.JSClassName : string; begin + Result := 'Ext.direct.ExceptionEvent'; end; -procedure TExtChartSeriesBar.SetFColumn(Value : Boolean); begin - FColumn := Value; - JSCode('column:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtDirectExceptionEvent.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtChartSeriesBar.SetFGroupGutter(Value : Integer); begin - FGroupGutter := Value; - JSCode('groupGutter:' + VarToJSON([Value])); +procedure TExtGridFeatureAbstractSummary.SetFRemoteRoot(Value : String); begin + FRemoteRoot := Value; + JSCode('remoteRoot:' + VarToJSON([Value])); end; -procedure TExtChartSeriesBar.SetFGutter(Value : Integer); begin - FGutter := Value; - JSCode('gutter:' + VarToJSON([Value])); +function TExtGridFeatureAbstractSummary.JSClassName : string; begin + Result := 'Ext.grid.feature.AbstractSummary'; end; -procedure TExtChartSeriesBar.SetFStacked(Value : Boolean); begin - FStacked := Value; - JSCode('stacked:' + VarToJSON([Value])); +{$IFDEF FPC}constructor TExtGridFeatureAbstractSummary.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtFormRadioManagerSingleton.JSClassName : string; begin + Result := 'Ext.form.RadioManager'; end; -procedure TExtChartSeriesBar.SetFXPadding(Value : Integer); begin - FXPadding := Value; - JSCode('xPadding:' + VarToJSON([Value])); +{$IFDEF FPC}constructor TExtFormRadioManagerSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +procedure TExtDataTreeStore.SetFClearOnLoad(Value : Boolean); begin + FClearOnLoad := Value; + JSCode('clearOnLoad:' + VarToJSON([Value])); end; -procedure TExtChartSeriesBar.SetFXPaddingObject(Value : TExtObject); begin - FXPaddingObject := Value; - Value.DeleteFromGarbage; - JSCode('xPadding:' + VarToJSON([Value, false])); +procedure TExtDataTreeStore.SetFClearRemovedOnLoad(Value : Boolean); begin + FClearRemovedOnLoad := Value; + JSCode('clearRemovedOnLoad:' + VarToJSON([Value])); end; -procedure TExtChartSeriesBar.SetFYPadding(Value : Integer); begin - FYPadding := Value; - JSCode('yPadding:' + VarToJSON([Value])); +procedure TExtDataTreeStore.SetFDefaultRootId(Value : String); begin + FDefaultRootId := Value; + JSCode('defaultRootId:' + VarToJSON([Value])); end; -procedure TExtChartSeriesBar.SetFYPaddingObject(Value : TExtObject); begin - FYPaddingObject := Value; - Value.DeleteFromGarbage; - JSCode('yPadding:' + VarToJSON([Value, false])); +procedure TExtDataTreeStore.SetFDefaultRootProperty(Value : String); begin + FDefaultRootProperty := Value; + JSCode('defaultRootProperty:' + VarToJSON([Value])); end; -function TExtChartSeriesBar.JSClassName : string; begin - Result := 'Ext.chart.series.Bar'; +procedure TExtDataTreeStore.SetFDefaultRootText(Value : String); begin + FDefaultRootText := Value; + JSCode('defaultRootText:' + VarToJSON([Value])); end; -procedure TExtChartSeriesBar.InitDefaults; begin - inherited; - FXPaddingObject := TExtObject.CreateInternal(Self, 'xPadding'); - FYPaddingObject := TExtObject.CreateInternal(Self, 'yPadding'); +procedure TExtDataTreeStore.SetFFolderSort(Value : Boolean); begin + FFolderSort := Value; + JSCode('folderSort:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtChartSeriesBar.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtDataTreeStore.SetFNodeParam(Value : String); begin + FNodeParam := Value; + JSCode('nodeParam:' + VarToJSON([Value])); +end; -constructor TExtChartSeriesBar.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtDataTreeStore.SetFRoot(Value : TExtDataModel); begin + FRoot := Value; + Value.DeleteFromGarbage; + JSCode('root:' + VarToJSON([Value, false])); end; -function TExtChartSeriesBar.DrawSeries : TExtFunction; begin - JSCode(JSName + '.drawSeries();', 'TExtChartSeriesBar'); - Result := Self; +procedure TExtDataTreeStore.SetFRootInterface(Value : TExtDataNodeInterface); begin + FRootInterface := Value; + Value.DeleteFromGarbage; + JSCode('root:' + VarToJSON([Value, false])); end; -function TExtChartSeriesBar.GetLegendColor : TExtFunction; begin - JSCode(JSName + '.getLegendColor();', 'TExtChartSeriesBar'); - Result := Self; +procedure TExtDataTreeStore.SetFRootObject(Value : TExtObject); begin + FRootObject := Value; + Value.DeleteFromGarbage; + JSCode('root:' + VarToJSON([Value, false])); end; -destructor TExtChartSeriesBar.Destroy; begin - try - FXPaddingObject.Free; - FYPaddingObject.Free; - except end; - inherited; +procedure TExtDataTreeStore.SetFOnAppend(Value : TExtDataTreeStoreOnAppend); begin + if Assigned(FOnAppend) then + JSCode(JSName+'.events ["append"].listeners=[];'); + if Assigned(Value) then + AddListener('append', Ajax('append', [], true)); + FOnAppend := Value; end; -procedure TExtLayoutContainerFit.SetFDefaultMargins(Value : TExtObject); begin - FDefaultMargins := Value; - Value.DeleteFromGarbage; - JSCode('defaultMargins:' + VarToJSON([Value, false])); +procedure TExtDataTreeStore.SetFOnBeforeappend(Value : TExtDataTreeStoreOnBeforeappend); begin + if Assigned(FOnBeforeappend) then + JSCode(JSName+'.events ["beforeappend"].listeners=[];'); + if Assigned(Value) then + AddListener('beforeappend', Ajax('beforeappend', [], true)); + FOnBeforeappend := Value; end; -function TExtLayoutContainerFit.JSClassName : string; begin - Result := 'Ext.layout.container.Fit'; +procedure TExtDataTreeStore.SetFOnBeforecollapse(Value : TExtDataTreeStoreOnBeforecollapse); begin + if Assigned(FOnBeforecollapse) then + JSCode(JSName+'.events ["beforecollapse"].listeners=[];'); + if Assigned(Value) then + AddListener('beforecollapse', Ajax('beforecollapse', [], true)); + FOnBeforecollapse := Value; end; -procedure TExtLayoutContainerFit.InitDefaults; begin - inherited; - FDefaultMargins := TExtObject.CreateInternal(Self, 'defaultMargins'); +procedure TExtDataTreeStore.SetFOnBeforeexpand(Value : TExtDataTreeStoreOnBeforeexpand); begin + if Assigned(FOnBeforeexpand) then + JSCode(JSName+'.events ["beforeexpand"].listeners=[];'); + if Assigned(Value) then + AddListener('beforeexpand', Ajax('beforeexpand', [], true)); + FOnBeforeexpand := Value; end; -{$IFDEF FPC}constructor TExtLayoutContainerFit.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtDataTreeStore.SetFOnBeforeinsert(Value : TExtDataTreeStoreOnBeforeinsert); begin + if Assigned(FOnBeforeinsert) then + JSCode(JSName+'.events ["beforeinsert"].listeners=[];'); + if Assigned(Value) then + AddListener('beforeinsert', Ajax('beforeinsert', [], true)); + FOnBeforeinsert := Value; +end; -constructor TExtLayoutContainerFit.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtDataTreeStore.SetFOnBeforemove(Value : TExtDataTreeStoreOnBeforemove); begin + if Assigned(FOnBeforemove) then + JSCode(JSName+'.events ["beforemove"].listeners=[];'); + if Assigned(Value) then + AddListener('beforemove', Ajax('beforemove', [], true)); + FOnBeforemove := Value; end; -destructor TExtLayoutContainerFit.Destroy; begin - try - FDefaultMargins.Free; - except end; - inherited; +procedure TExtDataTreeStore.SetFOnBeforeremove(Value : TExtDataTreeStoreOnBeforeremove); begin + if Assigned(FOnBeforeremove) then + JSCode(JSName+'.events ["beforeremove"].listeners=[];'); + if Assigned(Value) then + AddListener('beforeremove', Ajax('beforeremove', [], true)); + FOnBeforeremove := Value; end; -procedure TExtChartSeriesLine.SetFFill(Value : Boolean); begin - FFill := Value; - JSCode('fill:' + VarToJSON([Value])); +procedure TExtDataTreeStore.SetFOnCollapse(Value : TExtDataTreeStoreOnCollapse); begin + if Assigned(FOnCollapse) then + JSCode(JSName+'.events ["collapse"].listeners=[];'); + if Assigned(Value) then + AddListener('collapse', Ajax('collapse', [], true)); + FOnCollapse := Value; end; -procedure TExtChartSeriesLine.SetFMarkerConfig(Value : TExtObject); begin - FMarkerConfig := Value; - Value.DeleteFromGarbage; - JSCode('markerConfig:' + VarToJSON([Value, false])); +procedure TExtDataTreeStore.SetFOnExpand(Value : TExtDataTreeStoreOnExpand); begin + if Assigned(FOnExpand) then + JSCode(JSName+'.events ["expand"].listeners=[];'); + if Assigned(Value) then + AddListener('expand', Ajax('expand', [], true)); + FOnExpand := Value; end; -procedure TExtChartSeriesLine.SetFSelectionTolerance(Value : Integer); begin - FSelectionTolerance := Value; - JSCode('selectionTolerance:' + VarToJSON([Value])); +procedure TExtDataTreeStore.SetFOnInsert(Value : TExtDataTreeStoreOnInsert); begin + if Assigned(FOnInsert) then + JSCode(JSName+'.events ["insert"].listeners=[];'); + if Assigned(Value) then + AddListener('insert', Ajax('insert', [], true)); + FOnInsert := Value; end; -procedure TExtChartSeriesLine.SetFShowMarkers(Value : Boolean); begin - FShowMarkers := Value; - JSCode('showMarkers:' + VarToJSON([Value])); +procedure TExtDataTreeStore.SetFOnLoad(Value : TExtDataTreeStoreOnLoad); begin + if Assigned(FOnLoad) then + JSCode(JSName+'.events ["load"].listeners=[];'); + if Assigned(Value) then + AddListener('load', Ajax('load', ['This', '%0.nm','Node', '%1.nm','Records', '%2.nm','Successful', '%3'], true)); + FOnLoad := Value; end; -procedure TExtChartSeriesLine.SetFSmooth(Value : Boolean); begin - FSmooth := Value; - JSCode('smooth:' + VarToJSON([Value])); +procedure TExtDataTreeStore.SetFOnMove(Value : TExtDataTreeStoreOnMove); begin + if Assigned(FOnMove) then + JSCode(JSName+'.events ["move"].listeners=[];'); + if Assigned(Value) then + AddListener('move', Ajax('move', [], true)); + FOnMove := Value; end; -procedure TExtChartSeriesLine.SetFSmoothInteger(Value : Integer); begin - FSmoothInteger := Value; - JSCode('smooth:' + VarToJSON([Value])); +procedure TExtDataTreeStore.SetFOnRemove(Value : TExtDataTreeStoreOnRemove); begin + if Assigned(FOnRemove) then + JSCode(JSName+'.events ["remove"].listeners=[];'); + if Assigned(Value) then + AddListener('remove', Ajax('remove', [], true)); + FOnRemove := Value; end; -procedure TExtChartSeriesLine.SetFStyle(Value : TExtObject); begin - FStyle := Value; - Value.DeleteFromGarbage; - JSCode('style:' + VarToJSON([Value, false])); +procedure TExtDataTreeStore.SetFOnSort(Value : TExtDataTreeStoreOnSort); begin + if Assigned(FOnSort) then + JSCode(JSName+'.events ["sort"].listeners=[];'); + if Assigned(Value) then + AddListener('sort', Ajax('sort', [], true)); + FOnSort := Value; end; -function TExtChartSeriesLine.JSClassName : string; begin - Result := 'Ext.chart.series.Line'; +function TExtDataTreeStore.JSClassName : string; begin + Result := 'Ext.data.TreeStore'; end; -procedure TExtChartSeriesLine.InitDefaults; begin +procedure TExtDataTreeStore.InitDefaults; begin inherited; - FMarkerConfig := TExtObject.CreateInternal(Self, 'markerConfig'); - FStyle := TExtObject.CreateInternal(Self, 'style'); + FRoot := TExtDataModel.CreateInternal(Self, 'root'); + FRootInterface := TExtDataNodeInterface.CreateInternal(Self, 'root'); + FRootObject := TExtObject.CreateInternal(Self, 'root'); end; -{$IFDEF FPC}constructor TExtChartSeriesLine.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtDataTreeStore.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtChartSeriesLine.Create; begin +constructor TExtDataTreeStore.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -function TExtChartSeriesLine.DrawSeries : TExtFunction; begin - JSCode(JSName + '.drawSeries();', 'TExtChartSeriesLine'); - Result := Self; -end; - -destructor TExtChartSeriesLine.Destroy; begin +destructor TExtDataTreeStore.Destroy; begin try - FMarkerConfig.Free; - FStyle.Free; + FRoot.Free; + FRootInterface.Free; + FRootObject.Free; except end; inherited; end; -function TExtLayoutContainerEditor.JSClassName : string; begin - Result := 'Ext.layout.container.Editor'; -end; - -{$IFDEF FPC}constructor TExtLayoutContainerEditor.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtDataReaderJson.SetFJsonData(Value : TExtObject); begin - FJsonData := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.jsonData=' + VarToJSON([Value, false]) + ';'); +procedure TExtDataTreeStore.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'append') and Assigned(FOnAppend) then + FOnAppend() + else if (AEvtName = 'beforeappend') and Assigned(FOnBeforeappend) then + FOnBeforeappend() + else if (AEvtName = 'beforecollapse') and Assigned(FOnBeforecollapse) then + FOnBeforecollapse() + else if (AEvtName = 'beforeexpand') and Assigned(FOnBeforeexpand) then + FOnBeforeexpand() + else if (AEvtName = 'beforeinsert') and Assigned(FOnBeforeinsert) then + FOnBeforeinsert() + else if (AEvtName = 'beforemove') and Assigned(FOnBeforemove) then + FOnBeforemove() + else if (AEvtName = 'beforeremove') and Assigned(FOnBeforeremove) then + FOnBeforeremove() + else if (AEvtName = 'collapse') and Assigned(FOnCollapse) then + FOnCollapse() + else if (AEvtName = 'expand') and Assigned(FOnExpand) then + FOnExpand() + else if (AEvtName = 'insert') and Assigned(FOnInsert) then + FOnInsert() + else if (AEvtName = 'load') and Assigned(FOnLoad) then + FOnLoad(TExtDataTreeStore(ParamAsObject('This')), TExtDataNodeInterface(ParamAsObject('Node')), TExtObjectList(ParamAsObject('Records')), ParamAsBoolean('Successful')) + else if (AEvtName = 'move') and Assigned(FOnMove) then + FOnMove() + else if (AEvtName = 'remove') and Assigned(FOnRemove) then + FOnRemove() + else if (AEvtName = 'sort') and Assigned(FOnSort) then + FOnSort(); end; -procedure TExtDataReaderJson.SetFMetaProperty(Value : String); begin - FMetaProperty := Value; - JSCode('metaProperty:' + VarToJSON([Value])); +function TExtDataStoreManagerSingleton.JSClassName : string; begin + Result := 'Ext.data.StoreManager'; end; -procedure TExtDataReaderJson.SetFRecordJS(Value : String); begin - FRecordJS := Value; - JSCode('recordJS:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtDataStoreManagerSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtDataReaderJson.SetFUseSimpleAccessors(Value : Boolean); begin - FUseSimpleAccessors := Value; - JSCode('useSimpleAccessors:' + VarToJSON([Value])); +function TExtDataStoreManagerSingleton.Lookup(Store : String) : TExtFunction; begin + JSCode(JSName + '.lookup(' + VarToJSON([Store]) + ');', 'TExtDataStoreManagerSingleton'); + Result := Self; end; -function TExtDataReaderJson.JSClassName : string; begin - Result := 'Ext.data.reader.Json'; +function TExtDataStoreManagerSingleton.Register(Stores : TExtDataStore) : TExtFunction; begin + JSCode(JSName + '.register(' + VarToJSON([Stores, false]) + ');', 'TExtDataStoreManagerSingleton'); + Result := Self; end; -procedure TExtDataReaderJson.InitDefaults; begin - inherited; - FJsonData := TExtObject.CreateInternal(Self, 'jsonData'); +function TExtDataStoreManagerSingleton.Unregister(Stores : String) : TExtFunction; begin + JSCode(JSName + '.unregister(' + VarToJSON([Stores]) + ');', 'TExtDataStoreManagerSingleton'); + Result := Self; end; -{$IFDEF FPC}constructor TExtDataReaderJson.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtDataReaderJson.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtFormFieldCheckbox.SetFAfterBoxLabelTextTpl(Value : String); begin + FAfterBoxLabelTextTpl := Value; + JSCode('afterBoxLabelTextTpl:' + VarToJSON([Value])); end; -destructor TExtDataReaderJson.Destroy; begin - try - FJsonData.Free; - except end; - inherited; +procedure TExtFormFieldCheckbox.SetFAfterBoxLabelTextTplList(Value : TExtObjectList); begin + FAfterBoxLabelTextTplList := Value; + Value.DeleteFromGarbage; + JSCode('afterBoxLabelTextTpl:' + VarToJSON([Value, false])); end; -procedure TExtDataProxyWebStorage.SetFCache(Value : TExtObject); begin - FCache := Value; +procedure TExtFormFieldCheckbox.SetFAfterBoxLabelTextTplTemplate(Value : TExtXTemplate); begin + FAfterBoxLabelTextTplTemplate := Value; Value.DeleteFromGarbage; - JSCode(JSName + '.cache=' + VarToJSON([Value, false]) + ';'); + JSCode('afterBoxLabelTextTpl:' + VarToJSON([Value, false])); end; -procedure TExtDataProxyWebStorage.SetFId(Value : String); begin - FId := Value; - JSCode('id:' + VarToJSON([Value])); +procedure TExtFormFieldCheckbox.SetFAfterBoxLabelTpl(Value : String); begin + FAfterBoxLabelTpl := Value; + JSCode('afterBoxLabelTpl:' + VarToJSON([Value])); end; -function TExtDataProxyWebStorage.JSClassName : string; begin - Result := 'Ext.data.proxy.WebStorage'; +procedure TExtFormFieldCheckbox.SetFAfterBoxLabelTplList(Value : TExtObjectList); begin + FAfterBoxLabelTplList := Value; + Value.DeleteFromGarbage; + JSCode('afterBoxLabelTpl:' + VarToJSON([Value, false])); end; -procedure TExtDataProxyWebStorage.InitDefaults; begin - inherited; - FCache := TExtObject.CreateInternal(Self, 'cache'); +procedure TExtFormFieldCheckbox.SetFAfterBoxLabelTplTemplate(Value : TExtXTemplate); begin + FAfterBoxLabelTplTemplate := Value; + Value.DeleteFromGarbage; + JSCode('afterBoxLabelTpl:' + VarToJSON([Value, false])); end; -{$IFDEF FPC}constructor TExtDataProxyWebStorage.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDataProxyWebStorage.Clear : TExtFunction; begin - JSCode(JSName + '.clear();', 'TExtDataProxyWebStorage'); - Result := Self; +procedure TExtFormFieldCheckbox.SetFBeforeBoxLabelTextTpl(Value : String); begin + FBeforeBoxLabelTextTpl := Value; + JSCode('beforeBoxLabelTextTpl:' + VarToJSON([Value])); end; -constructor TExtDataProxyWebStorage.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtFormFieldCheckbox.SetFBeforeBoxLabelTextTplList(Value : TExtObjectList); begin + FBeforeBoxLabelTextTplList := Value; + Value.DeleteFromGarbage; + JSCode('beforeBoxLabelTextTpl:' + VarToJSON([Value, false])); end; -function TExtDataProxyWebStorage.SetRecord(RecordJS : TExtDataModel; Id : String = '') : TExtFunction; begin - JSCode(JSName + '.setRecord(' + VarToJSON([RecordJS, false, Id]) + ');', 'TExtDataProxyWebStorage'); - Result := Self; +procedure TExtFormFieldCheckbox.SetFBeforeBoxLabelTextTplTemplate(Value : TExtXTemplate); begin + FBeforeBoxLabelTextTplTemplate := Value; + Value.DeleteFromGarbage; + JSCode('beforeBoxLabelTextTpl:' + VarToJSON([Value, false])); end; -destructor TExtDataProxyWebStorage.Destroy; begin - try - FCache.Free; - except end; - inherited; +procedure TExtFormFieldCheckbox.SetFBeforeBoxLabelTpl(Value : String); begin + FBeforeBoxLabelTpl := Value; + JSCode('beforeBoxLabelTpl:' + VarToJSON([Value])); end; -procedure TExtDrawText.SetFDegrees(Value : Integer); begin - FDegrees := Value; - JSCode('degrees:' + VarToJSON([Value])); +procedure TExtFormFieldCheckbox.SetFBeforeBoxLabelTplList(Value : TExtObjectList); begin + FBeforeBoxLabelTplList := Value; + Value.DeleteFromGarbage; + JSCode('beforeBoxLabelTpl:' + VarToJSON([Value, false])); end; -procedure TExtDrawText.SetFStyleSelector(Value : String); begin - FStyleSelector := Value; - JSCode('styleSelector:' + VarToJSON([Value])); +procedure TExtFormFieldCheckbox.SetFBeforeBoxLabelTplTemplate(Value : TExtXTemplate); begin + FBeforeBoxLabelTplTemplate := Value; + Value.DeleteFromGarbage; + JSCode('beforeBoxLabelTpl:' + VarToJSON([Value, false])); end; -procedure TExtDrawText.SetFText(Value : String); begin - FText := Value; +procedure TExtFormFieldCheckbox.SetFBoxLabel(Value : String); begin + FBoxLabel := Value; if not ConfigAvailable(JSName) then - SetText(Value) + SetBoxLabel(Value) else - JSCode('text:' + VarToJSON([Value])); + JSCode('boxLabel:' + VarToJSON([Value])); end; -function TExtDrawText.JSClassName : string; begin - Result := 'Ext.draw.Text'; +procedure TExtFormFieldCheckbox.SetFBoxLabelAlign(Value : String); begin + FBoxLabelAlign := Value; + JSCode('boxLabelAlign:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtDrawText.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtFormFieldCheckbox.SetFBoxLabelAttrTpl(Value : String); begin + FBoxLabelAttrTpl := Value; + JSCode('boxLabelAttrTpl:' + VarToJSON([Value])); +end; -function TExtDrawText.SetAngle(Degrees : Integer) : TExtFunction; begin - JSCode(JSName + '.setAngle(' + VarToJSON([Degrees]) + ');', 'TExtDrawText'); - Result := Self; +procedure TExtFormFieldCheckbox.SetFBoxLabelAttrTplList(Value : TExtObjectList); begin + FBoxLabelAttrTplList := Value; + Value.DeleteFromGarbage; + JSCode('boxLabelAttrTpl:' + VarToJSON([Value, false])); end; -function TExtDrawText.SetText(T : String) : TExtFunction; begin - JSCode(JSName + '.setText(' + VarToJSON([T]) + ');', 'TExtDrawText'); - Result := Self; +procedure TExtFormFieldCheckbox.SetFBoxLabelAttrTplTemplate(Value : TExtXTemplate); begin + FBoxLabelAttrTplTemplate := Value; + Value.DeleteFromGarbage; + JSCode('boxLabelAttrTpl:' + VarToJSON([Value, false])); end; -function TExtToolbarSeparator.JSClassName : string; begin - Result := 'Ext.toolbar.Separator'; +procedure TExtFormFieldCheckbox.SetFBoxLabelCls(Value : String); begin + FBoxLabelCls := Value; + JSCode('boxLabelCls:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtToolbarSeparator.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtFormFieldCheckbox.SetFBoxLabelEl(Value : TExtElement); begin + FBoxLabelEl := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.boxLabelEl=' + VarToJSON([Value, false]) + ';'); +end; -function TExtFormRadioManagerSingleton.JSClassName : string; begin - Result := 'Ext.form.RadioManager'; +procedure TExtFormFieldCheckbox.SetFChecked(Value : Boolean); begin + FChecked := Value; + JSCode('checked:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtFormRadioManagerSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtFormFieldCheckbox.SetFCheckedCls(Value : String); begin + FCheckedCls := Value; + JSCode('checkedCls:' + VarToJSON([Value])); +end; -procedure TExtDataReaderXml.SetFNamespace(Value : String); begin - FNamespace := Value; - JSCode('namespace:' + VarToJSON([Value])); +procedure TExtFormFieldCheckbox.SetFFieldBodyCls(Value : String); begin + FFieldBodyCls := Value; + JSCode('fieldBodyCls:' + VarToJSON([Value])); end; -procedure TExtDataReaderXml.SetFRecordJS(Value : String); begin - FRecordJS := Value; - JSCode('recordJS:' + VarToJSON([Value])); +procedure TExtFormFieldCheckbox.SetFFieldCls(Value : String); begin + FFieldCls := Value; + JSCode('fieldCls:' + VarToJSON([Value])); end; -procedure TExtDataReaderXml.SetFXmlData(Value : TExtObject); begin - FXmlData := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.xmlData=' + VarToJSON([Value, false]) + ';'); +procedure TExtFormFieldCheckbox.SetFFocusCls(Value : String); begin + FFocusCls := Value; + JSCode('focusCls:' + VarToJSON([Value])); end; -function TExtDataReaderXml.JSClassName : string; begin - Result := 'Ext.data.reader.Xml'; +procedure TExtFormFieldCheckbox.SetFHandler(Value : TExtFunction); begin + FHandler := Value; + JSCode('handler:' + VarToJSON([Value, true])); end; -procedure TExtDataReaderXml.InitDefaults; begin - inherited; - FXmlData := TExtObject.CreateInternal(Self, 'xmlData'); +procedure TExtFormFieldCheckbox.SetFInputValue(Value : String); begin + FInputValue := Value; + JSCode('inputValue:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtDataReaderXml.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtFormFieldCheckbox.SetFIsCheckbox(Value : Boolean); begin + FIsCheckbox := Value; + JSCode(JSName + '.isCheckbox=' + VarToJSON([Value]) + ';'); +end; -constructor TExtDataReaderXml.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtFormFieldCheckbox.SetFOriginalValue(Value : TExtObject); begin + FOriginalValue := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.originalValue=' + VarToJSON([Value, false]) + ';'); end; -destructor TExtDataReaderXml.Destroy; begin - try - FXmlData.Free; - except end; - inherited; +procedure TExtFormFieldCheckbox.SetFScope(Value : TExtObject); begin + FScope := Value; + Value.DeleteFromGarbage; + JSCode('scope:' + VarToJSON([Value, false])); end; -procedure TExtFxTargetCompositeElement.SetFIsComposite(Value : Boolean); begin - FIsComposite := Value; - JSCode(JSName + '.isComposite=' + VarToJSON([Value]) + ';'); +procedure TExtFormFieldCheckbox.SetFUncheckedValue(Value : String); begin + FUncheckedValue := Value; + JSCode('uncheckedValue:' + VarToJSON([Value])); end; -function TExtFxTargetCompositeElement.JSClassName : string; begin - Result := 'Ext.fx.target.CompositeElement'; +function TExtFormFieldCheckbox.JSClassName : string; begin + Result := 'Ext.form.field.Checkbox'; end; -{$IFDEF FPC}constructor TExtFxTargetCompositeElement.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtDataProxyMemory.SetFData(Value : TExtObject); begin - FData := Value; - Value.DeleteFromGarbage; - JSCode('data:' + VarToJSON([Value, false])); +procedure TExtFormFieldCheckbox.InitDefaults; begin + inherited; + FAfterBoxLabelTextTplList := TExtObjectList.Create(Self, 'afterBoxLabelTextTpl'); + FAfterBoxLabelTextTplTemplate := TExtXTemplate.CreateInternal(Self, 'afterBoxLabelTextTpl'); + FAfterBoxLabelTplList := TExtObjectList.Create(Self, 'afterBoxLabelTpl'); + FAfterBoxLabelTplTemplate := TExtXTemplate.CreateInternal(Self, 'afterBoxLabelTpl'); + FBeforeBoxLabelTextTplList := TExtObjectList.Create(Self, 'beforeBoxLabelTextTpl'); + FBeforeBoxLabelTextTplTemplate := TExtXTemplate.CreateInternal(Self, 'beforeBoxLabelTextTpl'); + FBeforeBoxLabelTplList := TExtObjectList.Create(Self, 'beforeBoxLabelTpl'); + FBeforeBoxLabelTplTemplate := TExtXTemplate.CreateInternal(Self, 'beforeBoxLabelTpl'); + FBoxLabelAttrTplList := TExtObjectList.Create(Self, 'boxLabelAttrTpl'); + FBoxLabelAttrTplTemplate := TExtXTemplate.CreateInternal(Self, 'boxLabelAttrTpl'); + FBoxLabelEl := TExtElement.CreateInternal(Self, 'boxLabelEl'); + FOriginalValue := TExtObject.CreateInternal(Self, 'originalValue'); + FScope := TExtObject.CreateInternal(Self, 'scope'); end; -procedure TExtDataProxyMemory.SetFEnablePaging(Value : Boolean); begin - FEnablePaging := Value; - JSCode('enablePaging:' + VarToJSON([Value])); +{$IFDEF FPC}constructor TExtFormFieldCheckbox.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtFormFieldCheckbox.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -function TExtDataProxyMemory.JSClassName : string; begin - Result := 'Ext.data.proxy.Memory'; +function TExtFormFieldCheckbox.GetRawValue : TExtFunction; begin + JSCode(JSName + '.getRawValue();', 'TExtFormFieldCheckbox'); + Result := Self; end; -procedure TExtDataProxyMemory.InitDefaults; begin - inherited; - FData := TExtObject.CreateInternal(Self, 'data'); +function TExtFormFieldCheckbox.GetSubmitValue : TExtFunction; begin + JSCode(JSName + '.getSubmitValue();', 'TExtFormFieldCheckbox'); + Result := Self; end; -{$IFDEF FPC}constructor TExtDataProxyMemory.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtFormFieldCheckbox.GetValue : TExtFunction; begin + JSCode(JSName + '.getValue();', 'TExtFormFieldCheckbox'); + Result := Self; +end; -constructor TExtDataProxyMemory.Create; begin - CreateVarAlt(JSClassName + '.create({});'); - InitDefaults; +function TExtFormFieldCheckbox.SetBoxLabel(BoxLabel : String) : TExtFunction; begin + JSCode(JSName + '.setBoxLabel(' + VarToJSON([BoxLabel]) + ');', 'TExtFormFieldCheckbox'); + Result := Self; end; -function TExtDataProxyMemory.Read(Operation : TExtDataOperation; Callback : TExtFunction; Scope : TExtObject) : TExtFunction; begin - JSCode(JSName + '.read(' + VarToJSON([Operation, false, Callback, true, Scope, false]) + ');', 'TExtDataProxyMemory'); +function TExtFormFieldCheckbox.SetRawValue(Value : Boolean) : TExtFunction; begin + JSCode(JSName + '.setRawValue(' + VarToJSON([Value]) + ');', 'TExtFormFieldCheckbox'); Result := Self; end; -function TExtDataProxyMemory.Update(Operation : TExtDataOperation; Callback : TExtFunction; Scope : TExtObject) : TExtFunction; begin - JSCode(JSName + '.update(' + VarToJSON([Operation, false, Callback, true, Scope, false]) + ');', 'TExtDataProxyMemory'); +function TExtFormFieldCheckbox.SetValue(Checked : Boolean) : TExtFunction; begin + JSCode(JSName + '.setValue(' + VarToJSON([Checked]) + ');', 'TExtFormFieldCheckbox'); Result := Self; end; -destructor TExtDataProxyMemory.Destroy; begin +destructor TExtFormFieldCheckbox.Destroy; begin try - FData.Free; + FAfterBoxLabelTextTplList.Free; + FAfterBoxLabelTextTplTemplate.Free; + FAfterBoxLabelTplList.Free; + FAfterBoxLabelTplTemplate.Free; + FBeforeBoxLabelTextTplList.Free; + FBeforeBoxLabelTextTplTemplate.Free; + FBeforeBoxLabelTplList.Free; + FBeforeBoxLabelTplTemplate.Free; + FBoxLabelAttrTplList.Free; + FBoxLabelAttrTplTemplate.Free; + FBoxLabelEl.Free; + FOriginalValue.Free; + FScope.Free; except end; inherited; end; -procedure TExtButtonSplit.SetFArrowHandler(Value : TExtFunction); begin - FArrowHandler := Value; - if not ConfigAvailable(JSName) then - SetArrowHandler(Value) - else - JSCode('arrowHandler:' + VarToJSON([Value, true])); +function TExtFormCheckboxManagerSingleton.JSClassName : string; begin + Result := 'Ext.form.CheckboxManager'; end; -procedure TExtButtonSplit.SetFArrowTooltip(Value : String); begin - FArrowTooltip := Value; - JSCode('arrowTooltip:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtFormCheckboxManagerSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtButtonSplit.SetFOnArrowclick(Value : TExtButtonSplitOnArrowclick); begin - if Assigned(FOnArrowclick) then - JSCode(JSName+'.events ["arrowclick"].listeners=[];'); - if Assigned(Value) then - AddListener('arrowclick', Ajax('arrowclick', ['This', '%0.nm','E', '%1.nm'], true)); - FOnArrowclick := Value; +function TExtFormActionDirectLoad.JSClassName : string; begin + Result := 'Ext.form.action.DirectLoad'; end; -function TExtButtonSplit.JSClassName : string; begin - Result := 'Ext.button.Split'; +{$IFDEF FPC}constructor TExtFormActionDirectLoad.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtFormActionDirectSubmit.JSClassName : string; begin + Result := 'Ext.form.action.DirectSubmit'; end; -{$IFDEF FPC}constructor TExtButtonSplit.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtFormActionDirectSubmit.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtButtonSplit.SetArrowHandler(Handler : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.setArrowHandler(' + VarToJSON([Handler, true, Scope, false]) + ');', 'TExtButtonSplit'); - Result := Self; +procedure TExtFormActionStandardSubmit.SetFTarget(Value : String); begin + FTarget := Value; + JSCode('target:' + VarToJSON([Value])); end; -procedure TExtButtonSplit.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'arrowclick') and Assigned(FOnArrowclick) then - FOnArrowclick(TExtButtonSplit(ParamAsObject('This')), TExtDirectEvent(ParamAsObject('E'))); +function TExtFormActionStandardSubmit.JSClassName : string; begin + Result := 'Ext.form.action.StandardSubmit'; end; -procedure TExtTab.SetFActive(Value : Boolean); begin - FActive := Value; - JSCode(JSName + '.active=' + VarToJSON([Value]) + ';'); -end; +{$IFDEF FPC}constructor TExtFormActionStandardSubmit.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtTab.SetFActiveCls(Value : String); begin - FActiveCls := Value; - JSCode('activeCls:' + VarToJSON([Value])); +function TExtFormFieldFileButton.JSClassName : string; begin + Result := 'Ext.form.field.FileButton'; end; -procedure TExtTab.SetFClosable(Value : Boolean); begin - FClosable := Value; - if not ConfigAvailable(JSName) then - SetClosable(Value) - else - JSCode('closable:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtFormFieldFileButton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtTab.SetFClosable_(Value : Boolean); begin - FClosable_ := Value; - JSCode(JSName + '.closable=' + VarToJSON([Value]) + ';'); +function TExtFormFieldHidden.JSClassName : string; begin + Result := 'Ext.form.field.Hidden'; end; -procedure TExtTab.SetFClosableCls(Value : String); begin - FClosableCls := Value; - JSCode('closableCls:' + VarToJSON([Value])); +{$IFDEF FPC}constructor TExtFormFieldHidden.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +procedure TExtFormFieldText.SetFAllowBlank(Value : Boolean); begin + FAllowBlank := Value; + JSCode('allowBlank:' + VarToJSON([Value])); end; -procedure TExtTab.SetFCloseText(Value : String); begin - FCloseText := Value; - JSCode('closeText:' + VarToJSON([Value])); +procedure TExtFormFieldText.SetFAllowOnlyWhitespace(Value : Boolean); begin + FAllowOnlyWhitespace := Value; + JSCode('allowOnlyWhitespace:' + VarToJSON([Value])); end; -procedure TExtTab.SetFDisabledCls(Value : String); begin - FDisabledCls := Value; - JSCode('disabledCls:' + VarToJSON([Value])); +procedure TExtFormFieldText.SetFBlankText(Value : String); begin + FBlankText := Value; + JSCode('blankText:' + VarToJSON([Value])); end; -procedure TExtTab.SetFOnActivate(Value : TExtTabOnActivate); begin - if Assigned(FOnActivate) then - JSCode(JSName+'.events ["activate"].listeners=[];'); - if Assigned(Value) then - AddListener('activate', Ajax('activate', ['This', '%0.nm'], true)); - FOnActivate := Value; +procedure TExtFormFieldText.SetFDisableKeyFilter(Value : Boolean); begin + FDisableKeyFilter := Value; + JSCode('disableKeyFilter:' + VarToJSON([Value])); end; -procedure TExtTab.SetFOnBeforeclose(Value : TExtTabOnBeforeclose); begin - if Assigned(FOnBeforeclose) then - JSCode(JSName+'.events ["beforeclose"].listeners=[];'); - if Assigned(Value) then - AddListener('beforeclose', Ajax('beforeclose', ['Tab', '%0.nm'], true)); - FOnBeforeclose := Value; +procedure TExtFormFieldText.SetFEmptyCls(Value : String); begin + FEmptyCls := Value; + JSCode('emptyCls:' + VarToJSON([Value])); end; -procedure TExtTab.SetFOnClose(Value : TExtTabOnClose); begin - if Assigned(FOnClose) then - JSCode(JSName+'.events ["close"].listeners=[];'); - if Assigned(Value) then - AddListener('close', Ajax('close', ['Tab', '%0.nm'], true)); - FOnClose := Value; +procedure TExtFormFieldText.SetFEmptyText(Value : String); begin + FEmptyText := Value; + JSCode('emptyText:' + VarToJSON([Value])); end; -procedure TExtTab.SetFOnDeactivate(Value : TExtTabOnDeactivate); begin - if Assigned(FOnDeactivate) then - JSCode(JSName+'.events ["deactivate"].listeners=[];'); - if Assigned(Value) then - AddListener('deactivate', Ajax('deactivate', ['This', '%0.nm'], true)); - FOnDeactivate := Value; +procedure TExtFormFieldText.SetFEnableKeyEvents(Value : Boolean); begin + FEnableKeyEvents := Value; + JSCode('enableKeyEvents:' + VarToJSON([Value])); end; -function TExtTab.JSClassName : string; begin - Result := 'Ext.tab.Tab'; +procedure TExtFormFieldText.SetFEnforceMaxLength(Value : Boolean); begin + FEnforceMaxLength := Value; + JSCode('enforceMaxLength:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtTab.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtFormFieldText.SetFGrow(Value : Boolean); begin + FGrow := Value; + JSCode('grow:' + VarToJSON([Value])); +end; -function TExtTab.SetCard(Card : TExtComponent) : TExtFunction; begin - JSCode(JSName + '.setCard(' + VarToJSON([Card, false]) + ');', 'TExtTab'); - Result := Self; +procedure TExtFormFieldText.SetFGrowAppend(Value : String); begin + FGrowAppend := Value; + JSCode('growAppend:' + VarToJSON([Value])); end; -function TExtTab.SetClosable(Closable : Boolean) : TExtFunction; begin - JSCode(JSName + '.setClosable(' + VarToJSON([Closable]) + ');', 'TExtTab'); - Result := Self; +procedure TExtFormFieldText.SetFGrowMax(Value : Integer); begin + FGrowMax := Value; + JSCode('growMax:' + VarToJSON([Value])); end; -procedure TExtTab.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'activate') and Assigned(FOnActivate) then - FOnActivate(TExtTab(ParamAsObject('This'))) - else if (AEvtName = 'beforeclose') and Assigned(FOnBeforeclose) then - FOnBeforeclose(TExtTab(ParamAsObject('Tab'))) - else if (AEvtName = 'close') and Assigned(FOnClose) then - FOnClose(TExtTab(ParamAsObject('Tab'))) - else if (AEvtName = 'deactivate') and Assigned(FOnDeactivate) then - FOnDeactivate(TExtTab(ParamAsObject('This'))); +procedure TExtFormFieldText.SetFGrowMin(Value : Integer); begin + FGrowMin := Value; + JSCode('growMin:' + VarToJSON([Value])); end; -function TExtFxTargetCompositeSprite.JSClassName : string; begin - Result := 'Ext.fx.target.CompositeSprite'; +procedure TExtFormFieldText.SetFMaskRe(Value : TRegExp); begin + FMaskRe := Value; + JSCode('maskRe:' + VarToJSON([#3 +Value])); end; -{$IFDEF FPC}constructor TExtFxTargetCompositeSprite.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtFormFieldText.SetFMaxLength(Value : Integer); begin + FMaxLength := Value; + JSCode('maxLength:' + VarToJSON([Value])); +end; -function TExtFxTargetElementCSS.JSClassName : string; begin - Result := 'Ext.fx.target.ElementCSS'; +procedure TExtFormFieldText.SetFMaxLengthText(Value : String); begin + FMaxLengthText := Value; + JSCode('maxLengthText:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtFxTargetElementCSS.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtFormFieldText.SetFMinLength(Value : Integer); begin + FMinLength := Value; + JSCode('minLength:' + VarToJSON([Value])); +end; -procedure TExtDataWriterJson.SetFAllowSingle(Value : Boolean); begin - FAllowSingle := Value; - JSCode('allowSingle:' + VarToJSON([Value])); +procedure TExtFormFieldText.SetFRegex(Value : TRegExp); begin + FRegex := Value; + JSCode('regex:' + VarToJSON([#3 +Value])); end; -procedure TExtDataWriterJson.SetFEncode(Value : Boolean); begin - FEncode := Value; - JSCode('encode:' + VarToJSON([Value])); +procedure TExtFormFieldText.SetFRegexText(Value : String); begin + FRegexText := Value; + JSCode('regexText:' + VarToJSON([Value])); end; -procedure TExtDataWriterJson.SetFExpandData(Value : Boolean); begin - FExpandData := Value; - JSCode('expandData:' + VarToJSON([Value])); +procedure TExtFormFieldText.SetFRequiredCls(Value : String); begin + FRequiredCls := Value; + JSCode('requiredCls:' + VarToJSON([Value])); end; -procedure TExtDataWriterJson.SetFRoot(Value : String); begin - FRoot := Value; - JSCode('root:' + VarToJSON([Value])); +procedure TExtFormFieldText.SetFSelectOnFocus(Value : Boolean); begin + FSelectOnFocus := Value; + JSCode('selectOnFocus:' + VarToJSON([Value])); end; -function TExtDataWriterJson.JSClassName : string; begin - Result := 'Ext.data.writer.Json'; +procedure TExtFormFieldText.SetFSize(Value : Integer); begin + FSize := Value; + JSCode('size:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtDataWriterJson.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtFormFieldText.SetFStripCharsRe(Value : TRegExp); begin + FStripCharsRe := Value; + JSCode('stripCharsRe:' + VarToJSON([#3 +Value])); +end; -function TExtFormActionDirectSubmit.JSClassName : string; begin - Result := 'Ext.form.action.DirectSubmit'; +procedure TExtFormFieldText.SetFValidateBlank(Value : Boolean); begin + FValidateBlank := Value; + JSCode('validateBlank:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtFormActionDirectSubmit.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtFormFieldText.SetFValidator(Value : TExtFunction); begin + FValidator := Value; + JSCode('validator:' + VarToJSON([Value, true])); +end; -procedure TExtFormActionStandardSubmit.SetFTarget(Value : String); begin - FTarget := Value; - JSCode('target:' + VarToJSON([Value])); +procedure TExtFormFieldText.SetFVtype(Value : String); begin + FVtype := Value; + JSCode('vtype:' + VarToJSON([Value])); end; -function TExtFormActionStandardSubmit.JSClassName : string; begin - Result := 'Ext.form.action.StandardSubmit'; +procedure TExtFormFieldText.SetFVtypeText(Value : String); begin + FVtypeText := Value; + JSCode('vtypeText:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtFormActionStandardSubmit.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtFormFieldText.SetFOnAutosize(Value : TExtFormFieldTextOnAutosize); begin + if Assigned(FOnAutosize) then + JSCode(JSName+'.events ["autosize"].listeners=[];'); + if Assigned(Value) then + AddListener('autosize', Ajax('autosize', ['This', '%0.nm','Width', '%1'], true)); + FOnAutosize := Value; +end; -function TExtFormCheckboxManagerSingleton.JSClassName : string; begin - Result := 'Ext.form.CheckboxManager'; +procedure TExtFormFieldText.SetFOnKeydown(Value : TExtFormFieldTextOnKeydown); begin + if Assigned(FOnKeydown) then + JSCode(JSName+'.events ["keydown"].listeners=[];'); + if Assigned(Value) then + AddListener('keydown', Ajax('keydown', ['This', '%0.nm','E', '%1.nm'], true)); + FOnKeydown := Value; end; -{$IFDEF FPC}constructor TExtFormCheckboxManagerSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtFormFieldText.SetFOnKeypress(Value : TExtFormFieldTextOnKeypress); begin + if Assigned(FOnKeypress) then + JSCode(JSName+'.events ["keypress"].listeners=[];'); + if Assigned(Value) then + AddListener('keypress', Ajax('keypress', ['This', '%0.nm','E', '%1.nm'], true)); + FOnKeypress := Value; +end; -procedure TExtDataTreeStore.SetFClearOnLoad(Value : Boolean); begin - FClearOnLoad := Value; - JSCode('clearOnLoad:' + VarToJSON([Value])); +procedure TExtFormFieldText.SetFOnKeyup(Value : TExtFormFieldTextOnKeyup); begin + if Assigned(FOnKeyup) then + JSCode(JSName+'.events ["keyup"].listeners=[];'); + if Assigned(Value) then + AddListener('keyup', Ajax('keyup', ['This', '%0.nm','E', '%1.nm'], true)); + FOnKeyup := Value; end; -procedure TExtDataTreeStore.SetFClearRemovedOnLoad(Value : Boolean); begin - FClearRemovedOnLoad := Value; - JSCode('clearRemovedOnLoad:' + VarToJSON([Value])); +function TExtFormFieldText.JSClassName : string; begin + Result := 'Ext.form.field.Text'; end; -procedure TExtDataTreeStore.SetFDefaultRootId(Value : String); begin - FDefaultRootId := Value; - JSCode('defaultRootId:' + VarToJSON([Value])); +procedure TExtFormFieldText.InitDefaults; begin + inherited; + FGrowAppend := 'W'; + FSize := 20; end; -procedure TExtDataTreeStore.SetFDefaultRootProperty(Value : String); begin - FDefaultRootProperty := Value; - JSCode('defaultRootProperty:' + VarToJSON([Value])); +{$IFDEF FPC}constructor TExtFormFieldText.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtFormFieldText.AutoSize : TExtFunction; begin + JSCode(JSName + '.autoSize();', 'TExtFormFieldText'); + Result := Self; end; -procedure TExtDataTreeStore.SetFDefaultRootText(Value : String); begin - FDefaultRootText := Value; - JSCode('defaultRootText:' + VarToJSON([Value])); +constructor TExtFormFieldText.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtDataTreeStore.SetFFolderSort(Value : Boolean); begin - FFolderSort := Value; - JSCode('folderSort:' + VarToJSON([Value])); +function TExtFormFieldText.GetErrors(Value : TExtObject) : TExtFunction; begin + JSCode(JSName + '.getErrors(' + VarToJSON([Value, false]) + ');', 'TExtFormFieldText'); + Result := Self; end; -procedure TExtDataTreeStore.SetFNodeParam(Value : String); begin - FNodeParam := Value; - JSCode('nodeParam:' + VarToJSON([Value])); +function TExtFormFieldText.GetRawValue : TExtFunction; begin + JSCode(JSName + '.getRawValue();', 'TExtFormFieldText'); + Result := Self; end; -procedure TExtDataTreeStore.SetFRoot(Value : TExtDataModel); begin - FRoot := Value; - Value.DeleteFromGarbage; - JSCode('root:' + VarToJSON([Value, false])); +function TExtFormFieldText.ProcessRawValue(Value : String) : TExtFunction; begin + JSCode(JSName + '.processRawValue(' + VarToJSON([Value]) + ');', 'TExtFormFieldText'); + Result := Self; end; -procedure TExtDataTreeStore.SetFRootInterface(Value : TExtDataNodeInterface); begin - FRootInterface := Value; - Value.DeleteFromGarbage; - JSCode('root:' + VarToJSON([Value, false])); +function TExtFormFieldText.Reset : TExtFunction; begin + JSCode(JSName + '.reset();', 'TExtFormFieldText'); + Result := Self; end; -procedure TExtDataTreeStore.SetFRootObject(Value : TExtObject); begin - FRootObject := Value; - Value.DeleteFromGarbage; - JSCode('root:' + VarToJSON([Value, false])); +function TExtFormFieldText.SelectText(Start : Integer = 0; EndJS : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.selectText(' + VarToJSON([Start, EndJS]) + ');', 'TExtFormFieldText'); + Result := Self; end; -procedure TExtDataTreeStore.SetFOnAppend(Value : TExtDataTreeStoreOnAppend); begin - if Assigned(FOnAppend) then - JSCode(JSName+'.events ["append"].listeners=[];'); - if Assigned(Value) then - AddListener('append', Ajax('append', [], true)); - FOnAppend := Value; +function TExtFormFieldText.SetValue(Value : TExtObject) : TExtFunction; begin + JSCode(JSName + '.setValue(' + VarToJSON([Value, false]) + ');', 'TExtFormFieldText'); + Result := Self; end; -procedure TExtDataTreeStore.SetFOnBeforeappend(Value : TExtDataTreeStoreOnBeforeappend); begin - if Assigned(FOnBeforeappend) then - JSCode(JSName+'.events ["beforeappend"].listeners=[];'); - if Assigned(Value) then - AddListener('beforeappend', Ajax('beforeappend', [], true)); - FOnBeforeappend := Value; +procedure TExtFormFieldText.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'autosize') and Assigned(FOnAutosize) then + FOnAutosize(TExtFormFieldText(ParamAsObject('This')), ParamAsInteger('Width')) + else if (AEvtName = 'keydown') and Assigned(FOnKeydown) then + FOnKeydown(TExtFormFieldText(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'keypress') and Assigned(FOnKeypress) then + FOnKeypress(TExtFormFieldText(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'keyup') and Assigned(FOnKeyup) then + FOnKeyup(TExtFormFieldText(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))); end; -procedure TExtDataTreeStore.SetFOnBeforecollapse(Value : TExtDataTreeStoreOnBeforecollapse); begin - if Assigned(FOnBeforecollapse) then - JSCode(JSName+'.events ["beforecollapse"].listeners=[];'); - if Assigned(Value) then - AddListener('beforecollapse', Ajax('beforecollapse', [], true)); - FOnBeforecollapse := Value; +procedure TExtDirectRemotingProvider.SetFActions(Value : TExtObject); begin + FActions := Value; + Value.DeleteFromGarbage; + JSCode('actions:' + VarToJSON([Value, false])); end; -procedure TExtDataTreeStore.SetFOnBeforeexpand(Value : TExtDataTreeStoreOnBeforeexpand); begin - if Assigned(FOnBeforeexpand) then - JSCode(JSName+'.events ["beforeexpand"].listeners=[];'); - if Assigned(Value) then - AddListener('beforeexpand', Ajax('beforeexpand', [], true)); - FOnBeforeexpand := Value; +procedure TExtDirectRemotingProvider.SetFDisableNestedActions(Value : Boolean); begin + FDisableNestedActions := Value; + JSCode('disableNestedActions:' + VarToJSON([Value])); end; -procedure TExtDataTreeStore.SetFOnBeforeinsert(Value : TExtDataTreeStoreOnBeforeinsert); begin - if Assigned(FOnBeforeinsert) then - JSCode(JSName+'.events ["beforeinsert"].listeners=[];'); - if Assigned(Value) then - AddListener('beforeinsert', Ajax('beforeinsert', [], true)); - FOnBeforeinsert := Value; +procedure TExtDirectRemotingProvider.SetFEnableBuffer(Value : Integer); begin + FEnableBuffer := Value; + JSCode('enableBuffer:' + VarToJSON([Value])); end; -procedure TExtDataTreeStore.SetFOnBeforemove(Value : TExtDataTreeStoreOnBeforemove); begin - if Assigned(FOnBeforemove) then - JSCode(JSName+'.events ["beforemove"].listeners=[];'); - if Assigned(Value) then - AddListener('beforemove', Ajax('beforemove', [], true)); - FOnBeforemove := Value; +procedure TExtDirectRemotingProvider.SetFEnableBufferBoolean(Value : Boolean); begin + FEnableBufferBoolean := Value; + JSCode('enableBuffer:' + VarToJSON([Value])); end; -procedure TExtDataTreeStore.SetFOnBeforeremove(Value : TExtDataTreeStoreOnBeforeremove); begin - if Assigned(FOnBeforeremove) then - JSCode(JSName+'.events ["beforeremove"].listeners=[];'); - if Assigned(Value) then - AddListener('beforeremove', Ajax('beforeremove', [], true)); - FOnBeforeremove := Value; +procedure TExtDirectRemotingProvider.SetFEnableUrlEncode(Value : String); begin + FEnableUrlEncode := Value; + JSCode('enableUrlEncode:' + VarToJSON([Value])); end; -procedure TExtDataTreeStore.SetFOnCollapse(Value : TExtDataTreeStoreOnCollapse); begin - if Assigned(FOnCollapse) then - JSCode(JSName+'.events ["collapse"].listeners=[];'); - if Assigned(Value) then - AddListener('collapse', Ajax('collapse', [], true)); - FOnCollapse := Value; +procedure TExtDirectRemotingProvider.SetFMaxRetries(Value : Integer); begin + FMaxRetries := Value; + JSCode('maxRetries:' + VarToJSON([Value])); end; -procedure TExtDataTreeStore.SetFOnExpand(Value : TExtDataTreeStoreOnExpand); begin - if Assigned(FOnExpand) then - JSCode(JSName+'.events ["expand"].listeners=[];'); - if Assigned(Value) then - AddListener('expand', Ajax('expand', [], true)); - FOnExpand := Value; +procedure TExtDirectRemotingProvider.SetFNamespace(Value : String); begin + FNamespace := Value; + JSCode('namespace:' + VarToJSON([Value])); end; -procedure TExtDataTreeStore.SetFOnInsert(Value : TExtDataTreeStoreOnInsert); begin - if Assigned(FOnInsert) then - JSCode(JSName+'.events ["insert"].listeners=[];'); - if Assigned(Value) then - AddListener('insert', Ajax('insert', [], true)); - FOnInsert := Value; +procedure TExtDirectRemotingProvider.SetFNamespaceObject(Value : TExtObject); begin + FNamespaceObject := Value; + Value.DeleteFromGarbage; + JSCode('namespace:' + VarToJSON([Value, false])); end; -procedure TExtDataTreeStore.SetFOnLoad(Value : TExtDataTreeStoreOnLoad); begin - if Assigned(FOnLoad) then - JSCode(JSName+'.events ["load"].listeners=[];'); - if Assigned(Value) then - AddListener('load', Ajax('load', ['This', '%0.nm','Node', '%1.nm','Records', '%2.nm','Successful', '%3'], true)); - FOnLoad := Value; +procedure TExtDirectRemotingProvider.SetFTimeout(Value : Integer); begin + FTimeout := Value; + JSCode('timeout:' + VarToJSON([Value])); end; -procedure TExtDataTreeStore.SetFOnMove(Value : TExtDataTreeStoreOnMove); begin - if Assigned(FOnMove) then - JSCode(JSName+'.events ["move"].listeners=[];'); - if Assigned(Value) then - AddListener('move', Ajax('move', [], true)); - FOnMove := Value; +procedure TExtDirectRemotingProvider.SetFUrl(Value : String); begin + FUrl := Value; + JSCode('url:' + VarToJSON([Value])); end; -procedure TExtDataTreeStore.SetFOnRemove(Value : TExtDataTreeStoreOnRemove); begin - if Assigned(FOnRemove) then - JSCode(JSName+'.events ["remove"].listeners=[];'); +procedure TExtDirectRemotingProvider.SetFOnBeforecall(Value : TExtDirectRemotingProviderOnBeforecall); begin + if Assigned(FOnBeforecall) then + JSCode(JSName+'.events ["beforecall"].listeners=[];'); if Assigned(Value) then - AddListener('remove', Ajax('remove', [], true)); - FOnRemove := Value; + AddListener('beforecall', Ajax('beforecall', ['Provider', '%0.nm','Transaction', '%1.nm','Meta', '%2.nm'], true)); + FOnBeforecall := Value; end; -procedure TExtDataTreeStore.SetFOnSort(Value : TExtDataTreeStoreOnSort); begin - if Assigned(FOnSort) then - JSCode(JSName+'.events ["sort"].listeners=[];'); +procedure TExtDirectRemotingProvider.SetFOnBeforecallback(Value : TExtDirectRemotingProviderOnBeforecallback); begin + if Assigned(FOnBeforecallback) then + JSCode(JSName+'.events ["beforecallback"].listeners=[];'); if Assigned(Value) then - AddListener('sort', Ajax('sort', [], true)); - FOnSort := Value; -end; - -function TExtDataTreeStore.JSClassName : string; begin - Result := 'Ext.data.TreeStore'; + AddListener('beforecallback', Ajax('beforecallback', ['Provider', '%0.nm','Transaction', '%1.nm'], true)); + FOnBeforecallback := Value; end; -procedure TExtDataTreeStore.InitDefaults; begin - inherited; - FRoot := TExtDataModel.CreateInternal(Self, 'root'); - FRootInterface := TExtDataNodeInterface.CreateInternal(Self, 'root'); - FRootObject := TExtObject.CreateInternal(Self, 'root'); +procedure TExtDirectRemotingProvider.SetFOnCall(Value : TExtDirectRemotingProviderOnCall); begin + if Assigned(FOnCall) then + JSCode(JSName+'.events ["call"].listeners=[];'); + if Assigned(Value) then + AddListener('call', Ajax('call', ['Provider', '%0.nm','Transaction', '%1.nm','Meta', '%2.nm'], true)); + FOnCall := Value; end; -{$IFDEF FPC}constructor TExtDataTreeStore.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtDataTreeStore.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +function TExtDirectRemotingProvider.JSClassName : string; begin + Result := 'Ext.direct.RemotingProvider'; end; -destructor TExtDataTreeStore.Destroy; begin - try - FRoot.Free; - FRootInterface.Free; - FRootObject.Free; - except end; +procedure TExtDirectRemotingProvider.InitDefaults; begin inherited; + FActions := TExtObject.CreateInternal(Self, 'actions'); + FNamespaceObject := TExtObject.CreateInternal(Self, 'namespace'); end; -procedure TExtDataTreeStore.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'append') and Assigned(FOnAppend) then - FOnAppend() - else if (AEvtName = 'beforeappend') and Assigned(FOnBeforeappend) then - FOnBeforeappend() - else if (AEvtName = 'beforecollapse') and Assigned(FOnBeforecollapse) then - FOnBeforecollapse() - else if (AEvtName = 'beforeexpand') and Assigned(FOnBeforeexpand) then - FOnBeforeexpand() - else if (AEvtName = 'beforeinsert') and Assigned(FOnBeforeinsert) then - FOnBeforeinsert() - else if (AEvtName = 'beforemove') and Assigned(FOnBeforemove) then - FOnBeforemove() - else if (AEvtName = 'beforeremove') and Assigned(FOnBeforeremove) then - FOnBeforeremove() - else if (AEvtName = 'collapse') and Assigned(FOnCollapse) then - FOnCollapse() - else if (AEvtName = 'expand') and Assigned(FOnExpand) then - FOnExpand() - else if (AEvtName = 'insert') and Assigned(FOnInsert) then - FOnInsert() - else if (AEvtName = 'load') and Assigned(FOnLoad) then - FOnLoad(TExtDataTreeStore(ParamAsObject('This')), TExtDataNodeInterface(ParamAsObject('Node')), TExtObjectList(ParamAsObject('Records')), ParamAsBoolean('Successful')) - else if (AEvtName = 'move') and Assigned(FOnMove) then - FOnMove() - else if (AEvtName = 'remove') and Assigned(FOnRemove) then - FOnRemove() - else if (AEvtName = 'sort') and Assigned(FOnSort) then - FOnSort(); -end; +{$IFDEF FPC}constructor TExtDirectRemotingProvider.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtDataStoreManagerSingleton.JSClassName : string; begin - Result := 'Ext.data.StoreManager'; +function TExtDirectRemotingProvider.Connect : TExtFunction; begin + JSCode(JSName + '.connect();', 'TExtDirectRemotingProvider'); + Result := Self; end; -{$IFDEF FPC}constructor TExtDataStoreManagerSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDataStoreManagerSingleton.Lookup(Store : String) : TExtFunction; begin - JSCode(JSName + '.lookup(' + VarToJSON([Store]) + ');', 'TExtDataStoreManagerSingleton'); - Result := Self; +constructor TExtDirectRemotingProvider.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -function TExtDataStoreManagerSingleton.Register(Stores : TExtDataStore) : TExtFunction; begin - JSCode(JSName + '.register(' + VarToJSON([Stores, false]) + ');', 'TExtDataStoreManagerSingleton'); +function TExtDirectRemotingProvider.Disconnect : TExtFunction; begin + JSCode(JSName + '.disconnect();', 'TExtDirectRemotingProvider'); Result := Self; end; -function TExtDataStoreManagerSingleton.Unregister(Stores : String) : TExtFunction; begin - JSCode(JSName + '.unregister(' + VarToJSON([Stores]) + ');', 'TExtDataStoreManagerSingleton'); +function TExtDirectRemotingProvider.IsConnected : TExtFunction; begin + JSCode(JSName + '.isConnected();', 'TExtDirectRemotingProvider'); Result := Self; end; -function TExtFormActionDirectLoad.JSClassName : string; begin - Result := 'Ext.form.action.DirectLoad'; +destructor TExtDirectRemotingProvider.Destroy; begin + try + FActions.Free; + FNamespaceObject.Free; + except end; + inherited; end; -{$IFDEF FPC}constructor TExtFormActionDirectLoad.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtDirectRemotingProvider.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'beforecall') and Assigned(FOnBeforecall) then + FOnBeforecall(TExtDirectRemotingProvider(ParamAsObject('Provider')), TExtDirectTransaction(ParamAsObject('Transaction')), TExtObject(ParamAsObject('Meta'))) + else if (AEvtName = 'beforecallback') and Assigned(FOnBeforecallback) then + FOnBeforecallback(TExtDirectRemotingProvider(ParamAsObject('Provider')), TExtDirectTransaction(ParamAsObject('Transaction'))) + else if (AEvtName = 'call') and Assigned(FOnCall) then + FOnCall(TExtDirectRemotingProvider(ParamAsObject('Provider')), TExtDirectTransaction(ParamAsObject('Transaction')), TExtObject(ParamAsObject('Meta'))); +end; procedure TExtDataStore.SetFAutoDestroy(Value : Boolean); begin FAutoDestroy := Value; @@ -35714,6 +37667,11 @@ procedure TExtDataStore.SetFClearRemovedOnLoad(Value : Boolean); begin JSCode('clearRemovedOnLoad:' + VarToJSON([Value])); end; +procedure TExtDataStore.SetFCurrentPage(Value : Integer); begin + FCurrentPage := Value; + JSCode(JSName + '.currentPage=' + VarToJSON([Value]) + ';'); +end; + procedure TExtDataStore.SetFData(Value : TExtObjectList); begin FData := Value; Value.DeleteFromGarbage; @@ -35924,675 +37882,278 @@ function TExtDataStore.GetAt(Index : Integer) : TExtFunction; begin Result := Self; end; -function TExtDataStore.GetById(Id : String) : TExtFunction; begin - JSCode(JSName + '.getById(' + VarToJSON([Id]) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.GetCount : TExtFunction; begin - JSCode(JSName + '.getCount();', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.GetGroups(GroupName : String = '') : TExtFunction; begin - JSCode(JSName + '.getGroups(' + VarToJSON([GroupName]) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.GetGroupString(Instance : TExtDataModel) : TExtFunction; begin - JSCode(JSName + '.getGroupString(' + VarToJSON([Instance, false]) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.GetPageFromRecordIndex(Index : Integer) : TExtFunction; begin - JSCode(JSName + '.getPageFromRecordIndex(' + VarToJSON([Index]) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.GetRange(Start : Integer; EndJS : Integer; Options : TExtObject = nil; OptionsCallback : TExtObject = nil; OptionsCallbackRange : TExtObjectList = nil; OptionsCallbackStart : Integer = 0; OptionsCallbackEnd : Integer = 0; OptionsCallbackOptions : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.getRange(' + VarToJSON([Start, EndJS, Options, false, OptionsCallback, false]) + ',' + VarToJSON(OptionsCallbackRange) + ',' + VarToJSON([OptionsCallbackStart, OptionsCallbackEnd, OptionsCallbackOptions]) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.GetTotalCount : TExtFunction; begin - JSCode(JSName + '.getTotalCount();', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.Group(Groupers : String; Direction : String = '') : TExtFunction; begin - JSCode(JSName + '.group(' + VarToJSON([Groupers, Direction]) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.IndexOf(RecordJS : TExtDataModel) : TExtFunction; begin - JSCode(JSName + '.indexOf(' + VarToJSON([RecordJS, false]) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.IndexOfId(Id : String) : TExtFunction; begin - JSCode(JSName + '.indexOfId(' + VarToJSON([Id]) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.IndexOfTotal(RecordJS : TExtDataModel) : TExtFunction; begin - JSCode(JSName + '.indexOfTotal(' + VarToJSON([RecordJS, false]) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.Insert(Index : Integer; Records : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.insert(' + VarToJSON([Index]) + ',' + VarToJSON(Records) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.IsFiltered : TExtFunction; begin - JSCode(JSName + '.isFiltered();', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.IsGrouped : TExtFunction; begin - JSCode(JSName + '.isGrouped();', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.Last(Grouped : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.last(' + VarToJSON([Grouped]) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.Load(Options : TExtFunction = nil) : TExtFunction; begin - JSCode(JSName + '.load(' + VarToJSON([Options, true]) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.LoadData(Data : TExtObjectList; Append : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.loadData(' + VarToJSON(Data) + ',' + VarToJSON([Append]) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.LoadPage(Page : Integer; Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.loadPage(' + VarToJSON([Page, Options, false]) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.LoadRawData(Data : TExtObjectList; Append : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.loadRawData(' + VarToJSON(Data) + ',' + VarToJSON([Append]) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.LoadRecords(Records : TExtObjectList; Options : TExtObject; OptionsAddRecords : Boolean = false; Param : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.loadRecords(' + VarToJSON(Records) + ',' + VarToJSON([Options, false, OptionsAddRecords, Param]) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.Max(Field : String; Grouped : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.max(' + VarToJSON([Field, Grouped]) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.Min(Field : String; Grouped : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.min(' + VarToJSON([Field, Grouped]) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.NextPage(Options : TExtObject) : TExtFunction; begin - JSCode(JSName + '.nextPage(' + VarToJSON([Options, false]) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.Prefetch(Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.prefetch(' + VarToJSON([Options, false]) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.PrefetchPage(Page : Integer; Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.prefetchPage(' + VarToJSON([Page, Options, false]) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.PrefetchRange : TExtFunction; begin - JSCode(JSName + '.prefetchRange();', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.PreviousPage(Options : TExtObject) : TExtFunction; begin - JSCode(JSName + '.previousPage(' + VarToJSON([Options, false]) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.Query(PropertyJS : String; Value : String; AnyMatch : Boolean = false; CaseSensitive : Boolean = false; ExactMatch : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.query(' + VarToJSON([PropertyJS, Value, AnyMatch, CaseSensitive, ExactMatch]) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.QueryBy(Fn : TExtFunction; FnRecord : TExtDataModel; FnId : TExtObject; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.queryBy(' + VarToJSON([Fn, true, FnRecord, false, FnId, false, Scope, false]) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.RejectChanges : TExtFunction; begin - JSCode(JSName + '.rejectChanges();', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.Remove(Records : Integer) : TExtFunction; begin - JSCode(JSName + '.remove(' + VarToJSON([Records]) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.RemoveAll(Silent : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.removeAll(' + VarToJSON([Silent]) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.RemoveAt(Index : Integer; Count : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.removeAt(' + VarToJSON([Index, Count]) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.RemoveFilter(ToRemove : String; ApplyFilters : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.removeFilter(' + VarToJSON([ToRemove, ApplyFilters]) + ');', 'TExtDataStore'); - Result := Self; -end; - -function TExtDataStore.Sum(Field : String; Grouped : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.sum(' + VarToJSON([Field, Grouped]) + ');', 'TExtDataStore'); - Result := Self; -end; - -destructor TExtDataStore.Destroy; begin - try - FData.Free; - FData_.Free; - FData_Map.Free; - FDataList.Free; - FGroupers.Free; - FProxyObject.Free; - FProxyProxy.Free; - except end; - inherited; -end; - -function TExtFormFieldHidden.JSClassName : string; begin - Result := 'Ext.form.field.Hidden'; -end; - -{$IFDEF FPC}constructor TExtFormFieldHidden.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtFormFieldText.SetFAllowBlank(Value : Boolean); begin - FAllowBlank := Value; - JSCode('allowBlank:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldText.SetFAllowOnlyWhitespace(Value : Boolean); begin - FAllowOnlyWhitespace := Value; - JSCode('allowOnlyWhitespace:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldText.SetFBlankText(Value : String); begin - FBlankText := Value; - JSCode('blankText:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldText.SetFDisableKeyFilter(Value : Boolean); begin - FDisableKeyFilter := Value; - JSCode('disableKeyFilter:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldText.SetFEmptyCls(Value : String); begin - FEmptyCls := Value; - JSCode('emptyCls:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldText.SetFEmptyText(Value : String); begin - FEmptyText := Value; - JSCode('emptyText:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldText.SetFEnableKeyEvents(Value : Boolean); begin - FEnableKeyEvents := Value; - JSCode('enableKeyEvents:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldText.SetFEnforceMaxLength(Value : Boolean); begin - FEnforceMaxLength := Value; - JSCode('enforceMaxLength:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldText.SetFGrow(Value : Boolean); begin - FGrow := Value; - JSCode('grow:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldText.SetFGrowAppend(Value : String); begin - FGrowAppend := Value; - JSCode('growAppend:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldText.SetFGrowMax(Value : Integer); begin - FGrowMax := Value; - JSCode('growMax:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldText.SetFGrowMin(Value : Integer); begin - FGrowMin := Value; - JSCode('growMin:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldText.SetFMaskRe(Value : TRegExp); begin - FMaskRe := Value; - JSCode('maskRe:' + VarToJSON([#3 +Value])); -end; - -procedure TExtFormFieldText.SetFMaxLength(Value : Integer); begin - FMaxLength := Value; - JSCode('maxLength:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldText.SetFMaxLengthText(Value : String); begin - FMaxLengthText := Value; - JSCode('maxLengthText:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldText.SetFMinLength(Value : Integer); begin - FMinLength := Value; - JSCode('minLength:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldText.SetFRegex(Value : TRegExp); begin - FRegex := Value; - JSCode('regex:' + VarToJSON([#3 +Value])); -end; - -procedure TExtFormFieldText.SetFRegexText(Value : String); begin - FRegexText := Value; - JSCode('regexText:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldText.SetFRequiredCls(Value : String); begin - FRequiredCls := Value; - JSCode('requiredCls:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldText.SetFSelectOnFocus(Value : Boolean); begin - FSelectOnFocus := Value; - JSCode('selectOnFocus:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldText.SetFSize(Value : Integer); begin - FSize := Value; - JSCode('size:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldText.SetFStripCharsRe(Value : TRegExp); begin - FStripCharsRe := Value; - JSCode('stripCharsRe:' + VarToJSON([#3 +Value])); -end; - -procedure TExtFormFieldText.SetFValidateBlank(Value : Boolean); begin - FValidateBlank := Value; - JSCode('validateBlank:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldText.SetFValidator(Value : TExtFunction); begin - FValidator := Value; - JSCode('validator:' + VarToJSON([Value, true])); -end; - -procedure TExtFormFieldText.SetFVtype(Value : String); begin - FVtype := Value; - JSCode('vtype:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldText.SetFVtypeText(Value : String); begin - FVtypeText := Value; - JSCode('vtypeText:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldText.SetFOnAutosize(Value : TExtFormFieldTextOnAutosize); begin - if Assigned(FOnAutosize) then - JSCode(JSName+'.events ["autosize"].listeners=[];'); - if Assigned(Value) then - AddListener('autosize', Ajax('autosize', ['This', '%0.nm','Width', '%1'], true)); - FOnAutosize := Value; -end; - -procedure TExtFormFieldText.SetFOnKeydown(Value : TExtFormFieldTextOnKeydown); begin - if Assigned(FOnKeydown) then - JSCode(JSName+'.events ["keydown"].listeners=[];'); - if Assigned(Value) then - AddListener('keydown', Ajax('keydown', ['This', '%0.nm','E', '%1.nm'], true)); - FOnKeydown := Value; -end; - -procedure TExtFormFieldText.SetFOnKeypress(Value : TExtFormFieldTextOnKeypress); begin - if Assigned(FOnKeypress) then - JSCode(JSName+'.events ["keypress"].listeners=[];'); - if Assigned(Value) then - AddListener('keypress', Ajax('keypress', ['This', '%0.nm','E', '%1.nm'], true)); - FOnKeypress := Value; -end; - -procedure TExtFormFieldText.SetFOnKeyup(Value : TExtFormFieldTextOnKeyup); begin - if Assigned(FOnKeyup) then - JSCode(JSName+'.events ["keyup"].listeners=[];'); - if Assigned(Value) then - AddListener('keyup', Ajax('keyup', ['This', '%0.nm','E', '%1.nm'], true)); - FOnKeyup := Value; -end; - -function TExtFormFieldText.JSClassName : string; begin - Result := 'Ext.form.field.Text'; -end; - -procedure TExtFormFieldText.InitDefaults; begin - inherited; - FGrowAppend := 'W'; - FSize := 20; -end; - -{$IFDEF FPC}constructor TExtFormFieldText.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtFormFieldText.AutoSize : TExtFunction; begin - JSCode(JSName + '.autoSize();', 'TExtFormFieldText'); - Result := Self; -end; - -constructor TExtFormFieldText.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; -end; - -function TExtFormFieldText.GetErrors(Value : TExtObject) : TExtFunction; begin - JSCode(JSName + '.getErrors(' + VarToJSON([Value, false]) + ');', 'TExtFormFieldText'); +function TExtDataStore.GetById(Id : String) : TExtFunction; begin + JSCode(JSName + '.getById(' + VarToJSON([Id]) + ');', 'TExtDataStore'); Result := Self; end; -function TExtFormFieldText.GetRawValue : TExtFunction; begin - JSCode(JSName + '.getRawValue();', 'TExtFormFieldText'); +function TExtDataStore.GetCount : TExtFunction; begin + JSCode(JSName + '.getCount();', 'TExtDataStore'); Result := Self; end; -function TExtFormFieldText.ProcessRawValue(Value : String) : TExtFunction; begin - JSCode(JSName + '.processRawValue(' + VarToJSON([Value]) + ');', 'TExtFormFieldText'); +function TExtDataStore.GetGroups(GroupName : String = '') : TExtFunction; begin + JSCode(JSName + '.getGroups(' + VarToJSON([GroupName]) + ');', 'TExtDataStore'); Result := Self; end; -function TExtFormFieldText.Reset : TExtFunction; begin - JSCode(JSName + '.reset();', 'TExtFormFieldText'); +function TExtDataStore.GetGroupString(Instance : TExtDataModel) : TExtFunction; begin + JSCode(JSName + '.getGroupString(' + VarToJSON([Instance, false]) + ');', 'TExtDataStore'); Result := Self; end; -function TExtFormFieldText.SelectText(Start : Integer = 0; EndJS : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.selectText(' + VarToJSON([Start, EndJS]) + ');', 'TExtFormFieldText'); +function TExtDataStore.GetPageFromRecordIndex(Index : Integer) : TExtFunction; begin + JSCode(JSName + '.getPageFromRecordIndex(' + VarToJSON([Index]) + ');', 'TExtDataStore'); Result := Self; end; -function TExtFormFieldText.SetValue(Value : TExtObject) : TExtFunction; begin - JSCode(JSName + '.setValue(' + VarToJSON([Value, false]) + ');', 'TExtFormFieldText'); +function TExtDataStore.GetRange(Start : Integer; EndJS : Integer; Options : TExtObject = nil; OptionsCallback : TExtObject = nil; OptionsCallbackRange : TExtObjectList = nil; OptionsCallbackStart : Integer = 0; OptionsCallbackEnd : Integer = 0; OptionsCallbackOptions : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.getRange(' + VarToJSON([Start, EndJS, Options, false, OptionsCallback, false]) + ',' + VarToJSON(OptionsCallbackRange) + ',' + VarToJSON([OptionsCallbackStart, OptionsCallbackEnd, OptionsCallbackOptions]) + ');', 'TExtDataStore'); Result := Self; end; -procedure TExtFormFieldText.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'autosize') and Assigned(FOnAutosize) then - FOnAutosize(TExtFormFieldText(ParamAsObject('This')), ParamAsInteger('Width')) - else if (AEvtName = 'keydown') and Assigned(FOnKeydown) then - FOnKeydown(TExtFormFieldText(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'keypress') and Assigned(FOnKeypress) then - FOnKeypress(TExtFormFieldText(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'keyup') and Assigned(FOnKeyup) then - FOnKeyup(TExtFormFieldText(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))); +function TExtDataStore.GetTotalCount : TExtFunction; begin + JSCode(JSName + '.getTotalCount();', 'TExtDataStore'); + Result := Self; end; -procedure TExtToolbarTextItem.SetFText(Value : String); begin - FText := Value; - if not ConfigAvailable(JSName) then - SetText(Value) - else - JSCode('text:' + VarToJSON([Value])); +function TExtDataStore.Group(Groupers : String; Direction : String = '') : TExtFunction; begin + JSCode(JSName + '.group(' + VarToJSON([Groupers, Direction]) + ');', 'TExtDataStore'); + Result := Self; end; -function TExtToolbarTextItem.JSClassName : string; begin - Result := 'Ext.toolbar.TextItem'; +function TExtDataStore.IndexOf(RecordJS : TExtDataModel) : TExtFunction; begin + JSCode(JSName + '.indexOf(' + VarToJSON([RecordJS, false]) + ');', 'TExtDataStore'); + Result := Self; end; -{$IFDEF FPC}constructor TExtToolbarTextItem.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtToolbarTextItem.SetText(Text : String) : TExtFunction; begin - JSCode(JSName + '.setText(' + VarToJSON([Text]) + ');', 'TExtToolbarTextItem'); +function TExtDataStore.IndexOfId(Id : String) : TExtFunction; begin + JSCode(JSName + '.indexOfId(' + VarToJSON([Id]) + ');', 'TExtDataStore'); Result := Self; end; -procedure TExtFormFieldCheckbox.SetFAfterBoxLabelTextTpl(Value : String); begin - FAfterBoxLabelTextTpl := Value; - JSCode('afterBoxLabelTextTpl:' + VarToJSON([Value])); +function TExtDataStore.IndexOfTotal(RecordJS : TExtDataModel) : TExtFunction; begin + JSCode(JSName + '.indexOfTotal(' + VarToJSON([RecordJS, false]) + ');', 'TExtDataStore'); + Result := Self; end; -procedure TExtFormFieldCheckbox.SetFAfterBoxLabelTextTplList(Value : TExtObjectList); begin - FAfterBoxLabelTextTplList := Value; - Value.DeleteFromGarbage; - JSCode('afterBoxLabelTextTpl:' + VarToJSON([Value, false])); +function TExtDataStore.Insert(Index : Integer; Records : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.insert(' + VarToJSON([Index]) + ',' + VarToJSON(Records) + ');', 'TExtDataStore'); + Result := Self; end; -procedure TExtFormFieldCheckbox.SetFAfterBoxLabelTextTplTemplate(Value : TExtXTemplate); begin - FAfterBoxLabelTextTplTemplate := Value; - Value.DeleteFromGarbage; - JSCode('afterBoxLabelTextTpl:' + VarToJSON([Value, false])); +function TExtDataStore.IsFiltered : TExtFunction; begin + JSCode(JSName + '.isFiltered();', 'TExtDataStore'); + Result := Self; end; -procedure TExtFormFieldCheckbox.SetFAfterBoxLabelTpl(Value : String); begin - FAfterBoxLabelTpl := Value; - JSCode('afterBoxLabelTpl:' + VarToJSON([Value])); +function TExtDataStore.IsGrouped : TExtFunction; begin + JSCode(JSName + '.isGrouped();', 'TExtDataStore'); + Result := Self; end; -procedure TExtFormFieldCheckbox.SetFAfterBoxLabelTplList(Value : TExtObjectList); begin - FAfterBoxLabelTplList := Value; - Value.DeleteFromGarbage; - JSCode('afterBoxLabelTpl:' + VarToJSON([Value, false])); +function TExtDataStore.Last(Grouped : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.last(' + VarToJSON([Grouped]) + ');', 'TExtDataStore'); + Result := Self; end; -procedure TExtFormFieldCheckbox.SetFAfterBoxLabelTplTemplate(Value : TExtXTemplate); begin - FAfterBoxLabelTplTemplate := Value; - Value.DeleteFromGarbage; - JSCode('afterBoxLabelTpl:' + VarToJSON([Value, false])); +function TExtDataStore.Load(Options : TExtFunction = nil) : TExtFunction; begin + JSCode(JSName + '.load(' + VarToJSON([Options, true]) + ');', 'TExtDataStore'); + Result := Self; end; -procedure TExtFormFieldCheckbox.SetFBeforeBoxLabelTextTpl(Value : String); begin - FBeforeBoxLabelTextTpl := Value; - JSCode('beforeBoxLabelTextTpl:' + VarToJSON([Value])); +function TExtDataStore.LoadData(Data : TExtObjectList; Append : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.loadData(' + VarToJSON(Data) + ',' + VarToJSON([Append]) + ');', 'TExtDataStore'); + Result := Self; end; -procedure TExtFormFieldCheckbox.SetFBeforeBoxLabelTextTplList(Value : TExtObjectList); begin - FBeforeBoxLabelTextTplList := Value; - Value.DeleteFromGarbage; - JSCode('beforeBoxLabelTextTpl:' + VarToJSON([Value, false])); +function TExtDataStore.LoadPage(Page : Integer; Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.loadPage(' + VarToJSON([Page, Options, false]) + ');', 'TExtDataStore'); + Result := Self; end; -procedure TExtFormFieldCheckbox.SetFBeforeBoxLabelTextTplTemplate(Value : TExtXTemplate); begin - FBeforeBoxLabelTextTplTemplate := Value; - Value.DeleteFromGarbage; - JSCode('beforeBoxLabelTextTpl:' + VarToJSON([Value, false])); +function TExtDataStore.LoadRawData(Data : TExtObjectList; Append : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.loadRawData(' + VarToJSON(Data) + ',' + VarToJSON([Append]) + ');', 'TExtDataStore'); + Result := Self; end; -procedure TExtFormFieldCheckbox.SetFBeforeBoxLabelTpl(Value : String); begin - FBeforeBoxLabelTpl := Value; - JSCode('beforeBoxLabelTpl:' + VarToJSON([Value])); +function TExtDataStore.LoadRecords(Records : TExtObjectList; Options : TExtObject; OptionsAddRecords : Boolean = false; Param : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.loadRecords(' + VarToJSON(Records) + ',' + VarToJSON([Options, false, OptionsAddRecords, Param]) + ');', 'TExtDataStore'); + Result := Self; end; -procedure TExtFormFieldCheckbox.SetFBeforeBoxLabelTplList(Value : TExtObjectList); begin - FBeforeBoxLabelTplList := Value; - Value.DeleteFromGarbage; - JSCode('beforeBoxLabelTpl:' + VarToJSON([Value, false])); +function TExtDataStore.Max(Field : String; Grouped : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.max(' + VarToJSON([Field, Grouped]) + ');', 'TExtDataStore'); + Result := Self; end; -procedure TExtFormFieldCheckbox.SetFBeforeBoxLabelTplTemplate(Value : TExtXTemplate); begin - FBeforeBoxLabelTplTemplate := Value; - Value.DeleteFromGarbage; - JSCode('beforeBoxLabelTpl:' + VarToJSON([Value, false])); +function TExtDataStore.Min(Field : String; Grouped : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.min(' + VarToJSON([Field, Grouped]) + ');', 'TExtDataStore'); + Result := Self; end; -procedure TExtFormFieldCheckbox.SetFBoxLabel(Value : String); begin - FBoxLabel := Value; - if not ConfigAvailable(JSName) then - SetBoxLabel(Value) - else - JSCode('boxLabel:' + VarToJSON([Value])); +function TExtDataStore.NextPage(Options : TExtObject) : TExtFunction; begin + JSCode(JSName + '.nextPage(' + VarToJSON([Options, false]) + ');', 'TExtDataStore'); + Result := Self; end; -procedure TExtFormFieldCheckbox.SetFBoxLabelAlign(Value : String); begin - FBoxLabelAlign := Value; - JSCode('boxLabelAlign:' + VarToJSON([Value])); +function TExtDataStore.Prefetch(Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.prefetch(' + VarToJSON([Options, false]) + ');', 'TExtDataStore'); + Result := Self; end; -procedure TExtFormFieldCheckbox.SetFBoxLabelAttrTpl(Value : String); begin - FBoxLabelAttrTpl := Value; - JSCode('boxLabelAttrTpl:' + VarToJSON([Value])); +function TExtDataStore.PrefetchPage(Page : Integer; Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.prefetchPage(' + VarToJSON([Page, Options, false]) + ');', 'TExtDataStore'); + Result := Self; end; -procedure TExtFormFieldCheckbox.SetFBoxLabelAttrTplList(Value : TExtObjectList); begin - FBoxLabelAttrTplList := Value; - Value.DeleteFromGarbage; - JSCode('boxLabelAttrTpl:' + VarToJSON([Value, false])); +function TExtDataStore.PrefetchRange : TExtFunction; begin + JSCode(JSName + '.prefetchRange();', 'TExtDataStore'); + Result := Self; end; -procedure TExtFormFieldCheckbox.SetFBoxLabelAttrTplTemplate(Value : TExtXTemplate); begin - FBoxLabelAttrTplTemplate := Value; - Value.DeleteFromGarbage; - JSCode('boxLabelAttrTpl:' + VarToJSON([Value, false])); +function TExtDataStore.PreviousPage(Options : TExtObject) : TExtFunction; begin + JSCode(JSName + '.previousPage(' + VarToJSON([Options, false]) + ');', 'TExtDataStore'); + Result := Self; end; -procedure TExtFormFieldCheckbox.SetFBoxLabelCls(Value : String); begin - FBoxLabelCls := Value; - JSCode('boxLabelCls:' + VarToJSON([Value])); +function TExtDataStore.Query(PropertyJS : String; Value : String; AnyMatch : Boolean = false; CaseSensitive : Boolean = false; ExactMatch : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.query(' + VarToJSON([PropertyJS, Value, AnyMatch, CaseSensitive, ExactMatch]) + ');', 'TExtDataStore'); + Result := Self; end; -procedure TExtFormFieldCheckbox.SetFChecked(Value : Boolean); begin - FChecked := Value; - JSCode('checked:' + VarToJSON([Value])); +function TExtDataStore.QueryBy(Fn : TExtFunction; FnRecord : TExtDataModel; FnId : TExtObject; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.queryBy(' + VarToJSON([Fn, true, FnRecord, false, FnId, false, Scope, false]) + ');', 'TExtDataStore'); + Result := Self; end; -procedure TExtFormFieldCheckbox.SetFCheckedCls(Value : String); begin - FCheckedCls := Value; - JSCode('checkedCls:' + VarToJSON([Value])); +function TExtDataStore.RejectChanges : TExtFunction; begin + JSCode(JSName + '.rejectChanges();', 'TExtDataStore'); + Result := Self; end; -procedure TExtFormFieldCheckbox.SetFFieldBodyCls(Value : String); begin - FFieldBodyCls := Value; - JSCode('fieldBodyCls:' + VarToJSON([Value])); +function TExtDataStore.Remove(Records : Integer) : TExtFunction; begin + JSCode(JSName + '.remove(' + VarToJSON([Records]) + ');', 'TExtDataStore'); + Result := Self; end; -procedure TExtFormFieldCheckbox.SetFFieldCls(Value : String); begin - FFieldCls := Value; - JSCode('fieldCls:' + VarToJSON([Value])); +function TExtDataStore.RemoveAll(Silent : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.removeAll(' + VarToJSON([Silent]) + ');', 'TExtDataStore'); + Result := Self; end; -procedure TExtFormFieldCheckbox.SetFFocusCls(Value : String); begin - FFocusCls := Value; - JSCode('focusCls:' + VarToJSON([Value])); +function TExtDataStore.RemoveAt(Index : Integer; Count : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.removeAt(' + VarToJSON([Index, Count]) + ');', 'TExtDataStore'); + Result := Self; end; -procedure TExtFormFieldCheckbox.SetFHandler(Value : TExtFunction); begin - FHandler := Value; - JSCode('handler:' + VarToJSON([Value, true])); +function TExtDataStore.RemoveFilter(ToRemove : String; ApplyFilters : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.removeFilter(' + VarToJSON([ToRemove, ApplyFilters]) + ');', 'TExtDataStore'); + Result := Self; end; -procedure TExtFormFieldCheckbox.SetFInputValue(Value : String); begin - FInputValue := Value; - JSCode('inputValue:' + VarToJSON([Value])); +function TExtDataStore.Sum(Field : String; Grouped : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.sum(' + VarToJSON([Field, Grouped]) + ');', 'TExtDataStore'); + Result := Self; end; -procedure TExtFormFieldCheckbox.SetFOriginalValue(Value : TExtObject); begin - FOriginalValue := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.originalValue=' + VarToJSON([Value, false]) + ';'); +destructor TExtDataStore.Destroy; begin + try + FData.Free; + FData_.Free; + FData_Map.Free; + FDataList.Free; + FGroupers.Free; + FProxyObject.Free; + FProxyProxy.Free; + except end; + inherited; end; -procedure TExtFormFieldCheckbox.SetFScope(Value : TExtObject); begin - FScope := Value; +procedure TExtDirectPollingProvider.SetFBaseParams(Value : TExtObject); begin + FBaseParams := Value; Value.DeleteFromGarbage; - JSCode('scope:' + VarToJSON([Value, false])); + JSCode('baseParams:' + VarToJSON([Value, false])); end; -procedure TExtFormFieldCheckbox.SetFUncheckedValue(Value : String); begin - FUncheckedValue := Value; - JSCode('uncheckedValue:' + VarToJSON([Value])); +procedure TExtDirectPollingProvider.SetFInterval(Value : Integer); begin + FInterval := Value; + JSCode('interval:' + VarToJSON([Value])); end; -function TExtFormFieldCheckbox.JSClassName : string; begin - Result := 'Ext.form.field.Checkbox'; +procedure TExtDirectPollingProvider.SetFUrl(Value : String); begin + FUrl := Value; + JSCode('url:' + VarToJSON([Value])); end; -procedure TExtFormFieldCheckbox.InitDefaults; begin - inherited; - FAfterBoxLabelTextTplList := TExtObjectList.Create(Self, 'afterBoxLabelTextTpl'); - FAfterBoxLabelTextTplTemplate := TExtXTemplate.CreateInternal(Self, 'afterBoxLabelTextTpl'); - FAfterBoxLabelTplList := TExtObjectList.Create(Self, 'afterBoxLabelTpl'); - FAfterBoxLabelTplTemplate := TExtXTemplate.CreateInternal(Self, 'afterBoxLabelTpl'); - FBeforeBoxLabelTextTplList := TExtObjectList.Create(Self, 'beforeBoxLabelTextTpl'); - FBeforeBoxLabelTextTplTemplate := TExtXTemplate.CreateInternal(Self, 'beforeBoxLabelTextTpl'); - FBeforeBoxLabelTplList := TExtObjectList.Create(Self, 'beforeBoxLabelTpl'); - FBeforeBoxLabelTplTemplate := TExtXTemplate.CreateInternal(Self, 'beforeBoxLabelTpl'); - FBoxLabelAttrTplList := TExtObjectList.Create(Self, 'boxLabelAttrTpl'); - FBoxLabelAttrTplTemplate := TExtXTemplate.CreateInternal(Self, 'boxLabelAttrTpl'); - FOriginalValue := TExtObject.CreateInternal(Self, 'originalValue'); - FScope := TExtObject.CreateInternal(Self, 'scope'); +procedure TExtDirectPollingProvider.SetFUrlFunction(Value : TExtFunction); begin + FUrlFunction := Value; + JSCode('url:' + VarToJSON([Value, true])); end; -{$IFDEF FPC}constructor TExtFormFieldCheckbox.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtDirectPollingProvider.SetFOnBeforepoll(Value : TExtDirectPollingProviderOnBeforepoll); begin + if Assigned(FOnBeforepoll) then + JSCode(JSName+'.events ["beforepoll"].listeners=[];'); + if Assigned(Value) then + AddListener('beforepoll', Ajax('beforepoll', ['This', '%0.nm'], true)); + FOnBeforepoll := Value; +end; -constructor TExtFormFieldCheckbox.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtDirectPollingProvider.SetFOnPoll(Value : TExtDirectPollingProviderOnPoll); begin + if Assigned(FOnPoll) then + JSCode(JSName+'.events ["poll"].listeners=[];'); + if Assigned(Value) then + AddListener('poll', Ajax('poll', ['This', '%0.nm'], true)); + FOnPoll := Value; end; -function TExtFormFieldCheckbox.GetRawValue : TExtFunction; begin - JSCode(JSName + '.getRawValue();', 'TExtFormFieldCheckbox'); - Result := Self; +function TExtDirectPollingProvider.JSClassName : string; begin + Result := 'Ext.direct.PollingProvider'; end; -function TExtFormFieldCheckbox.GetSubmitValue : TExtFunction; begin - JSCode(JSName + '.getSubmitValue();', 'TExtFormFieldCheckbox'); - Result := Self; +procedure TExtDirectPollingProvider.InitDefaults; begin + inherited; + FBaseParams := TExtObject.CreateInternal(Self, 'baseParams'); + FInterval := 3; end; -function TExtFormFieldCheckbox.GetValue : TExtFunction; begin - JSCode(JSName + '.getValue();', 'TExtFormFieldCheckbox'); +{$IFDEF FPC}constructor TExtDirectPollingProvider.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDirectPollingProvider.Connect : TExtFunction; begin + JSCode(JSName + '.connect();', 'TExtDirectPollingProvider'); Result := Self; end; -function TExtFormFieldCheckbox.SetBoxLabel(BoxLabel : String) : TExtFunction; begin - JSCode(JSName + '.setBoxLabel(' + VarToJSON([BoxLabel]) + ');', 'TExtFormFieldCheckbox'); - Result := Self; +constructor TExtDirectPollingProvider.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -function TExtFormFieldCheckbox.SetRawValue(Value : Boolean) : TExtFunction; begin - JSCode(JSName + '.setRawValue(' + VarToJSON([Value]) + ');', 'TExtFormFieldCheckbox'); +function TExtDirectPollingProvider.Disconnect : TExtFunction; begin + JSCode(JSName + '.disconnect();', 'TExtDirectPollingProvider'); Result := Self; end; -function TExtFormFieldCheckbox.SetValue(Checked : Boolean) : TExtFunction; begin - JSCode(JSName + '.setValue(' + VarToJSON([Checked]) + ');', 'TExtFormFieldCheckbox'); +function TExtDirectPollingProvider.IsConnected : TExtFunction; begin + JSCode(JSName + '.isConnected();', 'TExtDirectPollingProvider'); Result := Self; end; -destructor TExtFormFieldCheckbox.Destroy; begin +destructor TExtDirectPollingProvider.Destroy; begin try - FAfterBoxLabelTextTplList.Free; - FAfterBoxLabelTextTplTemplate.Free; - FAfterBoxLabelTplList.Free; - FAfterBoxLabelTplTemplate.Free; - FBeforeBoxLabelTextTplList.Free; - FBeforeBoxLabelTextTplTemplate.Free; - FBeforeBoxLabelTplList.Free; - FBeforeBoxLabelTplTemplate.Free; - FBoxLabelAttrTplList.Free; - FBoxLabelAttrTplTemplate.Free; - FOriginalValue.Free; - FScope.Free; + FBaseParams.Free; except end; inherited; end; +procedure TExtDirectPollingProvider.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'beforepoll') and Assigned(FOnBeforepoll) then + FOnBeforepoll(TExtDirectPollingProvider(ParamAsObject('This'))) + else if (AEvtName = 'poll') and Assigned(FOnPoll) then + FOnPoll(TExtDirectPollingProvider(ParamAsObject('This'))); +end; + procedure TExtFormFieldDisplay.SetFFieldCls(Value : String); begin FFieldCls := Value; JSCode('fieldCls:' + VarToJSON([Value])); @@ -36637,278 +38198,353 @@ destructor TExtFormFieldDisplay.Destroy; begin inherited; end; -function TExtFormFieldFileButton.JSClassName : string; begin - Result := 'Ext.form.field.FileButton'; +function TExtLayoutComponentAuto.JSClassName : string; begin + Result := 'Ext.layout.component.Auto'; end; -{$IFDEF FPC}constructor TExtFormFieldFileButton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtLayoutComponentAuto.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtChart.SetFAnimate(Value : Boolean); begin - FAnimate := Value; - JSCode('animate:' + VarToJSON([Value])); +procedure TExtLayoutContainerAuto.SetFManageOverflow(Value : Boolean); begin + FManageOverflow := Value; + JSCode(JSName + '.manageOverflow=' + VarToJSON([Value]) + ';'); end; -procedure TExtChart.SetFAnimateObject(Value : TExtObject); begin - FAnimateObject := Value; - Value.DeleteFromGarbage; - JSCode('animate:' + VarToJSON([Value, false])); +procedure TExtLayoutContainerAuto.SetFManagePadding(Value : Boolean); begin + FManagePadding := Value; + JSCode(JSName + '.managePadding=' + VarToJSON([Value]) + ';'); end; -procedure TExtChart.SetFAxes(Value : TExtObjectList); begin - FAxes := Value; - Value.DeleteFromGarbage; - JSCode('axes:' + VarToJSON([Value, false])); +procedure TExtLayoutContainerAuto.SetFReserveScrollbar(Value : Boolean); begin + FReserveScrollbar := Value; + JSCode('reserveScrollbar:' + VarToJSON([Value])); end; -procedure TExtChart.SetFBackground(Value : TExtObject); begin - FBackground := Value; - Value.DeleteFromGarbage; - JSCode('background:' + VarToJSON([Value, false])); +function TExtLayoutContainerAuto.JSClassName : string; begin + Result := 'Ext.layout.container.Auto'; end; -procedure TExtChart.SetFBackgroundBoolean(Value : Boolean); begin - FBackgroundBoolean := Value; - JSCode('background:' + VarToJSON([Value])); +{$IFDEF FPC}constructor TExtLayoutContainerAuto.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +procedure TExtDrawText.SetFDegrees(Value : Integer); begin + FDegrees := Value; + JSCode('degrees:' + VarToJSON([Value])); end; -procedure TExtChart.SetFGradients(Value : TExtObjectList); begin - FGradients := Value; - Value.DeleteFromGarbage; - JSCode('gradients:' + VarToJSON([Value, false])); +procedure TExtDrawText.SetFStyleSelector(Value : String); begin + FStyleSelector := Value; + JSCode('styleSelector:' + VarToJSON([Value])); end; -procedure TExtChart.SetFHasListeners(Value : TExtObject); begin - FHasListeners := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.hasListeners=' + VarToJSON([Value, false]) + ';'); +procedure TExtDrawText.SetFText(Value : String); begin + FText := Value; + if not ConfigAvailable(JSName) then + SetText(Value) + else + JSCode('text:' + VarToJSON([Value])); end; -procedure TExtChart.SetFInsetPadding(Value : Integer); begin - FInsetPadding := Value; - JSCode('insetPadding:' + VarToJSON([Value])); +function TExtDrawText.JSClassName : string; begin + Result := 'Ext.draw.Text'; end; -procedure TExtChart.SetFIsObservable(Value : Boolean); begin - FIsObservable := Value; - JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); +{$IFDEF FPC}constructor TExtDrawText.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDrawText.SetAngle(Degrees : Integer) : TExtFunction; begin + JSCode(JSName + '.setAngle(' + VarToJSON([Degrees]) + ');', 'TExtDrawText'); + Result := Self; end; -procedure TExtChart.SetFLegend(Value : Boolean); begin - FLegend := Value; - JSCode('legend:' + VarToJSON([Value])); +function TExtDrawText.SetText(T : String) : TExtFunction; begin + JSCode(JSName + '.setText(' + VarToJSON([T]) + ');', 'TExtDrawText'); + Result := Self; end; -procedure TExtChart.SetFLegendObject(Value : TExtObject); begin - FLegendObject := Value; +procedure TExtDataProxyAjax.SetFActionMethods(Value : TExtObject); begin + FActionMethods := Value; Value.DeleteFromGarbage; - JSCode('legend:' + VarToJSON([Value, false])); + JSCode(JSName + '.actionMethods=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtChart.SetFListeners(Value : TExtObject); begin - FListeners := Value; +procedure TExtDataProxyAjax.SetFBinary(Value : Boolean); begin + FBinary := Value; + JSCode('binary:' + VarToJSON([Value])); +end; + +procedure TExtDataProxyAjax.SetFHeaders(Value : TExtObject); begin + FHeaders := Value; Value.DeleteFromGarbage; - JSCode('listeners:' + VarToJSON([Value, false])); + JSCode('headers:' + VarToJSON([Value, false])); end; -procedure TExtChart.SetFMask(Value : Boolean); begin - FMask := Value; - JSCode('mask:' + VarToJSON([Value])); +function TExtDataProxyAjax.JSClassName : string; begin + Result := 'Ext.data.proxy.Ajax'; end; -procedure TExtChart.SetFMaskString(Value : String); begin - FMaskString := Value; - JSCode('mask:' + VarToJSON([Value])); +procedure TExtDataProxyAjax.InitDefaults; begin + inherited; + FActionMethods := TExtObject.CreateInternal(Self, 'actionMethods'); + FHeaders := TExtObject.CreateInternal(Self, 'headers'); end; -procedure TExtChart.SetFSeries(Value : TExtObjectList); begin - FSeries := Value; - Value.DeleteFromGarbage; - JSCode('series:' + VarToJSON([Value, false])); +{$IFDEF FPC}constructor TExtDataProxyAjax.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtDataProxyAjax.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtChart.SetFStore(Value : TExtDataStore); begin - FStore := Value; - Value.DeleteFromGarbage; - JSCode('store:' + VarToJSON([Value, false])); +function TExtDataProxyAjax.GetMethod(Request : TExtDataRequest) : TExtFunction; begin + JSCode(JSName + '.getMethod(' + VarToJSON([Request, false]) + ');', 'TExtDataProxyAjax'); + Result := Self; end; -procedure TExtChart.SetFTheme(Value : String); begin - FTheme := Value; - JSCode('theme:' + VarToJSON([Value])); +destructor TExtDataProxyAjax.Destroy; begin + try + FActionMethods.Free; + FHeaders.Free; + except end; + inherited; +end; + +procedure TExtChartAxisCategory.SetFCalculateCategoryCount(Value : Boolean); begin + FCalculateCategoryCount := Value; + JSCode('calculateCategoryCount:' + VarToJSON([Value])); +end; + +procedure TExtChartAxisCategory.SetFCategoryNames(Value : String); begin + FCategoryNames := Value; + JSCode('categoryNames:' + VarToJSON([Value])); +end; + +function TExtChartAxisCategory.JSClassName : string; begin + Result := 'Ext.chart.axis.Category'; +end; + +{$IFDEF FPC}constructor TExtChartAxisCategory.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +procedure TExtSliderMulti.SetFAnimate(Value : Boolean); begin + FAnimate := Value; + JSCode('animate:' + VarToJSON([Value])); +end; + +procedure TExtSliderMulti.SetFClickToChange(Value : Boolean); begin + FClickToChange := Value; + JSCode('clickToChange:' + VarToJSON([Value])); +end; + +procedure TExtSliderMulti.SetFConstrainThumbs(Value : Boolean); begin + FConstrainThumbs := Value; + JSCode('constrainThumbs:' + VarToJSON([Value])); +end; + +procedure TExtSliderMulti.SetFDecimalPrecision(Value : Integer); begin + FDecimalPrecision := Value; + JSCode('decimalPrecision:' + VarToJSON([Value])); +end; + +procedure TExtSliderMulti.SetFDecimalPrecisionBoolean(Value : Boolean); begin + FDecimalPrecisionBoolean := Value; + JSCode('decimalPrecision:' + VarToJSON([Value])); +end; + +procedure TExtSliderMulti.SetFDragging(Value : Boolean); begin + FDragging := Value; + JSCode(JSName + '.dragging=' + VarToJSON([Value]) + ';'); +end; + +procedure TExtSliderMulti.SetFIncrement(Value : Integer); begin + FIncrement := Value; + JSCode('increment:' + VarToJSON([Value])); end; -procedure TExtChart.SetFOnBeforerefresh(Value : TExtChartOnBeforerefresh); begin - if Assigned(FOnBeforerefresh) then - JSCode(JSName+'.events ["beforerefresh"].listeners=[];'); - if Assigned(Value) then - AddListener('beforerefresh', Ajax('beforerefresh', ['This', '%0.nm'], true)); - FOnBeforerefresh := Value; +procedure TExtSliderMulti.SetFKeyIncrement(Value : Integer); begin + FKeyIncrement := Value; + JSCode('keyIncrement:' + VarToJSON([Value])); end; -procedure TExtChart.SetFOnRefresh(Value : TExtChartOnRefresh); begin - if Assigned(FOnRefresh) then - JSCode(JSName+'.events ["refresh"].listeners=[];'); - if Assigned(Value) then - AddListener('refresh', Ajax('refresh', ['This', '%0.nm'], true)); - FOnRefresh := Value; +procedure TExtSliderMulti.SetFMaxValue(Value : Integer); begin + FMaxValue := Value; + if not ConfigAvailable(JSName) then + SetMaxValue(Value) + else + JSCode('maxValue:' + VarToJSON([Value])); end; -function TExtChart.JSClassName : string; begin - Result := 'Ext.chart.Chart'; +procedure TExtSliderMulti.SetFMinValue(Value : Integer); begin + FMinValue := Value; + if not ConfigAvailable(JSName) then + SetMinValue(Value) + else + JSCode('minValue:' + VarToJSON([Value])); end; -procedure TExtChart.InitDefaults; begin - inherited; - FAnimateObject := TExtObject.CreateInternal(Self, 'animate'); - FAxes := TExtObjectList.Create(Self, 'axes'); - FBackground := TExtObject.CreateInternal(Self, 'background'); - FGradients := TExtObjectList.Create(Self, 'gradients'); - FHasListeners := TExtObject.CreateInternal(Self, 'hasListeners'); - FInsetPadding := 10; - FLegendObject := TExtObject.CreateInternal(Self, 'legend'); - FListeners := TExtObject.CreateInternal(Self, 'listeners'); - FSeries := TExtObjectList.Create(Self, 'series'); - FStore := TExtDataStore.CreateInternal(Self, 'store'); +procedure TExtSliderMulti.SetFThumbs(Value : TExtObjectList); begin + FThumbs := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.thumbs=' + VarToJSON([Value, false]) + ';'); end; -{$IFDEF FPC}constructor TExtChart.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtChart.AddEvents(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtChart'); - Result := Self; +procedure TExtSliderMulti.SetFTipText(Value : TExtFunction); begin + FTipText := Value; + JSCode('tipText:' + VarToJSON([Value, true])); end; -function TExtChart.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtChart'); - Result := Self; +procedure TExtSliderMulti.SetFUseTips(Value : TExtObject); begin + FUseTips := Value; + Value.DeleteFromGarbage; + JSCode('useTips:' + VarToJSON([Value, false])); end; -function TExtChart.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtChart'); - Result := Self; +procedure TExtSliderMulti.SetFUseTipsBoolean(Value : Boolean); begin + FUseTipsBoolean := Value; + JSCode('useTips:' + VarToJSON([Value])); end; -function TExtChart.BindStore(Store : String = '') : TExtFunction; begin - JSCode(JSName + '.bindStore(' + VarToJSON([Store]) + ');', 'TExtChart'); - Result := Self; +procedure TExtSliderMulti.SetFValue(Value : Integer); begin + FValue := Value; + if not ConfigAvailable(JSName) then + SetValue(Value, 0) + else + JSCode('value:' + VarToJSON([Value])); end; -function TExtChart.ClearListeners : TExtFunction; begin - JSCode(JSName + '.clearListeners();', 'TExtChart'); - Result := Self; +procedure TExtSliderMulti.SetFValues(Value : TArrayOfInteger); begin + FValues := Value; + JSCode('values:' + ArrayToJSON(Value)); end; -function TExtChart.ClearManagedListeners : TExtFunction; begin - JSCode(JSName + '.clearManagedListeners();', 'TExtChart'); - Result := Self; +procedure TExtSliderMulti.SetFVertical(Value : Boolean); begin + FVertical := Value; + JSCode('vertical:' + VarToJSON([Value])); end; -constructor TExtChart.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtSliderMulti.SetFZeroBasedSnapping(Value : Boolean); begin + FZeroBasedSnapping := Value; + JSCode('zeroBasedSnapping:' + VarToJSON([Value])); end; -function TExtChart.EnableBubble(EventNames : String) : TExtFunction; begin - JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtChart'); - Result := Self; +procedure TExtSliderMulti.SetFOnBeforechange(Value : TExtSliderMultiOnBeforechange); begin + if Assigned(FOnBeforechange) then + JSCode(JSName+'.events ["beforechange"].listeners=[];'); + if Assigned(Value) then + AddListener('beforechange', Ajax('beforechange', ['Slider', '%0.nm','NewValue', '%1','OldValue', '%2'], true)); + FOnBeforechange := Value; end; -function TExtChart.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtChart'); - Result := Self; +procedure TExtSliderMulti.SetFOnChange(Value : TExtSliderMultiOnChange); begin + if Assigned(FOnChange) then + JSCode(JSName+'.events ["change"].listeners=[];'); + if Assigned(Value) then + AddListener('change', Ajax('change', ['Slider', '%0.nm','NewValue', '%1','Thumb', '%2.nm'], true)); + FOnChange := Value; end; -function TExtChart.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtChart'); - Result := Self; +procedure TExtSliderMulti.SetFOnChangecomplete(Value : TExtSliderMultiOnChangecomplete); begin + if Assigned(FOnChangecomplete) then + JSCode(JSName+'.events ["changecomplete"].listeners=[];'); + if Assigned(Value) then + AddListener('changecomplete', Ajax('changecomplete', ['Slider', '%0.nm','NewValue', '%1','Thumb', '%2.nm'], true)); + FOnChangecomplete := Value; end; -function TExtChart.GetStore : TExtFunction; begin - JSCode(JSName + '.getStore();', 'TExtChart'); - Result := Self; +procedure TExtSliderMulti.SetFOnDrag(Value : TExtSliderMultiOnDrag); begin + if Assigned(FOnDrag) then + JSCode(JSName+'.events ["drag"].listeners=[];'); + if Assigned(Value) then + AddListener('drag', Ajax('drag', ['Slider', '%0.nm','E', '%1.nm'], true)); + FOnDrag := Value; end; -function TExtChart.HasListener(EventName : String) : TExtFunction; begin - JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtChart'); - Result := Self; +procedure TExtSliderMulti.SetFOnDragend(Value : TExtSliderMultiOnDragend); begin + if Assigned(FOnDragend) then + JSCode(JSName+'.events ["dragend"].listeners=[];'); + if Assigned(Value) then + AddListener('dragend', Ajax('dragend', ['Slider', '%0.nm','E', '%1.nm'], true)); + FOnDragend := Value; end; -function TExtChart.Redraw(Resize : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.redraw(' + VarToJSON([Resize]) + ');', 'TExtChart'); - Result := Self; +procedure TExtSliderMulti.SetFOnDragstart(Value : TExtSliderMultiOnDragstart); begin + if Assigned(FOnDragstart) then + JSCode(JSName+'.events ["dragstart"].listeners=[];'); + if Assigned(Value) then + AddListener('dragstart', Ajax('dragstart', ['Slider', '%0.nm','E', '%1.nm'], true)); + FOnDragstart := Value; end; -function TExtChart.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin - JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtChart'); - Result := Self; +function TExtSliderMulti.JSClassName : string; begin + Result := 'Ext.slider.Multi'; end; -function TExtChart.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtChart'); - Result := Self; +procedure TExtSliderMulti.InitDefaults; begin + inherited; + FThumbs := TExtObjectList.Create(Self, 'thumbs'); + FUseTips := TExtObject.CreateInternal(Self, 'useTips'); end; -function TExtChart.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtChart'); +{$IFDEF FPC}constructor TExtSliderMulti.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtSliderMulti.AddThumb(Value : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.addThumb(' + VarToJSON([Value]) + ');', 'TExtSliderMulti'); Result := Self; end; -function TExtChart.RestoreZoom : TExtFunction; begin - JSCode(JSName + '.restoreZoom();', 'TExtChart'); - Result := Self; +constructor TExtSliderMulti.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -function TExtChart.ResumeEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtChart'); +function TExtSliderMulti.GetValue(Index : Integer) : TExtFunction; begin + JSCode(JSName + '.getValue(' + VarToJSON([Index]) + ');', 'TExtSliderMulti'); Result := Self; end; -function TExtChart.ResumeEvents : TExtFunction; begin - JSCode(JSName + '.resumeEvents();', 'TExtChart'); +function TExtSliderMulti.GetValues : TExtFunction; begin + JSCode(JSName + '.getValues();', 'TExtSliderMulti'); Result := Self; end; -function TExtChart.Save(Config : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.save(' + VarToJSON([Config, false]) + ');', 'TExtChart'); +function TExtSliderMulti.SetMaxValue(Val : Integer) : TExtFunction; begin + JSCode(JSName + '.setMaxValue(' + VarToJSON([Val]) + ');', 'TExtSliderMulti'); Result := Self; end; -function TExtChart.SetZoom : TExtFunction; begin - JSCode(JSName + '.setZoom();', 'TExtChart'); +function TExtSliderMulti.SetMinValue(Val : Integer) : TExtFunction; begin + JSCode(JSName + '.setMinValue(' + VarToJSON([Val]) + ');', 'TExtSliderMulti'); Result := Self; end; -function TExtChart.SuspendEvent(EventName : String) : TExtFunction; begin - JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtChart'); +function TExtSliderMulti.SetValue(Index : Integer; Value : Integer; Animate : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.setValue(' + VarToJSON([Index, Value, Animate]) + ');', 'TExtSliderMulti'); Result := Self; end; -function TExtChart.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin - JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtChart'); +function TExtSliderMulti.SyncThumbs : TExtFunction; begin + JSCode(JSName + '.syncThumbs();', 'TExtSliderMulti'); Result := Self; end; -destructor TExtChart.Destroy; begin +destructor TExtSliderMulti.Destroy; begin try - FAnimateObject.Free; - FAxes.Free; - FBackground.Free; - FGradients.Free; - FHasListeners.Free; - FLegendObject.Free; - FListeners.Free; - FSeries.Free; - FStore.Free; + FThumbs.Free; + FUseTips.Free; except end; inherited; end; -procedure TExtChart.HandleEvent(const AEvtName : string); begin +procedure TExtSliderMulti.HandleEvent(const AEvtName : string); begin inherited; - if (AEvtName = 'beforerefresh') and Assigned(FOnBeforerefresh) then - FOnBeforerefresh(TExtChart(ParamAsObject('This'))) - else if (AEvtName = 'refresh') and Assigned(FOnRefresh) then - FOnRefresh(TExtChart(ParamAsObject('This'))); + if (AEvtName = 'beforechange') and Assigned(FOnBeforechange) then + FOnBeforechange(TExtSliderMulti(ParamAsObject('Slider')), ParamAsInteger('NewValue'), ParamAsInteger('OldValue')) + else if (AEvtName = 'change') and Assigned(FOnChange) then + FOnChange(TExtSliderMulti(ParamAsObject('Slider')), ParamAsInteger('NewValue'), TExtSliderThumb(ParamAsObject('Thumb'))) + else if (AEvtName = 'changecomplete') and Assigned(FOnChangecomplete) then + FOnChangecomplete(TExtSliderMulti(ParamAsObject('Slider')), ParamAsInteger('NewValue'), TExtSliderThumb(ParamAsObject('Thumb'))) + else if (AEvtName = 'drag') and Assigned(FOnDrag) then + FOnDrag(TExtSliderMulti(ParamAsObject('Slider')), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'dragend') and Assigned(FOnDragend) then + FOnDragend(TExtSliderMulti(ParamAsObject('Slider')), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'dragstart') and Assigned(FOnDragstart) then + FOnDragstart(TExtSliderMulti(ParamAsObject('Slider')), TExtEventObject(ParamAsObject('E'))); end; procedure TExtSelectionRowModel.SetFEnableKeyNav(Value : Boolean); begin @@ -36986,12 +38622,6 @@ procedure TExtSelectionRowModel.HandleEvent(const AEvtName : string); begin FOnSelect(TExtSelectionRowModel(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), ParamAsInteger('Index')); end; -function TExtLayoutComponentAuto.JSClassName : string; begin - Result := 'Ext.layout.component.Auto'; -end; - -{$IFDEF FPC}constructor TExtLayoutComponentAuto.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - procedure TExtSelectionDataViewModel.SetFEnableKeyNav(Value : Boolean); begin FEnableKeyNav := Value; JSCode('enableKeyNav:' + VarToJSON([Value])); @@ -37047,1884 +38677,1842 @@ procedure TExtSelectionDataViewModel.HandleEvent(const AEvtName : string); begin FOnSelect(TExtSelectionDataViewModel(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS'))); end; -procedure TExtSliderMulti.SetFAnimate(Value : Boolean); begin - FAnimate := Value; - JSCode('animate:' + VarToJSON([Value])); +procedure TExtSelectionCellModel.SetFEnableKeyNav(Value : Boolean); begin + FEnableKeyNav := Value; + JSCode('enableKeyNav:' + VarToJSON([Value])); end; -procedure TExtSliderMulti.SetFClickToChange(Value : Boolean); begin - FClickToChange := Value; - JSCode('clickToChange:' + VarToJSON([Value])); +procedure TExtSelectionCellModel.SetFMode(Value : TModeEnum); begin + FMode := Value; + JSCode('mode:"' + EnumToJSString(TypeInfo(TModeEnum), ord(Value)) + '"'); end; -procedure TExtSliderMulti.SetFConstrainThumbs(Value : Boolean); begin - FConstrainThumbs := Value; - JSCode('constrainThumbs:' + VarToJSON([Value])); +procedure TExtSelectionCellModel.SetFPreventWrap(Value : Boolean); begin + FPreventWrap := Value; + JSCode('preventWrap:' + VarToJSON([Value])); end; -procedure TExtSliderMulti.SetFDecimalPrecision(Value : Integer); begin - FDecimalPrecision := Value; - JSCode('decimalPrecision:' + VarToJSON([Value])); +procedure TExtSelectionCellModel.SetFOnDeselect(Value : TExtSelectionCellModelOnDeselect); begin + if Assigned(FOnDeselect) then + JSCode(JSName+'.events ["deselect"].listeners=[];'); + if Assigned(Value) then + AddListener('deselect', Ajax('deselect', ['This', '%0.nm','RecordJS', '%1.nm','Row', '%2','Column', '%3'], true)); + FOnDeselect := Value; end; -procedure TExtSliderMulti.SetFDecimalPrecisionBoolean(Value : Boolean); begin - FDecimalPrecisionBoolean := Value; - JSCode('decimalPrecision:' + VarToJSON([Value])); +procedure TExtSelectionCellModel.SetFOnSelect(Value : TExtSelectionCellModelOnSelect); begin + if Assigned(FOnSelect) then + JSCode(JSName+'.events ["select"].listeners=[];'); + if Assigned(Value) then + AddListener('select', Ajax('select', ['This', '%0.nm','RecordJS', '%1.nm','Row', '%2','Column', '%3'], true)); + FOnSelect := Value; end; -procedure TExtSliderMulti.SetFIncrement(Value : Integer); begin - FIncrement := Value; - JSCode('increment:' + VarToJSON([Value])); +function TExtSelectionCellModel.JSClassName : string; begin + Result := 'Ext.selection.CellModel'; end; -procedure TExtSliderMulti.SetFKeyIncrement(Value : Integer); begin - FKeyIncrement := Value; - JSCode('keyIncrement:' + VarToJSON([Value])); +{$IFDEF FPC}constructor TExtSelectionCellModel.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtSelectionCellModel.GetCurrentPosition : TExtFunction; begin + JSCode(JSName + '.getCurrentPosition();', 'TExtSelectionCellModel'); + Result := Self; end; -procedure TExtSliderMulti.SetFMaxValue(Value : Integer); begin - FMaxValue := Value; - if not ConfigAvailable(JSName) then - SetMaxValue(Value) - else - JSCode('maxValue:' + VarToJSON([Value])); +function TExtSelectionCellModel.SetCurrentPosition(Position : TExtObject) : TExtFunction; begin + JSCode(JSName + '.setCurrentPosition(' + VarToJSON([Position, false]) + ');', 'TExtSelectionCellModel'); + Result := Self; end; -procedure TExtSliderMulti.SetFMinValue(Value : Integer); begin - FMinValue := Value; - if not ConfigAvailable(JSName) then - SetMinValue(Value) - else - JSCode('minValue:' + VarToJSON([Value])); +procedure TExtSelectionCellModel.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'deselect') and Assigned(FOnDeselect) then + FOnDeselect(TExtSelectionCellModel(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), ParamAsInteger('Row'), ParamAsInteger('Column')) + else if (AEvtName = 'select') and Assigned(FOnSelect) then + FOnSelect(TExtSelectionCellModel(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), ParamAsInteger('Row'), ParamAsInteger('Column')); end; -procedure TExtSliderMulti.SetFThumbs(Value : TExtObjectList); begin - FThumbs := Value; +function TExtLayoutComponentDock.JSClassName : string; begin + Result := 'Ext.layout.component.Dock'; +end; + +{$IFDEF FPC}constructor TExtLayoutComponentDock.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtLayoutComponentDock.InvalidateAxes : TExtFunction; begin + JSCode(JSName + '.invalidateAxes();', 'TExtLayoutComponentDock'); + Result := Self; +end; + +procedure TExtChartAxisNumeric.SetFAdjustMaximumByMajorUnit(Value : Boolean); begin + FAdjustMaximumByMajorUnit := Value; + JSCode('adjustMaximumByMajorUnit:' + VarToJSON([Value])); +end; + +procedure TExtChartAxisNumeric.SetFAdjustMinimumByMajorUnit(Value : Boolean); begin + FAdjustMinimumByMajorUnit := Value; + JSCode('adjustMinimumByMajorUnit:' + VarToJSON([Value])); +end; + +procedure TExtChartAxisNumeric.SetFConstrain(Value : Boolean); begin + FConstrain := Value; + JSCode('constrain:' + VarToJSON([Value])); +end; + +procedure TExtChartAxisNumeric.SetFDecimals(Value : Integer); begin + FDecimals := Value; + JSCode('decimals:' + VarToJSON([Value])); +end; + +procedure TExtChartAxisNumeric.SetFMaximum(Value : Integer); begin + FMaximum := Value; + JSCode('maximum:' + VarToJSON([Value])); +end; + +procedure TExtChartAxisNumeric.SetFMinimum(Value : Integer); begin + FMinimum := Value; + JSCode('minimum:' + VarToJSON([Value])); +end; + +procedure TExtChartAxisNumeric.SetFPosition(Value : String); begin + FPosition := Value; + JSCode('position:' + VarToJSON([Value])); +end; + +function TExtChartAxisNumeric.JSClassName : string; begin + Result := 'Ext.chart.axis.Numeric'; +end; + +{$IFDEF FPC}constructor TExtChartAxisNumeric.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +procedure TExtChart.SetFAnimate(Value : Boolean); begin + FAnimate := Value; + JSCode('animate:' + VarToJSON([Value])); +end; + +procedure TExtChart.SetFAnimateObject(Value : TExtObject); begin + FAnimateObject := Value; Value.DeleteFromGarbage; - JSCode(JSName + '.thumbs=' + VarToJSON([Value, false]) + ';'); + JSCode('animate:' + VarToJSON([Value, false])); end; -procedure TExtSliderMulti.SetFTipText(Value : TExtFunction); begin - FTipText := Value; - JSCode('tipText:' + VarToJSON([Value, true])); +procedure TExtChart.SetFAxes(Value : TExtObjectList); begin + FAxes := Value; + Value.DeleteFromGarbage; + JSCode('axes:' + VarToJSON([Value, false])); end; -procedure TExtSliderMulti.SetFUseTips(Value : TExtObject); begin - FUseTips := Value; +procedure TExtChart.SetFBackground(Value : TExtObject); begin + FBackground := Value; Value.DeleteFromGarbage; - JSCode('useTips:' + VarToJSON([Value, false])); + JSCode('background:' + VarToJSON([Value, false])); end; -procedure TExtSliderMulti.SetFUseTipsBoolean(Value : Boolean); begin - FUseTipsBoolean := Value; - JSCode('useTips:' + VarToJSON([Value])); +procedure TExtChart.SetFBackgroundBoolean(Value : Boolean); begin + FBackgroundBoolean := Value; + JSCode('background:' + VarToJSON([Value])); end; -procedure TExtSliderMulti.SetFValue(Value : Integer); begin - FValue := Value; - if not ConfigAvailable(JSName) then - SetValue(Value, 0) - else - JSCode('value:' + VarToJSON([Value])); +procedure TExtChart.SetFGradients(Value : TExtObjectList); begin + FGradients := Value; + Value.DeleteFromGarbage; + JSCode('gradients:' + VarToJSON([Value, false])); end; -procedure TExtSliderMulti.SetFValues(Value : TArrayOfInteger); begin - FValues := Value; - JSCode('values:' + ArrayToJSON(Value)); +procedure TExtChart.SetFHasListeners(Value : TExtObject); begin + FHasListeners := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.hasListeners=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtSliderMulti.SetFVertical(Value : Boolean); begin - FVertical := Value; - JSCode('vertical:' + VarToJSON([Value])); +procedure TExtChart.SetFInsetPadding(Value : Integer); begin + FInsetPadding := Value; + JSCode('insetPadding:' + VarToJSON([Value])); end; -procedure TExtSliderMulti.SetFZeroBasedSnapping(Value : Boolean); begin - FZeroBasedSnapping := Value; - JSCode('zeroBasedSnapping:' + VarToJSON([Value])); +procedure TExtChart.SetFIsObservable(Value : Boolean); begin + FIsObservable := Value; + JSCode(JSName + '.isObservable=' + VarToJSON([Value]) + ';'); end; -procedure TExtSliderMulti.SetFOnBeforechange(Value : TExtSliderMultiOnBeforechange); begin - if Assigned(FOnBeforechange) then - JSCode(JSName+'.events ["beforechange"].listeners=[];'); - if Assigned(Value) then - AddListener('beforechange', Ajax('beforechange', ['Slider', '%0.nm','NewValue', '%1','OldValue', '%2'], true)); - FOnBeforechange := Value; +procedure TExtChart.SetFLegend(Value : Boolean); begin + FLegend := Value; + JSCode('legend:' + VarToJSON([Value])); end; -procedure TExtSliderMulti.SetFOnChange(Value : TExtSliderMultiOnChange); begin - if Assigned(FOnChange) then - JSCode(JSName+'.events ["change"].listeners=[];'); - if Assigned(Value) then - AddListener('change', Ajax('change', ['Slider', '%0.nm','NewValue', '%1','Thumb', '%2.nm'], true)); - FOnChange := Value; +procedure TExtChart.SetFLegendObject(Value : TExtObject); begin + FLegendObject := Value; + Value.DeleteFromGarbage; + JSCode('legend:' + VarToJSON([Value, false])); end; -procedure TExtSliderMulti.SetFOnChangecomplete(Value : TExtSliderMultiOnChangecomplete); begin - if Assigned(FOnChangecomplete) then - JSCode(JSName+'.events ["changecomplete"].listeners=[];'); - if Assigned(Value) then - AddListener('changecomplete', Ajax('changecomplete', ['Slider', '%0.nm','NewValue', '%1','Thumb', '%2.nm'], true)); - FOnChangecomplete := Value; +procedure TExtChart.SetFListeners(Value : TExtObject); begin + FListeners := Value; + Value.DeleteFromGarbage; + JSCode('listeners:' + VarToJSON([Value, false])); end; -procedure TExtSliderMulti.SetFOnDrag(Value : TExtSliderMultiOnDrag); begin - if Assigned(FOnDrag) then - JSCode(JSName+'.events ["drag"].listeners=[];'); - if Assigned(Value) then - AddListener('drag', Ajax('drag', ['Slider', '%0.nm','E', '%1.nm'], true)); - FOnDrag := Value; +procedure TExtChart.SetFMask(Value : Boolean); begin + FMask := Value; + JSCode('mask:' + VarToJSON([Value])); end; -procedure TExtSliderMulti.SetFOnDragend(Value : TExtSliderMultiOnDragend); begin - if Assigned(FOnDragend) then - JSCode(JSName+'.events ["dragend"].listeners=[];'); - if Assigned(Value) then - AddListener('dragend', Ajax('dragend', ['Slider', '%0.nm','E', '%1.nm'], true)); - FOnDragend := Value; +procedure TExtChart.SetFMaskString(Value : String); begin + FMaskString := Value; + JSCode('mask:' + VarToJSON([Value])); end; -procedure TExtSliderMulti.SetFOnDragstart(Value : TExtSliderMultiOnDragstart); begin - if Assigned(FOnDragstart) then - JSCode(JSName+'.events ["dragstart"].listeners=[];'); - if Assigned(Value) then - AddListener('dragstart', Ajax('dragstart', ['Slider', '%0.nm','E', '%1.nm'], true)); - FOnDragstart := Value; +procedure TExtChart.SetFSeries(Value : TExtObjectList); begin + FSeries := Value; + Value.DeleteFromGarbage; + JSCode('series:' + VarToJSON([Value, false])); end; -function TExtSliderMulti.JSClassName : string; begin - Result := 'Ext.slider.Multi'; +procedure TExtChart.SetFStore(Value : TExtDataStore); begin + FStore := Value; + Value.DeleteFromGarbage; + JSCode('store:' + VarToJSON([Value, false])); end; -procedure TExtSliderMulti.InitDefaults; begin - inherited; - FThumbs := TExtObjectList.Create(Self, 'thumbs'); - FUseTips := TExtObject.CreateInternal(Self, 'useTips'); +procedure TExtChart.SetFTheme(Value : String); begin + FTheme := Value; + JSCode('theme:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtSliderMulti.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtChart.SetFOnBeforerefresh(Value : TExtChartOnBeforerefresh); begin + if Assigned(FOnBeforerefresh) then + JSCode(JSName+'.events ["beforerefresh"].listeners=[];'); + if Assigned(Value) then + AddListener('beforerefresh', Ajax('beforerefresh', ['This', '%0.nm'], true)); + FOnBeforerefresh := Value; +end; -function TExtSliderMulti.AddThumb(Value : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.addThumb(' + VarToJSON([Value]) + ');', 'TExtSliderMulti'); - Result := Self; +procedure TExtChart.SetFOnRefresh(Value : TExtChartOnRefresh); begin + if Assigned(FOnRefresh) then + JSCode(JSName+'.events ["refresh"].listeners=[];'); + if Assigned(Value) then + AddListener('refresh', Ajax('refresh', ['This', '%0.nm'], true)); + FOnRefresh := Value; +end; + +function TExtChart.JSClassName : string; begin + Result := 'Ext.chart.Chart'; +end; + +procedure TExtChart.InitDefaults; begin + inherited; + FAnimateObject := TExtObject.CreateInternal(Self, 'animate'); + FAxes := TExtObjectList.Create(Self, 'axes'); + FBackground := TExtObject.CreateInternal(Self, 'background'); + FGradients := TExtObjectList.Create(Self, 'gradients'); + FHasListeners := TExtObject.CreateInternal(Self, 'hasListeners'); + FInsetPadding := 10; + FLegendObject := TExtObject.CreateInternal(Self, 'legend'); + FListeners := TExtObject.CreateInternal(Self, 'listeners'); + FSeries := TExtObjectList.Create(Self, 'series'); + FStore := TExtDataStore.CreateInternal(Self, 'store'); end; -constructor TExtSliderMulti.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; -end; +{$IFDEF FPC}constructor TExtChart.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtSliderMulti.GetValue(Index : Integer) : TExtFunction; begin - JSCode(JSName + '.getValue(' + VarToJSON([Index]) + ');', 'TExtSliderMulti'); +function TExtChart.AddEvents(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.addEvents(' + VarToJSON([EventNames]) + ');', 'TExtChart'); Result := Self; end; -function TExtSliderMulti.GetValues : TExtFunction; begin - JSCode(JSName + '.getValues();', 'TExtSliderMulti'); +function TExtChart.AddListener(EventName : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil; OptionsScope : TExtObject = nil; OptionsDelay : Integer = 0; OptionsSingle : Boolean = false; OptionsBuffer : Integer = 0; OptionsTarget : TExtUtilObservable = nil; OptionsElement : String = ''; OptionsDestroyable : Boolean = false; OptionsPriority : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.addListener(' + VarToJSON([EventName, Fn, true, Scope, false, Options, false, OptionsScope, false, OptionsDelay, OptionsSingle, OptionsBuffer, OptionsTarget, false, OptionsElement, OptionsDestroyable, OptionsPriority]) + ');', 'TExtChart'); Result := Self; end; -function TExtSliderMulti.SetMaxValue(Val : Integer) : TExtFunction; begin - JSCode(JSName + '.setMaxValue(' + VarToJSON([Val]) + ');', 'TExtSliderMulti'); +function TExtChart.AddManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Options : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.addManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false, Options, false]) + ');', 'TExtChart'); Result := Self; end; -function TExtSliderMulti.SetMinValue(Val : Integer) : TExtFunction; begin - JSCode(JSName + '.setMinValue(' + VarToJSON([Val]) + ');', 'TExtSliderMulti'); +function TExtChart.BindStore(Store : String = '') : TExtFunction; begin + JSCode(JSName + '.bindStore(' + VarToJSON([Store]) + ');', 'TExtChart'); Result := Self; end; -function TExtSliderMulti.SetValue(Index : Integer; Value : Integer; Animate : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.setValue(' + VarToJSON([Index, Value, Animate]) + ');', 'TExtSliderMulti'); +function TExtChart.ClearListeners : TExtFunction; begin + JSCode(JSName + '.clearListeners();', 'TExtChart'); Result := Self; end; -function TExtSliderMulti.SyncThumbs : TExtFunction; begin - JSCode(JSName + '.syncThumbs();', 'TExtSliderMulti'); +function TExtChart.ClearManagedListeners : TExtFunction; begin + JSCode(JSName + '.clearManagedListeners();', 'TExtChart'); Result := Self; end; -destructor TExtSliderMulti.Destroy; begin - try - FThumbs.Free; - FUseTips.Free; - except end; - inherited; -end; - -procedure TExtSliderMulti.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'beforechange') and Assigned(FOnBeforechange) then - FOnBeforechange(TExtSliderMulti(ParamAsObject('Slider')), ParamAsInteger('NewValue'), ParamAsInteger('OldValue')) - else if (AEvtName = 'change') and Assigned(FOnChange) then - FOnChange(TExtSliderMulti(ParamAsObject('Slider')), ParamAsInteger('NewValue'), TExtSliderThumb(ParamAsObject('Thumb'))) - else if (AEvtName = 'changecomplete') and Assigned(FOnChangecomplete) then - FOnChangecomplete(TExtSliderMulti(ParamAsObject('Slider')), ParamAsInteger('NewValue'), TExtSliderThumb(ParamAsObject('Thumb'))) - else if (AEvtName = 'drag') and Assigned(FOnDrag) then - FOnDrag(TExtSliderMulti(ParamAsObject('Slider')), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'dragend') and Assigned(FOnDragend) then - FOnDragend(TExtSliderMulti(ParamAsObject('Slider')), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'dragstart') and Assigned(FOnDragstart) then - FOnDragstart(TExtSliderMulti(ParamAsObject('Slider')), TExtEventObject(ParamAsObject('E'))); +constructor TExtChart.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtChartAxisNumeric.SetFAdjustMaximumByMajorUnit(Value : Boolean); begin - FAdjustMaximumByMajorUnit := Value; - JSCode('adjustMaximumByMajorUnit:' + VarToJSON([Value])); +function TExtChart.EnableBubble(EventNames : String) : TExtFunction; begin + JSCode(JSName + '.enableBubble(' + VarToJSON([EventNames]) + ');', 'TExtChart'); + Result := Self; end; -procedure TExtChartAxisNumeric.SetFAdjustMinimumByMajorUnit(Value : Boolean); begin - FAdjustMinimumByMajorUnit := Value; - JSCode('adjustMinimumByMajorUnit:' + VarToJSON([Value])); +function TExtChart.FireEvent(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEvent(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtChart'); + Result := Self; end; -procedure TExtChartAxisNumeric.SetFConstrain(Value : Boolean); begin - FConstrain := Value; - JSCode('constrain:' + VarToJSON([Value])); +function TExtChart.FireEventArgs(EventName : String; Args : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.fireEventArgs(' + VarToJSON([EventName]) + ',' + VarToJSON(Args) + ');', 'TExtChart'); + Result := Self; end; -procedure TExtChartAxisNumeric.SetFDecimals(Value : Integer); begin - FDecimals := Value; - JSCode('decimals:' + VarToJSON([Value])); +function TExtChart.GetStore : TExtFunction; begin + JSCode(JSName + '.getStore();', 'TExtChart'); + Result := Self; end; -procedure TExtChartAxisNumeric.SetFMaximum(Value : Integer); begin - FMaximum := Value; - JSCode('maximum:' + VarToJSON([Value])); +function TExtChart.HasListener(EventName : String) : TExtFunction; begin + JSCode(JSName + '.hasListener(' + VarToJSON([EventName]) + ');', 'TExtChart'); + Result := Self; end; -procedure TExtChartAxisNumeric.SetFMinimum(Value : Integer); begin - FMinimum := Value; - JSCode('minimum:' + VarToJSON([Value])); +function TExtChart.Redraw(Resize : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.redraw(' + VarToJSON([Resize]) + ');', 'TExtChart'); + Result := Self; end; -procedure TExtChartAxisNumeric.SetFPosition(Value : String); begin - FPosition := Value; - JSCode('position:' + VarToJSON([Value])); +function TExtChart.RelayEvents(Origin : TExtObject; Events : TExtObjectList; Prefix : String = '') : TExtFunction; begin + JSCode(JSName + '.relayEvents(' + VarToJSON([Origin, false]) + ',' + VarToJSON(Events) + ',' + VarToJSON([Prefix]) + ');', 'TExtChart'); + Result := Self; end; -function TExtChartAxisNumeric.JSClassName : string; begin - Result := 'Ext.chart.axis.Numeric'; +function TExtChart.RemoveListener(EventName : String; Fn : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeListener(' + VarToJSON([EventName, Fn, true, Scope, false]) + ');', 'TExtChart'); + Result := Self; end; -{$IFDEF FPC}constructor TExtChartAxisNumeric.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtDdDDProxy.SetFCenterFrame(Value : Boolean); begin - FCenterFrame := Value; - JSCode(JSName + '.centerFrame=' + VarToJSON([Value]) + ';'); +function TExtChart.RemoveManagedListener(Item : TExtElement; Ename : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.removeManagedListener(' + VarToJSON([Item, false, Ename, Fn, true, Scope, false]) + ');', 'TExtChart'); + Result := Self; end; -procedure TExtDdDDProxy.SetFResizeFrame(Value : Boolean); begin - FResizeFrame := Value; - JSCode(JSName + '.resizeFrame=' + VarToJSON([Value]) + ';'); +function TExtChart.RestoreZoom : TExtFunction; begin + JSCode(JSName + '.restoreZoom();', 'TExtChart'); + Result := Self; end; -function TExtDdDDProxy.JSClassName : string; begin - Result := 'Ext.dd.DDProxy'; +function TExtChart.ResumeEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.resumeEvent(' + VarToJSON([EventName]) + ');', 'TExtChart'); + Result := Self; end; -{$IFDEF FPC}constructor TExtDdDDProxy.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDdDDProxy.CreateFrame : TExtFunction; begin - JSCode(JSName + '.createFrame();', 'TExtDdDDProxy'); +function TExtChart.ResumeEvents : TExtFunction; begin + JSCode(JSName + '.resumeEvents();', 'TExtChart'); Result := Self; end; -function TExtDdDDProxy.InitFrame : TExtFunction; begin - JSCode(JSName + '.initFrame();', 'TExtDdDDProxy'); +function TExtChart.Save(Config : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.save(' + VarToJSON([Config, false]) + ');', 'TExtChart'); Result := Self; end; -procedure TExtDdDropTarget.SetFDdGroup(Value : String); begin - FDdGroup := Value; - JSCode('ddGroup:' + VarToJSON([Value])); +function TExtChart.SetZoom : TExtFunction; begin + JSCode(JSName + '.setZoom();', 'TExtChart'); + Result := Self; end; -procedure TExtDdDropTarget.SetFDropAllowed(Value : String); begin - FDropAllowed := Value; - JSCode('dropAllowed:' + VarToJSON([Value])); +function TExtChart.SuspendEvent(EventName : String) : TExtFunction; begin + JSCode(JSName + '.suspendEvent(' + VarToJSON([EventName]) + ');', 'TExtChart'); + Result := Self; end; -procedure TExtDdDropTarget.SetFDropNotAllowed(Value : String); begin - FDropNotAllowed := Value; - JSCode('dropNotAllowed:' + VarToJSON([Value])); +function TExtChart.SuspendEvents(QueueSuspended : Boolean) : TExtFunction; begin + JSCode(JSName + '.suspendEvents(' + VarToJSON([QueueSuspended]) + ');', 'TExtChart'); + Result := Self; end; -procedure TExtDdDropTarget.SetFOverClass(Value : String); begin - FOverClass := Value; - JSCode('overClass:' + VarToJSON([Value])); +destructor TExtChart.Destroy; begin + try + FAnimateObject.Free; + FAxes.Free; + FBackground.Free; + FGradients.Free; + FHasListeners.Free; + FLegendObject.Free; + FListeners.Free; + FSeries.Free; + FStore.Free; + except end; + inherited; end; -function TExtDdDropTarget.JSClassName : string; begin - Result := 'Ext.dd.DropTarget'; +procedure TExtChart.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'beforerefresh') and Assigned(FOnBeforerefresh) then + FOnBeforerefresh(TExtChart(ParamAsObject('This'))) + else if (AEvtName = 'refresh') and Assigned(FOnRefresh) then + FOnRefresh(TExtChart(ParamAsObject('This'))); end; -{$IFDEF FPC}constructor TExtDdDropTarget.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtDirectRemotingProvider.SetFActions(Value : TExtObject); begin - FActions := Value; +procedure TExtLayoutContainerBox.SetFDefaultMargins(Value : TExtObject); begin + FDefaultMargins := Value; Value.DeleteFromGarbage; - JSCode('actions:' + VarToJSON([Value, false])); + JSCode('defaultMargins:' + VarToJSON([Value, false])); end; -procedure TExtDirectRemotingProvider.SetFDisableNestedActions(Value : Boolean); begin - FDisableNestedActions := Value; - JSCode('disableNestedActions:' + VarToJSON([Value])); +procedure TExtLayoutContainerBox.SetFFlex(Value : Integer); begin + FFlex := Value; + JSCode('flex:' + VarToJSON([Value])); end; -procedure TExtDirectRemotingProvider.SetFEnableBuffer(Value : Integer); begin - FEnableBuffer := Value; - JSCode('enableBuffer:' + VarToJSON([Value])); +procedure TExtLayoutContainerBox.SetFPack(Value : String); begin + FPack := Value; + JSCode('pack:' + VarToJSON([Value])); end; -procedure TExtDirectRemotingProvider.SetFEnableBufferBoolean(Value : Boolean); begin - FEnableBufferBoolean := Value; - JSCode('enableBuffer:' + VarToJSON([Value])); +procedure TExtLayoutContainerBox.SetFPadding(Value : String); begin + FPadding := Value; + JSCode('padding:' + VarToJSON([Value])); end; -procedure TExtDirectRemotingProvider.SetFEnableUrlEncode(Value : String); begin - FEnableUrlEncode := Value; - JSCode('enableUrlEncode:' + VarToJSON([Value])); +procedure TExtLayoutContainerBox.SetFStretchMaxPartner(Value : String); begin + FStretchMaxPartner := Value; + JSCode('stretchMaxPartner:' + VarToJSON([Value])); end; -procedure TExtDirectRemotingProvider.SetFMaxRetries(Value : Integer); begin - FMaxRetries := Value; - JSCode('maxRetries:' + VarToJSON([Value])); +procedure TExtLayoutContainerBox.SetFStretchMaxPartnerComponent(Value : TExtComponent); begin + FStretchMaxPartnerComponent := Value; + Value.DeleteFromGarbage; + JSCode('stretchMaxPartner:' + VarToJSON([Value, false])); end; -procedure TExtDirectRemotingProvider.SetFNamespace(Value : String); begin - FNamespace := Value; - JSCode('namespace:' + VarToJSON([Value])); +function TExtLayoutContainerBox.JSClassName : string; begin + Result := 'Ext.layout.container.Box'; end; -procedure TExtDirectRemotingProvider.SetFNamespaceObject(Value : TExtObject); begin - FNamespaceObject := Value; - Value.DeleteFromGarbage; - JSCode('namespace:' + VarToJSON([Value, false])); +procedure TExtLayoutContainerBox.InitDefaults; begin + inherited; + FDefaultMargins := TExtObject.CreateInternal(Self, 'defaultMargins'); + FStretchMaxPartnerComponent := TExtComponent.CreateInternal(Self, 'stretchMaxPartner'); end; -procedure TExtDirectRemotingProvider.SetFTimeout(Value : Integer); begin - FTimeout := Value; - JSCode('timeout:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtLayoutContainerBox.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtDirectRemotingProvider.SetFUrl(Value : String); begin - FUrl := Value; - JSCode('url:' + VarToJSON([Value])); +constructor TExtLayoutContainerBox.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtDirectRemotingProvider.SetFOnBeforecall(Value : TExtDirectRemotingProviderOnBeforecall); begin - if Assigned(FOnBeforecall) then - JSCode(JSName+'.events ["beforecall"].listeners=[];'); - if Assigned(Value) then - AddListener('beforecall', Ajax('beforecall', ['Provider', '%0.nm','Transaction', '%1.nm','Meta', '%2.nm'], true)); - FOnBeforecall := Value; +destructor TExtLayoutContainerBox.Destroy; begin + try + FDefaultMargins.Free; + FStretchMaxPartnerComponent.Free; + except end; + inherited; end; -procedure TExtDirectRemotingProvider.SetFOnBeforecallback(Value : TExtDirectRemotingProviderOnBeforecallback); begin - if Assigned(FOnBeforecallback) then - JSCode(JSName+'.events ["beforecallback"].listeners=[];'); - if Assigned(Value) then - AddListener('beforecallback', Ajax('beforecallback', ['Provider', '%0.nm','Transaction', '%1.nm'], true)); - FOnBeforecallback := Value; +procedure TExtDataProxyMemory.SetFData(Value : TExtObject); begin + FData := Value; + Value.DeleteFromGarbage; + JSCode('data:' + VarToJSON([Value, false])); end; -procedure TExtDirectRemotingProvider.SetFOnCall(Value : TExtDirectRemotingProviderOnCall); begin - if Assigned(FOnCall) then - JSCode(JSName+'.events ["call"].listeners=[];'); - if Assigned(Value) then - AddListener('call', Ajax('call', ['Provider', '%0.nm','Transaction', '%1.nm','Meta', '%2.nm'], true)); - FOnCall := Value; +procedure TExtDataProxyMemory.SetFEnablePaging(Value : Boolean); begin + FEnablePaging := Value; + JSCode('enablePaging:' + VarToJSON([Value])); end; -function TExtDirectRemotingProvider.JSClassName : string; begin - Result := 'Ext.direct.RemotingProvider'; +function TExtDataProxyMemory.JSClassName : string; begin + Result := 'Ext.data.proxy.Memory'; end; -procedure TExtDirectRemotingProvider.InitDefaults; begin +procedure TExtDataProxyMemory.InitDefaults; begin inherited; - FActions := TExtObject.CreateInternal(Self, 'actions'); - FNamespaceObject := TExtObject.CreateInternal(Self, 'namespace'); + FData := TExtObject.CreateInternal(Self, 'data'); end; -{$IFDEF FPC}constructor TExtDirectRemotingProvider.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDirectRemotingProvider.Connect : TExtFunction; begin - JSCode(JSName + '.connect();', 'TExtDirectRemotingProvider'); - Result := Self; -end; +{$IFDEF FPC}constructor TExtDataProxyMemory.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtDirectRemotingProvider.Create; begin - CreateVar(JSClassName + '({});'); +constructor TExtDataProxyMemory.Create; begin + CreateVarAlt(JSClassName + '.create({});'); InitDefaults; end; -function TExtDirectRemotingProvider.Disconnect : TExtFunction; begin - JSCode(JSName + '.disconnect();', 'TExtDirectRemotingProvider'); +function TExtDataProxyMemory.Read(Operation : TExtDataOperation; Callback : TExtFunction; Scope : TExtObject) : TExtFunction; begin + JSCode(JSName + '.read(' + VarToJSON([Operation, false, Callback, true, Scope, false]) + ');', 'TExtDataProxyMemory'); Result := Self; end; -function TExtDirectRemotingProvider.IsConnected : TExtFunction; begin - JSCode(JSName + '.isConnected();', 'TExtDirectRemotingProvider'); +function TExtDataProxyMemory.Update(Operation : TExtDataOperation; Callback : TExtFunction; Scope : TExtObject) : TExtFunction; begin + JSCode(JSName + '.update(' + VarToJSON([Operation, false, Callback, true, Scope, false]) + ');', 'TExtDataProxyMemory'); Result := Self; end; -destructor TExtDirectRemotingProvider.Destroy; begin +destructor TExtDataProxyMemory.Destroy; begin try - FActions.Free; - FNamespaceObject.Free; + FData.Free; except end; inherited; end; -procedure TExtDirectRemotingProvider.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'beforecall') and Assigned(FOnBeforecall) then - FOnBeforecall(TExtDirectRemotingProvider(ParamAsObject('Provider')), TExtDirectTransaction(ParamAsObject('Transaction')), TExtObject(ParamAsObject('Meta'))) - else if (AEvtName = 'beforecallback') and Assigned(FOnBeforecallback) then - FOnBeforecallback(TExtDirectRemotingProvider(ParamAsObject('Provider')), TExtDirectTransaction(ParamAsObject('Transaction'))) - else if (AEvtName = 'call') and Assigned(FOnCall) then - FOnCall(TExtDirectRemotingProvider(ParamAsObject('Provider')), TExtDirectTransaction(ParamAsObject('Transaction')), TExtObject(ParamAsObject('Meta'))); -end; - -procedure TExtDirectPollingProvider.SetFBaseParams(Value : TExtObject); begin - FBaseParams := Value; - Value.DeleteFromGarbage; - JSCode('baseParams:' + VarToJSON([Value, false])); -end; - -procedure TExtDirectPollingProvider.SetFInterval(Value : Integer); begin - FInterval := Value; - JSCode('interval:' + VarToJSON([Value])); -end; - -procedure TExtDirectPollingProvider.SetFUrl(Value : String); begin - FUrl := Value; - JSCode('url:' + VarToJSON([Value])); -end; - -procedure TExtDirectPollingProvider.SetFUrlFunction(Value : TExtFunction); begin - FUrlFunction := Value; - JSCode('url:' + VarToJSON([Value, true])); +procedure TExtButtonSplit.SetFArrowHandler(Value : TExtFunction); begin + FArrowHandler := Value; + if not ConfigAvailable(JSName) then + SetArrowHandler(Value) + else + JSCode('arrowHandler:' + VarToJSON([Value, true])); end; -procedure TExtDirectPollingProvider.SetFOnBeforepoll(Value : TExtDirectPollingProviderOnBeforepoll); begin - if Assigned(FOnBeforepoll) then - JSCode(JSName+'.events ["beforepoll"].listeners=[];'); - if Assigned(Value) then - AddListener('beforepoll', Ajax('beforepoll', ['This', '%0.nm'], true)); - FOnBeforepoll := Value; +procedure TExtButtonSplit.SetFArrowTooltip(Value : String); begin + FArrowTooltip := Value; + JSCode('arrowTooltip:' + VarToJSON([Value])); end; -procedure TExtDirectPollingProvider.SetFOnPoll(Value : TExtDirectPollingProviderOnPoll); begin - if Assigned(FOnPoll) then - JSCode(JSName+'.events ["poll"].listeners=[];'); +procedure TExtButtonSplit.SetFOnArrowclick(Value : TExtButtonSplitOnArrowclick); begin + if Assigned(FOnArrowclick) then + JSCode(JSName+'.events ["arrowclick"].listeners=[];'); if Assigned(Value) then - AddListener('poll', Ajax('poll', ['This', '%0.nm'], true)); - FOnPoll := Value; -end; - -function TExtDirectPollingProvider.JSClassName : string; begin - Result := 'Ext.direct.PollingProvider'; -end; - -procedure TExtDirectPollingProvider.InitDefaults; begin - inherited; - FBaseParams := TExtObject.CreateInternal(Self, 'baseParams'); - FInterval := 3; -end; - -{$IFDEF FPC}constructor TExtDirectPollingProvider.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDirectPollingProvider.Connect : TExtFunction; begin - JSCode(JSName + '.connect();', 'TExtDirectPollingProvider'); - Result := Self; + AddListener('arrowclick', Ajax('arrowclick', ['This', '%0.nm','E', '%1.nm'], true)); + FOnArrowclick := Value; end; -constructor TExtDirectPollingProvider.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +function TExtButtonSplit.JSClassName : string; begin + Result := 'Ext.button.Split'; end; -function TExtDirectPollingProvider.Disconnect : TExtFunction; begin - JSCode(JSName + '.disconnect();', 'TExtDirectPollingProvider'); - Result := Self; -end; +{$IFDEF FPC}constructor TExtButtonSplit.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtDirectPollingProvider.IsConnected : TExtFunction; begin - JSCode(JSName + '.isConnected();', 'TExtDirectPollingProvider'); +function TExtButtonSplit.SetArrowHandler(Handler : TExtFunction; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.setArrowHandler(' + VarToJSON([Handler, true, Scope, false]) + ');', 'TExtButtonSplit'); Result := Self; end; -destructor TExtDirectPollingProvider.Destroy; begin - try - FBaseParams.Free; - except end; +procedure TExtButtonSplit.HandleEvent(const AEvtName : string); begin inherited; + if (AEvtName = 'arrowclick') and Assigned(FOnArrowclick) then + FOnArrowclick(TExtButtonSplit(ParamAsObject('This')), TExtDirectEvent(ParamAsObject('E'))); end; -procedure TExtDirectPollingProvider.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'beforepoll') and Assigned(FOnBeforepoll) then - FOnBeforepoll(TExtDirectPollingProvider(ParamAsObject('This'))) - else if (AEvtName = 'poll') and Assigned(FOnPoll) then - FOnPoll(TExtDirectPollingProvider(ParamAsObject('This'))); +procedure TExtTab.SetFActive(Value : Boolean); begin + FActive := Value; + JSCode(JSName + '.active=' + VarToJSON([Value]) + ';'); end; -procedure TExtLayoutContainerAuto.SetFManageOverflow(Value : Boolean); begin - FManageOverflow := Value; - JSCode(JSName + '.manageOverflow=' + VarToJSON([Value]) + ';'); +procedure TExtTab.SetFActiveCls(Value : String); begin + FActiveCls := Value; + JSCode('activeCls:' + VarToJSON([Value])); end; -procedure TExtLayoutContainerAuto.SetFManagePadding(Value : Boolean); begin - FManagePadding := Value; - JSCode(JSName + '.managePadding=' + VarToJSON([Value]) + ';'); +procedure TExtTab.SetFClosable(Value : Boolean); begin + FClosable := Value; + if not ConfigAvailable(JSName) then + SetClosable(Value) + else + JSCode('closable:' + VarToJSON([Value])); end; -procedure TExtLayoutContainerAuto.SetFReserveScrollbar(Value : Boolean); begin - FReserveScrollbar := Value; - JSCode('reserveScrollbar:' + VarToJSON([Value])); +procedure TExtTab.SetFClosable_(Value : Boolean); begin + FClosable_ := Value; + JSCode(JSName + '.closable=' + VarToJSON([Value]) + ';'); end; -function TExtLayoutContainerAuto.JSClassName : string; begin - Result := 'Ext.layout.container.Auto'; +procedure TExtTab.SetFClosableCls(Value : String); begin + FClosableCls := Value; + JSCode('closableCls:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtLayoutContainerAuto.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtLayoutComponentDock.JSClassName : string; begin - Result := 'Ext.layout.component.Dock'; +procedure TExtTab.SetFCloseText(Value : String); begin + FCloseText := Value; + JSCode('closeText:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtLayoutComponentDock.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtLayoutComponentDock.InvalidateAxes : TExtFunction; begin - JSCode(JSName + '.invalidateAxes();', 'TExtLayoutComponentDock'); - Result := Self; +procedure TExtTab.SetFDisabledCls(Value : String); begin + FDisabledCls := Value; + JSCode('disabledCls:' + VarToJSON([Value])); end; -procedure TExtSelectionCellModel.SetFEnableKeyNav(Value : Boolean); begin - FEnableKeyNav := Value; - JSCode('enableKeyNav:' + VarToJSON([Value])); +procedure TExtTab.SetFIsTab(Value : Boolean); begin + FIsTab := Value; + JSCode(JSName + '.isTab=' + VarToJSON([Value]) + ';'); end; -procedure TExtSelectionCellModel.SetFMode(Value : TModeEnum); begin - FMode := Value; - JSCode('mode:"' + EnumToJSString(TypeInfo(TModeEnum), ord(Value)) + '"'); +procedure TExtTab.SetFOnActivate(Value : TExtTabOnActivate); begin + if Assigned(FOnActivate) then + JSCode(JSName+'.events ["activate"].listeners=[];'); + if Assigned(Value) then + AddListener('activate', Ajax('activate', ['This', '%0.nm'], true)); + FOnActivate := Value; end; -procedure TExtSelectionCellModel.SetFPreventWrap(Value : Boolean); begin - FPreventWrap := Value; - JSCode('preventWrap:' + VarToJSON([Value])); +procedure TExtTab.SetFOnBeforeclose(Value : TExtTabOnBeforeclose); begin + if Assigned(FOnBeforeclose) then + JSCode(JSName+'.events ["beforeclose"].listeners=[];'); + if Assigned(Value) then + AddListener('beforeclose', Ajax('beforeclose', ['Tab', '%0.nm'], true)); + FOnBeforeclose := Value; end; -procedure TExtSelectionCellModel.SetFOnDeselect(Value : TExtSelectionCellModelOnDeselect); begin - if Assigned(FOnDeselect) then - JSCode(JSName+'.events ["deselect"].listeners=[];'); +procedure TExtTab.SetFOnClose(Value : TExtTabOnClose); begin + if Assigned(FOnClose) then + JSCode(JSName+'.events ["close"].listeners=[];'); if Assigned(Value) then - AddListener('deselect', Ajax('deselect', ['This', '%0.nm','RecordJS', '%1.nm','Row', '%2','Column', '%3'], true)); - FOnDeselect := Value; + AddListener('close', Ajax('close', ['Tab', '%0.nm'], true)); + FOnClose := Value; end; -procedure TExtSelectionCellModel.SetFOnSelect(Value : TExtSelectionCellModelOnSelect); begin - if Assigned(FOnSelect) then - JSCode(JSName+'.events ["select"].listeners=[];'); +procedure TExtTab.SetFOnDeactivate(Value : TExtTabOnDeactivate); begin + if Assigned(FOnDeactivate) then + JSCode(JSName+'.events ["deactivate"].listeners=[];'); if Assigned(Value) then - AddListener('select', Ajax('select', ['This', '%0.nm','RecordJS', '%1.nm','Row', '%2','Column', '%3'], true)); - FOnSelect := Value; + AddListener('deactivate', Ajax('deactivate', ['This', '%0.nm'], true)); + FOnDeactivate := Value; end; -function TExtSelectionCellModel.JSClassName : string; begin - Result := 'Ext.selection.CellModel'; +function TExtTab.JSClassName : string; begin + Result := 'Ext.tab.Tab'; end; -{$IFDEF FPC}constructor TExtSelectionCellModel.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtTab.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtSelectionCellModel.GetCurrentPosition : TExtFunction; begin - JSCode(JSName + '.getCurrentPosition();', 'TExtSelectionCellModel'); +function TExtTab.SetCard(Card : TExtComponent) : TExtFunction; begin + JSCode(JSName + '.setCard(' + VarToJSON([Card, false]) + ');', 'TExtTab'); + Result := Self; +end; + +function TExtTab.SetClosable(Closable : Boolean) : TExtFunction; begin + JSCode(JSName + '.setClosable(' + VarToJSON([Closable]) + ');', 'TExtTab'); Result := Self; end; -function TExtSelectionCellModel.SetCurrentPosition(Position : TExtObject) : TExtFunction; begin - JSCode(JSName + '.setCurrentPosition(' + VarToJSON([Position, false]) + ');', 'TExtSelectionCellModel'); - Result := Self; +procedure TExtTab.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'activate') and Assigned(FOnActivate) then + FOnActivate(TExtTab(ParamAsObject('This'))) + else if (AEvtName = 'beforeclose') and Assigned(FOnBeforeclose) then + FOnBeforeclose(TExtTab(ParamAsObject('Tab'))) + else if (AEvtName = 'close') and Assigned(FOnClose) then + FOnClose(TExtTab(ParamAsObject('Tab'))) + else if (AEvtName = 'deactivate') and Assigned(FOnDeactivate) then + FOnDeactivate(TExtTab(ParamAsObject('This'))); +end; + +procedure TExtGridPluginRowEditing.SetFAutoCancel(Value : Boolean); begin + FAutoCancel := Value; + JSCode('autoCancel:' + VarToJSON([Value])); end; -procedure TExtSelectionCellModel.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'deselect') and Assigned(FOnDeselect) then - FOnDeselect(TExtSelectionCellModel(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), ParamAsInteger('Row'), ParamAsInteger('Column')) - else if (AEvtName = 'select') and Assigned(FOnSelect) then - FOnSelect(TExtSelectionCellModel(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), ParamAsInteger('Row'), ParamAsInteger('Column')); +procedure TExtGridPluginRowEditing.SetFClicksToMoveEditor(Value : Integer); begin + FClicksToMoveEditor := Value; + JSCode('clicksToMoveEditor:' + VarToJSON([Value])); end; -function TExtDirectExceptionEvent.JSClassName : string; begin - Result := 'Ext.direct.ExceptionEvent'; +procedure TExtGridPluginRowEditing.SetFErrorSummary(Value : Boolean); begin + FErrorSummary := Value; + JSCode('errorSummary:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtDirectExceptionEvent.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtGridFeatureRowWrap.JSClassName : string; begin - Result := 'Ext.grid.feature.RowWrap'; +function TExtGridPluginRowEditing.JSClassName : string; begin + Result := 'Ext.grid.plugin.RowEditing'; end; -{$IFDEF FPC}constructor TExtGridFeatureRowWrap.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtGridPluginRowEditing.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtView.SetFMouseOverOutBuffer(Value : Integer); begin - FMouseOverOutBuffer := Value; - JSCode('mouseOverOutBuffer:' + VarToJSON([Value])); +function TExtGridPluginRowEditing.StartEdit(RecordJS : TExtDataModel; ColumnHeader : TExtDataModel) : TExtFunction; begin + JSCode(JSName + '.startEdit(' + VarToJSON([RecordJS, false, ColumnHeader, false]) + ');', 'TExtGridPluginRowEditing'); + Result := Self; end; -procedure TExtView.SetFOnBeforecontainerclick(Value : TExtViewOnBeforecontainerclick); begin - if Assigned(FOnBeforecontainerclick) then - JSCode(JSName+'.events ["beforecontainerclick"].listeners=[];'); +procedure TExtGridPluginCellEditing.SetFOnBeforeedit(Value : TExtGridPluginCellEditingOnBeforeedit); begin + if Assigned(FOnBeforeedit) then + JSCode(JSName+'.events ["beforeedit"].listeners=[];'); if Assigned(Value) then - AddListener('beforecontainerclick', Ajax('beforecontainerclick', ['This', '%0.nm','E', '%1.nm'], true)); - FOnBeforecontainerclick := Value; + AddListener('beforeedit', Ajax('beforeedit', ['Editor', '%0.nm','E', '%1.nm'], true)); + FOnBeforeedit := Value; end; -procedure TExtView.SetFOnBeforecontainercontextmenu(Value : TExtViewOnBeforecontainercontextmenu); begin - if Assigned(FOnBeforecontainercontextmenu) then - JSCode(JSName+'.events ["beforecontainercontextmenu"].listeners=[];'); +procedure TExtGridPluginCellEditing.SetFOnCanceledit(Value : TExtGridPluginCellEditingOnCanceledit); begin + if Assigned(FOnCanceledit) then + JSCode(JSName+'.events ["canceledit"].listeners=[];'); if Assigned(Value) then - AddListener('beforecontainercontextmenu', Ajax('beforecontainercontextmenu', ['This', '%0.nm','E', '%1.nm'], true)); - FOnBeforecontainercontextmenu := Value; + AddListener('canceledit', Ajax('canceledit', ['Editor', '%0.nm','E', '%1.nm'], true)); + FOnCanceledit := Value; end; -procedure TExtView.SetFOnBeforecontainerdblclick(Value : TExtViewOnBeforecontainerdblclick); begin - if Assigned(FOnBeforecontainerdblclick) then - JSCode(JSName+'.events ["beforecontainerdblclick"].listeners=[];'); +procedure TExtGridPluginCellEditing.SetFOnEdit(Value : TExtGridPluginCellEditingOnEdit); begin + if Assigned(FOnEdit) then + JSCode(JSName+'.events ["edit"].listeners=[];'); if Assigned(Value) then - AddListener('beforecontainerdblclick', Ajax('beforecontainerdblclick', ['This', '%0.nm','E', '%1.nm'], true)); - FOnBeforecontainerdblclick := Value; + AddListener('edit', Ajax('edit', ['Editor', '%0.nm','E', '%1.nm'], true)); + FOnEdit := Value; end; -procedure TExtView.SetFOnBeforecontainerkeydown(Value : TExtViewOnBeforecontainerkeydown); begin - if Assigned(FOnBeforecontainerkeydown) then - JSCode(JSName+'.events ["beforecontainerkeydown"].listeners=[];'); +procedure TExtGridPluginCellEditing.SetFOnValidateedit(Value : TExtGridPluginCellEditingOnValidateedit); begin + if Assigned(FOnValidateedit) then + JSCode(JSName+'.events ["validateedit"].listeners=[];'); if Assigned(Value) then - AddListener('beforecontainerkeydown', Ajax('beforecontainerkeydown', ['This', '%0.nm','E', '%1.nm'], true)); - FOnBeforecontainerkeydown := Value; + AddListener('validateedit', Ajax('validateedit', ['Editor', '%0.nm','E', '%1.nm'], true)); + FOnValidateedit := Value; end; -procedure TExtView.SetFOnBeforecontainermousedown(Value : TExtViewOnBeforecontainermousedown); begin - if Assigned(FOnBeforecontainermousedown) then - JSCode(JSName+'.events ["beforecontainermousedown"].listeners=[];'); - if Assigned(Value) then - AddListener('beforecontainermousedown', Ajax('beforecontainermousedown', ['This', '%0.nm','E', '%1.nm'], true)); - FOnBeforecontainermousedown := Value; +function TExtGridPluginCellEditing.JSClassName : string; begin + Result := 'Ext.grid.plugin.CellEditing'; end; -procedure TExtView.SetFOnBeforecontainermouseout(Value : TExtViewOnBeforecontainermouseout); begin - if Assigned(FOnBeforecontainermouseout) then - JSCode(JSName+'.events ["beforecontainermouseout"].listeners=[];'); - if Assigned(Value) then - AddListener('beforecontainermouseout', Ajax('beforecontainermouseout', ['This', '%0.nm','E', '%1.nm'], true)); - FOnBeforecontainermouseout := Value; +{$IFDEF FPC}constructor TExtGridPluginCellEditing.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtGridPluginCellEditing.CancelEdit : TExtFunction; begin + JSCode(JSName + '.cancelEdit();', 'TExtGridPluginCellEditing'); + Result := Self; end; -procedure TExtView.SetFOnBeforecontainermouseover(Value : TExtViewOnBeforecontainermouseover); begin - if Assigned(FOnBeforecontainermouseover) then - JSCode(JSName+'.events ["beforecontainermouseover"].listeners=[];'); - if Assigned(Value) then - AddListener('beforecontainermouseover', Ajax('beforecontainermouseover', ['This', '%0.nm','E', '%1.nm'], true)); - FOnBeforecontainermouseover := Value; +function TExtGridPluginCellEditing.StartEdit(RecordJS : Integer; ColumnHeader : Integer) : TExtFunction; begin + JSCode(JSName + '.startEdit(' + VarToJSON([RecordJS, ColumnHeader]) + ');', 'TExtGridPluginCellEditing'); + Result := Self; end; -procedure TExtView.SetFOnBeforecontainermouseup(Value : TExtViewOnBeforecontainermouseup); begin - if Assigned(FOnBeforecontainermouseup) then - JSCode(JSName+'.events ["beforecontainermouseup"].listeners=[];'); - if Assigned(Value) then - AddListener('beforecontainermouseup', Ajax('beforecontainermouseup', ['This', '%0.nm','E', '%1.nm'], true)); - FOnBeforecontainermouseup := Value; +function TExtGridPluginCellEditing.StartEditByPosition(Position : TExtObject) : TExtFunction; begin + JSCode(JSName + '.startEditByPosition(' + VarToJSON([Position, false]) + ');', 'TExtGridPluginCellEditing'); + Result := Self; end; -procedure TExtView.SetFOnBeforeitemclick(Value : TExtViewOnBeforeitemclick); begin - if Assigned(FOnBeforeitemclick) then - JSCode(JSName+'.events ["beforeitemclick"].listeners=[];'); - if Assigned(Value) then - AddListener('beforeitemclick', Ajax('beforeitemclick', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); - FOnBeforeitemclick := Value; +procedure TExtGridPluginCellEditing.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'beforeedit') and Assigned(FOnBeforeedit) then + FOnBeforeedit(TExtGridPluginCellEditing(ParamAsObject('Editor')), TExtObject(ParamAsObject('E'))) + else if (AEvtName = 'canceledit') and Assigned(FOnCanceledit) then + FOnCanceledit(TExtGridPluginCellEditing(ParamAsObject('Editor')), TExtObject(ParamAsObject('E'))) + else if (AEvtName = 'edit') and Assigned(FOnEdit) then + FOnEdit(TExtGridPluginCellEditing(ParamAsObject('Editor')), TExtObject(ParamAsObject('E'))) + else if (AEvtName = 'validateedit') and Assigned(FOnValidateedit) then + FOnValidateedit(TExtGridPluginCellEditing(ParamAsObject('Editor')), TExtObject(ParamAsObject('E'))); end; -procedure TExtView.SetFOnBeforeitemcontextmenu(Value : TExtViewOnBeforeitemcontextmenu); begin - if Assigned(FOnBeforeitemcontextmenu) then - JSCode(JSName+'.events ["beforeitemcontextmenu"].listeners=[];'); - if Assigned(Value) then - AddListener('beforeitemcontextmenu', Ajax('beforeitemcontextmenu', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); - FOnBeforeitemcontextmenu := Value; +procedure TExtDataProxyDirect.SetFApi(Value : TExtObject); begin + FApi := Value; + Value.DeleteFromGarbage; + JSCode('api:' + VarToJSON([Value, false])); end; -procedure TExtView.SetFOnBeforeitemdblclick(Value : TExtViewOnBeforeitemdblclick); begin - if Assigned(FOnBeforeitemdblclick) then - JSCode(JSName+'.events ["beforeitemdblclick"].listeners=[];'); - if Assigned(Value) then - AddListener('beforeitemdblclick', Ajax('beforeitemdblclick', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); - FOnBeforeitemdblclick := Value; +procedure TExtDataProxyDirect.SetFDirectFn(Value : TExtFunction); begin + FDirectFn := Value; + JSCode('directFn:' + VarToJSON([Value, true])); end; -procedure TExtView.SetFOnBeforeitemkeydown(Value : TExtViewOnBeforeitemkeydown); begin - if Assigned(FOnBeforeitemkeydown) then - JSCode(JSName+'.events ["beforeitemkeydown"].listeners=[];'); - if Assigned(Value) then - AddListener('beforeitemkeydown', Ajax('beforeitemkeydown', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); - FOnBeforeitemkeydown := Value; +procedure TExtDataProxyDirect.SetFDirectFnString(Value : String); begin + FDirectFnString := Value; + JSCode('directFn:' + VarToJSON([Value])); end; -procedure TExtView.SetFOnBeforeitemmousedown(Value : TExtViewOnBeforeitemmousedown); begin - if Assigned(FOnBeforeitemmousedown) then - JSCode(JSName+'.events ["beforeitemmousedown"].listeners=[];'); - if Assigned(Value) then - AddListener('beforeitemmousedown', Ajax('beforeitemmousedown', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); - FOnBeforeitemmousedown := Value; +procedure TExtDataProxyDirect.SetFExtraParams(Value : TExtObject); begin + FExtraParams := Value; + Value.DeleteFromGarbage; + JSCode('extraParams:' + VarToJSON([Value, false])); end; -procedure TExtView.SetFOnBeforeitemmouseenter(Value : TExtViewOnBeforeitemmouseenter); begin - if Assigned(FOnBeforeitemmouseenter) then - JSCode(JSName+'.events ["beforeitemmouseenter"].listeners=[];'); - if Assigned(Value) then - AddListener('beforeitemmouseenter', Ajax('beforeitemmouseenter', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); - FOnBeforeitemmouseenter := Value; +procedure TExtDataProxyDirect.SetFParamOrder(Value : String); begin + FParamOrder := Value; + JSCode('paramOrder:' + VarToJSON([Value])); end; -procedure TExtView.SetFOnBeforeitemmouseleave(Value : TExtViewOnBeforeitemmouseleave); begin - if Assigned(FOnBeforeitemmouseleave) then - JSCode(JSName+'.events ["beforeitemmouseleave"].listeners=[];'); - if Assigned(Value) then - AddListener('beforeitemmouseleave', Ajax('beforeitemmouseleave', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); - FOnBeforeitemmouseleave := Value; +procedure TExtDataProxyDirect.SetFParamOrderList(Value : TExtObjectList); begin + FParamOrderList := Value; + Value.DeleteFromGarbage; + JSCode('paramOrder:' + VarToJSON([Value, false])); end; -procedure TExtView.SetFOnBeforeitemmouseup(Value : TExtViewOnBeforeitemmouseup); begin - if Assigned(FOnBeforeitemmouseup) then - JSCode(JSName+'.events ["beforeitemmouseup"].listeners=[];'); - if Assigned(Value) then - AddListener('beforeitemmouseup', Ajax('beforeitemmouseup', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); - FOnBeforeitemmouseup := Value; +procedure TExtDataProxyDirect.SetFParamsAsHash(Value : Boolean); begin + FParamsAsHash := Value; + JSCode('paramsAsHash:' + VarToJSON([Value])); end; -procedure TExtView.SetFOnContainerclick(Value : TExtViewOnContainerclick); begin - if Assigned(FOnContainerclick) then - JSCode(JSName+'.events ["containerclick"].listeners=[];'); - if Assigned(Value) then - AddListener('containerclick', Ajax('containerclick', ['This', '%0.nm','E', '%1.nm'], true)); - FOnContainerclick := Value; +function TExtDataProxyDirect.JSClassName : string; begin + Result := 'Ext.data.proxy.Direct'; end; -procedure TExtView.SetFOnContainercontextmenu(Value : TExtViewOnContainercontextmenu); begin - if Assigned(FOnContainercontextmenu) then - JSCode(JSName+'.events ["containercontextmenu"].listeners=[];'); - if Assigned(Value) then - AddListener('containercontextmenu', Ajax('containercontextmenu', ['This', '%0.nm','E', '%1.nm'], true)); - FOnContainercontextmenu := Value; +procedure TExtDataProxyDirect.InitDefaults; begin + inherited; + FApi := TExtObject.CreateInternal(Self, 'api'); + FExtraParams := TExtObject.CreateInternal(Self, 'extraParams'); + FParamOrderList := TExtObjectList.Create(Self, 'paramOrder'); end; -procedure TExtView.SetFOnContainerdblclick(Value : TExtViewOnContainerdblclick); begin - if Assigned(FOnContainerdblclick) then - JSCode(JSName+'.events ["containerdblclick"].listeners=[];'); - if Assigned(Value) then - AddListener('containerdblclick', Ajax('containerdblclick', ['This', '%0.nm','E', '%1.nm'], true)); - FOnContainerdblclick := Value; +{$IFDEF FPC}constructor TExtDataProxyDirect.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtDataProxyDirect.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtView.SetFOnContainerkeydown(Value : TExtViewOnContainerkeydown); begin - if Assigned(FOnContainerkeydown) then - JSCode(JSName+'.events ["containerkeydown"].listeners=[];'); - if Assigned(Value) then - AddListener('containerkeydown', Ajax('containerkeydown', ['This', '%0.nm','E', '%1.nm'], true)); - FOnContainerkeydown := Value; +destructor TExtDataProxyDirect.Destroy; begin + try + FApi.Free; + FExtraParams.Free; + FParamOrderList.Free; + except end; + inherited; end; -procedure TExtView.SetFOnContainermouseout(Value : TExtViewOnContainermouseout); begin - if Assigned(FOnContainermouseout) then - JSCode(JSName+'.events ["containermouseout"].listeners=[];'); - if Assigned(Value) then - AddListener('containermouseout', Ajax('containermouseout', ['This', '%0.nm','E', '%1.nm'], true)); - FOnContainermouseout := Value; +procedure TExtDataProxyJsonP.SetFAutoAppendParams(Value : Boolean); begin + FAutoAppendParams := Value; + JSCode('autoAppendParams:' + VarToJSON([Value])); end; -procedure TExtView.SetFOnContainermouseover(Value : TExtViewOnContainermouseover); begin - if Assigned(FOnContainermouseover) then - JSCode(JSName+'.events ["containermouseover"].listeners=[];'); - if Assigned(Value) then - AddListener('containermouseover', Ajax('containermouseover', ['This', '%0.nm','E', '%1.nm'], true)); - FOnContainermouseover := Value; +procedure TExtDataProxyJsonP.SetFCallbackKey(Value : String); begin + FCallbackKey := Value; + JSCode('callbackKey:' + VarToJSON([Value])); end; -procedure TExtView.SetFOnContainermouseup(Value : TExtViewOnContainermouseup); begin - if Assigned(FOnContainermouseup) then - JSCode(JSName+'.events ["containermouseup"].listeners=[];'); - if Assigned(Value) then - AddListener('containermouseup', Ajax('containermouseup', ['This', '%0.nm','E', '%1.nm'], true)); - FOnContainermouseup := Value; +procedure TExtDataProxyJsonP.SetFRecordParam(Value : String); begin + FRecordParam := Value; + JSCode('recordParam:' + VarToJSON([Value])); end; -procedure TExtView.SetFOnHighlightitem(Value : TExtViewOnHighlightitem); begin - if Assigned(FOnHighlightitem) then - JSCode(JSName+'.events ["highlightitem"].listeners=[];'); - if Assigned(Value) then - AddListener('highlightitem', Ajax('highlightitem', ['View', '%0.nm','Node', '%1.nm'], true)); - FOnHighlightitem := Value; +function TExtDataProxyJsonP.JSClassName : string; begin + Result := 'Ext.data.proxy.JsonP'; end; -procedure TExtView.SetFOnItemclick(Value : TExtViewOnItemclick); begin - if Assigned(FOnItemclick) then - JSCode(JSName+'.events ["itemclick"].listeners=[];'); - if Assigned(Value) then - AddListener('itemclick', Ajax('itemclick', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); - FOnItemclick := Value; +procedure TExtDataProxyJsonP.InitDefaults; begin + inherited; + FAutoAppendParams := true; end; -procedure TExtView.SetFOnItemcontextmenu(Value : TExtViewOnItemcontextmenu); begin - if Assigned(FOnItemcontextmenu) then - JSCode(JSName+'.events ["itemcontextmenu"].listeners=[];'); - if Assigned(Value) then - AddListener('itemcontextmenu', Ajax('itemcontextmenu', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); - FOnItemcontextmenu := Value; +{$IFDEF FPC}constructor TExtDataProxyJsonP.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDataProxyJsonP.Abort : TExtFunction; begin + JSCode(JSName + '.abort();', 'TExtDataProxyJsonP'); + Result := Self; end; -procedure TExtView.SetFOnItemdblclick(Value : TExtViewOnItemdblclick); begin - if Assigned(FOnItemdblclick) then - JSCode(JSName+'.events ["itemdblclick"].listeners=[];'); - if Assigned(Value) then - AddListener('itemdblclick', Ajax('itemdblclick', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); - FOnItemdblclick := Value; +function TExtDataProxyJsonP.BuildUrl(Request : TExtDataRequest) : TExtFunction; begin + JSCode(JSName + '.buildUrl(' + VarToJSON([Request, false]) + ');', 'TExtDataProxyJsonP'); + Result := Self; end; -procedure TExtView.SetFOnItemkeydown(Value : TExtViewOnItemkeydown); begin - if Assigned(FOnItemkeydown) then - JSCode(JSName+'.events ["itemkeydown"].listeners=[];'); - if Assigned(Value) then - AddListener('itemkeydown', Ajax('itemkeydown', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); - FOnItemkeydown := Value; +constructor TExtDataProxyJsonP.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtView.SetFOnItemmousedown(Value : TExtViewOnItemmousedown); begin - if Assigned(FOnItemmousedown) then - JSCode(JSName+'.events ["itemmousedown"].listeners=[];'); - if Assigned(Value) then - AddListener('itemmousedown', Ajax('itemmousedown', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); - FOnItemmousedown := Value; +function TExtDataProxyJsonP.EncodeRecords(Records : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.encodeRecords(' + VarToJSON(Records) + ');', 'TExtDataProxyJsonP'); + Result := Self; end; -procedure TExtView.SetFOnItemmouseenter(Value : TExtViewOnItemmouseenter); begin - if Assigned(FOnItemmouseenter) then - JSCode(JSName+'.events ["itemmouseenter"].listeners=[];'); - if Assigned(Value) then - AddListener('itemmouseenter', Ajax('itemmouseenter', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); - FOnItemmouseenter := Value; +procedure TExtLayoutContainerBorder.SetFPadding(Value : Integer); begin + FPadding := Value; + JSCode('padding:' + VarToJSON([Value])); end; -procedure TExtView.SetFOnItemmouseleave(Value : TExtViewOnItemmouseleave); begin - if Assigned(FOnItemmouseleave) then - JSCode(JSName+'.events ["itemmouseleave"].listeners=[];'); - if Assigned(Value) then - AddListener('itemmouseleave', Ajax('itemmouseleave', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); - FOnItemmouseleave := Value; +procedure TExtLayoutContainerBorder.SetFPaddingObject(Value : TExtObject); begin + FPaddingObject := Value; + Value.DeleteFromGarbage; + JSCode('padding:' + VarToJSON([Value, false])); end; -procedure TExtView.SetFOnItemmouseup(Value : TExtViewOnItemmouseup); begin - if Assigned(FOnItemmouseup) then - JSCode(JSName+'.events ["itemmouseup"].listeners=[];'); - if Assigned(Value) then - AddListener('itemmouseup', Ajax('itemmouseup', ['This', '%0.nm','RecordJS', '%1.nm','Item', '%2.nm','Index', '%3','E', '%4.nm'], true)); - FOnItemmouseup := Value; +procedure TExtLayoutContainerBorder.SetFPaddingString(Value : String); begin + FPaddingString := Value; + JSCode('padding:' + VarToJSON([Value])); end; -procedure TExtView.SetFOnUnhighlightitem(Value : TExtViewOnUnhighlightitem); begin - if Assigned(FOnUnhighlightitem) then - JSCode(JSName+'.events ["unhighlightitem"].listeners=[];'); - if Assigned(Value) then - AddListener('unhighlightitem', Ajax('unhighlightitem', ['View', '%0.nm','Node', '%1.nm'], true)); - FOnUnhighlightitem := Value; +procedure TExtLayoutContainerBorder.SetFRegionWeights(Value : TExtObject); begin + FRegionWeights := Value; + Value.DeleteFromGarbage; + JSCode('regionWeights:' + VarToJSON([Value, false])); end; -function TExtView.JSClassName : string; begin - Result := 'Ext.view.View'; +procedure TExtLayoutContainerBorder.SetFSplit(Value : Boolean); begin + FSplit := Value; + JSCode('split:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtView.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtLayoutContainerBorder.SetFSplitterResize(Value : Boolean); begin + FSplitterResize := Value; + JSCode('splitterResize:' + VarToJSON([Value])); +end; -function TExtView.ClearHighlight : TExtFunction; begin - JSCode(JSName + '.clearHighlight();', 'TExtView'); - Result := Self; +function TExtLayoutContainerBorder.JSClassName : string; begin + Result := 'Ext.layout.container.Border'; end; -function TExtView.FocusNode(Rec : TExtDataModel) : TExtFunction; begin - JSCode(JSName + '.focusNode(' + VarToJSON([Rec, false]) + ');', 'TExtView'); - Result := Self; +procedure TExtLayoutContainerBorder.InitDefaults; begin + inherited; + FPaddingObject := TExtObject.CreateInternal(Self, 'padding'); + FRegionWeights := TExtObject.CreateInternal(Self, 'regionWeights'); end; -function TExtView.HighlightItem(Item : THTMLElement) : TExtFunction; begin - JSCode(JSName + '.highlightItem(' + VarToJSON([Item, false]) + ');', 'TExtView'); - Result := Self; +{$IFDEF FPC}constructor TExtLayoutContainerBorder.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtLayoutContainerBorder.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtView.HandleEvent(const AEvtName : string); begin +destructor TExtLayoutContainerBorder.Destroy; begin + try + FPaddingObject.Free; + FRegionWeights.Free; + except end; inherited; - if (AEvtName = 'beforecontainerclick') and Assigned(FOnBeforecontainerclick) then - FOnBeforecontainerclick(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'beforecontainercontextmenu') and Assigned(FOnBeforecontainercontextmenu) then - FOnBeforecontainercontextmenu(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'beforecontainerdblclick') and Assigned(FOnBeforecontainerdblclick) then - FOnBeforecontainerdblclick(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'beforecontainerkeydown') and Assigned(FOnBeforecontainerkeydown) then - FOnBeforecontainerkeydown(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'beforecontainermousedown') and Assigned(FOnBeforecontainermousedown) then - FOnBeforecontainermousedown(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'beforecontainermouseout') and Assigned(FOnBeforecontainermouseout) then - FOnBeforecontainermouseout(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'beforecontainermouseover') and Assigned(FOnBeforecontainermouseover) then - FOnBeforecontainermouseover(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'beforecontainermouseup') and Assigned(FOnBeforecontainermouseup) then - FOnBeforecontainermouseup(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'beforeitemclick') and Assigned(FOnBeforeitemclick) then - FOnBeforeitemclick(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'beforeitemcontextmenu') and Assigned(FOnBeforeitemcontextmenu) then - FOnBeforeitemcontextmenu(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'beforeitemdblclick') and Assigned(FOnBeforeitemdblclick) then - FOnBeforeitemdblclick(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'beforeitemkeydown') and Assigned(FOnBeforeitemkeydown) then - FOnBeforeitemkeydown(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'beforeitemmousedown') and Assigned(FOnBeforeitemmousedown) then - FOnBeforeitemmousedown(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'beforeitemmouseenter') and Assigned(FOnBeforeitemmouseenter) then - FOnBeforeitemmouseenter(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'beforeitemmouseleave') and Assigned(FOnBeforeitemmouseleave) then - FOnBeforeitemmouseleave(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'beforeitemmouseup') and Assigned(FOnBeforeitemmouseup) then - FOnBeforeitemmouseup(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'containerclick') and Assigned(FOnContainerclick) then - FOnContainerclick(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'containercontextmenu') and Assigned(FOnContainercontextmenu) then - FOnContainercontextmenu(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'containerdblclick') and Assigned(FOnContainerdblclick) then - FOnContainerdblclick(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'containerkeydown') and Assigned(FOnContainerkeydown) then - FOnContainerkeydown(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'containermouseout') and Assigned(FOnContainermouseout) then - FOnContainermouseout(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'containermouseover') and Assigned(FOnContainermouseover) then - FOnContainermouseover(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'containermouseup') and Assigned(FOnContainermouseup) then - FOnContainermouseup(TExtView(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'highlightitem') and Assigned(FOnHighlightitem) then - FOnHighlightitem(TExtView(ParamAsObject('View')), TExtElement(ParamAsObject('Node'))) - else if (AEvtName = 'itemclick') and Assigned(FOnItemclick) then - FOnItemclick(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'itemcontextmenu') and Assigned(FOnItemcontextmenu) then - FOnItemcontextmenu(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'itemdblclick') and Assigned(FOnItemdblclick) then - FOnItemdblclick(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'itemkeydown') and Assigned(FOnItemkeydown) then - FOnItemkeydown(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'itemmousedown') and Assigned(FOnItemmousedown) then - FOnItemmousedown(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'itemmouseenter') and Assigned(FOnItemmouseenter) then - FOnItemmouseenter(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'itemmouseleave') and Assigned(FOnItemmouseleave) then - FOnItemmouseleave(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'itemmouseup') and Assigned(FOnItemmouseup) then - FOnItemmouseup(TExtView(ParamAsObject('This')), TExtDataModel(ParamAsObject('RecordJS')), THTMLElement(ParamAsObject('Item')), ParamAsInteger('Index'), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'unhighlightitem') and Assigned(FOnUnhighlightitem) then - FOnUnhighlightitem(TExtView(ParamAsObject('View')), TExtElement(ParamAsObject('Node'))); end; -procedure TExtChartAxisCategory.SetFCalculateCategoryCount(Value : Boolean); begin - FCalculateCategoryCount := Value; - JSCode('calculateCategoryCount:' + VarToJSON([Value])); +procedure TExtSelectionCheckboxModel.SetFCheckOnly(Value : Boolean); begin + FCheckOnly := Value; + JSCode('checkOnly:' + VarToJSON([Value])); end; -procedure TExtChartAxisCategory.SetFCategoryNames(Value : String); begin - FCategoryNames := Value; - JSCode('categoryNames:' + VarToJSON([Value])); +procedure TExtSelectionCheckboxModel.SetFCheckSelector(Value : String); begin + FCheckSelector := Value; + JSCode('checkSelector:' + VarToJSON([Value])); end; -function TExtChartAxisCategory.JSClassName : string; begin - Result := 'Ext.chart.axis.Category'; +procedure TExtSelectionCheckboxModel.SetFInjectCheckbox(Value : Integer); begin + FInjectCheckbox := Value; + JSCode('injectCheckbox:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtChartAxisCategory.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtSelectionCheckboxModel.SetFInjectCheckboxString(Value : String); begin + FInjectCheckboxString := Value; + JSCode('injectCheckbox:' + VarToJSON([Value])); +end; -procedure TExtGridFeatureAbstractSummary.SetFRemoteRoot(Value : String); begin - FRemoteRoot := Value; - JSCode('remoteRoot:' + VarToJSON([Value])); +procedure TExtSelectionCheckboxModel.SetFMode(Value : TModeEnum); begin + FMode := Value; + JSCode('mode:"' + EnumToJSString(TypeInfo(TModeEnum), ord(Value)) + '"'); end; -function TExtGridFeatureAbstractSummary.JSClassName : string; begin - Result := 'Ext.grid.feature.AbstractSummary'; +procedure TExtSelectionCheckboxModel.SetFShowHeaderCheckbox(Value : Boolean); begin + FShowHeaderCheckbox := Value; + JSCode('showHeaderCheckbox:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtGridFeatureAbstractSummary.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtSelectionCheckboxModel.JSClassName : string; begin + Result := 'Ext.selection.CheckboxModel'; +end; -procedure TExtGridFeatureGrouping.SetFCollapsible(Value : Boolean); begin - FCollapsible := Value; - JSCode('collapsible:' + VarToJSON([Value])); +{$IFDEF FPC}constructor TExtSelectionCheckboxModel.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtSelectionCheckboxModel.GetHeaderConfig : TExtFunction; begin + JSCode(JSName + '.getHeaderConfig();', 'TExtSelectionCheckboxModel'); + Result := Self; +end; + +function TExtSelectionCheckboxModel.OnHeaderClick : TExtFunction; begin + JSCode(JSName + '.onHeaderClick();', 'TExtSelectionCheckboxModel'); + Result := Self; end; -procedure TExtGridFeatureGrouping.SetFDepthToIndent(Value : Integer); begin - FDepthToIndent := Value; - JSCode('depthToIndent:' + VarToJSON([Value])); +function TExtSelectionCheckboxModel.Renderer : TExtFunction; begin + JSCode(JSName + '.renderer();', 'TExtSelectionCheckboxModel'); + Result := Self; end; -procedure TExtGridFeatureGrouping.SetFEnableGroupingMenu(Value : Boolean); begin - FEnableGroupingMenu := Value; - JSCode('enableGroupingMenu:' + VarToJSON([Value])); +procedure TExtChartAxisTime.SetFConstrain(Value : Boolean); begin + FConstrain := Value; + JSCode('constrain:' + VarToJSON([Value])); end; -procedure TExtGridFeatureGrouping.SetFEnableNoGroups(Value : Boolean); begin - FEnableNoGroups := Value; - JSCode('enableNoGroups:' + VarToJSON([Value])); +procedure TExtChartAxisTime.SetFDateFormat(Value : String); begin + FDateFormat := Value; + JSCode('dateFormat:' + VarToJSON([Value])); end; -procedure TExtGridFeatureGrouping.SetFGroupByText(Value : String); begin - FGroupByText := Value; - JSCode('groupByText:' + VarToJSON([Value])); +procedure TExtChartAxisTime.SetFDateFormatBoolean(Value : Boolean); begin + FDateFormatBoolean := Value; + JSCode('dateFormat:' + VarToJSON([Value])); end; -procedure TExtGridFeatureGrouping.SetFGroupHeaderTpl(Value : String); begin - FGroupHeaderTpl := Value; - JSCode('groupHeaderTpl:' + VarToJSON([Value])); +procedure TExtChartAxisTime.SetFFromDate(Value : TDateTime); begin + FFromDate := Value; + JSCode('fromDate:' + VarToJSON([Value])); end; -procedure TExtGridFeatureGrouping.SetFGroupHeaderTplList(Value : TExtObjectList); begin - FGroupHeaderTplList := Value; +procedure TExtChartAxisTime.SetFStep(Value : TExtObjectList); begin + FStep := Value; Value.DeleteFromGarbage; - JSCode('groupHeaderTpl:' + VarToJSON([Value, false])); + JSCode('step:' + VarToJSON([Value, false])); end; -procedure TExtGridFeatureGrouping.SetFGroupHeaderTplTemplate(Value : TExtTemplate); begin - FGroupHeaderTplTemplate := Value; - Value.DeleteFromGarbage; - JSCode('groupHeaderTpl:' + VarToJSON([Value, false])); +procedure TExtChartAxisTime.SetFToDate(Value : TDateTime); begin + FToDate := Value; + JSCode('toDate:' + VarToJSON([Value])); end; -procedure TExtGridFeatureGrouping.SetFHideGroupedHeader(Value : Boolean); begin - FHideGroupedHeader := Value; - JSCode('hideGroupedHeader:' + VarToJSON([Value])); +function TExtChartAxisTime.JSClassName : string; begin + Result := 'Ext.chart.axis.Time'; end; -procedure TExtGridFeatureGrouping.SetFRemoteRoot(Value : String); begin - FRemoteRoot := Value; - JSCode('remoteRoot:' + VarToJSON([Value])); +procedure TExtChartAxisTime.InitDefaults; begin + inherited; + FStep := TExtObjectList.Create(Self, 'step'); end; -procedure TExtGridFeatureGrouping.SetFShowGroupsText(Value : String); begin - FShowGroupsText := Value; - JSCode('showGroupsText:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtChartAxisTime.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtGridFeatureGrouping.SetFStartCollapsed(Value : Boolean); begin - FStartCollapsed := Value; - JSCode('startCollapsed:' + VarToJSON([Value])); +constructor TExtChartAxisTime.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -function TExtGridFeatureGrouping.JSClassName : string; begin - Result := 'Ext.grid.feature.Grouping'; +destructor TExtChartAxisTime.Destroy; begin + try + FStep.Free; + except end; + inherited; end; -procedure TExtGridFeatureGrouping.InitDefaults; begin - inherited; - FGroupHeaderTplList := TExtObjectList.Create(Self, 'groupHeaderTpl'); - FGroupHeaderTplTemplate := TExtTemplate.CreateInternal(Self, 'groupHeaderTpl'); +function TExtChartLegendItem.JSClassName : string; begin + Result := 'Ext.chart.LegendItem'; end; -{$IFDEF FPC}constructor TExtGridFeatureGrouping.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtChartLegendItem.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtGridFeatureGrouping.Collapse(GroupName : String; Focus : Boolean) : TExtFunction; begin - JSCode(JSName + '.collapse(' + VarToJSON([GroupName, Focus]) + ');', 'TExtGridFeatureGrouping'); +function TExtChartLegendItem.CreateLegend : TExtFunction; begin + JSCode(JSName + '.createLegend();', 'TExtChartLegendItem'); Result := Self; end; -function TExtGridFeatureGrouping.CollapseAll : TExtFunction; begin - JSCode(JSName + '.collapseAll();', 'TExtGridFeatureGrouping'); +function TExtChartLegendItem.UpdatePosition(RelativeTo : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.updatePosition(' + VarToJSON([RelativeTo, false]) + ');', 'TExtChartLegendItem'); Result := Self; end; -constructor TExtGridFeatureGrouping.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtToolbar.SetFDefaultButtonUI(Value : String); begin + FDefaultButtonUI := Value; + JSCode('defaultButtonUI:' + VarToJSON([Value])); end; -function TExtGridFeatureGrouping.Expand(GroupName : String; Focus : Boolean) : TExtFunction; begin - JSCode(JSName + '.expand(' + VarToJSON([GroupName, Focus]) + ');', 'TExtGridFeatureGrouping'); - Result := Self; +procedure TExtToolbar.SetFEnableOverflow(Value : Boolean); begin + FEnableOverflow := Value; + JSCode('enableOverflow:' + VarToJSON([Value])); end; -function TExtGridFeatureGrouping.ExpandAll : TExtFunction; begin - JSCode(JSName + '.expandAll();', 'TExtGridFeatureGrouping'); - Result := Self; +procedure TExtToolbar.SetFIsToolbar(Value : Boolean); begin + FIsToolbar := Value; + JSCode(JSName + '.isToolbar=' + VarToJSON([Value]) + ';'); end; -function TExtGridFeatureGrouping.GetRecordGroup(RecordJS : TExtDataModel) : TExtFunction; begin - JSCode(JSName + '.getRecordGroup(' + VarToJSON([RecordJS, false]) + ');', 'TExtGridFeatureGrouping'); - Result := Self; +procedure TExtToolbar.SetFLayout(Value : TExtEnumsLayout); begin + FLayout := Value; + JSCode('layout:"' + EnumToJSString(TypeInfo(TExtEnumsLayout), ord(Value)) + '"'); end; -function TExtGridFeatureGrouping.IsExpanded(GroupName : String) : TExtFunction; begin - JSCode(JSName + '.isExpanded(' + VarToJSON([GroupName]) + ');', 'TExtGridFeatureGrouping'); - Result := Self; +procedure TExtToolbar.SetFLayoutObject(Value : TExtObject); begin + FLayoutObject := Value; + Value.DeleteFromGarbage; + JSCode('layout:' + VarToJSON([Value, false])); end; -destructor TExtGridFeatureGrouping.Destroy; begin - try - FGroupHeaderTplList.Free; - FGroupHeaderTplTemplate.Free; - except end; - inherited; +procedure TExtToolbar.SetFMenuTriggerCls(Value : String); begin + FMenuTriggerCls := Value; + JSCode('menuTriggerCls:' + VarToJSON([Value])); end; -function TExtGridFeatureRowBody.JSClassName : string; begin - Result := 'Ext.grid.feature.RowBody'; +procedure TExtToolbar.SetFVertical(Value : Boolean); begin + FVertical := Value; + JSCode('vertical:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtGridFeatureRowBody.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtGridFeatureRowBody.SetupRowData(Data : TExtObject; Idx : Integer; RecordJS : TExtDataModel; Orig : TExtObject) : TExtFunction; begin - JSCode(JSName + '.setupRowData(' + VarToJSON([Data, false, Idx, RecordJS, false, Orig, false]) + ');', 'TExtGridFeatureRowBody'); - Result := Self; +procedure TExtToolbar.SetFOnOverflowchange(Value : TExtToolbarOnOverflowchange); begin + if Assigned(FOnOverflowchange) then + JSCode(JSName+'.events ["overflowchange"].listeners=[];'); + if Assigned(Value) then + AddListener('overflowchange', Ajax('overflowchange', ['LastHiddenCount', '%0','HiddenCount', '%1','The', '%2.nm'], true)); + FOnOverflowchange := Value; end; -procedure TExtDataProxyJsonP.SetFAutoAppendParams(Value : Boolean); begin - FAutoAppendParams := Value; - JSCode('autoAppendParams:' + VarToJSON([Value])); +function TExtToolbar.JSClassName : string; begin + Result := 'Ext.toolbar.Toolbar'; end; -procedure TExtDataProxyJsonP.SetFCallbackKey(Value : String); begin - FCallbackKey := Value; - JSCode('callbackKey:' + VarToJSON([Value])); +procedure TExtToolbar.InitDefaults; begin + inherited; + FLayoutObject := TExtObject.CreateInternal(Self, 'layout'); end; -procedure TExtDataProxyJsonP.SetFRecordParam(Value : String); begin - FRecordParam := Value; - JSCode('recordParam:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtToolbar.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtDataProxyJsonP.JSClassName : string; begin - Result := 'Ext.data.proxy.JsonP'; +constructor TExtToolbar.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtDataProxyJsonP.InitDefaults; begin +destructor TExtToolbar.Destroy; begin + try + FLayoutObject.Free; + except end; inherited; - FAutoAppendParams := true; end; -{$IFDEF FPC}constructor TExtDataProxyJsonP.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDataProxyJsonP.Abort : TExtFunction; begin - JSCode(JSName + '.abort();', 'TExtDataProxyJsonP'); - Result := Self; +procedure TExtToolbar.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'overflowchange') and Assigned(FOnOverflowchange) then + FOnOverflowchange(ParamAsInteger('LastHiddenCount'), ParamAsInteger('HiddenCount'), TExtObjectList(ParamAsObject('The'))); end; -function TExtDataProxyJsonP.BuildUrl(Request : TExtDataRequest) : TExtFunction; begin - JSCode(JSName + '.buildUrl(' + VarToJSON([Request, false]) + ');', 'TExtDataProxyJsonP'); - Result := Self; +procedure TExtChartSeriesColumn.SetFAxis(Value : String); begin + FAxis := Value; + JSCode('axis:' + VarToJSON([Value])); end; -constructor TExtDataProxyJsonP.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtChartSeriesColumn.SetFXPadding(Value : Integer); begin + FXPadding := Value; + JSCode('xPadding:' + VarToJSON([Value])); end; -function TExtDataProxyJsonP.EncodeRecords(Records : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.encodeRecords(' + VarToJSON(Records) + ');', 'TExtDataProxyJsonP'); - Result := Self; +procedure TExtChartSeriesColumn.SetFXPaddingObject(Value : TExtObject); begin + FXPaddingObject := Value; + Value.DeleteFromGarbage; + JSCode('xPadding:' + VarToJSON([Value, false])); end; -procedure TExtGridPluginRowEditing.SetFAutoCancel(Value : Boolean); begin - FAutoCancel := Value; - JSCode('autoCancel:' + VarToJSON([Value])); +procedure TExtChartSeriesColumn.SetFYPadding(Value : Integer); begin + FYPadding := Value; + JSCode('yPadding:' + VarToJSON([Value])); end; -procedure TExtGridPluginRowEditing.SetFClicksToMoveEditor(Value : Integer); begin - FClicksToMoveEditor := Value; - JSCode('clicksToMoveEditor:' + VarToJSON([Value])); +procedure TExtChartSeriesColumn.SetFYPaddingObject(Value : TExtObject); begin + FYPaddingObject := Value; + Value.DeleteFromGarbage; + JSCode('yPadding:' + VarToJSON([Value, false])); end; -procedure TExtGridPluginRowEditing.SetFErrorSummary(Value : Boolean); begin - FErrorSummary := Value; - JSCode('errorSummary:' + VarToJSON([Value])); +function TExtChartSeriesColumn.JSClassName : string; begin + Result := 'Ext.chart.series.Column'; end; -function TExtGridPluginRowEditing.JSClassName : string; begin - Result := 'Ext.grid.plugin.RowEditing'; +procedure TExtChartSeriesColumn.InitDefaults; begin + inherited; + FXPaddingObject := TExtObject.CreateInternal(Self, 'xPadding'); + FYPaddingObject := TExtObject.CreateInternal(Self, 'yPadding'); end; -{$IFDEF FPC}constructor TExtGridPluginRowEditing.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtChartSeriesColumn.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtGridPluginRowEditing.StartEdit(RecordJS : TExtDataModel; ColumnHeader : TExtDataModel) : TExtFunction; begin - JSCode(JSName + '.startEdit(' + VarToJSON([RecordJS, false, ColumnHeader, false]) + ');', 'TExtGridPluginRowEditing'); - Result := Self; +constructor TExtChartSeriesColumn.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtDataWriterXml.SetFDefaultDocumentRoot(Value : String); begin - FDefaultDocumentRoot := Value; - JSCode('defaultDocumentRoot:' + VarToJSON([Value])); +destructor TExtChartSeriesColumn.Destroy; begin + try + FXPaddingObject.Free; + FYPaddingObject.Free; + except end; + inherited; end; -procedure TExtDataWriterXml.SetFDocumentRoot(Value : String); begin - FDocumentRoot := Value; - JSCode('documentRoot:' + VarToJSON([Value])); +procedure TExtButtonCycle.SetFChangeHandler(Value : TExtFunction); begin + FChangeHandler := Value; + JSCode('changeHandler:' + VarToJSON([Value, true])); end; -procedure TExtDataWriterXml.SetFHeader(Value : String); begin - FHeader := Value; - JSCode('header:' + VarToJSON([Value])); +procedure TExtButtonCycle.SetFForceGlyph(Value : Integer); begin + FForceGlyph := Value; + JSCode('forceGlyph:' + VarToJSON([Value])); end; -procedure TExtDataWriterXml.SetFRecordJS(Value : String); begin - FRecordJS := Value; - JSCode('recordJS:' + VarToJSON([Value])); +procedure TExtButtonCycle.SetFForceGlyphString(Value : String); begin + FForceGlyphString := Value; + JSCode('forceGlyph:' + VarToJSON([Value])); end; -function TExtDataWriterXml.JSClassName : string; begin - Result := 'Ext.data.writer.Xml'; +procedure TExtButtonCycle.SetFForceIcon(Value : String); begin + FForceIcon := Value; + JSCode('forceIcon:' + VarToJSON([Value])); end; -procedure TExtDataWriterXml.InitDefaults; begin - inherited; - FDocumentRoot := 'xmlData'; - FRecordJS := 'record'; +procedure TExtButtonCycle.SetFMenu(Value : TExtMenu); begin + FMenu := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.menu=' + VarToJSON([Value, false]) + ';'); end; -{$IFDEF FPC}constructor TExtDataWriterXml.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtDataWriterXml.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtButtonCycle.SetFPrependText(Value : String); begin + FPrependText := Value; + JSCode('prependText:' + VarToJSON([Value])); end; -function TExtDrawCompositeSprite.JSClassName : string; begin - Result := 'Ext.draw.CompositeSprite'; +procedure TExtButtonCycle.SetFShowText(Value : Boolean); begin + FShowText := Value; + JSCode('showText:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtDrawCompositeSprite.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDrawCompositeSprite.AddCls(Cls : String) : TExtFunction; begin - JSCode(JSName + '.addCls(' + VarToJSON([Cls]) + ');', 'TExtDrawCompositeSprite'); - Result := Self; +procedure TExtButtonCycle.SetFOnChange(Value : TExtButtonCycleOnChange); begin + if Assigned(FOnChange) then + JSCode(JSName+'.events ["change"].listeners=[];'); + if Assigned(Value) then + AddListener('change', Ajax('change', ['This', '%0.nm','Item', '%1.nm'], true)); + FOnChange := Value; end; -function TExtDrawCompositeSprite.Animate(Config : TExtObject) : TExtFunction; begin - JSCode(JSName + '.animate(' + VarToJSON([Config, false]) + ');', 'TExtDrawCompositeSprite'); - Result := Self; +function TExtButtonCycle.JSClassName : string; begin + Result := 'Ext.button.Cycle'; end; -function TExtDrawCompositeSprite.GetActiveAnimation : TExtFunction; begin - JSCode(JSName + '.getActiveAnimation();', 'TExtDrawCompositeSprite'); - Result := Self; +procedure TExtButtonCycle.InitDefaults; begin + inherited; + FMenu := TExtMenu.CreateInternal(Self, 'menu'); end; -function TExtDrawCompositeSprite.GetBBox : TExtFunction; begin - JSCode(JSName + '.getBBox();', 'TExtDrawCompositeSprite'); - Result := Self; +{$IFDEF FPC}constructor TExtButtonCycle.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtButtonCycle.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -function TExtDrawCompositeSprite.Hide(Redraw : Boolean) : TExtFunction; begin - JSCode(JSName + '.hide(' + VarToJSON([Redraw]) + ');', 'TExtDrawCompositeSprite'); +function TExtButtonCycle.ToggleSelected : TExtFunction; begin + JSCode(JSName + '.toggleSelected();', 'TExtButtonCycle'); Result := Self; end; -function TExtDrawCompositeSprite.Redraw : TExtFunction; begin - JSCode(JSName + '.redraw();', 'TExtDrawCompositeSprite'); - Result := Self; +destructor TExtButtonCycle.Destroy; begin + try + FMenu.Free; + except end; + inherited; end; -function TExtDrawCompositeSprite.RemoveCls(Cls : String) : TExtFunction; begin - JSCode(JSName + '.removeCls(' + VarToJSON([Cls]) + ');', 'TExtDrawCompositeSprite'); - Result := Self; +procedure TExtButtonCycle.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'change') and Assigned(FOnChange) then + FOnChange(TExtButtonCycle(ParamAsObject('This')), TExtMenuCheckItem(ParamAsObject('Item'))); end; -function TExtDrawCompositeSprite.SequenceFx : TExtFunction; begin - JSCode(JSName + '.sequenceFx();', 'TExtDrawCompositeSprite'); - Result := Self; +function TExtSliderSingle.JSClassName : string; begin + Result := 'Ext.slider.Single'; end; -function TExtDrawCompositeSprite.SetAttributes(Attrs : TExtObject; Redraw : Boolean) : TExtFunction; begin - JSCode(JSName + '.setAttributes(' + VarToJSON([Attrs, false, Redraw]) + ');', 'TExtDrawCompositeSprite'); +{$IFDEF FPC}constructor TExtSliderSingle.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtSliderSingle.GetValue : TExtFunction; begin + JSCode(JSName + '.getValue();', 'TExtSliderSingle'); Result := Self; end; -function TExtDrawCompositeSprite.SetStyle(Style : String) : TExtFunction; begin - JSCode(JSName + '.setStyle(' + VarToJSON([Style]) + ');', 'TExtDrawCompositeSprite'); +function TExtSliderSingle.SetValue(Value : Integer; Animate : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.setValue(' + VarToJSON([Value, Animate]) + ');', 'TExtSliderSingle'); Result := Self; end; -function TExtDrawCompositeSprite.Show(Redraw : Boolean) : TExtFunction; begin - JSCode(JSName + '.show(' + VarToJSON([Redraw]) + ');', 'TExtDrawCompositeSprite'); - Result := Self; +function TExtDdDropZone.JSClassName : string; begin + Result := 'Ext.dd.DropZone'; end; -function TExtDrawCompositeSprite.StopAnimation : TExtFunction; begin - JSCode(JSName + '.stopAnimation();', 'TExtDrawCompositeSprite'); +{$IFDEF FPC}constructor TExtDdDropZone.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDdDropZone.GetTargetFromEvent(E : TEvent) : TExtFunction; begin + JSCode(JSName + '.getTargetFromEvent(' + VarToJSON([E, false]) + ');', 'TExtDdDropZone'); Result := Self; end; -function TExtDrawCompositeSprite.SyncFx : TExtFunction; begin - JSCode(JSName + '.syncFx();', 'TExtDrawCompositeSprite'); +function TExtDdDropZone.OnNodeEnter(NodeData : TExtObject; Source : TExtDdDragSource; E : TEvent; Data : TExtObject) : TExtFunction; begin + JSCode(JSName + '.onNodeEnter(' + VarToJSON([NodeData, false, Source, false, E, false, Data, false]) + ');', 'TExtDdDropZone'); Result := Self; end; -procedure TExtDataProxyDirect.SetFApi(Value : TExtObject); begin - FApi := Value; - Value.DeleteFromGarbage; - JSCode('api:' + VarToJSON([Value, false])); +function TExtSelectionTreeModel.JSClassName : string; begin + Result := 'Ext.selection.TreeModel'; end; -procedure TExtDataProxyDirect.SetFDirectFn(Value : TExtFunction); begin - FDirectFn := Value; - JSCode('directFn:' + VarToJSON([Value, true])); -end; +{$IFDEF FPC}constructor TExtSelectionTreeModel.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtDataProxyDirect.SetFDirectFnString(Value : String); begin - FDirectFnString := Value; - JSCode('directFn:' + VarToJSON([Value])); +procedure TExtChartAxisRadial.SetFMaximum(Value : Integer); begin + FMaximum := Value; + JSCode('maximum:' + VarToJSON([Value])); end; -procedure TExtDataProxyDirect.SetFExtraParams(Value : TExtObject); begin - FExtraParams := Value; - Value.DeleteFromGarbage; - JSCode('extraParams:' + VarToJSON([Value, false])); +procedure TExtChartAxisRadial.SetFSteps(Value : Integer); begin + FSteps := Value; + JSCode('steps:' + VarToJSON([Value])); end; -procedure TExtDataProxyDirect.SetFParamOrder(Value : String); begin - FParamOrder := Value; - JSCode('paramOrder:' + VarToJSON([Value])); +function TExtChartAxisRadial.JSClassName : string; begin + Result := 'Ext.chart.axis.Radial'; end; -procedure TExtDataProxyDirect.SetFParamOrderList(Value : TExtObjectList); begin - FParamOrderList := Value; - Value.DeleteFromGarbage; - JSCode('paramOrder:' + VarToJSON([Value, false])); -end; +{$IFDEF FPC}constructor TExtChartAxisRadial.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtDataProxyDirect.SetFParamsAsHash(Value : Boolean); begin - FParamsAsHash := Value; - JSCode('paramsAsHash:' + VarToJSON([Value])); +function TExtLayoutComponentBoundList.JSClassName : string; begin + Result := 'Ext.layout.component.BoundList'; end; -function TExtDataProxyDirect.JSClassName : string; begin - Result := 'Ext.data.proxy.Direct'; -end; +{$IFDEF FPC}constructor TExtLayoutComponentBoundList.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtDataProxyDirect.InitDefaults; begin - inherited; - FApi := TExtObject.CreateInternal(Self, 'api'); - FExtraParams := TExtObject.CreateInternal(Self, 'extraParams'); - FParamOrderList := TExtObjectList.Create(Self, 'paramOrder'); +function TExtLayoutComponentButton.JSClassName : string; begin + Result := 'Ext.layout.component.Button'; end; -{$IFDEF FPC}constructor TExtDataProxyDirect.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtLayoutComponentButton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtDataProxyDirect.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +function TExtLayoutComponentBody.JSClassName : string; begin + Result := 'Ext.layout.component.Body'; end; -destructor TExtDataProxyDirect.Destroy; begin - try - FApi.Free; - FExtraParams.Free; - FParamOrderList.Free; - except end; - inherited; -end; +{$IFDEF FPC}constructor TExtLayoutComponentBody.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtDataProxyAjax.SetFBinary(Value : Boolean); begin - FBinary := Value; - JSCode('binary:' + VarToJSON([Value])); +procedure TExtEditor.SetFAlignment(Value : String); begin + FAlignment := Value; + JSCode('alignment:' + VarToJSON([Value])); end; -procedure TExtDataProxyAjax.SetFHeaders(Value : TExtObject); begin - FHeaders := Value; - Value.DeleteFromGarbage; - JSCode('headers:' + VarToJSON([Value, false])); +procedure TExtEditor.SetFAllowBlur(Value : Boolean); begin + FAllowBlur := Value; + JSCode('allowBlur:' + VarToJSON([Value])); end; -function TExtDataProxyAjax.JSClassName : string; begin - Result := 'Ext.data.proxy.Ajax'; +procedure TExtEditor.SetFAutoSize(Value : Boolean); begin + FAutoSize := Value; + JSCode('autoSize:' + VarToJSON([Value])); end; -procedure TExtDataProxyAjax.InitDefaults; begin - inherited; - FHeaders := TExtObject.CreateInternal(Self, 'headers'); +procedure TExtEditor.SetFAutoSizeObject(Value : TExtObject); begin + FAutoSizeObject := Value; + Value.DeleteFromGarbage; + JSCode('autoSize:' + VarToJSON([Value, false])); end; -{$IFDEF FPC}constructor TExtDataProxyAjax.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtDataProxyAjax.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtEditor.SetFCancelOnEsc(Value : Boolean); begin + FCancelOnEsc := Value; + JSCode('cancelOnEsc:' + VarToJSON([Value])); end; -function TExtDataProxyAjax.GetMethod(Request : TExtDataRequest) : TExtFunction; begin - JSCode(JSName + '.getMethod(' + VarToJSON([Request, false]) + ');', 'TExtDataProxyAjax'); - Result := Self; +procedure TExtEditor.SetFCompleteOnEnter(Value : Boolean); begin + FCompleteOnEnter := Value; + JSCode('completeOnEnter:' + VarToJSON([Value])); end; -destructor TExtDataProxyAjax.Destroy; begin - try - FHeaders.Free; - except end; - inherited; +procedure TExtEditor.SetFConstrain(Value : Boolean); begin + FConstrain := Value; + JSCode('constrain:' + VarToJSON([Value])); end; -procedure TExtGridPluginCellEditing.SetFOnBeforeedit(Value : TExtGridPluginCellEditingOnBeforeedit); begin - if Assigned(FOnBeforeedit) then - JSCode(JSName+'.events ["beforeedit"].listeners=[];'); - if Assigned(Value) then - AddListener('beforeedit', Ajax('beforeedit', ['Editor', '%0.nm','E', '%1.nm'], true)); - FOnBeforeedit := Value; +procedure TExtEditor.SetFField(Value : TExtFormField); begin + FField := Value; + Value.DeleteFromGarbage; + JSCode('field:' + VarToJSON([Value, false])); end; -procedure TExtGridPluginCellEditing.SetFOnCanceledit(Value : TExtGridPluginCellEditingOnCanceledit); begin - if Assigned(FOnCanceledit) then - JSCode(JSName+'.events ["canceledit"].listeners=[];'); - if Assigned(Value) then - AddListener('canceledit', Ajax('canceledit', ['Editor', '%0.nm','E', '%1.nm'], true)); - FOnCanceledit := Value; +procedure TExtEditor.SetFHideEl(Value : Boolean); begin + FHideEl := Value; + JSCode('hideEl:' + VarToJSON([Value])); end; -procedure TExtGridPluginCellEditing.SetFOnEdit(Value : TExtGridPluginCellEditingOnEdit); begin - if Assigned(FOnEdit) then - JSCode(JSName+'.events ["edit"].listeners=[];'); - if Assigned(Value) then - AddListener('edit', Ajax('edit', ['Editor', '%0.nm','E', '%1.nm'], true)); - FOnEdit := Value; +procedure TExtEditor.SetFIgnoreNoChange(Value : Boolean); begin + FIgnoreNoChange := Value; + JSCode('ignoreNoChange:' + VarToJSON([Value])); end; -procedure TExtGridPluginCellEditing.SetFOnValidateedit(Value : TExtGridPluginCellEditingOnValidateedit); begin - if Assigned(FOnValidateedit) then - JSCode(JSName+'.events ["validateedit"].listeners=[];'); - if Assigned(Value) then - AddListener('validateedit', Ajax('validateedit', ['Editor', '%0.nm','E', '%1.nm'], true)); - FOnValidateedit := Value; +procedure TExtEditor.SetFOffsets(Value : TArrayOfInteger); begin + FOffsets := Value; + JSCode('offsets:' + ArrayToJSON(Value)); end; -function TExtGridPluginCellEditing.JSClassName : string; begin - Result := 'Ext.grid.plugin.CellEditing'; +procedure TExtEditor.SetFParentEl(Value : String); begin + FParentEl := Value; + JSCode('parentEl:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtGridPluginCellEditing.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtEditor.SetFParentElElement(Value : TExtElement); begin + FParentElElement := Value; + Value.DeleteFromGarbage; + JSCode('parentEl:' + VarToJSON([Value, false])); +end; -function TExtGridPluginCellEditing.CancelEdit : TExtFunction; begin - JSCode(JSName + '.cancelEdit();', 'TExtGridPluginCellEditing'); - Result := Self; +procedure TExtEditor.SetFParentElTHTMLElement(Value : THTMLElement); begin + FParentElTHTMLElement := Value; + Value.DeleteFromGarbage; + JSCode('parentEl:' + VarToJSON([Value, false])); end; -function TExtGridPluginCellEditing.StartEdit(RecordJS : Integer; ColumnHeader : Integer) : TExtFunction; begin - JSCode(JSName + '.startEdit(' + VarToJSON([RecordJS, ColumnHeader]) + ');', 'TExtGridPluginCellEditing'); - Result := Self; +procedure TExtEditor.SetFRevertInvalid(Value : Boolean); begin + FRevertInvalid := Value; + JSCode('revertInvalid:' + VarToJSON([Value])); end; -function TExtGridPluginCellEditing.StartEditByPosition(Position : TExtObject) : TExtFunction; begin - JSCode(JSName + '.startEditByPosition(' + VarToJSON([Position, false]) + ');', 'TExtGridPluginCellEditing'); - Result := Self; +procedure TExtEditor.SetFShadow(Value : Boolean); begin + FShadow := Value; + JSCode('shadow:' + VarToJSON([Value])); end; -procedure TExtGridPluginCellEditing.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'beforeedit') and Assigned(FOnBeforeedit) then - FOnBeforeedit(TExtGridPluginCellEditing(ParamAsObject('Editor')), TExtObject(ParamAsObject('E'))) - else if (AEvtName = 'canceledit') and Assigned(FOnCanceledit) then - FOnCanceledit(TExtGridPluginCellEditing(ParamAsObject('Editor')), TExtObject(ParamAsObject('E'))) - else if (AEvtName = 'edit') and Assigned(FOnEdit) then - FOnEdit(TExtGridPluginCellEditing(ParamAsObject('Editor')), TExtObject(ParamAsObject('E'))) - else if (AEvtName = 'validateedit') and Assigned(FOnValidateedit) then - FOnValidateedit(TExtGridPluginCellEditing(ParamAsObject('Editor')), TExtObject(ParamAsObject('E'))); +procedure TExtEditor.SetFShadowString(Value : String); begin + FShadowString := Value; + JSCode('shadow:' + VarToJSON([Value])); end; -procedure TExtChartAxisRadial.SetFMaximum(Value : Integer); begin - FMaximum := Value; - JSCode('maximum:' + VarToJSON([Value])); +procedure TExtEditor.SetFSwallowKeys(Value : Boolean); begin + FSwallowKeys := Value; + JSCode('swallowKeys:' + VarToJSON([Value])); end; -procedure TExtChartAxisRadial.SetFSteps(Value : Integer); begin - FSteps := Value; - JSCode('steps:' + VarToJSON([Value])); +procedure TExtEditor.SetFUpdateEl(Value : Boolean); begin + FUpdateEl := Value; + JSCode('updateEl:' + VarToJSON([Value])); end; -function TExtChartAxisRadial.JSClassName : string; begin - Result := 'Ext.chart.axis.Radial'; +procedure TExtEditor.SetFValue(Value : TExtObject); begin + FValue := Value; + Value.DeleteFromGarbage; + if not ConfigAvailable(JSName) then + SetValue(Value) + else + JSCode('value:' + VarToJSON([Value, false])); end; -{$IFDEF FPC}constructor TExtChartAxisRadial.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtEditor.SetFOnBeforecomplete(Value : TExtEditorOnBeforecomplete); begin + if Assigned(FOnBeforecomplete) then + JSCode(JSName+'.events ["beforecomplete"].listeners=[];'); + if Assigned(Value) then + AddListener('beforecomplete', Ajax('beforecomplete', ['This', '%0.nm','Value', '%1.nm','StartValue', '%2.nm'], true)); + FOnBeforecomplete := Value; +end; -procedure TExtSelectionCheckboxModel.SetFCheckOnly(Value : Boolean); begin - FCheckOnly := Value; - JSCode('checkOnly:' + VarToJSON([Value])); +procedure TExtEditor.SetFOnBeforestartedit(Value : TExtEditorOnBeforestartedit); begin + if Assigned(FOnBeforestartedit) then + JSCode(JSName+'.events ["beforestartedit"].listeners=[];'); + if Assigned(Value) then + AddListener('beforestartedit', Ajax('beforestartedit', ['This', '%0.nm','BoundEl', '%1.nm','Value', '%2.nm'], true)); + FOnBeforestartedit := Value; end; -procedure TExtSelectionCheckboxModel.SetFCheckSelector(Value : String); begin - FCheckSelector := Value; - JSCode('checkSelector:' + VarToJSON([Value])); +procedure TExtEditor.SetFOnCanceledit(Value : TExtEditorOnCanceledit); begin + if Assigned(FOnCanceledit) then + JSCode(JSName+'.events ["canceledit"].listeners=[];'); + if Assigned(Value) then + AddListener('canceledit', Ajax('canceledit', ['This', '%0.nm','Value', '%1.nm','StartValue', '%2.nm'], true)); + FOnCanceledit := Value; end; -procedure TExtSelectionCheckboxModel.SetFInjectCheckbox(Value : Integer); begin - FInjectCheckbox := Value; - JSCode('injectCheckbox:' + VarToJSON([Value])); +procedure TExtEditor.SetFOnComplete(Value : TExtEditorOnComplete); begin + if Assigned(FOnComplete) then + JSCode(JSName+'.events ["complete"].listeners=[];'); + if Assigned(Value) then + AddListener('complete', Ajax('complete', ['This', '%0.nm','Value', '%1.nm','StartValue', '%2.nm'], true)); + FOnComplete := Value; end; -procedure TExtSelectionCheckboxModel.SetFInjectCheckboxString(Value : String); begin - FInjectCheckboxString := Value; - JSCode('injectCheckbox:' + VarToJSON([Value])); +procedure TExtEditor.SetFOnSpecialkey(Value : TExtEditorOnSpecialkey); begin + if Assigned(FOnSpecialkey) then + JSCode(JSName+'.events ["specialkey"].listeners=[];'); + if Assigned(Value) then + AddListener('specialkey', Ajax('specialkey', ['This', '%0.nm','Field', '%1.nm','Event', '%2.nm'], true)); + FOnSpecialkey := Value; end; -procedure TExtSelectionCheckboxModel.SetFMode(Value : TModeEnum); begin - FMode := Value; - JSCode('mode:"' + EnumToJSString(TypeInfo(TModeEnum), ord(Value)) + '"'); +procedure TExtEditor.SetFOnStartedit(Value : TExtEditorOnStartedit); begin + if Assigned(FOnStartedit) then + JSCode(JSName+'.events ["startedit"].listeners=[];'); + if Assigned(Value) then + AddListener('startedit', Ajax('startedit', ['This', '%0.nm','BoundEl', '%1.nm','Value', '%2.nm'], true)); + FOnStartedit := Value; end; -procedure TExtSelectionCheckboxModel.SetFShowHeaderCheckbox(Value : Boolean); begin - FShowHeaderCheckbox := Value; - JSCode('showHeaderCheckbox:' + VarToJSON([Value])); +function TExtEditor.JSClassName : string; begin + Result := 'Ext.Editor'; end; -function TExtSelectionCheckboxModel.JSClassName : string; begin - Result := 'Ext.selection.CheckboxModel'; +procedure TExtEditor.InitDefaults; begin + inherited; + FAutoSizeObject := TExtObject.CreateInternal(Self, 'autoSize'); + FField := TExtFormField.CreateInternal(Self, 'field'); + FParentElElement := TExtElement.CreateInternal(Self, 'parentEl'); + FValue := TExtObject.CreateInternal(Self, 'value'); end; -{$IFDEF FPC}constructor TExtSelectionCheckboxModel.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtEditor.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtSelectionCheckboxModel.GetHeaderConfig : TExtFunction; begin - JSCode(JSName + '.getHeaderConfig();', 'TExtSelectionCheckboxModel'); +function TExtEditor.CancelEdit(RemainVisible : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.cancelEdit(' + VarToJSON([RemainVisible]) + ');', 'TExtEditor'); Result := Self; end; -function TExtSelectionCheckboxModel.OnHeaderClick : TExtFunction; begin - JSCode(JSName + '.onHeaderClick();', 'TExtSelectionCheckboxModel'); +function TExtEditor.CompleteEdit(RemainVisible : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.completeEdit(' + VarToJSON([RemainVisible]) + ');', 'TExtEditor'); Result := Self; end; -function TExtSelectionCheckboxModel.Renderer : TExtFunction; begin - JSCode(JSName + '.renderer();', 'TExtSelectionCheckboxModel'); - Result := Self; +constructor TExtEditor.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -function TExtChartLegendItem.JSClassName : string; begin - Result := 'Ext.chart.LegendItem'; +function TExtEditor.GetValue : TExtFunction; begin + JSCode(JSName + '.getValue();', 'TExtEditor'); + Result := Self; end; -{$IFDEF FPC}constructor TExtChartLegendItem.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtChartLegendItem.CreateLegend : TExtFunction; begin - JSCode(JSName + '.createLegend();', 'TExtChartLegendItem'); +function TExtEditor.Realign(AutoSize : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.realign(' + VarToJSON([AutoSize]) + ');', 'TExtEditor'); Result := Self; end; -function TExtChartLegendItem.UpdatePosition(RelativeTo : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.updatePosition(' + VarToJSON([RelativeTo, false]) + ');', 'TExtChartLegendItem'); +function TExtEditor.SetValue(Value : TExtObject) : TExtFunction; begin + JSCode(JSName + '.setValue(' + VarToJSON([Value, false]) + ');', 'TExtEditor'); Result := Self; end; -procedure TExtChartAxisTime.SetFConstrain(Value : Boolean); begin - FConstrain := Value; - JSCode('constrain:' + VarToJSON([Value])); +function TExtEditor.StartEdit(El : String; Value : String = '') : TExtFunction; begin + JSCode(JSName + '.startEdit(' + VarToJSON([El, Value]) + ');', 'TExtEditor'); + Result := Self; end; -procedure TExtChartAxisTime.SetFDateFormat(Value : String); begin - FDateFormat := Value; - JSCode('dateFormat:' + VarToJSON([Value])); +destructor TExtEditor.Destroy; begin + try + FAutoSizeObject.Free; + FField.Free; + FParentElElement.Free; + FValue.Free; + except end; + inherited; end; -procedure TExtChartAxisTime.SetFDateFormatBoolean(Value : Boolean); begin - FDateFormatBoolean := Value; - JSCode('dateFormat:' + VarToJSON([Value])); +procedure TExtEditor.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'beforecomplete') and Assigned(FOnBeforecomplete) then + FOnBeforecomplete(TExtEditor(ParamAsObject('This')), TExtObject(ParamAsObject('Value')), TExtObject(ParamAsObject('StartValue'))) + else if (AEvtName = 'beforestartedit') and Assigned(FOnBeforestartedit) then + FOnBeforestartedit(TExtEditor(ParamAsObject('This')), TExtElement(ParamAsObject('BoundEl')), TExtObject(ParamAsObject('Value'))) + else if (AEvtName = 'canceledit') and Assigned(FOnCanceledit) then + FOnCanceledit(TExtEditor(ParamAsObject('This')), TExtObject(ParamAsObject('Value')), TExtObject(ParamAsObject('StartValue'))) + else if (AEvtName = 'complete') and Assigned(FOnComplete) then + FOnComplete(TExtEditor(ParamAsObject('This')), TExtObject(ParamAsObject('Value')), TExtObject(ParamAsObject('StartValue'))) + else if (AEvtName = 'specialkey') and Assigned(FOnSpecialkey) then + FOnSpecialkey(TExtEditor(ParamAsObject('This')), TExtFormField(ParamAsObject('Field')), TExtEventObject(ParamAsObject('Event'))) + else if (AEvtName = 'startedit') and Assigned(FOnStartedit) then + FOnStartedit(TExtEditor(ParamAsObject('This')), TExtElement(ParamAsObject('BoundEl')), TExtObject(ParamAsObject('Value'))); end; -procedure TExtChartAxisTime.SetFFromDate(Value : TDateTime); begin - FFromDate := Value; - JSCode('fromDate:' + VarToJSON([Value])); +procedure TExtDataNodeStore.SetFIsNodeStore(Value : Boolean); begin + FIsNodeStore := Value; + JSCode(JSName + '.isNodeStore=' + VarToJSON([Value]) + ';'); end; -procedure TExtChartAxisTime.SetFStep(Value : TExtObjectList); begin - FStep := Value; +procedure TExtDataNodeStore.SetFNode(Value : TExtDataModel); begin + FNode := Value; Value.DeleteFromGarbage; - JSCode('step:' + VarToJSON([Value, false])); + JSCode('node:' + VarToJSON([Value, false])); end; -procedure TExtChartAxisTime.SetFToDate(Value : TDateTime); begin - FToDate := Value; - JSCode('toDate:' + VarToJSON([Value])); +procedure TExtDataNodeStore.SetFRecursive(Value : Boolean); begin + FRecursive := Value; + JSCode('recursive:' + VarToJSON([Value])); end; -function TExtChartAxisTime.JSClassName : string; begin - Result := 'Ext.chart.axis.Time'; +procedure TExtDataNodeStore.SetFRootVisible(Value : Boolean); begin + FRootVisible := Value; + JSCode('rootVisible:' + VarToJSON([Value])); end; -procedure TExtChartAxisTime.InitDefaults; begin +procedure TExtDataNodeStore.SetFTreeStore(Value : TExtDataTreeStore); begin + FTreeStore := Value; + Value.DeleteFromGarbage; + JSCode('treeStore:' + VarToJSON([Value, false])); +end; + +function TExtDataNodeStore.JSClassName : string; begin + Result := 'Ext.data.NodeStore'; +end; + +procedure TExtDataNodeStore.InitDefaults; begin inherited; - FStep := TExtObjectList.Create(Self, 'step'); + FNode := TExtDataModel.CreateInternal(Self, 'node'); + FTreeStore := TExtDataTreeStore.CreateInternal(Self, 'treeStore'); end; -{$IFDEF FPC}constructor TExtChartAxisTime.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtDataNodeStore.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtChartAxisTime.Create; begin +constructor TExtDataNodeStore.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -destructor TExtChartAxisTime.Destroy; begin +destructor TExtDataNodeStore.Destroy; begin try - FStep.Free; + FNode.Free; + FTreeStore.Free; except end; inherited; end; -function TExtSelectionTreeModel.JSClassName : string; begin - Result := 'Ext.selection.TreeModel'; +function TExtLayoutComponentDraw.JSClassName : string; begin + Result := 'Ext.layout.component.Draw'; end; -{$IFDEF FPC}constructor TExtSelectionTreeModel.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtLayoutComponentDraw.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtButtonCycle.SetFChangeHandler(Value : TExtFunction); begin - FChangeHandler := Value; - JSCode('changeHandler:' + VarToJSON([Value, true])); +function TExtViewTableLayout.JSClassName : string; begin + Result := 'Ext.view.TableLayout'; end; -procedure TExtButtonCycle.SetFForceGlyph(Value : Integer); begin - FForceGlyph := Value; - JSCode('forceGlyph:' + VarToJSON([Value])); +{$IFDEF FPC}constructor TExtViewTableLayout.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +procedure TExtFormFieldTrigger.SetFEditable(Value : Boolean); begin + FEditable := Value; + JSCode('editable:' + VarToJSON([Value])); end; -procedure TExtButtonCycle.SetFForceGlyphString(Value : String); begin - FForceGlyphString := Value; - JSCode('forceGlyph:' + VarToJSON([Value])); +procedure TExtFormFieldTrigger.SetFGrow(Value : Boolean); begin + FGrow := Value; + JSCode('grow:' + VarToJSON([Value])); end; -procedure TExtButtonCycle.SetFForceIcon(Value : String); begin - FForceIcon := Value; - JSCode('forceIcon:' + VarToJSON([Value])); +procedure TExtFormFieldTrigger.SetFHideTrigger(Value : Boolean); begin + FHideTrigger := Value; + JSCode('hideTrigger:' + VarToJSON([Value])); end; -procedure TExtButtonCycle.SetFMenu(Value : TExtMenu); begin - FMenu := Value; +procedure TExtFormFieldTrigger.SetFInputCell(Value : TExtElement); begin + FInputCell := Value; Value.DeleteFromGarbage; - JSCode(JSName + '.menu=' + VarToJSON([Value, false]) + ';'); + JSCode(JSName + '.inputCell=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtButtonCycle.SetFPrependText(Value : String); begin - FPrependText := Value; - JSCode('prependText:' + VarToJSON([Value])); +procedure TExtFormFieldTrigger.SetFReadOnly(Value : Boolean); begin + FReadOnly := Value; + JSCode('readOnly:' + VarToJSON([Value])); end; -procedure TExtButtonCycle.SetFShowText(Value : Boolean); begin - FShowText := Value; - JSCode('showText:' + VarToJSON([Value])); +procedure TExtFormFieldTrigger.SetFRepeatTriggerClick(Value : Boolean); begin + FRepeatTriggerClick := Value; + JSCode('repeatTriggerClick:' + VarToJSON([Value])); end; -procedure TExtButtonCycle.SetFOnChange(Value : TExtButtonCycleOnChange); begin - if Assigned(FOnChange) then - JSCode(JSName+'.events ["change"].listeners=[];'); - if Assigned(Value) then - AddListener('change', Ajax('change', ['This', '%0.nm','Item', '%1.nm'], true)); - FOnChange := Value; +procedure TExtFormFieldTrigger.SetFSelectOnFocus(Value : Boolean); begin + FSelectOnFocus := Value; + JSCode('selectOnFocus:' + VarToJSON([Value])); end; -function TExtButtonCycle.JSClassName : string; begin - Result := 'Ext.button.Cycle'; +procedure TExtFormFieldTrigger.SetFTriggerCls(Value : String); begin + FTriggerCls := Value; + JSCode('triggerCls:' + VarToJSON([Value])); end; -procedure TExtButtonCycle.InitDefaults; begin +procedure TExtFormFieldTrigger.SetFTriggerEl(Value : TExtCompositeElement); begin + FTriggerEl := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.triggerEl=' + VarToJSON([Value, false]) + ';'); +end; + +procedure TExtFormFieldTrigger.SetFTriggerWrap(Value : TExtElement); begin + FTriggerWrap := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.triggerWrap=' + VarToJSON([Value, false]) + ';'); +end; + +function TExtFormFieldTrigger.JSClassName : string; begin + Result := 'Ext.form.field.Trigger'; +end; + +procedure TExtFormFieldTrigger.InitDefaults; begin inherited; - FMenu := TExtMenu.CreateInternal(Self, 'menu'); + FInputCell := TExtElement.CreateInternal(Self, 'inputCell'); + FTriggerEl := TExtCompositeElement.CreateInternal(Self, 'triggerEl'); + FTriggerWrap := TExtElement.CreateInternal(Self, 'triggerWrap'); end; -{$IFDEF FPC}constructor TExtButtonCycle.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtFormFieldTrigger.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtButtonCycle.Create; begin +constructor TExtFormFieldTrigger.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -function TExtButtonCycle.ToggleSelected : TExtFunction; begin - JSCode(JSName + '.toggleSelected();', 'TExtButtonCycle'); - Result := Self; -end; - -destructor TExtButtonCycle.Destroy; begin +destructor TExtFormFieldTrigger.Destroy; begin try - FMenu.Free; + FInputCell.Free; + FTriggerEl.Free; + FTriggerWrap.Free; except end; inherited; end; -procedure TExtButtonCycle.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'change') and Assigned(FOnChange) then - FOnChange(TExtButtonCycle(ParamAsObject('This')), TExtMenuCheckItem(ParamAsObject('Item'))); +function TExtDataJsonStore.JSClassName : string; begin + Result := 'Ext.data.JsonStore'; end; -procedure TExtToolbar.SetFDefaultButtonUI(Value : String); begin - FDefaultButtonUI := Value; - JSCode('defaultButtonUI:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtDataJsonStore.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtToolbar.SetFEnableOverflow(Value : Boolean); begin - FEnableOverflow := Value; - JSCode('enableOverflow:' + VarToJSON([Value])); +function TExtLayoutComponentField.JSClassName : string; begin + Result := 'Ext.layout.component.field.Field'; end; -procedure TExtToolbar.SetFLayout(Value : TExtEnumsLayout); begin - FLayout := Value; - JSCode('layout:"' + EnumToJSString(TypeInfo(TExtEnumsLayout), ord(Value)) + '"'); +{$IFDEF FPC}constructor TExtLayoutComponentField.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtLayoutComponentField.DestroyTip : TExtFunction; begin + JSCode(JSName + '.destroyTip();', 'TExtLayoutComponentField'); + Result := Self; end; -procedure TExtToolbar.SetFLayoutObject(Value : TExtObject); begin - FLayoutObject := Value; - Value.DeleteFromGarbage; - JSCode('layout:' + VarToJSON([Value, false])); +function TExtLayoutComponentField.ElementIdApplyIf : TExtFunction; begin + JSCode(JSName + '.elementId: applyIf({ prepare();', 'TExtLayoutComponentField'); + Result := Self; end; -procedure TExtToolbar.SetFMenuTriggerCls(Value : String); begin - FMenuTriggerCls := Value; - JSCode('menuTriggerCls:' + VarToJSON([Value])); +function TExtLayoutComponentField.GetErrorStrategy : TExtFunction; begin + JSCode(JSName + '.getErrorStrategy();', 'TExtLayoutComponentField'); + Result := Self; end; -procedure TExtToolbar.SetFVertical(Value : Boolean); begin - FVertical := Value; - JSCode('vertical:' + VarToJSON([Value])); +function TExtLayoutComponentField.GetLabelStrategy : TExtFunction; begin + JSCode(JSName + '.getLabelStrategy();', 'TExtLayoutComponentField'); + Result := Self; end; -procedure TExtToolbar.SetFOnOverflowchange(Value : TExtToolbarOnOverflowchange); begin - if Assigned(FOnOverflowchange) then - JSCode(JSName+'.events ["overflowchange"].listeners=[];'); - if Assigned(Value) then - AddListener('overflowchange', Ajax('overflowchange', ['LastHiddenCount', '%0','HiddenCount', '%1','The', '%2.nm'], true)); - FOnOverflowchange := Value; +function TExtLayoutComponentField.InitTip : TExtFunction; begin + JSCode(JSName + '.initTip();', 'TExtLayoutComponentField'); + Result := Self; end; -function TExtToolbar.JSClassName : string; begin - Result := 'Ext.toolbar.Toolbar'; +function TExtLayoutComponentField.QtipApplyIf : TExtFunction; begin + JSCode(JSName + '.qtip: applyIf({ prepare();', 'TExtLayoutComponentField'); + Result := Self; end; -procedure TExtToolbar.InitDefaults; begin - inherited; - FLayoutObject := TExtObject.CreateInternal(Self, 'layout'); +function TExtLayoutComponentField.SideApplyIf : TExtFunction; begin + JSCode(JSName + '.side: applyIf({ prepare();', 'TExtLayoutComponentField'); + Result := Self; end; -{$IFDEF FPC}constructor TExtToolbar.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtLayoutComponentField.TitleApplyIf : TExtFunction; begin + JSCode(JSName + '.title: applyIf({ prepare();', 'TExtLayoutComponentField'); + Result := Self; +end; -constructor TExtToolbar.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +function TExtLayoutComponentField.TopExtApplyIf : TExtFunction; begin + JSCode(JSName + '.top: Ext.applyIf({ getHeight();', 'TExtLayoutComponentField'); + Result := Self; end; -destructor TExtToolbar.Destroy; begin - try - FLayoutObject.Free; - except end; - inherited; +function TExtLayoutComponentField.UnderApplyIf : TExtFunction; begin + JSCode(JSName + '.under: applyIf({ prepare();', 'TExtLayoutComponentField'); + Result := Self; end; -procedure TExtToolbar.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'overflowchange') and Assigned(FOnOverflowchange) then - FOnOverflowchange(ParamAsInteger('LastHiddenCount'), ParamAsInteger('HiddenCount'), TExtObjectList(ParamAsObject('The'))); +procedure TExtViewTable.SetFBody(Value : TExtDomAbstractElementFly); begin + FBody := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.body=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtChartSeriesColumn.SetFAxis(Value : String); begin - FAxis := Value; - JSCode('axis:' + VarToJSON([Value])); +procedure TExtViewTable.SetFEnableTextSelection(Value : Boolean); begin + FEnableTextSelection := Value; + JSCode('enableTextSelection:' + VarToJSON([Value])); end; -procedure TExtChartSeriesColumn.SetFXPadding(Value : Integer); begin - FXPadding := Value; - JSCode('xPadding:' + VarToJSON([Value])); +procedure TExtViewTable.SetFFirstCls(Value : String); begin + FFirstCls := Value; + JSCode('firstCls:' + VarToJSON([Value])); end; -procedure TExtChartSeriesColumn.SetFXPaddingObject(Value : TExtObject); begin - FXPaddingObject := Value; - Value.DeleteFromGarbage; - JSCode('xPadding:' + VarToJSON([Value, false])); +procedure TExtViewTable.SetFLastCls(Value : String); begin + FLastCls := Value; + JSCode('lastCls:' + VarToJSON([Value])); end; -procedure TExtChartSeriesColumn.SetFYPadding(Value : Integer); begin - FYPadding := Value; - JSCode('yPadding:' + VarToJSON([Value])); +procedure TExtViewTable.SetFMarkDirty(Value : Boolean); begin + FMarkDirty := Value; + JSCode('markDirty:' + VarToJSON([Value])); end; -procedure TExtChartSeriesColumn.SetFYPaddingObject(Value : TExtObject); begin - FYPaddingObject := Value; - Value.DeleteFromGarbage; - JSCode('yPadding:' + VarToJSON([Value, false])); +procedure TExtViewTable.SetFStripeRows(Value : Boolean); begin + FStripeRows := Value; + JSCode('stripeRows:' + VarToJSON([Value])); end; -function TExtChartSeriesColumn.JSClassName : string; begin - Result := 'Ext.chart.series.Column'; +function TExtViewTable.JSClassName : string; begin + Result := 'Ext.view.Table'; end; -procedure TExtChartSeriesColumn.InitDefaults; begin +procedure TExtViewTable.InitDefaults; begin inherited; - FXPaddingObject := TExtObject.CreateInternal(Self, 'xPadding'); - FYPaddingObject := TExtObject.CreateInternal(Self, 'yPadding'); + FBody := TExtDomAbstractElementFly.CreateInternal(Self, 'body'); end; -{$IFDEF FPC}constructor TExtChartSeriesColumn.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtViewTable.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtChartSeriesColumn.Create; begin +function TExtViewTable.AddRowCls(RowInfo : Integer; Cls : String) : TExtFunction; begin + JSCode(JSName + '.addRowCls(' + VarToJSON([RowInfo, Cls]) + ');', 'TExtViewTable'); + Result := Self; +end; + +function TExtViewTable.AutoSizeColumn(Header : Integer) : TExtFunction; begin + JSCode(JSName + '.autoSizeColumn(' + VarToJSON([Header]) + ');', 'TExtViewTable'); + Result := Self; +end; + +constructor TExtViewTable.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -destructor TExtChartSeriesColumn.Destroy; begin - try - FXPaddingObject.Free; - FYPaddingObject.Free; - except end; - inherited; +function TExtViewTable.FocusRow(RowIdx : Integer) : TExtFunction; begin + JSCode(JSName + '.focusRow(' + VarToJSON([RowIdx]) + ');', 'TExtViewTable'); + Result := Self; end; -function TExtSliderSingle.JSClassName : string; begin - Result := 'Ext.slider.Single'; +function TExtViewTable.GetBodySelector : TExtFunction; begin + JSCode(JSName + '.getBodySelector();', 'TExtViewTable'); + Result := Self; end; -{$IFDEF FPC}constructor TExtSliderSingle.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtViewTable.GetCellSelector(Header : TExtGridColumn = nil) : TExtFunction; begin + JSCode(JSName + '.getCellSelector(' + VarToJSON([Header, false]) + ');', 'TExtViewTable'); + Result := Self; +end; -function TExtSliderSingle.GetValue : TExtFunction; begin - JSCode(JSName + '.getValue();', 'TExtSliderSingle'); +function TExtViewTable.GetColumnSizerSelector : TExtFunction; begin + JSCode(JSName + '.getColumnSizerSelector();', 'TExtViewTable'); Result := Self; end; -function TExtSliderSingle.SetValue(Value : Integer; Animate : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.setValue(' + VarToJSON([Value, Animate]) + ');', 'TExtSliderSingle'); +function TExtViewTable.GetDataRowSelector : TExtFunction; begin + JSCode(JSName + '.getDataRowSelector();', 'TExtViewTable'); Result := Self; end; -procedure TExtFormFieldRadio.SetFFocusCls(Value : String); begin - FFocusCls := Value; - JSCode('focusCls:' + VarToJSON([Value])); +function TExtViewTable.GetFeature(Id : String) : TExtFunction; begin + JSCode(JSName + '.getFeature(' + VarToJSON([Id]) + ');', 'TExtViewTable'); + Result := Self; end; -function TExtFormFieldRadio.JSClassName : string; begin - Result := 'Ext.form.field.Radio'; +function TExtViewTable.GetItemSelector : TExtFunction; begin + JSCode(JSName + '.getItemSelector();', 'TExtViewTable'); + Result := Self; +end; + +function TExtViewTable.GetNode(NodeInfo : Integer; DataRow : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.getNode(' + VarToJSON([NodeInfo, DataRow]) + ');', 'TExtViewTable'); + Result := Self; end; -{$IFDEF FPC}constructor TExtFormFieldRadio.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtFormFieldRadio.GetGroupValue : TExtFunction; begin - JSCode(JSName + '.getGroupValue();', 'TExtFormFieldRadio'); +function TExtViewTable.GetNodeContainerSelector : TExtFunction; begin + JSCode(JSName + '.getNodeContainerSelector();', 'TExtViewTable'); Result := Self; end; -function TExtFormFieldRadio.GetSubmitValue : TExtFunction; begin - JSCode(JSName + '.getSubmitValue();', 'TExtFormFieldRadio'); +function TExtViewTable.Refresh : TExtFunction; begin + JSCode(JSName + '.refresh();', 'TExtViewTable'); Result := Self; end; -function TExtFormFieldRadio.SetValue(Value : Boolean) : TExtFunction; begin - JSCode(JSName + '.setValue(' + VarToJSON([Value]) + ');', 'TExtFormFieldRadio'); +function TExtViewTable.RemoveRowCls(RowInfo : Integer; Cls : String) : TExtFunction; begin + JSCode(JSName + '.removeRowCls(' + VarToJSON([RowInfo, Cls]) + ');', 'TExtViewTable'); Result := Self; end; -function TExtGridPropertyStore.JSClassName : string; begin - Result := 'Ext.grid.property.Store'; +function TExtViewTable.WalkRecs(StartRec : TExtDataModel; Distance : Integer) : TExtFunction; begin + JSCode(JSName + '.walkRecs(' + VarToJSON([StartRec, false, Distance]) + ');', 'TExtViewTable'); + Result := Self; end; -{$IFDEF FPC}constructor TExtGridPropertyStore.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtViewTable.WalkRows(StartRow : Integer; Distance : Integer) : TExtFunction; begin + JSCode(JSName + '.walkRows(' + VarToJSON([StartRow, Distance]) + ');', 'TExtViewTable'); + Result := Self; +end; -constructor TExtGridPropertyStore.Create(Grid : TExtGridPanel; Source : TExtObject); begin - CreateVar(JSClassName + '(' + VarToJSON([Grid, false, Source, false]) + ');'); - InitDefaults; +destructor TExtViewTable.Destroy; begin + try + FBody.Free; + except end; + inherited; end; function TExtGridRowEditorButtons.JSClassName : string; begin @@ -38933,6 +40521,17 @@ function TExtGridRowEditorButtons.JSClassName : string; begin {$IFDEF FPC}constructor TExtGridRowEditorButtons.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtGridFeatureSummary.SetFDock(Value : String); begin + FDock := Value; + JSCode('dock:' + VarToJSON([Value])); +end; + +function TExtGridFeatureSummary.JSClassName : string; begin + Result := 'Ext.grid.feature.Summary'; +end; + +{$IFDEF FPC}constructor TExtGridFeatureSummary.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + procedure TExtGridHeaderContainer.SetFDefaultWidth(Value : Integer); begin FDefaultWidth := Value; JSCode('defaultWidth:' + VarToJSON([Value])); @@ -38943,6 +40542,11 @@ procedure TExtGridHeaderContainer.SetFEnableColumnHide(Value : Boolean); begin JSCode('enableColumnHide:' + VarToJSON([Value])); end; +procedure TExtGridHeaderContainer.SetFIsGroupHeader(Value : Boolean); begin + FIsGroupHeader := Value; + JSCode(JSName + '.isGroupHeader=' + VarToJSON([Value]) + ';'); +end; + procedure TExtGridHeaderContainer.SetFSealed(Value : Boolean); begin FSealed := Value; JSCode('sealed:' + VarToJSON([Value])); @@ -39113,675 +40717,1040 @@ procedure TExtGridHeaderContainer.HandleEvent(const AEvtName : string); begin FOnSortchange(TExtGridHeaderContainer(ParamAsObject('Ct')), TExtGridColumn(ParamAsObject('Column')), ParamAsString('Direction')); end; -procedure TExtFormFieldSet.SetFBaseCls(Value : String); begin - FBaseCls := Value; - JSCode('baseCls:' + VarToJSON([Value])); +function TExtGridFeatureGroupingSummary.JSClassName : string; begin + Result := 'Ext.grid.feature.GroupingSummary'; end; -procedure TExtFormFieldSet.SetFCheckboxCmp(Value : TExtFormFieldCheckbox); begin - FCheckboxCmp := Value; +{$IFDEF FPC}constructor TExtGridFeatureGroupingSummary.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtGridColumnComponentLayout.JSClassName : string; begin + Result := 'Ext.grid.ColumnComponentLayout'; +end; + +{$IFDEF FPC}constructor TExtGridColumnComponentLayout.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +procedure TExtViewBoundList.SetFDisplayField(Value : String); begin + FDisplayField := Value; + JSCode('displayField:' + VarToJSON([Value])); +end; + +procedure TExtViewBoundList.SetFPageSize(Value : Integer); begin + FPageSize := Value; + JSCode('pageSize:' + VarToJSON([Value])); +end; + +procedure TExtViewBoundList.SetFPagingToolbar(Value : TExtToolbarPaging); begin + FPagingToolbar := Value; Value.DeleteFromGarbage; - JSCode(JSName + '.checkboxCmp=' + VarToJSON([Value, false]) + ';'); + JSCode(JSName + '.pagingToolbar=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtFormFieldSet.SetFCheckboxName(Value : String); begin - FCheckboxName := Value; - JSCode('checkboxName:' + VarToJSON([Value])); +procedure TExtViewBoundList.SetFTpl(Value : String); begin + FTpl := Value; + JSCode('tpl:' + VarToJSON([Value])); end; -procedure TExtFormFieldSet.SetFCheckboxToggle(Value : Boolean); begin - FCheckboxToggle := Value; - JSCode('checkboxToggle:' + VarToJSON([Value])); +procedure TExtViewBoundList.SetFTplTemplate(Value : TExtXTemplate); begin + FTplTemplate := Value; + Value.DeleteFromGarbage; + JSCode('tpl:' + VarToJSON([Value, false])); end; -procedure TExtFormFieldSet.SetFCollapsed(Value : Boolean); begin - FCollapsed := Value; - JSCode('collapsed:' + VarToJSON([Value])); +function TExtViewBoundList.JSClassName : string; begin + Result := 'Ext.view.BoundList'; end; -procedure TExtFormFieldSet.SetFCollapsible(Value : Boolean); begin - FCollapsible := Value; - JSCode('collapsible:' + VarToJSON([Value])); +procedure TExtViewBoundList.InitDefaults; begin + inherited; + FPagingToolbar := TExtToolbarPaging.CreateInternal(Self, 'pagingToolbar'); + FTplTemplate := TExtXTemplate.CreateInternal(Self, 'tpl'); end; -procedure TExtFormFieldSet.SetFFieldDefaults(Value : TExtObject); begin - FFieldDefaults := Value; +{$IFDEF FPC}constructor TExtViewBoundList.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtViewBoundList.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; +end; + +function TExtViewBoundList.GetInnerTpl(DisplayField : String) : TExtFunction; begin + JSCode(JSName + '.getInnerTpl(' + VarToJSON([DisplayField]) + ');', 'TExtViewBoundList'); + Result := Self; +end; + +destructor TExtViewBoundList.Destroy; begin + try + FPagingToolbar.Free; + FTplTemplate.Free; + except end; + inherited; +end; + +function TExtFxTargetCompositeElementCSS.JSClassName : string; begin + Result := 'Ext.fx.target.CompositeElementCSS'; +end; + +{$IFDEF FPC}constructor TExtFxTargetCompositeElementCSS.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDataReaderArray.JSClassName : string; begin + Result := 'Ext.data.reader.Array'; +end; + +{$IFDEF FPC}constructor TExtDataReaderArray.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtGridPropertyStore.JSClassName : string; begin + Result := 'Ext.grid.property.Store'; +end; + +{$IFDEF FPC}constructor TExtGridPropertyStore.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtGridPropertyStore.Create(Grid : TExtGridPanel; Source : TExtObject); begin + CreateVar(JSClassName + '(' + VarToJSON([Grid, false, Source, false]) + ');'); + InitDefaults; +end; + +function TExtDataProxyLocalStorage.JSClassName : string; begin + Result := 'Ext.data.proxy.LocalStorage'; +end; + +{$IFDEF FPC}constructor TExtDataProxyLocalStorage.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDataProxySessionStorage.JSClassName : string; begin + Result := 'Ext.data.proxy.SessionStorage'; +end; + +{$IFDEF FPC}constructor TExtDataProxySessionStorage.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +procedure TExtDataProxyRest.SetFActionMethods(Value : TExtObject); begin + FActionMethods := Value; Value.DeleteFromGarbage; - JSCode('fieldDefaults:' + VarToJSON([Value, false])); + JSCode(JSName + '.actionMethods=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtFormFieldSet.SetFLayout(Value : TExtEnumsLayout); begin - FLayout := Value; - JSCode('layout:"' + EnumToJSString(TypeInfo(TExtEnumsLayout), ord(Value)) + '"'); +procedure TExtDataProxyRest.SetFAppendId(Value : Boolean); begin + FAppendId := Value; + JSCode('appendId:' + VarToJSON([Value])); end; -procedure TExtFormFieldSet.SetFLayoutObject(Value : TExtObject); begin - FLayoutObject := Value; +procedure TExtDataProxyRest.SetFBatchActions(Value : Boolean); begin + FBatchActions := Value; + JSCode('batchActions:' + VarToJSON([Value])); +end; + +procedure TExtDataProxyRest.SetFFormat(Value : String); begin + FFormat := Value; + JSCode('format:' + VarToJSON([Value])); +end; + +function TExtDataProxyRest.JSClassName : string; begin + Result := 'Ext.data.proxy.Rest'; +end; + +procedure TExtDataProxyRest.InitDefaults; begin + inherited; + FActionMethods := TExtObject.CreateInternal(Self, 'actionMethods'); + FAppendId := true; +end; + +{$IFDEF FPC}constructor TExtDataProxyRest.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDataProxyRest.BuildUrl(Request : TExtObject) : TExtFunction; begin + JSCode(JSName + '.buildUrl(' + VarToJSON([Request, false]) + ');', 'TExtDataProxyRest'); + Result := Self; +end; + +constructor TExtDataProxyRest.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; +end; + +destructor TExtDataProxyRest.Destroy; begin + try + FActionMethods.Free; + except end; + inherited; +end; + +procedure TExtFormFieldTextArea.SetFCols(Value : Integer); begin + FCols := Value; + JSCode('cols:' + VarToJSON([Value])); +end; + +procedure TExtFormFieldTextArea.SetFEnterIsSpecial(Value : Boolean); begin + FEnterIsSpecial := Value; + JSCode('enterIsSpecial:' + VarToJSON([Value])); +end; + +procedure TExtFormFieldTextArea.SetFGrowAppend(Value : String); begin + FGrowAppend := Value; + JSCode('growAppend:' + VarToJSON([Value])); +end; + +procedure TExtFormFieldTextArea.SetFGrowMax(Value : Integer); begin + FGrowMax := Value; + JSCode('growMax:' + VarToJSON([Value])); +end; + +procedure TExtFormFieldTextArea.SetFGrowMin(Value : Integer); begin + FGrowMin := Value; + JSCode('growMin:' + VarToJSON([Value])); +end; + +procedure TExtFormFieldTextArea.SetFPreventScrollbars(Value : Boolean); begin + FPreventScrollbars := Value; + JSCode('preventScrollbars:' + VarToJSON([Value])); +end; + +procedure TExtFormFieldTextArea.SetFRows(Value : Integer); begin + FRows := Value; + JSCode('rows:' + VarToJSON([Value])); +end; + +procedure TExtFormFieldTextArea.SetFOnAutosize(Value : TExtFormFieldTextAreaOnAutosize); begin + if Assigned(FOnAutosize) then + JSCode(JSName+'.events ["autosize"].listeners=[];'); + if Assigned(Value) then + AddListener('autosize', Ajax('autosize', ['This', '%0.nm','Height', '%1'], true)); + FOnAutosize := Value; +end; + +function TExtFormFieldTextArea.JSClassName : string; begin + Result := 'Ext.form.field.TextArea'; +end; + +procedure TExtFormFieldTextArea.InitDefaults; begin + inherited; + FRows := 4; +end; + +{$IFDEF FPC}constructor TExtFormFieldTextArea.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtFormFieldTextArea.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; +end; + +procedure TExtFormFieldTextArea.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'autosize') and Assigned(FOnAutosize) then + FOnAutosize(TExtFormFieldTextArea(ParamAsObject('This')), ParamAsInteger('Height')); +end; + +procedure TExtPanelAbstractPanel.SetFBaseCls(Value : String); begin + FBaseCls := Value; + JSCode('baseCls:' + VarToJSON([Value])); +end; + +procedure TExtPanelAbstractPanel.SetFBody(Value : TExtDomElement); begin + FBody := Value; Value.DeleteFromGarbage; - JSCode('layout:' + VarToJSON([Value, false])); + JSCode(JSName + '.body=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtFormFieldSet.SetFTitle(Value : String); begin - FTitle := Value; +procedure TExtPanelAbstractPanel.SetFBodyBorder(Value : Boolean); begin + FBodyBorder := Value; + JSCode('bodyBorder:' + VarToJSON([Value])); +end; + +procedure TExtPanelAbstractPanel.SetFBodyCls(Value : String); begin + FBodyCls := Value; + JSCode('bodyCls:' + VarToJSON([Value])); +end; + +procedure TExtPanelAbstractPanel.SetFBodyClsList(Value : TExtObjectList); begin + FBodyClsList := Value; + Value.DeleteFromGarbage; + JSCode('bodyCls:' + VarToJSON([Value, false])); +end; + +procedure TExtPanelAbstractPanel.SetFBodyPadding(Value : Integer); begin + FBodyPadding := Value; + JSCode('bodyPadding:' + VarToJSON([Value])); +end; + +procedure TExtPanelAbstractPanel.SetFBodyPaddingString(Value : String); begin + FBodyPaddingString := Value; + JSCode('bodyPadding:' + VarToJSON([Value])); +end; + +procedure TExtPanelAbstractPanel.SetFBodyStyle(Value : String); begin + FBodyStyle := Value; if not ConfigAvailable(JSName) then - SetTitle(Value) + SetBodyStyle(Value, '') else - JSCode('title:' + VarToJSON([Value])); + JSCode('bodyStyle:' + VarToJSON([Value])); end; -procedure TExtFormFieldSet.SetFToggleCmp(Value : TExtPanelTool); begin - FToggleCmp := Value; +procedure TExtPanelAbstractPanel.SetFBodyStyleFunction(Value : TExtFunction); begin + FBodyStyleFunction := Value; + JSCode('bodyStyle:' + VarToJSON([Value, true])); +end; + +procedure TExtPanelAbstractPanel.SetFBodyStyleObject(Value : TExtObject); begin + FBodyStyleObject := Value; Value.DeleteFromGarbage; - JSCode(JSName + '.toggleCmp=' + VarToJSON([Value, false]) + ';'); + JSCode('bodyStyle:' + VarToJSON([Value, false])); end; -procedure TExtFormFieldSet.SetFToggleOnTitleClick(Value : Boolean); begin - FToggleOnTitleClick := Value; - JSCode('toggleOnTitleClick:' + VarToJSON([Value])); +procedure TExtPanelAbstractPanel.SetFContentPaddingProperty(Value : String); begin + FContentPaddingProperty := Value; + JSCode(JSName + '.contentPaddingProperty=' + VarToJSON([Value]) + ';'); end; -procedure TExtFormFieldSet.SetFOnFielderrorchange(Value : TExtFormFieldSetOnFielderrorchange); begin - if Assigned(FOnFielderrorchange) then - JSCode(JSName+'.events ["fielderrorchange"].listeners=[];'); - if Assigned(Value) then - AddListener('fielderrorchange', Ajax('fielderrorchange', ['This', '%0.nm','The', '%1.nm','Error', '%2'], true)); - FOnFielderrorchange := Value; +procedure TExtPanelAbstractPanel.SetFDefaultDockWeights(Value : TExtObject); begin + FDefaultDockWeights := Value; + Value.DeleteFromGarbage; + JSCode('defaultDockWeights:' + VarToJSON([Value, false])); end; -procedure TExtFormFieldSet.SetFOnFieldvaliditychange(Value : TExtFormFieldSetOnFieldvaliditychange); begin - if Assigned(FOnFieldvaliditychange) then - JSCode(JSName+'.events ["fieldvaliditychange"].listeners=[];'); - if Assigned(Value) then - AddListener('fieldvaliditychange', Ajax('fieldvaliditychange', ['This', '%0.nm','The', '%1.nm','IsValid', '%2'], true)); - FOnFieldvaliditychange := Value; +procedure TExtPanelAbstractPanel.SetFDockedItems(Value : TExtObjectList); begin + FDockedItems := Value; + Value.DeleteFromGarbage; + JSCode('dockedItems:' + VarToJSON([Value, false])); end; -function TExtFormFieldSet.JSClassName : string; begin - Result := 'Ext.form.FieldSet'; +procedure TExtPanelAbstractPanel.SetFIsPanel(Value : Boolean); begin + FIsPanel := Value; + JSCode(JSName + '.isPanel=' + VarToJSON([Value]) + ';'); end; -procedure TExtFormFieldSet.InitDefaults; begin +procedure TExtPanelAbstractPanel.SetFShrinkWrapDock(Value : Boolean); begin + FShrinkWrapDock := Value; + JSCode('shrinkWrapDock:' + VarToJSON([Value])); +end; + +procedure TExtPanelAbstractPanel.SetFShrinkWrapDockInteger(Value : Integer); begin + FShrinkWrapDockInteger := Value; + JSCode('shrinkWrapDock:' + VarToJSON([Value])); +end; + +function TExtPanelAbstractPanel.JSClassName : string; begin + Result := 'Ext.panel.AbstractPanel'; +end; + +procedure TExtPanelAbstractPanel.InitDefaults; begin inherited; - FCheckboxCmp := TExtFormFieldCheckbox.CreateInternal(Self, 'checkboxCmp'); - FFieldDefaults := TExtObject.CreateInternal(Self, 'fieldDefaults'); - FLayoutObject := TExtObject.CreateInternal(Self, 'layout'); - FToggleCmp := TExtPanelTool.CreateInternal(Self, 'toggleCmp'); + FBody := TExtDomElement.CreateInternal(Self, 'body'); + FBodyClsList := TExtObjectList.Create(Self, 'bodyCls'); + FBodyStyleObject := TExtObject.CreateInternal(Self, 'bodyStyle'); + FDefaultDockWeights := TExtObject.CreateInternal(Self, 'defaultDockWeights'); + FDockedItems := TExtObjectList.Create(Self, 'dockedItems'); end; -{$IFDEF FPC}constructor TExtFormFieldSet.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtPanelAbstractPanel.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtFormFieldSet.Collapse : TExtFunction; begin - JSCode(JSName + '.collapse();', 'TExtFormFieldSet'); +function TExtPanelAbstractPanel.AddBodyCls(Cls : String) : TExtFunction; begin + JSCode(JSName + '.addBodyCls(' + VarToJSON([Cls]) + ');', 'TExtPanelAbstractPanel'); Result := Self; end; -constructor TExtFormFieldSet.Create; begin +function TExtPanelAbstractPanel.AddDocked(Component : TExtObject; Pos : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.addDocked(' + VarToJSON([Component, false, Pos]) + ');', 'TExtPanelAbstractPanel'); + Result := Self; +end; + +constructor TExtPanelAbstractPanel.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -function TExtFormFieldSet.Expand : TExtFunction; begin - JSCode(JSName + '.expand();', 'TExtFormFieldSet'); +function TExtPanelAbstractPanel.GetComponent(Comp : Integer) : TExtFunction; begin + JSCode(JSName + '.getComponent(' + VarToJSON([Comp]) + ');', 'TExtPanelAbstractPanel'); Result := Self; end; -function TExtFormFieldSet.SetTitle(Title : String) : TExtFunction; begin - JSCode(JSName + '.setTitle(' + VarToJSON([Title]) + ');', 'TExtFormFieldSet'); +function TExtPanelAbstractPanel.GetDockedComponent(Comp : Integer) : TExtFunction; begin + JSCode(JSName + '.getDockedComponent(' + VarToJSON([Comp]) + ');', 'TExtPanelAbstractPanel'); Result := Self; end; -function TExtFormFieldSet.Toggle : TExtFunction; begin - JSCode(JSName + '.toggle();', 'TExtFormFieldSet'); +function TExtPanelAbstractPanel.GetDockedItems(Selector : String; BeforeBody : Boolean) : TExtFunction; begin + JSCode(JSName + '.getDockedItems(' + VarToJSON([Selector, BeforeBody]) + ');', 'TExtPanelAbstractPanel'); Result := Self; end; -destructor TExtFormFieldSet.Destroy; begin +function TExtPanelAbstractPanel.InsertDocked(Pos : Integer; Component : TExtObject) : TExtFunction; begin + JSCode(JSName + '.insertDocked(' + VarToJSON([Pos, Component, false]) + ');', 'TExtPanelAbstractPanel'); + Result := Self; +end; + +function TExtPanelAbstractPanel.RemoveBodyCls(Cls : String) : TExtFunction; begin + JSCode(JSName + '.removeBodyCls(' + VarToJSON([Cls]) + ');', 'TExtPanelAbstractPanel'); + Result := Self; +end; + +function TExtPanelAbstractPanel.RemoveDocked(Item : TExtComponent; AutoDestroy : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.removeDocked(' + VarToJSON([Item, false, AutoDestroy]) + ');', 'TExtPanelAbstractPanel'); + Result := Self; +end; + +function TExtPanelAbstractPanel.SetBodyStyle(Style : String; Value : String) : TExtFunction; begin + JSCode(JSName + '.setBodyStyle(' + VarToJSON([Style, Value]) + ');', 'TExtPanelAbstractPanel'); + Result := Self; +end; + +destructor TExtPanelAbstractPanel.Destroy; begin try - FCheckboxCmp.Free; - FFieldDefaults.Free; - FLayoutObject.Free; - FToggleCmp.Free; + FBody.Free; + FBodyClsList.Free; + FBodyStyleObject.Free; + FDefaultDockWeights.Free; + FDockedItems.Free; except end; inherited; end; -procedure TExtFormFieldSet.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'fielderrorchange') and Assigned(FOnFielderrorchange) then - FOnFielderrorchange(TExtFormFieldAncestor(ParamAsObject('This')), TExtFormLabelable(ParamAsObject('The')), ParamAsString('Error')) - else if (AEvtName = 'fieldvaliditychange') and Assigned(FOnFieldvaliditychange) then - FOnFieldvaliditychange(TExtFormFieldAncestor(ParamAsObject('This')), TExtFormLabelable(ParamAsObject('The')), ParamAsString('IsValid')); +procedure TExtContainerViewport.SetFIsViewport(Value : Boolean); begin + FIsViewport := Value; + JSCode(JSName + '.isViewport=' + VarToJSON([Value]) + ';'); end; -function TExtDataProxyLocalStorage.JSClassName : string; begin - Result := 'Ext.data.proxy.LocalStorage'; +function TExtContainerViewport.JSClassName : string; begin + Result := 'Ext.container.Viewport'; end; -{$IFDEF FPC}constructor TExtDataProxyLocalStorage.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtContainerViewport.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtLayoutComponentBoundList.JSClassName : string; begin - Result := 'Ext.layout.component.BoundList'; +procedure TExtLayoutContainerVBox.SetFAlign(Value : String); begin + FAlign := Value; + JSCode('align:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtLayoutComponentBoundList.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtLayoutContainerVBox.SetFAlignRoundingMethod(Value : TAlignRoundingMethodEnum); begin + FAlignRoundingMethod := Value; + JSCode('alignRoundingMethod:"' + EnumToJSString(TypeInfo(TAlignRoundingMethodEnum), ord(Value)) + '"'); +end; -function TExtLayoutComponentButton.JSClassName : string; begin - Result := 'Ext.layout.component.Button'; +procedure TExtLayoutContainerVBox.SetFConstrainAlign(Value : Boolean); begin + FConstrainAlign := Value; + JSCode('constrainAlign:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtLayoutComponentButton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtLayoutContainerVBox.JSClassName : string; begin + Result := 'Ext.layout.container.VBox'; +end; -function TExtLayoutComponentDraw.JSClassName : string; begin - Result := 'Ext.layout.component.Draw'; +{$IFDEF FPC}constructor TExtLayoutContainerVBox.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDataDirectStore.JSClassName : string; begin + Result := 'Ext.data.DirectStore'; end; -{$IFDEF FPC}constructor TExtLayoutComponentDraw.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtDataDirectStore.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtDataNodeStore.SetFNode(Value : TExtDataModel); begin - FNode := Value; - Value.DeleteFromGarbage; - JSCode('node:' + VarToJSON([Value, false])); +procedure TExtPanelHeader.SetFGlyph(Value : Integer); begin + FGlyph := Value; + if not ConfigAvailable(JSName) then + SetGlyph(Value) + else + JSCode('glyph:' + VarToJSON([Value])); end; -procedure TExtDataNodeStore.SetFRecursive(Value : Boolean); begin - FRecursive := Value; - JSCode('recursive:' + VarToJSON([Value])); +procedure TExtPanelHeader.SetFGlyphString(Value : String); begin + FGlyphString := Value; + JSCode('glyph:' + VarToJSON([Value])); +end; + +procedure TExtPanelHeader.SetFIcon(Value : String); begin + FIcon := Value; + if not ConfigAvailable(JSName) then + SetIcon(Value) + else + JSCode('icon:' + VarToJSON([Value])); +end; + +procedure TExtPanelHeader.SetFIconCls(Value : String); begin + FIconCls := Value; + if not ConfigAvailable(JSName) then + SetIconCls(Value) + else + JSCode('iconCls:' + VarToJSON([Value])); +end; + +procedure TExtPanelHeader.SetFIsHeader(Value : Boolean); begin + FIsHeader := Value; + JSCode(JSName + '.isHeader=' + VarToJSON([Value]) + ';'); +end; + +procedure TExtPanelHeader.SetFTitle(Value : String); begin + FTitle := Value; + if not ConfigAvailable(JSName) then + SetTitle(Value) + else + JSCode('title:' + VarToJSON([Value])); +end; + +procedure TExtPanelHeader.SetFTitleAlign(Value : String); begin + FTitleAlign := Value; + JSCode('titleAlign:' + VarToJSON([Value])); end; -procedure TExtDataNodeStore.SetFRootVisible(Value : Boolean); begin - FRootVisible := Value; - JSCode('rootVisible:' + VarToJSON([Value])); +procedure TExtPanelHeader.SetFTitlePosition(Value : Integer); begin + FTitlePosition := Value; + JSCode('titlePosition:' + VarToJSON([Value])); end; -procedure TExtDataNodeStore.SetFTreeStore(Value : TExtDataTreeStore); begin - FTreeStore := Value; - Value.DeleteFromGarbage; - JSCode('treeStore:' + VarToJSON([Value, false])); +procedure TExtPanelHeader.SetFOnClick(Value : TExtPanelHeaderOnClick); begin + if Assigned(FOnClick) then + JSCode(JSName+'.events ["click"].listeners=[];'); + if Assigned(Value) then + AddListener('click', Ajax('click', ['This', '%0.nm','E', '%1.nm'], true)); + FOnClick := Value; end; -function TExtDataNodeStore.JSClassName : string; begin - Result := 'Ext.data.NodeStore'; +procedure TExtPanelHeader.SetFOnDblclick(Value : TExtPanelHeaderOnDblclick); begin + if Assigned(FOnDblclick) then + JSCode(JSName+'.events ["dblclick"].listeners=[];'); + if Assigned(Value) then + AddListener('dblclick', Ajax('dblclick', ['This', '%0.nm','E', '%1.nm'], true)); + FOnDblclick := Value; end; -procedure TExtDataNodeStore.InitDefaults; begin +function TExtPanelHeader.JSClassName : string; begin + Result := 'Ext.panel.Header'; +end; + +procedure TExtPanelHeader.InitDefaults; begin inherited; - FNode := TExtDataModel.CreateInternal(Self, 'node'); - FTreeStore := TExtDataTreeStore.CreateInternal(Self, 'treeStore'); + FTitleAlign := 's natural * behavior depending on the css direction property - `'; end; -{$IFDEF FPC}constructor TExtDataNodeStore.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtPanelHeader.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtDataNodeStore.Create; begin +function TExtPanelHeader.AddTool(Tool : TExtObject) : TExtFunction; begin + JSCode(JSName + '.addTool(' + VarToJSON([Tool, false]) + ');', 'TExtPanelHeader'); + Result := Self; +end; + +constructor TExtPanelHeader.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -destructor TExtDataNodeStore.Destroy; begin - try - FNode.Free; - FTreeStore.Free; - except end; - inherited; +function TExtPanelHeader.GetTools : TExtFunction; begin + JSCode(JSName + '.getTools();', 'TExtPanelHeader'); + Result := Self; end; -function TExtDataJsonStore.JSClassName : string; begin - Result := 'Ext.data.JsonStore'; +function TExtPanelHeader.SetGlyph(Glyph : Integer) : TExtFunction; begin + JSCode(JSName + '.setGlyph(' + VarToJSON([Glyph]) + ');', 'TExtPanelHeader'); + Result := Self; end; -{$IFDEF FPC}constructor TExtDataJsonStore.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtLayoutComponentBody.JSClassName : string; begin - Result := 'Ext.layout.component.Body'; +function TExtPanelHeader.SetIcon(Icon : String) : TExtFunction; begin + JSCode(JSName + '.setIcon(' + VarToJSON([Icon]) + ');', 'TExtPanelHeader'); + Result := Self; end; -{$IFDEF FPC}constructor TExtLayoutComponentBody.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtFxTargetCompositeElementCSS.JSClassName : string; begin - Result := 'Ext.fx.target.CompositeElementCSS'; +function TExtPanelHeader.SetIconCls(Cls : String) : TExtFunction; begin + JSCode(JSName + '.setIconCls(' + VarToJSON([Cls]) + ');', 'TExtPanelHeader'); + Result := Self; end; -{$IFDEF FPC}constructor TExtFxTargetCompositeElementCSS.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtViewTable.SetFBody(Value : TExtDomAbstractElementFly); begin - FBody := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.body=' + VarToJSON([Value, false]) + ';'); +function TExtPanelHeader.SetTitle(Title : String) : TExtFunction; begin + JSCode(JSName + '.setTitle(' + VarToJSON([Title]) + ');', 'TExtPanelHeader'); + Result := Self; end; -procedure TExtViewTable.SetFEnableTextSelection(Value : Boolean); begin - FEnableTextSelection := Value; - JSCode('enableTextSelection:' + VarToJSON([Value])); +procedure TExtPanelHeader.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'click') and Assigned(FOnClick) then + FOnClick(TExtPanelHeader(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) + else if (AEvtName = 'dblclick') and Assigned(FOnDblclick) then + FOnDblclick(TExtPanelHeader(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))); end; -procedure TExtViewTable.SetFFirstCls(Value : String); begin - FFirstCls := Value; - JSCode('firstCls:' + VarToJSON([Value])); +function TExtDataArrayStore.JSClassName : string; begin + Result := 'Ext.data.ArrayStore'; end; -procedure TExtViewTable.SetFLastCls(Value : String); begin - FLastCls := Value; - JSCode('lastCls:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtDataArrayStore.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtViewTable.SetFMarkDirty(Value : Boolean); begin - FMarkDirty := Value; - JSCode('markDirty:' + VarToJSON([Value])); +procedure TExtFormFieldContainer.SetFActiveError(Value : String); begin + FActiveError := Value; + if not ConfigAvailable(JSName) then + SetActiveError(Value) + else + JSCode('activeError:' + VarToJSON([Value])); end; -procedure TExtViewTable.SetFStripeRows(Value : Boolean); begin - FStripeRows := Value; - JSCode('stripeRows:' + VarToJSON([Value])); +procedure TExtFormFieldContainer.SetFActiveErrorsTpl(Value : String); begin + FActiveErrorsTpl := Value; + JSCode('activeErrorsTpl:' + VarToJSON([Value])); end; -function TExtViewTable.JSClassName : string; begin - Result := 'Ext.view.Table'; +procedure TExtFormFieldContainer.SetFActiveErrorsTplList(Value : TExtObjectList); begin + FActiveErrorsTplList := Value; + Value.DeleteFromGarbage; + JSCode('activeErrorsTpl:' + VarToJSON([Value, false])); end; -procedure TExtViewTable.InitDefaults; begin - inherited; - FBody := TExtDomAbstractElementFly.CreateInternal(Self, 'body'); +procedure TExtFormFieldContainer.SetFActiveErrorsTplTemplate(Value : TExtXTemplate); begin + FActiveErrorsTplTemplate := Value; + Value.DeleteFromGarbage; + JSCode('activeErrorsTpl:' + VarToJSON([Value, false])); end; -{$IFDEF FPC}constructor TExtViewTable.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtViewTable.AddRowCls(RowInfo : Integer; Cls : String) : TExtFunction; begin - JSCode(JSName + '.addRowCls(' + VarToJSON([RowInfo, Cls]) + ');', 'TExtViewTable'); - Result := Self; +procedure TExtFormFieldContainer.SetFAfterBodyEl(Value : String); begin + FAfterBodyEl := Value; + JSCode('afterBodyEl:' + VarToJSON([Value])); end; -function TExtViewTable.AutoSizeColumn(Header : Integer) : TExtFunction; begin - JSCode(JSName + '.autoSizeColumn(' + VarToJSON([Header]) + ');', 'TExtViewTable'); - Result := Self; +procedure TExtFormFieldContainer.SetFAfterBodyElList(Value : TExtObjectList); begin + FAfterBodyElList := Value; + Value.DeleteFromGarbage; + JSCode('afterBodyEl:' + VarToJSON([Value, false])); end; -constructor TExtViewTable.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtFormFieldContainer.SetFAfterBodyElTemplate(Value : TExtXTemplate); begin + FAfterBodyElTemplate := Value; + Value.DeleteFromGarbage; + JSCode('afterBodyEl:' + VarToJSON([Value, false])); end; -function TExtViewTable.FocusRow(RowIdx : Integer) : TExtFunction; begin - JSCode(JSName + '.focusRow(' + VarToJSON([RowIdx]) + ');', 'TExtViewTable'); - Result := Self; +procedure TExtFormFieldContainer.SetFAfterLabelTextTpl(Value : String); begin + FAfterLabelTextTpl := Value; + JSCode('afterLabelTextTpl:' + VarToJSON([Value])); end; -function TExtViewTable.GetBodySelector : TExtFunction; begin - JSCode(JSName + '.getBodySelector();', 'TExtViewTable'); - Result := Self; +procedure TExtFormFieldContainer.SetFAfterLabelTextTplList(Value : TExtObjectList); begin + FAfterLabelTextTplList := Value; + Value.DeleteFromGarbage; + JSCode('afterLabelTextTpl:' + VarToJSON([Value, false])); end; -function TExtViewTable.GetCellSelector(Header : TExtGridColumn = nil) : TExtFunction; begin - JSCode(JSName + '.getCellSelector(' + VarToJSON([Header, false]) + ');', 'TExtViewTable'); - Result := Self; +procedure TExtFormFieldContainer.SetFAfterLabelTextTplTemplate(Value : TExtXTemplate); begin + FAfterLabelTextTplTemplate := Value; + Value.DeleteFromGarbage; + JSCode('afterLabelTextTpl:' + VarToJSON([Value, false])); end; -function TExtViewTable.GetColumnSizerSelector : TExtFunction; begin - JSCode(JSName + '.getColumnSizerSelector();', 'TExtViewTable'); - Result := Self; +procedure TExtFormFieldContainer.SetFAfterLabelTpl(Value : String); begin + FAfterLabelTpl := Value; + JSCode('afterLabelTpl:' + VarToJSON([Value])); end; -function TExtViewTable.GetDataRowSelector : TExtFunction; begin - JSCode(JSName + '.getDataRowSelector();', 'TExtViewTable'); - Result := Self; +procedure TExtFormFieldContainer.SetFAfterLabelTplList(Value : TExtObjectList); begin + FAfterLabelTplList := Value; + Value.DeleteFromGarbage; + JSCode('afterLabelTpl:' + VarToJSON([Value, false])); end; -function TExtViewTable.GetFeature(Id : String) : TExtFunction; begin - JSCode(JSName + '.getFeature(' + VarToJSON([Id]) + ');', 'TExtViewTable'); - Result := Self; +procedure TExtFormFieldContainer.SetFAfterLabelTplTemplate(Value : TExtXTemplate); begin + FAfterLabelTplTemplate := Value; + Value.DeleteFromGarbage; + JSCode('afterLabelTpl:' + VarToJSON([Value, false])); end; -function TExtViewTable.GetItemSelector : TExtFunction; begin - JSCode(JSName + '.getItemSelector();', 'TExtViewTable'); - Result := Self; +procedure TExtFormFieldContainer.SetFAfterSubTpl(Value : String); begin + FAfterSubTpl := Value; + JSCode('afterSubTpl:' + VarToJSON([Value])); end; -function TExtViewTable.GetNode(NodeInfo : Integer; DataRow : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.getNode(' + VarToJSON([NodeInfo, DataRow]) + ');', 'TExtViewTable'); - Result := Self; +procedure TExtFormFieldContainer.SetFAfterSubTplList(Value : TExtObjectList); begin + FAfterSubTplList := Value; + Value.DeleteFromGarbage; + JSCode('afterSubTpl:' + VarToJSON([Value, false])); end; -function TExtViewTable.GetNodeContainerSelector : TExtFunction; begin - JSCode(JSName + '.getNodeContainerSelector();', 'TExtViewTable'); - Result := Self; +procedure TExtFormFieldContainer.SetFAfterSubTplTemplate(Value : TExtXTemplate); begin + FAfterSubTplTemplate := Value; + Value.DeleteFromGarbage; + JSCode('afterSubTpl:' + VarToJSON([Value, false])); end; -function TExtViewTable.Refresh : TExtFunction; begin - JSCode(JSName + '.refresh();', 'TExtViewTable'); - Result := Self; +procedure TExtFormFieldContainer.SetFAutoFitErrors(Value : Boolean); begin + FAutoFitErrors := Value; + JSCode('autoFitErrors:' + VarToJSON([Value])); end; -function TExtViewTable.RemoveRowCls(RowInfo : Integer; Cls : String) : TExtFunction; begin - JSCode(JSName + '.removeRowCls(' + VarToJSON([RowInfo, Cls]) + ');', 'TExtViewTable'); - Result := Self; +procedure TExtFormFieldContainer.SetFBaseBodyCls(Value : String); begin + FBaseBodyCls := Value; + JSCode('baseBodyCls:' + VarToJSON([Value])); end; -function TExtViewTable.WalkRecs(StartRec : TExtDataModel; Distance : Integer) : TExtFunction; begin - JSCode(JSName + '.walkRecs(' + VarToJSON([StartRec, false, Distance]) + ');', 'TExtViewTable'); - Result := Self; +procedure TExtFormFieldContainer.SetFBeforeBodyEl(Value : String); begin + FBeforeBodyEl := Value; + JSCode('beforeBodyEl:' + VarToJSON([Value])); end; -function TExtViewTable.WalkRows(StartRow : Integer; Distance : Integer) : TExtFunction; begin - JSCode(JSName + '.walkRows(' + VarToJSON([StartRow, Distance]) + ');', 'TExtViewTable'); - Result := Self; +procedure TExtFormFieldContainer.SetFBeforeBodyElList(Value : TExtObjectList); begin + FBeforeBodyElList := Value; + Value.DeleteFromGarbage; + JSCode('beforeBodyEl:' + VarToJSON([Value, false])); end; -destructor TExtViewTable.Destroy; begin - try - FBody.Free; - except end; - inherited; +procedure TExtFormFieldContainer.SetFBeforeBodyElTemplate(Value : TExtXTemplate); begin + FBeforeBodyElTemplate := Value; + Value.DeleteFromGarbage; + JSCode('beforeBodyEl:' + VarToJSON([Value, false])); end; -function TExtViewTableLayout.JSClassName : string; begin - Result := 'Ext.view.TableLayout'; +procedure TExtFormFieldContainer.SetFBeforeLabelTextTpl(Value : String); begin + FBeforeLabelTextTpl := Value; + JSCode('beforeLabelTextTpl:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtViewTableLayout.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDataReaderArray.JSClassName : string; begin - Result := 'Ext.data.reader.Array'; +procedure TExtFormFieldContainer.SetFBeforeLabelTextTplList(Value : TExtObjectList); begin + FBeforeLabelTextTplList := Value; + Value.DeleteFromGarbage; + JSCode('beforeLabelTextTpl:' + VarToJSON([Value, false])); end; -{$IFDEF FPC}constructor TExtDataReaderArray.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDataProxySessionStorage.JSClassName : string; begin - Result := 'Ext.data.proxy.SessionStorage'; +procedure TExtFormFieldContainer.SetFBeforeLabelTextTplTemplate(Value : TExtXTemplate); begin + FBeforeLabelTextTplTemplate := Value; + Value.DeleteFromGarbage; + JSCode('beforeLabelTextTpl:' + VarToJSON([Value, false])); end; -{$IFDEF FPC}constructor TExtDataProxySessionStorage.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtDataProxyRest.SetFAppendId(Value : Boolean); begin - FAppendId := Value; - JSCode('appendId:' + VarToJSON([Value])); +procedure TExtFormFieldContainer.SetFBeforeLabelTpl(Value : String); begin + FBeforeLabelTpl := Value; + JSCode('beforeLabelTpl:' + VarToJSON([Value])); end; -procedure TExtDataProxyRest.SetFBatchActions(Value : Boolean); begin - FBatchActions := Value; - JSCode('batchActions:' + VarToJSON([Value])); +procedure TExtFormFieldContainer.SetFBeforeLabelTplList(Value : TExtObjectList); begin + FBeforeLabelTplList := Value; + Value.DeleteFromGarbage; + JSCode('beforeLabelTpl:' + VarToJSON([Value, false])); end; -procedure TExtDataProxyRest.SetFFormat(Value : String); begin - FFormat := Value; - JSCode('format:' + VarToJSON([Value])); +procedure TExtFormFieldContainer.SetFBeforeLabelTplTemplate(Value : TExtXTemplate); begin + FBeforeLabelTplTemplate := Value; + Value.DeleteFromGarbage; + JSCode('beforeLabelTpl:' + VarToJSON([Value, false])); end; -function TExtDataProxyRest.JSClassName : string; begin - Result := 'Ext.data.proxy.Rest'; +procedure TExtFormFieldContainer.SetFBeforeSubTpl(Value : String); begin + FBeforeSubTpl := Value; + JSCode('beforeSubTpl:' + VarToJSON([Value])); end; -procedure TExtDataProxyRest.InitDefaults; begin - inherited; - FAppendId := true; +procedure TExtFormFieldContainer.SetFBeforeSubTplList(Value : TExtObjectList); begin + FBeforeSubTplList := Value; + Value.DeleteFromGarbage; + JSCode('beforeSubTpl:' + VarToJSON([Value, false])); end; -{$IFDEF FPC}constructor TExtDataProxyRest.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDataProxyRest.BuildUrl(Request : TExtObject) : TExtFunction; begin - JSCode(JSName + '.buildUrl(' + VarToJSON([Request, false]) + ');', 'TExtDataProxyRest'); - Result := Self; +procedure TExtFormFieldContainer.SetFBeforeSubTplTemplate(Value : TExtXTemplate); begin + FBeforeSubTplTemplate := Value; + Value.DeleteFromGarbage; + JSCode('beforeSubTpl:' + VarToJSON([Value, false])); end; -constructor TExtDataProxyRest.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtFormFieldContainer.SetFBodyEl(Value : TExtElement); begin + FBodyEl := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.bodyEl=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtViewBoundList.SetFDisplayField(Value : String); begin - FDisplayField := Value; - JSCode('displayField:' + VarToJSON([Value])); +procedure TExtFormFieldContainer.SetFClearCls(Value : String); begin + FClearCls := Value; + JSCode('clearCls:' + VarToJSON([Value])); end; -procedure TExtViewBoundList.SetFPageSize(Value : Integer); begin - FPageSize := Value; - JSCode('pageSize:' + VarToJSON([Value])); +procedure TExtFormFieldContainer.SetFCombineErrors(Value : Boolean); begin + FCombineErrors := Value; + JSCode('combineErrors:' + VarToJSON([Value])); end; -procedure TExtViewBoundList.SetFTpl(Value : String); begin - FTpl := Value; - JSCode('tpl:' + VarToJSON([Value])); +procedure TExtFormFieldContainer.SetFCombineLabels(Value : Boolean); begin + FCombineLabels := Value; + JSCode('combineLabels:' + VarToJSON([Value])); end; -procedure TExtViewBoundList.SetFTplTemplate(Value : TExtXTemplate); begin - FTplTemplate := Value; +procedure TExtFormFieldContainer.SetFErrorEl(Value : TExtElement); begin + FErrorEl := Value; Value.DeleteFromGarbage; - JSCode('tpl:' + VarToJSON([Value, false])); + JSCode(JSName + '.errorEl=' + VarToJSON([Value, false]) + ';'); end; -function TExtViewBoundList.JSClassName : string; begin - Result := 'Ext.view.BoundList'; +procedure TExtFormFieldContainer.SetFErrorMsgCls(Value : String); begin + FErrorMsgCls := Value; + JSCode('errorMsgCls:' + VarToJSON([Value])); end; -procedure TExtViewBoundList.InitDefaults; begin - inherited; - FTplTemplate := TExtXTemplate.CreateInternal(Self, 'tpl'); +procedure TExtFormFieldContainer.SetFFieldBodyCls(Value : String); begin + FFieldBodyCls := Value; + JSCode('fieldBodyCls:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtViewBoundList.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtViewBoundList.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtFormFieldContainer.SetFFieldDefaults(Value : TExtObject); begin + FFieldDefaults := Value; + Value.DeleteFromGarbage; + if not ConfigAvailable(JSName) then + SetFieldDefaults(Value) + else + JSCode('fieldDefaults:' + VarToJSON([Value, false])); end; -function TExtViewBoundList.GetInnerTpl(DisplayField : String) : TExtFunction; begin - JSCode(JSName + '.getInnerTpl(' + VarToJSON([DisplayField]) + ');', 'TExtViewBoundList'); - Result := Self; +procedure TExtFormFieldContainer.SetFFieldLabel(Value : String); begin + FFieldLabel := Value; + if not ConfigAvailable(JSName) then + SetFieldLabel(Value) + else + JSCode('fieldLabel:' + VarToJSON([Value])); end; -destructor TExtViewBoundList.Destroy; begin - try - FTplTemplate.Free; - except end; - inherited; +procedure TExtFormFieldContainer.SetFFormItemCls(Value : String); begin + FFormItemCls := Value; + JSCode('formItemCls:' + VarToJSON([Value])); end; -function TExtGridFeatureGroupingSummary.JSClassName : string; begin - Result := 'Ext.grid.feature.GroupingSummary'; +procedure TExtFormFieldContainer.SetFHideEmptyLabel(Value : Boolean); begin + FHideEmptyLabel := Value; + JSCode('hideEmptyLabel:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtGridFeatureGroupingSummary.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtGridFeatureSummary.SetFDock(Value : String); begin - FDock := Value; - JSCode('dock:' + VarToJSON([Value])); +procedure TExtFormFieldContainer.SetFHideLabel(Value : Boolean); begin + FHideLabel := Value; + JSCode('hideLabel:' + VarToJSON([Value])); end; -function TExtGridFeatureSummary.JSClassName : string; begin - Result := 'Ext.grid.feature.Summary'; +procedure TExtFormFieldContainer.SetFInvalidCls(Value : String); begin + FInvalidCls := Value; + JSCode('invalidCls:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtGridFeatureSummary.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtFormFieldTrigger.SetFEditable(Value : Boolean); begin - FEditable := Value; - JSCode('editable:' + VarToJSON([Value])); +procedure TExtFormFieldContainer.SetFIsFieldLabelable(Value : Boolean); begin + FIsFieldLabelable := Value; + JSCode(JSName + '.isFieldLabelable=' + VarToJSON([Value]) + ';'); end; -procedure TExtFormFieldTrigger.SetFGrow(Value : Boolean); begin - FGrow := Value; - JSCode('grow:' + VarToJSON([Value])); +procedure TExtFormFieldContainer.SetFLabelAlign(Value : String); begin + FLabelAlign := Value; + JSCode('labelAlign:' + VarToJSON([Value])); end; -procedure TExtFormFieldTrigger.SetFHideTrigger(Value : Boolean); begin - FHideTrigger := Value; - JSCode('hideTrigger:' + VarToJSON([Value])); +procedure TExtFormFieldContainer.SetFLabelAttrTpl(Value : String); begin + FLabelAttrTpl := Value; + JSCode('labelAttrTpl:' + VarToJSON([Value])); end; -procedure TExtFormFieldTrigger.SetFReadOnly(Value : Boolean); begin - FReadOnly := Value; - JSCode('readOnly:' + VarToJSON([Value])); +procedure TExtFormFieldContainer.SetFLabelAttrTplList(Value : TExtObjectList); begin + FLabelAttrTplList := Value; + Value.DeleteFromGarbage; + JSCode('labelAttrTpl:' + VarToJSON([Value, false])); end; -procedure TExtFormFieldTrigger.SetFRepeatTriggerClick(Value : Boolean); begin - FRepeatTriggerClick := Value; - JSCode('repeatTriggerClick:' + VarToJSON([Value])); +procedure TExtFormFieldContainer.SetFLabelAttrTplTemplate(Value : TExtXTemplate); begin + FLabelAttrTplTemplate := Value; + Value.DeleteFromGarbage; + JSCode('labelAttrTpl:' + VarToJSON([Value, false])); end; -procedure TExtFormFieldTrigger.SetFSelectOnFocus(Value : Boolean); begin - FSelectOnFocus := Value; - JSCode('selectOnFocus:' + VarToJSON([Value])); +procedure TExtFormFieldContainer.SetFLabelCell(Value : TExtElement); begin + FLabelCell := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.labelCell=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtFormFieldTrigger.SetFTriggerCls(Value : String); begin - FTriggerCls := Value; - JSCode('triggerCls:' + VarToJSON([Value])); +procedure TExtFormFieldContainer.SetFLabelCls(Value : String); begin + FLabelCls := Value; + JSCode('labelCls:' + VarToJSON([Value])); end; -function TExtFormFieldTrigger.JSClassName : string; begin - Result := 'Ext.form.field.Trigger'; +procedure TExtFormFieldContainer.SetFLabelClsExtra(Value : String); begin + FLabelClsExtra := Value; + JSCode('labelClsExtra:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtFormFieldTrigger.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtFormFieldContainer.SetFLabelConnector(Value : String); begin + FLabelConnector := Value; + JSCode('labelConnector:' + VarToJSON([Value])); +end; -function TExtGridColumnComponentLayout.JSClassName : string; begin - Result := 'Ext.grid.ColumnComponentLayout'; +procedure TExtFormFieldContainer.SetFLabelEl(Value : TExtElement); begin + FLabelEl := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.labelEl=' + VarToJSON([Value, false]) + ';'); end; -{$IFDEF FPC}constructor TExtGridColumnComponentLayout.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtFormFieldContainer.SetFLabelPad(Value : Integer); begin + FLabelPad := Value; + JSCode('labelPad:' + VarToJSON([Value])); +end; -procedure TExtFormFieldTextArea.SetFCols(Value : Integer); begin - FCols := Value; - JSCode('cols:' + VarToJSON([Value])); +procedure TExtFormFieldContainer.SetFLabelSeparator(Value : String); begin + FLabelSeparator := Value; + JSCode('labelSeparator:' + VarToJSON([Value])); end; -procedure TExtFormFieldTextArea.SetFEnterIsSpecial(Value : Boolean); begin - FEnterIsSpecial := Value; - JSCode('enterIsSpecial:' + VarToJSON([Value])); +procedure TExtFormFieldContainer.SetFLabelStyle(Value : String); begin + FLabelStyle := Value; + JSCode('labelStyle:' + VarToJSON([Value])); end; -procedure TExtFormFieldTextArea.SetFGrowAppend(Value : String); begin - FGrowAppend := Value; - JSCode('growAppend:' + VarToJSON([Value])); +procedure TExtFormFieldContainer.SetFLabelWidth(Value : Integer); begin + FLabelWidth := Value; + JSCode('labelWidth:' + VarToJSON([Value])); end; -procedure TExtFormFieldTextArea.SetFGrowMax(Value : Integer); begin - FGrowMax := Value; - JSCode('growMax:' + VarToJSON([Value])); +procedure TExtFormFieldContainer.SetFMsgTarget(Value : String); begin + FMsgTarget := Value; + JSCode('msgTarget:' + VarToJSON([Value])); end; -procedure TExtFormFieldTextArea.SetFGrowMin(Value : Integer); begin - FGrowMin := Value; - JSCode('growMin:' + VarToJSON([Value])); +procedure TExtFormFieldContainer.SetFPreventMark(Value : Boolean); begin + FPreventMark := Value; + JSCode('preventMark:' + VarToJSON([Value])); end; -procedure TExtFormFieldTextArea.SetFPreventScrollbars(Value : Boolean); begin - FPreventScrollbars := Value; - JSCode('preventScrollbars:' + VarToJSON([Value])); +procedure TExtFormFieldContainer.SetFOnErrorchange(Value : TExtFormFieldContainerOnErrorchange); begin + if Assigned(FOnErrorchange) then + JSCode(JSName+'.events ["errorchange"].listeners=[];'); + if Assigned(Value) then + AddListener('errorchange', Ajax('errorchange', ['This', '%0.nm','Error', '%1'], true)); + FOnErrorchange := Value; end; -procedure TExtFormFieldTextArea.SetFRows(Value : Integer); begin - FRows := Value; - JSCode('rows:' + VarToJSON([Value])); +procedure TExtFormFieldContainer.SetFOnFielderrorchange(Value : TExtFormFieldContainerOnFielderrorchange); begin + if Assigned(FOnFielderrorchange) then + JSCode(JSName+'.events ["fielderrorchange"].listeners=[];'); + if Assigned(Value) then + AddListener('fielderrorchange', Ajax('fielderrorchange', ['This', '%0.nm','The', '%1.nm','Error', '%2'], true)); + FOnFielderrorchange := Value; end; -procedure TExtFormFieldTextArea.SetFOnAutosize(Value : TExtFormFieldTextAreaOnAutosize); begin - if Assigned(FOnAutosize) then - JSCode(JSName+'.events ["autosize"].listeners=[];'); +procedure TExtFormFieldContainer.SetFOnFieldvaliditychange(Value : TExtFormFieldContainerOnFieldvaliditychange); begin + if Assigned(FOnFieldvaliditychange) then + JSCode(JSName+'.events ["fieldvaliditychange"].listeners=[];'); if Assigned(Value) then - AddListener('autosize', Ajax('autosize', ['This', '%0.nm','Height', '%1'], true)); - FOnAutosize := Value; + AddListener('fieldvaliditychange', Ajax('fieldvaliditychange', ['This', '%0.nm','The', '%1.nm','IsValid', '%2'], true)); + FOnFieldvaliditychange := Value; end; -function TExtFormFieldTextArea.JSClassName : string; begin - Result := 'Ext.form.field.TextArea'; +function TExtFormFieldContainer.JSClassName : string; begin + Result := 'Ext.form.FieldContainer'; end; -procedure TExtFormFieldTextArea.InitDefaults; begin +procedure TExtFormFieldContainer.InitDefaults; begin inherited; - FRows := 4; + FActiveErrorsTplList := TExtObjectList.Create(Self, 'activeErrorsTpl'); + FActiveErrorsTplTemplate := TExtXTemplate.CreateInternal(Self, 'activeErrorsTpl'); + FAfterBodyElList := TExtObjectList.Create(Self, 'afterBodyEl'); + FAfterBodyElTemplate := TExtXTemplate.CreateInternal(Self, 'afterBodyEl'); + FAfterLabelTextTplList := TExtObjectList.Create(Self, 'afterLabelTextTpl'); + FAfterLabelTextTplTemplate := TExtXTemplate.CreateInternal(Self, 'afterLabelTextTpl'); + FAfterLabelTplList := TExtObjectList.Create(Self, 'afterLabelTpl'); + FAfterLabelTplTemplate := TExtXTemplate.CreateInternal(Self, 'afterLabelTpl'); + FAfterSubTplList := TExtObjectList.Create(Self, 'afterSubTpl'); + FAfterSubTplTemplate := TExtXTemplate.CreateInternal(Self, 'afterSubTpl'); + FBeforeBodyElList := TExtObjectList.Create(Self, 'beforeBodyEl'); + FBeforeBodyElTemplate := TExtXTemplate.CreateInternal(Self, 'beforeBodyEl'); + FBeforeLabelTextTplList := TExtObjectList.Create(Self, 'beforeLabelTextTpl'); + FBeforeLabelTextTplTemplate := TExtXTemplate.CreateInternal(Self, 'beforeLabelTextTpl'); + FBeforeLabelTplList := TExtObjectList.Create(Self, 'beforeLabelTpl'); + FBeforeLabelTplTemplate := TExtXTemplate.CreateInternal(Self, 'beforeLabelTpl'); + FBeforeSubTplList := TExtObjectList.Create(Self, 'beforeSubTpl'); + FBeforeSubTplTemplate := TExtXTemplate.CreateInternal(Self, 'beforeSubTpl'); + FBodyEl := TExtElement.CreateInternal(Self, 'bodyEl'); + FErrorEl := TExtElement.CreateInternal(Self, 'errorEl'); + FFieldDefaults := TExtObject.CreateInternal(Self, 'fieldDefaults'); + FLabelAttrTplList := TExtObjectList.Create(Self, 'labelAttrTpl'); + FLabelAttrTplTemplate := TExtXTemplate.CreateInternal(Self, 'labelAttrTpl'); + FLabelCell := TExtElement.CreateInternal(Self, 'labelCell'); + FLabelConnector := ','; + FLabelEl := TExtElement.CreateInternal(Self, 'labelEl'); end; -{$IFDEF FPC}constructor TExtFormFieldTextArea.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtFormFieldContainer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtFormFieldTextArea.Create; begin +constructor TExtFormFieldContainer.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -procedure TExtFormFieldTextArea.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'autosize') and Assigned(FOnAutosize) then - FOnAutosize(TExtFormFieldTextArea(ParamAsObject('This')), ParamAsInteger('Height')); +function TExtFormFieldContainer.GetActiveError : TExtFunction; begin + JSCode(JSName + '.getActiveError();', 'TExtFormFieldContainer'); + Result := Self; end; -procedure TExtLayoutContainerVBox.SetFAlign(Value : String); begin - FAlign := Value; - JSCode('align:' + VarToJSON([Value])); +function TExtFormFieldContainer.GetActiveErrors : TExtFunction; begin + JSCode(JSName + '.getActiveErrors();', 'TExtFormFieldContainer'); + Result := Self; end; -procedure TExtLayoutContainerVBox.SetFAlignRoundingMethod(Value : TAlignRoundingMethodEnum); begin - FAlignRoundingMethod := Value; - JSCode('alignRoundingMethod:"' + EnumToJSString(TypeInfo(TAlignRoundingMethodEnum), ord(Value)) + '"'); +function TExtFormFieldContainer.GetCombinedErrors(InvalidFields : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.getCombinedErrors(' + VarToJSON(InvalidFields) + ');', 'TExtFormFieldContainer'); + Result := Self; end; -procedure TExtLayoutContainerVBox.SetFConstrainAlign(Value : Boolean); begin - FConstrainAlign := Value; - JSCode('constrainAlign:' + VarToJSON([Value])); +function TExtFormFieldContainer.GetInputId : TExtFunction; begin + JSCode(JSName + '.getInputId();', 'TExtFormFieldContainer'); + Result := Self; end; -function TExtLayoutContainerVBox.JSClassName : string; begin - Result := 'Ext.layout.container.VBox'; +function TExtFormFieldContainer.GetLabelWidth : TExtFunction; begin + JSCode(JSName + '.getLabelWidth();', 'TExtFormFieldContainer'); + Result := Self; end; -{$IFDEF FPC}constructor TExtLayoutContainerVBox.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDataDirectStore.JSClassName : string; begin - Result := 'Ext.data.DirectStore'; +function TExtFormFieldContainer.HasActiveError : TExtFunction; begin + JSCode(JSName + '.hasActiveError();', 'TExtFormFieldContainer'); + Result := Self; end; -{$IFDEF FPC}constructor TExtDataDirectStore.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDataBufferStore.JSClassName : string; begin - Result := 'Ext.data.BufferStore'; +function TExtFormFieldContainer.HasVisibleLabel : TExtFunction; begin + JSCode(JSName + '.hasVisibleLabel();', 'TExtFormFieldContainer'); + Result := Self; end; -{$IFDEF FPC}constructor TExtDataBufferStore.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtLayoutContainerCard.SetFDeferredRender(Value : Boolean); begin - FDeferredRender := Value; - JSCode('deferredRender:' + VarToJSON([Value])); +function TExtFormFieldContainer.InitLabelable : TExtFunction; begin + JSCode(JSName + '.initLabelable();', 'TExtFormFieldContainer'); + Result := Self; end; -function TExtLayoutContainerCard.JSClassName : string; begin - Result := 'Ext.layout.container.Card'; +function TExtFormFieldContainer.SetActiveError(Msg : String) : TExtFunction; begin + JSCode(JSName + '.setActiveError(' + VarToJSON([Msg]) + ');', 'TExtFormFieldContainer'); + Result := Self; end; -{$IFDEF FPC}constructor TExtLayoutContainerCard.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtLayoutContainerCard.GetActiveItem : TExtFunction; begin - JSCode(JSName + '.getActiveItem();', 'TExtLayoutContainerCard'); +function TExtFormFieldContainer.SetActiveErrors(Errors : TExtObjectList) : TExtFunction; begin + JSCode(JSName + '.setActiveErrors(' + VarToJSON(Errors) + ');', 'TExtFormFieldContainer'); Result := Self; end; -function TExtLayoutContainerCard.GetNext : TExtFunction; begin - JSCode(JSName + '.getNext();', 'TExtLayoutContainerCard'); +function TExtFormFieldContainer.SetFieldDefaults(Defaults : TExtObject) : TExtFunction; begin + JSCode(JSName + '.setFieldDefaults(' + VarToJSON([Defaults, false]) + ');', 'TExtFormFieldContainer'); Result := Self; end; -function TExtLayoutContainerCard.GetPrev : TExtFunction; begin - JSCode(JSName + '.getPrev();', 'TExtLayoutContainerCard'); +function TExtFormFieldContainer.SetFieldLabel(LabelJS : String) : TExtFunction; begin + JSCode(JSName + '.setFieldLabel(' + VarToJSON([LabelJS]) + ');', 'TExtFormFieldContainer'); Result := Self; end; -function TExtLayoutContainerCard.Next : TExtFunction; begin - JSCode(JSName + '.next();', 'TExtLayoutContainerCard'); +function TExtFormFieldContainer.TrimLabelSeparator : TExtFunction; begin + JSCode(JSName + '.trimLabelSeparator();', 'TExtFormFieldContainer'); Result := Self; end; -function TExtLayoutContainerCard.Prev : TExtFunction; begin - JSCode(JSName + '.prev();', 'TExtLayoutContainerCard'); +function TExtFormFieldContainer.UnsetActiveError : TExtFunction; begin + JSCode(JSName + '.unsetActiveError();', 'TExtFormFieldContainer'); Result := Self; end; -function TExtLayoutContainerCard.SetActiveItem(NewCard : Integer) : TExtFunction; begin - JSCode(JSName + '.setActiveItem(' + VarToJSON([NewCard]) + ');', 'TExtLayoutContainerCard'); - Result := Self; +procedure TExtFormFieldContainer.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'errorchange') and Assigned(FOnErrorchange) then + FOnErrorchange(TExtFormLabelable(ParamAsObject('This')), ParamAsString('Error')) + else if (AEvtName = 'fielderrorchange') and Assigned(FOnFielderrorchange) then + FOnFielderrorchange(TExtFormFieldAncestor(ParamAsObject('This')), TExtFormLabelable(ParamAsObject('The')), ParamAsString('Error')) + else if (AEvtName = 'fieldvaliditychange') and Assigned(FOnFieldvaliditychange) then + FOnFieldvaliditychange(TExtFormFieldAncestor(ParamAsObject('This')), TExtFormLabelable(ParamAsObject('The')), ParamAsString('IsValid')); end; -function TExtLayoutContainerColumn.JSClassName : string; begin - Result := 'Ext.layout.container.Column'; +function TExtDataXmlStore.JSClassName : string; begin + Result := 'Ext.data.XmlStore'; end; -{$IFDEF FPC}constructor TExtLayoutContainerColumn.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtDataXmlStore.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtDataBufferStore.JSClassName : string; begin + Result := 'Ext.data.BufferStore'; +end; + +{$IFDEF FPC}constructor TExtDataBufferStore.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} procedure TExtLayoutContainerHBox.SetFAlign(Value : String); begin FAlign := Value; @@ -39804,266 +41773,136 @@ function TExtLayoutContainerHBox.JSClassName : string; begin {$IFDEF FPC}constructor TExtLayoutContainerHBox.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtDdDropZone.JSClassName : string; begin - Result := 'Ext.dd.DropZone'; -end; - -{$IFDEF FPC}constructor TExtDdDropZone.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtDdDropZone.GetTargetFromEvent(E : TEvent) : TExtFunction; begin - JSCode(JSName + '.getTargetFromEvent(' + VarToJSON([E, false]) + ');', 'TExtDdDropZone'); - Result := Self; -end; - -function TExtDdDropZone.OnNodeEnter(NodeData : TExtObject; Source : TExtDdDragSource; E : TEvent; Data : TExtObject) : TExtFunction; begin - JSCode(JSName + '.onNodeEnter(' + VarToJSON([NodeData, false, Source, false, E, false, Data, false]) + ');', 'TExtDdDropZone'); - Result := Self; -end; - -function TExtDataArrayStore.JSClassName : string; begin - Result := 'Ext.data.ArrayStore'; -end; - -{$IFDEF FPC}constructor TExtDataArrayStore.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtContainerViewport.SetFIsViewport(Value : Boolean); begin - FIsViewport := Value; - JSCode(JSName + '.isViewport=' + VarToJSON([Value]) + ';'); -end; - -function TExtContainerViewport.JSClassName : string; begin - Result := 'Ext.container.Viewport'; -end; - -{$IFDEF FPC}constructor TExtContainerViewport.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtDdDragSource.SetFAnimRepair(Value : Boolean); begin - FAnimRepair := Value; - JSCode('animRepair:' + VarToJSON([Value])); -end; - -procedure TExtDdDragSource.SetFDdGroup(Value : String); begin - FDdGroup := Value; - JSCode('ddGroup:' + VarToJSON([Value])); -end; - -procedure TExtDdDragSource.SetFDropAllowed(Value : String); begin - FDropAllowed := Value; - JSCode('dropAllowed:' + VarToJSON([Value])); -end; - -procedure TExtDdDragSource.SetFDropNotAllowed(Value : String); begin - FDropNotAllowed := Value; - JSCode('dropNotAllowed:' + VarToJSON([Value])); +procedure TExtFormFieldRadio.SetFFocusCls(Value : String); begin + FFocusCls := Value; + JSCode('focusCls:' + VarToJSON([Value])); end; -procedure TExtDdDragSource.SetFRepairHighlightColor(Value : String); begin - FRepairHighlightColor := Value; - JSCode('repairHighlightColor:' + VarToJSON([Value])); +procedure TExtFormFieldRadio.SetFIsRadio(Value : Boolean); begin + FIsRadio := Value; + JSCode(JSName + '.isRadio=' + VarToJSON([Value]) + ';'); end; -function TExtDdDragSource.JSClassName : string; begin - Result := 'Ext.dd.DragSource'; +function TExtFormFieldRadio.JSClassName : string; begin + Result := 'Ext.form.field.Radio'; end; -{$IFDEF FPC}constructor TExtDdDragSource.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtDdDragSource.Create(El : String; Config : TExtObject = nil); begin - CreateVar(JSClassName + '(' + VarToJSON([El, Config, false]) + ');'); - InitDefaults; -end; +{$IFDEF FPC}constructor TExtFormFieldRadio.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtDdDragSource.GetDragData : TExtFunction; begin - JSCode(JSName + '.getDragData();', 'TExtDdDragSource'); +function TExtFormFieldRadio.GetGroupValue : TExtFunction; begin + JSCode(JSName + '.getGroupValue();', 'TExtFormFieldRadio'); Result := Self; end; -function TExtDdDragSource.GetProxy : TExtFunction; begin - JSCode(JSName + '.getProxy();', 'TExtDdDragSource'); +function TExtFormFieldRadio.GetSubmitValue : TExtFunction; begin + JSCode(JSName + '.getSubmitValue();', 'TExtFormFieldRadio'); Result := Self; end; -function TExtDdDragSource.HideProxy : TExtFunction; begin - JSCode(JSName + '.hideProxy();', 'TExtDdDragSource'); +function TExtFormFieldRadio.SetValue(Value : Boolean) : TExtFunction; begin + JSCode(JSName + '.setValue(' + VarToJSON([Value]) + ');', 'TExtFormFieldRadio'); Result := Self; end; -procedure TExtPanelAbstractPanel.SetFBaseCls(Value : String); begin - FBaseCls := Value; - JSCode('baseCls:' + VarToJSON([Value])); -end; - -procedure TExtPanelAbstractPanel.SetFBodyBorder(Value : Boolean); begin - FBodyBorder := Value; - JSCode('bodyBorder:' + VarToJSON([Value])); -end; - -procedure TExtPanelAbstractPanel.SetFBodyCls(Value : String); begin - FBodyCls := Value; - JSCode('bodyCls:' + VarToJSON([Value])); -end; - -procedure TExtPanelAbstractPanel.SetFBodyClsList(Value : TExtObjectList); begin - FBodyClsList := Value; - Value.DeleteFromGarbage; - JSCode('bodyCls:' + VarToJSON([Value, false])); -end; - -procedure TExtPanelAbstractPanel.SetFBodyPadding(Value : Integer); begin - FBodyPadding := Value; - JSCode('bodyPadding:' + VarToJSON([Value])); -end; - -procedure TExtPanelAbstractPanel.SetFBodyPaddingString(Value : String); begin - FBodyPaddingString := Value; - JSCode('bodyPadding:' + VarToJSON([Value])); -end; - -procedure TExtPanelAbstractPanel.SetFBodyStyle(Value : String); begin - FBodyStyle := Value; - if not ConfigAvailable(JSName) then - SetBodyStyle(Value, '') - else - JSCode('bodyStyle:' + VarToJSON([Value])); -end; - -procedure TExtPanelAbstractPanel.SetFBodyStyleFunction(Value : TExtFunction); begin - FBodyStyleFunction := Value; - JSCode('bodyStyle:' + VarToJSON([Value, true])); -end; - -procedure TExtPanelAbstractPanel.SetFBodyStyleObject(Value : TExtObject); begin - FBodyStyleObject := Value; - Value.DeleteFromGarbage; - JSCode('bodyStyle:' + VarToJSON([Value, false])); +procedure TExtLayoutContainerAnchor.SetFAnchor(Value : String); begin + FAnchor := Value; + JSCode('anchor:' + VarToJSON([Value])); end; -procedure TExtPanelAbstractPanel.SetFDefaultDockWeights(Value : TExtObject); begin - FDefaultDockWeights := Value; - Value.DeleteFromGarbage; - JSCode('defaultDockWeights:' + VarToJSON([Value, false])); +procedure TExtLayoutContainerAnchor.SetFAnchorSize(Value : Integer); begin + FAnchorSize := Value; + JSCode('anchorSize:' + VarToJSON([Value])); end; -procedure TExtPanelAbstractPanel.SetFDockedItems(Value : TExtObjectList); begin - FDockedItems := Value; +procedure TExtLayoutContainerAnchor.SetFAnchorSizeObject(Value : TExtObject); begin + FAnchorSizeObject := Value; Value.DeleteFromGarbage; - JSCode('dockedItems:' + VarToJSON([Value, false])); -end; - -procedure TExtPanelAbstractPanel.SetFShrinkWrapDock(Value : Boolean); begin - FShrinkWrapDock := Value; - JSCode('shrinkWrapDock:' + VarToJSON([Value])); + JSCode('anchorSize:' + VarToJSON([Value, false])); end; -procedure TExtPanelAbstractPanel.SetFShrinkWrapDockInteger(Value : Integer); begin - FShrinkWrapDockInteger := Value; - JSCode('shrinkWrapDock:' + VarToJSON([Value])); +procedure TExtLayoutContainerAnchor.SetFDefaultAnchor(Value : String); begin + FDefaultAnchor := Value; + JSCode('defaultAnchor:' + VarToJSON([Value])); end; -function TExtPanelAbstractPanel.JSClassName : string; begin - Result := 'Ext.panel.AbstractPanel'; +function TExtLayoutContainerAnchor.JSClassName : string; begin + Result := 'Ext.layout.container.Anchor'; end; -procedure TExtPanelAbstractPanel.InitDefaults; begin +procedure TExtLayoutContainerAnchor.InitDefaults; begin inherited; - FBodyClsList := TExtObjectList.Create(Self, 'bodyCls'); - FBodyStyleObject := TExtObject.CreateInternal(Self, 'bodyStyle'); - FDefaultDockWeights := TExtObject.CreateInternal(Self, 'defaultDockWeights'); - FDockedItems := TExtObjectList.Create(Self, 'dockedItems'); -end; - -{$IFDEF FPC}constructor TExtPanelAbstractPanel.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtPanelAbstractPanel.AddBodyCls(Cls : String) : TExtFunction; begin - JSCode(JSName + '.addBodyCls(' + VarToJSON([Cls]) + ');', 'TExtPanelAbstractPanel'); - Result := Self; + FAnchorSizeObject := TExtObject.CreateInternal(Self, 'anchorSize'); end; -function TExtPanelAbstractPanel.AddDocked(Component : TExtObject; Pos : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.addDocked(' + VarToJSON([Component, false, Pos]) + ');', 'TExtPanelAbstractPanel'); - Result := Self; -end; +{$IFDEF FPC}constructor TExtLayoutContainerAnchor.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtPanelAbstractPanel.Create; begin +constructor TExtLayoutContainerAnchor.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -function TExtPanelAbstractPanel.GetComponent(Comp : Integer) : TExtFunction; begin - JSCode(JSName + '.getComponent(' + VarToJSON([Comp]) + ');', 'TExtPanelAbstractPanel'); - Result := Self; -end; - -function TExtPanelAbstractPanel.GetDockedComponent(Comp : Integer) : TExtFunction; begin - JSCode(JSName + '.getDockedComponent(' + VarToJSON([Comp]) + ');', 'TExtPanelAbstractPanel'); - Result := Self; +destructor TExtLayoutContainerAnchor.Destroy; begin + try + FAnchorSizeObject.Free; + except end; + inherited; end; -function TExtPanelAbstractPanel.GetDockedItems(Selector : String; BeforeBody : Boolean) : TExtFunction; begin - JSCode(JSName + '.getDockedItems(' + VarToJSON([Selector, BeforeBody]) + ');', 'TExtPanelAbstractPanel'); - Result := Self; +procedure TExtFormFieldSet.SetFBaseCls(Value : String); begin + FBaseCls := Value; + JSCode('baseCls:' + VarToJSON([Value])); end; -function TExtPanelAbstractPanel.InsertDocked(Pos : Integer; Component : TExtObject) : TExtFunction; begin - JSCode(JSName + '.insertDocked(' + VarToJSON([Pos, Component, false]) + ');', 'TExtPanelAbstractPanel'); - Result := Self; +procedure TExtFormFieldSet.SetFCheckboxCmp(Value : TExtFormFieldCheckbox); begin + FCheckboxCmp := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.checkboxCmp=' + VarToJSON([Value, false]) + ';'); end; -function TExtPanelAbstractPanel.RemoveBodyCls(Cls : String) : TExtFunction; begin - JSCode(JSName + '.removeBodyCls(' + VarToJSON([Cls]) + ');', 'TExtPanelAbstractPanel'); - Result := Self; +procedure TExtFormFieldSet.SetFCheckboxName(Value : String); begin + FCheckboxName := Value; + JSCode('checkboxName:' + VarToJSON([Value])); end; -function TExtPanelAbstractPanel.RemoveDocked(Item : TExtComponent; AutoDestroy : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.removeDocked(' + VarToJSON([Item, false, AutoDestroy]) + ');', 'TExtPanelAbstractPanel'); - Result := Self; +procedure TExtFormFieldSet.SetFCheckboxToggle(Value : Boolean); begin + FCheckboxToggle := Value; + JSCode('checkboxToggle:' + VarToJSON([Value])); end; -function TExtPanelAbstractPanel.SetBodyStyle(Style : String; Value : String) : TExtFunction; begin - JSCode(JSName + '.setBodyStyle(' + VarToJSON([Style, Value]) + ');', 'TExtPanelAbstractPanel'); - Result := Self; +procedure TExtFormFieldSet.SetFCollapsed(Value : Boolean); begin + FCollapsed := Value; + JSCode('collapsed:' + VarToJSON([Value])); end; -destructor TExtPanelAbstractPanel.Destroy; begin - try - FBodyClsList.Free; - FBodyStyleObject.Free; - FDefaultDockWeights.Free; - FDockedItems.Free; - except end; - inherited; +procedure TExtFormFieldSet.SetFCollapsible(Value : Boolean); begin + FCollapsible := Value; + JSCode('collapsible:' + VarToJSON([Value])); end; -procedure TExtPanelHeader.SetFGlyph(Value : Integer); begin - FGlyph := Value; - if not ConfigAvailable(JSName) then - SetGlyph(Value) - else - JSCode('glyph:' + VarToJSON([Value])); +procedure TExtFormFieldSet.SetFFieldDefaults(Value : TExtObject); begin + FFieldDefaults := Value; + Value.DeleteFromGarbage; + JSCode('fieldDefaults:' + VarToJSON([Value, false])); end; -procedure TExtPanelHeader.SetFGlyphString(Value : String); begin - FGlyphString := Value; - JSCode('glyph:' + VarToJSON([Value])); +procedure TExtFormFieldSet.SetFLayout(Value : TExtEnumsLayout); begin + FLayout := Value; + JSCode('layout:"' + EnumToJSString(TypeInfo(TExtEnumsLayout), ord(Value)) + '"'); end; -procedure TExtPanelHeader.SetFIcon(Value : String); begin - FIcon := Value; - if not ConfigAvailable(JSName) then - SetIcon(Value) - else - JSCode('icon:' + VarToJSON([Value])); +procedure TExtFormFieldSet.SetFLayoutObject(Value : TExtObject); begin + FLayoutObject := Value; + Value.DeleteFromGarbage; + JSCode('layout:' + VarToJSON([Value, false])); end; -procedure TExtPanelHeader.SetFIconCls(Value : String); begin - FIconCls := Value; - if not ConfigAvailable(JSName) then - SetIconCls(Value) - else - JSCode('iconCls:' + VarToJSON([Value])); +procedure TExtFormFieldSet.SetFLegend(Value : TExtComponent); begin + FLegend := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.legend=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtPanelHeader.SetFTitle(Value : String); begin +procedure TExtFormFieldSet.SetFTitle(Value : String); begin FTitle := Value; if not ConfigAvailable(JSName) then SetTitle(Value) @@ -40071,1048 +41910,983 @@ procedure TExtPanelHeader.SetFTitle(Value : String); begin JSCode('title:' + VarToJSON([Value])); end; -procedure TExtPanelHeader.SetFTitleAlign(Value : String); begin - FTitleAlign := Value; - JSCode('titleAlign:' + VarToJSON([Value])); +procedure TExtFormFieldSet.SetFToggleCmp(Value : TExtPanelTool); begin + FToggleCmp := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.toggleCmp=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtPanelHeader.SetFTitlePosition(Value : Integer); begin - FTitlePosition := Value; - JSCode('titlePosition:' + VarToJSON([Value])); +procedure TExtFormFieldSet.SetFToggleOnTitleClick(Value : Boolean); begin + FToggleOnTitleClick := Value; + JSCode('toggleOnTitleClick:' + VarToJSON([Value])); end; -procedure TExtPanelHeader.SetFOnClick(Value : TExtPanelHeaderOnClick); begin - if Assigned(FOnClick) then - JSCode(JSName+'.events ["click"].listeners=[];'); +procedure TExtFormFieldSet.SetFOnFielderrorchange(Value : TExtFormFieldSetOnFielderrorchange); begin + if Assigned(FOnFielderrorchange) then + JSCode(JSName+'.events ["fielderrorchange"].listeners=[];'); if Assigned(Value) then - AddListener('click', Ajax('click', ['This', '%0.nm','E', '%1.nm'], true)); - FOnClick := Value; + AddListener('fielderrorchange', Ajax('fielderrorchange', ['This', '%0.nm','The', '%1.nm','Error', '%2'], true)); + FOnFielderrorchange := Value; end; -procedure TExtPanelHeader.SetFOnDblclick(Value : TExtPanelHeaderOnDblclick); begin - if Assigned(FOnDblclick) then - JSCode(JSName+'.events ["dblclick"].listeners=[];'); +procedure TExtFormFieldSet.SetFOnFieldvaliditychange(Value : TExtFormFieldSetOnFieldvaliditychange); begin + if Assigned(FOnFieldvaliditychange) then + JSCode(JSName+'.events ["fieldvaliditychange"].listeners=[];'); if Assigned(Value) then - AddListener('dblclick', Ajax('dblclick', ['This', '%0.nm','E', '%1.nm'], true)); - FOnDblclick := Value; + AddListener('fieldvaliditychange', Ajax('fieldvaliditychange', ['This', '%0.nm','The', '%1.nm','IsValid', '%2'], true)); + FOnFieldvaliditychange := Value; end; -function TExtPanelHeader.JSClassName : string; begin - Result := 'Ext.panel.Header'; +function TExtFormFieldSet.JSClassName : string; begin + Result := 'Ext.form.FieldSet'; end; -procedure TExtPanelHeader.InitDefaults; begin +procedure TExtFormFieldSet.InitDefaults; begin inherited; - FTitleAlign := 's natural * behavior depending on the css direction property - `'; + FCheckboxCmp := TExtFormFieldCheckbox.CreateInternal(Self, 'checkboxCmp'); + FFieldDefaults := TExtObject.CreateInternal(Self, 'fieldDefaults'); + FLayoutObject := TExtObject.CreateInternal(Self, 'layout'); + FLegend := TExtComponent.CreateInternal(Self, 'legend'); + FToggleCmp := TExtPanelTool.CreateInternal(Self, 'toggleCmp'); end; -{$IFDEF FPC}constructor TExtPanelHeader.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtFormFieldSet.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtPanelHeader.AddTool(Tool : TExtObject) : TExtFunction; begin - JSCode(JSName + '.addTool(' + VarToJSON([Tool, false]) + ');', 'TExtPanelHeader'); +function TExtFormFieldSet.Collapse : TExtFunction; begin + JSCode(JSName + '.collapse();', 'TExtFormFieldSet'); Result := Self; end; -constructor TExtPanelHeader.Create; begin +constructor TExtFormFieldSet.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -function TExtPanelHeader.GetTools : TExtFunction; begin - JSCode(JSName + '.getTools();', 'TExtPanelHeader'); - Result := Self; -end; - -function TExtPanelHeader.SetGlyph(Glyph : Integer) : TExtFunction; begin - JSCode(JSName + '.setGlyph(' + VarToJSON([Glyph]) + ');', 'TExtPanelHeader'); - Result := Self; -end; - -function TExtPanelHeader.SetIcon(Icon : String) : TExtFunction; begin - JSCode(JSName + '.setIcon(' + VarToJSON([Icon]) + ');', 'TExtPanelHeader'); +function TExtFormFieldSet.Expand : TExtFunction; begin + JSCode(JSName + '.expand();', 'TExtFormFieldSet'); Result := Self; end; -function TExtPanelHeader.SetIconCls(Cls : String) : TExtFunction; begin - JSCode(JSName + '.setIconCls(' + VarToJSON([Cls]) + ');', 'TExtPanelHeader'); +function TExtFormFieldSet.SetTitle(Title : String) : TExtFunction; begin + JSCode(JSName + '.setTitle(' + VarToJSON([Title]) + ');', 'TExtFormFieldSet'); Result := Self; end; -function TExtPanelHeader.SetTitle(Title : String) : TExtFunction; begin - JSCode(JSName + '.setTitle(' + VarToJSON([Title]) + ');', 'TExtPanelHeader'); +function TExtFormFieldSet.Toggle : TExtFunction; begin + JSCode(JSName + '.toggle();', 'TExtFormFieldSet'); Result := Self; end; -procedure TExtPanelHeader.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'click') and Assigned(FOnClick) then - FOnClick(TExtPanelHeader(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))) - else if (AEvtName = 'dblclick') and Assigned(FOnDblclick) then - FOnDblclick(TExtPanelHeader(ParamAsObject('This')), TExtEventObject(ParamAsObject('E'))); -end; - -function TExtLayoutComponentProgressBar.JSClassName : string; begin - Result := 'Ext.layout.component.ProgressBar'; -end; - -{$IFDEF FPC}constructor TExtLayoutComponentProgressBar.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtEditor.SetFAlignment(Value : String); begin - FAlignment := Value; - JSCode('alignment:' + VarToJSON([Value])); -end; - -procedure TExtEditor.SetFAllowBlur(Value : Boolean); begin - FAllowBlur := Value; - JSCode('allowBlur:' + VarToJSON([Value])); -end; - -procedure TExtEditor.SetFAutoSize(Value : Boolean); begin - FAutoSize := Value; - JSCode('autoSize:' + VarToJSON([Value])); -end; - -procedure TExtEditor.SetFAutoSizeObject(Value : TExtObject); begin - FAutoSizeObject := Value; - Value.DeleteFromGarbage; - JSCode('autoSize:' + VarToJSON([Value, false])); +destructor TExtFormFieldSet.Destroy; begin + try + FCheckboxCmp.Free; + FFieldDefaults.Free; + FLayoutObject.Free; + FLegend.Free; + FToggleCmp.Free; + except end; + inherited; end; -procedure TExtEditor.SetFCancelOnEsc(Value : Boolean); begin - FCancelOnEsc := Value; - JSCode('cancelOnEsc:' + VarToJSON([Value])); +procedure TExtFormFieldSet.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'fielderrorchange') and Assigned(FOnFielderrorchange) then + FOnFielderrorchange(TExtFormFieldAncestor(ParamAsObject('This')), TExtFormLabelable(ParamAsObject('The')), ParamAsString('Error')) + else if (AEvtName = 'fieldvaliditychange') and Assigned(FOnFieldvaliditychange) then + FOnFieldvaliditychange(TExtFormFieldAncestor(ParamAsObject('This')), TExtFormLabelable(ParamAsObject('The')), ParamAsString('IsValid')); end; -procedure TExtEditor.SetFCompleteOnEnter(Value : Boolean); begin - FCompleteOnEnter := Value; - JSCode('completeOnEnter:' + VarToJSON([Value])); +function TExtDataJsonPStore.JSClassName : string; begin + Result := 'Ext.data.JsonPStore'; end; -procedure TExtEditor.SetFConstrain(Value : Boolean); begin - FConstrain := Value; - JSCode('constrain:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtDataJsonPStore.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtEditor.SetFField(Value : TExtFormField); begin - FField := Value; - Value.DeleteFromGarbage; - JSCode('field:' + VarToJSON([Value, false])); +function TExtLayoutComponentProgressBar.JSClassName : string; begin + Result := 'Ext.layout.component.ProgressBar'; end; -procedure TExtEditor.SetFHideEl(Value : Boolean); begin - FHideEl := Value; - JSCode('hideEl:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtLayoutComponentProgressBar.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtEditor.SetFIgnoreNoChange(Value : Boolean); begin - FIgnoreNoChange := Value; - JSCode('ignoreNoChange:' + VarToJSON([Value])); +procedure TExtLayoutContainerCard.SetFDeferredRender(Value : Boolean); begin + FDeferredRender := Value; + JSCode('deferredRender:' + VarToJSON([Value])); end; -procedure TExtEditor.SetFOffsets(Value : TArrayOfInteger); begin - FOffsets := Value; - JSCode('offsets:' + ArrayToJSON(Value)); +function TExtLayoutContainerCard.JSClassName : string; begin + Result := 'Ext.layout.container.Card'; end; -procedure TExtEditor.SetFParentEl(Value : String); begin - FParentEl := Value; - JSCode('parentEl:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtLayoutContainerCard.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtEditor.SetFParentElElement(Value : TExtElement); begin - FParentElElement := Value; - Value.DeleteFromGarbage; - JSCode('parentEl:' + VarToJSON([Value, false])); +function TExtLayoutContainerCard.GetActiveItem : TExtFunction; begin + JSCode(JSName + '.getActiveItem();', 'TExtLayoutContainerCard'); + Result := Self; end; -procedure TExtEditor.SetFParentElTHTMLElement(Value : THTMLElement); begin - FParentElTHTMLElement := Value; - Value.DeleteFromGarbage; - JSCode('parentEl:' + VarToJSON([Value, false])); +function TExtLayoutContainerCard.GetNext : TExtFunction; begin + JSCode(JSName + '.getNext();', 'TExtLayoutContainerCard'); + Result := Self; end; -procedure TExtEditor.SetFRevertInvalid(Value : Boolean); begin - FRevertInvalid := Value; - JSCode('revertInvalid:' + VarToJSON([Value])); +function TExtLayoutContainerCard.GetPrev : TExtFunction; begin + JSCode(JSName + '.getPrev();', 'TExtLayoutContainerCard'); + Result := Self; end; -procedure TExtEditor.SetFShadow(Value : Boolean); begin - FShadow := Value; - JSCode('shadow:' + VarToJSON([Value])); +function TExtLayoutContainerCard.Next : TExtFunction; begin + JSCode(JSName + '.next();', 'TExtLayoutContainerCard'); + Result := Self; end; -procedure TExtEditor.SetFShadowString(Value : String); begin - FShadowString := Value; - JSCode('shadow:' + VarToJSON([Value])); +function TExtLayoutContainerCard.Prev : TExtFunction; begin + JSCode(JSName + '.prev();', 'TExtLayoutContainerCard'); + Result := Self; end; -procedure TExtEditor.SetFSwallowKeys(Value : Boolean); begin - FSwallowKeys := Value; - JSCode('swallowKeys:' + VarToJSON([Value])); +function TExtLayoutContainerCard.SetActiveItem(NewCard : Integer) : TExtFunction; begin + JSCode(JSName + '.setActiveItem(' + VarToJSON([NewCard]) + ');', 'TExtLayoutContainerCard'); + Result := Self; end; -procedure TExtEditor.SetFUpdateEl(Value : Boolean); begin - FUpdateEl := Value; - JSCode('updateEl:' + VarToJSON([Value])); +function TExtLayoutContainerColumn.JSClassName : string; begin + Result := 'Ext.layout.container.Column'; end; -procedure TExtEditor.SetFValue(Value : TExtObject); begin - FValue := Value; - Value.DeleteFromGarbage; - if not ConfigAvailable(JSName) then - SetValue(Value) - else - JSCode('value:' + VarToJSON([Value, false])); -end; +{$IFDEF FPC}constructor TExtLayoutContainerColumn.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtEditor.SetFOnBeforecomplete(Value : TExtEditorOnBeforecomplete); begin - if Assigned(FOnBeforecomplete) then - JSCode(JSName+'.events ["beforecomplete"].listeners=[];'); - if Assigned(Value) then - AddListener('beforecomplete', Ajax('beforecomplete', ['This', '%0.nm','Value', '%1.nm','StartValue', '%2.nm'], true)); - FOnBeforecomplete := Value; +procedure TExtDdDragSource.SetFAnimRepair(Value : Boolean); begin + FAnimRepair := Value; + JSCode('animRepair:' + VarToJSON([Value])); end; -procedure TExtEditor.SetFOnBeforestartedit(Value : TExtEditorOnBeforestartedit); begin - if Assigned(FOnBeforestartedit) then - JSCode(JSName+'.events ["beforestartedit"].listeners=[];'); - if Assigned(Value) then - AddListener('beforestartedit', Ajax('beforestartedit', ['This', '%0.nm','BoundEl', '%1.nm','Value', '%2.nm'], true)); - FOnBeforestartedit := Value; +procedure TExtDdDragSource.SetFDdGroup(Value : String); begin + FDdGroup := Value; + JSCode('ddGroup:' + VarToJSON([Value])); end; -procedure TExtEditor.SetFOnCanceledit(Value : TExtEditorOnCanceledit); begin - if Assigned(FOnCanceledit) then - JSCode(JSName+'.events ["canceledit"].listeners=[];'); - if Assigned(Value) then - AddListener('canceledit', Ajax('canceledit', ['This', '%0.nm','Value', '%1.nm','StartValue', '%2.nm'], true)); - FOnCanceledit := Value; +procedure TExtDdDragSource.SetFDropAllowed(Value : String); begin + FDropAllowed := Value; + JSCode('dropAllowed:' + VarToJSON([Value])); end; -procedure TExtEditor.SetFOnComplete(Value : TExtEditorOnComplete); begin - if Assigned(FOnComplete) then - JSCode(JSName+'.events ["complete"].listeners=[];'); - if Assigned(Value) then - AddListener('complete', Ajax('complete', ['This', '%0.nm','Value', '%1.nm','StartValue', '%2.nm'], true)); - FOnComplete := Value; +procedure TExtDdDragSource.SetFDropNotAllowed(Value : String); begin + FDropNotAllowed := Value; + JSCode('dropNotAllowed:' + VarToJSON([Value])); end; -procedure TExtEditor.SetFOnSpecialkey(Value : TExtEditorOnSpecialkey); begin - if Assigned(FOnSpecialkey) then - JSCode(JSName+'.events ["specialkey"].listeners=[];'); - if Assigned(Value) then - AddListener('specialkey', Ajax('specialkey', ['This', '%0.nm','Field', '%1.nm','Event', '%2.nm'], true)); - FOnSpecialkey := Value; +procedure TExtDdDragSource.SetFRepairHighlightColor(Value : String); begin + FRepairHighlightColor := Value; + JSCode('repairHighlightColor:' + VarToJSON([Value])); end; -procedure TExtEditor.SetFOnStartedit(Value : TExtEditorOnStartedit); begin - if Assigned(FOnStartedit) then - JSCode(JSName+'.events ["startedit"].listeners=[];'); - if Assigned(Value) then - AddListener('startedit', Ajax('startedit', ['This', '%0.nm','BoundEl', '%1.nm','Value', '%2.nm'], true)); - FOnStartedit := Value; +function TExtDdDragSource.JSClassName : string; begin + Result := 'Ext.dd.DragSource'; end; -function TExtEditor.JSClassName : string; begin - Result := 'Ext.Editor'; -end; +{$IFDEF FPC}constructor TExtDdDragSource.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtEditor.InitDefaults; begin - inherited; - FAutoSizeObject := TExtObject.CreateInternal(Self, 'autoSize'); - FField := TExtFormField.CreateInternal(Self, 'field'); - FParentElElement := TExtElement.CreateInternal(Self, 'parentEl'); - FValue := TExtObject.CreateInternal(Self, 'value'); +constructor TExtDdDragSource.Create(El : String; Config : TExtObject = nil); begin + CreateVar(JSClassName + '(' + VarToJSON([El, Config, false]) + ');'); + InitDefaults; end; -{$IFDEF FPC}constructor TExtEditor.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtDdDragSource.GetDragData : TExtFunction; begin + JSCode(JSName + '.getDragData();', 'TExtDdDragSource'); + Result := Self; +end; -function TExtEditor.CancelEdit(RemainVisible : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.cancelEdit(' + VarToJSON([RemainVisible]) + ');', 'TExtEditor'); +function TExtDdDragSource.GetProxy : TExtFunction; begin + JSCode(JSName + '.getProxy();', 'TExtDdDragSource'); Result := Self; end; -function TExtEditor.CompleteEdit(RemainVisible : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.completeEdit(' + VarToJSON([RemainVisible]) + ');', 'TExtEditor'); +function TExtDdDragSource.HideProxy : TExtFunction; begin + JSCode(JSName + '.hideProxy();', 'TExtDdDragSource'); Result := Self; end; -constructor TExtEditor.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +function TExtViewDropZone.JSClassName : string; begin + Result := 'Ext.view.DropZone'; end; -function TExtEditor.GetValue : TExtFunction; begin - JSCode(JSName + '.getValue();', 'TExtEditor'); - Result := Self; +{$IFDEF FPC}constructor TExtViewDropZone.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +procedure TExtFormCheckboxGroup.SetFAllowBlank(Value : Boolean); begin + FAllowBlank := Value; + JSCode('allowBlank:' + VarToJSON([Value])); end; -function TExtEditor.Realign(AutoSize : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.realign(' + VarToJSON([AutoSize]) + ');', 'TExtEditor'); - Result := Self; +procedure TExtFormCheckboxGroup.SetFBlankText(Value : String); begin + FBlankText := Value; + JSCode('blankText:' + VarToJSON([Value])); end; -function TExtEditor.SetValue(Value : TExtObject) : TExtFunction; begin - JSCode(JSName + '.setValue(' + VarToJSON([Value, false]) + ');', 'TExtEditor'); - Result := Self; +procedure TExtFormCheckboxGroup.SetFColumns(Value : Integer); begin + FColumns := Value; + JSCode('columns:' + VarToJSON([Value])); end; -function TExtEditor.StartEdit(El : String; Value : String = '') : TExtFunction; begin - JSCode(JSName + '.startEdit(' + VarToJSON([El, Value]) + ');', 'TExtEditor'); - Result := Self; +procedure TExtFormCheckboxGroup.SetFColumnsString(Value : String); begin + FColumnsString := Value; + JSCode('columns:' + VarToJSON([Value])); end; -destructor TExtEditor.Destroy; begin - try - FAutoSizeObject.Free; - FField.Free; - FParentElElement.Free; - FValue.Free; - except end; - inherited; +procedure TExtFormCheckboxGroup.SetFColumnsTArrayOfInteger(Value : TArrayOfInteger); begin + FColumnsTArrayOfInteger := Value; + JSCode('columns:' + ArrayToJSON(Value)); end; -procedure TExtEditor.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'beforecomplete') and Assigned(FOnBeforecomplete) then - FOnBeforecomplete(TExtEditor(ParamAsObject('This')), TExtObject(ParamAsObject('Value')), TExtObject(ParamAsObject('StartValue'))) - else if (AEvtName = 'beforestartedit') and Assigned(FOnBeforestartedit) then - FOnBeforestartedit(TExtEditor(ParamAsObject('This')), TExtElement(ParamAsObject('BoundEl')), TExtObject(ParamAsObject('Value'))) - else if (AEvtName = 'canceledit') and Assigned(FOnCanceledit) then - FOnCanceledit(TExtEditor(ParamAsObject('This')), TExtObject(ParamAsObject('Value')), TExtObject(ParamAsObject('StartValue'))) - else if (AEvtName = 'complete') and Assigned(FOnComplete) then - FOnComplete(TExtEditor(ParamAsObject('This')), TExtObject(ParamAsObject('Value')), TExtObject(ParamAsObject('StartValue'))) - else if (AEvtName = 'specialkey') and Assigned(FOnSpecialkey) then - FOnSpecialkey(TExtEditor(ParamAsObject('This')), TExtFormField(ParamAsObject('Field')), TExtEventObject(ParamAsObject('Event'))) - else if (AEvtName = 'startedit') and Assigned(FOnStartedit) then - FOnStartedit(TExtEditor(ParamAsObject('This')), TExtElement(ParamAsObject('BoundEl')), TExtObject(ParamAsObject('Value'))); +procedure TExtFormCheckboxGroup.SetFDisabled(Value : Boolean); begin + FDisabled := Value; + JSCode('disabled:' + VarToJSON([Value])); end; -procedure TExtFormFieldContainer.SetFActiveError(Value : String); begin - FActiveError := Value; - if not ConfigAvailable(JSName) then - SetActiveError(Value) - else - JSCode('activeError:' + VarToJSON([Value])); +procedure TExtFormCheckboxGroup.SetFFieldBodyCls(Value : String); begin + FFieldBodyCls := Value; + JSCode('fieldBodyCls:' + VarToJSON([Value])); end; -procedure TExtFormFieldContainer.SetFActiveErrorsTpl(Value : String); begin - FActiveErrorsTpl := Value; - JSCode('activeErrorsTpl:' + VarToJSON([Value])); +procedure TExtFormCheckboxGroup.SetFIsFormField(Value : Boolean); begin + FIsFormField := Value; + JSCode(JSName + '.isFormField=' + VarToJSON([Value]) + ';'); end; -procedure TExtFormFieldContainer.SetFActiveErrorsTplList(Value : TExtObjectList); begin - FActiveErrorsTplList := Value; +procedure TExtFormCheckboxGroup.SetFItems(Value : TExtObjectList); begin + FItems := Value; Value.DeleteFromGarbage; - JSCode('activeErrorsTpl:' + VarToJSON([Value, false])); + JSCode('items:' + VarToJSON([Value, false])); end; -procedure TExtFormFieldContainer.SetFActiveErrorsTplTemplate(Value : TExtXTemplate); begin - FActiveErrorsTplTemplate := Value; +procedure TExtFormCheckboxGroup.SetFItemsList(Value : TExtObjectList); begin + FItemsList := Value; Value.DeleteFromGarbage; - JSCode('activeErrorsTpl:' + VarToJSON([Value, false])); + JSCode('items:' + VarToJSON([Value, false])); end; -procedure TExtFormFieldContainer.SetFAfterBodyEl(Value : String); begin - FAfterBodyEl := Value; - JSCode('afterBodyEl:' + VarToJSON([Value])); +procedure TExtFormCheckboxGroup.SetFName(Value : String); begin + FName := Value; + JSCode('name:' + VarToJSON([Value])); end; -procedure TExtFormFieldContainer.SetFAfterBodyElList(Value : TExtObjectList); begin - FAfterBodyElList := Value; +procedure TExtFormCheckboxGroup.SetFOriginalValue(Value : TExtObject); begin + FOriginalValue := Value; Value.DeleteFromGarbage; - JSCode('afterBodyEl:' + VarToJSON([Value, false])); + JSCode(JSName + '.originalValue=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtFormFieldContainer.SetFAfterBodyElTemplate(Value : TExtXTemplate); begin - FAfterBodyElTemplate := Value; - Value.DeleteFromGarbage; - JSCode('afterBodyEl:' + VarToJSON([Value, false])); +procedure TExtFormCheckboxGroup.SetFSubmitValue(Value : Boolean); begin + FSubmitValue := Value; + JSCode('submitValue:' + VarToJSON([Value])); end; -procedure TExtFormFieldContainer.SetFAfterLabelTextTpl(Value : String); begin - FAfterLabelTextTpl := Value; - JSCode('afterLabelTextTpl:' + VarToJSON([Value])); +procedure TExtFormCheckboxGroup.SetFValidateOnChange(Value : Boolean); begin + FValidateOnChange := Value; + JSCode('validateOnChange:' + VarToJSON([Value])); end; -procedure TExtFormFieldContainer.SetFAfterLabelTextTplList(Value : TExtObjectList); begin - FAfterLabelTextTplList := Value; +procedure TExtFormCheckboxGroup.SetFValue(Value : TExtObject); begin + FValue := Value; Value.DeleteFromGarbage; - JSCode('afterLabelTextTpl:' + VarToJSON([Value, false])); + if not ConfigAvailable(JSName) then + SetValue(Value) + else + JSCode('value:' + VarToJSON([Value, false])); end; -procedure TExtFormFieldContainer.SetFAfterLabelTextTplTemplate(Value : TExtXTemplate); begin - FAfterLabelTextTplTemplate := Value; - Value.DeleteFromGarbage; - JSCode('afterLabelTextTpl:' + VarToJSON([Value, false])); +procedure TExtFormCheckboxGroup.SetFVertical(Value : Boolean); begin + FVertical := Value; + JSCode('vertical:' + VarToJSON([Value])); end; -procedure TExtFormFieldContainer.SetFAfterLabelTpl(Value : String); begin - FAfterLabelTpl := Value; - JSCode('afterLabelTpl:' + VarToJSON([Value])); +function TExtFormCheckboxGroup.JSClassName : string; begin + Result := 'Ext.form.CheckboxGroup'; end; -procedure TExtFormFieldContainer.SetFAfterLabelTplList(Value : TExtObjectList); begin - FAfterLabelTplList := Value; - Value.DeleteFromGarbage; - JSCode('afterLabelTpl:' + VarToJSON([Value, false])); +procedure TExtFormCheckboxGroup.InitDefaults; begin + inherited; + FItems := TExtObjectList.Create(Self, 'items'); + FItemsList := TExtObjectList.Create(Self, 'items'); + FOriginalValue := TExtObject.CreateInternal(Self, 'originalValue'); + FValue := TExtObject.CreateInternal(Self, 'value'); end; -procedure TExtFormFieldContainer.SetFAfterLabelTplTemplate(Value : TExtXTemplate); begin - FAfterLabelTplTemplate := Value; - Value.DeleteFromGarbage; - JSCode('afterLabelTpl:' + VarToJSON([Value, false])); -end; +{$IFDEF FPC}constructor TExtFormCheckboxGroup.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtFormFieldContainer.SetFAfterSubTpl(Value : String); begin - FAfterSubTpl := Value; - JSCode('afterSubTpl:' + VarToJSON([Value])); +function TExtFormCheckboxGroup.BatchChanges(Fn : TExtObject) : TExtFunction; begin + JSCode(JSName + '.batchChanges(' + VarToJSON([Fn, false]) + ');', 'TExtFormCheckboxGroup'); + Result := Self; end; -procedure TExtFormFieldContainer.SetFAfterSubTplList(Value : TExtObjectList); begin - FAfterSubTplList := Value; - Value.DeleteFromGarbage; - JSCode('afterSubTpl:' + VarToJSON([Value, false])); +function TExtFormCheckboxGroup.CheckChange : TExtFunction; begin + JSCode(JSName + '.checkChange();', 'TExtFormCheckboxGroup'); + Result := Self; end; -procedure TExtFormFieldContainer.SetFAfterSubTplTemplate(Value : TExtXTemplate); begin - FAfterSubTplTemplate := Value; - Value.DeleteFromGarbage; - JSCode('afterSubTpl:' + VarToJSON([Value, false])); +function TExtFormCheckboxGroup.CheckDirty : TExtFunction; begin + JSCode(JSName + '.checkDirty();', 'TExtFormCheckboxGroup'); + Result := Self; end; -procedure TExtFormFieldContainer.SetFAutoFitErrors(Value : Boolean); begin - FAutoFitErrors := Value; - JSCode('autoFitErrors:' + VarToJSON([Value])); +constructor TExtFormCheckboxGroup.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtFormFieldContainer.SetFBaseBodyCls(Value : String); begin - FBaseBodyCls := Value; - JSCode('baseBodyCls:' + VarToJSON([Value])); +function TExtFormCheckboxGroup.ExtractFileInput : TExtFunction; begin + JSCode(JSName + '.extractFileInput();', 'TExtFormCheckboxGroup'); + Result := Self; end; -procedure TExtFormFieldContainer.SetFBeforeBodyEl(Value : String); begin - FBeforeBodyEl := Value; - JSCode('beforeBodyEl:' + VarToJSON([Value])); +function TExtFormCheckboxGroup.GetChecked : TExtFunction; begin + JSCode(JSName + '.getChecked();', 'TExtFormCheckboxGroup'); + Result := Self; end; -procedure TExtFormFieldContainer.SetFBeforeBodyElList(Value : TExtObjectList); begin - FBeforeBodyElList := Value; - Value.DeleteFromGarbage; - JSCode('beforeBodyEl:' + VarToJSON([Value, false])); +function TExtFormCheckboxGroup.GetErrors : TExtFunction; begin + JSCode(JSName + '.getErrors();', 'TExtFormCheckboxGroup'); + Result := Self; end; -procedure TExtFormFieldContainer.SetFBeforeBodyElTemplate(Value : TExtXTemplate); begin - FBeforeBodyElTemplate := Value; - Value.DeleteFromGarbage; - JSCode('beforeBodyEl:' + VarToJSON([Value, false])); +function TExtFormCheckboxGroup.GetModelData : TExtFunction; begin + JSCode(JSName + '.getModelData();', 'TExtFormCheckboxGroup'); + Result := Self; end; -procedure TExtFormFieldContainer.SetFBeforeLabelTextTpl(Value : String); begin - FBeforeLabelTextTpl := Value; - JSCode('beforeLabelTextTpl:' + VarToJSON([Value])); +function TExtFormCheckboxGroup.GetName : TExtFunction; begin + JSCode(JSName + '.getName();', 'TExtFormCheckboxGroup'); + Result := Self; end; -procedure TExtFormFieldContainer.SetFBeforeLabelTextTplList(Value : TExtObjectList); begin - FBeforeLabelTextTplList := Value; - Value.DeleteFromGarbage; - JSCode('beforeLabelTextTpl:' + VarToJSON([Value, false])); +function TExtFormCheckboxGroup.GetSubmitData : TExtFunction; begin + JSCode(JSName + '.getSubmitData();', 'TExtFormCheckboxGroup'); + Result := Self; end; -procedure TExtFormFieldContainer.SetFBeforeLabelTextTplTemplate(Value : TExtXTemplate); begin - FBeforeLabelTextTplTemplate := Value; - Value.DeleteFromGarbage; - JSCode('beforeLabelTextTpl:' + VarToJSON([Value, false])); +function TExtFormCheckboxGroup.GetValue : TExtFunction; begin + JSCode(JSName + '.getValue();', 'TExtFormCheckboxGroup'); + Result := Self; end; -procedure TExtFormFieldContainer.SetFBeforeLabelTpl(Value : String); begin - FBeforeLabelTpl := Value; - JSCode('beforeLabelTpl:' + VarToJSON([Value])); +function TExtFormCheckboxGroup.IsDirty : TExtFunction; begin + JSCode(JSName + '.isDirty();', 'TExtFormCheckboxGroup'); + Result := Self; end; -procedure TExtFormFieldContainer.SetFBeforeLabelTplList(Value : TExtObjectList); begin - FBeforeLabelTplList := Value; - Value.DeleteFromGarbage; - JSCode('beforeLabelTpl:' + VarToJSON([Value, false])); +function TExtFormCheckboxGroup.IsEqual(Value1 : TExtObject; Value2 : TExtObject) : TExtFunction; begin + JSCode(JSName + '.isEqual(' + VarToJSON([Value1, false, Value2, false]) + ');', 'TExtFormCheckboxGroup'); + Result := Self; end; -procedure TExtFormFieldContainer.SetFBeforeLabelTplTemplate(Value : TExtXTemplate); begin - FBeforeLabelTplTemplate := Value; - Value.DeleteFromGarbage; - JSCode('beforeLabelTpl:' + VarToJSON([Value, false])); +function TExtFormCheckboxGroup.IsFileUpload : TExtFunction; begin + JSCode(JSName + '.isFileUpload();', 'TExtFormCheckboxGroup'); + Result := Self; end; -procedure TExtFormFieldContainer.SetFBeforeSubTpl(Value : String); begin - FBeforeSubTpl := Value; - JSCode('beforeSubTpl:' + VarToJSON([Value])); +function TExtFormCheckboxGroup.IsValid : TExtFunction; begin + JSCode(JSName + '.isValid();', 'TExtFormCheckboxGroup'); + Result := Self; end; -procedure TExtFormFieldContainer.SetFBeforeSubTplList(Value : TExtObjectList); begin - FBeforeSubTplList := Value; - Value.DeleteFromGarbage; - JSCode('beforeSubTpl:' + VarToJSON([Value, false])); +function TExtFormCheckboxGroup.Reset : TExtFunction; begin + JSCode(JSName + '.reset();', 'TExtFormCheckboxGroup'); + Result := Self; end; -procedure TExtFormFieldContainer.SetFBeforeSubTplTemplate(Value : TExtXTemplate); begin - FBeforeSubTplTemplate := Value; - Value.DeleteFromGarbage; - JSCode('beforeSubTpl:' + VarToJSON([Value, false])); +function TExtFormCheckboxGroup.ResetOriginalValue : TExtFunction; begin + JSCode(JSName + '.resetOriginalValue();', 'TExtFormCheckboxGroup'); + Result := Self; end; -procedure TExtFormFieldContainer.SetFClearCls(Value : String); begin - FClearCls := Value; - JSCode('clearCls:' + VarToJSON([Value])); +function TExtFormCheckboxGroup.SetValue(Value : TExtObject) : TExtFunction; begin + JSCode(JSName + '.setValue(' + VarToJSON([Value, false]) + ');', 'TExtFormCheckboxGroup'); + Result := Self; end; -procedure TExtFormFieldContainer.SetFCombineErrors(Value : Boolean); begin - FCombineErrors := Value; - JSCode('combineErrors:' + VarToJSON([Value])); +function TExtFormCheckboxGroup.Validate : TExtFunction; begin + JSCode(JSName + '.validate();', 'TExtFormCheckboxGroup'); + Result := Self; end; -procedure TExtFormFieldContainer.SetFCombineLabels(Value : Boolean); begin - FCombineLabels := Value; - JSCode('combineLabels:' + VarToJSON([Value])); +destructor TExtFormCheckboxGroup.Destroy; begin + try + FItems.Free; + FItemsList.Free; + FOriginalValue.Free; + FValue.Free; + except end; + inherited; end; -procedure TExtFormFieldContainer.SetFErrorMsgCls(Value : String); begin - FErrorMsgCls := Value; - JSCode('errorMsgCls:' + VarToJSON([Value])); +procedure TExtGridColumn.SetFAlign(Value : String); begin + FAlign := Value; + JSCode('align:' + VarToJSON([Value])); end; -procedure TExtFormFieldContainer.SetFFieldBodyCls(Value : String); begin - FFieldBodyCls := Value; - JSCode('fieldBodyCls:' + VarToJSON([Value])); +procedure TExtGridColumn.SetFColumns(Value : TExtObjectList); begin + FColumns := Value; + Value.DeleteFromGarbage; + JSCode('columns:' + VarToJSON([Value, false])); end; -procedure TExtFormFieldContainer.SetFFieldDefaults(Value : TExtObject); begin - FFieldDefaults := Value; - Value.DeleteFromGarbage; - if not ConfigAvailable(JSName) then - SetFieldDefaults(Value) - else - JSCode('fieldDefaults:' + VarToJSON([Value, false])); +procedure TExtGridColumn.SetFDataIndex(Value : String); begin + FDataIndex := Value; + JSCode('dataIndex:' + VarToJSON([Value])); end; -procedure TExtFormFieldContainer.SetFFieldLabel(Value : String); begin - FFieldLabel := Value; - if not ConfigAvailable(JSName) then - SetFieldLabel(Value) - else - JSCode('fieldLabel:' + VarToJSON([Value])); +procedure TExtGridColumn.SetFDraggable(Value : Boolean); begin + FDraggable := Value; + JSCode('draggable:' + VarToJSON([Value])); end; -procedure TExtFormFieldContainer.SetFFormItemCls(Value : String); begin - FFormItemCls := Value; - JSCode('formItemCls:' + VarToJSON([Value])); +procedure TExtGridColumn.SetFEditor(Value : TExtObject); begin + FEditor := Value; + Value.DeleteFromGarbage; + JSCode('editor:' + VarToJSON([Value, false])); end; -procedure TExtFormFieldContainer.SetFHideEmptyLabel(Value : Boolean); begin - FHideEmptyLabel := Value; - JSCode('hideEmptyLabel:' + VarToJSON([Value])); +procedure TExtGridColumn.SetFEditorString(Value : String); begin + FEditorString := Value; + JSCode('editor:' + VarToJSON([Value])); end; -procedure TExtFormFieldContainer.SetFHideLabel(Value : Boolean); begin - FHideLabel := Value; - JSCode('hideLabel:' + VarToJSON([Value])); +procedure TExtGridColumn.SetFEditRenderer(Value : TExtFunction); begin + FEditRenderer := Value; + JSCode('editRenderer:' + VarToJSON([Value, true])); end; -procedure TExtFormFieldContainer.SetFInvalidCls(Value : String); begin - FInvalidCls := Value; - JSCode('invalidCls:' + VarToJSON([Value])); +procedure TExtGridColumn.SetFEmptyCellText(Value : String); begin + FEmptyCellText := Value; + JSCode('emptyCellText:' + VarToJSON([Value])); end; -procedure TExtFormFieldContainer.SetFLabelableRenderTpl(Value : String); begin - FLabelableRenderTpl := Value; - JSCode('labelableRenderTpl:' + VarToJSON([Value])); +procedure TExtGridColumn.SetFGroupable(Value : Boolean); begin + FGroupable := Value; + JSCode('groupable:' + VarToJSON([Value])); end; -procedure TExtFormFieldContainer.SetFLabelableRenderTplList(Value : TExtObjectList); begin - FLabelableRenderTplList := Value; - Value.DeleteFromGarbage; - JSCode('labelableRenderTpl:' + VarToJSON([Value, false])); +procedure TExtGridColumn.SetFHideable(Value : Boolean); begin + FHideable := Value; + JSCode('hideable:' + VarToJSON([Value])); end; -procedure TExtFormFieldContainer.SetFLabelableRenderTplTemplate(Value : TExtXTemplate); begin - FLabelableRenderTplTemplate := Value; - Value.DeleteFromGarbage; - JSCode('labelableRenderTpl:' + VarToJSON([Value, false])); +procedure TExtGridColumn.SetFIsHeader(Value : Boolean); begin + FIsHeader := Value; + JSCode(JSName + '.isHeader=' + VarToJSON([Value]) + ';'); end; -procedure TExtFormFieldContainer.SetFLabelAlign(Value : String); begin - FLabelAlign := Value; - JSCode('labelAlign:' + VarToJSON([Value])); +procedure TExtGridColumn.SetFLockable(Value : Boolean); begin + FLockable := Value; + JSCode('lockable:' + VarToJSON([Value])); end; -procedure TExtFormFieldContainer.SetFLabelAttrTpl(Value : String); begin - FLabelAttrTpl := Value; - JSCode('labelAttrTpl:' + VarToJSON([Value])); +procedure TExtGridColumn.SetFLocked(Value : Boolean); begin + FLocked := Value; + JSCode('locked:' + VarToJSON([Value])); end; -procedure TExtFormFieldContainer.SetFLabelAttrTplList(Value : TExtObjectList); begin - FLabelAttrTplList := Value; - Value.DeleteFromGarbage; - JSCode('labelAttrTpl:' + VarToJSON([Value, false])); +procedure TExtGridColumn.SetFMenuDisabled(Value : Boolean); begin + FMenuDisabled := Value; + JSCode('menuDisabled:' + VarToJSON([Value])); end; -procedure TExtFormFieldContainer.SetFLabelAttrTplTemplate(Value : TExtXTemplate); begin - FLabelAttrTplTemplate := Value; - Value.DeleteFromGarbage; - JSCode('labelAttrTpl:' + VarToJSON([Value, false])); +procedure TExtGridColumn.SetFMenuText(Value : String); begin + FMenuText := Value; + JSCode('menuText:' + VarToJSON([Value])); end; -procedure TExtFormFieldContainer.SetFLabelCls(Value : String); begin - FLabelCls := Value; - JSCode('labelCls:' + VarToJSON([Value])); +procedure TExtGridColumn.SetFRenderer(Value : TExtFunction); begin + FRenderer := Value; + JSCode('renderer:' + VarToJSON([Value, true])); end; -procedure TExtFormFieldContainer.SetFLabelClsExtra(Value : String); begin - FLabelClsExtra := Value; - JSCode('labelClsExtra:' + VarToJSON([Value])); +procedure TExtGridColumn.SetFRendererString(Value : String); begin + FRendererString := Value; + JSCode('renderer:' + VarToJSON([Value])); end; -procedure TExtFormFieldContainer.SetFLabelConnector(Value : String); begin - FLabelConnector := Value; - JSCode('labelConnector:' + VarToJSON([Value])); +procedure TExtGridColumn.SetFResizable(Value : Boolean); begin + FResizable := Value; + JSCode('resizable:' + VarToJSON([Value])); end; -procedure TExtFormFieldContainer.SetFLabelPad(Value : Integer); begin - FLabelPad := Value; - JSCode('labelPad:' + VarToJSON([Value])); +procedure TExtGridColumn.SetFScope(Value : TExtObject); begin + FScope := Value; + Value.DeleteFromGarbage; + JSCode('scope:' + VarToJSON([Value, false])); end; -procedure TExtFormFieldContainer.SetFLabelSeparator(Value : String); begin - FLabelSeparator := Value; - JSCode('labelSeparator:' + VarToJSON([Value])); +procedure TExtGridColumn.SetFSortable(Value : Boolean); begin + FSortable := Value; + JSCode('sortable:' + VarToJSON([Value])); end; -procedure TExtFormFieldContainer.SetFLabelStyle(Value : String); begin - FLabelStyle := Value; - JSCode('labelStyle:' + VarToJSON([Value])); +procedure TExtGridColumn.SetFStateId(Value : String); begin + FStateId := Value; + JSCode('stateId:' + VarToJSON([Value])); end; -procedure TExtFormFieldContainer.SetFLabelWidth(Value : Integer); begin - FLabelWidth := Value; - JSCode('labelWidth:' + VarToJSON([Value])); +procedure TExtGridColumn.SetFTdCls(Value : String); begin + FTdCls := Value; + JSCode('tdCls:' + VarToJSON([Value])); end; -procedure TExtFormFieldContainer.SetFMsgTarget(Value : String); begin - FMsgTarget := Value; - JSCode('msgTarget:' + VarToJSON([Value])); +procedure TExtGridColumn.SetFText(Value : String); begin + FText := Value; + if not ConfigAvailable(JSName) then + SetText(Value) + else + JSCode('text:' + VarToJSON([Value])); end; -procedure TExtFormFieldContainer.SetFPreventMark(Value : Boolean); begin - FPreventMark := Value; - JSCode('preventMark:' + VarToJSON([Value])); +procedure TExtGridColumn.SetFTextEl(Value : TExtElement); begin + FTextEl := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.textEl=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtFormFieldContainer.SetFOnErrorchange(Value : TExtFormFieldContainerOnErrorchange); begin - if Assigned(FOnErrorchange) then - JSCode(JSName+'.events ["errorchange"].listeners=[];'); - if Assigned(Value) then - AddListener('errorchange', Ajax('errorchange', ['This', '%0.nm','Error', '%1'], true)); - FOnErrorchange := Value; +procedure TExtGridColumn.SetFTooltip(Value : String); begin + FTooltip := Value; + JSCode('tooltip:' + VarToJSON([Value])); end; -procedure TExtFormFieldContainer.SetFOnFielderrorchange(Value : TExtFormFieldContainerOnFielderrorchange); begin - if Assigned(FOnFielderrorchange) then - JSCode(JSName+'.events ["fielderrorchange"].listeners=[];'); - if Assigned(Value) then - AddListener('fielderrorchange', Ajax('fielderrorchange', ['This', '%0.nm','The', '%1.nm','Error', '%2'], true)); - FOnFielderrorchange := Value; +procedure TExtGridColumn.SetFTooltipType(Value : String); begin + FTooltipType := Value; + JSCode('tooltipType:' + VarToJSON([Value])); end; -procedure TExtFormFieldContainer.SetFOnFieldvaliditychange(Value : TExtFormFieldContainerOnFieldvaliditychange); begin - if Assigned(FOnFieldvaliditychange) then - JSCode(JSName+'.events ["fieldvaliditychange"].listeners=[];'); - if Assigned(Value) then - AddListener('fieldvaliditychange', Ajax('fieldvaliditychange', ['This', '%0.nm','The', '%1.nm','IsValid', '%2'], true)); - FOnFieldvaliditychange := Value; +procedure TExtGridColumn.SetFTriggerEl(Value : TExtElement); begin + FTriggerEl := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.triggerEl=' + VarToJSON([Value, false]) + ';'); end; -function TExtFormFieldContainer.JSClassName : string; begin - Result := 'Ext.form.FieldContainer'; +function TExtGridColumn.JSClassName : string; begin + Result := 'Ext.grid.column.Column'; end; -procedure TExtFormFieldContainer.InitDefaults; begin +procedure TExtGridColumn.InitDefaults; begin inherited; - FActiveErrorsTplList := TExtObjectList.Create(Self, 'activeErrorsTpl'); - FActiveErrorsTplTemplate := TExtXTemplate.CreateInternal(Self, 'activeErrorsTpl'); - FAfterBodyElList := TExtObjectList.Create(Self, 'afterBodyEl'); - FAfterBodyElTemplate := TExtXTemplate.CreateInternal(Self, 'afterBodyEl'); - FAfterLabelTextTplList := TExtObjectList.Create(Self, 'afterLabelTextTpl'); - FAfterLabelTextTplTemplate := TExtXTemplate.CreateInternal(Self, 'afterLabelTextTpl'); - FAfterLabelTplList := TExtObjectList.Create(Self, 'afterLabelTpl'); - FAfterLabelTplTemplate := TExtXTemplate.CreateInternal(Self, 'afterLabelTpl'); - FAfterSubTplList := TExtObjectList.Create(Self, 'afterSubTpl'); - FAfterSubTplTemplate := TExtXTemplate.CreateInternal(Self, 'afterSubTpl'); - FBeforeBodyElList := TExtObjectList.Create(Self, 'beforeBodyEl'); - FBeforeBodyElTemplate := TExtXTemplate.CreateInternal(Self, 'beforeBodyEl'); - FBeforeLabelTextTplList := TExtObjectList.Create(Self, 'beforeLabelTextTpl'); - FBeforeLabelTextTplTemplate := TExtXTemplate.CreateInternal(Self, 'beforeLabelTextTpl'); - FBeforeLabelTplList := TExtObjectList.Create(Self, 'beforeLabelTpl'); - FBeforeLabelTplTemplate := TExtXTemplate.CreateInternal(Self, 'beforeLabelTpl'); - FBeforeSubTplList := TExtObjectList.Create(Self, 'beforeSubTpl'); - FBeforeSubTplTemplate := TExtXTemplate.CreateInternal(Self, 'beforeSubTpl'); - FFieldDefaults := TExtObject.CreateInternal(Self, 'fieldDefaults'); - FLabelableRenderTplList := TExtObjectList.Create(Self, 'labelableRenderTpl'); - FLabelableRenderTplTemplate := TExtXTemplate.CreateInternal(Self, 'labelableRenderTpl'); - FLabelAttrTplList := TExtObjectList.Create(Self, 'labelAttrTpl'); - FLabelAttrTplTemplate := TExtXTemplate.CreateInternal(Self, 'labelAttrTpl'); - FLabelConnector := ','; + FColumns := TExtObjectList.Create(Self, 'columns'); + FEditor := TExtObject.CreateInternal(Self, 'editor'); + FScope := TExtObject.CreateInternal(Self, 'scope'); + FTextEl := TExtElement.CreateInternal(Self, 'textEl'); + FTriggerEl := TExtElement.CreateInternal(Self, 'triggerEl'); end; -{$IFDEF FPC}constructor TExtFormFieldContainer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtGridColumn.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtFormFieldContainer.Create; begin +function TExtGridColumn.AutoSize(The : Integer) : TExtFunction; begin + JSCode(JSName + '.autoSize(' + VarToJSON([The]) + ');', 'TExtGridColumn'); + Result := Self; +end; + +constructor TExtGridColumn.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -function TExtFormFieldContainer.GetActiveError : TExtFunction; begin - JSCode(JSName + '.getActiveError();', 'TExtFormFieldContainer'); +function TExtGridColumn.GetIndex : TExtFunction; begin + JSCode(JSName + '.getIndex();', 'TExtGridColumn'); Result := Self; end; -function TExtFormFieldContainer.GetActiveErrors : TExtFunction; begin - JSCode(JSName + '.getActiveErrors();', 'TExtFormFieldContainer'); +function TExtGridColumn.GetSortParam : TExtFunction; begin + JSCode(JSName + '.getSortParam();', 'TExtGridColumn'); Result := Self; end; -function TExtFormFieldContainer.GetCombinedErrors(InvalidFields : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.getCombinedErrors(' + VarToJSON(InvalidFields) + ');', 'TExtFormFieldContainer'); +function TExtGridColumn.GetVisibleIndex : TExtFunction; begin + JSCode(JSName + '.getVisibleIndex();', 'TExtGridColumn'); Result := Self; end; -function TExtFormFieldContainer.GetInputId : TExtFunction; begin - JSCode(JSName + '.getInputId();', 'TExtFormFieldContainer'); +function TExtGridColumn.IsHideable : TExtFunction; begin + JSCode(JSName + '.isHideable();', 'TExtGridColumn'); Result := Self; end; -function TExtFormFieldContainer.GetLabelWidth : TExtFunction; begin - JSCode(JSName + '.getLabelWidth();', 'TExtFormFieldContainer'); +function TExtGridColumn.IsLockable : TExtFunction; begin + JSCode(JSName + '.isLockable();', 'TExtGridColumn'); Result := Self; end; -function TExtFormFieldContainer.HasActiveError : TExtFunction; begin - JSCode(JSName + '.hasActiveError();', 'TExtFormFieldContainer'); +function TExtGridColumn.SetText(Text : String) : TExtFunction; begin + JSCode(JSName + '.setText(' + VarToJSON([Text]) + ');', 'TExtGridColumn'); Result := Self; end; -function TExtFormFieldContainer.HasVisibleLabel : TExtFunction; begin - JSCode(JSName + '.hasVisibleLabel();', 'TExtFormFieldContainer'); - Result := Self; +destructor TExtGridColumn.Destroy; begin + try + FColumns.Free; + FEditor.Free; + FScope.Free; + FTextEl.Free; + FTriggerEl.Free; + except end; + inherited; end; -function TExtFormFieldContainer.SetActiveError(Msg : String) : TExtFunction; begin - JSCode(JSName + '.setActiveError(' + VarToJSON([Msg]) + ');', 'TExtFormFieldContainer'); - Result := Self; +procedure TExtTreeView.SetFAnimate(Value : Boolean); begin + FAnimate := Value; + JSCode('animate:' + VarToJSON([Value])); end; -function TExtFormFieldContainer.SetActiveErrors(Errors : TExtObjectList) : TExtFunction; begin - JSCode(JSName + '.setActiveErrors(' + VarToJSON(Errors) + ');', 'TExtFormFieldContainer'); - Result := Self; +procedure TExtTreeView.SetFDeferInitialRefresh(Value : Boolean); begin + FDeferInitialRefresh := Value; + JSCode('deferInitialRefresh:' + VarToJSON([Value])); end; -function TExtFormFieldContainer.SetFieldDefaults(Defaults : TExtObject) : TExtFunction; begin - JSCode(JSName + '.setFieldDefaults(' + VarToJSON([Defaults, false]) + ');', 'TExtFormFieldContainer'); - Result := Self; +procedure TExtTreeView.SetFIsTreeView(Value : Boolean); begin + FIsTreeView := Value; + JSCode(JSName + '.isTreeView=' + VarToJSON([Value]) + ';'); end; -function TExtFormFieldContainer.SetFieldLabel(LabelJS : String) : TExtFunction; begin - JSCode(JSName + '.setFieldLabel(' + VarToJSON([LabelJS]) + ');', 'TExtFormFieldContainer'); - Result := Self; +procedure TExtTreeView.SetFRootVisible(Value : Boolean); begin + FRootVisible := Value; + JSCode('rootVisible:' + VarToJSON([Value])); end; -function TExtFormFieldContainer.TrimLabelSeparator : TExtFunction; begin - JSCode(JSName + '.trimLabelSeparator();', 'TExtFormFieldContainer'); - Result := Self; +procedure TExtTreeView.SetFOnAfteritemcollapse(Value : TExtTreeViewOnAfteritemcollapse); begin + if Assigned(FOnAfteritemcollapse) then + JSCode(JSName+'.events ["afteritemcollapse"].listeners=[];'); + if Assigned(Value) then + AddListener('afteritemcollapse', Ajax('afteritemcollapse', ['Node', '%0.nm','Index', '%1','Item', '%2.nm'], true)); + FOnAfteritemcollapse := Value; end; -function TExtFormFieldContainer.UnsetActiveError : TExtFunction; begin - JSCode(JSName + '.unsetActiveError();', 'TExtFormFieldContainer'); - Result := Self; +procedure TExtTreeView.SetFOnAfteritemexpand(Value : TExtTreeViewOnAfteritemexpand); begin + if Assigned(FOnAfteritemexpand) then + JSCode(JSName+'.events ["afteritemexpand"].listeners=[];'); + if Assigned(Value) then + AddListener('afteritemexpand', Ajax('afteritemexpand', ['Node', '%0.nm','Index', '%1','Item', '%2.nm'], true)); + FOnAfteritemexpand := Value; end; -procedure TExtFormFieldContainer.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'errorchange') and Assigned(FOnErrorchange) then - FOnErrorchange(TExtFormLabelable(ParamAsObject('This')), ParamAsString('Error')) - else if (AEvtName = 'fielderrorchange') and Assigned(FOnFielderrorchange) then - FOnFielderrorchange(TExtFormFieldAncestor(ParamAsObject('This')), TExtFormLabelable(ParamAsObject('The')), ParamAsString('Error')) - else if (AEvtName = 'fieldvaliditychange') and Assigned(FOnFieldvaliditychange) then - FOnFieldvaliditychange(TExtFormFieldAncestor(ParamAsObject('This')), TExtFormLabelable(ParamAsObject('The')), ParamAsString('IsValid')); +procedure TExtTreeView.SetFOnNodedragover(Value : TExtTreeViewOnNodedragover); begin + if Assigned(FOnNodedragover) then + JSCode(JSName+'.events ["nodedragover"].listeners=[];'); + if Assigned(Value) then + AddListener('nodedragover', Ajax('nodedragover', ['TargetNode', '%0.nm','Position', '%1','DragData', '%2.nm','E', '%3.nm'], true)); + FOnNodedragover := Value; end; -function TExtDataJsonPStore.JSClassName : string; begin - Result := 'Ext.data.JsonPStore'; +function TExtTreeView.JSClassName : string; begin + Result := 'Ext.tree.View'; end; -{$IFDEF FPC}constructor TExtDataJsonPStore.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtTreeView.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtLayoutContainerAnchor.SetFAnchor(Value : String); begin - FAnchor := Value; - JSCode('anchor:' + VarToJSON([Value])); +function TExtTreeView.Collapse(RecordJS : TExtDataModel; Deep : Boolean = false; Callback : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.collapse(' + VarToJSON([RecordJS, false, Deep, Callback, true, Scope, false]) + ');', 'TExtTreeView'); + Result := Self; end; -procedure TExtLayoutContainerAnchor.SetFAnchorSize(Value : Integer); begin - FAnchorSize := Value; - JSCode('anchorSize:' + VarToJSON([Value])); +function TExtTreeView.Expand(RecordJS : TExtDataModel; Deep : Boolean = false; Callback : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.expand(' + VarToJSON([RecordJS, false, Deep, Callback, true, Scope, false]) + ');', 'TExtTreeView'); + Result := Self; end; -procedure TExtLayoutContainerAnchor.SetFAnchorSizeObject(Value : TExtObject); begin - FAnchorSizeObject := Value; - Value.DeleteFromGarbage; - JSCode('anchorSize:' + VarToJSON([Value, false])); +function TExtTreeView.GetTreeStore : TExtFunction; begin + JSCode(JSName + '.getTreeStore();', 'TExtTreeView'); + Result := Self; end; -procedure TExtLayoutContainerAnchor.SetFDefaultAnchor(Value : String); begin - FDefaultAnchor := Value; - JSCode('defaultAnchor:' + VarToJSON([Value])); +function TExtTreeView.Toggle(RecordJS : TExtDataModel; Deep : Boolean = false; Callback : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.toggle(' + VarToJSON([RecordJS, false, Deep, Callback, true, Scope, false]) + ');', 'TExtTreeView'); + Result := Self; end; -function TExtLayoutContainerAnchor.JSClassName : string; begin - Result := 'Ext.layout.container.Anchor'; +procedure TExtTreeView.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'afteritemcollapse') and Assigned(FOnAfteritemcollapse) then + FOnAfteritemcollapse(TExtDataNodeInterface(ParamAsObject('Node')), ParamAsInteger('Index'), THTMLElement(ParamAsObject('Item'))) + else if (AEvtName = 'afteritemexpand') and Assigned(FOnAfteritemexpand) then + FOnAfteritemexpand(TExtDataNodeInterface(ParamAsObject('Node')), ParamAsInteger('Index'), THTMLElement(ParamAsObject('Item'))) + else if (AEvtName = 'nodedragover') and Assigned(FOnNodedragover) then + FOnNodedragover(TExtDataNodeInterface(ParamAsObject('TargetNode')), ParamAsString('Position'), TExtObject(ParamAsObject('DragData')), TExtEventObject(ParamAsObject('E'))); end; -procedure TExtLayoutContainerAnchor.InitDefaults; begin - inherited; - FAnchorSizeObject := TExtObject.CreateInternal(Self, 'anchorSize'); +procedure TExtFormFieldPicker.SetFEditable(Value : Boolean); begin + FEditable := Value; + JSCode('editable:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtLayoutContainerAnchor.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtFormFieldPicker.SetFIsExpanded(Value : Boolean); begin + FIsExpanded := Value; + JSCode(JSName + '.isExpanded=' + VarToJSON([Value]) + ';'); +end; -constructor TExtLayoutContainerAnchor.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtFormFieldPicker.SetFMatchFieldWidth(Value : Boolean); begin + FMatchFieldWidth := Value; + JSCode('matchFieldWidth:' + VarToJSON([Value])); end; -destructor TExtLayoutContainerAnchor.Destroy; begin - try - FAnchorSizeObject.Free; - except end; - inherited; +procedure TExtFormFieldPicker.SetFOpenCls(Value : String); begin + FOpenCls := Value; + JSCode('openCls:' + VarToJSON([Value])); end; -function TExtLayoutComponentField.JSClassName : string; begin - Result := 'Ext.layout.component.field.Field'; +procedure TExtFormFieldPicker.SetFPickerAlign(Value : String); begin + FPickerAlign := Value; + JSCode('pickerAlign:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtLayoutComponentField.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtFormFieldPicker.SetFOnCollapse(Value : TExtFormFieldPickerOnCollapse); begin + if Assigned(FOnCollapse) then + JSCode(JSName+'.events ["collapse"].listeners=[];'); + if Assigned(Value) then + AddListener('collapse', Ajax('collapse', ['Field', '%0.nm'], true)); + FOnCollapse := Value; +end; -function TExtLayoutComponentField.DestroyTip : TExtFunction; begin - JSCode(JSName + '.destroyTip();', 'TExtLayoutComponentField'); - Result := Self; +procedure TExtFormFieldPicker.SetFOnExpand(Value : TExtFormFieldPickerOnExpand); begin + if Assigned(FOnExpand) then + JSCode(JSName+'.events ["expand"].listeners=[];'); + if Assigned(Value) then + AddListener('expand', Ajax('expand', ['Field', '%0.nm'], true)); + FOnExpand := Value; end; -function TExtLayoutComponentField.ElementIdApplyIf : TExtFunction; begin - JSCode(JSName + '.elementId: applyIf({ prepare();', 'TExtLayoutComponentField'); - Result := Self; +procedure TExtFormFieldPicker.SetFOnSelect(Value : TExtFormFieldPickerOnSelect); begin + if Assigned(FOnSelect) then + JSCode(JSName+'.events ["select"].listeners=[];'); + if Assigned(Value) then + AddListener('select', Ajax('select', ['Field', '%0.nm','Value', '%1.nm'], true)); + FOnSelect := Value; end; -function TExtLayoutComponentField.GetErrorStrategy : TExtFunction; begin - JSCode(JSName + '.getErrorStrategy();', 'TExtLayoutComponentField'); - Result := Self; +function TExtFormFieldPicker.JSClassName : string; begin + Result := 'Ext.form.field.Picker'; end; -function TExtLayoutComponentField.GetLabelStrategy : TExtFunction; begin - JSCode(JSName + '.getLabelStrategy();', 'TExtLayoutComponentField'); - Result := Self; +procedure TExtFormFieldPicker.InitDefaults; begin + inherited; + FMatchFieldWidth := true; + FPickerAlign := 'tl-bl?'; end; -function TExtLayoutComponentField.InitTip : TExtFunction; begin - JSCode(JSName + '.initTip();', 'TExtLayoutComponentField'); +{$IFDEF FPC}constructor TExtFormFieldPicker.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtFormFieldPicker.Collapse : TExtFunction; begin + JSCode(JSName + '.collapse();', 'TExtFormFieldPicker'); Result := Self; end; -function TExtLayoutComponentField.QtipApplyIf : TExtFunction; begin - JSCode(JSName + '.qtip: applyIf({ prepare();', 'TExtLayoutComponentField'); - Result := Self; +constructor TExtFormFieldPicker.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -function TExtLayoutComponentField.SideApplyIf : TExtFunction; begin - JSCode(JSName + '.side: applyIf({ prepare();', 'TExtLayoutComponentField'); +function TExtFormFieldPicker.Expand : TExtFunction; begin + JSCode(JSName + '.expand();', 'TExtFormFieldPicker'); Result := Self; end; -function TExtLayoutComponentField.TitleApplyIf : TExtFunction; begin - JSCode(JSName + '.title: applyIf({ prepare();', 'TExtLayoutComponentField'); +function TExtFormFieldPicker.GetPicker : TExtFunction; begin + JSCode(JSName + '.getPicker();', 'TExtFormFieldPicker'); Result := Self; end; -function TExtLayoutComponentField.TopExtApplyIf : TExtFunction; begin - JSCode(JSName + '.top: Ext.applyIf({ getHeight();', 'TExtLayoutComponentField'); - Result := Self; +procedure TExtFormFieldPicker.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'collapse') and Assigned(FOnCollapse) then + FOnCollapse(TExtFormFieldPicker(ParamAsObject('Field'))) + else if (AEvtName = 'expand') and Assigned(FOnExpand) then + FOnExpand(TExtFormFieldPicker(ParamAsObject('Field'))) + else if (AEvtName = 'select') and Assigned(FOnSelect) then + FOnSelect(TExtFormFieldPicker(ParamAsObject('Field')), TExtObject(ParamAsObject('Value'))); end; -function TExtLayoutComponentField.UnderApplyIf : TExtFunction; begin - JSCode(JSName + '.under: applyIf({ prepare();', 'TExtLayoutComponentField'); - Result := Self; +procedure TExtFormFieldSpinner.SetFKeyNavEnabled(Value : Boolean); begin + FKeyNavEnabled := Value; + JSCode('keyNavEnabled:' + VarToJSON([Value])); end; -function TExtDataXmlStore.JSClassName : string; begin - Result := 'Ext.data.XmlStore'; +procedure TExtFormFieldSpinner.SetFMouseWheelEnabled(Value : Boolean); begin + FMouseWheelEnabled := Value; + JSCode('mouseWheelEnabled:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtDataXmlStore.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtFormFieldSpinner.SetFRepeatTriggerClick(Value : Boolean); begin + FRepeatTriggerClick := Value; + JSCode('repeatTriggerClick:' + VarToJSON([Value])); +end; -procedure TExtToolbarPaging.SetFAfterPageText(Value : String); begin - FAfterPageText := Value; - JSCode('afterPageText:' + VarToJSON([Value])); +procedure TExtFormFieldSpinner.SetFSpinDownEl(Value : TExtElement); begin + FSpinDownEl := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.spinDownEl=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtToolbarPaging.SetFBeforePageText(Value : String); begin - FBeforePageText := Value; - JSCode('beforePageText:' + VarToJSON([Value])); +procedure TExtFormFieldSpinner.SetFSpinDownEnabled(Value : Boolean); begin + FSpinDownEnabled := Value; + if not ConfigAvailable(JSName) then + SetSpinDownEnabled(Value) + else + JSCode('spinDownEnabled:' + VarToJSON([Value])); end; -procedure TExtToolbarPaging.SetFDisplayInfo(Value : Boolean); begin - FDisplayInfo := Value; - JSCode('displayInfo:' + VarToJSON([Value])); +procedure TExtFormFieldSpinner.SetFSpinUpEl(Value : TExtElement); begin + FSpinUpEl := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.spinUpEl=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtToolbarPaging.SetFDisplayMsg(Value : String); begin - FDisplayMsg := Value; - JSCode('displayMsg:' + VarToJSON([Value])); +procedure TExtFormFieldSpinner.SetFSpinUpEnabled(Value : Boolean); begin + FSpinUpEnabled := Value; + if not ConfigAvailable(JSName) then + SetSpinUpEnabled(Value) + else + JSCode('spinUpEnabled:' + VarToJSON([Value])); end; -procedure TExtToolbarPaging.SetFEmptyMsg(Value : String); begin - FEmptyMsg := Value; - JSCode('emptyMsg:' + VarToJSON([Value])); +function TExtFormFieldSpinner.JSClassName : string; begin + Result := 'Ext.form.field.Spinner'; end; -procedure TExtToolbarPaging.SetFFirstText(Value : String); begin - FFirstText := Value; - JSCode('firstText:' + VarToJSON([Value])); +procedure TExtFormFieldSpinner.InitDefaults; begin + inherited; + FKeyNavEnabled := true; + FMouseWheelEnabled := true; + FRepeatTriggerClick := true; + FSpinDownEl := TExtElement.CreateInternal(Self, 'spinDownEl'); + FSpinDownEnabled := true; + FSpinUpEl := TExtElement.CreateInternal(Self, 'spinUpEl'); + FSpinUpEnabled := true; end; -procedure TExtToolbarPaging.SetFInputItemWidth(Value : Integer); begin - FInputItemWidth := Value; - JSCode('inputItemWidth:' + VarToJSON([Value])); +{$IFDEF FPC}constructor TExtFormFieldSpinner.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtFormFieldSpinner.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -procedure TExtToolbarPaging.SetFLastText(Value : String); begin - FLastText := Value; - JSCode('lastText:' + VarToJSON([Value])); +function TExtFormFieldSpinner.GetTriggerWidth : TExtFunction; begin + JSCode(JSName + '.getTriggerWidth();', 'TExtFormFieldSpinner'); + Result := Self; end; -procedure TExtToolbarPaging.SetFNextText(Value : String); begin - FNextText := Value; - JSCode('nextText:' + VarToJSON([Value])); +function TExtFormFieldSpinner.SetSpinDownEnabled(Enabled : Boolean) : TExtFunction; begin + JSCode(JSName + '.setSpinDownEnabled(' + VarToJSON([Enabled]) + ');', 'TExtFormFieldSpinner'); + Result := Self; end; -procedure TExtToolbarPaging.SetFPrependButtons(Value : Boolean); begin - FPrependButtons := Value; - JSCode('prependButtons:' + VarToJSON([Value])); +function TExtFormFieldSpinner.SetSpinUpEnabled(Enabled : Boolean) : TExtFunction; begin + JSCode(JSName + '.setSpinUpEnabled(' + VarToJSON([Enabled]) + ');', 'TExtFormFieldSpinner'); + Result := Self; end; -procedure TExtToolbarPaging.SetFPrevText(Value : String); begin - FPrevText := Value; - JSCode('prevText:' + VarToJSON([Value])); +function TExtFormFieldSpinner.SpinDown : TExtFunction; begin + JSCode(JSName + '.spinDown();', 'TExtFormFieldSpinner'); + Result := Self; end; -procedure TExtToolbarPaging.SetFRefreshText(Value : String); begin - FRefreshText := Value; - JSCode('refreshText:' + VarToJSON([Value])); +function TExtFormFieldSpinner.SpinUp : TExtFunction; begin + JSCode(JSName + '.spinUp();', 'TExtFormFieldSpinner'); + Result := Self; end; -procedure TExtToolbarPaging.SetFStore(Value : TExtDataStore); begin - FStore := Value; - Value.DeleteFromGarbage; - JSCode('store:' + VarToJSON([Value, false])); +destructor TExtFormFieldSpinner.Destroy; begin + try + FSpinDownEl.Free; + FSpinUpEl.Free; + except end; + inherited; end; -procedure TExtToolbarPaging.SetFOnBeforechange(Value : TExtToolbarPagingOnBeforechange); begin - if Assigned(FOnBeforechange) then - JSCode(JSName+'.events ["beforechange"].listeners=[];'); - if Assigned(Value) then - AddListener('beforechange', Ajax('beforechange', ['This', '%0.nm','Page', '%1'], true)); - FOnBeforechange := Value; +function TExtGridCellEditor.JSClassName : string; begin + Result := 'Ext.grid.CellEditor'; end; -procedure TExtToolbarPaging.SetFOnChange(Value : TExtToolbarPagingOnChange); begin - if Assigned(FOnChange) then - JSCode(JSName+'.events ["change"].listeners=[];'); - if Assigned(Value) then - AddListener('change', Ajax('change', ['This', '%0.nm','PageData', '%1.nm'], true)); - FOnChange := Value; +{$IFDEF FPC}constructor TExtGridCellEditor.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +procedure TExtFormFieldFile.SetFButton(Value : TExtButton); begin + FButton := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.button=' + VarToJSON([Value, false]) + ';'); end; -function TExtToolbarPaging.JSClassName : string; begin - Result := 'Ext.toolbar.Paging'; +procedure TExtFormFieldFile.SetFButtonConfig(Value : TExtObject); begin + FButtonConfig := Value; + Value.DeleteFromGarbage; + JSCode('buttonConfig:' + VarToJSON([Value, false])); end; -procedure TExtToolbarPaging.InitDefaults; begin - inherited; - FStore := TExtDataStore.CreateInternal(Self, 'store'); +procedure TExtFormFieldFile.SetFButtonMargin(Value : Integer); begin + FButtonMargin := Value; + JSCode('buttonMargin:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtToolbarPaging.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtFormFieldFile.SetFButtonOnly(Value : Boolean); begin + FButtonOnly := Value; + JSCode('buttonOnly:' + VarToJSON([Value])); +end; -function TExtToolbarPaging.Bind(Store : TExtDataStore) : TExtFunction; begin - JSCode(JSName + '.bind(' + VarToJSON([Store, false]) + ');', 'TExtToolbarPaging'); - Result := Self; +procedure TExtFormFieldFile.SetFButtonText(Value : String); begin + FButtonText := Value; + JSCode('buttonText:' + VarToJSON([Value])); end; -function TExtToolbarPaging.BindStore(Store : String = '') : TExtFunction; begin - JSCode(JSName + '.bindStore(' + VarToJSON([Store]) + ');', 'TExtToolbarPaging'); - Result := Self; +procedure TExtFormFieldFile.SetFClearOnSubmit(Value : Boolean); begin + FClearOnSubmit := Value; + JSCode('clearOnSubmit:' + VarToJSON([Value])); end; -constructor TExtToolbarPaging.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +procedure TExtFormFieldFile.SetFFieldBodyCls(Value : String); begin + FFieldBodyCls := Value; + JSCode('fieldBodyCls:' + VarToJSON([Value])); end; -function TExtToolbarPaging.DoRefresh : TExtFunction; begin - JSCode(JSName + '.doRefresh();', 'TExtToolbarPaging'); - Result := Self; +procedure TExtFormFieldFile.SetFFileInputEl(Value : TExtElement); begin + FFileInputEl := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.fileInputEl=' + VarToJSON([Value, false]) + ';'); end; -function TExtToolbarPaging.GetStore : TExtFunction; begin - JSCode(JSName + '.getStore();', 'TExtToolbarPaging'); - Result := Self; +procedure TExtFormFieldFile.SetFReadOnly(Value : Boolean); begin + FReadOnly := Value; + JSCode('readOnly:' + VarToJSON([Value])); end; -function TExtToolbarPaging.MoveFirst : TExtFunction; begin - JSCode(JSName + '.moveFirst();', 'TExtToolbarPaging'); - Result := Self; +function TExtFormFieldFile.JSClassName : string; begin + Result := 'Ext.form.field.File'; end; -function TExtToolbarPaging.MoveLast : TExtFunction; begin - JSCode(JSName + '.moveLast();', 'TExtToolbarPaging'); - Result := Self; +procedure TExtFormFieldFile.InitDefaults; begin + inherited; + FButton := TExtButton.CreateInternal(Self, 'button'); + FButtonConfig := TExtObject.CreateInternal(Self, 'buttonConfig'); + FFileInputEl := TExtElement.CreateInternal(Self, 'fileInputEl'); end; -function TExtToolbarPaging.MoveNext : TExtFunction; begin - JSCode(JSName + '.moveNext();', 'TExtToolbarPaging'); - Result := Self; +{$IFDEF FPC}constructor TExtFormFieldFile.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtFormFieldFile.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -function TExtToolbarPaging.MovePrevious : TExtFunction; begin - JSCode(JSName + '.movePrevious();', 'TExtToolbarPaging'); +function TExtFormFieldFile.GetTriggerMarkup : TExtFunction; begin + JSCode(JSName + '.getTriggerMarkup();', 'TExtFormFieldFile'); Result := Self; end; -function TExtToolbarPaging.Unbind(Store : TExtDataStore) : TExtFunction; begin - JSCode(JSName + '.unbind(' + VarToJSON([Store, false]) + ');', 'TExtToolbarPaging'); +function TExtFormFieldFile.SetValueExtEmptyFnReset : TExtFunction; begin + JSCode(JSName + '.setValue: Ext.emptyFn, reset();', 'TExtFormFieldFile'); Result := Self; end; -destructor TExtToolbarPaging.Destroy; begin +destructor TExtFormFieldFile.Destroy; begin try - FStore.Free; + FButton.Free; + FButtonConfig.Free; + FFileInputEl.Free; except end; inherited; end; -procedure TExtToolbarPaging.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'beforechange') and Assigned(FOnBeforechange) then - FOnBeforechange(TExtToolbarPaging(ParamAsObject('This')), ParamAsInteger('Page')) - else if (AEvtName = 'change') and Assigned(FOnChange) then - FOnChange(TExtToolbarPaging(ParamAsObject('This')), TExtObject(ParamAsObject('PageData'))); -end; - procedure TExtFormFieldHtmlEditor.SetFAfterIFrameTpl(Value : String); begin FAfterIFrameTpl := Value; JSCode('afterIFrameTpl:' + VarToJSON([Value])); @@ -41269,6 +43043,11 @@ procedure TExtFormFieldHtmlEditor.SetFIframeAttrTplTemplate(Value : TExtXTemplat JSCode('iframeAttrTpl:' + VarToJSON([Value, false])); end; +procedure TExtFormFieldHtmlEditor.SetFIsFormField(Value : Boolean); begin + FIsFormField := Value; + JSCode(JSName + '.isFormField=' + VarToJSON([Value]) + ';'); +end; + procedure TExtFormFieldHtmlEditor.SetFName(Value : String); begin FName := Value; JSCode('name:' + VarToJSON([Value])); @@ -41362,797 +43141,401 @@ procedure TExtFormFieldHtmlEditor.SetFOnSync(Value : TExtFormFieldHtmlEditorOnSy AddListener('sync', Ajax('sync', ['This', '%0.nm','Html', '%1'], true)); FOnSync := Value; end; - -function TExtFormFieldHtmlEditor.JSClassName : string; begin - Result := 'Ext.form.field.HtmlEditor'; -end; - -procedure TExtFormFieldHtmlEditor.InitDefaults; begin - inherited; - FAfterIFrameTplList := TExtObjectList.Create(Self, 'afterIFrameTpl'); - FAfterIFrameTplTemplate := TExtXTemplate.CreateInternal(Self, 'afterIFrameTpl'); - FAfterTextAreaTplList := TExtObjectList.Create(Self, 'afterTextAreaTpl'); - FAfterTextAreaTplTemplate := TExtXTemplate.CreateInternal(Self, 'afterTextAreaTpl'); - FBeforeIFrameTplList := TExtObjectList.Create(Self, 'beforeIFrameTpl'); - FBeforeIFrameTplTemplate := TExtXTemplate.CreateInternal(Self, 'beforeIFrameTpl'); - FBeforeTextAreaTplList := TExtObjectList.Create(Self, 'beforeTextAreaTpl'); - FBeforeTextAreaTplTemplate := TExtXTemplate.CreateInternal(Self, 'beforeTextAreaTpl'); - FFontFamilies := TExtObjectList.Create(Self, 'fontFamilies'); - FIframeAttrTplList := TExtObjectList.Create(Self, 'iframeAttrTpl'); - FIframeAttrTplTemplate := TExtXTemplate.CreateInternal(Self, 'iframeAttrTpl'); - FOriginalValue := TExtObject.CreateInternal(Self, 'originalValue'); - FValue := TExtObject.CreateInternal(Self, 'value'); -end; - -{$IFDEF FPC}constructor TExtFormFieldHtmlEditor.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtFormFieldHtmlEditor.BatchChanges(Fn : TExtObject) : TExtFunction; begin - JSCode(JSName + '.batchChanges(' + VarToJSON([Fn, false]) + ');', 'TExtFormFieldHtmlEditor'); - Result := Self; -end; - -function TExtFormFieldHtmlEditor.CheckChange : TExtFunction; begin - JSCode(JSName + '.checkChange();', 'TExtFormFieldHtmlEditor'); - Result := Self; -end; - -function TExtFormFieldHtmlEditor.CheckDirty : TExtFunction; begin - JSCode(JSName + '.checkDirty();', 'TExtFormFieldHtmlEditor'); - Result := Self; -end; - -constructor TExtFormFieldHtmlEditor.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; -end; - -function TExtFormFieldHtmlEditor.ExtractFileInput : TExtFunction; begin - JSCode(JSName + '.extractFileInput();', 'TExtFormFieldHtmlEditor'); - Result := Self; -end; - -function TExtFormFieldHtmlEditor.GetErrors(Value : TExtObject) : TExtFunction; begin - JSCode(JSName + '.getErrors(' + VarToJSON([Value, false]) + ');', 'TExtFormFieldHtmlEditor'); - Result := Self; -end; - -function TExtFormFieldHtmlEditor.GetModelData : TExtFunction; begin - JSCode(JSName + '.getModelData();', 'TExtFormFieldHtmlEditor'); - Result := Self; -end; - -function TExtFormFieldHtmlEditor.GetName : TExtFunction; begin - JSCode(JSName + '.getName();', 'TExtFormFieldHtmlEditor'); - Result := Self; -end; - -function TExtFormFieldHtmlEditor.GetSubmitData : TExtFunction; begin - JSCode(JSName + '.getSubmitData();', 'TExtFormFieldHtmlEditor'); - Result := Self; -end; - -function TExtFormFieldHtmlEditor.GetValue : TExtFunction; begin - JSCode(JSName + '.getValue();', 'TExtFormFieldHtmlEditor'); - Result := Self; -end; - -function TExtFormFieldHtmlEditor.IsDirty : TExtFunction; begin - JSCode(JSName + '.isDirty();', 'TExtFormFieldHtmlEditor'); - Result := Self; -end; - -function TExtFormFieldHtmlEditor.IsEqual(Value1 : TExtObject; Value2 : TExtObject) : TExtFunction; begin - JSCode(JSName + '.isEqual(' + VarToJSON([Value1, false, Value2, false]) + ');', 'TExtFormFieldHtmlEditor'); - Result := Self; -end; - -function TExtFormFieldHtmlEditor.IsFileUpload : TExtFunction; begin - JSCode(JSName + '.isFileUpload();', 'TExtFormFieldHtmlEditor'); - Result := Self; -end; - -function TExtFormFieldHtmlEditor.IsValid : TExtFunction; begin - JSCode(JSName + '.isValid();', 'TExtFormFieldHtmlEditor'); - Result := Self; -end; - -function TExtFormFieldHtmlEditor.Reset : TExtFunction; begin - JSCode(JSName + '.reset();', 'TExtFormFieldHtmlEditor'); - Result := Self; -end; - -function TExtFormFieldHtmlEditor.ResetOriginalValue : TExtFunction; begin - JSCode(JSName + '.resetOriginalValue();', 'TExtFormFieldHtmlEditor'); - Result := Self; -end; - -function TExtFormFieldHtmlEditor.SetReadOnly(ReadOnly : Boolean) : TExtFunction; begin - JSCode(JSName + '.setReadOnly(' + VarToJSON([ReadOnly]) + ');', 'TExtFormFieldHtmlEditor'); - Result := Self; -end; - -function TExtFormFieldHtmlEditor.SetValue(Value : TExtObject) : TExtFunction; begin - JSCode(JSName + '.setValue(' + VarToJSON([Value, false]) + ');', 'TExtFormFieldHtmlEditor'); - Result := Self; -end; - -function TExtFormFieldHtmlEditor.ToggleSourceEdit(SourceEditMode : Boolean = false) : TExtFunction; begin - JSCode(JSName + '.toggleSourceEdit(' + VarToJSON([SourceEditMode]) + ');', 'TExtFormFieldHtmlEditor'); - Result := Self; -end; - -function TExtFormFieldHtmlEditor.Validate : TExtFunction; begin - JSCode(JSName + '.validate();', 'TExtFormFieldHtmlEditor'); - Result := Self; -end; - -destructor TExtFormFieldHtmlEditor.Destroy; begin - try - FAfterIFrameTplList.Free; - FAfterIFrameTplTemplate.Free; - FAfterTextAreaTplList.Free; - FAfterTextAreaTplTemplate.Free; - FBeforeIFrameTplList.Free; - FBeforeIFrameTplTemplate.Free; - FBeforeTextAreaTplList.Free; - FBeforeTextAreaTplTemplate.Free; - FFontFamilies.Free; - FIframeAttrTplList.Free; - FIframeAttrTplTemplate.Free; - FOriginalValue.Free; - FValue.Free; - except end; - inherited; -end; - -procedure TExtFormFieldHtmlEditor.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'activate') and Assigned(FOnActivate) then - FOnActivate(TExtFormFieldHtmlEditor(ParamAsObject('This'))) - else if (AEvtName = 'beforepush') and Assigned(FOnBeforepush) then - FOnBeforepush(TExtFormFieldHtmlEditor(ParamAsObject('This')), ParamAsString('Html')) - else if (AEvtName = 'beforesync') and Assigned(FOnBeforesync) then - FOnBeforesync(TExtFormFieldHtmlEditor(ParamAsObject('This')), ParamAsString('Html')) - else if (AEvtName = 'blur') and Assigned(FOnBlur) then - FOnBlur() - else if (AEvtName = 'editmodechange') and Assigned(FOnEditmodechange) then - FOnEditmodechange(TExtFormFieldHtmlEditor(ParamAsObject('This')), ParamAsBoolean('SourceEdit')) - else if (AEvtName = 'initialize') and Assigned(FOnInitialize) then - FOnInitialize(TExtFormFieldHtmlEditor(ParamAsObject('This'))) - else if (AEvtName = 'push') and Assigned(FOnPush) then - FOnPush(TExtFormFieldHtmlEditor(ParamAsObject('This')), ParamAsString('Html')) - else if (AEvtName = 'sync') and Assigned(FOnSync) then - FOnSync(TExtFormFieldHtmlEditor(ParamAsObject('This')), ParamAsString('Html')); -end; - -procedure TExtFormFieldFile.SetFButtonConfig(Value : TExtObject); begin - FButtonConfig := Value; - Value.DeleteFromGarbage; - JSCode('buttonConfig:' + VarToJSON([Value, false])); -end; - -procedure TExtFormFieldFile.SetFButtonMargin(Value : Integer); begin - FButtonMargin := Value; - JSCode('buttonMargin:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldFile.SetFButtonOnly(Value : Boolean); begin - FButtonOnly := Value; - JSCode('buttonOnly:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldFile.SetFButtonText(Value : String); begin - FButtonText := Value; - JSCode('buttonText:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldFile.SetFClearOnSubmit(Value : Boolean); begin - FClearOnSubmit := Value; - JSCode('clearOnSubmit:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldFile.SetFFieldBodyCls(Value : String); begin - FFieldBodyCls := Value; - JSCode('fieldBodyCls:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldFile.SetFReadOnly(Value : Boolean); begin - FReadOnly := Value; - JSCode('readOnly:' + VarToJSON([Value])); -end; - -function TExtFormFieldFile.JSClassName : string; begin - Result := 'Ext.form.field.File'; -end; - -procedure TExtFormFieldFile.InitDefaults; begin - inherited; - FButtonConfig := TExtObject.CreateInternal(Self, 'buttonConfig'); -end; - -{$IFDEF FPC}constructor TExtFormFieldFile.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtFormFieldFile.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; -end; - -function TExtFormFieldFile.GetTriggerMarkup : TExtFunction; begin - JSCode(JSName + '.getTriggerMarkup();', 'TExtFormFieldFile'); - Result := Self; -end; - -function TExtFormFieldFile.SetValueExtEmptyFnReset : TExtFunction; begin - JSCode(JSName + '.setValue: Ext.emptyFn, reset();', 'TExtFormFieldFile'); - Result := Self; -end; - -destructor TExtFormFieldFile.Destroy; begin - try - FButtonConfig.Free; - except end; - inherited; -end; - -procedure TExtDdDragZone.SetFContainerScroll(Value : TExtObject); begin - FContainerScroll := Value; - Value.DeleteFromGarbage; - JSCode('containerScroll:' + VarToJSON([Value, false])); -end; - -procedure TExtDdDragZone.SetFContainerScrollBoolean(Value : Boolean); begin - FContainerScrollBoolean := Value; - JSCode('containerScroll:' + VarToJSON([Value])); -end; - -procedure TExtDdDragZone.SetFScrollEl(Value : String); begin - FScrollEl := Value; - JSCode('scrollEl:' + VarToJSON([Value])); -end; - -procedure TExtDdDragZone.SetFScrollElElement(Value : TExtDomElement); begin - FScrollElElement := Value; - Value.DeleteFromGarbage; - JSCode('scrollEl:' + VarToJSON([Value, false])); -end; - -procedure TExtDdDragZone.SetFScrollElTHTMLElement(Value : THTMLElement); begin - FScrollElTHTMLElement := Value; - Value.DeleteFromGarbage; - JSCode('scrollEl:' + VarToJSON([Value, false])); -end; - -function TExtDdDragZone.JSClassName : string; begin - Result := 'Ext.dd.DragZone'; -end; - -procedure TExtDdDragZone.InitDefaults; begin - inherited; - FContainerScroll := TExtObject.CreateInternal(Self, 'containerScroll'); - FScrollElElement := TExtDomElement.CreateInternal(Self, 'scrollEl'); -end; - -{$IFDEF FPC}constructor TExtDdDragZone.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtDdDragZone.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; -end; - -function TExtDdDragZone.GetDragData(E : TEvent) : TExtFunction; begin - JSCode(JSName + '.getDragData(' + VarToJSON([E, false]) + ');', 'TExtDdDragZone'); - Result := Self; -end; - -destructor TExtDdDragZone.Destroy; begin - try - FContainerScroll.Free; - FScrollElElement.Free; - except end; - inherited; -end; - -function TExtDrawSpriteDD.JSClassName : string; begin - Result := 'Ext.draw.SpriteDD'; -end; - -{$IFDEF FPC}constructor TExtDrawSpriteDD.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtTreeView.SetFAnimate(Value : Boolean); begin - FAnimate := Value; - JSCode('animate:' + VarToJSON([Value])); -end; - -procedure TExtTreeView.SetFDeferInitialRefresh(Value : Boolean); begin - FDeferInitialRefresh := Value; - JSCode('deferInitialRefresh:' + VarToJSON([Value])); -end; - -procedure TExtTreeView.SetFRootVisible(Value : Boolean); begin - FRootVisible := Value; - JSCode('rootVisible:' + VarToJSON([Value])); -end; - -procedure TExtTreeView.SetFOnAfteritemcollapse(Value : TExtTreeViewOnAfteritemcollapse); begin - if Assigned(FOnAfteritemcollapse) then - JSCode(JSName+'.events ["afteritemcollapse"].listeners=[];'); - if Assigned(Value) then - AddListener('afteritemcollapse', Ajax('afteritemcollapse', ['Node', '%0.nm','Index', '%1','Item', '%2.nm'], true)); - FOnAfteritemcollapse := Value; -end; - -procedure TExtTreeView.SetFOnAfteritemexpand(Value : TExtTreeViewOnAfteritemexpand); begin - if Assigned(FOnAfteritemexpand) then - JSCode(JSName+'.events ["afteritemexpand"].listeners=[];'); - if Assigned(Value) then - AddListener('afteritemexpand', Ajax('afteritemexpand', ['Node', '%0.nm','Index', '%1','Item', '%2.nm'], true)); - FOnAfteritemexpand := Value; -end; - -procedure TExtTreeView.SetFOnNodedragover(Value : TExtTreeViewOnNodedragover); begin - if Assigned(FOnNodedragover) then - JSCode(JSName+'.events ["nodedragover"].listeners=[];'); - if Assigned(Value) then - AddListener('nodedragover', Ajax('nodedragover', ['TargetNode', '%0.nm','Position', '%1','DragData', '%2.nm','E', '%3.nm'], true)); - FOnNodedragover := Value; -end; - -function TExtTreeView.JSClassName : string; begin - Result := 'Ext.tree.View'; -end; - -{$IFDEF FPC}constructor TExtTreeView.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtTreeView.Collapse(RecordJS : TExtDataModel; Deep : Boolean = false; Callback : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.collapse(' + VarToJSON([RecordJS, false, Deep, Callback, true, Scope, false]) + ');', 'TExtTreeView'); - Result := Self; -end; - -function TExtTreeView.Expand(RecordJS : TExtDataModel; Deep : Boolean = false; Callback : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.expand(' + VarToJSON([RecordJS, false, Deep, Callback, true, Scope, false]) + ');', 'TExtTreeView'); - Result := Self; -end; - -function TExtTreeView.GetTreeStore : TExtFunction; begin - JSCode(JSName + '.getTreeStore();', 'TExtTreeView'); - Result := Self; -end; - -function TExtTreeView.Toggle(RecordJS : TExtDataModel; Deep : Boolean = false; Callback : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin - JSCode(JSName + '.toggle(' + VarToJSON([RecordJS, false, Deep, Callback, true, Scope, false]) + ');', 'TExtTreeView'); - Result := Self; -end; - -procedure TExtTreeView.HandleEvent(const AEvtName : string); begin - inherited; - if (AEvtName = 'afteritemcollapse') and Assigned(FOnAfteritemcollapse) then - FOnAfteritemcollapse(TExtDataNodeInterface(ParamAsObject('Node')), ParamAsInteger('Index'), THTMLElement(ParamAsObject('Item'))) - else if (AEvtName = 'afteritemexpand') and Assigned(FOnAfteritemexpand) then - FOnAfteritemexpand(TExtDataNodeInterface(ParamAsObject('Node')), ParamAsInteger('Index'), THTMLElement(ParamAsObject('Item'))) - else if (AEvtName = 'nodedragover') and Assigned(FOnNodedragover) then - FOnNodedragover(TExtDataNodeInterface(ParamAsObject('TargetNode')), ParamAsString('Position'), TExtObject(ParamAsObject('DragData')), TExtEventObject(ParamAsObject('E'))); -end; - -procedure TExtFormFieldSpinner.SetFKeyNavEnabled(Value : Boolean); begin - FKeyNavEnabled := Value; - JSCode('keyNavEnabled:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldSpinner.SetFMouseWheelEnabled(Value : Boolean); begin - FMouseWheelEnabled := Value; - JSCode('mouseWheelEnabled:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldSpinner.SetFRepeatTriggerClick(Value : Boolean); begin - FRepeatTriggerClick := Value; - JSCode('repeatTriggerClick:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldSpinner.SetFSpinDownEl(Value : TExtElement); begin - FSpinDownEl := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.spinDownEl=' + VarToJSON([Value, false]) + ';'); -end; - -procedure TExtFormFieldSpinner.SetFSpinDownEnabled(Value : Boolean); begin - FSpinDownEnabled := Value; - if not ConfigAvailable(JSName) then - SetSpinDownEnabled(Value) - else - JSCode('spinDownEnabled:' + VarToJSON([Value])); -end; - -procedure TExtFormFieldSpinner.SetFSpinUpEl(Value : TExtElement); begin - FSpinUpEl := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.spinUpEl=' + VarToJSON([Value, false]) + ';'); -end; - -procedure TExtFormFieldSpinner.SetFSpinUpEnabled(Value : Boolean); begin - FSpinUpEnabled := Value; - if not ConfigAvailable(JSName) then - SetSpinUpEnabled(Value) - else - JSCode('spinUpEnabled:' + VarToJSON([Value])); -end; - -function TExtFormFieldSpinner.JSClassName : string; begin - Result := 'Ext.form.field.Spinner'; + +function TExtFormFieldHtmlEditor.JSClassName : string; begin + Result := 'Ext.form.field.HtmlEditor'; end; -procedure TExtFormFieldSpinner.InitDefaults; begin +procedure TExtFormFieldHtmlEditor.InitDefaults; begin inherited; - FKeyNavEnabled := true; - FMouseWheelEnabled := true; - FRepeatTriggerClick := true; - FSpinDownEl := TExtElement.CreateInternal(Self, 'spinDownEl'); - FSpinDownEnabled := true; - FSpinUpEl := TExtElement.CreateInternal(Self, 'spinUpEl'); - FSpinUpEnabled := true; + FAfterIFrameTplList := TExtObjectList.Create(Self, 'afterIFrameTpl'); + FAfterIFrameTplTemplate := TExtXTemplate.CreateInternal(Self, 'afterIFrameTpl'); + FAfterTextAreaTplList := TExtObjectList.Create(Self, 'afterTextAreaTpl'); + FAfterTextAreaTplTemplate := TExtXTemplate.CreateInternal(Self, 'afterTextAreaTpl'); + FBeforeIFrameTplList := TExtObjectList.Create(Self, 'beforeIFrameTpl'); + FBeforeIFrameTplTemplate := TExtXTemplate.CreateInternal(Self, 'beforeIFrameTpl'); + FBeforeTextAreaTplList := TExtObjectList.Create(Self, 'beforeTextAreaTpl'); + FBeforeTextAreaTplTemplate := TExtXTemplate.CreateInternal(Self, 'beforeTextAreaTpl'); + FFontFamilies := TExtObjectList.Create(Self, 'fontFamilies'); + FIframeAttrTplList := TExtObjectList.Create(Self, 'iframeAttrTpl'); + FIframeAttrTplTemplate := TExtXTemplate.CreateInternal(Self, 'iframeAttrTpl'); + FOriginalValue := TExtObject.CreateInternal(Self, 'originalValue'); + FValue := TExtObject.CreateInternal(Self, 'value'); end; -{$IFDEF FPC}constructor TExtFormFieldSpinner.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtFormFieldHtmlEditor.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtFormFieldSpinner.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +function TExtFormFieldHtmlEditor.BatchChanges(Fn : TExtObject) : TExtFunction; begin + JSCode(JSName + '.batchChanges(' + VarToJSON([Fn, false]) + ');', 'TExtFormFieldHtmlEditor'); + Result := Self; end; -function TExtFormFieldSpinner.GetTriggerWidth : TExtFunction; begin - JSCode(JSName + '.getTriggerWidth();', 'TExtFormFieldSpinner'); +function TExtFormFieldHtmlEditor.CheckChange : TExtFunction; begin + JSCode(JSName + '.checkChange();', 'TExtFormFieldHtmlEditor'); Result := Self; end; -function TExtFormFieldSpinner.SetSpinDownEnabled(Enabled : Boolean) : TExtFunction; begin - JSCode(JSName + '.setSpinDownEnabled(' + VarToJSON([Enabled]) + ');', 'TExtFormFieldSpinner'); +function TExtFormFieldHtmlEditor.CheckDirty : TExtFunction; begin + JSCode(JSName + '.checkDirty();', 'TExtFormFieldHtmlEditor'); Result := Self; end; -function TExtFormFieldSpinner.SetSpinUpEnabled(Enabled : Boolean) : TExtFunction; begin - JSCode(JSName + '.setSpinUpEnabled(' + VarToJSON([Enabled]) + ');', 'TExtFormFieldSpinner'); - Result := Self; +constructor TExtFormFieldHtmlEditor.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; end; -function TExtFormFieldSpinner.SpinDown : TExtFunction; begin - JSCode(JSName + '.spinDown();', 'TExtFormFieldSpinner'); +function TExtFormFieldHtmlEditor.ExtractFileInput : TExtFunction; begin + JSCode(JSName + '.extractFileInput();', 'TExtFormFieldHtmlEditor'); Result := Self; end; -function TExtFormFieldSpinner.SpinUp : TExtFunction; begin - JSCode(JSName + '.spinUp();', 'TExtFormFieldSpinner'); +function TExtFormFieldHtmlEditor.GetErrors(Value : TExtObject) : TExtFunction; begin + JSCode(JSName + '.getErrors(' + VarToJSON([Value, false]) + ');', 'TExtFormFieldHtmlEditor'); Result := Self; end; -destructor TExtFormFieldSpinner.Destroy; begin - try - FSpinDownEl.Free; - FSpinUpEl.Free; - except end; - inherited; +function TExtFormFieldHtmlEditor.GetModelData : TExtFunction; begin + JSCode(JSName + '.getModelData();', 'TExtFormFieldHtmlEditor'); + Result := Self; end; -procedure TExtFormFieldPicker.SetFEditable(Value : Boolean); begin - FEditable := Value; - JSCode('editable:' + VarToJSON([Value])); +function TExtFormFieldHtmlEditor.GetName : TExtFunction; begin + JSCode(JSName + '.getName();', 'TExtFormFieldHtmlEditor'); + Result := Self; end; -procedure TExtFormFieldPicker.SetFMatchFieldWidth(Value : Boolean); begin - FMatchFieldWidth := Value; - JSCode('matchFieldWidth:' + VarToJSON([Value])); +function TExtFormFieldHtmlEditor.GetSubmitData : TExtFunction; begin + JSCode(JSName + '.getSubmitData();', 'TExtFormFieldHtmlEditor'); + Result := Self; end; -procedure TExtFormFieldPicker.SetFOpenCls(Value : String); begin - FOpenCls := Value; - JSCode('openCls:' + VarToJSON([Value])); +function TExtFormFieldHtmlEditor.GetValue : TExtFunction; begin + JSCode(JSName + '.getValue();', 'TExtFormFieldHtmlEditor'); + Result := Self; end; -procedure TExtFormFieldPicker.SetFPickerAlign(Value : String); begin - FPickerAlign := Value; - JSCode('pickerAlign:' + VarToJSON([Value])); +function TExtFormFieldHtmlEditor.IsDirty : TExtFunction; begin + JSCode(JSName + '.isDirty();', 'TExtFormFieldHtmlEditor'); + Result := Self; end; -procedure TExtFormFieldPicker.SetFOnCollapse(Value : TExtFormFieldPickerOnCollapse); begin - if Assigned(FOnCollapse) then - JSCode(JSName+'.events ["collapse"].listeners=[];'); - if Assigned(Value) then - AddListener('collapse', Ajax('collapse', ['Field', '%0.nm'], true)); - FOnCollapse := Value; +function TExtFormFieldHtmlEditor.IsEqual(Value1 : TExtObject; Value2 : TExtObject) : TExtFunction; begin + JSCode(JSName + '.isEqual(' + VarToJSON([Value1, false, Value2, false]) + ');', 'TExtFormFieldHtmlEditor'); + Result := Self; end; -procedure TExtFormFieldPicker.SetFOnExpand(Value : TExtFormFieldPickerOnExpand); begin - if Assigned(FOnExpand) then - JSCode(JSName+'.events ["expand"].listeners=[];'); - if Assigned(Value) then - AddListener('expand', Ajax('expand', ['Field', '%0.nm'], true)); - FOnExpand := Value; +function TExtFormFieldHtmlEditor.IsFileUpload : TExtFunction; begin + JSCode(JSName + '.isFileUpload();', 'TExtFormFieldHtmlEditor'); + Result := Self; end; -procedure TExtFormFieldPicker.SetFOnSelect(Value : TExtFormFieldPickerOnSelect); begin - if Assigned(FOnSelect) then - JSCode(JSName+'.events ["select"].listeners=[];'); - if Assigned(Value) then - AddListener('select', Ajax('select', ['Field', '%0.nm','Value', '%1.nm'], true)); - FOnSelect := Value; +function TExtFormFieldHtmlEditor.IsValid : TExtFunction; begin + JSCode(JSName + '.isValid();', 'TExtFormFieldHtmlEditor'); + Result := Self; end; -function TExtFormFieldPicker.JSClassName : string; begin - Result := 'Ext.form.field.Picker'; +function TExtFormFieldHtmlEditor.Reset : TExtFunction; begin + JSCode(JSName + '.reset();', 'TExtFormFieldHtmlEditor'); + Result := Self; end; -procedure TExtFormFieldPicker.InitDefaults; begin - inherited; - FMatchFieldWidth := true; - FPickerAlign := 'tl-bl?'; +function TExtFormFieldHtmlEditor.ResetOriginalValue : TExtFunction; begin + JSCode(JSName + '.resetOriginalValue();', 'TExtFormFieldHtmlEditor'); + Result := Self; end; -{$IFDEF FPC}constructor TExtFormFieldPicker.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtFormFieldPicker.Collapse : TExtFunction; begin - JSCode(JSName + '.collapse();', 'TExtFormFieldPicker'); +function TExtFormFieldHtmlEditor.SetReadOnly(ReadOnly : Boolean) : TExtFunction; begin + JSCode(JSName + '.setReadOnly(' + VarToJSON([ReadOnly]) + ');', 'TExtFormFieldHtmlEditor'); Result := Self; end; -constructor TExtFormFieldPicker.Create; begin - CreateVar(JSClassName + '({});'); - InitDefaults; +function TExtFormFieldHtmlEditor.SetValue(Value : TExtObject) : TExtFunction; begin + JSCode(JSName + '.setValue(' + VarToJSON([Value, false]) + ');', 'TExtFormFieldHtmlEditor'); + Result := Self; end; -function TExtFormFieldPicker.Expand : TExtFunction; begin - JSCode(JSName + '.expand();', 'TExtFormFieldPicker'); +function TExtFormFieldHtmlEditor.ToggleSourceEdit(SourceEditMode : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.toggleSourceEdit(' + VarToJSON([SourceEditMode]) + ');', 'TExtFormFieldHtmlEditor'); Result := Self; end; -function TExtFormFieldPicker.GetPicker : TExtFunction; begin - JSCode(JSName + '.getPicker();', 'TExtFormFieldPicker'); +function TExtFormFieldHtmlEditor.Validate : TExtFunction; begin + JSCode(JSName + '.validate();', 'TExtFormFieldHtmlEditor'); Result := Self; end; -procedure TExtFormFieldPicker.HandleEvent(const AEvtName : string); begin +destructor TExtFormFieldHtmlEditor.Destroy; begin + try + FAfterIFrameTplList.Free; + FAfterIFrameTplTemplate.Free; + FAfterTextAreaTplList.Free; + FAfterTextAreaTplTemplate.Free; + FBeforeIFrameTplList.Free; + FBeforeIFrameTplTemplate.Free; + FBeforeTextAreaTplList.Free; + FBeforeTextAreaTplTemplate.Free; + FFontFamilies.Free; + FIframeAttrTplList.Free; + FIframeAttrTplTemplate.Free; + FOriginalValue.Free; + FValue.Free; + except end; inherited; - if (AEvtName = 'collapse') and Assigned(FOnCollapse) then - FOnCollapse(TExtFormFieldPicker(ParamAsObject('Field'))) - else if (AEvtName = 'expand') and Assigned(FOnExpand) then - FOnExpand(TExtFormFieldPicker(ParamAsObject('Field'))) - else if (AEvtName = 'select') and Assigned(FOnSelect) then - FOnSelect(TExtFormFieldPicker(ParamAsObject('Field')), TExtObject(ParamAsObject('Value'))); end; -procedure TExtFormCheckboxGroup.SetFAllowBlank(Value : Boolean); begin - FAllowBlank := Value; - JSCode('allowBlank:' + VarToJSON([Value])); +procedure TExtFormFieldHtmlEditor.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'activate') and Assigned(FOnActivate) then + FOnActivate(TExtFormFieldHtmlEditor(ParamAsObject('This'))) + else if (AEvtName = 'beforepush') and Assigned(FOnBeforepush) then + FOnBeforepush(TExtFormFieldHtmlEditor(ParamAsObject('This')), ParamAsString('Html')) + else if (AEvtName = 'beforesync') and Assigned(FOnBeforesync) then + FOnBeforesync(TExtFormFieldHtmlEditor(ParamAsObject('This')), ParamAsString('Html')) + else if (AEvtName = 'blur') and Assigned(FOnBlur) then + FOnBlur() + else if (AEvtName = 'editmodechange') and Assigned(FOnEditmodechange) then + FOnEditmodechange(TExtFormFieldHtmlEditor(ParamAsObject('This')), ParamAsBoolean('SourceEdit')) + else if (AEvtName = 'initialize') and Assigned(FOnInitialize) then + FOnInitialize(TExtFormFieldHtmlEditor(ParamAsObject('This'))) + else if (AEvtName = 'push') and Assigned(FOnPush) then + FOnPush(TExtFormFieldHtmlEditor(ParamAsObject('This')), ParamAsString('Html')) + else if (AEvtName = 'sync') and Assigned(FOnSync) then + FOnSync(TExtFormFieldHtmlEditor(ParamAsObject('This')), ParamAsString('Html')); end; -procedure TExtFormCheckboxGroup.SetFBlankText(Value : String); begin - FBlankText := Value; - JSCode('blankText:' + VarToJSON([Value])); +procedure TExtToolbarPaging.SetFAfterPageText(Value : String); begin + FAfterPageText := Value; + JSCode('afterPageText:' + VarToJSON([Value])); end; -procedure TExtFormCheckboxGroup.SetFColumns(Value : String); begin - FColumns := Value; - JSCode('columns:' + VarToJSON([Value])); +procedure TExtToolbarPaging.SetFBeforePageText(Value : String); begin + FBeforePageText := Value; + JSCode('beforePageText:' + VarToJSON([Value])); end; -procedure TExtFormCheckboxGroup.SetFColumnsInteger(Value : Integer); begin - FColumnsInteger := Value; - JSCode('columns:' + VarToJSON([Value])); +procedure TExtToolbarPaging.SetFDisplayInfo(Value : Boolean); begin + FDisplayInfo := Value; + JSCode('displayInfo:' + VarToJSON([Value])); end; -procedure TExtFormCheckboxGroup.SetFColumnsTArrayOfInteger(Value : TArrayOfInteger); begin - FColumnsTArrayOfInteger := Value; - JSCode('columns:' + ArrayToJSON(Value)); +procedure TExtToolbarPaging.SetFDisplayMsg(Value : String); begin + FDisplayMsg := Value; + JSCode('displayMsg:' + VarToJSON([Value])); end; -procedure TExtFormCheckboxGroup.SetFDisabled(Value : Boolean); begin - FDisabled := Value; - JSCode('disabled:' + VarToJSON([Value])); +procedure TExtToolbarPaging.SetFEmptyMsg(Value : String); begin + FEmptyMsg := Value; + JSCode('emptyMsg:' + VarToJSON([Value])); end; -procedure TExtFormCheckboxGroup.SetFFieldBodyCls(Value : String); begin - FFieldBodyCls := Value; - JSCode('fieldBodyCls:' + VarToJSON([Value])); +procedure TExtToolbarPaging.SetFFirstText(Value : String); begin + FFirstText := Value; + JSCode('firstText:' + VarToJSON([Value])); end; -procedure TExtFormCheckboxGroup.SetFItems(Value : TExtObjectList); begin - FItems := Value; - Value.DeleteFromGarbage; - JSCode('items:' + VarToJSON([Value, false])); +procedure TExtToolbarPaging.SetFInputItemWidth(Value : Integer); begin + FInputItemWidth := Value; + JSCode('inputItemWidth:' + VarToJSON([Value])); end; -procedure TExtFormCheckboxGroup.SetFItemsList(Value : TExtObjectList); begin - FItemsList := Value; - Value.DeleteFromGarbage; - JSCode('items:' + VarToJSON([Value, false])); +procedure TExtToolbarPaging.SetFLastText(Value : String); begin + FLastText := Value; + JSCode('lastText:' + VarToJSON([Value])); end; -procedure TExtFormCheckboxGroup.SetFName(Value : String); begin - FName := Value; - JSCode('name:' + VarToJSON([Value])); +procedure TExtToolbarPaging.SetFNextText(Value : String); begin + FNextText := Value; + JSCode('nextText:' + VarToJSON([Value])); end; -procedure TExtFormCheckboxGroup.SetFOriginalValue(Value : TExtObject); begin - FOriginalValue := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.originalValue=' + VarToJSON([Value, false]) + ';'); +procedure TExtToolbarPaging.SetFPrependButtons(Value : Boolean); begin + FPrependButtons := Value; + JSCode('prependButtons:' + VarToJSON([Value])); end; -procedure TExtFormCheckboxGroup.SetFSubmitValue(Value : Boolean); begin - FSubmitValue := Value; - JSCode('submitValue:' + VarToJSON([Value])); +procedure TExtToolbarPaging.SetFPrevText(Value : String); begin + FPrevText := Value; + JSCode('prevText:' + VarToJSON([Value])); end; -procedure TExtFormCheckboxGroup.SetFValidateOnChange(Value : Boolean); begin - FValidateOnChange := Value; - JSCode('validateOnChange:' + VarToJSON([Value])); +procedure TExtToolbarPaging.SetFRefreshText(Value : String); begin + FRefreshText := Value; + JSCode('refreshText:' + VarToJSON([Value])); end; -procedure TExtFormCheckboxGroup.SetFValue(Value : TExtObject); begin - FValue := Value; +procedure TExtToolbarPaging.SetFStore(Value : TExtDataStore); begin + FStore := Value; Value.DeleteFromGarbage; - if not ConfigAvailable(JSName) then - SetValue(Value) - else - JSCode('value:' + VarToJSON([Value, false])); + JSCode('store:' + VarToJSON([Value, false])); end; -procedure TExtFormCheckboxGroup.SetFVertical(Value : Boolean); begin - FVertical := Value; - JSCode('vertical:' + VarToJSON([Value])); +procedure TExtToolbarPaging.SetFOnBeforechange(Value : TExtToolbarPagingOnBeforechange); begin + if Assigned(FOnBeforechange) then + JSCode(JSName+'.events ["beforechange"].listeners=[];'); + if Assigned(Value) then + AddListener('beforechange', Ajax('beforechange', ['This', '%0.nm','Page', '%1'], true)); + FOnBeforechange := Value; end; -function TExtFormCheckboxGroup.JSClassName : string; begin - Result := 'Ext.form.CheckboxGroup'; +procedure TExtToolbarPaging.SetFOnChange(Value : TExtToolbarPagingOnChange); begin + if Assigned(FOnChange) then + JSCode(JSName+'.events ["change"].listeners=[];'); + if Assigned(Value) then + AddListener('change', Ajax('change', ['This', '%0.nm','PageData', '%1.nm'], true)); + FOnChange := Value; end; -procedure TExtFormCheckboxGroup.InitDefaults; begin - inherited; - FItems := TExtObjectList.Create(Self, 'items'); - FItemsList := TExtObjectList.Create(Self, 'items'); - FOriginalValue := TExtObject.CreateInternal(Self, 'originalValue'); - FValue := TExtObject.CreateInternal(Self, 'value'); +function TExtToolbarPaging.JSClassName : string; begin + Result := 'Ext.toolbar.Paging'; end; -{$IFDEF FPC}constructor TExtFormCheckboxGroup.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtFormCheckboxGroup.BatchChanges(Fn : TExtObject) : TExtFunction; begin - JSCode(JSName + '.batchChanges(' + VarToJSON([Fn, false]) + ');', 'TExtFormCheckboxGroup'); - Result := Self; +procedure TExtToolbarPaging.InitDefaults; begin + inherited; + FStore := TExtDataStore.CreateInternal(Self, 'store'); end; -function TExtFormCheckboxGroup.CheckChange : TExtFunction; begin - JSCode(JSName + '.checkChange();', 'TExtFormCheckboxGroup'); +{$IFDEF FPC}constructor TExtToolbarPaging.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +function TExtToolbarPaging.Bind(Store : TExtDataStore) : TExtFunction; begin + JSCode(JSName + '.bind(' + VarToJSON([Store, false]) + ');', 'TExtToolbarPaging'); Result := Self; end; -function TExtFormCheckboxGroup.CheckDirty : TExtFunction; begin - JSCode(JSName + '.checkDirty();', 'TExtFormCheckboxGroup'); +function TExtToolbarPaging.BindStore(Store : String = '') : TExtFunction; begin + JSCode(JSName + '.bindStore(' + VarToJSON([Store]) + ');', 'TExtToolbarPaging'); Result := Self; end; -constructor TExtFormCheckboxGroup.Create; begin +constructor TExtToolbarPaging.Create; begin CreateVar(JSClassName + '({});'); InitDefaults; end; -function TExtFormCheckboxGroup.ExtractFileInput : TExtFunction; begin - JSCode(JSName + '.extractFileInput();', 'TExtFormCheckboxGroup'); +function TExtToolbarPaging.DoRefresh : TExtFunction; begin + JSCode(JSName + '.doRefresh();', 'TExtToolbarPaging'); Result := Self; end; -function TExtFormCheckboxGroup.GetChecked : TExtFunction; begin - JSCode(JSName + '.getChecked();', 'TExtFormCheckboxGroup'); +function TExtToolbarPaging.GetStore : TExtFunction; begin + JSCode(JSName + '.getStore();', 'TExtToolbarPaging'); Result := Self; end; -function TExtFormCheckboxGroup.GetErrors : TExtFunction; begin - JSCode(JSName + '.getErrors();', 'TExtFormCheckboxGroup'); +function TExtToolbarPaging.MoveFirst : TExtFunction; begin + JSCode(JSName + '.moveFirst();', 'TExtToolbarPaging'); Result := Self; end; -function TExtFormCheckboxGroup.GetModelData : TExtFunction; begin - JSCode(JSName + '.getModelData();', 'TExtFormCheckboxGroup'); +function TExtToolbarPaging.MoveLast : TExtFunction; begin + JSCode(JSName + '.moveLast();', 'TExtToolbarPaging'); Result := Self; end; -function TExtFormCheckboxGroup.GetName : TExtFunction; begin - JSCode(JSName + '.getName();', 'TExtFormCheckboxGroup'); +function TExtToolbarPaging.MoveNext : TExtFunction; begin + JSCode(JSName + '.moveNext();', 'TExtToolbarPaging'); Result := Self; end; -function TExtFormCheckboxGroup.GetSubmitData : TExtFunction; begin - JSCode(JSName + '.getSubmitData();', 'TExtFormCheckboxGroup'); +function TExtToolbarPaging.MovePrevious : TExtFunction; begin + JSCode(JSName + '.movePrevious();', 'TExtToolbarPaging'); Result := Self; end; -function TExtFormCheckboxGroup.GetValue : TExtFunction; begin - JSCode(JSName + '.getValue();', 'TExtFormCheckboxGroup'); +function TExtToolbarPaging.Unbind(Store : TExtDataStore) : TExtFunction; begin + JSCode(JSName + '.unbind(' + VarToJSON([Store, false]) + ');', 'TExtToolbarPaging'); Result := Self; end; -function TExtFormCheckboxGroup.IsDirty : TExtFunction; begin - JSCode(JSName + '.isDirty();', 'TExtFormCheckboxGroup'); - Result := Self; +destructor TExtToolbarPaging.Destroy; begin + try + FStore.Free; + except end; + inherited; end; -function TExtFormCheckboxGroup.IsEqual(Value1 : TExtObject; Value2 : TExtObject) : TExtFunction; begin - JSCode(JSName + '.isEqual(' + VarToJSON([Value1, false, Value2, false]) + ');', 'TExtFormCheckboxGroup'); - Result := Self; +procedure TExtToolbarPaging.HandleEvent(const AEvtName : string); begin + inherited; + if (AEvtName = 'beforechange') and Assigned(FOnBeforechange) then + FOnBeforechange(TExtToolbarPaging(ParamAsObject('This')), ParamAsInteger('Page')) + else if (AEvtName = 'change') and Assigned(FOnChange) then + FOnChange(TExtToolbarPaging(ParamAsObject('This')), TExtObject(ParamAsObject('PageData'))); end; -function TExtFormCheckboxGroup.IsFileUpload : TExtFunction; begin - JSCode(JSName + '.isFileUpload();', 'TExtFormCheckboxGroup'); - Result := Self; +procedure TExtLayoutContainerAbsolute.SetFIgnoreOnContentChange(Value : Boolean); begin + FIgnoreOnContentChange := Value; + JSCode('ignoreOnContentChange:' + VarToJSON([Value])); end; -function TExtFormCheckboxGroup.IsValid : TExtFunction; begin - JSCode(JSName + '.isValid();', 'TExtFormCheckboxGroup'); - Result := Self; +function TExtLayoutContainerAbsolute.JSClassName : string; begin + Result := 'Ext.layout.container.Absolute'; end; -function TExtFormCheckboxGroup.Reset : TExtFunction; begin - JSCode(JSName + '.reset();', 'TExtFormCheckboxGroup'); - Result := Self; -end; +{$IFDEF FPC}constructor TExtLayoutContainerAbsolute.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtFormCheckboxGroup.ResetOriginalValue : TExtFunction; begin - JSCode(JSName + '.resetOriginalValue();', 'TExtFormCheckboxGroup'); - Result := Self; +procedure TExtLayoutContainerAccordion.SetFActiveOnTop(Value : Boolean); begin + FActiveOnTop := Value; + JSCode('activeOnTop:' + VarToJSON([Value])); end; -function TExtFormCheckboxGroup.SetValue(Value : TExtObject) : TExtFunction; begin - JSCode(JSName + '.setValue(' + VarToJSON([Value, false]) + ');', 'TExtFormCheckboxGroup'); - Result := Self; +procedure TExtLayoutContainerAccordion.SetFAnimate(Value : Boolean); begin + FAnimate := Value; + JSCode('animate:' + VarToJSON([Value])); end; -function TExtFormCheckboxGroup.Validate : TExtFunction; begin - JSCode(JSName + '.validate();', 'TExtFormCheckboxGroup'); - Result := Self; +procedure TExtLayoutContainerAccordion.SetFAutoWidth(Value : Boolean); begin + FAutoWidth := Value; + JSCode('autoWidth:' + VarToJSON([Value])); end; -destructor TExtFormCheckboxGroup.Destroy; begin - try - FItems.Free; - FItemsList.Free; - FOriginalValue.Free; - FValue.Free; - except end; - inherited; +procedure TExtLayoutContainerAccordion.SetFCollapseFirst(Value : Boolean); begin + FCollapseFirst := Value; + JSCode('collapseFirst:' + VarToJSON([Value])); end; -function TExtLayoutComponentFieldText.JSClassName : string; begin - Result := 'Ext.layout.component.field.Text'; +procedure TExtLayoutContainerAccordion.SetFFill(Value : Boolean); begin + FFill := Value; + JSCode('fill:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtLayoutComponentFieldText.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtLayoutContainerAccordion.SetFHideCollapseTool(Value : Boolean); begin + FHideCollapseTool := Value; + JSCode('hideCollapseTool:' + VarToJSON([Value])); +end; -function TExtLayoutComponentFieldTrigger.JSClassName : string; begin - Result := 'Ext.layout.component.field.Trigger'; +procedure TExtLayoutContainerAccordion.SetFMulti(Value : Boolean); begin + FMulti := Value; + JSCode('multi:' + VarToJSON([Value])); end; -{$IFDEF FPC}constructor TExtLayoutComponentFieldTrigger.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +procedure TExtLayoutContainerAccordion.SetFTitleCollapse(Value : Boolean); begin + FTitleCollapse := Value; + JSCode('titleCollapse:' + VarToJSON([Value])); +end; -function TExtLayoutComponentFieldSlider.JSClassName : string; begin - Result := 'Ext.layout.component.field.Slider'; +function TExtLayoutContainerAccordion.JSClassName : string; begin + Result := 'Ext.layout.container.Accordion'; end; -{$IFDEF FPC}constructor TExtLayoutComponentFieldSlider.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtLayoutContainerAccordion.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtLayoutComponentFieldFieldContainer.JSClassName : string; begin - Result := 'Ext.layout.component.field.FieldContainer'; +function TExtLayoutComponentFieldText.JSClassName : string; begin + Result := 'Ext.layout.component.field.Text'; end; -{$IFDEF FPC}constructor TExtLayoutComponentFieldFieldContainer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtLayoutComponentFieldText.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtLayoutComponentFieldSet.JSClassName : string; begin - Result := 'Ext.layout.component.FieldSet'; +function TExtLayoutComponentFieldTrigger.JSClassName : string; begin + Result := 'Ext.layout.component.field.Trigger'; end; -{$IFDEF FPC}constructor TExtLayoutComponentFieldSet.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtLayoutComponentFieldTrigger.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtPanelDD.JSClassName : string; begin - Result := 'Ext.panel.DD'; +function TExtDrawSpriteDD.JSClassName : string; begin + Result := 'Ext.draw.SpriteDD'; end; -{$IFDEF FPC}constructor TExtPanelDD.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtDrawSpriteDD.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} procedure TExtPickerTime.SetFFormat(Value : String); begin FFormat := Value; @@ -42211,6 +43594,72 @@ function TExtPickerTime.UpdateList : TExtFunction; begin Result := Self; end; +procedure TExtDdDragZone.SetFContainerScroll(Value : TExtObject); begin + FContainerScroll := Value; + Value.DeleteFromGarbage; + JSCode('containerScroll:' + VarToJSON([Value, false])); +end; + +procedure TExtDdDragZone.SetFContainerScrollBoolean(Value : Boolean); begin + FContainerScrollBoolean := Value; + JSCode('containerScroll:' + VarToJSON([Value])); +end; + +procedure TExtDdDragZone.SetFDragData(Value : TExtObject); begin + FDragData := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.dragData=' + VarToJSON([Value, false]) + ';'); +end; + +procedure TExtDdDragZone.SetFScrollEl(Value : String); begin + FScrollEl := Value; + JSCode('scrollEl:' + VarToJSON([Value])); +end; + +procedure TExtDdDragZone.SetFScrollElElement(Value : TExtDomElement); begin + FScrollElElement := Value; + Value.DeleteFromGarbage; + JSCode('scrollEl:' + VarToJSON([Value, false])); +end; + +procedure TExtDdDragZone.SetFScrollElTHTMLElement(Value : THTMLElement); begin + FScrollElTHTMLElement := Value; + Value.DeleteFromGarbage; + JSCode('scrollEl:' + VarToJSON([Value, false])); +end; + +function TExtDdDragZone.JSClassName : string; begin + Result := 'Ext.dd.DragZone'; +end; + +procedure TExtDdDragZone.InitDefaults; begin + inherited; + FContainerScroll := TExtObject.CreateInternal(Self, 'containerScroll'); + FDragData := TExtObject.CreateInternal(Self, 'dragData'); + FScrollElElement := TExtDomElement.CreateInternal(Self, 'scrollEl'); +end; + +{$IFDEF FPC}constructor TExtDdDragZone.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} + +constructor TExtDdDragZone.Create; begin + CreateVar(JSClassName + '({});'); + InitDefaults; +end; + +function TExtDdDragZone.GetDragData(E : TEvent) : TExtFunction; begin + JSCode(JSName + '.getDragData(' + VarToJSON([E, false]) + ');', 'TExtDdDragZone'); + Result := Self; +end; + +destructor TExtDdDragZone.Destroy; begin + try + FContainerScroll.Free; + FDragData.Free; + FScrollElElement.Free; + except end; + inherited; +end; + procedure TExtPanel.SetFAnimCollapse(Value : Boolean); begin FAnimCollapse := Value; JSCode('animCollapse:' + VarToJSON([Value])); @@ -42519,85 +43968,34 @@ destructor TExtPanel.Destroy; begin inherited; end; -procedure TExtLayoutContainerAbsolute.SetFIgnoreOnContentChange(Value : Boolean); begin - FIgnoreOnContentChange := Value; - JSCode('ignoreOnContentChange:' + VarToJSON([Value])); -end; - -function TExtLayoutContainerAbsolute.JSClassName : string; begin - Result := 'Ext.layout.container.Absolute'; -end; - -{$IFDEF FPC}constructor TExtLayoutContainerAbsolute.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtLayoutContainerAccordion.SetFActiveOnTop(Value : Boolean); begin - FActiveOnTop := Value; - JSCode('activeOnTop:' + VarToJSON([Value])); -end; - -procedure TExtLayoutContainerAccordion.SetFAnimate(Value : Boolean); begin - FAnimate := Value; - JSCode('animate:' + VarToJSON([Value])); -end; - -procedure TExtLayoutContainerAccordion.SetFAutoWidth(Value : Boolean); begin - FAutoWidth := Value; - JSCode('autoWidth:' + VarToJSON([Value])); -end; - -procedure TExtLayoutContainerAccordion.SetFCollapseFirst(Value : Boolean); begin - FCollapseFirst := Value; - JSCode('collapseFirst:' + VarToJSON([Value])); -end; - -procedure TExtLayoutContainerAccordion.SetFFill(Value : Boolean); begin - FFill := Value; - JSCode('fill:' + VarToJSON([Value])); -end; - -procedure TExtLayoutContainerAccordion.SetFHideCollapseTool(Value : Boolean); begin - FHideCollapseTool := Value; - JSCode('hideCollapseTool:' + VarToJSON([Value])); -end; - -procedure TExtLayoutContainerAccordion.SetFMulti(Value : Boolean); begin - FMulti := Value; - JSCode('multi:' + VarToJSON([Value])); +function TExtPanelDD.JSClassName : string; begin + Result := 'Ext.panel.DD'; end; -procedure TExtLayoutContainerAccordion.SetFTitleCollapse(Value : Boolean); begin - FTitleCollapse := Value; - JSCode('titleCollapse:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtPanelDD.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtLayoutContainerAccordion.JSClassName : string; begin - Result := 'Ext.layout.container.Accordion'; +function TExtLayoutComponentFieldSlider.JSClassName : string; begin + Result := 'Ext.layout.component.field.Slider'; end; -{$IFDEF FPC}constructor TExtLayoutContainerAccordion.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtLayoutComponentFieldSlider.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtGridView.JSClassName : string; begin - Result := 'Ext.grid.View'; +function TExtGridLockingHeaderContainer.JSClassName : string; begin + Result := 'Ext.grid.locking.HeaderContainer'; end; -{$IFDEF FPC}constructor TExtGridView.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtGridLockingHeaderContainer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtViewDropZone.JSClassName : string; begin - Result := 'Ext.view.DropZone'; +procedure TExtTabBar.SetFIsTabBar(Value : Boolean); begin + FIsTabBar := Value; + JSCode(JSName + '.isTabBar=' + VarToJSON([Value]) + ';'); end; -{$IFDEF FPC}constructor TExtViewDropZone.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - procedure TExtTabBar.SetFPlain(Value : Boolean); begin FPlain := Value; JSCode('plain:' + VarToJSON([Value])); end; -procedure TExtTabBar.SetFTitle(Value : String); begin - FTitle := Value; - JSCode('title:' + VarToJSON([Value])); -end; - procedure TExtTabBar.SetFOnChange(Value : TExtTabBarOnChange); begin if Assigned(FOnChange) then JSCode(JSName+'.events ["change"].listeners=[];'); @@ -42618,249 +44016,52 @@ procedure TExtTabBar.HandleEvent(const AEvtName : string); begin FOnChange(TExtTabBar(ParamAsObject('TabBar')), TExtTab(ParamAsObject('Tab')), TExtComponent(ParamAsObject('Card'))); end; -function TExtGridCellEditor.JSClassName : string; begin - Result := 'Ext.grid.CellEditor'; -end; - -{$IFDEF FPC}constructor TExtGridCellEditor.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -procedure TExtGridColumn.SetFAlign(Value : String); begin - FAlign := Value; - JSCode('align:' + VarToJSON([Value])); -end; - -procedure TExtGridColumn.SetFColumns(Value : TExtObjectList); begin - FColumns := Value; - Value.DeleteFromGarbage; - JSCode('columns:' + VarToJSON([Value, false])); -end; - -procedure TExtGridColumn.SetFDataIndex(Value : String); begin - FDataIndex := Value; - JSCode('dataIndex:' + VarToJSON([Value])); -end; - -procedure TExtGridColumn.SetFDraggable(Value : Boolean); begin - FDraggable := Value; - JSCode('draggable:' + VarToJSON([Value])); -end; - -procedure TExtGridColumn.SetFEditor(Value : TExtObject); begin - FEditor := Value; - Value.DeleteFromGarbage; - JSCode('editor:' + VarToJSON([Value, false])); -end; - -procedure TExtGridColumn.SetFEditorString(Value : String); begin - FEditorString := Value; - JSCode('editor:' + VarToJSON([Value])); -end; - -procedure TExtGridColumn.SetFEditRenderer(Value : TExtFunction); begin - FEditRenderer := Value; - JSCode('editRenderer:' + VarToJSON([Value, true])); -end; - -procedure TExtGridColumn.SetFEmptyCellText(Value : String); begin - FEmptyCellText := Value; - JSCode('emptyCellText:' + VarToJSON([Value])); -end; - -procedure TExtGridColumn.SetFGroupable(Value : Boolean); begin - FGroupable := Value; - JSCode('groupable:' + VarToJSON([Value])); -end; - -procedure TExtGridColumn.SetFHideable(Value : Boolean); begin - FHideable := Value; - JSCode('hideable:' + VarToJSON([Value])); -end; - -procedure TExtGridColumn.SetFIsHeader(Value : Boolean); begin - FIsHeader := Value; - JSCode(JSName + '.isHeader=' + VarToJSON([Value]) + ';'); -end; - -procedure TExtGridColumn.SetFLockable(Value : Boolean); begin - FLockable := Value; - JSCode('lockable:' + VarToJSON([Value])); -end; - -procedure TExtGridColumn.SetFLocked(Value : Boolean); begin - FLocked := Value; - JSCode('locked:' + VarToJSON([Value])); -end; - -procedure TExtGridColumn.SetFMenuDisabled(Value : Boolean); begin - FMenuDisabled := Value; - JSCode('menuDisabled:' + VarToJSON([Value])); -end; - -procedure TExtGridColumn.SetFMenuText(Value : String); begin - FMenuText := Value; - JSCode('menuText:' + VarToJSON([Value])); -end; - -procedure TExtGridColumn.SetFRenderer(Value : TExtFunction); begin - FRenderer := Value; - JSCode('renderer:' + VarToJSON([Value, true])); -end; - -procedure TExtGridColumn.SetFRendererString(Value : String); begin - FRendererString := Value; - JSCode('renderer:' + VarToJSON([Value])); -end; - -procedure TExtGridColumn.SetFResizable(Value : Boolean); begin - FResizable := Value; - JSCode('resizable:' + VarToJSON([Value])); -end; - -procedure TExtGridColumn.SetFScope(Value : TExtObject); begin - FScope := Value; - Value.DeleteFromGarbage; - JSCode('scope:' + VarToJSON([Value, false])); -end; - -procedure TExtGridColumn.SetFSortable(Value : Boolean); begin - FSortable := Value; - JSCode('sortable:' + VarToJSON([Value])); -end; - -procedure TExtGridColumn.SetFStateId(Value : String); begin - FStateId := Value; - JSCode('stateId:' + VarToJSON([Value])); -end; - -procedure TExtGridColumn.SetFTdCls(Value : String); begin - FTdCls := Value; - JSCode('tdCls:' + VarToJSON([Value])); -end; - -procedure TExtGridColumn.SetFText(Value : String); begin - FText := Value; - if not ConfigAvailable(JSName) then - SetText(Value) - else - JSCode('text:' + VarToJSON([Value])); -end; - -procedure TExtGridColumn.SetFTextEl(Value : TExtElement); begin - FTextEl := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.textEl=' + VarToJSON([Value, false]) + ';'); -end; - -procedure TExtGridColumn.SetFTooltip(Value : String); begin - FTooltip := Value; - JSCode('tooltip:' + VarToJSON([Value])); +function TExtGridColumnLayout.JSClassName : string; begin + Result := 'Ext.grid.ColumnLayout'; end; -procedure TExtGridColumn.SetFTooltipType(Value : String); begin - FTooltipType := Value; - JSCode('tooltipType:' + VarToJSON([Value])); -end; +{$IFDEF FPC}constructor TExtGridColumnLayout.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtGridColumn.SetFTriggerEl(Value : TExtElement); begin - FTriggerEl := Value; - Value.DeleteFromGarbage; - JSCode(JSName + '.triggerEl=' + VarToJSON([Value, false]) + ';'); +function TExtGridHeaderDropZone.JSClassName : string; begin + Result := 'Ext.grid.header.DropZone'; end; -function TExtGridColumn.JSClassName : string; begin - Result := 'Ext.grid.column.Column'; -end; +{$IFDEF FPC}constructor TExtGridHeaderDropZone.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -procedure TExtGridColumn.InitDefaults; begin - inherited; - FColumns := TExtObjectList.Create(Self, 'columns'); - FEditor := TExtObject.CreateInternal(Self, 'editor'); - FScope := TExtObject.CreateInternal(Self, 'scope'); - FTextEl := TExtElement.CreateInternal(Self, 'textEl'); - FTriggerEl := TExtElement.CreateInternal(Self, 'triggerEl'); +function TExtGridPropertyHeaderContainer.JSClassName : string; begin + Result := 'Ext.grid.property.HeaderContainer'; end; -{$IFDEF FPC}constructor TExtGridColumn.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -function TExtGridColumn.AutoSize(The : Integer) : TExtFunction; begin - JSCode(JSName + '.autoSize(' + VarToJSON([The]) + ');', 'TExtGridColumn'); - Result := Self; -end; +{$IFDEF FPC}constructor TExtGridPropertyHeaderContainer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -constructor TExtGridColumn.Create; begin - CreateVar(JSClassName + '({});'); +constructor TExtGridPropertyHeaderContainer.Create(Grid : TExtGridPropertyGrid; Source : TExtObject); begin + CreateVar(JSClassName + '(' + VarToJSON([Grid, false, Source, false]) + ');'); InitDefaults; end; -function TExtGridColumn.GetIndex : TExtFunction; begin - JSCode(JSName + '.getIndex();', 'TExtGridColumn'); - Result := Self; -end; - -function TExtGridColumn.GetSortParam : TExtFunction; begin - JSCode(JSName + '.getSortParam();', 'TExtGridColumn'); - Result := Self; -end; - -function TExtGridColumn.GetVisibleIndex : TExtFunction; begin - JSCode(JSName + '.getVisibleIndex();', 'TExtGridColumn'); - Result := Self; -end; - -function TExtGridColumn.IsHideable : TExtFunction; begin - JSCode(JSName + '.isHideable();', 'TExtGridColumn'); - Result := Self; -end; - -function TExtGridColumn.IsLockable : TExtFunction; begin - JSCode(JSName + '.isLockable();', 'TExtGridColumn'); - Result := Self; -end; - -function TExtGridColumn.SetText(Text : String) : TExtFunction; begin - JSCode(JSName + '.setText(' + VarToJSON([Text]) + ');', 'TExtGridColumn'); - Result := Self; -end; - -destructor TExtGridColumn.Destroy; begin - try - FColumns.Free; - FEditor.Free; - FScope.Free; - FTextEl.Free; - FTriggerEl.Free; - except end; - inherited; -end; - -function TExtGridLockingHeaderContainer.JSClassName : string; begin - Result := 'Ext.grid.locking.HeaderContainer'; +function TExtLayoutComponentFieldSet.JSClassName : string; begin + Result := 'Ext.layout.component.FieldSet'; end; -{$IFDEF FPC}constructor TExtGridLockingHeaderContainer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtLayoutComponentFieldSet.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtGridHeaderDropZone.JSClassName : string; begin - Result := 'Ext.grid.header.DropZone'; +function TExtLayoutComponentFieldFieldContainer.JSClassName : string; begin + Result := 'Ext.layout.component.field.FieldContainer'; end; -{$IFDEF FPC}constructor TExtGridHeaderDropZone.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtLayoutComponentFieldFieldContainer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtGridColumnLayout.JSClassName : string; begin - Result := 'Ext.grid.ColumnLayout'; +function TExtGridView.JSClassName : string; begin + Result := 'Ext.grid.View'; end; -{$IFDEF FPC}constructor TExtGridColumnLayout.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +{$IFDEF FPC}constructor TExtGridView.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} -function TExtGridPropertyHeaderContainer.JSClassName : string; begin - Result := 'Ext.grid.property.HeaderContainer'; +function TExtViewDragZone.JSClassName : string; begin + Result := 'Ext.view.DragZone'; end; -{$IFDEF FPC}constructor TExtGridPropertyHeaderContainer.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - -constructor TExtGridPropertyHeaderContainer.Create(Grid : TExtGridPropertyGrid; Source : TExtObject); begin - CreateVar(JSClassName + '(' + VarToJSON([Grid, false, Source, false]) + ');'); - InitDefaults; -end; +{$IFDEF FPC}constructor TExtViewDragZone.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} procedure TExtWindow.SetFAnimateTarget(Value : String); begin FAnimateTarget := Value; @@ -42904,7 +44105,7 @@ procedure TExtWindow.SetFDd(Value : TExtUtilComponentDragger); begin JSCode(JSName + '.dd=' + VarToJSON([Value, false]) + ';'); end; -procedure TExtWindow.SetFDefaultFocus(Value : String); begin +procedure TExtWindow.SetFDefaultFocus(Value : Integer); begin FDefaultFocus := Value; JSCode('defaultFocus:' + VarToJSON([Value])); end; @@ -42915,8 +44116,8 @@ procedure TExtWindow.SetFDefaultFocusComponent(Value : TExtComponent); begin JSCode('defaultFocus:' + VarToJSON([Value, false])); end; -procedure TExtWindow.SetFDefaultFocusInteger(Value : Integer); begin - FDefaultFocusInteger := Value; +procedure TExtWindow.SetFDefaultFocusString(Value : String); begin + FDefaultFocusString := Value; JSCode('defaultFocus:' + VarToJSON([Value])); end; @@ -43060,12 +44261,6 @@ destructor TExtWindow.Destroy; begin inherited; end; -function TExtViewDragZone.JSClassName : string; begin - Result := 'Ext.view.DragZone'; -end; - -{$IFDEF FPC}constructor TExtViewDragZone.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} - procedure TExtGridColumnNumber.SetFFormat(Value : String); begin FFormat := Value; JSCode('format:' + VarToJSON([Value])); @@ -43518,6 +44713,11 @@ procedure TExtFormFieldComboBox.SetFHiddenName(Value : String); begin JSCode('hiddenName:' + VarToJSON([Value])); end; +procedure TExtFormFieldComboBox.SetFLastQuery(Value : String); begin + FLastQuery := Value; + JSCode(JSName + '.lastQuery=' + VarToJSON([Value]) + ';'); +end; + procedure TExtFormFieldComboBox.SetFListConfig(Value : TExtObject); begin FListConfig := Value; Value.DeleteFromGarbage; @@ -43790,6 +44990,12 @@ procedure TExtGridColumnAction.SetFItems(Value : TExtObjectList); begin JSCode('items:' + VarToJSON([Value, false])); end; +procedure TExtGridColumnAction.SetFItems_(Value : TExtObjectList); begin + FItems_ := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.items=' + VarToJSON([Value, false]) + ';'); +end; + procedure TExtGridColumnAction.SetFMenuText(Value : String); begin FMenuText := Value; JSCode('menuText:' + VarToJSON([Value])); @@ -43818,6 +45024,7 @@ function TExtGridColumnAction.JSClassName : string; begin procedure TExtGridColumnAction.InitDefaults; begin inherited; FItems := TExtObjectList.Create(Self, 'items'); + FItems_ := TExtObjectList.Create(Self, 'items'); FScope := TExtObject.CreateInternal(Self, 'scope'); end; @@ -43841,6 +45048,7 @@ function TExtGridColumnAction.EnableAction(Index : Integer; Silent : Boolean = f destructor TExtGridColumnAction.Destroy; begin try FItems.Free; + FItems_.Free; FScope.Free; except end; inherited; @@ -44180,6 +45388,11 @@ procedure TExtPanelTable.SetFForceFit(Value : Boolean); begin JSCode('forceFit:' + VarToJSON([Value])); end; +procedure TExtPanelTable.SetFHasView(Value : Boolean); begin + FHasView := Value; + JSCode(JSName + '.hasView=' + VarToJSON([Value]) + ';'); +end; + procedure TExtPanelTable.SetFHideHeaders(Value : Boolean); begin FHideHeaders := Value; JSCode('hideHeaders:' + VarToJSON([Value])); @@ -44256,11 +45469,6 @@ procedure TExtPanelTable.SetFViewConfig(Value : TExtObject); begin JSCode('viewConfig:' + VarToJSON([Value, false])); end; -procedure TExtPanelTable.SetFViewType(Value : String); begin - FViewType := Value; - JSCode('viewType:' + VarToJSON([Value])); -end; - procedure TExtPanelTable.SetFOnBeforecellclick(Value : TExtPanelTableOnBeforecellclick); begin if Assigned(FOnBeforecellclick) then JSCode(JSName+'.events ["beforecellclick"].listeners=[];'); @@ -44925,19 +46133,22 @@ function TExtTip.ShowBy(El : String; Position : String = '') : TExtFunction; beg Result := Self; end; -procedure TExtTabPanel.SetFActiveItem(Value : String); begin +procedure TExtTabPanel.SetFActiveItem(Value : Integer); begin FActiveItem := Value; JSCode('activeItem:' + VarToJSON([Value])); end; -procedure TExtTabPanel.SetFActiveItemInteger(Value : Integer); begin - FActiveItemInteger := Value; +procedure TExtTabPanel.SetFActiveItemString(Value : String); begin + FActiveItemString := Value; JSCode('activeItem:' + VarToJSON([Value])); end; -procedure TExtTabPanel.SetFActiveTab(Value : String); begin +procedure TExtTabPanel.SetFActiveTab(Value : Integer); begin FActiveTab := Value; - JSCode('activeTab:' + VarToJSON([Value])); + if not ConfigAvailable(JSName) then + SetActiveTab(Value) + else + JSCode('activeTab:' + VarToJSON([Value])); end; procedure TExtTabPanel.SetFActiveTabComponent(Value : TExtComponent); begin @@ -44946,8 +46157,8 @@ procedure TExtTabPanel.SetFActiveTabComponent(Value : TExtComponent); begin JSCode('activeTab:' + VarToJSON([Value, false])); end; -procedure TExtTabPanel.SetFActiveTabInteger(Value : Integer); begin - FActiveTabInteger := Value; +procedure TExtTabPanel.SetFActiveTabString(Value : String); begin + FActiveTabString := Value; JSCode('activeTab:' + VarToJSON([Value])); end; @@ -45104,15 +46315,9 @@ procedure TExtMenu.SetFIgnoreParentClicks(Value : Boolean); begin JSCode('ignoreParentClicks:' + VarToJSON([Value])); end; -procedure TExtMenu.SetFLayout(Value : TExtEnumsLayout); begin - FLayout := Value; - JSCode('layout:"' + EnumToJSString(TypeInfo(TExtEnumsLayout), ord(Value)) + '"'); -end; - -procedure TExtMenu.SetFLayoutObject(Value : TExtObject); begin - FLayoutObject := Value; - Value.DeleteFromGarbage; - JSCode('layout:' + VarToJSON([Value, false])); +procedure TExtMenu.SetFIsMenu(Value : Boolean); begin + FIsMenu := Value; + JSCode(JSName + '.isMenu=' + VarToJSON([Value]) + ';'); end; procedure TExtMenu.SetFMinWidth(Value : Integer); begin @@ -45120,6 +46325,12 @@ procedure TExtMenu.SetFMinWidth(Value : Integer); begin JSCode('minWidth:' + VarToJSON([Value])); end; +procedure TExtMenu.SetFParentMenu(Value : TExtMenu); begin + FParentMenu := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.parentMenu=' + VarToJSON([Value, false]) + ';'); +end; + procedure TExtMenu.SetFPlain(Value : Boolean); begin FPlain := Value; JSCode('plain:' + VarToJSON([Value])); @@ -45169,7 +46380,7 @@ function TExtMenu.JSClassName : string; begin procedure TExtMenu.InitDefaults; begin inherited; FHidden := true; - FLayoutObject := TExtObject.CreateInternal(Self, 'layout'); + FParentMenu := TExtMenu.CreateInternal(Self, 'parentMenu'); end; {$IFDEF FPC}constructor TExtMenu.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} @@ -45191,7 +46402,7 @@ function TExtMenu.DeactivateActiveItem : TExtFunction; begin destructor TExtMenu.Destroy; begin try - FLayoutObject.Free; + FParentMenu.Free; except end; inherited; end; @@ -45287,6 +46498,12 @@ procedure TExtTipToolTip.SetFTrackMouse(Value : Boolean); begin JSCode('trackMouse:' + VarToJSON([Value])); end; +procedure TExtTipToolTip.SetFTriggerElement(Value : THTMLElement); begin + FTriggerElement := Value; + Value.DeleteFromGarbage; + JSCode(JSName + '.triggerElement=' + VarToJSON([Value, false]) + ';'); +end; + function TExtTipToolTip.JSClassName : string; begin Result := 'Ext.tip.ToolTip'; end; @@ -45785,8 +47002,8 @@ function TExtWindowMessageBox.SetIcon(Icon : String; Width : Integer = 0; Height Result := Self; end; -function TExtWindowMessageBox.Show(Config : TExtObject; ConfigAnimateTarget : String; ConfigButtons : Integer = 0; ConfigClosable : Boolean = false; ConfigCls : String = ''; ConfigDefaultTextHeight : Integer = 0; ConfigFn : TExtFunction = nil; ConfigFnButtonId : String = ''; ConfigFnText : String = ''; ConfigFnOpt : TExtObject = nil; ConfigButtonText : TExtObject = nil; ConfigScope : TExtObject = nil; ConfigIcon : String = ''; ConfigIconCls : String = ''; ConfigDefaultFocus : String = ''; ConfigMaxWidth : Integer = 0; ConfigMinWidth : Integer = 0; ConfigModal : Boolean = false; ConfigMsg : String = ''; ConfigMultiline : Boolean = false; ConfigProgress : Boolean = false; ConfigProgressText : String = ''; ConfigPrompt : Boolean = false; ConfigProxyDrag : Boolean = false; ConfigTitle : String = ''; ConfigValue : String = ''; ConfigWait : Boolean = false; ConfigWaitConfig : TExtObject = nil; ConfigWidth : Integer = 0) : TExtFunction; begin - JSCode(JSName + '.show(' + VarToJSON([Config, false, ConfigAnimateTarget, ConfigButtons, ConfigClosable, ConfigCls, ConfigDefaultTextHeight, ConfigFn, true, ConfigFnButtonId, ConfigFnText, ConfigFnOpt, false, ConfigButtonText, false, ConfigScope, false, ConfigIcon, ConfigIconCls, ConfigDefaultFocus, ConfigMaxWidth, ConfigMinWidth, ConfigModal, ConfigMsg, ConfigMultiline, ConfigProgress, ConfigProgressText, ConfigPrompt, ConfigProxyDrag, ConfigTitle, ConfigValue, ConfigWait, ConfigWaitConfig, false, ConfigWidth]) + ');', 'TExtWindowMessageBox'); +function TExtWindowMessageBox.Show(Config : TExtShowConfig) : TExtFunction; begin + JSCode(JSName + '.show(' + VarToJSON([Config, false]) + ');', 'TExtWindowMessageBox'); Result := Self; end; @@ -46151,19 +47368,63 @@ function TExtMessageBoxSingleton.JSClassName : string; begin Result := 'Ext.MessageBox'; end; +class function TExtMessageBoxSingleton.CANCEL : Integer; begin + Result := 8 +end; + +class function TExtMessageBoxSingleton.ERROR : String; begin + Result := 'ext-mb-error' +end; + +class function TExtMessageBoxSingleton.INFO : String; begin + Result := 'ext-mb-info' +end; + +class function TExtMessageBoxSingleton.NO : Integer; begin + Result := 4 +end; + +class function TExtMessageBoxSingleton.OK : Integer; begin + Result := 1 +end; + +class function TExtMessageBoxSingleton.OKCANCEL : Integer; begin + Result := 9 +end; + +class function TExtMessageBoxSingleton.QUESTION : String; begin + Result := 'ext-mb-question' +end; + +class function TExtMessageBoxSingleton.WARNING : String; begin + Result := 'ext-mb-warning' +end; + +class function TExtMessageBoxSingleton.YES : Integer; begin + Result := 2 +end; + +class function TExtMessageBoxSingleton.YESNO : Integer; begin + Result := 6 +end; + +class function TExtMessageBoxSingleton.YESNOCANCEL : Integer; begin + Result := 14 +end; + {$IFDEF FPC}constructor TExtMessageBoxSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} initialization - ExtFormFieldVTypes := TExtFormFieldVTypesSingleton.CreateSingleton; - ExtFxManager := TExtFxManagerSingleton.CreateSingleton; ExtFxCubicBezier := TExtFxCubicBezierSingleton.CreateSingleton; ExtFxEasing := TExtFxEasingSingleton.CreateSingleton; + ExtFxManager := TExtFxManagerSingleton.CreateSingleton; ExtMenuManager := TExtMenuManagerSingleton.CreateSingleton; - ExtEventObjectImpl := TExtEventObjectImplSingleton.CreateSingleton; + ExtFormFieldVTypes := TExtFormFieldVTypesSingleton.CreateSingleton; ExtFocusManager := TExtFocusManagerSingleton.CreateSingleton; + ExtEventObjectImpl := TExtEventObjectImplSingleton.CreateSingleton; ExtDrawEngineImageExporter := TExtDrawEngineImageExporterSingleton.CreateSingleton; - ExtDraw := TExtDrawSingleton.CreateSingleton; ExtDrawEngineSvgExporter := TExtDrawEngineSvgExporterSingleton.CreateSingleton; + ExtDraw := TExtDrawSingleton.CreateSingleton; ExtShadowPool := TExtShadowPoolSingleton.CreateSingleton; ExtStateManager := TExtStateManagerSingleton.CreateSingleton; ExtUtilCookies := TExtUtilCookiesSingleton.CreateSingleton; @@ -46172,62 +47433,62 @@ initialization ExtUtilInflector := TExtUtilInflectorSingleton.CreateSingleton; ExtUtilHistory := TExtUtilHistorySingleton.CreateSingleton; ExtPerfMonitor := TExtPerfMonitorSingleton.CreateSingleton; - ExtDataValidations := TExtDataValidationsSingleton.CreateSingleton; - ExtDataTypes := TExtDataTypesSingleton.CreateSingleton; ExtDataSortTypes := TExtDataSortTypesSingleton.CreateSingleton; - ExtChartShape := TExtChartShapeSingleton.CreateSingleton; + ExtDataJsonP := TExtDataJsonPSingleton.CreateSingleton; + ExtComponentQuery := TExtComponentQuerySingleton.CreateSingleton; ExtButtonManager := TExtButtonManagerSingleton.CreateSingleton; ExtAppEventBus := TExtAppEventBusSingleton.CreateSingleton; - ExtDdRegistry := TExtDdRegistrySingleton.CreateSingleton; + ExtChartShape := TExtChartShapeSingleton.CreateSingleton; + ExtDirectManager := TExtDirectManagerSingleton.CreateSingleton; ExtDdScrollManager := TExtDdScrollManagerSingleton.CreateSingleton; + ExtDataValidations := TExtDataValidationsSingleton.CreateSingleton; + ExtDataTypes := TExtDataTypesSingleton.CreateSingleton; + ExtDdRegistry := TExtDdRegistrySingleton.CreateSingleton; ExtDdDragDropManager := TExtDdDragDropManagerSingleton.CreateSingleton; - ExtDirectManager := TExtDirectManagerSingleton.CreateSingleton; - ExtComponentQuery := TExtComponentQuerySingleton.CreateSingleton; - ExtDataJsonP := TExtDataJsonPSingleton.CreateSingleton; ExtModelManager := TExtModelManagerSingleton.CreateSingleton; ExtUtilTaskManager := TExtUtilTaskManagerSingleton.CreateSingleton; - ExtComponentManager := TExtComponentManagerSingleton.CreateSingleton; - ExtAjax := TExtAjaxSingleton.CreateSingleton; - ExtDomHelper := TExtDomHelperSingleton.CreateSingleton; - ExtAppDomainStore := TExtAppDomainStoreSingleton.CreateSingleton; ExtPluginManager := TExtPluginManagerSingleton.CreateSingleton; - ExtAppDomainComponent := TExtAppDomainComponentSingleton.CreateSingleton; + ExtAppDomainDirect := TExtAppDomainDirectSingleton.CreateSingleton; ExtAppDomainController := TExtAppDomainControllerSingleton.CreateSingleton; + ExtAppDomainComponent := TExtAppDomainComponentSingleton.CreateSingleton; ExtAppDomainGlobal := TExtAppDomainGlobalSingleton.CreateSingleton; - ExtAppDomainDirect := TExtAppDomainDirectSingleton.CreateSingleton; + ExtDomHelper := TExtDomHelperSingleton.CreateSingleton; + ExtAjax := TExtAjaxSingleton.CreateSingleton; + ExtComponentManager := TExtComponentManagerSingleton.CreateSingleton; + ExtAppDomainStore := TExtAppDomainStoreSingleton.CreateSingleton; ExtFormRadioManager := TExtFormRadioManagerSingleton.CreateSingleton; - ExtFormCheckboxManager := TExtFormCheckboxManagerSingleton.CreateSingleton; ExtDataStoreManager := TExtDataStoreManagerSingleton.CreateSingleton; + ExtFormCheckboxManager := TExtFormCheckboxManagerSingleton.CreateSingleton; ExtMessageBox := TExtMessageBoxSingleton.CreateSingleton; finalization ExtMessageBox.Destroy; - ExtDataStoreManager.Destroy; ExtFormCheckboxManager.Destroy; + ExtDataStoreManager.Destroy; ExtFormRadioManager.Destroy; - ExtAppDomainDirect.Destroy; + ExtAppDomainStore.Destroy; + ExtComponentManager.Destroy; + ExtAjax.Destroy; + ExtDomHelper.Destroy; ExtAppDomainGlobal.Destroy; - ExtAppDomainController.Destroy; ExtAppDomainComponent.Destroy; + ExtAppDomainController.Destroy; + ExtAppDomainDirect.Destroy; ExtPluginManager.Destroy; - ExtAppDomainStore.Destroy; - ExtDomHelper.Destroy; - ExtAjax.Destroy; - ExtComponentManager.Destroy; ExtUtilTaskManager.Destroy; ExtModelManager.Destroy; - ExtDataJsonP.Destroy; - ExtComponentQuery.Destroy; - ExtDirectManager.Destroy; ExtDdDragDropManager.Destroy; - ExtDdScrollManager.Destroy; ExtDdRegistry.Destroy; + ExtDataTypes.Destroy; + ExtDataValidations.Destroy; + ExtDdScrollManager.Destroy; + ExtDirectManager.Destroy; + ExtChartShape.Destroy; ExtAppEventBus.Destroy; ExtButtonManager.Destroy; - ExtChartShape.Destroy; + ExtComponentQuery.Destroy; + ExtDataJsonP.Destroy; ExtDataSortTypes.Destroy; - ExtDataTypes.Destroy; - ExtDataValidations.Destroy; ExtPerfMonitor.Destroy; ExtUtilHistory.Destroy; ExtUtilInflector.Destroy; @@ -46236,14 +47497,14 @@ finalization ExtUtilCookies.Destroy; ExtStateManager.Destroy; ExtShadowPool.Destroy; - ExtDrawEngineSvgExporter.Destroy; ExtDraw.Destroy; + ExtDrawEngineSvgExporter.Destroy; ExtDrawEngineImageExporter.Destroy; - ExtFocusManager.Destroy; ExtEventObjectImpl.Destroy; + ExtFocusManager.Destroy; + ExtFormFieldVTypes.Destroy; ExtMenuManager.Destroy; + ExtFxManager.Destroy; ExtFxEasing.Destroy; ExtFxCubicBezier.Destroy; - ExtFxManager.Destroy; - ExtFormFieldVTypes.Destroy; end. \ No newline at end of file diff --git a/ExtJSWrapper/ExtFixes.txt b/ExtJSWrapper/ExtFixes.txt index 9b4635d..c1fd77f 100644 --- a/ExtJSWrapper/ExtFixes.txt +++ b/ExtJSWrapper/ExtFixes.txt @@ -1,4 +1,4 @@ -* For Ext JS 3.0 and later +* For Ext JS 4.0 and later * USED FORMATS in ExtFixes.txt * * Adding new classes: @@ -10,6 +10,12 @@ * Changing a property type to enumeration ,,<(enumerated list)> * +* Changing a type to enumeration +,<(enumerated list)> +* +* Aliasing a type +, +* * Adding and updating methods: ,,,, * @@ -22,9 +28,67 @@ * For each event parameter: , * +ExtComponent, split, Boolean, false, true, +ExtComponent, cmargins, string, false, true, +ExtComponent, minSize, Integer, false, true, +ExtComponent, maxSize, Integer, false, true, +ExtComponent, anchor, string, false, true, +ExtDataRecord, TExtDataModel +ExtDataModel, Create,, true, false, Data, ExtObjectList, false + ExtEnumsLayout, (laAbsolute, laAccordion, laAnchor, laAutocomponent, laAutocontainer, laBorder, laBox, laCard, laCheckboxgroup, laColumn, laContainer, laFit, laForm, laHbox, laTable, laVbox) ExtMessageBox, ExtWindowMessageBox, singleton, Ext.MessageBox +ExtWindowMessageBox, show, ExtFunction, false, false, Config, ExtShowConfig, false + +ExtMessageBoxSingleton, ERROR, string, true, false, 'ext-mb-error' +ExtMessageBoxSingleton, INFO, string, true, false, 'ext-mb-info' +ExtMessageBoxSingleton, QUESTION, string, true, false, 'ext-mb-question' +ExtMessageBoxSingleton, WARNING, string, true, false, 'ext-mb-warning' +ExtMessageBoxSingleton, OK, Integer, true, false, 1 +ExtMessageBoxSingleton, YES, Integer, true, false, 2 +ExtMessageBoxSingleton, NO, Integer, true, false, 4 +ExtMessageBoxSingleton, CANCEL, Integer, true, false, 8 +ExtMessageBoxSingleton, OKCANCEL, Integer, true, false, 9 +ExtMessageBoxSingleton, YESNO, Integer, true, false, 6 +ExtMessageBoxSingleton, YESNOCANCEL, Integer, true, false, 14 + +ExtShowConfig,, Ext, Object +ExtShowConfig, animTarget, string, false, true, +ExtShowConfig, buttons, Integer, false, true, +ExtShowConfig, closable, Boolean, false, true, true +ExtShowConfig, cls, string, false, true, +ExtShowConfig, defaultTextHeight, Integer, false, true, 75 +ExtShowConfig, fn, ExtFunction, false, true, +ExtShowConfig, scope, ExtObject, false, true, +ExtShowConfig, icon, string, false, true, +ExtShowConfig, iconCls, string, false, true, +ExtShowConfig, defaultFocus, string, false, true, +ExtShowConfig, maxWidth, Integer, false, true, 600 +ExtShowConfig, minWidth, Integer, false, true, 100 +ExtShowConfig, modal, Boolean, false, true, true +ExtShowConfig, msg, string, false, true, +ExtShowConfig, multiline, Boolean, false, true, +ExtShowConfig, progress, Boolean, false, true, +ExtShowConfig, progressText, string, false, true, +ExtShowConfig, prompt, Boolean, false, true, +ExtShowConfig, proxyDrag, Boolean, false, true, +ExtShowConfig, title, string, false, true, +ExtShowConfig, value, string, false, true, +ExtShowConfig, wait, Boolean, false, true, +ExtShowConfig, waitConfig, ExtProgressWaitConfig, false, true, +ExtShowConfig, width, Integer, false, true, +ExtProgressWaitConfig,, Ext, Object +ExtProgressWaitConfig, duration, Integer, false, true, +ExtProgressWaitConfig, interval, Integer, false, true, 1000 +ExtProgressWaitConfig, animate, Boolean, false, true, +ExtProgressWaitConfig, increment, Integer, false, true, 10 +ExtProgressWaitConfig, text, string, false, true, +ExtProgressWaitConfig, fn, ExtFunction, false, true, +ExtProgressWaitConfig, scope, ExtObject, false, true, + + + *ExtBoxComponent, region, (rgCenter, rgNorth, rgEast, rgSouth, rgWest) *ExtComponent, xtype, (xtBox, xtButton, xtButtonGroup, xtColorPalette, xtComponent, xtContainer, xtCycle, xtDataView, xtDatePicker, xtEditor, xtEditorGrid, xtFlash, xtGrid, xtListView, xtPaging, xtPanel, xtProgress, xtPropertyGrid, xtSlider, xtSpacer, xtSplitButton, xtStatusBar, xtTabPanel, xtTreePanel, xtViewPort, xtWindow, xtToolbar, xtTBButton, xtTBFill, xtTBItem, xtTBSeparator, xtTBSpacer, xtTBSplit, xtTBText, xtMenu, xtColorMenu, xtDateMenu, xtMenuBaseItem, xtMenuCheckItem, xtMenuItem, xtMenuSeparator, xtMenuTextItem, xtForm, xtCheckBox, xtCheckBoxGroup, xtCombo, xtDateField, xtDisplayField, xtField, xtFieldSet, xtHidden, xtHTMLEditor, xtLabel, xtNumberField, xtRadio, xtRadioGroup, xtTextArea, xtTextField, xtTimeField, xtTrigger, xtChart, xtBarChart, xtCartesianChart, xtColumnChart, xtLineChart, xtPieChart) *ExtContainer, defaultType, (ExtComponentXType) diff --git a/ExtJSWrapper/ExtToPascal.dpr b/ExtJSWrapper/ExtToPascal.dpr index d6e9e92..e9ae68b 100644 --- a/ExtJSWrapper/ExtToPascal.dpr +++ b/ExtJSWrapper/ExtToPascal.dpr @@ -12,7 +12,7 @@ program ExtToPascal; uses SysUtils, StrUtils, Classes, ExtPascalUtils -, Ext +//, Ext ; {.$DEFINE USES_PUBLISHED} @@ -426,17 +426,17 @@ var IsEvent, Optional, Static, Singleton: boolean; I, Ci : integer; begin - if Before('@protected', '*/', Line, false) or - Before('@ignore', '*/', Line, false) or - Before('@deprecated','*/', Line, false) or - Before('@abstract', '*/', Line, false) then exit; + if Before('@protected', '*/', Line) or + Before('@ignore', '*/', Line) or + Before('@deprecated','*/', Line) or + Before('@abstract', '*/', Line) then exit; State := Initial; Matches := TStringList.Create; while true do begin case State of Initial : begin JSName := ''; - Singleton := Before('@singleton', 'Ext.define(', Line, false); + Singleton := Before('@singleton', 'Ext.define(', Line); Extract(['/**', '*/'], Line, Matches); if (JSName <> '') or Extract(['Ext.define(' + AP, AP], Line, Matches) or @@ -449,7 +449,7 @@ begin else CurClass := TClass(AllClasses.Objects[Ci]); State := InClass; - if not Singleton then Singleton := Before('singleton:', '}', Line, false); + if not Singleton then Singleton := Before('singleton:', '}', Line); if Singleton then CurClass.Name := CurClass.Name + 'Singleton'; CurClass.Singleton := Singleton; continue; @@ -474,7 +474,10 @@ begin Between('@deprecated','/**', '*/', Line) or Between('@protected', '/**', '*/', Line) then continue; begin - Config := Extract(['@cfg {', '} ', ' '], Line, Matches); + if Before('@cfg {', '@property {', Line) then + Config := Extract(['@cfg {', '} ', ' '], Line, Matches) + else + Config := False; // To do Extract(['@property ', ' ', '@type ', ' '], Line, Matches) PropName = Matches[0]; PropType = Matches[2] if Config or Extract(['@property {', '} ', ' '], Line, Matches) then begin PropName := Matches[1]; @@ -483,7 +486,7 @@ begin if I <> 0 then PropName := copy(PropName, 1, I-1); // Default value **** if FixIdent(PropName) = '' then continue; // Discard properties nameless - if Before('@static', '*/', Line, false) then Static := true; + if Before('@static', '*/', Line) then Static := true; if IsUppercase(PropName) then Static := true; PropName := Unique(FixIdent(PropName), CurClass.Properties); if not Static then PropName[1] := LowerCase(PropName)[1]; @@ -492,6 +495,7 @@ begin continue; // Discard duplicates end; Matches[0] := ReplaceStr(Matches[0], 'Object/Object[]', 'Object[]'); + Matches[0] := ReplaceStr(Matches[0], 'String/Number', 'Number/String'); PropTypes := Explode('/', Matches[0]); if (pos('"', Matches[0]) <> 0) and (PropTypes.Count <> 0) then begin // Enumeration CurProp := TProp.Create(PropName, PropName, 'string', Static, Config); @@ -510,8 +514,8 @@ begin CurClass.Properties.AddObject(FixIdent(PropName + Sufix(FixType(PropTypes[I]))), TProp.Create(PropName + Sufix(FixType(PropTypes[I])), PropName, PropTypes[I], Static, Config)); //if Extract([PropName, ':', ','], Line, Matches) then begin - if (Before('Default to', '*/', Line, false) and Extract(['Default to', '.'], Line, Matches)) or - (Before('Defaults to', '*/', Line, false) and Extract(['Defaults to', '.'], Line, Matches)) then begin + if (Before('Default to', '*/', Line) and Extract(['Default to', '.'], Line, Matches)) or + (Before('Defaults to', '*/', Line) and Extract(['Defaults to', '.'], Line, Matches)) then begin SetDefault(CurProp, Matches[0], Matches); if (CurProp.Default <> '') and not CurClass.Defaults then begin CurClass.Defaults := true; @@ -543,7 +547,13 @@ begin Between('@protected', '/**', '*/', Line) or Between('@deprecated', '/**', '*/', Line) or Between('@template', '/**', '*/', Line) then continue; - IsEvent := Extract(['@event ', ' ', '*/'], Line, Matches); + if Before('@event ', ': function', Line) then + IsEvent := Extract(['@event ', ' ', '*/'], Line, Matches) + else + if Before('/**', ': function', Line) then + IsEvent := False + else + IsEvent := Extract(['@event ', ' ', '*/'], Line, Matches); if IsEvent or Extract(['/**', '*/', ': function'], Line, Matches) then begin JSName := IfThen(IsEvent, Matches[0], Matches[1]); if (length(JSName) > 30) or (FixIdent(JSName) = '') or // Doc fault @@ -730,6 +740,12 @@ begin if NewClass.Singleton then NewClass.Name := NewClass.Name + 'Singleton'; AllClasses.AddObject(NewClass.Name, NewClass); end + else + if Fields.Count = 2 then begin // Aliasing a type + Fields[0] := 'T' + Fields[0]; + if Unresolved.IndexOfName(Fields[0]) = -1 then + Unresolved.Add(Fields[0] + '=' + Fields[1]); + end else writeln(^M^J'*** WARNING: Class ', Fields[0], ' does not exist. ***'^M^J); finally @@ -1193,7 +1209,6 @@ begin writeln(Pas, 'type'); for J := 0 to AllClasses.Count-1 do // forward classes writeln(Pas, Tab, TClass(AllClasses.Objects[J]).Name, ' = class;'); -// writeln(Pas, Tab, 'TExtDataRecord = TExtDataModel;'); WriteUnresolvedClasses; writeln(Pas); AllClasses.Sorted := false; diff --git a/ExtJSWrapper/ExtToPascal.dsk b/ExtJSWrapper/ExtToPascal.dsk index 7aa900a..8ccc567 100644 --- a/ExtJSWrapper/ExtToPascal.dsk +++ b/ExtJSWrapper/ExtToPascal.dsk @@ -1,75 +1,63 @@ [Closed Files] -File_0=TSourceModule,'E:\extpascal\ext-4.2.0\src\AbstractComponent.js',0,1,7,23,583,0,0,, -File_1=TSourceModule,'E:\Temp\Surface.js',0,1,19,36,308,0,0,, -File_2=TSourceModule,'c:\program files (x86)\embarcadero\rad studio\10.0\source\rtl\common\System.Classes.pas',0,1,6619,1,6644,0,0,, -File_3=TSourceModule,'c:\program files (x86)\embarcadero\rad studio\10.0\SOURCE\RTL\SYS\System.pas',0,1,22820,1,22860,0,0,, -File_4=TSourceModule,'E:\extpascal\ExtJSWrapper\ExtUtil.pas',0,1,1050,37,1073,0,0,, -File_5=TSourceModule,'E:\extpascal\ext-4.1.1a\src\grid\plugin\Editing.js',0,1,147,33,196,0,0,, -File_6=TSourceModule,'E:\extpascal\ExtJSWrapper\ExtDd.pas',0,1,285,32,308,0,0,, -File_7=TSourceModule,'E:\extpascal\FCGIApp.pas',0,1,210,28,231,0,0,, -File_8=TSourceModule,'E:\extpascal\ext-4.1.1a\src\Ajax.js',0,1,1,4,2,0,0,, -File_9=TSourceModule,'E:\extpascal\ext-4.1.1a\src\AbstractManager.js',0,1,70,24,19,0,0,, -File_10=TSourceModule,'E:\extpascal\ext-4.1.1a\src\core\src\class\Loader.js',0,1,1,22,1261,0,0,, -File_11=TSourceModule,'E:\extpascal\ext-4.1.1a\src\core\src\lang\Error.js',0,1,68,28,127,0,0,, -File_12=TSourceModule,'E:\extpascal\ext-4.1.1a\src\core\src\class\ClassManager.js',0,1,1482,32,1505,0,0,, -File_13=TSourceModule,'E:\extpascal\ext-4.1.1a\src\util\MixedCollection.js',0,1,1,4,2,0,0,, -File_14=TSourceModule,'E:\extpascal\ext-4.1.1a\src\view\AbstractView.js',0,1,1,4,2,0,0,, -File_15=TSourceModule,'E:\extpascal\ext-4.1.1a\src\window\MessageBox.js',0,1,867,8,890,0,0,, -File_16=TSourceModule,'E:\extpascal\ext-4.1.1a\src\ZIndexManager.js',0,1,499,8,522,0,0,, -File_17=TSourceModule,'E:\extpascal\ext-4.1.1a\src\util\HashMap.js',0,1,1,14,33,0,0,, -File_18=TSourceModule,'E:\extpascal\ext-4.1.1a\src\core\src\dom\AbstractElement.insertion.js',0,1,1,12,2,0,0,, -File_19=TSourceModule,'E:\extpascal\ext-4.1.1a\src\core\src\EventManager.js',0,1,1,1,1,0,0,, +File_0=TSourceModule,'A:\ExtPascal\Ext.pas',0,1,8140,3,8156,0,0,, +File_1=TSourceModule,'c:\program files (x86)\embarcadero\rad studio\10.0\source\rtl\common\System.Classes.pas',0,1,6619,1,6644,0,0,, +File_2=TSourceModule,'c:\program files (x86)\embarcadero\rad studio\10.0\SOURCE\RTL\SYS\System.pas',0,1,22820,1,22860,0,0,, +File_3=TSourceModule,'E:\extpascal\ExtJSWrapper\ExtUtil.pas',0,1,1050,37,1073,0,0,, +File_4=TSourceModule,'E:\extpascal\ext-4.1.1a\src\grid\plugin\Editing.js',0,1,147,33,196,0,0,, +File_5=TSourceModule,'E:\extpascal\ExtJSWrapper\ExtDd.pas',0,1,285,32,308,0,0,, +File_6=TSourceModule,'E:\extpascal\FCGIApp.pas',0,1,210,28,231,0,0,, +File_7=TSourceModule,'E:\extpascal\ext-4.1.1a\src\Ajax.js',0,1,1,4,2,0,0,, +File_8=TSourceModule,'E:\extpascal\ext-4.1.1a\src\AbstractManager.js',0,1,70,24,19,0,0,, +File_9=TSourceModule,'E:\extpascal\ext-4.1.1a\src\core\src\class\Loader.js',0,1,1,22,1261,0,0,, +File_10=TSourceModule,'E:\extpascal\ext-4.1.1a\src\core\src\lang\Error.js',0,1,68,28,127,0,0,, +File_11=TSourceModule,'E:\extpascal\ext-4.1.1a\src\core\src\class\ClassManager.js',0,1,1482,32,1505,0,0,, +File_12=TSourceModule,'E:\extpascal\ext-4.1.1a\src\util\MixedCollection.js',0,1,1,4,2,0,0,, +File_13=TSourceModule,'E:\extpascal\ext-4.1.1a\src\view\AbstractView.js',0,1,1,4,2,0,0,, +File_14=TSourceModule,'E:\extpascal\ext-4.1.1a\src\window\MessageBox.js',0,1,867,8,890,0,0,, [Modules] -Module0=E:\extpascal\ExtJSWrapper\Ext.pas -Module1=E:\extpascal\ExtJSWrapper\ExtToPascal.dproj -Module2=E:\extpascal\ExtPascalUtils.pas -Module3=E:\extpascal\ExtJSWrapper\ExtFixes.txt -Module4=E:\extpascal\ext-4.2.0\src\dom\AbstractElement.js -Module5=E:\extpascal\ExtPascal.pas -Module6=E:\extpascal\ExtJSWrapper\ExtOld.pas -Count=7 +Module0=A:\ExtPascal\ExtJSWrapper\ExtToPascal.dproj +Module1=A:\ExtPascal\ExtJSWrapper\ExtFixes.txt +Module2=A:\ExtPascal\ExtJSWrapper\Ext.pas +Module3=A:\ExtPascal\ExtJSWrapper\ExtFixes3.txt +Module4=A:\ExtPascal\ExtPascal.pas +Module5=A:\ExtPascal\ExtPascalUtils.pas +Count=6 EditWindowCount=1 -[E:\extpascal\ExtJSWrapper\Ext.pas] -ModuleType=TSourceModule -FormState=0 -FormOnTop=0 - -[E:\extpascal\ExtJSWrapper\ExtToPascal.dproj] +[A:\ExtPascal\ExtJSWrapper\ExtToPascal.dproj] ModuleType=TBaseProject -[E:\extpascal\ExtPascalUtils.pas] +[A:\ExtPascal\ExtJSWrapper\ExtFixes.txt] ModuleType=TSourceModule -FormState=0 -FormOnTop=0 -[E:\extpascal\ExtJSWrapper\ExtFixes.txt] +[A:\ExtPascal\ExtJSWrapper\Ext.pas] ModuleType=TSourceModule +FormState=0 +FormOnTop=0 -[E:\extpascal\ext-4.2.0\src\dom\AbstractElement.js] +[A:\ExtPascal\ExtJSWrapper\ExtFixes3.txt] ModuleType=TSourceModule -[E:\extpascal\ExtPascal.pas] +[A:\ExtPascal\ExtPascal.pas] ModuleType=TSourceModule FormState=0 FormOnTop=0 -[E:\extpascal\ExtJSWrapper\ExtOld.pas] +[A:\ExtPascal\ExtPascalUtils.pas] ModuleType=TSourceModule FormState=0 FormOnTop=0 [EditWindow0] -ViewCount=7 -CurrentEditView=E:\extpascal\ExtJSWrapper\Ext.pas +ViewCount=6 +CurrentEditView=A:\ExtPascal\ExtJSWrapper\ExtToPascal.dpr View0=0 View1=1 View2=2 View3=3 View4=4 View5=5 -View6=6 PercentageSizes=1 Create=1 Visible=1 @@ -78,101 +66,89 @@ State=0 Left=0 Top=0 Width=10000 -Height=9521 +Height=9456 MaxLeft=-1 MaxTop=-1 ClientWidth=10000 -ClientHeight=9521 +ClientHeight=9456 DockedToMainForm=1 BorlandEditorCodeExplorer=BorlandEditorCodeExplorer@EditWindow0 TopPanelSize=0 -LeftPanelSize=1648 -LeftPanelClients=DockSite2 -LeftPanelData=00000800010100000000C11D00000000000001700600000000000001000000003125000009000000446F636B5369746532FFFFFFFF +LeftPanelSize=0 RightPanelSize=0 -BottomPanelSize=0 -BottomPanelClients=DockSite1 -BottomPanelData=0000080001000100000009000000446F636B5369746531D430000000000000002406000000000000FFFFFFFF -BottomMiddlePanelSize=1348 -BottomMiddlePanelClients=DockSite0,GraphDrawingModel,MessageView -BottomMiddelPanelData=0000080001020200000009000000446F636B536974653010000000477261706844726177696E6756696577AA280000000000000244050000000000000100000000AA2800000F0000004D65737361676556696577466F726DFFFFFFFF +BottomPanelSize=1578 +BottomPanelClients=DockSite1,MessageView +BottomPanelData=0000080001000100000009000000446F636B5369746531724500000000000000E5090000000000000100000000724500000F0000004D65737361676556696577466F726DFFFFFFFF +BottomMiddlePanelSize=0 +BottomMiddlePanelClients=DockSite0,GraphDrawingModel +BottomMiddelPanelData=0000080001020200000009000000446F636B536974653010000000477261706844726177696E67566965779A1D00000000000002F206000000000000FFFFFFFF +TabDockLeftClients=DockSite2=0 [View0] CustomEditViewType=TEditView -Module=E:\extpascal\ExtJSWrapper\Ext.pas -CursorX=3 -CursorY=12711 -TopLine=12757 +Module=A:\ExtPascal\ExtJSWrapper\ExtToPascal.dpr +CursorX=1 +CursorY=15 +TopLine=1 LeftCol=1 Elisions= Bookmarks= -EditViewName=E:\extpascal\ExtJSWrapper\Ext.pas +EditViewName=A:\ExtPascal\ExtJSWrapper\ExtToPascal.dpr [View1] CustomEditViewType=TEditView -Module=E:\extpascal\ExtJSWrapper\ExtToPascal.dpr -CursorX=1 -CursorY=15 -TopLine=13 +Module=A:\ExtPascal\ExtJSWrapper\ExtFixes.txt +CursorX=25 +CursorY=77 +TopLine=62 LeftCol=1 Elisions= Bookmarks= -EditViewName=E:\extpascal\ExtJSWrapper\ExtToPascal.dpr +EditViewName=A:\ExtPascal\ExtJSWrapper\ExtFixes.txt [View2] CustomEditViewType=TEditView -Module=E:\extpascal\ExtPascal.pas +Module=A:\ExtPascal\ExtJSWrapper\ExtFixes3.txt CursorX=1 -CursorY=814 -TopLine=1 +CursorY=73 +TopLine=51 LeftCol=1 Elisions= Bookmarks= -EditViewName=E:\extpascal\ExtPascal.pas +EditViewName=A:\ExtPascal\ExtJSWrapper\ExtFixes3.txt [View3] CustomEditViewType=TEditView -Module=E:\extpascal\ExtJSWrapper\ExtFixes.txt -CursorX=48 -CursorY=26 -TopLine=1 +Module=A:\ExtPascal\ExtPascal.pas +CursorX=1 +CursorY=814 +TopLine=797 LeftCol=1 Elisions= Bookmarks= -EditViewName=E:\extpascal\ExtJSWrapper\ExtFixes.txt +EditViewName=A:\ExtPascal\ExtPascal.pas [View4] CustomEditViewType=TEditView -Module=E:\extpascal\ext-4.2.0\src\dom\AbstractElement.js -CursorX=20 -CursorY=625 -TopLine=5 +Module=A:\ExtPascal\ExtPascalUtils.pas +CursorX=27 +CursorY=450 +TopLine=444 LeftCol=1 Elisions= Bookmarks= -EditViewName=E:\extpascal\ext-4.2.0\src\dom\AbstractElement.js +EditViewName=A:\ExtPascal\ExtPascalUtils.pas [View5] CustomEditViewType=TEditView -Module=E:\extpascal\ExtPascalUtils.pas -CursorX=43 -CursorY=293 -TopLine=284 -LeftCol=1 -Elisions= -Bookmarks= -EditViewName=E:\extpascal\ExtPascalUtils.pas - -[View6] -CustomEditViewType=TEditView -Module=E:\extpascal\ExtJSWrapper\ExtOld.pas -CursorX=52 -CursorY=35805 -TopLine=35799 +Module=A:\ExtPascal\ExtJSWrapper\Ext.pas +CursorX=45 +CursorY=42739 +TopLine=42741 LeftCol=1 Elisions= Bookmarks= -EditViewName=E:\extpascal\ExtJSWrapper\ExtOld.pas +EditViewName=A:\ExtPascal\ExtJSWrapper\Ext.pas [Watches] Count=5 @@ -192,20 +168,20 @@ Docked=1 State=0 Left=0 Top=0 -Width=3828 -Height=1172 +Width=3825 +Height=1044 MaxLeft=-1 MaxTop=-1 -ClientWidth=3828 -ClientHeight=1172 -TBDockHeight=215 -LRDockWidth=13602 +ClientWidth=3825 +ClientHeight=1044 +TBDockHeight=211 +LRDockWidth=13600 Dockable=1 StayOnTop=0 [Breakpoints] Count=1 -Breakpoint0='E:\extpascal\ExtJSWrapper\ExtToPascal.dpr',734,'',0,1,'',1,0,0,'',1,'','','',0,'' +Breakpoint0='E:\extpascal\ExtJSWrapper\ExtToPascal.dpr',747,'',0,1,'',1,0,0,'',1,'','','',0,'' [EmbarcaderoWin32Debugger_AddressBreakpoints] Count=0 @@ -219,17 +195,17 @@ Create=1 Visible=1 Docked=0 State=2 -Left=141 -Top=273 -Width=8930 -Height=8525 -MaxLeft=-8 -MaxTop=-10 -MaxWidth=8930 -MaxHeight=8525 +Left=144 +Top=278 +Width=8931 +Height=8522 +MaxLeft=-6 +MaxTop=-11 +MaxWidth=8931 +MaxHeight=8522 ClientWidth=10000 -ClientHeight=9785 -BottomPanelSize=9521 +ClientHeight=9756 +BottomPanelSize=9456 BottomPanelClients=EditWindow0 BottomPanelData=0000080000000000000000000000000000000000000000000000000100000000000000000C0000004564697457696E646F775F30FFFFFFFF @@ -241,14 +217,14 @@ Docked=1 State=0 Left=0 Top=0 -Width=1648 -Height=9053 +Width=2000 +Height=1422 MaxLeft=-1 MaxTop=-1 -ClientWidth=1648 -ClientHeight=9053 -TBDockHeight=5898 -LRDockWidth=2352 +ClientWidth=2000 +ClientHeight=1422 +TBDockHeight=5900 +LRDockWidth=2350 Dockable=1 StayOnTop=0 @@ -260,14 +236,14 @@ Docked=1 State=0 Left=0 Top=23 -Width=8328 -Height=1123 +Width=10000 +Height=1322 MaxLeft=-1 MaxTop=-1 -ClientWidth=8328 -ClientHeight=1123 -TBDockHeight=1123 -LRDockWidth=2766 +ClientWidth=10000 +ClientHeight=1322 +TBDockHeight=1322 +LRDockWidth=2769 Dockable=1 StayOnTop=0 @@ -279,13 +255,13 @@ Docked=1 State=0 Left=0 Top=0 -Width=1648 -Height=7109 +Width=2362 +Height=8600 MaxLeft=-1 MaxTop=-1 -ClientWidth=1648 -ClientHeight=7109 -TBDockHeight=7158 +ClientWidth=2362 +ClientHeight=8600 +TBDockHeight=7156 LRDockWidth=2000 Dockable=1 StayOnTop=0 @@ -296,16 +272,16 @@ Create=1 Visible=0 Docked=1 State=0 -Left=0 -Top=291 -Width=273 -Height=361 +Left=-1600 +Top=270 +Width=275 +Height=356 MaxLeft=-1 MaxTop=-1 -ClientWidth=273 -ClientHeight=361 -TBDockHeight=361 -LRDockWidth=273 +ClientWidth=275 +ClientHeight=356 +TBDockHeight=356 +LRDockWidth=275 Dockable=1 StayOnTop=0 Name=120 @@ -320,14 +296,14 @@ Docked=1 State=0 Left=0 Top=0 -Width=3828 -Height=1172 +Width=3825 +Height=1044 MaxLeft=-1 MaxTop=-1 -ClientWidth=3828 -ClientHeight=1172 -TBDockHeight=410 -LRDockWidth=4953 +ClientWidth=3825 +ClientHeight=1044 +TBDockHeight=411 +LRDockWidth=4950 Dockable=1 StayOnTop=0 @@ -339,13 +315,13 @@ Docked=1 State=0 Left=0 Top=0 -Width=3828 -Height=1172 +Width=3825 +Height=1044 MaxLeft=-1 MaxTop=-1 -ClientWidth=3828 -ClientHeight=1172 -TBDockHeight=215 +ClientWidth=3825 +ClientHeight=1044 +TBDockHeight=211 LRDockWidth=7406 Dockable=1 StayOnTop=0 @@ -362,14 +338,14 @@ Docked=1 State=0 Left=0 Top=0 -Width=3828 -Height=1172 +Width=3825 +Height=1044 MaxLeft=-1 MaxTop=-1 -ClientWidth=3828 -ClientHeight=1172 +ClientWidth=3825 +ClientHeight=1044 TBDockHeight=1533 -LRDockWidth=3484 +LRDockWidth=3481 Dockable=1 StayOnTop=0 @@ -381,14 +357,14 @@ Docked=1 State=0 Left=0 Top=0 -Width=3828 -Height=1172 +Width=3825 +Height=1044 MaxLeft=-1 MaxTop=-1 -ClientWidth=3828 -ClientHeight=1172 -TBDockHeight=2061 -LRDockWidth=3484 +ClientWidth=3825 +ClientHeight=1044 +TBDockHeight=2056 +LRDockWidth=3481 Dockable=1 StayOnTop=0 @@ -400,14 +376,14 @@ Docked=1 State=0 Left=0 Top=0 -Width=1648 -Height=7109 +Width=2362 +Height=8600 MaxLeft=-1 MaxTop=-1 -ClientWidth=1648 -ClientHeight=7109 -TBDockHeight=4883 -LRDockWidth=7148 +ClientWidth=2362 +ClientHeight=8600 +TBDockHeight=4878 +LRDockWidth=2231 Dockable=1 StayOnTop=0 @@ -419,17 +395,17 @@ Docked=1 State=0 Left=0 Top=0 -Width=1648 -Height=7109 +Width=2362 +Height=8600 MaxLeft=-1 MaxTop=-1 -ClientWidth=1648 -ClientHeight=7109 -TBDockHeight=9014 -LRDockWidth=1891 +ClientWidth=2362 +ClientHeight=8600 +TBDockHeight=8878 +LRDockWidth=1894 Dockable=1 StayOnTop=0 -SplitPos=111 +SplitPos=131 [TFileExplorerForm] PercentageSizes=1 @@ -437,15 +413,15 @@ Create=1 Visible=0 Docked=1 State=0 -Left=78 -Top=15 +Left=-1502 +Top=27 Width=2844 -Height=6201 +Height=6200 MaxLeft=-1 MaxTop=-1 ClientWidth=2844 -ClientHeight=6201 -TBDockHeight=6201 +ClientHeight=6200 +TBDockHeight=6200 LRDockWidth=2844 Dockable=1 StayOnTop=0 @@ -458,14 +434,14 @@ Docked=1 State=0 Left=0 Top=0 -Width=2336 -Height=996 +Width=2338 +Height=967 MaxLeft=-1 MaxTop=-1 -ClientWidth=2336 -ClientHeight=996 -TBDockHeight=2314 -LRDockWidth=2828 +ClientWidth=2338 +ClientHeight=967 +TBDockHeight=2311 +LRDockWidth=2825 Dockable=1 StayOnTop=0 @@ -477,14 +453,14 @@ Docked=1 State=0 Left=0 Top=0 -Width=2336 -Height=1230 +Width=2338 +Height=1200 MaxLeft=-1 MaxTop=-1 -ClientWidth=2336 -ClientHeight=1230 -TBDockHeight=3203 -LRDockWidth=2828 +ClientWidth=2338 +ClientHeight=1200 +TBDockHeight=3200 +LRDockWidth=2825 Dockable=1 StayOnTop=0 @@ -496,14 +472,14 @@ Docked=1 State=0 Left=0 Top=0 -Width=2336 -Height=1230 +Width=2338 +Height=1200 MaxLeft=-1 MaxTop=-1 -ClientWidth=2336 -ClientHeight=1230 -TBDockHeight=1152 -LRDockWidth=3672 +ClientWidth=2338 +ClientHeight=1200 +TBDockHeight=1156 +LRDockWidth=3675 Dockable=1 StayOnTop=0 Column0Width=314 @@ -521,16 +497,16 @@ Create=1 Visible=0 Docked=1 State=0 -Left=245 -Top=825 -Width=2859 -Height=3213 +Left=306 +Top=724 +Width=2856 +Height=3211 MaxLeft=-1 MaxTop=-1 -ClientWidth=2859 -ClientHeight=3213 -TBDockHeight=3213 -LRDockWidth=2859 +ClientWidth=2856 +ClientHeight=3211 +TBDockHeight=3211 +LRDockWidth=2856 Dockable=1 StayOnTop=0 @@ -542,14 +518,14 @@ Docked=1 State=0 Left=0 Top=0 -Width=1648 -Height=7109 +Width=2362 +Height=8600 MaxLeft=-1 MaxTop=-1 -ClientWidth=1648 -ClientHeight=7109 -TBDockHeight=4883 -LRDockWidth=5305 +ClientWidth=2362 +ClientHeight=8600 +TBDockHeight=4878 +LRDockWidth=5306 Dockable=1 StayOnTop=0 @@ -559,15 +535,15 @@ Create=1 Visible=0 Docked=1 State=0 -Left=0 -Top=-72 +Left=-1600 +Top=-49 Width=1844 -Height=3145 +Height=3144 MaxLeft=-1 MaxTop=-1 ClientWidth=1844 -ClientHeight=3145 -TBDockHeight=3145 +ClientHeight=3144 +TBDockHeight=3144 LRDockWidth=1844 Dockable=1 StayOnTop=0 @@ -580,13 +556,13 @@ Docked=1 State=0 Left=0 Top=0 -Width=2336 -Height=1230 +Width=2338 +Height=1200 MaxLeft=-1 MaxTop=-1 -ClientWidth=2336 -ClientHeight=1230 -TBDockHeight=4824 +ClientWidth=2338 +ClientHeight=1200 +TBDockHeight=4833 LRDockWidth=3562 Dockable=1 StayOnTop=0 @@ -599,13 +575,13 @@ Docked=1 State=0 Left=0 Top=0 -Width=2336 -Height=1230 +Width=2338 +Height=1200 MaxLeft=-1 MaxTop=-1 -ClientWidth=2336 -ClientHeight=1230 -TBDockHeight=4824 +ClientWidth=2338 +ClientHeight=1200 +TBDockHeight=4833 LRDockWidth=3562 Dockable=1 StayOnTop=0 @@ -618,14 +594,14 @@ Docked=1 State=0 Left=0 Top=0 -Width=3828 -Height=1172 +Width=3825 +Height=1044 MaxLeft=-1 MaxTop=-1 -ClientWidth=3828 -ClientHeight=1172 -TBDockHeight=1543 -LRDockWidth=8742 +ClientWidth=3825 +ClientHeight=1044 +TBDockHeight=1544 +LRDockWidth=8744 Dockable=1 StayOnTop=0 Column0Width=200 @@ -644,14 +620,14 @@ Docked=1 State=0 Left=0 Top=0 -Width=1648 -Height=7109 +Width=2362 +Height=8600 MaxLeft=-1 MaxTop=-1 -ClientWidth=1648 -ClientHeight=7109 -TBDockHeight=3672 -LRDockWidth=1891 +ClientWidth=2362 +ClientHeight=8600 +TBDockHeight=3678 +LRDockWidth=1894 Dockable=1 StayOnTop=0 @@ -663,14 +639,14 @@ Docked=0 State=0 Left=0 Top=0 -Width=1828 -Height=6182 -MaxLeft=-8 -MaxTop=-10 -ClientWidth=1703 -ClientHeight=5850 -TBDockHeight=6182 -LRDockWidth=1828 +Width=1825 +Height=6178 +MaxLeft=-6 +MaxTop=-11 +ClientWidth=1725 +ClientHeight=5800 +TBDockHeight=6178 +LRDockWidth=1825 Dockable=1 StayOnTop=0 @@ -687,14 +663,14 @@ Docked=1 State=0 Left=0 Top=0 -Width=2336 -Height=1475 +Width=2338 +Height=1478 MaxLeft=-1 MaxTop=-1 -ClientWidth=2336 -ClientHeight=1475 -TBDockHeight=1475 -LRDockWidth=2336 +ClientWidth=2338 +ClientHeight=1478 +TBDockHeight=1478 +LRDockWidth=2338 Dockable=1 StayOnTop=0 TabPosition=1 @@ -711,14 +687,14 @@ Docked=1 State=0 Left=0 Top=23 -Width=3828 -Height=1416 +Width=3825 +Height=1322 MaxLeft=-1 MaxTop=-1 -ClientWidth=3828 -ClientHeight=1416 -TBDockHeight=1416 -LRDockWidth=3828 +ClientWidth=3825 +ClientHeight=1322 +TBDockHeight=1322 +LRDockWidth=3825 Dockable=1 StayOnTop=0 TabPosition=1 @@ -726,26 +702,26 @@ ActiveTabID=DebugLogView TabDockClients=DebugLogView,BreakpointWindow,ThreadStatusWindow,CallStackWindow,WatchWindow,LocalVarsWindow [DockSite2] -HostDockSite=DockLeftPanel +HostDockSite=LeftDockTabSet DockSiteType=1 PercentageSizes=1 Create=1 -Visible=1 +Visible=0 Docked=1 State=0 -Left=0 -Top=23 -Width=1648 -Height=9297 +Left=1600 +Top=49 +Width=2362 +Height=8878 MaxLeft=-1 MaxTop=-1 -ClientWidth=1648 -ClientHeight=9297 -TBDockHeight=9014 -LRDockWidth=1648 +ClientWidth=2362 +ClientHeight=8878 +TBDockHeight=8878 +LRDockWidth=2362 Dockable=1 StayOnTop=0 TabPosition=1 -ActiveTabID=ProjectManager -TabDockClients=ProjectManager,ToolForm,PropertyInspector,StructureView,DataExplorerContainer,ModelViewTool,ClassBrowserTool,TemplateView,TFileExplorerForm +ActiveTabID=ToolForm +TabDockClients=ToolForm,PropertyInspector,ProjectManager,DataExplorerContainer,StructureView,ModelViewTool,ClassBrowserTool,TemplateView,TFileExplorerForm diff --git a/ExtPascalSamples/BasicTabPanel.pas b/ExtPascalSamples/BasicTabPanel.pas index 068c5b6..42f61c3 100644 --- a/ExtPascalSamples/BasicTabPanel.pas +++ b/ExtPascalSamples/BasicTabPanel.pas @@ -25,7 +25,7 @@ constructor TBasicTabPanel.Create; begin Height := 300; CloseAction := 'hide'; with TExtTabPanel.AddTo(Items) do begin - ActiveTabInteger := 0; + ActiveTab := 0; with TExtPanel.AddTo(Items) do begin Title := 'Hello World 1'; Html := 'Hello...'; diff --git a/ExtPascalSamples/LayoutWindow.pas b/ExtPascalSamples/LayoutWindow.pas index 761b53e..9414976 100644 --- a/ExtPascalSamples/LayoutWindow.pas +++ b/ExtPascalSamples/LayoutWindow.pas @@ -28,7 +28,7 @@ constructor TLayoutWindow.Create; Region := rgCenter; Margins := SetMargins(3, 3, 3); Defaults := JSObject('autoScroll:true'); - ActiveTabNumber := 0; + ActiveTab := 0; OnTabChange := ExtTabPanelOnTabchange; with TExtPanel.AddTo(Items) do begin Title := 'Bogus Tab'; diff --git a/ExtPascalSamples/MessageBoxes.pas b/ExtPascalSamples/MessageBoxes.pas index c87346e..e3c39fe 100644 --- a/ExtPascalSamples/MessageBoxes.pas +++ b/ExtPascalSamples/MessageBoxes.pas @@ -52,7 +52,7 @@ constructor TMessageBoxes.Create; Width := 300; Buttons := ExtMessageBox.OKCANCEL; Multiline := true; - AnimEl := 'ButtonMultiline'; + AnimTarget:= 'ButtonMultiline'; Fn := JSFunction(ReadButtonJS); end; Handler := ExtMessageBox.Show(ShowConfig); @@ -63,12 +63,12 @@ constructor TMessageBoxes.Create; Text := Id; ShowConfig := TExtShowConfig.Create; with ShowConfig do begin - Title := 'Save Changes?'; - Msg := 'You are closing a tab that has unsaved changes.
Would you like to save your changes?'; - Icon := ExtMessageBox.QUESTION; - Buttons := ExtMessageBox.YESNOCANCEL; - AnimEl := Id; - Fn := Ajax(ReadButtonAjax, ['ButtonID', '%0']); + Title := 'Save Changes?'; + Msg := 'You are closing a tab that has unsaved changes.
Would you like to save your changes?'; + Icon := ExtMessageBox.QUESTION; + Buttons := ExtMessageBox.YESNOCANCEL; + AnimTarget := Id; + Fn := Ajax(ReadButtonAjax, ['ButtonID', '%0']); end; Handler := ExtMessageBox.Show(ShowConfig); ShowConfig.Free; @@ -83,7 +83,7 @@ constructor TMessageBoxes.Create; Progress := true; Msg := 'Loading items...'; Wait := true; - AnimEl := Id; + AnimTarget := Id; ProgressText := 'Loading...'; WaitConfig := TExtProgressWaitConfig.Create; with WaitConfig do begin @@ -108,7 +108,7 @@ constructor TMessageBoxes.Create; Width := 300; Wait := true; Icon := 'ext-mb-download'; - AnimEl := Id; + AnimTarget := Id; ProgressText := 'Saving...'; WaitConfig := TExtProgressWaitConfig.Create; with WaitConfig do begin diff --git a/ExtPascalSamples/Session.pas b/ExtPascalSamples/Session.pas index a557235..3250350 100644 --- a/ExtPascalSamples/Session.pas +++ b/ExtPascalSamples/Session.pas @@ -136,11 +136,12 @@ procedure TSession.ShowSource; Width := 600; Height := 400; Modal := true; - with TExtUxCodePress.AddTo(Items) do begin +(* with + TExtUxCodePress.AddTo(Items) do begin ReadOnly := true; Code := Lines; end; - if Proc <> 'ShowSource' then +*) if Proc <> 'ShowSource' then AddShowSourceButton(Buttons, 'Session', 'ShowSource'); Show; Free; diff --git a/ExtPascalUtils.pas b/ExtPascalUtils.pas index 565451c..e079fc0 100644 --- a/ExtPascalUtils.pas +++ b/ExtPascalUtils.pas @@ -148,7 +148,7 @@ function SetMargins(Top : integer; Right : integer = 0; Bottom : integer = 0; Le Header : boolean = false) : string; // Returns true if BeforeS string occurs before AfterS string in S string -function Before(const BeforeS, AfterS : string; var S : string; Remove : boolean = true) : boolean; +function Before(const BeforeS, AfterS : string; var S : string) : boolean; // Returns true if S string occurs between BeforeS and AfterS strings in T string function Between(const S, BeforeS, AfterS : string; var T : string; Remove : boolean = true) : boolean; @@ -441,13 +441,13 @@ function SetMargins(Top : integer; Right : integer = 0; Bottom : integer = 0; Le EnumToJSString(TypeInfo(TCSSUnit), ord(CSSUnit))]) end; -function Before(const BeforeS, AfterS : string; var S : string; Remove : boolean = true) : boolean; +function Before(const BeforeS, AfterS : string; var S : string) : boolean; var - I : integer; + I, J : integer; begin I := pos(BeforeS, S); - Result := (I <> 0) and (I < pos(AfterS, S)); - if Remove and Result then delete(S, 1, pos(AfterS, S) + length(AfterS)); + J := pos(AfterS, S); + Result := (I <> 0) and (((J <> 0) and (I < J)) or (J = 0)); end; function Between(const S, BeforeS, AfterS : string; var T : string; Remove : boolean = true) : boolean;