Commit 2ddbcbf5 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Add definitions of button types 11/14/15

Button type 11 was added in 1988 so is about time it had a symbol to refer to it in the sources. Added & used said symbols.
Removed 'DoubleIcon' switch, prototype button type 12.
Built binary identical module, not tested.

Version 5.43. Not tagged
parent d1bdba23
......@@ -43,7 +43,6 @@
Option standalone, false ; include messages / templates
]
Option DoubleIcon, false ; allow double-clicking on icon bar
Option fastborders, :LNOT:TrueIcon3 ; use PutSpriteAtUserCoords for border plotting
Option colourmoreborder, false :LAND: TrueIcon3 ; colour all tools except scroll wells
Option slabinout, false ; slab in selected 'slab out' icons.
......
......@@ -14,10 +14,10 @@
Module_MajorVersion SETS "5.43"
Module_Version SETA 543
Module_MinorVersion SETS ""
Module_Date SETS "02 Jul 2014"
Module_ApplicationDate SETS "02-Jul-14"
Module_Date SETS "20 Jul 2014"
Module_ApplicationDate SETS "20-Jul-14"
Module_ComponentName SETS "Wimp"
Module_ComponentPath SETS "castle/RiscOS/Sources/Desktop/Wimp"
Module_FullVersion SETS "5.43"
Module_HelpVersion SETS "5.43 (02 Jul 2014)"
Module_HelpVersion SETS "5.43 (20 Jul 2014)"
END
......@@ -6,18 +6,18 @@
*/
#define Module_MajorVersion_CMHG 5.43
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 02 Jul 2014
#define Module_Date_CMHG 20 Jul 2014
#define Module_MajorVersion "5.43"
#define Module_Version 543
#define Module_MinorVersion ""
#define Module_Date "02 Jul 2014"
#define Module_Date "20 Jul 2014"
#define Module_ApplicationDate "02-Jul-14"
#define Module_ApplicationDate "20-Jul-14"
#define Module_ComponentName "Wimp"
#define Module_ComponentPath "castle/RiscOS/Sources/Desktop/Wimp"
#define Module_FullVersion "5.43"
#define Module_HelpVersion "5.43 (02 Jul 2014)"
#define Module_HelpVersion "5.43 (20 Jul 2014)"
#define Module_LibraryVersionInfo "5:43"
......@@ -175,14 +175,6 @@ addtoR1
09
Pull "R0-R2"
10
[ DoubleIcon
; double click on iconbar icons
LDR R14,[SP,#20] ; flags
BIC R14,R14,#if_buttontype
ORR R14,R14,#12 :SHL: ib_buttontype
STR R14,[sp,#20]
]
BL int_create_icon ; on exit R0 = icon handle
ADD sp,sp,#4+i_size ; correct stack
Pull "R1,cx0,cy0,cx1,cy1,x0,y0,x1,y1"
......
......@@ -1976,8 +1976,11 @@ ibt_click2 * 5 ; select if clicked, report if 2 clicks
ibt_dclick * 6 ; as for (3), but can also drag
ibt_dclickrelease * 7 ; as for (4), but can also drag
ibt_dclick2 * 8 ; as for (5), but can also drag
ibt_menuicon * 9 ; select when over, report on click
ibt_rdclick2 * 10 ; as for (8), but reports for 1 click
ibt_menuicon * 9 ; select when hover over, notify on click
ibt_rdclick2 * 10 ; as for (8), but reports for 1 click also
ibt_clicksel * 11 ; select and notify on click, but can also drag
ibt_dwritable * 14 ; writable gains caret, but can also drag
ibt_writeable * 15 ; writable gains caret
erf_okbox * 1 :SHL: 0
erf_cancelbox * 1 :SHL: 1
......
......@@ -8304,7 +8304,8 @@ redrawoutlp_done_tracing
LDREQB R2, fontbackground
ORREQ R1, R1, R2, LSL #ib_bcol
]
ORR R1, R1, #15 :SHL: ib_buttontype ; pretend it's writeable, so that if this is a menu, we don't attempt keyboard shortcut justification
ASSERT (ibt_writeable :SHL: ib_buttontype) = if_buttontype
ORR R1, R1, #ibt_writeable :SHL: ib_buttontype ; pretend it's writeable, so that if this is a menu, we don't attempt keyboard shortcut justification
Trace fcol, "redrawoutlp: title flags faked to ", X, R1
[ TrueIcon3 :LAND: :LNOT: colourmoreborder
......
......@@ -2031,9 +2031,9 @@ icontext TraceL font
CMP R0, #-1
BNE icontext_pushfontstring
AND R0, R1, #15 :SHL: 12
TEQ R0, #15 :SHL: 12
TEQNE R0, #14 :SHL: 12 ; test for both types of writable
AND R0, R1, #if_buttontype
TEQ R0, #ibt_writeable :SHL: ib_buttontype
TEQNE R0, #ibt_dwritable :SHL: ib_buttontype ; test for both types of writable
;Invert Z flag
MOVNE R0, #0
MOVEQ R0, #1
......@@ -5308,13 +5308,13 @@ int_set_icon_state
BNE %FT01
AND r0,r14,#if_buttontype
TEQ r0,#4 :SHL: ib_buttontype
TEQNE r0,#5 :SHL: ib_buttontype
TEQNE r0,#7 :SHL: ib_buttontype
TEQNE r0,#8 :SHL: ib_buttontype
TEQNE r0,#9 :SHL: ib_buttontype
TEQNE r0,#10 :SHL: ib_buttontype
TEQNE r0,#11 :SHL: ib_buttontype
TEQ r0,#ibt_clickrelease :SHL: ib_buttontype
TEQNE r0,#ibt_click2 :SHL: ib_buttontype
TEQNE r0,#ibt_dclickrelease :SHL: ib_buttontype
TEQNE r0,#ibt_dclick2 :SHL: ib_buttontype
TEQNE r0,#ibt_menuicon :SHL: ib_buttontype
TEQNE r0,#ibt_rdclick2 :SHL: ib_buttontype
TEQNE r0,#ibt_clicksel :SHL: ib_buttontype
BEQ mustredraw
01
]
......
......@@ -1956,9 +1956,7 @@ nextfield Entry "R0-R6"
20
LDR R14,[R0,R1,ASL #i_shift] ; get the flags for the icon
AND R4,R14,#if_buttontype
; MOV R4,R14,LSR #ib_buttontype
CMP R4,#14 :SHL: ib_buttontype ; if >= 14 then is editable so we have found one
CMP R4,#ibt_dwritable :SHL: ib_buttontype ; if >= 14 then is editable so we have found one
BLO %BT10 ; if not then we need to loop back again
AND R4,R14,#if_esg2
......@@ -2040,9 +2038,7 @@ prevfield ALTENTRY
20
LDR R14,[R0,R1,ASL #i_shift] ; get the flags for the icon
AND R4,R14,#if_buttontype ; 320nk bugfix
; MOV R4,R14,LSR #ib_buttontype
CMP R4,#14 :SHL: ib_buttontype ; if >= 14 then is editable so we have found one
CMP R4,#ibt_dwritable :SHL: ib_buttontype ; if >= 14 then is editable so we have found one
BLO %BT10 ; if not then we need to loop back again
AND R4,R14,#if_esg2
......@@ -3812,8 +3808,8 @@ crmenuiconlp
;Make sure that the writable bit is copied from the menu flags
; word to the icon flags word (as button type 15).
BIC R1, R1, #15 :SHL: 12
ORRNE R1, R1, #15 :SHL: 12
BIC R1, R1, #if_buttontype
ORRNE R1, R1, #ibt_writeable :SHL: ib_buttontype
Trace menuw, "icon flags word now shows whether writable ", X,R1
Trace menuw, "original menu flags ",X,LR
......@@ -3858,7 +3854,7 @@ crmenuiconlp
AND R14,R1,#if_buttontype ; before clearing the buttontype (needed for
; correct caret behaviour)
CMP R14,#14 :SHL: 12 ; check for either type of writable
CMP R14,#ibt_dwritable :SHL: ib_buttontype ; check for either type of writable
ORRLT R1,R1,#12:SHL:ib_esg ; and set esg 12 for non-writable, and
ORRGE R1,R1,#13:SHL:ib_esg ; esg 13 for writable
......@@ -3868,7 +3864,7 @@ crmenuiconlp
BEQ %FT90
AND R14,R1,#if_buttontype
CMP R14,#14 :SHL: 12 ; check for either type of writable
CMP R14,#ibt_dwritable :SHL: ib_buttontype ; check for either type of writable
ORRGE r1,r1,#if_filled ; fill the icon
BGE %FT90
......@@ -4042,7 +4038,7 @@ findflp
[ true
LDR R0, [R2], #i_size ; get flags for this icon
AND R14, R0, #if_buttontype
CMP R14, #14 :SHL: ib_buttontype ; type-14 icons are also allowed to gain caret
CMP R14, #ibt_dwritable :SHL: ib_buttontype ; type-14 icons are also allowed to gain caret
BLT findflp
TST R0, #is_shaded :OR: is_deleted ; don't set to a shaded or deleted icon!
BNE findflp
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment