ViewProviderDocumentObject.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef GUI_VIEWPROVIDER_DOCUMENTOBJECT_H
00025 #define GUI_VIEWPROVIDER_DOCUMENTOBJECT_H
00026
00027 #include <Inventor/SoType.h>
00028
00029 #include "ViewProvider.h"
00030 #include <App/DocumentObject.h>
00031
00032 class SoMaterial;
00033 class SoDrawStyle;
00034 class SoType;
00035
00036 namespace App
00037 {
00038 class DocumentObject;
00039 class Material;
00040 }
00041
00042
00043 namespace Gui {
00044
00045 class MDIView;
00046
00047 class GuiExport ViewProviderDocumentObject : public ViewProvider
00048 {
00049 PROPERTY_HEADER(Gui::ViewProviderDocumentObject);
00050
00051 public:
00053 ViewProviderDocumentObject();
00054
00056 virtual ~ViewProviderDocumentObject();
00057
00058
00059 App::PropertyEnumeration DisplayMode;
00060 App::PropertyBool Visibility;
00061
00062 virtual void attach(App::DocumentObject *pcObject);
00064 virtual const char* getDefaultDisplayMode() const;
00066 virtual std::vector<std::string> getDisplayModes(void) const;
00068 void setActiveMode();
00070 virtual void hide(void);
00072 virtual void show(void);
00073
00075 virtual void getTaskViewContent(std::vector<Gui::TaskView::TaskContent*>&) const;
00076
00078 void updateView();
00080 virtual void updateData(const App::Property*){};
00082 App::DocumentObject *getObject(void) const {return pcObject;}
00084 PyObject* getPyObject();
00085
00088 virtual void startRestoring();
00089 virtual void finishRestoring();
00091
00092 protected:
00094 Gui::MDIView* getActiveView() const;
00096 virtual void onChanged(const App::Property* prop);
00104 SoNode* findFrontRootOfType(const SoType& type) const;
00105
00106 protected:
00107 App::DocumentObject *pcObject;
00108
00109 private:
00110 std::vector<const char*> aDisplayEnumsArray;
00111 std::vector<std::string> aDisplayModesArray;
00112 };
00113
00114
00115 }
00116
00117 #endif // GUI_VIEWPROVIDER_DOCUMENTOBJECT_H
00118