GUI2/Iterator: added some alias templates and a get() function

This commit is contained in:
Charles Dang 2018-06-23 16:27:35 +11:00
parent 1778dd8581
commit 1eaa51b3f9

View file

@ -101,8 +101,22 @@ public:
{
return &(operator*());
}
/** See @ref operator*. */
widget* get()
{
return operator->();
}
};
/* Helper aliases templates. */
template<bool visit_self, bool visit_internal, bool visit_child>
using top_down_iterator = iterator<policy::order::top_down<visit_self, visit_internal, visit_child>>;
template<bool visit_self, bool visit_internal, bool visit_child>
using bottom_up_iterator = iterator<policy::order::bottom_up<visit_self, visit_internal, visit_child>>;
} // namespace iteration
} // namespace gui2