Eclipse SUMO - Simulation of Urban MObility
GNEDrawingShape Class Reference

#include <GNEDrawingShape.h>

Inheritance diagram for GNEDrawingShape:
[legend]
Collaboration diagram for GNEDrawingShape:
[legend]

Public Types

enum  Options {
  NOTHING = 1 << 0 , COLLAPSIBLE = 1 << 1 , EXTENSIBLE = 1 << 2 , SAVE = 1 << 3 ,
  LOAD = 1 << 4
}
 GroupBoxModule options. More...
 

Public Member Functions

void abortDrawing ()
 abort drawing More...
 
void addNewPoint (const Position &P)
 add new point to temporal shape More...
 
FXVerticalFrame * getCollapsableFrame ()
 get collapsable frame (used by all elements that will be collapsed if button is toggled) More...
 
bool getDeleteLastCreatedPoint ()
 get flag delete last created point More...
 
const PositionVectorgetTemporalShape () const
 get Temporal shape More...
 
 GNEDrawingShape (GNEFrame *frameParent)
 FOX-declaration. More...
 
void hideDrawingShape ()
 hide Drawing mode More...
 
bool isDrawing () const
 return true if currently a shape is drawed More...
 
long onCmdCollapseButton (FXObject *, FXSelector, void *)
 collapse GroupBoxModule More...
 
long onCmdExtendButton (FXObject *, FXSelector, void *)
 extends GroupBoxModule More...
 
long onCmdLoadButton (FXObject *, FXSelector, void *)
 load contents More...
 
long onCmdResetButton (FXObject *, FXSelector, void *)
 reset GroupBoxModule More...
 
long onCmdSaveButton (FXObject *, FXSelector, void *)
 save contents More...
 
long onPaint (FXObject *, FXSelector, void *)
 draw MFXGroupBoxModule More...
 
long onUpdResetButton (FXObject *, FXSelector, void *)
 update reset GroupBoxModule More...
 
void removeLastPoint ()
 remove last added point More...
 
void setDeleteLastCreatedPoint (bool value)
 enable or disable delete last created point More...
 
void setText (const std::string &text)
 set text More...
 
void showDrawingShape ()
 show Drawing mode More...
 
void startDrawing ()
 start drawing More...
 
void stopDrawing ()
 stop drawing and check if shape can be created More...
 
 ~GNEDrawingShape ()
 destructor More...
 
FOX-callbacks

Called when the user press start drawing button

long onCmdStartDrawing (FXObject *, FXSelector, void *)
 
long onCmdStopDrawing (FXObject *, FXSelector, void *)
 Called when the user press stop drawing button. More...
 
long onCmdAbortDrawing (FXObject *, FXSelector, void *)
 Called when the user press abort drawing button. More...
 

Protected Member Functions

virtual bool loadContents () const
 load contents (can be reimplemented in children) More...
 
virtual bool saveContents () const
 save contents (can be reimplemented in children) More...
 
void toggleSaveButton (const bool value)
 enable or disable save buttons More...
 

Private Attributes

FXButton * myAbortDrawingButton
 button for abort drawing More...
 
FXVerticalFrame * myCollapsableFrame = nullptr
 vertical collapsable frame More...
 
FXButton * myCollapseButton = nullptr
 button for collapse elements More...
 
bool myCollapsed
 flag to check if this groupbox is collapsed More...
 
bool myDeleteLastCreatedPoint
 flag to enable/disable delete point mode More...
 
MFXButtonTooltipmyExtendButton = nullptr
 button for extend elements More...
 
GNEFramemyFrameParent
 pointer to frame parent More...
 
FXLabel * myInformationLabel
 Label with information. More...
 
FXLabel * myLabel = nullptr
 label used in non collapsable MFXGroupBoxModule More...
 
FXButton * myLoadButton = nullptr
 button for load elements More...
 
const int myOptions
 GroupBoxModule options. More...
 
FXButton * myResetWidthButton = nullptr
 button for reset frame width More...
 
