[System.Web.Extensions] Update default profile and remove old profiles files
[mono.git] / mcs / class / System.Web / System.Web.UI.WebControls.WebParts / Part.cs
1 //
2 // System.Web.UI.WebControls.WebParts.Part
3 //
4 // Authors: Chris Toshok <toshok@novell.com>
5 //
6 // Copyright (C) 2005 Novell, Inc (http://www.novell.com)
7 //
8 // Permission is hereby granted, free of charge, to any person obtaining
9 // a copy of this software and associated documentation files (the
10 // "Software"), to deal in the Software without restriction, including
11 // without limitation the rights to use, copy, modify, merge, publish,
12 // distribute, sublicense, and/or sell copies of the Software, and to
13 // permit persons to whom the Software is furnished to do so, subject to
14 // the following conditions:
15 // 
16 // The above copyright notice and this permission notice shall be
17 // included in all copies or substantial portions of the Software.
18 // 
19 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
23 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
24 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
25 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 //
27
28 using System;
29
30 namespace System.Web.UI.WebControls.WebParts
31 {
32
33         public abstract class Part: Panel, INamingContainer, ICompositeControlDesignerAccessor
34         {
35                 string description;
36                 string title;
37                 PartChromeState chrome_state;
38                 PartChromeType chrome_type;
39                 ControlCollection controls;
40
41                 internal Part ()
42                 {
43                         description = "";
44                         title = "";
45                         chrome_state = PartChromeState.Normal;
46                         chrome_type = PartChromeType.Default;
47                 }
48
49                 [MonoTODO ("Not implemented")]
50                 public override void DataBind()
51                 {
52                         throw new NotImplementedException ();
53                 }
54
55                 [MonoTODO("not sure exactly what this one does..")]
56                 void ICompositeControlDesignerAccessor.RecreateChildControls ()
57                 {
58                         /* for now just call CreateChildControls to force
59                          * the recreation of our children. */
60                         CreateChildControls ();
61                 }
62
63                 public virtual PartChromeState ChromeState
64                 {
65                         get {
66                                 return chrome_state;
67                         }
68                         set {
69                                 chrome_state = value;
70                         }
71                 }
72
73                 public virtual PartChromeType ChromeType
74                 {
75                         get {
76                                 return chrome_type;
77                         }
78                         set {
79                                 chrome_type = value;
80                         }
81                 }
82
83                 public virtual new ControlCollection Controls
84                 {
85                         get {
86                                 if(controls == null)
87                                         controls = new ControlCollection(this);
88                                 return controls;
89                         }
90                 }
91
92                 public virtual string Description
93                 {
94                         get {
95                                 return description;
96                         }
97                         set {
98                                 description = value;
99                         }
100                 }
101
102                 public virtual string Title
103                 {
104                         get {
105                                 return title;
106                         }
107                         set {
108                                 title = value;
109                         }
110                 }
111         }
112 }