;Written by Iain McCurdy, 2009

<CsoundSynthesizer>

<CsOptions>
</CsOptions>

<CsInstruments>

;USING THE OPCODE FLsetColor TO CHANGE FROM THE DEFAULT COLOURS FOR WIDGETS

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

		FLpanel	"FLbutBank", 500, 550, 0, 0
;TEXT BOXES					TYPE | FONT | SIZE | WIDTH | HEIGHT | X | Y
ihtitle	FLbox  	"FLbutBank: Button Banks", 	7,      15,    20,   490,     35,     5,  5
FLsetColor	255, 255, 150, ihtitle		;SET SECONDARY COLOUR TO YELLOW

;BUTTON BANKS			 	TYPE | NUMX | NUMY | WIDTH | HEIGHT | X | Y | OPCODE
gkopcode, ihopcode	FLbutBank	1,      5,      1,    300,     30,  100, 50,   -1
gkopcode, ihopcode	FLbutBank	2,      5,      1,    300,     30,  100, 85,   -1
gkopcode, ihopcode	FLbutBank	3,      5,      1,    300,     30,  100,120,   -1
gkopcode, ihopcode	FLbutBank	4,      5,      1,    300,     30,  100,155,   -1
gkopcode, ihopcode	FLbutBank	21,     5,      1,    300,     30,  100,190,   -1
gkopcode, ihopcode	FLbutBank	22,     5,      1,    300,     30,  100,225,   -1
gkopcode, ihopcode	FLbutBank	23,     5,      1,    300,     30,  100,260,   -1
gkopcode, ihopcode	FLbutBank	24,     5,      1,    300,     30,  100,295,   -1

;TEXT BOXES			TYPE | FONT | SIZE | WIDTH | HEIGHT | X | Y
ih	FLbox  	"Type 1:", 	1,      1,     16,    90,     35,     5,  50
ih	FLbox  	"Type 2:", 	1,      1,     16,    90,     35,     5,  85
ih	FLbox  	"Type 3:", 	1,      1,     16,    90,     35,     5, 120
ih	FLbox  	"Type 4:", 	1,      1,     16,    90,     35,     5, 155
ih	FLbox  	"Type 21:", 	1,      1,     16,    90,     35,     5, 190
ih	FLbox  	"Type 22:", 	1,      1,     16,    90,     35,     5, 225
ih	FLbox  	"Type 23:", 	1,      1,     16,    90,     35,     5, 260
ih	FLbox  	"Type 24:", 	1,      1,     16,    90,     35,     5, 295

;TEXT BOXES												TYPE | FONT | SIZE | WIDTH | HEIGHT | X | Y
ih		 	FLbox  	"FLbutBank can be used to create a set of buttons that will   ", 	1,      5,    12,    490,     20,    5, 350
ih		 	FLbox  	"function as a set of radio buttons. That is: activating a    ", 	1,      5,    12,    490,     20,    5, 370
ih		 	FLbox  	"button de-activates the previous button. The variable output ", 	1,      5,    12,    490,     20,    5, 390
ih		 	FLbox  	"by the opcode corresponds to the number label of the         ", 	1,      5,    12,    490,     20,    5, 410
ih		 	FLbox  	"activated button.                                            ", 	1,      5,    12,    490,     20,    5, 430
ih		 	FLbox  	"A bank of buttons of any number of rows and columns can be   ", 	1,      5,    12,    490,     20,    5, 450
ih		 	FLbox  	"created. Individual buttons can also be of any size. A       ", 	1,      5,    12,    490,     20,    5, 470
ih		 	FLbox  	"variety of style or types are available as displayed above.  ", 	1,      5,    12,    490,     20,    5, 490
ih		 	FLbox  	"FLbutBank can also activate a real-time score event such as  ", 	1,      5,    12,    490,     20,    5, 510
ih		 	FLbox  	"starting a note.                                             ", 	1,      5,    12,    490,     20,    5, 530

		FLpanel_end	;END OF PANEL CONTENTS



		FLrun		;RUN THE WIDGET THREAD!

		instr 1
		endin	
</CsInstruments>

<CsScore>
f 0 3600	;'DUMMY' SCORE EVENT
</CsScore>

</CsoundSynthesizer>