Debian Codegraph @

src/Gui/ViewProviderPlacement.h

raw
1 /***************************************************************************
2 * Copyright (c) 2012 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 #ifndef GUI_ViewProviderPlacement_H
24 #define GUI_ViewProviderPlacement_H
25
26 #include "AxisOrigin.h"
27 #include "ViewProviderGeometryObject.h"
28 #include "ViewProviderFeaturePython.h"
29
30
31 class SoFontStyle;
32 class SoText2;
33 class SoBaseColor;
34 class SoTranslation;
35 class SoCoordinate3;
36 class SoIndexedLineSet;
37 class SoEventCallback;
38 class SoMaterial;
39
40 namespace Gui
41 {
42
43 class GuiExport ViewProviderPlacement: public ViewProviderGeometryObject
44 {
45 PROPERTY_HEADER_WITH_OVERRIDE(Gui::ViewProviderPlacement);
46
47 public:
48 /// Constructor
49 ViewProviderPlacement();
50 ~ViewProviderPlacement() override;
51
52 void attach(App::DocumentObject*) override;
53 void updateData(const App::Property*) override;
54 std::vector<std::string> getDisplayModes() const override;
55 void setDisplayMode(const char* ModeName) override;
56
57 /// indicates if the ViewProvider use the new Selection model
58 bool useNewSelectionModel() const override
59 {
60 return true;
61 }
62 /// indicates if the ViewProvider can be selected
63 bool isSelectable() const override;
64
65 bool getElementPicked(const SoPickedPoint* pp, std::string& subname) const override;
66 bool getDetailPath(const char*, SoFullPath*, bool, SoDetail*&) const override;
67
68 protected:
69 void onChanged(const App::Property* prop) override;
70 };
71
72 using ViewProviderPlacementPython = ViewProviderFeaturePythonT<ViewProviderPlacement>;
73
74 } // namespace Gui
75
76
77 #endif // GUI_ViewProviderPlacement_H