[DEVELOPMENT ENVIRONMENT]

* NEW: Syntax highlighting for help comments.
* NEW: Implement a wiki-like syntax inside help comments.

[GB.EVAL]
* NEW: Syntax highlighting for help comments.

[GB.QT4]
* NEW: The TextArea.Line and TextArea.Column properties has been 
  implemented.

[GB.QT4.EXT]
* NEW: Syntax highlighting for help comments in Editor.
* OPT: Editor view has been redesigned to inherit directly Q3ScrollView 
  instead of Q3GridView.
* BUG: The editor background color has no impact anymore on the editor 
  frame.


git-svn-id: svn://localhost/gambas/trunk@2494 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2009-12-14 03:45:22 +00:00
parent d7879986d8
commit 0c1b17316e
23 changed files with 447 additions and 250 deletions

View File

@ -290,7 +290,7 @@ msgstr ""
msgid "Loading information on component &1..." msgid "Loading information on component &1..."
msgstr "" msgstr ""
#: CModule.class:28 FCreateFile.class:625 FEditor.class:3364 FForm.class:3539 #: CModule.class:28 FCreateFile.class:625 FEditor.class:3365 FForm.class:3539
#: FInfo.class:88 #: FInfo.class:88
msgid "Form" msgid "Form"
msgstr "" msgstr ""
@ -327,7 +327,7 @@ msgstr ""
msgid "Gambas reports" msgid "Gambas reports"
msgstr "" msgstr ""
#: Design.module:215 Project.module:1655 #: Design.module:215 Project.module:1659
msgid "In class &1 at line &2." msgid "In class &1 at line &2."
msgstr "" msgstr ""
@ -434,7 +434,7 @@ msgstr ""
#: FColorChooser.class:203 FCommit.class:397 FConflict.class:191 #: FColorChooser.class:203 FCommit.class:397 FConflict.class:191
#: FConnectionEditor.class:261 FCreateFile.class:885 FDebugInfo.class:490 #: FConnectionEditor.class:261 FCreateFile.class:885 FDebugInfo.class:490
#: FEditor.class:2111 FFindList.class:195 FFind.class:114 #: FEditor.class:2112 FFindList.class:195 FFind.class:114
#: FFontChooser.class:86 FForm.class:2830 FGotoLine.class:63 #: FFontChooser.class:86 FForm.class:2830 FGotoLine.class:63
#: FHelpBrowser.class:186 FIconEditor.class:1393 FImportTable.class:38 #: FHelpBrowser.class:186 FIconEditor.class:1393 FImportTable.class:38
#: FList.class:155 FMain.class:204 FMakeExecutable.class:144 #: FList.class:155 FMain.class:204 FMakeExecutable.class:144
@ -443,7 +443,7 @@ msgstr ""
#: FOption.class:576 FPasteSpecial.class:279 FPropertyProject.class:1236 #: FOption.class:576 FPasteSpecial.class:279 FPropertyProject.class:1236
#: FSave.class:118 FSelectExtraFile.class:78 FSelectIcon.class:271 #: FSave.class:118 FSelectExtraFile.class:78 FSelectIcon.class:271
#: FTableChooser.class:145 FTextEditor.class:462 FText.class:107 #: FTableChooser.class:145 FTextEditor.class:462 FText.class:107
#: FTranslate.class:606 Project.module:346 #: FTranslate.class:606 Project.module:350
msgid "Cancel" msgid "Cancel"
msgstr "" msgstr ""
@ -477,40 +477,40 @@ msgid ""
msgstr "" msgstr ""
#: FCommit.class:234 FConflict.class:327 FConnectionEditor.class:1790 #: FCommit.class:234 FConflict.class:327 FConnectionEditor.class:1790
#: FEditor.class:3188 FForm.class:3380 FIconEditor.class:2168 #: FEditor.class:3189 FForm.class:3380 FIconEditor.class:2168
#: FOutput.class:473 FTextEditor.class:660 #: FOutput.class:473 FTextEditor.class:660
msgid "Cut" msgid "Cut"
msgstr "" msgstr ""
#: FCommit.class:241 FConflict.class:334 FConnectionEditor.class:1688 #: FCommit.class:241 FConflict.class:334 FConnectionEditor.class:1688
#: FEditor.class:3194 FForm.class:3387 FIconEditor.class:2177 #: FEditor.class:3195 FForm.class:3387 FIconEditor.class:2177
#: FOutput.class:480 FTextEditor.class:667 #: FOutput.class:480 FTextEditor.class:667
msgid "Copy" msgid "Copy"
msgstr "" msgstr ""
#: FCommit.class:248 FConflict.class:341 FConnectionEditor.class:1814 #: FCommit.class:248 FConflict.class:341 FConnectionEditor.class:1814
#: FEditor.class:3201 FForm.class:3394 FIconEditor.class:2186 #: FEditor.class:3202 FForm.class:3394 FIconEditor.class:2186
#: FOutput.class:487 FTextEditor.class:674 #: FOutput.class:487 FTextEditor.class:674
msgid "Paste" msgid "Paste"
msgstr "" msgstr ""
#: FCommit.class:255 FConflict.class:348 FConnectionEditor.class:1822 #: FCommit.class:255 FConflict.class:348 FConnectionEditor.class:1822
#: FEditor.class:3171 FForm.class:3622 FIconEditor.class:2150 #: FEditor.class:3172 FForm.class:3622 FIconEditor.class:2150
#: FOption.class:1189 FOutput.class:455 FTextEditor.class:642 #: FOption.class:1189 FOutput.class:455 FTextEditor.class:642
msgid "Undo" msgid "Undo"
msgstr "" msgstr ""
#: FCommit.class:262 FConflict.class:355 FConnectionEditor.class:1830 #: FCommit.class:262 FConflict.class:355 FConnectionEditor.class:1830
#: FEditor.class:3178 FForm.class:3633 FOutput.class:462 FTextEditor.class:649 #: FEditor.class:3179 FForm.class:3633 FOutput.class:462 FTextEditor.class:649
msgid "Redo" msgid "Redo"
msgstr "" msgstr ""
#: FCommit.class:269 FConflict.class:362 FEditor.class:3422 #: FCommit.class:269 FConflict.class:362 FEditor.class:3423
#: FTextEditor.class:841 #: FTextEditor.class:841
msgid "Indent" msgid "Indent"
msgstr "" msgstr ""
#: FCommit.class:276 FConflict.class:369 FEditor.class:3431 #: FCommit.class:276 FConflict.class:369 FEditor.class:3432
#: FTextEditor.class:849 #: FTextEditor.class:849
msgid "Unindent" msgid "Unindent"
msgstr "" msgstr ""
@ -583,7 +583,7 @@ msgid ""
"Do you really want to open another file?" "Do you really want to open another file?"
msgstr "" msgstr ""
#: FConflict.class:254 FOpenProject.class:351 Project.module:346 #: FConflict.class:254 FOpenProject.class:351 Project.module:350
msgid "Open" msgid "Open"
msgstr "" msgstr ""
@ -659,7 +659,7 @@ msgstr ""
msgid "The table '&1' has been modified. Do you want to save it?" msgid "The table '&1' has been modified. Do you want to save it?"
msgstr "" msgstr ""
#: FConnectionEditor.class:261 FEditor.class:3312 FForm.class:3525 #: FConnectionEditor.class:261 FEditor.class:3313 FForm.class:3525
#: FIconEditor.class:1412 FTextEditor.class:755 #: FIconEditor.class:1412 FTextEditor.class:755
msgid "Save" msgid "Save"
msgstr "" msgstr ""
@ -781,7 +781,7 @@ msgstr ""
msgid "Connection editor" msgid "Connection editor"
msgstr "" msgstr ""
#: FConnectionEditor.class:1547 FEditor.class:2111 FForm.class:2830 #: FConnectionEditor.class:1547 FEditor.class:2112 FForm.class:2830
#: FHelpBrowser.class:193 FIconEditor.class:2032 FTextEditor.class:462 #: FHelpBrowser.class:193 FIconEditor.class:2032 FTextEditor.class:462
#: FTranslate.class:700 #: FTranslate.class:700
msgid "Reload" msgid "Reload"
@ -1211,118 +1211,118 @@ msgstr ""
msgid "Stack backtrace" msgid "Stack backtrace"
msgstr "" msgstr ""
#: FEditor.class:2111 FIconEditor.class:2032 FTextEditor.class:462 #: FEditor.class:2112 FIconEditor.class:2032 FTextEditor.class:462
msgid "" msgid ""
"The file has been modified.\n" "The file has been modified.\n"
"\n" "\n"
"All your changes will be lost." "All your changes will be lost."
msgstr "" msgstr ""
#: FEditor.class:2508 #: FEditor.class:2509
msgid "(Declarations)" msgid "(Declarations)"
msgstr "" msgstr ""
#: FEditor.class:3105 #: FEditor.class:3106
msgid "Go to" msgid "Go to"
msgstr "" msgstr ""
#: FEditor.class:3110 FTextEditor.class:632 #: FEditor.class:3111 FTextEditor.class:632
msgid "Go to line..." msgid "Go to line..."
msgstr "" msgstr ""
#: FEditor.class:3116 #: FEditor.class:3117
msgid "Find definition" msgid "Find definition"
msgstr "" msgstr ""
#: FEditor.class:3123 FHelpBrowser.class:172 #: FEditor.class:3124 FHelpBrowser.class:172
msgid "Go back" msgid "Go back"
msgstr "" msgstr ""
#: FEditor.class:3130 #: FEditor.class:3131
msgid "Open form" msgid "Open form"
msgstr "" msgstr ""
#: FEditor.class:3137 FForm.class:3308 FMain.class:2328 #: FEditor.class:3138 FForm.class:3308 FMain.class:2328
msgid "&Startup class" msgid "&Startup class"
msgstr "" msgstr ""
#: FEditor.class:3146 #: FEditor.class:3147
msgid "Run &until current line" msgid "Run &until current line"
msgstr "" msgstr ""
#: FEditor.class:3153 #: FEditor.class:3154
msgid "Toggle &breakpoint" msgid "Toggle &breakpoint"
msgstr "" msgstr ""
#: FEditor.class:3160 #: FEditor.class:3161
msgid "&Watch expression..." msgid "&Watch expression..."
msgstr "" msgstr ""
#: FEditor.class:3208 #: FEditor.class:3209
msgid "Paste special..." msgid "Paste special..."
msgstr "" msgstr ""
#: FEditor.class:3218 FTextEditor.class:685 #: FEditor.class:3219 FTextEditor.class:685
msgid "Select &All" msgid "Select &All"
msgstr "" msgstr ""
#: FEditor.class:3228 #: FEditor.class:3229
msgid "Comment" msgid "Comment"
msgstr "" msgstr ""
#: FEditor.class:3235 #: FEditor.class:3236
msgid "Uncomment" msgid "Uncomment"
msgstr "" msgstr ""
#: FEditor.class:3246 FTextEditor.class:695 #: FEditor.class:3247 FTextEditor.class:695
msgid "Find..." msgid "Find..."
msgstr "" msgstr ""
#: FEditor.class:3252 FTextEditor.class:701 #: FEditor.class:3253 FTextEditor.class:701
msgid "Replace..." msgid "Replace..."
msgstr "" msgstr ""
#: FEditor.class:3259 FTextEditor.class:708 #: FEditor.class:3260 FTextEditor.class:708
msgid "Find Next" msgid "Find Next"
msgstr "" msgstr ""
#: FEditor.class:3266 FTextEditor.class:715 #: FEditor.class:3267 FTextEditor.class:715
msgid "Find Previous" msgid "Find Previous"
msgstr "" msgstr ""
#: FEditor.class:3276 FTextEditor.class:725 #: FEditor.class:3277 FTextEditor.class:725
msgid "View" msgid "View"
msgstr "" msgstr ""
#: FEditor.class:3280 FTextEditor.class:729 #: FEditor.class:3281 FTextEditor.class:729
msgid "No split" msgid "No split"
msgstr "" msgstr ""
#: FEditor.class:3287 FTextEditor.class:736 #: FEditor.class:3288 FTextEditor.class:736
msgid "Horizontal split" msgid "Horizontal split"
msgstr "" msgstr ""
#: FEditor.class:3294 FTextEditor.class:743 #: FEditor.class:3295 FTextEditor.class:743
msgid "Vertical split" msgid "Vertical split"
msgstr "" msgstr ""
#: FEditor.class:3323 FPasteSpecial.class:253 #: FEditor.class:3324 FPasteSpecial.class:253
msgid "Paste as string" msgid "Paste as string"
msgstr "" msgstr ""
#: FEditor.class:3328 FPasteSpecial.class:258 #: FEditor.class:3329 FPasteSpecial.class:258
msgid "Paste as multi-line string" msgid "Paste as multi-line string"
msgstr "" msgstr ""
#: FEditor.class:3333 FPasteSpecial.class:243 #: FEditor.class:3334 FPasteSpecial.class:243
msgid "Paste as comments" msgid "Paste as comments"
msgstr "" msgstr ""
#: FEditor.class:3340 FOption.class:997 #: FEditor.class:3341 FOption.class:997
msgid "Editor" msgid "Editor"
msgstr "" msgstr ""
#: FEditor.class:3489 #: FEditor.class:3490
msgid "Procedure list" msgid "Procedure list"
msgstr "" msgstr ""
@ -2335,7 +2335,7 @@ msgstr ""
msgid "Save project" msgid "Save project"
msgstr "" msgstr ""
#: FMain.class:2439 Project.module:1954 #: FMain.class:2439 Project.module:1958
msgid "Save project as" msgid "Save project as"
msgstr "" msgstr ""
@ -2371,7 +2371,7 @@ msgstr ""
msgid "Make installation package" msgid "Make installation package"
msgstr "" msgstr ""
#: FMain.class:2525 FSelectIcon.class:214 Project.module:1259 #: FMain.class:2525 FSelectIcon.class:214 Project.module:1263
msgid "Project" msgid "Project"
msgstr "" msgstr ""
@ -2500,7 +2500,7 @@ msgid "There is no CHANGELOG entry for this release."
msgstr "" msgstr ""
#: FMakeInstall.class:309 FPropertyProject.class:1236 FSave.class:111 #: FMakeInstall.class:309 FPropertyProject.class:1236 FSave.class:111
#: Project.module:2579 #: Project.module:2583
msgid "Continue" msgid "Continue"
msgstr "" msgstr ""
@ -3065,7 +3065,7 @@ msgstr ""
msgid "Image editor" msgid "Image editor"
msgstr "" msgstr ""
#: FOption.class:923 #: FOption.class:923 MTheme.module:6
msgid "Help" msgid "Help"
msgstr "" msgstr ""
@ -4858,268 +4858,268 @@ msgstr ""
msgid "Controls" msgid "Controls"
msgstr "" msgstr ""
#: Project.module:329 #: Project.module:333
msgid "This project does not exist." msgid "This project does not exist."
msgstr "" msgstr ""
#: Project.module:344 #: Project.module:348
msgid "This is not a Gambas project." msgid "This is not a Gambas project."
msgstr "" msgstr ""
#: Project.module:346 #: Project.module:350
msgid "" msgid ""
"This is a Gambas &1 project.\n" "This is a Gambas &1 project.\n"
"\n" "\n"
"Do you want to open it anyway?" "Do you want to open it anyway?"
msgstr "" msgstr ""
#: Project.module:357 #: Project.module:361
msgid "" msgid ""
"This project seems to be already opened.\n" "This project seems to be already opened.\n"
"\n" "\n"
"Opening the same project twice can lead to data loss." "Opening the same project twice can lead to data loss."
msgstr "" msgstr ""
#: Project.module:357 #: Project.module:361
msgid "Open after all" msgid "Open after all"
msgstr "" msgstr ""
#: Project.module:357 #: Project.module:361
msgid "Do not open" msgid "Do not open"
msgstr "" msgstr ""
#: Project.module:378 #: Project.module:382
msgid "This project is read-only." msgid "This project is read-only."
msgstr "" msgstr ""
#: Project.module:378 #: Project.module:382
msgid "It cannot be converted." msgid "It cannot be converted."
msgstr "" msgstr ""
#: Project.module:433 #: Project.module:437
msgid "Cannot open project file :\n" msgid "Cannot open project file :\n"
msgstr "" msgstr ""
#: Project.module:1061 #: Project.module:1065
msgid "The following classes have circular inheritance:" msgid "The following classes have circular inheritance:"
msgstr "" msgstr ""
#: Project.module:1223 #: Project.module:1227
msgid "read-only" msgid "read-only"
msgstr "" msgstr ""
#: Project.module:1225 #: Project.module:1229
msgid "ALPHA VERSION, USE AT YOUR OWN RISK! :-)" msgid "ALPHA VERSION, USE AT YOUR OWN RISK! :-)"
msgstr "" msgstr ""
#: Project.module:1262 #: Project.module:1266
msgid "Sources" msgid "Sources"
msgstr "" msgstr ""
#: Project.module:1265 #: Project.module:1269
msgid "Connections" msgid "Connections"
msgstr "" msgstr ""
#: Project.module:1274 #: Project.module:1278
msgid "Data" msgid "Data"
msgstr "" msgstr ""
#: Project.module:1377 #: Project.module:1381
msgid "Loading &1..." msgid "Loading &1..."
msgstr "" msgstr ""
#: Project.module:1450 #: Project.module:1454
msgid "Cannot open file." msgid "Cannot open file."
msgstr "" msgstr ""
#: Project.module:1509 #: Project.module:1513
msgid "File not found!" msgid "File not found!"
msgstr "" msgstr ""
#: Project.module:1615 #: Project.module:1619
msgid "Cannot compile the project." msgid "Cannot compile the project."
msgstr "" msgstr ""
#: Project.module:1639 #: Project.module:1643
msgid "first" msgid "first"
msgstr "" msgstr ""
#: Project.module:1641 #: Project.module:1645
msgid "second" msgid "second"
msgstr "" msgstr ""
#: Project.module:1643 #: Project.module:1647
msgid "third" msgid "third"
msgstr "" msgstr ""
#: Project.module:1645 #: Project.module:1649
msgid "&1th" msgid "&1th"
msgstr "" msgstr ""
#: Project.module:1651 #: Project.module:1655
msgid "in form definition" msgid "in form definition"
msgstr "" msgstr ""
#: Project.module:1805 #: Project.module:1809
msgid "" msgid ""
"Some project source files are in conflict.\n" "Some project source files are in conflict.\n"
"Please solve them if you want to compile the project." "Please solve them if you want to compile the project."
msgstr "" msgstr ""
#: Project.module:1809 #: Project.module:1813
msgid "Compiling project" msgid "Compiling project"
msgstr "" msgstr ""
#: Project.module:1821 #: Project.module:1825
msgid "Nothing to do." msgid "Nothing to do."
msgstr "" msgstr ""
#: Project.module:1960 #: Project.module:1964
msgid "This project already exists." msgid "This project already exists."
msgstr "" msgstr ""
#: Project.module:1973 #: Project.module:1977
msgid "Unable to save the project." msgid "Unable to save the project."
msgstr "" msgstr ""
#: Project.module:2015 #: Project.module:2019
msgid "File already exists." msgid "File already exists."
msgstr "" msgstr ""
#: Project.module:2060 #: Project.module:2064
msgid "Cannot copy template file." msgid "Cannot copy template file."
msgstr "" msgstr ""
#: Project.module:2079 #: Project.module:2083
msgid "Directory already exists." msgid "Directory already exists."
msgstr "" msgstr ""
#: Project.module:2230 #: Project.module:2234
msgid "Making executable..." msgid "Making executable..."
msgstr "" msgstr ""
#: Project.module:2274 #: Project.module:2278
msgid "Cannot make executable." msgid "Cannot make executable."
msgstr "" msgstr ""
#: Project.module:2578 #: Project.module:2582
msgid "Some components are missing: &1" msgid "Some components are missing: &1"
msgstr "" msgstr ""
#: Project.module:2779 #: Project.module:2783
msgid "Cannot write project file." msgid "Cannot write project file."
msgstr "" msgstr ""
#: Project.module:2812 #: Project.module:2816
msgid "Unable to create desktop shortcut." msgid "Unable to create desktop shortcut."
msgstr "" msgstr ""
#: Project.module:2893 #: Project.module:2897
msgid "Unable to install component." msgid "Unable to install component."
msgstr "" msgstr ""
#: Project.module:2931 #: Project.module:2935
msgid "Unable to uninstall component." msgid "Unable to uninstall component."
msgstr "" msgstr ""
#: Project.module:3074 #: Project.module:3078
msgid "The directory will be removed at the next commit." msgid "The directory will be removed at the next commit."
msgstr "" msgstr ""
#: Project.module:3093 #: Project.module:3097
msgid "You must define a startup class or form!" msgid "You must define a startup class or form!"
msgstr "" msgstr ""
#: Project.module:3125 #: Project.module:3129
msgid "Please type a name." msgid "Please type a name."
msgstr "" msgstr ""
#: Project.module:3129 #: Project.module:3133
msgid "This name contains a forbidden character:" msgid "This name contains a forbidden character:"
msgstr "" msgstr ""
#: Project.module:3133 #: Project.module:3137
msgid "The name cannot begins with a dot." msgid "The name cannot begins with a dot."
msgstr "" msgstr ""
#: Project.module:3137 #: Project.module:3141
msgid "This name is already used. Choose another one." msgid "This name is already used. Choose another one."
msgstr "" msgstr ""
#: Project.module:3168 #: Project.module:3172
msgid "" msgid ""
"A class name must begin with a letter or an underscore, followed by any " "A class name must begin with a letter or an underscore, followed by any "
"letter or digit." "letter or digit."
msgstr "" msgstr ""
#: Project.module:3216 #: Project.module:3220
msgid "Destination already exists" msgid "Destination already exists"
msgstr "" msgstr ""
#: Project.module:3413 #: Project.module:3417
msgid "Unable to rename '&1'" msgid "Unable to rename '&1'"
msgstr "" msgstr ""
#: Project.module:3528 #: Project.module:3532
msgid "Please type a project name." msgid "Please type a project name."
msgstr "" msgstr ""
#: Project.module:3536 #: Project.module:3540
msgid "The project name cannot begin with a dot." msgid "The project name cannot begin with a dot."
msgstr "" msgstr ""
#: Project.module:3539 #: Project.module:3543
msgid "Non-ASCII characters are forbidden in a project name." msgid "Non-ASCII characters are forbidden in a project name."
msgstr "" msgstr ""
#: Project.module:3540 #: Project.module:3544
msgid "" msgid ""
"The following characters are forbidden in a project name: ? * / \\ SPACE" "The following characters are forbidden in a project name: ? * / \\ SPACE"
msgstr "" msgstr ""
#: Project.module:3550 #: Project.module:3554
msgid "The project directory already exists." msgid "The project directory already exists."
msgstr "" msgstr ""
#: Project.module:3552 #: Project.module:3556
msgid "" msgid ""
"The project directory cannot be created because a file with the same name " "The project directory cannot be created because a file with the same name "
"already exists." "already exists."
msgstr "" msgstr ""
#: Project.module:3598 #: Project.module:3602
msgid "Create source package" msgid "Create source package"
msgstr "" msgstr ""
#: Project.module:3599 #: Project.module:3603
msgid "Source packages" msgid "Source packages"
msgstr "" msgstr ""
#: Project.module:3869 #: Project.module:3873
msgid "Cannot copy file &1." msgid "Cannot copy file &1."
msgstr "" msgstr ""
#: Project.module:3881 #: Project.module:3885
msgid "Linking a directory is forbidden." msgid "Linking a directory is forbidden."
msgstr "" msgstr ""
#: Project.module:3911 #: Project.module:3915
msgid "Cannot create link &1." msgid "Cannot create link &1."
msgstr "" msgstr ""
#: Project.module:3928 #: Project.module:3932
msgid "Cannot move a directory inside itself." msgid "Cannot move a directory inside itself."
msgstr "" msgstr ""
#: Project.module:3992 #: Project.module:3996
msgid "Cannot move file &1." msgid "Cannot move file &1."
msgstr "" msgstr ""
#: Project.module:4539 #: Project.module:4546
msgid "modified" msgid "modified"
msgstr "" msgstr ""
#: Project.module:4619 #: Project.module:4626
msgid "Unable to update all forms." msgid "Unable to update all forms."
msgstr "" msgstr ""

