1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/textcursor.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,130 @@
1.4 +// Copyright (c) 1994-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// text cursor header file
1.18 +//
1.19 +//
1.20 +
1.21 +#ifndef TEXTCURSOR_H
1.22 +#define TEXTCURSOR_H
1.23 +
1.24 +struct TTextCursor
1.25 +/** Text cursor parameter information.
1.26 +
1.27 +A text cursor is a rectangular area which can be set to flash. It is normally
1.28 +only visible when the window group which owns it has the keyboard focus. This
1.29 +structure is used to define the parameters of a text cursor, which can be
1.30 +selected for use through the window group using RWindowGroup::SetTextCursor().
1.31 +
1.32 +Custom (non-rectangular) text cursors are supported from v7.0s. They are added
1.33 +to the window server using RWsSession::SetCustomTextCursor(), after which
1.34 +they can be selected for use through the window group, in the same way as
1.35 +standard rectangular cursors. They have a unique identifier, stored in the
1.36 +iType member, which must be greater than ETypeLastBasic. Custom text cursors
1.37 +are clipped to their iHeight and iWidth values. Their iColour member is not
1.38 +used.
1.39 +
1.40 +@publishedAll
1.41 +@released */
1.42 + {
1.43 + // The different normal text cursors
1.44 + // A Text cursor can either be a predefined one
1.45 + // or a general sprite. Cursors between ETypeFirst
1.46 + // and ETypeLastBasic are predefined ones (even though
1.47 + // the ones above ETypeLast do not exist and are
1.48 + // for future use)
1.49 + /** Cursor type values.
1.50 +
1.51 + The values between ETypeFirst and ETypeLastBasic are reserved for predefined
1.52 + cursors. Custom text cursors must have a value greater than ETypeLastBasic.
1.53 +
1.54 + The values not listed below are for internal use only.
1.55 +
1.56 + @publishedAll */
1.57 + enum ENamedCursors
1.58 + {
1.59 + ETypeNone,
1.60 + /** Standard filled rectangular cursor. */
1.61 + ETypeRectangle,
1.62 + /** Standard hollow rectangular cursor. */
1.63 + ETypeHollowRectangle,
1.64 + /** The first predefined cursor type.
1.65 +
1.66 + Equivalent to ETypeRectangle. This can be used for iterating through the predefined
1.67 + cursor types.
1.68 +
1.69 + WARNING: Enum for internal use ONLY. Compatibility is not guaranteed in future releases. */
1.70 + ETypeFirst=ETypeRectangle,
1.71 + /** The last predefined cursor type.
1.72 +
1.73 + Equivalent to ETypeHollowRectangle. This can be used for iterating through
1.74 + the predefined cursor types.
1.75 +
1.76 + WARNING: Enum for internal use ONLY. Compatibility is not guaranteed in future releases. */
1.77 + ETypeLast=ETypeHollowRectangle,
1.78 + /** Reserved for future use.
1.79 +
1.80 + /** All custom text cursors must have a type value greater than this. */
1.81 + ETypeLastBasic = 1000,
1.82 + };
1.83 + /** Added for compatibility with previous releases. */
1.84 + typedef TInt EType;
1.85 + /** Cursor flash and clipping flags.
1.86 +
1.87 + The flags not listed below are for internal use only. */
1.88 + enum EFlags
1.89 + {
1.90 + /** The text cursor should not flash. */
1.91 + EFlagNoFlash = 0x00000001,
1.92 + /** The bitmap of each sprite member is clipped left of its x-origin and right of
1.93 + its x-origin plus iWidth.
1.94 +
1.95 + Used for custom text cursors only. */
1.96 + EFlagClipHorizontal = 0x00000002,
1.97 + /** The bitmap of each sprite member is clipped vertically.
1.98 +
1.99 + How it is clipped depends on the text cursor's vertical alignment, see the
1.100 + TCustomTextCursorAlignment enum in class RWsSession.
1.101 +
1.102 + Used for custom text cursors only. */
1.103 + EFlagClipVertical = 0x00000004,
1.104 + };
1.105 + /** The cursor type.
1.106 +
1.107 + For possible values, see the ENamedCursors enum. */
1.108 + TInt iType;
1.109 + /** The height of the text cursor.
1.110 +
1.111 + This value is also used for clipping custom text cursors, if the EFlagClipVertical
1.112 + flag is set. */
1.113 + TInt iHeight;
1.114 + /** The ascent of the text cursor (the distance between the origin and the top). */
1.115 + TInt iAscent;
1.116 + /** The width of the text cursor.
1.117 +
1.118 + Custom text cursors are clipped to this value, if the EFlagClipHorizontal
1.119 + flag is set. */
1.120 + TInt iWidth;
1.121 + /** Cursor flash and clipping flags.
1.122 +
1.123 + For possible values, see the EFlags enum. */
1.124 + TUint iFlags;
1.125 + /** The colour of the text cursor.
1.126 +
1.127 + If the cursor is flashing, this colour is XOR'd with the screen.
1.128 +
1.129 + This value is not used for custom text cursors. */
1.130 + TRgb iColor;
1.131 + };
1.132 +
1.133 +#endif // TEXTCURSOR_H