The Battle for Wesnoth  1.19.7+dev
Static Public Member Functions | List of all members
gui2::viewport_implementation Struct Reference

Helper to implement private functions without modifying the header. More...

Static Public Member Functions

template<class W >
static utils::const_clone_ptr< widget, W > find_at (W viewport, point coordinate, const bool must_be_active)
 Implementation for the wrappers for [const] widget* pane::find_at(const point&, const bool) [const]. More...
 
template<class W >
static utils::const_clone_ptr< widget, W > find (W viewport, const std::string_view id, const bool must_be_active)
 

Detailed Description

Helper to implement private functions without modifying the header.

The class is a helper to avoid recompilation and only has static functions. It also facilitates to create duplicates of functions for a const and a non-const member function.

Definition at line 40 of file viewport.cpp.

Member Function Documentation

◆ find()

template<class W >
static utils::const_clone_ptr<widget, W> gui2::viewport_implementation::find ( viewport,
const std::string_view  id,
const bool  must_be_active 
)
inlinestatic

Definition at line 72 of file viewport.cpp.

References gui2::viewport::widget_.

Referenced by gui2::viewport::find().

◆ find_at()

template<class W >
static utils::const_clone_ptr<widget, W> gui2::viewport_implementation::find_at ( viewport,
point  coordinate,
const bool  must_be_active 
)
inlinestatic

Implementation for the wrappers for [const] widget* pane::find_at(const point&, const bool) [const].

Template Parameters
WA pointer to the pane.

Definition at line 50 of file viewport.cpp.

References gui2::widget::get_x(), gui2::widget::get_y(), gui2::viewport::widget_, map_location::x, and map_location::y.

Referenced by gui2::viewport::find_at().


The documentation for this struct was generated from the following file: