<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,6 +1,7 @@
 
-local lib, oldminor = LibStub:NewLibrary(&quot;tektip-1.0&quot;, 1)
+local lib, oldminor = LibStub:NewLibrary(&quot;tektip-1.0&quot;, 3)
 if not lib then return end
+oldminor = oldminor or 0
 
 
 local PADDING, VGAP, HGAP = 5, 2, 5
@@ -9,136 +10,154 @@ local TOOLTIP_PADDING = PADDING + HGAP
 local bgFrame = {bgFile = &quot;Interface\\Tooltips\\UI-Tooltip-Background&quot;, insets = {left = PADDING, right = PADDING, top = PADDING, bottom = PADDING},
 	tile = true, tileSize = 16, edgeFile = &quot;Interface\\Tooltips\\UI-Tooltip-Border&quot;, edgeSize = 16}
 
-local linemeta = {__index = function(t,i)
-	if i == &quot;header&quot; then
-		local h = CreateFrame(&quot;Frame&quot;, nil, t.frame)
-		h:SetHeight(1)
-		if t.colnum == 1 then
-			h:SetPoint(&quot;TOPLEFT&quot;, t.frame, &quot;TOPLEFT&quot;, TOOLTIP_PADDING, -TOOLTIP_PADDING)
-		else
-			h:SetPoint(&quot;LEFT&quot;, t.frame.cols[t.colnum-1].header, &quot;RIGHT&quot;, HGAP, 0)
+if oldminor &lt; 1 then
+	local linemeta = {__index = function(t,i)
+		if i == &quot;header&quot; then
+			local h = CreateFrame(&quot;Frame&quot;, nil, t.frame)
+			h:SetHeight(1)
+			if t.colnum == 1 then
+				h:SetPoint(&quot;TOPLEFT&quot;, t.frame, &quot;TOPLEFT&quot;, TOOLTIP_PADDING, -TOOLTIP_PADDING)
+			else
+				h:SetPoint(&quot;LEFT&quot;, t.frame.cols[t.colnum-1].header, &quot;RIGHT&quot;, HGAP, 0)
+			end
+			t[i] = h
+			return h
 		end
-		t[i] = h
-		return h
-	end
 
-	local fs = t.frame:CreateFontString(nil, nil, i == 1 and &quot;GameTooltipHeaderText&quot; or &quot;GameTooltipText&quot;)
-	if t.colnum == 1 then
-		if i == 1 then
-			fs:SetPoint(&quot;TOPLEFT&quot;, t.frame, &quot;TOPLEFT&quot;, TOOLTIP_PADDING, -TOOLTIP_PADDING)
+		local fs = t.frame:CreateFontString(nil, nil, i == 1 and &quot;GameTooltipHeaderText&quot; or &quot;GameTooltipText&quot;)
+		if t.colnum == 1 then
+			if i == 1 then
+				fs:SetPoint(&quot;TOPLEFT&quot;, t.frame, &quot;TOPLEFT&quot;, TOOLTIP_PADDING, -TOOLTIP_PADDING)
+			else
+				fs:SetPoint(&quot;TOPLEFT&quot;, t[i-1], &quot;BOTTOMLEFT&quot;, 0, -VGAP)
+			end
 		else
-			fs:SetPoint(&quot;TOPLEFT&quot;, t[i-1], &quot;BOTTOMLEFT&quot;, 0, -VGAP)
+			fs:SetPoint(&quot;TOP&quot;, t.frame.cols[t.colnum-1][i], &quot;TOP&quot;)
+			fs:SetPoint(&quot;LEFT&quot;, t.header, &quot;LEFT&quot;)
+			fs:SetPoint(&quot;RIGHT&quot;, t.header, &quot;RIGHT&quot;)
+		end
+		fs:SetJustifyH(t.justify)
+		t[i] = fs
+		return fs
+	end}
+
+	function lib.new(cols, ...)
+		assert(type(cols) == &quot;number&quot; and cols &gt;= 2, &quot;Must have at least two columns.&quot;)
+
+		local f = CreateFrame(&quot;Frame&quot;, nil, UIParent)
+		f:SetBackdrop(bgFrame)
+		f:SetBackdropBorderColor(TOOLTIP_DEFAULT_COLOR.r, TOOLTIP_DEFAULT_COLOR.g, TOOLTIP_DEFAULT_COLOR.b)
+		f:SetBackdropColor(TOOLTIP_DEFAULT_BACKGROUND_COLOR.r, TOOLTIP_DEFAULT_BACKGROUND_COLOR.g, TOOLTIP_DEFAULT_BACKGROUND_COLOR.b)
+		f:SetFrameStrata(&quot;TOOLTIP&quot;)
+		f:SetClampedToScreen(true)
+
+		f.cols = {}
+		for i=1,cols do
+			local justify = select(i, ...) or i == 1 and &quot;LEFT&quot; or i == cols and &quot;RIGHT&quot; or &quot;CENTER&quot;
+			f.cols[i] = setmetatable({frame = f, colnum = i, justify = justify}, linemeta)
 		end
-	else
-		fs:SetPoint(&quot;TOP&quot;, t.frame.cols[t.colnum-1][i], &quot;TOP&quot;)
-		fs:SetPoint(&quot;LEFT&quot;, t.header, &quot;LEFT&quot;)
-		fs:SetPoint(&quot;RIGHT&quot;, t.header, &quot;RIGHT&quot;)
-	end
-	fs:SetJustifyH(t.justify)
-	t[i] = fs
-	return fs
-end}
-
-function lib.new(cols, ...)
-	assert(type(cols) == &quot;number&quot; and cols &gt;= 2, &quot;Must have at least two columns.&quot;)
-
-	local f = CreateFrame(&quot;Frame&quot;, nil, UIParent)
-	f:SetBackdrop(bgFrame)
-	f:SetBackdropBorderColor(TOOLTIP_DEFAULT_COLOR.r, TOOLTIP_DEFAULT_COLOR.g, TOOLTIP_DEFAULT_COLOR.b)
-	f:SetBackdropColor(TOOLTIP_DEFAULT_BACKGROUND_COLOR.r, TOOLTIP_DEFAULT_BACKGROUND_COLOR.g, TOOLTIP_DEFAULT_BACKGROUND_COLOR.b)
-	f:SetFrameStrata(&quot;TOOLTIP&quot;)
-	f:SetClampedToScreen(true)
-
-	f.cols = {}
-	for i=1,cols do
-		local justify = select(i, ...) or i == 1 and &quot;LEFT&quot; or i == cols and &quot;RIGHT&quot; or &quot;CENTER&quot;
-		f.cols[i] = setmetatable({frame = f, colnum = i, justify = justify}, linemeta)
-	end
 
