Commit Graph
59 Commits
Author SHA1 Message Date
Jackson Harper 143735b6a0 * RichTextBox.cs: namespace cleanup.
svn path=/trunk/mcs/; revision=75789
2007-04-16 21:17:47 +00:00
Jackson Harper 846f6da257 * RichTextBox.cs: Use the new methods for setting the font and
color, these methods set the specified attribute without
        overriding the other attributes.


svn path=/trunk/mcs/; revision=75286
2007-04-02 16:45:25 +00:00
Gert Driesen 8539171ea9 * RichTextBoxTest.cs: Added BackColor test. Improved ReadOnly tests.
Added ScrollBars tests.
* TextBoxTest.cs: Improve BackColor test. Added ScrollBars tests.
Improved ReadOnly tests.
* TextBox.cs: Added internal ChangeBackColor method to special-case
Color.Empty. Added check for invalid ScrollBars value.
* TextBoxBase.cs: Added internal ChangeBackColor method.
* RichTextBox.cs: Only set backcolor_set on 2.0 profile. Added
internal ChangeBackColor method to special-case Color.Empty. Added
check for invalid ScrollBars value.

svn path=/trunk/mcs/; revision=75239
2007-03-31 12:32:38 +00:00
Jackson Harper 582a7612eb * RTF.cs: Use the documents encoding code page to decode unicode
chars.
        *   RichTextBox.cs: The RTF library decodes the text
                * properly for us
        now.        


svn path=/trunk/mcs/; revision=75040
2007-03-27 18:48:36 +00:00
Jackson Harper d9f2c8ed79 * RichTextBox.cs: The selection_start and selection_end don't
really track the correct tags for the selection. So we'll
manually
        compute the correct tag here.


svn path=/trunk/mcs/; revision=74989
2007-03-26 20:19:37 +00:00
Jackson Harper dbb50a8fb2 * TextControl.cs:
* TextBoxBase.cs:
        * RichTextBox.cs: Preserve line endings in the lines text
        * buffer,
        also added an enum that represents the line ending type. 


svn path=/trunk/mcs/; revision=74920
2007-03-23 20:30:01 +00:00
Gert Driesen c3e6a93e6f * RichBoxTest.cs: Enabled ReadOnly test.
* RichTextBox.cs: Reset backcolor_set after setting default.

svn path=/trunk/mcs/; revision=74630
2007-03-19 20:05:38 +00:00
Jackson Harper e8de283a43 * RichTextBox.cs: Enable shortcuts by default.
* TextBoxBase.cs: Add conditional shortcuts.  


svn path=/trunk/mcs/; revision=74608
2007-03-19 14:57:15 +00:00
Jackson Harper bf26eb5258 * RichTextBox.cs: Don't do this all fonts must match check if
there is only one char selected.


svn path=/trunk/mcs/; revision=74580
2007-03-19 00:17:34 +00:00
Jackson Harper ebdd905067 * RTF.cs: Added support for metafiles and use the new picture
class.
        * Picture.cs: New class for handling pictures and their
        attributes.

        * TextBoxBase.cs: Remove image pasting code for now.  There is
        * no
        way to get an image on the clipboard right now anyways.
        * TextControl.cs:
        * RichTextBox.cs: Use the new RTF Picture class for pictures.


svn path=/trunk/mcs/; revision=74572
2007-03-18 21:53:27 +00:00
Jackson Harper d8746be9bd * TextControl.cs: Remove RecalAlignments call, that was some
debugging leftovers.
        - Don't use the line indent when we shouldn't.
        * RichTextBox.cs: Add support for paragraph left indents.


svn path=/trunk/mcs/; revision=73221
2007-02-20 22:26:00 +00:00
Jackson Harper e4bbd2bc8f * TextBoxBase.cs: Modified the method for inserting images to
taking a line and position instead of tag and position.
        * RichTextBox.cs: Handle PngBlip data by inserting the png image
        into the RTF file.
        * TextControl.cs: Allow images to be inserted as the first tag
        * of
        a line.
        - Fix some off by one issues when we assume the first tag is a
        text tag, not an image tag.


svn path=/trunk/mcs/; revision=73021
2007-02-16 15:13:41 +00:00
Jackson Harper 1ef293b497 * RichTextBox.cs:
* TextBox.cs: By default we have a non multiline document
        - use the multiline property instead of the internal variable
        * TextBoxBase.cs: Treat multiline and non multiline the same in
        most places.
        - Use the documents multiline flag instead of tracking it
          ourself
        * TextControl.cs: Attempt at getting multiline to match MS
        behavior.  Lines now track an offset, which is either their X or
Y
        offset depending on whether or not we are in multiline mode.
        - Update all the methods to understand that lines have an X
          value.
        - Fix crash in Undo::Duplicate when empty lines are deleted.


svn path=/trunk/mcs/; revision=72723
2007-02-12 23:22:33 +00:00
Chris Toshok ea590d9ad7 In System.Windows.Forms.VisualStyles:
2007-01-19  Chris Toshok  <[email protected]>

	* VisualStyleElement.cs: rename TaskBar to Taskbar, and
	TaskBarClock to TaskbarClock to make corcompare happy.

2006-08-05  Jonathan Pobst <[email protected]>
	* TextMetrics.cs: Change variables to properties.
	* VisualStyleRenderer.cs, EdgeEffects.cs, Edges.cs,
	  HitTestOptions.cs, TextMetricsPitchAndFamilyValues.cs:
	    Add various attributes.
	* TabItemState.cs, TextBoxState.cs, TrackBarThumbState.cs:
	    Fix typos.

2006-08-04  Jonathan Pobst <[email protected]>
	* VisualStyleRenderer.cs: Fixed null compare that broke the build.

2006-08-04  Jonathan Pobst <[email protected]>
In System.Windows.Forms.Design:
2007-01-20  Chris Toshok  <[email protected]>

	* ComponentEditorPage.cs: class status fixes.

	* ComponentEditorForm.cs: same.

2006-11-08  Jonathan Pobst  <[email protected]>

	* ToolStripItemDesignerAvailability.cs: Added.
	* ToolStripItemDesignerAvailabilityAttribute.cs: Added.

2005-12-01  Peter Dennis Bartok  <[email protected]>

	* ComponentEditorForm.cs: Added missing attribute

2005-10-13  Peter Dennis Bartok  <[email protected]>

	* EventsTab.cs: Made .ctor() private to fix signature

2005-05-14  Rafael Teixeira <[email protected]>
	* EventsTab.cs: Implementation start with many gaping holes

2005-05-09  Marek Safar  <[email protected]>

	* PropertyTab.cs: Implemented.

2005-02-14  Peter Bartok  <[email protected]>

	* PropertyTab.cs: Made class abstract

2004-04-14  Andreas Nahr <[email protected]>

	* AssemblyInfo.cs: Removed
	* TODOAttribute.cs: Removed (duplicate)

	* System.Windows.Forms.Design.csproj.user
	* System.Windows.Forms.Design.csproj: Removed (outdated)

	* WindowsFormsComponentEditor.cs
	* ComponentEditorPage.cs: Added, mostly implemented

	* ComponentEditor.cs: Removed (does not belong here)

2004-02-24  Andreas Nahr <[email protected]>

	* IWindowsFormsEditorService.cs: Corrected casing,
	  it is not yet corrected in the filename, implemented

2003-08-30  Alexandre Pigolkine <[email protected]>

	* ComponentEditor.cs
	* IUIService.cs: stubs added 

2003-03-31  Alan Tam <[email protected]>

	* UITypeEditor.cs: Removed because it shan't be here

2002-08-04  DennisHayes <[email protected]>

	* Started cheanglog

2002-08-04  DennisHayes <[email protected]>

	* AnchorEditor.cs
	* AxImporter.cs
	* ComponentDocumentDesigner.cs
	* ComponentEditorForm.cs: Stubbed out
	
	* ComponentTray.cs
	* ControlDesigner.cs
	* ComponentEditor.cs
	* DocumentDesigner.cs
	* EventsTab.cs
	* FileNameEditor.cs
	* IMenuEditorService.cs
	* IUIService.cs
	* IWindowsformsEditorService.cs
	* MenusCommands.cs
	* ParentControlDesigner.cs
	* PropertyTab.cs
	* ScrollableControlDesigner.cs
	* SelectionRules.cs
	* UITypeEditor.cs: Class body defined only. No stubbs done.
	
	* TODOAttribute.cs:
	  Used to mark unimplemented functions.
	
	* System.Windows.Forms.Design.csproj
	* System.Windows.Forms.Design.csproj.user
	* AssemblyInfo.cs:
	  Needed for Visual Studio compile.

In System.Windows.Forms:
2007-01-20  Chris Toshok  <[email protected]>

	* CheckedListBox.cs: class status changes.

	* ScrollableControl.cs: same.

	* RichTextBox.cs: same.

	* ContainerControl.cs: same.

	* ListView.cs: same.

	* NotifyIcon.cs: same.

	* MenuStrip.cs: same.

	* RadioButton.cs: same.

	* CheckBox.cs: same.

	* PrintPreviewDialog.cs: same.

	* Form.cs: same.


svn path=/trunk/mcs/; revision=71385
2007-01-20 09:28:34 +00:00
Jackson Harper f7983dc177 * TextBox.cs:
* RichTextBox.cs:
        * TextControl.cs: Starting to merge in some pieces of my older
        undo work.  Basically just some slight cleanup of the undo API.


svn path=/trunk/mcs/; revision=71309
2007-01-18 19:34:18 +00:00
Jackson Harper 8bc19671ee * TextBoxBase.cs: Use the new SuspendRecalc/ResumeRecalc methods
that allow us to have nested recalc = false blocks.
        - Add paste support for images in the RichTextBox
        * RichTextBox.cs: flush the text after the color is changed, so
        the change takes effect.
        - Use SuspendRecalc
        - Some extra debugging info
        * TextControl.cs: Tags no longer track their length, it is just
        computed from the next tags length, this makes things a little
        simpler and reduces places that we have to track length changes.
        - Refactored the linetag class a little so we could make it
        a base class for different kinds of tags
        - Created a image tag, a tag that can have a single image
          inserted
        into it
        - Replace the norecalc flag with a Suspend/Resume Recalc pair,
          so
        that we can call suspend multiple times.
        - Add some debugging methods



svn path=/trunk/mcs/; revision=71170
2007-01-16 20:23:42 +00:00
Jackson Harper 9c245ca766 * RichTextBox.cs:
* TextBoxBase.cs: New args for FormatText
        * TextControl.cs: Rewrote the main drawing method, this version
        feels a little easier to understand and debug to me.  Hopefully
it
        does to others also
        - Fix FormatText to OR in the new formating values.  Added
        FormatSpecified param, basically this works in the same way as
        BoundsSpecified in Control.
        - Set the caret properties when the caret is positioned.
        - When wrapping text make sure that we calculate the width of
          the
        last character
        - when calculating alignments we might have wrapped down to the
        next line, so don't search for an individual tag, search for the
        end of the line


svn path=/trunk/mcs/; revision=69763
2006-12-19 17:57:16 +00:00
Jackson Harper 2d3ee79bc1 * TextBoxBase.cs: Take HideSelection into account when
* determining
        whether or not to show the selection.
        * RichTextBox.cs: After inserting the RTF into the document move
        the cursor to the beginning of the document.


svn path=/trunk/mcs/; revision=69203
2006-12-07 21:12:13 +00:00
Chris Toshok 51073c4aee * ListView.cs: the BackgroundImage override is just to set
attributes.  chain up to base.BackgroundImage.

	* RichTextBox.cs: same.

	* ToolBar.cs: same, but we need to also redraw the toolbar when it
	changes, so instead a handler for BackgroundImageChanged.
	
	* Control.cs: make background_image private.

2006-12-06  Chris Toshok  <[email protected]>


svn path=/trunk/mcs/; revision=69150
2006-12-07 01:28:17 +00:00
Chris Toshok a8ad8e66a0 2006-12-06 Chris Toshok <[email protected]>
* RichTextBox.cs: don't assign to has_focus in GotFocus/LostFocus.
	Control does this before calling emitting these events.

	* TabControl.cs: same.

	* ThemeWin32Classic.cs: use Control.ClientRectangle instead of
	Control.client_rect.

	* ButtonBase.cs: use the ClientSize property instead of the
	client_size field.

	* ScrollableControl.cs: same.

	* Control.cs: another pass at making properties private.  also,
	move the initialization of tab_stop to the ctor.


