ViewProvider2DObject.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (c) 2004 Jürgen Riegel <juergen.riegel@web.de>              *
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 PARTGUI_IEWPROVIDER2DOBJECT_H
00025 #define PARTGUI_IEWPROVIDER2DOBJECT_H
00026 
00027 #include "ViewProvider.h"
00028 #include <App/PropertyUnits.h>
00029 #include <Gui/ViewProviderPythonFeature.h>
00030 
00031 class TopoDS_Shape;
00032 class TopoDS_Face;
00033 class SoSeparator;
00034 class SbVec3f;
00035 class SoTransform;
00036 
00037 namespace Gui {
00038   class View3DInventorViewer;
00039   class SoFCSelection;
00040 }
00041 
00042 namespace PartGui {
00043 
00044 
00045 class PartGuiExport ViewProvider2DObject: public PartGui::ViewProviderPart
00046 {
00047   PROPERTY_HEADER(PartGui::ViewProvider2DObject);
00048 
00049 public:
00051   ViewProvider2DObject();
00053   virtual ~ViewProvider2DObject();
00054 
00056   App::PropertyBool ShowGrid;
00057   App::PropertyDistance GridSize;
00058   App::PropertyEnumeration GridStyle;
00059   App::PropertyBool TightGrid;
00060   App::PropertyBool GridSnap;
00061 
00062   virtual void attach(App::DocumentObject *);
00063   virtual void updateData(const App::Property*);
00064   virtual std::vector<std::string> getDisplayModes(void) const;
00065   virtual const char* getDefaultDisplayMode() const;
00066 
00068   SoSeparator* createGrid(void); 
00069 
00070 protected:
00071   virtual bool setEdit(int ModNum);
00072   virtual void unsetEdit(int ModNum);
00074   virtual void onChanged(const App::Property* prop);
00075 
00076   SoSeparator  *GridRoot;
00077 
00078   float MinX;
00079   float MaxX;
00080   float MinY;
00081   float MaxY;
00082   static const char* GridStyleEnums[];
00083 };
00084 
00085 typedef Gui::ViewProviderPythonFeatureT<ViewProvider2DObject> ViewProvider2DObjectPython;
00086 
00087 } // namespace PartGui
00088 
00089 
00090 #endif // PARTGUI_IEWPROVIDER2DOBJECT_H
00091 

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