![]() |
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. More... | |
void | appendMsg (GUIEventType eType, const std::string &msg) |
Adds new text to the window. More... | |
void | clear () |
Clears the window. More... | |
GUIMessageWindow (FXComposite *parent) | |
Constructor. More... | |
void | registerMsgHandlers () |
register and unregister message handlers More... | |
virtual void | setCursorPos (FXint pos, FXbool notify=FALSE) |
void | unregisterMsgHandlers () |
~GUIMessageWindow () | |
Destructor. More... | |
Static Public Member Functions | |
static void | enableLocateLinks (const bool val) |
switch locate links on and off More... | |
static bool | locateLinksEnabled () |
ask whether locate links is enabled More... | |
Private Member Functions | |
const GUIGlObject * | getActiveStringObject (const FXString &text, const FXint pos, const FXint lineS, const FXint lineE) const |
Private Attributes | |
OutputDevice * | myErrorRetriever |
The instances of message retriever encapsulations. More... | |
OutputDevice * | myMessageRetriever |
FXHiliteStyle * | myStyles |
The text colors used. More... | |
OutputDevice * | myWarningRetriever |
Static Private Attributes | |
static bool | myLocateLinks = true |
whether messages are linked to the GUI elements More... | |
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 61 of file GUIMessageWindow.h.
GUIMessageWindow::GUIMessageWindow | ( | FXComposite * | parent | ) |
Constructor.
[in] | parent | The parent window |
Definition at line 54 of file GUIMessageWindow.cpp.
References myStyles.
GUIMessageWindow::~GUIMessageWindow | ( | ) |
Destructor.
Definition at line 102 of file GUIMessageWindow.cpp.
References myErrorRetriever, myMessageRetriever, myStyles, and myWarningRetriever.
void GUIMessageWindow::addSeparator | ( | ) |
Adds a a separator to this log window.
Definition at line 202 of file GUIMessageWindow.cpp.
Referenced by GUIApplicationWindow::closeAllWindows(), GNEApplicationWindow::closeAllWindows(), GNEApplicationWindow::onCmdSaveAdditionals(), GNEApplicationWindow::onCmdSaveAsPlainXML(), GNEApplicationWindow::onCmdSaveJoined(), GNEApplicationWindow::onCmdSaveNetwork(), and GNEApplicationWindow::onCmdSavePois().
void GUIMessageWindow::appendMsg | ( | 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 150 of file GUIMessageWindow.cpp.
References EVENT_ERROR_OCCURED, EVENT_MESSAGE_OCCURED, EVENT_WARNING_OCCURED, getActiveStringObject(), GUIGlObject::getGlID(), GUIGlObjectStorage::gIDStorage, myLocateLinks, and GUIGlObjectStorage::unblockObject().
Referenced by GNEApplicationWindow::handleEvent_Message(), GUIApplicationWindow::handleEvent_Message(), GNEApplicationWindow::onCmdSaveAdditionals(), GNEApplicationWindow::onCmdSaveAsPlainXML(), GNEApplicationWindow::onCmdSaveJoined(), GNEApplicationWindow::onCmdSaveNetwork(), and GUIMessageWindow::MsgOutputDevice::postWriteHook().
void GUIMessageWindow::clear | ( | ) |
Clears the window.
Definition at line 215 of file GUIMessageWindow.cpp.
Referenced by GNEApplicationWindow::onCmdClearMsgWindow(), and GUIApplicationWindow::onCmdClearMsgWindow().
|
inlinestatic |
switch locate links on and off
Definition at line 100 of file GUIMessageWindow.h.
References myLocateLinks.
Referenced by GUIDialog_AppSettings::onCmdOk().
|
private |
Definition at line 111 of file GUIMessageWindow.cpp.
References GUIGlObjectStorage::getObjectBlocking(), GUIGlObjectStorage::gIDStorage, and MAX2().
Referenced by appendMsg(), and setCursorPos().
|
inlinestatic |
ask whether locate links is enabled
Definition at line 105 of file GUIMessageWindow.h.
References myLocateLinks.
void GUIMessageWindow::registerMsgHandlers | ( | ) |
register and unregister message handlers
Definition at line 228 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.
Referenced by GNEApplicationWindow::handleEvent_NetworkLoaded().
|
virtual |
Definition at line 130 of file GUIMessageWindow.cpp.
References getActiveStringObject(), GUIGlObject::getGlID(), GUIMainWindow::getInstance(), GUIMainWindow::getViewByID(), GUIMainWindow::getViewIDs(), GUIGlObjectStorage::gIDStorage, main(), myLocateLinks, GUIGlChildWindow::setView(), and GUIGlObjectStorage::unblockObject().
void GUIMessageWindow::unregisterMsgHandlers | ( | ) |
Definition at line 242 of file GUIMessageWindow.cpp.
References MsgHandler::getErrorInstance(), MsgHandler::getMessageInstance(), MsgHandler::getWarningInstance(), myErrorRetriever, myMessageRetriever, myWarningRetriever, and MsgHandler::removeRetriever().
Referenced by GNEApplicationWindow::closeAllWindows().
|
private |
The instances of message retriever encapsulations.
Definition at line 145 of file GUIMessageWindow.h.
Referenced by registerMsgHandlers(), unregisterMsgHandlers(), and ~GUIMessageWindow().
|
staticprivate |
whether messages are linked to the GUI elements
Definition at line 139 of file GUIMessageWindow.h.
Referenced by appendMsg(), enableLocateLinks(), locateLinksEnabled(), and setCursorPos().
|
private |
Definition at line 145 of file GUIMessageWindow.h.
Referenced by registerMsgHandlers(), unregisterMsgHandlers(), and ~GUIMessageWindow().
|
private |
The text colors used.
Definition at line 142 of file GUIMessageWindow.h.
Referenced by GUIMessageWindow(), and ~GUIMessageWindow().
|
private |
Definition at line 145 of file GUIMessageWindow.h.
Referenced by registerMsgHandlers(), unregisterMsgHandlers(), and ~GUIMessageWindow().