Audacity  3.0.3
AudacityTextEntryDialog.h
Go to the documentation of this file.
1 /*!********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  @file AudacityTextEntryDialog.h
6 
7  Paul Licameli split from ErrorDialog.h
8 
9  **********************************************************************/
10 
11 #ifndef __AUDACITY_TEXT_ENTRY_DIALOG__
12 #define __AUDACITY_TEXT_ENTRY_DIALOG__
13 
14 #include <wx/textdlg.h> // to inherit
15 #include "wxPanelWrapper.h" // to inherit
16 
17 /**************************************************************************/
21 class AUDACITY_DLL_API AudacityTextEntryDialog
22  : public wxTabTraversalWrapper< wxTextEntryDialog >
23 {
24 public:
26  wxWindow *parent,
27  const TranslatableString& message,
28  const TranslatableString& caption, // don't use = wxGetTextFromUserPromptStr,
29  const wxString& value = {},
30  long style = wxTextEntryDialogStyle,
31  const wxPoint& pos = wxDefaultPosition)
33  parent,
34  message.Translation(), caption.Translation(), value, style, pos )
35  {}
36 
37  void SetInsertionPointEnd();
38  bool Show(bool show = true) override;
39 
40 private:
41  bool mSetInsertionPointEnd{};
42 };
43 
44 #endif // __AUDACITY_ERRORDIALOG__
TranslatableString
Holds a msgid for the translation catalog; may also bind format arguments.
Definition: TranslatableString.h:32
AudacityTextEntryDialog
Wrap wxTextEntryDialog so that caption IS translatable.
Definition: AudacityTextEntryDialog.h:23
wxPanelWrapper.h
wxTabTraversalWrapper
Definition: wxPanelWrapper.h:24
TranslatableString::Translation
wxString Translation() const
Definition: TranslatableString.h:79
AudacityTextEntryDialog::AudacityTextEntryDialog
AudacityTextEntryDialog(wxWindow *parent, const TranslatableString &message, const TranslatableString &caption, const wxString &value={}, long style=wxTextEntryDialogStyle, const wxPoint &pos=wxDefaultPosition)
Definition: AudacityTextEntryDialog.h:25