Rev 259 | Rev 297 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 259 | Rev 267 | ||
---|---|---|---|
Line 18... | Line 18... | ||
18 | jmp still.skip_write |
18 | jmp still.skip_write |
19 | @@: add esi,8 |
19 | @@: add esi,8 |
20 | cmp byte[esi],0 |
20 | cmp byte[esi],0 |
21 | jne .acc |
21 | jne .acc |
Line -... | Line 22... | ||
- | 22 | ||
- | 23 | cmp eax,[tab_bar.Buttons.First] |
|
- | 24 | jb @f |
|
- | 25 | cmp eax,[tab_bar.Buttons.Last] |
|
- | 26 | ja @f |
|
- | 27 | ||
- | 28 | ;// TAB CONTROL BUTTONS |
|
- | 29 | ||
- | 30 | add eax,-1000 |
|
- | 31 | imul ebp,eax,sizeof.TABITEM |
|
- | 32 | add ebp,[tab_bar.Items] |
|
- | 33 | cmp ebp,[tab_bar.Current.Ptr] |
|
- | 34 | je @f |
|
- | 35 | call set_cur_tab |
|
- | 36 | call align_editor_in_tab |
|
- | 37 | call draw_editor |
|
- | 38 | call draw_statusbar |
|
- | 39 | call draw_tabctl |
|
- | 40 | ||
22 | 41 | @@: |
|
Line 23... | Line 42... | ||
23 | jmp still.skip_write |
42 | jmp still.skip_write |
24 | 43 | ||
25 | btn.scroll_up: |
44 | btn.vscroll_up: |
26 | dec [cur_tab.Editor.TopLeft.Y] ;! [top_line] |
45 | dec [cur_editor.TopLeft.Y] ;! [top_line] |
27 | jns @f |
46 | jns @f |
28 | inc [cur_tab.Editor.TopLeft.Y] ;! [top_line] |
47 | inc [cur_editor.TopLeft.Y] ;! [top_line] |
29 | ret |
48 | ret |
Line 30... | Line 49... | ||
30 | @@: call check_inv_all.skip_check |
49 | @@: call check_inv_all.skip_check |
31 | ret |
50 | ret |
32 | 51 | ||
33 | btn.scroll_down: |
52 | btn.vscroll_down: |
34 | inc [cur_tab.Editor.TopLeft.Y] ;! [top_line] |
53 | inc [cur_editor.TopLeft.Y] ;! [top_line] |
35 | mov eax,[cur_tab.Editor.Lines] ;! eax,[lines] |
54 | mov eax,[cur_editor.Lines.Count] ;! eax,[lines] |
36 | sub eax,[lines.scr] |
55 | sub eax,[lines.scr] |
37 | cmp eax,[cur_tab.Editor.TopLeft.Y] ;! eax,[top_line] |
56 | cmp eax,[cur_editor.TopLeft.Y] ;! eax,[top_line] |
38 | jge @f |
57 | jge @f |
39 | dec [cur_tab.Editor.TopLeft.Y] ;! [top_line] |
58 | dec [cur_editor.TopLeft.Y] ;! [top_line] |
Line 40... | Line 59... | ||
40 | ret |
59 | ret |
41 | @@: call check_inv_all.skip_check |
60 | @@: call check_inv_all.skip_check |
42 | ret |
61 | ret |
43 | 62 | ||
44 | btn.scroll_left: |
63 | btn.hscroll_up: |
45 | dec [cur_tab.Editor.TopLeft.X] ;! [left_col] |
64 | dec [cur_editor.TopLeft.X] ;! [left_col] |
46 | jns @f |
65 | jns @f |
Line 47... | Line 66... | ||
47 | inc [cur_tab.Editor.TopLeft.X] ;! [left_col] |
66 | inc [cur_editor.TopLeft.X] ;! [left_col] |
48 | ret;jmp still.skip_write |
67 | ret;jmp still.skip_write |
49 | @@: call check_inv_all.skip_check |
68 | @@: call check_inv_all.skip_check |
50 | ret |
69 | ret |
51 | 70 | ||
52 | btn.scroll_right: |
71 | btn.hscroll_down: |
53 | inc [cur_tab.Editor.TopLeft.X] ;! [left_col] |
72 | inc [cur_editor.TopLeft.X] ;! [left_col] |
54 | mov eax,[cur_tab.Editor.Columns] ;! eax,[columns] |
73 | mov eax,[cur_editor.Columns.Count] ;! eax,[columns] |
55 | sub eax,[columns.scr] |
74 | sub eax,[columns.scr] |
56 | cmp eax,[cur_tab.Editor.TopLeft.X] ;! eax,[left_col] |
75 | cmp eax,[cur_editor.TopLeft.X] ;! eax,[left_col] |
Line -... | Line 76... | ||
- | 76 | jge @f |
|
- | 77 | dec [cur_editor.TopLeft.X] ;! [left_col] |
|
- | 78 | ret |
|
- | 79 | @@: call check_inv_all.skip_check |
|
- | 80 | ret |
|
- | 81 | ||
- | 82 | btn.tabctl_right: |
|
- | 83 | call get_hidden_tabitems_number |
|
- | 84 | or eax,eax |
|
- | 85 | jz @f |
|
- | 86 | inc [tab_bar.Items.Left] |
|
- | 87 | call draw_tabctl |
|
- | 88 | @@: ret |
|
- | 89 | btn.tabctl_left: |
|
57 | jge @f |
90 | dec [tab_bar.Items.Left] |
58 | dec [cur_tab.Editor.TopLeft.X] ;! [left_col] |
91 | jns @f |
59 | ret |
92 | inc [tab_bar.Items.Left] |
60 | @@: call check_inv_all.skip_check |
93 | @@: call draw_tabctl |
61 | ret |
94 | ret |
62 | 95 | ||
Line 63... | Line 96... | ||
63 | btn.search: |
96 | btn.search: |
64 | key.f3: |
97 | key.f3: |
65 | call search |
98 | call search |
66 | jc @f |
99 | jc @f |
67 | call check_inv_all |
100 | call check_inv_all |
68 | @@: ret |
101 | @@: ret |
69 | 102 | ||
70 | 103 | ||
71 | func search |
104 | func search |
72 | cld |
105 | cld |
73 | mov ecx,[cur_tab.Editor.Caret.Y] ;! ecx,[pos.y] |
106 | mov ecx,[cur_editor.Caret.Y] ;! ecx,[pos.y] |
74 | mov edx,ecx |
107 | mov edx,ecx |
75 | call get_line_offset |
108 | call get_line_offset |
76 | cmp word[esi],0 |
109 | cmp word[esi],0 |
77 | je .exit |
110 | je .exit |
78 | call get_real_length |
111 | call get_real_length |
Line 79... | Line 112... | ||
79 | add esi,4 |
112 | add esi,4 |
80 | or eax,eax |
113 | or eax,eax |
81 | jz .end_line.2 |
114 | jz .end_line.2 |
Line 116... | Line 149... | ||
116 | cmp edi,[s_search.size] |
149 | cmp edi,[s_search.size] |
117 | jne .next_ok |
150 | jne .next_ok |
Line 118... | Line 151... | ||
118 | 151 | ||
119 | .found: |
152 | .found: |
120 | add esp,4 |
153 | add esp,4 |
121 | mov [cur_tab.Editor.Caret.Y],edx ;! [pos.y],edx |
154 | mov [cur_editor.Caret.Y],edx ;! [pos.y],edx |
122 | mov [cur_tab.Editor.SelStart.Y],edx ;! [sel.y],edx |
155 | mov [cur_editor.SelStart.Y],edx ;! [sel.y],edx |
123 | mov ecx,edx |
156 | mov ecx,edx |
124 | lea eax,[esi-4] |
157 | lea eax,[esi-4] |
125 | call get_line_offset |
158 | call get_line_offset |
126 | sub eax,esi |
159 | sub eax,esi |
127 | mov [cur_tab.Editor.SelStart.X],eax ;! [sel.x],eax |
160 | mov [cur_editor.SelStart.X],eax ;! [sel.x],eax |
128 | add eax,[s_search.size] |
161 | add eax,[s_search.size] |
129 | mov [cur_tab.Editor.Caret.X],eax ;! [pos.x],eax |
162 | mov [cur_editor.Caret.X],eax ;! [pos.x],eax |
130 | mov [s_status],0 |
163 | mov [s_status],0 |
131 | clc |
164 | clc |
Line 132... | Line 165... | ||
132 | ret |
165 | ret |
Line 171... | Line 204... | ||
171 | jnc @f |
204 | jnc @f |
172 | ret |
205 | ret |
173 | @@: |
206 | @@: |
Line 174... | Line 207... | ||
174 | 207 | ||
175 | xor eax,eax |
208 | xor eax,eax |
176 | mov [cur_tab.Editor.TopLeft.Y],eax ;! [top_line],eax |
209 | mov [cur_editor.TopLeft.Y],eax ;! [top_line],eax |
177 | mov [cur_tab.Editor.TopLeft.X],eax ;! [left_col],eax |
210 | mov [cur_editor.TopLeft.X],eax ;! [left_col],eax |
178 | mov [cur_tab.Editor.Caret.X],eax ;! [pos.x],eax |
211 | mov [cur_editor.Caret.X],eax ;! [pos.x],eax |
179 | mov [cur_tab.Editor.Caret.Y],eax ;! [pos.y],eax |
212 | mov [cur_editor.Caret.Y],eax ;! [pos.y],eax |
180 | mov [cur_tab.Editor.SelStart.X],eax ;! [sel.x],eax |
213 | mov [cur_editor.SelStart.X],eax ;! [sel.x],eax |
Line 181... | Line 214... | ||
181 | mov [cur_tab.Editor.SelStart.Y],eax ;! [sel.y],eax |
214 | mov [cur_editor.SelStart.Y],eax ;! [sel.y],eax |
Line 182... | Line 215... | ||
182 | 215 | ||
183 | mov [cur_tab.Editor.Modified],al ;! [modified],al |
216 | mov [cur_editor.Modified],al ;! [modified],al |
Line 184... | Line 217... | ||
184 | 217 | ||
185 | ; enable color syntax for ASM and INC files: |
218 | ; enable color syntax for ASM and INC files: |
186 | mov [cur_tab.Editor.AsmMode],al ;! [asm_mode],al |
219 | mov [cur_editor.AsmMode],al ;! [asm_mode],al |
- | 220 | ||
- | 221 | ; mov eax,[f_info.length] |
|
- | 222 | ; add eax,f_info.path |
|
187 | 223 | ; mov byte[eax],0 |
|
188 | mov eax,[f_info.length] |
224 | lea ebx,[cur_editor.FilePath] |
189 | add eax,f_info.path |
225 | mov eax,ebx |
190 | mov byte[eax],0 |
226 | call strlen |
191 | mov ecx, dword [eax-3] |
227 | mov ecx,dword[ebx+eax-3] |
192 | or ecx, 0x202020 |
228 | or ecx,0x202020 |
193 | cmp ecx, 'asm' |
229 | cmp ecx,'asm' |
194 | jne @f |
230 | jne @f |
195 | inc [cur_tab.Editor.AsmMode] ;! [asm_mode] |
231 | inc [cur_editor.AsmMode] ;! [asm_mode] |
196 | jmp .nocol |
232 | jmp .nocol |
Line 197... | Line 233... | ||
197 | @@: cmp ecx, 'inc' |
233 | @@: cmp ecx,'inc' |
198 | jne .nocol |
234 | jne .nocol |
199 | inc [cur_tab.Editor.AsmMode] ;! [asm_mode] |
235 | inc [cur_editor.AsmMode] ;! [asm_mode] |
Line 200... | Line 236... | ||
200 | .nocol: |
236 | .nocol: |
201 | 237 | ||
202 | update_caption: |
238 | update_caption: |