home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dokpr1.zip / lomos / sampcont.h < prev   
Text File  |  1995-11-09  |  2KB  |  57 lines

  1. /*
  2.  
  3. This module is the sample controller that is a subclass of the MController...
  4. the thing that makes Mesa tick
  5.  
  6. */
  7.  
  8. // make sure that this file is only included once
  9. #ifndef _MH_MSampleController
  10.  
  11. #define _MH_MSampleController
  12.  
  13. // include our superclass
  14. #include "controlr.h"
  15. #include "editview.h"
  16. // our controller is a subclass of Mesa's generic controller
  17. class MSampleController : public MGController
  18. {
  19.     public:
  20.     MSampleController(const char *,int &,HAB,int useRGB);
  21.     virtual ~MSampleController();
  22.     virtual int getBufferRedraw() {return 1;};
  23.     virtual void addToDestroyList(HWND);
  24.     virtual void getDefaultRowsAndCols(int &r,int &c) {r = 32;c = 14;};
  25.     virtual int beAlive();
  26.     virtual int getInBeAlive();
  27.     virtual MPoint getHitPoint();
  28.     virtual HWND getApplicationFrameWindow();
  29.     virtual HWND getApplicationClientWindow();
  30.     virtual int handleKey(int,int);
  31.     virtual void runScript(const char *,MException *);
  32.     virtual int getMenuWindow() {return 0;};
  33.     virtual const char * getCurrencyChars(int page,int chr);
  34.     virtual void setHitPoint(int x,int y);
  35.  
  36.     virtual int isEditingFormula();
  37.     virtual int isEditing();
  38.     virtual void invokeEdit( MEditString * );
  39.     virtual void setFormulaView( const char * );
  40.     virtual void removeEdit();
  41.     virtual int getInCellEditing();
  42.     virtual void updateFormulaView();
  43.     virtual MEditView *getEditView();
  44.  
  45.     virtual void setHandleForEditViewOwner(HWND hwnd);
  46.  
  47.     private:
  48.     MPoint hitPoint;
  49.     MEditView *evptr;  // pointer to the editview that might be created
  50.     HWND activeWnd;   // hwnd to the dialog window holding the sheetview
  51. };
  52.  
  53. extern MSampleController *MyMesa;
  54.  
  55. // ifndef _MH_MSampleController
  56. #endif
  57.