using Mindmagma.Curses;
namespace SCI.CursesWrapper;
public class ContentWindow : Window {
public ContentWindow (nint rootScreen, InputHandler inputHandler) :
base (
0, 1,
CursesWrapper.GetWidth (rootScreen),
CursesWrapper.GetHeight (rootScreen) - 2,
inputHandler
)
{ }
///
/// Creates a new nested child window without inner padding
///
public Window CreateInnerWindow () {
return new Window (-1, -1, -2, -2, this) {
BorderEnabled = false
};
}
///
/// Removes all children elements and redraws the window
///
public void Clean () {
foreach (var window in ChildWindows.ToList ()) {
window.Destroy (true);
}
// Clear window and redraw
NCurses.ClearWindow (WindowId);
SetBorder (true);
Draw ();
}
}