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 /****************************************************************************/
14 // Abstract class for lateral frames in NetEdit
15 /****************************************************************************/
16 #ifndef GNEFrame_h
17 #define GNEFrame_h
18 
19 // ===========================================================================
20 // included modules
21 // ===========================================================================
22 
23 #include "GNEFrameModuls.h"
25 
26 // ===========================================================================
27 // class definitions
28 // ===========================================================================
29 
34 class GNEFrame : public FXVerticalFrame {
35 
37  friend class GNEFrameModuls;
39 
40 public:
46  GNEFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet, const std::string& frameLabel);
47 
49  ~GNEFrame();
50 
52  void focusUpperElement();
53 
57  virtual void show();
58 
62  virtual void hide();
63 
65  void setFrameWidth(int newWidth);
66 
68  GNEViewNet* getViewNet() const;
69 
71  FXLabel* getFrameHeaderLabel() const;
72 
74  FXFont* getFrameHeaderFont() const;
75 
77  virtual void updateFrameAfterUndoRedo();
78 
79 protected:
81 
82 
83 
86  virtual void tagSelected();
87 
89  virtual void demandElementSelected();
90 
92  virtual void edgePathCreated();
93 
95  virtual bool shapeDrawed();
96 
98  virtual void attributeUpdated();
99 
102 
105 
107 
109  void openHelpAttributesDialog(const GNEAttributeCarrier::TagProperties& tagProperties) const;
110 
112  const RGBColor& getEdgeCandidateColor() const;
113 
116 
118  const std::map<int, std::string>& getPredefinedTagsMML() const;
119 
121  GNEViewNet* myViewNet = nullptr;
122 
124  FXVerticalFrame* myContentFrame = nullptr;
125 
127  FXHorizontalFrame* myHeaderFrame = nullptr;
128 
130  FXHorizontalFrame* myHeaderLeftFrame = nullptr;
131 
133  FXHorizontalFrame* myHeaderRightFrame = nullptr;
134 
135 private:
137  FXScrollWindow* myScrollWindowsContents = nullptr;
138 
140  static FXFont* myFrameHeaderFont;
141 
143  FXLabel* myFrameHeaderLabel = nullptr;
144 
147 
150 
152  std::map<int, std::string> myPredefinedTagsMML;
153 
155  GNEFrame(const GNEFrame&) = delete;
156 
158  GNEFrame& operator=(const GNEFrame&) = delete;
159 };
160 
161 
162 #endif
163 
164 /****************************************************************************/
GNEFrame::myFrameHeaderFont
static FXFont * myFrameHeaderFont
static Font for the Header (it's common for all headers, then create only one time)
Definition: GNEFrame.h:140
GNEFrame::myScrollWindowsContents
FXScrollWindow * myScrollWindowsContents
scroll windows that holds the content frame
Definition: GNEFrame.h:137
GNEFrame::attributeUpdated
virtual void attributeUpdated()
function called after set a valid attribute in AttributeCreator/AttributeEditor/ParametersEditor/....
Definition: GNEFrame.cpp:184
GNEFrame::getFrameHeaderFont
FXFont * getFrameHeaderFont() const
get font of the header's frame
Definition: GNEFrame.cpp:144
GNEAttributeCarrier::TagProperties
struct with the attribute Properties
Definition: GNEAttributeCarrier.h:317
GNEFrame::updateFrameAfterUndoRedo
virtual void updateFrameAfterUndoRedo()
function called after undo/redo in the current frame (can be reimplemented in frame children)
Definition: GNEFrame.cpp:150
GNEFrame::GNEFrame
GNEFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet, const std::string &frameLabel)
Constructor.
Definition: GNEFrame.cpp:41
GNEFrame::edgePathCreated
virtual void edgePathCreated()
finish edge path creation
Definition: GNEFrame.cpp:171
GNEFrame::demandElementSelected
virtual void demandElementSelected()
selected demand element in DemandElementSelector
Definition: GNEFrame.cpp:165
GNEFrame::tagSelected
virtual void tagSelected()
Tag selected in TagSelector.
Definition: GNEFrame.cpp:159
GNEFrame::myHeaderLeftFrame
FXHorizontalFrame * myHeaderLeftFrame
fame for left header elements
Definition: GNEFrame.h:130
GNEFrame::getViewNet
GNEViewNet * getViewNet() const
get view net
Definition: GNEFrame.cpp:132
GNEFrame
Definition: GNEFrame.h:34
GNEViewNet
Definition: GNEViewNet.h:42
GNEFrame::myContentFrame
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
Definition: GNEFrame.h:124
GNEFrame::myHeaderRightFrame
FXHorizontalFrame * myHeaderRightFrame
fame for right header elements
Definition: GNEFrame.h:133
GNEFrame::attributesEditorExtendedDialogOpened
virtual void attributesEditorExtendedDialogOpened()
open AttributesCreator extended dialog (can be reimplemented in frame children)
Definition: GNEFrame.cpp:190
GNEFrame::myFrameHeaderLabel
FXLabel * myFrameHeaderLabel
the label for the frame's header
Definition: GNEFrame.h:143
GNEFrame::getEdgeCandidateSelectedColor
const RGBColor & getEdgeCandidateSelectedColor() const
get selected color
Definition: GNEFrame.cpp:275
RGBColor
Definition: RGBColor.h:39
GNEFrame::focusUpperElement
void focusUpperElement()
focus upper element of frame
Definition: GNEFrame.cpp:101
GNEFrameAttributesModuls.h
GNEFrame::GNEFrame
GNEFrame(const GNEFrame &)=delete
Invalidated copy constructor.
GNEFrame::myEdgeCandidateColor
RGBColor myEdgeCandidateColor
edge candidate color (used by some modulds to mark edges)
Definition: GNEFrame.h:146
GNEFrame::myHeaderFrame
FXHorizontalFrame * myHeaderFrame
fame for header elements
Definition: GNEFrame.h:127
GNEFrame::myEdgeCandidateSelectedColor
RGBColor myEdgeCandidateSelectedColor
selected edge candidate color (used by some modulds to selected mark edges)
Definition: GNEFrame.h:149
FOX_CONSTRUCTOR
#define FOX_CONSTRUCTOR(classname)
Definition: config.h:13
GNEFrame::myViewNet
GNEViewNet * myViewNet
View Net.
Definition: GNEFrame.h:121
GNEFrame::getPredefinedTagsMML
const std::map< int, std::string > & getPredefinedTagsMML() const
get predefinedTagsMML
Definition: GNEFrame.cpp:281
GNEFrame::openHelpAttributesDialog
void openHelpAttributesDialog(const GNEAttributeCarrier::TagProperties &tagProperties) const
Open help attributes dialog.
Definition: GNEFrame.cpp:202
GNEFrame::selectedOverlappedElement
virtual void selectedOverlappedElement(GNEAttributeCarrier *AC)
open AttributesCreator extended dialog (can be reimplemented in frame children)
Definition: GNEFrame.cpp:196
GNEFrameAttributesModuls
Definition: GNEFrameAttributesModuls.h:37
GNEFrame::~GNEFrame
~GNEFrame()
destructor
Definition: GNEFrame.cpp:91
GNEFrameModuls
Definition: GNEFrameModuls.h:37
GNEFrame::setFrameWidth
void setFrameWidth(int newWidth)
set width of GNEFrame
Definition: GNEFrame.cpp:125
GNEFrame::shapeDrawed
virtual bool shapeDrawed()
build a shaped element using the drawed shape (can be reimplemented in frame children)
Definition: GNEFrame.cpp:177
GNEFrame::getEdgeCandidateColor
const RGBColor & getEdgeCandidateColor() const
get edge candidate color
Definition: GNEFrame.cpp:269
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:152
GNEFrame::show
virtual void show()
show Frame
Definition: GNEFrame.cpp:107
GNEFrame::operator=
GNEFrame & operator=(const GNEFrame &)=delete
Invalidated assignment operator.
GNEAttributeCarrier
Definition: GNEAttributeCarrier.h:54
GNEFrame::getFrameHeaderLabel
FXLabel * getFrameHeaderLabel() const
get the label for the frame's header
Definition: GNEFrame.cpp:138
GNEFrame::hide
virtual void hide()
hide Frame
Definition: GNEFrame.cpp:116