Audacity  3.0.3
Public Member Functions | Private Member Functions | Private Attributes | List of all members
HistoryDialog Class Referencefinal

Works with UndoManager to allow user to see descriptions of and undo previous commands. Also allows you to selectively clear the undo memory so as to free up space. More...

#include <HistoryWindow.h>

Inheritance diagram for HistoryDialog:
[legend]
Collaboration diagram for HistoryDialog:
[legend]

Public Member Functions

 HistoryDialog (AudacityProject *parent, UndoManager *manager)
 
void UpdateDisplay (wxEvent &e)
 
bool Show (bool show=true) 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
 
- Public Member Functions inherited from PrefsListener
 PrefsListener ()
 
virtual ~PrefsListener ()
 

Private Member Functions

void Populate (ShuttleGui &S)
 
void OnAudioIO (wxCommandEvent &evt)
 
void DoUpdate ()
 
void UpdateLevels ()
 
void OnShow (wxShowEvent &event)
 
void OnSize (wxSizeEvent &event)
 
void OnCloseWindow (wxCloseEvent &event)
 
void OnListKeyDown (wxKeyEvent &event)
 
void OnItemSelected (wxListEvent &event)
 
void OnDiscard (wxCommandEvent &event)
 
void OnDiscardClipboard (wxCommandEvent &event)
 
void OnCompact (wxCommandEvent &event)
 
void OnGetURL (wxCommandEvent &event)
 
void UpdatePrefs () override
 

Private Attributes

AudacityProjectmProject
 
UndoManagermManager
 
wxListCtrl * mList
 
wxTextCtrl * mTotal
 
wxTextCtrl * mClipboard
 
wxTextCtrl * mAvail
 
wxSpinCtrl * mLevels
 
wxButton * mDiscard
 
wxButton * mCompact
 
int mSelected
 
bool mAudioIOBusy
 

Additional Inherited Members

- Static Public Member Functions inherited from PrefsListener
static void Broadcast (int id=0)
 Call this static function to notify all PrefsListener objects. More...
 
- Protected Member Functions inherited from PrefsListener
virtual void UpdateSelectedPrefs (int id)
 

Detailed Description

Works with UndoManager to allow user to see descriptions of and undo previous commands. Also allows you to selectively clear the undo memory so as to free up space.

Definition at line 26 of file HistoryWindow.h.

Constructor & Destructor Documentation

◆ HistoryDialog()

HistoryDialog::HistoryDialog ( AudacityProject parent,
UndoManager manager 
)

Definition at line 73 of file HistoryWindow.cpp.

73  :
74  wxDialogWrapper(FindProjectFrame( parent ), wxID_ANY, HistoryTitle,
75  wxDefaultPosition, wxDefaultSize,
76  wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER )
77 {
78  SetName();
79 
80  mManager = manager;
81  mProject = parent;
82  mSelected = 0;
83  mAudioIOBusy = false;
84 
85  //------------------------- Main section --------------------
86  // Construct the GUI.
87  ShuttleGui S(this, eIsCreating);
88  Populate(S);
89 
90  wxTheApp->Bind(EVT_AUDIOIO_PLAYBACK,
92  this);
93 
94  wxTheApp->Bind(EVT_AUDIOIO_CAPTURE,
96  this);
97 
98  Clipboard::Get().Bind(
99  EVT_CLIPBOARD_CHANGE, &HistoryDialog::UpdateDisplay, this);
100  parent->Bind(EVT_UNDO_PUSHED, &HistoryDialog::UpdateDisplay, this);
101  parent->Bind(EVT_UNDO_MODIFIED, &HistoryDialog::UpdateDisplay, this);
102  parent->Bind(EVT_UNDO_OR_REDO, &HistoryDialog::UpdateDisplay, this);
103  parent->Bind(EVT_UNDO_RESET, &HistoryDialog::UpdateDisplay, this);
104  parent->Bind(EVT_UNDO_PURGE, &HistoryDialog::UpdateDisplay, this);
105 }

References eIsCreating, Clipboard::Get(), mAudioIOBusy, mManager, mProject, mSelected, OnAudioIO(), Populate(), wxDialogWrapper::SetName(), and UpdateDisplay().

Here is the call graph for this function:

Member Function Documentation

◆ DoUpdate()

