Commit Graph
155 Commits
Author SHA1 Message Date
Alan McGovern ae0852655c Fixed typo
svn path=/trunk/mcs/; revision=76358
2007-04-26 22:39:33 +00:00
Jackson Harper c053b3ba10 * TextControl.cs: Move the margins to the document, add a method
so the margin sizes can be updated.
        * TextBoxBase.cs: When the border style is changed, update the
        border sizes.


svn path=/trunk/mcs/; revision=75961
2007-04-19 16:02:33 +00:00
Jackson Harper 6bc8ce7d87 * TextControl.cs: Oops, we need to use the ClientRect not the
bounds here.


svn path=/trunk/mcs/; revision=75952
2007-04-19 14:43:49 +00:00
Jackson Harper 27f72ba483 * TextControl.cs: Pressing the end key shouldn't move the caret
past the line ending.
        * TextBoxBase.cs: We can still delete if we are in the line
        ending and the combine will just kill the existing line ending.


svn path=/trunk/mcs/; revision=75899
2007-04-18 18:50:05 +00:00
Jackson Harper 45e71bb937 * TextControl.cs: We can't move lines, then invalidate their
bounds, we need to get the old bounds and combine that with the
        new bounds.
        * TextBoxBase.cs: Before combining two lines for a delete, we
        * need
        to invalidate the area of the old line, since that will be moved
        in the combine operation.


svn path=/trunk/mcs/; revision=75897
2007-04-18 17:56:39 +00:00
Jackson Harper c057983d0e * TextControl.cs: Set the line ending correctly for the first
inserted line.


svn path=/trunk/mcs/; revision=75682
2007-04-13 16:11:36 +00:00
Jackson Harper 4c4b2b5bb4 * TextControl.cs: Fix some off-by-one issues in line duplication
and insertion in the undo manager. Also, overwrite the first tag
        of a line on insert, if it is just a zero lengthed tag. This
        prevents us from getting an extra stranded tag at the beginning
of
        the first line.


svn path=/trunk/mcs/; revision=75634
2007-04-12 06:41:35 +00:00
Jackson Harper 2718e91892 * TextControl.cs: We don't need this -1 on the line count
* anymore.


svn path=/trunk/mcs/; revision=75541
2007-04-09 17:40:03 +00:00
Jackson Harper 64b0a15afc * TextControl.cs: We need to invalidate across the width of the
document when we are invalidating multiple lines.


svn path=/trunk/mcs/; revision=75469
2007-04-06 03:53:22 +00:00
Jackson Harper 41c404b5a1 - When combining lines, strip the ending text off the first
line.


svn path=/trunk/mcs/; revision=75453
2007-04-05 17:55:39 +00:00
Jackson Harper 6d0aca8b00 * TextControl.cs: Move around the line endings when
* crossing line
        boundaries.


svn path=/trunk/mcs/; revision=75452
2007-04-05 17:12:03 +00:00
Jackson Harper 121feae8d9 typo
svn path=/trunk/mcs/; revision=75451
2007-04-05 16:14:48 +00:00
Jackson Harper 40983e0c10 * TextControl.cs:
* TextBoxBase.cs: Try to never move the cursor into the line
        ending.


svn path=/trunk/mcs/; revision=75450
2007-04-05 15:39:13 +00:00
Jackson Harper 8518a3c8f2 * TextControl.cs: When we delete multiple selection lines
invalidate the selection area, don't need to do that for single
        lines because the final update view will handle it.


svn path=/trunk/mcs/; revision=75400
2007-04-04 18:14:40 +00:00
Jackson Harper 085eabbfa8 * TextBoxBase.cs: When the user presses enter, insert a line
ending into the text. (Maybe this would be a good spot for
        Environment.NewLine).
        * TextControl.cs: Remove undo manager hack, line endings get
        inserted properly now.


