//------------------------------------------------------------------------------
// <copyright file=”*.cs” company=”EhLib Team”>
//     Copyright (c) 2017 Dmitry V. Bolshakov   
// </copyright>
//------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace EhLib
{
  public class DataVertGridDataCellEventArgs : BaseGridCellEventArgs
  {
    private readonly DataVertGridRow row;
    private readonly object listItem;

    public DataVertGridDataCellEventArgs(int colIndex, int rowIndex, int areaColIndex, int areaRowIndex, Rectangle cellRect,
      DataVertGridRow row, object listItem) :
      base(colIndex, rowIndex, areaColIndex, areaRowIndex, cellRect)
    {
      this.row = row;
      this.listItem = listItem;
      this.Processed = false;
    }

    public DataVertGridRow Row
    {
      get { return this.row; }
    }

    public object ListItem
    {
      get { return this.listItem; }
    }

    public bool Processed { get; set; }
  }

  public class DataVertGridDataCellPaintEventArgs : EventArgs
  {
    private readonly Graphics graphics;
    private readonly int colIndex;
    private readonly int rowIndex;
    private readonly Rectangle cellRect;
    private readonly BasePaintCellStates state;
    private readonly int dataColIndex;
    private readonly int dataRowIndex;
    private readonly DataVertGridRow row;
    private readonly object listItem;

    public DataVertGridDataCellPaintEventArgs(Graphics graphics, int colIndex, int rowIndex, Rectangle cellRect,
      BasePaintCellStates state, int areaColIndex, int areaRowIndex, DataVertGridRow row, object listItem)
    {
      this.graphics = graphics;
      this.colIndex = colIndex;
      this.rowIndex = rowIndex;
      this.cellRect = cellRect;
      this.state = state;
      this.dataColIndex = areaColIndex;
      this.dataRowIndex = areaRowIndex;
      this.row = row;
      this.listItem = listItem;
    }

    public Graphics Graphics
    {
      get { return this.graphics; }
    }

    public int ColIndex
    {
      get { return this.colIndex; }
    }

    public int RowIndex
    {
      get { return this.rowIndex; }
    }

    public Rectangle CellRect
    {
      get { return this.cellRect; }
    }

    public BasePaintCellStates State
    {
      get { return this.state; }
    }

    public int DataColIndex
    {
      get { return this.dataColIndex; }
    }

    public int DataRowIndex
    {
      get { return this.dataRowIndex; }
    }

    public DataVertGridRow Row
    {
      get { return this.row; }
    }

    public object ListItem
    {
      get { return this.listItem; }
    }
  }

  public class DataVertGridDataCellContentPaintEventArgs : EventArgs
  {
    private readonly DataVertGridDataCellPaintEventArgs dataCellPaintEventArgs;
    private readonly Rectangle cellContentRect;

    public DataVertGridDataCellContentPaintEventArgs(DataVertGridDataCellPaintEventArgs dataCellPaintEventArgs, Rectangle cellContentRect)
    {
      this.dataCellPaintEventArgs = dataCellPaintEventArgs;
      this.cellContentRect = cellContentRect;
    }

    public DataVertGridDataCellPaintEventArgs DataCellPaintEventArgs
    {
      get { return this.dataCellPaintEventArgs; }
    }

    public Rectangle CellContentRect
    {
      get { return this.cellContentRect; }
    }

    public DataVertGridRow Row
    {
      get { return dataCellPaintEventArgs.Row; }
    }

    public object ListItem
    {
      get { return dataCellPaintEventArgs.ListItem; }
    }

    public BasePaintCellStates State
    {
      get { return dataCellPaintEventArgs.State; }
    }
    public Graphics Graphics
    {
      get { return dataCellPaintEventArgs.Graphics; }
    }

    public int DataColIndex
    {
      get { return dataCellPaintEventArgs.DataColIndex; }
    }

    public int DataRowIndex
    {
      get { return dataCellPaintEventArgs.DataRowIndex; }
    }
  }

  //public class DataVertGridDataCellMouseEventArgs : BaseGridCellMouseEventArgs
  //{
  //  private readonly DataVertGridRow row;
  //  private readonly object listItem;
  //  private readonly DataVertGridRowDataCell cell;

  //  public DataVertGridDataCellMouseEventArgs(
  //    int colIndex, int rowIndex,
  //    int areaColIndex, int areaRowIndex,
  //    DataVertGridRow row, object listItem, DataVertGridRowDataCell cell,
  //    int inCellX, int inCellY,
  //    Rectangle cellRect,
  //    MouseEventArgs e) : base(colIndex, rowIndex, areaColIndex, areaRowIndex, inCellX, inCellY, cellRect, e)
  //  {
  //    this.row = row;
  //    this.listItem = listItem;
  //    this.cell = cell;
  //  }

  //  public DataVertGridDataCellMouseEventArgs(
  //    BaseGridCellMouseEventArgs baseArgs,
  //    int areaColIndex, int areaRowIndex,
  //    DataVertGridRow row, object listItem, DataVertGridRowDataCell cell) :
  //      base(baseArgs.ColIndex, baseArgs.RowIndex, baseArgs.AreaColIndex, baseArgs.AreaRowIndex,
  //           baseArgs.InCellX, baseArgs.InCellY, baseArgs.CellRect, baseArgs.GridMouseArgs)
  //  {
  //    this.row = row;
  //    this.listItem = listItem;
  //    this.cell = cell;
  //  }

  //  public DataVertGridRow Row
  //  {
  //    get { return this.row; }
  //  }

  //  public object ListItem
  //  {
  //    get { return this.listItem; }
  //  }

  //  public DataVertGridRowDataCell Cell
  //  {
  //    get { return this.cell; }
  //  }

  //  public bool Handled
  //  { get; set; }

  //}

  public class DataVertGridDataCellObjectNeededEventArgs : EventArgs
  {
    private readonly DataVertGridRow row;
    private readonly object listItem;
    private DataAxisGridDataCellMan cellObject;

    public DataVertGridDataCellObjectNeededEventArgs(DataVertGridRow row, object listItem)
    {
      this.row = row;
      this.listItem = listItem;
    }

    public DataVertGridRow Row
    {
      get { return this.row; }
    }

    public object ListItem
    {
      get { return this.listItem; }
    }

    public DataAxisGridDataCellMan CellObject
    {
      get { return this.cellObject; }
      set { cellObject = value; }
    }

  }
}