FXButton * mySaveButton = nullptr
 button for save elements More...
 
FXButton * myStartDrawingButton
 button for start drawing More...
 
FXButton * myStopDrawingButton
 button for stop drawing More...
 
PositionVector myTemporalShape
 current drawed shape More...
 

Detailed Description

Definition at line 35 of file GNEDrawingShape.h.

Member Enumeration Documentation

◆ Options

GroupBoxModule options.

Enumerator
NOTHING 
COLLAPSIBLE 
EXTENSIBLE 
SAVE 
LOAD 

Definition at line 38 of file MFXGroupBoxModule.h.

Constructor & Destructor Documentation

◆ GNEDrawingShape()

GNEDrawingShape::GNEDrawingShape ( GNEFrame frameParent)

◆ ~GNEDrawingShape()

GNEDrawingShape::~GNEDrawingShape ( )

destructor

Definition at line 70 of file GNEDrawingShape.cpp.

Member Function Documentation

◆ abortDrawing()

void GNEDrawingShape::abortDrawing ( )

abort drawing

Definition at line 119 of file GNEDrawingShape.cpp.

References myAbortDrawingButton, myStartDrawingButton, myStopDrawingButton, and myTemporalShape.

Referenced by GNEViewNet::abortOperation(), hideDrawingShape(), onCmdAbortDrawing(), showDrawingShape(), and stopDrawing().

Here is the caller graph for this function:

◆ addNewPoint()

void GNEDrawingShape::addNewPoint ( const Position P)

add new point to temporal shape

Definition at line 130 of file GNEDrawingShape.cpp.

References myStopDrawingButton, myTemporalShape, and TL.

Referenced by GNETAZFrame::processClick(), and GNEShapeFrame::processClickPolygons().

Here is the caller graph for this function:

◆ getCollapsableFrame()

FXVerticalFrame * MFXGroupBoxModule::getCollapsableFrame ( )
inherited

get collapsable frame (used by all elements that will be collapsed if button is toggled)

Definition at line 123 of file MFXGroupBoxModule.cpp.

References MFXGroupBoxModule::myCollapsableFrame.

