source: trunk/CrypPlugins/WorkspaceManager/Model/VisualElementModel.cs @ 1617

Last change on this file since 1617 was 1617, checked in by kopal, 12 years ago
  • a delete of a plugin now leads to the delete of all left connections
  • added a first version of a Settings to the WorkspaceManager
  • some small bug fixes
File size: 2.6 KB
Line 
1/*                             
2   Copyright 2010 Nils Kopal, Viktor M.
3
4   Licensed under the Apache License, Version 2.0 (the "License");
5   you may not use this file except in compliance with the License.
6   You may obtain a copy of the License at
7
8       http://www.apache.org/licenses/LICENSE-2.0
9
10   Unless required by applicable law or agreed to in writing, software
11   distributed under the License is distributed on an "AS IS" BASIS,
12   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   See the License for the specific language governing permissions and
14   limitations under the License.
15*/
16
17
18using System;
19using System.Collections.Generic;
20using System.Linq;
21using System.Text;
22using System.Windows;
23using WorkspaceManager.View.Interface;
24
25namespace WorkspaceManager.Model
26{
27    /// <summary>
28    /// Abstract super class for all Model Elements which will have
29    /// a representation by a View class. It is needed to represent
30    /// Coordinates and Dimensions
31    /// </summary>
32    [Serializable]
33    public abstract class VisualElementModel
34    {
35        /// <summary>
36        /// Called when this object is deleted
37        /// </summary
38        public event EventHandler<EventArgs> OnDelete;
39
40        /// <summary>
41        /// Triggers event OnDelete
42        /// </summary>
43        public void onDelete(){
44            if(OnDelete != null){
45                EventArgs args = new EventArgs();         
46                OnDelete.Invoke(this, args);
47            }
48        }
49
50        public Point Position { get; set; }
51
52        /// <summary>
53        /// Minimum Width of this VisualElementModel
54        /// </summary>
55        public double MinWidth { get; set; }
56
57        /// <summary>
58        /// Minimum Height of this VisualElementModel
59        /// </summary>
60        public double MinHeight { get; set; }
61
62        /// <summary>
63        /// Width of this VisualElementModel
64        /// </summary>
65        public double Width { get; set; }
66
67        /// <summary>
68        /// Height of this VisualElementModel
69        /// </summary>
70        public double Height { get; set; }
71
72        /// <summary>
73        /// Name of this VisualElementModel
74        /// </summary>
75        public string Name { get; set; }
76
77        /// <summary>
78        /// Indicates that this Model Element needs a GUI Update
79        /// </summary>
80        public Boolean GuiNeedsUpdate { get; set; }
81
82        /// <summary>
83        /// View Element of this VisualElement
84        /// </summary>
85        public IUpdateableView UpdateableView = null;
86    }
87
88}
Note: See TracBrowser for help on using the repository browser.