这篇教程C++ CreateButtonSizer函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CreateButtonSizer函数的典型用法代码示例。如果您正苦于以下问题:C++ CreateButtonSizer函数的具体用法?C++ CreateButtonSizer怎么用?C++ CreateButtonSizer使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CreateButtonSizer函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: wxDialogCygwinDlg::CygwinDlg(wxWindow *parent, cxCygwinDlgMode mode): wxDialog (parent, wxID_ANY, wxEmptyString, wxDefaultPosition), m_mode(mode) { if (m_mode == cxCYGWIN_INSTALL) SetTitle(_("Cygwin not installed!")); else SetTitle(_("Update Cygwin")); const wxString installMsg = _("e uses the Cygwin package to provide many of the powerful Unix-like commands not usually available on Windows. Without Cygwin, some of e's advanced features will be disabled./n/nWould you like to install Cygwin now? (If you say no, e will ask you again when you try to use an advanced feature.)"); const wxString updateMsg = _("To get full benefit of the bundle commands, your cygwin installation needs to be updated."); // Create controls wxStaticText* msg = new wxStaticText(this, wxID_ANY, (m_mode == cxCYGWIN_INSTALL) ? installMsg : updateMsg); msg->Wrap(300); wxStaticText* radioTitle = new wxStaticText(this, wxID_ANY, (m_mode == cxCYGWIN_INSTALL) ? _("Install Cygwin:") : _("Update Cygwin")); m_autoRadio = new wxRadioButton(this, wxID_ANY, _("Automatic"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP); m_manualRadio = new wxRadioButton(this, wxID_ANY, _("Manual")); // Create Layout wxBoxSizer* mainSizer = new wxBoxSizer(wxVERTICAL); mainSizer->Add(msg, 0, wxALL, 5); mainSizer->Add(radioTitle, 0, wxLEFT|wxTOP, 5); wxBoxSizer* radioSizer = new wxBoxSizer(wxVERTICAL); radioSizer->Add(m_autoRadio, 0, wxLEFT, 20); radioSizer->Add(m_manualRadio, 0, wxLEFT, 20); mainSizer->Add(radioSizer, 0, wxALL, 5); mainSizer->Add(CreateButtonSizer(wxOK|wxCANCEL), 0, wxEXPAND|wxALL, 5); SetSizerAndFit(mainSizer); Centre();}
开发者ID:dxtravi,项目名称:e,代码行数:28,
示例2: wxNotebookvoid CConfigMain::CreateGUIControls(){ // Create the notebook and pages Notebook = new wxNotebook(this, ID_NOTEBOOK); wxPanel* const general_pane = new GeneralConfigPane(Notebook, ID_GENERALPAGE); wxPanel* const interface_pane = new InterfaceConfigPane(Notebook, ID_DISPLAYPAGE); wxPanel* const audio_pane = new AudioConfigPane(Notebook, ID_AUDIOPAGE); wxPanel* const gamecube_pane = new GameCubeConfigPane(Notebook, ID_GAMECUBEPAGE); wxPanel* const wii_pane = new WiiConfigPane(Notebook, ID_WIIPAGE); wxPanel* const path_pane = new PathConfigPane(Notebook, ID_PATHSPAGE); wxPanel* const advanced_pane = new AdvancedConfigPane(Notebook, ID_ADVANCEDPAGE); Notebook->AddPage(general_pane, _("General")); Notebook->AddPage(interface_pane, _("Interface")); Notebook->AddPage(audio_pane, _("Audio")); Notebook->AddPage(gamecube_pane, _("GameCube")); Notebook->AddPage(wii_pane, _("Wii")); Notebook->AddPage(path_pane, _("Paths")); Notebook->AddPage(advanced_pane, _("Advanced")); if (Movie::IsMovieActive() || NetPlay::IsNetPlayRunning()) advanced_pane->Disable(); wxBoxSizer* const main_sizer = new wxBoxSizer(wxVERTICAL); main_sizer->Add(Notebook, 1, wxEXPAND | wxALL, 5); main_sizer->Add(CreateButtonSizer(wxOK), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5); main_sizer->SetMinSize(400, 0); SetSizerAndFit(main_sizer); Center(); SetFocus();}
开发者ID:BhaaLseN,项目名称:dolphin,代码行数:32,
示例3: wxDialogEditServerListDlg::EditServerListDlg(wxWindow *parent, const wxString& caption, const wxString& message, const wxString& filename) : wxDialog(parent, -1, caption, wxDefaultPosition, wxSize(400,200), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER){ m_file = filename; wxBeginBusyCursor(); wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL ); topsizer->Add( CreateTextSizer( message ), 0, wxALL, 10 ); m_textctrl = new wxTextCtrl(this, -1, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE); topsizer->Add( m_textctrl, 1, wxEXPAND | wxLEFT|wxRIGHT, 15 ); topsizer->Add( CreateButtonSizer( wxOK | wxCANCEL ), 0, wxCENTRE | wxALL, 10 ); SetAutoLayout( TRUE ); SetSizer( topsizer ); Centre( wxBOTH ); if (wxFile::Exists(filename)) m_textctrl->LoadFile(filename); m_textctrl->SetFocus(); wxEndBusyCursor();}
开发者ID:Artoria2e5,项目名称:amule-dlp,代码行数:35,
示例4: wxDialogAboutDolphin::AboutDolphin(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style) : wxDialog(parent, id, title, position, size, style){ wxMemoryInputStream istream(dolphin_logo_png, sizeof dolphin_logo_png); wxImage iDolphinLogo(istream, wxBITMAP_TYPE_PNG); wxStaticBitmap* const sbDolphinLogo = new wxStaticBitmap(this, wxID_ANY, wxBitmap(iDolphinLogo)); const wxString Text = wxString::Format(_("Dolphin %s/n" "Copyright (c) 2003-2013+ Dolphin Team/n" "/n" "Branch: %s/n" "Revision: %s/n" "Compiled: %s @ %s/n" "/n" "Dolphin is a Gamecube/Wii emulator, which was/n" "originally written by F|RES and ector./n" "Today Dolphin is an open source project with many/n" "contributors, too many to list./n" "If interested, just go check out the project page at/n" "http://code.google.com/p/dolphin-emu/ ./n" "/n" "Special thanks to Bushing, Costis, CrowTRobo,/n" "Marcan, Segher, Titanik, or9 and Hotquik for their/n" "reverse engineering and docs/demos./n" "/n" "Big thanks to Gilles Mouchard whose Microlib PPC/n" "emulator gave our development a kickstart./n" "/n" "Thanks to Frank Wille for his PowerPC disassembler,/n" "which or9 and we modified to include Gekko specifics./n" "/n" "Thanks to hcs/destop for their GC ADPCM decoder./n" "/n" "We are not affiliated with Nintendo in any way./n" "Gamecube and Wii are trademarks of Nintendo./n" "The emulator should not be used to play games/n" "you do not legally own."), scm_desc_str, scm_branch_str, scm_rev_git_str, __DATE__, __TIME__); wxStaticText* const Message = new wxStaticText(this, wxID_ANY, Text); Message->Wrap(GetSize().GetWidth()); wxBoxSizer* const sInfo = new wxBoxSizer(wxVERTICAL); sInfo->Add(Message, 1, wxEXPAND | wxALL, 5); wxBoxSizer* const sMainHor = new wxBoxSizer(wxHORIZONTAL); sMainHor->Add(sbDolphinLogo, 0, wxEXPAND | wxALL, 5); sMainHor->Add(sInfo); wxBoxSizer* const sMain = new wxBoxSizer(wxVERTICAL); sMain->Add(sMainHor, 1, wxEXPAND); sMain->Add(CreateButtonSizer(wxOK), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5); SetSizerAndFit(sMain); Center(); SetFocus();}
开发者ID:Bigorneau,项目名称:dolphin,代码行数:60,
示例5: CreateButtonSizerwxSizer *wxDialogBase::CreateSeparatedButtonSizer(long flags){ wxSizer *sizer = CreateButtonSizer(flags); if ( !sizer ) return NULL; return CreateSeparatedSizer(sizer);}
开发者ID:AaronDP,项目名称:wxWidgets,代码行数:8,
示例6: wxMultiChoiceDialogChoiceDialog::ChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption, const wxArrayString& choices, long styleDlg, const wxPoint& pos) : wxMultiChoiceDialog(parent, message, caption, choices, styleDlg, pos){ wxSizer *sizer = GetSizer(); sizer->Add(CreateButtonSizer(wxYES | wxNO | wxCANCEL)); Fit(); Layout();}
开发者ID:Halfbrick,项目名称:decoda,代码行数:8,
示例7: wxDialogSlitPropertiesDlg::SlitPropertiesDlg(wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style){ wxBoxSizer *vSizer = new wxBoxSizer(wxVERTICAL); wxBoxSizer *hSizer = new wxBoxSizer(wxHORIZONTAL); wxStaticBoxSizer *szPosition = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("Position (Center)")), wxVERTICAL); wxStaticBoxSizer *szSlitSize = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("Size")), wxVERTICAL); // Position controls wxBoxSizer *hXSizer = new wxBoxSizer(wxHORIZONTAL); wxStaticText *xLabel = new wxStaticText(this, wxID_ANY, _("X"), wxDefaultPosition, wxDefaultSize, 0); hXSizer->Add(xLabel, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5); m_x = new wxSpinCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(80, -1), wxSP_ARROW_KEYS, 0, 8000, 0); hXSizer->Add(m_x, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5); szPosition->Add(hXSizer, 0, wxEXPAND, 5); wxBoxSizer *hYSizer = new wxBoxSizer(wxHORIZONTAL); wxStaticText* yLabel = new wxStaticText(this, wxID_ANY, _("Y"), wxDefaultPosition, wxDefaultSize, 0); hYSizer->Add(yLabel, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5); m_y = new wxSpinCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(80, -1), wxSP_ARROW_KEYS, 0, 8000, 0); hYSizer->Add(m_y, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5); szPosition->Add(hYSizer, 1, wxEXPAND, 5); hSizer->Add(szPosition, 1, 0, 5); // Size controls wxBoxSizer* hWidthSizer = new wxBoxSizer(wxHORIZONTAL); wxStaticText* widthLabel = new wxStaticText(this, wxID_ANY, _("Width"), wxDefaultPosition, wxSize(40, -1), 0); hWidthSizer->Add(widthLabel, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5); m_width = new wxSpinCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(80, -1), wxSP_ARROW_KEYS, 2, 1000, 2); hWidthSizer->Add(m_width, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5); szSlitSize->Add(hWidthSizer, 1, wxEXPAND, 5); wxBoxSizer* hHeightSizer = new wxBoxSizer(wxHORIZONTAL); wxStaticText* heightLabel = new wxStaticText(this, wxID_ANY, _("Height"), wxDefaultPosition, wxSize(40, -1), 0); hHeightSizer->Add(heightLabel, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5); m_height = new wxSpinCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(80, -1), wxSP_ARROW_KEYS, 2, 1000, 2); hHeightSizer->Add(m_height, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5); szSlitSize->Add(hHeightSizer, 1, wxEXPAND, 5); hSizer->Add(szSlitSize, 1, 0, 5); vSizer->Add(hSizer, 0, wxEXPAND, 5); // Angle controls wxBoxSizer* hAngleSizer = new wxBoxSizer(wxHORIZONTAL); wxStaticText* staticText1 = new wxStaticText(this, wxID_ANY, _("Angle (degrees)"), wxDefaultPosition, wxDefaultSize, 0); //staticText1->Wrap(-1); hAngleSizer->Add(staticText1, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5); m_angle = new wxSpinCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(80, -1), wxSP_ARROW_KEYS, -90, 90, 0); hAngleSizer->Add(m_angle, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5); vSizer->Add(hAngleSizer, 0, wxEXPAND, 5); // ok/cancel buttons vSizer->Add( CreateButtonSizer(wxOK | wxCANCEL), wxSizerFlags(0).Expand().Border(wxALL, 10)); SetSizerAndFit(vSizer);}
开发者ID:xeqtr1982,项目名称:phd2,代码行数:57,
示例8: wxDialog/******************************************************************** GFXCOLOURISEDIALOG FUNCTIONS*******************************************************************/GfxColouriseDialog::GfxColouriseDialog(wxWindow* parent, ArchiveEntry* entry, Palette8bit* pal): wxDialog(parent, -1, "Colourise", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER){ // Init variables this->entry = entry; this->palette = pal; // Set dialog icon wxIcon icon; icon.CopyFromBitmap(getIcon("t_colourise")); SetIcon(icon); // Setup main sizer wxBoxSizer* msizer = new wxBoxSizer(wxVERTICAL); SetSizer(msizer); wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL); msizer->Add(sizer, 1, wxEXPAND|wxALL, 6); // Add colour chooser wxBoxSizer* hbox = new wxBoxSizer(wxHORIZONTAL); sizer->Add(hbox, 0, wxEXPAND|wxALL, 4); cp_colour = new wxColourPickerCtrl(this, -1, wxColour(255, 0, 0)); hbox->Add(new wxStaticText(this, -1, "Colour:"), 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 4); hbox->Add(cp_colour, 0, wxEXPAND); // Add preview gfx_preview = new GfxCanvas(this, -1); sizer->Add(gfx_preview, 1, wxEXPAND|wxALL, 4); // Add buttons sizer->Add(CreateButtonSizer(wxOK|wxCANCEL), 0, wxEXPAND|wxBOTTOM, 4); // Setup preview gfx_preview->setViewType(GFXVIEW_CENTERED); gfx_preview->setPalette(pal); gfx_preview->SetInitialSize(wxSize(192, 192)); Misc::loadImageFromEntry(gfx_preview->getImage(), entry); wxColour col = cp_colour->GetColour(); gfx_preview->getImage()->colourise(rgba_t(col.Red(), col.Green(), col.Blue()), pal); gfx_preview->updateImageTexture(); // Init layout Layout(); // Bind events cp_colour->Bind(wxEVT_COLOURPICKER_CHANGED, &GfxColouriseDialog::onColourChanged, this); Bind(wxEVT_SIZE, &GfxColouriseDialog::onResize, this); // Setup dialog size SetInitialSize(wxSize(-1, -1)); SetMinSize(GetSize()); CenterOnParent();}
开发者ID:DemolisherOfSouls,项目名称:SLADE,代码行数:57,
示例9: wxDialogCARCodeAddEdit::CARCodeAddEdit(int _selection, std::vector<ActionReplay::ARCode>* _arCodes, wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& position, const wxSize& size, long style) : wxDialog(parent, id, title, position, size, style) , arCodes(_arCodes) , selection(_selection){ Bind(wxEVT_BUTTON, &CARCodeAddEdit::SaveCheatData, this, wxID_OK); ActionReplay::ARCode tempEntries; wxString currentName; if (selection == wxNOT_FOUND) { tempEntries.name = ""; } else { currentName = StrToWxStr(arCodes->at(selection).name); tempEntries = arCodes->at(selection); } wxBoxSizer* sEditCheat = new wxBoxSizer(wxVERTICAL); wxStaticBoxSizer* sbEntry = new wxStaticBoxSizer(wxVERTICAL, this, _("Cheat Code")); wxGridBagSizer* sgEntry = new wxGridBagSizer(0, 0); wxStaticText* EditCheatNameText = new wxStaticText(this, wxID_ANY, _("Name:")); wxStaticText* EditCheatCodeText = new wxStaticText(this, wxID_ANY, _("Code:")); EditCheatName = new wxTextCtrl(this, wxID_ANY, wxEmptyString); EditCheatName->SetValue(currentName); EntrySelection = new wxSpinButton(this); EntrySelection->SetRange(1, std::max((int)arCodes->size(), 1)); EntrySelection->SetValue((int)(arCodes->size() - selection)); EntrySelection->Bind(wxEVT_SPIN, &CARCodeAddEdit::ChangeEntry, this); EditCheatCode = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(300, 100), wxTE_MULTILINE); UpdateTextCtrl(tempEntries); sgEntry->Add(EditCheatNameText, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER | wxALL, 5); sgEntry->Add(EditCheatCodeText, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALIGN_CENTER | wxALL, 5); sgEntry->Add(EditCheatName, wxGBPosition(0, 1), wxGBSpan(1, 1), wxEXPAND | wxALL, 5); sgEntry->Add(EntrySelection, wxGBPosition(0, 2), wxGBSpan(2, 1), wxEXPAND | wxALL, 5); sgEntry->Add(EditCheatCode, wxGBPosition(1, 1), wxGBSpan(1, 1), wxEXPAND | wxALL, 5); sgEntry->AddGrowableCol(1); sgEntry->AddGrowableRow(1); sbEntry->Add(sgEntry, 1, wxEXPAND | wxALL); sEditCheat->Add(sbEntry, 1, wxEXPAND | wxALL, 5); sEditCheat->Add(CreateButtonSizer(wxOK | wxCANCEL), 0, wxEXPAND | wxALL, 5); SetSizerAndFit(sEditCheat); SetFocus();}
开发者ID:Tinob,项目名称:Ishiiruka,代码行数:54,
示例10: wxBoxSizervoid nsDialog::ApplyRootSizer(wxSizer* sz){ wxBoxSizer* main = new wxBoxSizer(wxVERTICAL); wxSizer* okc = CreateButtonSizer(wxOK | wxCANCEL); sz->Add(okc, wxSizerFlags(1).Right()); main->Add(sz, wxSizerFlags(1).Border(wxALL, 10)); SetSizer( main ); main->SetSizeHints( this );}
开发者ID:Ali-il,项目名称:gamekit,代码行数:12,
示例11: wxDialogUDPConfigDiag::UDPConfigDiag(wxWindow * const parent, UDPWrapper * _wrp) : wxDialog(parent, -1, _("UDP Wiimote")), wrp(_wrp){ wxBoxSizer *const outer_sizer = new wxBoxSizer(wxVERTICAL); wxBoxSizer *const sizer1 = new wxBoxSizer(wxVERTICAL); wxStaticBoxSizer *const sizer2 = new wxStaticBoxSizer(wxVERTICAL, this, _("Update")); outer_sizer->Add(sizer1, 0, wxTOP | wxLEFT | wxRIGHT | wxEXPAND, 5); outer_sizer->Add(sizer2, 1, wxLEFT | wxRIGHT | wxEXPAND, 10); enable = new wxCheckBox(this, wxID_ANY, _("Enable")); butt = new wxCheckBox(this, wxID_ANY, _("Buttons")); accel = new wxCheckBox(this, wxID_ANY, _("Acceleration")); point = new wxCheckBox(this, wxID_ANY, _("IR Pointer")); nun = new wxCheckBox(this, wxID_ANY, _("Nunchuk")); nunaccel = new wxCheckBox(this, wxID_ANY, _("Nunchuk Acceleration")); wxBoxSizer *const port_sizer = new wxBoxSizer(wxHORIZONTAL); port_sizer->Add(new wxStaticText(this, wxID_ANY, _("UDP Port:")), 0, wxALIGN_CENTER); port_tbox = new wxTextCtrl(this, wxID_ANY, StrToWxStr(wrp->port)); port_sizer->Add(port_tbox, 1, wxLEFT | wxEXPAND, 5); enable->Bind(wxEVT_CHECKBOX, &UDPConfigDiag::ChangeState, this); butt->Bind(wxEVT_CHECKBOX, &UDPConfigDiag::ChangeUpdateFlags, this); accel->Bind(wxEVT_CHECKBOX, &UDPConfigDiag::ChangeUpdateFlags, this); point->Bind(wxEVT_CHECKBOX, &UDPConfigDiag::ChangeUpdateFlags, this); nun->Bind(wxEVT_CHECKBOX, &UDPConfigDiag::ChangeUpdateFlags, this); nunaccel->Bind(wxEVT_CHECKBOX, &UDPConfigDiag::ChangeUpdateFlags, this); port_tbox->Bind(wxEVT_TEXT, &UDPConfigDiag::ChangeState, this); enable->SetValue(wrp->udpEn); butt->SetValue(wrp->updButt); accel->SetValue(wrp->updAccel); point->SetValue(wrp->updIR); nun->SetValue(wrp->updNun); nunaccel->SetValue(wrp->updNunAccel); sizer1->Add(enable, 1, wxALL | wxEXPAND, 5); sizer1->Add(port_sizer, 1, wxBOTTOM | wxLEFT| wxRIGHT | wxEXPAND, 5); sizer2->Add(butt, 1, wxALL | wxEXPAND, 5); sizer2->Add(accel, 1, wxALL | wxEXPAND, 5); sizer2->Add(point, 1, wxALL | wxEXPAND, 5); sizer2->Add(nun, 1, wxALL | wxEXPAND, 5); sizer2->Add(nunaccel, 1, wxALL | wxEXPAND, 5); outer_sizer->Add(CreateButtonSizer(wxOK), 0, wxALL | wxALIGN_RIGHT, 5); SetSizerAndFit(outer_sizer); Center(); SetFocus();}
开发者ID:DigidragonZX,项目名称:dolphin,代码行数:53,
示例12: wxBoxSizervoid CalRestoreDialog::AddButtons(CalReviewDialog* parentDialog, wxBoxSizer* parentVSizer){ wxBoxSizer *pButtonSizer = new wxBoxSizer(wxHORIZONTAL); wxButton *pRestore = new wxButton(parentDialog, wxID_OK, _("Restore")); pRestore->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &CalRestoreDialog::OnRestore, this); pButtonSizer->Add( pRestore, wxSizerFlags(0).Align(0).Border(wxRIGHT | wxLEFT | wxBOTTOM, 10)); pButtonSizer->Add( CreateButtonSizer(wxCANCEL), wxSizerFlags(0).Align(0).Border(wxRIGHT | wxLEFT | wxBOTTOM, 10)); parentVSizer->Add(pButtonSizer, wxSizerFlags(0).Center());}
开发者ID:AndresPozo,项目名称:phd2,代码行数:13,
示例13: wxDialogConfigDialog::ConfigDialog(wxWindow *parent, wxWindowID id, const wxString &title, bool change): wxDialog(parent, id, title){ wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL); m_book = new wxBookCtrl(this, wxID_ANY); m_book->AddPage(createInitialPanel(m_book), HaStrings::strInitial); m_book->AddPage(createPasswordPanel(m_book), HaStrings::strChangePasswd); sizer->Add(m_book, wxSizerFlags().Border().Expand()); wxSizer *sizer_bt = CreateButtonSizer(wxOK|wxCANCEL); if (sizer_bt != NULL) sizer->Add(sizer_bt, wxSizerFlags().Border().Expand()); SetSizer(sizer); sizer->SetSizeHints(this);}
开发者ID:lasyard,项目名称:HomeAccount,代码行数:13,
示例14: wxDialogBreakPointDlg::BreakPointDlg(CBreakPointWindow *_Parent) : wxDialog(_Parent, wxID_ANY, wxT("BreakPoint")) , Parent(_Parent){ m_pEditAddress = new wxTextCtrl(this, wxID_ANY, wxT("80000000")); wxBoxSizer *sMainSizer = new wxBoxSizer(wxVERTICAL); sMainSizer->Add(m_pEditAddress, 0, wxEXPAND | wxALL, 5); sMainSizer->Add(CreateButtonSizer(wxOK | wxCANCEL), 0, wxALL, 5); SetSizerAndFit(sMainSizer); SetFocus();}
开发者ID:Chiri23,项目名称:dolphin,代码行数:13,
示例15: PaletteColouriseDialog PaletteColouriseDialog(wxWindow* parent, Palette8bit* pal) : wxDialog(parent, -1, "Colourise", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER) { // Init variable this->palette = pal; // Set dialog icon wxIcon icon; icon.CopyFromBitmap(Icons::getIcon(Icons::GENERAL, "palette_colourise")); SetIcon(icon); // Setup main sizer wxBoxSizer* msizer = new wxBoxSizer(wxVERTICAL); SetSizer(msizer); wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL); msizer->Add(sizer, 1, wxEXPAND|wxALL, 6); // Add colour chooser wxBoxSizer* hbox = new wxBoxSizer(wxHORIZONTAL); sizer->Add(hbox, 0, wxEXPAND|wxALL, 4); cp_colour = new wxColourPickerCtrl(this, -1, wxColour(255, 0, 0)); hbox->Add(new wxStaticText(this, -1, "Colour:"), 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 4); hbox->Add(cp_colour, 0, wxEXPAND); // Add preview pal_preview = new PaletteCanvas(this, -1); sizer->Add(pal_preview, 1, wxEXPAND|wxALL, 4); // Add buttons sizer->Add(CreateButtonSizer(wxOK|wxCANCEL), 0, wxEXPAND|wxBOTTOM|wxTOP, 4); // Setup preview pal_preview->allowSelection(2); pal_preview->SetInitialSize(wxSize(384, 384)); redraw(); // Init layout Layout(); // Bind events cp_colour->Bind(wxEVT_COLOURPICKER_CHANGED, &PaletteColouriseDialog::onColourChanged, this); pal_preview->Bind(wxEVT_LEFT_UP, &PaletteColouriseDialog::onPaletteLeftUp, this); // Setup dialog size SetInitialSize(wxSize(-1, -1)); SetMinSize(GetSize()); CenterOnParent(); }
开发者ID:Blue-Shadow,项目名称:SLADE,代码行数:49,
示例16: wxStaticBitmapImageMessageBox::ImageMessageBox(wxWindow *parent, wxString title, wxString text, wxBitmap img, int style) { if (! wxDialog::Create(parent, wxID_ANY, title)) return; image = new wxStaticBitmap(this, wxID_ANY, img); wxBoxSizer *dlgsizer = new wxBoxSizer(wxVERTICAL); SetSizer(dlgsizer); dlgsizer->Add(image, 0, wxALL|wxALIGN_CENTER, 5); while (text.Len() != 0) { int index = text.Find('/n'); if (index != -1) { wxStaticText *message = new wxStaticText(this, wxID_ANY, text.Mid(0, index+1)); dlgsizer->Add(message, 0, wxALIGN_LEFT|wxEXPAND|wxLEFT|wxRIGHT, 10); text = text.Mid(index+1); } else { wxStaticText *message = new wxStaticText(this, wxID_ANY, text); dlgsizer->Add(message, 0, wxEXPAND|wxALIGN_LEFT|wxLEFT|wxRIGHT, 10); text = ""; } } wxSizer *buttonbox = CreateButtonSizer(style); dlgsizer->Add(buttonbox, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 10); wxSizer *sizer = GetSizer(); sizer->SetSizeHints(this); /* wxLogDebug("message %d", message->GetSize().GetHeight()); sizer->SetMinSize(wxSize(sizer->GetMinSize().GetWidth(), img.GetHeight() + message->GetSize().GetHeight()+10)); wxLogDebug("message2 %d", message->GetSize().GetHeight()); sizer->SetSizeHints(this); wxLogDebug("message3 %d", message->GetSize().GetHeight()); wxSize s ; s = message->GetBestSize(); wxLogDebug("%d, %d", s.GetWidth(), s.GetHeight()); s = message->GetAdjustedBestSize(); wxLogDebug("%d, %d", s.GetWidth(), s.GetHeight()); */ Centre(); return;}
开发者ID:adafruit,项目名称:SpokePOV,代码行数:47,
示例17: wxDialogPadMapDiag::PadMapDiag(wxWindow* const parent, int map[]) : wxDialog(parent, wxID_ANY, _("Configure Pads"), wxDefaultPosition, wxDefaultSize) , m_mapping(map){ wxBoxSizer* const h_szr = new wxBoxSizer(wxHORIZONTAL); h_szr->AddSpacer(20); // labels wxBoxSizer* const label_szr = new wxBoxSizer(wxVERTICAL); label_szr->Add(new wxStaticText(this, wxID_ANY, _("Local")), 0, wxALIGN_TOP); label_szr->AddStretchSpacer(1); label_szr->Add(new wxStaticText(this, wxID_ANY, _("In-Game")), 0, wxALIGN_BOTTOM); h_szr->Add(label_szr, 1, wxTOP | wxEXPAND, 20); // set up choices wxString pad_names[5]; pad_names[0] = _("None"); for (unsigned int i=1; i<5; ++i) pad_names[i] = wxString(_("Pad ")) + (wxChar)(wxT('0')+i); for (unsigned int i=0; i<4; ++i) { wxChoice* const pad_cbox = m_map_cbox[i] = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 5, pad_names); pad_cbox->Select(m_mapping[i] + 1); pad_cbox->Bind(wxEVT_COMMAND_CHOICE_SELECTED, &PadMapDiag::OnAdjust, this); wxBoxSizer* const v_szr = new wxBoxSizer(wxVERTICAL); v_szr->Add(new wxStaticText(this,wxID_ANY, pad_names[i + 1]), 1, wxALIGN_CENTER_HORIZONTAL); v_szr->Add(pad_cbox, 1); h_szr->Add(v_szr, 1, wxTOP | wxEXPAND, 20); } h_szr->AddSpacer(20); wxBoxSizer* const main_szr = new wxBoxSizer(wxVERTICAL); main_szr->Add(h_szr); main_szr->AddSpacer(5); main_szr->Add(CreateButtonSizer(wxOK), 0, wxEXPAND | wxLEFT | wxRIGHT, 20); main_szr->AddSpacer(5); SetSizerAndFit(main_szr); SetFocus();}
开发者ID:Zombiebest,项目名称:Dolphin,代码行数:47,
示例18: wxDialogCDVRPTRClientPreferences::CDVRPTRClientPreferences(wxWindow* parent, int id, const wxString& callsign1, const wxString& callsign2, const wxString& readDevice, const wxString& writeDevice, DVRPTR_VERSION version, const wxString& port, bool rxInvert, bool txInvert, bool channel, unsigned int modLevel, unsigned int txDelay, const wxString& dvdDevice, const wxString& message, bool bleep) :wxDialog(parent, id, wxString(_("DVRPTR Client Preferences")), wxDefaultPosition, wxDefaultSize, wxRESIZE_BORDER | wxDEFAULT_DIALOG_STYLE),m_callsign(NULL),m_soundcard(NULL),m_modem(NULL),m_dongle(NULL),m_message(NULL),m_bleep(NULL){ wxBoxSizer* mainSizer = new wxBoxSizer(wxVERTICAL); wxNotebook* noteBook = new wxNotebook(this, -1); m_callsign = new CDVRPTRClientCallsignSet(noteBook, -1, APPLICATION_NAME, callsign1, callsign2); noteBook->AddPage(m_callsign, _("Callsign"), true); m_soundcard = new CSoundcardSet(noteBook, -1, APPLICATION_NAME, readDevice, writeDevice); noteBook->AddPage(m_soundcard, _("Sound Card"), false); m_modem = new CDVRPTRClientModemSet(noteBook, -1, APPLICATION_NAME, version, port, rxInvert, txInvert, channel, modLevel, txDelay); noteBook->AddPage(m_modem, _("Modem"), false); m_dongle = new CDVDongleSet(noteBook, -1, APPLICATION_NAME, dvdDevice); noteBook->AddPage(m_dongle, _("DV-Dongle"), false); m_message = new CMessageSet(noteBook, -1, APPLICATION_NAME, message); noteBook->AddPage(m_message, _("Message"), false); m_bleep = new CBleepSet(noteBook, -1, APPLICATION_NAME, bleep); noteBook->AddPage(m_bleep, _("Bleep"), false); mainSizer->Add(noteBook, 1, wxALL | wxGROW, BORDER_SIZE); mainSizer->Add(CreateButtonSizer(wxOK | wxCANCEL), 0, wxALL | wxALIGN_RIGHT, BORDER_SIZE); SetAutoLayout(true); Layout(); mainSizer->Fit(this); mainSizer->SetSizeHints(this); SetSizer(mainSizer);}
开发者ID:KH6VM,项目名称:OpenSystemFusion,代码行数:47,
示例19: wxDialogBreakPointDlg::BreakPointDlg(wxWindow* _Parent) : wxDialog(_Parent, wxID_ANY, _("Add Breakpoint")){ Bind(wxEVT_BUTTON, &BreakPointDlg::OnOK, this, wxID_OK); m_pEditAddress = new wxTextCtrl(this, wxID_ANY, "80000000"); const int space5 = FromDIP(5); wxBoxSizer* main_szr = new wxBoxSizer(wxVERTICAL); main_szr->AddSpacer(space5); main_szr->Add(m_pEditAddress, 0, wxEXPAND | wxLEFT | wxRIGHT, space5); main_szr->AddSpacer(space5); main_szr->Add(CreateButtonSizer(wxOK | wxCANCEL), 0, wxEXPAND | wxLEFT | wxRIGHT, space5); main_szr->AddSpacer(space5); SetSizerAndFit(main_szr); SetFocus();}
开发者ID:Anti-Ultimate,项目名称:dolphin,代码行数:17,
示例20: PathConfigDialogOViSEPathConfigDialog::OViSEPathConfigDialog( wxString PluginPath, wxString MediaPath, wxWindow* parent ) : PathConfigDialog( parent ){ this->mPluginDirPicker->SetPath( PluginPath ); this->mMediaDirPicker->SetPath( MediaPath ); wxSizer* ButtonSizer = CreateButtonSizer( wxOK | wxCANCEL ); if ( ButtonSizer ) { mMainSizer->Add( ButtonSizer, 0, wxEXPAND,5 ); this->Layout(); mMainSizer->SetSizeHints( this ); }}
开发者ID:LiMuBei,项目名称:ovise,代码行数:17,
示例21: CreateTextureXDialog CreateTextureXDialog(wxWindow* parent) : wxDialog(parent, -1, "Create Texture Definitions") { // Setup layout auto m_vbox = new wxBoxSizer(wxVERTICAL); SetSizer(m_vbox); // --- Format options --- auto frame = new wxStaticBox(this, -1, "Format"); auto framesizer = new wxStaticBoxSizer(frame, wxVERTICAL); m_vbox->Add(framesizer, 0, wxEXPAND | wxALL, UI::pad()); // Doom format rb_format_doom_ = new wxRadioButton( this, -1, "Doom (TEXTURE1 + PNAMES)", wxDefaultPosition, wxDefaultSize, wxRB_GROUP); rb_format_strife_ = new wxRadioButton(this, -1, "Strife (TEXTURE1 + PNAMES)"); rb_format_textures_ = new wxRadioButton(this, -1, "ZDoom (TEXTURES)"); WxUtils::layoutVertically( framesizer, { rb_format_doom_, rb_format_strife_, rb_format_textures_ }, wxSizerFlags(1).Expand().Border(wxALL, UI::pad())); // --- Source options --- frame = new wxStaticBox(this, -1, "Source"); framesizer = new wxStaticBoxSizer(frame, wxVERTICAL); m_vbox->Add(framesizer, 0, wxEXPAND | wxALL, UI::pad()); // New list rb_new_ = new wxRadioButton(this, -1, "Create New (Empty)", wxDefaultPosition, wxDefaultSize, wxRB_GROUP); framesizer->Add(rb_new_, 0, wxEXPAND | wxALL, UI::pad()); // Import from Base Resource Archive rb_import_bra_ = new wxRadioButton(this, -1, "Import from Base Resource Archive:"); framesizer->Add(rb_import_bra_, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, UI::pad()); // Add buttons m_vbox->Add(CreateButtonSizer(wxOK | wxCANCEL), 0, wxEXPAND | wxALL, UI::pad()); // Bind events rb_new_->Bind(wxEVT_RADIOBUTTON, &CreateTextureXDialog::onRadioNewSelected, this); rb_import_bra_->Bind(wxEVT_RADIOBUTTON, &CreateTextureXDialog::onRadioNewSelected, this); SetInitialSize(wxSize(-1, -1)); wxWindowBase::Layout(); }
开发者ID:sirjuddington,项目名称:SLADE,代码行数:45,
示例22: wxTYearDeleter::YearDeleter(wxFrame *frame, Database *database) :wxDialog(frame, wxID_ANY, wxT("Year deleter"), wxPoint(100,100), wxSize(500, 180), wxDEFAULT_DIALOG_STYLE | wxSTAY_ON_TOP){ this->database = database; wxStaticText *study_program_text = new wxStaticText(this, -1, "Study program:"); wxFont font = study_program_text->GetFont(); font.SetWeight(wxFONTWEIGHT_BOLD); study_program_text->SetFont(font); wxStaticText *year_text = new wxStaticText(this, -1, "Year:"); year_text->SetFont(font); wxArrayString *sp = database->getFaculties(); study_program = new wxComboBox(this, ID_DELETER_STUDY_PROGRAM, wxT(""), wxPoint(120,27), wxSize(300,25), *sp, wxCB_READONLY); study_program->SetSelection(0); wxArrayString *sy = database->getYears(study_program->GetValue()); year = new wxComboBox(this, wxID_ANY, wxT(""), wxPoint(120,67), wxSize(300,25), *sy, wxCB_READONLY); year->SetSelection(0); //Create button create = new wxButton(this, ID_DELETER_DELETE_YEAR, wxT("Delete")); if(year->GetCount() == 0) create->Enable(false); //Positioning of elements in dialog wxFlexGridSizer *flex = new wxFlexGridSizer(2, 2, 25, 10); flex->Add(study_program_text, 0, wxALIGN_RIGHT | wxTOP, 3); flex->Add(study_program, 0, wxALIGN_LEFT); flex->Add(year_text, 0, wxALIGN_RIGHT | wxTOP, 3); flex->Add(year, 0, wxALIGN_LEFT); wxBoxSizer *button_row = new wxBoxSizer(wxHORIZONTAL); button_row->Add(CreateButtonSizer(wxCANCEL), 0, wxALIGN_LEFT); button_row->AddStretchSpacer(1); button_row->Add(create, 0, wxALIGN_RIGHT); wxBoxSizer *column = new wxBoxSizer(wxVERTICAL); column->Add(flex, 0, wxALL | wxEXPAND, 10); column->Add(button_row, 0, wxRIGHT | wxLEFT | wxEXPAND, 10); SetSizer(column);}//CourseCreator
开发者ID:Fleppensteyn,项目名称:SE,代码行数:45,
示例23: wxDialogRemoteLoginDlg::RemoteLoginDlg(wxWindow *parent, const wxString& username, const wxString& site, bool askToSave): wxDialog (parent, -1, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER) { SetTitle (_("Login failed")); wxBoxSizer* mainSizer = new wxBoxSizer(wxVERTICAL); { wxStaticText* labelInfo = new wxStaticText(this, wxID_ANY, _("Please enter new login for/n") + site); mainSizer->Add(labelInfo, 0, wxALL, 5); wxFlexGridSizer* gridSizer = new wxFlexGridSizer(2,2, 0, 0); { gridSizer->AddGrowableCol(1); // col 2 is sizable wxStaticText* labelUsername = new wxStaticText(this, wxID_ANY, _("Username:")); gridSizer->Add(labelUsername, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); m_profileUsername = new wxTextCtrl(this, wxID_ANY); m_profileUsername->SetToolTip(_("Username for login")); gridSizer->Add(m_profileUsername, 1, wxEXPAND|wxALL, 5); wxStaticText* labelPassword = new wxStaticText(this, wxID_ANY, _("Password:")); gridSizer->Add(labelPassword, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); m_profilePassword = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD); m_profilePassword->SetToolTip(_("Password for login")); gridSizer->Add(m_profilePassword, 1, wxEXPAND|wxALL, 5); mainSizer->Add(gridSizer, 1, wxEXPAND|wxALL, 5); } m_saveProfile = new wxCheckBox(this, wxID_ANY, _("Save as profile")); mainSizer->Add(m_saveProfile, 0, wxALL, 5); // Buttons mainSizer->Add(CreateButtonSizer(wxOK|wxCANCEL), 0, wxEXPAND|wxALL, 5); } if (!askToSave) mainSizer->Hide(m_saveProfile); if (!username.empty()) { m_profileUsername->SetValue(username); m_profilePassword->SetFocus(); } else m_profileUsername->SetFocus(); SetSizerAndFit(mainSizer); Centre();}
开发者ID:baguatuzi,项目名称:e,代码行数:45,
示例24: wxBoxSizervoid S57QueryDialog::CreateControls(){ wxBoxSizer* topSizer = new wxBoxSizer( wxVERTICAL ); SetSizer( topSizer ); m_phtml = new wxHtmlWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO ); m_phtml->SetBorders( 5 ); m_phtml->SetMinSize( wxSize( 100, 100 ) ); // this will constrain the dialog, too topSizer->Add( m_phtml, 1, wxBOTTOM | wxEXPAND, 10 ); topSizer->FitInside( this ); wxSizer* ok = CreateButtonSizer( wxOK ); topSizer->Add( ok, 0, wxALIGN_CENTER_HORIZONTAL | wxBOTTOM, 5 );}
开发者ID:libai245,项目名称:wht1,代码行数:18,
示例25: CreateButtonSizerwxSizer *wxDialogBase::CreateSeparatedButtonSizer(long flags){ wxSizer *sizer = CreateButtonSizer(flags); if ( !sizer ) return NULL; // Mac Human Interface Guidelines recommend not to use static lines as // grouping elements#if wxUSE_STATLINE && !defined(__WXMAC__) wxBoxSizer *topsizer = new wxBoxSizer(wxVERTICAL); topsizer->Add(new wxStaticLine(this), wxSizerFlags().Expand().DoubleBorder(wxBOTTOM)); topsizer->Add(sizer, wxSizerFlags().Expand()); sizer = topsizer;#endif // wxUSE_STATLINE return sizer;}
开发者ID:BloodRedd,项目名称:gamekit,代码行数:18,
示例26: wxDialogScalarSelectionDialog::ScalarSelectionDialog(wxWindow* parent) : wxDialog(parent, wxID_ANY, "Select value"), m_type(typeid(void)){ wxBoxSizer* sizVert = new wxBoxSizer(wxVERTICAL); sizVert->AddSpacer(5); sizVert->Add(new wxStaticText(this, wxID_ANY, "Select a value")); sizVert->AddSpacer(2); m_pTextCtrl = new wxTextCtrl(this, wxID_ANY); //m_pTextCtrl->Bind(wxEVT_TEXT, &ScalarSelectionDialog::TextChanged, this); sizVert->Add(m_pTextCtrl); sizVert->AddSpacer(5); sizVert->Add(CreateButtonSizer(wxOK | wxCANCEL)); sizVert->AddSpacer(5); SetSizerAndFit(sizVert);}
开发者ID:petiaccja,项目名称:Excessive-Team-Graph,代码行数:18,
注:本文中的CreateButtonSizer函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ CreateChildren函数代码示例 C++ CreateButton函数代码示例 |