From ad93c038511f17b5b163e368f3613a63a639f1dd Mon Sep 17 00:00:00 2001 From: Marek Habersack Date: Sat, 21 Mar 2020 22:35:41 +0100 Subject: [PATCH] [C++] API sync Added: * Plane: mergedown (`ncplane_mergedown`) --- include/ncpp/Plane.hh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/ncpp/Plane.hh b/include/ncpp/Plane.hh index 1a7823d07..ac053fda0 100644 --- a/include/ncpp/Plane.hh +++ b/include/ncpp/Plane.hh @@ -303,6 +303,20 @@ namespace ncpp return move_above (*above); } + bool mergedown (Plane &dst) const + { + if (plane == dst.plane) + throw invalid_argument ("'dst' must refer to a differnt plane than the one this method is called on"); + return ncplane_mergedown (plane, dst.plane) != -1; + } + + bool mergedown (Plane *dst) const + { + if (dst == nullptr) + throw invalid_argument ("'dst' must be a valid pointer"); + return mergedown (*dst); + } + bool cursor_move (int y, int x) const noexcept { return ncplane_cursor_move_yx (plane, y, x) != -1;