53 #ifdef CHECK_MEMORY_LEAKS
55 #endif // CHECK_MEMORY_LEAKS
81 :
FXGLCanvas(c, app.getGLVisual(), app.getBuildGLCanvas(), (
FXObject*) 0, (FXSelector) 0, LAYOUT_SIDE_TOP | LAYOUT_FILL_X | LAYOUT_FILL_Y),
82 myParent(&parent), myApplication(&app) {}
92 int widthInPixels = getWidth();
93 int heightInPixels = getHeight();
94 if (widthInPixels != 0 && heightInPixels != 0) {
95 glViewport(0, 0, widthInPixels - 1, heightInPixels - 1);
96 glClearColor(0, 0, 0, 1);
97 glDisable(GL_DEPTH_TEST);
98 glDisable(GL_LIGHTING);
99 glDisable(GL_LINE_SMOOTH);
101 glEnable(GL_ALPHA_TEST);
102 glDisable(GL_COLOR_MATERIAL);
104 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
118 int widthInPixels = getWidth();
119 int heightInPixels = getHeight();
120 if (widthInPixels != 0 && heightInPixels != 0) {
121 glViewport(0, 0, widthInPixels - 1, heightInPixels - 1);
122 glClearColor(0, 0, 0, 1);
123 glDisable(GL_DEPTH_TEST);
124 glDisable(GL_LIGHTING);
125 glDisable(GL_LINE_SMOOTH);
127 glEnable(GL_ALPHA_TEST);
128 glDisable(GL_COLOR_MATERIAL);
130 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
132 glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
133 myParent->drawValues(*
this);
163 :
FXMainWindow(app.getApp(), "TLS-Tracker", NULL, NULL, DECOR_ALL,
169 new FXToolBarGrip(
myToolBar,
myToolBar, FXToolBar::ID_TOOLBARGRIP, TOOLBARGRIP_DOUBLE);
180 app.addChild(
this,
true);
184 FXVerticalFrame* glcanvasFrame =
185 new FXVerticalFrame(
this,
186 FRAME_SUNKEN | LAYOUT_SIDE_TOP | LAYOUT_FILL_X | LAYOUT_FILL_Y,
187 0, 0, 0, 0, 0, 0, 0, 0);
190 setTitle((logic.getID() +
" - " + logic.getProgramID() +
" - tracker").c_str());
200 :
FXMainWindow(app.getApp(),
"TLS-Tracker", NULL, NULL, DECOR_ALL,
206 setTitle(
"TLS-Tracker");
211 FXVerticalFrame* glcanvasFrame =
212 new FXVerticalFrame(
this,
213 FRAME_SUNKEN | LAYOUT_SIDE_TOP | LAYOUT_FILL_X | LAYOUT_FILL_Y,
214 0, 0, 0, 0, 0, 0, 0, 0);
248 size_t leftOffset = 0;
255 MSSimpleTrafficLightLogic::Phases::const_iterator j;
258 for (j = phases.begin(); j != phases.end(); ++j) {
271 DurationsVector::reverse_iterator i =
myDurations.rbegin();
273 if (durs + (*i) > beginOffset) {
286 leftOffset = beginOffset - durs;
291 glMatrixMode(GL_PROJECTION);
293 glMatrixMode(GL_MODELVIEW);
295 glTranslated(-1, -1, 0);
297 glDisable(GL_TEXTURE_2D);
315 glVertex2d((
SUMOReal)(30. / width), h);
318 if (i < myTLLogic->getLinks().size()) {
319 glRotated(180, 1, 0, 0);
321 glTranslated(0.0, -h + h20 - h4, 0);
323 glTranslated(-0.0, h - h20 + h4, 0);
324 glRotated(-180, 1, 0, 0);
330 glVertex2d(0, h + h20);
331 glVertex2d(1.0, h + h20);
338 glVertex2d((
SUMOReal) 30 / width, 1.0);
339 glVertex2d((
SUMOReal) 30 / width, h);
360 size_t duration = *pd - fpo;
370 LinkState state = (*pi).getSignalState(j);
375 glColor3d(0, 1.0, 0);
377 glVertex2d(x, h - h16);
378 glVertex2d(x, h - h4);
379 glVertex2d(x2, h - h4);
380 glVertex2d(x2, h - h16);
385 glColor3d(1.0, 1.0, 0);
387 glVertex2d(x, h - h16);
388 glVertex2d(x, h - h4);
389 glVertex2d(x2, h - h4);
390 glVertex2d(x2, h - h16);
394 glColor3d(1.0, 0, 0);
396 glVertex2d(x, h - h10);
397 glVertex2d(x2, h - h10);
422 while (t > (width - 31.) / 4.) {
424 t -= (
SUMOReal)((width - 31.) / 4.);
435 while (pos < width + 50) {
438 glRotated(180, 1, 0, 0);
440 glTranslated(glpos - w / 2., -glh + h20 - h4, 0);
442 glTranslated(-glpos + w / 2., glh - h20 + h4, 0);
443 glRotated(-180, 1, 0, 0);
446 glVertex2d(glpos, glh);
447 glVertex2d(glpos, glh - h4);
453 currTime += tickDist;
483 FXSelector sel,
void* data) {
491 FXSelector sel,
void* data) {