16 #define GETTEXT_DOMAIN "wesnoth-lib"
18 #include <boost/test/unit_test.hpp>
28 , std::unique_ptr<gui2::widget> widget
29 ,
const std::string&
id
31 ,
const unsigned column)
33 BOOST_REQUIRE_NE(widget.get(),
static_cast<gui2::widget*
>(
nullptr));
49 const auto visitor = control.create_walker();
51 BOOST_REQUIRE_NE(visitor.get(),
static_cast<void*
>(
nullptr));
157 cache.clear_defines();
158 cache.add_define(
"EDITOR");
159 cache.add_define(
"MULTIPLAYER");
A config object defines a single node in a WML file, with access to child nodes.
Singleton class to manage game config file caching.
static config_cache & instance()
Get reference to the singleton object.
static const unsigned HORIZONTAL_GROW_SEND_TO_CLIENT
virtual iteration::walker_ptr create_walker() override
See widget::create_walker.
static const unsigned VERTICAL_GROW_SEND_TO_CLIENT
void set_child(std::unique_ptr< widget > widget, const unsigned row, const unsigned col, const unsigned flags, const unsigned border_size)
Sets a child in the grid.
@ internal
Visit its nested grid.
@ self
Visit the widget itself.
@ child
Visit the children of its nested grid.
@ invalid
When calling next the following it has the following results.
@ valid
When calling next the following it has the following results.
std::unordered_map< std::string, cache_item > cache
BOOST_AUTO_TEST_CASE(test_gui2_visitor)
static void test_control(T &&control)
static void add_widget(gui2::grid &grid, std::unique_ptr< gui2::widget > widget, const std::string &id, const unsigned row, const unsigned column)