javauis/lcdui_akn/lcdui/inc/CMIDTextEditorEdwin.h
branchRCL_3
changeset 66 2455ef1f5bbc
equal deleted inserted replaced
65:ae942d28ec0e 66:2455ef1f5bbc
       
     1 /*
       
     2 * Copyright (c) 2009 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 * Defines a custom editor window for Text editor component.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CMIDTEXTEDITOREDWIN_H
       
    20 #define CMIDTEXTEDITOREDWIN_H
       
    21 
       
    22 // INTERNAL INCLUDES
       
    23 #include "CMIDEdwinUtils.h"
       
    24 #include "CMIDDisplayable.h"
       
    25 // Used for scaling
       
    26 #include <MMIDScalable.h>
       
    27 
       
    28 // EXTERNAL INCLUDES
       
    29 #include <eikedwin.h>
       
    30 #ifdef RD_JAVA_S60_RELEASE_9_2
       
    31 #include <coreuiavkonlcdui.h>
       
    32 #endif // RD_JAVA_S60_RELEASE_9_2
       
    33 
       
    34 // FORWARD DECLARATIONS
       
    35 class CMIDEditingStateIndicator;
       
    36 class MMIDTextEditorObserver;
       
    37 class CAknExtendedInputCapabilities;
       
    38 
       
    39 // CLASS DESCRIPTION
       
    40 /**
       
    41  * Defines a custom editor window for Text editor component.
       
    42  *
       
    43  * The edwin component is derived in order to catch key events before those
       
    44  * are delegated to the actual editor. This way the focus and unfocus
       
    45  * functionality can be implemented to Text editor component.
       
    46  *
       
    47  * Additinally, this class performs predefined initialization of the edwin.
       
    48  */
       
    49 NONSHARABLE_CLASS(CMIDTextEditorEdwin) :
       
    50         public CEikEdwin,
       
    51         public MEikEdwinObserver,
       
    52         public MMIDScalable
       
    53 {
       
    54 public: // Constructors and destructor
       
    55 
       
    56     /**
       
    57      * C++ constructor.
       
    58      *
       
    59      * @param aEdwinUtils A reference to editor window utils.
       
    60      */
       
    61     CMIDTextEditorEdwin(CMIDEdwinUtils& aEdwinUtils);
       
    62 
       
    63     /**
       
    64      * Destructor.
       
    65      */
       
    66     virtual ~CMIDTextEditorEdwin();
       
    67 
       
    68     /**
       
    69      * Handles Symbian 2nd phase construction.
       
    70      *
       
    71      * NOTE: This is similar to eikedwin in purpose.
       
    72      *
       
    73      * Completes construction of a new editor window, initialising its
       
    74      * heap-stored members from the supplied arguments.
       
    75      *
       
    76      * @param aEdwinFlags Bitwise ORed combination of flags from
       
    77      *        CEikEdwin::TFlags. Default value is 0.
       
    78      * @param aWidthInChars Specifies the width for the editor window,
       
    79      *        in characters or pixels: see the @c
       
    80      *        CEikEdwin::EWidthInPixels flag. Default value is 0.
       
    81      * @param aTextLimit Maximum length for the text to present as
       
    82      *        editable. Default value is 0.
       
    83      * @param aNumberOfLines Height for the editor window in lines.
       
    84      *        Default value is 0.
       
    85      */
       
    86     void ConstructL(
       
    87         TInt aEdwinFlags = 0,
       
    88         TInt aWidthInChars = 0,
       
    89         TInt aTextLimit = 0,
       
    90         TInt aNumberOfLines = 0);
       
    91 
       
    92 public: // From CCoeControl
       
    93 
       
    94     /**
       
    95      * Called when a key event is offered to this control.
       
    96      *
       
    97      * @param aKeyEvent The key event that occured.
       
    98      * @param aType The type of the event code.
       
    99      * @return Key response.
       
   100      * @since S60 5.0
       
   101      */
       
   102     TKeyResponse OfferKeyEventL(
       
   103         const TKeyEvent& aKeyEvent,
       
   104         TEventCode aType);
       
   105 
       
   106     /**
       
   107      * Indicates if traversal is needed
       
   108      *
       
   109      * Used when changing focus by key down and up.
       
   110      *
       
   111      * @param aEvent Key Event.
       
   112      * @return <code>ETrue</code> if the traverse is needed,
       
   113      *         <code>EFalse</code> otherwise.
       
   114      * @since S60 5.0
       
   115      */
       
   116     TBool Traverse(const TKeyEvent& aEvent);
       
   117 
       
   118     /**
       
   119      * Draws the background for this editor window and lets the base
       
   120      * class to draw on top of the background.
       
   121      *
       
   122      * @param aRect The rect to which to draw.
       
   123      * @since S60 5.0
       
   124      */
       
   125     void Draw(const TRect& aRect) const;
       
   126 
       
   127     /**
       
   128      * This method is called when the editor focus changes.
       
   129      *
       
   130      * @param aDrawNow Contains the value that was passed to it by
       
   131      *        <code>SetFocus()</code>.
       
   132      * @since S60 5.0
       
   133      */
       
   134     void FocusChanged(TDrawNow aDrawNow);
       
   135 
       
   136     /**
       
   137      * This method is called when the position of the editor changes.
       
   138      *
       
   139      * @since S60 5.0
       
   140      */
       
   141     void PositionChanged();
       
   142 
       
   143     /**
       
   144      * Used to override default colors.
       
   145      *
       
   146      * @see CCoeControl::OverrideColorL()
       
   147      *
       
   148      * @param aLogicalColor The logical colour. Indicates which part
       
   149      *        of a control the physical colour maps to. The set of logical
       
   150      *        colours for a standard application are defined in
       
   151      *        TLogicalColor.
       
   152      *
       
   153      * @param aColor The new physical colour to which the logical colour
       
   154      *        should be mapped.
       
   155      * @since S60 5.0
       
   156      */
       
   157     void OverrideColorL(TInt aLogicalColor, TRgb aColor);
       
   158 
       
   159 public: // From CEikEdwin
       
   160 
       
   161     /**
       
   162      * Creates the custom drawer for this editor window.
       
   163      *
       
   164      * Ownership is transferred to the caller.
       
   165      *
       
   166      * @return The custom drawer for this editor window.
       
   167      * @since S60 5.0
       
   168      */
       
   169     CLafEdwinCustomDrawBase* CreateCustomDrawL();
       
   170 
       
   171     /**
       
   172      * Gets an object whose type is encapsulated by the
       
   173      * specified <code>TTypeUid object</code>.
       
   174      *
       
   175      * @param aId Encapsulates the Uid that identifies the type
       
   176      *        of object required.
       
   177      * @return Encapsulates the pointer to the object provided.
       
   178      *         Note that the encapsulated pointer may be NULL.
       
   179      * @since S60 5.0
       
   180      */
       
   181     TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
       
   182 
       
   183     /**
       
   184      * Called when text is pasted to the editor.
       
   185      *
       
   186      * The default implementation in CEikEdwin does not currently
       
   187      * do anything. This method checks that the pasted content.
       
   188      * is valid for the given input constraints.
       
   189      *
       
   190      * @param aStartPos The start index of the pasted text.
       
   191      * @param aLength The length of the pasted text.
       
   192      * @since S60 5.0
       
   193      */
       
   194     void HandleTextPastedL(TInt aStartPos, TInt& aLength);
       
   195 
       
   196     /**
       
   197      * Resource change handling.
       
   198      *
       
   199      * @param aType Resource change type.
       
   200      * @since S60 5.0
       
   201      */
       
   202     void HandleResourceChange(TInt aType);
       
   203 
       
   204     /**
       
   205      * Handles external text changes.
       
   206      *
       
   207      * @since S60 5.0
       
   208      */
       
   209     void HandleTextChangedL();
       
   210 
       
   211 public: // From MEikEdwinObserver
       
   212 
       
   213     /**
       
   214      * This function is invoked by CEikEdwin to report an
       
   215      * event to its observer. The observer may respond appropriately.
       
   216      *
       
   217      * @param aEdwin The originating edwin.
       
   218      * @param aEventType The event being reported.
       
   219      * @since S60 5.0
       
   220      */
       
   221     void HandleEdwinEventL(CEikEdwin* aEdwin, TEdwinEvent aEventType);
       
   222 
       
   223     /**
       
   224      * Allows a control created for direct container content display to pass
       
   225      * on pointer events.
       
   226      *
       
   227      * @param  aPointerEvent The pointer event.
       
   228      * @since S60 5.0
       
   229      */
       
   230 #ifdef RD_SCALABLE_UI_V2
       
   231     void HandlePointerEventL(const TPointerEvent &aPointerEvent);
       
   232 #endif // RD_SCALABLE_UI_V2
       
   233 
       
   234 public: // New methods
       
   235 
       
   236 #ifdef RD_JAVA_S60_RELEASE_9_2
       
   237     /**
       
   238      * Gets StatusPane
       
   239      *
       
   240      * @return pointer to StatusPane.
       
   241      * @since S60 5.0
       
   242      */
       
   243     CEikStatusPane* GetStatusPane();
       
   244 
       
   245     /**
       
   246      * Handles lost focus.
       
   247      *
       
   248      * @since S60 5.0
       
   249      */
       
   250     void FocusLost();
       
   251 
       
   252     /**
       
   253      * Closes VKB if editor is loosing visibility, disposing etc.,
       
   254      *
       
   255      * @since S60 5.0
       
   256      */
       
   257     void CloseVKB();
       
   258 
       
   259     /**
       
   260      * Handles disabling of partial VKB.
       
   261      *
       
   262      * @since S60 5.0
       
   263      */
       
   264     void HandlePartialVKBDisable();
       
   265 
       
   266 #endif // RD_JAVA_S60_RELEASE_9_2
       
   267 
       
   268     /**
       
   269      * Handles Scrollbar change event sending.
       
   270      *
       
   271      * @return The scroll bar change event or 0 if it shouldn't be updated.
       
   272      *
       
   273      * @since S60 5.0
       
   274      */
       
   275     TInt ScrollBarEvent();
       
   276 
       
   277     /**
       
   278      * Sets the top parent of this control. Note that the ownership
       
   279      * is not transferred to this control.
       
   280      *
       
   281      * The top parent is used when the editor is set as transparent.
       
   282      * If transparency is enabled, the editor must issue redraw to the
       
   283      * parent also in order to correctly draw the transparent background.
       
   284      *
       
   285      * @param aControl The parent control for this control.
       
   286      * @since S60 5.0
       
   287      */
       
   288     void SetTopParent(CCoeControl* aControl);
       
   289 
       
   290     /**
       
   291      * Sets the observer for this text editor component.
       
   292      *
       
   293      * The observer is notified when an action is about to happen
       
   294      * in the text editor.
       
   295      *
       
   296      * The ownership of the object is not transferred to this component.
       
   297      *
       
   298      * @param aObserver The text editor observer or <code>NULL</code>
       
   299      *        if the observer should be removed.
       
   300      * @since S60 5.0
       
   301      */
       
   302     void SetObserver(MMIDTextEditorObserver* aObserver);
       
   303 
       
   304     /**
       
   305      * Sets MID editing state indicator for this editor window.
       
   306      *
       
   307      * The instance is supplied in <code>MopSupplyObject()</code> if set.
       
   308      *
       
   309      * @param aIndicator MID editing state indicator. The ownership of the
       
   310      *        object is not transferred to this class.
       
   311      * @since S60 5.0
       
   312      */
       
   313     void SetEditingStateIndicator(
       
   314         CMIDEditingStateIndicator* aIndicator);
       
   315 
       
   316     /**
       
   317      * Sets the initial input mode for this edwin.
       
   318      *
       
   319      * Note that the mode is applied when the next editing session
       
   320      * starts (i.e. editor gets focus). This method does not yet
       
   321      * perform any changes to the current input mode.
       
   322      *
       
   323      * @param aCharacterSubset The initial input mode for editing.
       
   324      * @since S60 5.0
       
   325      */
       
   326     void SetInitialInputModeL(const TDesC& aCharacterSubset);
       
   327 
       
   328     /**
       
   329      * Sets the constraints of this text editor. If the constraints are
       
   330      * not valid for the current content of the editor, the content is set
       
   331      * to empty.
       
   332      *
       
   333      * @param aConstraints The new set of constraints. Note that
       
   334      *        validation of the input must be done in the client side
       
   335      *        (i.e. in the Java side).
       
   336      * @since S60 5.0
       
   337      */
       
   338     void SetConstraintsL(TUint aConstraints);
       
   339 
       
   340     /**
       
   341      * Returns <code>true</code> if the current constraints mode contains
       
   342      * the specified constraint value.
       
   343      *
       
   344      * @param aConstraint The constraint to be checked.
       
   345      * @return <code>true</code> if current constraints mode accepts
       
   346      *         the specified constraint.
       
   347      * @since S60 5.0
       
   348      */
       
   349     inline TBool IsConstraintSet(TUint aConstraint) const;
       
   350 
       
   351     /**
       
   352      * Sets a new position for the cursor within this text editor.
       
   353      *
       
   354      * @param aIndex The new index for the cursor.
       
   355      * @param aSelect <code>ETrue</code> to extend the cursor’s selection
       
   356      *        to the new position. <code>EFalse</code> otherwise.
       
   357      * @since S60 5.0
       
   358      */
       
   359     void SetCursorPosL(
       
   360         TInt aCursorPosition,
       
   361         TBool aSelect);
       
   362 
       
   363     /**
       
   364      * Returns the current position of the cursor in the text editor.
       
   365      *
       
   366      * @return The current position of the cursor in the text editor.
       
   367      * @since S60 5.0
       
   368      */
       
   369     TInt CursorPos() const;
       
   370 
       
   371     /**
       
   372      * Gets the current cursor selection.
       
   373      *
       
   374      * @return The current cursor selection.
       
   375      * @since S60 5.0
       
   376      */
       
   377     TCursorSelection Selection();
       
   378 
       
   379     /**
       
   380      * Sets word wrapping on or off for this text editor.
       
   381      *
       
   382      * @param aWrapIsOn <code>ETrue</code> enables word wrapping,
       
   383      *        <code>EFalse</code> disables word wrapping.
       
   384      * @since S60 5.0
       
   385      */
       
   386     void SetWordWrapL(TBool aWrapIsOn);
       
   387 
       
   388     /**
       
   389      * Returns <code>ETrue</code> if wrap is enabled (i.e. the editor
       
   390      * is a multiline editor or <code>EFalse</code> if not.
       
   391      *
       
   392      * @return <code>ETrue</code> if wrap is enabled.
       
   393      * @since S60 5.0
       
   394      */
       
   395     TBool IsWrapEnabled() const;
       
   396 
       
   397     /**
       
   398      * Sets the size of this editor window.
       
   399      *
       
   400      * This method is overwritten due to problems setting size
       
   401      * of CEikEdwin before it has container window set.
       
   402      *
       
   403      * Note: calling this function may result in a call to SizeChanged().
       
   404      *
       
   405      * @param aWidth The width of the editor in pixels.
       
   406      * @param aHeight The height of the editor in pixels.
       
   407      * @since S60 5.0
       
   408      */
       
   409     void SetSize(TInt aWidth, TInt aHeight);
       
   410 
       
   411     /**
       
   412      * Returns the current size of this edwin.
       
   413      *
       
   414      * @return The current size of this edwin.
       
   415      * @since S60 5.0
       
   416      */
       
   417     TSize Size() const;
       
   418 
       
   419     /**
       
   420      * Restores the default input state of the editor window.
       
   421      *
       
   422      * Note that this sets all input related parameters to their
       
   423      * default values. After this, the editor input mode is in the
       
   424      * same state as it was when the editor was first constructed.
       
   425      *
       
   426      * @since S60 5.0
       
   427      */
       
   428     void RestoreDefaultInputState();
       
   429 
       
   430     /**
       
   431      * Checks whether this editor window is initialized or not.
       
   432      *
       
   433      * @return <code>true</code> if the editor window is fully activated
       
   434      *         and can be drawn. <code>false</code> otherwise.
       
   435      * @since S60 5.0
       
   436      */
       
   437     TBool IsInitialized() const;
       
   438 
       
   439     /**
       
   440      * Initializes this text editor edwin component.
       
   441      *
       
   442      * @param aDisplayable Parent displayable.
       
   443      * @since S60 5.0
       
   444      */
       
   445     void InitializeL(CMIDDisplayable* aDisplayable);
       
   446 
       
   447     /**
       
   448      * Uninitializes this text editor edwin component.
       
   449      *
       
   450      * @since S60 5.0
       
   451      */
       
   452     void Uninitialize();
       
   453 
       
   454     /**
       
   455      * Returns the calculated height for this text editor edwin component.
       
   456      *
       
   457      * @return The calculated height for this text editor edwin component.
       
   458      * @since S60 5.0
       
   459      */
       
   460     TInt EditorWindowHeight() const;
       
   461 
       
   462     /**
       
   463      * Returns the total number of lines in this text editor edwin
       
   464      * component.
       
   465      *
       
   466      * @return The total number of lines in this text editor edwin
       
   467      * component
       
   468      * @since S60 5.0
       
   469      */
       
   470     TInt NumberOfLines() const;
       
   471 
       
   472     /**
       
   473      * Returns the line height of this text editor edwin component.
       
   474      *
       
   475      * @return The line height of this text editor edwin component
       
   476      * @since S60 5.0
       
   477      */
       
   478     TInt LineHeight() const;
       
   479 
       
   480     /**
       
   481      * Returns the topmost pixel position of the topmost visible line in
       
   482      * the editor.
       
   483      *
       
   484      * The returned y coordinate value must be relative to the whole
       
   485      * content
       
   486      * height, not just the visible part.
       
   487      *
       
   488      * @return The topmost pixel position of the visible content.
       
   489      * @since S60 5.0
       
   490      */
       
   491     TInt VisibleContentPosition() const;
       
   492 
       
   493     /**
       
   494      * Returns <code>ETrue</code> if draw is ongoing at the moment.
       
   495      *
       
   496      * @return The drawing state of this control.
       
   497      * @since S60 5.0
       
   498      */
       
   499     TBool DrawOngoing() const;
       
   500 
       
   501     /**
       
   502      * Returns <code>ETrue</code> if this editor is using transparency.
       
   503      *
       
   504      * @return The transparency state of this control.
       
   505      * @since S60 5.0
       
   506      */
       
   507     TBool IsTransparent() const;
       
   508 
       
   509     /**
       
   510      * Redraws the editor's content correctly.
       
   511      *
       
   512      * Note that this method must be used to redraw the editor correctly
       
   513      * in situations that the background color is transparent.
       
   514      *
       
   515      * @since S60 5.0
       
   516      */
       
   517     void Redraw() const;
       
   518 
       
   519     /**
       
   520      * Returns the current content of the editor in a constant
       
   521      * descriptor pointer.
       
   522      *
       
   523      * Note that this returns the clear text if password editor is used.
       
   524      * @return The content of the editor.
       
   525      * @since S60 5.0
       
   526      */
       
   527     const TPtrC Read() const;
       
   528 
       
   529     /**
       
   530      * Sets current fullscreen canvas size.
       
   531      *
       
   532      * @param Current fullscreen canvas size.
       
   533       *
       
   534      * @since S60 5.0
       
   535      */
       
   536     inline void SetOnScreenCanvasRect(const TRect& aSize);
       
   537 
       
   538     /**
       
   539      * Gets current fullscreen canvas size.
       
   540      *
       
   541      * @return Current fullscreen canvas size.
       
   542       *
       
   543      * @since S60 5.0
       
   544      */
       
   545     inline TRect GetOnScreenCanvasRect() const;
       
   546 
       
   547     /**
       
   548      * Sets flag if scaling is on now.
       
   549      *
       
   550      * @param Flag if scaling is on now.
       
   551      *
       
   552      * @since S60 5.0
       
   553      */
       
   554     inline void SetScaling(TBool aScaling);
       
   555 
       
   556 public: // From MMIDScalable
       
   557     inline TBool IsScalingOn() const;
       
   558 
       
   559 protected: // New methods.
       
   560 
       
   561     /**
       
   562      * Handles special key events.
       
   563      *
       
   564      * @param aKeyEvent The key event that occured.
       
   565      * @param aType The type of the event code.
       
   566      * @return Key response.
       
   567      * @since S60 5.0
       
   568      */
       
   569     TKeyResponse HandleSpecialKeyEventsL(
       
   570         const TKeyEvent& aKeyEvent, TEventCode aType);
       
   571 
       
   572 private: // New methods
       
   573 
       
   574     /**
       
   575      * Sets the Edwin’s editable content.
       
   576      *
       
   577      * @param aText New value for the content.
       
   578      * @since S60 5.0
       
   579      */
       
   580     void SetDocumentContentL(CGlobalText* aText);
       
   581 
       
   582     /**
       
   583      * Retuns the pointer to the Avkon input capabilities.
       
   584      *
       
   585      * The ownership of the object is not transferred to the caller.
       
   586      * @return Avkon input capabilities.
       
   587      * @since S60 5.0
       
   588      */
       
   589     CAknExtendedInputCapabilities* AknInputCaps() const;
       
   590 
       
   591     /**
       
   592      * Removes invalid numeric content from the current content.
       
   593      *
       
   594      * Note that this method must only be called for numeric and decimal
       
   595      * editors.
       
   596      *
       
   597      * @return <code>ETrue</code> if some content was removed and
       
   598      *         <code>EFalse</code> if not.
       
   599      * @since S60 5.0
       
   600      */
       
   601     TBool RemoveInvalidNumericContentL();
       
   602 
       
   603 private: // Data
       
   604 
       
   605     // The current position of the cursor.
       
   606     TInt iCursorPosition;
       
   607     // Current set of constraints.
       
   608     TUint iConstraints;
       
   609     // Stores the initialization status of this text editor.
       
   610     TBool iInitialized;
       
   611     // Stores the multiline status of this text editor.
       
   612     TBool iMultiline;
       
   613     // Part of transparency workaround. Drawing state.
       
   614     mutable TBool iDrawInvoked;
       
   615     // Current background color.
       
   616     TRgb iBackgroundColor;
       
   617     // Current content selection.
       
   618     TCursorSelection iSelection;
       
   619     // The size of the editor before initialization.
       
   620     TSize iSize;
       
   621     // Workaround for cursor event.
       
   622     TInt iCursorPosForAction;
       
   623     // Initial input mode current case. Set when editor gets focus.
       
   624     TInt iInitialCurrentCase;
       
   625     // Initial input mode. Set when editor gets focus.
       
   626     TInt iInitialCurrentInputMode;
       
   627     // Initial input mode current language. Set when editor gets focus.
       
   628     TLanguage iInitialCurrentLanguage;
       
   629     // Editor window utils. Used.
       
   630     CMIDEdwinUtils& iEdwinUtils;
       
   631     // MID Editing state indicator. Not owned.
       
   632     CMIDEditingStateIndicator* iIndicator;
       
   633     // Text editor observer. Not owned.
       
   634     MMIDTextEditorObserver* iObserver;
       
   635     // The top parent of this control. Not owned.
       
   636     CCoeControl* iParent;
       
   637     // Direction of writing
       
   638     TAknLayoutId iDirection;
       
   639     // Visible content height used for sending scroll event
       
   640     TInt iVisibleContentHeight;
       
   641 #ifdef RD_JAVA_S60_RELEASE_9_2
       
   642     // Indicates state of partial VKB
       
   643     TBool iPartialVKBOpen;
       
   644     // Used for Statuspane visibility
       
   645     CAknAppUi* iJavaAppUi;
       
   646     /**
       
   647      * Displayable.
       
   648      * Not own.
       
   649      */
       
   650     CMIDDisplayable* iDisplayable;
       
   651 #endif // RD_JAVA_S60_RELEASE_9_2
       
   652     // Canvas fullscreen size
       
   653     TRect iOnScreenCanvasRect;
       
   654     // Flag if scaling is on now.
       
   655     TBool iIsScalingOn;
       
   656 };
       
   657 
       
   658 // ---------------------------------------------------------------------------
       
   659 // CMIDTextEditorEdwin::IsConstraintSet
       
   660 // (other items are commented in the header file)
       
   661 // ---------------------------------------------------------------------------
       
   662 //
       
   663 inline TBool CMIDTextEditorEdwin::IsConstraintSet(TUint aConstraint) const
       
   664 {
       
   665     return (iConstraints & MMIDTextField::EConstraintMask) == aConstraint;
       
   666 }
       
   667 
       
   668 inline void CMIDTextEditorEdwin::SetOnScreenCanvasRect(const TRect& aRect)
       
   669 {
       
   670     iOnScreenCanvasRect = aRect;
       
   671 }
       
   672 
       
   673 inline TRect CMIDTextEditorEdwin::GetOnScreenCanvasRect() const
       
   674 {
       
   675     return iOnScreenCanvasRect;
       
   676 }
       
   677 
       
   678 inline TBool CMIDTextEditorEdwin::IsScalingOn() const
       
   679 {
       
   680     return iIsScalingOn;
       
   681 }
       
   682 
       
   683 inline void CMIDTextEditorEdwin::SetScaling(TBool aScaling)
       
   684 {
       
   685     iIsScalingOn = aScaling;
       
   686 }
       
   687 
       
   688 #endif // CMIDTEXTEDITOREDWIN_H
       
   689 
       
   690 // End of file