Note this PR should not be merged until after #600 is in.
I went on a rampage tonight. It all started with wanting to use more/better characters for frame and other UI elements like the round corners:

I decided I needed a character map app that would let me test which fonts had which Unicode sets in them.
As a result we have this PR
- Fixes `ScrollView` in several key ways:
- It now supports Computed layout and has constructors that don't require parameters.
- `ScrollBarViews` are now positioned using Computed layout versus error prone absoulte
- `ScrollBarViews` now correctly position themselves when one, either, or both are on/off.
- `IsVertical` is now a public property that does the expected thing when changed
- Mouse handling is better; there's still a bug where the mouse doesn't get grabbed by the `ScrollView` initially but I think this is a broader problem. I need @BDisp's help on this.
- The `Scrolling` Scenario was enhanced to demo dynamically adding/removing horizontal/vertical scrollbars (and to prove it was working right).
- I Enabled easy "infinite scroll capability" - CharMap literally lets you scroll over `int.MaxValue / 16` rows of data. Filling a `ContentView` with all of this and panning it around won't work. So I needed a way of having `Redraw` give me virtual coordinates. I did this by defining `OnDrawContent(Rect viewport)` and it's associated `event`:
```csharp
/// <summary>
/// Event invoked when the content area of the View is to be drawn.
/// </summary>
/// <remarks>
/// <para>
/// Will be invoked before any subviews added with <see cref="Add(View)"/> have been drawn.
/// </para>
/// <para>
/// Rect provides the view-relative rectangle describing the currently visible viewport into the <see cref="View"/>.
/// </para>
/// </remarks>
public event EventHandler<Rect> DrawContent;
/// <summary>
/// Enables overrides to draw infinitely scrolled content and/or a background behind added controls.
/// </summary>
/// <param name="viewport">The view-relative rectangle describing the currently visible viewport into the <see cref="View"/></param>
/// <remarks>
/// This method will be called before any subviews added with <see cref="Add(View)"/> have been drawn.
/// </remarks>
public virtual void OnDrawContent (Rect viewport)
{
DrawContent?.Invoke (this, viewport);
}
```
I originally just implemented this pattern in `ScrollView`. Then I realized I wanted the same thing out of ALL `Views`. Namely: the ability to do drawing on an event, particularly to be able to paint something in the background. So I added it to `View`.
Note, that these changes mean we are about 3 small steps away from moving the scollbars from `ScrollView` into ALL views. Which makes a lot of sense to me because I don't think we want to implement duplicative logic in, say `ListView` and `TextView` as well. Why not just do it once?
Along the way I fixed some other things:
- The `Checkbox.Toggled` event now passes state.
Here's some gifs.

