53 #define TACHYON_ITERATOR_TRAITS_USING_DECLS(type) \
54 using value_type = type; \
55 using difference_type = std::ptrdiff_t; \
56 using reference = const value_type&; \
57 using pointer = const value_type*;
109 #undef TACHYON_ITERATOR_TRAITS_USING_DECLS
115 template<
typename Iterator>
121 Iterator
begin()
const {
return m_begin; }
122 Iterator
end()
const {
return m_end; }
124 bool empty()
const {
return m_begin == m_end; }
The frame's element tree.
Definition gui_element_storage.h:100
Definition gui_element_iterators.h:117
TopDownDepthScanIterator begin() const
Definition gui_element_iterators.h:121
Range(Iterator begin, Iterator end)
Definition gui_element_iterators.h:119
TopDownDepthScanIterator end() const
Definition gui_element_iterators.h:122
bool empty() const
Definition gui_element_iterators.h:124
Range< BottomUpDepthScanIterator > BottomUpDepthScanRangeIterator
Definition gui_element_iterators.h:132
TopDownDepthScanIterator & operator++()
Definition gui_element_storage.h:509
Range< TopDownDepthScanIterator > TopDownDepthScanRangeIterator
Definition gui_element_iterators.h:131
bool Validate() const
Definition gui_element_storage.h:506
BottomUpDepthScanIterator & operator++()
Definition gui_element_storage.h:512
bool Validate() const
Definition gui_element_storage.h:507
Definition gui_logging.h:24
Definition gui_element_iterators.h:89
const ElementStorage & storage
Definition gui_element_iterators.h:90
const DepthScanCursor & operator*() const
Definition gui_element_iterators.h:99
std::input_iterator_tag iterator_category
Definition gui_element_iterators.h:95
bool operator==(const BottomUpDepthScanIterator &rhs) const
Definition gui_element_iterators.h:102
bool operator!=(const BottomUpDepthScanIterator &rhs) const
Definition gui_element_iterators.h:103
const DepthScanCursor * operator->() const
Definition gui_element_iterators.h:100
DepthScanCursor cursor
Definition gui_element_iterators.h:92
TACHYON_ITERATOR_TRAITS_USING_DECLS(DepthScanCursor)
uint64_t generation
Definition gui_element_iterators.h:91
Definition gui_element_iterators.h:20
uint32_t parentDepth
Definition gui_element_iterators.h:21
static constexpr DepthScanCursor EndCursor()
Definition gui_element_iterators.h:49
Element & CurrentElement(ElementStorage &storage) const
std::span< const ElementRect > GetChildRects(const ElementStorage &storage) const
uint32_t parentCountAtDepth
Definition gui_element_iterators.h:23
ElementRect & CurrentElementRect(ElementStorage &storage) const
bool HasChildren() const
Definition gui_element_iterators.h:29
bool operator==(const DepthScanCursor &rhs) const
Definition gui_element_iterators.h:41
IndexRange childRange
This parent's children at parentDepth + 1.
Definition gui_element_iterators.h:26
std::span< const Element > GetChildren(const ElementStorage &storage) const
bool IsDone() const
Definition gui_element_iterators.h:28
bool operator!=(const DepthScanCursor &rhs) const
Definition gui_element_iterators.h:47
void SetDone()
Definition gui_element_iterators.h:50
uint32_t parentIndex
Definition gui_element_iterators.h:22
std::span< ElementRect > GetChildRects(ElementStorage &storage) const
const Element & CurrentElement(const ElementStorage &storage) const
std::span< Element > GetChildren(ElementStorage &storage) const
const ElementRect & CurrentElementRect(const ElementStorage &storage) const
ElementRef CurrentRef() const
Definition gui_element_iterators.h:30
Definition gui_element.h:57
An element's slot in ElementStorage: its depth and index within that depth.
Definition gui_element.h:127
Definition gui_element.h:33
A half-open range [begin, end) of indices within one depth.
Definition gui_element.h:148
bool Empty() const
Definition gui_element.h:152
Definition gui_element_iterators.h:64
TACHYON_ITERATOR_TRAITS_USING_DECLS(DepthScanCursor)
const DepthScanCursor * operator->() const
Definition gui_element_iterators.h:75
const ElementStorage & storage
Definition gui_element_iterators.h:65
DepthScanCursor cursor
Definition gui_element_iterators.h:67
bool operator!=(const TopDownDepthScanIterator &rhs) const
Definition gui_element_iterators.h:78
std::input_iterator_tag iterator_category
Definition gui_element_iterators.h:70
const DepthScanCursor & operator*() const
Definition gui_element_iterators.h:74
bool operator==(const TopDownDepthScanIterator &rhs) const
Definition gui_element_iterators.h:77
uint64_t generation
Definition gui_element_iterators.h:66