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