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
28795de6
Commit
28795de6
authored
Aug 20, 2005
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* keyboard (arrows) navigation
parent
2eda18dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
15 deletions
+35
-15
modules/gui/skins2/controls/ctrl_tree.cpp
modules/gui/skins2/controls/ctrl_tree.cpp
+35
-15
No files found.
modules/gui/skins2/controls/ctrl_tree.cpp
View file @
28795de6
...
@@ -235,13 +235,12 @@ void CtrlTree::onPositionChange()
...
@@ -235,13 +235,12 @@ void CtrlTree::onPositionChange()
}
}
void
CtrlTree
::
handleEvent
(
EvtGeneric
&
rEvent
)
void
CtrlTree
::
handleEvent
(
EvtGeneric
&
rEvent
)
{
{
// TODO TODO FIXME TODO TODO
if
(
rEvent
.
getAsString
().
find
(
"key:down"
)
!=
string
::
npos
)
if
(
rEvent
.
getAsString
().
find
(
"key:down"
)
!=
string
::
npos
)
{
{
int
key
=
((
EvtKey
&
)
rEvent
).
getKey
();
int
key
=
((
EvtKey
&
)
rEvent
).
getKey
();
VarTree
::
Iterator
it
=
m_rTree
.
begin
()
;
VarTree
::
Iterator
it
;
bool
previousWasSelected
=
false
;
bool
previousWasSelected
=
false
;
while
(
it
!=
m_rTree
.
end
()
)
for
(
it
=
m_rTree
.
begin
();
it
!=
m_rTree
.
end
();
)
{
{
VarTree
::
Iterator
next
=
it
;
VarTree
::
Iterator
next
=
it
;
IT_DISP_LOOP_END
(
next
);
IT_DISP_LOOP_END
(
next
);
...
@@ -281,25 +280,47 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent )
...
@@ -281,25 +280,47 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent )
}
}
else
if
(
key
==
KEY_RIGHT
)
else
if
(
key
==
KEY_RIGHT
)
{
{
// Go down one level
// Go down one level
(and expand node)
if
(
it
->
m_expand
ed
)
if
(
&*
it
==
m_pLastSelect
ed
)
{
{
if
(
it
->
size
()
)
if
(
it
->
m_expanded
)
{
{
/* FIXME : finir */
if
(
it
->
size
()
)
m_pLastSelected
=
&*
(
it
->
begin
());
{
it
->
m_selected
=
false
;
it
->
begin
()
->
m_selected
=
true
;
m_pLastSelected
=
&*
(
it
->
begin
());
}
else
{
m_rTree
.
action
(
&*
it
);
}
}
else
{
it
->
m_expanded
=
true
;
}
}
}
else
{
it
->
m_expanded
=
true
;
}
}
}
}
else
if
(
key
==
KEY_LEFT
)
else
if
(
key
==
KEY_LEFT
)
{
{
// Go up one level (and close node)
// Go up one level (and close node)
// TODO
if
(
&*
it
==
m_pLastSelected
)
it
->
m_expanded
=
false
;
{
if
(
it
->
m_expanded
&&
it
->
size
()
)
{
it
->
m_expanded
=
false
;
}
else
{
if
(
it
->
parent
()
&&
it
->
parent
()
!=
&
m_rTree
)
{
it
->
m_selected
=
false
;
m_pLastSelected
=
it
->
parent
();
m_pLastSelected
->
m_selected
=
true
;
}
}
}
}
}
it
=
next
;
it
=
next
;
}
}
...
@@ -520,7 +541,6 @@ void CtrlTree::autoScroll()
...
@@ -520,7 +541,6 @@ void CtrlTree::autoScroll()
void
CtrlTree
::
makeImage
()
void
CtrlTree
::
makeImage
()
{
{
fprintf
(
stderr
,
"CtrlTree::makeImage()
\n
"
);
if
(
m_pImage
)
if
(
m_pImage
)
{
{
delete
m_pImage
;
delete
m_pImage
;
...
...
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