-	f.AddLine = lib.AddLine
-	f.AddMultiLine = lib.AddMultiLine
-	f.Clear = lib.Clear
-	f.AnchorTo = lib.AnchorTo
+		f.AddLine = lib.AddLine
+		f.AddMultiLine = lib.AddMultiLine
+		f.Clear = lib.Clear
+		f.AnchorTo = lib.AnchorTo
 
-	f:SetScript(&quot;OnHide&quot;, lib.Clear)
-	f:SetScript(&quot;OnShow&quot;, lib.OnShow)
+		f:SetScript(&quot;OnHide&quot;, lib.Clear)
+		f:SetScript(&quot;OnShow&quot;, lib.OnShow)
 
-	f:Hide()
-	return f
-end
+		f:Hide()
+		return f
+	end
 
 
-local function GetTipAnchor(frame)
-	local x,y = frame:GetCenter()
-	if not x or not y then return &quot;TOPLEFT&quot;, &quot;BOTTOMLEFT&quot; end
-	local hhalf = (x &gt; UIParent:GetWidth()*2/3) and &quot;RIGHT&quot; or (x &lt; UIParent:GetWidth()/3) and &quot;LEFT&quot; or &quot;&quot;
-	local vhalf = (y &gt; UIParent:GetHeight()/2) and &quot;TOP&quot; or &quot;BOTTOM&quot;
-	return vhalf..hhalf, frame, (vhalf == &quot;TOP&quot; and &quot;BOTTOM&quot; or &quot;TOP&quot;)..hhalf
-end
+	local function GetTipAnchor(frame)
+		local x,y = frame:GetCenter()
+		if not x or not y then return &quot;TOPLEFT&quot;, &quot;BOTTOMLEFT&quot; end
+		local hhalf = (x &gt; UIParent:GetWidth()*2/3) and &quot;RIGHT&quot; or (x &lt; UIParent:GetWidth()/3) and &quot;LEFT&quot; or &quot;&quot;
+		local vhalf = (y &gt; UIParent:GetHeight()/2) and &quot;TOP&quot; or &quot;BOTTOM&quot;
+		return vhalf..hhalf, frame, (vhalf == &quot;TOP&quot; and &quot;BOTTOM&quot; or &quot;TOP&quot;)..hhalf
+	end
 
