Audacity 3.2.0
Public Member Functions | List of all members
cloud::audiocom::LinkFailedDialog Class Referencefinal

#include <LinkFailedDialog.h>

Inheritance diagram for cloud::audiocom::LinkFailedDialog:
[legend]
Collaboration diagram for cloud::audiocom::LinkFailedDialog:
[legend]

Public Member Functions

 LinkFailedDialog (wxWindow *parent)
 
 ~LinkFailedDialog () override
 
- Public Member Functions inherited from wxDialogWrapper
 wxDialogWrapper ()
 
 wxDialogWrapper (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog"))
 
bool Create (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog"))
 
void SetTitle (const TranslatableString &title)
 
void SetLabel (const TranslatableString &title)
 
void SetName (const TranslatableString &title)
 
void SetName ()
 
- Public Member Functions inherited from wxTabTraversalWrapper< wxDialog >
 wxTabTraversalWrapper (Args &&... args)
 
 wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete
 
 wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete
 
wxTabTraversalWrapperoperator= (const wxTabTraversalWrapper &)=delete
 
wxTabTraversalWrapperoperator= (wxTabTraversalWrapper &&)=delete
 

Detailed Description

Definition at line 17 of file LinkFailedDialog.h.

Constructor & Destructor Documentation

◆ LinkFailedDialog()

cloud::audiocom::LinkFailedDialog::LinkFailedDialog ( wxWindow *  parent)
explicit

Definition at line 26 of file LinkFailedDialog.cpp.

28 parent, wxID_ANY, XO("Link account"), wxDefaultPosition, { 442, -1 },
29 wxDEFAULT_DIALOG_STYLE)
30{
31 SetMinSize({ 442, -1 });
32 ShuttleGui s(this, eIsCreating);
33
34 s.StartVerticalLay();
35 {
36 s.StartInvisiblePanel(16);
37 {
38 s.SetBorder(0);
39
40 s.AddFixedText(
41 XO("We were unable to link your account. Please try again."),
42 false, 410);
43
44 s.AddSpace(0, 16, 0);
45
46 s.StartHorizontalLay(wxEXPAND, 0);
47 {
48 s.AddSpace(1, 0, 1);
49
50 s.AddButton(XO("&Cancel"))
51 ->Bind(wxEVT_BUTTON, [this](auto) { EndModal(wxID_CANCEL); });
52
53 auto btn = s.AddButton(XO("&Try again"));
54
55 btn->Bind(
56 wxEVT_BUTTON,
57 [this](auto)
58 {
60 GetServiceConfig().GetOAuthLoginPage()) });
61 EndModal(wxID_RETRY);
62 });
63
64 btn->SetDefault();
65 }
66 s.EndHorizontalLay();
67
68 }
69 s.EndInvisiblePanel();
70 }
71 s.EndVerticalLay();
72
73 Layout();
74 Fit();
75 Center();
76
77 Bind(
78 wxEVT_CHAR_HOOK,
79 [this](auto& evt)
80 {
81 if (!IsEscapeKey(evt))
82 {
83 evt.Skip();
84 return;
85 }
86
87 EndModal(wxID_CANCEL);
88 });
89}
XO("Cut/Copy/Paste")
@ eIsCreating
Definition: ShuttleGui.h:37
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640
bool OpenInDefaultBrowser(const wxString &url)
Open an URL in default browser.
Definition: BasicUI.cpp:240
wxString ToWXString(const std::string &str)
const ServiceConfig & GetServiceConfig()
Returns the instance of the ServiceConfig.

◆ ~LinkFailedDialog()

cloud::audiocom::LinkFailedDialog::~LinkFailedDialog ( )
override

Definition at line 91 of file LinkFailedDialog.cpp.

92{
93}

The documentation for this class was generated from the following files: