frmabout.pp 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 2003 by the Free Pascal development team
  5. About form for debug server
  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. {$mode objfpc}
  13. {$h+}
  14. unit frmabout;
  15. interface
  16. uses fpgtk,gtk,classes,sysutils;
  17. Type
  18. TAboutForm = Class (TFPGtkWindow)
  19. FAboutText : TFPGtkLabel;
  20. FSeparator : TFPGtkHSeparator;
  21. FVBox : TFPgtkVBox;
  22. FOK,
  23. FCancel : TFPGtkButton;
  24. FButtonBox: TFPgtkHBox;
  25. Constructor Create;
  26. Procedure CreateWindow;
  27. end;
  28. Implementation
  29. Resourcestring
  30. SAbout1 = 'Free Pascal message compiler - GTK version.';
  31. SAbout2 = '(c) 2003, Michael Van Canneyt';
  32. SOK = 'OK';
  33. SCancel = 'Cancel';
  34. Constructor TAboutForm.Create;
  35. begin
  36. Inherited Create(GTK_WINDOW_DIALOG);
  37. CreateWindow;
  38. end;
  39. Procedure TAboutForm.CreateWindow;
  40. Var
  41. S : String;
  42. begin
  43. FVBox:=TFPGtkVBox.Create;
  44. FVBox.Spacing:=4;
  45. FVBox.Border:=8;
  46. Add(FVBox);
  47. // About text
  48. S:=SAbout1+LineEnding+SAbout2;
  49. FAboutText:=TFPgtkLabel.Create(S);
  50. // button area
  51. FOK:=TFpGtkButton.CreateWithLabel(SOK);
  52. FOK.ConnectClicked(@CloseWithResult,IntToPointer(drOK));
  53. FCancel:=TFPgtkButton.CreateWithLabel(SCancel);
  54. FCancel.ConnectCLicked(@CloseWithResult,IntToPointer(drCancel));
  55. FSeparator:=TFPgtkHSeparator.Create;
  56. FButtonBox:=TfpGtkHBox.Create;
  57. FButtonBox.Spacing:=4;
  58. FButtonBox.PackEnd(FOK,false,false,4);
  59. FButtonBox.PackEnd(FCancel,false,false,4);
  60. // Add to window
  61. FVBox.PackStart(FAboutText,True,True,0);
  62. FVBox.PackStart(FSeparator,False,False,4);
  63. FVBox.PackStart(FButtonBox,false,false,0);
  64. end;
  65. end.
  66. {
  67. $Log$
  68. Revision 1.1 2003-02-14 21:59:21 michael
  69. + Initial implementation
  70. Revision 1.1 2003/01/02 14:36:25 michael
  71. + Initial implementation
  72. }