﻿<project title="TSP" version="1/15/08">
	<logo top="508" left="0" source="UVALogo.jpg" />
	<textFormat col="0x000000" size="11" font="_sans" leading="16" />
	<frame wid="800" hgt="480" left="0" top="0" corner="12" frameWid="4" backCol="0xfefefe" frameCol="0xbb0000" />
	<tab onCol="0xbb0000" offCol="0xcccccc" onTextCol="0xffffff" offTextCol="0x666666" wid="200" hgt="16" def="1" />
	<view title="Texas Slavery Project Maps" >	
	<controlPanel title="Populations" closable="true" open="true">
		<frame wid="145" hgt="400" docking="right" frameCol="0x666666" backCol="0xdfdfdf" alpha="80" /> 
		<item type="text" title="Shaded by" bold="true" /> 
		<item type="radio" def="true" title="Total slaves" glue="colorMap?0" /> 
		<item type="radio" def="false" title="Total slaveholders" glue="colorMap?1" /> 
		<item type="radio" def="false" title="1-4 slaves" glue="colorMap?2" /> 
		<item type="radio" def="false" title="5-9 slaves" glue="colorMap?3" /> 
		<item type="radio" def="false" title="10-19 slaves" glue="colorMap?4" /> 
		<item type="radio" def="false" title="20-49 slaves" glue="colorMap?5" /> 
		<item type="radio" def="false" title="50+ slaves" glue="colorMap?6" /> 
		<item type="text" title=" "/> 
		<item type="legend" def="header" title="Slaves Legend" bold="true" /> 
		<item type="legend" def="0xffffff" title="No slaves"/> 
		<item type="legend" def="0xffb9b9" title="1-299 slaves"/> 
		<item type="legend" def="0xfc846f" title="300-599 slaves"/> 
		<item type="legend" def="0xe83c25" title="600-999 slaves"/> 
		<item type="legend" def="0x840000" title="1000+ slaves"/> 
		<item type="legend" def="header" title="" /> 
		<item type="legend" def="header" title="Slaveholders Legend" bold="true" /> 
		<item type="legend" def="0xffffff" title="No slaveholders"/> 
		<item type="legend" def="0xffb9b9" title="1-19 slaveholders"/> 
		<item type="legend" def="0xfc846f" title="20-49 slaveholders"/> 
		<item type="legend" def="0xe83c25" title="50-99 slaveholders"/> 
		<item type="legend" def="0x840000" title="100+ slaveholders"/> 
		</controlPanel>
		<controlPanel title="Map Features" closable="true" open="true" >
			<frame wid="175" hgt="140" docking="left" frameCol="0x666666" backCol="0xdfdfdf" alpha="80" />
			<textFormat col="0x000000" size="10" font="_sans" leading="17" />
			<item type="text" def="false" title="   Graph counties:"/> 
			<item type="combobox" id="graphCounty" title="All|All|Austin|Bastrop|Bexar|Brazoria|Bowie|Brazos|Colorado|Fannin|Fayette|Fort Bend|Galveston|Goliad|Gonzales|Harris|Harrison|Houston|Jackson|Jasper|Jefferson|Lamar|Liberty|Matagorda|Milam|Montgomery|Nacogdoches|Red River|Refugio|Robertson|Rusk|Sabine|San Augustine|San Patricio|Shelby|Travis|Victoria|Washington" glue="showGraph"/>
			<item type="checkbox" def="false" title="Graph Counties" glue="showGraph"/>
			<item type="checkbox" def="false" title="Regional Rivers" glue="showRivers" /> 
			<item type="checkbox" def="true" title="1830 &amp; 1840 US States" glue="show1830map" /> 
		</controlPanel>
		<glue init="true">
			list($years,1837,1838,1839,1840,1841,1842)
			list($mapNum,0,1,2,3,4,5)
			list($maps,1837map,1838map,1839map,1840map,1841map,1843map)
			list($which,0)
			segment($which,$$curYear,$years,$mapNum)
			radioshow($which,30,$maps)
			copy($$CurMap,$maps.$which)
			status(Double-click on a county to see information)
			</glue>		
		<glue id="colorMap">
			list($slots,0,1,20,50,100)
			list($colors,0xffffff,0xffb9b9,0xff0000,0xbb0000,0x990000)
			list($titles,Total Slaves,Slaveholder Population,Slaveholders with 1-4,Slaveholders with 5-9,Slaveholders with 10-19,Slaveholders with 20-49,Slaveholders with 50+)
			list($tables,slave_pop,master_pop,1_to_4,5_to_9,10_to_19,20_to_49,50_plus)
			copy(*myGraph.title,$titles.$$param)
			copy($$CurQuery,$tables.$$param)
			query($temp,sqldata,$$CurQuery,year EQ $$curYear,mapid)
			segment(*$$CurMap.col,$temp,$slots,$colors)
			refresh($$CurMap)
		</glue>
		<textFormat col="0x000000" size="12" font="_sans" leading="18" /> 
		<zoomControl top="24" left="30" max="3" def="100"/>
		<overview docking="botLeft"  wid="120" boxCol="0xffff00" src="texasover.jpg" init="true" />
		<timeline min="1837" max="1845" start="1837"
			play="true" speed="true" 
			majorTick="8" minorTick="8" showValues="true" showMinorValues="true" >
			<textFormat col="0x999999" size="11" font="_sans" /> 
			<frame wid="550" left="120" top="520"  backCol="0x999999" />
		</timeline>
		<resource id="myGraph" type="graph" style="line" border="35" highWid="6" title=" " legend="true">
			<textFormat col="0x000099" size="16" bold="true"/> 
			<frame wid="280" hgt="200" left="60" top="25" corner="8" frameWid="3" backCol="0xfefefe" frameCol="0xbb0000" />
			<xAxis col="0x999999" majorTick="6" minorTick="6" wid="3" min="1837" max="1845" showValues="true"/>
			<yAxis col="0x9999999" majorTick="8" wid="3" min="0"  mod="10" showValues="true"  />
			<marker dataset="1" col="0x990000" />
		</resource>
		<resource id="basemap" type="image" src="texasbase.jpg"/>
		<resource id="usmap" type="map" src="1830usmap.xml" />
		<resource id="rivers" type="map" src="rivers.xml" />
		<resource id="1837map" type="map" src="1837map.xml" ondoubleclick="mapClick"/>
		<resource id="1838map" type="map" src="1838map.xml" ondoubleclick="mapClick" />
		<resource id="1839map" type="map" src="1839map.xml" ondoubleclick="mapClick"/>
		<resource id="1840map" type="map" src="1840map.xml" ondoubleclick="mapClick" />
		<resource id="1841map" type="map" src="1841map.xml" ondoubleclick="mapClick" />
		<resource id="1843map" type="map" src="1843map.xml" ondoubleclick="mapClick" />
  		<resource id="sqldata" type="mysql" host="dbm1.itc.virginia.edu" name="ajt3d_mapid" user="ajt3d" password="b7492bgt" query="SELECT * FROM mapid ORDER BY id" /> 
		<glue from="basemap"  init="true"/>
		<glue from="1837map"  init="true"/>
		<glue from="1838map"  init="true"/>
		<glue from="1839map"  init="true"/>
		<glue from="1840map"  init="true"/>
		<glue from="1841map"  init="true"/>
		<glue from="1843map"  init="true"/>
		<glue id="show1830map" from="usmap"  >
			show(usmap,50);
		</glue>
		<glue id="showRivers" from="rivers"  >
			show(rivers,80);
		</glue>
		<glue id="showGraph" from="myGraph"  init="false" >
			query($temp,sqldata,$$CurQuery,name EQ $$CurCounty,year)
			dataset(myGraph,0,*graphCounty,$temp)
			copy($$CurCounty,*graphCounty)
			copy(myGraph.legend,$$CurCounty);
			refresh(myGraph)
		</glue>
		<resource id="infoBox" type="infoBox" position="west" border="12" tail="solid">
		<![CDATA[<TEXTFORMAT LEADING="2"><P ALIGN="CENTER"><FONT FACE="_SANS" SIZE="12" COLOR="#990000"><b>$$1 County,  $$2</b><br></FONT></P><P ALIGN="LEFT"><FONT FACE="_SANS" SIZE="10" COLOR="#000000" >Total number of slaves: $$3<br>Total number of slaveholders: $$4<br>Slaveholders holding:<tab><li>1-4 slaves:         $$5</li><li>5-9 slaves:         $$6</li><li>10-19 slaves:     $$7</li><li>20-49 slaves:     $$8</li><li>50+ slaves:        $$9</li>Holdings of largest slaveholder: $$10<br>Average slaveholding: $$11<br><a href="http://www.texasslaveryproject.org/database/about/" target="_blank"><u>Estimated</u>:</a> $$12</FONT></P></TEXTFORMAT>]]>				
		<frame wid="210" hgt="220" corner="12" backCol="0xffffcc" frameWid="0" frameCol="0x999999"/>
		</resource>
		<glue id="mapClick" from="infoBox" >
			query($out,sqldata,name+year+slave_pop+master_pop+1_to_4+5_to_9+10_to_19+20_to_49+50_plus+big_master+ave_holding+estimate,year EQ $$curYear AND mapid EQ $$click)
			replaceword(infoBox,$out)
		</glue>	
		</view>
		<view title="Search the TSP Database" codeBase="tsp/" >
			<controlPanel title="Graph Options" closable="true" open="true" >
				<frame wid="185" hgt="305" docking="right" frameCol="0x666666" backCol="0xdfdfdf" alpha="80" />
				<textFormat col="0x000000" size="11" font="_sans" leading="17" />
				<item type="text" title="Set graph lines" bold="true" /> 
				<item type="text" title="   County:"/> 
				<item type="combobox" id="graphCounty" title="All|All|Austin|Bastrop|Bexar|Brazoria|Bowie|Brazos|Colorado|Fannin|Fayette|Fort Bend|Galveston|Goliad|Gonzales|Harris|Harrison|Houston|Jackson|Jasper|Jefferson|Lamar|Liberty|Matagorda|Milam|Montgomery|Nacogdoches|Red River|Refugio|Robertson|Rusk|Sabine|San Augustine|San Patricio|Shelby|Travis|Victoria|Washington" />
				<item type="text" title="   Population:"/> 
				<item type="combobox" id="population" title="Total slaves|Total slaves|Total Masters|Masters w/ 1-4|Masters w/ 5-9|Masters w/ 10-19|Masters w/ 20-49|Masters w/ 50+" />
				<item type="buton" id="line0" title="Add county/population line" glue="addToGraph?0" /> 
				<item type="buton" id="line1" title="Add county/population line" glue="addToGraph?1" /> 
				<item type="buton" id="line2" title="Add county/population line" glue="addToGraph?2" /> 
				<item type="buton" id="line3" title="Add county/population line" glue="addToGraph?3" /> 
				<item type="buton" id="line4" title="Add county/population line" glue="addToGraph?4" /> 
				<item type="buton" id="line5" title="Add county/population line" glue="addToGraph?5" /> 
				<item type="line" /> 
				<item type="text" title="Options" bold="true" /> 
				<item type="buton" title="Clear graph" glue="clearGraph"/> 
				<item type="checkbox" id="raw" def="true" title="Compare raw numbers" />
				</controlPanel>
			<resource id="myGraph" type="graph" style="line" border="35" title=" " legend="true" close="false" glue="graphClick">
				<textFormat col="0x000099" size="16" bold="true"/> 
				<frame wid="792" hgt="472" left="4" top="20" corner="12" backCol="0xfefefe" frameCol="0xbb0000" />
				<xAxis col="0x999999" majorTick="6" minorTick="6" wid="3" min="1837" max="1845" showValues="true"/>
				<yAxis col="0x9999999" majorTick="8" wid="3" min="0"  mod="10" showValues="true"  />
				<marker dataset="1" col="0x990000" style="bar" wid="10"/>
				<marker dataset="2" col="0x009900" style="cir" wid="10" />
				<marker dataset="3" col="0x009900" style="triu" wid="10" />
				<marker dataset="4" col="0x999900" style="trid" wid="10"/>
				<marker dataset="5" col="0x009999" style="tril" wid="10"/>
				<marker dataset="6" col="0x000000" style="trir" wid="10"/>
			</resource>
  			<resource id="sqldata" type="mysql" host="dbm1.itc.virginia.edu" name="ajt3d_mapid" 
				user="ajt3d" password="b7492bgt" query="SELECT * FROM mapid ORDER BY id" /> 
			<glue id="addToGraph">
				join($temp,*graphCounty, + ,*population)
				join($ln,line,$$param,)
				menuitem($ln,$temp,undefined,0)
				list($fields,Total slaves,Total Masters,Masters w/ 1-4,Masters w/ 5-9,Masters w/ 10-19,Masters w/ 20-49,Masters w/ 50+)
				list($tables,slave_pop,master_pop,big_master,1_to_4,5_to_9,10_to_19,20_to_49,50_plus)
				case($num,*population,$fields)
				copy($pop,$tables.$num)
				query($tmp,sqldata,$pop,name EQ *graphCounty,year)
				if(*raw,EQ,0,1)   
					normalize($tmp,100) 
				dataset(myGraph,$$param,$temp,$tmp)
				copy($$setNames.$$param,*graphCounty)
				copy($$popNames.$$param,$pop)
				refresh(myGraph)
			</glue>
			<glue id="clearGraph">
				menuitem(line0,Add county/population line,undefined,0)
				menuitem(line1,Add county/population line,undefined,0)
				menuitem(line2,Add county/population line,undefined,0)
				menuitem(line3,Add county/population line,undefined,0)
				menuitem(line4,Add county/population line,undefined,0)
				menuitem(line5,Add county/population line,undefined,0)
				dataset(myGraph,clear,,)
				refresh(myGraph)
			</glue>
			<resource id="infoBox" type="infoBox" position="west" border="12" tail="line">
				<![CDATA[<TEXTFORMAT LEADING="2"><P ALIGN="CENTER"><FONT FACE="_SANS" SIZE="12" COLOR="#990000"><b>$$1 County,  $$2</b><br></FONT></P><P ALIGN="LEFT"><FONT FACE="_SANS" SIZE="10" COLOR="#000000" >Total number of slaves: $$3<br>Total number of slaveholders: $$4<br>Slaveholders holding:<tab><li>1-4 slaves:         $$5</li><li>5-9 slaves:         $$6</li><li>10-19 slaves:     $$7</li><li>20-49 slaves:     $$8</li><li>50+ slaves:        $$9</li>Holdings of largest slaveholder: $$10<br>Average slaveholding: $$11<br><a href="http://www.texasslaveryproject.org/database/about/" target="_blank"><u>Estimated</u>:</a> $$12</FONT></P></TEXTFORMAT>]]>				
				<frame wid="210" hgt="220" corner="12" backCol="0xffffcc" frameWid="1" frameCol="0x999999"/>
			</resource>
			<glue id="showGraph" from="myGraph"  init="true" />
			<glue id="graphClick" from="infoBox" >
				list($years,1837,1838,1839,1840,1841,1842)
				list($year,0)
				select($years,$year,$$click)
				query($out,sqldata,name+year+slave_pop+master_pop+1_to_4+5_to_9+10_to_19+20_to_49+50_plus+big_master+ave_holding+estimate,name EQ $$setNames.$$param AND year EQ $year)
				replaceword(infoBox,$out)
			</glue>			
		</view>
</project>



