Subversion Repositories Kolibri OS

Rev

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

Rev 6023 Rev 6026
Line 11... Line 11...
11
;;         GNU GENERAL PUBLIC LICENSE                              ;;
11
;;         GNU GENERAL PUBLIC LICENSE                              ;;
12
;;          Version 2, June 1991                                   ;;
12
;;          Version 2, June 1991                                   ;;
13
;;                                                                 ;;
13
;;                                                                 ;;
14
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 15... Line 15...
15
 
15
 
Line 16... Line 16...
16
version equ '0.24'
16
version equ '0.25'
17
 
17
 
18
; connection status
18
; connection status
19
STATUS_DISCONNECTED     = 0
19
STATUS_DISCONNECTED     = 0
Line 41... Line 41...
41
 
41
 
42
; settings
42
; settings
Line 43... Line 43...
43
USERCMD_MAX_SIZE        = 400
43
USERCMD_MAX_SIZE        = 400
44
 
44
 
Line 45... Line 45...
45
WIN_MIN_X               = 600
45
WIN_MIN_X               = 600
46
WIN_MIN_Y               = 170
46
WIN_MIN_Y               = 183
Line 47... Line 47...
47
 
47
 
48
TEXT_X                  = 5
48
TEXT_X                  = 2
49
TEXT_Y                  = TOP_Y + 2
49
TEXT_Y                  = TOP_Y + 2
Line 75... Line 75...
75
WINDOW_BTN_START        = 100
75
WINDOW_BTN_START        = 100
76
WINDOW_BTN_CLOSE        = 2
76
WINDOW_BTN_CLOSE        = 2
77
WINDOW_BTN_LIST         = 3
77
WINDOW_BTN_LIST         = 3
Line 78... Line 78...
78
 
78
 
79
SCROLLBAR_WIDTH         = 14
79
SCROLLBAR_WIDTH         = 14
Line 80... Line 80...
80
USERLIST_WIDTH          = 100
80
USERLIST_WIDTH          = 160
81
 
81
 
Line 82... Line 82...
82
FONT_HEIGHT             = 9
82
FONT_WIDTH              = 8
Line 83... Line 83...
83
FONT_WIDTH              = 6
83
FONT_HEIGHT             = 16
Line 243... Line 243...
243
        jz      .no_update
243
        jz      .no_update
244
        call    draw_channel_text
244
        call    draw_channel_text
245
        mov     edi, [window_active]
245
        mov     edi, [window_active]
246
        cmp     [edi + window.type], WINDOWTYPE_CHANNEL
246
        cmp     [edi + window.type], WINDOWTYPE_CHANNEL
247
        jne     .no_update
247
        jne     .no_update
248
        call    draw_channel_list
248
        call    draw_user_list
249
  .no_update:
249
  .no_update:
250
        call    highlight_updated_tabs
250
        call    highlight_updated_tabs
Line 251... Line 251...
251
 
251
 
Line 278... Line 278...
278
        inc     eax
278
        inc     eax
279
        add     eax, [scroll1.position]
279
        add     eax, [scroll1.position]
280
        mov     ebx, [window_active]
280
        mov     ebx, [window_active]
281
        mov     [ebx + window.selected], eax
281
        mov     [ebx + window.selected], eax
Line 282... Line 282...
282
 
282
 
Line 283... Line 283...
283
        call    draw_channel_list
283
        call    draw_user_list
284
 
284
 
285
        pop     eax
285
        pop     eax
Line 376... Line 376...
376
        mov     eax, [edit1.size]
376
        mov     eax, [edit1.size]
Line 377... Line 377...
377
 
377
 
378
        mov     [edit1.size], 0
378
        mov     [edit1.size], 0
Line 379... Line -...
379
        mov     [edit1.pos], 0
-
 
380
 
379
        mov     [edit1.pos], 0
Line 381... Line 380...
381
        push    dword edit1
380
 
Line 382... Line 381...
382
        call    [edit_box_draw]
381
        invoke  edit_box_draw, edit1
383
 
382
 
Line 384... Line 383...
384
        call    draw_channel_text
383
        call    draw_channel_text
Line 385... Line 384...
385
 
384
 
386
        jmp     mainloop
-
 
387
  no_send2:
385
        jmp     mainloop
Line 388... Line 386...
388
 
386
  no_send2:
389
        jmp     mainloop
387
 
390
 
388
        jmp     mainloop
Line 391... Line 389...
391
mouse:
389
 
392
        push    dword edit1
390
mouse:
393
        call    [edit_box_mouse]
391
        invoke  edit_box_mouse, edit1
394
 
392
 
395
;        mcall   37, 7
393
;        mcall   37, 7
396
;        movsx   eax, ax
-
 
397
;        add     [scroll2.position], eax
394
;        movsx   eax, ax
398
 
395
;        add     [scroll2.position], eax
399
; TODO: check if scrollbar is active?
396
 
400
        mov     edi, [window_active]
397
; TODO: check if scrollbar is active?
401
        cmp     [edi + window.type], WINDOWTYPE_CHANNEL
398
        mov     edi, [window_active]
402
        jne     @f
