Rev 1951 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1951 | Rev 2116 | ||
---|---|---|---|
Line 1... | Line -... | ||
1 | ; ********************************************* |
- | |
2 | ; ******* WINDOW DEFINITIONS AND DRAW ******** |
1 | ; ********************************************* |
3 | ; ********************************************* |
2 | ; ******* WINDOW DEFINITIONS AND DRAW ******** |
4 | 3 | ; ********************************************* |
|
5 | - | ||
6 | draw_window: |
- | |
7 | 4 | draw_window: |
|
8 | or [bWasDraw],1 |
- | |
9 | 5 | or [bWasDraw],1 |
|
10 | mcall 12,1 |
- | |
11 | 6 | mcall 12,1 |
|
Line 12... | Line -... | ||
12 | ; DRAW WINDOW |
- | |
13 | xor eax,eax ; function 0 : define and draw window |
7 | |
14 | ; mov ebx,350 ; [x start] *65536 + [x size] |
- | |
15 | ; mov ecx,400 ; [y start] *65536 + [y size] |
- | |
16 | mov ebx,0*65536+0 |
- | |
17 | mov ecx,0*65536+0 |
- | |
18 | add ebx,[wnd_width] |
8 | xor eax,eax ; function 0 : define and draw window |
19 | add ecx,[wnd_height] |
9 | mov ebx,[wnd_width] |
20 | cmp cx,55 |
- | |
21 | ja @f |
- | |
22 | mov cx,55 |
- | |
23 | @@: |
- | |
24 | mov edx,0x63ffffff ; color of work area RRGGBB,8->color gl |
- | |
25 | ; pusha |
- | |
26 | xor esi,esi |
10 | mov ecx,[wnd_height] |
27 | mcall |
- | |
28 | ; popa |
- | |
29 | ; imul ecx,[load_file_number],304 |
- | |
30 | ; add ecx,32+40 |
- | |
31 | ; add ecx,[load_directory_pointer] |
11 | xor esi,esi |
32 | mov ecx,Authors_text.1 ; communication_area_name |
- | |
33 | ; mov ecx,[communication_area] |
- | |
34 | ; add ecx,4 |
- | |
35 | ; mov ecx,string |
- | |
36 | mcall 71,1, ;labelt ; plugin_pach ;file_name ;plugin_pach ;plugin_pach |
- | |
Line 37... | Line 12... | ||
37 | 12 | mcall ,,,0x73ffffff,,Authors_text.1 |
|
- | 13 | ||
- | 14 | call get_window_param |
|
- | 15 | mov eax,[procinfo+70] ;status of window |
|
Line 38... | Line 16... | ||
38 | call get_window_param |
16 | test eax,100b |
Line 39... | Line -... | ||
39 | - | ||
40 | call draw_other |
17 | jne .end |
41 | 18 | ||
42 | 19 | call draw_other |
|
43 | push dword menu_data_1 |
20 | |
44 | call [menu_bar_draw] |
21 | push dword menu_data_1 |
Line 52... | Line 29... | ||
52 | call [menu_bar_draw] |
29 | push dword menu_data_5 |
53 | push dword menu_data_6 |
30 | call [menu_bar_draw] |
54 | call [menu_bar_draw] |
31 | push dword menu_data_6 |
55 | 32 | call [menu_bar_draw] |
|
Line 56... | Line -... | ||
56 | ; draw_menu_bar menu_data_1 |
- | |
57 | ; draw_menu_bar menu_data_2 |
- | |
58 | ; draw_menu_bar menu_data_3 |
- | |
59 | ; draw_menu_bar menu_data_4 |
- | |
60 | ; draw_menu_bar menu_data_5 |
- | |
61 | ; draw_menu_bar menu_data_6 |
- | |
62 | - | ||
63 | push dword dinamic_button_data_1 |
33 | |
64 | call [dinamic_button_draw] |
34 | push dword dinamic_button_data_1 |
65 | push dword dinamic_button_data_2 |
35 | call [dinamic_button_draw] |
66 | call [dinamic_button_draw] |
36 | push dword dinamic_button_data_2 |
67 | push dword dinamic_button_data_3 |
37 | call [dinamic_button_draw] |
Line 90... | Line 60... | ||
90 | call [dinamic_button_draw] |
60 | push dword dinamic_button_data_14 |
91 | push dword dinamic_button_data_15 |
61 | call [dinamic_button_draw] |
92 | call [dinamic_button_draw] |
62 | push dword dinamic_button_data_15 |
93 | 63 | call [dinamic_button_draw] |
|
Line 94... | Line -... | ||
94 | ; draw_dinamic_button dinamic_button_data_1 ; open file |
- | |
95 | ; draw_dinamic_button dinamic_button_data_2 ; reload file |
- | |
96 | ; draw_dinamic_button dinamic_button_data_3 ; left limit |
- | |
97 | ; draw_dinamic_button dinamic_button_data_4 ; left arrow |
- | |
98 | ; draw_dinamic_button dinamic_button_data_5 ; slide show |
- | |
99 | ; draw_dinamic_button dinamic_button_data_6 ; right arrow |
- | |
100 | ; draw_dinamic_button dinamic_button_data_7 ; right limit |
- | |
101 | ; draw_dinamic_button dinamic_button_data_8 ; zoom + |
- | |
102 | ; draw_dinamic_button dinamic_button_data_9 ; zoom - |
- | |
103 | ; draw_dinamic_button dinamic_button_data_10 ; zoom 100% |
- | |
104 | ; draw_dinamic_button dinamic_button_data_11 ; rotate clockwise |
- | |
105 | ; draw_dinamic_button dinamic_button_data_12 ; rotate counter-clockwise |
- | |
106 | ; draw_dinamic_button dinamic_button_data_13 ; file information |
- | |
107 | ; draw_dinamic_button dinamic_button_data_14 ; wallpaper |
- | |
108 | ; draw_dinamic_button dinamic_button_data_15 ; settings |
- | |
109 | - | ||
110 | mcall 13,<225,2>,<3,22>,0 |
64 | |
111 | mcall ,<280,2> |
65 | mcall 13,<225,2>,<3,22>,0 |
112 | mcall ,<410,2> |
66 | mcall ,<280,2> |
113 | mcall ,<490,2> |
67 | mcall ,<410,2> |
114 | mcall ,<545,2> |
68 | mcall ,<490,2> |
115 | mcall ,<625,2> |
69 | mcall ,<545,2> |
116 | mcall ,<720,2> |
70 | mcall ,<625,2> |
117 | ; WINDOW LABEL |
- | |
118 | - | ||
119 | ; mov esi, file_mount - file_mount_end |
- | |
120 | mcall 4,<630,3>,0x80000000, file_mount ;, file_mount - file_mount.end |
71 | mcall ,<720,2> |
121 | ; cmp [soi],0 |
- | |
122 | ; je @f |
- | |
123 | - | ||
124 | mcall 13,<677,40>,<13,11>,0xe5e5e5 |
72 | mcall 4,<630,3>,0x80000000, file_mount |
125 | - | ||
126 | mov ecx,[load_directory_pointer] |
73 | mcall 13,<677,40>,<13,11>,0xe5e5e5 |
127 | mov ecx,[ecx+4] |
74 | mov ecx,[load_directory_pointer] |
128 | mcall 47,0x80060000, ,<679, 15>,0 |
75 | mov ecx,[ecx+4] |
129 | - | ||
130 | mcall 8,[dinamic_button_data_5.x],[dinamic_button_data_5.y],0x40000002 |
76 | mcall 47,0x80060000, ,<679, 15>,0 |
131 | ;@@: |
77 | mcall 8,[dinamic_button_data_5.x],[dinamic_button_data_5.y],0x40000002 |
132 | mcall 12,2 |
78 | .end: |
133 | - | ||
134 | ret |
79 | mcall 12,2 |
135 | ;--------------------------------------------------------------------- |
80 | ret |
136 | set_draw_scrollbar_all: |
81 | ;--------------------------------------------------------------------- |
137 | xor eax,eax |
82 | set_draw_scrollbar_all: |
138 | inc eax |
83 | xor eax,eax |
Line 148... | Line 93... | ||
148 | ;--------------------------------------------------------------------- |
93 | ret |
149 | draw_other: |
94 | ;--------------------------------------------------------------------- |
150 | call drawimage |
95 | draw_other: |
151 | @@: |
96 | call drawimage |
152 | mov ebx,0 ;5 |
97 | @@: |
153 | shl ebx,16 |
98 | xor ebx,ebx |
154 | add ebx,[window_width] |
99 | shl ebx,16 |
155 | ; sub ebx,9 |
100 | add ebx,[window_width] |
156 | ; push ebx |
- | |
157 | xor ecx,ecx |
- | |
158 | ; mov ecx,[skin_high] |
101 | xor ecx,ecx |
159 | shl ecx,16 |
- | |
160 | add ecx,50-22 |
102 | shl ecx,16 |
161 | ; sub ecx,[skin_high] |
103 | add ecx,28 |
162 | mov edx,0xffffff |
- | |
163 | cmp [no_draw_window],0 |
104 | mov edx,0xffffff |
164 | jne @f |
105 | cmp [no_draw_window],0 |
165 | mcall 13 ; fill top area |
106 | jne @f |
166 | @@: |
107 | mcall 13 ; fill top area |
167 | mov eax,[soi] |
108 | @@: |
168 | test eax,eax |
109 | mov eax,[soi] |
169 | jnz @f |
110 | test eax,eax |
170 | mov ecx,[window_high] |
111 | jnz @f |
171 | sub ecx,28 ;50+4 |
112 | mov ecx,[window_high] |
172 | add ecx,(50-22) shl 16 |
113 | sub ecx,28 |
173 | mcall 13 |
114 | add ecx,28 shl 16 |
174 | @@: |
115 | mcall 13 |
175 | 116 | @@: |
|
176 | call draw_number_of_file |
- | |
177 | 117 | call draw_number_of_file |
|
178 | call draw_zoom_factors |
- | |
179 | 118 | call draw_zoom_factors |
|
180 | cmp [scaling_mode],dword 0 |
- | |
181 | jne @f |
119 | cmp [scaling_mode],dword 0 |
182 | ; pop ebx |
120 | jne @f |
183 | ret |
- | |
184 | @@: |
121 | ret |
185 | ; mov ecx,[scroll_bar_data_vertical.cur_area] |
122 | @@: |
186 | ; mov ebx,[scroll_bar_data_horizontal.cur_area] |
- | |
187 | ; push ecx |
- | |
188 | ; add ebx,5 |
- | |
189 | ; mov ax,bx |
- | |
190 | ; shl ebx,16 |
- | |
191 | ; add ebx,[window_width] |
- | |
192 | ; sub ebx,4 |
- | |
193 | ; sub bx,ax |
- | |
194 | ; cmp bx,0 |
- | |
195 | ; jbe @f |
- | |
196 | ; add ecx,50 shl 16 |
- | |
197 | ; mcall 13, , ,0xffffff |
- | |
198 | ; |
- | |
199 | ;@@: |
- | |
200 | ; pop ecx |
- | |
201 | ; pop ebx |
- | |
202 | - | ||
203 | ; add ecx,50 |
- | |
204 | ; mov ax,cx |
- | |
205 | ; shl ecx,16 |
- | |
206 | ; add ecx,[window_high] |
- | |
207 | ; sub cx,ax |
- | |
208 | ; sub ecx,4 |
- | |
209 | ; cmp cx,0 |
- | |
210 | ; jbe @f |
- | |
211 | ; mcall 13, , ,0xffffff |
- | |
212 | - | ||
213 | ;@@: |
- | |
214 | call set_draw_scrollbar_all |
- | |
215 | call draw_scrollbars |
123 | call set_draw_scrollbar_all |
216 | call set_nodraw_scrollbar_all |
124 | call draw_scrollbars |
217 | 125 | call set_nodraw_scrollbar_all |
|
218 | ret |
- | |
219 | ;--------------------------------------------------------------------- |
126 | ret |
220 | draw_number_of_file: |
127 | ;--------------------------------------------------------------------- |
221 | 128 | draw_number_of_file: |
|
222 | mcall 13,<630,42>,<13,11>,0xe5e5e5 |
- | |
223 | 129 | mcall 13,<630,42>,<13,11>,0xe5e5e5 |
|
224 | xor ecx,ecx |
- | |
225 | mov eax,[load_directory_pointer] |
130 | xor ecx,ecx |
226 | cmp [eax+4],dword 0 |
131 | mov eax,[load_directory_pointer] |
227 | je @f |
132 | cmp [eax+4],dword 0 |
228 | mov ecx,[load_file_number] |
133 | je @f |
229 | inc ecx |
134 | mov ecx,[load_file_number] |
Line 232... | Line 137... | ||
232 | ret |
137 | mcall 47,0x80060000, ,<632, 15>,0 |
233 | ;--------------------------------------------------------------------- |
138 | ret |
234 | draw_zoom_factors: |
139 | ;--------------------------------------------------------------------- |
235 | mcall 13,<725,30>,<13,11>,0xe5e5e5 |
140 | draw_zoom_factors: |
236 | 141 | mcall 13,<725,30>,<13,11>,0xe5e5e5 |
|
237 | mov ecx,[zoom_factors] |
- | |
238 | mov ecx,[ecx] |
142 | mov ecx,[zoom_factors] |
239 | mov [scaling_mode],ecx |
143 | mov ecx,[ecx] |
240 | test ecx,ecx |
144 | mov [scaling_mode],ecx |
241 | jnz @f |
145 | test ecx,ecx |
242 | mcall 4,<727,14>,0x80000000, zoom_auto_text |
146 | jnz @f |