Class Toplevel | Terminal.Gui v2 (original) (raw)
Namespace
Assembly
Terminal.Gui.dll
Toplevel views are used for both an application's main view (filling the entire screen and for modal (pop-up) views such as Dialog, MessageBox, and Wizard).
public class Toplevel : View, IDisposable, ISupportInitializeNotification, ISupportInitialize
Inheritance
Toplevel
Implements
Derived
Inherited Members
Remarks
Constructors
Initializes a new instance of the Toplevel class, defaulting to full screen. The Width and Height properties will be set to the dimensions of the terminal using Fill(Dim).
Properties
true if was already loaded by the Begin(Toplevel) false, otherwise.
Gets the latest MenuBar added into this Toplevel.
Determines whether the Toplevel is modal or not. If set to false
(the default):
- OnKeyDown(Key) events will propagate keys upwards.
- The Toplevel will act as an embedded view (not a modal/pop-up).
If set to
true
: - OnKeyDown(Key) events will NOT propagate keys upwards.
- The Toplevel will and look like a modal (pop-up) (e.g. see Dialog.
Gets or sets whether the main loop for this Toplevel is running or not.
Methods
Called from Begin(Toplevel) before the Toplevel redraws for the first time.
Adjusts the location and size of top
within this Toplevel. Virtual method enabling implementation of specific positions for inherited Toplevel views.
Stops and closes this Toplevel. If this Toplevel is the top-most Toplevel,RequestStop(Toplevel?) will be called, causing the application to exit.
Events
Invoked when the Toplevel RunState active.
Invoked when the Toplevel's RunState is closed by End(RunState).
Invoked when the Toplevel's RunState is being closed byRequestStop(Toplevel?).
Invoked when the ToplevelRunState ceases to be active.
Invoked when the Toplevel RunState has begun to be loaded. A Loaded event handler is a good place to finalize initialization before calling RunLoop(RunState).
Invoked when the Toplevel main loop has started it's first iteration. Subscribe to this event to perform tasks when the Toplevel has been laid out and focus has been set. changes.
A Ready event handler is a good place to finalize initialization after callingRun(Toplevel, Func<Exception, bool>?) on this Toplevel.
Invoked when the terminal has been resized. The new Size of the terminal is provided.
Invoked when the Toplevel RunState has been unloaded. A Unloaded event handler is a good place to dispose objects after calling End(RunState).