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
e81d65f8
Commit
e81d65f8
authored
Jul 17, 2010
by
David Hedberg
Committed by
Alexandre Julliard
Jul 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Add support for expanded state image in treeview.
parent
e4cf1466
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
3 deletions
+30
-3
treeview.c
dlls/comctl32/treeview.c
+30
-3
No files found.
dlls/comctl32/treeview.c
View file @
e81d65f8
...
...
@@ -76,6 +76,7 @@ typedef struct _TREEITEM /* HTREEITEM is a _TREEINFO *. */
int
cchTextMax
;
int
iImage
;
int
iSelectedImage
;
int
iExpandedImage
;
int
cChildren
;
LPARAM
lParam
;
int
iIntegral
;
/* item height multiplier (1 is normal) */
...
...
@@ -248,6 +249,10 @@ static inline BOOL item_changed (const TREEVIEW_ITEM *tiOld, const TREEVIEW_ITEM
tiNew
->
iSelectedImage
!=
I_IMAGECALLBACK
)
return
TRUE
;
if
((
tvChange
->
mask
&
TVIF_EXPANDEDIMAGE
)
&&
(
tiOld
->
iExpandedImage
!=
tiNew
->
iExpandedImage
)
&&
tiNew
->
iExpandedImage
!=
I_IMAGECALLBACK
)
return
TRUE
;
/* Text has changed and it's not a callback */
if
((
tvChange
->
mask
&
TVIF_TEXT
)
&&
(
tiOld
->
pszText
!=
tiNew
->
pszText
)
&&
tiNew
->
pszText
!=
LPSTR_TEXTCALLBACKW
)
...
...
@@ -801,6 +806,9 @@ TREEVIEW_UpdateDispInfo(const TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem,
if
(
mask
&
TVIF_SELECTEDIMAGE
)
wineItem
->
iSelectedImage
=
callback
.
item
.
iSelectedImage
;
if
(
mask
&
TVIF_EXPANDEDIMAGE
)
wineItem
->
iExpandedImage
=
callback
.
item
.
iExpandedImage
;
if
(
mask
&
TVIF_CHILDREN
)
wineItem
->
cChildren
=
callback
.
item
.
cChildren
;
...
...
@@ -997,6 +1005,7 @@ TREEVIEW_AllocateItem(const TREEVIEW_INFO *infoPtr)
* inc/dec to toggle the images. */
newItem
->
iImage
=
0
;
newItem
->
iSelectedImage
=
0
;
newItem
->
iExpandedImage
=
0
;
if
(
DPA_InsertPtr
(
infoPtr
->
items
,
INT_MAX
,
newItem
)
==
-
1
)
{
...
...
@@ -1173,6 +1182,16 @@ TREEVIEW_DoSetItemT(const TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem,
callbackClear
|=
TVIF_SELECTEDIMAGE
;
}
if
(
tvItem
->
mask
&
TVIF_EXPANDEDIMAGE
)
{
wineItem
->
iExpandedImage
=
tvItem
->
iExpandedImage
;
if
(
wineItem
->
iExpandedImage
==
I_IMAGECALLBACK
)
callbackSet
|=
TVIF_EXPANDEDIMAGE
;
else
callbackClear
|=
TVIF_EXPANDEDIMAGE
;
}
if
(
tvItem
->
mask
&
TVIF_PARAM
)
wineItem
->
lParam
=
tvItem
->
lParam
;
...
...
@@ -2076,6 +2095,9 @@ TREEVIEW_GetItemT(const TREEVIEW_INFO *infoPtr, LPTVITEMEXW tvItem, BOOL isW)
if
(
tvItem
->
mask
&
TVIF_SELECTEDIMAGE
)
tvItem
->
iSelectedImage
=
wineItem
->
iSelectedImage
;
if
(
tvItem
->
mask
&
TVIF_EXPANDEDIMAGE
)
tvItem
->
iExpandedImage
=
wineItem
->
iExpandedImage
;
if
(
tvItem
->
mask
&
TVIF_STATE
)
/* Careful here - Windows ignores the stateMask when you get the state
That contradicts the documentation, but makes more common sense, masking
...
...
@@ -2539,8 +2561,8 @@ TREEVIEW_DrawItem(const TREEVIEW_INFO *infoPtr, HDC hdc, TREEVIEW_ITEM *wineItem
ILD_NORMAL
);
}
/* Now, draw the normal image; can be either selected
or
* non-selected image.
/* Now, draw the normal image; can be either selected
,
* non-selected
or expanded
image.
*/
if
((
wineItem
->
state
&
TVIS_SELECTED
)
&&
(
wineItem
->
iSelectedImage
>=
0
))
...
...
@@ -2548,9 +2570,14 @@ TREEVIEW_DrawItem(const TREEVIEW_INFO *infoPtr, HDC hdc, TREEVIEW_ITEM *wineItem
/* The item is currently selected */
imageIndex
=
wineItem
->
iSelectedImage
;
}
else
if
((
wineItem
->
state
&
TVIS_EXPANDED
)
&&
(
wineItem
->
iExpandedImage
>=
0
))
{
/* The item is currently not selected but expanded */
imageIndex
=
wineItem
->
iExpandedImage
;
}
else
{
/* The item is not selected */
/* The item is not selected
and not expanded
*/
imageIndex
=
wineItem
->
iImage
;
}
...
...
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