uifw/uiklaf/inc/laflbbut.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 __LAFLBBUT_H__
       
    20 #define __LAFLBBUT_H__
       
    21 
       
    22 #include <e32std.h>
       
    23 #include <lafpublc.h>
       
    24 #include <gulalign.h>
       
    25 
       
    26 /**
       
    27  * @internal
       
    28  * Do not use
       
    29  */
       
    30 class LafLabeledButton
       
    31 	{
       
    32 public:
       
    33 	IMPORT_C static TBool ShowHotKey();
       
    34 	IMPORT_C static TInt InputCapabilities();
       
    35 	IMPORT_C static TGulAlignmentValue LabelAlignment();
       
    36 	inline static TInt MinimumButtonHeight();
       
    37 	inline static TInt HorizontalLabelMargin();
       
    38 	inline static TInt VerticalLabelMargin();
       
    39 	inline static TInt MaxLabelTextLengthInChars();
       
    40 private:
       
    41 	enum TConstantType
       
    42 		{
       
    43 		EMinimumButtonHeight,
       
    44 		EHorizontalLabelMargin,
       
    45 		EVerticalLabelMargin,
       
    46 		EMaxLabelTextLengthInChars
       
    47 		};
       
    48 private:
       
    49 	IMPORT_C static TInt Constant(TConstantType aConstant);
       
    50 	};
       
    51 
       
    52 /**
       
    53  * Returns the minimum height which a labeled button can have.
       
    54  *
       
    55  * @since App-Framework_6.1
       
    56  */
       
    57 inline TInt LafLabeledButton::MinimumButtonHeight()
       
    58 	{
       
    59 	return Constant(EMinimumButtonHeight);
       
    60 	}
       
    61 
       
    62 /**
       
    63  * Returns the value of the horizontal label margin.
       
    64  * This is divided appropriately between the left and right sides of
       
    65  * the label in the labeled button, depending on its alignment setting.
       
    66  *
       
    67  * @since App-Framework_6.1
       
    68  */
       
    69 inline TInt LafLabeledButton::HorizontalLabelMargin()
       
    70 	{
       
    71 	return Constant(EHorizontalLabelMargin);
       
    72 	}
       
    73 
       
    74 /**
       
    75  * Returns the value of the horizontal label margin.
       
    76  * This is divided appropriately between the top and bottom sides of
       
    77  * the label in the labeled button, depending on its alignment setting.
       
    78  *
       
    79  * @since App-Framework_6.1
       
    80  */
       
    81 inline TInt LafLabeledButton::VerticalLabelMargin()
       
    82 	{
       
    83 	return Constant(EVerticalLabelMargin);
       
    84 	}
       
    85 
       
    86 /**
       
    87  * Returns the value of the maximum number of text characters for the
       
    88  * label in the button.  If any constructed label exceeds this length,
       
    89  * then the code will panic deliberatly.
       
    90  *
       
    91  * @since App-Framework_6.1
       
    92  */
       
    93 inline TInt LafLabeledButton::MaxLabelTextLengthInChars()
       
    94 	{
       
    95 	return Constant(EMaxLabelTextLengthInChars);
       
    96 	}
       
    97 
       
    98 #endif // __LAFLBBUT_H__