54 FXIMPLEMENT(
GNERerouterDialog, FXDialogBox, GNERerouterDialogMap, ARRAYNUMBER(GNERerouterDialogMap))
62 myRerouterParent(rerouterParent) {
71 myIntervalList->setSelBackColor(FXRGBA(255, 255, 255, 255));
72 myIntervalList->setSelTextColor(FXRGBA(0, 0, 0, 255));
73 myIntervalList->setEditable(
false);
74 myCopyOfRerouterIntervals = myRerouterParent->getRerouterIntervals();
75 updateIntervalTable();
96 if ((i->getBegin() == begin) && (i->getEnd() == end)) {
107 if ((newBegin < 0) || (newEnd < 0)) {
109 }
else if ((newBegin == 0) && (newEnd == 0)) {
111 }
else if (newBegin >= newEnd) {
116 std::vector<GNERerouterInterval>::iterator it = std::find(auxCopyOfRerouterIntervals.begin(), auxCopyOfRerouterIntervals.end(), rerouterInterval);
118 if (it == auxCopyOfRerouterIntervals.end()) {
122 it->setBegin(newBegin);
141 getApp()->stopModal(
this, TRUE);
149 getApp()->stopModal(
this, FALSE);
219 FXTableItem* item = 0;
225 item =
new FXTableItem(
toString(i->getBegin()).c_str());
228 item =
new FXTableItem(
toString(i->getEnd()).c_str());
232 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
233 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 checkModifyInterval(const GNERerouterInterval &rerouterInterval, double newBegin, double newEnd) const
check if begin and end of an existent interval can be modified
const std::vector< GNERerouterInterval > & getRerouterIntervals() const
get rerouter intervals
Dialog to edit sequences, parameters, etc.. of Additionals.
long onCmdClickedInterval(FXObject *, FXSelector, void *)
remove or edit interval
weights: time range begin
FXDEFMAP(GNERerouterDialog) GNERerouterDialogMap[]
GNERerouter * getRerouterParent() const
get rerouter parent
Dialog for edit rerouters.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames ...
bool checkOverlapping(std::vector< GNERerouterInterval > rerouterIntervals)
check overlapping of a vector of rerouter intervals
bool setRerouterIntervals(const std::vector< GNERerouterInterval > &rerouterIntervals)
set rerouter intervals
std::vector< GNERerouterInterval > myCopyOfRerouterIntervals
set with a copy of rerouter intervals
GNERerouter * getRerouterParent() const
get rerouter parent
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 (23x23)
FXTable * myIntervalList
list with intervals
#define GUIDesignLabelThick
label extended over frame with thick and with text justify to left
bool findInterval(double begin, double end) const
check if a interval exists
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