40 #ifdef CHECK_MEMORY_LEAKS 57 FXIMPLEMENT(
GNERerouterDialog, FXDialogBox, GNERerouterDialogMap, ARRAYNUMBER(GNERerouterDialogMap))
65 myRerouterParent(rerouterParent) {
74 myIntervalList->setSelBackColor(FXRGBA(255, 255, 255, 255));
75 myIntervalList->setSelTextColor(FXRGBA(0, 0, 0, 255));
76 myIntervalList->setEditable(
false);
77 myCopyOfRerouterIntervals = myRerouterParent->getRerouterIntervals();
78 updateIntervalTable();
99 if ((i->getBegin() == begin) && (i->getEnd() == end)) {
109 if ((begin < 0) || (end < 0)) {
111 }
else if ((begin == 0) && (end == 0)) {
113 }
else if (begin >= end) {
126 if ((i->getBegin() == oldBegin) && (i->getEnd() == oldEnd)) {
128 if ((newBegin < 0) || (newEnd < 0)) {
130 }
else if ((newBegin == 0) && (newEnd == 0)) {
132 }
else if (newBegin >= newEnd) {
151 getApp()->stopModal(
this, TRUE);
159 getApp()->stopModal(
this, FALSE);
229 FXTableItem* item = 0;
233 item =
new FXTableItem(
toString(i->getBegin()).c_str());
236 item =
new FXTableItem(
toString(i->getEnd()).c_str());
240 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
241 item->setEnabled(
false);
#define GUIDesignTableIconCellWidth
width of cells that only contains an Icon
GNERerouter * myRerouterParent
pointer to rerouter parent
Dialog for edit rerouter intervals.
lane of a reroute of type closing
bool checkInterval(SUMOReal begin, SUMOReal end) const
check begin and end of an new interval
Dialog to edit sequences, parameters, etc.. of Additionals.
long onCmdClickedInterval(FXObject *, FXSelector, void *)
remove or edit interval
weights: time range begin
FXDEFMAP(GNERerouterDialog) GNERerouterDialogMap[]
bool findInterval(SUMOReal begin, SUMOReal end) const
check if a interval exists
Dialog for edit rerouters.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
void setRerouterIntervals(const std::vector< GNERerouterInterval > &rerouterIntervals)
set rerouter intervals
GNERerouter * getRerouterParent() const
get rerouter parent
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames ...
const std::vector< GNERerouterInterval > & getRerouterIntervals() const
get rerouter intervals
std::vector< GNERerouterInterval > myCopyOfRerouterIntervals
set with a copy of rerouter intervals
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
#define GUIDesignTableAdditionals
design for tables used in additional dialogs
long onCmdAddInterval(FXObject *, FXSelector, void *)
add new interval
#define GUIDesignButtonIcon
button only with icon with the same size as a Label
bool checkModifyInterval(SUMOReal oldBegin, SUMOReal oldEnd, SUMOReal newBegin, SUMOReal newEnd) const
check if begin and end of an existent interval can be modified
FXTable * myIntervalList
list with intervals
#define GUIDesignLabelThick
label extended over over frame with thick and with text justify to left
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
~GNERerouterDialog()
destructor
void updateIntervalTable()
update data table
long onCmdAccept(FXObject *, FXSelector, void *)
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon