Rev 7889 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7889 | Rev 7890 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
2 | ;; ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2018. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2020. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;; Written by hidnplayr@kolibrios.org ;; |
6 | ;; Written by hidnplayr@kolibrios.org ;; |
7 | ;; ;; |
7 | ;; ;; |
8 | ;; GNU GENERAL PUBLIC LICENSE ;; |
8 | ;; GNU GENERAL PUBLIC LICENSE ;; |
Line 13... | Line 13... | ||
13 | 13 | ||
Line 14... | Line 14... | ||
14 | draw_window: ; Completely redraw the window, recalculate all coordinates and sizes |
14 | draw_window: ; Completely redraw the window, recalculate all coordinates and sizes |
Line -... | Line 15... | ||
- | 15 | ||
- | 16 | pusha |
|
- | 17 | ||
- | 18 | ; get system colors |
|
15 | 19 | mcall 48, 3, colors, 40 |
|
16 | pusha |
20 | call set_edit_box_and_scrollbar_colors |
17 | 21 | ||
18 | mcall 9, thread_info, -1 ; get information about this thread |
22 | mcall 9, thread_info, -1 ; get information about this thread |
19 | mov eax, [thread_info.box.width] ; window xsize |
23 | mov eax, [thread_info.box.width] ; window xsize |
Line 275... | Line 279... | ||
275 | mov esi, [colors.work] |
279 | mov esi, [colors.work] |
276 | cmp [window_active], edi |
280 | cmp [window_active], edi |
277 | jne @f |
281 | jne @f |
278 | ;not esi |
282 | ;not esi |
279 | ;and esi, 0x00ffffff |
283 | ;and esi, 0x00ffffff |
280 | mov esi, [colors.work_light] |
284 | mov esi, [colors.work_light] |
281 | @@: |
285 | @@: |
282 | mcall |
286 | mcall |
283 | inc edx |
287 | inc edx |
284 | add ebx, (TAB_WIDTH + TAB_SPACE) shl 16 |
288 | add ebx, (TAB_WIDTH + TAB_SPACE) shl 16 |
285 | add edi, sizeof.window |
289 | add edi, sizeof.window |
Line 297... | Line 301... | ||
297 | shl ebx, 16 |
301 | shl ebx, 16 |
298 | mov bx, SCROLLBAR_WIDTH |
302 | mov bx, SCROLLBAR_WIDTH |
299 | mov ecx, TOP_SPACE shl 16 + TAB_HEIGHT - 1 |
303 | mov ecx, TOP_SPACE shl 16 + TAB_HEIGHT - 1 |
300 | mov edx, WINDOW_BTN_CLOSE |
304 | mov edx, WINDOW_BTN_CLOSE |
301 | mov esi, 0x00aa0000 ; red ! |
305 | mov esi, 0x00aa0000 ; red ! |
302 | mcall |
306 | mcall |
Line 303... | Line 307... | ||
303 | 307 | ||
304 | pusha |
308 | pusha |
305 | ; write closing cross |
309 | ; write closing cross |
306 | mov ebx, [xsize] |
310 | mov ebx, [xsize] |
307 | sub ebx, 9 |
311 | sub ebx, 9 |
308 | shl ebx, 16 |
312 | shl ebx, 16 |
309 | add ebx, TOP_SPACE+3 |
313 | add ebx, TOP_SPACE+3 |
310 | mov ecx, 0x80FFFfff |
314 | mov ecx, 0x80FFFfff |
311 | mov edx, closing_cross |
315 | mov edx, closing_cross |
312 | mcall 4 |
316 | mcall 4 |
313 | popa |
317 | popa |
Line 314... | Line 318... | ||
314 | @@: |
318 | @@: |
Line 315... | Line 319... | ||
315 | 319 | ||
Line 358... | Line 362... | ||
358 | add ebx, (TAB_WIDTH + TAB_SPACE) shl 16 |
362 | add ebx, (TAB_WIDTH + TAB_SPACE) shl 16 |
359 | dec esi |
363 | dec esi |
360 | jnz .more_ |
364 | jnz .more_ |
361 | .enough_: |
365 | .enough_: |
Line -... | Line 366... | ||
- | 366 | ||
- | 367 | ret |
|
- | 368 | ||
- | 369 | set_edit_box_and_scrollbar_colors: |
|
- | 370 | mov eax, [colors.work] |
|
- | 371 | mov [scroll1.bg_color], eax |
|
- | 372 | mov [scroll2.bg_color], eax |
|
- | 373 | ||
- | 374 | mov eax, [colors.work_button] |
|
- | 375 | mov [scroll1.front_color], eax |
|
- | 376 | mov [scroll2.front_color], eax |
|
- | 377 | ||
- | 378 | mov eax, [colors.work_text] |
|
- | 379 | mov [scroll1.line_color], eax |
|
- | 380 | mov [scroll2.line_color], eax |
|
- | 381 | ||
- | 382 | mov [scroll1.type], 0 ; 0 = simple, 1 = skinned |
|
- | 383 | mov [scroll2.type], 0 |
|
362 | 384 | ||
363 | ret |
385 | ret |