williamr@2: // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // 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 williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: #ifndef __MEDOBSRV_H__ williamr@2: #define __MEDOBSRV_H__ williamr@2: williamr@2: #include williamr@2: williamr@2: williamr@2: williamr@2: class MEditObserver williamr@2: /** williamr@2: Specifies the mixin protocol for a rich text edit observer. williamr@2: williamr@2: This class is implemented by controls which use a rich text (CRichText) object, williamr@2: when it is possible for the text object to be changed from outside of the williamr@2: control without the control's knowledge. williamr@2: williamr@2: An edit observer is a callback to the control from the CRichText object which williamr@2: it has been set up to observe. The edit observer is set up using CRichText::SetEditObserver(). williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: { williamr@2: public: williamr@2: // Observer function called by CRichText to signal changes to the text williamr@2: // buffer within it. A pointer to this function must be passed in to williamr@2: // a CRichText instance by .SetEditObserver(). williamr@2: // aStart is the start position of the edit and aExtent is the number williamr@2: // of characters added or, if negative, deleted after this position. williamr@2: williamr@2: williamr@2: /** Observer function called by the CRichText object when the object is edited williamr@2: to give notification of changes to its text buffer. In this way, the control williamr@2: knows how the text object has changed and can reformat and redraw the text williamr@2: object appropriately. williamr@2: williamr@2: A pointer to the observer object must have been passed in to a CRichText instance williamr@2: using CRichText::SetEditObserver(). williamr@2: williamr@2: @param aStart The start position of the edit. williamr@2: @param aExtent The number of characters added or, if negative, deleted after williamr@2: this position. */ williamr@2: virtual void EditObserver(TInt aStart, TInt aExtent) = 0; williamr@2: }; williamr@2: williamr@2: #endif