50 myFrameParent(frameParent) {
85 myLabel->setText((
TL(
"-This additional requires to\n select at least\n one element") + std::string(
"\n") +
86 TLF(
"-Click over % to select",
toString(tag)) + std::string(
"\n") +
87 TL(
"-ESC to clear elements")).c_str());
108 for (
int i = 0; i <
myList->getNumItems(); i++) {
109 if (
myList->getItem(i)->getText().text() == AC->
getID()) {
134 if (shown() && lane) {
150 if (
myList->getNumItems() == 0) {
154 std::vector<std::string> selectedIDs;
158 selectedIDs.push_back(AC->getID());
187 for (
const auto AC : selectedACs) {
188 if (AC->getTagProperty()->getTag() ==
myTag) {
189 if (AC->isAttributeCarrierSelected()) {
190 myList->appendItem(AC->getID().c_str(), AC->getACIcon());
209 myFrameParent(nullptr) {
FXDEFMAP(GNEViewObjectSelector) SelectorParentNetworkElementsMap[]
@ MID_GNE_CLEARSELECTION
clear selection of elements
@ MID_GNE_USESELECTED
use selected elements
@ MID_GNE_SELECT
select element
#define GUIDesignListFixedHeight
design for FXLists that only allow a single selected elements selected and height fixed
#define GUIDesignLabelThick(justify)
label extended over frame with thick and with text justify to left
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
#define WRITE_WARNING(msg)
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_EDGE
begin/end of the description of an edge
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
void addStringListAttribute(const SumoXMLAttr attr, const std::vector< std::string > &value)
add string list attribute into current SumoBaseObject node
const std::string getID() const
get ID (all Attribute Carriers have one)
FXIcon * getACIcon() const
get FXIcon associated to this AC
GNEViewNet * getViewNet() const
get view net
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
GNEEdge * getParentEdge() const
get parent edge
std::vector< GNEAttributeCarrier * > getSelectedAttributeCarriers(const bool ignoreCurrentSupermode)
get all selected attribute carriers (or only relative to current supermode
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
GNENet * getNet() const
get the net object
std::vector< const GNEAttributeCarrier * > mySelectedACs
selected ACs
long onCmdUseSelectedElements(FXObject *, FXSelector, void *)
GNEViewObjectSelector()
FOX need this.
~GNEViewObjectSelector()
destructor
bool fillSumoBaseObject(CommonXMLStructure::SumoBaseObject *baseObject) const
@brie fill SUMO base object
FXButton * myUseSelected
button for use selected edges
void showNetworkElementsSelector(const SumoXMLTag tag, const SumoXMLAttr attribute)
show GNEViewObjectSelector Module
void clearSelection()
clear selection
bool toggleSelectedLane(const GNELane *lane)
toggle selected lane
long onCmdClearSelection(FXObject *, FXSelector, void *)
called when clear selection button is pressed
SumoXMLTag myTag
network element type
FXList * myList
List of GNEViewObjectSelector.
bool isNetworkElementSelected(const GNEAttributeCarrier *AC) const
check if the given AC is selected
FXLabel * myLabel
info label
GNEFrame * myFrameParent
pointer to frame parent
SumoXMLAttr myAttribute
attribute vinculated
void hideNetworkElementsSelector()
hide GNEViewObjectSelector Module
SumoXMLTag getTag() const
get tag with selected element type
bool toggleSelectedElement(const GNEAttributeCarrier *AC)
toggle selected element
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
MFXGroupBoxModule (based on FXGroupBox)
void setText(const std::string &text)
set text