fpmcomp.inc 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. {
  2. $Id$
  3. This file is part of the Free Pascal Integrated Development Environment
  4. Copyright (c) 1998 by Berczi Gabor
  5. Compiler menu entries
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. procedure TIDEApp.Target;
  13. var R,R2: TRect;
  14. D: PCenterDialog;
  15. RB: PRadioButtons;
  16. TargetCount,I: integer;
  17. LastItem: PSItem;
  18. L: longint;
  19. begin
  20. TargetCount:=TargetSwitches^.ItemCount;
  21. R.Assign(0,0,36,4+TargetCount);
  22. New(D, Init(R, 'Target'));
  23. with D^ do
  24. begin
  25. GetExtent(R); R.Grow(-3,-1); Inc(R.A.Y);
  26. R2.Copy(R); Inc(R2.A.Y); R2.B.Y:=R2.A.Y+TargetCount;
  27. LastItem:=nil;
  28. for I:=TargetCount-1 downto 0 do
  29. LastItem:=NewSItem(TargetSwitches^.ItemName(I), LastItem);
  30. New(RB, Init(R2, LastItem));
  31. L:=ord(TargetSwitches^.GetCurrSel);
  32. RB^.SetData(L);
  33. Insert(RB);
  34. R2.Copy(R);
  35. R2.B.Y:=R2.A.Y+1;
  36. Insert(New(PLabel, Init(R2, 'Target platform', RB)));
  37. end;
  38. InsertButtons(D);
  39. RB^.Select;
  40. if Desktop^.ExecView(D)=cmOK then
  41. TargetSwitches^.SetCurrSel(RB^.Value);
  42. Dispose(D, Done);
  43. end;
  44. procedure TIDEApp.PrimaryFile_;
  45. var
  46. D : PFileDialog;
  47. FileName : string;
  48. begin
  49. New(D, Init('*.pas','Primary file','*.pas',fdOpenButton,0));
  50. if Desktop^.ExecView(D)<>cmCancel then
  51. begin
  52. D^.GetFileName(FileName);
  53. PrimaryFile:=FileName;
  54. UpdatePrimaryFile;
  55. end;
  56. end;
  57. procedure TIDEApp.ClearPrimary;
  58. begin
  59. PrimaryFile:='';
  60. UpdatePrimaryFile;
  61. end;
  62. procedure TIDEApp.Information;
  63. begin
  64. with ProgramInfoWindow^ do
  65. begin
  66. if not GetState(sfVisible) then
  67. Show;
  68. MakeFirst;
  69. end;
  70. end;
  71. {
  72. $Log$
  73. Revision 1.2 1998-12-28 15:47:46 peter
  74. + Added user screen support, display & window
  75. + Implemented Editor,Mouse Options dialog
  76. + Added location of .INI and .CFG file
  77. + Option (INI) file managment implemented (see bottom of Options Menu)
  78. + Switches updated
  79. + Run program
  80. Revision 1.1 1998/12/22 14:27:54 peter
  81. * moved
  82. Revision 1.3 1998/12/22 10:39:44 peter
  83. + Switches are now written/read
  84. + find and replace routines
  85. }