idlehomescreen/inc/xntexteditor.h
changeset 0 f72a12da539e
child 9 f966699dea19
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     1 /*
       
     2 * Copyright (c) 2005-2006 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:  Implementation wrapper for CEikEdwin
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef _XNTEXTEDITOR_H
       
    19 #define _XNTEXTEDITOR_H
       
    20 
       
    21 //  INCLUDES
       
    22 #include "xncomponent.h"
       
    23 #include <e32base.h>
       
    24 #include "xnnode.h"
       
    25 #include "mxncomponentinterface.h"
       
    26 
       
    27 
       
    28 // CLASS DECLARATION
       
    29 
       
    30 namespace XnTextEditorInterface
       
    31     {
       
    32     _LIT8( KType, "texteditor" );
       
    33 
       
    34     class MXnTextEditorInterface : public XnComponentInterface::MXnComponentInterface
       
    35         {
       
    36         public:
       
    37         		
       
    38             static inline const TDesC8& Type()
       
    39                 {
       
    40                 return KType;
       
    41                 }
       
    42 		
       
    43         public: // New functions
       
    44 
       
    45         /**
       
    46          * Sets the new text to the underlying CEikEdvin
       
    47          * @param aText The new content
       
    48          */
       
    49         virtual void SetTextL(const TDesC& aText) = 0;
       
    50         
       
    51         /**
       
    52          * Returns the text contained in the underlying CEikEdvin
       
    53          * @return HBufC* The text
       
    54          */
       
    55         virtual const HBufC* Text() = 0;
       
    56 
       
    57         private:
       
    58         };
       
    59     }   
       
    60 
       
    61 /**
       
    62 *  @ingroup group_xntexteditorfactory
       
    63 *  @lib xntexteditorfactory.lib
       
    64 *  @since S60
       
    65 */
       
    66 class CXnTextEditor : public CXnComponent, public XnTextEditorInterface::MXnTextEditorInterface
       
    67     {
       
    68 public:
       
    69 
       
    70 	/**
       
    71 	 * 2 phase construction.
       
    72 	 */
       
    73 	static CXnTextEditor* NewL();
       
    74 
       
    75 	/**
       
    76 	 * Destructor.
       
    77 	 */
       
    78 	virtual ~CXnTextEditor();
       
    79 
       
    80 public: // New functions
       
    81 
       
    82     /**
       
    83      * Sets the new content to the underlying CEikEdvin
       
    84      * @param aText The new content
       
    85      */
       
    86     void SetTextL(const TDesC& aText);
       
    87     
       
    88     /**
       
    89      * Returns the text contained in the underlying CEikEdvin
       
    90      * @return HBufC* The text
       
    91      */
       
    92     const HBufC* Text();
       
    93 
       
    94 public: // from CCoeControl
       
    95 
       
    96    	/**
       
    97      * Create a component interface according to the given type.
       
    98      * @param aType Type of the interface to create
       
    99      * @return Created interface or NULL if the provided type is not supported.
       
   100      */ 
       
   101     virtual XnComponentInterface::MXnComponentInterface* MakeInterfaceL( const TDesC8& aType );        
       
   102             
       
   103 private:
       
   104 
       
   105 	CXnTextEditor();
       
   106 	void ConstructL();
       
   107     };
       
   108 
       
   109 #endif      // _XNTEXTEDITOR_H
       
   110             
       
   111 // End of File