View File

@ -703,6 +703,109 @@ Public Function GetHelpURL() As String
End End
'' Transform one line of help into HTML by decoding some sort of light wiki syntax.
'' - #sLine# is the line of help text
'' The HTML is returned.
Private Sub DecodeHelpLine(sLine As String) As String
Dim iPos As Integer
Dim iLen As Integer = String.Len(sLine)
Dim sChar As String
Dim sHTML As String
Dim sWait As String
Dim bBold, bItalic, bMonospace, bUnderline As Boolean
Dim iSavePos As Integer
Dim sLink As String
Dim iPoint As Integer
Dim hClass As CClassInfo
Dim hSymbol As CSymbolInfo
sLine = RTrim(sLine)
If Not sLine Then Return "<p>"
If sLine = "--" Then Return "<hr>"
If sLine Begins "-" Then
sHtml = "<li>"
sLine = Mid$(sLine, 2)
Endif
Do
Inc iPos
If iPos > iLen Then Break
sChar = String.Mid(sLine, iPos, 1)
If sWait = ">" Then
sHTML &= sChar
If sChar = ">" Then sWait = ""
Continue
Else If sWait = "]" Then
If sChar <> "]" Then Continue
sWait = ""
sLink = String.Mid$(sLine, iSavePos, iPos - iSavePos)
sChar = sLink
If sLink Like "*://*" Then
Else
iPoint = RInStr(sLink, ".")
If iPoint = 0 Then
hClass = Null
Try hClass = CComponent.Classes[sLink]
If hClass Then
sLink = hClass.GetHelpURL()
Else
sLink = ""
Endif
Else
hSymbol = Null
Try hSymbol = CComponent.Classes[Trim(Left(sLink, iPoint - 1))].Symbols[Trim(Mid$(sLink, iPoint + 1))]
If hSymbol Then
sLink = hSymbol.GetHelpURL()
Else
sLink = ""
Endif
Endif
Endif
If sLink Then
sHTML &= "<a href=\"" & sLink & "\">" & Html(sChar) & "</a>"
Else
sHTML &= "<i>" & Html(sChar) & "?</i>"
Endif
Continue
Endif
If sChar = "\\" Then
sHTML &= Html(String.Mid$(sLine, iPos + 1, 1))
Inc iPos
Else If sChar = "<" Then
sHTML &= sChar
sWait = ">"
Else If sChar = "*" Then
bBold = Not bBold
sHTML &= If(bBold, "<b>", "</b>")
Else If sChar = "=" Then
bMonospace = Not bMonospace
sHTML &= If(bMonospace, "<tt>", "</tt>")
Else If sChar = "'" Then
bItalic = Not bItalic
sHTML &= If(bItalic, "<i>", "</i>")
Else If sChar = "#" Then
bUnderline = Not bUnderline
sHTML &= If(bUnderline, "<u>", "</u>")
Else If sChar = "[" Then
sWait = "]"
iSavePos = iPos + 1
Else
sHTML &= Html(sChar)
Endif
Loop
Return sHTML
End
Public Function GetHelpHTML() As String Public Function GetHelpHTML() As String
Dim hForm As Object Dim hForm As Object
@ -728,7 +831,7 @@ Public Function GetHelpHTML() As String
If Highlight.Types[i] = Highlight.Comment Then If Highlight.Types[i] = Highlight.Comment Then
sLine = Trim(Highlight.Symbols[i]) sLine = Trim(Highlight.Symbols[i])
If sLine Begins "''" Then If sLine Begins "''" Then
sHelp = Trim(Mid$(sline, 3)) sHelp = DecodeHelpLine(Trim(Mid$(sLine, 3)))
Endif Endif
Endif Endif
Endif Endif
@ -740,7 +843,7 @@ Public Function GetHelpHTML() As String
For i = iLine - 1 To 0 Step -1 For i = iLine - 1 To 0 Step -1
sLine = Trim(hEdit.Lines[i].Text) sLine = Trim(hEdit.Lines[i].Text)
If sLine Begins "''" Then If sLine Begins "''" Then
sHelp = Trim(Mid(sLine, 3)) & "<br>" & sHelp sHelp = DecodeHelpLine(Trim(Mid(sLine, 3))) & "\n" & sHelp
Else Else
If Trim(sLine) = "" Then Continue If Trim(sLine) = "" Then Continue
Break Break

