Rev 1951 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1951 | Rev 2000 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | test dword [status],1 |
3 | test dword [status],1 |
4 | jnz still |
4 | jnz still |
5 | or dword [status],1 |
5 | or dword [status],1 |
Line 6... | Line 6... | ||
6 | 6 | ||
7 | call load_directory.copy_dir_path |
- | |
8 | - | ||
9 | ; call get_filter_data |
- | |
10 | - | ||
11 | 7 | call load_directory.copy_dir_path |
|
12 | cmp [OpenDialog_path],dword 'NoKe' |
8 | cmp [OpenDialog_path],dword 'NoKe' |
- | 9 | je @f |
|
13 | je @f |
10 | |
14 | mov [OpenDialog_data.start_path],dword OpenDialog_path |
11 | mov [OpenDialog_data.start_path],dword OpenDialog_path |
- | 12 | jmp .start_OpenDialog |
|
15 | jmp .start_OpenDialog |
13 | ;--------------------------------------------------------------------- |
16 | @@: |
14 | @@: |
17 | mov ebx,open_dialog_name |
15 | mov ebx,open_dialog_name |
18 | mov esi,path |
16 | mov esi,path |
19 | mov edi,library_path |
17 | mov edi,library_path |
Line 20... | Line 18... | ||
20 | call copy_file_path |
18 | call copy_file_path |
21 | - | ||
22 | .start_OpenDialog: |
- | |
23 | 19 | ||
24 | ;start_OpenDialog OpenDialog_data |
20 | .start_OpenDialog: |
25 | push dword OpenDialog_data |
- | |
26 | call [OpenDialog_Start] |
21 | push dword OpenDialog_data |
27 | - | ||
28 | call clear_control_key_flag |
22 | call [OpenDialog_Start] |
29 | 23 | call clear_control_key_flag |
|
- | 24 | cmp [OpenDialog_data.status],2 |
|
30 | cmp [OpenDialog_data.status],2 |
25 | je thread1_start |
31 | je thread1_start |
26 | |
- | 27 | cmp [OpenDialog_data.status],1 |
|
32 | cmp [OpenDialog_data.status],1 |
28 | jne @f |
33 | jne @f |
29 | |
- | 30 | xor dword [status],1 |
|
34 | xor dword [status],1 |
31 | jmp kopen_1 |
35 | jmp kopen_1 |
32 | ;--------------------------------------------------------------------- |
36 | @@: |
33 | @@: |
37 | xor dword [status],1 |
- | |
- | 34 | xor dword [status],1 |
|
38 | jmp still |
35 | jmp still |
39 | - | ||
40 | thread1_start: |
36 | ;--------------------------------------------------------------------- |
41 | 37 | thread1_start: |
|
42 | call get_memory_for_tread_stack |
38 | call get_memory_for_thread_stack |
43 | mov [thread_stack],eax |
39 | mov [thread_stack],eax |
44 | mcall 51,1,thread1 ;, thread_stack |
40 | mcall 51,1,thread1 ; thread_stack |
45 | jmp still |
- | |
46 | ;--------------------------------------------------------------------- |
- | |
47 | get_filter_data: |
- | |
48 | mov edi,Filter+4 |
- | |
49 | xor eax,eax |
- | |
50 | mov ecx,10 |
- | |
51 | cld |
- | |
52 | @@: |
- | |
53 | mov esi,10 |
- | |
54 | sub esi,ecx |
- | |
55 | lea esi,[esi+esi*2] ; x 3 |
- | |
56 | shl esi,3 ; x 8 |
- | |
57 | add esi,dword Convert_plugin_0.Assoc |
- | |
58 | mov esi,[esi] |
- | |
59 | add esi,4 |
- | |
60 | - | ||
61 | test esi,esi |
- | |
62 | jz @f |
- | |
63 | call .start |
- | |
64 | dec ecx |
- | |
65 | jnz @r |
- | |
66 | @@: |
- | |
67 | mov [edi],byte 0 |
- | |
68 | mov eax,Filter |
- | |
69 | sub edi,eax |
- | |
70 | mov [eax],edi |
- | |
71 | - | ||
72 | ret |
- | |
73 | .start: |
- | |
74 | @@: |
- | |
75 | lodsb |
- | |
76 | stosb |
- | |
77 | test eax,eax |
- | |
78 | jnz @r |
- | |
79 | cmp [esi],ah |
- | |
80 | jne @r |
- | |
81 | ret |
41 | jmp still |
82 | ;--------------------------------------------------------------------- |
42 | ;--------------------------------------------------------------------- |
83 | thread1: ; start of thread1 |
43 | thread1: ; start of thread1 |
84 | mcall 9, procinfo_threads, -1 |
44 | mcall 9,procinfo_threads, -1 |
85 | mov eax,[ebx+30] |
45 | mov eax,[ebx+30] |
86 | mov [PID1],eax |
- | |
87 | mcall 40, 0x27 |
46 | mov [PID1],eax |
88 | 47 | mcall 40,0x27 |
|
89 | or ecx,-1 ; get information about me |
- | |
90 | call getappinfo |
48 | or ecx,-1 ; get information about me |
91 | - | ||
- | 49 | call getappinfo |
|
92 | mov esi,string |
50 | mov esi,string |
- | 51 | ;------------------------------------- |
|
93 | @@: |
52 | cld |
94 | cld |
53 | @@: |
95 | lodsb |
54 | lodsb |
- | 55 | test al,al |
|
96 | test al,al |
56 | jne @r |
97 | jne @r |
57 | ;------------------------------------- |
98 | sub esi,string |
58 | sub esi,string |
99 | mov eax,esi |
59 | mov eax,esi |
100 | dec eax |
60 | dec eax |
101 | mov edi, edit1 |
61 | mov edi, edit1 |
- | 62 | mov [edi+48], eax ;ed_size |
|
102 | mov [edi+48], eax ;ed_size |
63 | mov [edi+52], eax ;ed_pos |
103 | mov [edi+52], eax ;ed_pos |
64 | ;------------------------------------- |
104 | .red: |
- | |
- | 65 | .red: |
|
105 | call .draw_window |
66 | call .draw_window |
106 | - | ||
107 | .still: |
67 | ;------------------------------------- |
Line 108... | Line 68... | ||
108 | 68 | .still: |
|
109 | mcall 10 ; wait here for event |
69 | mcall 10 ; wait here for event |
- | 70 | ||
110 | 71 | cmp eax,1 ; redraw request ? |
|
111 | cmp eax,1 ; redraw request ? |
72 | je .red |
- | 73 | ||
112 | je .red |
74 | cmp eax,2 ; key in buffer ? |
113 | cmp eax,2 ; key in buffer ? |
75 | je .key |
Line 114... | Line 76... | ||
114 | je .key |
76 | |
115 | cmp eax,3 ; button in buffer ? |
77 | cmp eax,3 ; button in buffer ? |
116 | je .button |
- | |
117 | - | ||
118 | push dword name_editboxes |
78 | je .button |
119 | call [edit_box_mouse] |
- | |
- | 79 | ||
120 | ; mouse_edit_box name_editboxes |
80 | push dword name_editboxes |
121 | ; mouse_menubar menu_data_2 |
81 | call [edit_box_mouse] |
122 | jmp .still |
82 | jmp .still |
123 | 83 | ;--------------------------------------------------------------------- |
|
- | 84 | .key: ; key |
|
124 | .key: ; key |
85 | mcall |
125 | mcall 2 |
86 | cmp ah,13 |
Line 126... | Line 87... | ||
126 | cmp ah,13 |
87 | je .close_with_open_file |
127 | je .close_with_open_file |
88 | |
128 | cmp ah,27 |
- | |
129 | je .close |
89 | cmp ah,27 |
130 | - | ||
- | 90 | je .close |
|
131 | push dword name_editboxes |
91 | |
132 | call [edit_box_key] |
92 | push dword name_editboxes |
133 | ; key_edit_box name_editboxes |
93 | call [edit_box_key] |
134 | jmp .still |
- | |
- | 94 | jmp .still |
|
135 | 95 | ;--------------------------------------------------------------------- |
|
136 | .close_with_open_file: |
96 | .close_with_open_file: |
137 | mov [open_file_flag],byte 1 |
- | |
138 | jmp .close |
- | |
139 | 97 | mov [open_file_flag],byte 1 |
|
140 | .button: ; button |
98 | jmp .close |
141 | mov eax,17 ; get id |
99 | ;--------------------------------------------------------------------- |
142 | mcall |
- | |
143 | - | ||
144 | cmp ah,1 ; button id=1 ? |
100 | .button: ; button |
145 | jne .still |
101 | mcall 17 ; get id |
146 | .close: |
102 | cmp ah,1 ; button id=1 ? |
147 | ; bts dword [status],2 |
103 | jne .still |
148 | ; btr dword [status],0 |
104 | .close: |
149 | xor dword [status],1 |
- | |
150 | xor eax,eax |
- | |
151 | mov [PID1],eax |
105 | xor dword [status],1 |
152 | mcall 68,13,[thread_stack] |
- | |
- | 106 | xor eax,eax |
|
153 | mov eax,-1 ; close this program |
107 | mov [PID1],eax |
154 | mcall |
108 | mcall 68,13,[thread_stack] |
155 | 109 | mcall -1 ; close this program |
|
156 | jmp .still |
- | |
157 | - | ||
158 | ; ********************************************* |
110 | jmp .still |
159 | ; ******* WINDOW DEFINITIONS AND DRAW ******** |
- | |
160 | ; ********************************************* |
- | |
161 | - | ||
162 | - | ||
163 | .draw_window: |
111 | ;--------------------------------------------------------------------- |
164 | - | ||
165 | - | ||
166 | mov eax,12 ; function 12:tell os about windowdraw |
112 | ; ********************************************* |
167 | mov ebx,1 ; 1, start of draw |
- | |
168 | mcall |
- | |
169 | - | ||
170 | ; DRAW WINDOW |
113 | ; ******* WINDOW DEFINITIONS AND DRAW ******** |
171 | xor eax,eax ; function 0 : define and draw window |
- | |
172 | mov ebx,100*65536+300 ; [x start] *65536 + [x size] |
- | |
173 | mov ecx,100*65536+80 ; [y start] *65536 + [y size] |
- | |
174 | mov edx,0x03eeeeee ; color of work area RRGGBB,8->color gl |
114 | ; ********************************************* |
175 | mcall |
- | |
176 | 115 | .draw_window: |
|
177 | ; WINDOW LABEL |
116 | mcall 12,1 |
178 | - | ||
179 | mcall 71,1, labelt1 |
117 | xor eax,eax ; function 0 : define and draw window |
180 | - | ||
181 | push dword name_editboxes |
- | |
182 | call [edit_box_draw] |
- | |
183 | ; draw_edit_box name_editboxes |
- | |
184 | ; mcall 47,0x80000,[PID1],<200, 5>,0xffffff |
- | |
185 | ; mcall 71,1, proverka |
118 | xor esi,esi |
186 | ; mcall 47,0x80001,0,<300, 5>,0xffffff |
- | |
187 | ; draw_menu_bar menu_data_2 |
119 | mcall ,<100,300>,<100,80>,0x13eeeeee,,labelt1 |
188 | mov eax,12 ; function 12:tell os about windowdraw |
- | |
189 | mov ebx,2 ; 2, end of draw |
- | |
190 | mcall |
120 | push dword name_editboxes |
191 | 121 | call [edit_box_draw] |