Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct stacked_widget_implementation
- {
- template<typename W>
- static widget* find(utils::const_clone_ref<stacked_widget, W> stack,
- const std::string& id,
- const bool must_be_active)
- {
- // Use base method if find-in-all-layer isn't set.
- if(!stack.find_in_all_layers_) {
- return stack.container_base::find(id, must_be_active);
- }
- widget* res = nullptr;
- for(unsigned i = 0; i < stack.get_layer_count(); ++i) {
- res = stack.get_layer_grid(i)->find(id, must_be_active);
- if(res) {
- break;
- }
- }
- if(!res) {
- res = stack.container_base::find(id, must_be_active);
- }
- return res;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement