#include "view.h" #include #include #include #include #include #include #include "reflex/timer.h" #include "reflex/filter.h" #include "reflex/exception.h" #include "reflex/debug.h" #include "window.h" #include "event.h" #include "selector.h" #include "timer.h" #include "style.h" #include "shape.h" #include "world.h" #include "body.h" #include "fixture.h" namespace Reflex { static const char* WALL_NAME = "__WALL__"; static const Point ZERO = 0; struct View::Data { typedef std::set SelectorSet; enum Flag { REDRAW = Xot::bit(1, FLAG_LAST), APPLY_STYLE = Xot::bit(2, FLAG_LAST), UPDATE_STYLE = Xot::bit(3, FLAG_LAST), UPDATE_SHAPES = Xot::bit(4, FLAG_LAST), UPDATE_LAYOUT = Xot::bit(5, FLAG_LAST), SORT_CHILDREN = Xot::bit(6, FLAG_LAST), FIT_TO_CONTENT = Xot::bit(7, FLAG_LAST), HAS_VARIABLE_LENGTHS = Xot::bit(8, FLAG_LAST), NO_SHAPE = Xot::bit(9, FLAG_LAST), };// Flag Window* window = NULL; View* parent = NULL; Bounds frame; float zoom = 1; float angle = 0; ushort capture = CAPTURE_NONE; short hide_count = 0; ushort child_index = 0; uint flags = FLAG_CLIP | FLAG_RESIZE_TO_FIT | REDRAW | UPDATE_LAYOUT | UPDATE_STYLE; std::unique_ptr ppivot; std::unique_ptr pscroll; SelectorPtr pselector; std::unique_ptr pselectors_for_update; std::unique_ptr pcache_image; std::unique_ptr ptimers; std::unique_ptr