baseconsoled.inc 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. {
  2. Free Pascal port of the OpenPTC C++ library.
  3. Copyright (C) 2001-2003 Nikolay Nikolov ([email protected])
  4. Original C++ version by Glenn Fiedler ([email protected])
  5. This library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Lesser General Public
  7. License as published by the Free Software Foundation; either
  8. version 2.1 of the License, or (at your option) any later version.
  9. This library is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. Lesser General Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public
  14. License along with this library; if not, write to the Free Software
  15. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  16. }
  17. Type
  18. TPTCBaseConsole=Class(TPTCBaseSurface)
  19. Private
  20. FReleaseEnabled : Boolean;
  21. Function GetPages : Integer; Virtual; Abstract;
  22. Function GetName : String; Virtual; Abstract;
  23. Function GetTitle : String; Virtual; Abstract;
  24. Function GetInformation : String; Virtual; Abstract;
  25. Public
  26. Constructor Create; Virtual;
  27. Procedure Configure(Const AFileName : String); Virtual; Abstract;
  28. Function Modes : PPTCMode; Virtual; Abstract;
  29. Procedure Open(Const ATitle : String; APages : Integer = 0); Overload; Virtual; Abstract;
  30. Procedure Open(Const ATitle : String; Const AFormat : TPTCFormat;
  31. APages : Integer = 0); Overload; Virtual; Abstract;
  32. Procedure Open(Const ATitle : String; AWidth, AHeight : Integer;
  33. Const AFormat : TPTCFormat; APages : Integer = 0); Overload; Virtual; Abstract;
  34. Procedure Open(Const ATitle : String; Const AMode : TPTCMode;
  35. APages : Integer = 0); Overload; Virtual; Abstract;
  36. Procedure Close; Virtual; Abstract;
  37. Procedure Flush; Virtual; Abstract;
  38. Procedure Finish; Virtual; Abstract;
  39. Procedure Update; Virtual; Abstract;
  40. Procedure Update(Const AArea : TPTCArea); Virtual; Abstract;
  41. { event handling }
  42. Function NextEvent(Var AEvent : TPTCEvent; AWait : Boolean; Const AEventMask : TPTCEventMask) : Boolean; Virtual; Abstract;
  43. Function PeekEvent(AWait : Boolean; Const AEventMask : TPTCEventMask) : TPTCEvent; Virtual; Abstract;
  44. { key handling }
  45. Function KeyPressed : Boolean;
  46. Function PeekKey(Var AKey : TPTCKeyEvent) : Boolean;
  47. Procedure ReadKey(Var AKey : TPTCKeyEvent);
  48. Procedure ReadKey;
  49. Property KeyReleaseEnabled : Boolean Read FReleaseEnabled Write FReleaseEnabled;
  50. Property Pages : Integer Read GetPages;
  51. Property Name : String Read GetName;
  52. Property Title : String Read GetTitle;
  53. Property Information : String Read GetInformation;
  54. End;