Rev 6582 | Rev 7463 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6582 | Rev 7167 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | @use_library_mem mem.Alloc, mem.Free, mem.ReAlloc, dll.Load |
1 | @use_library_mem mem.Alloc, mem.Free, mem.ReAlloc, dll.Load |
Line 2... | Line 2... | ||
2 | 2 | ||
3 | fn_icon1 db '../../develop/libraries/box_lib/trunk/tl_sys_16_w.bmp', 0 |
- | |
4 | fn_icon2 db '../../develop/libraries/box_lib/trunk/tl_nod_16_w.bmp', 0 |
3 | icon_tl_sys dd 0 |
Line 5... | Line 4... | ||
5 | bmp_icon dd 0 |
4 | icon_tl_nod dd 0 |
6 | 5 | ||
7 | TLIST_SZ = 325+16 ;=341. 16 is x-size of scroll bar |
6 | TLIST_SZ = 325+16 ;=341. 16 is x-size of scroll bar |
8 | TLIST1_X = 50 |
7 | TLIST1_X = 50 |
Line 35... | Line 34... | ||
35 | dd .progress |
34 | dd .progress |
36 | dd .error |
35 | dd .error |
Line 37... | Line 36... | ||
37 | 36 | ||
38 | .init: |
37 | .init: |
39 | ; load libraries |
38 | ; load libraries |
40 | stdcall dll.Load, @IMPORT_BOXLIB |
39 | stdcall dll.Load, @IMPORT_GUI_LIBS |
41 | test eax, eax |
40 | test eax, eax |
Line 42... | Line 41... | ||
42 | jnz .exit |
41 | jnz .exit |
43 | 42 | ||
Line 71... | Line 70... | ||
71 | 70 | ||
72 | ; initialize tree list elements |
71 | ; initialize tree list elements |
73 | stdcall dword[tl_data_init], tree1 |
72 | stdcall dword[tl_data_init], tree1 |
Line 74... | Line 73... | ||
74 | stdcall dword[tl_data_init], tree2 |
73 | stdcall dword[tl_data_init], tree2 |
75 | 74 | ||
76 | ; read *.bmp file system icons |
- | |
77 | copy_path fn_icon1,path,filestruct.name, 0 |
- | |
78 | - | ||
79 | mov ecx, 3*256*13 |
- | |
Line 80... | Line 75... | ||
80 | stdcall mem.Alloc, ecx |
75 | ; read icons |
81 | mov [bmp_icon], eax |
76 | load_image_file 'tl_sys_16.png', icon_tl_sys |
82 | 77 | ||
83 | mov [filestruct.ptr], eax |
78 | mov [filestruct.ptr], eax |
84 | mov [filestruct.subfn], 0 |
79 | mov [filestruct.subfn], 0 |
85 | mov [filestruct.offset], 54 |
80 | mov [filestruct.offset], 54 |
86 | mov [filestruct.size], ecx |
81 | mov [filestruct.size], ecx |
87 | mcall 70, filestruct |
82 | mcall 70, filestruct |
88 | cmp ebx, 0 |
83 | cmp ebx, 0 |
Line 89... | Line 84... | ||
89 | jl @f |
84 | jl @f |
90 | m2m dword[tree1.data_img_sys], dword[bmp_icon] |
85 | m2m dword[tree1.data_img_sys], dword[icon_tl_sys] |
91 | m2m dword[tree2.data_img_sys], dword[bmp_icon] |
86 | m2m dword[tree2.data_img_sys], dword[icon_tl_sys] |
92 | - | ||
93 | @@: |
- | |
94 | ; read * .bmp file with the icon of nodes |
- | |
95 | copy_path fn_icon2, path, filestruct.name, 0 |
- | |
Line 96... | Line 87... | ||
96 | 87 | ||
97 | mov ecx, 3*256*13 |
88 | @@: |
98 | stdcall mem.Alloc, ecx |
89 | ; read nodes icon file |
99 | mov [bmp_icon], eax |
90 | load_image_file 'tl_nod_16.png', icon_tl_nod |
100 | 91 | ||
101 | mov [filestruct.ptr], eax |
92 | mov [filestruct.ptr], eax |
102 | ;mov [filestruct.subfn], 0 |
93 | ;mov [filestruct.subfn], 0 |
103 | ;mov [filestruct.offset], 54 |
94 | ;mov [filestruct.offset], 54 |
104 | mov [filestruct.size], ecx |
95 | mov [filestruct.size], ecx |
Line 105... | Line 96... | ||
105 | mcall 70, filestruct |
96 | mcall 70, filestruct |
106 | cmp ebx, 0 |
97 | cmp ebx, 0 |
107 | jl @f |
98 | jl @f |
108 | m2m dword[tree1.data_img], dword[bmp_icon] |
99 | m2m dword[tree1.data_img], dword[icon_tl_nod] |
Line 1113... | Line 1104... | ||
1113 | } |
1104 | } |
1114 | pb pb |
1105 | pb pb |
Line 1115... | Line 1106... | ||
1115 | 1106 | ||
1116 | 1107 | ||
Line 1117... | Line 1108... | ||
1117 | align 4 |
1108 | align 4 |
Line 1118... | Line 1109... | ||
1118 | @IMPORT_BOXLIB: |
1109 | @IMPORT_GUI_LIBS: |
1119 | 1110 | ||
1120 | library box_lib, 'box_lib.obj' |
1111 | library box_lib, 'box_lib.obj', libimg, 'libimg.obj' |
1121 | 1112 | ||
Line 1168... | Line 1159... | ||
1168 | ted_but_reverse, 'ted_but_reverse', \ |
1159 | ted_but_reverse, 'ted_but_reverse', \ |
1169 | ted_but_find_next, 'ted_but_find_next', \ |
1160 | ted_but_find_next, 'ted_but_find_next', \ |
1170 | ted_text_colored, 'ted_text_colored', \ |
1161 | ted_text_colored, 'ted_text_colored', \ |
1171 | progressbar_draw, 'progressbar_draw' |
1162 | progressbar_draw, 'progressbar_draw' |
Line -... | Line 1163... | ||
- | 1163 | ||
- | 1164 | import libimg, \ |
|
- | 1165 | lib_init1 , 'lib_init', \ |
|
- | 1166 | img_is_img , 'img_is_img', \;определяет по данным, может ли библиотека сделать из них изображени \ |
|
- | 1167 | img_info , 'img_info', \ |
|
- | 1168 | img_from_file , 'img_from_file', \ |
|
- | 1169 | img_to_file , 'img_to_file', \ |
|
- | 1170 | img_from_rgb , 'img_from_rgb', \ |
|
- | 1171 | img_to_rgb , 'img_to_rgb', \;преобразование изображения в данные RG \ |
|
- | 1172 | img_to_rgb2 , 'img_to_rgb2', \ |
|
- | 1173 | img_decode , 'img_decode', \ ;автоматически определяет формат графических данны \ |
|
- | 1174 | img_encode , 'img_encode', \ |
|
- | 1175 | img_create , 'img_create', \ |
|
- | 1176 | img_destroy , 'img_destroy', \ |
|
- | 1177 | img_destroy_layer , 'img_destroy_layer', \ |
|
- | 1178 | img_count , 'img_count', \ |
|
- | 1179 | img_lock_bits , 'img_lock_bits', \ |
|
- | 1180 | img_unlock_bits , 'img_unlock_bits', \ |
|
- | 1181 | img_flip , 'img_flip', \ |
|
- | 1182 | img_flip_layer , 'img_flip_layer', \ |
|
- | 1183 | img_rotate , 'img_rotate', \ |
|
- | 1184 | img_rotate_layer , 'img_rotate_layer', \ |
|
- | 1185 | img_draw , 'img_draw' |
|
- | 1186 | ||
- | 1187 | ||
Line 1172... | Line 1188... | ||
1172 | 1188 | run_file_70 FileInfoBlock ; required for libimg |
|
1173 | 1189 | ||
1174 | auto_list db 1 ; to run LIST immediately after CWD |
1190 | auto_list db 1 ; to run LIST immediately after CWD |
1175 | filter rb 512 |
1191 | filter rb 512 |
Line 1180... | Line 1196... | ||
1180 | node_entry db '1111' |
1196 | node_entry db '1111' |
1181 | rb 512 |
1197 | rb 512 |
1182 | node_entry2 db '1111' |
1198 | node_entry2 db '1111' |
1183 | rb 512 |
1199 | rb 512 |
1184 | remote_list_buf rb 1024 |
1200 | remote_list_buf rb 1024 |
- | 1201 | file_name rb 4096 ; required for libimg |
|
1185 | conv_tabl rb 128 |
1202 | conv_tabl rb 128 |
1186 | ed_buffer rb 100 |
1203 | ed_buffer rb 100 |
1187 | tedit_buffer rb 1024 |
1204 | tedit_buffer rb 1024 |
1188 | el_focus dd 0 |
1205 | el_focus dd 0 |
1189 | ;----------------------- |
1206 | ;----------------------- |