;Written by Iain McCurdy, 2009

<CsoundSynthesizer>

<CsOptions>
</CsOptions>

<CsInstruments>

;DEMONSTRATION OF THE FLscroll OPCODE WHICH ENABLES THE USE OF WIDGET SIZES AND PLACINGS BEYOND THE DIMENSIONS OF THE CONTAINING PANEL  

sr		=	44100
kr		=	441
ksmps		=	100
nchnls		=	2

		FLpanel	"FLscroll",430,200,50,50

;NORMALLY JUST APPLY THE SAME WIDTH AND HEIGHT VALUES AS USED BY THE CONTAINER THAT HOLDS THE SCROLL BARS
;EITHER HORIZONTAL OR VERTICAL (OR BOTH HORIZONTAL AND VERTICAL) SCROLLBARS WILL BE AUTOMATICALLY BE ADDED AS REQUIRED
iwidth		=	430
iheight		=	200
ix		=	0
iy		=	0
		FLscroll   iwidth, iheight, ix, iy

;SOME TEXT THAT WILL EXTEND BEYOND THE RIGHT HAND LIMIT OF THE PANEL...
ih	 FLbox  "DRAG THE SCROLL BAR TO THE RIGHT IN ORDER TO READ THE REST OF THIS TEXT. DRAG THE VERTICAL BAR DOWN...", 1, 10, 20, 1200, 30, 10, 100

ih	 FLbox  "...TO READ THIS OTHER BIT OF TEXT", 1, 10, 20, 400, 30,  800, 300

		FLscrollEnd	;FLscroll, LIKE ALL CONTAINER WIDGETS, NEEDS A 'CLOSING' OPCODE

		FLpanelEnd	;END OF PANEL CONTENTS
		FLrun		;RUN THE WIDGET THREAD

		instr	1
		endin

</CsInstruments>

<CsScore>
f 0 3600	;DUMMY SCORE EVENT ALLOWS REALTIME PERFORMANCE FOR UP TO 1 HOUR
</CsScore>

</CsoundSynthesizer>

