2 // System.Windows.Forms.RichTextBox.cs
5 // stubbed out by Daniel Carrera (dcarrera@math.toronto.edu)
6 // Dennis Hayes (dennish@Raytek.com)
8 // (C) 2002/3 Ximian, Inc
12 // Permission is hereby granted, free of charge, to any person obtaining
13 // a copy of this software and associated documentation files (the
14 // "Software"), to deal in the Software without restriction, including
15 // without limitation the rights to use, copy, modify, merge, publish,
16 // distribute, sublicense, and/or sell copies of the Software, and to
17 // permit persons to whom the Software is furnished to do so, subject to
18 // the following conditions:
20 // The above copyright notice and this permission notice shall be
21 // included in all copies or substantial portions of the Software.
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
27 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
28 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
29 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34 namespace System.Windows.Forms {
40 public class RichTextBox : TextBoxBase
42 private IntPtr handleCommCtrlLib;
50 handleCommCtrlLib = Win32.LoadLibraryA("riched20.dll");
55 // --- Public Properties
58 public override bool AllowDrop {
61 return base.AllowDrop;
65 base.AllowDrop = value;
69 public override bool AutoSize {
72 return base.AutoSize;;
76 base.AutoSize = value;
80 public bool AutoWordSelection {
82 throw new NotImplementedException ();
85 throw new NotImplementedException ();
89 public override Image BackgroundImage {
92 return base.BackgroundImage;
96 base.BackgroundImage = value;
100 public int BulletIndent {
102 throw new NotImplementedException ();
105 throw new NotImplementedException ();
109 public bool CanRedo {
111 throw new NotImplementedException ();
115 public bool DetectUrls {
117 throw new NotImplementedException ();
120 throw new NotImplementedException ();
124 public override Font Font {
135 public override Color ForeColor {
138 return base.ForeColor;
142 base.ForeColor = value;
146 public override int MaxLength {
148 throw new NotImplementedException ();
151 throw new NotImplementedException ();
155 public override bool Multiline {
157 throw new NotImplementedException ();
160 throw new NotImplementedException ();
164 public string RedoActionName {
166 throw new NotImplementedException ();
170 public int RightMargin {
172 throw new NotImplementedException ();
175 throw new NotImplementedException ();
181 throw new NotImplementedException ();
184 throw new NotImplementedException ();
188 public RichTextBoxScrollBars ScrollBars {
190 throw new NotImplementedException ();
193 throw new NotImplementedException ();
197 public string SelectedRtf {
199 throw new NotImplementedException ();
202 throw new NotImplementedException ();
206 public override string SelectedText {
208 throw new NotImplementedException ();
211 throw new NotImplementedException ();
215 public HorizontalAlignment SelectionAlignment {
217 throw new NotImplementedException ();
220 throw new NotImplementedException ();
224 public bool SelectionBullet {
226 throw new NotImplementedException ();
229 throw new NotImplementedException ();
233 public int SelectionCharOffset {
235 throw new NotImplementedException ();
238 throw new NotImplementedException ();
242 public Color SelectionColor {
244 throw new NotImplementedException ();
247 throw new NotImplementedException ();
251 public Font SelectionFont {
253 throw new NotImplementedException ();
256 throw new NotImplementedException ();
260 public int SelectionHangingIndent {
262 throw new NotImplementedException ();
265 throw new NotImplementedException ();
269 public int SelectionIndent {
271 throw new NotImplementedException ();
274 throw new NotImplementedException ();
278 public override int SelectionLength {
280 throw new NotImplementedException ();
283 throw new NotImplementedException ();
287 public bool SelectionProtected {
289 throw new NotImplementedException ();
292 throw new NotImplementedException ();
296 public int SelectionRightIndent {
298 throw new NotImplementedException ();
301 throw new NotImplementedException ();
305 public int[] SelectionTabs {
307 throw new NotImplementedException ();
310 throw new NotImplementedException ();
314 public RichTextBoxSelectionTypes SelectionType {
316 throw new NotImplementedException ();
320 public bool ShowSelectionMargin {
322 throw new NotImplementedException ();
325 throw new NotImplementedException ();
329 public override string Text {
338 public override int TextLength {
340 throw new NotImplementedException ();
344 public string UndoActionName {
346 throw new NotImplementedException ();
350 public float ZoomFactor {
352 throw new NotImplementedException ();
355 throw new NotImplementedException ();
360 #region Public Methods
362 // --- Public Methods
365 protected override void Dispose(bool disposing)
367 base.Dispose(disposing);
368 Win32.FreeLibrary(handleCommCtrlLib);
373 public bool CanPaste(DataFormats.Format clipFormat)
375 throw new NotImplementedException ();
379 public int Find(char[] characterSet)
381 throw new NotImplementedException ();
384 public int Find(string str)
386 throw new NotImplementedException ();
389 public int Find(char[] characterSet, int start)
391 throw new NotImplementedException ();
394 public int Find(string str, RichTextBoxFinds options)
396 throw new NotImplementedException ();
399 public int Find(char[] characterSet, int start, int end)
401 throw new NotImplementedException ();
404 public int Find(string str, int start, RichTextBoxFinds options)
406 throw new NotImplementedException ();
409 public int Find(string str, int val1, int val2, RichTextBoxFinds finds)
411 throw new NotImplementedException ();
414 public char GetCharFromPosition(Point pt)
416 throw new NotImplementedException ();
419 public int GetLineFromCharIndex(int index)
421 throw new NotImplementedException ();
424 public Point GetPositionFromCharIndex(int index)
426 throw new NotImplementedException ();
430 public void LoadFile(string path)
432 throw new NotImplementedException ();
435 public void LoadFile(Stream path, RichTextBoxStreamType fileType)
437 throw new NotImplementedException ();
442 public void Paste(DataFormats.Format clipFormat)
444 throw new NotImplementedException ();
450 throw new NotImplementedException ();
454 public void SaveFile(string path)
456 throw new NotImplementedException ();
459 public void SaveFile(Stream path, RichTextBoxStreamType fileType)
461 throw new NotImplementedException ();
464 public void SaveFile(string path, RichTextBoxStreamType fileType)
466 throw new NotImplementedException ();
470 #region Public Events
474 public event ContentsResizedEventHandler ContentsResized;
475 public event EventHandler HScroll;
476 public event EventHandler ImeChange;
477 public event LinkClickedEventHandler LinkClicked;
478 public event EventHandler Protected;
479 public event EventHandler SelectionChanged;
480 public event EventHandler VScroll;
483 #region Protected Properties
485 // --- Protected Properties
488 protected override CreateParams CreateParams
491 CreateParams createParams = base.CreateParams;
493 createParams.ClassName = "RichEdit20A";
494 createParams.Style = (int) ( WindowStyles.WS_CHILD | WindowStyles.WS_VISIBLE);
500 protected override Size DefaultSize {
502 return new System.Drawing.Size(300,300);
507 #region Protected Methods
509 // --- Protected Methods
513 protected virtual object CreateRichEditOleCallback()
515 throw new NotImplementedException ();
519 protected override void OnBackColorChanged(EventArgs e)
521 throw new NotImplementedException ();
525 protected virtual void OnContentsResized(ContentsResizedEventArgs e)
527 throw new NotImplementedException ();
531 protected override void OnContextMenuChanged(EventArgs e)
533 throw new NotImplementedException ();
537 protected override void OnHandleCreated(EventArgs e)
542 protected override void OnHandleDestroyed(EventArgs e)
544 throw new NotImplementedException ();
548 protected virtual void OnHScroll(EventArgs e)
550 throw new NotImplementedException ();
554 protected virtual void OnImeChange(EventArgs e)
556 throw new NotImplementedException ();
560 protected virtual void OnLinkClicked(LinkClickedEventArgs e)
562 throw new NotImplementedException ();
566 protected virtual void OnProtected(EventArgs e)
568 throw new NotImplementedException ();
572 protected override void OnRightToLeftChanged(EventArgs e)
574 throw new NotImplementedException ();
578 protected virtual void OnSelectionChanged(EventArgs e)
580 throw new NotImplementedException ();
584 protected override void OnSystemColorsChanged(EventArgs e)
586 throw new NotImplementedException ();
590 protected override void OnTextChanged(EventArgs e)
592 throw new NotImplementedException ();
596 protected virtual void OnVScroll(EventArgs e)
598 throw new NotImplementedException ();
602 protected override void WndProc(ref Message m)
604 throw new NotImplementedException ();