// H O R I Z S C R O L L
// Sets ww= selection ww
//       ww>>WWD.xdUd = valof GetxdUd
// GetxdUd uses FGetTxpParam from parse.sr

get "display.df"
get "bravo1.df"
get "com.df"
get "parse.df"
get "rn1.df"
get "doc.df"

//incoming procedures

external	[
	invalidatedisplay
	invalidatewindow
	updatedisplay
	SetRegionSys	
	inserttx
	FGetTxpParam
	]

//incoming statics

external	[
	vrlwsys
	vxleftmargstd
	rgmaccp
	mpWwWwd
	]

//outgoing procedures

external	HorizScroll

//-=-=-=-=-=-=-=-=-=-=-
let HorizScroll(cf) = valof
//-=-=-=-=-=-=-=-=-=-=-=-

[
let ww = (cf>>CF.sel)>>SEL.ww
let wwd = mpWwWwd ! ww
unless FGetxdUd(lv wwd>>WWD.xdUd) do
	[
	let ab = nil
	ab<<AB.crid = 2
	ab<<AB.nrid = 0
	resultis ab
	]
invalidatewindow(ww)
invalidatedisplay((cf>>CF.sel)>>SEL.doc, 0, -1)
resultis abnil
]

//-=-==-=-=-=-=-=-=-==-=
and FGetxdUd(pxdUd) = valof
//-=-=-=-=-=-=-=-=-=-=-=

[
let txp = vec lntxp
let param = nil

unless inserttx(1) do resultis false;
txp>>TXP.doc = doctx1
txp>>TXP.cp = 0
txp>>TXP.cpMac = rgmaccp ! doctx1
unless FGetTxpParam(lv param, 0, txp, true) do
	resultis false
let xUd = param 
if xUd ls 0 then resultis false
rv pxdUd = xUd rshift 5
resultis true
]