Eclipse SUMO - Simulation of Urban MObility
GNEFrame.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // Abstract class for lateral frames in NetEdit
16 /****************************************************************************/
17 #ifndef GNEFrame_h
18 #define GNEFrame_h
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 
24 #include "GNEFrameModuls.h"
26 
27 // ===========================================================================
28 // class definitions
29 // ===========================================================================
30 
35 class GNEFrame : public FXVerticalFrame {
36 
38  friend class GNEFrameModuls;
40 
41 public:
47  GNEFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet, const std::string& frameLabel);
48 
50  ~GNEFrame();
51 
53  void focusUpperElement();
54 
58  virtual void show();
59 
63  virtual void hide();
64 
66  void setFrameWidth(int newWidth);
67 
69  GNEViewNet* getViewNet() const;
70 
72  FXLabel* getFrameHeaderLabel() const;
73 
75  FXFont* getFrameHeaderFont() const;
76 
78  virtual void updateFrameAfterUndoRedo();
79 
80 protected:
82  GNEFrame() {}
83 
86 
88  virtual void tagSelected();
89 
91  virtual void demandElementSelected();
92 
94  virtual void edgePathCreated();
95 
97  virtual bool shapeDrawed();
98 
100  virtual void attributeUpdated();
101 
104 
106 
108  void openHelpAttributesDialog(const GNEAttributeCarrier::TagProperties& tagProperties) const;
109 
111  const RGBColor& getEdgeCandidateColor() const;
112 
115 
117  const std::map<int, std::string>& getPredefinedTagsMML() const;
118 
121 
123  FXVerticalFrame* myContentFrame;
124 
126  FXHorizontalFrame* myHeaderFrame;
127 
129  FXHorizontalFrame* myHeaderLeftFrame;
130 
132  FXHorizontalFrame* myHeaderRightFrame;
133 
134 private:
136  FXScrollWindow* myScrollWindowsContents;
137 
139  static FXFont* myFrameHeaderFont;
140 
143 
146 
149 
151  std::map<int, std::string> myPredefinedTagsMML;
152 
154  GNEFrame(const GNEFrame&) = delete;
155 
157  GNEFrame& operator=(const GNEFrame&) = delete;
158 };
159 
160 
161 #endif
162 
163 /****************************************************************************/
GNEFrame::myFrameHeaderFont
static FXFont * myFrameHeaderFont
static Font for the Header (it's common for all headers, then create only one time)
Definition: GNEFrame.h:139
GNEFrame::myScrollWindowsContents
FXScrollWindow * myScrollWindowsContents
scroll windows that holds the content frame
Definition: GNEFrame.h:136
GNEFrame::attributeUpdated
virtual void attributeUpdated()
function called after set a valid attribute in AttributeCreator/AttributeEditor/GenericParametersEdit...
Definition: GNEFrame.cpp:185
GNEFrame::getFrameHeaderFont
FXFont * getFrameHeaderFont() const
get font of the header's frame
Definition: GNEFrame.cpp:145
GNEAttributeCarrier::TagProperties
struct with the attribute Properties
Definition: GNEAttributeCarrier.h:324
GNEFrame::updateFrameAfterUndoRedo
virtual void updateFrameAfterUndoRedo()
function called after undo/redo in the current frame (can be reimplemented in frame children)
Definition: GNEFrame.cpp:151
GNEFrame::edgePathCreated
virtual void edgePathCreated()
finish edge path creation
Definition: GNEFrame.cpp:172
GNEFrame::demandElementSelected
virtual void demandElementSelected()
selected demand element in DemandElementSelector
Definition: GNEFrame.cpp:166
GNEFrame::tagSelected
virtual void tagSelected()
Tag selected in TagSelector.
Definition: GNEFrame.cpp:160
GNEFrame::myHeaderLeftFrame
FXHorizontalFrame * myHeaderLeftFrame
fame for left header elements
Definition: GNEFrame.h:129
GNEFrame::getViewNet
GNEViewNet * getViewNet() const
get view net
Definition: GNEFrame.cpp:133
GNEFrame
Definition: GNEFrame.h:35
GNEViewNet
Definition: GNEViewNet.h:43
GNEFrame::myContentFrame
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
Definition: GNEFrame.h:123
GNEFrame::myHeaderRightFrame
FXHorizontalFrame * myHeaderRightFrame
fame for right header elements
Definition: GNEFrame.h:132
GNEFrame::attributesEditorExtendedDialogOpened
virtual void attributesEditorExtendedDialogOpened()
open AttributesCreator extended dialog (can be reimplemented in frame children)
Definition: GNEFrame.cpp:191
GNEFrame::myFrameHeaderLabel
FXLabel * myFrameHeaderLabel
the label for the frame's header
Definition: GNEFrame.h:142
GNEFrame::getEdgeCandidateSelectedColor
const RGBColor & getEdgeCandidateSelectedColor() const
get selected color
Definition: GNEFrame.cpp:270
RGBColor
Definition: RGBColor.h:40
GNEFrame::focusUpperElement
void focusUpperElement()
focus upper element of frame
Definition: GNEFrame.cpp:102
GNEFrameAttributesModuls.h
GNEFrame::myEdgeCandidateColor
RGBColor myEdgeCandidateColor
edge candidate color (used by some modulds to mark edges)
Definition: GNEFrame.h:145
GNEFrame::myHeaderFrame
FXHorizontalFrame * myHeaderFrame
fame for header elements
Definition: GNEFrame.h:126
GNEFrame::myEdgeCandidateSelectedColor
RGBColor myEdgeCandidateSelectedColor
selected edge candidate color (used by some modulds to selected mark edges)
Definition: GNEFrame.h:148
GNEFrame::myViewNet
GNEViewNet * myViewNet
View Net.
Definition: GNEFrame.h:120
GNEFrame::getPredefinedTagsMML
const std::map< int, std::string > & getPredefinedTagsMML() const
get predefinedTagsMML
Definition: GNEFrame.cpp:276
GNEFrame::openHelpAttributesDialog
void openHelpAttributesDialog(const GNEAttributeCarrier::TagProperties &tagProperties) const
Open help attributes dialog.
Definition: GNEFrame.cpp:197
GNEFrameAttributesModuls
Definition: GNEFrameAttributesModuls.h:38
GNEFrame::~GNEFrame
~GNEFrame()
destructor
Definition: GNEFrame.cpp:92
GNEFrameModuls
Definition: GNEFrameModuls.h:38
GNEFrame::setFrameWidth
void setFrameWidth(int newWidth)
set width of GNEFrame
Definition: GNEFrame.cpp:126
GNEFrame::GNEFrame
GNEFrame()
FOX needs this.
Definition: GNEFrame.h:82
GNEFrame::shapeDrawed
virtual bool shapeDrawed()
build a shaped element using the drawed shape (can be reimplemented in frame children)
Definition: GNEFrame.cpp:178
GNEFrame::getEdgeCandidateColor
const RGBColor & getEdgeCandidateColor() const
get edge candidate color
Definition: GNEFrame.cpp:264
GNEFrameModuls.h
GNEFrame::myPredefinedTagsMML
std::map< int, std::string > myPredefinedTagsMML
Map of attribute ids to their (readable) string-representation (needed for SUMOSAXAttributesImpl_Cach...
Definition: GNEFrame.h:151
GNEFrame::show
virtual void show()
show Frame
Definition: GNEFrame.cpp:108
GNEFrame::operator=
GNEFrame & operator=(const GNEFrame &)=delete
Invalidated assignment operator.
GNEFrame::getFrameHeaderLabel
FXLabel * getFrameHeaderLabel() const
get the label for the frame's header
Definition: GNEFrame.cpp:139
GNEFrame::hide
virtual void hide()
hide Frame
Definition: GNEFrame.cpp:117