<Type Name="Application" FullName="Terminal.Gui.Application">
  <TypeSignature Language="C#" Value="public static class Application" />
  <TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit Application extends System.Object" />
  <AssemblyInfo>
    <AssemblyName>Terminal.Gui</AssemblyName>
    <AssemblyVersion>1.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <Base>
    <BaseTypeName>System.Object</BaseTypeName>
  </Base>
  <Interfaces />
  <Docs>
    <summary>
            The application driver for gui.cs
            </summary>
    <remarks>
      <para>
                You can hook up to the Iteration event to have your method 
                invoked on each iteration of the mainloop.
              </para>
      <para>
                Creates a mainloop to process input events, handle timers and
                other sources of data.   It is accessible via the MainLoop property.
              </para>
      <para>
                When invoked sets the SynchronizationContext to one that is tied
                to the mainloop, allowing user code to use async/await.
              </para>
    </remarks>
  </Docs>
  <Members>
    <Member MemberName="Begin">
      <MemberSignature Language="C#" Value="public static Terminal.Gui.Application.RunState Begin (Terminal.Gui.Toplevel toplevel);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class Terminal.Gui.Application/RunState Begin(class Terminal.Gui.Toplevel toplevel) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Terminal.Gui.Application+RunState</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="toplevel" Type="Terminal.Gui.Toplevel" />
      </Parameters>
      <Docs>
        <param name="toplevel">Toplevel to prepare execution for.</param>
        <summary>
            Building block API: Prepares the provided toplevel for execution.
            </summary>
        <returns>The runstate handle that needs to be passed to the End() method upon completion.</returns>
        <remarks>
             This method prepares the provided toplevel for running with the focus,
             it adds this to the list of toplevels, sets up the mainloop to process the 
             event, lays out the subviews, focuses the first element, and draws the
             toplevel in the screen.   This is usually followed by executing
             the <see cref="M:Terminal.Gui.Application.RunLoop(Terminal.Gui.Application.RunState,System.Boolean)" /> method, and then the <see cref="M:Terminal.Gui.Application.End(Terminal.Gui.Application.RunState)" /> method upon termination which will
              undo these changes.
            </remarks>
      </Docs>
    </Member>
    <Member MemberName="Current">
      <MemberSignature Language="C#" Value="public static Terminal.Gui.Toplevel Current { get; }" />
      <MemberSignature Language="ILAsm" Value=".property class Terminal.Gui.Toplevel Current" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Terminal.Gui.Toplevel</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>
            The current toplevel object.   This is updated when Application.Run enters and leaves and points to the current toplevel.
            </summary>
        <value>The current.</value>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="Driver">
      <MemberSignature Language="C#" Value="public static Terminal.Gui.ConsoleDriver Driver;" />
      <MemberSignature Language="ILAsm" Value=".field public static class Terminal.Gui.ConsoleDriver Driver" />
      <MemberType>Field</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Terminal.Gui.ConsoleDriver</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>
            The current Console Driver in use.
            </summary>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="End">
      <MemberSignature Language="C#" Value="public static void End (Terminal.Gui.Application.RunState runState);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig void End(class Terminal.Gui.Application/RunState runState) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="runState" Type="Terminal.Gui.Application+RunState" />
      </Parameters>
      <Docs>
        <param name="runState">The runstate returned by the <see cref="M:Terminal.Gui.Application.Begin(Terminal.Gui.Toplevel)" /> method.</param>
        <summary>
            Building block API: completes the exection of a Toplevel that was started with Begin.
            </summary>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="GrabMouse">
      <MemberSignature Language="C#" Value="public static void GrabMouse (Terminal.Gui.View view);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig void GrabMouse(class Terminal.Gui.View view) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="view" Type="Terminal.Gui.View" />
      </Parameters>
      <Docs>
        <param name="view">View that will receive all mouse events until UngrabMouse is invoked.</param>
        <summary>
            Grabs the mouse, forcing all mouse events to be routed to the specified view until UngrabMouse is called.
            </summary>
        <returns>The grab.</returns>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="Init">
      <MemberSignature Language="C#" Value="public static void Init ();" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig void Init() cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
            Initializes the Application
            </summary>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="Iteration">
      <MemberSignature Language="C#" Value="public static event EventHandler Iteration;" />
      <MemberSignature Language="ILAsm" Value=".event class System.EventHandler Iteration" />
      <MemberType>Event</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.EventHandler</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>
              This event is raised on each iteration of the
              main loop. 
            </summary>
        <remarks>
              See also <see cref="T:System.Threading.Timeout" /></remarks>
      </Docs>
    </Member>
    <Member MemberName="MainLoop">
      <MemberSignature Language="C#" Value="public static Mono.Terminal.MainLoop MainLoop { get; }" />
      <MemberSignature Language="ILAsm" Value=".property class Mono.Terminal.MainLoop MainLoop" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Mono.Terminal.MainLoop</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>
            The mainloop driver for the applicaiton
            </summary>
        <value>The main loop.</value>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="MakeCenteredRect">
      <MemberSignature Language="C#" Value="public static Terminal.Gui.Rect MakeCenteredRect (Terminal.Gui.Size size);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype Terminal.Gui.Rect MakeCenteredRect(valuetype Terminal.Gui.Size size) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Terminal.Gui.Rect</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="size" Type="Terminal.Gui.Size" />
      </Parameters>
      <Docs>
        <param name="size">Size for the rectangle.</param>
        <summary>
            Returns a rectangle that is centered in the screen for the provided size.
            </summary>
        <returns>The centered rect.</returns>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="Refresh">
      <MemberSignature Language="C#" Value="public static void Refresh ();" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig void Refresh() cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
            Triggers a refresh of the entire display.
            </summary>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="RequestStop">
      <MemberSignature Language="C#" Value="public static void RequestStop ();" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig void RequestStop() cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
            Stops running the most recent toplevel
            </summary>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="RootMouseEvent">
      <MemberSignature Language="C#" Value="public static Action&lt;Terminal.Gui.MouseEvent&gt; RootMouseEvent;" />
      <MemberSignature Language="ILAsm" Value=".field public static class System.Action`1&lt;valuetype Terminal.Gui.MouseEvent&gt; RootMouseEvent" />
      <MemberType>Field</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Action&lt;Terminal.Gui.MouseEvent&gt;</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>
            Merely a debugging aid to see the raw mouse events
            </summary>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="Run">
      <MemberSignature Language="C#" Value="public static void Run ();" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig void Run() cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
            Runs the application with the built-in toplevel view
            </summary>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="Run">
      <MemberSignature Language="C#" Value="public static void Run (Terminal.Gui.Toplevel view);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig void Run(class Terminal.Gui.Toplevel view) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="view" Type="Terminal.Gui.Toplevel" />
      </Parameters>
      <Docs>
        <param name="view">To be added.</param>
        <summary>
              Runs the main loop on the given container.
            </summary>
        <remarks>
          <para>
                This method is used to start processing events
                for the main application, but it is also used to
                run modal dialog boxes.
              </para>
          <para>
                To make a toplevel stop execution, set the "Running"
                property to false.
              </para>
          <para>
                This is equivalent to calling Begin on the toplevel view, followed by RunLoop with the
                returned value, and then calling end on the return value.
              </para>
          <para>
                Alternatively, if your program needs to control the main loop and needs to 
                process events manually, you can invoke Begin to set things up manually and then
                repeatedly call RunLoop with the wait parameter set to false.   By doing this
                the RunLoop method will only process any pending events, timers, idle handlers and
                then return control immediately.
              </para>
        </remarks>
      </Docs>
    </Member>
    <Member MemberName="RunLoop">
      <MemberSignature Language="C#" Value="public static void RunLoop (Terminal.Gui.Application.RunState state, bool wait = true);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig void RunLoop(class Terminal.Gui.Application/RunState state, bool wait) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="state" Type="Terminal.Gui.Application+RunState" />
        <Parameter Name="wait" Type="System.Boolean" />
      </Parameters>
      <Docs>
        <param name="state">The state returned by the Begin method.</param>
        <param name="wait">By default this is true which will execute the runloop waiting for events, if you pass false, you can use this method to run a single iteration of the events.</param>
        <summary>
              Building block API: Runs the main loop for the created dialog
            </summary>
        <remarks>
              Use the wait parameter to control whether this is a
              blocking or non-blocking call.   
            </remarks>
      </Docs>
    </Member>
    <Member MemberName="Top">
      <MemberSignature Language="C#" Value="public static Terminal.Gui.Toplevel Top { get; }" />
      <MemberSignature Language="ILAsm" Value=".property class Terminal.Gui.Toplevel Top" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Terminal.Gui.Toplevel</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>
            The Toplevel object used for the application on startup.
            </summary>
        <value>The top.</value>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="UngrabMouse">
      <MemberSignature Language="C#" Value="public static void UngrabMouse ();" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig void UngrabMouse() cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
            Releases the mouse grab, so mouse events will be routed to the view on which the mouse is.
            </summary>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="UseSystemConsole">
      <MemberSignature Language="C#" Value="public static bool UseSystemConsole;" />
      <MemberSignature Language="ILAsm" Value=".field public static bool UseSystemConsole" />
      <MemberType>Field</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>
            If set, it forces the use of the System.Console-based driver.
            </summary>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
  </Members>
</Type>