void HistoryDialog::DoUpdate ( )
private

Definition at line 212 of file HistoryWindow.cpp.

213 {
214  int i;
215 
217 
218  mList->DeleteAllItems();
219 
220  wxLongLong_t total = 0;
222  for (i = 0; i < (int)mManager->GetNumStates(); i++) {
224 
225  total += mManager->GetLongDescription(i, &desc, &size);
226  mList->InsertItem(i, desc.Translation(), i == mSelected ? 1 : 0);
227  mList->SetItem(i, 1, size.Translation());
228  }
229 
230  mTotal->SetValue(Internat::FormatSize(total).Translation());
231 
232  auto clipboardUsage = mManager->GetClipboardSpaceUsage();
233  mClipboard->SetValue(Internat::FormatSize(clipboardUsage).Translation());
234 #if defined(ALLOW_DISCARD)
235  FindWindowById(ID_DISCARD_CLIPBOARD)->Enable(clipboardUsage > 0);
236 #endif
237 
238  mList->EnsureVisible(mSelected);
239 
240  mList->SetItemState(mSelected,
241  wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED,
242  wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED);
243 
244  UpdateLevels();
245 }

References UndoManager::CalculateSpaceUsage(), desc, Internat::FormatSize(), UndoManager::GetClipboardSpaceUsage(), UndoManager::GetCurrentState(), UndoManager::GetLongDescription(), UndoManager::GetNumStates(), ID_DISCARD_CLIPBOARD, mClipboard, mList, mManager, mSelected, mTotal, size, TranslatableString::Translation(), and UpdateLevels().

Referenced by OnDiscard(), Show(), and UpdateDisplay().

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

◆ OnAudioIO()

void HistoryDialog::OnAudioIO ( wxCommandEvent &  evt)
private

Definition at line 183 of file HistoryWindow.cpp.

184 {
185  evt.Skip();
186 
187  if (evt.GetInt() != 0)
188  mAudioIOBusy = true;
189  else
190  mAudioIOBusy = false;
191 
192 #if defined(ALLOW_DISCARD)
193  mDiscard->Enable(!mAudioIOBusy);
194  mCompact->Enable(!mAudioIOBusy);
195 #endif
196 }

References mAudioIOBusy, mCompact, and mDiscard.

Referenced by HistoryDialog().

Here is the caller graph for this function:

◆ OnCloseWindow()

void HistoryDialog::OnCloseWindow ( wxCloseEvent &  event)
private

Definition at line 368 of file HistoryWindow.cpp.

369 {
370  this->Show(false);
371 }

References Show().

Here is the call graph for this function:

◆ OnCompact()

void HistoryDialog::OnCompact ( wxCommandEvent &  event)
private

Definition at line 295 of file HistoryWindow.cpp.

296 {
297  auto &projectFileIO = ProjectFileIO::Get(*mProject);
298 
299  projectFileIO.ReopenProject();
300 
301  auto baseFile = wxFileName(projectFileIO.GetFileName());
302  auto walFile = wxFileName(projectFileIO.GetFileName() + wxT("-wal"));
303  auto before = baseFile.GetSize() + walFile.GetSize();
304 
305  projectFileIO.Compact({}, true);
306 
307  auto after = baseFile.GetSize() + walFile.GetSize();
308 
310  XO("Compacting actually freed %s of disk space.")
311  .Format(Internat::FormatSize((before - after).GetValue())),
312  XO("History"));
313 }

References AudacityMessageBox(), Internat::FormatSize(), ProjectFileIO::Get(), mProject, and XO.

Here is the call graph for this function:

◆ OnDiscard()

void HistoryDialog::OnDiscard ( wxCommandEvent &  event)
private

Definition at line 276 of file HistoryWindow.cpp.

277 {
278  int i = mLevels->GetValue();
279 
280  mSelected -= i;
281  mManager->RemoveStates(0, i);
283 
284  while(--i >= 0)
285  mList->DeleteItem(i);
286 
287  DoUpdate();
288 }

References DoUpdate(), ProjectHistory::Get(), mLevels, mList, mManager, mSelected, UndoManager::RemoveStates(), and ProjectHistory::SetStateTo().

Here is the call graph for this function:

◆ OnDiscardClipboard()

void HistoryDialog::OnDiscardClipboard ( wxCommandEvent &  event)
private

