73 FXIMPLEMENT(
GNEFrame::DrawingMode, FXGroupBox, GNEFrameDrawingModeMap, ARRAYNUMBER(GNEFrameDrawingModeMap))
86 myFrameParent(frameParent) {
91 myBlockMovementCheckButton->setCheck(
false);
100 myBlockShapeCheckButton->setCheck(
false);
206 if (ACs.size() > 0) {
248 if (
myACs.size() > 0) {
252 if (
myACs.size() > 1) {
255 for (
auto i :
myACs) {
256 useGEO &= GNEAttributeCarrier::parse<bool>(i->getAttribute(
SUMO_ATTR_GEO));
276 std::map<SumoXMLAttr, std::string>
278 std::map<SumoXMLAttr, std::string> attributes;
312 for (
auto i :
myACs) {
321 FXDialogBox* helpDialog =
new FXDialogBox(
this,
"GEO attributes Help",
GUIDesignDialogBox);
322 std::ostringstream help;
324 <<
" SUMO uses the World Geodetic System 84 (WGS84/UTM).\n" 325 <<
" For a GEO-referenced network, geo coordinates are represented as pairs of Longitude and Latitude\n" 326 <<
" in decimal degrees without extra symbols. (N,W..)\n" 327 <<
" - Longitude: East-west position of a point on the Earth's surface.\n" 328 <<
" - Latitude: North-south position of a point on the Earth's surface.\n" 329 <<
" - CheckBox 'use GEO' enables or disables saving position in GEO coordinates\n";
333 helpDialog->create();
351 std::ostringstream information;
353 <<
"- 'Start drawing' or ENTER\n" 354 <<
" draws polygon boundary.\n" 355 <<
"- 'Stop drawing' or ENTER\n" 356 <<
" creates polygon.\n" 357 <<
"- 'Abort drawing' or ESC\n" 358 <<
" removes drawed polygon.";
440 throw ProcessError(
"A new point cannot be added if drawing wasn't started");
452 throw ProcessError(
"Last point cannot be removed if drawing wasn't started");
515 myHeaderRightFrame->hide();
530 FXVerticalFrame::hide();
548 FXVerticalFrame::show();
557 FXVerticalFrame::hide();
593 throw ProcessError(
"Netedit Attributes editor wasn't created");
603 throw ProcessError(
"GEO Attributes editor wasn't created");
613 throw ProcessError(
"Drawing Mode editor wasn't created");
GNEFrame()
FOX needs this.
long onCmdAbortDrawing(FXObject *, FXSelector, void *)
Called when the user press abort drawing button.
void showDrawingMode()
show Drawing mode
long onCmdUseGEOParameters(FXObject *, FXSelector, void *)
Called when user enters a new length.
FXLabel * myUseGEOLabel
Label for use GEO.
GNEInspectorFrame * getInspectorFrame() const
get frame for GNE_MODE_INSPECT
std::vector< GNEAttributeCarrier * > myACs
current edited ACs
#define GUIDesignCheckButtonAttribute
checkButton without thick extended over the frame used for attributes
void hideFramesArea()
hide frames area if all GNEFrames are hidden
SumoXMLAttr myGEOAttribute
type of GEO Attribute
GNEFrame::GEOAttributes * myGEOAttributes
GEO Parameters.
FXButton * myHelpButton
button for help
FXLabel * getFrameHeaderLabel() const
get the label for the frame's header
long onCmdHelp(FXObject *, FXSelector, void *)
Called when user press the help button.
bool isCloseShapeEnabled() const
check if clse shape is enabled
void refreshValues()
Refresh inspected values (used when values can be changed externally by other modul) ...
FXFont * myFrameHeaderFont
Font for the Header.
void stopDrawing()
stop drawing and create polygon or
GNEFrame * myFrameParent
frame frame parent
FXHorizontalFrame * myHeaderRightFrame
fame for right header elements
long onCmdSetBlockShape(FXObject *, FXSelector, void *)
Called when user changes the checkbox "set blocking shape".
GNEViewParent * getViewParent() const
get the net object
void showFramesArea()
show frames area if at least a GNEFrame is showed
FXHorizontalFrame * myBlockShapeFrame
frame for Block shape
FXTextField * myGEOAttributeTextField
textField for GEOAttribute
#define GUIDesignContentsFrame
design for the main content frame of every frame/dialog
GNEFrame::NeteditAttributes * myNeteditAttributes
Netedit parameter.
FXScrollWindow * myScrollWindowsContents
scroll windows that holds the content frame
void abortDrawing()
abort drawing
FXFont * getFrameHeaderFont() const
get font of the header's frame
FXHorizontalFrame * myHeaderFrame
fame for header elements
begin/end of the description of a Point of interest
long onCmdStopDrawing(FXObject *, FXSelector, void *)
Called when the user press stop drawing button.
FXCheckButton * myBlockMovementCheckButton
checkBox for block movement
FXLabel * myInformationLabel
Label with information.
FXCheckButton * myUseGEOCheckButton
checkBox for use GEO
void removeLastPoint()
remove last added point
void hideDrawingMode()
hide Drawing mode
GNEViewNet * getViewNet() const
get view net
#define WRITE_WARNING(msg)
long onCmdSetBlockMovement(FXObject *, FXSelector, void *)
PositionVector myTemporalShapeShape
current drawed shape
DrawingMode()
FOX needs this.
const PositionVector & getTemporalShape() const
get Temporal shape
GEOAttributes()
FOX needs this.
GNEViewNet * myViewNet
View Net for changes.
void refreshGEOAttributes()
refresh TextFields with the new GEO Attributes
GNEFrame::DrawingMode * myDrawingMode
drawing mode
long onCmdStartDrawing(FXObject *, FXSelector, void *)
GNEUndoList * getUndoList() const
get the undoList object
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frames used to pack another frames extended in all directions ...
FXCheckButton * myBlockShapeCheckButton
checkBox for block shape
#define GUIDesignHorizontalSeparator
#define GUIDesignTextField
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
A point in 2D or 3D with translation and scaling methods.
void addNewPoint(const Position &P)
add new point to temporal shape
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames ...
#define GUIDesignContentsScrollWindow
design for the content frame of every frame
FXLabel * myFrameHeaderLabel
the label for the frame's header
FXLabel * myGEOAttributeLabel
Label for GEOAttribute.
bool isBlockShapeEnabled() const
check if block shape is enabled
GNEFrame * myFrameParent
current GNEFrame parent
FXButton * myAbortDrawingButton
button for abort drawing
FXButton * myStopDrawingButton
button for stop drawing
void setFrameWidth(int newWidth)
set width of GNEFrame
void focusUpperElement()
focus upper element of frame
GNEFrame::DrawingMode * getDrawingMode() const
get drawing mode editor
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
#define GUIDesignButtonRectangular
little button rectangular (46x23) used in frames (For example, in "help" buttons) ...
long onCmdsetClosingShape(FXObject *, FXSelector, void *)
Called when the user change checkbox for open/closed polygon.
FXHorizontalFrame * myUseGEOFrame
horizontal frame for use GEO
#define GUIDesignTextFieldNCol
Num of column of text field.
~NeteditAttributes()
destructor
virtual void show()
show Frame
#define GUIDesignDialogBox
GNEFrame::GEOAttributes * getGEOAttributes() const
get GEO Parameters editor
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
GNEFrame * myFrameParent
GNEFrame parent.
FXHorizontalFrame * myGEOAttributeFrame
horizontal frame for GEOAttribute
void hideGEOAttributes()
hide GEOAttributes
~GEOAttributes()
destructor
enable or disable use GEO
virtual void hide()
hide Frame
void hideNeteditAttributes()
hide NeteditAttributes
GNEFrame::NeteditAttributes * getNeteditAttributes() const
get netedit attributes editor
void showNeteditAttributes(bool shapeEditing)
show NeteditAttributes
FXButton * myStartDrawingButton
button for start drawing
#define GUIDesignButtonOK
void startDrawing()
start drawing
std::map< SumoXMLAttr, std::string > getGEOAttributes() const
get GEO Attributes
#define GUIDesignLabelAttribute
label extended over the matrix column with thick frame and height of 23
bool isDrawing() const
return true if currently a shape is drawed
void closePolygon()
ensures that the last position equals the first
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
FXCheckButton * myClosePolygonCheckButton
checkbox to enable/disable closing polygon
FXHorizontalFrame * myClosePolygonFrame
Frame for open/close polygon.
FXDEFMAP(GNEFrame::NeteditAttributes) GNEFrameNeteditAttributesMap[]
FXHorizontalFrame * myHeaderLeftFrame
fame for left header elements
enable or disable closing polygon after drawing
bool isBlockMovementEnabled() const
check if block movement is enabled
begin/end of the description of a polygon
void showGEOAttributes(const std::vector< GNEAttributeCarrier *> &ACs)
show GEOAttribute for the current AttributeCarriers
long onCmdSetGEOAttribute(FXObject *, FXSelector, void *)
Called when user change the current GEO Attribute.