textinput/peninputcommonctrls/inc/peninputbasewindow/peninputbasewindowext.h
changeset 40 2cb9bae34d17
parent 31 f1bdd6b078d1
child 49 37f5d84451bd
equal deleted inserted replaced
31:f1bdd6b078d1 40:2cb9bae34d17
     1 /*
       
     2 * Copyright (c) 2002-2005 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:  CAknFepCtrlBaseWindowExt
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CAKNFEPCTRLBASEWINDOWEXT_H
       
    20 #define C_CAKNFEPCTRLBASEWINDOWEXT_H
       
    21 
       
    22 //  INCLUDES
       
    23 
       
    24 #include <peninputlayout.h>
       
    25 #include <peninputlayoutctrlgroup.h>
       
    26 #include "peninputcommonbutton.h"
       
    27 #include "peninputeventbutton.h"
       
    28 #include "peninputrepeatbutton.h"
       
    29 #include "peninputinputcontextfield.h"
       
    30 
       
    31 
       
    32 // FORWARD DECLARATIONS
       
    33 class CFepUiLayout;
       
    34 class CAknFepCtrlButton;
       
    35 class CAknFepCtrlRepeatButton;
       
    36 class CAknFepCtrlDragButton;
       
    37 class CPeninputLayoutInputmodelChoice;
       
    38 class CFepLayoutMultiLineIcf;
       
    39 /**
       
    40  *  Class definiton for base window
       
    41  *
       
    42  *  @lib fepcommonctrls.lib
       
    43  *  @since S60 v3.2
       
    44  */
       
    45 class CAknFepCtrlBaseWindowExt : public CControlGroup, public MEventObserver
       
    46     {    
       
    47 public:
       
    48     
       
    49     /**
       
    50      * destructor.
       
    51      *
       
    52      * @since S60 v3.2
       
    53      * @return None
       
    54      */
       
    55     IMPORT_C virtual ~CAknFepCtrlBaseWindowExt();
       
    56     
       
    57     /**
       
    58      * Resize 
       
    59      *
       
    60      * @since S60 v3.2
       
    61      * @param aLandscapeStyle Current screen is landscape or not
       
    62      * @return None
       
    63      */          
       
    64     virtual void SizeChanged(TBool aLandscapeStyle) = 0;
       
    65     
       
    66     /**
       
    67      * Close window
       
    68      *
       
    69      * @since S60 v3.2
       
    70      * @return None
       
    71      */          
       
    72     IMPORT_C void Close();
       
    73     
       
    74     /**
       
    75      * Enable or disable drag window
       
    76      *
       
    77      * @since S60 v3.2
       
    78      * @param aEnable ETrue to enable otherwise disable drag
       
    79      * @return None
       
    80      */          
       
    81     IMPORT_C void SetDragEnable(TBool aEnable);
       
    82 
       
    83     /**
       
    84      * Get the control by control id
       
    85      *
       
    86      * @since S60 v3.2
       
    87      * @param aCtrlId The control id
       
    88      * @return Pointer to the control found;otherwise NULL
       
    89      */          
       
    90     IMPORT_C CFepUiBaseCtrl* Control(TInt aCtrlId);
       
    91     
       
    92 // from base class MEventObserver
       
    93 
       
    94     /**
       
    95      * From MEventObserver.
       
    96      * Handle the observer event
       
    97      *
       
    98      * @since S60 v3.2
       
    99      * @param aEventType Event type
       
   100      * @param aCtrl Sender control
       
   101      * @param aEventData Event data
       
   102      */
       
   103     IMPORT_C void HandleControlEvent(TInt aEventType, CFepUiBaseCtrl* aCtrl, 
       
   104                                      const TDesC& aEventData);
       
   105     
       
   106 // from base class CControlGroup
       
   107 
       
   108     /**
       
   109      * From CControlGroup.
       
   110      * Draw window
       
   111      *
       
   112      * @since S60 v3.2
       
   113      * @return None
       
   114      */
       
   115     IMPORT_C void Draw();
       
   116     
       
   117 protected:
       
   118 
       
   119     /**
       
   120      * C++ default constructor
       
   121      *
       
   122      * @since S60 v3.2
       
   123      * @param aFepUiLayout A Ui Layout environment (CFepUiLayout)
       
   124      * @param aControlId Control id
       
   125      */          
       
   126     IMPORT_C CAknFepCtrlBaseWindowExt( CFepUiLayout* aFepUiLayout, 
       
   127                                        TInt aControlId); 
       
   128     
       
   129     /**
       
   130      * Symbian second-phase constructor
       
   131      *
       
   132      * @since S60 v3.2
       
   133      * @return None
       
   134      */          
       
   135     IMPORT_C void BaseConstructL();
       
   136 
       
   137     /**
       
   138      * call back function when closing window
       
   139      *
       
   140      * @since S60 v3.2
       
   141      * @return ETrue for allowing close window; otherwise EFalse
       
   142      */          
       
   143     IMPORT_C virtual TBool DoClose();
       
   144     
       
   145     IMPORT_C void ConstructFromResourceL();
       
   146 
       
   147     IMPORT_C virtual void CreateBaseWindowControlsL( TInt16 aControlId, TInt32 aImageId ); 
       
   148     
       
   149     virtual TBool CreateCustomControlL( TInt16 aControlId, TInt32 aImageId );
       
   150     
       
   151     virtual void AddCustomControlGroupL(CFepUiBaseCtrl* aCtrl);
       
   152         
       
   153 private:
       
   154 
       
   155     void ReadIcfInfoL(TResourceReader aResReader,
       
   156                      CFepInputContextField* icf);
       
   157     void ReadMultiLineIcfInforL( TResourceReader aResReader,
       
   158                                 CFepLayoutMultiLineIcf* icf  );
       
   159     
       
   160     void ReadShadowInfoL( TInt aResId );
       
   161 
       
   162     inline CAknFepCtrlCommonButton* CloseButton() const;
       
   163     
       
   164     inline void SetCloseButton(CAknFepCtrlCommonButton* aCloseBtn);
       
   165     
       
   166     void ReadBackgroundInfoL( TInt aResId );
       
   167 private:// data
       
   168   
       
   169     /**
       
   170      * The close button (Own)
       
   171      */
       
   172     CAknFepCtrlCommonButton* iCloseButton;
       
   173 
       
   174     TBool iFirstTimeConstruct;
       
   175         
       
   176     CCoeEnv* iCoeEnv;
       
   177 
       
   178     };
       
   179 
       
   180 #include "peninputbasewindowext.inl"
       
   181     
       
   182 #endif // C_CAKNFEPCTRLBASEWINDOWEXT_H
       
   183 
       
   184 // End Of File