SUMO - Simulation of Urban MObility
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
GUIMessageWindow.h
Go to the documentation of this file.
1
/****************************************************************************/
7
// A logging window for the gui
8
/****************************************************************************/
9
// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
10
// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors
11
/****************************************************************************/
12
//
13
// This file is part of SUMO.
14
// SUMO is free software: you can redistribute it and/or modify
15
// it under the terms of the GNU General Public License as published by
16
// the Free Software Foundation, either version 3 of the License, or
17
// (at your option) any later version.
18
//
19
/****************************************************************************/
20
#ifndef GUIMessageWindow_h
21
#define GUIMessageWindow_h
22
23
24
// ===========================================================================
25
// included modules
26
// ===========================================================================
27
#ifdef _MSC_VER
28
#include <
windows_config.h
>
29
#else
30
#include <
config.h
>
31
#endif
32
33
#include <string>
34
#include <fx.h>
35
#include <
utils/gui/events/GUIEvent.h
>
36
#include <
utils/iodevices/OutputDevice.h
>
37
38
39
// ===========================================================================
40
// class definitions
41
// ===========================================================================
54
class
GUIMessageWindow
:
public
FXText
{
55
public
:
60
GUIMessageWindow
(FXComposite* parent);
61
62
64
~GUIMessageWindow
();
65
66
68
void
addSeparator
();
69
70
79
void
appendText
(
GUIEventType
eType,
const
std::string& msg);
80
81
83
void
clear
();
84
86
void
registerMsgHandlers
();
87
void
unregisterMsgHandlers
();
88
89
90
private
:
91
class
MsgOutputDevice
:
public
OutputDevice
{
92
public
:
93
MsgOutputDevice
(
GUIMessageWindow
* msgWindow,
GUIEventType
type) :
94
myMsgWindow
(msgWindow),
95
myType
(type) { }
96
97
~MsgOutputDevice
() { }
98
99
protected
:
100
std::ostream&
getOStream
() {
101
return
myStream
;
102
}
103
void
postWriteHook
() {
104
myMsgWindow
->
appendText
(
myType
,
myStream
.str());
105
myStream
.str(
""
);
106
}
107
108
private
:
109
GUIMessageWindow
*
myMsgWindow
;
110
std::ostringstream
myStream
;
111
GUIEventType
myType
;
112
};
113
114
115
private
:
117
FXHiliteStyle*
myStyles
;
118
120
OutputDevice
*
myErrorRetriever
, *
myMessageRetriever
, *
myWarningRetriever
;
121
122
123
124
};
125
126
127
#endif
128
129
/****************************************************************************/
130
home
gladk
tmp
05
sumo-0.17.1~dfsg
src
utils
gui
div
GUIMessageWindow.h
Generated on Sun Jun 16 2013 07:07:17 for SUMO - Simulation of Urban MObility by
1.8.1.2