1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-12 06:01:13 +02:00

Define struct DialogDefinition::Item, to be filled in

This commit is contained in:
Paul Licameli 2017-10-30 21:42:01 -04:00
parent 4a2cfd92d7
commit 8ea137e041
2 changed files with 21 additions and 3 deletions

View File

@ -255,7 +255,7 @@ void ShuttleGuiBase::AddPrompt(const wxString &Prompt)
mpWind = safenew wxStaticText(GetParent(), -1, Prompt, wxDefaultPosition, wxDefaultSize,
Style( wxALIGN_RIGHT ));
mpWind->SetName(wxStripMenuCodes(Prompt)); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
UpdateSizersCore( false, wxALL | wxALIGN_CENTRE_VERTICAL );
UpdateSizersCore( false, wxALL | wxALIGN_CENTRE_VERTICAL, true );
}
/// Left aligned text string.
@ -2054,7 +2054,7 @@ void ShuttleGuiBase::SetProportions( int Default )
}
void ShuttleGuiBase::UpdateSizersCore(bool bPrepend, int Flags)
void ShuttleGuiBase::UpdateSizersCore(bool bPrepend, int Flags, bool prompt)
{
if( mpWind && mpParent )
{
@ -2068,6 +2068,13 @@ void ShuttleGuiBase::UpdateSizersCore(bool bPrepend, int Flags)
mpSizer->Add(mpWind, miProp, Flags,miBorder);
}
}
if (!prompt) {
// Apply certain optional window attributes here
// Reset to defaults
mItem = {};
}
}
if( mpSubSizer && mpSizer )

View File

@ -119,6 +119,14 @@ private:
T mDefaultValue;
};
namespace DialogDefinition {
struct Item {
Item() = default;
};
}
class AUDACITY_DLL_API ShuttleGuiBase /* not final */
{
public:
@ -344,7 +352,7 @@ protected:
void PushSizer();
void PopSizer();
void UpdateSizersCore( bool bPrepend, int Flags );
void UpdateSizersCore( bool bPrepend, int Flags, bool prompt = false );
void UpdateSizers();
void UpdateSizersC();
void UpdateSizersAtStart();
@ -412,6 +420,9 @@ private:
wxString mRadioValueString; /// Unwrapped string value.
wxRadioButton * DoAddRadioButton(
const wxString &Prompt, int style, int selector, int initValue);
protected:
DialogDefinition::Item mItem;
};
// A rarely used helper function that sets a pointer