Interface for the SDFormat Editor's Graphical User Interface Note that this class also inherits from std::enable_shared_from_this<GUII>, as it may be required to pass a shared pointer of itself into the CommandI object in the Update method.
More...
#include <gui_interface.h>
|
| struct | DialogMessage |
| | Struct representing a dialog message. This struct encapsulates the components of a dialog message. More...
|
| |
|
| virtual std::unique_ptr< CommandI > | Update (std::shared_ptr< CommandFactoryI > command_factory)=0 |
| | Updating the GUI.
|
| |
| virtual bool | ShouldClose ()=0 |
| | Indicate if the GUI should close
|
| |
| virtual void | OpenChoiceDialog (DialogMessage dialogMessage, std::vector< std::pair< std::string, bool > > &choices)=0 |
| | Enables a choice dialog message in the GUI that will be override everything else.
|
| |
| virtual void | SetPreventInputFlag (bool set)=0 |
| | Method to change the flag which can be set to prevent the GUI from taking user input. This can be used in instances where OpenFileDialog or another threadded method is running.
|
| |
| virtual std::unique_lock< std::mutex > | LockMutex ()=0 |
| | Method to lock mutex.
|
| |
|
| virtual void | Initialize (const std::string &windowName, std::shared_ptr< SDFormatParserI > sdformat_parser, bool &success)=0 |
| | Initialization of the GUI. Should be wrapped in the constructor of the implementation. NOTE: (zaid) As more features are added, more things will be added to this initalize method.
|
| |
Interface for the SDFormat Editor's Graphical User Interface Note that this class also inherits from std::enable_shared_from_this<GUII>, as it may be required to pass a shared pointer of itself into the CommandI object in the Update method.
◆ Initialize()
| virtual void GUII::Initialize |
( |
const std::string & |
windowName, |
|
|
std::shared_ptr< SDFormatParserI > |
sdformat_parser, |
|
|
bool & |
success |
|
) |
| |
|
protectedpure virtual |
Initialization of the GUI. Should be wrapped in the constructor of the implementation. NOTE: (zaid) As more features are added, more things will be added to this initalize method.
- Parameters
-
| [in] | window_name | The name to be given to the SDFormatEditor Window |
| [in] | sdformat_parser | Pointer to the sdformat parser object |
| [out] | success | true if window initalization is successful |
Implemented in GUI.
◆ LockMutex()
| virtual std::unique_lock< std::mutex > GUII::LockMutex |
( |
| ) |
|
|
pure virtual |
Method to lock mutex.
Implemented in GUI.
◆ OpenChoiceDialog()
| virtual void GUII::OpenChoiceDialog |
( |
DialogMessage |
dialogMessage, |
|
|
std::vector< std::pair< std::string, bool > > & |
choices |
|
) |
| |
|
pure virtual |
Enables a choice dialog message in the GUI that will be override everything else.
- Parameters
-
| [in] | dialogMessage | struct containing the strings to display |
| [out] | choices | a vector of string,bools pairs where one bool will be set true, corresponding to the user's choice |
Implemented in GUI.
◆ SetPreventInputFlag()
| virtual void GUII::SetPreventInputFlag |
( |
bool |
set | ) |
|
|
pure virtual |
Method to change the flag which can be set to prevent the GUI from taking user input. This can be used in instances where OpenFileDialog or another threadded method is running.
- Parameters
-
| [in] | set | value to set the flag |
Implemented in GUI.
◆ ShouldClose()
| virtual bool GUII::ShouldClose |
( |
| ) |
|
|
pure virtual |
Indicate if the GUI should close
Implemented in GUI.
◆ Update()
Updating the GUI.
- Parameters
-
| [in] | command_factory | used for creating command objects |
- Returns
- The a pointer to the command resulting from the user's action during this frame
Implemented in GUI.
The documentation for this class was generated from the following file: