**** Merged from MCS ****
[mono-project.git] / mcs / class / System.Windows.Forms / Gtk / DataGridColumnStyle.cs
blobc2efd99c7734ee4fb1253ff0b29e1e4fe395e255
1 //
2 // System.Windows.Forms.DataGridColumnStyle
3 //
4 // Author:
5 // stubbed out by Jaak Simm (jaaksimm@firm.ee)
6 // Dennis Hayes (dennish@Raytek.com)
7 //
8 // (C) Ximian, Inc., 2002
9 //
11 using System.ComponentModel;
12 using System.Drawing;
13 using System.Collections;
15 namespace System.Windows.Forms {
17 /// <summary>
18 /// Specifies the appearance and text formatting and behavior of a System.Windows.Forms.DataGrid control column. This class is abstract.
19 /// </summary>
21 [MonoTODO]
22 public abstract class DataGridColumnStyle : Component, IDataGridColumnStyleEditingNotificationService {
24 #region Fields
25 HorizontalAlignment alignment;
26 DataGridTableStyle dataGridTableStyle;
27 int fontHeight;
28 string headerText;
29 string mappingName;
30 string nullText;
31 PropertyDescriptor propertyDescriptor;
32 bool readOnly;
33 int width;
34 #endregion
36 #region Constructors
37 [MonoTODO]
38 public DataGridColumnStyle()
40 alignment=HorizontalAlignment.Left;
41 dataGridTableStyle=null;
42 fontHeight=-1;
43 headerText="";
44 readOnly=false;
47 [MonoTODO]
48 public DataGridColumnStyle(PropertyDescriptor prop) : this()
50 propertyDescriptor=prop;
52 #endregion
54 #region Properties
55 public virtual HorizontalAlignment Alignment {
56 get { return alignment; }
57 set { alignment=value; }
60 public virtual DataGridTableStyle DataGridTableStyle {
61 get { return dataGridTableStyle; }
64 protected int FontHeight {
65 get { return fontHeight; }
68 * This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
69 public AccessibleObject HeaderAccessibleObject {get;}
72 public virtual string HeaderText {
73 get { return headerText; }
74 set { headerText=value; }
77 public string MappingName {
78 get { return mappingName; }
79 set { mappingName=value; }
82 public virtual string NullText {
83 get { return nullText; }
84 set { nullText=value; }
87 public virtual PropertyDescriptor PropertyDescriptor {
88 get { return propertyDescriptor; }
89 set { propertyDescriptor=value; }
92 public virtual bool ReadOnly {
93 get { return readOnly; }
94 set { readOnly=value; }
97 public virtual int Width {
98 get { return width; }
99 set { width=value; }
101 #endregion
103 #region Methods
104 protected internal abstract void Abort(int rowNum);
106 [MonoTODO]
107 protected void BeginUpdate()
109 //FIXME:
112 [MonoTODO]
113 protected void CheckValidDataSource(CurrencyManager value)
115 //FIXME:
118 [MonoTODO]
119 protected internal virtual void ColumnStartedEditing(Control editingControl)
121 //FIXME:
124 protected internal abstract bool Commit(CurrencyManager dataSource,int rowNum);
126 [MonoTODO]
127 protected internal virtual void ConcedeFocus()
129 //FIXME:
133 * This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
134 protected virtual AccessibleObject CreateHeaderAccessibleObject()
137 [MonoTODO]
138 protected internal virtual void Edit(CurrencyManager source) {
139 //FIXME:
142 [MonoTODO]
143 protected internal virtual void Edit(CurrencyManager source, int rowNum) {
144 //FIXME:
147 [MonoTODO]
148 protected internal abstract void Edit(CurrencyManager source, int rowNum, Rectangle bounds,
149 bool readOnly, string instantText, bool cellIsVisible);
151 [MonoTODO]
152 protected void EndUpdate()
154 //FIXME:
157 [MonoTODO]
158 protected internal virtual void EnterNullValue()
160 //FIXME:
163 [MonoTODO]
164 protected internal virtual object GetColumnValueAtRow(CurrencyManager source,int rowNum)
166 throw new NotImplementedException ();
169 protected internal abstract int GetMinimumHeight();
171 protected internal abstract int GetPreferredHeight(Graphics g,object value);
173 protected internal abstract Size GetPreferredSize(Graphics g,object value);
176 * This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
178 [MonoTODO]
179 void IDataGridColumnStyleEditingNotificationService.ColumnStartedEditing(Control editingControl)
181 //FIXME:
184 [MonoTODO]
185 protected virtual void Invalidate()
187 //FIXME:
190 protected internal abstract void Paint(Graphics g,Rectangle bounds,CurrencyManager source,int rowNum);
192 protected internal abstract void Paint(Graphics g,Rectangle bounds,CurrencyManager source,int rowNum,bool alignToRight);
194 [MonoTODO]
195 protected internal virtual void Paint(Graphics g, Rectangle bounds, CurrencyManager source,
196 int rowNum, Brush backBrush, Brush foreBrush, bool alignToRight) {
197 //FIXME:
200 [MonoTODO]
201 public void ResetHeaderText()
203 //FIXME:
206 [MonoTODO]
207 protected internal virtual void SetColumnValueAtRow(CurrencyManager source,int rowNum,object value)
209 //FIXME:
212 [MonoTODO]
213 protected virtual void SetDataGrid(DataGrid value)
215 //FIXME:
218 [MonoTODO]
219 protected virtual void SetDataGridInColumn(DataGrid value)
221 //FIXME:
224 [MonoTODO]
225 protected internal virtual void UpdateUI(CurrencyManager source,int rowNum,string instantText) {
226 //FIXME:
228 #endregion
230 #region Events
232 public event EventHandler AlignmentChanged;
234 /* This member supports the .NET Framework infrastructure and is not intended to be used directly from your code
235 public event EventHandler FontChanged;
238 public event EventHandler HeaderTextChanged;
239 public event EventHandler MappingNameChanged;
240 public event EventHandler NullTextChanged;
241 public event EventHandler PropertyDescriptorChanged;
242 public event EventHandler ReadOnlyChanged;
243 public event EventHandler WidthChanged;
244 #endregion
246 /// sub-classes:
247 /// This type supports the .NET Framework infrastructure and is not intended to be used directly from your code.
249 /// protected class DataGridColumnStyle.CompModSwitches;
250 /// protected class DataGridColumnStyle.DataGridColumnHeaderAccessibleObject : AccessibleObject;