| 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 | #ifndef APP_COMMANDS_QUICK_COMMAND_H_INCLUDED | 
|---|
| 8 | #define APP_COMMANDS_QUICK_COMMAND_H_INCLUDED | 
|---|
| 9 | #pragma once | 
|---|
| 10 |  | 
|---|
| 11 | #include "app/commands/command.h" | 
|---|
| 12 |  | 
|---|
| 13 | #include <functional> | 
|---|
| 14 |  | 
|---|
| 15 | namespace app { | 
|---|
| 16 |  | 
|---|
| 17 | class QuickCommand : public Command { | 
|---|
| 18 | public: | 
|---|
| 19 | QuickCommand(const char* id, std::function<void()> execute); | 
|---|
| 20 | ~QuickCommand(); | 
|---|
| 21 |  | 
|---|
| 22 | protected: | 
|---|
| 23 | void onExecute(Context* context) override; | 
|---|
| 24 |  | 
|---|
| 25 | std::function<void()> m_execute; | 
|---|
| 26 | }; | 
|---|
| 27 |  | 
|---|
| 28 | } // namespace app | 
|---|
| 29 |  | 
|---|
| 30 | #endif | 
|---|
| 31 |  | 
|---|