 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
44 myEdgeCandidateColor(
RGBColor(0, 64, 0, 255)),
45 myEdgeCandidateSelectedColor(
RGBColor::GREEN) {
87 FXVerticalFrame::hide();
109 FXVerticalFrame::show();
118 FXVerticalFrame::hide();
203 FXDialogBox* attributesHelpDialog =
new FXDialogBox(
myScrollWindowsContents, (
"Parameters of " + tagProperties.
getTagStr()).c_str(),
GUIDesignDialogBoxResizable, 0, 0, 0, 0, 10, 10, 10, 38, 4, 4);
207 int sizeColumnDescription = 0;
208 int sizeColumnDefinitions = 0;
210 myTable->setVisibleColumns(3);
212 myTable->setBackColor(FXRGB(255, 255, 255));
213 myTable->setColumnText(0,
"Attribute");
214 myTable->setColumnText(1,
"Description");
215 myTable->setColumnText(2,
"Definition");
216 myTable->getRowHeader()->setWidth(0);
219 for (
const auto& i : tagProperties) {
221 FXTableItem* attribute =
new FXTableItem(i.getAttrStr().c_str());
222 attribute->setJustify(FXTableItem::CENTER_X);
223 myTable->setItem(itemIndex, 0, attribute);
225 FXTableItem* type =
new FXTableItem(
"");
226 type->setText(i.getDescription().c_str());
227 sizeColumnDescription =
MAX2(sizeColumnDescription, (
int)i.getDescription().size());
228 type->setJustify(FXTableItem::CENTER_X);
229 myTable->setItem(itemIndex, 1, type);
231 FXTableItem* definition =
new FXTableItem(i.getDefinition().c_str());
232 definition->setJustify(FXTableItem::LEFT);
233 myTable->setItem(itemIndex, 2, definition);
234 sizeColumnDefinitions =
MAX2(sizeColumnDefinitions, (
int)i.getDefinition().size());
238 FXHeader* header = myTable->getColumnHeader();
239 header->setItemJustify(0, JUSTIFY_CENTER_X);
240 header->setItemSize(0, 120);
241 header->setItemJustify(1, JUSTIFY_CENTER_X);
242 header->setItemSize(1, sizeColumnDescription * 7);
243 header->setItemJustify(2, JUSTIFY_CENTER_X);
244 header->setItemSize(2, sizeColumnDefinitions * 6);
254 WRITE_DEBUG(
"Opening HelpAttributes dialog for tag '" + tagProperties.getTagStr() +
"' showing " +
toString(tagProperties.getNumberOfAttributes()) +
" attributes");
256 attributesHelpDialog->create();
258 attributesHelpDialog->show(PLACEMENT_CURSOR);
262 getApp()->runModalFor(attributesHelpDialog);
264 WRITE_DEBUG(
"Closing HelpAttributes dialog for tag '" + tagProperties.getTagStr() +
"'");
280 const std::map<int, std::string>&
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
static FXFont * myFrameHeaderFont
static Font for the Header (it's common for all headers, then create only one time)
FXScrollWindow * myScrollWindowsContents
scroll windows that holds the content frame
virtual void attributeUpdated()
function called after set a valid attribute in AttributeCreator/AttributeEditor/ParametersEditor/....
FXFont * getFrameHeaderFont() const
get font of the header's frame
struct with the attribute Properties
virtual void updateFrameAfterUndoRedo()
function called after undo/redo in the current frame (can be reimplemented in frame children)
const std::string & getTagStr() const
get Tag vinculated with this attribute Property in String Format (used to avoid multiple calls to toS...
GNEFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet, const std::string &frameLabel)
Constructor.
virtual void edgePathCreated()
finish edge path creation
virtual void demandElementSelected()
selected demand element in DemandElementSelector
virtual void tagSelected()
Tag selected in TagSelector.
FXHorizontalFrame * myHeaderLeftFrame
fame for left header elements
GNEViewNet * getViewNet() const
get view net
#define GUIDesignButtonOK
#define GUIDesignTableNotEditable
design for table extended over frame that cannot be edited
void hideFramesArea()
hide frames area if all GNEFrames are hidden
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
#define GUIDesignContentsScrollWindow
design for the content frame of every frame
FXHorizontalFrame * myHeaderRightFrame
fame for right header elements
virtual void attributesEditorExtendedDialogOpened()
open AttributesCreator extended dialog (can be reimplemented in frame children)
FXLabel * myFrameHeaderLabel
the label for the frame's header
void showFramesArea()
show frames area if at least a GNEFrame is showed
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
const RGBColor & getEdgeCandidateSelectedColor() const
get selected color
#define GUIDesignContentsFrame
design for the main content frame of every frame/dialog
static StringBijection< int >::Entry attrs[]
The names of SUMO-XML attributes (for passing to GenericSAXHandler)
void focusUpperElement()
focus upper element of frame
#define GUIDesignHorizontalSeparator
RGBColor myEdgeCandidateColor
edge candidate color (used by some modulds to mark edges)
FXHorizontalFrame * myHeaderFrame
fame for header elements
RGBColor myEdgeCandidateSelectedColor
selected edge candidate color (used by some modulds to selected mark edges)
GNEViewNet * myViewNet
View Net.
const std::map< int, std::string > & getPredefinedTagsMML() const
get predefinedTagsMML
void openHelpAttributesDialog(const GNEAttributeCarrier::TagProperties &tagProperties) const
Open help attributes dialog.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
virtual void selectedOverlappedElement(GNEAttributeCarrier *AC)
open AttributesCreator extended dialog (can be reimplemented in frame children)
#define GUIDesignDialogBoxResizable
design for standard dialog box (for example, about dialog)
void setFrameWidth(int newWidth)
set width of GNEFrame
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frames used to pack another frames extended in all directions
virtual bool shapeDrawed()
build a shaped element using the drawed shape (can be reimplemented in frame children)
const RGBColor & getEdgeCandidateColor() const
get edge candidate color
std::map< int, std::string > myPredefinedTagsMML
Map of attribute ids to their (readable) string-representation (needed for SUMOSAXAttributesImpl_Cach...
virtual void show()
show Frame
FXLabel * getFrameHeaderLabel() const
get the label for the frame's header
virtual void hide()
hide Frame
GNEViewParent * getViewParent() const
get the net object
int getNumberOfAttributes() const
get number of attributes