Subversion Repositories Kolibri OS

Rev

Rev 3216 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3216 Rev 3220
Line 31... Line 31...
31
        mov     ecx, WIN_MIN_Y
31
        mov     ecx, WIN_MIN_Y
32
        mov     edx, [colors.work]
32
        mov     edx, [colors.work]
33
        add     edx, 0x33000000
33
        add     edx, 0x33000000
34
        mov     edi, str_programname
34
        mov     edi, str_programname
35
        mcall
35
        mcall
-
 
36
        mcall   12, 2 ;; when do we actually need this??
Line 36... Line 37...
36
 
37
 
37
        mov     ebx, [xsize]
38
        mov     ebx, [xsize]
38
        mov     ecx, [ysize]
39
        mov     ecx, [ysize]
39
        sub     cx, 15 ;;;;
40
        sub     cx, 15 ;;;;
Line 48... Line 49...
48
 
49
 
49
        mov     edi, [window_open]
50
        mov     edi, [window_open]
50
        cmp     [edi + window.type], WINDOWTYPE_CHANNEL
51
        cmp     [edi + window.type], WINDOWTYPE_CHANNEL
Line -... Line 52...
-
 
52
        jne     .not_channel
51
        jne     .not_channel
53
 
52
 
54
        ; draw a vertical separator line
53
        mov     ebx, [xsize]
55
        mov     ebx, [xsize]
54
        sub     ebx, USERLIST_X + SCROLLBAR_WIDTH + 3
56
        sub     ebx, USERLIST_X + SCROLLBAR_WIDTH + 3
55
        push    bx
57
        push    bx
56
        shl     ebx, 16
58
        shl     ebx, 16
57
        pop     bx
59
        pop     bx
58
        mov     ecx, [ysize]
60
        mov     ecx, [ysize]
Line 59... Line 61...
59
        add     ecx, TOP_Y SHL 16 -(15) ;;;;
61
        add     ecx, TOP_Y SHL 16 -(15) ;;;;
60
        mcall
-
 
61
 
-
 
62
        call    print_channel_list
-
 
63
 
-
 
64
; scrollbar
-
 
65
 
-
 
66
        mov     eax, [ysize]
-
 
67
        sub     eax, TOP_Y + 15 ;;;;
-
 
68
        push    eax
-
 
69
        mov     [scroll1.y_size], ax
-
 
70
 
-
 
71
        mov     eax, [xsize]
-
 
72
        sub     eax, SCROLLBAR_WIDTH
-
 
73
        mov     [scroll1.x_pos], ax
-
 
74
 
-
 
75
        pop     eax             ; scrollbar height
-
 
76
        xor     edx, edx
-
 
77
        mov     ecx, 10
-
 
78
        div     ecx
-
 
79
        mov     [scroll1.cur_area], eax
-
 
80
 
-
 
81
        mov     [scroll1.all_redraw], 1
-
 
Line 82... Line 62...
82
 
62
        mcall
83
        push    dword scroll1
63
 
84
        call    [scrollbar_v_draw]
64
        call    redraw_channel_list
85
 
65
 
Line 102... Line 82...
102
 
82
 
Line 103... Line 83...
103
; tabs
83
; tabs
Line 104... Line -...
104
 
-
 
105
        call    draw_windownames
84
 
106
 
85
        call    draw_windownames
Line -... Line 86...
-
 
86
 
-
 
87
        popa
-
 
88
        ret
-
 
89
 
-
 
90
 
-
 
91
 
-
 
92
redraw_channel_list:
-
 
93
 
-
 
94
; First, calculate scrollbar
-
 
95
 
-
 
96
        mov     ebx, [window_open]
-
 
97
        mov     eax, [ebx + window.users]       ; number of users in the open window
-
 
98
        mov     [scroll1.max_area], eax
-
 
99
 
-
 
100
        mov     eax, [ysize]
-
 
101
        sub     eax, TOP_Y + 15 ;;;;
-
 
102
        push    eax
-
 
103
        mov     [scroll1.y_size], ax
-
 
104
 
-
 
105
        mov     eax, [xsize]
-
 
106
        sub     eax, SCROLLBAR_WIDTH
-
 
107
        mov     [scroll1.x_pos], ax
-
 
108
 
-
 
109
        pop     eax                             ; scrollbar height
-
 
110
        xor     edx, edx
-
 
111
        mov     ecx, 10
-
 
112
        div     ecx
-
 
113
        mov     [scroll1.cur_area], eax
-
 
114
 
-
 
115
        ; Do we need a scrollbar?
-
 
116
        cmp     eax, [scroll1.max_area]
-
 
117
        jae     .noscroll
-
 
118
 
-
 
119
        ; Is the current position greater then the max position?
-
 
120
        cmp     eax, [scroll1.position]
-
 
121
        ja      @f
-
 
122
        mov     [scroll1.position], eax
-
 
123
  @@:
-
 
124
 
-
 
125
        ; OK, draw the scrollbar
-
 
126
        mov     [scroll1.all_redraw], 1
-
 
127
 
-
 
128
        push    dword scroll1
-
 
129
        call    [scrollbar_v_draw]
107
        mcall   12, 2
130
 
Line 108... Line 131...
108
        popa
131
        jmp     print_channel_list
-
 
132
 
Line 109... Line 133...
109
        ret
133
  .noscroll:
Line 110... Line 134...
110
 
134
        mov     [scroll1.position], 0
111
 
135