SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GUIMessageWindow Class Reference

A logging window for the gui. More...

#include <GUIMessageWindow.h>

Inheritance diagram for GUIMessageWindow:
FXText

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

OutputDevicemyErrorRetriever
 The instances of message retriever encapsulations.
OutputDevicemyMessageRetriever
FXHiliteStyle * myStyles
 The text colors used.
OutputDevicemyWarningRetriever

Detailed Description

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 55 of file GUIMessageWindow.h.

Constructor & Destructor Documentation

GUIMessageWindow::GUIMessageWindow ( FXComposite *  parent)

Constructor.

Parameters
[in]parentThe parent window

Definition at line 45 of file GUIMessageWindow.cpp.

References myStyles.

GUIMessageWindow::~GUIMessageWindow ( )

Destructor.

Definition at line 95 of file GUIMessageWindow.cpp.

References myErrorRetriever, myMessageRetriever, myStyles, and myWarningRetriever.

Member Function Documentation

void GUIMessageWindow::addSeparator ( )

Adds a a separator to this log window.

Definition at line 138 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

Parameters
[in]eTypeThe type of the event the message was generated by
[in]msgThe message
See Also
GUIEventType

Definition at line 104 of file GUIMessageWindow.cpp.

References EVENT_ERROR_OCCURED, EVENT_MESSAGE_OCCURED, and EVENT_WARNING_OCCURED.

Referenced by GUIApplicationWindow::handleEvent_Message(), and GUIMessageWindow::MsgOutputDevice::postWriteHook().

void GUIMessageWindow::clear ( )

Clears the window.

Definition at line 151 of file GUIMessageWindow.cpp.

Referenced by GUIApplicationWindow::onCmdClearMsgWindow().

Field Documentation

OutputDevice* GUIMessageWindow::myErrorRetriever
private

The instances of message retriever encapsulations.

Definition at line 121 of file GUIMessageWindow.h.

Referenced by registerMsgHandlers(), unregisterMsgHandlers(), and ~GUIMessageWindow().

OutputDevice * GUIMessageWindow::myMessageRetriever
private
FXHiliteStyle* GUIMessageWindow::myStyles
private

The text colors used.

Definition at line 118 of file GUIMessageWindow.h.

Referenced by GUIMessageWindow(), and ~GUIMessageWindow().

OutputDevice * GUIMessageWindow::myWarningRetriever
private

The documentation for this class was generated from the following files: