Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/TrackerBase.cs @ 2768

Last change on this file since 2768 was 2768, checked in by mkommend, 14 years ago

added solution folders and sources for the netron library (ticket #867)

File size: 2.5 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Text;
4using System.Drawing;
5namespace Netron.Diagramming.Core
6{
7    /// <summary>
8    /// Abstract base implementation of the <see cref="ITracker"/> interface.
9    /// </summary>
10    public abstract class TrackerBase : ITracker
11    {
12        #region Fields
13        /// <summary>
14        /// the Rectangle field
15        /// </summary>
16        private Rectangle mRectangle;
17        #endregion
18
19        #region Properties
20        /// <summary>
21        /// Gets or sets the Rectangle
22        /// </summary>
23        public Rectangle Rectangle
24        {
25            get
26            {
27                return mRectangle;
28            }
29            set
30            {
31                mRectangle = value;
32            }
33        }
34        /// <summary>
35        /// the ShowHandles field
36        /// </summary>
37        private bool mShowHandles;
38        /// <summary>
39        /// Gets or sets the ShowHandles
40        /// </summary>
41        public bool ShowHandles
42        {
43            get { return mShowHandles; }
44            set { mShowHandles = value; }
45        }
46        #endregion
47
48        #region Constructors
49
50        /// <summary>
51        /// Initializes a new instance of the <see cref="T:TrackerBase"/> class.
52        /// </summary>
53        public TrackerBase()
54        {
55        }
56        /// <summary>
57        /// Initializes a new instance of the <see cref="T:TrackerBase"/> class.
58        /// </summary>
59        /// <param name="rectangle">The rectangle.</param>
60        public TrackerBase(Rectangle rectangle)
61        {
62            mRectangle = rectangle;
63        }
64        #endregion
65   
66        #region Methods
67        /// <summary>
68        /// Paints the entity using the given graphics object
69        /// </summary>
70        /// <param name="g"></param>
71        public abstract void Paint(Graphics g);
72        //{
73        //    g.DrawRectangle(ArtPallet.HighlightPen, mRectangle);
74        //}
75        /// <summary>
76        /// Returns the relative coordinate of the grip-point hit, if any, of the tracker.
77        /// </summary>
78        /// <param name="p"></param>
79        /// <returns></returns>
80        public abstract Point Hit(Point p);
81        /// <summary>
82        /// Transforms the specified rectangle.
83        /// </summary>
84        /// <param name="rectangle">The rectangle.</param>
85        public abstract void Transform(Rectangle rectangle);
86        #endregion
87
88    }
89}
Note: See TracBrowser for help on using the repository browser.