InputRoll - wire up RowScroll and ColumnScroll events, still todo: make a custom EventArgs argument and pass useful info through it
This commit is contained in:
parent
e3a8c33be5
commit
a9af8e4f3c
|
@ -296,6 +296,14 @@ namespace BizHawk.Client.EmuHawk
|
||||||
[Description("Occurs when the column header has been reordered")]
|
[Description("Occurs when the column header has been reordered")]
|
||||||
public event ColumnReorderedEventHandler ColumnReordered;
|
public event ColumnReorderedEventHandler ColumnReordered;
|
||||||
|
|
||||||
|
[Category("Action")]
|
||||||
|
[Description("Occurs when the scroll value of the visible rows change (in vertical orientation this is the vertical scroll bar change, and in horizontal it is the horizontal scroll bar)")]
|
||||||
|
public event RowScrollEvent RowScroll;
|
||||||
|
|
||||||
|
[Category("Action")]
|
||||||
|
[Description("Occurs when the scroll value of the columns (in vertical orientation this is the horizontal scroll bar change, and in horizontal it is the vertical scroll bar)")]
|
||||||
|
public event ColumnScrollEvent ColumnScroll;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieve the text for a cell
|
/// Retrieve the text for a cell
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -325,6 +333,10 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
public delegate void ColumnReorderedEventHandler(object sender, ColumnReorderedEventArgs e);
|
public delegate void ColumnReorderedEventHandler(object sender, ColumnReorderedEventArgs e);
|
||||||
|
|
||||||
|
public delegate void RowScrollEvent(object sender, EventArgs e);
|
||||||
|
|
||||||
|
public delegate void ColumnScrollEvent(object sender, EventArgs e);
|
||||||
|
|
||||||
public class CellEventArgs
|
public class CellEventArgs
|
||||||
{
|
{
|
||||||
public CellEventArgs(Cell oldCell, Cell newCell)
|
public CellEventArgs(Cell oldCell, Cell newCell)
|
||||||
|
@ -1730,6 +1742,21 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_horizontalOrientation)
|
||||||
|
{
|
||||||
|
if (ColumnScroll != null)
|
||||||
|
{
|
||||||
|
ColumnScroll(this, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (RowScroll != null)
|
||||||
|
{
|
||||||
|
RowScroll(this, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HorizontalBar_ValueChanged(object sender, EventArgs e)
|
private void HorizontalBar_ValueChanged(object sender, EventArgs e)
|
||||||
|
@ -1738,6 +1765,21 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_horizontalOrientation)
|
||||||
|
{
|
||||||
|
if (RowScroll != null)
|
||||||
|
{
|
||||||
|
RowScroll(this, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (ColumnScroll != null)
|
||||||
|
{
|
||||||
|
ColumnScroll(this, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ColumnChangedCallback()
|
private void ColumnChangedCallback()
|
||||||
|
|
Loading…
Reference in New Issue