Debian Codegraph @

src/Gui/View3DInventorSelection.h

raw
1 /****************************************************************************
2 * Copyright (c) 2022 Zheng Lei (realthunder) <[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 #ifndef GUI_VIEW3DINVENTORSELECTION_H
24 #define GUI_VIEW3DINVENTORSELECTION_H
25
26 #include <map>
27 #include <string>
28 #include <Gui/Selection/Selection.h>
29
30 class SoGroup;
31 class SoNode;
32 class SoSeparator;
33
34 namespace Gui
35 {
36
37 class Document;
38 class SoFCUnifiedSelection;
39
40 class GuiExport View3DInventorSelection
41 {
42 public:
43 View3DInventorSelection(SoFCUnifiedSelection* root);
44 ~View3DInventorSelection();
45
46 void setDocument(Gui::Document* pcDocument)
47 {
48 guiDocument = pcDocument;
49 }
50 Gui::Document* getDocument() const
51 {
52 return guiDocument;
53 }
54
55 void checkGroupOnTop(const SelectionChanges& Reason);
56 void clearGroupOnTop();
57
58 private:
59 SoGroup* pcGroupOnTop;
60 SoGroup* pcGroupOnTopSel;
61 SoGroup* pcGroupOnTopPreSel;
62 SoFCUnifiedSelection* selectionRoot;
63 std::map<std::string, SoNode*> objectsOnTop;
64 std::map<std::string, SoNode*> objectsOnTopPreSel;
65 Gui::Document* guiDocument = nullptr;
66 };
67
68 } // namespace Gui
69
70 #endif // GUI_VIEW3DINVENTORSELECTION_H