27#define MAXNUMCOLUMNS 4
28#define NUMROWSBYCOLUMN 20
50FXIMPLEMENT(
GNENetgenerateDialog, FXDialogBox, GNENetgenerateDialogMap, ARRAYNUMBER(GNENetgenerateDialogMap))
69 myGridNetworkButton =
new MFXCheckableButton(
false, horizontalFrame, GNEApp->getStaticTooltipMenu(),
"",
71 mySpiderNetworkButton =
new MFXCheckableButton(
false, horizontalFrame, GNEApp->getStaticTooltipMenu(),
"",
73 myRandomGridNetworkButton =
new MFXCheckableButton(
false, horizontalFrame, GNEApp->getStaticTooltipMenu(),
"",
75 myRandomNetworkButton =
new MFXCheckableButton(
false, horizontalFrame, GNEApp->getStaticTooltipMenu(),
"",
78 new FXSeparator(
this, SEPARATOR_NONE);
86 new FXSeparator(
this);
107 if (generateOptions.getBool(
"grid")) {
108 if (generateOptions.getBool(
"rand.grid")) {
115 }
else if (generateOptions.getBool(
"spider")) {
118 }
else if (generateOptions.getBool(
"random")) {
123 myOutputTextField->setText(generateOptions.getValueString(
"output-file").c_str());
125 FXDialogBox::show(PLACEMENT_SCREEN);
136 if (!outputFile.empty()) {
163 generateOptions.set(
"grid",
"true");
164 generateOptions.set(
"spider",
"false");
165 generateOptions.set(
"rand",
"false");
166 generateOptions.set(
"rand.grid",
"false");
186 generateOptions.set(
"grid",
"false");
187 generateOptions.set(
"spider",
"true");
188 generateOptions.set(
"spider.omit-center",
"true");
189 generateOptions.set(
"rand",
"false");
190 generateOptions.set(
"rand.grid",
"false");
210 generateOptions.set(
"grid",
"false");
211 generateOptions.set(
"spider",
"false");
212 generateOptions.set(
"rand",
"true");
213 generateOptions.set(
"rand.grid",
"true");
233 generateOptions.set(
"grid",
"false");
234 generateOptions.set(
"spider",
"false");
235 generateOptions.set(
"rand",
"true");
236 generateOptions.set(
"rand.grid",
"false");
273 if ((generateOptions.getBool(
"grid") ==
false) &&
274 (generateOptions.getBool(
"spider") ==
false) &&
275 (generateOptions.getBool(
"rand") ==
false)) {
276 return sender->handle(
this, FXSEL(SEL_COMMAND, ID_DISABLE),
nullptr);
277 }
else if (generateOptions.getValueString(
"output-file").empty()) {
278 return sender->handle(
this, FXSEL(SEL_COMMAND, ID_DISABLE),
nullptr);
280 return sender->handle(
this, FXSEL(SEL_COMMAND, ID_ENABLE),
nullptr);
FXDEFMAP(GNENetgenerateDialog) GNENetgenerateDialogMap[]
@ MID_GNE_NETGENERATEOPTIONS
netgenerate options
@ MID_GNE_RUNNETGENERATE
run netgenerate tool
@ MID_GNE_SET_ATTRIBUTE
attribute edited
@ MID_GNE_BUTTON_RUN
run button
@ MID_GNE_BUTTON_CANCEL
cancel button
@ MID_GNE_BUTTON_ADVANCED
advanced button
@ MID_GNE_NETGENERATE_SPIDER
netgenerate spider network
@ MID_GNE_NETGENERATE_RANDOM
netgenerate random network
@ MID_GNE_NETGENERATE_RANDOMGRID
netgenerate random grid network
@ MID_GNE_NETGENERATE_GRID
netgenerate grid network
@ MID_GNE_OPEN
open element
#define GUIDesignButtonIcon
button only with icon
#define GUIDesignButtonAccept
Accept Button.
#define GUIDesignTextField
#define GUIDesignButtonAdvanced
Advanced Button.
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#define GUIDesignDialogBox
#define GUIDesignTextFieldNCol
Num of column of text field.
#define GUIDesignBigSizeElement
elements with big images
#define GUIDesignMFXCheckableButtonBig
checkable button extended over frame
#define GUIDesignButtonReset
Reset Button.
#define GUIDesignLabelThickedFixed(width)
label thicked, icon before text, text centered and custom width
#define GUIDesignHorizontalFrame
Horizontal frame extended over frame parent with padding and spacing.
The main window of Netedit.
OptionsCont & getNetgenerateOptions()
get netgenerate options container
Dialog for netgenerate tool dialog.
long onCmdSetRandom(FXObject *, FXSelector, void *)
set random
long onCmdSetRandomGrid(FXObject *, FXSelector, void *)
set random grid
FXLabel * mySpiderNetworkLabel
grid network
long onCmdSetOutput(FXObject *, FXSelector, void *)
set output file
MFXCheckableButton * myRandomNetworkButton
grid network
long onCmdOpenOutputFile(FXObject *, FXSelector, void *)
open output file
long onCmdSetGrid(FXObject *, FXSelector, void *)
set grid mode
long onCmdAdvanced(FXObject *, FXSelector, void *)
event after press advanced button
FXLabel * myGridNetworkLabel
grid network
long onCmdSetSpider(FXObject *, FXSelector, void *)
set spider
void openDialog()
open dialog
MFXCheckableButton * myGridNetworkButton
grid network
MFXCheckableButton * mySpiderNetworkButton
grid network
long onCmdRun(FXObject *, FXSelector, void *)
event after press run button
GNEApplicationWindow * myGNEApp
pointer to GNEApplicationWindow
~GNENetgenerateDialog()
destructor
MFXCheckableButton * myRandomGridNetworkButton
random grid network
long onUpdSettingsConfigured(FXObject *, FXSelector, void *)
check if settings are enabled
FXLabel * myRandomGridNetworkLabel
random grid network
FXLabel * myRandomNetworkLabel
grid network
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
FXTextField * myOutputTextField
output text field
GNENetgenerateDialog()
FOX needs this.
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
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
void resetWritable()
Resets all options to be writeable.
static bool isValidFilename(const std::string &value)
whether the given string is a valid attribute for a filename (for example, a name)
static std::string openNetworkFileDialog(FXWindow *window, bool save, bool multi=false)
open netconvert file dialog