• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ CentreOnParent函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中CentreOnParent函数的典型用法代码示例。如果您正苦于以下问题:C++ CentreOnParent函数的具体用法?C++ CentreOnParent怎么用?C++ CentreOnParent使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了CentreOnParent函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: base_coupon_calc_f

coupon_calc_f::coupon_calc_f( wxWindow* parent, double subtotal_, const wxString& cap1, const wxString& cap2 )
:
base_coupon_calc_f( parent ), subtotal_(subtotal_)
{
	procent_btn->SetLabel(cap1);
	money_btn->SetLabel(cap2);
	ok_btn->SetLabel(locale->get("coupon_calc_f", "ok_btn", "Ok"));
	cancel_btn->SetLabel(locale->get("coupon_calc_f", "cancel_btn", "Cancel"));
	clear_btn->SetLabel(locale->get("coupon_calc_f", "clear_btn", "Clear"));
	try
	{
		std::vector<wxButton*> type_group_vec;
		type_group_vec.push_back(procent_btn);
		type_group_vec.push_back(money_btn);

		type_toggle_group_ptr.reset
		(
		new toggle_group_t(procent_btn
	                   , type_group_vec
	                   , wxSystemSettings::GetColour( wxSYS_COLOUR_BTNSHADOW )
	                   , wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER )
	                   )
		);
		press_ = procent_btn;
		CentreOnParent();
		procent_ed->SetValue(to_uc(ksi_cafe::percent_t().format(0)));
		money_ed->SetValue(locale->get_currency(0));
	}
	catch (exception_t& ex)
	{
		wxMessageBox(to_uc(ex.comp_message()));
	}
	CentreOnParent();	
}
开发者ID:jumandan,项目名称:cafe,代码行数:34,代码来源:coupon_calc_f.cpp


示例2: wxDialog

SFTPManageBookmarkDlgBase::SFTPManageBookmarkDlgBase(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* boxSizer56 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer56);
    
    wxBoxSizer* boxSizer64 = new wxBoxSizer(wxHORIZONTAL);
    
    boxSizer56->Add(boxSizer64, 1, wxALL|wxEXPAND, 5);
    
    wxArrayString m_listBoxBookmarksArr;
    m_listBoxBookmarks = new wxListBox(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), m_listBoxBookmarksArr, wxLB_NEEDED_SB|wxLB_SINGLE);
    
    boxSizer64->Add(m_listBoxBookmarks, 1, wxALL|wxEXPAND, 5);
    
    wxBoxSizer* boxSizer68 = new wxBoxSizer(wxVERTICAL);
    
    boxSizer64->Add(boxSizer68, 0, wxEXPAND, 5);
    
    m_button70 = new wxButton(this, wxID_DELETE, _("Delete"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer68->Add(m_button70, 0, wxALL|wxEXPAND, 5);
    
    m_stdBtnSizer58 = new wxStdDialogButtonSizer();
    
    boxSizer56->Add(m_stdBtnSizer58, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_buttonOk = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_buttonOk->SetDefault();
    m_stdBtnSizer58->AddButton(m_buttonOk);
    
    m_buttonCancel = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);
    m_stdBtnSizer58->AddButton(m_buttonCancel);
    m_stdBtnSizer58->Realize();
    
    SetName(wxT("SFTPManageBookmarkDlgBase"));
    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_button70->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SFTPManageBookmarkDlgBase::OnDelete), NULL, this);
    m_button70->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(SFTPManageBookmarkDlgBase::OnDeleteUI), NULL, this);
    
}
开发者ID:huanghjb,项目名称:codelite,代码行数:60,代码来源:UI.cpp


示例3: wxDialog

