// -----------------------------------------------------------------------------
// CAknFileSelectionModel::FolderIndex
//
//
// -----------------------------------------------------------------------------
//
TInt CAknFileSelectionModel::FolderIndex( const TDesC& aFolder ) const
    {
    TInt arrayCount( iEntryArray->Count() ); // Number of items in entry array
    TPath folder( aFolder );
    TInt folderLength( folder.Length() );
    if ( folderLength > 0 )
        {
        // If the last character is backslash, delete it
        if ( folder[ folderLength - 1 ] == '\\' )
            {
            folder.Delete( folderLength - 1, 1 );
            }
        // Try to find the folder from list
        for ( TInt index( 0 ); index < arrayCount; index++ )
            {
            if ( folder.CompareF( iEntryArray->At( index ).iName ) == 0 )
                {
                // When found, return its index
                return index;
                }
            }
        }

    // Return not found if not found
    return KErrNotFound;
    }
Beispiel #2
0
    inline gameControllerInput *getController(gameInput *pInput, int unsigned iControllerIndex) {
        Assert(iControllerIndex < arrayCount(pInput->sControllers));

        gameControllerInput *pResult = &pInput->sControllers[iControllerIndex];

        return pResult;
    }
Beispiel #3
0
void CControlResizer::Append(const CControlResizer& objectSrc)
{
	INT_PTR arrayCount(objectSrc.m_ResizePropArray.GetCount());
	for (INT_PTR i = 0; i < arrayCount; i++) {
		const ResizeProp &rszProp(objectSrc.m_ResizePropArray.GetAt(i));
		m_ResizePropArray.AddUnique(rszProp);
	}
}
Beispiel #4
0
void CControlResizer::ShowControls(int nCmdShow)
{
	INT_PTR arrayCount(m_ResizePropArray.GetCount());
	for (INT_PTR i = 0; i < arrayCount; i++) {
		const ResizeProp &rszProp(m_ResizePropArray.GetAt(i));
		m_pDialog->GetDlgItem(rszProp.controlID)->ShowWindow(nCmdShow);
	}
}