Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEFrame.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// Abstract class for lateral frames in NetEdit
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
24
25// ===========================================================================
26// class definitions
27// ===========================================================================
28
33class GNEFrame : public FXVerticalFrame {
34
35public:
41 GNEFrame(GNEViewParent* viewParent, GNEViewNet* viewNet, const std::string& frameLabel);
42
44 ~GNEFrame();
45
47 void focusUpperElement();
48
52 virtual void show();
53
57 virtual void hide();
58
60 void setFrameWidth(const int newWidth);
61
63 GNEViewNet* getViewNet() const;
64
66 FXVerticalFrame* getContentFrame() const;
67
69 FXLabel* getFrameHeaderLabel() const;
70
72 FXFont* getFrameHeaderFont() const;
73
75 int getScrollBarWidth() const;
76
79
81 virtual void updateFrameAfterUndoRedo();
82
84 virtual void frameWidthUpdated();
85
88
90 virtual void tagSelected();
91
93 virtual void demandElementSelected();
94
96 virtual bool shapeDrawed();
97
99 virtual void attributeUpdated(SumoXMLAttr attribute);
100
103
106
108 virtual bool createPath(const bool useLastRoute);
109
111
112protected:
114 FOX_CONSTRUCTOR(GNEFrame)
115
116
118
120 FXVerticalFrame* myContentFrame = nullptr;
121
123 FXHorizontalFrame* myHeaderFrame = nullptr;
124
126 FXHorizontalFrame* myHeaderLeftFrame = nullptr;
127
129 FXHorizontalFrame* myHeaderRightFrame = nullptr;
130
132 const std::vector<std::string>& getPredefinedTagsMML() const;
133
135 static FXLabel* buildRainbow(FXComposite* parent);
136
137private:
139 FXScrollWindow* myScrollWindowsContents = nullptr;
140
142 static FXFont* myFrameHeaderFont;
143
145 FXLabel* myFrameHeaderLabel = nullptr;
146
148 std::vector<std::string> myPredefinedTagsMML;
149
151 GNEFrame(const GNEFrame&) = delete;
152
154 GNEFrame& operator=(const GNEFrame&) = delete;
155};
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
FXHorizontalFrame * myHeaderRightFrame
fame for right header elements
Definition GNEFrame.h:129
int getScrollBarWidth() const
get scrollBar width (zero if is hidden)
Definition GNEFrame.cpp:174
virtual void attributeUpdated(SumoXMLAttr attribute)
function called after set a valid attribute in AttributeCreator/AttributeEditor/ParametersEditor/....
Definition GNEFrame.cpp:286
void setFrameWidth(const int newWidth)
set width of GNEFrame
Definition GNEFrame.cpp:133
void focusUpperElement()
focus upper element of frame
Definition GNEFrame.cpp:109
virtual void updateFrameAfterUndoRedo()
function called after undo/redo in the current frame (can be reimplemented in frame children)
Definition GNEFrame.cpp:252
virtual void attributesEditorExtendedDialogOpened()
open GNEAttributesCreator extended dialog
Definition GNEFrame.cpp:292
static FXLabel * buildRainbow(FXComposite *parent)
build rainbow in frame modul
Definition GNEFrame.cpp:317
virtual void tagSelected()
Tag selected in GNETagSelector.
Definition GNEFrame.cpp:267
GNEViewNet * getViewNet() const
get view net
Definition GNEFrame.cpp:150
FXLabel * getFrameHeaderLabel() const
get the label for the frame's header
Definition GNEFrame.cpp:162
FXScrollWindow * myScrollWindowsContents
scroll windows that holds the content frame
Definition GNEFrame.h:139
virtual void demandElementSelected()
selected demand element in DemandElementSelector
Definition GNEFrame.cpp:273
GNEViewNet * myViewNet
FOX need this.
Definition GNEFrame.h:117
FXFont * getFrameHeaderFont() const
get font of the header's frame
Definition GNEFrame.cpp:168
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
Definition GNEFrame.h:120
FXHorizontalFrame * myHeaderFrame
fame for header elements
Definition GNEFrame.h:123
~GNEFrame()
destructor
Definition GNEFrame.cpp:99
virtual void show()
show Frame
Definition GNEFrame.cpp:115
virtual void hide()
hide Frame
Definition GNEFrame.cpp:124
virtual void selectedOverlappedElement(GNEAttributeCarrier *AC)
open GNEAttributesCreator extended dialog
Definition GNEFrame.cpp:298
virtual void frameWidthUpdated()
function called after setting new width in current frame (can be reimplemented in frame children)
Definition GNEFrame.cpp:258
virtual bool shapeDrawed()
build a shaped element using the drawed shape
Definition GNEFrame.cpp:279
virtual bool createPath(const bool useLastRoute)
create path between two elements
Definition GNEFrame.cpp:304
void openHelpAttributesDialog(const GNEAttributeCarrier *AC) const
Open help attributes dialog.
Definition GNEFrame.cpp:184
std::vector< std::string > myPredefinedTagsMML
Map of attribute ids to their (readable) string-representation (needed for SUMOSAXAttributesImpl_Cach...
Definition GNEFrame.h:148
FXLabel * myFrameHeaderLabel
the label for the frame's header
Definition GNEFrame.h:145
static FXFont * myFrameHeaderFont
static Font for the Header (it's common for all headers, then create only one time)
Definition GNEFrame.h:142
const std::vector< std::string > & getPredefinedTagsMML() const
get predefinedTagsMML
Definition GNEFrame.cpp:311
FXVerticalFrame * getContentFrame() const
get vertical frame that holds all widgets of frame
Definition GNEFrame.cpp:156
FXHorizontalFrame * myHeaderLeftFrame
fame for left header elements
Definition GNEFrame.h:126
A single child window which contains a view of the simulation area.
Definition json.hpp:4471