lib-ScrollingTable

  • 11 pages found
NameAuthorLast updated byUpdated on
NameAuthorLast updated byUpdated on
API ddumont ddumont Jun 06, 2011
ClearSelection(self) Clear the currently selected row. You should not need to refresh the table. Parameters self Usage st:ClearSelection() CompareSort(self, rowa, rowb, sortbycol) CompareSort function used to determine how to sort column values. Can be overridden in column data or table data. Parameters self rowa rowb sortbycol Usage used internally. See also Core.lua DoCellUpdate(rowFrame, cellFrame, data, cols, row, realrow, column, fShow, table, ...) Cell update function used to paint each...
Colors ddumont ddumont Oct 19, 2008
Color Objects Colors in lib-st are tables of color values. -- red, barely visible local color = { ["r"] = 1.0, ["g"] = 0.0, ["b"] = 0.0, ["a"] = 0.2, }; In most places where you would specify a color object, you can instead specify a function that will return a color object. if this function needs arguments, they can be supplied wrapped in a table ( an array of args ) and assigned to colorargs. Example For example, if you wanted to define a column that had text with a color based on which...
CreateST ddumont ddumont Dec 22, 2009
Definition function ScrollingTable:CreateST(cols, numRows, rowHeight, highlight, parent) Arguments cols This arg is expected to be an array of tables that contain information about each column. Each column table in the cols array should have the following format: { ["name"] = "Test 1", ["width"] = 50, ["align"] = "RIGHT", ["color"] = { ["r"] = 0.5, ["g"] = 0.5, ["b"] = 1.0, ["a"] = 1.0 }, ["colorargs"] = nil, ["bgcolor"] = { ["r"] = 1.0, ["g"] = 0.0, ["b"] = 0.0, ["a"] = 1.0 }, -- red...
Creating a ScrollingTable ddumont ddumont Jun 04, 2009
lib-st is a factory. It creates and returns an instance of a scrolling table for you to use. To create a scrolling table local ScrollingTable = LibStub("ScrollingTable"); local table = ScrollingTable:CreateST(); Calling CreateST without any arguments will return a default testing table. Click here for more info on the CreateST function. After creating a scrolling table, you have to load it with data. Click here for more information on the SetData function. You can register event handlers for...
DoCellUpdate ddumont ddumont Jun 06, 2009
DoCellUpdate = function(rowFrame, cellFrame, data, cols, row, realrow, column, fShow, table, ...) fShow == true, update your display, the cell is showing. fShow == false, your cell is being hidden (most likely because your table is large and you only have a few rows of data to actually display) so clear it out.
Enabling selection on a table ddumont ddumont Jun 06, 2009
The selection color will be the highlight color. table:EnableSelection(flag)
Filtering the scrolling table ddumont ddumont Aug 24, 2009
Filter function definition: local Filter = function(self, rowdata) return true; end Example user provided filters. SDKP_FILTERS_LIST = { "Show All", -- [1] "Only Raid", -- [2] }; SDKP_FILTERS = { [SDKP_FILTERS_LIST[1]] = function(self, row) return true; end, [SDKP_FILTERS_LIST[2]] = function(self, row) local nRaidMembers = GetNumRaidMembers(); for i = 1, nRaidMembers do local raidMember = GetRaidRosterInfo(i); if row.cols[1].value == raidMember then return true; end end return false; end, };
Main ddumont ddumont Jan 27, 2010
lib-st provides a convenient way to create and display a scrolling table of data. Supply column info and your table data, and you're off! To get a handle in lua: local ScrollingTable = LibStub("ScrollingTable"); To package in your addon, add to your .pkgmeta file: externals: Libs/lib-st: url: svn://svn.wowace.com/wow/lib-st/mainline/trunk tag: latest Leave off the tag line if you want the absolute lastest alpha version from the site. (I try to keep a stable copy tagged as latest) New...
Screenshots ddumont ddumont Dec 09, 2008
<center> default frame for testing. lib-st in action! (my dkp mod) </center>
SetData Dec 19, 2009
MinimalDatasetFormat ddumont ddumont Dec 19, 2009
StandardDatasetFormat ddumont ddumont Dec 19, 2009
UI Events ddumont ddumont Jan 19, 2010
Events have changed in lib-st. You can now register any event you want for your scrolling table, and these events will be fired for each cell. To register your event call the function '''RegisterEvents''' and pass in a table of your events paired with their handlers: local st = ScrollingTable:CreateST(); st:RegisterEvents({ ["OnClick"] = function (rowFrame, cellFrame, data, cols, row, realrow, column, scrollingTable, ...) --[[ handle onclick event here ]]-- --[[ return true to have your event...
  • 11 pages found