CDialogWarnHistory::CDialogWarnHistory(
  wxWindow *parent, wxWindowID id) :
    wxDialog(parent,id,wxString(_T("Warning")))
{
  wxStaticText *pWarning = new wxStaticText(
    this,wxID_ANY,_T("Warning!"));
  wxStaticText *pHistory = new wxStaticText(this,wxID_ANY,_T(
    "The history setting is not set to \"current.\"\n"
    "Any changes will be reflected when saving the file\n"
    "but will not appear on the screen until the history\n"
    "setting is changed to \"current.\"\n\n"
    "Do you wish to continue?"
    ), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
  mainApp::SetBoldFont(pWarning);
  wxSizer *pButtons = CreateButtonSizer(wxYES | wxNO); 
  m_pCheckBox = new wxCheckBox(this,wxID_ANY,_T(" Don't show this window again"));
  m_pButtonNO = NULL;
  wxBoxSizer *pSizer = new wxBoxSizer(wxVERTICAL);

  pSizer->Add(pWarning, 0, (wxALL ^ wxBOTTOM) | wxALIGN_CENTRE_HORIZONTAL, ID_BORDER);
  pSizer->Add(pHistory, 0, (wxALL ^ wxTOP) | wxALIGN_CENTRE_HORIZONTAL, ID_BORDER);
  pSizer->Add(pButtons, 0,wxALL | wxALIGN_CENTRE_HORIZONTAL,ID_BORDER);
  pSizer->Add(m_pCheckBox,0,wxALIGN_LEFT | wxALL, ID_BORDER);
  SetSizer(pSizer);
  Layout();
  Fit();
  CentreOnParent();
  SetEscapeId(wxID_NO);
  SetAffirmativeId(wxID_YES);

}
开发者ID:ForensicBioinformatics,项目名称:osiris,代码行数:31,代码来源:CDialogWarnHistory.cpp


示例4: wxPanel

SFTPStatusPageBase::SFTPStatusPageBase(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* boxSizer2 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer2);
    
    m_dvListCtrl = new wxDataViewListCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(300,200), wxDV_SINGLE);
    
    boxSizer2->Add(m_dvListCtrl, 1, wxALL|wxEXPAND, 2);
    
    m_dvListCtrl->AppendTextColumn(_("Time"), wxDATAVIEW_CELL_INERT, 100, wxALIGN_LEFT);
    m_dvListCtrl->AppendBitmapColumn(_("Status"), m_dvListCtrl->GetColumnCount(), wxDATAVIEW_CELL_INERT, -2, wxALIGN_LEFT);
    m_dvListCtrl->AppendTextColumn(_("Account"), wxDATAVIEW_CELL_INERT, 150, wxALIGN_LEFT);
    m_dvListCtrl->AppendTextColumn(_("Message"), wxDATAVIEW_CELL_INERT, 600, wxALIGN_LEFT);
    
    SetName(wxT("SFTPStatusPageBase"));
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    CentreOnParent(wxBOTH);
    // Connect events
    m_dvListCtrl->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEventHandler(SFTPStatusPageBase::OnContentMenu), NULL, this);
    
}
开发者ID:huanghjb,项目名称:codelite,代码行数:32,代码来源:UI.cpp


示例5: wxPanel

clTreeCtrlPanelBase::clTreeCtrlPanelBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
    : wxPanel(parent, id, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxC9D6CInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    boxSizer151 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer151);
    
    m_treeCtrl = new clFileViewerTreeCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTR_DEFAULT_STYLE|wxTR_MULTIPLE|wxTR_HIDE_ROOT|wxTR_FULL_ROW_HIGHLIGHT|wxTR_NO_LINES|wxBORDER_STATIC);
    
    boxSizer151->Add(m_treeCtrl, 1, wxALL|wxEXPAND, 0);
    
    SetName(wxT("clTreeCtrlPanelBase"));
    SetSizeHints(500,300);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    CentreOnParent(wxBOTH);
    // Connect events
    m_treeCtrl->Connect(wxEVT_COMMAND_TREE_ITEM_EXPANDING, wxTreeEventHandler(clTreeCtrlPanelBase::OnItemExpanding), NULL, this);
    m_treeCtrl->Connect(wxEVT_COMMAND_TREE_ITEM_ACTIVATED, wxTreeEventHandler(clTreeCtrlPanelBase::OnItemActivated), NULL, this);
    m_treeCtrl->Connect(wxEVT_COMMAND_TREE_ITEM_MENU, wxTreeEventHandler(clTreeCtrlPanelBase::OnContextMenu), NULL, this);
    
}
开发者ID:since2014,项目名称:codelite,代码行数:29,代码来源:wxcrafter_plugin.cpp


示例6: assert

