54FXIMPLEMENT(
MFXGroupBoxModule, FXVerticalFrame, MFXGroupBoxModuleMap, ARRAYNUMBER(MFXGroupBoxModuleMap))
72 frame->getViewNet()->getViewParent()->getGNEAppWindows()->getStaticTooltipMenu(),
76 frame->getViewNet()->getViewParent()->getGNEAppWindows()->getStaticTooltipMenu(),
102 throw ProcessError(
"This MFXGroupBoxModule doesn't support Extensible flag");
121 myLabel->setText(text.c_str());
133 FXEvent*
event = (FXEvent*)ptr;
134 FXDCWindow dc(
this, event);
136 dc.setForeground(backColor);
137 dc.fillRectangle(event->rect.x, event->rect.y, event->rect.w, event->rect.h);
139 drawGrooveRectangle(dc, 0, 15, width, height - 15);
163 int maximumWidth = -1;
165 for (
auto child =
myCollapsableFrame->getFirst(); child !=
nullptr; child = child->getNext()) {
167 const auto TLSTable =
dynamic_cast<GNETLSTable*
>(child);
170 const int scrollBarWidth = TLSTable->getTLSPhasesParent()->getTLSEditorParent()->getScrollBarWidth();
171 if ((TLSTable->getWidth() + scrollBarWidth) > maximumWidth) {
172 maximumWidth = (TLSTable->getWidth() + scrollBarWidth);
177 if (maximumWidth != -1) {
179 myFrameParent->getViewNet()->getViewParent()->setFrameAreaWidth(maximumWidth + 30);
189 myFrameParent->getViewNet()->getViewParent()->setFrameAreaWidth(220);
198 if (
myFrameParent->getViewNet()->getViewParent()->getFrameAreaWidth() == 220) {
199 sender->handle(
this, FXSEL(SEL_COMMAND, ID_DISABLE),
nullptr);
201 sender->handle(
this, FXSEL(SEL_COMMAND, ID_ENABLE),
nullptr);
@ MID_GROUPBOXMODULE_LOAD
load contents
@ MID_GROUPBOXMODULE_SAVE
save contents
@ MID_GROUPBOXMODULE_RESETWIDTH
reset widh groupBoxModule
@ MID_GROUPBOXMODULE_COLLAPSE
@ MID_GROUPBOXMODULE_EXTEND
extends groupBoxModule
#define GUIDesignLabelMFXGroupBoxModule
label used in MFXGroupBoxModule
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#define GUIDesignButtonMFXGroupBoxModule
button used in GroupBoxModule
#define GUIDesignButtonMFXGroupBoxModuleExtend
button used in GroupBoxModule for extend
#define GUIDesignGroupBoxModuleExtendY
Horizontal frame extended over XY-frame parent used in MFXGroupBoxModule.
#define GUIDesignCollapsableFrame
design for CollapsableFrame (Used in MFXGroupBoxModule)
#define GUIDesignGroupBoxModule
FXDEFMAP(MFXGroupBoxModule) MFXGroupBoxModuleMap[]
const std::string invalid_return< std::string >::value
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
MFXGroupBoxModule (based on FXGroupBox).
long onCmdSaveButton(FXObject *, FXSelector, void *)
save contents
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toggled)
long onCmdExtendButton(FXObject *, FXSelector, void *)
extends GroupBoxModule
MFXGroupBoxModule()
FOX need this.
FXButton * myResetWidthButton
button for reset frame width
long onCmdLoadButton(FXObject *, FXSelector, void *)
load contents
void setText(const std::string &text)
set text
long onPaint(FXObject *, FXSelector, void *)
draw MFXGroupBoxModule
FXButton * mySaveButton
button for save elements
long onCmdResetButton(FXObject *, FXSelector, void *)
reset GroupBoxModule
MFXButtonTooltip * myExtendButton
button for extend elements
Options
GroupBoxModule options.
bool myCollapsed
flag to check if this groupbox is collapsed
long onCmdCollapseButton(FXObject *, FXSelector, void *)
collapse GroupBoxModule
long onUpdResetButton(FXObject *, FXSelector, void *)
update reset GroupBoxModule
FXLabel * myLabel
label used in non collapsable MFXGroupBoxModule
FXButton * myLoadButton
button for load elements
void toggleSaveButton(const bool value)
enable or disable save buttons
virtual bool loadContents() const
load contents (can be reimplemented in children)
~MFXGroupBoxModule()
destructor
GNEFrame * myFrameParent
GNEFrame in which this GroupBox is placed.
FXVerticalFrame * myCollapsableFrame
vertical collapsable frame
FXButton * myCollapseButton
button for collapse elements
const int myOptions
GroupBoxModule options.
MFXGroupBoxModule(GNEFrame *frame, const std::string &text, const int options=Options::COLLAPSIBLE)
constructor for frames
virtual bool saveContents() const
save contents (can be reimplemented in children)