2121#include < pybind11/stl.h>
2222
2323#include < SofaPython3/SofaGui/Binding_GUIManager.h>
24- #include < sofa/gui/GUIManager.h>
25- #include < sofa/gui/BaseGUI.h>
24+ #include < sofa/gui/common/ GUIManager.h>
25+ #include < sofa/gui/common/ BaseGUI.h>
2626#include < sofa/simulation/Node.h>
2727
2828// / Makes an alias for the pybind11 namespace to increase readability.
@@ -32,7 +32,7 @@ namespace sofapython3 {
3232
3333void moduleAddGuiManager (py::module & m)
3434{
35- py::class_<sofa::gui::GUIManager> guiManager (m, " GUIManager" );
35+ py::class_<sofa::gui::common:: GUIManager> guiManager (m, " GUIManager" );
3636
3737 /*
3838 * Sofa.Gui.GUIManager.ListSupportedGUI
@@ -45,8 +45,8 @@ void moduleAddGuiManager(py::module& m)
4545 :return: A string containing each available GUIs. If the parameter 'separator' is omitted, a list containing the
4646 available GUIs is returned instead of a string.
4747 )doc" ;
48- guiManager.def_static (" ListSupportedGUI" , py::overload_cast<>(&sofa::gui::GUIManager::ListSupportedGUI), listSupportedGUIDoc);
49- guiManager.def_static (" ListSupportedGUI" , py::overload_cast<char >(&sofa::gui::GUIManager::ListSupportedGUI), listSupportedGUIDoc );
48+ guiManager.def_static (" ListSupportedGUI" , py::overload_cast<>(&sofa::gui::common:: GUIManager::ListSupportedGUI), listSupportedGUIDoc);
49+ guiManager.def_static (" ListSupportedGUI" , py::overload_cast<char >(&sofa::gui::common:: GUIManager::ListSupportedGUI), listSupportedGUIDoc );
5050
5151
5252 /*
@@ -60,7 +60,7 @@ void moduleAddGuiManager(py::module& m)
6060 :param gui_name: The name of the GUI used. See Sofa.Gui.GUIManager.ListSupportedGUI(). (optional)
6161 :type gui_name: str
6262 )doc" ;
63- guiManager.def_static (" Init" , &sofa::gui::GUIManager::Init, py::arg (" program_name" ), py::arg (" gui_name" ) = " " , initDoc);
63+ guiManager.def_static (" Init" , &sofa::gui::common:: GUIManager::Init, py::arg (" program_name" ), py::arg (" gui_name" ) = " " , initDoc);
6464
6565
6666 /*
@@ -76,10 +76,10 @@ void moduleAddGuiManager(py::module& m)
7676 :return: 0 if the GUI creation succeed, 1 otherwise
7777 )doc" ;
7878 guiManager.def_static (" createGUI" , [](sofa::simulation::Node & node, const std::string & filename) -> int {
79- return sofa::gui::GUIManager::createGUI (&node, filename.c_str ());
79+ return sofa::gui::common:: GUIManager::createGUI (&node, filename.c_str ());
8080 }, createGUIDoc);
8181 guiManager.def_static (" createGUI" , [](sofa::simulation::Node & node) -> int {
82- return sofa::gui::GUIManager::createGUI (&node);
82+ return sofa::gui::common:: GUIManager::createGUI (&node);
8383 }, createGUIDoc);
8484
8585
@@ -89,7 +89,7 @@ void moduleAddGuiManager(py::module& m)
8989 const auto closeGUIDoc = R"doc(
9090 Close the current GUI.
9191 )doc" ;
92- guiManager.def_static (" closeGUI" , &sofa::gui::GUIManager::closeGUI, closeGUIDoc);
92+ guiManager.def_static (" closeGUI" , &sofa::gui::common:: GUIManager::closeGUI, closeGUIDoc);
9393
9494
9595 /*
@@ -106,7 +106,7 @@ void moduleAddGuiManager(py::module& m)
106106 :type temporaryFile: bool
107107 )doc" ;
108108 guiManager.def_static (" SetScene" , [](sofa::simulation::Node & node, const char * filename = nullptr , bool temporaryFile = false ) {
109- sofa::gui::GUIManager::SetScene (&node, filename, temporaryFile);
109+ sofa::gui::common:: GUIManager::SetScene (&node, filename, temporaryFile);
110110 }, py::arg (" root" ), py::arg (" filename" ) = nullptr , py::arg (" temporaryFile" ) = false , setSceneDoc);
111111
112112
@@ -125,10 +125,10 @@ void moduleAddGuiManager(py::module& m)
125125 :return: 0 if the main loop succeed, 1 otherwise
126126 )doc" ;
127127 guiManager.def_static (" MainLoop" , [](sofa::simulation::Node & node, const std::string & filename) -> int {
128- return sofa::gui::GUIManager::MainLoop (&node, filename.c_str ());
128+ return sofa::gui::common:: GUIManager::MainLoop (&node, filename.c_str ());
129129 }, mainLoopDoc);
130130 guiManager.def_static (" MainLoop" , [](sofa::simulation::Node & node) -> int {
131- return sofa::gui::GUIManager::MainLoop (&node);
131+ return sofa::gui::common:: GUIManager::MainLoop (&node);
132132 }, mainLoopDoc);
133133
134134
@@ -145,7 +145,7 @@ void moduleAddGuiManager(py::module& m)
145145 :param height:
146146 :type height: int
147147 )doc" ;
148- guiManager.def_static (" SetDimension" , &sofa::gui::GUIManager::SetDimension, setDimensionDoc);
148+ guiManager.def_static (" SetDimension" , &sofa::gui::common:: GUIManager::SetDimension, setDimensionDoc);
149149
150150
151151 /*
@@ -154,7 +154,7 @@ void moduleAddGuiManager(py::module& m)
154154 const auto SetFullScreenDoc = R"doc(
155155 Set the GUI in full screen mode.
156156 )doc" ;
157- guiManager.def_static (" SetFullScreen" , &sofa::gui::GUIManager::SetFullScreen, SetFullScreenDoc);
157+ guiManager.def_static (" SetFullScreen" , &sofa::gui::common:: GUIManager::SetFullScreen, SetFullScreenDoc);
158158
159159 /*
160160 * Sofa.Gui.GUIManager.SaveScreenshot
@@ -165,15 +165,15 @@ void moduleAddGuiManager(py::module& m)
165165 :param filename: Where to save the screenshot.
166166 :type filename: str
167167 )doc" ;
168- guiManager.def_static (" SaveScreenshot" , &sofa::gui::GUIManager::SaveScreenshot, SaveScreenshotDoc);
168+ guiManager.def_static (" SaveScreenshot" , &sofa::gui::common:: GUIManager::SaveScreenshot, SaveScreenshotDoc);
169169
170170 /*
171171 * Sofa.Gui.GUIManager.GetGUI
172172 */
173173 const auto GetGUIDoc = R"doc(
174174 Get the current GUI.
175175 )doc" ;
176- guiManager.def_static (" GetGUI" , &sofa::gui::GUIManager::getGUI, GetGUIDoc);
176+ guiManager.def_static (" GetGUI" , &sofa::gui::common:: GUIManager::getGUI, GetGUIDoc);
177177}
178178
179- } // / namespace sofapython3
179+ } // / namespace sofapython3
0 commit comments