Audacity 3.2.0
LinkSucceededDialog.cpp
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*!********************************************************************
3
4 Audacity: A Digital Audio Editor
5
6 LinkSucceededDialog.cpp
7
8 Dmitry Vedenko
9
10**********************************************************************/
11#include "LinkSucceededDialog.h"
12
13#include <wx/button.h>
14
15#include "CodeConversions.h"
16#include "ServiceConfig.h"
17
18#include "ShuttleGui.h"
19
20#include "HelpSystem.h"
21
22
24{
25
28 parent, wxID_ANY, XO("Link account"), wxDefaultPosition, { 442, -1 },
29 wxDEFAULT_DIALOG_STYLE)
30{
31 SetMinSize({ 442, -1 });
32
33 ShuttleGui s(this, eIsCreating);
34
35 s.StartVerticalLay();
36 {
37 s.StartInvisiblePanel(16);
38 {
39 s.SetBorder(0);
40
41 s.AddFixedText(XO("Account linked successfully!"), false, 410);
42
43 s.AddSpace(0, 16, 0);
44
45 s.StartHorizontalLay(wxEXPAND, 0);
46 {
47 s.AddSpace(1, 0, 1);
48
49 auto btn = s.AddButton(XO("&OK"));
50
51 btn->Bind(wxEVT_BUTTON, [this](auto) { EndModal(wxID_OK); });
52 btn->SetDefault();
53 }
54 s.EndHorizontalLay();
55
56 }
57 s.EndInvisiblePanel();
58 }
59 s.EndVerticalLay();
60
61 Layout();
62 Fit();
63 Center();
64
65 Bind(
66 wxEVT_CHAR_HOOK,
67 [this](auto& evt)
68 {
69 if (!IsEscapeKey(evt))
70 {
71 evt.Skip();
72 return;
73 }
74
75 EndModal(wxID_OK);
76 });
77}
78
80{
81}
82
83} // namespace audacity::cloud::audiocom
Declare functions to perform UTF-8 to std::wstring conversions.
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