// $Source: /usr/local/SimSoft/SoftShop/XGraph/Views/OGLCB.h,v $
// $Revision: 1.19 $
// $Author: baum $
// $Date: 2001/11/29 15:52:24 $
//
// Login name of the user who locked the revision
// $Locker:  $
// Tag name used to checkout the file
// $Name: Release-20 $
// State assigned to revision
// $State: Exp $
//
//
// $Log: OGLCB.h,v $
// Revision 1.19  2001/11/29 15:52:24  baum
// -In Kalender.cpp und Kalender.h Handsteuerung eingebaut
//

#ifndef _OGLCALLBACK_H
#define _OGLCALLBACK_H 1

#include "DynArray.h"
#include "Vec3D.h"
#include "Angle.h"

#ifndef _GEOOBJECT_H
class GeoObject;
#endif

#ifndef _OGLVIEW_H
class OGLView;
#endif

#ifdef _OGLCALLBACK_CPP
#  undef _impexp
#  define _impexp __declspec(dllexport)
#elif defined BUILD_VIEWS_DLL
#  undef _impexp
#  define _impexp
#else
#  undef _impexp
#  define _impexp __declspec(dllimport)
#endif

#if defined __GNUG__ || defined __hpux
#  undef _impexp
#  define _impexp
#endif

//==================================================================
//		Class-Header
//		for class OGLViewCallback
//==================================================================

//##ModelId=4030D7700261
class _impexp OGLViewCallback {
  public:
    // constructor
	//##ModelId=4030D7700271
    OGLViewCallback ();

    // destructor
	//##ModelId=4030D7700272
    virtual ~OGLViewCallback ();

    // Standard-Callbacks for OGLView
	//##ModelId=4030D7700274
    void ButtonCB  (OGLView* view, int button, int state, int x, int y);
	//##ModelId=4030D7700283
    void MotionCB  (OGLView* view, int state, int x, int y);
	//##ModelId=4030D7700291
    void PassiveCB (OGLView* view, int x, int y);

  protected:
    // the real CB's
	//##ModelId=4030D7700295
    virtual void MouseButtonCB  (OGLView* view, int button, int state, int x, int y);
	//##ModelId=4030D77002A5
    virtual void MouseMotionCB  (OGLView* view, int state, int x, int y);
	//##ModelId=4030D77002B4
    virtual void MousePassiveCB (OGLView* view, int x, int y);

    // proof and set
	//##ModelId=4030D77002C2
    void saveHistory (OGLView* view, int x, int y);
	//##ModelId=4030D77002D0
    void saveDelta   (int x, int y);

    // data-members
	//##ModelId=4030D77002D3
    int ObjPrevX;
	//##ModelId=4030D77002DE
    int ObjPrevY;
	//##ModelId=4030D77002DF
    int ObjDeltaX;
	//##ModelId=4030D77002EE
    int ObjDeltaY;
	//##ModelId=4030D77002F0
    OGLView *ObjPrevView;
	//##ModelId=4030D770030E
    DynArray<GeoObject> ObjSelectedObjects;

  private:
    // copy constructor declared, but not defined
	//##ModelId=4030D7700312
    OGLViewCallback (const OGLViewCallback&);

    // assignment operator declared, but not defined
	//##ModelId=4030D770031D
    OGLViewCallback& operator = (const OGLViewCallback&);

  //friends
//  friend class OGLView;
};

extern OGLViewCallback _impexp StdCallback;

//==================================================================
//		Class-Header
//		for class CameraCallback
//==================================================================

//##ModelId=4030D770033C
class _impexp CameraCallback : public OGLViewCallback {
  public:
    // constructor
	//##ModelId=4030D770033E
    CameraCallback ();

    // destructor
	//##ModelId=4030D770034B
    virtual ~CameraCallback ();

  protected:
	//##ModelId=4030D770034D
    virtual void MouseButtonCB  (OGLView* view, int button, int state, int x, int y);
	//##ModelId=4030D770035C
    virtual void MouseMotionCB  (OGLView* view, int state, int x, int y);

  private:
    // copy constructor declared, but not defined
	//##ModelId=4030D770036D
    CameraCallback (const CameraCallback&);

    // assignment operator declared, but not defined
	//##ModelId=4030D770036F
    CameraCallback& operator = (const CameraCallback&);

    // data-members
//    Clock *ObjTimer;
};

extern CameraCallback _impexp StdCameraCallback;

//==================================================================
//		Class-Header
//		for class LightCallback
//==================================================================

//##ModelId=4030D770038A
class _impexp LightCallback : public OGLViewCallback {
  public:
    // constructor
	//##ModelId=4030D770039A
    LightCallback ();

    // destructor
	//##ModelId=4030D770039B
    virtual ~LightCallback ();

    // setting Camera to Light Viewpoint
	//##ModelId=4030D770039D
    void setCameraToLight (OGLView* view);

  protected:
	//##ModelId=4030D77003AA
    virtual void MouseButtonCB  (OGLView* view, int button, int state, int x, int y);
	//##ModelId=4030D77003BB
    virtual void MouseMotionCB  (OGLView* view, int state, int x, int y);

  private:
    // copy constructor declared, but not defined
	//##ModelId=4030D77003C9
    LightCallback (const LightCallback&);

    // assignment operator declared, but not defined
	//##ModelId=4030D77003CB
    LightCallback& operator = (const LightCallback&);
};

extern LightCallback _impexp StdLightCallback;

//==================================================================
//		Class-Header
//		for class ObjectCallback
//==================================================================

//##ModelId=4030D7710000
class _impexp ObjectCallback : public OGLViewCallback {
  public:
    // constructor
	//##ModelId=4030D771000F
    ObjectCallback ();

    // destructor
	//##ModelId=4030D7710010
    virtual ~ObjectCallback ();

  protected:
	//##ModelId=4030D7710012
    virtual void MouseButtonCB  (OGLView* view, int button, int state, int x, int y);
	//##ModelId=4030D7710022
    virtual void MouseMotionCB  (OGLView* view, int state, int x, int y);

  private:
    // copy constructor declared, but not defined
	//##ModelId=4030D7710030
    ObjectCallback (const ObjectCallback&);

    // assignment operator declared, but not defined
	//##ModelId=4030D7710032
    ObjectCallback& operator = (const ObjectCallback&);
    // data-members
};

extern ObjectCallback _impexp StdObjectCallback;



//==================================================================
//		Class-Header
//		for class DummyCallback
//==================================================================

//class _impexp DummyCallback : public OGLViewCallback {
//  public:
//    // constructor
//    DummyCallback ();

//    // destructor
//    virtual ~DummyCallback ();

//  protected:
//    virtual void MouseButtonCB  (OGLView* view, int button, int state, int x, int y);
//    virtual void MouseMotionCB  (OGLView* view, int state, int x, int y);
//    virtual void MousePassiveCB (OGLView* view, int x, int y);

//  private:
    // copy constructor declared, but not defined
//    DummyCallback (const DummyCallback&);

    // assignment operator declared, but not defined
//    DummyCallback& operator = (const DummyCallback&);
//    // data-members
//};


#endif // !_OGLCALLBACK_H


