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));
A config object defines a single node in a WML file, with access to child nodes.
Singleton class to manage game config file caching.
void add_define(const std::string &define)
Add a entry to preproc defines map.
static config_cache & instance()
Get reference to the singleton object.
void clear_defines()
Clear stored defines map to default values.
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.
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)