Rev 312 | Rev 824 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
258 | mikedld | 1 | button: |
2 | mcall 17 |
||
3 | cmp al,0 |
||
4 | jne still |
||
5 | shr eax,8 |
||
6 | |||
7 | cmp [bot_mode],0 |
||
8 | je @f |
||
9 | mov ebx,eax |
||
10 | mov al,3 |
||
11 | call [bot_dlg_handler] |
||
12 | jmp still |
||
13 | |||
14 | @@: mov esi,accel_table2 |
||
15 | .acc: cmp eax,[esi] |
||
16 | jne @f |
||
17 | call dword[esi+4] |
||
18 | jmp still.skip_write |
||
19 | @@: add esi,8 |
||
20 | cmp byte[esi],0 |
||
21 | jne .acc |
||
22 | |||
267 | mikedld | 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 |
||
297 | mikedld | 40 | call update_caption |
267 | mikedld | 41 | |
42 | @@: |
||
258 | mikedld | 43 | jmp still.skip_write |
44 | |||
267 | mikedld | 45 | btn.vscroll_up: |
297 | mikedld | 46 | dec [cur_editor.TopLeft.Y] |
258 | mikedld | 47 | jns @f |
297 | mikedld | 48 | inc [cur_editor.TopLeft.Y] |
259 | mikedld | 49 | ret |
312 | mikedld | 50 | @@: call editor_check_for_changes.direct |
258 | mikedld | 51 | ret |
52 | |||
267 | mikedld | 53 | btn.vscroll_down: |
297 | mikedld | 54 | inc [cur_editor.TopLeft.Y] |
55 | mov eax,[cur_editor.Lines.Count] |
||
258 | mikedld | 56 | sub eax,[lines.scr] |
297 | mikedld | 57 | cmp eax,[cur_editor.TopLeft.Y] |
258 | mikedld | 58 | jge @f |
297 | mikedld | 59 | dec [cur_editor.TopLeft.Y] |
259 | mikedld | 60 | ret |
312 | mikedld | 61 | @@: call editor_check_for_changes.direct |
258 | mikedld | 62 | ret |
63 | |||
267 | mikedld | 64 | btn.hscroll_up: |
297 | mikedld | 65 | dec [cur_editor.TopLeft.X] |
258 | mikedld | 66 | jns @f |
297 | mikedld | 67 | inc [cur_editor.TopLeft.X] |
258 | mikedld | 68 | ret |
312 | mikedld | 69 | @@: call editor_check_for_changes.direct |
297 | mikedld | 70 | ret |
258 | mikedld | 71 | |
267 | mikedld | 72 | btn.hscroll_down: |
297 | mikedld | 73 | inc [cur_editor.TopLeft.X] |
74 | mov eax,[cur_editor.Columns.Count] |
||
258 | mikedld | 75 | sub eax,[columns.scr] |
297 | mikedld | 76 | cmp eax,[cur_editor.TopLeft.X] |
258 | mikedld | 77 | jge @f |
297 | mikedld | 78 | dec [cur_editor.TopLeft.X] |
259 | mikedld | 79 | ret |
312 | mikedld | 80 | @@: call editor_check_for_changes.direct |
258 | mikedld | 81 | ret |
82 | |||
267 | mikedld | 83 | btn.tabctl_right: |
84 | call get_hidden_tabitems_number |
||
85 | or eax,eax |
||
86 | jz @f |
||
87 | inc [tab_bar.Items.Left] |
||
88 | call draw_tabctl |
||
89 | @@: ret |
||
90 | btn.tabctl_left: |
||
91 | dec [tab_bar.Items.Left] |
||
92 | jns @f |
||
93 | inc [tab_bar.Items.Left] |
||
94 | @@: call draw_tabctl |
||
95 | ret |
||
96 | |||
297 | mikedld | 97 | btn.debug_board: |
98 | call open_debug_board |
||
99 | ret |
||
100 | btn.sysfuncs_txt: |
||
101 | call open_sysfuncs_txt |
||
102 | ret |
||
258 | mikedld | 103 | |
617 | mikedld | 104 | proc search |
258 | mikedld | 105 | cld |
297 | mikedld | 106 | mov ecx,[cur_editor.Caret.Y] |
258 | mikedld | 107 | mov edx,ecx |
108 | call get_line_offset |
||
109 | cmp word[esi],0 |
||
110 | je .exit |
||
111 | call get_real_length |
||
112 | add esi,4 |
||
113 | or eax,eax |
||
114 | jz .end_line.2 |
||
115 | mov ecx,eax |
||
297 | mikedld | 116 | sub ecx,[cur_editor.Caret.X] |
258 | mikedld | 117 | push esi |
297 | mikedld | 118 | add esi,[cur_editor.Caret.X] |
258 | mikedld | 119 | jmp @f |
120 | |||
121 | .next_line: |
||
122 | push esi |
||
123 | @@: sub ecx,[s_search.size] |
||
124 | inc ecx |
||
125 | |||
126 | .next_char: |
||
127 | dec ecx |
||
128 | js .end_line |
||
129 | xor edi,edi |
||
130 | |||
131 | .next_ok: |
||
132 | movzx eax,byte[edi+esi] |
||
133 | movzx ebx,byte[edi+s_search] |
||
134 | |||
135 | cmp al,$61 |
||
136 | jb @f |
||
137 | add al,[eax+add_table-$61] |
||
138 | @@: cmp bl,$61 |
||
139 | jb @f |
||
140 | add bl,[ebx+add_table-$61] |
||
141 | @@: |
||
142 | cmp al,bl |
||
143 | je @f |
||
144 | |||
145 | inc esi |
||
146 | jmp .next_char |
||
147 | @@: |
||
148 | inc edi |
||
149 | cmp edi,[s_search.size] |
||
150 | jne .next_ok |
||
151 | |||
152 | .found: |
||
153 | add esp,4 |
||
297 | mikedld | 154 | mov [cur_editor.Caret.Y],edx |
155 | mov [cur_editor.SelStart.Y],edx |
||
258 | mikedld | 156 | mov ecx,edx |
157 | lea eax,[esi-4] |
||
158 | call get_line_offset |
||
159 | sub eax,esi |
||
297 | mikedld | 160 | mov [cur_editor.SelStart.X],eax |
258 | mikedld | 161 | add eax,[s_search.size] |
297 | mikedld | 162 | mov [cur_editor.Caret.X],eax |
258 | mikedld | 163 | mov [s_status],0 |
164 | clc |
||
165 | ret |
||
166 | |||
167 | .end_line: |
||
168 | pop esi |
||
169 | .end_line.2: |
||
170 | movzx eax,word[esi-4] |
||
297 | mikedld | 171 | add esi,eax |
258 | mikedld | 172 | inc edx |
173 | call get_real_length |
||
174 | mov ecx,eax |
||
175 | lodsd |
||
176 | or eax,eax |
||
177 | jnz .next_line |
||
178 | .exit: |
||
179 | mov [s_status],s_text_not_found |
||
180 | stc |
||
181 | ret |
||
617 | mikedld | 182 | endp |