Debian Codegraph @

src/Gui/ViewProviderGeoFeatureGroupExtension.h

raw
1 /***************************************************************************
2 * Copyright (c) 2011 Jürgen Riegel <[email protected]> *
3 * Copyright (c) 2015 Alexander Golubev (Fat-Zer) <[email protected]> *
4 * Copyright (c) 2016 Stefan Tröger <[email protected]> *
5 * *
6 * This file is part of the FreeCAD CAx development system. *
7 * *
8 * This library is free software; you can redistribute it and/or *
9 * modify it under the terms of the GNU Library General Public *
10 * License as published by the Free Software Foundation; either *
11 * version 2 of the License, or (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU Library General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Library General Public *
19 * License along with this library; see the file COPYING.LIB. If not, *
20 * write to the Free Software Foundation, Inc., 59 Temple Place, *
21 * Suite 330, Boston, MA 02111-1307, USA *
22 * *
23 ***************************************************************************/
24
25 #ifndef GUI_VIEWPROVIDERGEOFEATUREGROUPEXTENSION_H
26 #define GUI_VIEWPROVIDERGEOFEATUREGROUPEXTENSION_H
27
28 #include "ViewProviderGroupExtension.h"
29
30
31 namespace Gui
32 {
33
34 class GuiExport ViewProviderGeoFeatureGroupExtension: public ViewProviderGroupExtension
35 {
36 EXTENSION_PROPERTY_HEADER_WITH_OVERRIDE(Gui::ViewProviderGeoFeatureGroupExtension);
37
38 public:
39 /// Constructor
40 ViewProviderGeoFeatureGroupExtension();
41 ~ViewProviderGeoFeatureGroupExtension() override;
42
43 std::vector<App::DocumentObject*> extensionClaimChildren3D() const override;
44 std::vector<App::DocumentObject*> extensionClaimChildren() const override;
45 SoSeparator* extensionGetFrontRoot() const override
46 {
47 return pcGroupFront;
48 }
49 SoSeparator* extensionGetBackRoot() const override
50 {
51 return pcGroupBack;
52 }
53 SoGroup* extensionGetChildRoot() const override
54 {
55 return pcGroupChildren;
56 }
57 void extensionAttach(App::DocumentObject* pcObject) override;
58 void extensionSetDisplayMode(const char* ModeName) override;
59 std::vector<std::string> extensionGetDisplayModes() const override;
60 void extensionFinishRestoring() override;
61
62 /// Show the object in the view: suppresses behavior of DocumentObjectGroup
63 void extensionShow() override
64 {
65 ViewProviderExtension::extensionShow(); // clazy:exclude=skipped-base-method
66 }
67 /// Hide the object in the view: suppresses behavior of DocumentObjectGroup
68 void extensionHide() override
69 {
70 ViewProviderExtension::extensionHide(); // clazy:exclude=skipped-base-method
71 }
72
73 void extensionUpdateData(const App::Property*) override;
74
75 protected:
76 SoSeparator* pcGroupFront;
77 SoSeparator* pcGroupBack;
78 SoGroup* pcGroupChildren;
79 };
80
81 using ViewProviderGeoFeatureGroupExtensionPython
82 = ViewProviderExtensionPythonT<Gui::ViewProviderGeoFeatureGroupExtension>;
83
84 } // namespace Gui
85
86 #endif // GUI_VIEWPROVIDERGEOFEATUREGROUPEXTENSION_H