void cbConfigurationDialog::AttachConfigurationPanel(cbConfigurationPanel* panel)
{
    assert(panel);

    m_pPanel = panel;
    m_pPanel->Reparent(this);

    wxBoxSizer* bs = new wxBoxSizer(wxVERTICAL);
    bs->Add(m_pPanel, 1, wxGROW | wxRIGHT | wxTOP | wxBOTTOM, 8);

    wxStaticLine* line = new wxStaticLine(this);
    bs->Add(line, 0, wxGROW | wxLEFT | wxRIGHT, 8);

    m_pOK = new wxButton(this, wxID_OK, _("&OK"));
    m_pOK->SetDefault();
    m_pCancel = new wxButton(this, wxID_CANCEL, _("&Cancel"));
    wxStdDialogButtonSizer* but = new wxStdDialogButtonSizer;
    but->AddButton(m_pOK);
    but->AddButton(m_pCancel);
    but->Realize();
    bs->Add(but, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 8);

    SetSizer(bs);

    bs->SetSizeHints(this);
    CentreOnParent();
}
开发者ID:DowerChest,项目名称:codeblocks,代码行数:27,代码来源:configurationpanel.cpp


示例7: wxStaticText

void CDialogPromptNewerFile::Setup(const wxString &sPrompt, const wxChar *ButtonText[4])
{
  int nFlagLabel = wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL;
  int nFlagButton = wxEXPAND;

  wxStaticText *pPrompt = new wxStaticText(this,wxID_ANY,sPrompt);
  wxButton *pButtons[4];
  pButtons[0] = new wxButton(this,wxID_YES,"Yes");
  pButtons[1] = new wxButton(this,wxID_NO,"No");
  pButtons[2] = new wxButton(this,wxID_CANCEL,"Cancel");
  pButtons[3] = new wxButton(this,IDbuttonView,"View");
  wxBoxSizer *pSizerAll = new wxBoxSizer(wxVERTICAL);
  wxFlexGridSizer *pSizerButtons = new wxFlexGridSizer(4,2,ID_BORDER, ID_BORDER);
  for(size_t i = 0; i < 4; i++)
  {
    pSizerButtons->Add(
      pButtons[i],0,nFlagButton);
    pSizerButtons->Add(
      new wxStaticText(this,wxID_ANY,ButtonText[i]),
      1,nFlagLabel);
  }
  pSizerAll->Add(pPrompt,0,wxALL | wxALIGN_CENTRE_HORIZONTAL | wxALIGN_CENTRE_VERTICAL,ID_BORDER);
  pSizerAll->AddStretchSpacer(1);
  pSizerAll->Add(pSizerButtons,0,
    wxALL | wxALIGN_CENTRE_HORIZONTAL | wxALIGN_CENTRE_VERTICAL, 
    ID_BORDER);
  SetSizer(pSizerAll);
  Fit();
  CentreOnParent();
}
开发者ID:HelloWilliam,项目名称:osiris,代码行数:30,代码来源:CDialogPromptNewerFile.cpp


示例8: Create

