CCWidget::~CCWidget(){ ReleaseExclusive(); for(int i=0; i<m_Children.GetCount(); i++){ CCWidget* pWidget = m_Children.Get(i); pWidget->m_pParent = NULL; } if(m_pParent!=NULL) m_pParent->RemoveChild(this); if(CCWidget::m_pCapturedWidget==this) CCWidget::m_pCapturedWidget = NULL; if(CCWidget::m_pFocusedWidget==this) CCWidget::m_pFocusedWidget = NULL; DetachToolTip(); }
void CCWidget::Show(bool bVisible, bool bModal){ if(m_bVisible==bVisible){ if(bModal==true){ if(m_pParent!=NULL && m_pParent->GetLatestExclusive()==this) return; } else return; } m_bVisible = bVisible; if(bVisible==true && bModal==true) SetExclusive(); else if(bVisible==false) { ReleaseExclusive(); if(CCWidget::m_pFocusedWidget==this) ReleaseFocus(); } OnShow(bVisible); }
ShareInfo::~ShareInfo() { if (selfMode != NONE) ReleaseExclusive(); UnInit(); }