<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd">
	<Script file="BuffDatabase.lua"/>
	<Button name="BuffDatabaseItemButtonTemplate" virtual="true">
		<Size>
			<AbsDimension x="300" y="16"/>
		</Size>
		<Scripts>
			<OnClick>
				CurrentSelection = this:GetText();
				BuffDatabase_Update();
			</OnClick>
			<OnEnter>
				BuffDatabaseItemButton_OnEnter();
			</OnEnter>
			<OnLeave>
				GameTooltip:Hide();
			</OnLeave>
		</Scripts>
		<NormalText name="$parentText" inherits="GameFontNormal" justifyH="LEFT">
			<Size>
				<AbsDimension x="275" y="12"/>
			</Size>
			<Anchors>
				<Anchor point="LEFT">
					<Offset>
						<AbsDimension x="20" y="0"/>
					</Offset>
				</Anchor>
			</Anchors> 
		</NormalText>
	</Button>
	<Frame name="BuffDatabaseFrame" toplevel="true" enableMouse="true" movable="true" parent="UIParent" hidden="true">
		<Size>
			<AbsDimension x="384" y="512"/>
		</Size>
		<Anchors>
 			<Anchor point="TOPLEFT">
 				<Offset>
 					<AbsDimension x="0" y="-104"/>
 				</Offset>
 			</Anchor>
 		</Anchors>
		<HitRectInsets>
			<AbsInset left="0" right="35" top="0" bottom="75"/>
		</HitRectInsets>
		<Layers>
			<Layer level="BACKGROUND">
                <Texture name="BuffDatabaseFramePortrait" file="Interface\PetitionFrame\GuildCharter-Icon">
					<Size>
						<AbsDimension x="58" y="58"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="8" y="-9"/>
							</Offset>
						</Anchor>
					</Anchors>
                </Texture>
            </Layer>
			<Layer level="ARTWORK">
				<Texture file="Interface\TaxiFrame\UI-TaxiFrame-TopLeft">
					<Size>
						<AbsDimension x="256" y="256"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT"/>
					</Anchors>
				</Texture>
				<Texture file="Interface\TaxiFrame\UI-TaxiFrame-TopRight">
					<Size>
						<AbsDimension x="128" y="256"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="256" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>
				<Texture file="Interface\TaxiFrame\UI-TaxiFrame-BotLeft">
					<Size>
						<AbsDimension x="256" y="256"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="0" y="-256"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>
				<Texture file="Interface\TaxiFrame\UI-TaxiFrame-BotRight">
					<Size>
						<AbsDimension x="128" y="256"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="256" y="-256"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>
				<FontString name="BuffDatabaseTitleText" inherits="GameFontHighlight" text="BuffDatabaseTitle">
					<Size>
						<AbsDimension x="300" y="14"/>
					</Size>
					<Anchors>
						<Anchor point="TOP" relativeTo="BuffDatabaseFrame" relativePoint="TOP">
							<Offset>
								<AbsDimension x="0" y="-15"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Button name="BuffDatabaseFrameCloseButton" inherits="UIPanelCloseButton">
				<Anchors>
					<Anchor point="TOPRIGHT" relativeTo="BuffDatabaseFrame" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="-29" y="-8"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>						
						BuffDatabase_BuildArray();
						BuffDatabaseFrame:Hide();
					</OnClick>
				</Scripts>
			</Button>
			<Button name="BuffDatabaseFrameMakeFirstButton" inherits="UIPanelButtonTemplate" text="Make First">
				<Size>
					<AbsDimension x="75" y="24"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="70" y="-43"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						MakeFirstBuff();
						BuffDatabase_Update();
					</OnClick>
				</Scripts>
			</Button>

			<Button name="BuffDatabaseFrameMakeLastButton" inherits="UIPanelButtonTemplate" text="Make Last">
				<Size>
					<AbsDimension x="75" y="24"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="150" y="-43"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						MakeLastBuff();
						BuffDatabase_Update();
					</OnClick>
				</Scripts>
			</Button>			
			
			<Button name="BuffDatabaseFrameMoveUpButton" inherits="UIPanelButtonTemplate" text="Up">
				<Size>
					<AbsDimension x="45" y="24"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="230" y="-43"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						MoveUpBuff();
						BuffDatabase_Update();
					</OnClick>
				</Scripts>
			</Button>
			<Button name="BuffDatabaseFrameMoveDownButton" inherits="UIPanelButtonTemplate" text="Down">
				<Size>
					<AbsDimension x="45" y="24"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="280" y="-43"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						MoveDownBuff();
						BuffDatabase_Update();
					</OnClick>
				</Scripts>
			</Button>
			<Button name="BuffDatabaseItem1" inherits="BuffDatabaseItemButtonTemplate" id="1" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BuffDatabaseFrame">
						<Offset>
							<AbsDimension x="19" y="-75"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BuffDatabaseItem2" inherits="BuffDatabaseItemButtonTemplate" id="2" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BuffDatabaseItem1" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="1"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BuffDatabaseItem3" inherits="BuffDatabaseItemButtonTemplate" id="3" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BuffDatabaseItem2" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="1"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BuffDatabaseItem4" inherits="BuffDatabaseItemButtonTemplate" id="4" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BuffDatabaseItem3" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="1"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BuffDatabaseItem5" inherits="BuffDatabaseItemButtonTemplate" id="5" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BuffDatabaseItem4" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="1"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BuffDatabaseItem6" inherits="BuffDatabaseItemButtonTemplate" id="6" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BuffDatabaseItem5" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="1"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BuffDatabaseItem7" inherits="BuffDatabaseItemButtonTemplate" id="7" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BuffDatabaseItem6" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="1"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BuffDatabaseItem8" inherits="BuffDatabaseItemButtonTemplate" id="8" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BuffDatabaseItem7" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="1"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BuffDatabaseItem9" inherits="BuffDatabaseItemButtonTemplate" id="9" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BuffDatabaseItem8" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="1"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BuffDatabaseItem10" inherits="BuffDatabaseItemButtonTemplate" id="10" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BuffDatabaseItem9" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="1"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BuffDatabaseItem11" inherits="BuffDatabaseItemButtonTemplate" id="11" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BuffDatabaseItem10" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="1"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BuffDatabaseItem12" inherits="BuffDatabaseItemButtonTemplate" id="12" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BuffDatabaseItem11" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="1"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BuffDatabaseItem13" inherits="BuffDatabaseItemButtonTemplate" id="13" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BuffDatabaseItem12" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="1"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BuffDatabaseItem14" inherits="BuffDatabaseItemButtonTemplate" id="14" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BuffDatabaseItem13" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="1"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BuffDatabaseItem15" inherits="BuffDatabaseItemButtonTemplate" id="15" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BuffDatabaseItem14" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="1"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BuffDatabaseItem16" inherits="BuffDatabaseItemButtonTemplate" id="16" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BuffDatabaseItem15" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="1"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BuffDatabaseItem17" inherits="BuffDatabaseItemButtonTemplate" id="17" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BuffDatabaseItem16" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="1"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BuffDatabaseItem18" inherits="BuffDatabaseItemButtonTemplate" id="18" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BuffDatabaseItem17" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="1"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BuffDatabaseItem19" inherits="BuffDatabaseItemButtonTemplate" id="19" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BuffDatabaseItem18" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="1"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BuffDatabaseItem20" inherits="BuffDatabaseItemButtonTemplate" id="20" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BuffDatabaseItem19" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="1"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BuffDatabaseItem21" inherits="BuffDatabaseItemButtonTemplate" id="21" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BuffDatabaseItem20" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="1"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BuffDatabaseItem22" inherits="BuffDatabaseItemButtonTemplate" id="22" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BuffDatabaseItem21" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="1"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BuffDatabaseItem23" inherits="BuffDatabaseItemButtonTemplate" id="23" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BuffDatabaseItem22" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="1"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<ScrollFrame name="BuffDatabaseListScrollFrame" inherits="FauxScrollFrameTemplate">
				<Size>
					<AbsDimension x="296" y="354"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BuffDatabaseFrame">
						<Offset>
							<AbsDimension x="19" y="-75"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<Texture name="$parentScrollBarTop" file="Interface\PaperDollInfoFrame\UI-Character-ScrollBar">
							<Size>
								<AbsDimension x="31" y="256"/>
							</Size>
							<Anchors>
								<Anchor point="TOP" relativeTo="$parentScrollBarScrollUpButton">
									<Offset>
										<AbsDimension x="0" y="5"/>
									</Offset>
								</Anchor>
							</Anchors>
							<TexCoords left="0" right="0.484375" top="0" bottom="1.0"/>
						</Texture>
						<Texture file="Interface\PaperDollInfoFrame\UI-Character-ScrollBar">
							<Size>
								<AbsDimension x="31" y="106"/>
							</Size>
							<Anchors>
								<Anchor point="BOTTOM" relativeTo="$parentScrollBarScrollDownButton">
									<Offset>
										<AbsDimension x="0" y="-2"/>
									</Offset>
								</Anchor>
							</Anchors>
							<TexCoords left="0.515625" right="1.0" top="0" bottom="0.4140625"/>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnVerticalScroll>
						FauxScrollFrame_OnVerticalScroll(BuffDatabase_ITEM_HEIGHT, BuffDatabase_Update);
					</OnVerticalScroll>
				</Scripts>
			</ScrollFrame>
		</Frames>
		<Scripts>
			<OnShow>					
					BuffDatabase_Update();
			</OnShow>
		</Scripts>
	</Frame>
</Ui>
