Skip to content

Column


Members

catched

desc: Whether or not the members have already been calculate.

type: bool

default: false

cells

desc: A collection of arrays of GridGUI.Cells indexed by the index of the rows they are placed on.

type: Associative Array

default: {}

meta: [object]

confligtingExpanders

desc: A collection of cells that have horizontal expansion conflicts.

type: Associative Array

default: {}

meta: [object, cached]

expanderMaxValue

desc: The largest horizontal expansion weight in this column.

type: number

default: 0

meta: [cached]

expanders

desc: The sum of all the horizontal expansion weights of cells that are in this column.

type: number

default: 0

meta: [cached]

fixedWidth

desc: The maximal fixed width of the cells, that is the largest fixed width for a cell in GridGUI.Column.cells.

type: number

default: 0

meta: [cached]

index

desc: The index of the column in the grid.

type: number

default: 0

minWidth

desc: The maximal minimal width for the cells, that is the largest minimal width for a cell in GridGUI.Column.cells.

type: number

default: 0

meta: [cached]

nonExpanders

desc: The amount of cells with fixed size in this column.

type: number

default: 0

meta: [cached]

Methods

__CalculateConfligtingExpanders

__CalculateConfligtingExpanders(c)

Updates GridGUI.Column.confligtingExpanders with the GridGUI.Cell for a cell if it has horizontal conflicts.

parameters

name: c

desc: The GridGUI.Cell to retrieve the value from.

type: GridGUI.Cell

__CalculateExpanders

__CalculateExpanders(c)

Updates GridGUI.Column.expanders with the result of GridGUI.Cell.GetExpansionWidthValue for a cell.

parameters

name: c

desc: The GridGUI.Cell to retrieve the value from.

type: GridGUI.Cell

__CalculateFixedWidth

__CalculateFixedWidth(c)

Updates GridGUI.Column.fixedWidth with the result of GridGUI.Cell.GetFixedWidth for a cell if it is larger than the previous value.

parameters

name: c

desc: The GridGUI.Cell to retrieve the value from.

type: GridGUI.Cell

__CalculateMinWidth

__CalculateMinWidth(c)

Updates GridGUI.Column.minWidth with the result of GridGUI.Cell.GetNeededWidth for a cell if it is larger than the previous value.

parameters

name: c

desc: The GridGUI.Cell to retrieve the value from.

type: GridGUI.Cell

__CalculateNonExpanders

__CalculateNonExpanders(c)

Increments GridGUI.Column.nonExpanders if the GridGUI.Cell does not expand horizontally.

parameters

name: c

desc: The GridGUI.Cell to retrieve the value from.

type: GridGUI.Cell

__New

__New(index)

Constructor.

parameters

name: index

desc: The index of the column in the grid.

type: number

return value

desc: A new GridGUI.Column instance.

type: GridGUI.Column

__ResetConstants

__ResetConstants()

Resets the cached GridGUI.Column members to their default values.

Add

Add(c)

Adds a GridGUI.Cell to the column.

parameters

name: c

desc: The GridGUI.Cell to added to the column.

type: GridGUI.Cell

CalculateConstants

CalculateConstants()

Calculates the values for the GridGUI.Column members that are cached.

CalculateWidth

CalculateWidth(width, expandersW, nonExpandersW, height, expandersH, nonExpandersH)

Calculates the width of the column.

parameters

name: width

desc: The unclaimed width of the grid, that is the width of the GUI or subgrid left after removing the width of the fixed cells.

type: number

name: expandersW

desc: An array of the sum of horizontal expansion weights for each column.

type: associative array

name: nonExpandersW

desc: An array of the amount of fixed size cells in each column.

type: associative array

name: height

desc: The unclaimed height of the grid, that is the height of the grid or subgrid left after removing the height of the fixed cells.

type: number

name: expandersH

desc: An array of the sum of vertical expansion weights for each row.

type: associative array

name: nonExpandersH

desc: An array of the amount of fixed size cells in each row.

type: associative array

return value

desc: The width of the column.

type: number

GetExpanderMaxValue

GetExpanderMaxValue()

return value

desc: The largest horizontal expansion weight of a cell in the column.

type: number

GetExpanders

GetExpanders()

return value

desc: The sum of horizontal expansion weight of cells in the column.

type: number

GetFixedWidth

GetFixedWidth()

return value

desc: The largest fixed width of a cell in the column.

type: number

GetMinWidth

GetMinWidth()

return value

desc: The largest minimal width of a cell in the column.

type: number

GetNonExpanders

GetNonExpanders()

return value

desc: The amount of cells with fixed width in the column.

type: number

Remove

Remove(c)

Removes a GridGUI.Cell from the column.

parameters

name: c

desc: The GridGUI.Cell to remove from the column.

type: GridGUI.Cell

Back to top