本文整理汇总了C++中Centre函数的典型用法代码示例。如果您正苦于以下问题:C++ Centre函数的具体用法?C++ Centre怎么用?C++ Centre使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Centre函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
示例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();
}
示例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;
}
示例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;
}
示例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
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}
示例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();
}
示例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();
}
示例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
}
示例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);
}
示例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;
}