FreeCalypso > hg > fc-tourmaline
annotate src/ui/bmi/AUIEditor.c @ 215:76f65c8bb151
r2d_env.c: rm unused global variable with very polluting name
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 24 Apr 2021 19:21:06 +0000 |
parents | 70ea7526b59e |
children |
rev | line source |
---|---|
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 CONDAT (UK) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 ******************************************************************************** |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 This software product is the property of Condat (UK) Ltd and may not be |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 disclosed to any third party without the express permission of the owner. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 ******************************************************************************** |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 $Project name: Basic MMI |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 $Project code: BMI (6349) |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
14 $Module: MMI |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
15 $File: AUIEditor.c |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
16 $Revision: 1.0 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
17 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
18 $Author: Condat(UK) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
19 $Date: 22/02/01 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 ******************************************************************************** |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 Description: |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
24 Generic MMI Editor. |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 ******************************************************************************** |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 $History: AUIEditor.c |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 May 15, 2006 DR: OMAPS00075852 - xreddymn |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 Description: New SMS and Message Full indications will not be seen by user |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 when CB is enabled, because CB messages have higher priority. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 Solution: CB messages and New SMS or Message Full indications are displayed |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 in two different zones on the Idle screen. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 Changes: Added new display zone which is located one line above |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 the softkeys. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
38 Mar 14, 2006 DR: OMAPS00061468 - x0035544. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
39 Description: SAT 27.22.4.22.2 SET UP IDLE MODE TEXT (Icon support) fails |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
40 Solution : In the function AUI_edit_SetDefault() set the default value for |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
41 display_type to SAT_ICON_NONE. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
42 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
43 Jan 16, 2006 DR: OMAPS00061460 - Shashi Shekar B.S. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
44 Description: SAT Icon support |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
45 Solution : SAT icon support added. |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 Dec-20-2004 MMI-SPR-27382 xreddymn |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 Added NULL window handle check for AUI_edit_Destroy |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
50 Sep 2, 2004 REF: CRR 21370 xkundadu |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
51 Description: Giving wrong expected result by long press on "#" key |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
52 Fix: When user presses long on '#' key it will display 'p'. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
53 Changed the long press of '*' key to display 'w'. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
54 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
55 Jul 22,2004 CRR:21605 xrashmic - SASKEN |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
56 Description: After deleting all the characters in the editor the case does not change to |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
57 sentence case. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
58 Fix: After deleting a character, check if editor is empty and then set the case to |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
59 sentence case only if the user has not modified the case. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
60 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
61 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
62 Jul 29, 2004 REF: CRR:20892 xrashmic - SASKEN |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
63 Description: By Long press on Left/Right key at 'Message Editor' screen, |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
64 cursor not scrolling continuously |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
65 Fix: The Long press of left/right key is now handled in AUI_edit_KbdLongCB. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
66 The continuous long press of a key was being ignored for all keys. Now |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
67 only for left and right keys this is handled, for rest of the keys the continuos |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
68 long press is ignored. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
69 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
70 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
71 31/01/02 Original Condat(UK) BMI version. |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
72 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 $End |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 #define ENTITY_MFW |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 /* includes */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 #include <string.h> |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 #include <stdio.h> |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 #include <stdlib.h> |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 #if defined (NEW_FRAME) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 #include "typedefs.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 #include "vsi.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 #include "pei.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 #include "custom.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 #include "gsm.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 #else |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 #include "STDDEFS.H" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 #include "custom.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 #include "gsm.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 #include "vsi.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 #include "mfw_mfw.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 #include "mfw_win.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 #include "mfw_kbd.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 #include "mfw_tim.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 #include "mfw_phb.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
106 #include "mfw_sms.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 #include "mfw_ss.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 #include "mfw_icn.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 #include "mfw_mnu.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 #include "mfw_lng.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 #include "mfw_sat.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 #include "mfw_kbd.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 #include "mfw_nm.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
114 #include "mfw_cm.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 #include "mfw_edt.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
116 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 #include "dspl.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 #include "ksd.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 #include "psa.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
121 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
122 #include "ATBCommon.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
123 #include "ATBDisplay.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
124 #include "ATBEditor.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
125 #include "AUIEditor.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
126 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
127 #include "MmiDummy.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
128 #include "MmiMmi.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
129 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
130 #include "MmiDialogs.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
131 #include "MmiLists.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
132 #include "MmiMenu.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
133 #include "MmiSoftKeys.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
134 #include "MmiIdle.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
135 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
136 #include "cus_aci.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
137 #include "prim.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
138 #ifndef PCM_2_FFS |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
139 #include "pcm.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
140 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
141 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
142 #include "Mmiicons.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
143 #include "MmiBookShared.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
144 #include "mmiSmsMenu.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
145 #include "mfw_ffs.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
146 #ifdef EASY_TEXT_ENABLED |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
147 #include "MmiDictionary.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
148 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
149 #include "mmiColours.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
150 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
151 #include "ATBCommon.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
152 #include "ATBDisplay.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
153 #include "ATBEditor.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
154 #include "AUITextEntry.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
155 #include "AUIEditor.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
156 #include "AUIEditor_i.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
157 #include "AUISymbol.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
158 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
159 /* Mar 08, 2006 REF:ER OMAPS00065168 */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
160 #ifdef NEPTUNE_BOARD |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
161 #include "audio.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
162 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
163 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
164 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
165 #ifndef MFW_EVENT_PASSED |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
166 #define MFW_EVENT_PASSED 0 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
167 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
168 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
169 #define TRACE_AUIEditor // Def/undef this to show/hide the trace_events for this file |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
170 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
171 static void AUI_edit_ClearPredText(T_AUI_EDITOR_INFO *data); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
172 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
173 /* API - 08/07/03 - CQ10728*/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
174 static void AUI_Edit_Display_Only_CB(T_MFW_HND win, USHORT Identifier, SHORT reason); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
175 static void AUI_Edit_Display_Only_Destroy (T_MFW_HND window); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
176 /* API - 08/07/03 - CQ10728 END*/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
177 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
178 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
179 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
180 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
181 Static Data |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
182 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
183 ********************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
184 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
185 /* eZiText icon */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
186 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
187 static const unsigned char TextIconeZiTextSmall[] = |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
188 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
189 0x03,0x03,0x18,0x7c,0xcc,0x08,0x10,0x0c |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
190 }; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
191 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
192 // Jul 22,2004 CRR:21605 xrashmic - SASKEN |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
193 // This variable would tell us if the user had changed the case explicitly |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
194 UBYTE CaseChanged = FALSE; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
195 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
196 #define ED_IND_UPPER "ABC" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
197 #define ED_IND_LOWER "abc" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
198 #define ED_IND_CAPS "Abc" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
199 #define ED_IND_NUM "123" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
200 #define ED_IND_NONE "---" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
201 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
202 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
203 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
204 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
205 $Function: AUI_edit_Start |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
206 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
207 $Description: Start the editor. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
208 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
209 $Returns: None. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
210 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
211 $Arguments: None. |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
212 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
213 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
214 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
215 T_MFW_HND AUI_edit_Start(T_MFW_HND parent, T_AUI_EDITOR_DATA *editor_data) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
216 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
217 T_MFW_HND win; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
218 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
219 TRACE_FUNCTION ("AUI_edit_Start()"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
220 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
221 win = AUI_edit_Create(parent, editor_data); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
222 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
223 return win; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
224 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
225 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
226 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
227 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
228 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
229 $Function: AUI_edit_QuickStart |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
230 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
231 $Description: Start the editor. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
232 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
233 $Returns: Dialog handler for the editor. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
234 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
235 $Arguments: win - the parent window |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
236 TitleId - the text id of the title (or NULL) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
237 TitleString - the text string of the title (or NULL) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
238 buffer - the unicode input buffer |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
239 len - maximum length of the text entered |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
240 editor_info - the T_AUI_EDITOR_DATA structure (allocated but empty) |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
241 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
242 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
243 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
244 T_MFW_HND AUI_edit_QuickStart(T_MFW_HND win, USHORT TitleId, UBYTE *TitleString, USHORT *buffer, USHORT len, |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
245 T_AUI_EDITOR_DATA *editor_info, T_AUI_EDIT_CB editor_cb) |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
246 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
247 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
248 TRACE_FUNCTION ("AUI_edit_QuickStart()"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
249 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
250 AUI_edit_SetDisplay(editor_info, ZONE_FULL_SK_TITLE, COLOUR_EDITOR, EDITOR_FONT); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
251 AUI_edit_SetEvents(editor_info, 0, TRUE, FOREVER, editor_cb); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
252 AUI_edit_SetBuffer(editor_info, ATB_DCS_UNICODE, (UBYTE *)buffer, len); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
253 AUI_edit_SetTextStr(editor_info, TxtSoftOK, TxtDelete, TitleId, TitleString); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
254 AUI_edit_SetAltTextStr(editor_info, 0, NULL, TRUE, TxtSoftBack); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
255 /* create the dialog handler */ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
256 return AUI_edit_Start(win, editor_info); /* start the common editor */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
257 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
258 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
259 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
260 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
261 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
262 $Function: AUI_edit_Create |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
263 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
264 $Description: Create the editor. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
265 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
266 $Returns: Pointer to the editor's window. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
267 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
268 $Arguments: parent - The parent window. |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
269 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
270 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
271 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
272 static T_MFW_HND AUI_edit_Create(T_MFW_HND parent, T_AUI_EDITOR_DATA *editor_data) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
273 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
274 T_AUI_EDITOR_INFO *data = (T_AUI_EDITOR_INFO *)ALLOC_MEMORY (sizeof (T_AUI_EDITOR_INFO)); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
275 T_MFW_WIN *win_data; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
276 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
277 TRACE_FUNCTION ("AUI_edit_Create()"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
278 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
279 /* Create window handler */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
280 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
281 data->win = win_create(parent, 0, E_WIN_VISIBLE, (T_MFW_CB)AUI_edit_WinCb); // Create window |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
282 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
283 if (data->win==NULL) // Make sure window exists |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
284 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
285 return NULL; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
286 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
287 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
288 /* Connect the dialog data to the MFW-window */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
289 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
290 data->mmi_control.dialog = (T_DIALOG_FUNC)AUI_edit_ExecCb; /* Setup the destination for events */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
291 data->mmi_control.data = data; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
292 data->parent = parent; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
293 win_data = ((T_MFW_HDR *)data->win)->data; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
294 win_data->user = (void *)data; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
295 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
296 data->kbd = kbd_create(data->win, KEY_ALL,(T_MFW_CB)AUI_edit_KbdCb); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
297 data->kbd_long = kbd_create(data->win, KEY_ALL|KEY_LONG,(T_MFW_CB)AUI_edit_KbdLongCb); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
298 data->editor = ATB_edit_Create(&data->editor_data.editor_attr,0); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
299 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
300 data->editor_data = *editor_data; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
301 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
302 // Jul 22,2004 CRR:21605 xrashmic - SASKEN |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
303 // The initial value of this variable should be false. i.e the user has still not changed the case. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
304 CaseChanged=FALSE; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
305 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
306 AUI_edit_Init(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
307 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
308 SEND_EVENT(data->win, E_ED_INIT, 0, 0); |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
309 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
310 /* Return window handle */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
311 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
312 return data->win; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
313 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
314 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
315 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
316 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
317 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
318 $Function: AUI_edit_Init |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
319 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
320 $Description: Initialise the editor. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
321 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
322 $Returns: Pointer to the editor's window. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
323 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
324 $Arguments: win - The editor window |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
325 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
326 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
327 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
328 static void AUI_edit_Init(T_MFW_HND win) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
329 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
330 T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
331 T_AUI_EDITOR_INFO *data = (T_AUI_EDITOR_INFO *)win_data->user; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
332 T_ATB_TEXT text={0,0,NULL}; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
333 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
334 TRACE_FUNCTION("AUI_edit_Init()"); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
335 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
336 data->editor->update = ED_UPDATE_FULL; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
337 data->predText.len = 0; /* Blank out predictive text buffer */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
338 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
339 /* Set up title information */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
340 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
341 data->hasTitle = FALSE; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
342 data->title.len = 0; /* Blank out title buffer */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
343 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
344 if (data->editor_data.TitleId!=NULL) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
345 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
346 data->hasTitle = TRUE; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
347 text.data = (UBYTE *)GET_TEXT(data->editor_data.TitleId); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
348 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
349 else if (data->editor_data.TitleString!=NULL) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
350 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
351 data->hasTitle = TRUE; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
352 text.data = data->editor_data.TitleString; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
353 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
354 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
355 /* If title exists, get its dcs and length */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
356 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
357 if (data->hasTitle) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
358 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
359 if (text.data[0]==0x80) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
360 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
361 text.data += 2; /* Skip over two unicode indicator bytes */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
362 text.dcs = ATB_DCS_UNICODE; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
363 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
364 #ifdef EASY_TEXT_ENABLED |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
365 else if (Mmi_getCurrentLanguage() == CHINESE_LANGUAGE) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
366 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
367 text.dcs = ATB_DCS_UNICODE; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
368 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
369 #endif |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
370 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
371 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
372 text.dcs = ATB_DCS_ASCII; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
373 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
374 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
375 text.len = ATB_string_Length(&text); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
376 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
377 /* Allocate memory for the title and copy the text there */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
378 data->title.data = (UBYTE *)ALLOC_MEMORY((text.len + 1)*ATB_string_Size(&text)); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
379 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
380 ATB_string_Copy(&data->title, &text); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
381 } |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
382 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
383 /* Set up correct parameters for easytext */ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
384 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
385 #ifdef EASY_TEXT_ENABLED |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
386 if (ATB_edit_Mode(data->editor, ED_MODE_ALPHA)) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
387 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
388 /* Allocate word buffer memory */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
389 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
390 data->predText.data = (UBYTE *)ALLOC_MEMORY((ED_PREDTEXT_MAX+1)*sizeof(UBYTE)); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
391 data->predText.dcs = ATB_DCS_ASCII; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
392 data->predText.len = 0; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
393 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
394 FFS_flashData.PredTextAvailable = TRUE; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
395 Initialize_Dict(Mmi_getCurrentLanguage()/*SPR1508*/, 0); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
396 ResetDictSearch(); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
397 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
398 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
399 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
400 /* Initialise editor */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
401 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
402 ATB_edit_Init(data->editor); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
403 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
404 /* Initialise text entry */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
405 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
406 data->entry_data = AUI_entry_Create(data->win, data->editor, E_ED_UPDATE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
407 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
408 /* If there's a timeout, create the timer */ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
409 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
410 if (data->editor_data.timeout && (data->editor_data.timeout != FOREVER)) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
411 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
412 data->timer = tim_create(data->win, data->editor_data.timeout, (T_MFW_CB)AUI_edit_TimerCb); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
413 tim_start(data->timer); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
414 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
415 else |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
416 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
417 data->timer = NULL; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
418 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
419 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
420 /* Title timer, if required, is set up in WinCb */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
421 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
422 data->title_timer = NULL; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
423 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
424 return; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
425 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
426 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
427 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
428 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
429 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
430 $Function: AUI_edit_Destroy |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
431 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
432 $Description: Destroy the editor. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
433 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
434 $Returns: None. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
435 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
436 $Arguments: window - The editor window. |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
437 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
438 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
439 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
440 void AUI_edit_Destroy(T_MFW_HND win) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
441 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
442 T_MFW_WIN *win_data; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
443 T_AUI_EDITOR_INFO *data; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
444 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
445 #ifdef TRACE_AUIEditor |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
446 TRACE_FUNCTION ("AUI_edit_Destroy()"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
447 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
448 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
449 if (win == NULL) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
450 { |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
451 #ifdef TRACE_AUIEditor |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
452 TRACE_EVENT ("Error : Called with NULL Pointer"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
453 #endif |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
454 return; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
455 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
456 // xreddymn Dec-21-2004 MMI-SPR-27382: Added NULL window handle check for AUI_edit_Destroy |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
457 win_data = ((T_MFW_HDR *)win)->data; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
458 if(win_data == NULL) return; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
459 data = (T_AUI_EDITOR_INFO *)win_data->user; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
460 if (data) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
461 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
462 /* Free memory allocated for easytext buffer */ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
463 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
464 #ifdef EASY_TEXT_ENABLED |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
465 if (ATB_edit_Mode(data->editor, ED_MODE_ALPHA) && data->predText.data ) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
466 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
467 TRACE_EVENT("Freeing predictive text buffer"); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
468 FREE_MEMORY((void *)data->predText.data, (ED_PREDTEXT_MAX+1)*sizeof(UBYTE)); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
469 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
470 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
471 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
472 /* Free memory allocated for title */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
473 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
474 if (data->hasTitle) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
475 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
476 FREE_MEMORY(data->title.data, (data->title.len + 1)*ATB_string_Size(&data->title)); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
477 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
478 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
479 /* Delete timers */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
480 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
481 if (data->timer) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
482 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
483 tim_delete(data->timer); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
484 data->timer = NULL; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
485 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
486 if (data->title_timer) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
487 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
488 tim_delete(data->title_timer); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
489 data->title_timer = NULL; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
490 } |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
491 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
492 win_delete (data->win); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
493 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
494 /* Free editor memory */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
495 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
496 AUI_entry_Destroy(data->entry_data); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
497 ATB_edit_Destroy(data->editor); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
498 FREE_MEMORY ((void *)data, sizeof (T_AUI_EDITOR_INFO)); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
499 } |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
500 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
501 return; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
502 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
503 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
504 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
505 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
506 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
507 $Function: AUI_edit_ExecCb |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
508 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
509 $Description: Dialog function for editor. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
510 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
511 $Returns: None. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
512 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
513 $Arguments: None. |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
514 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
515 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
516 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
517 static void AUI_edit_ExecCb(T_MFW_HND win, USHORT event, USHORT value, void *parameter) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
518 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
519 T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
520 T_AUI_EDITOR_INFO *data = (T_AUI_EDITOR_INFO *)win_data->user; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
521 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
522 T_MFW_HND parent_win = data->parent; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
523 USHORT alphachar; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
524 /* Store these in case editor is destroyed on callback */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
525 USHORT Identifier = data->editor_data.Identifier; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
526 T_AUI_EDIT_CB Callback = data->editor_data.Callback; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
527 UBYTE destroyEditor = data->editor_data.destroyEditor; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
528 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
529 /* Mar 08, 2006 REF:ER OMAPS00065168 */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
530 #ifdef NEPTUNE_BOARD |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
531 UBYTE ringer; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
532 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
533 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
534 #ifdef TRACE_AUIEditor |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
535 TRACE_FUNCTION ("AUI_edit_ExecCb()"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
536 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
537 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
538 switch (event) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
539 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
540 /* Initialise */ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
541 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
542 case E_ED_INIT: |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
543 TRACE_EVENT("E_ED_INIT"); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
544 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
545 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
546 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
547 /* Destroy the editor */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
548 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
549 case E_ED_DESTROY: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
550 AUI_edit_Destroy(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
551 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
552 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
553 /* De-initialise editor */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
554 case E_ED_DEINIT: |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
555 TRACE_EVENT("E_ED_DEINIT"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
556 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
557 /* Mar 08, 2006 REF:ER OMAPS00065168 */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
558 /* Stop playing ring tone on key press */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
559 #ifdef NEPTUNE_BOARD |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
560 ringer = getcurrentSMSTone(); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
561 audio_StopSoundbyID( AUDIO_BUZZER, ringer ); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
562 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
563 vsi_t_sleep(0,10); /* small delay */ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
564 #endif |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
565 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
566 if (Callback) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
567 (Callback) (parent_win, Identifier, value); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
568 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
569 if(destroyEditor) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
570 AUI_edit_Destroy(data->win); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
571 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
572 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
573 /* Insert a character */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
574 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
575 case E_ED_INSERT: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
576 alphachar = (USHORT)value; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
577 /* If value is set, insert character */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
578 if (alphachar!=NULL) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
579 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
580 ATB_edit_Char(data->editor, alphachar, TRUE); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
581 #ifdef EASY_TEXT_ENABLED |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
582 if(FFS_flashData.PredTextAvailable && FFS_flashData.PredTextSelected && ATB_edit_Mode(data->editor, ED_MODE_PREDTEXT)) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
583 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
584 if ((alphachar == UNICODE_FULLSTOP) ||(alphachar == UNICODE_EXCLAMATION) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
585 || (alphachar == UNICODE_QUESTION)) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
586 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
587 ATB_edit_Char(data->editor, UNICODE_SPACE, TRUE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
588 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
589 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
590 #endif |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
591 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
592 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
593 /* If parameter is set, insert string */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
594 if (parameter!=NULL) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
595 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
596 ATB_edit_InsertString(data->editor, (T_ATB_TEXT *)parameter); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
597 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
598 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
599 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
600 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
601 /* Update word wrap & redraw editor window */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
602 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
603 case E_ED_UPDATE: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
604 //ATB_edit_Refresh(data->editor); /* SPR#2342 - SH */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
605 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
606 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
607 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
608 default: |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
609 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
610 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
611 return; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
612 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
613 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
614 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
615 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
616 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
617 $Function: AUI_edit_WinCb |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
618 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
619 $Description: Editor window event handler. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
620 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
621 $Returns: None. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
622 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
623 $Arguments: event - the event |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
624 win - the editor window |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
625 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
626 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
627 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
628 static int AUI_edit_WinCb(T_MFW_EVENT event, T_MFW_WIN *win_data) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
629 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
630 T_AUI_EDITOR_INFO *data = (T_AUI_EDITOR_INFO *)win_data->user; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
631 T_ED_DATA *editor = data->editor; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
632 USHORT scrollBarSize; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
633 USHORT scrollBarPos; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
634 SHORT editX = editor->attr->win_size.px; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
635 SHORT editY = editor->attr->win_size.py; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
636 SHORT editWidth = editor->attr->win_size.sx; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
637 SHORT editHeight = editor->attr->win_size.sy; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
638 char lengthIndC[12]; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
639 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
640 /* Strings for the header */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
641 T_ATB_TEXT string; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
642 USHORT stringWidth; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
643 USHORT stringHeight; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
644 T_ATB_TEXT title; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
645 USHORT titleWidth; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
646 USHORT titleHeight; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
647 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
648 USHORT textLen; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
649 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
650 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
651 T_DS_TEXTFORMAT format; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
652 BOOL showIcons; /* Flag that stores whether icons (e.g. alignment icons) should be shown */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
653 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
654 USHORT leftSK; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
655 USHORT rightSK; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
656 USHORT textIndex; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
657 T_ATB_TEXT newTitle; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
658 USHORT lastSpace; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
659 USHORT character; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
660 // Shashi Shekar B.S., a0876501, Jan 16, 2006, DR: OMAPS00061460 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
661 #ifdef FF_MMI_SAT_ICON |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
662 SHORT titleIconWidth = 0; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
663 SHORT iconX; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
664 SHORT iconY; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
665 #endif |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
666 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
667 #ifdef TRACE_AUIEditor |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
668 TRACE_FUNCTION ("AUI_edit_WinCb()"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
669 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
670 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
671 if (!data) |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
672 return MFW_EVENT_CONSUMED; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
673 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
674 switch(event) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
675 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
676 case E_WIN_VISIBLE: /* window is visible */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
677 if (win_data->flags & E_WIN_VISIBLE) |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
678 { |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
679 // Shashi Shekar B.S., a0876501, Jan 16, 2006, DR: OMAPS00061460 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
680 #ifdef FF_MMI_SAT_ICON |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
681 if (editor->attr->TitleIcon.data != NULL) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
682 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
683 if (editor->attr->TitleIcon.width > TITLE_ICON_WIDTH) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
684 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
685 titleIconWidth = TITLE_ICON_WIDTH; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
686 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
687 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
688 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
689 titleIconWidth = editor->attr->TitleIcon.width; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
690 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
691 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
692 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
693 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
694 titleIconWidth = 0; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
695 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
696 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
697 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
698 textLen = data->editor->attr->text.len; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
699 ATB_edit_LineGet(data->editor, data->editor->winStartLine); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
700 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
701 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
702 if (editor->update==ED_UPDATE_TRIVIAL) |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
703 editor->update = ED_UPDATE_DEFAULT; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
704 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
705 TRACE_EVENT("Updating whole screen."); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
706 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
707 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
708 /* Show the edited text */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
709 /* Don't update editor text if in ED_UPDATE_PARTIAL */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
710 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
711 if (editor->update!=ED_UPDATE_PARTIAL) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
712 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
713 ATB_edit_Show(data->editor); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
714 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
715 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
716 /* Set the colour for drawing title and scrollbar */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
717 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
718 resources_setTitleColour(COLOUR_EDITOR); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
719 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
720 /* TITLE */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
721 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
722 if (data->editor_data.zone_id & ZONE_TITLE) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
723 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
724 dspl_Clear(0,0, SCREEN_SIZE_X-1, editY-1); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
725 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
726 /* Display the title, if it exists */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
727 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
728 string.len = 0; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
729 string.dcs = ATB_DCS_ASCII; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
730 title.len = 0; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
731 title.dcs = ATB_DCS_ASCII; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
732 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
733 if (data->hasTitle) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
734 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
735 title.data = data->title.data; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
736 title.len = data->title.len; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
737 title.dcs = data->title.dcs; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
738 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
739 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
740 /* Uppercase/lowercase indicator */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
741 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
742 if (!ATB_edit_Mode(editor, ED_MODE_READONLY)) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
743 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
744 switch(ATB_edit_GetCasePref(editor)) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
745 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
746 case ED_CASEPREF_ALPHA_UC: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
747 case ED_CASEPREF_ALPHANUM_UC: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
748 string.data = (UBYTE *)ED_IND_UPPER; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
749 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
750 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
751 case ED_CASEPREF_ALPHA_LC: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
752 case ED_CASEPREF_ALPHANUM_LC: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
753 string.data = (UBYTE *)ED_IND_LOWER; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
754 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
755 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
756 case ED_CASEPREF_ALPHANUM: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
757 if (ATB_edit_GetCase(editor)==ED_CASE_UPPER) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
758 string.data = (UBYTE *)ED_IND_UPPER; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
759 else if (ATB_edit_GetCase(editor)==ED_CASE_LOWER) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
760 string.data = (UBYTE *)ED_IND_LOWER; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
761 else if (ATB_edit_GetCase(editor)==ED_CASE_CAPS) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
762 string.data = (UBYTE *)ED_IND_CAPS; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
763 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
764 string.data = (UBYTE *)ED_IND_NUM; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
765 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
766 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
767 case ED_CASEPREF_NUM: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
768 string.data = (UBYTE *)ED_IND_NUM; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
769 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
770 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
771 default: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
772 string.data = (UBYTE *)ED_IND_NONE; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
773 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
774 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
775 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
776 string.len = ATB_string_Length(&string); |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
777 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
778 #ifdef EASY_TEXT_ENABLED |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
779 /* Display predicted word in header */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
780 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
781 if(ATB_edit_Mode(editor, ED_MODE_PREDTEXT) && FFS_flashData.PredTextSelected) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
782 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
783 if (ATB_edit_CapitaliseWord(data->editor)) /* Word is capitalised */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
784 string.data = (UBYTE *)ED_IND_CAPS; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
785 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
786 string.data = (UBYTE *)ED_IND_LOWER; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
787 string.len = ATB_string_Length(&string); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
788 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
789 if(data->predText.len!=0) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
790 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
791 title.data = data->predText.data; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
792 title.len = data->predText.len; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
793 title.dcs = data->predText.dcs; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
794 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
795 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
796 #endif |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
797 if (ATB_edit_Mode(editor, ED_MODE_ALPHA) && title.len==0) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
798 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
799 /* SPR#1995 - SH - 'size' includes null terminator, so |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
800 * remaining characters is size-1 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
801 #ifdef LSCREEN |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
802 sprintf(lengthIndC, "%d/%d", textLen, editor->attr->size-1); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
803 #else |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
804 sprintf(lengthIndC, "%d", editor->attr->size-textLen-1); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
805 #endif |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
806 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
807 title.data = (UBYTE *)lengthIndC; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
808 title.len = ATB_string_Length(&title); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
809 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
810 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
811 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
812 /* Draw the string to the right of the editor - the case/format indicator, and icons (if appropriate) */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
813 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
814 stringWidth = 0; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
815 stringHeight = 0; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
816 showIcons = FALSE; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
817 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
818 if (string.len) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
819 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
820 TRACE_EVENT("Displaying string on right"); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
821 ATB_display_SetFormatAttr(&format, 0, FALSE); /* Set format to format at cursor */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
822 stringWidth = ATB_display_StringWidth(&string, &format)+2; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
823 stringHeight = ATB_display_StringHeight(&string, &format); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
824 ATB_display_Text(SCREEN_SIZE_X-stringWidth+2,0, &format, &string); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
825 showIcons = TRUE; /* If showing case, show icons */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
826 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
827 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
828 #ifdef EASY_TEXT_ENABLED |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
829 /* Display ezitext icon to the left of the case indicator */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
830 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
831 if(ATB_edit_Mode(editor, ED_MODE_PREDTEXT) && FFS_flashData.PredTextSelected == TRUE) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
832 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
833 if (data->predText.len==0) // Show icons only if there's no predicted text entry currently |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
834 showIcons = TRUE; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
835 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
836 showIcons = FALSE; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
837 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
838 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
839 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
840 /* Show icons to the left of the case indicator */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
841 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
842 if (showIcons) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
843 { |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
844 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
845 #ifdef EASY_TEXT_ENABLED |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
846 /* Display ezitext icon to the left of the case indicator */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
847 if(ATB_edit_Mode(editor, ED_MODE_PREDTEXT) && FFS_flashData.PredTextSelected == TRUE) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
848 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
849 stringWidth += 8; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
850 dspl_BitBlt(SCREEN_SIZE_X-stringWidth+2, |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
851 0,8,8,0,(char*)TextIconeZiTextSmall,0); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
852 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
853 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
854 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
855 if (stringHeight<Mmi_layout_line_height()) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
856 stringHeight = Mmi_layout_line_height(); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
857 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
858 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
859 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
860 /* Draw the string to the left of the screen - the editor title, or the number of characters |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
861 * remaining free in the buffer, or the predicted text word. */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
862 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
863 titleWidth = 0; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
864 titleHeight = 0; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
865 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
866 if (title.len) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
867 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
868 ATB_display_SetFormatAttr(&format, 0, FALSE); /* Clear format */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
869 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
870 titleWidth = ATB_display_StringWidth(&title, &format)+2; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
871 titleHeight = ATB_display_StringHeight(&title, &format); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
872 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
873 /* Check to see if title fits into top line - if it doesn't, |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
874 * we will need display a section of it. */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
875 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
876 if (titleWidth>(SCREEN_SIZE_X-stringWidth-2)) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
877 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
878 /* Create timer if it doesn't exist */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
879 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
880 if (!data->title_timer) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
881 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
882 data->title_timer = tim_create(data->win, 3000, (T_MFW_CB)AUI_edit_TitleTimerCb); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
883 data->title_pos = 0; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
884 data->title_next_pos = 0; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
885 tim_start(data->title_timer); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
886 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
887 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
888 titleWidth = 0; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
889 textIndex = data->title_pos; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
890 lastSpace = 0; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
891 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
892 while (titleWidth<(SCREEN_SIZE_X-stringWidth-2) && textIndex<title.len) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
893 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
894 character = ATB_string_GetChar(&title, textIndex); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
895 titleWidth+=ATB_display_GetCharWidth(character, &format); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
896 textIndex++; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
897 if (character==UNICODE_SPACE) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
898 lastSpace = textIndex; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
899 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
900 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
901 TRACE_EVENT_P1("Characters that fit: %d", textIndex); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
902 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
903 /* Calculate next start position */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
904 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
905 if (textIndex==title.len) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
906 data->title_next_pos = 0; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
907 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
908 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
909 /* Word wrap to last space, if there was one */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
910 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
911 if (lastSpace>0) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
912 textIndex = lastSpace; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
913 data->title_next_pos = textIndex; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
914 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
915 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
916 TRACE_EVENT_P1("Next position: %d", data->title_next_pos); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
917 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
918 newTitle.len = textIndex-data->title_pos; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
919 newTitle.data = (UBYTE *)ALLOC_MEMORY((newTitle.len+1)*ATB_string_Size(&title)); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
920 newTitle.dcs = title.dcs; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
921 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
922 for (textIndex=0; textIndex<newTitle.len; textIndex++) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
923 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
924 ATB_string_SetChar(&newTitle, textIndex, ATB_string_GetChar(&title, data->title_pos+textIndex)); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
925 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
926 ATB_string_SetChar(&newTitle, newTitle.len, UNICODE_EOLN); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
927 // Shashi Shekar B.S., a0876501, Jan 16, 2006, DR: OMAPS00061460 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
928 #ifdef FF_MMI_SAT_ICON |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
929 /* Check if the icon is self-explanatory, GSM 11.14, Sec 6.5.4, 12.32. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
930 If the icon is to displayed, move the text by icon width. */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
931 if (editor->attr->TitleIcon.selfExplanatory == FALSE) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
932 ATB_display_Text(titleIconWidth+1,0,&format, &newTitle); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
933 #else |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
934 ATB_display_Text(0,0,&format, &newTitle); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
935 #endif |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
936 FREE_MEMORY((UBYTE *)newTitle.data, (newTitle.len+1)*ATB_string_Size(&title)); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
937 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
938 else |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
939 // Shashi Shekar B.S., a0876501, Jan 16, 2006, DR: OMAPS00061460 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
940 #ifdef FF_MMI_SAT_ICON |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
941 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
942 /* Check if the icon is self-explanatory, GSM 11.14, Sec 6.5.4, 12.32. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
943 If the icon is to displayed, move the text by icon width. */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
944 if (editor->attr->TitleIcon.selfExplanatory == FALSE) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
945 ATB_display_Text(titleIconWidth+1,0,&format, &title); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
946 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
947 #else |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
948 ATB_display_Text(0,0,&format, &title); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
949 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
950 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
951 #ifdef EASY_TEXT_ENABLED |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
952 /* Provides a cursor in the predicted word, so the user can tell which of the characters |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
953 * entered are being used to select the word. */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
954 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
955 if(ATB_edit_Mode(editor, ED_MODE_PREDTEXT) && FFS_flashData.PredTextSelected && data->predText.len!=0) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
956 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
957 ATB_display_Cursor(&data->predText, data->predTextChar.pos, ED_CURSOR_BLOCK, |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
958 data->predTextChar.lineWidth, 0, data->predTextChar.width, data->predTextChar.height); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
959 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
960 #endif |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
961 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
962 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
963 // Shashi Shekar B.S., a0876501, Jan 16, 2006, DR: OMAPS00061460 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
964 #ifdef FF_MMI_SAT_ICON |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
965 if(editor->attr->TitleIcon.data != NULL) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
966 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
967 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
968 if (titleHeight == 0) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
969 titleHeight = TITLE_ICON_HEIGHT; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
970 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
971 /* Display '?' icon if the size is bigger, |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
972 else display the icon*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
973 if ((editor->attr->TitleIcon.width > TITLE_ICON_WIDTH) || (editor->attr->TitleIcon.height > TITLE_ICON_HEIGHT)) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
974 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
975 /* iconY calculates place hoilder to place the icon |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
976 at the center of the screen. */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
977 iconX = 1; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
978 iconY = 1+ ((titleHeight-2) / 2) - (10 / 2); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
979 dspl_BitBlt2(iconX, iconY, 8, |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
980 10, (void*)SATIconQuestionMark, 0, BMP_FORMAT_256_COLOUR); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
981 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
982 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
983 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
984 /* iconY calculates place hoilder to place the icon |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
985 at the center of the screen. */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
986 iconX = 1; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
987 iconY = 1+ ((titleHeight-2) / 2) - (editor->attr->TitleIcon.height / 2); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
988 dspl_BitBlt2(iconX, iconY, editor->attr->TitleIcon.width, editor->attr->TitleIcon.height, |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
989 (void*)editor->attr->TitleIcon.data, 0, BMP_FORMAT_256_COLOUR); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
990 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
991 } |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
992 #endif |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
993 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
994 /* Draw line on top */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
995 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
996 if (stringHeight>titleHeight) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
997 titleHeight = stringHeight; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
998 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
999 /* Non colour display - draw line between title texts*/ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1000 #ifndef LSCREEN |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1001 if (titleHeight>0) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1002 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1003 if (stringWidth==0) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1004 stringWidth = 1; /* Make sure end of line is on-screen */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1005 dspl_DrawLine(titleWidth, titleHeight/2, SCREEN_SIZE_X-stringWidth, titleHeight/2); /* Line between title & indicator */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1006 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1007 #endif |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1008 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1009 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1010 /* SCROLLBAR */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1011 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1012 if (data->editor_data.zone_id & ZONE_SCROLLBAR) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1013 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1014 dspl_Clear(editX+editWidth, editY, editX+editWidth+ED_SCROLLBAR_WIDTH-1, editY+editHeight-1); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1015 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1016 /* Vertical scrollbar - only show if editor is taller than view size */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1017 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1018 if (editor->totalHeight > 0 && editor->viewHeight<editor->totalHeight) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1019 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1020 dspl_DrawLine(editX+editWidth, editY, editX+editWidth, editY+editHeight-1); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1021 scrollBarSize = editor->viewHeight * editHeight / editor->totalHeight; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1022 if (scrollBarSize>editHeight) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1023 scrollBarSize = editHeight; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1024 scrollBarPos = editor->viewStartPos * editHeight / editor->totalHeight; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1025 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1026 dspl_DrawLine(editX+editWidth+1, editY+scrollBarPos, editX+editWidth+1, |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1027 editY+scrollBarPos+scrollBarSize); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1028 dspl_DrawLine(editX+editWidth+2, editY+scrollBarPos, editX+editWidth+2, |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1029 editY+scrollBarPos+scrollBarSize); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1030 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1031 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1032 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1033 /* SOFTKEYS */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1034 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1035 if (data->editor_data.zone_id & ZONE_SOFTKEYS) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1036 { |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1037 #ifdef EASY_TEXT_ENABLED |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1038 /* If a word is being entered, display OK and Delete */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1039 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1040 if (ATB_edit_Mode(data->editor, ED_MODE_PREDTEXT) && data->predText.len!=0 && FFS_flashData.PredTextSelected == TRUE) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1041 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1042 leftSK = TxtSoftOK; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1043 rightSK = TxtDelete; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1044 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1045 else |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1046 #endif |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1047 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1048 /* Entered less than the required number of chars: Alternate Left Softkey appears */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1049 if (textLen < data->editor_data.min_enter) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1050 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1051 leftSK = data->editor_data.AltLeftSoftKey; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1052 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1053 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1054 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1055 leftSK = data->editor_data.LeftSoftKey; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1056 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1057 /* Buffer is empty and alternative rsk enabled: alternative rsk appears */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1058 if (textLen==0 && data->editor_data.change_rsk_on_empty) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1059 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1060 rightSK = data->editor_data.AltRightSoftKey; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1061 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1062 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1063 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1064 rightSK = data->editor_data.RightSoftKey; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1065 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1066 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1067 displaySoftKeys(leftSK, rightSK); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1068 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1069 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1070 /* Finished drawing screen */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1071 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1072 break; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
1073 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1074 default: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1075 return MFW_EVENT_PASSED; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1076 // break; // RAVI |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1077 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1078 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1079 data->editor->update = ED_UPDATE_DEFAULT; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
1080 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1081 return MFW_EVENT_CONSUMED; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1082 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1083 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1084 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1085 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1086 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1087 $Function: AUI_edit_KbdCb |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1088 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1089 $Description: Editor keyboard event handler |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1090 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1091 $Returns: None. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1092 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1093 $Arguments: event - the keyboard event |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1094 keyboard |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1095 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1096 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1097 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1098 static int AUI_edit_KbdCb(T_MFW_EVENT event, T_MFW_KBD *keyboard) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1099 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1100 T_MFW_HND win = mfw_parent (mfw_header()); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1101 T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1102 T_AUI_EDITOR_INFO *data = (T_AUI_EDITOR_INFO *)win_data->user; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1103 #if (BOARD != 61) && defined(EASY_TEXT_ENABLED) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1104 T_ATB_TEXT *PredText = &data->predText; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1105 USHORT character; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
1106 #endif |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1107 ED_RES result; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1108 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1109 TRACE_FUNCTION("AUI_edit_KbdCb()"); |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
1110 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1111 /* Suppress unwanted long keypresses */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1112 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1113 data->doNextLongPress = TRUE; /* next Key_long event is correct */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1114 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1115 /* Restart the timer */ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
1116 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1117 if (data->timer !=NULL) |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1118 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1119 tim_stop(data->timer); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1120 tim_start(data->timer); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1121 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1122 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1123 #ifdef EASY_TEXT_ENABLED |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1124 if (FFS_flashData.PredTextSelected==FALSE || !ATB_edit_Mode(data->editor, ED_MODE_PREDTEXT)) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1125 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1126 /* Predictive text is off */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1127 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1128 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1129 switch (keyboard->code) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1130 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1131 /* UP key */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1132 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1133 case KCD_MNUUP: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1134 /* For DSample, up and down move cursor up and down a line in all modes */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1135 #ifdef LSCREEN |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1136 ATB_edit_MoveCursor(data->editor, ctrlUp, TRUE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1137 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1138 /* For other samples, up and down move left and right when not in read only mode */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1139 #else |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1140 if (ATB_edit_Mode(data->editor, ED_MODE_READONLY)) /* Acts as up key in read-only mode */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1141 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1142 ATB_edit_MoveCursor(data->editor, ctrlUp, TRUE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1143 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1144 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1145 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1146 ATB_edit_MoveCursor(data->editor, ctrlRight, TRUE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1147 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1148 #endif |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1149 data->editor->update = ED_UPDATE_TRIVIAL; /* This flag speeds up update */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1150 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1151 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1152 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1153 /* DOWN key */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1154 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1155 case KCD_MNUDOWN: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1156 /* For DSample, up and down move cursor up and down a line in all modes */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1157 #ifdef LSCREEN |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1158 ATB_edit_MoveCursor(data->editor, ctrlDown, TRUE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1159 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1160 /* For other samples, up and down move left and right when not in read only mode */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1161 #else |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1162 if (ATB_edit_Mode(data->editor, ED_MODE_READONLY)) /* Act as down key in read-only mode */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1163 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1164 ATB_edit_MoveCursor(data->editor, ctrlDown, TRUE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1165 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1166 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1167 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1168 ATB_edit_MoveCursor(data->editor, ctrlLeft, TRUE); /* Otherwise, move cursor left */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1169 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1170 #endif |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1171 data->editor->update = ED_UPDATE_TRIVIAL; /* This flag speeds up update - no change to text */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1172 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1173 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1174 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1175 /* For DSample, left and right keys move cursor left and right */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1176 #ifdef LSCREEN |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1177 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1178 /* MENU LEFT */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1179 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1180 case KCD_MNULEFT: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1181 ATB_edit_MoveCursor(data->editor, ctrlLeft, TRUE); /* Move cursor left */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1182 data->editor->update = ED_UPDATE_TRIVIAL; /* This flag speeds up update - no change to text */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1183 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1184 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1185 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1186 /* MENU RIGHT */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1187 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1188 case KCD_MNURIGHT: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1189 ATB_edit_MoveCursor(data->editor, ctrlRight, TRUE); /* Move cursor right */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1190 data->editor->update = ED_UPDATE_TRIVIAL; /* This flag speeds up update - no change to text */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1191 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1192 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1193 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1194 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1195 /* LEFT SOFT KEY */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1196 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1197 case KCD_LEFT: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1198 if (data->editor_data.editor_attr.text.len < data->editor_data.min_enter) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1199 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1200 /* Entered less than the required number of chars */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1201 if (data->editor_data.AltLeftSoftKey!=TxtNull) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1202 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1203 /* an alternate softkey is defined: execute it */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1204 SEND_EVENT (win, E_ED_DEINIT, INFO_KCD_ALTERNATELEFT, NULL); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1205 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1206 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1207 else if (data->editor_data.LeftSoftKey!=TxtNull) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1208 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1209 /* Left Softkey is enabled (and entered sufficient number of chars): execute it |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1210 * get the orginal text back into the editor instead of the hide buffer ( only filled with '*') */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1211 if (ATB_edit_Mode(data->editor, ED_MODE_HIDDEN)) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1212 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1213 ATB_edit_HiddenExit(data->editor); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1214 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1215 SEND_EVENT (win, E_ED_DEINIT, INFO_KCD_LEFT, NULL); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1216 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1217 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1218 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1219 /* HANGUP key */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1220 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1221 case KCD_HUP: |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1222 if (data->editor_data.RightSoftKey NEQ TxtNull) /* Right softkey is enabled: execute it */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1223 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1224 SEND_EVENT (win, E_ED_DEINIT, INFO_KCD_HUP, NULL); /* Deinitialise the editor */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1225 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1226 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1227 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1228 /* SEND KEY */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1229 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1230 case KCD_CALL: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1231 if (data->editor_data.editor_attr.text.len >= data->editor_data.min_enter) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1232 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1233 /* Send this event to generate an MO call in SMS editor */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1234 SEND_EVENT (win, E_ED_DEINIT, INFO_KCD_CALL, NULL); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1235 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1236 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1237 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1238 /* RIGHT SOFT KEY */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1239 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1240 case KCD_RIGHT: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1241 TRACE_EVENT("KCD_RIGHT"); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1242 if (ATB_edit_Mode(data->editor, ED_MODE_READONLY)) /* in read only mode, */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1243 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1244 TRACE_EVENT("SENDING DEINIT EVENT"); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1245 SEND_EVENT (win, E_ED_DEINIT, INFO_KCD_RIGHT, NULL); /* just deinitialise editor */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1246 } |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1247 else /* otherwise, RSK acts as clear key */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1248 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1249 /* If multitap is in progress, delete current character |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1250 * rather than previous character */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1251 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1252 if (data->editor->multitap) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1253 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1254 AUI_entry_StopMultitap(data->entry_data); /* Cancel multitap */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1255 result = ATB_edit_DeleteRight(data->editor, TRUE); /* SPR#2342 - SH */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1256 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1257 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1258 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1259 result = ATB_edit_DeleteLeft(data->editor, TRUE); /* SPR#2342 - SH */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1260 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1261 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1262 /* If we delete from first character in the editor, exit editor */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1263 if (result==ED_DONE) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1264 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1265 SEND_EVENT (win, E_ED_DEINIT, INFO_KCD_RIGHT, NULL); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1266 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1267 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1268 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1269 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1270 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1271 } |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1272 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1273 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1274 /* Switch text mode: uppercase, lowercase */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1275 case KCD_HASH: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1276 if (ATB_edit_Mode(data->editor, ED_MODE_ALPHA)) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1277 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1278 // Jul 22,2004 CRR:21605 xrashmic - SASKEN |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1279 // The user has explicitly changed the case. When |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1280 // the editor becomes empty, we should not reset the |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1281 // case to sentence case |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1282 CaseChanged=TRUE; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1283 switch(ATB_edit_GetCase(data->editor)) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1284 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1285 case ED_CASE_LOWER: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1286 // Jul 22,2004 CRR:21605 xrashmic - SASKEN |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1287 // The user has changed the case to sentence case. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1288 // when the editor becomes empty, we have to reset |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1289 // the case to sentence case. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1290 CaseChanged=FALSE; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1291 ATB_edit_SetCase(data->editor, ED_CASE_CAPS); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1292 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1293 case ED_CASE_CAPS: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1294 ATB_edit_SetCase(data->editor, ED_CASE_UPPER); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1295 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1296 case ED_CASE_UPPER: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1297 ATB_edit_SetCase(data->editor, ED_CASE_LOWER); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1298 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1299 /* If easy text selected, switch to it */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1300 #ifdef EASY_TEXT_ENABLED |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1301 if (ATB_edit_Mode(data->editor, ED_MODE_PREDTEXT) && FFS_flashData.PredTextAvailable) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1302 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1303 FFS_flashData.PredTextSelected = TRUE; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1304 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1305 #endif |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1306 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1307 case ED_CASE_NUM: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1308 ATB_edit_SetCase(data->editor, ED_CASE_LOWER); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1309 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1310 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1311 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1312 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1313 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1314 /* SPR#1788 - SH - Forbid '#' entry in read only mode */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1315 if (!ATB_edit_Mode(data->editor, ED_MODE_READONLY)) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1316 AUI_entry_EventKey(data->entry_data, event, keyboard); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1317 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1318 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1319 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1320 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1321 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1322 case (KCD_STAR): |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1323 /* If we're in apha mode and not in read-only mode, display the symbol screen */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1324 if (ATB_edit_Mode(data->editor, ED_MODE_ALPHA) && !ATB_edit_Mode(data->editor, ED_MODE_READONLY)) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1325 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1326 AUI_symbol_Start (data->win, E_ED_INSERT); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1327 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1328 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1329 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1330 /* SPR#1788 - SH - Allow '*' to be entered in numeric mode */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1331 if (!ATB_edit_Mode(data->editor, ED_MODE_READONLY)) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1332 AUI_entry_EventKey(data->entry_data, event, keyboard); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1333 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1334 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1335 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1336 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1337 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1338 /* KEY ENTRY 0 - 9 */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1339 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1340 case KCD_0: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1341 case KCD_1: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1342 case KCD_2: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1343 case KCD_3: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1344 case KCD_4: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1345 case KCD_5: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1346 case KCD_6: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1347 case KCD_7: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1348 case KCD_8: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1349 case KCD_9: |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1350 if (!ATB_edit_Mode(data->editor, ED_MODE_READONLY)) |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1351 { |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1352 AUI_entry_EventKey(data->entry_data, event, keyboard); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1353 win_show(data->win); |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1354 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1355 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1356 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1357 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1358 #ifdef EASY_TEXT_ENABLED |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1359 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1360 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1361 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1362 /* Short key press in EasyText */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1363 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1364 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1365 if(FFS_flashData.PredTextAvailable == TRUE) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1366 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1367 switch (keyboard->code) |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1368 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1369 case KCD_MNUUP: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1370 if(PredText->len==0) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1371 { |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1372 #ifdef LSCREEN |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1373 ATB_edit_MoveCursor(data->editor, ctrlUp, TRUE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1374 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1375 /* For other samples, up and down move left and right when not in read only mode */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1376 #else |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1377 ATB_edit_MoveCursor(data->editor,ctrlRight, TRUE); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1378 #endif |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1379 data->editor->update = ED_UPDATE_TRIVIAL; /* This flag speeds up update */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1380 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1381 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1382 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1383 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1384 case KCD_MNUDOWN: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1385 if(PredText->len==0) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1386 { |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1387 #ifdef LSCREEN |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1388 ATB_edit_MoveCursor(data->editor, ctrlDown, TRUE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1389 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1390 /* For other samples, up and down move left and right when not in read only mode */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1391 #else |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1392 ATB_edit_MoveCursor(data->editor,ctrlLeft, TRUE); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1393 #endif |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1394 data->editor->update = ED_UPDATE_TRIVIAL; /* This flag speeds up update */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1395 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1396 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1397 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1398 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1399 #ifdef LSCREEN |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1400 case KCD_MNURIGHT: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1401 if(PredText->len==0) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1402 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1403 ATB_edit_MoveCursor(data->editor, ctrlRight, TRUE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1404 data->editor->update = ED_UPDATE_TRIVIAL; /* This flag speeds up update */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1405 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1406 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1407 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1408 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1409 case KCD_MNULEFT: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1410 if(PredText->len==0) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1411 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1412 ATB_edit_MoveCursor(data->editor,ctrlLeft, TRUE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1413 data->editor->update = ED_UPDATE_TRIVIAL; /* This flag speeds up update */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1414 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1415 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1416 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1417 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1418 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1419 case KCD_LEFT: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1420 if(PredText->len==0) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1421 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1422 if (data->editor_data.LeftSoftKey NEQ TxtNull) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1423 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1424 SEND_EVENT (win, E_ED_DEINIT, INFO_KCD_LEFT, NULL); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1425 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1426 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1427 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1428 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1429 if ((data->editor_data.editor_attr.text.len + PredText->len) < data->editor_data.editor_attr.size) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1430 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1431 if (ATB_string_GetChar(PredText,0)!=UNICODE_STAR) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1432 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1433 /* Capitalise first letter of words and the letter 'I' */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1434 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1435 if (ATB_edit_CapitaliseWord(data->editor) || (PredText->len==1 && ATB_string_GetChar(PredText, 0)==ATB_char_Unicode('i'))) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1436 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1437 ATB_string_SetChar(PredText, 0, ATB_edit_FindCapital(ATB_string_GetChar(PredText, 0)));/*SPR1508*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1438 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1439 character = ATB_edit_GetCursorChar(data->editor, -1); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1440 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1441 if ( character != UNICODE_SPACE && character != UNICODE_EOLN) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1442 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1443 ATB_string_MoveRight(PredText,0,1,ED_PREDTEXT_MAX); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1444 ATB_string_SetChar(PredText, 0, UNICODE_SPACE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1445 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1446 ATB_edit_InsertString(data->editor,PredText); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1447 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1448 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1449 ResetDictSearch(); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1450 AUI_edit_ClearPredText(data); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1451 ATB_edit_SetCase(data->editor, ED_CASE_LOWER); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1452 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1453 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1454 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1455 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1456 case KCD_HUP: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1457 if (data->editor_data.RightSoftKey NEQ TxtNull) /* Right softkey is enabled: execute it */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1458 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1459 SEND_EVENT (win, E_ED_DEINIT, INFO_KCD_HUP, NULL); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1460 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1461 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1462 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1463 case KCD_RIGHT: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1464 if(PredText->len==0) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1465 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1466 if(ATB_string_GetChar(&data->editor_data.editor_attr.text, 0)!=UNICODE_EOLN) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1467 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1468 ATB_edit_Char(data->editor,ctrlBack,TRUE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1469 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1470 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1471 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1472 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1473 /* leave editor if buffer already empty */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1474 SEND_EVENT (win, E_ED_DEINIT, INFO_KCD_RIGHT, NULL); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1475 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1476 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1477 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1478 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1479 if (PredText->len==1) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1480 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1481 DictBackSpace((char *)data->predText.data); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1482 AUI_edit_ClearPredText(data); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1483 ATB_edit_SetCase(data->editor, ED_CASE_LOWER); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1484 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1485 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1486 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1487 DictBackSpace((char *)data->predText.data); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1488 data->predTextChar.pos--; /* char deleted, move cursor pos back */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1489 AUI_edit_CalcPredText(data); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1490 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1491 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1492 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1493 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1494 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1495 case KCD_2: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1496 case KCD_3: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1497 case KCD_4: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1498 case KCD_5: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1499 case KCD_6: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1500 case KCD_7: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1501 case KCD_8: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1502 case KCD_9: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1503 if (PredText->len==0) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1504 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1505 AUI_edit_ClearPredText(data); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1506 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1507 if (DictAlphaKeyPress(keyboard->code,(char *)PredText->data)) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1508 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1509 PredText->len = ATB_string_Length(PredText); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1510 data->predTextChar.pos++; /* The keypress was used to find a word, advance cursor */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1511 AUI_edit_CalcPredText(data); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1512 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1513 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1514 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1515 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1516 case KCD_HASH: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1517 switch(ATB_edit_GetCase(data->editor)) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1518 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1519 /* Press # once to switch into capitalise mode */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1520 case ED_CASE_CAPS: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1521 ATB_edit_SetCase(data->editor, ED_CASE_LOWER); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1522 /* Switch out of easy text mode, if we're not entering a word */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1523 if (PredText->len==0) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1524 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1525 FFS_flashData.PredTextSelected = FALSE; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1526 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1527 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1528 default: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1529 ATB_edit_SetCase(data->editor, ED_CASE_CAPS); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1530 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1531 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1532 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1533 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1534 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1535 case KCD_STAR: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1536 if (PredText->len==0) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1537 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1538 AUI_symbol_Start (data->win, E_ED_INSERT); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1539 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1540 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1541 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1542 int i; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1543 MoreCandidates((char *)PredText->data, &i); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1544 AUI_edit_CalcPredText(data); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1545 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1546 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1547 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1548 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1549 case KCD_0: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1550 case KCD_1: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1551 if (PredText->len!=0) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1552 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1553 if ((data->editor_data.editor_attr.text.len + PredText->len) < MAX_MSG_LEN) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1554 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1555 /* If char b4 cursor full stop/question/exclamation (or last char space and char b4 full stop) */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1556 if (ATB_edit_CapitaliseWord(data->editor) || (PredText->len==1 && ATB_string_GetChar(PredText,0)==ATB_char_Unicode('i'))) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1557 ATB_string_SetChar(PredText, 0, ATB_edit_FindCapital(ATB_string_GetChar(PredText, 0)));/*SPR1508*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1558 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1559 /* Capitalise first letter of char. If char before cursor not space, insert space */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1560 character = ATB_edit_GetCursorChar(data->editor, -1); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1561 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1562 if (ATB_string_GetChar(PredText, 0) != UNICODE_STAR) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1563 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1564 if (keyboard->code == KCD_1) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1565 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1566 /* Insert space at end of string */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1567 ATB_string_SetChar(PredText, PredText->len, UNICODE_SPACE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1568 PredText->len++; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1569 ATB_string_SetChar(PredText, PredText->len, UNICODE_EOLN); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1570 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1571 if ( character!=UNICODE_SPACE && character!=UNICODE_EOLN) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1572 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1573 /* Insert space at start of string */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1574 ATB_string_MoveRight(PredText, 0, 1, ED_PREDTEXT_MAX); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1575 ATB_string_SetChar(PredText, 0, UNICODE_SPACE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1576 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1577 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1578 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1579 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1580 /* Insert space and full stop at end of string */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1581 ATB_string_SetChar(PredText, PredText->len, UNICODE_FULLSTOP); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1582 PredText->len++; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1583 ATB_string_SetChar(PredText, PredText->len, UNICODE_SPACE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1584 PredText->len++; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1585 ATB_string_SetChar(PredText, PredText->len, UNICODE_EOLN); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1586 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1587 if ( character!=UNICODE_SPACE && character!=UNICODE_EOLN) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1588 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1589 /* Insert space at start of string */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1590 ATB_string_MoveRight(PredText, 0, 1, ED_PREDTEXT_MAX); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1591 ATB_string_SetChar(PredText, 0, UNICODE_SPACE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1592 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1593 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1594 ATB_edit_InsertString(data->editor, PredText); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1595 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1596 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1597 AUI_edit_ClearPredText(data); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1598 ResetDictSearch(); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1599 ATB_edit_SetCase(data->editor, ED_CASE_LOWER); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1600 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1601 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1602 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1603 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1604 /* Any key */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1605 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1606 default: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1607 if (!ATB_edit_Mode(data->editor, ED_MODE_READONLY)) /* ignore normal keys if in read-only mode */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1608 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1609 AUI_entry_EventKey(data->entry_data, event, keyboard); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1610 ATB_edit_Char(data->editor,ctrlBack,TRUE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1611 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1612 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1613 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1614 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1615 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1616 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1617 #endif |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
1618 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1619 return MFW_EVENT_CONSUMED; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1620 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1621 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1622 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1623 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1624 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1625 $Function: AUI_edit_KbdLongCb |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1626 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1627 $Description: Editor keyboard event handler for long keypresses |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1628 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1629 $Returns: None. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1630 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1631 $Arguments: event - the keyboard event |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1632 keyboard |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1633 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1634 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1635 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1636 static int AUI_edit_KbdLongCb(T_MFW_EVENT event, T_MFW_KBD *keyboard) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1637 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1638 T_MFW_HND win = mfw_parent (mfw_header()); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1639 T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1640 T_AUI_EDITOR_INFO *data = (T_AUI_EDITOR_INFO *)win_data->user; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1641 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1642 #if (BOARD != 61) && defined(EASY_TEXT_ENABLED) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1643 T_ATB_TEXT *PredText = &data->predText; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1644 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1645 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1646 ED_RES result; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
1647 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1648 #ifdef TRACE_AUIEditor |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1649 TRACE_FUNCTION("AUI_edit_KbdLongCb()"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1650 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1651 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1652 /* Suppress unwanted long keypresses */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1653 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1654 if ( data->doNextLongPress ) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1655 data->doNextLongPress = FALSE; /* mark Key_long event as consumed but do current long press */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1656 // Jul 29, 2004 REF: CRR:20892 xrashmic - SASKEN |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1657 // Description: By Long press on Left/Right key at 'Message Editor' screen, |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1658 // cursor not scrolling continuously |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1659 // Fix: The continuous long press of a key was being ignored for all keys. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1660 // Now only for left and right keys this is handled. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1661 else if(!(keyboard->code==KCD_MNULEFT ||keyboard->code== KCD_MNURIGHT)) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1662 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1663 return MFW_EVENT_CONSUMED; /* don't do current long press */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1664 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1665 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1666 /* Restart the timer */ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
1667 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1668 if (data->timer !=NULL) |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1669 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1670 tim_stop(data->timer); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1671 tim_start(data->timer); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1672 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1673 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1674 #ifdef EASY_TEXT_ENABLED |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1675 if (FFS_flashData.PredTextSelected == FALSE || !ATB_edit_Mode(data->editor, ED_MODE_PREDTEXT)) { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1676 /* Predictive text is off */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1677 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1678 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1679 switch (keyboard->code) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1680 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1681 // Jul 29, 2004 REF: CRR:20892 xrashmic - SASKEN |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1682 // Description: By Long press on Left/Right key at 'Message Editor' screen, |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1683 // cursor not scrolling continuously |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1684 // Fix: The Long press of left/right key is now handled in AUI_edit_KbdLongCB. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1685 case KCD_MNULEFT: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1686 ATB_edit_MoveCursor(data->editor, ctrlLeft, TRUE); /* Move cursor left */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1687 data->editor->update = ED_UPDATE_TRIVIAL; /* This flag speeds up update - no change to text */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1688 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1689 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1690 case KCD_MNURIGHT: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1691 ATB_edit_MoveCursor(data->editor, ctrlRight, TRUE); /* Move cursor right */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1692 data->editor->update = ED_UPDATE_TRIVIAL; /* This flag speeds up update - no change to text */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1693 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1694 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1695 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1696 case KCD_RIGHT: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1697 result = ATB_edit_ClearAll(data->editor); /* Otherwise, clear the editor */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1698 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1699 /* If buffer is empty, right soft key causes exit from editor */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1700 if (result==ED_DONE) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1701 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1702 SEND_EVENT (win, E_ED_DEINIT, INFO_KCD_RIGHT, NULL); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1703 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1704 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1705 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1706 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1707 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1708 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1709 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1710 /* KEY ENTRY 0 */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1711 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1712 case KCD_0: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1713 /* Alpha mode: insert a '0' */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1714 if (ATB_edit_Mode(data->editor, ED_MODE_ALPHA)) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1715 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1716 if (keyboard->code<=KCD_HASH) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1717 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1718 ATB_edit_DeleteLeft(data->editor, FALSE); /* SPR#2342 - SH */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1719 AUI_entry_EditDigit(data->entry_data, keyboard->code); // enter the character, not multi-tap |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1720 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1721 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1722 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1723 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1724 /* Number mode: insert a '+'*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1725 else if (!ATB_edit_Mode(data->editor, ED_MODE_READONLY)) /* ignore normal keys if in read-only mode */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1726 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1727 if (ATB_edit_Mode(data->editor, ED_MODE_HIDDEN)) /* in hidden mode do not allow entering of '+' */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1728 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1729 ATB_edit_DeleteLeft(data->editor, TRUE); /* remove the '0'. SPR#2342 - SH */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1730 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1731 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1732 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1733 ATB_edit_Char(data->editor,ctrlBack,FALSE); /* remove the '0' */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1734 ATB_edit_Char(data->editor,UNICODE_PLUS,TRUE); /* insert the '+' */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1735 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1736 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1737 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1738 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1739 case (KCD_STAR): |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1740 /* MZ cq11414 add Pause Character */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1741 ATB_edit_DeleteLeft(data->editor, FALSE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1742 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1743 //Sep 2, 2004 REF: CRR 21370 xkundadu |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1744 //Changed the long press of '*' key to display 'w' |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1745 AUI_entry_EditChar(data->entry_data, ATB_char_Unicode('w'), FALSE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1746 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1747 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1748 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1749 case (KCD_HASH): |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1750 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1751 /* In alphanumeric mode, a long hold of # selects number case */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1752 if (ATB_edit_GetCasePref(data->editor)==ED_CASEPREF_ALPHANUM) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1753 ATB_edit_SetCase(data->editor, ED_CASE_NUM); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1754 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1755 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1756 /* MZ cq11414 add Wait Character */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1757 ATB_edit_DeleteLeft(data->editor, FALSE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1758 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1759 //Sep 2, 2004 REF: CRR 21370 xkundadu |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1760 //Changed the long press of '#' key to display 'p' |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1761 AUI_entry_EditChar(data->entry_data, ATB_char_Unicode('p'), FALSE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1762 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1763 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1764 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1765 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1766 /* KEY ENTRY 1 - 9 */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1767 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1768 case KCD_1: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1769 case KCD_2: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1770 case KCD_3: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1771 case KCD_4: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1772 case KCD_5: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1773 case KCD_6: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1774 case KCD_7: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1775 case KCD_8: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1776 case KCD_9: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1777 /* Insert equivalent numeric character, only possible in Alpha modes */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1778 if (ATB_edit_Mode(data->editor, ED_MODE_ALPHA)) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1779 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1780 if (keyboard->code<=KCD_HASH) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1781 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1782 ATB_edit_DeleteLeft(data->editor, FALSE); /* SPR#2342 - SH */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1783 AUI_entry_EditDigit(data->entry_data, keyboard->code); // enter the character, not multi-tap |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1784 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1785 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1786 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1787 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1788 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1789 } |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
1790 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1791 #ifdef EASY_TEXT_ENABLED |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1792 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1793 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1794 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1795 if(FFS_flashData.PredTextAvailable == TRUE) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1796 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1797 switch (keyboard->code) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1798 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1799 // Jul 29, 2004 REF: CRR:20892 xrashmic - SASKEN |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1800 // Description: By Long press on Left/Right key at 'Message Editor' |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1801 // screen, cursor not scrolling continuously |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1802 // Fix: The Long press of left/right key is now handled in |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1803 // AUI_edit_KbdLongCB. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1804 case KCD_MNULEFT: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1805 ATB_edit_MoveCursor(data->editor, ctrlLeft, TRUE); /* Move cursor left */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1806 data->editor->update = ED_UPDATE_TRIVIAL; /* This flag speeds up update - no change to text */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1807 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1808 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1809 case KCD_MNURIGHT: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1810 ATB_edit_MoveCursor(data->editor, ctrlRight, TRUE); /* Move cursor right */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1811 data->editor->update = ED_UPDATE_TRIVIAL; /* This flag speeds up update - no change to text */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1812 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1813 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1814 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1815 case KCD_RIGHT: /*empty predictive text string */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1816 if(PredText->len!=0) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1817 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1818 PredText->len = 0; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1819 ATB_string_SetChar(PredText, 0, UNICODE_EOLN); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1820 ResetDictSearch(); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1821 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1822 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1823 else /*empty whole editor */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1824 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1825 if(data->editor_data.editor_attr.text.len > 0 ) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1826 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1827 ATB_edit_ClearAll(data->editor); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1828 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1829 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1830 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1831 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1832 /* leave editor if buffer already empty */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1833 SEND_EVENT (win, E_ED_DEINIT, INFO_KCD_RIGHT, NULL); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1834 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1835 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1836 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1837 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1838 case(KCD_STAR): |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1839 AUI_symbol_Start(data->win, E_ED_INSERT); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1840 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1841 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1842 case (KCD_HASH): |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1843 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1844 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1845 /* KEY ENTRY 1 - 9 */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1846 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1847 case KCD_0: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1848 case KCD_1: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1849 case KCD_2: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1850 case KCD_3: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1851 case KCD_4: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1852 case KCD_5: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1853 case KCD_6: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1854 case KCD_7: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1855 case KCD_8: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1856 case KCD_9: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1857 if(PredText->len==0) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1858 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1859 /* Insert equivalent numeric character, only possible in Alpha modes */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1860 if (ATB_edit_Mode(data->editor, ED_MODE_ALPHA)) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1861 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1862 if (keyboard->code<=KCD_HASH) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1863 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1864 ATB_edit_DeleteLeft(data->editor, FALSE); /* SPR#2342 - SH */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1865 AUI_entry_EditDigit(data->entry_data, keyboard->code); // enter the character, not multi-tap |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1866 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1867 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1868 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1869 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1870 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1871 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1872 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1873 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1874 #endif |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1875 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1876 return MFW_EVENT_CONSUMED; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1877 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1878 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1879 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1880 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1881 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1882 $Function: AUI_edit_TimerCb |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1883 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1884 $Description: Callback function for the editor info timer. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1885 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1886 $Returns: None. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1887 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1888 $Arguments: event - the event type |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1889 timer - the timer |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
1890 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1891 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1892 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1893 static int AUI_edit_TimerCb (T_MFW_EVENT event, T_MFW_TIM *timer) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1894 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1895 T_MFW_HND win = mfw_parent (mfw_header()); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1896 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1897 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1898 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1899 // T_MFW_HND parent_win = data->parent; // RAVI |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1900 // USHORT Identifier = data->editor_data.Identifier; // RAVI |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1901 // T_AUI_EDIT_CB Callback = data->editor_data.Callback; // RAVI |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1902 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1903 TRACE_FUNCTION("AUI_edit_TimerCb"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1904 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1905 #if 0 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1906 AUI_edit_Destroy(data->win); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1907 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1908 if (Callback) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1909 (Callback) (parent_win, Identifier, INFO_TIMEOUT); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1910 #else |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1911 SEND_EVENT (win, E_ED_DEINIT, INFO_TIMEOUT, NULL); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1912 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1913 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1914 return MFW_EVENT_CONSUMED; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1915 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1916 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1917 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1918 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1919 $Function: AUI_edit_TitleTimerCb |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1920 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1921 $Description: Callback function for the editor title timer. Recalculates title_pos so that |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1922 the next part of the string is displayed. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1923 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1924 $Returns: None. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1925 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1926 $Arguments: event - the event type |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1927 timer - the timer |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
1928 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1929 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1930 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1931 static int AUI_edit_TitleTimerCb (T_MFW_EVENT event, T_MFW_TIM *timer) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1932 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1933 /* Use the mfwHeader property of the timer to get the window */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1934 T_MFW_HND win = mfw_parent(timer->mfwHeader); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1935 T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1936 T_AUI_EDITOR_INFO *data = (T_AUI_EDITOR_INFO *)win_data->user; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1937 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1938 TRACE_FUNCTION("AUI_edit_TitleTimerCb"); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1939 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1940 /* SPR#1597 - SH - Since there may be multiple timers running at once, only |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1941 call win_show if the window is focussed. */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1942 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1943 if (winIsFocussed(win)) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1944 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1945 if (data->title_next_pos!=data->title_pos) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1946 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1947 data->title_pos = data->title_next_pos; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1948 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1949 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1950 data->editor->update = ED_UPDATE_PARTIAL; /* Don't update editor text */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1951 win_show(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1952 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1953 tim_start(data->title_timer); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1954 } |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
1955 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1956 return MFW_EVENT_CONSUMED; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1957 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1958 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1959 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1960 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1961 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1962 $Function: AUI_edit_CalcPredText |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1963 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1964 $Description: Calculate properties of predicted text string. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1965 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1966 $Returns: None. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1967 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1968 $Arguments: data - The AUI editor data |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
1969 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1970 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1971 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1972 static void AUI_edit_CalcPredText(T_AUI_EDITOR_INFO *data) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1973 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1974 USHORT character; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1975 T_ATB_TEXT dummy; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1976 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1977 data->predText.len = ATB_string_Length(&data->predText); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1978 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1979 /* Get position of current entry */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1980 dummy.data = data->predText.data; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1981 dummy.dcs = data->predText.dcs; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1982 dummy.len = data->predTextChar.pos; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1983 data->predTextChar.lineWidth = ATB_display_StringWidth(&dummy, &data->predTextChar.format); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1984 data->predTextChar.lineHeight = ATB_display_StringHeight(&dummy, &data->predTextChar.format); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1985 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1986 /* Get width and height of current character */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1987 character = ATB_string_GetChar(&data->predText, data->predTextChar.pos); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1988 data->predTextChar.width = ATB_display_GetCharWidth(character, &data->predTextChar.format); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1989 data->predTextChar.height = ATB_display_GetCharHeight(character, &data->predTextChar.format); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1990 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1991 return; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1992 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1993 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1994 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1995 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1996 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1997 $Function: AUI_edit_ClearPredText |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1998 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1999 $Description: Clear the predictive text buffer |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2000 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2001 $Returns: None. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2002 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2003 $Arguments: data - The AUI editor data |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
2004 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2005 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2006 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2007 static void AUI_edit_ClearPredText(T_AUI_EDITOR_INFO *data) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2008 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2009 data->predText.len = 0; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2010 ATB_string_SetChar(&data->predText,0,UNICODE_EOLN); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2011 memset(&data->predTextChar, 0, sizeof(T_ED_CHAR)); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2012 return; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2013 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2014 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2015 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2016 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2017 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2018 $Function: AUI_edit_InsertString |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2019 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2020 $Description: Insert a string into the editor |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2021 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2022 $Returns: Pointer to the editor's window. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2023 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2024 $Arguments: win - The editor window |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2025 string - The string to insert |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2026 dcs - The dcs of the string |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
2027 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2028 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2029 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2030 void AUI_edit_InsertString(T_MFW_HND win, UBYTE *string, T_ATB_DCS dcs) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2031 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2032 T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2033 T_AUI_EDITOR_INFO *data = (T_AUI_EDITOR_INFO *)win_data->user; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2034 T_ATB_TEXT text; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2035 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2036 text.data = string; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2037 text.dcs = dcs; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2038 text.len = ATB_string_Length(&text); |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
2039 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2040 ATB_edit_InsertString(data->editor, &text); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2041 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2042 return; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2043 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2044 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2045 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2046 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2047 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2048 $Function: AUI_edit_InsertChar |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2049 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2050 $Description: Insert a character into the editor |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2051 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2052 $Returns: Pointer to the editor's window. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2053 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2054 $Arguments: win - The editor window |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2055 character - The character to insert |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
2056 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2057 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2058 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2059 void AUI_edit_InsertChar(T_MFW_HND win, USHORT character) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2060 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2061 T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2062 T_AUI_EDITOR_INFO *data = (T_AUI_EDITOR_INFO *)win_data->user; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2063 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2064 ATB_edit_Char(data->editor, character, TRUE); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2065 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2066 return; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2067 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2068 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2069 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2070 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2071 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2072 $Function: AUI_edit_GetSpecificWindowSIze |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2073 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2074 $Description: Sets up window size |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2075 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2076 $Returns: None. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2077 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2078 $Arguments: attr - The ATB editor attributes |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2079 zone_id - Specifies the window size (See ZONE_... in header file) |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2080 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2081 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2082 #ifndef LSCREEN |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2083 //Sizes defined for CSAMPLE editore |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2084 #define BOOKDETAILS_EDITOR_SIZE 0, 0, SCREEN_SIZE_X-4, Mmi_layout_line(LAST_LINE_TOP) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2085 #define NUMBER_EDITOR_SIZE 0, 12, SCREEN_SIZE_X , MNU3LINE |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2086 #define PHONEBOOK_DLG_EDITOR_SIZE 4, Mmi_layout_line(3)+2, SCREEN_SIZE_X-4, SCREEN_SIZE_Y-(Mmi_layout_line(3)+2) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2087 #define BOOKSDN_EDITOR_SIZE 34, Mmi_layout_line(3)+2, 50, Mmi_layout_line(1)+2 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2088 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2089 //MMIbooksearchwindow |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2090 //#define BOOKSEARCH_EDITOR_SIZE 0, Mmi_layout_line(SECOND_LAST_LINE_TOP), SCREEN_SIZE_X, Mmi_layout_line(1) |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2091 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2092 //MMICall |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2093 #define CALL_EDITOR_SIZE 4,28,SCREEN_SIZE_X-4, 20 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2094 #define CALLSCRATCHPAD_EDITOR_SIZE 6, Mmi_layout_line(2),SCREEN_SIZE_X-6, 16 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2095 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2096 //MMIServices |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2097 #define SERVICE_CREATE_EDITOR_SIZE 4,Mmi_layout_line(1)+2,SCREEN_SIZE_X-4, MNU3LINE |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2098 #define PASSWORD_EDITOR_SIZE 0, 12, SCREEN_SIZE_X , 13 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2099 #define EM_EDITOR_SIZE 0, 0, SCREEN_SIZE_X-4, Mmi_layout_line(LAST_LINE_TOP) |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2100 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2101 //From MMIIdle |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2102 //GW Changed window height from 30 (27?) to 24. |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2103 #define WIN_DIALLING_SIZE 0,Mmi_layout_line_icons(2), SCREEN_SIZE_X,24 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2104 #define WIN_DIALLING_C_SIZE 0,Mmi_layout_line_icons(1),SCREEN_SIZE_X,32 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2105 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2106 //Positions for editor windows in mmismssend |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2107 #define PHNO_EDITOR_SIZE 0, (Mmi_layout_line(1)+2), SCREEN_SIZE_X, 20 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2108 |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
2109 //NB defines below used twice, second time START/SIZE_Y was same as START/SIZE_Y above |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2110 #define CENTRE_EDITOR_SIZE 0, Mmi_layout_line(1), SCREEN_SIZE_X, MNU3LINE+3 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2111 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2112 //And for MMIServices - moved here from mmiservices.c |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2113 #define SAT_EDITOR_SIZE 6,30,SCREEN_SIZE_X-6, 20 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2114 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2115 #define RPWD_EDITOR_SIZE 0,12,SCREEN_SIZE_X,13 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2116 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2117 //MMIBookCallDetails |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2118 #define PHB_EDITOR_SIZE 4,0,SCREEN_SIZE_X-4, ALLBUT2LINE |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2119 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2120 //MMIPins |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2121 #define PIN_EDIT_RESET_SIZE 12,20,84-12,16 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2122 //MMITimeDate |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2123 #define TIMEDATE_EDITOR_AREA_SIZE 0,10,70,10 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2124 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2125 /* GW SPR#1840 26/03/03 - Copied from MMieditor.c*/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2126 #ifndef LSCREEN |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2127 static void setSize(T_ATB_WIN_SIZE *win, int px, int py, int sx, int sy) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2128 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2129 win->px = px; win->py = py; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2130 win->sx = sx; win->sy = sy; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2131 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2132 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2133 void AUI_edit_GetSpecificWindowSize(T_ED_ATTR* attr, int zone_id ) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2134 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2135 switch (zone_id) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2136 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2137 case ZONE_SMALL_EDITOR: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2138 attr->win_size.px = 6; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2139 attr->win_size.py = Mmi_layout_IconHeight()*2; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2140 attr->win_size.sx = SCREEN_SIZE_X-attr->win_size.px; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2141 attr->win_size.sy = Mmi_layout_line_height()*2+4; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2142 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2143 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2144 case ZONE_BOTTOM_LINE: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2145 attr->win_size.px = 0; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2146 attr->win_size.py = SCREEN_SIZE_Y - Mmi_layout_line_height() - Mmi_layout_softkeyHeight(); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2147 attr->win_size.sx = SCREEN_SIZE_X-attr->win_size.px; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2148 attr->win_size.sy = Mmi_layout_line_height(); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2149 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2150 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2151 case ZONE_BOTTOM_LINE_FIND: //used for phonebook search |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2152 attr->win_size.px = dspl_GetTextExtent(MmiRsrcGetText(TxtFind),0); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2153 attr->win_size.py = SCREEN_SIZE_Y - Mmi_layout_line_height() - Mmi_layout_softkeyHeight(); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2154 attr->win_size.sx = SCREEN_SIZE_X-attr->win_size.px; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2155 attr->win_size.sy = Mmi_layout_line_height(); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2156 break; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
2157 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2158 #ifndef LSCREEN |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2159 case BOOKDETAILS_EDITOR: setSize(&attr->win_size,BOOKDETAILS_EDITOR_SIZE); break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2160 case NUMBER_EDITOR: setSize(&attr->win_size,NUMBER_EDITOR_SIZE); break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2161 case PHONEBOOK_DLG_EDITOR: setSize(&attr->win_size,PHONEBOOK_DLG_EDITOR_SIZE); break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2162 case BOOKSDN_EDITOR: setSize(&attr->win_size,BOOKSDN_EDITOR_SIZE); break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2163 // case BOOKSEARCH_EDITOR: setSize(&attr->win_size,BOOKSEARCH_EDITOR_SIZE); break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2164 case CALL_EDITOR: setSize(&attr->win_size,CALL_EDITOR_SIZE); break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2165 case CALLSCRATCHPAD_EDITOR: setSize(&attr->win_size,CALLSCRATCHPAD_EDITOR_SIZE); break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2166 case SERVICE_CREATE_EDITOR: setSize(&attr->win_size,SERVICE_CREATE_EDITOR_SIZE); break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2167 case PASSWORD_EDITOR: setSize(&attr->win_size,PASSWORD_EDITOR_SIZE); break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2168 case EM_CREATE_EDITOR: setSize(&attr->win_size,EM_EDITOR_SIZE); break;/*SPR#1840*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2169 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2170 case WIN_DIALLING: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2171 case WIN_DIALLING_CB: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2172 if (Mmi_getCurrentLanguage() == CHINESE_LANGUAGE) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2173 setSize(&attr->win_size,WIN_DIALLING_C_SIZE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2174 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2175 setSize(&attr->win_size,WIN_DIALLING_SIZE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2176 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2177 case WIN_DIALLING_SMS: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2178 if (Mmi_getCurrentLanguage() == CHINESE_LANGUAGE) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2179 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2180 setSize(&attr->win_size,0,Mmi_layout_line_icons(1),SCREEN_SIZE_X,24);/*SPR#1840*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2181 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2182 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2183 setSize(&attr->win_size,WIN_DIALLING_SIZE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2184 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2185 case WIN_DIALLING_SAT: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2186 if (Mmi_getCurrentLanguage() == CHINESE_LANGUAGE) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2187 setSize(&attr->win_size,WIN_DIALLING_C_SIZE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2188 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2189 setSize(&attr->win_size,WIN_DIALLING_SIZE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2190 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2191 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2192 case PHNO_EDITOR: setSize(&attr->win_size,PHNO_EDITOR_SIZE); break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2193 case CENTRE_EDITOR: setSize(&attr->win_size,CENTRE_EDITOR_SIZE); break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2194 case SAT_EDITOR : setSize(&attr->win_size,SAT_EDITOR_SIZE); break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2195 case RPWD_EDITOR: setSize(&attr->win_size,RPWD_EDITOR_SIZE); break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2196 case PHB_EDITOR: setSize(&attr->win_size,PHB_EDITOR_SIZE); break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2197 case PIN_EDIT_RESET: setSize(&attr->win_size,PIN_EDIT_RESET_SIZE); break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2198 case TIMEDATE_EDITOR_AREA: setSize(&attr->win_size,TIMEDATE_EDITOR_AREA_SIZE); break; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
2199 #endif |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2200 default: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2201 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2202 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2203 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2204 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2205 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2206 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2207 $Function: AUI_edit_CalculateWindow |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2208 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2209 $Description: Sets up window size |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2210 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2211 $Returns: None. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2212 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2213 $Arguments: attr - The ATB editor attributes |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2214 zone_id - Specifies the window size (See ZONE_... in header file) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2215 SPR#1559 - SH - this is now a pointer to the zone_id, allowing |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2216 the zone_id to be modified by this function |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2217 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2218 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2219 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2220 void AUI_edit_CalculateWindow(T_ED_ATTR* attr, int *zone_id_pointer ) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2221 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2222 int zone_id = *zone_id_pointer; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2223 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2224 attr->win_size.px = 0; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2225 attr->win_size.py = 0; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2226 attr->win_size.sx = SCREEN_SIZE_X; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2227 attr->win_size.sy = SCREEN_SIZE_Y; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2228 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2229 if (zone_id == ZONE_BORDER_EDITOR) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2230 { //Leave border on left/right of screen. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2231 attr->win_size.px = 4; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2232 attr->win_size.sx = attr->win_size.sx - 2*attr->win_size.px; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2233 zone_id = ZONE_FULLSOFTKEYS; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2234 *zone_id_pointer = zone_id; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2235 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2236 else if ((zone_id != 0x0000) && ((zone_id &0xF000)==0xF000))/*SPR#1840*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2237 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2238 AUI_edit_GetSpecificWindowSize(attr,zone_id); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2239 return; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2240 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2241 else if (zone_id == 0) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2242 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2243 zone_id = ZONE_FULLSOFTKEYS; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2244 *zone_id_pointer = zone_id; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2245 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2246 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2247 if (zone_id & ZONE_ICONS) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2248 attr->win_size.py = attr->win_size.py + Mmi_layout_IconHeight(); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2249 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2250 if (zone_id & ZONE_SOFTKEYS) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2251 attr->win_size.sy = attr->win_size.sy - Mmi_layout_softkeyHeight(); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2252 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2253 if (zone_id & ZONE_TITLE) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2254 attr->win_size.py = attr->win_size.py + Mmi_layout_TitleHeight(); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2255 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2256 if (zone_id & ZONE_CASE_ABC) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2257 attr->win_size.sy = attr->win_size.sy - Mmi_layout_line_height(); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2258 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2259 if (zone_id & ZONE_SCROLLBAR) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2260 attr->win_size.sx = attr->win_size.sx - ED_SCROLLBAR_WIDTH; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2261 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2262 attr->win_size.sy = attr->win_size.sy - attr->win_size.py; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2263 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2264 if ((zone_id & ZONE_FULLSCREEN) == ZONE_FULLSCREEN) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2265 return; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2266 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2267 /*Else window is not entire screen */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2268 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2269 switch (zone_id & ZONE_FULL_HEIGHT) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2270 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2271 case ZONE_FULL_HEIGHT: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2272 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2273 case ZONE_TOPHALF_HEIGHT: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2274 attr->win_size.sy = attr->win_size.sy/2; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2275 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2276 case ZONE_MIDDLE_HEIGHT: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2277 attr->win_size.sy = attr->win_size.sy/2; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2278 attr->win_size.py = attr->win_size.py+attr->win_size.sy/2; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2279 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2280 case ZONE_BOTTOMHALF_HEIGHT: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2281 attr->win_size.sy = attr->win_size.sy/2; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2282 attr->win_size.py = attr->win_size.py+attr->win_size.sy; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2283 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2284 case ZONE_BOTTOMTWOLINES_HEIGHT: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2285 attr->win_size.py = attr->win_size.py+attr->win_size.sy-Mmi_layout_line_height()*2; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2286 attr->win_size.sy = Mmi_layout_line_height()*2; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2287 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2288 /* xreddymn OMAPS00075852 May-15-2006 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2289 * This display zone is located one line above the softkeys. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2290 */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2291 case ZONE_MIDDLETWOLINES_HEIGHT: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2292 attr->win_size.py = attr->win_size.py+attr->win_size.sy-Mmi_layout_line_height()*3; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2293 attr->win_size.sy = Mmi_layout_line_height()*2; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2294 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2295 default: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2296 //No action |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2297 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2298 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2299 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2300 switch (zone_id & ZONE_FULL_WIDTH) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2301 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2302 case ZONE_FULL_WIDTH: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2303 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2304 case ZONE_LEFTHALF_WIDTH: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2305 attr->win_size.sx = attr->win_size.sx/2; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2306 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2307 case ZONE_MIDDLE_WIDTH : |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2308 attr->win_size.sx = attr->win_size.sx/2; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2309 attr->win_size.px = attr->win_size.px+attr->win_size.sx/2; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2310 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2311 case ZONE_RIGHTHALF_WIDTH: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2312 attr->win_size.sx = attr->win_size.sx/2; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2313 attr->win_size.px = attr->win_size.px+attr->win_size.sx; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2314 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2315 default: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2316 //No action |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2317 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2318 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2319 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2320 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2321 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2322 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2323 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2324 $Function: AUI_edit_SetDefault |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2325 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2326 $Description: Sets up standard editor attributes. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2327 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2328 $Returns: None. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2329 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2330 $Arguments: editor_data - The MMI editor data that is to be modified. |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
2331 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2332 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2333 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2334 void AUI_edit_SetDefault(T_AUI_EDITOR_DATA *editor_data) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2335 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2336 /* Set everything to zero... */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2337 /* SPR#1559 - Move CalculateWindow to below */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2338 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2339 memset(editor_data, 0, sizeof(T_AUI_EDITOR_DATA)); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2340 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2341 /* Except these things... */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2342 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2343 editor_data->editor_attr.colour = COLOUR_EDITOR; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2344 editor_data->editor_attr.font = EDITOR_FONT; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2345 editor_data->editor_attr.cursor = ED_CURSOR_BAR; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2346 editor_data->editor_attr.mode = ED_MODE_ALPHA; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2347 editor_data->editor_attr.text.dcs = ATB_DCS_ASCII; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2348 editor_data->timeout = FOREVER; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2349 editor_data->destroyEditor = TRUE; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2350 editor_data->zone_id = ZONE_FULL_SK_TITLE; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2351 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2352 // Shashi Shekar B.S., a0876501, Jan 16, 2006, DR: OMAPS00061460 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2353 #ifdef FF_MMI_SAT_ICON |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2354 editor_data->editor_attr.TitleIcon.data = NULL; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2355 editor_data->editor_attr.TitleIcon.width = 0; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2356 editor_data->editor_attr.TitleIcon.height = 0; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2357 editor_data->editor_attr.TitleIcon.isTitle = FALSE; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2358 //x0035544 Mar 14, 2006 DR:OMAPS00061468 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2359 //set the default value for display_type to SAT_ICON_NONE |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2360 editor_data->editor_attr.TitleIcon.display_type = SAT_ICON_NONE; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2361 editor_data->editor_attr.TitleIcon.selfExplanatory = FALSE; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
2362 #endif |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2363 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2364 /* SPR#1559 - SH - CalculateWindow moved here; pointer to zone_id used */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2365 AUI_edit_CalculateWindow(&editor_data->editor_attr, &editor_data->zone_id); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2366 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2367 ATB_display_ClearFormat(&editor_data->editor_attr.startFormat); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2368 return; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2369 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2370 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2371 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2372 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2373 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2374 $Function: AUI_edit_SetDisplay |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2375 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2376 $Description: Sets up standard editor attributes. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2377 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2378 $Returns: None. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2379 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2380 $Arguments: editor_data - The MMI editor data that is to be modified. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2381 zone_id - Type of editor screen (see header file for ZONE_...) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2382 colour - Colour of the editor |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
2383 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2384 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2385 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2386 void AUI_edit_SetDisplay(T_AUI_EDITOR_DATA *editor_data, int zone_id, int colour, UBYTE font ) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2387 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2388 /* SPR#1559 - SH - Use pointer to zone_id */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2389 AUI_edit_CalculateWindow(&editor_data->editor_attr, &zone_id); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2390 editor_data->zone_id = zone_id; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2391 editor_data->editor_attr.colour = colour; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2392 editor_data->editor_attr.font = font; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2393 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2394 return; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2395 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2396 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2397 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2398 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2399 $Function: AUI_edit_SetEvents |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2400 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2401 $Description: Sets up standard editor attributes. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2402 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2403 $Returns: None. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2404 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2405 $Arguments: editor_data - The MMI editor data that is to be modified. |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2406 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2407 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2408 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2409 void AUI_edit_SetEvents(T_AUI_EDITOR_DATA *editor_data, USHORT Identifier, BOOL destroyEditor, ULONG timeout, T_AUI_EDIT_CB Callback) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2410 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2411 if (editor_data) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2412 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2413 editor_data->Identifier = Identifier; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2414 editor_data->destroyEditor = destroyEditor; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2415 editor_data->timeout = timeout; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2416 editor_data->Callback = Callback; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2417 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2418 return; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2419 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2420 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2421 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2422 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2423 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2424 $Function: AUI_edit_SetMode |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2425 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2426 $Description: Sets up standard editor attributes. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2427 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2428 $Returns: None. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2429 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2430 $Arguments: editor_data - The MMI editor data that is to be modified. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2431 mode - Editor mode (see header file for ED_MODE_...) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2432 cursor - Editor cursor (see header file for ED_CURSOR_...) |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
2433 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2434 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2435 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2436 void AUI_edit_SetMode(T_AUI_EDITOR_DATA *editor_data, USHORT mode, USHORT cursor ) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2437 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2438 if (editor_data) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2439 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2440 editor_data->editor_attr.mode = mode; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2441 editor_data->editor_attr.cursor = cursor; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2442 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2443 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2444 return; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2445 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2446 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2447 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2448 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2449 $Function: AUI_edit_SetBuffer |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2450 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2451 $Description: Sets up standard editor attributes. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2452 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2453 $Returns: None. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2454 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2455 $Arguments: editor_data - The MMI editor data that is to be modified. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2456 dcs - Data coding scheme of text (see ATB_DCS_...) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2457 text - The text in the appropriate coding scheme |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2458 size - Maximum size of the edit buffer in characters |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
2459 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2460 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2461 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2462 void AUI_edit_SetBuffer(T_AUI_EDITOR_DATA *editor_data, UBYTE dcs, UBYTE *text, USHORT size) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2463 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2464 if (editor_data) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2465 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2466 editor_data->editor_attr.text.dcs = dcs; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2467 editor_data->editor_attr.text.data = text; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2468 editor_data->editor_attr.text.len = ATB_string_Length(&editor_data->editor_attr.text); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2469 editor_data->editor_attr.size = size; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2470 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2471 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2472 return; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2473 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2474 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2475 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2476 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2477 $Function: AUI_edit_SetTextStr |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2478 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2479 $Description: Sets up standard editor attributes. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2480 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2481 $Returns: None. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2482 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2483 $Arguments: editor_data - The MMI editor data that is to be modified. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2484 LeftSoftKey, RightSoftKey - Text IDs of the softkeys |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2485 TitleId - Text ID for the title |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2486 TextString - Text string for the title, used if TitleId is 0 |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
2487 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2488 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2489 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2490 void AUI_edit_SetTextStr(T_AUI_EDITOR_DATA *editor_data, USHORT LeftSoftKey, USHORT RightSoftKey, USHORT TitleId, UBYTE *TitleString) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2491 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2492 if (editor_data) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2493 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2494 editor_data->LeftSoftKey = LeftSoftKey; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2495 editor_data->RightSoftKey = RightSoftKey; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2496 editor_data->AltRightSoftKey = RightSoftKey; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2497 editor_data->TitleId = TitleId; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2498 editor_data->TitleString = TitleString; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2499 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2500 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2501 return; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2502 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2503 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2504 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2505 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2506 $Function: AUI_edit_SetAltTextStr |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2507 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2508 $Description: Sets up standard editor attributes. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2509 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2510 $Returns: None. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2511 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2512 $Arguments: editor_data - The MMI editor data that is to be modified. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2513 min_enter - No of characters needed to be entered |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2514 AltLeftSoftKey - Text ID of alternate left softkey |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2515 change_rsk_on_empty - TRUE if alternative right soft key is used for |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2516 empty buffer |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2517 AltRightSoftKey - Text ID of alternative right softkey |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
2518 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2519 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2520 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2521 void AUI_edit_SetAltTextStr(T_AUI_EDITOR_DATA *editor_data, UBYTE min_enter, USHORT AltLeftSoftKey, BOOL change_rsk_on_empty, USHORT AltRightSoftKey) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2522 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2523 if (editor_data) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2524 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2525 editor_data->AltLeftSoftKey = AltLeftSoftKey; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2526 editor_data->min_enter = min_enter; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2527 editor_data->AltRightSoftKey = AltRightSoftKey; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2528 editor_data->change_rsk_on_empty = change_rsk_on_empty; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2529 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2530 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2531 return; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2532 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2533 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2534 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2535 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2536 $Function: AUI_edit_SetFormatStr |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2537 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2538 $Description: Sets up standard editor attributes. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2539 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2540 $Returns: None. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2541 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2542 $Arguments: editor_data - The MMI editor data that is to be modified. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2543 formatstr - The formatted input string |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2544 preformat - TRUE if format codes are to be inserted into text |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2545 before editing |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2546 filler - If preformat is true, this character will be used to |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2547 pad out the provided string |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
2548 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2549 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2550 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2551 void AUI_edit_SetFormatStr(T_AUI_EDITOR_DATA *editor_data, char *formatstr, BOOL preformat, char filler) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2552 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2553 USHORT textIndex; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2554 USHORT formatIndex; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2555 // USHORT character; // RAVI |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2556 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2557 TRACE_FUNCTION("AUI_edit_SetFormatStr()"); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2558 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2559 if (editor_data) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2560 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2561 editor_data->editor_attr.FormatString = formatstr; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2562 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2563 /* SPR#1983 - SH - *m and *M strings are freeform, no preformatting required */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2564 if (preformat && strcmp(formatstr, "*m")!=0 && strcmp(formatstr, "*M")!=0) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2565 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2566 formatIndex = 0; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2567 textIndex = 0; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2568 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2569 /* SPR#1983 - SH - Ensure formatting doesn't write over null terminator */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2570 while (formatstr[formatIndex]!=0 && |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2571 !strchr("123456789*", formatstr[formatIndex]) && /* Exit at delimited field */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2572 textIndex<(editor_data->editor_attr.size-1)) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2573 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2574 /* Encountered fixed character */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2575 if (formatstr[formatIndex]=='\\') |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2576 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2577 formatIndex++; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2578 ATB_string_SetChar(&editor_data->editor_attr.text, textIndex, ATB_char_Unicode(formatstr[formatIndex])); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2579 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2580 /* If editor text has run out, fill the rest with our filler character */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2581 else if (textIndex>editor_data->editor_attr.text.len) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2582 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2583 ATB_string_SetChar(&editor_data->editor_attr.text, textIndex, ATB_char_Unicode(filler)); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2584 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2585 if(formatstr[formatIndex]!=0) /*a0393213 lint warnings removal - 'Possible access of out-of-bounds pointer'*/ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2586 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2587 formatIndex++; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2588 textIndex++; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2589 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2590 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2591 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2592 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2593 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2594 return; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2595 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2596 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2597 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2598 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2599 $Function: AUI_edit_SetFormatAttr |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2600 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2601 $Description: Sets up standard editor attributes. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2602 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2603 $Returns: None. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2604 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2605 $Arguments: editor_data - The MMI editor data that is to be modified. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2606 startFormat - Pointer to text formatting data structure |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
2607 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2608 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2609 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2610 void AUI_edit_SetFormatAttr(T_AUI_EDITOR_DATA *editor_data, UBYTE attr) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2611 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2612 if (editor_data) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2613 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2614 editor_data->editor_attr.startFormat.attr = attr; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2615 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2616 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2617 return; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2618 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2619 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2620 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2621 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2622 $Function: AUI_edit_SetAttr |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2623 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2624 $Description: Set some standard editor attributes |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2625 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2626 $Returns: None. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2627 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2628 $Arguments: attr - The editor attr |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2629 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2630 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2631 void AUI_edit_SetAttr(T_ED_ATTR *attr, int zone_id, ULONG colour, UBYTE font, USHORT mode, USHORT cursor, T_ATB_DCS dcs, UBYTE *text, USHORT size) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2632 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2633 /* Populate the structure with the parameters |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2634 */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2635 /* SPR#1559 - SH - Use pointer to zone_id */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2636 AUI_edit_CalculateWindow(attr, &zone_id ); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2637 attr->colour = colour; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2638 attr->font = font; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2639 attr->mode = mode; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2640 attr->cursor = cursor; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2641 attr->text.dcs = dcs; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2642 attr->text.data = text; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2643 attr->text.len = ATB_string_Length(&attr->text); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2644 attr->size = size; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2645 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2646 return; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2647 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2648 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2649 /* API - 08/07/03 - CQ10728 - Query your own number with a D1 SIM*/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2650 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2651 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2652 $Function: AUI_Edit_Display_Only |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2653 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2654 $Description: Sets up the display requirements for the Editor & also shows it |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2655 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2656 $Returns: None. |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2657 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2658 $Arguments: win - parent window, LSK - Left Soft Key, RSK - Right Soft Key |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2659 string1 - String details, string2 - String details, Title - Editor title string |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2660 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2661 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2662 void AUI_Edit_Display_Only(T_MFW_HND win, int LSK, int RSK, char *string1, char *string2, int Title) |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
2663 { |
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
2664 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2665 T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2666 T_AUI_EDITOR_INFO *data = (T_AUI_EDITOR_INFO *)win_data->user; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2667 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2668 T_AUI_EDITOR_DATA display_editor_info; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2669 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2670 int size = MAX_RO_EDITOR_LEN; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2671 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2672 AUI_edit_SetDefault(&display_editor_info); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2673 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2674 /* Include title for colour display */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2675 #ifdef COLOURDISPLAY |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2676 AUI_edit_SetDisplay(&display_editor_info, ZONE_FULL_SK_TITLE_SCROLL, COLOUR_EDITOR, EDITOR_FONT); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2677 #else /* COLOURDISPLAY */ |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2678 AUI_edit_SetDisplay(&display_editor_info, ZONE_FULL_SK_SCROLL, COLOUR_EDITOR, EDITOR_FONT); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2679 #endif /* COLOURDISPLAY */ |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2680 AUI_edit_SetMode(&display_editor_info, ED_MODE_ALPHA | ED_MODE_READONLY, ED_CURSOR_NONE); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2681 AUI_edit_SetEvents(&display_editor_info, 0, FALSE, FOREVER, (T_AUI_EDIT_CB) AUI_Edit_Display_Only_CB); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2682 AUI_edit_SetTextStr(&display_editor_info, LSK, RSK, Title, NULL); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2683 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2684 /* SPR#2672 - SH - Allocate buffer dynamically */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2685 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2686 data->displayBuffer = (char *)ALLOC_MEMORY(size); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2687 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2688 strcpy(data->displayBuffer, string1); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2689 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2690 if(string2 != NULL) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2691 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2692 strcat(data->displayBuffer, "\n"); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2693 strcat(data->displayBuffer, string2); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2694 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2695 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2696 if (data->displayBuffer[0]==(char)0x80) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2697 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2698 AUI_edit_SetBuffer(&display_editor_info, ATB_DCS_UNICODE, (UBYTE *)&data->displayBuffer[2], size/2); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2699 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2700 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2701 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2702 AUI_edit_SetBuffer(&display_editor_info, ATB_DCS_ASCII, (UBYTE *)&data->displayBuffer[0], size); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2703 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2704 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2705 data->win = AUI_edit_Start(win,&display_editor_info); /* start the editor */ |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
2706 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2707 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2708 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2709 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2710 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2711 $Function: AUI_Edit_Display_Only_CB |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2712 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2713 $Description: Handles the key call back from the Read only Editor |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2714 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2715 $Returns: None. |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2716 |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
2717 $Arguments: |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2718 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2719 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2720 static void AUI_Edit_Display_Only_CB(T_MFW_HND win, USHORT Identifier, SHORT reason) |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
2721 { |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2722 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2723 T_AUI_EDITOR_INFO * data = (T_AUI_EDITOR_INFO *)win_data->user; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2724 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2725 TRACE_EVENT("AUI_Edit_Display_Only_CB"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2726 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2727 switch(reason) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2728 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2729 case INFO_KCD_RIGHT: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2730 case INFO_KCD_HUP: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2731 TRACE_EVENT("INFO_KCD_RIGHT/HUP"); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2732 AUI_Edit_Display_Only_Destroy(data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2733 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2734 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2735 default: |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2736 TRACE_EVENT("Err: Default"); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2737 break; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2738 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2739 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2740 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2741 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2742 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2743 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2744 $Function: AUI_Edit_Display_Only_Destroy |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2745 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2746 $Description: Destroy the Read only information Editor |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2747 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2748 $Returns: none |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2749 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2750 $Arguments: own_window - current window handler |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
88
diff
changeset
|
2751 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2752 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2753 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2754 static void AUI_Edit_Display_Only_Destroy(MfwHnd own_window) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2755 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2756 T_MFW_WIN * win_data; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2757 T_AUI_EDITOR_INFO * data; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2758 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2759 // USHORT i; // RAVI |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2760 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2761 TRACE_FUNCTION ("SmsRead_R_TEXTEDT2_destroy()"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2762 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2763 if (own_window) |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2764 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2765 win_data = ((T_MFW_HDR *)own_window)->data; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2766 data = (T_AUI_EDITOR_INFO *)win_data->user; |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2767 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2768 if (data) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2769 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2770 /* |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2771 * Delete WIN handler |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2772 */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2773 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2774 /* SPR#2672 - SH - Delete buffer */ |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2775 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2776 if (data->displayBuffer!=NULL) |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2777 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2778 FREE_MEMORY((void *)data->displayBuffer, MAX_RO_EDITOR_LEN); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2779 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2780 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2781 /* SPR#1428 - SH - New Editor changes */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2782 #ifdef NEW_EDITOR |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2783 AUI_edit_Destroy(data->win); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2784 #else /* NEW_EDITOR */ |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2785 editor_destroy(data->win); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2786 #endif /* NEW_EDITOR */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2787 |
135
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2788 win_delete (data->win); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2789 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2790 FREE_MEMORY ((void *)data, sizeof (T_AUI_EDITOR_INFO)); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2791 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2792 |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2793 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2794 else |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2795 { |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2796 TRACE_EVENT ("SmsRead_R_TEXTEDT2_destroy() called twice"); |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2797 } |
70ea7526b59e
bmi/AUI*.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
2798 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2799 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2800 /* API - 08/07/03 - CQ10728 END*/ |