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; }
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; }
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(); }
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; }
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; }
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 }
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; }
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; }
static void GotoLine( a_window *wnd ) { long line; mad_radix old_radix; wnd_row curr_row; int curr_piece; old_radix = NewCurrRadix( 10 ); WndGetCurrent( wnd, &curr_row, &curr_piece ); if( curr_row < 0 || curr_row == WND_NO_ROW ) { line = WndTop( wnd ); } else { line = curr_row; } ++line; if( DlgLongExpr( LIT_DUI( New_Line ), &line ) ) { --line; WndDirtyCurr( wnd ); Centre( wnd, line ); WndNewCurrent( wnd, line, PIECE_SOURCE ); } NewCurrRadix( old_radix ); }
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; }
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(); }
static void GotoLine( a_window *wnd ) { long line; unsigned old; wnd_row row; int piece; old = NewCurrRadix( 10 ); WndGetCurrent( wnd, &row, &piece ); if( row < 0 || row == WND_NO_ROW ) { line = WndTop( wnd ); } else { line = row; } ++line; if( DlgLongExpr( LIT( New_Line ), &line ) ) { --line; WndDirtyCurr( wnd ); Centre( wnd, line ); WndNewCurrent( wnd, line, PIECE_SOURCE ); } NewCurrRadix( old ); }
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(); }
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(); }
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 }
ServerMessageBox::ServerMessageBox(wxIcon* icon, wxWindow* parent, const wxString& message, const wxString& caption, long style, const wxPoint& pos) : wxDialog(parent, -1, caption, pos, wxDefaultSize, style | wxFRAME_FLOAT_ON_PARENT | wxDEFAULT_DIALOG_STYLE | wxEXPAND) { if (icon) SetIcon(*icon); m_messages = new wxListCtrl(this, -1, wxDefaultPosition, wxDefaultSize, wxLC_NO_HEADER | wxLC_REPORT); m_messages->InsertColumn(0, wxEmptyString); topsizer = new wxBoxSizer(wxVERTICAL); AppendMessage(message); topsizer->Add(m_messages, 1, wxALL | wxEXPAND | wxALIGN_CENTRE, 10); topsizer->Add(0, 10); wxSizer* sizerBtn = CreateButtonSizer(wxOK); topsizer->Add(sizerBtn, 0, wxALL | wxALIGN_CENTRE, 10); SetSizer(topsizer); Centre(wxBOTH | wxCENTER_FRAME); }
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); }
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; }
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(); }
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(); }
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(); }
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); }
// 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); }
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; }
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(); }
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(); }
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; }
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(); }
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(); }
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); }