File size: 4,833 Bytes
b1b3bae
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
'    DWSIM Interface definitions
'    Copyright 2010-2017 Daniel Wagner O. de Medeiros
'
'    This file is part of DWSIM.
'
'    DWSIM is free software: you can redistribute it and/or modify
'    it under the terms of the GNU General Public License as published by
'    the Free Software Foundation, either version 3 of the License, or
'    (at your option) any later version.
'
'    DWSIM is distributed in the hope that it will be useful,
'    but WITHOUT ANY WARRANTY; without even the implied warranty of
'    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'    GNU General Public License for more details.
'
'    You should have received a copy of the GNU General Public License
'    along with DWSIM.  If not, see <http://www.gnu.org/licenses/>.

Imports DWSIM.Interfaces.Enums.GraphicObjects

''' <summary>
''' This interface defines the basic properties for a graphical representation of an object in the flowsheet PFD.
''' </summary>
<InterfaceType(ComInterfaceType.InterfaceIsIDispatch)>
Public Interface IGraphicObject

    Property DoubleClickAction As Action(Of Object)

    Property DrawOverride As Action(Of Object)

    Sub PositionConnectors()

    Sub Draw(surface As Object)

    Property Editor As Object

    Function Clone() As IGraphicObject

    Property ShapeOverride() As ShapeIcon

    Property Status() As Status

    Property Description() As String

    Property AdditionalInfo() As Object

    Property Shape() As Integer

    Property FlippedH() As Boolean

    Property FlippedV() As Boolean

    Property ObjectType() As ObjectType

    Property IsEnergyStream() As Boolean

    Property Active() As Boolean

    Property Tag() As String

    Property AutoSize() As Boolean

    Property IsConnector() As Boolean

    Property X() As Single

    Property Y() As Single

    Property Name() As String

    Property Height() As Integer

    Property Width() As Integer

    Property InputConnectors() As System.Collections.Generic.List(Of IConnectionPoint)

    Property OutputConnectors() As System.Collections.Generic.List(Of IConnectionPoint)

    Property SpecialConnectors() As System.Collections.Generic.List(Of IConnectionPoint)

    Property EnergyConnector() As IConnectionPoint

    Property Rotation As Integer

    Property Calculated As Boolean

    Property Position As IPoint

    Property Selected As Boolean

    Property Owner As ISimulationObject

    Function HitTest(zoomedSelection As Object) As Boolean

    Property Extensions As Dictionary(Of String, IGraphicObjectExtension)

    Sub DisplayControlPanelModeEditor()

    Property ControlPanelModeEditorDisplayDelegate As Action

    Property DrawMode As Integer

    Property FontStyle As FontStyle

    Property Flowsheet As IFlowsheet

    Function GetPointValue(type As PointValueType, Xref As Integer, Yref As Integer, args As List(Of Object)) As Double

    Function GetIconAsBitmap() As System.Drawing.Bitmap

    Function GetIconAsStream() As IO.MemoryStream

    Sub ReleaseReferences()

    Property DrawLabel As Boolean

End Interface

<InterfaceType(ComInterfaceType.InterfaceIsIDispatch)>
Public Interface IConnectionPoint

    Property X() As Integer

    Property Y() As Integer

    Property Type() As ConType

    Property Direction() As ConDir

    Property AttachedConnector() As IConnectorGraphicObject

    Property IsAttached() As Boolean

    Property ConnectorName() As String

    Property Position As IPoint

    Property IsEnergyConnector As Boolean

    Property Active As Boolean

End Interface

<InterfaceType(ComInterfaceType.InterfaceIsIDispatch)>
Public Interface IConnectorGraphicObject

    Property AttachedFromConnectorIndex() As Integer

    Property AttachedToConnectorIndex() As Integer

    Property AttachedToEnergy() As Boolean

    Property AttachedFromEnergy() As Boolean

    Property AttachedFrom() As IGraphicObject

    Property AttachedTo() As IGraphicObject

    Property AttachedToOutput() As Boolean

    Property AttachedFromInput() As Boolean

    Property Straight As Boolean

End Interface

<InterfaceType(ComInterfaceType.InterfaceIsIDispatch)>
Public Interface IGraphicObjectExtension

    Sub Draw(surface As Object)

    Function Clone() As IGraphicObjectExtension

    Property Description() As String

    Property Active() As Boolean

    Property Tag() As String

    Property Name() As String

    Property Height() As Integer

    Property Width() As Integer

    Property RelativePosition As IPoint

    Property Selected As Boolean

    Property Owner As IGraphicObject

    Function HitTest(zoomedSelection As Object) As Boolean

End Interface