View File

@ -1352,12 +1352,12 @@ End
' '
' END ' END
'' Read the type of a symbol declared globally, or as a method argument, from an analyzed line of code. '' Read the type of a symbol declared globally, or as a method argument, from an analyzed line of code.
'' <li><u>aSym</u> is an array of symbols (like Highlight.Symbols). '' - #aSym# is an array of symbols (like [Highlight.Symbols]).
'' <li><u>iIndex</u> is the index of the first symbol to take into account into <u>aSym</u>. '' - #iIndex# is the index of the first symbol to take into account into #aSym#.
'' <li><u>sSymbol</u> is the name of the local symbol. If specified, it must be the first symbol to read. '' - #sSymbol# is the name of the local symbol. If specified, it must be the first symbol to read.
'' <p>This function returns the datatype of the symbol. ''
'' This function returns the datatype of the symbol.
Static Public Function ReadSymbolType(aSym As String[], iIndex As Integer, Optional sSymbol As String) As String Static Public Function ReadSymbolType(aSym As String[], iIndex As Integer, Optional sSymbol As String) As String
@ -1388,11 +1388,12 @@ Catch
End End
'' Get information about a local symbol declared with DIM from an analyzed line of code. '' Get information about a local symbol declared with DIM from an analyzed line of code.
'' <li><u>aSym</u> is an array of symbols (like Highlight.Symbols). '' - #aSym# is an array of symbols (like [Highlight.Symbols]).
'' <li><u>iIndex</u> is the index of the first symbol to take into account into <u>aSym</u>. '' - #iIndex# is the index of the first symbol to take into account into #aSym#.
'' <li><u>sSymbol</u> is the name of the local symbol to search for. '' - #sSymbol# is the name of the local symbol to search for.
'' <li><u>hSymbol</u> is a CSymbolInfo object that will be filled with the type information. '' - #hSymbol# is a CSymbolInfo object that will be filled with the type information.
'' <p>This function returns TRUE if the symbol has been found, FALSE otherwise. ''
'' This function returns =TRUE= if the symbol has been found, =FALSE= otherwise.
Static Function ReadLocalSymbolType(aSym As String[], iIndex As Integer, sSymbol As String, hSymbol As CSymbolInfo) As Boolean Static Function ReadLocalSymbolType(aSym As String[], iIndex As Integer, sSymbol As String, hSymbol As CSymbolInfo) As Boolean

