uifw/uiklaf/src/LAFTBAR.CPP
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 1997-1999 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 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <gulbordr.h>
       
    20 #include <gulutil.h>
       
    21 
       
    22 #include "LAFSTD.H"
       
    23 #include "LAFTBAR.H"
       
    24 #include "lafcommn.h"
       
    25 
       
    26 //
       
    27 // Class LafToolBar
       
    28 //
       
    29 
       
    30 /**
       
    31  * Gets the default border for the matched control in aBorder. Called from the constructor of the matched control.
       
    32  */
       
    33 EXPORT_C void LafToolBar::GetDefaultBorder(TGulBorder& aBorder)
       
    34 	{
       
    35 	aBorder=TGulBorder(TGulBorder::ESingleBlack);
       
    36 	}
       
    37 
       
    38 /**
       
    39  * Gets the set of border colors for the matched control in aBorderColors. The RGB values of the colors obtained
       
    40  * may depend on the the display mode, the environment color list and the instance of the
       
    41  * matched control aMatchedControl. Called by the matched control from its Draw() method and passed on to the
       
    42  * Draw() method of TGulBorder. 
       
    43  */
       
    44 EXPORT_C void LafToolBar::GetBorderColors(TGulBorder::TColors& aBorderColors, const MLafEnv& aLafEnv, const CCoeControl& aMatchedControl)
       
    45 	{
       
    46 	LafCommonUtils::GetRgbDerivedBorderColors( aBorderColors,
       
    47 			EColorToolbarBackground, aLafEnv,aMatchedControl );
       
    48 	}
       
    49 
       
    50 EXPORT_C void LafToolBar::GetColorUseListL(CArrayFix<TCoeColorUse>& aColorUseList)
       
    51 	{ // static
       
    52 	TInt commonAttributes = TCoeColorUse::ESurrounds|TCoeColorUse::EActive|TCoeColorUse::ENormal|TCoeColorUse::ENeutral;
       
    53 	TCoeColorUse colorUse;
       
    54 
       
    55 	colorUse.SetLogicalColor(EColorToolbarText);
       
    56 	colorUse.SetUse(TCoeColorUse::EFore|commonAttributes);
       
    57 	aColorUseList.AppendL(colorUse);
       
    58 
       
    59 	colorUse.SetLogicalColor(EColorToolbarBackground);
       
    60 	colorUse.SetUse(TCoeColorUse::EBack|commonAttributes);
       
    61 	aColorUseList.AppendL(colorUse);
       
    62 	}