Пример #1
0
MainFrameBaseClass::~MainFrameBaseClass()
{
    this->Disconnect(wxEVT_IDLE, wxIdleEventHandler(MainFrameBaseClass::OnIdle), NULL, this);
    this->Disconnect(wxID_CLEAR, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnClearView), NULL, this);
    this->Disconnect(wxID_CLEAR, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBaseClass::OnClearViewUI), NULL, this);
    this->Disconnect(ID_KILL_INFIRIOR, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnTerminateInfirior), NULL, this);
    this->Disconnect(ID_KILL_INFIRIOR, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBaseClass::OnSignalInferiorUI), NULL, this);
    this->Disconnect(ID_KILL_INFIRIOR, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(MainFrameBaseClass::OnSignalinferior), NULL, this);
    this->Disconnect(ID_SETTINGS, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnSettings), NULL, this);
    this->Disconnect(wxID_SAVE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnSaveContent), NULL, this);
    this->Disconnect(wxID_SAVE, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBaseClass::OnSaveContentUI), NULL, this);
    m_stc->Disconnect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainFrameBaseClass::OnKeyDown), NULL, this);
    m_stc->Disconnect(wxEVT_STC_UPDATEUI, wxStyledTextEventHandler(MainFrameBaseClass::OnStcUpdateUI), NULL, this);
    this->Disconnect(m_menuItem7->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnExit), NULL, this);
    this->Disconnect(m_menuItem9->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnAbout), NULL, this);
    m_timerMarker->Disconnect(wxEVT_TIMER, wxTimerEventHandler(MainFrameBaseClass::OnAddMarker), NULL, this);
    
    std::map<int, wxMenu*>::iterator menuIter = m_dropdownMenus.begin();
    for( ; menuIter != m_dropdownMenus.end(); ++menuIter ) {
        wxDELETE( menuIter->second );
    }
    m_dropdownMenus.clear();

    m_timerMarker->Stop();
    wxDELETE( m_timerMarker );

    this->Disconnect(wxID_ANY, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(MainFrameBaseClass::ShowAuiToolMenu), NULL, this);
}
Пример #2
0
SFTPTreeViewBase::~SFTPTreeViewBase()
{
    this->Disconnect(ID_OPEN_ACCOUNT_MANAGER, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SFTPTreeViewBase::OnOpenAccountManager), NULL, this);
    this->Disconnect(ID_SFTP_CONNECT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SFTPTreeViewBase::OnConnection), NULL, this);
    this->Disconnect(ID_ADD_BOOKMARK, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(SFTPTreeViewBase::OnAddBookmark), NULL, this);
    this->Disconnect(ID_ADD_BOOKMARK, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPTreeViewBase::OnAddBookmarkUI), NULL, this);
    this->Disconnect(ID_SSH_OPEN_TERMINAL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SFTPTreeViewBase::OnOpenTerminal), NULL, this);
    this->Disconnect(ID_SSH_OPEN_TERMINAL, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPTreeViewBase::OnOpenTerminalUI), NULL, this);
    m_choiceAccount->Disconnect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(SFTPTreeViewBase::OnChoiceAccount), NULL, this);
    m_choiceAccount->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPTreeViewBase::OnChoiceAccountUI), NULL, this);
    m_staticText49->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPTreeViewBase::OnGotoLocationUI), NULL, this);
    m_textCtrlQuickJump->Disconnect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(SFTPTreeViewBase::OnGotoLocation), NULL, this);
    m_textCtrlQuickJump->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPTreeViewBase::OnGotoLocationUI), NULL, this);
    m_treeListCtrl->Disconnect(wxEVT_TREELIST_ITEM_EXPANDING, wxTreeListEventHandler(SFTPTreeViewBase::OnItemExpanding), NULL, this);
    m_treeListCtrl->Disconnect(wxEVT_TREELIST_ITEM_ACTIVATED, wxTreeListEventHandler(SFTPTreeViewBase::OnItemActivated), NULL, this);
    m_treeListCtrl->Disconnect(wxEVT_TREELIST_ITEM_CONTEXT_MENU, wxTreeListEventHandler(SFTPTreeViewBase::OnContextMenu), NULL, this);
    m_treeListCtrl->Disconnect(wxEVT_TREELIST_SELECTION_CHANGED, wxTreeListEventHandler(SFTPTreeViewBase::OnSelectionChanged), NULL, this);
    
    std::map<int, wxMenu*>::iterator menuIter = m_dropdownMenus.begin();
    for( ; menuIter != m_dropdownMenus.end(); ++menuIter ) {
        wxDELETE( menuIter->second );
    }
    m_dropdownMenus.clear();

    this->Disconnect(wxID_ANY, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(SFTPTreeViewBase::ShowAuiToolMenu), NULL, this);
}
TailPanelBase::~TailPanelBase()
{
    this->Disconnect(ID_TAIL_OPEN, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(TailPanelBase::OnOpen), NULL, this);
    this->Disconnect(ID_TAIL_CLOSE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(TailPanelBase::OnClose), NULL, this);
    this->Disconnect(ID_TAIL_CLOSE, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TailPanelBase::OnCloseUI), NULL, this);
    this->Disconnect(ID_TAIL_CLEAR, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(TailPanelBase::OnClear), NULL, this);
    this->Disconnect(ID_TAIL_CLEAR, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TailPanelBase::OnClearUI), NULL, this);
    this->Disconnect(ID_TAIL_PAUSE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(TailPanelBase::OnPause), NULL, this);
    this->Disconnect(ID_TAIL_PAUSE, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TailPanelBase::OnPauseUI), NULL, this);
    this->Disconnect(ID_TAIL_PLAY, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(TailPanelBase::OnPlay), NULL, this);
    this->Disconnect(ID_TAIL_PLAY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TailPanelBase::OnPlayUI), NULL, this);
    this->Disconnect(ID_TAIL_DETACH, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(TailPanelBase::OnDetachWindow), NULL, this);
    this->Disconnect(ID_TAIL_DETACH, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TailPanelBase::OnDetachWindowUI), NULL, this);
    
    std::map<int, wxMenu*>::iterator menuIter = m_dropdownMenus.begin();
    for( ; menuIter != m_dropdownMenus.end(); ++menuIter ) {
        wxDELETE( menuIter->second );
    }
    m_dropdownMenus.clear();

    this->Disconnect(wxID_ANY, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(TailPanelBase::ShowAuiToolMenu), NULL, this);
}
Пример #4
0
DiffSideBySidePanelBase::~DiffSideBySidePanelBase()
{
    this->Disconnect(ID_DIFF_TOOL_REFRESH, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(DiffSideBySidePanelBase::OnRefreshDiff), NULL, this);
    this->Disconnect(ID_DIFF_TOOL_REFRESH, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnRefreshDiffUI), NULL, this);
    this->Disconnect(ID_DIFF_TOOL_SAVE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(DiffSideBySidePanelBase::OnSaveChanges), NULL, this);
    this->Disconnect(ID_DIFF_TOOL_SAVE, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnSaveChangesUI), NULL, this);
    this->Disconnect(ID_DIFF_TOOL_NEXT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(DiffSideBySidePanelBase::OnNextDiffSequence), NULL, this);
    this->Disconnect(ID_DIFF_TOOL_NEXT, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnNextDiffUI), NULL, this);
    this->Disconnect(ID_DIFF_TOOL_PREV, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(DiffSideBySidePanelBase::OnPrevDiffSequence), NULL, this);
    this->Disconnect(ID_DIFF_TOOL_PREV, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnPrevDiffUI), NULL, this);
    this->Disconnect(ID_DIFF_TOOL_COPY_RIGHT, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnCopyLeftToRightUI), NULL, this);
    this->Disconnect(ID_DIFF_TOOL_COPY_RIGHT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(DiffSideBySidePanelBase::OnCopyLeftToRight), NULL, this);
    this->Disconnect(ID_DIFF_TOOL_COPY_LEFT, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnCopyRightToLeftUI), NULL, this);
    this->Disconnect(ID_DIFF_TOOL_COPY_LEFT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(DiffSideBySidePanelBase::OnCopyRightToLeft), NULL, this);
    this->Disconnect(m_menuItem271->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(DiffSideBySidePanelBase::OnCopyFileLeftToRight), NULL, this);
    this->Disconnect(m_menuItem271->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnCopyLeftToRightUI), NULL, this);
    this->Disconnect(m_menuItem273->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnCopyRightToLeftUI), NULL, this);
    this->Disconnect(m_menuItem273->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(DiffSideBySidePanelBase::OnCopyFileFromRight), NULL, this);
    this->Disconnect(m_singleView->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(DiffSideBySidePanelBase::OnSingleView), NULL, this);
    this->Disconnect(m_singleView->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnSingleUI), NULL, this);
    this->Disconnect(m_vView->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnVerticalUI), NULL, this);
    this->Disconnect(m_vView->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(DiffSideBySidePanelBase::OnVertical), NULL, this);
    this->Disconnect(m_hView->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(DiffSideBySidePanelBase::OnHorizontal), NULL, this);
    this->Disconnect(m_hView->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnHorizontalUI), NULL, this);
    m_textCtrlLeftFile->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnLeftPickerUI), NULL, this);
    m_button290->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnLeftPickerUI), NULL, this);
    m_button290->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DiffSideBySidePanelBase::OnBrowseLeftFile), NULL, this);
    m_stcLeft->Disconnect(wxEVT_STC_PAINTED, wxStyledTextEventHandler(DiffSideBySidePanelBase::OnLeftStcPainted), NULL, this);
    m_stcLeft->Disconnect(wxEVT_MOUSEWHEEL, wxMouseEventHandler(DiffSideBySidePanelBase::OnMouseWheel), NULL, this);
    m_textCtrlRightFile->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnRightPickerUI), NULL, this);
    m_button294->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnRightPickerUI), NULL, this);
    m_button294->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DiffSideBySidePanelBase::OnBrowseRightFile), NULL, this);
    m_stcRight->Disconnect(wxEVT_STC_PAINTED, wxStyledTextEventHandler(DiffSideBySidePanelBase::OnRightStcPainted), NULL, this);
    m_stcRight->Disconnect(wxEVT_MOUSEWHEEL, wxMouseEventHandler(DiffSideBySidePanelBase::OnMouseWheel), NULL, this);
    
    std::map<int, wxMenu*>::iterator menuIter = m_dropdownMenus.begin();
    for( ; menuIter != m_dropdownMenus.end(); ++menuIter ) {
        wxDELETE( menuIter->second );
    }
    m_dropdownMenus.clear();

    this->Disconnect(wxID_ANY, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(DiffSideBySidePanelBase::ShowAuiToolMenu), NULL, this);
}
Пример #5
0
GitConsole::~GitConsole()
{
    clConfig conf("git.conf");
    GitEntry data;
    conf.ReadItem(&data);
    data.SetGitConsoleSashPos(m_splitter->GetSashPosition());
    conf.WriteItem(&data);

    wxDELETE(m_bitmapLoader);
    EventNotifier::Get()->Disconnect(
        wxEVT_GIT_CONFIG_CHANGED, wxCommandEventHandler(GitConsole::OnConfigurationChanged), NULL, this);
    EventNotifier::Get()->Disconnect(
        wxEVT_WORKSPACE_CLOSED, wxCommandEventHandler(GitConsole::OnWorkspaceClosed), NULL, this);
    EventNotifier::Get()->Disconnect(
        wxEVT_CL_THEME_CHANGED, wxCommandEventHandler(GitConsole::OnEditorThemeChanged), NULL, this);

    Unbind(wxEVT_AUITOOLBAR_TOOL_DROPDOWN,
           wxAuiToolBarEventHandler(GitConsole::OnGitPullDropdown),
           this,
           XRCID("git_pull"));
}
Пример #6
0
DiffSideBySidePanelBase::DiffSideBySidePanelBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
    : wxPanel(parent, id, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxC9D6CInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* boxSizer13 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer13);
    
    m_auibar242 = new wxAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxAUI_TB_PLAIN_BACKGROUND|wxAUI_TB_DEFAULT_STYLE);
    m_auibar242->SetToolBitmapSize(wxSize(16,16));
    
    boxSizer13->Add(m_auibar242, 0, wxEXPAND, 5);
    
    m_auibar242->AddTool(ID_DIFF_TOOL_REFRESH, _("Refresh"), wxXmlResource::Get()->LoadBitmap(wxT("16-debugger_restart")), wxNullBitmap, wxITEM_NORMAL, _("Refresh"), _("Refresh"), NULL);
    
    m_auibar242->AddTool(ID_DIFF_TOOL_SAVE, _("Save"), wxXmlResource::Get()->LoadBitmap(wxT("16-file_save")), wxNullBitmap, wxITEM_NORMAL, _("Save"), _("Save"), NULL);
    
    m_auibar242->AddSeparator();
    
    m_auibar242->AddTool(ID_DIFF_TOOL_NEXT, _("Next Diff"), wxXmlResource::Get()->LoadBitmap(wxT("16-next")), wxNullBitmap, wxITEM_NORMAL, _("Next Diff"), _("Next Diff"), NULL);
    
    m_auibar242->AddTool(ID_DIFF_TOOL_PREV, _("Previous"), wxXmlResource::Get()->LoadBitmap(wxT("16-up")), wxNullBitmap, wxITEM_NORMAL, _("Previous Diff"), _("Previous Diff"), NULL);
    
    m_auibar242->AddSeparator();
    
    m_auibar242->AddTool(ID_DIFF_TOOL_COPY_RIGHT, _("Copy Right"), wxXmlResource::Get()->LoadBitmap(wxT("16-forward")), wxNullBitmap, wxITEM_NORMAL, _("Copy Right"), _("Copy Right"), NULL);
    
    m_auibar242->AddTool(ID_DIFF_TOOL_COPY_LEFT, _("Copy Left"), wxXmlResource::Get()->LoadBitmap(wxT("16-back")), wxNullBitmap, wxITEM_NORMAL, _("Copy Left"), _("Copy Left"), NULL);
    
    m_auibar242->AddTool(ID_DIFF_TOOL_COPY_ALL, _("CopyAll"), wxXmlResource::Get()->LoadBitmap(wxT("16-copy")), wxNullBitmap, wxITEM_NORMAL, wxT(""), wxT(""), NULL);
    wxAuiToolBarItem* m_toolCopy = m_auibar242->FindToolByIndex(m_auibar242->GetToolCount()-1);
    if (m_toolCopy) {
        m_toolCopy->SetHasDropDown(true);
        m_menu257 = new wxMenu;
        m_menuItem271 = new wxMenuItem(m_menu257, ID_DIFF_TOOL_USE_LEFT, _("Copy All Content from Left to Right"), _("Copy All Content from Left to Right"), wxITEM_NORMAL);
        m_menuItem271->SetBitmap(wxXmlResource::Get()->LoadBitmap(wxT("16-forward")));
        m_menu257->Append(m_menuItem271);
        m_menuItem273 = new wxMenuItem(m_menu257, ID_DIFF_TOOL_USE_RIGHT, _("Copy All Content from Right to Left"), _("Copy All Content from Right to Left"), wxITEM_NORMAL);
        m_menuItem273->SetBitmap(wxXmlResource::Get()->LoadBitmap(wxT("16-back")));
        m_menu257->Append(m_menuItem273);
        
        m_dropdownMenus.insert(std::make_pair( m_toolCopy->GetId(), m_menu257) );
    }
    
    m_auibar242->AddSeparator();
    
    m_auibar242->AddTool(ID_DIFF_TOOL_VIEW, _("View Type"), wxXmlResource::Get()->LoadBitmap(wxT("16-find")), wxNullBitmap, wxITEM_NORMAL, _("View Type"), _("View Type"), NULL);
    wxAuiToolBarItem* m_toolbarItem277 = m_auibar242->FindToolByIndex(m_auibar242->GetToolCount()-1);
    if (m_toolbarItem277) {
        m_toolbarItem277->SetHasDropDown(true);
        m_menu278 = new wxMenu;
        m_singleView = new wxMenuItem(m_menu278, ID_DIFF_TOOL_VIEW_SINGLE, _("Single View"), _("Single View"), wxITEM_RADIO);
        m_menu278->Append(m_singleView);
        m_vView = new wxMenuItem(m_menu278, ID_DIFF_VERTICAL_VIEW, _("Vertical View"), _("Vertical View"), wxITEM_RADIO);
        m_menu278->Append(m_vView);
        m_hView = new wxMenuItem(m_menu278, ID_DIFF_TOOL_VIEW_HORIZONTAL, _("Horizontal View"), _("Horizontal View"), wxITEM_RADIO);
        m_menu278->Append(m_hView);
        
        m_dropdownMenus.insert(std::make_pair( m_toolbarItem277->GetId(), m_menu278) );
    }
    m_auibar242->Realize();
    
    m_splitter = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxSP_LIVE_UPDATE|wxSP_PERMIT_UNSPLIT|wxSP_3DSASH);
    m_splitter->SetSashGravity(0.5);
    m_splitter->SetMinimumPaneSize(10);
    
    boxSizer13->Add(m_splitter, 1, wxALL|wxEXPAND, 2);
    
    m_splitterPageLeft = new wxPanel(m_splitter, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    
    wxBoxSizer* boxSizer111 = new wxBoxSizer(wxVERTICAL);
    m_splitterPageLeft->SetSizer(boxSizer111);
    
    wxBoxSizer* boxSizer285 = new wxBoxSizer(wxHORIZONTAL);
    
    boxSizer111->Add(boxSizer285, 0, wxEXPAND, 2);
    
    m_textCtrlLeftFile = new wxTextCtrl(m_splitterPageLeft, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
    m_textCtrlLeftFile->SetFocus();
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlLeftFile->SetHint(wxT(""));
    #endif
    m_textCtrlLeftFile->AutoCompleteFileNames();
    
    boxSizer285->Add(m_textCtrlLeftFile, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_button290 = new wxButton(m_splitterPageLeft, wxID_ANY, _("..."), wxDefaultPosition, wxSize(-1,-1), wxBU_EXACTFIT);
    m_button290->SetToolTip(_("Choose a file"));
    
    boxSizer285->Add(m_button290, 0, wxALIGN_CENTER_VERTICAL, 5);
    
    m_staticTextLeft = new wxStaticText(m_splitterPageLeft, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(100,-1), wxALIGN_CENTRE|wxBORDER_THEME);
    
    boxSizer285->Add(m_staticTextLeft, 0, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 2);
    
    m_stcLeft = new wxStyledTextCtrl(m_splitterPageLeft, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), 0);
    // Configure the fold margin
    m_stcLeft->SetMarginType     (4, wxSTC_MARGIN_SYMBOL);
    m_stcLeft->SetMarginMask     (4, wxSTC_MASK_FOLDERS);
    m_stcLeft->SetMarginSensitive(4, true);
    m_stcLeft->SetMarginWidth    (4, 0);
    
    // Configure the tracker margin
    m_stcLeft->SetMarginWidth(1, 0);
    
    // Configure the symbol margin
    m_stcLeft->SetMarginType (2, wxSTC_MARGIN_SYMBOL);
    m_stcLeft->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS));
    m_stcLeft->SetMarginWidth(2, 16);
    m_stcLeft->SetMarginSensitive(2, true);
    
    // Configure the line numbers margin
    m_stcLeft->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_stcLeft->SetMarginWidth(0,0);
    
    // Configure the line symbol margin
    m_stcLeft->SetMarginType(3, wxSTC_MARGIN_FORE);
    m_stcLeft->SetMarginMask(3, 0);
    m_stcLeft->SetMarginWidth(3,0);
    // Select the lexer
    m_stcLeft->SetLexer(wxSTC_LEX_NULL);
    // Set default font / styles
    m_stcLeft->StyleClearAll();
    m_stcLeft->SetWrapMode(0);
    m_stcLeft->SetIndentationGuides(0);
    m_stcLeft->SetKeyWords(0, wxT(""));
    m_stcLeft->SetKeyWords(1, wxT(""));
    m_stcLeft->SetKeyWords(2, wxT(""));
    m_stcLeft->SetKeyWords(3, wxT(""));
    m_stcLeft->SetKeyWords(4, wxT(""));
    
    boxSizer111->Add(m_stcLeft, 1, wxALL|wxEXPAND, 2);
    
    m_splitterPageRight = new wxPanel(m_splitter, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_splitter->SplitVertically(m_splitterPageLeft, m_splitterPageRight, 0);
    
    wxBoxSizer* boxSizer113 = new wxBoxSizer(wxVERTICAL);
    m_splitterPageRight->SetSizer(boxSizer113);
    
    wxBoxSizer* boxSizer286 = new wxBoxSizer(wxHORIZONTAL);
    
    boxSizer113->Add(boxSizer286, 0, wxEXPAND, 2);
    
    m_textCtrlRightFile = new wxTextCtrl(m_splitterPageRight, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlRightFile->SetHint(wxT(""));
    #endif
    m_textCtrlRightFile->AutoCompleteFileNames();
    
    boxSizer286->Add(m_textCtrlRightFile, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_button294 = new wxButton(m_splitterPageRight, wxID_ANY, _("..."), wxDefaultPosition, wxSize(-1,-1), wxBU_EXACTFIT);
    
    boxSizer286->Add(m_button294, 0, wxALIGN_CENTER_VERTICAL, 5);
    
    m_staticTextRight = new wxStaticText(m_splitterPageRight, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(100,-1), wxALIGN_CENTRE|wxBORDER_THEME);
    
    boxSizer286->Add(m_staticTextRight, 0, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 2);
    
    m_stcRight = new wxStyledTextCtrl(m_splitterPageRight, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), 0);
    // Configure the fold margin
    m_stcRight->SetMarginType     (4, wxSTC_MARGIN_SYMBOL);
    m_stcRight->SetMarginMask     (4, wxSTC_MASK_FOLDERS);
    m_stcRight->SetMarginSensitive(4, true);
    m_stcRight->SetMarginWidth    (4, 0);
    
    // Configure the tracker margin
    m_stcRight->SetMarginWidth(1, 0);
    
    // Configure the symbol margin
    m_stcRight->SetMarginType (2, wxSTC_MARGIN_SYMBOL);
    m_stcRight->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS));
    m_stcRight->SetMarginWidth(2, 16);
    m_stcRight->SetMarginSensitive(2, true);
    
    // Configure the line numbers margin
    m_stcRight->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_stcRight->SetMarginWidth(0,0);
    
    // Configure the line symbol margin
    m_stcRight->SetMarginType(3, wxSTC_MARGIN_FORE);
    m_stcRight->SetMarginMask(3, 0);
    m_stcRight->SetMarginWidth(3,0);
    // Select the lexer
    m_stcRight->SetLexer(wxSTC_LEX_NULL);
    // Set default font / styles
    m_stcRight->StyleClearAll();
    m_stcRight->SetWrapMode(0);
    m_stcRight->SetIndentationGuides(0);
    m_stcRight->SetKeyWords(0, wxT(""));
    m_stcRight->SetKeyWords(1, wxT(""));
    m_stcRight->SetKeyWords(2, wxT(""));
    m_stcRight->SetKeyWords(3, wxT(""));
    m_stcRight->SetKeyWords(4, wxT(""));
    
    boxSizer113->Add(m_stcRight, 1, wxALL|wxEXPAND, 2);
    
    SetName(wxT("DiffSideBySidePanelBase"));
    SetSize(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    // Connect events
    this->Connect(ID_DIFF_TOOL_REFRESH, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(DiffSideBySidePanelBase::OnRefreshDiff), NULL, this);
    this->Connect(ID_DIFF_TOOL_REFRESH, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnRefreshDiffUI), NULL, this);
    this->Connect(ID_DIFF_TOOL_SAVE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(DiffSideBySidePanelBase::OnSaveChanges), NULL, this);
    this->Connect(ID_DIFF_TOOL_SAVE, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnSaveChangesUI), NULL, this);
    this->Connect(ID_DIFF_TOOL_NEXT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(DiffSideBySidePanelBase::OnNextDiffSequence), NULL, this);
    this->Connect(ID_DIFF_TOOL_NEXT, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnNextDiffUI), NULL, this);
    this->Connect(ID_DIFF_TOOL_PREV, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(DiffSideBySidePanelBase::OnPrevDiffSequence), NULL, this);
    this->Connect(ID_DIFF_TOOL_PREV, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnPrevDiffUI), NULL, this);
    this->Connect(ID_DIFF_TOOL_COPY_RIGHT, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnCopyLeftToRightUI), NULL, this);
    this->Connect(ID_DIFF_TOOL_COPY_RIGHT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(DiffSideBySidePanelBase::OnCopyLeftToRight), NULL, this);
    this->Connect(ID_DIFF_TOOL_COPY_LEFT, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnCopyRightToLeftUI), NULL, this);
    this->Connect(ID_DIFF_TOOL_COPY_LEFT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(DiffSideBySidePanelBase::OnCopyRightToLeft), NULL, this);
    this->Connect(m_menuItem271->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(DiffSideBySidePanelBase::OnCopyFileLeftToRight), NULL, this);
    this->Connect(m_menuItem271->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnCopyLeftToRightUI), NULL, this);
    this->Connect(m_menuItem273->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnCopyRightToLeftUI), NULL, this);
    this->Connect(m_menuItem273->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(DiffSideBySidePanelBase::OnCopyFileFromRight), NULL, this);
    this->Connect(m_singleView->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(DiffSideBySidePanelBase::OnSingleView), NULL, this);
    this->Connect(m_singleView->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnSingleUI), NULL, this);
    this->Connect(m_vView->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnVerticalUI), NULL, this);
    this->Connect(m_vView->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(DiffSideBySidePanelBase::OnVertical), NULL, this);
    this->Connect(m_hView->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(DiffSideBySidePanelBase::OnHorizontal), NULL, this);
    this->Connect(m_hView->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnHorizontalUI), NULL, this);
    m_textCtrlLeftFile->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnLeftPickerUI), NULL, this);
    m_button290->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnLeftPickerUI), NULL, this);
    m_button290->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DiffSideBySidePanelBase::OnBrowseLeftFile), NULL, this);
    m_stcLeft->Connect(wxEVT_STC_PAINTED, wxStyledTextEventHandler(DiffSideBySidePanelBase::OnLeftStcPainted), NULL, this);
    m_stcLeft->Connect(wxEVT_MOUSEWHEEL, wxMouseEventHandler(DiffSideBySidePanelBase::OnMouseWheel), NULL, this);
    m_textCtrlRightFile->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnRightPickerUI), NULL, this);
    m_button294->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(DiffSideBySidePanelBase::OnRightPickerUI), NULL, this);
    m_button294->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DiffSideBySidePanelBase::OnBrowseRightFile), NULL, this);
    m_stcRight->Connect(wxEVT_STC_PAINTED, wxStyledTextEventHandler(DiffSideBySidePanelBase::OnRightStcPainted), NULL, this);
    m_stcRight->Connect(wxEVT_MOUSEWHEEL, wxMouseEventHandler(DiffSideBySidePanelBase::OnMouseWheel), NULL, this);
    
    this->Connect(wxID_ANY, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(DiffSideBySidePanelBase::ShowAuiToolMenu), NULL, this);
}
Пример #7
0
CommandProcessorBase::~CommandProcessorBase()
{
    Clear();
    Disconnect(wxID_UNDO, wxID_REDO, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(CommandProcessorBase::OnTBUnRedo), NULL, this);
}
Пример #8
0
CommandProcessorBase::CommandProcessorBase() : m_currentCommand(-1)
{
    Connect(wxID_UNDO, wxID_REDO, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(CommandProcessorBase::OnTBUnRedo), NULL, this);
}
Пример #9
0
GitConsole::GitConsole(wxWindow* parent, GitPlugin* git)
    : GitConsoleBase(parent)
    , m_git(git)
{
    // set the font to fit the C++ lexer default font
    LexerConf::Ptr_t lexCpp = EditorConfigST::Get()->GetLexer("c++");
    if(lexCpp) {
        wxFont font = lexCpp->GetFontForSyle(wxSTC_C_DEFAULT);
        for(int i = 0; i < wxSTC_STYLE_MAX; ++i) {
            m_stcLog->StyleSetFont(i, font);
        }
    }
    m_stcLog->SetReadOnly(true);

    m_bitmapLoader = new BitmapLoader();
    GitImages m_images;
    m_bitmaps = m_bitmapLoader->MakeStandardMimeMap();
    m_modifiedBmp = m_bitmapLoader->LoadBitmap("subversion/16/modified");
    m_untrackedBmp = m_bitmapLoader->LoadBitmap("subversion/16/unversioned");
    m_folderBmp = m_bitmapLoader->LoadBitmap("mime/16/folder");
    m_newBmp = m_images.Bitmap("gitFileAdd");
    m_deleteBmp = m_bitmapLoader->LoadBitmap("subversion/16/deleted");

    EventNotifier::Get()->Connect(
        wxEVT_GIT_CONFIG_CHANGED, wxCommandEventHandler(GitConsole::OnConfigurationChanged), NULL, this);
    EventNotifier::Get()->Connect(
        wxEVT_WORKSPACE_CLOSED, wxCommandEventHandler(GitConsole::OnWorkspaceClosed), NULL, this);
    EventNotifier::Get()->Connect(
        wxEVT_CL_THEME_CHANGED, wxCommandEventHandler(GitConsole::OnEditorThemeChanged), NULL, this);
    clConfig conf("git.conf");
    GitEntry data;
    conf.ReadItem(&data);
    m_isVerbose = (data.GetFlags() & GitEntry::Git_Verbose_Log);

    m_splitter->SetSashPosition(data.GetGitConsoleSashPos());
    m_auibar->AddTool(
        XRCID("git_reset_repository"), _("Reset"), m_images.Bitmap("gitResetRepo"), _("Reset repository"));
    m_auibar->AddSeparator();

    m_auibar->AddTool(XRCID("git_pull"), _("Pull"), m_images.Bitmap("gitPull"), _("Pull remote changes"));
    m_auibar->SetToolDropDown(XRCID("git_pull"), true);
    m_auibar->AddTool(XRCID("git_commit"), _("Commit"), m_images.Bitmap("gitCommitLocal"), _("Commit local changes"));
    m_auibar->AddTool(XRCID("git_push"), _("Push"), m_images.Bitmap("gitPush"), _("Push local changes"));
    m_auibar->AddTool(XRCID("git_rebase"), _("Rebase"), m_images.Bitmap("gitRebase"), _("Rebase"));
    m_auibar->SetToolDropDown(XRCID("git_rebase"), true);
    m_auibar->AddSeparator();
    m_auibar->AddTool(XRCID("git_commit_diff"), _("Diffs"), m_images.Bitmap("gitDiffs"), _("Show current diffs"));
    m_auibar->AddTool(
        XRCID("git_browse_commit_list"), _("Log"), m_images.Bitmap("gitCommitedFiles"), _("Browse commit history"));
#ifdef __WXMSW__
    m_auibar->AddSeparator();
    m_auibar->AddTool(XRCID("git_msysgit"),
                      _("Open MSYS Git"),
                      m_images.Bitmap("msysgit"),
                      _("Open MSYS Git at the current file location"));
#endif

    wxAuiToolBarItemArray append_items;
    PopulateAuiToolbarOverflow(append_items, m_images);
    m_auibar->AddSeparator();
    for(size_t i = 0; i < append_items.GetCount(); ++i) {
        const wxAuiToolBarItem& item = append_items.Item(i);
        m_auibar->AddTool(item.GetId(), item.GetLabel(), item.GetBitmap(), item.GetLabel(), (wxItemKind)item.GetKind());
    }
    m_auibar->Realize();

    Bind(wxEVT_AUITOOLBAR_TOOL_DROPDOWN,
         wxAuiToolBarEventHandler(GitConsole::OnGitPullDropdown),
         this,
         XRCID("git_pull"));
    Bind(wxEVT_AUITOOLBAR_TOOL_DROPDOWN,
         wxAuiToolBarEventHandler(GitConsole::OnGitRebaseDropdown),
         this,
         XRCID("git_rebase"));

    // Adjust the h-scrollbar of git log
    ::clRecalculateSTCHScrollBar(m_stcLog);
}
Пример #10
0
TailPanelBase::TailPanelBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
    : wxPanel(parent, id, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCB60EInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* boxSizer2 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer2);
    
    wxBoxSizer* boxSizer43 = new wxBoxSizer(wxHORIZONTAL);
    
    boxSizer2->Add(boxSizer43, 0, wxEXPAND, WXC_FROM_DIP(5));
    
    m_auibar = new wxAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxAUI_TB_PLAIN_BACKGROUND|wxAUI_TB_DEFAULT_STYLE);
    m_auibar->SetToolBitmapSize(wxSize(16,16));
    
    boxSizer43->Add(m_auibar, 0, wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
    
    m_auibar->AddTool(ID_TAIL_OPEN, _("Open file"), wxXmlResource::Get()->LoadBitmap(wxT("16-folder")), wxNullBitmap, wxITEM_NORMAL, _("Open file"), wxT(""), NULL);
    wxAuiToolBarItem* m_toolbarItemOpen = m_auibar->FindToolByIndex(m_auibar->GetToolCount()-1);
    if (m_toolbarItemOpen) {
        m_toolbarItemOpen->SetHasDropDown(true);
    }
    
    m_auibar->AddTool(ID_TAIL_CLOSE, _("Close"), wxXmlResource::Get()->LoadBitmap(wxT("16-file_close")), wxNullBitmap, wxITEM_NORMAL, _("Close"), wxT(""), NULL);
    
    m_auibar->AddTool(ID_TAIL_CLEAR, _("Clear"), wxXmlResource::Get()->LoadBitmap(wxT("16-clear")), wxNullBitmap, wxITEM_NORMAL, _("Clear"), wxT(""), NULL);
    
    m_auibar->AddSeparator();
    
    m_auibar->AddTool(ID_TAIL_PAUSE, _("Pause"), wxXmlResource::Get()->LoadBitmap(wxT("16-interrupt")), wxNullBitmap, wxITEM_NORMAL, _("Pause"), wxT(""), NULL);
    
    m_auibar->AddTool(ID_TAIL_PLAY, _("Play"), wxXmlResource::Get()->LoadBitmap(wxT("16-debugger_start")), wxNullBitmap, wxITEM_NORMAL, _("Play"), wxT(""), NULL);
    
    m_auibar->AddSeparator();
    
    m_auibar->AddTool(ID_TAIL_DETACH, _("Open in a separate window"), wxXmlResource::Get()->LoadBitmap(wxT("16-windows")), wxNullBitmap, wxITEM_NORMAL, _("Open in a separate window"), _("Open in a separate window"), NULL);
    m_auibar->Realize();
    
    boxSizer43->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));
    
    m_staticTextFileName = new wxStaticText(this, wxID_ANY, _("<No opened file>"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
    
    boxSizer43->Add(m_staticTextFileName, 0, wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
    
    boxSizer43->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));
    
    m_stc = new wxStyledTextCtrl(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
    // Configure the fold margin
    m_stc->SetMarginType     (4, wxSTC_MARGIN_SYMBOL);
    m_stc->SetMarginMask     (4, wxSTC_MASK_FOLDERS);
    m_stc->SetMarginSensitive(4, true);
    m_stc->SetMarginWidth    (4, 0);
    
    // Configure the tracker margin
    m_stc->SetMarginWidth(1, 0);
    
    // Configure the symbol margin
    m_stc->SetMarginType (2, wxSTC_MARGIN_SYMBOL);
    m_stc->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS));
    m_stc->SetMarginWidth(2, 0);
    m_stc->SetMarginSensitive(2, true);
    
    // Configure the line numbers margin
    m_stc->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_stc->SetMarginWidth(0,0);
    
    // Configure the line symbol margin
    m_stc->SetMarginType(3, wxSTC_MARGIN_FORE);
    m_stc->SetMarginMask(3, 0);
    m_stc->SetMarginWidth(3,0);
    // Select the lexer
    m_stc->SetLexer(wxSTC_LEX_NULL);
    // Set default font / styles
    m_stc->StyleClearAll();
    m_stc->SetWrapMode(0);
    m_stc->SetIndentationGuides(0);
    m_stc->SetKeyWords(0, wxT(""));
    m_stc->SetKeyWords(1, wxT(""));
    m_stc->SetKeyWords(2, wxT(""));
    m_stc->SetKeyWords(3, wxT(""));
    m_stc->SetKeyWords(4, wxT(""));
    
    boxSizer2->Add(m_stc, 1, wxEXPAND, WXC_FROM_DIP(5));
    
    SetName(wxT("TailPanelBase"));
    SetSize(500,300);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    // Connect events
    this->Connect(ID_TAIL_OPEN, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(TailPanelBase::OnOpen), NULL, this);
    this->Connect(ID_TAIL_CLOSE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(TailPanelBase::OnClose), NULL, this);
    this->Connect(ID_TAIL_CLOSE, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TailPanelBase::OnCloseUI), NULL, this);
    this->Connect(ID_TAIL_CLEAR, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(TailPanelBase::OnClear), NULL, this);
    this->Connect(ID_TAIL_CLEAR, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TailPanelBase::OnClearUI), NULL, this);
    this->Connect(ID_TAIL_PAUSE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(TailPanelBase::OnPause), NULL, this);
    this->Connect(ID_TAIL_PAUSE, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TailPanelBase::OnPauseUI), NULL, this);
    this->Connect(ID_TAIL_PLAY, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(TailPanelBase::OnPlay), NULL, this);
    this->Connect(ID_TAIL_PLAY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TailPanelBase::OnPlayUI), NULL, this);
    this->Connect(ID_TAIL_DETACH, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(TailPanelBase::OnDetachWindow), NULL, this);
    this->Connect(ID_TAIL_DETACH, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TailPanelBase::OnDetachWindowUI), NULL, this);
    
    this->Connect(wxID_ANY, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(TailPanelBase::ShowAuiToolMenu), NULL, this);
}
Пример #11
0
SFTPTreeViewBase::SFTPTreeViewBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
    : wxPanel(parent, id, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxC32BEInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* boxSizer16 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer16);
    
    m_auibar = new wxAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxAUI_TB_PLAIN_BACKGROUND|wxAUI_TB_DEFAULT_STYLE);
    m_auibar->SetToolBitmapSize(wxSize(16,16));
    
    boxSizer16->Add(m_auibar, 0, wxEXPAND, 5);
    
    m_auibar->AddTool(ID_OPEN_ACCOUNT_MANAGER, _("Open account manager..."), wxXmlResource::Get()->LoadBitmap(wxT("ssh-16")), wxNullBitmap, wxITEM_NORMAL, _("Open account manager..."), _("Open account manager..."), NULL);
    
    m_auibar->AddTool(ID_SFTP_CONNECT, _("Connect"), wxXmlResource::Get()->LoadBitmap(wxT("connect")), wxNullBitmap, wxITEM_NORMAL, _("Establish connection to the selected account"), _("Establish connection to the selected account"), NULL);
    
    m_auibar->AddTool(ID_SFTP_DISCONNECT, _("Disconnect"), wxXmlResource::Get()->LoadBitmap(wxT("disconnect")), wxNullBitmap, wxITEM_NORMAL, _("Close the current connection"), _("Close the current connection"), NULL);
    
    m_auibar->AddTool(ID_ADD_BOOKMARK, _("Add Bookmark"), wxXmlResource::Get()->LoadBitmap(wxT("bookmark")), wxNullBitmap, wxITEM_NORMAL, _("Add Bookmark"), _("Add Bookmark"), NULL);
    wxAuiToolBarItem* m_toolbarItemAddBookmark = m_auibar->FindToolByIndex(m_auibar->GetToolCount()-1);
    if (m_toolbarItemAddBookmark) {
        m_toolbarItemAddBookmark->SetHasDropDown(true);
    }
    m_auibar->Realize();
    
    wxArrayString m_choiceAccountArr;
    m_choiceAccount = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), m_choiceAccountArr, 0);
    
    boxSizer16->Add(m_choiceAccount, 0, wxALL|wxEXPAND, 2);
    
    wxFlexGridSizer* flexGridSizer43 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer43->SetFlexibleDirection( wxBOTH );
    flexGridSizer43->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    flexGridSizer43->AddGrowableCol(1);
    
    boxSizer16->Add(flexGridSizer43, 0, wxEXPAND, 5);
    
    m_staticText49 = new wxStaticText(this, wxID_ANY, _("Go to:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer43->Add(m_staticText49, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlQuickJump = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_PROCESS_ENTER);
    
    flexGridSizer43->Add(m_textCtrlQuickJump, 0, wxALL|wxEXPAND, 5);
    
    m_treeListCtrl = new wxTreeListCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(200,200), wxTL_DEFAULT_STYLE|wxTL_MULTIPLE);
    
    boxSizer16->Add(m_treeListCtrl, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, 2);
    
    m_treeListCtrl->AppendColumn(_("Name"), 400, wxALIGN_LEFT, wxCOL_RESIZABLE|wxCOL_SORTABLE);
    m_treeListCtrl->AppendColumn(_("Type"), 100, wxALIGN_LEFT, wxCOL_RESIZABLE);
    m_treeListCtrl->AppendColumn(_("Size"), 100, wxALIGN_LEFT, wxCOL_RESIZABLE);
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
    // Connect events
    this->Connect(ID_OPEN_ACCOUNT_MANAGER, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SFTPTreeViewBase::OnOpenAccountManager), NULL, this);
    this->Connect(ID_SFTP_CONNECT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SFTPTreeViewBase::OnConnect), NULL, this);
    this->Connect(ID_SFTP_CONNECT, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPTreeViewBase::OnConnectUI), NULL, this);
    this->Connect(ID_SFTP_DISCONNECT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SFTPTreeViewBase::OnDisconnect), NULL, this);
    this->Connect(ID_SFTP_DISCONNECT, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPTreeViewBase::OnDisconnectUI), NULL, this);
    this->Connect(ID_ADD_BOOKMARK, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(SFTPTreeViewBase::OnAddBookmark), NULL, this);
    this->Connect(ID_ADD_BOOKMARK, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPTreeViewBase::OnAddBookmarkUI), NULL, this);
    m_staticText49->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPTreeViewBase::OnGotoLocationUI), NULL, this);
    m_textCtrlQuickJump->Connect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(SFTPTreeViewBase::OnGotoLocation), NULL, this);
    m_textCtrlQuickJump->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPTreeViewBase::OnGotoLocationUI), NULL, this);
    m_treeListCtrl->Connect(wxEVT_TREELIST_ITEM_EXPANDING, wxTreeListEventHandler(SFTPTreeViewBase::OnItemExpanding), NULL, this);
    m_treeListCtrl->Connect(wxEVT_TREELIST_ITEM_ACTIVATED, wxTreeListEventHandler(SFTPTreeViewBase::OnItemActivated), NULL, this);
    m_treeListCtrl->Connect(wxEVT_TREELIST_ITEM_CONTEXT_MENU, wxTreeListEventHandler(SFTPTreeViewBase::OnContextMenu), NULL, this);
    
    this->Connect(wxID_ANY, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(SFTPTreeViewBase::ShowAuiToolMenu), NULL, this);
}
Пример #12
0
MainFrameBaseClass::MainFrameBaseClass(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
    : wxFrame(parent, id, title, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxC9ED9InitBitmapResources();
        bBitmapLoaded = true;
    }
    // Set icon(s) to the application/dialog
    wxIconBundle app_icons;
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("terminal-16"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("terminal-32"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    SetIcons( app_icons );

    
    wxBoxSizer* boxSizer1 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer1);
    
    m_mainPanel = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(800,600), wxTAB_TRAVERSAL);
    
    boxSizer1->Add(m_mainPanel, 1, wxEXPAND, 5);
    
    wxBoxSizer* boxSizer11 = new wxBoxSizer(wxVERTICAL);
    m_mainPanel->SetSizer(boxSizer11);
    
    m_auibar17 = new wxAuiToolBar(m_mainPanel, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxAUI_TB_PLAIN_BACKGROUND|wxAUI_TB_DEFAULT_STYLE);
    m_auibar17->SetToolBitmapSize(wxSize(16,16));
    
    boxSizer11->Add(m_auibar17, 0, wxEXPAND, 5);
    
    m_auibar17->AddTool(wxID_CLEAR, _("Clear"), wxXmlResource::Get()->LoadBitmap(wxT("stop")), wxNullBitmap, wxITEM_NORMAL, _("Clear view"), _("Clear view"), NULL);
    
    m_auibar17->AddTool(ID_KILL_INFIRIOR, _("Send inferior process signal"), wxXmlResource::Get()->LoadBitmap(wxT("signal")), wxNullBitmap, wxITEM_NORMAL, wxT(""), _("Send inferior process signal"), NULL);
    wxAuiToolBarItem* m_toolbarItemKillInfiriorProcess = m_auibar17->FindToolByIndex(m_auibar17->GetToolCount()-1);
    if (m_toolbarItemKillInfiriorProcess) {
        m_toolbarItemKillInfiriorProcess->SetHasDropDown(true);
    }
    
    m_auibar17->AddTool(ID_SETTINGS, _("Settings..."), wxXmlResource::Get()->LoadBitmap(wxT("settings")), wxNullBitmap, wxITEM_NORMAL, _("Settings..."), _("Settings..."), NULL);
    
    m_auibar17->AddTool(wxID_SAVE, _("Save"), wxXmlResource::Get()->LoadBitmap(wxT("save")), wxNullBitmap, wxITEM_NORMAL, _("Save"), _("Save"), NULL);
    m_auibar17->Realize();
    
    m_stc = new wxStyledTextCtrl(m_mainPanel, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), 0);
    #ifdef __WXMSW__
    // To get the newer version of the font on MSW, we use font wxSYS_DEFAULT_GUI_FONT with family set to wxFONTFAMILY_TELETYPE
    wxFont m_stcFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_stcFont.SetFamily(wxFONTFAMILY_TELETYPE);
    #else
    wxFont m_stcFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT);
    m_stcFont.SetFamily(wxFONTFAMILY_TELETYPE);
    #endif
    m_stc->SetFont(m_stcFont);
    m_stc->SetFocus();
    // Configure the fold margin
    m_stc->SetMarginType     (4, wxSTC_MARGIN_SYMBOL);
    m_stc->SetMarginMask     (4, wxSTC_MASK_FOLDERS);
    m_stc->SetMarginSensitive(4, true);
    m_stc->SetMarginWidth    (4, 0);
    
    // Configure the tracker margin
    m_stc->SetMarginWidth(1, 0);
    
    // Configure the symbol margin
    m_stc->SetMarginType (2, wxSTC_MARGIN_SYMBOL);
    m_stc->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS));
    m_stc->SetMarginWidth(2, 16);
    m_stc->SetMarginSensitive(2, true);
    
    // Configure the line numbers margin
    m_stc->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_stc->SetMarginWidth(0,0);
    
    // Configure the line symbol margin
    m_stc->SetMarginType(3, wxSTC_MARGIN_FORE);
    m_stc->SetMarginMask(3, 0);
    m_stc->SetMarginWidth(3,0);
    // Select the lexer
    m_stc->SetLexer(wxSTC_LEX_NULL);
    // Set default font / styles
    m_stc->StyleClearAll();
    for(int i=0; i<wxSTC_STYLE_MAX; ++i) {
        m_stc->StyleSetFont(i, m_stcFont);
    }
    m_stc->SetWrapMode(0);
    m_stc->SetIndentationGuides(0);
    m_stc->SetKeyWords(0, wxT(""));
    m_stc->SetKeyWords(1, wxT(""));
    m_stc->SetKeyWords(2, wxT(""));
    m_stc->SetKeyWords(3, wxT(""));
    m_stc->SetKeyWords(4, wxT(""));
    
    boxSizer11->Add(m_stc, 1, wxALL|wxEXPAND, 2);
    
    m_menuBar = new wxMenuBar(0);
    this->SetMenuBar(m_menuBar);
    
    m_name6 = new wxMenu();
    m_menuBar->Append(m_name6, _("File"));
    
    m_menuItem7 = new wxMenuItem(m_name6, wxID_EXIT, _("Exit\tAlt-X"), _("Quit"), wxITEM_NORMAL);
    m_name6->Append(m_menuItem7);
    
    m_name8 = new wxMenu();
    m_menuBar->Append(m_name8, _("Help"));
    
    m_menuItem9 = new wxMenuItem(m_name8, wxID_ABOUT, _("About..."), wxT(""), wxITEM_NORMAL);
    m_name8->Append(m_menuItem9);
    
    m_timerMarker = new wxTimer;
    m_timerMarker->Start(50, false);
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
    // Connect events
    this->Connect(wxEVT_IDLE, wxIdleEventHandler(MainFrameBaseClass::OnIdle), NULL, this);
    this->Connect(wxID_CLEAR, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnClearView), NULL, this);
    this->Connect(wxID_CLEAR, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBaseClass::OnClearViewUI), NULL, this);
    this->Connect(ID_KILL_INFIRIOR, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnTerminateInfirior), NULL, this);
    this->Connect(ID_KILL_INFIRIOR, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBaseClass::OnSignalInferiorUI), NULL, this);
    this->Connect(ID_KILL_INFIRIOR, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(MainFrameBaseClass::OnSignalinferior), NULL, this);
    this->Connect(ID_SETTINGS, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnSettings), NULL, this);
    this->Connect(wxID_SAVE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnSaveContent), NULL, this);
    this->Connect(wxID_SAVE, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBaseClass::OnSaveContentUI), NULL, this);
    m_stc->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainFrameBaseClass::OnKeyDown), NULL, this);
    m_stc->Connect(wxEVT_STC_UPDATEUI, wxStyledTextEventHandler(MainFrameBaseClass::OnStcUpdateUI), NULL, this);
    this->Connect(m_menuItem7->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnExit), NULL, this);
    this->Connect(m_menuItem9->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnAbout), NULL, this);
    m_timerMarker->Connect(wxEVT_TIMER, wxTimerEventHandler(MainFrameBaseClass::OnAddMarker), NULL, this);
    
    this->Connect(wxID_ANY, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(MainFrameBaseClass::ShowAuiToolMenu), NULL, this);
}
Пример #13
0
SFTPTreeViewBase::SFTPTreeViewBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
    : wxPanel(parent, id, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxC32BEInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* boxSizer16 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer16);
    
    m_auibar = new wxAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxAUI_TB_PLAIN_BACKGROUND|wxAUI_TB_DEFAULT_STYLE);
    m_auibar->SetToolBitmapSize(wxSize(16,16));
    
    boxSizer16->Add(m_auibar, 0, wxEXPAND, 5);
    
    m_auibar->AddTool(ID_OPEN_ACCOUNT_MANAGER, _("Open account manager..."), wxXmlResource::Get()->LoadBitmap(wxT("ssh-16")), wxNullBitmap, wxITEM_NORMAL, _("Open account manager..."), _("Open account manager..."), NULL);
    
    m_auibar->AddTool(ID_SFTP_CONNECT, _("Disconnected. Click to connect"), wxXmlResource::Get()->LoadBitmap(wxT("disconnect")), wxNullBitmap, wxITEM_NORMAL, _("Disconnected. Click to connect"), _("Disconnected. Click to connect"), NULL);
    
    m_auibar->AddTool(ID_ADD_BOOKMARK, _("Add Bookmark"), wxXmlResource::Get()->LoadBitmap(wxT("bookmark")), wxNullBitmap, wxITEM_NORMAL, _("Add Bookmark"), _("Select a folder from the tree view and add it as a bookmark"), NULL);
    wxAuiToolBarItem* m_toolbarItemAddBookmark = m_auibar->FindToolByIndex(m_auibar->GetToolCount()-1);
    if (m_toolbarItemAddBookmark) {
        m_toolbarItemAddBookmark->SetHasDropDown(true);
    }
    
    m_auibar->AddTool(ID_SSH_OPEN_TERMINAL, _("Open Terminal"), wxXmlResource::Get()->LoadBitmap(wxT("terminal")), wxNullBitmap, wxITEM_NORMAL, _("Open Terminal"), _("Open Terminal"), NULL);
    wxAuiToolBarItem* m_toolbarItemTerminal = m_auibar->FindToolByIndex(m_auibar->GetToolCount()-1);
    if (m_toolbarItemTerminal) {
        m_toolbarItemTerminal->SetHasDropDown(true);
        m_menu96 = new wxMenu;
        m_menuItemCustomize = new wxMenuItem(m_menu96, ID_SFTP_CUSTOMIZE, _("SFTP Settings..."), _("SFTP Settings..."), wxITEM_NORMAL);
        m_menu96->Append(m_menuItemCustomize);
        
        m_dropdownMenus.insert(std::make_pair( m_toolbarItemTerminal->GetId(), m_menu96) );
    }
    m_auibar->Realize();
    
    wxArrayString m_choiceAccountArr;
    m_choiceAccount = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), m_choiceAccountArr, 0);
    
    boxSizer16->Add(m_choiceAccount, 0, wxALL|wxEXPAND, 2);
    
    wxFlexGridSizer* flexGridSizer43 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer43->SetFlexibleDirection( wxBOTH );
    flexGridSizer43->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    flexGridSizer43->AddGrowableCol(1);
    
    boxSizer16->Add(flexGridSizer43, 0, wxEXPAND, 5);
    
    m_staticText49 = new wxStaticText(this, wxID_ANY, _("Go to:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer43->Add(m_staticText49, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlQuickJump = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_PROCESS_ENTER);
    m_textCtrlQuickJump->SetToolTip(_("Type a path and hit ENTER"));
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlQuickJump->SetHint(wxT(""));
    #endif
    
    flexGridSizer43->Add(m_textCtrlQuickJump, 0, wxALL|wxEXPAND, 5);
    
    m_treeListCtrl = new wxTreeListCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(200,200), wxTL_DEFAULT_STYLE|wxTL_MULTIPLE);
    
    boxSizer16->Add(m_treeListCtrl, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, 2);
    
    m_treeListCtrl->AppendColumn(_("Name"), 400, wxALIGN_LEFT, wxCOL_RESIZABLE|wxCOL_SORTABLE);
    m_treeListCtrl->AppendColumn(_("Type"), 100, wxALIGN_LEFT, wxCOL_RESIZABLE);
    m_treeListCtrl->AppendColumn(_("Size"), 50, wxALIGN_LEFT, wxCOL_RESIZABLE);
    
    SetName(wxT("SFTPTreeViewBase"));
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    CentreOnParent(wxBOTH);
    // Connect events
    this->Connect(ID_OPEN_ACCOUNT_MANAGER, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SFTPTreeViewBase::OnOpenAccountManager), NULL, this);
    this->Connect(ID_SFTP_CONNECT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SFTPTreeViewBase::OnConnection), NULL, this);
    this->Connect(ID_ADD_BOOKMARK, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(SFTPTreeViewBase::OnAddBookmark), NULL, this);
    this->Connect(ID_ADD_BOOKMARK, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPTreeViewBase::OnAddBookmarkUI), NULL, this);
    this->Connect(ID_SSH_OPEN_TERMINAL, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPTreeViewBase::OnOpenTerminalUI), NULL, this);
    this->Connect(ID_SSH_OPEN_TERMINAL, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(SFTPTreeViewBase::OnOpenTerminal), NULL, this);
    this->Connect(m_menuItemCustomize->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SFTPTreeViewBase::OnSftpSettings), NULL, this);
    m_choiceAccount->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(SFTPTreeViewBase::OnChoiceAccount), NULL, this);
    m_choiceAccount->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPTreeViewBase::OnChoiceAccountUI), NULL, this);
    m_staticText49->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPTreeViewBase::OnGotoLocationUI), NULL, this);
    m_textCtrlQuickJump->Connect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(SFTPTreeViewBase::OnGotoLocation), NULL, this);
    m_textCtrlQuickJump->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPTreeViewBase::OnGotoLocationUI), NULL, this);
    m_treeListCtrl->Connect(wxEVT_TREELIST_ITEM_EXPANDING, wxTreeListEventHandler(SFTPTreeViewBase::OnItemExpanding), NULL, this);
    m_treeListCtrl->Connect(wxEVT_TREELIST_ITEM_ACTIVATED, wxTreeListEventHandler(SFTPTreeViewBase::OnItemActivated), NULL, this);
    m_treeListCtrl->Connect(wxEVT_TREELIST_ITEM_CONTEXT_MENU, wxTreeListEventHandler(SFTPTreeViewBase::OnContextMenu), NULL, this);
    m_treeListCtrl->Connect(wxEVT_TREELIST_SELECTION_CHANGED, wxTreeListEventHandler(SFTPTreeViewBase::OnSelectionChanged), NULL, this);
    
    this->Connect(wxID_ANY, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(SFTPTreeViewBase::ShowAuiToolMenu), NULL, this);
}