Definition at line 290 of file HistoryWindow.cpp.

291 {
292  Clipboard::Get().Clear();
293 }

References Clipboard::Clear(), and Clipboard::Get().

Here is the call graph for this function:

◆ OnGetURL()

void HistoryDialog::OnGetURL ( wxCommandEvent &  event)
private

Definition at line 315 of file HistoryWindow.cpp.

316 {
317  HelpSystem::ShowHelp(this, L"Undo,_Redo_and_History");
318 }

References HelpSystem::ShowHelp().

Here is the call graph for this function:

◆ OnItemSelected()

void HistoryDialog::OnItemSelected ( wxListEvent &  event)
private

Definition at line 320 of file HistoryWindow.cpp.

321 {
322  if (mAudioIOBusy) {
323  mList->SetItemState(mSelected,
324  wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED,
325  wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED);
326  return;
327  }
328 
329  int selected = event.GetIndex();
330  int i;
331 
332  for (i = 0; i < mList->GetItemCount(); i++) {
333  mList->SetItemImage(i, 0);
334  if (i > selected)
335  mList->SetItemTextColour(i, *wxLIGHT_GREY);
336  else
337  mList->SetItemTextColour(i, mList->GetTextColour());
338  }
339  mList->SetItemImage(selected, 1);
340 
341  // Do not do a SetStateTo() if we're not actually changing the selected
342  // entry. Doing so can cause unnecessary delays upon initial load or while
343  // clicking the same entry over and over.
344  if (selected != mSelected) {
345  ProjectHistory::Get( *mProject ).SetStateTo(selected);
346  }
347  mSelected = selected;
348 
349  UpdateLevels();
350 }

References ProjectHistory::Get(), mAudioIOBusy, mList, mSelected, ProjectHistory::SetStateTo(), and UpdateLevels().

Here is the call graph for this function:

◆ OnListKeyDown()

void HistoryDialog::OnListKeyDown ( wxKeyEvent &  event)
private

Definition at line 352 of file HistoryWindow.cpp.

353 {
354  switch (event.GetKeyCode())
355  {
356  case WXK_RETURN:
357  // Don't know why wxListCtrls prevent default dialog action,
358  // but they do, so handle it.
359  EmulateButtonClickIfPresent(GetAffirmativeId());
360  break;
361 
362  default:
363  event.Skip();
364  break;
365  }
366 }

Referenced by Populate().

Here is the caller graph for this function:

◆ OnShow()

void HistoryDialog::OnShow ( wxShowEvent &  event)
private

Definition at line 373 of file HistoryWindow.cpp.

374 {
375  if (event.IsShown())
376  {
377  mList->SetFocus();
378  }
379 }

References mList.

◆ OnSize()

void HistoryDialog::OnSize ( wxSizeEvent &  event)
private

Definition at line 381 of file HistoryWindow.cpp.

382 {
383  Layout();
384  mList->SetColumnWidth(0, mList->GetClientSize().x - mList->GetColumnWidth(1));
385  if (mList->GetItemCount() > 0)
386  mList->EnsureVisible(mSelected);
387 }

References mList, and mSelected.

◆ Populate()

void HistoryDialog::Populate ( ShuttleGui S)
private

Definition at line 107 of file HistoryWindow.cpp.

