1 //
2 // System.Web.UI.Design.TemplatedControlDesigner
3 //
4 // Authors:
5 //      Gert Driesen (drieseng@users.sourceforge.net)
6 //
7 // (C) 2004 Novell
8 //
9 
10 //
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
18 //
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
21 //
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30 
31 using System;
32 using System.Collections;
33 using System.ComponentModel;
34 using System.ComponentModel.Design;
35 
36 namespace System.Web.UI.Design
37 {
38 	public abstract class TemplatedControlDesigner : ControlDesigner
39 	{
TemplatedControlDesigner()40 		public TemplatedControlDesigner ()
41 		{
42 		}
43 
44 		[MonoTODO]
Initialize(IComponent component)45 		public override void Initialize (IComponent component)
46 		{
47 			throw new NotImplementedException ();
48 		}
49 
50 		[Obsolete ("Template editing is supported in ControlDesigner.TemplateGroups with SetViewFlags(ViewFlags.TemplateEditing, true) in 2.0.")]
CreateTemplateEditingFrame(TemplateEditingVerb verb)51 		protected abstract ITemplateEditingFrame CreateTemplateEditingFrame (TemplateEditingVerb verb);
52 
53 		[Obsolete ("Template editing is supported in ControlDesigner.TemplateGroups with SetViewFlags(ViewFlags.TemplateEditing, true) in 2.0.")]
GetCachedTemplateEditingVerbs()54 		protected abstract TemplateEditingVerb[] GetCachedTemplateEditingVerbs ();
55 
56 		[Obsolete ("Template editing is supported in ControlDesigner.TemplateGroups with SetViewFlags(ViewFlags.TemplateEditing, true) in 2.0.")]
GetTemplateContent(ITemplateEditingFrame editingFrame, string templateName, out bool allowEditing)57 		public abstract string GetTemplateContent (ITemplateEditingFrame editingFrame, string templateName, out bool allowEditing);
58 
59 		[Obsolete ("Template editing is supported in ControlDesigner.TemplateGroups with SetViewFlags(ViewFlags.TemplateEditing, true) in 2.0.")]
SetTemplateContent(ITemplateEditingFrame editingFrame, string templateName, string templateContent)60 		public abstract void SetTemplateContent (ITemplateEditingFrame editingFrame, string templateName, string templateContent);
61 
62 		[MonoTODO]
63 		[Obsolete ("Template editing is supported in ControlDesigner.TemplateGroups with SetViewFlags(ViewFlags.TemplateEditing, true) in 2.0.")]
EnterTemplateMode(ITemplateEditingFrame newTemplateEditingFrame)64 		public void EnterTemplateMode (ITemplateEditingFrame newTemplateEditingFrame)
65 		{
66 			throw new NotImplementedException ();
67 		}
68 
69 		[MonoTODO]
70 		[Obsolete ("Template editing is supported in ControlDesigner.TemplateGroups with SetViewFlags(ViewFlags.TemplateEditing, true) in 2.0.")]
ExitTemplateMode(bool fSwitchingTemplates, bool fNested, bool fSave)71 		public void ExitTemplateMode (bool fSwitchingTemplates, bool fNested, bool fSave)
72 		{
73 			throw new NotImplementedException ();
74 		}
75 
76 
77 		[Obsolete ("Template editing is supported in ControlDesigner.TemplateGroups with SetViewFlags(ViewFlags.TemplateEditing, true) in 2.0.")]
GetTemplateContainerDataItemProperty(string templateName)78 		public virtual string GetTemplateContainerDataItemProperty (string templateName)
79 		{
80 			return string.Empty;
81 		}
82 
83 		[Obsolete ("Template editing is supported in ControlDesigner.TemplateGroups with SetViewFlags(ViewFlags.TemplateEditing, true) in 2.0.")]
GetTemplateContainerDataSource(string templateName)84 		public virtual IEnumerable GetTemplateContainerDataSource (string templateName)
85 		{
86 			return null;
87 		}
88 
89 		[MonoTODO]
90 		[Obsolete ("Template editing is supported in ControlDesigner.TemplateGroups with SetViewFlags(ViewFlags.TemplateEditing, true) in 2.0.")]
GetTemplateEditingVerbs()91 		public TemplateEditingVerb[] GetTemplateEditingVerbs ()
92 		{
93 			throw new NotImplementedException ();
94 		}
95 
96 		[MonoTODO]
GetTemplateFromText(string text)97 		protected ITemplate GetTemplateFromText (string text)
98 		{
99 			throw new NotImplementedException ();
100 		}
101 
102 		[Obsolete ("Template editing is supported in ControlDesigner.TemplateGroups with SetViewFlags(ViewFlags.TemplateEditing, true) in 2.0.")]
GetTemplatePropertyParentType(string templateName)103 		public virtual Type GetTemplatePropertyParentType (string templateName)
104 		{
105 			return base.Component.GetType ();
106 		}
107 
108 		[MonoTODO]
GetTextFromTemplate(ITemplate template)109 		protected string GetTextFromTemplate (ITemplate template)
110 		{
111 			throw new NotImplementedException ();
112 		}
113 
114 		[MonoTODO]
115 		[Obsolete ("Use ControlDesigner.Tag instead")]
OnBehaviorAttached()116 		protected override void OnBehaviorAttached ()
117 		{
118 			throw new NotImplementedException ();
119 		}
120 
121 		[MonoTODO]
OnComponentChanged(object sender, ComponentChangedEventArgs ce)122 		public override void OnComponentChanged (object sender, ComponentChangedEventArgs ce)
123 		{
124 			throw new NotImplementedException ();
125 		}
126 
127 		[MonoTODO]
OnSetParent()128 		public override void OnSetParent ()
129 		{
130 			throw new NotImplementedException ();
131 		}
132 
133 		[MonoTODO]
OnTemplateModeChanged()134 		protected virtual void OnTemplateModeChanged ()
135 		{
136 			throw new NotImplementedException ();
137 		}
138 
139 
140 		[MonoTODO]
SaveActiveTemplateEditingFrame()141 		protected void SaveActiveTemplateEditingFrame ()
142 		{
143 			throw new NotImplementedException ();
144 		}
145 
146 		[MonoTODO]
UpdateDesignTimeHtml()147 		public override void UpdateDesignTimeHtml ()
148 		{
149 			throw new NotImplementedException ();
150 		}
151 
152 		protected override bool DataBindingsEnabled {
153 			get { throw new NotImplementedException (); }
154 		}
155 
156 		public override TemplateGroupCollection TemplateGroups {
157 			get { throw new NotImplementedException (); }
158 		}
159 
160 		[Obsolete ("Template editing is supported in ControlDesigner.TemplateGroups with SetViewFlags(ViewFlags.TemplateEditing, true) in 2.0.")]
161 		public ITemplateEditingFrame ActiveTemplateEditingFrame {
162 			get {
163 				return _activeTemplateFrame;
164 			}
165 		}
166 
167 		public bool CanEnterTemplateMode {
168 			get {
169 				return _enableTemplateEditing;
170 			}
171 		}
172 
173 
174 		[Obsolete ("Use ControlDesigner.InTemplateMode instead")]
175 		public new bool InTemplateMode {
176 			get {
177 				return _templateMode;
178 			}
179 		}
180 
181 		internal EventHandler TemplateEditingVerbHandler {
182 			get {
183 				return _templateVerbHandler;
184 			}
185 		}
186 
187 		private ITemplateEditingFrame _activeTemplateFrame;
188 		private bool _enableTemplateEditing = true;
189 		private bool _templateMode;
190 		private EventHandler _templateVerbHandler;
191 	}
192 }
193