Esempio n. 1
0
 void CocoWidget::setNeedCheckVisibleDepandParent(bool need)
 {
     this->m_bNeedCheckVisibleDependParent = need;
     if (this->m_children){
         for (int i=0;i<this->m_children->count();i++)
         {
             CocoWidget* child = (CocoWidget*)(this->m_children->objectAtIndex(i));
             child->setNeedCheckVisibleDepandParent(need);
         }
     }
 }
void CocoContainerWidget::setClipAble(bool able)
{
    this->m_bClipAble = able;
    switch (m_renderType) {
    case RENDER_TYPE_LAYERCOLOR:
        DYNAMIC_CAST_CLIPLAYERCOLOR->setClipAble(able);
        break;
    case RENDER_TYPE_LAYERGRADIENT:
        DYNAMIC_CAST_CLIPLAYERGRADIENT->setClipAble(able);
        break;
    default:
        break;
    }
    for (int i=0; i<this->m_children->count(); i++) {
        CocoWidget* child = (CocoWidget*)(this->m_children->objectAtIndex(i));
        child->setNeedCheckVisibleDepandParent(able);
    }
}