本文整理汇总了C++中Layout函数 的典型用法代码示例。如果您正苦于以下问题:C++ Layout函数的具体用法?C++ Layout怎么用?C++ Layout使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Layout函数 的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: Create
//.........这里部分代码省略.........
BoxSizer6->Add(35,20,0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
StaticText2 = new wxStaticText(Panel1, ID_STATICTEXT2, _("Application Folder"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT2"));
wxFont StaticText2Font(10,wxFONTFAMILY_SWISS,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_BOLD,false,wxEmptyString,wxFONTENCODING_DEFAULT);
StaticText2->SetFont(StaticText2Font);
BoxSizer6->Add(StaticText2, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer5->Add(BoxSizer6, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer7 = new wxBoxSizer(wxHORIZONTAL);
BoxSizer7->Add(35,20,0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
StaticText1 = new wxStaticText(Panel1, ID_STATICTEXT1, _(" Please specify folder information about your application."), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT1"));
BoxSizer7->Add(StaticText1, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer5->Add(BoxSizer7, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer4->Add(BoxSizer5, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer4->Add(-1,-1,1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
StaticBitmap1 = new wxStaticBitmap(Panel1, wxID_ANY, wxBitmap(LinksOben_xpm), wxDefaultPosition, wxDefaultSize, 0, _T("wxID_ANY"));
BoxSizer4->Add(StaticBitmap1, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
Panel1->SetSizer(BoxSizer4);
BoxSizer4->Fit(Panel1);
BoxSizer4->SetSizeHints(Panel1);
BoxSizer1->Add(Panel1, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
StaticLine1 = new wxStaticLine(this, ID_STATICLINE1, wxDefaultPosition, wxSize(10,-1), wxLI_HORIZONTAL, _T("ID_STATICLINE1"));
BoxSizer1->Add(StaticLine1, 0, wxBOTTOM|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer2 = new wxBoxSizer(wxVERTICAL);
BoxSizer3 = new wxBoxSizer(wxHORIZONTAL);
BoxSizer3->Add(75,20,0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
text1 = new wxStaticText(this, ID_STATICTEXT3, _("Application destination base folder:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT3"));
wxFont text1Font(8,wxFONTFAMILY_SWISS,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_BOLD,false,wxEmptyString,wxFONTENCODING_DEFAULT);
text1->SetFont(text1Font);
BoxSizer3->Add(text1, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer3->Add(-1,-1,1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer2->Add(BoxSizer3, 0, wxBOTTOM|wxLEFT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer8 = new wxBoxSizer(wxHORIZONTAL);
BoxSizer8->Add(75,20,0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
chProgrammFolder = new wxChoice(this, ID_CHOICE1, wxDefaultPosition, wxSize(214,21), 0, 0, 0, wxDefaultValidator, _T("ID_CHOICE1"));
chProgrammFolder->SetSelection( chProgrammFolder->Append(_("program Files folder")) );
chProgrammFolder->Append(_("(custom)"));
BoxSizer8->Add(chProgrammFolder, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer8->Add(-1,-1,1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer2->Add(BoxSizer8, 0, wxLEFT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer9 = new wxBoxSizer(wxHORIZONTAL);
BoxSizer9->Add(75,20,0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
txtCustom = new wxTextCtrl(this, ID_TEXTCTRL1, wxEmptyString, wxDefaultPosition, wxSize(217,21), 0, wxDefaultValidator, _T("ID_TEXTCTRL1"));
txtCustom->Disable();
BoxSizer9->Add(txtCustom, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer9->Add(-1,-1,1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer2->Add(BoxSizer9, 0, wxTOP|wxLEFT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer10 = new wxBoxSizer(wxHORIZONTAL);
BoxSizer10->Add(75,20,0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
text2 = new wxStaticText(this, ID_STATICTEXT4, _("Application folder name:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT4"));
wxFont text2Font(8,wxFONTFAMILY_SWISS,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_BOLD,false,wxEmptyString,wxFONTENCODING_DEFAULT);
text2->SetFont(text2Font);
BoxSizer10->Add(text2, 1, wxTOP|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer10->Add(-1,-1,1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer2->Add(BoxSizer10, 0, wxTOP|wxLEFT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer11 = new wxBoxSizer(wxHORIZONTAL);
BoxSizer11->Add(75,20,0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
txtAppFolderName = new wxTextCtrl(this, ID_TEXTCTRL2, wxEmptyString, wxDefaultPosition, wxSize(221,21), 0, wxDefaultValidator, _T("ID_TEXTCTRL2"));
BoxSizer11->Add(txtAppFolderName, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer11->Add(-1,-1,1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer2->Add(BoxSizer11, 0, wxTOP|wxLEFT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer12 = new wxBoxSizer(wxHORIZONTAL);
BoxSizer12->Add(75,20,0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
cbAppFolderName = new wxCheckBox(this, ID_CHECKBOX1, _("Allow user to change the application folder"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_CHECKBOX1"));
cbAppFolderName->SetValue(true);
BoxSizer12->Add(cbAppFolderName, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer12->Add(-1,-1,1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer2->Add(BoxSizer12, 0, wxTOP|wxLEFT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer13 = new wxBoxSizer(wxHORIZONTAL);
BoxSizer13->Add(75,20,0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
StaticText5 = new wxStaticText(this, ID_STATICTEXT5, _("Otehr:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT5"));
BoxSizer13->Add(StaticText5, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer13->Add(-1,-1,1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer2->Add(BoxSizer13, 0, wxTOP|wxLEFT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer14 = new wxBoxSizer(wxHORIZONTAL);
BoxSizer14->Add(75,20,0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
cbDoesntFolder = new wxCheckBox(this, ID_CHECKBOX2, _("The application doesn\'t need a folder"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_CHECKBOX2"));
cbDoesntFolder->SetValue(false);
BoxSizer14->Add(cbDoesntFolder, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer14->Add(-1,-1,1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer2->Add(BoxSizer14, 0, wxTOP|wxLEFT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer1->Add(BoxSizer2, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer19 = new wxBoxSizer(wxHORIZONTAL);
BoxSizer19->Add(75,20,0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
StaticText7 = new wxStaticText(this, ID_STATICTEXT7, _("bold"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT7"));
StaticText7->Disable();
wxFont StaticText7Font(8,wxFONTFAMILY_SWISS,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_BOLD,false,_T("Arial"),wxFONTENCODING_DEFAULT);
StaticText7->SetFont(StaticText7Font);
BoxSizer19->Add(StaticText7, 0, wxLEFT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
StaticText8 = new wxStaticText(this, ID_STATICTEXT8, _("= required"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT8"));
StaticText8->Disable();
BoxSizer19->Add(StaticText8, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer1->Add(BoxSizer19, 0, wxLEFT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
SetSizer(BoxSizer1);
SetSizer(BoxSizer1);
Layout();
Connect(ID_CHOICE1,wxEVT_COMMAND_CHOICE_SELECTED,(wxObjectEventFunction)&ApplicationFolder::OnchProgrammFolderSelect);
Connect(ID_CHECKBOX2,wxEVT_COMMAND_CHECKBOX_CLICKED,(wxObjectEventFunction)&ApplicationFolder::OncbDoesntFolderClick);
//*)
SetSize( wxSize(480,320));
}
开发者ID:zinnjonas, 项目名称:cbInno, 代码行数:101, 代码来源:ApplicationFolder.cpp
示例2: wxBoxSizer
void WMain_wxg::do_layout()
{
// begin wxGlade: WMain_wxg::do_layout
wxBoxSizer* sizer_4 = new wxBoxSizer(wxVERTICAL);
wxBoxSizer* sizer_1 = new wxBoxSizer(wxVERTICAL);
wxStaticBoxSizer* sizer_10 = new wxStaticBoxSizer(sizer_10_staticbox, wxVERTICAL);
wxBoxSizer* sizer_2 = new wxBoxSizer(wxVERTICAL);
wxStaticBoxSizer* sizer_9 = new wxStaticBoxSizer(sizer_9_staticbox, wxVERTICAL);
wxFlexGridSizer* grid_sizer_3 = new wxFlexGridSizer(1, 7, 0, 0);
wxBoxSizer* sizer_7 = new wxBoxSizer(wxHORIZONTAL);
wxStaticBoxSizer* sizer_8 = new wxStaticBoxSizer(sizer_8_staticbox, wxVERTICAL);
wxFlexGridSizer* grid_sizer_2 = new wxFlexGridSizer(3, 2, 0, 0);
wxStaticBoxSizer* sizer_3 = new wxStaticBoxSizer(sizer_3_staticbox, wxVERTICAL);
wxFlexGridSizer* grid_sizer_1 = new wxFlexGridSizer(3, 2, 0, 0);
wxStaticText* label_1 = new wxStaticText(panel_Main, wxID_ANY, wxT("Data Type"));
grid_sizer_1->Add(label_1, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 4);
grid_sizer_1->Add(choice_DataType, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxSHAPED, 4);
wxStaticText* label_3 = new wxStaticText(panel_Main, wxID_ANY, wxT("Node Slots"));
grid_sizer_1->Add(label_3, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 4);
grid_sizer_1->Add(choice_NodeSlots, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxSHAPED, 4);
grid_sizer_1->Add(2, 2, 0, wxADJUST_MINSIZE, 0);
grid_sizer_1->Add(checkbox_Duplicates, 0, wxALL, 4);
grid_sizer_1->AddGrowableCol(0);
grid_sizer_1->AddGrowableCol(1);
sizer_3->Add(grid_sizer_1, 1, wxEXPAND, 0);
sizer_7->Add(sizer_3, 1, wxALL|wxEXPAND, 6);
sizer_8->Add(1, 1, 1, wxADJUST_MINSIZE, 0);
wxStaticText* label_5 = new wxStaticText(panel_Main, wxID_ANY, wxT("Key"));
grid_sizer_2->Add(label_5, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 4);
grid_sizer_2->Add(textctrl_Key, 0, wxALL|wxEXPAND, 4);
wxStaticText* label_6 = new wxStaticText(panel_Main, wxID_ANY, wxT("Data"));
grid_sizer_2->Add(label_6, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 4);
grid_sizer_2->Add(textctrl_Data, 1, wxALL|wxEXPAND, 4);
grid_sizer_2->AddGrowableCol(1);
sizer_8->Add(grid_sizer_2, 0, wxEXPAND, 0);
sizer_8->Add(1, 1, 1, wxADJUST_MINSIZE, 0);
sizer_7->Add(sizer_8, 1, wxRIGHT|wxTOP|wxBOTTOM|wxEXPAND, 6);
sizer_2->Add(sizer_7, 0, wxEXPAND, 0);
grid_sizer_3->Add(button_Insert, 0, wxLEFT|wxTOP|wxBOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 4);
grid_sizer_3->Add(button_Erase, 0, wxLEFT|wxTOP|wxBOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 4);
grid_sizer_3->Add(button_InsertRandom, 0, wxLEFT|wxTOP|wxBOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 4);
grid_sizer_3->Add(button_FindKey, 0, wxLEFT|wxTOP|wxBOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 4);
grid_sizer_3->Add(button_EqualRange, 0, wxLEFT|wxTOP|wxBOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 4);
grid_sizer_3->Add(button_Clear, 0, wxLEFT|wxTOP|wxBOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 4);
grid_sizer_3->Add(button_LoadFile, 0, wxALL, 4);
grid_sizer_3->AddGrowableCol(0);
grid_sizer_3->AddGrowableCol(1);
grid_sizer_3->AddGrowableCol(2);
grid_sizer_3->AddGrowableCol(3);
grid_sizer_3->AddGrowableCol(4);
grid_sizer_3->AddGrowableCol(5);
sizer_9->Add(grid_sizer_3, 0, wxEXPAND, 0);
sizer_9->Add(textctrl_OpResult, 0, wxALL|wxEXPAND, 4);
sizer_2->Add(sizer_9, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, 6);
sizer_1->Add(sizer_2, 0, wxEXPAND, 0);
sizer_10->Add(window_TreeDrawing, 1, wxALL|wxEXPAND, 2);
sizer_1->Add(sizer_10, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, 6);
panel_Main->SetSizer(sizer_1);
sizer_4->Add(panel_Main, 1, wxEXPAND, 0);
SetSizer(sizer_4);
sizer_4->Fit(this);
Layout();
Centre();
// end wxGlade
}
开发者ID:bingmann, 项目名称:bingmann.github.io, 代码行数:65, 代码来源:WMain_wxg.cpp
示例3: CalculateMinSize
bool wxRibbonGallery::Realize()
{
CalculateMinSize();
return Layout();
}
开发者ID:BloodRedd, 项目名称:gamekit, 代码行数:5, 代码来源:gallery.cpp
示例4: wxScrolledWindow
//.........这里部分代码省略.........
m_editor_box_sizer = new wxStaticBoxSizer( m_editor_box, wxVERTICAL );
m_editor_box_sizer->Add( m_editor_loc_sizer, 0, wxEXPAND | wxALL, 2 );
////////
wxStaticBoxSizer* m_autojoin_sizer= new wxStaticBoxSizer ( wxVERTICAL, this, _("Autoconnect") );
m_autoconnect_label = new wxStaticText ( this, -1, _("If checked, SpringLobby will automatically log on to the last used server") );
m_autojoin = new wxCheckBox( this, -1, _("Autoconnect on lobby start"), wxDefaultPosition, wxDefaultSize, 0 );
m_autojoin->SetValue( sett().GetAutoConnect() );
m_autojoin_sizer->Add( m_autoconnect_label, 1, wxEXPAND | wxALL, 5 );
m_autojoin_sizer->Add( m_autojoin, 0, wxEXPAND | wxALL, 5 );
wxStaticBoxSizer* m_reportstats_sizer = new wxStaticBoxSizer ( wxVERTICAL, this, _("Report statistics") );
m_reportstats_label = new wxStaticText ( this, -1, _("By default SpringLobby will send some statistics (OS,SpringLobby version) to server,\nto both make helping you in case of problems easier and inform of critical updates.\nUncheck to disable.") );
m_reportstats = new wxCheckBox( this, -1, _("report statistics"), wxDefaultPosition, wxDefaultSize, 0 );
m_reportstats->SetValue( sett().GetReportStats() );
m_reportstats_sizer->Add( m_reportstats_label, 1, wxEXPAND|wxALL, 5);
m_reportstats_sizer->Add( m_reportstats, 0, wxEXPAND|wxALL, 5);
m_main_sizer->Add( m_web_box_sizer, 0, wxEXPAND | wxALL, 5 );
m_main_sizer->Add( m_editor_box_sizer, 0, wxEXPAND | wxALL, 5 );
m_main_sizer->Add( m_autojoin_sizer, 0, wxALL, 5 );
m_main_sizer->Add( m_reportstats_sizer, 0, wxALL, 5 );
#ifdef __WXMSW__
wxStaticBoxSizer* m_updater_sizer = new wxStaticBoxSizer ( wxVERTICAL, this, _("Automatic updates") );
m_updater_label = new wxStaticText ( this, -1, _("SpringLobby can check at startup if a newer version is available and automatically download it for you.") );
m_updater = new wxCheckBox( this, -1, _("automatically check for updates"), wxDefaultPosition, wxDefaultSize, 0 );
m_updater->SetValue( sett().GetAutoUpdate() );
m_updater_sizer->Add( m_updater_label, 1, wxEXPAND|wxALL, 5);
m_updater_sizer->Add( m_updater, 0, wxEXPAND|wxALL, 5);
m_main_sizer->Add( m_updater_sizer, 0, wxALL, 5 );
#endif
wxStaticBoxSizer* m_show_tooltips_sizer = new wxStaticBoxSizer ( wxVERTICAL, this, _("Tooltips") );
m_show_tooltips = new wxCheckBox( this, -1, _("Show Tooltips?"), wxDefaultPosition, wxDefaultSize, 0 );
m_show_tooltips->SetValue( sett().GetShowTooltips() );
#ifndef __WXMSW__ // on windows this change is immediate
m_show_tooltips_label = new wxStaticText ( this, -1, _("Requires SpringLobby restart to take effect.") );
m_show_tooltips_sizer->Add( m_show_tooltips_label, 1, wxEXPAND|wxALL, 5);
#endif
m_show_tooltips_sizer->Add( m_show_tooltips, 0, wxEXPAND|wxALL, 5);
m_main_sizer->Add( m_show_tooltips_sizer, 0, wxALL, 5 );
wxStaticBoxSizer* m_complete_method_sizer = new wxStaticBoxSizer ( wxVERTICAL, this, _("Tab completion method") );
m_complete_method_label = new wxStaticText ( this, -1, _("\"Match exact\" will complete a word if there is one and only one match.\n"
"\"Match nearest\" will select the (first) match that has closest Levenshtein distance") );
m_complete_method_old = new wxRadioButton( this, -1, _("Match exact"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
m_complete_method_new = new wxRadioButton( this, -1, _("Match nearest"), wxDefaultPosition, wxDefaultSize );
m_complete_method_old->SetValue( sett().GetCompletionMethod() == Settings::MatchExact );
m_complete_method_new->SetValue( sett().GetCompletionMethod() == Settings::MatchNearest );
m_complete_method_sizer->Add( m_complete_method_label, 1, wxEXPAND|wxALL, 5);
m_complete_method_sizer->Add( m_complete_method_old, 0, wxEXPAND|wxALL, 5);
m_complete_method_sizer->Add( m_complete_method_new, 0, wxEXPAND|wxALL, 5);
m_main_sizer->Add( m_complete_method_sizer, 0, wxALL, 5 );
wxStaticBoxSizer* m_misc_gui_sizer = new wxStaticBoxSizer ( wxVERTICAL, this, _("Misc GUI") );
m_use_tabicons = new wxCheckBox( this, -1, _("Show big icons in mainwindow tabs?"), wxDefaultPosition, wxDefaultSize, 0 );
m_use_tabicons->SetValue( sett().GetUseTabIcons() );
m_misc_gui_sizer->Add( m_use_tabicons , 0, wxEXPAND | wxALL, 5 );
m_use_notif_popups = new wxCheckBox( this, -1, _("Use notification popups?"), wxDefaultPosition, wxDefaultSize, 0 );
m_misc_gui_sizer->Add( m_use_notif_popups, 0, wxEXPAND | wxALL, 5 );
m_notif_popup_pos_sizer = new wxBoxSizer( wxHORIZONTAL );
m_notif_popup_pos_label = new wxStaticText( this, -1, _("Screen position for notification popups") );
m_notif_popup_pos = new wxChoice( this, -1, wxDefaultPosition, wxDefaultSize, ScreenPosition() );
m_notif_popup_pos_sizer->Add( m_notif_popup_pos_label, 0, wxALL| wxALIGN_CENTER_VERTICAL, 5 );
m_notif_popup_pos_sizer->Add( m_notif_popup_pos, 0, wxALL| wxALIGN_CENTER_VERTICAL, 5 );
m_misc_gui_sizer->Add( m_notif_popup_pos_sizer, 0, wxEXPAND | wxALL, 0 );
m_notif_popup_time_sizer = new wxBoxSizer( wxHORIZONTAL );
m_notif_popup_time = new wxSpinCtrl( this, wxID_ANY );
m_notif_popup_time_label = new wxStaticText( this, -1, _("Display time for popup notifications in seconds") );
m_notif_popup_time_sizer->Add( m_notif_popup_time_label, 0, wxALL| wxALIGN_CENTER_VERTICAL, 5 );
m_notif_popup_time_sizer->Add( m_notif_popup_time, 0, wxALL| wxALIGN_CENTER_VERTICAL, 5 );
m_misc_gui_sizer->Add( m_notif_popup_time_sizer, 0, wxEXPAND | wxALL, 0 );
m_x_on_all_tabs = new wxCheckBox( this, -1, _("Show close button on all tabs? (needs restart to take effect)"), wxDefaultPosition, wxDefaultSize, 0 );
m_x_on_all_tabs->SetValue( sett().GetShowXallTabs() );
m_misc_gui_sizer->Add( m_x_on_all_tabs , 1, wxEXPAND | wxALL, 5 );
m_main_sizer->Add( m_misc_gui_sizer , 0, wxALL, 5 );
wxStaticBoxSizer* m_start_tab_sizer = new wxStaticBoxSizer ( wxHORIZONTAL, this, _("Start tab") );
m_start_tab = new wxChoice( this, -1, wxDefaultPosition, wxDefaultSize, MainWindow::GetTabNames() );
m_start_tab->SetSelection( sett().GetStartTab() );
wxStaticText* m_start_tab_label = new wxStaticText ( this, -1, _("Select which tab to show at startup") );
m_start_tab_sizer->Add( m_start_tab_label , 0, wxALIGN_CENTER_VERTICAL | wxEXPAND | wxALL, 5 );
m_start_tab_sizer->Add( m_start_tab , 0, wxALIGN_CENTER_VERTICAL , 5 );
m_main_sizer->Add( m_start_tab_sizer, 0, wxALL, 5 );
//dummy event that updates controls to correct state
wxCommandEvent evt;
OnRestore( evt );
SetScrollRate( SCROLL_RATE, SCROLL_RATE );
SetSizer( m_main_sizer );
Layout();
}
开发者ID:tvo, 项目名称:springlobby, 代码行数:101, 代码来源:lobbyoptionstab.cpp
示例5: gcFrame
//.........这里部分代码省略.........
fgSizerAltLogin->Add(15, 0, 1, wxEXPAND, 5);
fgSizerAltLogin->Add(m_butTwitter, 0, 0, 5);
fgSizerAltLogin->Add(0, 0, 1, wxEXPAND, 5);
fgSizerAltLogin->Add(m_butSteam, 0, 0, 5);
fgSizerAltLogin->Add(0, 0, 1, wxEXPAND, 5);
fgSizerAltLogin->Add(m_butFacebook, 0, 0, 5);
fgSizerAltLogin->Add(0, 0, 1, wxEXPAND, 5);
fgSizerAltLogin->Add(m_butGoogle, 0, 0, 5);
fgSizerAltLogin->Add(15, 0, 1, wxEXPAND, 5);
wxFlexGridSizer* fgSizer2 = new wxFlexGridSizer( 6, 1, 0, 0 );
fgSizer2->SetFlexibleDirection( wxBOTH );
fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
fgSizer2->Add( m_imgLogo, 1, wxTOP|wxBOTTOM|wxALIGN_CENTER_HORIZONTAL, 5 );
fgSizer2->Add( fgSizer3, 1, wxEXPAND, 5 );
fgSizer2->Add(0, 9, 1, wxEXPAND, 5);
fgSizer2->Add(fgSizer5, 1, wxEXPAND, 5);
fgSizer2->Add(0, 9, 1, wxEXPAND, 5);
fgSizer2->Add(fgSizerAltLogin, 1, wxEXPAND, 5);
wxFlexGridSizer* fgSizer1 = new wxFlexGridSizer( 1, 3, 0, 0 );
fgSizer1->AddGrowableCol( 0 );
fgSizer1->AddGrowableCol( 2 );
fgSizer1->AddGrowableRow( 0 );
fgSizer1->SetFlexibleDirection( wxBOTH );
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer1->Add( fgSizer2, 1, wxEXPAND, 5 );
fgSizer1->Add( 0, 15, 1, wxEXPAND|wxBOTTOM, 15 );
this->SetSizer( fgSizer1 );
this->Layout();
m_bSavePos = false;
m_vTabOrder.push_back(m_tbUsername);
m_vTabOrder.push_back(m_tbPasswordDisp);
m_vTabOrder.push_back(m_tbPassword);
m_vTabOrder.push_back(m_cbRemPass);
m_vTabOrder.push_back(m_butSignin);
m_vTabOrder.push_back(m_butCancel);
m_vTabOrder.push_back(m_linkOffline);
m_vTabOrder.push_back(m_linkNewAccount);
m_vTabOrder.push_back(m_linkLostPassword);
Centre(wxCENTRE_ON_SCREEN);
SetFocus();
if (gc_login_x.getInt() == -1 || gc_login_y.getInt() == -1)
{
int x = wxSystemSettings::GetMetric(wxSYS_SCREEN_X);
int y = wxSystemSettings::GetMetric(wxSYS_SCREEN_Y);
int w=0;
int h=0;
GetSize(&w, &h);
int newX = (x-w)/2;
int newY = (y-h)/2;
if (newX>0 && newY>0)
SetSize(newX, newY, -1, -1);
}
开发者ID:Mailaender, 项目名称:desura-app, 代码行数:67, 代码来源:LoginForm.cpp
示例6: m_battle
SingleOptionDialog::SingleOptionDialog( IBattle& battle, const wxString& optiontag )
: m_battle( battle ),
m_tag( optiontag ),
m_checkbox( 0 ),
m_combobox( 0 ),
m_spinctrl( 0 ),
m_textctrl( 0 )
{
OptionsWrapper& optWrap = m_battle.CustomBattleOptions();
OptionsWrapper::GameOption optFlag = ( OptionsWrapper::GameOption )s2l( optiontag.BeforeFirst( '_' ) );
wxString key = optiontag.AfterFirst( '_' );
OptionType type = optWrap.GetSingleOptionType( key );
Create( (wxWindow*)&ui().mw(), wxID_ANY, _( "Change option" ), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T( "OptionDialog" ) );
if ( !optWrap.keyExists( key, optFlag, false, type ) )
{
EndModal( wxID_CANCEL );
return;
}
wxBoxSizer* m_main_sizer = new wxBoxSizer( wxVERTICAL );
// wxStaticText* m_labelctrl = wxStaticText();
switch ( type )
{
case opt_bool:
{
mmOptionBool opt = optWrap.m_opts[optFlag].bool_map[key];
m_checkbox = new wxCheckBox( this, wxID_ANY, opt.name );
m_checkbox->SetToolTip( TE( opt.description ) );
m_checkbox->SetValue( opt.value );
m_main_sizer->Add( m_checkbox, 0, wxEXPAND );
break;
}
case opt_float:
{
mmOptionFloat opt = optWrap.m_opts[optFlag].float_map[key];
m_spinctrl = new SlSpinCtrlDouble<SingleOptionDialog>();
m_spinctrl->Create( this, wxID_ANY, _T( "" ), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, double( opt.min ), double( opt.max ), double( opt.value ), double( opt.stepping ), opt.key );
m_spinctrl->SetToolTip( TE( opt.description ) );
m_main_sizer->Add( m_spinctrl, 0, wxEXPAND );
break;
}
case opt_string:
{
mmOptionString opt = optWrap.m_opts[optFlag].string_map[key];
m_textctrl = new wxTextCtrl( this, wxID_ANY, opt.value, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, opt.key );
m_textctrl->SetToolTip( TE( opt.description ) );
m_main_sizer->Add( m_textctrl, 0, wxEXPAND );
break;
}
case opt_list:
{
mmOptionList opt = optWrap.m_opts[optFlag].list_map[key];
int temp = int( opt.cbx_choices.GetCount() - 1 );
int index = clamp( opt.cur_choice_index, 0, temp );
m_combobox = new wxComboBox( this, wxID_ANY, opt.cbx_choices[index], wxDefaultPosition, wxDefaultSize, opt.cbx_choices, wxCB_READONLY, wxDefaultValidator );
wxString tooltip = opt.description + _T( "\n" );
for ( ListItemVec::iterator itor = opt.listitems.begin(); itor != opt.listitems.end(); itor++ )
{
tooltip += _T( "\n" ) + itor->name + _T( ": " ) + itor->desc;
}
m_combobox->SetToolTip( TE( tooltip ) );
m_main_sizer->Add( m_combobox, 0, wxEXPAND );
break;
}
default:
{
EndModal( wxID_CANCEL );
return;
break;
}
}
wxSize __SpacerSize_1 = wxDLG_UNIT( this, wxSize( 0, 0 ) );
m_main_sizer->Add( __SpacerSize_1.GetWidth(), __SpacerSize_1.GetHeight(), 0, wxALL | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL, 5 );
wxStaticLine* m_separator1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxSize( 10, -1 ), wxLI_HORIZONTAL, _T( "ID_STATICLINE1" ) );
m_main_sizer->Add( m_separator1, 0, wxALL | wxEXPAND | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL, 5 );
wxBoxSizer* m_buttons_sizer = new wxBoxSizer( wxHORIZONTAL );
m_cancel_button = new wxButton( this, ID_CANCEL, _( "Cancel" ), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T( "ID_CANCEL" ) );
m_buttons_sizer->Add( m_cancel_button, 0, wxALL | wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, 5 );
m_buttons_sizer->Add( 0, 0, 1, wxALL | wxEXPAND | wxSHAPED | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL, 0 );
m_ok_button = new wxButton( this, ID_OK, _( "Ok" ), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T( "ID_OK" ) );
m_buttons_sizer->Add( m_ok_button, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, 5 );
m_main_sizer->Add( m_buttons_sizer, 0, wxALL | wxEXPAND | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL, 0 );
m_main_sizer->Fit( this );
m_main_sizer->SetSizeHints( this );
SetSizer( m_main_sizer );
Layout();
Connect( ID_CANCEL, wxEVT_COMMAND_BUTTON_CLICKED, ( wxObjectEventFunction )&SingleOptionDialog::OnCancel );
Connect( ID_OK, wxEVT_COMMAND_BUTTON_CLICKED, ( wxObjectEventFunction )&SingleOptionDialog::OnOk );
}
开发者ID:tvo, 项目名称:springlobby, 代码行数:96, 代码来源:mmoptionwindows.cpp
示例7: wxWizardPageSimple
CPageAuto::CPageAuto(
CDialogExportSetup *parent,
wxWizardPageSimple *prev,
CXSLExportFileType *pExportEdit,
bool bReadOnly) :
wxWizardPageSimple(parent,prev,NULL),
m_pExportEdit(pExportEdit),
m_pCheckActive(NULL),
m_pCheckAppendDate(NULL),
m_pComboLocation(NULL),
m_pComboFileName(NULL),
m_pComboFileExt(NULL),
m_pTextLocation(NULL),
m_pTextFileName(NULL),
m_pTextFileExt(NULL),
m_pButtonBrowse(NULL),
m_bReadOnly(bReadOnly)
{
// m_pCheckActive
prev->SetNext(this);
m_pCheckActive = new wxCheckBox(
this,wxID_ANY,_T("Create export file after each analysis"));
// m_pComboLocation
wxStaticText *pTextLocation = new wxStaticText(
this,wxID_ANY,_T("Location"));
wxWindow *pWinLocation = _CreateLocationWindow();
wxBoxSizer *pSizerLocation = new wxBoxSizer(wxHORIZONTAL);
if(!m_bReadOnly)
{
m_pButtonBrowse = new wxButton(
this,IDbrowseOutput,_T("Browse..."),
wxDefaultPosition, wxDefaultSize,
wxBU_EXACTFIT);
pSizerLocation->Add(pWinLocation,1,wxEXPAND | wxRIGHT , ID_BORDER);
pSizerLocation->Add(m_pButtonBrowse,0,wxALIGN_CENTER_VERTICAL,0);
}
else
{
pSizerLocation->Add(pWinLocation,1,wxEXPAND,0);
}
// m_pComboFileName
wxArrayString as;
if(!m_bReadOnly)
{
as.Alloc(1);
as.Add(ANALYSIS_FILE_NAME);
}
wxStaticText *pTextFileName = new wxStaticText(
this,wxID_ANY,_T("File name"));
wxWindow *pWinFileName = _CreateFileNameWindow(as);
m_pCheckAppendDate = new wxCheckBox(
this,wxID_ANY,_T("Append date to file name"));
// m_pComboFileExt
wxStaticText *pTextExt = new wxStaticText(
this,wxID_ANY,_T("File extension"));
wxWindow *pWinFileExt = _CreateFileExtWindow();
// layout
wxBoxSizer *pSizerAll = new wxBoxSizer(wxVERTICAL);
wxFlexGridSizer *pGridSizer = new wxFlexGridSizer(3,2,ID_BORDER,ID_BORDER);
wxBoxSizer *pSizerFileName = new wxBoxSizer(wxVERTICAL);
pGridSizer->SetFlexibleDirection(wxBOTH);
pGridSizer->AddGrowableCol(1,1);
pGridSizer->Add(pTextLocation,0,
wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL);
pGridSizer->Add(pSizerLocation,1,
wxEXPAND | wxALIGN_CENTRE_VERTICAL | wxEXPAND);
pGridSizer->Add(pTextFileName,0,
wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL);
pSizerFileName->Add(pWinFileName,0,wxALIGN_LEFT | wxEXPAND,0);
pSizerFileName->Add(m_pCheckAppendDate,0,wxTOP | wxALIGN_LEFT,1);
pGridSizer->Add(pSizerFileName,1,
wxEXPAND | wxALIGN_CENTRE_VERTICAL | wxEXPAND);
pGridSizer->Add(pTextExt,0,
wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL);
pGridSizer->Add(pWinFileExt,1,
wxEXPAND | wxALIGN_CENTRE_VERTICAL | wxEXPAND,0);
pSizerAll->Add(m_pCheckActive,0, wxALIGN_LEFT | wxBOTTOM, ID_BORDER);
pSizerAll->Add(pGridSizer, 0, wxEXPAND);
pSizerAll->AddStretchSpacer(1);
SetSizer(pSizerAll);
Layout();
}
开发者ID:ForensicBioinformatics, 项目名称:osiris, 代码行数:93, 代码来源:CPageAuto.cpp
示例8: wxDialog
//.........这里部分代码省略.........
// Create the main sizer
wxBoxSizer *vs = new wxBoxSizer(wxVERTICAL);
// A little instruction
vs->Add(new wxStaticText(this,
wxID_ANY,
_("Press F2 or double click to edit cell contents.")),
0,
wxALIGN_LEFT | wxALL,
5);
// Create the main sizer
mGrid = new Grid(this, wxID_ANY);
vs->Add(mGrid, 1, wxEXPAND | wxALL, 5);
// Create the action buttons
wxBoxSizer *hs = new wxBoxSizer(wxHORIZONTAL);
hs->Add(new wxButton(this, ID_INSERTA, _("Insert &After")), 1, wxCENTER | wxALL, 5);
hs->Add(new wxButton(this, ID_INSERTB, _("Insert &Before")), 1, wxCENTER | wxALL, 5);
hs->Add(new wxButton(this, ID_REMOVE, _("&Remove")), 1, wxCENTER | wxALL, 5);
hs->Add(new wxButton(this, ID_IMPORT, _("&Import...")), 1, wxCENTER | wxALL, 5);
hs->Add(new wxButton(this, ID_EXPORT, _("&Export...")), 1, wxCENTER | wxALL, 5);
vs->Add(hs, 0, wxEXPAND | wxCENTER | wxALL, 5);
// Create the exit buttons
vs->Add(CreateStdButtonSizer(this, eCancelButton|eOkButton), 0, wxEXPAND);
// Make it so
SetSizer(vs);
// Build the initial (empty) grid
mGrid->CreateGrid(0, Col_Max);
mGrid->SetDefaultCellAlignment(wxALIGN_LEFT, wxALIGN_CENTER);
int i;
for (i = 0; i < Col_Max; i++) {
mGrid->SetColLabelValue(i, headers[i]);
}
// Create and remember editors. No need to delete these as the wxGrid will
// do it for us.
mChoiceEditor = (ChoiceEditor *) mGrid->GetDefaultEditorForType(GRID_VALUE_CHOICE);
mTimeEditor = (TimeEditor *) mGrid->GetDefaultEditorForType(GRID_VALUE_TIME);
// Initialize and set the track name column attributes
wxGridCellAttr *attr = new wxGridCellAttr();
attr->SetEditor(mChoiceEditor);
mGrid->SetColAttr(Col_Track, attr);
mTrackNames.Add(_("New..."));
// Initialize and set the time column attributes
attr = new wxGridCellAttr();
attr->SetRenderer(mGrid->GetDefaultRendererForType(GRID_VALUE_TIME));
attr->SetEditor(mTimeEditor);
attr->SetAlignment(wxALIGN_CENTER, wxALIGN_CENTER);
mGrid->SetColAttr(Col_Stime, attr);
mGrid->SetColAttr(Col_Etime, attr->Clone());
// Seems there's a bug in wxGrid. Adding only 1 row does not
// allow SetCellSize() to work properly and you will not get
// the expected 1 row by 4 column cell.
//
// So, we set the minimum row height to 0 and basically hide
// the extra row by setting its height to 0. And not allowing the
// rows to be manually resized prevents the user from ever seeing
// the extra row.
mGrid->SetRowMinimalAcceptableHeight(0);
mGrid->EnableDragRowSize(false);
// Locate all labels in current track list
FindAllLabels();
// Populate the grid
TransferDataToWindow();
// Resize the label name column and ensure it doesn't go below an
// arbitrary width.
//
// This should not be in TransferDataToWindow() since a user might
// resize the column and we'd resize it back to the minimum.
mGrid->AutoSizeColumn(Col_Label, false );
mGrid->SetColSize(Col_Label, wxMax(150, mGrid->GetColSize(Col_Label)));
mGrid->SetColMinimalWidth(Col_Label, mGrid->GetColSize(Col_Label));
// Layout the works
Layout();
// Resize width based on width of columns and the vertical scrollbar
wxRect r = mGrid->GetGridColLabelWindow()->GetRect();
wxScrollBar sb(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSB_VERTICAL);
r.width += sb.GetSize().GetWidth() + 6;
SetClientSize(r.width, 300);
// Make sure it doesn't go below this size
r = GetRect();
SetSizeHints(r.GetWidth(), r.GetHeight());
// Center on display
Center();
}
开发者ID:ruthmagnus, 项目名称:audacity, 代码行数:101, 代码来源:LabelDialog.cpp
示例9: Layout
menu_layout
TExpandoMenuBar::MenuLayout() const
{
return Layout();
}
开发者ID:michael-manley, 项目名称:haiku, 代码行数:5, 代码来源:ExpandoMenuBar.cpp
示例10: PromptDlgPassword
//.........这里部分代码省略.........
-1,
_("Authentication Required"),
wxDefaultPosition,
wxSize(400, 200),
wxDEFAULT_DIALOG_STYLE |
wxCENTER)
{
// create the username sizer
wxStaticText* label_username = new wxStaticText(this,
-1,
_("User Name:"),
wxDefaultPosition,
wxDefaultSize);
m_username_ctrl = new wxTextCtrl(this, ID_UsernameTextCtrl, m_username);
wxBoxSizer* username_sizer = new wxBoxSizer(wxHORIZONTAL);
username_sizer->Add(label_username, 0, wxALIGN_CENTER);
username_sizer->Add(m_username_ctrl, 1, wxEXPAND);
// create the password sizer
wxStaticText* label_password = new wxStaticText(this,
-1,
_("Password:"),
wxDefaultPosition,
wxDefaultSize);
m_password_ctrl = new wxTextCtrl(this,
ID_PasswordTextCtrl,
wxEmptyString,
wxDefaultPosition,
wxDefaultSize,
wxTE_PASSWORD);
wxBoxSizer* password_sizer = new wxBoxSizer(wxHORIZONTAL);
password_sizer->Add(label_password, 0, wxALIGN_CENTER);
password_sizer->Add(m_password_ctrl, 1, wxEXPAND);
// create a platform standards-compliant OK/Cancel sizer
wxButton* ok_button = new wxButton(this, wxID_OK);
wxButton* cancel_button = new wxButton(this, wxID_CANCEL);
wxStdDialogButtonSizer* ok_cancel_sizer = new wxStdDialogButtonSizer;
ok_cancel_sizer->AddButton(ok_button);
ok_cancel_sizer->AddButton(cancel_button);
ok_cancel_sizer->Realize();
ok_cancel_sizer->AddSpacer(5);
ok_button->SetDefault();
// this code is necessary to get the sizer's bottom margin to 8
wxSize min_size = ok_cancel_sizer->GetMinSize();
min_size.SetHeight(min_size.GetHeight()+16);
ok_cancel_sizer->SetMinSize(min_size);
// code to allow us to line up the static text elements
wxSize s1 = label_username->GetSize();
wxSize s2 = label_password->GetSize();
wxSize max_size = wxSize(wxMax(s1.x, s2.x), wxMax(s1.y, s2.y));
max_size.x += 10;
username_sizer->SetItemMinSize(label_username, max_size);
password_sizer->SetItemMinSize(label_password, max_size);
// create username/password sizer
wxBitmap bmp = wxArtProvider::GetBitmap(wxART_QUESTION, wxART_MESSAGE_BOX);
wxStaticBitmap* bitmap_question = new wxStaticBitmap(this, -1, bmp);
m_message_ctrl = new wxStaticText(this, -1, m_message);
wxBoxSizer* vert_sizer = new wxBoxSizer(wxVERTICAL);
vert_sizer->Add(m_message_ctrl, 0, wxEXPAND);
vert_sizer->AddSpacer(16);
vert_sizer->Add(username_sizer, 0, wxEXPAND);
vert_sizer->AddSpacer(8);
vert_sizer->Add(password_sizer, 0, wxEXPAND);
// create top sizer
wxBoxSizer* top_sizer = new wxBoxSizer(wxHORIZONTAL);
top_sizer->AddSpacer(7);
top_sizer->Add(bitmap_question, 0, wxTOP, 7);
top_sizer->AddSpacer(15);
top_sizer->Add(vert_sizer, 1, wxEXPAND | wxTOP, 7);
// create main sizer
wxBoxSizer* main_sizer = new wxBoxSizer(wxVERTICAL);
main_sizer->AddSpacer(8);
main_sizer->Add(top_sizer, 0, wxEXPAND | wxLEFT | wxRIGHT, 8);
main_sizer->AddStretchSpacer();
main_sizer->Add(ok_cancel_sizer, 0, wxEXPAND);
SetSizer(main_sizer);
Layout();
}
开发者ID:adrianodelvigna, 项目名称:wxwebconnect, 代码行数:101, 代码来源:promptservice.cpp
示例11: wxScrolledWindow
//.........这里部分代码省略.........
m_ts_color = new ColorButton( m_custom_colors, ID_TIMESTAMP, wxBitmap(), wxDefaultPosition, wxSize( 20, 20 ), 0 );
m_ts_color->SetColor( wxColour( 160, 160, 160 ) );
bTSColorSizer->Add( m_ts_color, 0, wxALL, 5 );
m_ts_label = new wxStaticText( m_custom_colors, wxID_ANY, _( "Timestamp" ), wxDefaultPosition, wxDefaultSize, 0 );
m_ts_label->Wrap( -1 );
bTSColorSizer->Add( m_ts_label, 1, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
bColorSizer2->Add( bTSColorSizer, 0, wxEXPAND, 5 );
wxBoxSizer* bNoteColorSizer;
bNoteColorSizer = new wxBoxSizer( wxHORIZONTAL );
m_note_color = new ColorButton( m_custom_colors, ID_NOTIFICATION, wxBitmap(), wxDefaultPosition, wxSize( 20, 20 ), 0 );
m_note_color->SetColor( wxColour( 255, 191, 0 ) );
bNoteColorSizer->Add( m_note_color, 0, wxALL, 5 );
m_note_label = new wxStaticText( m_custom_colors, wxID_ANY, _( "Notification" ), wxDefaultPosition, wxDefaultSize, 0 );
m_note_label->Wrap( -1 );
bNoteColorSizer->Add( m_note_label, 1, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
bColorSizer2->Add( bNoteColorSizer, 0, wxEXPAND, 5 );
bColorSizer->Add( bColorSizer2, 1, wxEXPAND, 5 );
bCustomColorsSizer->Add( bColorSizer, 1, wxEXPAND, 5 );
m_test_text = new wxTextCtrl( m_custom_colors, wxID_ANY, _( "[19:35] ** Server ** Connected to Server.\n[22:30] <Dude> hi everyone\n[22:30] ** Dude2 joined the channel.\n[22:30] * Dude2 thinks his colors looks nice\n[22:45] <Dude> Dude2: orl?\n[22:46] <Dude2> But could be better, should tweak them some more...\n" ), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH );
bCustomColorsSizer->Add( m_test_text, 1, wxALL | wxEXPAND, 5 );
m_custom_colors->SetSizer( bCustomColorsSizer );
m_custom_colors->Layout();
bCustomColorsSizer->Fit( m_custom_colors );
bColorsVSizer->Add( m_custom_colors, 1, wxEXPAND | wxALL, 0 );
wxBoxSizer* bFontNameSizer;
bFontNameSizer = new wxBoxSizer( wxHORIZONTAL );
m_font_label = new wxStaticText( this, wxID_ANY, _( "Font:" ), wxDefaultPosition, wxDefaultSize, 0 );
m_font_label->Wrap( -1 );
bFontNameSizer->Add( m_font_label, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5 );
m_fontname = new wxStaticText( this, wxID_ANY, _( "default" ), wxDefaultPosition, wxDefaultSize, 0 );
m_fontname->Wrap( -1 );
bFontNameSizer->Add( m_fontname, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5 );
m_select_font = new wxButton( this, ID_SELFONT, _( "Select..." ), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
bFontNameSizer->Add( m_select_font, 0, wxALL, 5 );
bColorsVSizer->Add( bFontNameSizer, 0, wxEXPAND, 5 );
sbColorsSizer->Add( bColorsVSizer, 1, wxEXPAND, 5 );
bMainSizerV->Add( sbColorsSizer, 0, wxEXPAND | wxBOTTOM | wxRIGHT | wxLEFT | wxTOP, 5 );
wxStaticBoxSizer* sbBehaviorSizer;
sbBehaviorSizer = new wxStaticBoxSizer( new wxStaticBox( this, -1, _( "Behavior" ) ), wxHORIZONTAL );
m_irc_colors = new wxCheckBox( this, wxID_ANY, _( "Enable Irc colors in chat messages" ), wxDefaultPosition, wxDefaultSize, 0 );
m_irc_colors->SetValue( sett().GetUseIrcColors() );
sbBehaviorSizer->Add( m_irc_colors, 0, wxALL, 5 );
#ifndef DISABLE_SOUND
开发者ID:Mailaender, 项目名称:springlobby, 代码行数:67, 代码来源:chatoptionstab.cpp
示例12: wxFileConfig
void GameSettings::readConfiguration()
{
wxString value;
int index;
// Open the Configfile
conf = new wxFileConfig(wxEmptyString, wxEmptyString, wxT("keeperfx.cfg"),
wxEmptyString, wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_RELATIVE_PATH);
// There's no point in editing these
value = conf->Read(wxT("INSTALL_PATH"), wxT("./"));
installPath = value;
value = conf->Read(wxT("INSTALL_TYPE"), wxT("MAX"));
installType = value;
value = conf->Read(wxT("KEYBOARD"), wxT("101"));
keybLayout = value;
value = conf->Read(wxT("LANGUAGE"), supported_languages_code[0]);
index = optionIndexInArray(supported_languages_code, WXSIZEOF(supported_languages_code), value);
langRadio->SetSelection((index>=0)?index:0);
value = conf->Read(wxT("SCREENSHOT"), supported_scrshotfmt_code[0]);
index = optionIndexInArray(supported_scrshotfmt_code, WXSIZEOF(supported_scrshotfmt_code), value);
scrshotRadio->SetSelection((index>=0)?index:0);
int res_full_num = 0, res_wind_num = 0;
value = conf->Read(wxT("FRONTEND_RES"), wxT("640x480x32 640x480x32 640x480x32"));
{
wxStringTokenizer tokenz(value, wxT(" \t\r\n"));
index = 0;
while ( tokenz.HasMoreTokens() )
{
wxString param = tokenz.GetNextToken();
if (param.rfind('w') != wxString::npos)
res_wind_num++;
else
res_full_num++;
switch (index)
{
case 0:
resFailCombo->SetValue(param);
break;
case 1:
resMovieCombo->SetValue(param);
break;
case 2:
resMenuCombo->SetValue(param);
break;
}
index++;
}
}
value = conf->Read(wxT("INGAME_RES"), wxT("640x480x32 1024x768x32"));
{
wxString selected_resolutions[5];
size_t selected_num;
wxString disabled_resolution;
wxStringTokenizer tokenz(value, wxT(" \t\r\n"));
disabled_resolution = resFailCombo->GetValue();
selected_num=0;
while ( tokenz.HasMoreTokens() && (selected_num < 5) )
{
wxString param = tokenz.GetNextToken();
if (param.rfind('w') != wxString::npos)
res_wind_num++;
else
res_full_num++;
if (param.CmpNoCase(disabled_resolution) != 0)
{
selected_resolutions[selected_num] = param;
selected_num++;
}
}
// Now we have the amount of fullscreen and windowed resolutions ready
if ((res_wind_num > 0) && (res_full_num > 0))
index = 2;
else if (res_wind_num > 0)
index = 1;
else
index = 0;
scrnControlRadio->SetSelection(index);
// SetSelection() doesn't generate event to update resolution options, so lrt's call it:
ChangeResolutionOptions(index);
Layout();
// Set in-game resolutions
resIngameBox->SetSelected(4, selected_resolutions, selected_num);
}
index = conf->Read(wxT("POINTER_SENSITIVITY"), 100);
value = wxString::Format(wxT("%d"), (int)index);
mouseSensitvTxtCtrl->SetValue(value);
value = conf->Read(wxT("CENSORSHIP"), supported_boolean_code[0]);
index = optionIndexInArray(supported_boolean_code, WXSIZEOF(supported_boolean_code), value);
censorChkBx->SetValue((index>=0)?index:0);
}
开发者ID:dsserega, 项目名称:keeperfx, 代码行数:97, 代码来源:GameSettings.cpp
示例13: ChangeResolutionOptions
void GameSettings::OnScreenCtrlChange(wxCommandEvent& event)
{
// Change screen control
ChangeResolutionOptions(event.GetInt());
Layout();
}
开发者ID:dsserega, 项目名称:keeperfx, 代码行数:6, 代码来源:GameSettings.cpp
六六分期app的软件客服如何联系?不知道吗?加qq群【895510560】即可!标题:六六分期
阅读:18229| 2023-10-27
今天小编告诉大家如何处理win10系统火狐flash插件总是崩溃的问题,可能很多用户都不知
阅读:9664| 2022-11-06
今天小编告诉大家如何对win10系统删除桌面回收站图标进行设置,可能很多用户都不知道
阅读:8174| 2022-11-06
今天小编告诉大家如何对win10系统电脑设置节能降温的设置方法,想必大家都遇到过需要
阅读:8546| 2022-11-06
我们在使用xp系统的过程中,经常需要对xp系统无线网络安装向导设置进行设置,可能很多
阅读:8452| 2022-11-06
今天小编告诉大家如何处理win7系统玩cf老是与主机连接不稳定的问题,可能很多用户都不
阅读:9377| 2022-11-06
电脑对日常生活的重要性小编就不多说了,可是一旦碰到win7系统设置cf烟雾头的问题,很
阅读:8422| 2022-11-06
我们在日常使用电脑的时候,有的小伙伴们可能在打开应用的时候会遇见提示应用程序无法
阅读:7855| 2022-11-06
今天小编告诉大家如何对win7系统打开vcf文件进行设置,可能很多用户都不知道怎么对win
阅读:8407| 2022-11-06
今天小编告诉大家如何对win10系统s4开启USB调试模式进行设置,可能很多用户都不知道怎
阅读:7393| 2022-11-06
请发表评论