home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c016 / 3.ddi / MEDIADIB.PAK / DIBVIEW.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-07  |  2.9 KB  |  121 lines

  1. //---------------------------------------------------------
  2. //     DIBVIEW - TDibView include file
  3. //---------------------------------------------------------
  4. #if !defined(__DIBVIEW_H)
  5. #define      __DIBVIEW_H
  6.  
  7. #include "dibdoc.h"
  8. #include <owl\docmanag.h>
  9. #include "knife1.h"
  10. #include "dibview.rc"
  11.  
  12. ////////////////////////////////////////////////////////////////
  13. class _DOCVIEWCLASS TDibView : public TView, public TVbxPicBuf
  14. {
  15.   public:
  16.     TDibView(TDIBDocument& doc,
  17.              TWindow* parent = 0,
  18.              const char* name = 0,
  19.              TModule* module = 0);
  20.    ~TDibView();
  21.  
  22.     static LPCSTR StaticName() {return "TDibView::DibViewName";}
  23.     const char*   GetViewName() {return StaticName();}
  24.     TWindow*      GetWindow() {return this;}
  25.     BOOL          CanClose();
  26.  
  27.     // View drawing routines
  28.     //
  29.     void FillViewData();
  30.     void UpdateViewData();
  31.  
  32.   protected:
  33.     void SetupWindow();
  34.  
  35.     // view event handlers
  36.     //
  37.     BOOL  VnViewOpened(TView*);
  38.     BOOL  VnViewClosed(TView*);
  39.     BOOL  VnDocOpened(int omode);
  40.     BOOL  VnDocClosed(int omode);
  41.     BOOL  VnIsWindow(HWND hWnd);
  42.  
  43.     // File commands
  44.     //
  45.     void CmFileSave();
  46.     void CmFileSaveAs();
  47.  
  48.     // View menu commands & enablers
  49.     //
  50.     void CeAutoscale(TCommandEnabler&);
  51.     void CmAutoscale();
  52.     void CeZoomFactor(TCommandEnabler&);
  53.     void CmZoomFactor();
  54.  
  55.     // Image tool commands
  56.     //
  57.     void CmImkNegate();
  58.     void CmImkMirrorHorizontal();
  59.     void CmImkMirrorVertical();
  60.     void CmImkRotate();
  61.     void CmImkSharpen();
  62.     void CmImkSoften();
  63.  
  64.     // Document Pointer
  65.     //
  66.     TDIBDocument* DocPtr;
  67.  
  68.     // VBX event handlers for PicBuf control. Many of these are just stubs for
  69.     // ease of extending this class.
  70.     //
  71.     void PicBuf_EvClick(VBXEVENT FAR*) {
  72.       // no arguments
  73.     }
  74.  
  75.     void PicBuf_EvChange(VBXEVENT FAR*) {
  76.       // no arguments
  77.     }
  78.  
  79.     void PicBuf_EvDblClick(VBXEVENT FAR*) {
  80.        // no arguments
  81.     }
  82.  
  83.     void PicBuf_EvDragDrop(VBXEVENT FAR*);
  84.  
  85.     void PicBuf_EvDragOver(VBXEVENT FAR*) {
  86.        // Source As Control,X As Integer,Y As Integer,State As Integer
  87.     }
  88.  
  89.     void PicBuf_EvGotFocus(VBXEVENT FAR*) {
  90.       // no arguments
  91.     }
  92.  
  93.     void PicBuf_EvKeyDown(VBXEVENT FAR*) {
  94.       // KeyCode As Integer,Shift As Integer
  95.     }
  96.  
  97.     void PicBuf_EvKeyPress(VBXEVENT FAR*) {
  98.       // KeyAscii As Integer
  99.     }
  100.  
  101.     void PicBuf_EvKeyUp(VBXEVENT FAR*) {
  102.       // KeyCode As Integer,Shift As Integer
  103.     }
  104.  
  105.     void PicBuf_EvLostFocus(VBXEVENT FAR*) {
  106.       // no arguments
  107.     }
  108.  
  109.     void PicBuf_EvMouseDown(VBXEVENT FAR*);
  110.     void PicBuf_EvMouseMove(VBXEVENT FAR*);
  111.     void PicBuf_EvMouseUp(VBXEVENT FAR*);
  112.  
  113.     void PicBuf_EvPaint(VBXEVENT FAR*) {
  114.       // no arguments
  115.     }
  116.  
  117.   DECLARE_RESPONSE_TABLE(TDibView);
  118. };
  119.  
  120. #endif  //   __DIBVIEW_H
  121.