mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
add more samples for Xojo language
This commit is contained in:
22
samples/Xojo/App.xojo_code
Normal file
22
samples/Xojo/App.xojo_code
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
#tag Class
|
||||||
|
Protected Class App
|
||||||
|
Inherits Application
|
||||||
|
#tag Constant, Name = kEditClear, Type = String, Dynamic = False, Default = \"&Delete", Scope = Public
|
||||||
|
#Tag Instance, Platform = Windows, Language = Default, Definition = \"&Delete"
|
||||||
|
#Tag Instance, Platform = Linux, Language = Default, Definition = \"&Delete"
|
||||||
|
#tag EndConstant
|
||||||
|
|
||||||
|
#tag Constant, Name = kFileQuit, Type = String, Dynamic = False, Default = \"&Quit", Scope = Public
|
||||||
|
#Tag Instance, Platform = Windows, Language = Default, Definition = \"E&xit"
|
||||||
|
#tag EndConstant
|
||||||
|
|
||||||
|
#tag Constant, Name = kFileQuitShortcut, Type = String, Dynamic = False, Default = \"", Scope = Public
|
||||||
|
#Tag Instance, Platform = Mac OS, Language = Default, Definition = \"Cmd+Q"
|
||||||
|
#Tag Instance, Platform = Linux, Language = Default, Definition = \"Ctrl+Q"
|
||||||
|
#tag EndConstant
|
||||||
|
|
||||||
|
|
||||||
|
#tag ViewBehavior
|
||||||
|
#tag EndViewBehavior
|
||||||
|
End Class
|
||||||
|
#tag EndClass
|
||||||
23
samples/Xojo/BillingReport.xojo_report
Normal file
23
samples/Xojo/BillingReport.xojo_report
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
#tag Report
|
||||||
|
Begin Report BillingReport
|
||||||
|
Compatibility = ""
|
||||||
|
Units = 0
|
||||||
|
Width = 8.5
|
||||||
|
Begin PageHeader
|
||||||
|
Type = 1
|
||||||
|
Height = 1.0
|
||||||
|
End
|
||||||
|
Begin Body
|
||||||
|
Type = 3
|
||||||
|
Height = 2.0
|
||||||
|
End
|
||||||
|
Begin PageFooter
|
||||||
|
Type = 5
|
||||||
|
Height = 1.0
|
||||||
|
End
|
||||||
|
End
|
||||||
|
#tag EndReport
|
||||||
|
|
||||||
|
#tag ReportCode
|
||||||
|
#tag EndReportCode
|
||||||
|
|
||||||
112
samples/Xojo/MainMenuBar.xojo_menu
Normal file
112
samples/Xojo/MainMenuBar.xojo_menu
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
#tag Menu
|
||||||
|
Begin Menu MainMenuBar
|
||||||
|
Begin MenuItem FileMenu
|
||||||
|
SpecialMenu = 0
|
||||||
|
Text = "&File"
|
||||||
|
Index = -2147483648
|
||||||
|
AutoEnable = True
|
||||||
|
Visible = True
|
||||||
|
Begin QuitMenuItem FileQuit
|
||||||
|
SpecialMenu = 0
|
||||||
|
Text = "#App.kFileQuit"
|
||||||
|
Index = -2147483648
|
||||||
|
ShortcutKey = "#App.kFileQuitShortcut"
|
||||||
|
Shortcut = "#App.kFileQuitShortcut"
|
||||||
|
AutoEnable = True
|
||||||
|
Visible = True
|
||||||
|
End
|
||||||
|
End
|
||||||
|
Begin MenuItem EditMenu
|
||||||
|
SpecialMenu = 0
|
||||||
|
Text = "&Edit"
|
||||||
|
Index = -2147483648
|
||||||
|
AutoEnable = True
|
||||||
|
Visible = True
|
||||||
|
Begin MenuItem EditUndo
|
||||||
|
SpecialMenu = 0
|
||||||
|
Text = "&Undo"
|
||||||
|
Index = -2147483648
|
||||||
|
ShortcutKey = "Z"
|
||||||
|
Shortcut = "Cmd+Z"
|
||||||
|
MenuModifier = True
|
||||||
|
AutoEnable = True
|
||||||
|
Visible = True
|
||||||
|
End
|
||||||
|
Begin MenuItem EditSeparator1
|
||||||
|
SpecialMenu = 0
|
||||||
|
Text = "-"
|
||||||
|
Index = -2147483648
|
||||||
|
AutoEnable = True
|
||||||
|
Visible = True
|
||||||
|
End
|
||||||
|
Begin MenuItem EditCut
|
||||||
|
SpecialMenu = 0
|
||||||
|
Text = "Cu&t"
|
||||||
|
Index = -2147483648
|
||||||
|
ShortcutKey = "X"
|
||||||
|
Shortcut = "Cmd+X"
|
||||||
|
MenuModifier = True
|
||||||
|
AutoEnable = True
|
||||||
|
Visible = True
|
||||||
|
End
|
||||||
|
Begin MenuItem EditCopy
|
||||||
|
SpecialMenu = 0
|
||||||
|
Text = "&Copy"
|
||||||
|
Index = -2147483648
|
||||||
|
ShortcutKey = "C"
|
||||||
|
Shortcut = "Cmd+C"
|
||||||
|
MenuModifier = True
|
||||||
|
AutoEnable = True
|
||||||
|
Visible = True
|
||||||
|
End
|
||||||
|
Begin MenuItem EditPaste
|
||||||
|
SpecialMenu = 0
|
||||||
|
Text = "&Paste"
|
||||||
|
Index = -2147483648
|
||||||
|
ShortcutKey = "V"
|
||||||
|
Shortcut = "Cmd+V"
|
||||||
|
MenuModifier = True
|
||||||
|
AutoEnable = True
|
||||||
|
Visible = True
|
||||||
|
End
|
||||||
|
Begin MenuItem EditClear
|
||||||
|
SpecialMenu = 0
|
||||||
|
Text = "#App.kEditClear"
|
||||||
|
Index = -2147483648
|
||||||
|
AutoEnable = True
|
||||||
|
Visible = True
|
||||||
|
End
|
||||||
|
Begin MenuItem EditSeparator2
|
||||||
|
SpecialMenu = 0
|
||||||
|
Text = "-"
|
||||||
|
Index = -2147483648
|
||||||
|
AutoEnable = True
|
||||||
|
Visible = True
|
||||||
|
End
|
||||||
|
Begin MenuItem EditSelectAll
|
||||||
|
SpecialMenu = 0
|
||||||
|
Text = "Select &All"
|
||||||
|
Index = -2147483648
|
||||||
|
ShortcutKey = "A"
|
||||||
|
Shortcut = "Cmd+A"
|
||||||
|
MenuModifier = True
|
||||||
|
AutoEnable = True
|
||||||
|
Visible = True
|
||||||
|
End
|
||||||
|
Begin MenuItem UntitledSeparator
|
||||||
|
SpecialMenu = 0
|
||||||
|
Text = "-"
|
||||||
|
Index = -2147483648
|
||||||
|
AutoEnable = True
|
||||||
|
Visible = True
|
||||||
|
End
|
||||||
|
Begin AppleMenuItem AboutItem
|
||||||
|
SpecialMenu = 0
|
||||||
|
Text = "About This App..."
|
||||||
|
Index = -2147483648
|
||||||
|
AutoEnable = True
|
||||||
|
Visible = True
|
||||||
|
End
|
||||||
|
End
|
||||||
|
End
|
||||||
|
#tag EndMenu
|
||||||
14
samples/Xojo/MyToolbar.xojo_toolbar
Normal file
14
samples/Xojo/MyToolbar.xojo_toolbar
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#tag Toolbar
|
||||||
|
Begin Toolbar MyToolbar
|
||||||
|
Begin ToolButton FirstItem
|
||||||
|
Caption = "First Item"
|
||||||
|
HelpTag = ""
|
||||||
|
Style = 0
|
||||||
|
End
|
||||||
|
Begin ToolButton SecondItem
|
||||||
|
Caption = "Second Item"
|
||||||
|
HelpTag = ""
|
||||||
|
Style = 0
|
||||||
|
End
|
||||||
|
End
|
||||||
|
#tag EndToolbar
|
||||||
304
samples/Xojo/Window1.xojo_window
Normal file
304
samples/Xojo/Window1.xojo_window
Normal file
@@ -0,0 +1,304 @@
|
|||||||
|
#tag Window
|
||||||
|
Begin Window Window1
|
||||||
|
BackColor = &cFFFFFF00
|
||||||
|
Backdrop = 0
|
||||||
|
CloseButton = True
|
||||||
|
Compatibility = ""
|
||||||
|
Composite = False
|
||||||
|
Frame = 0
|
||||||
|
FullScreen = False
|
||||||
|
FullScreenButton= False
|
||||||
|
HasBackColor = False
|
||||||
|
Height = 400
|
||||||
|
ImplicitInstance= True
|
||||||
|
LiveResize = True
|
||||||
|
MacProcID = 0
|
||||||
|
MaxHeight = 32000
|
||||||
|
MaximizeButton = True
|
||||||
|
MaxWidth = 32000
|
||||||
|
MenuBar = 1153981589
|
||||||
|
MenuBarVisible = True
|
||||||
|
MinHeight = 64
|
||||||
|
MinimizeButton = True
|
||||||
|
MinWidth = 64
|
||||||
|
Placement = 0
|
||||||
|
Resizeable = True
|
||||||
|
Title = "Sample App"
|
||||||
|
Visible = True
|
||||||
|
Width = 600
|
||||||
|
Begin PushButton HelloWorldButton
|
||||||
|
AutoDeactivate = True
|
||||||
|
Bold = False
|
||||||
|
ButtonStyle = "0"
|
||||||
|
Cancel = False
|
||||||
|
Caption = "Push Me"
|
||||||
|
Default = True
|
||||||
|
Enabled = True
|
||||||
|
Height = 20
|
||||||
|
HelpTag = ""
|
||||||
|
Index = -2147483648
|
||||||
|
InitialParent = ""
|
||||||
|
Italic = False
|
||||||
|
Left = 260
|
||||||
|
LockBottom = False
|
||||||
|
LockedInPosition= False
|
||||||
|
LockLeft = True
|
||||||
|
LockRight = False
|
||||||
|
LockTop = True
|
||||||
|
Scope = 0
|
||||||
|
TabIndex = 0
|
||||||
|
TabPanelIndex = 0
|
||||||
|
TabStop = True
|
||||||
|
TextFont = "System"
|
||||||
|
TextSize = 0.0
|
||||||
|
TextUnit = 0
|
||||||
|
Top = 32
|
||||||
|
Underline = False
|
||||||
|
Visible = True
|
||||||
|
Width = 80
|
||||||
|
End
|
||||||
|
End
|
||||||
|
#tag EndWindow
|
||||||
|
|
||||||
|
#tag WindowCode
|
||||||
|
#tag EndWindowCode
|
||||||
|
|
||||||
|
#tag Events HelloWorldButton
|
||||||
|
#tag Event
|
||||||
|
Sub Action()
|
||||||
|
Dim total As Integer
|
||||||
|
|
||||||
|
For i As Integer = 0 To 10
|
||||||
|
total = total + i
|
||||||
|
Next
|
||||||
|
|
||||||
|
MsgBox "Hello World! " + Str(total)
|
||||||
|
End Sub
|
||||||
|
#tag EndEvent
|
||||||
|
#tag EndEvents
|
||||||
|
#tag ViewBehavior
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="BackColor"
|
||||||
|
Visible=true
|
||||||
|
Group="Appearance"
|
||||||
|
InitialValue="&hFFFFFF"
|
||||||
|
Type="Color"
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="Backdrop"
|
||||||
|
Visible=true
|
||||||
|
Group="Appearance"
|
||||||
|
Type="Picture"
|
||||||
|
EditorType="Picture"
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="CloseButton"
|
||||||
|
Visible=true
|
||||||
|
Group="Appearance"
|
||||||
|
InitialValue="True"
|
||||||
|
Type="Boolean"
|
||||||
|
EditorType="Boolean"
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="Composite"
|
||||||
|
Visible=true
|
||||||
|
Group="Appearance"
|
||||||
|
InitialValue="False"
|
||||||
|
Type="Boolean"
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="Frame"
|
||||||
|
Visible=true
|
||||||
|
Group="Appearance"
|
||||||
|
InitialValue="0"
|
||||||
|
Type="Integer"
|
||||||
|
EditorType="Enum"
|
||||||
|
#tag EnumValues
|
||||||
|
"0 - Document"
|
||||||
|
"1 - Movable Modal"
|
||||||
|
"2 - Modal Dialog"
|
||||||
|
"3 - Floating Window"
|
||||||
|
"4 - Plain Box"
|
||||||
|
"5 - Shadowed Box"
|
||||||
|
"6 - Rounded Window"
|
||||||
|
"7 - Global Floating Window"
|
||||||
|
"8 - Sheet Window"
|
||||||
|
"9 - Metal Window"
|
||||||
|
"10 - Drawer Window"
|
||||||
|
"11 - Modeless Dialog"
|
||||||
|
#tag EndEnumValues
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="FullScreen"
|
||||||
|
Group="Appearance"
|
||||||
|
InitialValue="False"
|
||||||
|
Type="Boolean"
|
||||||
|
EditorType="Boolean"
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="FullScreenButton"
|
||||||
|
Visible=true
|
||||||
|
Group="Appearance"
|
||||||
|
InitialValue="False"
|
||||||
|
Type="Boolean"
|
||||||
|
EditorType="Boolean"
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="HasBackColor"
|
||||||
|
Visible=true
|
||||||
|
Group="Appearance"
|
||||||
|
InitialValue="False"
|
||||||
|
Type="Boolean"
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="Height"
|
||||||
|
Visible=true
|
||||||
|
Group="Position"
|
||||||
|
InitialValue="400"
|
||||||
|
Type="Integer"
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="ImplicitInstance"
|
||||||
|
Visible=true
|
||||||
|
Group="Appearance"
|
||||||
|
InitialValue="True"
|
||||||
|
Type="Boolean"
|
||||||
|
EditorType="Boolean"
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="Interfaces"
|
||||||
|
Visible=true
|
||||||
|
Group="ID"
|
||||||
|
Type="String"
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="LiveResize"
|
||||||
|
Visible=true
|
||||||
|
Group="Appearance"
|
||||||
|
InitialValue="True"
|
||||||
|
Type="Boolean"
|
||||||
|
EditorType="Boolean"
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="MacProcID"
|
||||||
|
Visible=true
|
||||||
|
Group="Appearance"
|
||||||
|
InitialValue="0"
|
||||||
|
Type="Integer"
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="MaxHeight"
|
||||||
|
Visible=true
|
||||||
|
Group="Position"
|
||||||
|
InitialValue="32000"
|
||||||
|
Type="Integer"
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="MaximizeButton"
|
||||||
|
Visible=true
|
||||||
|
Group="Appearance"
|
||||||
|
InitialValue="True"
|
||||||
|
Type="Boolean"
|
||||||
|
EditorType="Boolean"
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="MaxWidth"
|
||||||
|
Visible=true
|
||||||
|
Group="Position"
|
||||||
|
InitialValue="32000"
|
||||||
|
Type="Integer"
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="MenuBar"
|
||||||
|
Visible=true
|
||||||
|
Group="Appearance"
|
||||||
|
Type="MenuBar"
|
||||||
|
EditorType="MenuBar"
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="MenuBarVisible"
|
||||||
|
Group="Appearance"
|
||||||
|
InitialValue="True"
|
||||||
|
Type="Boolean"
|
||||||
|
EditorType="Boolean"
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="MinHeight"
|
||||||
|
Visible=true
|
||||||
|
Group="Position"
|
||||||
|
InitialValue="64"
|
||||||
|
Type="Integer"
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="MinimizeButton"
|
||||||
|
Visible=true
|
||||||
|
Group="Appearance"
|
||||||
|
InitialValue="True"
|
||||||
|
Type="Boolean"
|
||||||
|
EditorType="Boolean"
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="MinWidth"
|
||||||
|
Visible=true
|
||||||
|
Group="Position"
|
||||||
|
InitialValue="64"
|
||||||
|
Type="Integer"
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="Name"
|
||||||
|
Visible=true
|
||||||
|
Group="ID"
|
||||||
|
Type="String"
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="Placement"
|
||||||
|
Visible=true
|
||||||
|
Group="Position"
|
||||||
|
InitialValue="0"
|
||||||
|
Type="Integer"
|
||||||
|
EditorType="Enum"
|
||||||
|
#tag EnumValues
|
||||||
|
"0 - Default"
|
||||||
|
"1 - Parent Window"
|
||||||
|
"2 - Main Screen"
|
||||||
|
"3 - Parent Window Screen"
|
||||||
|
"4 - Stagger"
|
||||||
|
#tag EndEnumValues
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="Resizeable"
|
||||||
|
Visible=true
|
||||||
|
Group="Appearance"
|
||||||
|
InitialValue="True"
|
||||||
|
Type="Boolean"
|
||||||
|
EditorType="Boolean"
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="Super"
|
||||||
|
Visible=true
|
||||||
|
Group="ID"
|
||||||
|
Type="String"
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="Title"
|
||||||
|
Visible=true
|
||||||
|
Group="Appearance"
|
||||||
|
InitialValue="Untitled"
|
||||||
|
Type="String"
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="Visible"
|
||||||
|
Visible=true
|
||||||
|
Group="Appearance"
|
||||||
|
InitialValue="True"
|
||||||
|
Type="Boolean"
|
||||||
|
EditorType="Boolean"
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag ViewProperty
|
||||||
|
Name="Width"
|
||||||
|
Visible=true
|
||||||
|
Group="Position"
|
||||||
|
InitialValue="600"
|
||||||
|
Type="Integer"
|
||||||
|
#tag EndViewProperty
|
||||||
|
#tag EndViewBehavior
|
||||||
Reference in New Issue
Block a user