View File

@ -31,4 +31,3 @@ Public Sub GetName(sFormat As String) As String
Endif Endif
End End

View File

@ -2,8 +2,8 @@
Public Const DEFAULT_THEME As String = "sapphire" Public Const DEFAULT_THEME As String = "sapphire"
Public ColorKeys As String[] = ["Background", "Alternate", "Normal", "Keyword", "Datatype", "Function", "Operator", "Symbol", "Number", "String", "Comment", "Breakpoint", "Current", "Selection", "Highlight", "CurrentLine", "Error"] Public ColorKeys As String[] = ["Background", "Alternate", "Normal", "Keyword", "Datatype", "Function", "Operator", "Symbol", "Number", "String", "Comment", "Help", "Breakpoint", "Current", "Selection", "Highlight", "CurrentLine", "Error"]
Public ColorNames As String[] = [("Background"), ("Alternate background"), ("Normal text"), ("Keywords"), ("Data types"), ("Subroutines"), ("Operators"), ("Symbols"), ("Numbers"), ("Strings"), ("Comments"), ("Breakpoints"), ("Current line"), ("Selection"), ("Highlighting"), ("Editing line"), ("Errors")] Public ColorNames As String[] = [("Background"), ("Alternate background"), ("Normal text"), ("Keywords"), ("Data types"), ("Subroutines"), ("Operators"), ("Symbols"), ("Numbers"), ("Strings"), ("Comments"), ("Help"), ("Breakpoints"), ("Current line"), ("Selection"), ("Highlighting"), ("Editing line"), ("Errors")]
Private $cDefault As Collection Private $cDefault As Collection

View File

@ -178,6 +178,7 @@ Public Sub Main()
Dim sPath As String Dim sPath As String
Dim iTest As Integer Dim iTest As Integer
Dim iInd As Integer
Application.Theme = Settings["/Theme"] Application.Theme = Settings["/Theme"]
'DB.Debug = True 'DB.Debug = True
@ -200,9 +201,12 @@ Public Sub Main()
FMain.Load FMain.Load
If Application.Args.Count >= 2 Then For iInd = 1 To Application.Args.Count - 1
sPath = Application.Args[1] If Left(Application.Args[iInd]) <> "-" Then
Endif sPath = Application.Args[iInd]
Break
Endif
Next
'FMain.Close 'FMain.Close
'Return 'Return
@ -4203,6 +4207,9 @@ Public Function CheckProgram(sProg As String) As Boolean
End End
'' Open a URL inside an external browser.
'' <li><u>sLink</u> is the URL to open.
Public Sub OpenWebPage(sLink As String) Public Sub OpenWebPage(sLink As String)
Dim sExec As String Dim sExec As String

View File

@ -16,4 +16,5 @@ Highlight="#CF9FFF"
CurrentLine="#FFEFCF" CurrentLine="#FFEFCF"
Error="#028078,Underline" Error="#028078,Underline"
Alternate="#BFFFFF" Alternate="#BFFFFF"
Help="#808080,Bold,Italic"

View File

@ -16,4 +16,5 @@ Highlight="#9FFF9F"
CurrentLine="#F9E7FF" CurrentLine="#F9E7FF"
Error="#008000,Underline" Error="#008000,Underline"
Alternate="#BFDFFF" Alternate="#BFDFFF"
Help="#BF7FFF,Bold,Italic"

View File

@ -16,4 +16,5 @@ Current="#BFFFBF"
CurrentLine="#E7FFE7" CurrentLine="#E7FFE7"
Error="#800080,Underline" Error="#800080,Underline"
Alternate="#FFFF9F" Alternate="#FFFF9F"
Help="#805500,Bold,Italic"

View File

@ -16,4 +16,5 @@ Highlight="#305880"
CurrentLine="#202020" CurrentLine="#202020"
Error="#C00000,Underline" Error="#C00000,Underline"
Alternate="#00C060" Alternate="#00C060"
Help="#BF7FFF,Bold,Italic"

View File

@ -16,4 +16,5 @@ Highlight="#FFFF00"
CurrentLine="#E7F3FF" CurrentLine="#E7F3FF"
Error="#FF0000,Underline" Error="#FF0000,Underline"
Alternate="#BFFFBF" Alternate="#BFFFBF"
Help="#808080,Bold,Italic"

View File

@ -15,4 +15,5 @@ Breakpoint="#FF5F5F"
Current="#5F5FBF" Current="#5F5FBF"
CurrentLine="#00376F" CurrentLine="#00376F"
Error="#808000" Error="#808000"
Help="#5FBF5F,Bold"

View File

@ -16,4 +16,5 @@ Current="#FFBFBF"
CurrentLine="#FFE7E7" CurrentLine="#FFE7E7"
Error="#008000,Underline" Error="#008000,Underline"
Alternate="#FFFF9F" Alternate="#FFFF9F"
Help="#FF8000,Bold,Italic"

View File

@ -16,3 +16,4 @@ Selection="#C0C0FF"
Highlight="#FFFF00" Highlight="#FFFF00"
CurrentLine="#E7F3FF" CurrentLine="#E7F3FF"
Error="#808000,Underline" Error="#808000,Underline"
Help="#808080,#F0F0F0,Bold,Italic"

View File

@ -16,4 +16,5 @@ Current="#BFBFFF"
CurrentLine="#E7F3FF" CurrentLine="#E7F3FF"
Error="#004040,Underline" Error="#004040,Underline"
Alternate="#FFFF9F" Alternate="#FFFF9F"
Help="#008800,Bold,Italic"

View File

@ -981,6 +981,7 @@ int GDocument::convState(int state)
case EVAL_TYPE_DATATYPE: return GLine::Datatype; case EVAL_TYPE_DATATYPE: return GLine::Datatype;
case EVAL_TYPE_ERROR: return GLine::Error; case EVAL_TYPE_ERROR: return GLine::Error;
case EVAL_TYPE_ALTERNATE: return GLine::Alternate; case EVAL_TYPE_ALTERNATE: return GLine::Alternate;
case EVAL_TYPE_HELP: return GLine::Help;
default: return GLine::Normal; default: return GLine::Normal;
} }
} }

View File

@ -28,9 +28,9 @@
struct GHighlight struct GHighlight
{ {
unsigned state : 4; unsigned state : 5;
unsigned alternate : 1; unsigned alternate : 1;
unsigned len : 11; unsigned len : 10;
}; };
typedef typedef
@ -46,7 +46,7 @@ public:
Operator, Symbol, Number, String, Operator, Symbol, Number, String,
Comment, Breakpoint, Current, Datatype, Comment, Breakpoint, Current, Datatype,
Selection, Highlight, Line, Error, Selection, Highlight, Line, Error,
Alternate, Alternate, Help,
NUM_STATE NUM_STATE
}; };

View File

