
--===================================================
--								Document Texture Data
--===================================================	
-- Textures for document material and backgrounds

--[[ Glossary:
 - Material: The texture right behind the text. e.g. parchment
 - Background: The background behind the material. E.g. a wooden board or a Color
 - Template: A whole ghu_document set up for a specific purpose
 - Collection: A set of textures, forming a meterial or background

--]]


local textures = {};
local collections = {};

function GHU_GetCollectionCats()

end

function GHU_GetCollectionNames(cat)

end

function GHU_GetCollection(name)
	for cat,cols in pairs(collections) do
		for _,col in pairs(cols) do
			if col.name == name then
				local t={};
				for i=1,#(col) do
					local path = col[i].path;
					if path then
						local width,height = 64,64;
						if textures[path] then
							width,heigh = textures[path][1] or 64,textures[path][2] or 64; -- 64x64 are standard
						end
						t[i] = GHU_Texture(path,width,height,col[i].type);
					end
				end
				return unpack(t);			
			end
		end	
	end
end

local col = { --Requirement. All textures must be squared
	["material"] = {
		{	name="Parchment 1",
			{path="Interface\\Icons\\Spell_Holy_WordFortitude",type="topleft"},
			{path="Interface\\Icons\\Spell_Arcane_Arcane02",type="center"},
		},
		{	name="Parchment 2",
			{path="INTERFACE\\GLUES\\MODELS\\UI_BLOODELF\\bloodelf_mountains",type="center"},
		},
	},
	
	["background"] = {
	
	},
	
};
collections = col;

local tex = { -- this can be auto generated, but might give a large memory use
	["INTERFACE\\GLUES\\MODELS\\UI_BLOODELF\\bloodelf_mountain"]={256,256},	
};

textures = tex;