本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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();
}
示例5: CreateButtonSizer
wxSizer *wxDialogBase::CreateSeparatedButtonSizer(long flags)
{
wxSizer *sizer = CreateButtonSizer(flags);
if ( !sizer )
return NULL;
return CreateSeparatedSizer(sizer);
}
示例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();
}
示例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);
}
示例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();
}
示例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();
}
示例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 );
}
示例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();
}
示例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());
}
示例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);
}
示例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();
}
示例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();
}