Note:
- Scrollbars appear dynamically.
- Fast scrolling of huge data (using no memory).
- Static header
- Dynamic scrollbars on/off
- Note the bottom/right corner now draw correctly in all situations
This PR includes:
#586 - Fixed Clipping
#587 - LayoutComplete
#591 - Sys Console Scenario
#590 - Significantly improves MessageBox, Dialog, Frame drawning and more
See the PRs above for all the details.
Here are the issues this closes:
Closes#299 - MessageBox now auto sizes
Closes#557 - MessageBoxes on small screens
Closes#432 - MessageBox does not deal with long text; width/height params are goofy
Closes#521 - MessageBox should take ustrings (BREAKING CHANGE)
Closes#35 - Dialog should have 1 char padding around edges
Closes#570 - Dialog should use computed layout for buttons
Closes#470 - UI Catalog: Add Dialogs Scenario
Closes#569 - LayoutComplete event
Plus probably more.
+ Added Handled property of type bool to the KeyEventEventArgs class.
+ Added ability to stop further propagation for already handled events on Views for Keyboard related event subscribers (like KeyDown, KeyUp and KeyPress). The driver will check the Handled property of the KeyEventEventArgs passed to the subscribers and will stop any further invocations when its found true.
+ Updated Example project to expose the ability to programatically Open/Close a MenuBar from custom keystrokes.
This commit fixes an issue where the library would crash if the Subviews collection of the currently active View gets updated from inside any of the Keyboard event handlers, such as when the view is updated as a result of a custom Hotkey/Coldkey press.
* key down/up support
* line endings?
* line endings
* KeyDown/Up support
* line endings
* line endings
* Revert "Drop NuGet restore"
This reverts commit 5c7a0d05f0.
* Revert "Revert "Drop NuGet restore""
This reverts commit 2dc5fce865.
* updated demo
* defined styles
* Smarter StatusBar bottom tracking.
* Prepping for https://github.com/migueldeicaza/gui.cs/issues/376
* Oops.
* Fixed StatusBar 'snap to bottom'
* line endings
* Revert "Fixed StatusBar 'snap to bottom'"
This reverts commit 9a91c957e2.
* started UICatalog project
* Initial working POC.
* Fix newlines
* merge
* textalignment demo tweaks
* textalignment demo tweaks
* Unicode Menu Scenario
* not sure why this keeps changing
* re-added project to .sln file
* re-enabled status bar
* moved scenarios to dir
* building a dim and pos demo
* terminal.sln
* progress...barely
* fixed exit
* progress with some underlying fixes to Label
* added readme
* fixes build issue
* launch
* made default colors readable on Windows
* major UI Catalog upgrade
* added more demos and updated readme
* refactored and added more tests
* added ref to Issue #437
* added OnKeyUp support to Curses and Net drivers
* more tweaks - grab PR #438 first
* Added a OpenSelectedItem event to the ListView #429
* updates
* moved KeyUpHandler out of special ESC stuff
* more tweaks & improvements
* testing top window bug
* supported OpenSelectedItem
* lots of updates
* fixed regression, fixed#444
* better button scenario
* tweaks
* add Ready event to Toplevel
* dotfx .gitignroe
* ready for ready
* updated colors based on feedback; consolodated config code
* tweaked readme
* readme
* Added Editor demonstrating TextView
* Added Editor demonstrating TextView
* added hexeditor scenario
Co-authored-by: Miguel de Icaza <miguel@gnome.org>
Co-authored-by: BDisp <bd.bdisp@gmail.com>
* key down/up support
* line endings?
* line endings
* KeyDown/Up support
* line endings
* line endings
* Revert "Drop NuGet restore"
This reverts commit 5c7a0d05f0.
* Revert "Revert "Drop NuGet restore""
This reverts commit 2dc5fce865.
* updated demo
* defined styles
* Smarter StatusBar bottom tracking.
* Prepping for https://github.com/migueldeicaza/gui.cs/issues/376
* Oops.
* Fixed StatusBar 'snap to bottom'
* line endings
* Revert "Fixed StatusBar 'snap to bottom'"
This reverts commit 9a91c957e2.
* started UICatalog project
* Initial working POC.
* Fix newlines
* merge
* textalignment demo tweaks
* textalignment demo tweaks
* Unicode Menu Scenario
* not sure why this keeps changing
* re-added project to .sln file
* re-enabled status bar
* moved scenarios to dir
* building a dim and pos demo
* terminal.sln
* progress...barely
* fixed exit
* progress with some underlying fixes to Label
* added readme
* fixes build issue
* launch
* made default colors readable on Windows
* major UI Catalog upgrade
* added more demos and updated readme
* refactored and added more tests
* added ref to Issue #437
* added OnKeyUp support to Curses and Net drivers
* more tweaks - grab PR #438 first
* Added a OpenSelectedItem event to the ListView #429
* updates
* moved KeyUpHandler out of special ESC stuff
* more tweaks & improvements
* testing top window bug
* supported OpenSelectedItem
* lots of updates
* fixed regression, fixed#444
* better button scenario
* tweaks
* add Ready event to Toplevel
* dotfx .gitignroe
* ready for ready
* updated colors based on feedback; consolodated config code
* tweaked readme
* readme
* Added Editor demonstrating TextView
* Added Editor demonstrating TextView
* added hexeditor scenario
Co-authored-by: Miguel de Icaza <miguel@gnome.org>
Co-authored-by: BDisp <bd.bdisp@gmail.com>
* Improved a better clipped screen. Fixes some bugs with ScrollView, Menu. Added some virtual methods.
* Added some more key features, like shift. Cleaning and updating some stuffs .Added more features to TextField.
* Closes the menu even in a button pressed in another view than menu.
* Added a OnKeyPress action. Now all the keys events are properly mapped to the keys modifiers. Fixed a issue which keys like (ã, á, â) aren't correctly written.
* Fixed an issue with the shift flag for keys ControlA_Z.
* Ensures quiting the terminal if no other option is provided by pressing Ctrl-Q
* Ensures the exception is thrown before ordered.Reverse.
* Changed Button4 To Button3 for CursesDriver compatibility.
* Added support for word selection through keyboard and the mouse. With triple click all text is selected.
* Changed AllowNewLine to AllowWrap.
* Fix topological sort in view class (#413)
* AllowWrap removed and keys issues fixed.
* Removing ordered.Reverse (); Something went wrong.
* Fixes FrameView title.
* Reverted some MapKeyModifiers that prevented the display of some characters.
* Avoiding open the menu-bar every time we typing (€@£§). Alt key now only highlight the menu-bar without open it.
* Fixes hot-key issue preventing menu closing after opened.
* Curses now supports hot-keys and simulates AltMask with Alt+Space. Also supports shift and ctrl combinations to use with text selection.
* Maintains the menu highlighted while focused.
* Removed the IsOutBounds method. This feature is for a future presentation.
Co-authored-by: En3Tho <37334640+En3Tho@users.noreply.github.com>
* Fixed a moving window issue. Added OnLoad Action because there are settings that need to be accessed only once.
* Fixes a layout issue that does not updated the Pos outside the bounds.
* Fixes a issue with other top-levels.
Co-authored-by: Miguel de Icaza <miguel@gnome.org>
This PR enhances MenuBar with the ability to have top-level (on the MenuBar itself), clickable, actionable, MenuItems.
Along the way it fixes a few MenuBar bugs and...
alt activates/closes the menu just like on Windows (alt and f9 work the same).
Cursor shows consistently across the MenuBar as the focus changes
Top-level menu items show accelerator keys.
demo.cs has been enhanced to include an example top-level menuitems. I also tested top-level menuitem as the first menu item as well as in the middle. I didn't want to over complicate demo.cs with tons of examples, FWIW.