Commit Graph

68 Commits

Author SHA1 Message Date
Dylan Smith 5d74f58382 richedit: Actually store end of line string for end paragraph runs.
Previously a count of the carraige returns and line feeds were stored
for end of paragraph runs, and a paragraph sign was stored as the actual
string.  This was causing many special cases where the length of the
run needed to be determined differently if the run was or wasn't an
end of paragraph run.

There wasn't any use for storing the paragraph sign unless some drawing
code gets commented out to allow the end paragraphs to be shown,
therefore I changed the code to store the actual string that gets
retrieved by WM_GETTEXT.
2009-01-28 12:11:36 +01:00
Dylan Smith 94146a72ad richedit: Removed some unused invalidation code.
The ME_InvalidateFromOfs and ME_QueueInvalidateFromCursor functions are
never called, and the nInvalidOfs variable had its value set but never
used.
2009-01-22 15:28:22 +01:00
Dylan Smith 902afbc65b richedit: Prevented using NULL hwnd for certain operations.
Certain operations will simply not be done for windowless richedit
controls, such as WM_PAINT which isn't done for windowless richedit
controls since ITextServices provides a TxDraw method.
2009-01-21 11:55:03 +01:00
Dylan Smith 6c4dda009e richedit: Implemented ITextHost for windowed richedit controls. 2009-01-21 11:54:26 +01:00
Dylan Smith 89f88a49a4 richedit: Store an internal copy of the window style flags. 2009-01-16 12:35:28 +01:00
Dylan Smith e6fedf879c richedit: Implemented the horizontal scrollbar. 2009-01-15 14:13:38 +01:00
Dylan Smith f885d40d67 richedit: Store mouse captured state rather than calling GetCapture.
Windowless richedit control will not be able to call GetCapture without
a handle to the host window (and there is no ITextHost_TxGetCapture
method), but there is a ITextHost_TxSetCapture method available for
setting and releasing the capture on the mouse.  This means that the
richedit control will need to keep track of whether it has captured the
mouse or not to implement windowless richedit controls.
2009-01-12 14:42:02 +01:00
Dylan Smith dc03b6b2f2 richedit: Removed redundant editor height variables and calculations.
During wrapping there were three different heights that were being
stored, with only one of them being done correctly.  The other ones
failed to incorporate the height of the paragraph or row, so ended up
being incorrect.
2008-12-20 11:43:09 +01:00
Dylan Smith 297716e01c richedit: Made sure text is offset by formatting rectangle.
The formatting rectangle is set with EM_SETRECT, and retrieved with
EM_GETRECT, so it corresponds to rcFormat in the code.  This defines the
area that the richedit control should draw the text so that it is
offset by the top-left corner of the formatting rectangle, and clipped
so that it doesn't draw past the bottom or right hand side.  Thus this
is important for implementing windowless richedit controls to not
interfere with the rest of the window.
2008-12-18 14:19:40 +01:00
Dylan Smith c70f6a3933 richedit: Use the DefWindowProc to implement WM_SETREDRAW. 2008-10-20 11:37:27 +02:00
Dylan Smith 1ed84f0dcc richedit: Fixed centering and right align with word wrap disabled. 2008-10-13 13:17:53 +02:00
Dylan Smith ddc107bd26 richedit: Added support for changing cell border colours. 2008-08-18 17:15:57 +02:00
Dylan Smith 421c5b0e02 richedit: Borders are now drawn for tables and nested tables. 2008-08-18 17:15:57 +02:00
Dylan Smith 300db3765f richedit: Each cell can contain multiple paragraphs in msftedit. 2008-08-18 14:34:11 +02:00
Dylan Smith 11c8039699 richedit: Use tabstops to store cell positions. 2008-08-05 14:09:37 +02:00
Alex Villacís Lasso acfb6ea210 richedit: Do not read actual scrollbar state for scrollbar update, use internal state instead. 2008-07-23 13:05:27 +02:00
Dylan Smith e3efa88c45 richedit: Cannot undo setting of default character format.
This also reverts commit 2b52dd845097f16076c0185b02a003f63898dcab:
wordpad: Empty the richedit undo buffer on creation.

