Rev 6640 | Rev 6746 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6640 | Rev 6678 | ||
---|---|---|---|
Line 22... | Line 22... | ||
22 | #define ERROR "Error #%d" |
22 | #define ERROR "Error #%d" |
23 | #endif |
23 | #endif |
Line 24... | Line 24... | ||
24 | 24 | ||
25 | proc_info Form; |
25 | proc_info Form; |
26 | char edword[256], search_word[256], translate_result[4096]; |
26 | char edword[256], search_word[256], translate_result[4096]; |
Line 27... | Line 27... | ||
27 | #define TOPH 44 |
27 | #define TOPH 45 |
28 | 28 | ||
29 | #define TEXT_ENG_RUS "ENG\26RUS" |
29 | #define TEXT_ENG_RUS "ENG\26RUS" |
30 | #define TEXT_RUS_ENG "RUS\26ENG" |
30 | #define TEXT_RUS_ENG "RUS\26ENG" |
31 | #define TEXT_VOCABULARIES "ENG RUS" |
31 | #define TEXT_VOCABULARIES "ENG RUS" |
32 | #define ENG_RUS 0 |
32 | #define ENG_RUS 0 |
33 | #define RUS_ENG 1 |
33 | #define RUS_ENG 1 |
Line 34... | Line 34... | ||
34 | #define BUTTON_CHANGE_LANGUAGE 10 |
34 | #define BUTTON_CHANGE_LANGUAGE 10 |
35 | int active_dict=2; |
35 | int active_dict=2; |
Line 36... | Line 36... | ||
36 | 36 | ||
37 | int mouse_dd; |
37 | int mouse_dd; |
38 | edit_box edit1= {200,16,16,0xffffff,0x94AECE,0xffffff,0x94AECE,0,248,#edword,#mouse_dd,100000000000010b}; |
38 | edit_box edit1= {200,13,13,0xffffff,0x94AECE,0xffffff,0x94AECE,0x10000000,248,#edword,#mouse_dd,100000000000010b}; |
Line 82... | Line 82... | ||
82 | if (Form.width<400) { MoveSize(OLD,OLD,400,OLD); break; } |
82 | if (Form.width<400) { MoveSize(OLD,OLD,400,OLD); break; } |
83 | DrawBar(0, 0, Form.width-9, TOPH, system.color.work); //top bg |
83 | DrawBar(0, 0, Form.width-9, TOPH, system.color.work); //top bg |
84 | DrawBar(0, TOPH, Form.width-9, 1, system.color.work_graph); |
84 | DrawBar(0, TOPH, Form.width-9, 1, system.color.work_graph); |
85 | edit1.width=Form.width-edit1.left-edit1.left-9 - 116; |
85 | edit1.width=Form.width-edit1.left-edit1.left-9 - 116; |
86 | edit_box_draw stdcall(#edit1); |
86 | edit_box_draw stdcall(#edit1); |
87 | DrawWideRectangle(edit1.left-2, edit1.top-2, edit1.width+3, 19, 2, 0xffffff); |
87 | DrawWideRectangle(edit1.left-2, edit1.top-2, edit1.width+3, 25, 2, 0xffffff); |
88 | DrawRectangle(edit1.left-3, edit1.top-3, edit1.width+4, 20, system.color.work_graph); |
88 | DrawRectangle(edit1.left-3, edit1.top-3, edit1.width+4, 26, system.color.work_graph); |
89 | WriteText(Form.width-120, edit1.top, 0x90, system.color.work_text, TEXT_VOCABULARIES); |
89 | WriteText(Form.width-120, edit1.top+3, 0x90, system.color.work_text, TEXT_VOCABULARIES); |
90 | DrawTranslation(); |
90 | DrawTranslation(); |
91 | DrawLangButtons(); |
91 | DrawLangButtons(); |
92 | } |
92 | } |
93 | } |
93 | } |
94 | } |
94 | } |
Line 95... | Line 95... | ||
95 | 95 | ||
96 | 96 | ||
97 | void DrawLangButtons() |
97 | void DrawLangButtons() |
98 | { |
98 | { |
99 | dword direction; |
99 | dword direction; |
100 | DefineButton(Form.width-88, edit1.top-4, 20, 20, BUTTON_CHANGE_LANGUAGE, system.color.work_button); |
100 | DefineButton(Form.width-88, edit1.top-4+3, 20, 20, BUTTON_CHANGE_LANGUAGE, system.color.work_button); |
101 | if (active_dict == ENG_RUS) direction = "\26"; else direction = "\27"; |
101 | if (active_dict == ENG_RUS) direction = "\26"; else direction = "\27"; |
Line 102... | Line 102... | ||
102 | WriteText(Form.width-82, edit1.top-1, 10000001b, system.color.work_button_text, direction); |
102 | WriteText(Form.width-82, edit1.top-1+3, 10000001b, system.color.work_button_text, direction); |
103 | } |
103 | } |
104 | 104 | ||
Line 159... | Line 159... | ||
159 | 159 | ||
160 | DrawBar(0, y_pos, Form.width-9, Form.cheight - y_pos, 0xFFFFFF); |
160 | DrawBar(0, y_pos, Form.width-9, Form.cheight - y_pos, 0xFFFFFF); |
161 | strttl(#draw_buf); |
161 | strttl(#draw_buf); |
Line -... | Line 162... | ||
- | 162 | WriteTextB(10+1, y_pos+8, 10000001b, 0x800080, #search_word); |
|
162 | WriteTextB(10+1, y_pos+8, 10000001b, 0x800080, #search_word); |
163 | |
163 | 164 | debugln(#draw_buf); |
|
164 | DrawTextViewArea(10, y_pos+31, Form.cwidth-20, Form.cheight-30, 15, |
165 | DrawTextViewArea(10, y_pos+31, Form.cwidth-20, Form.cheight-30, |
Line 165... | Line 166... | ||
165 | #draw_buf, -1, 0x000000); |
166 | #draw_buf, -1, 0x000000); |