home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dokpr1.zip / editview.h < prev    next >
C/C++ Source or Header  |  1995-08-10  |  2KB  |  74 lines

  1. /**************************************************************************
  2.  *                                                                        *
  3.  *                                                                        *
  4.  *          This code is copyright (c) 1994                               *
  5.  *                     Athena Design, Inc.                                *
  6.  *                                                                        *
  7.  *                                                                        *
  8.  *                ALL RIGHTS RESERVED                                     *
  9.  *                                                                        *
  10.  *                                                                        *
  11.  *                                                                        *
  12.  *                                                                        *
  13.  *                                                                        *
  14.  **************************************************************************/
  15.  
  16. /*
  17.     this module is the subclass of an MView that does text editing
  18.     3-7-94 dpp
  19. */
  20.  
  21. #ifndef _MH_editView
  22.  
  23. #define _MH_editView
  24.  
  25. #include "view.h"
  26. #include "rect.h"
  27. #include "font.h"
  28.  
  29. class MEditString;
  30.  
  31. class MEditView : public MView {
  32.     public:
  33.     MEditView( MView *, int = 0, HWND super=0);
  34.     virtual ~MEditView();
  35.  
  36.     virtual int drawSelf(MDraw *,const MRect *);
  37.     virtual int hasDrawSelf() {return 1;};
  38.     virtual void cleanUp();
  39.     virtual void setUp(const MRect *,int = 0);
  40.     virtual void setEditString( MEditString * );
  41.     virtual void scrollToVisible(int);
  42.     virtual int winPing( int, int );
  43.     virtual int bufferWindow() {return 1;};
  44.  
  45.     // handle the mouse events
  46.     virtual void mouse1Down(const MPoint *,int,int &);
  47.     virtual void mouse1Up(const MPoint *,int,int &);
  48.     virtual void mouse1MotionStart(int &);
  49.     virtual void mouse1MotionEnd(int &);
  50. #if defined(M2Z)
  51.     virtual MRESULT winButton1DoubleClick(HWND,ULONG,MPARAM,MPARAM,int &);
  52. #endif
  53.     virtual int comboButton( int & );
  54.     virtual int mouseMove( const MPoint *, int, int & );
  55.  
  56.     
  57.     // find a character based on an x position in the edit field
  58.     virtual int findChar(int);
  59.     virtual void setFont(const MFont *);
  60.     
  61.     private:
  62.     MEditString *es;    
  63.     int blinkOn;
  64.     MPoint thePoint;
  65.     MFont editFont;
  66.     int isSelecting;
  67.     int downFlags, downPoint, lastPoint;
  68. };
  69.  
  70. // ifndef _MH_editView
  71. #endif
  72.  
  73.  
  74.