Referenced by GNEInspectorFrame::AdditionalDialog::AdditionalDialog(), GNEFrameAttributeModules::AttributesEditor::AttributesEditor(), GNEFrameAttributeModules::AttributesEditorExtended::AttributesEditorExtended(), GNEGenericDataFrame::AttributeSelector::AttributeSelector(), GNEOverlappedInspection::buildFXElements(), GNEMoveFrame::ChangeZInSelection::ChangeZInSelection(), GNEConnectorFrame::ConnectionModifications::ConnectionModifications(), GNEConnectorFrame::ConnectionOperations::ConnectionOperations(), GNEConnectorFrame::ConnectionSelection::ConnectionSelection(), GNECrossingFrame::CreateCrossing::CreateCrossing(), GNECrossingFrame::CrossingParameters::CrossingParameters(), GNETAZFrame::CurrentTAZ::CurrentTAZ(), GNEMoveFrame::DemandModeOptions::DemandModeOptions(), GNEDistributionFrame::DistributionSelector::DistributionSelector(), GNEDistributionFrame::DistributionValuesEditor::DistributionValuesEditor(), GNEAdditionalFrame::E2MultilaneLegendModule::E2MultilaneLegendModule(), GNECrossingFrame::EdgesSelector::EdgesSelector(), GNEFrameAttributeModules::GenericDataAttributes::GenericDataAttributes(), GNEInspectorFrame::GEOAttributesEditor::GEOAttributesEditor(), GNEDemandElementSelector::GNEDemandElementSelector(), GNEOptionsDialog::GNEOptionsDialog(), GNEPathCreator::GNEPathCreator(), GNEPathLegendModule::GNEPathLegendModule(), GNEPlanCreator::GNEPlanCreator(), GNEPlanCreatorLegend::GNEPlanCreatorLegend(), GNESelectorParent::GNESelectorParent(), GNEStopFrame::HelpCreation::HelpCreation(), GNEVehicleFrame::HelpCreation::HelpCreation(), GNEAdditionalFrame::HelpCreationModule::HelpCreationModule(), GNECrossingFrame::Information::Information(), GNEMoveFrame::Information::Information(), GNESelectorFrame::Information::Information(), GNEGenericDataFrame::IntervalSelector::IntervalSelector(), GNECreateEdgeFrame::LaneTypeSelector::LaneTypeSelector(), GNEConnectorFrame::Legend::Legend(), GNECreateEdgeFrame::Legend::Legend(), GNEProhibitionFrame::Legend::Legend(), GNETAZRelDataFrame::Legend::Legend(), GNEMeanDataFrame::MeanDataEditor::MeanDataEditor(), GNEMeanDataFrame::MeanDataSelector::MeanDataSelector(), GNESelectorFrame::ModificationMode::ModificationMode(), GNEMoveFrame::NetworkModeOptions::NetworkModeOptions(), GNEMatchAttribute::onCmdHelp(), GNEMatchGenericDataAttribute::onCmdHelp(), GNENeteditAttributes::onCmdHelp(), GNEOverlappedInspection::onCmdOverlappingHelp(), GNEFrameAttributeModules::ParametersEditor::ParametersEditor(), GNEDeleteFrame::ProtectElements::ProtectElements(), GNEAttributesCreator::refreshRows(), GNEProhibitionFrame::Selection::Selection(), GNESelectorFrame::SelectionHierarchy::SelectionHierarchy(), GNESelectorFrame::SelectionOperation::SelectionOperation(), GNEMoveFrame::ShiftEdgeSelectedGeometry::ShiftEdgeSelectedGeometry(), GNEMoveFrame::ShiftShapeGeometry::ShiftShapeGeometry(), GNETAZFrame::TAZChildDefaultParameters::TAZChildDefaultParameters(), GNETAZFrame::TAZCommonStatistics::TAZCommonStatistics(), GNETAZFrame::TAZEdgesGraphic::TAZEdgesGraphic(), GNETAZFrame::TAZParameters::TAZParameters(), GNETAZFrame::TAZSaveChanges::TAZSaveChanges(), GNETAZFrame::TAZSelectionStatistics::TAZSelectionStatistics(), GNEInspectorFrame::TemplateEditor::TemplateEditor(), GNETLSEditorFrame::TLSAttributes::TLSAttributes(), GNETLSEditorFrame::TLSDefinition::TLSDefinition(), GNETLSEditorFrame::TLSFile::TLSFile(), GNETLSEditorFrame::TLSJunction::TLSJunction(), GNETLSEditorFrame::TLSPhases::TLSPhases(), GNETypeFrame::TypeEditor::TypeEditor(), and GNESelectorFrame::VisualScaling::VisualScaling().

◆ getDeleteLastCreatedPoint()

bool GNEDrawingShape::getDeleteLastCreatedPoint ( )

get flag delete last created point

Definition at line 166 of file GNEDrawingShape.cpp.

References myDeleteLastCreatedPoint.

Referenced by GNEViewNet::drawTemporalDrawingShape(), GNETAZFrame::processClick(), and GNEShapeFrame::processClickPolygons().

Here is the caller graph for this function:

◆ getTemporalShape()

const PositionVector & GNEDrawingShape::getTemporalShape ( ) const

get Temporal shape

Definition at line 148 of file GNEDrawingShape.cpp.

References myTemporalShape.

Referenced by GNEViewNet::drawTemporalDrawingShape(), GNEShapeFrame::shapeDrawed(), and GNETAZFrame::shapeDrawed().

Here is the caller graph for this function:

◆ hideDrawingShape()

void GNEDrawingShape::hideDrawingShape ( )

hide Drawing mode

Definition at line 81 of file GNEDrawingShape.cpp.

References abortDrawing().

