Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
ed8379d1
Commit
ed8379d1
authored
Sep 29, 2005
by
Krzysztof Foltman
Committed by
Alexandre Julliard
Sep 29, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Reimplementation of EM_LINELENGTH.
- Some attempt at documentation of double-linked list of ME_DisplayItem's.
parent
7f8614bb
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
13 deletions
+22
-13
editor.c
dlls/riched20/editor.c
+7
-11
editor.h
dlls/riched20/editor.h
+1
-1
editstr.h
dlls/riched20/editstr.h
+12
-0
row.c
dlls/riched20/row.c
+2
-1
No files found.
dlls/riched20/editor.c
View file @
ed8379d1
...
...
@@ -1623,7 +1623,7 @@ LRESULT WINAPI RichEditANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP
case
EM_LINELENGTH
:
{
ME_DisplayItem
*
item
,
*
item_end
;
int
nChars
=
0
;
int
nChars
=
0
,
nThisLineOfs
=
0
,
nNextLineOfs
=
0
;
if
(
wParam
>
ME_GetTextLength
(
editor
))
return
0
;
...
...
@@ -1634,17 +1634,13 @@ LRESULT WINAPI RichEditANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP
}
item
=
ME_FindItemAtOffset
(
editor
,
diRun
,
wParam
,
NULL
);
item
=
ME_RowStart
(
item
);
item_end
=
ME_RowEnd
(
item
);
if
(
!
item_end
)
{
/* Empty buffer, no runs */
nChars
=
0
;
}
nThisLineOfs
=
ME_CharOfsFromRunOfs
(
editor
,
ME_FindItemFwd
(
item
,
diRun
),
0
);
item_end
=
ME_FindItemFwd
(
item
,
diStartRow
);
if
(
item_end
)
nNextLineOfs
=
ME_CharOfsFromRunOfs
(
editor
,
ME_FindItemFwd
(
item_end
,
diRun
),
0
);
else
{
nChars
=
ME_CharOfsFromRunOfs
(
editor
,
item_end
,
ME_StrLen
(
item_end
->
member
.
run
.
strText
));
nChars
-=
ME_CharOfsFromRunOfs
(
editor
,
item
,
0
);
}
nNextLineOfs
=
ME_FindItemFwd
(
item
,
diParagraphOrEnd
)
->
member
.
para
.
nCharOfs
-
1
;
nChars
=
nNextLineOfs
-
nThisLineOfs
;
TRACE
(
"EM_LINELENGTH(%d)==%d
\n
"
,
wParam
,
nChars
);
return
nChars
;
}
...
...
dlls/riched20/editor.h
View file @
ed8379d1
...
...
@@ -98,7 +98,7 @@ int ME_ReverseFindWhitespaceV(ME_String *s, int nVChar);
/* row.c */
ME_DisplayItem
*
ME_FindRowStart
(
ME_Context
*
c
,
ME_DisplayItem
*
run
,
int
nRelPos
);
ME_DisplayItem
*
ME_RowStart
(
ME_DisplayItem
*
item
);
ME_DisplayItem
*
ME_RowEnd
(
ME_DisplayItem
*
item
);
/* ME_DisplayItem *ME_RowEnd(ME_DisplayItem *item); */
void
ME_RenumberParagraphs
(
ME_DisplayItem
*
item
);
/* TODO */
ME_DisplayItem
*
ME_FindRowWithNumber
(
ME_TextEditor
*
editor
,
int
nRow
);
int
ME_RowNumberFromCharOfs
(
ME_TextEditor
*
editor
,
int
nOfs
);
...
...
dlls/riched20/editstr.h
View file @
ed8379d1
...
...
@@ -161,6 +161,18 @@ typedef struct tagME_Row
int
nYPos
;
}
ME_Row
;
/* the display item list layout is like this:
* - the document consists of paragraphs
* - each paragraph contains at least one run, the last run in the paragraph
* is an end-of-paragraph run
* - each formatted paragraph contains at least one row, which corresponds
* to a screen line (that's why there are no rows in an unformatted
* paragraph
* - the paragraphs contain "shortcut" pointers to the previous and the next
* paragraph, that makes iteration over paragraphs faster
* - the list starts with diTextStart and ends with diTextEnd
*/
typedef
struct
tagME_DisplayItem
{
ME_DIType
type
;
...
...
dlls/riched20/row.c
View file @
ed8379d1
...
...
@@ -77,12 +77,13 @@ ME_DisplayItem *ME_RowStart(ME_DisplayItem *item) {
return
ME_FindItemBackOrHere
(
item
,
diStartRow
);
}
/*
ME_DisplayItem *ME_RowEnd(ME_DisplayItem *item) {
ME_DisplayItem *item2 = ME_FindItemFwd(item, diStartRowOrParagraphOrEnd);
if (!item2) return NULL;
return ME_FindItemBack(item, diRun);
}
*/
ME_DisplayItem
*
ME_FindRowWithNumber
(
ME_TextEditor
*
editor
,
int
nRow
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment