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

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

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

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

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

示例1: SetExtraStyle

bool CMProgressDialog::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ){////@begin CMProgressDialog member initialisation    m_textMessage = NULL;    m_progress = NULL;////@end CMProgressDialog member initialisation////@begin CMProgressDialog creation    SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);    wxDialog::Create( parent, id, caption, pos, size, style );    CreateControls();    GetSizer()->Fit(this);    GetSizer()->SetSizeHints(this);    Centre();////@end CMProgressDialog creation        m_cancelPressed = false;    m_cancelling = false;    return TRUE;}
开发者ID:AlexeyS,项目名称:cmake,代码行数:22,


示例2: SetExtraStyle

bool WinEDA_SheetPropertiesFrame::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ){////@begin WinEDA_SheetPropertiesFrame member initialisation    m_FileNameWin = NULL;    m_SheetNameWin = NULL;    m_FileNameTextSize = NULL;    m_FileNameSize = NULL;    m_SheetNameTextSize = NULL;    m_SheetNameSize = NULL;////@end WinEDA_SheetPropertiesFrame member initialisation////@begin WinEDA_SheetPropertiesFrame creation    SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);    wxDialog::Create( parent, id, caption, pos, size, style );    CreateControls();    GetSizer()->Fit(this);    GetSizer()->SetSizeHints(this);    Centre();////@end WinEDA_SheetPropertiesFrame creation    return true;}
开发者ID:BackupTheBerlios,项目名称:kicad-svn,代码行数:22,


示例3: wxBoxSizer

RemoteControlRequestDialog::RemoteControlRequestDialog(const wxString& title, const wxString& controller)    :wxDialog(NULL, wxID_ANY, title),mRequestController(controller){    wxSizer * const sizerTop = new wxBoxSizer(wxVERTICAL);    wxSizerFlags flags;    flags.Border(wxALL, 10);    sizerTop->Add(new wxStaticText                      (this,                        wxID_ANY,                        controller + wxT("请求远程控制您的计算机。")                      ), flags);    //sizerTop->AddStretchSpacer()->SetBorder(10);    sizerTop->Fit(this);    wxSizer * const sizerBtns = new wxBoxSizer(wxHORIZONTAL);    sizerBtns->Add(new wxButton(this, ID_BTNACCEPT, wxT("同 意")), flags);    sizerBtns->Add(new wxButton(this, ID_BTNDENY, wxT("拒 绝")), flags);    sizerBtns->AddStretchSpacer()->SetMinSize(wxSize(-1, -1));    sizerTop->Add(sizerBtns, flags.Align(wxALIGN_CENTER_HORIZONTAL));    SetSizerAndFit(sizerTop);    Centre();}
开发者ID:shiqiang1987,项目名称:taskbar,代码行数:22,


示例4: WXUNUSED

bool ShareProperties::Create( wxWindow* parent, wxWindowID WXUNUSED(id), const wxString& WXUNUSED(caption), const wxPoint& WXUNUSED(pos), const wxSize& WXUNUSED(size), long WXUNUSED(style) ){    ////@begin ShareProperties member initialisation    m_bCupsPublic = false;    m_bSmbPublic = false;    m_sCupsDriver = wxT("cups driver");    m_sSmbDiskUsername = ::wxGetUserId();    m_sSmbPrintUsername = ::wxGetUserId();    m_pCtrlLocalShares = NULL;    m_pCtrlSmbPrintOptions = NULL;    m_pCtrlSmbDriver = NULL;    m_pCtrlSmbPrivate = NULL;    m_pCtrlSmbPublic = NULL;    m_pCtrlSmbPrintUsername = NULL;    m_pCtrlSmbPrintPassword = NULL;    m_pCtrlCupsOptions = NULL;    m_pCtrlCupsPrivate = NULL;    m_pCtrlCupsPublic = NULL;    m_pCtrlUsbOptions = NULL;    m_pCtrlSmbDiskOptions = NULL;    m_pCtrlMountPoint = NULL;    m_pCtrlUsername = NULL;    m_pCtrlPassword = NULL;    ////@end ShareProperties member initialisation    ////@begin ShareProperties creation    SetExtraStyle(wxWS_EX_VALIDATE_RECURSIVELY|wxWS_EX_BLOCK_EVENTS|wxDIALOG_EX_CONTEXTHELP);    SetParent(parent);    CreateControls();    SetIcon(GetIconResource(wxT("res/nx.png")));    if (GetSizer())    {        GetSizer()->SetSizeHints(this);    }    Centre();    ////@end ShareProperties creation    ::wxGetApp().EnableContextHelp(this);    return TRUE;}
开发者ID:aidan-g,项目名称:opennx,代码行数:39,


示例5: CreateControls

bool wxMainFrame::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ){////@begin wxMainFrame member initialisation    MainToolBar = NULL;////@end wxMainFrame member initialisation////@begin wxMainFrame creation    wxFrame::Create( parent, id, caption, pos, size, style );    CreateControls();    Centre();////@end wxMainFrame creation    m_LoginWnd=new wxLoginDialog(this);    m_LoginWnd->Hide();    m_ChatWnd=new wxChatDialog(this);    m_ChatWnd->SetSizeHints(566,368);    m_ChatWnd->Layout();    m_ChatWnd->Hide();    m_DeckWnd=new wxDeckDialog(this);    m_DeckWnd->SetSizeHints(652,368);    m_DeckWnd->Layout();    m_DeckWnd->Hide();    m_InfoWnd=new wxInfoDialog(this);    m_InfoWnd->Hide();    m_DuelWnd=new wxDuelDialog(this);    m_DuelWnd->Hide();    m_ActiveWnd=m_LoginWnd;    m_mainsizer=(wxFlexGridSizer*)GetSizer();    m_mainsizer->Add(m_ActiveWnd, 1, wxALIGN_LEFT|wxEXPAND|wxALL);    m_ActiveWnd->Show();    Layout();    m_TEDProtocol=new TEDProtocol(*this, SOCKET_ID);    m_LoginWnd->m_TEDProtocol=m_TEDProtocol;    m_ChatWnd->m_TEDProtocol=m_TEDProtocol;    m_DeckWnd->m_TEDProtocol=m_TEDProtocol;    m_DuelWnd->m_TEDProtocol=m_TEDProtocol;    return TRUE;}
开发者ID:BackupTheBerlios,项目名称:nted-svn,代码行数:38,


示例6: wxFlexGridSizer

void gui_connect::do_layout(){    // begin wxGlade: gui_connect::do_layout    wxFlexGridSizer* grid_connect_main = new wxFlexGridSizer(4, 3, 0, 0);    wxBoxSizer* sizer_connect_helpBox = new wxBoxSizer(wxVERTICAL);    wxGridSizer* grid_connect_loginInfo = new wxGridSizer(6, 2, 3, 0);    grid_connect_main->Add(10, 10, 0, 0, 0);    grid_connect_main->Add(200, 10, 0, 0, 0);    grid_connect_main->Add(10, 10, 0, 0, 0);    grid_connect_main->Add(10, 100, 0, 0, 0);    grid_connect_loginInfo->Add(label_connect_name, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);    grid_connect_loginInfo->Add(text_connect_nameData, 0, wxFIXED_MINSIZE, 0);    grid_connect_loginInfo->Add(label_connect_password, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);    grid_connect_loginInfo->Add(text_connect_passwordData, 0, wxFIXED_MINSIZE, 0);    grid_connect_loginInfo->Add(checkbox_connect_rememberLogin, 0, wxALIGN_RIGHT|wxALIGN_CENTER_HORIZONTAL, 0);    grid_connect_loginInfo->Add(label_connect_rememberLogin, 0, 0, 0);    grid_connect_loginInfo->Add(button_connect_login, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);    grid_connect_loginInfo->Add(button_connect_register, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);    grid_connect_main->Add(grid_connect_loginInfo, 0, wxALIGN_CENTER_HORIZONTAL|wxSHAPED, 0);    grid_connect_main->Add(10, 100, 0, 0, 0);    grid_connect_main->Add(10, 100, 0, 0, 0);    sizer_connect_helpBox->Add(20, 5, 0, 0, 0);    sizer_connect_helpBox->Add(static_line_1, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 0);    sizer_connect_helpBox->Add(20, 8, 0, 0, 0);    sizer_connect_helpBox->Add(text_connect_helpBox, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 0);    grid_connect_main->Add(sizer_connect_helpBox, 2, wxEXPAND, 0);    grid_connect_main->Add(10, 100, 0, 0, 0);    grid_connect_main->Add(10, 10, 0, 0, 0);    grid_connect_main->Add(200, 10, 0, 0, 0);    grid_connect_main->Add(10, 10, 0, 0, 0);    SetAutoLayout(true);    SetSizer(grid_connect_main);    grid_connect_main->Fit(this);    grid_connect_main->SetSizeHints(this);    Layout();    Centre();    // end wxGlade}
开发者ID:genxinzou,项目名称:svn-spring-archive,代码行数:38,


示例7: GetOCPNScaledFont

bool S57QueryDialog::Create( wxWindow* parent, wxWindowID id, const wxString& caption,                             const wxPoint& pos, const wxSize& size, long style ){    //    As a display optimization....    //    if current color scheme is other than DAY,    //    Then create the dialog ..WITHOUT.. borders and title bar.    //    This way, any window decorations set by external themes, etc    //    will not detract from night-vision    long wstyle = wxDEFAULT_FRAME_STYLE;#ifdef __WXOSX__    wstyle |= wxSTAY_ON_TOP;#endif        if( ( global_color_scheme != GLOBAL_COLOR_SCHEME_DAY )            && ( global_color_scheme != GLOBAL_COLOR_SCHEME_RGB ) ) wstyle |= ( wxNO_BORDER );    if( !wxDialog::Create( parent, id, caption, pos, size, wstyle ) ) return false;    wxFont *dFont = GetOCPNScaledFont(_("ObjectQuery"));    SetFont( *dFont );    CreateControls();// This ensures that the dialog cannot be sized smaller// than the minimum size    GetSizer()->SetSizeHints( this );// Explicitely set the size    SetSize( size );// Centre the dialog on the parent or (if none) screen    Centre();    DimeControl( this );    return true;}
开发者ID:libai245,项目名称:wht1,代码行数:38,


示例8: SetExtraStyle

bool WinEDA_PadPropertiesFrame::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ){////@begin WinEDA_PadPropertiesFrame member initialisation    m_LeftBoxSizer = NULL;    m_PadNumCtrl = NULL;    m_PadNetNameCtrl = NULL;    m_PadSizeBoxSizer = NULL;    m_PadDeltaBoxSizer = NULL;    m_PadOffsetBoxSizer = NULL;    m_PadOrient = NULL;    m_PadShape = NULL;    m_PadType = NULL;    m_PadLayerCu = NULL;    m_PadLayerCmp = NULL;    m_PadLayerAdhCmp = NULL;    m_PadLayerAdhCu = NULL;    m_PadLayerPateCmp = NULL;    m_PadLayerPateCu = NULL;    m_PadLayerSilkCmp = NULL;    m_PadLayerSilkCu = NULL;    m_PadLayerMaskCmp = NULL;    m_PadLayerMaskCu = NULL;    m_PadLayerECO1 = NULL;    m_PadLayerECO2 = NULL;    m_PadLayerDraft = NULL;////@end WinEDA_PadPropertiesFrame member initialisation////@begin WinEDA_PadPropertiesFrame creation    SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);    wxDialog::Create( parent, id, caption, pos, size, style );    CreateControls();    GetSizer()->Fit(this);    GetSizer()->SetSizeHints(this);    Centre();////@end WinEDA_PadPropertiesFrame creation    return true;}
开发者ID:BackupTheBerlios,项目名称:kicad-svn,代码行数:38,


示例9: SetExtraStyle

bool CSafeCombinationChange::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ){////@begin CSafeCombinationChange creation  SetExtraStyle(wxWS_EX_BLOCK_EVENTS);  wxDialog::Create( parent, id, caption, pos, size, style );  CreateControls();  if (GetSizer())  {    GetSizer()->SetSizeHints(this);  }  Centre();////@end CSafeCombinationChange creation#ifndef NO_YUBI  m_yubiMixin1.SetupMixin(FindWindow(ID_YUBIBTN), FindWindow(ID_YUBISTATUS));  m_yubiMixin1.SetPrompt1(_("Enter old safe combination (if any) and click on top Yubikey button"));  m_yubiMixin2.SetupMixin(FindWindow(ID_YUBIBTN2), FindWindow(ID_YUBISTATUS));  m_yubiMixin2.SetPrompt1(_("Enter old safe combination (if any) and click on top Yubikey button"));  m_pollingTimer = new wxTimer(this, CYubiMixin::POLLING_TIMER_ID);  m_pollingTimer->Start(500); // check for Yubikey every 500ms (250 is too often when we have 2 yubiMixins)#endif  return true;}
开发者ID:NonPlayerCharactor,项目名称:PasswordSafeFork,代码行数:23,


示例10: wxFrame

CMainFrame::CMainFrame(const wxString& title)	: wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(854, 768)){	// menubar	wxMenuBar * pMenubar = new wxMenuBar();	wxMenu * pMenuFile = new wxMenu();	pMenuFile->Append(wxID_EXIT, wxT("&Quit"));	Connect(wxID_EXIT,		wxEVT_COMMAND_MENU_SELECTED,		wxCommandEventHandler(CMainFrame::__OnQuit));	pMenubar->Append(pMenuFile, wxT("&File"));	this->SetMenuBar(pMenubar);	// statusbar	this->CreateStatusBar();	// panel	m_pPanel = new CMainPanel(this);	m_pPanel->SetFocus();	// position	Centre();}
开发者ID:walkthetalk,项目名称:gamewar,代码行数:23,


示例11: wxDialog

FindCmdDlg::FindCmdDlg(wxWindow *parent,  const vector<const tmAction*>& actions):	wxDialog (parent, -1, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER), m_actions(actions) {	SetTitle (_("Select Bundle Item"));	// Create Layout	wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL);	// Search Box	m_searchCtrl = new wxTextCtrl(this, CTRL_SEARCH, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER);	mainSizer->Add(m_searchCtrl, 0, wxEXPAND);	// Command List	m_cmdList = new ActionList(this, CTRL_ALIST, m_actions);	mainSizer->Add(m_cmdList, 1, wxEXPAND);	// Set new evtHandler to intercept up/down & escape	m_searchCtrl->PushEventHandler(new SearchEvtHandler(*this, *m_cmdList));	SetSizer(mainSizer);	SetSize(400, 500);	Centre();}
开发者ID:khmerlovers,项目名称:e,代码行数:23,


示例12: DIALOG_PAGES_SETTINGS_BASE

DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS( EDA_DRAW_FRAME* parent, wxSize aMaxUserSizeMils ) :    DIALOG_PAGES_SETTINGS_BASE( parent ),    m_initialized( false ),    m_customSizeX( parent, m_userSizeXLabel, m_userSizeXCtrl, m_userSizeXUnits, false ),    m_customSizeY( parent, m_userSizeYLabel, m_userSizeYCtrl, m_userSizeYUnits, false ){    m_parent   = parent;    m_screen   = m_parent->GetScreen();    m_projectPath = Prj().GetProjectPath();    m_page_bitmap = NULL;    m_maxPageSizeMils = aMaxUserSizeMils;    m_tb = m_parent->GetTitleBlock();    m_customFmt = false;    m_localPrjConfigChanged = false;    m_pagelayout = NULL;    m_PickDate->SetValue( wxDateTime::Now() );    initDialog();    GetSizer()->SetSizeHints( this );    Centre();}
开发者ID:Lotharyx,项目名称:kicad-source-mirror,代码行数:23,


示例13: wxBoxSizer

void LoginWindow::do_layout(){    // begin wxGlade: LoginWindow::do_layout    wxBoxSizer* sizer_4 = new wxBoxSizer(wxVERTICAL);    wxBoxSizer* sizer_9 = new wxBoxSizer(wxVERTICAL);    wxBoxSizer* sizer_8 = new wxBoxSizer(wxHORIZONTAL);    sizer_9->Add(labelServer, 0, 0, 0);    sizer_9->Add(textServer, 0, wxEXPAND, 0);    sizer_9->Add(labelUser, 0, wxTOP, 10);    sizer_9->Add(textUser, 0, wxEXPAND, 0);    sizer_9->Add(labelPassword, 0, wxTOP, 10);    sizer_9->Add(textPassword, 0, wxEXPAND, 0);    sizer_8->Add(buttonRegister, 0, wxLEFT|wxRIGHT|wxALIGN_BOTTOM, 10);    sizer_8->Add(buttonLogin, 0, wxALIGN_BOTTOM, 0);    sizer_9->Add(sizer_8, 1, wxTOP|wxALIGN_CENTER_HORIZONTAL, 10);    sizer_4->Add(sizer_9, 1, wxALL|wxEXPAND, 10);    SetSizer(sizer_4);    sizer_4->Fit(this);    sizer_4->SetSizeHints(this);    Layout();    Centre();    // end wxGlade}
开发者ID:Mooore,项目名称:ipp2008,代码行数:23,


示例14: wxPanel

wxFlatButtonBarBase::wxFlatButtonBarBase(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);        wxC9ED9InitBitmapResources();        bBitmapLoaded = true;    }        m_mainSizer = new wxBoxSizer(wxHORIZONTAL);    this->SetSizer(m_mainSizer);        SetSizeHints(-1,-1);    if ( GetSizer() ) {         GetSizer()->Fit(this);    }    Centre(wxBOTH);    // Connect events    this->Connect(wxEVT_PAINT, wxPaintEventHandler(wxFlatButtonBarBase::OnPaint), NULL, this);    this->Connect(wxEVT_SIZE, wxSizeEventHandler(wxFlatButtonBarBase::OnSize), NULL, this);    }
开发者ID:LoviPanda,项目名称:codelite,代码行数:23,


示例15: SetExtraStyle

bool mmAssetDialog::Create(wxWindow* parent    , wxWindowID id    , const wxString& caption    , const wxPoint& pos    , const wxSize& size    , long style){    SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);    if (!wxDialog::Create(parent, id, caption, pos, size, style))        return false;    CreateControls();    GetSizer()->Fit(this);    GetSizer()->SetSizeHints(this);    SetIcon(mmex::getProgramIcon());    dataToControls();    Centre();    return true;}
开发者ID:Maurizio13,项目名称:moneymanagerex,代码行数:23,


示例16: WXUNUSED

PGWAbout::PGWAbout(wxWindow* parent, int id, const wxString& title, const wxPoint& pos, const wxSize& size, long WXUNUSED(style))    : wxDialog(parent, id, title, pos, size, wxDEFAULT_DIALOG_STYLE){    // begin wxGlade: PGWAbout::PGWAbout    bitmapIcon = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap);    bitmapWeb = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap);    hyperlink1 = new wxHyperlinkCtrl(this, wxID_ANY, _("Visit http://panthema.net/2009/cryptote/"), _("http://panthema.net/2009/cryptote/"), wxDefaultPosition, wxDefaultSize, wxNO_BORDER | wxHL_CONTEXTMENU | wxHL_ALIGN_LEFT);    buttonOK = new wxButton(this, wxID_OK, wxEmptyString);    set_properties();    do_layout();    // end wxGlade    #include "art/pwgen-48.h"    bitmapIcon->SetBitmap(wxBitmapFromMemory(pwgen_48_png));    #include "art/web-16.h"    bitmapWeb->SetBitmap(wxBitmapFromMemory(web_16_png));    Layout();    GetSizer()->Fit(this);    Centre();}
开发者ID:bingmann,项目名称:cryptote,代码行数:23,


示例17: DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE

DIALOG_MODEDIT_FP_BODY_ITEM_PROPERTIES::DIALOG_MODEDIT_FP_BODY_ITEM_PROPERTIES(                                                        FOOTPRINT_EDIT_FRAME* aParent,                                                        EDGE_MODULE * aItem ):    DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE( aParent ),    m_AngleValidator( 1, &m_AngleValue ),    m_AngleValue( 0.0 ){    m_parent = aParent;    m_item = aItem;    m_brdSettings = m_parent->GetDesignSettings();    m_module = m_parent->GetBoard()->m_Modules;    m_AngleValidator.SetRange( -360.0, 360.0 );    m_AngleCtrl->SetValidator( m_AngleValidator );    m_AngleValidator.SetWindow( m_AngleCtrl );    SetFocus();    m_StandardButtonsSizerOK->SetDefault();    Layout();    GetSizer()->SetSizeHints( this );    Centre();}
开发者ID:PatMart,项目名称:kicad-source-mirror,代码行数:23,


示例18: GetParent

void S57QueryDialog::RecalculateSize( void ){    //  Make an estimate of the dialog size, without scrollbars showing        wxSize esize = m_createsize;    if(g_bresponsive){        esize = GetParent()->GetClientSize();    }        wxSize dsize = GetParent()->GetClientSize();    esize.y = wxMin(esize.y, dsize.y - (2 * GetCharHeight()));    esize.x = wxMin(esize.x, dsize.x - (2 * GetCharHeight()));    SetSize(esize);        wxSize fsize = GetSize();    fsize.y = wxMin(fsize.y, dsize.y - (2 * GetCharHeight()));    fsize.x = wxMin(fsize.x, dsize.x - (2 * GetCharHeight()));    SetSize(fsize);            Centre();    }
开发者ID:CarCode,项目名称:Cocoa-OCPN,代码行数:23,


示例19: wxDialog

DependenciesDlg::DependenciesDlg(    wxWindow* parent, const wxString& projectName, int id, wxString title, wxPoint pos, wxSize size, int style)    : wxDialog(parent, id, title, pos, size, style)    , m_projectName(projectName){    this->SetSizeHints(wxDefaultSize, wxDefaultSize);    wxBoxSizer* mainSizer;    mainSizer = new wxBoxSizer(wxVERTICAL);    m_book = new wxChoicebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxCHB_DEFAULT);    mainSizer->Add(m_book, 1, wxEXPAND | wxALL, 5);    m_staticline1 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL);    mainSizer->Add(m_staticline1, 0, wxEXPAND | wxALL, 5);    wxBoxSizer* btnSizer;    btnSizer = new wxBoxSizer(wxHORIZONTAL);    m_buttonOK = new wxButton(this, wxID_ANY, _("&OK"), wxDefaultPosition, wxDefaultSize, 0);    btnSizer->Add(m_buttonOK, 0, wxALL, 5);    m_buttonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0);    btnSizer->Add(m_buttonCancel, 0, wxALL, 5);    mainSizer->Add(btnSizer, 0, wxALIGN_RIGHT, 5);    this->SetSizer(mainSizer);    this->Layout();    m_book->GetChoiceCtrl()->SetFocus();    Centre();    Init();    SetName("DependenciesDlg");    WindowAttrManager::Load(this);}
开发者ID:eranif,项目名称:codelite,代码行数:37,


示例20: m_conflicts

// Frame constructorecResolveConflictsDialog::ecResolveConflictsDialog(wxWindow* parent, std::list<CdlConflict> conflicts, CdlTransaction transaction, wxList *parConflictsOfInterest):    m_conflicts(conflicts),    m_Transaction(transaction),    m_parConflictsOfInterest(parConflictsOfInterest),    m_Map(wxKEY_INTEGER){    // Stop values from being changed by other mechanisms during the    // duration of this dialog.    wxGetApp().LockValues();    m_conflictsCtrl = NULL;    m_solutionsCtrl = NULL;    SetExtraStyle(wxDIALOG_EX_CONTEXTHELP);    ecDialog::Create(parent, ecID_RESOLVE_CONFLICTS_DIALOG, _("Resolve conflicts"),        wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER);    std::list<CdlConflict>::const_iterator conf_i;    for (conf_i= m_conflicts.begin (); conf_i != m_conflicts.end (); conf_i++)    { // for each conflict        int nSolutions = (*conf_i)->get_solution().size();        SolutionInfo *pInfo = (SolutionInfo *) malloc(sizeof(SolutionInfo)+(nSolutions-1)*sizeof(int));        pInfo->nCount = nSolutions;        int i;        for ( i = 0; i < nSolutions; i++)        {            pInfo->arItem[i] = SolutionInfo::CHECKED;        }        m_Map.Put((long) *conf_i, (wxObject*) pInfo);    }    CreateControls(this);    Centre(wxBOTH);}
开发者ID:0xCA5A,项目名称:dd-wrt,代码行数:38,


示例21: CreateControls

bool ViewChControl::Create( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ){////@begin ViewChControl member initialisation    m_main_sizer_text = NULL;    m_view_enable_control = NULL;    m_ch_volt_per_div_comboBox = NULL;    m_ch_offset_reset_control = NULL;    m_ch_offset_control = NULL;    m_color_control = NULL;    m_line_width_control = NULL;////@end ViewChControl member initialisation////@begin ViewChControl creation    wxPanel::Create( parent, id, pos, size, style );    CreateControls();    if (GetSizer())    {        GetSizer()->SetSizeHints(this);    }    Centre();////@end ViewChControl creation    return true;}
开发者ID:cjpl,项目名称:caen-suite,代码行数:24,


示例22: wxDialog

RainExceptionDialog::RainExceptionDialog(wxWindow *parent, RainException *pException)  : wxDialog(parent, wxID_ANY, wxT("Error"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)  , m_pDetailList(0), m_bShowingDetails(false), m_pDetailsBtn(0), m_pStaticLine(0), m_pSaveBtn(0){  for(RainException *e = pException; e; e = e->getPrevious())  {    m_aMessages.Add(e->getMessage());    m_aFiles.Add(e->getFile());    m_aLines.Add(e->getLine());  }  wxBoxSizer *sizerTop = new wxBoxSizer(wxVERTICAL);  wxBoxSizer *sizerButtons = new wxBoxSizer(wxVERTICAL);  wxBoxSizer *sizerAll = new wxBoxSizer(wxHORIZONTAL);  wxButton *btnOk = new wxButton(this, wxID_OK);  sizerButtons->Add(btnOk, 0, wxCENTRE | wxBOTTOM, 5);  m_pDetailsBtn = new wxButton(this, wxID_MORE, wxT("&Details >>"));  sizerButtons->Add(m_pDetailsBtn, 0,wxCENTRE | wxTOP, 4);  wxBitmap bitmap = wxArtProvider::GetBitmap(wxART_ERROR, wxART_MESSAGE_BOX);  sizerAll->Add(new wxStaticBitmap(this, wxID_ANY, bitmap), 0, wxALIGN_CENTRE_VERTICAL);  sizerAll->Add(CreateTextSizer(pException->getMessage()), 1, wxALIGN_CENTRE_VERTICAL | wxLEFT | wxRIGHT, 10);  sizerAll->Add(sizerButtons, 0, wxALIGN_RIGHT | wxLEFT, 10);  sizerTop->Add(sizerAll, 0, wxALL | wxEXPAND, 10);  SetSizer(sizerTop);  wxSize size = sizerTop->Fit(this);  m_maxHeight = size.y;  SetSizeHints(size.x, size.y, m_maxWidth, m_maxHeight);  btnOk->SetFocus();  Centre();}
开发者ID:lkdd,项目名称:modstudio2,代码行数:36,


示例23: wxGridSizer

void DlgConsultarArista::do_layout(){    wxGridSizer* gridSizer1 = new wxGridSizer(3, 1, 0, 0);    wxGridSizer* gridSizer5 = new wxGridSizer(1, 2, 0, 0);    wxGridSizer* gridSizer2 = new wxGridSizer(4, 1, 10, 0);    wxGridSizer* gridSizer4 = new wxGridSizer(1, 2, 0, 0);    wxGridSizer* gridSizer3 = new wxGridSizer(1, 2, 0, 0);    gridSizer1->Add(titulo, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);    gridSizer3->Add(inicio, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);    gridSizer3->Add(destino, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);    gridSizer2->Add(gridSizer3, 1, wxEXPAND, 0);    gridSizer4->Add(inicios, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);    gridSizer4->Add(destinos, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);    gridSizer2->Add(gridSizer4, 1, wxEXPAND, 0);    gridSizer2->Add(valor, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);    gridSizer2->Add(peso, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);    gridSizer1->Add(gridSizer2, 1, wxEXPAND, 0);    gridSizer5->Add(botonCancelar, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);    gridSizer5->Add(botonAceptar, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);    gridSizer1->Add(gridSizer5, 1, wxEXPAND, 0);    SetSizer(gridSizer1);    Layout();    Centre();}
开发者ID:jags9415,项目名称:graficador-grafos,代码行数:24,


示例24: SetExtraStyle

bool WinEDA_ConfigFrame::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ){////@begin WinEDA_ConfigFrame member initialisation    m_CmpfileExtText = NULL;    m_NetfileExtText = NULL;    m_LibfileExtText = NULL;    m_SymbolfileExtText = NULL;    m_SchfileExtText = NULL;    m_ListLibr = NULL;    m_CmpfileExtText = NULL;    m_LibDirCtrl = NULL;////@end WinEDA_ConfigFrame member initialisation////@begin WinEDA_ConfigFrame creation    SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);    wxDialog::Create( parent, id, caption, pos, size, style );    CreateControls();    GetSizer()->Fit(this);    GetSizer()->SetSizeHints(this);    Centre();////@end WinEDA_ConfigFrame creation    return true;}
开发者ID:BackupTheBerlios,项目名称:kicad-svn,代码行数:24,


示例25: wxDialog

FindInProjectDlg::FindInProjectDlg(EditorFrame& parentFrame, const ProjectPane& projectPane)    : wxDialog (&parentFrame, -1, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER),      m_parentFrame(parentFrame), m_projectPane(projectPane), m_searchThread(NULL){    SetTitle (_("Find In Project"));    // Create the search thread    m_searchThread = new SearchThread();    // Create ctrls    m_searchCtrl = new wxTextCtrl(this, CTRL_SEARCH, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER);    m_searchButton = new wxButton(this, CTRL_SEARCHBUTTON, _("Search"));    m_caseCheck = new wxCheckBox(this, wxID_ANY, wxT("Match case"));    m_caseCheck->SetValue(true); // default is to match case    m_pathStatic = new wxStaticText(this, wxID_ANY, wxT(""));#if defined (__WXMSW__)    m_browser = new wxIEHtmlWin(this, CTRL_BROWSER); // IE Control#elif defined (__WXGTK__)    m_browser = new wxBrowser(this, CTRL_BROWSER); // WebKit control#endif    // Create Layout    wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL);    wxBoxSizer *searchSizer = new wxBoxSizer(wxHORIZONTAL);    searchSizer->Add(m_searchCtrl, 1, wxEXPAND|wxRIGHT, 5);    searchSizer->Add(m_searchButton, 0);    mainSizer->Add(searchSizer, 0, wxEXPAND|wxALL, 5);    mainSizer->Add(m_caseCheck, 0, wxLEFT, 5);    mainSizer->Add(m_pathStatic, 0, wxEXPAND|wxALL, 5);    mainSizer->Add(m_browser->GetWindow(), 1, wxEXPAND);    SetSizer(mainSizer);    SetSize(700, 500);    Centre();}
开发者ID:lenoval,项目名称:e,代码行数:36,


示例26: GetAbbreviatedUnitsLabel

void DIALOG_GLOBAL_MODULES_FIELDS_EDITION::initDialog(){    m_sdbSizerButtonsOK->SetDefault();    m_brdSettings = &m_parent->GetDesignSettings();    m_ReferenceOpt->SetValue(m_refSelection),    m_ValueOpt->SetValue(m_valueSelection),    m_OtherFields->SetValue(m_othersSelection);    m_ModuleFilter->SetValue(m_filterString);    m_SizeXunit->SetLabel( GetAbbreviatedUnitsLabel() );    m_SizeYunit->SetLabel( GetAbbreviatedUnitsLabel() );    m_ThicknessUnit->SetLabel( GetAbbreviatedUnitsLabel() );    m_SizeX_Value->SetValue(        StringFromValue( g_UserUnit, m_brdSettings->m_ModuleTextSize.x ) );    m_SizeY_Value->SetValue(        StringFromValue( g_UserUnit, m_brdSettings->m_ModuleTextSize.y ) );    m_ThicknessValue->SetValue(        StringFromValue( g_UserUnit, m_brdSettings->m_ModuleTextWidth) );    Layout();    GetSizer()->SetSizeHints( this );    Centre();}
开发者ID:cpavlina,项目名称:kicad,代码行数:24,


示例27: ObjectPropertiesWindowBase

PropertiesWindow::PropertiesWindow(wxWindow* parent, const Map* map, const Tile* tile_parent, Item* item, wxPoint pos) :	ObjectPropertiesWindowBase(parent, "Item Properties", map, tile_parent, item, pos),	currentPanel(nullptr){	ASSERT(edit_item);	notebook = newd wxNotebook(this, wxID_ANY, wxDefaultPosition, wxSize(600, 300));	notebook->AddPage(createGeneralPanel(notebook), "Simple", true);	if(dynamic_cast<Container*>(item)) {		notebook->AddPage(createContainerPanel(notebook), "Contents");	}	notebook->AddPage(createAttributesPanel(notebook), "Advanced");	wxSizer* topSizer = newd wxBoxSizer(wxVERTICAL);	topSizer->Add(notebook, wxSizerFlags(1).DoubleBorder());	wxSizer* optSizer = newd wxBoxSizer(wxHORIZONTAL);	optSizer->Add(newd wxButton(this, wxID_OK, "OK"), wxSizerFlags(0).Center());	optSizer->Add(newd wxButton(this, wxID_CANCEL, "Cancel"), wxSizerFlags(0).Center());	topSizer->Add(optSizer, wxSizerFlags(0).Center().DoubleBorder());	SetSizerAndFit(topSizer);	Centre(wxBOTH);}
开发者ID:TheSumm,项目名称:rme,代码行数:24,



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


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