// *
// * Copyright (C) 2008 Roger Alsing : http://www.RogerAlsing.com
// *
// * This library is free software; you can redistribute it and/or modify it
// * under the terms of the GNU Lesser General Public License 2.1 or later, as
// * published by the Free Software Foundation. See the included license.txt
// * or http://www.gnu.org/copyleft/lesser.html for details.
// *
// *
using System;
namespace Alsing.SourceCode
{
///
/// Class representing a point in a text.
/// where x is the column and y is the row.
///
public class TextPoint
{
private int x;
private int y;
///
///
///
public TextPoint() { }
///
///
///
///
///
public TextPoint(int X, int Y)
{
this.X = X;
this.Y = Y;
}
///
///
///
public int X
{
get { return x; }
set
{
x = value;
OnChange();
}
}
///
///
///
public int Y
{
get { return y; }
set
{
y = value;
OnChange();
}
}
///
/// Event fired when the X or Y property has changed.
///
public event EventHandler Change = null;
private void OnChange()
{
if (Change != null)
Change(this, new EventArgs());
}
}
}