epoc32/include/mw/eikvcurs.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 // Copyright (c) 1997-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 "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // class TEikVirtualCursor
    15 // 
    16 //
    17 
    18 #ifndef __EIKVCURS_H__
    19 #define __EIKVCURS_H__
    20 
    21 #include <e32std.h>
    22 #include <coemain.h>
    23 
    24 
    25 /** Provides support for the virtual cursor's state within an application.
    26 
    27 There is one instance of this object per CEikonEnv. 
    28 
    29 @publishedAll
    30 @released */
    31 class TEikVirtualCursor
    32 	{
    33 public:
    34 	/** Specifies the virtual cursor's state. 
    35 
    36 	The state may be on, off or suspended. The suspended state is for use by applications 
    37 	that wish to temporarily disable the cursor, but do not want to switch it 
    38 	off completely. For example, an editor control which when focused needs to 
    39 	capture arrow keys would disable the virtual cursor when it gains focus, 
    40 	and enable it when unfocused. */
    41 	enum TState
    42 		{
    43 		/** Sets the virtual cursor off. */
    44 		EOff=0,
    45 		/** Sets the virtual cursor on. */
    46 		EOn,
    47 		/** Sets the virtual cursor as suspended. */
    48 		ESuspended
    49 		};
    50 public:
    51 	TEikVirtualCursor();
    52 private: //prevent passing by value
    53 	inline TEikVirtualCursor(const TEikVirtualCursor&);
    54 public:
    55 	IMPORT_C void SetCursorStateL(TState aState, CCoeEnv& aEnv);
    56 	IMPORT_C TState CursorState(CCoeEnv& aEnv);
    57 public: // but not exported
    58 	void HandleAppToForeground(CCoeEnv& aEnv);
    59 private:
    60 	void SwitchOffEmulationAndBitmap(CCoeEnv& aEnv);
    61 	void SwitchOnEmulationAndBitmap(CCoeEnv& aEnv);
    62 private:
    63 	TState iState;
    64 	};
    65 
    66 
    67 // inlines
    68 
    69 /** Constructor.
    70 
    71 Sets the cursor's state to ESuspended so that the call to switch off the virtual 
    72 cursor will succeed when the application starts. Required due to the efficient 
    73 implementation of SetCursorState(). */
    74 inline TEikVirtualCursor::TEikVirtualCursor(const TEikVirtualCursor&)
    75 	{}
    76 
    77 #endif