1.1 --- a/epoc32/include/fepitfr.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,100 +0,0 @@
1.4 -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 -// All rights reserved.
1.6 -// This component and the accompanying materials are made available
1.7 -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.8 -// which accompanies this distribution, and is available
1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 -//
1.11 -// Initial Contributors:
1.12 -// Nokia Corporation - initial contribution.
1.13 -//
1.14 -// Contributors:
1.15 -//
1.16 -// Description:
1.17 -// the class for inline-text format retrieval - in its own header file to prevent low-level
1.18 -// components dependent on this class from gaining unnecessary (and undesirable) dependencies
1.19 -// on high-level components
1.20 -//
1.21 -//
1.22 -
1.23 -#ifndef __FEPITFR_H__
1.24 -#define __FEPITFR_H__
1.25 -
1.26 -#include <e32std.h>
1.27 -
1.28 -class TCharFormat;
1.29 -
1.30 -
1.31 -/** Specifies the mixin protocol for finding out the formatting to apply to inline
1.32 -text.
1.33 -
1.34 -This class should be overridden by front end processors which support inline editing.
1.35 -
1.36 -An instance of a class which implements this protocol should be passed to
1.37 -MCoeFepAwareTextEditor::StartFepInlineEditL().
1.38 -
1.39 -@publishedAll
1.40 -@released */
1.41 -class MFepInlineTextFormatRetriever // to be overridden by inline-editing front-end processors
1.42 - {
1.43 -public:
1.44 - /** Gets the character formatting to apply to the inline text.
1.45 -
1.46 - This function may be used to differentiate the formatting of the inline text
1.47 - from the surrounding text. The first parameter should be set to contain the
1.48 - character formatting values to use.
1.49 -
1.50 - MCoeFepAwareTextEditor provides a member function for finding out the character
1.51 - formatting of the surrounding text - GetFormatForFep(). This can be called
1.52 - inside the implementation of this function to make any necessary adjustments
1.53 - to the format of the inline text to ensure that it is different from the surrounding
1.54 - text.
1.55 -
1.56 - The second and third parameters enable different parts of the inline text
1.57 - to have different formatting.
1.58 -
1.59 - All implementations of this function need to set the aNumberOfCharactersWithSameFormat
1.60 - parameter. If all of the inline text uses the same formatting then aNumberOfCharactersWithSameFormat
1.61 - should be set to the length of the inline text and the aPositionOfCharacter
1.62 - parameter can be ignored.
1.63 -
1.64 - When the inline text does not all use the same formatting, the second parameter
1.65 - should be set to the number of characters starting at aPositionOfCharacter
1.66 - which have the same formatting: see the following example.
1.67 -
1.68 - Example
1.69 -
1.70 - If the inline text is 7 characters long, the first 4 characters are in format
1.71 - A, the next 2 characters are in format B, and the remaining character is in
1.72 - format C.
1.73 -
1.74 - When the FEP framework (which knows that the inline text is 7 characters long)
1.75 - needs to find out the format of the inline text, it calls GetFormatOfFepInlineText()
1.76 - passing zero into aPositionOfCharacter (to signify the start of the inline
1.77 - text).
1.78 -
1.79 - As the first 4 characters are all in format A, the function should set aFormat
1.80 - to A and it should set aNumberOfCharactersWithSameFormat to 4. As the FEP
1.81 - framework has only been told the format of the first 4 characters, it calls
1.82 - GetFormatOfFepInlineText() again passing 4 into aPositionOfCharacter. As the
1.83 - 2 characters starting at position 4 are all in format B, the function should
1.84 - set aFormat to B and it should set aNumberOfCharactersWithSameFormat to 2.
1.85 - The FEP framework still does not know the format of the 7th character so it
1.86 - calls GetFormatOfFepInlineText() a third time passing 6 into aPositionOfCharacter.
1.87 - As the character at position 6 is in format C, the function should set aFormat
1.88 - to C and it should set aNumberOfCharactersWithSameFormat to 1. The FEP framework
1.89 - now knows the format of all of the inline text.
1.90 -
1.91 - @param aFormat On return, contains the formatting to apply to the inline text
1.92 - (or to a portion of it).
1.93 - @param aNumberOfCharactersWithSameFormat On return, contains the number of
1.94 - characters in the inline text (starting at aPositionOfCharacter) which have
1.95 - the same formatting.
1.96 - @param aPositionOfCharacter Start position within the inline text. */
1.97 - virtual void GetFormatOfFepInlineText(TCharFormat& aFormat, TInt& aNumberOfCharactersWithSameFormat, TInt aPositionOfCharacter) const=0;
1.98 -private: // reserved. do not override!
1.99 - IMPORT_C virtual void MFepInlineTextFormatRetriever_Reserved_1();
1.100 - IMPORT_C virtual void MFepInlineTextFormatRetriever_Reserved_2();
1.101 - };
1.102 -
1.103 -#endif // __FEPITFR_H__