@ -235,44 +235,66 @@ BEGIN_PROPERTY(CTEXTAREA_max_length)
END_PROPERTY END_PROPERTY
*/ */
/* static int get_column(CTEXTAREA *_object)
BEGIN_PROPERTY(CTEXTAREA_line) {
QTextCursor cursor = WIDGET->textCursor();
int line, col; return cursor.position() - cursor.block().position();
}
WIDGET->getCursorPosition(&line, &col);
if (READ_PROPERTY)
GB.ReturnInteger(line);
else
{
line = VPROP(GB_INTEGER);
look_pos(WIDGET, &line, &col);
WIDGET->setCursorPosition(line, col);
}
END_PROPERTY
BEGIN_PROPERTY(CTEXTAREA_column) BEGIN_PROPERTY(CTEXTAREA_column)
int line, col; QTextCursor cursor = WIDGET->textCursor();
WIDGET->getCursorPosition(&line, &col);
if (READ_PROPERTY) if (READ_PROPERTY)
GB.ReturnInteger(col); //GB.ReturnInteger(WIDGET->textCursor().columnNumber());
GB.ReturnInteger(get_column(THIS));
else else
{ {
col = VPROP(GB_INTEGER); int col = VPROP(GB_INTEGER);
look_pos(WIDGET, &line, &col);
if (col <= 0)
WIDGET->setCursorPosition(line, col); cursor.movePosition(QTextCursor::QTextCursor::StartOfBlock);
else if (col >= cursor.block().length())
cursor.movePosition(QTextCursor::QTextCursor::EndOfBlock);
else
cursor.setPosition(cursor.block().position() + col);
WIDGET->setTextCursor(cursor);
}
END_PROPERTY
BEGIN_PROPERTY(CTEXTAREA_line)
QTextCursor cursor = WIDGET->textCursor();
if (READ_PROPERTY)
GB.ReturnInteger(cursor.blockNumber());
else
{
int col = get_column(THIS);
int line = VPROP(GB_INTEGER);
if (line < 0)
cursor.movePosition(QTextCursor::Start);
else if (line >= WIDGET->document()->blockCount())
cursor.movePosition(QTextCursor::End);
else
{
cursor.setPosition(WIDGET->document()->findBlockByNumber(line).position());
if (col > 0)
{
if (col >= cursor.block().length())
cursor.movePosition(QTextCursor::QTextCursor::EndOfBlock);
else
cursor.setPosition(cursor.block().position() + col);
}
}
WIDGET->setTextCursor(cursor);
} }
END_PROPERTY END_PROPERTY
*/
BEGIN_PROPERTY(CTEXTAREA_pos) BEGIN_PROPERTY(CTEXTAREA_pos)
@ -567,8 +589,8 @@ GB_DESC CTextAreaDesc[] =
GB_PROPERTY("Wrap", "b", CTEXTAREA_wrap), GB_PROPERTY("Wrap", "b", CTEXTAREA_wrap),
GB_PROPERTY("Border", "b", CWIDGET_border_simple), GB_PROPERTY("Border", "b", CWIDGET_border_simple),
//GB_PROPERTY("Line", "i", CTEXTAREA_line), GB_PROPERTY("Line", "i", CTEXTAREA_line),
//GB_PROPERTY("Column", "i", CTEXTAREA_column), GB_PROPERTY("Column", "i", CTEXTAREA_column),
GB_PROPERTY("Pos", "i", CTEXTAREA_pos), GB_PROPERTY("Pos", "i", CTEXTAREA_pos),
GB_PROPERTY_SELF("Selection", ".TextAreaSelection"), GB_PROPERTY_SELF("Selection", ".TextAreaSelection"),

View File

