51FXIMPLEMENT(
GNEInspectorFrame, FXVerticalFrame, GNEInspectorFrameMap, ARRAYNUMBER(GNEInspectorFrameMap))
214 if (inspectedElements.isInspectingSingleElement() && (inspectedElements.getFirstAC()->getTagProperty()->getTag() ==
SUMO_TAG_EDGE)) {
215 mySetTemplateButton->setText((
TLF(
"Set edge '%' as Template", inspectedElements.getFirstAC()->getID())).c_str());
223 if (inspectedElements.isInspectingSingleElement()) {
245 GNEFrame(viewParent, viewNet,
"Inspector") {
282 myViewNet->getInspectedElements().inspectACs({});
289 const Position& clickedPosition,
const bool shiftKeyPressed) {
295 if (
myViewNet->getMouseButtonKeyPressed().controlKeyPressed()) {
297 if (AC->isAttributeCarrierSelected()) {
298 AC->unselectAttributeCarrier();
300 AC->selectAttributeCarrier();
317 std::vector<GNEAttributeCarrier*> itemsToInspect;
322 const auto selectedACs =
myViewNet->getNet()->getAttributeCarriers()->getSelectedAttributeCarriers(
false);
324 itemsToInspect.reserve(selectedACs.size());
326 for (
const auto& selectedAC : selectedACs) {
329 itemsToInspect.push_back(selectedAC);
333 itemsToInspect.push_back(AC);
341 myViewNet->getInspectedElements().inspectACs(ACs);
356 const auto& inspectedElements =
myViewNet->getInspectedElements();
371 if (inspectedElements.isInspectingElements()) {
373 std::string headerString;
374 if (inspectedElements.getFirstAC()->getTagProperty()->isNetworkElement()) {
375 headerString =
"Net: ";
376 }
else if (inspectedElements.getFirstAC()->getTagProperty()->isAdditionalElement()) {
377 headerString =
"Additional: ";
378 }
else if (inspectedElements.getFirstAC()->getTagProperty()->isShapeElement()) {
379 headerString =
"Shape: ";
380 }
else if (inspectedElements.getFirstAC()->getTagProperty()->isTAZElement()) {
381 headerString =
"TAZ: ";
382 }
else if (inspectedElements.getFirstAC()->getTagProperty()->isWireElement()) {
383 headerString =
"WIRE: ";
384 }
else if (inspectedElements.getFirstAC()->getTagProperty()->isVehicle()) {
385 headerString =
"Vehicle: ";
386 }
else if (inspectedElements.getFirstAC()->getTagProperty()->isRoute()) {
387 headerString =
"Route: ";
388 }
else if (inspectedElements.getFirstAC()->getTagProperty()->isPerson()) {
389 headerString =
"Person: ";
390 }
else if (inspectedElements.getFirstAC()->getTagProperty()->isPlanPerson()) {
391 headerString =
"PersonPlan: ";
392 }
else if (inspectedElements.getFirstAC()->getTagProperty()->isContainer()) {
393 headerString =
"Container: ";
394 }
else if (inspectedElements.getFirstAC()->getTagProperty()->isPlanContainer()) {
395 headerString =
"ContainerPlan: ";
396 }
else if (inspectedElements.getFirstAC()->getTagProperty()->isVehicleStop()) {
397 headerString =
"Stop: ";
398 }
else if (inspectedElements.getFirstAC()->getTagProperty()->isDataElement()) {
399 headerString =
"Data: ";
401 if (
myViewNet->getInspectedElements().isInspectingMultipleElements()) {
402 headerString +=
toString(inspectedElements.getACs().size()) +
" ";
404 headerString += inspectedElements.getFirstAC()->getTagStr();
405 if (
myViewNet->getInspectedElements().isInspectingMultipleElements()) {
415 if (inspectedElements.isInspectingSingleElement()) {
FXDEFMAP(GNEInspectorFrame) GNEInspectorFrameMap[]
@ MID_GNE_INSPECTORFRAME_INSPECTPREVIOUSELEMENT
go back to the previous element
@ MID_HOTKEY_SHIFT_F2_TEMPLATE_COPY
copy template
@ MID_HOTKEY_SHIFT_F1_TEMPLATE_SET
set template
@ MID_HOTKEY_SHIFT_F3_TEMPLATE_CLEAR
clear template
#define GUIDesignButtonRectangular
little rectangular button used in frames (For example, in "help" buttons)
@ SUMO_TAG_EDGE
begin/end of the description of an edge
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
const GNETagProperties * getTagProperty() const
get tagProperty associated with this Attribute Carrier
void setFrameWidth(const int newWidth)
set width of GNEFrame
void focusUpperElement()
focus upper element of frame
FXLabel * getFrameHeaderLabel() const
get the label for the frame's header
GNEViewNet * myViewNet
FOX need this.
virtual void show()
show Frame
virtual void hide()
hide Frame
GNEFrame(GNEViewParent *viewParent, GNEViewNet *viewNet, const std::string &frameLabel)
Constructor.
FXHorizontalFrame * myHeaderLeftFrame
fame for left header elements
void updateButtons()
FOX need this.
void hideTemplateEditor()
hide template editor
GNEInspectorFrame * myInspectorFrameParent
current GNEInspectorFrame parent
void clearTemplate()
clear template (used by shortcut)
void setEdgeTemplate(const GNEEdge *edge)
set edge template
~TemplateEditor()
destructor
FXButton * myClearTemplateButton
clear template button
FXButton * mySetTemplateButton
set template button
long onCmdCopyTemplate(FXObject *, FXSelector, void *)
copy edge attributes from edge template
void setTemplate()
set template (used by shortcut)
TemplateEditor(GNEInspectorFrame *inspectorFrameParent)
FOX-declaration.
FXButton * myCopyTemplateButton
copy template button
GNEEdgeTemplate * myEdgeTemplate
edge Template
long onCmdSetTemplate(FXObject *, FXSelector, void *)
GNEEdgeTemplate * getEdgeTemplate() const
get edge template (to copy attributes from)
void copyTemplate()
copy template (used by shortcut)
void updateEdgeTemplate()
update edge template
bool showTemplateEditor()
show template editor
long onCmdClearTemplate(FXObject *, FXSelector, void *)
clear current edge template
long onCmdInspectPreviousElement(FXObject *, FXSelector, void *)
called when user press inspet previous elemnt button
GNEAttributeCarrier * myPreviousInspectedAC
Pointer to previous element inspected.
void selectedOverlappedElement(GNEAttributeCarrier *AC)
open GNEAttributesCreator extended dialog (can be reimplemented in frame children)
TemplateEditor * getTemplateEditor() const
get template editor
GNEInspectorFrame(GNEViewParent *viewParent, GNEViewNet *viewNet)
Constructor.
void inspectElements(const std::vector< GNEAttributeCarrier * > &ACs, GNEAttributeCarrier *previousInspectedAC=nullptr)
Inspect the given elements.
GNEElementTree * getHierarchicalElementTree() const
get GNEElementTree modul
bool inspectClickedElements(GNEViewNetHelper::ViewObjectsSelector &viewObjects, const Position &clickedPosition, const bool shiftKeyPressed)
process click over Viewnet
void show()
show inspector frame
GNEAttributesEditor * myAttributesEditor
Attributes editor.
GNEOverlappedInspection * myOverlappedInspection
FOX need this.
GNEOverlappedInspection * getOverlappedInspection() const
get GNEOverlappedInspection modul
void clearInspection()
clear inspection
GNEAttributesEditor * getAttributesEditor() const
get AttributesEditor
void hide()
hide inspector frame
FXButton * myBackButton
Back Button.
void inspectElement(GNEAttributeCarrier *AC, GNEAttributeCarrier *previousInspectedAC=nullptr)
Inspect a single element.
GNEElementTree * myHierarchicalElementTree
Attribute Carrier Hierarchy.
void refreshInspection()
refresh current inspection
~GNEInspectorFrame()
Destructor.
TemplateEditor * myTemplateEditor
Template editor.
void updateFrameAfterUndoRedo()
function called after undo/redo in the current frame (can be reimplemented in frame children)
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
class used to group all variables related with objects under cursor after a click over view
GNEAttributeCarrier * getAttributeCarrierFront() const
get front attribute carrier or a pointer to nullptr
A single child window which contains a view of the simulation area.
static FXButton * buildFXButton(FXComposite *p, const std::string &text, const std::string &tip, const std::string &help, FXIcon *ic, FXObject *tgt, FXSelector sel, FXuint opts=BUTTON_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
build button
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
MFXGroupBoxModule (based on FXGroupBox).
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toggled)
MFXGroupBoxModule(GNEFrame *frame, const std::string &text, const int options=Options::COLLAPSIBLE)
constructor for frames
A point in 2D or 3D with translation and scaling methods.