Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
ce80081c
Commit
ce80081c
authored
Jun 20, 2006
by
Yoann Peronneau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* wxwidgets: try to implement a go-where-you-click slider
but I don't have a real video/audio file to test it...
parent
a17edf64
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
modules/gui/wxwidgets/input_manager.cpp
modules/gui/wxwidgets/input_manager.cpp
+20
-0
modules/gui/wxwidgets/input_manager.hpp
modules/gui/wxwidgets/input_manager.hpp
+1
-0
No files found.
modules/gui/wxwidgets/input_manager.cpp
View file @
ce80081c
...
@@ -75,6 +75,10 @@ InputManager::InputManager( intf_thread_t *_p_intf, Interface *_p_main_intf,
...
@@ -75,6 +75,10 @@ InputManager::InputManager( intf_thread_t *_p_intf, Interface *_p_main_intf,
/* Create slider */
/* Create slider */
slider
=
new
wxSlider
(
this
,
SliderScroll_Event
,
0
,
0
,
SLIDER_MAX_POS
);
slider
=
new
wxSlider
(
this
,
SliderScroll_Event
,
0
,
0
,
SLIDER_MAX_POS
);
/* Add mouse click on slider */
slider
->
Connect
(
wxEVT_LEFT_DOWN
,
wxMouseEventHandler
(
InputManager
::
OnSliderClick
),
NULL
,
this
);
/* Create disc buttons */
/* Create disc buttons */
disc_frame
=
new
wxPanel
(
this
);
disc_frame
=
new
wxPanel
(
this
);
...
@@ -427,6 +431,22 @@ void InputManager::OnSliderUpdate( wxScrollEvent& event )
...
@@ -427,6 +431,22 @@ void InputManager::OnSliderUpdate( wxScrollEvent& event )
vlc_mutex_unlock
(
&
p_intf
->
change_lock
);
vlc_mutex_unlock
(
&
p_intf
->
change_lock
);
}
}
void
InputManager
::
OnSliderClick
(
wxMouseEvent
&
event
)
{
wxSlider
*
slider
=
wxStaticCast
(
event
.
GetEventObject
(),
wxSlider
);
int
min
=
slider
->
GetMin
();
int
max
=
slider
->
GetMax
();
int
pos
=
event
.
GetPosition
().
x
;
int
dim
=
slider
->
GetClientSize
().
x
;
if
(
pos
<
0
||
pos
>=
dim
)
return
;
int
val
=
(
pos
*
(
max
-
min
+
1
)
)
/
dim
;
slider
->
SetValue
(
min
+
val
);
event
.
Skip
();
}
void
InputManager
::
ShowSlider
(
bool
show
)
void
InputManager
::
ShowSlider
(
bool
show
)
{
{
if
(
!!
show
==
!!
slider
->
IsShown
()
)
return
;
if
(
!!
show
==
!!
slider
->
IsShown
()
)
return
;
...
...
modules/gui/wxwidgets/input_manager.hpp
View file @
ce80081c
...
@@ -54,6 +54,7 @@ namespace wxvlc
...
@@ -54,6 +54,7 @@ namespace wxvlc
void
ShowSlider
(
bool
show
=
true
);
void
ShowSlider
(
bool
show
=
true
);
void
OnSliderUpdate
(
wxScrollEvent
&
event
);
void
OnSliderUpdate
(
wxScrollEvent
&
event
);
void
OnSliderClick
(
wxMouseEvent
&
event
);
void
OnDiscMenu
(
wxCommandEvent
&
event
);
void
OnDiscMenu
(
wxCommandEvent
&
event
);
void
OnDiscPrev
(
wxCommandEvent
&
event
);
void
OnDiscPrev
(
wxCommandEvent
&
event
);
...
...
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