1 | // Aseprite |
2 | // Copyright (C) 2020 Igara Studio S.A. |
3 | // |
4 | // This program is distributed under the terms of |
5 | // the End-User License Agreement for Aseprite. |
6 | |
7 | #ifndef APP_LAYER_UTILS_H_INCLUDED |
8 | #define APP_LAYER_UTILS_H_INCLUDED |
9 | #pragma once |
10 | |
11 | namespace doc { |
12 | class Layer; |
13 | } |
14 | |
15 | namespace app { |
16 | |
17 | class Editor; |
18 | |
19 | // Calculates a possible candidate to be selected in case that we |
20 | // have a specific "selectedLayer" and are going to delete the given |
21 | // "layerToDelete". |
22 | doc::Layer* candidate_if_layer_is_deleted( |
23 | const doc::Layer* selectedLayer, |
24 | const doc::Layer* layerToDelete); |
25 | |
26 | // True if the active layer is locked (itself or its hierarchy), |
27 | // also, it sends a tip to the user 'Layer ... is locked' |
28 | bool layer_is_locked(Editor* editor); |
29 | |
30 | } // namespace app |
31 | |
32 | #endif |
33 | |