The reverted commit I created to fix an issue that only applied to Wine,
but it just masked the issue which was in richedit controls.  The
default character format was set in two places while wordpad was
starting up, and caused wordpad to have two undo items at startup.
2008-07-14 12:22:44 +02:00
Dylan Smith aba425eb70 richedit: PFE_TABLE flag is now used instead of private bTable value.
The PARAFORMAT structure has a bit in wEffects to indicate whether the
paragraph is a table or not, so this should be used instead of a private
bTable value, since this structure can be retrieved with EM_GETPARAFORMAT.
2008-07-09 11:31:21 +02:00
Dylan Smith eb4ed9cadf richedit: Removed unused variable bCaretShown in ME_TextEditor. 2008-07-08 21:08:53 +02:00
Dylan Smith 69cf4e9ac4 richedit: Implemented triple click selection. 2008-07-08 10:44:32 +02:00
Dylan Smith 7c352b9638 richedit: Implemented paragraph selection. 2008-07-08 10:44:12 +02:00
Dylan Smith abefc28fe7 richedit: Fixed drag and shift selection for words and lines.
Previously word drag and shift selection was not implemented.  Line
drag selection was working, but shift selection wasn't.
2008-07-08 10:43:55 +02:00
Dylan Smith 2eec4f03ed richedit: Fixed the selection bar width. 2008-07-07 11:10:49 +02:00
Dylan Smith d1f1346f54 richedit: Implemented undo coalescing to group typing events.
Consecutively typed characters are grouped together to be undone
together.  The grouping of typed characters can be stopped by certain
events that are mentioned in MSDN's remarks on the EM_STOPGROUPTYPING
message, which is also implemented by this patch.
2008-06-26 21:18:50 +02:00
Alex Villacís Lasso 1fa39b50c0 richedit: Only notify selection change when selection has actually changed from previous notification.
Otherwise, redundant and early notifications are sent to apps that do not expect them. Fixes crash #1 with Perfect! TextEdit.
2008-04-29 14:56:11 +02:00
Alex Villacís Lasso d47f66191e richedit: Add support for encoding number of CR and LF contained within a line break. 2008-04-29 14:53:46 +02:00
Eric Pouech 33d7cea120 richedit: Added support for EM_SETTARGETDEVICE with a NULL DC. 2008-03-17 14:37:43 +01:00
Eric Pouech 4fb2dfc9f0 richedit: Added support for end of line inside paragraphs. 2008-03-17 14:34:24 +01:00
Eric Pouech 00de77517a riched20: Start handling OLE objects inside richedit. 2008-02-05 11:11:32 +01:00
Eric Pouech f43570cbf0 richedit: Optimizations for the style selection.
Use a ME_Context for style selection/unselection.
Store the (x,y) dpi information for a given DC in the corresponding ME_Context structure.
2008-01-02 13:57:37 +01:00
Eric Pouech f4fd063101 richedit: Enforce usage of paraformat2 fields instead of homegrown ones for paragraphs. 2008-01-02 13:52:10 +01:00
Maarten Lankhorst b81335501f riched20: Implement ECO/EM SELECTIONBAR. 2007-12-17 11:34:40 +01:00
Lei Zhang 0d4707c284 riched20: Properly calculate control display height. 2007-08-16 11:35:06 +02:00
Aric Stewart c03125a1be riched20: Make richedit control IME aware. 2007-06-28 12:16:12 +02:00
Huw Davies 94dfc0e80e riched20: Don't mess with the caret if we don't have focus. 2007-06-06 12:09:53 +02:00
Matt Finnicum abecd9e393 riched20: Rewrite of scrolling and some redrawing code.
Replaces duplicated scrolling code with re-usable functions.
Removes excessive boundary checking on scroll code, since that's done
in the scrollbar control anyways.
Properly separates repaint calls based on what has changed.
Send EN_UPDATE and EN_CHANGE at the right places.
Only call EnsureVisible on changes, not all repaints.
2006-09-11 11:29:42 +02:00
Ken Myers 13e4ddd2df riched20: Implement EM_EXLIMITTEXT, EM_GETLIMITTEXT and tests. 2006-08-10 11:28:43 +02:00
Krzysztof Foltman bad844d0a9 riched20: New, clean, simple selection repaint logic - should fix all outstanding refresh issues. 2006-08-07 19:59:58 +02:00
Matt Finnicum 2b92bf78d1 riched20: Implement EM_SETPASSWORDCHAR and EM_GETPASSWORDCHAR. 2006-08-05 11:25:34 +02:00
Jonathan Ernst 360a3f9142 Update the address of the Free Software Foundation. 2006-05-23 14:11:13 +02:00
Matt Finnicum a379ac9ef5 riched20: Implement EM_SETUNDOLIMIT and its conformance tests. 2006-05-16 12:41:21 +02:00
Brandon Woodmansee dee813b5ff riched20: Implement EM_AUTOURLDETECT & EM_GETAUTOURLDETECT. 2006-03-01 20:27:43 +01:00
Hamza Lakhani 6979719a90 riched20: EM_HIDESELECTION implementation. 2006-02-27 12:20:56 +01:00
Kevin Koltzau a13245847f riched20: Add IDataObject implementation and use it for cut/copy. 2006-02-22 22:23:49 +01:00
Roger Hoang b03c70a845 riched20: Implemented EM_SETTEXTMODE options TM_RICHTEXT and TM_PLAINTEXT
and their tests.
2006-02-20 20:29:44 +01:00
Kevin Koltzau 58b308db6a riched20: Separate stream state from editor state.
Somewhat improves thread safety.
2006-02-05 13:05:45 +01:00
Phil Krylov 08bf7180f3 riched20: Initial support for simple tables. 2006-02-04 17:01:01 +01:00
Kevin Koltzau 7f84cc48f3 riched20: Implement EM_SETOLECALLBACK. 2006-02-01 13:05:40 +01:00
Phil Krylov f0d6519ef5 riched20: Added support for hidden text. 2006-01-31 13:01:26 +01:00
Phil Krylov 49eecf5128 riched20: Initial support for word break callback procedures. 2006-01-12 11:54:57 +01:00