Referenced by GNEShapeFrame::tagSelected().

Here is the caller graph for this function:

◆ isDrawing()

bool GNEDrawingShape::isDrawing ( ) const

return true if currently a shape is drawed

Definition at line 154 of file GNEDrawingShape.cpp.

References myStopDrawingButton.

Referenced by GNEViewNet::abortOperation(), GNEViewNet::drawTemporalDrawingShape(), GNEViewNet::hotkeyEnter(), GNEViewNet::onKeyPress(), GNEViewNet::onKeyRelease(), GNEViewNet::onRightBtnPress(), GNEViewNet::onRightBtnRelease(), GNETAZFrame::processClick(), GNEShapeFrame::processClickPolygons(), and GNEViewNet::processMoveMouseNetwork().

Here is the caller graph for this function:

◆ loadContents()

bool MFXGroupBoxModule::loadContents ( ) const
protectedvirtualinherited

load contents (can be reimplemented in children)

Definition at line 231 of file MFXGroupBoxModule.cpp.

Referenced by MFXGroupBoxModule::onCmdLoadButton().

Here is the caller graph for this function:

◆ onCmdAbortDrawing()

long GNEDrawingShape::onCmdAbortDrawing ( FXObject *  ,
FXSelector  ,
void *   
)

Called when the user press abort drawing button.

Definition at line 186 of file GNEDrawingShape.cpp.

References abortDrawing().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdCollapseButton()

long MFXGroupBoxModule::onCmdCollapseButton ( FXObject *  ,
FXSelector  ,
void *   
)
inherited

collapse GroupBoxModule

Definition at line 142 of file MFXGroupBoxModule.cpp.

References COLLAPSE, GUIIconSubSys::getIcon(), MFXGroupBoxModule::myCollapsableFrame, MFXGroupBoxModule::myCollapseButton, MFXGroupBoxModule::myCollapsed, and UNCOLLAPSE.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdExtendButton()

long MFXGroupBoxModule::onCmdExtendButton ( FXObject *  ,
FXSelector  ,
void *   
)
inherited

extends GroupBoxModule

Definition at line 158 of file MFXGroupBoxModule.cpp.

References GNEFrame::getScrollBarWidth(), GNETLSEditorFrame::TLSPhases::getTLSEditorParent(), GNETLSTable::getTLSPhasesParent(), GNEFrame::getViewNet(), GNEViewNet::getViewParent(), MFXGroupBoxModule::myCollapsableFrame, MFXGroupBoxModule::myFrameParent, and GNEViewParent::setFrameAreaWidth().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdLoadButton()

long MFXGroupBoxModule::onCmdLoadButton ( FXObject *  ,
FXSelector  ,
void *   
)
inherited

load contents

Definition at line 212 of file MFXGroupBoxModule.cpp.

References MFXGroupBoxModule::loadContents().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdResetButton()

long MFXGroupBoxModule::onCmdResetButton ( FXObject *  ,
FXSelector  ,
void *   
)
inherited

reset GroupBoxModule

Definition at line 184 of file MFXGroupBoxModule.cpp.

References GNEFrame::getViewNet(), GNEViewNet::getViewParent(), MFXGroupBoxModule::myFrameParent, and GNEViewParent::setFrameAreaWidth().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdSaveButton()

long MFXGroupBoxModule::onCmdSaveButton ( FXObject *  ,
FXSelector  ,
void *   
)
inherited

save contents

Definition at line 206 of file MFXGroupBoxModule.cpp.

References MFXGroupBoxModule::saveContents().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdStartDrawing()

long GNEDrawingShape::onCmdStartDrawing ( FXObject *  ,
FXSelector  ,
void *   
)

Definition at line 172 of file GNEDrawingShape.cpp.

References startDrawing().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdStopDrawing()

long GNEDrawingShape::onCmdStopDrawing ( FXObject *  ,
FXSelector  ,
void *   
)

Called when the user press stop drawing button.

