xojo-web2.0-jquery-effects/WebPage1.xojo_code
2021-12-08 23:29:10 -07:00

610 lines
17 KiB
Text

#tag WebPage
Begin WebPage WebPage1
AllowTabOrderWrap= True
Compatibility = ""
ControlID = ""
Enabled = False
Height = 400
ImplicitInstance= True
Index = -2147483648
Indicator = 0
IsImplicitInstance= False
LayoutDirection = 0
LayoutType = 0
Left = 0
LockBottom = False
LockHorizontal = False
LockLeft = True
LockRight = False
LockTop = True
LockVertical = False
MinimumHeight = 400
MinimumWidth = 600
TabIndex = 0
Title = "Untitled"
Top = 0
Visible = True
Width = 600
_ImplicitInstance= False
_mDesignHeight = 0
_mDesignWidth = 0
_mPanelIndex = -1
Begin WebPagePanel PagePanel1
ControlID = ""
Enabled = True
Height = 189
Index = -2147483648
Indicator = ""
LayoutDirection = 0
LayoutType = 0
Left = 184
LockBottom = False
LockedInPosition= False
LockHorizontal = True
LockLeft = False
LockRight = False
LockTop = True
LockVertical = False
PanelCount = 2
Scope = 2
SelectedPanelIndex= 0
TabIndex = 0
TabStop = True
Tooltip = ""
Top = 86
Visible = True
Width = 232
_mDesignHeight = 0
_mDesignWidth = 0
_mPanelIndex = -1
Begin WebLabel Label1
Bold = True
ControlID = ""
Enabled = True
FontName = ""
FontSize = 0.0
Height = 38
Index = -2147483648
Indicator = ""
Italic = False
Left = 204
LockBottom = False
LockedInPosition= False
LockHorizontal = False
LockLeft = True
LockRight = True
LockTop = True
LockVertical = False
Multiline = False
PanelIndex = "0"
Parent = "PagePanel1"
Scope = 2
TabIndex = 1
TabStop = True
Text = "Effect"
TextAlignment = 2
TextColor = &c00000000
Tooltip = ""
Top = 86
Underline = False
Visible = True
Width = 192
_mPanelIndex = -1
End
Begin WebLabel Label2
Bold = False
ControlID = ""
Enabled = True
FontName = ""
FontSize = 0.0
Height = 145
Index = -2147483648
indicator = 0
Italic = False
Left = 204
LockBottom = True
LockedInPosition= False
LockHorizontal = False
LockLeft = True
LockRight = True
LockTop = True
LockVertical = False
Multiline = True
PanelIndex = "0"
Parent = "PagePanel1"
Scope = 2
TabIndex = 1
TabStop = True
Text = "Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede. Nulla lorem metus, adipiscing ut, luctus sed, hendrerit vitae, mi."
TextAlignment = 1
TextColor = &c00000000
Tooltip = ""
Top = 121
Underline = False
Visible = True
Width = 192
_mPanelIndex = -1
End
End
Begin WebLabel Label3
Bold = False
ControlID = ""
Enabled = True
FontName = ""
FontSize = 24.0
Height = 38
Index = -2147483648
Indicator = ""
Italic = False
Left = 20
LockBottom = False
LockedInPosition= False
LockHorizontal = False
LockLeft = True
LockRight = True
LockTop = True
LockVertical = False
Multiline = False
Scope = 2
TabIndex = 4
TabStop = True
Text = "jQuery UI Effects Demo with Xojo Web 2.0"
TextAlignment = 2
TextColor = &c00000000
Tooltip = ""
Top = 20
Underline = False
Visible = True
Width = 560
_mPanelIndex = -1
End
Begin WebLink Link1
Appearance = 0
Bold = False
ControlID = ""
Enabled = True
FontName = ""
FontSize = 0.0
Height = 38
Index = -2147483648
Indicator = ""
Italic = False
Left = 20
LockBottom = False
LockedInPosition= False
LockHorizontal = False
LockLeft = True
LockRight = True
LockTop = True
LockVertical = False
Multiline = False
Scope = 2
TabIndex = 5
TabStop = True
Target = 1
Text = "donl/xojo-web2.0-jquery-effects"
TextAlignment = 1
TextColor = &c0000FF00
Tooltip = ""
Top = 362
Underline = False
URL = "https://www.github.com/donl/xojo-web2.0-jquery-effects"
Visible = True
Width = 273
_mPanelIndex = -1
End
Begin WebPagePanel PagePanel2
ControlID = ""
Enabled = True
Height = 82
Index = -2147483648
Indicator = ""
LayoutDirection = 0
LayoutType = 0
Left = 113
LockBottom = False
LockedInPosition= False
LockHorizontal = True
LockLeft = False
LockRight = False
LockTop = True
LockVertical = False
PanelCount = 2
Scope = 2
SelectedPanelIndex= 0
TabIndex = 6
TabStop = True
Tooltip = ""
Top = 283
Visible = True
Width = 374
_mDesignHeight = 0
_mDesignWidth = 0
_mPanelIndex = -1
Begin WebButton Button1
AllowAutoDisable= False
Cancel = False
Caption = "Run Effect"
ControlID = ""
Default = False
Enabled = True
Height = 38
Index = -2147483648
Indicator = 0
Left = 317
LockBottom = False
LockedInPosition= False
LockHorizontal = False
LockLeft = True
LockRight = False
LockTop = True
LockVertical = False
PanelIndex = "0"
Parent = "PagePanel2"
Scope = 2
TabIndex = 0
TabStop = True
Tooltip = ""
Top = 303
Visible = True
Width = 150
_mPanelIndex = -1
End
Begin WebPopupMenu PopupMenu1
ControlID = ""
Enabled = True
Height = 38
Index = -2147483648
Indicator = ""
InitialValue = "Blind\nBounce\nClip\nDrop\nExplode\nFade\nFold\nHighlight\nPuff\nPulsate\nScale\nShake\nSize\nSlide\nTransfer"
LastAddedRowIndex= 0
LastRowIndex = 0
Left = 133
LockBottom = False
LockedInPosition= False
LockHorizontal = False
LockLeft = True
LockRight = False
LockTop = True
LockVertical = False
PanelIndex = "0"
Parent = "PagePanel2"
RowCount = 0
Scope = 2
SelectedRowIndex= 0
SelectedRowValue= ""
TabIndex = 0
TabStop = True
Tooltip = ""
Top = 303
Visible = True
Width = 150
_mPanelIndex = -1
End
End
Begin WebLabel Label4
Bold = False
ControlID = ""
Enabled = True
FontName = ""
FontSize = 0.0
Height = 38
Index = -2147483648
Indicator = ""
Italic = False
Left = 301
LockBottom = False
LockedInPosition= False
LockHorizontal = False
LockLeft = False
LockRight = True
LockTop = True
LockVertical = False
Multiline = False
Scope = 2
TabIndex = 7
TabStop = True
Text = "Made with Xojo "
TextAlignment = 3
TextColor = &c00000000
Tooltip = ""
Top = 362
Underline = False
Visible = True
Width = 279
_mPanelIndex = -1
End
End
#tag EndWebPage
#tag WindowCode
#tag Event
Sub Shown()
Dim js As String = jsEffectsDemo
js = js.ReplaceAllBytes("#effectTypes","#" + PopupMenu1.ControlID)
js = js.ReplaceAllBytes("#button","#" + Button1.ControlID)
js = js.ReplaceAllBytes("%%effect%%", PagePanel1.ControlID)
Session.ExecuteJavaScript(js)
End Sub
#tag EndEvent
#tag Constant, Name = jsEffectsDemo, Type = String, Dynamic = False, Default = \" $( function() {\n // run the currently selected effect\n function runEffect() {\n // get effect type from\n var selectedEffect \x3D $(\"#effectTypes_button span\").text().toLowerCase();\n \n // Most effect types need no options passed by default\n var options \x3D {};\n // some effects have required parameters\n if ( selectedEffect \x3D\x3D\x3D \"scale\" ) {\n options \x3D { percent: 50 };\n } else if ( selectedEffect \x3D\x3D\x3D \"transfer\" ) {\n options \x3D { to: \"#button\"\x2C className: \"ui-effects-transfer\" };\n } else if ( selectedEffect \x3D\x3D\x3D \"size\" ) {\n options \x3D { to: { width: 200\x2C height: 60 } };\n }\n \n // Run the effect\n $( \"#%%effect%%\" ).effect( selectedEffect\x2C options\x2C 500\x2C callback );\n };\n \n // Callback function to bring a hidden box back\n function callback() {\n setTimeout(function() {\n // Needed for scale and size effects that Xojo does not refresh completely.\n $( \"#%%effect%%\" ).removeAttr( \"style\" ).hide();\n XojoWeb.getNamedControl(\"%%effect%%\").refresh();\n XojoWeb.getNamedControl(\"%%effect%%\").applyLocks();\n }\x2C 1000 );\n };\n \n // Set effect from select menu value\n $( \"#button\" ).on( \"click\"\x2C function() {\n runEffect();\n return false;\n });\n } );", Scope = Private
#tag EndConstant
#tag EndWindowCode
#tag Events Label4
#tag Event
Sub Opening()
Me.Text = Me.Text + XojoVersionString
End Sub
#tag EndEvent
#tag EndEvents
#tag ViewBehavior
#tag ViewProperty
Name="_mPanelIndex"
Visible=false
Group="Behavior"
InitialValue="-1"
Type="Integer"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="Index"
Visible=true
Group="ID"
InitialValue="-2147483648"
Type="Integer"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="Name"
Visible=true
Group="ID"
InitialValue=""
Type="String"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="Super"
Visible=true
Group="ID"
InitialValue=""
Type="String"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="Left"
Visible=true
Group="Position"
InitialValue="0"
Type="Integer"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="Top"
Visible=true
Group="Position"
InitialValue="0"
Type="Integer"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="ControlID"
Visible=false
Group="Behavior"
InitialValue=""
Type="String"
EditorType="MultiLineEditor"
#tag EndViewProperty
#tag ViewProperty
Name="Enabled"
Visible=false
Group="Behavior"
InitialValue=""
Type="Boolean"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="Height"
Visible=true
Group="Behavior"
InitialValue="400"
Type="Integer"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="LayoutType"
Visible=true
Group="Behavior"
InitialValue="LayoutTypes.Fixed"
Type="LayoutTypes"
EditorType="Enum"
#tag EnumValues
"0 - Fixed"
"1 - Flex"
#tag EndEnumValues
#tag EndViewProperty
#tag ViewProperty
Name="LockBottom"
Visible=true
Group="Behavior"
InitialValue="False"
Type="Boolean"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="LockHorizontal"
Visible=true
Group="Behavior"
InitialValue="False"
Type="Boolean"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="LockLeft"
Visible=true
Group="Behavior"
InitialValue="True"
Type="Boolean"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="LockRight"
Visible=true
Group="Behavior"
InitialValue="False"
Type="Boolean"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="LockTop"
Visible=true
Group="Behavior"
InitialValue="True"
Type="Boolean"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="LockVertical"
Visible=true
Group="Behavior"
InitialValue="False"
Type="Boolean"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="MinimumHeight"
Visible=true
Group="Behavior"
InitialValue="400"
Type="Integer"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="MinimumWidth"
Visible=true
Group="Behavior"
InitialValue="600"
Type="Integer"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="Title"
Visible=true
Group="Behavior"
InitialValue="Untitled"
Type="String"
EditorType="MultiLineEditor"
#tag EndViewProperty
#tag ViewProperty
Name="Visible"
Visible=false
Group="Behavior"
InitialValue="True"
Type="Boolean"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="Width"
Visible=true
Group="Behavior"
InitialValue="600"
Type="Integer"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="_ImplicitInstance"
Visible=false
Group="Behavior"
InitialValue=""
Type="Boolean"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="_mDesignHeight"
Visible=false
Group="Behavior"
InitialValue=""
Type="Integer"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="_mDesignWidth"
Visible=false
Group="Behavior"
InitialValue=""
Type="Integer"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="_mName"
Visible=false
Group="Behavior"
InitialValue=""
Type="String"
EditorType="MultiLineEditor"
#tag EndViewProperty
#tag ViewProperty
Name="IsImplicitInstance"
Visible=false
Group="Behavior"
InitialValue=""
Type="Boolean"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="AllowTabOrderWrap"
Visible=false
Group="Behavior"
InitialValue="True"
Type="Boolean"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="TabIndex"
Visible=true
Group="Visual Controls"
InitialValue=""
Type="Integer"
EditorType=""
#tag EndViewProperty
#tag ViewProperty
Name="Indicator"
Visible=false
Group="Visual Controls"
InitialValue=""
Type="WebUIControl.Indicators"
EditorType="Enum"
#tag EnumValues
"0 - Default"
"1 - Primary"
"2 - Secondary"
"3 - Success"
"4 - Danger"
"5 - Warning"
"6 - Info"
"7 - Light"
"8 - Dark"
"9 - Link"
#tag EndEnumValues
#tag EndViewProperty
#tag ViewProperty
Name="LayoutDirection"
Visible=true
Group="WebView"
InitialValue="LayoutDirections.LeftToRight"
Type="LayoutDirections"
EditorType="Enum"
#tag EnumValues
"0 - LeftToRight"
"1 - RightToLeft"
"2 - TopToBottom"
"3 - BottomToTop"
#tag EndEnumValues
#tag EndViewProperty
#tag EndViewBehavior