Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e877b77a
Commit
e877b77a
authored
Oct 19, 2002
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Oct 19, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better report mode.
Use the new column information to simplify, and speed up the code. Enable support for images in subitems (in LVS_REPORT mode).
parent
01e82a4f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
18 deletions
+15
-18
listview.c
dlls/comctl32/listview.c
+15
-18
No files found.
dlls/comctl32/listview.c
View file @
e877b77a
...
...
@@ -1637,6 +1637,7 @@ static BOOL LISTVIEW_GetItemMetrics(LISTVIEW_INFO *infoPtr, LVITEMW *lpLVItem,
UINT
uView
=
infoPtr
->
dwStyle
&
LVS_TYPEMASK
;
BOOL
doState
=
FALSE
,
doIcon
=
FALSE
,
doLabel
=
FALSE
,
oversizedBox
=
FALSE
;
RECT
Box
,
State
,
Icon
,
Label
;
COLUMN_INFO
*
lpColumnInfo
=
NULL
;
TRACE
(
"(lpLVItem=%s)
\n
"
,
debuglvitem_t
(
lpLVItem
,
TRUE
));
...
...
@@ -1654,9 +1655,15 @@ static BOOL LISTVIEW_GetItemMetrics(LISTVIEW_INFO *infoPtr, LVITEMW *lpLVItem,
/************************************************************/
/* compute the box rectangle (it should be cheap to do) */
/************************************************************/
if
(
lpLVItem
->
iSubItem
)
if
(
lpLVItem
->
iSubItem
||
uView
==
LVS_REPORT
)
{
lpColumnInfo
=
DPA_GetPtr
(
infoPtr
->
hdpaColumns
,
lpLVItem
->
iSubItem
);
assert
(
lpColumnInfo
);
}
if
(
lpLVItem
->
iSubItem
)
{
if
(
!
LISTVIEW_GetHeaderRect
(
infoPtr
,
lpLVItem
->
iSubItem
,
&
Box
))
return
FALSE
;
Box
=
lpColumnInfo
->
rcHeader
;
}
else
{
...
...
@@ -1729,8 +1736,8 @@ static BOOL LISTVIEW_GetItemMetrics(LISTVIEW_INFO *infoPtr, LVITEMW *lpLVItem,
if
(
!
IsRectEmpty
(
&
State
))
Icon
.
left
+=
IMAGE_PADDING
;
Icon
.
top
=
Box
.
top
;
Icon
.
right
=
Icon
.
left
;
/* FIXME: add suport for icons for subitems */
if
(
infoPtr
->
himlSmall
&&
lpLVItem
->
iSubItem
==
0
)
Icon
.
right
+=
infoPtr
->
iconSize
.
cx
;
if
(
infoPtr
->
himlSmall
&&
(
!
lpColumnInfo
||
lpColumnInfo
->
hasImage
))
Icon
.
right
+=
infoPtr
->
iconSize
.
cx
;
Icon
.
bottom
=
Icon
.
top
+
infoPtr
->
nItemHeight
;
}
if
(
lprcIcon
)
*
lprcIcon
=
Icon
;
...
...
@@ -1748,7 +1755,7 @@ static BOOL LISTVIEW_GetItemMetrics(LISTVIEW_INFO *infoPtr, LVITEMW *lpLVItem,
Label
.
right
=
Box
.
right
;
if
(
uView
==
LVS_REPORT
)
{
if
(
lpLVItem
->
iSubItem
==
0
&&
!
LISTVIEW_GetHeaderRect
(
infoPtr
,
0
,
&
Label
))
return
FALSE
;
if
(
lpLVItem
->
iSubItem
==
0
)
Label
=
lpColumnInfo
->
rcHeader
;
Label
.
right
-=
REPORT_MARGINX
;
}
...
...
@@ -3379,20 +3386,10 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, INT nS
uFormat
=
(
uView
==
LVS_ICON
?
(
lprcFocus
?
LV_FL_DT_FLAGS
:
LV_ML_DT_FLAGS
)
:
LV_SL_DT_FLAGS
);
if
(
uView
==
LVS_ICON
)
uFormat
=
(
lprcFocus
?
LV_FL_DT_FLAGS
:
LV_ML_DT_FLAGS
);
else
else
if
(
nSubItem
)
{
INT
align
=
DT_LEFT
;
if
(
nSubItem
)
{
LVCOLUMNW
lvColumn
;
lvColumn
.
mask
=
LVCF_FMT
;
LISTVIEW_GetColumnT
(
infoPtr
,
nSubItem
,
&
lvColumn
,
TRUE
);
TRACE
(
"lvColumn=%s
\n
"
,
debuglvcolumn_t
(
&
lvColumn
,
TRUE
));
if
(
lvColumn
.
fmt
&
LVCFMT_RIGHT
)
align
=
DT_RIGHT
;
else
if
(
lvColumn
.
fmt
&
LVCFMT_CENTER
)
align
=
DT_CENTER
;
}
uFormat
|=
align
;
COLUMN_INFO
*
lpColumnInfo
=
DPA_GetPtr
(
infoPtr
->
hdpaColumns
,
nSubItem
);
if
(
lpColumnInfo
)
uFormat
|=
lpColumnInfo
->
align
;
}
if
(
!
(
uFormat
&
(
DT_RIGHT
|
DT_CENTER
)))
rcLabel
.
left
+=
2
;
DrawTextW
(
hdc
,
lvItem
.
pszText
,
-
1
,
&
rcLabel
,
uFormat
);
...
...
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