 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
51 FXIMPLEMENT(
FXGroupBoxModule, FXVerticalFrame, FXGroupBoxModuleMap, ARRAYNUMBER(FXGroupBoxModuleMap))
64 if (myOptions & Options::COLLAPSIBLE) {
67 if (myOptions & Options::EXTENSIBLE) {
71 if (myOptions & Options::SAVE) {
74 if (myOptions & Options::LOAD) {
93 throw ProcessError(
"This FXGroupBoxModule doesn't support Extensible flag");
112 myLabel->setText(text.c_str());
124 FXEvent*
event = (FXEvent*)ptr;
125 FXDCWindow dc(
this, event);
127 dc.setForeground(backColor);
128 dc.fillRectangle(event->rect.x, event->rect.y, event->rect.w, event->rect.h);
130 drawGrooveRectangle(dc, 0, 15, width, height - 15);
154 int maximumWidth = -1;
156 for (
auto child = getFirst(); child !=
nullptr; child = child->getNext()) {
158 auto scrollWindow =
dynamic_cast<FXScrollWindow*
>(child->getFirst());
159 if (scrollWindow && (scrollWindow->getContentWidth() > maximumWidth)) {
160 maximumWidth = scrollWindow->getContentWidth();
164 if (maximumWidth != -1) {
185 sender->handle(
this, FXSEL(SEL_COMMAND, ID_DISABLE),
nullptr);
187 sender->handle(
this, FXSEL(SEL_COMMAND, ID_ENABLE),
nullptr);
int getFrameAreaWith() const
get frame area width
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
@ MID_GROUPBOXMODULE_COLLAPSE
void toggleSaveButton(const bool value)
enable or disable save buttons
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
long onCmdExtendButton(FXObject *, FXSelector, void *)
extends GroupBoxModule
GNEViewNet * getViewNet() const
get view net
#define GUIDesignGroupBoxModule
#define GUIDesignGroupBoxModuleExtendY
Horizontal frame extended over XY-frame parent used in FXGroupBoxModule.
virtual bool saveContents() const
save contents (can be reimplemented in children)
long onCmdResetButton(FXObject *, FXSelector, void *)
reset GroupBoxModule
@ MID_GROUPBOXMODULE_RESETWIDTH
reset widh groupBoxModule
const int myOptions
GroupBoxModule options.
FXLabel * myLabel
label used in non collapsable FXGroupBoxModule
GNEFrame * myFrameParent
GNEFrame in which this GroupBox is placed.
FXButton * mySaveButton
button for save elements
FXButton * myCollapseButton
button for collapse elements
long onCmdCollapseButton(FXObject *, FXSelector, void *)
collapse GroupBoxModule
long onUpdResetButton(FXObject *, FXSelector, void *)
update reset GroupBoxModule
FXGroupBoxModule()
FOX need this.
FXDEFMAP(FXGroupBoxModule) FXGroupBoxModuleMap[]
long onPaint(FXObject *, FXSelector, void *)
draw FXGroupBoxModule
long onCmdSaveButton(FXObject *, FXSelector, void *)
save contents
FXVerticalFrame * myCollapsableFrame
vertical collapsable frame
@ MID_GROUPBOXMODULE_SAVE
save contents
Options
GroupBoxModule options.
long onCmdLoadButton(FXObject *, FXSelector, void *)
load contents
#define GUIDesignLabelFXGroupBoxModule
label used in GroupBoxModule
bool myCollapsed
flag to check if this groupbox is collapsed
void setFrameAreaWith(const int frameAreaWith)
set frame area width
FXGroupBoxModule (based on FXGroupBox)
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toggled)
FXButton * myLoadButton
button for load elements
virtual bool loadContents() const
load contents (can be reimplemented in children)
#define GUIDesignCollapsableFrame
design for CollapsableFrame (Used in FXGroupBoxModule)
void setText(const std::string &text)
set text
~FXGroupBoxModule()
destructor
GNEViewParent * getViewParent() const
get the net object
@ MID_GROUPBOXMODULE_EXTEND
extends groupBoxModule
#define GUIDesignButtonFXGroupBoxModule
button used in GroupBoxModule
@ MID_GROUPBOXMODULE_LOAD
load contents