mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-09-20 03:14:45 +00:00
Merge pull request #506 from QB64-Phoenix-Edition/wiki-stuff
Wiki stuff
This commit is contained in:
commit
a8e223434a
2 changed files with 78 additions and 32 deletions
|
@ -479,20 +479,24 @@ FUNCTION ide2 (ignore)
|
||||||
m = m + 1: i = 0
|
m = m + 1: i = 0
|
||||||
menu$(m, i) = "Help": i = i + 1
|
menu$(m, i) = "Help": i = i + 1
|
||||||
menu$(m, i) = "#View Shift+F1": i = i + 1
|
menu$(m, i) = "#View Shift+F1": i = i + 1
|
||||||
menuDesc$(m, i - 1) = "Displays help window"
|
menuDesc$(m, i - 1) = "Opens the help window with last viewed article"
|
||||||
menu$(m, i) = "#Contents Page": i = i + 1
|
menu$(m, i) = "#Contents Page": i = i + 1
|
||||||
menuDesc$(m, i - 1) = "Displays help contents page"
|
menuDesc$(m, i - 1) = "Displays the help contents page"
|
||||||
menu$(m, i) = "Keyword #Index": i = i + 1
|
menu$(m, i) = "Keywords #Index": i = i + 1
|
||||||
menuDesc$(m, i - 1) = "Displays keyword index page"
|
menuDesc$(m, i - 1) = "Displays the keywords index page (sorted alphabetically)"
|
||||||
menu$(m, i) = "#Keywords by Usage": i = i + 1
|
menu$(m, i) = "#Keywords by Usage": i = i + 1
|
||||||
menuDesc$(m, i - 1) = "Displays keywords index by usage"
|
menuDesc$(m, i - 1) = "Displays the keywords index page (sorted by usage)"
|
||||||
|
menu$(m, i) = "#Metacommands": i = i + 1
|
||||||
|
menuDesc$(m, i - 1) = "Displays the metacommands overview page"
|
||||||
|
menu$(m, i) = "Variable #Types": i = i + 1
|
||||||
|
menuDesc$(m, i - 1) = "Displays the variable types overview page"
|
||||||
menu$(m, i) = "-": i = i + 1
|
menu$(m, i) = "-": i = i + 1
|
||||||
menu$(m, i) = "#Update Current Page": i = i + 1
|
menu$(m, i) = "#Update Current Page": i = i + 1
|
||||||
menuDesc$(m, i - 1) = "Downloads the latest version of an article from the wiki"
|
menuDesc$(m, i - 1) = "Downloads the latest version of the current article from the Wiki"
|
||||||
menu$(m, i) = "Update All #Pages...": i = i + 1
|
menu$(m, i) = "Update All #Pages...": i = i + 1
|
||||||
menuDesc$(m, i - 1) = "Downloads the latest version of all articles from the wiki"
|
menuDesc$(m, i - 1) = "Downloads the latest version of all articles from the Wiki"
|
||||||
menu$(m, i) = "View Current Page On #Wiki": i = i + 1
|
menu$(m, i) = "View Current Page On #Wiki": i = i + 1
|
||||||
menuDesc$(m, i - 1) = "Launches the default browser and navigates to the current article on the wiki"
|
menuDesc$(m, i - 1) = "Opens the current article on the Wiki using your standard browser"
|
||||||
menu$(m, i) = "-": i = i + 1
|
menu$(m, i) = "-": i = i + 1
|
||||||
'menu$(m, i) = "Check for #Newer Version...": i = i + 1
|
'menu$(m, i) = "Check for #Newer Version...": i = i + 1
|
||||||
'menuDesc$(m, i - 1) = "Displays the current version of QB64-PE"
|
'menuDesc$(m, i - 1) = "Displays the current version of QB64-PE"
|
||||||
|
@ -2422,8 +2426,9 @@ FUNCTION ide2 (ignore)
|
||||||
Help_Select = 2
|
Help_Select = 2
|
||||||
Help_SelX1 = 1
|
Help_SelX1 = 1
|
||||||
Help_SelY1 = 1
|
Help_SelY1 = 1
|
||||||
Help_SelX2 = 10000000
|
Help_SelX2 = help_w
|
||||||
Help_SelY2 = help_h
|
Help_SelY2 = help_h
|
||||||
|
Help_cx1 = 1: Help_cy1 = 1
|
||||||
Help_cx = 1: Help_cy = help_h + 1
|
Help_cx = 1: Help_cy = help_h + 1
|
||||||
GOTO keep_select
|
GOTO keep_select
|
||||||
END IF
|
END IF
|
||||||
|
@ -2559,7 +2564,8 @@ FUNCTION ide2 (ignore)
|
||||||
oldlnk = lnk
|
oldlnk = lnk
|
||||||
LOOP
|
LOOP
|
||||||
|
|
||||||
IF Back_Name$(Help_Back_Pos) = "Alphabetical" OR Back_Name$(Help_Back_Pos) = "By Usage" THEN
|
'!!! RS:HCWD:#1 !!! (abbrev. page titles)
|
||||||
|
IF Back_Name$(Help_Back_Pos) = "KWs Alphab." OR Back_Name$(Help_Back_Pos) = "KWs by Usage" THEN
|
||||||
IF lnkx1 > 3 THEN
|
IF lnkx1 > 3 THEN
|
||||||
cx = px + 1
|
cx = px + 1
|
||||||
GOTO helpscanrow
|
GOTO helpscanrow
|
||||||
|
@ -2776,7 +2782,7 @@ FUNCTION ide2 (ignore)
|
||||||
Help_SelX1 = Help_cx: Help_SelX2 = Help_cx1 - 1
|
Help_SelX1 = Help_cx: Help_SelX2 = Help_cx1 - 1
|
||||||
END IF
|
END IF
|
||||||
ELSE
|
ELSE
|
||||||
Help_SelX1 = 1: Help_SelX2 = 10000000
|
Help_SelX1 = 1: Help_SelX2 = help_w
|
||||||
IF Help_cy > Help_cy1 THEN
|
IF Help_cy > Help_cy1 THEN
|
||||||
Help_SelY1 = Help_cy1: Help_SelY2 = Help_cy
|
Help_SelY1 = Help_cy1: Help_SelY2 = Help_cy
|
||||||
IF Help_cx = 1 THEN Help_SelY2 = Help_cy - 1
|
IF Help_cx = 1 THEN Help_SelY2 = Help_cy - 1
|
||||||
|
@ -5443,7 +5449,7 @@ FUNCTION ide2 (ignore)
|
||||||
lnk$ = "QB64 Help Menu"
|
lnk$ = "QB64 Help Menu"
|
||||||
GOTO OpenHelpLink
|
GOTO OpenHelpLink
|
||||||
END IF
|
END IF
|
||||||
IF menu$(m, s) = "Keyword #Index" THEN
|
IF menu$(m, s) = "Keywords #Index" THEN
|
||||||
PCOPY 3, 0: SCREEN , , 3, 0
|
PCOPY 3, 0: SCREEN , , 3, 0
|
||||||
lnk$ = "Keyword Reference - Alphabetical"
|
lnk$ = "Keyword Reference - Alphabetical"
|
||||||
GOTO OpenHelpLink
|
GOTO OpenHelpLink
|
||||||
|
@ -5453,6 +5459,16 @@ FUNCTION ide2 (ignore)
|
||||||
lnk$ = "Keyword Reference - By usage"
|
lnk$ = "Keyword Reference - By usage"
|
||||||
GOTO OpenHelpLink
|
GOTO OpenHelpLink
|
||||||
END IF
|
END IF
|
||||||
|
IF menu$(m, s) = "#Metacommands" THEN
|
||||||
|
PCOPY 3, 0: SCREEN , , 3, 0
|
||||||
|
lnk$ = "Metacommand"
|
||||||
|
GOTO OpenHelpLink
|
||||||
|
END IF
|
||||||
|
IF menu$(m, s) = "Variable #Types" THEN
|
||||||
|
PCOPY 3, 0: SCREEN , , 3, 0
|
||||||
|
lnk$ = "Variable Types"
|
||||||
|
GOTO OpenHelpLink
|
||||||
|
END IF
|
||||||
|
|
||||||
IF menu$(m, s) = "#View Shift+F1" THEN
|
IF menu$(m, s) = "#View Shift+F1" THEN
|
||||||
|
|
||||||
|
@ -18628,18 +18644,22 @@ SUB IdeMakeContextualMenu
|
||||||
menuDesc$(m, i - 1) = "Selects all contents of current article"
|
menuDesc$(m, i - 1) = "Selects all contents of current article"
|
||||||
menu$(m, i) = "-": i = i + 1
|
menu$(m, i) = "-": i = i + 1
|
||||||
menu$(m, i) = "#Contents Page": i = i + 1
|
menu$(m, i) = "#Contents Page": i = i + 1
|
||||||
menuDesc$(m, i - 1) = "Displays help contents page"
|
menuDesc$(m, i - 1) = "Displays the help contents page"
|
||||||
menu$(m, i) = "Keyword #Index": i = i + 1
|
menu$(m, i) = "Keywords #Index": i = i + 1
|
||||||
menuDesc$(m, i - 1) = "Displays keyword index page"
|
menuDesc$(m, i - 1) = "Displays the keywords index page (sorted alphabetically)"
|
||||||
menu$(m, i) = "#Keywords by Usage": i = i + 1
|
menu$(m, i) = "#Keywords by Usage": i = i + 1
|
||||||
menuDesc$(m, i - 1) = "Displays keywords index by usage"
|
menuDesc$(m, i - 1) = "Displays the keywords index page (sorted by usage)"
|
||||||
|
menu$(m, i) = "#Metacommands": i = i + 1
|
||||||
|
menuDesc$(m, i - 1) = "Displays the metacommands overview page"
|
||||||
|
menu$(m, i) = "Variable #Types": i = i + 1
|
||||||
|
menuDesc$(m, i - 1) = "Displays the variable types overview page"
|
||||||
menu$(m, i) = "-": i = i + 1
|
menu$(m, i) = "-": i = i + 1
|
||||||
menu$(m, i) = "#Update Current Page": i = i + 1
|
menu$(m, i) = "#Update Current Page": i = i + 1
|
||||||
menuDesc$(m, i - 1) = "Downloads the latest version of this article from the wiki"
|
menuDesc$(m, i - 1) = "Downloads the latest version of the current article from the Wiki"
|
||||||
menu$(m, i) = "Update All #Pages...": i = i + 1
|
menu$(m, i) = "Update All #Pages...": i = i + 1
|
||||||
menuDesc$(m, i - 1) = "Downloads the latest version of all articles from the wiki"
|
menuDesc$(m, i - 1) = "Downloads the latest version of all articles from the Wiki"
|
||||||
menu$(m, i) = "View Current Page On #Wiki": i = i + 1
|
menu$(m, i) = "View Current Page On #Wiki": i = i + 1
|
||||||
menuDesc$(m, i - 1) = "Launches the default browser and navigates to the current article on the wiki"
|
menuDesc$(m, i - 1) = "Opens the current article on the Wiki using your standard browser"
|
||||||
menu$(m, i) = "-": i = i + 1
|
menu$(m, i) = "-": i = i + 1
|
||||||
menu$(m, i) = "Clo#se Help ESC": i = i + 1
|
menu$(m, i) = "Clo#se Help ESC": i = i + 1
|
||||||
menuDesc$(m, i - 1) = "Closes help window"
|
menuDesc$(m, i - 1) = "Closes help window"
|
||||||
|
@ -19008,12 +19028,20 @@ FUNCTION ideupdatehelpbox
|
||||||
IF INSTR(f$, CHR$(0) + PageName2$ + CHR$(0)) = 0 THEN f$ = CHR$(0) + PageName2$ + f$
|
IF INSTR(f$, CHR$(0) + PageName2$ + CHR$(0)) = 0 THEN f$ = CHR$(0) + PageName2$ + f$
|
||||||
PageName2$ = "QB64_Help_Menu.txt"
|
PageName2$ = "QB64_Help_Menu.txt"
|
||||||
IF INSTR(f$, CHR$(0) + PageName2$ + CHR$(0)) = 0 THEN f$ = CHR$(0) + PageName2$ + f$
|
IF INSTR(f$, CHR$(0) + PageName2$ + CHR$(0)) = 0 THEN f$ = CHR$(0) + PageName2$ + f$
|
||||||
|
PageName2$ = "Data_types.txt"
|
||||||
|
IF INSTR(f$, CHR$(0) + PageName2$ + CHR$(0)) = 0 THEN f$ = CHR$(0) + PageName2$ + f$
|
||||||
|
PageName2$ = "Variable_Types.txt"
|
||||||
|
IF INSTR(f$, CHR$(0) + PageName2$ + CHR$(0)) = 0 THEN f$ = CHR$(0) + PageName2$ + f$
|
||||||
PageName2$ = "ERROR_Codes.txt"
|
PageName2$ = "ERROR_Codes.txt"
|
||||||
IF INSTR(f$, CHR$(0) + PageName2$ + CHR$(0)) = 0 THEN f$ = CHR$(0) + PageName2$ + f$
|
IF INSTR(f$, CHR$(0) + PageName2$ + CHR$(0)) = 0 THEN f$ = CHR$(0) + PageName2$ + f$
|
||||||
|
PageName2$ = "Quick_Reference_-_Tables.txt"
|
||||||
|
IF INSTR(f$, CHR$(0) + PageName2$ + CHR$(0)) = 0 THEN f$ = CHR$(0) + PageName2$ + f$
|
||||||
PageName2$ = "Keywords_currently_not_supported_by_QB64.txt"
|
PageName2$ = "Keywords_currently_not_supported_by_QB64.txt"
|
||||||
IF INSTR(f$, CHR$(0) + PageName2$ + CHR$(0)) = 0 THEN f$ = CHR$(0) + PageName2$ + f$
|
IF INSTR(f$, CHR$(0) + PageName2$ + CHR$(0)) = 0 THEN f$ = CHR$(0) + PageName2$ + f$
|
||||||
PageName2$ = "Keyword_Reference_-_By_usage.txt"
|
PageName2$ = "Keyword_Reference_-_By_usage.txt"
|
||||||
IF INSTR(f$, CHR$(0) + PageName2$ + CHR$(0)) = 0 THEN f$ = CHR$(0) + PageName2$ + f$
|
IF INSTR(f$, CHR$(0) + PageName2$ + CHR$(0)) = 0 THEN f$ = CHR$(0) + PageName2$ + f$
|
||||||
|
PageName2$ = "Metacommand.txt"
|
||||||
|
IF INSTR(f$, CHR$(0) + PageName2$ + CHR$(0)) = 0 THEN f$ = CHR$(0) + PageName2$ + f$
|
||||||
et# = TIMER(0.001) - st#: IF et# < 0 THEN et# = et# + 86400
|
et# = TIMER(0.001) - st#: IF et# < 0 THEN et# = et# + 86400
|
||||||
IF 1.25 - et# > 0 THEN _DELAY 1.25 - et#
|
IF 1.25 - et# > 0 THEN _DELAY 1.25 - et#
|
||||||
UpdateStep = UpdateStep + 1
|
UpdateStep = UpdateStep + 1
|
||||||
|
|
|
@ -1,10 +1,27 @@
|
||||||
FUNCTION Back2BackName$ (a$)
|
FUNCTION Back2BackName$ (a$)
|
||||||
IF a$ = "Keyword Reference - Alphabetical" THEN Back2BackName$ = "Alphabetical": EXIT FUNCTION
|
SELECT CASE a$
|
||||||
IF a$ = "Keyword Reference - By usage" THEN Back2BackName$ = "By Usage": EXIT FUNCTION
|
CASE "Base Comparisons": Back2BackName$ = "Base Compare"
|
||||||
IF a$ = "Keywords currently not supported by QB64" THEN Back2BackName$ = "Unsupported": EXIT FUNCTION
|
CASE "Bitwise Operators": Back2BackName$ = "Bitwise OPs"
|
||||||
IF a$ = "QB64 Help Menu" THEN Back2BackName$ = "Help": EXIT FUNCTION
|
CASE "Downloading Files": Back2BackName$ = "Downloads"
|
||||||
IF a$ = "QB64 FAQ" THEN Back2BackName$ = "FAQ": EXIT FUNCTION
|
CASE "Function (explanatory)": Back2BackName$ = "FUNC expl."
|
||||||
Back2BackName$ = a$
|
CASE "Greater Than Or Equal": Back2BackName$ = "Greater|Equal"
|
||||||
|
CASE "Keyboard scancodes": Back2BackName$ = "KB Scancodes"
|
||||||
|
CASE "Keyword Reference - Alphabetical": Back2BackName$ = "KWs Alphab." 'scan sources for
|
||||||
|
CASE "Keyword Reference - By usage": Back2BackName$ = "KWs by Usage" ' '!!! RS:HCWD:#1 !!!
|
||||||
|
CASE "Keywords currently not supported by QB64": Back2BackName$ = "Unsupp. KWs"
|
||||||
|
CASE "Less Than Or Equal": Back2BackName$ = "Less|Equal"
|
||||||
|
CASE "Mathematical Operations": Back2BackName$ = "Math OPs"
|
||||||
|
CASE "QB64 Help Menu": Back2BackName$ = "QB64 Help"
|
||||||
|
CASE "Quick Reference - Tables": Back2BackName$ = "QRef. Tables"
|
||||||
|
CASE "Relational Operations": Back2BackName$ = "Relational OPs"
|
||||||
|
CASE "Scientific notation": Back2BackName$ = "Sci. Notation"
|
||||||
|
CASE "Sub (explanatory)": Back2BackName$ = "SUB expl."
|
||||||
|
CASE "Windows Environment": Back2BackName$ = "Win Env."
|
||||||
|
CASE "Windows Libraries": Back2BackName$ = "Win Lib."
|
||||||
|
CASE "Windows Printer Settings": Back2BackName$ = "Win Print"
|
||||||
|
CASE "Windows Registry Access": Back2BackName$ = "Win Reg."
|
||||||
|
CASE ELSE: Back2BackName$ = a$
|
||||||
|
END SELECT
|
||||||
END FUNCTION
|
END FUNCTION
|
||||||
|
|
||||||
FUNCTION Wiki$ (PageName$) 'Read cached wiki page (download, if not yet cached)
|
FUNCTION Wiki$ (PageName$) 'Read cached wiki page (download, if not yet cached)
|
||||||
|
@ -117,7 +134,7 @@ END FUNCTION
|
||||||
|
|
||||||
SUB Help_AddTxt (t$, col, link) 'Add help text, handle word wrap
|
SUB Help_AddTxt (t$, col, link) 'Add help text, handle word wrap
|
||||||
IF t$ = "" THEN EXIT SUB
|
IF t$ = "" THEN EXIT SUB
|
||||||
IF Help_ChkBlank <> 0 THEN Help_CheckBlankLine: Help_ChkBlank = 0
|
IF Help_ChkBlank <> 0 THEN Help_CheckBlankLine
|
||||||
|
|
||||||
FOR i = 1 TO LEN(t$)
|
FOR i = 1 TO LEN(t$)
|
||||||
c = ASC(t$, i)
|
c = ASC(t$, i)
|
||||||
|
@ -210,6 +227,7 @@ SUB Help_CheckBlankLine 'Make sure the last help line is a blank line (implies f
|
||||||
IF ASC(Help_Txt$, Help_Txt_Len - 2) < 128 THEN Help_NewLine
|
IF ASC(Help_Txt$, Help_Txt_Len - 2) < 128 THEN Help_NewLine
|
||||||
IF ASC(Help_Txt$, Help_Txt_Len - 6) < 128 THEN Help_NewLine
|
IF ASC(Help_Txt$, Help_Txt_Len - 6) < 128 THEN Help_NewLine
|
||||||
END IF
|
END IF
|
||||||
|
Help_ChkBlank = 0
|
||||||
END SUB
|
END SUB
|
||||||
|
|
||||||
SUB Help_CheckRemoveBlankLine 'If the last help line is blank, then remove it
|
SUB Help_CheckRemoveBlankLine 'If the last help line is blank, then remove it
|
||||||
|
@ -703,7 +721,7 @@ SUB WikiParse (a$) 'Wiki page interpret
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
'Template wrapped plugin
|
'Template wrapped plugin
|
||||||
IF (cb$ = "PageNavigation" OR RIGHT$(cb$, 6) = "Plugin") AND Help_LockParse = 0 THEN 'no plugins in blocks
|
IF (cb$ = "PageNavigation" OR cb$ = "PageReferences" OR RIGHT$(cb$, 6) = "Plugin") AND Help_LockParse = 0 THEN 'no plugins in blocks
|
||||||
pit$ = Wiki$("Template:" + cb$)
|
pit$ = Wiki$("Template:" + cb$)
|
||||||
IF INSTR(pit$, "{{PageInternalError}}") = 0 THEN
|
IF INSTR(pit$, "{{PageInternalError}}") = 0 THEN
|
||||||
a$ = LEFT$(a$, i) + pit$ + RIGHT$(a$, LEN(a$) - i)
|
a$ = LEFT$(a$, i) + pit$ + RIGHT$(a$, LEN(a$) - i)
|
||||||
|
@ -785,17 +803,17 @@ SUB WikiParse (a$) 'Wiki page interpret
|
||||||
'Rulers
|
'Rulers
|
||||||
IF c$(4) = "----" AND nl = 1 THEN
|
IF c$(4) = "----" AND nl = 1 THEN
|
||||||
i = i + 3
|
i = i + 3
|
||||||
Help_CheckBlankLine
|
IF Help_ChkBlank = -1 THEN Help_ChkBlank = 0: ELSE Help_CheckBlankLine
|
||||||
Help_AddTxt STRING$(Help_ww, 196), 14, 0
|
Help_AddTxt STRING$(Help_ww, 196), 14, 0
|
||||||
Help_ChkBlank = 1
|
Help_ChkBlank = -1
|
||||||
GOTO charDone
|
GOTO charDone
|
||||||
END IF
|
END IF
|
||||||
IF c$(4) = "<hr>" OR c$(6) = "<hr />" THEN
|
IF c$(4) = "<hr>" OR c$(6) = "<hr />" THEN
|
||||||
IF c$(4) = "<hr>" THEN i = i + 3
|
IF c$(4) = "<hr>" THEN i = i + 3
|
||||||
IF c$(6) = "<hr />" THEN i = i + 5
|
IF c$(6) = "<hr />" THEN i = i + 5
|
||||||
Help_CheckBlankLine
|
IF Help_ChkBlank = -1 THEN Help_ChkBlank = 0: ELSE Help_CheckBlankLine
|
||||||
Help_AddTxt STRING$(Help_ww, 196), 14, 0
|
Help_AddTxt STRING$(Help_ww, 196), 14, 0
|
||||||
Help_ChkBlank = 1
|
Help_ChkBlank = -1
|
||||||
GOTO charDone
|
GOTO charDone
|
||||||
END IF
|
END IF
|
||||||
END IF
|
END IF
|
||||||
|
@ -808,8 +826,8 @@ SUB WikiParse (a$) 'Wiki page interpret
|
||||||
IF c$(2) = "; " THEN i = i + 1
|
IF c$(2) = "; " THEN i = i + 1
|
||||||
IF ah = 0 AND dl = 0 THEN Help_CheckBlankLine
|
IF ah = 0 AND dl = 0 THEN Help_CheckBlankLine
|
||||||
Help_Bold = 1: col = Help_Col: Help_DList = 1
|
Help_Bold = 1: col = Help_Col: Help_DList = 1
|
||||||
IF c$(3) = ";* " OR c$(3) = ";# " THEN i = i + 2: Help_DList = 3 'list dot belongs to description
|
|
||||||
IF c$(2) = ";*" OR c$(2) = ";#" THEN i = i + 1: Help_DList = 2 'list dot belongs to description
|
IF c$(2) = ";*" OR c$(2) = ";#" THEN i = i + 1: Help_DList = 2 'list dot belongs to description
|
||||||
|
IF c$(3) = ";* " OR c$(3) = ";# " THEN i = i + 1: Help_DList = 3 'list dot belongs to description
|
||||||
IF dl < 3 THEN
|
IF dl < 3 THEN
|
||||||
Help_AddTxt "Þ ", 11, 0: dl = 1
|
Help_AddTxt "Þ ", 11, 0: dl = 1
|
||||||
Help_LIndent$ = Help_LIndent$ + "Þ "
|
Help_LIndent$ = Help_LIndent$ + "Þ "
|
||||||
|
|
Loading…
Reference in a new issue