52FXIMPLEMENT(
MFXGroupBoxModule, FXVerticalFrame, MFXGroupBoxModuleMap, ARRAYNUMBER(MFXGroupBoxModuleMap))
65 if (myOptions & Options::COLLAPSIBLE) {
68 if (myOptions & Options::EXTENSIBLE) {
72 if (myOptions & Options::SAVE) {
75 if (myOptions & Options::LOAD) {
94 throw ProcessError(
"This MFXGroupBoxModule doesn't support Extensible flag");
113 myLabel->setText(text.c_str());
125 FXEvent*
event = (FXEvent*)ptr;
126 FXDCWindow dc(
this, event);
128 dc.setForeground(backColor);
129 dc.fillRectangle(event->rect.x, event->rect.y, event->rect.w, event->rect.h);
131 drawGrooveRectangle(dc, 0, 15, width, height - 15);
155 int maximumWidth = -1;
157 for (
auto child =
myCollapsableFrame->getFirst(); child !=
nullptr; child = child->getNext()) {
159 const auto TLSTable =
dynamic_cast<GNETLSTable*
>(child);
163 if ((TLSTable->getWidth() + scrollBarWidth) > maximumWidth) {
164 maximumWidth = (TLSTable->getWidth() + scrollBarWidth);
169 if (maximumWidth != -1) {
191 sender->handle(
this, FXSEL(SEL_COMMAND, ID_DISABLE),
nullptr);
193 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 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)