108 {
109  auto imageList = std::make_unique<wxImageList>(9, 16);
110  imageList->Add(wxIcon(empty9x16_xpm));
111  imageList->Add(wxIcon(arrow_xpm));
112 
113  S.SetBorder(5);
114  S.StartVerticalLay(true);
115  {
116  S.StartStatic(XO("&Manage History"), 1);
117  {
118  mList = S
119  .MinSize()
120  .ConnectRoot(wxEVT_KEY_DOWN, &HistoryDialog::OnListKeyDown)
121  .AddListControlReportMode(
122  { { XO("Action"), wxLIST_FORMAT_LEFT, 260 },
123  { XO("Used Space"), wxLIST_FORMAT_LEFT, 125 } },
124  wxLC_SINGLE_SEL
125  );
126 
127  //Assign rather than set the image list, so that it is deleted later.
128  // AssignImageList takes ownership
129  mList->AssignImageList(imageList.release(), wxIMAGE_LIST_SMALL);
130 
131  S.StartMultiColumn(3, wxCENTRE);
132  {
133  S.AddPrompt(XXO("&Total space used"));
134  mTotal = S.Id(ID_TOTAL).Style(wxTE_READONLY).AddTextBox({}, wxT(""), 10);
135  S.AddVariableText( {} )->Hide();
136 
137 #if defined(ALLOW_DISCARD)
138  S.AddPrompt(XXO("&Undo levels available"));
139  mAvail = S.Id(ID_AVAIL).Style(wxTE_READONLY).AddTextBox({}, wxT(""), 10);
140  S.AddVariableText( {} )->Hide();
141 
142  S.AddPrompt(XXO("&Levels to discard"));
143  mLevels = safenew wxSpinCtrl(S.GetParent(),
144  ID_LEVELS,
145  wxT("1"),
146  wxDefaultPosition,
147  wxDefaultSize,
148  wxSP_ARROW_KEYS,
149  0,
151  0);
152  S.AddWindow(mLevels);
153  /* i18n-hint: (verb)*/
154  mDiscard = S.Id(ID_DISCARD).AddButton(XXO("&Discard"));
155 #endif
156  S.AddPrompt(XXO("Clip&board space used"));
157  mClipboard = S.Style(wxTE_READONLY).AddTextBox({}, wxT(""), 10);
158 
159 #if defined(ALLOW_DISCARD)
160  S.Id(ID_DISCARD_CLIPBOARD).AddButton(XXO("D&iscard"));
161 #endif
162  }
163  S.EndMultiColumn();
164  }
165  S.EndStatic();
166 #if defined(ALLOW_DISCARD)
167  mCompact = safenew wxButton(this, ID_COMPACT, _("&Compact"));
169 #else
171 #endif
172  }
173  S.EndVerticalLay();
174  // ----------------------- End of main section --------------
175 
176  Layout();
177  Fit();
178  SetMinSize(GetSize());
179  mList->SetColumnWidth(0, mList->GetClientSize().x - mList->GetColumnWidth(1));
180  mList->SetTextColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
181 }

References _, ShuttleGuiBase::AddButton(), ShuttleGuiBase::AddPrompt(), ShuttleGui::AddStandardButtons(), ShuttleGuiBase::AddTextBox(), ShuttleGuiBase::AddVariableText(), ShuttleGuiBase::AddWindow(), ShuttleGui::ConnectRoot(), eHelpButton, ShuttleGuiBase::EndMultiColumn(), ShuttleGuiBase::EndStatic(), ShuttleGuiBase::EndVerticalLay(), eOkButton, UndoManager::GetCurrentState(), ShuttleGuiBase::GetParent(), ShuttleGui::Id(), ID_AVAIL, ID_COMPACT, ID_DISCARD, ID_DISCARD_CLIPBOARD, ID_LEVELS, ID_TOTAL, mAvail, mClipboard, mCompact, mDiscard, ShuttleGui::MinSize(), mLevels, mList, mManager, mTotal, OnListKeyDown(), safenew, ShuttleGuiBase::SetBorder(), ShuttleGuiBase::StartMultiColumn(), ShuttleGuiBase::StartStatic(), ShuttleGuiBase::StartVerticalLay(), ShuttleGui::Style(), XO, and XXO.

Referenced by HistoryDialog(), and UpdatePrefs().

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

◆ Show()

bool HistoryDialog::Show ( bool  show = true)
override

Definition at line 205 of file HistoryWindow.cpp.

206 {
207  if ( show && !IsShown())
208  DoUpdate();
209  return wxDialogWrapper::Show( show );
210 }

References DoUpdate().

Referenced by OnCloseWindow(), and UpdatePrefs().

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

◆ UpdateDisplay()

void HistoryDialog::UpdateDisplay ( wxEvent &  e)

Definition at line 198 of file HistoryWindow.cpp.

199 {
200  e.Skip();
201  if(IsShown())
202  DoUpdate();
203 }

References DoUpdate().

Referenced by HistoryDialog().

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

◆ UpdateLevels()

void HistoryDialog::UpdateLevels ( )
private

Definition at line 247 of file HistoryWindow.cpp.

