From 904ba7e6728da02ee12e689c85f4584118833f91 Mon Sep 17 00:00:00 2001 From: FellippeHeitor Date: Fri, 22 Jan 2021 20:58:47 -0300 Subject: [PATCH] Converts, where feasible, PRINT to _PRINTSTRING. --- source/ide/ide_methods.bas | 400 ++++++++++++++++--------------------- 1 file changed, 176 insertions(+), 224 deletions(-) diff --git a/source/ide/ide_methods.bas b/source/ide/ide_methods.bas index 76a7c35a9..a32a09b2c 100644 --- a/source/ide/ide_methods.bas +++ b/source/ide/ide_methods.bas @@ -199,14 +199,13 @@ FUNCTION ide2 (ignore) dummy = DarkenFGBG(1) BkpIdeSystem = IdeSystem: IdeSystem = 2: GOSUB UpdateTitleOfMainWindow: IdeSystem = BkpIdeSystem - COLOR 1, 7: LOCATE idewy - 4, (idewx - 8) / 2: PRINT " Status " + COLOR 1, 7: _PRINTSTRING ((idewx - 8) / 2, idewy - 4), " Status " COLOR 15, 1 - LOCATE idewy - 3, 2 IF os$ = "LNX" THEN - PRINT "Creating executable file named " + CHR$(34) + f$ + extension$ + CHR$(34) + "..." + _PRINTSTRING (2, idewy - 3), "Creating executable file named " + CHR$(34) + f$ + extension$ + CHR$(34) + "..." ELSE - PRINT "Creating .EXE file named " + CHR$(34) + f$ + extension$ + CHR$(34) + "..." + _PRINTSTRING (2, idewy - 3), "Creating .EXE file named " + CHR$(34) + f$ + extension$ + CHR$(34) + "..." END IF PCOPY 3, 0 @@ -661,44 +660,42 @@ FUNCTION ide2 (ignore) LOCATE , , 0 'note: menu bar shouldn't need repairing! - 'COLOR 0, 7: LOCATE 1, 1: PRINT menubar$; 'repair menu bar + 'COLOR 0, 7: _PRINTSTRING (1, 1), menubar$ 'repair menu bar IF c$ <> CHR$(3) THEN clearStatusWindow IF ready THEN IF IDEShowErrorsImmediately THEN - LOCATE idewy - 3, 2: PRINT "OK"; 'report OK status + _PRINTSTRING (2, idewy - 3), "OK" 'report OK status statusarealink = 0 IF totalWarnings > 0 AND showexecreated = 0 THEN COLOR 11, 1 - PRINT " ("; LTRIM$(STR$(totalWarnings)) + " warning"; - IF totalWarnings > 1 THEN PRINT "s"; - PRINT " - click here or Ctrl+W to view)"; + msg$ = " (" + LTRIM$(STR$(totalWarnings)) + " warning" + IF totalWarnings > 1 THEN msg$ = msg$ + "s" + msg$ = msg$ + " - click here or Ctrl+W to view)" + _PRINTSTRING (4, idewy - 3), msg$ statusarealink = 4 END IF END IF END IF IF showexecreated THEN showexecreated = 0 - LOCATE idewy - 3, 2 IF os$ = "LNX" THEN - PRINT "Executable file created"; + _PRINTSTRING (2, idewy - 3), "Executable file created" ELSE - PRINT ".EXE file created"; + _PRINTSTRING (2, idewy - 3), ".EXE file created" END IF IF SaveExeWithSource THEN - LOCATE idewy - 2, 2 - PRINT "Location: "; COLOR 11, 1 location$ = lastBinaryGenerated$ IF path.exe$ = "" THEN location$ = _STARTDIR$ + pathsep$ + location$ - IF POS(0) + LEN(location$) > idewx THEN - PRINT "..."; RIGHT$(location$, idewx - 15); - ELSE - PRINT location$; + msg$ = "Location: " + location$ + IF 2 + LEN(msg$) > idewx THEN + msg$ = "Location: " + STRING$(3, 250) + RIGHT$(location$, idewx - 15) END IF + _PRINTSTRING (2, idewy - 2), msg$ statusarealink = 3 END IF @@ -775,18 +772,18 @@ FUNCTION ide2 (ignore) 'static background COLOR 0, 7 - LOCATE 1, 1: PRINT SPACE$(idewx); - LOCATE 1, 1: PRINT LEFT$(menubar$, idewx); + _PRINTSTRING (1, 1), SPACE$(idewx) + _PRINTSTRING (1, 1), LEFT$(menubar$, idewx) COLOR 7, 1: idebox 1, 2, idewx, idewy - 5 COLOR 7, 1: idebox 1, idewy - 4, idewx, 5 'edit corners - COLOR 7, 1: LOCATE idewy - 4, 1: PRINT CHR$(195);: LOCATE idewy - 4, idewx: PRINT CHR$(180); + COLOR 7, 1: _PRINTSTRING (1, idewy - 4), CHR$(195): _PRINTSTRING (idewx, idewy - 4), CHR$(180) GOSUB UpdateSearchBar 'status bar - COLOR 0, 3: LOCATE idewy + idesubwindow, 1: PRINT SPACE$(idewx); + COLOR 0, 3: _PRINTSTRING (1, idewy + idesubwindow), SPACE$(idewx) UpdateIdeInfo q = idevbar(idewx, idewy - 3, 3, 1, 1) q = idevbar(idewx, 3, idewy - 8, 1, 1) @@ -859,8 +856,7 @@ FUNCTION ide2 (ignore) END IF x = x + 1: IF x = idewx THEN x = 2: y = y + 1 IF y > idewy - 1 THEN EXIT FOR - LOCATE y, x - PRINT CHR$(ASC(a$, i)); + _PRINTSTRING (x, y), CHR$(ASC(a$, i)) NEXT statusarealink = 1 ELSE @@ -877,8 +873,7 @@ FUNCTION ide2 (ignore) FOR i = 1 TO LEN(a$) x = x + 1: IF x = idewx THEN x = 2: y = y + 1 IF y > idewy - 1 THEN EXIT FOR - LOCATE y, x - PRINT CHR$(ASC(a$, i)); + _PRINTSTRING (x, y), CHR$(ASC(a$, i)) NEXT IF l <> 0 AND idecy <> l THEN @@ -887,8 +882,7 @@ FUNCTION ide2 (ignore) FOR i = 1 TO LEN(a$) x = x + 1: IF x = idewx THEN x = 2: y = y + 1 IF y > idewy - 1 THEN EXIT FOR - LOCATE y, x - PRINT CHR$(ASC(a$, i)); + _PRINTSTRING (x, y), CHR$(ASC(a$, i)) NEXT statusarealink = 2 END IF @@ -908,8 +902,7 @@ FUNCTION ide2 (ignore) x = x + 1: IF x = idewx THEN x = 2: y = y + 1 IF y > idewy - 1 THEN EXIT FOR IF ASC(temp$, i) = 1 THEN i = i + 1: COLOR 11, 1 - LOCATE y, x - PRINT CHR$(ASC(temp$, i)); + _PRINTSTRING (x, y), CHR$(ASC(temp$, i)) NEXT END IF END IF @@ -922,7 +915,7 @@ FUNCTION ide2 (ignore) IF IDEShowErrorsImmediately OR IDECompilationRequested THEN clearStatusWindow IdeInfo = "" - LOCATE idewy - 3, 2: PRINT "..."; 'assume new compilation will begin + _PRINTSTRING (2, idewy - 3), "..." 'assume new compilation will begin END IF END IF @@ -1222,15 +1215,14 @@ FUNCTION ide2 (ignore) IF mX >= 4 AND mX <= 6 THEN IF QuickNavHover = 0 THEN QuickNavHover = -1 - LOCATE 2, 4 COLOR 15, 3 popup$ = " " + CHR$(17) + " back to line " + str2$(QuickNavHistory(QuickNavTotal)) + " " - PRINT popup$; + _PRINTSTRING (4, 2), popup$ 'shadow COLOR 2, 0 FOR x2 = 6 TO 4 + LEN(popup$) - LOCATE 3, x2: PRINT CHR$(SCREEN(3, x2)); + _PRINTSTRING (x2, 3), CHR$(SCREEN(3, x2)) NEXT updateHover = -1 END IF @@ -1259,9 +1251,8 @@ FUNCTION ide2 (ignore) IF mY = idewy - 4 AND mX > idewx - (idesystem2.w + 10) AND mX <= idewx - (idesystem2.w + 8) + 2 THEN '"Find" button IF FindFieldHover = 0 THEN 'Highlight "Find" - LOCATE idewy - 4, idewx - (idesystem2.w + 9) COLOR 1, 3 - PRINT "Find"; + _PRINTSTRING (idewx - (idesystem2.w + 9), idewy - 4), "Find" updateHover = -1 FindFieldHover = -1 END IF @@ -1269,9 +1260,8 @@ FUNCTION ide2 (ignore) IF FindFieldHover = -1 THEN 'Restore "Find" bg FindFieldHover = 0 - LOCATE idewy - 4, idewx - (idesystem2.w + 9) COLOR 3, 1 - PRINT "Find"; + _PRINTSTRING (idewx - (idesystem2.w + 9), idewy - 4), "Find" updateHover = -1 END IF END IF @@ -1279,9 +1269,8 @@ FUNCTION ide2 (ignore) IF mY = idewy + idesubwindow AND mX >= idewx - 22 - LEN(versionStringStatus$) AND mX < idewx - 22 THEN 'Highlight Version Number IF VersionInfoHover = 0 THEN - LOCATE idewy + idesubwindow, idewx - 22 - LEN(versionStringStatus$) COLOR 13, 6 - PRINT versionStringStatus$; + _PRINTSTRING (idewx - 22 - LEN(versionStringStatus$), idewy + idesubwindow), versionStringStatus$ updateHover = -1 VersionInfoHover = -1 END IF @@ -1290,9 +1279,8 @@ FUNCTION ide2 (ignore) IF VersionInfoHover = -1 THEN 'Restore "Find" bg VersionInfoHover = 0 - LOCATE idewy + idesubwindow, idewx - 22 - LEN(versionStringStatus$) COLOR 2, 3 - PRINT versionStringStatus$; + _PRINTSTRING (idewx - 22 - LEN(versionStringStatus$), idewy + idesubwindow), versionStringStatus$ updateHover = -1 END IF END IF @@ -1301,7 +1289,7 @@ FUNCTION ide2 (ignore) 'Highlight line number IF LineNumberHover = 0 THEN COLOR 13, 6 - LOCATE idewy + idesubwindow, idewx - 20: PRINT lineNumberStatus$; + _PRINTSTRING (idewx - 20, idewy + idesubwindow), lineNumberStatus$ LineNumberHover = -1 updateHover = -1 END IF @@ -1316,7 +1304,7 @@ FUNCTION ide2 (ignore) 'Restore "Find" bg LineNumberHover = 0 COLOR 0, 3 - LOCATE idewy + idesubwindow, idewx - 20: PRINT lineNumberStatus$; + _PRINTSTRING (idewx - 20, idewy + idesubwindow), lineNumberStatus$ updateHover = -1 END IF END IF @@ -1340,7 +1328,7 @@ FUNCTION ide2 (ignore) idealthighlight = 1 LOCATE , , 0: COLOR 15, 7: x = 4 FOR i = 1 TO menus - LOCATE 1, x: PRINT LEFT$(menu$(i, 0), 1); + _PRINTSTRING (x, 1), LEFT$(menu$(i, 0), 1) x = x + LEN(menu$(i, 0)) + 2 IF i = menus - 1 THEN x = idewx - LEN(menu$(menus, 0)) - 1 NEXT @@ -1353,7 +1341,7 @@ FUNCTION ide2 (ignore) IF idealthighlight = 1 THEN 'remove highlight idealthighlight = 0 - LOCATE , , 0: COLOR 0, 7: LOCATE 1, 1: PRINT menubar$; + LOCATE , , 0: COLOR 0, 7: _PRINTSTRING (1, 1), menubar$ IF ideentermenu = 1 AND KCONTROL = 0 THEN 'alt was pressed then released IF _WINDOWHASFOCUS OR os$ = "LNX" THEN LOCATE , , , IDENormalCursorStart, IDENormalCursorEnd @@ -1484,8 +1472,7 @@ FUNCTION ide2 (ignore) PCOPY 3, 0: SCREEN , , 3, 0 LOCATE , , 0 clearStatusWindow - LOCATE idewy - 3, 2 - PRINT "Compilation request canceled." + _PRINTSTRING (2, idewy - 3), "Compilation request canceled." GOTO specialchar END IF END IF @@ -1500,26 +1487,23 @@ FUNCTION ide2 (ignore) IF idecompiled THEN IF iderunmode = 2 AND _FILEEXISTS(lastBinaryGenerated$) THEN - LOCATE idewy - 3, 2 - IF os$ = "LNX" THEN - PRINT "Already created executable file!"; + _PRINTSTRING (2, idewy - 3), "Already created executable file!" ELSE - PRINT "Already created .EXE file!"; + _PRINTSTRING (2, idewy - 3), "Already created .EXE file!" END IF - LOCATE idewy - 2, 2 - PRINT "Location: "; COLOR 11, 1 location$ = lastBinaryGenerated$ IF path.exe$ = "" THEN location$ = _STARTDIR$ + pathsep$ + location$ - IF POS(0) + LEN(location$) > idewx THEN - PRINT "..."; RIGHT$(location$, idewx - 15); - ELSE - PRINT location$; + msg$ = "Location: " + location$ + IF 2 + LEN(msg$) > idewx THEN + msg$ = "Location: " + STRING$(3, 250) + RIGHT$(location$, idewx - 15) END IF + _PRINTSTRING (2, idewy - 2), msg$ statusarealink = 3 + GOTO specialchar ELSEIF _FILEEXISTS(lastBinaryGenerated$) = 0 THEN idecompiled = 0 @@ -1528,19 +1512,19 @@ FUNCTION ide2 (ignore) dummy = DarkenFGBG(1) BkpIdeSystem = IdeSystem: IdeSystem = 2: GOSUB UpdateTitleOfMainWindow: IdeSystem = BkpIdeSystem - COLOR 1, 7: LOCATE idewy - 4, (idewx - 8) / 2: PRINT " Status " + COLOR 1, 7: _PRINTSTRING ((idewx - 8) / 2, idewy - 4), " Status " COLOR 15, 1 - LOCATE idewy - 3, 2: PRINT "Starting program..."; + _PRINTSTRING (2, idewy - 3), "Starting program..." ELSE mustGenerateExe: dummy = DarkenFGBG(1) BkpIdeSystem = IdeSystem: IdeSystem = 2: GOSUB UpdateTitleOfMainWindow: IdeSystem = BkpIdeSystem - COLOR 1, 7: LOCATE idewy - 4, (idewx - 8) / 2: PRINT " Status " + COLOR 1, 7: _PRINTSTRING ((idewx - 8) / 2, idewy - 4), " Status " COLOR 15, 1 IF os$ = "LNX" THEN - LOCATE idewy - 3, 2: PRINT "Creating executable file..."; + _PRINTSTRING (2, idewy - 3), "Creating executable file..." ELSE - LOCATE idewy - 3, 2: PRINT "Creating .EXE file..."; + _PRINTSTRING (2, idewy - 3), "Creating .EXE file..." END IF END IF @@ -1566,7 +1550,7 @@ FUNCTION ide2 (ignore) LOCATE , , 0 clearStatusWindow - LOCATE idewy - 3, 2: PRINT "Checking program... (editing program will cancel request)"; + _PRINTSTRING (2, idewy - 3), "Checking program... (editing program will cancel request)" 'must move the cursor back to its correct location ideshowtext @@ -1598,7 +1582,7 @@ FUNCTION ide2 (ignore) a$ = UCASE$(LEFT$(menu$(i, 0), 1)) IF KALT AND UCASE$(K$) = a$ THEN m = i - LOCATE 1, 1: COLOR 0, 7: PRINT menubar$; + COLOR 0, 7: _PRINTSTRING (1, 1), menubar$ PCOPY 3, 0 GOTO showmenu END IF @@ -1812,7 +1796,7 @@ FUNCTION ide2 (ignore) IF LEN(f$) THEN idefindtext = f$ PCOPY 3, 0: SCREEN , , 3, 0 idealthighlight = 0 - LOCATE , , 0: COLOR 0, 7: LOCATE 1, 1: PRINT menubar$; + LOCATE , , 0: COLOR 0, 7: _PRINTSTRING (1, 1), menubar$ IdeSystem = 1 IF LEN(f$) THEN GOTO idemf3 'F3 functionality GOTO ideloop @@ -2664,7 +2648,7 @@ FUNCTION ide2 (ignore) result = idemessagebox("Bookmarks", "No bookmarks exist (Use Alt+Left to create a bookmark)", "") SCREEN , , 3, 0 idealthighlight = 0 - LOCATE , , 0: COLOR 0, 7: LOCATE 1, 1: PRINT menubar$; + LOCATE , , 0: COLOR 0, 7: _PRINTSTRING (1, 1), menubar$ GOTO specialchar END IF IF IdeBmkN = 1 THEN @@ -2672,7 +2656,7 @@ FUNCTION ide2 (ignore) result = idemessagebox("Bookmarks", "No other bookmarks exist", "") SCREEN , , 3, 0 idealthighlight = 0 - LOCATE , , 0: COLOR 0, 7: LOCATE 1, 1: PRINT menubar$; + LOCATE , , 0: COLOR 0, 7: _PRINTSTRING (1, 1), menubar$ GOTO specialchar END IF END IF @@ -2766,9 +2750,8 @@ FUNCTION ide2 (ignore) SCREEN , , 3, 0 clearStatusWindow - LOCATE idewy - 3, 2 COLOR 15, 1 - PRINT "Editing $INCLUDE file..." + _PRINTSTRING (2, idewy - 3), "Editing $INCLUDE file..." dummy = DarkenFGBG(1) PCOPY 3, 0 @@ -2797,17 +2780,17 @@ FUNCTION ide2 (ignore) IF tempInclude1$ = tempInclude2$ THEN IF IDEShowErrorsImmediately THEN - LOCATE idewy - 3, 2 IF idecompiling = 1 THEN - PRINT "..."; + _PRINTSTRING (2, idewy - 3), "..." ELSE - PRINT "OK"; 'report OK status + _PRINTSTRING (2, idewy - 3), "OK" 'report OK status statusarealink = 0 IF totalWarnings > 0 THEN COLOR 11, 1 - PRINT " ("; LTRIM$(STR$(totalWarnings)) + " warning"; - IF totalWarnings > 1 THEN PRINT "s"; - PRINT " - click here or Ctrl+W to view)"; + msg$ = " (" + LTRIM$(STR$(totalWarnings)) + " warning" + IF totalWarnings > 1 THEN msg$ = msg$ + "s" + msg$ = msg$ + " - click here or Ctrl+W to view)" + _PRINTSTRING (4, idewy - 3), msg$ statusarealink = 4 END IF END IF @@ -4005,7 +3988,7 @@ FUNCTION ide2 (ignore) AltSpecial = 0 ideentermenu = 0 KALT = 0 - LOCATE 1, 1: COLOR 0, 7: PRINT menubar$ + COLOR 0, 7: _PRINTSTRING (1, 1), menubar$ END IF LOOP @@ -4058,7 +4041,7 @@ FUNCTION ide2 (ignore) _LIMIT 1000 GetInput IF _WINDOWHASFOCUS = 0 AND (os$ = "WIN" OR MacOSX = 1) THEN - LOCATE 1, 1: COLOR 0, 7: PRINT menubar$; + COLOR 0, 7: _PRINTSTRING (1, 1), menubar$ SCREEN , , 3, 0: PCOPY 3, 0 GOTO ideloop END IF @@ -4071,7 +4054,7 @@ FUNCTION ide2 (ignore) END IF IF _WINDOWHASFOCUS = 0 AND (os$ = "WIN" OR MacOSX = 1) THEN - LOCATE 1, 1: COLOR 0, 7: PRINT menubar$; + COLOR 0, 7: _PRINTSTRING (1, 1), menubar$ SCREEN , , 3, 0: PCOPY 3, 0 GOTO ideloop END IF @@ -4087,7 +4070,7 @@ FUNCTION ide2 (ignore) x2 = CVI(MID$(MenuLocations, i * 2 - 1, 2)) + LEN(menu$(i, 0)) IF mX >= x AND mX < x2 THEN m = i - LOCATE 1, 1: COLOR 0, 7: PRINT menubar$; + COLOR 0, 7: _PRINTSTRING (1, 1), menubar$ PCOPY 3, 0 GOTO showmenu END IF @@ -4102,7 +4085,7 @@ FUNCTION ide2 (ignore) K$ = UCASE$(K$) IF LEN(K$) > 0 AND KCTRL THEN 'ctrl+key combos are not valid while a menu is active - LOCATE 1, 1: COLOR 0, 7: PRINT menubar$; + COLOR 0, 7: _PRINTSTRING (1, 1), menubar$ SCREEN , , 3, 0: PCOPY 3, 0 GOTO ideloop END IF @@ -4111,7 +4094,7 @@ FUNCTION ide2 (ignore) a$ = UCASE$(LEFT$(menu$(i, 0), 1)) IF K$ = a$ THEN m = i - LOCATE 1, 1: COLOR 0, 7: PRINT menubar$; + COLOR 0, 7: _PRINTSTRING (1, 1), menubar$ PCOPY 3, 0 GOTO showmenu END IF @@ -4120,13 +4103,13 @@ FUNCTION ide2 (ignore) IF KB = KEY_LEFT THEN m = m - 1 IF KB = KEY_RIGHT THEN m = m + 1 IF KB = KEY_ESC THEN - LOCATE 1, 1: COLOR 0, 7: PRINT menubar$; + COLOR 0, 7: _PRINTSTRING (1, 1), menubar$ GOTO ideloop END IF IF m < 1 THEN m = menus IF m > menus AND idecontextualmenu = 0 THEN m = 1 IF KB = KEY_UP OR KB = KEY_DOWN OR KB = KEY_ENTER THEN - LOCATE 1, 1: COLOR 0, 7: PRINT menubar$; + COLOR 0, 7: _PRINTSTRING (1, 1), menubar$ PCOPY 3, 0 GOTO showmenu END IF @@ -4135,7 +4118,7 @@ FUNCTION ide2 (ignore) IF KB > 0 AND KB <= 255 THEN IF KALT = 0 THEN iCHECKLATER = 1 - LOCATE 1, 1: COLOR 0, 7: PRINT menubar$; + COLOR 0, 7: _PRINTSTRING (1, 1), menubar$ GOTO ideloop END IF END IF @@ -4185,7 +4168,7 @@ FUNCTION ide2 (ignore) x = 4: FOR i = 1 TO m - 1: x = x + LEN(menu$(i, 0)) + 2 IF i = menus - 1 THEN x = idewx - LEN(menu$(menus, 0)) - 1 NEXT: xx = x - LOCATE 1, xx - 1: COLOR 7, 0: PRINT " " + menu$(m, 0) + " " + COLOR 7, 0: _PRINTSTRING (xx - 1, 1), " " + menu$(m, 0) + " " ELSE IF parentMenu > 0 AND parentMenuSetup%% = 0 THEN parentMenuSetup%% = -1 @@ -4226,10 +4209,10 @@ FUNCTION ide2 (ignore) FOR i = 1 TO menusize(m) m$ = menu$(m, i) IF m$ = "-" THEN - COLOR 0, 7: LOCATE i + yy, xx - 2: PRINT CHR$(195) + STRING$(w + 2, CHR$(196)) + CHR$(180); + COLOR 0, 7: _PRINTSTRING (xx - 2, i + yy), CHR$(195) + STRING$(w + 2, CHR$(196)) + CHR$(180) ELSEIF LEFT$(m$, 1) = "~" THEN m$ = RIGHT$(m$, LEN(m$) - 1) 'Remove the tilde before printing - IF r = i THEN LOCATE i + yy, xx - 1: COLOR 7, 0: PRINT SPACE$(w + 2); + IF r = i THEN COLOR 7, 0: _PRINTSTRING (xx - 1, i + yy), SPACE$(w + 2) IF LEFT$(m$, 1) = CHR$(7) THEN LOCATE i + yy, xx - 1 ELSE LOCATE i + yy, xx h = -1: x = INSTR(m$, "#"): IF x THEN h = x: m$ = LEFT$(m$, x - 1) + RIGHT$(m$, LEN(m$) - x) x = INSTR(m$, " "): IF x THEN m1$ = LEFT$(m$, x - 1): m2$ = RIGHT$(m$, LEN(m$) - x - 1): m$ = m1$ + SPACE$(w - LEN(m1$) - LEN(m2$)) + m2$ @@ -4238,7 +4221,7 @@ FUNCTION ide2 (ignore) PRINT MID$(m$, x, 1); NEXT ELSE - IF r = i THEN LOCATE i + yy, xx - 1: COLOR 7, 0: PRINT SPACE$(w + 2); + IF r = i THEN COLOR 7, 0: _PRINTSTRING (xx - 1, i + yy), SPACE$(w + 2) IF LEFT$(m$, 1) = CHR$(7) THEN LOCATE i + yy, xx - 1 ELSE LOCATE i + yy, xx h = -1: x = INSTR(m$, "#"): IF x THEN h = x: m$ = LEFT$(m$, x - 1) + RIGHT$(m$, LEN(m$) - x) x = INSTR(m$, " "): IF x THEN m1$ = LEFT$(m$, x - 1): m2$ = RIGHT$(m$, LEN(m$) - x - 1): m$ = m1$ + SPACE$(w - LEN(m1$) - LEN(m2$)) + m2$ @@ -4279,7 +4262,7 @@ FUNCTION ide2 (ignore) _LIMIT 1000 GetInput IF _WINDOWHASFOCUS = 0 AND (os$ = "WIN" OR MacOSX = 1) THEN - LOCATE 1, 1: COLOR 0, 7: PRINT menubar$; + COLOR 0, 7: _PRINTSTRING (1, 1), menubar$ PCOPY 3, 0: SCREEN , , 3, 0 GOTO ideloop END IF @@ -4293,7 +4276,7 @@ FUNCTION ide2 (ignore) END IF IF _EXIT THEN ideexit = 1: GOTO ideloop IF _WINDOWHASFOCUS = 0 AND (os$ = "WIN" OR MacOSX = 1) THEN - LOCATE 1, 1: COLOR 0, 7: PRINT menubar$; + COLOR 0, 7: _PRINTSTRING (1, 1), menubar$ PCOPY 3, 0: SCREEN , , 3, 0 GOTO ideloop END IF @@ -4885,9 +4868,8 @@ FUNCTION ide2 (ignore) ideQuickKeycode: dummy = DarkenFGBG(1) clearStatusWindow - LOCATE idewy - 3, 2 COLOR 15, 1 - PRINT "Press any key to insert its _KEYHIT/_KEYDOWN code..." + _PRINTSTRING (2, idewy - 3), "Press any key to insert its _KEYHIT/_KEYDOWN code..." PCOPY 3, 0 tempk$ = "" @@ -5187,7 +5169,7 @@ FUNCTION ide2 (ignore) r$ = idechange PCOPY 3, 0: SCREEN , , 3, 0 idealthighlight = 0 - LOCATE , , 0: COLOR 0, 7: LOCATE 1, 1: PRINT menubar$; + LOCATE , , 0: COLOR 0, 7: _PRINTSTRING (1, 1), menubar$ IF r$ = "C" OR r$ = "" THEN GOTO ideloop 'assume "V", verify changes IdeAddSearched idefindtext @@ -5651,7 +5633,7 @@ FUNCTION ide2 (ignore) '-------------------------------------------------------------------------------- EXIT FUNCTION UpdateTitleOfMainWindow: - COLOR 7, 1: LOCATE 2, 2: PRINT STRING$(idewx - 2, CHR$(196)); + COLOR 7, 1: _PRINTSTRING (2, 2), STRING$(idewx - 2, CHR$(196)) IF LEN(ideprogname) THEN a$ = ideprogname ELSE a$ = "Untitled" + tempfolderindexstr$ a$ = " " + a$ IF ideunsaved THEN a$ = a$ + "*" @@ -5659,32 +5641,28 @@ FUNCTION ide2 (ignore) a$ = a$ + " " IF LEN(a$) > idewx - 5 THEN a$ = LEFT$(a$, idewx - 11) + STRING$(3, 250) + " " IF IdeSystem = 1 THEN COLOR 1, 7 ELSE COLOR 7, 1 - LOCATE 2, ((idewx / 2) - 1) - (LEN(a$) - 1) \ 2: PRINT a$; + _PRINTSTRING (((idewx / 2) - 1) - (LEN(a$) - 1) \ 2, 2), a$ RETURN DrawQuickNav: IF IdeSystem = 1 AND QuickNavTotal > 0 THEN - LOCATE 2, 4 COLOR 15, 7 - PRINT " " + CHR$(17) + " "; + _PRINTSTRING (4, 2), " " + CHR$(17) + " " ELSE COLOR 7, 1 - LOCATE 2, 4 - PRINT STRING$(3, 196); + _PRINTSTRING (4, 2), STRING$(3, 196) END IF RETURN UpdateSearchBar: - LOCATE idewy - 4, idewx - (idesystem2.w + 10) - COLOR 7, 1: PRINT CHR$(180); + COLOR 7, 1: _PRINTSTRING (idewx - (idesystem2.w + 10), idewy - 4), CHR$(180) COLOR 3, 1 - PRINT "Find"; - PRINT "[" + SPACE$(idesystem2.w + 1) + CHR$(18) + "]"; - COLOR 7, 1: PRINT CHR$(195); + _PRINTSTRING (1 + idewx - (idesystem2.w + 10), idewy - 4), "Find[" + SPACE$(idesystem2.w + 1) + CHR$(18) + "]" + COLOR 7, 1: _PRINTSTRING (idewx - 2, idewy - 4), CHR$(195) 'add status title IF IdeSystem = 2 THEN COLOR 1, 7 ELSE COLOR 7, 1 - LOCATE idewy - 4, (idewx - 8) / 2: PRINT " Status " + _PRINTSTRING ((idewx - 8) / 2, idewy - 4), " Status " a$ = idefindtext tx = 1 @@ -5705,12 +5683,11 @@ FUNCTION ide2 (ignore) 'apply selection color change if necessary IF idesystem2.issel = 0 OR IdeSystem <> 2 THEN COLOR 3, 1 - LOCATE idewy - 4, idewx - (idesystem2.w + 8) + 4: PRINT a$; + _PRINTSTRING (idewx - (idesystem2.w + 8) + 4, idewy - 4), a$ ELSE FOR ColorCHAR = 1 TO LEN(a$) IF ColorCHAR + tx - 2 >= sx1 AND ColorCHAR + tx - 2 < sx2 THEN COLOR 1, 3 ELSE COLOR 3, 1 - LOCATE idewy - 4, idewx - (idesystem2.w + 8) + 4 - 1 + ColorCHAR - PRINT MID$(a$, ColorCHAR, 1); + _PRINTSTRING (idewx - (idesystem2.w + 8) + 4 - 1 + ColorCHAR, idewy - 4), MID$(a$, ColorCHAR, 1) NEXT END IF RETURN @@ -5779,24 +5756,24 @@ FUNCTION ide2 (ignore) LOCATE , , , IDENormalCursorStart, IDENormalCursorEnd 'static background - COLOR 0, 7: LOCATE 1, 1: PRINT menubar$; + COLOR 0, 7: _PRINTSTRING (1, 1), menubar$ COLOR 7, 1: idebox 1, 2, idewx, idewy - 5 COLOR 7, 1: idebox 1, idewy - 4, idewx, 5 'edit corners - COLOR 7, 1: LOCATE idewy - 4, 1: PRINT CHR$(195);: LOCATE idewy - 4, idewx: PRINT CHR$(180); + COLOR 7, 1: _PRINTSTRING (1, idewy - 4), CHR$(195): _PRINTSTRING (idewx, idewy - 4), CHR$(180) IF idehelp = 1 THEN COLOR 7, 0: idebox 1, idewy, idewx, idesubwindow + 1 - COLOR 7, 0: LOCATE idewy, 1: PRINT CHR$(195);: LOCATE idewy, idewx: PRINT CHR$(180); - COLOR 7, 0: LOCATE idewy, idewx - 3: PRINT CHR$(180) + "X" + CHR$(195); + COLOR 7, 0: _PRINTSTRING (1, idewy), CHR$(195): _PRINTSTRING (idewx, idewy), CHR$(180) + COLOR 7, 0: _PRINTSTRING (idewx - 3, idewy), CHR$(180) + "X" + CHR$(195) END IF GOSUB UpdateSearchBar 'status bar - COLOR 0, 3: LOCATE idewy + idesubwindow, 1: PRINT SPACE$(idewx); + COLOR 0, 3: _PRINTSTRING (1, idewy + idesubwindow), SPACE$(idewx) q = idevbar(idewx, idewy - 3, 3, 1, 1) q = idevbar(idewx, 3, idewy - 8, 1, 1) q = idehbar(2, idewy - 5, idewx - 2, 1, 1) @@ -5822,21 +5799,21 @@ FUNCTION ide2 (ignore) IdeInfo = "" - LOCATE idewy - 3, 2 IF idecompiling = 1 THEN - PRINT "..."; + _PRINTSTRING (2, idewy - 3), "..." ELSE IF idefocusline THEN - PRINT "..."; + _PRINTSTRING (2, idewy - 3), "..." ELSE - PRINT "OK"; 'report OK status + _PRINTSTRING (2, idewy - 3), "OK" 'report OK status END IF statusarealink = 0 IF totalWarnings > 0 THEN COLOR 11, 1 - PRINT " ("; LTRIM$(STR$(totalWarnings)) + " warning"; - IF totalWarnings > 1 THEN PRINT "s"; - PRINT " - click here or Ctrl+W to view)"; + msg$ = " (" + LTRIM$(STR$(totalWarnings)) + " warning" + IF totalWarnings > 1 THEN msg$ = msg$ + "s" + msg$ = msg$ + " - click here or Ctrl+W to view)" + _PRINTSTRING (4, idewy - 3), msg$ statusarealink = 4 END IF END IF @@ -5888,26 +5865,23 @@ FUNCTION ide2 (ignore) END FUNCTION SUB idebox (x, y, w, h) - LOCATE y, x: PRINT CHR$(218) + STRING$(w - 2, 196) + CHR$(191); + _PRINTSTRING (x, y), CHR$(218) + STRING$(w - 2, 196) + CHR$(191) FOR y2 = y + 1 TO y + h - 2 - LOCATE y2, x: PRINT CHR$(179) + SPACE$(w - 2) + CHR$(179); + _PRINTSTRING (x, y2), CHR$(179) + SPACE$(w - 2) + CHR$(179) NEXT - LOCATE y + h - 1, x: PRINT CHR$(192) + STRING$(w - 2, 196) + CHR$(217); + _PRINTSTRING (x, y + h - 1), CHR$(192) + STRING$(w - 2, 196) + CHR$(217) END SUB SUB ideboxshadow (x, y, w, h) - LOCATE y, x: PRINT CHR$(218) + STRING$(w - 2, 196) + CHR$(191); - FOR y2 = y + 1 TO y + h - 2 - LOCATE y2, x: PRINT CHR$(179) + SPACE$(w - 2) + CHR$(179); - NEXT - LOCATE y + h - 1, x: PRINT CHR$(192) + STRING$(w - 2, 196) + CHR$(217); + idebox x, y, w, h + 'shadow COLOR 2, 0 FOR y2 = y + 1 TO y + h - 1 FOR x2 = x + w TO x + w + 1 IF x2 <= idewx AND y2 <= idewy + idesubwindow THEN - LOCATE y2, x2: PRINT CHR$(SCREEN(y2, x2)); + _PRINTSTRING (x2, y2), CHR$(SCREEN(y2, x2)) END IF NEXT NEXT @@ -5916,7 +5890,7 @@ SUB ideboxshadow (x, y, w, h) IF y2 <= idewy + idesubwindow THEN FOR x2 = x + 2 TO x + w + 1 IF x2 <= idewx THEN - LOCATE y2, x2: PRINT CHR$(SCREEN(y2, x2)); + _PRINTSTRING (x2, y2), CHR$(SCREEN(y2, x2)) END IF NEXT END IF @@ -6184,8 +6158,7 @@ FUNCTION idechange$ percentage = INT(y / iden * 100) percentagechars = INT(maxprogresswidth * y / iden) percentageMsg$ = STRING$(percentagechars, 219) + STRING$(maxprogresswidth - percentagechars, 176) - LOCATE p.y + 7, p.x + 2 - PRINT percentageMsg$; + _PRINTSTRING (p.x + 2, p.y + 7), percentageMsg$ PCOPY 1, 0 l$ = idegetline(y) @@ -6519,12 +6492,11 @@ SUB idedrawobj (o AS idedbotype, f) x = x + 2 'apply selection color change if necessary IF o.issel = 0 OR o.foc <> 0 THEN - LOCATE y, x: PRINT a$; + _PRINTSTRING (x, y), a$ ELSE FOR ColorCHAR = 1 TO LEN(a$) IF ColorCHAR + tx - 2 >= sx1 AND ColorCHAR + tx - 2 < sx2 THEN COLOR 7, 0 ELSE COLOR 0, 7 - LOCATE y, x - 1 + ColorCHAR - PRINT MID$(a$, ColorCHAR, 1); + _PRINTSTRING (x - 1 + ColorCHAR, y), MID$(a$, ColorCHAR, 1) NEXT END IF @@ -6604,8 +6576,7 @@ SUB idedrawobj (o AS idedbotype, f) 'customization specific for the SUBs list, when there are external procedures: IF INSTR(a3$, CHR$(196) + "*") > 0 THEN IF o.sel = n THEN COLOR 2, 0 ELSE COLOR 2, 7 - LOCATE o.par.y + o.y + y, o.par.x + o.x + 4 - PRINT "*"; + _PRINTSTRING (o.par.x + o.x + 4, o.par.y + o.y + y), "*" END IF y = y + 1 END IF @@ -6701,7 +6672,7 @@ SUB idedrawpar (p AS idedbptype) COLOR 0, 7: ideboxshadow p.x, p.y, p.w + 2, p.h + 2 IF p.nam THEN x = LEN(idetxt(p.nam)) + 2 - COLOR 0, 7: LOCATE p.y, p.x + (p.w \ 2) - (x - 1) \ 2: PRINT " " + idetxt(p.nam) + " "; + COLOR 0, 7: _PRINTSTRING (p.x + (p.w \ 2) - (x - 1) \ 2, p.y), " " + idetxt(p.nam) + " " END IF END SUB @@ -7155,10 +7126,10 @@ FUNCTION idehbar (x, y, h, i2, n2) 'draw background & arrows COLOR 0, 7 - LOCATE y, x: PRINT CHR$(27); - LOCATE y, x + h - 1: PRINT CHR$(26); + _PRINTSTRING (x, y), CHR$(27) + _PRINTSTRING (x + h - 1, y), CHR$(26) FOR x2 = x + 1 TO x + h - 2 - LOCATE y, x2: PRINT CHR$(176); + _PRINTSTRING (x2, y), CHR$(176) NEXT 'draw slider @@ -7187,7 +7158,7 @@ FUNCTION idehbar (x, y, h, i2, n2) 'show whichever is closer of the two positions p! = (i - 1) / (n - 1) IF p! < .5 THEN x2 = x + 1 ELSE x2 = x + 2 - LOCATE y, x2: PRINT CHR$(219); + _PRINTSTRING (x2, y), CHR$(219) idehbar = x2 EXIT FUNCTION END IF @@ -7201,13 +7172,13 @@ FUNCTION idehbar (x, y, h, i2, n2) END IF IF i = 1 THEN x2 = x + 1 - LOCATE y, x2: PRINT CHR$(219); + _PRINTSTRING (x2, y), CHR$(219) idehbar = x2 EXIT FUNCTION END IF IF i = n THEN x2 = x + h - 2 - LOCATE y, x2: PRINT CHR$(219); + _PRINTSTRING (x2, y), CHR$(219) idehbar = x2 EXIT FUNCTION END IF @@ -7215,7 +7186,7 @@ FUNCTION idehbar (x, y, h, i2, n2) p! = (i - 1) / (n - 1) p! = p! * (h - 4) x2 = x + 2 + INT(p!) - LOCATE y, x2: PRINT CHR$(219); + _PRINTSTRING (x2, y), CHR$(219) idehbar = x2 EXIT FUNCTION END IF @@ -7574,11 +7545,11 @@ FUNCTION idefiledialog$(programname$, mode AS _BYTE) '-------- end of generic display dialog box & objects -------- '-------- custom display changes -------- - COLOR 0, 7: LOCATE p.y + 4, p.x + 2: PRINT "Path: "; + COLOR 0, 7: _PRINTSTRING (p.x + 2, p.y + 4), "Path: " a$ = path$ w = p.w - 8 IF LEN(a$) > w - 3 THEN a$ = STRING$(3, 250) + RIGHT$(a$, w - 3) - PRINT a$; + _PRINTSTRING (p.x + 2 + 6, p.y + 4), a$ '-------- end of custom display changes -------- @@ -8089,9 +8060,8 @@ SUB ideshowtext ActiveINCLUDELink = 0 FOR y = 0 TO (idewy - 9) - LOCATE y + 3, 1 COLOR 7, 1 - PRINT CHR$(179); 'clear prev bookmarks from lhs + _PRINTSTRING (1, y + 3), CHR$(179) 'clear prev bookmarks from lhs IF ShowLineNumbers THEN GOSUB ShowLineNumber @@ -8374,13 +8344,11 @@ SUB ideshowtext IF ShowLineNumbers THEN IF (2 + m - idesx) + maxLineNumberLength >= 2 + maxLineNumberLength AND (2 + m - idesx) + maxLineNumberLength < idewx THEN - LOCATE y + 3, (2 + m - idesx) + maxLineNumberLength - PRINT thisChar$; + _PRINTSTRING ((2 + m - idesx) + maxLineNumberLength, y + 3), thisChar$ END IF ELSE IF 2 + m - idesx >= 2 AND 2 + m - idesx < idewx THEN - LOCATE y + 3, 2 + m - idesx - PRINT thisChar$; + _PRINTSTRING (2 + m - idesx, y + 3), thisChar$ END IF END IF @@ -8407,10 +8375,10 @@ SUB ideshowtext END IF IF (c AND 15) = 0 THEN 'black background COLOR 0, 7 - LOCATE y + 3, x: PRINT "?"; + _PRINTSTRING (x, y + 3), "?" COLOR 1, 7 ELSE - LOCATE y + 3, x: PRINT CHR$(a); + _PRINTSTRING (x, y + 3), CHR$(a) END IF @@ -8441,15 +8409,13 @@ SUB ideshowtext COLOR 13, 1 l = idesy FOR y = 0 TO (idewy - 9) - LOCATE y + 3, 1 COLOR 7, 1 - PRINT CHR$(179); 'clear prev bookmarks from lhs + _PRINTSTRING (1, y + 3), CHR$(179) 'clear prev bookmarks from lhs IF ShowLineNumbers THEN GOSUB ShowLineNumber IF l = idefocusline AND idecy <> l THEN COLOR 13, 4 ELSE COLOR 13, 1 - LOCATE y + 3, 2 + maxLineNumberLength - + IF l <= iden THEN a$ = idegetline(l) a2$ = SPACE$(idesx + (idewx - 3) - maxLineNumberLength) @@ -8458,7 +8424,7 @@ SUB ideshowtext ELSE a2$ = SPACE$((idewx - 2) - maxLineNumberLength) END IF - PRINT a2$; + _PRINTSTRING (2 + maxLineNumberLength, y + 3), a2$ IF l = idecy THEN IF idecx <= LEN(a$) AND idecx >= 1 THEN @@ -8477,15 +8443,14 @@ SUB ideshowtext x2 = idesx FOR x = 2 + maxLineNumberLength TO (idewx - 2) IF x2 >= sx1 AND x2 < sx2 THEN - a = SCREEN(y + 3, x): LOCATE y + 3, x: PRINT CHR$(a); + a = SCREEN(y + 3, x): _PRINTSTRING (x, y + 3), CHR$(a) END IF x2 = x2 + 1 NEXT COLOR 7, 1 ELSE 'multiline select IF idecx = 1 AND l = sy2 AND idecy > sy1 THEN GOTO nofinalselect0 - LOCATE y + 3, 2 + maxLineNumberLength - COLOR 1, 7: PRINT a2$; + COLOR 1, 7: _PRINTSTRING (2 + maxLineNumberLength, y + 3), a2$ COLOR 7, 1 nofinalselect0: END IF @@ -8500,7 +8465,7 @@ SUB ideshowtext FOR b = 1 TO IdeBmkN y = IdeBmk(b).y IF y >= idesy AND y <= idesy + (idewy - 9) THEN - LOCATE 3 + y - idesy, 1: PRINT CHR$(197); + _PRINTSTRING (1, 3 + y - idesy), CHR$(197) END IF NEXT @@ -8519,22 +8484,21 @@ SUB ideshowtext LSET b$ = c$ END IF lineNumberStatus$ = a$ + ":" + b$ - LOCATE idewy + idesubwindow, idewx - 20: PRINT lineNumberStatus$; + _PRINTSTRING (idewx - 20, idewy + idesubwindow), lineNumberStatus$ SCREEN , , 0, 0: LOCATE idecy - idesy + 3, maxLineNumberLength + idecx - idesx + 2: SCREEN , , 3, 0 EXIT SUB ShowLineNumber: IF ShowLineNumbersUseBG THEN COLOR , 6 - PRINT SPACE$(maxLineNumberLength); + _PRINTSTRING (2, y + 3), SPACE$(maxLineNumberLength) IF l <= iden THEN l2$ = STR$(l) - IF POS(1) - (LEN(l2$) + 1) >= 2 THEN - LOCATE y + 3, POS(1) - (LEN(l2$) + 1) - PRINT l2$; + IF 2 + maxLineNumberLength - (LEN(l2$) + 1) >= 2 THEN + _PRINTSTRING (2 + maxLineNumberLength - (LEN(l2$) + 1), y + 3), l2$ END IF END IF - IF ShowLineNumbersSeparator THEN LOCATE y + 3, 1 + maxLineNumberLength: PRINT CHR$(179); + IF ShowLineNumbersSeparator THEN _PRINTSTRING (1 + maxLineNumberLength, y + 3), CHR$(179) COLOR , 1 RETURN @@ -9075,7 +9039,7 @@ FUNCTION idelanguagebox '-------- end of generic display dialog box & objects -------- '-------- custom display changes -------- - COLOR 0, 7: LOCATE p.y + 1, p.x + 2: PRINT "Code-page for ASCII-UNICODE mapping: (Default: CP437)" + COLOR 0, 7: _PRINTSTRING (p.x + 2, p.y + 1), "Code-page for ASCII-UNICODE mapping: (Default: CP437)" '-------- end of custom display changes -------- @@ -9274,7 +9238,7 @@ FUNCTION idewarningbox '-------- end of generic display dialog box & objects -------- '-------- custom display changes -------- - COLOR 0, 7: LOCATE p.y + 1, p.x + 2: PRINT "Double-click on an item to jump to the line indicated" + COLOR 0, 7: _PRINTSTRING (p.x + 2, p.y + 1), "Double-click on an item to jump to the line indicated" '-------- end of custom display changes -------- @@ -9885,10 +9849,10 @@ FUNCTION idevbar (x, y, h, i2, n2) 'draw background & arrows COLOR 0, 7 - LOCATE y, x: PRINT CHR$(24); - LOCATE y + h - 1, x: PRINT CHR$(25); + _PRINTSTRING (x, y), CHR$(24) + _PRINTSTRING (x, y + h - 1), CHR$(25) FOR y2 = y + 1 TO y + h - 2 - LOCATE y2, x: PRINT CHR$(176); + _PRINTSTRING (x, y2), CHR$(176) NEXT 'draw slider @@ -9917,7 +9881,7 @@ FUNCTION idevbar (x, y, h, i2, n2) 'show whichever is closer of the two positions p! = (i - 1) / (n - 1) IF p! < .5 THEN y2 = y + 1 ELSE y2 = y + 2 - LOCATE y2, x: PRINT CHR$(219); + _PRINTSTRING (x, y2), CHR$(219) idevbar = y2 EXIT FUNCTION END IF @@ -9931,13 +9895,13 @@ FUNCTION idevbar (x, y, h, i2, n2) END IF IF i = 1 THEN y2 = y + 1 - LOCATE y2, x: PRINT CHR$(219); + _PRINTSTRING (x, y2), CHR$(219) idevbar = y2 EXIT FUNCTION END IF IF i = n THEN y2 = y + h - 2 - LOCATE y2, x: PRINT CHR$(219); + _PRINTSTRING (x, y2), CHR$(219) idevbar = y2 EXIT FUNCTION END IF @@ -9945,7 +9909,7 @@ FUNCTION idevbar (x, y, h, i2, n2) p! = (i - 1) / (n - 1) p! = p! * (h - 4) y2 = y + 2 + INT(p!) - LOCATE y2, x: PRINT CHR$(219); + _PRINTSTRING (x, y2), CHR$(219) idevbar = y2 EXIT FUNCTION END IF @@ -10505,7 +10469,7 @@ FUNCTION ideadvancedbox '-------- custom display changes -------- FOR y = 1 TO 100 IF LEN(Direct_Text$(y)) THEN - COLOR 0, 7: LOCATE p.y + y, p.x + 1: PRINT Direct_Text$(y) + COLOR 0, 7: _PRINTSTRING (p.x + 1, p.y + y), Direct_Text$(y) END IF NEXT '-------- end of custom display changes -------- @@ -10709,8 +10673,7 @@ FUNCTION idemessagebox (titlestr$, messagestr$, buttons$) IF LEN(FullMessage$(i)) > p.w - 2 THEN FullMessage$(i) = LEFT$(FullMessage$(i), p.w - 5) + STRING$(3, 250) END IF - LOCATE p.y + 1 + i, p.x + (w \ 2 - LEN(FullMessage$(i)) \ 2) + 1 - PRINT FullMessage$(i); + _PRINTSTRING (p.x + (w \ 2 - LEN(FullMessage$(i)) \ 2) + 1, p.y + 1 + i), FullMessage$(i) NEXT i '-------- end of custom display changes -------- @@ -10899,8 +10862,8 @@ FUNCTION idedisplaybox '-------- end of generic display dialog box & objects -------- '-------- custom display changes -------- - COLOR 0, 7: LOCATE p.y + 2, p.x + 2: PRINT "Window Size -"; - COLOR 0, 7: LOCATE p.y + 10, p.x + 29: PRINT " Monospace TTF Font "; + COLOR 0, 7: _PRINTSTRING (p.x + 2, p.y + 2), "Window Size -" + COLOR 0, 7: _PRINTSTRING (p.x + 29, p.y + 10), " Monospace TTF Font " '-------- end of custom display changes -------- 'update visual page and cursor position @@ -11324,7 +11287,7 @@ FUNCTION idechoosecolorsbox T = VAL(idetxt(o(2).txt)): r = ((T / 255) * 26) IF T = 0 THEN slider$ = CHR$(195) IF T = 255 THEN slider$ = CHR$(180) - LOCATE p.y + 5, p.x + 39 + r: PRINT slider$; + _PRINTSTRING (p.x + 39 + r, p.y + 5), slider$ COLOR 0: LOCATE p.y + 8, p.x + 36: PRINT "G: "; COLOR 5: PRINT STRING$(26, 196); @@ -11332,7 +11295,7 @@ FUNCTION idechoosecolorsbox T = VAL(idetxt(o(3).txt)): r = ((T / 255) * 26) IF T = 0 THEN slider$ = CHR$(195) IF T = 255 THEN slider$ = CHR$(180) - LOCATE p.y + 8, p.x + 39 + r: PRINT slider$; + _PRINTSTRING (p.x + 39 + r, p.y + 8), slider$ COLOR 0: LOCATE p.y + 11, p.x + 36: PRINT "B: "; COLOR 9: PRINT STRING$(26, 196); @@ -11340,12 +11303,12 @@ FUNCTION idechoosecolorsbox T = VAL(idetxt(o(4).txt)): r = ((T / 255) * 26) IF T = 0 THEN slider$ = CHR$(195) IF T = 255 THEN slider$ = CHR$(180) - LOCATE p.y + 11, p.x + 39 + r: PRINT slider$; + _PRINTSTRING (p.x + 39 + r, p.y + 11), slider$ COLOR 7, 1 - LOCATE p.y + 13, p.x + 39: PRINT CHR$(218); STRING$(25, 196); - LOCATE p.y + 14, p.x + 39: PRINT CHR$(179); SPACE$(25); - LOCATE p.y + 15, p.x + 39: PRINT CHR$(179); SPACE$(25); + _PRINTSTRING (p.x + 39, p.y + 13), CHR$(218) + STRING$(25, 196) + _PRINTSTRING (p.x + 39, p.y + 14), CHR$(179) + SPACE$(25) + _PRINTSTRING (p.x + 39, p.y + 15), CHR$(179) + SPACE$(25) SELECT EVERYCASE SelectedITEM CASE 1: COLOR 13, 1: SampleText$ = "myVar% = " 'Normal text @@ -11361,19 +11324,19 @@ FUNCTION idechoosecolorsbox _PALETTECOLOR 6, IDEBracketHighlightColor, 0 END SELECT - LOCATE p.y + 14, p.x + 40: PRINT SampleText$; + _PRINTSTRING (p.x + 40, p.y + 14), SampleText$ IF SelectedITEM = 1 OR SelectedITEM = 3 THEN COLOR 8, 1 - LOCATE p.y + 14, p.x + 49: PRINT "5"; + _PRINTSTRING (p.x + 49, p.y + 14), "5" ELSEIF SelectedITEM = 2 THEN COLOR 13, 1 - LOCATE p.y + 14, p.x + 51: PRINT "myVar%"; + _PRINTSTRING (p.x + 51, p.y + 14), "myVar%" ELSEIF SelectedITEM = 4 THEN COLOR 12, 1 - LOCATE p.y + 14, p.x + 40: PRINT "PRINT"; + _PRINTSTRING (p.x + 40, p.y + 14), "PRINT" ELSEIF SelectedITEM = 5 THEN COLOR 11, 1 - LOCATE p.y + 14, p.x + 40: PRINT "'"; + _PRINTSTRING (p.x + 40, p.y + 14), "'" ELSEIF SelectedITEM = 9 THEN LOCATE p.y + 14, p.x + 40 COLOR 13, 1: PRINT "myVar% = "; @@ -12155,7 +12118,7 @@ FUNCTION idergbmixer$ (editing) T = VAL(idetxt(o(1).txt)): r = ((T / 255) * 46) IF T = 0 THEN slider$ = CHR$(195) IF T = 255 THEN slider$ = CHR$(180) - LOCATE p.y + 2, p.x + 15 + r: PRINT slider$; + _PRINTSTRING (p.x + 15 + r, p.y + 2), slider$ COLOR 0: LOCATE p.y + 5, p.x + 13: PRINT "G: "; COLOR 5: PRINT STRING$(46, 196); @@ -12163,7 +12126,7 @@ FUNCTION idergbmixer$ (editing) T = VAL(idetxt(o(2).txt)): r = ((T / 255) * 46) IF T = 0 THEN slider$ = CHR$(195) IF T = 255 THEN slider$ = CHR$(180) - LOCATE p.y + 5, p.x + 15 + r: PRINT slider$; + _PRINTSTRING (p.x + 15 + r, p.y + 5), slider$ COLOR 0: LOCATE p.y + 8, p.x + 13: PRINT "B: "; COLOR 9: PRINT STRING$(46, 196); @@ -12171,14 +12134,13 @@ FUNCTION idergbmixer$ (editing) T = VAL(idetxt(o(3).txt)): r = ((T / 255) * 46) IF T = 0 THEN slider$ = CHR$(195) IF T = 255 THEN slider$ = CHR$(180) - LOCATE p.y + 8, p.x + 15 + r: PRINT slider$; + _PRINTSTRING (p.x + 15 + r, p.y + 8), slider$ - COLOR 0: LOCATE p.y + 9, p.x + 19: PRINT "Hold CTRL to drag all sliders at once."; + COLOR 0: _PRINTSTRING (p.x + 19, p.y + 9), "Hold CTRL to drag all sliders at once." COLOR 12 FOR i = 2 TO 8 - LOCATE p.y + i, p.x + 2 - PRINT STRING$(10, 219); + _PRINTSTRING (p.x + 2, p.y + i), STRING$(10, 219) NEXT i '-------- end of custom display changes -------- @@ -13479,8 +13441,7 @@ SUB ideupdatehelpbox IF LEN(FullMessage$(i)) > p.w - 2 THEN FullMessage$(i) = LEFT$(FullMessage$(i), p.w - 5) + STRING$(3, 250) END IF - LOCATE p.y + 1 + i, p.x + (p.w \ 2 - LEN(FullMessage$(i)) \ 2) + 1 - PRINT FullMessage$(i); + _PRINTSTRING (p.x + (p.w \ 2 - LEN(FullMessage$(i)) \ 2) + 1, p.y + 1 + i), FullMessage$(i) NEXT i COLOR 0, 7 @@ -13490,12 +13451,10 @@ SUB ideupdatehelpbox percentagechars = INT(maxprogresswidth * n / c) 'percentageMsg$ = "[" + STRING$(percentagechars, 254) + SPACE$(maxprogresswidth - percentagechars) + "]" + STR$(percentage) + "%" percentageMsg$ = STRING$(percentagechars, 219) + STRING$(maxprogresswidth - percentagechars, 176) + STR$(percentage) + "%" - LOCATE p.y + 4, p.x + (p.w \ 2 - LEN(percentageMsg$) \ 2) + 1 - PRINT percentageMsg$; + _PRINTSTRING (p.x + (p.w \ 2 - LEN(percentageMsg$) \ 2) + 1, p.y + 4), percentageMsg$ ELSEIF UpdateStep = 6 THEN percentageMsg$ = STRING$(maxprogresswidth, 219) + " 100%" - LOCATE p.y + 4, p.x + (p.w \ 2 - LEN(percentageMsg$) \ 2) + 1 - PRINT percentageMsg$; + _PRINTSTRING (p.x + (p.w \ 2 - LEN(percentageMsg$) \ 2) + 1, p.y + 4), percentageMsg$ END IF '-------- end of custom display changes -------- @@ -14178,23 +14137,21 @@ SUB UpdateIdeInfo IdeInfo = MID$(IdeInfo, 2) Percentage% = VAL(MID$(IdeInfo, 1, 3)) COLOR 13, 1 - LOCATE idewy - 1, 2 - PRINT STRING$(((idewx - 2) * Percentage%) / 100, "_"); + _PRINTSTRING (2, idewy - 1), STRING$(((idewx - 2) * Percentage%) / 100, "_") END IF END IF a$ = IdeInfo IF LEN(a$) > (idewx - 20) THEN a$ = LEFT$(a$, (idewx - 23)) + STRING$(3, 250) IF LEN(a$) < (idewx - 20) THEN a$ = a$ + SPACE$((idewx - 20) - LEN(a$)) - COLOR 0, 3: LOCATE idewy + idesubwindow, 2 - PRINT a$; + COLOR 0, 3: + _PRINTSTRING (2, idewy + idesubwindow), a$ COLOR 2, 3 IF LEN(versionStringStatus$) = 0 THEN versionStringStatus$ = "v" + Version$ IF LEN(AutoBuildMsg$) THEN versionStringStatus$ = versionStringStatus$ + MID$(AutoBuildMsg$, _INSTRREV(AutoBuildMsg$, " ")) END IF - LOCATE idewy + idesubwindow, idewx - 22 - LEN(versionStringStatus$) - PRINT versionStringStatus$; + _PRINTSTRING (idewx - 22 - LEN(versionStringStatus$), idewy + idesubwindow), versionStringStatus$ PCOPY 3, 0 END SUB @@ -14355,9 +14312,8 @@ FUNCTION BinaryFormatCheck% (pathToCheck$, pathSepToCheck$, fileToCheck$) SCREEN , , 3, 0 dummy = DarkenFGBG(1) clearStatusWindow - LOCATE idewy - 3, 2 COLOR 15, 1 - PRINT "Converting... " + _PRINTSTRING (2, idewy - 3), "Converting... " PCOPY 3, 0 convertLine$ = convertUtility$ + " " + QuotedFilename$(file$) + " -o " + QuotedFilename$(ofile$) @@ -14396,9 +14352,8 @@ FUNCTION BinaryFormatCheck% (pathToCheck$, pathSepToCheck$, fileToCheck$) SCREEN , , 3, 0 dummy = DarkenFGBG(1) clearStatusWindow - LOCATE idewy - 3, 2 COLOR 15, 1 - PRINT "Preparing to convert..." + _PRINTSTRING (2, idewy - 3), "Preparing to convert..." PCOPY 3, 0 IF INSTR(_OS$, "WIN") THEN SHELL _HIDE "qb64 -x source/utilities/QB45BIN.bas -o internal/utilities/QB45BIN" @@ -14439,12 +14394,9 @@ END SUB SUB clearStatusWindow COLOR 7, 1 - LOCATE idewy - 3, 2 - PRINT SPACE$(idewx - 2); - LOCATE idewy - 2, 2 - PRINT SPACE$(idewx - 2); - LOCATE idewy - 1, 2 - PRINT SPACE$(idewx - 2); + _PRINTSTRING (2, idewy - 3), SPACE$(idewx - 2) + _PRINTSTRING (2, idewy - 2), SPACE$(idewx - 2) + _PRINTSTRING (2, idewy - 1), SPACE$(idewx - 2) END SUB FUNCTION getWordAtCursor$