skins/AknSkins/rlsrc/AknsRlUtils.cpp
changeset 0 05e9090e2422
equal deleted inserted replaced
-1:000000000000 0:05e9090e2422
       
     1 /*
       
     2 * Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Rendering library static utility class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "AknsRlUtils.h"
       
    21 
       
    22 #include <AknUtils.h>
       
    23 #include <skinlayout.cdl.h>
       
    24 #include <AknsSkinInstance.h>
       
    25 #include <AknsConstants.h>
       
    26 
       
    27 // ============================ MEMBER FUNCTIONS ===============================
       
    28 
       
    29 // -----------------------------------------------------------------------------
       
    30 // AknsRlUtils::IsPopupCenter
       
    31 // -----------------------------------------------------------------------------
       
    32 //
       
    33 EXPORT_C TBool AknsRlUtils::IsPopupCenter( const TAknsItemID& aIID )
       
    34     {
       
    35     if( (aIID == KAknsIIDQsnFrPopupCenter)
       
    36         || (aIID == KAknsIIDQsnFrPopupCenterMenu)
       
    37         || (aIID == KAknsIIDQsnFrPopupCenterNote)
       
    38         || (aIID == KAknsIIDQsnFrPopupCenterQuery)
       
    39         || (aIID == KAknsIIDQsnFrPopupCenterFind)
       
    40         || (aIID == KAknsIIDQsnFrPopupCenterSnote)
       
    41         || (aIID == KAknsIIDQsnFrPopupCenterFswap) )
       
    42         {
       
    43         return ETrue;
       
    44         }
       
    45 
       
    46     return EFalse;
       
    47     }
       
    48 
       
    49 // -----------------------------------------------------------------------------
       
    50 // AknsRlUtils::GetPopupFrameDimensions
       
    51 // -----------------------------------------------------------------------------
       
    52 //
       
    53 EXPORT_C void AknsRlUtils::GetPopupFrameDimensions(
       
    54     TSize& aTlSize, TSize& aBrSize )
       
    55     {
       
    56     // This parent is imaginary, we are just interested in frame corner
       
    57     // dimensions
       
    58     TRect imaginaryParent( 0, 0, 1024, 1024 );
       
    59 
       
    60     TAknLayoutRect topLeft;
       
    61     topLeft.LayoutRect( imaginaryParent,
       
    62         SkinLayout::Popup_windows_skin_placing__frame_general__Line_2());
       
    63 
       
    64     TAknLayoutRect bottomRight;
       
    65     bottomRight.LayoutRect( imaginaryParent,
       
    66         SkinLayout::Popup_windows_skin_placing__frame_general__Line_5());
       
    67 
       
    68     aTlSize = topLeft.Rect().Size();
       
    69     aBrSize = bottomRight.Rect().Size();
       
    70     }
       
    71 
       
    72 // End of File