Skip to content

Instantly share code, notes, and snippets.

@SunXiaoShan
Created January 19, 2019 06:11
Show Gist options
  • Select an option

  • Save SunXiaoShan/597a6b28e7f0c24de872c6279cab7208 to your computer and use it in GitHub Desktop.

Select an option

Save SunXiaoShan/597a6b28e7f0c24de872c6279cab7208 to your computer and use it in GitHub Desktop.
void getHighlightableChildren(Widget* currentHighlightWiget, WidgetList& list) {
// 取得該 Widget 在哪個頁面上
Page* pagePtr = currentHighlightWiget->getParentPage();
const WidgetList& children = pagePtr->getChildren();
Layer* layer = NULL;
// 取得 highlightable list,部分可用 recursive 方式判斷 isHighlightable() 這個 method 得到
for (WidgetList::const_iterator it = children.begin(); it != children.end(); ++it) {
layer = (Layer *)*it;
if (layer->isActive()) {
layer->findHighlightableChildren(list);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment