Changeset 67
- Timestamp:
- Jan 17, 2015, 4:08:03 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormCPU.pas
r52 r67 34 34 35 35 uses 36 U FormMain, UTargetInterpretter;36 UCore, UTargetInterpretter; 37 37 38 38 {$R *.lfm} … … 45 45 procedure TFormCPU.Reload; 46 46 begin 47 if MainForm.CurrentTarget is TTargetInterpretter then48 with TTargetInterpretter( MainForm.CurrentTarget) do begin47 if Core.CurrentTarget is TTargetInterpretter then 48 with TTargetInterpretter(Core.CurrentTarget) do begin 49 49 LabelProgramPointer.Caption := IntToStr(ProgramIndex); 50 50 LabelMemoryPointer.Caption := IntToStr(MemoryPosition); -
trunk/Forms/UFormInput.pas
r38 r67 31 31 32 32 uses 33 U FormMain, UTargetInterpretter;33 UCore, UTargetInterpretter; 34 34 35 35 procedure TFormInput.MemoInputKeyPress(Sender: TObject; var Key: char); 36 36 begin 37 if MainForm.CurrentTarget is TTargetInterpretter then38 with TTargetInterpretter( MainForm.CurrentTarget) do37 if Core.CurrentTarget is TTargetInterpretter then 38 with TTargetInterpretter(Core.CurrentTarget) do 39 39 Input := Input + Key; 40 40 end; -
trunk/Forms/UFormMain.lfm
r60 r67 1 object MainForm: TMainForm1 object FormMain: TFormMain 2 2 Left = 408 3 3 Height = 586 … … 64 64 object ToolButton5: TToolButton 65 65 Left = 128 66 Height = 22 66 67 Top = 2 67 68 Width = 10 -
trunk/Forms/UFormMain.lrt
r60 r67 1 T MAINFORM.CAPTION=LazFuck2 T MAINFORM.TOOLBUTTONTARGET.HINT=Target select3 T MAINFORM.TOOLBUTTONTARGET.CAPTION=Target select4 T MAINFORM.TABSHEETDEBUG.CAPTION=Debug5 T MAINFORM.TABSHEETSOURCE.CAPTION=Source code6 T MAINFORM.TABSHEETTARGET.CAPTION=Target code7 T MAINFORM.TABSHEETMESSAGES.CAPTION=Messages8 T MAINFORM.MENUITEM1.CAPTION=Project9 T MAINFORM.MENUITEMOPENRECENT.CAPTION=Open recent10 T MAINFORM.MENUITEM5.CAPTION=-11 T MAINFORM.MENUITEM9.CAPTION=Program12 T MAINFORM.MENUITEMTARGET.CAPTION=Target13 T MAINFORM.MENUITEM17.CAPTION=-14 T MAINFORM.MENUITEM24.CAPTION=Tools15 T MAINFORM.MENUITEM18.CAPTION=View16 T MAINFORM.MENUITEM10.CAPTION=Help17 T MAINFORM.APROJECTOPEN.CAPTION=Open18 T MAINFORM.APROJECTSAVE.CAPTION=Save19 T MAINFORM.APROJECTCLOSE.CAPTION=Close20 T MAINFORM.APROJECTSAVEAS.CAPTION=Save as...21 T MAINFORM.APROJECTNEW.CAPTION=New22 T MAINFORM.AEXIT.CAPTION=Exit23 T MAINFORM.APROGRAMCOMPILE.CAPTION=Compile24 T MAINFORM.APROGRAMRUN.CAPTION=Run25 T MAINFORM.AABOUT.CAPTION=About26 T MAINFORM.AHELP.CAPTION=Help27 T MAINFORM.APROGRAMPAUSE.CAPTION=Pause28 T MAINFORM.APROGRAMSTOP.CAPTION=Stop29 T MAINFORM.APROGRAMSTEPINTO.CAPTION=Step into30 T MAINFORM.APROGRAMSTEPOVER.CAPTION=Step over31 T MAINFORM.APROGRAMRUNTOCURSOR.CAPTION=Run to cursor32 T MAINFORM.APROGRAMSTEPOUT.CAPTION=Step out33 T MAINFORM.ABREAKPOINTTOGGLE.CAPTION=Toggle breakpoint34 T MAINFORM.AOPTIONS.CAPTION=Options35 T MAINFORM.AVIEWCOMPILERS.CAPTION=Compilers36 T MAINFORM.ASHOWTARGETPOSITION.CAPTION=Show position in target37 T MAINFORM.ASHOWSOURCEPOSITION.CAPTION=Show position in source38 T MAINFORM.APROGRAMSHOWEXECUTIONPOINT.CAPTION=Show execution point39 T MAINFORM.AVIEWLOG.CAPTION=Log1 TFORMMAIN.CAPTION=LazFuck 2 TFORMMAIN.TOOLBUTTONTARGET.HINT=Target select 3 TFORMMAIN.TOOLBUTTONTARGET.CAPTION=Target select 4 TFORMMAIN.TABSHEETDEBUG.CAPTION=Debug 5 TFORMMAIN.TABSHEETSOURCE.CAPTION=Source code 6 TFORMMAIN.TABSHEETTARGET.CAPTION=Target code 7 TFORMMAIN.TABSHEETMESSAGES.CAPTION=Messages 8 TFORMMAIN.MENUITEM1.CAPTION=Project 9 TFORMMAIN.MENUITEMOPENRECENT.CAPTION=Open recent 10 TFORMMAIN.MENUITEM5.CAPTION=- 11 TFORMMAIN.MENUITEM9.CAPTION=Program 12 TFORMMAIN.MENUITEMTARGET.CAPTION=Target 13 TFORMMAIN.MENUITEM17.CAPTION=- 14 TFORMMAIN.MENUITEM24.CAPTION=Tools 15 TFORMMAIN.MENUITEM18.CAPTION=View 16 TFORMMAIN.MENUITEM10.CAPTION=Help 17 TFORMMAIN.APROJECTOPEN.CAPTION=Open 18 TFORMMAIN.APROJECTSAVE.CAPTION=Save 19 TFORMMAIN.APROJECTCLOSE.CAPTION=Close 20 TFORMMAIN.APROJECTSAVEAS.CAPTION=Save as... 21 TFORMMAIN.APROJECTNEW.CAPTION=New 22 TFORMMAIN.AEXIT.CAPTION=Exit 23 TFORMMAIN.APROGRAMCOMPILE.CAPTION=Compile 24 TFORMMAIN.APROGRAMRUN.CAPTION=Run 25 TFORMMAIN.AABOUT.CAPTION=About 26 TFORMMAIN.AHELP.CAPTION=Help 27 TFORMMAIN.APROGRAMPAUSE.CAPTION=Pause 28 TFORMMAIN.APROGRAMSTOP.CAPTION=Stop 29 TFORMMAIN.APROGRAMSTEPINTO.CAPTION=Step into 30 TFORMMAIN.APROGRAMSTEPOVER.CAPTION=Step over 31 TFORMMAIN.APROGRAMRUNTOCURSOR.CAPTION=Run to cursor 32 TFORMMAIN.APROGRAMSTEPOUT.CAPTION=Step out 33 TFORMMAIN.ABREAKPOINTTOGGLE.CAPTION=Toggle breakpoint 34 TFORMMAIN.AOPTIONS.CAPTION=Options 35 TFORMMAIN.AVIEWCOMPILERS.CAPTION=Compilers 36 TFORMMAIN.ASHOWTARGETPOSITION.CAPTION=Show position in target 37 TFORMMAIN.ASHOWSOURCEPOSITION.CAPTION=Show position in source 38 TFORMMAIN.APROGRAMSHOWEXECUTIONPOINT.CAPTION=Show execution point 39 TFORMMAIN.AVIEWLOG.CAPTION=Log -
trunk/Forms/UFormMain.pas
r65 r67 11 11 type 12 12 13 { T MainForm}14 15 T MainForm= class(TForm)13 { TFormMain } 14 15 TFormMain = class(TForm) 16 16 AViewLog: TAction; 17 17 AProgramShowExecutionPoint: TAction; … … 140 140 procedure TimerRefreshTimer(Sender: TObject); 141 141 private 142 FCurrentTarget: TTarget;143 procedure TargetLogExecute(Lines: TStrings);144 procedure SetCurrentTarget(AValue: TTarget);145 142 procedure AProjectOpenRecentExecute(Sender: TObject); 146 procedure TargetStateChanged(Sender: TObject);147 procedure MessagesChanged(Sender: TObject);148 143 procedure MenuItemTargetClick(Sender: TObject); 149 144 procedure ProjectOpen(FileName: string); … … 152 147 procedure LastOpenedListChange(Sender: TObject); 153 148 public 149 procedure MessagesChanged(Sender: TObject); 150 procedure TargetLogExecute(Lines: TStrings); 151 procedure TargetStateChanged(Sender: TObject); 154 152 procedure LoadFromRegistry(Root: HKEY; Key: string); 155 153 procedure SaveToRegistry(Root: HKEY; Key: string); … … 157 155 procedure UpdateStatusBar; 158 156 procedure UpdateTargetList; 159 property CurrentTarget: TTarget read FCurrentTarget write SetCurrentTarget; 160 end; 161 162 var 163 MainForm: TMainForm; 157 end; 158 159 var 160 FormMain: TFormMain; 164 161 165 162 … … 184 181 SCloseProjectFirst = 'Project need to be closed before it can be openned'; 185 182 186 { TMainForm } 187 188 procedure TMainForm.SetCurrentTarget(AValue: TTarget); 189 var 190 I: Integer; 191 begin 192 if FCurrentTarget = AValue then Exit; 193 FCurrentTarget := AValue; 194 for I := 0 to Core.Targets.Count - 1 do 195 TTarget(Core.Targets[I]).OnChangeState := nil; 196 if Assigned(FCurrentTarget) then begin 197 FCurrentTarget.OnChangeState := TargetStateChanged; 198 FCurrentTarget.OnLog := TargetLogExecute; 199 FCurrentTarget.OptimizationLevel := Core.OptimizationLevel; 200 FCurrentTarget.Messages.OnChange := MessagesChanged; 201 end; 202 UpdateTargetList; 203 UpdateInterface; 204 end; 205 206 procedure TMainForm.FormShow(Sender: TObject); 183 { TFormMain } 184 185 procedure TFormMain.FormShow(Sender: TObject); 207 186 begin 208 187 with Core.ScaleDPI do begin … … 222 201 end; 223 202 224 procedure T MainForm.TimerRefreshTimer(Sender: TObject);203 procedure TFormMain.TimerRefreshTimer(Sender: TObject); 225 204 begin 226 205 FormCPU.Reload; … … 229 208 end; 230 209 231 procedure T MainForm.TargetLogExecute(Lines: TStrings);210 procedure TFormMain.TargetLogExecute(Lines: TStrings); 232 211 begin 233 212 FormLog.Memo1.Lines.AddStrings(Lines); 234 213 end; 235 214 236 procedure T MainForm.TargetStateChanged(Sender: TObject);215 procedure TFormMain.TargetStateChanged(Sender: TObject); 237 216 begin 238 217 UpdateInterface; 239 if C urrentTarget.State = rsPaused then218 if Core.CurrentTarget.State = rsPaused then 240 219 AProgramShowExecutionPoint.Execute; 241 if CurrentTarget.State = rsStopped then CurrentTarget.Messages.AddMessage(SProgramStopped); 242 end; 243 244 procedure TMainForm.MessagesChanged(Sender: TObject); 220 if Core.CurrentTarget.State = rsStopped then 221 Core.CurrentTarget.Messages.AddMessage(SProgramStopped); 222 end; 223 224 procedure TFormMain.MessagesChanged(Sender: TObject); 245 225 begin 246 226 FormMessages.Reload; 247 227 end; 248 228 249 procedure T MainForm.MenuItemTargetClick(Sender: TObject);229 procedure TFormMain.MenuItemTargetClick(Sender: TObject); 250 230 var 251 231 I: Integer; … … 253 233 if Sender is TMenuItem then 254 234 with TMenuItem(Sender) do begin 255 C urrentTarget := TTarget(Core.Targets[MenuIndex]);235 Core.CurrentTarget := TTarget(Core.Targets[MenuIndex]); 256 236 Checked := True; 257 237 for I := 0 to Parent.Count - 1 do … … 260 240 end; 261 241 262 procedure T MainForm.ProjectOpen(FileName: string);242 procedure TFormMain.ProjectOpen(FileName: string); 263 243 begin 264 244 if Core.Project.Openned then … … 268 248 Core.Project.FileName := FileName; 269 249 Core.Project.Openned := True; 270 C urrentTarget.Compiled := False;250 Core.CurrentTarget.Compiled := False; 271 251 UpdateInterface; 272 252 end; 273 253 274 procedure T MainForm.UpdateToolBarHints;254 procedure TFormMain.UpdateToolBarHints; 275 255 var 276 256 I: Integer; … … 280 260 end; 281 261 282 procedure T MainForm.DockInit;262 procedure TFormMain.DockInit; 283 263 begin 284 264 FormSourceCode.ManualDock(TabSheetSource, nil, alClient); … … 303 283 FormMessages.Align := alClient; 304 284 FormMessages.Show; 305 PageControlRight.Width := MainForm.Width div 3;306 PageControlBottom.Height := MainForm.Height div 5;307 end; 308 309 procedure T MainForm.LastOpenedListChange(Sender: TObject);285 PageControlRight.Width := FormMain.Width div 3; 286 PageControlBottom.Height := FormMain.Height div 5; 287 end; 288 289 procedure TFormMain.LastOpenedListChange(Sender: TObject); 310 290 begin 311 291 Core.LastOpenedList.LoadToMenuItem(MenuItemOpenRecent, AProjectOpenRecentExecute); … … 313 293 end; 314 294 315 procedure T MainForm.LoadFromRegistry(Root: HKEY; Key: string);295 procedure TFormMain.LoadFromRegistry(Root: HKEY; Key: string); 316 296 var 317 297 TargetName: string; … … 322 302 OpenKey(Key, True); 323 303 TargetName := ReadStringWithDefault('TargetName', 'Interpretter'); 324 CurrentTarget := Core.Targets.FindByName(TargetName); 325 if not Assigned(CurrentTarget) then CurrentTarget := TTarget(Core.Targets[0]); 304 Core.CurrentTarget := Core.Targets.FindByName(TargetName); 305 if not Assigned(Core.CurrentTarget) then 306 Core.CurrentTarget := TTarget(Core.Targets[0]); 326 307 finally 327 308 Free; … … 329 310 end; 330 311 331 procedure T MainForm.SaveToRegistry(Root: HKEY; Key: string);312 procedure TFormMain.SaveToRegistry(Root: HKEY; Key: string); 332 313 begin 333 314 with TRegistryEx.Create do … … 335 316 RootKey := Root; 336 317 OpenKey(Key, True); 337 WriteString('TargetName', C urrentTarget.Name);318 WriteString('TargetName', Core.CurrentTarget.Name); 338 319 finally 339 320 Free; … … 341 322 end; 342 323 343 procedure T MainForm.UpdateInterface;324 procedure TFormMain.UpdateInterface; 344 325 var 345 326 Title: string; … … 354 335 AProjectClose.Enabled := Core.Project.Openned; 355 336 AProjectSaveAs.Enabled := Core.Project.Openned; 356 AProgramRun.Enabled := (tcRun in C urrentTarget.Capabilities) and357 Core.Project.Openned and (C urrentTarget.State = rsStopped) or (CurrentTarget.State = rsPaused);358 AProgramPause.Enabled := (tcPause in C urrentTarget.Capabilities) and359 Core.Project.Openned and (C urrentTarget.State = rsRunning);360 AProgramStop.Enabled := (tcStop in C urrentTarget.Capabilities) and361 Core.Project.Openned and (C urrentTarget.State <> rsStopped);362 AProgramCompile.Enabled := (tcCompile in C urrentTarget.Capabilities) and337 AProgramRun.Enabled := (tcRun in Core.CurrentTarget.Capabilities) and 338 Core.Project.Openned and (Core.CurrentTarget.State = rsStopped) or (Core.CurrentTarget.State = rsPaused); 339 AProgramPause.Enabled := (tcPause in Core.CurrentTarget.Capabilities) and 340 Core.Project.Openned and (Core.CurrentTarget.State = rsRunning); 341 AProgramStop.Enabled := (tcStop in Core.CurrentTarget.Capabilities) and 342 Core.Project.Openned and (Core.CurrentTarget.State <> rsStopped); 343 AProgramCompile.Enabled := (tcCompile in Core.CurrentTarget.Capabilities) and 363 344 Core.Project.Openned; 364 AProgramStepInto.Enabled := (tcStepInto in C urrentTarget.Capabilities) and365 Core.Project.Openned and ((C urrentTarget.State = rsPaused) or (CurrentTarget.State = rsStopped));366 AProgramStepOut.Enabled := (tcStepOut in C urrentTarget.Capabilities) and367 Core.Project.Openned and (C urrentTarget.State = rsPaused);368 AProgramRunToCursor.Enabled := (tcRunToCursor in C urrentTarget.Capabilities) and369 Core.Project.Openned and ((C urrentTarget.State = rsPaused) or (CurrentTarget.State = rsStopped));370 AProgramStepOver.Enabled := (tcStepOver in C urrentTarget.Capabilities) and371 Core.Project.Openned and ((C urrentTarget.State = rsPaused) or (CurrentTarget.State = rsStopped));372 AProgramShowExecutionPoint.Enabled := (tcPause in C urrentTarget.Capabilities) and373 Core.Project.Openned and (C urrentTarget.State = rsPaused);374 AShowSourcePosition.Enabled := C urrentTarget.Compiled;375 AShowTargetPosition.Enabled := C urrentTarget.Compiled;345 AProgramStepInto.Enabled := (tcStepInto in Core.CurrentTarget.Capabilities) and 346 Core.Project.Openned and ((Core.CurrentTarget.State = rsPaused) or (Core.CurrentTarget.State = rsStopped)); 347 AProgramStepOut.Enabled := (tcStepOut in Core.CurrentTarget.Capabilities) and 348 Core.Project.Openned and (Core.CurrentTarget.State = rsPaused); 349 AProgramRunToCursor.Enabled := (tcRunToCursor in Core.CurrentTarget.Capabilities) and 350 Core.Project.Openned and ((Core.CurrentTarget.State = rsPaused) or (Core.CurrentTarget.State = rsStopped)); 351 AProgramStepOver.Enabled := (tcStepOver in Core.CurrentTarget.Capabilities) and 352 Core.Project.Openned and ((Core.CurrentTarget.State = rsPaused) or (Core.CurrentTarget.State = rsStopped)); 353 AProgramShowExecutionPoint.Enabled := (tcPause in Core.CurrentTarget.Capabilities) and 354 Core.Project.Openned and (Core.CurrentTarget.State = rsPaused); 355 AShowSourcePosition.Enabled := Core.CurrentTarget.Compiled; 356 AShowTargetPosition.Enabled := Core.CurrentTarget.Compiled; 376 357 UpdateStatusBar; 377 358 end; 378 359 379 procedure T MainForm.UpdateStatusBar;360 procedure TFormMain.UpdateStatusBar; 380 361 begin 381 362 StatusBarMain.Panels[0].Text := IntToStr(FormSourceCode.MemoSource.CaretPos.X) + … … 383 364 end; 384 365 385 procedure T MainForm.UpdateTargetList;366 procedure TFormMain.UpdateTargetList; 386 367 var 387 368 I: Integer; 388 369 begin 389 Core.Targets.LoadToMenuItem(MenuItemTarget, MenuItemTargetClick, C urrentTarget);390 Core.Targets.LoadToMenuItem(PopupMenuTargets.Items, MenuItemTargetClick, C urrentTarget);370 Core.Targets.LoadToMenuItem(MenuItemTarget, MenuItemTargetClick, Core.CurrentTarget); 371 Core.Targets.LoadToMenuItem(PopupMenuTargets.Items, MenuItemTargetClick, Core.CurrentTarget); 391 372 392 373 // Update toolbutton 393 I := Core.Targets.IndexOf(C urrentTarget);374 I := Core.Targets.IndexOf(Core.CurrentTarget); 394 375 if I <> -1 then 395 376 with TTarget(Core.Targets[I]) do begin … … 400 381 end; 401 382 402 procedure T MainForm.FormCreate(Sender: TObject);383 procedure TFormMain.FormCreate(Sender: TObject); 403 384 begin 404 385 UpdateTargetList; … … 406 387 end; 407 388 408 procedure T MainForm.FormDestroy(Sender: TObject);389 procedure TFormMain.FormDestroy(Sender: TObject); 409 390 begin 410 391 SaveToRegistry(HKEY(Core.ApplicationInfo.RegistryRoot), Core.ApplicationInfo.RegistryKey); 411 392 end; 412 393 413 procedure T MainForm.AProgramRunExecute(Sender: TObject);414 begin 415 if C urrentTarget is TTargetInterpretter then416 TTargetInterpretter(C urrentTarget).Input := FormInput.MemoInput.Lines.Text;417 if not C urrentTarget.Compiled then AProgramCompile.Execute;418 C urrentTarget.Run;419 C urrentTarget.Messages.AddMessage(SProgramStarted);420 end; 421 422 procedure T MainForm.AShowSourcePositionExecute(Sender: TObject);394 procedure TFormMain.AProgramRunExecute(Sender: TObject); 395 begin 396 if Core.CurrentTarget is TTargetInterpretter then 397 TTargetInterpretter(Core.CurrentTarget).Input := FormInput.MemoInput.Lines.Text; 398 if not Core.CurrentTarget.Compiled then AProgramCompile.Execute; 399 Core.CurrentTarget.Run; 400 Core.CurrentTarget.Messages.AddMessage(SProgramStarted); 401 end; 402 403 procedure TFormMain.AShowSourcePositionExecute(Sender: TObject); 423 404 var 424 405 DebugStep: TDebugStep; 425 406 begin 426 DebugStep := C urrentTarget.DebugSteps.SearchByTargetPos(FormTargetCode.MemoTarget.SelStart);407 DebugStep := Core.CurrentTarget.DebugSteps.SearchByTargetPos(FormTargetCode.MemoTarget.SelStart); 427 408 if Assigned(DebugStep) then begin 428 409 FormSourceCode.MemoSource.SelStart := DebugStep.SourcePosition; … … 431 412 end; 432 413 433 procedure T MainForm.AShowTargetPositionExecute(Sender: TObject);414 procedure TFormMain.AShowTargetPositionExecute(Sender: TObject); 434 415 var 435 416 DebugStep: TDebugStep; 436 417 begin 437 DebugStep := C urrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.MemoSource.SelStart);418 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.MemoSource.SelStart); 438 419 if Assigned(DebugStep) then begin 439 420 FormTargetCode.MemoTarget.SelStart := DebugStep.TargetPosition; … … 442 423 end; 443 424 444 procedure T MainForm.AViewCompilersExecute(Sender: TObject);425 procedure TFormMain.AViewCompilersExecute(Sender: TObject); 445 426 begin 446 427 FormCompilers.Show; 447 428 end; 448 429 449 procedure T MainForm.AViewInterpretterExecute(Sender: TObject);430 procedure TFormMain.AViewInterpretterExecute(Sender: TObject); 450 431 begin 451 432 FormCPU.Show; 452 433 end; 453 434 454 procedure T MainForm.AViewLogExecute(Sender: TObject);435 procedure TFormMain.AViewLogExecute(Sender: TObject); 455 436 begin 456 437 FormLog.Show; 457 438 end; 458 439 459 procedure T MainForm.FormCloseQuery(Sender: TObject; var CanClose: boolean);440 procedure TFormMain.FormCloseQuery(Sender: TObject; var CanClose: boolean); 460 441 begin 461 442 if Core.Project.Modified then begin … … 465 446 end; 466 447 467 procedure T MainForm.AExitExecute(Sender: TObject);448 procedure TFormMain.AExitExecute(Sender: TObject); 468 449 begin 469 450 Close; 470 451 end; 471 452 472 procedure T MainForm.AOptionsExecute(Sender: TObject);453 procedure TFormMain.AOptionsExecute(Sender: TObject); 473 454 begin 474 455 OptionsForm.Load; … … 477 458 //OptionsForm.SaveToInterpretter(CurrentTarget); 478 459 OptionsForm.Save; 479 if Assigned(C urrentTarget) then480 C urrentTarget.OptimizationLevel := Core.OptimizationLevel;481 end; 482 end; 483 484 procedure T MainForm.AProgramCompileExecute(Sender: TObject);485 begin 486 with C urrentTarget do begin460 if Assigned(Core.CurrentTarget) then 461 Core.CurrentTarget.OptimizationLevel := Core.OptimizationLevel; 462 end; 463 end; 464 465 procedure TFormMain.AProgramCompileExecute(Sender: TObject); 466 begin 467 with Core.CurrentTarget do begin 487 468 AProgramStop.Execute; 488 469 SourceCode := FormSourceCode.MemoSource.Text; 489 470 ProjectFileName := Core.Project.FileName; 490 471 ProgramName := ExtractFileNameOnly(Core.Project.FileName); 491 C urrentTarget.Messages.AddMessage(SCompileStart);472 Core.CurrentTarget.Messages.AddMessage(SCompileStart); 492 473 Compile; 493 C urrentTarget.Messages.AppendMessage(SDone);474 Core.CurrentTarget.Messages.AppendMessage(SDone); 494 475 FormTargetCode.MemoTarget.Text := TargetCode; 495 476 UpdateInterface; … … 497 478 end; 498 479 499 procedure T MainForm.ABreakpointToggleExecute(Sender: TObject);480 procedure TFormMain.ABreakpointToggleExecute(Sender: TObject); 500 481 var 501 482 DebugStep: TDebugStep; 502 483 BreakPoint: TBreakPoint; 503 484 begin 504 DebugStep := C urrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.MemoSource.SelStart);485 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.MemoSource.SelStart); 505 486 if Assigned(DebugStep) then begin 506 BreakPoint := C urrentTarget.BreakPoints.SearchByTargetPos(DebugStep.TargetPosition);487 BreakPoint := Core.CurrentTarget.BreakPoints.SearchByTargetPos(DebugStep.TargetPosition); 507 488 if Assigned(BreakPoint) then 508 C urrentTarget.BreakPoints.Delete(CurrentTarget.BreakPoints.IndexOf(BreakPoint))509 else C urrentTarget.BreakPoints.AddItem(DebugStep.TargetPosition);510 end; 511 end; 512 513 procedure T MainForm.AProgramPauseExecute(Sender: TObject);514 begin 515 C urrentTarget.Pause;516 end; 517 518 procedure T MainForm.AProgramRunToCursorExecute(Sender: TObject);489 Core.CurrentTarget.BreakPoints.Delete(Core.CurrentTarget.BreakPoints.IndexOf(BreakPoint)) 490 else Core.CurrentTarget.BreakPoints.AddItem(DebugStep.TargetPosition); 491 end; 492 end; 493 494 procedure TFormMain.AProgramPauseExecute(Sender: TObject); 495 begin 496 Core.CurrentTarget.Pause; 497 end; 498 499 procedure TFormMain.AProgramRunToCursorExecute(Sender: TObject); 519 500 var 520 501 DebugStep: TDebugStep; 521 502 begin 522 if C urrentTarget.State = rsStopped then begin523 if not C urrentTarget.Compiled then AProgramCompile.Execute;524 DebugStep := C urrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.MemoSource.SelStart);525 C urrentTarget.BreakPoints.SetSystem(DebugStep.TargetPosition);503 if Core.CurrentTarget.State = rsStopped then begin 504 if not Core.CurrentTarget.Compiled then AProgramCompile.Execute; 505 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.MemoSource.SelStart); 506 Core.CurrentTarget.BreakPoints.SetSystem(DebugStep.TargetPosition); 526 507 AProgramRun.Execute; 527 508 end else begin 528 DebugStep := C urrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.MemoSource.SelStart);529 C urrentTarget.RunToCursor(DebugStep.TargetPosition);530 end; 531 end; 532 533 procedure T MainForm.AProgramShowExecutionPointExecute(Sender: TObject);509 DebugStep := Core.CurrentTarget.DebugSteps.SearchBySourcePos(FormSourceCode.MemoSource.SelStart); 510 Core.CurrentTarget.RunToCursor(DebugStep.TargetPosition); 511 end; 512 end; 513 514 procedure TFormMain.AProgramShowExecutionPointExecute(Sender: TObject); 534 515 var 535 516 DebugStep: TDebugStep; 536 517 begin 537 DebugStep := C urrentTarget.DebugSteps.SearchByTargetPos(CurrentTarget.ExecutionPosition);518 DebugStep := Core.CurrentTarget.DebugSteps.SearchByTargetPos(Core.CurrentTarget.ExecutionPosition); 538 519 FormSourceCode.MemoSource.SelStart := DebugStep.SourcePosition; 539 520 FormTargetCode.MemoTarget.SelStart := DebugStep.TargetPosition; … … 542 523 end; 543 524 544 procedure T MainForm.AProgramStepIntoExecute(Sender: TObject);545 begin 546 if C urrentTarget.State = rsStopped then begin547 if not C urrentTarget.Compiled then AProgramCompile.Execute;548 C urrentTarget.BreakPoints.SetSystem(TDebugStep(CurrentTarget.DebugSteps.First).TargetPosition);525 procedure TFormMain.AProgramStepIntoExecute(Sender: TObject); 526 begin 527 if Core.CurrentTarget.State = rsStopped then begin 528 if not Core.CurrentTarget.Compiled then AProgramCompile.Execute; 529 Core.CurrentTarget.BreakPoints.SetSystem(TDebugStep(Core.CurrentTarget.DebugSteps.First).TargetPosition); 549 530 AProgramRun.Execute; 550 end else C urrentTarget.StepInto;551 end; 552 553 procedure T MainForm.AProgramStepOutExecute(Sender: TObject);554 begin 555 C urrentTarget.StepOut;556 end; 557 558 procedure T MainForm.AProgramStepOverExecute(Sender: TObject);559 begin 560 if C urrentTarget.State = rsStopped then begin561 if not C urrentTarget.Compiled then AProgramCompile.Execute;562 C urrentTarget.BreakPoints.SetSystem(TDebugStep(CurrentTarget.DebugSteps.First).TargetPosition);531 end else Core.CurrentTarget.StepInto; 532 end; 533 534 procedure TFormMain.AProgramStepOutExecute(Sender: TObject); 535 begin 536 Core.CurrentTarget.StepOut; 537 end; 538 539 procedure TFormMain.AProgramStepOverExecute(Sender: TObject); 540 begin 541 if Core.CurrentTarget.State = rsStopped then begin 542 if not Core.CurrentTarget.Compiled then AProgramCompile.Execute; 543 Core.CurrentTarget.BreakPoints.SetSystem(TDebugStep(Core.CurrentTarget.DebugSteps.First).TargetPosition); 563 544 AProgramRun.Execute; 564 end else C urrentTarget.StepOver;565 end; 566 567 procedure T MainForm.AProgramStopExecute(Sender: TObject);568 begin 569 C urrentTarget.Stop;570 end; 571 572 procedure T MainForm.AProjectCloseExecute(Sender: TObject);545 end else Core.CurrentTarget.StepOver; 546 end; 547 548 procedure TFormMain.AProgramStopExecute(Sender: TObject); 549 begin 550 Core.CurrentTarget.Stop; 551 end; 552 553 procedure TFormMain.AProjectCloseExecute(Sender: TObject); 573 554 var 574 555 DialogResult: TModalResult; … … 589 570 end; 590 571 591 procedure T MainForm.AProjectNewExecute(Sender: TObject);572 procedure TFormMain.AProjectNewExecute(Sender: TObject); 592 573 begin 593 574 AProjectClose.Execute; … … 596 577 FormSourceCode.MemoSource.Clear; 597 578 Core.Project.Openned := True; 598 C urrentTarget.Compiled := False;579 Core.CurrentTarget.Compiled := False; 599 580 UpdateInterface; 600 581 end; 601 582 602 procedure T MainForm.AProjectOpenRecentExecute(Sender: TObject);583 procedure TFormMain.AProjectOpenRecentExecute(Sender: TObject); 603 584 begin 604 585 AProjectClose.Execute; … … 607 588 end; 608 589 609 procedure T MainForm.AProjectOpenExecute(Sender: TObject);590 procedure TFormMain.AProjectOpenExecute(Sender: TObject); 610 591 begin 611 592 if Core.LastOpenedList.Items.Count > 0 then … … 620 601 end; 621 602 622 procedure T MainForm.AProjectSaveAsExecute(Sender: TObject);603 procedure TFormMain.AProjectSaveAsExecute(Sender: TObject); 623 604 begin 624 605 SaveDialog1.FileName := Core.Project.FileName; … … 632 613 end; 633 614 634 procedure T MainForm.AProjectSaveExecute(Sender: TObject);615 procedure TFormMain.AProjectSaveExecute(Sender: TObject); 635 616 begin 636 617 if Core.Project.Modified and FileExistsUTF8(Core.Project.FileName) then begin -
trunk/Forms/UFormMemory.pas
r61 r67 34 34 35 35 uses 36 U FormMain, UTargetInterpretter;36 UCore, UTargetInterpretter; 37 37 38 38 { TFormMemory } … … 40 40 procedure TFormMemory.Reload; 41 41 begin 42 if MainForm.CurrentTarget is TTargetInterpretter then43 with TTargetInterpretter( MainForm.CurrentTarget) do begin42 if Core.CurrentTarget is TTargetInterpretter then 43 with TTargetInterpretter(Core.CurrentTarget) do begin 44 44 ListViewMemory.Items.Count := Trunc(Length(Memory) / RowSize); 45 45 ListViewMemory.Refresh; … … 52 52 I: Integer; 53 53 begin 54 if MainForm.CurrentTarget is TTargetInterpretter then55 with TTargetInterpretter( MainForm.CurrentTarget) do54 if Core.CurrentTarget is TTargetInterpretter then 55 with TTargetInterpretter(Core.CurrentTarget) do 56 56 if (Item.Index >= 0) and (Item.Index < Trunc(Length(Memory) / RowSize)) then begin 57 57 Item.Caption := IntToHex(Item.Index * RowSize, 8); -
trunk/Forms/UFormMessages.pas
r40 r67 31 31 32 32 uses 33 U FormMain, UTarget;33 UCore, UTarget; 34 34 35 35 { TFormMessages } … … 37 37 procedure TFormMessages.ListView1Data(Sender: TObject; Item: TListItem); 38 38 begin 39 with MainForm.CurrentTarget do39 with Core.CurrentTarget do 40 40 if (Item.Index >= 0) and (Item.Index < Messages.Count) then 41 41 with TMessage(Messages[Item.Index]) do begin … … 52 52 procedure TFormMessages.Reload; 53 53 begin 54 ListView1.Items.Count := MainForm.CurrentTarget.Messages.Count;54 ListView1.Items.Count := Core.CurrentTarget.Messages.Count; 55 55 ListView1.Refresh; 56 56 end; -
trunk/Forms/UFormOptions.lfm
r64 r67 1 1 object OptionsForm: TOptionsForm 2 Left = 4152 Left = 665 3 3 Height = 339 4 Top = 2104 Top = 370 5 5 Width = 468 6 6 Caption = 'Options' -
trunk/Forms/UFormOutput.pas
r38 r67 29 29 30 30 uses 31 U FormMain, UTargetInterpretter;31 UCore, UTargetInterpretter; 32 32 33 33 { TFormOutput } … … 35 35 procedure TFormOutput.Reload; 36 36 begin 37 if MainForm.CurrentTarget is TTargetInterpretter then38 with TTargetInterpretter( MainForm.CurrentTarget) do37 if Core.CurrentTarget is TTargetInterpretter then 38 with TTargetInterpretter(Core.CurrentTarget) do 39 39 MemoOutput.Lines.Text := Output; 40 40 end; -
trunk/Forms/UFormSourceCode.lfm
r61 r67 27 27 end 28 28 object PopupMenuSource: TPopupMenu 29 Images = MainForm.ImageListMain29 Images = FormMain.ImageListMain 30 30 left = 128 31 31 top = 112 32 32 object MenuItem23: TMenuItem 33 Action = MainForm.ABreakpointToggle33 Action = FormMain.ABreakpointToggle 34 34 end 35 35 object MenuItem26: TMenuItem … … 76 76 end 77 77 object MenuItem29: TMenuItem 78 Action = MainForm.AShowTargetPosition78 Action = FormMain.AShowTargetPosition 79 79 Bitmap.Data = { 80 80 36040000424D3604000000000000360000002800000010000000100000000100 … … 281 281 end 282 282 object ActionList1: TActionList 283 Images = MainForm.ImageListMain283 Images = FormMain.ImageListMain 284 284 left = 128 285 285 top = 56 -
trunk/Forms/UFormSourceCode.pas
r61 r67 169 169 begin 170 170 Core.Project.Modified := True; 171 MainForm.CurrentTarget.Compiled := False;172 MainForm.UpdateInterface;171 Core.CurrentTarget.Compiled := False; 172 FormMain.UpdateInterface; 173 173 end; 174 174 … … 185 185 Shift: TShiftState); 186 186 begin 187 MainForm.UpdateStatusBar;187 FormMain.UpdateStatusBar; 188 188 end; 189 189 … … 191 191 Shift: TShiftState; X, Y: Integer); 192 192 begin 193 MainForm.UpdateStatusBar;193 FormMain.UpdateStatusBar; 194 194 end; 195 195 -
trunk/Languages/LazFuckIDE.cs.po
r65 r67 106 106 msgstr "Záznam" 107 107 108 #: tformmain.aabout.caption 109 #, fuzzy 110 msgctxt "tformmain.aabout.caption" 111 msgid "About" 112 msgstr "O programu" 113 114 #: tformmain.abreakpointtoggle.caption 115 #, fuzzy 116 msgctxt "tformmain.abreakpointtoggle.caption" 117 msgid "Toggle breakpoint" 118 msgstr "PÅepnout bod zastavenÃ" 119 120 #: tformmain.aexit.caption 121 #, fuzzy 122 msgctxt "tformmain.aexit.caption" 123 msgid "Exit" 124 msgstr "UkonÄit" 125 126 #: tformmain.ahelp.caption 127 #, fuzzy 128 msgctxt "tformmain.ahelp.caption" 129 msgid "Help" 130 msgstr "NápovÄda" 131 132 #: tformmain.aoptions.caption 133 #, fuzzy 134 msgctxt "tformmain.aoptions.caption" 135 msgid "Options" 136 msgstr "Volby" 137 138 #: tformmain.aprogramcompile.caption 139 #, fuzzy 140 msgctxt "tformmain.aprogramcompile.caption" 141 msgid "Compile" 142 msgstr "PÅeloÅŸit" 143 144 #: tformmain.aprogrampause.caption 145 #, fuzzy 146 msgctxt "tformmain.aprogrampause.caption" 147 msgid "Pause" 148 msgstr "Pozastavit" 149 150 #: tformmain.aprogramrun.caption 151 #, fuzzy 152 msgctxt "tformmain.aprogramrun.caption" 153 msgid "Run" 154 msgstr "Spustit" 155 156 #: tformmain.aprogramruntocursor.caption 157 #, fuzzy 158 msgctxt "tformmain.aprogramruntocursor.caption" 159 msgid "Run to cursor" 160 msgstr "Spustit po ukazatel" 161 162 #: tformmain.aprogramshowexecutionpoint.caption 163 #, fuzzy 164 msgctxt "tformmain.aprogramshowexecutionpoint.caption" 165 msgid "Show execution point" 166 msgstr "Ukázat bod vykonánÃ" 167 168 #: tformmain.aprogramstepinto.caption 169 #, fuzzy 170 msgctxt "tformmain.aprogramstepinto.caption" 171 msgid "Step into" 172 msgstr "Vstoupit do" 173 174 #: tformmain.aprogramstepout.caption 175 #, fuzzy 176 msgctxt "tformmain.aprogramstepout.caption" 177 msgid "Step out" 178 msgstr "Vystoupit z" 179 180 #: tformmain.aprogramstepover.caption 181 #, fuzzy 182 msgctxt "tformmain.aprogramstepover.caption" 183 msgid "Step over" 184 msgstr "PÅejÃt pÅes" 185 186 #: tformmain.aprogramstop.caption 187 #, fuzzy 188 msgctxt "tformmain.aprogramstop.caption" 189 msgid "Stop" 190 msgstr "Zastavit" 191 192 #: tformmain.aprojectclose.caption 193 #, fuzzy 194 msgctxt "tformmain.aprojectclose.caption" 195 msgid "Close" 196 msgstr "ZavÅÃt" 197 198 #: tformmain.aprojectnew.caption 199 #, fuzzy 200 msgctxt "tformmain.aprojectnew.caption" 201 msgid "New" 202 msgstr "NovÃœ" 203 204 #: tformmain.aprojectopen.caption 205 #, fuzzy 206 msgctxt "tformmain.aprojectopen.caption" 207 msgid "Open" 208 msgstr "OtevÅÃt" 209 210 #: tformmain.aprojectsave.caption 211 #, fuzzy 212 msgctxt "tformmain.aprojectsave.caption" 213 msgid "Save" 214 msgstr "UloÅŸit" 215 216 #: tformmain.aprojectsaveas.caption 217 #, fuzzy 218 msgctxt "tformmain.aprojectsaveas.caption" 219 msgid "Save as..." 220 msgstr "UloÅŸit jako..." 221 222 #: tformmain.ashowsourceposition.caption 223 #, fuzzy 224 msgctxt "tformmain.ashowsourceposition.caption" 225 msgid "Show position in source" 226 msgstr "UkaÅŸ pozici ve zdroji" 227 228 #: tformmain.ashowtargetposition.caption 229 #, fuzzy 230 msgctxt "tformmain.ashowtargetposition.caption" 231 msgid "Show position in target" 232 msgstr "UkaÅŸ pozici v cÃli" 233 234 #: tformmain.aviewcompilers.caption 235 #, fuzzy 236 msgctxt "tformmain.aviewcompilers.caption" 237 msgid "Compilers" 238 msgstr "PÅekladaÄe" 239 240 #: tformmain.aviewlog.caption 241 #, fuzzy 242 msgctxt "tformmain.aviewlog.caption" 243 msgid "Log" 244 msgstr "Záznam" 245 246 #: tformmain.caption 247 #, fuzzy 248 msgctxt "tformmain.caption" 249 msgid "LazFuck" 250 msgstr "LazFuck" 251 252 #: tformmain.menuitem1.caption 253 #, fuzzy 254 msgctxt "tformmain.menuitem1.caption" 255 msgid "Project" 256 msgstr "Projekt" 257 258 #: tformmain.menuitem10.caption 259 #, fuzzy 260 msgctxt "tformmain.menuitem10.caption" 261 msgid "Help" 262 msgstr "NápovÄda" 263 264 #: tformmain.menuitem17.caption 265 #, fuzzy 266 msgctxt "tformmain.menuitem17.caption" 267 msgid "-" 268 msgstr "-" 269 270 #: tformmain.menuitem18.caption 271 #, fuzzy 272 msgctxt "tformmain.menuitem18.caption" 273 msgid "View" 274 msgstr "ZobrazenÃ" 275 276 #: tformmain.menuitem24.caption 277 #, fuzzy 278 msgctxt "tformmain.menuitem24.caption" 279 msgid "Tools" 280 msgstr "Nástroje" 281 282 #: tformmain.menuitem5.caption 283 #, fuzzy 284 msgctxt "tformmain.menuitem5.caption" 285 msgid "-" 286 msgstr "-" 287 288 #: tformmain.menuitem9.caption 289 #, fuzzy 290 msgctxt "tformmain.menuitem9.caption" 291 msgid "Program" 292 msgstr "Program" 293 294 #: tformmain.menuitemopenrecent.caption 295 #, fuzzy 296 msgctxt "tformmain.menuitemopenrecent.caption" 297 msgid "Open recent" 298 msgstr "OtevÅÃt nedávnÃœ" 299 300 #: tformmain.menuitemtarget.caption 301 #, fuzzy 302 msgctxt "tformmain.menuitemtarget.caption" 303 msgid "Target" 304 msgstr "CÃl" 305 306 #: tformmain.tabsheetdebug.caption 307 #, fuzzy 308 msgctxt "tformmain.tabsheetdebug.caption" 309 msgid "Debug" 310 msgstr "LadÄnÃ" 311 312 #: tformmain.tabsheetmessages.caption 313 #, fuzzy 314 msgctxt "tformmain.tabsheetmessages.caption" 315 msgid "Messages" 316 msgstr "Zprávy" 317 318 #: tformmain.tabsheetsource.caption 319 #, fuzzy 320 msgctxt "tformmain.tabsheetsource.caption" 321 msgid "Source code" 322 msgstr "ZdrojovÃœ kód" 323 324 #: tformmain.tabsheettarget.caption 325 #, fuzzy 326 msgctxt "tformmain.tabsheettarget.caption" 327 msgid "Target code" 328 msgstr "CÃlovÃœ kód" 329 330 #: tformmain.toolbuttontarget.caption 331 #, fuzzy 332 msgctxt "tformmain.toolbuttontarget.caption" 333 msgid "Target select" 334 msgstr "VÃœbÄr cÃle" 335 336 #: tformmain.toolbuttontarget.hint 337 #, fuzzy 338 msgctxt "tformmain.toolbuttontarget.hint" 339 msgid "Target select" 340 msgstr "VÃœbÄr cÃle" 341 108 342 #: tformmemory.caption 109 343 msgid "Memory" … … 338 572 339 573 #: tmainform.aabout.caption 574 msgctxt "tmainform.aabout.caption" 340 575 msgid "About" 341 576 msgstr "O programu" 342 577 343 578 #: tmainform.abreakpointtoggle.caption 579 msgctxt "tmainform.abreakpointtoggle.caption" 344 580 msgid "Toggle breakpoint" 345 581 msgstr "PÅepnout bod zastavenÃ" 346 582 347 583 #: tmainform.aexit.caption 584 msgctxt "tmainform.aexit.caption" 348 585 msgid "Exit" 349 586 msgstr "UkonÄit" … … 365 602 366 603 #: tmainform.aprogrampause.caption 604 msgctxt "tmainform.aprogrampause.caption" 367 605 msgid "Pause" 368 606 msgstr "Pozastavit" 369 607 370 608 #: tmainform.aprogramrun.caption 609 msgctxt "tmainform.aprogramrun.caption" 371 610 msgid "Run" 372 611 msgstr "Spustit" … … 378 617 379 618 #: tmainform.aprogramshowexecutionpoint.caption 619 msgctxt "tmainform.aprogramshowexecutionpoint.caption" 380 620 msgid "Show execution point" 381 621 msgstr "Ukázat bod vykonánÃ" … … 397 637 398 638 #: tmainform.aprogramstop.caption 639 msgctxt "tmainform.aprogramstop.caption" 399 640 msgid "Stop" 400 641 msgstr "Zastavit" 401 642 402 643 #: tmainform.aprojectclose.caption 644 msgctxt "tmainform.aprojectclose.caption" 403 645 msgid "Close" 404 646 msgstr "ZavÅÃt" 405 647 406 648 #: tmainform.aprojectnew.caption 649 msgctxt "tmainform.aprojectnew.caption" 407 650 msgid "New" 408 651 msgstr "NovÃœ" 409 652 410 653 #: tmainform.aprojectopen.caption 654 msgctxt "tmainform.aprojectopen.caption" 411 655 msgid "Open" 412 656 msgstr "OtevÅÃt" 413 657 414 658 #: tmainform.aprojectsave.caption 659 msgctxt "tmainform.aprojectsave.caption" 415 660 msgid "Save" 416 661 msgstr "UloÅŸit" 417 662 418 663 #: tmainform.aprojectsaveas.caption 664 msgctxt "tmainform.aprojectsaveas.caption" 419 665 msgid "Save as..." 420 666 msgstr "UloÅŸit jako..." 421 667 422 668 #: tmainform.ashowsourceposition.caption 669 msgctxt "tmainform.ashowsourceposition.caption" 423 670 msgid "Show position in source" 424 671 msgstr "UkaÅŸ pozici ve zdroji" 425 672 426 673 #: tmainform.ashowtargetposition.caption 674 msgctxt "tmainform.ashowtargetposition.caption" 427 675 msgid "Show position in target" 428 676 msgstr "UkaÅŸ pozici v cÃli" … … 439 687 440 688 #: tmainform.caption 689 msgctxt "tmainform.caption" 441 690 msgid "LazFuck" 442 691 msgstr "LazFuck" 443 692 444 693 #: tmainform.menuitem1.caption 694 msgctxt "tmainform.menuitem1.caption" 445 695 msgid "Project" 446 696 msgstr "Projekt" … … 457 707 458 708 #: tmainform.menuitem18.caption 709 msgctxt "tmainform.menuitem18.caption" 459 710 msgid "View" 460 711 msgstr "ZobrazenÃ" 461 712 462 713 #: tmainform.menuitem24.caption 714 msgctxt "tmainform.menuitem24.caption" 463 715 msgid "Tools" 464 716 msgstr "Nástroje" … … 470 722 471 723 #: tmainform.menuitem9.caption 724 msgctxt "tmainform.menuitem9.caption" 472 725 msgid "Program" 473 726 msgstr "Program" 474 727 475 728 #: tmainform.menuitemopenrecent.caption 729 msgctxt "tmainform.menuitemopenrecent.caption" 476 730 msgid "Open recent" 477 731 msgstr "OtevÅÃt nedávnÃœ" … … 763 1017 msgid "Unsupported command" 764 1018 msgstr "NepodporovanÃœ pÅÃkaz" 1019 -
trunk/Languages/LazFuckIDE.po
r65 r67 95 95 msgstr "" 96 96 97 #: tformmain.aabout.caption 98 msgctxt "TFORMMAIN.AABOUT.CAPTION" 99 msgid "About" 100 msgstr "" 101 102 #: tformmain.abreakpointtoggle.caption 103 msgctxt "TFORMMAIN.ABREAKPOINTTOGGLE.CAPTION" 104 msgid "Toggle breakpoint" 105 msgstr "" 106 107 #: tformmain.aexit.caption 108 msgctxt "TFORMMAIN.AEXIT.CAPTION" 109 msgid "Exit" 110 msgstr "" 111 112 #: tformmain.ahelp.caption 113 msgctxt "TFORMMAIN.AHELP.CAPTION" 114 msgid "Help" 115 msgstr "" 116 117 #: tformmain.aoptions.caption 118 msgctxt "TFORMMAIN.AOPTIONS.CAPTION" 119 msgid "Options" 120 msgstr "" 121 122 #: tformmain.aprogramcompile.caption 123 msgctxt "TFORMMAIN.APROGRAMCOMPILE.CAPTION" 124 msgid "Compile" 125 msgstr "" 126 127 #: tformmain.aprogrampause.caption 128 msgctxt "TFORMMAIN.APROGRAMPAUSE.CAPTION" 129 msgid "Pause" 130 msgstr "" 131 132 #: tformmain.aprogramrun.caption 133 msgctxt "TFORMMAIN.APROGRAMRUN.CAPTION" 134 msgid "Run" 135 msgstr "" 136 137 #: tformmain.aprogramruntocursor.caption 138 msgctxt "TFORMMAIN.APROGRAMRUNTOCURSOR.CAPTION" 139 msgid "Run to cursor" 140 msgstr "" 141 142 #: tformmain.aprogramshowexecutionpoint.caption 143 msgctxt "TFORMMAIN.APROGRAMSHOWEXECUTIONPOINT.CAPTION" 144 msgid "Show execution point" 145 msgstr "" 146 147 #: tformmain.aprogramstepinto.caption 148 msgctxt "TFORMMAIN.APROGRAMSTEPINTO.CAPTION" 149 msgid "Step into" 150 msgstr "" 151 152 #: tformmain.aprogramstepout.caption 153 msgctxt "TFORMMAIN.APROGRAMSTEPOUT.CAPTION" 154 msgid "Step out" 155 msgstr "" 156 157 #: tformmain.aprogramstepover.caption 158 msgctxt "TFORMMAIN.APROGRAMSTEPOVER.CAPTION" 159 msgid "Step over" 160 msgstr "" 161 162 #: tformmain.aprogramstop.caption 163 msgctxt "TFORMMAIN.APROGRAMSTOP.CAPTION" 164 msgid "Stop" 165 msgstr "" 166 167 #: tformmain.aprojectclose.caption 168 msgctxt "TFORMMAIN.APROJECTCLOSE.CAPTION" 169 msgid "Close" 170 msgstr "" 171 172 #: tformmain.aprojectnew.caption 173 msgctxt "TFORMMAIN.APROJECTNEW.CAPTION" 174 msgid "New" 175 msgstr "" 176 177 #: tformmain.aprojectopen.caption 178 msgctxt "TFORMMAIN.APROJECTOPEN.CAPTION" 179 msgid "Open" 180 msgstr "" 181 182 #: tformmain.aprojectsave.caption 183 msgctxt "TFORMMAIN.APROJECTSAVE.CAPTION" 184 msgid "Save" 185 msgstr "" 186 187 #: tformmain.aprojectsaveas.caption 188 msgctxt "TFORMMAIN.APROJECTSAVEAS.CAPTION" 189 msgid "Save as..." 190 msgstr "" 191 192 #: tformmain.ashowsourceposition.caption 193 msgctxt "TFORMMAIN.ASHOWSOURCEPOSITION.CAPTION" 194 msgid "Show position in source" 195 msgstr "" 196 197 #: tformmain.ashowtargetposition.caption 198 msgctxt "TFORMMAIN.ASHOWTARGETPOSITION.CAPTION" 199 msgid "Show position in target" 200 msgstr "" 201 202 #: tformmain.aviewcompilers.caption 203 msgctxt "TFORMMAIN.AVIEWCOMPILERS.CAPTION" 204 msgid "Compilers" 205 msgstr "" 206 207 #: tformmain.aviewlog.caption 208 msgctxt "TFORMMAIN.AVIEWLOG.CAPTION" 209 msgid "Log" 210 msgstr "" 211 212 #: tformmain.caption 213 msgctxt "TFORMMAIN.CAPTION" 214 msgid "LazFuck" 215 msgstr "" 216 217 #: tformmain.menuitem1.caption 218 msgctxt "TFORMMAIN.MENUITEM1.CAPTION" 219 msgid "Project" 220 msgstr "" 221 222 #: tformmain.menuitem10.caption 223 msgctxt "TFORMMAIN.MENUITEM10.CAPTION" 224 msgid "Help" 225 msgstr "" 226 227 #: tformmain.menuitem17.caption 228 msgctxt "TFORMMAIN.MENUITEM17.CAPTION" 229 msgid "-" 230 msgstr "" 231 232 #: tformmain.menuitem18.caption 233 msgctxt "TFORMMAIN.MENUITEM18.CAPTION" 234 msgid "View" 235 msgstr "" 236 237 #: tformmain.menuitem24.caption 238 msgctxt "TFORMMAIN.MENUITEM24.CAPTION" 239 msgid "Tools" 240 msgstr "" 241 242 #: tformmain.menuitem5.caption 243 msgctxt "TFORMMAIN.MENUITEM5.CAPTION" 244 msgid "-" 245 msgstr "" 246 247 #: tformmain.menuitem9.caption 248 msgctxt "TFORMMAIN.MENUITEM9.CAPTION" 249 msgid "Program" 250 msgstr "" 251 252 #: tformmain.menuitemopenrecent.caption 253 msgctxt "TFORMMAIN.MENUITEMOPENRECENT.CAPTION" 254 msgid "Open recent" 255 msgstr "" 256 257 #: tformmain.menuitemtarget.caption 258 msgctxt "TFORMMAIN.MENUITEMTARGET.CAPTION" 259 msgid "Target" 260 msgstr "" 261 262 #: tformmain.tabsheetdebug.caption 263 msgctxt "TFORMMAIN.TABSHEETDEBUG.CAPTION" 264 msgid "Debug" 265 msgstr "" 266 267 #: tformmain.tabsheetmessages.caption 268 msgctxt "TFORMMAIN.TABSHEETMESSAGES.CAPTION" 269 msgid "Messages" 270 msgstr "" 271 272 #: tformmain.tabsheetsource.caption 273 msgctxt "TFORMMAIN.TABSHEETSOURCE.CAPTION" 274 msgid "Source code" 275 msgstr "" 276 277 #: tformmain.tabsheettarget.caption 278 msgctxt "TFORMMAIN.TABSHEETTARGET.CAPTION" 279 msgid "Target code" 280 msgstr "" 281 282 #: tformmain.toolbuttontarget.caption 283 msgctxt "TFORMMAIN.TOOLBUTTONTARGET.CAPTION" 284 msgid "Target select" 285 msgstr "" 286 287 #: tformmain.toolbuttontarget.hint 288 msgctxt "TFORMMAIN.TOOLBUTTONTARGET.HINT" 289 msgid "Target select" 290 msgstr "" 291 97 292 #: tformmemory.caption 98 293 msgid "Memory" … … 325 520 326 521 #: tmainform.aabout.caption 522 msgctxt "tmainform.aabout.caption" 327 523 msgid "About" 328 524 msgstr "" 329 525 330 526 #: tmainform.abreakpointtoggle.caption 527 msgctxt "tmainform.abreakpointtoggle.caption" 331 528 msgid "Toggle breakpoint" 332 529 msgstr "" 333 530 334 531 #: tmainform.aexit.caption 532 msgctxt "tmainform.aexit.caption" 335 533 msgid "Exit" 336 534 msgstr "" … … 352 550 353 551 #: tmainform.aprogrampause.caption 552 msgctxt "tmainform.aprogrampause.caption" 354 553 msgid "Pause" 355 554 msgstr "" 356 555 357 556 #: tmainform.aprogramrun.caption 557 msgctxt "tmainform.aprogramrun.caption" 358 558 msgid "Run" 359 559 msgstr "" … … 365 565 366 566 #: tmainform.aprogramshowexecutionpoint.caption 567 msgctxt "tmainform.aprogramshowexecutionpoint.caption" 367 568 msgid "Show execution point" 368 569 msgstr "" … … 384 585 385 586 #: tmainform.aprogramstop.caption 587 msgctxt "tmainform.aprogramstop.caption" 386 588 msgid "Stop" 387 589 msgstr "" 388 590 389 591 #: tmainform.aprojectclose.caption 592 msgctxt "tmainform.aprojectclose.caption" 390 593 msgid "Close" 391 594 msgstr "" 392 595 393 596 #: tmainform.aprojectnew.caption 597 msgctxt "tmainform.aprojectnew.caption" 394 598 msgid "New" 395 599 msgstr "" 396 600 397 601 #: tmainform.aprojectopen.caption 602 msgctxt "tmainform.aprojectopen.caption" 398 603 msgid "Open" 399 604 msgstr "" 400 605 401 606 #: tmainform.aprojectsave.caption 607 msgctxt "tmainform.aprojectsave.caption" 402 608 msgid "Save" 403 609 msgstr "" 404 610 405 611 #: tmainform.aprojectsaveas.caption 612 msgctxt "tmainform.aprojectsaveas.caption" 406 613 msgid "Save as..." 407 614 msgstr "" 408 615 409 616 #: tmainform.ashowsourceposition.caption 617 msgctxt "tmainform.ashowsourceposition.caption" 410 618 msgid "Show position in source" 411 619 msgstr "" 412 620 413 621 #: tmainform.ashowtargetposition.caption 622 msgctxt "tmainform.ashowtargetposition.caption" 414 623 msgid "Show position in target" 415 624 msgstr "" … … 426 635 427 636 #: tmainform.caption 637 msgctxt "tmainform.caption" 428 638 msgid "LazFuck" 429 639 msgstr "" 430 640 431 641 #: tmainform.menuitem1.caption 642 msgctxt "tmainform.menuitem1.caption" 432 643 msgid "Project" 433 644 msgstr "" … … 444 655 445 656 #: tmainform.menuitem18.caption 657 msgctxt "tmainform.menuitem18.caption" 446 658 msgid "View" 447 659 msgstr "" 448 660 449 661 #: tmainform.menuitem24.caption 662 msgctxt "tmainform.menuitem24.caption" 450 663 msgid "Tools" 451 664 msgstr "" … … 457 670 458 671 #: tmainform.menuitem9.caption 672 msgctxt "tmainform.menuitem9.caption" 459 673 msgid "Program" 460 674 msgstr "" 461 675 462 676 #: tmainform.menuitemopenrecent.caption 677 msgctxt "tmainform.menuitemopenrecent.caption" 463 678 msgid "Open recent" 464 679 msgstr "" -
trunk/LazFuckIDE.lpi
r66 r67 104 104 <Filename Value="Forms\UFormMain.pas"/> 105 105 <IsPartOfProject Value="True"/> 106 <ComponentName Value=" MainForm"/>106 <ComponentName Value="FormMain"/> 107 107 <HasResources Value="True"/> 108 108 <ResourceBaseClass Value="Form"/> -
trunk/LazFuckIDE.lpr
r66 r67 22 22 Application.Initialize; 23 23 Application.CreateForm(TCore, Core); 24 Application.CreateForm(T MainForm, MainForm);24 Application.CreateForm(TFormMain, FormMain); 25 25 Application.CreateForm(TFormCPU, FormCPU); 26 26 Application.CreateForm(TOptionsForm, OptionsForm); -
trunk/UCore.pas
r64 r67 20 20 procedure DataModuleDestroy(Sender: TObject); 21 21 private 22 FCurrentTarget: TTarget; 23 procedure SetCurrentTarget(AValue: TTarget); 22 24 public 23 25 ScaleDPI: TScaleDPI; … … 28 30 procedure LoadFromRegistry(Root: HKEY; Key: string); 29 31 procedure SaveToRegistry(Root: HKEY; Key: string); 32 property CurrentTarget: TTarget read FCurrentTarget write SetCurrentTarget; 30 33 end; 31 34 … … 39 42 40 43 uses 41 UTargetJava, UTargetDelphi, UTargetPHP, UTargetC, UTargetInterpretter, UTargetFPC; 44 UFormMain, UTargetJava, UTargetDelphi, UTargetPHP, UTargetC, 45 UTargetInterpretter, UTargetFPC; 42 46 43 47 … … 110 114 end; 111 115 116 procedure TCore.SetCurrentTarget(AValue: TTarget); 117 var 118 I: Integer; 119 begin 120 if FCurrentTarget = AValue then Exit; 121 FCurrentTarget := AValue; 122 for I := 0 to Targets.Count - 1 do 123 TTarget(Targets[I]).OnChangeState := nil; 124 if Assigned(FCurrentTarget) then begin 125 FCurrentTarget.OnChangeState := FormMain.TargetStateChanged; 126 FCurrentTarget.OnLog := FormMain.TargetLogExecute; 127 FCurrentTarget.OptimizationLevel := OptimizationLevel; 128 FCurrentTarget.Messages.OnChange := FormMain.MessagesChanged; 129 end; 130 FormMain.UpdateTargetList; 131 FormMain.UpdateInterface; 132 end; 133 134 112 135 end. 113 136
Note:
See TracChangeset
for help on using the changeset viewer.