diff --git a/programs/develop/kol_f_edit/buf2d.ced b/programs/develop/kol_f_edit/buf2d.ced new file mode 100644 index 0000000000..4b175e1c07 Binary files /dev/null and b/programs/develop/kol_f_edit/buf2d.ced differ diff --git a/programs/develop/kol_f_edit/ced_code_g.inc b/programs/develop/kol_f_edit/ced_code_g.inc index 51d7f117ee..8c372a7b81 100644 --- a/programs/develop/kol_f_edit/ced_code_g.inc +++ b/programs/develop/kol_f_edit/ced_code_g.inc @@ -137,15 +137,6 @@ macro insert_reg8 reg_name stdcall [ted_text_add], tedit0,reg_name,2,ted_opt_ed_move_cursor } -; -macro insert_but_beg -{ - stdcall [ted_text_add], tedit0,txt_but_1,txt_but_2-txt_but_1,ted_opt_ed_move_cursor -} -macro insert_but_end -{ - stdcall [ted_text_add], tedit0,txt_but_2,txt_but_3-txt_but_2,ted_opt_ed_move_cursor -} ; macro insert_key_beg { @@ -200,7 +191,7 @@ popad ; esi - 㪠§ â¥«ì ­  㧥« align 4 code_gen_obj: -push ebx edx +push eax ebx edx .beg_iterat: cmp esi,0 je .find_no @@ -233,27 +224,15 @@ push ebx edx stdcall insert_text, txt_skob_fo @@: insert_nl - - stdcall dword[tl_node_poi_get_next_info], esi,tree2 - pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã - cmp esi,0 - je .end_st - cmp byte[esi+2],bl ;lev - jle .end_st - push bx - mov bl,byte[esi+2] - call code_gen_obj ;४ãàᨢ­ë© ¢ë§®¢ ¤®ç¥à­¨å ®¡ê¥ªâ®¢ - pop bx - .end_st: + stdcall get_code_children_objects, esi + call move_next_no_child_objects ;¯à®¯ã᪠¤®ç¥à­¨å ®¡¥ªâ®¢ cmp byte[edx],0 je @f ;¥á«¨ áâàãªâãà  § ¤ ­  ¬ ªà®á®¬ stdcall insert_text, txt_skob_fc insert_nl - jmp .beg_iterat @@: stdcall insert_text,txt_ends - jmp .beg_iterat .no_struct: cmp dword[eax],C_TXT jne @f @@ -270,10 +249,14 @@ push ebx edx cmp dword[eax],C_WND jne @f stdcall get_code_window,eax ;®¡à ¡®âª  ®¡ê¥ªâ  + stdcall get_code_children_objects, esi ;®¡à ¡®âª  ¤®ç¥à­¨å ®¡¥ªâ®¢ + call move_next_no_child_objects ;¯à®¯ã᪠¤®ç¥à­¨å ®¡¥ªâ®¢ + stdcall insert_text, txt_draw_we ;ª®¤ § ¢¥àè î騩 äã­ªæ¨î à¨á®¢ ­¨ï @@: cmp dword[eax],C_ACO jne @f - stdcall get_code_auto,eax ;®¡à ¡®âª  ®¡ê¥ªâ  + stdcall get_code_auto,esi ;®¡à ¡®âª  ®¡ê¥ªâ  + call move_next_no_child_objects ;¯à®¯ã᪠¤®ç¥à­¨å ®¡¥ªâ®¢ @@: cmp dword[eax],C_KEY ;ª« ¢¨ âãà  jne @f @@ -285,7 +268,49 @@ push ebx edx jmp .beg_iterat .find_no: -pop edx ebx +pop edx ebx eax + ret + +;¢§ïâì ª®¤ë ¤®ç¥à­¨å ®¡ê¥ªâ®¢ +align 4 +proc get_code_children_objects, p_node:dword + push ebx esi + mov esi,[p_node] + mov bl,byte[esi+2] ;á®å࠭塞 ã஢¥­ì ⥪ã饣® ®¡ê¥ªâ  + + stdcall dword[tl_node_poi_get_next_info], esi,tree2 + pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã + cmp esi,0 ;¥á«¨ ¤®á⨣«¨ ª®­æ  ᯨ᪠ ®¡ê¥ªâ®¢ + je @f + cmp byte[esi+2],bl ;¥á«¨ ã஢¥­ì á«¥¤ãî饣® ®¡ê¥ªâ  ¡®«ìè¥ ¨«¨ à ¢¥­ ⥪ã饬ã + jle @f ;â® ¤®ç¥à­¨å 㧫®¢ ­¥â + mov bl,byte[esi+2] + call code_gen_obj ;४ãàᨢ­ë© ¢ë§®¢ ¤®ç¥à­¨å ®¡ê¥ªâ®¢ + @@: + pop esi ebx + ret +endp + +;¯à®¯ã᪠¢á¥å ¤®ç¥à­¨å ®¡ê¥ªâ®¢ +;input: +; esi - 㪠§ â¥«ì ­  㧥« +;outpet: +; esi - 㪠§ â¥«ì á«¥¤ã騩 ­¥ ¤®ç¥à­¨© (®â­®á¨â¥«ì­® ¢å®¤ï饣®) ­  㧥« +align 4 +move_next_no_child_objects: + push eax ebx + mov bl,byte[esi+2] ;á®å࠭塞 ã஢¥­ì ⥪ã饣® ®¡ê¥ªâ  + @@: + stdcall dword[tl_node_poi_get_next_info], esi,tree2 + pop eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã + cmp eax,0 ;¥á«¨ ¤®á⨣«¨ ª®­æ  ᯨ᪠ ®¡ê¥ªâ®¢ + je @f + cmp byte[eax+2],bl ;¥á«¨ ã஢¥­ì á«¥¤ãî饣® ®¡ê¥ªâ  ¡®«ìè¥ ¨«¨ à ¢¥­ ⥪ã饬ã + jle @f ;â® ¤®ç¥à­¨å 㧫®¢ ­¥â + mov esi,eax ;¥á«¨ á«¥¤ã騩 㧥« ®ª § «áï ¤®ç¥à­¨¬, ¯¥à¥áâ ¢«ï¥¬ 㪠§ â¥«ì + jmp @b + @@: + pop ebx eax ret ;¤®¡ ¢«¥­¨¥ ®¡ê¥ªâ  á ¯à®£à ¬­ë¬ ª®¤®¬ (⥪á⮬) @@ -301,10 +326,13 @@ endp ;®¡à ¡®âª  ®¡ê¥ªâ  ᮧ¤ î饣®  ¢â®¬ â¨ç¥ªá¨¥ ª®¤ë align 4 -proc get_code_auto, p_obj:dword +proc get_code_auto, p_node:dword pushad insert_nl - mov ebx,dword[p_obj] + mov esi,dword[p_node] + stdcall dword[tl_node_poi_get_data], esi,tree2 + pop ebx ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫  + test_bool_prop ebx,BIT_MOD_ACI jae @f mov edx,C_CHB @@ -321,9 +349,13 @@ proc get_code_auto, p_obj:dword test_bool_prop ebx,BIT_MOD_ABU jae @f ;ᮧ¤ ­¨¥ ä㭪樨 button - insert_but_beg + stdcall insert_text, txt_but_beg call get_code_auto_but ;ª®¤ë ¢ë§®¢  ª­®¯®ª - insert_but_end + stdcall insert_text, txt_but_mid + stdcall get_code_children_objects, esi + ;ª®­¥æ ä㭪樨 button (ª­®¯ª  id=-1, § ¢¥à襭¨¥ ¯à®£à ¬¬ë) + stdcall insert_text, txt_but_end + call get_code_a_but_fun ;ª®¤ë ä㭪権, ¢ë§ë¢ ¥¬ëå ¯à¨ ­ ¦ â¨¨ ª­®¯®ª @@: test_bool_prop ebx,BIT_MOD_ACD @@ -1105,8 +1137,6 @@ proc get_code_window, p_obj:dword insert_nl call get_code_draw_obj - - stdcall insert_text, txt_draw_we ;ª®¤ § ¢¥àè î騩 äã­ªæ¨î à¨á®¢ ­¨ï popad ret endp @@ -1423,16 +1453,14 @@ txt_cb_b db 13,'check_boxes:',0 txt_cb_e db 'check_boxes_end:',13,0 txt_ebox db ' edit_box',0 -txt_editb_draw: - db 9,'stdcall [edit_box_draw], ',0 -txt_cbox_draw: - db 9,'stdcall [check_box_draw], ',0 +txt_editb_draw db 9,'stdcall [edit_box_draw], ',0 +txt_cbox_draw db 9,'stdcall [check_box_draw], ',0 -txt_but_1: -db 'align 4',13,'button:',13,9,'mcall 17',13 -txt_but_2: -db 9,'cmp ah,1',13,9,'jne still',13,'.exit:',13,9,'mcall -1',13 -txt_but_3: +;­ ç «® ä㭪樨 ª­®¯®ª +txt_but_beg db 'align 4',13,'button:',13,9,'mcall 17',13,0 +txt_but_mid db 9,'cmp ah,1',13,9,'jne still',13,'.exit:',13,0 +;ª®­¥æ ä㭪樨 ª­®¯®ª (§ ¢¥à襭¨¥ ¯à®£à ¬ë) +txt_but_end db 9,'mcall -1',13,0 txt_key_1: db 'align 4',13,'key:',13,9,'mcall 2',13 diff --git a/programs/develop/kol_f_edit/docs/prop_incl.png b/programs/develop/kol_f_edit/docs/prop_incl.png new file mode 100644 index 0000000000..9660caec10 Binary files /dev/null and b/programs/develop/kol_f_edit/docs/prop_incl.png differ diff --git a/programs/develop/kol_f_edit/docs/readme.htm b/programs/develop/kol_f_edit/docs/readme.htm index 9f1eae8b8a..525140a650 100644 --- a/programs/develop/kol_f_edit/docs/readme.htm +++ b/programs/develop/kol_f_edit/docs/readme.htm @@ -48,7 +48,7 @@ table -

Kol_f_edit âåðñèÿ îò 22.12.2010

+

Kol_f_edit âåðñèÿ îò 31.12.2010

Îãëàâëåíèå

Î ïðîãðàììå

Ïðîãðàììà äëÿ àâòîìàòèçàöèè ñîçäàíèÿ èíòåðôåéñà. - Ìíîãèå ôóíêöèè ïðîãðàììû ïîêà åùå íå ñäåëàíû, ïîòîìó âîçìîæíîñòè åå ïðàêòè÷åñêîãî èñïîëüçîâàíèÿ ìèíèìàëüíûå. + Íåêîòîðûå èç ôóíêöèé ïðîãðàììû ïîêà åùå íå ñäåëàíû, ïîòîìó âîçìîæíîñòè åå ïðàêòè÷åñêîãî èñïîëüçîâàíèÿ îãðàíè÷åíû. Ëèöåíçèÿ ñâîáîäíàÿ.

Âíåøíèé âèä ïðîãðàììû.

Àëãîðèòì ðàáîòû ñ ïðîãðàììîé

-

1) Îòêðûâàåì øàáëîí ïðîãðàììû èç ôàéëà min_prog.ced èëè box_l.ced - (min_prog.ced - "ìèíèìàëüíàÿ" ïðîãðàììà, box_l.ced - ïðîãðàììà ñ ïîäêëþ÷åíèåì áèáëèîòåêè box_lib.obj, ïëàíèðóåòüñÿ äîáàâëåíèå äðóãèõ øàáëîíîâ)

