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.second->isAttributeCarrierSelected()) {
178 myList->appendItem(lane.second->getID().c_str(), lane.second->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 GUIDesignButtonFixed(width)
button rectangular with thick and raise frame with the given width
#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::map< std::string, GNEEdge * > & getEdges() const
map with the ID and pointer to edges of net
const std::unordered_map< const GUIGlObject *, GNELane * > & getLanes() const
get lanes
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
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)