| 1 | // Aseprite |
| 2 | // Copyright (C) 2001-2018 David Capello |
| 3 | // |
| 4 | // This program is distributed under the terms of |
| 5 | // the End-User License Agreement for Aseprite. |
| 6 | |
| 7 | #ifndef APP_INPUT_CHAIN_ELEMENT_H_INCLUDED |
| 8 | #define APP_INPUT_CHAIN_ELEMENT_H_INCLUDED |
| 9 | #pragma once |
| 10 | |
| 11 | namespace ui { |
| 12 | class Message; |
| 13 | } |
| 14 | |
| 15 | namespace app { |
| 16 | |
| 17 | class Context; |
| 18 | |
| 19 | class InputChainElement { |
| 20 | public: |
| 21 | virtual ~InputChainElement() { } |
| 22 | |
| 23 | // Called when a new element has priorty in the chain. |
| 24 | virtual void onNewInputPriority(InputChainElement* element, |
| 25 | const ui::Message* msg) = 0; |
| 26 | |
| 27 | virtual bool onCanCut(Context* ctx) = 0; |
| 28 | virtual bool onCanCopy(Context* ctx) = 0; |
| 29 | virtual bool onCanPaste(Context* ctx) = 0; |
| 30 | virtual bool onCanClear(Context* ctx) = 0; |
| 31 | |
| 32 | virtual bool onCut(Context* ctx) = 0; |
| 33 | virtual bool onCopy(Context* ctx) = 0; |
| 34 | virtual bool onPaste(Context* ctx) = 0; |
| 35 | virtual bool onClear(Context* ctx) = 0; |
| 36 | virtual void onCancel(Context* ctx) = 0; |
| 37 | }; |
| 38 | |
| 39 | } // namespace app |
| 40 | |
| 41 | #endif |
| 42 | |