javauis/lcdui_akn/lcdui/inc/CMIDTextEditorEdwin.h
branchRCL_3
changeset 25 9ac0a0a7da70
parent 19 04becd199f91
child 46 4376525cdefb
equal deleted inserted replaced
24:0fd27995241b 25:9ac0a0a7da70
    19 #ifndef CMIDTEXTEDITOREDWIN_H
    19 #ifndef CMIDTEXTEDITOREDWIN_H
    20 #define CMIDTEXTEDITOREDWIN_H
    20 #define CMIDTEXTEDITOREDWIN_H
    21 
    21 
    22 // INTERNAL INCLUDES
    22 // INTERNAL INCLUDES
    23 #include "CMIDEdwinUtils.h"
    23 #include "CMIDEdwinUtils.h"
       
    24 #include <MMIDScalable.h>
    24 
    25 
    25 // EXTERNAL INCLUDES
    26 // EXTERNAL INCLUDES
    26 #include <eikedwin.h>
    27 #include <eikedwin.h>
    27 
    28 
    28 // FORWARD DECLARATIONS
    29 // FORWARD DECLARATIONS
    40  *
    41  *
    41  * Additinally, this class performs predefined initialization of the edwin.
    42  * Additinally, this class performs predefined initialization of the edwin.
    42  */
    43  */
    43 NONSHARABLE_CLASS(CMIDTextEditorEdwin) :
    44 NONSHARABLE_CLASS(CMIDTextEditorEdwin) :
    44         public CEikEdwin,
    45         public CEikEdwin,
    45         public MEikEdwinObserver
    46         public MEikEdwinObserver,
       
    47         public MMIDScalable
    46 {
    48 {
    47 public: // Constructors and destructor
    49 public: // Constructors and destructor
    48 
    50 
    49     /**
    51     /**
    50      * C++ constructor.
    52      * C++ constructor.
   474      * Note that this returns the clear text if password editor is used.
   476      * Note that this returns the clear text if password editor is used.
   475      * @return The content of the editor.
   477      * @return The content of the editor.
   476      * @since S60 5.0
   478      * @since S60 5.0
   477      */
   479      */
   478     const TPtrC Read() const;
   480     const TPtrC Read() const;
       
   481 
       
   482     /**
       
   483      * Sets current fullscreen canvas size.
       
   484      *
       
   485      * @param Current fullscreen canvas size.
       
   486       *
       
   487      * @since S60 5.0
       
   488      */
       
   489     inline void SetOnScreenCanvasRect(const TRect& aSize);
       
   490 
       
   491     /**
       
   492      * Gets current fullscreen canvas size.
       
   493      *
       
   494      * @return Current fullscreen canvas size.
       
   495       *
       
   496      * @since S60 5.0
       
   497      */
       
   498     inline TRect GetOnScreenCanvasRect() const;
       
   499 
       
   500     /**
       
   501      * Sets flag if scaling is on now.
       
   502      *
       
   503      * @param Flag if scaling is on now.
       
   504      *
       
   505      * @since S60 5.0
       
   506      */
       
   507     inline void SetScaling(TBool aScaling);
       
   508 
       
   509 public: // From MMIDScalable
       
   510     inline TBool IsScalingOn() const;
   479 
   511 
   480 protected: // New methods.
   512 protected: // New methods.
   481 
   513 
   482     /**
   514     /**
   483      * Handles special key events.
   515      * Handles special key events.
   557     CCoeControl* iParent;
   589     CCoeControl* iParent;
   558     // Direction of writing
   590     // Direction of writing
   559     TAknLayoutId iDirection;
   591     TAknLayoutId iDirection;
   560     // Visible content height used for sending scroll event
   592     // Visible content height used for sending scroll event
   561     TBool iVisibleContentHeight;
   593     TBool iVisibleContentHeight;
       
   594     // Canvas fullscreen size
       
   595     TRect iOnScreenCanvasRect;
       
   596     // Flag if scaling is on now.
       
   597     TBool iIsScalingOn;
   562 };
   598 };
   563 
   599 
   564 // ---------------------------------------------------------------------------
   600 // ---------------------------------------------------------------------------
   565 // CMIDTextEditorEdwin::IsConstraintSet
   601 // CMIDTextEditorEdwin::IsConstraintSet
   566 // (other items are commented in the header file)
   602 // (other items are commented in the header file)
   569 inline TBool CMIDTextEditorEdwin::IsConstraintSet(TUint aConstraint) const
   605 inline TBool CMIDTextEditorEdwin::IsConstraintSet(TUint aConstraint) const
   570 {
   606 {
   571     return (iConstraints & MMIDTextField::EConstraintMask) == aConstraint;
   607     return (iConstraints & MMIDTextField::EConstraintMask) == aConstraint;
   572 }
   608 }
   573 
   609 
       
   610 inline void CMIDTextEditorEdwin::SetOnScreenCanvasRect(const TRect& aRect)
       
   611 {
       
   612     iOnScreenCanvasRect = aRect;
       
   613 }
       
   614 
       
   615 inline TRect CMIDTextEditorEdwin::GetOnScreenCanvasRect() const
       
   616 {
       
   617     return iOnScreenCanvasRect;
       
   618 }
       
   619 
       
   620 inline TBool CMIDTextEditorEdwin::IsScalingOn() const
       
   621 {
       
   622     return iIsScalingOn;
       
   623 }
       
   624 
       
   625 inline void CMIDTextEditorEdwin::SetScaling(TBool aScaling)
       
   626 {
       
   627     iIsScalingOn = aScaling;
       
   628 }
       
   629 
   574 #endif // CMIDTEXTEDITOREDWIN_H
   630 #endif // CMIDTEXTEDITOREDWIN_H
   575 
   631 
   576 // End of file
   632 // End of file