Norman, …and another one. I just remembered when I started doing this stuff in assembler, I used the (C!)-routines that came with EasyC (available at Dillwyn’s) from the master himself as a starting point. The example there shows how a menu in an application sub window is dynamically set up in the working definition. The code goes in easy understandable steps, nicely commented and is nice to follow as it is C and comes with an explanatory document (in the EG sub-directory).
Tobias > Am 19.04.2015 um 11:06 schrieb Tobias Fröschle <[email protected]>: > > Norman, > > this is the best I could possible come up with so far (can’t find my own code > anymore…) > > These are routines Easysource includes as app win menu handling code when you > generate an application without a fixed menu. They don’t, however, cover any > of the actual list allocation tasks. > > Maybe they help a bit forward? > > Tobias > ; > ;Universal application sub-window routines > ; > asw_setr > move.l a4,-(a7) > jsr wm.smenu(a2) > move.l (a7)+,a3 > tst.l d0 > bne.s end_setr > movem.l d3-d7/a1,-(a7) > tst.l $44(a3) > bne.s cal_ctrl > tst.l -$44(a3) > beq.s end_cal > tst.l $2c(a3) > beq.s end_cal > lea awb_draw,a1 > move.l a1,-$50(a3) > clr.l -$4c(a3) > lea awb_ctrl,a1 > move.l a1,-$48(a3) > cal_ctrl > move.w $04(a3),d3 > add.w d3,d3 > addq.w #4,d3 > move.l -$1e(a3),d0 > beq.s pan_ctrl > move.l $38(a3),d7 > addq.l #2,a3 > bsr.s set_ctrl > subq.l #2,a3 > pan_ctrl > move.l -$3c(a3),d0 > beq.s end_cal > add.w d3,d3 > move.l $34(a3),d7 > bsr.s set_ctrl > end_cal > movem.l (a7)+,d3-d7/a1 > moveq #0,d0 > end_setr > rts > set_ctrl > move.l d0,a1 > move.w #1,(a1)+ > clr.l (a1)+ > move.w -$64(a3),d0 > sub.w $30(a3),d0 > sub.w d3,d0 > move.w $2c(a3),d4 > ble.s end_setr > subq.w #1,d4 > moveq #-1,d5 > tst.l d7 > bgt.s spac_lst > cnt_spc > addq.w #1,d5 > add.w d7,d0 > dblt d4,cnt_spc > bra.s set_siz > spac_lst > move.l d7,a2 > cnt_spl > addq.l #2,a2 > addq.w #1,d5 > sub.w (a2)+,d0 > dblt d4,cnt_spl > set_siz > move.w d5,(a1) > rts > awm_hitr > jmp $34(a2) > awm_draw > jsr $20(a2) > awb_draw > jmp $24(a2) > awm_ctrl > jmp $38(a2) > awb_ctrl > subi.w #$0a,d4 > beq.s pan_bl > move.l $46(a3),d0 > bra.s ctrl_bl > pan_bl > move.l $28(a3),d0 > ctrl_bl > beq.s end_ctrl > move.l d0,a1 > add.w d4,d4 > adda.w d4,a3 > swap d3 > mulu $90(a3),d3 > divu (a3),d3 > move.w d3,4(a1) > suba.w d4,a3 > jsr $24(a2) > end_ctrl > moveq #0,d4 > rts > >> Am 18.04.2015 um 20:49 schrieb Norman Dunbar <[email protected]>: >> >> And, sorry, I forgot, >> >> does anyone have any decent examples of setting up a Window, with one >> application sub-window that doesn't have a menu, and then dynamically >> building a menu into the afore mentioned sub-window. >> >> I'm sure it can be done, I'm thinking MAWDRAW from EasyMenu as an example. >> >> >> Cheers, >> Norm. >> >> -- >> Norman Dunbar >> Dunbar IT Consultants Ltd >> >> Registered address: >> 27a Lidget Hill >> Pudsey >> West Yorkshire >> United Kingdom >> LS28 7LG >> >> Company Number: 05132767 >> _______________________________________________ >> QL-Users Mailing List >> http://www.q-v-d.demon.co.uk/smsqe.htm > > _______________________________________________ > QL-Users Mailing List > http://www.q-v-d.demon.co.uk/smsqe.htm _______________________________________________ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
