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

namespace DiagramUI
{
    /// <summary>
    /// The button of objects and arrows palette
    /// </summary>
    public class PaletteButton : ToolBarButton
    {
        /// <summary>
        /// The type
        /// </summary>
        private string type;

        /// <summary>
        /// Is arrow flag
        /// </summary>
        private bool isArrow;

        /// <summary>
        /// The kind
        /// </summary>
        private int kind;

        /// <summary>
        /// The kind
        /// </summary>
        private string stringKind = "";

        /// <summary>
        /// The image
        /// </summary>
        private Image buttonImage;

        /// <summary>
        /// Tools of diagram
        /// </summary>
        private ToolsDiagram diagram;

        /// <summary>
        /// Number of image
        /// </summary>
        private int imageNumber;



        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="toolbar">The toolbar</param>
        /// <param name="kind">The kind</param>
        /// <param name="stringKind">The string kind</param>
        /// <param name="type">The type</param>
        /// <param name="ToolTipText">The tip</param>
        /// <param name="buttonImage">The image</param>
        /// <param name="ImageIndex">The image index</param>
        /// <param name="IsArrow">The "is arrow" flag</param>
        public PaletteButton(PaletteToolBar toolbar, int kind, string stringKind, string type, string ToolTipText, Image buttonImage, int ImageIndex, bool IsArrow)
        {
            this.kind = kind;
            this.stringKind = stringKind;
            this.isArrow = IsArrow;
            this.type = type;
            this.ToolTipText = ToolTipText;
            this.ImageIndex = ImageIndex;
            this.buttonImage = buttonImage;
            toolbar.Buttons.Add(this);
            Style = ToolBarButtonStyle.ToggleButton;
            diagram = toolbar.ToolDiagram;
            imageNumber = diagram.Count;
            diagram.AddButton(this);
            int i = diagram.Count;
        }

        /// <summary>
        /// Number of image
        /// </summary>
        public int ImageNumber
        {
            get
            {
                return imageNumber;
            }
        }





        /// <summary>
        /// The type
        /// </summary>
        public string Type
        {
            get
            {
                return type;
            }
        }

        /// <summary>
        /// The "is arrow" flag
        /// </summary>
        public bool IsArrow
        {
            get
            {
                return isArrow;
            }
        }

        /// <summary>
        /// The kind
        /// </summary>
        public int Kind
        {
            get
            {
                return kind;
            }
        }

        /// <summary>
        /// The kind
        /// </summary>
        public string StringKind
        {
            get
            {
                return stringKind;
            }
        }

        /// <summary>
        /// The image
        /// </summary>
        public Image ButtonImage
        {
            get
            {
                return buttonImage;
            }
        }
    }
}