+

1) Îòêðûâàåì øàáëîí ïðîãðàììû èç ôàéëà ñ ðàñøèðåíèåì .ced + (min_prog.ced - "ìèíèìàëüíàÿ" ïðîãðàììà, box_l.ced - ïðîãðàììà ñ ïîäêëþ÷åíèåì áèáëèîòåêè box_lib.obj, + buf2d.ced - ïðîãðàììà ñ ïîäêëþ÷åíèåì áèáëèîòåêè buf2d.obj, ïëàíèðóåòüñÿ äîáàâëåíèå äðóãèõ øàáëîíîâ)

2) Ðåäàêòèðóåì îáúåêòû â ïîäêëþ÷åííîì ôàéëå *.ced

-

3) Ñîçäàåì *.asm êîä â òåêñòîâîì îêíå êíîïêîé íà ïàíåëè. Ñîõðàíÿåì *.asm êîä íà äèñê (ðàáîòîñïîñîáíîñòü ïîëó÷èâøåãîñÿ ôàéëà íå ãàðàíòèðóåòñÿ, ò. ê. ìíîãèå ýëåìåíòû åùå äîêîíöà íå çàïðîãðàìèðîâàíû)

-

4) Ðåäàêòèðóåì ïîëó÷èâøèéñÿ *.asm ôàéë ëþáûì òåêñòîâûì ðåäàêòîðîì

