50 myFrameParent(frameParent),
51 myNetworkElementType(networkElementType) {
60 switch (myNetworkElementType) {
63 (
TL(
"-Click over an edge to select") + std::string(
"\n") + std::string(
"-ESC to clear selection")).c_str(),
69 (
TL(
"-Click over an lane to select") + std::string(
"\n") + std::string(
"-ESC to clear selection")).c_str(),
84std::vector<std::string>
87 std::vector<std::string> solution;
89 solution.reserve(
myList->getNumItems());
91 for (
int i = 0; i <
myList->getNumItems(); i++) {
92 solution.push_back(
myList->getItem(i)->getText().text());
102 for (
int i = 0; i <
myList->getNumItems(); i++) {
103 if (
myList->getItem(i)->getText().text() == networkElement->
getID()) {
136 for (
int i = 0; i <
myList->getNumItems(); i++) {
137 if (
myList->getItem(i)->getText().text() == networkElement->
getID()) {
170 if (edge.second->isAttributeCarrierSelected()) {
171 myList->appendItem(edge.first.c_str(), edge.second->getACIcon());
177 if (lane->isAttributeCarrierSelected()) {
178 myList->appendItem(lane->getID().c_str(), lane->getACIcon());
199 myFrameParent(nullptr),
FXDEFMAP(GNENetworkSelector) SelectorParentNetworkElementsMap[]
@ MID_GNE_CLEARSELECTION
clear selection of elements
@ MID_GNE_USESELECTED
use selected elements
@ MID_GNE_SELECT
select element
#define GUIDesignListFixedHeight
design for FXLists with height fixed
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#define GUIDesignButtonRectangular100
button rectangular with thick and raise frame with a width of 100
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
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
const std::set< GNELane * > & getLanes() const
get lanes
const std::map< std::string, GNEEdge * > & getEdges() const
map with the ID and pointer to edges of net
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
void hideNetworkElementsSelector()
hide GNENetworkSelector Module
bool toggleSelectedElement(const GNENetworkElement *networkElement)
toggle selected networkElement
bool isNetworkElementSelected(const GNENetworkElement *networkElement) const
check if the given networkElement is being selected
bool isShown() const
return true if module is shown
long onCmdUseSelectedElements(FXObject *, FXSelector, void *)
void clearSelection()
clear selection
long onCmdClearSelection(FXObject *, FXSelector, void *)
called when clear selection button is pressed
void showNetworkElementsSelector()
show GNENetworkSelector Module
std::vector< std::string > getSelectedIDs() const
get selected IDs
~GNENetworkSelector()
destructor
FXList * myList
List of GNENetworkSelector.
GNEFrame * myFrameParent
pointer to frame parent
GNENetworkSelector()
FOX need this.
const Type myNetworkElementType
@brrief network element type
GNENet * getNet() const
get the net object
MFXGroupBoxModule (based on FXGroupBox)