36#define MAXNUMCOLUMNS 4
37#define NUMROWSBYCOLUMN 20
68 applicationWindow->getStaticTooltipMenu(), (std::string(
"\t") +
TL(
"Toggle Menu Tooltips") + std::string(
"\t") +
TL(
"Toggles whether tooltips in the menu shall be shown.")).c_str(),
70 auto saveFile =
new MFXButtonTooltip(horizontalOptionsFrame, applicationWindow->getStaticTooltipMenu(),
TL(
"Save toolcfg"),
72 saveFile->setTipText(
TL(
"Save file with tool configuration"));
73 auto loadFile =
new MFXButtonTooltip(horizontalOptionsFrame, applicationWindow->getStaticTooltipMenu(),
TL(
"Load toolcfg"),
75 loadFile->setTipText(
TL(
"Load file with tool configuration"));
79 new FXSeparator(myContentFrame);
82 auto horizontalRowFrames =
new FXHorizontalFrame(contentScrollWindow, LAYOUT_FILL_X | LAYOUT_FILL_Y | PACK_UNIFORM_WIDTH);
88 setTitle(myPythonTool->getToolName().c_str());
90 mySortedCheckButton->setCheck(FALSE);
91 myGroupedCheckButton->setCheck(TRUE);
93 myShowToolTipsMenu->setChecked(getApp()->reg().readIntEntry(
"gui",
"menuToolTips", 0) != 1);
95 myPythonTool->setCurrentValues();
97 buildArguments(
false,
true);
99 const int maximumHeight = myArgumentFrameLeft->numChildren() *
GUIDesignHeight + 120;
101 resize(1024, maximumHeight <= 768 ? maximumHeight : 768);
204 if (argument->requiredAttributeSet() ==
false) {
205 return sender->handle(
this, FXSEL(SEL_COMMAND, ID_DISABLE),
nullptr);
208 return sender->handle(
this, FXSEL(SEL_COMMAND, ID_ENABLE),
nullptr);
213 std::string(category) {
219 myOptions.push_back(std::make_pair(name, option));
223const std::vector<std::pair<std::string, Option*> >&
232 std::sort(myOptions.begin(), myOptions.end());
250 int numArguments = 0;
251 for (
auto& categoryOption : categoryOptions) {
252 numArguments += (int)categoryOption.getOptions().size() + 1;
254 const int halfNumArguments = numArguments / 2;
256 int numInsertedArguments = 0;
258 for (
auto& categoryOption : categoryOptions) {
262 if (categoryOption.size() > 0) {
264 numInsertedArguments++;
268 categoryOption.sortByName();
271 for (
const auto& option : categoryOption.getOptions()) {
275 if (option.second->isInteger()) {
277 }
else if (option.second->isFloat()) {
279 }
else if (option.second->isBool()) {
281 }
else if (option.second->isFileName()) {
283 }
else if (option.second->isNetwork()) {
285 }
else if (option.second->isAdditional()) {
287 }
else if (option.second->isRoute()) {
289 }
else if (option.second->isData()) {
291 }
else if (option.second->isSumoConfig()) {
293 }
else if (option.second->isEdge()) {
295 }
else if (option.second->isEdgeVector()) {
300 numInsertedArguments++;
316 int maximumWidth = 0;
319 const auto label = argument->getParameterLabel();
320 const int columnWidth = label->getFont()->getTextWidth(label->getText().text(), label->getText().length() +
MARGIN);
321 if (columnWidth > maximumWidth) {
322 maximumWidth = columnWidth;
327 argument->getParameterLabel()->setWidth(maximumWidth);
332std::vector<GNEPythonToolDialog::CategoryOptions>
337 for (
const auto& option : optionsCont) {
338 result.front().
addOption(option.first, option.second);
344std::vector<GNEPythonToolDialog::CategoryOptions>
347 const std::vector<std::string> commonCategories = {
"input",
"output",
"processing",
"time"};
349 std::vector<std::string> categories = commonCategories;
350 for (
const auto& option : optionsCont) {
351 if (std::find(categories.begin(), categories.end(), option.second->getSubTopic()) == categories.end()) {
352 categories.push_back(option.second->getSubTopic());
356 std::vector<GNEPythonToolDialog::CategoryOptions> result;
357 for (
const auto& category : categories) {
361 for (
const auto& option : optionsCont) {
362 auto category = std::find(result.begin(), result.end(), option.second->getSubTopic());
364 category->addOption(option.first, option.second);
367 auto it = result.begin();
368 while (it != result.end()) {
369 if (it->getOptions().empty()) {
370 it = result.erase(it);
@ MID_GNE_SET_ATTRIBUTE
attribute edited
@ MID_GNE_BUTTON_RUN
run button
@ MID_CHOOSEN_SAVE
Save set.
@ MID_GNE_BUTTON_RESET
reset button
@ MID_GNE_RUNPYTHONTOOL
run python
@ MID_SHOWTOOLTIPS_MENU
Show tool tips in menus - button.
@ MID_CHOOSEN_LOAD
Load set.
#define GUIDesignScrollWindow
design for scroll windows extended over Y and y
#define GUIDesignButtonConfiguration
Configuration Button.
#define GUIDesignMFXCheckableButtonSquare
#define GUIDesignCheckButton
checkButton placed in left position
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frame extended in all directions
#define GUIDesignHorizontalFrameNoPadding
Horizontal frame extended over frame parent without padding and spacing.
GUIIcon
An enumeration of icons used by the gui applications.
int GUIDesignHeight
the default height for GUI elements
The main window of Netedit.
GNEViewNet * getViewNet()
get pointer to viewNet
GNEApplicationWindow * getApplicationWindow() const
get pointer to the application window
GNEApplicationWindow * myApplicationWindow
FOX needs this.
long closeDialogAccepting()
close dialog accepting the changes
OpenType
Open dialog type.
GNEViewParent * getViewParent() const
get the net object
MFXCheckableButton * getShowToolTipsMenu() const
get menu for tooltips menu
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
MFXStaticToolTip * getStaticTooltipMenu() const
get static toolTip for menus
dialog arguments, used for certain modal dialogs that can not be edited using tab
A class representing a single program option.
A storage for options typed value containers)
static StringBijection< XMLFileExtension > XMLFileExtensions
XML file Extensions.