@ -83,7 +83,9 @@ static QColor defaultColors[GLine::NUM_STATE] =
QColor(0xC0, 0xC0, 0xFF), QColor(0xC0, 0xC0, 0xFF),
QColor(0xFF, 0xFF, 0x00), QColor(0xFF, 0xFF, 0x00),
QColor(0xE8, 0xE8, 0xF8), QColor(0xE8, 0xE8, 0xF8),
Qt::red Qt::red,
Qt::black,
Qt::gray
}; };
/**---- GEditor -----------------------------------------------------------*/ /**---- GEditor -----------------------------------------------------------*/
@ -93,7 +95,7 @@ QPixmap *GEditor::breakpoint = 0;
int GEditor::count = 0; int GEditor::count = 0;
GEditor::GEditor(QWidget *parent) GEditor::GEditor(QWidget *parent)
: Q3GridView(parent), : Q3ScrollView(parent),
fm(font()) fm(font())
{ {
int i; int i;
@ -103,19 +105,20 @@ GEditor::GEditor(QWidget *parent)
count++; count++;
setNumCols(1);
setKeyCompression(true); setKeyCompression(true);
setFocusPolicy(Qt::WheelFocus); setFocusPolicy(Qt::WheelFocus);
setAttribute(Qt::WA_InputMethodEnabled, true); setAttribute(Qt::WA_InputMethodEnabled, true);
setAttribute(Qt::WA_StaticContents, true);
setMouseTracking(true); setMouseTracking(true);
viewport()->setMouseTracking(true); viewport()->setMouseTracking(true);
viewport()->setCursor(Qt::ibeamCursor); viewport()->setCursor(Qt::ibeamCursor);
//setBackgroundRole(QPalette::Base);
viewport()->setBackgroundRole(QPalette::Base); viewport()->setBackgroundRole(QPalette::Base);
viewport()->setAutoFillBackground(true); viewport()->setAutoFillBackground(true);
viewport()->setPaletteBackgroundColor(defaultColors[GLine::Background]); viewport()->setPaletteBackgroundColor(defaultColors[GLine::Background]);
//viewport()->setWFlags(WRepaintNoErase); viewport()->setAttribute(Qt::WA_NoSystemBackground, true);
//viewport()->setAttribute(Qt::WA_StaticContents, true);
viewport()->setFocusProxy(this);
x = y = xx = 0; x = y = xx = 0;
x1m = x2m = 0; x1m = x2m = 0;
@ -135,15 +138,16 @@ GEditor::GEditor(QWidget *parent)
_showCol = 0; _showCol = 0;
_showLen = 0; _showLen = 0;
_posOutside = false; _posOutside = false;
_cellw = _cellh = 0;
lineWidthCacheY = -1; lineWidthCacheY = -1;
for (i = 0; i < GLine::NUM_STATE; i++) for (i = 0; i < GLine::NUM_STATE; i++)
{ {
styles[i].color = defaultColors[i]; styles[i].color = defaultColors[i];
styles[i].bold = i == GLine::Keyword; styles[i].bold = i == GLine::Keyword || i == GLine::Help;
styles[i].italic = i == GLine::Comment; styles[i].italic = i == GLine::Comment;
styles[i].underline = i == GLine::Error; styles[i].underline = i == GLine::Error;
if (i == GLine::Comment) if (i == GLine::Comment || i == GLine::Help || i == GLine::Help)
{ {
styles[i].background = true; styles[i].background = true;
styles[i].backgroundColor = QColor(0xE8, 0xE8, 0xE8); styles[i].backgroundColor = QColor(0xE8, 0xE8, 0xE8);
@ -153,6 +157,7 @@ GEditor::GEditor(QWidget *parent)
} }
flags = 0; flags = 0;
setFont(QFont("monospace", QApplication::font().pointSize())); setFont(QFont("monospace", QApplication::font().pointSize()));
updateHeight(); updateHeight();
@ -211,11 +216,10 @@ int GEditor::getCharWidth() const
void GEditor::updateCache() void GEditor::updateCache()
{ {
if (cache->width() < visibleWidth() || cache->height() < cellHeight()) if (cache->width() < visibleWidth() || cache->height() < _cellh)
{ {
int nw = QMAX(cache->width(), visibleWidth()); int nw = QMAX(cache->width(), visibleWidth());
int nh = cellHeight(); //QMAX(cache->height(), cellHeight()); int nh = _cellh; //QMAX(cache->height(), _cellh);
//qDebug("cache->resize(%d, %d)", nw, nh);
cache->resize(nw, nh); cache->resize(nw, nh);
} }
} }
@ -292,15 +296,15 @@ void GEditor::updateWidth(int y)
{ {
w = lineWidth(y); w = lineWidth(y);
//qDebug("contentsWidth() = %d cellWidth() = %d", contentsWidth(), cellWidth()); //qDebug("contentsWidth() = %d _cellw = %d", contentsWidth(), _cellw);
//setCellWidth(QMAX(visibleWidth(), margin + charWidth * doc->getMaxLineLength() + 2)); //setCellWidth(QMAX(visibleWidth(), margin + charWidth * doc->getMaxLineLength() + 2));
if (w > cellWidth()) if (w > _cellw)
{ {
largestLine = y; largestLine = y;
goto UPDATE_WIDTH; goto UPDATE_WIDTH;
} }
else if (w < cellWidth() && y == largestLine) else if (w < _cellw && y == largestLine)
{ {
w = findLargestLine(); w = findLargestLine();
goto UPDATE_WIDTH; goto UPDATE_WIDTH;
@ -312,33 +316,36 @@ void GEditor::updateWidth(int y)
UPDATE_WIDTH: UPDATE_WIDTH:
w = QMAX(visibleWidth(), w); w = QMAX(visibleWidth(), w);
if (w != cellWidth()) if (w != _cellw)
{ {
setCellWidth(w); _cellw = w;
updateCache();
updateViewport();
//qDebug("setCellWidth: %d (largestLine = %d)", w, largestLine); //qDebug("setCellWidth: %d (largestLine = %d)", w, largestLine);
} }
updateCache();
} }
void GEditor::updateHeight() void GEditor::updateHeight()
{ {
setCellHeight(fm.lineSpacing() + 1); _cellh = fm.lineSpacing() + 1;
updateCache(); updateCache();
if (pattern.height() < cellHeight()) if (pattern.height() < _cellh)
pattern.resize(16, cellHeight()); pattern.resize(16, _cellh);
updateViewport();
} }
void GEditor::redrawContents() void GEditor::redrawContents()
{ {
updateContents(); updateContents();
if (contentsHeight() < visibleHeight()) //if (contentsHeight() < visibleHeight())
repaintContents(contentsX(), contentsHeight(), visibleWidth(), visibleHeight() - contentsHeight() + contentsX(), true); // repaintContents(contentsX(), contentsHeight(), visibleWidth(), visibleHeight() - contentsHeight() + contentsX(), true);
} }
void GEditor::changeEvent(QEvent *e) void GEditor::changeEvent(QEvent *e)
{ {
Q3GridView::changeEvent(e); Q3ScrollView::changeEvent(e);
if (e->type() == QEvent::FontChange) if (e->type() == QEvent::FontChange)
{ {
fm = fontMetrics(); fm = fontMetrics();
@ -444,7 +451,7 @@ void GEditor::paintText(QPainter &p, GLine *l, int x, int y, int xmin, int lmax,
xd2 = x2; xd2 = x2;
if (alternate && (i == (GB.Count(l->highlight) - 1))) if (alternate && (i == (GB.Count(l->highlight) - 1)))
nx = cellWidth(); nx = _cellw;
p.fillRect(x, 0, nx - x, h, bg); p.fillRect(x, 0, nx - x, h, bg);
@ -611,7 +618,7 @@ void GEditor::paintCell(QPainter *painter, int row, int)
bool folded; bool folded;
bool highlight; bool highlight;
ur = cellGeometry(row, 0); ur = QRect(0, row * _cellh, _cellw, _cellh);
contentsToViewport(ur.x(), ur.y(), x1, y1); contentsToViewport(ur.x(), ur.y(), x1, y1);
ur.setRect(-x1, y1, ur.width(), ur.height()); ur.setRect(-x1, y1, ur.width(), ur.height());
@ -659,7 +666,7 @@ void GEditor::paintCell(QPainter *painter, int row, int)
color = calc_color(a, b, styles[GLine::Background].color); color = calc_color(a, b, styles[GLine::Background].color);
p.fillRect(0, 0, cellWidth(), cellHeight(), color); p.fillRect(0, 0, _cellw, _cellh, color);
p.setFont(font()); p.setFont(font());
//p.setFont(painter->font()); //p.setFont(painter->font());
@ -670,7 +677,7 @@ void GEditor::paintCell(QPainter *painter, int row, int)
{ {
if (getFlag(BlendedProcedureLimits)) if (getFlag(BlendedProcedureLimits))
{ {
make_blend(pattern, styles[GLine::Line].color, color, cellHeight()); make_blend(pattern, styles[GLine::Line].color, color, _cellh);
p.drawTiledPixmap(0, 0, cache->width(), cache->height(), pattern); p.drawTiledPixmap(0, 0, cache->width(), cache->height(), pattern);
} }
else else
@ -684,7 +691,7 @@ void GEditor::paintCell(QPainter *painter, int row, int)
// Show string // Show string
if (highlight && (_showRow == realRow || _showString.length())) if (highlight && (_showRow == realRow || _showString.length()))
paintShowString(p, l, margin, fm.ascent() + 1, xmin, lmax, cellHeight(), realRow); paintShowString(p, l, margin, fm.ascent() + 1, xmin, lmax, _cellh, realRow);
// Selection background // Selection background
xs1 = 0; xs1 = 0;
@ -701,11 +708,11 @@ void GEditor::paintCell(QPainter *painter, int row, int)
x1 = lineWidth(y1, x1); x1 = lineWidth(y1, x1);
if (realRow < y2) if (realRow < y2)
x2 = cellWidth() + 1; x2 = _cellw + 1;
else else
x2 = lineWidth(y2, x2); x2 = lineWidth(y2, x2);
p.fillRect(x1, 0, x2 - x1, cellHeight(), styles[GLine::Selection].color); p.fillRect(x1, 0, x2 - x1, _cellh, styles[GLine::Selection].color);
xs1 = x1; xs1 = x1;
xs2 = x2; xs2 = x2;
} }
@ -715,12 +722,12 @@ void GEditor::paintCell(QPainter *painter, int row, int)
if (margin && (margin > ur.left())) if (margin && (margin > ur.left()))
{ {
//if (!l->flag) //if (!l->flag)
// p.fillRect(0, 0, margin, cellHeight(), color); //styles[GLine::Background].color); // p.fillRect(0, 0, margin, _cellh, color); //styles[GLine::Background].color);
if (getFlag(ShowModifiedLines) && l->changed) if (getFlag(ShowModifiedLines) && l->changed)
p.fillRect(0, 0, margin - 2, cellHeight(), styles[GLine::Highlight].color); p.fillRect(0, 0, margin - 2, _cellh, styles[GLine::Highlight].color);
else //if (getFlag(ShowLineNumbers)) else //if (getFlag(ShowLineNumbers))
p.fillRect(0, 0, margin - 2, cellHeight(), styles[GLine::Line].color); p.fillRect(0, 0, margin - 2, _cellh, styles[GLine::Line].color);
//x1 = 0; //x1 = 0;
@ -740,10 +747,10 @@ void GEditor::paintCell(QPainter *painter, int row, int)
{ {
//highlight_text(p, x1m * charWidth + margin, fm.ascent(), l->s.getString().mid(x1m, 1), styles[GLine::Highlight].color); //highlight_text(p, x1m * charWidth + margin, fm.ascent(), l->s.getString().mid(x1m, 1), styles[GLine::Highlight].color);
//highlight_text(p, x2m * charWidth + margin, fm.ascent(), l->s.getString().mid(x2m, 1), styles[GLine::Highlight].color); //highlight_text(p, x2m * charWidth + margin, fm.ascent(), l->s.getString().mid(x2m, 1), styles[GLine::Highlight].color);
highlight_text(p, lineWidth(ym, x1m), fm.ascent(), lineWidth(ym, x1m + 1), cellHeight(), l->s.getString().mid(x1m, 1), styles[GLine::Highlight].color); highlight_text(p, lineWidth(ym, x1m), fm.ascent(), lineWidth(ym, x1m + 1), _cellh, l->s.getString().mid(x1m, 1), styles[GLine::Highlight].color);
highlight_text(p, lineWidth(ym, x2m), fm.ascent(), lineWidth(ym, x2m + 1), cellHeight(), l->s.getString().mid(x2m, 1), styles[GLine::Highlight].color); highlight_text(p, lineWidth(ym, x2m), fm.ascent(), lineWidth(ym, x2m + 1), _cellh, l->s.getString().mid(x2m, 1), styles[GLine::Highlight].color);
/*p.fillRect(x1m * charWidth + margin, 0, charWidth, cellHeight(), styles[GLine::Highlight].color); /*p.fillRect(x1m * charWidth + margin, 0, charWidth, _cellh, styles[GLine::Highlight].color);
p.fillRect(x2m * charWidth + margin, 0, charWidth, cellHeight(), styles[GLine::Highlight].color);*/ p.fillRect(x2m * charWidth + margin, 0, charWidth, _cellh, styles[GLine::Highlight].color);*/
} }
// Line text // Line text
@ -765,7 +772,7 @@ void GEditor::paintCell(QPainter *painter, int row, int)
}*/ }*/
else else
{ {
paintText(p, l, margin, fm.ascent() + 1, xmin, lmax, cellHeight(), xs1, xs2, realRow); paintText(p, l, margin, fm.ascent() + 1, xmin, lmax, _cellh, xs1, xs2, realRow);
} }
} }
@ -777,9 +784,9 @@ void GEditor::paintCell(QPainter *painter, int row, int)
int w; int w;
pal.setColor(QColorGroup::Foreground, styles[GLine::Normal].color); pal.setColor(QColorGroup::Foreground, styles[GLine::Normal].color);
w = qMin(cellHeight(), 12); w = qMin(_cellh, 12);
//opt.rect = QRect(margin - 12, 0, 12, 12); //opt.rect = QRect(margin - 12, 0, 12, 12);
opt.rect = QRect(margin - w, 0, w, cellHeight()); opt.rect = QRect(margin - w, 0, w, _cellh);
opt.palette = pal; opt.palette = pal;
opt.state |= QStyle::State_Enabled; opt.state |= QStyle::State_Enabled;
@ -789,28 +796,28 @@ void GEditor::paintCell(QPainter *painter, int row, int)
// Breakpoint symbol // Breakpoint symbol
if ((l->flag & (1 << GLine::BreakpointFlag)) && breakpoint && !breakpoint->isNull()) if ((l->flag & (1 << GLine::BreakpointFlag)) && breakpoint && !breakpoint->isNull())
{ {
//p.fillRect(margin - 10, 0, 8, cellHeight(), styles[GLine::Breakpoint].color); //p.fillRect(margin - 10, 0, 8, _cellh, styles[GLine::Breakpoint].color);
//updateBreakpoint(styles[GLine::Background].color.rgb(), styles[GLine::Breakpoint].color.rgb()); //updateBreakpoint(styles[GLine::Background].color.rgb(), styles[GLine::Breakpoint].color.rgb());
p.drawPixmap(margin - (cellHeight() + breakpoint->width()) / 2, (cellHeight() - breakpoint->height()) / 2, *breakpoint); p.drawPixmap(margin - (_cellh + breakpoint->width()) / 2, (_cellh - breakpoint->height()) / 2, *breakpoint);
} }
// Text cursor // Text cursor
if (cursor && realRow == y) if (cursor && realRow == y)
//p.fillRect(QMIN((int)l->s.length(), x) * charWidth + margin, 0, 1, cellHeight(), styles[GLine::Normal].color); //p.fillRect(QMIN((int)l->s.length(), x) * charWidth + margin, 0, 1, _cellh, styles[GLine::Normal].color);
p.fillRect(lineWidth(realRow, QMIN((int)l->s.length(), x)), 0, 1, cellHeight(), styles[GLine::Normal].color); p.fillRect(lineWidth(realRow, QMIN((int)l->s.length(), x)), 0, 1, _cellh, styles[GLine::Normal].color);
// Flash // Flash
if (flashed) if (flashed)
{ {
//p.setCompositionMode(QPainter::CompositionMode_Xor); //p.setCompositionMode(QPainter::CompositionMode_Xor);
p.fillRect(0, 0, visibleWidth(), cellHeight(), Qt::black); p.fillRect(0, 0, visibleWidth(), _cellh, Qt::black);
} }
p.end(); p.end();
//if (cache->width() < visibleWidth()) //if (cache->width() < visibleWidth())
// qDebug("cache->width() = %d < visibleWidth() = %d", cache->width(), visibleWidth()); // qDebug("cache->width() = %d < visibleWidth() = %d", cache->width(), visibleWidth());
painter->drawPixmap(ur.left(), 0, *cache, 0, 0, cellWidth(), cellHeight()); painter->drawPixmap(ur.left(), 0, *cache, 0, 0, _cellw, _cellh);
} }
@ -1095,13 +1102,13 @@ void GEditor::cursorEnd(bool shift, bool ctrl)
void GEditor::cursorPageUp(bool mark) void GEditor::cursorPageUp(bool mark)
{ {
int page = visibleHeight() / cellHeight(); int page = visibleHeight() / _cellh;
cursorGoto(viewToReal(realToView(y) - page), 0, mark); cursorGoto(viewToReal(realToView(y) - page), 0, mark);
} }
void GEditor::cursorPageDown(bool mark) void GEditor::cursorPageDown(bool mark)
{ {
int page = visibleHeight() / cellHeight(); int page = visibleHeight() / _cellh;
cursorGoto(viewToReal(realToView(y) + page), 0, mark); cursorGoto(viewToReal(realToView(y) + page), 0, mark);
} }
@ -1506,7 +1513,7 @@ void GEditor::cursorToPos(int y, int x, int *px, int *py)
y = realToView(y); y = realToView(y);
npy = y * cellHeight() - contentsY(); npy = y * _cellh - contentsY();
//npx = x * charWidth - contentsX() + margin; //npx = x * charWidth - contentsX() + margin;
npx = lineWidth(y, x) - contentsX(); npx = lineWidth(y, x) - contentsX();
@ -1635,9 +1642,10 @@ void GEditor::mouseReleaseEvent(QMouseEvent *e)
void GEditor::resizeEvent(QResizeEvent *e) void GEditor::resizeEvent(QResizeEvent *e)
{ {
Q3GridView::resizeEvent(e); Q3ScrollView::resizeEvent(e);
baptizeVisible(); baptizeVisible();
updateWidth(); updateWidth();
//updateViewport();
} }
bool GEditor::isCursorVisible() bool GEditor::isCursorVisible()
@ -1646,7 +1654,7 @@ bool GEditor::isCursorVisible()
cursorToPos(y, x, &px, &py); cursorToPos(y, x, &px, &py);
return !(px < margin || px >= (visibleWidth() - 2) || py < 0 || py >= (visibleHeight() - cellHeight() - 1)); return !(px < margin || px >= (visibleWidth() - 2) || py < 0 || py >= (visibleHeight() - _cellh - 1));
} }
void GEditor::ensureCursorVisible() void GEditor::ensureCursorVisible()
@ -1661,11 +1669,11 @@ void GEditor::ensureCursorVisible()
yy = realToView(y); yy = realToView(y);
if (center) if (center)
//ensureVisible(x * charWidth, y * cellHeight() + cellHeight() / 2, margin + 2, visibleHeight() / 2); //ensureVisible(x * charWidth, y * _cellh + _cellh / 2, margin + 2, visibleHeight() / 2);
ensureVisible(lineWidth(y, x) + getCharWidth() / 2, yy * cellHeight() + cellHeight() / 2, margin + 2, visibleHeight() / 2); ensureVisible(lineWidth(y, x) + getCharWidth() / 2, yy * _cellh + _cellh / 2, margin + 2, visibleHeight() / 2);
else else
//ensureVisible(x * charWidth, y * cellHeight() + cellHeight() / 2, margin + 2, cellHeight()); //ensureVisible(x * charWidth, y * _cellh + _cellh / 2, margin + 2, _cellh);
ensureVisible(lineWidth(y, x) + getCharWidth() / 2, yy * cellHeight() + cellHeight() / 2, margin + 2, cellHeight()); ensureVisible(lineWidth(y, x) + getCharWidth() / 2, yy * _cellh + _cellh / 2, margin + 2, _cellh);
} }
center = false; center = false;
} }
@ -1698,13 +1706,13 @@ void GEditor::focusInEvent(QFocusEvent *e)
{ {
startBlink(); startBlink();
//ensureCursorVisible(); //ensureCursorVisible();
Q3GridView::focusInEvent(e); Q3ScrollView::focusInEvent(e);
} }
void GEditor::focusOutEvent(QFocusEvent *e) void GEditor::focusOutEvent(QFocusEvent *e)
{ {
stopBlink(); stopBlink();
Q3GridView::focusOutEvent(e); Q3ScrollView::focusOutEvent(e);
} }
@ -1735,11 +1743,12 @@ void GEditor::setStyle(int index, GHighlightStyle *style)
void GEditor::setNumRows(int n) void GEditor::setNumRows(int n)
{ {
n = realToView(n - 1) + 1; _nrows = realToView(n - 1) + 1;
Q3GridView::setNumRows(n); //Q3GridView::setNumRows(n);
Q3GridView::updateScrollBars(); updateViewport();
if (contentsHeight() < visibleHeight()) //Q3ScrollView::updateScrollBars();
repaintContents(contentsX(), contentsHeight(), visibleWidth(), visibleHeight() - contentsHeight() + contentsX(), true); //if (contentsHeight() < visibleHeight())
// repaintContents(contentsX(), contentsHeight(), visibleWidth(), visibleHeight() - contentsHeight() + contentsX(), true);
//if (contentsHeight() < visibleHeight()) //if (contentsHeight() < visibleHeight())
//repaintContents(true); //repaintContents(true);
} }
@ -1918,7 +1927,7 @@ QVariant GEditor::inputMethodQuery(Qt::InputMethodQuery property) const
getCursor(&cy, &cx); getCursor(&cy, &cx);
that->cursorToPos(cy, cx, &px, &py); that->cursorToPos(cy, cx, &px, &py);
return QRect(px, py, 1, cellHeight()); return QRect(px, py, 1, _cellh);
} }
case Qt::ImFont: case Qt::ImFont:
return font(); return font();
@ -2050,7 +2059,7 @@ void GEditor::foldLine(int row, bool no_refresh)
end--; end--;
l = doc->lines.at(end); l = doc->lines.at(end);
//qDebug("[%d] state = %d %d", end, l->highlight ? l->highlight[0].state : -1, l->highlight ? l->highlight[0].len : -1); //qDebug("[%d] state = %d %d", end, l->highlight ? l->highlight[0].state : -1, l->highlight ? l->highlight[0].len : -1);
if (!l->highlight || l->highlight[0].state != GLine::Comment) if (!l->highlight || (l->highlight[0].state != GLine::Comment && l->highlight[0].state != GLine::Help))
break; break;
} }
} }
@ -2083,7 +2092,7 @@ void GEditor::foldLine(int row, bool no_refresh)
if (!no_refresh) if (!no_refresh)
{ {
setNumRows(numLines()); setNumRows(numLines());
redrawContents(); //redrawContents();
} }
} }
@ -2102,7 +2111,7 @@ void GEditor::unfoldLine(int row)
fold.remove(i); fold.remove(i);
//dump_fold(fold); //dump_fold(fold);
setNumRows(numLines()); setNumRows(numLines());
redrawContents(); //redrawContents();
return; return;
} }
} }
@ -2215,7 +2224,7 @@ void GEditor::foldAll()
} }
setNumRows(numLines()); setNumRows(numLines());
updateContents(); //updateContents();
} }
void GEditor::unfoldAll() void GEditor::unfoldAll()
@ -2223,7 +2232,7 @@ void GEditor::unfoldAll()
foldClear(); foldClear();
setNumRows(numLines()); setNumRows(numLines());
ensureCursorVisible(); ensureCursorVisible();
redrawContents(); //redrawContents();
} }
@ -2305,36 +2314,69 @@ void GEditor::showWord(int y, int x, int len)
void GEditor::updateLine(int y) void GEditor::updateLine(int y)
{ {
QRect r(0, realToView(y) * cellHeight(), cellWidth(), cellHeight()); QRect r(0, realToView(y) * _cellh, _cellw, _cellh);
updateContents(r); updateContents(r);
} }
void GEditor::paintEmptyArea(QPainter *p, int cx, int cy, int cw, int ch)
{
if ((_nrows * _cellh) >= contentsHeight())
return;
contentsToViewport(cx, cy, cx, cy);
QRegion reg(QRect(cx, cy, cw, ch));
QSize size(_cellw, _nrows * _cellh);
reg = reg.subtracted(QRect(contentsToViewport(QPoint(0, 0)), size));
// And draw the rectangles (transformed as needed)
QVector<QRect> r = reg.rects();
for (int i = 0; i < (int)r.count(); ++i)
p->fillRect(r[i], viewport()->paletteBackgroundColor());
}
void GEditor::drawContents(QPainter *p, int cx, int cy, int cw, int ch) void GEditor::drawContents(QPainter *p, int cx, int cy, int cw, int ch)
{ {
int colfirst = columnAt(cx);
int rowfirst = rowAt(cy); int rowfirst = rowAt(cy);
int rowlast = rowAt(cy + ch - 1); int rowlast = rowAt(cy + ch - 1);
if (rowfirst == -1 || colfirst == -1) if (rowfirst < 0)
{ rowfirst = 0;
paintEmptyArea(p, cx, cy, cw, ch); if (rowlast >= _nrows)
return; rowlast = _nrows - 1;
}
if (rowlast < 0 || rowlast >= numLines())
rowlast = numLines() - 1;
// Go through the rows // Go through the rows
for (int r = rowfirst; r <= rowlast; ++r) for (int r = rowfirst; r <= rowlast; ++r)
{ {
// get row position and height // get row position and height
int rowp = r * cellHeight(); int rowp = r * _cellh;
// Translate painter and draw the cell // Translate painter and draw the cell
p->translate(0, rowp); p->translate(0, rowp);
paintCell(p, r, 0); paintCell(p, r, 0);
p->translate(0, -rowp); p->translate(0, -rowp);
} }
// Paint empty rects
paintEmptyArea(p, cx, cy, cw, ch); paintEmptyArea(p, cx, cy, cw, ch);
} }
void GEditor::updateViewport()
{
int vw, vh;
vw = contentsRect().width();
vh = contentsRect().height();
if (doc)
{
vw = QMAX(_cellw, vw);
vh = QMAX(_cellh * _nrows, vh);
//qDebug("updateViewport: h = %d vh = %d", _cellh * numLines(), contentsRect().height());
}
if (vw != contentsWidth() || vh != contentsHeight())
Q3ScrollView::resizeContents(vw, vh);
}
void GEditor::resizeContents(int w, int h)
{
updateViewport();
}

