54FXIMPLEMENT(
MFXGroupBoxModule, FXVerticalFrame, MFXGroupBoxModuleMap, ARRAYNUMBER(MFXGroupBoxModuleMap))
67 if (myOptions & Options::COLLAPSIBLE) {
70 if (myOptions & Options::EXTENSIBLE) {
72 frame->getViewNet()->getViewParent()->getGNEAppWindows()->getStaticTooltipMenu(),
74 myExtendButton->setTipText(
TL(
"Expand frame to show all contents"));
77 if (myOptions & Options::SAVE) {
80 if (myOptions & Options::LOAD) {
99 throw ProcessError(
"This MFXGroupBoxModule doesn't support Extensible flag");
118 myLabel->setText(text.c_str());
130 FXEvent*
event = (FXEvent*)ptr;
131 FXDCWindow dc(
this, event);
133 dc.setForeground(backColor);
134 dc.fillRectangle(event->rect.x, event->rect.y, event->rect.w, event->rect.h);
136 drawGrooveRectangle(dc, 0, 15, width, height - 15);
160 int maximumWidth = -1;
162 for (
auto child =
myCollapsableFrame->getFirst(); child !=
nullptr; child = child->getNext()) {
164 const auto TLSTable =
dynamic_cast<GNETLSTable*
>(child);
168 if ((TLSTable->getWidth() + scrollBarWidth) > maximumWidth) {
169 maximumWidth = (TLSTable->getWidth() + scrollBarWidth);
174 if (maximumWidth != -1) {
196 sender->handle(
this, FXSEL(SEL_COMMAND, ID_DISABLE),
nullptr);
198 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[]
int getScrollBarWidth() const
get scrollBar width (zero if is hidden)
GNEViewNet * getViewNet() const
get view net
GNETLSEditorFrame * getTLSEditorParent() const
get TLSEditor Parent
GNETLSEditorFrame::TLSPhases * getTLSPhasesParent() const
@frame get pointer to TLSEditorFrame phases parent
GNEViewParent * getViewParent() const
get the net object
void setFrameAreaWidth(const int frameAreaWith)
set frame area width
int getFrameAreaWidth() const
get frame area width
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.
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
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.
virtual bool saveContents() const
save contents (can be reimplemented in children)