diff --git a/programs/develop/libraries/box_lib/trunk/bl_sys.mac b/programs/develop/libraries/box_lib/trunk/bl_sys.mac index b5b7ed57a8..fead243904 100644 --- a/programs/develop/libraries/box_lib/trunk/bl_sys.mac +++ b/programs/develop/libraries/box_lib/trunk/bl_sys.mac @@ -6,4 +6,5 @@ include 'd_button.mac' ;macro implements dinamic_button include 'menubar.mac' ;macro implements menubar include 'filebrowser.mac' ;macro implements filebrowser include 'tree_list.mac' ;macro implements tree_list, image_list, list_box -include 'pathshow.mac' ;macro implements pathshow \ No newline at end of file +include 'pathshow.mac' ;macro implements pathshow +include 't_edit.mac' ;macro implements text_editor \ No newline at end of file diff --git a/programs/develop/libraries/box_lib/trunk/box_lib.asm b/programs/develop/libraries/box_lib/trunk/box_lib.asm index f0838b990c..666efe9fb4 100644 --- a/programs/develop/libraries/box_lib/trunk/box_lib.asm +++ b/programs/develop/libraries/box_lib/trunk/box_lib.asm @@ -16,6 +16,7 @@ public EXPORTS section '.flat' code readable align 16 include '../../../../macros.inc' +include '../../../../proc32.inc' include 'bl_sys.mac' include 'box_lib.mac' ;macro which should make life easier :) @@ -88,6 +89,12 @@ use_tree_list align 16 use_path_show +;-------------------------------------------------- +;text editor +;-------------------------------------------------- +align 16 +use_text_edit + align 16 init: ret @@ -141,13 +148,13 @@ dd sz_tl_mouse, tl_mouse dd sz_tl_draw, tl_draw dd sz_tl_info_undo, tl_info_undo dd sz_tl_info_redo, tl_info_redo -dd sz_tl_node_add, tl_node_add +dd sz_tl_node_add, tl_node_add dd sz_tl_node_set_data, tl_node_set_data dd sz_tl_node_get_data, tl_node_get_data dd sz_tl_node_delete, tl_node_delete dd sz_tl_cur_beg, tl_cur_beg -dd sz_tl_cur_next, tl_cur_next -dd sz_tl_cur_perv, tl_cur_perv +dd sz_tl_cur_next, tl_cur_next +dd sz_tl_cur_perv, tl_cur_perv dd sz_tl_node_close_open, tl_node_close_open dd sz_tl_node_lev_inc, tl_node_lev_inc dd sz_tl_node_lev_dec, tl_node_lev_dec @@ -156,23 +163,48 @@ dd sz_tl_node_move_down, tl_node_move_down dd sz_tl_node_poi_get_info, tl_node_poi_get_info dd sz_tl_node_poi_get_next_info, tl_node_poi_get_next_info dd sz_tl_node_poi_get_data, tl_node_poi_get_data -dd sz_tl_save_mem, tl_save_mem -dd sz_tl_load_mem, tl_load_mem +dd sz_tl_save_mem, tl_save_mem +dd sz_tl_load_mem, tl_load_mem dd sz_tl_get_mem_size, tl_get_mem_size dd sz_tl_version_tree_list, 0x00000001 dd sz_PathShow_prepare, path_show.prepare dd sz_PathShow_draw, path_show.draw dd szVersion_path_show, 0x00010001 - + +dd sz_ted_but_save_file, ted_but_save_file +dd sz_ted_but_sumb_upper, ted_but_sumb_upper +dd sz_ted_but_sumb_lover, ted_but_sumb_lover +dd sz_ted_can_save, ted_can_save +dd sz_ted_clear, ted_clear +dd sz_ted_delete, ted_delete +dd sz_ted_draw, ted_draw +dd sz_ted_init, ted_init +dd sz_ted_init_syntax_file, ted_init_syntax_file +dd sz_ted_is_select, ted_is_select +dd sz_ted_key, ted_key +dd sz_ted_mouse, ted_mouse +dd sz_ted_open_file, ted_open_file +dd sz_ted_text_add, ted_text_add +dd sz_ted_but_select_word, ted_but_select_word +dd sz_ted_but_cut, ted_but_cut +dd sz_ted_but_copy, ted_but_copy +dd sz_ted_but_paste, ted_but_paste +dd sz_ted_but_undo, ted_but_undo +dd sz_ted_but_redo, ted_but_redo +dd sz_ted_but_reverse, ted_but_reverse +dd sz_ted_but_find_next, ted_but_find_next +dd sz_ted_text_colored, ted_text_colored +dd sz_ted_version, 0x00000001 + dd 0,0 -sz_init db 'lib_init',0 +sz_init db 'lib_init',0 sz_version db 'version',0 sz_edit_box db 'edit_box',0 -sz_edit_box_key db 'edit_box_key',0 +sz_edit_box_key db 'edit_box_key',0 sz_edit_box_mouse db 'edit_box_mouse',0 szVersion_ed db 'version_ed',0 @@ -196,7 +228,7 @@ szVersion_dbutton db 'version_dbutton',0 sz_Menu_bar_draw db 'menu_bar_draw',0 sz_Menu_bar_mouse db 'menu_bar_mouse',0 -sz_Menu_bar_activate db 'menu_bar_activate',0 +sz_Menu_bar_activate db 'menu_bar_activate',0 szVersion_menu_bar db 'version_menu_bar',0 sz_FileBrowser_draw db 'FileBrowser_draw',0 @@ -204,14 +236,14 @@ sz_FileBrowser_mouse db 'FileBrowser_mouse',0 sz_FileBrowser_key db 'FileBrowser_key',0 szVersion_FileBrowser db 'version_FileBrowser',0 -sz_tl_data_init db 'tl_data_init',0 +sz_tl_data_init db 'tl_data_init',0 sz_tl_data_clear db 'tl_data_clear',0 sz_tl_info_clear db 'tl_info_clear',0 sz_tl_key db 'tl_key',0 sz_tl_mouse db 'tl_mouse',0 sz_tl_draw db 'tl_draw',0 -sz_tl_info_undo db 'tl_info_undo',0 -sz_tl_info_redo db 'tl_info_redo',0 +sz_tl_info_undo db 'tl_info_undo',0 +sz_tl_info_redo db 'tl_info_redo',0 sz_tl_node_add db 'tl_node_add',0 sz_tl_node_set_data db 'tl_node_set_data',0 sz_tl_node_get_data db 'tl_node_get_data',0 @@ -224,14 +256,39 @@ sz_tl_node_lev_inc db 'tl_node_lev_inc',0 sz_tl_node_lev_dec db 'tl_node_lev_dec',0 sz_tl_node_move_up db 'tl_node_move_up',0 sz_tl_node_move_down db 'tl_node_move_down',0 -sz_tl_node_poi_get_info db 'tl_node_poi_get_info',0 +sz_tl_node_poi_get_info db 'tl_node_poi_get_info',0 sz_tl_node_poi_get_next_info db 'tl_node_poi_get_next_info',0 -sz_tl_node_poi_get_data db 'tl_node_poi_get_data',0 +sz_tl_node_poi_get_data db 'tl_node_poi_get_data',0 sz_tl_save_mem db 'tl_save_mem',0 sz_tl_load_mem db 'tl_load_mem',0 sz_tl_get_mem_size db 'tl_get_mem_size',0 -sz_tl_version_tree_list db 'version_tree_list',0 +sz_tl_version_tree_list db 'version_tree_list',0 sz_PathShow_prepare db 'PathShow_prepare',0 sz_PathShow_draw db 'PathShow_draw',0 szVersion_path_show db 'version_PathShow',0 + +sz_ted_but_save_file db 'ted_but_save_file',0 +sz_ted_but_sumb_upper db 'ted_but_sumb_upper',0 +sz_ted_but_sumb_lover db 'ted_but_sumb_lover',0 +sz_ted_can_save db 'ted_can_save',0 +sz_ted_clear db 'ted_clear',0 +sz_ted_delete db 'ted_delete',0 +sz_ted_draw db 'ted_draw',0 +sz_ted_init db 'ted_init',0 +sz_ted_init_syntax_file db 'ted_init_syntax_file',0 +sz_ted_is_select db 'ted_is_select',0 +sz_ted_key db 'ted_key',0 +sz_ted_mouse db 'ted_mouse',0 +sz_ted_open_file db 'ted_open_file',0 +sz_ted_text_add db 'ted_text_add',0 +sz_ted_but_select_word db 'ted_but_select_word',0 +sz_ted_but_cut db 'ted_but_cut',0 +sz_ted_but_copy db 'ted_but_copy',0 +sz_ted_but_paste db 'ted_but_paste',0 +sz_ted_but_undo db 'ted_but_undo',0 +sz_ted_but_redo db 'ted_but_redo',0 +sz_ted_but_reverse db 'ted_but_reverse',0 +sz_ted_but_find_next db 'ted_but_find_next',0 +sz_ted_text_colored db 'ted_text_colored',0 +sz_ted_version db 'version_text_edit',0 \ No newline at end of file diff --git a/programs/develop/libraries/box_lib/trunk/box_lib.mac b/programs/develop/libraries/box_lib/trunk/box_lib.mac index 502f0223eb..c4425d1356 100644 --- a/programs/develop/libraries/box_lib/trunk/box_lib.mac +++ b/programs/develop/libraries/box_lib/trunk/box_lib.mac @@ -168,6 +168,10 @@ op_flag_en=10b .flags: dd flags+0 ; 䫠 } +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;Basic macros for use TreeList ; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + struc tree_list info_size,info_max_count,style, img_cx,img_cy,\ col_bkg,col_zag,col_txt, box_l,box_t,box_w,box_h, capt_cy,info_capt_offs,\ info_capt_len,el_focus, p_scrol,on_press { @@ -201,10 +205,6 @@ struc tree_list info_size,info_max_count,style, img_cx,img_cy,\ .on_press dd on_press } -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;Basic macros for use TreeList ; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - tl_info_size equ word[edi +4] ;ࠧ 뤥塞 㧫 (짮⥫쪨 + ⥪ ) tl_info_max_count equ dword[edi+6] ;ᨬ쭮 ⢮ 㧫, tl_style equ dword[edi+10] ;⨫ @@ -245,3 +245,102 @@ tl_err_load_caption equ 1b ; tl_err_load_info_size equ 100b ; ᮢ ࠧ ଠ樮 ⨨ tl_load_mode_add equ 0x20000 ; 뢠 ० ଠ樨 tl_save_load_heder_size equ 26 ;ࠧ /⥭ ⮢ + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;Basic macros for use TextEditor ; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +ted_wnd_l equ dword[edi+ 0] ; ।: +ted_wnd_t equ dword[edi+ 4] ; ।: ᢥ +ted_wnd_w equ dword[edi+ 8] ; ।: ਭ +ted_wnd_h equ dword[edi+12] ; ।: +ted_rec_l equ dword[edi+16] ;ਭ +ted_rec_t equ dword[edi+20] ; +ted_rec_w equ dword[edi+24] ;ਭ ᨬ () +ted_rec_h equ dword[edi+28] ; ᨬ () +ted_drag_m equ byte[edi+32] ;뤥 +ted_drag_k equ byte[edi+33] ;뤥 +ted_sel_x0 equ dword[edi+34] ;न 뤥 x0 +ted_sel_y0 equ dword[edi+38] ;न 뤥 y0 +ted_sel_x1 equ dword[edi+42] ;न 뤥 x1 +ted_sel_y1 equ dword[edi+46] ;न 뤥 y1 +; न 뤥 +ted_seln_x0 equ dword[edi+50] +ted_seln_y0 equ dword[edi+54] +ted_seln_x1 equ dword[edi+58] +ted_seln_y1 equ dword[edi+62] + +ted_tex equ dword[edi+66] ;㪠⥫ ࠭ ⥪ +ted_tex_1 equ dword[edi+70] ;㪠⥫ 1- ᨬ +ted_tex_end equ dword[edi+74] ;㪠⥫ ᨬ +ted_cur_x equ dword[edi+78] ;न x +ted_cur_y equ dword[edi+82] ;न y +ted_max_chars equ dword[edi+86] ;ᨬ쭮 ᨬ 㬥 +ted_colors_text_count equ dword[edi+90] ;⢮ 梥⮢ ⥪ +ted_key_words_count equ dword[edi+94] ;⢮ 祢 +ted_color_cursor equ dword[edi+98] ;梥 +ted_color_wnd_capt equ dword[edi+102] ;梥 +ted_color_wnd_work equ dword[edi+106] ;梥 䮭 +ted_color_wnd_bord equ dword[edi+110] ;梥 ⥪ +ted_color_select equ dword[edi+114] ;梥 뤥 +ted_color_cur_text equ dword[edi+118] ;梥 ᨬ +ted_color_wnd_text equ dword[edi+122] ;梥 ⥪ +ted_syntax_file equ dword[edi+126] ;㪠⥫ 砫 䠩 ᨭ⠪ +ted_syntax_file_size equ dword[edi+130] ;ᨬ ࠧ 䠩 ᨭ⠪ +ted_text_colors equ dword[edi+134] ;㪠⥫ ᨢ 梥⮢ ⥪ +ted_help_text_f1 equ dword[edi+138] ;㪠⥫ ⥪ ࠢ ( ⨨ F1) +ted_help_id equ dword[edi+142] ;䨪 ࠢ +ted_key_words_data equ dword[edi+146] ;㪠⥫ 祢 TexColViv +ted_tim_ch equ dword[edi+150] ;⢮ 䠩 +ted_tim_undo equ dword[edi+154] ;⢮ ⬥ ⢨ +ted_tim_ls equ dword[edi+158] ;६ ࠭ +ted_tim_co equ dword[edi+162] ;६ 梥⮢ ࠧ⪨ +ted_el_focus equ dword[edi+166] ;㪠⥫ ६ 䮪 +ted_err_save equ byte[edi+170] ;訡 ࠭ 䠩 +ted_panel_id equ byte[edi+171] ; ⮩ +ted_key_new equ byte[edi+172] ;ᨬ, 㤥 +ted_symbol_new_line equ byte[edi+173] ;ᨬ 襭 ப +ted_scr_w equ dword[edi+174] ;⨪ +ted_scr_h equ dword[edi+178] ;ਧ⠫ +ted_arr_key_pos equ dword[edi+182] ;㪠⥫ ᨢ 権 祢 +ted_buffer equ dword[edi+186] ;㪠⥫ /⠢ +ted_buffer_find equ dword[edi+190] ;㪠⥫ ᪠ +ted_cur_ins equ byte[edi+194] ;० ࠡ ( ) +ted_mode_color equ byte[edi+195] ;० 뤥 梥⮬ (0-몫. 1-.) +ted_mode_invis equ byte[edi+196] ;० ⠥ ᨬ +ted_gp_opt equ byte[edi+197] ;樨 頥 㭪樥 ted_get_pos_by_cursor +ted_fun_on_key_ctrl_o equ dword[edi+198] ;㪠⥫ 㭪 뢠 ⨨ Ctrl+O (⨥ 䠩) +ted_fun_on_key_ctrl_f equ dword[edi+202] ;... Ctrl+F (맮/ ᪠) +ted_fun_on_key_ctrl_n equ dword[edi+206] ;... Ctrl+N (ᮧ 㬥) +ted_fun_on_key_ctrl_s equ dword[edi+210] ;... Ctrl+S +ted_buffer_size equ dword[edi+214] ;ࠧ /⠢ +ted_fun_find_err equ dword[edi+218] ;㪠⥫ 㭪 뢠 稫 㤠筮 +ted_fun_init_synt_err equ dword[edi+222] ;㪠⥫ 㭪 뢠 訡筮 ⨨ 䠩 ᨭ⠪ +ted_fun_draw_panel_buttons equ dword[edi+226] ;㪠⥫ 㭪 ᮢ +ted_fun_draw_panel_find equ dword[edi+230] ;㪠⥫ 㭪 ᮢ ᪠ +ted_fun_draw_panel_syntax equ dword[edi+234] ;㪠⥫ 㭪 ᮢ ᨭ⠪ +ted_fun_save_err equ dword[edi+238] ;㪠⥫ 㭪 뢠 ࠭ 䠩 稫 㤠筮 +;------------------------------------------------------------------------------ +ted_opt_ed_move_cursor equ 1 ; ⥪ +ted_opt_ed_change_time equ 2 ; । ⥪ +ted_offs_sel equ 34 ;ᬥ饭 sel +ted_offs_seln equ 50 ;ᬥ饭 seln +ted_offs_count_colors equ 90 ;ᬥ饭 ६ ⢠ 梥⮢ +ted_offs_key_new equ 172 +ted_offs_symbol_new_line equ 173 ;ᬥ饭 ᨬ ப +;------------------------------------------------------------------------------ + + + +; *** scroll bar constant *** +sb_offs_size_x equ 0 +sb_offs_start_x equ 2 +sb_offs_size_y equ 4 +sb_offs_start_y equ 6 +sb_offs_max_area equ 16 +sb_offs_cur_area equ 20 +sb_offs_position equ 24 +sb_offs_redraw equ 40 +sb_offs_delta2 equ 46 +sb_offs_all_redraw equ 80 +;------------------------------------------------------------------------------ \ No newline at end of file diff --git a/programs/develop/libraries/box_lib/trunk/doc/box_lib.htm b/programs/develop/libraries/box_lib/trunk/doc/box_lib.htm index 2b79e93ee1..9140a70c1a 100644 --- a/programs/develop/libraries/box_lib/trunk/doc/box_lib.htm +++ b/programs/develop/libraries/box_lib/trunk/doc/box_lib.htm @@ -24,7 +24,9 @@
aka IgorA
05.02.10.
+29.04.10.