您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ CentreOnParent函数代码示例

51自学网 2021-06-01 20:09:42
  C++
这篇教程C++ CentreOnParent函数代码示例写得很实用,希望能帮到您。

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

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


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例16: RestoreWindowState

MergeSummaryDialog::MergeSummaryDialog(wxWindow *parent){    wxXmlResource::Get()->LoadDialog(this, parent, "summary");    RestoreWindowState(this, wxDefaultSize, WinState_Size);    CentreOnParent();}
开发者ID:mfloryan,项目名称:poedit,代码行数:7,


示例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,


示例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,


示例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,


示例20: m_Project

// class constructorProjectOptionsDlg::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,


示例21: wxDialog

HelpPluginMessageBaseDlg::HelpPluginMessageBaseDlg(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);        wxC10DEInitBitmapResources();        bBitmapLoaded = true;    }        wxBoxSizer* boxSizer2 = new wxBoxSizer(wxVERTICAL);    this->SetSizer(boxSizer2);        wxFlexGridSizer* flexGridSizer12 = new wxFlexGridSizer(0, 2, 0, 0);    flexGridSizer12->SetFlexibleDirection( wxBOTH );    flexGridSizer12->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );        boxSizer2->Add(flexGridSizer12, 1, wxALL|wxEXPAND, 5);        m_staticBitmap14 = new wxStaticBitmap(this, wxID_ANY, wxXmlResource::Get()->LoadBitmap(wxT("error-64")), wxDefaultPosition, wxSize(-1,-1), 0 );        flexGridSizer12->Add(m_staticBitmap14, 0, wxALL, 5);        m_staticText = new wxStaticText(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0);        flexGridSizer12->Add(m_staticText, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);        m_hyperLink = new wxHyperlinkCtrl(this, wxID_ANY, _("Download Zeal"), wxT("http://www.codelite.org"), wxDefaultPosition, wxSize(-1,-1), wxHL_DEFAULT_STYLE);    m_hyperLink->SetNormalColour(wxColour(wxT("#0000FF")));    m_hyperLink->SetHoverColour(wxColour(wxT("#0000FF")));    m_hyperLink->SetVisitedColour(wxColour(wxT("#FF0000")));        boxSizer2->Add(m_hyperLink, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);        m_stdBtnSizer4 = new wxStdDialogButtonSizer();        boxSizer2->Add(m_stdBtnSizer4, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);        m_button6 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);    m_button6->SetDefault();    m_stdBtnSizer4->AddButton(m_button6);    m_stdBtnSizer4->Realize();        SetName(wxT("HelpPluginMessageBaseDlg"));    SetMinSize( wxSize(500,-1) );    SetSizeHints(500,-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}
开发者ID:292388900,项目名称:codelite,代码行数:58,


示例22: wxDialog

clGetTextFromUserBaseDialog::clGetTextFromUserBaseDialog(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);        wxC9D6CInitBitmapResources();        bBitmapLoaded = true;    }        wxBoxSizer* boxSizer135 = new wxBoxSizer(wxVERTICAL);    this->SetSizer(boxSizer135);        m_staticTextCaption = new wxStaticText(this, wxID_ANY, _("Caption"), wxDefaultPosition, wxSize(-1,-1), 0);        boxSizer135->Add(m_staticTextCaption, 0, wxALL, 5);        m_textCtrl = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(300,-1), 0);    m_textCtrl->SetFocus();    #if wxVERSION_NUMBER >= 3000    m_textCtrl->SetHint(wxT(""));    #endif        boxSizer135->Add(m_textCtrl, 0, wxALL|wxEXPAND, 5);        boxSizer135->Add(0, 0, 1, wxALL, 5);        m_stdBtnSizer137 = new wxStdDialogButtonSizer();        boxSizer135->Add(m_stdBtnSizer137, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 10);        m_buttonCancel = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);    m_stdBtnSizer137->AddButton(m_buttonCancel);        m_buttonOK = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0);    m_buttonOK->SetDefault();    m_stdBtnSizer137->AddButton(m_buttonOK);    m_stdBtnSizer137->Realize();        SetName(wxT("clGetTextFromUserBaseDialog"));    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:292388900,项目名称:codelite,代码行数:57,


