#include <SofaGUI.h>


registration of each GUI | |
| static int | RegisterGUI (const char *name, CreateGUIFn *creator, InitGUIFn *init=NULL, int priority=0) |
| typedef int | InitGUIFn (const char *name, const std::vector< std::string > &options) |
| typedef SofaGUI * | CreateGUIFn (const char *name, const std::vector< std::string > &options, sofa::simulation::Node *groot, const char *filename) |
Data Structures | |
| struct | GUICreator |
Public Member Functions | |
methods each GUI must implement | |
| SofaGUI () | |
| virtual int | mainLoop ()=0 |
| virtual void | redraw ()=0 |
| virtual int | closeGUI ()=0 |
| virtual sofa::simulation::Node * | currentSimulation ()=0 |
Static Public Member Functions | |
Static methods for direct access to GUI | |
| static void | SetProgramName (const char *argv0) |
| static const char * | GetProgramName () |
| static std::vector< std::string > | ListSupportedGUI () |
| static std::string | ListSupportedGUI (char separator) |
| static const char * | GetGUIName () |
| static void | SetGUIName (const char *name="") |
| static void | AddGUIOption (const char *option) |
| static int | Init () |
| static int | Init (const char *argv0, const char *name="") |
| static int | MainLoop (sofa::simulation::Node *groot=NULL, const char *filename=NULL) |
| static SofaGUI * | CurrentGUI () |
| static void | Redraw () |
| static sofa::simulation::Node * | CurrentSimulation () |
Protected Member Functions | |
| virtual | ~SofaGUI () |
| The destructor should not be called directly. Use the closeGUI() method instead. | |
Static Protected Member Functions | |
| static std::list< GUICreator > & | guiCreators () |
| static GUICreator * | GetGUICreator (const char *name=NULL) |
Static Protected Attributes | |
| static const char * | programName = NULL |
| static std::string | guiName = "" |
| static std::vector< std::string > | guiOptions |
| static SofaGUI * | currentGUI = NULL |
Definition at line 41 of file SofaGUI.h.
| sofa::gui::SofaGUI::SofaGUI | ( | ) |
| sofa::gui::SofaGUI::~SofaGUI | ( | ) | [protected, virtual] |
The destructor should not be called directly. Use the closeGUI() method instead.
Definition at line 174 of file SofaGUI.cpp.
References currentGUI.
| void sofa::gui::SofaGUI::AddGUIOption | ( | const char * | option | ) | [static] |
| virtual int sofa::gui::SofaGUI::closeGUI | ( | ) | [pure virtual] |
Implemented in sofa::gui::BatchGUI, sofa::gui::glut::SimpleGUI, and sofa::gui::qt::RealGUI.
| typedef SofaGUI* sofa::gui::SofaGUI::CreateGUIFn | ( | const char * | name, | |
| const std::vector< std::string > & | options, | |||
| sofa::simulation::Node * | groot, | |||
| const char * | filename | |||
| ) |
| SofaGUI * sofa::gui::SofaGUI::CurrentGUI | ( | ) | [static] |
| virtual sofa::simulation::Node* sofa::gui::SofaGUI::currentSimulation | ( | ) | [pure virtual] |
Implemented in sofa::gui::BatchGUI, sofa::gui::glut::SimpleGUI, and sofa::gui::qt::RealGUI.
Referenced by CurrentSimulation().
| sofa::simulation::Node * sofa::gui::SofaGUI::CurrentSimulation | ( | ) | [static] |
Definition at line 138 of file SofaGUI.cpp.
References currentGUI, and currentSimulation().
Referenced by main().
| SofaGUI::GUICreator * sofa::gui::SofaGUI::GetGUICreator | ( | const char * | name = NULL |
) | [static, protected] |
Definition at line 111 of file SofaGUI.cpp.
References GetGUIName(), guiCreators(), and ListSupportedGUI().
Referenced by Init(), and MainLoop().
| const char * sofa::gui::SofaGUI::GetGUIName | ( | ) | [static] |
Definition at line 80 of file SofaGUI.cpp.
References guiCreators(), and guiName.
Referenced by GetGUICreator(), Init(), main(), MainLoop(), and sofa::gui::qt::SofaModeler::runInSofa().
| const char * sofa::gui::SofaGUI::GetProgramName | ( | ) | [static] |
Definition at line 53 of file SofaGUI.cpp.
References programName.
Referenced by sofa::gui::qt::RealGUI::CreateGUI().
| std::list< SofaGUI::GUICreator > & sofa::gui::SofaGUI::guiCreators | ( | ) | [static, protected] |
Definition at line 41 of file SofaGUI.cpp.
Referenced by GetGUICreator(), GetGUIName(), Init(), ListSupportedGUI(), and RegisterGUI().
| static int sofa::gui::SofaGUI::Init | ( | const char * | argv0, | |
| const char * | name = "" | |||
| ) | [inline, static] |
| int sofa::gui::SofaGUI::Init | ( | ) | [static] |
Definition at line 52 of file Main.cpp.
References currentGUI, GetGUICreator(), GetGUIName(), guiCreators(), guiOptions, sofa::gui::SofaGUI::GUICreator::init, and sofa::component::init().
Referenced by Init(), main(), and sofa::gui::qt::SofaModeler::runInSofa().
| typedef int sofa::gui::SofaGUI::InitGUIFn | ( | const char * | name, | |
| const std::vector< std::string > & | options | |||
| ) |
| std::string sofa::gui::SofaGUI::ListSupportedGUI | ( | char | separator | ) | [static] |
| std::vector< std::string > sofa::gui::SofaGUI::ListSupportedGUI | ( | ) | [static] |
Definition at line 58 of file SofaGUI.cpp.
References guiCreators().
Referenced by GetGUICreator(), and main().
| virtual int sofa::gui::SofaGUI::mainLoop | ( | ) | [pure virtual] |
Implemented in sofa::gui::BatchGUI, sofa::gui::glut::SimpleGUI, and sofa::gui::qt::RealGUI.
Referenced by MainLoop().
| int sofa::gui::SofaGUI::MainLoop | ( | sofa::simulation::Node * | groot = NULL, |
|
| const char * | filename = NULL | |||
| ) | [static] |
Definition at line 75 of file Main.cpp.
References sofa::gui::SofaGUI::GUICreator::creator, currentGUI, GetGUICreator(), GetGUIName(), guiOptions, and mainLoop().
Referenced by main().
| virtual void sofa::gui::SofaGUI::redraw | ( | ) | [pure virtual] |
Implemented in sofa::gui::BatchGUI, sofa::gui::glut::SimpleGUI, and sofa::gui::qt::RealGUI.
Referenced by Redraw().
| void sofa::gui::SofaGUI::Redraw | ( | ) | [static] |
| int sofa::gui::SofaGUI::RegisterGUI | ( | const char * | name, | |
| CreateGUIFn * | creator, | |||
| InitGUIFn * | init = NULL, |
|||
| int | priority = 0 | |||
| ) | [static] |
Definition at line 146 of file SofaGUI.cpp.
References sofa::gui::SofaGUI::GUICreator::creator, guiCreators(), sofa::gui::SofaGUI::GUICreator::init, sofa::gui::SofaGUI::GUICreator::name, and sofa::gui::SofaGUI::GUICreator::priority.
| void sofa::gui::SofaGUI::SetGUIName | ( | const char * | name = "" |
) | [static] |
| void sofa::gui::SofaGUI::SetProgramName | ( | const char * | argv0 | ) | [static] |
SofaGUI * sofa::gui::SofaGUI::currentGUI = NULL [static, protected] |
Definition at line 115 of file SofaGUI.h.
Referenced by CurrentGUI(), CurrentSimulation(), Init(), MainLoop(), Redraw(), SofaGUI(), and ~SofaGUI().
std::string sofa::gui::SofaGUI::guiName = "" [static, protected] |
std::vector< std::string > sofa::gui::SofaGUI::guiOptions [static, protected] |
const char * sofa::gui::SofaGUI::programName = NULL [static, protected] |
1.5.7.1