Quantcast
<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/ ..\..\FrameXML\UI.xsd">

    <!-- Template: Button -->
    <Button name="CauldronButtonTemplate" inherits="UIPanelButtonTemplate" virtual="true">
        <Size x="80" y="20" />
        <NormalText inherits="GameFontHighlightSmall" />
        <DisabledText inherits="GameFontDisableSmall" />
        <HighlightText inherits="GameFontHighlightSmall" />
        <Scripts>
            <OnClick>
                PlaySound("igMainMenuOptionCheckBoxOn");
			</OnClick>
            <OnEnter>
                if ( self.tooltipText ) then
                    GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
                    GameTooltip:SetText(self.tooltipText, nil, nil, nil, nil, 1);
                end
			</OnEnter>
            <OnLeave>
                GameTooltip:Hide();
			</OnLeave>
        </Scripts>
    </Button>

    <!-- Template: Reagent detail -->
	<Button name="CauldronReagentDetailTemplate" inherits="QuestItemTemplate" virtual="true">
		<Scripts>
			<OnEnter>
				GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT");
				-- GameTooltip:SetHyperlink(self.link);
				GameTooltip:SetTradeSkillItem(self.skillIndex, self.reagentIndex);
				CursorUpdate(self);
			</OnEnter>
			<OnLeave>
				GameTooltip:Hide();
				ResetCursor();
			</OnLeave>
			<OnUpdate>
				CursorOnUpdate(self);
			</OnUpdate>
			<OnClick>
				HandleModifiedItemClick(self.link);
			</OnClick>
		</Scripts>
	</Button>

    <!-- Template: Skill item frame -->
    <Button name="CauldronSkillItemFrameTemplate" virtual="true">
    	<Size x="300" y="50" />
    	<Layers>
			<Layer level="OVERLAY">
				<FontString name="$parentSkillName" inherits="GameFontNormal"
							text="(name)" justifyH="LEFT" justifyV="CENTER">
					<Size x="250" y="12"/>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="62" y="-4"/>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentSkillCategory" inherits="GameFontNormalSmall"
							text="(category)" justifyH="LEFT" justifyV="CENTER">
					<Size x="250" y="12"/>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="62" y="-20"/>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentSkillCooldown" inherits="GameFontRedSmall"
							text="(cooldown)" justifyH="RIGHT" nonSpaceWrap="true" maxLines="3"
							hidden="true">
					<Size x="75" y="50"/>
					<Anchors>
						<Anchor point="TOPRIGHT">
							<Offset x="0" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="HIGHLIGHT" setAllPoints="true">
				<Texture file="Interface\QuestFrame\UI-QuestLogTitleHighlight" alphaMode="ADD">
					<Color r="0.7" g="0.7" b="0.7" a="0.5" />
				</Texture>
			</Layer>
    	</Layers>
    	<Frames>
    		<!--
    		<Frame name="$parentSkillNameTooltipFrame">
				<Size x="250" y="12"/>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset x="62" y="-4"/>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						HandleModifiedItemClick(GetTradeSkillItemLink(self.skillIndex));
						Cauldron:SkillItem_OnClick(self, button, down);
					</OnClick>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
						GameTooltip:SetTradeSkillItem(self.skillIndex);
						CursorUpdate(self);
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide();
						ResetCursor();
					</OnLeave>
					<OnUpdate>
						if GameTooltip:IsOwned(self) then
							GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
							GameTooltip:SetTradeSkillItem(self.skillIndex);
							CursorUpdate(self);
						end
						CursorOnUpdate(self);
					</OnUpdate>
				</Scripts>
    		</Frame>
    		-->
			<Button name="$parentSkillIcon">
				<Size x="37" y="37"/>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset x="24" y="-3"/>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<FontString name="$parentCount" inherits="NumberFontNormal" justifyH="RIGHT" hidden="false">
							<Anchors>
								<Anchor point="BOTTOMRIGHT">
									<Offset x="-2" y="2"/>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
                        self.isCompact = false;
						-- self.hasItem = 1;
					</OnLoad>
					<OnClick>
						HandleModifiedItemClick(GetTradeSkillItemLink(self.skillIndex));
						Cauldron:SkillItem_OnClick(self, button, down);
					</OnClick>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
						GameTooltip:SetTradeSkillItem(self.skillIndex);
						-- Cauldron:AppendToTooltip(GameTooltip, self.skillIndex);
						CursorUpdate(self);
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide();
						ResetCursor();
					</OnLeave>
					<OnUpdate>
						if GameTooltip:IsOwned(self) then
							GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
							GameTooltip:SetTradeSkillItem(self.skillIndex);
							CursorUpdate(self);
						end
						CursorOnUpdate(self);
					</OnUpdate>
				</Scripts>
			</Button>
			<Button name="$parentDiscloseButton" hidden="false" inherits="ClassTrainerSkillButtonTemplate">
				<Size x="20" y="22"/>
				<Anchors>
					<Anchor point="RIGHT" relativeTo="$parentSkillIcon" relativePoint="LEFT">
						<Offset x="0" y="0"/>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self:SetText("");
					</OnLoad>
					<OnClick>
						Cauldron:CollapseItemButton_OnClick(self);
					</OnClick>
				</Scripts>
			</Button>
			<CheckButton name="$parentFavoriteButton" hidden="false" inherits="UICheckButtonTemplate" text="">
				<Size x="20" y="22"/>
				<Anchors>
					<Anchor point="TOPRIGHT">
						<Offset x="0" y="0"/>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self:SetScale(0.625);
						self:SetText(Cauldron:LocaleString("Favorite?"));
					</OnLoad>
                	<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
						GameTooltip:ClearLines();
						GameTooltip:AddLine(Cauldron:LocaleString("Mark this skill as a favorite"));
						GameTooltip:Show();
						CursorUpdate(self);
                	</OnEnter>
                	<OnLeave>
                		GameTooltip:Hide();
                		ResetCursor();
                	</OnLeave>
					<OnClick>
						PlaySound("igMainMenuOptionCheckBoxOn");
						Cauldron:FavoriteItemButton_OnClick(self);
						Cauldron:UpdateSkillList();
					</OnClick>
				</Scripts>
			</CheckButton>
    		<Frame name="$parentReagents">
    			<Size x="40" y="100" />
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentSkillIcon" relativePoint="BOTTOMLEFT">
						<Offset x="10" y="-3"/>
					</Anchor>
				</Anchors>
    			<Layers>
    				<Layer level="OVERLAY">
    					<FontString name="$parentToolsInfo" inherits="GameFontNormal"
    								text="(tools info)" justifyH="LEFT">
    						<Size x="250" y="12" />
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset x="0" y="0"/>
								</Anchor>
							</Anchors>
							<Color r="1.0" g="1.0" b="1.0" />
    					</FontString>
    				</Layer>
    			</Layers>
    			<Frames>
					<Button name="$parentItemDetail1" inherits="CauldronReagentDetailTemplate" id="1">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentToolsInfo" relativePoint="BOTTOMLEFT">
								<Offset x="0" y="-2"/>
							</Anchor>
						</Anchors>
					</Button>
					<Button name="$parentItemDetail2" inherits="CauldronReagentDetailTemplate" id="2">
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parentItemDetail1" relativePoint="RIGHT">
								<Offset x="5" y="0"/>
							</Anchor>
						</Anchors>
					</Button>
					<Button name="$parentItemDetail3" inherits="CauldronReagentDetailTemplate" id="3">
						<Anchors>
							<Anchor point="TOP" relativeTo="$parentItemDetail1" relativePoint="BOTTOM">
								<Offset x="0" y="-3"/>
							</Anchor>
						</Anchors>
					</Button>
					<Button name="$parentItemDetail4" inherits="CauldronReagentDetailTemplate" id="4">
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parentItemDetail3" relativePoint="RIGHT">
								<Offset x="5" y="0"/>
							</Anchor>
						</Anchors>
					</Button>
					<Button name="$parentItemDetail5" inherits="CauldronReagentDetailTemplate" id="5">
						<Anchors>
							<Anchor point="TOP" relativeTo="$parentItemDetail3" relativePoint="BOTTOM">
								<Offset x="0" y="-3"/>
							</Anchor>
						</Anchors>
					</Button>
					<Button name="$parentItemDetail6" inherits="CauldronReagentDetailTemplate" id="6">
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parentItemDetail5" relativePoint="RIGHT">
								<Offset x="5" y="0"/>
							</Anchor>
						</Anchors>
					</Button>
					<Button name="$parentItemDetail7" inherits="CauldronReagentDetailTemplate" id="7">
						<Anchors>
							<Anchor point="TOP" relativeTo="$parentItemDetail7" relativePoint="BOTTOM">
								<Offset x="0" y="-3"/>
							</Anchor>
						</Anchors>
					</Button>
					<Button name="$parentItemDetail8" inherits="CauldronReagentDetailTemplate" id="8">
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parentItemDetail7" relativePoint="RIGHT">
								<Offset x="5" y="0"/>
							</Anchor>
						</Anchors>
					</Button>
    			</Frames>
    		</Frame>
    		<Frame name="$parentSelection" setAllPoints="true" enableMouse="true" hidden="true" frameStrata="LOW" frameLevel="1">
    			<Layers>
					<Layer level="OVERLAY">
						<Texture name="$parentSelection" file="Interface\QuestFrame\UI-QuestLogTitleHighlight" alphaMode="ADD">
							<Color r="0.5" g="0.5" b="0.5" a="0.5" />
						</Texture>
					</Layer>
				</Layers>
			</Frame>
    	</Frames>
    	<Scripts>
    		<OnEnter>
    			Cauldron:SkillItem_OnEnter(self);
    		</OnEnter>
    		<OnLeave>
    			Cauldron:SkillItem_OnLeave(self);
    		</OnLeave>
    		<OnClick>
                PlaySound("igMainMenuOptionCheckBoxOn");
				HandleModifiedItemClick(GetTradeSkillRecipeLink(self.skillIndex));
    			Cauldron:SkillItem_OnClick(self, button, down);
    		</OnClick>
    	</Scripts>
    </Button>

    <!-- Template: Queue item frame -->
    <Button name="CauldronQueueItemFrameTemplate" virtual="true" enableMouse="true">
    	<Size x="300" y="39" />
    	<Layers>
			<Layer level="OVERLAY">
	    		<!-- item name -->
				<FontString name="$parentItemName" inherits="GameFontNormal"
							text="(name)" justifyH="LEFT" justifyV="CENTER">
					<Size x="250" y="12"/>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="40" y="-4"/>
						</Anchor>
					</Anchors>
					<Color r="0.2" g="0.2" b="0.2" />
				</FontString>
				<!-- quantity info -->
				<FontString name="$parentInfo" inherits="GameFontNormal"
							text="(info)" justifyH="LEFT" justifyV="CENTER">
					<Size x="250" y="12"/>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="40" y="-18"/>
						</Anchor>
					</Anchors>
					<!-- Color r="1.0" g="1.0" b="1.0" / -->
				</FontString>
			</Layer>
			<Layer level="HIGHLIGHT" setAllPoints="true">
				<Texture file="Interface\QuestFrame\UI-QuestLogTitleHighlight" alphaMode="ADD">
					<Color r="0.8" g="0.8" b="0.8" a="0.5" />
				</Texture>
			</Layer>
    	</Layers>
    	<Frames>
    		<!-- icon -->
			<Button name="$parentIcon">
				<Size x="37" y="37"/>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset x="2" y="-3"/>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<FontString name="$parentCount" inherits="NumberFontNormal" justifyH="RIGHT" hidden="false">
							<Anchors>
								<Anchor point="BOTTOMRIGHT">
									<Offset x="-2" y="2"/>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						-- self.hasItem = 1;
					</OnLoad>
					<OnClick>
						HandleModifiedItemClick(self.link);
					</OnClick>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
						GameTooltip:SetHyperlink(self.link);
						CursorUpdate(self);
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide();
						ResetCursor();
					</OnLeave>
					<OnUpdate>
						if GameTooltip:IsOwned(self) then
							GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
							GameTooltip:SetHyperlink(self.link);
							CursorUpdate(self);
						end
						CursorOnUpdate(self);
					</OnUpdate>
				</Scripts>
			</Button>
			<Button name="$parentRemoveItem" inherits="UIPanelCloseButton" hidden="true">
                <Anchors>
                    <Anchor point="TOPRIGHT">
                        <Offset x="0" y="0"/>
                    </Anchor>
                </Anchors>
                <Scripts>
                	<OnEnter>
                		self:GetParent().inHoverButtons = true;

						GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
						GameTooltip:ClearLines();
						GameTooltip:AddLine(Cauldron:LocaleString("Remove this item from the queue"));
						GameTooltip:Show();
						CursorUpdate(self);
                	</OnEnter>
                	<OnLeave>
                		self:GetParent().inHoverButtons = false;

                		GameTooltip:Hide();
                		ResetCursor();
                	</OnLeave>
                    <OnClick>
                    	Cauldron:RemoveQueueItem(self:GetParent().itemName);
                    	Cauldron:UpdateQueue();
                    	Cauldron:UpdateButtons();
                    </OnClick>
                </Scripts>
            </Button>
			<Button name="$parentAddToShoppingList" inherits="UIPanelCloseButton" hidden="true">
                <Anchors>
                    <Anchor point="TOPRIGHT">
                        <Offset x="0" y="0"/>
                    </Anchor>
                </Anchors>
                <Scripts>
                	<OnEnter>
                		self:GetParent().inHoverButtons = true;

						GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
						GameTooltip:ClearLines();
						GameTooltip:AddLine(Cauldron:LocaleString("Add this item to the shopping list"));
						GameTooltip:AddLine(Cauldron:LocaleString("Shift-click will replace the count in the shopping list with this amount"));
						GameTooltip:Show();
						CursorUpdate(self);
                	</OnEnter>
                	<OnLeave>
                		self:GetParent().inHoverButtons = false;

                		GameTooltip:Hide();
                		ResetCursor();
                	</OnLeave>
                    <OnClick>
                    	Cauldron:AddItemToShoppingList(self:GetParent().itemName, self:GetParent().needAmount, IsShiftKeyDown());
                    	Cauldron:UpdateShoppingList();
                    </OnClick>
                </Scripts>
				<NormalTexture file="Interface\Buttons\UI-PlusButton-Up" />
				<PushedTexture file="Interface\Buttons\UI-PlusButton-Down" />
				<DisabledTexture file="Interface\Buttons\UI-PlusButton-Disabled" />
				<HighlightTexture file="Interface\Buttons\UI-PlusButton-Hilight" alphaMode="ADD" />
            </Button>
			<Button name="$parentIncrementCount" hidden="true" inherits="ClassTrainerSkillButtonTemplate">
				<Size x="23" y="22" />
                <Anchors>
                    <Anchor point="TOPRIGHT">
                        <Offset x="-48" y="-6"/>
                    </Anchor>
                </Anchors>
				<Scripts>
					<OnLoad>
						self:RegisterForClicks("AnyUp");
					</OnLoad>
                	<OnEnter>
                		self:GetParent().inHoverButtons = true;

						GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
						GameTooltip:ClearLines();
						GameTooltip:AddLine(Cauldron:LocaleString("Increase the amount of this item"));
						GameTooltip:Show();
						CursorUpdate(self);
                	</OnEnter>
                	<OnLeave>
                		self:GetParent().inHoverButtons = false;

                		GameTooltip:Hide();
                		ResetCursor();
                	</OnLeave>
					<OnClick>
						Cauldron:IncreaseItemCount(self:GetParent().itemName);
						Cauldron:UpdateQueue();
                    	Cauldron:UpdateButtons();
					</OnClick>
				</Scripts>
				<NormalTexture file="Interface\Buttons\UI-PlusButton-Up" />
				<PushedTexture file="Interface\Buttons\UI-PlusButton-Down" />
				<DisabledTexture file="Interface\Buttons\UI-PlusButton-Disabled" />
				<HighlightTexture file="Interface\Buttons\UI-PlusButton-Hilight" alphaMode="ADD" />
			</Button>
			<Button name="$parentDecrementCount" hidden="true" inherits="ClassTrainerSkillButtonTemplate">
				<Size x="23" y="22" />
                <Anchors>
                    <Anchor point="TOPRIGHT">
                        <Offset x="-16" y="-2"/>
                    </Anchor>
                </Anchors>
				<Scripts>
					<OnLoad>
						self:RegisterForClicks("AnyUp");
					</OnLoad>
                	<OnEnter>
                		self:GetParent().inHoverButtons = true;

						GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
						GameTooltip:ClearLines();
						GameTooltip:AddLine(Cauldron:LocaleString("Decrease the amount of this item"));
						GameTooltip:Show();
						CursorUpdate(self);
                	</OnEnter>
                	<OnLeave>
                		self:GetParent().inHoverButtons = false;

                		GameTooltip:Hide();
                		ResetCursor();
                	</OnLeave>
					<OnClick>
						Cauldron:DecreaseItemCount(self:GetParent().itemName);
						Cauldron:UpdateQueue();
                    	Cauldron:UpdateButtons();
					</OnClick>
				</Scripts>
				<!--
				<NormalTexture file="Interface\Buttons\UI-MinusButton-Up" />
				<PushedTexture file="Interface\Buttons\UI-MinusButton-Down" />
				<DisabledTexture file="Interface\Buttons\UI-MinusButton-Disabled" />
				<HighlightTexture file="Interface\Buttons\UI-ScrollBar-ScrollUpButton-Highlight" alphaMode="ADD" />
				-->
			</Button>
			<Button name="$parentIncreasePriority" hidden="true">
				<Size x="23" y="22" />
                <Anchors>
                    <Anchor point="TOPRIGHT">
                        <Offset x="-16" y="-20"/>
                    </Anchor>
                </Anchors>
				<Scripts>
					<OnLoad>
						self:RegisterForClicks("AnyUp");
					</OnLoad>
                	<OnEnter>
                		self:GetParent().inHoverButtons = true;

						GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
						GameTooltip:ClearLines();
						GameTooltip:AddLine(Cauldron:LocaleString("Increase the priority of this item"));
						GameTooltip:AddLine(Cauldron:LocaleString("Shift-click to move to the top of the queue"));
						GameTooltip:Show();
						CursorUpdate(self);
                	</OnEnter>
                	<OnLeave>
                		self:GetParent().inHoverButtons = false;

                		GameTooltip:Hide();
                		ResetCursor();
                	</OnLeave>
					<OnClick>
						Cauldron:IncreaseItemPriority(self:GetParent().itemName, IsShiftKeyDown());
						CauldronQueue:CalculateAllRequiredItems(Cauldron:GetQueue());
						Cauldron:UpdateQueue();
					</OnClick>
				</Scripts>
				<NormalTexture file="Interface\Buttons\UI-ScrollBar-ScrollUpButton-Up" />
				<PushedTexture file="Interface\Buttons\UI-ScrollBar-ScrollUpButton-Down" />
				<DisabledTexture file="Interface\Buttons\UI-ScrollBar-ScrollUpButton-Disabled" />
				<HighlightTexture file="Interface\Buttons\UI-ScrollBar-ScrollUpButton-Highlight" alphaMode="ADD" />
			</Button>
			<Button name="$parentDecreasePriority" hidden="true">
				<Size x="23" y="22" />
                <Anchors>
                    <Anchor point="TOPRIGHT">
                        <Offset x="0" y="-20"/>
                    </Anchor>
                </Anchors>
				<Scripts>
					<OnLoad>
						self:RegisterForClicks("AnyUp");
					</OnLoad>
                	<OnEnter>
                		self:GetParent().inHoverButtons = true;

						GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
						GameTooltip:ClearLines();
						GameTooltip:AddLine(Cauldron:LocaleString("Decrease the priority of this item"));
						GameTooltip:AddLine(Cauldron:LocaleString("Shift-click to move to the bottom of the queue"));
						GameTooltip:Show();
						CursorUpdate(self);
                	</OnEnter>
                	<OnLeave>
                		self:GetParent().inHoverButtons = false;

                		GameTooltip:Hide();
                		ResetCursor();
                	</OnLeave>
					<OnClick>
						Cauldron:DecreaseItemPriority(self:GetParent().itemName, IsShiftKeyDown());
						CauldronQueue:CalculateAllRequiredItems(Cauldron:GetQueue());
						Cauldron:UpdateQueue();
					</OnClick>
				</Scripts>
				<NormalTexture file="Interface\Buttons\UI-ScrollBar-ScrollDownButton-Up" />
				<PushedTexture file="Interface\Buttons\UI-ScrollBar-ScrollDownButton-Down" />
				<DisabledTexture file="Interface\Buttons\UI-ScrollBar-ScrollDownButton-Disabled" />
				<HighlightTexture file="Interface\Buttons\UI-ScrollBar-ScrollDownButton-Highlight" alphaMode="ADD" />
			</Button>
    	</Frames>
    	<Scripts>
    		<OnClick>
				HandleModifiedItemClick(self.link);
    		</OnClick>
    		<OnEnter>
    			if self.removeable then
    				_G[self:GetName().."RemoveItem"]:Show();
    				_G[self:GetName().."DecreasePriority"]:Show();
    				_G[self:GetName().."IncreasePriority"]:Show();
    				_G[self:GetName().."DecrementCount"]:Show();
    				_G[self:GetName().."IncrementCount"]:Show();
    				_G[self:GetName().."IncrementCount"]:SetScale(0.75);
    			end
    			if self.shoppable then
    				_G[self:GetName().."AddToShoppingList"]:Show();
    			end
    		</OnEnter>
    		<OnLeave>
    			if not self.inHoverButtons then
					_G[self:GetName().."RemoveItem"]:Hide();
    				_G[self:GetName().."DecreasePriority"]:Hide();
    				_G[self:GetName().."IncreasePriority"]:Hide();
    				_G[self:GetName().."DecrementCount"]:Hide();
    				_G[self:GetName().."IncrementCount"]:Hide();
    				_G[self:GetName().."AddToShoppingList"]:Hide();
				end
    		</OnLeave>
    	</Scripts>
    </Button>

    <!-- Main frame -->
    <Frame name="CauldronFrame" toplevel="true" frameStrata="MEDIUM"
           movable="true" resizable="false" parent="UIParent" enableMouse="true"
           hidden="true">
        <TitleRegion setAllPoints="true" />
        <Size>
        	<AbsDimension x="692" y="465" />
        </Size>
        <Anchors>
            <Anchor point="TOPLEFT" />
        </Anchors>

        <!-- Window border and background -->
        <Layers>
			<Layer level="BACKGROUND">
				<Texture name="CauldronFramePortrait" file="Interface\Spellbook\Spellbook-Icon">
					<Size x="60" y="60"/>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="7" y="-6"/>
						</Anchor>
					</Anchors>
				</Texture>
				<FontString name="$parentDummyString" inherits="GameFontNormal" hidden="true">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="0" y="0"/>
						</Anchor>
					</Anchors>
					<Size x="0" y="0"/>
				</FontString>
			  </Layer>

            <Layer level="BORDER">
                <Texture name="CauldronFrameBorderTopLeft"
                    file="Interface\AddOns\Cauldron\Artwork\Cauldron-Main-TopLeft">
                    <Anchors>
                        <Anchor point="TOPLEFT">
                            <Offset x="0" y="0" />
                        </Anchor>
                    </Anchors>
                </Texture>
                <Texture name="CauldronFrameBorderTopMiddle"
                    file="Interface\AddOns\Cauldron\Artwork\Cauldron-Main-TopMiddle">
                    <Anchors>
                        <Anchor point="TOPLEFT">
                            <Offset x="256" y="0" />
                        </Anchor>
                    </Anchors>
                </Texture>
                <Texture name="CauldronFrameBorderTopRight"
                    file="Interface\AddOns\Cauldron\Artwork\Cauldron-Main-TopRight">
                    <Anchors>
                        <Anchor point="TOPLEFT">
                            <Offset x="512" y="0" />
                        </Anchor>
                    </Anchors>
                </Texture>
                <Texture name="CauldronFrameBorderBottomLeft"
                    file="Interface\AddOns\Cauldron\Artwork\Cauldron-Main-BottomLeft">
                    <Anchors>
                        <Anchor point="TOPLEFT">
                            <Offset x="0" y="-256" />
                        </Anchor>
                    </Anchors>
                </Texture>
                <Texture name="CauldronFrameBorderBottomMiddle"
                    file="Interface\AddOns\Cauldron\Artwork\Cauldron-Main-BottomMiddle">
                    <Anchors>
                        <Anchor point="TOPLEFT">
                            <Offset x="256" y="-256" />
                        </Anchor>
                    </Anchors>
                </Texture>
                <Texture name="CauldronFrameBorderBottomRight"
                    file="Interface\AddOns\Cauldron\Artwork\Cauldron-Main-BottomRight">
                    <Anchors>
                        <Anchor point="TOPLEFT">
                            <Offset x="512" y="-256" />
                        </Anchor>
                    </Anchors>
                </Texture>
            </Layer>

            <Layer level="ARTWORK">
                <FontString name="CauldronFrameTitleText" inherits="GameFontNormal" text="Cauldron">
                    <Anchors>
                        <Anchor point="TOP" relativeTo="CauldronFrame" relativePoint="TOP">
                            <Offset x="0" y="-18" />
                        </Anchor>
                    </Anchors>
                </FontString>
            </Layer>
        </Layers>

        <Frames>
            <!-- Link button -->
            <Button name="CauldronTradeSkillLinkButton">
                <Size x="32" y="16" />
                <Anchors>
                    <Anchor point="LEFT" relativeTo="CauldronFrameTitleText" relativePoint="RIGHT">
                        <Offset x="5" y="0" />
                    </Anchor>
                </Anchors>
                <Scripts>
                    <OnClick>
                        local link=GetTradeSkillListLink();
                        if (not ChatEdit_InsertLink(link) ) then
                            ChatFrameEditBox:Show();
                            ChatEdit_InsertLink(link);
                        end
                    </OnClick>
                    <OnEnter>
                        GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT");
                        GameTooltip:SetText(LINK_TRADESKILL_TOOLTIP, nil, nil, nil, nil, 1);
                        GameTooltip:Show();
                    </OnEnter>
                    <OnLeave>
                        GameTooltip:Hide();
                    </OnLeave>
                </Scripts>
                <NormalTexture file="Interface\TradeSkillFrame\UI-TradeSkill-LinkButton">
                    <TexCoords left="0" right="1.0" top="0" bottom="0.5" />
                </NormalTexture>
                <HighlightTexture file="Interface\TradeSkillFrame\UI-TradeSkill-LinkButton" alphaMode="ADD">
                    <TexCoords left="0" right="1.0" top="0.5" bottom="1.0" />
                </HighlightTexture>
            </Button>

            <!-- Filters frame -->
            <Frame name="CauldronFiltersFrame">
                <Size x="300" y="60" />
                <Anchors>
                    <Anchor point="TOPLEFT" relativeTo="CauldronFrame" relativePoint="TOPLEFT">
                        <Offset x="54" y="-35" />
                    </Anchor>
                </Anchors>

                <Frames>
                    <!-- filter dropdown -->
                    <Frame name="CauldronFiltersFilterDropDown" inherits="UIDropDownMenuTemplate" id="1">
                        <Size x="140" y="20" />
                        <Anchors>
                            <Anchor point="TOPLEFT" relativeTo="CauldronFiltersFrame" relativePoint="TOPLEFT">
                                <Offset x="0" y="0"/>
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnLoad>
                                Cauldron:FilterDropDown_OnLoad(self);
                            </OnLoad>
                        </Scripts>
                    </Frame>

                    <!-- search text box -->
			        <EditBox name="CauldronFiltersSearchEditBox" autoFocus="false">
				        <Size x="130" y="20"/>
				        <Anchors>
					       <Anchor point="TOPLEFT" relativeTo="CauldronFiltersFrame" relativePoint="TOPLEFT">
						      <Offset x="155" y="-2" />
					       </Anchor>
				        </Anchors>

				        <Layers>
					       <Layer level="BACKGROUND">
						      <Texture name="$parentLeft" file="Interface\Common\Common-Input-Border">
							     <Size x="8" y="20"/>
							     <Anchors>
								    <Anchor point="TOPLEFT">
									   <Offset x="-5" y="0"/>
								    </Anchor>
							     </Anchors>
							     <TexCoords left="0" right="0.0625" top="0" bottom="0.625"/>
						      </Texture>
						      <Texture name="$parentRight" file="Interface\Common\Common-Input-Border">
							     <Size x="8" y="20"/>
							     <Anchors>
								    <Anchor point="RIGHT">
									   <Offset x="0" y="0"/>
								    </Anchor>
							     </Anchors>
							     <TexCoords left="0.9375" right="1.0" top="0" bottom="0.625"/>
						      </Texture>
						      <Texture name="$parentMiddle" file="Interface\Common\Common-Input-Border">
							     <Size x="0" y="20"/>
							     <Anchors>
								    <Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"/>
								    <Anchor point="RIGHT" relativeTo="$parentRight" relativePoint="LEFT"/>
							     </Anchors>
							     <TexCoords left="0.0625" right="0.9375" top="0" bottom="0.625"/>
						      </Texture>
					       </Layer>
				        </Layers>
				        <Scripts>
					       	<OnLoad>
						      	self:SetText(SEARCH);
							</OnLoad>
							<OnEnterPressed>
								self:ClearFocus();
							</OnEnterPressed>
							<OnEscapePressed>
								self:ClearFocus();
							</OnEscapePressed>
							<OnTextChanged>
								Cauldron:TradeSkillFilter_OnTextChanged(self);
							</OnTextChanged>
							<OnEditFocusLost>
								self:HighlightText(0, 0);
								if self:GetText() == "" then
									self:SetText(SEARCH);
								end
							</OnEditFocusLost>
							<OnEditFocusGained>
								if self:GetText() == SEARCH then
									self:SetText("");
								end
								self:HighlightText();
							</OnEditFocusGained>
						</Scripts>
						<FontString inherits="ChatFontSmall"/>
					</EditBox>

                    <!-- category dropdown -->
                    <Frame name="CauldronFiltersCategoryDropDown" inherits="UIDropDownMenuTemplate" id="4">
                        <Size x="140" y="20" />
                        <Anchors>
                            <Anchor point="TOPLEFT" relativeTo="CauldronFiltersFrame" relativePoint="TOPLEFT">
                                <Offset x="0" y="-25"/>
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnLoad>
                                Cauldron:CategoryDropDown_OnLoad(self);
                            </OnLoad>
                        </Scripts>
                    </Frame>

                    <!-- slot dropdown -->
                    <Frame name="CauldronFiltersInvSlotDropDown" inherits="UIDropDownMenuTemplate" id="3">
                        <Size x="140" y="20" />
                        <Anchors>
                            <Anchor point="TOPLEFT" relativeTo="CauldronFiltersFrame" relativePoint="TOPLEFT">
                                <Offset x="137" y="-25"/>
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnLoad>
                                Cauldron:InvSlotDropDown_OnLoad(self);
                            </OnLoad>
                        </Scripts>
                    </Frame>

                </Frames>
            </Frame>

            <!-- List frame -->
            <Frame name="CauldronSkillListFrame">
                <Size x="342" y="100" />
                <Anchors>
                    <Anchor point="TOPLEFT" relativeTo="CauldronFrame" relativePoint="TOPLEFT">
                        <Offset x="14" y="-90" />
                    </Anchor>
                </Anchors>

                <Frames>
					<Frame name="$parentExpandButtonFrame">
						<Size x="54" y="33"/>
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset x="-3" y="20"/>
							</Anchor>
						</Anchors>
						<Layers>
							<Layer level="BACKGROUND">
								<Texture name="$parentExpandTabLeft" file="Interface\ClassTrainerFrame\UI-ClassTrainer-ExpandTab-Left">
									<Size x="8" y="32"/>
									<Anchors>
										<Anchor point="TOPLEFT"/>
									</Anchors>
								</Texture>
								<Texture name="$parentExpandTabMiddle" file="Interface\QuestFrame\UI-QuestLogSortTab-Middle">
									<Size x="38" y="32"/>
									<Anchors>
										<Anchor point="LEFT" relativeTo="$parentExpandTabLeft" relativePoint="RIGHT">
											<Offset x="0" y="6"/>
										</Anchor>
									</Anchors>
								</Texture>
								<Texture name="$parentExpandTabRight" file="Interface\QuestFrame\UI-QuestLogSortTab-Right">
									<Size x="8" y="32"/>
									<Anchors>
										<Anchor point="LEFT" relativeTo="$parentExpandTabMiddle" relativePoint="RIGHT"/>
									</Anchors>
								</Texture>
							</Layer>
						</Layers>
						<Frames>
							<Button name="$parentCollapseAllButton" hidden="false" inherits="ClassTrainerSkillButtonTemplate">
								<Size x="40" y="22"/>
								<Anchors>
									<Anchor point="LEFT" relativeTo="$parentExpandTabLeft" relativePoint="RIGHT">
										<Offset x="0" y="3"/>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										getglobal(self:GetName()):SetText(ALL);
									</OnLoad>
									<OnClick>
										Cauldron:CollapseAllButton_OnClick(self);
									</OnClick>
								</Scripts>
							</Button>
						</Frames>
					</Frame>
					<ScrollFrame name="$parentScrollFrame" inherits="ClassTrainerDetailScrollFrameTemplate">
						<Size x="300" y="338" />
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="CauldronSkillListFrame" relativePoint="TOPLEFT">
								<Offset x="0" y="-8"/>
							</Anchor>
						</Anchors>
						<ScrollChild>
							<Frame name="$parentScrollChild">
								<Size x="300" y="338" />
								<Anchors>
									<Anchor point="TOPLEFT">
										<Offset x="0" y="0"/>
									</Anchor>
								</Anchors>
								<Frames>
								</Frames>
							</Frame>
						</ScrollChild>
					</ScrollFrame>
                </Frames>
            </Frame>

            <!-- Skill Info frame -->
            <Frame name="CauldronSkillInfoFrame">
                <Size x="330" y="100" />
                <Anchors>
                    <Anchor point="TOPRIGHT" relativeTo="CauldronFrame" relativePoint="TOPRIGHT">
                        <Offset x="-10" y="-36" />
                    </Anchor>
                </Anchors>

                <Layers>
                    <Layer level="OVERLAY">
                        <FontString name="$parentQueueLabel" inherits="GameFontNormal" text="Queue">
                            <Anchors>
                                <Anchor point="TOP" relativeTo="CauldronSkillInfoFrame" relativePoint="TOP">
                                    <Offset x="0" y="-18" />
                                </Anchor>
                            </Anchors>
                        </FontString>
                    </Layer>
                </Layers>

                <Frames>
        			<StatusBar name="CauldronRankFrame" drawLayer="ARTWORK"
        					   minValue="0" maxValue="1" defaultValue="0"
        					   enableMouse="false">
        				<Size x="325" y="14"/>
        				<Anchors>
        					<Anchor point="TOPLEFT">
        						<Offset x="0" y="-2"/>
        					</Anchor>
        				</Anchors>
        				<Layers>
        					<Layer level="OVERLAY">
                                <FontString name="$parentSkillName" inherits="GameFontHighlightSmall" justifyH="LEFT">
                                    <Size x="320" y="9"/>
                                    <Anchors>
                                        <Anchor point="TOP" relativeTo="CauldronRankFrame">
                                            <Offset x="0" y="-2"/>
                                        </Anchor>
                                    </Anchors>
                                    <Color r="1.0" g="1.0" b="0.0" a="1.0" />
                                </FontString>
        						<FontString name="$parentSkillRank" inherits="GameFontHighlightSmall" justifyH="RIGHT">
        							<Size x="320" y="9"/>
        							<Anchors>
        								<Anchor point="TOP" relativeTo="CauldronRankFrame">
        									<Offset x="0" y="-2"/>
        								</Anchor>
        							</Anchors>
        						</FontString>
        					</Layer>
        					<Layer level="BORDER">
        						<Texture name="$parentBorder" file="Interface\PaperDollInfoFrame\UI-Character-Skills-BarBorder">
        							<Size x="334" y="27"/>
        							<Anchors>
        								<Anchor point="LEFT">
        									<Offset x="-5" y="0"/>
        								</Anchor>
        							</Anchors>
        						</Texture>
        					</Layer>
        					<Layer level="BACKGROUND">
        						<Texture name="$parentBackground">
        							<Color r="1.0" g="1.0" b="1.0" a="0.2"/>
        						</Texture>
        					</Layer>
        				</Layers>
        				<Scripts>
        					<!--
        					<OnLoad>
        						self:RegisterEvent("SKILL_LINES_CHANGED");
        					</OnLoad>
        					<OnEvent>
        						if event == "SKILL_LINES_CHANGED" then
        							Cauldron:Frame_Update();
        						end
        					</OnEvent>
        					-->
        				</Scripts>
        				<BarTexture name="$parentBar" file="Interface\PaperDollInfoFrame\UI-Character-Skills-Bar" drawLayer="ARTWORK" />
        				<BarColor r="0.25" g="0.25" b="0.75" />
        			</StatusBar>
                </Frames>
            </Frame>

            <!-- Queue frame -->
            <Frame name="CauldronQueueFrame">
                <Size x="320" y="400" />
                <Anchors>
                    <Anchor point="TOPRIGHT" relativeTo="CauldronFrame" relativePoint="TOPRIGHT">
                        <Offset x="-20" y="-76" />
                    </Anchor>
                </Anchors>

                <Frames>
                	<Frame name="$parentQueueEmpty">
						<Size x="302" y="360" />
                		<Anchors>
                			<Anchor point="TOPLEFT">
								<Offset x="0" y="0" />
                			</Anchor>
                		</Anchors>
						<Layers>
							<Layer level="OVERLAY">
								<FontString name="$parentText" inherits="QuestTitleFont"
											text=""
											justifyH="CENTER" justifyV="CENTER">
									<Size x="302" y="360" />
									<Anchors>
										<Anchor point="TOPLEFT">
											<Offset x="0" y="0" />
										</Anchor>
									</Anchors>
									<Color r="0.2" g="0.2" b="0.2" />
								</FontString>
							</Layer>
						</Layers>
                	</Frame>

					<ScrollFrame name="$parentScrollFrame" inherits="ClassTrainerDetailScrollFrameTemplate" hidden="true">
						<Size x="302" y="360" />
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset x="0" y="0"/>
							</Anchor>
						</Anchors>
						<ScrollChild>
							<Frame name="$parentQueueSections">
								<Size x="302" y="360" />
								<Anchors>
									<Anchor point="TOPLEFT">
										<Offset x="0" y="0"/>
									</Anchor>
								</Anchors>
								<Frames>
									<Frame name="$parentMainItemsHeader">
										<Size x="300" y="12" />
										<Anchors>
											<Anchor point="TOPLEFT">
												<Offset x="0" y="0" />
											</Anchor>
										</Anchors>
										<Layers>
											<Layer level="OVERLAY">
												<FontString name="$parentText" inherits="QuestFont" text="">
													<Anchors>
														<Anchor point="TOPLEFT">
															<Offset x="0" y="0" />
														</Anchor>
													</Anchors>
													<Color r="0.2" g="0.2" b="0.2" />
												</FontString>
											</Layer>
										</Layers>
									</Frame>
									<Frame name="$parentMainItems">
										<Size x="300" y="1" />
										<Anchors>
											<Anchor point="TOPLEFT" relativeTo="$parentMainItemsHeader" relativePoint="BOTTOMLEFT">
												<Offset x="0" y="-2" />
											</Anchor>
										</Anchors>
									</Frame>
									<Frame name="$parentSecondaryItemsHeader">
										<Size x="300" y="12" />
										<Anchors>
											<Anchor point="TOPLEFT" relativeTo="$parentMainItems" relativePoint="BOTTOMLEFT">
												<Offset x="0" y="-2" />
											</Anchor>
										</Anchors>
										<Layers>
											<Layer level="OVERLAY">
												<FontString name="$parentText" inherits="QuestFont" text="">
													<Anchors>
														<Anchor point="TOPLEFT">
															<Offset x="0" y="0" />
														</Anchor>
													</Anchors>
													<Color r="0.2" g="0.2" b="0.2" />
												</FontString>
											</Layer>
										</Layers>
									</Frame>
									<Frame name="$parentSecondaryItems">
										<Size x="300" y="1" />
										<Anchors>
											<Anchor point="TOPLEFT" relativeTo="$parentSecondaryItemsHeader" relativePoint="BOTTOMLEFT">
												<Offset x="0" y="-2" />
											</Anchor>
										</Anchors>
									</Frame>
									<Frame name="$parentReagentsHeader">
										<Size x="300" y="12" />
										<Anchors>
											<Anchor point="TOPLEFT" relativeTo="$parentSecondaryItems" relativePoint="BOTTOMLEFT">
												<Offset x="0" y="-2" />
											</Anchor>
										</Anchors>
										<Layers>
											<Layer level="OVERLAY">
												<FontString name="$parentText" inherits="QuestFont" text="">
													<Anchors>
														<Anchor point="TOPLEFT">
															<Offset x="0" y="0" />
														</Anchor>
													</Anchors>
													<Color r="0.2" g="0.2" b="0.2" />
												</FontString>
											</Layer>
										</Layers>
									</Frame>
									<Frame name="$parentReagents">
										<Size x="300" y="1" />
										<Anchors>
											<Anchor point="TOPLEFT" relativeTo="$parentReagentsHeader" relativePoint="BOTTOMLEFT">
												<Offset x="0" y="-2" />
											</Anchor>
										</Anchors>
									</Frame>
								</Frames>
							</Frame>
						</ScrollChild>
					</ScrollFrame>
                </Frames>
            </Frame>

            <!-- Close button -->
            <Button name="CauldronFrameCloseButton" inherits="UIPanelCloseButton">
                <Anchors>
                    <Anchor point="TOPRIGHT" relativeTo="CauldronFrame" relativePoint="TOPRIGHT">
                        <Offset x="-2" y="-8"/>
                    </Anchor>
                </Anchors>
                <Scripts>
                    <OnClick>
                        HideUIPanel(TradeSkillFrame);
						PlaySound("igCharacterInfoClose");
                    </OnClick>
                </Scripts>
            </Button>

            <!-- Buttons frame -->
            <Frame name="CauldronButtonsFrame">
                <Size x="684" y="25" />
                <Anchors>
                    <Anchor point="BOTTOMLEFT" relativeTo="CauldronFrame" relativePoint="BOTTOMLEFT">
                        <Offset x="13" y="0" />
                    </Anchor>
                </Anchors>

                <Frames>

                    <!-- Queue All button -->
                    <Button name="CauldronQueueAllButton" inherits="CauldronButtonTemplate" text="Queue All">
                        <Anchors>
                            <Anchor point="TOPLEFT">
                                <Offset x="0" y="0" />
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnLoad>
                                getglobal(self:GetName()):Disable();
                            </OnLoad>
							<OnEnter>
								GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT");
								GameTooltip:ClearLines();
								GameTooltip:AddLine(Cauldron:LocaleString("Click to queue the listed amount of this item"));
								GameTooltip:AddLine(Cauldron:LocaleString("Shift-click to queue the listed potential amount of this item"));
								GameTooltip:Show();
								CursorUpdate(self);
							</OnEnter>
							<OnLeave>
								GameTooltip:Hide();
								ResetCursor();
							</OnLeave>
                            <OnClick>
                            	Cauldron:QueueAllTradeSkillItem();
                            	Cauldron:UpdateButtons();
                            </OnClick>
                        </Scripts>
                    </Button>

                    <!-- Create All button (disabled) -->
                    <Button name="CauldronCreateAllButton" inherits="CauldronButtonTemplate" text="CREATE_ALL">
                        <Anchors>
                            <Anchor point="LEFT" relativeTo="CauldronQueueAllButton" relativePoint="RIGHT">
                                <Offset x="0" y="0" />
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnLoad>
                                getglobal(self:GetName()):Disable();
                            </OnLoad>
							<OnClick>
								Cauldron:CreateAllTradeSkillItem();
							</OnClick>
                        </Scripts>
                    </Button>

                    <!-- Number input -->
                    <Button name="CauldronAmountDecrementButton">
                        <Size x="23" y="22" />
                        <Anchors>
                            <Anchor point="LEFT" relativeTo="CauldronCreateAllButton" relativePoint="RIGHT">
                                <Offset x="0" y="0" />
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnClick>
                                Cauldron:AmountDecrement_OnClick();
                                CauldronAmountInputBox:ClearFocus();
							</OnClick>
                        </Scripts>
                        <NormalTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Up" />
                        <PushedTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Down" />
                        <DisabledTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Disabled" />
                        <HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD" />
                    </Button>
                    <EditBox name="CauldronAmountInputBox" letters="3" numeric="true" autoFocus="false">
                        <Size x="30" y="20" />
                        <Anchors>
                            <Anchor point="LEFT" relativeTo="CauldronAmountDecrementButton" relativePoint="RIGHT">
                                <Offset x="4" y="0" />
                            </Anchor>
                        </Anchors>
                        <Layers>
                            <Layer level="BACKGROUND">
                                <Texture name="$parentLeft" file="Interface\Common\Common-Input-Border">
                                    <Size x="8" y="20" />
                                    <Anchors>
                                        <Anchor point="TOPLEFT">
                                            <Offset x="-5" y="0" />
                                        </Anchor>
                                    </Anchors>
                                    <TexCoords left="0" right="0.0625" top="0" bottom="0.625" />
                                </Texture>
                                <Texture name="$parentRight" file="Interface\Common\Common-Input-Border">
                                    <Size x="8" y="20" />
                                    <Anchors>
                                        <Anchor point="RIGHT">
                                            <Offset x="0" y="0" />
                                        </Anchor>
                                    </Anchors>
                                    <TexCoords left="0.9375" right="1.0" top="0" bottom="0.625" />
                                </Texture>
                                <Texture name="$parentMiddle" file="Interface\Common\Common-Input-Border">
                                    <Size x="10" y="20" />
                                    <Anchors>
                                        <Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT" />
                                        <Anchor point="RIGHT" relativeTo="$parentRight" relativePoint="LEFT" />
                                    </Anchors>
                                    <TexCoords left="0.0625" right="0.9375" top="0" bottom="0.625" />
                                </Texture>
                            </Layer>
                        </Layers>
                        <Scripts>
                        	<OnLoad>
                        		self:SetText("1");
                        	</OnLoad>
                            <OnEnterPressed>
                                self:ClearFocus();
							</OnEnterPressed>
                            <OnEscapePressed>
                                self:ClearFocus();
							</OnEscapePressed>
                            <OnTextChanged>
                                if ( self:GetText() == "0" ) then
									self:SetText("1");
                                end
							</OnTextChanged>
                            <OnEditFocusLost>
                                self:HighlightText(0, 0);
							</OnEditFocusLost>
                            <OnEditFocusGained>
                                self:HighlightText();
							</OnEditFocusGained>
                        </Scripts>
                        <FontString inherits="ChatFontNormal" />
                    </EditBox>
                    <Button name="CauldronAmountIncrementButton">
                        <Size x="23" y="22" />
                        <Anchors>
                            <Anchor point="LEFT" relativeTo="CauldronAmountInputBox" relativePoint="RIGHT">
                                <Offset x="-3" y="0" />
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnClick>
                                Cauldron:AmountIncrement_OnClick();
                                CauldronAmountInputBox:ClearFocus();
                            </OnClick>
                        </Scripts>
                        <NormalTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Up" />
                        <PushedTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Down" />
                        <DisabledTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Disabled" />
                        <HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD" />
                    </Button>

                    <!-- Create button (disabled) -->
                    <Button name="CauldronCreateButton" inherits="CauldronButtonTemplate" text="CREATE">
                        <Anchors>
                            <Anchor point="LEFT" relativeTo="CauldronAmountIncrementButton" relativePoint="RIGHT">
                                <Offset x="0" y="0" />
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnLoad>
                                getglobal(self:GetName()):Disable();
                            </OnLoad>
							<OnClick>
								Cauldron:CreateTradeSkillItem();
							</OnClick>
                        </Scripts>
                    </Button>

                    <!-- Queue button -->
                    <Button name="CauldronQueueButton" inherits="CauldronButtonTemplate" text="Queue">
                        <Anchors>
                            <Anchor point="LEFT" relativeTo="CauldronCreateButton" relativePoint="RIGHT">
                                <Offset x="0" y="0" />
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnLoad>
                                getglobal(self:GetName()):Disable();
                            </OnLoad>
							<OnClick>
								Cauldron:QueueTradeSkillItem();
                            	Cauldron:UpdateButtons();
							</OnClick>
                        </Scripts>
                    </Button>

                    <!-- spacer -->

                    <!-- Process button (disabled) -->
                    <Button name="CauldronProcessButton" inherits="CauldronButtonTemplate" text="Process">
                        <Anchors>
                            <Anchor point="LEFT" relativeTo="CauldronQueueButton" relativePoint="RIGHT">
                                <Offset x="10" y="0" />
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnLoad>
                                getglobal(self:GetName()):Disable();
                            </OnLoad>
							<OnClick>
								Cauldron:ProcessQueue();
							</OnClick>
                        </Scripts>
                    </Button>

                    <!-- Clear Queue button (disabled) -->
                    <Button name="CauldronClearQueueButton" inherits="CauldronButtonTemplate" text="Clear Queue">
                        <Size x="90" y="20" />
                        <Anchors>
                            <Anchor point="LEFT" relativeTo="CauldronProcessButton" relativePoint="RIGHT">
                                <Offset x="0" y="0" />
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnLoad>
                                getglobal(self:GetName()):Disable();
                            </OnLoad>
							<OnClick>
								CauldronQueue:ClearQueue(Cauldron:GetQueue());
								Cauldron:UpdateQueue();
								Cauldron:UpdateButtons();
							</OnClick>
                        </Scripts>
                    </Button>

                    <!-- spacer -->

                    <!-- Close button -->
                    <Button name="CauldronCloseButton" inherits="CauldronButtonTemplate" text="CLOSE">
                        <Anchors>
                            <Anchor point="LEFT" relativeTo="CauldronClearQueueButton" relativePoint="RIGHT">
                                <Offset x="12" y="0" />
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnClick>
								HideUIPanel(TradeSkillFrame);
								PlaySound("igCharacterInfoClose");
                            </OnClick>
                        </Scripts>
                    </Button>
                </Frames>
            </Frame>
        </Frames>

        <Scripts>
            <OnLoad>
                self:SetBackdropColor(.05,.05,.05,.8);
                self:SetBackdropBorderColor(.4,.4,.4,1);
                -- tinsert(UISpecialFrames, self:GetName());
                CauldronFrameTitleText:SetText(Cauldron:LocaleString("Cauldron").." "..Cauldron.version);
            </OnLoad>
            <OnShow>
                PlaySound("igCharacterInfoOpen");
            </OnShow>
            <OnHide>
                --HideUIPanel(CauldronFrame);
                PlaySound("igCharacterInfoClose");
            </OnHide>
            <OnMouseWheel>
                return;
            </OnMouseWheel>
        </Scripts>
    </Frame>

</Ui>