1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // 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
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __MEDOBSRV_H__
17 #define __MEDOBSRV_H__
25 Specifies the mixin protocol for a rich text edit observer.
27 This class is implemented by controls which use a rich text (CRichText) object,
28 when it is possible for the text object to be changed from outside of the
29 control without the control's knowledge.
31 An edit observer is a callback to the control from the CRichText object which
32 it has been set up to observe. The edit observer is set up using CRichText::SetEditObserver().
38 // Observer function called by CRichText to signal changes to the text
39 // buffer within it. A pointer to this function must be passed in to
40 // a CRichText instance by <rich text instance>.SetEditObserver(<ptr>).
41 // aStart is the start position of the edit and aExtent is the number
42 // of characters added or, if negative, deleted after this position.
45 /** Observer function called by the CRichText object when the object is edited
46 to give notification of changes to its text buffer. In this way, the control
47 knows how the text object has changed and can reformat and redraw the text
50 A pointer to the observer object must have been passed in to a CRichText instance
51 using CRichText::SetEditObserver().
53 @param aStart The start position of the edit.
54 @param aExtent The number of characters added or, if negative, deleted after
56 virtual void EditObserver(TInt aStart, TInt aExtent) = 0;