Changeset 97
- Timestamp:
- Aug 2, 2018, 3:33:02 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormAbout.lfm
r96 r97 1 1 object FormAbout: TFormAbout 2 Left = 5622 Left = 656 3 3 Height = 301 4 Top = 2774 Top = 379 5 5 Width = 515 6 6 Caption = 'About' -
trunk/Forms/UFormMain.pas
r96 r97 202 202 DockInit; 203 203 Core.PersistentForm1.Load(Self, True); 204 Core.ThemeManager.UseTheme(Self) 204 Core.ThemeManager.UseTheme(Self); 205 FormSourceCode.UpdateTheme; 205 206 end; 206 207 end; … … 249 250 if Core.Project.Openned then 250 251 raise Exception.Create(SCloseProjectFirst); 251 FormSourceCode. MemoSource.Lines.LoadFromFile(FileName);252 FormSourceCode.SynEdit1.Lines.LoadFromFile(FileName); 252 253 Core.LastOpenedList.AddItem(FileName); 253 254 Core.Project.FileName := FileName; … … 343 344 Caption := Title; 344 345 AProjectSave.Enabled := Core.Project.Modified; 345 FormSourceCode. MemoSource.Enabled := Core.Project.Openned;346 FormSourceCode.SynEdit1.Enabled := Core.Project.Openned; 346 347 AProjectClose.Enabled := Core.Project.Openned; 347 348 AProjectSaveAs.Enabled := Core.Project.Openned; … … 371 372 procedure TFormMain.UpdateStatusBar; 372 373 begin 373 StatusBarMain.Panels[0].Text := IntToStr(FormSourceCode. MemoSource.CaretPos.X) +374 ', ' + IntToStr(FormSourceCode. MemoSource.CaretPos.Y);374 StatusBarMain.Panels[0].Text := IntToStr(FormSourceCode.SynEdit1.CaretXY.X) + 375 ', ' + IntToStr(FormSourceCode.SynEdit1.CaretXY.Y); 375 376 end; 376 377 … … 418 419 DebugStep := Core.CurrentTarget.DebugSteps.SearchByTargetPos(FormTargetCode.MemoTarget.SelStart); 419 420 if Assigned(DebugStep) then begin 420 FormSourceCode. MemoSource.SelStart := DebugStep.SourcePosition;421 FormSourceCode.SynEdit1.SelStart := DebugStep.SourcePosition; 421 422 PageControlMain.TabIndex := 0; 422 423 end; … … 427 428 DebugStep: TDebugStep; 428 429 begin 429 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode. MemoSource.SelStart);430 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.SynEdit1.SelStart); 430 431 if Assigned(DebugStep) then begin 431 432 FormTargetCode.MemoTarget.SelStart := DebugStep.TargetPosition; … … 484 485 end; 485 486 Core.ThemeManager.UseTheme(Self); 487 FormSourceCode.UpdateTheme; 486 488 end; 487 489 finally … … 495 497 try 496 498 AProgramStop.Execute; 497 SourceCode := FormSourceCode. MemoSource.Text;499 SourceCode := FormSourceCode.SynEdit1.Text; 498 500 ProjectFileName := Core.Project.FileName; 499 501 ProgramName := ExtractFileNameOnly(Core.Project.FileName); … … 517 519 BreakPoint: TBreakPoint; 518 520 begin 519 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode. MemoSource.SelStart);521 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.SynEdit1.SelStart); 520 522 if Assigned(DebugStep) then begin 521 523 BreakPoint := Core.CurrentTarget.BreakPoints.SearchByTargetPos(DebugStep.TargetPosition); … … 550 552 if Core.CurrentTarget.State = rsStopped then begin 551 553 if not Core.CurrentTarget.Compiled then AProgramCompile.Execute; 552 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode. MemoSource.SelStart);554 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.SynEdit1.SelStart); 553 555 Core.CurrentTarget.BreakPoints.SetSystem(DebugStep.TargetPosition); 554 556 AProgramRun.Execute; 555 557 end else begin 556 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode. MemoSource.SelStart);558 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.SynEdit1.SelStart); 557 559 Core.CurrentTarget.RunToCursor(DebugStep.TargetPosition); 558 560 end; … … 564 566 begin 565 567 DebugStep := Core.CurrentTarget.DebugSteps.SearchByTargetPos(Core.CurrentTarget.ExecutionPosition); 566 FormSourceCode. MemoSource.SelStart := DebugStep.SourcePosition;568 FormSourceCode.SynEdit1.SelStart := DebugStep.SourcePosition; 567 569 FormTargetCode.MemoTarget.SelStart := DebugStep.TargetPosition; 568 if PageControlMain.TabIndex = 0 then FormSourceCode. MemoSource.SetFocus;570 if PageControlMain.TabIndex = 0 then FormSourceCode.SynEdit1.SetFocus; 569 571 if PageControlMain.TabIndex = 1 then FormTargetCode.MemoTarget.SetFocus; 570 572 end; … … 612 614 AProgramStop.Execute; 613 615 Core.Project.Openned := False; 614 FormSourceCode. MemoSource.Clear;616 FormSourceCode.SynEdit1.Clear; 615 617 UpdateInterface; 616 618 end; … … 622 624 if Core.Project.Openned then Exit; 623 625 Core.Project.FileName := 'Examples' + DirectorySeparator + SNewProject + '.b'; 624 FormSourceCode. MemoSource.Clear;626 FormSourceCode.SynEdit1.Clear; 625 627 Core.Project.Openned := True; 626 628 Core.CurrentTarget.Compiled := False; … … 652 654 SaveDialog1.FileName := Core.Project.FileName; 653 655 if SaveDialog1.Execute then begin 654 FormSourceCode. MemoSource.Lines.SaveToFile(SaveDialog1.FileName);656 FormSourceCode.SynEdit1.Lines.SaveToFile(SaveDialog1.FileName); 655 657 Core.Project.FileName := SaveDialog1.FileName; 656 658 Core.LastOpenedList.AddItem(SaveDialog1.FileName); … … 663 665 begin 664 666 if Core.Project.Modified and FileExistsUTF8(Core.Project.FileName) then begin 665 FormSourceCode. MemoSource.Lines.SaveToFile(Core.Project.FileName);667 FormSourceCode.SynEdit1.Lines.SaveToFile(Core.Project.FileName); 666 668 Core.Project.Modified := False; 667 669 UpdateInterface; -
trunk/Forms/UFormSourceCode.lfm
r88 r97 1 1 object FormSourceCode: TFormSourceCode 2 Left = 6273 Height = 2404 Top = 1825 Width = 3202 Left = 459 3 Height = 491 4 Top = 278 5 Width = 560 6 6 Caption = 'Source code' 7 ClientHeight = 240 8 ClientWidth = 320 9 LCLVersion = '1.6.4.0' 10 object MemoSource: TMemo 7 ClientHeight = 491 8 ClientWidth = 560 9 DesignTimePPI = 120 10 OnCreate = FormCreate 11 LCLVersion = '1.8.2.0' 12 inline SynEdit1: TSynEdit 11 13 Left = 0 12 Height = 24014 Height = 491 13 15 Top = 0 14 Width = 32016 Width = 560 15 17 Align = alClient 16 Font.Height = -1 218 Font.Height = -13 17 19 Font.Name = 'Courier New' 18 OnChange = MemoSourceChange 20 Font.Pitch = fpFixed 21 Font.Quality = fqNonAntialiased 22 ParentColor = False 23 ParentFont = False 24 PopupMenu = PopupMenuSource 25 TabOrder = 0 19 26 OnKeyDown = MemoSourceKeyDown 20 27 OnKeyPress = MemoSourceKeyPress 21 28 OnKeyUp = MemoSourceKeyUp 22 29 OnMouseDown = MemoSourceMouseDown 23 ParentFont = False 24 PopupMenu = PopupMenuSource 25 ScrollBars = ssAutoBoth 26 TabOrder = 0 30 Gutter.Width = 59 31 Gutter.MouseActions = <> 32 RightGutter.Width = 0 33 RightGutter.MouseActions = <> 34 Keystrokes = < 35 item 36 Command = ecUp 37 ShortCut = 38 38 end 39 item 40 Command = ecSelUp 41 ShortCut = 8230 42 end 43 item 44 Command = ecScrollUp 45 ShortCut = 16422 46 end 47 item 48 Command = ecDown 49 ShortCut = 40 50 end 51 item 52 Command = ecSelDown 53 ShortCut = 8232 54 end 55 item 56 Command = ecScrollDown 57 ShortCut = 16424 58 end 59 item 60 Command = ecLeft 61 ShortCut = 37 62 end 63 item 64 Command = ecSelLeft 65 ShortCut = 8229 66 end 67 item 68 Command = ecWordLeft 69 ShortCut = 16421 70 end 71 item 72 Command = ecSelWordLeft 73 ShortCut = 24613 74 end 75 item 76 Command = ecRight 77 ShortCut = 39 78 end 79 item 80 Command = ecSelRight 81 ShortCut = 8231 82 end 83 item 84 Command = ecWordRight 85 ShortCut = 16423 86 end 87 item 88 Command = ecSelWordRight 89 ShortCut = 24615 90 end 91 item 92 Command = ecPageDown 93 ShortCut = 34 94 end 95 item 96 Command = ecSelPageDown 97 ShortCut = 8226 98 end 99 item 100 Command = ecPageBottom 101 ShortCut = 16418 102 end 103 item 104 Command = ecSelPageBottom 105 ShortCut = 24610 106 end 107 item 108 Command = ecPageUp 109 ShortCut = 33 110 end 111 item 112 Command = ecSelPageUp 113 ShortCut = 8225 114 end 115 item 116 Command = ecPageTop 117 ShortCut = 16417 118 end 119 item 120 Command = ecSelPageTop 121 ShortCut = 24609 122 end 123 item 124 Command = ecLineStart 125 ShortCut = 36 126 end 127 item 128 Command = ecSelLineStart 129 ShortCut = 8228 130 end 131 item 132 Command = ecEditorTop 133 ShortCut = 16420 134 end 135 item 136 Command = ecSelEditorTop 137 ShortCut = 24612 138 end 139 item 140 Command = ecLineEnd 141 ShortCut = 35 142 end 143 item 144 Command = ecSelLineEnd 145 ShortCut = 8227 146 end 147 item 148 Command = ecEditorBottom 149 ShortCut = 16419 150 end 151 item 152 Command = ecSelEditorBottom 153 ShortCut = 24611 154 end 155 item 156 Command = ecToggleMode 157 ShortCut = 45 158 end 159 item 160 Command = ecCopy 161 ShortCut = 16429 162 end 163 item 164 Command = ecPaste 165 ShortCut = 8237 166 end 167 item 168 Command = ecDeleteChar 169 ShortCut = 46 170 end 171 item 172 Command = ecCut 173 ShortCut = 8238 174 end 175 item 176 Command = ecDeleteLastChar 177 ShortCut = 8 178 end 179 item 180 Command = ecDeleteLastChar 181 ShortCut = 8200 182 end 183 item 184 Command = ecDeleteLastWord 185 ShortCut = 16392 186 end 187 item 188 Command = ecUndo 189 ShortCut = 32776 190 end 191 item 192 Command = ecRedo 193 ShortCut = 40968 194 end 195 item 196 Command = ecLineBreak 197 ShortCut = 13 198 end 199 item 200 Command = ecSelectAll 201 ShortCut = 16449 202 end 203 item 204 Command = ecCopy 205 ShortCut = 16451 206 end 207 item 208 Command = ecBlockIndent 209 ShortCut = 24649 210 end 211 item 212 Command = ecLineBreak 213 ShortCut = 16461 214 end 215 item 216 Command = ecInsertLine 217 ShortCut = 16462 218 end 219 item 220 Command = ecDeleteWord 221 ShortCut = 16468 222 end 223 item 224 Command = ecBlockUnindent 225 ShortCut = 24661 226 end 227 item 228 Command = ecPaste 229 ShortCut = 16470 230 end 231 item 232 Command = ecCut 233 ShortCut = 16472 234 end 235 item 236 Command = ecDeleteLine 237 ShortCut = 16473 238 end 239 item 240 Command = ecDeleteEOL 241 ShortCut = 24665 242 end 243 item 244 Command = ecUndo 245 ShortCut = 16474 246 end 247 item 248 Command = ecRedo 249 ShortCut = 24666 250 end 251 item 252 Command = ecGotoMarker0 253 ShortCut = 16432 254 end 255 item 256 Command = ecGotoMarker1 257 ShortCut = 16433 258 end 259 item 260 Command = ecGotoMarker2 261 ShortCut = 16434 262 end 263 item 264 Command = ecGotoMarker3 265 ShortCut = 16435 266 end 267 item 268 Command = ecGotoMarker4 269 ShortCut = 16436 270 end 271 item 272 Command = ecGotoMarker5 273 ShortCut = 16437 274 end 275 item 276 Command = ecGotoMarker6 277 ShortCut = 16438 278 end 279 item 280 Command = ecGotoMarker7 281 ShortCut = 16439 282 end 283 item 284 Command = ecGotoMarker8 285 ShortCut = 16440 286 end 287 item 288 Command = ecGotoMarker9 289 ShortCut = 16441 290 end 291 item 292 Command = ecSetMarker0 293 ShortCut = 24624 294 end 295 item 296 Command = ecSetMarker1 297 ShortCut = 24625 298 end 299 item 300 Command = ecSetMarker2 301 ShortCut = 24626 302 end 303 item 304 Command = ecSetMarker3 305 ShortCut = 24627 306 end 307 item 308 Command = ecSetMarker4 309 ShortCut = 24628 310 end 311 item 312 Command = ecSetMarker5 313 ShortCut = 24629 314 end 315 item 316 Command = ecSetMarker6 317 ShortCut = 24630 318 end 319 item 320 Command = ecSetMarker7 321 ShortCut = 24631 322 end 323 item 324 Command = ecSetMarker8 325 ShortCut = 24632 326 end 327 item 328 Command = ecSetMarker9 329 ShortCut = 24633 330 end 331 item 332 Command = EcFoldLevel1 333 ShortCut = 41009 334 end 335 item 336 Command = EcFoldLevel2 337 ShortCut = 41010 338 end 339 item 340 Command = EcFoldLevel3 341 ShortCut = 41011 342 end 343 item 344 Command = EcFoldLevel4 345 ShortCut = 41012 346 end 347 item 348 Command = EcFoldLevel5 349 ShortCut = 41013 350 end 351 item 352 Command = EcFoldLevel6 353 ShortCut = 41014 354 end 355 item 356 Command = EcFoldLevel7 357 ShortCut = 41015 358 end 359 item 360 Command = EcFoldLevel8 361 ShortCut = 41016 362 end 363 item 364 Command = EcFoldLevel9 365 ShortCut = 41017 366 end 367 item 368 Command = EcFoldLevel0 369 ShortCut = 41008 370 end 371 item 372 Command = EcFoldCurrent 373 ShortCut = 41005 374 end 375 item 376 Command = EcUnFoldCurrent 377 ShortCut = 41003 378 end 379 item 380 Command = EcToggleMarkupWord 381 ShortCut = 32845 382 end 383 item 384 Command = ecNormalSelect 385 ShortCut = 24654 386 end 387 item 388 Command = ecColumnSelect 389 ShortCut = 24643 390 end 391 item 392 Command = ecLineSelect 393 ShortCut = 24652 394 end 395 item 396 Command = ecTab 397 ShortCut = 9 398 end 399 item 400 Command = ecShiftTab 401 ShortCut = 8201 402 end 403 item 404 Command = ecMatchBracket 405 ShortCut = 24642 406 end 407 item 408 Command = ecColSelUp 409 ShortCut = 40998 410 end 411 item 412 Command = ecColSelDown 413 ShortCut = 41000 414 end 415 item 416 Command = ecColSelLeft 417 ShortCut = 40997 418 end 419 item 420 Command = ecColSelRight 421 ShortCut = 40999 422 end 423 item 424 Command = ecColSelPageDown 425 ShortCut = 40994 426 end 427 item 428 Command = ecColSelPageBottom 429 ShortCut = 57378 430 end 431 item 432 Command = ecColSelPageUp 433 ShortCut = 40993 434 end 435 item 436 Command = ecColSelPageTop 437 ShortCut = 57377 438 end 439 item 440 Command = ecColSelLineStart 441 ShortCut = 40996 442 end 443 item 444 Command = ecColSelLineEnd 445 ShortCut = 40995 446 end 447 item 448 Command = ecColSelEditorTop 449 ShortCut = 57380 450 end 451 item 452 Command = ecColSelEditorBottom 453 ShortCut = 57379 454 end> 455 MouseActions = <> 456 MouseTextActions = <> 457 MouseSelActions = <> 458 VisibleSpecialChars = [vscSpace, vscTabAtLast] 459 SelectedColor.BackPriority = 50 460 SelectedColor.ForePriority = 50 461 SelectedColor.FramePriority = 50 462 SelectedColor.BoldPriority = 50 463 SelectedColor.ItalicPriority = 50 464 SelectedColor.UnderlinePriority = 50 465 SelectedColor.StrikeOutPriority = 50 466 BracketHighlightStyle = sbhsBoth 467 BracketMatchColor.Background = clNone 468 BracketMatchColor.Foreground = clNone 469 BracketMatchColor.Style = [fsBold] 470 FoldedCodeColor.Background = clNone 471 FoldedCodeColor.Foreground = clGray 472 FoldedCodeColor.FrameColor = clGray 473 MouseLinkColor.Background = clNone 474 MouseLinkColor.Foreground = clBlue 475 LineHighlightColor.Background = clNone 476 LineHighlightColor.Foreground = clNone 477 OnChange = MemoSourceChange 478 inline SynLeftGutterPartList1: TSynGutterPartList 479 object SynGutterMarks1: TSynGutterMarks 480 Width = 24 481 MouseActions = <> 482 end 483 object SynGutterLineNumber1: TSynGutterLineNumber 484 Width = 17 485 MouseActions = <> 486 MarkupInfo.Background = clBtnFace 487 MarkupInfo.Foreground = clNone 488 DigitCount = 2 489 ShowOnlyLineNumbersMultiplesOf = 1 490 ZeroStart = False 491 LeadingZeros = False 492 end 493 object SynGutterChanges1: TSynGutterChanges 494 Width = 4 495 MouseActions = <> 496 ModifiedColor = 59900 497 SavedColor = clGreen 498 end 499 object SynGutterSeparator1: TSynGutterSeparator 500 Width = 2 501 MouseActions = <> 502 MarkupInfo.Background = clWhite 503 MarkupInfo.Foreground = clGray 504 end 505 object SynGutterCodeFolding1: TSynGutterCodeFolding 506 AutoSize = False 507 Width = 12 508 MouseActions = <> 509 MarkupInfo.Background = clNone 510 MarkupInfo.Foreground = clGray 511 MouseActionsExpanded = <> 512 MouseActionsCollapsed = <> 513 end 514 end 27 515 end 28 516 object PopupMenuSource: TPopupMenu 29 517 Images = Core.ImageListMain 30 518 left = 128 31 top = 1 12519 top = 128 32 520 object MenuItem23: TMenuItem 33 521 Action = FormMain.ABreakpointToggle … … 38 526 object MenuItem21: TMenuItem 39 527 Action = AGenerateNumber 528 end 529 object MenuItem29: TMenuItem 530 Action = FormMain.AShowTargetPosition 40 531 Bitmap.Data = { 41 532 36040000424D3604000000000000360000002800000010000000100000000100 … … 75 566 } 76 567 end 77 object MenuItem29: TMenuItem78 Action = FormMain.AShowTargetPosition79 Bitmap.Data = {80 36040000424D360400000000000036000000280000001000000010000000010081 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF82 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF83 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF84 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF85 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF86 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF87 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF88 FF000000008B000000B7FFFFFF000000008B000000FF000000FF000000FF000089 008BFFFFFF00000000B7000000FF000000B7FFFFFF00FFFFFF00FFFFFF00FFFF90 FF000000008B000000B7FFFFFF0000000063000000FF00000063FFFFFF00FFFF91 FF0000000063000000B700000020000000FF00000063FFFFFF00FFFFFF00FFFF92 FF000000008B000000B7FFFFFF00FFFFFF00000000FF000000FF00000020FFFF93 FF00FFFFFF00FFFFFF00FFFFFF00000000FF0000008BFFFFFF00FFFFFF00FFFF94 FF000000008B000000B7FFFFFF00FFFFFF0000000040000000FF000000B7FFFF95 FF00FFFFFF00FFFFFF00FFFFFF00000000FF00000063FFFFFF00FFFFFF00FFFF96 FF000000008B000000B7FFFFFF00FFFFFF00FFFFFF000000008B000000FF000097 0040FFFFFF00FFFFFF00000000FF00000040FFFFFF00FFFFFF0000000020000098 00B70000008B000000B7FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000FF000099 008BFFFFFF00FFFFFF0000000020000000FF00000020FFFFFF00000000200000100 00FF000000FF000000B7FFFFFF00FFFFFF00FFFFFF00FFFFFF000000008B0000101 008BFFFFFF00FFFFFF00FFFFFF00000000FF00000040FFFFFF00FFFFFF000000102 0040000000FF000000B7FFFFFF0000000063000000B7FFFFFF00000000B70000103 0063000000630000008B00000020000000FF00000020FFFFFF00FFFFFF00FFFF104 FF0000000063000000B7FFFFFF00FFFFFF00000000FF000000FF000000B7FFFF105 FF00FFFFFF00000000FF000000FF0000008BFFFFFF00FFFFFF00FFFFFF00FFFF106 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF107 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF108 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF109 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF110 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF111 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF112 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF113 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00114 }115 end116 568 object MenuItem36: TMenuItem 117 569 Action = AShrinkSource … … 122 574 object MenuItem2: TMenuItem 123 575 Action = ACopyToClipboard 124 Bitmap.Data = {125 36040000424D3604000000000000360000002800000010000000100000000100126 2000000000000004000064000000640000000000000000000000000000000000127 0000000000000000000000000000000000000000000000000000000000000000128 0000000000000000000000000000000000000000000000000000000000000000129 00000000000000000000000000000000000000000000840000FF840000FF8400130 00FF840000FF840000FF840000FF840000FF840000FF840000FF000000000000131 00000000000000000000000000000000000000000000840000FFFFFFFFFFFFFF132 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF840000FF000000000000133 00000000000000000000000000000000000000000000840000FFFFFFFFFF0000134 00FF000000FF000000FF000000FF000000FFFFFFFFFF840000FF000000000000135 00FF000000FF000000FF000000FF000000FF000000FF840000FFFFFFFFFFFFFF136 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF840000FF000000000000137 00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF840000FFFFFFFFFF0000138 00FF000000FF000000FF000000FF000000FFFFFFFFFF840000FF000000000000139 00FFFFFFFFFF000000FF000000FF000000FF000000FF840000FFFFFFFFFFFFFF140 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF840000FF000000000000141 00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF840000FFFFFFFFFF0000142 00FF000000FFFFFFFFFF840000FF840000FF840000FF840000FF000000000000143 00FFFFFFFFFF000000FF000000FF000000FF000000FF840000FFFFFFFFFFFFFF144 FFFFFFFFFFFFFFFFFFFF840000FFFFFFFFFF840000FF00000000000000000000145 00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF840000FFFFFFFFFFFFFF146 FFFFFFFFFFFFFFFFFFFF840000FF840000FF0000000000000000000000000000147 00FFFFFFFFFF000000FF000000FFFFFFFFFF000000FF840000FF840000FF8400148 00FF840000FF840000FF840000FF000000000000000000000000000000000000149 00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFF000000FF0000150 0000000000000000000000000000000000000000000000000000000000000000151 00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF000000FF000000000000152 0000000000000000000000000000000000000000000000000000000000000000153 00FF000000FF000000FF000000FF000000FF000000FF00000000000000000000154 0000000000000000000000000000000000000000000000000000000000000000155 0000000000000000000000000000000000000000000000000000000000000000156 0000000000000000000000000000000000000000000000000000000000000000157 0000000000000000000000000000000000000000000000000000000000000000158 0000000000000000000000000000000000000000000000000000159 }160 576 end 161 577 object MenuItem3: TMenuItem 162 578 Action = APasteFromClipboard 163 Bitmap.Data = {164 36040000424D3604000000000000360000002800000010000000100000000100165 2000000000000004000064000000640000000000000000000000FF00FF00FF00166 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00167 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00168 FF00FF00FF00FF00FF00FF00FF00FF00FF00840000FF840000FF840000FF8400169 00FF840000FF840000FF840000FF840000FF840000FF840000FFFF00FF000000170 00FF000000FF000000FF000000FF000000FF840000FFFFFFFFFFFFFFFFFFFFFF171 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF840000FF000000FF8484172 84FF008484FF848484FF008484FF848484FF840000FFFFFFFFFF000000FF0000173 00FF000000FF000000FF000000FF000000FFFFFFFFFF840000FF000000FF0084174 84FF848484FF008484FF848484FF008484FF840000FFFFFFFFFFFFFFFFFFFFFF175 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF840000FF000000FF8484176 84FF008484FF848484FF008484FF848484FF840000FFFFFFFFFF000000FF0000177 00FF000000FFFFFFFFFF840000FF840000FF840000FF840000FF000000FF0084178 84FF848484FF008484FF848484FF008484FF840000FFFFFFFFFFFFFFFFFFFFFF179 FFFFFFFFFFFFFFFFFFFF840000FFFFFFFFFF840000FFFF00FF00000000FF8484180 84FF008484FF848484FF008484FF848484FF840000FFFFFFFFFFFFFFFFFFFFFF181 FFFFFFFFFFFFFFFFFFFF840000FF840000FFFF00FF00FF00FF00000000FF0084182 84FF848484FF008484FF848484FF008484FF840000FF840000FF840000FF8400183 00FF840000FF840000FF840000FF000000FFFF00FF00FF00FF00000000FF8484184 84FF008484FF848484FF008484FF848484FF008484FF848484FF008484FF8484185 84FF008484FF848484FF008484FF000000FFFF00FF00FF00FF00000000FF0084186 84FF848484FF000000FF000000FF000000FF000000FF000000FF000000FF0000187 00FF000000FF848484FF848484FF000000FFFF00FF00FF00FF00000000FF8484188 84FF848484FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00189 FF00000000FF848484FF008484FF000000FFFF00FF00FF00FF00000000FF0084190 84FF848484FF008484FF000000FF00FFFFFF000000FF000000FF00FFFFFF0000191 00FF848484FF008484FF848484FF000000FFFF00FF00FF00FF00FF00FF000000192 00FF000000FF000000FF000000FF000000FF00FFFFFF00FFFFFF000000FF0000193 00FF000000FF000000FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00194 FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FF000000FFFF00195 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00196 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00197 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00198 }199 579 end 200 580 object MenuItem6: TMenuItem 201 581 Action = ACutToClipboard 202 Bitmap.Data = {203 36040000424D3604000000000000360000002800000010000000100000000100204 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF205 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF206 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF207 FF00FFFFFF00FFFFFF00800000FF800000FFFFFFFF00FFFFFF00FFFFFF00FFFF208 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF209 FF00FFFFFF00800000FFFFFFFF00FFFFFF00800000FFFFFFFF00FFFFFF008000210 00FF800000FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF211 FF00FFFFFF00800000FFFFFFFF00FFFFFF00800000FFFFFFFF00800000FFFFFF212 FF00FFFFFF00800000FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF213 FF00FFFFFF00800000FFFFFFFF00FFFFFF00800000FFFFFFFF00800000FFFFFF214 FF00FFFFFF00800000FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF215 FF00FFFFFF00FFFFFF00800000FF800000FF800000FFFFFFFF00800000FFFFFF216 FF00FFFFFF00800000FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF217 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00800000FFFFFFFF00800000FF8000218 00FF800000FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF219 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00800000FF000000FF800000FFFFFF220 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF221 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000FFFFFFFF00FFFF222 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF223 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000FF000000FF000000FFFFFF224 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF225 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000FFFFFFFF00000000FFFFFF226 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF227 FF00FFFFFF00FFFFFF00FFFFFF00000000FF000000FFFFFFFF00000000FF0000228 00FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF229 FF00FFFFFF00FFFFFF00FFFFFF00000000FFFFFFFF00FFFFFF00FFFFFF000000230 00FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF231 FF00FFFFFF00FFFFFF00FFFFFF00000000FFFFFFFF00FFFFFF00FFFFFF000000232 00FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF233 FF00FFFFFF00FFFFFF00FFFFFF00000000FFFFFFFF00FFFFFF00FFFFFF000000234 00FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF235 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF236 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00237 }238 582 end 239 583 object MenuItem4: TMenuItem 240 584 Action = AClear 241 Bitmap.Data = {242 36040000424D3604000000000000360000002800000010000000100000000100243 2000000000000004000064000000640000000000000000000000000000000000244 0000000000000000000000000000000000000000000000000000000000000000245 0000000000000000000000000000000000000000000000000000000000000000246 0000000000000000000000000000000000000000000000000000000000000000247 0000000000000000000000000000000000000000000000000000000000000000248 0000000000000000000000000000000000000000000000000000000000000000249 00000000000000000000000000003A3AE2FFC0C0C0FF00000000000000000000250 0000000000003A3AE2FFC0C0C0FF000000000000000000000000000000000000251 0000000000000000000000000000000000000000000000000000000000000000252 00003A3AE2FF3A3AE2FF3A3AE2FFC0C0C0FF0000000000000000000000000000253 000000000000000000003A3AE2FFC0C0C0FF0000000000000000000000000000254 00003A3AE2FF3A3AE2FF3A3AE2FFC0C0C0FF0000000000000000000000000000255 0000000000003A3AE2FFC0C0C0FF000000000000000000000000000000000000256 0000000000003838E0FF3838E0FF3838E0FFC0C0C0FF00000000000000000000257 00003838E0FF3838E0FFC0C0C0FF000000000000000000000000000000000000258 000000000000000000003535DDFF3535DDFF3535DDFFC0C0C0FF000000003535259 DDFF3535DDFFC0C0C0FF00000000000000000000000000000000000000000000260 00000000000000000000000000003232DAFF3232DAFF3232DAFF3232DAFF3232261 DAFFC0C0C0FF0000000000000000000000000000000000000000000000000000262 0000000000000000000000000000000000002F2FD7FF2F2FD7FF2F2FD7FFC0C0263 C0FF000000000000000000000000000000000000000000000000000000000000264 00000000000000000000000000002C2CD4FF2C2CD4FF2C2CD4FF2C2CD4FF2C2C265 D4FFC0C0C0FF0000000000000000000000000000000000000000000000000000266 000000000000000000002929D1FF2929D1FF2929D1FFC0C0C0FF000000002929267 D1FFC0C0C0FF0000000000000000000000000000000000000000000000000000268 00002626CEFF2626CEFF2626CEFF2626CEFFC0C0C0FF00000000000000000000269 00002626CEFF2626CEFFC0C0C0FF000000000000000000000000000000002020270 C8FF2020C8FF2020C8FF2020C8FFC0C0C0FF0000000000000000000000000000271 0000000000002020C8FF2020C8FFC0C0C0FF0000000000000000000000001818272 C0FF1818C0FFC0C0C0FF00000000000000000000000000000000000000000000273 000000000000000000001818C0FF1818C0FFC0C0C0FF00000000000000000000274 0000000000000000000000000000000000000000000000000000000000000000275 0000000000000000000000000000000000000000000000000000276 }277 585 end 278 586 object MenuItem5: TMenuItem … … 333 641 end 334 642 end 643 object SynJavaSyn1: TSynJavaSyn 644 DefaultFilter = 'Soubory Java (*.java)|*.java' 645 Enabled = False 646 left = 405 647 top = 263 648 end 335 649 end -
trunk/Forms/UFormSourceCode.pas
r88 r97 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 Menus, ActnList, strutils; 8 Classes, SysUtils, FileUtil, SynEdit, SynHighlighterIni, Forms, Controls, 9 Graphics, Dialogs, StdCtrls, Menus, ActnList, strutils, SynEditTypes, 10 SynEditHighlighter, SynHighlighterAny, SynHighlighterJava, UBFHighlighter; 10 11 11 12 type … … 23 24 AGenerateNumber: TAction; 24 25 ActionList1: TActionList; 25 MemoSource: TMemo;26 26 MenuItem1: TMenuItem; 27 27 MenuItem2: TMenuItem; … … 36 36 MenuItem6: TMenuItem; 37 37 PopupMenuSource: TPopupMenu; 38 SynEdit1: TSynEdit; 39 SynJavaSyn1: TSynJavaSyn; 38 40 procedure AClearExecute(Sender: TObject); 39 41 procedure ACopyToClipboardExecute(Sender: TObject); … … 44 46 procedure ASelectAllExecute(Sender: TObject); 45 47 procedure AShrinkSourceExecute(Sender: TObject); 48 procedure FormCreate(Sender: TObject); 46 49 procedure MemoSourceChange(Sender: TObject); 47 50 procedure MemoSourceKeyDown(Sender: TObject; var Key: Word; … … 53 56 Shift: TShiftState; X, Y: Integer); 54 57 private 58 BFHighlighter: TSynBrainFuckHl; 55 59 public 56 60 procedure UpdateInterface; 61 procedure UpdateTheme; 57 62 end; 58 63 … … 62 67 63 68 implementation 69 70 {$R *.lfm} 64 71 65 72 uses … … 70 77 SEnterNumber = 'Enter number'; 71 78 72 73 {$R *.lfm}74 79 75 80 { TFormSourceCode } … … 86 91 for I := 0 to Number - 1 do 87 92 NumberText := NumberText + '+'; 88 MemoSource.SelText := NumberText;93 SynEdit1.SelText := NumberText; 89 94 end; 90 95 end; … … 92 97 procedure TFormSourceCode.APasteFromClipboardExecute(Sender: TObject); 93 98 begin 94 MemoSource.PasteFromClipboard;99 SynEdit1.PasteFromClipboard; 95 100 end; 96 101 97 102 procedure TFormSourceCode.ASelectAllExecute(Sender: TObject); 98 103 begin 99 MemoSource.SelectAll;104 SynEdit1.SelectAll; 100 105 end; 101 106 … … 109 114 IndentText = ' '; 110 115 begin 111 Source := MemoSource.Text;116 Source := SynEdit1.Text; 112 117 NewSource := ''; 113 118 Indent := 0; … … 125 130 NewSource := NewSource + Source[I]; 126 131 end; 127 MemoSource.Text := NewSource;132 SynEdit1.Text := NewSource; 128 133 end; 129 134 130 135 procedure TFormSourceCode.ACopyToClipboardExecute(Sender: TObject); 131 136 begin 132 MemoSource.CopyToClipboard;137 SynEdit1.CopyToClipboard; 133 138 end; 134 139 135 140 procedure TFormSourceCode.ACutToClipboardExecute(Sender: TObject); 136 141 begin 137 MemoSource.CutToClipboard;142 SynEdit1.CutToClipboard; 138 143 end; 139 144 140 145 procedure TFormSourceCode.AClearExecute(Sender: TObject); 141 146 begin 142 MemoSource.Clear;147 SynEdit1.Clear; 143 148 end; 144 149 … … 149 154 I: Integer; 150 155 begin 151 Source := MemoSource.Text;156 Source := SynEdit1.Text; 152 157 Pos := 1; 153 158 for I := 1 to Length(Source) do begin … … 158 163 end; 159 164 SetLength(Source, Pos - 1); 160 MemoSource.Text := Source; 165 SynEdit1.Text := Source; 166 end; 167 168 procedure TFormSourceCode.FormCreate(Sender: TObject); 169 begin 170 BFHighlighter := TSynBrainFuckHl.Create(nil); 171 SynEdit1.Highlighter := BFHighlighter; 161 172 end; 162 173 … … 164 175 begin 165 176 177 end; 178 179 procedure TFormSourceCode.UpdateTheme; 180 const 181 clLightBlue = TColor($FF8080); 182 clLightGreen = TColor($80FF80); 183 clLightRed = TColor($8080FF); 184 begin 185 if Core.ThemeManager.Theme.Name = 'Dark' then begin 186 BFHighlighter.IoAttri.Foreground := clWhite; 187 BFHighlighter.LoopAttri.Foreground := clLightRed; 188 BFHighlighter.PointerAttri.Foreground := clLightBlue; 189 BFHighlighter.MemoryAttri.Foreground := clLightGreen; 190 end else begin 191 BFHighlighter.IoAttri.Foreground := clBlack; 192 BFHighlighter.LoopAttri.Foreground := clRed; 193 BFHighlighter.PointerAttri.Foreground := clBlue; 194 BFHighlighter.MemoryAttri.Foreground := clGreen; 195 end; 166 196 end; 167 197 -
trunk/Languages/LazFuck.cs.po
r96 r97 495 495 msgstr "ZdrojovÃœ kód" 496 496 497 #: tformsourcecode.menuitem1.caption498 msgctxt "tformsourcecode.menuitem1.caption"499 msgid "-"500 msgstr "-"501 502 497 #: tformtargetcode.aformatcode.caption 503 498 msgid "Format code" … … 748 743 msgid "Unsupported command" 749 744 msgstr "NepodporovanÃœ pÅÃkaz" 745 -
trunk/Languages/LazFuck.po
r96 r97 450 450 msgstr "" 451 451 452 #: tformsourcecode.menuitem1.caption453 msgctxt "TFORMSOURCECODE.MENUITEM1.CAPTION"454 msgid "-"455 msgstr ""456 457 452 #: tformtargetcode.aformatcode.caption 458 453 msgid "Format code" -
trunk/LazFuck.lpi
r93 r97 94 94 </Item6> 95 95 </RequiredPackages> 96 <Units Count="2 6">96 <Units Count="27"> 97 97 <Unit0> 98 98 <Filename Value="LazFuck.lpr"/> … … 241 241 <IsPartOfProject Value="True"/> 242 242 </Unit25> 243 <Unit26> 244 <Filename Value="UBFHighlighter.pas"/> 245 <IsPartOfProject Value="True"/> 246 <UnitName Value="UBFHighlighter"/> 247 </Unit26> 243 248 </Units> 244 249 </ProjectOptions>
Note:
See TracChangeset
for help on using the changeset viewer.