248 {
249 #if defined(ALLOW_DISCARD)
250  wxWindow *focus;
251  int value = mLevels->GetValue();
252 
253  if (value > mSelected) {
254  value = mSelected;
255  }
256 
257  if (value == 0) {
258  value = 1;
259  }
260 
261  mLevels->SetValue(value);
262  mLevels->SetRange(1, mSelected);
263 
264  mAvail->SetValue(wxString::Format(wxT("%d"), mSelected));
265 
266  focus = FindFocus();
267  if ((focus == mDiscard || focus == mLevels) && mSelected == 0) {
268  mList->SetFocus();
269  }
270 
271  mLevels->Enable(mSelected > 0);
272  mDiscard->Enable(!mAudioIOBusy && mSelected > 0);
273 #endif
274 }

References mAudioIOBusy, mAvail, mDiscard, mLevels, mList, and mSelected.

Referenced by DoUpdate(), and OnItemSelected().

Here is the caller graph for this function:

◆ UpdatePrefs()

void HistoryDialog::UpdatePrefs ( )
overrideprivatevirtual

Implements PrefsListener.

Definition at line 390 of file HistoryWindow.cpp.

391 {
392  bool shown = IsShown();
393  if (shown) {
394  Show(false);
395  }
396 
397  SetSizer(nullptr);
398  DestroyChildren();
399 
401  ShuttleGui S(this, eIsCreating);
402  Populate(S);
403 
404  if (shown) {
405  Show(true);
406  }
407 }

References eIsCreating, HistoryTitle, Populate(), wxDialogWrapper::SetTitle(), and Show().

Here is the call graph for this function:

Member Data Documentation

◆ mAudioIOBusy

bool HistoryDialog::mAudioIOBusy
private

Definition at line 68 of file HistoryWindow.h.

Referenced by HistoryDialog(), OnAudioIO(), OnItemSelected(), and UpdateLevels().

◆ mAvail

wxTextCtrl* HistoryDialog::mAvail
private

Definition at line 62 of file HistoryWindow.h.

Referenced by Populate(), and UpdateLevels().

◆ mClipboard

wxTextCtrl* HistoryDialog::mClipboard
private

Definition at line 61 of file HistoryWindow.h.

Referenced by DoUpdate(), and Populate().

◆ mCompact

wxButton* HistoryDialog::mCompact
private

Definition at line 65 of file HistoryWindow.h.

Referenced by OnAudioIO(), and Populate().

◆ mDiscard

wxButton* HistoryDialog::mDiscard
private

Definition at line 64 of file HistoryWindow.h.

Referenced by OnAudioIO(), Populate(), and UpdateLevels().

◆ mLevels

wxSpinCtrl* HistoryDialog::mLevels
private

Definition at line 63 of file HistoryWindow.h.

Referenced by OnDiscard(), Populate(), and UpdateLevels().

◆ mList

wxListCtrl* HistoryDialog::mList
private

Definition at line 59 of file HistoryWindow.h.

Referenced by DoUpdate(), OnDiscard(), OnItemSelected(), OnShow(), OnSize(), Populate(), and UpdateLevels().

◆ mManager

UndoManager* HistoryDialog::mManager
private

Definition at line 58 of file HistoryWindow.h.

Referenced by DoUpdate(), HistoryDialog(), OnDiscard(), and Populate().

◆ mProject

AudacityProject* HistoryDialog::mProject
private

Definition at line 57 of file HistoryWindow.h.

Referenced by HistoryDialog(), and OnCompact().

◆ mSelected

int HistoryDialog::mSelected
private

Definition at line 67 of file HistoryWindow.h.

Referenced by DoUpdate(), HistoryDialog(), OnDiscard(), OnItemSelected(), OnSize(), and UpdateLevels().

◆ mTotal

wxTextCtrl* HistoryDialog::mTotal
private

Definition at line 60 of file HistoryWindow.h.

Referenced by DoUpdate(), and Populate().


