本文整理匯總了C++中ShuttleGui::SetSizerProportion方法的典型用法代碼示例。如果您正苦於以下問題:C++ ShuttleGui::SetSizerProportion方法的具體用法?C++ ShuttleGui::SetSizerProportion怎麽用?C++ ShuttleGui::SetSizerProportion使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ShuttleGui
的用法示例。
在下文中一共展示了ShuttleGui::SetSizerProportion方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: PopulateOrExchange
void ExportOGGOptions::PopulateOrExchange(ShuttleGui & S)
{
S.StartVerticalLay();
{
S.StartHorizontalLay(wxEXPAND);
{
S.SetSizerProportion(1);
S.StartMultiColumn(2, wxCENTER);
{
S.SetStretchyCol(1);
S.Prop(1).TieSlider(_("Quality:"), mOggQualityUnscaled, 10);
}
S.EndMultiColumn();
}
S.EndHorizontalLay();
}
S.EndVerticalLay();
}
示例2: PopulateOrExchange
void ExtImportPrefs::PopulateOrExchange(ShuttleGui & S)
{
S.SetBorder(2);
S.TieCheckBox(_("Attempt to use filter in OpenFile dialog first"),
wxT("/ExtendedImport/OverrideExtendedImportByOpenFileDialogChoice"),
true);
S.StartStatic(_("Rules to choose import filters"), 1);
{
S.SetSizerProportion(1);
S.StartHorizontalLay (wxEXPAND, 1);
{
bool fillRuleTable = false;
if (RuleTable == NULL)
{
RuleTable = new Grid(S.GetParent(),EIPRuleTable);
RuleTable->SetColLabelSize(RuleTable->GetDefaultRowSize());
#if EXTIMPORT_MIME_SUPPORT
RuleTable->CreateGrid (0, 2, wxGrid::wxGridSelectRows);
#else
RuleTable->CreateGrid (0, 1, wxGrid::wxGridSelectRows);
#endif
RuleTable->DisableDragColMove ();
RuleTable->DisableDragRowSize ();
RuleTable->SetDefaultCellAlignment(wxALIGN_LEFT, wxALIGN_CENTER);
RuleTable->SetColLabelValue (0, _("File extensions"));
#if EXTIMPORT_MIME_SUPPORT
RuleTable->SetColLabelValue (1, _("Mime-types"));
#endif
RuleTable->SetRowLabelSize (0);
RuleTable->SetSelectionMode (wxGrid::wxGridSelectRows);
RuleTable->AutoSizeColumns ();
RuleTable->SetDropTarget (dragtarget1);
RuleTable->EnableDragCell (true);
fillRuleTable = true;
}
S.AddWindow(RuleTable, wxEXPAND | wxALL);
PluginList = S.Id(EIPPluginList).AddListControl ();
if (fillRuleTable)
{
PluginList->SetSingleStyle (wxLC_REPORT, true);
PluginList->SetSingleStyle (wxLC_SINGLE_SEL, true);
PluginList->InsertColumn (0, _("Importer order"));
PluginList->SetDropTarget (dragtarget2);
ExtImportItems *items = wxGetApp().mImporter->GetImportItems();
for (unsigned int i = 0; i < items->Count(); i++)
AddItemToTable (i, &(*items)[i]);
if (items->Count() > 0)
{
RuleTable->SelectRow(0);
RuleTable->SetGridCursor(0,0);
}
}
}
S.EndHorizontalLay();
S.StartHorizontalLay (wxSHRINK, 0);
{
MoveRuleUp = S.Id (EIPMoveRuleUp).AddButton (_("Move rule &up"));
MoveRuleDown = S.Id (EIPMoveRuleDown).AddButton
(_("Move rule &down"));
MoveFilterUp = S.Id (EIPMoveFilterUp).AddButton
(_("Move f&ilter up"));
MoveFilterDown = S.Id (EIPMoveFilterDown).AddButton
(_("Move &filter down"));
}
S.EndHorizontalLay();
S.StartHorizontalLay (wxSHRINK, 0);
{
AddRule = S.Id (EIPAddRule).AddButton (_("&Add new rule"));
DelRule = S.Id (EIPDelRule).AddButton (_("De&lete selected rule"));
}
S.EndHorizontalLay();
}
S.EndStatic();
Layout();
Fit();
SetMinSize(GetSize());
}
示例3: PopulateOrExchange
void EffectScienFilter::PopulateOrExchange(ShuttleGui & S)
{
wxWindow *parent = S.GetParent();
S.AddSpace(5);
S.SetSizerProportion(1);
S.StartMultiColumn(3, wxEXPAND);
{
S.SetStretchyCol(1);
S.SetStretchyRow(0);
// -------------------------------------------------------------------
// ROW 1: Freq response panel and sliders for vertical scale
// -------------------------------------------------------------------
S.StartVerticalLay();
{
mdBRuler = new RulerPanel(parent, wxID_ANY);
mdBRuler->ruler.SetBounds(0, 0, 100, 100); // Ruler can't handle small sizes
mdBRuler->ruler.SetOrientation(wxVERTICAL);
mdBRuler->ruler.SetRange(30.0, -120.0);
mdBRuler->ruler.SetFormat(Ruler::LinearDBFormat);
mdBRuler->ruler.SetUnits(_("dB"));
mdBRuler->ruler.SetLabelEdges(true);
int w;
mdBRuler->ruler.GetMaxSize(&w, NULL);
mdBRuler->SetSize(wxSize(w, 150)); // height needed for wxGTK
S.SetBorder(1);
S.AddSpace(1, 1);
S.Prop(1);
S.AddWindow(mdBRuler, wxALIGN_RIGHT | wxTOP);
S.AddSpace(1, 1);
}
S.EndVerticalLay();
mPanel = new EffectScienFilterPanel(this, parent);
mPanel->SetFreqRange(mLoFreq, mNyquist);
S.SetBorder(5);
S.Prop(1);
S.AddWindow(mPanel, wxEXPAND | wxRIGHT);
S.SetSizeHints(-1, -1);
S.StartVerticalLay();
{
S.AddVariableText(_("+ dB"), false, wxCENTER);
S.SetStyle(wxSL_VERTICAL | wxSL_INVERSE);
mdBMaxSlider = S.Id(ID_dBMax).AddSlider(wxT(""), 10, 20, 0);
#if wxUSE_ACCESSIBILITY
mdBMaxSlider->SetName(_("Max dB"));
mdBMaxSlider->SetAccessible(new SliderAx(mdBMaxSlider, wxString(wxT("%d ")) + _("dB")));
#endif
S.SetStyle(wxSL_VERTICAL | wxSL_INVERSE);
mdBMinSlider = S.Id(ID_dBMin).AddSlider(wxT(""), -10, -10, -120);
S.AddVariableText(_("- dB"), false, wxCENTER);
#if wxUSE_ACCESSIBILITY
mdBMinSlider->SetName(_("Min dB"));
mdBMinSlider->SetAccessible(new SliderAx(mdBMinSlider, wxString(wxT("%d ")) + _("dB")));
#endif
}
S.EndVerticalLay();
// -------------------------------------------------------------------
// ROW 2: Frequency ruler
// -------------------------------------------------------------------
S.AddSpace(1, 1);
mfreqRuler = new RulerPanel(parent, wxID_ANY);
mfreqRuler->ruler.SetBounds(0, 0, 100, 100); // Ruler can't handle small sizes
mfreqRuler->ruler.SetOrientation(wxHORIZONTAL);
mfreqRuler->ruler.SetLog(true);
mfreqRuler->ruler.SetRange(mLoFreq, mNyquist);
mfreqRuler->ruler.SetFormat(Ruler::IntFormat);
mfreqRuler->ruler.SetUnits(wxT(""));
mfreqRuler->ruler.SetFlip(true);
mfreqRuler->ruler.SetLabelEdges(true);
int h;
mfreqRuler->ruler.GetMaxSize(NULL, &h);
mfreqRuler->SetMinSize(wxSize(-1, h));
S.Prop(1);
S.AddWindow(mfreqRuler, wxEXPAND | wxALIGN_LEFT | wxRIGHT);
S.AddSpace(1, 1);
// -------------------------------------------------------------------
// ROW 3 and 4: Type, Order, Ripple, Subtype, Cutoff
// -------------------------------------------------------------------
S.AddSpace(1, 1);
S.SetSizerProportion(0);
S.StartMultiColumn(8, wxALIGN_CENTER);
{
wxASSERT(kNumTypes == WXSIZEOF(kTypeStrings));
wxArrayString typeChoices;
for (int i = 0; i < kNumTypes; i++)
//.........這裏部分代碼省略.........