Subversion Repositories Kolibri OS

Rev

Rev 5651 | Rev 5818 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5651 Rev 5674
Line 14... Line 14...
14
char translate_caption[] = "Translate";
14
char translate_caption[] = "Translate";
15
char dict_not_found[] = "Dictionary not found";
15
char dict_not_found[] = "Dictionary not found";
16
char dict_opened[] = "Dictionary loaded";
16
char dict_opened[] = "Dictionary loaded";
17
char empty_word[] = "Type a word to translate";
17
char empty_word[] = "Type a word to translate";
Line 18... Line -...
18
 
-
 
19
 
-
 
20
system_colors sc;
18
 
Line 21... Line 19...
21
proc_info Form;
19
proc_info Form;
22
 
20
 
23
char edword[256], search_word[256], translate_result[4096], cur_dict[256];
21
char edword[256], search_word[256], translate_result[4096], cur_dict[256];
Line 105... Line 103...
105
}
103
}
Line 106... Line 104...
106
 
104
 
107
 
105
 
108
void DrawWindowContent()
106
void DrawWindowContent()
109
{
107
{
110
	sc.get();
108
	system.color.get();
111
	DefineAndDrawWindow(215,120,400,250,0x73,sc.work,#title);
109
	DefineAndDrawWindow(215,120,400,250,0x73,system.color.work,#title);
112
	GetProcessInfo(#Form, SelfInfo);
110
	GetProcessInfo(#Form, SelfInfo);
113
	if (Form.status_window>2) return;
111
	if (Form.status_window>2) return;
114
	if (Form.height<140) MoveSize(OLD,OLD,OLD,140);
112
	if (Form.height<140) MoveSize(OLD,OLD,OLD,140);
115
	if (Form.width<400) MoveSize(OLD,OLD,400,OLD);
113
	if (Form.width<400) MoveSize(OLD,OLD,400,OLD);
Line 116... Line 114...
116
	edit1.focus_border_color=sc.work_graph;
114
	edit1.focus_border_color=system.color.work_graph;
117
	edit1.width=Form.width-edit1.left-edit1.left-9;
115
	edit1.width=Form.width-edit1.left-edit1.left-9;
118
 
116
 
119
	DrawBar(0, 0, Form.width-9, 69, sc.work);
117
	DrawBar(0, 0, Form.width-9, 69, system.color.work);
Line 120... Line 118...
120
	edit_box_draw stdcall(#edit1);
118
	edit_box_draw stdcall(#edit1);
121
	DrawCaptButton(edit1.left+edit1.width-80,35, 80,20, 10, sc.work_button, sc.work_button_text,#translate_caption);
119
	DrawCaptButton(edit1.left+edit1.width-80,35, 80,20, 10, system.color.work_button, system.color.work_button_text,#translate_caption);
122
	DrawBar(0, 69, Form.width-9, 1, sc.work_graph);
120
	DrawBar(0, 69, Form.width-9, 1, system.color.work_graph);
123
 
121
 
124
	WriteText(edit1.left,35+7,0x80,sc.work_text,#direction);
122
	WriteText(edit1.left,35+7,0x80,system.color.work_text,#direction);
Line 125... Line 123...
125
	DefineButton(edit1.left+130,35, 120,20, 11, sc.work_button);
123
	DefineButton(edit1.left+130,35, 120,20, 11, system.color.work_button);
126
	DrawBar(edit1.left+130+1,36,  107,19, 0xFFFFFF);
124
	DrawBar(edit1.left+130+1,36,  107,19, 0xFFFFFF);
Line 234... Line 232...
234
	
232
	
235
	free(dir_buf);
233
	free(dir_buf);
236
	error = GetDir(#dir_buf, #fcount, dict_folder, DIRS_ONLYREAL);
234
	error = GetDir(#dir_buf, #fcount, dict_folder, DIRS_ONLYREAL);
237
	if (!error)
235
	if (!error)
238
	{
236
	{
239
		DefineButton(0,0, Form.width,Form.height, 12+BT_HIDE+BT_NOFRAME, sc.work_button);
237
		DefineButton(0,0, Form.width,Form.height, 12+BT_HIDE+BT_NOFRAME, system.color.work_button);
240
		for (j=0; j
238
		for (j=0; j
241
		{
239
		{
242
			DefineButton(edit1.left+130,j+1*20+35, 107,20, 20+j, sc.work_button);
240
			DefineButton(edit1.left+130,j+1*20+35, 107,20, 20+j, system.color.work_button);
243
			WriteText(edit1.left+130+8,j+1*20+35+7,0x80,sc.work_button_text, j*304+dir_buf+72);
241
			WriteText(edit1.left+130+8,j+1*20+35+7,0x80,system.color.work_button_text, j*304+dir_buf+72);
244
		}
242
		}
245
	}
243
	}