WoWInterface SVN Aloft

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /branches/preview/Aloft/Libs/AceGUI-3.0
    from Rev 1990 to Rev 1994
    Reverse comparison

Rev 1990 → Rev 1994

widgets/AceGUIWidget-DropDown.lua
1,4 → 1,4
--[[ $Id: AceGUIWidget-DropDown.lua 991 2010-11-12 16:51:38Z nevcairiel $ ]]--
--[[ $Id: AceGUIWidget-DropDown.lua 997 2010-12-01 18:36:28Z nevcairiel $ ]]--
local AceGUI = LibStub("AceGUI-3.0")
 
-- Lua APIs
356,7 → 356,7
 
do
local widgetType = "Dropdown"
local widgetVersion = 23
local widgetVersion = 24
 
--[[ Static data ]]--
 
560,8 → 560,12
end
end
 
local function AddListItem(self, value, text)
local item = AceGUI:Create("Dropdown-Item-Toggle")
local function AddListItem(self, value, text, itemType)
if not itemType then itemType = "Dropdown-Item-Toggle" end
local exists = AceGUI:GetWidgetVersion(itemType)
if not exists then error(("The given item type, %q, does not exist within AceGUI-3.0"):format(tostring(itemType)), 2) end
 
local item = AceGUI:Create(itemType)
item:SetText(text)
item.userdata.obj = self
item.userdata.value = value
580,7 → 584,7
 
-- exported
local sortlist = {}
local function SetList(self, list,order)
local function SetList(self, list, order, itemType)
self.list = list
self.pullout:Clear()
self.hasClose = nil
593,12 → 597,12
tsort(sortlist)
 
for i, key in ipairs(sortlist) do
AddListItem(self, key, list[key])
AddListItem(self, key, list[key], itemType)
sortlist[i] = nil
end
else
for i, key in ipairs(order) do
AddListItem(self, key, list[key])
AddListItem(self, key, list[key], itemType)
end
end
if self.multiselect then
608,10 → 612,10
end
 
-- exported
local function AddItem(self, value, text)
local function AddItem(self, value, text, itemType)
if self.list then
self.list[value] = text
AddListItem(self, value, text)
AddListItem(self, value, text, itemType)
end
end
 
widgets/AceGUIWidget-DropDown-Items.lua
1,4 → 1,4
--[[ $Id: AceGUIWidget-DropDown-Items.lua 916 2010-03-15 12:24:36Z nevcairiel $ ]]--
--[[ $Id: AceGUIWidget-DropDown-Items.lua 996 2010-12-01 18:34:17Z nevcairiel $ ]]--
 
local AceGUI = LibStub("AceGUI-3.0")
 
215,6 → 215,12
return self
end
 
-- Register a dummy LibStub library to retrieve the ItemBase, so other addons can use it.
local IBLib = LibStub:NewLibrary("AceGUI-3.0-DropDown-ItemBase", ItemBase.version)
if IBLib then
IBLib.GetItemBase = function() return ItemBase end
end
 
--[[
Template for items:
 
widgets/AceGUIContainer-TreeGroup.lua
2,7 → 2,7
TreeGroup Container
Container that uses a tree control to switch between groups.
-------------------------------------------------------------------------------]]
local Type, Version = "TreeGroup", 31
local Type, Version = "TreeGroup", 32
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
413,6 → 413,7
local numlines = #lines
 
local maxlines = (floor(((self.treeframe:GetHeight()or 0) - 20 ) / 18))
if maxlines <= 0 then return end
 
local first, last
 
429,6 → 430,8
--check if we are scrolled down too far
if numlines - status.scrollvalue < maxlines then
status.scrollvalue = numlines - maxlines
end
if self.scrollbar:GetValue() ~= status.scrollvalue then
self.scrollbar:SetValue(status.scrollvalue)
end
self.noupdate = nil
446,13 → 449,13
button:SetParent(treeframe)
button:SetFrameLevel(treeframe:GetFrameLevel()+1)
button:ClearAllPoints()
if i == 1 then
if buttonnum == 1 then
if self.showscroll then
button:SetPoint("TOPRIGHT", self.treeframe,"TOPRIGHT",-22,-10)
button:SetPoint("TOPLEFT", self.treeframe, "TOPLEFT", 0, -10)
button:SetPoint("TOPRIGHT", -22, -10)
button:SetPoint("TOPLEFT", 0, -10)
else
button:SetPoint("TOPRIGHT", self.treeframe,"TOPRIGHT",0,-10)
button:SetPoint("TOPLEFT", self.treeframe, "TOPLEFT", 0, -10)
button:SetPoint("TOPRIGHT", 0, -10)
button:SetPoint("TOPLEFT", 0, -10)
end
else
button:SetPoint("TOPRIGHT", buttons[buttonnum-1], "BOTTOMRIGHT",0,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", 30
local Type, Version = "TabGroup", 31
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
248,8 → 248,10
 
-- equal padding for each tab to fill the available width,
-- if the used space is above 75% already
-- the 18 pixel is the typical width of a scrollbar, so we can have a tab group inside a scrolling frame,
-- and not have the tabs jump around funny when switching between tabs that need scrolling and those that don't
local padding = 0
if not (numrows == 1 and rowwidths[1] < width*0.75) then
if not (numrows == 1 and rowwidths[1] < width*0.75 - 18) then
padding = (width - rowwidths[row]) / (endtab - starttab+1)
end