Skip to content

ExpanderArbitrator


Members

ConflictLst

desc: Two collections of which expanding GridGUI.Cells needs to share the available GUI size with a specific expanding GridGUI.Cell. That is for an expanding GridGUI.Cell c the horizontally expanding GridGUI.Cells o in another column will be stored under ["W"][c][i] where i is the index of o and similar for the vertically expanding cells they are stored under "H".

type: associative array

default: {"W": {}, "H": {}}

meta: [object]

ConflictMap

desc: Two collections of which expanding GridGUI.Cells needs to share the available GUI size with a specific expanding GridGUI.Cell. That is for an expanding GridGUI.Cell c the horizontally expanding GridGUI.Cells o in another column will be stored under ["W"][c][o] and similar for the vertically expanding cells they are stored under "H".

type: associative array

default: {"W": {}, "H": {}}

meta: [object]

Expanders

desc: Array of all expanding GridGUI.Cells in the grid.

type: array

default: []

meta: [object]

Ignore

desc: Two collections of which expanding GridGUI.Cells are similar to cells that have already been accounted for in relation to a specific cell.

type: associative array

default: {"W": {}, "H": {}}

meta: [object]

IsReduced

desc: Whether or not GridGUI.ExpanderArbitrator.ConflictMap has been reduced yet. If true then the entries in GridGUI.ExpanderArbitrator.ReducedConflict will be populated with a sub set of the entries in GridGUI.ExpanderArbitrator.ConflictMap.

type: bool

default: false

Overlapping

desc: Two collections of which expanding GridGUI.Cells overlap a given expanding GridGUI.Cell. That is for an expanding GridGUI.Cell c the horizontally overlapping GridGUI.Cells o will be stored under ["W"][c][o] and similar for the vertically overlapping cells they are stored under "H".

type: associative array

default: {"W": {}, "H": {}}

meta: [object]

ReducedConflict

desc: Two collections of only the expanding GridGUI.Cells in GridGUI.ExpanderArbitrator.ConflictMap that can't be ignored in relation to an expanding GridGUI.Cell. That is for an expanding GridGUI.Cell c the horizontally expanding GridGUI.Cells o in another column will be stored under ["W"][c][o] and similar for the vertically expanding cells they are stored under "H".

type: associative array

default: {"W": {}, "H": {}}

meta: [object]

Methods

__New

__New()

Constructor.

return value

Add

Add(c)

Adds a GridGUI.Cell to the GridGUI.ExpanderArbitrator members if the cell expands, that is if either GridGUI.Cell.exW or GridGUI.Cell.exH are non zero.

parameters

name: c

desc: The GridGUI.Cell to add to the GridGUI.ExpanderArbitrator.

type: GridGUI.Cell

CheckConflicts

CheckConflicts(c, expander)

Checks if the an expanding GridGUI.Cell is in conflict with one another expanding cell and updates GridGUI.ExpanderArbitrator.ConflictLst and GridGUI.ExpanderArbitrator.ConflictMap if they are. This function is intended for checking new expanding cells against already managed expanding cells.

parameters

name: c

desc: The expanding GridGUI.Cell to check for a conflict.

type: GridGUI.Cell

name: expander

desc: The expanding GridGUI.Cell to check for a conflict against.

type: GridGUI.Cell

CheckOverlapping

CheckOverlapping(c, expander)

Checks if the an expanding GridGUI.Cell overlaps another expanding cell and updates GridGUI.ExpanderArbitrator.Overlapping if they are. This function is intended for checking new expanding cells against already managed expanding cells.

parameters

name: c

desc: The expanding GridGUI.Cell to check if it overlaps expander.

type: GridGUI.Cell

name: expander

desc: The expanding GridGUI.Cell to check if it overlaps c.

type: GridGUI.Cell

Init

Init(c)

Adds a expanding GridGUI.Cell to the members of this GridGUI.ExpanderArbitrator so that they can be populated with data later.

parameters

name: c

desc: The expanding GridGUI.Cell to add to the GridGUI.ExpanderArbitrator members.

type: GridGUI.Cell

InitCheck

InitCheck(c)
parameters

name: c

desc: The expanding GridGUI.Cell to check against the already managed expanding cells.

type: GridGUI.Cell

IsExpander

IsExpander(c)

Check if a GridGUI.Cell expands.

parameters

name: c

desc: The GridGUI.Cell to check.

type: GridGUI.Cell

return value

desc: Returns true if either GridGUI.Cell.exW or GridGUI.Cell.exH of c are non zero otherwise false is returned.

type: bool

IsInHeightConflictWith

IsInHeightConflictWith(c1, c2)

Checks if two GridGUI.Cells are in vertical expanding conflict with each other.

parameters

name: c1

desc: A GridGUI.Cell to compare with c2.

type: GridGUI.Cell

name: c2

desc: A GridGUI.Cell to compare with c1.

type: GridGUI.Cell

return value

desc: Returns true if both c1 and c2 have non zero GridGUI.Cell.exH and their GridGUI.Cell.gridpos does not overlap along the y-axis. Otherwise false is returned.

type: bool

IsInWidthConflictWith

IsInWidthConflictWith(c1, c2)

Checks if two GridGUI.Cells are in horizontal expanding conflict with each other.

parameters

name: c1

desc: A GridGUI.Cell to compare with c2.

type: GridGUI.Cell

name: c2

desc: A GridGUI.Cell to compare with c1.

type: GridGUI.Cell

return value

desc: Returns true if both c1 and c2 have non zero GridGUI.Cell.exW and their GridGUI.Cell.gridpos does not overlap along the x-axis. Otherwise false is returned.

type: bool

ReCalculate

ReCalculate()

Checks if the expanding GridGUI.ExpanderArbitrator.ReducedConflict has already been calculated, if not then it calculates it and updates the managed GridGUI.Cells.

Reduce

Reduce()

Checks the GridGUI.ExpanderArbitrator.ConflictMap for expanders that can be ignored in certain cased and populates GridGUI.ExpanderArbitrator.ReducedConflict with the reduced conflict data.

Remove

Remove(c)

Removes a GridGUI.Cell from the GridGUI.ExpanderArbitrator members.

parameters

name: c

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

type: GridGUI.Cell

SortConflicts

SortConflicts()

Sorts the GridGUI.ExpanderArbitrator.ConflictLst by the grid size of the GridGUI.Cells, that is by how many column and rows the cell spans over.

UnInit

UnInit(c)

Undoes what GridGUI.ExpanderArbitrator.Init does, that is it Deletes all the objects that are indexed in the GridGUI.ExpanderArbitrator members under a GridGUI.Cell.

parameters

name: c

desc: The GridGUI.Cell to remove from the GridGUI.ExpanderArbitrator members.

type: GridGUI.Cell

UnInitCheck

UnInitCheck(c)

Undoes what GridGUI.ExpanderArbitrator.InitCheck does, that is it removes the GridGUI.Cell from the other cells managed by this GridGUI.ExpanderArbitrator.

parameters

name: c

desc: The GridGUI.Cell to remove from the GridGUI.ExpanderArbitrator members indexed under other cells.

type: GridGUI.Cell

Update

Update(c)

Updates the GridGUI.Cell.othersW and GridGUI.Cell.othersH members of a GridGUI.Cell that is managed by this GridGUI.ExpanderArbitrator.

parameters

name: c

desc: The GridGUI.Cell to update.

type: GridGUI.Cell

Back to top