-function lib:AnchorTo(frame)
-	self:Clear()
-	self:ClearAllPoints()
-	self:SetPoint(GetTipAnchor(frame))
-end
+	function lib:AnchorTo(frame)
+		self:Clear()
+		self:ClearAllPoints()
+		self:SetPoint(GetTipAnchor(frame))
+	end
 
 
-function lib:Clear()
-	self.numlines = 0
-	for i,col in pairs(self.cols) do
-		for j,fs in ipairs(col) do
-			fs:Hide()
+	function lib:Clear()
+		self.numlines = 0
+		for i,col in pairs(self.cols) do
+			for j,fs in ipairs(col) do
+				fs:Hide()
+			end
 		end
 	end
 end
 
 
-function lib:AddLine(text, r, g, b)
-	self.numlines = self.numlines + 1
-	local fs = self.cols[1][self.numlines]
-	fs:SetTextColor(r or NORMAL_FONT_COLOR.r, g or NORMAL_FONT_COLOR.g, b or NORMAL_FONT_COLOR.b)
-	fs:SetText(text)
-	fs:SetPoint(&quot;RIGHT&quot;, self.cols[#self.cols].header, &quot;RIGHT&quot;)
-	for i=2,#self.cols do self.cols[i][self.numlines]:SetText(nil) end
-	fs:Show()
-end
-
-
-function lib:AddMultiLine(...)
-	self.numlines = self.numlines + 1
-	local numdots = select(&quot;#&quot;, ...)
-	for i=1,#self.cols do
-		local fs = self.cols[i][self.numlines]
-		local text = select(i, ...)
-		local r, g, b
-		if numdots &gt;= (#self.cols + i*3) then r, g, b = select(#self.cols + i*3 - 2, ...) end
+if oldminor &lt; 3 then
+	function lib:AddLine(text, r, g, b, wrap)
+		self.numlines = self.numlines + 1
+		local fs = self.cols[1][self.numlines]
 		fs:SetTextColor(r or NORMAL_FONT_COLOR.r, g or NORMAL_FONT_COLOR.g, b or NORMAL_FONT_COLOR.b)
-		fs:SetText(text == &quot;&quot; and &quot; &quot; or text)
-		if i == 1 then fs:SetPoint(&quot;RIGHT&quot;, self.cols[1].header, &quot;RIGHT&quot;) end
+		fs:SetText(text)
+		fs:SetPoint(&quot;RIGHT&quot;, self.cols[#self.cols].header, &quot;RIGHT&quot;)
+		fs.wrapped = wrap
+		for i=2,#self.cols do self.cols[i][self.numlines]:SetText(nil) end
 		fs:Show()
 	end
 end
 
 
-function lib:OnShow()
-	local h, w, totalw = 0, 0, 0
-	for i=1,#self.cols do
-		local colw = 0
-		for j=1,self.numlines do
-			local fs = self.cols[i][j]
-			if i == 1 then h = h + fs:GetHeight() end
-			if i ~= 1 or self.cols[2][j]:GetText() then colw = math.max(colw, fs:GetStringWidth())
-			else totalw = math.max(totalw, fs:GetStringWidth()) end
+if oldminor &lt; 1 then
+	function lib:AddMultiLine(...)
+		self.numlines = self.numlines + 1
+		local numdots = select(&quot;#&quot;, ...)
+		for i=1,#self.cols do
+			local fs = self.cols[i][self.numlines]
+			local text = select(i, ...)
+			local r, g, b
+			if numdots &gt;= (#self.cols + i*3) then r, g, b = select(#self.cols + i*3 - 2, ...) end
+			fs:SetTextColor(r or NORMAL_FONT_COLOR.r, g or NORMAL_FONT_COLOR.g, b or NORMAL_FONT_COLOR.b)
+			fs:SetText(text == &quot;&quot; and &quot; &quot; or text)
+			if i == 1 then fs:SetPoint(&quot;RIGHT&quot;, self.cols[1].header, &quot;RIGHT&quot;) end
+			fs:Show()
 		end
-		self.cols[i].header:SetWidth(colw)
-		w = w + colw
 	end
-	self:SetHeight(h + TOOLTIP_PADDING*2 + (self.numlines-1)*VGAP)
-	if w &lt; (totalw - (#self.cols-1)*HGAP) then
-		self:SetWidth(totalw + TOOLTIP_PADDING*2)
-		local extra = totalw - w - (#self.cols-1)*HGAP
-		for i=1,#self.cols do self.cols[i].header:SetWidth(extra/#self.cols + self.cols[i].header:GetWidth()) end
-	else
-		self:SetWidth(w + (#self.cols-1)*HGAP + TOOLTIP_PADDING*2)
+end
+
+
+if oldminor &lt; 3 then
+	function lib:OnShow()
+		local w, totalw = 0, 0
+		for i=1,#self.cols do
+			local colw = 1
+			for j=1,self.numlines do
+				local fs = self.cols[i][j]
+				if i ~= 1 or self.cols[2][j]:GetText() then colw = math.max(colw, fs:GetStringWidth())
+				elseif not fs.wrapped then totalw = math.max(totalw, fs:GetStringWidth()) end
+			end
+			self.cols[i].header:SetWidth(colw)
+			w = w + colw
+		end
+
+		if w &lt; (totalw - (#self.cols-1)*HGAP) then
+			local extra = totalw - w - (#self.cols-1)*HGAP
+			for i=1,#self.cols do self.cols[i].header:SetWidth(extra/#self.cols + self.cols[i].header:GetWidth()) end
+			w = totalw
+		else
+			w = w + (#self.cols-1)*HGAP
+		end
+		self:SetWidth(w + TOOLTIP_PADDING*2)
+
+		local h = 0
+		for i=1,self.numlines do
+			local fs = self.cols[1][i]
+			fs:SetWidth(fs.wrapped and w or 0)
+			h = h + fs:GetHeight()
+		end
+
+		self:SetHeight(h + TOOLTIP_PADDING*2 + (self.numlines-1)*VGAP)
 	end
 end</diff>
      <filename>tektip.lua</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>92565d5512f319db8dc7545725be52d1f38a289a</id>
    </parent>
  </parents>
  <author>
    <name>Tekkub</name>
    <email>tekkub@gmail.com</email>
  </author>
  <url>http://github.com/tekkub/picodps/commit/c5ce4a0bdbdfc62f75770722b39bb36680c14c9f</url>
  <id>c5ce4a0bdbdfc62f75770722b39bb36680c14c9f</id>
  <committed-date>2008-11-23T21:27:04-08:00</committed-date>
  <authored-date>2008-11-23T21:27:04-08:00</authored-date>
  <message>Embed update</message>
  <tree>ae6285b72852794bd25df490b9413c5baa91b1f1</tree>
  <committer>
    <name>Tekkub</name>
    <email>tekkub@gmail.com</email>
  </committer>
</commit>
