diff --git a/programs/cmm/clipview/clipview b/programs/cmm/clipview/clipview deleted file mode 100644 index 7c4a771639..0000000000 Binary files a/programs/cmm/clipview/clipview and /dev/null differ diff --git a/programs/cmm/clipview/clipview.c b/programs/cmm/clipview/clipview.c index a661e187a8..77144c516b 100644 --- a/programs/cmm/clipview/clipview.c +++ b/programs/cmm/clipview/clipview.c @@ -17,7 +17,7 @@ // // //===================================================// -?define WINDOW_HEADER "Clipboard Viewer v1.01" +?define WINDOW_HEADER "Clipboard Viewer v1.02" ?define T_DELETE_LAST_SLOT "Delete last slot" ?define T_DELETE_ALL_SLOTS "Delete all slots" ?define T_RESET_BUFFER_LOCK "Reset the lock buffer" @@ -149,18 +149,24 @@ void DrawScroller() scrollbar_v_draw(#scroll1); } +replace_char(dword in_str, char from_char, to_char, int length) { + int i; + for (i=0; i list.visible) list_last = list.visible; else list_last = list.count; for (i=0; i2) break; if (Form.height<140) { MoveSize(OLD,OLD,OLD,140); break; } @@ -102,6 +87,7 @@ void main() edit_box_draw stdcall(#edit1); DrawWideRectangle(edit1.left-2, edit1.top-2, edit1.width+3, 19, 2, 0xffffff); DrawRectangle(edit1.left-3, edit1.top-3, edit1.width+4, 20, system.color.work_graph); + WriteText(Form.width-120, edit1.top, 0x90, system.color.work_text, TEXT_VOCABULARIES); DrawTranslation(); DrawLangButtons(); } @@ -111,34 +97,16 @@ void main() void DrawLangButtons() { - DrawCaptButton(Form.width-130, edit1.top-3, 50,19, 10, system.color.work_button, system.color.work_button_text, TEXT_ENG_RUS); - DrawCaptButton(Form.width-70, edit1.top-3, 50,19, 11, system.color.work_button, system.color.work_button_text, TEXT_RUS_ENG); - PutShadow(-active_dict*60 + Form.width-70, edit1.top-3, 50,19, 1, 2); - SpeakerDraw(); -} - -void SpeakerDraw() -{ - dword x, y; - x = Form.cwidth-38; - y = Form.cheight-32; - if (active_dict) - { - DeleteButton(15); - DrawBar(x,y,23,20,0xFFFFFF); - } - else - { - DefineButton(x-5, y-5, 23+10, 20+9, 15+BT_HIDE+BT_NOFRAME, 0); - if (GetProcessSlot(speaker_id)==0)) _PutImage(x, y, 23,20, #speaker); else _PutImage(x, y, 23,20, 23*20*3+#speaker); - } + dword direction; + DefineButton(Form.width-88, edit1.top-4, 20, 20, BUTTON_CHANGE_LANGUAGE, system.color.work_button); + if (active_dict == ENG_RUS) direction = "\26"; else direction = "\27"; + WriteText(Form.width-82, edit1.top-1, 10000001b, system.color.work_button_text, direction); } void Translate() { dword translation_start, translation_end; - KillProcess(speaker_id); sprintf(#search_word, "\10%s\13", #edword); strupr(#search_word); @@ -165,7 +133,6 @@ void OpenDictionary(dword dict_id) { dword res; if (dict_id==active_dict) return; - KillProcess(speaker_id); active_dict = dict_id; if (io.buffer_data) free(io.buffer_data); if (active_dict==ENG_RUS) res=io.read("dictionaries/eng - rus.dict"); @@ -187,33 +154,16 @@ void OpenDictionary(dword dict_id) void DrawTranslation() { - int text_break=0; - char tt[4096]=''; - int y_pos=TOPH+1; char draw_buf[4096]; - strcpy(#draw_buf, #translate_result); + strlcpy(#draw_buf, #translate_result, sizeof(draw_buf)); DrawBar(0, y_pos, Form.width-9, Form.cheight - y_pos, 0xFFFFFF); strttl(#draw_buf); WriteTextB(10+1, y_pos+8, 10000001b, 0x800080, #search_word); - while (draw_buf) - { - text_break= Form.width/6-6; - if (text_break>strlen(#draw_buf)) - { - WriteText(10, y_pos+31, 0x80, 0, #draw_buf); - break; - } - while (draw_buf[text_break]<>' ') && (text_break>0) text_break--; - strcpy(#tt, #draw_buf+text_break+1); - draw_buf[text_break]=0x0; - WriteText(10, y_pos+31, 0x80, 0, #draw_buf); - strcpy(#draw_buf, #tt); - y_pos+=12; - if (y_pos+24+8>Form.cheight) break; - } - SpeakerDraw(); + + DrawTextViewArea(10, y_pos+31, Form.cwidth-20, Form.cheight-30, 15, + #draw_buf, -1, 0x000000); } diff --git a/programs/cmm/dicty/speaker.ico b/programs/cmm/dicty/speaker.ico deleted file mode 100644 index 23415bdbf0..0000000000 Binary files a/programs/cmm/dicty/speaker.ico and /dev/null differ diff --git a/programs/cmm/dicty/speaker.raw b/programs/cmm/dicty/speaker.raw deleted file mode 100644 index b5ff4e707d..0000000000 --- a/programs/cmm/dicty/speaker.raw +++ /dev/null @@ -1 +0,0 @@ -鳧頸ヌトナヌナヌ俣疋;Aユメヤネヌヌヌトヌ゚゙゚鳬駑gkC;AC;Aナテトヘハベロ゙ヌナヌノヌノネニネSJPEDF>DF>DF>Dナテナネナヌネナヌ裙ワワワネナヌフヒフ聰皺ャュフハハ壕稀?EH?EH?EH?EH?EH?Eニナニルヨルネヌネヘヒヒネヌネネヌネ恫唔AG{tygafIAGIAGIAGIAGIAGIAGニトナハヌネハヌネハヌネハヌネ装KBH{c\aKBHKBHKBHKBHKBHKBHネナニハヌネハヌネハヌネハヌネ綜銑DJョ_X^LDJLDJLDJLDJLDJLDJネナニフハフハヌハ趺マホマハヌハ葢苺嵩NEK≦bZ_NEKNEKNEKNEKNEKNEKネナネホフフハネハ趺ムホマハネハ蒿茆繭OFLポhafOFLOFLOFLOFLOFLOFLノナネフネハフネハフネハフネハ・」QHN+~pinQHNQHNQHNQHNQHNQHNハニネフネハフネハフネハフネハ裘蓴ケオキTKQRIORIORIORIORIOハニノワルロフハフミヘホフハフフハフモミメd\aSKQSKQSKQSKQハネノヘハフヘハフ鉞゚ン゚ヘハフムママy}ULRULRULRハネハ矚゚ヘハフムマムヘヒヘヘハフ蒹ゥ」ヲWOUVNTヒネヒ韆醢ヒヘ矜睿ハヘホフホメホミミフホヘフヘ聶マフヘホヘヘ韆踈ーャョヤムモユモユ@8>D=C俣疋;AユメヤG>DB9?棟鳬駑gkC;AC;AナテトクオクTLRスサシ初垢;AJBHネニネRJPDDF>DF>DF>DナテナルヨラF>DF>Dヲ「・延宇>DVNT矜皹ャュフハハ壕季?EG?EG?EG?EG?EG?Eニナニy~G?ESLQタセタG?EG?E恬僮@F{sxg_dI@FI@FI@FI@FI@FI@FニトナフハフI@FI@F聰ンレワI@FI@Fリヨヨ桝弼BH{c\aJBHJBHJBHJBHJBHJBHニナニ鵯BHJBHニツナKCIJBHシケシ糟銑CI≦_W]LCILCILCILCILCILCIネナニULRLCIェ、ィ`X]LCI「泯武溺EK≦bZ_MEKMEKMEKMEKMEKMEKネナネVNTMEKェ・ゥbZ_MEK」「尠唹FLポhafOFLOFLOFLOFLOFLOFLノナネOFLOFLヌナニPGMOFLソシセ、」PHN{~oinPHNPHNPHNPHNPHNPHNハニネホフホPHNPHN蒹ンンンPHNPHNレリリ裘蓴ケオキTKQRIORIORIORIORIOハニノ≦RIO]U[テタツRIORIOモマメd[`SJPSJPSJPSJPハニノンロワSJPSJPャヲェ注心JPbY_y}ULRULRULRハネハ撫廼LRbZ_鷙OUULR「擇ゥ」ヲWNTVMSヒネヒュゥャZQWセコシ摎啖MS\SYミホミо\TZWOU撕ヒノハYPV]TZュァォヘハフ \ No newline at end of file diff --git a/programs/cmm/lib/gui.h b/programs/cmm/lib/gui.h index 63e6a50318..32f989bdc9 100644 --- a/programs/cmm/lib/gui.h +++ b/programs/cmm/lib/gui.h @@ -291,9 +291,6 @@ TODO: scroll buf_end = strlen(buf_start) + buf_start; label_length_max = w / 8; // 8 big font char width - //DrawRectangle(x-2, y-2, w+4, h+4, system.color.work_graph); - //DrawRectangle3D(x-1, y-1, w+2, h+2, 0xDDDddd, 0xffffff); - loop() { if (bg_col!=-1) DrawBar(x, y, w+1, line_h, bg_col);