|
stmm-games-doc
0.32.0
|
The widget base class. More...

Classes | |
| struct | Init |
| Instance initialization data. More... | |
Public Member Functions | |
| virtual | ~GameWidget () noexcept=default |
| int32_t | getViewWidgetNameIdx () const noexcept |
| The type (name) that might be used to choose a ThemeWidget. More... | |
| const std::string & | getName () const noexcept |
| The name of the widget. More... | |
| int32_t | getTeam () const noexcept |
| The team the widget is assigned to. More... | |
| int32_t | getMate () const noexcept |
| The mate the widget is assigned to. More... | |
| WidgetAxisFit | getWidgetHorizAxisFit (int32_t nLayoutConfig) const noexcept |
| Widget alignment and expansion for the x axis. More... | |
| WidgetAxisFit | getWidgetVertAxisFit (int32_t nLayoutConfig) const noexcept |
| Widget alignment and expansion for the y axis. More... | |
| bool | isAssignedToHuman () const noexcept |
| Tells whether the widget is assigned to a human. More... | |
| ContainerWidget * | getContainer () const noexcept |
| The container to which this widget was added to. More... | |
| virtual void | dump (int32_t nIndentSpaces, bool bHeader) const noexcept |
| Writes object contents to std::cout. More... | |
| void | dump (int32_t nIndentSpaces) const noexcept |
| Writes object contents to std::cout (header included). More... | |
| void | dump () const noexcept |
| Writes object contents to std::cout (header included). More... | |
Protected Member Functions | |
| GameWidget (Init &&oData) noexcept | |
| Constructor. More... | |
| void | reInit (Init &&oData) noexcept |
| Reinitialization. More... | |
| Layout & | layout () noexcept |
| The layout the widget belongs to. More... | |
| const Layout & | layout () const noexcept |
| The layout the widget belongs to. More... | |
| GameProxy & | game () noexcept |
| The game the widget belongs to. More... | |
| const GameProxy & | game () const noexcept |
| The game the widget belongs to. More... | |
| virtual void | onAddedToLayout () noexcept |
| Signals widget was added to layout. More... | |
| virtual void | onAddedToGame () noexcept |
| Signals widget was added to game. More... | |
The widget base class.
Widgets can be assigned to:
A game widget can potentially have two configurations. The normal one and the switched one. This allows the view (ThemeWidget) of the widget and its layout to adapt to a portrait (height bigger than width) or landscape (width bigger than height) window or screen size.
|
virtualdefaultnoexcept |
|
explicitprotectednoexcept |
Constructor.
| oData | The initialization data. |
|
virtualnoexcept |
Writes object contents to std::cout.
Should only do it in debug mode. The function is also exposed in release mode because it is virtual.
If bHeader is true this function should also output the type of the object and its address.
| nIndentSpaces | Number of spaces put in front of each output line. |
| bHeader | Whether the header of the object should be displayed. |
Reimplemented in stmg::ActionsBoxWidget, stmg::VarWidget, stmg::ProgressWidget, stmg::BoxWidget, stmg::LevelShowWidget, stmg::VolatileWidget, stmg::PreviewWidget, stmg::ActionWidget, stmg::BackgroundWidget, stmg::RelSizedGameWidget, stmg::InputBoxWidget, stmg::ContainerWidget, and stmg::TransparentWidget.
|
noexcept |
Writes object contents to std::cout (header included).
| nIndentSpaces | Number of spaces put in front of each output line. |
|
noexcept |
Writes object contents to std::cout (header included).
|
protectednoexcept |
The game the widget belongs to.
|
protectednoexcept |
The game the widget belongs to.
|
inlinenoexcept |
The container to which this widget was added to.
|
inlinenoexcept |
The mate the widget is assigned to.
|
inlinenoexcept |
The name of the widget.
|
inlinenoexcept |
The team the widget is assigned to.
|
inlinenoexcept |
The type (name) that might be used to choose a ThemeWidget.
It should be used by Theme to choose the ThemeWidget object (view) drawing this object (model)
|
noexcept |
Widget alignment and expansion for the x axis.
| nLayoutConfig | The layout config. |
|
noexcept |
Widget alignment and expansion for the y axis.
| nLayoutConfig | The layout config. |
|
inlinenoexcept |
Tells whether the widget is assigned to a human.
The owner can be determined by getTeam() and getMate(). If the owner type is a player tells whether it is human. If the owner type is team tells whether at least one mate in the team is human. If the owner type is game tells whether there is at least one human player playing.
|
protectednoexcept |
The layout the widget belongs to.
|
protectednoexcept |
The layout the widget belongs to.
|
inlineprotectedvirtualnoexcept |
Signals widget was added to game.
This happens after onAddedToLayout().
Reimplemented in stmg::LevelShowWidget, stmg::VolatileWidget, and stmg::PreviewWidget.
|
inlineprotectedvirtualnoexcept |
Signals widget was added to layout.
Reimplemented in stmg::InputBoxWidget.
|
protectednoexcept |
Reinitialization.
| oData | The initialization data. |
1.8.13