MCPcopy Create free account
hub / github.com/audacity/audacity / AddMessageAsColumn

Method AddMessageAsColumn

libraries/lib-wx-init/ProgressDialog.cpp:1125–1155  ·  view source on GitHub ↗

Add a NEW text column each time this is called.

Source from the content-addressed store, hash-verified

1123
1124// Add a NEW text column each time this is called.
1125void ProgressDialog::AddMessageAsColumn(wxBoxSizer * pSizer,
1126 const MessageColumn & column,
1127 bool bFirstColumn) {
1128
1129 // Assuming that we don't want empty columns, bail out if there is no text.
1130 if (column.empty())
1131 return;
1132
1133 // Join strings
1134 auto sText = column[0];
1135 std::for_each( column.begin() + 1, column.end(),
1136 [&](const TranslatableString &text)
1137 { sText.Join( text, wxT("\n") ); });
1138
1139 // Create a statictext object and add to the sizer
1140 wxStaticText* oText = safenew wxStaticText(this,
1141 wxID_ANY,
1142 sText.Translation(),
1143 wxDefaultPosition,
1144 wxDefaultSize,
1145 wxALIGN_LEFT);
1146 oText->SetName(sText.Translation()); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
1147
1148 // If this is the first column then set the mMessage pointer so non-TimerRecord usages
1149 // will still work correctly in SetMessage()
1150 if (bFirstColumn) {
1151 mMessage = oText;
1152 }
1153
1154 pSizer->Add(oText, 1, wxEXPAND | wxALL, 5);
1155}
1156
1157bool ProgressDialog::Create(const TranslatableString & title,
1158 const TranslatableString & message /* = {} */,

Callers

nothing calls this directly

Calls 8

TranslationMethod · 0.80
wxStaticTextClass · 0.70
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
JoinMethod · 0.45
SetNameMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected