PUBLIC oevent_scx
SET CLASSLIB TO ab\aw\samples\fic\classe\ficsample.vcx ADDITIVE
oevent_scx=NEWOBJECT("event_scx")
oevent_scx.Show
RETURN
**************************************************
DEFINE CLASS event_scx AS ficfrm
Height = 383
Width = 800
DoCreate = .T.
Caption = "Controls & Events"
_memberdata = [<VFPData><memberdata name="wremoveobject" display="wRemoveObject" type="method"/><memberdata name="waddobject" display="wAddObject" type="method"/><memberdata name="cchangetabulbysixspace" type="method" display="cChangeTabulBySixSpace"/><memberdata name="clickframepage" type="method" display="clickFramePage"/><memberdata name="settooltip" type="method" display="setToolTip"/></VFPData>]
wbswidth = 2
Name = "event_scx"
cntOK.opgStyle.optClassic.Value = 1
cntOK.opgStyle.optClassic.Left = 0
cntOK.opgStyle.optClassic.Top = 0
cntOK.opgStyle.optClassic.Name = "optClassic"
cntOK.opgStyle.optBS.Left = 0
cntOK.opgStyle.optBS.Top = 30
cntOK.opgStyle.optBS.Name = "optBS"
cntOK.opgStyle.Left = 3
cntOK.opgStyle.Top = 33
cntOK.opgStyle.Name = "opgStyle"
cntOK.cmdOK.Top = 2
cntOK.cmdOK.Left = 79
cntOK.cmdOK.Name = "cmdOK"
cntOK.imgSrce.Left = 84
cntOK.imgSrce.Top = 35
cntOK.imgSrce.Name = "imgSrce"
cntOK.imgHelp.Left = 88
cntOK.imgHelp.Top = 70
cntOK.imgHelp.Name = "imgHelp"
cntOK.Top = 7
cntOK.Left = 672
cntOK.Width = 124
cntOK.Height = 155
cntOK.TabIndex = 2
cntOK.Name = "cntOK"
waitpic.ZOrderSet = 0
waitpic.Name = "waitpic"
lblFiC.Height = 15
lblFiC.Top = 361
lblFiC.TabIndex = 3
lblFiC.ZOrderSet = 9
lblFiC.Name = "lblFiC"
lblTime.Height = 15
lblTime.Top = 361
lblTime.TabIndex = 4
lblTime.Name = "lblTime"
ADD OBJECT tutoinfoboxserver AS ficebxevent WITH ;
Anchor = 44, ;
Height = 166, ;
Left = 382, ;
TabIndex = 5, ;
ToolTipText = "FoxInCloud Application Server executes these events", ;
Top = 187, ;
Width = 408, ;
ZOrderSet = 1, ;
Name = "tutoInfoBoxServer"
ADD OBJECT tutoinfoboxclient AS ficebxevent WITH ;
Anchor = 134, ;
Height = 166, ;
Left = 10, ;
TabIndex = 6, ;
ToolTipText = "Client Browser executes these events", ;
Top = 187, ;
Width = 369, ;
ZOrderSet = 2, ;
Name = "tutoInfoBoxClient"
ADD OBJECT tutolblclient AS ficlbl WITH ;
FontBold = .T., ;
FontName = "Consolas", ;
FontSize = 10, ;
Anchor = 6, ;
BackStyle = 0, ;
Caption = "Events processed by Browser (client)", ;
Height = 17, ;
Left = 10, ;
Top = 170, ;
Width = 369, ;
TabIndex = 7, ;
ZOrderSet = 3, ;
Name = "TutoLblClient"
ADD OBJECT tutolblserver AS ficlbl WITH ;
FontBold = .T., ;
FontName = "Consolas", ;
FontSize = 10, ;
Anchor = 44, ;
BackStyle = 0, ;
Caption = "Events processed by VFP (FiC App. Server + App.)", ;
Height = 17, ;
Left = 382, ;
Top = 170, ;
Width = 408, ;
TabIndex = 8, ;
ZOrderSet = 4, ;
Name = "TutoLblServer"
ADD OBJECT pgf AS myficpgf WITH ;
ErasePage = .T., ;
MemberClassLibrary = ..\..\..\classe\ficsample.vcx, ;
PageCount = 4, ;
Anchor = 15, ;
Top = 12, ;
Left = 12, ;
Width = 649, ;
Height = 151, ;
TabIndex = 1, ;
ZOrderSet = 5, ;
wlactivepagecolors = .T., ;
wcpropsave = "ActivePage,Width,Height", ;
Name = "pgf", ;
Myficpag1.Caption = "Controls", ;
Myficpag1.ToolTipText = (Iif(wlWeb(), [Right-clicking me won't fire browser's default context menu!], [])), ;
Myficpag1.Name = "pag1", ;
Myficpag2.Caption = "Composites", ;
Myficpag2.wcpropsave = "Enabled", ;
Myficpag2.Name = "pag2", ;
Myficpag3.Caption = "Grid", ;
Myficpag3.Name = "pag3", ;
Myficpag4.Caption = "Others", ;
Myficpag4.Name = "pag4"
ADD OBJECT event_scx.pgf.pag1.shpstate AS ficshp WITH ;
Top = 47, ;
Left = 397, ;
Height = 63, ;
Width = 105, ;
Anchor = 28, ;
BackStyle = 0, ;
Curvature = 10, ;
SpecialEffect = 0, ;
BorderColor = RGB(128,128,128), ;
ZOrderSet = 0, ;
Style = 3, ;
Name = "shpState"
ADD OBJECT event_scx.pgf.pag1.chkhide AS ficchk WITH ;
Top = 89, ;
Left = 404, ;
Height = 16, ;
Width = 87, ;
FontName = "Consolas", ;
Anchor = 88, ;
Alignment = 0, ;
BackStyle = 0, ;
Caption = "Hidden", ;
TabIndex = 8, ;
ZOrderSet = 1, ;
Name = "chkHide"
ADD OBJECT event_scx.pgf.pag1.chkro AS ficchk WITH ;
Top = 74, ;
Left = 404, ;
Height = 16, ;
Width = 90, ;
FontName = "Consolas", ;
Anchor = 88, ;
Alignment = 0, ;
BackStyle = 0, ;
Caption = "Read-only", ;
TabIndex = 8, ;
ZOrderSet = 2, ;
Name = "chkRO"
ADD OBJECT event_scx.pgf.pag1.chke AS ficchk WITH ;
Top = 58, ;
Left = 404, ;
Height = 16, ;
Width = 72, ;
FontName = "Consolas", ;
Anchor = 88, ;
Alignment = 0, ;
BackStyle = 0, ;
Caption = "Enabled", ;
Value = 1, ;
TabIndex = 8, ;
ZOrderSet = 3, ;
wcssclassadd = "fs-5", ;
Name = "chkE"
ADD OBJECT event_scx.pgf.pag1.cmd AS ficcmd WITH ;
Top = 79, ;
Left = 517, ;
Height = 37, ;
Width = 121, ;
FontName = "Consolas", ;
Anchor = 28, ;
Picture = "..\..\..\..\..\..\graphics\word_2013_32.png", ;
DownPicture = "..\..\..\..\..\..\graphics\excel2013_32.png", ;
DisabledPicture = "..\..\..\..\..\..\graphics\standby32.png", ;
Caption = "Command Button", ;
TabIndex = 10, ;
PicturePosition = 1, ;
PictureMargin = 4, ;
PictureSpacing = 2, ;
ZOrderSet = 4, ;
Name = "cmd"
ADD OBJECT event_scx.pgf.pag1.cbo2 AS ficcbo WITH ;
FontName = "Consolas", ;
Anchor = 41, ;
RowSourceType = 1, ;
RowSource = "1,2,3,4,5", ;
Height = 21, ;
Left = 299, ;
Style = 2, ;
TabIndex = 4, ;
Top = 6, ;
Width = 79, ;
ZOrderSet = 5, ;
Name = "cbo2"
ADD OBJECT event_scx.pgf.pag1.txt AS fictxt WITH ;
OLEDragPicture = "..\..\..\..\..\..\graphics\textbox.bmp", ;
FontName = "Consolas", ;
Height = 21, ;
Left = 30, ;
TabIndex = 1, ;
Top = 7, ;
Width = 166, ;
ZOrderSet = 6, ;
Name = "txt"
ADD OBJECT event_scx.pgf.pag1.ebx AS ficebx WITH ;
OLEDropMode = 1, ;
FontName = "Consolas", ;
Anchor = 7, ;
Height = 81, ;
Left = 30, ;
TabIndex = 2, ;
Top = 32, ;
Width = 166, ;
ZOrderSet = 7, ;
Name = "ebx"
ADD OBJECT event_scx.pgf.pag1.lst AS ficlst WITH ;
FontName = "Consolas", ;
Anchor = 15, ;
RowSourceType = 1, ;
RowSource = "6,7,8,9,10", ;
Height = 79, ;
Left = 207, ;
TabIndex = 5, ;
Top = 32, ;
Width = 173, ;
ZOrderSet = 8, ;
Name = "lst"
ADD OBJECT event_scx.pgf.pag1.spn AS ficspn WITH ;
FontName = "Consolas", ;
Anchor = 8, ;
Height = 24, ;
Left = 548, ;
TabIndex = 7, ;
Top = 11, ;
Width = 89, ;
ZOrderSet = 9, ;
Name = "spn"
ADD OBJECT event_scx.pgf.pag1.txtdate AS fictxt WITH ;
FontName = "Consolas", ;
FontSize = 10, ;
Anchor = 8, ;
Alignment = 3, ;
Value = (DateTime()), ;
Format = "D", ;
Height = 23, ;
Left = 397, ;
TabIndex = 6, ;
Top = 13, ;
Width = 106, ;
ZOrderSet = 10, ;
wldatepicker = .T., ;
value_ = (Date()), ;
Name = "txtDate"
ADD OBJECT event_scx.pgf.pag1.chkg AS ficchk WITH ;
Top = 39, ;
Left = 517, ;
Height = 35, ;
Width = 121, ;
FontName = "Consolas", ;
FontSize = 8, ;
Anchor = 88, ;
Picture = "..\..\..\..\..\..\graphics\word_2013_32.png", ;
DownPicture = "..\..\..\..\..\..\graphics\excel2013_32.png", ;
DisabledPicture = "..\..\..\..\..\..\graphics\standby32.png", ;
Alignment = 0, ;
BackStyle = 0, ;
Caption = "CheckBox", ;
Value = 1, ;
Style = 1, ;
TabIndex = 9, ;
PicturePosition = 1, ;
PictureMargin = 4, ;
ZOrderSet = 11, ;
Name = "chkG"
ADD OBJECT event_scx.pgf.pag1.cbo0 AS ficcbo WITH ;
FontName = "Consolas", ;
Anchor = 131, ;
RowSourceType = 1, ;
RowSource = "1,2,3,4,5", ;
Height = 21, ;
Left = 207, ;
TabIndex = 3, ;
Top = 6, ;
Width = 85, ;
ZOrderSet = 12, ;
wlhtml5placeholder = .F., ;
wbscctlante = .NULL., ;
Name = "cbo0"
ADD OBJECT event_scx.pgf.pag1.lblstate AS ficlbl WITH ;
Anchor = 24, ;
BackStyle = 1, ;
Caption = " State", ;
Height = 14, ;
Left = 405, ;
Top = 40, ;
Width = 48, ;
BackColor = RGB(255,255,255), ;
Name = "lblState"
ADD OBJECT event_scx.pgf.pag2.cmg AS ficcmg WITH ;
ButtonCount = 3, ;
Anchor = 165, ;
Height = 94, ;
Left = 272, ;
Top = 17, ;
Width = 119, ;
TabIndex = 3, ;
Name = "cmg", ;
Ficcmd1.Top = 7, ;
Ficcmd1.Left = 9, ;
Ficcmd1.Height = 25, ;
Ficcmd1.Width = 100, ;
Ficcmd1.FontName = "Consolas", ;
Ficcmd1.Anchor = 672, ;
Ficcmd1.Caption = "Button 1", ;
Ficcmd1.ZOrderSet = 0, ;
Ficcmd1.Name = "cmd2", ;
Ficcmd2.Top = 34, ;
Ficcmd2.Left = 9, ;
Ficcmd2.Height = 25, ;
Ficcmd2.Width = 100, ;
Ficcmd2.FontName = "Consolas", ;
Ficcmd2.Anchor = 672, ;
Ficcmd2.Caption = "Button 2", ;
Ficcmd2.ZOrderSet = 1, ;
Ficcmd2.Name = "cmd1", ;
Ficcmd3.Top = 62, ;
Ficcmd3.Left = 9, ;
Ficcmd3.Height = 25, ;
Ficcmd3.Width = 100, ;
Ficcmd3.FontName = "Consolas", ;
Ficcmd3.Anchor = 672, ;
Ficcmd3.Caption = "Button 3", ;
Ficcmd3.ZOrderSet = 2, ;
Ficcmd3.Name = "cmd3"
ADD OBJECT event_scx.pgf.pag2.opg AS ficopg WITH ;
ButtonCount = 3, ;
Anchor = 135, ;
Height = 94, ;
Left = 12, ;
Top = 17, ;
Width = 119, ;
TabIndex = 1, ;
wcssclassadd = "fs-5", ;
Name = "opg", ;
Ficopt1.FontName = "Consolas", ;
Ficopt1.Anchor = 240, ;
Ficopt1.BackStyle = 0, ;
Ficopt1.Caption = "Option 1", ;
Ficopt1.Left = 14, ;
Ficopt1.TabIndex = 1, ;
Ficopt1.Top = 12, ;
Ficopt1.Width = 90, ;
Ficopt1.Name = "opt1", ;
Ficopt2.FontName = "Consolas", ;
Ficopt2.Anchor = 240, ;
Ficopt2.BackStyle = 0, ;
Ficopt2.Caption = "Option 2", ;
Ficopt2.Left = 14, ;
Ficopt2.TabIndex = 2, ;
Ficopt2.Top = 38, ;
Ficopt2.Width = 90, ;
Ficopt2.Name = "opt2", ;
Ficopt3.FontName = "Consolas", ;
Ficopt3.Anchor = 240, ;
Ficopt3.BackStyle = 0, ;
Ficopt3.Caption = "Option 3", ;
Ficopt3.Left = 14, ;
Ficopt3.TabIndex = 3, ;
Ficopt3.Top = 63, ;
Ficopt3.Width = 90, ;
Ficopt3.Name = "opt3"
ADD OBJECT event_scx.pgf.pag2.opgg AS ficopg WITH ;
ButtonCount = 3, ;
Anchor = 165, ;
Height = 94, ;
Left = 142, ;
Top = 17, ;
Width = 119, ;
TabIndex = 2, ;
Name = "opgG", ;
Ficopt1.FontName = "Consolas", ;
Ficopt1.Anchor = 240, ;
Ficopt1.Picture = "..\..\..\..\..\..\graphics\accept16.png", ;
Ficopt1.PicturePosition = 1, ;
Ficopt1.PictureMargin = 3, ;
Ficopt1.Caption = "Option 1", ;
Ficopt1.Height = 25, ;
Ficopt1.Left = 14, ;
Ficopt1.Style = 1, ;
Ficopt1.Top = 7, ;
Ficopt1.Width = 90, ;
Ficopt1.Name = "opt1", ;
Ficopt2.FontName = "Consolas", ;
Ficopt2.Anchor = 240, ;
Ficopt2.Picture = "..\..\..\..\..\..\graphics\ff16.png", ;
Ficopt2.PicturePosition = 1, ;
Ficopt2.PictureMargin = 3, ;
Ficopt2.Caption = "Option 2", ;
Ficopt2.Height = 25, ;
Ficopt2.Left = 14, ;
Ficopt2.Style = 1, ;
Ficopt2.Top = 34, ;
Ficopt2.Width = 90, ;
Ficopt2.Name = "opt2", ;
Ficopt3.FontName = "Consolas", ;
Ficopt3.Anchor = 240, ;
Ficopt3.Picture = "..\..\..\..\..\..\graphics\safari16.png", ;
Ficopt3.PicturePosition = 1, ;
Ficopt3.PictureMargin = 3, ;
Ficopt3.Caption = "Option 3", ;
Ficopt3.Height = 25, ;
Ficopt3.Left = 14, ;
Ficopt3.Style = 1, ;
Ficopt3.Top = 61, ;
Ficopt3.Width = 90, ;
Ficopt3.Name = "opt3"
ADD OBJECT event_scx.pgf.pag2.pgf AS ficpgf WITH ;
ErasePage = .T., ;
PageCount = 2, ;
Anchor = 45, ;
Top = 17, ;
Left = 407, ;
Width = 227, ;
Height = 94, ;
TabIndex = 4, ;
Name = "pgf", ;
Ficpag1.FontName = "Consolas", ;
Ficpag1.Caption = "Page1", ;
Ficpag1.Name = "pag1", ;
Ficpag2.FontName = "Consolas", ;
Ficpag2.Caption = "Page2", ;
Ficpag2.BackColor = RGB(200,200,200), ;
Ficpag2.Name = "pag2"
ADD OBJECT event_scx.pgf.pag2.pgf.pag1.cbo AS ficcbo WITH ;
Anchor = 161, ;
RowSourceType = 1, ;
RowSource = ",1,2,3,4,5", ;
Height = 24, ;
Left = 14, ;
Top = 19, ;
Width = 174, ;
Name = "cbo"
ADD OBJECT event_scx.pgf.pag2.pgf.pag2.txtdate AS fictxt WITH ;
FontName = "Consolas", ;
FontSize = 10, ;
Anchor = 8, ;
Alignment = 3, ;
Value = (DateTime()), ;
Format = "D", ;
Height = 23, ;
Left = 59, ;
TabIndex = 6, ;
Top = 19, ;
Width = 106, ;
ZOrderSet = 10, ;
wldatepicker = .T., ;
value_ = (Date()), ;
Name = "txtDate"
ADD OBJECT event_scx.pgf.pag3.grd AS ficgrd WITH ;
ColumnCount = 3, ;
Anchor = 15, ;
DeleteMark = .F., ;
Height = 84, ;
Left = 10, ;
Panel = 1, ;
RecordSource = "myGridCursor", ;
RowHeight = 20, ;
ScrollBars = 2, ;
Top = 29, ;
Width = 623, ;
Name = "grd", ;
Ficgrc1.HeaderClassLibrary = ..\tutosets.prg, ;
Ficgrc1.HeaderClass = "ficGrh", ;
Ficgrc1.ControlSource = "", ;
Ficgrc1.Width = 150, ;
Ficgrc1.Name = "grc1", ;
Ficgrc2.HeaderClassLibrary = ..\tutosets.prg, ;
Ficgrc2.HeaderClass = "ficGrh", ;
Ficgrc2.ControlSource = "", ;
Ficgrc2.Width = 150, ;
Ficgrc2.Sparse = .F., ;
Ficgrc2.Name = "grc2", ;
Ficgrc3.HeaderClassLibrary = ..\tutosets.prg, ;
Ficgrc3.HeaderClass = "ficGrh", ;
Ficgrc3.ControlSource = "", ;
Ficgrc3.Width = 200, ;
Ficgrc3.Sparse = .F., ;
Ficgrc3.Name = "grc3"
ADD OBJECT event_scx.pgf.pag3.grd.grc1.txt AS fictxt WITH ;
FontName = "Consolas", ;
Left = 729, ;
Top = 67, ;
Name = "txt"
ADD OBJECT event_scx.pgf.pag3.grd.grc1.grh AS ficgrh WITH ;
Caption = "Header column 1", ;
Name = "grh"
ADD OBJECT event_scx.pgf.pag3.grd.grc2.cmd AS ficcmd WITH ;
Top = 27, ;
Left = 24, ;
FontName = "Consolas", ;
Caption = "Command", ;
Name = "cmd"
ADD OBJECT event_scx.pgf.pag3.grd.grc2.grh AS ficgrh WITH ;
Caption = "Header column 2", ;
Name = "grh"
ADD OBJECT event_scx.pgf.pag3.grd.grc3.cbo AS ficcbo WITH ;
FontName = "Consolas", ;
RowSourceType = 1, ;
RowSource = "1,2,3", ;
Left = 41, ;
Style = 2, ;
Top = 39, ;
BackColor = RGB(255,255,255), ;
Name = "cbo"
ADD OBJECT event_scx.pgf.pag3.grd.grc3.grh AS ficgrh WITH ;
Caption = "Header column 3", ;
Name = "grh"
ADD OBJECT event_scx.pgf.pag3.chkacs AS ficchk WITH ;
Top = 5, ;
Left = 12, ;
Height = 17, ;
Width = 158, ;
Alignment = 0, ;
BackStyle = 0, ;
Caption = "Allow Cell Selection", ;
Name = "chkACS"
ADD OBJECT event_scx.pgf.pag3.ficcmddelete AS ficcmd WITH ;
Top = 7, ;
Left = 497, ;
Height = 17, ;
Width = 135, ;
caption_en = "Delete row", ;
caption_fr = "Effacer la ligne", ;
caption_es = "Borrar fila", ;
caption_de = "Zeile löschen", ;
caption_it = "Elimina riga", ;
caption_pt = "Excluir linha", ;
Name = "FiCcmdDelete"
ADD OBJECT event_scx.pgf.pag4.lbl AS ficlbl WITH ;
FontName = "Consolas", ;
WordWrap = .T., ;
BackStyle = 0, ;
Caption = "Label with .Caption wrapped into lines (this.WordWrap = .T.)", ;
Height = 58, ;
Left = 11, ;
Top = 22, ;
Width = 162, ;
ZOrderSet = 7, ;
Name = "lbl"
ADD OBJECT event_scx.pgf.pag4.lin AS ficlin WITH ;
Anchor = 10, ;
Left = 203, ;
Top = 10, ;
Width = 150, ;
Name = "lin"
ADD OBJECT event_scx.pgf.pag4.shps AS ficshp WITH ;
Top = 46, ;
Left = 203, ;
Height = 64, ;
Width = 66, ;
Anchor = 135, ;
BorderStyle = 4, ;
BorderColor = RGB(128,255,0), ;
Name = "shpS"
ADD OBJECT event_scx.pgf.pag4.img AS ficimg WITH ;
Anchor = 520, ;
Picture = "..\bitmaps\myimage.png", ;
Stretch = 1, ;
BackStyle = 0, ;
Height = 80, ;
Left = 407, ;
MousePointer = 15, ;
Top = 5, ;
Width = 219, ;
wcpropsave = "BorderStyle", ;
whoverpicture = "myimagefade.png", ;
Name = "img"
ADD OBJECT event_scx.pgf.pag4.shpr AS ficshp WITH ;
Top = 46, ;
Left = 287, ;
Height = 64, ;
Width = 66, ;
Anchor = 41, ;
BorderWidth = 4, ;
Curvature = 24, ;
BorderColor = RGB(255,0,0), ;
wcpropsave = "Top,Left,Width,Height", ;
Name = "shpR"
ADD OBJECT event_scx.pgf.pag4.chk AS ficchk WITH ;
Top = 92, ;
Left = 12, ;
Height = 17, ;
Width = 155, ;
FontName = "Consolas", ;
Alignment = 0, ;
BackStyle = 0, ;
Caption = "En/Dis able page 2", ;
Value = 1, ;
Name = "chk"
ADD OBJECT event_scx.pgf.pag4.lbla AS ficlbl WITH ;
FontName = "Consolas", ;
Alignment = 2, ;
BackStyle = 0, ;
Caption = "Clickable Label", ;
Height = 16, ;
Left = 407, ;
Top = 98, ;
Width = 219, ;
ZOrderSet = 7, ;
Name = "lbla"
ADD OBJECT event_scx.cntok.chkuienable AS ficchk WITH ;
Top = 100, ;
Left = 2, ;
Height = 25, ;
Width = 121, ;
FontName = "Consolas", ;
Anchor = 28, ;
Alignment = 0, ;
Caption = "log .UIenable()", ;
Value = .F., ;
ControlSource = "thisForm.lUIenable", ;
Style = 1, ;
wbscolno = .T., ;
wcssclassadd = "hidden-xs", ;
Name = "chkUIenable"
ADD OBJECT event_scx.cntok.cmdclear AS ficcmd WITH ;
Top = 128, ;
Left = 43, ;
Height = 24, ;
Width = 80, ;
FontName = "Consolas", ;
FontSize = 10, ;
Anchor = 12, ;
Caption = "CLEAR", ;
TabIndex = 6, ;
ToolTipText = "Clear event reports", ;
ZOrderSet = 10, ;
wbscolno = .T., ;
Name = "cmdClear"
PROCEDURE wreadme
lparameters cLangUser
cLangUser = Evl(Evl(m.cLangUser, m.this.wcLangUser), cLangUser())
* remove '.F. && ' whenever a translation is available
local lcImg
lcImg = Textmerge([<img class="img-responsive" src="<<Iif(thisForm.wBSlHTMLgen, '.', '')>>./images/eventTracking.png">])
do case
case .F.
text to result noshow textmerge flags 1
endtext
case .F.
text to result noshow textmerge flags 1
endtext
case .F.
text to result noshow textmerge flags 1
endtext
case .F.
text to result noshow textmerge flags 1
endtext
case .F.
text to result noshow textmerge flags 1
endtext
otherwise
text to result noshow textmerge flags 1
This demo shows how FoxInCloud processes the events implemented in the VFP form and its members.
ALL events <sup>(1)</sup> of thisform.pageFrame of and its members are implemented into a simple method that writes the control's base class and method full address into a list. This is similar to SET EVENTTRACKING ON in VFP debugger, selecting all events and watch the events report in the debugger window:
<<m.lcImg>><br>
For simplicity, all events are delegated to a form class method thisForm.eventHandler() using BindEvent() (you can see this code in menu > source code > ficSample.vcx > ficFrm class).
Note: this behavior is intended for this demo, <b>NOT a standard behavior</b>; in real-life applications, only the events having code somewhere in the object's hierarchy are implemented.
By default, FoxInCloud implements 'surface' events such as .MouseMove() in the browser - that's what appears in the <b>left list</b>.
All the other events are implemented on the server; when running in Web mode, the standard JavaScript program FoxInCloud.js traps the user events and sends them together with the object address through AJAX to the FoxInCloud Application Server (FAS).
Here is the <a href="event_scx.js" target="_blank">generated JavaScript</a> where these events are implemented.
FoxInCloud Application Server (FAS) just executes the corresponding event method of the corresponding VFP object.
The event delegate thisForm.eventHandler() adds the event characteristics (.baseclass, name.Event()) to the <b>right list</b>.
At the end of the request, FAS identifies the changes occurred in the form UI during the event execution, and sends back the corresponding UI update orders to the browser (the contents of the <b>right list</b> is part of the changes sent back to the browser).
When receiving this response back from FAS, FoxInCloud.js just updates the display using the HTML DOM and CSS directives.
<i><sup>(1)</sup> except a few events such as Paint, Init, Load, Unload, Destroy</i>
endtext
endcase
return m.result && testing
ENDPROC
PROCEDURE Load
lParameters void_reminder_to_call_DoDefault_in_your_subclass_when_all_views_and_cursorAdapters_are_open
set deleted on
set decimals to 0 && this.pgf.pag1.spn
return DoDefault()
ENDPROC
PROCEDURE pgf.wchtmlgen
lparameters toHTMLgen AS awHTMLgen OF awHTML.prg, tlInnerHTML && awHTMLgen instance render container's inner HTML
local cJS as String
text to cJS textmerge noshow flags 1
if (FoxInCloud.localURL
var ntop = 0;
jQuery('#<<this.wcID>> pageTab').each(function(idx, tab){
tab = jQuery(tab);
tab.css({left: 0, top: ntop + 'px'});
ntop += tab.height();
});
}
endtext
m.toHTMLgen.cScriptJSadd_(m.cJS)
ENDPROC
PROCEDURE pgf.Init
lparameters fake_parm_reminder_call_dodefault_after_your_subclass_code
* Instead of setting changing properties in design mode, do it programmatically
local aa[1], oCntl
if aoClassCont(@m.aa, this.Pag1) > 0
for each oCntl in m.aa
wcPropSaveEdit(m.oCntl, 'Enabled,ReadOnly,Visible')
endfor
endif
DoDefault()
ENDPROC
PROCEDURE pgf.pag1.RightClick
if m.thisForm.wlHTMLgen
return Textmerge([window.alert('<' + jQuery('#<%m.this.wcID%>').prop('tagName').toLowerCase() + ' id="<%m.this.wcID%>">\nwas right-clicked while\nbrowser\'s default context menu did not fire\n:-)');], .F., '<%', '%>')
endif
ENDPROC
PROCEDURE chkhide.Valid
if thisForm.wlHTMLgen
return
endif
local aa[1], oCntl
if aoClassCont(@m.aa, this.Parent) > 0
for each oCntl in m.aa
if ! m.oCntl = m.this
m.oCntl.Visible = !Cast(this.Value as L)
endif
endfor
endif
ENDPROC
PROCEDURE chkro.Valid
if thisForm.wlHTMLgen
return
endif
local aa[1], oCntl, lRO
if aoClassCont(@m.aa, this.Parent) > 0
lRO = Cast(this.Value as L)
for each oCntl in m.aa
if !InList(m.oCntl, m.this, this.Parent.chkE) and lProperty(m.oCntl, 'ReadOnly')
m.oCntl.ReadOnly = m.lRO
endif
endfor
endif
ENDPROC
PROCEDURE chke.Valid
if thisForm.wlHTMLgen
return
endif
local aa[1], oCntl
if aoClassCont(@m.aa, this.Parent) > 0
for each oCntl in m.aa
if !InList(m.oCntl, this.Parent.chkE, this.Parent.chkRO)
m.oCntl.Enabled = Cast(this.Value as L)
endif
endfor
endif
ENDPROC
PROCEDURE cbo2.Valid
if thisform.wlHTMLgen
return
endif
this.Parent.cbo0.Value = this.Value
ENDPROC
PROCEDURE txtdate.wchtmlgen
LPARAMETERS toHTMLgen AS awHTMLgen OF awHTML.prg, tlInnerHTML
local lcScript
text to lcScript textmerge noshow flags 1 pretext 15
jQuery(function(ev){ /* executes when DOM load is completed */
jQuery('#<<this.wcID>>').keyup(function(e){ /* implement event using Prototype.js as jQueryUI seemingly drops any additional event handler registered using jQuery */
if (e.which === 8 || e.which === 46){ /* backspace or delete */
jQuery(this).val(FoxInCloud.gridDateEmpty).datepicker('hide');
e.preventDefault();
}
});
});
endtext
toHTMLgen.cScriptJSAdd(m.lcScript)
ENDPROC
PROCEDURE txtdate.Init
lparameters fake_parameter_reminder_class_should_instantiate_standalone_see_implementation_sample_in_awTxt_Init
this.woDatePickerOptions = CreateObject('empty')
AddProperty(this.woDatePickerOptions, 'sideBySide', .T.)
return DoDefault()
ENDPROC
PROCEDURE chkg.Init
this.BackColor = Iif(thisForm.wBSlHTMLgen, Rgb(254,0,0), this.BackColor)
ENDPROC
PROCEDURE cbo0.Valid
if thisform.wlHTMLgen
return
endif
this.Parent.cbo2.Value = this.Value
ENDPROC
PROCEDURE cmg.Init
if thisform.wBSlHTMLgen
local nTop
nTop = this.cmd1.Top
this.cmd1.Top = this.cmd2.Top
this.cmd2.Top = m.nTop
endif
return DoDefault()
ENDPROC
PROCEDURE pgf.pag2.Activate
lparameters uselessParm
if thisForm.wlHTMLgen
return .F.
endif
* this.Parent.Parent.Parent.ActivePage = this.Parent.Parent.Parent.ActivePage + 1
ENDPROC
PROCEDURE txtdate.Init
lparameters fake_parameter_reminder_class_should_instantiate_standalone_see_implementation_sample_in_awTxt_Init
this.woDatePickerOptions = CreateObject('empty')
AddProperty(this.woDatePickerOptions, 'sideBySide', .T.)
return DoDefault()
ENDPROC
PROCEDURE txtdate.wchtmlgen
LPARAMETERS toHTMLgen AS awHTMLgen OF awHTML.prg, tlInnerHTML
local lcScript
text to lcScript textmerge noshow flags 1 pretext 15
jQuery(function(ev){ /* executes when DOM load is completed */
jQuery('#<<this.wcID>>').keyup(function(e){ /* implement event using Prototype.js as jQueryUI seemingly drops any additional event handler registered using jQuery */
if (e.which === 8 || e.which === 46){ /* backspace or delete */
jQuery(this).val(FoxInCloud.gridDateEmpty).datepicker('hide');
e.preventDefault();
}
});
});
endtext
toHTMLgen.cScriptJSAdd(m.lcScript)
ENDPROC
PROCEDURE grd.wbeforerowchange
lparameters tuRow
return
ENDPROC
PROCEDURE grd.wbeforecolchange
LPARAMETERS nColIndex
return
ENDPROC
PROCEDURE grd.waftercolchange
LPARAMETERS nColIndex
return DoDefault(m.nColIndex)
ENDPROC
PROCEDURE grd.refresh_
this.AllowCellSelection = Cast(this.Parent.chkACS.Value as L)
ENDPROC
PROCEDURE chkacs.Valid
if thisForm.wlHTMLgen
return
endif
this.Parent.grd.AllowCellSelection = Cast(this.Value as L)
ENDPROC
PROCEDURE ficcmddelete.refresh_
lparameters void_parameter_reminder_call_dodefault_in_your_sub_class_code
DoDefault()
this.Enabled = !(Bof(this.Parent.grd.RecordSource) or Eof(this.Parent.grd.RecordSource))
ENDPROC
PROCEDURE ficcmddelete.Click
lparameters nButton, nShift, nXcoord, nYcoord
if thisForm.wlHTMLgen
return
endif
delete in (this.Parent.grd.RecordSource)
this.Parent.Refresh
ENDPROC
PROCEDURE ficcmddelete.Init
this.Caption = this.Caption_EN
return DoDefault()
ENDPROC
PROCEDURE img.Click
lparameters nButton, nShift, nXcoord, nYcoord
if thisForm.wlHTMLgen
return DoDefault()
endif
this.BorderStyle = Iif(this.BorderStyle = 1, 0, 1)
return DoDefault()
ENDPROC
PROCEDURE shpr.Click
lparameters nButton, nShift, nXcoord, nYcoord
if thisForm.wlHTMLgen
return
endif
this.Top = this.Top *1.2
this.Left = this.Left *1.2
this.Width = this.Width *1.2
this.Height = this.Height *1.2
ENDPROC
PROCEDURE chk.Valid
lparameters Start_you_code_with__IF_thisForm_wlHTMLgen__RETURN_T_for_server__or__JavaScript_for_client__or__F_for_ignore__ENDIF
if thisForm.wlHTMLgen
return
endif
this.Parent.Parent.Pag2.Enabled = !Empty(this.Value)
ENDPROC
PROCEDURE lbla.Click
lparameters nButton, nShift, nXcoord, nYcoord
if thisForm.wlHTMLgen
return
endif
thisForm.wMessageBox("Label Clicked !")
ENDPROC
PROCEDURE cmdclear.Click
LPARAMETERS nButton, nShift, nXcoord, nYcoord
IF (TYPE('m.thisForm.wlHTMLgen') == 'L' AND m.thisForm.wlHTMLgen)
RETURN thisForm.wcScriptEventServerClient(;
TEXTMERGE([jQuery('#<<wcID(m.thisForm.TutoInfoBoxClient)>>').val('');jQuery('#<<wcID(m.thisForm.lblTime)>>').html('');]);
, ;
,.T.;
)
ENDIF
store '' to;
m.thisForm.tutoInfoBoxClient.VALUE;
, m.thisForm.tutoInfoBoxServer.VALUE;
, m.thisForm.lblTime.Caption;
DELETE FILE ('FICevent'+IIF(m.thisForm.wlWeb,'Web','Lan')+'.log')
ENDPROC
PROCEDURE cmdclear.Init
this.Caption = wcIconFA('eraser') + this.Caption
ENDPROC
ENDDEFINE