diff --git a/app/src/gambas3/.project b/app/src/gambas3/.project
index 7326fe932..848f07585 100644
--- a/app/src/gambas3/.project
+++ b/app/src/gambas3/.project
@@ -20,13 +20,13 @@ Component=gb.form.editor
Component=gb.form.htmlview
Component=gb.settings
Component=gb.form.mdi
-Component=gb.net
-Component=gb.net.curl
Component=gb.form.print
Component=gb.form.stock
Component=gb.term
Component=gb.form.terminal
Component=gb.gui.webview
+Component=gb.net
+Component=gb.net.curl
Component=gb.markdown
Component=gb.pcre
Component=gb.signal
diff --git a/app/src/gambas3/.src/Component/CClassInfo.class b/app/src/gambas3/.src/Component/CClassInfo.class
index 9548fe74f..1dd3024f1 100644
--- a/app/src/gambas3/.src/Component/CClassInfo.class
+++ b/app/src/gambas3/.src/Component/CClassInfo.class
@@ -509,11 +509,14 @@ End
Private Sub GetSymbolLink(hSymbol As CSymbolInfo, sName As String) As String
- Return Subst("&2", Html(hSymbol.GetHelpURL()), sName)
+ If hSymbol.HasHelp() Then
+ Return Subst("&2", Html(hSymbol.GetHelpURL()), Html(sName))
+ Else
+ Return Subst("&1", Html(sName))
+ Endif
End
-
Public Sub GetHelpHTML() As String
Dim sClass As String = Name
@@ -532,13 +535,9 @@ Public Sub GetHelpHTML() As String
Dim sParent As String
Dim hParentClass As CClassInfo
Dim sStr As String
+ Dim sSpace As String
- ' sHelp = GetHelpMarkup()
- ' sHelp &= "\n" & WikiGetSymbols().Join("\n")
- ' Return WikiMarkdown.ToHTML(sHelp)
-
- 'sHelp = Markup.Convert(GetHelpMarkup())
- sHelp = Markdown.ToHTML(GetHelpMarkup())
+ sHelp = WikiMarkdown.ToHTML(GetHelpMarkup())
hClassInfo = Documentation.GetClassDescription(sClass)
cClassSymbols = hClassInfo.Symbols 'CComponent.GetClassSymbols(sClass)
@@ -610,6 +609,7 @@ Public Sub GetHelpHTML() As String
' Endif
sSymbols = ""
+ sSpace = " "
If aStaticMethod.Count + aStaticProperty.Count + aStaticVar.Count + aConst.Count Then
@@ -622,10 +622,10 @@ Public Sub GetHelpHTML() As String
sSymbols &= "
"
- If aStaticProperty.Count Then sSymbols &= "" & aStaticProperty.Join(" ") & " | | "
- If aStaticVar.Count Then sSymbols &= "" & aStaticVar.Join(" ") & " | | "
- If aStaticMethod.Count Then sSymbols &= "" & aStaticMethod.Join(" ") & " | | "
- If aConst.Count Then sSymbols &= "" & aConst.Join(" ") & " | | "
+ If aStaticProperty.Count Then sSymbols &= "" & aStaticProperty.Join(sSpace) & " | | "
+ If aStaticVar.Count Then sSymbols &= "" & aStaticVar.Join(sSpace) & " | | "
+ If aStaticMethod.Count Then sSymbols &= "" & aStaticMethod.Join(sSpace) & " | | "
+ If aConst.Count Then sSymbols &= "" & aConst.Join(sSpace) & " | | "
sSymbols &= "
"
@@ -642,10 +642,10 @@ Public Sub GetHelpHTML() As String
sSymbols &= ""
- If aProperty.Count Then sSymbols &= "" & aProperty.Join(" ") & " | | "
- If aVar.Count Then sSymbols &= "" & aVar.Join(" ") & " | | "
- If aMethod.Count Then sSymbols &= "" & aMethod.Join(" ") & " | | "
- If aEvent.Count Then sSymbols &= "" & aEvent.Join(" ") & " | | "
+ If aProperty.Count Then sSymbols &= "" & aProperty.Join(sSpace) & " | | "
+ If aVar.Count Then sSymbols &= "" & aVar.Join(sSpace) & " | | "
+ If aMethod.Count Then sSymbols &= "" & aMethod.Join(sSpace) & " | | "
+ If aEvent.Count Then sSymbols &= "" & aEvent.Join(sSpace) & " | | "
sSymbols &= "
"
diff --git a/app/src/gambas3/.src/Component/CSymbolInfo.class b/app/src/gambas3/.src/Component/CSymbolInfo.class
index c2260e95a..b781f4176 100644
--- a/app/src/gambas3/.src/Component/CSymbolInfo.class
+++ b/app/src/gambas3/.src/Component/CSymbolInfo.class
@@ -872,6 +872,17 @@ Public Function GetHelpURL(Optional bShowFile As Boolean) As String
End
+Public Sub HasHelp() As Boolean
+
+ If Component = CComponent.PROJECT_NAME Or If Not Component Then
+ Return GetHelpMarkup()
+ Else
+ Return True
+ Endif
+
+End
+
+
'' Transform one line of help into HTML by decoding some sort of light wiki syntax.
''
'' - #sLine# is the line of help text.
@@ -1054,7 +1065,7 @@ Public Function GetHelpHTML() As String
sMarkup = GetHelpMarkup()
If sMarkup Then
- Try sHelp = Markdown.ToHTML(sMarkup)
+ Try sHelp = WikiMarkdown.ToHTML(sMarkup)
If Error Then sHelp = "" & Error.Text & ""
Endif
diff --git a/app/src/gambas3/.src/Help/HelpBrowser.class b/app/src/gambas3/.src/Help/HelpBrowser.class
index a27da1ff9..cbf11a7e7 100644
--- a/app/src/gambas3/.src/Help/HelpBrowser.class
+++ b/app/src/gambas3/.src/Help/HelpBrowser.class
@@ -22,8 +22,6 @@ Private $hTimerNotExist As Timer
Public Sub _new()
- Project.InitWebView
-
$hObs = New Observer(Me) As "WebView"
$hWatcher = New Watcher(Me) As "Watcher"
diff --git a/app/src/gambas3/.src/Help/HelpView.class b/app/src/gambas3/.src/Help/HelpView.class
index 03c57a7f4..a86b5ac55 100644
--- a/app/src/gambas3/.src/Help/HelpView.class
+++ b/app/src/gambas3/.src/Help/HelpView.class
@@ -23,6 +23,11 @@ Public Sub ReadConfig() As Boolean
Dim bOffline As Boolean
Dim bRet As Boolean
+ Dim hDefaultFont As Font
+ Dim hFixedFont As Font
+
+ hDefaultFont = Font[Settings["/Help/Font"]]
+ hFixedFont = Font[Settings["/Help/FixedFont", Project.DEFAULT_FONT]]
bOffline = Settings["/UseOfflineHelp"]
If Not $hView Or If bOffline Xor $hView Is HtmlView Then
@@ -41,8 +46,19 @@ Public Sub ReadConfig() As Boolean
Endif
If bOffLine Then
- $hView.Font = Font[Settings["/Help/Font"]]
- $hView.MonospaceFont = Font[Settings["/Help/FixedFont"]]
+
+ $hView.Font = hDefaultFont
+ $hView.MonospaceFont = hFixedFont
+
+ Else
+
+ $hView.Settings.Fonts.Serif = hDefaultFont.Name
+ $hView.Settings.Fonts.SansSerif = hDefaultFont.Name
+ $hView.Settings.Fonts.DefaultSize = hDefaultFont.Size
+
+ $hView.Settings.Fonts.Fixed = hFixedFont.Name
+ $hView.Settings.Fonts.DefaultFixedSize = hFixedFont.Size
+
Endif
Return bRet
diff --git a/app/src/gambas3/.src/Help/Wiki/WikiMarkdown.class b/app/src/gambas3/.src/Help/Wiki/WikiMarkdown.class
index 7facfe39a..909ceaab8 100644
--- a/app/src/gambas3/.src/Help/Wiki/WikiMarkdown.class
+++ b/app/src/gambas3/.src/Help/Wiki/WikiMarkdown.class
@@ -7,6 +7,9 @@ Public Sub Link(hLink As MarkdownLink)
Dim sPath As String
Dim sLink As String = hLink.Link
Dim iPos As Integer
+ Dim sClass As String
+ Dim sSymbol As String
+ Dim hClass As CClassInfo
If sLink Begins "/" Then
sPath = sLink
@@ -18,10 +21,28 @@ Public Sub Link(hLink As MarkdownLink)
sLink = hLink.Text
iPos = InStr(sLink, ".")
- If iPos Then
- hLink.Text = ""
- sPath = "/comp/gb" &/ Trim(Left$(sLink, iPos - 1)) &/ Trim(Mid$(sLink, iPos + 1))
+
+ If iPos Then
+
+ sClass = Left$(sLink, iPos - 1)
+ sSymbol = Mid$(sLink, iPos + 1)
+
+ Else
+
+ sClass = sLink
+
Endif
+
+ Try hClass = Project.Documentation.Classes[sClass]
+ If hClass And If hClass.Component = CComponent.PROJECT_NAME Then
+ hLink.Link = "gambas://project/" & sClass &/ sSymbol
+ hLink.Text = sLink
+ hLink.Blank = True
+ Return
+ Endif
+
+ hLink.Text = ""
+ sPath = "/comp/gb" &/ sClass &/ sSymbol
Else