uifw/uiklaf/inc/LAFCMBUT.H
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 #ifndef __LAFCMBUT_H__
       
    20 #define __LAFCMBUT_H__
       
    21 
       
    22 #include <gulbordr.h>
       
    23 #include <coecntrl.h>
       
    24 #include <lafmain.h>
       
    25 
       
    26 class TDrawState;
       
    27 class MLafEnv;
       
    28 
       
    29 /**
       
    30  * @internal
       
    31  * Do not use
       
    32  */
       
    33 class LafCommandButtonBase
       
    34 	{
       
    35 public:
       
    36 	IMPORT_C static void GetDefaultBorder(TGulBorder& aBorder);
       
    37 	IMPORT_C static void GetBorderColors(TGulBorder::TColors& aBorderColors,const MLafEnv& aEnv,const CCoeControl& aMatchedControl);
       
    38 	IMPORT_C static void GetBorder(TGulBorder& aBorder, TInt aDrawState, TInt aFlags,const CCoeControl& aButtonBase,TBool aIsDefaultButton);
       
    39 	IMPORT_C static TInt ComponentOffset(TInt aDrawState, TInt aFlags);
       
    40 	IMPORT_C static void PrepareContext(CWindowGc& aGc,TInt aDrawState,
       
    41 									   const MLafEnv& aLafEnv,
       
    42 									   const CCoeControl& aButtonBase);
       
    43 	IMPORT_C static void Draw(const MLafEnv& aLafEnv, const CCoeControl& aMatchedControl,
       
    44 							 CWindowGc& aGc,
       
    45 							 const TGulBorder& aBorder,
       
    46 							 TInt aDrawOffset,TInt aDrawState,
       
    47 							 TMargins8 aGutters,
       
    48 							 TBool aIsDefaultButton);
       
    49 	IMPORT_C static void GetColorUseListL(CArrayFix<TCoeColorUse>& aColorUseList);
       
    50 public:
       
    51 	inline static TInt ImageMargin();
       
    52 	inline static TInt LabelMargin();
       
    53 	inline static TInt IntraComponentMargin();
       
    54 private:
       
    55 	enum TConstantType
       
    56 		{
       
    57 		EImageMargin,
       
    58 		ELabelMargin,
       
    59 		EIntraComponentMargin
       
    60 		};
       
    61 private:
       
    62 	IMPORT_C static TInt Constant(TConstantType aConstant);
       
    63 private:
       
    64 	static void DrawSelection(const TGulBorder& aBorder,const TRect& aRect,CWindowGc& aGc);
       
    65 	};
       
    66 
       
    67 /**
       
    68  * Returns the margin required on all sides of the command button base image
       
    69  *
       
    70  * @since App-Framework_6.1
       
    71  */
       
    72 inline TInt LafCommandButtonBase::ImageMargin()
       
    73 	{//static
       
    74 	return Constant(EImageMargin);	
       
    75 	}
       
    76 
       
    77 /**
       
    78  * Returns the margin required on all sides of the command button base label
       
    79  *
       
    80  * @since App-Framework_6.1
       
    81  */
       
    82 inline TInt LafCommandButtonBase::LabelMargin()
       
    83 	{//static
       
    84 	return Constant(ELabelMargin);	
       
    85 	}
       
    86 
       
    87 /**
       
    88  * Returns the margin required between the two components of a command button base
       
    89  *
       
    90  * @since App-Framework_6.1
       
    91  */
       
    92 inline TInt LafCommandButtonBase::IntraComponentMargin()
       
    93 	{//static
       
    94 	return Constant(EIntraComponentMargin);	
       
    95 	}
       
    96 
       
    97 /**
       
    98  * @internal
       
    99  * Do not use
       
   100  */
       
   101 class LafCommandButton
       
   102 	{
       
   103 public:
       
   104 	IMPORT_C static TMargins8 Margins();
       
   105 	};
       
   106 
       
   107 /**
       
   108  * @internal
       
   109  * Do not use
       
   110  */
       
   111 class LafInverterCommandButton
       
   112 	{
       
   113 public:
       
   114 	IMPORT_C static TMargins8 Margins();
       
   115 	};
       
   116 
       
   117 /**
       
   118  * @internal
       
   119  * Do not use
       
   120  */
       
   121 class LafBitmapButton
       
   122 	{
       
   123 public:
       
   124 	IMPORT_C static TMargins8 Margins();
       
   125 	};
       
   126 
       
   127 /**
       
   128  * @internal
       
   129  * Do not use
       
   130  */
       
   131 class LafTextButton
       
   132 	{
       
   133 public:
       
   134 	IMPORT_C static TMargins8 Margins();
       
   135 	};
       
   136 
       
   137 /**
       
   138  * @internal
       
   139  * Do not use
       
   140  */
       
   141 class LafTwoPictureCommandButton
       
   142 	{
       
   143 public:
       
   144 	IMPORT_C static void GetDefaultBorder(TGulBorder& aBorder);
       
   145 	IMPORT_C static TMargins8 Margins();
       
   146 	IMPORT_C static void GetBorderColors(TGulBorder::TColors& aBorderColors,const MLafEnv& aEnv,const CCoeControl& aMatchedControl);
       
   147 	};
       
   148 
       
   149 #endif