Changeset 106
- Timestamp:
- May 6, 2019, 11:03:00 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.lfm
r103 r106 5 5 Width = 860 6 6 Caption = 'LazFuck' 7 ClientHeight = 5 567 ClientHeight = 561 8 8 ClientWidth = 860 9 DesignTimePPI = 1 449 DesignTimePPI = 120 10 10 Menu = MainMenu1 11 11 OnClose = FormClose … … 14 14 OnDestroy = FormDestroy 15 15 OnShow = FormShow 16 LCLVersion = '2.0. 0.4'16 LCLVersion = '2.0.2.0' 17 17 WindowState = wsMaximized 18 18 object StatusBarMain: TStatusBar 19 19 Left = 0 20 Height = 3621 Top = 5 2020 Height = 28 21 Top = 533 22 22 Width = 860 23 23 Panels = < 24 24 item 25 Width = 8425 Width = 70 26 26 end 27 27 item 28 Width = 8428 Width = 70 29 29 end 30 30 item 31 Width = 9631 Width = 80 32 32 end> 33 33 ParentFont = False … … 36 36 object ToolBarMain: TToolBar 37 37 Left = 0 38 Height = 3138 Height = 26 39 39 Top = 0 40 40 Width = 860 … … 50 50 end 51 51 object ToolButton2: TToolButton 52 Left = 3 652 Left = 30 53 53 Top = 2 54 54 Action = AProjectOpen … … 57 57 end 58 58 object ToolButton3: TToolButton 59 Left = 8959 Left = 74 60 60 Top = 2 61 61 Action = AProjectSave 62 62 end 63 63 object ToolButton4: TToolButton 64 Left = 1 2464 Left = 103 65 65 Top = 2 66 66 Action = AProjectClose 67 67 end 68 68 object ToolButton5: TToolButton 69 Left = 1 9470 Height = 3369 Left = 161 70 Height = 28 71 71 Top = 2 72 72 Style = tbsSeparator 73 73 end 74 74 object ToolButton6: TToolButton 75 Left = 23975 Left = 197 76 76 Top = 2 77 77 Action = AProgramRun 78 78 end 79 79 object ToolButton7: TToolButton 80 Left = 20480 Left = 168 81 81 Top = 2 82 82 Action = AProgramCompile 83 83 end 84 84 object ToolButton8: TToolButton 85 Left = 1 5985 Left = 132 86 86 Top = 2 87 87 Action = AOptions 88 88 end 89 89 object ToolButton9: TToolButton 90 Left = 34490 Left = 284 91 91 Top = 2 92 92 Action = ABreakpointToggle 93 93 end 94 94 object ToolButton10: TToolButton 95 Left = 2 7495 Left = 226 96 96 Top = 2 97 97 Action = AProgramPause 98 98 end 99 99 object ToolButton11: TToolButton 100 Left = 309100 Left = 255 101 101 Top = 2 102 102 Action = AProgramStop 103 103 end 104 104 object ToolButton12: TToolButton 105 Left = 3 79105 Left = 313 106 106 Top = 2 107 107 Action = AProgramStepOver 108 108 end 109 109 object ToolButton13: TToolButton 110 Left = 414110 Left = 342 111 111 Top = 2 112 112 Action = AProgramStepInto 113 113 end 114 114 object ToolButton14: TToolButton 115 Left = 449115 Left = 371 116 116 Top = 2 117 117 Action = AProgramStepOut 118 118 end 119 119 object ToolButton15: TToolButton 120 Left = 4 84120 Left = 400 121 121 Top = 2 122 122 Action = AProgramRunToCursor 123 123 end 124 124 object ToolButtonTarget: TToolButton 125 Left = 519125 Left = 429 126 126 Hint = 'Target select' 127 127 Top = 2 … … 132 132 end 133 133 object PageControlRight: TPageControl 134 Left = 388135 Height = 489136 Top = 31137 Width = 472134 Left = 467 135 Height = 507 136 Top = 26 137 Width = 393 138 138 ActivePage = TabSheetDebug 139 139 Align = alRight … … 144 144 object TabSheetDebug: TTabSheet 145 145 Caption = 'Debug' 146 ClientHeight = 4 81147 ClientWidth = 434146 ClientHeight = 499 147 ClientWidth = 359 148 148 ParentFont = False 149 149 object PanelInput: TPanel 150 150 Left = 0 151 Height = 77151 Height = 64 152 152 Top = 0 153 Width = 434153 Width = 359 154 154 Align = alTop 155 155 BevelOuter = bvNone … … 160 160 Cursor = crVSplit 161 161 Left = 0 162 Height = 6163 Top = 77164 Width = 434162 Height = 5 163 Top = 64 164 Width = 359 165 165 Align = alTop 166 166 ResizeAnchor = akTop … … 168 168 object PanelOutput: TPanel 169 169 Left = 0 170 Height = 311171 Top = 83172 Width = 434170 Height = 259 171 Top = 69 172 Width = 359 173 173 Align = alTop 174 174 BevelOuter = bvNone … … 179 179 Cursor = crVSplit 180 180 Left = 0 181 Height = 6182 Top = 3 94183 Width = 434181 Height = 5 182 Top = 328 183 Width = 359 184 184 Align = alTop 185 185 ResizeAnchor = akTop … … 187 187 object PanelCPU: TPanel 188 188 Left = 0 189 Height = 103190 Top = 400191 Width = 434189 Height = 86 190 Top = 333 191 Width = 359 192 192 Align = alTop 193 193 BevelOuter = bvNone … … 198 198 Cursor = crVSplit 199 199 Left = 0 200 Height = 6201 Top = 4 81202 Width = 434200 Height = 5 201 Top = 419 202 Width = 359 203 203 Align = alTop 204 204 ResizeAnchor = akTop … … 206 206 object PanelMemory: TPanel 207 207 Left = 0 208 Height = 0209 Top = 4 81210 Width = 434208 Height = 75 209 Top = 424 210 Width = 359 211 211 Align = alClient 212 212 BevelOuter = bvNone … … 217 217 end 218 218 object Splitter1: TSplitter 219 Left = 382220 Height = 489221 Top = 31222 Width = 6219 Left = 462 220 Height = 507 221 Top = 26 222 Width = 5 223 223 Align = alRight 224 224 ResizeAnchor = akRight … … 226 226 object PanelLeft: TPanel 227 227 Left = 0 228 Height = 489229 Top = 31230 Width = 382228 Height = 507 229 Top = 26 230 Width = 462 231 231 Align = alClient 232 232 BevelOuter = bvNone 233 ClientHeight = 489234 ClientWidth = 382233 ClientHeight = 507 234 ClientWidth = 462 235 235 ParentFont = False 236 236 TabOrder = 4 237 237 object PageControlMain: TPageControl 238 238 Left = 0 239 Height = 3 41239 Height = 384 240 240 Top = 0 241 Width = 382241 Width = 462 242 242 ActivePage = TabSheetSource 243 243 Align = alClient … … 256 256 object PageControlBottom: TPageControl 257 257 Left = 0 258 Height = 1 42259 Top = 3 47260 Width = 382258 Height = 118 259 Top = 389 260 Width = 462 261 261 ActivePage = TabSheetMessages 262 262 Align = alBottom … … 273 273 Cursor = crVSplit 274 274 Left = 0 275 Height = 6276 Top = 3 41277 Width = 382275 Height = 5 276 Top = 384 277 Width = 462 278 278 Align = alBottom 279 279 ResizeAnchor = akBottom … … 282 282 object MainMenu1: TMainMenu 283 283 Images = Core.ImageListMain 284 left = 2 59285 top = 1 63284 left = 216 285 top = 136 286 286 object MenuItem1: TMenuItem 287 287 Caption = 'Project' … … 383 383 object ActionList1: TActionList 384 384 Images = Core.ImageListMain 385 left = 2 59386 top = 230385 left = 216 386 top = 192 387 387 object AProjectOpen: TAction 388 388 Category = 'Project' … … 529 529 DefaultExt = '.b' 530 530 Filter = 'BrainFuck (*.b)|*.b|Any file (*.*)|*.*' 531 left = 67532 top = 221531 left = 56 532 top = 184 533 533 end 534 534 object SaveDialog1: TSaveDialog 535 535 DefaultExt = '.b' 536 536 Filter = 'BrainFuck (*.b)|*.b|Any file (*.*)|*.*' 537 left = 67538 top = 2 88537 left = 56 538 top = 240 539 539 end 540 540 object TimerRefresh: TTimer 541 541 OnTimer = TimerRefreshTimer 542 left = 67543 top = 355542 left = 56 543 top = 296 544 544 end 545 545 object PopupMenuRecentFiles: TPopupMenu 546 left = 67547 top = 77546 left = 56 547 top = 64 548 548 end 549 549 object PopupMenuTargets: TPopupMenu 550 550 Images = Core.ImageListMain 551 left = 67552 top = 1 43551 left = 56 552 top = 119 553 553 end 554 554 end -
trunk/Forms/UFormMain.pas
r97 r106 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, SynEdit, Forms, Controls, Graphics, Dialogs,9 Menus, ActnList, ComCtrls, ExtCtrls, UTarget, Registry, URegistry,10 LazFileUtils;8 Classes, SysUtils, FileUtil, Forms, Controls, 9 Graphics, Dialogs, Menus, ActnList, ComCtrls, ExtCtrls, UTarget, Registry, 10 URegistry, LazFileUtils; 11 11 12 12 type … … 216 216 procedure TFormMain.TargetLogExecute(Lines: TStrings); 217 217 begin 218 FormLog.Memo1.Lines.AddStrings(Lines); 218 if Assigned(FormLog) then 219 FormLog.Memo1.Lines.AddStrings(Lines); 219 220 end; 220 221 … … 250 251 if Core.Project.Openned then 251 252 raise Exception.Create(SCloseProjectFirst); 252 FormSourceCode.SynEdit 1.Lines.LoadFromFile(FileName);253 FormSourceCode.SynEditSource.Lines.LoadFromFile(FileName); 253 254 Core.LastOpenedList.AddItem(FileName); 254 255 Core.Project.FileName := FileName; … … 344 345 Caption := Title; 345 346 AProjectSave.Enabled := Core.Project.Modified; 346 FormSourceCode.SynEdit 1.Enabled := Core.Project.Openned;347 FormSourceCode.SynEditSource.Enabled := Core.Project.Openned; 347 348 AProjectClose.Enabled := Core.Project.Openned; 348 349 AProjectSaveAs.Enabled := Core.Project.Openned; … … 372 373 procedure TFormMain.UpdateStatusBar; 373 374 begin 374 StatusBarMain.Panels[0].Text := IntToStr(FormSourceCode.SynEdit 1.CaretXY.X) +375 ', ' + IntToStr(FormSourceCode.SynEdit 1.CaretXY.Y);375 StatusBarMain.Panels[0].Text := IntToStr(FormSourceCode.SynEditSource.CaretXY.X) + 376 ', ' + IntToStr(FormSourceCode.SynEditSource.CaretXY.Y); 376 377 end; 377 378 … … 417 418 DebugStep: TDebugStep; 418 419 begin 419 DebugStep := Core.CurrentTarget.DebugSteps.SearchByTargetPos(FormTargetCode. MemoTarget.SelStart);420 DebugStep := Core.CurrentTarget.DebugSteps.SearchByTargetPos(FormTargetCode.SynEditTarget.SelStart); 420 421 if Assigned(DebugStep) then begin 421 FormSourceCode.SynEdit 1.SelStart := DebugStep.SourcePosition;422 FormSourceCode.SynEditSource.SelStart := DebugStep.SourcePosition; 422 423 PageControlMain.TabIndex := 0; 423 424 end; … … 428 429 DebugStep: TDebugStep; 429 430 begin 430 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.SynEdit 1.SelStart);431 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.SynEditSource.SelStart); 431 432 if Assigned(DebugStep) then begin 432 FormTargetCode. MemoTarget.SelStart := DebugStep.TargetPosition;433 FormTargetCode.SynEditTarget.SelStart := DebugStep.TargetPosition; 433 434 PageControlMain.TabIndex := 1; 434 435 end; … … 497 498 try 498 499 AProgramStop.Execute; 499 SourceCode := FormSourceCode.SynEdit 1.Text;500 SourceCode := FormSourceCode.SynEditSource.Text; 500 501 ProjectFileName := Core.Project.FileName; 501 502 ProgramName := ExtractFileNameOnly(Core.Project.FileName); … … 506 507 Compile; 507 508 Core.CurrentTarget.Messages.AppendMessage(SDone); 508 FormTargetCode.MemoTarget.Text := TargetCode; 509 FormTargetCode.SynEditTarget.Text := TargetCode; 510 FormTargetCode.SetHighlighter(Core.CurrentTarget.SourceExtension); 509 511 UpdateInterface; 510 512 except … … 519 521 BreakPoint: TBreakPoint; 520 522 begin 521 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.SynEdit 1.SelStart);523 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.SynEditSource.SelStart); 522 524 if Assigned(DebugStep) then begin 523 525 BreakPoint := Core.CurrentTarget.BreakPoints.SearchByTargetPos(DebugStep.TargetPosition); … … 552 554 if Core.CurrentTarget.State = rsStopped then begin 553 555 if not Core.CurrentTarget.Compiled then AProgramCompile.Execute; 554 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.SynEdit 1.SelStart);556 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.SynEditSource.SelStart); 555 557 Core.CurrentTarget.BreakPoints.SetSystem(DebugStep.TargetPosition); 556 558 AProgramRun.Execute; 557 559 end else begin 558 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.SynEdit 1.SelStart);560 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.SynEditSource.SelStart); 559 561 Core.CurrentTarget.RunToCursor(DebugStep.TargetPosition); 560 562 end; … … 566 568 begin 567 569 DebugStep := Core.CurrentTarget.DebugSteps.SearchByTargetPos(Core.CurrentTarget.ExecutionPosition); 568 FormSourceCode.SynEdit 1.SelStart := DebugStep.SourcePosition;569 FormTargetCode. MemoTarget.SelStart := DebugStep.TargetPosition;570 if PageControlMain.TabIndex = 0 then FormSourceCode.SynEdit 1.SetFocus;571 if PageControlMain.TabIndex = 1 then FormTargetCode. MemoTarget.SetFocus;570 FormSourceCode.SynEditSource.SelStart := DebugStep.SourcePosition; 571 FormTargetCode.SynEditTarget.SelStart := DebugStep.TargetPosition; 572 if PageControlMain.TabIndex = 0 then FormSourceCode.SynEditSource.SetFocus; 573 if PageControlMain.TabIndex = 1 then FormTargetCode.SynEditTarget.SetFocus; 572 574 end; 573 575 … … 614 616 AProgramStop.Execute; 615 617 Core.Project.Openned := False; 616 FormSourceCode.SynEdit 1.Clear;618 FormSourceCode.SynEditSource.Clear; 617 619 UpdateInterface; 618 620 end; … … 624 626 if Core.Project.Openned then Exit; 625 627 Core.Project.FileName := 'Examples' + DirectorySeparator + SNewProject + '.b'; 626 FormSourceCode.SynEdit 1.Clear;628 FormSourceCode.SynEditSource.Clear; 627 629 Core.Project.Openned := True; 628 630 Core.CurrentTarget.Compiled := False; … … 654 656 SaveDialog1.FileName := Core.Project.FileName; 655 657 if SaveDialog1.Execute then begin 656 FormSourceCode.SynEdit 1.Lines.SaveToFile(SaveDialog1.FileName);658 FormSourceCode.SynEditSource.Lines.SaveToFile(SaveDialog1.FileName); 657 659 Core.Project.FileName := SaveDialog1.FileName; 658 660 Core.LastOpenedList.AddItem(SaveDialog1.FileName); … … 665 667 begin 666 668 if Core.Project.Modified and FileExistsUTF8(Core.Project.FileName) then begin 667 FormSourceCode.SynEdit 1.Lines.SaveToFile(Core.Project.FileName);669 FormSourceCode.SynEditSource.Lines.SaveToFile(Core.Project.FileName); 668 670 Core.Project.Modified := False; 669 671 UpdateInterface; -
trunk/Forms/UFormSourceCode.lfm
r105 r106 10 10 OnCreate = FormCreate 11 11 LCLVersion = '2.0.2.0' 12 inline SynEdit 1: TSynEdit12 inline SynEditSource: TSynEdit 13 13 Left = 0 14 Height = 58914 Height = 491 15 15 Top = 0 16 Width = 67216 Width = 560 17 17 Align = alClient 18 18 Font.Height = -13 -
trunk/Forms/UFormSourceCode.pas
r105 r106 36 36 MenuItem6: TMenuItem; 37 37 PopupMenuSource: TPopupMenu; 38 SynEdit 1: TSynEdit;38 SynEditSource: TSynEdit; 39 39 SynJavaSyn1: TSynJavaSyn; 40 40 procedure AClearExecute(Sender: TObject); … … 91 91 for I := 0 to Number - 1 do 92 92 NumberText := NumberText + '+'; 93 SynEdit 1.SelText := NumberText;93 SynEditSource.SelText := NumberText; 94 94 end; 95 95 end; … … 97 97 procedure TFormSourceCode.APasteFromClipboardExecute(Sender: TObject); 98 98 begin 99 SynEdit 1.PasteFromClipboard;99 SynEditSource.PasteFromClipboard; 100 100 end; 101 101 102 102 procedure TFormSourceCode.ASelectAllExecute(Sender: TObject); 103 103 begin 104 SynEdit 1.SelectAll;104 SynEditSource.SelectAll; 105 105 end; 106 106 … … 114 114 IndentText = ' '; 115 115 begin 116 Source := SynEdit 1.Text;116 Source := SynEditSource.Text; 117 117 NewSource := ''; 118 118 Indent := 0; … … 130 130 NewSource := NewSource + Source[I]; 131 131 end; 132 SynEdit 1.Text := NewSource;132 SynEditSource.Text := NewSource; 133 133 end; 134 134 135 135 procedure TFormSourceCode.ACopyToClipboardExecute(Sender: TObject); 136 136 begin 137 SynEdit 1.CopyToClipboard;137 SynEditSource.CopyToClipboard; 138 138 end; 139 139 140 140 procedure TFormSourceCode.ACutToClipboardExecute(Sender: TObject); 141 141 begin 142 SynEdit 1.CutToClipboard;142 SynEditSource.CutToClipboard; 143 143 end; 144 144 145 145 procedure TFormSourceCode.AClearExecute(Sender: TObject); 146 146 begin 147 SynEdit 1.Clear;147 SynEditSource.Clear; 148 148 end; 149 149 … … 154 154 I: Integer; 155 155 begin 156 Source := SynEdit 1.Text;156 Source := SynEditSource.Text; 157 157 Pos := 1; 158 158 for I := 1 to Length(Source) do begin … … 163 163 end; 164 164 SetLength(Source, Pos - 1); 165 SynEdit 1.Text := Source;165 SynEditSource.Text := Source; 166 166 end; 167 167 … … 169 169 begin 170 170 BFHighlighter := TSynBrainFuckHl.Create(nil); 171 SynEdit 1.Highlighter := BFHighlighter;171 SynEditSource.Highlighter := BFHighlighter; 172 172 end; 173 173 -
trunk/Forms/UFormTargetCode.lfm
r103 r106 1 1 object FormTargetCode: TFormTargetCode 2 Left = 6823 Height = 2884 Top = 4855 Width = 3842 Left = 555 3 Height = 435 4 Top = 379 5 Width = 612 6 6 Caption = 'Target code' 7 ClientHeight = 2888 ClientWidth = 3849 DesignTimePPI = 1 4410 LCLVersion = '2.0. 0.4'11 object MemoTarget: TMemo7 ClientHeight = 435 8 ClientWidth = 612 9 DesignTimePPI = 120 10 LCLVersion = '2.0.2.0' 11 inline SynEditTarget: TSynEdit 12 12 Left = 0 13 Height = 28813 Height = 435 14 14 Top = 0 15 Width = 38415 Width = 612 16 16 Align = alClient 17 Font.Height = -13 17 18 Font.Name = 'Courier New' 19 Font.Pitch = fpFixed 20 Font.Quality = fqNonAntialiased 21 ParentColor = False 18 22 ParentFont = False 19 23 PopupMenu = PopupMenuTarget 20 ReadOnly = True21 ScrollBars = ssAutoBoth22 24 TabOrder = 0 25 Gutter.Width = 68 26 Gutter.MouseActions = <> 27 RightGutter.Width = 0 28 RightGutter.MouseActions = <> 29 Keystrokes = < 30 item 31 Command = ecUp 32 ShortCut = 38 33 end 34 item 35 Command = ecSelUp 36 ShortCut = 8230 37 end 38 item 39 Command = ecScrollUp 40 ShortCut = 16422 41 end 42 item 43 Command = ecDown 44 ShortCut = 40 45 end 46 item 47 Command = ecSelDown 48 ShortCut = 8232 49 end 50 item 51 Command = ecScrollDown 52 ShortCut = 16424 53 end 54 item 55 Command = ecLeft 56 ShortCut = 37 57 end 58 item 59 Command = ecSelLeft 60 ShortCut = 8229 61 end 62 item 63 Command = ecWordLeft 64 ShortCut = 16421 65 end 66 item 67 Command = ecSelWordLeft 68 ShortCut = 24613 69 end 70 item 71 Command = ecRight 72 ShortCut = 39 73 end 74 item 75 Command = ecSelRight 76 ShortCut = 8231 77 end 78 item 79 Command = ecWordRight 80 ShortCut = 16423 81 end 82 item 83 Command = ecSelWordRight 84 ShortCut = 24615 85 end 86 item 87 Command = ecPageDown 88 ShortCut = 34 89 end 90 item 91 Command = ecSelPageDown 92 ShortCut = 8226 93 end 94 item 95 Command = ecPageBottom 96 ShortCut = 16418 97 end 98 item 99 Command = ecSelPageBottom 100 ShortCut = 24610 101 end 102 item 103 Command = ecPageUp 104 ShortCut = 33 105 end 106 item 107 Command = ecSelPageUp 108 ShortCut = 8225 109 end 110 item 111 Command = ecPageTop 112 ShortCut = 16417 113 end 114 item 115 Command = ecSelPageTop 116 ShortCut = 24609 117 end 118 item 119 Command = ecLineStart 120 ShortCut = 36 121 end 122 item 123 Command = ecSelLineStart 124 ShortCut = 8228 125 end 126 item 127 Command = ecEditorTop 128 ShortCut = 16420 129 end 130 item 131 Command = ecSelEditorTop 132 ShortCut = 24612 133 end 134 item 135 Command = ecLineEnd 136 ShortCut = 35 137 end 138 item 139 Command = ecSelLineEnd 140 ShortCut = 8227 141 end 142 item 143 Command = ecEditorBottom 144 ShortCut = 16419 145 end 146 item 147 Command = ecSelEditorBottom 148 ShortCut = 24611 149 end 150 item 151 Command = ecToggleMode 152 ShortCut = 45 153 end 154 item 155 Command = ecCopy 156 ShortCut = 16429 157 end 158 item 159 Command = ecPaste 160 ShortCut = 8237 161 end 162 item 163 Command = ecDeleteChar 164 ShortCut = 46 165 end 166 item 167 Command = ecCut 168 ShortCut = 8238 169 end 170 item 171 Command = ecDeleteLastChar 172 ShortCut = 8 173 end 174 item 175 Command = ecDeleteLastChar 176 ShortCut = 8200 177 end 178 item 179 Command = ecDeleteLastWord 180 ShortCut = 16392 181 end 182 item 183 Command = ecUndo 184 ShortCut = 32776 185 end 186 item 187 Command = ecRedo 188 ShortCut = 40968 189 end 190 item 191 Command = ecLineBreak 192 ShortCut = 13 193 end 194 item 195 Command = ecSelectAll 196 ShortCut = 16449 197 end 198 item 199 Command = ecCopy 200 ShortCut = 16451 201 end 202 item 203 Command = ecBlockIndent 204 ShortCut = 24649 205 end 206 item 207 Command = ecLineBreak 208 ShortCut = 16461 209 end 210 item 211 Command = ecInsertLine 212 ShortCut = 16462 213 end 214 item 215 Command = ecDeleteWord 216 ShortCut = 16468 217 end 218 item 219 Command = ecBlockUnindent 220 ShortCut = 24661 221 end 222 item 223 Command = ecPaste 224 ShortCut = 16470 225 end 226 item 227 Command = ecCut 228 ShortCut = 16472 229 end 230 item 231 Command = ecDeleteLine 232 ShortCut = 16473 233 end 234 item 235 Command = ecDeleteEOL 236 ShortCut = 24665 237 end 238 item 239 Command = ecUndo 240 ShortCut = 16474 241 end 242 item 243 Command = ecRedo 244 ShortCut = 24666 245 end 246 item 247 Command = ecGotoMarker0 248 ShortCut = 16432 249 end 250 item 251 Command = ecGotoMarker1 252 ShortCut = 16433 253 end 254 item 255 Command = ecGotoMarker2 256 ShortCut = 16434 257 end 258 item 259 Command = ecGotoMarker3 260 ShortCut = 16435 261 end 262 item 263 Command = ecGotoMarker4 264 ShortCut = 16436 265 end 266 item 267 Command = ecGotoMarker5 268 ShortCut = 16437 269 end 270 item 271 Command = ecGotoMarker6 272 ShortCut = 16438 273 end 274 item 275 Command = ecGotoMarker7 276 ShortCut = 16439 277 end 278 item 279 Command = ecGotoMarker8 280 ShortCut = 16440 281 end 282 item 283 Command = ecGotoMarker9 284 ShortCut = 16441 285 end 286 item 287 Command = ecSetMarker0 288 ShortCut = 24624 289 end 290 item 291 Command = ecSetMarker1 292 ShortCut = 24625 293 end 294 item 295 Command = ecSetMarker2 296 ShortCut = 24626 297 end 298 item 299 Command = ecSetMarker3 300 ShortCut = 24627 301 end 302 item 303 Command = ecSetMarker4 304 ShortCut = 24628 305 end 306 item 307 Command = ecSetMarker5 308 ShortCut = 24629 309 end 310 item 311 Command = ecSetMarker6 312 ShortCut = 24630 313 end 314 item 315 Command = ecSetMarker7 316 ShortCut = 24631 317 end 318 item 319 Command = ecSetMarker8 320 ShortCut = 24632 321 end 322 item 323 Command = ecSetMarker9 324 ShortCut = 24633 325 end 326 item 327 Command = EcFoldLevel1 328 ShortCut = 41009 329 end 330 item 331 Command = EcFoldLevel2 332 ShortCut = 41010 333 end 334 item 335 Command = EcFoldLevel3 336 ShortCut = 41011 337 end 338 item 339 Command = EcFoldLevel4 340 ShortCut = 41012 341 end 342 item 343 Command = EcFoldLevel5 344 ShortCut = 41013 345 end 346 item 347 Command = EcFoldLevel6 348 ShortCut = 41014 349 end 350 item 351 Command = EcFoldLevel7 352 ShortCut = 41015 353 end 354 item 355 Command = EcFoldLevel8 356 ShortCut = 41016 357 end 358 item 359 Command = EcFoldLevel9 360 ShortCut = 41017 361 end 362 item 363 Command = EcFoldLevel0 364 ShortCut = 41008 365 end 366 item 367 Command = EcFoldCurrent 368 ShortCut = 41005 369 end 370 item 371 Command = EcUnFoldCurrent 372 ShortCut = 41003 373 end 374 item 375 Command = EcToggleMarkupWord 376 ShortCut = 32845 377 end 378 item 379 Command = ecNormalSelect 380 ShortCut = 24654 381 end 382 item 383 Command = ecColumnSelect 384 ShortCut = 24643 385 end 386 item 387 Command = ecLineSelect 388 ShortCut = 24652 389 end 390 item 391 Command = ecTab 392 ShortCut = 9 393 end 394 item 395 Command = ecShiftTab 396 ShortCut = 8201 397 end 398 item 399 Command = ecMatchBracket 400 ShortCut = 24642 401 end 402 item 403 Command = ecColSelUp 404 ShortCut = 40998 405 end 406 item 407 Command = ecColSelDown 408 ShortCut = 41000 409 end 410 item 411 Command = ecColSelLeft 412 ShortCut = 40997 413 end 414 item 415 Command = ecColSelRight 416 ShortCut = 40999 417 end 418 item 419 Command = ecColSelPageDown 420 ShortCut = 40994 421 end 422 item 423 Command = ecColSelPageBottom 424 ShortCut = 57378 425 end 426 item 427 Command = ecColSelPageUp 428 ShortCut = 40993 429 end 430 item 431 Command = ecColSelPageTop 432 ShortCut = 57377 433 end 434 item 435 Command = ecColSelLineStart 436 ShortCut = 40996 437 end 438 item 439 Command = ecColSelLineEnd 440 ShortCut = 40995 441 end 442 item 443 Command = ecColSelEditorTop 444 ShortCut = 57380 445 end 446 item 447 Command = ecColSelEditorBottom 448 ShortCut = 57379 449 end> 450 MouseActions = <> 451 MouseTextActions = <> 452 MouseSelActions = <> 453 VisibleSpecialChars = [vscSpace, vscTabAtLast] 454 SelectedColor.BackPriority = 50 455 SelectedColor.ForePriority = 50 456 SelectedColor.FramePriority = 50 457 SelectedColor.BoldPriority = 50 458 SelectedColor.ItalicPriority = 50 459 SelectedColor.UnderlinePriority = 50 460 SelectedColor.StrikeOutPriority = 50 461 BracketHighlightStyle = sbhsBoth 462 BracketMatchColor.Background = clNone 463 BracketMatchColor.Foreground = clNone 464 BracketMatchColor.Style = [fsBold] 465 FoldedCodeColor.Background = clNone 466 FoldedCodeColor.Foreground = clGray 467 FoldedCodeColor.FrameColor = clGray 468 MouseLinkColor.Background = clNone 469 MouseLinkColor.Foreground = clBlue 470 LineHighlightColor.Background = clNone 471 LineHighlightColor.Foreground = clNone 472 inline SynLeftGutterPartList1: TSynGutterPartList 473 object SynGutterMarks1: TSynGutterMarks 474 Width = 30 475 MouseActions = <> 476 end 477 object SynGutterLineNumber1: TSynGutterLineNumber 478 Width = 17 479 MouseActions = <> 480 MarkupInfo.Background = clBtnFace 481 MarkupInfo.Foreground = clNone 482 DigitCount = 2 483 ShowOnlyLineNumbersMultiplesOf = 1 484 ZeroStart = False 485 LeadingZeros = False 486 end 487 object SynGutterChanges1: TSynGutterChanges 488 Width = 5 489 MouseActions = <> 490 ModifiedColor = 59900 491 SavedColor = clGreen 492 end 493 object SynGutterSeparator1: TSynGutterSeparator 494 Width = 3 495 MouseActions = <> 496 MarkupInfo.Background = clWhite 497 MarkupInfo.Foreground = clGray 498 end 499 object SynGutterCodeFolding1: TSynGutterCodeFolding 500 Width = 13 501 MouseActions = <> 502 MarkupInfo.Background = clNone 503 MarkupInfo.Foreground = clGray 504 MouseActionsExpanded = <> 505 MouseActionsCollapsed = <> 506 end 507 end 23 508 end 24 509 object PopupMenuTarget: TPopupMenu 25 510 Images = Core.ImageListMain 26 left = 10127 top = 1 20511 left = 84 512 top = 100 28 513 object MenuItem20: TMenuItem 29 514 Action = AFormatCode … … 35 520 object ActionList1: TActionList 36 521 Images = Core.ImageListMain 37 left = 23938 top = 47522 left = 199 523 top = 39 39 524 object AFormatCode: TAction 40 525 Caption = 'Format code' -
trunk/Forms/UFormTargetCode.pas
r91 r106 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 Menus, ActnList, strutils; 8 Classes, SysUtils, FileUtil, SynEdit, SynHighlighterAny, SynHighlighterPas, 9 SynHighlighterCpp, SynHighlighterPHP, SynHighlighterJava, 10 SynHighlighterPython, Forms, Controls, Graphics, Dialogs, StdCtrls, Menus, 11 ActnList, strutils; 10 12 11 13 type … … 17 19 AFormatCode: TAction; 18 20 ActionList1: TActionList; 19 MemoTarget: TMemo;20 21 MenuItem1: TMenuItem; 21 22 MenuItem20: TMenuItem; 22 23 PopupMenuTarget: TPopupMenu; 24 SynEditTarget: TSynEdit; 23 25 procedure AFormatCodeExecute(Sender: TObject); 24 26 procedure AShrinkCodeExecute(Sender: TObject); … … 26 28 { private declarations } 27 29 public 28 { public declarations }30 procedure SetHighlighter(SourceExt: string); 29 31 end; 30 32 … … 47 49 IndentText = ' '; 48 50 begin 49 Source := MemoTarget.Text;51 Source := SynEditTarget.Text; 50 52 NewSource := ''; 51 53 Indent := 0; … … 63 65 NewSource := NewSource + Source[I]; 64 66 end; 65 MemoTarget.Text := NewSource;67 SynEditTarget.Text := NewSource; 66 68 end; 67 69 … … 72 74 I: Integer; 73 75 begin 74 Source := MemoTarget.Text;76 Source := SynEditTarget.Text; 75 77 Pos := 1; 76 78 for I := 1 to Length(Source) do begin … … 81 83 end; 82 84 SetLength(Source, Pos - 1); 83 MemoTarget.Text := Source; 85 SynEditTarget.Text := Source; 86 end; 87 88 procedure TFormTargetCode.SetHighlighter(SourceExt: string); 89 begin 90 if Assigned(SynEditTarget.Highlighter) then 91 SynEditTarget.Highlighter.Free; 92 if SourceExt = '.pas' then SynEditTarget.Highlighter := TSynPasSyn.Create(nil) 93 else if SourceExt = '.c' then SynEditTarget.Highlighter := TSynCppSyn.Create(nil) 94 else if SourceExt = '.php' then SynEditTarget.Highlighter := TSynPhpSyn.Create(nil) 95 else if SourceExt = '.java' then SynEditTarget.Highlighter := TSynJavaSyn.Create(nil) 96 else if SourceExt = '.py' then SynEditTarget.Highlighter := TSynPythonSyn.Create(nil); 84 97 end; 85 98 -
trunk/UTarget.pas
r93 r106 419 419 Free; 420 420 end; 421 if FileExistsUTF8(CompilerPath) then 421 if CompilerPath <> '' then begin; 422 if FileExistsUTF8(CompilerPath) then 422 423 try 423 424 Process := TProcess.Create(nil); … … 439 440 Process.Free; 440 441 end else raise Exception.Create(Format(SCompilerNotFound, [CompilerPath])); 442 end; 441 443 end; 442 444
Note:
See TracChangeset
for help on using the changeset viewer.