Changes to how video controls are related.
Originally committed to SVN as r768.
This commit is contained in:
parent
88a00fbdb0
commit
1e4a5b8050
5 changed files with 33 additions and 13 deletions
|
@ -438,7 +438,7 @@ void FrameMain::InitContents() {
|
|||
|
||||
// Video area;
|
||||
videoBox = new VideoBox(Panel);
|
||||
TopSizer->Add(videoBox->VideoSizer,0,wxEXPAND,0);
|
||||
TopSizer->Add(videoBox,0,wxEXPAND,0);
|
||||
videoBox->videoDisplay->zoomBox = ZoomBox;
|
||||
|
||||
// Subtitles area
|
||||
|
@ -764,7 +764,7 @@ void FrameMain::SetDisplayMode(int mode) {
|
|||
}
|
||||
|
||||
// Set display
|
||||
TopSizer->Show(videoBox->VideoSizer,showVid,true);
|
||||
TopSizer->Show(videoBox,showVid,true);
|
||||
ToolSizer->Show(audioBox,showAudio,true);
|
||||
}
|
||||
|
||||
|
@ -774,13 +774,10 @@ void FrameMain::SetDisplayMode(int mode) {
|
|||
EditBox->SetSplitLineMode();
|
||||
MainSizer->CalcMin();
|
||||
MainSizer->RecalcSizes();
|
||||
videoBox->VideoSizer->Layout();
|
||||
//videoBox->VideoSizer->Layout();
|
||||
MainSizer->Layout();
|
||||
Layout();
|
||||
Show(true);
|
||||
//int cw,ch;
|
||||
//GetSize(&cw,&ch);
|
||||
//SetSize(cw-1,ch-1);
|
||||
Thaw();
|
||||
}
|
||||
|
||||
|
|
|
@ -47,9 +47,11 @@
|
|||
|
||||
///////////////
|
||||
// Constructor
|
||||
VideoBox::VideoBox(wxPanel *parent) {
|
||||
VideoBox::VideoBox(wxWindow *parent)
|
||||
: wxPanel (parent,-1)
|
||||
{
|
||||
// Buttons
|
||||
videoPage = parent;
|
||||
videoPage = this;
|
||||
wxBitmapButton *VideoPlayButton = new wxBitmapButton(videoPage,Video_Play,wxBITMAP(button_play),wxDefaultPosition,wxSize(25,-1));
|
||||
VideoPlayButton->SetToolTip(_("Play video starting on this position"));
|
||||
wxBitmapButton *VideoPlayLineButton = new wxBitmapButton(videoPage,Video_Play_Line,wxBITMAP(button_playline),wxDefaultPosition,wxSize(25,-1));
|
||||
|
@ -82,10 +84,25 @@ VideoBox::VideoBox(wxPanel *parent) {
|
|||
videoDisplay->ControlSlider = videoSlider;
|
||||
videoDisplay->PositionDisplay = VideoPosition;
|
||||
videoDisplay->SubsPosition = VideoSubsPos;
|
||||
videoDisplay->box = this;
|
||||
videoDisplay->Reset();
|
||||
|
||||
// Set display
|
||||
videoSlider->Display = videoDisplay;
|
||||
|
||||
// Typesetting buttons
|
||||
wxSizer *typeSizer = new wxBoxSizer(wxVERTICAL);
|
||||
typeSizer->Add(new wxButton(videoPage,-1,_T("a"),wxDefaultPosition,wxSize(20,20)),0,0,0);
|
||||
typeSizer->Add(new wxButton(videoPage,-1,_T("b"),wxDefaultPosition,wxSize(20,20)),0,0,0);
|
||||
typeSizer->Add(new wxButton(videoPage,-1,_T("c"),wxDefaultPosition,wxSize(20,20)),0,0,0);
|
||||
typeSizer->Add(new wxButton(videoPage,-1,_T("d"),wxDefaultPosition,wxSize(20,20)),0,0,0);
|
||||
typeSizer->Add(new wxButton(videoPage,-1,_T("e"),wxDefaultPosition,wxSize(20,20)),0,0,0);
|
||||
typeSizer->AddStretchSpacer(1);
|
||||
|
||||
// Top sizer
|
||||
wxSizer *topSizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
topSizer->Add(typeSizer,0,wxEXPAND,0);
|
||||
topSizer->Add(videoDisplay,1,wxEXPAND,0);
|
||||
|
||||
// Sizers
|
||||
videoSliderSizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
@ -101,7 +118,8 @@ VideoBox::VideoBox(wxPanel *parent) {
|
|||
videoBottomSizer->Add(VideoPosition,1,wxLEFT|wxALIGN_CENTER,5);
|
||||
videoBottomSizer->Add(VideoSubsPos,1,wxALIGN_CENTER,0);
|
||||
VideoSizer = new wxBoxSizer(wxVERTICAL);
|
||||
VideoSizer->Add(videoDisplay,1,wxEXPAND,0);
|
||||
VideoSizer->Add(topSizer,1,wxEXPAND,0);
|
||||
VideoSizer->Add(videoSliderSizer,0,wxEXPAND,0);
|
||||
VideoSizer->Add(videoBottomSizer,0,wxEXPAND,0);
|
||||
SetSizer(VideoSizer);
|
||||
}
|
||||
|
|
|
@ -53,19 +53,19 @@ class ToggleBitmap;
|
|||
|
||||
///////////////////
|
||||
// Video box class
|
||||
class VideoBox {
|
||||
class VideoBox : public wxPanel {
|
||||
public:
|
||||
ToggleBitmap *AutoScroll;
|
||||
wxBoxSizer *VideoSizer;
|
||||
wxBoxSizer *videoSliderSizer;
|
||||
wxPanel *videoPage;
|
||||
wxWindow *videoPage;
|
||||
wxTextCtrl *VideoPosition;
|
||||
wxTextCtrl *VideoSubsPos;
|
||||
VideoDisplay *videoDisplay;
|
||||
VideoSlider *videoSlider;
|
||||
//VideoZoomSlider *zoomSlider;
|
||||
|
||||
VideoBox (wxPanel *parent);
|
||||
VideoBox (wxWindow *parent);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
#include "audio_display.h"
|
||||
#include "main.h"
|
||||
#include "video_slider.h"
|
||||
#include "video_box.h"
|
||||
#if USE_FEXTRACKER == 1
|
||||
#include "../FexTrackerSource/FexTracker.h"
|
||||
#include "../FexTrackerSource/FexTrackingFeature.h"
|
||||
|
@ -136,6 +137,8 @@ void VideoDisplay::UpdateSize() {
|
|||
int _w,_h;
|
||||
GetSize(&_w,&_h);
|
||||
SetSizeHints(_w,_h,_w,_h);
|
||||
|
||||
box->VideoSizer->Fit(box);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -375,7 +378,7 @@ void VideoDisplay::SetZoom(double value) {
|
|||
provider->SetZoom(value);
|
||||
UpdateSize();
|
||||
RefreshVideo();
|
||||
GetParent()->Layout();
|
||||
box->GetParent()->Layout();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -56,6 +56,7 @@ class AudioDisplay;
|
|||
class AssDialogue;
|
||||
class VideoProvider;
|
||||
class VideoDisplayVisual;
|
||||
class VideoBox;
|
||||
|
||||
|
||||
//////////////
|
||||
|
@ -114,6 +115,7 @@ public:
|
|||
void SetKeyFramesName(wxString name) { keyFramesFilename = name; }
|
||||
|
||||
VideoProvider *provider;
|
||||
VideoBox *box;
|
||||
|
||||
SubtitlesGrid *grid;
|
||||
wxString videoName;
|
||||
|
|
Loading…
Reference in a new issue