* 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
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
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
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
* 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
* 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
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
* 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
* 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
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
* 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
[ 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
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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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