svn path=/trunk/mcs/; revision=69101
2006-12-06 15:26:01 +00:00
Chris Toshok 1da3fa560f 2006-12-04 Chris Toshok <[email protected]>
* LinkLabel.cs: fix up compiler warnings.

	* TableLayoutSettings.cs: same.

	* TreeView.cs: same.

	* ToolBar.cs: same.

	* TabControl.cs: same.

	* RichTextBox.cs: same.

	* ListViewItem.cs: same.

	* PropertyGrid.cs: same.

	* DataGridViewRowPostPaintEventArgs.cs: corcompare fix.

	* ToolTip.cs same.

	* TextRenderer.cs: fix up compiler warnings.

	* Label.cs: same.

	* Form.cs: corcompare fixes.

	* PictureBox.cs: fix up compiler warnings.

	* ImageListStreamer.cs: same.

	* TrackBar.cs: corcompare fix.

	* Control.cs: fix up compiler warnings.

	* SplitterPanel.cs: same.

	* NumericTextBox.cs: same.

	* ImageList.cs: same.

	* StatusStrip.cs: same.

	* ProgressBar.cs: corcompare fix.

	* ToolStripButton.cs: fix up compiler warnings.

	* ToolStripStatusLabel.cs: same.

	* ToolStripSplitButton.cs: same.

	* ToolStripSeparator.cs: same.

	* ToolStripProgressBar.cs: same.

	* ToolStripDropDownMenu.cs: same

	* ToolStripDropDown.cs: same.

	* ToolStripDropDownButton.cs: same.

	* ToolStrip.cs: same.

	* ToolStripControlHost.cs: same.

	* ToolStripContentPanel.cs: same.

	* ToolStripDropDown.cs: same.

	* ToolStripContainer.cs: same.

	* ToolStripPanel.cs: same, and add "new" where we need it to work
	with the new ArrangedElementCollection.

	* ToolStripItemCollection.cs: add "new" where we need it to work
	with the new ArrangedElementCollection.


