Audacity 3.2.0
wxCommandTargets.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity - A Digital Audio Editor
4 Copyright 1999-2009 Audacity Team
5 License: GPL v2 or later - see LICENSE.txt
6
7 Dan Horgan
8
9 Paul Licameli split from CommandTargets.h
10
11******************************************************************//*******************************************************************/
27#ifndef __AUDACITY_WX_COMMANDTARGETS__
28#define __AUDACITY_WX_COMMANDTARGETS__
29
30#include "CommandTargets.h"
31
32#include <memory>
33#include <vector>
34#include <wx/string.h>
35#include <wx/thread.h>
36
37class wxStatusBar;
38
39#if 0
40
41//#include "ProgressDialog.h" // Member variable
42
44class GUIProgressTarget final : public CommandProgressTarget
45{
46private:
47 ProgressDialog &mProgress;
48public:
49 GUIProgressTarget(ProgressDialog &pd)
50 : mProgress(pd)
51 {}
52 ~GUIProgressTarget() override;
53 void Update(double completed) override
54 {
55 mProgress.Update(completed);
56 }
57};
58#endif
59
61class AUDACITY_DLL_API StatusBarTarget final : public CommandMessageTarget
62{
63private:
64 wxStatusBar &mStatus;
65public:
66 StatusBarTarget(wxStatusBar &sb)
67 : mStatus(sb)
68 {}
69 ~StatusBarTarget() override;
70 void Update(const wxString &message) override;
71};
72
73#endif /* End of include guard: __COMMANDTARGETS__ */
Interface for objects that can receive (string) messages from a command.
virtual void Update(const wxString &message)=0
Interface for objects that can receive command progress information.
virtual void Update(double completed)=0
ProgressDialog Class.
ProgressResult Update(int value, const TranslatableString &message={})
Displays messages from a command in a wxStatusBar.
~StatusBarTarget() override
wxStatusBar & mStatus
StatusBarTarget(wxStatusBar &sb)