16 #define GETTEXT_DOMAIN "wesnoth-lib"
22 #include <boost/test/unit_test.hpp>
29 static void print(std::stringstream& sstr
33 sstr << queue <<
':' <<
id <<
'\n';
36 template<gui2::event::tevent E>
38 std::stringstream& sstr
55 std::stringstream& sstr
59 connect_queue<gui2::event::DRAW>(sstr, widget);
60 connect_queue<gui2::event::CLOSE_WINDOW>(sstr, widget);
61 connect_queue<gui2::event::MOUSE_ENTER>(sstr, widget);
62 connect_queue<gui2::event::MOUSE_LEAVE>(sstr, widget);
63 connect_queue<gui2::event::LEFT_BUTTON_DOWN>(sstr, widget);
64 connect_queue<gui2::event::LEFT_BUTTON_UP>(sstr, widget);
65 connect_queue<gui2::event::LEFT_BUTTON_CLICK>(sstr, widget);
66 connect_queue<gui2::event::LEFT_BUTTON_DOUBLE_CLICK>(sstr, widget);
67 connect_queue<gui2::event::MIDDLE_BUTTON_DOWN>(sstr, widget);
68 connect_queue<gui2::event::MIDDLE_BUTTON_UP>(sstr, widget);
69 connect_queue<gui2::event::MIDDLE_BUTTON_CLICK>(sstr, widget);
70 connect_queue<gui2::event::MIDDLE_BUTTON_DOUBLE_CLICK>(sstr, widget);
71 connect_queue<gui2::event::RIGHT_BUTTON_DOWN>(sstr, widget);
72 connect_queue<gui2::event::RIGHT_BUTTON_UP>(sstr, widget);
73 connect_queue<gui2::event::RIGHT_BUTTON_CLICK>(sstr, widget);
74 connect_queue<gui2::event::RIGHT_BUTTON_DOUBLE_CLICK>(sstr, widget);
83 BOOST_REQUIRE_NE(widget, static_cast<gui2::twidget*>(
nullptr));
125 std::stringstream sstr;
133 add_widget(grid, child_grid,
"level 1", 0, 0);
137 add_widget(*child_grid, child,
"level 2", 0, 0);
static config_cache & instance()
Get reference to the singleton object.
static void validate_right_button_down(std::stringstream &sstr)
static void add_widget(gui2::tgrid &grid, gui2::twidget *widget, const std::string &id, const unsigned row, const unsigned column)
static const unsigned VERTICAL_GROW_SEND_TO_CLIENT
static const unsigned HORIZONTAL_GROW_SEND_TO_CLIENT
boost::enable_if< boost::mpl::has_key< tset_event, boost::mpl::int_< E > > >::type connect_signal(const tsignal_function &signal, const tposition position=back_child)
Connect a signal for callback in tset_event.
static void connect_signals(std::stringstream &sstr, gui2::twidget &widget)
static std::string set_event_order()
bool fire(const tevent event, twidget &target)
Fires an event which has no extra parameters.
GLenum GLenum GLvoid GLvoid * column
void clear_defines()
Clear stored defines map to default values.
static void print(std::stringstream &sstr, const std::string &queue, const std::string &id)
void connect_queue(std::stringstream &sstr, gui2::twidget &widget)
BOOST_AUTO_TEST_CASE(test_fire_event)
static void validate_draw(std::stringstream &sstr)
GLenum GLenum GLvoid * row
void set_child(twidget *widget, const unsigned row, const unsigned col, const unsigned flags, const unsigned border_size)
Sets a child in the grid.
void add_define(const std::string &define)
Add a entry to preproc defines map.
GLsizei const GLcharARB ** string
Singleton class to manage game config file caching.