Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
b193e8e2
Commit
b193e8e2
authored
Apr 20, 2003
by
Cyril Deguet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* enabled scrolling in the playlist with the mouse wheel
parent
ad48c59b
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
73 additions
and
9 deletions
+73
-9
modules/gui/skins/controls/generic.cpp
modules/gui/skins/controls/generic.cpp
+6
-1
modules/gui/skins/controls/generic.h
modules/gui/skins/controls/generic.h
+2
-1
modules/gui/skins/controls/playlist.cpp
modules/gui/skins/controls/playlist.cpp
+24
-1
modules/gui/skins/controls/playlist.h
modules/gui/skins/controls/playlist.h
+2
-1
modules/gui/skins/controls/slider.h
modules/gui/skins/controls/slider.h
+2
-2
modules/gui/skins/gtk2/gtk2_window.cpp
modules/gui/skins/gtk2/gtk2_window.cpp
+17
-1
modules/gui/skins/src/window.cpp
modules/gui/skins/src/window.cpp
+13
-1
modules/gui/skins/src/window.h
modules/gui/skins/src/window.h
+7
-1
No files found.
modules/gui/skins/controls/generic.cpp
View file @
b193e8e2
...
...
@@ -2,7 +2,7 @@
* generic.cpp: Generic control, parent of the others
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: generic.cpp,v 1.
2 2003/04/16 21:40:07 ipkiss
Exp $
* $Id: generic.cpp,v 1.
3 2003/04/20 13:14:14 asmax
Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
...
@@ -145,6 +145,11 @@ bool GenericControl::MouseDblClick( int x, int y, int button )
return
false
;
}
//---------------------------------------------------------------------------
bool
GenericControl
::
MouseScroll
(
int
x
,
int
y
,
int
direction
)
{
return
false
;
}
//---------------------------------------------------------------------------
bool
GenericControl
::
SendNewHelpText
()
{
if
(
Help
!=
""
)
...
...
modules/gui/skins/controls/generic.h
View file @
b193e8e2
...
...
@@ -2,7 +2,7 @@
* generic.h: Generic control, parent of the others
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: generic.h,v 1.
1 2003/03/18 02:21:47 ipkiss
Exp $
* $Id: generic.h,v 1.
2 2003/04/20 13:14:14 asmax
Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
...
@@ -73,6 +73,7 @@ class GenericControl // This is the generic control class
virtual
bool
MouseMove
(
int
x
,
int
y
,
int
button
);
virtual
bool
MouseOver
(
int
x
,
int
y
);
virtual
bool
MouseDblClick
(
int
x
,
int
y
,
int
button
);
virtual
bool
MouseScroll
(
int
x
,
int
y
,
int
direction
);
virtual
bool
ToolTipTest
(
int
x
,
int
y
);
virtual
bool
SendNewHelpText
();
...
...
modules/gui/skins/controls/playlist.cpp
View file @
b193e8e2
...
...
@@ -2,7 +2,7 @@
* playlist.cpp: Playlist control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: playlist.cpp,v 1.
3 2003/04/17 19:56:31 karibu
Exp $
* $Id: playlist.cpp,v 1.
4 2003/04/20 13:14:14 asmax
Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
...
@@ -451,6 +451,29 @@ bool ControlPlayList::MouseMove( int x, int y, int button )
return
false
;
}
//---------------------------------------------------------------------------
bool
ControlPlayList
::
MouseScroll
(
int
x
,
int
y
,
int
direction
)
{
if
(
!
Enabled
)
return
false
;
//long pos = Slider->GetCursorPosition();
long
pos
=
StartIndex
;
fprintf
(
stderr
,
" scroll %d %d
\n
"
,
pos
,
StartIndex
);
switch
(
direction
)
{
case
MOUSE_SCROLL_UP
:
if
(
pos
>
0
)
pos
--
;
break
;
case
MOUSE_SCROLL_DOWN
:
if
(
pos
+
Line
<
NumOfItems
)
pos
++
;
break
;
}
StartIndex
=
pos
;
Slider
->
SetCursorPosition
(
pos
);
RefreshAll
();
return
true
;
}
//---------------------------------------------------------------------------
bool
ControlPlayList
::
MouseOver
(
int
x
,
int
y
)
{
if
(
TextClipRgn
->
Hit
(
x
-
Left
,
y
-
Top
)
||
Slider
->
MouseOver
(
x
,
y
)
)
...
...
modules/gui/skins/controls/playlist.h
View file @
b193e8e2
...
...
@@ -2,7 +2,7 @@
* playlist.h: Playlist control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: playlist.h,v 1.
1 2003/03/18 02:21:47 ipkiss
Exp $
* $Id: playlist.h,v 1.
2 2003/04/20 13:14:14 asmax
Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
...
@@ -121,6 +121,7 @@ class ControlPlayList : public GenericControl
virtual
bool
MouseMove
(
int
x
,
int
y
,
int
button
);
virtual
bool
MouseOver
(
int
x
,
int
y
);
virtual
bool
MouseDblClick
(
int
x
,
int
y
,
int
button
);
virtual
bool
MouseScroll
(
int
x
,
int
y
,
int
direction
);
virtual
bool
ToolTipTest
(
int
x
,
int
y
);
// Translate control
...
...
modules/gui/skins/controls/slider.h
View file @
b193e8e2
...
...
@@ -2,7 +2,7 @@
* slider.h: Slider control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: slider.h,v 1.
1 2003/03/18 02:21:47 ipkiss
Exp $
* $Id: slider.h,v 1.
2 2003/04/20 13:14:14 asmax
Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
...
@@ -69,7 +69,7 @@ class ControlSlider : public GenericControl
int
FindNearestPoint
(
int
x
,
int
y
);
// Move cursor (wether SLIDER_MAX in skin_common.h)
// Move cursor (w
h
ether SLIDER_MAX in skin_common.h)
void
MoveCursor
(
int
newValue
);
...
...
modules/gui/skins/gtk2/gtk2_window.cpp
View file @
b193e8e2
...
...
@@ -2,7 +2,7 @@
* gtk2_window.cpp: GTK2 implementation of the Window class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_window.cpp,v 1.2
2 2003/04/19 11:46:11
asmax Exp $
* $Id: gtk2_window.cpp,v 1.2
3 2003/04/20 13:14:14
asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -241,6 +241,22 @@ bool GTK2Window::ProcessOSEvent( Event *evt )
DropObject
->
HandleDropStart
(
(
(
GdkEventDND
*
)
p2
)
->
context
);
return
true
;
case
GDK_SCROLL
:
switch
(
(
(
GdkEventScroll
*
)
p2
)
->
direction
)
{
case
GDK_SCROLL_UP
:
MouseScroll
(
(
(
GdkEventScroll
*
)
p2
)
->
x
,
(
(
GdkEventScroll
*
)
p2
)
->
y
,
MOUSE_SCROLL_UP
);
break
;
case
GDK_SCROLL_DOWN
:
MouseScroll
(
(
(
GdkEventScroll
*
)
p2
)
->
x
,
(
(
GdkEventScroll
*
)
p2
)
->
y
,
MOUSE_SCROLL_DOWN
);
break
;
}
return
true
;
default:
return
false
;
}
...
...
modules/gui/skins/src/window.cpp
View file @
b193e8e2
...
...
@@ -2,7 +2,7 @@
* window.cpp: Window class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: window.cpp,v 1.1
6 2003/04/16 21:40:07 ipkiss
Exp $
* $Id: window.cpp,v 1.1
7 2003/04/20 13:14:14 asmax
Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
...
@@ -404,6 +404,18 @@ void Window::MouseDblClick( int x, int y, int button )
}
}
//---------------------------------------------------------------------------
void
Window
::
MouseScroll
(
int
x
,
int
y
,
int
direction
)
{
// Checking event in controls
for
(
int
i
=
ControlList
.
size
()
-
1
;
i
>=
0
;
i
--
)
{
if
(
ControlList
[
i
]
->
MouseScroll
(
x
,
y
,
direction
)
)
{
return
;
}
}
}
//---------------------------------------------------------------------------
void
Window
::
Init
()
{
// Get size of window
...
...
modules/gui/skins/src/window.h
View file @
b193e8e2
...
...
@@ -2,7 +2,7 @@
* window.h: Window class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: window.h,v 1.
1 2003/03/18 02:21:47 ipkiss
Exp $
* $Id: window.h,v 1.
2 2003/04/20 13:14:14 asmax
Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
...
@@ -40,6 +40,11 @@ class GenericControl;
class
Anchor
;
class
Event
;
//---------------------------------------------------------------------------
// Constants for scrolling
#define MOUSE_SCROLL_UP 0
#define MOUSE_SCROLL_DOWN 1
//---------------------------------------------------------------------------
class
Window
{
...
...
@@ -96,6 +101,7 @@ class Window
void
MouseDown
(
int
x
,
int
y
,
int
button
);
void
MouseMove
(
int
x
,
int
y
,
int
button
);
void
MouseDblClick
(
int
x
,
int
y
,
int
button
);
void
Window
::
MouseScroll
(
int
x
,
int
y
,
int
direction
);
// Window graphic aspect
bool
OnStartThemeVisible
;
...
...
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