textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputinputcontextfield.h
changeset 0 eb1f2e154e89
equal deleted inserted replaced
-1:000000000000 0:eb1f2e154e89
       
     1 /*
       
     2 * Copyright (c) 2005-2007 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:  header file of input context field
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CFEPINPUTCONTECTFIELD_H
       
    20 #define C_CFEPINPUTCONTECTFIELD_H
       
    21 
       
    22 #include <peninputlayouteditareabase.h>
       
    23 
       
    24 /**
       
    25  * CFepInputContextField
       
    26  *
       
    27  * Class for Edwin-like editing area
       
    28  *
       
    29  * @lib feplayoutcontrol.lib
       
    30  * @since S60 V4.0
       
    31  */
       
    32 class CFepInputContextField : public CFepLayoutEditAreaBase
       
    33     {
       
    34 public:  // Method
       
    35 
       
    36     // Constructors and destructor
       
    37     /**
       
    38      * Static constructor.
       
    39      *
       
    40      * @since S60 V4.0
       
    41      * @param aRect Control area
       
    42      * @param aUiLayout The layout which contains this control
       
    43      * @param aControlId The control Id
       
    44      * @return An instance of CFepInputContextField
       
    45      */
       
    46     IMPORT_C static CFepInputContextField* NewL(TRect aRect, CFepUiLayout* aUiLayout,
       
    47                                                 TInt aControlId);
       
    48     
       
    49     /**
       
    50      * Destructor.
       
    51      *
       
    52      * @since S60 V4.0
       
    53      */
       
    54     IMPORT_C virtual ~CFepInputContextField();
       
    55 
       
    56     /**
       
    57      * Get the editor max length. 
       
    58      * This is the max char length which this editor can holds
       
    59      *
       
    60      * @since S60 V4.0
       
    61      * @return The editor max length
       
    62      */
       
    63     TInt GetInputContextFieldMaxLen();
       
    64    
       
    65     /**
       
    66      * Sets the text to the editor
       
    67      *
       
    68      * @since S60 V4.0
       
    69      * @param aEditTextLen The total length for the text in application editor.
       
    70      *		  This editor area must know it to parse the text
       
    71      * @param aTextStartPos The start position where the text is selected.
       
    72      * @param aCursorSel Current cursor selection
       
    73      * @param aText The text to be set in fep ui
       
    74      */
       
    75     IMPORT_C void SetTextL(const TFepInputContextFieldData& aData);
       
    76 
       
    77 protected:  // Methods
       
    78     /**
       
    79      * C++ default constructor.
       
    80      *
       
    81      * @since S60 V4.0
       
    82      * @param aRect The control area
       
    83      * @param aUiLayout The layout which contains this control
       
    84      * @param aControlId control Id
       
    85      */
       
    86     IMPORT_C CFepInputContextField(TRect aRect,CFepUiLayout* aUiLayout,TInt aControlId);
       
    87 
       
    88     /**
       
    89      * 2nd phase constructor.
       
    90      *
       
    91      * @since S60 V4.0 
       
    92      */
       
    93     IMPORT_C void ConstructL();                                                     
       
    94 
       
    95     /**
       
    96      * From CFepUiBaseCtrl
       
    97      * Handle pointer up event
       
    98      *
       
    99      * @since S60 v4.0
       
   100      * @param aPoint The point position relative the layout
       
   101      * @return The control which handles the event.     
       
   102      */                  
       
   103     IMPORT_C CFepUiBaseCtrl* HandlePointerUpEventL(const TPoint& aPoint);
       
   104     
       
   105     /**
       
   106      * From CFepUiBaseCtrl
       
   107      * Handle pointer down event
       
   108      *
       
   109      * @since S60 v4.0
       
   110      * @param aPoint The point position relative the layout
       
   111      * @return The control which handles the event.     
       
   112      */                  
       
   113     IMPORT_C CFepUiBaseCtrl* HandlePointerDownEventL(const TPoint& aPoint);
       
   114     
       
   115     /**
       
   116      * From CFepLayoutEditAreaBase
       
   117      * Update content when scrolling
       
   118      *
       
   119      * @since S60 v4.0
       
   120      * @param aCursorSel The selection info
       
   121      * @return None
       
   122      */                  
       
   123     IMPORT_C void UpdateContent(const TCursorSelection& aCursorSel);
       
   124 
       
   125 private: //data
       
   126     
       
   127     /**
       
   128      * Last insert pointer position on window to judge move direction
       
   129      */                  
       
   130     TPoint iLastInsertPos;
       
   131     
       
   132     /**
       
   133      * Reserved item1
       
   134      */
       
   135      TInt iReserved1;
       
   136      
       
   137     /**
       
   138      * Reserved item2
       
   139      */
       
   140      TInt iReserved2;    
       
   141     };
       
   142 #endif      // C_CFEPINPUTCONTECTFIELD_H              
       
   143 // End of File