// ====================================================================== // Initialization // ---------------------------------------------------------------------- public DSTableColumn(string identifier, RectOffset margins, GUIContent title, DSView.AnchorEnum columnAlignment) { Identifier = identifier; Title = title; Margins = margins; Anchor = columnAlignment; }
// ====================================================================== // Subview management // ---------------------------------------------------------------------- public void AddSubview(DSView subview, RectOffset margins, DSView.AnchorEnum alignment = DSView.AnchorEnum.TopLeft) { DSCellView container = new DSCellView(margins, false, subview); container.Anchor = alignment; mySubviews.Add(container); mySubviewFrames.Add(new Rect(0, 0, 0, 0)); }
public bool ReplaceSubview(DSView toRemove, DSView bySubview, RectOffset margins, DSView.AnchorEnum alignment = DSView.AnchorEnum.TopLeft) { int idx = FindIndexOfSubview(toRemove); if (idx < 0) { return(false); } DSCellView container = new DSCellView(margins, false, bySubview); container.Anchor = alignment; mySubviews[idx] = container; mySubviewFrames[idx] = new Rect(0, 0, 0, 0); return(true); }