Definition at line 179 of file GNEDrawingShape.cpp.

References stopDrawing().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onPaint()

long MFXGroupBoxModule::onPaint ( FXObject *  ,
FXSelector  ,
void *  ptr 
)
inherited

draw MFXGroupBoxModule

Definition at line 129 of file MFXGroupBoxModule.cpp.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onUpdResetButton()

long MFXGroupBoxModule::onUpdResetButton ( FXObject *  sender,
FXSelector  ,
void *   
)
inherited

update reset GroupBoxModule

Definition at line 193 of file MFXGroupBoxModule.cpp.

References GNEViewParent::getFrameAreaWidth(), GNEFrame::getViewNet(), GNEViewNet::getViewParent(), and MFXGroupBoxModule::myFrameParent.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ removeLastPoint()

void GNEDrawingShape::removeLastPoint ( )

remove last added point

Definition at line 140 of file GNEDrawingShape.cpp.

References myTemporalShape.

Referenced by GNETAZFrame::processClick(), and GNEShapeFrame::processClickPolygons().

Here is the caller graph for this function:

◆ saveContents()

bool MFXGroupBoxModule::saveContents ( ) const
protectedvirtualinherited

save contents (can be reimplemented in children)

Reimplemented in GNEFixNetworkElements::FixOptions, and GNEFixDemandElements::FixOptions.

Definition at line 224 of file MFXGroupBoxModule.cpp.

Referenced by MFXGroupBoxModule::onCmdSaveButton().

Here is the caller graph for this function:

◆ setDeleteLastCreatedPoint()

void GNEDrawingShape::setDeleteLastCreatedPoint ( bool  value)

enable or disable delete last created point

Definition at line 160 of file GNEDrawingShape.cpp.

References myDeleteLastCreatedPoint.

Referenced by GNEViewNet::onKeyPress(), GNEViewNet::onKeyRelease(), and GNEViewNet::processMoveMouseNetwork().

Here is the caller graph for this function:

◆ setText()

void MFXGroupBoxModule::setText ( const std::string &  text)
inherited

set text

Definition at line 117 of file MFXGroupBoxModule.cpp.

References MFXGroupBoxModule::myLabel.

Referenced by GNETagSelector::setCurrentTagType(), and GNESelectorFrame::SelectionInformation::updateInformationLabel().

Here is the caller graph for this function:

◆ showDrawingShape()

void GNEDrawingShape::showDrawingShape ( )

show Drawing mode

Definition at line 73 of file GNEDrawingShape.cpp.

References abortDrawing().

Referenced by GNEShapeFrame::tagSelected().

Here is the caller graph for this function:

◆ startDrawing()

void GNEDrawingShape::startDrawing ( )

start drawing

Definition at line 90 of file GNEDrawingShape.cpp.

References myAbortDrawingButton, myStartDrawingButton, and myStopDrawingButton.

Referenced by GNEViewNet::hotkeyEnter(), and onCmdStartDrawing().

Here is the caller graph for this function:

◆ stopDrawing()

void GNEDrawingShape::stopDrawing ( )

stop drawing and check if shape can be created

Definition at line 102 of file GNEDrawingShape.cpp.

References abortDrawing(), myAbortDrawingButton, myFrameParent, myStartDrawingButton, myStopDrawingButton, myTemporalShape, and GNEFrame::shapeDrawed().

Referenced by GNEViewNet::hotkeyEnter(), and onCmdStopDrawing().

Here is the caller graph for this function:

◆ toggleSaveButton()

void MFXGroupBoxModule::toggleSaveButton ( const bool  value)
protectedinherited

enable or disable save buttons

Definition at line 238 of file MFXGroupBoxModule.cpp.

References MFXGroupBoxModule::mySaveButton.

Field Documentation

◆ myAbortDrawingButton

FXButton* GNEDrawingShape::myAbortDrawingButton
private

button for abort drawing

Definition at line 111 of file GNEDrawingShape.h.

