Changeset 46 for trunk/Forms
- Timestamp:
- Jul 12, 2012, 7:47:58 AM (12 years ago)
- Location:
- trunk/Forms
- Files:
-
- 7 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.lfm
r45 r46 1 1 object MainForm: TMainForm 2 Left = 5013 Height = 4 144 Top = 1705 Width = 6 652 Left = 213 3 Height = 430 4 Top = 98 5 Width = 670 6 6 Caption = 'LazFuck' 7 ClientHeight = 3958 ClientWidth = 6 657 ClientHeight = 411 8 ClientWidth = 670 9 9 Menu = MainMenu1 10 10 OnCloseQuery = FormCloseQuery … … 17 17 Left = 0 18 18 Height = 20 19 Top = 3 7520 Width = 6 6519 Top = 391 20 Width = 670 21 21 Panels = < 22 22 item … … 35 35 Height = 26 36 36 Top = 0 37 Width = 6 6537 Width = 670 38 38 Images = ImageList1 39 39 ParentShowHint = False … … 118 118 end 119 119 object PageControlRight: TPageControl 120 Left = 27 2121 Height = 3 49120 Left = 277 121 Height = 365 122 122 Top = 26 123 123 Width = 393 … … 129 129 object TabSheetDebug: TTabSheet 130 130 Caption = 'Debug' 131 ClientHeight = 3 41131 ClientHeight = 357 132 132 ClientWidth = 365 133 133 object PanelInput: TPanel … … 180 180 Left = 0 181 181 Height = 5 182 Top = 3 41182 Top = 357 183 183 Width = 365 184 184 Align = alTop … … 188 188 Left = 0 189 189 Height = 0 190 Top = 3 41190 Top = 357 191 191 Width = 365 192 192 Align = alClient … … 197 197 end 198 198 object Splitter1: TSplitter 199 Left = 2 67200 Height = 3 49199 Left = 272 200 Height = 365 201 201 Top = 26 202 202 Width = 5 … … 206 206 object PanelLeft: TPanel 207 207 Left = 0 208 Height = 3 49208 Height = 365 209 209 Top = 26 210 Width = 2 67210 Width = 272 211 211 Align = alClient 212 212 BevelOuter = bvNone 213 ClientHeight = 3 49214 ClientWidth = 2 67213 ClientHeight = 365 214 ClientWidth = 272 215 215 TabOrder = 4 216 216 object PageControlMain: TPageControl 217 217 Left = 0 218 Height = 2 26218 Height = 242 219 219 Top = 0 220 Width = 2 67220 Width = 272 221 221 ActivePage = TabSheetSource 222 222 Align = alClient … … 226 226 object TabSheetSource: TTabSheet 227 227 Caption = 'Source code' 228 ClientHeight = 200229 ClientWidth = 259230 object MemoSource: TMemo231 Left = 0232 Height = 200233 Top = 0234 Width = 259235 Align = alClient236 Font.Height = -12237 Font.Name = 'Courier New'238 OnChange = MemoSourceChange239 OnKeyDown = MemoSourceKeyDown240 OnKeyPress = MemoSourceKeyPress241 OnKeyUp = MemoSourceKeyUp242 OnMouseDown = MemoSourceMouseDown243 ParentFont = False244 PopupMenu = PopupMenuSource245 ScrollBars = ssAutoBoth246 TabOrder = 0247 end248 228 end 249 229 object TabSheetTarget: TTabSheet 250 230 Caption = 'Target code' 251 ClientHeight = 192252 ClientWidth = 265253 object MemoTarget: TMemo254 Left = 0255 Height = 387256 Top = 0257 Width = 583258 Align = alClient259 PopupMenu = PopupMenuTarget260 ReadOnly = True261 ScrollBars = ssAutoBoth262 TabOrder = 0263 end264 231 end 265 232 end … … 267 234 Left = 0 268 235 Height = 118 269 Top = 2 31270 Width = 2 67236 Top = 247 237 Width = 272 271 238 ActivePage = TabSheetMessages 272 239 Align = alBottom … … 282 249 Left = 0 283 250 Height = 5 284 Top = 2 26285 Width = 2 67251 Top = 242 252 Width = 272 286 253 Align = alBottom 287 254 ResizeAnchor = akBottom … … 291 258 Images = ImageList1 292 259 left = 216 293 top = 1 28260 top = 136 294 261 object MenuItem1: TMenuItem 295 262 Caption = 'Project' … … 1753 1720 top = 184 1754 1721 end 1755 object PopupMenuSource: TPopupMenu1756 Images = ImageList11757 left = 561758 top = 1281759 object MenuItem23: TMenuItem1760 Action = ABreakpointToggle1761 Bitmap.Data = {1762 36040000424D36040000000000003600000028000000100000001000000001001763 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF1764 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1765 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1766 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1767 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1768 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1769 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1770 FF000000810000007500000064200000607E000060B2000060C8000060B200001771 607E000064200000750000008100FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1772 FF00000081000000784102027DC10A0AA8E70F0FCAF81111D5FE0F0FCAF80A0A1773 A8E702027DC10000784100008100FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1774 FF0000008420030389C11515BFF31212CDFF1111CCFF1111CCFF1111CCFF11111775 CCFF0E0EBCF3020288C100008420FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1776 FF000000897E1818AFE61414C1FF1111BFFF1111BFFF1111BFFF1111BFFF11111777 BFFF1111BFFF0A0AA6E60000897EFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1778 FF0000008FB23434C3F81414B2FF1111B1FF1111B1FF1111B1FF1111B1FF11111779 B1FF1111B1FF1414B0F800008FB2FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1780 FF00000095C84848D0FE2E2EB8FF1D1DADFF1212A5FF1111A4FF1111A4FF11111781 A4FF1111A4FF1B1BADFE000095C8FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1782 FF0000009AB24A4AD4F83737BFFF3737BFFF3131BAFF2727B0FF1C1CA6FF16161783 A0FF12129CFF2323AEF800009AB2FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1784 FF0000009E7E3939CCE64A4AD2FF4545CDFF4545CDFF4545CDFF4545CDFF45451785 CDFF4848D0FF3131C3E600009E7EFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1786 FF000000A3200A0AABC15555E3F35A5AE2FF5656DEFF5656DEFF5656DEFF59591787 E1FF5050DEF30909AAC10000A320FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1788 FF000000A4000000A6410A0AAEC13F3FD5E76060EDF86A6AF3FE6060ECF83E3E1789 D4E70A0AADC10000A6410000A400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1790 FF000000A4000000A6000000A9200000AA7E0000AAB20000AAC80000AAB200001791 AA7E0000A9200000A6000000A400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1792 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1793 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1794 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1795 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF001796 }1797 end1798 object MenuItem26: TMenuItem1799 Action = AFormatSource1800 end1801 object MenuItem21: TMenuItem1802 Action = AShrinkSource1803 end1804 object MenuItem29: TMenuItem1805 Action = AGenerateNumber1806 Bitmap.Data = {1807 36040000424D36040000000000003600000028000000100000001000000001001808 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF1809 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1810 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1811 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1812 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1813 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1814 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1815 FF000000008B000000B7FFFFFF000000008B000000FF000000FF000000FF00001816 008BFFFFFF00000000B7000000FF000000B7FFFFFF00FFFFFF00FFFFFF00FFFF1817 FF000000008B000000B7FFFFFF0000000063000000FF00000063FFFFFF00FFFF1818 FF0000000063000000B700000020000000FF00000063FFFFFF00FFFFFF00FFFF1819 FF000000008B000000B7FFFFFF00FFFFFF00000000FF000000FF00000020FFFF1820 FF00FFFFFF00FFFFFF00FFFFFF00000000FF0000008BFFFFFF00FFFFFF00FFFF1821 FF000000008B000000B7FFFFFF00FFFFFF0000000040000000FF000000B7FFFF1822 FF00FFFFFF00FFFFFF00FFFFFF00000000FF00000063FFFFFF00FFFFFF00FFFF1823 FF000000008B000000B7FFFFFF00FFFFFF00FFFFFF000000008B000000FF00001824 0040FFFFFF00FFFFFF00000000FF00000040FFFFFF00FFFFFF000000002000001825 00B70000008B000000B7FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000FF00001826 008BFFFFFF00FFFFFF0000000020000000FF00000020FFFFFF000000002000001827 00FF000000FF000000B7FFFFFF00FFFFFF00FFFFFF00FFFFFF000000008B00001828 008BFFFFFF00FFFFFF00FFFFFF00000000FF00000040FFFFFF00FFFFFF0000001829 0040000000FF000000B7FFFFFF0000000063000000B7FFFFFF00000000B700001830 0063000000630000008B00000020000000FF00000020FFFFFF00FFFFFF00FFFF1831 FF0000000063000000B7FFFFFF00FFFFFF00000000FF000000FF000000B7FFFF1832 FF00FFFFFF00000000FF000000FF0000008BFFFFFF00FFFFFF00FFFFFF00FFFF1833 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1834 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1835 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1836 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1837 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1838 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1839 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF1840 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF001841 }1842 end1843 object MenuItem36: TMenuItem1844 Action = AShowTargetPosition1845 end1846 end1847 object PopupMenuTarget: TPopupMenu1848 left = 561849 top = 721850 object MenuItem20: TMenuItem1851 Action = AShowSourcePosition1852 end1853 end1854 1722 object TimerRefresh: TTimer 1855 1723 OnTimer = TimerRefreshTimer -
trunk/Forms/UFormMain.pas
r45 r46 49 49 ImageList1: TImageList; 50 50 MainMenu1: TMainMenu; 51 MemoSource: TMemo;52 MemoTarget: TMemo;53 51 MenuItem1: TMenuItem; 54 52 MenuItem10: TMenuItem; … … 62 60 MenuItem18: TMenuItem; 63 61 MenuItem2: TMenuItem; 64 MenuItem20: TMenuItem;65 MenuItem21: TMenuItem;66 62 MenuItem22: TMenuItem; 67 MenuItem23: TMenuItem;68 63 MenuItem24: TMenuItem; 69 64 MenuItem25: TMenuItem; 70 MenuItem26: TMenuItem;71 65 MenuItem27: TMenuItem; 72 66 MenuItem28: TMenuItem; 73 MenuItem29: TMenuItem;74 67 MenuItem30: TMenuItem; 75 68 MenuItem31: TMenuItem; … … 78 71 MenuItem34: TMenuItem; 79 72 MenuItem35: TMenuItem; 80 MenuItem36: TMenuItem;81 73 MenuItemOpenRecent: TMenuItem; 82 74 MenuItemTarget: TMenuItem; … … 97 89 PanelOutput: TPanel; 98 90 PanelInput: TPanel; 99 PopupMenuTarget: TPopupMenu;100 PopupMenuSource: TPopupMenu;101 91 SaveDialog1: TSaveDialog; 102 92 Splitter1: TSplitter; … … 200 190 UFormCPU, UFormOptions, UFormMessages, UTargetJava, 201 191 UTargetDelphi, UTargetPHP, UTargetC, UFormTargets, UFormOutput, UFormInput, 202 UFormMemory ;192 UFormMemory, UFormSourceCode, UFormTargetCode; 203 193 204 194 resourcestring … … 214 204 procedure TMainForm.FormShow(Sender: TObject); 215 205 begin 206 LoadFromRegistry(RegistryRoot, ApplicationInfo.RegistryKey); 216 207 PageControlMain.TabIndex := 0; 217 208 if OpenProjectOnStart and (LastOpenedList.Items.Count > 0) then … … 287 278 begin 288 279 AProjectClose.Execute; 289 MemoSource.Lines.LoadFromFile(UTF8Decode(FileName));280 FormSourceCode.MemoSource.Lines.LoadFromFile(UTF8Decode(FileName)); 290 281 LastOpenedList.AddItem(FileName); 291 282 ProjectFileName := FileName; … … 318 309 procedure TMainForm.DockInit; 319 310 begin 311 FormSourceCode.ManualDock(TabSheetSource, nil, alClient); 312 FormSourceCode.Align := alClient; 313 FormSourceCode.Show; 314 FormTargetCode.ManualDock(TabSheetTarget, nil, alClient); 315 FormTargetCode.Align := alClient; 316 FormTargetCode.Show; 320 317 FormCPU.ManualDock(PanelCPU, nil, alClient); 321 318 FormCPU.Align := alClient; … … 387 384 begin 388 385 AProjectSave.Enabled := Modified; 389 Title := ApplicationInfo. Name;386 Title := ApplicationInfo.AppName; 390 387 if ProjectFileName <> '' then Title := ProjectFileName + ' - ' + Title; 391 388 if Modified then Title := Title + ' *'; 392 389 Caption := Title; 393 MemoSource.Enabled := ProjectFileName <> '';390 FormSourceCode.MemoSource.Enabled := ProjectFileName <> ''; 394 391 AProjectClose.Enabled := ProjectFileName <> ''; 395 392 AProgramRun.Enabled := (tcRun in CurrentTarget.Capabilities) and … … 418 415 procedure TMainForm.UpdateStatusBar; 419 416 begin 420 StatusBarMain.Panels[0].Text := IntToStr(MemoSource.CaretPos.X) + ', ' + IntToStr(MemoSource.CaretPos.Y); 417 StatusBarMain.Panels[0].Text := IntToStr(FormSourceCode.MemoSource.CaretPos.X) + 418 ', ' + IntToStr(FormSourceCode.MemoSource.CaretPos.Y); 421 419 end; 422 420 … … 447 445 LastOpenedList := TLastOpenedList.Create(nil); 448 446 LastOpenedList.OnChange := LastOpenedListChange; 449 LoadFromRegistry(RegistryRoot, ApplicationInfo.RegistryKey);450 447 end; 451 448 … … 470 467 DebugStep: TDebugStep; 471 468 begin 472 DebugStep := CurrentTarget.DebugSteps.SearchByTargetPos( MemoTarget.SelStart);469 DebugStep := CurrentTarget.DebugSteps.SearchByTargetPos(FormTargetCode.MemoTarget.SelStart); 473 470 if Assigned(DebugStep) then begin 474 MemoSource.SelStart := DebugStep.SourcePosition;471 FormSourceCode.MemoSource.SelStart := DebugStep.SourcePosition; 475 472 PageControlMain.TabIndex := 0; 476 473 end; … … 481 478 DebugStep: TDebugStep; 482 479 begin 483 DebugStep := CurrentTarget.DebugSteps.SearchBySourcePos( MemoSource.SelStart);480 DebugStep := CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.MemoSource.SelStart); 484 481 if Assigned(DebugStep) then begin 485 MemoTarget.SelStart := DebugStep.TargetPosition;482 FormTargetCode.MemoTarget.SelStart := DebugStep.TargetPosition; 486 483 PageControlMain.TabIndex := 1; 487 484 end; … … 494 491 I: Integer; 495 492 begin 496 Source := MemoSource.Text;493 Source := FormSourceCode.MemoSource.Text; 497 494 Pos := 1; 498 495 for I := 1 to Length(Source) do begin … … 503 500 end; 504 501 SetLength(Source, Pos - 1); 505 MemoSource.Text := Source;502 FormSourceCode.MemoSource.Text := Source; 506 503 end; 507 504 … … 535 532 IndentText = ' '; 536 533 begin 537 Source := MemoSource.Text;534 Source := FormSourceCode.MemoSource.Text; 538 535 NewSource := ''; 539 536 Indent := 0; … … 551 548 NewSource := NewSource + Source[I]; 552 549 end; 553 MemoSource.Text := NewSource;550 FormSourceCode.MemoSource.Text := NewSource; 554 551 end; 555 552 … … 565 562 for I := 0 to Number - 1 do 566 563 NumberText := NumberText + '+'; 567 MemoSource.Text :=MemoSource.Text + NumberText;564 FormSourceCode.MemoSource.Text := FormSourceCode.MemoSource.Text + NumberText; 568 565 end; 569 566 end; … … 582 579 AProgramStop.Execute; 583 580 Optimization := coNormal; 584 SourceCode := MemoSource.Text;581 SourceCode := FormSourceCode.MemoSource.Text; 585 582 ProjectFileName := Self.ProjectFileName; 586 583 ProgramName := ExtractFileNameOnly(Self.ProjectFileName); … … 588 585 Compile; 589 586 CurrentTarget.Messages.AppendMessage('done'); 590 MemoTarget.Text := TargetCode;587 FormTargetCode.MemoTarget.Text := TargetCode; 591 588 UpdateInterface; 592 589 end; … … 598 595 BreakPoint: TBreakPoint; 599 596 begin 600 DebugStep := CurrentTarget.DebugSteps.SearchBySourcePos( MemoSource.SelStart);597 DebugStep := CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.MemoSource.SelStart); 601 598 if Assigned(DebugStep) then begin 602 599 BreakPoint := CurrentTarget.BreakPoints.SearchByTargetPos(DebugStep.TargetPosition); … … 618 615 if CurrentTarget.State = rsStopped then begin 619 616 if not CurrentTarget.Compiled then AProgramCompile.Execute; 620 DebugStep := CurrentTarget.DebugSteps.SearchBySourcePos( MemoSource.SelStart);617 DebugStep := CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.MemoSource.SelStart); 621 618 CurrentTarget.BreakPoints.SetSystem(DebugStep.TargetPosition); 622 619 AProgramRun.Execute; 623 620 end else begin 624 DebugStep := CurrentTarget.DebugSteps.SearchBySourcePos( MemoSource.SelStart);621 DebugStep := CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.MemoSource.SelStart); 625 622 CurrentTarget.RunToCursor(DebugStep.TargetPosition); 626 623 end; … … 632 629 begin 633 630 DebugStep := CurrentTarget.DebugSteps.SearchByTargetPos(CurrentTarget.ExecutionPosition); 634 MemoSource.SelStart := DebugStep.SourcePosition;635 MemoTarget.SelStart := DebugStep.TargetPosition;636 if PageControlMain.TabIndex = 0 then MemoSource.SetFocus;637 if PageControlMain.TabIndex = 1 then MemoTarget.SetFocus;631 FormSourceCode.MemoSource.SelStart := DebugStep.SourcePosition; 632 FormTargetCode.MemoTarget.SelStart := DebugStep.TargetPosition; 633 if PageControlMain.TabIndex = 0 then FormSourceCode.MemoSource.SetFocus; 634 if PageControlMain.TabIndex = 1 then FormTargetCode.MemoTarget.SetFocus; 638 635 end; 639 636 … … 671 668 Modified := False; 672 669 ProjectFileName := ''; 673 MemoSource.Clear;670 FormSourceCode.MemoSource.Clear; 674 671 UpdateInterface; 675 672 end; … … 679 676 AProjectClose.Execute; 680 677 ProjectFileName := 'Examples' + DirectorySeparator + SNewProject + '.b'; 681 MemoSource.Clear;678 FormSourceCode.MemoSource.Clear; 682 679 Modified := False; 683 680 CurrentTarget.Compiled := False; … … 702 699 SaveDialog1.FileName := ProjectFileName; 703 700 if SaveDialog1.Execute then begin 704 MemoSource.Lines.SaveToFile(UTF8Decode(SaveDialog1.FileName));701 FormSourceCode.MemoSource.Lines.SaveToFile(UTF8Decode(SaveDialog1.FileName)); 705 702 ProjectFileName := SaveDialog1.FileName; 706 703 LastOpenedList.AddItem(SaveDialog1.FileName);
Note:
See TracChangeset
for help on using the changeset viewer.