using System.Runtime.InteropServices;
using Decal.Interop.Controls;
using Decal.Interop.Core;
using Decal.Interop.Inject;

namespace Decal.DecalControls
{
    [ComVisible(true)]
    [ClassInterface(ClassInterfaceType.None)]
    public abstract class ListColumnBase : IListColumn
    {
        private int _width = 100;

        public bool FixedWidth => false;
        public int Width { get => _width; set => _width = value; }
        public int DataColumns => 1;
        public int Height => 16;

        public virtual void Render(Canvas canvas, ref tagPOINT ptCell, int nColor) { }
        public virtual void Initialize(IList newVal, PluginSite pSite) { }
        public virtual void SchemaLoad(object pSchema) { }
        public virtual void Activate(ref tagPOINT ptCell) { }
    }

    [ComVisible(true)]
    [Guid("864DEABF-D079-4B61-A8CF-081418179239")]
    [ClassInterface(ClassInterfaceType.None)]
    [ProgId("DecalControls.TextColumn")]
    public class TextColumnImpl : ListColumnBase
    {
    }

    [ComVisible(true)]
    [Guid("F12A2C4C-3B78-46EB-8722-68B27A75AE55")]
    [ClassInterface(ClassInterfaceType.None)]
    [ProgId("DecalControls.IconColumn")]
    public class IconColumnImpl : ListColumnBase
    {
    }

    [ComVisible(true)]
    [Guid("48E444F1-8E30-4E4C-B203-4C87FC901586")]
    [ClassInterface(ClassInterfaceType.None)]
    [ProgId("DecalControls.CheckColumn")]
    public class CheckColumnImpl : ListColumnBase
    {
    }
}
