1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#include "chinese_dictionarydialog.hrc"
25#include "chinese_translationdialog.hrc"
26
27#include <svtools/controldims.hrc>
28
29#define DIRECTION_RADIOBUTTONS( D_XPOS, D_YPOS, D_FULLWIDTH ) \
30RadioButton RB_TO_SIMPLIFIED \
31{ \
32	Pos = MAP_APPFONT( D_XPOS, D_YPOS ); \
33	Size = MAP_APPFONT ( D_FULLWIDTH, RSC_CD_RADIOBUTTON_HEIGHT ) ; \
34	Text [ en-US ] = "~Traditional Chinese to simplified Chinese"; \
35}; \
36RadioButton RB_TO_TRADITIONAL \
37{ \
38	Pos = MAP_APPFONT( D_XPOS, D_YPOS + RSC_CD_RADIOBUTTON_HEIGHT+RSC_SP_CTRL_GROUP_Y ); \
39	Size = MAP_APPFONT ( D_FULLWIDTH, RSC_CD_RADIOBUTTON_HEIGHT ) ; \
40	Text [ en-US ] = "~Simplified Chinese to traditional Chinese"; \
41};
42
43//-----------------------------------------------------------------------------
44//defines for positions and sizes:
45
46#define FULL_WIDTH (245)
47#define FULL_HEIGHT (165)
48
49#define ROW_1 (RSC_SP_DLG_INNERBORDER_TOP)
50#define ROW_2 (ROW_1+RSC_CD_RADIOBUTTON_HEIGHT+RSC_SP_CTRL_GROUP_Y)
51#define ROW_3 (ROW_2+RSC_CD_RADIOBUTTON_HEIGHT+RSC_SP_CTRL_GROUP_Y)
52#define ROW_4 (ROW_3+RSC_CD_CHECKBOX_HEIGHT+RSC_SP_CTRL_GROUP_Y)
53#define ROW_5 (ROW_4+RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_CTRL_DESC_Y)
54#define ROW_6 (ROW_5+RSC_CD_TEXTBOX_HEIGHT+RSC_SP_CTRL_DESC_Y)
55
56#define ROW_5a (ROW_5+RSC_CD_PUSHBUTTON_HEIGHT+RSC_SP_CTRL_DESC_Y)
57#define ROW_5b (ROW_5a+RSC_CD_PUSHBUTTON_HEIGHT+RSC_SP_CTRL_DESC_Y)
58
59#define ROW_8 (FULL_HEIGHT-RSC_SP_DLG_INNERBORDER_BOTTOM-RSC_CD_PUSHBUTTON_HEIGHT)
60#define ROW_7 (ROW_8-RSC_CD_FIXEDLINE_HEIGHT-2)
61
62#define LIST_HEIGHT (ROW_7-RSC_SP_CTRL_Y-ROW_6)
63
64#define COL_WIDTH 60
65#define BUTTONCOL_WIDTH 40
66#define COL_1 (RSC_SP_DLG_INNERBORDER_LEFT+RSC_SP_FLGR_SPACE_X)
67#define COL_2 (COL_1+COL_WIDTH+1)
68#define COL_3 (COL_2+COL_WIDTH+1)
69#define COL_4 (FULL_WIDTH-RSC_SP_DLG_INNERBORDER_RIGHT-BUTTONCOL_WIDTH)
70
71#define REST_COL_WIDTH (COL_4-COL_3-RSC_SP_CTRL_GROUP_X)
72
73//-----------------------------------------------------------------------------
74
75ModalDialog DLG_CHINESEDICTIONARY
76{
77    HelpID = "svx:ModalDialog:DLG_CHINESEDICTIONARY";
78	//HelpId = ;
79	Size = MAP_APPFONT( FULL_WIDTH, FULL_HEIGHT );
80	OutputSize = TRUE;
81	Closeable = TRUE ;
82	Moveable = TRUE ;
83	SVLook = TRUE;
84
85	Text [ en-US ] = "Edit Dictionary";
86
87    DIRECTION_RADIOBUTTONS( COL_1, ROW_1, FULL_WIDTH - COL_1 - RSC_SP_DLG_INNERBORDER_RIGHT )
88
89    CheckBox CB_REVERSE
90	{
91        HelpID = "svx:CheckBox:DLG_CHINESEDICTIONARY:CB_REVERSE";
92		Pos = MAP_APPFONT ( COL_1, ROW_3 ) ;
93		Size = MAP_APPFONT ( FULL_WIDTH - COL_1 - RSC_SP_DLG_INNERBORDER_RIGHT , RSC_CD_CHECKBOX_HEIGHT ) ;
94
95		Text [ en-US ] = "Reverse mapping";
96	};
97
98	FixedText FT_TERM
99	{
100        Pos = MAP_APPFONT ( COL_1 , ROW_4 ) ;
101        Size = MAP_APPFONT ( COL_WIDTH, RSC_CD_FIXEDTEXT_HEIGHT ) ;
102		Text [ en-US ] = "Term";
103	};
104	Edit ED_TERM
105	{
106	    HelpID = "svx:Edit:DLG_CHINESEDICTIONARY:ED_TERM";
107		Border = TRUE ;
108		Pos = MAP_APPFONT ( COL_1 , ROW_5 ) ;
109		Size = MAP_APPFONT ( COL_WIDTH , RSC_CD_TEXTBOX_HEIGHT ) ;
110	};
111
112
113	FixedText FT_MAPPING
114	{
115        Pos = MAP_APPFONT ( COL_2 , ROW_4 ) ;
116        Size = MAP_APPFONT ( COL_WIDTH, RSC_CD_FIXEDTEXT_HEIGHT ) ;
117		Text [ en-US ] = "Mapping";
118	};
119	Edit ED_MAPPING
120	{
121	    HelpID = "svx:Edit:DLG_CHINESEDICTIONARY:ED_MAPPING";
122		Border = TRUE ;
123		Pos = MAP_APPFONT ( COL_2 , ROW_5 ) ;
124		Size = MAP_APPFONT ( COL_WIDTH , RSC_CD_TEXTBOX_HEIGHT ) ;
125	};
126
127	FixedText FT_PROPERTY
128	{
129        Pos = MAP_APPFONT ( COL_3 , ROW_4 ) ;
130        Size = MAP_APPFONT ( REST_COL_WIDTH, RSC_CD_FIXEDTEXT_HEIGHT ) ;
131		Text [ en-US ] = "Property";
132	};
133    ListBox LB_PROPERTY
134	{
135        HelpID = "svx:ListBox:DLG_CHINESEDICTIONARY:LB_PROPERTY";
136		Border = TRUE ;
137		Pos = MAP_APPFONT ( COL_3 , ROW_5 ) ;
138		Size = MAP_APPFONT ( REST_COL_WIDTH , RSC_CD_TEXTBOX_HEIGHT ) ;
139		DropDown = TRUE ;
140
141        stringlist [ en-US ] =
142		{
143		    < "Other" ; Default ; > ;
144			< "Foreign" ; > ;
145			< "First name" ; > ;
146			< "Last name" ; > ;
147			< "Title" ; > ;
148			< "Status" ; > ;
149			< "Place name" ; > ;
150			< "Business" ; > ;
151			< "Adjective" ; > ;
152			< "Idiom" ; > ;
153			< "Abbreviation" ; > ;
154			< "Numerical" ; > ;
155			< "Noun" ; > ;
156			< "Verb" ; > ;
157			< "Brand name" ; > ;
158		};
159	};
160
161	Control CT_MAPPINGLIST
162	{
163	    Pos = MAP_APPFONT ( COL_1, ROW_6 ) ;
164        Size = MAP_APPFONT ( COL_4 - COL_1 - RSC_SP_CTRL_GROUP_X, LIST_HEIGHT ) ;
165        TabStop = TRUE ;
166	};
167
168	PushButton PB_ADD
169	{
170	    HelpID = "svx:PushButton:DLG_CHINESEDICTIONARY:PB_ADD";
171		Pos = MAP_APPFONT( COL_4, ROW_5 );
172		Size = MAP_APPFONT( BUTTONCOL_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT );
173
174		Text [ en-US ] = "~Add";
175	};
176	PushButton PB_MODIFY
177	{
178	    HelpID = "svx:PushButton:DLG_CHINESEDICTIONARY:PB_MODIFY";
179		Pos = MAP_APPFONT( COL_4, ROW_5a );
180		Size = MAP_APPFONT( BUTTONCOL_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT );
181
182		Text [ en-US ] = "~Modify";
183	};
184	PushButton PB_DELETE
185	{
186	    HelpID = "svx:PushButton:DLG_CHINESEDICTIONARY:PB_DELETE";
187		Pos = MAP_APPFONT( COL_4, ROW_5b );
188		Size = MAP_APPFONT( BUTTONCOL_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT );
189
190		Text [ en-US ] = "~Delete";
191	};
192
193    FixedLine FL_BOTTOMLINE
194	{
195        Pos = MAP_APPFONT ( 0 , ROW_7 ) ;
196        Size = MAP_APPFONT ( FULL_WIDTH, RSC_CD_FIXEDLINE_HEIGHT ) ;
197	};
198
199	BUTTONS_OK_CANCEL_HELP_ABREAST( FULL_WIDTH - RSC_SP_DLG_INNERBORDER_RIGHT, ROW_8 )
200};
201
202//-----------------------------------------------------------------------------
203//defines for positions and sizes:
204
205#define T_FULL_WIDTH (220)
206#define T_FULL_HEIGHT (120)
207#define T_EDITBUTTON_WIDTH (75)
208
209#define T_COL_1 (RSC_SP_DLG_INNERBORDER_LEFT)
210#define T_COL_2 (T_COL_1+RSC_SP_FLGR_SPACE_X)
211#define T_COL_3 (T_COL_2+RSC_SP_CHK_TEXTINDENT)
212#define T_COL_4 (T_FULL_WIDTH-RSC_SP_DLG_INNERBORDER_RIGHT-T_EDITBUTTON_WIDTH)
213
214#define T_ROW_1 (RSC_SP_DLG_INNERBORDER_TOP)
215#define T_ROW_2 (T_ROW_1+RSC_CD_FIXEDLINE_HEIGHT+RSC_SP_CTRL_GROUP_Y)
216#define T_ROW_3 (T_ROW_2+RSC_CD_RADIOBUTTON_HEIGHT+RSC_SP_CTRL_GROUP_Y)
217#define T_ROW_4 (T_ROW_3+RSC_CD_RADIOBUTTON_HEIGHT+RSC_SP_CTRL_DESC_Y)
218#define T_ROW_5 (T_ROW_4+RSC_CD_CHECKBOX_HEIGHT+RSC_SP_CTRL_Y)
219#define T_ROW_6 (T_ROW_5+RSC_CD_FIXEDLINE_HEIGHT+RSC_SP_CTRL_GROUP_Y)
220
221#define T_ROW_8 (T_FULL_HEIGHT-RSC_SP_DLG_INNERBORDER_BOTTOM-RSC_CD_PUSHBUTTON_HEIGHT)
222#define T_ROW_7 (T_ROW_8-RSC_CD_FIXEDLINE_HEIGHT-2)
223
224//-----------------------------------------------------------------------------
225
226ModalDialog DLG_CHINESETRANSLATION
227{
228    HelpID = "svx:ModalDialog:DLG_CHINESETRANSLATION";
229	//HelpId = ;
230	Size = MAP_APPFONT( T_FULL_WIDTH, T_FULL_HEIGHT );
231	OutputSize = TRUE;
232	Closeable = TRUE ;
233	Moveable = TRUE ;
234	SVLook = TRUE;
235
236    Text [ en-US ] = "Chinese Conversion";
237
238    FixedLine FL_DIRECTION
239	{
240        Pos = MAP_APPFONT ( T_COL_1 , T_ROW_1 ) ;
241        Size = MAP_APPFONT ( T_FULL_WIDTH - T_COL_1 - RSC_SP_DLG_INNERBORDER_RIGHT, RSC_CD_FIXEDLINE_HEIGHT ) ;
242		Text [ en-US ] = "Conversion direction";
243	};
244
245	DIRECTION_RADIOBUTTONS( T_COL_2, T_ROW_2, (T_FULL_WIDTH - T_COL_2 - RSC_SP_DLG_INNERBORDER_RIGHT) )
246
247	CheckBox CB_USE_VARIANTS
248	{
249	    HelpID = "svx:CheckBox:DLG_CHINESETRANSLATION:CB_USE_VARIANTS";
250		Pos = MAP_APPFONT( T_COL_3, T_ROW_4 );
251		Size = MAP_APPFONT ( T_FULL_WIDTH - T_COL_3 - RSC_SP_DLG_INNERBORDER_RIGHT, RSC_CD_CHECKBOX_HEIGHT ) ;
252
253		Text [ en-US ] = "~Use Taiwan, Hong Kong SAR, and Macao SAR character variants";
254	};
255
256	FixedLine FL_COMMONTERMS
257	{
258        Pos = MAP_APPFONT ( T_COL_1 , T_ROW_5 ) ;
259        Size = MAP_APPFONT ( T_FULL_WIDTH - T_COL_1 - RSC_SP_DLG_INNERBORDER_RIGHT, RSC_CD_FIXEDLINE_HEIGHT ) ;
260		Text [ en-US ] = "Common terms";
261	};
262
263	CheckBox CB_TRANSLATE_COMMONTERMS
264	{
265	    HelpID = "svx:CheckBox:DLG_CHINESETRANSLATION:CB_TRANSLATE_COMMONTERMS";
266		Pos = MAP_APPFONT( T_COL_2, T_ROW_6 );
267		Size = MAP_APPFONT ( T_COL_4 - T_COL_2, RSC_CD_CHECKBOX_HEIGHT ) ;
268
269		Text [ en-US ] = "Translate ~common terms";
270	};
271
272	PushButton PB_EDITTERMS
273	{
274	    HelpID = "svx:PushButton:DLG_CHINESETRANSLATION:PB_EDITTERMS";
275		Pos = MAP_APPFONT( T_COL_4, T_ROW_6-(RSC_CD_PUSHBUTTON_HEIGHT-RSC_CD_CHECKBOX_HEIGHT)/2 );
276		Size = MAP_APPFONT( T_EDITBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
277
278		Text [ en-US ] = "~Edit Terms...";
279	};
280
281	FixedLine T_FL_BOTTOMLINE
282	{
283        Pos = MAP_APPFONT ( 0 , T_ROW_7 ) ;
284        Size = MAP_APPFONT ( T_FULL_WIDTH, RSC_CD_FIXEDLINE_HEIGHT ) ;
285	};
286
287	BUTTONS_OK_CANCEL_HELP_ABREAST( T_FULL_WIDTH - RSC_SP_DLG_INNERBORDER_RIGHT, T_ROW_8 )
288};
289
290