Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

SoEvent.h

00001 /**************************************************************************\
00002  *
00003  *  This file is part of the Coin 3D visualization library.
00004  *  Copyright (C) 1998-2002 by Systems in Motion. All rights reserved.
00005  *
00006  *  This library is free software; you can redistribute it and/or
00007  *  modify it under the terms of the GNU Lesser General Public License
00008  *  version 2.1 as published by the Free Software Foundation. See the
00009  *  file LICENSE.LGPL at the root directory of the distribution for
00010  *  more details.
00011  *
00012  *  If you want to use Coin for applications not compatible with the
00013  *  LGPL, please contact SIM to acquire a Professional Edition license.
00014  *
00015  *  Systems in Motion, Prof Brochs gate 6, 7030 Trondheim, NORWAY
00016  *  http://www.sim.no support@sim.no Voice: +47 22114160 Fax: +47 22207097
00017  *
00018 \**************************************************************************/
00019 
00020 #ifndef COIN_SOEVENT_H
00021 #define COIN_SOEVENT_H
00022 
00023 #include <Inventor/SoType.h>
00024 #include <Inventor/SbVec2s.h>
00025 #include <Inventor/SbTime.h>
00026 
00027 class SbViewportRegion;
00028 class SbVec2f;
00029 
00030 
00031 class COIN_DLL_API SoEvent {
00032 
00033 public:
00034   SoEvent(void);
00035   virtual ~SoEvent();
00036 
00037   SbBool isOfType(SoType type) const;
00038   static SoType getClassTypeId(void);
00039   virtual SoType getTypeId(void) const;
00040 
00041   void setTime(const SbTime t);
00042   SbTime getTime(void) const;
00043 
00044   void setPosition(const SbVec2s & p);
00045   const SbVec2s & getPosition(void) const;
00046   const SbVec2s getPosition(const SbViewportRegion & vpRgn) const;
00047   const SbVec2f getNormalizedPosition(const SbViewportRegion & vpRgn) const;
00048 
00049   void setShiftDown(SbBool isDown);
00050   SbBool wasShiftDown(void) const;
00051   void setCtrlDown(SbBool isDown);
00052   SbBool wasCtrlDown(void) const;
00053   void setAltDown(SbBool isDown);
00054   SbBool wasAltDown(void) const;
00055 
00056   static void initClass(void);
00057 
00058 private:
00059   static SoType classTypeId;
00060 
00061   SbTime timeofevent;
00062   SbVec2s positionofevent;
00063 
00064   static void initEvents(void);
00065 
00066   struct {
00067     unsigned int shiftdown : 1;
00068     unsigned int ctrldown  : 1;
00069     unsigned int altdown   : 1;
00070   } modifiers;
00071 };
00072 
00073 #endif // !COIN_SOEVENT_H

Generated at Tue Mar 5 03:31:13 2002 for Coin by doxygen1.2.9 written by Dimitri van Heesch, © 1997-2001