Esempio n. 1
0
GitApplyPatchDlgBase::GitApplyPatchDlgBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
    : wxDialog(parent, id, title, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCrafterpca4kKInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* boxSizer154 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer154);
    
    wxFlexGridSizer* flexGridSizer162 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer162->SetFlexibleDirection( wxBOTH );
    flexGridSizer162->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    flexGridSizer162->AddGrowableCol(1);
    
    boxSizer154->Add(flexGridSizer162, 1, wxALL|wxEXPAND, 5);
    
    m_staticText164 = new wxStaticText(this, wxID_ANY, _("Select patch file"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer162->Add(m_staticText164, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_filePickerPatchFile = new wxFilePickerCtrl(this, wxID_ANY, wxEmptyString, wxT("Select a file"), wxT("Patch files (*.diff;*.patch)|*.diff;*.patch|All Files (*)|*"), wxDefaultPosition, wxSize(-1,-1), wxFLP_DEFAULT_STYLE|wxFLP_USE_TEXTCTRL);
    m_filePickerPatchFile->SetToolTip(_("Patch file to apply"));
    m_filePickerPatchFile->SetFocus();
    
    flexGridSizer162->Add(m_filePickerPatchFile, 0, wxALL|wxEXPAND, 5);
    
    m_staticText168 = new wxStaticText(this, wxID_ANY, _("git apply additional flags to use:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer162->Add(m_staticText168, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlExtraFlags = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
    m_textCtrlExtraFlags->SetToolTip(_("By default, codelite uses the command 'git apply --whitespace=nowarn --ignore-whitespace' for applying patch files.\nSet here an extra flags to use with this command, e.g.:\n\n--reverse\n\nSee the git manual for more options"));
    
    flexGridSizer162->Add(m_textCtrlExtraFlags, 0, wxALL|wxEXPAND, 5);
    
    m_stdBtnSizer300 = new wxStdDialogButtonSizer();
    
    boxSizer154->Add(m_stdBtnSizer300, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_buttonCancel = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_stdBtnSizer300->AddButton(m_buttonCancel);
    
    m_buttonOK = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_buttonOK->SetDefault();
    m_stdBtnSizer300->AddButton(m_buttonOK);
    m_stdBtnSizer300->Realize();
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
}
Esempio n. 2
0
MemCheckIcons24::MemCheckIcons24()
    : wxImageList(24, 24, true)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCrafterpca4kKInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("memcheck_check_24"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("memcheck_check_24"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("memcheck_import_24"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("memcheck_import_24"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("memcheck_stop_24"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("memcheck_stop_24"), bmp ) );
    }
    
}
Esempio n. 3
0
GitConsoleBase::GitConsoleBase(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);
        wxCrafterpca4kKInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* boxSizer36 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer36);
    
    m_auibar = new wxAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxAUI_TB_PLAIN_BACKGROUND|wxAUI_TB_DEFAULT_STYLE|wxAUI_TB_OVERFLOW);
    m_auibar->SetToolBitmapSize(wxSize(16,16));
    
    boxSizer36->Add(m_auibar, 0, wxLEFT|wxRIGHT, 0);
    
    m_auibar->AddTool(XRCID("git_clear_log"), _("Clear Log"), wxXmlResource::Get()->LoadBitmap(wxT("clear")), wxNullBitmap, wxITEM_NORMAL, _("Clear Log"), _("Clear Log"), NULL);
    
    m_auibar->AddTool(wxID_ABORT, _("m_toolKill"), wxXmlResource::Get()->LoadBitmap(wxT("stop")), wxNullBitmap, wxITEM_NORMAL, _("Terminate git process"), _("Terminate git process"), NULL);
    
    m_auibar->AddSeparator();
    
    m_auibar->AddTool(XRCID("git_console_add_file"), _("Add file"), wxXmlResource::Get()->LoadBitmap(wxT("git-add-file")), wxNullBitmap, wxITEM_NORMAL, _("Add file"), _("Add file"), NULL);
    
    m_auibar->AddTool(XRCID("git_console_reset_file"), _("Reset File"), wxXmlResource::Get()->LoadBitmap(wxT("git-reset")), wxNullBitmap, wxITEM_NORMAL, _("Reset File"), _("Reset File"), NULL);
    m_auibar->Realize();
    
    m_splitter = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxSP_LIVE_UPDATE|wxSP_NO_XP_THEME|wxSP_3DSASH);
    m_splitter->SetSashGravity(0);
    m_splitter->SetMinimumPaneSize(10);
    
    boxSizer36->Add(m_splitter, 1, wxEXPAND, 5);
    
    m_splitterPageTreeView = new wxPanel(m_splitter, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    
    wxBoxSizer* boxSizer94 = new wxBoxSizer(wxVERTICAL);
    m_splitterPageTreeView->SetSizer(boxSizer94);
    
    m_dvFiles = new wxDataViewCtrl(m_splitterPageTreeView, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxDV_NO_HEADER|wxDV_MULTIPLE|wxBORDER_THEME);
    
    m_dvFilesModel = new DataViewFilesModel;
    m_dvFilesModel->SetColCount( 1 );
    m_dvFiles->AssociateModel(m_dvFilesModel.get() );
    
    boxSizer94->Add(m_dvFiles, 1, wxALL|wxEXPAND, 2);
    
    m_dvFiles->AppendIconTextColumn(_("File View"), m_dvFiles->GetColumnCount(), wxDATAVIEW_CELL_INERT, 400, wxALIGN_LEFT);
    m_panelProgress = new wxPanel(m_splitterPageTreeView, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_panelProgress->Hide();
    
    boxSizer94->Add(m_panelProgress, 0, wxEXPAND, 5);
    
    wxBoxSizer* boxSizer272 = new wxBoxSizer(wxVERTICAL);
    m_panelProgress->SetSizer(boxSizer272);
    
    m_staticTextGauge = new wxStaticText(m_panelProgress, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer272->Add(m_staticTextGauge, 0, wxALL, 2);
    
    m_gauge = new wxGauge(m_panelProgress, wxID_ANY, 100, wxDefaultPosition, wxSize(-1,-1), wxGA_SMOOTH|wxGA_HORIZONTAL);
    m_gauge->SetValue(10);
    
    boxSizer272->Add(m_gauge, 0, wxALL|wxEXPAND, 2);
    
    m_splitterPage96 = new wxPanel(m_splitter, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_splitter->SplitVertically(m_splitterPageTreeView, m_splitterPage96, 250);
    
    wxBoxSizer* boxSizer92 = new wxBoxSizer(wxVERTICAL);
    m_splitterPage96->SetSizer(boxSizer92);
    
    m_stcLog = new wxStyledTextCtrl(m_splitterPage96, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxBORDER_THEME);
    #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_stcLogFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_stcLogFont.SetFamily(wxFONTFAMILY_TELETYPE);
    #else
    wxFont m_stcLogFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT);
    m_stcLogFont.SetFamily(wxFONTFAMILY_TELETYPE);
    #endif
    m_stcLog->SetFont(m_stcLogFont);
    // Configure the fold margin
    m_stcLog->SetMarginType     (4, wxSTC_MARGIN_SYMBOL);
    m_stcLog->SetMarginMask     (4, wxSTC_MASK_FOLDERS);
    m_stcLog->SetMarginSensitive(4, true);
    m_stcLog->SetMarginWidth    (4, 0);
    
    // Configure the tracker margin
    m_stcLog->SetMarginWidth(1, 0);
    
    // Configure the symbol margin
    m_stcLog->SetMarginType (2, wxSTC_MARGIN_SYMBOL);
    m_stcLog->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS));
    m_stcLog->SetMarginWidth(2, 0);
    m_stcLog->SetMarginSensitive(2, true);
    
    // Configure the line numbers margin
    m_stcLog->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_stcLog->SetMarginWidth(0,0);
    
    // Configure the line symbol margin
    m_stcLog->SetMarginType(3, wxSTC_MARGIN_FORE);
    m_stcLog->SetMarginMask(3, 0);
    m_stcLog->SetMarginWidth(3,0);
    // Select the lexer
    m_stcLog->SetLexer(wxSTC_LEX_NULL);
    // Set default font / styles
    m_stcLog->StyleClearAll();
    for(int i=0; i<wxSTC_STYLE_MAX; ++i) {
        m_stcLog->StyleSetFont(i, m_stcLogFont);
    }
    m_stcLog->SetWrapMode(0);
    m_stcLog->SetIndentationGuides(0);
    m_stcLog->SetKeyWords(0, wxT(""));
    m_stcLog->SetKeyWords(1, wxT(""));
    m_stcLog->SetKeyWords(2, wxT(""));
    m_stcLog->SetKeyWords(3, wxT(""));
    m_stcLog->SetKeyWords(4, wxT(""));
    
    boxSizer92->Add(m_stcLog, 1, wxALL|wxEXPAND, 2);
    
    SetSizeHints(500,300);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
    // Connect events
    this->Connect(XRCID("git_clear_log"), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitConsoleBase::OnClearGitLogUI), NULL, this);
    this->Connect(XRCID("git_clear_log"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(GitConsoleBase::OnClearGitLog), NULL, this);
    this->Connect(wxID_ABORT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(GitConsoleBase::OnStopGitProcess), NULL, this);
    this->Connect(wxID_ABORT, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitConsoleBase::OnStopGitProcessUI), NULL, this);
    this->Connect(XRCID("git_console_add_file"), wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(GitConsoleBase::OnAddFile), NULL, this);
    this->Connect(XRCID("git_console_add_file"), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitConsoleBase::OnItemSelectedUI), NULL, this);
    this->Connect(XRCID("git_console_reset_file"), wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(GitConsoleBase::OnResetFile), NULL, this);
    this->Connect(XRCID("git_console_reset_file"), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitConsoleBase::OnItemSelectedUI), NULL, this);
    m_dvFiles->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEventHandler(GitConsoleBase::OnContextMenu), NULL, this);
    m_dvFiles->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler(GitConsoleBase::OnFileActivated), NULL, this);
    
}
Esempio n. 4
0
GitImages::GitImages()
    : wxImageList(16, 16, true)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCrafterpca4kKInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitCommitLocal"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("gitCommitLocal"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitArrowUp"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("gitArrowUp"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitSwitchLocalBranch"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("gitSwitchLocalBranch"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitNewBranch"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("gitNewBranch"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitDiffs"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("gitDiffs"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitCommitedFiles"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("gitCommitedFiles"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitApply"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("gitApply"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitModifiedFiles"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("gitModifiedFiles"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitPull"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("gitPull"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitPush"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("gitPush"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitReset"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("gitReset"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitResetRepo"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("gitResetRepo"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitTrash"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("gitTrash"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitRefresh"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("gitRefresh"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitStart"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("gitStart"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitFileAdd"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("gitFileAdd"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitClone"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("gitClone"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("git"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("git"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitPath"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("gitPath"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitSettings"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("gitSettings"), bmp ) );
    }
    
}
Esempio n. 5
0
GitFileDiffDlgBase::GitFileDiffDlgBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
    : wxDialog(parent, id, title, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCrafterpca4kKInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* boxSizer124 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer124);
    
    m_editor = new GitCommitEditor(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), 0);
    // Configure the fold margin
    m_editor->SetMarginType     (4, wxSTC_MARGIN_SYMBOL);
    m_editor->SetMarginMask     (4, wxSTC_MASK_FOLDERS);
    m_editor->SetMarginSensitive(4, true);
    m_editor->SetMarginWidth    (4, 0);
    
    // Configure the tracker margin
    m_editor->SetMarginWidth(1, 0);
    
    // Configure the symbol margin
    m_editor->SetMarginType (2, wxSTC_MARGIN_SYMBOL);
    m_editor->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS));
    m_editor->SetMarginWidth(2, 0);
    m_editor->SetMarginSensitive(2, true);
    
    // Configure the line numbers margin
    m_editor->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_editor->SetMarginWidth(0,0);
    
    // Configure the line symbol margin
    m_editor->SetMarginType(3, wxSTC_MARGIN_FORE);
    m_editor->SetMarginMask(3, 0);
    m_editor->SetMarginWidth(3,0);
    // Select the lexer
    m_editor->SetLexer(wxSTC_LEX_DIFF);
    // Set default font / styles
    m_editor->StyleClearAll();
    m_editor->SetWrapMode(0);
    m_editor->SetIndentationGuides(0);
    m_editor->SetKeyWords(0, wxT(""));
    m_editor->SetKeyWords(1, wxT(""));
    m_editor->SetKeyWords(2, wxT(""));
    m_editor->SetKeyWords(3, wxT(""));
    m_editor->SetKeyWords(4, wxT(""));
    
    boxSizer124->Add(m_editor, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, 5);
    
    m_stdBtnSizer306 = new wxStdDialogButtonSizer();
    
    boxSizer124->Add(m_stdBtnSizer306, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_button308 = new wxButton(this, wxID_CLOSE, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_button308->SetDefault();
    m_stdBtnSizer306->AddButton(m_button308);
    
    m_button310 = new wxButton(this, wxID_SAVE, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_stdBtnSizer306->AddButton(m_button310);
    m_stdBtnSizer306->Realize();
    
    SetSizeHints(500,300);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
    // Connect events
    m_button308->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitFileDiffDlgBase::OnCloseDialog), NULL, this);
    m_button310->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitFileDiffDlgBase::OnSaveAsPatch), NULL, this);
    
}
Esempio n. 6
0
gitCloneDlgBaseClass::gitCloneDlgBaseClass(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
    : wxDialog(parent, id, title, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCrafterpca4kKInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* boxSizer17 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer17);
    
    wxFlexGridSizer* flexGridSizer21 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer21->SetFlexibleDirection( wxBOTH );
    flexGridSizer21->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    flexGridSizer21->AddGrowableCol(1);
    
    boxSizer17->Add(flexGridSizer21, 1, wxALL|wxEXPAND, 5);
    
    m_staticText22 = new wxStaticText(this, wxID_ANY, _("Clone URL:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer21->Add(m_staticText22, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlURL = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
    m_textCtrlURL->SetToolTip(_("git URL to clone"));
    
    flexGridSizer21->Add(m_textCtrlURL, 0, wxALL|wxEXPAND, 5);
    
    m_staticText24 = new wxStaticText(this, wxID_ANY, _("Target Directory:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer21->Add(m_staticText24, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_dirPickerTargetDir = new wxDirPickerCtrl(this, wxID_ANY, wxEmptyString, wxT("Select a folder"), wxDefaultPosition, wxSize(-1,-1), wxDIRP_DEFAULT_STYLE|wxDIRP_USE_TEXTCTRL|wxDIRP_DIR_MUST_EXIST);
    m_dirPickerTargetDir->SetToolTip(_("Clone the sources into this target directory"));
    
    flexGridSizer21->Add(m_dirPickerTargetDir, 0, wxALL|wxEXPAND, 5);
    
    flexGridSizer21->Add(0, 0, 0, wxALL, 5);
    
    m_stdBtnSizer294 = new wxStdDialogButtonSizer();
    
    boxSizer17->Add(m_stdBtnSizer294, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_buttonOk = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_buttonOk->SetDefault();
    m_stdBtnSizer294->AddButton(m_buttonOk);
    
    m_buttonCancel = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_stdBtnSizer294->AddButton(m_buttonCancel);
    m_stdBtnSizer294->Realize();
    
    SetSizeHints(500,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
    // Connect events
    m_buttonOk->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(gitCloneDlgBaseClass::OnOKUI), NULL, this);
    
}
Esempio n. 7
0
GitDiffDlgBase::GitDiffDlgBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
    : wxDialog(parent, id, title, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCrafterpca4kKInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* bSizer17 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer17);
    
    m_splitter = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxSP_LIVE_UPDATE|wxSP_NO_XP_THEME|wxSP_3DSASH);
    m_splitter->SetSashGravity(0.5);
    m_splitter->SetMinimumPaneSize(10);
    
    bSizer17->Add(m_splitter, 1, wxALL|wxEXPAND, 5);
    
    m_splitterPageFiles = new wxPanel(m_splitter, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    
    wxBoxSizer* boxSizer62 = new wxBoxSizer(wxVERTICAL);
    m_splitterPageFiles->SetSizer(boxSizer62);
    
    m_staticText68 = new wxStaticText(m_splitterPageFiles, wxID_ANY, _("Modified files:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer62->Add(m_staticText68, 0, wxALL|wxALIGN_BOTTOM, 5);
    
    wxArrayString m_fileListBoxArr;
    m_fileListBox = new wxListBox(m_splitterPageFiles, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_fileListBoxArr, 0);
    
    boxSizer62->Add(m_fileListBox, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, 5);
    
    m_splitterPageDiff = new wxPanel(m_splitter, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_splitter->SplitVertically(m_splitterPageFiles, m_splitterPageDiff, 0);
    
    wxBoxSizer* boxSizer64 = new wxBoxSizer(wxVERTICAL);
    m_splitterPageDiff->SetSizer(boxSizer64);
    
    m_staticText66 = new wxStaticText(m_splitterPageDiff, wxID_ANY, _("Diff:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer64->Add(m_staticText66, 0, wxALL|wxALIGN_BOTTOM, 5);
    
    m_editor = new GitCommitEditor( m_splitterPageDiff );
    boxSizer64->Add(m_editor, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, 5);
    
    m_sdbSizer1 = new wxStdDialogButtonSizer();
    
    bSizer17->Add(m_sdbSizer1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_button145 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_button145->SetDefault();
    m_sdbSizer1->AddButton(m_button145);
    m_sdbSizer1->Realize();
    
    SetSizeHints(879,600);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
    // Connect events
    m_fileListBox->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(GitDiffDlgBase::OnChangeFile), NULL, this);
    
}
Esempio n. 8
0
GitCommitListDlgBase::GitCommitListDlgBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
    : wxDialog(parent, id, title, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCrafterpca4kKInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* bSizer17 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer17);
    
    m_splitter174 = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxSP_LIVE_UPDATE|wxSP_NO_XP_THEME|wxSP_3DSASH);
    m_splitter174->SetSashGravity(0);
    m_splitter174->SetMinimumPaneSize(150);
    
    bSizer17->Add(m_splitter174, 1, wxALL|wxEXPAND, 5);
    
    m_splitterPage178 = new wxPanel(m_splitter174, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    
    wxBoxSizer* boxSizer205 = new wxBoxSizer(wxVERTICAL);
    m_splitterPage178->SetSizer(boxSizer205);
    
    m_staticText207 = new wxStaticText(m_splitterPage178, wxID_ANY, _("Commit list:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer205->Add(m_staticText207, 0, wxALL, 5);
    
    m_dvListCtrlCommitList = new wxDataViewListCtrl(m_splitterPage178, wxID_ANY, wxDefaultPosition, wxSize(500,-1), wxDV_ROW_LINES|wxDV_SINGLE);
    
    boxSizer205->Add(m_dvListCtrlCommitList, 1, wxALL|wxEXPAND, 2);
    
    m_dvListCtrlCommitList->AppendTextColumn(_("Commit"), wxDATAVIEW_CELL_INERT, 150, wxALIGN_LEFT);
    m_dvListCtrlCommitList->AppendTextColumn(_("Author"), wxDATAVIEW_CELL_INERT, 100, wxALIGN_LEFT);
    m_dvListCtrlCommitList->AppendTextColumn(_("Date"), wxDATAVIEW_CELL_INERT, 100, wxALIGN_LEFT);
    m_dvListCtrlCommitList->AppendTextColumn(_("Subject"), wxDATAVIEW_CELL_INERT, 600, wxALIGN_LEFT);
    m_splitterPage182 = new wxPanel(m_splitter174, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_splitter174->SplitHorizontally(m_splitterPage178, m_splitterPage182, 150);
    
    wxBoxSizer* boxSizer184 = new wxBoxSizer(wxVERTICAL);
    m_splitterPage182->SetSizer(boxSizer184);
    
    m_splitter186 = new wxSplitterWindow(m_splitterPage182, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxSP_LIVE_UPDATE|wxSP_NO_XP_THEME|wxSP_3DSASH);
    m_splitter186->SetSashGravity(1);
    m_splitter186->SetMinimumPaneSize(100);
    
    boxSizer184->Add(m_splitter186, 1, wxEXPAND, 5);
    
    m_splitterPage190 = new wxPanel(m_splitter186, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    
    wxBoxSizer* bSizer18 = new wxBoxSizer(wxHORIZONTAL);
    m_splitterPage190->SetSizer(bSizer18);
    
    m_splitter196 = new wxSplitterWindow(m_splitterPage190, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxSP_LIVE_UPDATE|wxSP_NO_XP_THEME|wxSP_3DSASH);
    m_splitter196->SetSashGravity(0);
    m_splitter196->SetMinimumPaneSize(100);
    
    bSizer18->Add(m_splitter196, 1, wxALL|wxEXPAND, 5);
    
    m_splitterPage200 = new wxPanel(m_splitter196, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    
    wxBoxSizer* boxSizer208 = new wxBoxSizer(wxVERTICAL);
    m_splitterPage200->SetSizer(boxSizer208);
    
    m_staticText210 = new wxStaticText(m_splitterPage200, wxID_ANY, _("Modified files:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer208->Add(m_staticText210, 0, wxALL, 5);
    
    wxArrayString m_fileListBoxArr;
    m_fileListBox = new wxListBox(m_splitterPage200, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_fileListBoxArr, 0);
    
    boxSizer208->Add(m_fileListBox, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 2);
    
    m_splitterPage204 = new wxPanel(m_splitter196, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_splitter196->SplitVertically(m_splitterPage200, m_splitterPage204, 0);
    
    wxBoxSizer* boxSizer215 = new wxBoxSizer(wxVERTICAL);
    m_splitterPage204->SetSizer(boxSizer215);
    
    m_staticText217 = new wxStaticText(m_splitterPage204, wxID_ANY, _("Diff:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer215->Add(m_staticText217, 0, wxALL, 5);
    
    m_stcDiff = new wxStyledTextCtrl(m_splitterPage204, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxBORDER_THEME);
    // Configure the fold margin
    m_stcDiff->SetMarginType     (4, wxSTC_MARGIN_SYMBOL);
    m_stcDiff->SetMarginMask     (4, wxSTC_MASK_FOLDERS);
    m_stcDiff->SetMarginSensitive(4, true);
    m_stcDiff->SetMarginWidth    (4, 0);
    
    // Configure the tracker margin
    m_stcDiff->SetMarginWidth(1, 0);
    
    // Configure the symbol margin
    m_stcDiff->SetMarginType (2, wxSTC_MARGIN_SYMBOL);
    m_stcDiff->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS));
    m_stcDiff->SetMarginWidth(2, 0);
    m_stcDiff->SetMarginSensitive(2, true);
    
    // Configure the line numbers margin
    m_stcDiff->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_stcDiff->SetMarginWidth(0,0);
    
    // Configure the line symbol margin
    m_stcDiff->SetMarginType(3, wxSTC_MARGIN_FORE);
    m_stcDiff->SetMarginMask(3, 0);
    m_stcDiff->SetMarginWidth(3,0);
    // Select the lexer
    m_stcDiff->SetLexer(wxSTC_LEX_DIFF);
    // Set default font / styles
    m_stcDiff->StyleClearAll();
    m_stcDiff->SetWrapMode(0);
    m_stcDiff->SetIndentationGuides(0);
    m_stcDiff->SetKeyWords(0, wxT(""));
    m_stcDiff->SetKeyWords(1, wxT(""));
    m_stcDiff->SetKeyWords(2, wxT(""));
    m_stcDiff->SetKeyWords(3, wxT(""));
    m_stcDiff->SetKeyWords(4, wxT(""));
    
    boxSizer215->Add(m_stcDiff, 1, wxALL|wxEXPAND, 2);
    
    m_splitterPage194 = new wxPanel(m_splitter186, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_splitter186->SplitHorizontally(m_splitterPage190, m_splitterPage194, 100);
    
    wxBoxSizer* boxSizer218 = new wxBoxSizer(wxVERTICAL);
    m_splitterPage194->SetSizer(boxSizer218);
    
    m_staticText220 = new wxStaticText(m_splitterPage194, wxID_ANY, _("Commit message:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer218->Add(m_staticText220, 0, wxALL, 5);
    
    m_stcCommitMessage = new wxStyledTextCtrl(m_splitterPage194, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxBORDER_THEME);
    // Configure the fold margin
    m_stcCommitMessage->SetMarginType     (4, wxSTC_MARGIN_SYMBOL);
    m_stcCommitMessage->SetMarginMask     (4, wxSTC_MASK_FOLDERS);
    m_stcCommitMessage->SetMarginSensitive(4, true);
    m_stcCommitMessage->SetMarginWidth    (4, 0);
    
    // Configure the tracker margin
    m_stcCommitMessage->SetMarginWidth(1, 0);
    
    // Configure the symbol margin
    m_stcCommitMessage->SetMarginType (2, wxSTC_MARGIN_SYMBOL);
    m_stcCommitMessage->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS));
    m_stcCommitMessage->SetMarginWidth(2, 0);
    m_stcCommitMessage->SetMarginSensitive(2, true);
    
    // Configure the line numbers margin
    m_stcCommitMessage->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_stcCommitMessage->SetMarginWidth(0,0);
    
    // Configure the line symbol margin
    m_stcCommitMessage->SetMarginType(3, wxSTC_MARGIN_FORE);
    m_stcCommitMessage->SetMarginMask(3, 0);
    m_stcCommitMessage->SetMarginWidth(3,0);
    // Select the lexer
    m_stcCommitMessage->SetLexer(wxSTC_LEX_NULL);
    // Set default font / styles
    m_stcCommitMessage->StyleClearAll();
    m_stcCommitMessage->SetWrapMode(0);
    m_stcCommitMessage->SetIndentationGuides(0);
    m_stcCommitMessage->SetKeyWords(0, wxT(""));
    m_stcCommitMessage->SetKeyWords(1, wxT(""));
    m_stcCommitMessage->SetKeyWords(2, wxT(""));
    m_stcCommitMessage->SetKeyWords(3, wxT(""));
    m_stcCommitMessage->SetKeyWords(4, wxT(""));
    
    boxSizer218->Add(m_stcCommitMessage, 1, wxALL|wxEXPAND, 2);
    
    m_stdBtnSizer290 = new wxStdDialogButtonSizer();
    
    bSizer17->Add(m_stdBtnSizer290, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_button292 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_button292->SetDefault();
    m_stdBtnSizer290->AddButton(m_button292);
    m_stdBtnSizer290->Realize();
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
    // Connect events
    this->Connect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(GitCommitListDlgBase::OnClose), NULL, this);
    m_dvListCtrlCommitList->Connect(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler(GitCommitListDlgBase::OnSelectionChanged), NULL, this);
    m_dvListCtrlCommitList->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEventHandler(GitCommitListDlgBase::OnContextMenu), NULL, this);
    m_fileListBox->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(GitCommitListDlgBase::OnChangeFile), NULL, this);
    m_button292->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitCommitListDlgBase::OnOK), NULL, this);
    
}
Esempio n. 9
0
GitCommitDlgBase::GitCommitDlgBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
    : wxDialog(parent, id, title, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCrafterpca4kKInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* bSizer4 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer4);
    
    m_splitterMain = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxSP_LIVE_UPDATE|wxSP_NO_XP_THEME|wxSP_3DSASH);
    m_splitterMain->SetSashGravity(1);
    m_splitterMain->SetMinimumPaneSize(20);
    
    bSizer4->Add(m_splitterMain, 1, wxALL|wxEXPAND, 5);
    
    m_panel3 = new wxPanel(m_splitterMain, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxTAB_TRAVERSAL);
    
    wxBoxSizer* bSizer12 = new wxBoxSizer(wxVERTICAL);
    m_panel3->SetSizer(bSizer12);
    
    m_splitterInner = new wxSplitterWindow(m_panel3, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxSP_LIVE_UPDATE|wxSP_NO_XP_THEME|wxSP_3DSASH);
    m_splitterInner->SetSashGravity(0);
    m_splitterInner->SetMinimumPaneSize(20);
    
    bSizer12->Add(m_splitterInner, 1, wxEXPAND, 5);
    
    m_panel1 = new wxPanel(m_splitterInner, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxTAB_TRAVERSAL);
    
    wxBoxSizer* bSizer11 = new wxBoxSizer(wxVERTICAL);
    m_panel1->SetSizer(bSizer11);
    
    m_staticText6 = new wxStaticText(m_panel1, wxID_ANY, _("Modified paths:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer11->Add(m_staticText6, 0, wxALL|wxALIGN_LEFT, 5);
    
    wxArrayString m_listBoxArr;
    m_listBox = new wxCheckListBox(m_panel1, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), m_listBoxArr, wxLB_SINGLE);
    
    bSizer11->Add(m_listBox, 1, wxALL|wxEXPAND, 5);
    
    m_panel2 = new wxPanel(m_splitterInner, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxTAB_TRAVERSAL);
    m_splitterInner->SplitVertically(m_panel1, m_panel2, 0);
    
    wxBoxSizer* bSizer9 = new wxBoxSizer(wxVERTICAL);
    m_panel2->SetSizer(bSizer9);
    
    m_staticText7 = new wxStaticText(m_panel2, wxID_ANY, _("Diff:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer9->Add(m_staticText7, 0, wxALL|wxALIGN_LEFT, 5);
    
    m_editor = new GitCommitEditor( m_panel2 );
    bSizer9->Add(m_editor, 1, wxALL|wxEXPAND, 5);
    
    m_panel4 = new wxPanel(m_splitterMain, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxTAB_TRAVERSAL);
    m_splitterMain->SplitHorizontally(m_panel3, m_panel4, 0);
    
    wxBoxSizer* bSizer13 = new wxBoxSizer(wxVERTICAL);
    m_panel4->SetSizer(bSizer13);
    
    m_staticText8 = new wxStaticText(m_panel4, wxID_ANY, _("Commit message:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer13->Add(m_staticText8, 0, wxALL|wxALIGN_LEFT, 5);
    
    m_stcCommitMessage = new wxStyledTextCtrl(m_panel4, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxBORDER_THEME);
    // Configure the fold margin
    m_stcCommitMessage->SetMarginType     (4, wxSTC_MARGIN_SYMBOL);
    m_stcCommitMessage->SetMarginMask     (4, wxSTC_MASK_FOLDERS);
    m_stcCommitMessage->SetMarginSensitive(4, true);
    m_stcCommitMessage->SetMarginWidth    (4, 0);
    
    // Configure the tracker margin
    m_stcCommitMessage->SetMarginWidth(1, 0);
    
    // Configure the symbol margin
    m_stcCommitMessage->SetMarginType (2, wxSTC_MARGIN_SYMBOL);
    m_stcCommitMessage->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS));
    m_stcCommitMessage->SetMarginWidth(2, 0);
    m_stcCommitMessage->SetMarginSensitive(2, true);
    
    // Configure the line numbers margin
    m_stcCommitMessage->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_stcCommitMessage->SetMarginWidth(0,0);
    
    // Configure the line symbol margin
    m_stcCommitMessage->SetMarginType(3, wxSTC_MARGIN_FORE);
    m_stcCommitMessage->SetMarginMask(3, 0);
    m_stcCommitMessage->SetMarginWidth(3,0);
    // Select the lexer
    m_stcCommitMessage->SetLexer(wxSTC_LEX_NULL);
    // Set default font / styles
    m_stcCommitMessage->StyleClearAll();
    m_stcCommitMessage->SetWrapMode(0);
    m_stcCommitMessage->SetIndentationGuides(0);
    m_stcCommitMessage->SetKeyWords(0, wxT(""));
    m_stcCommitMessage->SetKeyWords(1, wxT(""));
    m_stcCommitMessage->SetKeyWords(2, wxT(""));
    m_stcCommitMessage->SetKeyWords(3, wxT(""));
    m_stcCommitMessage->SetKeyWords(4, wxT(""));
    
    bSizer13->Add(m_stcCommitMessage, 1, wxALL|wxEXPAND, 5);
    
    m_checkBoxAmend = new wxCheckBox(m_panel4, wxID_ANY, _("Amend the previous commit"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_checkBoxAmend->SetValue(false);
    m_checkBoxAmend->SetToolTip(_("The 'git commit --amend' command is a convenient way to fix up the most recent commit. It lets you combine staged changes with the previous commit instead of committing it as an entirely new snapshot. It can also be used to simply edit the previous commit message without changing its snapshot"));
    
    bSizer13->Add(m_checkBoxAmend, 0, wxALL, 5);
    
    m_stdBtnSizer278 = new wxStdDialogButtonSizer();
    
    bSizer4->Add(m_stdBtnSizer278, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_buttonOK = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_buttonOK->SetDefault();
    m_stdBtnSizer278->AddButton(m_buttonOK);
    
    m_buttonCancel = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_stdBtnSizer278->AddButton(m_buttonCancel);
    m_stdBtnSizer278->Realize();
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
    // Connect events
    m_listBox->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(GitCommitDlgBase::OnChangeFile), NULL, this);
    m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitCommitDlgBase::OnCommitOK), NULL, this);
    
}
Esempio n. 10
0
GitSettingsDlgBase::GitSettingsDlgBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
    : wxDialog(parent, id, title, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCrafterpca4kKInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* mainSizer = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(mainSizer);
    
    m_treebook230 = new wxTreebook(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxBK_DEFAULT);
    
    mainSizer->Add(m_treebook230, 1, wxALL|wxEXPAND, 5);
    
    m_panel232 = new wxPanel(m_treebook230, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_treebook230->AddPage(m_panel232, _("Tools"), true, wxNOT_FOUND);
    
    wxBoxSizer* boxSizer240 = new wxBoxSizer(wxVERTICAL);
    m_panel232->SetSizer(boxSizer240);
    
    wxFlexGridSizer* fgSizer11 = new wxFlexGridSizer(0, 2, 0, 0);
    fgSizer11->SetFlexibleDirection( wxBOTH );
    fgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    fgSizer11->AddGrowableCol(1);
    
    boxSizer240->Add(fgSizer11, 0, wxALL|wxEXPAND, 5);
    
    m_staticText42 = new wxStaticText(m_panel232, wxID_ANY, _("Path to git executable:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer11->Add(m_staticText42, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_pathGIT = new wxFilePickerCtrl(m_panel232, wxID_ANY, wxEmptyString, wxT("Select a file"), wxT("*"), wxDefaultPosition, wxSize(-1, -1), wxFLP_DEFAULT_STYLE|wxFLP_USE_TEXTCTRL);
    
    fgSizer11->Add(m_pathGIT, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_staticText54 = new wxStaticText(m_panel232, wxID_ANY, _("Path to gitk executable:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer11->Add(m_staticText54, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_pathGITK = new wxFilePickerCtrl(m_panel232, wxID_ANY, wxEmptyString, wxT("Select a file"), wxT("*"), wxDefaultPosition, wxSize(-1, -1), wxFLP_DEFAULT_STYLE|wxFLP_USE_TEXTCTRL);
    
    fgSizer11->Add(m_pathGITK, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_panel234 = new wxPanel(m_treebook230, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_treebook230->AddPage(m_panel234, _("Configuration"), false, wxNOT_FOUND);
    
    wxBoxSizer* boxSizer242 = new wxBoxSizer(wxVERTICAL);
    m_panel234->SetSizer(boxSizer242);
    
    wxFlexGridSizer* flexGridSizer244 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer244->SetFlexibleDirection( wxBOTH );
    flexGridSizer244->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    flexGridSizer244->AddGrowableCol(1);
    
    boxSizer242->Add(flexGridSizer244, 1, wxALL|wxEXPAND, 5);
    
    m_staticText246 = new wxStaticText(m_panel234, wxID_ANY, _("Global user name:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer244->Add(m_staticText246, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlGlobalName = new wxTextCtrl(m_panel234, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
    m_textCtrlGlobalName->SetToolTip(_("Set the global user name (this name will tell git who you are)"));
    
    flexGridSizer244->Add(m_textCtrlGlobalName, 0, wxALL|wxEXPAND, 5);
    
    m_staticText250 = new wxStaticText(m_panel234, wxID_ANY, _("Global email:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer244->Add(m_staticText250, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlGlobalEmail = new wxTextCtrl(m_panel234, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
    m_textCtrlGlobalEmail->SetToolTip(_("Set the current repository email"));
    
    flexGridSizer244->Add(m_textCtrlGlobalEmail, 0, wxALL|wxEXPAND, 5);
    
    m_staticText254 = new wxStaticText(m_panel234, wxID_ANY, _("Local repository user name:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer244->Add(m_staticText254, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlLocalName = new wxTextCtrl(m_panel234, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
    m_textCtrlLocalName->SetToolTip(_("Set the current repository user name (this name will tell git who you are).\nIf this field letf empty, the global one is used"));
    
    flexGridSizer244->Add(m_textCtrlLocalName, 0, wxALL|wxEXPAND, 5);
    
    m_staticText258 = new wxStaticText(m_panel234, wxID_ANY, _("Local repository email:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer244->Add(m_staticText258, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlLocalEmail = new wxTextCtrl(m_panel234, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
    m_textCtrlLocalEmail->SetToolTip(_("Set the current repository email\nIf this field letf empty, the global one is used"));
    
    flexGridSizer244->Add(m_textCtrlLocalEmail, 0, wxALL|wxEXPAND, 5);
    
    m_panel236 = new wxPanel(m_treebook230, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_treebook230->AddPage(m_panel236, _("Misc"), false, wxNOT_FOUND);
    
    wxBoxSizer* boxSizer766 = new wxBoxSizer(wxVERTICAL);
    m_panel236->SetSizer(boxSizer766);
    
    m_checkBoxTerminal = new wxCheckBox(m_panel236, wxID_ANY, _("Show Terminal"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_checkBoxTerminal->SetValue(false);
    m_checkBoxTerminal->SetToolTip(_("Mainly useful for Windows when the password\nprompt is not accessible via the UI"));
    
    boxSizer766->Add(m_checkBoxTerminal, 0, wxALL, 5);
    
    m_checkBoxLog = new wxCheckBox(m_panel236, wxID_ANY, _("Verbose Logging"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_checkBoxLog->SetValue(false);
    m_checkBoxLog->SetToolTip(_("Tick this option to enable a verbose logging of git"));
    
    boxSizer766->Add(m_checkBoxLog, 0, wxALL, 5);
    
    m_checkBoxTrackTree = new wxCheckBox(m_panel236, wxID_ANY, _("Colour modified items in the workspace view"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_checkBoxTrackTree->SetValue(false);
    m_checkBoxTrackTree->SetToolTip(_("Colour modified items in the workspace view tree"));
    
    boxSizer766->Add(m_checkBoxTrackTree, 0, wxALL, 5);
    
    m_stdBtnSizer284 = new wxStdDialogButtonSizer();
    
    mainSizer->Add(m_stdBtnSizer284, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_buttonOK = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_buttonOK->SetDefault();
    m_stdBtnSizer284->AddButton(m_buttonOK);
    
    m_buttonCancel = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_stdBtnSizer284->AddButton(m_buttonCancel);
    m_stdBtnSizer284->Realize();
    
    m_treebook230->ExpandNode( 0, true );
    m_treebook230->ExpandNode( 1, true );
    m_treebook230->ExpandNode( 2, true );
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
    // Connect events
    m_staticText254->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitSettingsDlgBase::OnLocalRepoUI), NULL, this);
    m_textCtrlLocalName->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitSettingsDlgBase::OnLocalRepoUI), NULL, this);
    m_staticText258->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitSettingsDlgBase::OnLocalRepoUI), NULL, this);
    m_textCtrlLocalEmail->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitSettingsDlgBase::OnLocalRepoUI), NULL, this);
    m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitSettingsDlgBase::OnOK), NULL, this);
    
}
Esempio n. 11
0
MemCheckSettingsDialogBase::MemCheckSettingsDialogBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
    : wxDialog(parent, id, title, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCrafterpca4kKInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* boxSizer249 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer249);
    
    m_treebook251 = new wxTreebook(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxBK_DEFAULT);
    wxImageList* m_treebook251_il = new wxImageList(16, 16);
    m_treebook251->AssignImageList(m_treebook251_il);
    
    boxSizer249->Add(m_treebook251, 1, wxALL|wxEXPAND, 5);
    
    m_panel259 = new wxPanel(m_treebook251, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    int m_panel259ImgIndex;
    m_panel259ImgIndex = m_treebook251_il->Add(wxXmlResource::Get()->LoadBitmap(wxT("cog")));
    m_treebook251->AddPage(m_panel259, _("General"), false, m_panel259ImgIndex);
    
    wxBoxSizer* boxSizer261 = new wxBoxSizer(wxVERTICAL);
    m_panel259->SetSizer(boxSizer261);
    
    wxFlexGridSizer* flexGridSizer351 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer351->SetFlexibleDirection( wxBOTH );
    flexGridSizer351->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    flexGridSizer351->AddGrowableCol(1);
    
    boxSizer261->Add(flexGridSizer351, 0, wxALL|wxEXPAND, 5);
    
    m_staticText349 = new wxStaticText(m_panel259, wxID_ANY, _("Engine:"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_staticText349->SetToolTip(_("At this time (1Q 2014) only valgrind supported - development state."));
    
    flexGridSizer351->Add(m_staticText349, 0, wxRIGHT|wxTOP|wxBOTTOM, 5);
    
    wxArrayString m_choiceEngineArr;
    m_choiceEngineArr.Add(wxT("Valgrind"));
    m_choiceEngine = new wxChoice(m_panel259, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), m_choiceEngineArr, 0);
    m_choiceEngine->SetSelection(0);
    
    flexGridSizer351->Add(m_choiceEngine, 0, wxLEFT|wxRIGHT|wxBOTTOM, 5);
    
    m_staticText638 = new wxStaticText(m_panel259, wxID_ANY, _("Errors on page:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer261->Add(m_staticText638, 0, wxLEFT|wxRIGHT|wxTOP, 5);
    
    m_sliderPageCapacity = new wxSlider(m_panel259, wxID_ANY, 100, 1, 200, wxDefaultPosition, wxSize(-1,-1), wxSL_LABELS|wxSL_HORIZONTAL);
    
    boxSizer261->Add(m_sliderPageCapacity, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, 5);
    
    m_checkBoxOmitNonWorkspace = new wxCheckBox(m_panel259, wxID_ANY, _("Show locations only from my workspace."), wxDefaultPosition, wxSize(-1,-1), 0);
    m_checkBoxOmitNonWorkspace->SetValue(false);
    
    boxSizer261->Add(m_checkBoxOmitNonWorkspace, 0, wxALL, 5);
    
    m_checkBoxOmitDuplications = new wxCheckBox(m_panel259, wxID_ANY, _("Remove duplicate records."), wxDefaultPosition, wxSize(-1,-1), 0);
    m_checkBoxOmitDuplications->SetValue(false);
    
    boxSizer261->Add(m_checkBoxOmitDuplications, 0, wxALL, 5);
    
    m_checkBoxOmitSuppressed = new wxCheckBox(m_panel259, wxID_ANY, _("Remove suppressed errors."), wxDefaultPosition, wxSize(-1,-1), 0);
    m_checkBoxOmitSuppressed->SetValue(false);
    
    boxSizer261->Add(m_checkBoxOmitSuppressed, 0, wxALL, 5);
    
    wxBoxSizer* boxSizer430 = new wxBoxSizer(wxVERTICAL);
    
    boxSizer261->Add(boxSizer430, 0, wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_LEFT, 20);
    
    m_checkBoxOmitSuppressionsUnchanged = new wxCheckBox(m_panel259, wxID_ANY, _("Remove errors only if suppression rule was added without any change."), wxDefaultPosition, wxSize(-1,-1), 0);
    m_checkBoxOmitSuppressionsUnchanged->SetValue(false);
    m_checkBoxOmitSuppressionsUnchanged->Hide();
    
    boxSizer430->Add(m_checkBoxOmitSuppressionsUnchanged, 0, wxALL, 5);
    
    m_panel263 = new wxPanel(m_treebook251, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    int m_panel263ImgIndex;
    m_panel263ImgIndex = m_treebook251_il->Add(wxXmlResource::Get()->LoadBitmap(wxT("st-george_sm")));
    m_treebook251->AddPage(m_panel263, _("Valgrind (memcheck)"), false, m_panel263ImgIndex);
    
    m_panel669 = new wxPanel(m_treebook251, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_treebook251->InsertSubPage(1, m_panel669, _("Command Line"), false, wxNOT_FOUND);
    
    wxBoxSizer* boxSizer673 = new wxBoxSizer(wxVERTICAL);
    m_panel669->SetSizer(boxSizer673);
    
    wxFlexGridSizer* flexGridSizer269 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer269->SetFlexibleDirection( wxBOTH );
    flexGridSizer269->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    flexGridSizer269->AddGrowableCol(1);
    
    boxSizer673->Add(flexGridSizer269, 0, wxALL|wxEXPAND, 5);
    
    m_staticText271 = new wxStaticText(m_panel669, wxID_ANY, _("Valgrind executable:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer269->Add(m_staticText271, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_filePickerValgrindBinary = new wxFilePickerCtrl(m_panel669, wxID_ANY, wxEmptyString, wxT("Select a file"), wxT("*"), wxDefaultPosition, wxSize(-1,-1), wxFLP_DEFAULT_STYLE|wxFLP_USE_TEXTCTRL);
    m_filePickerValgrindBinary->SetToolTip(_("Select valgrind executable"));
    
    flexGridSizer269->Add(m_filePickerValgrindBinary, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    wxStaticBoxSizer* staticBoxSizer329 = new wxStaticBoxSizer( new wxStaticBox(m_panel669, wxID_ANY, _("Command line options")), wxVERTICAL);
    
    boxSizer673->Add(staticBoxSizer329, 0, wxALL|wxEXPAND, 5);
    
    wxFlexGridSizer* flexGridSizer331 = new wxFlexGridSizer(0, 3, 0, 0);
    flexGridSizer331->SetFlexibleDirection( wxBOTH );
    flexGridSizer331->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    flexGridSizer331->AddGrowableCol(1);
    
    staticBoxSizer329->Add(flexGridSizer331, 1, wxALL|wxEXPAND, 5);
    
    m_staticText333 = new wxStaticText(m_panel669, wxID_ANY, _("Mandatory:"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_staticText333->SetToolTip(_("Please do not use these options again and do not change their values!\nPlugin won't work."));
    
    flexGridSizer331->Add(m_staticText333, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlValgrindMandatoryOptions = new wxTextCtrl(m_panel669, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
    m_textCtrlValgrindMandatoryOptions->SetToolTip(_("Please do not use these options again and do not change their values!\nPlugin won't work."));
    m_textCtrlValgrindMandatoryOptions->Enable(false);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlValgrindMandatoryOptions->SetHint(wxT(""));
    #endif
    
    flexGridSizer331->Add(m_textCtrlValgrindMandatoryOptions, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    flexGridSizer331->Add(0, 0, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_staticText337 = new wxStaticText(m_panel669, wxID_ANY, _("Regular:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer331->Add(m_staticText337, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlValgrindOptions = new wxTextCtrl(m_panel669, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlValgrindOptions->SetHint(wxT(""));
    #endif
    
    flexGridSizer331->Add(m_textCtrlValgrindOptions, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_bmpButton341 = new wxBitmapButton(m_panel669, wxID_ANY, wxXmlResource::Get()->LoadBitmap(wxT("reload")), wxDefaultPosition, wxSize(-1,-1), wxBU_AUTODRAW);
    m_bmpButton341->SetToolTip(_("Reload defaults"));
    
    flexGridSizer331->Add(m_bmpButton341, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    wxStaticBoxSizer* staticBoxSizer432 = new wxStaticBoxSizer( new wxStaticBox(m_panel669, wxID_ANY, _("Temporary output file")), wxVERTICAL);
    
    boxSizer673->Add(staticBoxSizer432, 0, wxALL|wxEXPAND, 5);
    
    m_checkBoxOutputInPrivateFolder = new wxCheckBox(m_panel669, wxID_ANY, _("Use log file in workspace private folder."), wxDefaultPosition, wxSize(-1,-1), 0);
    m_checkBoxOutputInPrivateFolder->SetValue(false);
    m_checkBoxOutputInPrivateFolder->SetToolTip(_("It is used intenaly by this plugin. Valgrind outputs to this file and afterwards the plugin processes this file and shows result."));
    
    staticBoxSizer432->Add(m_checkBoxOutputInPrivateFolder, 0, wxALL, 5);
    
    m_filePickerValgrindOutputFile = new wxFilePickerCtrl(m_panel669, wxID_ANY, wxEmptyString, wxT("Select a file"), wxT("*"), wxDefaultPosition, wxSize(-1,-1), wxFLP_USE_TEXTCTRL|wxFLP_OPEN);
    m_filePickerValgrindOutputFile->SetToolTip(_("It is used intenaly by this plugin. Valgrind outputs to this file and afterwards the plugin processes this file and shows result."));
    
    staticBoxSizer432->Add(m_filePickerValgrindOutputFile, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_panel671 = new wxPanel(m_treebook251, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_treebook251->InsertSubPage(1, m_panel671, _("Supression"), false, wxNOT_FOUND);
    
    wxBoxSizer* boxSizer675 = new wxBoxSizer(wxVERTICAL);
    m_panel671->SetSizer(boxSizer675);
    
    wxStaticBoxSizer* staticBoxSizer437 = new wxStaticBoxSizer( new wxStaticBox(m_panel671, wxID_ANY, _("Suppression files")), wxVERTICAL);
    
    boxSizer675->Add(staticBoxSizer437, 1, wxALL|wxEXPAND, 5);
    
    m_checkBoxSuppFileInPrivateFolder = new wxCheckBox(m_panel671, wxID_ANY, _("Use workspace specific supp file as default."), wxDefaultPosition, wxSize(-1,-1), 0);
    m_checkBoxSuppFileInPrivateFolder->SetValue(false);
    m_checkBoxSuppFileInPrivateFolder->SetToolTip(_("This file is located in workspace private folder.\nIf you don't like this option, you have to add at leas one file to list below."));
    
    staticBoxSizer437->Add(m_checkBoxSuppFileInPrivateFolder, 0, wxALL, 5);
    
    wxArrayString m_listBoxSuppFilesArr;
    m_listBoxSuppFiles = new wxListBox(m_panel671, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), m_listBoxSuppFilesArr, wxLB_EXTENDED|wxLB_MULTIPLE);
    
    staticBoxSizer437->Add(m_listBoxSuppFiles, 1, wxALL|wxEXPAND, 5);
    m_listBoxSuppFiles->SetMinSize(wxSize(-1,200));
    
    m_stdBtnSizer511 = new wxStdDialogButtonSizer();
    
    boxSizer249->Add(m_stdBtnSizer511, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 10);
    
    m_button513 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_button513->SetDefault();
    m_stdBtnSizer511->AddButton(m_button513);
    
    m_button515 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_stdBtnSizer511->AddButton(m_button515);
    m_stdBtnSizer511->Realize();
    
    m_treebook251->ExpandNode( 0, true );
    m_treebook251->ExpandNode( 1, true );
    m_treebook251->ExpandNode( 2, true );
    m_treebook251->ExpandNode( 3, true );
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
    // Connect events
    m_bmpButton341->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MemCheckSettingsDialogBase::ValgrindResetOptions), NULL, this);
    m_filePickerValgrindOutputFile->Connect(wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler(MemCheckSettingsDialogBase::OnValgrindOutputFileChanged), NULL, this);
    m_filePickerValgrindOutputFile->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MemCheckSettingsDialogBase::OnFilePickerValgrindOutputFileUI), NULL, this);
    m_listBoxSuppFiles->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(MemCheckSettingsDialogBase::OnSuppListRightDown), NULL, this);
    m_button513->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MemCheckSettingsDialogBase::OnOK), NULL, this);
    
}
Esempio n. 12
0
MemCheckOutputViewBase::MemCheckOutputViewBase(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);
        wxCrafterpca4kKInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* boxSizer221 = new wxBoxSizer(wxHORIZONTAL);
    this->SetSizer(boxSizer221);
    
    m_auibar223 = new wxAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxAUI_TB_PLAIN_BACKGROUND|wxAUI_TB_DEFAULT_STYLE|wxAUI_TB_VERTICAL);
    m_auibar223->SetToolBitmapSize(wxSize(16,16));
    
    boxSizer221->Add(m_auibar223, 0, wxALL|wxEXPAND, 0);
    
    m_auibar223->AddTool(XRCID("memcheck_check_active_project"), _("Run check"), wxXmlResource::Get()->LoadBitmap(wxT("check")), wxNullBitmap, wxITEM_NORMAL, _("Run check"), wxT(""), NULL);
    
    m_auibar223->AddTool(XRCID("memcheck_import"), _("Load MemCheck log from file."), wxXmlResource::Get()->LoadBitmap(wxT("document_import")), wxNullBitmap, wxITEM_NORMAL, _("Load MemCheck log from file."), wxT(""), NULL);
    
    m_auibar223->AddTool(ID_TOOL_STOP_PROCESS, _("Stop Process"), wxXmlResource::Get()->LoadBitmap(wxT("stop")), wxNullBitmap, wxITEM_NORMAL, _("Stop Process"), _("Stop Process"), NULL);
    
    m_auibar223->AddSeparator();
    
    m_auibar223->AddTool(XRCID("memcheck_expand_all"), _("Expand all"), wxXmlResource::Get()->LoadBitmap(wxT("expand")), wxNullBitmap, wxITEM_NORMAL, _("Expand all"), wxT(""), NULL);
    
    m_auibar223->AddTool(XRCID("memcheck_next"), _("Jump to next error"), wxXmlResource::Get()->LoadBitmap(wxT("arrow_down")), wxNullBitmap, wxITEM_NORMAL, _("Jump to next error"), wxT(""), NULL);
    
    m_auibar223->AddTool(XRCID("memcheck_prev"), _("Jump to previous error"), wxXmlResource::Get()->LoadBitmap(wxT("arrow_up")), wxNullBitmap, wxITEM_NORMAL, _("Jump to previous error"), wxT(""), NULL);
    
    m_auibar223->AddSeparator();
    
    m_auibar223->AddTool(XRCID("memcheck_settings"), _("Settings"), wxXmlResource::Get()->LoadBitmap(wxT("setting_tools")), wxNullBitmap, wxITEM_NORMAL, _("Settings"), wxT(""), NULL);
    
    m_auibar223->AddSeparator();
    
    m_auibar223->AddTool(XRCID("memcheck_open_plain"), _("Open plain output in editor window."), wxXmlResource::Get()->LoadBitmap(wxT("plain")), wxNullBitmap, wxITEM_NORMAL, _("Open plain output in editor window."), wxT(""), NULL);
    m_auibar223->Realize();
    
    m_notebookOutputView = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), 0);
    wxImageList* m_notebookOutputView_il = new wxImageList(16, 16);
    m_notebookOutputView->AssignImageList(m_notebookOutputView_il);
    
    boxSizer221->Add(m_notebookOutputView, 1, wxALL|wxEXPAND, 2);
    
    m_panelErrors = new wxPanel(m_notebookOutputView, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    int m_panelErrorsImgIndex;
    m_panelErrorsImgIndex = m_notebookOutputView_il->Add(wxXmlResource::Get()->LoadBitmap(wxT("node-tree")));
    m_notebookOutputView->AddPage(m_panelErrors, _("Errors"), true, m_panelErrorsImgIndex);
    
    wxBoxSizer* boxSizer534 = new wxBoxSizer(wxHORIZONTAL);
    m_panelErrors->SetSizer(boxSizer534);
    
    m_dataViewCtrlErrors = new wxDataViewCtrl(m_panelErrors, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxBORDER_THEME);
    
    m_dataViewCtrlErrorsModel = new MemCheckDVCErrorsModel;
    m_dataViewCtrlErrorsModel->SetColCount( 6 );
    m_dataViewCtrlErrors->AssociateModel(m_dataViewCtrlErrorsModel.get() );
    
    boxSizer534->Add(m_dataViewCtrlErrors, 1, wxALL|wxEXPAND, 0);
    
    m_dataViewCtrlErrors->AppendBitmapColumn(_("Current"), m_dataViewCtrlErrors->GetColumnCount(), wxDATAVIEW_CELL_INERT, -2, wxALIGN_CENTER);
    m_dataViewCtrlErrors->AppendToggleColumn(_("Suppress"), m_dataViewCtrlErrors->GetColumnCount(), wxDATAVIEW_CELL_ACTIVATABLE, -2, wxALIGN_CENTER);
    m_dataViewCtrlErrors->AppendIconTextColumn(_("Label"), m_dataViewCtrlErrors->GetColumnCount(), wxDATAVIEW_CELL_INERT, -2, wxALIGN_LEFT);
    m_dataViewCtrlErrors->AppendTextColumn(_("File"), m_dataViewCtrlErrors->GetColumnCount(), wxDATAVIEW_CELL_INERT, -2, wxALIGN_LEFT);
    m_dataViewCtrlErrors->AppendTextColumn(_("Line"), m_dataViewCtrlErrors->GetColumnCount(), wxDATAVIEW_CELL_INERT, -2, wxALIGN_LEFT);
    m_dataViewCtrlErrors->AppendTextColumn(_("Object"), m_dataViewCtrlErrors->GetColumnCount(), wxDATAVIEW_CELL_INERT, -2, wxALIGN_LEFT);
    wxBoxSizer* boxSizer610 = new wxBoxSizer(wxVERTICAL);
    
    boxSizer534->Add(boxSizer610, 0, wxALL|wxALIGN_CENTER_VERTICAL, 0);
    
    m_bmpButtonPageFirst = new wxBitmapButton(m_panelErrors, XRCID("memcheck_page_first"), wxXmlResource::Get()->LoadBitmap(wxT("page_first")), wxDefaultPosition, wxSize(-1,-1), wxBU_AUTODRAW);
    m_bmpButtonPageFirst->SetToolTip(_("First result page."));
    
    boxSizer610->Add(m_bmpButtonPageFirst, 0, wxTOP|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_bmpButtonPagePrev = new wxBitmapButton(m_panelErrors, XRCID("memcheck_page_prev"), wxXmlResource::Get()->LoadBitmap(wxT("page_previous")), wxDefaultPosition, wxSize(-1,-1), wxBU_AUTODRAW);
    
    boxSizer610->Add(m_bmpButtonPagePrev, 0, wxTOP|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_textCtrlPageNumber = new wxTextCtrl(m_panelErrors, XRCID("memcheck_page_number"), wxT(""), wxDefaultPosition, wxSize(30,-1), wxTE_PROCESS_ENTER|wxTE_CENTRE);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlPageNumber->SetHint(wxT(""));
    #endif
    
    boxSizer610->Add(m_textCtrlPageNumber, 0, wxTOP|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_staticText622 = new wxStaticText(m_panelErrors, wxID_ANY, _("of"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer610->Add(m_staticText622, 0, wxTOP|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_staticTextPageMax = new wxStaticText(m_panelErrors, wxID_ANY, _("0"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer610->Add(m_staticTextPageMax, 0, wxTOP|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_bmpButtonPageNext = new wxBitmapButton(m_panelErrors, XRCID("memcheck_page_next"), wxXmlResource::Get()->LoadBitmap(wxT("page_next")), wxDefaultPosition, wxSize(-1,-1), wxBU_AUTODRAW);
    
    boxSizer610->Add(m_bmpButtonPageNext, 0, wxTOP|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_bmpButtonPageLast = new wxBitmapButton(m_panelErrors, XRCID("memcheck_page_last"), wxXmlResource::Get()->LoadBitmap(wxT("page_last")), wxDefaultPosition, wxSize(-1,-1), wxBU_AUTODRAW);
    
    boxSizer610->Add(m_bmpButtonPageLast, 0, wxTOP|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_panelSupp = new wxPanel(m_notebookOutputView, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    int m_panelSuppImgIndex;
    m_panelSuppImgIndex = m_notebookOutputView_il->Add(wxXmlResource::Get()->LoadBitmap(wxT("list")));
    m_notebookOutputView->AddPage(m_panelSupp, _(".supp"), false, m_panelSuppImgIndex);
    
    wxBoxSizer* boxSizer536 = new wxBoxSizer(wxHORIZONTAL);
    m_panelSupp->SetSizer(boxSizer536);
    
    m_splitter542 = new wxSplitterWindow(m_panelSupp, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxSP_LIVE_UPDATE|wxSP_NO_XP_THEME|wxSP_3DSASH);
    m_splitter542->SetSashGravity(0.5);
    m_splitter542->SetMinimumPaneSize(50);
    
    boxSizer536->Add(m_splitter542, 1, wxALL|wxEXPAND, 0);
    
    m_splitterPageFilter = new wxPanel(m_splitter542, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    
    wxBoxSizer* boxSizer548 = new wxBoxSizer(wxVERTICAL);
    m_splitterPageFilter->SetSizer(boxSizer548);
    
    wxBoxSizer* boxSizer655 = new wxBoxSizer(wxHORIZONTAL);
    
    boxSizer548->Add(boxSizer655, 0, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 5);
    
    m_staticText657 = new wxStaticText(m_splitterPageFilter, wxID_ANY, _(".supp:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer655->Add(m_staticText657, 0, wxLEFT|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    wxArrayString m_choiceSuppFileArr;
    m_choiceSuppFile = new wxChoice(m_splitterPageFilter, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), m_choiceSuppFileArr, 0);
    m_choiceSuppFile->SetToolTip(_("Choose suppression file to use."));
    
    boxSizer655->Add(m_choiceSuppFile, 1, wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 0);
    
    m_buttonSuppOpen = new wxButton(m_splitterPageFilter, XRCID("memcheck_supp_open"), _("Open"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer655->Add(m_buttonSuppOpen, 0, wxALIGN_CENTER_VERTICAL, 5);
    
    wxBoxSizer* boxSizer485 = new wxBoxSizer(wxHORIZONTAL);
    
    boxSizer548->Add(boxSizer485, 0, wxALL|wxEXPAND, 0);
    
    m_searchCtrlFilter = new wxSearchCtrl(m_splitterPageFilter, XRCID("memcheck_filter_supp"), wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_PROCESS_ENTER);
    m_searchCtrlFilter->ShowSearchButton(true);
    m_searchCtrlFilter->ShowCancelButton(false);
    
    boxSizer485->Add(m_searchCtrlFilter, 1, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 5);
    
    m_buttonClearFilter = new wxBitmapButton(m_splitterPageFilter, XRCID("memcheck_clear_filter"), wxXmlResource::Get()->LoadBitmap(wxT("broom")), wxDefaultPosition, wxSize(-1,-1), wxBU_AUTODRAW);
    m_buttonClearFilter->SetToolTip(_("Clear filter"));
    
    boxSizer485->Add(m_buttonClearFilter, 0, wxRIGHT|wxTOP|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    
    wxBoxSizer* boxSizer489 = new wxBoxSizer(wxHORIZONTAL);
    
    boxSizer548->Add(boxSizer489, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 0);
    
    m_checkBoxInvert = new wxCheckBox(m_splitterPageFilter, wxID_ANY, _("Invert"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_checkBoxInvert->SetValue(false);
    
    boxSizer489->Add(m_checkBoxInvert, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_checkBoxCase = new wxCheckBox(m_splitterPageFilter, wxID_ANY, _("Case"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_checkBoxCase->SetValue(false);
    
    boxSizer489->Add(m_checkBoxCase, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_checkBoxWord = new wxCheckBox(m_splitterPageFilter, wxID_ANY, _("Word"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_checkBoxWord->SetValue(false);
    
    boxSizer489->Add(m_checkBoxWord, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_checkBoxRegexp = new wxCheckBox(m_splitterPageFilter, wxID_ANY, _("RegExp"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_checkBoxRegexp->SetValue(false);
    
    boxSizer489->Add(m_checkBoxRegexp, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    boxSizer548->Add(0, 0, 1, wxALL, 5);
    
    m_staticTextSuppStatus = new wxStaticText(m_splitterPageFilter, wxID_ANY, _("Total: 0  Filtered: 0  Selected: 0"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer548->Add(m_staticTextSuppStatus, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_splitterPageList = new wxPanel(m_splitter542, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_splitter542->SplitVertically(m_splitterPageFilter, m_splitterPageList, 0);
    
    wxBoxSizer* boxSizer554 = new wxBoxSizer(wxVERTICAL);
    m_splitterPageList->SetSizer(boxSizer554);
    
    wxBoxSizer* boxSizer678 = new wxBoxSizer(wxHORIZONTAL);
    
    boxSizer554->Add(boxSizer678, 1, wxALL|wxEXPAND, 0);
    
    m_listCtrlErrors = new MemCheckListCtrlErrors(m_splitterPageList, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxLC_NO_HEADER|wxLC_VIRTUAL|wxLC_REPORT);
    
    boxSizer678->Add(m_listCtrlErrors, 1, wxALL|wxEXPAND, 5);
    
    m_listCtrlErrors->InsertColumn(m_listCtrlErrors->GetColumnCount(), _("Label"), wxLIST_FORMAT_LEFT, -1);
    wxBoxSizer* boxSizer680 = new wxBoxSizer(wxVERTICAL);
    
    boxSizer678->Add(boxSizer680, 0, wxALL, 5);
    
    m_buttonSuppressAll = new wxButton(m_splitterPageList, XRCID("memcheck_suppress_all"), _("Suppress all"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer680->Add(m_buttonSuppressAll, 0, wxBOTTOM|wxEXPAND|wxALIGN_RIGHT, 5);
    
    m_buttonSuppressSelected = new wxButton(m_splitterPageList, XRCID("memcheck_suppress_selected"), _("Suppress selected"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer680->Add(m_buttonSuppressSelected, 0, wxBOTTOM|wxEXPAND|wxALIGN_RIGHT, 5);
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
    // Connect events
    this->Connect(ID_TOOL_STOP_PROCESS, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MemCheckOutputViewBase::OnStop), NULL, this);
    this->Connect(ID_TOOL_STOP_PROCESS, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MemCheckOutputViewBase::OnStopUI), NULL, this);
    this->Connect(XRCID("memcheck_expand_all"), wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MemCheckOutputViewBase::OnExpandAll), NULL, this);
    this->Connect(XRCID("memcheck_expand_all"), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MemCheckOutputViewBase::OnMemCheckUI), NULL, this);
    this->Connect(XRCID("memcheck_next"), wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MemCheckOutputViewBase::OnJumpToNext), NULL, this);
    this->Connect(XRCID("memcheck_next"), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MemCheckOutputViewBase::OnMemCheckUI), NULL, this);
    this->Connect(XRCID("memcheck_prev"), wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MemCheckOutputViewBase::OnJumpToPrev), NULL, this);
    this->Connect(XRCID("memcheck_prev"), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MemCheckOutputViewBase::OnMemCheckUI), NULL, this);
    this->Connect(XRCID("memcheck_open_plain"), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MemCheckOutputViewBase::OnMemCheckUI), NULL, this);
    this->Connect(XRCID("memcheck_open_plain"), wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MemCheckOutputViewBase::OnOpenPlain), NULL, this);
    m_notebookOutputView->Connect(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler(MemCheckOutputViewBase::OutputViewPageChanged), NULL, this);
    m_dataViewCtrlErrors->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler(MemCheckOutputViewBase::OnActivated), NULL, this);
    m_dataViewCtrlErrors->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEventHandler(MemCheckOutputViewBase::OnValueChanged), NULL, this);
    m_dataViewCtrlErrors->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEventHandler(MemCheckOutputViewBase::OnContextMenu), NULL, this);
    m_dataViewCtrlErrors->Connect(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler(MemCheckOutputViewBase::OnSelectionChanged), NULL, this);
    m_bmpButtonPageFirst->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MemCheckOutputViewBase::OnPageFirst), NULL, this);
    m_bmpButtonPageFirst->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MemCheckOutputViewBase::OnErrorsPanelUI), NULL, this);
    m_bmpButtonPagePrev->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MemCheckOutputViewBase::OnPagePrev), NULL, this);
    m_bmpButtonPagePrev->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MemCheckOutputViewBase::OnErrorsPanelUI), NULL, this);
    m_textCtrlPageNumber->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MemCheckOutputViewBase::OnErrorsPanelUI), NULL, this);
    m_textCtrlPageNumber->Connect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(MemCheckOutputViewBase::OnPageSelect), NULL, this);
    m_bmpButtonPageNext->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MemCheckOutputViewBase::OnPageNext), NULL, this);
    m_bmpButtonPageNext->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MemCheckOutputViewBase::OnErrorsPanelUI), NULL, this);
    m_bmpButtonPageLast->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MemCheckOutputViewBase::OnPageLast), NULL, this);
    m_bmpButtonPageLast->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MemCheckOutputViewBase::OnErrorsPanelUI), NULL, this);
    m_choiceSuppFile->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(MemCheckOutputViewBase::OnSuppFileSelected), NULL, this);
    m_choiceSuppFile->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MemCheckOutputViewBase::OnSuppPanelUI), NULL, this);
    m_buttonSuppOpen->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MemCheckOutputViewBase::OnSuppFileOpen), NULL, this);
    m_buttonSuppOpen->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MemCheckOutputViewBase::OnSuppPanelUI), NULL, this);
    m_searchCtrlFilter->Connect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(MemCheckOutputViewBase::OnFilterErrors), NULL, this);
    m_searchCtrlFilter->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MemCheckOutputViewBase::OnSuppPanelUI), NULL, this);
    m_buttonClearFilter->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MemCheckOutputViewBase::OnClearFilter), NULL, this);
    m_buttonClearFilter->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MemCheckOutputViewBase::OnSuppPanelUI), NULL, this);
    m_listCtrlErrors->Connect(wxEVT_SIZE, wxSizeEventHandler(MemCheckOutputViewBase::OnListCtrlErrorsResize), NULL, this);
    m_listCtrlErrors->Connect(wxEVT_MOTION, wxMouseEventHandler(MemCheckOutputViewBase::OnListCtrlErrorsMouseMotion), NULL, this);
    m_listCtrlErrors->Connect(wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler(MemCheckOutputViewBase::OnListCtrlErrorsActivated), NULL, this);
    m_listCtrlErrors->Connect(wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(MemCheckOutputViewBase::OnListCtrlErrorsSelected), NULL, this);
    m_listCtrlErrors->Connect(wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler(MemCheckOutputViewBase::OnListCtrlErrorsDeselected), NULL, this);
    m_listCtrlErrors->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MemCheckOutputViewBase::OnListCtrlErrorsKeyDown), NULL, this);
    m_listCtrlErrors->Connect(wxEVT_KEY_UP, wxKeyEventHandler(MemCheckOutputViewBase::OnListCtrlErrorsKeyUp), NULL, this);
    m_listCtrlErrors->Connect(wxEVT_CHAR, wxKeyEventHandler(MemCheckOutputViewBase::OnListCtrlErrorsChar), NULL, this);
    m_listCtrlErrors->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(MemCheckOutputViewBase::OnListCtrlErrorsLeftDown), NULL, this);
    m_listCtrlErrors->Connect(wxEVT_LEFT_UP, wxMouseEventHandler(MemCheckOutputViewBase::OnListCtrlErrorsLeftUp), NULL, this);
    m_listCtrlErrors->Connect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(MemCheckOutputViewBase::OnListCtrlErrorsMouseLeave), NULL, this);
    m_buttonSuppressAll->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MemCheckOutputViewBase::OnSuppressAll), NULL, this);
    m_buttonSuppressAll->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MemCheckOutputViewBase::OnSuppPanelUI), NULL, this);
    m_buttonSuppressSelected->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MemCheckOutputViewBase::OnSuppressSelected), NULL, this);
    m_buttonSuppressSelected->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MemCheckOutputViewBase::OnSuppPanelUI), NULL, this);
    
}
Esempio n. 13
0
MemCheckIcons16::MemCheckIcons16()
    : wxImageList(16, 16, true)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCrafterpca4kKInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("memcheck_check"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("memcheck_check"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("memcheck_import"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("memcheck_import"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("memcheck_settings"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("memcheck_settings"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("memcheck_error"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("memcheck_error"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("memcheck_location"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("memcheck_location"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("memcheck_auxiliary"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("memcheck_auxiliary"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("memcheck_transparent"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("memcheck_transparent"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("memcheck_current"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("memcheck_current"), bmp ) );
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("memcheck_stop"));
        icn.CopyFromBitmap( bmp );
        this->Add( icn );
        m_bitmaps.insert( std::make_pair(wxT("memcheck_stop"), bmp ) );
    }
    
}