View File

@ -26,7 +26,7 @@
#include <qstring.h> #include <qstring.h>
#include <qcolor.h> #include <qcolor.h>
#include <qpixmap.h> #include <qpixmap.h>
#include <q3gridview.h> #include <q3scrollview.h>
#include <qtimer.h> #include <qtimer.h>
//Added by qt3to4: //Added by qt3to4:
#include <QResizeEvent> #include <QResizeEvent>
@ -55,7 +55,7 @@ struct GFoldedProc
int end; int end;
}; };
class GEditor : public Q3GridView class GEditor : public Q3ScrollView
{ {
Q_OBJECT Q_OBJECT
@ -85,6 +85,8 @@ private:
bool _showStringIgnoreCase; bool _showStringIgnoreCase;
int _showRow, _showCol, _showLen; int _showRow, _showCol, _showLen;
bool _posOutside; bool _posOutside;
int _cellw, _cellh;
int _nrows;
int lastx; int lastx;
bool left; bool left;
@ -119,6 +121,7 @@ private:
void paintText(QPainter &p, GLine *l, int x, int y, int xmin, int lmax, int h, int x1, int x2, int row); void paintText(QPainter &p, GLine *l, int x, int y, int xmin, int lmax, int h, int x1, int x2, int row);
void paintShowString(QPainter &p, GLine *l, int x, int y, int xmin, int lmax, int h, int row); void paintShowString(QPainter &p, GLine *l, int x, int y, int xmin, int lmax, int h, int row);
void paintDottedSpaces(QPainter &p, int row, int ps, int ls); void paintDottedSpaces(QPainter &p, int row, int ps, int ls);
void paintEmptyArea(QPainter *p, int cx, int cy, int cw, int ch);
void docTextChanged(); void docTextChanged();
void redrawContents(); void redrawContents();
@ -129,6 +132,8 @@ private:
bool isCursorVisible(); bool isCursorVisible();
void clearLineWidthCache() { lineWidthCache.clear(); lineWidthCacheY = -1; } void clearLineWidthCache() { lineWidthCache.clear(); lineWidthCacheY = -1; }
void updateViewport();
//static void updateBreakpoint(uint bg, uint fg); //static void updateBreakpoint(uint bg, uint fg);
private slots: private slots:
@ -211,7 +216,8 @@ public:
bool getFlag(int f) const { return flags & (1 << f); } bool getFlag(int f) const { return flags & (1 << f); }
void setFlag(int f, bool v); void setFlag(int f, bool v);
int getLineHeight() const { return cellHeight(); } int rowAt(int y) const { return y / _cellh; }
int getLineHeight() const { return _cellh; }
int getCharWidth() const; int getCharWidth() const;
void cursorToPos(int y, int x, int *px, int *py); void cursorToPos(int y, int x, int *px, int *py);
bool isPosOutside() const { return _posOutside; } bool isPosOutside() const { return _posOutside; }
@ -221,9 +227,10 @@ public:
int lastVisibleRow(int y) const { return rowAt(y + visibleHeight() - 1); } int lastVisibleRow(int y) const { return rowAt(y + visibleHeight() - 1); }
int lastVisibleRow() const { return lastVisibleRow(contentsY()); } int lastVisibleRow() const { return lastVisibleRow(contentsY()); }
void updateLine(int y); void updateLine(int y);
void setNumRows(int);
virtual void setNumRows(int);
virtual void resizeContents(int w, int h);
void checkMatching(); void checkMatching();
void flash(); void flash();
void showString(GString s, bool ignoreCase); void showString(GString s, bool ignoreCase);

View File

@ -144,6 +144,7 @@ static int convState(int state)
case EVAL_TYPE_DATATYPE: return HIGHLIGHT_DATATYPE; case EVAL_TYPE_DATATYPE: return HIGHLIGHT_DATATYPE;
case EVAL_TYPE_ERROR: return HIGHLIGHT_ERROR; case EVAL_TYPE_ERROR: return HIGHLIGHT_ERROR;
case EVAL_TYPE_ALTERNATE: return HIGHLIGHT_ALTERNATE; case EVAL_TYPE_ALTERNATE: return HIGHLIGHT_ALTERNATE;
case EVAL_TYPE_HELP: return HIGHLIGHT_HELP;
default: return HIGHLIGHT_NORMAL; default: return HIGHLIGHT_NORMAL;
} }
} }
@ -290,6 +291,7 @@ GB_DESC CHighlightDesc[] =
GB_CONSTANT("CurrentLine", "i", HIGHLIGHT_LINE), GB_CONSTANT("CurrentLine", "i", HIGHLIGHT_LINE),
GB_CONSTANT("Error", "i", HIGHLIGHT_ERROR), GB_CONSTANT("Error", "i", HIGHLIGHT_ERROR),
GB_CONSTANT("Alternate", "i", HIGHLIGHT_ALTERNATE), GB_CONSTANT("Alternate", "i", HIGHLIGHT_ALTERNATE),
GB_CONSTANT("Help", "i", HIGHLIGHT_HELP),
GB_STATIC_METHOD("_exit", NULL, CHIGHLIGHT_exit, NULL), GB_STATIC_METHOD("_exit", NULL, CHIGHLIGHT_exit, NULL),
GB_STATIC_METHOD("Analyze", "String[]", CHIGHLIGHT_analyze, "(Code)s[(Rewrite)b(State)i]"), GB_STATIC_METHOD("Analyze", "String[]", CHIGHLIGHT_analyze, "(Code)s[(Rewrite)b(State)i]"),

