WoWInterface SVN NeedyGreedy

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 136 to Rev 137
    Reverse comparison

Rev 136 → Rev 137

libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
2,14 → 2,14
TreeGroup Container
Container that uses a tree control to switch between groups.
-------------------------------------------------------------------------------]]
local Type, Version = "TreeGroup", 33
local Type, Version = "TreeGroup", 34
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
-- Lua APIs
local next, pairs, ipairs, assert, type = next, pairs, ipairs, assert, type
local math_min, math_max, floor = math.min, math.max, floor
local select, tremove, unpack = select, table.remove, unpack
local select, tremove, unpack, tconcat = select, table.remove, unpack, table.concat
 
-- WoW APIs
local CreateFrame, UIParent = CreateFrame, UIParent
385,7 → 385,7
end
end,
 
["RefreshTree"] = function(self)
["RefreshTree"] = function(self,scrollToSelection)
local buttons = self.buttons
local lines = self.lines
 
407,6 → 407,8
local tree = self.tree
 
local treeframe = self.treeframe
 
status.scrollToSelection = status.scrollToSelection or scrollToSelection -- needs to be cached in case the control hasn't been drawn yet (code bails out below)
 
self:BuildLevel(tree, 1)
 
416,6 → 418,9
if maxlines <= 0 then return end
 
local first, last
 
scrollToSelection = status.scrollToSelection
status.scrollToSelection = nil
 
if numlines <= maxlines then
--the whole tree fits in the frame
431,11 → 436,33
if numlines - status.scrollvalue < maxlines then
status.scrollvalue = numlines - maxlines
end
self.noupdate = nil
first, last = status.scrollvalue+1, status.scrollvalue + maxlines
--show selection?
if scrollToSelection and status.selected then
local show
for i,line in ipairs(lines) do -- find the line number
if line.uniquevalue==status.selected then
show=i
end
end
if not show then
-- selection was deleted or something?
elseif show>=first and show<=last then
-- all good
else
-- scrolling needed!
if show<first then
status.scrollvalue = show-1
else
status.scrollvalue = show-maxlines
end
first, last = status.scrollvalue+1, status.scrollvalue + maxlines
end
end
if self.scrollbar:GetValue() ~= status.scrollvalue then
self.scrollbar:SetValue(status.scrollvalue)
end
self.noupdate = nil
first, last = status.scrollvalue+1, status.scrollvalue + maxlines
end
 
local buttonnum = 1
467,6 → 494,7
button:Show()
buttonnum = buttonnum + 1
end
 
end,
 
["SetSelected"] = function(self, value)
481,11 → 509,12
self.filter = false
local status = self.status or self.localstatus
local groups = status.groups
for i = 1, select('#', ...) do
groups[BuildUniqueValue(select(i, ...))] = true
local path = {...}
for i = 1, #path do
groups[tconcat(path, "\001", 1, i)] = true
end
status.selected = uniquevalue
self:RefreshTree()
self:RefreshTree(true)
self:Fire("OnGroupSelected", uniquevalue)
end,
 
libs/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua
61,6 → 61,7
 
local function OnEditFocusLost(self) -- EditBox
self:HighlightText(0, 0)
self.obj:Fire("OnEditFocusLost")
end
 
local function OnEnter(self) -- EditBox / ScrollFrame
132,8 → 133,9
frame:SetScript("OnShow", nil)
end
 
local function OnFocusGained(frame)
local function OnEditFocusGained(frame)
AceGUI:SetFocus(frame.obj)
frame.obj:Fire("OnEditFocusGained")
end
 
--[[-----------------------------------------------------------------------------
225,7 → 227,17
if not self.frame:IsShown() then
self.frame:SetScript("OnShow", OnShowFocus)
end
end
end,
 
["GetCursorPosition"] = function(self)
return self.editBox:GetCursorPosition()
end,
 
["SetCursorPosition"] = function(self, ...)
return self.editBox:SetCursorPosition(...)
end,
 
 
}
 
--[[-----------------------------------------------------------------------------
305,7 → 317,7
editBox:SetScript("OnReceiveDrag", OnReceiveDrag)
editBox:SetScript("OnTextChanged", OnTextChanged)
editBox:SetScript("OnTextSet", OnTextSet)
editBox:SetScript("OnEditFocusGained", OnFocusGained)
editBox:SetScript("OnEditFocusGained", OnEditFocusGained)
 
 
scrollFrame:SetScrollChild(editBox)
libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua
2,7 → 2,7
TabGroup Container
Container that uses tabs on top to switch between groups.
-------------------------------------------------------------------------------]]
local Type, Version = "TabGroup", 32
local Type, Version = "TabGroup", 34
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
47,7 → 47,7
frame:_SetText(text)
local width = frame.obj.frame.width or frame.obj.frame:GetWidth() or 0
if wow_406 then
PanelTemplates_TabResize(frame, 0, nil, nil, width)
PanelTemplates_TabResize(frame, 0, nil, nil, width, frame:GetFontString():GetStringWidth())
else
PanelTemplates_TabResize(frame, 0, nil, width)
end
268,7 → 268,7
 
for i = starttab, endtab do
if wow_406 then
PanelTemplates_TabResize(tabs[i], padding + 4, nil, nil, width)
PanelTemplates_TabResize(tabs[i], padding + 4, nil, nil, width, tabs[i]:GetFontString():GetStringWidth())
else
PanelTemplates_TabResize(tabs[i], padding + 4, nil, width)
end
libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua
1,4 → 1,4
--[[ $Id: AceGUIWidget-DropDown.lua 997 2010-12-01 18:36:28Z nevcairiel $ ]]--
--[[ $Id: AceGUIWidget-DropDown.lua 1029 2011-06-10 23:10:58Z nevcairiel $ ]]--
local AceGUI = LibStub("AceGUI-3.0")
 
-- Lua APIs
356,7 → 356,7
 
do
local widgetType = "Dropdown"
local widgetVersion = 24
local widgetVersion = 25
 
--[[ Static data ]]--
 
460,6 → 460,7
 
self:SetHeight(44)
self:SetWidth(200)
self:SetLabel()
end
 
-- exported, AceGUI callback
471,7 → 472,6
self.pullout = nil
 
self:SetText("")
self:SetLabel("")
self:SetDisabled(false)
self:SetMultiselect(false)
 
516,12 → 516,14
self.label:SetText(text)
self.label:Show()
self.dropdown:SetPoint("TOPLEFT",self.frame,"TOPLEFT",-15,-18)
self.frame:SetHeight(44)
self:SetHeight(44)
self.alignoffset = 30
else
self.label:SetText("")
self.label:Hide()
self.dropdown:SetPoint("TOPLEFT",self.frame,"TOPLEFT",-15,0)
self.frame:SetHeight(26)
self:SetHeight(26)
self.alignoffset = 12
end
end
 
665,10 → 667,8
self.SetItemValue = SetItemValue
self.SetItemDisabled = SetItemDisabled
 
self.alignoffset = 31
self.alignoffset = 30
 
frame:SetHeight(44)
frame:SetWidth(200)
frame:SetScript("OnHide",Dropdown_OnHide)
 
dropdown:ClearAllPoints()