Rename FrameMain::SubsBox to SubsGrid for consistency with the rest of Aegisub.

Originally committed to SVN as r4527.
This commit is contained in:
Thomas Goyne 2010-06-16 06:20:33 +00:00
parent 43f3502043
commit faf2e562cd
7 changed files with 92 additions and 92 deletions

View File

@ -83,7 +83,7 @@ DialogDetachedVideo::DialogDetachedVideo(FrameMain *par, const wxSize &initialDi
videoBox = new VideoBox(panel, true);
videoBox->videoDisplay->freeSize = true;
videoBox->videoDisplay->SetClientSize(initialDisplaySize);
videoBox->videoSlider->grid = par->SubsBox;
videoBox->videoSlider->grid = par->SubsGrid;
// Set sizer
wxSizer *mainSizer = new wxBoxSizer(wxVERTICAL);

View File

@ -509,7 +509,7 @@ void FontsCollectorThread::Collect() {
if (oper == 3 && someOk) {
wxMutexGuiEnter();
subs->FlagAsModified(_("font attachment"));
collector->main->SubsBox->CommitChanges();
collector->main->SubsGrid->CommitChanges();
wxMutexGuiLeave();
}
}

View File

@ -196,7 +196,7 @@ bool DialogSpellChecker::FindNext(int startLine,int startPos) {
if (startPos != -1) lastPos = 0;
// Get grid
SubtitlesGrid *grid = ((FrameMain*)GetParent())->SubsBox;
SubtitlesGrid *grid = ((FrameMain*)GetParent())->SubsGrid;
int rows = grid->GetRows();
// Loop through lines
@ -269,7 +269,7 @@ void DialogSpellChecker::SetWord(wxString word) {
for (size_t i=0;i<sugs.Count();i++) suggestList->Append(sugs[i]);
// Show word on the main program interface
SubtitlesGrid *grid = ((FrameMain*)GetParent())->SubsBox;
SubtitlesGrid *grid = ((FrameMain*)GetParent())->SubsGrid;
int line = lastLine % grid->GetRows();
grid->SelectRow(line,false);
grid->MakeCellVisible(line,0);
@ -382,7 +382,7 @@ bool DialogSpellChecker::FindOrDie() {
///
void DialogSpellChecker::Replace() {
// Get dialog
SubtitlesGrid *grid = ((FrameMain*)GetParent())->SubsBox;
SubtitlesGrid *grid = ((FrameMain*)GetParent())->SubsGrid;
AssDialogue *diag = grid->GetDialogue(lastLine % grid->GetRows());
// Replace
@ -436,7 +436,7 @@ void DialogSpellChecker::OnTakeSuggestion(wxCommandEvent &event) {
///
bool DialogSpellChecker::GetFirstMatch() {
// Get selection
SubtitlesGrid *grid = ((FrameMain*)GetParent())->SubsBox;
SubtitlesGrid *grid = ((FrameMain*)GetParent())->SubsGrid;
wxArrayInt sel = grid->GetSelection();
firstLine = (sel.Count()>0) ? sel[0] : 0;
bool hasTypos = FindNext(firstLine,0);

View File

@ -581,15 +581,15 @@ void FrameMain::InitContents() {
// Subtitles area
StartupLog(_T("Create subtitles grid"));
SubsBox = new SubtitlesGrid(this,Panel,-1,wxDefaultPosition,wxSize(600,100),wxWANTS_CHARS | wxSUNKEN_BORDER,_T("Subs grid"));
BottomSizer->Add(SubsBox,1,wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM,0);
SubsGrid = new SubtitlesGrid(this,Panel,-1,wxDefaultPosition,wxSize(600,100),wxWANTS_CHARS | wxSUNKEN_BORDER,_T("Subs grid"));
BottomSizer->Add(SubsGrid,1,wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM,0);
StartupLog(_T("Reset undo stack"));
AssFile::StackReset();
videoBox->videoSlider->grid = SubsBox;
VideoContext::Get()->grid = SubsBox;
videoBox->videoSlider->grid = SubsGrid;
VideoContext::Get()->grid = SubsGrid;
StartupLog(_T("Reset video zoom"));
videoBox->videoDisplay->SetZoom(OPT_GET("Video/Default Zoom")->GetInt() * .125 + .125);
Search.grid = SubsBox;
Search.grid = SubsGrid;
// Audio area
StartupLog(_T("Create audio box"));
@ -599,7 +599,7 @@ void FrameMain::InitContents() {
// Top sizer
StartupLog(_T("Create subtitle editing box"));
EditBox = new SubsEditBox(Panel,SubsBox);
EditBox = new SubsEditBox(Panel,SubsGrid);
EditBox->audio = audioBox->audioDisplay;
StartupLog(_T("Arrange controls in sizers"));
ToolSizer = new wxBoxSizer(wxVERTICAL);
@ -640,7 +640,7 @@ void FrameMain::UpdateToolbar() {
// Collect flags
bool isVideo = VideoContext::Get()->IsLoaded();
HasSelection = true;
int selRows = SubsBox->GetNumberSelection();
int selRows = SubsGrid->GetNumberSelection();
// Update
wxToolBar* toolbar = GetToolBar();
@ -698,17 +698,17 @@ void FrameMain::LoadSubtitles (wxString filename,wxString charset) {
}
// Proceed into loading
SubsBox->Clear();
SubsGrid->Clear();
AssFile::StackReset();
if (isFile) {
AssFile::top->Load(filename,charset);
SubsBox->LoadFromAss(AssFile::top,false,true);
SubsGrid->LoadFromAss(AssFile::top,false,true);
wxFileName fn(filename);
StandardPaths::SetPathValue(_T("?script"),fn.GetPath());
OPT_SET("Path/Last/Subtitles")->SetString(STD_STR(fn.GetPath()));
}
else {
SubsBox->LoadDefault(AssFile::top);
SubsGrid->LoadDefault(AssFile::top);
StandardPaths::SetPathValue(_T("?script"),_T(""));
}
}
@ -1128,8 +1128,8 @@ void FrameMain::LoadVideo(wxString file,bool autoload) {
videoBox->videoDisplay->SetZoom(target_zoom);
// Check that the video size matches the script video size specified
int scriptx = SubsBox->ass->GetScriptInfoAsInt(_T("PlayResX"));
int scripty = SubsBox->ass->GetScriptInfoAsInt(_T("PlayResY"));
int scriptx = SubsGrid->ass->GetScriptInfoAsInt(_T("PlayResX"));
int scripty = SubsGrid->ass->GetScriptInfoAsInt(_T("PlayResY"));
if (scriptx != vidx || scripty != vidy) {
switch (OPT_GET("Video/Check Script Res")->GetInt()) {
case 1:
@ -1139,10 +1139,10 @@ void FrameMain::LoadVideo(wxString file,bool autoload) {
// Fallthrough to case 2
case 2:
// Always change script res
SubsBox->ass->SetScriptInfo(_T("PlayResX"), wxString::Format(_T("%d"), vidx));
SubsBox->ass->SetScriptInfo(_T("PlayResY"), wxString::Format(_T("%d"), vidy));
SubsBox->ass->FlagAsModified(_("Change script resolution"));
SubsBox->CommitChanges();
SubsGrid->ass->SetScriptInfo(_T("PlayResX"), wxString::Format(_T("%d"), vidx));
SubsGrid->ass->SetScriptInfo(_T("PlayResY"), wxString::Format(_T("%d"), vidy));
SubsGrid->ass->FlagAsModified(_("Change script resolution"));
SubsGrid->CommitChanges();
break;
case 0:
default:
@ -1152,7 +1152,7 @@ void FrameMain::LoadVideo(wxString file,bool autoload) {
}
}
SubsBox->CommitChanges(true);
SubsGrid->CommitChanges(true);
SetDisplayMode(1,-1);
EditBox->UpdateFrameTiming();
@ -1192,7 +1192,7 @@ void FrameMain::LoadVFR(wxString filename) {
if (filename != _T("")) {
try {
VFR_Output.Load(filename);
SubsBox->Refresh(false);
SubsGrid->Refresh(false);
}
// Fail
@ -1212,7 +1212,7 @@ void FrameMain::LoadVFR(wxString filename) {
}
}
SubsBox->CommitChanges();
SubsGrid->CommitChanges();
EditBox->UpdateFrameTiming();
}

View File

@ -326,7 +326,7 @@ private:
public:
/// DOCME
SubtitlesGrid *SubsBox;
SubtitlesGrid *SubsGrid;
/// DOCME
SubsEditBox *EditBox;

View File

@ -250,7 +250,7 @@ END_EVENT_TABLE()
/// @brief Redirect grid events to grid
/// @param event
void FrameMain::OnGridEvent (wxCommandEvent &event) {
SubsBox->GetEventHandler()->ProcessEvent(event);
SubsGrid->GetEventHandler()->ProcessEvent(event);
}
/// @brief Rebuild recent list
@ -384,7 +384,7 @@ void FrameMain::OnMenuOpen (wxMenuEvent &event) {
else if (curMenu == subtitlesMenu) {
// Variables
bool continuous;
wxArrayInt sels = SubsBox->GetSelection(&continuous);
wxArrayInt sels = SubsGrid->GetSelection(&continuous);
int count = sels.Count();
bool state,state2;
@ -417,7 +417,7 @@ void FrameMain::OnMenuOpen (wxMenuEvent &event) {
else if (curMenu == timingMenu) {
// Variables
bool continuous;
wxArrayInt sels = SubsBox->GetSelection(&continuous);
wxArrayInt sels = SubsGrid->GetSelection(&continuous);
int count = sels.Count();
// Video related
@ -449,7 +449,7 @@ void FrameMain::OnMenuOpen (wxMenuEvent &event) {
item->Enable(!AssFile::IsRedoStackEmpty());
// Copy/cut/paste
wxArrayInt sels = SubsBox->GetSelection();
wxArrayInt sels = SubsGrid->GetSelection();
bool can_copy = (sels.Count() > 0);
bool can_paste = true;
@ -505,7 +505,7 @@ int FrameMain::AddMacroMenuItems(wxMenu *menu, const std::vector<Automation4::Fe
int id = activeMacroItems.size();;
for (std::vector<Automation4::FeatureMacro*>::const_iterator i = macros.begin(); i != macros.end(); ++i) {
wxMenuItem * m = menu->Append(Menu_Automation_Macro + id, (*i)->GetName(), (*i)->GetDescription());
m->Enable((*i)->Validate(SubsBox->ass, SubsBox->GetAbsoluteSelection(), SubsBox->GetFirstSelRow()));
m->Enable((*i)->Validate(SubsGrid->ass, SubsGrid->GetAbsoluteSelection(), SubsGrid->GetFirstSelRow()));
activeMacroItems.push_back(*i);
id++;
}
@ -916,7 +916,7 @@ void FrameMain::OnJumpTo(wxCommandEvent&) {
/// @brief Open shift dialog
void FrameMain::OnShift(wxCommandEvent&) {
VideoContext::Get()->Stop();
DialogShiftTimes Shift(this,SubsBox);
DialogShiftTimes Shift(this,SubsGrid);
Shift.ShowModal();
}
@ -926,17 +926,17 @@ void FrameMain::OnOpenProperties (wxCommandEvent &) {
DialogProperties Properties(this);
int res = Properties.ShowModal();
if (res) {
SubsBox->CommitChanges();
SubsGrid->CommitChanges();
}
}
/// @brief Open styles manager
void FrameMain::OnOpenStylesManager(wxCommandEvent&) {
VideoContext::Get()->Stop();
DialogStyleManager StyleManager(this,SubsBox);
DialogStyleManager StyleManager(this,SubsGrid);
StyleManager.ShowModal();
EditBox->UpdateGlobals();
SubsBox->CommitChanges();
SubsGrid->CommitChanges();
}
/// @brief Open attachments
@ -949,9 +949,9 @@ void FrameMain::OnOpenAttachments(wxCommandEvent&) {
/// @brief Open translation assistant
void FrameMain::OnOpenTranslation(wxCommandEvent&) {
VideoContext::Get()->Stop();
int start = SubsBox->GetFirstSelRow();
int start = SubsGrid->GetFirstSelRow();
if (start == -1) start = 0;
DialogTranslation Trans(this,AssFile::top,SubsBox,start,true);
DialogTranslation Trans(this,AssFile::top,SubsGrid,start,true);
Trans.ShowModal();
}
@ -971,19 +971,19 @@ void FrameMain::OnOpenFontsCollector (wxCommandEvent &) {
/// @brief Open Resolution Resampler
void FrameMain::OnOpenResample (wxCommandEvent &) {
VideoContext::Get()->Stop();
DialogResample diag(this, SubsBox);
DialogResample diag(this, SubsGrid);
diag.ShowModal();
}
/// @brief Open Timing post-processor dialog
void FrameMain::OnOpenTimingProcessor (wxCommandEvent &) {
DialogTimingProcessor timing(this,SubsBox);
DialogTimingProcessor timing(this,SubsGrid);
timing.ShowModal();
}
/// @brief Open Kanji Timer dialog
void FrameMain::OnOpenKanjiTimer (wxCommandEvent &) {
DialogKanjiTimer kanjitimer(this,SubsBox);
DialogKanjiTimer kanjitimer(this,SubsGrid);
kanjitimer.ShowModal();
}
@ -1044,52 +1044,52 @@ void FrameMain::OnOpenAutomation (wxCommandEvent &) {
/// @param event
void FrameMain::OnAutomationMacro (wxCommandEvent &event) {
#ifdef WITH_AUTOMATION
SubsBox->BeginBatch();
SubsGrid->BeginBatch();
// First get selection data
// This much be done before clearing the maps, since selection data are lost during that
std::vector<int> selected_lines = SubsBox->GetAbsoluteSelection();
int first_sel = SubsBox->GetFirstSelRow();
std::vector<int> selected_lines = SubsGrid->GetAbsoluteSelection();
int first_sel = SubsGrid->GetFirstSelRow();
// Clear all maps from the subs grid before running the macro
// The stuff done by the macro might invalidate some of the iterators held by the grid, which will cause great crashing
SubsBox->Clear();
SubsGrid->Clear();
// Run the macro...
activeMacroItems[event.GetId()-Menu_Automation_Macro]->Process(SubsBox->ass, selected_lines, first_sel, this);
activeMacroItems[event.GetId()-Menu_Automation_Macro]->Process(SubsGrid->ass, selected_lines, first_sel, this);
// Have the grid update its maps, this properly refreshes it to reflect the changed subs
SubsBox->UpdateMaps();
SubsBox->SetSelectionFromAbsolute(selected_lines);
SubsBox->CommitChanges(true, false);
SubsBox->AdjustScrollbar();
SubsBox->EndBatch();
SubsGrid->UpdateMaps();
SubsGrid->SetSelectionFromAbsolute(selected_lines);
SubsGrid->CommitChanges(true, false);
SubsGrid->AdjustScrollbar();
SubsGrid->EndBatch();
#endif
}
/// @brief Snap subs to video
void FrameMain::OnSnapSubsStartToVid (wxCommandEvent &) {
if (VideoContext::Get()->IsLoaded() && SubsBox->GetSelection().Count() > 0) {
SubsBox->SetSubsToVideo(true);
if (VideoContext::Get()->IsLoaded() && SubsGrid->GetSelection().Count() > 0) {
SubsGrid->SetSubsToVideo(true);
}
}
/// @brief DOCME
void FrameMain::OnSnapSubsEndToVid (wxCommandEvent &) {
if (VideoContext::Get()->IsLoaded() && SubsBox->GetSelection().Count() > 0) {
SubsBox->SetSubsToVideo(false);
if (VideoContext::Get()->IsLoaded() && SubsGrid->GetSelection().Count() > 0) {
SubsGrid->SetSubsToVideo(false);
}
}
/// @brief Jump video to subs
void FrameMain::OnSnapVidToSubsStart (wxCommandEvent &) {
if (VideoContext::Get()->IsLoaded() && SubsBox->GetSelection().Count() > 0) {
SubsBox->SetVideoToSubs(true);
if (VideoContext::Get()->IsLoaded() && SubsGrid->GetSelection().Count() > 0) {
SubsGrid->SetVideoToSubs(true);
}
}
/// @brief DOCME
void FrameMain::OnSnapVidToSubsEnd (wxCommandEvent &) {
if (VideoContext::Get()->IsLoaded() && SubsBox->GetSelection().Count() > 0) {
SubsBox->SetVideoToSubs(false);
if (VideoContext::Get()->IsLoaded() && SubsGrid->GetSelection().Count() > 0) {
SubsGrid->SetVideoToSubs(false);
}
}
@ -1097,7 +1097,7 @@ void FrameMain::OnSnapVidToSubsEnd (wxCommandEvent &) {
void FrameMain::OnSnapToScene (wxCommandEvent &) {
if (VideoContext::Get()->IsLoaded()) {
// Get frames
wxArrayInt sel = SubsBox->GetSelection();
wxArrayInt sel = SubsGrid->GetSelection();
int curFrame = VideoContext::Get()->GetFrameN();
int prev = 0;
int next = 0;
@ -1139,33 +1139,33 @@ void FrameMain::OnSnapToScene (wxCommandEvent &) {
// Update rows
for (size_t i=0;i<sel.Count();i++) {
cur = SubsBox->GetDialogue(sel[i]);
cur = SubsGrid->GetDialogue(sel[i]);
cur->Start.SetMS(start_ms);
cur->End.SetMS(end_ms);
}
// Commit
SubsBox->editBox->Update(true);
SubsBox->ass->FlagAsModified(_("snap to scene"));
SubsBox->CommitChanges();
SubsGrid->editBox->Update(true);
SubsGrid->ass->FlagAsModified(_("snap to scene"));
SubsGrid->CommitChanges();
}
}
/// @brief Shift to frame
void FrameMain::OnShiftToFrame (wxCommandEvent &) {
if (VideoContext::Get()->IsLoaded()) {
wxArrayInt sels = SubsBox->GetSelection();
wxArrayInt sels = SubsGrid->GetSelection();
size_t n=sels.Count();
if (n == 0) return;
// Get shifting in ms
AssDialogue *cur = SubsBox->GetDialogue(sels[0]);
AssDialogue *cur = SubsGrid->GetDialogue(sels[0]);
if (!cur) return;
int shiftBy = VFR_Output.GetTimeAtFrame(VideoContext::Get()->GetFrameN(),true) - cur->Start.GetMS();
// Update
for (size_t i=0;i<n;i++) {
cur = SubsBox->GetDialogue(sels[i]);
cur = SubsGrid->GetDialogue(sels[i]);
if (cur) {
cur->Start.SetMS(cur->Start.GetMS()+shiftBy);
cur->End.SetMS(cur->End.GetMS()+shiftBy);
@ -1173,9 +1173,9 @@ void FrameMain::OnShiftToFrame (wxCommandEvent &) {
}
// Commit
SubsBox->ass->FlagAsModified(_("shift to frame"));
SubsBox->CommitChanges();
SubsBox->editBox->Update(true,false);
SubsGrid->ass->FlagAsModified(_("shift to frame"));
SubsGrid->CommitChanges();
SubsGrid->editBox->Update(true,false);
}
}
@ -1183,7 +1183,7 @@ void FrameMain::OnShiftToFrame (wxCommandEvent &) {
void FrameMain::OnUndo(wxCommandEvent&) {
VideoContext::Get()->Stop();
AssFile::StackPop();
SubsBox->LoadFromAss(AssFile::top,true);
SubsGrid->LoadFromAss(AssFile::top,true);
AssFile::Popping = false;
}
@ -1191,7 +1191,7 @@ void FrameMain::OnUndo(wxCommandEvent&) {
void FrameMain::OnRedo(wxCommandEvent&) {
VideoContext::Get()->Stop();
AssFile::StackRedo();
SubsBox->LoadFromAss(AssFile::top,true);
SubsGrid->LoadFromAss(AssFile::top,true);
AssFile::Popping = false;
}
@ -1317,7 +1317,7 @@ void FrameMain::OnCut (wxCommandEvent &) {
EditBox->TextEdit->Cut();
return;
}
SubsBox->CutLines(SubsBox->GetSelection());
SubsGrid->CutLines(SubsGrid->GetSelection());
}
@ -1327,7 +1327,7 @@ void FrameMain::OnCopy (wxCommandEvent &) {
EditBox->TextEdit->Copy();
return;
}
SubsBox->CopyLines(SubsBox->GetSelection());
SubsGrid->CopyLines(SubsGrid->GetSelection());
}
@ -1337,24 +1337,24 @@ void FrameMain::OnPaste (wxCommandEvent &) {
EditBox->TextEdit->Paste();
return;
}
SubsBox->PasteLines(SubsBox->GetFirstSelRow());
SubsGrid->PasteLines(SubsGrid->GetFirstSelRow());
}
/// @brief Paste over
void FrameMain::OnPasteOver (wxCommandEvent &) {
SubsBox->PasteLines(SubsBox->GetFirstSelRow(),true);
SubsGrid->PasteLines(SubsGrid->GetFirstSelRow(),true);
}
/// @brief Select visible lines
void FrameMain::OnSelectVisible (wxCommandEvent &) {
VideoContext::Get()->Stop();
SubsBox->SelectVisible();
SubsGrid->SelectVisible();
}
/// @brief Open select dialog
void FrameMain::OnSelect (wxCommandEvent &) {
VideoContext::Get()->Stop();
DialogSelection select(this, SubsBox);
DialogSelection select(this, SubsGrid);
select.ShowModal();
}
@ -1362,28 +1362,28 @@ void FrameMain::OnSelect (wxCommandEvent &) {
void FrameMain::OnSortStart (wxCommandEvent &) {
AssFile::top->Sort();
AssFile::top->FlagAsModified(_("sort"));
SubsBox->UpdateMaps();
SubsBox->CommitChanges();
SubsGrid->UpdateMaps();
SubsGrid->CommitChanges();
}
/// @brief Sort subtitles by end time
void FrameMain::OnSortEnd (wxCommandEvent &) {
AssFile::top->Sort(AssFile::CompEnd);
AssFile::top->FlagAsModified(_("sort"));
SubsBox->UpdateMaps();
SubsBox->CommitChanges();
SubsGrid->UpdateMaps();
SubsGrid->CommitChanges();
}
/// @brief Sort subtitles by style name
void FrameMain::OnSortStyle (wxCommandEvent &) {
AssFile::top->Sort(AssFile::CompStyle);
AssFile::top->FlagAsModified(_("sort"));
SubsBox->UpdateMaps();
SubsBox->CommitChanges();
SubsGrid->UpdateMaps();
SubsGrid->CommitChanges();
}
/// @brief Open styling assistant
void FrameMain::OnOpenStylingAssistant (wxCommandEvent &) {
VideoContext::Get()->Stop();
if (!stylingAssistant) stylingAssistant = new DialogStyling(this,SubsBox);
if (!stylingAssistant) stylingAssistant = new DialogStyling(this,SubsGrid);
stylingAssistant->Show(true);
}
@ -1461,18 +1461,18 @@ void FrameMain::OnFocusSeek(wxCommandEvent &) {
void FrameMain::OnPrevLine(wxCommandEvent &) {
int next = EditBox->linen-1;
if (next < 0) return;
SubsBox->SelectRow(next);
SubsBox->MakeCellVisible(next,0);
SubsGrid->SelectRow(next);
SubsGrid->MakeCellVisible(next,0);
EditBox->SetToLine(next);
}
/// @brief Next line hotkey
void FrameMain::OnNextLine(wxCommandEvent &) {
int nrows = SubsBox->GetRows();
int nrows = SubsGrid->GetRows();
int next = EditBox->linen+1;
if (next >= nrows) return;
SubsBox->SelectRow(next);
SubsBox->MakeCellVisible(next,0);
SubsGrid->SelectRow(next);
SubsGrid->MakeCellVisible(next,0);
EditBox->SetToLine(next);
}
@ -1494,11 +1494,11 @@ void FrameMain::OnToggleTags(wxCommandEvent &) {
OPT_SET("Subtitle/Grid/Hide Overrides")->SetInt(tagMode);
// Refresh grid
SubsBox->Refresh(false);
SubsGrid->Refresh(false);
}
void FrameMain::OnSetTags(wxCommandEvent &event) {
OPT_SET("Subtitle/Grid/Hide Overrides")->SetInt(event.GetId() - Menu_View_FullTags);
SubsBox->Refresh(false);
SubsGrid->Refresh(false);
}
/// @brief Commit Edit Box's changes

View File

@ -506,7 +506,7 @@ END_EVENT_TABLE()
void AegisubApp::OnMouseWheel(wxMouseEvent &event) {
wxPoint pt;
wxWindow *target = wxFindWindowAtPointer(pt);
if (frame && (target == frame->audioBox->audioDisplay || target == frame->SubsBox)) {
if (frame && (target == frame->audioBox->audioDisplay || target == frame->SubsGrid)) {
if (target->IsShownOnScreen()) target->GetEventHandler()->ProcessEvent(event);
else event.Skip();
}