Changeset 4068 for trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IShape.cs
- Timestamp:
- 07/22/10 00:44:01 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IShape.cs
r2768 r4068 1 using System;2 1 using System.Drawing; 3 using System.Windows.Forms; 4 namespace Netron.Diagramming.Core 5 { 6 // ---------------------------------------------------------------------- 7 /// <summary> 8 /// The interface of a shape. This interface comes in two inherited 9 /// flavors; <see cref="ISimpleShape"/> and <see cref="IComplexShape"/>. 10 /// </summary> 11 // ---------------------------------------------------------------------- 12 public interface IShape : IDiagramEntity 13 { 14 #region Events 15 16 #endregion 2 namespace Netron.Diagramming.Core { 3 // ---------------------------------------------------------------------- 4 /// <summary> 5 /// The interface of a shape. This interface comes in two inherited 6 /// flavors; <see cref="ISimpleShape"/> and <see cref="IComplexShape"/>. 7 /// </summary> 8 // ---------------------------------------------------------------------- 9 public interface IShape : IDiagramEntity { 10 #region Events 17 11 18 #region Properties 12 #endregion 19 13 20 // ------------------------------------------------------------------ 21 /// <summary> 22 /// Gets or sets if the connectors are drawn. 23 /// </summary> 24 // ------------------------------------------------------------------ 25 bool ShowConnectors 26 { 27 get; 28 set; 29 } 14 #region Properties 30 15 31 // ------------------------------------------------------------------ 32 /// <summary> 33 /// Gets the connectors of the shape. 34 /// </summary> 35 /// <remarks>Connectors are defined at design time, hence the fact 36 /// that you cannot set the connector collection.</remarks> 37 // ------------------------------------------------------------------ 38 CollectionBase<IConnector> Connectors { get;} 16 // ------------------------------------------------------------------ 17 /// <summary> 18 /// Gets or sets if the connectors are drawn. 19 /// </summary> 20 // ------------------------------------------------------------------ 21 bool ShowConnectors { 22 get; 23 set; 24 } 39 25 40 // ------------------------------------------------------------------ 41 /// <summary> 42 /// Gets or sets the location of the shape 43 /// </summary> 44 // ------------------------------------------------------------------ 45 Point Location {get; set;} 26 // ------------------------------------------------------------------ 27 /// <summary> 28 /// Gets the connectors of the shape. 29 /// </summary> 30 /// <remarks>Connectors are defined at design time, hence the fact 31 /// that you cannot set the connector collection.</remarks> 32 // ------------------------------------------------------------------ 33 CollectionBase<IConnector> Connectors { get; } 46 34 47 48 49 /// Gets or sets the heightof the shape50 51 52 int Height {get; set;}35 // ------------------------------------------------------------------ 36 /// <summary> 37 /// Gets or sets the location of the shape 38 /// </summary> 39 // ------------------------------------------------------------------ 40 Point Location { get; set; } 53 41 54 55 56 /// Gets or sets the width of the shape. 57 58 59 int Width {get; set;}42 // ------------------------------------------------------------------ 43 /// <summary> 44 /// Gets or sets the height of the shape 45 /// </summary> 46 // ------------------------------------------------------------------ 47 int Height { get; set; } 60 48 61 // ------------------------------------------------------------------ 62 /// <summary> 63 /// Gets the image for this shape when displaying in a library (i.e. 64 /// toolbox). 65 /// </summary> 66 // ------------------------------------------------------------------ 67 Image LibraryImage 68 { 69 get; 70 } 71 72 #endregion 49 // ------------------------------------------------------------------ 50 /// <summary> 51 /// Gets or sets the width of the shape. 52 /// </summary> 53 // ------------------------------------------------------------------ 54 int Width { get; set; } 73 55 74 #region Methods 75 // ------------------------------------------------------------------ 76 /// <summary> 77 /// Returns whether the given point hits one of the connectors of 78 /// the bundle. 79 /// </summary> 80 /// <param name="p">a location, usually corresponds to the mouse 81 /// location.</param> 82 /// <returns></returns> 83 // ------------------------------------------------------------------ 84 IConnector HitConnector(Point p); 56 // ------------------------------------------------------------------ 57 /// <summary> 58 /// Gets the image for this shape when displaying in a library (i.e. 59 /// toolbox). 60 /// </summary> 61 // ------------------------------------------------------------------ 62 Image LibraryImage { 63 get; 64 } 85 65 86 // ------------------------------------------------------------------ 87 /// <summary> 88 /// Maps the shape to another rectangle, including all its sub-entities 89 /// and materials. 90 /// </summary> 91 /// <param name="x">The x.</param> 92 /// <param name="y">The y.</param> 93 /// <param name="width">The width.</param> 94 /// <param name="height">The height.</param> 95 // ------------------------------------------------------------------ 96 void Transform(int x, int y, int width, int height); 97 #endregion 98 } 66 #endregion 67 68 #region Methods 69 // ------------------------------------------------------------------ 70 /// <summary> 71 /// Returns whether the given point hits one of the connectors of 72 /// the bundle. 73 /// </summary> 74 /// <param name="p">a location, usually corresponds to the mouse 75 /// location.</param> 76 /// <returns></returns> 77 // ------------------------------------------------------------------ 78 IConnector HitConnector(Point p); 79 80 // ------------------------------------------------------------------ 81 /// <summary> 82 /// Maps the shape to another rectangle, including all its sub-entities 83 /// and materials. 84 /// </summary> 85 /// <param name="x">The x.</param> 86 /// <param name="y">The y.</param> 87 /// <param name="width">The width.</param> 88 /// <param name="height">The height.</param> 89 // ------------------------------------------------------------------ 90 void Transform(int x, int y, int width, int height); 91 #endregion 92 } 99 93 }
Note: See TracChangeset
for help on using the changeset viewer.