/// <summary> /// Takes the name for a widget component and returns a pointer to /// it if it exists or 0 if it does'nt. /// </summary> /// <param name="name"> /// The name of the Child component to look for. /// </param> /// <returns></returns> public WidgetComponent FindWidgetComponent(string name) { var wcc = new NamedDefinitionCollator <string, WidgetComponent>(); AppendChildWidgetComponents(wcc); return(wcc.SingleOrDefault(x => x.GetWidgetName() == name)); //WidgetComponentCollator::const_iterator wci = wcc.find(name); //if (wci == wcc.end()) // return 0; //return *wci; }
/// <summary> /// Takes the name of a property and returns a pointer to the last /// PropertyInitialiser for this property or 0 if the is no /// PropertyInitialiser for this property in the WidgetLookFeel /// </summary> /// <param name="propertyName"> /// The name of the property to look for. /// </param> /// <returns></returns> public PropertyInitialiser FindPropertyInitialiser(string propertyName) { var pic = new NamedDefinitionCollator <string, PropertyInitialiser>(); AppendPropertyInitialisers(pic); return(pic.SingleOrDefault(x => x.GetTargetPropertyName() == propertyName)); //PropertyInitialiserCollator::const_iterator i = pic.find(propertyName); //if (i == pic.end()) // return 0; //return *i; }