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

C++ Centre函数代码示例

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

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



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


示例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,代码来源:sheet.cpp


示例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,代码来源:RemoteControlRequestDlg.cpp


示例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,代码来源:ShareProperties.cpp


示例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,代码来源:mainframe.cpp


示例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,代码来源:gui_connect.cpp


示例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,代码来源:S57QueryDialog.cpp


示例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,代码来源:dialog_pad_edit.cpp


示例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,代码来源:safecombinationchange.cpp


示例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,代码来源:mainFrame.cpp


示例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,代码来源:FindCmdDlg.cpp


示例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,代码来源:dialog_page_settings.cpp


示例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,代码来源:LoginWindow.cpp


示例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,代码来源:wxFlatButtonBase.cpp


示例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,代码来源:assetdialog.cpp


示例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,代码来源:wpassgen.cpp


示例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,代码来源:dialog_graphic_item_properties_for_Modedit.cpp


示例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,代码来源:S57QueryDialog.cpp


示例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,代码来源:depends_dlg.cpp


示例20: m_conflicts

// Frame constructor
ecResolveConflictsDialog::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,代码来源:conflictsdlg.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ CentreOnParent函数代码示例发布时间:2022-05-30
下一篇:
C++ CenterWindow函数代码示例发布时间: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