예제 #1
0
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();
}
예제 #2
0
bool ThreadSearch::IsToolbarVisible()
{
    if ( !IsAttached() )
        return false;

    return IsWindowReallyShown(m_pToolbar);
}
예제 #3
0
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();
}
예제 #4
0
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);
}
예제 #5
0
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
}
예제 #9
0
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;
}
예제 #10
0
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);
    }
}
예제 #11
0
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);
            }
        }
    }
}
예제 #12
0
bool DebuggerManager::UpdateDisassembly()
{
    return m_disassemblyDialog && IsWindowReallyShown(m_disassemblyDialog->GetWindow());
}
예제 #13
0
 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);
}
예제 #15
0
void ToDoList::OnUpdateUI(cb_unused wxUpdateUIEvent& event)
{
    Manager::Get()->GetAppFrame()->GetMenuBar()->Check(idViewTodo, IsWindowReallyShown(m_pListLog->GetWindow()));
}
예제 #16
0
void ReopenEditor::OnUpdateUI(wxUpdateUIEvent& /*event*/)
{
    Manager::Get()->GetAppFrame()->GetMenuBar()->Check(idReopenEditorView, IsWindowReallyShown(m_pListLog));
}
예제 #17
0
bool DebuggerManager::UpdateBacktrace()
{
    return m_backtraceDialog && IsWindowReallyShown(m_backtraceDialog->GetWindow());
}
예제 #18
0
bool DebuggerManager::UpdateThreads()
{
    return m_threadsDialog && IsWindowReallyShown(m_threadsDialog->GetWindow());
}
예제 #19
0
bool DebuggerManager::UpdateExamineMemory()
{
    return m_examineMemoryDialog && IsWindowReallyShown(m_examineMemoryDialog->GetWindow());
}
예제 #20
0
bool DebuggerManager::UpdateCPURegisters()
{
    return m_cpuRegistersDialog && IsWindowReallyShown(m_cpuRegistersDialog->GetWindow());
}