SoFCInteractiveElement.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (c) 2006 Werner Mayer <wmayer[at]users.sourceforge.net>     *
00003  *                                                                         *
00004  *   This file is part of the FreeCAD CAx development system.              *
00005  *                                                                         *
00006  *   This library is free software; you can redistribute it and/or         *
00007  *   modify it under the terms of the GNU Library General Public           *
00008  *   License as published by the Free Software Foundation; either          *
00009  *   version 2 of the License, or (at your option) any later version.      *
00010  *                                                                         *
00011  *   This library  is distributed in the hope that it will be useful,      *
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00014  *   GNU Library General Public License for more details.                  *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU Library General Public     *
00017  *   License along with this library; see the file COPYING.LIB. If not,    *
00018  *   write to the Free Software Foundation, Inc., 59 Temple Place,         *
00019  *   Suite 330, Boston, MA  02111-1307, USA                                *
00020  *                                                                         *
00021  ***************************************************************************/
00022 
00023 
00024 #ifndef GUI_SOFCINTERACTIVEELEMENT_H
00025 #define GUI_SOFCINTERACTIVEELEMENT_H
00026 
00027 #ifndef __InventorAll__
00028 # include "InventorAll.h"
00029 #endif
00030 
00031 class QGLWidget;
00032 
00033 namespace Gui {
00037 class GuiExport SoFCInteractiveElement : public SoReplacedElement {
00038   typedef SoReplacedElement inherited;
00039 
00040   SO_ELEMENT_HEADER(SoFCInteractiveElement);
00041 
00042 public:
00043   static void initClass(void);
00044 
00045   virtual void init(SoState * state);
00046   static void set(SoState * const state, SoNode * const node, SbBool mode);
00047   static SbBool get(SoState * const state);
00048   static const SoFCInteractiveElement * getInstance(SoState * state);
00049 
00050 protected:
00051   virtual ~SoFCInteractiveElement();
00052   virtual void setElt(SbBool mode);
00053 
00054 private:
00055   SbBool interactiveMode;
00056 };
00057 
00058 class GuiExport SoGLWidgetElement : public SoElement {
00059   typedef SoElement inherited;
00060 
00061   SO_ELEMENT_HEADER(SoGLWidgetElement);
00062 
00063 public:
00064   static void initClass(void);
00065 
00066   virtual void init(SoState * state);
00067   virtual void push(SoState * state);
00068   virtual void pop(SoState * state, const SoElement * prevTopElement);
00069 
00070   virtual SbBool matches(const SoElement * element) const;
00071   virtual SoElement * copyMatchInfo(void) const;
00072 
00073   static  void set(SoState * state, QGLWidget * window);
00074   static  void get(SoState * state, QGLWidget *& window);
00075 
00076 protected:
00077   virtual ~SoGLWidgetElement();
00078 
00079 protected:
00080   QGLWidget * window;
00081 };
00082 
00083 class GuiExport SoGLRenderActionElement : public SoElement {
00084   typedef SoElement inherited;
00085 
00086   SO_ELEMENT_HEADER(SoGLRenderActionElement);
00087 
00088 public:
00089   static void initClass(void);
00090 
00091   virtual void init(SoState * state);
00092   virtual void push(SoState * state);
00093   virtual void pop(SoState * state, const SoElement * prevTopElement);
00094 
00095   virtual SbBool matches(const SoElement * element) const;
00096   virtual SoElement * copyMatchInfo(void) const;
00097 
00098   static  void set(SoState * state, SoGLRenderAction * action);
00099   static  void get(SoState * state, SoGLRenderAction * & action);
00100 
00101 protected:
00102   virtual ~SoGLRenderActionElement();
00103 
00104 protected:
00105   SoGLRenderAction * glRenderAction;
00106 };
00107 
00108 class GuiExport SoGLWidgetNode : public SoNode {
00109     typedef SoNode inherited;
00110 
00111     SO_NODE_HEADER(SoGLWidgetNode);
00112 
00113 public:
00114     static void initClass(void);
00115     SoGLWidgetNode(void);
00116 
00117     QGLWidget * window;
00118 
00119     virtual void doAction(SoAction * action);
00120     virtual void GLRender(SoGLRenderAction * action);
00121 
00122 protected:
00123     virtual ~SoGLWidgetNode();
00124 };
00125 
00126 } // namespace Gui
00127 
00128 #endif // GUI_SOFCINTERACTIVEELEMENT_H

Generated on Wed Nov 23 19:00:39 2011 for FreeCAD by  doxygen 1.6.1