////////////////////////////////////////////////////////////////////////////////
//
// DocumentFrameEvent  -     
//
////////////////////////////////////////////////////////////////////////////////
#ifndef _DOCUMENTFRAMEEVENT_H
#define _DOCUMENTFRAMEEVENT_H

#include "ABaseEvent.h"


////////////////////////////////////////////////////////////////////////////////
//
// DocumentFrameEvent  -     
//
////////////////////////////////////////////////////////////////////////////////
class DocumentFrameEventCalback
{
  public:
//  11     // frBeginPaint          -   
//  11     BOOL BeginPaint( IDocumentFramePtr & docFrame, IPaintObjectPtr & paintObj ) { return true; }
//  11     // frClosePaint          -   
//  11     BOOL ClosePaint( IDocumentFramePtr & docFrame, IPaintObjectPtr & paintObj ) { return true; }
//  11     // frMouseDown           -   
//  11     BOOL MouseDown( IDocumentFramePtr & docFrame, short nButton, short nShiftState, long x, long y ) { return true; }
//  11     // frMouseUp             -   
//  11     BOOL MouseUp      ( IDocumentFramePtr & docFrame, short nButton, short nShiftState, long x, long y ) { return true; }
//  11     // frMouseDblClick       -    
//  11     BOOL MouseDblClick( IDocumentFramePtr & docFrame, short nButton, short nShiftState, long x, long y ) { return true; }
   // frBeginPaintGL        -      OpenGL
   virtual BOOL BeginPaintGL ( IDocumentFramePtr & docFrame, ksGLObjectPtr & glObj, long drawMode ) { return true; }
//  11     // frClosePaintGL        -      OpenGL
//  11     afx_msg BOOL ClosePaintGL       ( ksGLObjectPtr & glObj, long drawMode );
    // frAddGabarit          -   
    virtual BOOL AddGabarit( IDocumentFramePtr & docFrame, IGabaritObjectPtr & gabObj ) { return true; }
//  11     // frActivate            -  
//  11     afx_msg BOOL Activate           ();
//  11     // frDeactivate          -  
//  11     afx_msg BOOL Deactivate         ();
    // frCloseFrame          -  
    virtual BOOL CloseFrame( IDocumentFramePtr & docFrame ) { return true; }
//  11     // frMouseMove           -  
//  11     afx_msg BOOL MouseMove          ( short nShiftState, long x, long y ); 

};

class DocumentFrameEvent : public ABaseEvent
{
  DocumentFrameEventCalback & m_obj;
public:
	DocumentFrameEvent( LPUNKNOWN  pObject, 
                      LPDISPATCH doc, DocumentFrameEventCalback & obj );           
  virtual ~DocumentFrameEvent();

protected:
//  11   // frBeginPaint          -   
//  11   afx_msg BOOL BeginPaint         ( LPDISPATCH paintObj );
//  11   // frClosePaint          -   
//  11   afx_msg BOOL ClosePaint         ( LPDISPATCH paintObj );
//  11   // frMouseDown           -   
//  11   afx_msg BOOL MouseDown          ( short nButton, short nShiftState, long x, long y );
//  11   // frMouseUp             -   
//  11   afx_msg BOOL MouseUp            ( short nButton, short nShiftState, long x, long y );
//  11   // frMouseDblClick       -    
//  11   afx_msg BOOL MouseDblClick      ( short nButton, short nShiftState, long x, long y );
   // frBeginPaintGL        -      OpenGL
   afx_msg BOOL BeginPaintGL( LPDISPATCH glObj, long drawMode );
//  11   // frClosePaintGL        -      OpenGL
//  11   afx_msg BOOL ClosePaintGL       ( LPDISPATCH glObj, long drawMode );
  // frAddGabarit          -   
  afx_msg BOOL AddGabarit   ( LPDISPATCH gabObj );
//  11   // frActivate            -  
//  11   afx_msg BOOL Activate           ();
//  11   // frDeactivate          -  
//  11   afx_msg BOOL Deactivate         ();
  // frCloseFrame          -  
  afx_msg BOOL CloseFrame   ();
//  11   // frMouseMove           -  
//  11   afx_msg BOOL MouseMove          ( short nShiftState, long x, long y ); 

	DECLARE_EVENTSINK_MAP()
};

ABaseEvent * NewDocumentFrameEvent( LPDISPATCH doc, LPDISPATCH frame, DocumentFrameEventCalback & obj );

/////////////////////////////////////////////////////////////////////////////

#endif 