void serverOperationsForm::CreateGUIControls( wxWindow* parent )
{
    //(*Initialize(serverOperationsForm)
    wxBoxSizer* BoxSizer2;
    wxBoxSizer* BoxSizer1;

    Create(parent, wxID_ANY, _("NFP - synchronizig data with server"), wxDefaultPosition, wxDefaultSize, wxSTAY_ON_TOP, _T("wxID_ANY"));
    BoxSizer1 = new wxBoxSizer(wxHORIZONTAL);
    Panel1 = new wxPanel(this, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL1"));
    BoxSizer2 = new wxBoxSizer(wxVERTICAL);
    label1 = new wxStaticText(Panel1, ID_label1, _("Synchronization with server is performed. Synchronization with server is performed.\nPlease wait..."), wxDefaultPosition, wxDefaultSize, 0, _T("ID_label1"));
    BoxSizer2->Add(label1, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    gauge = new wxGauge(Panel1, ID_GAUGE1, 100, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_GAUGE1"));
    BoxSizer2->Add(gauge, 0, wxTOP|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 10);
    label2 = new wxStaticText(Panel1, ID_label2, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, _T("ID_label2"));
    BoxSizer2->Add(label2, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    Panel1->SetSizer(BoxSizer2);
    BoxSizer2->Fit(Panel1);
    BoxSizer2->SetSizeHints(Panel1);
    BoxSizer1->Add(Panel1, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);
    SetSizer(BoxSizer1);
    timer.SetOwner(this, ID_TIMER);
    BoxSizer1->Fit(this);
    BoxSizer1->SetSizeHints(this);

    Connect(ID_TIMER,wxEVT_TIMER,(wxObjectEventFunction)&serverOperationsForm::updateProgress);
    Connect(wxID_ANY,wxEVT_INIT_DIALOG,(wxObjectEventFunction)&serverOperationsForm::onInit);
    //*)

    CentreOnParent();
    wxIcon wx_nfp_ICON( wx_nfp_xpm );
    SetIcon( wx_nfp_ICON );
}
开发者ID:gszura,项目名称:wx-nfp,代码行数:33,代码来源:serverOperationsForm.cpp


示例9: setProgress

/* SplashWindow::show
 * Shows the splash window with [message]. If [progress] is true, a
 * progress bar will also be shown
 *******************************************************************/
void SplashWindow::show(string message, bool progress, wxWindow* parent)
{
	// Setup progress bar
	int rheight = height;
	if (progress)
	{
		show_progress = true;
		setProgress(0.0f);
		rheight += 10;
	}
	else
		show_progress = false;

	// Set parent
	if (!parent && theApp->isInitialised())
		SetParent(theMainWindow);
	else
		SetParent(parent);

	// Show & init window
#ifndef __WXGTK__
	SetInitialSize(wxSize(width, rheight));
#else
	SetInitialSize(wxSize(width + 6, rheight + 6));
#endif
	setMessage(message);
	Show();
	CentreOnParent();
	forceRedraw();
}
开发者ID:devinacker,项目名称:SLADE,代码行数:34,代码来源:SplashWindow.cpp


示例10: wxDialog

CScopeSettingsDlgBase::CScopeSettingsDlgBase(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);
        wxC59CAInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* boxSizer10 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer10);
    
    wxFlexGridSizer* flexGridSizer18 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer18->SetFlexibleDirection( wxBOTH );
    flexGridSizer18->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    flexGridSizer18->AddGrowableCol(1);
    
    boxSizer10->Add(flexGridSizer18, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    m_staticText20 = new wxStaticText(this, wxID_ANY, _("CScope executable:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
    
    flexGridSizer18->Add(m_staticText20, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
    
    m_filePickerCScopeExe = new wxFilePickerCtrl(this, wxID_ANY, wxEmptyString, _("Select a file"), wxT("*"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxFLP_USE_TEXTCTRL|wxFLP_SMALL);
    m_filePickerCScopeExe->SetToolTip(_("Set the path to cscope executable"));
    m_filePickerCScopeExe->SetFocus();
    
    flexGridSizer18->Add(m_filePickerCScopeExe, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    m_stdBtnSizer12 = new wxStdDialogButtonSizer();
    
    boxSizer10->Add(m_stdBtnSizer12, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));
    
    m_button14 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_button14->SetDefault();
    m_stdBtnSizer12->AddButton(m_button14);
    
    m_button16 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_stdBtnSizer12->AddButton(m_button16);
    m_stdBtnSizer12->Realize();
    
    SetName(wxT("CScopeSettingsDlgBase"));
    SetSize(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
}
开发者ID:lpc1996,项目名称:codelite,代码行数:60,代码来源:CscopeTabBase.cpp


示例11: wxPanel

LLDBThreadsViewBase::LLDBThreadsViewBase(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);
        wxCrafternz79PnInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* boxSizer115 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer115);
    
    m_dvListCtrlThreads = new wxDataViewListCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxDV_ROW_LINES|wxDV_SINGLE);
    
    boxSizer115->Add(m_dvListCtrlThreads, 1, wxALL|wxEXPAND, 2);
    
    m_dvListCtrlThreads->AppendTextColumn(_("#"), wxDATAVIEW_CELL_INERT, 70, wxALIGN_LEFT);
    m_dvListCtrlThreads->AppendTextColumn(_("Stop Reason"), wxDATAVIEW_CELL_INERT, 100, wxALIGN_LEFT);
    m_dvListCtrlThreads->AppendTextColumn(_("Function"), wxDATAVIEW_CELL_INERT, 150, wxALIGN_LEFT);
    m_dvListCtrlThreads->AppendTextColumn(_("File"), wxDATAVIEW_CELL_INERT, 200, wxALIGN_LEFT);
    m_dvListCtrlThreads->AppendTextColumn(_("Line"), wxDATAVIEW_CELL_INERT, 40, wxALIGN_LEFT);
    
    SetName(wxT("LLDBThreadsViewBase"));
    SetSizeHints(500,300);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    CentreOnParent(wxBOTH);
    // Connect events
    m_dvListCtrlThreads->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler(LLDBThreadsViewBase::OnItemActivated), NULL, this);
    
}
开发者ID:GaganJotSingh,项目名称:codelite,代码行数:33,代码来源:UI.cpp


示例12: FindInFilesDialogBase

FindInFilesDialog::FindInFilesDialog(wxWindow* parent, const wxString& dataName)
    : FindInFilesDialogBase(parent, wxID_ANY)
{
    m_data.SetName(dataName);

    // Store the find-in-files data
    clConfig::Get().ReadItem(&m_data);

    wxArrayString choices;
    size_t count = m_data.GetSearchPaths().GetCount();
    for(size_t i = 0; i < count; ++i) {
        choices.Add(m_data.GetSearchPaths().Item(i));
    }
    DoAddSearchPaths(choices);

    // Search for
    m_findString->Clear();
    m_findString->Append(m_data.GetFindStringArr());
    m_findString->SetValue(m_data.GetFindString());

    m_fileTypes->SetSelection(0);

    m_matchCase->SetValue(m_data.GetFlags() & wxFRD_MATCHCASE);
    m_matchWholeWord->SetValue(m_data.GetFlags() & wxFRD_MATCHWHOLEWORD);
    m_regualrExpression->SetValue(m_data.GetFlags() & wxFRD_REGULAREXPRESSION);
    m_checkBoxSaveFilesBeforeSearching->SetValue(m_data.GetFlags() & wxFRD_SAVE_BEFORE_SEARCH);
    
    // Set encoding
    wxArrayString astrEncodings;
    wxFontEncoding fontEnc;
    int selection(0);

    size_t iEncCnt = wxFontMapper::GetSupportedEncodingsCount();
    for(size_t i = 0; i < iEncCnt; i++) {
        fontEnc = wxFontMapper::GetEncoding(i);
        if(wxFONTENCODING_SYSTEM == fontEnc) { // skip system, it is changed to UTF-8 in optionsconfig
            continue;
        }
        wxString encodingName = wxFontMapper::GetEncodingName(fontEnc);
        size_t pos = astrEncodings.Add(encodingName);

        if(m_data.GetEncoding() == encodingName) {
            selection = static_cast<int>(pos);
        }
    }

    m_choiceEncoding->Append(astrEncodings);
    if(m_choiceEncoding->IsEmpty() == false) {
        m_choiceEncoding->SetSelection(selection);
    }

    // Set the file mask
    DoSetFileMask();

    GetSizer()->Fit(this);
    CentreOnParent();

    SetName("FindInFilesDialog");
    WindowAttrManager::Load(this);
}
开发者ID:pengshp,项目名称:codelite,代码行数:60,代码来源:findinfilesdlg.cpp


示例13: wxDialog

ChooseSemaphore::ChooseSemaphore(wxWindow *parent, JMLib *j, PatternLoader *s)
	: wxDialog(parent, -1, _T("Show Semaphore"),
			wxDefaultPosition, wxDefaultSize,
			wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER) {

  jmlib = j;
  semaphores = s;

  newsemaphore = new wxTextCtrl(this,-1,wxString(jmlib->getStyle(),wxConvUTF8),wxDefaultPosition,wxDefaultSize);

  wxButton *ok = new wxButton(this, wxID_OK, _T("OK"));
  wxButton *apply = new wxButton(this, wxID_APPLY,_T("Apply"));
  wxButton *cancel = new wxButton(this, wxID_CANCEL, _T("Cancel"));
  wxBoxSizer *buttonsizer = new wxBoxSizer(wxHORIZONTAL);
  buttonsizer->Add(ok, 1, wxALIGN_CENTRE|wxALL, 5);
  buttonsizer->Add(apply, 1, wxALIGN_CENTRE|wxALL, 5);
  buttonsizer->Add(cancel, 1, wxALIGN_CENTRE|wxALL, 5);

  wxBoxSizer *toplevel = new wxBoxSizer(wxVERTICAL);
  toplevel->Add(newsemaphore,0,wxALIGN_CENTER|wxEXPAND|wxALL,5);
  toplevel->Add(buttonsizer,0,wxALIGN_CENTER|wxEXPAND|wxALL,5);

  toplevel->Fit( this );
  toplevel->SetSizeHints( this );

  SetSizer(toplevel);
  SetAutoLayout(TRUE);
  // SetSize(-1,parent->GetSize().y - 30);
  Layout();
  CentreOnParent();
  ShowModal();
}
开发者ID:amiel,项目名称:jugglemaster,代码行数:32,代码来源:newsemaphore.cpp


示例14: clAboutDialogBase

clAboutDialog::clAboutDialog(wxWindow* parent, const wxString& version)
    : clAboutDialogBase(parent)
{
    m_staticTextVersion->SetLabel(version);
    // Load the license file
    wxFileName license(clStandardPaths::Get().GetDataDir(), "LICENSE");
    wxString fileContent;
    FileUtils::ReadFileContent(license, fileContent);
    LexerConf::Ptr_t lexer = ColoursAndFontsManager::Get().GetLexer("text");
    if(lexer) {
        lexer->Apply(m_stcLicense);
        lexer->Apply(m_stcCredits);
    }

    // Set the license file
    m_stcLicense->SetText(fileContent);
    m_stcLicense->SetReadOnly(true);

    // Set the credits
    wxString credits;

    credits << "\n==============================\n\n";
    credits << _("Eran Ifrah (Project admin)") << "\n";
    credits << _("David G. Hart") << "\n\n";
    credits << "==============================\n\n";
    credits << _("Frank Lichtner") << "\n";
    credits << _("Jacek Kucharski") << "\n";
    credits << _("Marrianne Gagnon") << "\n";
    credits << _("Scott Dolim") << "\n";
    m_stcCredits->SetText(credits);
    m_stcCredits->SetReadOnly(true);
    CentreOnParent();
    GetSizer()->Fit(this);
}
开发者ID:eranif,项目名称:codelite,代码行数:34,代码来源:clAboutDialog.cpp


示例15: CreateReposDlgBase

CreateReposDlg::CreateReposDlg(wxWindow * parent)
  : CreateReposDlgBase(parent)
{
  m = new Data();

  m_choiceType->SetSelection(TYPE_FSFS);
  m_choiceCompat->SetSelection(COMPAT_DEFAULT);
  m_checkAddBookmark->SetValue(true);
  m_notebook->SetSelection(0);

  {
    HistoryValidator val(HISTORY_CREATE_REPOS_DIRECTORY);
    m_comboDir->SetValidator(val);
  }
  {
    HistoryValidator val(HISTORY_CREATE_REPOS_NAME);
    m_comboName->SetValidator(val);
  }
  {
    HistoryValidator val(HISTORY_CREATE_REPOS_CONFIG_DIRECTORY);
    m_comboConfigDir->SetValidator(val);
  }

  // TODO all this stuff doesnt work. Dont know why :-(
  // m_comboDirectory->SetMinSize(wxSize(GetCharWidth() * 60, GetCharHeight()));
  // m_rootSizer->SetSizeHints(this);
  // m_rootSizer->Fit(this);
  // 
  // Layout();
  CentreOnParent();

  CheckValues();
}
开发者ID:aka2006,项目名称:RapidSVN,代码行数:33,代码来源:create_repos_dlg.cpp


示例16: RestoreWindowState

MergeSummaryDialog::MergeSummaryDialog(wxWindow *parent)
{
    wxXmlResource::Get()->LoadDialog(this, parent, "summary");

    RestoreWindowState(this, wxDefaultSize, WinState_Size);
    CentreOnParent();
}
开发者ID:mfloryan,项目名称:poedit,代码行数:7,代码来源:summarydlg.cpp


示例17: DestinationDlgBase

DestinationDlg::DestinationDlg(wxWindow* parent,
                               const wxString & title,
                               const wxString & descr,
                               int flags,
                               const wxString & dst,
                               const wxString & history)
  : DestinationDlgBase(parent, -1, title)
{
  m = new Data(flags, dst, history);

  // The destination:
  if (m->history.IsEmpty())
    m_comboDestination->SetValidator(wxGenericValidator(&m->destination));
  else
    m_comboDestination->SetValidator(HistoryValidator(m->history, &m->destination, false, false));

  m_staticQuestion->SetLabel(descr);
  m_checkForce->SetValidator(wxGenericValidator(&m->force));

  if (!m->withForce)
    m_checkForce->Show(false);
  
  m_mainSizer->SetSizeHints(this);
  m_mainSizer->Fit(this);

  Layout();
  CentreOnParent();

  CheckControls();
}
开发者ID:aka2006,项目名称:RapidSVN,代码行数:30,代码来源:destination_dlg.cpp


示例18: MessageDlgBaseClass

MessageDlg::MessageDlg(wxWindow* parent, const wxString& msg, const wxString& title)
    : MessageDlgBaseClass(parent)
{
    SetMessage(msg);
    SetTitle(title);
    GetSizer()->Fit(this);
    CentreOnParent();
}
开发者ID:eranif,项目名称:codelite,代码行数:8,代码来源:MessageDlg.cpp


示例19: base_count_f

count_f::count_f( wxWindow* parent, const wxString& caption, int min_, int max_, int cur_val_ )
:
base_count_f( parent ), min_(min_), max_(max_), cur_val_(cur_val_)
{
	SetLabel(caption);
	val_ed->SetValue(to_uc(boost::lexical_cast<std::string>(cur_val_)));
	CentreOnParent();
}
开发者ID:jumandan,项目名称:cafe,代码行数:8,代码来源:count_f.cpp


示例20: m_Project

// class constructor
ProjectOptionsDlg::ProjectOptionsDlg(wxWindow* parent, cbProject* project)
    : m_Project(project),
    m_Current_Sel(-1),
    m_pCompiler(0L)
{
    wxXmlResource::Get()->LoadObject(this, parent, _T("dlgProjectOptions"),_T("wxScrollingDialog"));

    wxCheckListBox* list = XRCCTRL(*this, "lstFiles", wxCheckListBox);
    int count = m_Project->GetFilesCount();
    for (int i = 0; i < count; ++i)
    {
        ProjectFile* pf = m_Project->GetFile(i);
        list->Append(pf->relativeFilename);
    }
    // this fixes the minsize of the file list
    // which becomes huge when we add items in it (!)
    list->SetMinSize(wxSize(50,50));

    // general
    XRCCTRL(*this, "txtProjectName", wxTextCtrl)->SetValue(m_Project->GetTitle());
    XRCCTRL(*this, "txtProjectFilename", wxStaticText)->SetLabel(m_Project->GetFilename());
    XRCCTRL(*this, "txtProjectMakefile", wxTextCtrl)->SetValue(m_Project->GetMakefile());
    XRCCTRL(*this, "chkCustomMakefile", wxCheckBox)->SetValue(m_Project->IsMakefileCustom());
    XRCCTRL(*this, "txtExecutionDir", wxTextCtrl)->SetValue(m_Project->GetMakefileExecutionDir());
    XRCCTRL(*this, "txtMakeTool", wxTextCtrl)->SetValue(m_Project->GetMakeTool());
    XRCCTRL(*this, "rbPCHStrategy", wxRadioBox)->SetSelection((int)m_Project->GetModeForPCH());

    Compiler* compiler = CompilerFactory::GetCompiler(project->GetCompilerID());
    bool hasPCH = compiler && compiler->GetSwitches().supportsPCH;
    XRCCTRL(*this, "rbPCHStrategy", wxRadioBox)->Enable(hasPCH);

    XRCCTRL(*this, "chkExtendedObjNames", wxCheckBox)->SetValue(m_Project->GetExtendedObjectNamesGeneration());
    XRCCTRL(*this, "chkNoForceObjectLowCase", wxCheckBox)->SetValue(m_Project->GetForceLowerCaseObject());

    XRCCTRL(*this, "chkShowNotes", wxCheckBox)->SetValue(m_Project->GetShowNotesOnLoad());
    XRCCTRL(*this, "txtNotes", wxTextCtrl)->SetValue(m_Project->GetNotes());

    FillBuildTargets();

    PluginsArray plugins = Manager::Get()->GetPluginManager()->GetCompilerOffers();
    if (plugins.GetCount())
        m_pCompiler = (cbCompilerPlugin*)plugins[0];

    // scripts
    BuildScriptsTree();

    // make sure everything is laid out properly
    // before adding panels from plugins
    // we don't want the dialog to become huge ;)
    // note that a similar situation in editor settings had been solved by commenting
    // the following line out...
    GetSizer()->SetSizeHints(this);

    // other plugins configuration
    AddPluginPanels();

    CentreOnParent();
}
开发者ID:stahta01,项目名称:EmBlocks,代码行数:59,代码来源:projectoptionsdlg.cpp



注:本文中的CentreOnParent函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ CertCloseStore函数代码示例发布时间:2022-05-30
下一篇:
C++ Centre函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap