using System.Windows.Forms; namespace DelftTools.Controls.Swf.DataEditorGenerator.Metadata { /// /// Implement this interface and, for example, use it in combination with the CustomControlHelperAttribute /// to supply a custom UI control for a property. /// public interface ICustomControlHelper { /// /// Called when the custom control must be instaniated. /// /// Control CreateControl(); /// /// Called when data is set to the view. Note, also called when the view is closed with null data. /// Implementers are expected to fill the control with the supplied data. /// /// Control to fill /// The root object for which the combined view is generated. Use this if /// your custom control acts on multiple properties or other external factors. /// The field value for which this custom control was supplied (For Type /// based generation: The value of the property this attribute was placed on). void SetData(Control control, object rootObject, object propertyValue); /// /// If true, no additional controls will be generated at all. If false, the generator code will still /// generate a caption and unit label around the custom control. In that case the control is expected /// to be around 25 pixels high (eg, like a textbox) /// /// bool HideCaptionAndUnitLabel(); } }