mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-21 16:37:12 +01:00
Remove second argument of AddWindow(), use Position() instead
This commit is contained in:
@@ -215,6 +215,12 @@ struct Item {
|
||||
return std::move ( *this );
|
||||
}
|
||||
|
||||
Item&& Position( int flags ) &&
|
||||
{
|
||||
mWindowPositionFlags = flags;
|
||||
return std::move( *this );
|
||||
}
|
||||
|
||||
std::function< void(wxWindow*) > mValidatorSetter;
|
||||
TranslatableString mToolTip;
|
||||
TranslatableString mName;
|
||||
@@ -224,6 +230,9 @@ struct Item {
|
||||
|
||||
long miStyle{};
|
||||
|
||||
// Applies to windows, not to subsizers
|
||||
int mWindowPositionFlags{ 0 };
|
||||
|
||||
wxSize mMinSize{ -1, -1 };
|
||||
bool mHasMinSize{ false };
|
||||
bool mUseBestSize{ false };
|
||||
@@ -248,8 +257,8 @@ public:
|
||||
void AddPrompt(const wxString &Prompt);
|
||||
void AddUnits(const wxString &Prompt);
|
||||
void AddTitle(const wxString &Prompt);
|
||||
// Applies wxALL (which affects borders) only when in Flags:
|
||||
wxWindow * AddWindow(wxWindow * pWindow, int Flags = wxALIGN_CENTRE | wxALL );
|
||||
wxWindow * AddWindow(wxWindow * pWindow);
|
||||
|
||||
wxSlider * AddSlider(const wxString &Prompt, int pos, int Max, int Min = 0);
|
||||
wxSlider * AddVSlider(const wxString &Prompt, int pos, int Max);
|
||||
wxSpinCtrl * AddSpinCtrl(const wxString &Prompt, int Value, int Max, int Min);
|
||||
@@ -648,6 +657,12 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
ShuttleGui & Position( int flags )
|
||||
{
|
||||
std::move( mItem ).Position( flags );
|
||||
return *this;
|
||||
}
|
||||
|
||||
// Prop() sets the proportion value, defined as in wxSizer::Add().
|
||||
ShuttleGui & Prop( int iProp ){ ShuttleGuiBase::Prop(iProp); return *this;}; // Has to be here too, to return a ShuttleGui and not a ShuttleGuiBase.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user