1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-28 06:08:40 +02:00
audacity/src/commands/PreferenceCommands.h
James Crook e3ef968d57 Add DragCommand. Default Y/N on optional fields. Open/Save project items.
- More Y/N in Optional, making it easier to omit parameters.
- AT removed from Envelope, since T already gives it.
2018-02-24 14:20:29 -05:00

70 lines
2.0 KiB
C++

/**********************************************************************
Audacity: A Digital Audio Editor
Audacity(R) is copyright (c) 1999-2018 Audacity Team.
File License: wxwidgets
PreferenceCommands.h
Dan Horgan
James Crook
******************************************************************//**
\class GetPreferenceCommand
\brief Command for getting the value of a preference
\class SetPreferenceCommand
\brief Command for setting a preference to a given value
*//*******************************************************************/
#ifndef __PREFERENCE_COMMANDS__
#define __PREFERENCE_COMMANDS__
#include "Command.h"
#include "CommandType.h"
// GetPreference
#define GET_PREFERENCE_PLUGIN_SYMBOL XO("Get Preference")
#define SET_PREFERENCE_PLUGIN_SYMBOL XO("Set Preference")
class GetPreferenceCommand final : public AudacityCommand
{
public:
// CommandDefinitionInterface overrides
wxString GetSymbol() override {return GET_PREFERENCE_PLUGIN_SYMBOL;};
wxString GetDescription() override {return _("Gets the value of a single preference.");};
bool DefineParams( ShuttleParams & S ) override;
void PopulateOrExchange(ShuttleGui & S) override;
bool Apply(const CommandContext & context) override;
// AudacityCommand overrides
wxString ManualPage() override {return wxT("Preferences");};
wxString mName;
};
// SetPreference
class SetPreferenceCommand final : public AudacityCommand
{
public:
// CommandDefinitionInterface overrides
wxString GetSymbol() override {return SET_PREFERENCE_PLUGIN_SYMBOL;};
wxString GetDescription() override {return _("Sets the value of a single preference.");};
bool DefineParams( ShuttleParams & S ) override;
void PopulateOrExchange(ShuttleGui & S) override;
bool Apply(const CommandContext & context) override;
// AudacityCommand overrides
wxString ManualPage() override {return wxT("Preferences");};
wxString mName;
wxString mValue;
bool mbReload;
bool bHasReload;
};
#endif /* End of include guard: __PREFERENCE_COMMANDS__ */