Ejemplo n.º 1
0
void NDLightEffect::draw()
{
	if (!NDDebugOpt::getDrawLightEffectEnabled()) return;

	NDNode::draw();

	NDLayer* pkLayer = (NDLayer*) GetParent();
	if (pkLayer)
	{
		if (m_pkFrameRunRecord->getIsCompleted())
		{
			RemoveFromParent(true);
			return;
		}

		if (m_pkAniGroup->getAnimations()->count() > m_nLightID)
		{
			NDAnimation *pkAnimation =
					(NDAnimation *) m_pkAniGroup->getAnimations()->objectAtIndex(
							m_nLightID);
			m_pkAniGroup->setRunningMapSize(pkLayer->GetContentSize());
			m_pkAniGroup->setPosition(m_kPosition);
			pkAnimation->setReverse(m_bReverse);
			pkAnimation->runWithRunFrameRecord(m_pkFrameRunRecord, true);
		}
		else
		{
			RemoveFromParent(true);
		}
	}
}
Ejemplo n.º 2
0
 void Node::SetParent(PNode parent)
 {
     RemoveFromParent();
     if (parent)
         parent->AddChild(SharedFromPointerNode(this));
     MarkAsDirty();
 }
void CNcdNodeContentInfoProxy::InternalizeL()
    {
    DLTRACEIN((""));

    HBufC8* data( NULL );
        
    // Because we do not know the exact size of the data, use
    // the alloc method, which creates the buffer of the right size
    // and sets the pointer to point to the created buffer.
    // Get all the data that is necessary to internalize this object
    // from the server side.
    TInt error(
        ClientServerSession().
        SendSyncAlloc( NcdNodeFunctionIds::ENcdInternalize,
                       KNullDesC8,
                       data,
                       Handle(),
                       0 ) );

    if ( error == KNcdErrorObsolete )
        {
        DLINFO(("Content info was obsolete"));
        // Remove interfaces implemented by this class from the top parent interface list.
        // So, the interface list is up to date after this object is removed
        // from its top parent.
        RemoveInterface( MNcdNodeContentInfo::KInterfaceUid );
        // Remove from the parent
        RemoveFromParent();
        // Now update the interface for this object just in case somebody needs it.
        // Register the interface
        MNcdNodeContentInfo* interface( this );
        AddInterfaceL( 
            CCatalogsInterfaceIdentifier::NewL( interface, this, MNcdNodeContentInfo::KInterfaceUid ) );
        }

    // If error occurred during data transfer, leave here and forward the error.
    User::LeaveIfError( error );

    if ( data == NULL )
        {
        DLERROR((""));
        User::Leave(  KErrNotFound );
        }

     CleanupStack::PushL( data );

     // Read the data from the stream and insert it to the memeber variables
     RDesReadStream stream( *data );
     CleanupClosePushL( stream );
    
     InternalizeDataL( stream );
    
     // Closes the stream
     CleanupStack::PopAndDestroy( &stream ); 
     CleanupStack::PopAndDestroy( data );

    DLTRACEOUT((""));    
    }
Ejemplo n.º 4
0
//------------------------------------------------------------------
//------------------------------------------------------------------
void Entity::Reset()
{
    RemoveAllComponents();
    RemoveAllChildren();
    RemoveFromParent();

    m_name = std::string();
    m_transform.Reset();
}
Ejemplo n.º 5
0
void UUserWidget::OnLevelRemovedFromWorld(ULevel* InLevel, UWorld* InWorld)
{
	// If the InLevel is null, it's a signal that the entire world is about to disappear, so
	// go ahead and remove this widget from the viewport, it could be holding onto too many
	// dangerous actor references that won't carry over into the next world.
	if ( InLevel == nullptr && InWorld == GetWorld() )
	{
		RemoveFromParent();
		MarkPendingKill();
	}
}
Ejemplo n.º 6
0
void UUserWidget::BeginDestroy()
{
	Super::BeginDestroy();

	// If anyone ever calls BeginDestroy explicitly on a widget we need to immediately remove it from
	// the the parent as it may be owned currently by a slate widget.  As long as it's the viewport we're
	// fine.
	RemoveFromParent();

	// If it's not owned by the viewport we need to take more extensive measures.  If the GC widget still
	// exists after this point we should just reset the widget, which will forcefully cause the SObjectWidget
	// to lose access to this UObject.
	TSharedPtr<SObjectWidget> SafeGCWidget = MyGCWidget.Pin();
	if ( SafeGCWidget.IsValid() )
	{
		SafeGCWidget->ResetWidget();
	}
}
Ejemplo n.º 7
0
// ----------------------------------------------------------------------- //
//
//	ROUTINE:	CLTWnd::RemoveAllChildren
//
//	PURPOSE:	Deletes and removes all of our child windows
//
// ----------------------------------------------------------------------- //
void CLTWnd::RemoveAllChildren()
{
	POSITION pos = m_lstChildren.GetHeadPosition();
	while (pos)
	{
		CLTWnd* pWnd = (CLTWnd*)m_lstChildren.GetNext(pos);

		// Terming the window will take care of removing all of it's children
        if (pWnd)
        {
            debug_delete(pWnd);
            pWnd = NULL;
        }
	}

	m_lstChildren.RemoveAll();

	 // Remove us from parent window list
	RemoveFromParent();
}
Ejemplo n.º 8
0
// ----------------------------------------------------------------------- //
//
//	ROUTINE:	SetWindowPos
//
//	PURPOSE:	Sets the window position
//
// ----------------------------------------------------------------------- //
BOOL CLTWnd::SetWindowPos(CLTWnd* pInsertAfter, int xPos, int yPos, int nWidth, int nHeight, DWORD dwFlags)
{
	if(pInsertAfter)
	{
		CLTWnd* pParentWnd = m_pParentWnd;
		RemoveFromParent();
		m_pos = pParentWnd->m_lstChildren.InsertBefore(pInsertAfter->GetPos(),this);
		m_pParentWnd = pInsertAfter->GetParent();
	}
	else
	{
		// TODO: Check other insert params
	}

	m_xPos = xPos;
	m_yPos = yPos;

	if(IsFlagSet(LTWF_SIZEABLE))
	{
		// TODO: Resize the surface as necessary
	}
	return TRUE;
}
Ejemplo n.º 9
0
void UUserWidget::RemoveFromViewport()
{
	RemoveFromParent();
}