MBS Xojo Developer Conference and Training
Join us from 11th to 14th September 2013 in Koblenz.

Platforms to show: All Mac Windows Linux Cross-Platform

/Linux/Linux HTMLViewer with Webkit
Feedback.

Function:
You find this example project in your Plugins Download as a Realbasic project file within the examples folder: /Linux/Linux HTMLViewer with Webkit
This example is the version from Tue, 20th Aug 2012.
Notes: Last modified: Tue, 20th Aug 2012
Project "Linux HTMLViewer with Webkit.rbp"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control web Inherits HTMLViewer
ControlInstance web Inherits HTMLViewer
End ControlInstance
End Control
Control BackButton Inherits BevelButton
ControlInstance BackButton Inherits BevelButton
End ControlInstance
Sub Action() b.GoBack End
End Control
Control ForwardButton Inherits BevelButton
ControlInstance ForwardButton Inherits BevelButton
End ControlInstance
Sub Action() b.GoForward End
End Control
Control ProgressWheel1 Inherits ProgressWheel
ControlInstance ProgressWheel1 Inherits ProgressWheel
End ControlInstance
End Control
Control URL Inherits TextField
ControlInstance URL Inherits TextField
End ControlInstance
Function KeyDown(Key As String) As Boolean if asc(key) = 3 or asc(key) = 13 then go Return true end if End
End Control
Control GoButton Inherits BevelButton
ControlInstance GoButton Inherits BevelButton
End ControlInstance
Sub Action() go End
End Control
Control Timer1 Inherits Timer
ControlInstance Timer1 Inherits Timer
End ControlInstance
Sub Action() if b = nil then Return dim v as Boolean = b.CanGoBack if v<>BackButton.Enabled then BackButton.Enabled = v end if v = b.CanGoForward if v<>ForwardButton.Enabled then ForwardButton.Enabled = v end if dim LoadStatus as integer = b.LoadStatus v = LoadStatus =1 or LoadStatus = 3 'Title = str(LoadStatus) if v<>ProgressWheel1.Visible then ProgressWheel1.Visible = v end if dim d as Double = b.Progress dim n as integer = d * 100 if n<>MyProgressBar.Value then MyProgressBar.Value = n end if End
End Control
Control MyProgressBar Inherits ProgressBar
ControlInstance MyProgressBar Inherits ProgressBar
End ControlInstance
End Control
Sub Open() b = web.LinuxWebViewMBS if b = nil then MsgBox "Please make sure you have WebKit on Linux." QUIT end if // test proxy 'b.proxyURL = "http://10.10.10.10/:1234" 'dim p as string = b.proxyURL 'MsgBox p ' End
Sub go() dim u as string = url.Text if instr(u,"://") = 0 then u = "http://"+u end if web.LoadURL u ProgressWheel1.Visible = true End
Property b As LinuxWebViewMBS
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&File"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "Select &All"
End MenuBar
End Project

The items on this page are in the following plugins: MBS Real Studio Linux Plugin.




Links
MBS Xojo Chart Plugins