View File

@ -309,6 +309,8 @@ static void analyze(EVAL_ANALYZE *result)
case EVAL_TYPE_COMMENT: case EVAL_TYPE_COMMENT:
//state = Commentary; //state = Commentary;
space_before = *symbol != ' '; space_before = *symbol != ' ';
if (len >= 2 && symbol[1] == '\'')
type = EVAL_TYPE_HELP;
break; break;
case EVAL_TYPE_OPERATOR: case EVAL_TYPE_OPERATOR:

View File

@ -33,13 +33,13 @@ typedef
typedef typedef
void *EVAL_EXPRESSION; void *EVAL_EXPRESSION;
#define EVAL_COLOR_MAX_LEN (1 << 11) #define EVAL_COLOR_MAX_LEN (1 << 10)
typedef typedef
struct { struct {
unsigned state : 4; unsigned state : 5;
unsigned alternate : 1; unsigned alternate : 1;
unsigned len : 11; unsigned len : 10;
} }
EVAL_COLOR; EVAL_COLOR;
@ -75,7 +75,8 @@ enum {
EVAL_TYPE_OPERATOR = 11, EVAL_TYPE_OPERATOR = 11,
EVAL_TYPE_DATATYPE = 12, EVAL_TYPE_DATATYPE = 12,
EVAL_TYPE_ERROR = 13, EVAL_TYPE_ERROR = 13,
EVAL_TYPE_ALTERNATE = 14 EVAL_TYPE_ALTERNATE = 14,
EVAL_TYPE_HELP = 15
}; };
typedef typedef
@ -98,6 +99,7 @@ typedef
HIGHLIGHT_LINE, HIGHLIGHT_LINE,
HIGHLIGHT_ERROR, HIGHLIGHT_ERROR,
HIGHLIGHT_ALTERNATE, HIGHLIGHT_ALTERNATE,
HIGHLIGHT_HELP,
HIGHLIGHT_NUM_COLOR HIGHLIGHT_NUM_COLOR
} }
HIGHLIGHT_COLOR; HIGHLIGHT_COLOR;