home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / MODEM / UWPC201.ZIP / UW-SRC.ZIP / CLIPBD.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-07-14  |  2.8 KB  |  91 lines

  1. //-------------------------------------------------------------------------
  2. //
  3. // CLIPBD.H - Clipboard processing routines for UW/PC.
  4. // 
  5. //  This file is part of UW/PC - a multi-window comms package for the PC.
  6. //  Copyright (C) 1990-1991  Rhys Weatherley
  7. //
  8. //  This program is free software; you can redistribute it and/or modify
  9. //  it under the terms of the GNU General Public License as published by
  10. //  the Free Software Foundation; either version 1, or (at your option)
  11. //  any later version.
  12. //
  13. //  This program is distributed in the hope that it will be useful,
  14. //  but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. //  GNU General Public License for more details.
  17. //
  18. //  You should have received a copy of the GNU General Public License
  19. //  along with this program; if not, write to the Free Software
  20. //  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21. //
  22. // Revision History:
  23. // ================
  24. //
  25. //  Version  DD/MM/YY  By  Description
  26. //  -------  --------  --  --------------------------------------
  27. //    1.0    08/06/91  RW  Original Version of CLIPBD.H
  28. //
  29. // You may contact the author by:
  30. // =============================
  31. //
  32. //  e-mail: rhys@cs.uq.oz.au
  33. //    mail: Rhys Weatherley
  34. //          5 Horizon Drive
  35. //          Jamboree Heights
  36. //          Queensland 4074
  37. //        Australia
  38. //
  39. //-------------------------------------------------------------------------
  40.  
  41. #ifndef __CLIPBD_H__
  42. #define    __CLIPBD_H__
  43.  
  44. #include "client.h"        // Client processing declarations.
  45.  
  46. //
  47. // Define a cut-to-clipboard client for UW/PC.  This client is
  48. // called upon to mark a window region to be sent to the clipboard.
  49. //
  50. class    UWCutToClipboard : public UWClient {
  51.  
  52. private:
  53.  
  54.     int    x1,y1,x2,y2,corner;    // Area corners and current corner.
  55.     int    usemouse;        // Non-zero for mouse cutting.
  56.  
  57. public:
  58.  
  59.     UWCutToClipboard (UWDisplay *wind,int mouse=0,int x=0,int y=0);
  60.     ~UWCutToClipboard (void);
  61.  
  62.     virtual    char far *name    () { return ((char far *)" CUT"); };
  63.     virtual    void    key    (int keypress);
  64.     virtual    void    remote    (int ch);
  65.     virtual    void    mouse    (int x,int y,int buttons);
  66.  
  67. };
  68.  
  69. //
  70. // Define a paste-from-clipboard client for UW/PC.  This will
  71. // take the data in the paste buffer and send it the remote for
  72. // the current window.  A 10ms pause will be given between lines.
  73. // If a paste is already active, then the new paste will abort.
  74. //
  75. class    UWPasteFromClipboard : public UWClient {
  76.  
  77. public:
  78.  
  79.     UWPasteFromClipboard (UWDisplay *wind);
  80.     ~UWPasteFromClipboard (void);
  81.  
  82.     virtual    char far *name    () { return ((char far *)"PASTE"); };
  83.     virtual    void    key    (int keypress) { defkey (keypress); };
  84.     virtual    void    remote    (int ch) { if (underneath)
  85.                          underneath -> remote (ch); };
  86.     virtual    void    tick    (void);
  87.  
  88. };
  89.  
  90. #endif    /* __CLIPBD_H__ */
  91.