+

3) Ñîçäàåì *.asm êîä â òåêñòîâîì îêíå êíîïêîé íà ïàíåëè. Ñîõðàíÿåì *.asm êîä íà äèñê (ðàáîòîñïîñîáíîñòü ïîëó÷èâøåãîñÿ ôàéëà íå ãàðàíòèðóåòñÿ, ò. ê. íåêîòîðûå èç ýëåìåíòîâ åùå äîêîíöà íå ïðîðàáîòàíû)

+

4) Ðåäàêòèðóåì ïîëó÷èâøèéñÿ *.asm ôàéë ëþáûì òåêñòîâûì ðåäàêòîðîì. Äëÿ ýòîãî óáèðàåì â íà÷àëå ôàéëà îïèñàíèÿ ñòðóêòóð (ò. ê. îíè ñîäåðæàòñÿ â ïîäêëþ÷àåìûõ ôàéëàõ .inc) è äîïèñûâàåì ïóòè ê ïîäêëþ÷àåìûì ôàéëàì.

Âèäû îáúåêòîâ

Ïðîãðàìíûé êîä ñîçäàåòñÿ íà îñíîâå ñâîéñòâ îáúåêòîâ, âíåñåííûõ â ôàéë ïðîýêòà. Âñå îáúåêòû âíóòðè ïðîãðàìû ïðåäñòàâëÿþòüñÿ ñòðóêòóðàìè âèäà:

@@ -148,7 +151,25 @@ ends
  • òåêñò îøèáêè êîòîðûé ïîÿâëÿåòñÿ åñëè âîçíèêëè ïðîáëåìû ñ èìïîðòîì ôóíêöèé èç áèáëèîòåêè
  • Äëÿ ñîçäàíèÿ ïðîãðàìíîãî êîäà ýòîãî îáúåêòà íóæåí îáúåêò àâòî êîäà ñ âêëþ÷åííîé îïöèåé êîäû ýëåìåíòîâ. - Ýòîò îáúåêò èñïîëüçóåòñÿ âìåñòå ñ îáúåêòàìè ôóíêöèÿ èç áèáëèîòåêè, êîòîðûå äîëæíû áûòü äî÷åðíèìè äëÿ íåãî.

    + Ýòîò îáúåêò èñïîëüçóåòñÿ âìåñòå ñ îáúåêòàìè ôóíêöèÿ èç áèáëèîòåêè, êîòîðûå äîëæíû áûòü äî÷åðíèìè äëÿ íåãî.

    + +

    Ôóíêöèÿ èç áèáëèîòåêè

    + +

    Äàííûå îáúåêòû ñëóæàò äëÿ ñîçäàíèÿ óêàçàòåëåé íà ôóíêöèè èìïîðòèðóåìûå èç áèáëèîòåêè. Ñîäåðæèò ïàðàìåòðû:

    + +

     áîëüøèíñòâå ñëó÷àåâ ýòè ïàðàìåòðû áóäóò ñîâïàäàòü äðóã ñ äðóãîì. + Ýòè îáúåêòû èñïîëüçóåòñÿ âìåñòå ñ îáúåêòàìè èìïîðò áèáëèîòåêè, êîòîðûå äîëæíû áûòü ðîäèòåëüñêèìè äëÿ íèõ.

    + +

    Âêëþ÷åíèå ôàéëà

    + +

    Îáúåêò ñîçäàíèÿ êîäà ïîäêëþ÷åíèÿ ôàéëîâ, ÷åðåç êëþ÷åâîå ñëîâî include. Ñîäåðæèò ïàðàìåòðû:

    +

    diff --git a/programs/develop/kol_f_edit/kol_f_edit.asm b/programs/develop/kol_f_edit/kol_f_edit.asm index a0ce632d85..fe9e682a09 100644 --- a/programs/develop/kol_f_edit/kol_f_edit.asm +++ b/programs/develop/kol_f_edit/kol_f_edit.asm @@ -20,7 +20,7 @@ include 'obj_codes.inc' @use_library_mem mem.Alloc,mem.Free,mem.ReAlloc, dll.Load -hed db 'kol_f_edit 22.12.10',0 +hed db 'kol_f_edit 31.12.10',0 sizeof.TreeList equ 20 ;need for element 'tree_list'