Coin Logo http://www.sim.no
http://www.coin3d.org

SoQtCursor.h

00001 /**************************************************************************\
00002  *
00003  *  This file is part of the Coin 3D visualization library.
00004  *  Copyright (C) 1998-2005 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 General Public License
00008  *  ("GPL") version 2 as published by the Free Software Foundation.
00009  *  See the file LICENSE.GPL at the root directory of this source
00010  *  distribution for additional information about the GNU GPL.
00011  *
00012  *  For using Coin with software that can not be combined with the GNU
00013  *  GPL, and for taking advantage of the additional benefits of our
00014  *  support services, please contact Systems in Motion about acquiring
00015  *  a Coin Professional Edition License.
00016  *
00017  *  See <URL:http://www.coin3d.org/> for more information.
00018  *
00019  *  Systems in Motion, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY.
00020  *  <URL:http://www.sim.no/>.
00021  *
00022 \**************************************************************************/
00023 
00024 #ifndef SOQT_CURSOR_H
00025 #define SOQT_CURSOR_H
00026 
00027 #include <Inventor/SbLinear.h>
00028 #include <Inventor/Qt/SoQtBasic.h>
00029 
00030 class SOQT_DLL_API SoQtCursor {
00031 public:
00032   static void initClass(void);
00033 
00034   struct CustomCursor {
00035     SbVec2s dim;
00036     SbVec2s hotspot;
00037     unsigned char * bitmap;
00038     unsigned char * mask;
00039   };
00040 
00041 
00042   // FIXME: add more default shapes. 20011119 pederb.
00043   enum Shape {
00044     CUSTOM_BITMAP = -1,
00045     DEFAULT = 0,
00046     BUSY,
00047     CROSSHAIR,
00048     UPARROW
00049   };
00050   
00051   SoQtCursor(void);
00052   SoQtCursor(const Shape shape);
00053   SoQtCursor(const CustomCursor * cc);
00054   SoQtCursor(const SoQtCursor & cursor);
00055   ~SoQtCursor();
00056 
00057   SoQtCursor & operator=(const SoQtCursor & c);
00058 
00059   Shape getShape(void) const;
00060   void setShape(const Shape shape);
00061 
00062   const CustomCursor & getCustomCursor(void) const;
00063 
00064   static const SoQtCursor & getZoomCursor(void);
00065   static const SoQtCursor & getPanCursor(void);
00066   static const SoQtCursor & getRotateCursor(void);
00067   static const SoQtCursor & getBlankCursor(void);
00068   
00069 private:
00070   void commonConstructor(const Shape shape, const CustomCursor * cc);
00071 
00072   Shape shape;
00073   CustomCursor * cc;
00074 };
00075 
00076 #endif // ! SOQT_CURSOR_H

Copyright © 1998-2005 by Systems in Motion AS. All rights reserved.

Generated on Wed May 9 11:46:57 2007 for SoQt by Doxygen. 1.5.1