Referenced by abortDrawing(), startDrawing(), and stopDrawing().

◆ myCollapsableFrame

FXVerticalFrame* MFXGroupBoxModule::myCollapsableFrame = nullptr
privateinherited

◆ myCollapseButton

FXButton* MFXGroupBoxModule::myCollapseButton = nullptr
privateinherited

button for collapse elements

Definition at line 109 of file MFXGroupBoxModule.h.

Referenced by MFXGroupBoxModule::MFXGroupBoxModule(), and MFXGroupBoxModule::onCmdCollapseButton().

◆ myCollapsed

bool MFXGroupBoxModule::myCollapsed
privateinherited

flag to check if this groupbox is collapsed

Definition at line 124 of file MFXGroupBoxModule.h.

Referenced by MFXGroupBoxModule::onCmdCollapseButton().

◆ myDeleteLastCreatedPoint

bool GNEDrawingShape::myDeleteLastCreatedPoint
private

flag to enable/disable delete point mode

Definition at line 99 of file GNEDrawingShape.h.

Referenced by getDeleteLastCreatedPoint(), and setDeleteLastCreatedPoint().

◆ myExtendButton

MFXButtonTooltip* MFXGroupBoxModule::myExtendButton = nullptr
privateinherited

button for extend elements

Definition at line 112 of file MFXGroupBoxModule.h.

◆ myFrameParent

GNEFrame* GNEDrawingShape::myFrameParent
private

pointer to frame parent

Definition at line 96 of file GNEDrawingShape.h.

Referenced by stopDrawing().

◆ myInformationLabel

FXLabel* GNEDrawingShape::myInformationLabel
private

Label with information.

Definition at line 114 of file GNEDrawingShape.h.

◆ myLabel

FXLabel* MFXGroupBoxModule::myLabel = nullptr
privateinherited

label used in non collapsable MFXGroupBoxModule

Definition at line 106 of file MFXGroupBoxModule.h.

Referenced by MFXGroupBoxModule::MFXGroupBoxModule(), and MFXGroupBoxModule::setText().

◆ myLoadButton

FXButton* MFXGroupBoxModule::myLoadButton = nullptr
privateinherited

button for load elements

Definition at line 121 of file MFXGroupBoxModule.h.

Referenced by MFXGroupBoxModule::MFXGroupBoxModule().

◆ myOptions

const int MFXGroupBoxModule::myOptions
privateinherited

GroupBoxModule options.

Definition at line 97 of file MFXGroupBoxModule.h.

Referenced by MFXGroupBoxModule::MFXGroupBoxModule().

◆ myResetWidthButton

FXButton* MFXGroupBoxModule::myResetWidthButton = nullptr
privateinherited

button for reset frame width

Definition at line 115 of file MFXGroupBoxModule.h.

◆ mySaveButton

FXButton* MFXGroupBoxModule::mySaveButton = nullptr
privateinherited

button for save elements

Definition at line 118 of file MFXGroupBoxModule.h.

Referenced by MFXGroupBoxModule::MFXGroupBoxModule(), and MFXGroupBoxModule::toggleSaveButton().

◆ myStartDrawingButton

FXButton* GNEDrawingShape::myStartDrawingButton
private

button for start drawing

Definition at line 105 of file GNEDrawingShape.h.

Referenced by abortDrawing(), startDrawing(), and stopDrawing().

◆ myStopDrawingButton

FXButton* GNEDrawingShape::myStopDrawingButton
private

button for stop drawing

Definition at line 108 of file GNEDrawingShape.h.

Referenced by abortDrawing(), addNewPoint(), isDrawing(), startDrawing(), and stopDrawing().

◆ myTemporalShape

PositionVector GNEDrawingShape::myTemporalShape
private

current drawed shape

Definition at line 102 of file GNEDrawingShape.h.

Referenced by abortDrawing(), addNewPoint(), getTemporalShape(), removeLastPoint(), and stopDrawing().


The documentation for this class was generated from the following files: