Class Toplevel | Terminal.Gui v1 (original) (raw)
Namespace
Assembly
Terminal.Gui.dll
Toplevel views can be modally executed. They are used for both an application's main view (filling the entire screen and for pop-up views such as Dialog, MessageBox, and Wizard.
public class Toplevel : View, IDisposable, ISupportInitializeNotification, ISupportInitialize
Inheritance
Toplevel
Implements
Derived
Inherited Members
Constructors
Initializes a new instance of the Toplevel class with Computed layout, defaulting to full screen.
Initializes a new instance of the Toplevel class with the specified Absolute layout.
Properties
Gets or sets a value indicating whether this Toplevel can focus.
Gets or sets if this Toplevel is a Mdi child.
Gets or sets if this Toplevel is a Mdi container.
Gets or sets the menu for this Toplevel.
Determines whether the Toplevel is modal or not. If set to false
(the default):
- ProcessKey(KeyEvent) events will propagate keys upwards.
- The Toplevel will act as an embedded view (not a modal/pop-up).
If set to true
:
- ProcessKey(KeyEvent) events will NOT propogate keys upwards.
- The Toplevel will and look like a modal (pop-up) (e.g. see Dialog.
Gets or sets whether the MainLoop for this Toplevel is running or not.
Gets or sets the status bar for this Toplevel.
Methods
Adds a subview (child) to this view.
Convenience factory method that creates a new Toplevel with the current terminal dimensions.
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
GetTopMdiChild(Type, string[])
Gets the current visible Toplevel Mdi child that matches the arguments pattern.
Method invoked when a mouse event is generated
Move to the next Mdi child from the MdiTop.
Move to the previous Mdi child from the MdiTop.
OnAlternateBackwardKeyChanged(Key)
Virtual method to invoke the AlternateBackwardKeyChanged event.
OnAlternateForwardKeyChanged(Key)
Virtual method to invoke the AlternateForwardKeyChanged event.
Method invoked when a view gets focus.
Method invoked when a key is pressed.
Method invoked when a key is released.
Method invoked when a view loses focus.
Called from Begin(Toplevel) before the Toplevel redraws for the first time.
Virtual method to invoke the QuitKeyChanged event.
Positions the cursor in the right position based on the currently focused view in the chain.
Virtual method enabling implementation of specific positions for inherited Toplevel views.
This method can be overwritten by views that want to provide accelerator functionality (Alt-key for example), but without interefering with normal ProcessKey behavior.
This method can be overwritten by view that want to provide accelerator functionality (Alt-key for example).
If the view is focused, gives the view a chance to process the keystroke.
Redraws this view and its subviews; only redraws the views that have been flagged for a re-display.
Removes a subview added via Add(View) or Add(params View[]) from this View.
Removes all subviews (children) added via Add(View) or Add(params View[]) from this View.
Stops and closes this Toplevel. If this Toplevel is the top-most Toplevel,RequestStop(Toplevel) will be called, causing the application to exit.
Stops and closes the Toplevel specified by top
. If top
is the top-most Toplevel,RequestStop(Toplevel) will be called, causing the application to exit.
Shows the Mdi child indicated by top
, setting it as Current.
Invoked by Begin(Toplevel) as part of Run(Toplevel, Func<Exception, bool>)after the views have been laid out, and before the views are drawn for the first time.
Events
Invoked when the Toplevel Application.RunState becomes the Current Toplevel.
Invoked when the last child of the Toplevel Application.RunState is closed from by End(RunState).
Invoked when the AlternateBackwardKey is changed.
Invoked when the AlternateForwardKey is changed.
Invoked when a child of the Toplevel Application.RunState is closed by
End(RunState).
Invoked when a child Toplevel's Application.RunState has been loaded.
Invoked when a cjhild Toplevel's Application.RunState has been unloaded.
Invoked when the Toplevel's Application.RunState is closed by End(RunState).
Invoked when the Toplevel's Application.RunState is being closed by
RequestStop(Toplevel).
Invoked when the ToplevelApplication.RunState ceases to be the Current Toplevel.
Invoked when the Toplevel Application.RunState has begun to be loaded. A Loaded event handler is a good place to finalize initialization before callingRunLoop(RunState, bool).
Invoked when the QuitKey is changed.
Invoked when the Toplevel MainLoop 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 calling Run(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 Application.RunState has been unloaded. A Unloaded event handler is a good place to dispose objects after calling End(RunState).