You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
794 B
37 lines
794 B
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
|
|
)
|
|
{ }
|
|
|
|
/// <summary>
|
|
/// Creates a new nested child window without inner padding
|
|
/// </summary>
|
|
public Window CreateInnerWindow () {
|
|
return new Window (-1, -1, -2, -2, this) {
|
|
BorderEnabled = false
|
|
};
|
|
}
|
|
|
|
/// <summary>
|
|
/// Removes all children elements and redraws the window
|
|
/// </summary>
|
|
public void Clean () {
|
|
foreach (var window in ChildWindows.ToList ()) {
|
|
window.Destroy (true);
|
|
}
|
|
|
|
// Clear window and redraw
|
|
NCurses.ClearWindow (WindowId);
|
|
SetBorder (true);
|
|
Draw ();
|
|
}
|
|
} |