1.1 --- a/epoc32/include/mw/eikedwob.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/mw/eikedwob.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,100 @@
1.4 -eikedwob.h
1.5 +/*
1.6 +* Copyright (c) 1997-1999 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* 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.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description:
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +#if !defined(__EIKEDWOB_H__)
1.24 +#define __EIKEDWOB_H__
1.25 +
1.26 +class CEikEdwin;
1.27 +
1.28 +/**
1.29 + * Interface class describing the functionality expected of an observer
1.30 + * for CEikEdwins.
1.31 + *
1.32 + * Edwin observers are informed by the edwin whenever its content is
1.33 + * changed, or whenever the user changes the cursor position.
1.34 + *
1.35 + * This class should be derived from by all observers of edwins.
1.36 + */
1.37 +class MEikEdwinObserver
1.38 + {
1.39 +public:
1.40 + /**
1.41 + * Events from a value editor.
1.42 + */
1.43 + enum TEdwinEvent
1.44 + {
1.45 + /** Sent whenever the content of the edwin changes. */
1.46 + EEventFormatChanged,
1.47 + /** Sent on receipt of a navigation command. */
1.48 + EEventNavigation,
1.49 + /**
1.50 + * Sent whenever the text of the edwin changes. To observe
1.51 + * actual changes in the contents of the editor this should
1.52 + * be preferred to EEventFormatChanged.
1.53 + */
1.54 + EEventTextUpdate,
1.55 + /** Sent on receipt of a scroll event. */
1.56 + EEventScroll,
1.57 + /** Sent if you explicitly call edwin's SetTextL() */
1.58 + EEventTextUpdateAPI
1.59 + };
1.60 +public:
1.61 + /**
1.62 + * This pure virtual function is invoked by CEikEdwin to report an event
1.63 + * to its observer. The observer may respond appropriately.
1.64 + *
1.65 + * @param aEdwin The originating edwin.
1.66 + * @param aEventType The event being reported.
1.67 + */
1.68 + virtual void HandleEdwinEventL(CEikEdwin* aEdwin,TEdwinEvent aEventType)=0;
1.69 + };
1.70 +
1.71 +/**
1.72 + * Interface to handle changes to an edwin's size.
1.73 + */
1.74 +class MEikEdwinSizeObserver
1.75 + {
1.76 +public:
1.77 + /**
1.78 + * Specifies the type of event reported to the edwin observer.
1.79 + */
1.80 + enum TEdwinSizeEvent
1.81 + {
1.82 + /**
1.83 + * Specifies a change in edwin size. When the edwin observer
1.84 + * receives an event of this type, it handles it by making
1.85 + * its view bigger or smaller according to the new edwin size.
1.86 + */
1.87 + EEventSizeChanging
1.88 + };
1.89 +public:
1.90 + /**
1.91 + * Handles a change in the edwin's size. If you implement this function,
1.92 + * ensure it returns ETrue if you wish to redraw the edwin.
1.93 + *
1.94 + * @param aEdwin The edwin for which the size event is being handled.
1.95 + * @param aEventType The event type.
1.96 + * @param aDesirableEdwinSize The desired size for the edwin identified
1.97 + * by aEdwin.
1.98 + * @return The return value depends on your implementation. Return
1.99 + * ETrue if you wish to redraw the edwin. EFalse otherwise.
1.100 + */
1.101 + virtual TBool HandleEdwinSizeEventL(CEikEdwin* aEdwin, TEdwinSizeEvent aEventType, TSize aDesirableEdwinSize)=0;
1.102 + };
1.103 +
1.104 +#endif