lib-ScrollingTable

  • 11 pages found
NameAuthorLast updated byUpdated on
NameAuthorLast updated byUpdated on
API ddumont ddumont 24 Aug 2009
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 cell. Can be overridden in column data or table data. Parameters rowFrame cellFrame data cols row realrow column fShow table ... Usage...
Colors ddumont ddumont 19 Oct 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 23 Aug 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 04 Jun 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 06 Jun 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 06 Jun 2009
The selection color will be the highlight color. table:EnableSelection(flag)
Filtering the scrolling table ddumont ddumont 24 Aug 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 08 Sep 2009
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! New Features: In the latest Alpha, if no args or colorargs are specified for value and color functions, respectively, instead of no args, these args will be passed: function (data, cols, realrow, column, table) -- table is a reference to the scrolling table end DoCellUpdate functions and UI Events now have the table passed to them as a param in order to...
Screenshots ddumont ddumont 09 Dec 2008
default frame for testing. lib-st in action! (my dkp mod)
SetData ddumont ddumont 16 Sep 2009
Definition function ScrollingTable:SetData(data) Arguments data This is the only argument that you have to pass to this function. The data for your table must live in this argument.<br/> The structure of this argument is a little complex so I'll take it one level at a time. data object rows The data object is an array of row objects. { row1, row2, row3, etc..., } Each row object has the following structure: { ["cols"] = column object. ["color"] = { ["r"] = 1.0, ["g"] = 0.0, ["b"] = 0.0, ["a"]...
UI Events ddumont ddumont 30 Sep 2009
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, table, ...) --[[ handle onclick event here ]]-- --[[ return true to have your event override...
  • 11 pages found