gstreamer_test_apps/gstplayer/inc/RichTextEditor.h
branchRCL_3
changeset 29 567bb019e3e3
equal deleted inserted replaced
6:9b2c3c7a1a9c 29:567bb019e3e3
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
       
     3 *
       
     4 * This library is free software; you can redistribute it and/or
       
     5 * modify it under the terms of the GNU Lesser General Public
       
     6 * License as published by the Free Software Foundation; either
       
     7 * version 2 of the License, or (at your option) any later version.
       
     8 *
       
     9 * This library is distributed in the hope that it will be useful,
       
    10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    12 * Lesser General Public License for more details.
       
    13 *
       
    14 * You should have received a copy of the GNU Lesser General Public
       
    15 * License along with this library; if not, write to the
       
    16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
       
    17 * Boston, MA 02111-1307, USA.
       
    18 *
       
    19 * Description:
       
    20 *
       
    21 */
       
    22 /*
       
    23 * ============================================================================
       
    24 *  Name        : RichTextEditor.h
       
    25 *  Part of     : VoIP test application.
       
    26 *  Description : Utility printing formatted text to the display.
       
    27 *  Version     : %version: 1 %
       
    28 *
       
    29 * ============================================================================
       
    30 */
       
    31 
       
    32 #ifndef CRICHTEXTEDITOR_H
       
    33 #define CRICHTEXTEDITOR_H
       
    34 
       
    35 // INCLUDES
       
    36 #include <eikrted.h>  // CCEikRichTextEditor
       
    37 #include <txtfrmat.h> // TCharFormatMask
       
    38 #include <gdi.h>
       
    39 
       
    40 // CLASS DECLARATION
       
    41 
       
    42 /**
       
    43 *  CRichTextEditorRTE
       
    44 *  Editor that outputs formatted text to the display.
       
    45 */
       
    46 class CRichTextEditorRTE : public CEikRichTextEditor
       
    47     {
       
    48 public:
       
    49 
       
    50     /**
       
    51     * NewL()
       
    52     *
       
    53     * Create a CRichTextEditorRTE object, which will draw
       
    54     * itself to aRect
       
    55     */
       
    56     static CRichTextEditorRTE* NewL(const CCoeControl& aView);
       
    57 
       
    58     /**
       
    59     * NewLC()
       
    60     *
       
    61     */
       
    62     static CRichTextEditorRTE* NewLC(const CCoeControl& aView);
       
    63 
       
    64 
       
    65 public: // from CoeControl
       
    66 
       
    67     TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
       
    68 
       
    69 public: // members
       
    70 
       
    71     /**
       
    72     * AddCarriageReturnL ()
       
    73     *
       
    74     * discussion Add one carriage return
       
    75     *
       
    76     */
       
    77     void AddCarriageReturnL ();
       
    78 
       
    79     /**
       
    80     * AddTextL (const TDesC& aText)
       
    81     *
       
    82     * discussion Print text on the screen.
       
    83     * param aText text to be displayed
       
    84     *
       
    85     */
       
    86     void AddTextL (const TDesC& aText, TRgb aRgb = KRgbBlack);
       
    87 
       
    88 private: // Basic two-phase EPOC constructors
       
    89 
       
    90     void ConstructL(const CCoeControl& aView);
       
    91 
       
    92     /**
       
    93     * CRichTextEditorRTE()
       
    94     *
       
    95     * Default contructor.
       
    96     *
       
    97     */
       
    98     CRichTextEditorRTE();
       
    99 
       
   100 private: //data
       
   101 
       
   102     // formatting options for the RichText that will be displayed
       
   103     TCharFormatMask iCharacterFormatMask;
       
   104     TCharFormat iCharacterFormat;
       
   105     };
       
   106 
       
   107 #endif  // #ifndef CRICHTEXTEDITOR_H
       
   108 
       
   109 // End of file
       
   110