epoc32/include/mw/eikedwob.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 1997-1999 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@2
     5
* 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
     6
* which accompanies this distribution, and is available
williamr@2
     7
* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description:
williamr@2
    15
*
williamr@2
    16
*/
williamr@2
    17
williamr@2
    18
williamr@2
    19
#if !defined(__EIKEDWOB_H__)
williamr@2
    20
#define __EIKEDWOB_H__
williamr@2
    21
williamr@2
    22
class CEikEdwin;
williamr@2
    23
williamr@2
    24
/**
williamr@2
    25
 * Interface class describing the functionality expected of an observer
williamr@2
    26
 * for CEikEdwins.
williamr@2
    27
 * 
williamr@2
    28
 * Edwin observers are informed by the edwin whenever its content is
williamr@2
    29
 * changed, or whenever the user changes the cursor position.
williamr@2
    30
 * 
williamr@2
    31
 * This class should be derived from by all observers of edwins.
williamr@2
    32
 */
williamr@2
    33
class MEikEdwinObserver
williamr@2
    34
	{
williamr@2
    35
public:
williamr@2
    36
    /**
williamr@2
    37
     * Events from a value editor.
williamr@2
    38
     */
williamr@2
    39
	enum TEdwinEvent
williamr@2
    40
		{
williamr@2
    41
		/** Sent whenever the content of the edwin changes. */
williamr@2
    42
		EEventFormatChanged,
williamr@2
    43
		/** Sent on receipt of a navigation command. */
williamr@2
    44
		EEventNavigation,
williamr@2
    45
		/**
williamr@2
    46
		 * Sent whenever the text of the edwin changes. To observe
williamr@2
    47
		 * actual changes in the contents of the editor this should
williamr@2
    48
		 * be preferred to EEventFormatChanged.
williamr@2
    49
		 */
williamr@2
    50
		EEventTextUpdate,
williamr@2
    51
		/** Sent on receipt of a scroll event. */
williamr@2
    52
		EEventScroll,
williamr@2
    53
		/** Sent if you explicitly call edwin's SetTextL() */
williamr@2
    54
		EEventTextUpdateAPI
williamr@2
    55
		};
williamr@2
    56
public:
williamr@2
    57
    /**
williamr@2
    58
     * This pure virtual function is invoked by CEikEdwin to report an event
williamr@2
    59
     * to its observer. The observer may respond appropriately.
williamr@2
    60
     * 
williamr@2
    61
     * @param aEdwin  The originating edwin. 
williamr@2
    62
     * @param aEventType  The event being reported. 
williamr@2
    63
     */
williamr@2
    64
	virtual void HandleEdwinEventL(CEikEdwin* aEdwin,TEdwinEvent aEventType)=0;
williamr@2
    65
	};
williamr@2
    66
williamr@2
    67
/**
williamr@2
    68
 * Interface to handle changes to an edwin's size.
williamr@2
    69
 */
williamr@2
    70
class MEikEdwinSizeObserver
williamr@2
    71
	{
williamr@2
    72
public:
williamr@2
    73
    /**
williamr@2
    74
     * Specifies the type of event reported to the edwin observer.
williamr@2
    75
     */
williamr@2
    76
	enum TEdwinSizeEvent
williamr@2
    77
		{
williamr@2
    78
		/**
williamr@2
    79
		 * Specifies a change in edwin size. When the edwin observer
williamr@2
    80
		 * receives an event of this type, it handles it by making
williamr@2
    81
		 * its view bigger or smaller according to the new edwin size.
williamr@2
    82
		 */
williamr@2
    83
		EEventSizeChanging
williamr@2
    84
		};
williamr@2
    85
public:
williamr@2
    86
    /**
williamr@2
    87
     * Handles a change in the edwin's size. If you implement this function,
williamr@2
    88
     * ensure it returns ETrue if you wish to redraw the edwin.
williamr@2
    89
     * 
williamr@2
    90
     * @param aEdwin The edwin for which the size event is being handled.
williamr@2
    91
     * @param aEventType The event type.
williamr@2
    92
     * @param aDesirableEdwinSize The desired size for the edwin identified
williamr@2
    93
     * by aEdwin.
williamr@2
    94
     * @return The return value depends on your implementation. Return
williamr@2
    95
     * ETrue if you wish to redraw the edwin. EFalse otherwise.
williamr@2
    96
     */
williamr@2
    97
	virtual TBool HandleEdwinSizeEventL(CEikEdwin* aEdwin, TEdwinSizeEvent aEventType, TSize aDesirableEdwinSize)=0;
williamr@2
    98
	};
williamr@2
    99
williamr@2
   100
#endif