Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
e39089dc
Commit
e39089dc
authored
Nov 10, 2003
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/gui/wxwindows/*: dshow open panel is fully functionnal.
parent
a4c1c8f5
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
153 additions
and
48 deletions
+153
-48
modules/gui/wxwindows/dialogs.cpp
modules/gui/wxwindows/dialogs.cpp
+1
-6
modules/gui/wxwindows/open.cpp
modules/gui/wxwindows/open.cpp
+102
-33
modules/gui/wxwindows/preferences_widgets.cpp
modules/gui/wxwindows/preferences_widgets.cpp
+30
-4
modules/gui/wxwindows/preferences_widgets.h
modules/gui/wxwindows/preferences_widgets.h
+10
-1
modules/gui/wxwindows/wxwindows.h
modules/gui/wxwindows/wxwindows.h
+10
-4
No files found.
modules/gui/wxwindows/dialogs.cpp
View file @
e39089dc
...
...
@@ -2,7 +2,7 @@
* dialogs.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: dialogs.cpp,v 1.1
0 2003/10/29 17:32:54 zorglub
Exp $
* $Id: dialogs.cpp,v 1.1
1 2003/11/10 00:14:05 gbazin
Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -314,11 +314,6 @@ void DialogsProvider::OnOpenNet( wxCommandEvent& event )
Open
(
NET_ACCESS
,
event
.
GetInt
()
);
}
void
DialogsProvider
::
OnOpenSat
(
wxCommandEvent
&
event
)
{
Open
(
SAT_ACCESS
,
event
.
GetInt
()
);
}
void
DialogsProvider
::
Open
(
int
i_access_method
,
int
i_arg
)
{
/* Show/hide the open dialog */
...
...
modules/gui/wxwindows/open.cpp
View file @
e39089dc
...
...
@@ -2,7 +2,7 @@
* open.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: open.cpp,v 1.4
1 2003/11/09 20:13:46
gbazin Exp $
* $Id: open.cpp,v 1.4
2 2003/11/10 00:14:05
gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -150,6 +150,65 @@ BEGIN_EVENT_TABLE(OpenDialog, wxFrame)
END_EVENT_TABLE
()
/*****************************************************************************
* AutoBuiltPanel.
*****************************************************************************/
WX_DEFINE_ARRAY
(
ConfigControl
*
,
ArrayOfConfigControls
);
class
AutoBuiltPanel
:
public
wxPanel
{
public:
AutoBuiltPanel
()
{
}
AutoBuiltPanel
(
wxWindow
*
,
OpenDialog
*
,
intf_thread_t
*
,
const
module_t
*
);
virtual
~
AutoBuiltPanel
()
{}
wxString
name
;
ArrayOfConfigControls
config_array
;
private:
intf_thread_t
*
p_intf
;
};
void
AutoBuildCallback
(
void
*
p_data
)
{
((
OpenDialog
*
)
p_data
)
->
UpdateMRL
();
}
AutoBuiltPanel
::
AutoBuiltPanel
(
wxWindow
*
parent
,
OpenDialog
*
dialog
,
intf_thread_t
*
_p_intf
,
const
module_t
*
p_module
)
:
wxPanel
(
parent
,
-
1
,
wxDefaultPosition
,
wxSize
(
200
,
200
)
),
name
(
wxU
(
p_module
->
psz_object_name
)
),
p_intf
(
_p_intf
)
{
wxBoxSizer
*
sizer
=
new
wxBoxSizer
(
wxVERTICAL
);
module_config_t
*
p_item
=
p_module
->
p_config
;
if
(
p_item
)
do
{
if
(
p_item
->
i_type
&
CONFIG_HINT
||
p_item
->
b_advanced
)
continue
;
ConfigControl
*
control
=
CreateConfigControl
(
VLC_OBJECT
(
p_intf
),
p_item
,
this
);
config_array
.
Add
(
control
);
/* Don't add items that were not recognized */
if
(
control
==
NULL
)
continue
;
control
->
SetUpdateCallback
(
AutoBuildCallback
,
(
void
*
)
dialog
);
sizer
->
Add
(
control
,
0
,
wxEXPAND
|
wxALL
,
2
);
}
while
(
p_item
->
i_type
!=
CONFIG_HINT_END
&&
p_item
++
);
this
->
SetSizerAndFit
(
sizer
);
}
/*****************************************************************************
* Constructor.
*****************************************************************************/
...
...
@@ -265,8 +324,10 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
module_t
*
p_module
=
config_FindModule
(
VLC_OBJECT
(
p_intf
),
"dshow"
);
if
(
p_module
)
{
notebook
->
AddPage
(
AutoBuildPanel
(
notebook
,
p_module
),
wxU
(
p_module
->
psz_longname
)
);
AutoBuiltPanel
*
autopanel
=
new
AutoBuiltPanel
(
notebook
,
this
,
p_intf
,
p_module
);
input_tab_array
.
Add
(
autopanel
);
notebook
->
AddPage
(
autopanel
,
wxU
(
p_module
->
psz_longname
)
);
}
/* Update Disc panel */
...
...
@@ -588,33 +649,9 @@ wxPanel *OpenDialog::V4LPanel( wxWindow* parent )
}
#endif
wxPanel
*
OpenDialog
::
AutoBuildPanel
(
wxWindow
*
parent
,
const
module_t
*
p_module
)
void
OpenDialog
::
UpdateMRL
()
{
wxPanel
*
panel
=
new
wxPanel
(
parent
,
-
1
,
wxDefaultPosition
,
wxSize
(
200
,
200
)
);
wxBoxSizer
*
sizer
=
new
wxBoxSizer
(
wxVERTICAL
);
module_config_t
*
p_item
=
p_module
->
p_config
;
if
(
p_item
)
do
{
if
(
p_item
->
i_type
&
CONFIG_HINT
||
p_item
->
b_advanced
)
continue
;
ConfigControl
*
control
=
CreateConfigControl
(
VLC_OBJECT
(
p_intf
),
p_item
,
panel
);
/* Don't add items that were not recognized */
if
(
control
==
NULL
)
continue
;
sizer
->
Add
(
control
,
0
,
wxEXPAND
|
wxALL
,
2
);
}
while
(
p_item
->
i_type
!=
CONFIG_HINT_END
&&
p_item
++
);
panel
->
SetSizerAndFit
(
sizer
);
return
panel
;
UpdateMRL
(
i_current_access_method
);
}
void
OpenDialog
::
UpdateMRL
(
int
i_access_method
)
...
...
@@ -673,9 +710,6 @@ void OpenDialog::UpdateMRL( int i_access_method )
break
;
}
break
;
case
SAT_ACCESS
:
mrltemp
=
wxT
(
"satellite"
)
+
demux
+
wxT
(
"://"
);
break
;
#ifndef WIN32
case
V4L_ACCESS
:
...
...
@@ -701,6 +735,41 @@ void OpenDialog::UpdateMRL( int i_access_method )
#endif
default:
{
int
i_item
=
i_access_method
-
MAX_ACCESS
;
if
(
i_item
<
0
||
i_item
>=
(
int
)
input_tab_array
.
GetCount
()
)
break
;
AutoBuiltPanel
*
input_panel
=
input_tab_array
.
Item
(
i_item
);
mrltemp
=
input_panel
->
name
+
wxT
(
"://"
);
for
(
int
i
=
0
;
i
<
(
int
)
input_panel
->
config_array
.
GetCount
();
i
++
)
{
ConfigControl
*
control
=
input_panel
->
config_array
.
Item
(
i
);
mrltemp
+=
wxT
(
" :"
)
+
control
->
GetName
()
+
wxT
(
"="
);
switch
(
control
->
GetType
()
)
{
case
CONFIG_ITEM_STRING
:
case
CONFIG_ITEM_FILE
:
case
CONFIG_ITEM_DIRECTORY
:
case
CONFIG_ITEM_MODULE
:
mrltemp
+=
wxT
(
"
\"
"
)
+
control
->
GetPszValue
()
+
wxT
(
"
\"
"
);
break
;
case
CONFIG_ITEM_INTEGER
:
case
CONFIG_ITEM_BOOL
:
mrltemp
+=
wxString
::
Format
(
"%i"
,
control
->
GetIntValue
()
);
break
;
case
CONFIG_ITEM_FLOAT
:
mrltemp
+=
wxString
::
Format
(
"%f"
,
control
->
GetFloatValue
()
);
break
;
}
}
}
break
;
}
...
...
modules/gui/wxwindows/preferences_widgets.cpp
View file @
e39089dc
...
...
@@ -2,7 +2,7 @@
* preferences_widgets.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: preferences_widgets.cpp,v 1.1
4 2003/11/09 13:20:32
gbazin Exp $
* $Id: preferences_widgets.cpp,v 1.1
5 2003/11/10 00:14:05
gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Sigmund Augdal <sigmunau@idi.ntnu.no>
...
...
@@ -107,8 +107,11 @@ ConfigControl *CreateConfigControl( vlc_object_t *p_this,
*****************************************************************************/
ConfigControl
::
ConfigControl
(
vlc_object_t
*
_p_this
,
module_config_t
*
p_item
,
wxWindow
*
parent
)
:
wxPanel
(
parent
),
p_this
(
_p_this
),
name
(
wxU
(
p_item
->
psz_name
)
),
i_type
(
p_item
->
i_type
),
b_advanced
(
p_item
->
b_advanced
)
:
wxPanel
(
parent
),
p_this
(
_p_this
),
pf_update_callback
(
NULL
),
p_update_data
(
NULL
),
name
(
wxU
(
p_item
->
psz_name
)
),
i_type
(
p_item
->
i_type
),
b_advanced
(
p_item
->
b_advanced
)
{
sizer
=
new
wxBoxSizer
(
wxHORIZONTAL
);
}
...
...
@@ -137,6 +140,21 @@ vlc_bool_t ConfigControl::IsAdvanced()
return
b_advanced
;
}
void
ConfigControl
::
SetUpdateCallback
(
void
(
*
p_callback
)(
void
*
),
void
*
p_data
)
{
pf_update_callback
=
p_callback
;
p_update_data
=
p_data
;
}
void
ConfigControl
::
OnUpdate
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
{
if
(
pf_update_callback
)
{
pf_update_callback
(
p_update_data
);
}
}
/*****************************************************************************
* KeyConfigControl implementation
*****************************************************************************/
...
...
@@ -229,7 +247,7 @@ KeyConfigControl::KeyConfigControl( vlc_object_t *p_this,
for
(
unsigned
int
i
=
0
;
i
<
WXSIZEOF
(
KeysList
);
i
++
)
{
combo
->
SetClientData
(
i
,
(
void
*
)
vlc_keys
[
i
].
i_key_code
);
if
(
vlc_keys
[
i
].
i_key_code
==
if
(
(
unsigned
int
)
vlc_keys
[
i
].
i_key_code
==
(
((
unsigned
int
)
p_item
->
i_value
)
&
~
KEY_MODIFIER
)
)
{
combo
->
SetSelection
(
i
);
...
...
@@ -357,6 +375,11 @@ wxString StringConfigControl::GetPszValue()
return
textctrl
->
GetValue
();
}
BEGIN_EVENT_TABLE
(
StringConfigControl
,
wxPanel
)
/* Text events */
EVT_TEXT
(
-
1
,
StringConfigControl
::
OnUpdate
)
END_EVENT_TABLE
()
/*****************************************************************************
* StringListConfigControl implementation
*****************************************************************************/
...
...
@@ -420,6 +443,9 @@ void StringListConfigControl::UpdateCombo( module_config_t *p_item )
BEGIN_EVENT_TABLE
(
StringListConfigControl
,
wxPanel
)
/* Button events */
EVT_BUTTON
(
wxID_HIGHEST
,
StringListConfigControl
::
OnRefresh
)
/* Text events */
EVT_TEXT
(
-
1
,
StringListConfigControl
::
OnUpdate
)
END_EVENT_TABLE
()
void
StringListConfigControl
::
OnRefresh
(
wxCommandEvent
&
event
)
...
...
modules/gui/wxwindows/preferences_widgets.h
View file @
e39089dc
...
...
@@ -2,7 +2,7 @@
* preferences_widgets.h : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2003 VideoLAN
* $Id: preferences_widgets.h,v 1.
6 2003/11/05 17:46:21
gbazin Exp $
* $Id: preferences_widgets.h,v 1.
7 2003/11/10 00:14:05
gbazin Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
...
...
@@ -36,11 +36,18 @@ public:
int
GetType
();
vlc_bool_t
IsAdvanced
();
void
SetUpdateCallback
(
void
(
*
)(
void
*
),
void
*
);
protected:
wxBoxSizer
*
sizer
;
wxStaticText
*
label
;
vlc_object_t
*
p_this
;
void
(
*
pf_update_callback
)(
void
*
);
void
*
p_update_data
;
void
OnUpdate
(
wxCommandEvent
&
);
private:
wxString
name
;
int
i_type
;
...
...
@@ -81,6 +88,8 @@ public:
virtual
wxString
GetPszValue
();
private:
wxTextCtrl
*
textctrl
;
DECLARE_EVENT_TABLE
()
};
class
StringListConfigControl
:
public
ConfigControl
...
...
modules/gui/wxwindows/wxwindows.h
View file @
e39089dc
...
...
@@ -2,7 +2,7 @@
* wxwindows.h: private wxWindows interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: wxwindows.h,v 1.6
8 2003/11/09 20:13:46
gbazin Exp $
* $Id: wxwindows.h,v 1.6
9 2003/11/10 00:14:05
gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -290,6 +290,8 @@ public:
};
/* Open Dialog */
class
AutoBuiltPanel
;
WX_DEFINE_ARRAY
(
AutoBuiltPanel
*
,
ArrayOfAutoBuiltPanel
);
class
V4LDialog
;
class
SoutDialog
;
class
SubsFileDialog
;
...
...
@@ -308,6 +310,9 @@ public:
int
Show
();
int
Show
(
int
i_access_method
,
int
i_arg
=
0
);
void
UpdateMRL
();
void
UpdateMRL
(
int
i_access_method
);
wxArrayString
mrl
;
private:
...
...
@@ -315,9 +320,8 @@ private:
wxPanel
*
DiscPanel
(
wxWindow
*
parent
);
wxPanel
*
NetPanel
(
wxWindow
*
parent
);
wxPanel
*
V4LPanel
(
wxWindow
*
parent
);
wxPanel
*
AutoBuildPanel
(
wxWindow
*
parent
,
const
module_t
*
);
void
UpdateMRL
(
int
i_access_method
)
;
ArrayOfAutoBuiltPanel
input_tab_array
;
/* Event handlers (these functions should _not_ be virtual) */
void
OnOk
(
wxCommandEvent
&
event
);
...
...
@@ -408,8 +412,10 @@ enum
FILE_ACCESS
=
0
,
DISC_ACCESS
,
NET_ACCESS
,
SAT_ACCESS
,
#ifndef WIN32
V4L_ACCESS
,
#endif
MAX_ACCESS
,
FILE_SIMPLE_ACCESS
};
...
...
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