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
2ffbb31e
Commit
2ffbb31e
authored
Jul 09, 2000
by
Gerard Patel
Committed by
Alexandre Julliard
Jul 09, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the focus follow the last selected item for multiselect listboxes.
parent
2cbda2ef
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
27 deletions
+26
-27
listbox.c
controls/listbox.c
+26
-27
No files found.
controls/listbox.c
View file @
2ffbb31e
...
@@ -1229,6 +1229,31 @@ static void LISTBOX_MakeItemVisible( WND *wnd, LB_DESCR *descr, INT index,
...
@@ -1229,6 +1229,31 @@ static void LISTBOX_MakeItemVisible( WND *wnd, LB_DESCR *descr, INT index,
LISTBOX_SetTopItem
(
wnd
,
descr
,
top
,
TRUE
);
LISTBOX_SetTopItem
(
wnd
,
descr
,
top
,
TRUE
);
}
}
/***********************************************************************
* LISTBOX_SetCaretIndex
*
* NOTES
* index must be between 0 and descr->nb_items-1, or LB_ERR is returned.
*
*/
static
LRESULT
LISTBOX_SetCaretIndex
(
WND
*
wnd
,
LB_DESCR
*
descr
,
INT
index
,
BOOL
fully_visible
)
{
INT
oldfocus
=
descr
->
focus_item
;
if
((
index
<
0
)
||
(
index
>=
descr
->
nb_items
))
return
LB_ERR
;
if
(
index
==
oldfocus
)
return
LB_OKAY
;
descr
->
focus_item
=
index
;
if
((
oldfocus
!=
-
1
)
&&
descr
->
caret_on
&&
(
descr
->
in_focus
))
LISTBOX_RepaintItem
(
wnd
,
descr
,
oldfocus
,
ODA_FOCUS
);
LISTBOX_MakeItemVisible
(
wnd
,
descr
,
index
,
fully_visible
);
if
(
descr
->
caret_on
&&
(
descr
->
in_focus
))
LISTBOX_RepaintItem
(
wnd
,
descr
,
index
,
ODA_FOCUS
);
return
LB_OKAY
;
}
/***********************************************************************
/***********************************************************************
* LISTBOX_SelectItemRange
* LISTBOX_SelectItemRange
...
@@ -1258,6 +1283,7 @@ static LRESULT LISTBOX_SelectItemRange( WND *wnd, LB_DESCR *descr, INT first,
...
@@ -1258,6 +1283,7 @@ static LRESULT LISTBOX_SelectItemRange( WND *wnd, LB_DESCR *descr, INT first,
descr
->
items
[
i
].
selected
=
TRUE
;
descr
->
items
[
i
].
selected
=
TRUE
;
LISTBOX_RepaintItem
(
wnd
,
descr
,
i
,
ODA_SELECT
);
LISTBOX_RepaintItem
(
wnd
,
descr
,
i
,
ODA_SELECT
);
}
}
LISTBOX_SetCaretIndex
(
wnd
,
descr
,
last
,
TRUE
);
}
}
else
/* Turn selection off */
else
/* Turn selection off */
{
{
...
@@ -1271,33 +1297,6 @@ static LRESULT LISTBOX_SelectItemRange( WND *wnd, LB_DESCR *descr, INT first,
...
@@ -1271,33 +1297,6 @@ static LRESULT LISTBOX_SelectItemRange( WND *wnd, LB_DESCR *descr, INT first,
return
LB_OKAY
;
return
LB_OKAY
;
}
}
/***********************************************************************
* LISTBOX_SetCaretIndex
*
* NOTES
* index must be between 0 and descr->nb_items-1, or LB_ERR is returned.
*
*/
static
LRESULT
LISTBOX_SetCaretIndex
(
WND
*
wnd
,
LB_DESCR
*
descr
,
INT
index
,
BOOL
fully_visible
)
{
INT
oldfocus
=
descr
->
focus_item
;
if
((
index
<
0
)
||
(
index
>=
descr
->
nb_items
))
return
LB_ERR
;
if
(
index
==
oldfocus
)
return
LB_OKAY
;
descr
->
focus_item
=
index
;
if
((
oldfocus
!=
-
1
)
&&
descr
->
caret_on
&&
(
descr
->
in_focus
))
LISTBOX_RepaintItem
(
wnd
,
descr
,
oldfocus
,
ODA_FOCUS
);
LISTBOX_MakeItemVisible
(
wnd
,
descr
,
index
,
fully_visible
);
if
(
descr
->
caret_on
&&
(
descr
->
in_focus
))
LISTBOX_RepaintItem
(
wnd
,
descr
,
index
,
ODA_FOCUS
);
return
LB_OKAY
;
}
/***********************************************************************
/***********************************************************************
* LISTBOX_SetSelection
* LISTBOX_SetSelection
*/
*/
...
...
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