Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
5a90c358
Commit
5a90c358
authored
Jul 17, 2003
by
gbazin
Browse files
* modules/gui/wxwindows/*: enable popup menu support in the "dialogs provider".
parent
035792d5
Changes
6
Hide whitespace changes
Inline
Side-by-side
include/vlc_interface.h
View file @
5a90c358
...
...
@@ -4,7 +4,7 @@
* interface, such as message output.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: vlc_interface.h,v 1.
2
2003/07/17 1
7:30:40
gbazin Exp $
* $Id: vlc_interface.h,v 1.
3
2003/07/17 1
8:58:23
gbazin Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
...
...
@@ -91,3 +91,5 @@ VLC_EXPORT( void, intf_Destroy, ( intf_thread_t * ) );
#define INTF_DIALOG_MESSAGES 11
#define INTF_DIALOG_FILEINFO 12
#define INTF_DIALOG_PREFS 13
#define INTF_DIALOG_POPUPMENU 20
modules/gui/skins/src/dialogs.cpp
View file @
5a90c358
...
...
@@ -2,7 +2,7 @@
* dialogs.cpp: Handles all the different dialog boxes we provide.
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: dialogs.cpp,v 1.1
0
2003/07/17 1
7:30:40
gbazin Exp $
* $Id: dialogs.cpp,v 1.1
1
2003/07/17 1
8:58:23
gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -74,6 +74,17 @@ Dialogs::Dialogs( intf_thread_t *_p_intf )
/* Initialize dialogs provider
* (returns as soon as initialization is done) */
if
(
p_provider
->
pf_run
)
p_provider
->
pf_run
(
p_provider
);
/* Register callback for the intf-popupmenu variable */
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
!=
NULL
)
{
var_AddCallback
(
p_playlist
,
"intf-popupmenu"
,
PopupMenuCB
,
p_intf
->
p_sys
->
p_dialogs
);
vlc_object_release
(
p_playlist
);
}
}
Dialogs
::~
Dialogs
()
...
...
@@ -122,6 +133,8 @@ void Dialogs::ShowFileInfo()
void
Dialogs
::
ShowPopup
()
{
if
(
p_provider
&&
p_provider
->
pf_show_dialog
)
p_provider
->
pf_show_dialog
(
p_provider
,
INTF_DIALOG_POPUPMENU
,
0
);
}
/*****************************************************************************
...
...
modules/gui/wxwindows/dialogs.cpp
View file @
5a90c358
...
...
@@ -2,7 +2,7 @@
* dialogs.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: dialogs.cpp,v 1.
1
2003/07/17 1
7:30:40
gbazin Exp $
* $Id: dialogs.cpp,v 1.
2
2003/07/17 1
8:58:23
gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -72,7 +72,8 @@ BEGIN_EVENT_TABLE(DialogsProvider, wxFrame)
DialogsProvider
::
OnPreferences
)
EVT_COMMAND
(
INTF_DIALOG_FILEINFO
,
wxEVT_DIALOG
,
DialogsProvider
::
OnFileInfo
)
//EVT_COMMAND(ShowPopup_Event, wxEVT_DIALOG, DialogsProvider::OnShowPopup)
EVT_COMMAND
(
INTF_DIALOG_POPUPMENU
,
wxEVT_DIALOG
,
DialogsProvider
::
OnPopupMenu
)
END_EVENT_TABLE
()
/*****************************************************************************
...
...
@@ -95,6 +96,9 @@ DialogsProvider::DialogsProvider( intf_thread_t *_p_intf, wxWindow *p_parent )
/* Create the messages dialog so it can begin storing logs */
p_messages_dialog
=
new
Messages
(
p_intf
,
p_parent
?
p_parent
:
this
);
/* Intercept all menu events in our custom event handler */
PushEventHandler
(
new
MenuEvtHandler
(
p_intf
,
NULL
)
);
}
DialogsProvider
::~
DialogsProvider
()
...
...
@@ -237,3 +241,17 @@ void DialogsProvider::Open( int i_access_method, int i_arg )
p_open_dialog
->
Show
(
i_access_method
,
i_arg
);
}
}
void
DialogsProvider
::
OnPopupMenu
(
wxCommandEvent
&
event
)
{
wxPoint
mousepos
=
wxGetMousePosition
();
#if 0
wxMouseEvent event = wxMouseEvent( wxEVT_RIGHT_UP );
event.m_x = p_main_interface->ScreenToClient(mousepos).x;
event.m_y = p_main_interface->ScreenToClient(mousepos).y;
#endif
::
PopupMenu
(
p_intf
,
this
,
mousepos
);
}
modules/gui/wxwindows/interface.cpp
View file @
5a90c358
...
...
@@ -2,7 +2,7 @@
* interface.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: interface.cpp,v 1.4
6
2003/07/17 1
7:30:40
gbazin Exp $
* $Id: interface.cpp,v 1.4
7
2003/07/17 1
8:58:23
gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -539,12 +539,16 @@ void Interface::OnMenuOpen(wxMenuEvent& event)
#if defined( __WXMSW__ ) || defined( __WXMAC__ )
void
Interface
::
OnContextMenu2
(
wxContextMenuEvent
&
event
)
{
::
PopupMenu
(
p_intf
,
this
,
ScreenToClient
(
event
.
GetPosition
())
);
if
(
p_intf
->
p_sys
->
pf_show_dialog
)
p_intf
->
p_sys
->
pf_show_dialog
(
p_intf
,
INTF_DIALOG_POPUPMENU
,
0
);
//::PopupMenu( p_intf, this, ScreenToClient(event.GetPosition()) );
}
#endif
void
Interface
::
OnContextMenu
(
wxMouseEvent
&
event
)
{
::
PopupMenu
(
p_intf
,
this
,
event
.
GetPosition
()
);
if
(
p_intf
->
p_sys
->
pf_show_dialog
)
p_intf
->
p_sys
->
pf_show_dialog
(
p_intf
,
INTF_DIALOG_POPUPMENU
,
0
);
//::PopupMenu( p_intf, this, event.GetPosition() );
}
void
Interface
::
OnExit
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
...
...
modules/gui/wxwindows/timer.cpp
View file @
5a90c358
...
...
@@ -2,7 +2,7 @@
* timer.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: timer.cpp,v 1.2
6
2003/07/17 1
7:30:40
gbazin Exp $
* $Id: timer.cpp,v 1.2
7
2003/07/17 1
8:58:23
gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -100,6 +100,7 @@ void Timer::Notify()
/* If the "display popup" flag has changed */
if
(
p_intf
->
p_sys
->
b_popup_change
)
{
#if 0
wxPoint mousepos = wxGetMousePosition();
wxMouseEvent event = wxMouseEvent( wxEVT_RIGHT_UP );
...
...
@@ -107,6 +108,9 @@ void Timer::Notify()
event.m_y = p_main_interface->ScreenToClient(mousepos).y;
p_main_interface->AddPendingEvent(event);
#endif
if
(
p_intf
->
p_sys
->
pf_show_dialog
)
p_intf
->
p_sys
->
pf_show_dialog
(
p_intf
,
INTF_DIALOG_POPUPMENU
,
0
);
p_intf
->
p_sys
->
b_popup_change
=
VLC_FALSE
;
}
...
...
modules/gui/wxwindows/wxwindows.h
View file @
5a90c358
...
...
@@ -2,7 +2,7 @@
* wxwindows.h: private wxWindows interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: wxwindows.h,v 1.4
3
2003/07/17 1
7:30:40
gbazin Exp $
* $Id: wxwindows.h,v 1.4
4
2003/07/17 1
8:58:23
gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -203,6 +203,8 @@ private:
void
OnOpenNet
(
wxCommandEvent
&
event
);
void
OnOpenSat
(
wxCommandEvent
&
event
);
void
OnPopupMenu
(
wxCommandEvent
&
event
);
void
OnIdle
(
wxIdleEvent
&
event
);
DECLARE_EVENT_TABLE
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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