/// <summary>
        /// Initializes a new instance of the <see cref="CircleEditState"/> class.
        /// </summary>
        /// <param name="circle">The circle.</param>
        /// <param name="shapesEditingScreen"><see cref="ShapesEditingScreen"/> where the state is used.</param>
        public CircleEditState(Circle circle, ShapesEditingScreen shapesEditingScreen)
        {
            _circle = circle;
            Parent  = shapesEditingScreen;

            UpdateOrigin();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="PolygonEditState"/> class.
        /// </summary>
        /// <param name="polygon">The polygon.</param>
        /// <param name="shapesEditingScreen"><see cref="ShapesEditingScreen"/> where the state is used.</param>
        public PolygonEditState(Polygon polygon, ShapesEditingScreen shapesEditingScreen)
        {
            _polygon = polygon;
            Parent   = shapesEditingScreen;

            UpdateVertices();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="EdgeEditState"/> class.
        /// </summary>
        /// <param name="edge">The edge.</param>
        /// <param name="shapesEditingScreen"><see cref="ShapesEditingScreen"/> where the state is used.</param>
        public EdgeEditState(Edge edge, ShapesEditingScreen shapesEditingScreen)
        {
            _edge  = edge;
            Parent = shapesEditingScreen;

            UpdateVertices();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="BasicControllerForShapesEditing"/> class.
        /// </summary>
        /// <param name="shapesScreen"><see cref="ShapesEditingScreen"/> for which is the controller used.</param>
        public BasicControllerForShapesEditing(ShapesEditingScreen shapesScreen)
        {
            _shapesScreen = shapesScreen;

            InitializeComponent();

            ShapesScreen.StateChanged += new EventHandler(ShapesScreen_StateChanged);
            ShapesScreen_StateChanged(null, null);

            // init controls settings
            selectShapeBox.SelectedIndex = 0;

            // init defaults from settings
            showGrid.Checked                = Properties.Settings.Default.TextureEditor_ShowGrid;
            showAllShapes.Checked           = Properties.Settings.Default.TextureEditor_ShowAllShapes;
            showConvexHull.Checked          = Properties.Settings.Default.TextureEditor_ShowConvexHull;
            showConvexDecomposition.Checked = Properties.Settings.Default.TextureEditor_ShowConvexDecomposition;
            showOrigin.Checked              = Properties.Settings.Default.TextureEditor_ShowOrigin;
        }