The documentation for this class was generated from the following files:
size
size_t size
Definition: ffmpeg-2.3.6-single-header.h:412
TranslatableString
Holds a msgid for the translation catalog; may also bind format arguments.
Definition: TranslatableString.h:32
eIsCreating
@ eIsCreating
Definition: ShuttleGui.h:38
ShuttleGuiBase::StartVerticalLay
void StartVerticalLay(int iProp=1)
Definition: ShuttleGui.cpp:1184
AudacityMessageBox
int AudacityMessageBox(const TranslatableString &message, const TranslatableString &caption, long style, wxWindow *parent, int x, int y)
Definition: AudacityMessageBox.cpp:17
ID_TOTAL
@ ID_TOTAL
Definition: HistoryWindow.cpp:53
UndoManager::CalculateSpaceUsage
void CalculateSpaceUsage()
Definition: UndoManager.cpp:94
HistoryDialog::mSelected
int mSelected
Definition: HistoryWindow.h:67
ID_DISCARD_CLIPBOARD
@ ID_DISCARD_CLIPBOARD
Definition: HistoryWindow.cpp:56
eHelpButton
@ eHelpButton
Definition: ShuttleGui.h:604
Format
Abstract base class used in importing a file.
Clipboard::Clear
void Clear()
Definition: Clipboard.cpp:41
ShuttleGui::MinSize
ShuttleGui & MinSize()
Definition: ShuttleGui.h:733
XO
#define XO(s)
Definition: Internat.h:31
ProjectFileIO::Get
static ProjectFileIO & Get(AudacityProject &project)
Definition: ProjectFileIO.cpp:266
HistoryDialog::mClipboard
wxTextCtrl * mClipboard
Definition: HistoryWindow.h:61
ShuttleGuiBase::EndMultiColumn
void EndMultiColumn()
Definition: ShuttleGui.cpp:1238
HelpSystem::ShowHelp
static void ShowHelp(wxWindow *parent, const FilePath &localFileName, const URLString &remoteURL, bool bModal=false, bool alwaysDefaultBrowser=false)
Definition: HelpSystem.cpp:237
desc
const TranslatableString desc
Definition: ExportPCM.cpp:58
ShuttleGui::Id
ShuttleGui & Id(int id)
Definition: ShuttleGui.cpp:2274
HistoryDialog::mAvail
wxTextCtrl * mAvail
Definition: HistoryWindow.h:62
HistoryDialog::mLevels
wxSpinCtrl * mLevels
Definition: HistoryWindow.h:63
ShuttleGui::Style
ShuttleGui & Style(long iStyle)
Definition: ShuttleGui.h:727
XXO
#define XXO(s)
Definition: Internat.h:44
ShuttleGuiBase::AddTextBox
wxTextCtrl * AddTextBox(const TranslatableString &Caption, const wxString &Value, const int nChars)
Definition: ShuttleGui.cpp:638
ShuttleGuiBase::StartMultiColumn
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
Definition: ShuttleGui.cpp:1229
ShuttleGuiBase::EndVerticalLay
void EndVerticalLay()
Definition: ShuttleGui.cpp:1203
Internat::FormatSize
static TranslatableString FormatSize(wxLongLong size)
Convert a number to a string while formatting it in bytes, KB, MB, GB.
Definition: Internat.cpp:204
ID_DISCARD
@ ID_DISCARD
Definition: HistoryWindow.cpp:55
ID_LEVELS
@ ID_LEVELS
Definition: HistoryWindow.cpp:54
HistoryDialog::mManager
UndoManager * mManager
Definition: HistoryWindow.h:58
ShuttleGuiBase::GetParent
wxWindow * GetParent()
Definition: ShuttleGui.h:496
HistoryDialog::mAudioIOBusy
bool mAudioIOBusy
Definition: HistoryWindow.h:68
HistoryDialog::mDiscard
wxButton * mDiscard
Definition: HistoryWindow.h:64
UndoManager::GetLongDescription
wxLongLong_t GetLongDescription(unsigned int n, TranslatableString *desc, TranslatableString *size)
Definition: UndoManager.cpp:131
ShuttleGuiBase::AddWindow
wxWindow * AddWindow(wxWindow *pWindow, int PositionFlags=wxALIGN_CENTRE)
Definition: ShuttleGui.cpp:299
HistoryDialog::mList
wxListCtrl * mList
Definition: HistoryWindow.h:59
HistoryDialog::mTotal
wxTextCtrl * mTotal
Definition: HistoryWindow.h:60
HistoryTitle
#define HistoryTitle
Definition: HistoryWindow.cpp:71
ShuttleGuiBase::AddButton
wxButton * AddButton(const TranslatableString &Text, int PositionFlags=wxALIGN_CENTRE, bool setDefault=false)
Definition: ShuttleGui.cpp:360
ShuttleGuiBase::StartStatic
wxStaticBox * StartStatic(const TranslatableString &Str, int iProp=0)
Definition: ShuttleGui.cpp:893
Clipboard::Get
static Clipboard & Get()
Definition: Clipboard.cpp:29
UndoManager::GetClipboardSpaceUsage
wxLongLong_t GetClipboardSpaceUsage() const
Definition: UndoManager.h:202
eOkButton
@ eOkButton
Definition: ShuttleGui.h:600
HistoryDialog::UpdateLevels
void UpdateLevels()
Definition: HistoryWindow.cpp:247
HistoryDialog::UpdateDisplay
void UpdateDisplay(wxEvent &e)
Definition: HistoryWindow.cpp:198
_
#define _(s)
Definition: Internat.h:75
ShuttleGui::ConnectRoot
auto ConnectRoot(wxEventTypeTag< Tag > eventType, void(Handler::*func)(Argument &)) -> typename std::enable_if< std::is_base_of< Argument, Tag >::value, ShuttleGui & >::type
Definition: ShuttleGui.h:699
ID_COMPACT
@ ID_COMPACT
Definition: HistoryWindow.cpp:57
wxDialogWrapper::wxDialogWrapper
wxDialogWrapper()
Definition: wxPanelWrapper.h:84
HistoryDialog::OnAudioIO
void OnAudioIO(wxCommandEvent &evt)
Definition: HistoryWindow.cpp:183
wxDialogWrapper::SetTitle
void SetTitle(const TranslatableString &title)
Definition: wxPanelWrapper.cpp:66
FindProjectFrame
wxFrame * FindProjectFrame(AudacityProject *project)
Get a pointer to the window associated with a project, or null if the given pointer is null,...
Definition: ProjectWindows.cpp:88
ShuttleGui::AddStandardButtons
void AddStandardButtons(long buttons=eOkButton|eCancelButton, wxWindow *extra=NULL)
Definition: ShuttleGui.cpp:2444
UndoManager::GetCurrentState
unsigned int GetCurrentState()
Definition: UndoManager.cpp:265
HistoryDialog::Populate
void Populate(ShuttleGui &S)
Definition: HistoryWindow.cpp:107
HistoryDialog::DoUpdate
void DoUpdate()
Definition: HistoryWindow.cpp:212
ShuttleGuiBase::AddPrompt
void AddPrompt(const TranslatableString &Prompt, int wrapWidth=0)
Right aligned text string.
Definition: ShuttleGui.cpp:238
TranslatableString::Translation
wxString Translation() const
Definition: TranslatableString.h:79
ShuttleGuiBase::SetBorder
void SetBorder(int Border)
Definition: ShuttleGui.h:489
wxDialogWrapper::SetName
void SetName()
Definition: wxPanelWrapper.cpp:81
ShuttleGuiBase::AddVariableText
wxStaticText * AddVariableText(const TranslatableString &Str, bool bCenter=false, int PositionFlags=0, int wrapWidth=0)
Definition: ShuttleGui.cpp:463
ShuttleGuiBase::EndStatic
void EndStatic()
Definition: ShuttleGui.cpp:922
safenew
#define safenew
Definition: MemoryX.h:10
HistoryDialog::OnListKeyDown
void OnListKeyDown(wxKeyEvent &event)
Definition: HistoryWindow.cpp:352
HistoryDialog::mProject
AudacityProject * mProject
Definition: HistoryWindow.h:57
HistoryDialog::mCompact
wxButton * mCompact
Definition: HistoryWindow.h:65
UndoManager::RemoveStates
void RemoveStates(size_t begin, size_t end)
Definition: UndoManager.cpp:207
ID_AVAIL
@ ID_AVAIL
Definition: HistoryWindow.cpp:51
ProjectHistory::Get
static ProjectHistory & Get(AudacityProject &project)
Definition: ProjectHistory.cpp:26
HistoryDialog::Show
bool Show(bool show=true) override
Definition: HistoryWindow.cpp:205
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:631
ProjectHistory::SetStateTo
void SetStateTo(unsigned int n, bool doAutosave=true)
Definition: ProjectHistory.cpp:170
UndoManager::GetNumStates
unsigned int GetNumStates()
Definition: UndoManager.cpp:260