|
| | InputBoxThWidget (InputBoxThWidgetFactory *p1Owner, const shared_ptr< GameWidget > &refGameWidget, InputBoxWidget *p0BoxWidget, const std::vector< shared_ptr< ThemeWidget > > &aChildTW, double fTileWHRatio) noexcept |
| |
| void | reInit (InputBoxThWidgetFactory *p1Owner, const shared_ptr< GameWidget > &refGameWidget, InputBoxWidget *p0BoxWidget, const std::vector< shared_ptr< ThemeWidget > > &aChildTW, double fTileWHRatio) noexcept |
| |
| void | dump (int32_t nIndentSpaces, bool bHeader) const noexcept override |
| | Writes object contents to std::cout. More...
|
| |
| bool | handleXYInput (const shared_ptr< stmi::Event > &refXYEvent, int32_t nTeam, int32_t nMate) noexcept override |
| | Handles the XYEvent input. More...
|
| |
| | BoxThemeWidget (InputBoxThWidgetFactory *p1Owner, const shared_ptr< GameWidget > &refGameWidget, InputBoxWidget *p0BoxWidget, const std::vector< shared_ptr< ThemeWidget > > &aChildTW, double fTileWHRatio) noexcept |
| | Constructor. More...
|
| |
| void | reInit (InputBoxThWidgetFactory *p1Owner, const shared_ptr< GameWidget > &refGameWidget, InputBoxWidget *p0BoxWidget, const std::vector< shared_ptr< ThemeWidget > > &aChildTW, double fTileWHRatio) noexcept |
| | Reinitialization. More...
|
| |
| bool | canChange () const noexcept override |
| | Whether the widget's appearance (or one of its parents) can change. More...
|
| |
| NSize | getSize () const noexcept override |
| | The size of the widget. More...
|
| |
| NPoint | getPos () const noexcept override |
| | The position of the widget. More...
|
| |
| bool | drawIfChanged (const Cairo::RefPtr< Cairo::Context > &refCc) noexcept override |
| | Deep draws a widget if it changed. More...
|
| |
| void | draw (const Cairo::RefPtr< Cairo::Context > &refCc) noexcept override |
| | Draws a widget. More...
|
| |
| const std::pair< SegmentedFunction, SegmentedFunction > & | getSizeFunctions (int32_t nLayoutConfig) const noexcept override |
| | Gets the width and height functions that take the tile width as parameter. More...
|
| |
| void | placeAndMaybeResizeIn (const NRect &oRect) noexcept override |
| | Places and possibly resizes the widget within the given area. More...
|
| |
| void | dump (int32_t nIndentSpaces, bool bHeader) const noexcept override |
| | Writes object contents to std::cout. More...
|
| |
| const std::vector< shared_ptr< ThemeWidget > > & | getChildren () const noexcept |
| | The child ThemeWidget vector of the container. More...
|
| |
| virtual | ~ThemeWidget () noexcept=default |
| |
| virtual void | drawDeep (const Cairo::RefPtr< Cairo::Context > &refCc) noexcept |
| | Deep draws a widget. More...
|
| |
| bool | isContainer () const noexcept |
| | Tells Whether the widget is a container. More...
|
| |
| const shared_ptr< GameWidget > & | getModel () const noexcept |
| | The game widget used to generate the theme widget. More...
|
| |
| ThemeContainerWidget * | getParent () const noexcept |
| | The parent container of the widget. More...
|
| |
| void | dump (int32_t nIndentSpaces) const noexcept |
| | Writes object contents to std::cout (header included). More...
|
| |
| void | dump () const noexcept |
| | Writes contents to std::cout without indentation. More...
|
| |
| virtual | ~ThemeWidgetInteractive () noexcept=default |
| |
| bool | isInteractive () const noexcept |
| | Tells whether the widget should really be interactive. More...
|
| |
| ThemeWidget * | getThemeWidget () noexcept |
| | The pointer to the interface's theme widget. More...
|
| |
| void | dump (int32_t nIndentSpaces) const noexcept |
| |
| bool stmg::InputBoxThWidget::handleXYInput |
( |
const shared_ptr< stmi::Event > & |
refXYEvent, |
|
|
int32_t |
nTeam, |
|
|
int32_t |
nMate |
|
) |
| |
|
overridevirtualnoexcept |
Handles the XYEvent input.
It's safe to statically cast refXYEvent->get() to stmi::XYEvent*.
The team and mate parameters are not necessarily those of the widget but can also be determined by the stmi::Capability of the stmi::XYEvent, which is done by the caller of this function.
The interactive widget might not handle an event. For example when a new grab (see stmi::XYEvent::XY_GRAB) is initiated, the widget might return false because it already has an open grab. Another example: a key action widget needs the player to be defined (nMate >= 0).
- Parameters
-
| refXYEvent | Reference to a stmi::XYEvent object. Cannot be null. |
| nTeam | The team or -1 if not set. |
| nMate | The mate of -1 if not set. |
- Returns
- Whether the widget has handled the event.
Implements stmg::ThemeWidgetInteractive.