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_DOC_RANGE_OPS_H_INCLUDED 8 #define APP_DOC_RANGE_OPS_H_INCLUDED 9 #pragma once 10 11 #include "app/tags_handling.h" 12 13 #include <vector> 14 15 namespace app { 16 class Doc; 17 class DocRange; 18 19 enum DocRangePlace { 20 kDocRangeBefore, 21 kDocRangeAfter, 22 kDocRangeFirstChild, 23 }; 24 25 // These functions returns the new location of the "from" range or 26 // throws an std::runtime_error() in case that the operation cannot 27 // be done. (E.g. the background layer cannot be moved.) 28 DocRange move_range(Doc* doc, 29 const DocRange& from, 30 const DocRange& to, 31 const DocRangePlace place, 32 const TagsHandling tagsHandling = kDefaultTagsAdjustment); 33 DocRange copy_range(Doc* doc, 34 const DocRange& from, 35 const DocRange& to, 36 const DocRangePlace place, 37 const TagsHandling tagsHandling = kDefaultTagsAdjustment); 38 39 void reverse_frames(Doc* doc, const DocRange& range); 40 41 } // namespace app 42 43 #endif 44