public void RemoveStyle(GDStyleKey prop) { for (int i = 0; i < Count; i++) { if (p_list[i].Key == prop) { p_list.RemoveAt(i); i--; } } }
public bool ContainsStyle(GDStyleKey key) { foreach (GDTextStyle style in p_list) { if (style.Key == key) { return(true); } } return(false); }
public object GetValue(GDStyleKey key) { foreach (GDTextStyle style in p_list) { if (style.Key == key) { return(style.Value); } } return(null); }
public GDTextStyle SetStyle(GDStyleKey prop, object value) { for (int i = 0; i < Count; i++) { if (p_list[i].Key == prop) { p_list[i].Value = value; return(p_list[i]); } } GDTextStyle ns = new GDTextStyle(); ns.Key = prop; ns.Value = value; return(AddStyle(ns)); }
public GDTextStyle(GDStyleKey key, object value) { Key = key; Value = value; }
private void _HarvestFormatValues(Dictionary <object, int> data, ref int topID, GDStyleKey key) { if (Format.ContainsStyle(key)) { object obj = Format.GetValue(key); if (obj != null) { if (!data.ContainsKey(obj)) { data.Add(obj, topID); topID++; } } } if (p_nodes != null) { foreach (GDNode node in p_nodes) { node._HarvestFormatValues(data, ref topID, key); } } }