35#define PADDINGFRAME 10
36#define VERTICALSCROLLBARWIDTH 15
99 FXVerticalFrame::hide();
121 FXVerticalFrame::show();
130 FXVerticalFrame::hide();
145 for (
auto child =
myContentFrame->getFirst(); child !=
nullptr; child = child->getNext()) {
146 child->setWidth(contentWidth);
189 FXDialogBox* attributesHelpDialog =
new FXDialogBox(
myScrollWindowsContents, (
TL(
"Parameters of ") + AC->
getTagStr()).c_str(),
GUIDesignDialogBoxResizable, 0, 0, 0, 0, 10, 10, 10, 38, 4, 4);
193 int sizeColumnDescription = 0;
194 int sizeColumnDefinitions = 0;
196 myTable->setVisibleColumns(4);
198 myTable->setBackColor(FXRGB(255, 255, 255));
199 myTable->setColumnText(0,
TL(
"Attribute"));
200 myTable->setColumnText(1,
TL(
"Category"));
201 myTable->setColumnText(2,
TL(
"Description"));
202 myTable->setColumnText(3,
TL(
"Definition"));
203 myTable->getRowHeader()->setWidth(0);
209 FXTableItem* attributeItem =
new FXTableItem(attrProperty->getAttrStr().c_str());
210 attributeItem->setJustify(FXTableItem::CENTER_X);
211 myTable->setItem(itemIndex, 0, attributeItem);
213 FXTableItem* categoryItem =
new FXTableItem(
"");
214 categoryItem->setText(attrProperty->getCategory().c_str());
215 categoryItem->setJustify(FXTableItem::CENTER_X);
216 myTable->setItem(itemIndex, 1, categoryItem);
218 FXTableItem* descriptionItem =
new FXTableItem(
"");
219 descriptionItem->setText(attrProperty->getDescription().c_str());
220 sizeColumnDescription =
MAX2(sizeColumnDescription, (
int)attrProperty->getDescription().size());
221 descriptionItem->setJustify(FXTableItem::CENTER_X);
222 myTable->setItem(itemIndex, 2, descriptionItem);
224 FXTableItem* definitionItem =
new FXTableItem(attrProperty->getDefinition().c_str());
225 definitionItem->setJustify(FXTableItem::LEFT);
226 myTable->setItem(itemIndex, 3, definitionItem);
227 sizeColumnDefinitions =
MAX2(sizeColumnDefinitions, (
int)attrProperty->getDefinition().size());
230 myTable->fitRowsToContents(0, itemIndex);
232 FXHeader* header = myTable->getColumnHeader();
233 header->setItemJustify(0, JUSTIFY_CENTER_X);
234 header->setItemSize(0, 120);
235 header->setItemJustify(0, JUSTIFY_CENTER_X);
236 header->setItemSize(1, 100);
237 header->setItemJustify(1, JUSTIFY_CENTER_X);
238 header->setItemSize(2, sizeColumnDescription * 8);
239 header->setItemJustify(2, JUSTIFY_CENTER_X);
240 header->setItemSize(3, sizeColumnDefinitions * 6);
250 attributesHelpDialog->create();
252 attributesHelpDialog->show(PLACEMENT_CURSOR);
256 getApp()->runModalFor(attributesHelpDialog);
313const std::vector<std::string>&
322 FXLabel* label =
new FXLabel(parent,
TL(
"Scale: Min -> Max"),
nullptr,
GUIDesignLabelThick(JUSTIFY_NORMAL));
326 FXLabel* colorLabel =
new FXLabel(horizontalFrameColors,
"",
nullptr,
GUIDesignLabel(JUSTIFY_LEFT));
#define GUIDesignTableNotEditable
design for table extended over frame that cannot be edited
#define GUIDesignDialogBoxResizable
design for standard dialog box (for example, about dialog)
#define GUIDesignFrameAreaMargin
right margin for frame area
#define GUIDesignAuxiliarHorizontalFrameCenteredVertically
design for auxiliar (Without borders) horizontal frame used to pack another frames,...
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#define GUIDesignLabel(justify)
#define GUIDesignAuxiliarFrameFixedWidth(width)
design for auxiliar (Without borders) frame with fixed width and extended height
#define GUIDesignButtonOK
#define GUIDesignScrollWindowFixed
design for scroll windows extended over Y and fix width
#define GUIDesignLabelThick(justify)
label extended over frame with thick and with text justify to left
#define GUIDesignHorizontalSeparator
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frame extended in all directions
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_NOTHING
invalid attribute, must be the last one
int GUIDesignHeight
the default size for GUI elements
const std::string & getTagStr() const
get tag assigned to this object in string format
const GNETagProperties * getTagProperty() const
get tagProperty associated with this Attribute Carrier
FXHorizontalFrame * myHeaderRightFrame
fame for right header elements
int getScrollBarWidth() const
get scrollBar width (zero if is hidden)
virtual void attributeUpdated(SumoXMLAttr attribute)
function called after set a valid attribute in AttributeCreator/AttributeEditor/ParametersEditor/....
void setFrameWidth(const int newWidth)
set width of GNEFrame
void focusUpperElement()
focus upper element of frame
virtual void updateFrameAfterUndoRedo()
function called after undo/redo in the current frame (can be reimplemented in frame children)
static FXLabel * buildRainbow(FXComposite *parent)
build rainbow in frame modul
virtual void tagSelected()
Tag selected in GNETagSelector.
GNEViewNet * getViewNet() const
get view net
FXLabel * getFrameHeaderLabel() const
get the label for the frame's header
FXScrollWindow * myScrollWindowsContents
scroll windows that holds the content frame
virtual void demandElementSelected()
selected demand element in DemandElementSelector
GNEViewNet * myViewNet
FOX need this.
FXFont * getFrameHeaderFont() const
get font of the header's frame
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
FXHorizontalFrame * myHeaderFrame
fame for header elements
virtual void show()
show Frame
virtual void hide()
hide Frame
GNEFrame(GNEViewParent *viewParent, GNEViewNet *viewNet, const std::string &frameLabel)
Constructor.
virtual void selectedOverlappedElement(GNEAttributeCarrier *AC)
open GNEAttributesCreator extended dialog
virtual void frameWidthUpdated()
function called after setting new width in current frame (can be reimplemented in frame children)
virtual bool shapeDrawed()
build a shaped element using the drawed shape
virtual bool createPath(const bool useLastRoute)
create path between two elements
void openHelpAttributesDialog(const GNEAttributeCarrier *AC) const
Open help attributes dialog.
std::vector< std::string > myPredefinedTagsMML
Map of attribute ids to their (readable) string-representation (needed for SUMOSAXAttributesImpl_Cach...
FXLabel * myFrameHeaderLabel
the label for the frame's header
static FXFont * myFrameHeaderFont
static Font for the Header (it's common for all headers, then create only one time)
const std::vector< std::string > & getPredefinedTagsMML() const
get predefinedTagsMML
FXVerticalFrame * getContentFrame() const
get vertical frame that holds all widgets of frame
FXHorizontalFrame * myHeaderLeftFrame
fame for left header elements
int getNumberOfAttributes() const
get number of attributes
const std::vector< const GNEAttributeProperties * > & getAttributeProperties() const
get all attribute properties
GNEViewParent * getViewParent() const
get the net object
A single child window which contains a view of the simulation area.
void hideFramesArea()
hide frames area if all GNEFrames are hidden
void showFramesArea()
show frames area if at least a GNEFrame is showed
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
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
static SequentialStringBijection::Entry attrs[]
The names of SUMO-XML attributes (for passing to GenericSAXHandler)
static const std::vector< RGBColor > & getRainbowScaledColors()
get scaled rainbow colors