epoc32/include/textcursor.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
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.
williamr@4
     1
// Copyright (c) 1994-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@4
     2
// All rights reserved.
williamr@4
     3
// This component and the accompanying materials are made available
williamr@4
     4
// under the terms of "Eclipse Public License v1.0"
williamr@4
     5
// which accompanies this distribution, and is available
williamr@4
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@4
     7
//
williamr@4
     8
// Initial Contributors:
williamr@4
     9
// Nokia Corporation - initial contribution.
williamr@4
    10
//
williamr@4
    11
// Contributors:
williamr@4
    12
//
williamr@4
    13
// Description:
williamr@4
    14
// text cursor header file
williamr@4
    15
// 
williamr@4
    16
//
williamr@4
    17
williamr@4
    18
#ifndef TEXTCURSOR_H
williamr@4
    19
#define TEXTCURSOR_H
williamr@4
    20
williamr@4
    21
struct TTextCursor
williamr@4
    22
/** Text cursor parameter information.
williamr@4
    23
williamr@4
    24
A text cursor is a rectangular area which can be set to flash. It is normally
williamr@4
    25
only visible when the window group which owns it has the keyboard focus. This
williamr@4
    26
structure is used to define the parameters of a text cursor, which can be
williamr@4
    27
selected for use through the window group using RWindowGroup::SetTextCursor().
williamr@4
    28
williamr@4
    29
Custom (non-rectangular) text cursors are supported from v7.0s. They are added
williamr@4
    30
to the window server using RWsSession::SetCustomTextCursor(), after which
williamr@4
    31
they can be selected for use through the window group, in the same way as
williamr@4
    32
standard rectangular cursors. They have a unique identifier, stored in the
williamr@4
    33
iType member, which must be greater than ETypeLastBasic. Custom text cursors
williamr@4
    34
are clipped to their iHeight and iWidth values. Their iColour member is not
williamr@4
    35
used.
williamr@4
    36
williamr@4
    37
@publishedAll
williamr@4
    38
@released */
williamr@4
    39
    {
williamr@4
    40
	// The different normal text cursors
williamr@4
    41
	// A Text cursor can either be a predefined one
williamr@4
    42
	// or a general sprite. Cursors between ETypeFirst
williamr@4
    43
	// and ETypeLastBasic are predefined ones (even though
williamr@4
    44
	// the ones above ETypeLast do not exist and are
williamr@4
    45
	// for future use)
williamr@4
    46
	/** Cursor type values.
williamr@4
    47
williamr@4
    48
	The values between ETypeFirst and ETypeLastBasic are reserved for predefined
williamr@4
    49
	cursors. Custom text cursors must have a value greater than ETypeLastBasic.
williamr@4
    50
williamr@4
    51
	The values not listed below are for internal use only.
williamr@4
    52
	
williamr@4
    53
    @publishedAll */
williamr@4
    54
	enum ENamedCursors
williamr@4
    55
		{
williamr@4
    56
		ETypeNone,
williamr@4
    57
		/** Standard filled rectangular cursor. */
williamr@4
    58
		ETypeRectangle,
williamr@4
    59
		/** Standard hollow rectangular cursor. */
williamr@4
    60
		ETypeHollowRectangle,
williamr@4
    61
        /** The first predefined cursor type.
williamr@4
    62
williamr@4
    63
        Equivalent to ETypeRectangle. This can be used for iterating through the predefined
williamr@4
    64
        cursor types.
williamr@4
    65
        
williamr@4
    66
        WARNING: Enum for internal use ONLY. Compatibility is not guaranteed in future releases. */
williamr@4
    67
        ETypeFirst=ETypeRectangle,
williamr@4
    68
        /** The last predefined cursor type.
williamr@4
    69
williamr@4
    70
        Equivalent to ETypeHollowRectangle. This can be used for iterating through
williamr@4
    71
        the predefined cursor types.
williamr@4
    72
        
williamr@4
    73
        WARNING: Enum for internal use ONLY. Compatibility is not guaranteed in future releases. */        
williamr@4
    74
        ETypeLast=ETypeHollowRectangle,
williamr@4
    75
        /** Reserved for future use.
williamr@4
    76
		
williamr@4
    77
		/** All custom text cursors must have a type value greater than this. */
williamr@4
    78
		ETypeLastBasic = 1000,	
williamr@4
    79
		};
williamr@4
    80
	/** Added for compatibility with previous releases. */
williamr@4
    81
	typedef TInt EType;
williamr@4
    82
	/** Cursor flash and clipping flags.
williamr@4
    83
williamr@4
    84
	The flags not listed below are for internal use only. */
williamr@4
    85
	enum EFlags
williamr@4
    86
		{
williamr@4
    87
		/** The text cursor should not flash. */
williamr@4
    88
		EFlagNoFlash		= 0x00000001,
williamr@4
    89
		/** The bitmap of each sprite member is clipped left of its x-origin and right of
williamr@4
    90
		its x-origin plus iWidth.
williamr@4
    91
williamr@4
    92
		Used for custom text cursors only. */
williamr@4
    93
		EFlagClipHorizontal	= 0x00000002,
williamr@4
    94
		/** The bitmap of each sprite member is clipped vertically.
williamr@4
    95
williamr@4
    96
		How it is clipped depends on the text cursor's vertical alignment, see the
williamr@4
    97
		TCustomTextCursorAlignment enum in class RWsSession.
williamr@4
    98
williamr@4
    99
		Used for custom text cursors only. */
williamr@4
   100
		EFlagClipVertical	= 0x00000004,	
williamr@4
   101
		};
williamr@4
   102
	/** The cursor type.
williamr@4
   103
williamr@4
   104
	For possible values, see the ENamedCursors enum. */
williamr@4
   105
	TInt iType;
williamr@4
   106
	/** The height of the text cursor.
williamr@4
   107
williamr@4
   108
	This value is also used for clipping custom text cursors, if the EFlagClipVertical
williamr@4
   109
	flag is set. */
williamr@4
   110
    TInt iHeight;
williamr@4
   111
	/** The ascent of the text cursor (the distance between the origin and the top). */
williamr@4
   112
    TInt iAscent;
williamr@4
   113
	/** The width of the text cursor.
williamr@4
   114
williamr@4
   115
	Custom text cursors are clipped to this value, if the EFlagClipHorizontal
williamr@4
   116
	flag is set. */
williamr@4
   117
    TInt iWidth;
williamr@4
   118
	/** Cursor flash and clipping flags.
williamr@4
   119
williamr@4
   120
	For possible values, see the EFlags enum. */
williamr@4
   121
    TUint iFlags;
williamr@4
   122
	/** The colour of the text cursor.
williamr@4
   123
williamr@4
   124
	If the cursor is flashing, this colour is XOR'd with the screen.
williamr@4
   125
williamr@4
   126
	This value is not used for custom text cursors. */
williamr@4
   127
	TRgb iColor;
williamr@4
   128
    };
williamr@4
   129
williamr@4
   130
#endif // TEXTCURSOR_H