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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // class TEikVirtualCursor
18 #ifndef __EIKVCURS_H__
19 #define __EIKVCURS_H__
25 /** Provides support for the virtual cursor's state within an application.
27 There is one instance of this object per CEikonEnv.
31 class TEikVirtualCursor
34 /** Specifies the virtual cursor's state.
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. */
43 /** Sets the virtual cursor off. */
45 /** Sets the virtual cursor on. */
47 /** Sets the virtual cursor as suspended. */
52 private: //prevent passing by value
53 inline TEikVirtualCursor(const TEikVirtualCursor&);
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);
60 void SwitchOffEmulationAndBitmap(CCoeEnv& aEnv);
61 void SwitchOnEmulationAndBitmap(CCoeEnv& aEnv);
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&)