Implemented redo, and replace == _T("") with .IsEmpty()

Originally committed to SVN as r80.
This commit is contained in:
Rodrigo Braz Monteiro 2006-02-20 21:32:58 +00:00
parent 14e54bce4e
commit 26b15d3d09
31 changed files with 132 additions and 62 deletions

View File

@ -115,7 +115,7 @@ void AssExportFilter::Unregister () {
// Checks if it's registered
bool AssExportFilter::IsRegistered() {
// Check name
if (RegisterName == _T("")) {
if (RegisterName.IsEmpty()) {
return false;
}

View File

@ -143,7 +143,7 @@ void AssExporter::Export(wxString filename, wxString charset) {
if (withCharset) {
wxArrayString choices = FrameMain::GetEncodings();
charset = wxGetSingleChoice(_T("Choose charset code:"), _T("Charset"),choices,NULL,-1, -1,true,250,200);
if (charset == _T("")) {
if (charset.IsEmpty()) {
delete Subs;
return;
}

View File

@ -82,7 +82,7 @@ void AssFile::Load (const wxString _filename,const wxString charset) {
// Find file encoding
wxString enc;
if (charset == _T("")) enc = TextFileReader::GetEncoding(_filename);
if (charset.IsEmpty()) enc = TextFileReader::GetEncoding(_filename);
else enc = charset;
TextFileReader::EnsureValid(enc);
@ -228,7 +228,7 @@ void AssFile::LoadSRT (wxString _filename,wxString encoding) {
switch (mode) {
case 0:
// Checks if there is anything to read
if (curline == _T("")) continue;
if (curline.IsEmpty()) continue;
// Check if it's a line number
if (!curline.IsNumber()) {
@ -258,7 +258,7 @@ void AssFile::LoadSRT (wxString _filename,wxString encoding) {
case 2:
// Checks if it's done
if (curline == _T("")) {
if (curline.IsEmpty()) {
mode = 0;
linen++;
line->group = _T("[Events]");
@ -333,7 +333,7 @@ void AssFile::LoadTXT (wxString _filename,wxString encoding) {
line->Style = _T("Default");
if (isComment) line->Actor = _T("");
else line->Actor = actor;
if (value == _T("")) {
if (value.IsEmpty()) {
line->Actor = _T("");
isComment = true;
}
@ -934,6 +934,16 @@ bool AssFile::IsModified() {
/////////////////////////
// Flag file as modified
void AssFile::FlagAsModified() {
// Clear redo
if (!RedoStack.empty()) {
//StackPush();
//UndoStack.push_back(new AssFile(*UndoStack.back()));
for (std::list<AssFile*>::iterator cur=RedoStack.begin();cur!=RedoStack.end();cur++) {
delete *cur;
}
RedoStack.clear();
}
Modified = true;
StackPush();
}
@ -944,18 +954,18 @@ void AssFile::FlagAsModified() {
void AssFile::StackPush() {
// Places copy on stack
AssFile *curcopy = new AssFile(*top);
SubsStack.push_back(curcopy);
UndoStack.push_back(curcopy);
StackModified = true;
// Cap depth
int n = 0;
for (std::list<AssFile*>::iterator cur=SubsStack.begin();cur!=SubsStack.end();cur++) {
for (std::list<AssFile*>::iterator cur=UndoStack.begin();cur!=UndoStack.end();cur++) {
n++;
}
int depth = Options.AsInt(_T("Undo levels"));
while (n > depth) {
delete SubsStack.front();
SubsStack.pop_front();
delete UndoStack.front();
UndoStack.pop_front();
n--;
}
}
@ -966,15 +976,16 @@ void AssFile::StackPush() {
void AssFile::StackPop() {
bool addcopy = false;
if (StackModified) {
SubsStack.pop_back();
UndoStack.pop_back();
StackModified = false;
addcopy = true;
}
if (!SubsStack.empty()) {
delete top;
top = SubsStack.back();
SubsStack.pop_back();
if (!UndoStack.empty()) {
//delete top;
RedoStack.push_back(top);
top = UndoStack.back();
UndoStack.pop_back();
Popping = true;
}
@ -984,13 +995,46 @@ void AssFile::StackPop() {
}
//////////////
// Stack redo
void AssFile::StackRedo() {
bool addcopy = false;
if (StackModified) {
UndoStack.pop_back();
StackModified = false;
addcopy = true;
}
if (!RedoStack.empty()) {
UndoStack.push_back(top);
top = RedoStack.back();
RedoStack.pop_back();
Popping = true;
//StackModified = false;
}
if (addcopy) {
StackPush();
}
}
///////////////
// Stack clear
void AssFile::StackClear() {
for (std::list<AssFile*>::iterator cur=SubsStack.begin();cur!=SubsStack.end();cur++) {
// Clear undo
for (std::list<AssFile*>::iterator cur=UndoStack.begin();cur!=UndoStack.end();cur++) {
delete *cur;
}
SubsStack.clear();
UndoStack.clear();
// Clear redo
for (std::list<AssFile*>::iterator cur=RedoStack.begin();cur!=RedoStack.end();cur++) {
delete *cur;
}
RedoStack.clear();
Popping = false;
}
@ -1005,18 +1049,26 @@ void AssFile::StackReset() {
}
/////////////////////////////
// Returns if stack is empty
bool AssFile::StackEmpty() {
if (StackModified) return (SubsStack.size() <= 1);
else return SubsStack.empty();
//////////////////////////////////
// Returns if undo stack is empty
bool AssFile::IsUndoStackEmpty() {
if (StackModified) return (UndoStack.size() <= 1);
else return UndoStack.empty();
}
//////////////////////////////////
// Returns if redo stack is empty
bool AssFile::IsRedoStackEmpty() {
return RedoStack.empty();
}
//////////
// Global
AssFile *AssFile::top;
std::list<AssFile*> AssFile::SubsStack;
std::list<AssFile*> AssFile::UndoStack;
std::list<AssFile*> AssFile::RedoStack;
bool AssFile::Popping;
bool AssFile::StackModified;

View File

@ -62,7 +62,8 @@ private:
bool Modified;
// Stack operations
static std::list<AssFile*> SubsStack;
static std::list<AssFile*> UndoStack;
static std::list<AssFile*> RedoStack;
static bool StackModified;
static void StackClear();
@ -112,9 +113,11 @@ public:
void AddComment(const wxString comment); // Adds a ";" comment under [Script Info].
static void StackPop(); // Pop subs from stack and sets 'top' to it
static void StackRedo(); // Redoes action on stack
static void StackPush(); // Puts a copy of 'top' on the stack
static void StackReset(); // Resets stack. Do this before loading new subtitles.
static bool StackEmpty(); // Checks if stack is empty
static bool IsUndoStackEmpty(); // Checks if undo stack is empty
static bool IsRedoStackEmpty(); // Checks if undo stack is empty
static bool Popping; // Flags the stack as popping. You must unset this after popping
static AssFile *top; // Current script file. It is "above" the stack.
};

View File

@ -46,7 +46,7 @@
///////////////////////
// Save styles to disk
void AssStyleStorage::Save(wxString name) {
if (name == _T("")) return;
if (name.IsEmpty()) return;
using namespace std;
ofstream file;
@ -68,7 +68,7 @@ void AssStyleStorage::Save(wxString name) {
/////////////////////////
// Load styles from disk
void AssStyleStorage::Load(wxString name) {
if (name == _T("")) return;
if (name.IsEmpty()) return;
using namespace std;
char buffer[65536];

View File

@ -210,7 +210,7 @@ void AssTime::UpdateFromTextCtrl(wxTextCtrl *ctrl) {
start++;
end++;
}
else if (nextChar == _T("")) text.Remove(start-1,1);
else if (nextChar.IsEmpty()) text.Remove(start-1,1);
else text.Remove(start,1);
}

View File

@ -736,7 +736,7 @@ void AudioDisplay::SetScale(float _scale) {
//////////////////
// Load from file
void AudioDisplay::SetFile(wxString file) {
if (file == _T("")) {
if (file.IsEmpty()) {
if (provider)
delete provider;
provider = NULL;

View File

@ -252,7 +252,7 @@ bool AudioKaraoke::ParseDialogue(AssDialogue *curDiag) {
// Set syllable
void AudioKaraoke::SetSyllable(int n) {
if (n == -1) n = syllables.size()-1;
if (n >= syllables.size()) n = 0;
if (n >= (signed) syllables.size()) n = 0;
curSyllable = n;
startClickSyl = n;
SetSelection(n);

View File

@ -1252,7 +1252,7 @@ void AutomationScript::process_lines(AssFile *input)
// not a dialogue/comment event
// start checking for a blank line
if (e->data == _T("")) {
if (e->data.IsEmpty()) {
lua_newtable(L);
L_settable(L, -1, "kind", wxString(_T("blank")));
} else if (e->data[0] == _T(';')) {

View File

@ -64,7 +64,7 @@ BaseGrid::BaseGrid(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wx
// Set font
wxString fontname = Options.AsText(_T("Font Face"));
if (fontname == _T("")) fontname = _T("Tahoma");
if (fontname.IsEmpty()) fontname = _T("Tahoma");
font.SetFaceName(fontname);
font.SetPointSize(Options.AsInt(_T("Grid font size")));
font.SetWeight(wxFONTWEIGHT_NORMAL);

BIN
core/bitmaps/redo.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -221,7 +221,7 @@ void DialogShiftTimes::OnOK(wxCommandEvent &event) {
wxString message = _T("");
wxFileName assfile(AssFile::top->filename);
wxString filename = assfile.GetFullName();
if (filename == _T("")) message << _("unsaved, ");
if (filename.IsEmpty()) message << _("unsaved, ");
else message << filename << _T(", ");
if (byTime) message << ShiftTime->GetValue() << _T(" ");
else message << len << _(" frames ");
@ -286,7 +286,7 @@ void DialogShiftTimes::OnRadioFrame(wxCommandEvent &event) {
// Appends a line to history
void DialogShiftTimes::AppendToHistory(wxString text) {
// Open file
if (HistoryFile == _T("")) return;
if (HistoryFile.IsEmpty()) return;
using namespace std;
ofstream file;
file.open(HistoryFile.mb_str(wxConvLocal),ios::out | ios::app);

View File

@ -174,7 +174,7 @@ void DialogStyleManager::LoadCatalog () {
// Set to default if available
StorageActions(false);
wxString pickStyle = AssFile::top->GetScriptInfo(_T("Last Style Storage"));
if (pickStyle == _T("")) pickStyle = _T("Default");
if (pickStyle.IsEmpty()) pickStyle = _T("Default");
int opt = CatalogList->FindString(pickStyle);
if (opt != wxNOT_FOUND) {
CatalogList->SetSelection(opt);

View File

@ -192,7 +192,7 @@ void DialogStyling::JumpToLine(int n) {
// Set focus
TypeBox->SetFocus();
if (TypeBox->GetValue() == _T("")) TypeBox->SetValue(Styles->GetString(0));
if (TypeBox->GetValue().IsEmpty()) TypeBox->SetValue(Styles->GetString(0));
TypeBox->SetSelection(0,TypeBox->GetValue().Length());
// Update grid

View File

@ -283,7 +283,7 @@ void DialogTranslation::OnTransBoxKey(wxKeyEvent &event) {
}
// Next
if (Hotkeys.IsPressed(_T("Translation Assistant Next")) || (Hotkeys.IsPressed(_T("Translation Assistant Accept")) && TransText->GetValue() == _T(""))) {
if (Hotkeys.IsPressed(_T("Translation Assistant Next")) || (Hotkeys.IsPressed(_T("Translation Assistant Accept")) && TransText->GetValue().IsEmpty())) {
bool ok = JumpToLine(curline,curblock+1);
if (ok) {
TransText->Clear();

View File

@ -73,7 +73,7 @@ void AssTransformCleanInfoFilter::ProcessSubs(AssFile *subs) {
if (curEntry->group != _T("[Script Info]")) {
continue;
}
if (curEntry->data == _T("")) {
if (curEntry->data.IsEmpty()) {
continue;
}
if (curEntry->data == _T("[Script Info]")) {

View File

@ -229,6 +229,7 @@ void FrameMain::InitMenu() {
// Create Edit menu
editMenu = new wxMenu();
AppendBitmapMenuItem (editMenu,Menu_Edit_Undo, _("&Undo\t") + Hotkeys.GetText(_T("Undo")), _("Undoes last action"),wxBITMAP(undo_button));
AppendBitmapMenuItem (editMenu,Menu_Edit_Redo, _("&Redo\t") + Hotkeys.GetText(_T("Redo")), _("Redoes last action"),wxBITMAP(redo_button));
editMenu->AppendSeparator();
editMenu->Append(Menu_Edit_Select, _("&Select lines...\t") + Hotkeys.GetText(_T("Select lines")), _("Selects lines based on defined criterea"));
editMenu->Append(Menu_Edit_Shift, _("S&hift times...\t") + Hotkeys.GetText(_T("Shift times")), _("Shift subtitles by time or frames"));
@ -508,7 +509,7 @@ void FrameMain::LoadSubtitles (wxString filename,wxString charset) {
if (Options.AsBool(_T("Auto backup")) && origfile.FileExists()) {
// Get path
wxString path = Options.AsText(_T("Auto backup path"));
if (path == _T("")) path = origfile.GetPath();
if (path.IsEmpty()) path = origfile.GetPath();
wxFileName dstpath(path);
if (!dstpath.IsAbsolute()) path = AegisubApp::folderName + path;
path += _T("/");
@ -536,7 +537,7 @@ bool FrameMain::SaveSubtitles(bool saveas,bool withCharset) {
if (saveas == false && AssFile::top->IsASS) filename = AssFile::top->filename;
// Failed, ask user
if (filename == _T("")) {
if (filename.IsEmpty()) {
videoBox->videoDisplay->Stop();
filename = wxFileSelector(_("Save subtitles file"),_T(""),_T(""),_T(""),_T("Advanced Substation Alpha (*.ass)|*.ass"),wxSAVE | wxOVERWRITE_PROMPT,this);
AssFile::top->filename = filename; //fix me, ghetto hack for correct relative path generation in SynchronizeProject()
@ -552,7 +553,7 @@ bool FrameMain::SaveSubtitles(bool saveas,bool withCharset) {
if (withCharset) {
wxArrayString choices = GetEncodings();
charset = wxGetSingleChoice(_("Choose charset code:"), _T("Charset"),choices,this,-1, -1,true,250,200);
if (charset == _T("")) return false;
if (charset.IsEmpty()) return false;
}
// Save
@ -1073,9 +1074,9 @@ bool FrameMain::LoadList(wxArrayString list) {
wxFileName file(List[i]);
ext = file.GetExt().Lower();
if (subs == _T("") && subsList.Index(ext) != wxNOT_FOUND) subs = List[i];
if (video == _T("") && videoList.Index(ext) != wxNOT_FOUND) video = List[i];
if (audio == _T("") && audioList.Index(ext) != wxNOT_FOUND) audio = List[i];
if (subs.IsEmpty() && subsList.Index(ext) != wxNOT_FOUND) subs = List[i];
if (video.IsEmpty() && videoList.Index(ext) != wxNOT_FOUND) video = List[i];
if (audio.IsEmpty() && audioList.Index(ext) != wxNOT_FOUND) audio = List[i];
}
// Set blocking

View File

@ -167,6 +167,7 @@ private:
void OnViewSubs (wxCommandEvent &event);
void OnUndo (wxCommandEvent &event);
void OnRedo (wxCommandEvent &event);
void OnCut (wxCommandEvent &event);
void OnCopy (wxCommandEvent &event);
void OnPaste (wxCommandEvent &event);
@ -280,6 +281,7 @@ enum {
Menu_Edit_Select,
Menu_Edit_Undo,
Menu_Edit_Redo,
Menu_Edit_Find,
Menu_Edit_Find_Next,
Menu_Edit_Replace,

View File

@ -142,6 +142,7 @@ BEGIN_EVENT_TABLE(FrameMain, wxFrame)
EVT_MENU(Menu_Audio_Close, FrameMain::OnCloseAudio)
EVT_MENU(Menu_Edit_Undo, FrameMain::OnUndo)
EVT_MENU(Menu_Edit_Redo, FrameMain::OnRedo)
EVT_MENU(Menu_Edit_Cut, FrameMain::OnCut)
EVT_MENU(Menu_Edit_Copy, FrameMain::OnCopy)
EVT_MENU(Menu_Edit_Paste, FrameMain::OnPaste)
@ -317,9 +318,9 @@ void FrameMain::OnMenuOpen (wxMenuEvent &event) {
// Edit menu
else if (curMenu == editMenu) {
// Undo state
RebuildMenuItem(editMenu,Menu_Edit_Undo,wxBITMAP(undo_button),wxBITMAP(undo_disable_button),!AssFile::StackEmpty());
RebuildMenuItem(editMenu,Menu_Edit_Undo,wxBITMAP(undo_button),wxBITMAP(undo_disable_button),!AssFile::IsUndoStackEmpty());
RebuildMenuItem(editMenu,Menu_Edit_Redo,wxBITMAP(redo_button),wxBITMAP(redo_disable_button),!AssFile::IsRedoStackEmpty());
// Copy/cut/paste
wxArrayInt sels = SubsBox->GetSelection();
@ -655,7 +656,7 @@ void FrameMain::OnOpenSpellCheck (wxCommandEvent &event) {
wxArrayInt selList = SubsBox->GetSelection();
if (selList.GetCount() == 1){
AssDialogue * a = SubsBox->GetDialogue(selList.Item(0));
if (a->Text == _T("")){
if (a->Text.IsEmpty()){
wxMessageDialog Question(this, _T(
"You've selected a single row with no text. Instead would you like to check the entire document?"),
_T("Single Row Selection"),
@ -877,6 +878,16 @@ void FrameMain::OnUndo(wxCommandEvent& WXUNUSED(event)) {
}
////////
// Redo
void FrameMain::OnRedo(wxCommandEvent& WXUNUSED(event)) {
videoBox->videoDisplay->Stop();
AssFile::StackRedo();
SubsBox->LoadFromAss(AssFile::top,true);
AssFile::Popping = false;
}
////////
// Find
void FrameMain::OnFind(wxCommandEvent &event) {
@ -1001,7 +1012,7 @@ void FrameMain::OnAutoSave(wxTimerEvent &event) {
// Set path
wxFileName origfile(AssFile::top->filename);
wxString path = Options.AsText(_T("Auto save path"));
if (path == _T("")) path = origfile.GetPath();
if (path.IsEmpty()) path = origfile.GetPath();
wxFileName dstpath(path);
if (!dstpath.IsAbsolute()) path = AegisubApp::folderName + path;
path += _T("/");

View File

@ -274,7 +274,7 @@ void HotkeyManager::Load() {
while (file.HasMoreLines()) {
// Parse line
curLine = file.ReadLineFromFile();
if (curLine == _T("")) continue;
if (curLine.IsEmpty()) continue;
size_t pos = curLine.Find(_T("="));
if (pos == wxString::npos) continue;
wxString func = curLine.Left(pos);

View File

@ -248,7 +248,7 @@ void OptionsManager::Load() {
while (file.HasMoreLines()) {
// Parse line
curLine = file.ReadLineFromFile();
if (curLine == _T("")) continue;
if (curLine.IsEmpty()) continue;
size_t pos = curLine.Find(_T("="));
if (pos == wxString::npos) continue;
wxString key = curLine.Left(pos);

View File

@ -65,10 +65,12 @@ copy_button BITMAP "bitmaps/copy.bmp"
paste_button BITMAP "bitmaps/paste.bmp"
cut_button BITMAP "bitmaps/cut.bmp"
undo_button BITMAP "bitmaps/undo.bmp"
redo_button BITMAP "bitmaps/redo.bmp"
copy_disable_button BITMAP "bitmaps/copy_disable.bmp"
paste_disable_button BITMAP "bitmaps/paste_disable.bmp"
cut_disable_button BITMAP "bitmaps/cut_disable.bmp"
undo_disable_button BITMAP "bitmaps/undo_disable.bmp"
redo_disable_button BITMAP "bitmaps/redo_disable.bmp"
irc_button BITMAP "bitmaps/irc.bmp"
find_button BITMAP "bitmaps/find.bmp"
null_button BITMAP "bitmaps/null_button.bmp"

View File

@ -607,7 +607,7 @@ void SubsEditBox::OnActorChange(wxCommandEvent &event) {
}
// Add actor to list
if (ActorBox->GetString(0) == _T("")) ActorBox->Delete(0);
if (ActorBox->GetString(0).IsEmpty()) ActorBox->Delete(0);
if (ActorBox->FindString(actor) == wxNOT_FOUND) {
ActorBox->Append(actor);
}

View File

@ -56,7 +56,7 @@ TextFileReader::TextFileReader(wxString _filename,wxString enc,bool _trim) {
// Set encoding
encoding = enc;
if (encoding == _T("")) encoding = GetEncoding(filename);
if (encoding.IsEmpty()) encoding = GetEncoding(filename);
SetEncodingConfiguration();
}

View File

@ -52,9 +52,9 @@ TextFileWriter::TextFileWriter(wxString _filename,wxString enc) {
// Set encoding
encoding = enc;
if (encoding == _T("Local") || (encoding == _T("") && Options.AsText(_T("Save Charset")).Lower() == _T("local"))) conv = &wxConvLocal;
if (encoding == _T("Local") || (encoding.IsEmpty() && Options.AsText(_T("Save Charset")).Lower() == _T("local"))) conv = &wxConvLocal;
else {
if (encoding == _T("")) encoding = Options.AsText(_T("Save Charset"));
if (encoding.IsEmpty()) encoding = Options.AsText(_T("Save Charset"));
if (encoding == _T("US-ASCII")) encoding = _T("ISO-8859-1");
conv = new wxCSConv(encoding);
customConv = true;

View File

@ -82,7 +82,6 @@ void TimeEdit::OnModified(wxCommandEvent &event) {
SetBackgroundColour(Options.AsColour(_T("Edit Box Need Enter Background")));
}
modified = true;
wxLogMessage(_T("Time modified!"));
// Done
ready = true;

View File

@ -86,7 +86,7 @@ bool Backup(wxString src,wxString dst) {
/////////////////////////////////////
// Make a path relative to reference
wxString MakeRelativePath(wxString _path,wxString reference) {
if (_path == _T("")) return _T("");
if (_path.IsEmpty()) return _T("");
if (_path.Left(1) == _T("?")) return _path;
wxFileName path(_path);
wxFileName refPath(reference);
@ -98,7 +98,7 @@ wxString MakeRelativePath(wxString _path,wxString reference) {
///////////////////////////////////////
// Extract original path from relative
wxString DecodeRelativePath(wxString _path,wxString reference) {
if (_path == _T("")) return _T("");
if (_path.IsEmpty()) return _T("");
if (_path.Left(1) == _T("?")) return _path;
wxFileName path(_path);
wxFileName refPath(reference);

View File

@ -334,7 +334,7 @@ void FrameRate::Load(wxString filename) {
file.getline (buffer,65536);
wxString wxbuffer (buffer,wxConvUTF8);
curline = wxbuffer;
if (curline == _T("")) continue;
if (curline.IsEmpty()) continue;
wxString temp;
// Get start frame

View File

@ -135,7 +135,7 @@ void VideoDisplay::UpdateSize() {
///////////////////////
// Sets video filename
void VideoDisplay::SetVideo(const wxString &filename) {
if (filename == _T("")) {
if (filename.IsEmpty()) {
delete provider;
provider = NULL;
if (VFR_Output.vfr == NULL) VFR_Output.Unload();
@ -718,7 +718,7 @@ wxBitmap VideoDisplay::GetFrame(int n) {
void VideoDisplay::GetScriptSize(int &sw,int &sh) {
// Height
wxString temp = grid->ass->GetScriptInfo(_T("PlayResY"));
if (temp == _T("") || !temp.IsNumber()) {
if (temp.IsEmpty() || !temp.IsNumber()) {
//sh = orig_h;
sh = 384;
}
@ -730,7 +730,7 @@ void VideoDisplay::GetScriptSize(int &sw,int &sh) {
// Width
temp = grid->ass->GetScriptInfo(_T("PlayResX"));
if (temp == _T("") || !temp.IsNumber()) {
if (temp.IsEmpty() || !temp.IsNumber()) {
sw = 288;
}
else {

View File

@ -57,7 +57,7 @@ VideoProvider::VideoProvider(wxString _filename, wxString _subfilename, double _
dar = GetSourceWidth()/(double)GetSourceHeight();
if( _subfilename == _T("") ) SubtitledVideo = RGB32Video;
if( _subfilename.IsEmpty() ) SubtitledVideo = RGB32Video;
else SubtitledVideo = ApplySubtitles(subfilename, RGB32Video);
/*
if( _zoom == 1.0 ) ResizedVideo = SubtitledVideo;