Debian Codegraph @

src/Gui/ViewProviderExtern.h

raw
1 /***************************************************************************
2 * Copyright (c) 2004 Jürgen Riegel <[email protected]> *
3 * *
4 * This file is part of the FreeCAD CAx development system. *
5 * *
6 * This library is free software; you can redistribute it and/or *
7 * modify it under the terms of the GNU Library General Public *
8 * License as published by the Free Software Foundation; either *
9 * version 2 of the License, or (at your option) any later version. *
10 * *
11 * This library is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU Library General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU Library General Public *
17 * License along with this library; see the file COPYING.LIB. If not, *
18 * write to the Free Software Foundation, Inc., 59 Temple Place, *
19 * Suite 330, Boston, MA 02111-1307, USA *
20 * *
21 ***************************************************************************/
22
23
24 #ifndef GUI_VIEWPROVIDER_EXTERN_H
25 #define GUI_VIEWPROVIDER_EXTERN_H
26
27 #include "ViewProvider.h"
28
29
30 class SoNode;
31 class SoInput;
32
33 namespace Gui
34 {
35
36
37 class GuiExport ViewProviderExtern: public ViewProvider
38 {
39 PROPERTY_HEADER_WITH_OVERRIDE(Gui::ViewProviderExtern);
40
41 public:
42 /// constructor.
43 ViewProviderExtern();
44
45 /// destructor.
46 ~ViewProviderExtern() override;
47
48 void setModeByString(const char* name, const char* ivFragment);
49 void setModeByFile(const char* name, const char* ivFileName);
50 void setModeBySoInput(const char* name, SoInput& ivFileInput);
51 void adjustDocumentName(const char* docname);
52
53 const char* getDefaultDisplayMode() const override;
54 std::vector<std::string> getDisplayModes() const override;
55 void updateData(const App::Property*) override
56 {}
57
58 private:
59 void adjustRecursiveDocumentName(SoNode*, const char* docname);
60
61 protected:
62 std::vector<std::string> modes;
63 };
64
65 } // namespace Gui
66
67 #endif // GUI_VIEWPROVIDER_EXTERN_H