Example #1
0
FolderMappingBaseDlg::FolderMappingBaseDlg(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);
        wxCrafternz79PnInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* boxSizer179 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer179);
    
    m_staticText197 = new wxStaticText(this, wxID_ANY, _("You are debugging on a remote machine. In order for codelite\nto be able to load files into the editor, codelite needs to map the folders on\nyour local machine to the folders on the remote machine"), wxDefaultPosition, wxSize(-1,-1), wxALIGN_CENTRE);
    m_staticText197->SetForegroundColour(wxColour(wxT("rgb(0,64,0)")));
    wxFont m_staticText197Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_staticText197Font.SetWeight(wxFONTWEIGHT_BOLD);
    m_staticText197->SetFont(m_staticText197Font);
    
    boxSizer179->Add(m_staticText197, 0, wxALL|wxEXPAND, 10);
    
    wxFlexGridSizer* flexGridSizer187 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer187->SetFlexibleDirection( wxBOTH );
    flexGridSizer187->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    flexGridSizer187->AddGrowableCol(1);
    
    boxSizer179->Add(flexGridSizer187, 1, wxALL|wxEXPAND, 5);
    
    m_staticText189 = new wxStaticText(this, wxID_ANY, _("Local Folder:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer187->Add(m_staticText189, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_dirPickerLocal = new wxDirPickerCtrl(this, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxSize(-1,-1), wxDIRP_SMALL|wxDIRP_DEFAULT_STYLE|wxDIRP_USE_TEXTCTRL);
    m_dirPickerLocal->SetToolTip(_("Local Folder"));
    m_dirPickerLocal->SetFocus();
    
    flexGridSizer187->Add(m_dirPickerLocal, 0, wxALL|wxEXPAND, 5);
    
    m_staticText193 = new wxStaticText(this, wxID_ANY, _("Remote Folder:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer187->Add(m_staticText193, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlRemote = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
    m_textCtrlRemote->SetToolTip(_("Remote Folder"));
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlRemote->SetHint(wxT(""));
    #endif
    
    flexGridSizer187->Add(m_textCtrlRemote, 0, wxALL|wxEXPAND, 5);
    
    m_stdBtnSizer181 = new wxStdDialogButtonSizer();
    
    boxSizer179->Add(m_stdBtnSizer181, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 10);
    
    m_button183 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_button183->SetDefault();
    m_stdBtnSizer181->AddButton(m_button183);
    
    m_button185 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_stdBtnSizer181->AddButton(m_button185);
    m_stdBtnSizer181->Realize();
    
    SetName(wxT("FolderMappingBaseDlg"));
    SetSize(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_button183->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(FolderMappingBaseDlg::OnOKUI), NULL, this);
    
}
Example #2
0
bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward)
{
    wxASSERT_MSG( page != m_page, wxT("this is useless") );

    wxSizerFlags flags(1);
    flags.Border(wxALL, m_border).Expand();

    if ( !m_started )
    {
        if ( m_usingSizer )
        {
            m_sizerBmpAndPage->Add(m_sizerPage, flags);

            // now that our layout is computed correctly, hide the pages
            // artificially shown in wxWizardSizer::Insert() back again
            m_sizerPage->HidePages();
        }
    }


    // we'll use this to decide whether we have to change the label of this
    // button or not (initially the label is "Next")
    bool btnLabelWasNext = true;

    // remember the old bitmap (if any) to compare with the new one later
    wxBitmap bmpPrev;

    // check for previous page
    if ( m_page )
    {
        // send the event to the old page
        wxWizardEvent event(wxEVT_WIZARD_PAGE_CHANGING, GetId(),
                            goingForward, m_page);
        if ( m_page->GetEventHandler()->ProcessEvent(event) &&
             !event.IsAllowed() )
        {
            // vetoed by the page
            return false;
        }

        m_page->Hide();

        btnLabelWasNext = HasNextPage(m_page);

        bmpPrev = m_page->GetBitmap();

        if ( !m_usingSizer )
            m_sizerBmpAndPage->Detach(m_page);
    }

    // set the new page
    m_page = page;

    // is this the end?
    if ( !m_page )
    {
        // terminate successfully
        if ( IsModal() )
        {
            EndModal(wxID_OK);
        }
        else
        {
            SetReturnCode(wxID_OK);
            Hide();
        }

        // and notify the user code (this is especially useful for modeless
        // wizards)
        wxWizardEvent event(wxEVT_WIZARD_FINISHED, GetId(), false, 0);
        (void)GetEventHandler()->ProcessEvent(event);

        return true;
    }

    // position and show the new page
    (void)m_page->TransferDataToWindow();

    if ( m_usingSizer )
    {
        // wxWizardSizer::RecalcSizes wants to be called when m_page changes
        m_sizerPage->RecalcSizes();
    }
    else // pages are not managed by the sizer
    {
        m_sizerBmpAndPage->Add(m_page, flags);
        m_sizerBmpAndPage->SetItemMinSize(m_page, GetPageSize());
    }

#if wxUSE_STATBMP
    // update the bitmap if:it changed
    if ( m_statbmp )
    {
        wxBitmap bmp = m_page->GetBitmap();
        if ( !bmp.Ok() )
            bmp = m_bitmap;

        if ( !bmpPrev.Ok() )
            bmpPrev = m_bitmap;

        if ( !bmp.IsSameAs(bmpPrev) )
            m_statbmp->SetBitmap(bmp);
    }
#endif // wxUSE_STATBMP


    // and update the buttons state
    m_btnPrev->Enable(HasPrevPage(m_page));

    bool hasNext = HasNextPage(m_page);
    if ( btnLabelWasNext != hasNext )
    {
        m_btnNext->SetLabel(hasNext ? _("&Next >") : _("&Finish"));
    }
    // nothing to do: the label was already correct

    m_btnNext->SetDefault();


    // send the change event to the new page now
    wxWizardEvent event(wxEVT_WIZARD_PAGE_CHANGED, GetId(), goingForward, m_page);
    (void)m_page->GetEventHandler()->ProcessEvent(event);

    // and finally show it
    m_page->Show();
    m_page->SetFocus();

    if ( !m_usingSizer )
        m_sizerBmpAndPage->Layout();

    if ( !m_started )
    {
        m_started = true;

        if ( wxSystemSettings::GetScreenType() > wxSYS_SCREEN_PDA )
        {
            GetSizer()->SetSizeHints(this);
            if ( m_posWizard == wxDefaultPosition )
                CentreOnScreen();
        }
    }

    wxWizardEvent pageShownEvent(wxEVT_WIZARD_PAGE_SHOWN, GetId(),
        goingForward, m_page);
    m_page->GetEventHandler()->ProcessEvent(pageShownEvent);

    return true;
}
Example #3
0
QuickDebugBase::QuickDebugBase(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);
        wxCrafterSFKMcrInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* bSizer1 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer1);
    
    wxBoxSizer* bSizer3 = new wxBoxSizer(wxVERTICAL);
    
    bSizer1->Add(bSizer3, 1, wxALL|wxEXPAND, 5);
    
    wxFlexGridSizer* fgSizer1 = new wxFlexGridSizer(0, 3, 0, 0);
    fgSizer1->SetFlexibleDirection( wxBOTH );
    fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    fgSizer1->AddGrowableCol(1);
    
    bSizer3->Add(fgSizer1, 0, wxALL|wxEXPAND, 5);
    
    m_staticText2 = new wxStaticText(this, wxID_ANY, _("Select executable:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer1->Add(m_staticText2, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    wxArrayString m_ExeFilepathArr;
    m_ExeFilepath = new wxComboBox(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), m_ExeFilepathArr, 0);
    m_ExeFilepath->SetToolTip(_("Enter the filepath to the program that you want to debug.\nAlternatively, if you enter the path below, putting just the filename here will suffice."));
    m_ExeFilepath->SetFocus();
    #if wxVERSION_NUMBER >= 3000
    m_ExeFilepath->SetHint(wxT(""));
    #endif
    
    fgSizer1->Add(m_ExeFilepath, 0, wxALL|wxEXPAND, 5);
    
    m_buttonBrowseExe = new wxButton(this, wxID_ANY, _("..."), wxDefaultPosition, wxSize(-1, -1), wxBU_EXACTFIT);
    m_buttonBrowseExe->SetToolTip(_("Select executale to debug"));
    
    fgSizer1->Add(m_buttonBrowseExe, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_staticText5 = new wxStaticText(this, wxID_ANY, _("Working directory:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer1->Add(m_staticText5, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    wxArrayString m_WDArr;
    m_WD = new wxComboBox(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), m_WDArr, 0);
    m_WD->SetToolTip(_("Optionally, enter the path where the program that you want to debug can be found"));
    #if wxVERSION_NUMBER >= 3000
    m_WD->SetHint(wxT(""));
    #endif
    
    fgSizer1->Add(m_WD, 0, wxALL|wxEXPAND, 5);
    
    m_buttonBrowseWD = new wxButton(this, wxID_ANY, _("..."), wxDefaultPosition, wxSize(-1, -1), wxBU_EXACTFIT);
    m_buttonBrowseWD->SetToolTip(_("Browse for working directory"));
    
    fgSizer1->Add(m_buttonBrowseWD, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_staticText4 = new wxStaticText(this, wxID_ANY, _("Program arguments:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer1->Add(m_staticText4, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlArgs = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlArgs->SetHint(wxT(""));
    #endif
    
    fgSizer1->Add(m_textCtrlArgs, 0, wxALL|wxEXPAND, 5);
    
    fgSizer1->Add(0, 0, 1, wxALL, 5);
    
    m_staticText3 = new wxStaticText(this, wxID_ANY, _("Select debugger:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer1->Add(m_staticText3, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    wxArrayString m_choiceDebuggersArr;
    m_choiceDebuggers = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_choiceDebuggersArr, 0);
    
    fgSizer1->Add(m_choiceDebuggers, 0, wxALL|wxEXPAND, 5);
    
    fgSizer1->Add(0, 0, 1, wxALL, 5);
    
    m_staticText12 = new wxStaticText(this, wxID_ANY, _("Alternate debugger executable:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    fgSizer1->Add(m_staticText12, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlDebuggerExec = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
    m_textCtrlDebuggerExec->SetToolTip(_("Provide an alternate debugger executable to use.\nThis is currently only supported for GDB"));
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlDebuggerExec->SetHint(wxT(""));
    #endif
    
    fgSizer1->Add(m_textCtrlDebuggerExec, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_buttonBrowseDebugger = new wxButton(this, wxID_ANY, _("..."), wxDefaultPosition, wxSize(-1,-1), wxBU_EXACTFIT);
    m_buttonBrowseDebugger->SetToolTip(_("Select debugger executable"));
    
    fgSizer1->Add(m_buttonBrowseDebugger, 0, wxALIGN_CENTER_VERTICAL, 5);
    
    m_staticText6 = new wxStaticText(this, wxID_ANY, _("Startup commands:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer3->Add(m_staticText6, 0, wxALL, 5);
    
    m_textCtrlCmds = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), wxTE_RICH2|wxTE_PROCESS_TAB|wxTE_MULTILINE);
    #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_textCtrlCmdsFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_textCtrlCmdsFont.SetFamily(wxFONTFAMILY_TELETYPE);
    #else
    wxFont m_textCtrlCmdsFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT);
    m_textCtrlCmdsFont.SetFamily(wxFONTFAMILY_TELETYPE);
    #endif
    m_textCtrlCmds->SetFont(m_textCtrlCmdsFont);
    
    bSizer3->Add(m_textCtrlCmds, 1, wxALL|wxEXPAND, 5);
    m_textCtrlCmds->SetMinSize(wxSize(-1,150));
    
    m_stdBtnSizer2 = new wxStdDialogButtonSizer();
    
    bSizer1->Add(m_stdBtnSizer2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 10);
    
    m_buttonOK = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_buttonOK->SetDefault();
    m_stdBtnSizer2->AddButton(m_buttonOK);
    
    m_buttonCancel1 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_stdBtnSizer2->AddButton(m_buttonCancel1);
    m_stdBtnSizer2->Realize();
    
    SetName(wxT("QuickDebugBase"));
    SetMinClientSize(wxSize(500,400));
    SetSize(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_buttonBrowseExe->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(QuickDebugBase::OnButtonBrowseExe), NULL, this);
    m_buttonBrowseWD->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(QuickDebugBase::OnButtonBrowseWD), NULL, this);
    m_buttonBrowseDebugger->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(QuickDebugBase::OnSelectAlternateDebugger), NULL, this);
    m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(QuickDebugBase::OnButtonDebug), NULL, this);
    m_buttonCancel1->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(QuickDebugBase::OnButtonCancel), NULL, this);
    
}
Example #4
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;
    }
    
    wxBoxSizer* boxSizer1 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer1);
    
    m_mainPanel = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    
    boxSizer1->Add(m_mainPanel, 1, wxEXPAND, 5);
    
    wxBoxSizer* boxSizer11 = new wxBoxSizer(wxVERTICAL);
    m_mainPanel->SetSizer(boxSizer11);
    
    wxFlexGridSizer* flexGridSizer27 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer27->SetFlexibleDirection( wxBOTH );
    flexGridSizer27->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    
    boxSizer11->Add(flexGridSizer27, 1, wxALL|wxEXPAND, 5);
    
    m_button13 = new wxButton(m_mainPanel, wxID_ANY, _("Square"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer27->Add(m_button13, 0, wxALL, 5);
    
    m_button15 = new wxButton(m_mainPanel, wxID_ANY, _("Triangle"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer27->Add(m_button15, 0, wxALL, 5);
    
    m_staticText29 = new wxStaticText(m_mainPanel, wxID_ANY, _("Iteration Times"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer27->Add(m_staticText29, 0, wxALL, 5);
    
    m_textCtrl_IterationTimes = new wxTextCtrl(m_mainPanel, wxID_ANY, wxT("400"), wxDefaultPosition, wxSize(-1,-1), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrl_IterationTimes->SetHint(wxT(""));
    #endif
    
    flexGridSizer27->Add(m_textCtrl_IterationTimes, 0, wxALL, 5);
    
    m_staticText_Neurons = new wxStaticText(m_mainPanel, wxID_ANY, _("Neuron n*n"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer27->Add(m_staticText_Neurons, 0, wxALL, 5);
    
    m_textCtrl_weights = new wxTextCtrl(m_mainPanel, wxID_ANY, wxT("10"), wxDefaultPosition, wxSize(-1,-1), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrl_weights->SetHint(wxT(""));
    #endif
    
    flexGridSizer27->Add(m_textCtrl_weights, 0, wxALL, 5);
    
    m_button37 = new wxButton(m_mainPanel, wxID_ANY, _("STOP!"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer27->Add(m_button37, 0, wxALL, 5);
    
    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_mainToolbar = this->CreateToolBar(wxTB_FLAT, wxID_ANY);
    m_mainToolbar->SetToolBitmapSize(wxSize(16,16));
    
    SetName(wxT("MainFrameBaseClass"));
    SetSizeHints(500,300);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_button13->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnBtnSquare), NULL, this);
    m_button13->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBaseClass::OnUpdateSquare), NULL, this);
    m_button15->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnBtnTriangle), NULL, this);
    m_button15->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBaseClass::OnUpdateTriangle), NULL, this);
    m_button37->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnBtnStop), 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);
    
}
Example #5
0
CMakeSettingsDialogBase::CMakeSettingsDialogBase(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);
        wxCrafterR3nJ3cInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* boxSizerMain = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizerMain);
    
    wxFlexGridSizer* flexGridSizer = new wxFlexGridSizer(0, 2, 5, 5);
    flexGridSizer->SetFlexibleDirection( wxBOTH );
    flexGridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    flexGridSizer->AddGrowableCol(1);
    
    boxSizerMain->Add(flexGridSizer, 1, wxALL|wxEXPAND, 5);
    
    m_staticTextProgram = new wxStaticText(this, wxID_ANY, _("CMake program:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer->Add(m_staticTextProgram, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_filePickerProgram = new wxFilePickerCtrl(this, wxID_ANY, wxEmptyString, _("Select a file"), wxT("*"), wxDefaultPosition, wxSize(-1,-1), wxFLP_DEFAULT_STYLE|wxFLP_USE_TEXTCTRL);
    m_filePickerProgram->SetToolTip(_("Path to cmake executable."));
    
    flexGridSizer->Add(m_filePickerProgram, 1, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    m_filePickerProgram->SetMinSize(wxSize(200,-1));
    
    m_staticTextDefaultGenerator = new wxStaticText(this, wxID_ANY, _("Default Generator:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer->Add(m_staticTextDefaultGenerator, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    wxArrayString m_choiceDefaultGeneratorArr;
    m_choiceDefaultGenerator = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), m_choiceDefaultGeneratorArr, 0);
    m_choiceDefaultGenerator->SetToolTip(_("You can specify default generator for all projects (if is not overridden by project settings). If generator is not selected the CMake uses platform's default."));
    
    flexGridSizer->Add(m_choiceDefaultGenerator, 1, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_stdBtnSizer = new wxStdDialogButtonSizer();
    
    boxSizerMain->Add(m_stdBtnSizer, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_buttonOk = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_buttonOk->SetDefault();
    m_stdBtnSizer->AddButton(m_buttonOk);
    
    m_buttonCancel = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_stdBtnSizer->AddButton(m_buttonCancel);
    m_stdBtnSizer->Realize();
    
    SetName(wxT("CMakeSettingsDialogBase"));
    SetMinClientSize(wxSize(400,150));
    SetSize(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
}
Example #6
0
NodeJSNewWorkspaceDlgBase::NodeJSNewWorkspaceDlgBase(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);
        wxCD9C6InitBitmapResources();
        bBitmapLoaded = true;
    }

    wxBoxSizer* boxSizer140 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer140);

    wxFlexGridSizer* flexGridSizer148 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer148->SetFlexibleDirection(wxBOTH);
    flexGridSizer148->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
    flexGridSizer148->AddGrowableCol(1);

    boxSizer140->Add(flexGridSizer148, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText160 =
        new wxStaticText(this, wxID_ANY, _("Name:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer148->Add(m_staticText160, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_textCtrllName = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_textCtrllName->SetFocus();
#if wxVERSION_NUMBER >= 3000
    m_textCtrllName->SetHint(wxT(""));
#endif

    flexGridSizer148->Add(m_textCtrllName, 0, wxALL | wxEXPAND | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_staticText150 =
        new wxStaticText(this, wxID_ANY, _("Path:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer148->Add(m_staticText150, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_dirPickerFolder = new wxDirPickerCtrl(this, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition,
                                            wxDLG_UNIT(this, wxSize(-1, -1)),
                                            wxDIRP_SMALL | wxDIRP_DEFAULT_STYLE | wxDIRP_USE_TEXTCTRL);

    flexGridSizer148->Add(m_dirPickerFolder, 0, wxALL | wxEXPAND | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    flexGridSizer148->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));

    m_checkBoxNewFolder = new wxCheckBox(this, wxID_ANY, _("Create the workspace in a separate directory"),
                                         wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_checkBoxNewFolder->SetValue(true);

    flexGridSizer148->Add(m_checkBoxNewFolder, 0, wxALL | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_staticTextPreview =
        new wxStaticText(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxALIGN_CENTRE);
    m_staticTextPreview->SetForegroundColour(wxColour(wxT("rgb(21,144,18)")));

    boxSizer140->Add(m_staticTextPreview, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_stdBtnSizer142 = new wxStdDialogButtonSizer();

    boxSizer140->Add(m_stdBtnSizer142, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(10));

    m_button144 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_button144->SetDefault();
    m_stdBtnSizer142->AddButton(m_button144);

    m_button146 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_stdBtnSizer142->AddButton(m_button146);
    m_stdBtnSizer142->Realize();

    SetName(wxT("NodeJSNewWorkspaceDlgBase"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) { GetSizer()->Fit(this); }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
    // Connect events
    m_textCtrllName->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(NodeJSNewWorkspaceDlgBase::OnTextUpdate),
                             NULL, this);
    m_dirPickerFolder->Connect(wxEVT_COMMAND_DIRPICKER_CHANGED,
                               wxFileDirPickerEventHandler(NodeJSNewWorkspaceDlgBase::OnFolderSelected), NULL, this);
    m_checkBoxNewFolder->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
                                 wxCommandEventHandler(NodeJSNewWorkspaceDlgBase::OnCheckNewFolder), NULL, this);
    m_button144->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(NodeJSNewWorkspaceDlgBase::OnOKUI), NULL, this);
}
RenameSymbolBase::RenameSymbolBase(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);
        wxCF5E0InitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* bSizer1 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer1);
    
    wxBoxSizer* bSizer4 = new wxBoxSizer(wxHORIZONTAL);
    
    bSizer1->Add(bSizer4, 0, wxALL|wxEXPAND, 5);
    
    m_staticText31 = new wxStaticText(this, wxID_ANY, _("New Symbol Name:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer4->Add(m_staticText31, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlNewName = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_textCtrlNewName->SetFocus();
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlNewName->SetHint(wxT(""));
    #endif
    
    bSizer4->Add(m_textCtrlNewName, 1, wxALL, 5);
    
    m_splitter7 = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxSP_LIVE_UPDATE|wxSP_NO_XP_THEME|wxSP_3DSASH);
    m_splitter7->SetSashGravity(0.5);
    m_splitter7->SetMinimumPaneSize(10);
    
    bSizer1->Add(m_splitter7, 1, wxALL|wxEXPAND, 5);
    
    m_splitterPage11 = new wxPanel(m_splitter7, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    
    wxBoxSizer* bSizer2 = new wxBoxSizer(wxVERTICAL);
    m_splitterPage11->SetSizer(bSizer2);
    
    m_dvListCtrl = new wxDataViewListCtrl(m_splitterPage11, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxDV_ROW_LINES|wxDV_SINGLE);
    
    bSizer2->Add(m_dvListCtrl, 1, wxALL|wxEXPAND, 5);
    
    m_dvListCtrl->AppendToggleColumn(_("?"), wxDATAVIEW_CELL_ACTIVATABLE, -2, wxALIGN_LEFT);
    m_dvListCtrl->AppendTextColumn(_("Location"), wxDATAVIEW_CELL_INERT, -2, wxALIGN_LEFT);
    m_dvListCtrl->AppendTextColumn(_("Position"), wxDATAVIEW_CELL_INERT, -2, wxALIGN_LEFT);
    wxBoxSizer* boxSizer53 = new wxBoxSizer(wxHORIZONTAL);
    
    bSizer2->Add(boxSizer53, 0, wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_buttonCheckAll = new wxButton(m_splitterPage11, ID_CHECK_ALL, _("&Check All"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer53->Add(m_buttonCheckAll, 0, wxALL|wxEXPAND|wxALIGN_LEFT, 5);
    
    m_buttonUncheckAll = new wxButton(m_splitterPage11, ID_UNCHECK_ALL, _("&Uncheck All"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer53->Add(m_buttonUncheckAll, 0, wxALL|wxEXPAND|wxALIGN_LEFT, 5);
    
    m_splitterPage15 = new wxPanel(m_splitter7, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_splitter7->SplitVertically(m_splitterPage11, m_splitterPage15, 0);
    
    wxBoxSizer* boxSizer3 = new wxBoxSizer(wxVERTICAL);
    m_splitterPage15->SetSizer(boxSizer3);
    
    m_preview = new wxStyledTextCtrl(m_splitterPage15, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), 0);
    // Configure the fold margin
    m_preview->SetMarginType     (4, wxSTC_MARGIN_SYMBOL);
    m_preview->SetMarginMask     (4, wxSTC_MASK_FOLDERS);
    m_preview->SetMarginSensitive(4, true);
    m_preview->SetMarginWidth    (4, 0);
    
    // Configure the tracker margin
    m_preview->SetMarginWidth(1, 0);
    
    // Configure the symbol margin
    m_preview->SetMarginType (2, wxSTC_MARGIN_SYMBOL);
    m_preview->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS));
    m_preview->SetMarginWidth(2, 0);
    m_preview->SetMarginSensitive(2, true);
    
    // Configure the line numbers margin
    int m_preview_PixelWidth = 4 + 5 *m_preview->TextWidth(wxSTC_STYLE_LINENUMBER, wxT("9"));
    m_preview->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_preview->SetMarginWidth(0,m_preview_PixelWidth);
    
    // Configure the line symbol margin
    m_preview->SetMarginType(3, wxSTC_MARGIN_FORE);
    m_preview->SetMarginMask(3, 0);
    m_preview->SetMarginWidth(3,0);
    // Select the lexer
    m_preview->SetLexer(wxSTC_LEX_CPP);
    // Set default font / styles
    m_preview->StyleClearAll();
    m_preview->SetWrapMode(0);
    m_preview->SetIndentationGuides(0);
    m_preview->SetKeyWords(0, wxT(""));
    m_preview->SetKeyWords(1, wxT(""));
    m_preview->SetKeyWords(2, wxT(""));
    m_preview->SetKeyWords(3, wxT(""));
    m_preview->SetKeyWords(4, wxT(""));
    
    boxSizer3->Add(m_preview, 1, wxALL|wxEXPAND, 5);
    
    m_staticLine55 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxLI_HORIZONTAL);
    
    bSizer1->Add(m_staticLine55, 0, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* bSizer3 = new wxBoxSizer(wxHORIZONTAL);
    
    bSizer1->Add(bSizer3, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_buttonOk = new wxButton(this, wxID_OK, _("&Rename"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_buttonOk->SetDefault();
    
    bSizer3->Add(m_buttonOk, 0, wxALL, 5);
    
    m_buttonCancel = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer3->Add(m_buttonCancel, 0, wxALL, 5);
    
    SetName(wxT("RenameSymbolBase"));
    SetSizeHints(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent();
    } else {
        CentreOnScreen();
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_dvListCtrl->Connect(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler(RenameSymbolBase::OnSelection), NULL, this);
    m_buttonCheckAll->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(RenameSymbolBase::OnCheckAll), NULL, this);
    m_buttonUncheckAll->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(RenameSymbolBase::OnUncheckAll), NULL, this);
    m_buttonOk->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(RenameSymbolBase::OnButtonOK), NULL, this);
    
}
Example #8
0
/*
 * Method:    CInfoWindow()
 * Purpose:   constructor
 * Comments:  none
 */
CInfoWindow::CInfoWindow(PChildWindowObserver& aObserver,const tPvCameraInfo& aInfo)
    : PChildWindow(aObserver,L"",wxSize(300,200),0)               
{
    wxString lString;
    wxSizer* lMain;

    // format the title of the window
    lString =  wxString(aInfo.SerialString,wxConvUTF8);
    lString += _T(" (");
    lString += wxString(aInfo.DisplayName,wxConvUTF8);
    lString += _T(") - Information");
    // and set it
    SetTitle(lString);
    // Give it an icon
    SetIcon(wxIcon(bitmap1));
    // center on the screen
    CentreOnScreen(wxBOTH);
    #ifdef __WXMSW__
    // set the background color
    SetBackgroundColour(*wxLIGHT_GREY);
    #endif
    
    // create the main sizer
    lMain = new wxBoxSizer(wxVERTICAL);
    if(lMain)
    {
        // then create a grid size to fit all the label/value in
        wxSizer* lGrid = new wxGridSizer(2,6,5);

        if(lGrid)
        {        
            // Unique ID
  	    lString.Printf(wxT("%lu"),aInfo.UniqueId);
            lGrid->Add(new wxStaticText(this,wxID_ANY,_T("Unique ID:")),
                        wxSizerFlags().Align(wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL));
            lGrid->Add(new wxStaticText(this,wxID_ANY,lString),
                        wxSizerFlags().Align(wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL));
            // Serial number
            lGrid->Add(new wxStaticText(this,wxID_ANY,_T("Serial Number:")),
                        wxSizerFlags().Align(wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL));
            lGrid->Add(new wxStaticText(this,wxID_ANY,wxString(aInfo.SerialString,wxConvUTF8)),
                        wxSizerFlags().Align(wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL));
            // Part number
            lString.Printf(wxT("%lu"),aInfo.PartNumber);
            lGrid->Add(new wxStaticText(this,wxID_ANY,_T("Part Number:")),
                        wxSizerFlags().Align(wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL));
            lGrid->Add(new wxStaticText(this,wxID_ANY,lString),
                        wxSizerFlags().Align(wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL));
            // Part version
            lString.Printf(wxT("%c"),(char)aInfo.PartVersion);
            lGrid->Add(new wxStaticText(this,wxID_ANY,_T("Part Version:")),
                        wxSizerFlags().Align(wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL));
            lGrid->Add(new wxStaticText(this,wxID_ANY,lString),
                        wxSizerFlags().Align(wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL));
            // Interface type
            lGrid->Add(new wxStaticText(this,wxID_ANY,_T("Interface Type:")),
                        wxSizerFlags().Align(wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL));
            lGrid->Add(new wxStaticText(this,wxID_ANY,
                        (aInfo.InterfaceType == ePvInterfaceEthernet ? _T("Giga-Ethernet") : _T("Firewire"))),
                        wxSizerFlags().Align(wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL));
            lString.Printf(wxT("%lu"),aInfo.InterfaceId);
            lGrid->Add(new wxStaticText(this,wxID_ANY,_T("Interface ID:")),
                        wxSizerFlags().Align(wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL));
            lGrid->Add(new wxStaticText(this,wxID_ANY,lString),
                        wxSizerFlags().Align(wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL));
                                   
            // add the grid to the main sizer                       
            lMain->Add(lGrid,wxSizerFlags().Proportion(1).Expand().Border(wxALL,20));
        }
                          
        // set the main sizer in the window
        SetSizer(lMain);
        // and make that the window adjust its size to the sizer
        lMain->Fit(this);
    }
}
Example #9
0
bool wxGenericAboutDialog::Create(const wxAboutDialogInfo& info)
{
    // TODO: should we use main frame as parent by default here?
    if ( !wxDialog::Create(NULL, wxID_ANY, _("About ") + info.GetName(),
                           wxDefaultPosition, wxDefaultSize, wxRESIZE_BORDER|wxDEFAULT_DIALOG_STYLE) )
        return false;

    m_sizerText = new wxBoxSizer(wxVERTICAL);
    wxString nameAndVersion = info.GetName();
    if ( info.HasVersion() )
        nameAndVersion << _T(' ') << info.GetVersion();
    wxStaticText *label = new wxStaticText(this, wxID_ANY, nameAndVersion);
    wxFont fontBig(*wxNORMAL_FONT);
    fontBig.SetPointSize(fontBig.GetPointSize() + 2);
    fontBig.SetWeight(wxFONTWEIGHT_BOLD);
    label->SetFont(fontBig);

    m_sizerText->Add(label, wxSizerFlags().Centre().Border());
    m_sizerText->AddSpacer(5);

    AddText(info.GetCopyrightToDisplay());
    AddText(info.GetDescription());

    if ( info.HasWebSite() )
    {
#if wxUSE_HYPERLINKCTRL
        AddControl(new wxHyperlinkCtrl(this, wxID_ANY,
                                       info.GetWebSiteDescription(),
                                       info.GetWebSiteURL()));
#else
        AddText(info.GetWebSiteURL());
#endif // wxUSE_HYPERLINKCTRL/!wxUSE_HYPERLINKCTRL
    }

#if wxUSE_COLLPANE
    if ( info.HasLicence() )
        AddCollapsiblePane(_("License"), info.GetLicence());

    if ( info.HasDevelopers() )
        AddCollapsiblePane(_("Developers"),
                           AllAsString(info.GetDevelopers()));

    if ( info.HasDocWriters() )
        AddCollapsiblePane(_("Documentation writers"),
                           AllAsString(info.GetDocWriters()));

    if ( info.HasArtists() )
        AddCollapsiblePane(_("Artists"),
                           AllAsString(info.GetArtists()));

    if ( info.HasTranslators() )
        AddCollapsiblePane(_("Translators"),
                           AllAsString(info.GetTranslators()));
#endif // wxUSE_COLLPANE

    DoAddCustomControls();


    wxSizer *sizerIconAndText = new wxBoxSizer(wxHORIZONTAL);
#if wxUSE_STATBMP
    wxIcon icon = info.GetIcon();
    if ( icon.Ok() )
    {
        sizerIconAndText->Add(new wxStaticBitmap(this, wxID_ANY, icon),
                                wxSizerFlags().Border(wxRIGHT));
    }
#endif // wxUSE_STATBMP
    sizerIconAndText->Add(m_sizerText, wxSizerFlags(1).Expand());

    wxSizer *sizerTop = new wxBoxSizer(wxVERTICAL);
    sizerTop->Add(sizerIconAndText, wxSizerFlags(1).Expand().Border());

    wxSizer *sizerBtns = CreateButtonSizer(wxOK);
    if ( sizerBtns )
    {
        sizerTop->Add(sizerBtns, wxSizerFlags().Expand().Border());
    }

    SetSizerAndFit(sizerTop);

    CentreOnScreen();

    return true;
}
Example #10
0
SSHTerminalBase::SSHTerminalBase(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);
        wxCE8CInitBitmapResources();
        bBitmapLoaded = true;
    }
    // Set icon(s) to the application/dialog
    wxIconBundle app_icons;
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-console"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-console@2x"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    SetIcons( app_icons );

    
    wxBoxSizer* boxSizer124 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer124);
    
    m_auibar135 = new wxAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxAUI_TB_PLAIN_BACKGROUND|wxAUI_TB_DEFAULT_STYLE);
    m_auibar135->SetToolBitmapSize(wxSize(16,16));
    
    boxSizer124->Add(m_auibar135, 0, wxEXPAND, 5);
    
    m_auibar135->AddTool(wxID_CLEAR, _("Clear"), wxXmlResource::Get()->LoadBitmap(wxT("16-clear")), wxNullBitmap, wxITEM_NORMAL, _("Clear"), _("Clear"), NULL);
    m_auibar135->Realize();
    
    m_panel126 = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    
    boxSizer124->Add(m_panel126, 1, wxEXPAND, 5);
    
    wxBoxSizer* boxSizer116 = new wxBoxSizer(wxVERTICAL);
    m_panel126->SetSizer(boxSizer116);
    
    m_stcOutput = new wxStyledTextCtrl(m_panel126, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), 0);
    // Configure the fold margin
    m_stcOutput->SetMarginType     (4, wxSTC_MARGIN_SYMBOL);
    m_stcOutput->SetMarginMask     (4, wxSTC_MASK_FOLDERS);
    m_stcOutput->SetMarginSensitive(4, true);
    m_stcOutput->SetMarginWidth    (4, 0);
    
    // Configure the tracker margin
    m_stcOutput->SetMarginWidth(1, 0);
    
    // Configure the symbol margin
    m_stcOutput->SetMarginType (2, wxSTC_MARGIN_SYMBOL);
    m_stcOutput->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS));
    m_stcOutput->SetMarginWidth(2, 0);
    m_stcOutput->SetMarginSensitive(2, true);
    
    // Configure the line numbers margin
    m_stcOutput->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_stcOutput->SetMarginWidth(0,0);
    
    // Configure the line symbol margin
    m_stcOutput->SetMarginType(3, wxSTC_MARGIN_FORE);
    m_stcOutput->SetMarginMask(3, 0);
    m_stcOutput->SetMarginWidth(3,0);
    // Select the lexer
    m_stcOutput->SetLexer(wxSTC_LEX_NULL);
    // Set default font / styles
    m_stcOutput->StyleClearAll();
    m_stcOutput->SetWrapMode(0);
    m_stcOutput->SetIndentationGuides(0);
    m_stcOutput->SetKeyWords(0, wxT(""));
    m_stcOutput->SetKeyWords(1, wxT(""));
    m_stcOutput->SetKeyWords(2, wxT(""));
    m_stcOutput->SetKeyWords(3, wxT(""));
    m_stcOutput->SetKeyWords(4, wxT(""));
    
    boxSizer116->Add(m_stcOutput, 1, wxALL|wxEXPAND, 2);
    
    m_textCtrl1 = new wxTextCtrl(m_panel126, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_PROCESS_ENTER);
    #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_textCtrl1Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_textCtrl1Font.SetFamily(wxFONTFAMILY_TELETYPE);
    #else
    wxFont m_textCtrl1Font = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT);
    m_textCtrl1Font.SetFamily(wxFONTFAMILY_TELETYPE);
    #endif
    m_textCtrl1->SetFont(m_textCtrl1Font);
    m_textCtrl1->SetFocus();
    #if wxVERSION_NUMBER >= 3000
    m_textCtrl1->SetHint(_("Type a command and hit ENTER"));
    #endif
    
    boxSizer116->Add(m_textCtrl1, 0, wxALL|wxEXPAND, 2);
    
    SetName(wxT("SSHTerminalBase"));
    SetSize(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    this->Connect(wxID_CLEAR, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SSHTerminalBase::OnClear), NULL, this);
    this->Connect(wxID_CLEAR, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SSHTerminalBase::OnClearUI), NULL, this);
    m_textCtrl1->Connect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(SSHTerminalBase::OnSendCommand), NULL, this);
    
}
Example #11
0
SplashScreen::SplashScreen( wxBitmap &label, long timeout, wxWindow *parent, wxWindowID id, long style )
        : wxFrame( parent, id, wxEmptyString, wxPoint( 0, 0 ), wxSize( 100, 100 ), style ),
        r( 0, 0, 181, 181 ), m_timer( this, cbSplashScreen_timer_id ),
        timeUp(false)
{
    r.Union( label );

    int w = label.GetWidth();
    int h = label.GetHeight();

    SetClientSize( w, h );
    CentreOnScreen();

    wxScreenDC screen_dc;
    wxMemoryDC label_dc;

    int x;
    int y;

    x = GetPosition().x;
    y = GetPosition().y;

    m_label.Create( w, h );

    label_dc.SelectObject( m_label );
    label_dc.Blit( 0, 0, w, h, &screen_dc, x, y );
    label_dc.DrawBitmap( label, 0, 0, true );
    label_dc.SelectObject( wxNullBitmap );

    SetShape( r );

    Show( true );
    SetThemeEnabled( false ); // seems to be useful by description
    SetBackgroundStyle( wxBG_STYLE_CUSTOM ); // the trick for GTK+ (notice it's after Show())

    SetTitle("GDevelop");

    wxIconBundle icons;
    icons.AddIcon("res/icon16.png");
    icons.AddIcon("res/icon24.png");
    #if defined(LINUX) || defined(MACOS)
    icons.AddIcon("res/icon32linux.png");
    icons.AddIcon("res/icon48linux.png");
    icons.AddIcon("res/icon64linux.png");
    icons.AddIcon("res/icon128linux.png");
    #else
    icons.AddIcon("res/icon32.png");
    icons.AddIcon("res/icon48.png");
    icons.AddIcon("res/icon128.png");
    #endif
    SetIcons(icons);

    Centre( wxBOTH | wxCENTRE_ON_SCREEN ); // centre only works when the window is showing

    Update();
    wxYieldIfNeeded();

    if ( timeout != -1 )
    {
        m_timer.Start( timeout, true );
    }
}
Example #12
0
SFTPBrowserBaseDlg::SFTPBrowserBaseDlg(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);
        wxCE8CInitBitmapResources();
        bBitmapLoaded = true;
    }
    // Set icon(s) to the application/dialog
    wxIconBundle app_icons;
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-remote-folder"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-remote-folder@2x"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    SetIcons( app_icons );

    
    wxBoxSizer* boxSizer62 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer62);
    
    wxGridBagSizer* gridBagSizer80 = new wxGridBagSizer(0, 0);
    
    boxSizer62->Add(gridBagSizer80, 0, wxALL|wxEXPAND, 5);
    
    m_staticText66 = new wxStaticText(this, wxID_ANY, _("Path:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    gridBagSizer80->Add(m_staticText66, wxGBPosition(1,0), wxGBSpan(1,1), wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlRemoteFolder = new wxTextCtrl(this, wxID_ANY, wxT("/"), wxDefaultPosition, wxSize(-1,-1), wxTE_PROCESS_ENTER);
    m_textCtrlRemoteFolder->SetToolTip(_("Set the remote folder to browse and click on the 'Refresh' button"));
    m_textCtrlRemoteFolder->SetFocus();
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlRemoteFolder->SetHint(wxT(""));
    #endif
    
    gridBagSizer80->Add(m_textCtrlRemoteFolder, wxGBPosition(1,1), wxGBSpan(1,1), wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_buttonRefresh = new wxButton(this, wxID_REFRESH, _("Connect..."), wxDefaultPosition, wxSize(-1,-1), 0);
    
    gridBagSizer80->Add(m_buttonRefresh, wxGBPosition(1,2), wxGBSpan(1,1), wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_staticText82 = new wxStaticText(this, wxID_ANY, _("Account:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    gridBagSizer80->Add(m_staticText82, wxGBPosition(0,0), wxGBSpan(1,1), wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    wxArrayString m_choiceAccountArr;
    m_choiceAccount = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), m_choiceAccountArr, 0);
    
    gridBagSizer80->Add(m_choiceAccount, wxGBPosition(0,1), wxGBSpan(1,2), wxALL|wxEXPAND, 5);
    gridBagSizer80->AddGrowableCol(1);
    m_toolbar = new wxToolBar(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTB_NODIVIDER|wxTB_FLAT);
    m_toolbar->SetToolBitmapSize(wxSize(16,16));
    
    boxSizer62->Add(m_toolbar, 0, wxALL|wxEXPAND, 5);
    
    m_toolbar->AddTool(ID_CD_UP, _("Parent folder"), wxXmlResource::Get()->LoadBitmap(wxT("16-up")), wxNullBitmap, wxITEM_NORMAL, _("Parent folder"), _("Parent folder"), NULL);
    
    m_toolbar->AddTool(ID_SSH_ACCOUNT_MANAGER, _("Open SSH Account Manager..."), wxXmlResource::Get()->LoadBitmap(wxT("16-folder-users")), wxNullBitmap, wxITEM_NORMAL, _("Open SSH Account Manager..."), _("Open SSH Account Manager..."), NULL);
    m_toolbar->Realize();
    
    m_dataview = new wxDataViewCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(600,100), wxDV_ROW_LINES|wxDV_SINGLE);
    
    m_dataviewModel = new SFTPTreeModel;
    m_dataviewModel->SetColCount( 3 );
    m_dataview->AssociateModel(m_dataviewModel.get() );
    
    boxSizer62->Add(m_dataview, 1, wxALL|wxEXPAND, 5);
    
    m_dataview->AppendIconTextColumn(_("Name"), m_dataview->GetColumnCount(), wxDATAVIEW_CELL_INERT, 400, wxALIGN_LEFT);
    m_dataview->AppendTextColumn(_("Type"), m_dataview->GetColumnCount(), wxDATAVIEW_CELL_INERT, 100, wxALIGN_LEFT);
    m_dataview->AppendTextColumn(_("Size"), m_dataview->GetColumnCount(), wxDATAVIEW_CELL_INERT, 100, wxALIGN_LEFT);
    wxBoxSizer* boxSizer94 = new wxBoxSizer(wxVERTICAL);
    
    boxSizer62->Add(boxSizer94, 0, wxEXPAND|wxRESERVE_SPACE_EVEN_IF_HIDDEN, 5);
    
    m_textCtrlInlineSearch = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_PROCESS_ENTER);
    m_textCtrlInlineSearch->Hide();
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlInlineSearch->SetHint(wxT(""));
    #endif
    
    boxSizer94->Add(m_textCtrlInlineSearch, 0, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* boxSizer57 = new wxBoxSizer(wxHORIZONTAL);
    
    boxSizer62->Add(boxSizer57, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_button59 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_button59->SetDefault();
    
    boxSizer57->Add(m_button59, 0, wxALL, 5);
    
    m_button61 = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer57->Add(m_button61, 0, wxALL, 5);
    
    SetName(wxT("SFTPBrowserBaseDlg"));
    SetSize(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_textCtrlRemoteFolder->Connect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(SFTPBrowserBaseDlg::OnTextEnter), NULL, this);
    m_buttonRefresh->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SFTPBrowserBaseDlg::OnRefresh), NULL, this);
    m_buttonRefresh->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPBrowserBaseDlg::OnRefreshUI), NULL, this);
    this->Connect(ID_CD_UP, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SFTPBrowserBaseDlg::OnCdUp), NULL, this);
    this->Connect(ID_CD_UP, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPBrowserBaseDlg::OnCdUpUI), NULL, this);
    this->Connect(ID_SSH_ACCOUNT_MANAGER, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SFTPBrowserBaseDlg::OnSSHAccountManager), NULL, this);
    m_dataview->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler(SFTPBrowserBaseDlg::OnItemActivated), NULL, this);
    m_dataview->Connect(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler(SFTPBrowserBaseDlg::OnItemSelected), NULL, this);
    m_dataview->Connect(wxEVT_CHAR, wxKeyEventHandler(SFTPBrowserBaseDlg::OnKeyDown), NULL, this);
    m_textCtrlInlineSearch->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(SFTPBrowserBaseDlg::OnTextUpdated), NULL, this);
    m_textCtrlInlineSearch->Connect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(SFTPBrowserBaseDlg::OnEnter), NULL, this);
    m_textCtrlInlineSearch->Connect(wxEVT_KILL_FOCUS, wxFocusEventHandler(SFTPBrowserBaseDlg::OnFocusLost), NULL, this);
    m_button59->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPBrowserBaseDlg::OnOKUI), NULL, this);
    
}
Example #13
0
SSHAccountManagerDlgBase::SSHAccountManagerDlgBase(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);
        wxCE8CInitBitmapResources();
        bBitmapLoaded = true;
    }
    // Set icon(s) to the application/dialog
    wxIconBundle app_icons;
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-remote-folder"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-remote-folder@2x"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    SetIcons( app_icons );

    
    wxBoxSizer* boxSizer2 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer2);
    
    wxBoxSizer* boxSizer10 = new wxBoxSizer(wxHORIZONTAL);
    
    boxSizer2->Add(boxSizer10, 1, wxALL|wxEXPAND, 5);
    
    m_dvListCtrlAccounts = new wxDataViewListCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(400,400), wxDV_VERT_RULES|wxDV_ROW_LINES|wxDV_MULTIPLE|wxDV_SINGLE);
    
    boxSizer10->Add(m_dvListCtrlAccounts, 1, wxALL|wxEXPAND, 5);
    
    m_dvListCtrlAccounts->AppendTextColumn(_("Account"), wxDATAVIEW_CELL_INERT, 150, wxALIGN_LEFT);
    m_dvListCtrlAccounts->AppendTextColumn(_("Host"), wxDATAVIEW_CELL_INERT, 75, wxALIGN_LEFT);
    m_dvListCtrlAccounts->AppendTextColumn(_("User"), wxDATAVIEW_CELL_INERT, 75, wxALIGN_LEFT);
    wxBoxSizer* boxSizer15 = new wxBoxSizer(wxVERTICAL);
    
    boxSizer10->Add(boxSizer15, 0, wxEXPAND, 5);
    
    m_buttonNew = new wxButton(this, wxID_ADD, _("&Add"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_buttonNew->SetToolTip(_("Add new account"));
    
    boxSizer15->Add(m_buttonNew, 0, wxALL|wxEXPAND, 5);
    
    m_buttonDelete = new wxButton(this, wxID_DELETE, _("&Delete"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_buttonDelete->SetToolTip(_("Delete the selected accounts"));
    
    boxSizer15->Add(m_buttonDelete, 0, wxALL|wxEXPAND, 5);
    
    m_buttonEdit = new wxButton(this, wxID_EDIT, _("&Edit"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_buttonEdit->SetToolTip(_("Edit the selected account"));
    
    boxSizer15->Add(m_buttonEdit, 0, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* boxSizer4 = new wxBoxSizer(wxHORIZONTAL);
    
    boxSizer2->Add(boxSizer4, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_button6 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_button6->SetDefault();
    
    boxSizer4->Add(m_button6, 0, wxALL, 5);
    
    m_button8 = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer4->Add(m_button8, 0, wxALL, 5);
    
    SetName(wxT("SSHAccountManagerDlgBase"));
    SetSize(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_dvListCtrlAccounts->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler(SSHAccountManagerDlgBase::OnItemActivated), NULL, this);
    m_buttonNew->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SSHAccountManagerDlgBase::OnAddAccount), NULL, this);
    m_buttonDelete->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SSHAccountManagerDlgBase::OnDeleteAccount), NULL, this);
    m_buttonDelete->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SSHAccountManagerDlgBase::OnDeleteAccountUI), NULL, this);
    m_buttonEdit->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SSHAccountManagerDlgBase::OnEditAccountUI), NULL, this);
    m_buttonEdit->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SSHAccountManagerDlgBase::OnEditAccount), NULL, this);
    
}
Example #14
0
AddSSHAcountDlgBase::AddSSHAcountDlgBase(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);
        wxCE8CInitBitmapResources();
        bBitmapLoaded = true;
    }
    // Set icon(s) to the application/dialog
    wxIconBundle app_icons;
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-remote-folder"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-remote-folder@2x"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    SetIcons( app_icons );

    
    wxBoxSizer* boxSizer23 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer23);
    
    m_infobar = new wxInfoBar(this, wxID_ANY);
    m_infobar->SetSize(wxSize(-1,-1));
    
    boxSizer23->Add(m_infobar, 0, wxEXPAND, 5);
    
    wxFlexGridSizer* flexGridSizer31 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer31->SetFlexibleDirection( wxBOTH );
    flexGridSizer31->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    flexGridSizer31->AddGrowableCol(1);
    
    boxSizer23->Add(flexGridSizer31, 0, wxALL|wxEXPAND, 5);
    
    m_staticText98 = new wxStaticText(this, wxID_ANY, _("Account Name:"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_staticText98->SetToolTip(_("Give this account a unique name"));
    
    flexGridSizer31->Add(m_staticText98, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlName = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(250,-1), 0);
    m_textCtrlName->SetToolTip(_("Give this account a unique name"));
    m_textCtrlName->SetFocus();
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlName->SetHint(wxT(""));
    #endif
    
    flexGridSizer31->Add(m_textCtrlName, 0, wxALL|wxEXPAND, 5);
    
    m_staticHostIp = new wxStaticText(this, wxID_ANY, _("Host / IP:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer31->Add(m_staticHostIp, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlHost = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
    m_textCtrlHost->SetToolTip(_("The remote host ip address or its known name"));
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlHost->SetHint(wxT(""));
    #endif
    
    flexGridSizer31->Add(m_textCtrlHost, 0, wxALL|wxEXPAND, 5);
    
    m_staticText45 = new wxStaticText(this, wxID_ANY, _("Port:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer31->Add(m_staticText45, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlPort = new wxTextCtrl(this, wxID_ANY, wxT("22"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_textCtrlPort->SetToolTip(_("The SSH port. If you don't know it, leave it as 22 (SSH default port)"));
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlPort->SetHint(wxT(""));
    #endif
    
    flexGridSizer31->Add(m_textCtrlPort, 0, wxALL|wxEXPAND, 5);
    
    m_staticText37 = new wxStaticText(this, wxID_ANY, _("Username:"******""), wxDefaultPosition, wxSize(-1,-1), 0);
    m_textCtrlUsername->SetToolTip(_("Login user name"));
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlUsername->SetHint(wxT(""));
    #endif
    
    flexGridSizer31->Add(m_textCtrlUsername, 0, wxALL|wxEXPAND, 5);
    
    m_staticText41 = new wxStaticText(this, wxID_ANY, _("Password:"******""), wxDefaultPosition, wxSize(-1,-1), wxTE_PASSWORD);
    m_textCtrlPassword->SetToolTip(_("This field is optional. By leaving this field empty, codelite will attempt to connect only using public key authentication"));
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlPassword->SetHint(wxT(""));
    #endif
    
    flexGridSizer31->Add(m_textCtrlPassword, 0, wxALL|wxEXPAND, 5);
    
    m_staticText110 = new wxStaticText(this, wxID_ANY, _("Default folder:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer31->Add(m_staticText110, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlHomeFolder = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
    m_textCtrlHomeFolder->SetToolTip(_("Set the home folder for this account"));
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlHomeFolder->SetHint(wxT(""));
    #endif
    
    flexGridSizer31->Add(m_textCtrlHomeFolder, 0, wxALL|wxEXPAND, 5);
    
    m_button51 = new wxButton(this, wxID_ANY, _("Test Connection"), wxDefaultPosition, wxSize(-1,-1), 0);
    #if wxVERSION_NUMBER >= 2904
    m_button51->SetBitmap(wxXmlResource::Get()->LoadBitmap(wxT("16-connected")), wxLEFT);
    m_button51->SetBitmapMargins(5,5);
    #endif
    
    boxSizer23->Add(m_button51, 0, wxALL|wxEXPAND, 10);
    
    boxSizer23->Add(0, 0, 1, wxALL, 5);
    
    wxBoxSizer* boxSizer29 = new wxBoxSizer(wxHORIZONTAL);
    
    boxSizer23->Add(boxSizer29, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_button27 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_button27->SetDefault();
    
    boxSizer29->Add(m_button27, 0, wxALL, 5);
    
    m_button25 = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer29->Add(m_button25, 0, wxALL, 5);
    
    SetName(wxT("AddSSHAcountDlgBase"));
    SetSize(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_textCtrlHomeFolder->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(AddSSHAcountDlgBase::OnHomeFolderUpdated), NULL, this);
    m_button51->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(AddSSHAcountDlgBase::OnTestConnection), NULL, this);
    m_button51->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(AddSSHAcountDlgBase::OnTestConnectionUI), NULL, this);
    m_button27->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(AddSSHAcountDlgBase::OnOKUI), NULL, this);
    
}
Example #15
0
WebToolsSettingsBase::WebToolsSettingsBase(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);
        wxCD9C6InitBitmapResources();
        bBitmapLoaded = true;
    }

    wxBoxSizer* boxSizer2 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer2);

    m_notebook10 = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxBK_DEFAULT);
    m_notebook10->SetName(wxT("m_notebook10"));

    boxSizer2->Add(m_notebook10, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_panel56 = new wxPanel(m_notebook10, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook10, wxSize(-1, -1)),
                            wxTAB_TRAVERSAL);
    m_notebook10->AddPage(m_panel56, _("Code Completion"), true);

    wxBoxSizer* boxSizer58 = new wxBoxSizer(wxVERTICAL);
    m_panel56->SetSizer(boxSizer58);

    m_checkBoxEnableJsCC = new wxCheckBox(m_panel56, wxID_ANY, _("Enable JavaScript code completion"),
                                          wxDefaultPosition, wxDLG_UNIT(m_panel56, wxSize(-1, -1)), 0);
    m_checkBoxEnableJsCC->SetValue(true);
    m_checkBoxEnableJsCC->SetToolTip(_("Enable JavaScript code completion"));

    boxSizer58->Add(m_checkBoxEnableJsCC, 0, wxALL, WXC_FROM_DIP(5));

    m_checkBoxEnableXmlCC = new wxCheckBox(m_panel56, wxID_ANY, _("Enable XML code completion"), wxDefaultPosition,
                                           wxDLG_UNIT(m_panel56, wxSize(-1, -1)), 0);
    m_checkBoxEnableXmlCC->SetValue(true);
    m_checkBoxEnableXmlCC->SetToolTip(_("Enable XML code completion"));

    boxSizer58->Add(m_checkBoxEnableXmlCC, 0, wxALL, WXC_FROM_DIP(5));

    m_checkBoxEnableHtmlCC = new wxCheckBox(m_panel56, wxID_ANY, _("Enable HTML code completion"), wxDefaultPosition,
                                            wxDLG_UNIT(m_panel56, wxSize(-1, -1)), 0);
    m_checkBoxEnableHtmlCC->SetValue(true);
    m_checkBoxEnableHtmlCC->SetToolTip(_("Enable HTML code completion"));

    boxSizer58->Add(m_checkBoxEnableHtmlCC, 0, wxALL, WXC_FROM_DIP(5));

    m_panel12 = new wxPanel(m_notebook10, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook10, wxSize(-1, -1)),
                            wxTAB_TRAVERSAL);
    m_notebook10->AddPage(m_panel12, _("JavaScript"), false);

    wxBoxSizer* boxSizer22 = new wxBoxSizer(wxVERTICAL);
    m_panel12->SetSizer(boxSizer22);

    wxArrayString m_pgMgrArr;
    wxUnusedVar(m_pgMgrArr);
    wxArrayInt m_pgMgrIntArr;
    wxUnusedVar(m_pgMgrIntArr);
    m_pgMgr = new wxPropertyGridManager(m_panel12, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel12, wxSize(400, 200)),
                                        wxPG_DESCRIPTION | wxPG_SPLITTER_AUTO_CENTER | wxPG_BOLD_MODIFIED);

    boxSizer22->Add(m_pgMgr, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_pgProp26 = m_pgMgr->Append(new wxPropertyCategory(_("General")));
    m_pgProp26->SetHelpString(wxT(""));

    m_pgPropLogging = m_pgMgr->AppendIn(m_pgProp26, new wxBoolProperty(_("Verbose Logging"), wxPG_LABEL, 1));
    m_pgPropLogging->SetHelpString(
        _("The JavaScript code completion uses the \"tern\" engine.\nCheck this option to start tern in verbose mode"));

    m_pgPropPortNumber =
        m_pgMgr->AppendIn(m_pgProp26, new wxIntProperty(_("Code completion engine port"), wxPG_LABEL, 12089));
    m_pgPropPortNumber->SetHelpString(_("The port number on which 'tern' listens to\nTern is the code completion "
                                        "engine used by CodeLite for JavaScript"));

    m_pgProp32 = m_pgMgr->Append(new wxPropertyCategory(_("Libraries")));
    m_pgProp32->SetHelpString(_("Enable Code Completion for the selected libraries"));

    m_pgPropEcma5 = m_pgMgr->AppendIn(m_pgProp32, new wxBoolProperty(_("Ecma5"), wxPG_LABEL, 1));
    m_pgPropEcma5->SetHelpString(wxT(""));

    m_pgPropEcma6 = m_pgMgr->AppendIn(m_pgProp32, new wxBoolProperty(_("Ecma6"), wxPG_LABEL, 1));
    m_pgPropEcma6->SetHelpString(wxT(""));

    m_pgPropJQuery = m_pgMgr->AppendIn(m_pgProp32, new wxBoolProperty(_("jQuery"), wxPG_LABEL, 1));
    m_pgPropJQuery->SetHelpString(_("Support Code Completion for jQuery framework"));

    m_pgPropUnderscore = m_pgMgr->AppendIn(m_pgProp32, new wxBoolProperty(_("Underscore"), wxPG_LABEL, 1));
    m_pgPropUnderscore->SetHelpString(_("Enable code completion for the Underscore library"));

    m_pgPropBrowser = m_pgMgr->AppendIn(m_pgProp32, new wxBoolProperty(_("Browser"), wxPG_LABEL, 1));
    m_pgPropBrowser->SetHelpString(_("Enable code completion for browser mode (DOM, document, window etc)"));

    m_pgPropChai = m_pgMgr->AppendIn(m_pgProp32, new wxBoolProperty(_("Chai"), wxPG_LABEL, 1));
    m_pgPropChai->SetHelpString(_("Enable code completion for the chain assertion library"));

    m_pgPropQML = m_pgMgr->AppendIn(m_pgProp32, new wxBoolProperty(_("QML"), wxPG_LABEL, 1));
    m_pgPropQML->SetHelpString(_("Support for Qt's QML extension for JavaScript"));

    m_pgProp46 = m_pgMgr->Append(new wxPropertyCategory(_("Plugins")));
    m_pgProp46->SetHelpString(wxT(""));

    m_pgPropAngular = m_pgMgr->AppendIn(m_pgProp46, new wxBoolProperty(_("Angular"), wxPG_LABEL, 1));
    m_pgPropAngular->SetHelpString(
        _("Adds the angular object to the top-level environment, and tries to wire up some of the bizarre dependency "
          "management scheme from this library, so that dependency injections get the right types"));

    m_pgPropStrings = m_pgMgr->AppendIn(m_pgProp46, new wxBoolProperty(_("Strings"), wxPG_LABEL, 1));
    m_pgPropStrings->SetHelpString(
        _("When enabled, this plugin will gather (short) strings in your code, and completing when inside a string "
          "will try to complete to previously seen strings"));

    m_pgPropNode = m_pgMgr->AppendIn(m_pgProp46, new wxBoolProperty(_("Node.js"), wxPG_LABEL, 1));
    m_pgPropNode->SetHelpString(
        _("Provides variables that are part of the node environment, such as process and require, and hooks up require "
          "to try and find the dependencies that are being loaded, and assign them the correct types. It also includes "
          "types for the built-in modules that node.js provides (\"fs\", \"http\", etc)"));

    m_pgPropNodeExpress = m_pgMgr->AppendIn(m_pgProp46, new wxBoolProperty(_("Node Express"), wxPG_LABEL, 1));
    m_pgPropNodeExpress->SetHelpString(
        _("A Tern plugin adding support for express web application framework for node. http://expressjs.com/"));

    m_pgPropWebPack = m_pgMgr->AppendIn(m_pgProp46, new wxBoolProperty(_("WebPack"), wxPG_LABEL, 1));
    m_pgPropWebPack->SetHelpString(_("Support WebPack"));

    m_pgPropRequireJS = m_pgMgr->AppendIn(m_pgProp46, new wxBoolProperty(_("RequireJS"), wxPG_LABEL, 1));
    m_pgPropRequireJS->SetHelpString(
        _("This plugin (\"requirejs\") teaches the server to understand RequireJS-style dependency management. It "
          "defines the global functions define and requirejs, and will do its best to resolve dependencies and give "
          "them their proper types"));

    m_panel237 = new wxPanel(m_notebook10, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook10, wxSize(-1, -1)),
                             wxTAB_TRAVERSAL);
    m_notebook10->AddPage(m_panel237, _("Node.js"), false);

    wxBoxSizer* boxSizer239 = new wxBoxSizer(wxVERTICAL);
    m_panel237->SetSizer(boxSizer239);

    wxFlexGridSizer* flexGridSizer241 = new wxFlexGridSizer(0, 3, 0, 0);
    flexGridSizer241->SetFlexibleDirection(wxBOTH);
    flexGridSizer241->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
    flexGridSizer241->AddGrowableCol(1);

    boxSizer239->Add(flexGridSizer241, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText243 = new wxStaticText(m_panel237, wxID_ANY, _("nodejs path:"), wxDefaultPosition,
                                       wxDLG_UNIT(m_panel237, wxSize(-1, -1)), 0);

    flexGridSizer241->Add(m_staticText243, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_filePickerNodeJS = new wxFilePickerCtrl(m_panel237, wxID_ANY, wxEmptyString, _("Select a file"), wxT("*"),
                                              wxDefaultPosition, wxDLG_UNIT(m_panel237, wxSize(-1, -1)),
                                              wxFLP_DEFAULT_STYLE | wxFLP_USE_TEXTCTRL | wxFLP_SMALL);
    m_filePickerNodeJS->SetToolTip(_("Set the path to Node.js executable"));
    m_filePickerNodeJS->SetFocus();

    flexGridSizer241->Add(m_filePickerNodeJS, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_button361 = new wxButton(m_panel237, wxID_ANY, _("Suggest..."), wxDefaultPosition,
                               wxDLG_UNIT(m_panel237, wxSize(-1, -1)), wxBU_EXACTFIT);

    flexGridSizer241->Add(m_button361, 0, wxRIGHT | wxTOP | wxBOTTOM, WXC_FROM_DIP(5));

    m_staticText247 = new wxStaticText(m_panel237, wxID_ANY, _("npm path:"), wxDefaultPosition,
                                       wxDLG_UNIT(m_panel237, wxSize(-1, -1)), 0);

    flexGridSizer241->Add(m_staticText247, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_filePickerNpm = new wxFilePickerCtrl(m_panel237, wxID_ANY, wxEmptyString, _("Select a file"), wxT("*"),
                                           wxDefaultPosition, wxDLG_UNIT(m_panel237, wxSize(-1, -1)),
                                           wxFLP_DEFAULT_STYLE | wxFLP_USE_TEXTCTRL | wxFLP_SMALL);
    m_filePickerNpm->SetToolTip(_("Set the path to npm executable"));

    flexGridSizer241->Add(m_filePickerNpm, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_button363 = new wxButton(m_panel237, wxID_ANY, _("Suggest..."), wxDefaultPosition,
                               wxDLG_UNIT(m_panel237, wxSize(-1, -1)), wxBU_EXACTFIT);

    flexGridSizer241->Add(m_button363, 0, wxRIGHT | wxTOP | wxBOTTOM, WXC_FROM_DIP(5));

    flexGridSizer241->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));

    m_checkBoxJSLint = new wxCheckBox(m_panel237, wxID_ANY, _("Lint on file save"), wxDefaultPosition,
                                      wxDLG_UNIT(m_panel237, wxSize(-1, -1)), 0);
    m_checkBoxJSLint->SetValue(false);

    flexGridSizer241->Add(m_checkBoxJSLint, 0, wxALL, WXC_FROM_DIP(5));

    m_stdBtnSizer4 = new wxStdDialogButtonSizer();

    boxSizer2->Add(m_stdBtnSizer4, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(10));

    m_buttonCancel = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_stdBtnSizer4->AddButton(m_buttonCancel);

    m_buttonOK = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_buttonOK->SetDefault();
    m_stdBtnSizer4->AddButton(m_buttonOK);

    m_buttonApply = new wxButton(this, wxID_APPLY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_stdBtnSizer4->AddButton(m_buttonApply);
    m_stdBtnSizer4->Realize();

    SetName(wxT("WebToolsSettingsBase"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) { GetSizer()->Fit(this); }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
    // Connect events
    m_checkBoxEnableJsCC->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
                                  wxCommandEventHandler(WebToolsSettingsBase::OnModified), NULL, this);
    m_checkBoxEnableXmlCC->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
                                   wxCommandEventHandler(WebToolsSettingsBase::OnModified), NULL, this);
    m_checkBoxEnableHtmlCC->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
                                    wxCommandEventHandler(WebToolsSettingsBase::OnModified), NULL, this);
    m_pgMgr->Connect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(WebToolsSettingsBase::OnJSValueChanged), NULL, this);
    m_filePickerNodeJS->Connect(wxEVT_COMMAND_FILEPICKER_CHANGED,
                                wxFileDirPickerEventHandler(WebToolsSettingsBase::OnNodejsPath), NULL, this);
    m_button361->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
                         wxCommandEventHandler(WebToolsSettingsBase::OnSuggestNodeJSPaths), NULL, this);
    m_filePickerNpm->Connect(wxEVT_COMMAND_FILEPICKER_CHANGED,
                             wxFileDirPickerEventHandler(WebToolsSettingsBase::OnNpmPath), NULL, this);
    m_button363->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
                         wxCommandEventHandler(WebToolsSettingsBase::OnSuggestNodeJSPaths), NULL, this);
    m_checkBoxJSLint->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(WebToolsSettingsBase::OnLintOnSave),
                              NULL, this);
    m_buttonOK->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(WebToolsSettingsBase::OnOKUI), NULL, this);
    m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(WebToolsSettingsBase::OnOK), NULL, this);
    m_buttonApply->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(WebToolsSettingsBase::OnApply), NULL,
                           this);
    m_buttonApply->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(WebToolsSettingsBase::OnOKUI), NULL, this);
}
Example #16
0
FindInFilesDialogBase::FindInFilesDialogBase(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);
        wxCABC4InitBitmapResources();
        bBitmapLoaded = true;
    }
    // Set icon(s) to the application/dialog
    wxIconBundle app_icons;
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-find_in_files"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-find_in_files@2x"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    SetIcons( app_icons );

    
    wxBoxSizer* boxSizer7 = new wxBoxSizer(wxHORIZONTAL);
    this->SetSizer(boxSizer7);
    
    m_panelMainPanel = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    
    boxSizer7->Add(m_panelMainPanel, 1, wxALL|wxEXPAND, 10);
    
    wxBoxSizer* boxSizer95 = new wxBoxSizer(wxVERTICAL);
    m_panelMainPanel->SetSizer(boxSizer95);
    
    wxFlexGridSizer* fgSizer41 = new wxFlexGridSizer(0, 3, 0, 0);
    fgSizer41->SetFlexibleDirection( wxBOTH );
    fgSizer41->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    fgSizer41->AddGrowableCol(1);
    fgSizer41->AddGrowableRow(4);
    
    boxSizer95->Add(fgSizer41, 1, wxALL|wxEXPAND, 5);
    
    m_staticText1 = new wxStaticText(m_panelMainPanel, wxID_ANY, _("Find What :"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer41->Add(m_staticText1, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    wxArrayString m_findStringArr;
    m_findString = new wxComboBox(m_panelMainPanel, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), m_findStringArr, 0);
    m_findString->SetToolTip(_("Find what"));
    m_findString->SetFocus();
    #if wxVERSION_NUMBER >= 3000
    m_findString->SetHint(_("Find what"));
    #endif
    
    fgSizer41->Add(m_findString, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_find = new wxButton(m_panelMainPanel, wxID_FIND, _("&Find"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_find->SetDefault();
    m_find->SetToolTip(_("Begin search"));
    
    fgSizer41->Add(m_find, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_staticText102 = new wxStaticText(m_panelMainPanel, wxID_ANY, _("Replace With:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    fgSizer41->Add(m_staticText102, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    wxArrayString m_replaceStringArr;
    m_replaceString = new wxComboBox(m_panelMainPanel, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), m_replaceStringArr, 0);
    #if wxVERSION_NUMBER >= 3000
    m_replaceString->SetHint(_("Replace with"));
    #endif
    
    fgSizer41->Add(m_replaceString, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_replaceAll = new wxButton(m_panelMainPanel, wxID_REPLACE, _("&Replace"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_replaceAll->SetToolTip(_("Search for matches and place them in the 'Replace' window as candidates for possible replace operation"));
    
    fgSizer41->Add(m_replaceAll, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_staticText3 = new wxStaticText(m_panelMainPanel, wxID_ANY, _("File Mask:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer41->Add(m_staticText3, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    wxArrayString m_fileTypesArr;
    m_fileTypesArr.Add(wxT("*.c;*.cpp;*.cxx;*.cc;*.h;*.hpp;*.inc;*.mm;*.m;*.xrc"));
    m_fileTypes = new wxComboBox(m_panelMainPanel, wxID_ANY, wxT("*.c;*.cpp;*.cxx;*.cc;*.h;*.hpp;*.inc;*.mm;*.m;*.xrc"), wxDefaultPosition, wxSize(-1, -1), m_fileTypesArr, 0);
    m_fileTypes->SetToolTip(_("Search these file types"));
    #if wxVERSION_NUMBER >= 3000
    m_fileTypes->SetHint(wxT(""));
    #endif
    m_fileTypes->SetSelection(0);
    
    fgSizer41->Add(m_fileTypes, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_cancel = new wxButton(m_panelMainPanel, wxID_CANCEL, _("Close"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_cancel->SetToolTip(_("Close this dialog"));
    
    fgSizer41->Add(m_cancel, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_staticText5 = new wxStaticText(m_panelMainPanel, wxID_ANY, _("Files Encoding:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer41->Add(m_staticText5, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    wxArrayString m_choiceEncodingArr;
    m_choiceEncoding = new wxChoice(m_panelMainPanel, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_choiceEncodingArr, 0);
    m_choiceEncoding->SetToolTip(_("Use this file encoding when scanning files for matches"));
    
    fgSizer41->Add(m_choiceEncoding, 1, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_stop = new wxButton(m_panelMainPanel, wxID_STOP, _("Sto&p"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_stop->SetToolTip(_("Stop the current search"));
    
    fgSizer41->Add(m_stop, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_staticText2 = new wxStaticText(m_panelMainPanel, wxID_ANY, _("Look in :"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer41->Add(m_staticText2, 0, wxALL|wxALIGN_RIGHT|wxALIGN_TOP, 5);
    
    wxArrayString m_listPathsArr;
    m_listPaths = new wxListBox(m_panelMainPanel, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_listPathsArr, wxLB_MULTIPLE);
    
    fgSizer41->Add(m_listPaths, 1, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* bSizer9 = new wxBoxSizer(wxHORIZONTAL);
    
    fgSizer41->Add(bSizer9, 1, wxEXPAND, 5);
    
    wxBoxSizer* boxSizer1 = new wxBoxSizer(wxVERTICAL);
    
    bSizer9->Add(boxSizer1, 0, wxEXPAND|wxALIGN_TOP, 5);
    
    m_btnAddPath = new wxButton(m_panelMainPanel, wxID_ANY, _("Add Path..."), wxDefaultPosition, wxSize(-1,-1), 0);
    m_btnAddPath->SetToolTip(_("Add new search location"));
    
    boxSizer1->Add(m_btnAddPath, 0, wxALL|wxEXPAND, 5);
    
    m_btnClearSelectedPath = new wxButton(m_panelMainPanel, wxID_ANY, _("Clear Path"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_btnClearSelectedPath->SetToolTip(_("Clear the selected entry from the\n'Look In' list box"));
    
    boxSizer1->Add(m_btnClearSelectedPath, 0, wxALL|wxEXPAND, 5);
    
    fgSizer41->Add(0, 0, 1, wxALL, 5);
    
    wxBoxSizer* boxSizer105 = new wxBoxSizer(wxVERTICAL);
    
    boxSizer95->Add(boxSizer105, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    wxFlexGridSizer* fgSizer3 = new wxFlexGridSizer(0, 3, 0, 0);
    fgSizer3->SetFlexibleDirection( wxBOTH );
    fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    
    boxSizer105->Add(fgSizer3, 0, wxALL|wxEXPAND, 5);
    
    m_matchCase = new wxCheckBox(m_panelMainPanel, wxID_ANY, _("&Match case"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_matchCase->SetValue(false);
    m_matchCase->SetToolTip(_("Toggle case sensitive search"));
    
    fgSizer3->Add(m_matchCase, 0, wxALL|wxEXPAND, 5);
    
    m_matchWholeWord = new wxCheckBox(m_panelMainPanel, wxID_ANY, _("Match &whole word"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_matchWholeWord->SetValue(false);
    m_matchWholeWord->SetToolTip(_("Toggle whole word search"));
    
    fgSizer3->Add(m_matchWholeWord, 0, wxALL|wxEXPAND, 5);
    
    m_checkBoxPipeForGrep = new wxCheckBox(m_panelMainPanel, wxID_ANY, _("Enable pipe filtering"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_checkBoxPipeForGrep->SetValue(false);
    m_checkBoxPipeForGrep->SetToolTip(_("Use the pipe character (\"|\") as a special separator for applying additional filters. This has the similar effect as using the \"grep\" command line tool"));
    
    fgSizer3->Add(m_checkBoxPipeForGrep, 0, wxALL, 5);
    
    m_regualrExpression = new wxCheckBox(m_panelMainPanel, wxID_ANY, _("Regular &expression"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_regualrExpression->SetValue(false);
    m_regualrExpression->SetToolTip(_("The 'Find What' field is a regular expression"));
    
    fgSizer3->Add(m_regualrExpression, 0, wxALL|wxEXPAND, 5);
    
    m_checkBoxSaveFilesBeforeSearching = new wxCheckBox(m_panelMainPanel, wxID_ANY, _("&Save files before search"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxSaveFilesBeforeSearching->SetValue(false);
    m_checkBoxSaveFilesBeforeSearching->SetToolTip(_("Save any modified files before search starts"));
    
    fgSizer3->Add(m_checkBoxSaveFilesBeforeSearching, 0, wxALL|wxEXPAND, 5);
    
    SetName(wxT("FindInFilesDialogBase"));
    SetSize(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_find->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindInFilesDialogBase::OnFind), NULL, this);
    m_find->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(FindInFilesDialogBase::OnFindWhatUI), NULL, this);
    m_replaceAll->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindInFilesDialogBase::OnReplace), NULL, this);
    m_replaceAll->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(FindInFilesDialogBase::OnReplaceUI), NULL, this);
    m_cancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindInFilesDialogBase::OnButtonClose), NULL, this);
    m_stop->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindInFilesDialogBase::OnStop), NULL, this);
    m_btnAddPath->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindInFilesDialogBase::OnAddPath), NULL, this);
    m_btnClearSelectedPath->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindInFilesDialogBase::OnClearSelectedPath), NULL, this);
    m_btnClearSelectedPath->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(FindInFilesDialogBase::OnClearSelectedPathUI), NULL, this);
    
}
Example #17
0
NodeJSDebuggerDlgBase::NodeJSDebuggerDlgBase(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);
        wxCD9C6InitBitmapResources();
        bBitmapLoaded = true;
    }
    // Set icon(s) to the application/dialog
    wxIconBundle app_icons;
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("nodejs"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon(icn);
    }
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("nodejs-32"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon(icn);
    }
    SetIcons(app_icons);

    wxBoxSizer* boxSizer68 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer68);

    wxFlexGridSizer* flexGridSizer76 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer76->SetFlexibleDirection(wxBOTH);
    flexGridSizer76->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
    flexGridSizer76->AddGrowableCol(1);

    boxSizer68->Add(flexGridSizer76, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText78 = new wxStaticText(this, wxID_ANY, _("Node.js executable:"), wxDefaultPosition,
                                      wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer76->Add(m_staticText78, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_filePickerNodeJS =
        new wxFilePickerCtrl(this, wxID_ANY, wxEmptyString, _("Select a file"), wxT("*"), wxDefaultPosition,
                             wxDLG_UNIT(this, wxSize(-1, -1)), wxFLP_DEFAULT_STYLE | wxFLP_USE_TEXTCTRL | wxFLP_SMALL);
    m_filePickerNodeJS->SetToolTip(_("Select Node.js executable"));
    m_filePickerNodeJS->SetFocus();

    flexGridSizer76->Add(m_filePickerNodeJS, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticTextScript =
        new wxStaticText(this, wxID_ANY, _("Script to debug:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer76->Add(m_staticTextScript, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_filePickerScript =
        new wxFilePickerCtrl(this, wxID_ANY, wxEmptyString, _("Select a file"), wxT("*"), wxDefaultPosition,
                             wxDLG_UNIT(this, wxSize(-1, -1)), wxFLP_DEFAULT_STYLE | wxFLP_USE_TEXTCTRL | wxFLP_SMALL);
    m_filePickerScript->SetToolTip(_("Select the script to execute"));

    flexGridSizer76->Add(m_filePickerScript, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText257 = new wxStaticText(this, wxID_ANY, _("Working directory:"), wxDefaultPosition,
                                       wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer76->Add(m_staticText257, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_dirPickerWorkingDirectory = new wxDirPickerCtrl(this, wxID_ANY, wxEmptyString, _("Select a folder"),
                                                      wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)),
                                                      wxDIRP_SMALL | wxDIRP_DEFAULT_STYLE | wxDIRP_USE_TEXTCTRL);

    flexGridSizer76->Add(m_dirPickerWorkingDirectory, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticTextDebuggerPort =
        new wxStaticText(this, wxID_ANY, _("Debugger port:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer76->Add(m_staticTextDebuggerPort, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_textCtrlPort =
        new wxTextCtrl(this, wxID_ANY, wxT("5858"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
#if wxVERSION_NUMBER >= 3000
    m_textCtrlPort->SetHint(wxT(""));
#endif

    flexGridSizer76->Add(m_textCtrlPort, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText132 = new wxStaticText(this, wxID_ANY, _("Command line arguments:"), wxDefaultPosition,
                                       wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    boxSizer68->Add(m_staticText132, 0, wxALL, WXC_FROM_DIP(5));

    m_stcCommandLineArguments =
        new wxStyledTextCtrl(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(400, -1)), 0);
    m_stcCommandLineArguments->SetToolTip(
        _("Pass command line arguments to Node.js\nPlace each argument on its own line"));
    // Configure the fold margin
    m_stcCommandLineArguments->SetMarginType(4, wxSTC_MARGIN_SYMBOL);
    m_stcCommandLineArguments->SetMarginMask(4, wxSTC_MASK_FOLDERS);
    m_stcCommandLineArguments->SetMarginSensitive(4, true);
    m_stcCommandLineArguments->SetMarginWidth(4, 0);

    // Configure the tracker margin
    m_stcCommandLineArguments->SetMarginWidth(1, 0);

    // Configure the symbol margin
    m_stcCommandLineArguments->SetMarginType(2, wxSTC_MARGIN_SYMBOL);
    m_stcCommandLineArguments->SetMarginMask(2, ~(wxSTC_MASK_FOLDERS));
    m_stcCommandLineArguments->SetMarginWidth(2, 0);
    m_stcCommandLineArguments->SetMarginSensitive(2, true);

    // Configure the line numbers margin
    m_stcCommandLineArguments->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_stcCommandLineArguments->SetMarginWidth(0, 0);

    // Configure the line symbol margin
    m_stcCommandLineArguments->SetMarginType(3, wxSTC_MARGIN_FORE);
    m_stcCommandLineArguments->SetMarginMask(3, 0);
    m_stcCommandLineArguments->SetMarginWidth(3, 0);
    // Select the lexer
    m_stcCommandLineArguments->SetLexer(wxSTC_LEX_NULL);
    // Set default font / styles
    m_stcCommandLineArguments->StyleClearAll();
    m_stcCommandLineArguments->SetWrapMode(0);
    m_stcCommandLineArguments->SetIndentationGuides(0);
    m_stcCommandLineArguments->SetKeyWords(0, wxT(""));
    m_stcCommandLineArguments->SetKeyWords(1, wxT(""));
    m_stcCommandLineArguments->SetKeyWords(2, wxT(""));
    m_stcCommandLineArguments->SetKeyWords(3, wxT(""));
    m_stcCommandLineArguments->SetKeyWords(4, wxT(""));

    boxSizer68->Add(m_stcCommandLineArguments, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_stdBtnSizer70 = new wxStdDialogButtonSizer();

    boxSizer68->Add(m_stdBtnSizer70, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(10));

    m_buttonOK = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_buttonOK->SetDefault();
    m_stdBtnSizer70->AddButton(m_buttonOK);

    m_button74 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_stdBtnSizer70->AddButton(m_button74);
    m_stdBtnSizer70->Realize();

    SetName(wxT("NodeJSDebuggerDlgBase"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) { GetSizer()->Fit(this); }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
    // Connect events
    m_buttonOK->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(NodeJSDebuggerDlgBase::OnOKUI), NULL, this);
}
Example #18
0
FindInFilesLocationsDlgBase::FindInFilesLocationsDlgBase(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);
        wxCABC4InitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* boxSizer111 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer111);
    
    wxBoxSizer* boxSizer120 = new wxBoxSizer(wxHORIZONTAL);
    
    boxSizer111->Add(boxSizer120, 1, wxALL|wxEXPAND, 5);
    
    wxArrayString m_checkListBoxLocationsArr;
    m_checkListBoxLocations = new wxCheckListBox(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), m_checkListBoxLocationsArr, wxLB_SINGLE);
    m_checkListBoxLocations->SetFocus();
    
    boxSizer120->Add(m_checkListBoxLocations, 1, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* boxSizer125 = new wxBoxSizer(wxVERTICAL);
    
    boxSizer120->Add(boxSizer125, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_TOP, 5);
    
    m_buttonAdd = new wxButton(this, wxID_ANY, _("Add..."), wxDefaultPosition, wxSize(-1,-1), 0);
    m_buttonAdd->SetToolTip(_("Add Folder..."));
    
    boxSizer125->Add(m_buttonAdd, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_TOP, 5);
    
    m_buttonDelete = new wxButton(this, wxID_ANY, _("Remove"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_buttonDelete->SetToolTip(_("Remove the selected path"));
    
    boxSizer125->Add(m_buttonDelete, 0, wxALL, 5);
    
    m_stdBtnSizer113 = new wxStdDialogButtonSizer();
    
    boxSizer111->Add(m_stdBtnSizer113, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 10);
    
    m_button115 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_button115->SetDefault();
    m_stdBtnSizer113->AddButton(m_button115);
    
    m_button117 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_stdBtnSizer113->AddButton(m_button117);
    m_stdBtnSizer113->Realize();
    
    SetName(wxT("FindInFilesLocationsDlgBase"));
    SetSize(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_buttonAdd->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindInFilesLocationsDlgBase::OnAddPath), NULL, this);
    m_buttonDelete->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindInFilesLocationsDlgBase::OnDeletePath), NULL, this);
    m_buttonDelete->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(FindInFilesLocationsDlgBase::OnDeletePathUI), NULL, this);
    
}
void HTMLButcherMaskAreaEditDialog::CreateControls()
{
    wxBoxSizer *topsizer = new wxBoxSizer(wxVERTICAL);

    wxBoxSizer *boxsizer = new wxBoxSizer(wxVERTICAL);
    topsizer->Add(boxsizer, 1, wxEXPAND|wxALL, 3);

    // BODY
    wxBoxSizer *bodysizer = new wxBoxSizer(wxHORIZONTAL);
    boxsizer->Add(bodysizer, 1, wxEXPAND|wxALL, 3);

    // PREVIEW
    wxBoxSizer *previewsizer = new wxBoxSizer(wxVERTICAL);
    bodysizer->Add(previewsizer, 2, wxEXPAND|wxALL, 3);

    // preview image
    //wxStaticText *previewlabel = new wxStaticText(this, wxID_STATIC, _("Area:"), wxDefaultPosition, wxDefaultSize, 0);
    //previewsizer->Add(previewlabel, 0, wxALIGN_LEFT|wxALL, 3);

    previewctrl_ = new ButcherImageView(this, wxID_ANY, wxDefaultPosition, wxSize(200, 200));

    previewsizer->Add(previewctrl_, 1, wxEXPAND|wxALL, 3);


    if (ButcherOptions::GetEditMode(GetProject()->GetOptions())>=ButcherOptions::EM_NORMAL)
    {
        previewctrl_->SetSelectColor(true);
        previewctrl_->Connect(wxID_ANY, wxEVT_BUTCHERIMAGEVIEWCOLOR_ACTION,
                              ButcherImageViewColorEventHandler(HTMLButcherMaskAreaEditDialog::OnSelectColor), NULL, this);

        // PREVIEW COLOR
        wxBoxSizer *previewcolorsizer = new wxBoxSizer(wxHORIZONTAL);


        // hover color
        previewcolorsizer->Add(
            new wxStaticText(this, wxID_STATIC, _("Hover:"), wxDefaultPosition, wxDefaultSize, 0),
            0, wxALIGN_LEFT|wxALL, 3);

        wxTextCtrl *pchoverctrl = new wxTextCtrl(this, ID_PROC_HOVERCOLOR, wxEmptyString, wxDefaultPosition, wxDefaultSize,
                wxTE_READONLY|wxTE_CENTRE|wxNO_BORDER);
        previewcolorsizer->Add(pchoverctrl, 0, wxGROW|wxALL, 3);

        // selected color
        previewcolorsizer->Add(
            new wxStaticText(this, wxID_STATIC, _("Selected:"), wxDefaultPosition, wxDefaultSize, 0),
            0, wxALIGN_LEFT|wxALL, 3);

        wxTextCtrl *pcselectedctrl = new wxTextCtrl(this, ID_PROC_SELCOLOR, wxEmptyString, wxDefaultPosition, wxDefaultSize,
                wxTE_READONLY|wxTE_CENTRE|wxNO_BORDER);
        previewcolorsizer->Add(pcselectedctrl, 0, wxGROW|wxALL, 3);


        previewsizer->Add(previewcolorsizer, 0, wxEXPAND|wxALL, 3);
    }


    //
    // NOTEBOOK
    //

    wxNotebook *notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_NOPAGETHEME);
    bodysizer->Add(notebook, 0, wxEXPAND|wxALL, 3);

    wxPanel *nbfields = new wxPanel(notebook, wxID_ANY);
    wxPanel *nbhtml = NULL;
    wxPanel *nbimage = NULL;

    notebook->AddPage(nbfields, _("Properties"), true);
    if (ButcherOptions::GetEditMode(GetProject()->GetOptions())>=ButcherOptions::EM_NORMAL)
    {
        nbhtml = new wxPanel(notebook, wxID_ANY);
        nbimage = new wxPanel(notebook, wxID_ANY);

        notebook->AddPage(nbhtml, _("HTML"), false);
        notebook->AddPage(nbimage, _("Image"), false);
    }

    // FIELDS BASE
    //wxBoxSizer *fieldsbasesizer = new wxBoxSizer(wxHORIZONTAL);
    //bodysizer->Add(fieldsbasesizer, 0, wxEXPAND|wxALL, 3);

    //*****
    //* PROPERTIES
    //*****


    // FIELDS
    wxBoxSizer *fieldssizer = new wxBoxSizer(wxVERTICAL);
    nbfields->SetSizer(fieldssizer);
    //fieldsbasesizer->Add(fieldssizer, 0, wxEXPAND|wxALL, 3);

    // Name
    wxStaticText *namelabel = new wxStaticText(nbfields, wxID_STATIC, _("&Name:"), wxDefaultPosition, wxDefaultSize, 0);
    fieldssizer->Add(namelabel, 0, wxALIGN_LEFT|wxALL, 3);

    wxTextCtrl *namectrl = new wxTextCtrl(nbfields, ID_NAME, wxEmptyString, wxDefaultPosition, wxSize(120, -1), 0);
    fieldssizer->Add(namectrl, 0, wxGROW|wxALL, 3);

    // kind
    wxStaticText *kindlabel = new wxStaticText(nbfields, wxID_STATIC, _("&Kind:"), wxDefaultPosition, wxDefaultSize, 0);
    fieldssizer->Add(kindlabel, 0, wxALIGN_LEFT|wxALL, 3);

    wxComboBox *kindctrl=new wxComboBox(nbfields, ID_KIND, wxEmptyString, wxDefaultPosition, wxDefaultSize,
                                        wxArrayString(), wxCB_READONLY);
    areaimap_.Load(kindctrl);

    //kindctrl->SetSelection(2);

    fieldssizer->Add(kindctrl, 0, wxGROW|wxALL, 3);

    // background
    wxCheckBox *backgroundctrl = new wxCheckBox(nbfields, ID_BACKGROUND, _("&Background Image"), wxDefaultPosition, wxDefaultSize);
    fieldssizer->Add(backgroundctrl, 0, wxGROW|wxALL, 3);

    // Layout type
    wxRadioBox *layouttypectrl = new wxRadioBox(nbfields, ID_LAYOUTTYPE, _("&Layout type (inner mask)"), wxDefaultPosition, wxSize(300, -1),
            layouttypeimap_.Load(), 0);
    fieldssizer->Add(layouttypectrl, 0, wxGROW|wxALL, 3);

    /*
        // inner scrollable
        wxCheckBox *innerscrollablectrl = new wxCheckBox(nbfields, ID_INNERSCROLLABLE, _("Inner &Scrollable (DIV)"), wxDefaultPosition, wxDefaultSize);
        fieldssizer->Add(innerscrollablectrl, 0, wxGROW|wxALL, 3);

        // variable size
        wxCheckBox *variablesizectrl = new wxCheckBox(nbfields, ID_VARIABLESIZE, _("Variable Si&ze"), wxDefaultPosition, wxDefaultSize);
        fieldssizer->Add(variablesizectrl, 0, wxGROW|wxALL, 3);
    */

    // image format
    wxStaticText *formatlabel = new wxStaticText(nbfields, wxID_STATIC, _("&Image Format:"), wxDefaultPosition, wxDefaultSize, 0);
    fieldssizer->Add(formatlabel, 0, wxALIGN_LEFT|wxALL, 3);

    wxComboBox *formatctrl=new wxComboBox(nbfields, ID_IMAGEFORMAT, wxEmptyString, wxDefaultPosition, wxDefaultSize,
                                          wxArrayString(), wxCB_READONLY);

    fieldssizer->Add(formatctrl, 0, wxGROW|wxALL, 3);

    // have image map
    wxCheckBox *imagemapctrl = new wxCheckBox(nbfields, ID_HAVEIMAGEMAP, _("Image &Map"), wxDefaultPosition, wxDefaultSize);
    fieldssizer->Add(imagemapctrl, 0, wxGROW|wxALL, 3);

    // Image map name
    wxStaticText *imagemapnamelabel = new wxStaticText(nbfields, wxID_STATIC, _("Image Ma&p Name:"), wxDefaultPosition, wxDefaultSize, 0);
    fieldssizer->Add(imagemapnamelabel, 0, wxALIGN_LEFT|wxALL, 3);

    wxTextCtrl *imagemapnamectrl = new wxTextCtrl(nbfields, ID_IMAGEMAPNAME, wxEmptyString, wxDefaultPosition, wxDefaultSize,
            0);
    fieldssizer->Add(imagemapnamectrl , 0, wxGROW|wxALL, 3);

    // Filename
    fieldssizer->Add(
        new wxStaticText(nbfields, wxID_STATIC, _("Base &Filename: (without extension)"), wxDefaultPosition, wxDefaultSize, 0),
        0, wxALIGN_LEFT|wxALL, 3);

    wxTextCtrl *filenamectrl = new wxTextCtrl(nbfields, ID_FILENAME, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
    fieldssizer->Add(filenamectrl, 0, wxGROW|wxALL, 3);

    // filename prepend
    wxCheckBox *filenameprependctrl = new wxCheckBox(nbfields, ID_FILENAMEPREPEND, _("Prepen&d parent area filename"), wxDefaultPosition, wxDefaultSize);
    fieldssizer->Add(filenameprependctrl, 0, wxGROW|wxALL, 3);

    if (ButcherOptions::GetEditMode(GetProject()->GetOptions())>=ButcherOptions::EM_NORMAL)
    {
        // alternate file
        fieldssizer->Add(
            new wxStaticText(nbfields, wxID_STATIC, _("Use &Alternate file:"), wxDefaultPosition, wxDefaultSize, 0),
            0, wxALIGN_LEFT|wxALL, 3);

        wxArrayString altfchoices;
        altfchoices.Add(_("No"));
        for (int i=0; i<BUTCHERCONST_VIEW_MAXALTERNATE; i++)
        {
            altfchoices.Add(wxString::Format(_("Alternate %d"), i+1));
        }

        wxComboBox *altfilectrl = new wxComboBox(nbfields, ID_FILEALTERNATE, wxEmptyString, wxDefaultPosition, wxDefaultSize,
                altfchoices, wxCB_READONLY|wxCB_DROPDOWN);
        fieldssizer->Add(altfilectrl, 0, wxGROW|wxALL, 3);
    }

    if (ButcherOptions::GetEditMode(GetProject()->GetOptions())>=ButcherOptions::EM_NORMAL)
    {
        //*****
        //* HTML
        //*****

        wxBoxSizer *fieldshtmlrootsizer = new wxBoxSizer(wxVERTICAL);
        nbhtml->SetSizer(fieldshtmlrootsizer);


        wxBoxSizer *fieldshtmlbasesizer = new wxBoxSizer(wxHORIZONTAL);
        fieldshtmlrootsizer->Add(fieldshtmlbasesizer, 0, wxEXPAND|wxALL);
        //nbhtml->SetSizer(fieldshtmlbasesizer);
        //fieldsbasesizer->Add(fieldssizer, 0, wxEXPAND|wxALL, 3);

        // FIELDS
        wxBoxSizer *fieldshtmlsizer = new wxBoxSizer(wxVERTICAL);
        fieldshtmlbasesizer->Add(fieldshtmlsizer, 0, wxEXPAND|wxALL, 3);

        // align
        fieldshtmlsizer->Add(
            new wxStaticText(nbhtml, wxID_STATIC, _("&Align:"), wxDefaultPosition, wxDefaultSize, 0),
            0, wxALIGN_LEFT|wxALL, 3);

        wxComboBox *alignctrl=new wxComboBox(nbhtml, ID_ALIGN, wxEmptyString, wxDefaultPosition, wxDefaultSize,
                                             wxArrayString(), wxCB_READONLY);
        alignimap_.Load(alignctrl);

        fieldshtmlsizer->Add(alignctrl, 0, wxGROW|wxALL, 3);

        // valign
        fieldshtmlsizer->Add(
            new wxStaticText(nbhtml, wxID_STATIC, _("&Vertical Align:"), wxDefaultPosition, wxDefaultSize, 0),
            0, wxALIGN_LEFT|wxALL, 3);

        wxComboBox *valignctrl=new wxComboBox(nbhtml, ID_VALIGN, wxEmptyString, wxDefaultPosition, wxDefaultSize,
                                              wxArrayString(), wxCB_READONLY);
        valignimap_.Load(valignctrl);

        fieldshtmlsizer->Add(valignctrl, 0, wxGROW|wxALL, 3);

        // bgrepeat
        fieldshtmlsizer->Add(
            new wxStaticText(nbhtml, wxID_STATIC, _("Background &Repeat:"), wxDefaultPosition, wxDefaultSize, 0),
            0, wxALIGN_LEFT|wxALL, 3);

        wxComboBox *bgrepeatctrl=new wxComboBox(nbhtml, ID_BGREPEAT, wxEmptyString, wxDefaultPosition, wxDefaultSize,
                                                wxArrayString(), wxCB_READONLY);
        bgrepeatimap_.Load(bgrepeatctrl);

        fieldshtmlsizer->Add(bgrepeatctrl, 0, wxGROW|wxALL, 3);


        // inner scrollable
        wxCheckBox *innerscrollablectrl = new wxCheckBox(nbhtml, ID_INNERSCROLLABLE, _("Inner &Scrollable (DIV)"), wxDefaultPosition, wxDefaultSize);
        fieldshtmlsizer->Add(innerscrollablectrl, 0, wxGROW|wxALL, 3);


        // FIELDS 2
        wxBoxSizer *fields2sizer = new wxBoxSizer(wxVERTICAL);
        fieldshtmlbasesizer->Add(fields2sizer, 0, wxEXPAND|wxALL, 3);

        // Cell Tag Append
        wxStaticText *celltagappendlabel = new wxStaticText(nbhtml, wxID_STATIC, _("Cell &Tag Append: (<TD>/<DIV> attributes)"), wxDefaultPosition, wxDefaultSize, 0);
        fields2sizer->Add(celltagappendlabel, 0, wxALIGN_LEFT|wxALL, 3);

        wxTextCtrl *celltagappendctrl = new wxTextCtrl(nbhtml, ID_CELLTAGAPPEND, wxEmptyString, wxDefaultPosition, wxDefaultSize,
                0);
        fields2sizer->Add(celltagappendctrl , 0, wxGROW|wxALL, 3);

        // Table Tag Append
        wxStaticText *tabletagappendlabel = new wxStaticText(nbhtml, wxID_STATIC, _("Table &Tag Append: (inner mask)"), wxDefaultPosition, wxDefaultSize, 0);
        fields2sizer->Add(tabletagappendlabel, 0, wxALIGN_LEFT|wxALL, 3);

        wxTextCtrl *tabletagappendctrl = new wxTextCtrl(nbhtml, ID_TABLETAGAPPEND, wxEmptyString, wxDefaultPosition, wxDefaultSize,
                0);
        fields2sizer->Add(tabletagappendctrl , 0, wxGROW|wxALL, 3);

        // isbgcolor
        wxCheckBox *isbgcolorctrl = new wxCheckBox(nbhtml, ID_ISBGCOLOR, _("Background Co&lor:"), wxDefaultPosition, wxDefaultSize);
        fields2sizer->Add(isbgcolorctrl, 0, wxGROW|wxALL, 3);

        // bgcolor
        wxColourPickerCtrl *bgcolorctrl = new wxColourPickerCtrl(nbhtml, ID_BGCOLOR, *wxBLACK, wxDefaultPosition, wxDefaultSize,
                wxCLRP_SHOW_LABEL|wxCLRP_USE_TEXTCTRL);
        fields2sizer->Add(bgcolorctrl , 0, wxGROW|wxALL, 3);


        // variable size
        wxCheckBox *variablesizectrl = new wxCheckBox(nbhtml, ID_VARIABLESIZE, _("Variable Si&ze"), wxDefaultPosition, wxDefaultSize);
        fields2sizer->Add(variablesizectrl, 0, wxGROW|wxALL, 3);


        // Content
        wxStaticText *contentlabel = new wxStaticText(nbhtml, wxID_STATIC, _("&Content (HTML inside <TD>/<DIV>):"), wxDefaultPosition, wxDefaultSize, 0);
        fieldshtmlrootsizer->Add(contentlabel, 0, wxALIGN_LEFT|wxALL, 3);

        ButcherControl_FmtTextCtrl *contentctrl = new ButcherControl_FmtTextCtrl(nbhtml, ID_CONTENT, wxDefaultPosition, wxSize(120, 110));
        contentctrl->SetEditFormat(ButcherControl_FmtTextCtrl::FMT_HTML);
        fieldshtmlrootsizer->Add(contentctrl , 1, wxGROW|wxALL, 3);
    }


    if (ButcherOptions::GetEditMode(GetProject()->GetOptions())>=ButcherOptions::EM_NORMAL)
    {
        //*****
        //* IMAGE
        //*****
        wxBoxSizer *imagesizer = new wxBoxSizer(wxVERTICAL);
        nbimage->SetSizer(imagesizer);

        // Image URL
        wxStaticText *imageurllabel = new wxStaticText(nbimage, wxID_STATIC, _("Image &URL: (http://www.site.com)"), wxDefaultPosition, wxDefaultSize, 0);
        imagesizer->Add(imageurllabel, 0, wxALIGN_LEFT|wxALL, 3);

        wxTextCtrl *imageurlctrl = new wxTextCtrl(nbimage, ID_IMAGEURL, wxEmptyString, wxDefaultPosition, wxDefaultSize,
                0);
        imagesizer->Add(imageurlctrl , 0, wxGROW|wxALL, 3);

        // Image URL Tag Append
        wxStaticText *imageurltagappendlabel = new wxStaticText(nbimage, wxID_STATIC, _("Image &URL Tag Append: (<A> attributes)"), wxDefaultPosition, wxDefaultSize, 0);
        imagesizer->Add(imageurltagappendlabel, 0, wxALIGN_LEFT|wxALL, 3);

        wxTextCtrl *imageurltagappendctrl = new wxTextCtrl(nbimage, ID_IMAGEURLTAGAPPEND, wxEmptyString, wxDefaultPosition, wxDefaultSize,
                0);
        imagesizer->Add(imageurltagappendctrl , 0, wxGROW|wxALL, 3);

        // Image tag append
        wxStaticText *imagetagappendlabel = new wxStaticText(nbimage, wxID_STATIC, _("Ima&ge Tag Append: (<IMG> attributes)"), wxDefaultPosition, wxDefaultSize, 0);
        imagesizer->Add(imagetagappendlabel, 0, wxALIGN_LEFT|wxALL, 3);

        wxTextCtrl *imagetagappendctrl = new wxTextCtrl(nbimage, ID_IMAGETAGAPPEND, wxEmptyString, wxDefaultPosition, wxDefaultSize,
                0);
        imagesizer->Add(imagetagappendctrl , 0, wxGROW|wxALL, 3);

        if (ButcherOptions::GetEditMode(GetProject()->GetOptions())>=ButcherOptions::EM_ADVANCED)
        {
            // image source
            wxRadioBox *imagesourcectrl=new wxRadioBox(nbimage, ID_IMAGESOURCE, _("Image &Source"), wxDefaultPosition, wxDefaultSize,
                    imagesourceimap_.Load());
            //imagesourceimap_.Load(imagesourcectrl);
            imagesizer->Add(imagesourcectrl, 0, wxGROW|wxALL, 3);

            // image link
            imagesizer->Add(
                new wxStaticText(nbimage, wxID_STATIC, _("Image &Link:"), wxDefaultPosition, wxDefaultSize, 0),
                0, wxALIGN_LEFT|wxALL, 3);
            ButcherControl_FileLink *imagelinkctrl = new ButcherControl_FileLink(nbimage, ID_IMAGELINK, NULL,
                    wxDefaultPosition, wxDefaultSize);
            imagelinkctrl->SetProject(GetProject());
            imagesizer->Add(imagelinkctrl, 0, wxGROW|wxALL, 3);

            // POSITIONS
            wxStaticBoxSizer *positionbox = new wxStaticBoxSizer(wxVERTICAL, nbimage, _("Output Image Margins"));
            imagesizer->Add(positionbox, 0, wxGROW|wxALL, 3);

            wxFlexGridSizer *positionsizer = new wxFlexGridSizer(6);
            positionbox->Add(positionsizer, 0, wxGROW|wxALL, 3);

            //positionsizer->AddGrowableCol(1, 1);
            //positionsizer->AddGrowableCol(4, 1);


            // top
            positionsizer->AddSpacer(0);
            //positionsizer->AddSpacer(0);

            positionsizer->Add(
                new wxStaticText(nbimage, wxID_STATIC, _("&Top:"), wxDefaultPosition, wxDefaultSize, 0),
                0, wxALIGN_RIGHT|wxALL, 3);

            wxSpinCtrl *mtopctrl = new wxSpinCtrl(nbimage, ID_MARGINTOP, wxEmptyString, wxDefaultPosition, wxSize(60, -1),
                                                  wxSP_ARROW_KEYS, 0, 10000, 0);
            positionsizer->Add(mtopctrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3);

            positionsizer->AddSpacer(0);
            positionsizer->AddSpacer(0);
            positionsizer->AddSpacer(0);

            // left
            positionsizer->Add(
                new wxStaticText(nbimage, wxID_STATIC, _("&Left:"), wxDefaultPosition, wxDefaultSize, 0),
                0, wxALIGN_CENTER_VERTICAL|wxALL, 3);

            wxSpinCtrl *mleftctrl = new wxSpinCtrl(nbimage, ID_MARGINLEFT, wxEmptyString, wxDefaultPosition, wxSize(60, -1),
                                                   wxSP_ARROW_KEYS, 0, 10000, 0);
            positionsizer->Add(mleftctrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3);

            positionsizer->AddSpacer(0);

            // right
            positionsizer->Add(
                new wxStaticText(nbimage, wxID_STATIC, _("&Right:"), wxDefaultPosition, wxDefaultSize, 0),
                0, wxALIGN_CENTER_VERTICAL|wxALL, 3);

            wxSpinCtrl *mrightctrl = new wxSpinCtrl(nbimage, ID_MARGINRIGHT, wxEmptyString, wxDefaultPosition, wxSize(60, -1),
                                                    wxSP_ARROW_KEYS, 0, 10000, 0);
            positionsizer->Add(mrightctrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3);

            positionsizer->AddSpacer(0);

            // bottom
            //positionsizer->AddSpacer(0);
            positionsizer->AddSpacer(0);

            positionsizer->Add(
                new wxStaticText(nbimage, wxID_STATIC, _("&Bottom:"), wxDefaultPosition, wxDefaultSize, 0),
                0, wxALIGN_RIGHT|wxALL, 3);

            wxSpinCtrl *mbottomctrl = new wxSpinCtrl(nbimage, ID_MARGINBOTTOM, wxEmptyString, wxDefaultPosition, wxSize(60, -1),
                    wxSP_ARROW_KEYS, 0, 10000, 0);
            positionsizer->Add(mbottomctrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3);

            positionsizer->AddSpacer(0);
            positionsizer->AddSpacer(0);
            positionsizer->AddSpacer(0);

        }
    }


    // divider line
    wxStaticLine *line = new wxStaticLine(this, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL);
    boxsizer->Add(line, 0, wxGROW|wxALL, 3);

    wxBoxSizer *buttonsizer = new wxBoxSizer(wxHORIZONTAL);
    boxsizer->Add(buttonsizer, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 3);

    // image format button
    wxButton* imgformat = new wxButton ( this, ID_IMAGEFORMATDIALOG, _("Ima&ge Formats..."), wxDefaultPosition, wxDefaultSize, 0 );
    buttonsizer->Add(imgformat, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3);

    // ok button
    wxButton* ok = new wxButton ( this, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
    buttonsizer->Add(ok, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3);

    // cancel button
    wxButton* cancel = new wxButton ( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
    buttonsizer->Add(cancel, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3);

#ifdef BUTCHER_USE_HELP
    // help button
    wxButton* help = new wxButton ( this, wxID_HELP, _("&Help"), wxDefaultPosition, wxDefaultSize, 0 );
    buttonsizer->Add(help, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3);
#endif

    // validators
    FindWindow(ID_NAME)->SetValidator(wxTextValidator(wxFILTER_NONE, &areaname_));
    //FindWindow(ID_WIDTH)->SetValidator(wxGenericValidator((int*)&maskwidth_));
    //FindWindow(ID_HEIGHT)->SetValidator(wxGenericValidator((int*)&maskheight_));
    FindWindow(ID_FILENAME)->SetValidator(wxTextValidator(wxFILTER_NONE, &filename_));
    FindWindow(ID_IMAGEMAPNAME)->SetValidator(wxTextValidator(wxFILTER_NONE, &imagemapname_));

    if (ButcherOptions::GetEditMode(GetProject()->GetOptions())>=ButcherOptions::EM_NORMAL)
    {
        FindWindow(ID_CONTENT)->SetValidator(ButcherControl_GenericValidator(&content_));
        FindWindow(ID_CELLTAGAPPEND)->SetValidator(wxTextValidator(wxFILTER_NONE, &celltagappend_));
        FindWindow(ID_IMAGEURL)->SetValidator(wxTextValidator(wxFILTER_NONE, &imageurl_));
        FindWindow(ID_IMAGEURLTAGAPPEND)->SetValidator(wxTextValidator(wxFILTER_NONE, &imageurltagappend_));
        FindWindow(ID_IMAGETAGAPPEND)->SetValidator(wxTextValidator(wxFILTER_NONE, &imagetagappend_));
        FindWindow(ID_TABLETAGAPPEND)->SetValidator(wxTextValidator(wxFILTER_NONE, &tabletagappend_));
    }


    SetSizer(topsizer);
    topsizer->SetSizeHints(this);

    CentreOnScreen();
}
Example #20
0
ConfigManagerBaseDlg::ConfigManagerBaseDlg(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);
        wxC774CInitBitmapResources();
        bBitmapLoaded = true;
    }

    wxBoxSizer* boxSizer2 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer2);

    wxBoxSizer* boxSizer12 = new wxBoxSizer(wxVERTICAL);

    boxSizer2->Add(boxSizer12, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText18 =
        new wxStaticText(this, wxID_ANY, _("Select the workspace configuration to edit from the drop down list:"),
                         wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    boxSizer12->Add(m_staticText18, 0, wxALL, WXC_FROM_DIP(5));

    wxArrayString m_choiceConfigurationsArr;
    m_choiceConfigurations =
        new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), m_choiceConfigurationsArr, 0);
    m_choiceConfigurations->SetFocus();

    boxSizer12->Add(m_choiceConfigurations, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_dvListCtrl = new clThemedListCtrl(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, 200)),
                                        wxDV_ROW_LINES | wxDV_SINGLE);

    boxSizer12->Add(m_dvListCtrl, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_dvListCtrl->AppendTextColumn(_("Project"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(-2), wxALIGN_LEFT,
                                   wxDATAVIEW_COL_RESIZABLE);
    m_dvListCtrl->AppendTextColumn(_("Configuration"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(-2), wxALIGN_LEFT,
                                   wxDATAVIEW_COL_RESIZABLE);
    m_stdBtnSizer4 = new wxStdDialogButtonSizer();

    boxSizer2->Add(m_stdBtnSizer4, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(10));

    m_button8 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_button8->SetDefault();
    m_stdBtnSizer4->AddButton(m_button8);

    m_button6 = new wxButton(this, wxID_APPLY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_stdBtnSizer4->AddButton(m_button6);

    m_button10 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_stdBtnSizer4->AddButton(m_button10);
    m_stdBtnSizer4->Realize();

    SetName(wxT("ConfigManagerBaseDlg"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) { GetSizer()->Fit(this); }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_choiceConfigurations->Connect(wxEVT_COMMAND_CHOICE_SELECTED,
                                    wxCommandEventHandler(ConfigManagerBaseDlg::OnWorkspaceConfigSelected), NULL, this);
    m_button8->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ConfigManagerBaseDlg::OnButtonOK), NULL,
                       this);
    m_button6->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ConfigManagerBaseDlg::OnButtonApply), NULL,
                       this);
    m_button6->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(ConfigManagerBaseDlg::OnButtonApplyUI), NULL, this);
}
Example #21
0
SelectProjectsDlgBase::SelectProjectsDlgBase(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);
        wxCF5E0InitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* boxSizer25 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer25);
    
    m_banner45 = new wxBannerWindow(this, wxID_ANY, wxTOP, wxDefaultPosition, wxSize(-1,-1), wxBORDER_THEME);
    m_banner45->SetBitmap(wxNullBitmap);
    m_banner45->SetText(_("Select Projects"), _("Select the 'rename symbol' project scope"));
    m_banner45->SetGradient(wxSystemSettings::GetColour(wxSYS_COLOUR_ACTIVECAPTION), wxSystemSettings::GetColour(wxSYS_COLOUR_ACTIVECAPTION));
    m_banner45->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_CAPTIONTEXT));
    
    boxSizer25->Add(m_banner45, 0, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* boxSizer33 = new wxBoxSizer(wxHORIZONTAL);
    
    boxSizer25->Add(boxSizer33, 1, wxALL|wxEXPAND, 5);
    
    wxArrayString m_checkListBoxProjectsArr;
    m_checkListBoxProjects = new wxCheckListBox(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), m_checkListBoxProjectsArr, wxLB_SINGLE);
    
    boxSizer33->Add(m_checkListBoxProjects, 1, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* boxSizer35 = new wxBoxSizer(wxVERTICAL);
    
    boxSizer33->Add(boxSizer35, 0, 0, 5);
    
    m_button37 = new wxButton(this, ID_CHECK_ALL, _("&Check All"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer35->Add(m_button37, 0, wxALL|wxEXPAND, 5);
    
    m_button39 = new wxButton(this, ID_UNCHECK_ALL, _("&Uncheck All"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer35->Add(m_button39, 0, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* boxSizer27 = new wxBoxSizer(wxHORIZONTAL);
    
    boxSizer25->Add(boxSizer27, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_button29 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_button29->SetDefault();
    
    boxSizer27->Add(m_button29, 0, wxALL, 5);
    
    m_button31 = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer27->Add(m_button31, 0, wxALL, 5);
    
    SetName(wxT("SelectProjectsDlgBase"));
    SetSizeHints(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_button37->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SelectProjectsDlgBase::OnSelectAll), NULL, this);
    m_button39->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SelectProjectsDlgBase::OnUnSelectAll), NULL, this);
    
}
Example #22
0
SvnCommitDialogBaseClass::SvnCommitDialogBaseClass(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);
        wxC38D8InitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* boxSizer1 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer1);
    
    m_auibar76 = new wxAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxAUI_TB_PLAIN_BACKGROUND|wxAUI_TB_DEFAULT_STYLE|wxAUI_TB_HORZ_TEXT);
    m_auibar76->SetToolBitmapSize(wxSize(16,16));
    
    boxSizer1->Add(m_auibar76, 0, wxEXPAND, 5);
    
    m_auibar76->AddTool(ID_SHOW_COMMIT_HISTORY, _("Commit History"), wxXmlResource::Get()->LoadBitmap(wxT("16-history")), wxNullBitmap, wxITEM_NORMAL, _("Show Commit History"), _("Show Commit History"), NULL);
    
    m_auibar76->AddStretchSpacer(1);
    
    m_auibar76->AddTool(ID_TOOL_CLEAR_HISTORY, _("Clear History"), wxXmlResource::Get()->LoadBitmap(wxT("16-clear")), wxNullBitmap, wxITEM_NORMAL, _("Clear History"), _("Clear History"), NULL);
    m_auibar76->Realize();
    
    wxFlexGridSizer* flexGridSizer5 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer5->SetFlexibleDirection( wxBOTH );
    flexGridSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    flexGridSizer5->AddGrowableCol(1);
    
    boxSizer1->Add(flexGridSizer5, 0, wxALL|wxEXPAND, 5);
    
    m_staticText32 = new wxStaticText(this, wxID_ANY, _("Feature Request ID:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer5->Add(m_staticText32, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
    
    m_textCtrlFrID = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlFrID->SetHint(wxT(""));
    #endif
    
    flexGridSizer5->Add(m_textCtrlFrID, 0, wxALL|wxEXPAND, 5);
    
    m_staticTextBugID = new wxStaticText(this, wxID_ANY, _("Bug ID:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer5->Add(m_staticTextBugID, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
    
    m_textCtrlBugID = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlBugID->SetHint(wxT(""));
    #endif
    
    flexGridSizer5->Add(m_textCtrlBugID, 0, wxALL|wxEXPAND, 5);
    
    m_splitterV = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxSP_LIVE_UPDATE|wxSP_NO_XP_THEME|wxSP_3DSASH);
    m_splitterV->SetSashGravity(0.5);
    m_splitterV->SetMinimumPaneSize(10);
    
    boxSizer1->Add(m_splitterV, 1, wxALL|wxEXPAND, 5);
    
    m_splitterPage52 = new wxPanel(m_splitterV, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    
    wxBoxSizer* boxSizer58 = new wxBoxSizer(wxVERTICAL);
    m_splitterPage52->SetSizer(boxSizer58);
    
    m_splitterH = new wxSplitterWindow(m_splitterPage52, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxSP_LIVE_UPDATE|wxSP_NO_XP_THEME|wxSP_3DSASH);
    m_splitterH->SetSashGravity(0.5);
    m_splitterH->SetMinimumPaneSize(10);
    
    boxSizer58->Add(m_splitterH, 1, wxEXPAND, 5);
    
    m_panel1 = new wxPanel(m_splitterH, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    
    wxBoxSizer* boxSizer15 = new wxBoxSizer(wxVERTICAL);
    m_panel1->SetSizer(boxSizer15);
    
    m_staticText17 = new wxStaticText(m_panel1, wxID_ANY, _("Modified Paths:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer15->Add(m_staticText17, 0, wxALL|wxALIGN_LEFT, 5);
    
    wxArrayString m_checkListFilesArr;
    m_checkListFiles = new wxCheckListBox(m_panel1, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), m_checkListFilesArr, wxLB_SINGLE);
    
    boxSizer15->Add(m_checkListFiles, 1, wxALL|wxEXPAND, 2);
    
    m_splitterPage14 = new wxPanel(m_splitterH, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_splitterH->SplitVertically(m_panel1, m_splitterPage14, 0);
    
    wxBoxSizer* boxSizer16 = new wxBoxSizer(wxVERTICAL);
    m_splitterPage14->SetSizer(boxSizer16);
    
    m_staticText19 = new wxStaticText(m_splitterPage14, wxID_ANY, _("Diff:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer16->Add(m_staticText19, 0, wxALL|wxALIGN_LEFT, 5);
    
    m_stcDiff = new wxStyledTextCtrl(m_splitterPage14, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), 0);
    // 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_NULL);
    // 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(""));
    
    boxSizer16->Add(m_stcDiff, 1, wxALL|wxEXPAND, 2);
    
    m_splitterPage56 = new wxPanel(m_splitterV, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_splitterV->SplitHorizontally(m_splitterPage52, m_splitterPage56, 0);
    
    wxBoxSizer* boxSizer60 = new wxBoxSizer(wxVERTICAL);
    m_splitterPage56->SetSizer(boxSizer60);
    
    m_staticText62 = new wxStaticText(m_splitterPage56, wxID_ANY, _("Commit message:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer60->Add(m_staticText62, 0, wxALL, 5);
    
    m_stcMessage = new wxStyledTextCtrl(m_splitterPage56, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxBORDER_THEME);
    m_stcMessage->SetFocus();
    // Configure the fold margin
    m_stcMessage->SetMarginType     (4, wxSTC_MARGIN_SYMBOL);
    m_stcMessage->SetMarginMask     (4, wxSTC_MASK_FOLDERS);
    m_stcMessage->SetMarginSensitive(4, true);
    m_stcMessage->SetMarginWidth    (4, 0);
    
    // Configure the tracker margin
    m_stcMessage->SetMarginWidth(1, 0);
    
    // Configure the symbol margin
    m_stcMessage->SetMarginType (2, wxSTC_MARGIN_SYMBOL);
    m_stcMessage->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS));
    m_stcMessage->SetMarginWidth(2, 0);
    m_stcMessage->SetMarginSensitive(2, true);
    
    // Configure the line numbers margin
    m_stcMessage->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_stcMessage->SetMarginWidth(0,0);
    
    // Configure the line symbol margin
    m_stcMessage->SetMarginType(3, wxSTC_MARGIN_FORE);
    m_stcMessage->SetMarginMask(3, 0);
    m_stcMessage->SetMarginWidth(3,0);
    // Select the lexer
    m_stcMessage->SetLexer(wxSTC_LEX_NULL);
    // Set default font / styles
    m_stcMessage->StyleClearAll();
    m_stcMessage->SetWrapMode(0);
    m_stcMessage->SetIndentationGuides(0);
    m_stcMessage->SetKeyWords(0, wxT(""));
    m_stcMessage->SetKeyWords(1, wxT(""));
    m_stcMessage->SetKeyWords(2, wxT(""));
    m_stcMessage->SetKeyWords(3, wxT(""));
    m_stcMessage->SetKeyWords(4, wxT(""));
    
    boxSizer60->Add(m_stcMessage, 1, wxALL|wxEXPAND, 2);
    
    m_stdBtnSizer66 = new wxStdDialogButtonSizer();
    
    boxSizer1->Add(m_stdBtnSizer66, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_buttonCancel = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_stdBtnSizer66->AddButton(m_buttonCancel);
    
    m_buttonOK = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_buttonOK->SetDefault();
    m_stdBtnSizer66->AddButton(m_buttonOK);
    m_stdBtnSizer66->Realize();
    
    SetName(wxT("SvnCommitDialogBaseClass"));
    SetSize(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    this->Connect(ID_SHOW_COMMIT_HISTORY, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SvnCommitDialogBaseClass::OnShowCommitHistory), NULL, this);
    this->Connect(ID_SHOW_COMMIT_HISTORY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SvnCommitDialogBaseClass::OnShowCommitHistoryUI), NULL, this);
    this->Connect(ID_TOOL_CLEAR_HISTORY, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SvnCommitDialogBaseClass::OnClearHistory), NULL, this);
    this->Connect(ID_TOOL_CLEAR_HISTORY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SvnCommitDialogBaseClass::OnClearHistoryUI), NULL, this);
    m_checkListFiles->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(SvnCommitDialogBaseClass::OnFileSelected), NULL, this);
    
}
LocalEditorSettingsbase::LocalEditorSettingsbase(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);
        wxC2ED4InitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* mainSizer = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(mainSizer);
    
    m_notebook23 = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxBK_DEFAULT);
    m_notebook23->SetName(wxT("m_notebook23"));
    wxImageList* m_notebook23_il = new wxImageList(16, 16);
    m_notebook23->AssignImageList(m_notebook23_il);
    
    mainSizer->Add(m_notebook23, 1, wxALL|wxEXPAND, 5);
    
    m_panel2 = new wxPanel(m_notebook23, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    int m_panel2ImgIndex;
    m_panel2ImgIndex = m_notebook23_il->Add(wxXmlResource::Get()->LoadBitmap(wxT("indent")));
    m_notebook23->AddPage(m_panel2, _("Indentation"), true, m_panel2ImgIndex);
    
    wxBoxSizer* boxSizer3 = new wxBoxSizer(wxVERTICAL);
    m_panel2->SetSizer(boxSizer3);
    
    wxFlexGridSizer* fgSizer31 = new wxFlexGridSizer(0, 2, 0, 20);
    fgSizer31->SetFlexibleDirection( wxBOTH );
    fgSizer31->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    fgSizer31->AddGrowableCol(1);
    
    boxSizer3->Add(fgSizer31, 1, wxALL|wxEXPAND, 5);
    
    m_indentsUsesTabsEnable = new wxCheckBox(m_panel2, wxID_ANY, _("Use global setting"), wxDefaultPosition, wxSize(-1, -1), wxALIGN_RIGHT);
    m_indentsUsesTabsEnable->SetValue(true);
    
    fgSizer31->Add(m_indentsUsesTabsEnable, 0, wxALL, 5);
    
    m_indentsUsesTabs = new wxCheckBox(m_panel2, wxID_ANY, _("Use tabs in indentation"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_indentsUsesTabs->SetValue(false);
    m_indentsUsesTabs->SetToolTip(_("If clear, only spaces will be used for indentation.\nIf set, a mixture of tabs and spaces will be used."));
    
    fgSizer31->Add(m_indentsUsesTabs, 0, wxALL, 5);
    
    m_tabWidthEnable = new wxCheckBox(m_panel2, wxID_ANY, _("Use global setting"), wxDefaultPosition, wxSize(-1, -1), wxALIGN_RIGHT);
    m_tabWidthEnable->SetValue(true);
    
    fgSizer31->Add(m_tabWidthEnable, 0, wxALL, 5);
    
    wxBoxSizer* bSizer7 = new wxBoxSizer(wxHORIZONTAL);
    
    fgSizer31->Add(bSizer7, 1, wxEXPAND, 5);
    
    m_staticTexttabWidth = new wxStaticText(m_panel2, wxID_ANY, _("Columns per tab character in document:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer7->Add(m_staticTexttabWidth, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    bSizer7->Add(0, 0, 1, wxEXPAND, 5);
    
    m_tabWidth = new wxSpinCtrl(m_panel2, wxID_ANY, wxT("4"), wxDefaultPosition, wxSize(-1, -1), wxSP_ARROW_KEYS);
    m_tabWidth->SetRange(1, 20);
    m_tabWidth->SetValue(4);
    
    bSizer7->Add(m_tabWidth, 0, wxALL|wxEXPAND, 5);
    
    m_indentWidthEnable = new wxCheckBox(m_panel2, wxID_ANY, _("Use global setting"), wxDefaultPosition, wxSize(-1, -1), wxALIGN_RIGHT);
    m_indentWidthEnable->SetValue(true);
    
    fgSizer31->Add(m_indentWidthEnable, 0, wxALL, 5);
    
    wxBoxSizer* bSizer6 = new wxBoxSizer(wxHORIZONTAL);
    
    fgSizer31->Add(bSizer6, 1, wxEXPAND, 5);
    
    m_staticTextindentWidth = new wxStaticText(m_panel2, wxID_ANY, _("Columns per indentation level:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer6->Add(m_staticTextindentWidth, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    bSizer6->Add(0, 0, 1, wxEXPAND, 5);
    
    m_indentWidth = new wxSpinCtrl(m_panel2, wxID_ANY, wxT("4"), wxDefaultPosition, wxSize(-1, -1), wxSP_ARROW_KEYS);
    m_indentWidth->SetRange(1, 20);
    m_indentWidth->SetValue(4);
    
    bSizer6->Add(m_indentWidth, 0, wxALL|wxEXPAND, 5);
    
    m_panel3 = new wxPanel(m_notebook23, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    int m_panel3ImgIndex;
    m_panel3ImgIndex = m_notebook23_il->Add(wxXmlResource::Get()->LoadBitmap(wxT("margins")));
    m_notebook23->AddPage(m_panel3, _("Margins"), false, m_panel3ImgIndex);
    
    wxBoxSizer* boxSizer2 = new wxBoxSizer(wxVERTICAL);
    m_panel3->SetSizer(boxSizer2);
    
    wxFlexGridSizer* fgSizer21 = new wxFlexGridSizer(0, 2, 0, 20);
    fgSizer21->SetFlexibleDirection( wxBOTH );
    fgSizer21->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    fgSizer21->AddGrowableCol(1);
    
    boxSizer2->Add(fgSizer21, 1, wxALL|wxEXPAND, 5);
    
    m_displayBookmarkMarginEnable = new wxCheckBox(m_panel3, wxID_ANY, _("Use global setting"), wxDefaultPosition, wxSize(-1, -1), wxALIGN_RIGHT);
    m_displayBookmarkMarginEnable->SetValue(true);
    
    fgSizer21->Add(m_displayBookmarkMarginEnable, 0, wxALL, 5);
    
    m_displayBookmarkMargin = new wxCheckBox(m_panel3, wxID_ANY, _("Display Breakpoints / Bookmarks margin"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_displayBookmarkMargin->SetValue(false);
    
    fgSizer21->Add(m_displayBookmarkMargin, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_checkBoxDisplayFoldMarginEnable = new wxCheckBox(m_panel3, wxID_ANY, _("Use global setting"), wxDefaultPosition, wxSize(-1, -1), wxALIGN_RIGHT);
    m_checkBoxDisplayFoldMarginEnable->SetValue(true);
    
    fgSizer21->Add(m_checkBoxDisplayFoldMarginEnable, 0, wxALL, 5);
    
    m_checkBoxDisplayFoldMargin = new wxCheckBox(m_panel3, wxID_ANY, _("Display Folding margin"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxDisplayFoldMargin->SetValue(false);
    m_checkBoxDisplayFoldMargin->SetToolTip(_("Display the margin that lets you 'fold' individual functions, or sections of functions, to hide their contents"));
    
    fgSizer21->Add(m_checkBoxDisplayFoldMargin, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_checkBoxHideChangeMarkerMarginEnable = new wxCheckBox(m_panel3, wxID_ANY, _("Use global setting"), wxDefaultPosition, wxSize(-1, -1), wxALIGN_RIGHT);
    m_checkBoxHideChangeMarkerMarginEnable->SetValue(true);
    
    fgSizer21->Add(m_checkBoxHideChangeMarkerMarginEnable, 0, wxALL, 5);
    
    m_checkBoxHideChangeMarkerMargin = new wxCheckBox(m_panel3, wxID_ANY, _("Hide change marker margin"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxHideChangeMarkerMargin->SetValue(false);
    m_checkBoxHideChangeMarkerMargin->SetToolTip(_("Display the margin in which a coloured line marks any altered line"));
    
    fgSizer21->Add(m_checkBoxHideChangeMarkerMargin, 0, wxALL, 5);
    
    m_displayLineNumbersEnable = new wxCheckBox(m_panel3, wxID_ANY, _("Use global setting"), wxDefaultPosition, wxSize(-1, -1), wxALIGN_RIGHT);
    m_displayLineNumbersEnable->SetValue(true);
    
    fgSizer21->Add(m_displayLineNumbersEnable, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_displayLineNumbers = new wxCheckBox(m_panel3, wxID_ANY, _("Display line numbers"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_displayLineNumbers->SetValue(false);
    m_displayLineNumbers->SetToolTip(_("Display line numbers margin"));
    
    fgSizer21->Add(m_displayLineNumbers, 0, wxALL, 5);
    
    m_panel4 = new wxPanel(m_notebook23, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    int m_panel4ImgIndex;
    m_panel4ImgIndex = m_notebook23_il->Add(wxXmlResource::Get()->LoadBitmap(wxT("misc")));
    m_notebook23->AddPage(m_panel4, _("Misc"), false, m_panel4ImgIndex);
    
    wxBoxSizer* boxSizer5 = new wxBoxSizer(wxVERTICAL);
    m_panel4->SetSizer(boxSizer5);
    
    wxFlexGridSizer* fgSizer2 = new wxFlexGridSizer(0, 2, 0, 20);
    fgSizer2->SetFlexibleDirection( wxBOTH );
    fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    fgSizer2->AddGrowableCol(1);
    
    boxSizer5->Add(fgSizer2, 0, wxALL|wxALIGN_LEFT, 5);
    
    m_showIndentationGuideLinesEnable = new wxCheckBox(m_panel4, wxID_ANY, _("Use global setting"), wxDefaultPosition, wxSize(-1, -1), wxALIGN_RIGHT);
    m_showIndentationGuideLinesEnable->SetValue(true);
    
    fgSizer2->Add(m_showIndentationGuideLinesEnable, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_showIndentationGuideLines = new wxCheckBox(m_panel4, wxID_ANY, _("Show indentation guidelines"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_showIndentationGuideLines->SetValue(false);
    m_showIndentationGuideLines->SetToolTip(_("Display horizontal guides for matching braces \"{\""));
    
    fgSizer2->Add(m_showIndentationGuideLines, 0, wxALL, 5);
    
    m_highlightCaretLineEnable = new wxCheckBox(m_panel4, wxID_ANY, _("Use global setting"), wxDefaultPosition, wxSize(-1, -1), wxALIGN_RIGHT);
    m_highlightCaretLineEnable->SetValue(true);
    
    fgSizer2->Add(m_highlightCaretLineEnable, 0, wxALL, 5);
    
    m_highlightCaretLine = new wxCheckBox(m_panel4, wxID_ANY, _("Highlight caret line"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_highlightCaretLine->SetValue(false);
    m_highlightCaretLine->SetToolTip(_("Set a different background colour for the line containing the caret"));
    
    fgSizer2->Add(m_highlightCaretLine, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_checkBoxTrimLineEnable = new wxCheckBox(m_panel4, wxID_ANY, _("Use global setting"), wxDefaultPosition, wxSize(-1, -1), wxALIGN_RIGHT);
    m_checkBoxTrimLineEnable->SetValue(true);
    
    fgSizer2->Add(m_checkBoxTrimLineEnable, 0, wxALL, 5);
    
    m_checkBoxTrimLine = new wxCheckBox(m_panel4, wxID_ANY, _("When saving files, trim empty lines"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxTrimLine->SetValue(false);
    
    fgSizer2->Add(m_checkBoxTrimLine, 0, wxALL, 5);
    
    m_checkBoxAppendLFEnable = new wxCheckBox(m_panel4, wxID_ANY, _("Use global setting"), wxDefaultPosition, wxSize(-1, -1), wxALIGN_RIGHT);
    m_checkBoxAppendLFEnable->SetValue(true);
    
    fgSizer2->Add(m_checkBoxAppendLFEnable, 0, wxALL, 5);
    
    m_checkBoxAppendLF = new wxCheckBox(m_panel4, wxID_ANY, _("If missing, append EOL at end of file"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxAppendLF->SetValue(false);
    m_checkBoxAppendLF->SetToolTip(_("Make sure the file finishes with an end-of-line"));
    
    fgSizer2->Add(m_checkBoxAppendLF, 0, wxALL, 5);
    
    wxFlexGridSizer* flexGridSizer15 = new wxFlexGridSizer(0, 3, 0, 0);
    flexGridSizer15->SetFlexibleDirection( wxBOTH );
    flexGridSizer15->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    flexGridSizer15->AddGrowableCol(2);
    
    boxSizer5->Add(flexGridSizer15, 1, wxALL|wxEXPAND|wxALIGN_LEFT, 5);
    
    m_whitespaceStyleEnable = new wxCheckBox(m_panel4, wxID_ANY, _("Use global setting"), wxDefaultPosition, wxSize(-1, -1), wxALIGN_RIGHT);
    m_whitespaceStyleEnable->SetValue(true);
    
    flexGridSizer15->Add(m_whitespaceStyleEnable, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_staticTextwhitespaceStyle = new wxStaticText(m_panel4, wxID_ANY, _("Whitespace visibility:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    flexGridSizer15->Add(m_staticTextwhitespaceStyle, 0, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5);
    
    wxArrayString m_whitespaceStyleArr;
    m_whitespaceStyle = new wxChoice(m_panel4, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_whitespaceStyleArr, 0);
    
    flexGridSizer15->Add(m_whitespaceStyle, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_choiceEOLEnable = new wxCheckBox(m_panel4, wxID_ANY, _("Use global setting"), wxDefaultPosition, wxSize(-1, -1), wxALIGN_RIGHT);
    m_choiceEOLEnable->SetValue(true);
    
    flexGridSizer15->Add(m_choiceEOLEnable, 0, wxALL, 5);
    
    m_EOLstatic = new wxStaticText(m_panel4, wxID_ANY, _("EOL Mode:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    flexGridSizer15->Add(m_EOLstatic, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    wxArrayString m_choiceEOLArr;
    m_choiceEOL = new wxChoice(m_panel4, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_choiceEOLArr, 0);
    m_choiceEOL->SetToolTip(_("Set the editor's EOL mode (End Of Line). When set to 'Default' CodeLite will set the EOL according to the hosting OS"));
    
    flexGridSizer15->Add(m_choiceEOL, 0, wxALL|wxEXPAND, 5);
    
    m_fileEncodingEnable = new wxCheckBox(m_panel4, wxID_ANY, _("Use global setting"), wxDefaultPosition, wxSize(-1, -1), wxALIGN_RIGHT);
    m_fileEncodingEnable->SetValue(true);
    
    flexGridSizer15->Add(m_fileEncodingEnable, 0, wxALL, 5);
    
    m_staticTextfileEncoding = new wxStaticText(m_panel4, wxID_ANY, _("File font encoding"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    flexGridSizer15->Add(m_staticTextfileEncoding, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    wxArrayString m_fileEncodingArr;
    m_fileEncoding = new wxChoice(m_panel4, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_fileEncodingArr, 0);
    
    flexGridSizer15->Add(m_fileEncoding, 0, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* bSizer4 = new wxBoxSizer(wxHORIZONTAL);
    
    mainSizer->Add(bSizer4, 0, wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_stdBtnSizer17 = new wxStdDialogButtonSizer();
    
    bSizer4->Add(m_stdBtnSizer17, 0, wxALL, 10);
    
    m_button19 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_button19->SetDefault();
    m_stdBtnSizer17->AddButton(m_button19);
    
    m_button21 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_stdBtnSizer17->AddButton(m_button21);
    m_stdBtnSizer17->Realize();
    
    
    #if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(m_notebook23)){
        wxPersistenceManager::Get().RegisterAndRestore(m_notebook23);
    } else {
        wxPersistenceManager::Get().Restore(m_notebook23);
    }
    #endif
    
    SetName(wxT("LocalEditorSettingsbase"));
    SetSize(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent();
    } else {
        CentreOnScreen();
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_indentsUsesTabsEnable->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(LocalEditorSettingsbase::indentsUsesTabsUpdateUI), NULL, this);
    m_tabWidthEnable->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(LocalEditorSettingsbase::tabWidthUpdateUI), NULL, this);
    m_indentWidthEnable->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(LocalEditorSettingsbase::indentWidthUpdateUI), NULL, this);
    m_displayBookmarkMarginEnable->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(LocalEditorSettingsbase::displayBookmarkMarginUpdateUI), NULL, this);
    m_checkBoxDisplayFoldMarginEnable->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(LocalEditorSettingsbase::checkBoxDisplayFoldMarginUpdateUI), NULL, this);
    m_checkBoxHideChangeMarkerMarginEnable->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(LocalEditorSettingsbase::checkBoxHideChangeMarkerMarginUpdateUI), NULL, this);
    m_displayLineNumbersEnable->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(LocalEditorSettingsbase::displayLineNumbersUpdateUI), NULL, this);
    m_showIndentationGuideLinesEnable->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(LocalEditorSettingsbase::showIndentationGuideLinesUpdateUI), NULL, this);
    m_highlightCaretLineEnable->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(LocalEditorSettingsbase::highlightCaretLineUpdateUI), NULL, this);
    m_checkBoxTrimLineEnable->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(LocalEditorSettingsbase::checkBoxTrimLineUpdateUI), NULL, this);
    m_checkBoxAppendLFEnable->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(LocalEditorSettingsbase::checkBoxAppendLFUpdateUI), NULL, this);
    m_whitespaceStyleEnable->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(LocalEditorSettingsbase::whitespaceStyleUpdateUI), NULL, this);
    m_choiceEOLEnable->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(LocalEditorSettingsbase::choiceEOLUpdateUI), NULL, this);
    m_fileEncodingEnable->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(LocalEditorSettingsbase::fileEncodingUpdateUI), NULL, this);
    m_button19->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LocalEditorSettingsbase::OnOK), NULL, this);
    
}
Example #24
0
SvnSyncDialogBaseClass::SvnSyncDialogBaseClass(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);
        wxC38D8InitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* boxSizer26 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer26);
    
    wxBoxSizer* boxSizer32 = new wxBoxSizer(wxHORIZONTAL);
    
    boxSizer26->Add(boxSizer32, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
    
    m_staticText31 = new wxStaticText(this, wxID_ANY, _("Root URL:"), wxDefaultPosition, wxSize(-1,-1), 0);
    wxFont m_staticText31Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_staticText31Font.SetWeight(wxFONTWEIGHT_BOLD);
    m_staticText31->SetFont(m_staticText31Font);
    
    boxSizer32->Add(m_staticText31, 0, wxALL, 5);
    
    m_staticTextSvnInfo = new wxStaticText(this, wxID_ANY, _("<none detected>"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer32->Add(m_staticTextSvnInfo, 0, wxALL, 5);
    
    wxFlexGridSizer* flexGridSizer37 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer37->SetFlexibleDirection( wxBOTH );
    flexGridSizer37->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    flexGridSizer37->AddGrowableCol(1);
    
    boxSizer26->Add(flexGridSizer37, 0, wxALL|wxEXPAND, 5);
    
    m_staticText34 = new wxStaticText(this, wxID_ANY, _("Root Directory:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer37->Add(m_staticText34, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
    
    m_dirPickerRootDir = new wxDirPickerCtrl(this, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxSize(-1,-1), wxDIRP_DEFAULT_STYLE);
    
    flexGridSizer37->Add(m_dirPickerRootDir, 0, wxEXPAND|wxALL, 5);
    
    m_staticText40 = new wxStaticText(this, wxID_ANY, _("Exclude these file extensions:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer37->Add(m_staticText40, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
    
    m_textCtrlExclude = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_RICH2);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlExclude->SetHint(wxT(""));
    #endif
    
    flexGridSizer37->Add(m_textCtrlExclude, 0, wxEXPAND|wxALL, 5);
    
    flexGridSizer37->Add(0, 0, 0, wxALL, 5);
    
    m_checkBoxBin = new wxCheckBox(this, wxID_ANY, _("Exclude binary (application/octet-stream) files"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_checkBoxBin->SetValue(false);
    
    flexGridSizer37->Add(m_checkBoxBin, 0, wxALL, 5);
    
    boxSizer26->Add(0, 0, 1, wxEXPAND|wxALL, 5);
    
    wxBoxSizer* boxSizer27 = new wxBoxSizer(wxHORIZONTAL);
    
    boxSizer26->Add(boxSizer27, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
    
    m_button28 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_button28->SetDefault();
    
    boxSizer27->Add(m_button28, 0, wxALL, 5);
    
    m_button29 = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer27->Add(m_button29, 0, wxALL, 5);
    
    SetName(wxT("SvnSyncDialogBaseClass"));
    SetSize(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_button28->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SvnSyncDialogBaseClass::OnOkUI), NULL, this);
    m_button28->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SvnSyncDialogBaseClass::OnButtonOK), NULL, this);
    
}
Example #25
0
TestClassBaseDlg::TestClassBaseDlg(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);
        wxC7CCBInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* bSizer1 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer1);
    
    wxFlexGridSizer* fgSizer2 = new wxFlexGridSizer(0, 3, 0, 0);
    fgSizer2->SetFlexibleDirection( wxBOTH );
    fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    fgSizer2->AddGrowableCol(1);
    
    bSizer1->Add(fgSizer2, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    m_staticText16 = new wxStaticText(this, wxID_ANY, _("Class Name:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
    
    fgSizer2->Add(m_staticText16, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
    
    m_textCtrlClassName = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_textCtrlClassName->SetFocus();
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlClassName->SetHint(_("Class Name..."));
    #endif
    
    fgSizer2->Add(m_textCtrlClassName, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
    
    m_buttonClass = new wxButton(this, wxID_ANY, _("..."), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxBU_EXACTFIT);
    m_buttonClass->SetToolTip(_("Select the class to test from a list of classes"));
    
    fgSizer2->Add(m_buttonClass, 0, wxALL, WXC_FROM_DIP(5));
    
    m_staticText4 = new wxStaticText(this, wxID_ANY, _("Fixture (optional):"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    
    fgSizer2->Add(m_staticText4, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
    
    m_textCtrlFixtureName = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlFixtureName->SetHint(wxT(""));
    #endif
    
    fgSizer2->Add(m_textCtrlFixtureName, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    fgSizer2->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));
    
    m_staticText3 = new wxStaticText(this, wxID_ANY, _("Output file (optional):"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    
    fgSizer2->Add(m_staticText3, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
    
    m_textCtrlFileName = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_textCtrlFileName->SetToolTip(_("The name of the file of which CodeLite will generate the test code.\nWhen left empty, CodeLite will use the first available source file in target project"));
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlFileName->SetHint(wxT(""));
    #endif
    
    fgSizer2->Add(m_textCtrlFileName, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    fgSizer2->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));
    
    m_staticText5 = new wxStaticText(this, wxID_ANY, _("UnitTest++ Project:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    
    fgSizer2->Add(m_staticText5, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
    
    wxArrayString m_choiceProjectsArr;
    m_choiceProjects = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), m_choiceProjectsArr, 0);
    
    fgSizer2->Add(m_choiceProjects, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    fgSizer2->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));
    
    m_staticText6 = new wxStaticText(this, wxID_ANY, _("Functions to test:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    
    bSizer1->Add(m_staticText6, 0, wxALL, WXC_FROM_DIP(5));
    
    wxBoxSizer* bSizer5 = new wxBoxSizer(wxHORIZONTAL);
    
    bSizer1->Add(bSizer5, 1, wxEXPAND, WXC_FROM_DIP(5));
    
    wxArrayString m_checkListMethodsArr;
    m_checkListMethods = new wxCheckListBox(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), m_checkListMethodsArr, 0);
    
    bSizer5->Add(m_checkListMethods, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    wxBoxSizer* bSizer6 = new wxBoxSizer(wxVERTICAL);
    
    bSizer5->Add(bSizer6, 0, wxEXPAND, WXC_FROM_DIP(5));
    
    m_buttonCheckAll = new wxButton(this, wxID_ANY, _("Check &All"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    
    bSizer6->Add(m_buttonCheckAll, 0, wxALL, WXC_FROM_DIP(5));
    
    m_buttonUnCheckAll = new wxButton(this, wxID_ANY, _("Clear"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    
    bSizer6->Add(m_buttonUnCheckAll, 0, wxALL, WXC_FROM_DIP(5));
    
    m_stdBtnSizer2 = new wxStdDialogButtonSizer();
    
    bSizer1->Add(m_stdBtnSizer2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(10));
    
    m_button4 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_button4->SetDefault();
    m_stdBtnSizer2->AddButton(m_button4);
    
    m_button6 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_stdBtnSizer2->AddButton(m_button6);
    m_stdBtnSizer2->Realize();
    
    SetName(wxT("TestClassBaseDlg"));
    SetSize(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_textCtrlClassName->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(TestClassBaseDlg::OnClassNameUpdated), NULL, this);
    m_buttonClass->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TestClassBaseDlg::OnShowClassListDialog), NULL, this);
    m_buttonCheckAll->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TestClassBaseDlg::OnCheckAll), NULL, this);
    m_buttonUnCheckAll->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TestClassBaseDlg::OnUnCheckAll), NULL, this);
    m_button4->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TestClassBaseDlg::OnButtonOk), NULL, this);
    
}
void HTMLButcherListEditDialog::ControlsChanged()
{
    topsizer_->SetSizeHints(this);

    CentreOnScreen();
}
Example #27
0
CLImport::CLImport(wxWindow* parent) {
    Create(parent, wxID_ANY, wxT("ChordLive Import"), wxDefaultPosition,
           wxDefaultSize, wxDEFAULT_FRAME_STYLE);

	wxBoxSizer *topsizer = new wxBoxSizer(wxVERTICAL);

	// TITLE
	topsizer->Add(new wxStaticText(this, wxID_ANY, _("Title")), 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxGROW, 3);
	
	wxTextCtrl *title = new wxTextCtrl(this, ID_TITLE, wxEmptyString, wxDefaultPosition, wxSize(200, -1));
	topsizer->Add(title, 0, wxALL|wxGROW, 3);

	// ARTIST
	topsizer->Add(new wxStaticText(this, wxID_ANY, _("Artist")), 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxGROW, 3);
	
	wxTextCtrl *artist = new wxTextCtrl(this, ID_ARTIST, wxEmptyString, wxDefaultPosition, wxSize(200, -1));
	topsizer->Add(artist, 0, wxALL|wxGROW, 3);

	// TEXT SIZER
	wxFlexGridSizer *textsizer = new wxFlexGridSizer(2, 2);
	textsizer->AddGrowableRow(1, 1);
	textsizer->AddGrowableCol(0, 1);
	textsizer->AddGrowableCol(1, 1);
	textsizer->SetFlexibleDirection(wxBOTH);
	topsizer->Add(textsizer, 1, wxALL|wxGROW, 3);

	// TEXT
	textsizer->Add(new wxStaticText(this, wxID_ANY, _("Lyrics Text")), 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxGROW, 3);

	// PREVIEW
	textsizer->Add(new wxStaticText(this, wxID_ANY, _("Preview")), 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxGROW, 3);

	// TEXT
	wxTextCtrl *text = new wxTextCtrl(this, ID_TEXT, wxEmptyString, wxDefaultPosition, wxSize(400, 300), wxTE_MULTILINE);
	wxFont linefont(9, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
	text->SetFont(linefont);
	textsizer->Add(text, 1, wxALL|wxGROW, 3);

	// PREVIEW
	clpanel_ = new CLPanel(this, ID_PREVIEW, wxDefaultPosition, wxSize(400, 300));
	textsizer->Add(clpanel_, 1, wxALL|wxGROW, 3);

    // divider line
    wxStaticLine *line = new wxStaticLine(this, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL);
    topsizer->Add(line, 0, wxGROW|wxALL, 3);

    // BUTTONS
    wxBoxSizer *buttonsizer = new wxBoxSizer(wxHORIZONTAL);
    topsizer->Add(buttonsizer, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 3);

    // ok button
    wxButton* ok = new wxButton ( this, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
    buttonsizer->Add(ok, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3);

    // cancel button
    wxButton* cancel = new wxButton ( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
    buttonsizer->Add(cancel, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3);

    SetSizer(topsizer);
    topsizer->SetSizeHints(this);

    CentreOnScreen();
}
void HTMLButcherListEditDialog::CreateControls()
{
    // SIZER: TOP
    topsizer_ = new wxBoxSizer(wxVERTICAL);

    // SIZER: BODY
    bodysizer_ = new wxBoxSizer(wxHORIZONTAL);

    // SIZER: BOX
    wxBoxSizer *boxsizer = new wxBoxSizer(wxVERTICAL);

    // Items
    wxStaticText *itemslabel = new wxStaticText(this, wxID_STATIC, GetTitle()+wxT(":"), wxDefaultPosition, wxDefaultSize, 0);
    boxsizer->Add(itemslabel, 0, wxALIGN_LEFT|wxALL, 3);

    wxListBox *itemsctrl = new wxListBox(this, ID_ITEMS, wxDefaultPosition, wxSize(250, 200), 0, NULL, wxLB_SORT);
    boxsizer->Add(itemsctrl, 1, wxEXPAND|wxALL, 3);

    // SIZER ADD: BOX
    bodysizer_->Add(boxsizer, 1, wxEXPAND|wxALL, 3);

    // SIZER: OPBUTTON
    wxBoxSizer *opbuttonsizer = new wxBoxSizer(wxVERTICAL);

    // add button
    wxButton* add = new wxButton ( this, ID_ADD, _("&Add"), wxDefaultPosition, wxDefaultSize, 0 );
    opbuttonsizer->Add(add, 0, wxALL, 1);

    // edit button
    wxButton* edit = new wxButton ( this, ID_EDIT, _("&Edit"), wxDefaultPosition, wxDefaultSize, 0 );
    opbuttonsizer->Add(edit, 0, wxALL, 1);

    // remove button
    wxButton* remove = new wxButton ( this, ID_REMOVE, _("&Remove"), wxDefaultPosition, wxDefaultSize, 0 );
    opbuttonsizer->Add(remove, 0, wxALL, 1);

    // duplicate button
    wxButton* duplicate = new wxButton ( this, ID_DUPLICATE, _("&Duplicate"), wxDefaultPosition, wxDefaultSize, 0 );
    opbuttonsizer->Add(duplicate, 0, wxALL, 1);
    duplicate->Enable(false);

#ifdef BUTCHER_USE_HELP
    // help button
    wxButton* help = new wxButton ( this, wxID_HELP, _("&Help"), wxDefaultPosition, wxDefaultSize, 0 );
    opbuttonsizer->Add(help, 0, wxALL, 1);
#endif

    // SIZER ADD: OPBUTTON
    bodysizer_->Add(opbuttonsizer, 0, wxALIGN_CENTER|wxALL, 1);

    // SIZER ADD: BODY
    topsizer_->Add(bodysizer_, 1, wxEXPAND|wxALL, 3);

    // divider line
    wxStaticLine *line = new wxStaticLine(this, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL);
    topsizer_->Add(line, 0, wxEXPAND|wxALL, 3);

    // SIZER: BUTTON
    wxBoxSizer *buttonsizer = new wxBoxSizer(wxHORIZONTAL);

    // close button
    wxButton* close = new wxButton ( this, wxID_CANCEL, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 );
    buttonsizer->Add(close, 0, wxALL, 3);

    // SIZER ADD: BUTTON
    topsizer_->Add(buttonsizer, 0, wxALIGN_CENTRE, 3);

    SetSizer(topsizer_);
    topsizer_->SetSizeHints(this);

    CentreOnScreen();
}
Example #29
0
BaseGroupEventDialog::BaseGroupEventDialog(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);
        wxC629BInitBitmapResources();
        bBitmapLoaded = true;
    }

    wxFlexGridSizer* flexGridSizer41 = new wxFlexGridSizer(4, 1, 0, 0);
    flexGridSizer41->SetFlexibleDirection( wxBOTH );
    flexGridSizer41->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    flexGridSizer41->AddGrowableCol(0);
    flexGridSizer41->AddGrowableRow(0);
    this->SetSizer(flexGridSizer41);

    wxFlexGridSizer* flexGridSizer43 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer43->SetFlexibleDirection( wxBOTH );
    flexGridSizer43->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    flexGridSizer43->AddGrowableCol(1);

    flexGridSizer41->Add(flexGridSizer43, 1, wxALL|wxEXPAND, 5);

    m_staticText49 = new wxStaticText(this, wxID_ANY, _("Group name:"), wxDefaultPosition, wxSize(-1,-1), 0);

    flexGridSizer43->Add(m_staticText49, 0, wxALL, 5);

    groupNameEdit = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
#if wxVERSION_NUMBER >= 3000
    groupNameEdit->SetHint(wxT(""));
#endif

    flexGridSizer43->Add(groupNameEdit, 0, wxALL|wxEXPAND, 5);

    flexGridSizer43->Add(0, 0, 1, wxALL, 5);

    backColorBt = new wxButton(this, wxID_ANY, _("Choose background color"), wxDefaultPosition, wxSize(-1,-1), 0);

    flexGridSizer43->Add(backColorBt, 0, wxALL|wxEXPAND, 5);

    flexGridSizer43->Add(0, 0, 1, wxALL, 5);

    hideCheck = new wxCheckBox(this, wxID_ANY, _("Hide the events contained in the group"), wxDefaultPosition, wxSize(-1,-1), 0);
    hideCheck->SetValue(false);

    flexGridSizer43->Add(hideCheck, 0, wxALL, 5);

    m_staticLine47 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxLI_HORIZONTAL);

    flexGridSizer41->Add(m_staticLine47, 0, wxALL|wxEXPAND, 5);

    wxFlexGridSizer* flexGridSizer45 = new wxFlexGridSizer(0, 4, 0, 0);
    flexGridSizer45->SetFlexibleDirection( wxBOTH );
    flexGridSizer45->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    flexGridSizer45->AddGrowableCol(1);

    flexGridSizer41->Add(flexGridSizer45, 1, wxALL|wxEXPAND, 5);

    m_staticBitmap63 = new wxStaticBitmap(this, wxID_ANY, wxXmlResource::Get()->LoadBitmap(wxT("help16")), wxDefaultPosition, wxSize(-1,-1), 0 );

    flexGridSizer45->Add(m_staticBitmap63, 0, wxALL, 5);

    m_hyperLink65 = new wxHyperlinkCtrl(this, wxID_ANY, _("Help"), wxT("http://wiki.compilgames.net/doku.php/en/game_develop/documentation/manual/group_events"), wxDefaultPosition, wxSize(-1,-1), wxHL_DEFAULT_STYLE);
    m_hyperLink65->SetNormalColour(wxColour(wxT("#0000FF")));
    m_hyperLink65->SetHoverColour(wxColour(wxT("#0000FF")));
    m_hyperLink65->SetVisitedColour(wxColour(wxT("#FF0000")));

    flexGridSizer45->Add(m_hyperLink65, 0, wxRIGHT, 5);

    okBt = new wxButton(this, wxID_ANY, _("Ok"), wxDefaultPosition, wxSize(-1,-1), 0);

    flexGridSizer45->Add(okBt, 0, wxALL|wxALIGN_RIGHT, 5);

    cancelBt = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxSize(-1,-1), 0);

    flexGridSizer45->Add(cancelBt, 0, wxALL, 5);

    SetName(wxT("BaseGroupEventDialog"));
    SetSize(400,200);
    if (GetSizer()) {
        GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    backColorBt->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(BaseGroupEventDialog::onChooseBackgroundBtClick), NULL, this);
    okBt->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(BaseGroupEventDialog::onOkBtClick), NULL, this);
    cancelBt->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(BaseGroupEventDialog::onCancelBtClick), NULL, this);

}
Example #30
0
LLDBSettingDialogBase::LLDBSettingDialogBase(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);
        wxCrafternz79PnInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* boxSizer77 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer77);
    
    m_notebook87 = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxBK_DEFAULT);
    m_notebook87->SetName(wxT("m_notebook87"));
    
    boxSizer77->Add(m_notebook87, 1, wxALL|wxEXPAND, 5);
    
    m_panel89 = new wxPanel(m_notebook87, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_notebook87->AddPage(m_panel89, _("General"), true);
    
    wxBoxSizer* boxSizer93 = new wxBoxSizer(wxVERTICAL);
    m_panel89->SetSizer(boxSizer93);
    
    wxArrayString m_pgMgrDisplayPropertiesArr;
    wxUnusedVar(m_pgMgrDisplayPropertiesArr);
    wxArrayInt m_pgMgrDisplayPropertiesIntArr;
    wxUnusedVar(m_pgMgrDisplayPropertiesIntArr);
    m_pgMgrDisplayProperties = new wxPropertyGridManager(m_panel89, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxPG_DESCRIPTION|wxPG_SPLITTER_AUTO_CENTER|wxPG_BOLD_MODIFIED);
    
    boxSizer93->Add(m_pgMgrDisplayProperties, 1, wxALL|wxEXPAND, 5);
    
    m_pgPropCatGeneral = m_pgMgrDisplayProperties->Append(  new wxPropertyCategory( _("Behaviour") ) );
    m_pgPropCatGeneral->SetHelpString(wxT(""));
    
    m_pgPropRaiseCodeLite = m_pgMgrDisplayProperties->AppendIn( m_pgPropCatGeneral,  new wxBoolProperty( _("Raise CodeLite when breakpoint hit"), wxPG_LABEL, 1) );
    m_pgPropRaiseCodeLite->SetHelpString(_("When a breakpoint is hit, notify the user raising CodeLite"));
    
    m_pgProp138 = m_pgMgrDisplayProperties->Append(  new wxPropertyCategory( _("Display") ) );
    m_pgProp138->SetHelpString(wxT(""));
    
    m_pgPropArraySize = m_pgMgrDisplayProperties->AppendIn( m_pgProp138,  new wxIntProperty( _("Max number of array elements"), wxPG_LABEL, 50) );
    m_pgPropArraySize->SetHelpString(_("The maximum number of elements to display in arrays"));
    
    m_pgPropCallStackSize = m_pgMgrDisplayProperties->AppendIn( m_pgProp138,  new wxIntProperty( _("Backtrace frames"), wxPG_LABEL, 100) );
    m_pgPropCallStackSize->SetHelpString(_("Maximum number of frames to show in the callstack window"));
    
    m_panel91 = new wxPanel(m_notebook87, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_notebook87->AddPage(m_panel91, _("Types"), false);
    
    wxBoxSizer* boxSizer107 = new wxBoxSizer(wxVERTICAL);
    m_panel91->SetSizer(boxSizer107);
    
    m_stcTypes = new wxStyledTextCtrl(m_panel91, 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_stcTypesFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_stcTypesFont.SetFamily(wxFONTFAMILY_TELETYPE);
    #else
    wxFont m_stcTypesFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT);
    m_stcTypesFont.SetFamily(wxFONTFAMILY_TELETYPE);
    #endif
    m_stcTypes->SetFont(m_stcTypesFont);
    m_stcTypes->SetToolTip(_("LLDB has a data formatters subsystem that allows users to define custom display options for their variables\nYou can set here the types to pass to LLDB"));
    // Configure the fold margin
    m_stcTypes->SetMarginType     (4, wxSTC_MARGIN_SYMBOL);
    m_stcTypes->SetMarginMask     (4, wxSTC_MASK_FOLDERS);
    m_stcTypes->SetMarginSensitive(4, true);
    m_stcTypes->SetMarginWidth    (4, 0);
    
    // Configure the tracker margin
    m_stcTypes->SetMarginWidth(1, 0);
    
    // Configure the symbol margin
    m_stcTypes->SetMarginType (2, wxSTC_MARGIN_SYMBOL);
    m_stcTypes->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS));
    m_stcTypes->SetMarginWidth(2, 0);
    m_stcTypes->SetMarginSensitive(2, true);
    
    // Configure the line numbers margin
    m_stcTypes->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_stcTypes->SetMarginWidth(0,0);
    
    // Configure the line symbol margin
    m_stcTypes->SetMarginType(3, wxSTC_MARGIN_FORE);
    m_stcTypes->SetMarginMask(3, 0);
    m_stcTypes->SetMarginWidth(3,0);
    // Select the lexer
    m_stcTypes->SetLexer(wxSTC_LEX_NULL);
    // Set default font / styles
    m_stcTypes->StyleClearAll();
    for(int i=0; i<wxSTC_STYLE_MAX; ++i) {
        m_stcTypes->StyleSetFont(i, m_stcTypesFont);
    }
    m_stcTypes->SetWrapMode(0);
    m_stcTypes->SetIndentationGuides(0);
    m_stcTypes->SetKeyWords(0, wxT(""));
    m_stcTypes->SetKeyWords(1, wxT(""));
    m_stcTypes->SetKeyWords(2, wxT(""));
    m_stcTypes->SetKeyWords(3, wxT(""));
    m_stcTypes->SetKeyWords(4, wxT(""));
    
    boxSizer107->Add(m_stcTypes, 1, wxALL|wxEXPAND, 5);
    
    m_hyperLink111 = new wxHyperlinkCtrl(m_panel91, wxID_ANY, _("Learn more about LLDB types"), wxT("http://lldb.llvm.org/varformats.html"), wxDefaultPosition, wxSize(-1,-1), wxHL_DEFAULT_STYLE);
    m_hyperLink111->SetNormalColour(wxColour(wxT("#0000FF")));
    m_hyperLink111->SetHoverColour(wxColour(wxT("#0000FF")));
    m_hyperLink111->SetVisitedColour(wxColour(wxT("#FF0000")));
    
    boxSizer107->Add(m_hyperLink111, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_panel142 = new wxPanel(m_notebook87, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_notebook87->AddPage(m_panel142, _("Advanced"), false);
    
    wxBoxSizer* boxSizer160 = new wxBoxSizer(wxVERTICAL);
    m_panel142->SetSizer(boxSizer160);
    
    wxArrayString m_pgMgrAdvancedArr;
    wxUnusedVar(m_pgMgrAdvancedArr);
    wxArrayInt m_pgMgrAdvancedIntArr;
    wxUnusedVar(m_pgMgrAdvancedIntArr);
    m_pgMgrAdvanced = new wxPropertyGridManager(m_panel142, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxPG_DESCRIPTION|wxPG_SPLITTER_AUTO_CENTER|wxPG_BOLD_MODIFIED);
    
    boxSizer160->Add(m_pgMgrAdvanced, 1, wxALL|wxEXPAND, 5);
    
    m_pgProp165 = m_pgMgrAdvanced->Append(  new wxPropertyCategory( _("Debugger Proxy") ) );
    m_pgProp165->SetHelpString(wxT(""));
    
    m_pgMgrAdvancedArr.Clear();
    m_pgMgrAdvancedIntArr.Clear();
    m_pgMgrAdvancedArr.Add(_("Local proxy process (default)"));
    m_pgMgrAdvancedArr.Add(_("Remote proxy process over TCP/IP"));
    m_pgPropProxyType = m_pgMgrAdvanced->AppendIn( m_pgProp165,  new wxEnumProperty( _("Proxy type"), wxPG_LABEL, m_pgMgrAdvancedArr, m_pgMgrAdvancedIntArr, 0) );
    m_pgPropProxyType->SetHelpString(_("Debugging using LLDB is always done over a proxy process (i.e. codelite-lldb)\nHere you can select the type of the proxy to use (local or remote):\n* Local proxy is used by default to debug local processes (this is the default)\n* Remote proxy: use this method to connect to a remote codelite-lldb proxy server over TCP/IP"));
    
    m_pgProp169 = m_pgMgrAdvanced->Append(  new wxPropertyCategory( _("Remote proxy settings") ) );
    m_pgProp169->SetHelpString(wxT(""));
    
    m_pgPropProxyIP = m_pgMgrAdvanced->AppendIn( m_pgProp169,  new wxStringProperty( _("Address"), wxPG_LABEL, _("127.0.0.1")) );
    m_pgPropProxyIP->SetHelpString(_("The IP address on which the remote proxy server is accepting connections"));
    
    m_pgPropProxyPort = m_pgMgrAdvanced->AppendIn( m_pgProp169,  new wxIntProperty( _("Port"), wxPG_LABEL, 13610) );
    m_pgPropProxyPort->SetHelpString(_("The port number on which the remote proxy server is accepting connections"));
    
    m_stdBtnSizer79 = new wxStdDialogButtonSizer();
    
    boxSizer77->Add(m_stdBtnSizer79, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_button81 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_stdBtnSizer79->AddButton(m_button81);
    
    m_button83 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_button83->SetDefault();
    m_stdBtnSizer79->AddButton(m_button83);
    
    m_button175 = new wxButton(this, wxID_APPLY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_stdBtnSizer79->AddButton(m_button175);
    m_stdBtnSizer79->Realize();
    
    
    #if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(m_notebook87)){
        wxPersistenceManager::Get().RegisterAndRestore(m_notebook87);
    } else {
        wxPersistenceManager::Get().Restore(m_notebook87);
    }
    #endif
    
    SetName(wxT("LLDBSettingDialogBase"));
    SetSize(500,400);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_pgMgrDisplayProperties->Connect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(LLDBSettingDialogBase::OnGeneralValueChanged), NULL, this);
    m_pgMgrAdvanced->Connect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(LLDBSettingDialogBase::OnAdvancedValueChanged), NULL, this);
    m_button83->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(LLDBSettingDialogBase::OnOKUI), NULL, this);
    m_button175->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LLDBSettingDialogBase::OnApply), NULL, this);
    m_button175->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(LLDBSettingDialogBase::OnOKUI), NULL, this);
    
}