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
6e6164d0
Commit
6e6164d0
authored
Dec 02, 2005
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/gui/wxwidgets: use a wxSplitterWindow to display the embedded playlist.
parent
209591e0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
14 deletions
+35
-14
modules/gui/wxwidgets/interface.cpp
modules/gui/wxwidgets/interface.cpp
+27
-11
modules/gui/wxwidgets/interface.hpp
modules/gui/wxwidgets/interface.hpp
+3
-1
modules/gui/wxwidgets/playlist_manager.cpp
modules/gui/wxwidgets/playlist_manager.cpp
+4
-1
modules/gui/wxwidgets/video.cpp
modules/gui/wxwidgets/video.cpp
+1
-1
No files found.
modules/gui/wxwidgets/interface.cpp
View file @
6e6164d0
...
...
@@ -225,12 +225,18 @@ Interface::Interface( intf_thread_t *_p_intf, long style ):
/* Give our interface a nice little icon */
SetIcon
(
wxIcon
(
vlc_xpm
)
);
/* Create a main panel that will fill in the interface window */
/* Create a splitter window that will fill in the interface window.
* We need a splitter bar in order to make the embedded playlist
* resizable. */
splitter
=
new
wxSplitterWindow
(
this
,
-
1
,
wxDefaultPosition
,
wxSize
(
0
,
0
),
wxCLIP_CHILDREN
|
wxSP_3DSASH
);
main_sizer
=
new
wxBoxSizer
(
wxVERTICAL
);
main_sizer
->
Add
(
splitter
,
1
,
wxEXPAND
);
SetSizer
(
main_sizer
);
main_panel
=
new
wxPanel
(
this
,
-
1
,
wxPoint
(
0
,
0
),
wxSize
(
0
,
0
),
/* Create a main panel that will fill in the interface window */
main_panel
=
new
wxPanel
(
splitter
,
-
1
,
wxPoint
(
0
,
0
),
wxSize
(
0
,
0
),
wxCLIP_CHILDREN
);
main_sizer
->
Add
(
main_panel
,
1
,
wxEXPAND
);
main_panel
->
SetFocus
();
#if defined(__WXGTK20__) && wxCHECK_VERSION(2,5,6)
...
...
@@ -244,6 +250,12 @@ Interface::Interface( intf_thread_t *_p_intf, long style ):
panel_sizer
=
new
wxBoxSizer
(
wxVERTICAL
);
main_panel
->
SetSizer
(
panel_sizer
);
/* Put this in the splitter */
splitter
->
Initialize
(
main_panel
);
#if wxCHECK_VERSION(2,6,0)
splitter
->
SetSashGravity
(
1.0
);
#endif
#ifdef wxHAS_TASK_BAR_ICON
/* Systray integration */
p_systray
=
NULL
;
...
...
@@ -262,17 +274,17 @@ Interface::Interface( intf_thread_t *_p_intf, long style ):
/* Creation of the status bar
* Helptext for menu items and toolbar tools will automatically get
* displayed here. */
int
i_status_width
[
3
]
=
{
-
6
,
-
2
,
-
9
};
int
i_status_width
[
3
]
=
{
100
,
40
,
-
1
};
statusbar
=
CreateStatusBar
(
3
);
/* 2 fields */
statusbar
->
SetStatusWidths
(
3
,
i_status_width
);
statusbar
->
SetStatusText
(
wxString
::
Format
(
wxT
(
"x%.2f"
),
1.0
),
1
);
/* Get minimum window size to prevent user from glitching it */
main_panel
->
SetSizeHints
(
wxSize
(
-
1
,
0
)
);
splitter
->
SetSizeHints
(
wxSize
(
-
1
,
0
)
);
panel_sizer
->
Layout
();
panel_sizer
->
Fit
(
main_panel
);
main_sizer
->
Layout
();
main_sizer
->
Fit
(
this
);
main_min_size
=
GetSize
();
main_panel
->
SetSizeHints
(
wxSize
(
-
1
,
-
1
)
);
splitter
->
SetSizeHints
(
wxSize
(
-
1
,
-
1
)
);
/* Video window */
video_window
=
0
;
...
...
@@ -287,10 +299,10 @@ Interface::Interface( intf_thread_t *_p_intf, long style ):
panel_sizer
->
Add
(
input_manager
,
0
,
wxEXPAND
,
0
);
/* Layout everything */
main_panel
->
SetSizeHints
(
wxSize
(
-
1
,
0
)
);
splitter
->
SetSizeHints
(
wxSize
(
-
1
,
0
)
);
panel_sizer
->
Layout
();
panel_sizer
->
Fit
(
main_panel
);
main_sizer
->
Layout
();
main_sizer
->
Fit
(
this
);
main_panel
->
SetSizeHints
(
wxSize
(
-
1
,
-
1
)
);
splitter
->
SetSizeHints
(
wxSize
(
-
1
,
-
1
)
);
#if wxUSE_DRAG_AND_DROP
/* Associate drop targets with the main interface */
...
...
@@ -860,13 +872,17 @@ void Interface::OnSmallPlaylist( wxCommandEvent& WXUNUSED(event) )
if
(
!
playlist_manager
)
{
/* Create the extra panel */
playlist_manager
=
new
PlaylistManager
(
p_intf
,
main_panel
);
panel_sizer
->
Add
(
playlist_manager
,
0
,
wxEXPAND
,
0
);
playlist_manager
=
new
PlaylistManager
(
p_intf
,
splitter
);
playlist_min_size
=
playlist_manager
->
GetBestSize
();
}
b_playlist_manager
=
!
b_playlist_manager
;
panel_sizer
->
Show
(
playlist_manager
,
b_playlist_manager
);
if
(
b_playlist_manager
)
splitter
->
SplitHorizontally
(
main_panel
,
playlist_manager
,
-
playlist_min_size
.
GetHeight
()
);
else
splitter
->
Unsplit
(
playlist_manager
);
SetIntfMinSize
();
main_sizer
->
Layout
();
...
...
modules/gui/wxwidgets/interface.hpp
View file @
6e6164d0
...
...
@@ -30,6 +30,7 @@
#include <wx/dnd.h>
#include <wx/accel.h>
#include <wx/taskbar.h>
#include <wx/splitter.h>
namespace
wxvlc
...
...
@@ -92,6 +93,7 @@ namespace wxvlc
void
NextStream
();
wxBoxSizer
*
main_sizer
;
wxSplitterWindow
*
splitter
;
wxPanel
*
main_panel
;
wxBoxSizer
*
panel_sizer
;
...
...
modules/gui/wxwidgets/playlist_manager.cpp
View file @
6e6164d0
...
...
@@ -94,7 +94,7 @@ public:
* Constructor.
*****************************************************************************/
PlaylistManager
::
PlaylistManager
(
intf_thread_t
*
_p_intf
,
wxWindow
*
p_parent
)
:
wxPanel
(
p_parent
,
-
1
,
wxDefaultPosition
,
wxSize
(
500
,
30
0
)
)
wxPanel
(
p_parent
,
-
1
,
wxDefaultPosition
,
wxSize
(
0
,
0
)
)
{
/* Initializations */
p_intf
=
_p_intf
;
...
...
@@ -123,6 +123,9 @@ PlaylistManager::PlaylistManager( intf_thread_t *_p_intf, wxWindow *p_parent ):
sizer
=
new
wxBoxSizer
(
wxHORIZONTAL
);
SetSizer
(
sizer
);
sizer
->
Add
(
treectrl
,
1
,
wxEXPAND
);
treectrl
->
SetSizeHints
(
wxSize
(
500
,
150
)
);
sizer
->
Layout
();
sizer
->
Fit
(
this
);
/* Create image list */
wxImageList
*
p_images
=
new
wxImageList
(
16
,
16
,
TRUE
);
...
...
modules/gui/wxwidgets/video.cpp
View file @
6e6164d0
...
...
@@ -70,7 +70,7 @@ wxWindow *CreateVideoWindow( intf_thread_t *p_intf, wxWindow *p_parent )
void
UpdateVideoWindow
(
intf_thread_t
*
p_intf
,
wxWindow
*
p_window
)
{
#if
(wxCHECK_VERSION(2,5,3)
)
#if
wxCHECK_VERSION(2,5,3
)
if
(
!
p_intf
->
p_sys
->
b_video_autosize
)
return
;
if
(
p_window
&&
mdate
()
-
((
VideoWindow
*
)
p_window
)
->
i_creation_date
<
2000000
)
...
...
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