1 | // Aseprite |
---|---|
2 | // Copyright (C) 2017 David Capello |
3 | // |
4 | // This program is distributed under the terms of |
5 | // the End-User License Agreement for Aseprite. |
6 | |
7 | #ifdef HAVE_CONFIG_H |
8 | #include "config.h" |
9 | #endif |
10 | |
11 | #include "app/commands/quick_command.h" |
12 | |
13 | namespace app { |
14 | |
15 | QuickCommand::QuickCommand(const char* id, std::function<void()> execute) |
16 | : Command(id, CmdUIOnlyFlag) |
17 | , m_execute(execute) |
18 | { |
19 | } |
20 | |
21 | QuickCommand::~QuickCommand() |
22 | { |
23 | } |
24 | |
25 | void QuickCommand::onExecute(Context* context) |
26 | { |
27 | m_execute(); |
28 | } |
29 | |
30 | } // namespace app |
31 |