當前位置: 首頁>>代碼示例>>C++>>正文


C++ CreateButtonSizer函數代碼示例

本文整理匯總了C++中CreateButtonSizer函數的典型用法代碼示例。如果您正苦於以下問題:C++ CreateButtonSizer函數的具體用法?C++ CreateButtonSizer怎麽用?C++ CreateButtonSizer使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了CreateButtonSizer函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: wxDialog

CygwinDlg::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,代碼來源:CygwinDlg.cpp

示例2: wxNotebook

void 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,代碼來源:ConfigMain.cpp

示例3: wxDialog

EditServerListDlg::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,代碼來源:EditServerListDlg.cpp

示例4: wxDialog

AboutDolphin::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,代碼來源:AboutDolphin.cpp

示例5: CreateButtonSizer

wxSizer *wxDialogBase::CreateSeparatedButtonSizer(long flags)
{
    wxSizer *sizer = CreateButtonSizer(flags);
    if ( !sizer )
        return NULL;

    return CreateSeparatedSizer(sizer);
}
開發者ID:AaronDP,項目名稱:wxWidgets,代碼行數:8,代碼來源:dlgcmn.cpp

示例6: wxMultiChoiceDialog

ChoiceDialog::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,代碼來源:ChoiceDialog.cpp

示例7: wxDialog

SlitPropertiesDlg::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,代碼來源:myframe_events.cpp

示例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,代碼來源:TranslationEditorDialog.cpp

示例9: wxDialog

CARCodeAddEdit::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,代碼來源:ARCodeAddEdit.cpp

示例10: wxBoxSizer

void 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,代碼來源:nsDialogBase.cpp

示例11: wxDialog

UDPConfigDiag::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,代碼來源:UDPConfigDiag.cpp

示例12: wxBoxSizer

void 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,代碼來源:calreview_dialog.cpp

示例13: wxDialog

ConfigDialog::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,代碼來源:ConfigDialog.cpp

示例14: wxDialog

BreakPointDlg::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,代碼來源:BreakpointDlg.cpp

示例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,代碼來源:PaletteEntryPanel.cpp


注:本文中的CreateButtonSizer函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。