ExpanderArbitrator
Members
ConflictLst
desc: Two collections of which expanding GridGUI.Cell
s 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.Cell
s 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.Cell
s 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.Cell
s 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
Ignore
desc: Two collections of which expanding GridGUI.Cell
s 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.Cell
s overlap a given expanding GridGUI.Cell
. That is for an expanding GridGUI.Cell
c
the horizontally overlapping GridGUI.Cell
s 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.Cell
s 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.Cell
s 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
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
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
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
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)
Runs GridGUI.ExpanderArbitrator.CheckConflicts
and GridGUI.ExpanderArbitrator.CheckOverlapping
for an expanding GridGUI.Cell
against each cell in GridGUI.ExpanderArbitrator.Expanders
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
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.Cell
s are in vertical expanding conflict with each other.
parameters
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.Cell
s are in horizontal expanding conflict with each other.
parameters
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.Cell
s.
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.
SortConflicts
SortConflicts()
Sorts the GridGUI.ExpanderArbitrator.ConflictLst
by the grid size of the GridGUI.Cell
s, 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
.