mirror of
https://github.com/mi57730/a2d.git
synced 2024-06-25 21:29:30 +00:00
MGTK: Start using enums/constants
This commit is contained in:
parent
20603b1d81
commit
1bb2824ea5
|
@ -678,10 +678,10 @@ penmode: .byte MGTK::notpenXOR
|
||||||
|
|
||||||
.proc winfo
|
.proc winfo
|
||||||
window_id: .byte da_window_id
|
window_id: .byte da_window_id
|
||||||
options: .byte MGTK::option_go_away_box
|
options: .byte MGTK::Option::go_away_box
|
||||||
title: .addr window_title
|
title: .addr window_title
|
||||||
hscroll: .byte MGTK::scroll_option_none
|
hscroll: .byte MGTK::Scroll::option_none
|
||||||
vscroll: .byte MGTK::scroll_option_none
|
vscroll: .byte MGTK::Scroll::option_none
|
||||||
hthumbmax: .byte 0
|
hthumbmax: .byte 0
|
||||||
hthumbpos: .byte 0
|
hthumbpos: .byte 0
|
||||||
vthumbmax: .byte 0
|
vthumbmax: .byte 0
|
||||||
|
@ -818,12 +818,12 @@ loop: lda adjust_txtptr_copied-1,x
|
||||||
input_loop:
|
input_loop:
|
||||||
MGTK_CALL MGTK::GetEvent, event_params
|
MGTK_CALL MGTK::GetEvent, event_params
|
||||||
lda event_params::kind
|
lda event_params::kind
|
||||||
cmp #MGTK::event_kind_button_down
|
cmp #MGTK::EventKind::button_down
|
||||||
bne :+
|
bne :+
|
||||||
jsr on_click
|
jsr on_click
|
||||||
jmp input_loop
|
jmp input_loop
|
||||||
|
|
||||||
: cmp #MGTK::event_kind_key_down
|
: cmp #MGTK::EventKind::key_down
|
||||||
bne input_loop
|
bne input_loop
|
||||||
jsr on_key_press
|
jsr on_key_press
|
||||||
jmp input_loop
|
jmp input_loop
|
||||||
|
@ -837,7 +837,7 @@ on_click:
|
||||||
MGTK_CALL MGTK::FindWindow, findwindow_params
|
MGTK_CALL MGTK::FindWindow, findwindow_params
|
||||||
lda ROMIN2
|
lda ROMIN2
|
||||||
lda findwindow_params::which_area
|
lda findwindow_params::which_area
|
||||||
cmp #MGTK::area_content
|
cmp #MGTK::Area::content
|
||||||
bcc ignore_click
|
bcc ignore_click
|
||||||
lda findwindow_params::window_id
|
lda findwindow_params::window_id
|
||||||
cmp #da_window_id ; This window?
|
cmp #da_window_id ; This window?
|
||||||
|
@ -847,13 +847,13 @@ ignore_click:
|
||||||
rts
|
rts
|
||||||
|
|
||||||
: lda findwindow_params::which_area
|
: lda findwindow_params::which_area
|
||||||
cmp #MGTK::area_content ; Client area?
|
cmp #MGTK::Area::content ; Client area?
|
||||||
bne :+
|
bne :+
|
||||||
jsr map_click_to_button ; try to translate click into key
|
jsr map_click_to_button ; try to translate click into key
|
||||||
bcc ignore_click
|
bcc ignore_click
|
||||||
jmp process_key
|
jmp process_key
|
||||||
|
|
||||||
: cmp #MGTK::area_close_box ; Close box?
|
: cmp #MGTK::Area::close_box ; Close box?
|
||||||
bne :+
|
bne :+
|
||||||
MGTK_CALL MGTK::TrackGoAway, trackgoaway_params
|
MGTK_CALL MGTK::TrackGoAway, trackgoaway_params
|
||||||
lda trackgoaway_params::goaway
|
lda trackgoaway_params::goaway
|
||||||
|
@ -884,7 +884,7 @@ loop: lda routine,x
|
||||||
sizeof_routine := * - routine ; Can't use .sizeof before the .proc definition
|
sizeof_routine := * - routine ; Can't use .sizeof before the .proc definition
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
: cmp #MGTK::area_dragbar ; Title bar?
|
: cmp #MGTK::Area::dragbar ; Title bar?
|
||||||
bne ignore_click
|
bne ignore_click
|
||||||
lda #da_window_id
|
lda #da_window_id
|
||||||
sta dragwindow_params::window_id
|
sta dragwindow_params::window_id
|
||||||
|
@ -1414,7 +1414,7 @@ invert: MGTK_CALL MGTK::PaintRect, 0, invert_addr ; Inverts port
|
||||||
check_button:
|
check_button:
|
||||||
MGTK_CALL MGTK::GetEvent, event_params
|
MGTK_CALL MGTK::GetEvent, event_params
|
||||||
lda event_params::kind
|
lda event_params::kind
|
||||||
cmp #MGTK::event_kind_drag ; Button down?
|
cmp #MGTK::EventKind::drag ; Button down?
|
||||||
bne done ; Nope, done immediately
|
bne done ; Nope, done immediately
|
||||||
lda #da_window_id
|
lda #da_window_id
|
||||||
sta screentowindow_params::window_id
|
sta screentowindow_params::window_id
|
||||||
|
|
|
@ -222,10 +222,10 @@ penmode: .byte $02 ; this should be normal, but we do inverts ??
|
||||||
|
|
||||||
.proc winfo
|
.proc winfo
|
||||||
window_id: .byte da_window_id
|
window_id: .byte da_window_id
|
||||||
options:.byte MGTK::option_dialog_box
|
options:.byte MGTK::Option::dialog_box
|
||||||
title: .addr 0
|
title: .addr 0
|
||||||
hscroll:.byte MGTK::scroll_option_none
|
hscroll:.byte MGTK::Scroll::option_none
|
||||||
vscroll:.byte MGTK::scroll_option_none
|
vscroll:.byte MGTK::Scroll::option_none
|
||||||
hthumbmax: .byte 0
|
hthumbmax: .byte 0
|
||||||
hthumbpos: .byte 0
|
hthumbpos: .byte 0
|
||||||
vthumbmax: .byte 0
|
vthumbmax: .byte 0
|
||||||
|
@ -294,12 +294,12 @@ init_window:
|
||||||
.proc input_loop
|
.proc input_loop
|
||||||
MGTK_CALL MGTK::GetEvent, event_params
|
MGTK_CALL MGTK::GetEvent, event_params
|
||||||
lda event_params::kind
|
lda event_params::kind
|
||||||
cmp #MGTK::event_kind_button_down
|
cmp #MGTK::EventKind::button_down
|
||||||
bne :+
|
bne :+
|
||||||
jsr on_click
|
jsr on_click
|
||||||
jmp input_loop
|
jmp input_loop
|
||||||
|
|
||||||
: cmp #MGTK::event_kind_key_down
|
: cmp #MGTK::EventKind::key_down
|
||||||
bne input_loop
|
bne input_loop
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
|
@ -373,7 +373,7 @@ update_selection:
|
||||||
bne hit
|
bne hit
|
||||||
miss: rts
|
miss: rts
|
||||||
|
|
||||||
hit: cmp #MGTK::area_content
|
hit: cmp #MGTK::Area::content
|
||||||
bne miss
|
bne miss
|
||||||
jsr find_hit_target
|
jsr find_hit_target
|
||||||
cpx #0
|
cpx #0
|
||||||
|
@ -450,7 +450,7 @@ on_field_click:
|
||||||
stx hit_rect_index
|
stx hit_rect_index
|
||||||
loop: MGTK_CALL MGTK::GetEvent, event_params ; Repeat while mouse is down
|
loop: MGTK_CALL MGTK::GetEvent, event_params ; Repeat while mouse is down
|
||||||
lda event_params::kind
|
lda event_params::kind
|
||||||
cmp #MGTK::event_kind_button_up
|
cmp #MGTK::EventKind::button_up
|
||||||
beq :+
|
beq :+
|
||||||
jsr do_inc_or_dec
|
jsr do_inc_or_dec
|
||||||
jmp loop
|
jmp loop
|
||||||
|
|
|
@ -57,10 +57,10 @@ str_title:
|
||||||
|
|
||||||
.proc winfo
|
.proc winfo
|
||||||
window_id: .byte da_window_id
|
window_id: .byte da_window_id
|
||||||
options: .byte MGTK::option_go_away_box
|
options: .byte MGTK::Option::go_away_box
|
||||||
title: .addr str_title
|
title: .addr str_title
|
||||||
hscroll: .byte MGTK::scroll_option_none
|
hscroll: .byte MGTK::Scroll::option_none
|
||||||
vscroll: .byte MGTK::scroll_option_none
|
vscroll: .byte MGTK::Scroll::option_none
|
||||||
hthumbmax: .byte 32
|
hthumbmax: .byte 32
|
||||||
hthumbpos: .byte 0
|
hthumbpos: .byte 0
|
||||||
vthumbmax: .byte 32
|
vthumbmax: .byte 32
|
||||||
|
@ -92,10 +92,10 @@ nextwinfo: .addr 0
|
||||||
|
|
||||||
.proc event_params
|
.proc event_params
|
||||||
kind: .byte 0
|
kind: .byte 0
|
||||||
;;; event_kind_key_down
|
;;; EventKind::key_down
|
||||||
key := *
|
key := *
|
||||||
modifiers := * + 1
|
modifiers := * + 1
|
||||||
;;; event_kind_update
|
;;; EventKind::update
|
||||||
window_id := *
|
window_id := *
|
||||||
;;; otherwise
|
;;; otherwise
|
||||||
xcoord := *
|
xcoord := *
|
||||||
|
@ -204,11 +204,11 @@ grow_box_bitmap:
|
||||||
MGTK_CALL MGTK::GetEvent, event_params
|
MGTK_CALL MGTK::GetEvent, event_params
|
||||||
bne exit
|
bne exit
|
||||||
lda event_params::kind
|
lda event_params::kind
|
||||||
cmp #MGTK::event_kind_button_down
|
cmp #MGTK::EventKind::button_down
|
||||||
beq handle_down
|
beq handle_down
|
||||||
cmp #MGTK::event_kind_key_down
|
cmp #MGTK::EventKind::key_down
|
||||||
beq handle_key
|
beq handle_key
|
||||||
cmp #MGTK::event_kind_no_event
|
cmp #MGTK::EventKind::no_event
|
||||||
beq handle_no_event
|
beq handle_no_event
|
||||||
jmp input_loop
|
jmp input_loop
|
||||||
.endproc
|
.endproc
|
||||||
|
@ -240,11 +240,11 @@ grow_box_bitmap:
|
||||||
cmp winfo::window_id
|
cmp winfo::window_id
|
||||||
bne input_loop
|
bne input_loop
|
||||||
lda findwindow_params::which_area
|
lda findwindow_params::which_area
|
||||||
cmp #MGTK::area_close_box
|
cmp #MGTK::Area::close_box
|
||||||
beq handle_close
|
beq handle_close
|
||||||
cmp #MGTK::area_dragbar
|
cmp #MGTK::Area::dragbar
|
||||||
beq handle_drag
|
beq handle_drag
|
||||||
cmp #MGTK::area_content
|
cmp #MGTK::Area::content
|
||||||
bne :+
|
bne :+
|
||||||
jmp handle_grow
|
jmp handle_grow
|
||||||
: jmp input_loop
|
: jmp input_loop
|
||||||
|
@ -385,7 +385,7 @@ pos_r: DEFINE_POINT 0, 0, pos_r
|
||||||
.proc draw_window
|
.proc draw_window
|
||||||
;; Defer if content area is not visible
|
;; Defer if content area is not visible
|
||||||
MGTK_CALL MGTK::GetWinPort, winport_params
|
MGTK_CALL MGTK::GetWinPort, winport_params
|
||||||
cmp #MGTK::error_window_obscured
|
cmp #MGTK::Error::window_obscured
|
||||||
bne :+
|
bne :+
|
||||||
rts
|
rts
|
||||||
:
|
:
|
||||||
|
|
|
@ -67,7 +67,7 @@ stash_stack: .byte 0
|
||||||
da_window_id := 51
|
da_window_id := 51
|
||||||
|
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
;;; Redraw the screen (all windows) after a event_kind_drag
|
;;; Redraw the screen (all windows) after a EventKind::drag
|
||||||
|
|
||||||
.proc redraw_screen
|
.proc redraw_screen
|
||||||
|
|
||||||
|
@ -590,10 +590,10 @@ setport_params:
|
||||||
|
|
||||||
.proc winfo
|
.proc winfo
|
||||||
window_id: .byte da_window_id
|
window_id: .byte da_window_id
|
||||||
options: .byte MGTK::option_go_away_box
|
options: .byte MGTK::Option::go_away_box
|
||||||
title: .addr name
|
title: .addr name
|
||||||
hscroll:.byte MGTK::scroll_option_none
|
hscroll:.byte MGTK::Scroll::option_none
|
||||||
vscroll:.byte MGTK::scroll_option_none
|
vscroll:.byte MGTK::Scroll::option_none
|
||||||
hthumbmax: .byte 0
|
hthumbmax: .byte 0
|
||||||
hthumbpos: .byte 0
|
hthumbpos: .byte 0
|
||||||
vthumbmax: .byte 0
|
vthumbmax: .byte 0
|
||||||
|
@ -700,13 +700,13 @@ ploop: lda position_table+1,y
|
||||||
.proc input_loop
|
.proc input_loop
|
||||||
MGTK_CALL MGTK::GetEvent, event_params
|
MGTK_CALL MGTK::GetEvent, event_params
|
||||||
lda event_params::kind
|
lda event_params::kind
|
||||||
cmp #MGTK::event_kind_button_down
|
cmp #MGTK::EventKind::button_down
|
||||||
bne :+
|
bne :+
|
||||||
jsr on_click
|
jsr on_click
|
||||||
jmp input_loop
|
jmp input_loop
|
||||||
|
|
||||||
;; key?
|
;; key?
|
||||||
: cmp #MGTK::event_kind_key_down
|
: cmp #MGTK::EventKind::key_down
|
||||||
bne input_loop
|
bne input_loop
|
||||||
jsr check_key
|
jsr check_key
|
||||||
jmp input_loop
|
jmp input_loop
|
||||||
|
@ -722,14 +722,14 @@ on_click:
|
||||||
bail: rts
|
bail: rts
|
||||||
|
|
||||||
;; client area?
|
;; client area?
|
||||||
: cmp #MGTK::area_content
|
: cmp #MGTK::Area::content
|
||||||
bne :+
|
bne :+
|
||||||
jsr find_click_piece
|
jsr find_click_piece
|
||||||
bcc bail
|
bcc bail
|
||||||
jmp process_click
|
jmp process_click
|
||||||
|
|
||||||
;; close port?
|
;; close port?
|
||||||
: cmp #MGTK::area_close_box
|
: cmp #MGTK::Area::close_box
|
||||||
bne check_title
|
bne check_title
|
||||||
MGTK_CALL MGTK::TrackGoAway, trackgoaway_params
|
MGTK_CALL MGTK::TrackGoAway, trackgoaway_params
|
||||||
lda trackgoaway_params::goaway
|
lda trackgoaway_params::goaway
|
||||||
|
@ -755,7 +755,7 @@ loop: lda routine,x
|
||||||
|
|
||||||
;; title bar?
|
;; title bar?
|
||||||
check_title:
|
check_title:
|
||||||
cmp #MGTK::area_dragbar
|
cmp #MGTK::Area::dragbar
|
||||||
bne bail
|
bne bail
|
||||||
lda #da_window_id
|
lda #da_window_id
|
||||||
sta dragwindow_params::window_id
|
sta dragwindow_params::window_id
|
||||||
|
|
|
@ -179,7 +179,7 @@ base: .word 0
|
||||||
.proc event_params ; queried to track mouse-up
|
.proc event_params ; queried to track mouse-up
|
||||||
kind: .byte $00
|
kind: .byte $00
|
||||||
|
|
||||||
;;; if state is MGTK::event_kind_key_down
|
;;; if state is MGTK::EventKind::key_down
|
||||||
key := *
|
key := *
|
||||||
modifiers := *+1
|
modifiers := *+1
|
||||||
|
|
||||||
|
@ -201,10 +201,10 @@ ycoord := *+2
|
||||||
|
|
||||||
.proc winfo
|
.proc winfo
|
||||||
window_id: .byte da_window_id ; window identifier
|
window_id: .byte da_window_id ; window identifier
|
||||||
options: .byte MGTK::option_dialog_box
|
options: .byte MGTK::Option::dialog_box
|
||||||
title: .addr window_title
|
title: .addr window_title
|
||||||
hscroll:.byte MGTK::scroll_option_none
|
hscroll:.byte MGTK::Scroll::option_none
|
||||||
vscroll:.byte MGTK::scroll_option_none
|
vscroll:.byte MGTK::Scroll::option_none
|
||||||
hthumbmax: .byte 32
|
hthumbmax: .byte 32
|
||||||
hthumbpos: .byte 0
|
hthumbpos: .byte 0
|
||||||
vthumbmax: .byte 32
|
vthumbmax: .byte 32
|
||||||
|
@ -357,9 +357,9 @@ end: rts
|
||||||
.proc input_loop
|
.proc input_loop
|
||||||
MGTK_CALL MGTK::GetEvent, event_params
|
MGTK_CALL MGTK::GetEvent, event_params
|
||||||
lda event_params::kind
|
lda event_params::kind
|
||||||
cmp #MGTK::event_kind_button_down ; was clicked?
|
cmp #MGTK::EventKind::button_down ; was clicked?
|
||||||
beq exit
|
beq exit
|
||||||
cmp #MGTK::event_kind_key_down ; any key?
|
cmp #MGTK::EventKind::key_down ; any key?
|
||||||
beq on_key
|
beq on_key
|
||||||
bne input_loop
|
bne input_loop
|
||||||
|
|
||||||
|
|
|
@ -282,10 +282,10 @@ textlen: .byte 0 ; length
|
||||||
|
|
||||||
.proc winfo
|
.proc winfo
|
||||||
window_id: .byte da_window_id ; window identifier
|
window_id: .byte da_window_id ; window identifier
|
||||||
options: .byte MGTK::option_go_away_box ; window flags (2=include close port)
|
options: .byte MGTK::Option::go_away_box ; window flags (2=include close port)
|
||||||
title: .addr dummy1000 ; overwritten to point at filename
|
title: .addr dummy1000 ; overwritten to point at filename
|
||||||
hscroll: .byte MGTK::scroll_option_none
|
hscroll: .byte MGTK::Scroll::option_none
|
||||||
vscroll: .byte MGTK::scroll_option_normal
|
vscroll: .byte MGTK::Scroll::option_normal
|
||||||
hthumbmax: .byte 32
|
hthumbmax: .byte 32
|
||||||
hthumbpos: .byte 0
|
hthumbpos: .byte 0
|
||||||
vthumbmax: .byte 255
|
vthumbmax: .byte 255
|
||||||
|
@ -477,7 +477,7 @@ input_loop:
|
||||||
|
|
||||||
;; which part of the window?
|
;; which part of the window?
|
||||||
lda findwindow_params::which_area
|
lda findwindow_params::which_area
|
||||||
cmp #MGTK::area_close_box
|
cmp #MGTK::Area::close_box
|
||||||
beq on_close_click
|
beq on_close_click
|
||||||
|
|
||||||
;; title and resize clicks need mouse location
|
;; title and resize clicks need mouse location
|
||||||
|
@ -491,9 +491,9 @@ input_loop:
|
||||||
stx growwindow_params::mousey
|
stx growwindow_params::mousey
|
||||||
stx findcontrol_params::mousey
|
stx findcontrol_params::mousey
|
||||||
|
|
||||||
cmp #MGTK::area_dragbar
|
cmp #MGTK::Area::dragbar
|
||||||
beq title
|
beq title
|
||||||
cmp #MGTK::area_grow_box ; not enabled, so this will never match
|
cmp #MGTK::Area::grow_box ; not enabled, so this will never match
|
||||||
beq input_loop
|
beq input_loop
|
||||||
jsr on_client_click
|
jsr on_client_click
|
||||||
jmp input_loop
|
jmp input_loop
|
||||||
|
@ -546,10 +546,10 @@ wider: lda winfo::hscroll
|
||||||
ldx window_width+1
|
ldx window_width+1
|
||||||
cpx #>max_width
|
cpx #>max_width
|
||||||
bne enable
|
bne enable
|
||||||
and #(<~MGTK::scroll_option_active) ; disable scroll
|
and #(<~MGTK::Scroll::option_active) ; disable scroll
|
||||||
jmp :+
|
jmp :+
|
||||||
|
|
||||||
enable: ora #MGTK::scroll_option_active ; enable scroll
|
enable: ora #MGTK::Scroll::option_active ; enable scroll
|
||||||
|
|
||||||
: sta winfo::hscroll
|
: sta winfo::hscroll
|
||||||
|
|
||||||
|
@ -564,7 +564,7 @@ enable: ora #MGTK::scroll_option_active ; enable scroll
|
||||||
sta val+1
|
sta val+1
|
||||||
jsr div_by_16
|
jsr div_by_16
|
||||||
sta setctlmax_params::ctlmax
|
sta setctlmax_params::ctlmax
|
||||||
lda #MGTK::ctl_horizontal_scroll_bar
|
lda #MGTK::Ctl::horizontal_scroll_bar
|
||||||
sta setctlmax_params::which_ctl
|
sta setctlmax_params::which_ctl
|
||||||
MGTK_CALL MGTK::SetCtlMax, setctlmax_params ; change to clamped size ???
|
MGTK_CALL MGTK::SetCtlMax, setctlmax_params ; change to clamped size ???
|
||||||
jsr calc_and_draw_mode
|
jsr calc_and_draw_mode
|
||||||
|
@ -579,9 +579,9 @@ enable: ora #MGTK::scroll_option_active ; enable scroll
|
||||||
;; On one of the scroll bars?
|
;; On one of the scroll bars?
|
||||||
MGTK_CALL MGTK::FindControl, findcontrol_params
|
MGTK_CALL MGTK::FindControl, findcontrol_params
|
||||||
lda findcontrol_params::which_ctl
|
lda findcontrol_params::which_ctl
|
||||||
cmp #MGTK::ctl_vertical_scroll_bar
|
cmp #MGTK::Ctl::vertical_scroll_bar
|
||||||
beq on_vscroll_click
|
beq on_vscroll_click
|
||||||
cmp #MGTK::ctl_horizontal_scroll_bar
|
cmp #MGTK::Ctl::horizontal_scroll_bar
|
||||||
bne end
|
bne end
|
||||||
jmp on_hscroll_click
|
jmp on_hscroll_click
|
||||||
end: rts
|
end: rts
|
||||||
|
@ -591,19 +591,19 @@ end: rts
|
||||||
;;; Vertical Scroll Bar
|
;;; Vertical Scroll Bar
|
||||||
|
|
||||||
.proc on_vscroll_click
|
.proc on_vscroll_click
|
||||||
lda #MGTK::ctl_vertical_scroll_bar
|
lda #MGTK::Ctl::vertical_scroll_bar
|
||||||
sta trackthumb_params::which_ctl
|
sta trackthumb_params::which_ctl
|
||||||
sta updatethumb_params::which_ctl
|
sta updatethumb_params::which_ctl
|
||||||
lda findcontrol_params::which_part
|
lda findcontrol_params::which_part
|
||||||
cmp #MGTK::part_thumb
|
cmp #MGTK::Part::thumb
|
||||||
beq on_vscroll_thumb_click
|
beq on_vscroll_thumb_click
|
||||||
cmp #MGTK::part_page_down
|
cmp #MGTK::Part::page_down
|
||||||
beq on_vscroll_below_click
|
beq on_vscroll_below_click
|
||||||
cmp #MGTK::part_page_up
|
cmp #MGTK::Part::page_up
|
||||||
beq on_vscroll_above_click
|
beq on_vscroll_above_click
|
||||||
cmp #MGTK::part_up_arrow
|
cmp #MGTK::Part::up_arrow
|
||||||
beq on_vscroll_up_click
|
beq on_vscroll_up_click
|
||||||
cmp #MGTK::part_down_arrow
|
cmp #MGTK::Part::down_arrow
|
||||||
bne end
|
bne end
|
||||||
jmp on_vscroll_down_click
|
jmp on_vscroll_down_click
|
||||||
end: rts
|
end: rts
|
||||||
|
@ -713,19 +713,19 @@ loop: inx
|
||||||
;;; (Unused in STF DA, so most of this is speculation)
|
;;; (Unused in STF DA, so most of this is speculation)
|
||||||
|
|
||||||
.proc on_hscroll_click
|
.proc on_hscroll_click
|
||||||
lda #MGTK::ctl_horizontal_scroll_bar
|
lda #MGTK::Ctl::horizontal_scroll_bar
|
||||||
sta trackthumb_params::which_ctl
|
sta trackthumb_params::which_ctl
|
||||||
sta updatethumb_params::which_ctl
|
sta updatethumb_params::which_ctl
|
||||||
lda findcontrol_params::which_part
|
lda findcontrol_params::which_part
|
||||||
cmp #MGTK::part_thumb
|
cmp #MGTK::Part::thumb
|
||||||
beq on_hscroll_thumb_click
|
beq on_hscroll_thumb_click
|
||||||
cmp #MGTK::part_page_right
|
cmp #MGTK::Part::page_right
|
||||||
beq on_hscroll_after_click
|
beq on_hscroll_after_click
|
||||||
cmp #MGTK::part_page_left
|
cmp #MGTK::Part::page_left
|
||||||
beq on_hscroll_before_click
|
beq on_hscroll_before_click
|
||||||
cmp #MGTK::part_left_arrow
|
cmp #MGTK::Part::left_arrow
|
||||||
beq on_hscroll_left_click
|
beq on_hscroll_left_click
|
||||||
cmp #MGTK::part_right_arrow
|
cmp #MGTK::Part::right_arrow
|
||||||
beq on_hscroll_right_click
|
beq on_hscroll_right_click
|
||||||
rts
|
rts
|
||||||
.endproc
|
.endproc
|
||||||
|
@ -807,7 +807,7 @@ store: sta winfo::hthumbpos
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
;;; UI Helpers
|
;;; UI Helpers
|
||||||
|
|
||||||
;; Used at start of thumb event_kind_drag
|
;; Used at start of thumb EventKind::drag
|
||||||
.proc do_trackthumb
|
.proc do_trackthumb
|
||||||
copy16 event_params::mousex, trackthumb_params::mousex
|
copy16 event_params::mousex, trackthumb_params::mousex
|
||||||
lda event_params::mousey
|
lda event_params::mousey
|
||||||
|
|
|
@ -50,10 +50,10 @@ da_top := 50
|
||||||
|
|
||||||
.proc winfo
|
.proc winfo
|
||||||
window_id: .byte da_window_id
|
window_id: .byte da_window_id
|
||||||
options: .byte MGTK::option_go_away_box
|
options: .byte MGTK::Option::go_away_box
|
||||||
title: .addr str_title
|
title: .addr str_title
|
||||||
hscroll: .byte MGTK::scroll_option_none
|
hscroll: .byte MGTK::Scroll::option_none
|
||||||
vscroll: .byte MGTK::scroll_option_none
|
vscroll: .byte MGTK::Scroll::option_none
|
||||||
hthumbmax: .byte 32
|
hthumbmax: .byte 32
|
||||||
hthumbpos: .byte 0
|
hthumbpos: .byte 0
|
||||||
vthumbmax: .byte 32
|
vthumbmax: .byte 32
|
||||||
|
@ -412,10 +412,10 @@ mem_pos: DEFINE_POINT 150, 34
|
||||||
|
|
||||||
.proc event_params
|
.proc event_params
|
||||||
kind: .byte 0
|
kind: .byte 0
|
||||||
;;; event_kind_key_down
|
;;; EventKind::key_down
|
||||||
key := *
|
key := *
|
||||||
modifiers := * + 1
|
modifiers := * + 1
|
||||||
;;; event_kind_update
|
;;; EventKind::update
|
||||||
window_id := *
|
window_id := *
|
||||||
;;; otherwise
|
;;; otherwise
|
||||||
xcoord := *
|
xcoord := *
|
||||||
|
@ -660,9 +660,9 @@ done: rts
|
||||||
MGTK_CALL MGTK::GetEvent, event_params
|
MGTK_CALL MGTK::GetEvent, event_params
|
||||||
bne exit
|
bne exit
|
||||||
lda event_params::kind
|
lda event_params::kind
|
||||||
cmp #MGTK::event_kind_button_down ; was clicked?
|
cmp #MGTK::EventKind::button_down ; was clicked?
|
||||||
beq handle_down
|
beq handle_down
|
||||||
cmp #MGTK::event_kind_key_down ; any key?
|
cmp #MGTK::EventKind::key_down ; any key?
|
||||||
beq handle_key
|
beq handle_key
|
||||||
jmp input_loop
|
jmp input_loop
|
||||||
.endproc
|
.endproc
|
||||||
|
@ -695,9 +695,9 @@ done: rts
|
||||||
cmp winfo::window_id
|
cmp winfo::window_id
|
||||||
bne input_loop
|
bne input_loop
|
||||||
lda findwindow_params::which_area
|
lda findwindow_params::which_area
|
||||||
cmp #MGTK::area_close_box
|
cmp #MGTK::Area::close_box
|
||||||
beq handle_close
|
beq handle_close
|
||||||
cmp #MGTK::area_dragbar
|
cmp #MGTK::Area::dragbar
|
||||||
beq handle_drag
|
beq handle_drag
|
||||||
jmp input_loop
|
jmp input_loop
|
||||||
.endproc
|
.endproc
|
||||||
|
@ -765,7 +765,7 @@ egg: .byte 0
|
||||||
|
|
||||||
.proc clear_window
|
.proc clear_window
|
||||||
MGTK_CALL MGTK::GetWinPort, winport_params
|
MGTK_CALL MGTK::GetWinPort, winport_params
|
||||||
cmp #MGTK::error_window_obscured
|
cmp #MGTK::Error::window_obscured
|
||||||
bne :+
|
bne :+
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
@ -780,7 +780,7 @@ egg: .byte 0
|
||||||
ptr := $06
|
ptr := $06
|
||||||
|
|
||||||
MGTK_CALL MGTK::GetWinPort, winport_params
|
MGTK_CALL MGTK::GetWinPort, winport_params
|
||||||
cmp #MGTK::error_window_obscured
|
cmp #MGTK::Error::window_obscured
|
||||||
bne :+
|
bne :+
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
.include "../desktop.inc"
|
.include "../desktop.inc"
|
||||||
.include "../macros.inc"
|
.include "../macros.inc"
|
||||||
|
|
||||||
|
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
;;; DeskTop - the actual application
|
;;; DeskTop - the actual application
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
|
|
|
@ -913,7 +913,7 @@ L983D: lda #0
|
||||||
peek_loop:
|
peek_loop:
|
||||||
MGTK_CALL MGTK::PeekEvent, peekevent_params
|
MGTK_CALL MGTK::PeekEvent, peekevent_params
|
||||||
lda peekevent_params::kind
|
lda peekevent_params::kind
|
||||||
cmp #MGTK::event_kind_drag
|
cmp #MGTK::EventKind::drag
|
||||||
beq L9857
|
beq L9857
|
||||||
|
|
||||||
ignore_drag:
|
ignore_drag:
|
||||||
|
@ -1114,7 +1114,7 @@ L99FC: MGTK_CALL MGTK::SetPattern, checkerboard_pattern2
|
||||||
MGTK_CALL MGTK::FramePoly, drag_outline_buffer
|
MGTK_CALL MGTK::FramePoly, drag_outline_buffer
|
||||||
L9A0E: MGTK_CALL MGTK::PeekEvent, peekevent_params
|
L9A0E: MGTK_CALL MGTK::PeekEvent, peekevent_params
|
||||||
lda peekevent_params::kind
|
lda peekevent_params::kind
|
||||||
cmp #MGTK::event_kind_drag
|
cmp #MGTK::EventKind::drag
|
||||||
beq L9A1E
|
beq L9A1E
|
||||||
jmp L9BA5
|
jmp L9BA5
|
||||||
|
|
||||||
|
@ -1764,7 +1764,7 @@ LA189: rts
|
||||||
;;;
|
;;;
|
||||||
;;; (Label is always at least as wide as the icon)
|
;;; (Label is always at least as wide as the icon)
|
||||||
|
|
||||||
icon_poly_size := (8 * .sizeof(MGTK::Point)) + 2
|
icon_poly_size = (8 * .sizeof(MGTK::Point)) + 2
|
||||||
|
|
||||||
.proc calc_icon_poly
|
.proc calc_icon_poly
|
||||||
entry_ptr := $6
|
entry_ptr := $6
|
||||||
|
@ -3316,11 +3316,11 @@ LBB75: MGTK_RELAY2_CALL MGTK::MoveTo, pos_prompt
|
||||||
addr_call_indirect draw_pascal_string, prompt_addr
|
addr_call_indirect draw_pascal_string, prompt_addr
|
||||||
LBB87: MGTK_RELAY2_CALL MGTK::GetEvent, event_params
|
LBB87: MGTK_RELAY2_CALL MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_down
|
cmp #MGTK::EventKind::button_down
|
||||||
bne LBB9A
|
bne LBB9A
|
||||||
jmp LBC0C
|
jmp LBC0C
|
||||||
|
|
||||||
LBB9A: cmp #MGTK::event_kind_key_down
|
LBB9A: cmp #MGTK::EventKind::key_down
|
||||||
bne LBB87
|
bne LBB87
|
||||||
lda event_key
|
lda event_key
|
||||||
and #CHAR_MASK
|
and #CHAR_MASK
|
||||||
|
@ -3392,7 +3392,7 @@ LBC6D: MGTK_RELAY2_CALL MGTK::SetPenMode, penXOR
|
||||||
sta LBCE8
|
sta LBCE8
|
||||||
LBC84: MGTK_RELAY2_CALL MGTK::GetEvent, event_params
|
LBC84: MGTK_RELAY2_CALL MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_up
|
cmp #MGTK::EventKind::button_up
|
||||||
beq LBCDB
|
beq LBCDB
|
||||||
jsr LBDE1
|
jsr LBDE1
|
||||||
MGTK_RELAY2_CALL MGTK::MoveTo, event_coords
|
MGTK_RELAY2_CALL MGTK::MoveTo, event_coords
|
||||||
|
@ -3429,7 +3429,7 @@ LBCE9: MGTK_RELAY2_CALL MGTK::SetPenMode, penXOR
|
||||||
sta LBD64
|
sta LBD64
|
||||||
LBD00: MGTK_RELAY2_CALL MGTK::GetEvent, event_params
|
LBD00: MGTK_RELAY2_CALL MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_up
|
cmp #MGTK::EventKind::button_up
|
||||||
beq LBD57
|
beq LBD57
|
||||||
jsr LBDE1
|
jsr LBDE1
|
||||||
MGTK_RELAY2_CALL MGTK::MoveTo, event_coords
|
MGTK_RELAY2_CALL MGTK::MoveTo, event_coords
|
||||||
|
@ -3466,7 +3466,7 @@ LBD65: lda #0
|
||||||
MGTK_RELAY2_CALL MGTK::PaintRect, try_again_rect
|
MGTK_RELAY2_CALL MGTK::PaintRect, try_again_rect
|
||||||
LBD7C: MGTK_RELAY2_CALL MGTK::GetEvent, event_params
|
LBD7C: MGTK_RELAY2_CALL MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_up
|
cmp #MGTK::EventKind::button_up
|
||||||
beq LBDD3
|
beq LBDD3
|
||||||
jsr LBDE1
|
jsr LBDE1
|
||||||
MGTK_RELAY2_CALL MGTK::MoveTo, event_coords
|
MGTK_RELAY2_CALL MGTK::MoveTo, event_coords
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
|
|
||||||
.proc desktop_main
|
.proc desktop_main
|
||||||
|
|
||||||
L0020 := $0020
|
L0020 := $0020
|
||||||
L0800 := $0800
|
L0800 := $0800
|
||||||
L0CB8 := $0CB8
|
L0CB8 := $0CB8
|
||||||
|
@ -129,21 +130,21 @@ main_loop:
|
||||||
lda event_kind
|
lda event_kind
|
||||||
|
|
||||||
;; Is it a button-down event? (including w/ modifiers)
|
;; Is it a button-down event? (including w/ modifiers)
|
||||||
cmp #MGTK::event_kind_button_down
|
cmp #MGTK::EventKind::button_down
|
||||||
beq click
|
beq click
|
||||||
cmp #MGTK::event_kind_apple_key
|
cmp #MGTK::EventKind::apple_key
|
||||||
bne :+
|
bne :+
|
||||||
click: jsr handle_click
|
click: jsr handle_click
|
||||||
jmp main_loop
|
jmp main_loop
|
||||||
|
|
||||||
;; Is it a key down event?
|
;; Is it a key down event?
|
||||||
: cmp #MGTK::event_kind_key_down
|
: cmp #MGTK::EventKind::key_down
|
||||||
bne :+
|
bne :+
|
||||||
jsr handle_keydown
|
jsr handle_keydown
|
||||||
jmp main_loop
|
jmp main_loop
|
||||||
|
|
||||||
;; Is it an update event?
|
;; Is it an update event?
|
||||||
: cmp #MGTK::event_kind_update
|
: cmp #MGTK::EventKind::update
|
||||||
bne :+
|
bne :+
|
||||||
jsr reset_grafport3
|
jsr reset_grafport3
|
||||||
lda active_window_id
|
lda active_window_id
|
||||||
|
@ -177,7 +178,7 @@ redraw_windows:
|
||||||
sta L40F1
|
sta L40F1
|
||||||
L4100: jsr peek_event
|
L4100: jsr peek_event
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_update
|
cmp #MGTK::EventKind::update
|
||||||
bne L412B
|
bne L412B
|
||||||
jsr get_event
|
jsr get_event
|
||||||
L410D: jsr L4113
|
L410D: jsr L4113
|
||||||
|
@ -376,7 +377,7 @@ dispatch_table:
|
||||||
;; Apple menu (1)
|
;; Apple menu (1)
|
||||||
.addr cmd_about
|
.addr cmd_about
|
||||||
.addr cmd_noop ; --------
|
.addr cmd_noop ; --------
|
||||||
.repeat 8 ; max_desk_acc_count - TODO: Why can't const be used here?
|
.repeat ::max_desk_acc_count
|
||||||
.addr cmd_deskacc
|
.addr cmd_deskacc
|
||||||
.endrepeat
|
.endrepeat
|
||||||
|
|
||||||
|
@ -555,7 +556,7 @@ call_proc:
|
||||||
: jmp L68AA
|
: jmp L68AA
|
||||||
|
|
||||||
not_desktop:
|
not_desktop:
|
||||||
cmp #MGTK::area_menubar ; menu?
|
cmp #MGTK::Area::menubar ; menu?
|
||||||
bne not_menu
|
bne not_menu
|
||||||
MGTK_RELAY_CALL MGTK::MenuSelect, menu_click_params
|
MGTK_RELAY_CALL MGTK::MenuSelect, menu_click_params
|
||||||
jmp menu_dispatch2
|
jmp menu_dispatch2
|
||||||
|
@ -573,18 +574,18 @@ not_menu:
|
||||||
|
|
||||||
.proc handle_active_window_click
|
.proc handle_active_window_click
|
||||||
pla
|
pla
|
||||||
cmp #MGTK::area_content
|
cmp #MGTK::Area::content
|
||||||
bne :+
|
bne :+
|
||||||
jsr detect_double_click
|
jsr detect_double_click
|
||||||
sta double_click_flag
|
sta double_click_flag
|
||||||
jmp handle_client_click
|
jmp handle_client_click
|
||||||
: cmp #MGTK::area_dragbar
|
: cmp #MGTK::Area::dragbar
|
||||||
bne :+
|
bne :+
|
||||||
jmp handle_title_click
|
jmp handle_title_click
|
||||||
: cmp #MGTK::area_grow_box
|
: cmp #MGTK::Area::grow_box
|
||||||
bne :+
|
bne :+
|
||||||
jmp handle_resize_click
|
jmp handle_resize_click
|
||||||
: cmp #MGTK::area_close_box
|
: cmp #MGTK::Area::close_box
|
||||||
bne :+
|
bne :+
|
||||||
jmp handle_close_click
|
jmp handle_close_click
|
||||||
: rts
|
: rts
|
||||||
|
@ -2677,9 +2678,9 @@ L5579: lda #$00
|
||||||
L5581: jsr L55F0
|
L5581: jsr L55F0
|
||||||
L5584: jsr get_event
|
L5584: jsr get_event
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_key_down
|
cmp #MGTK::EventKind::key_down
|
||||||
beq L5595
|
beq L5595
|
||||||
cmp #MGTK::event_kind_button_down
|
cmp #MGTK::EventKind::button_down
|
||||||
bne L5584
|
bne L5584
|
||||||
jmp L55D1
|
jmp L55D1
|
||||||
|
|
||||||
|
@ -2868,9 +2869,9 @@ L572D: lda #$00
|
||||||
sta L578C
|
sta L578C
|
||||||
L5732: jsr get_event
|
L5732: jsr get_event
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_key_down
|
cmp #MGTK::EventKind::key_down
|
||||||
beq L5743
|
beq L5743
|
||||||
cmp #MGTK::event_kind_button_down
|
cmp #MGTK::EventKind::button_down
|
||||||
bne L5732
|
bne L5732
|
||||||
jmp L578B
|
jmp L578B
|
||||||
|
|
||||||
|
@ -2936,9 +2937,9 @@ L578D: .byte 0
|
||||||
jsr L5803
|
jsr L5803
|
||||||
loop: jsr get_event
|
loop: jsr get_event
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_down
|
cmp #MGTK::EventKind::button_down
|
||||||
beq done
|
beq done
|
||||||
cmp #MGTK::event_kind_key_down
|
cmp #MGTK::EventKind::key_down
|
||||||
bne loop
|
bne loop
|
||||||
lda event_key
|
lda event_key
|
||||||
cmp #CHAR_RETURN
|
cmp #CHAR_RETURN
|
||||||
|
@ -3039,7 +3040,7 @@ L5861: .word 0
|
||||||
beq :+
|
beq :+
|
||||||
sta updatethumb_stash
|
sta updatethumb_stash
|
||||||
inc updatethumb_stash
|
inc updatethumb_stash
|
||||||
lda #MGTK::ctl_horizontal_scroll_bar
|
lda #MGTK::Ctl::horizontal_scroll_bar
|
||||||
sta updatethumb_which_ctl
|
sta updatethumb_which_ctl
|
||||||
jsr L5C54
|
jsr L5C54
|
||||||
lda updatethumb_stash
|
lda updatethumb_stash
|
||||||
|
@ -3052,7 +3053,7 @@ L587D: .byte 0
|
||||||
beq :+
|
beq :+
|
||||||
sta updatethumb_stash
|
sta updatethumb_stash
|
||||||
dec updatethumb_stash
|
dec updatethumb_stash
|
||||||
lda #MGTK::ctl_horizontal_scroll_bar
|
lda #MGTK::Ctl::horizontal_scroll_bar
|
||||||
sta updatethumb_which_ctl
|
sta updatethumb_which_ctl
|
||||||
jsr L5C54
|
jsr L5C54
|
||||||
lda updatethumb_stash
|
lda updatethumb_stash
|
||||||
|
@ -3066,7 +3067,7 @@ L587D: .byte 0
|
||||||
beq :+
|
beq :+
|
||||||
sta updatethumb_stash
|
sta updatethumb_stash
|
||||||
inc updatethumb_stash
|
inc updatethumb_stash
|
||||||
lda #MGTK::ctl_vertical_scroll_bar
|
lda #MGTK::Ctl::vertical_scroll_bar
|
||||||
sta updatethumb_which_ctl
|
sta updatethumb_which_ctl
|
||||||
jsr L5C54
|
jsr L5C54
|
||||||
lda updatethumb_stash
|
lda updatethumb_stash
|
||||||
|
@ -3079,7 +3080,7 @@ L58AD: .byte 0
|
||||||
beq :+
|
beq :+
|
||||||
sta updatethumb_stash
|
sta updatethumb_stash
|
||||||
dec updatethumb_stash
|
dec updatethumb_stash
|
||||||
lda #MGTK::ctl_vertical_scroll_bar
|
lda #MGTK::Ctl::vertical_scroll_bar
|
||||||
sta updatethumb_which_ctl
|
sta updatethumb_which_ctl
|
||||||
jsr L5C54
|
jsr L5C54
|
||||||
lda updatethumb_stash
|
lda updatethumb_stash
|
||||||
|
@ -3409,10 +3410,10 @@ L5B1B: .byte 0
|
||||||
: bit double_click_flag
|
: bit double_click_flag
|
||||||
bmi :+
|
bmi :+
|
||||||
jmp done_client_click ; ignore double click
|
jmp done_client_click ; ignore double click
|
||||||
: cmp #MGTK::ctl_dead_zone
|
: cmp #MGTK::Ctl::dead_zone
|
||||||
bne :+
|
bne :+
|
||||||
rts
|
rts
|
||||||
: cmp #MGTK::ctl_vertical_scroll_bar
|
: cmp #MGTK::Ctl::vertical_scroll_bar
|
||||||
bne horiz
|
bne horiz
|
||||||
|
|
||||||
;; Vertical scrollbar
|
;; Vertical scrollbar
|
||||||
|
@ -3426,37 +3427,37 @@ L5B1B: .byte 0
|
||||||
jmp done_client_click
|
jmp done_client_click
|
||||||
: jsr L5803
|
: jsr L5803
|
||||||
lda findcontrol_which_part
|
lda findcontrol_which_part
|
||||||
cmp #MGTK::part_thumb
|
cmp #MGTK::Part::thumb
|
||||||
bne :+
|
bne :+
|
||||||
jsr do_track_thumb
|
jsr do_track_thumb
|
||||||
jmp done_client_click
|
jmp done_client_click
|
||||||
|
|
||||||
: cmp #MGTK::part_up_arrow
|
: cmp #MGTK::Part::up_arrow
|
||||||
bne :+
|
bne :+
|
||||||
up: jsr scroll_up
|
up: jsr scroll_up
|
||||||
lda #MGTK::part_up_arrow
|
lda #MGTK::Part::up_arrow
|
||||||
jsr check_control_repeat
|
jsr check_control_repeat
|
||||||
bpl up
|
bpl up
|
||||||
jmp done_client_click
|
jmp done_client_click
|
||||||
|
|
||||||
: cmp #MGTK::part_down_arrow
|
: cmp #MGTK::Part::down_arrow
|
||||||
bne :+
|
bne :+
|
||||||
down: jsr scroll_down
|
down: jsr scroll_down
|
||||||
lda #MGTK::part_down_arrow
|
lda #MGTK::Part::down_arrow
|
||||||
jsr check_control_repeat
|
jsr check_control_repeat
|
||||||
bpl down
|
bpl down
|
||||||
jmp done_client_click
|
jmp done_client_click
|
||||||
|
|
||||||
: cmp #MGTK::part_page_down
|
: cmp #MGTK::Part::page_down
|
||||||
beq pgdn
|
beq pgdn
|
||||||
pgup: jsr L638C
|
pgup: jsr L638C
|
||||||
lda #MGTK::part_page_up
|
lda #MGTK::Part::page_up
|
||||||
jsr check_control_repeat
|
jsr check_control_repeat
|
||||||
bpl pgup
|
bpl pgup
|
||||||
jmp done_client_click
|
jmp done_client_click
|
||||||
|
|
||||||
pgdn: jsr L63EC
|
pgdn: jsr L63EC
|
||||||
lda #MGTK::part_page_down
|
lda #MGTK::Part::page_down
|
||||||
jsr check_control_repeat
|
jsr check_control_repeat
|
||||||
bpl pgdn
|
bpl pgdn
|
||||||
jmp done_client_click
|
jmp done_client_click
|
||||||
|
@ -3472,37 +3473,37 @@ horiz: lda active_window_id
|
||||||
jmp done_client_click
|
jmp done_client_click
|
||||||
: jsr L5803
|
: jsr L5803
|
||||||
lda findcontrol_which_part
|
lda findcontrol_which_part
|
||||||
cmp #MGTK::part_thumb
|
cmp #MGTK::Part::thumb
|
||||||
bne :+
|
bne :+
|
||||||
jsr do_track_thumb
|
jsr do_track_thumb
|
||||||
jmp done_client_click
|
jmp done_client_click
|
||||||
|
|
||||||
: cmp #MGTK::part_left_arrow
|
: cmp #MGTK::Part::left_arrow
|
||||||
bne :+
|
bne :+
|
||||||
left: jsr scroll_left
|
left: jsr scroll_left
|
||||||
lda #MGTK::part_left_arrow
|
lda #MGTK::Part::left_arrow
|
||||||
jsr check_control_repeat
|
jsr check_control_repeat
|
||||||
bpl left
|
bpl left
|
||||||
jmp done_client_click
|
jmp done_client_click
|
||||||
|
|
||||||
: cmp #MGTK::part_right_arrow
|
: cmp #MGTK::Part::right_arrow
|
||||||
bne :+
|
bne :+
|
||||||
rght: jsr scroll_right
|
rght: jsr scroll_right
|
||||||
lda #MGTK::part_right_arrow
|
lda #MGTK::Part::right_arrow
|
||||||
jsr check_control_repeat
|
jsr check_control_repeat
|
||||||
bpl rght
|
bpl rght
|
||||||
jmp done_client_click
|
jmp done_client_click
|
||||||
|
|
||||||
: cmp #MGTK::part_page_right
|
: cmp #MGTK::Part::page_right
|
||||||
beq pgrt
|
beq pgrt
|
||||||
pglt: jsr L6451
|
pglt: jsr L6451
|
||||||
lda #MGTK::part_page_left
|
lda #MGTK::Part::page_left
|
||||||
jsr check_control_repeat
|
jsr check_control_repeat
|
||||||
bpl pglt
|
bpl pglt
|
||||||
jmp done_client_click
|
jmp done_client_click
|
||||||
|
|
||||||
pgrt: jsr L64B0
|
pgrt: jsr L64B0
|
||||||
lda #MGTK::part_page_right
|
lda #MGTK::Part::page_right
|
||||||
jsr check_control_repeat
|
jsr check_control_repeat
|
||||||
bpl pgrt
|
bpl pgrt
|
||||||
jmp done_client_click
|
jmp done_client_click
|
||||||
|
@ -3556,14 +3557,14 @@ done_client_click:
|
||||||
sta ctl
|
sta ctl
|
||||||
jsr peek_event
|
jsr peek_event
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_drag
|
cmp #MGTK::EventKind::drag
|
||||||
beq :+
|
beq :+
|
||||||
bail: return #$FF ; high bit set = not repeating
|
bail: return #$FF ; high bit set = not repeating
|
||||||
|
|
||||||
: MGTK_RELAY_CALL MGTK::FindControl, event_coords
|
: MGTK_RELAY_CALL MGTK::FindControl, event_coords
|
||||||
lda findcontrol_which_ctl
|
lda findcontrol_which_ctl
|
||||||
beq bail
|
beq bail
|
||||||
cmp #MGTK::ctl_dead_zone
|
cmp #MGTK::Ctl::dead_zone
|
||||||
beq bail
|
beq bail
|
||||||
lda findcontrol_which_part
|
lda findcontrol_which_part
|
||||||
cmp ctl
|
cmp ctl
|
||||||
|
@ -3861,7 +3862,7 @@ L5F20: lda event_coords,x
|
||||||
bpl L5F20
|
bpl L5F20
|
||||||
jsr peek_event
|
jsr peek_event
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_drag
|
cmp #MGTK::EventKind::drag
|
||||||
beq L5F3F
|
beq L5F3F
|
||||||
bit BUTN0
|
bit BUTN0
|
||||||
bmi L5F3E
|
bmi L5F3E
|
||||||
|
@ -3884,7 +3885,7 @@ L5F50: lda L5F0B,x
|
||||||
MGTK_RELAY_CALL MGTK::FrameRect, rect_E230
|
MGTK_RELAY_CALL MGTK::FrameRect, rect_E230
|
||||||
L5F6B: jsr peek_event
|
L5F6B: jsr peek_event
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_drag
|
cmp #MGTK::EventKind::drag
|
||||||
beq L5FC5
|
beq L5FC5
|
||||||
MGTK_RELAY_CALL MGTK::FrameRect, rect_E230
|
MGTK_RELAY_CALL MGTK::FrameRect, rect_E230
|
||||||
ldx #$00
|
ldx #$00
|
||||||
|
@ -4422,7 +4423,7 @@ L65E2: lsr16 L6602
|
||||||
lda L6602
|
lda L6602
|
||||||
L65EB: jsr L62BC
|
L65EB: jsr L62BC
|
||||||
L65EE: sta updatethumb_thumbpos
|
L65EE: sta updatethumb_thumbpos
|
||||||
lda #MGTK::ctl_horizontal_scroll_bar
|
lda #MGTK::Ctl::horizontal_scroll_bar
|
||||||
sta updatethumb_which_ctl
|
sta updatethumb_which_ctl
|
||||||
MGTK_RELAY_CALL MGTK::UpdateThumb, updatethumb_params
|
MGTK_RELAY_CALL MGTK::UpdateThumb, updatethumb_params
|
||||||
rts
|
rts
|
||||||
|
@ -4463,7 +4464,7 @@ L667B: lsr16 L66A0
|
||||||
lda L66A0
|
lda L66A0
|
||||||
L668A: jsr L62BC
|
L668A: jsr L62BC
|
||||||
L668D: sta updatethumb_thumbpos
|
L668D: sta updatethumb_thumbpos
|
||||||
lda #MGTK::ctl_vertical_scroll_bar
|
lda #MGTK::Ctl::vertical_scroll_bar
|
||||||
sta updatethumb_which_ctl
|
sta updatethumb_which_ctl
|
||||||
MGTK_RELAY_CALL MGTK::UpdateThumb, updatethumb_params
|
MGTK_RELAY_CALL MGTK::UpdateThumb, updatethumb_params
|
||||||
rts
|
rts
|
||||||
|
@ -4751,7 +4752,7 @@ L68B8: lda event_coords,x
|
||||||
bpl L68B8
|
bpl L68B8
|
||||||
jsr peek_event
|
jsr peek_event
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_drag
|
cmp #MGTK::EventKind::drag
|
||||||
beq L68CF
|
beq L68CF
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
@ -4760,7 +4761,7 @@ L68CF: MGTK_RELAY_CALL MGTK::SetPattern, checkerboard_pattern3
|
||||||
MGTK_RELAY_CALL MGTK::FrameRect, rect_E230
|
MGTK_RELAY_CALL MGTK::FrameRect, rect_E230
|
||||||
L68E4: jsr peek_event
|
L68E4: jsr peek_event
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_drag
|
cmp #MGTK::EventKind::drag
|
||||||
beq L6932
|
beq L6932
|
||||||
MGTK_RELAY_CALL MGTK::FrameRect, rect_E230
|
MGTK_RELAY_CALL MGTK::FrameRect, rect_E230
|
||||||
ldx #0
|
ldx #0
|
||||||
|
@ -5267,7 +5268,7 @@ config_port:
|
||||||
bmi activate_hscroll
|
bmi activate_hscroll
|
||||||
|
|
||||||
;; deactivate horizontal scrollbar
|
;; deactivate horizontal scrollbar
|
||||||
lda #MGTK::ctl_horizontal_scroll_bar
|
lda #MGTK::Ctl::horizontal_scroll_bar
|
||||||
sta activatectl_which_ctl
|
sta activatectl_which_ctl
|
||||||
lda #MGTK::activatectl_deactivate
|
lda #MGTK::activatectl_deactivate
|
||||||
sta activatectl_activate
|
sta activatectl_activate
|
||||||
|
@ -5277,7 +5278,7 @@ config_port:
|
||||||
|
|
||||||
activate_hscroll:
|
activate_hscroll:
|
||||||
;; activate horizontal scrollbar
|
;; activate horizontal scrollbar
|
||||||
lda #MGTK::ctl_horizontal_scroll_bar
|
lda #MGTK::Ctl::horizontal_scroll_bar
|
||||||
sta activatectl_which_ctl
|
sta activatectl_which_ctl
|
||||||
lda #MGTK::activatectl_activate
|
lda #MGTK::activatectl_activate
|
||||||
sta activatectl_activate
|
sta activatectl_activate
|
||||||
|
@ -5292,7 +5293,7 @@ check_vscroll:
|
||||||
bmi activate_vscroll
|
bmi activate_vscroll
|
||||||
|
|
||||||
;; deactivate vertical scrollbar
|
;; deactivate vertical scrollbar
|
||||||
lda #MGTK::ctl_vertical_scroll_bar
|
lda #MGTK::Ctl::vertical_scroll_bar
|
||||||
sta activatectl_which_ctl
|
sta activatectl_which_ctl
|
||||||
lda #MGTK::activatectl_deactivate
|
lda #MGTK::activatectl_deactivate
|
||||||
sta activatectl_activate
|
sta activatectl_activate
|
||||||
|
@ -5302,7 +5303,7 @@ check_vscroll:
|
||||||
|
|
||||||
activate_vscroll:
|
activate_vscroll:
|
||||||
;; activate vertical scrollbar
|
;; activate vertical scrollbar
|
||||||
lda #MGTK::ctl_vertical_scroll_bar
|
lda #MGTK::Ctl::vertical_scroll_bar
|
||||||
sta activatectl_which_ctl
|
sta activatectl_which_ctl
|
||||||
lda #MGTK::activatectl_activate
|
lda #MGTK::activatectl_activate
|
||||||
sta activatectl_activate
|
sta activatectl_activate
|
||||||
|
@ -7727,7 +7728,7 @@ L84D0: .byte 0
|
||||||
L84DC: sub16 grafport2::cliprect::x2, grafport2::cliprect::x1, L85F8
|
L84DC: sub16 grafport2::cliprect::x2, grafport2::cliprect::x1, L85F8
|
||||||
sub16 grafport2::cliprect::y2, grafport2::cliprect::y1, L85FA
|
sub16 grafport2::cliprect::y2, grafport2::cliprect::y1, L85FA
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_down
|
cmp #MGTK::EventKind::button_down
|
||||||
bne L850C
|
bne L850C
|
||||||
asl a
|
asl a
|
||||||
bne L850E
|
bne L850E
|
||||||
|
@ -7856,17 +7857,17 @@ loop: dec counter
|
||||||
lda event_kind
|
lda event_kind
|
||||||
sta kind ; unused ???
|
sta kind ; unused ???
|
||||||
|
|
||||||
cmp #MGTK::event_kind_no_event
|
cmp #MGTK::EventKind::no_event
|
||||||
beq loop
|
beq loop
|
||||||
cmp #MGTK::event_kind_drag
|
cmp #MGTK::EventKind::drag
|
||||||
beq loop
|
beq loop
|
||||||
cmp #MGTK::event_kind_button_up
|
cmp #MGTK::EventKind::button_up
|
||||||
bne :+
|
bne :+
|
||||||
|
|
||||||
jsr get_event
|
jsr get_event
|
||||||
jmp loop
|
jmp loop
|
||||||
|
|
||||||
: cmp #MGTK::event_kind_button_down
|
: cmp #MGTK::EventKind::button_down
|
||||||
bne exit
|
bne exit
|
||||||
|
|
||||||
jsr get_event
|
jsr get_event
|
||||||
|
@ -11267,7 +11268,7 @@ start: yax_call JT_MLI_RELAY, CLOSE, close_params
|
||||||
.proc check_escape_key_down
|
.proc check_escape_key_down
|
||||||
yax_call JT_MGTK_RELAY, MGTK::GetEvent, event_params
|
yax_call JT_MGTK_RELAY, MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_key_down
|
cmp #MGTK::EventKind::key_down
|
||||||
bne nope
|
bne nope
|
||||||
lda event_key
|
lda event_key
|
||||||
cmp #CHAR_ESCAPE
|
cmp #CHAR_ESCAPE
|
||||||
|
@ -11469,11 +11470,11 @@ dialog_param_addr:
|
||||||
;; Dispatch event types - mouse down, key press
|
;; Dispatch event types - mouse down, key press
|
||||||
: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_down
|
cmp #MGTK::EventKind::button_down
|
||||||
bne :+
|
bne :+
|
||||||
jmp prompt_click_handler
|
jmp prompt_click_handler
|
||||||
|
|
||||||
: cmp #MGTK::event_kind_key_down
|
: cmp #MGTK::EventKind::key_down
|
||||||
bne :+
|
bne :+
|
||||||
jmp prompt_key_handler
|
jmp prompt_key_handler
|
||||||
|
|
||||||
|
@ -11521,7 +11522,7 @@ done: jsr reset_grafport3a
|
||||||
lda findwindow_which_area
|
lda findwindow_which_area
|
||||||
bne :+
|
bne :+
|
||||||
return #$FF
|
return #$FF
|
||||||
: cmp #MGTK::area_content
|
: cmp #MGTK::Area::content
|
||||||
bne :+
|
bne :+
|
||||||
jmp content
|
jmp content
|
||||||
: return #$FF
|
: return #$FF
|
||||||
|
@ -11829,9 +11830,9 @@ jump_relay:
|
||||||
|
|
||||||
: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_down
|
cmp #MGTK::EventKind::button_down
|
||||||
beq close
|
beq close
|
||||||
cmp #MGTK::event_kind_key_down
|
cmp #MGTK::EventKind::key_down
|
||||||
bne :-
|
bne :-
|
||||||
lda event_key
|
lda event_key
|
||||||
and #CHAR_MASK
|
and #CHAR_MASK
|
||||||
|
@ -12856,17 +12857,17 @@ loop: dec counter
|
||||||
lda event_kind ; unused ???
|
lda event_kind ; unused ???
|
||||||
sta kind
|
sta kind
|
||||||
|
|
||||||
cmp #MGTK::event_kind_no_event
|
cmp #MGTK::EventKind::no_event
|
||||||
beq loop
|
beq loop
|
||||||
cmp #MGTK::event_kind_drag
|
cmp #MGTK::EventKind::drag
|
||||||
beq loop
|
beq loop
|
||||||
cmp #MGTK::event_kind_button_up
|
cmp #MGTK::EventKind::button_up
|
||||||
bne :+
|
bne :+
|
||||||
|
|
||||||
MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||||
jmp loop
|
jmp loop
|
||||||
|
|
||||||
: cmp #MGTK::event_kind_button_down
|
: cmp #MGTK::EventKind::button_down
|
||||||
bne exit
|
bne exit
|
||||||
|
|
||||||
MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||||
|
@ -13306,7 +13307,7 @@ event_loop:
|
||||||
sta down_flag
|
sta down_flag
|
||||||
loop: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
loop: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_up
|
cmp #MGTK::EventKind::button_up
|
||||||
beq exit
|
beq exit
|
||||||
lda winfo_alert_dialog
|
lda winfo_alert_dialog
|
||||||
sta event_params
|
sta event_params
|
||||||
|
|
|
@ -356,10 +356,10 @@ alert_bitmap2_params:
|
||||||
|
|
||||||
.proc winfo_alert_dialog
|
.proc winfo_alert_dialog
|
||||||
window_id: .byte $0F
|
window_id: .byte $0F
|
||||||
options: .byte MGTK::option_dialog_box
|
options: .byte MGTK::Option::dialog_box
|
||||||
title: .addr 0
|
title: .addr 0
|
||||||
hscroll: .byte MGTK::scroll_option_none
|
hscroll: .byte MGTK::Scroll::option_none
|
||||||
vscroll: .byte MGTK::scroll_option_none
|
vscroll: .byte MGTK::Scroll::option_none
|
||||||
hthumbmax: .byte 0
|
hthumbmax: .byte 0
|
||||||
hthumbpos: .byte 0
|
hthumbpos: .byte 0
|
||||||
vthumbmax: .byte 0
|
vthumbmax: .byte 0
|
||||||
|
@ -390,10 +390,10 @@ nextwinfo: .addr 0
|
||||||
|
|
||||||
.proc winfo_entrydlg
|
.proc winfo_entrydlg
|
||||||
window_id: .byte $12
|
window_id: .byte $12
|
||||||
options: .byte MGTK::option_dialog_box
|
options: .byte MGTK::Option::dialog_box
|
||||||
title: .addr 0
|
title: .addr 0
|
||||||
hscroll: .byte MGTK::scroll_option_none
|
hscroll: .byte MGTK::Scroll::option_none
|
||||||
vscroll: .byte MGTK::scroll_option_none
|
vscroll: .byte MGTK::Scroll::option_none
|
||||||
hthumbmax: .byte 0
|
hthumbmax: .byte 0
|
||||||
hthumbpos: .byte 0
|
hthumbpos: .byte 0
|
||||||
vthumbmax: .byte 0
|
vthumbmax: .byte 0
|
||||||
|
@ -424,10 +424,10 @@ nextwinfo: .addr 0
|
||||||
|
|
||||||
.proc winfo_entrydlg_file_picker
|
.proc winfo_entrydlg_file_picker
|
||||||
window_id: .byte $15
|
window_id: .byte $15
|
||||||
options: .byte MGTK::option_dialog_box
|
options: .byte MGTK::Option::dialog_box
|
||||||
title: .addr 0
|
title: .addr 0
|
||||||
hscroll: .byte MGTK::scroll_option_none
|
hscroll: .byte MGTK::Scroll::option_none
|
||||||
vscroll: .byte MGTK::scroll_option_normal
|
vscroll: .byte MGTK::Scroll::option_normal
|
||||||
hthumbmax: .byte 0
|
hthumbmax: .byte 0
|
||||||
hthumbpos: .byte 0
|
hthumbpos: .byte 0
|
||||||
vthumbmax: .byte 3
|
vthumbmax: .byte 3
|
||||||
|
@ -460,10 +460,10 @@ nextwinfo: .addr 0
|
||||||
width := 400
|
width := 400
|
||||||
|
|
||||||
window_id: .byte $18
|
window_id: .byte $18
|
||||||
options: .byte MGTK::option_dialog_box
|
options: .byte MGTK::Option::dialog_box
|
||||||
title: .addr 0
|
title: .addr 0
|
||||||
hscroll: .byte MGTK::scroll_option_none
|
hscroll: .byte MGTK::Scroll::option_none
|
||||||
vscroll: .byte MGTK::scroll_option_none
|
vscroll: .byte MGTK::Scroll::option_none
|
||||||
hthumbmax: .byte 0
|
hthumbmax: .byte 0
|
||||||
hthumbpos: .byte 0
|
hthumbpos: .byte 0
|
||||||
vthumbmax: .byte 0
|
vthumbmax: .byte 0
|
||||||
|
@ -497,10 +497,10 @@ winfo_about_dialog_port := winfo_about_dialog::port
|
||||||
width := 350
|
width := 350
|
||||||
|
|
||||||
window_id: .byte $1B
|
window_id: .byte $1B
|
||||||
options: .byte MGTK::option_dialog_box
|
options: .byte MGTK::Option::dialog_box
|
||||||
title: .addr 0
|
title: .addr 0
|
||||||
hscroll: .byte MGTK::scroll_option_none
|
hscroll: .byte MGTK::Scroll::option_none
|
||||||
vscroll: .byte MGTK::scroll_option_none
|
vscroll: .byte MGTK::Scroll::option_none
|
||||||
hthumbmax: .byte 0
|
hthumbmax: .byte 0
|
||||||
hthumbpos: .byte 0
|
hthumbpos: .byte 0
|
||||||
vthumbmax: .byte 0
|
vthumbmax: .byte 0
|
||||||
|
@ -1175,10 +1175,10 @@ LE71F: .byte 0
|
||||||
.macro WINFO_DEFN id, label, buflabel
|
.macro WINFO_DEFN id, label, buflabel
|
||||||
.proc label
|
.proc label
|
||||||
window_id: .byte id
|
window_id: .byte id
|
||||||
options: .byte MGTK::option_go_away_box | MGTK::option_grow_box
|
options: .byte MGTK::Option::go_away_box | MGTK::Option::grow_box
|
||||||
title: .addr buflabel
|
title: .addr buflabel
|
||||||
hscroll: .byte MGTK::scroll_option_normal
|
hscroll: .byte MGTK::Scroll::option_normal
|
||||||
vscroll: .byte MGTK::scroll_option_normal
|
vscroll: .byte MGTK::Scroll::option_normal
|
||||||
hthumbmax: .byte 3
|
hthumbmax: .byte 3
|
||||||
hthumbpos: .byte 0
|
hthumbpos: .byte 0
|
||||||
vthumbmax: .byte 3
|
vthumbmax: .byte 3
|
||||||
|
|
196
desktop/mgtk.s
196
desktop/mgtk.s
|
@ -1929,7 +1929,7 @@ in_top: ldy #0
|
||||||
rts
|
rts
|
||||||
|
|
||||||
bad_rect:
|
bad_rect:
|
||||||
exit_call MGTK::error_empty_object
|
exit_call MGTK::Error::empty_object
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
|
|
||||||
|
@ -2322,7 +2322,7 @@ next: jsr next_poly
|
||||||
jmp fill_polys
|
jmp fill_polys
|
||||||
|
|
||||||
bad_poly:
|
bad_poly:
|
||||||
exit_call MGTK::error_bad_object
|
exit_call MGTK::Error::bad_object
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
|
|
||||||
|
@ -3160,7 +3160,7 @@ loop: sta glyph_row_lo,y
|
||||||
bne loop
|
bne loop
|
||||||
rts
|
rts
|
||||||
|
|
||||||
end: exit_call MGTK::error_font_too_big
|
end: exit_call MGTK::Error::font_too_big
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
glyph_row_lo:
|
glyph_row_lo:
|
||||||
|
@ -4672,7 +4672,7 @@ savesize: .res 2
|
||||||
bpl found_mouse
|
bpl found_mouse
|
||||||
cpx #0
|
cpx #0
|
||||||
bne :+
|
bne :+
|
||||||
exit_call MGTK::error_no_mouse
|
exit_call MGTK::Error::no_mouse
|
||||||
|
|
||||||
: lda slot_num
|
: lda slot_num
|
||||||
and #$7F
|
and #$7F
|
||||||
|
@ -4767,7 +4767,7 @@ irq_on:
|
||||||
irts: rts
|
irts: rts
|
||||||
|
|
||||||
irq_err:
|
irq_err:
|
||||||
exit_call MGTK::error_invalid_irq_setting
|
exit_call MGTK::Error::invalid_irq_setting
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
.proc set_op_sys
|
.proc set_op_sys
|
||||||
|
@ -4776,7 +4776,7 @@ irq_err:
|
||||||
cmp #1
|
cmp #1
|
||||||
beq is_pascal
|
beq is_pascal
|
||||||
|
|
||||||
exit_call MGTK::error_invalid_op_sys
|
exit_call MGTK::Error::invalid_op_sys
|
||||||
|
|
||||||
is_prodos:
|
is_prodos:
|
||||||
lda #$80
|
lda #$80
|
||||||
|
@ -4856,7 +4856,7 @@ clear_after_events_hook:
|
||||||
rts
|
rts
|
||||||
|
|
||||||
invalid_hook:
|
invalid_hook:
|
||||||
exit_call MGTK::error_invalid_hook
|
exit_call MGTK::Error::invalid_hook
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
|
|
||||||
|
@ -5014,7 +5014,7 @@ mouse_state: .res 2
|
||||||
ldy #2
|
ldy #2
|
||||||
jmp store_xa_at_y
|
jmp store_xa_at_y
|
||||||
|
|
||||||
fail: exit_call MGTK::error_desktop_already_initialized
|
fail: exit_call MGTK::Error::desktop_already_initialized
|
||||||
|
|
||||||
mouse_state_addr:
|
mouse_state_addr:
|
||||||
.addr mouse_state
|
.addr mouse_state
|
||||||
|
@ -5093,9 +5093,9 @@ ycoord: .word 0
|
||||||
lda params::kind
|
lda params::kind
|
||||||
bmi event_ok
|
bmi event_ok
|
||||||
|
|
||||||
cmp #MGTK::event_kind_update
|
cmp #MGTK::EventKind::update
|
||||||
bcs bad_event
|
bcs bad_event
|
||||||
cmp #MGTK::event_kind_key_down
|
cmp #MGTK::EventKind::key_down
|
||||||
beq event_ok
|
beq event_ok
|
||||||
|
|
||||||
ldx params::xcoord
|
ldx params::xcoord
|
||||||
|
@ -5120,11 +5120,11 @@ event_ok:
|
||||||
rts
|
rts
|
||||||
|
|
||||||
bad_event:
|
bad_event:
|
||||||
lda #MGTK::error_invalid_event
|
lda #MGTK::Error::invalid_event
|
||||||
bmi error_return
|
bmi error_return
|
||||||
|
|
||||||
no_room:
|
no_room:
|
||||||
lda #MGTK::error_event_queue_full
|
lda #MGTK::Error::event_queue_full
|
||||||
error_return:
|
error_return:
|
||||||
plp
|
plp
|
||||||
jmp exit_with_a
|
jmp exit_with_a
|
||||||
|
@ -5134,11 +5134,11 @@ error_return:
|
||||||
;; Return a no_event (if mouse up) or drag event (if mouse down)
|
;; Return a no_event (if mouse up) or drag event (if mouse down)
|
||||||
;; and report the current mouse position.
|
;; and report the current mouse position.
|
||||||
.proc return_move_event
|
.proc return_move_event
|
||||||
lda #MGTK::event_kind_no_event
|
lda #MGTK::EventKind::no_event
|
||||||
|
|
||||||
bit mouse_status
|
bit mouse_status
|
||||||
bpl :+
|
bpl :+
|
||||||
lda #MGTK::event_kind_drag
|
lda #MGTK::EventKind::drag
|
||||||
|
|
||||||
: ldy #0
|
: ldy #0
|
||||||
sta (params_addr),y ; Store 5 bytes at params
|
sta (params_addr),y ; Store 5 bytes at params
|
||||||
|
@ -5172,7 +5172,7 @@ modifiers := * + 3
|
||||||
.proc CheckEventsImpl
|
.proc CheckEventsImpl
|
||||||
bit use_interrupts
|
bit use_interrupts
|
||||||
bpl irq_entry
|
bpl irq_entry
|
||||||
exit_call MGTK::error_irq_in_use
|
exit_call MGTK::Error::irq_in_use
|
||||||
|
|
||||||
irq_entry:
|
irq_entry:
|
||||||
sec ; called from interrupt handler
|
sec ; called from interrupt handler
|
||||||
|
@ -5209,20 +5209,20 @@ irq_entry:
|
||||||
|
|
||||||
lda input::modifiers
|
lda input::modifiers
|
||||||
sta input::kmods
|
sta input::kmods
|
||||||
lda #MGTK::event_kind_key_down
|
lda #MGTK::EventKind::key_down
|
||||||
sta input::state
|
sta input::state
|
||||||
bne put_key_event ; always
|
bne put_key_event ; always
|
||||||
|
|
||||||
: bcc up
|
: bcc up
|
||||||
lda input::modifiers
|
lda input::modifiers
|
||||||
beq :+
|
beq :+
|
||||||
lda #MGTK::event_kind_apple_key
|
lda #MGTK::EventKind::apple_key
|
||||||
bne set_state
|
bne set_state
|
||||||
|
|
||||||
: lda #MGTK::event_kind_button_down
|
: lda #MGTK::EventKind::button_down
|
||||||
bne set_state
|
bne set_state
|
||||||
|
|
||||||
up: lda #MGTK::event_kind_button_up
|
up: lda #MGTK::EventKind::button_up
|
||||||
|
|
||||||
set_state:
|
set_state:
|
||||||
sta input::state
|
sta input::state
|
||||||
|
@ -5823,7 +5823,7 @@ filler: ldx menu_item_index
|
||||||
lda savebehind_size+1
|
lda savebehind_size+1
|
||||||
sbc savebehind_usage+1
|
sbc savebehind_usage+1
|
||||||
bpl :+
|
bpl :+
|
||||||
exit_call MGTK::error_insufficient_savebehind_area
|
exit_call MGTK::Error::insufficient_savebehind_area
|
||||||
|
|
||||||
: rts
|
: rts
|
||||||
.endproc
|
.endproc
|
||||||
|
@ -5855,7 +5855,7 @@ filler: ldx menu_item_index
|
||||||
.proc find_menu_by_id_or_fail
|
.proc find_menu_by_id_or_fail
|
||||||
jsr find_menu_by_id
|
jsr find_menu_by_id
|
||||||
bne :+
|
bne :+
|
||||||
exit_call MGTK::error_menu_not_found
|
exit_call MGTK::Error::menu_not_found
|
||||||
: rts
|
: rts
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
|
@ -5949,7 +5949,7 @@ find_by_shortcut:
|
||||||
: cmp #$20 ; is control char
|
: cmp #$20 ; is control char
|
||||||
bcc found
|
bcc found
|
||||||
lda curmenuitem::options
|
lda curmenuitem::options
|
||||||
and #MGTK::menuopt_disable_flag | MGTK::menuopt_item_is_filler
|
and #MGTK::MenuOpt::disable_flag | MGTK::MenuOpt::item_is_filler
|
||||||
bne next
|
bne next
|
||||||
|
|
||||||
lda curmenuitem::options
|
lda curmenuitem::options
|
||||||
|
@ -6040,7 +6040,7 @@ key_mods: .byte 0
|
||||||
bmi not_found
|
bmi not_found
|
||||||
|
|
||||||
lda curmenuitem::options
|
lda curmenuitem::options
|
||||||
and #MGTK::menuopt_disable_flag | MGTK::menuopt_item_is_filler
|
and #MGTK::MenuOpt::disable_flag | MGTK::MenuOpt::item_is_filler
|
||||||
bne not_found
|
bne not_found
|
||||||
|
|
||||||
lda curmenu::menu_id
|
lda curmenu::menu_id
|
||||||
|
@ -6070,7 +6070,7 @@ rrts: rts
|
||||||
.proc find_menu_item_or_fail
|
.proc find_menu_item_or_fail
|
||||||
jsr find_menu_and_menu_item
|
jsr find_menu_and_menu_item
|
||||||
bne rrts
|
bne rrts
|
||||||
exit_call MGTK::error_menu_item_not_found
|
exit_call MGTK::Error::menu_item_not_found
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
|
|
||||||
|
@ -6113,11 +6113,11 @@ check: .byte 0
|
||||||
|
|
||||||
lda params::check
|
lda params::check
|
||||||
beq :+
|
beq :+
|
||||||
lda #MGTK::menuopt_item_is_checked
|
lda #MGTK::MenuOpt::item_is_checked
|
||||||
ora curmenuitem::options
|
ora curmenuitem::options
|
||||||
bne set_options ; always
|
bne set_options ; always
|
||||||
|
|
||||||
: lda #$FF^MGTK::menuopt_item_is_checked
|
: lda #$FF^MGTK::MenuOpt::item_is_checked
|
||||||
and curmenuitem::options
|
and curmenuitem::options
|
||||||
set_options:
|
set_options:
|
||||||
sta curmenuitem::options
|
sta curmenuitem::options
|
||||||
|
@ -6194,7 +6194,7 @@ event_loop:
|
||||||
|
|
||||||
in_menu:jsr get_and_return_event
|
in_menu:jsr get_and_return_event
|
||||||
beq :+
|
beq :+
|
||||||
cmp #MGTK::event_kind_button_up
|
cmp #MGTK::EventKind::button_up
|
||||||
bne event_loop
|
bne event_loop
|
||||||
|
|
||||||
: lda cur_hilited_menu_item
|
: lda cur_hilited_menu_item
|
||||||
|
@ -6246,7 +6246,7 @@ in_menu_item:
|
||||||
|
|
||||||
lda curmenu::disabled
|
lda curmenu::disabled
|
||||||
ora curmenuitem::options
|
ora curmenuitem::options
|
||||||
and #MGTK::menuopt_disable_flag | MGTK::menuopt_item_is_filler
|
and #MGTK::MenuOpt::disable_flag | MGTK::MenuOpt::item_is_filler
|
||||||
beq :+
|
beq :+
|
||||||
|
|
||||||
ldx #0
|
ldx #0
|
||||||
|
@ -6426,7 +6426,7 @@ loop: jsr get_menu_item
|
||||||
jmp next
|
jmp next
|
||||||
|
|
||||||
: lda curmenuitem::options
|
: lda curmenuitem::options
|
||||||
and #MGTK::menuopt_item_is_checked
|
and #MGTK::MenuOpt::item_is_checked
|
||||||
beq no_mark
|
beq no_mark
|
||||||
|
|
||||||
lda offset_checkmark
|
lda offset_checkmark
|
||||||
|
@ -6436,7 +6436,7 @@ loop: jsr get_menu_item
|
||||||
sta mark_text+1
|
sta mark_text+1
|
||||||
|
|
||||||
lda curmenuitem::options
|
lda curmenuitem::options
|
||||||
and #MGTK::menuopt_item_has_mark
|
and #MGTK::MenuOpt::item_has_mark
|
||||||
beq :+
|
beq :+
|
||||||
lda curmenuitem::mark_char
|
lda curmenuitem::mark_char
|
||||||
sta mark_text+1
|
sta mark_text+1
|
||||||
|
@ -6454,7 +6454,7 @@ no_mark:
|
||||||
|
|
||||||
jsr get_menu_and_menu_item
|
jsr get_menu_and_menu_item
|
||||||
lda curmenuitem::options
|
lda curmenuitem::options
|
||||||
and #MGTK::menuopt_open_apple | MGTK::menuopt_solid_apple
|
and #MGTK::MenuOpt::open_apple | MGTK::MenuOpt::solid_apple
|
||||||
bne oa_sa
|
bne oa_sa
|
||||||
|
|
||||||
lda curmenuitem::shortcut1
|
lda curmenuitem::shortcut1
|
||||||
|
@ -6464,7 +6464,7 @@ no_mark:
|
||||||
sta shortcut_text+1
|
sta shortcut_text+1
|
||||||
jmp no_shortcut
|
jmp no_shortcut
|
||||||
|
|
||||||
oa_sa: cmp #MGTK::menuopt_open_apple
|
oa_sa: cmp #MGTK::MenuOpt::open_apple
|
||||||
bne :+
|
bne :+
|
||||||
lda open_apple_glyph
|
lda open_apple_glyph
|
||||||
sta shortcut_text+1
|
sta shortcut_text+1
|
||||||
|
@ -6666,7 +6666,7 @@ mark_char: .byte 0
|
||||||
lda params::set_char
|
lda params::set_char
|
||||||
beq :+
|
beq :+
|
||||||
|
|
||||||
lda #MGTK::menuopt_item_has_mark
|
lda #MGTK::MenuOpt::item_has_mark
|
||||||
ora curmenuitem::options
|
ora curmenuitem::options
|
||||||
sta curmenuitem::options
|
sta curmenuitem::options
|
||||||
|
|
||||||
|
@ -6674,7 +6674,7 @@ mark_char: .byte 0
|
||||||
sta curmenuitem::mark_char
|
sta curmenuitem::mark_char
|
||||||
jmp put_menu_item
|
jmp put_menu_item
|
||||||
|
|
||||||
: lda #$FF^MGTK::menuopt_item_has_mark
|
: lda #$FF^MGTK::MenuOpt::item_has_mark
|
||||||
and curmenuitem::options
|
and curmenuitem::options
|
||||||
sta curmenuitem::options
|
sta curmenuitem::options
|
||||||
jmp put_menu_item
|
jmp put_menu_item
|
||||||
|
@ -6948,7 +6948,7 @@ end: rts
|
||||||
jsr window_by_id
|
jsr window_by_id
|
||||||
beq nope
|
beq nope
|
||||||
rts
|
rts
|
||||||
nope: exit_call MGTK::error_window_not_found
|
nope: exit_call MGTK::Error::window_not_found
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
|
|
||||||
|
@ -7012,7 +7012,7 @@ return_winrect:
|
||||||
bmi vert_scroll
|
bmi vert_scroll
|
||||||
|
|
||||||
lda current_winfo::options
|
lda current_winfo::options
|
||||||
and #MGTK::option_grow_box
|
and #MGTK::Option::grow_box
|
||||||
bne vert_scroll
|
bne vert_scroll
|
||||||
lda #$01
|
lda #$01
|
||||||
bne :+
|
bne :+
|
||||||
|
@ -7036,7 +7036,7 @@ vert_scroll:
|
||||||
bcc :+
|
bcc :+
|
||||||
inc winrect::y2+1
|
inc winrect::y2+1
|
||||||
:
|
:
|
||||||
lda #MGTK::option_dialog_box
|
lda #MGTK::Option::dialog_box
|
||||||
and current_winfo::options
|
and current_winfo::options
|
||||||
bne :+
|
bne :+
|
||||||
lda winframe_top
|
lda winframe_top
|
||||||
|
@ -7062,7 +7062,7 @@ vert_scroll:
|
||||||
: stax winrect::x1
|
: stax winrect::x1
|
||||||
|
|
||||||
lda current_winfo::options
|
lda current_winfo::options
|
||||||
and #MGTK::option_dialog_box
|
and #MGTK::Option::dialog_box
|
||||||
bne return_winrect
|
bne return_winrect
|
||||||
|
|
||||||
lda winrect::y1
|
lda winrect::y1
|
||||||
|
@ -7145,7 +7145,7 @@ get_rect:
|
||||||
jsr fill_and_frame_rect
|
jsr fill_and_frame_rect
|
||||||
|
|
||||||
lda current_winfo::options
|
lda current_winfo::options
|
||||||
and #MGTK::option_dialog_box
|
and #MGTK::Option::dialog_box
|
||||||
bne no_titlebar
|
bne no_titlebar
|
||||||
|
|
||||||
jsr get_wintitlebar_rect
|
jsr get_wintitlebar_rect
|
||||||
|
@ -7172,7 +7172,7 @@ no_vert_scroll:
|
||||||
jsr frame_winrect
|
jsr frame_winrect
|
||||||
|
|
||||||
: lda current_winfo::options
|
: lda current_winfo::options
|
||||||
and #MGTK::option_grow_box
|
and #MGTK::Option::grow_box
|
||||||
beq :+
|
beq :+
|
||||||
|
|
||||||
jsr get_win_growboxrect
|
jsr get_win_growboxrect
|
||||||
|
@ -7235,11 +7235,11 @@ stripes_pattern_alt := *+1
|
||||||
jsr set_fill_mode
|
jsr set_fill_mode
|
||||||
|
|
||||||
lda current_winfo::options
|
lda current_winfo::options
|
||||||
and #MGTK::option_go_away_box
|
and #MGTK::Option::go_away_box
|
||||||
beq no_goaway
|
beq no_goaway
|
||||||
|
|
||||||
lda current_winfo::options
|
lda current_winfo::options
|
||||||
and #MGTK::option_dialog_box
|
and #MGTK::Option::dialog_box
|
||||||
bne no_goaway
|
bne no_goaway
|
||||||
|
|
||||||
jsr get_wingoaway_rect
|
jsr get_wingoaway_rect
|
||||||
|
@ -7266,7 +7266,7 @@ stripes_pattern_alt := *+1
|
||||||
|
|
||||||
no_goaway:
|
no_goaway:
|
||||||
lda current_winfo::options
|
lda current_winfo::options
|
||||||
and #MGTK::option_dialog_box
|
and #MGTK::Option::dialog_box
|
||||||
bne no_titlebar
|
bne no_titlebar
|
||||||
|
|
||||||
jsr get_wintitlebar_rect
|
jsr get_wintitlebar_rect
|
||||||
|
@ -7282,7 +7282,7 @@ no_goaway:
|
||||||
: tay
|
: tay
|
||||||
|
|
||||||
lda current_winfo::options
|
lda current_winfo::options
|
||||||
and #MGTK::option_go_away_box
|
and #MGTK::Option::go_away_box
|
||||||
bne has_goaway
|
bne has_goaway
|
||||||
|
|
||||||
tya
|
tya
|
||||||
|
@ -7345,7 +7345,7 @@ no_titlebar:
|
||||||
:
|
:
|
||||||
pha
|
pha
|
||||||
lda current_winfo::options
|
lda current_winfo::options
|
||||||
and #MGTK::option_grow_box
|
and #MGTK::Option::grow_box
|
||||||
bne :+
|
bne :+
|
||||||
|
|
||||||
bit current_winfo::hscroll
|
bit current_winfo::hscroll
|
||||||
|
@ -7388,7 +7388,7 @@ no_vscroll:
|
||||||
:
|
:
|
||||||
pha
|
pha
|
||||||
lda current_winfo::options
|
lda current_winfo::options
|
||||||
and #MGTK::option_grow_box
|
and #MGTK::Option::grow_box
|
||||||
bne :+
|
bne :+
|
||||||
|
|
||||||
bit current_winfo::vscroll
|
bit current_winfo::vscroll
|
||||||
|
@ -7436,7 +7436,7 @@ no_hscrollbar:
|
||||||
jsr get_window
|
jsr get_window
|
||||||
|
|
||||||
: lda current_winfo::options
|
: lda current_winfo::options
|
||||||
and #MGTK::option_grow_box
|
and #MGTK::Option::grow_box
|
||||||
beq ret
|
beq ret
|
||||||
|
|
||||||
jsr get_win_growboxrect
|
jsr get_win_growboxrect
|
||||||
|
@ -7518,7 +7518,7 @@ window_id: .byte 0
|
||||||
MGTK_CALL MGTK::InRect, test_rect_params ; check if in menubar
|
MGTK_CALL MGTK::InRect, test_rect_params ; check if in menubar
|
||||||
beq not_menubar
|
beq not_menubar
|
||||||
|
|
||||||
lda #MGTK::area_menubar
|
lda #MGTK::Area::menubar
|
||||||
return_no_window:
|
return_no_window:
|
||||||
ldx #0
|
ldx #0
|
||||||
return_result:
|
return_result:
|
||||||
|
@ -7548,12 +7548,12 @@ loop: jsr get_winframerect
|
||||||
bne loop
|
bne loop
|
||||||
|
|
||||||
no_windows:
|
no_windows:
|
||||||
lda #MGTK::area_desktop
|
lda #MGTK::Area::desktop
|
||||||
beq return_no_window
|
beq return_no_window
|
||||||
|
|
||||||
in_window:
|
in_window:
|
||||||
lda current_winfo::options
|
lda current_winfo::options
|
||||||
and #MGTK::option_dialog_box
|
and #MGTK::Option::dialog_box
|
||||||
bne in_content
|
bne in_content
|
||||||
|
|
||||||
jsr get_wintitlebar_rect
|
jsr get_wintitlebar_rect
|
||||||
|
@ -7564,16 +7564,16 @@ in_window:
|
||||||
bne :+
|
bne :+
|
||||||
|
|
||||||
lda current_winfo::options
|
lda current_winfo::options
|
||||||
and #MGTK::option_go_away_box
|
and #MGTK::Option::go_away_box
|
||||||
beq :+
|
beq :+
|
||||||
|
|
||||||
jsr get_wingoaway_rect
|
jsr get_wingoaway_rect
|
||||||
jsr in_winrect
|
jsr in_winrect
|
||||||
beq :+
|
beq :+
|
||||||
lda #MGTK::area_close_box
|
lda #MGTK::Area::close_box
|
||||||
bne return_window
|
bne return_window
|
||||||
|
|
||||||
: lda #MGTK::area_dragbar
|
: lda #MGTK::Area::dragbar
|
||||||
bne return_window
|
bne return_window
|
||||||
|
|
||||||
in_content:
|
in_content:
|
||||||
|
@ -7581,18 +7581,18 @@ in_content:
|
||||||
bne :+
|
bne :+
|
||||||
|
|
||||||
lda current_winfo::options
|
lda current_winfo::options
|
||||||
and #MGTK::option_grow_box
|
and #MGTK::Option::grow_box
|
||||||
beq :+
|
beq :+
|
||||||
|
|
||||||
jsr get_win_growboxrect
|
jsr get_win_growboxrect
|
||||||
jsr in_winrect
|
jsr in_winrect
|
||||||
beq :+
|
beq :+
|
||||||
lda #MGTK::area_grow_box
|
lda #MGTK::Area::grow_box
|
||||||
return_window:
|
return_window:
|
||||||
ldx current_winfo::id
|
ldx current_winfo::id
|
||||||
bne return_result
|
bne return_result
|
||||||
|
|
||||||
: lda #MGTK::area_content
|
: lda #MGTK::Area::content
|
||||||
bne return_window
|
bne return_window
|
||||||
|
|
||||||
not_selected:
|
not_selected:
|
||||||
|
@ -7613,12 +7613,12 @@ not_selected:
|
||||||
ldy #MGTK::Winfo::window_id
|
ldy #MGTK::Winfo::window_id
|
||||||
lda (window),y
|
lda (window),y
|
||||||
bne :+
|
bne :+
|
||||||
exit_call MGTK::error_window_id_required
|
exit_call MGTK::Error::window_id_required
|
||||||
|
|
||||||
: sta win_id
|
: sta win_id
|
||||||
jsr window_by_id
|
jsr window_by_id
|
||||||
beq :+
|
beq :+
|
||||||
exit_call MGTK::error_window_already_exists
|
exit_call MGTK::Error::window_already_exists
|
||||||
|
|
||||||
: copy16 params_addr, window
|
: copy16 params_addr, window
|
||||||
|
|
||||||
|
@ -7751,7 +7751,7 @@ update_port:
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
err_obscured:
|
err_obscured:
|
||||||
exit_call MGTK::error_window_obscured
|
exit_call MGTK::Error::window_obscured
|
||||||
|
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
;;; EndUpdate
|
;;; EndUpdate
|
||||||
|
@ -7935,7 +7935,7 @@ toggle: sta in_close_box
|
||||||
jsr ShowCursorImpl
|
jsr ShowCursorImpl
|
||||||
|
|
||||||
loop: jsr get_and_return_event
|
loop: jsr get_and_return_event
|
||||||
cmp #MGTK::event_kind_button_up
|
cmp #MGTK::EventKind::button_up
|
||||||
beq :+
|
beq :+
|
||||||
|
|
||||||
MGTK_CALL MGTK::MoveTo, set_pos_params
|
MGTK_CALL MGTK::MoveTo, set_pos_params
|
||||||
|
@ -8034,7 +8034,7 @@ loop: jsr get_window
|
||||||
|
|
||||||
no_change:
|
no_change:
|
||||||
jsr get_and_return_event
|
jsr get_and_return_event
|
||||||
cmp #MGTK::event_kind_button_up
|
cmp #MGTK::EventKind::button_up
|
||||||
bne dragging
|
bne dragging
|
||||||
|
|
||||||
jsr frame_winrect
|
jsr frame_winrect
|
||||||
|
@ -8294,7 +8294,7 @@ loop: jsr put_event
|
||||||
bcs plp_ret
|
bcs plp_ret
|
||||||
tax
|
tax
|
||||||
|
|
||||||
lda #MGTK::event_kind_update
|
lda #MGTK::EventKind::update
|
||||||
sta eventbuf::kind,x
|
sta eventbuf::kind,x
|
||||||
lda current_winfo::id
|
lda current_winfo::id
|
||||||
sta eventbuf::window_id,x
|
sta eventbuf::window_id,x
|
||||||
|
@ -8458,14 +8458,14 @@ activate: .byte 0
|
||||||
|
|
||||||
|
|
||||||
lda which_control
|
lda which_control
|
||||||
cmp #MGTK::ctl_vertical_scroll_bar
|
cmp #MGTK::Ctl::vertical_scroll_bar
|
||||||
bne :+
|
bne :+
|
||||||
|
|
||||||
lda #which_control_vert
|
lda #which_control_vert
|
||||||
sta which_control
|
sta which_control
|
||||||
bne activate
|
bne activate
|
||||||
|
|
||||||
: cmp #MGTK::ctl_horizontal_scroll_bar
|
: cmp #MGTK::Ctl::horizontal_scroll_bar
|
||||||
bne ret
|
bne ret
|
||||||
|
|
||||||
lda #which_control_horiz
|
lda #which_control_horiz
|
||||||
|
@ -8573,7 +8573,7 @@ light_speckles_pattern:
|
||||||
dec winrect::y2+1
|
dec winrect::y2+1
|
||||||
:
|
:
|
||||||
lda current_winfo::options
|
lda current_winfo::options
|
||||||
and #MGTK::option_grow_box
|
and #MGTK::Option::grow_box
|
||||||
bne :+
|
bne :+
|
||||||
|
|
||||||
bit current_winfo::hscroll
|
bit current_winfo::hscroll
|
||||||
|
@ -8611,7 +8611,7 @@ horiz: jsr get_win_horizscrollrect
|
||||||
dec winrect::x2+1
|
dec winrect::x2+1
|
||||||
:
|
:
|
||||||
lda current_winfo::options
|
lda current_winfo::options
|
||||||
and #MGTK::option_grow_box
|
and #MGTK::Option::grow_box
|
||||||
bne :+
|
bne :+
|
||||||
|
|
||||||
bit current_winfo::vscroll
|
bit current_winfo::vscroll
|
||||||
|
@ -8701,7 +8701,7 @@ return_winrect_jmp:
|
||||||
|
|
||||||
jsr top_window
|
jsr top_window
|
||||||
bne :+
|
bne :+
|
||||||
exit_call MGTK::error_no_active_window
|
exit_call MGTK::Error::no_active_window
|
||||||
|
|
||||||
: bit current_winfo::vscroll
|
: bit current_winfo::vscroll
|
||||||
bpl no_vscroll
|
bpl no_vscroll
|
||||||
|
@ -8729,15 +8729,15 @@ return_winrect_jmp:
|
||||||
jsr in_winrect
|
jsr in_winrect
|
||||||
beq no_thumb
|
beq no_thumb
|
||||||
|
|
||||||
ldx #MGTK::part_thumb
|
ldx #MGTK::Part::thumb
|
||||||
bne vscrollbar
|
bne vscrollbar
|
||||||
|
|
||||||
in_arrows:
|
in_arrows:
|
||||||
lda #MGTK::part_up_arrow
|
lda #MGTK::Part::up_arrow
|
||||||
bne :+
|
bne :+
|
||||||
|
|
||||||
no_thumb:
|
no_thumb:
|
||||||
lda #MGTK::part_page_up
|
lda #MGTK::Part::page_up
|
||||||
: pha
|
: pha
|
||||||
jsr get_thumb_rect
|
jsr get_thumb_rect
|
||||||
pla
|
pla
|
||||||
|
@ -8748,7 +8748,7 @@ no_thumb:
|
||||||
inx ; part_down_arrow / part_page_down
|
inx ; part_down_arrow / part_page_down
|
||||||
:
|
:
|
||||||
vscrollbar:
|
vscrollbar:
|
||||||
lda #MGTK::ctl_vertical_scroll_bar
|
lda #MGTK::Ctl::vertical_scroll_bar
|
||||||
bne return_result
|
bne return_result
|
||||||
|
|
||||||
no_vscroll:
|
no_vscroll:
|
||||||
|
@ -8778,15 +8778,15 @@ no_vscroll:
|
||||||
jsr in_winrect
|
jsr in_winrect
|
||||||
beq no_hthumb
|
beq no_hthumb
|
||||||
|
|
||||||
ldx #MGTK::part_thumb
|
ldx #MGTK::Part::thumb
|
||||||
bne hscrollbar
|
bne hscrollbar
|
||||||
|
|
||||||
in_harrows:
|
in_harrows:
|
||||||
lda #MGTK::part_left_arrow
|
lda #MGTK::Part::left_arrow
|
||||||
bne :+
|
bne :+
|
||||||
|
|
||||||
no_hthumb:
|
no_hthumb:
|
||||||
lda #MGTK::part_page_left
|
lda #MGTK::Part::page_left
|
||||||
: pha
|
: pha
|
||||||
jsr get_thumb_rect
|
jsr get_thumb_rect
|
||||||
pla
|
pla
|
||||||
|
@ -8801,7 +8801,7 @@ no_hthumb:
|
||||||
: inx
|
: inx
|
||||||
|
|
||||||
hscrollbar:
|
hscrollbar:
|
||||||
lda #MGTK::ctl_horizontal_scroll_bar
|
lda #MGTK::Ctl::horizontal_scroll_bar
|
||||||
bne return_result
|
bne return_result
|
||||||
|
|
||||||
no_hscroll:
|
no_hscroll:
|
||||||
|
@ -8809,11 +8809,11 @@ no_hscroll:
|
||||||
jsr in_winrect
|
jsr in_winrect
|
||||||
beq return_dead_zone
|
beq return_dead_zone
|
||||||
|
|
||||||
lda #MGTK::ctl_not_a_control
|
lda #MGTK::Ctl::not_a_control
|
||||||
beq return_result
|
beq return_result
|
||||||
|
|
||||||
return_dead_zone:
|
return_dead_zone:
|
||||||
lda #MGTK::ctl_dead_zone
|
lda #MGTK::Ctl::dead_zone
|
||||||
return_result:
|
return_result:
|
||||||
jmp FindWindowImpl::return_result
|
jmp FindWindowImpl::return_result
|
||||||
.endproc
|
.endproc
|
||||||
|
@ -8831,25 +8831,25 @@ ctlmax: .byte 0
|
||||||
END_PARAM_BLOCK
|
END_PARAM_BLOCK
|
||||||
|
|
||||||
lda params::which_ctl
|
lda params::which_ctl
|
||||||
cmp #MGTK::ctl_vertical_scroll_bar
|
cmp #MGTK::Ctl::vertical_scroll_bar
|
||||||
bne :+
|
bne :+
|
||||||
lda #$80
|
lda #$80
|
||||||
sta params::which_ctl
|
sta params::which_ctl
|
||||||
bne got_ctl ; always
|
bne got_ctl ; always
|
||||||
|
|
||||||
: cmp #MGTK::ctl_horizontal_scroll_bar
|
: cmp #MGTK::Ctl::horizontal_scroll_bar
|
||||||
bne :+
|
bne :+
|
||||||
lda #$00
|
lda #$00
|
||||||
sta params::which_ctl
|
sta params::which_ctl
|
||||||
beq got_ctl ; always
|
beq got_ctl ; always
|
||||||
|
|
||||||
: exit_call MGTK::error_control_not_found
|
: exit_call MGTK::Error::control_not_found
|
||||||
|
|
||||||
got_ctl:
|
got_ctl:
|
||||||
jsr top_window
|
jsr top_window
|
||||||
bne :+
|
bne :+
|
||||||
|
|
||||||
exit_call MGTK::error_no_active_window
|
exit_call MGTK::Error::no_active_window
|
||||||
|
|
||||||
: ldy #MGTK::Winfo::hthumbmax
|
: ldy #MGTK::Winfo::hthumbmax
|
||||||
bit params::which_ctl
|
bit params::which_ctl
|
||||||
|
@ -8881,21 +8881,21 @@ thumbmoved: .byte 0
|
||||||
|
|
||||||
|
|
||||||
lda params::which_ctl
|
lda params::which_ctl
|
||||||
cmp #MGTK::ctl_vertical_scroll_bar
|
cmp #MGTK::Ctl::vertical_scroll_bar
|
||||||
bne :+
|
bne :+
|
||||||
|
|
||||||
lda #which_control_vert
|
lda #which_control_vert
|
||||||
sta params::which_ctl
|
sta params::which_ctl
|
||||||
bne got_ctl ; always
|
bne got_ctl ; always
|
||||||
|
|
||||||
: cmp #MGTK::ctl_horizontal_scroll_bar
|
: cmp #MGTK::Ctl::horizontal_scroll_bar
|
||||||
bne :+
|
bne :+
|
||||||
|
|
||||||
lda #which_control_horiz
|
lda #which_control_horiz
|
||||||
sta params::which_ctl
|
sta params::which_ctl
|
||||||
beq got_ctl ; always
|
beq got_ctl ; always
|
||||||
|
|
||||||
: exit_call MGTK::error_control_not_found
|
: exit_call MGTK::Error::control_not_found
|
||||||
|
|
||||||
got_ctl:lda params::which_ctl
|
got_ctl:lda params::which_ctl
|
||||||
sta which_control
|
sta which_control
|
||||||
|
@ -8909,7 +8909,7 @@ got_ctl:lda params::which_ctl
|
||||||
|
|
||||||
jsr top_window
|
jsr top_window
|
||||||
bne :+
|
bne :+
|
||||||
exit_call MGTK::error_no_active_window
|
exit_call MGTK::Error::no_active_window
|
||||||
|
|
||||||
: jsr get_thumb_rect
|
: jsr get_thumb_rect
|
||||||
jsr save_params_and_stack
|
jsr save_params_and_stack
|
||||||
|
@ -8926,7 +8926,7 @@ drag_loop:
|
||||||
|
|
||||||
no_change:
|
no_change:
|
||||||
jsr get_and_return_event
|
jsr get_and_return_event
|
||||||
cmp #MGTK::event_kind_button_up
|
cmp #MGTK::EventKind::button_up
|
||||||
beq drag_done
|
beq drag_done
|
||||||
|
|
||||||
jsr check_if_changed
|
jsr check_if_changed
|
||||||
|
@ -9137,25 +9137,25 @@ thumbpos: .byte 0
|
||||||
|
|
||||||
|
|
||||||
lda which_control
|
lda which_control
|
||||||
cmp #MGTK::ctl_vertical_scroll_bar
|
cmp #MGTK::Ctl::vertical_scroll_bar
|
||||||
bne :+
|
bne :+
|
||||||
lda #which_control_vert
|
lda #which_control_vert
|
||||||
sta which_control
|
sta which_control
|
||||||
bne check_win
|
bne check_win
|
||||||
|
|
||||||
: cmp #MGTK::ctl_horizontal_scroll_bar
|
: cmp #MGTK::Ctl::horizontal_scroll_bar
|
||||||
bne bad_ctl
|
bne bad_ctl
|
||||||
lda #which_control_horiz
|
lda #which_control_horiz
|
||||||
sta which_control
|
sta which_control
|
||||||
beq check_win
|
beq check_win
|
||||||
|
|
||||||
bad_ctl:
|
bad_ctl:
|
||||||
exit_call MGTK::error_control_not_found
|
exit_call MGTK::Error::control_not_found
|
||||||
|
|
||||||
check_win:
|
check_win:
|
||||||
jsr top_window
|
jsr top_window
|
||||||
bne :+
|
bne :+
|
||||||
exit_call MGTK::error_no_active_window
|
exit_call MGTK::Error::no_active_window
|
||||||
|
|
||||||
: ldy #MGTK::Winfo::hthumbpos
|
: ldy #MGTK::Winfo::hthumbpos
|
||||||
bit which_control
|
bit which_control
|
||||||
|
@ -9665,7 +9665,7 @@ uploop: dec sel_menu_item_index
|
||||||
jsr get_menu_item
|
jsr get_menu_item
|
||||||
|
|
||||||
lda curmenuitem::options
|
lda curmenuitem::options
|
||||||
and #MGTK::menuopt_disable_flag | MGTK::menuopt_item_is_filler
|
and #MGTK::MenuOpt::disable_flag | MGTK::MenuOpt::item_is_filler
|
||||||
bne uploop
|
bne uploop
|
||||||
|
|
||||||
: jmp kbd_menu_select::position_menu_item
|
: jmp kbd_menu_select::position_menu_item
|
||||||
|
@ -9691,7 +9691,7 @@ downloop:
|
||||||
dex
|
dex
|
||||||
jsr get_menu_item
|
jsr get_menu_item
|
||||||
lda curmenuitem::options
|
lda curmenuitem::options
|
||||||
and #MGTK::menuopt_disable_flag | MGTK::menuopt_item_is_filler
|
and #MGTK::MenuOpt::disable_flag | MGTK::MenuOpt::item_is_filler
|
||||||
bne downloop
|
bne downloop
|
||||||
|
|
||||||
: jmp kbd_menu_select::position_menu_item
|
: jmp kbd_menu_select::position_menu_item
|
||||||
|
@ -9755,7 +9755,7 @@ nope: jsr kbd_menu_by_shortcut
|
||||||
bmi fail
|
bmi fail
|
||||||
|
|
||||||
lda curmenuitem::options
|
lda curmenuitem::options
|
||||||
and #MGTK::menuopt_disable_flag | MGTK::menuopt_item_is_filler
|
and #MGTK::MenuOpt::disable_flag | MGTK::MenuOpt::item_is_filler
|
||||||
bne fail
|
bne fail
|
||||||
|
|
||||||
lda curmenu::menu_id
|
lda curmenu::menu_id
|
||||||
|
@ -9813,7 +9813,7 @@ fail: clc
|
||||||
bpl do_drag
|
bpl do_drag
|
||||||
|
|
||||||
lda current_winfo::options
|
lda current_winfo::options
|
||||||
and #MGTK::option_grow_box
|
and #MGTK::Option::grow_box
|
||||||
beq no_grow
|
beq no_grow
|
||||||
|
|
||||||
ldx #0
|
ldx #0
|
||||||
|
@ -9856,18 +9856,18 @@ fail: clc
|
||||||
no_grow:
|
no_grow:
|
||||||
lda #0
|
lda #0
|
||||||
sta kbd_mouse_state
|
sta kbd_mouse_state
|
||||||
lda #MGTK::error_window_not_resizable
|
lda #MGTK::Error::window_not_resizable
|
||||||
plp
|
plp
|
||||||
jmp exit_with_a
|
jmp exit_with_a
|
||||||
|
|
||||||
do_drag:
|
do_drag:
|
||||||
lda current_winfo::options
|
lda current_winfo::options
|
||||||
and #MGTK::option_dialog_box
|
and #MGTK::Option::dialog_box
|
||||||
beq no_dialog
|
beq no_dialog
|
||||||
|
|
||||||
lda #0
|
lda #0
|
||||||
sta kbd_mouse_state
|
sta kbd_mouse_state
|
||||||
exit_call MGTK::error_window_not_draggable
|
exit_call MGTK::Error::window_not_draggable
|
||||||
|
|
||||||
no_dialog:
|
no_dialog:
|
||||||
ldx #0
|
ldx #0
|
||||||
|
@ -10080,7 +10080,7 @@ not_left:
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
.proc set_input_params ; 1 byte shorter than normal, since KEY
|
.proc set_input_params ; 1 byte shorter than normal, since KEY
|
||||||
state: .byte MGTK::event_kind_key_down
|
state: .byte MGTK::EventKind::key_down
|
||||||
key: .byte 0
|
key: .byte 0
|
||||||
modifiers:
|
modifiers:
|
||||||
.byte 0
|
.byte 0
|
||||||
|
|
|
@ -206,10 +206,10 @@ grafport_win: .res .sizeof(MGTK::GrafPort), 0
|
||||||
|
|
||||||
.proc winfo_dialog
|
.proc winfo_dialog
|
||||||
window_id: .byte 1
|
window_id: .byte 1
|
||||||
options: .byte MGTK::option_dialog_box
|
options: .byte MGTK::Option::dialog_box
|
||||||
title: .addr 0
|
title: .addr 0
|
||||||
hscroll: .byte MGTK::scroll_option_none
|
hscroll: .byte MGTK::Scroll::option_none
|
||||||
vscroll: .byte MGTK::scroll_option_none
|
vscroll: .byte MGTK::Scroll::option_none
|
||||||
hthumbmax: .byte 0
|
hthumbmax: .byte 0
|
||||||
hthumbpos: .byte 0
|
hthumbpos: .byte 0
|
||||||
vthumbmax: .byte 0
|
vthumbmax: .byte 0
|
||||||
|
@ -238,10 +238,10 @@ nextwinfo: .addr 0
|
||||||
|
|
||||||
.proc winfo_drive_select
|
.proc winfo_drive_select
|
||||||
window_id: .byte $02
|
window_id: .byte $02
|
||||||
options: .byte MGTK::option_dialog_box
|
options: .byte MGTK::Option::dialog_box
|
||||||
title: .addr 0
|
title: .addr 0
|
||||||
hscroll: .byte MGTK::scroll_option_none
|
hscroll: .byte MGTK::Scroll::option_none
|
||||||
vscroll: .byte MGTK::scroll_option_present
|
vscroll: .byte MGTK::Scroll::option_present
|
||||||
hthumbmax: .byte 0
|
hthumbmax: .byte 0
|
||||||
hthumbpos: .byte 0
|
hthumbpos: .byte 0
|
||||||
vthumbmax: .byte 3
|
vthumbmax: .byte 3
|
||||||
|
@ -1086,11 +1086,11 @@ LD998: bit LD368
|
||||||
sta LD368
|
sta LD368
|
||||||
LD9A7: MGTK_RELAY_CALL2 MGTK::GetEvent, event_params
|
LD9A7: MGTK_RELAY_CALL2 MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_down
|
cmp #MGTK::EventKind::button_down
|
||||||
bne LD9BA
|
bne LD9BA
|
||||||
jmp LDAB1
|
jmp LDAB1
|
||||||
|
|
||||||
LD9BA: cmp #MGTK::event_kind_key_down
|
LD9BA: cmp #MGTK::EventKind::key_down
|
||||||
bne LD998
|
bne LD998
|
||||||
jmp LD9D5
|
jmp LD9D5
|
||||||
|
|
||||||
|
@ -1348,7 +1348,7 @@ LDCAC: lda #$00
|
||||||
sta LDD37
|
sta LDD37
|
||||||
LDCB1: MGTK_RELAY_CALL2 MGTK::GetEvent, event_params
|
LDCB1: MGTK_RELAY_CALL2 MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_up
|
cmp #MGTK::EventKind::button_up
|
||||||
beq LDD14
|
beq LDD14
|
||||||
lda winfo_dialog::window_id
|
lda winfo_dialog::window_id
|
||||||
sta screentowindow_window_id
|
sta screentowindow_window_id
|
||||||
|
@ -1388,7 +1388,7 @@ LDD38: lda #$00
|
||||||
sta LDDC3
|
sta LDDC3
|
||||||
LDD3D: MGTK_RELAY_CALL2 MGTK::GetEvent, event_params
|
LDD3D: MGTK_RELAY_CALL2 MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_up
|
cmp #MGTK::EventKind::button_up
|
||||||
beq LDDA0
|
beq LDDA0
|
||||||
lda winfo_dialog::window_id
|
lda winfo_dialog::window_id
|
||||||
sta screentowindow_window_id
|
sta screentowindow_window_id
|
||||||
|
@ -2853,11 +2853,11 @@ LED42: jmp LED79
|
||||||
|
|
||||||
MGTK_RELAY_CALL2 MGTK::GetEvent, event_params
|
MGTK_RELAY_CALL2 MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_down
|
cmp #MGTK::EventKind::button_down
|
||||||
bne LED58
|
bne LED58
|
||||||
jmp LEDFA
|
jmp LEDFA
|
||||||
|
|
||||||
LED58: cmp #MGTK::event_kind_key_down
|
LED58: cmp #MGTK::EventKind::key_down
|
||||||
bne LED35
|
bne LED35
|
||||||
lda event_key
|
lda event_key
|
||||||
and #CHAR_MASK
|
and #CHAR_MASK
|
||||||
|
@ -2971,7 +2971,7 @@ LEE88: jsr LF0DF
|
||||||
sta LEEF7
|
sta LEEF7
|
||||||
LEE99: MGTK_RELAY_CALL2 MGTK::GetEvent, event_params
|
LEE99: MGTK_RELAY_CALL2 MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_up
|
cmp #MGTK::EventKind::button_up
|
||||||
beq LEEEA
|
beq LEEEA
|
||||||
jsr LF0B8
|
jsr LF0B8
|
||||||
MGTK_RELAY_CALL2 MGTK::MoveTo, event_coords
|
MGTK_RELAY_CALL2 MGTK::MoveTo, event_coords
|
||||||
|
@ -3008,7 +3008,7 @@ LEEF8: jsr LF0DF
|
||||||
sta LEF67
|
sta LEF67
|
||||||
LEF09: MGTK_RELAY_CALL2 MGTK::GetEvent, event_params
|
LEF09: MGTK_RELAY_CALL2 MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_up
|
cmp #MGTK::EventKind::button_up
|
||||||
beq LEF5A
|
beq LEF5A
|
||||||
jsr LF0B8
|
jsr LF0B8
|
||||||
MGTK_RELAY_CALL2 MGTK::MoveTo, event_coords
|
MGTK_RELAY_CALL2 MGTK::MoveTo, event_coords
|
||||||
|
@ -3045,7 +3045,7 @@ LEF68: lda #$00
|
||||||
MGTK_RELAY_CALL2 MGTK::PaintRect, ok_try_again_rect
|
MGTK_RELAY_CALL2 MGTK::PaintRect, ok_try_again_rect
|
||||||
LEF79: MGTK_RELAY_CALL2 MGTK::GetEvent, event_params
|
LEF79: MGTK_RELAY_CALL2 MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_up
|
cmp #MGTK::EventKind::button_up
|
||||||
beq LEFCA
|
beq LEFCA
|
||||||
jsr LF0B8
|
jsr LF0B8
|
||||||
MGTK_RELAY_CALL2 MGTK::MoveTo, event_coords
|
MGTK_RELAY_CALL2 MGTK::MoveTo, event_coords
|
||||||
|
@ -3082,7 +3082,7 @@ LEFD8: lda #$00
|
||||||
MGTK_RELAY_CALL2 MGTK::PaintRect, no_rect
|
MGTK_RELAY_CALL2 MGTK::PaintRect, no_rect
|
||||||
LEFE9: MGTK_RELAY_CALL2 MGTK::GetEvent, event_params
|
LEFE9: MGTK_RELAY_CALL2 MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_up
|
cmp #MGTK::EventKind::button_up
|
||||||
beq LF03A
|
beq LF03A
|
||||||
jsr LF0B8
|
jsr LF0B8
|
||||||
MGTK_RELAY_CALL2 MGTK::MoveTo, event_coords
|
MGTK_RELAY_CALL2 MGTK::MoveTo, event_coords
|
||||||
|
@ -3119,7 +3119,7 @@ LF048: lda #$00
|
||||||
MGTK_RELAY_CALL2 MGTK::PaintRect, yes_rect
|
MGTK_RELAY_CALL2 MGTK::PaintRect, yes_rect
|
||||||
LF059: MGTK_RELAY_CALL2 MGTK::GetEvent, event_params
|
LF059: MGTK_RELAY_CALL2 MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_up
|
cmp #MGTK::EventKind::button_up
|
||||||
beq LF0AA
|
beq LF0AA
|
||||||
jsr LF0B8
|
jsr LF0B8
|
||||||
MGTK_RELAY_CALL2 MGTK::MoveTo, event_coords
|
MGTK_RELAY_CALL2 MGTK::MoveTo, event_coords
|
||||||
|
@ -3266,7 +3266,7 @@ LF192: lda LD41D
|
||||||
beq LF1C9
|
beq LF1C9
|
||||||
MGTK_RELAY_CALL2 MGTK::GetEvent, event_params
|
MGTK_RELAY_CALL2 MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_key_down
|
cmp #MGTK::EventKind::key_down
|
||||||
bne LF192
|
bne LF192
|
||||||
lda event_key
|
lda event_key
|
||||||
cmp #CHAR_ESCAPE
|
cmp #CHAR_ESCAPE
|
||||||
|
|
|
@ -553,7 +553,7 @@ L953A: lda #$00
|
||||||
sta L95BF
|
sta L95BF
|
||||||
L953F: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
L953F: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_up
|
cmp #MGTK::EventKind::button_up
|
||||||
beq L95A2
|
beq L95A2
|
||||||
lda winfo_entry_picker
|
lda winfo_entry_picker
|
||||||
sta screentowindow_window_id
|
sta screentowindow_window_id
|
||||||
|
@ -591,7 +591,7 @@ L95C0: lda #$00
|
||||||
sta L9645
|
sta L9645
|
||||||
L95C5: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
L95C5: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_up
|
cmp #MGTK::EventKind::button_up
|
||||||
beq L9628
|
beq L9628
|
||||||
lda winfo_entry_picker
|
lda winfo_entry_picker
|
||||||
sta screentowindow_window_id
|
sta screentowindow_window_id
|
||||||
|
@ -627,11 +627,11 @@ L9630: MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||||
L9645: .byte 0
|
L9645: .byte 0
|
||||||
L9646: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
L9646: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_down
|
cmp #MGTK::EventKind::button_down
|
||||||
bne L9659
|
bne L9659
|
||||||
jmp L9660
|
jmp L9660
|
||||||
|
|
||||||
L9659: cmp #MGTK::event_kind_key_down
|
L9659: cmp #MGTK::EventKind::key_down
|
||||||
bne L9646
|
bne L9646
|
||||||
jmp L9822
|
jmp L9822
|
||||||
|
|
||||||
|
@ -640,7 +640,7 @@ L9660: MGTK_RELAY_CALL MGTK::FindWindow, findwindow_params
|
||||||
bne L9671
|
bne L9671
|
||||||
return #$FF
|
return #$FF
|
||||||
|
|
||||||
L9671: cmp #MGTK::area_content
|
L9671: cmp #MGTK::Area::content
|
||||||
beq L9678
|
beq L9678
|
||||||
return #$FF
|
return #$FF
|
||||||
|
|
||||||
|
|
|
@ -83,12 +83,12 @@ L5106: bit LD8EC
|
||||||
sta prompt_ip_counter
|
sta prompt_ip_counter
|
||||||
: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_down
|
cmp #MGTK::EventKind::button_down
|
||||||
bne :+
|
bne :+
|
||||||
jsr L51AF
|
jsr L51AF
|
||||||
jmp L5106
|
jmp L5106
|
||||||
|
|
||||||
: cmp #MGTK::event_kind_key_down
|
: cmp #MGTK::EventKind::key_down
|
||||||
bne :+
|
bne :+
|
||||||
jsr L59B9
|
jsr L59B9
|
||||||
: MGTK_RELAY_CALL MGTK::FindWindow, findwindow_params
|
: MGTK_RELAY_CALL MGTK::FindWindow, findwindow_params
|
||||||
|
@ -131,7 +131,7 @@ L51AF: MGTK_RELAY_CALL MGTK::FindWindow, findwindow_params
|
||||||
lda findwindow_which_area
|
lda findwindow_which_area
|
||||||
bne :+
|
bne :+
|
||||||
rts
|
rts
|
||||||
: cmp #MGTK::area_content
|
: cmp #MGTK::Area::content
|
||||||
bne :+
|
bne :+
|
||||||
jmp L51C7
|
jmp L51C7
|
||||||
rts ; ???
|
rts ; ???
|
||||||
|
@ -257,7 +257,7 @@ L531F: bit L5105
|
||||||
MGTK_RELAY_CALL MGTK::FindControl, findcontrol_params
|
MGTK_RELAY_CALL MGTK::FindControl, findcontrol_params
|
||||||
lda findcontrol_which_ctl
|
lda findcontrol_which_ctl
|
||||||
beq L5341
|
beq L5341
|
||||||
cmp #MGTK::ctl_vertical_scroll_bar
|
cmp #MGTK::Ctl::vertical_scroll_bar
|
||||||
bne L5340
|
bne L5340
|
||||||
lda winfo_entrydlg_file_picker_vscroll
|
lda winfo_entrydlg_file_picker_vscroll
|
||||||
and #$01
|
and #$01
|
||||||
|
@ -359,23 +359,23 @@ L5457: lda $D920
|
||||||
L5468: rts
|
L5468: rts
|
||||||
|
|
||||||
L5469: lda findcontrol_which_part
|
L5469: lda findcontrol_which_part
|
||||||
cmp #MGTK::part_up_arrow
|
cmp #MGTK::Part::up_arrow
|
||||||
bne L5473
|
bne L5473
|
||||||
jmp L550A
|
jmp L550A
|
||||||
|
|
||||||
L5473: cmp #MGTK::part_down_arrow
|
L5473: cmp #MGTK::Part::down_arrow
|
||||||
bne L547A
|
bne L547A
|
||||||
jmp L5533
|
jmp L5533
|
||||||
|
|
||||||
L547A: cmp #MGTK::part_page_up
|
L547A: cmp #MGTK::Part::page_up
|
||||||
bne L5481
|
bne L5481
|
||||||
jmp L54BA
|
jmp L54BA
|
||||||
|
|
||||||
L5481: cmp #MGTK::part_page_down
|
L5481: cmp #MGTK::Part::page_down
|
||||||
bne L5488
|
bne L5488
|
||||||
jmp L54DF
|
jmp L54DF
|
||||||
|
|
||||||
L5488: lda #MGTK::ctl_vertical_scroll_bar
|
L5488: lda #MGTK::Ctl::vertical_scroll_bar
|
||||||
sta trackthumb_params
|
sta trackthumb_params
|
||||||
MGTK_RELAY_CALL MGTK::TrackThumb, trackthumb_params
|
MGTK_RELAY_CALL MGTK::TrackThumb, trackthumb_params
|
||||||
lda trackthumb_thumbmoved
|
lda trackthumb_thumbmoved
|
||||||
|
@ -383,7 +383,7 @@ L5488: lda #MGTK::ctl_vertical_scroll_bar
|
||||||
rts
|
rts
|
||||||
: lda trackthumb_thumbpos
|
: lda trackthumb_thumbpos
|
||||||
sta updatethumb_thumbpos
|
sta updatethumb_thumbpos
|
||||||
lda #MGTK::ctl_vertical_scroll_bar
|
lda #MGTK::Ctl::vertical_scroll_bar
|
||||||
sta updatethumb_which_ctl
|
sta updatethumb_which_ctl
|
||||||
MGTK_RELAY_CALL MGTK::UpdateThumb, updatethumb_params
|
MGTK_RELAY_CALL MGTK::UpdateThumb, updatethumb_params
|
||||||
lda updatethumb_stash
|
lda updatethumb_stash
|
||||||
|
@ -397,7 +397,7 @@ L54BA: lda winfo_entrydlg_file_picker_vthumbpos
|
||||||
bpl L54C4
|
bpl L54C4
|
||||||
lda #$00
|
lda #$00
|
||||||
L54C4: sta updatethumb_thumbpos
|
L54C4: sta updatethumb_thumbpos
|
||||||
lda #MGTK::ctl_vertical_scroll_bar
|
lda #MGTK::Ctl::vertical_scroll_bar
|
||||||
sta updatethumb_which_ctl
|
sta updatethumb_which_ctl
|
||||||
MGTK_RELAY_CALL MGTK::UpdateThumb, updatethumb_params
|
MGTK_RELAY_CALL MGTK::UpdateThumb, updatethumb_params
|
||||||
lda updatethumb_thumbpos
|
lda updatethumb_thumbpos
|
||||||
|
@ -413,7 +413,7 @@ L54DF: lda winfo_entrydlg_file_picker_vthumbpos
|
||||||
bcc L54EF
|
bcc L54EF
|
||||||
lda $177F
|
lda $177F
|
||||||
L54EF: sta updatethumb_thumbpos
|
L54EF: sta updatethumb_thumbpos
|
||||||
lda #MGTK::ctl_vertical_scroll_bar
|
lda #MGTK::Ctl::vertical_scroll_bar
|
||||||
sta updatethumb_which_ctl
|
sta updatethumb_which_ctl
|
||||||
MGTK_RELAY_CALL MGTK::UpdateThumb, updatethumb_params
|
MGTK_RELAY_CALL MGTK::UpdateThumb, updatethumb_params
|
||||||
lda updatethumb_thumbpos
|
lda updatethumb_thumbpos
|
||||||
|
@ -428,7 +428,7 @@ L550A: lda winfo_entrydlg_file_picker_vthumbpos
|
||||||
L5510: sec
|
L5510: sec
|
||||||
sbc #$01
|
sbc #$01
|
||||||
sta updatethumb_thumbpos
|
sta updatethumb_thumbpos
|
||||||
lda #MGTK::ctl_vertical_scroll_bar
|
lda #MGTK::Ctl::vertical_scroll_bar
|
||||||
sta updatethumb_which_ctl
|
sta updatethumb_which_ctl
|
||||||
MGTK_RELAY_CALL MGTK::UpdateThumb, updatethumb_params
|
MGTK_RELAY_CALL MGTK::UpdateThumb, updatethumb_params
|
||||||
lda updatethumb_thumbpos
|
lda updatethumb_thumbpos
|
||||||
|
@ -445,7 +445,7 @@ L5533: lda winfo_entrydlg_file_picker_vthumbpos
|
||||||
L553C: clc
|
L553C: clc
|
||||||
adc #$01
|
adc #$01
|
||||||
sta updatethumb_thumbpos
|
sta updatethumb_thumbpos
|
||||||
lda #MGTK::ctl_vertical_scroll_bar
|
lda #MGTK::Ctl::vertical_scroll_bar
|
||||||
sta updatethumb_which_ctl
|
sta updatethumb_which_ctl
|
||||||
MGTK_RELAY_CALL MGTK::UpdateThumb, updatethumb_params
|
MGTK_RELAY_CALL MGTK::UpdateThumb, updatethumb_params
|
||||||
lda updatethumb_thumbpos
|
lda updatethumb_thumbpos
|
||||||
|
@ -456,9 +456,9 @@ L553C: clc
|
||||||
|
|
||||||
L555F: MGTK_RELAY_CALL MGTK::PeekEvent, event_params
|
L555F: MGTK_RELAY_CALL MGTK::PeekEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_down
|
cmp #MGTK::EventKind::button_down
|
||||||
beq L5576
|
beq L5576
|
||||||
cmp #MGTK::event_kind_drag
|
cmp #MGTK::EventKind::drag
|
||||||
beq L5576
|
beq L5576
|
||||||
pla
|
pla
|
||||||
pla
|
pla
|
||||||
|
@ -474,7 +474,7 @@ L5576: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||||
rts
|
rts
|
||||||
|
|
||||||
: lda findwindow_which_area
|
: lda findwindow_which_area
|
||||||
cmp #MGTK::area_content
|
cmp #MGTK::Area::content
|
||||||
beq :+
|
beq :+
|
||||||
pla
|
pla
|
||||||
pla
|
pla
|
||||||
|
@ -482,14 +482,14 @@ L5576: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||||
|
|
||||||
: MGTK_RELAY_CALL MGTK::FindControl, findcontrol_params
|
: MGTK_RELAY_CALL MGTK::FindControl, findcontrol_params
|
||||||
lda findcontrol_which_ctl
|
lda findcontrol_which_ctl
|
||||||
cmp #MGTK::ctl_vertical_scroll_bar
|
cmp #MGTK::Ctl::vertical_scroll_bar
|
||||||
beq :+
|
beq :+
|
||||||
pla
|
pla
|
||||||
pla
|
pla
|
||||||
rts
|
rts
|
||||||
|
|
||||||
: lda findcontrol_which_part
|
: lda findcontrol_which_part
|
||||||
cmp #MGTK::part_page_up
|
cmp #MGTK::Part::page_up
|
||||||
bcc L55B9
|
bcc L55B9
|
||||||
pla
|
pla
|
||||||
pla
|
pla
|
||||||
|
@ -634,7 +634,7 @@ L56E3: MGTK_RELAY_CALL MGTK::InitPort, grafport3
|
||||||
sta L577B
|
sta L577B
|
||||||
L56FB: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
L56FB: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_up
|
cmp #MGTK::EventKind::button_up
|
||||||
beq L575E
|
beq L575E
|
||||||
lda winfo_entrydlg
|
lda winfo_entrydlg
|
||||||
sta screentowindow_window_id
|
sta screentowindow_window_id
|
||||||
|
@ -677,7 +677,7 @@ L577B: .byte 0
|
||||||
sta L5801
|
sta L5801
|
||||||
L5781: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
L5781: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_up
|
cmp #MGTK::EventKind::button_up
|
||||||
beq L57E4
|
beq L57E4
|
||||||
lda winfo_entrydlg
|
lda winfo_entrydlg
|
||||||
sta screentowindow_window_id
|
sta screentowindow_window_id
|
||||||
|
@ -720,7 +720,7 @@ L5801: .byte 0
|
||||||
sta L5887
|
sta L5887
|
||||||
L5807: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
L5807: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_up
|
cmp #MGTK::EventKind::button_up
|
||||||
beq L586A
|
beq L586A
|
||||||
lda winfo_entrydlg
|
lda winfo_entrydlg
|
||||||
sta screentowindow_window_id
|
sta screentowindow_window_id
|
||||||
|
@ -763,7 +763,7 @@ L5887: .byte 0
|
||||||
sta L590D
|
sta L590D
|
||||||
L588D: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
L588D: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_up
|
cmp #MGTK::EventKind::button_up
|
||||||
beq L58F0
|
beq L58F0
|
||||||
lda winfo_entrydlg
|
lda winfo_entrydlg
|
||||||
sta screentowindow_window_id
|
sta screentowindow_window_id
|
||||||
|
@ -806,7 +806,7 @@ L590D: .byte 0
|
||||||
sta L5993
|
sta L5993
|
||||||
L5913: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
L5913: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||||
lda event_kind
|
lda event_kind
|
||||||
cmp #MGTK::event_kind_button_up
|
cmp #MGTK::EventKind::button_up
|
||||||
beq L5976
|
beq L5976
|
||||||
lda winfo_entrydlg
|
lda winfo_entrydlg
|
||||||
sta screentowindow_window_id
|
sta screentowindow_window_id
|
||||||
|
@ -1198,16 +1198,16 @@ L5C60: dec ip_blink_counter
|
||||||
sta L5CF6
|
sta L5CF6
|
||||||
lda event_kind
|
lda event_kind
|
||||||
sta L5CF5
|
sta L5CF5
|
||||||
cmp #MGTK::event_kind_no_event
|
cmp #MGTK::EventKind::no_event
|
||||||
beq L5C60
|
beq L5C60
|
||||||
cmp #MGTK::event_kind_drag
|
cmp #MGTK::EventKind::drag
|
||||||
beq L5C60
|
beq L5C60
|
||||||
cmp #MGTK::event_kind_button_up
|
cmp #MGTK::EventKind::button_up
|
||||||
bne L5C96
|
bne L5C96
|
||||||
MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||||
jmp L5C60
|
jmp L5C60
|
||||||
|
|
||||||
L5C96: cmp #MGTK::event_kind_button_down
|
L5C96: cmp #MGTK::EventKind::button_down
|
||||||
bne L5CA6
|
bne L5CA6
|
||||||
MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
||||||
return #$00
|
return #$00
|
||||||
|
@ -1712,7 +1712,7 @@ L6163: sta L61B0
|
||||||
lda $177F
|
lda $177F
|
||||||
cmp #$0A
|
cmp #$0A
|
||||||
bcs L6181
|
bcs L6181
|
||||||
lda #MGTK::ctl_vertical_scroll_bar
|
lda #MGTK::Ctl::vertical_scroll_bar
|
||||||
sta activatectl_which_ctl
|
sta activatectl_which_ctl
|
||||||
lda #MGTK::activatectl_deactivate
|
lda #MGTK::activatectl_deactivate
|
||||||
sta activatectl_activate
|
sta activatectl_activate
|
||||||
|
@ -1721,15 +1721,15 @@ L6163: sta L61B0
|
||||||
|
|
||||||
L6181: lda $177F
|
L6181: lda $177F
|
||||||
sta winfo_entrydlg_file_picker_vthumbmax
|
sta winfo_entrydlg_file_picker_vthumbmax
|
||||||
.assert MGTK::ctl_vertical_scroll_bar = MGTK::activatectl_activate, error, "need to match"
|
.assert MGTK::Ctl::vertical_scroll_bar = MGTK::activatectl_activate, error, "need to match"
|
||||||
lda #MGTK::ctl_vertical_scroll_bar
|
lda #MGTK::Ctl::vertical_scroll_bar
|
||||||
sta activatectl_which_ctl
|
sta activatectl_which_ctl
|
||||||
sta activatectl_activate
|
sta activatectl_activate
|
||||||
MGTK_RELAY_CALL MGTK::ActivateCtl, activatectl_params
|
MGTK_RELAY_CALL MGTK::ActivateCtl, activatectl_params
|
||||||
lda L61B0
|
lda L61B0
|
||||||
sta updatethumb_thumbpos
|
sta updatethumb_thumbpos
|
||||||
jsr L6227
|
jsr L6227
|
||||||
lda #MGTK::ctl_vertical_scroll_bar
|
lda #MGTK::Ctl::vertical_scroll_bar
|
||||||
sta updatethumb_which_ctl
|
sta updatethumb_which_ctl
|
||||||
MGTK_RELAY_CALL MGTK::UpdateThumb, updatethumb_params
|
MGTK_RELAY_CALL MGTK::UpdateThumb, updatethumb_params
|
||||||
rts
|
rts
|
||||||
|
|
145
mgtk.inc
145
mgtk.inc
|
@ -527,60 +527,74 @@ textbg_white := $7F
|
||||||
;;; MouseGraphics ToolKit Constants
|
;;; MouseGraphics ToolKit Constants
|
||||||
|
|
||||||
;;; Used in GetEvent
|
;;; Used in GetEvent
|
||||||
event_kind_no_event := 0 ; No mouse or keypress
|
.enum EventKind
|
||||||
event_kind_button_down := 1 ; Mouse button was depressed
|
no_event = 0 ; No mouse or keypress
|
||||||
event_kind_button_up := 2 ; Mouse button was released
|
button_down = 1 ; Mouse button was depressed
|
||||||
event_kind_key_down := 3 ; Key was pressed
|
button_up = 2 ; Mouse button was released
|
||||||
event_kind_drag := 4 ; Mouse button still down
|
key_down = 3 ; Key was pressed
|
||||||
event_kind_apple_key := 5 ; Mouse button was depressed, modifier key down
|
drag = 4 ; Mouse button still down
|
||||||
event_kind_update := 6 ; Window update needed
|
apple_key = 5 ; Mouse button was depressed, modifier key down
|
||||||
|
update = 6 ; Window update needed
|
||||||
|
.endenum
|
||||||
|
|
||||||
event_modifier_open_apple := 1 << 0
|
event_modifier_open_apple := 1 << 0
|
||||||
event_modifier_solid_apple := 1 << 1
|
event_modifier_solid_apple := 1 << 1
|
||||||
|
|
||||||
;;; Used in FindWindow
|
;;; Used in FindWindow
|
||||||
area_desktop := 0
|
.enum Area
|
||||||
area_menubar := 1
|
desktop = 0
|
||||||
area_content := 2 ; Includes scroll bars
|
menubar = 1
|
||||||
area_dragbar := 3
|
content = 2 ; Includes scroll bars
|
||||||
area_grow_box := 4
|
dragbar = 3
|
||||||
area_close_box := 5
|
grow_box = 4
|
||||||
|
close_box = 5
|
||||||
|
.endenum
|
||||||
|
|
||||||
;;; Used in FindControl, TrackThumb, UpdateThumb
|
;;; Used in FindControl, TrackThumb, UpdateThumb
|
||||||
ctl_not_a_control := 0
|
.enum Ctl
|
||||||
ctl_vertical_scroll_bar := 1
|
not_a_control = 0
|
||||||
ctl_horizontal_scroll_bar := 2
|
vertical_scroll_bar = 1
|
||||||
ctl_dead_zone := 3
|
horizontal_scroll_bar = 2
|
||||||
|
dead_zone = 3
|
||||||
|
.endenum
|
||||||
|
|
||||||
;;; Used in FindControl
|
;;; Used in FindControl
|
||||||
part_up_arrow := 1
|
.enum Part
|
||||||
part_left_arrow := 1
|
up_arrow = 1
|
||||||
part_down_arrow := 2
|
left_arrow = 1
|
||||||
part_right_arrow := 2
|
down_arrow = 2
|
||||||
part_page_up := 3
|
right_arrow = 2
|
||||||
part_page_left := 3
|
page_up = 3
|
||||||
part_page_down := 4
|
page_left = 3
|
||||||
part_page_right := 4
|
page_down = 4
|
||||||
part_thumb := 5
|
page_right = 4
|
||||||
|
thumb = 5
|
||||||
|
.endenum
|
||||||
|
|
||||||
;;; Used in OpenWindow
|
;;; Used in OpenWindow
|
||||||
option_dialog_box := 1 << 0
|
.enum Option
|
||||||
option_go_away_box := 1 << 1
|
dialog_box = 1 << 0
|
||||||
option_grow_box := 1 << 2
|
go_away_box = 1 << 1
|
||||||
|
grow_box = 1 << 2
|
||||||
|
.endenum
|
||||||
|
|
||||||
scroll_option_none := 0
|
.enum Scroll
|
||||||
scroll_option_present := 1 << 7
|
option_none = 0
|
||||||
scroll_option_thumb := 1 << 6
|
option_present = 1 << 7
|
||||||
scroll_option_active := 1 << 0
|
option_thumb = 1 << 6
|
||||||
scroll_option_normal := scroll_option_present | scroll_option_thumb | scroll_option_active
|
option_active = 1 << 0
|
||||||
|
option_normal = Scroll::option_present | Scroll::option_thumb | Scroll::option_active
|
||||||
|
.endenum
|
||||||
|
|
||||||
;;; Used in menu structs
|
;;; Used in menu structs
|
||||||
menuopt_open_apple := 1 << 0
|
.enum MenuOpt
|
||||||
menuopt_solid_apple := 1 << 1
|
open_apple = 1 << 0
|
||||||
menuopt_item_has_mark := 1 << 2
|
solid_apple = 1 << 1
|
||||||
menuopt_item_is_checked := 1 << 5
|
item_has_mark = 1 << 2
|
||||||
menuopt_item_is_filler := 1 << 6
|
item_is_checked = 1 << 5
|
||||||
menuopt_disable_flag := 1 << 7
|
item_is_filler = 1 << 6
|
||||||
|
disable_flag = 1 << 7
|
||||||
|
.endenum
|
||||||
|
|
||||||
disablemenu_enable := 0
|
disablemenu_enable := 0
|
||||||
disablemenu_disable := 1
|
disablemenu_disable := 1
|
||||||
|
@ -609,30 +623,31 @@ event_size := 5 ; any kind of event
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
;;; Errors
|
;;; Errors
|
||||||
|
|
||||||
error_empty_object := $81
|
.enum Error
|
||||||
error_bad_object := $82
|
empty_object = $81
|
||||||
error_font_too_big := $83
|
bad_object = $82
|
||||||
|
font_too_big = $83
|
||||||
error_invalid_op_sys := $90
|
|
||||||
error_no_mouse := $92
|
|
||||||
error_invalid_irq_setting := $93
|
|
||||||
error_invalid_hook := $94
|
|
||||||
error_desktop_already_initialized := $95
|
|
||||||
error_irq_in_use := $97
|
|
||||||
error_invalid_event := $98
|
|
||||||
error_event_queue_full := $99
|
|
||||||
error_menu_not_found := $9A
|
|
||||||
error_menu_item_not_found := $9B
|
|
||||||
error_insufficient_savebehind_area := $9C
|
|
||||||
error_window_already_exists := $9D
|
|
||||||
error_window_id_required := $9E
|
|
||||||
error_window_not_found := $9F
|
|
||||||
error_no_active_window := $A0
|
|
||||||
error_window_not_draggable := $A1
|
|
||||||
error_window_not_resizable := $A2
|
|
||||||
error_window_obscured := $A3
|
|
||||||
error_control_not_found := $A4
|
|
||||||
|
|
||||||
|
invalid_op_sys = $90
|
||||||
|
no_mouse = $92
|
||||||
|
invalid_irq_setting = $93
|
||||||
|
invalid_hook = $94
|
||||||
|
desktop_already_initialized = $95
|
||||||
|
irq_in_use = $97
|
||||||
|
invalid_event = $98
|
||||||
|
event_queue_full = $99
|
||||||
|
menu_not_found = $9A
|
||||||
|
menu_item_not_found = $9B
|
||||||
|
insufficient_savebehind_area = $9C
|
||||||
|
window_already_exists = $9D
|
||||||
|
window_id_required = $9E
|
||||||
|
window_not_found = $9F
|
||||||
|
no_active_window = $A0
|
||||||
|
window_not_draggable = $A1
|
||||||
|
window_not_resizable = $A2
|
||||||
|
window_obscured = $A3
|
||||||
|
control_not_found = $A4
|
||||||
|
.endenum
|
||||||
|
|
||||||
.endscope ; MGTK
|
.endscope ; MGTK
|
||||||
|
|
||||||
|
@ -737,7 +752,7 @@ end:
|
||||||
.macro DEFINE_MENU_ITEM saddr, shortcut1, shortcut2
|
.macro DEFINE_MENU_ITEM saddr, shortcut1, shortcut2
|
||||||
.if .paramcount > 1
|
.if .paramcount > 1
|
||||||
|
|
||||||
.byte MGTK::menuopt_open_apple ; option byte
|
.byte MGTK::MenuOpt::open_apple ; option byte
|
||||||
.byte 0 ; mark_char
|
.byte 0 ; mark_char
|
||||||
.byte shortcut1 ; char1
|
.byte shortcut1 ; char1
|
||||||
.byte shortcut2 ; char2
|
.byte shortcut2 ; char2
|
||||||
|
@ -755,7 +770,7 @@ end:
|
||||||
.endmacro
|
.endmacro
|
||||||
|
|
||||||
.macro DEFINE_MENU_SEPARATOR
|
.macro DEFINE_MENU_SEPARATOR
|
||||||
.byte MGTK::menuopt_item_is_filler ; option byte
|
.byte MGTK::MenuOpt::item_is_filler ; option byte
|
||||||
.byte 0 ; mark_char
|
.byte 0 ; mark_char
|
||||||
.byte 19 ; char1 - Ctrl+S for separator ???
|
.byte 19 ; char1 - Ctrl+S for separator ???
|
||||||
.byte 0 ; char2
|
.byte 0 ; char2
|
||||||
|
|
|
@ -52,7 +52,7 @@ while (<STDIN>) {
|
||||||
$_ .= ' ' while length($_) % $tab;
|
$_ .= ' ' while length($_) % $tab;
|
||||||
$_ .= ':= ' . $expression . ' ';
|
$_ .= ':= ' . $expression . ' ';
|
||||||
|
|
||||||
} elsif (m/^(\.(?:end)?(?:proc|scope|macro|struct)\b)\s*(.*)$/) {
|
} elsif (m/^(\.(?:end)?(?:proc|scope|macro|struct|enum)\b)\s*(.*)$/) {
|
||||||
|
|
||||||
# scope - flush left
|
# scope - flush left
|
||||||
my ($opcode, $arguments) = ($1 // '', $2 // '');
|
my ($opcode, $arguments) = ($1 // '', $2 // '');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user