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
/****************************************************************************/
8
// A logging window for the gui
9
/****************************************************************************/
10
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
11
// Copyright (C) 2003-2014 DLR (http://www.dlr.de/) and contributors
12
/****************************************************************************/
13
//
14
// This file is part of SUMO.
15
// SUMO is free software: you can redistribute it and/or modify
16
// it under the terms of the GNU General Public License as published by
17
// the Free Software Foundation, either version 3 of the License, or
18
// (at your option) any later version.
19
//
20
/****************************************************************************/
21
#ifndef GUIMessageWindow_h
22
#define GUIMessageWindow_h
23
24
25
// ===========================================================================
26
// included modules
27
// ===========================================================================
28
#ifdef _MSC_VER
29
#include <
windows_config.h
>
30
#else
31
#include <
config.h
>
32
#endif
33
34
#include <string>
35
#include <fx.h>
36
#include <
utils/gui/events/GUIEvent.h
>
37
#include <
utils/iodevices/OutputDevice.h
>
38
39
40
// ===========================================================================
41
// class definitions
42
// ===========================================================================
55
class
GUIMessageWindow
:
public
FXText
{
56
public
:
61
GUIMessageWindow
(FXComposite* parent);
62
63
65
~GUIMessageWindow
();
66
67
69
void
addSeparator
();
70
71
80
void
appendText
(
GUIEventType
eType,
const
std::string& msg);
81
82
84
void
clear
();
85
87
void
registerMsgHandlers
();
88
void
unregisterMsgHandlers
();
89
90
91
private
:
92
class
MsgOutputDevice
:
public
OutputDevice
{
93
public
:
94
MsgOutputDevice
(
GUIMessageWindow
* msgWindow,
GUIEventType
type) :
95
myMsgWindow
(msgWindow),
96
myType
(type) { }
97
98
~MsgOutputDevice
() { }
99
100
protected
:
101
std::ostream&
getOStream
() {
102
return
myStream
;
103
}
104
void
postWriteHook
() {
105
myMsgWindow
->
appendText
(
myType
,
myStream
.str());
106
myStream
.str(
""
);
107
}
108
109
private
:
110
GUIMessageWindow
*
myMsgWindow
;
111
std::ostringstream
myStream
;
112
GUIEventType
myType
;
113
};
114
115
116
private
:
118
FXHiliteStyle*
myStyles
;
119
121
OutputDevice
*
myErrorRetriever
, *
myMessageRetriever
, *
myWarningRetriever
;
122
123
124
125
};
126
127
128
#endif
129
130
/****************************************************************************/
131
tmp
buildd
sumo-0.21.0+dfsg
src
utils
gui
div
GUIMessageWindow.h
Generated on Thu Nov 20 2014 19:49:54 for SUMO - Simulation of Urban MObility by
1.8.1.2