1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Text;
|
---|
4 | using System.Drawing;
|
---|
5 | namespace 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 | }
|
---|