svn path=/trunk/mcs/; revision=75398
2007-04-04 17:03:04 +00:00
Jackson Harper 80364028f9 * TextControl.cs: Don't attempt to copy text for lines with no
text in them (technically this shouldn't happen, but we aren't
        always inserting line endings when we should be).


svn path=/trunk/mcs/; revision=75363
2007-04-03 21:52:34 +00:00
Jackson Harper b47a820487 - Still have to do the end tag if we have stepped all the ways
to
        the end.


svn path=/trunk/mcs/; revision=75297
2007-04-02 19:13:19 +00:00
Jackson Harper 1df9d24abd flush
svn path=/trunk/mcs/; revision=75295
2007-04-02 19:04:36 +00:00
Jackson Harper d044b3d673 * TextControl.cs: Make sure the attributes get set on the last
tag.


svn path=/trunk/mcs/; revision=75294
2007-04-02 18:36:07 +00:00
Jackson Harper 9b28aa8782 * TextControl.cs: When deleting text from non multiline
* textboxes,
        we need to update the entire document, because line offsets will
        be shifting.


svn path=/trunk/mcs/; revision=75154
2007-03-29 16:57:25 +00:00
Jackson Harper 22e18dfed8 - Make sure the line ending calcs get called.
svn path=/trunk/mcs/; revision=75086
2007-03-28 17:01:24 +00:00
Jackson Harper feb4c4dbd6 * TextControl.cs: If a char delete removes a line ending, we
* need
        to update the ending style.


svn path=/trunk/mcs/; revision=75082
2007-03-28 15:58:40 +00:00
Jackson Harper 4c73768034 * TextControl.cs: Improvements to non multiline line ending
drawing/measuing.


svn path=/trunk/mcs/; revision=75046
2007-03-27 20:53:53 +00:00
Jackson Harper 687b69f47d * TextControl.cs: Draw and measure line endings when in non
multiline mode.
        - When searching the text, count the end of the last line as a
        word boundary.


svn path=/trunk/mcs/; revision=74996
2007-03-26 22:36:59 +00:00
Jackson Harper c7ea3e0eb8 oops debug code.
svn path=/trunk/mcs/; revision=74921
2007-03-23 20:36:10 +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
Jackson Harper e5c508bce9 * TextControl.cs:
* TextBoxBase.cs: Allow different types of line endings. \r,
        * \r\n, \r\r\n, and \n.


svn path=/trunk/mcs/; revision=74708
2007-03-20 21:48:08 +00:00
Jackson Harper 0d8caf7a85 * TextControl.cs: Need to use SelectionLength () not
selection_length, since that var is reset to -1.
        - Draw the caret when we don't have focus.
        * TextBox.cs: The selectall actually doesn't occur until the
        * first
        focus.
        * TextBoxBase.cs: Need to update the caret position after a
        selectall.


svn path=/trunk/mcs/; revision=74659
2007-03-20 04:46:56 +00:00
Jackson Harper aff37c7788 * TextBox.cs: Reduce the amount of invalidation we do.
* TextBoxBase.cs: Make shortcuts enabled true by default, at
        * least
        some of them are true by default on MS.
        - Add some functions to reduce the amount of invalidates we do.
        * TextControl.cs: Less invalidation.


svn path=/trunk/mcs/; revision=74636
2007-03-19 21:02:46 +00:00
Jackson Harper a7c63124df * TextControl.cs: Add an alignment property that all new lines
will be given.
        - Make sure to use the align shift when calculating the line's X
        position.
        * TextBox.cs: Set the alignment on the document as well as on
        * all
        the document lines.        
        


svn path=/trunk/mcs/; revision=74613
2007-03-19 15:41:35 +00:00
Jackson Harper 714ae01c7e * TextBoxBase.cs: Allow updating the selection position when the
cursor is outside the textarea, but we have a capture.
        * TextControl.cs: A special case for when the cursor is outside
        the bounds of the TB.


svn path=/trunk/mcs/; revision=74575
2007-03-18 23:01:21 +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 4845bc0398 * TextControl.cs:
* TextBoxBase.cs: On MS, a fixed single border is not in NC
        * area,
        it is drawn on the controls client window and there is no NC
        area.


svn path=/trunk/mcs/; revision=74416
2007-03-15 19:39:40 +00:00
Jackson Harper 4106790984 * TextBox.cs: Don't explicitly set our background colors.
* TextControl.cs:
        * TextBoxBase.cs: Draw readonly text.


svn path=/trunk/mcs/; revision=74035
2007-03-09 22:40:33 +00:00
Jackson Harper b39363169b * TextControl.cs: Try to never let the caret stay in a non-text
tag.


svn path=/trunk/mcs/; revision=73504
2007-02-27 18:59:38 +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
Andreia Gaita 127a57c070 * PrintPreviewControl.cs: rewrite toolbar code to fix #80725. Correct 6-up image
(the 6 was cut off on the right side)

2007-02-08  Andreia Gaita  <[email protected]>

svn path=/trunk/mcs/; revision=72500
2007-02-08 18:59:26 +00:00
Jackson Harper 8855b2895a - Consolidate the line position.
svn path=/trunk/mcs/; revision=72309
2007-02-05 17:09:33 +00:00
Jackson Harper 18f25cae70 * TextControl.cs: Don't have crlfs when we are non multiline.
svn path=/trunk/mcs/; revision=72305
2007-02-05 16:39:35 +00:00
Andreia Gaita d12da11da0 2007-01-29 Andreia Gaita <[email protected]>
* TextBox.cs: Redraw when the password characters changes
* TextControl.cs: Check if textbox has a password char and draw 
a line of password chars instead of the text in the line. LineTag gets 
an extra Draw() method which allows document.Draw to override the text 
that will be drawn. Removes 1024 char limitation on length of passworded 
lines.

svn path=/trunk/mcs/; revision=71896
2007-01-29 16:08:31 +00:00
Jackson Harper c56d578173 * TextControl.cs: For the last char of a line we need to use the
line size, not that chars width, since it won't actually be
        computed since the right side of a char is based on the start of
        the left side of the next char, and the next char does not
exist.



svn path=/trunk/mcs/; revision=71726
2007-01-25 22:24:12 +00:00
Jackson Harper 850823a103 * TextControl.cs: Respect ShowSelection when deciding whether or
not to display the caret, this allows comboboxes to have carets
        when the combotextbox does not have focus.


svn path=/trunk/mcs/; revision=71682
2007-01-25 17:09:35 +00:00
Jackson Harper f8a3befa34 * TextControl.cs: Add a Suspend/Resume for updating, basically
* the
        same as the Suspend/Resume for recalc, except this will do
actual
        Invalidates.
        - New Undo manager, works much like the MS version.
        - Implemented Redo
        * TextBoxBase.cs: The Cut operation is undoable.


svn path=/trunk/mcs/; revision=71677
2007-01-25 16:39:01 +00:00
Jackson Harper e035da702b oops left some debug code in.
svn path=/trunk/mcs/; revision=71564
2007-01-23 21:40:39 +00:00
Jackson Harper 626260e384 * TextControl.cs:
* TextBoxBase.cs: Checking in some pieces of the undo stuff so
        that I can fix a broken unit test (TextBoxTest::ClearUndo)


svn path=/trunk/mcs/; revision=71527
2007-01-23 17:32:24 +00:00
Jackson Harper 86ba4e0966 * TextControl.cs: Calculate width properly.
- Don't store the tag's X offset, this can be figured out very
        easily.
        - When getting the caret tag make sure to get the last empty
          tag.


svn path=/trunk/mcs/; revision=71312
2007-01-18 21:46:13 +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 4fd6a930c2 * TextControl.cs: We can't skip tags if any part of the tag is
visible.


svn path=/trunk/mcs/; revision=71306
2007-01-18 18:16:59 +00:00