svn path=/trunk/mcs/; revision=69012
2006-12-05 04:11:38 +00:00
Chris Toshok 61373aeda6 In System.Windows.Forms:
[ fix the majority of the CS0108 warnings we've been suppressing ]
	
	* TreeView.cs: mark BackgroundImageChanged as 'new'.

	* ToolBar.cs: ImeMode just passes stuff to Control.  Rename Layout
	to "LayoutToolBar" to quiet mcs.
	
	* TabControl.cs: mark our ControlCollection class as 'new'.

	* TextBoxBase.cs: mark some events as 'new'.

	* Splitter.cs: TabStop is 'new'.

	* ControlBindingsCollection.cs: mark a few methods as new since
	they change the visibility from protected to public.

	* RadioButton.cs: DoubleClick -> base class, and remove unused
	HaveDoubleClick.

	* MonthCalendar.cs: ImeMode property -> base class, and mark many
	events as new.

	* NumericUpDown.cs: TextChanged -> base class.

	* CheckedListBox.cs: mark our ObjectCollection class as new to
	quiet mcs.

	* FolderBrowserDialog.cs: make HelpRequest event new and have it
	muck with the base class.

	* StatusBar.cs: fix some mcs warnings about Update being the same
	name as a base class method.

	* RichTextBox.cs: mark some events as new, and make them do things
	to the base class impl.

	* UserControl.cs: mark TextChanged as new, and have it manipulate
	base.TextChanged.

	* UpDownBase.cs: mark some things new.

	* CheckBox.cs: mark DoubleClick "new", and add some text about
	what we need to look at.

	* Panel.cs: make the events "new", and manipulate the base
	version.  these are just here for attributes.

	* AccessibleObject.cs: make owner private.

	* Control.cs: deal with AccessibleObject.owner being private.
	cache our own copy if we need it.

	* Button.cs: add "new" to the DoubleClickEvent.

	* ListBox.cs: no need to track our own has_focus here.  let
	Control.has_focus do it for us.  Also some other work to clear up
	warnings about not overriding base class methods of the same name.
	
	* ComboBox.cs: clear up some warnings about not override base
	class methods of the same name.

2006-12-01  Chris Toshok  <[email protected]>

In System.Windows.Forms.X11Internal:
2006-12-01  Chris Toshok  <[email protected]>

	* X11Hwnd.cs: need to mark queue as "new" to quiet mcs.


svn path=/trunk/mcs/; revision=68852
2006-12-01 21:30:55 +00:00
Chris Toshok c9fd27d1ce 2006-12-01 Chris Toshok <[email protected]>
* Button.cs, PropertyGridTextBox.cs, ComboBox.cs,
	SplitContainer.cs, Control.cs, StatusStrip.cs,
	DataGridTableStyle.cs, MenuItem.cs, DomainUpDown.cs, ImageList.cs,
	NumericTextBox.cs, NumericUpDown.cs, Panel.cs, CommonDialog.cs,
	DataGrid.cs, ScrollBar.cs, TrackBar.cs, PictureBox.cs,
	DateTimePicker.cs, StatusBar.cs, Form.cs, PrintPreviewDialog.cs,
	Label.cs, UserControl.cs, CheckBox.cs, RadioButton.cs,
	LinkLabel.cs, ListControl.cs, PropertyGrid.cs, Splitter.cs,
	MenuStrip.cs, FolderBrowserDialog.cs, NotifyIcon.cs,
	TextBoxBase.cs, ListView.cs, DataGridBoolColumn.cs,
	PrintPreviewControl.cs, RichTextBox.cs, ListBox.cs, TabControl.cs,
	DataGridColumnStyle.cs, ContextMenu.cs, TreeView.cs:

	do most of the work to convert our code over to use
	System.ComponentModel.Component.Events for
	adding/removing/dispatching events.



svn path=/trunk/mcs/; revision=68807
2006-12-01 06:16:09 +00:00
Jackson Harper 01a0f40b03 * TextControl.cs: new param for ReplaceSelection which
determines
        whether we select the new selection, or set the cursor to the
end
        of the new selection.
        * TextBoxBase.cs: Use new param for ReplaceSelection.  When
        pasting, select the new text.
        * RichTextBox.cs: Use new param for ReplaceSelection.


svn path=/trunk/mcs/; revision=68514
2006-11-27 14:40:32 +00:00
Gert Driesen 999a455add * ControlStylesTest.cs: Fixed GetStyle for 2.0 profile.
* ProgressBar.cs: GetStyle fixes for 2.0 profile.
* Control.cs: Same.
* UpDownBase.cs: Same.
* ButtonBase.cs: Same.
* ScrollBar.cs: Same.
* TrackBar.cs: Same.
* PictureBox.cs: Same.
* UserControl.cs: Same.
* Label.cs: Same.
* ListControl.cs: Same.
* TextBoxBase.cs: Same.
* ListView.cs: Same.
* RichTextBox.cs: Same.
* TreeView.cs: Same.

svn path=/trunk/mcs/; revision=68480
2006-11-26 16:55:15 +00:00
Jackson Harper 11ecce6d49 * TextBoxBase.cs: The RichTextBox and textbox have very
* different
        word selection methods.  Implement the textbox's simple word
        selection here, and let the RichTextBox override and provide
it's
        own.
        - Don't do extra selection on mouseup
        * RichTextBox.cs: Use the documents word selection algorithm, I
        think ideally, this function will be pulled into the
        RichTextBox.cs code someday.


svn path=/trunk/mcs/; revision=67555
2006-11-08 21:23:46 +00:00
Jackson Harper 386e2f0004 * RichTextBox.cs: Handle some special chars better, and don't
* skip
        the entire group when we encounter a special char that we don't
        handle correctly.


svn path=/trunk/mcs/; revision=66827
2006-10-20 07:57:44 +00:00
Jackson Harper a1c5ffcc8e * XplatUI.cs:
* XplatUIWin32.cs:
        * Clipboard.cs:
        * DataFormats.cs:
        * XplatUIDriver.cs: Update interface to add a primary selection
        flag, so the driver can use the primary selection buffer if
        needed.
        * XplatUIX11.cs: Allow the clipboard to retrieve from PRIMARY.

        * RichTextBox.cs: We need to supply the data object to paste now
        (so we can choose to supply CLIPBOARD or PRIMARY).
        * TextBoxBase.cs: Supply data object to paste (see above).
        - Middle click uses the primary selection data object.


svn path=/trunk/mcs/; revision=65821
2006-09-22 17:30:08 +00:00
Wade Berrier f7e4582de4 * RichTextBox.cs: More ISO8859-1 -> unicode
svn path=/trunk/mcs/; revision=61546
2006-06-07 22:27:29 +00:00
Peter Dennis Bartok dd494bfef9 2006-06-07 Peter Dennis Bartok <[email protected]>
* RichTextBox.cs: Replaced embedded ISO8859-1 chars with proper unicode
	  values


svn path=/trunk/mcs/; revision=61537
2006-06-07 18:17:53 +00:00
Peter Dennis Bartok ec54599038 2006-04-30 Peter Dennis Bartok <[email protected]>
* TextBoxBase.cs: Removed Fixme
	* RichTextBox.cs (set_RTF): Invalidate document after update (#78247)


svn path=/trunk/mcs/; revision=60115
2006-05-01 04:36:27 +00:00
Peter Dennis Bartok 7e4fe543e1 2006-04-30 Peter Dennis Bartok <[email protected]>
* XplatUIX11.cs:
	  - ScrollWindow: We were passing hwnd.ClientRectangle which returns
	    the rectangle relative to the parent, considering borders. We
	    don't really want that.
	  - ScrollWindow: Fixed warning to be more understandable
	* TextBoxBase.cs: Fixed ScrollWindow calculations to consider our
	  scrollbars and scroll only the visible area
	* RichTextBox.cs: Removed debug output


svn path=/trunk/mcs/; revision=60110
2006-04-30 22:35:55 +00:00
Peter Dennis Bartok 2a06a1f205 2006-04-28 Peter Dennis Bartok <[email protected]>
* Application.cs: Updated to new StartLoop/GetMessage API
	* RichTextBox.cs: Provide some output on RTF parsing errors
	* XplatUI.cs, XplatUIDriver.cs, XplatUIOSX.cs, XplatUIWin32.cs: Added
	  new queue_id argument to GetMessage and PeekMessage to allow faster
	  handling of per-thread queues in drivers.
	* Hwnd.cs: Added Queue tracking and property
	* MenuAPI.cs: Updated to new StartLoop/GetMessage API
	* XEventQueue.cs: Added thread trackingA
	* PropertyGridView.cs: Updated to new StartLoop/GetMessage API
	* XplatUIX11.cs:
	  - Implemented new per-thread queue
	  - GetMessage: Fixed return/break behaviour on several cases. We were
	    returning stale messages in some cases, instead of just processing
	    the next message


svn path=/trunk/mcs/; revision=60063
2006-04-28 22:18:21 +00:00
Peter Dennis Bartok 7166fb6ad6 2006-04-25 Peter Dennis Bartok <[email protected]>
* TextControl.cs, ComboBox.cs, CommonDialog.cs, Theme.cs, 
	  XplatUIWin32.cs, RichTextBox.cs, ImageListStreamer.cs,
	  TextBoxBase.cs: Unused var fixes
	* AxHost.cs: Small 2.0 fix
	* XplatUIX11.cs: Switched to IntPtr from int for XA_CARDINAL atoms 
	  as it seems that is what at least Metacity expects. This will make
	  icons show up on 64bit platforms. We still have some 64bit size
	  issues, though, since the startup app window size still won't match.


svn path=/trunk/mcs/; revision=59877
2006-04-25 21:47:24 +00:00
Peter Dennis Bartok 693aaf3bcc - Stub these for now
svn path=/trunk/mcs/; revision=58829
2006-03-31 03:45:27 +00:00
Peter Dennis Bartok 16f4a0b9c7 2006-03-12 Peter Dennis Bartok <[email protected]>
* RichTextBox.cs: Need to scroll to caret after text is inserted (#77672)
	* TextBoxBase.cs:
	  - Scroll to caret after inserting text (#77672)
	  - Make scroll range one pixel higher, fixes off-by-one error (and
	    makes underlines visible on the last line)


svn path=/trunk/mcs/; revision=57887
2006-03-13 02:21:10 +00:00
Peter Dennis Bartok 0e9a962362 2006-03-09 Peter Dennis Bartok <[email protected]>
* Form.cs(ScaleCore): No longer calling base.ScaleCore since that
	  method also moves the window; instead implemented a copy of
	  Control.ScaleCore (Part of fix for #77456)
	* TextBoxBase.cs: 
	  - Created new CreateGraphicsInternal method to allow providing
	    a graphics context when no handle is created without triggering
	    handle creation. (Part of fix for #77456)
	  - Replaced use of Control.CreateGraphics with CreateGraphicsInternal
	* TextControl.cs: 
	  - Switched Constructor to require TextBoxBase instead of Control (to
	    allow uncast access to CreateGraphicsInternal)
	  - Safeguarded use of owner.Handle property. No longer accessing it
	    unless the handle is already created.
	  - Replaced use of Control.CreateGraphics with CreateGraphicsInternal
	  - Now triggering a recalc when owning control becomes visible
	* TextBox.cs, RichTextBox.cs: Switched to use new internal 
	  TextBoxBase.CreateGraphicsInternal() method to avoid triggering
	  premature handle creation (Part of fix for #77456)
	* Control.cs:
	  - We now only destroy our double-buffering buffers when the
	    control is resized or disposed, but not when visibility
	    changes. (The code even re-created them twice every time)
	  - Now requiring a redraw of the buffer on visibility changes
	    (fixes bug 77654 part 2)
	  - Not passing OnParentVisibleChanged up unless the control
	    is visible
	  - CanFocus: Fixed to match MS documentation
	  - Focus: Fixed to return actual focus state and to check if
	    setting focus is legal before setting it


svn path=/trunk/mcs/; revision=57716
2006-03-09 10:04:23 +00:00
Peter Dennis Bartok ecbccdc3c8 2006-02-28 Peter Dennis Bartok <[email protected]>
* RichTextBox.cs (FlushText): When newline is true, we always
	  need to split the line, even if no text is on it and we may
	  never eat newlines. (Fixes #77669)


svn path=/trunk/mcs/; revision=57453
2006-03-01 00:17:51 +00:00
Peter Dennis Bartok 5295cd8a57 2006-02-27 Peter Dennis Bartok <[email protected]>
* TextControl.cs: 
	  - InsertRTFFromStream: Added 'number of characters inserted' argument
	  - set_SelectedRTF: Now using the number of characters to calculate
	    the new location for the selection and cursor (x/y cannot be used
	    due to potentially already wrapped text)


svn path=/trunk/mcs/; revision=57367
2006-02-28 02:14:39 +00:00
Peter Dennis Bartok e06fd0b53d 2006-02-27 Peter Dennis Bartok <[email protected]>
* TextControl.cs: Added property and implemented means to allow 
	  disabling recalculation of a document (can be used to speed up
	  multiple inserts and is needed to make RTF inserts predictable, see
	  bug #77659)
	* RichTextBox.cs: Using the new NoRecalc property of Document to
	  keep x/y insert locations predictable. Also makes it faster inserting
	  large chunks of RTF


svn path=/trunk/mcs/; revision=57366
2006-02-28 01:40:04 +00:00
Peter Dennis Bartok da39ca5f6c 2006-02-26 Peter Dennis Bartok <[email protected]>
* RichTextBox.cs:
	  - SelectionColor and SelectionFont methods no longer set absolute
	    styles. Instead, the keep font or color respectively (This 
	    resolves a long-standing FIXME in the code)
	  - When flushing RTF text, the insert code now considers text trailing
	    behind the insertion point (Fixes the bug where when replacing
	    the selected text via SelectedRTF the remainder of the line behind 
	    the selection would stay on the first insertion line)
	* TextBoxBase.cs:
	  - AppendText now updates the selection points after inserting text
	  - AppendText now ensures that the last tag (sometimes 0-length) of
	    the document is used for the style information (Fixes part of 
	    bug #77220)
	* TextControl.cs:
	  - Created new FontDefiniton class to allow describing partial style
	    changes
	  - StreamLine() now takes a lines argument, to allow it to decide
	    whether an encountered zero-length tag is the last in the document
	    (which must be kept to not loose the font/color contained in it,
	    for later appends)
	  - Created Combine() and Split() methods for Marker structs, to 
	    support marker updates due to reformatted documents (soft line
	    wraps)
	  - Implemented Document.CaretTag setter
	  - Fixed MoveCaret(CtrlEnd) handling, now moves to the last character
	    of the last line (Not the cause, but also exposed by bug #77220)
	  - Added LineTag argument to InsertString method, to allow callers
	    to force a certain tag to be used (required to force use of the
	    trailing zero-length tag of a document)
	  - Now updating markers in Combine(), to avoid stale tag markers
	  - Added some method descriptions to aid maintenance
	  - Implemented new FormatText concept, allowing additive/subtractive
	    formatting by only specifying the components that are to be 
	    changed. This was needed for resolving the RTB.SelectedColor/
	    RTB.SelectedFont fixmes
	  - Added Break() support method to allow breaking up linetags (used
	    for partial formatting)
	  - Added GenerateTextFormat() method. It is used for partial 
	    formatting and allows to generate a full font/color from given
	    attributes and an existing tag.


svn path=/trunk/mcs/; revision=57322
2006-02-27 03:03:22 +00:00
Peter Dennis Bartok 74f10f18e5 2006-01-04 Peter Dennis Bartok <[email protected]>
* RichTextBox.cs: Same fix as last, just for SelectionColor. This
	  time I checked there are no others like it.


svn path=/trunk/mcs/; revision=55088
2006-01-04 23:12:15 +00:00
Peter Dennis Bartok e744b438e4 2006-01-03 Peter Dennis Bartok <[email protected]>
* RichTextBox.cs: FormatText is 1-based, make it so when SelectionFont
	  is called. This fixes the crash in Nexxia when setting the font
	  attributes in the chat. [However, RTF needs a look-over to make sure
	  that all SelectionXXX methods handle the special case that selection
	  is empty and therefore the change must be applied to all text starting
	  at the cursor/selection start]


svn path=/trunk/mcs/; revision=55039
2006-01-04 03:32:25 +00:00
Peter Dennis Bartok 4c8ead4420 2005-12-22 Peter Dennis Bartok <[email protected]>
* RichTextBox.cs: Set default RTF font for documents that don't
	  have a font table (Fixes #77076)


svn path=/trunk/mcs/; revision=54762
2005-12-23 00:18:38 +00:00
Jackson Harper 5381bc6e0c * RichTextBox.cs: Expand statement to help out gmcs and fix the
2.0 build.


svn path=/trunk/mcs/; revision=54555
2005-12-16 23:08:20 +00:00
Peter Dennis Bartok 831ee470d4 2005-12-15 Peter Dennis Bartok <[email protected]>
* TextBoxBase.cs:
	  - MaxLength now treats 2^31-1 equal to unlimited length (this is
	    not quite MS compatible, MS uses that number only for single line
	    and 2^32-1 for multi-line, but I figure it won't hurt keeping
	    the limit at 2GB)
	  - Now enforcing the MaxLength limit when entering characters
	  - Added argument to internal Paste() method to track if it's called
	    from programatically or via keyboard, since keyboard driven pastes
	    need to enforce max-length
	  - Added logic to Paste to only paste as many chars as MaxLength 
	    allows
	* RichTextBox.cs: Updated to use new obey argument for internal Paste()
	* TextControl.cs:
	  - Added Length property to return number of characters in document
	  - Added private CharCount property which only tracks actual chars
	    in the document (no linefeeds) and fires event when CharCount
	    changes
	  - Added tracking of character count to all methods that alter it
	  - Added LengthChanged event to allow applications to subscribe
	    to any changes to the document


svn path=/trunk/mcs/; revision=54537
2005-12-16 19:16:31 +00:00
Peter Dennis Bartok ae51076958 - Removed todo
svn path=/trunk/mcs/; revision=54140
2005-12-09 01:18:46 +00:00
Peter Dennis Bartok 7656ed30e9 2005-12-05 Peter Dennis Bartok <[email protected]>
* RichTextBox.cs: Implemented get_SelectionColor


svn path=/trunk/mcs/; revision=53950
2005-12-05 20:45:33 +00:00
Peter Dennis Bartok c312c28cd3 2005-12-02 Peter Dennis Bartok <[email protected]>
* TextBoxBase.cs: Now uses Jackson's new and improved ImplicitScrollbar
	* RichTextBox.cs: FormatText position arguments are 1-based, now making
	  sure that what we pass to FormatText is always 1-based. Fixes #76885


svn path=/trunk/mcs/; revision=53857
2005-12-02 23:11:13 +00:00
Peter Dennis Bartok 04e2a5ac24 2005-11-30 Peter Dennis Bartok <[email protected]>
* TextBoxBase.cs:  Implemented Ctrl-Ins (Copy), Shift-Ins (Paste) and
	  Shift-Del (Cut), apparently Emacs uses these old Win 2.x keys. This
	  is for Jackson
	* RichTextBox.cs: Added calls to base for DnD events


svn path=/trunk/mcs/; revision=53669
2005-11-30 08:20:43 +00:00