123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543 |
- <!DOCTYPE html>
- <!--[if IE]><![endif]-->
- <html>
-
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <title>Class Scenario
- </title>
- <meta name="viewport" content="width=device-width">
- <meta name="title" content="Class Scenario
- ">
- <meta name="generator" content="docfx 2.59.0.0">
-
- <link rel="shortcut icon" href="../../favicon.ico">
- <link rel="stylesheet" href="../../styles/docfx.vendor.css">
- <link rel="stylesheet" href="../../styles/docfx.css">
- <link rel="stylesheet" href="../../styles/main.css">
- <meta property="docfx:navrel" content="../../toc.html">
- <meta property="docfx:tocrel" content="toc.html">
-
- <meta property="docfx:rel" content="../../">
-
- </head>
- <body data-spy="scroll" data-target="#affix" data-offset="120">
- <div id="wrapper">
- <header>
-
- <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
- <div class="container">
- <div class="navbar-header">
- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
- <span class="sr-only">Toggle navigation</span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
-
- <a class="navbar-brand" href="../../index.html">
- <img id="logo" class="svg" src="../../images/logo48.png" alt="">
- </a>
- </div>
- <div class="collapse navbar-collapse" id="navbar">
- <form class="navbar-form navbar-right" role="search" id="search">
- <div class="form-group">
- <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
- </div>
- </form>
- </div>
- </div>
- </nav>
-
- <div class="subnav navbar navbar-default">
- <div class="container hide-when-search" id="breadcrumb">
- <ul class="breadcrumb">
- <li></li>
- </ul>
- </div>
- </div>
- </header>
- <div class="container body-content">
-
- <div id="search-results">
- <div class="search-list">Search Results for <span></span></div>
- <div class="sr-items">
- <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
- </div>
- <ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></ul>
- </div>
- </div>
- <div role="main" class="container body-content hide-when-search">
-
- <div class="sidenav hide-when-search">
- <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
- <div class="sidetoggle collapse" id="sidetoggle">
- <div id="sidetoc"></div>
- </div>
- </div>
- <div class="article row grid-right">
- <div class="col-md-10">
- <article class="content wrap" id="_content" data-uid="UICatalog.Scenario">
-
-
- <h1 id="UICatalog_Scenario" data-uid="UICatalog.Scenario" class="text-break">Class Scenario
- </h1>
- <div class="markdown level0 summary"><p>Base class for each demo/scenario.</p>
- <p>
- To define a new scenario:
- <ol><li>Create a new <code>.cs</code> file in the <cs>Scenarios</cs> directory that derives from <a class="xref" href="UICatalog.Scenario.html">Scenario</a>.</li><li>Annotate the <a class="xref" href="UICatalog.Scenario.html">Scenario</a> derived class with a <a class="xref" href="UICatalog.Scenario.ScenarioMetadata.html">Scenario.ScenarioMetadata</a> attribute specifying the scenario's name and description.</li><li>Add one or more <a class="xref" href="UICatalog.Scenario.ScenarioCategory.html">Scenario.ScenarioCategory</a> attributes to the class specifying which categories the scenario belongs to. If you don't specify a category the scenario will show up in "_All".</li><li>Implement the <a class="xref" href="UICatalog.Scenario.html#UICatalog_Scenario_Setup">Setup()</a> override which will be called when a user selects the scenario to run.</li><li>Optionally, implement the <a class="xref" href="UICatalog.Scenario.html#UICatalog_Scenario_Init_Terminal_Gui_Toplevel_Terminal_Gui_ColorScheme_">Init(Toplevel, ColorScheme)</a> and/or <a class="xref" href="UICatalog.Scenario.html#UICatalog_Scenario_Run">Run()</a> overrides to provide a custom implementation.</li></ol>
- </p>
- <p>
- The UI Catalog program uses reflection to find all scenarios and adds them to the
- ListViews. Press ENTER to run the selected scenario. Press CTRL-Q to exit it. /
- </p>
- </div>
- <div class="markdown level0 conceptual"></div>
- <div class="inheritance">
- <h5>Inheritance</h5>
- <div class="level0"><span class="xref">System.Object</span></div>
- <div class="level1"><span class="xref">Scenario</span></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.AllViewsTester.html">AllViewsTester</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.AutoSizeAndDirectionText.html">AutoSizeAndDirectionText</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.BackgroundWorkerCollection.html">BackgroundWorkerCollection</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.BasicColors.html">BasicColors</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.Borders.html">Borders</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.BordersComparisons.html">BordersComparisons</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.BordersOnFrameView.html">BordersOnFrameView</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.BordersOnToplevel.html">BordersOnToplevel</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.BordersOnWindow.html">BordersOnWindow</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.Buttons.html">Buttons</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.CharacterMap.html">CharacterMap</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.ClassExplorer.html">ClassExplorer</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.Clipping.html">Clipping</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.ComboBoxIteration.html">ComboBoxIteration</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.ComputedLayout.html">ComputedLayout</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.ContextMenus.html">ContextMenus</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.CsvEditor.html">CsvEditor</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.Dialogs.html">Dialogs</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.DynamicMenuBar.html">DynamicMenuBar</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.DynamicStatusBar.html">DynamicStatusBar</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.Editor.html">Editor</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.GraphViewExample.html">GraphViewExample</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.HexEditor.html">HexEditor</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.InteractiveTree.html">InteractiveTree</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.InvertColors.html">InvertColors</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.Keys.html">Keys</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.LabelsAsLabels.html">LabelsAsLabels</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.LineViewExample.html">LineViewExample</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.ListsAndCombos.html">ListsAndCombos</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.ListViewWithSelection.html">ListViewWithSelection</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.MessageBoxes.html">MessageBoxes</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.Mouse.html">Mouse</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.MultiColouredTable.html">MultiColouredTable</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.MyScenario.html">MyScenario</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.Notepad.html">Notepad</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.Progress.html">Progress</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.ProgressBarStyles.html">ProgressBarStyles</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.Scrolling.html">Scrolling</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.SendKeys.html">SendKeys</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.SingleBackgroundWorker.html">SingleBackgroundWorker</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.SyntaxHighlighting.html">SyntaxHighlighting</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.TableEditor.html">TableEditor</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.TabViewExample.html">TabViewExample</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.Text.html">Text</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.TextAlignments.html">TextAlignments</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.TextAlignmentsAndDirections.html">TextAlignmentsAndDirections</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.TextFormatterDemo.html">TextFormatterDemo</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.TextViewAutocompletePopup.html">TextViewAutocompletePopup</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.Threading.html">Threading</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.TimeAndDate.html">TimeAndDate</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.TreeUseCases.html">TreeUseCases</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.TreeViewFileSystem.html">TreeViewFileSystem</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.UnicodeInMenu.html">UnicodeInMenu</a></div>
- <div class="level2"><a class="xref" href="UICatalog.Scenarios.WindowsAndFrameViews.html">WindowsAndFrameViews</a></div>
- </div>
- <div classs="implements">
- <h5>Implements</h5>
- <div><span class="xref">System.IDisposable</span></div>
- </div>
- <div class="inheritedMembers">
- <h5>Inherited Members</h5>
- <div>
- <span class="xref">System.Object.Equals(System.Object)</span>
- </div>
- <div>
- <span class="xref">System.Object.Equals(System.Object, System.Object)</span>
- </div>
- <div>
- <span class="xref">System.Object.GetHashCode()</span>
- </div>
- <div>
- <span class="xref">System.Object.GetType()</span>
- </div>
- <div>
- <span class="xref">System.Object.MemberwiseClone()</span>
- </div>
- <div>
- <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
- </div>
- </div>
- <h6><strong>Namespace</strong>: <a class="xref" href="UICatalog.html">UICatalog</a></h6>
- <h6><strong>Assembly</strong>: UICatalog.dll</h6>
- <h5 id="UICatalog_Scenario_syntax">Syntax</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public class Scenario : IDisposable</code></pre>
- </div>
- <h5 id="UICatalog_Scenario_examples"><strong>Examples</strong></h5>
- <p>The example below is provided in the <code>Scenarios</code> directory as a generic sample that can be copied and re-named:</p>
- <pre><code>using Terminal.Gui;
- namespace UICatalog {
- [ScenarioMetadata (Name: "Generic", Description: "Generic sample - A template for creating new Scenarios")]
- [ScenarioCategory ("Controls")]
- class MyScenario : Scenario {
- public override void Setup ()
- {
- // Put your scenario code here, e.g.
- Win.Add (new Button ("Press me!") {
- X = Pos.Center (),
- Y = Pos.Center (),
- Clicked = () => MessageBox.Query (20, 7, "Hi", "Neat?", "Yes", "No")
- });
- }
- }
- }</code></pre>
- <h3 id="properties">Properties
- </h3>
- <a id="UICatalog_Scenario_Top_" data-uid="UICatalog.Scenario.Top*"></a>
- <h4 id="UICatalog_Scenario_Top" data-uid="UICatalog.Scenario.Top">Top</h4>
- <div class="markdown level1 summary"><p>The Top level for the <a class="xref" href="UICatalog.Scenario.html">Scenario</a>. This should be set to <a class="xref" href="../Terminal.Gui/Terminal.Gui.Application.html#Terminal_Gui_Application_Top">Top</a> in most cases.</p>
- </div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="decalaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public Toplevel Top { get; set; }</code></pre>
- </div>
- <h5 class="propertyValue">Property Value</h5>
- <table class="table table-bordered table-striped table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="../Terminal.Gui/Terminal.Gui.Toplevel.html">Toplevel</a></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <a id="UICatalog_Scenario_Win_" data-uid="UICatalog.Scenario.Win*"></a>
- <h4 id="UICatalog_Scenario_Win" data-uid="UICatalog.Scenario.Win">Win</h4>
- <div class="markdown level1 summary"><p>The Window for the <a class="xref" href="UICatalog.Scenario.html">Scenario</a>. This should be set within the <a class="xref" href="../Terminal.Gui/Terminal.Gui.Application.html#Terminal_Gui_Application_Top">Top</a> in most cases.</p>
- </div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="decalaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public Window Win { get; set; }</code></pre>
- </div>
- <h5 class="propertyValue">Property Value</h5>
- <table class="table table-bordered table-striped table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="../Terminal.Gui/Terminal.Gui.Window.html">Window</a></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <h3 id="methods">Methods
- </h3>
- <a id="UICatalog_Scenario_Dispose_" data-uid="UICatalog.Scenario.Dispose*"></a>
- <h4 id="UICatalog_Scenario_Dispose" data-uid="UICatalog.Scenario.Dispose">Dispose()</h4>
- <div class="markdown level1 summary"></div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="decalaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public void Dispose()</code></pre>
- </div>
- <a id="UICatalog_Scenario_Dispose_" data-uid="UICatalog.Scenario.Dispose*"></a>
- <h4 id="UICatalog_Scenario_Dispose_System_Boolean_" data-uid="UICatalog.Scenario.Dispose(System.Boolean)">Dispose(Boolean)</h4>
- <div class="markdown level1 summary"></div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="decalaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">protected virtual void Dispose(bool disposing)</code></pre>
- </div>
- <h5 class="parameters">Parameters</h5>
- <table class="table table-bordered table-striped table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Name</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><span class="xref">System.Boolean</span></td>
- <td><span class="parametername">disposing</span></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <a id="UICatalog_Scenario_GetCategories_" data-uid="UICatalog.Scenario.GetCategories*"></a>
- <h4 id="UICatalog_Scenario_GetCategories" data-uid="UICatalog.Scenario.GetCategories">GetCategories()</h4>
- <div class="markdown level1 summary"><p>Helper function to get the list of categories a <a class="xref" href="UICatalog.Scenario.html">Scenario</a> belongs to (defined in <a class="xref" href="UICatalog.Scenario.ScenarioCategory.html">Scenario.ScenarioCategory</a>)</p>
- </div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="decalaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public List<string> GetCategories()</code></pre>
- </div>
- <h5 class="returns">Returns</h5>
- <table class="table table-bordered table-striped table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><span class="xref">System.Collections.Generic.List</span><<span class="xref">System.String</span>></td>
- <td><p>list of category names</p>
- </td>
- </tr>
- </tbody>
- </table>
- <a id="UICatalog_Scenario_GetDerivedClasses_" data-uid="UICatalog.Scenario.GetDerivedClasses*"></a>
- <h4 id="UICatalog_Scenario_GetDerivedClasses__1" data-uid="UICatalog.Scenario.GetDerivedClasses``1">GetDerivedClasses<T>()</h4>
- <div class="markdown level1 summary"><p>Returns an instance of each <a class="xref" href="UICatalog.Scenario.html">Scenario</a> defined in the project.
- <a href="https://stackoverflow.com/questions/5411694/get-all-inherited-classes-of-an-abstract-class">https://stackoverflow.com/questions/5411694/get-all-inherited-classes-of-an-abstract-class</a></p>
- </div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="decalaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public static List<Type> GetDerivedClasses<T>()</code></pre>
- </div>
- <h5 class="returns">Returns</h5>
- <table class="table table-bordered table-striped table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><span class="xref">System.Collections.Generic.List</span><<span class="xref">System.Type</span>></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <h5 class="typeParameters">Type Parameters</h5>
- <table class="table table-bordered table-striped table-condensed">
- <thead>
- <tr>
- <th>Name</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><span class="parametername">T</span></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <a id="UICatalog_Scenario_GetDescription_" data-uid="UICatalog.Scenario.GetDescription*"></a>
- <h4 id="UICatalog_Scenario_GetDescription" data-uid="UICatalog.Scenario.GetDescription">GetDescription()</h4>
- <div class="markdown level1 summary"><p>Helper to get the <a class="xref" href="UICatalog.Scenario.html">Scenario</a> Description (defined in <a class="xref" href="UICatalog.Scenario.ScenarioMetadata.html">Scenario.ScenarioMetadata</a>)</p>
- </div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="decalaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public string GetDescription()</code></pre>
- </div>
- <h5 class="returns">Returns</h5>
- <table class="table table-bordered table-striped table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><span class="xref">System.String</span></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <a id="UICatalog_Scenario_GetName_" data-uid="UICatalog.Scenario.GetName*"></a>
- <h4 id="UICatalog_Scenario_GetName" data-uid="UICatalog.Scenario.GetName">GetName()</h4>
- <div class="markdown level1 summary"><p>Helper to get the <a class="xref" href="UICatalog.Scenario.html">Scenario</a> Name (defined in <a class="xref" href="UICatalog.Scenario.ScenarioMetadata.html">Scenario.ScenarioMetadata</a>)</p>
- </div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="decalaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public string GetName()</code></pre>
- </div>
- <h5 class="returns">Returns</h5>
- <table class="table table-bordered table-striped table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><span class="xref">System.String</span></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <a id="UICatalog_Scenario_Init_" data-uid="UICatalog.Scenario.Init*"></a>
- <h4 id="UICatalog_Scenario_Init_Terminal_Gui_Toplevel_Terminal_Gui_ColorScheme_" data-uid="UICatalog.Scenario.Init(Terminal.Gui.Toplevel,Terminal.Gui.ColorScheme)">Init(Toplevel, ColorScheme)</h4>
- <div class="markdown level1 summary"><p>Helper that provides the default <a class="xref" href="../Terminal.Gui/Terminal.Gui.Window.html">Window</a> implementation with a frame and
- label showing the name of the <a class="xref" href="UICatalog.Scenario.html">Scenario</a> and logic to exit back to
- the Scenario picker UI.
- Override <a class="xref" href="UICatalog.Scenario.html#UICatalog_Scenario_Init_Terminal_Gui_Toplevel_Terminal_Gui_ColorScheme_">Init(Toplevel, ColorScheme)</a> to provide any <a class="xref" href="../Terminal.Gui/Terminal.Gui.Toplevel.html">Toplevel</a> behavior needed.</p>
- </div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="decalaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public virtual void Init(Toplevel top, ColorScheme colorScheme)</code></pre>
- </div>
- <h5 class="parameters">Parameters</h5>
- <table class="table table-bordered table-striped table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Name</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a class="xref" href="../Terminal.Gui/Terminal.Gui.Toplevel.html">Toplevel</a></td>
- <td><span class="parametername">top</span></td>
- <td><p>The Toplevel created by the UI Catalog host.</p>
- </td>
- </tr>
- <tr>
- <td><a class="xref" href="../Terminal.Gui/Terminal.Gui.ColorScheme.html">ColorScheme</a></td>
- <td><span class="parametername">colorScheme</span></td>
- <td><p>The colorscheme to use.</p>
- </td>
- </tr>
- </tbody>
- </table>
- <h5 id="UICatalog_Scenario_Init_Terminal_Gui_Toplevel_Terminal_Gui_ColorScheme__remarks">Remarks</h5>
- <div class="markdown level1 remarks"><p>
- The base implementation calls <a class="xref" href="../Terminal.Gui/Terminal.Gui.Application.html#Terminal_Gui_Application_Init_Terminal_Gui_ConsoleDriver_Terminal_Gui_IMainLoopDriver_">Init(ConsoleDriver, IMainLoopDriver)</a>, sets <a class="xref" href="UICatalog.Scenario.html#UICatalog_Scenario_Top">Top</a> to the passed in <a class="xref" href="../Terminal.Gui/Terminal.Gui.Toplevel.html">Toplevel</a>, creates a <a class="xref" href="../Terminal.Gui/Terminal.Gui.Window.html">Window</a> for <a class="xref" href="UICatalog.Scenario.html#UICatalog_Scenario_Win">Win</a> and adds it to <a class="xref" href="UICatalog.Scenario.html#UICatalog_Scenario_Top">Top</a>.
- </p>
- <p>
- Overrides that do not call the base.<a class="xref" href="UICatalog.Scenario.html#UICatalog_Scenario_Run">Run()</a>, must call <a class="xref" href="../Terminal.Gui/Terminal.Gui.Application.html#Terminal_Gui_Application_Init_Terminal_Gui_ConsoleDriver_Terminal_Gui_IMainLoopDriver_">Init(ConsoleDriver, IMainLoopDriver)</a> before creating any views or calling other Terminal.Gui APIs.
- </p>
- </div>
- <a id="UICatalog_Scenario_RequestStop_" data-uid="UICatalog.Scenario.RequestStop*"></a>
- <h4 id="UICatalog_Scenario_RequestStop" data-uid="UICatalog.Scenario.RequestStop">RequestStop()</h4>
- <div class="markdown level1 summary"><p>Stops the scenario. Override to change shutdown behavior for the <a class="xref" href="UICatalog.Scenario.html">Scenario</a>.</p>
- </div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="decalaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public virtual void RequestStop()</code></pre>
- </div>
- <a id="UICatalog_Scenario_Run_" data-uid="UICatalog.Scenario.Run*"></a>
- <h4 id="UICatalog_Scenario_Run" data-uid="UICatalog.Scenario.Run">Run()</h4>
- <div class="markdown level1 summary"><p>Runs the <a class="xref" href="UICatalog.Scenario.html">Scenario</a>. Override to start the <a class="xref" href="UICatalog.Scenario.html">Scenario</a> using a <a class="xref" href="../Terminal.Gui/Terminal.Gui.Toplevel.html">Toplevel</a> different than <code>Top</code>.</p>
- </div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="decalaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public virtual void Run()</code></pre>
- </div>
- <h5 id="UICatalog_Scenario_Run_remarks">Remarks</h5>
- <div class="markdown level1 remarks"><p>Overrides that do not call the base.<a class="xref" href="UICatalog.Scenario.html#UICatalog_Scenario_Run">Run()</a>, must call <a class="xref" href="../Terminal.Gui/Terminal.Gui.Application.html#Terminal_Gui_Application_Shutdown">Shutdown()</a> before returning.</p>
- </div>
- <a id="UICatalog_Scenario_Setup_" data-uid="UICatalog.Scenario.Setup*"></a>
- <h4 id="UICatalog_Scenario_Setup" data-uid="UICatalog.Scenario.Setup">Setup()</h4>
- <div class="markdown level1 summary"><p>Override this to implement the <a class="xref" href="UICatalog.Scenario.html">Scenario</a> setup logic (create controls, etc...). </p>
- </div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="decalaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public virtual void Setup()</code></pre>
- </div>
- <h5 id="UICatalog_Scenario_Setup_remarks">Remarks</h5>
- <div class="markdown level1 remarks"><p>This is typically the best place to put scenario logic code.</p>
- </div>
- <a id="UICatalog_Scenario_ToString_" data-uid="UICatalog.Scenario.ToString*"></a>
- <h4 id="UICatalog_Scenario_ToString" data-uid="UICatalog.Scenario.ToString">ToString()</h4>
- <div class="markdown level1 summary"></div>
- <div class="markdown level1 conceptual"></div>
- <h5 class="decalaration">Declaration</h5>
- <div class="codewrapper">
- <pre><code class="lang-csharp hljs">public override string ToString()</code></pre>
- </div>
- <h5 class="returns">Returns</h5>
- <table class="table table-bordered table-striped table-condensed">
- <thead>
- <tr>
- <th>Type</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><span class="xref">System.String</span></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- <h5 class="overrides">Overrides</h5>
- <div><span class="xref">System.Object.ToString()</span></div>
- <h3 id="implements">Implements</h3>
- <div>
- <span class="xref">System.IDisposable</span>
- </div>
- </article>
- </div>
-
- <div class="hidden-sm col-md-2" role="complementary">
- <div class="sideaffix">
- <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
- <h5>In This Article</h5>
- <div></div>
- </nav>
- </div>
- </div>
- </div>
- </div>
-
- <footer>
- <div class="grad-bottom"></div>
- <div class="footer">
- <div class="container">
- <span class="pull-right">
- <a href="#top">Back to top</a>
- </span>
-
- <span>Generated by <strong>DocFX</strong></span>
- </div>
- </div>
- </footer>
- </div>
-
- <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
- <script type="text/javascript" src="../../styles/docfx.js"></script>
- <script type="text/javascript" src="../../styles/main.js"></script>
- </body>
- </html>
|