SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
GNEViewParent.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // A single child window which contains a view of the edited network (adapted
8 // from GUISUMOViewParent)
9 // While we don't actually need MDI for netedit it is easier to adapt existing
10 // structures than to write everything from scratch.
11 /****************************************************************************/
12 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
13 // Copyright (C) 2001-2016 DLR (http://www.dlr.de/) and contributors
14 /****************************************************************************/
15 //
16 // This file is part of SUMO.
17 // SUMO is free software: you can redistribute it and/or modify
18 // it under the terms of the GNU General Public License as published by
19 // the Free Software Foundation, either version 3 of the License, or
20 // (at your option) any later version.
21 //
22 /****************************************************************************/
23 #ifndef GNEViewParent_h
24 #define GNEViewParent_h
25 
26 
27 // ===========================================================================
28 // included modules
29 // ===========================================================================
30 #ifdef _MSC_VER
31 #include <windows_config.h>
32 #else
33 #include <config.h>
34 #endif
35 
36 #include <string>
37 #include <vector>
38 #include <fx.h>
39 #include <utils/geom/Position.h>
40 #include <utils/geom/Boundary.h>
43 
44 // ===========================================================================
45 // class declarations
46 // ===========================================================================
48 class GNENet;
50 class GNEInspectorFrame;
51 class GNESelectorFrame;
52 class GNEConnectorFrame;
53 class GNETLSEditorFrame;
54 class GNEAdditionalFrame;
55 
56 // ===========================================================================
57 // class declarations
58 // ===========================================================================
71  FXDECLARE(GNEViewParent)
72 
73 public:
90  GNEViewParent(FXMDIClient* p, FXMDIMenu* mdimenu,
91  const FXString& name, GNEApplicationWindow* parentWindow,
92  FXGLCanvas* share, GNENet* net, GNEUndoList* undoList,
93  FXIcon* ic = NULL, FXuint opts = 0, FXint x = 0, FXint y = 0, FXint w = 0, FXint h = 0);
94 
97 
100 
103 
106 
109 
112 
115  void showFramesArea();
116 
119  void hideFramesArea();
120 
122  int getFramesAreaWidth();
123 
127  long onCmdMakeSnapshot(FXObject* sender, FXSelector, void*);
128 
130  long onCmdClose(FXObject*, FXSelector, void*);
131 
133  long onCmdLocate(FXObject*, FXSelector, void*);
134 
136  long onKeyPress(FXObject* o, FXSelector sel, void* data);
137 
139  long onKeyRelease(FXObject* o, FXSelector sel, void* data);
141 
143  bool isSelected(GUIGlObject* o) const;
144 
145 protected:
148 
149 private:
151  FXHorizontalFrame* myViewArea;
152 
154  FXHorizontalFrame* myFramesArea;
155 
157  FXSplitter* myFramesSplitter;
158 
161 
164 
167 
170 
173 };
174 
175 
176 #endif
177 
178 /****************************************************************************/
GNESelectorFrame * mySelectorFrame
the panel for GNE_MODE_SELECT
long onKeyPress(FXObject *o, FXSelector sel, void *data)
Called when user press a key.
void hideFramesArea()
hide frames area if all GNEFrames are hidden
~GNEViewParent()
Destructor.
The main window of the Netedit.
int getFramesAreaWidth()
get width of the Frames Area
void showFramesArea()
show frames area if at least a GNEFrame is showed
GNEAdditionalFrame * getAdditionalFrame() const
get frame for GNE_MODE_ADDITIONAL
GNETLSEditorFrame * myTLSEditorFrame
the panel for GNE_MODE_TLS
FXHorizontalFrame * myViewArea
frame to hold myView and myAttributePanel
long onCmdLocate(FXObject *, FXSelector, void *)
locator-callback
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
Called when user releases a key.
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:87
A single child window which contains a view of the simulation area.
Definition: GNEViewParent.h:69
FXSplitter * myFramesSplitter
Splitter to divide ViewNet und GNEFrames.
GNEViewParent()
FOX needs this.
GNEAdditionalFrame * myAdditionalFrame
the panel for GNE_MODE_ADDITIONAL
GNEInspectorFrame * getInspectorFrame() const
get frame for GNE_MODE_INSPECT
GNEConnectorFrame * getConnectorFrame() const
get frame for GNE_MODE_CONNECT
bool isSelected(GUIGlObject *o) const
true if the object is selected (may include extra logic besides calling gSelected) ...
FXHorizontalFrame * myFramesArea
frame to hold GNEFrames
long onCmdClose(FXObject *, FXSelector, void *)
Called when the user hits the close button (x)
GNEConnectorFrame * myConnectorFrame
the panel for GNE_MODE_CONNECT
GNETLSEditorFrame * getTLSEditorFrame() const
get frame for GNE_MODE_TLS
long onCmdMakeSnapshot(FXObject *sender, FXSelector, void *)
GNEInspectorFrame * myInspectorFrame
the panel for GNE_MODE_INSPECT
GNESelectorFrame * getSelectorFrame() const
get frame for GNE_MODE_SELECT