67 for (
auto &tab :
mTabs)
68 panel->
addTab(tab->getName(), tab.get());
70 place(0, 0, panel, 5, 5);
74 int width = 0, height = 350;
78 setMinHeight(height + getPadding() + getTitleBarHeight());
87 if (event.getId() ==
"Apply")
91 for (
auto &tab :
mTabs)
94 else if (event.getId() ==
"Cancel")
98 for (
auto &tab :
mTabs)
101 else if (event.getId() ==
"Reset Windows")
104 window->resetToDefaultSize();
void reflow(int &nW, int &nH)
Sets the positions of all the widgets.
gcn::Button * mResetWindows
void action(const gcn::ActionEvent &event) override
Event handling method.
std::vector< std::unique_ptr< SetupTab > > mTabs
void clearWindowsForReset()
std::vector< Window * > mWindowsToReset
void registerWindowForReset(Window *window)
Enables the Reset Windows button.
A tabbed area, the same as the guichan tabbed area in 0.8, but extended.
void addTab(gcn::Tab *tab, gcn::Widget *widget) override
Add a tab.
virtual void setVisible(bool visible)
Overloads window setVisible by Guichan to allow sticky window handling.
void setMinHeight(int height)
Sets the minimum height of the window.
Layout & getLayout()
Gets the layout handler for this window.
void setWindowName(const std::string &name)
Sets the name of the window.
void setResizable(bool resize)
Sets whether or not the window can be resized.
LayoutCell & place(int x, int y, gcn::Widget *, int w=1, int h=1)
Adds a widget to the window and sets it at given cell.
void setCloseButton(bool flag)
Sets whether or not the window has a close button.
void setDefaultSize()
Set the default win pos and size to the current ones.
void loadWindowState()
Reads the position (and the size for resizable windows) in the configuration based on the given strin...
void setMinWidth(int width)
Sets the minimum width of the window.