////////////////////////////////////////////////////////////////////////////////
//
// ApplicationEvent.h
// ApplicationEvent -     (Auto)
//
////////////////////////////////////////////////////////////////////////////////
#ifndef _APPLICATIONEVENT_H
#define _APPLICATIONEVENT_H

#ifndef _BASEEVENT_H
#include "BaseEvent.h"
#endif


#ifdef __LIGHT_VERSION__
  #ifndef __KL_TLB_H
  #include <kl_tlb.h>
  #endif
#else
  #ifndef __KS_TLB_H
  #include <ks_tlb.h>
  #endif
#endif

//---------------------------------------------------------------------------
// ApplicationEvent -     (TEventsDispatcher)
// ---
class ApplicationEvent : public BaseEvent
{
public:
  ApplicationEvent( LPUNKNOWN pContainer ) : BaseEvent(pContainer, DIID_ksKompasObjectNotify) {}
  virtual ~ApplicationEvent(){}

protected:
  virtual HRESULT InvokeEvent(DISPID id, BOOL & resEvent, TVariant * params);

  //  
  //  
  BOOL CreateDocument( LPDISPATCH newDoc, long docType );
  //   
  BOOL BeginOpenDocument( BSTR fileName );
  //  
  BOOL OpenDocument( LPDISPATCH newDoc, long docType );
  //     
  BOOL ChangeActiveDocument( LPDISPATCH newDoc, long docType );
  //  
  BOOL ApplicationDestroy();
  //   (   )
  BOOL BeginCreate( long docType );
  // koBeginOpenFile -   (   )
  BOOL BeginOpenFile();
  // koBeginCloseAllDocument -   
  BOOL BeginCloseAllDocument();

};
#endif

