Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNECalibratorDialog.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// Dialog for edit calibrators
19/****************************************************************************/
20
25#include <netedit/GNENet.h>
26#include <netedit/GNEViewNet.h>
27#include <netedit/GNEUndoList.h>
32
33#include "GNECalibratorDialog.h"
35#include "GNERouteDialog.h"
37
38// ===========================================================================
39// FOX callback mapping
40// ===========================================================================
41
50
51// Object implementation
52FXIMPLEMENT(GNECalibratorDialog, GNEAdditionalDialog, GNECalibratorDialogMap, ARRAYNUMBER(GNECalibratorDialogMap))
53
54// ===========================================================================
55// member method definitions
56// ===========================================================================
57
59 GNEAdditionalDialog(editedCalibrator, false, 640, 480) {
60
61 // Create two columns, one for Routes and VehicleTypes, and other for Flows
62 FXHorizontalFrame* columns = new FXHorizontalFrame(myContentFrame, GUIDesignUniformHorizontalFrame);
63 FXVerticalFrame* columnLeft = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame);
64 FXVerticalFrame* columnRight = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame);
65
66 // create add button and label for routes
67 FXHorizontalFrame* buttonAndLabelRoute = new FXHorizontalFrame(columnLeft, GUIDesignAuxiliarHorizontalFrame);
69 new FXLabel(buttonAndLabelRoute, ("Add new " + toString(SUMO_TAG_ROUTE) + "s").c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
70
71 // Create table in left frame
72 myRouteList = new FXTable(columnLeft, this, MID_GNE_CALIBRATORDIALOG_TABLE_ROUTE, GUIDesignTableAdditionals);
73 myRouteList->setSelBackColor(FXRGBA(255, 255, 255, 255));
74 myRouteList->setSelTextColor(FXRGBA(0, 0, 0, 255));
75 myRouteList->setEditable(false);
76
77 // create add button and label for vehicle types
78 FXHorizontalFrame* buttonAndLabelVehicleType = new FXHorizontalFrame(columnLeft, GUIDesignAuxiliarHorizontalFrame);
80 new FXLabel(buttonAndLabelVehicleType, ("Add new " + toString(SUMO_TAG_VTYPE) + "s").c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
81
82 // Create table in left frame
83 myVehicleTypeList = new FXTable(columnLeft, this, MID_GNE_CALIBRATORDIALOG_TABLE_VEHICLETYPE, GUIDesignTableAdditionals);
84 myVehicleTypeList->setSelBackColor(FXRGBA(255, 255, 255, 255));
85 myVehicleTypeList->setSelTextColor(FXRGBA(0, 0, 0, 255));
86 myVehicleTypeList->setEditable(false);
87
88 // create add button and label for flows in right frame
89 FXHorizontalFrame* buttonAndLabelFlow = new FXHorizontalFrame(columnRight, GUIDesignAuxiliarHorizontalFrame);
91 myLabelFlow = new FXLabel(buttonAndLabelFlow, ("Add new " + toString(GNE_TAG_CALIBRATOR_FLOW) + "s").c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
92
93 // Create table in right frame
94 myFlowList = new FXTable(columnRight, this, MID_GNE_CALIBRATORDIALOG_TABLE_FLOW, GUIDesignTableAdditionals);
95 myFlowList->setSelBackColor(FXRGBA(255, 255, 255, 255));
96 myFlowList->setSelTextColor(FXRGBA(0, 0, 0, 255));
97 myFlowList->setEditable(false);
98
99 // update tables
100 updateRouteTable();
101 updateVehicleTypeTable();
102 updateFlowTable();
103
104 // start a undo list for editing local to this additional
105 initChanges();
106
107 // Open dialog as modal
108 openAsModalDialog();
109}
110
111
113
114
115long
116GNECalibratorDialog::onCmdAccept(FXObject*, FXSelector, void*) {
117 // accept changes before closing dialog
119 // Stop Modal
120 getApp()->stopModal(this, TRUE);
121 return 1;
122}
123
124
125long
126GNECalibratorDialog::onCmdCancel(FXObject*, FXSelector, void*) {
127 // cancel changes
129 // Stop Modal
130 getApp()->stopModal(this, FALSE);
131 return 1;
132}
133
134
135long
136GNECalibratorDialog::onCmdReset(FXObject*, FXSelector, void*) {
137 // reset changes
138 resetChanges();
139 // update tables
143 return 1;
144}
145
146
147long
148GNECalibratorDialog::onCmdAddRoute(FXObject*, FXSelector, void*) {
149 // create new calibrator route and configure it with modal GNERouteDialog
150 GNERouteDialog(new GNERoute(myEditedAdditional->getNet()), false); // NOSONAR, constructor returns after dialog has been closed
151 // update routes table
153 return 1;
154}
155
156
157long
158GNECalibratorDialog::onCmdClickedRoute(FXObject*, FXSelector, void*) {
159 // check if some delete button was pressed
160 for (int i = 0; i < (int)myEditedAdditional->getNet()->getViewNet()->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_ROUTE).size(); i++) {
161 // obtain rerouter
163 if (myRouteList->getItem(i, 2)->hasFocus()) {
164 // find all flows that contains route to delete as "route" parameter
165 std::vector<GNEAdditional*> calibratorFlowsToErase;
166 for (auto j : myEditedAdditional->getChildAdditionals()) {
167 if (j->getAttribute(SUMO_ATTR_ROUTE) == myRouteList->getItem(i, 0)->getText().text()) {
168 calibratorFlowsToErase.push_back(j);
169 }
170 }
171 // if there are flows that has route to remove as "route" parameter
172 if (calibratorFlowsToErase.size() > 0) {
173 // write warning if netedit is running in testing mode
174 WRITE_DEBUG("Opening FXMessageBox of type 'question'");
175 // open question dialog box
176 const std::string msg = ("Deletion of " + toString(SUMO_TAG_ROUTE) + " '" + myRouteList->getItem(i, 0)->getText().text() + "' will remove " +
177 toString(calibratorFlowsToErase.size()) + " " + toString(GNE_TAG_CALIBRATOR_FLOW) + (calibratorFlowsToErase.size() > 1 ? ("s") : ("")) + ". Continue?");
178 FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO, ("Remove " + toString(GNE_TAG_CALIBRATOR_FLOW) + "s").c_str(), "%s", msg.c_str());
179 if (answer != 1) { //1:yes, 2:no, 4:esc
180 // write warning if netedit is running in testing mode
181 if (answer == 2) {
182 WRITE_DEBUG("Closed FXMessageBox of type 'question' with 'No'");
183 } else if (answer == 4) {
184 WRITE_DEBUG("Closed FXMessageBox of type 'question' with 'ESC'");
185 }
186 // abort deletion of route
187 return 0;
188 } else {
189 // write warning if netedit is running in testing mode
190 WRITE_DEBUG("Closed FXMessageBox of type 'question' with 'Yes'");
191 // remove affected flows of calibrator flows
192 for (auto j : calibratorFlowsToErase) {
194 }
195 // remove route of calibrator routes
196 myEditedAdditional->getNet()->getViewNet()->getUndoList()->add(new GNEChange_DemandElement(routeToEdit, false), true);
197 // update flows and route table
200 return 1;
201 }
202 } else {
203 // remove route
204 myEditedAdditional->getNet()->getViewNet()->getUndoList()->add(new GNEChange_DemandElement(routeToEdit, false), true);
205 // update routes table
207 return 1;
208 }
209 } else if (myRouteList->getItem(i, 0)->hasFocus() || myRouteList->getItem(i, 1)->hasFocus()) {
210 // modify route of calibrator routes with modal dialog
211 GNERouteDialog(routeToEdit, true); // NOSONAR, constructor returns after dialog has been closed
212 // update routes table
214 // update Flows routes also because Route ID could be changed
216 return 1;
217 }
218 }
219 // nothing to do
220 return 0;
221}
222
223
224long
225GNECalibratorDialog::onCmdAddFlow(FXObject*, FXSelector, void*) {
226 // get routes and vTypes
229 // only add flow if there is at least a GNERoute (There is always a Vehicle Type)
230 if (routes.size() > 0) {
231 // create new calibrator and configure it with modal GNECalibratorFlowDialog
232 GNECalibratorFlowDialog(new GNECalibratorFlow(myEditedAdditional, defaultVType, routes.begin()->second), false); // NOSONAR, constructor returns after dialog has been closed
233 // update flows table
235 return 1;
236 } else {
237 throw ProcessError(TL("routes cannot be empty"));
238 }
239}
240
241
242long
243GNECalibratorDialog::onCmdClickedFlow(FXObject*, FXSelector, void*) {
244 // check if some delete button was pressed
245 for (int i = 0; i < (int)myEditedAdditional->getChildAdditionals().size(); i++) {
246 if (myFlowList->getItem(i, 2)->hasFocus()) {
247 // remove flow of calibrator flows
249 // update flows table
251 return 1;
252 } else if (myFlowList->getItem(i, 0)->hasFocus() || myFlowList->getItem(i, 1)->hasFocus()) {
253 // modify flow of calibrator flows (temporal) with modal dialog
254 GNECalibratorFlowDialog(myEditedAdditional->getChildAdditionals().at(i), true); // NOSONAR, constructor returns after dialog has been closed
255 // update flows table
257 return 1;
258 }
259 }
260 // nothing to do
261 return 0;
262}
263
264
265long
266GNECalibratorDialog::onCmdAddVehicleType(FXObject*, FXSelector, void*) {
267 // create a new Vehicle Type and configure it with modal GNEVehicleTypeDialog
269 GNEVehicleTypeDialog(new GNEVType(myEditedAdditional->getNet(), vehicleTypeID, SVC_PASSENGER), false); // NOSONAR, constructor returns after dialog has been closed
270 // update vehicle types table
272 return 1;
273}
274
275
276long
277GNECalibratorDialog::onCmdClickedVehicleType(FXObject*, FXSelector, void*) {
278 // check if some delete button was pressed
279 for (int i = 0; i < (int)myEditedAdditional->getNet()->getViewNet()->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_VTYPE).size(); i++) {
280 // obtain vehicle type
282 // Make sure that default vehicle isn't edited
283 if ((i == 0) && (myVehicleTypeList->getItem(i, 0)->hasFocus() || myVehicleTypeList->getItem(i, 1)->hasFocus() || myVehicleTypeList->getItem(i, 2)->hasFocus())) {
284 FXMessageBox::warning(getApp(), MBOX_OK,
285 ("Error editing default " + toString(SUMO_TAG_VTYPE)).c_str(), "%s",
286 ("Default " + toString(SUMO_TAG_VTYPE) + " cannot be either edited or deleted.").c_str());
287 } else if (myVehicleTypeList->getItem(i, 2)->hasFocus()) {
288 // find all flows that contains vehicle type to delete as "vehicle type" parameter
289 std::vector<GNEAdditional*> calibratorFlowsToErase;
290 for (auto j : myEditedAdditional->getChildAdditionals()) {
291 if (j->getAttribute(SUMO_ATTR_TYPE) == myVehicleTypeList->getItem(i, 0)->getText().text()) {
292 calibratorFlowsToErase.push_back(j);
293 }
294 }
295 // if there are flows that has vehicle type to remove as "vehicle type" parameter
296 if (calibratorFlowsToErase.size() > 0) {
297 const std::string msg = ("Deletion of " + toString(SUMO_TAG_VTYPE) + " '" + myVehicleTypeList->getItem(i, 0)->getText().text() + "' will remove " +
298 toString(calibratorFlowsToErase.size()) + " " + toString(GNE_TAG_CALIBRATOR_FLOW) + (calibratorFlowsToErase.size() > 1 ? ("s") : ("")) + ". Continue?");
299 FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO, ("Remove " + toString(GNE_TAG_CALIBRATOR_FLOW) + "s").c_str(), "%s", msg.c_str());
300 if (answer != 1) { //1:yes, 2:no, 4:esc
301 // write warning if netedit is running in testing mode
302 if (answer == 2) {
303 WRITE_DEBUG("Closed FXMessageBox of type 'question' with 'No'");
304 } else if (answer == 4) {
305 WRITE_DEBUG("Closed FXMessageBox of type 'question' with 'ESC'");
306 }
307 // abort deletion of vehicle type
308 return 0;
309 } else {
310 // write warning if netedit is running in testing mode
311 WRITE_DEBUG("Closed FXMessageBox of type 'question' with 'Yes'");
312 // remove affected flows of calibrator flows
313 for (auto j : calibratorFlowsToErase) {
315 }
316 // remove vehicle type of calibrator vehicle types
318 // update flows and vehicle types table
321 return 1;
322 }
323 } else {
324 // remove vehicle type of calibrator vehicle types
326 // update vehicle types table
328 return 1;
329 }
330 } else if (myVehicleTypeList->getItem(i, 0)->hasFocus() || myVehicleTypeList->getItem(i, 1)->hasFocus()) {
331 // modify vehicle type with modal dialog
332 GNEVehicleTypeDialog(vType, true); // NOSONAR, constructor returns after dialog has been closed
333 // update vehicle types table
335 // update Flows routes also because VType ID could be changed
337 return 1;
338 }
339 }
340 // nothing to do
341 return 0;
342}
343
344
345void
347 // clear table
348 myRouteList->clearItems();
349 // set number of rows
351 // Configure list
352 myRouteList->setVisibleColumns(4);
353 myRouteList->setColumnWidth(0, 136);
354 myRouteList->setColumnWidth(1, 136);
355 myRouteList->setColumnWidth(2, GUIDesignHeight);
356 myRouteList->setColumnText(0, toString(SUMO_ATTR_ID).c_str());
357 myRouteList->setColumnText(1, toString(SUMO_ATTR_EDGES).c_str());
358 myRouteList->setColumnText(2, "");
359 myRouteList->getRowHeader()->setWidth(0);
360 // Declare index for rows and pointer to FXTableItem
361 int indexRow = 0;
362 FXTableItem* item = nullptr;
363 // iterate over routes
365 // Set ID
366 item = new FXTableItem(toString(route.second->getAttribute(SUMO_ATTR_ID)).c_str());
367 myRouteList->setItem(indexRow, 0, item);
368 // Set edges
369 item = new FXTableItem(toString(route.second->getAttribute(SUMO_ATTR_EDGES)).c_str());
370 myRouteList->setItem(indexRow, 1, item);
371 // set remove
372 item = new FXTableItem("", GUIIconSubSys::getIcon(GUIIcon::REMOVE));
373 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
374 item->setEnabled(false);
375 myRouteList->setItem(indexRow, 2, item);
376 // Update index
377 indexRow++;
378 }
379 // enable or disable flow and label button
381}
382
383
384void
386 // clear table
387 myFlowList->clearItems();
388 // set number of rows
389 myFlowList->setTableSize(int(myEditedAdditional->getChildAdditionals().size()), 3);
390 // Configure list
391 myFlowList->setVisibleColumns(3);
392 myFlowList->setColumnWidth(0, 136);
393 myFlowList->setColumnWidth(1, 136);
394 myFlowList->setColumnWidth(2, GUIDesignHeight);
395 myFlowList->setColumnText(0, toString(SUMO_ATTR_TYPE).c_str());
396 myFlowList->setColumnText(1, toString(SUMO_ATTR_VCLASS).c_str());
397 myFlowList->setColumnText(2, "");
398 myFlowList->getRowHeader()->setWidth(0);
399 // Declare index for rows and pointer to FXTableItem
400 int indexRow = 0;
401 FXTableItem* item = nullptr;
402 // iterate over flows
403 for (auto i : myEditedAdditional->getChildAdditionals()) {
404 // Set vehicle type
405 item = new FXTableItem(i->getAttribute(SUMO_ATTR_TYPE).c_str());
406 myFlowList->setItem(indexRow, 0, item);
407 // Set route
408 item = new FXTableItem(i->getAttribute(SUMO_ATTR_ROUTE).c_str());
409 myFlowList->setItem(indexRow, 1, item);
410 // set remove
411 item = new FXTableItem("", GUIIconSubSys::getIcon(GUIIcon::REMOVE));
412 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
413 item->setEnabled(false);
414 myFlowList->setItem(indexRow, 2, item);
415 // Update index
416 indexRow++;
417 }
418 // enable or disable flow and label button
420}
421
422
423void
425 // clear table
426 myVehicleTypeList->clearItems();
427 // set number of rows
429 // Configure list
430 myVehicleTypeList->setVisibleColumns(4);
431 myVehicleTypeList->setColumnWidth(0, 136);
432 myVehicleTypeList->setColumnWidth(1, 136);
433 myVehicleTypeList->setColumnWidth(2, GUIDesignHeight);
434 myVehicleTypeList->setColumnText(0, toString(SUMO_ATTR_ID).c_str());
435 myVehicleTypeList->setColumnText(1, toString(SUMO_ATTR_VCLASS).c_str());
436 myVehicleTypeList->setColumnText(2, "");
437 myVehicleTypeList->getRowHeader()->setWidth(0);
438 // Declare index for rows and pointer to FXTableItem
439 int indexRow = 0;
440 FXTableItem* item = nullptr;
441 // iterate over vehicle types
443 // Set id
444 item = new FXTableItem(vType.second->getAttribute(SUMO_ATTR_ID).c_str());
445 myVehicleTypeList->setItem(indexRow, 0, item);
446 // Set VClass
447 item = new FXTableItem(vType.second->getAttribute(SUMO_ATTR_VCLASS).c_str());
448 myVehicleTypeList->setItem(indexRow, 1, item);
449 // set remove icon except for default vehicle type
450 if (indexRow != 0) {
451 item = new FXTableItem("", GUIIconSubSys::getIcon(GUIIcon::REMOVE));
452 } else {
453 item = new FXTableItem("");
454 }
455 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
456 item->setEnabled(false);
457 myVehicleTypeList->setItem(indexRow, 2, item);
458 // Update index
459 indexRow++;
460 }
461 // enable or disable flow and label button
463}
464
465
466void
468 // disable AddFlow button if no route is defined
470 myAddFlow->disable();
471 myFlowList->disable();
472 myLabelFlow->setText(TL("No routes defined"));
473 } else {
474 myAddFlow->enable();
475 myFlowList->enable();
476 myLabelFlow->setText(("Add new " + toString(GNE_TAG_CALIBRATOR_FLOW) + "s").c_str());
477 }
478}
479
480
481/****************************************************************************/
FXDEFMAP(GNECalibratorDialog) GNECalibratorDialogMap[]
@ MID_GNE_CALIBRATORDIALOG_TABLE_FLOW
change table flow
@ MID_GNE_CALIBRATORDIALOG_ADD_ROUTE
add new route
@ MID_GNE_CALIBRATORDIALOG_ADD_FLOW
@ MID_GNE_CALIBRATORDIALOG_ADD_VEHICLETYPE
add vehicle type
@ MID_GNE_CALIBRATORDIALOG_TABLE_ROUTE
change table route
@ MID_GNE_CALIBRATORDIALOG_TABLE_VEHICLETYPE
change table route
#define GUIDesignButtonIcon
button only with icon
Definition GUIDesigns.h:91
#define GUIDesignTableAdditionals
design for tables used in additional dialogs
Definition GUIDesigns.h:634
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
Definition GUIDesigns.h:399
#define GUIDesignUniformHorizontalFrame
design for horizontal frame used to pack another frames with a uniform width
Definition GUIDesigns.h:411
#define GUIDesignLabelThick(justify)
label extended over frame with thick and with text justify to left
Definition GUIDesigns.h:249
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frame extended in all directions
Definition GUIDesigns.h:390
#define WRITE_DEBUG(msg)
Definition MsgHandler.h:306
#define TL(string)
Definition MsgHandler.h:315
@ SVC_PASSENGER
vehicle is a passenger car (a "normal" car)
@ SUMO_TAG_VTYPE
description of a vehicle/person/container type
@ SUMO_TAG_ROUTE
begin/end of the description of a route
@ GNE_TAG_CALIBRATOR_FLOW
a flow definition within in Calibrator
@ SUMO_ATTR_EDGES
the edges of a route
@ SUMO_ATTR_VCLASS
@ SUMO_ATTR_TYPE
@ SUMO_ATTR_ROUTE
@ SUMO_ATTR_ID
int GUIDesignHeight
the default size for GUI elements
Definition StdDefs.cpp:35
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition ToString.h:46
Dialog to edit sequences, parameters, etc.. of Additionals.
void acceptChanges()
Accept changes did in this dialog.
void cancelChanges()
Cancel changes did in this dialog.
GNEAdditional * myEditedAdditional
pointer to edited additional
void resetChanges()
reset changes did in this dialog.
GNENet * getNet() const
get pointer to net
Dialog for edit calibrators.
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
FXTable * myFlowList
list with flows
long onCmdClickedFlow(FXObject *, FXSelector, void *)
remove or edit flow
FXLabel * myLabelFlow
label for flows
long onCmdClickedVehicleType(FXObject *, FXSelector, void *)
remove or edit vehicle type
FXTable * myVehicleTypeList
list with vehicle types
long onCmdAccept(FXObject *, FXSelector, void *)
long onCmdAddVehicleType(FXObject *, FXSelector, void *)
add new vehicle type
long onCmdClickedRoute(FXObject *, FXSelector, void *)
remove or edit route
void updateRouteTable()
update data table with routes
void updateFlowAndLabelButton()
update flow and label button
FXTable * myRouteList
list with routes
long onCmdAddFlow(FXObject *, FXSelector, void *)
add new flow
long onCmdAddRoute(FXObject *, FXSelector, void *)
add new route
FXButton * myAddFlow
button for add new flow
void updateFlowTable()
update data table with flows
void updateVehicleTypeTable()
update data table with vehicle types
Dialog for editing calibrator flows.
const std::vector< GNEAdditional * > & getChildAdditionals() const
return child additionals
const std::unordered_map< SumoXMLTag, std::unordered_map< const GUIGlObject *, GNEDemandElement * > > & getDemandElements() const
get demand elements
std::string generateDemandElementID(SumoXMLTag tag) const
generate demand element id
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
GNEDemandElement * getDefaultType() const
get default type
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
Definition GNENet.cpp:127
GNEViewNet * getViewNet() const
get view net
Definition GNENet.cpp:2163
Dialog for editing Calibrator Routes.
void add(GNEChange *command, bool doit=false, bool merge=true)
Add new command, executing it if desired. The new command will be merged with the previous command if...
Dialog for editing calibrator vehicle types.
GNENet * getNet() const
get the net object
GNEUndoList * getUndoList() const
get the undoList 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
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon