
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
33 lines
595 B
C++
33 lines
595 B
C++
/*
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/String.h>
|
|
|
|
namespace GUI {
|
|
|
|
class Command {
|
|
public:
|
|
virtual ~Command();
|
|
|
|
virtual void undo() { }
|
|
virtual void redo() { }
|
|
|
|
String action_text() const { return m_action_text; }
|
|
|
|
virtual bool is_insert_text() const { return false; }
|
|
virtual bool is_remove_text() const { return false; }
|
|
|
|
protected:
|
|
Command() { }
|
|
void set_action_text(const String& text) { m_action_text = text; }
|
|
|
|
private:
|
|
String m_action_text;
|
|
};
|
|
|
|
}
|