Code Search for Developers
 
 
  

MxManipulator.h from Boson at Krugle


Show MxManipulator.h syntax highlighted

#ifndef MXMANIPULATOR_INCLUDED // -*- C++ -*-
#define MXMANIPULATOR_INCLUDED
#if !defined(__GNUC__)
#  pragma once
#endif

/************************************************************************

  MxManipulator

  Copyright (C) 1998 Michael Garland.  See "COPYING.txt" for details.
  
  $Id: MxManipulator.h 5690 2005-02-14 14:21:56Z rivol $

 ************************************************************************/

#include "MxGeom3D.h"

class MxManipulator
{
public:

    virtual void init(const MxBounds&, float) { }

    bool mouse(int kind, int which, int x, int y)
	{
	    if( kind&0xf == 1 ) return mouse_down(which, x, y);
	    else if( kind&0xf == 2 ) return mouse_up(which, x, y);
	    else return motion(x, y);
	}
    virtual bool mouse_down(int which, int x, int y, int kind=1) = 0;
    virtual bool mouse_up(int which, int x, int y, int kind=2) = 0;
    virtual bool motion(int x, int y) = 0;
    virtual bool animate() { return false; }

    virtual void apply() = 0;
    virtual void unapply() = 0;
    virtual void draw() { }
};

// MXMANIPULATOR_INCLUDED
#endif




See more files for this project here

Boson

Boson is an OpenGL real-time strategy game. It is designed to run on Unix (Linux) computers, and is built on top of the KDE, Qt and kdegames libraries.

Project homepage: http://sourceforge.net/projects/boson
Programming language(s): C,C++
License: other

  COPYING.txt
  MxAsp.cxx
  MxAsp.h
  MxBlock.h
  MxBlock2.h
  MxBlock3.h
  MxBlockModel.cxx
  MxBlockModel.h
  MxCamera.cxx
  MxCamera.h
  MxCmdParser.cxx
  MxCmdParser.h
  MxDualModel.cxx
  MxDualModel.h
  MxDualSlim.cxx
  MxDualSlim.h
  MxDynBlock.h
  MxEdgeFilter.cxx
  MxEdgeFilter.h
  MxFaceTree-2.cxx
  MxFaceTree.cxx
  MxFaceTree.h
  MxFeatureFilter.cxx
  MxFeatureFilter.h
  MxFitFrame-2.cxx
  MxFitFrame-vis.cxx
  MxFitFrame.cxx
  MxFitFrame.h
  MxFrame.cxx
  MxFrame.h
  MxGL.h
  MxGLDebug.cxx
  MxGLUtils.cxx
  MxGLUtils.h
  MxGUI.h
  MxGeoPrims.h
  MxGeom2D.cxx
  MxGeom2D.h
  MxGeom3D.cxx
  MxGeom3D.h
  MxHeap.cxx
  MxHeap.h
  MxManipulator.h
  MxMat2.h
  MxMat3.h
  MxMat4.h
  MxMath.h
  MxMatrix.cxx
  MxMatrix.h
  MxPropSlim.cxx
  MxPropSlim.h
  MxQMetric.cxx
  MxQMetric.h
  MxQMetric3.cxx
  MxQMetric3.h
  MxQSlim.cxx
  MxQSlim.h
  MxQVis3.cxx
  MxRaster.h
  MxSMF.cxx
  MxSMF.h
  MxStack.h
  MxStdGUI.cxx
  MxStdGUI.h
  MxStdModel.cxx
  MxStdModel.h
  MxStdRender.cxx
  MxStdSlim.cxx
  MxStdSlim.h
  MxString.h
  MxTimer.h
  MxVec2.h
  MxVec3.h
  MxVec4.h
  MxVector.h
  README
  mixio.h
  mixmops.cxx
  mixmops.h
  mixmsg.cxx
  mixmsg.h
  mixvops.h
  stdmix.h