399
        cmp     [edi + window.type], WINDOWTYPE_CHANNEL
Line 403... Line 400...
403
        push    [scroll1.position]
400
        jne     @f
404
        push    dword scroll1
401
        push    [scroll1.position]
405
        call    [scrollbar_mouse]
402
        invoke  scrollbar_mouse, scroll1
406
        pop     eax
403
        pop     eax
407
        cmp     eax, [scroll1.position] ; did the scrollbar move?
404
        cmp     eax, [scroll1.position] ; did the scrollbar move?
408
        je      @f
-
 
409
        call    draw_channel_list
405
        je      @f
410
  @@:
406
        call    draw_user_list
411
 
407
  @@:
412
; TODO: check if scrollbar is active?
408
 
413
        mov     edi, [window_active]
409
; TODO: check if scrollbar is active?
414
        mov     eax, [edi + window.text_lines]
410
        mov     edi, [window_active]
Line 504... Line 500...
504
                        db 3, '3|   \', 3, '7______   \', 3, '6_   ___ \ ', 3, '4   ____ |  | |__| ____   _____/  |_', 10
500
                        db 3, '3|   \', 3, '7______   \', 3, '6_   ___ \ ', 3, '4   ____ |  | |__| ____   _____/  |_', 10
505
                        db 3, '3|   |', 3, '7|       _/', 3, '6    \  \/ ', 3, '4 _/ ___\|  | |  |/ __ \ /    \   __\', 10
501
                        db 3, '3|   |', 3, '7|       _/', 3, '6    \  \/ ', 3, '4 _/ ___\|  | |  |/ __ \ /    \   __\', 10
506
                        db 3, '3|   |', 3, '7|    |   \', 3, '6     \____', 3, '4 \  \___|  |_|  \  ___/|   |  \  |', 10
502
                        db 3, '3|   |', 3, '7|    |   \', 3, '6     \____', 3, '4 \  \___|  |_|  \  ___/|   |  \  |', 10
507
                        db 3, '3|___|', 3, '7|____|_  /', 3, '6\______  /', 3, '4  \___  >____/__|\___  >___|  /__|', 10
503
                        db 3, '3|___|', 3, '7|____|_  /', 3, '6\______  /', 3, '4  \___  >____/__|\___  >___|  /__|', 10
508
                        db 3, '3     ', 3, '7       \/ ', 3, '6       \/ ', 3, '4      \/             \/     \/', 10
504
                        db 3, '3     ', 3, '7       \/ ', 3, '6       \/ ', 3, '4      \/             \/     \/', 10
509
                        db 10
-
 
510
                        db 'Welcome to KolibriOS IRC client ', version, 10
505
                        db 'Welcome to KolibriOS IRC client ', version, 10
511
                        db 10
-
 
512
                        db 'Type /help for help', 10, 10, 0
506
                        db 'Type /help for help', 10, 0
Line 513... Line 507...
513
 
507
 
514
str_version             db 'VERSION KolibriOS '
508
str_version             db 'VERSION KolibriOS '
Line 515... Line 509...
515
str_programname         db 'IRC client ', version, 0
509
str_programname         db 'IRC client ', version, 0
Line 575... Line 569...
575
        edit_box_mouse, 'edit_box_mouse',\
569
        edit_box_mouse, 'edit_box_mouse',\
576
        scrollbar_draw, 'scrollbar_v_draw',\
570
        scrollbar_draw, 'scrollbar_v_draw',\
577
        scrollbar_mouse,'scrollbar_v_mouse'
571
        scrollbar_mouse,'scrollbar_v_mouse'
Line 578... Line 572...
578
 
572
 
579
        ;         width, left, top
573
        ;         width, left, top
580
edit1   edit_box  0, 0, 0, 0xffffff, 0x6f9480, 0, 0, 0, USERCMD_MAX_SIZE, usercommand, mouse_dd, ed_always_focus, 25, 25
574
edit1   edit_box  0, 0, 0, 0xffffff, 0x6f9480, 0, 0, 0x000000, USERCMD_MAX_SIZE, usercommand, mouse_dd, ed_always_focus, 25, 25
581
        ;         xsize, xpos, ysize, ypos, btn_height, max, cur, pos, bgcol, frcol, linecol
575
        ;         xsize, xpos, ysize, ypos, btn_height, max, cur, pos, bgcol, frcol, linecol
582
scroll1 scrollbar SCROLLBAR_WIDTH, 0, 0, TOP_Y, SCROLLBAR_WIDTH, 0, 0, 0, 0, 0, 0, 1
576
scroll1 scrollbar SCROLLBAR_WIDTH, 0, 0, TOP_Y, SCROLLBAR_WIDTH, 0, 0, 0, 0, 0, 0, 1
Line 583... Line 577...
583
scroll2 scrollbar SCROLLBAR_WIDTH, 0, 0, TOP_Y, SCROLLBAR_WIDTH, 0, 0, 0, 0, 0, 0, 1
577
scroll2 scrollbar SCROLLBAR_WIDTH, 0, 0, TOP_Y, SCROLLBAR_WIDTH, 0, 0, 0, 0, 0, 0, 1