Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
234278af
Commit
234278af
authored
Aug 22, 2004
by
Cyril Deguet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ctrl_list.cpp: beginning of key handling in the playlist
parent
4e1d4ed3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
1 deletion
+43
-1
modules/gui/skins2/controls/ctrl_list.cpp
modules/gui/skins2/controls/ctrl_list.cpp
+43
-1
No files found.
modules/gui/skins2/controls/ctrl_list.cpp
View file @
234278af
...
...
@@ -161,7 +161,49 @@ void CtrlList::handleEvent( EvtGeneric &rEvent )
{
if
(
rEvent
.
getAsString
().
find
(
"key:down"
)
!=
string
::
npos
)
{
char
key
=
((
EvtKey
&
)
rEvent
).
getKey
();
int
key
=
((
EvtKey
&
)
rEvent
).
getKey
();
VarList
::
Iterator
it
=
m_rList
.
begin
();
bool
previousWasSelected
=
false
;
while
(
it
!=
m_rList
.
end
()
)
{
VarList
::
Iterator
next
=
it
;
++
next
;
if
(
key
==
KEY_UP
)
{
// Scroll up one item
if
(
it
!=
m_rList
.
begin
()
||
&*
it
!=
m_pLastSelected
)
{
bool
nextWasSelected
=
(
&*
next
==
m_pLastSelected
);
(
*
it
).
m_selected
=
nextWasSelected
;
if
(
nextWasSelected
)
{
m_pLastSelected
=
&*
it
;
}
}
}
else
if
(
key
==
KEY_DOWN
)
{
// Scroll down one item
if
(
next
!=
m_rList
.
end
()
||
&*
it
!=
m_pLastSelected
)
{
(
*
it
).
m_selected
=
previousWasSelected
;
}
if
(
previousWasSelected
)
{
m_pLastSelected
=
&*
it
;
previousWasSelected
=
false
;
}
else
{
previousWasSelected
=
(
&*
it
==
m_pLastSelected
);
}
}
it
=
next
;
}
// Redraw the control
makeImage
();
notifyLayout
();
}
else
if
(
rEvent
.
getAsString
().
find
(
"mouse:left"
)
!=
string
::
npos
)
...
...
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