- 06 Jul, 2011 1 commit
-
-
Frédéric Delanoy authored
-
- 30 Jul, 2010 1 commit
-
-
Dylan Smith authored
The paragraph needed to be included in the parameters to avoid needing traverse the linked list of display items to find the paragraph.
-
- 17 May, 2010 1 commit
-
-
Gerald Pfeifer authored
-
- 10 May, 2010 1 commit
-
-
Gerald Pfeifer authored
-
- 03 May, 2010 2 commits
-
-
Gerald Pfeifer authored
-
Gerald Pfeifer authored
-
- 01 Mar, 2010 1 commit
-
-
David Hedberg authored
If GTL_PRECISE is passed without specifying either GTL_NUMCHARS or GTL_NUMBYTES, behave as if GTL_NUMBYTES was passed.
-
- 18 Feb, 2010 1 commit
-
-
Dylan Smith authored
-
- 28 Sep, 2009 1 commit
-
-
Dylan Smith authored
Using the ITextHost interface allows this notification to be received for windowless richedit controls. Windowed richedit conrols have an ITextHost implementation that will fill in hwndFrom and idFrom, but these should probably be initialized to 0 for windowless richedit controls.
-
- 26 Aug, 2009 1 commit
-
-
Francois Gouget authored
-
- 17 Aug, 2009 1 commit
-
-
Dylan Smith authored
For some reason the code previously mixed up a selection cursor with the result cursor. The problem seemed to have corrected itself before as a result of conversion between offsets and cursors, but my recent changes made this bug more severe.
-
- 13 Aug, 2009 3 commits
-
-
Dylan Smith authored
Offsets are still used within the function, but this patch reduces the use of it at the entry to the function.
-
Dylan Smith authored
-
Dylan Smith authored
Previously the function was only used to move a single character in either direction, so I made the function more general so that it could be used in more places.
-
- 12 Aug, 2009 4 commits
-
-
Dylan Smith authored
-
Dylan Smith authored
Plenty of places in the code find following or preceding runs, then afterwards find the paragraph from the run. This is inefficient because the same linked list is used for both runs and paragraphs, so changes in paragraphs can be detected while returning the next or previous run.
-
Dylan Smith authored
Previously the only convenient way to get the start and end of the selection was through offsets, which eventually need to get converted back into items in the linked list storing the text. The new function will help with eliminating these inefficiencies.
-
Dylan Smith authored
This function will make it easier to work with ME_Cursor objects, which should be used in a lot of places instead of character offsets (which often require seeking through the linked lists to perform operations with).
-
- 10 Aug, 2009 2 commits
-
-
Dylan Smith authored
Style objects are referenced counted in richedit controls, so I tried to make sure styles were released properly. This can be checked using with the all_refs global reference count to see if everything is cleaned up.
-
Dylan Smith authored
Previously inserting the object didn't result in the text being wrapped, which would cause an assertion error when this is checked for during repainting the text. It is also important to invalidate the affected areas of text, update the scrollbar, and end the creation of undo transactions for this insertion.
-
- 07 Aug, 2009 1 commit
-
-
Dylan Smith authored
-
- 26 May, 2009 1 commit
-
-
Francois Gouget authored
-
- 10 Feb, 2009 1 commit
-
-
Dylan Smith authored
This prevents some needless searching for the start of the paragraph from a run stored in a cursor. Usually a pointer to the paragraph is already available when the cursor is set anyway.
-
- 09 Feb, 2009 4 commits
-
-
Dylan Smith authored
These functions were just being used for addition, so it was simpler to remove the functions and modify the places it was used. The ME_StrRelPos2 and ME_PosToVPos were just simple wrappers around ME_StrRelPos, and ME_PosToVPos wasn't being used.
-
Dylan Smith authored
These functions were probably previously needed because of some wierd special handling of backspace characters, but currently there is no reason why the nLen field can't be accessed directly. Having to functions that just access the string length field just causes slightly more effort for someone to look at the code, because they need to enter the function to find out what it actually is doing.
-
Dylan Smith authored
ME_GetCursorCoordinates had two conditions that were always taken. The first condition was if(pCursor->pRun->type == diRun) was following an assertion making the exact same check. The next one, if(row), should always be taken, otherwise the richedit controls are in a corrupt state, therefore an assertion is more appropriate.
-
Dylan Smith authored
Previously it found the start or end by traversing the linked lists of run, rows, paragraphs, and cells from the current position of the cursors. Clearly it is better to get the start or end directly to make it a constant time operation.
-
- 06 Feb, 2009 4 commits
-
-
Dylan Smith authored
The fixme comment is suggesting wrapping a paragraph within a function that is for moving the selection cursor up or down a line when the up or down keys are pressed. The contents fo paragraph aren't being changed, so there is no need to wrap the paragraph.
-
Dylan Smith authored
Rather than get the paragraph from the run, the function allows the caller to provide the paragraph, since it is already available. This reduces unnecessary traversals of lists that take longer as more runs and rows are in the paragraph.
-
Dylan Smith authored
These calls to ME_WrapMarkedParagraphs never do anything, and don't make sense to be called in these places. These places are for ME_MoveCaret, and ME_ArrowHome, which both don't involve any text being modified, and all (direct and indirect) calls to these functions are done after the text has already been wrapped.
-
Dylan Smith authored
The value for nMaxChars can be found easier by using ME_GetTextLength.
-
- 28 Jan, 2009 1 commit
-
-
Dylan Smith authored
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.
-
- 27 Jan, 2009 2 commits
-
-
Dylan Smith authored
The two functions ME_FindItemAtOffset and ME_RunOfsFromCharOfs were almost identically used, since ME_FindItemAtOffset was always used to find a run. The only difference was how they returned the offset within the run for an end of paragraph run. For ME_FindItemAtOffset it would return the next run if it was in between \r and \n. ME_RunOfsFromCharOfs would instead return an nOffset of 0 for end paragraph runs. This subtle difference introduced bugs, so I decided to avoid having special case in this function when creating this patch, and instead let the caller handle this case.
-
Dylan Smith authored
riched32.dll does preserve the carriage returns and line feeds unlike later versions of the richedit control, however the tests previously missed the fact that a sequence of carriage returns followed by a line feed (e.g. \r\r\r\n) can actually cause multiple paragraph breaks.
-
- 21 Jan, 2009 1 commit
-
-
Dylan Smith authored
The methods in ITextHost are mostly thin wrappers around functions that take a handle to a window as their first parameter. This patch just uses the wrapper functions provided by ITextHost instead of using the functions that require a handle to a window that the editor might now have (for windowless richedit controls).
-
- 16 Jan, 2009 2 commits
-
-
Dylan Smith authored
-
Dylan Smith authored
-
- 15 Jan, 2009 1 commit
-
-
Dylan Smith authored
-
- 13 Jan, 2009 1 commit
-
-
Andrew Talbot authored
-
- 18 Dec, 2008 1 commit
-
-
Dylan Smith authored
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.
-