void cbAuiNotebook::MinimizeFreeSpace(wxAuiTabCtrl* tabCtrl) { if (!tabCtrl || tabCtrl->GetPageCount() < 2 || !IsWindowReallyShown(this)) return; int ctrl_idx = tabCtrl->GetActivePage(); wxWindow* win = GetPage(ctrl_idx); if (win) { int tabOffset = tabCtrl->GetTabOffset(); wxClientDC dc(win); size_t lastTabIdx = tabCtrl->GetPageCount() - 1; if (!tabCtrl->IsTabVisible(ctrl_idx, tabOffset, & dc, win)) { for (int i = lastTabIdx ; i >= 0; --i) { if (tabCtrl->IsTabVisible(ctrl_idx, i, & dc, win)) { tabOffset = i; break; } } } while (tabOffset > 0 && tabCtrl->IsTabVisible(lastTabIdx, tabOffset-1, & dc, win)) --tabOffset; tabCtrl->SetTabOffset(tabOffset); } tabCtrl->Refresh(); }
bool ThreadSearch::IsToolbarVisible() { if ( !IsAttached() ) return false; return IsWindowReallyShown(m_pToolbar); }
void ToolsPlus::OnUpdateUI(wxUpdateUIEvent& event) { m_ToolMenu->Check(ID_ToolMenu_ShowConsole,IsWindowReallyShown(m_shellmgr)); // allow other UpdateUI handlers to process this event // *very* important! don't forget it... event.Skip(); }
void HelpPlugin::OnUpdateUI(wxUpdateUIEvent& event) { wxMenuBar* pbar = Manager::Get()->GetAppFrame()->GetMenuBar(); // uncheck checkbox if window was closed if(m_manFrame && !IsWindowReallyShown(m_manFrame)) pbar->Check(idViewMANViewer, false); }
void IncrementalSearch::DoFocusToolbar() { if (!IsWindowReallyShown(m_pToolbar)) { CodeBlocksDockEvent evt(cbEVT_SHOW_DOCK_WINDOW); evt.pWindow = (wxWindow*)m_pToolbar; Manager::Get()->ProcessEvent(evt); } m_pTextCtrl->SetFocus(); }
void OpenFilesListPlugin::OnUpdateUI(wxUpdateUIEvent& event) { if (m_ViewMenu) { bool isVis = IsWindowReallyShown((wxWindow*)m_pTree); m_ViewMenu->Check(idViewOpenFilesTree, isVis); } // must do... event.Skip(); }
void OccurrencesHighlighting::OnUpdateViewMenu(wxUpdateUIEvent &event) { if (m_pViewMenu) { bool isVis = IsWindowReallyShown((wxWindow*)m_pPanel); m_pViewMenu->Check(idViewOccurencesPanel, isVis); //event.Check(isVis); } // must do... event.Skip(); }
void PythonInterpreter::OnUpdateUI(wxUpdateUIEvent& event) { #ifndef TOOLSPLUSLINK if(m_ViewMenu) { m_ViewMenu->Check(ID_INTERP_WINDOW_TOGGLE,IsWindowReallyShown(m_shellmgr)); // allow other UpdateUI handlers to process this event // *very* important! don't forget it... event.Skip(); } #endif // TOOLSPLUSLINK }
bool DebuggerManager::ShowBacktraceDialog() { cbBacktraceDlg *dialog = GetBacktraceDialog(); if (!IsWindowReallyShown(dialog->GetWindow())) { // show the backtrace window CodeBlocksDockEvent evt(cbEVT_SHOW_DOCK_WINDOW); evt.pWindow = dialog->GetWindow(); Manager::Get()->ProcessEvent(evt); return true; } else return false; }
void ThreadSearch::ShowToolBar(bool show) { if ( !IsAttached() ) return; bool isShown = IsWindowReallyShown(m_pToolbar); if ( show != isShown ) { CodeBlocksDockEvent evt(show ? cbEVT_SHOW_DOCK_WINDOW : cbEVT_HIDE_DOCK_WINDOW); evt.pWindow = (wxWindow*)m_pToolbar; evt.shown = show; Manager::Get()->ProcessEvent(evt); } }
void DebuggerMenuHandler::OnAddWatch(cb_unused wxCommandEvent& event) { if (!m_activeDebugger) return; wxString const &src = m_activeDebugger->GetEditorWordAtCaret(); if (!src.empty()) { cb::shared_ptr<cbWatch> watch = m_activeDebugger->AddWatch(src); if (watch.get()) { cbWatchesDlg *dialog = Manager::Get()->GetDebuggerManager()->GetWatchesDialog(); dialog->AddWatch(watch); if (!IsWindowReallyShown(dialog->GetWindow())) { CodeBlocksDockEvent evt(cbEVT_SHOW_DOCK_WINDOW); evt.pWindow = dialog->GetWindow(); Manager::Get()->ProcessEvent(evt); } } } }
bool DebuggerManager::UpdateDisassembly() { return m_disassemblyDialog && IsWindowReallyShown(m_disassemblyDialog->GetWindow()); }
virtual bool IsChecked() { cbBreakpointsDlg *dialog = Manager::Get()->GetDebuggerManager()->GetBreakpointDialog(); return dialog && IsWindowReallyShown(dialog->GetWindow()); }
bool ThreadSearchViewManagerLayout::IsViewShown() { // m_IsShown is not sufficient because user can close the view with the close cross // so we use IsWindowReallyShown to give correct result. return m_IsShown && IsWindowReallyShown((wxWindow*)m_pThreadSearchView); }
void ToDoList::OnUpdateUI(cb_unused wxUpdateUIEvent& event) { Manager::Get()->GetAppFrame()->GetMenuBar()->Check(idViewTodo, IsWindowReallyShown(m_pListLog->GetWindow())); }
void ReopenEditor::OnUpdateUI(wxUpdateUIEvent& /*event*/) { Manager::Get()->GetAppFrame()->GetMenuBar()->Check(idReopenEditorView, IsWindowReallyShown(m_pListLog)); }
bool DebuggerManager::UpdateBacktrace() { return m_backtraceDialog && IsWindowReallyShown(m_backtraceDialog->GetWindow()); }
bool DebuggerManager::UpdateThreads() { return m_threadsDialog && IsWindowReallyShown(m_threadsDialog->GetWindow()); }
bool DebuggerManager::UpdateExamineMemory() { return m_examineMemoryDialog && IsWindowReallyShown(m_examineMemoryDialog->GetWindow()); }
bool DebuggerManager::UpdateCPURegisters() { return m_cpuRegistersDialog && IsWindowReallyShown(m_cpuRegistersDialog->GetWindow()); }