SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GUIPointOfInterest.cpp
Go to the documentation of this file.
1 /****************************************************************************/
9 // The GUI-version of a point of interest
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
12 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
13 /****************************************************************************/
14 //
15 // This file is part of SUMO.
16 // SUMO is free software: you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation, either version 3 of the License, or
19 // (at your option) any later version.
20 //
21 /****************************************************************************/
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 #ifdef WIN32
34 #include <windows.h>
35 #endif
36 
37 #include <GL/gl.h>
38 
39 #include "GUIPointOfInterest.h"
47 #include <utils/gui/div/GLHelper.h>
49 
50 #ifdef CHECK_MEMORY_LEAKS
51 #include <foreign/nvwa/debug_new.h>
52 #endif // CHECK_MEMORY_LEAKS
53 
54 
55 // ===========================================================================
56 // method definitions
57 // ===========================================================================
59  const std::string& id,
60  const std::string& type,
61  const Position& p,
62  const RGBColor& c) :
63  PointOfInterest(id, type, p, c),
65  myLayer(layer) {}
66 
67 
69 
70 
73  GUISUMOAbstractView& parent) {
74 
75  GUIGLObjectPopupMenu* ret = new GUIGLObjectPopupMenu(app, parent, *this);
76  buildPopupHeader(ret, app, false);
77  FXString t(myType.c_str());
78  new FXMenuCommand(ret, "(" + t + ")", 0, 0, 0);
79  new FXMenuSeparator(ret);
83  buildPositionCopyEntry(ret, false);
84  return ret;
85 }
86 
87 
91  return 0;
92 }
93 
94 
97  Boundary b;
98  b.add(x(), y());
99  b.grow(10);
100  return b;
101 }
102 
103 
104 void
106  if (s.scale * (1.3 / 3.0) < s.minPOISize) {
107  return;
108  }
109  glPushName(getGlID());
110  glPushMatrix();
111  glColor3d(red(), green(), blue());
112  glTranslated(x(), y(), getLayer());
114  glPopMatrix();
115  drawName(Position(x() + 1.32 * s.poiExaggeration, y() + 1.32 * s.poiExaggeration),
116  s.scale, s.poiName);
117  glPopName();
118 }
119 
120 
121 int
123  return myLayer;
124 }
125 
126 
127 
128 /****************************************************************************/
129