uifw/uiklaf/src/LAFTBAR.CPP
changeset 0 2f259fa3e83a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/uifw/uiklaf/src/LAFTBAR.CPP	Tue Feb 02 01:00:49 2010 +0200
@@ -0,0 +1,62 @@
+/*
+* Copyright (c) 1997-1999 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#include <gulbordr.h>
+#include <gulutil.h>
+
+#include "LAFSTD.H"
+#include "LAFTBAR.H"
+#include "lafcommn.h"
+
+//
+// Class LafToolBar
+//
+
+/**
+ * Gets the default border for the matched control in aBorder. Called from the constructor of the matched control.
+ */
+EXPORT_C void LafToolBar::GetDefaultBorder(TGulBorder& aBorder)
+	{
+	aBorder=TGulBorder(TGulBorder::ESingleBlack);
+	}
+
+/**
+ * Gets the set of border colors for the matched control in aBorderColors. The RGB values of the colors obtained
+ * may depend on the the display mode, the environment color list and the instance of the
+ * matched control aMatchedControl. Called by the matched control from its Draw() method and passed on to the
+ * Draw() method of TGulBorder. 
+ */
+EXPORT_C void LafToolBar::GetBorderColors(TGulBorder::TColors& aBorderColors, const MLafEnv& aLafEnv, const CCoeControl& aMatchedControl)
+	{
+	LafCommonUtils::GetRgbDerivedBorderColors( aBorderColors,
+			EColorToolbarBackground, aLafEnv,aMatchedControl );
+	}
+
+EXPORT_C void LafToolBar::GetColorUseListL(CArrayFix<TCoeColorUse>& aColorUseList)
+	{ // static
+	TInt commonAttributes = TCoeColorUse::ESurrounds|TCoeColorUse::EActive|TCoeColorUse::ENormal|TCoeColorUse::ENeutral;
+	TCoeColorUse colorUse;
+
+	colorUse.SetLogicalColor(EColorToolbarText);
+	colorUse.SetUse(TCoeColorUse::EFore|commonAttributes);
+	aColorUseList.AppendL(colorUse);
+
+	colorUse.SetLogicalColor(EColorToolbarBackground);
+	colorUse.SetUse(TCoeColorUse::EBack|commonAttributes);
+	aColorUseList.AppendL(colorUse);
+	}