示例23: NewClassBaseDlg

NewClassDlg::NewClassDlg(wxWindow* parent, IManager* mgr)    : NewClassBaseDlg(parent)    , m_selectedItem(wxNOT_FOUND)    , m_mgr(mgr){    NewClassDlgData data;    EditorConfigST::Get()->ReadObject(wxT("NewClassDlgData"), &data);    m_checkBoxCopyable->SetValue(data.GetFlags() & NewClassDlgData::NonCopyable);    m_checkBoxImplPureVirtual->SetValue(data.GetFlags() & NewClassDlgData::ImplAllPureVirtualFuncs);    m_checkBoxImplVirtual->SetValue(data.GetFlags() & NewClassDlgData::ImplAllVirtualFuncs);    m_checkBoxInline->SetValue(data.GetFlags() & NewClassDlgData::FileIniline);    m_checkBoxHpp->SetValue(data.GetFlags() & NewClassDlgData::HppHeader);    m_checkBoxSingleton->SetValue(data.GetFlags() & NewClassDlgData::Singleton);    m_checkBoxVirtualDtor->SetValue(data.GetFlags() & NewClassDlgData::VirtualDtor);    m_checkBoxPragmaOnce->SetValue(data.GetFlags() & NewClassDlgData::UsePragma);    // set two columns to our list    m_listCtrl1->InsertColumn(0, _("Name"));    m_listCtrl1->InsertColumn(1, _("Access"));    m_listCtrl1->InsertColumn(2, _("File"));    wxString vdPath;    TreeItemInfo item = mgr->GetSelectedTreeItemInfo(TreeFileView);    if(item.m_item.IsOk() && item.m_itemType == ProjectItem::TypeVirtualDirectory) {        wxString path = VirtualDirectorySelectorDlg::DoGetPath(m_mgr->GetTree(TreeFileView), item.m_item, false);        if(path.IsEmpty() == false) {            m_textCtrlVD->ChangeValue(path);        }    }    // set the class path to be the active project path    wxString errMsg;    if(m_mgr->GetWorkspace()) {        wxString start_path;        if(item.m_item.IsOk() && item.m_itemType == ProjectItem::TypeVirtualDirectory) {            m_basePath = item.m_fileName.GetPath(wxPATH_GET_VOLUME);        } else {            wxString projname = m_mgr->GetWorkspace()->GetActiveProjectName();            ProjectPtr proj = m_mgr->GetWorkspace()->FindProjectByName(projname, errMsg);            if(proj) {                m_basePath = proj->GetFileName().GetPath(wxPATH_GET_VOLUME);            }        }    }    DoUpdateGeneratedPath();    GetSizer()->Layout();    m_textClassName->SetFocus();    GetSizer()->Fit(this);    CentreOnParent();}
开发者ID:huan5765,项目名称:codelite-translate2chinese,代码行数:57,


示例24: ExternalToolBaseDlg

ExternalToolDlg::ExternalToolDlg(wxWindow* parent, IManager* mgr)    : ExternalToolBaseDlg(parent)    , m_item(wxNOT_FOUND)    , m_mgr(mgr){    Initialize();    m_listCtrlTools->SetFocus();    GetSizer()->Fit(this);    CentreOnParent();}
开发者ID:huan5765,项目名称:codelite-translate2chinese,代码行数:10,


示例25: SetSize

void ImageLoader::LoadImage(wxBitmap image){        int width = image.GetWidth();        int height = image.GetHeight();        Bitmap = image;        SetSize(width, height);        if ( centerOnParent ) {            CentreOnParent();        }}
开发者ID:phenix3443,项目名称:synecdoche,代码行数:10,



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


C++ CertCloseStore函数代码示例
C++ Centre函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。