Audacity 3.2.0
Typedefs | Functions
HelpText.h File Reference
#include "Identifier.h"
Include dependency graph for HelpText.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

using URLString = TaggedIdentifier< URLStringTag >
 Distinct type for URLs. More...
 

Functions

WX_INIT_API wxString HelpText (const wxString &Key)
 
WX_INIT_API TranslatableString TitleText (const wxString &Key)
 
WX_INIT_API const wxString VerCheckArgs ()
 
WX_INIT_API const URLString VerCheckUrl ()
 
WX_INIT_API const wxString VerCheckHtml ()
 
WX_INIT_API wxString FormatHtmlText (const wxString &Text)
 

Typedef Documentation

◆ URLString

using URLString = TaggedIdentifier< URLStringTag >

Distinct type for URLs.

Definition at line 20 of file HelpText.h.

Function Documentation

◆ FormatHtmlText()

WX_INIT_API wxString FormatHtmlText ( const wxString &  Text)

Definition at line 349 of file HelpText.cpp.

349 {
350
351 wxString localeStr = wxLocale::GetSystemEncodingName();
352
353 return
354 wxT("<html><head><META http-equiv=\"Content-Type\" content=\"text/html; charset=") +
355 localeStr +
356 wxT("\"></head>") +
357 WrapText( LinkExpand( Text ))+
358 wxT("</html>");
359}
wxT("CloseDown"))
static wxString WrapText(const wxString &Text)
Definition: HelpText.cpp:42
static wxString LinkExpand(const wxString &Text)
Definition: HelpText.cpp:95

References LinkExpand(), WrapText(), and wxT().

Referenced by AboutDialog::PopulateAudacityPage(), AboutDialog::PopulateInformationPage(), and AboutDialog::PopulateLicensePage().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HelpText()

WX_INIT_API wxString HelpText ( const wxString &  Key)

Definition at line 329 of file HelpText.cpp.

330{
331
332 // Possible future enhancement...
333 // We could look for the text as a local file and use
334 // that if we find it...
335 // if( wxFileExists( Path+Key ) )
336 // ...
337
338 wxString Text;
339 Text = HelpTextBuiltIn( Key );
340
341 if( !Text.empty())
342 return LinkExpand( Text );
343
344 // Perhaps useful for debugging - we'll return key that we didn't find.
345 return WrapText( Key );
346}
static wxString HelpTextBuiltIn(const wxString &Key)
Definition: HelpText.cpp:214

References HelpTextBuiltIn(), LinkExpand(), and WrapText().

Referenced by ErrorDialog::OnHelp(), ErrorReportDialog::OnHelp(), LinkingHtmlWindow::OnLinkClicked(), SplashDialog::Populate(), SplashDialog::Show2(), and HelpSystem::ShowHelp().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TitleText()

WX_INIT_API TranslatableString TitleText ( const wxString &  Key)

Definition at line 149 of file HelpText.cpp.

150{
151 if(Key==wxT("welcome"))
152 {
153 return XO("Welcome!");
154 }
155
156 if(Key ==wxT("play") )
157 {
158 /* i18n-hint: Title for a topic.*/
159 return XO("Playing Audio");
160 }
161 if((Key ==wxT("record") ) || (Key ==wxT("norecord") ))
162 {
163 /* i18n-hint: Title for a topic.*/
164 return XO("Recording Audio");
165 }
166 if(Key ==wxT("inputdevice") )
167 {
168 /* i18n-hint: Title for a topic.*/
169 return XO("Recording - Choosing the Recording Device");
170 }
171 if(Key ==wxT("inputsource") )
172 {
173 /* i18n-hint: Title for a topic.*/
174 return XO("Recording - Choosing the Recording Source");
175 }
176 if(Key ==wxT("inputlevel") )
177 {
178 /* i18n-hint: Title for a topic.*/
179 return XO("Recording - Setting the Recording Level");
180 }
181 if((Key ==wxT("edit") ) || (Key==wxT("grey")))
182 {
183 /* i18n-hint: Title for a topic.*/
184 return XO("Editing and greyed out Menus");
185 }
186 if(Key ==wxT("export") )
187 {
188 /* i18n-hint: Title for a topic.*/
189 return XO("Exporting an Audio File");
190 }
191 if(Key ==wxT("save") )
192 {
193 /* i18n-hint: Title for a topic.*/
194 return XO("Saving an Audacity Project");
195 }
196 if(Key ==wxT("wma-proprietary") )
197 {
198 /* i18n-hint: Title for a topic.*/
199 return XO("Support for Other Formats");
200 }
201 if(Key ==wxT("burncd") )
202 {
203 /* i18n-hint: Title for a topic.*/
204 return XO("Burn to CD" );
205 }
206 if(Key == wxT("remotehelp") )
207 {
208 return XO("No Local Help");
209 }
210 // Uh oh, no translation...
211 return Verbatim( Key );
212}
XO("Cut/Copy/Paste")
TranslatableString Verbatim(wxString str)
Require calls to the one-argument constructor to go through this distinct global function name.

References Verbatim(), wxT(), and XO().

Referenced by ErrorDialog::OnHelp(), ErrorReportDialog::OnHelp(), and LinkingHtmlWindow::OnLinkClicked().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ VerCheckArgs()

WX_INIT_API const wxString VerCheckArgs ( )

Definition at line 362 of file HelpText.cpp.

362 {
363 wxString result = wxString("from_ver=") + AUDACITY_VERSION_STRING;
364#ifdef REV_LONG
365 result += wxString("&CommitId=")+wxString(REV_LONG).Left(6);
366#endif
367 result += wxString("&Time=") + wxString( __DATE__ ) + wxString( __TIME__ );
368 result.Replace(" ","");
369 return result;
370}

Referenced by VerCheckUrl().

Here is the caller graph for this function:

◆ VerCheckHtml()

WX_INIT_API const wxString VerCheckHtml ( )

Definition at line 373 of file HelpText.cpp.

374{
375 wxStringOutputStream o;
376 wxTextOutputStream s(o);
377 s
378 << "<center>[["
379 << VerCheckUrl().GET()
380 << "|"
381 << XO("Check Online")
382 << "]]</center>\n";
383 return o.GetString();
384}
const URLString VerCheckUrl()
Definition: HelpText.cpp:387
const wxString & GET() const
Explicit conversion to wxString, meant to be ugly-looking and demanding of a comment why it's correct...
Definition: Identifier.h:66

References Identifier::GET(), VerCheckUrl(), and XO().

Referenced by HelpTextBuiltIn(), and AboutDialog::PopulateInformationPage().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ VerCheckUrl()

WX_INIT_API const URLString VerCheckUrl ( )

Definition at line 387 of file HelpText.cpp.

388{
389 //The version we intend to use for live Audacity.
390#define VER_CHECK_URL "https://www.audacityteam.org/download/?"
391//For testing of our scriptlet.
392//#define VER_CHECK_URL "http://www.audacityteam.org/slug/?"
393//For testing locally
394//#define VER_CHECK_URL "http://localhost:63342/WorkingDocs/demos/download.html?"
395
396 return wxString( wxT(VER_CHECK_URL)) +VerCheckArgs();
397}
const wxString VerCheckArgs()
Definition: HelpText.cpp:362
#define VER_CHECK_URL

References VER_CHECK_URL, VerCheckArgs(), and wxT().

Referenced by VerCheckHtml().

Here is the call graph for this function:
Here is the caller graph for this function: