예제 #1
0
파일: Scene.cpp 프로젝트: HSakai/HsFw4OSG
    void Scene::SetChild (Scene* scene)
    {
#ifdef DEBUG
        if (childScene != nullptr)
        {
            const std::string logText = "already set child !!";
            PutLog (logText);
        }
#endif
        if (scene == nullptr)
        {
#ifdef DEBUG
            const std::string logText = "scene is nullptr !! so, return this method.";
            PutLog (logText);
#endif
            return;
        }

        if (childScene != nullptr)
        {
            DestroyChild ();
        }

        childScene = scene;
    }
void QuadTreeNode::DestroyAllChildren()
{
    for(int i = 0; i < nodeChildren.size(); i++)
	{
    	DestroyChild(nodeChildren[i]);
	}
}
예제 #3
0
CRealMediaWindowlessSite::~CRealMediaWindowlessSite()
{
	POSITION pos = m_pChildren.GetHeadPosition();
	while(pos) DestroyChild(m_pChildren.GetNext(pos));

	RMADestroyRegion(m_pRegion);
	RMADestroyRegion(m_pRegionWithoutChildren);
}
예제 #4
0
void STabCtrl::OnDestroy()
{
    for(int i=GetItemCount()-1; i>=0; i--)
    {
        DestroyChild(m_lstPages[i]);
    }
    m_lstPages.RemoveAll();
}
예제 #5
0
void STabCtrl::OnSliderFinish()
{
    SASSERT(m_tabSlider);
    DestroyChild(m_tabSlider);
    m_tabSlider = NULL;
    STabPage * pPage = m_lstPages[m_nCurrentPage];
    SASSERT(pPage);
    pPage->SetVisible(TRUE,TRUE);
}
예제 #6
0
BOOL CDuiItemBox::RemoveItem(CDuiWindow * pChild)
{
    if (DestroyChild(pChild))
    {
        UpdateScroll();
        ReLayout();
        NotifyInvalidate();
        return TRUE;
    }
    return FALSE;
}
예제 #7
0
void STabCtrl::RemoveAllItems( void )
{
    for (int i = GetItemCount()-1; i >= 0; i--)
    {
        STabPage * pTab = GetItem(i);
        DestroyChild(pTab);
        m_lstPages.RemoveAt(i);
    }
    m_nCurrentPage = -1;
    Invalidate();
}
예제 #8
0
int main()
{
	struct CChildDate date;
	InitChild(&date);
	date.pInit(&date, 2016, 2, 3);
	if (date.pJudge(&date))
		printf("isLeapYear!\n");
	else
		printf("notLeapYear!\n");
	DestroyChild(&date);
	return 0;
}
예제 #9
0
void OGR_SRSNode::StripNodes( const char * pszName )

{
/* -------------------------------------------------------------------- */
/*      Strip any children matching this name.                          */
/* -------------------------------------------------------------------- */
    while( FindChild( pszName ) >= 0 )
        DestroyChild( FindChild( pszName ) );

/* -------------------------------------------------------------------- */
/*      Recurse                                                         */
/* -------------------------------------------------------------------- */
    for( int i = 0; i < GetChildCount(); i++ )
        GetChild(i)->StripNodes( pszName );
}
예제 #10
0
BOOL CDuiItemBox::RemoveItem(UINT iItem)
{
    if(iItem>=GetItemCount()) return FALSE;
    CDuiWindow *pChild=m_pFirstChild;
    for(UINT iChild=0; iChild<iItem ; iChild++)
    {
        pChild=pChild->GetDuiWindow(GDUI_NEXTSIBLING);
    }
    DestroyChild(pChild);

    UpdateScroll();
    ReLayout();
    NotifyInvalidate();

    return TRUE;
}
예제 #11
0
BOOL STabCtrl::RemoveItem( int nIndex , int nSelPage/*=0*/)
{
    STabPage * pTab = GetItem(nIndex);

    DestroyChild(pTab);
    m_lstPages.RemoveAt(nIndex);

    if (m_nCurrentPage == nIndex)
    {
        if(nSelPage<0) nSelPage=0;
        if(nSelPage>=(int)GetItemCount()) nSelPage=GetItemCount()-1;
        m_nCurrentPage=-1;
        SetCurSel(nSelPage);
    }else
    {
        if(m_nCurrentPage>nIndex) m_nCurrentPage--;
        CRect rcTitle = GetTitleRect();
        InvalidateRect(rcTitle);
    }
    return TRUE;
}