classicui_plat/avkon_fonts_api/inc/AknSystemFont.h
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 2005 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: 
       
    15 *     Avkon uiklaf system font and system font array interfaces
       
    16 *     
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef AKNSYSTEMFONT_H
       
    22 #define AKNSYSTEMFONT_H
       
    23 
       
    24 #include <s32std.h>
       
    25 
       
    26 class CAknLayoutFont;
       
    27 class CFont;
       
    28 
       
    29 /**
       
    30 * Avkon specific class that enables matching of font by Uid
       
    31 * 
       
    32 * This class has some peculiarities. It is the class which is forward declared in uiklaf as CLaySystemFont
       
    33 * and used in C++ Templates in Uiklaf Interfaces. This is used as its "real" name. 
       
    34 * 
       
    35 * The class name CAknSystemFont is for Avkon identification. Clients should use "CAknSystemFont"
       
    36 * 
       
    37 * @since Series 60 3.0
       
    38 * @internal
       
    39 */
       
    40 
       
    41 NONSHARABLE_CLASS(CLafSystemFont) : public CBase
       
    42     {
       
    43 public:
       
    44     /**
       
    45     * Create new system font array object fron an ID and the Avkon layout
       
    46     * font obtained from the UID
       
    47     * 
       
    48     * @param aUid   Uid that will uniquely match for this font
       
    49     * @param aFont  Avkon layout font to package up. The new object takes ownership.
       
    50     */
       
    51     IMPORT_C static CLafSystemFont* NewL(TUid aUid, CAknLayoutFont* aFont);
       
    52     
       
    53     /**
       
    54     * CBase-derived destructor
       
    55     */
       
    56     ~CLafSystemFont();
       
    57     
       
    58     /**
       
    59     * Access the font part of the object.
       
    60     *
       
    61     * @return the CFont contained in the object
       
    62     */
       
    63     IMPORT_C CFont* Font() const;
       
    64     
       
    65     /**
       
    66     * Access the Uid that is uniquely assigned to this font.
       
    67     *
       
    68     * @return the Uid that the system font was constructed with
       
    69     */
       
    70     IMPORT_C TUid Uid() const;
       
    71     
       
    72 private:   
       
    73     CLafSystemFont(TUid aUid, CAknLayoutFont* aFont); // Takes ownership of the CAknLayoutFont
       
    74     TUid iUid;
       
    75     CAknLayoutFont* iFont;
       
    76     };
       
    77 
       
    78 /**
       
    79 * Use of this class as CAknSystemFont is encouraged by the means of this typedef.
       
    80 */
       
    81 typedef CLafSystemFont CAknSystemFont;
       
    82 
       
    83 #endif // AKNSYSTEMFONT_H