uifw/uiklaf/inc/laflbx.h
changeset 0 2f259fa3e83a
child 4 8ca85d2f0db7
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 __LAFLBX_H__
       
    20 #define __LAFLBX_H__
       
    21 
       
    22 
       
    23 #include <e32std.h>
       
    24 #include <w32std.h>
       
    25 #include <gulutil.h>
       
    26 #include <gulbordr.h>
       
    27 
       
    28 #include "lafsbfrm.h"
       
    29 
       
    30 //
       
    31 // Forward declarations
       
    32 //
       
    33 
       
    34 class CCoeControl;
       
    35 class CWindowGc;
       
    36 class MLafEnv;
       
    37 
       
    38 /* value for LafListBox::MaxCellWidthInNumOfPixels
       
    39 to test against which will define whether the laf
       
    40 value for the maximum cell width is zero or not */
       
    41 const TInt KLafListBoxNoMaxCellWidth = 0;
       
    42 
       
    43 /* value for LafListBox::MaxHeightInNumOfItems
       
    44 to test against which will define whether the laf
       
    45 value for the maximum cell width is zero or not */
       
    46 const TInt KLafListBoxNoMaxHeightInNumOfItems = 0;
       
    47 
       
    48 /* value which decides whether the list box should use
       
    49 the single value of 'iHorizontalMargin' provided by uikon
       
    50 or the two values of left and right margins as defined by
       
    51 this list box laf.  Should be kept at -1 for safety */
       
    52 const TInt KLafListboxUseLafHorizMargins = -1;
       
    53 
       
    54 /* value which decides whether the list box should use
       
    55 the single value of 'iHorizontalMargin' provided by uikon
       
    56 or the two values of left and right margins as defined by
       
    57 this list box laf.  Should be kept at -1 for safety*/
       
    58 const TInt KLafListboxUseLafVertMargins = -1;
       
    59 
       
    60 
       
    61 /**
       
    62  * @internal
       
    63  * Do not use
       
    64  */
       
    65 class LafListBox
       
    66 	{
       
    67 public:
       
    68     inline static TInt BackgroundColor();
       
    69     inline static TInt ItemVGap();
       
    70     inline static TInt PointerRepeatInterval();
       
    71 	IMPORT_C static TBool FadeBehind();
       
    72 	IMPORT_C static void GetDefaultBorder(TGulBorder& aBorder);
       
    73 	IMPORT_C static void GetBorderColors(TGulBorder::TColors& aBorderColors, const MLafEnv& aLafEnv, const CCoeControl& aMatchedControl);
       
    74 	IMPORT_C static void GetDefaultPopoutBorder(TGulBorder& aBorder);
       
    75 	IMPORT_C static void GetPopoutBorderColors(TGulBorder::TColors& aBorderColors, const MLafEnv& aLafEnv, const CCoeControl& aMatchedControl);
       
    76 	IMPORT_C static TMargins8 Margins();
       
    77 	inline static TInt MaxHeightInNumOfItems();
       
    78 	inline static TInt MaxCellWidthInNumOfPixels();
       
    79 	inline static TInt InnerGutter();
       
    80 	inline static TInt InterItemVGap();
       
    81 	IMPORT_C static void GetDefaultScrollBarAttributes(TInt aOrientation, LafScrollBarFrame::TScrollBarAttributes& aAttributes);
       
    82 	IMPORT_C static TInt DefaultScrollBarFlags(TInt aOrientation);
       
    83 	IMPORT_C static TInt InputCapabilities(TInt aFlags);
       
    84 	IMPORT_C static void GetColorUseListL(CArrayFix<TCoeColorUse>& aColorUseList);
       
    85 	IMPORT_C static TUint MapKeyCode(const TKeyEvent& aKeyEvent,TEventCode aType);
       
    86 private:
       
    87     enum TConstantType
       
    88         {
       
    89         EBackgroundColor,
       
    90         EItemVGap,
       
    91         EPointerRepeatInterval,
       
    92 		EMaxHeightInNumOfItems,
       
    93 		EMaxCellWidthInNumOfPixels,
       
    94 		EInnerGutter,
       
    95 		EInterItemVGap
       
    96         };
       
    97 private:
       
    98     IMPORT_C static TInt Constant(TConstantType aType);
       
    99 	};
       
   100 
       
   101 
       
   102 //
       
   103 // Inlines
       
   104 //
       
   105 
       
   106 inline TInt LafListBox::BackgroundColor()
       
   107     {return Constant(EBackgroundColor);}
       
   108 inline TInt LafListBox::ItemVGap()
       
   109     {return Constant(EItemVGap);}
       
   110 inline TInt LafListBox::PointerRepeatInterval()
       
   111     {return Constant(EPointerRepeatInterval);}
       
   112 inline TInt LafListBox::MaxHeightInNumOfItems()
       
   113 	{return Constant(EMaxHeightInNumOfItems);}
       
   114 inline TInt LafListBox::MaxCellWidthInNumOfPixels()
       
   115 	{return Constant(EMaxCellWidthInNumOfPixels);}
       
   116 inline TInt LafListBox::InnerGutter()
       
   117 	{return Constant(EInnerGutter);}
       
   118 inline TInt LafListBox::InterItemVGap()
       
   119 	{return Constant(EInterItemVGap);}
       
   120 
       
   121 #endif //__LAFLBX_H__