mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
* Added Applicaton.Popover. Refactored FindDeepestView * Popover prototype * Testing highlight * Fixed click outside issue * Fixed DialogTests * Fixed click outside issue (agbain) * Enabled mouse wheel in Bar * Enabled mouse wheel in Bar * Progress. Broke arrangement * Added popover tests. Fixed a bunch more CM issues related ot unreliable unit tests. Updated config.json to include Glyphs. * Can't set ForceDriver to empty in Resources/config.json. * added BUGBUG * Made Position/ScreenPosition clear * Added View.IsInHierarchy tests * Added Contextmenuv2 scenario. * Implemented CM2 in TextView * Removed unneeded CM stuff from testhelpers * Shortcut API docs * Fixed keybinding unit tests * Fixed mouse handling * Fighting with CM related unit test failures * Unit tests pass. I think. * Shortcut code cleanup * TextView uses new CM2 * Starting on OnSelect etc... * Starting on OnSelect etc... * Fixed ContextMenuv2 * ContextMenu is working again. * Ugh. ANd fixed button api docs * Fixed DrawHorizontalShadowTransparent (vertical was already fixed). * Made Scenarios compatible with #nullable enable * Undid some keybinding stuff * Fixed stuff * Sped up unit tests * Sped up unit tests 2 * Sped up unit tests 3 * Messing with menus * merged latest v2_develop * Added more Popover unit tests * Added more Popover unit tests2 * Fixed positioning bug * Fixed mouse bug * Fixed Bar draw issue * WIP * merge v2_develop * CM2 sorta works * Enabled Bar subclasses to have IDesignable * Added ViewportSettings.Transparent * Region -> nullable enable * Added ViewportSettigs Editor * merged v2_develop part 2 * merged v2_develop part 3 * WIP: GetViewsUnderMouse * WIP: More GetViewsUnderMouse work * Bars works again * Added unit tests * CM now works * MenuItemv2 POC * SubMenu POC * CommandNotBound * More POC * Optimize Margin to not defer draw if there's no shadow * Logger cleanup * Reverted Generic * Cascading mostly working * fixed layout bug * API docs * API docs * Fixed cascade * Events basically work * code cleanup * Fixed IsDefault bug; * Enabled hotkey support * Made context-menu-like * Improved usability * Refactored ApplicationPopover again * Cleanup * Menuv2 POC basically complete * Code Cleanup * Made menu API simpler * Fixed Strings bugs * Got old ContextMenu scenario mostly working * ContextMenu scenario now works * ContextMenu fixes * ContextMenu fixes * Tons of menu cleanup * ContextMenu works in TextView * Fixed unit tes * Added unit tests * Fixed tests * code cleanup * More code cleanup * Deep dive * scenario * typos * Demo colorpicker in a Menu * Added Region tests proving Region is broken in some Union cases * fixed v2win/net
This commit is contained in:
18
docfx/docs/Popovers.md
Normal file
18
docfx/docs/Popovers.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# Popovers Deep Dive
|
||||
|
||||
Normally Views cannot draw outside of their `Viewport`. Options for influencing content outside of the `Viewport` include:
|
||||
|
||||
1) Modifying the `Border` behavior
|
||||
2) Modifying the `Margin` behavior
|
||||
3) Using @Terminal.Gui.Application.Popover
|
||||
|
||||
Popovers are useful for scenarios such as menus, autocomplete popups, and drop-down combo boxes.
|
||||
|
||||
A Popover is any View that meets these characteristics"
|
||||
|
||||
- Implements the @Terminal.Gui.IPopover interface
|
||||
- Is Focusable (`CetFocus = true`)
|
||||
- Is Transparent (`ViewportSettings = ViewportSettings.Transparent | ViewportSettings.TransparentMouse`
|
||||
- Sets `Visible = false` when it receives `Application.QuitKey`
|
||||
|
||||
@Terminal.Gui.PopoverMenu provides a sophisticated implementation.
|
||||
@@ -33,6 +33,7 @@ See [What's New in V2 For more](newinv2.md).
|
||||
* [Mouse API](mouse.md)
|
||||
* [Multi-tasking and the Application Main Loop](mainloop.md)
|
||||
* [Navigation](navigation.md)
|
||||
* [Popovers](Popovers.md)
|
||||
* [View Deep Dive](View.md)
|
||||
* [Views](views.md)
|
||||
* [Scrolling Deep Dive](scrolling.md)
|
||||
|
||||
@@ -1,14 +1,20 @@
|
||||
# Logging
|
||||
|
||||
Logging has come to Terminal.Gui! You can now enable comprehensive logging of the internals of the libray. This can help diagnose issues with specific terminals, keyboard cultures and/or operating system specific issues.
|
||||
Logging has come to Terminal.Gui! You can now enable comprehensive logging of the internals of the library. This can help diagnose issues with specific terminals, keyboard cultures and/or operating system specific issues.
|
||||
|
||||
To enable file logging you should set the static property `Logging.Logger` to an instance of `Microsoft.Extensions.Logging.ILogger`. If your program already uses logging you can provide a shared instance or instance from Dependency Injection (DI).
|
||||
To enable file logging you should set the static property `Logging.Logger` to an instance of `Microsoft.Extensions.Logging.ILogger`. If your program already uses logging you can provide a shared instance or instance from Dependency Injection (DI).
|
||||
|
||||
Alternatively you can create a new log to ensure only Terminal.Gui logs appear.
|
||||
|
||||
Any logging framework will work (Serilog, NLog, Log4Net etc) but you should ensure you only log to File or UDP etc (i.e. not to console!).
|
||||
Any logging framework will work (Serilog, NLog, Log4Net etc) but you should ensure you don't log to the stdout console (File, Debug Output, or UDP etc... are all fine).
|
||||
|
||||
## Worked example with Serilog to file
|
||||
## UICatalog
|
||||
|
||||
UI Catalog has built-in UI for logging. It logs to both the debug console and a file. By default it only logs at the `Warning` level.
|
||||
|
||||

|
||||
|
||||
## Example with Serilog to file
|
||||
|
||||
Here is an example of how to add logging of Terminal.Gui internals to your program using Serilog file log.
|
||||
|
||||
@@ -81,7 +87,7 @@ Example logs:
|
||||
|
||||
## Metrics
|
||||
|
||||
If you are finding that the UI is slow or unresponsive - or are just interested in performance metrics. You can see these by instaling the `dotnet-counter` tool and running it for your process.
|
||||
If you are finding that the UI is slow or unresponsive - or are just interested in performance metrics. You can see these by installing the `dotnet-counter` tool and running it for your process.
|
||||
|
||||
```
|
||||
dotnet tool install dotnet-counters --global
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
href: mainloop.md
|
||||
- name: Navigation
|
||||
href: navigation.md
|
||||
- name: Popovers
|
||||
href: Popovers.md
|
||||
- name: View Deep Dive
|
||||
href: View.md
|
||||
- name: View List
|
||||
|
||||
Reference in New Issue
Block a user