SUMO - Simulation of Urban MObility
|
A logging window for the gui. More...
#include <GUIMessageWindow.h>
Data Structures | |
class | MsgOutputDevice |
Public Member Functions | |
void | addSeparator () |
Adds a a separator to this log window. | |
void | appendText (GUIEventType eType, const std::string &msg) |
Adds new text to the window. | |
void | clear () |
Clears the window. | |
GUIMessageWindow (FXComposite *parent) | |
Constructor. | |
void | registerMsgHandlers () |
register and unregister message handlers | |
void | unregisterMsgHandlers () |
~GUIMessageWindow () | |
Destructor. |
Private Attributes | |
OutputDevice * | myErrorRetriever |
The instances of message retriever encapsulations. | |
OutputDevice * | myMessageRetriever |
FXHiliteStyle * | myStyles |
The text colors used. | |
OutputDevice * | myWarningRetriever |
A logging window for the gui.
This class displays messages incoming to the gui from either the load or the run thread.
The text is colored in dependence to its type (messages: green, warnings: yellow, errors: red)
Each time a new message is passed, the window is reopened.
Definition at line 54 of file GUIMessageWindow.h.
GUIMessageWindow::GUIMessageWindow | ( | FXComposite * | parent | ) |
Constructor.
[in] | parent | The parent window |
Definition at line 44 of file GUIMessageWindow.cpp.
References myStyles.
GUIMessageWindow::~GUIMessageWindow | ( | ) |
Destructor.
Definition at line 94 of file GUIMessageWindow.cpp.
References myErrorRetriever, myMessageRetriever, myStyles, and myWarningRetriever.
void GUIMessageWindow::addSeparator | ( | ) |
Adds a a separator to this log window.
Definition at line 137 of file GUIMessageWindow.cpp.
Referenced by GUIApplicationWindow::closeAllWindows().
void GUIMessageWindow::appendText | ( | GUIEventType | eType, |
const std::string & | msg | ||
) |
Adds new text to the window.
The type of the text is determined by the first parameter
[in] | eType | The type of the event the message was generated by |
[in] | msg | The message |
Definition at line 103 of file GUIMessageWindow.cpp.
References EVENT_ERROR_OCCURED, EVENT_MESSAGE_OCCURED, and EVENT_WARNING_OCCURED.
Referenced by GUIApplicationWindow::handleEvent_Message(), GUIApplicationWindow::handleEvent_SimulationLoaded(), and GUIMessageWindow::MsgOutputDevice::postWriteHook().
void GUIMessageWindow::clear | ( | ) |
Clears the window.
Definition at line 150 of file GUIMessageWindow.cpp.
Referenced by GUIApplicationWindow::onCmdClearMsgWindow().
void GUIMessageWindow::registerMsgHandlers | ( | ) |
register and unregister message handlers
Definition at line 163 of file GUIMessageWindow.cpp.
References MsgHandler::addRetriever(), EVENT_ERROR_OCCURED, EVENT_MESSAGE_OCCURED, EVENT_WARNING_OCCURED, MsgHandler::getErrorInstance(), MsgHandler::getMessageInstance(), MsgHandler::getWarningInstance(), myErrorRetriever, myMessageRetriever, and myWarningRetriever.
void GUIMessageWindow::unregisterMsgHandlers | ( | ) |
Definition at line 177 of file GUIMessageWindow.cpp.
References MsgHandler::getErrorInstance(), MsgHandler::getMessageInstance(), MsgHandler::getWarningInstance(), myErrorRetriever, myMessageRetriever, myWarningRetriever, and MsgHandler::removeRetriever().
|
private |
The instances of message retriever encapsulations.
Definition at line 120 of file GUIMessageWindow.h.
Referenced by registerMsgHandlers(), unregisterMsgHandlers(), and ~GUIMessageWindow().
|
private |
Definition at line 120 of file GUIMessageWindow.h.
Referenced by registerMsgHandlers(), unregisterMsgHandlers(), and ~GUIMessageWindow().
|
private |
The text colors used.
Definition at line 117 of file GUIMessageWindow.h.
Referenced by GUIMessageWindow(), and ~GUIMessageWindow().
|
private |
Definition at line 120 of file GUIMessageWindow.h.
Referenced by registerMsgHandlers(), unregisterMsgHandlers(), and ~GUIMessageWindow().