forked from mia/Aegisub
Made double click on grid row jump video to it
Originally committed to SVN as r190.
This commit is contained in:
parent
e7ec7ec68a
commit
d38cbae8d5
3 changed files with 63 additions and 3 deletions
|
@ -573,6 +573,7 @@ void BaseGrid::OnMouseEvent(wxMouseEvent &event) {
|
|||
|
||||
// Row that mouse is over
|
||||
bool click = event.ButtonDown(wxMOUSE_BTN_LEFT);
|
||||
bool dclick = event.LeftDClick();
|
||||
int row = event.GetY()/lineHeight + yPos - 1;
|
||||
if (holding && !click) {
|
||||
row = MID(0,row,GetRows()-1);
|
||||
|
@ -611,7 +612,7 @@ void BaseGrid::OnMouseEvent(wxMouseEvent &event) {
|
|||
}
|
||||
|
||||
// Click
|
||||
if ((click || holding) && validRow) {
|
||||
if ((click || holding || dclick) && validRow) {
|
||||
// Disable extending
|
||||
extendRow = -1;
|
||||
|
||||
|
@ -623,8 +624,9 @@ void BaseGrid::OnMouseEvent(wxMouseEvent &event) {
|
|||
}
|
||||
|
||||
// Normal click
|
||||
if (click && !shift && !ctrl && !alt) {
|
||||
editBox->SetToLine(row);
|
||||
if ((click || dclick) && !shift && !ctrl && !alt) {
|
||||
if (editBox->linen != row) editBox->SetToLine(row);
|
||||
if (dclick) video->JumpToFrame(VFR_Output.GetFrameAtTime(GetDialogue(row)->Start.GetMS(),true));
|
||||
SelectRow(row,false);
|
||||
parentFrame->UpdateToolbar();
|
||||
lastRow = row;
|
||||
|
|
|
@ -29,6 +29,7 @@ Please visit http://aegisub.net to download latest version
|
|||
o Inserted lines will now be automatically selected.
|
||||
o Alt+Click on grid will activate the clicked line, without modifying selection.
|
||||
o Actor and effect columns are now only visible if they are being used.
|
||||
o Double clicking a row will jump video to it, regardless of auto go to option.
|
||||
- Toolbar will now properly disable the Jump To buttons if more than one line is selected. (AMZ)
|
||||
- Fixed the toolbar "grey area" glitch (was actually a wxWidgets issue). (AMZ)
|
||||
- Default video zoom can now be set in config.dat and is defaulted to 100%. (AMZ)
|
||||
|
|
57
core/subtitles_rasterizer.h
Normal file
57
core/subtitles_rasterizer.h
Normal file
|
@ -0,0 +1,57 @@
|
|||
// Copyright (c) 2006, Rodrigo Braz Monteiro, Fredrik Mellbin
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
// * Neither the name of the Aegisub Group nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// -----------------------------------------------------------------------------
|
||||
//
|
||||
// AEGISUB
|
||||
//
|
||||
// Website: http://aegisub.cellosoft.com
|
||||
// Contact: mailto:zeratul@cellosoft.com
|
||||
//
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
//////////////
|
||||
// Prototypes
|
||||
class VideoFrame;
|
||||
class AssFile;
|
||||
|
||||
|
||||
////////////////////////////
|
||||
// Video Provider interface
|
||||
class SubtitleRasterizer {
|
||||
public:
|
||||
virtual ~SubtitleRasterizer() {}
|
||||
|
||||
wxString GetFromDisk(AssFile *subs);
|
||||
|
||||
virtual void Load(AssFile *subs)=0;
|
||||
virtual void Close() {}
|
||||
virtual void RenderFrame(VideoFrame *frame,int ms)=0;
|
||||
};
|
Loading…
Reference in a new issue