Ejemplo n.º 1
0
EngagementTrigramsView::EngagementTrigramsView (ComparisonTableView * parent, DocumentList & documentlist)
  : wxFrame((wxFrame *)parent, wxID_ANY, "Ferret: Engagement View",
    wxGetApp().GetNextFramePosition (650, 350), 
    wxSize (650, 350)),
  _documentlist (documentlist)
{
  // 1. comparison table -- set up so engagementObserver can be used in display
  wxPanel * tableView = new wxPanel (this, wxID_ANY);
  wxBoxSizer * tableSizer = new wxBoxSizer (wxVERTICAL);
  tableView->SetSizer (tableSizer);

  _engagementObserver = new EngagementTrigramsListCtrl (this, tableView);
  tableSizer->Add (_engagementObserver, 1, wxGROW);

  // create the main part of the display
  CreateStatusBar (3);
  int widths [] = {-2, -1, -1};
  SetStatusWidths (3, widths);
  SetStatusText ("Engagement view", 0);
  if (_documentlist.IsGrouped ())
  {
    SetStatusText (wxString::Format ("Groups: %d", _engagementObserver->GetItemCount ()), 1);
  }
  else
  {
    SetStatusText (wxString::Format ("Documents: %d", _engagementObserver->GetItemCount ()), 1);
  }

  // set up internal widgets
  wxBoxSizer * topsizer = new wxBoxSizer (wxHORIZONTAL);

  // return to the table view
  // -- insert two columns
  wxListItem itemCol;
  itemCol.SetText (_documentlist.IsGrouped() ? "Group" : "Document");
  _engagementObserver->InsertColumn (0, itemCol);
  _engagementObserver->SetColumnWidth (0, wxLIST_AUTOSIZE_USEHEADER);
  itemCol.SetText ("Count");
  _engagementObserver->InsertColumn (1, itemCol);
  _engagementObserver->SetColumnWidth (1, wxLIST_AUTOSIZE_USEHEADER);
  _engagementObserver->SetItemCount (_engagementObserver->GetItemCount ());

  // 2. buttons
  wxBoxSizer * buttonSizer = new wxBoxSizer (wxVERTICAL);
	wxButton * rank_f = EMakeButton (this, ID_ENGAGEMENT_RANK_F, (_documentlist.IsGrouped() ? "Group" : "Document"),
				"Put table into alphabetical order of name");
	wxButton * rank_u = EMakeButton (this, ID_ENGAGEMENT_RANK_U, "Count",
				"Put table into order with largest engagement count at top");
	wxStaticBoxSizer * rankSizer = new wxStaticBoxSizer (wxVERTICAL, this, "Rearrange table by");
	rankSizer->Add (rank_f, 0, wxGROW | wxALL, 5);
	rankSizer->Add (rank_u, 0, wxGROW | wxALL, 5);
	buttonSizer->Add (rankSizer, 0, wxGROW);

	buttonSizer->AddStretchSpacer (); // separate window controls from Ferret controls
	buttonSizer->Add (new wxButton (this, wxID_HELP), 0, wxGROW | wxALL, 5);
	buttonSizer->Add (new wxButton (this, wxID_CLOSE), 0, wxGROW | wxALL, 5);

  topsizer->Add (buttonSizer, 0, wxGROW | wxALL, 5);
  topsizer->Insert (0, tableView, 1, wxGROW);

	// compute best minimum height, and constrain window
	int best_height = buttonSizer->GetMinSize().GetHeight () + 40; // allow for space between widgets
	SetSizeHints (best_height, best_height); // keep the minimum size a square shape

  SetSizer (topsizer);
  _engagementObserver->SetFocus ();
  _engagementObserver->SortOnCount ();
  SetStatusText (wxString::Format ("Mean: %f", _engagementObserver->MeanCount ()), 2);
}
EditorSettingsFoldingBase::EditorSettingsFoldingBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
    : wxPanel(parent, id, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCE476InitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* mainSizer = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(mainSizer);
    
    m_displayMargin = new wxCheckBox(this, wxID_ANY, _("Display Folding Margin"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_displayMargin->SetValue(true);
    
    mainSizer->Add(m_displayMargin, 0, wxALL|wxEXPAND, 5);
    
    wxStaticBoxSizer* sbSizer1 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, wxT("")), wxVERTICAL);
    
    mainSizer->Add(sbSizer1, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, 5);
    
    wxArrayString m_foldStyleArr;
    m_foldStyle = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_foldStyleArr, 0);
    m_foldStyle->SetToolTip(_("Select the folding style"));
    
    sbSizer1->Add(m_foldStyle, 0, wxALL|wxEXPAND, 5);
    
    wxFlexGridSizer* fgSizer1 = new wxFlexGridSizer(0, 2, 0, 0);
    fgSizer1->SetFlexibleDirection( wxBOTH );
    fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    fgSizer1->AddGrowableCol(0);
    fgSizer1->AddGrowableCol(1);
    
    sbSizer1->Add(fgSizer1, 0, wxLEFT|wxRIGHT|wxEXPAND, 5);
    
    m_underlineFolded = new wxCheckBox(this, wxID_ANY, _("Underline Folded Line"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_underlineFolded->SetValue(true);
    
    fgSizer1->Add(m_underlineFolded, 0, wxALL|wxEXPAND, 5);
    
    m_foldElse = new wxCheckBox(this, wxID_ANY, _("Fold At Else"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_foldElse->SetValue(false);
    
    fgSizer1->Add(m_foldElse, 0, wxALL|wxEXPAND, 5);
    
    m_foldPreprocessors = new wxCheckBox(this, wxID_ANY, _("Fold Preprocessors"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_foldPreprocessors->SetValue(false);
    
    fgSizer1->Add(m_foldPreprocessors, 0, wxALL|wxEXPAND, 5);
    
    m_foldCompact = new wxCheckBox(this, wxID_ANY, _("Fold Compact"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_foldCompact->SetValue(false);
    
    fgSizer1->Add(m_foldCompact, 0, wxALL|wxEXPAND, 5);
    
    m_checkBoxHighlightFolding = new wxCheckBox(this, wxID_ANY, _("Highlight Active Fold Block"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_checkBoxHighlightFolding->SetValue(false);
    m_checkBoxHighlightFolding->SetToolTip(_("Allows to enable/disable the highlight folding block when it is selected. (i.e. block that contains the caret)"));
    
    fgSizer1->Add(m_checkBoxHighlightFolding, 0, wxALL, 5);
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
    // Connect events
    m_foldStyle->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsFoldingBase::OnFoldingMarginUI), NULL, this);
    m_underlineFolded->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsFoldingBase::OnFoldingMarginUI), NULL, this);
    m_foldElse->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsFoldingBase::OnFoldingMarginUI), NULL, this);
    m_foldPreprocessors->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsFoldingBase::OnFoldingMarginUI), NULL, this);
    m_foldCompact->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsFoldingBase::OnFoldingMarginUI), NULL, this);
    m_checkBoxHighlightFolding->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsFoldingBase::OnFoldingMarginUI), NULL, this);
    
}
Ejemplo n.º 3
0
NewProjectDlgBaseClass::NewProjectDlgBaseClass(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);
        wxC3F25InitBitmapResources();
        bBitmapLoaded = true;
    }
    
    boxSizer1 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer1);
    
    m_splitter5 = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxSize(500,-1), wxSP_LIVE_UPDATE|wxSP_NO_XP_THEME|wxSP_3DSASH);
    m_splitter5->SetSashGravity(0.5);
    m_splitter5->SetMinimumPaneSize(10);
    
    boxSizer1->Add(m_splitter5, 1, wxALL|wxEXPAND, 5);
    
    m_splitterPageRight = new wxPanel(m_splitter5, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    
    boxSizer10 = new wxBoxSizer(wxVERTICAL);
    m_splitterPageRight->SetSizer(boxSizer10);
    
    m_dataviewTemplates = new wxDataViewCtrl(m_splitterPageRight, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxDV_ROW_LINES|wxDV_SINGLE);
    
    m_dataviewTemplatesModel = new DVTemplatesModel;
    m_dataviewTemplatesModel->SetColCount( 1 );
    m_dataviewTemplates->AssociateModel(m_dataviewTemplatesModel.get() );
    
    boxSizer10->Add(m_dataviewTemplates, 1, wxALL|wxEXPAND, 5);
    
    m_dataviewTemplates->AppendIconTextColumn(_("Template"), m_dataviewTemplates->GetColumnCount(), wxDATAVIEW_CELL_INERT, 300, wxALIGN_LEFT);
    m_splitterPageLeft = new wxPanel(m_splitter5, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_splitter5->SplitVertically(m_splitterPageRight, m_splitterPageLeft, 0);
    
    boxSizer11 = new wxBoxSizer(wxVERTICAL);
    m_splitterPageLeft->SetSizer(boxSizer11);
    
    flexGridSizer15 = new wxFlexGridSizer(  0, 2, 0, 0);
    flexGridSizer15->SetFlexibleDirection( wxBOTH );
    flexGridSizer15->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    flexGridSizer15->AddGrowableCol(1);
    
    boxSizer11->Add(flexGridSizer15, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, 5);
    
    m_staticText16 = new wxStaticText(m_splitterPageLeft, wxID_ANY, _("Project name:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer15->Add(m_staticText16, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_txtProjName = new wxTextCtrl(m_splitterPageLeft, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer15->Add(m_txtProjName, 0, wxLEFT|wxTOP|wxBOTTOM|wxEXPAND, 5);
    
    m_staticText18 = new wxStaticText(m_splitterPageLeft, wxID_ANY, _("Project path:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer15->Add(m_staticText18, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    boxSizer30 = new wxBoxSizer(wxHORIZONTAL);
    
    flexGridSizer15->Add(boxSizer30, 0, wxEXPAND, 5);
    
    m_textCtrlProjectPath = new wxTextCtrl(m_splitterPageLeft, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer30->Add(m_textCtrlProjectPath, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_button268 = new wxButton(m_splitterPageLeft, wxID_ANY, _("Browse"), wxDefaultPosition, wxSize(-1,-1), wxBU_EXACTFIT);
    m_button268->SetToolTip(_("Browse for folder"));
    
    boxSizer30->Add(m_button268, 0, wxTOP|wxBOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_staticText21 = new wxStaticText(m_splitterPageLeft, wxID_ANY, _("Compiler:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer15->Add(m_staticText21, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    wxArrayString m_chCompilerArr;
    m_chCompiler = new wxChoice(m_splitterPageLeft, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), m_chCompilerArr, 0);
    
    flexGridSizer15->Add(m_chCompiler, 0, wxLEFT|wxTOP|wxBOTTOM|wxEXPAND, 5);
    
    flexGridSizer15->Add(0, 0, 0, wxALL, 5);
    
    m_cbSeparateDir = new wxCheckBox(m_splitterPageLeft, wxID_ANY, _("Create the project under a separate directory"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_cbSeparateDir->SetValue(false);
    
    flexGridSizer15->Add(m_cbSeparateDir, 0, wxALL|wxEXPAND, 5);
    
    m_stxtFullFileName = new wxStaticText(m_splitterPageLeft, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer11->Add(m_stxtFullFileName, 0, wxALL|wxEXPAND|wxALIGN_LEFT, 5);
    
    m_txtDescription = new wxTextCtrl(m_splitterPageLeft, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_RICH2|wxTE_READONLY|wxTE_MULTILINE);
    
    boxSizer11->Add(m_txtDescription, 1, wxALL|wxEXPAND, 5);
    
    boxSizer2 = new wxBoxSizer(wxHORIZONTAL);
    
    boxSizer1->Add(boxSizer2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_button3 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_button3->SetDefault();
    
    boxSizer2->Add(m_button3, 0, wxALL, 5);
    
    m_button4 = new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer2->Add(m_button4, 0, wxALL, 5);
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
    // Connect events
    m_dataviewTemplates->Connect(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler(NewProjectDlgBaseClass::OnItemSelected), NULL, this);
    m_txtProjName->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(NewProjectDlgBaseClass::OnProjectNameChanged), NULL, this);
    m_textCtrlProjectPath->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(NewProjectDlgBaseClass::OnProjectPathUpdated), NULL, this);
    m_button268->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(NewProjectDlgBaseClass::OnBrowseProjectPath), NULL, this);
    m_cbSeparateDir->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(NewProjectDlgBaseClass::OnProjectNameChanged), NULL, this);
    m_button3->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(NewProjectDlgBaseClass::OnOKUI), NULL, this);
    m_button3->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(NewProjectDlgBaseClass::OnCreate), NULL, this);
    
}
Ejemplo n.º 4
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, wxALIGN_CENTER_HORIZONTAL|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, wxT("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);
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
    // 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);
    
}
Ejemplo n.º 5
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);
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
    // 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);
    
}
Ejemplo n.º 6
0
SvnSelectLocalRepoBase::SvnSelectLocalRepoBase(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);
        wxC95F2InitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* bSizer33 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer33);
    
    wxFlexGridSizer* fgSizer13 = new wxFlexGridSizer(  0, 2, 0, 0);
    fgSizer13->SetFlexibleDirection( wxBOTH );
    fgSizer13->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    fgSizer13->AddGrowableCol(1);
    
    bSizer33->Add(fgSizer13, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_staticText37 = new wxStaticText(this, wxID_ANY, _("Select path:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer13->Add(m_staticText37, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_dirPicker1 = new wxDirPickerCtrl(this, wxID_ANY, wxEmptyString, wxT("Select a folder"), wxDefaultPosition, wxSize(-1, -1), wxDIRP_DEFAULT_STYLE);
    
    fgSizer13->Add(m_dirPicker1, 0, wxALL|wxEXPAND, 5);
    
    m_staticText36 = new wxStaticText(this, wxID_ANY, _("Recently used paths:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer33->Add(m_staticText36, 0, wxALL, 5);
    
    wxArrayString m_listBoxPathsArr;
    m_listBoxPaths = new wxListBox(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_listBoxPathsArr, wxLB_EXTENDED);
    
    bSizer33->Add(m_listBoxPaths, 1, wxALL|wxEXPAND, 5);
    
    m_staticline9 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxLI_HORIZONTAL);
    
    bSizer33->Add(m_staticline9, 0, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* bSizer34 = new wxBoxSizer(wxHORIZONTAL);
    
    bSizer33->Add(bSizer34, 0, wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_button25 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_button25->SetDefault();
    
    bSizer34->Add(m_button25, 0, wxALL, 5);
    
    m_button26 = new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer34->Add(m_button26, 0, wxALL, 5);
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
    // Connect events
    m_listBoxPaths->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(SvnSelectLocalRepoBase::OnPathSelected), NULL, this);
    m_listBoxPaths->Connect(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler(SvnSelectLocalRepoBase::OnPathActivated), NULL, this);
    m_listBoxPaths->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(SvnSelectLocalRepoBase::OnMenu), NULL, this);
    
}
Ejemplo n.º 7
0
SFTPTreeViewBase::SFTPTreeViewBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
    : wxPanel(parent, id, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxC32BEInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* boxSizer16 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer16);
    
    m_auibar = new wxAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxAUI_TB_PLAIN_BACKGROUND|wxAUI_TB_DEFAULT_STYLE);
    m_auibar->SetToolBitmapSize(wxSize(16,16));
    
    boxSizer16->Add(m_auibar, 0, wxEXPAND, 5);
    
    m_auibar->AddTool(ID_OPEN_ACCOUNT_MANAGER, _("Open account manager..."), wxXmlResource::Get()->LoadBitmap(wxT("ssh-16")), wxNullBitmap, wxITEM_NORMAL, _("Open account manager..."), _("Open account manager..."), NULL);
    
    m_auibar->AddTool(ID_SFTP_CONNECT, _("Connect"), wxXmlResource::Get()->LoadBitmap(wxT("connect")), wxNullBitmap, wxITEM_NORMAL, _("Establish connection to the selected account"), _("Establish connection to the selected account"), NULL);
    
    m_auibar->AddTool(ID_SFTP_DISCONNECT, _("Disconnect"), wxXmlResource::Get()->LoadBitmap(wxT("disconnect")), wxNullBitmap, wxITEM_NORMAL, _("Close the current connection"), _("Close the current connection"), NULL);
    
    m_auibar->AddTool(ID_ADD_BOOKMARK, _("Add Bookmark"), wxXmlResource::Get()->LoadBitmap(wxT("bookmark")), wxNullBitmap, wxITEM_NORMAL, _("Add Bookmark"), _("Add Bookmark"), NULL);
    wxAuiToolBarItem* m_toolbarItemAddBookmark = m_auibar->FindToolByIndex(m_auibar->GetToolCount()-1);
    if (m_toolbarItemAddBookmark) {
        m_toolbarItemAddBookmark->SetHasDropDown(true);
    }
    m_auibar->Realize();
    
    wxArrayString m_choiceAccountArr;
    m_choiceAccount = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), m_choiceAccountArr, 0);
    
    boxSizer16->Add(m_choiceAccount, 0, wxALL|wxEXPAND, 2);
    
    wxFlexGridSizer* flexGridSizer43 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer43->SetFlexibleDirection( wxBOTH );
    flexGridSizer43->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    flexGridSizer43->AddGrowableCol(1);
    
    boxSizer16->Add(flexGridSizer43, 0, wxEXPAND, 5);
    
    m_staticText49 = new wxStaticText(this, wxID_ANY, _("Go to:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizer43->Add(m_staticText49, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlQuickJump = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_PROCESS_ENTER);
    m_textCtrlQuickJump->SetToolTip(_("Type a path and hit ENTER"));
    
    flexGridSizer43->Add(m_textCtrlQuickJump, 0, wxALL|wxEXPAND, 5);
    
    m_treeListCtrl = new wxTreeListCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(200,200), wxTL_DEFAULT_STYLE|wxTL_MULTIPLE);
    
    boxSizer16->Add(m_treeListCtrl, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, 2);
    
    m_treeListCtrl->AppendColumn(_("Name"), 400, wxALIGN_LEFT, wxCOL_RESIZABLE|wxCOL_SORTABLE);
    m_treeListCtrl->AppendColumn(_("Type"), 100, wxALIGN_LEFT, wxCOL_RESIZABLE);
    m_treeListCtrl->AppendColumn(_("Size"), 100, wxALIGN_LEFT, wxCOL_RESIZABLE);
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
    // Connect events
    this->Connect(ID_OPEN_ACCOUNT_MANAGER, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SFTPTreeViewBase::OnOpenAccountManager), NULL, this);
    this->Connect(ID_SFTP_CONNECT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SFTPTreeViewBase::OnConnect), NULL, this);
    this->Connect(ID_SFTP_CONNECT, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPTreeViewBase::OnConnectUI), NULL, this);
    this->Connect(ID_SFTP_DISCONNECT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SFTPTreeViewBase::OnDisconnect), NULL, this);
    this->Connect(ID_SFTP_DISCONNECT, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPTreeViewBase::OnDisconnectUI), NULL, this);
    this->Connect(ID_ADD_BOOKMARK, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(SFTPTreeViewBase::OnAddBookmark), NULL, this);
    this->Connect(ID_ADD_BOOKMARK, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPTreeViewBase::OnAddBookmarkUI), NULL, this);
    m_choiceAccount->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(SFTPTreeViewBase::OnChoiceAccount), NULL, this);
    m_choiceAccount->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPTreeViewBase::OnChoiceAccountUI), NULL, this);
    m_staticText49->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPTreeViewBase::OnGotoLocationUI), NULL, this);
    m_textCtrlQuickJump->Connect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(SFTPTreeViewBase::OnGotoLocation), NULL, this);
    m_textCtrlQuickJump->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPTreeViewBase::OnGotoLocationUI), NULL, this);
    m_treeListCtrl->Connect(wxEVT_TREELIST_ITEM_EXPANDING, wxTreeListEventHandler(SFTPTreeViewBase::OnItemExpanding), NULL, this);
    m_treeListCtrl->Connect(wxEVT_TREELIST_ITEM_ACTIVATED, wxTreeListEventHandler(SFTPTreeViewBase::OnItemActivated), NULL, this);
    m_treeListCtrl->Connect(wxEVT_TREELIST_ITEM_CONTEXT_MENU, wxTreeListEventHandler(SFTPTreeViewBase::OnContextMenu), NULL, this);
    m_treeListCtrl->Connect(wxEVT_TREELIST_SELECTION_CHANGED, wxTreeListEventHandler(SFTPTreeViewBase::OnSelectionChanged), NULL, this);
    
    this->Connect(wxID_ANY, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(SFTPTreeViewBase::ShowAuiToolMenu), NULL, this);
}
Ejemplo n.º 8
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, wxSize(-1,-1), wxBK_DEFAULT);
    
    boxSizer2->Add(m_notebook10, 1, wxALL|wxEXPAND, 5);
    
    m_panel12 = new wxPanel(m_notebook10, wxID_ANY, wxDefaultPosition, 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, wxSize(-1,-1), wxPG_DESCRIPTION|wxPG_SPLITTER_AUTO_CENTER|wxPG_BOLD_MODIFIED);
    
    boxSizer22->Add(m_pgMgr, 1, wxALL|wxEXPAND, 5);
    
    m_pgProp26 = m_pgMgr->Append(  new wxPropertyCategory( _("General") ) );
    m_pgProp26->SetHelpString(wxT(""));
    
    m_pgPropEnableJSCC = m_pgMgr->AppendIn( m_pgProp26,  new wxBoolProperty( _("Enable Code Completion"), wxPG_LABEL, 1) );
    m_pgPropEnableJSCC->SetHelpString(_("Enable JavaScript code completion"));
    
    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_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_stdBtnSizer4 = new wxStdDialogButtonSizer();
    
    boxSizer2->Add(m_stdBtnSizer4, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_buttonCancel = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_stdBtnSizer4->AddButton(m_buttonCancel);
    
    m_buttonOK = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_buttonOK->SetDefault();
    m_stdBtnSizer4->AddButton(m_buttonOK);
    m_stdBtnSizer4->Realize();
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
    // Connect events
    m_pgMgr->Connect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(WebToolsSettingsBase::OnJSValueChanged), 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);
    
}
EditorOptionsGeneralGuidesPanelBase::EditorOptionsGeneralGuidesPanelBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
    : wxPanel(parent, id, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxC77E7InitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* bSizer1 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer1);
    
    wxStaticBoxSizer* sbSizer3 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("General:")), wxVERTICAL);
    
    bSizer1->Add(sbSizer3, 0, wxALL|wxEXPAND, 5);
    
    wxFlexGridSizer* fgSizer1 = new wxFlexGridSizer(0, 2, 0, 0);
    fgSizer1->SetFlexibleDirection( wxBOTH );
    fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    fgSizer1->AddGrowableCol(0);
    fgSizer1->AddGrowableCol(1);
    
    sbSizer3->Add(fgSizer1, 0, wxALL|wxEXPAND, 5);
    
    m_displayLineNumbers = new wxCheckBox(this, wxID_ANY, _("Display line numbers"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_displayLineNumbers->SetValue(false);
    m_displayLineNumbers->SetToolTip(_("Show line numbers margin"));
    
    fgSizer1->Add(m_displayLineNumbers, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_showIndentationGuideLines = new wxCheckBox(this, wxID_ANY, _("Show indentation guidelines"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_showIndentationGuideLines->SetValue(false);
    m_showIndentationGuideLines->SetToolTip(_("Turn on indentation highlights guides (small vertical lines)"));
    
    fgSizer1->Add(m_showIndentationGuideLines, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_checkBoxMatchBraces = new wxCheckBox(this, wxID_ANY, _("Highlight matched braces"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxMatchBraces->SetValue(false);
    m_checkBoxMatchBraces->SetToolTip(_("Highlight matched braces"));
    
    fgSizer1->Add(m_checkBoxMatchBraces, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_checkBoxDisableSemicolonShift = new wxCheckBox(this, wxID_ANY, _("Disable semicolon shift"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxDisableSemicolonShift->SetValue(false);
    m_checkBoxDisableSemicolonShift->SetToolTip(_("Auto swap between semicolon and closing brace"));
    
    fgSizer1->Add(m_checkBoxDisableSemicolonShift, 0, wxALL|wxEXPAND, 5);
    
    m_checkBoxHideChangeMarkerMargin = new wxCheckBox(this, wxID_ANY, _("Hide change marker margin"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxHideChangeMarkerMargin->SetValue(false);
    m_checkBoxHideChangeMarkerMargin->SetToolTip(_("Hide / Display the change marker margin (red/green marks when line is modified)"));
    
    fgSizer1->Add(m_checkBoxHideChangeMarkerMargin, 0, wxALL, 5);
    
    wxStaticBoxSizer* sbSizer1 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("Whitespaces:")), wxVERTICAL);
    
    bSizer1->Add(sbSizer1, 0, wxALL|wxEXPAND, 5);
    
    wxFlexGridSizer* fgSizer3 = new wxFlexGridSizer(0, 2, 0, 0);
    fgSizer3->SetFlexibleDirection( wxBOTH );
    fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    fgSizer3->AddGrowableCol(1);
    
    sbSizer1->Add(fgSizer3, 1, wxEXPAND, 5);
    
    m_staticText2 = new wxStaticText(this, wxID_ANY, _("Whitespace visibility:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer3->Add(m_staticText2, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    wxArrayString m_whitespaceStyleArr;
    m_whitespaceStyle = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_whitespaceStyleArr, 0);
    
    fgSizer3->Add(m_whitespaceStyle, 0, wxLEFT|wxRIGHT|wxTOP|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_staticText4 = new wxStaticText(this, wxID_ANY, _("EOL Mode:"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_staticText4->SetToolTip(_("Set the editor's EOL mode (End Of Line)"));
    
    fgSizer3->Add(m_staticText4, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    wxArrayString m_choiceEOLArr;
    m_choiceEOL = new wxChoice(this, 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"));
    
    fgSizer3->Add(m_choiceEOL, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    wxStaticBoxSizer* sbSizer2 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("Caret line:")), wxVERTICAL);
    
    bSizer1->Add(sbSizer2, 0, wxALL|wxEXPAND, 5);
    
    wxFlexGridSizer* fgSizer2 = new wxFlexGridSizer(3, 2, 0, 0);
    fgSizer2->SetFlexibleDirection( wxBOTH );
    fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    fgSizer2->AddGrowableCol(1);
    
    sbSizer2->Add(fgSizer2, 0, wxALL|wxEXPAND, 5);
    
    m_highlightCaretLine = new wxCheckBox(this, wxID_ANY, _("Highlight caret line"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_highlightCaretLine->SetValue(false);
    m_highlightCaretLine->SetToolTip(_("Highlight the caret line"));
    
    fgSizer2->Add(m_highlightCaretLine, 0, wxRIGHT|wxTOP|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    fgSizer2->Add(0, 0, 1, wxEXPAND, 5);
    
    m_staticText1 = new wxStaticText(this, wxID_ANY, _("Caret line background colour:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer2->Add(m_staticText1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_caretLineColourPicker = new wxColourPickerCtrl(this, wxID_ANY, *wxBLACK, wxDefaultPosition, wxSize(-1, -1), wxCLRP_SHOW_LABEL|wxCLRP_DEFAULT_STYLE);
    
    fgSizer2->Add(m_caretLineColourPicker, 0, wxALL|wxEXPAND|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    wxStaticBoxSizer* sbSizer4 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("Debugger Marker:")), wxVERTICAL);
    
    bSizer1->Add(sbSizer4, 0, wxALL|wxEXPAND, 5);
    
    wxFlexGridSizer* fgSizer4 = new wxFlexGridSizer(0, 2, 0, 0);
    fgSizer4->SetFlexibleDirection( wxBOTH );
    fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    fgSizer4->AddGrowableCol(1);
    
    sbSizer4->Add(fgSizer4, 0, wxEXPAND, 5);
    
    m_checkBoxMarkdebuggerLine = new wxCheckBox(this, wxID_ANY, _("Highlight debugger line"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxMarkdebuggerLine->SetValue(false);
    
    fgSizer4->Add(m_checkBoxMarkdebuggerLine, 0, wxALL, 5);
    
    fgSizer4->Add(0, 0, 1, wxEXPAND, 5);
    
    m_staticText41 = new wxStaticText(this, wxID_ANY, _("Debugger line colour:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer4->Add(m_staticText41, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_colourPickerDbgLine = new wxColourPickerCtrl(this, wxID_ANY, *wxBLACK, wxDefaultPosition, wxSize(-1, -1), wxCLRP_SHOW_LABEL|wxCLRP_DEFAULT_STYLE);
    
    fgSizer4->Add(m_colourPickerDbgLine, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
    // Connect events
    m_highlightCaretLine->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(EditorOptionsGeneralGuidesPanelBase::OnHighlightCaretLine), NULL, this);
    m_staticText1->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorOptionsGeneralGuidesPanelBase::OnhighlightCaretLineUI), NULL, this);
    m_caretLineColourPicker->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorOptionsGeneralGuidesPanelBase::OnhighlightCaretLineUI), NULL, this);
    m_staticText41->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorOptionsGeneralGuidesPanelBase::OnDebuggerLineUI), NULL, this);
    m_colourPickerDbgLine->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorOptionsGeneralGuidesPanelBase::OnDebuggerLineUI), NULL, this);
    
}
Ejemplo n.º 10
0
_MainFrame::_MainFrame(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
    : wxFrame(parent, id, title, pos, size, style)
{

    
    wxBoxSizer* topSizer = new wxBoxSizer(wxVERTICAL);
    topSizer->SetMinSize(640,-1);
    this->SetSizer(topSizer);
    
    wxStaticBoxSizer* filePathSizer = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("选取文件")), wxHORIZONTAL);
    
    topSizer->Add(filePathSizer, 0, wxALL|wxEXPAND, 5);
    
    m_filePath = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_READONLY);
    #if wxVERSION_NUMBER >= 3000
    m_filePath->SetHint(wxT(""));
    #endif
    
    filePathSizer->Add(m_filePath, 1, wxALL, 5);
    
    m_Open = new wxButton(this, wxID_ANY, _("Open ..."), wxDefaultPosition, wxSize(-1,-1), 0);
    
    filePathSizer->Add(m_Open, 0, wxALL, 5);
    
    m_notebookInfo = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxBK_DEFAULT);
    m_notebookInfo->SetName(wxT("m_notebookInfo"));
    
    topSizer->Add(m_notebookInfo, 1, wxLEFT|wxRIGHT|wxEXPAND, 5);
    
    m_panelBrief = new wxPanel(m_notebookInfo, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_notebookInfo->AddPage(m_panelBrief, _("Brief"), false);
    
    wxFlexGridSizer* flexGridSizerBrief = new wxFlexGridSizer(11, 2, 0, 0);
    flexGridSizerBrief->SetFlexibleDirection( wxBOTH );
    flexGridSizerBrief->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    flexGridSizerBrief->AddGrowableCol(1);
    m_panelBrief->SetSizer(flexGridSizerBrief);
    
    m_staticTextCFBundleIdentifier = new wxStaticText(m_panelBrief, wxID_ANY, _("CFBundleIdentifier"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizerBrief->Add(m_staticTextCFBundleIdentifier, 0, wxALL, 5);
    
    m_CFBundleIdentifier = new wxTextCtrl(m_panelBrief, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_READONLY);
    #if wxVERSION_NUMBER >= 3000
    m_CFBundleIdentifier->SetHint(wxT(""));
    #endif
    
    flexGridSizerBrief->Add(m_CFBundleIdentifier, 0, wxALL|wxEXPAND, 5);
    
    m_staticTextCFBundleDisplayName = new wxStaticText(m_panelBrief, wxID_ANY, _("CFBundleDisplayName"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizerBrief->Add(m_staticTextCFBundleDisplayName, 0, wxALL, 5);
    
    m_CFBundleDisplayName = new wxTextCtrl(m_panelBrief, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_READONLY);
    #if wxVERSION_NUMBER >= 3000
    m_CFBundleDisplayName->SetHint(wxT(""));
    #endif
    
    flexGridSizerBrief->Add(m_CFBundleDisplayName, 0, wxALL|wxEXPAND, 5);
    
    m_staticTextCFBundleName = new wxStaticText(m_panelBrief, wxID_ANY, _("CFBundleName"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizerBrief->Add(m_staticTextCFBundleName, 0, wxALL, 5);
    
    m_CFBundleName = new wxTextCtrl(m_panelBrief, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_READONLY);
    #if wxVERSION_NUMBER >= 3000
    m_CFBundleName->SetHint(wxT(""));
    #endif
    
    flexGridSizerBrief->Add(m_CFBundleName, 0, wxALL|wxEXPAND, 5);
    
    m_staticTextCFBundleExecutable = new wxStaticText(m_panelBrief, wxID_ANY, _("CFBundleExecutable"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizerBrief->Add(m_staticTextCFBundleExecutable, 0, wxALL, 5);
    
    m_CFBundleExecutable = new wxTextCtrl(m_panelBrief, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_READONLY);
    #if wxVERSION_NUMBER >= 3000
    m_CFBundleExecutable->SetHint(wxT(""));
    #endif
    
    flexGridSizerBrief->Add(m_CFBundleExecutable, 0, wxALL|wxEXPAND, 5);
    
    m_staticTextMinimumOSVersion = new wxStaticText(m_panelBrief, wxID_ANY, _("MinimumOSVersion"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizerBrief->Add(m_staticTextMinimumOSVersion, 0, wxALL, 5);
    
    m_MinimumOSVersion = new wxTextCtrl(m_panelBrief, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_READONLY);
    #if wxVERSION_NUMBER >= 3000
    m_MinimumOSVersion->SetHint(wxT(""));
    #endif
    
    flexGridSizerBrief->Add(m_MinimumOSVersion, 0, wxALL|wxEXPAND, 5);
    
    m_staticText121 = new wxStaticText(m_panelBrief, wxID_ANY, _("CFBundleShortVersionString"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizerBrief->Add(m_staticText121, 0, wxALL, 5);
    
    m_CFBundleShortVersionString = new wxTextCtrl(m_panelBrief, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_READONLY);
    #if wxVERSION_NUMBER >= 3000
    m_CFBundleShortVersionString->SetHint(wxT(""));
    #endif
    
    flexGridSizerBrief->Add(m_CFBundleShortVersionString, 0, wxALL|wxEXPAND, 5);
    
    m_staticText125 = new wxStaticText(m_panelBrief, wxID_ANY, _("CFBundleVersion"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizerBrief->Add(m_staticText125, 0, wxALL, 5);
    
    m_CFBundleVersion = new wxTextCtrl(m_panelBrief, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_READONLY);
    #if wxVERSION_NUMBER >= 3000
    m_CFBundleVersion->SetHint(wxT(""));
    #endif
    
    flexGridSizerBrief->Add(m_CFBundleVersion, 0, wxALL|wxEXPAND, 5);
    
    m_staticTextApplicationIdentifier = new wxStaticText(m_panelBrief, wxID_ANY, _("application-identifier"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizerBrief->Add(m_staticTextApplicationIdentifier, 0, wxALL, 5);
    
    m_applicationIdentifier = new wxTextCtrl(m_panelBrief, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_READONLY);
    #if wxVERSION_NUMBER >= 3000
    m_applicationIdentifier->SetHint(wxT(""));
    #endif
    
    flexGridSizerBrief->Add(m_applicationIdentifier, 0, wxALL|wxEXPAND, 5);
    
    m_staticTextKeychainAccessGroups = new wxStaticText(m_panelBrief, wxID_ANY, _("keychain-access-groups"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizerBrief->Add(m_staticTextKeychainAccessGroups, 0, wxALL, 5);
    
    m_keychainAccessGroups = new wxTextCtrl(m_panelBrief, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_READONLY);
    #if wxVERSION_NUMBER >= 3000
    m_keychainAccessGroups->SetHint(wxT(""));
    #endif
    
    flexGridSizerBrief->Add(m_keychainAccessGroups, 0, wxALL|wxEXPAND, 5);
    
    m_staticTextSAGroups = new wxStaticText(m_panelBrief, wxID_ANY, _("com.apple.security.application-groups"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizerBrief->Add(m_staticTextSAGroups, 0, wxALL, 5);
    
    m_SAGroups = new wxTextCtrl(m_panelBrief, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_READONLY);
    #if wxVERSION_NUMBER >= 3000
    m_SAGroups->SetHint(wxT(""));
    #endif
    
    flexGridSizerBrief->Add(m_SAGroups, 0, wxALL|wxEXPAND, 5);
    
    m_staticText149 = new wxStaticText(m_panelBrief, wxID_ANY, _("IPA Type"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    flexGridSizerBrief->Add(m_staticText149, 0, wxALL, 5);
    
    m_IPAType = new wxTextCtrl(m_panelBrief, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_READONLY);
    #if wxVERSION_NUMBER >= 3000
    m_IPAType->SetHint(wxT(""));
    #endif
    
    flexGridSizerBrief->Add(m_IPAType, 0, wxALL|wxEXPAND, 5);
    
    m_panelInfoPlist = new wxPanel(m_notebookInfo, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_notebookInfo->AddPage(m_panelInfoPlist, _("Info.plist"), false);
    
    wxBoxSizer* boxSizerInfoPlist = new wxBoxSizer(wxVERTICAL);
    m_panelInfoPlist->SetSizer(boxSizerInfoPlist);
    
    m_infoPlist = new wxTextCtrl(m_panelInfoPlist, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_READONLY|wxTE_MULTILINE);
    
    boxSizerInfoPlist->Add(m_infoPlist, 1, wxALL|wxEXPAND, 0);
    
    m_statusBar = new wxStatusBar(this, wxID_ANY, wxSTB_DEFAULT_STYLE);
    m_statusBar->SetFieldsCount(1);
    this->SetStatusBar(m_statusBar);
    
    SetName(wxT("_MainFrame"));
    SetMinSize( wxSize(640,-1) );
    SetSizeHints(640,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    CentreOnParent(wxBOTH);
    // Connect events
    m_Open->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(_MainFrame::OnOpenButtonClicked), NULL, this);
    
}
Ejemplo n.º 11
0
VampEffectDialog::VampEffectDialog(VampEffect *effect,
                                   wxWindow *parent,
                                   Vamp::Plugin *plugin) :
   wxDialog(parent, -1, effect->GetEffectName(),
            wxDefaultPosition, wxDefaultSize,
            wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER),
   mEffect(effect),
   mPlugin(plugin)
{
   Vamp::Plugin::ProgramList programs = plugin->getPrograms();

   mParameters = plugin->getParameterDescriptors();

#if defined(__WXMSW__) || (defined(__WXGTK__) && wxCHECK_VERSION(3, 0, 0))
   // In some environments wxWidgets calls OnTextCtrl during creation
   // of the text control, and VampEffectDialog::OnTextCtrl calls HandleText,
   // which assumes all the fields have been initialized.
   // This can give us a bad pointer crash, so manipulate inSlider to
   // no-op HandleText during creation.
   inSlider = true;
#else
   inSlider = false;
#endif

   inText = false;

   int count = mParameters.size();

   toggles = new wxCheckBox*[count];
   sliders = new wxSlider*[count];
   fields = new wxTextCtrl*[count];
   labels = new wxStaticText*[count];
   combos = new wxComboBox*[count];

   wxControl *item;

   wxBoxSizer *vSizer = new wxBoxSizer(wxVERTICAL);

   item = new wxStaticText(this, 0,
                           LAT1CTOWX(plugin->getName().c_str()) +
                           wxString(_(" - Vamp audio analysis plugin")));
   vSizer->Add(item, 0, wxALL, 5);

   item = new wxStaticText(this, 0,
                           LAT1CTOWX(plugin->getDescription().c_str()));
   vSizer->Add(item, 0, wxALL, 5);

   item = new wxStaticText(this, 0,
                           wxString(_("Author: "))
                           + LAT1CTOWX(plugin->getMaker().c_str()));

   vSizer->Add(item, 0, wxALL, 5);

   item = new wxStaticText(this, 0,
                           LAT1CTOWX(plugin->getCopyright().c_str()));
   vSizer->Add(item, 0, wxALL, 5);

   wxScrolledWindow *w = new wxScrolledWindow(this,
                                              wxID_ANY,
                                              wxDefaultPosition,
                                              wxDefaultSize,
                                              wxVSCROLL | wxTAB_TRAVERSAL);

   // Try to give the window a sensible default/minimum size
   w->SetMinSize(wxSize(
      wxMax(400, parent->GetSize().GetWidth() / 2),
      parent->GetSize().GetHeight() / 2));

   w->SetScrollRate(0, 20);
   vSizer->Add(w, 1, wxEXPAND|wxALL, 5);

   vSizer->Add(CreateStdButtonSizer(this, eCancelButton|eOkButton), 0, wxEXPAND);

   SetSizer(vSizer);

   wxSizer *paramSizer =
      new wxStaticBoxSizer(wxVERTICAL, w, _("Plugin Settings"));

   wxFlexGridSizer *gridSizer = new wxFlexGridSizer(5, 0, 0);
   gridSizer->AddGrowableCol(3);

   programCombo = 0;

   if (!programs.empty()) {

      wxArrayString choices;
      wxString currentProgram =
         wxString(mPlugin->getCurrentProgram().c_str(), wxConvISO8859_1);

      for (size_t i = 0; i < programs.size(); ++i) {

         wxString choice = wxString(programs[i].c_str(), wxConvISO8859_1);
         choices.Add(choice);
      }

      gridSizer->Add(new wxStaticText(w, 0, _("Program")),
                     0, wxALIGN_CENTER_VERTICAL | wxALL, 5);

      programCombo = new wxComboBox(w, 9999, currentProgram,
                                    wxDefaultPosition, wxDefaultSize,
                                    choices, wxCB_READONLY);
      programCombo->SetName(_("Program"));

      gridSizer->Add(1, 1, 0);
      gridSizer->Add(1, 1, 0);

      gridSizer->Add(programCombo, 0, wxALIGN_CENTER_VERTICAL | wxEXPAND | wxALL, 5);
      ConnectFocus(programCombo);

      gridSizer->Add(1, 1, 0);
   }

   for (int p = 0; p < count; p++) {

      wxString labelText = LAT1CTOWX(mParameters[p].name.c_str());
      item = new wxStaticText(w, 0, labelText + wxT(":"));
      item->SetName(labelText);
      gridSizer->Add(item, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);

      wxString fieldText;

      float value = mPlugin->getParameter(mParameters[p].identifier);

      toggles[p] = 0;
      combos[p] = 0;
      sliders[p] = 0;
      fields[p] = 0;

      if (mParameters[p].isQuantized &&
          mParameters[p].quantizeStep == 1.0 &&
          mParameters[p].minValue == 0.0 &&
          mParameters[p].maxValue == 1.0) {

         toggles[p] = new wxCheckBox(w, p, wxT(""));
         toggles[p]->SetName(labelText);
         toggles[p]->SetValue(value > 0.5);
         gridSizer->Add(toggles[p], 0, wxALL, 5);
         ConnectFocus(toggles[p]);

         gridSizer->Add(1, 1, 0);
         gridSizer->Add(1, 1, 0);
         gridSizer->Add(1, 1, 0);

      } else if (mParameters[p].isQuantized &&
                 mParameters[p].quantizeStep == 1.0 &&
                 !mParameters[p].valueNames.empty()) {

         wxArrayString choices;
         wxString selected;

         for (size_t i = 0; i < mParameters[p].valueNames.size(); ++i) {
            wxString choice = wxString
               (mParameters[p].valueNames[i].c_str(), wxConvISO8859_1);
            if (size_t(value - mParameters[p].minValue + 0.5) == i) {
               selected = choice;
            }
            choices.Add(choice);
         }

         combos[p] = new wxComboBox(w, p, selected,
                                    wxDefaultPosition, wxDefaultSize,
                                    choices, wxCB_READONLY);
         combos[p]->SetName(labelText);

         gridSizer->Add(1, 1, 0);
         gridSizer->Add(1, 1, 0);

         gridSizer->Add(combos[p], 0, wxALIGN_CENTER_VERTICAL | wxEXPAND | wxALL, 5);
         ConnectFocus(combos[p]);

         gridSizer->Add(1, 1, 0);

      } else {

         fieldText = Internat::ToDisplayString(value);

         fields[p] = new wxTextCtrl(w, p, fieldText);
         fields[p]->SetName(labelText);
         gridSizer->Add(fields[p], 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
         ConnectFocus(fields[p]);

         wxString str = Internat::ToDisplayString(mParameters[p].minValue);
         item = new wxStaticText(w, 0, str);
         gridSizer->Add(item, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 5);

         sliders[p] =
             new wxSlider(w, p,
                          0, 0, 1000,
                          wxDefaultPosition,
                          wxSize(100, -1));
         sliders[p]->SetName(labelText);
         gridSizer->Add(sliders[p], 0, wxALIGN_CENTER_VERTICAL | wxEXPAND | wxALL, 5);
         ConnectFocus(sliders[p]);

         str = Internat::ToDisplayString(mParameters[p].maxValue);
         item = new wxStaticText(w, 0, str);
         gridSizer->Add(item, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxALL, 5);
      }
   }

   // Set all of the sliders based on the value in the
   // text fields
   inSlider = false; // Now we're ready for HandleText to actually do something.
   HandleText();

   paramSizer->Add(gridSizer, 1, wxEXPAND | wxALL, 5);
   w->SetSizer(paramSizer);

   Layout();
   Fit();
   SetSizeHints(GetSize());
}
Ejemplo n.º 12
0
ExportMixerDialog::ExportMixerDialog( TrackList *tracks, bool selectedOnly,
      int maxNumChannels, wxWindow *parent, wxWindowID id, const wxString &title, 
      const wxPoint &position, const wxSize& size, long style ) :
   wxDialog( parent, id, title, position, size, style | wxRESIZE_BORDER )
{
   int numTracks = 0;
   TrackListIterator iter( tracks );
   
   for( Track *t = iter.First(); t; t = iter.Next() )
   {
      if( t->GetKind() == Track::Wave && ( t->GetSelected() || !selectedOnly ) )
      {
         numTracks++;
         if( t->GetChannel() == Track::LeftChannel )
         {
            mTrackNames.Add( t->GetName() + _( " - Left" ) );
            mTrackNames.Add( t->GetName() + _( " - Right" ) );
            t = iter.Next();
            numTracks++;
         }
         else
            mTrackNames.Add( t->GetName() );
      }
   }

   // JKC: This is an attempt to fix a 'watching brief' issue, where the slider is
   // sometimes not slidable.  My suspicion is that a mixer may incorrectly
   // state the number of channels - so we assume there are always at least two.
   // The downside is that if someone is exporting to a mono device, the dialog
   // will allow them to output to two channels. Hmm.  We may need to revisit this.
   if (maxNumChannels < 2 )
      maxNumChannels = 2;
   if (maxNumChannels > 32)
      maxNumChannels = 32;

   mMixerSpec = new MixerSpec( numTracks, maxNumChannels );

   wxBoxSizer *vertSizer = new wxBoxSizer( wxVERTICAL );

   wxWindow *mixerPanel = new ExportMixerPanel( mMixerSpec, mTrackNames, this, 
         ID_MIXERPANEL, wxDefaultPosition, wxSize( 400, -1 ) );
   vertSizer->Add( mixerPanel, 1, wxEXPAND | wxALIGN_CENTRE | wxALL, 5 );

   wxBoxSizer *horSizer = new wxBoxSizer( wxHORIZONTAL );
   
   mChannelsText = new wxStaticText( this, -1, 
         wxString::Format( _( "Output Channels: %2d" ), 
            mMixerSpec->GetNumChannels() ) );
   horSizer->Add( mChannelsText, 0, wxALIGN_LEFT | wxALL, 5 );

   wxSlider *channels = new wxSlider( this, ID_SLIDER_CHANNEL, 
         mMixerSpec->GetNumChannels(), 1, mMixerSpec->GetMaxNumChannels(),
         wxDefaultPosition, wxSize( 300, -1 ) );
   horSizer->Add( channels, 0, wxEXPAND | wxALL, 5 );
   
   vertSizer->Add( horSizer, 0, wxALIGN_CENTRE | wxALL, 5 );

   vertSizer->Add( CreateStdButtonSizer(this, eCancelButton|eOkButton), 0, wxEXPAND );

   SetAutoLayout( true );
   SetSizer( vertSizer );
   vertSizer->Fit( this );
   vertSizer->SetSizeHints( this );

   SetSizeHints( 640, 480, 20000, 20000 );

   SetSize( 640, 480 );
}
Ejemplo n.º 13
0
bool wxSlider::Create(wxWindow *parent, wxWindowID id,
                      int value, int minValue, int maxValue,
                      const wxPoint& pos,
                      const wxSize& size, long style,
                      const wxValidator& validator,
                      const wxString& name)
{
    m_macIsUserPane = false ;

    if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
        return false;

    m_macMinimumStatic = NULL ;
    m_macMaximumStatic = NULL ;
    m_macValueStatic = NULL ;

    m_lineSize = 1;
    m_tickFreq = 0;

    m_rangeMax = maxValue;
    m_rangeMin = minValue;

    m_pageSize = (int)((maxValue-minValue)/10);

    Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;

    //
    // NB: (RN) Ticks here are sometimes off in the GUI if there
    // is not as many ticks as there are values
    //
    UInt16 tickMarks = 0 ;
    if ( style & wxSL_AUTOTICKS )
        tickMarks = (maxValue - minValue) + 1; //+1 for the 0 value

    while (tickMarks > 20)
        tickMarks /= 5; //keep the number of tickmarks from becoming unwieldly

    m_peer = new wxMacControl(this) ;
    verify_noerr ( CreateSliderControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds ,
        value , minValue , maxValue , kControlSliderPointsDownOrRight , tickMarks , true /* liveTracking */ ,
        GetwxMacLiveScrollbarActionProc() , m_peer->GetControlRefAddr() ) );


    if(style & wxSL_VERTICAL) {
        SetSizeHints(10, -1, 10, -1);  // Forces SetSize to use the proper width
    }
    else {
        SetSizeHints(-1, 10, -1, 10);  // Forces SetSize to use the proper height
    }
    // NB!  SetSizeHints is overloaded by wxSlider and will substitute 10 with the
    // proper dimensions, it also means other people cannot bugger the slider with
    // other values

    if(style & wxSL_LABELS)
    {
        m_macMinimumStatic = new wxStaticText( parent, wxID_ANY, wxEmptyString );
        m_macMaximumStatic = new wxStaticText( parent, wxID_ANY, wxEmptyString );
        m_macValueStatic = new wxStaticText( parent, wxID_ANY, wxEmptyString );
        SetRange(minValue, maxValue);
        SetValue(value);
    }

    MacPostControlCreate(pos,size) ;

    return true;
}
Ejemplo n.º 14
0
LabelDialog::LabelDialog(wxWindow *parent,
                         TrackFactory &factory,
                         TrackList *tracks,
                         ViewInfo &viewinfo,
                         double rate,
                         const wxString & format)
: wxDialog(parent,
           wxID_ANY,
           _("Edit Labels"),
           wxDefaultPosition,
           wxSize(800, 600),
           wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER),
  mFactory(factory),
  mTracks(tracks),
  mViewInfo(&viewinfo),
  mRate(rate),
  mFormat(format)
{
   SetName(GetTitle());

   {
      // Create the main sizer
      auto vs = std::make_unique<wxBoxSizer>(wxVERTICAL);

      // A little instruction
      wxStaticText *instruct =
         safenew wxStaticText(this,
         wxID_ANY,
         _("Press F2 or double click to edit cell contents."));
      instruct->SetName(instruct->GetLabel()); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
      vs->Add(instruct,
         0,
         wxALIGN_LEFT | wxALL,
         5);

      // Create the main sizer
      mGrid = safenew Grid(this, wxID_ANY);
      vs->Add(mGrid, 1, wxEXPAND | wxALL, 5);

      // Create the action buttons
      {
         auto hs = std::make_unique<wxBoxSizer>(wxHORIZONTAL);
         hs->Add(safenew wxButton(this, ID_INSERTA, _("Insert &After")), 1, wxCENTER | wxALL, 5);
         hs->Add(safenew wxButton(this, ID_INSERTB, _("Insert &Before")), 1, wxCENTER | wxALL, 5);
         hs->Add(safenew wxButton(this, ID_REMOVE, _("&Remove")), 1, wxCENTER | wxALL, 5);
         hs->Add(safenew wxButton(this, ID_IMPORT, _("&Import...")), 1, wxCENTER | wxALL, 5);
         hs->Add(safenew wxButton(this, ID_EXPORT, _("&Export...")), 1, wxCENTER | wxALL, 5);
         vs->Add(hs.release(), 0, wxEXPAND | wxCENTER | wxALL, 5);
      }

      // Create the exit buttons
      vs->Add(CreateStdButtonSizer(this, eCancelButton | eOkButton).release(), 0, wxEXPAND);

      // Make it so
      SetSizer(vs.release());
   }

   // Build the initial (empty) grid
   mGrid->CreateGrid(0, Col_Max);
   mGrid->SetDefaultCellAlignment(wxALIGN_LEFT, wxALIGN_CENTER);

   /* i18n-hint: (noun).  A track contains waves, audio etc.*/
   mGrid->SetColLabelValue(0,_("Track"));
   /* i18n-hint: (noun)*/
   mGrid->SetColLabelValue(1,_("Label"));
   /* i18n-hint: (noun) of a label*/
   mGrid->SetColLabelValue(2,_("Start Time"));
   /* i18n-hint: (noun) of a label*/
   mGrid->SetColLabelValue(3,_("End Time"));

   // Create and remember editors.  No need to DELETE these as the wxGrid will
   // do it for us.  (The DecRef() that is needed after GetDefaultEditorForType
   // becomes the duty of the wxGridCellAttr objects after we set them in the grid.)
   mChoiceEditor = (ChoiceEditor *) mGrid->GetDefaultEditorForType(GRID_VALUE_CHOICE);
   mTimeEditor = (TimeEditor *) mGrid->GetDefaultEditorForType(GRID_VALUE_TIME);

   // Initialize and set the track name column attributes
   wxGridCellAttr *attr;
   mGrid->SetColAttr(Col_Track, (attr = safenew wxGridCellAttr));
   attr->SetEditor(mChoiceEditor);
   mTrackNames.Add(_("New..."));

   // Initialize and set the time column attributes
   mGrid->SetColAttr(Col_Stime, (attr = safenew wxGridCellAttr));
   // Don't need DecRef() after this GetDefaultRendererForType.
   attr->SetRenderer(mGrid->GetDefaultRendererForType(GRID_VALUE_TIME));
   attr->SetEditor(mTimeEditor);
   attr->SetAlignment(wxALIGN_CENTER, wxALIGN_CENTER);

   mGrid->SetColAttr(Col_Etime, attr->Clone());

   // Seems there's a bug in wxGrid.  Adding only 1 row does not
   // allow SetCellSize() to work properly and you will not get
   // the expected 1 row by 4 column cell.
   //
   // So, we set the minimum row height to 0 and basically hide
   // the extra row by setting its height to 0.  And not allowing the
   // rows to be manually resized prevents the user from ever seeing
   // the extra row.
   mGrid->SetRowMinimalAcceptableHeight(0);
   mGrid->EnableDragRowSize(false);

   // Locate all labels in current track list
   FindAllLabels();

   // Populate the grid
   TransferDataToWindow();

   // Resize the label name column and ensure it doesn't go below an
   // arbitrary width.
   //
   // This should not be in TransferDataToWindow() since a user might
   // resize the column and we'd resize it back to the minimum.
   mGrid->AutoSizeColumn(Col_Label, false );
   mGrid->SetColSize(Col_Label, wxMax(150, mGrid->GetColSize(Col_Label)));
   mGrid->SetColMinimalWidth(Col_Label, mGrid->GetColSize(Col_Label));

   // Layout the works
   Layout();

   // Resize width based on width of columns and the vertical scrollbar
   wxRect r = mGrid->GetGridColLabelWindow()->GetRect();
   wxScrollBar sb(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSB_VERTICAL);
   r.width += sb.GetSize().GetWidth() + 6;
   SetClientSize(r.width, 300);

   // Make sure it doesn't go below this size
   r = GetRect();
   SetSizeHints(r.GetWidth(), r.GetHeight());

   // Center on display
   Center();
}
Ejemplo n.º 15
0
DiffDialogBase::DiffDialogBase(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);
        wxC95F2InitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* bSizer25 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer25);
    
    wxFlexGridSizer* fgSizer9 = new wxFlexGridSizer(  0, 2, 0, 0);
    fgSizer9->SetFlexibleDirection( wxBOTH );
    fgSizer9->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    fgSizer9->AddGrowableCol(1);
    
    bSizer25->Add(fgSizer9, 0, wxALL|wxEXPAND, 5);
    
    m_staticText25 = new wxStaticText(this, wxID_ANY, _("From Revision:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer9->Add(m_staticText25, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlFromRev = new wxTextCtrl(this, wxID_ANY, wxT("BASE"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_textCtrlFromRev->SetFocus();
    
    fgSizer9->Add(m_textCtrlFromRev, 0, wxALL|wxEXPAND, 5);
    
    m_staticText26 = new wxStaticText(this, wxID_ANY, _("To Revision:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer9->Add(m_staticText26, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlToRev = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer9->Add(m_textCtrlToRev, 0, wxALL|wxEXPAND, 5);
    
    bSizer25->Add(0, 0, 1, wxTOP|wxBOTTOM|wxEXPAND, 5);
    
    m_checkBoxIgnoreWhitespace = new wxCheckBox(this, wxID_ANY, _("Ignore whitespaces"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_checkBoxIgnoreWhitespace->SetValue(true);
    
    bSizer25->Add(m_checkBoxIgnoreWhitespace, 0, wxALL, 5);
    
    wxBoxSizer* bSizer26 = new wxBoxSizer(wxHORIZONTAL);
    
    bSizer25->Add(bSizer26, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_button20 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_button20->SetDefault();
    
    bSizer26->Add(m_button20, 0, wxALL, 5);
    
    m_button19 = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer26->Add(m_button19, 0, wxALL, 5);
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
}
Ejemplo n.º 16
0
TagsEditor::TagsEditor(wxWindow * parent,
                       wxString title,
                       Tags * tags,
                       bool editTitle,
                       bool editTrack)
    :  wxDialog(parent, wxID_ANY, title, wxDefaultPosition, wxDefaultSize,
                wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER),
       mTags(tags),
       mEditTitle(editTitle),
       mEditTrack(editTrack)
{
    names[0] = LABEL_ARTIST;
    names[1] = LABEL_TITLE;
    names[2] = LABEL_ALBUM;
    names[3] = LABEL_TRACK;
    names[4] = LABEL_YEAR;
    names[5] = LABEL_GENRE;
    names[6] = LABEL_COMMENTS;

    labelmap[0].label = LABEL_ARTIST;
    labelmap[1].label = LABEL_TITLE;
    labelmap[2].label = LABEL_ALBUM;
    labelmap[3].label = LABEL_TRACK;
    labelmap[4].label = LABEL_YEAR;
    labelmap[5].label = LABEL_GENRE;
    labelmap[6].label = LABEL_COMMENTS;

    labelmap[0].name = TAG_ARTIST;
    labelmap[1].name = TAG_TITLE;
    labelmap[2].name = TAG_ALBUM;
    labelmap[3].name = TAG_TRACK;
    labelmap[4].name = TAG_YEAR;
    labelmap[5].name = TAG_GENRE;
    labelmap[6].name = TAG_COMMENTS;

    mGrid = NULL;

    // Make a local copy of the passed in tags
    mLocal = *mTags;

    // Build, size, and position the dialog
    ShuttleGui S(this, eIsCreating);
    PopulateOrExchange(S);

    TransferDataToWindow();

    Layout();
    Fit();
    Center();
    SetSizeHints(GetSize());

    // Restore the original tags because TransferDataToWindow() will be called again
    mLocal.Clear();
    mLocal = *mTags;

    // Override size and position with last saved
    wxRect r = GetRect();
    gPrefs->Read(wxT("/TagsEditor/x"), &r.x, r.x);
    gPrefs->Read(wxT("/TagsEditor/y"), &r.y, r.y);
    gPrefs->Read(wxT("/TagsEditor/width"), &r.width, r.width);
    gPrefs->Read(wxT("/TagsEditor/height"), &r.height, r.height);
    //On multi-monitor systems, there's a chance the last saved window position is
    //on a monitor that has been removed or is unavailable.
    if (IsWindowRectValid(&r))
        Move(r.GetPosition());

//   SetSize(r.GetSize());

    // Resize value column width based on width of columns and the vertical scrollbar
    wxScrollBar sb(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSB_VERTICAL);
    r = mGrid->GetClientRect();
    r.width -= mGrid->GetColSize(0);
    r.width -= sb.GetSize().GetWidth();
    r.width -= 10;
    r.width -= r.x;
    mGrid->SetColSize(1, r.width);

    // Load the genres
    PopulateGenres();
}
Ejemplo n.º 17
0
SvnPropsBaseDlg::SvnPropsBaseDlg(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);
        wxC95F2InitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* bSizer28 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer28);
    
    m_staticTextURL = new wxStaticText(this, wxID_ANY, _("Title"), wxDefaultPosition, wxSize(-1, -1), 0);
    wxFont m_staticTextURLFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_staticTextURLFont.SetStyle(wxFONTSTYLE_ITALIC);
    m_staticTextURLFont.SetWeight(wxFONTWEIGHT_BOLD);
    m_staticTextURL->SetFont(m_staticTextURLFont);
    
    bSizer28->Add(m_staticTextURL, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    wxFlexGridSizer* fgSizer10 = new wxFlexGridSizer(  0, 2, 0, 0);
    fgSizer10->SetFlexibleDirection( wxBOTH );
    fgSizer10->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    fgSizer10->AddGrowableCol(1);
    
    bSizer28->Add(fgSizer10, 0, wxALL|wxEXPAND, 5);
    
    m_staticText27 = new wxStaticText(this, wxID_ANY, _("Bug URL Pattern:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer10->Add(m_staticText27, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlBugURL = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_textCtrlBugURL->SetToolTip(_("Enter here the URL for the bug details.\nFor example: http://mytracker.com?bug_id=$(BUGID)"));
    
    fgSizer10->Add(m_textCtrlBugURL, 0, wxALL|wxEXPAND, 5);
    
    m_staticText33 = new wxStaticText(this, wxID_ANY, _("Bug Message Pattern:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer10->Add(m_staticText33, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlBugMsg = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_textCtrlBugMsg->SetToolTip(_("Enter here the message to add to the commit log. You may use the $(BUG_URL) and $(BUGID) macros.\nAn example: \"Fixed: BUG#$(BUGID), See $(BUG_URL) for more details\""));
    
    fgSizer10->Add(m_textCtrlBugMsg, 0, wxALL|wxEXPAND, 5);
    
    m_staticText31 = new wxStaticText(this, wxID_ANY, _("Feature URL Pattern:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer10->Add(m_staticText31, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlFrURL = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_textCtrlFrURL->SetToolTip(_("Enter here the URL for the feature request details.\nFor example: http://mytracker.com?fr_id=$(FRID)"));
    
    fgSizer10->Add(m_textCtrlFrURL, 0, wxALL|wxEXPAND, 5);
    
    m_staticText34 = new wxStaticText(this, wxID_ANY, _("Feature Message Pattern:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer10->Add(m_staticText34, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlFrMsg = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_textCtrlFrMsg->SetToolTip(_("Enter here the message to add to the commit log. You may use the $(FR_URL) and $(FRID) macros.\nAn example: \"Implements FR#$(FRID), See $(FR_URL) for more details\""));
    
    fgSizer10->Add(m_textCtrlFrMsg, 0, wxALL|wxEXPAND, 5);
    
    bSizer28->Add(0, 0, 1, wxEXPAND, 5);
    
    m_staticline7 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxLI_HORIZONTAL);
    
    bSizer28->Add(m_staticline7, 0, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* bSizer29 = new wxBoxSizer(wxHORIZONTAL);
    
    bSizer28->Add(bSizer29, 0, wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_button21 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_button21->SetDefault();
    
    bSizer29->Add(m_button21, 0, wxALL, 5);
    
    m_button22 = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer29->Add(m_button22, 0, wxALL, 5);
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
}
Ejemplo n.º 18
0
MessagePaneBase::MessagePaneBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
    : wxPanel(parent, id, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxC2A73InitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* bSizer8 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer8);
    
    m_panel2 = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxTAB_TRAVERSAL|wxBORDER_SIMPLE);
    m_panel2->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK));
    
    bSizer8->Add(m_panel2, 1, wxEXPAND, 0);
    
    wxBoxSizer* mainSizer = new wxBoxSizer(wxHORIZONTAL);
    m_panel2->SetSizer(mainSizer);
    
    wxBoxSizer* bSizer81 = new wxBoxSizer(wxHORIZONTAL);
    
    mainSizer->Add(bSizer81, 1, wxALIGN_CENTER_VERTICAL, 5);
    
    wxBoxSizer* bSizer4 = new wxBoxSizer(wxHORIZONTAL);
    
    bSizer81->Add(bSizer4, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_bitmap1 = new wxStaticBitmap(m_panel2, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize(48,48), 0 );
    
    bSizer4->Add(m_bitmap1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_panel1 = new wxPanel(m_panel2, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxWANTS_CHARS|wxTAB_TRAVERSAL);
    m_panel1->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK));
    
    bSizer4->Add(m_panel1, 1, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* bSizer2 = new wxBoxSizer(wxHORIZONTAL);
    m_panel1->SetSizer(bSizer2);
    
    wxBoxSizer* bSizer3 = new wxBoxSizer(wxVERTICAL);
    
    bSizer2->Add(bSizer3, 1, wxALIGN_CENTER_VERTICAL, 5);
    
    m_staticText2 = new wxStaticText(m_panel1, wxID_ANY, _("Message:"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_staticText2->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK));
    m_staticText2->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT));
    
    bSizer3->Add(m_staticText2, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_staticTextMessage = new wxStaticText(m_panel1, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_staticTextMessage->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK));
    m_staticTextMessage->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT));
    
    bSizer3->Add(m_staticTextMessage, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_DontAnnoyMeCheck = new wxCheckBox(m_panel1, wxID_ANY, _("Remember my answer and don't annoy me again!"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_DontAnnoyMeCheck->SetValue(false);
    m_DontAnnoyMeCheck->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK));
    m_DontAnnoyMeCheck->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT));
    m_DontAnnoyMeCheck->SetToolTip(_("If you don't want to be spammed by this message again, tick the box. You can change your mind in Settings > Global Editor Preferences > Dialogs"));
    
    bSizer3->Add(m_DontAnnoyMeCheck, 0, wxALL, 5);
    
    wxBoxSizer* bSizer7 = new wxBoxSizer(wxVERTICAL);
    
    bSizer4->Add(bSizer7, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_buttonClose = new wxButton(m_panel2, wxID_CANCEL, _("Hide"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer7->Add(m_buttonClose, 0, wxALL|wxEXPAND, 5);
    
    m_buttonAction = new wxButton(m_panel2, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_buttonAction->SetDefault();
    
    bSizer7->Add(m_buttonAction, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_buttonAction1 = new wxButton(m_panel2, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer7->Add(m_buttonAction1, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_buttonAction2 = new wxButton(m_panel2, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer7->Add(m_buttonAction2, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
    // Connect events
    this->Connect(wxEVT_ERASE_BACKGROUND, wxEraseEventHandler(MessagePaneBase::OnEraseBG), NULL, this);
    this->Connect(wxEVT_PAINT, wxPaintEventHandler(MessagePaneBase::OnPaint), NULL, this);
    m_buttonClose->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MessagePaneBase::OnButtonClose), NULL, this);
    m_buttonAction->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MessagePaneBase::OnActionButton), NULL, this);
    m_buttonAction1->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MessagePaneBase::OnActionButton1), NULL, this);
    m_buttonAction2->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MessagePaneBase::OnActionButton2), NULL, this);
    
}
Ejemplo n.º 19
0
filter_dlg::filter_dlg(wxWindow *parent, wxWindowID id, std::function<const tweetidset *()> getidset_, std::string srcname_, const wxPoint &pos, const wxSize &size)
		: wxDialog(parent, id, wxT("Apply Filter"), pos, size, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER), getidset(getidset_), srcname(std::move(srcname_)) {
	fdg.reset(new filter_dlg_gui);
	fdg->shared_state = std::make_shared<filter_dlg_shared_state>();
	fdg->shared_state->srcname = srcname;
	fdg->hbox = new wxBoxSizer(wxHORIZONTAL);
	fdg->vbox = new wxBoxSizer(wxVERTICAL);

	fdg->hbox->Add(fdg->vbox, 1, wxALL | wxEXPAND, 0);

	if (!srcname.empty()) {
		wxStaticText *srcname_label = new wxStaticText(this, wxID_ANY, wxstrstd(srcname));
		wxBoxSizer *hs = new wxBoxSizer(wxHORIZONTAL);
		hs->AddStretchSpacer();
		hs->Add(srcname_label, 0, wxEXPAND | wxALIGN_CENTRE_VERTICAL | wxALIGN_CENTRE, 0);
		hs->AddStretchSpacer();
		fdg->vbox->Add(hs, 0, wxEXPAND | wxALIGN_CENTRE_VERTICAL | wxALL, 4);
	}

	auto addblock = [&](wxString name) -> wxFlexGridSizer * {
		wxStaticBoxSizer *hbox1 = new wxStaticBoxSizer(wxVERTICAL, this, name);
		wxFlexGridSizer *fgsr = new wxFlexGridSizer(2, 2, 5);
		fgsr->SetFlexibleDirection(wxBOTH);
		fgsr->AddGrowableCol(2, 1);

		fdg->vbox->Add(hbox1, 0, wxALL | wxEXPAND | wxALIGN_TOP, 4);
		hbox1->Add(fgsr, 0, wxALL | wxEXPAND | wxALIGN_TOP, 4);

		return fgsr;
	};

	wxFlexGridSizer *cb = addblock(wxT("Select items to filter"));
	int nextcheckboxid = ID_CHECKBOX_START;
	auto addcheckbox = [&](wxFlexGridSizer *fgs, const wxString &name, std::function<void(const tweetidset &, selection_category &)> func) -> wxCheckBox * {
		wxCheckBox *chk = new wxCheckBox(this, nextcheckboxid, name);
		fgs->Add(chk, 0, wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL, 4);

		wxSize chksz = chk->GetSize();
		fgs->SetItemMinSize(chk, std::max(200, chksz.GetWidth()), chksz.GetHeight());

		wxStaticText *stattxt = new wxStaticText(this, wxID_ANY, wxT("0"));
		fgs->Add(stattxt, 0, wxEXPAND | wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL, 4);

		selection_category &sc = checkboxmap[nextcheckboxid];
		sc.func = std::move(func);
		sc.stattext = stattxt;
		sc.chk = chk;

		nextcheckboxid++;
		return chk;
	};
	auto addcheckbox_intersection = [&](wxFlexGridSizer *fgs, const wxString &name, const tweetidset &intersect_with) -> wxCheckBox * {
		return addcheckbox(fgs, name, [this, &intersect_with](const tweetidset &in, selection_category &sc) {
			std::set_intersection(in.begin(), in.end(), intersect_with.begin(), intersect_with.end(), std::inserter(sc.output, sc.output.end()), in.key_comp());
		});
	};
	addcheckbox(cb, wxT("All"), [this](const tweetidset &in, selection_category &sc) {
		sc.output_other = &in;
	});
	addcheckbox_intersection(cb, wxT("Unread"), ad.cids.unreadids);
	addcheckbox_intersection(cb, wxT("Highlighted"), ad.cids.highlightids);

	wxStaticText *total_label = new wxStaticText(this, wxID_ANY, wxT("Total"));
	cb->Add(total_label, 0, wxEXPAND | wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL, 4);
	fdg->total = new wxStaticText(this, wxID_ANY, wxT("Total selected"));
	cb->Add(fdg->total, 0, wxEXPAND | wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL, 4);

	{
		wxFlexGridSizer *lfgs = addblock(wxT("Limit"));
		fdg->limit_count_chk = new wxCheckBox(this, nextcheckboxid, wxT("First N"));
		lfgs->Add(fdg->limit_count_chk, 0, wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL, 4);

		wxSize chksz = fdg->limit_count_chk->GetSize();
		lfgs->SetItemMinSize(fdg->limit_count_chk, std::max(200, chksz.GetWidth()), chksz.GetHeight());

		fdg->limit_count_txt = new wxTextCtrl(this, ID_LIMIT_TXT, wxT("0"), wxDefaultPosition, wxDefaultSize, 0, wxTextValidator(wxFILTER_NUMERIC));
		lfgs->Add(fdg->limit_count_txt, 0, wxEXPAND | wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL, 4);
	}

	wxStaticBoxSizer *filtersb = new wxStaticBoxSizer(wxVERTICAL, this, wxT("Filter"));
	fdg->vbox->Add(filtersb, 0, wxALL | wxEXPAND | wxALIGN_TOP, 4);

	FilterTextValidator filterval(fdg->shared_state->apply_filter, &fdg->apply_filter_txt);
	wxTextCtrl *filtertc = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE, filterval);
	filtersb->Add(filtertc, 0, wxEXPAND | wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL, 4);

	wxBoxSizer *hboxfooter = new wxBoxSizer(wxHORIZONTAL);
	fdg->vbox->Add(hboxfooter, 0, wxALL | wxALIGN_RIGHT | wxALIGN_BOTTOM, 4);
	fdg->filterbtn = new wxButton(this, wxID_OK, wxT(""));
	wxButton *cancelbtn = new wxButton(this, wxID_CANCEL, wxT("Cancel"));
	hboxfooter->Add(fdg->filterbtn, 0, wxALL | wxALIGN_BOTTOM | wxALIGN_RIGHT, 2);
	hboxfooter->Add(cancelbtn, 0, wxALL | wxALIGN_BOTTOM | wxALIGN_RIGHT, 2);

	ReCalculateCategories();

	SetSizer(fdg->hbox);
	fdg->hbox->Fit(this);

	wxSize initsize = GetSize();
	SetSizeHints(initsize.GetWidth(), initsize.GetHeight(), 9000, initsize.GetHeight());
}
Ejemplo n.º 20
0
SvnPreferencesDialogBase::SvnPreferencesDialogBase(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);
        wxC95F2InitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* bSizer12 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer12);
    
    m_treebook1 = new wxTreebook(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxBK_DEFAULT);
    wxImageList* m_treebook1_il = new wxImageList(16, 16);
    m_treebook1->AssignImageList(m_treebook1_il);
    
    bSizer12->Add(m_treebook1, 1, wxALL|wxEXPAND, 5);
    
    m_panel3 = new wxPanel(m_treebook1, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxTAB_TRAVERSAL);
    int m_panel3ImgIndex;
    m_panel3ImgIndex = m_treebook1_il->Add(wxXmlResource::Get()->LoadBitmap(wxT("general")));
    m_treebook1->AddPage(m_panel3, _("General"), true, m_panel3ImgIndex);
    
    wxBoxSizer* bSizer15 = new wxBoxSizer(wxVERTICAL);
    m_panel3->SetSizer(bSizer15);
    
    wxFlexGridSizer* fgSizer3 = new wxFlexGridSizer(  2, 3, 0, 0);
    fgSizer3->SetFlexibleDirection( wxBOTH );
    fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    fgSizer3->AddGrowableCol(1);
    
    bSizer15->Add(fgSizer3, 0, wxALL|wxEXPAND, 5);
    
    m_staticTextExe = new wxStaticText(m_panel3, wxID_ANY, _("Executable:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer3->Add(m_staticTextExe, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlSvnExecutable = new wxTextCtrl(m_panel3, wxID_ANY, wxT("svn"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer3->Add(m_textCtrlSvnExecutable, 1, wxALL|wxEXPAND, 5);
    
    m_buttonBrowse = new wxButton(m_panel3, wxID_ANY, _("Browse"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer3->Add(m_buttonBrowse, 0, wxRIGHT|wxTOP|wxBOTTOM, 5);
    
    m_staticText9 = new wxStaticText(m_panel3, wxID_ANY, _("Ignore the following file patterns:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer15->Add(m_staticText9, 0, wxALL, 5);
    
    m_textCtrlIgnorePattern = new wxTextCtrl(m_panel3, wxID_ANY, wxT("*.o *.obj *.exe *.lib *.so *.dll *.a *.dynlib *.exp *.ilk *.pdb *.d *.tags *.suo *.ncb *.bak *.orig *.dll *.mine *.o.d *.session Debug Release DebugUnicode ReleaseUnicode"), wxDefaultPosition, wxSize(-1, -1), wxTE_RICH2|wxTE_MULTILINE);
    
    bSizer15->Add(m_textCtrlIgnorePattern, 1, wxALL|wxEXPAND, 5);
    
    wxStaticBoxSizer* sbSizer1 = new wxStaticBoxSizer( new wxStaticBox(m_panel3, wxID_ANY, wxT("")), wxVERTICAL);
    
    bSizer15->Add(sbSizer1, 0, wxALL|wxEXPAND, 5);
    
    m_checkBoxAddToSvn = new wxCheckBox(m_panel3, wxID_ANY, _("When adding file(s) to project, add it to svn as well"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxAddToSvn->SetValue(false);
    
    sbSizer1->Add(m_checkBoxAddToSvn, 0, wxALL|wxEXPAND, 5);
    
    m_checkBoxRetag = new wxCheckBox(m_panel3, wxID_ANY, _("Retag workspace after svn update, revert or applying patch"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxRetag->SetValue(false);
    
    sbSizer1->Add(m_checkBoxRetag, 0, wxALL|wxEXPAND, 5);
    
    m_checkBoxRenameFile = new wxCheckBox(m_panel3, wxID_ANY, _("When renaming a file in the project, rename it in the repository as well"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxRenameFile->SetValue(false);
    
    sbSizer1->Add(m_checkBoxRenameFile, 0, wxALL|wxEXPAND, 5);
    
    m_checkBoxUsePosixLocale = new wxCheckBox(m_panel3, wxID_ANY, _("Use POSIX Locale"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxUsePosixLocale->SetValue(true);
    m_checkBoxUsePosixLocale->SetToolTip(_("When checked, CodeLite will use the default \"C\" locale instead of the current locale. This will ensure that svn command line output is parsed properly."));
    
    sbSizer1->Add(m_checkBoxUsePosixLocale, 0, wxALL|wxEXPAND, 5);
    
    m_panel4 = new wxPanel(m_treebook1, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxTAB_TRAVERSAL);
    int m_panel4ImgIndex;
    m_panel4ImgIndex = m_treebook1_il->Add(wxXmlResource::Get()->LoadBitmap(wxT("diff")));
    m_treebook1->AddPage(m_panel4, _("External Diff"), false, m_panel4ImgIndex);
    
    wxBoxSizer* bSizer16 = new wxBoxSizer(wxVERTICAL);
    m_panel4->SetSizer(bSizer16);
    
    m_checkBoxUseExternalDiff = new wxCheckBox(m_panel4, wxID_ANY, _("Use external diff tool"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxUseExternalDiff->SetValue(false);
    
    bSizer16->Add(m_checkBoxUseExternalDiff, 0, wxALL, 5);
    
    wxFlexGridSizer* fgSizer5 = new wxFlexGridSizer(  1, 3, 0, 0);
    fgSizer5->SetFlexibleDirection( wxBOTH );
    fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    fgSizer5->AddGrowableCol(1);
    
    bSizer16->Add(fgSizer5, 0, wxALL|wxEXPAND, 5);
    
    m_staticText10 = new wxStaticText(m_panel4, wxID_ANY, _("External Diff Viewer:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer5->Add(m_staticText10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlDiffViewer = new wxTextCtrl(m_panel4, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer5->Add(m_textCtrlDiffViewer, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
    
    m_buttonBrowseExtDiff = new wxButton(m_panel4, wxID_ANY, _("Browse"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer5->Add(m_buttonBrowseExtDiff, 0, wxALL, 5);
    
    m_panel5 = new wxPanel(m_treebook1, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxTAB_TRAVERSAL);
    int m_panel5ImgIndex;
    m_panel5ImgIndex = m_treebook1_il->Add(wxXmlResource::Get()->LoadBitmap(wxT("secure")));
    m_treebook1->AddPage(m_panel5, _("SSH Client"), false, m_panel5ImgIndex);
    
    wxBoxSizer* bSizer161 = new wxBoxSizer(wxVERTICAL);
    m_panel5->SetSizer(bSizer161);
    
    wxFlexGridSizer* fgSizer6 = new wxFlexGridSizer(  2, 3, 0, 0);
    fgSizer6->SetFlexibleDirection( wxBOTH );
    fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    fgSizer6->AddGrowableCol(1);
    
    bSizer161->Add(fgSizer6, 0, wxALL|wxEXPAND, 5);
    
    m_staticText20 = new wxStaticText(m_panel5, wxID_ANY, _("SSH Client:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer6->Add(m_staticText20, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlSSHClient = new wxTextCtrl(m_panel5, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer6->Add(m_textCtrlSSHClient, 0, wxALL|wxEXPAND, 5);
    
    m_button12 = new wxButton(m_panel5, wxID_ANY, _("Browse"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer6->Add(m_button12, 0, wxALL, 5);
    
    m_staticText21 = new wxStaticText(m_panel5, wxID_ANY, _("SSH Client arguments:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer6->Add(m_staticText21, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlSshClientArgs = new wxTextCtrl(m_panel5, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer6->Add(m_textCtrlSshClientArgs, 0, wxALL|wxEXPAND, 5);
    
    wxStaticBoxSizer* sbSizer2 = new wxStaticBoxSizer( new wxStaticBox(m_panel5, wxID_ANY, wxT("")), wxVERTICAL);
    
    bSizer161->Add(sbSizer2, 1, wxALL|wxEXPAND, 5);
    
    m_staticText22 = new wxStaticText(m_panel5, wxID_ANY, _("The SSH client field should contain the command to be\nused by the SVN command line client for establishing a secured channel. \n\nFor example, on Windows it should contain something like:\n/path/to/plink.exe -l <user name> -pw <svn password>\n\nIf you dont need SSH channel, leave this field empty"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    sbSizer2->Add(m_staticText22, 0, wxALL|wxEXPAND, 5);
    
    m_panel6 = new wxPanel(m_treebook1, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxTAB_TRAVERSAL);
    int m_panel6ImgIndex;
    m_panel6ImgIndex = m_treebook1_il->Add(wxXmlResource::Get()->LoadBitmap(wxT("integration")));
    m_treebook1->AddPage(m_panel6, _("Integration"), false, m_panel6ImgIndex);
    
    wxBoxSizer* bSizer23 = new wxBoxSizer(wxVERTICAL);
    m_panel6->SetSizer(bSizer23);
    
    wxStaticBoxSizer* sbSizer5 = new wxStaticBoxSizer( new wxStaticBox(m_panel6, wxID_ANY, _("Auto Revision:")), wxVERTICAL);
    
    bSizer23->Add(sbSizer5, 0, wxALL|wxEXPAND, 5);
    
    m_checkBoxExposeRevisionMacro = new wxCheckBox(m_panel6, wxID_ANY, _("Add revision number as preprocessor definition in the compilation line"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxExposeRevisionMacro->SetValue(false);
    
    sbSizer5->Add(m_checkBoxExposeRevisionMacro, 0, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* bSizer24 = new wxBoxSizer(wxHORIZONTAL);
    
    sbSizer5->Add(bSizer24, 0, wxALL|wxEXPAND, 5);
    
    m_staticText29 = new wxStaticText(m_panel6, wxID_ANY, _("Preprocessor name:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer24->Add(m_staticText29, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlMacroName = new wxTextCtrl(m_panel6, wxID_ANY, wxT("SVN_REVISION"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer24->Add(m_textCtrlMacroName, 1, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* bSizer13 = new wxBoxSizer(wxHORIZONTAL);
    
    bSizer12->Add(bSizer13, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_button8 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_button8->SetDefault();
    
    bSizer13->Add(m_button8, 0, wxALL, 5);
    
    m_button9 = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer13->Add(m_button9, 0, wxALL, 5);
    
    m_treebook1->ExpandNode( 0, true );
    m_treebook1->ExpandNode( 1, true );
    m_treebook1->ExpandNode( 2, true );
    m_treebook1->ExpandNode( 3, true );
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
    // Connect events
    m_buttonBrowse->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SvnPreferencesDialogBase::OnBrowseSvnExe), NULL, this);
    m_staticText10->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SvnPreferencesDialogBase::OnUseExternalDiffUI), NULL, this);
    m_textCtrlDiffViewer->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SvnPreferencesDialogBase::OnUseExternalDiffUI), NULL, this);
    m_buttonBrowseExtDiff->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SvnPreferencesDialogBase::OnBrowseDiffViewer), NULL, this);
    m_buttonBrowseExtDiff->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SvnPreferencesDialogBase::OnUseExternalDiffUI), NULL, this);
    m_button12->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SvnPreferencesDialogBase::OnBrowseSSHClient), NULL, this);
    m_staticText29->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SvnPreferencesDialogBase::OnAddRevisionMacroUI), NULL, this);
    m_textCtrlMacroName->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SvnPreferencesDialogBase::OnAddRevisionMacroUI), NULL, this);
    m_button8->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SvnPreferencesDialogBase::OnButtonOK), NULL, this);
    
}
Ejemplo n.º 21
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);
    
    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);
    
    wxStaticBoxSizer* statixBoxSizer24 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("Recent commit messages:")), wxVERTICAL);
    
    boxSizer1->Add(statixBoxSizer24, 0, wxALL|wxEXPAND, 5);
    
    wxArrayString m_choiceMessagesArr;
    m_choiceMessages = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), m_choiceMessagesArr, 0);
    
    statixBoxSizer24->Add(m_choiceMessages, 0, wxALL|wxEXPAND, 5);
    
    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();
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
    // Connect events
    m_checkListFiles->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(SvnCommitDialogBaseClass::OnFileSelected), NULL, this);
    m_choiceMessages->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(SvnCommitDialogBaseClass::OnChoiceMessage), NULL, this);
    
}
Ejemplo n.º 22
0
SvnInfoDialogBase::SvnInfoDialogBase(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);
        wxC95F2InitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* bSizer17 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer17);
    
    wxStaticBoxSizer* sbSizer3 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, wxT("")), wxVERTICAL);
    
    bSizer17->Add(sbSizer3, 0, wxALL|wxEXPAND, 5);
    
    wxFlexGridSizer* fgSizer7 = new wxFlexGridSizer(  5, 2, 0, 0);
    fgSizer7->SetFlexibleDirection( wxBOTH );
    fgSizer7->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    fgSizer7->AddGrowableCol(1);
    
    sbSizer3->Add(fgSizer7, 1, wxALL|wxEXPAND, 5);
    
    m_staticText19 = new wxStaticText(this, wxID_ANY, _("Root URL:"), wxDefaultPosition, wxSize(-1, -1), 0);
    wxFont m_staticText19Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_staticText19Font.SetWeight(wxFONTWEIGHT_BOLD);
    m_staticText19->SetFont(m_staticText19Font);
    
    fgSizer7->Add(m_staticText19, 0, wxALL|wxALIGN_RIGHT, 5);
    
    m_textCtrlRootURL = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(500,-1), wxTE_READONLY);
    
    fgSizer7->Add(m_textCtrlRootURL, 0, wxALL|wxEXPAND, 5);
    
    m_staticText21 = new wxStaticText(this, wxID_ANY, _("URL:"), wxDefaultPosition, wxSize(-1, -1), 0);
    wxFont m_staticText21Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_staticText21Font.SetWeight(wxFONTWEIGHT_BOLD);
    m_staticText21->SetFont(m_staticText21Font);
    
    fgSizer7->Add(m_staticText21, 0, wxALL|wxALIGN_RIGHT, 5);
    
    m_textCtrlURL = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), wxTE_READONLY);
    
    fgSizer7->Add(m_textCtrlURL, 0, wxALL|wxEXPAND, 5);
    
    m_staticText23 = new wxStaticText(this, wxID_ANY, _("Revision:"), wxDefaultPosition, wxSize(-1, -1), 0);
    wxFont m_staticText23Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_staticText23Font.SetWeight(wxFONTWEIGHT_BOLD);
    m_staticText23->SetFont(m_staticText23Font);
    
    fgSizer7->Add(m_staticText23, 0, wxALL|wxALIGN_RIGHT, 5);
    
    m_textCtrlRevision = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), wxTE_READONLY);
    
    fgSizer7->Add(m_textCtrlRevision, 0, wxALL|wxEXPAND, 5);
    
    m_staticText25 = new wxStaticText(this, wxID_ANY, _("Author:"), wxDefaultPosition, wxSize(-1, -1), 0);
    wxFont m_staticText25Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_staticText25Font.SetWeight(wxFONTWEIGHT_BOLD);
    m_staticText25->SetFont(m_staticText25Font);
    
    fgSizer7->Add(m_staticText25, 0, wxALL|wxALIGN_RIGHT, 5);
    
    m_textCtrlAuthor = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), wxTE_READONLY);
    
    fgSizer7->Add(m_textCtrlAuthor, 0, wxALL|wxEXPAND, 5);
    
    m_staticText27 = new wxStaticText(this, wxID_ANY, _("Date:"), wxDefaultPosition, wxSize(-1, -1), 0);
    wxFont m_staticText27Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_staticText27Font.SetWeight(wxFONTWEIGHT_BOLD);
    m_staticText27->SetFont(m_staticText27Font);
    
    fgSizer7->Add(m_staticText27, 0, wxALL|wxALIGN_RIGHT, 5);
    
    m_textCtrlDate = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), wxTE_READONLY);
    
    fgSizer7->Add(m_textCtrlDate, 0, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* bSizer18 = new wxBoxSizer(wxHORIZONTAL);
    
    bSizer17->Add(bSizer18, 0, wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_button13 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_button13->SetDefault();
    
    bSizer18->Add(m_button13, 0, wxALL, 5);
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
}
Ejemplo n.º 23
0
LabelDialog::LabelDialog(wxWindow *parent,
                         DirManager *dirmanager,
                         TrackList *tracks,
                         ViewInfo &viewinfo,
                         double rate)
: wxDialog(parent,
           wxID_ANY,
           _NoAcc("&Edit Labels"),
           wxDefaultPosition,
           wxSize(800, 600),
           wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER),
  mDirManager(dirmanager),
  mTracks(tracks),
  mViewInfo(&viewinfo),
  mRate(rate)
{
   // Create the main sizer
   wxBoxSizer *vs = new wxBoxSizer(wxVERTICAL);

   // A little instruction
   vs->Add(new wxStaticText(this,
                            wxID_ANY,
                            _("Press F2 or double click to edit cell contents.")),
                            0,
                            wxALIGN_LEFT | wxALL,
                            5);

   // Create the main sizer
   mGrid = new Grid(this, wxID_ANY);
   vs->Add(mGrid, 1, wxEXPAND | wxALL, 5);

   // Create the action buttons
   wxBoxSizer *hs = new wxBoxSizer(wxHORIZONTAL);
   hs->Add(new wxButton(this, ID_INSERTA, _("Insert &After")), 1, wxCENTER | wxALL, 5);
   hs->Add(new wxButton(this, ID_INSERTB, _("Insert &Before")), 1, wxCENTER | wxALL, 5);
   hs->Add(new wxButton(this, ID_REMOVE,  _("&Remove")), 1, wxCENTER | wxALL, 5);
   hs->Add(new wxButton(this, ID_IMPORT,  _("&Import...")), 1, wxCENTER | wxALL, 5);
   hs->Add(new wxButton(this, ID_EXPORT,  _("&Export...")), 1, wxCENTER | wxALL, 5);
   vs->Add(hs, 0, wxEXPAND | wxCENTER | wxALL, 5);

   // Create the exit buttons
   vs->Add(CreateStdButtonSizer(this, eCancelButton|eOkButton), 0, wxEXPAND);

   // Make it so
   SetSizer(vs);

   // Build the initial (empty) grid
   mGrid->CreateGrid(0, Col_Max);
   mGrid->SetDefaultCellAlignment(wxALIGN_LEFT, wxALIGN_CENTER);

   int i;
   for (i = 0; i < Col_Max; i++) {
      mGrid->SetColLabelValue(i, headers[i]);
   }

   // Create and remember editors.  No need to delete these as the wxGrid will
   // do it for us.
   mChoiceEditor = (ChoiceEditor *) mGrid->GetDefaultEditorForType(GRID_VALUE_CHOICE);
   mTimeEditor = (TimeEditor *) mGrid->GetDefaultEditorForType(GRID_VALUE_TIME);

   // Initialize and set the track name column attributes
   wxGridCellAttr *attr = new wxGridCellAttr();
   attr->SetEditor(mChoiceEditor);
   mGrid->SetColAttr(Col_Track, attr);
   mTrackNames.Add(_("New..."));

   // Initialize and set the time column attributes
   attr = new wxGridCellAttr();
   attr->SetRenderer(mGrid->GetDefaultRendererForType(GRID_VALUE_TIME));
   attr->SetEditor(mTimeEditor);
   attr->SetAlignment(wxALIGN_CENTER, wxALIGN_CENTER);
   mGrid->SetColAttr(Col_Stime, attr);
   mGrid->SetColAttr(Col_Etime, attr->Clone());

   // Seems there's a bug in wxGrid.  Adding only 1 row does not
   // allow SetCellSize() to work properly and you will not get
   // the expected 1 row by 4 column cell.
   //
   // So, we set the minimum row height to 0 and basically hide
   // the extra row by setting its height to 0.  And not allowing the
   // rows to be manually resized prevents the user from ever seeing
   // the extra row.
   mGrid->SetRowMinimalAcceptableHeight(0);
   mGrid->EnableDragRowSize(false);

   // Locate all labels in current track list
   FindAllLabels();

   // Populate the grid
   TransferDataToWindow();

   // Resize the label name column and ensure it doesn't go below an
   // arbitrary width.
   //
   // This should not be in TransferDataToWindow() since a user might
   // resize the column and we'd resize it back to the minimum.
   mGrid->AutoSizeColumn(Col_Label, false );
   mGrid->SetColSize(Col_Label, wxMax(150, mGrid->GetColSize(Col_Label)));
   mGrid->SetColMinimalWidth(Col_Label, mGrid->GetColSize(Col_Label));

   // Layout the works
   Layout();

   // Resize width based on width of columns and the vertical scrollbar
   wxRect r = mGrid->GetGridColLabelWindow()->GetRect();
   wxScrollBar sb(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSB_VERTICAL);
   r.width += sb.GetSize().GetWidth() + 6;
   SetClientSize(r.width, 300);

   // Make sure it doesn't go below this size
   r = GetRect();
   SetSizeHints(r.GetWidth(), r.GetHeight());

   // Center on display
   Center();
}
Ejemplo n.º 24
0
SvnCopyDialogBase::SvnCopyDialogBase(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);
        wxC95F2InitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* bSizer7 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer7);
    
    wxFlexGridSizer* fgSizer1 = new wxFlexGridSizer(  2, 2, 0, 0);
    fgSizer1->SetFlexibleDirection( wxBOTH );
    fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    fgSizer1->AddGrowableCol(1);
    
    bSizer7->Add(fgSizer1, 0, wxEXPAND, 5);
    
    m_staticText3 = new wxStaticText(this, wxID_ANY, _("Source URL:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer1->Add(m_staticText3, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlSourceURL = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer1->Add(m_textCtrlSourceURL, 1, wxALL|wxEXPAND, 5);
    
    m_staticText4 = new wxStaticText(this, wxID_ANY, _("Target URL:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer1->Add(m_staticText4, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlTargetURL = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer1->Add(m_textCtrlTargetURL, 1, wxALL|wxEXPAND, 5);
    
    m_staticText5 = new wxStaticText(this, wxID_ANY, _("Comment:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer7->Add(m_staticText5, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_textCtrlComment = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), wxTE_RICH2|wxTE_PROCESS_TAB|wxTE_PROCESS_ENTER|wxTE_MULTILINE);
    wxFont m_textCtrlCommentFont(12, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxT("Arial"));
    m_textCtrlComment->SetFont(m_textCtrlCommentFont);
    
    bSizer7->Add(m_textCtrlComment, 1, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* bSizer8 = new wxBoxSizer(wxHORIZONTAL);
    
    bSizer7->Add(bSizer8, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_button4 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_button4->SetDefault();
    
    bSizer8->Add(m_button4, 0, wxALL, 5);
    
    m_button5 = new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer8->Add(m_button5, 0, wxALL, 5);
    
    SetSizeHints(575,315);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
}
Ejemplo n.º 25
0
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_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrlNewName = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_textCtrlNewName->SetFocus();
    
    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|wxALIGN_RIGHT, 5);
    
    m_buttonCancel = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer3->Add(m_buttonCancel, 0, wxALL|wxALIGN_RIGHT, 5);
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre();
    // 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);
    
}
Ejemplo n.º 26
0
SvnCheckoutDialogBase::SvnCheckoutDialogBase(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);
        wxC95F2InitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* bSizer19 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer19);
    
    wxStaticBoxSizer* sbSizer4 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, wxT("")), wxVERTICAL);
    
    bSizer19->Add(sbSizer4, 0, wxALL|wxEXPAND, 5);
    
    wxFlexGridSizer* fgSizer8 = new wxFlexGridSizer(  2, 3, 0, 0);
    fgSizer8->SetFlexibleDirection( wxBOTH );
    fgSizer8->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    fgSizer8->AddGrowableCol(1);
    
    sbSizer4->Add(fgSizer8, 1, wxALL|wxEXPAND, 5);
    
    m_staticText24 = new wxStaticText(this, wxID_ANY, _("URL of repository:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer8->Add(m_staticText24, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    wxArrayString m_comboBoxRepoURLArr;
    m_comboBoxRepoURL = new wxComboBox(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), m_comboBoxRepoURLArr, 0);
    
    fgSizer8->Add(m_comboBoxRepoURL, 0, wxALL|wxEXPAND, 5);
    
    fgSizer8->Add(0, 0, 1, wxEXPAND, 5);
    
    m_staticText25 = new wxStaticText(this, wxID_ANY, _("Checkout directory:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer8->Add(m_staticText25, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    
    m_textCtrl20 = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), wxTE_RICH2);
    
    fgSizer8->Add(m_textCtrl20, 0, wxALL|wxEXPAND, 5);
    
    m_buttonBrowseDir = new wxButton(this, wxID_ANY, _("Browse"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer8->Add(m_buttonBrowseDir, 0, wxALL, 5);
    
    bSizer19->Add(0, 0, 1, wxBOTTOM|wxEXPAND, 5);
    
    wxBoxSizer* bSizer20 = new wxBoxSizer(wxHORIZONTAL);
    
    bSizer19->Add(bSizer20, 0, wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_button14 = new wxButton(this, wxID_OK, _("OK"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_button14->SetDefault();
    
    bSizer20->Add(m_button14, 0, wxALL, 5);
    
    m_button15 = new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer20->Add(m_button15, 0, wxALL, 5);
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
    // Connect events
    m_comboBoxRepoURL->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(SvnCheckoutDialogBase::OnCheckoutDirectoryText), NULL, this);
    m_buttonBrowseDir->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SvnCheckoutDialogBase::OnBrowseDirectory), NULL, this);
    m_button14->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SvnCheckoutDialogBase::OnOK), NULL, this);
    m_button14->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SvnCheckoutDialogBase::OnOkUI), NULL, this);
    
}
VirtualDirectorySelectorDlgBaseClass::VirtualDirectorySelectorDlgBaseClass(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);
        wxC168BInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    bSizer1 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer1);
    
    m_staticText1 = new wxStaticText(this, wxID_ANY, _("Select Virtual Directory:"), wxDefaultPosition, wxSize(-1, -1), 0);
    wxFont m_staticText1Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_staticText1Font.SetWeight(wxFONTWEIGHT_BOLD);
    m_staticText1->SetFont(m_staticText1Font);
    
    bSizer1->Add(m_staticText1, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
    
    m_treeCtrl = new wxTreeCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(300,300), wxTR_DEFAULT_STYLE|wxTR_SINGLE);
    
    bSizer1->Add(m_treeCtrl, 1, wxALL|wxEXPAND, 5);
    
    sbSizer1 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, wxT("")), wxVERTICAL);
    
    bSizer1->Add(sbSizer1, 0, wxEXPAND|wxALL, 5);
    
    m_staticTextPreview = new wxStaticText(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    
    sbSizer1->Add(m_staticTextPreview, 0, wxEXPAND|wxALL, 5);
    
    bSizer2 = new wxBoxSizer(wxHORIZONTAL);
    
    bSizer1->Add(bSizer2, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
    
    m_buttonOk = new wxButton(this, wxID_OK, _("OK"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_buttonOk->SetDefault();
    
    bSizer2->Add(m_buttonOk, 0, wxALL, 5);
    
    m_buttonCancel = new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer2->Add(m_buttonCancel, 0, wxALL, 5);
    
    m_button1 = new wxButton(this, wxID_NEW, _("New..."), wxDefaultPosition, wxSize(-1,-1), 0);
    m_button1->SetToolTip(_("Create new virtual folder..."));
    
    bSizer2->Add(m_button1, 0, wxALL, 5);
    
    SetName(wxT("VirtualDirectorySelectorDlgBaseClass"));
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    CentreOnParent(wxBOTH);
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_treeCtrl->Connect(wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler(VirtualDirectorySelectorDlgBaseClass::OnItemSelected), NULL, this);
    m_buttonOk->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(VirtualDirectorySelectorDlgBaseClass::OnButtonOK), NULL, this);
    m_buttonOk->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(VirtualDirectorySelectorDlgBaseClass::OnButtonOkUI), NULL, this);
    m_buttonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(VirtualDirectorySelectorDlgBaseClass::OnButtonCancel), NULL, this);
    m_button1->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(VirtualDirectorySelectorDlgBaseClass::OnNewVD), NULL, this);
    m_button1->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(VirtualDirectorySelectorDlgBaseClass::OnNewVDUI), NULL, this);
    
}
Ejemplo n.º 28
0
SvnLogDialogBase::SvnLogDialogBase(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);
        wxC95F2InitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* bSizer21 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer21);
    
    wxFlexGridSizer* fgSizer9 = new wxFlexGridSizer(  2, 2, 0, 0);
    fgSizer9->SetFlexibleDirection( wxBOTH );
    fgSizer9->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    fgSizer9->AddGrowableCol(1);
    
    bSizer21->Add(fgSizer9, 0, wxALL|wxEXPAND, 5);
    
    m_staticText28 = new wxStaticText(this, wxID_ANY, _("From revision:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer9->Add(m_staticText28, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_from = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(200,-1), 0);
    
    fgSizer9->Add(m_from, 0, wxALL|wxEXPAND, 5);
    
    m_staticText29 = new wxStaticText(this, wxID_ANY, _("To revision:"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer9->Add(m_staticText29, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
    
    m_to = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    
    fgSizer9->Add(m_to, 0, wxALL|wxEXPAND, 5);
    
    m_compact = new wxCheckBox(this, wxID_ANY, _("Create compact log"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_compact->SetValue(false);
    
    bSizer21->Add(m_compact, 0, wxALL|wxEXPAND, 5);
    
    m_staticline5 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxLI_HORIZONTAL);
    
    bSizer21->Add(m_staticline5, 0, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* bSizer22 = new wxBoxSizer(wxHORIZONTAL);
    
    bSizer21->Add(bSizer22, 0, wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_button17 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_button17->SetDefault();
    
    bSizer22->Add(m_button17, 0, wxALL, 5);
    
    m_button18 = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1, -1), 0);
    
    bSizer22->Add(m_button18, 0, wxALL, 5);
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
}
Ejemplo n.º 29
0
AddFunctionsImplBaseDlg::AddFunctionsImplBaseDlg(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);
        wxC3F25InitBitmapResources();
        bBitmapLoaded = true;
    }
    
    boxSizer117 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer117);
    
    m_banner125 = new wxBannerWindow(this, wxID_ANY, wxTOP, wxDefaultPosition, wxSize(-1,-1), wxBORDER_THEME);
    m_banner125->SetBitmap(wxNullBitmap);
    m_banner125->SetText(_("Implement functions"), _("Select the functions you want to implement"));
    m_banner125->SetGradient(wxSystemSettings::GetColour(wxSYS_COLOUR_ACTIVECAPTION), wxSystemSettings::GetColour(wxSYS_COLOUR_ACTIVECAPTION));
    m_banner125->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_CAPTIONTEXT));
    
    boxSizer117->Add(m_banner125, 0, wxALL|wxEXPAND, 5);
    
    m_filePicker = new wxFilePickerCtrl(this, wxID_ANY, wxEmptyString, wxT("Select a file"), wxT("*"), wxDefaultPosition, wxSize(-1,-1), wxFLP_DEFAULT_STYLE);
    m_filePicker->SetToolTip(_("The functions will be placed into this file"));
    
    boxSizer117->Add(m_filePicker, 0, wxALL|wxEXPAND, 5);
    
    boxSizer129 = new wxBoxSizer(wxHORIZONTAL);
    
    boxSizer117->Add(boxSizer129, 1, wxEXPAND, 5);
    
    m_dataview = new wxDataViewCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxDV_ROW_LINES|wxDV_SINGLE);
    
    m_dataviewModel = new AddFunctionsModel;
    m_dataviewModel->SetColCount( 2 );
    m_dataview->AssociateModel(m_dataviewModel.get() );
    
    boxSizer129->Add(m_dataview, 1, wxALL|wxEXPAND, 5);
    
    m_dataview->AppendToggleColumn(_("?"), m_dataview->GetColumnCount(), wxDATAVIEW_CELL_ACTIVATABLE, 50, wxALIGN_CENTER);
    m_dataview->AppendTextColumn(_("Function"), m_dataview->GetColumnCount(), wxDATAVIEW_CELL_INERT, 300, wxALIGN_LEFT);
    boxSizer131 = new wxBoxSizer(wxVERTICAL);
    
    boxSizer129->Add(boxSizer131, 0, wxEXPAND, 5);
    
    m_button133 = new wxButton(this, wxID_ANY, _("Check all"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer131->Add(m_button133, 0, wxALL|wxEXPAND, 5);
    
    m_button135 = new wxButton(this, wxID_ANY, _("Uncheck all"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer131->Add(m_button135, 0, wxALL|wxEXPAND, 5);
    
    boxSizer119 = new wxBoxSizer(wxHORIZONTAL);
    
    boxSizer117->Add(boxSizer119, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_button121 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_button121->SetDefault();
    
    boxSizer119->Add(m_button121, 0, wxALL, 5);
    
    m_button123 = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer119->Add(m_button123, 0, wxALL, 5);
    
    SetSizeHints(500,300);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
    // Connect events
    m_button133->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(AddFunctionsImplBaseDlg::OnCheckAll), NULL, this);
    m_button135->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(AddFunctionsImplBaseDlg::OnUncheckAll), NULL, this);
    m_button121->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(AddFunctionsImplBaseDlg::OnOKUI), NULL, this);
    
}
Ejemplo n.º 30
0
SFTPUploadDialogBase::SFTPUploadDialogBase(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);
        wxC32BEInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* boxSizer102 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer102);
    
    m_staticText110 = new wxStaticText(this, wxID_ANY, _("Upload the files to this folder:"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer102->Add(m_staticText110, 0, wxALL, 5);
    
    m_textCtrlRemoteFolder = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(400,-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_textCtrlRemoteFolderFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
    m_textCtrlRemoteFolderFont.SetFamily(wxFONTFAMILY_TELETYPE);
    #else
    wxFont m_textCtrlRemoteFolderFont = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT);
    m_textCtrlRemoteFolderFont.SetFamily(wxFONTFAMILY_TELETYPE);
    #endif
    m_textCtrlRemoteFolder->SetFont(m_textCtrlRemoteFolderFont);
    m_textCtrlRemoteFolder->SetToolTip(_("Set the remote folder path"));
    m_textCtrlRemoteFolder->SetFocus();
    #if wxVERSION_NUMBER >= 3000
    m_textCtrlRemoteFolder->SetHint(wxT(""));
    #endif
    
    boxSizer102->Add(m_textCtrlRemoteFolder, 0, wxALL|wxEXPAND, 5);
    
    boxSizer102->Add(0, 0, 1, wxALL, 5);
    
    m_stdBtnSizer104 = new wxStdDialogButtonSizer();
    
    boxSizer102->Add(m_stdBtnSizer104, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_buttonOK = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_buttonOK->SetDefault();
    m_stdBtnSizer104->AddButton(m_buttonOK);
    
    m_button108 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_stdBtnSizer104->AddButton(m_button108);
    m_stdBtnSizer104->Realize();
    
    SetName(wxT("SFTPUploadDialogBase"));
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    CentreOnParent(wxBOTH);
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_buttonOK->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPUploadDialogBase::OnOKUI), NULL, this);
    
}