using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace Hanna.Controls
{
	public partial class IconButton : Shape
	{
		public IconButton()
		{
			InitializeComponent();
		}
		public IconShape IconShape
		{
			get { return this.Icon; }
		}

		protected override void Shape_Paint(object sender, PaintEventArgs e)
		{
			base.Shape_Paint(sender, e);
		}

		private void Icon_MouseDown(object sender, MouseEventArgs e)
		{
			this.IconButton_MouseDown(this, e);
		}

		private void Icon_MouseUp(object sender, MouseEventArgs e)
		{
			this.IconButton_MouseUp(this, e);
		}

		private void Icon_Click(object sender, EventArgs e)
		{
			this.OnClick(e);			
		}

		private void IconButton_MouseDown(object sender, MouseEventArgs e)
		{
			this.FillStyle = FillStyles.Sunken;
		}

		private void IconButton_MouseUp(object sender, MouseEventArgs e)
		{
			this.FillStyle = FillStyles.Raised;
		}

		private void IconButton_MouseLeave(object sender, EventArgs e)
		{
			this.FillStyle = FillStyles.Raised;
		}
	}
}
