Commit Graph

29 Commits

Author SHA1 Message Date
Charlie Kindel
1df615996e Revamped charmap to be amaze. 2022-11-07 03:10:24 -07:00
BDisp
d7131587d3 Fixes 2193. Character Map scenario not showing the last range chars U+10fffx. 2022-11-06 18:26:04 +00:00
Charlie Kindel
b06e4229c4 Revert "Revert "Fixes #1743 - CharMap renders painfully slow""
This reverts commit 9945c2dd54.
2022-11-02 15:34:47 -06:00
Charlie Kindel
9945c2dd54 Revert "Fixes #1743 - CharMap renders painfully slow"
This reverts commit 3b5d8e9780.
2022-11-02 15:33:16 -06:00
Charlie Kindel
3b5d8e9780 Fixes #1743 - CharMap renders painfully slow 2022-11-02 15:31:37 -06:00
BDisp
3408562054 Write "Reserved to surrogate pairs." 2022-05-03 01:25:20 +01:00
Charlie Kindel
32ae3cb62f Cleaned up Categories and Scenario descripitons. 2022-04-17 15:48:48 -07:00
Charlie Kindel
83f70cbf39 Revert "Revert "Reorganizing scenarios categories as per #1648""
This reverts commit 359ba385c8.
2022-04-17 14:17:40 -07:00
Charlie Kindel
359ba385c8 Revert "Reorganizing scenarios categories as per #1648"
This reverts commit 3362ca849d.
2022-04-17 14:14:44 -07:00
BDisp
3362ca849d Reorganizing scenarios categories as per #1648 2022-03-17 16:39:15 +00:00
BDisp
1557f7a71e Fixes ComboBox text and list if the height is equal to one. (#1606)
* Fixes ComboBox text and list if the height is equal to one. End and Home navigate on text.

* Trying fix the all scenarios unit test.

* Removing unnecessary code.

* Avoiding the Collection was modified after the enumerator was instantiated exception.

* Also cover the IndexOfValue inside the lock.

* Disposing the DrawContent event.

* Increasing the time to test.

* Revert "Increasing the time to test."

This reverts commit b3c2ac871c.

* CharacterMap take more time to load.
2022-02-20 13:39:22 -08:00
BDisp
87f6cfc8ed Fixes #1557 - Border and PanelView fixes (#1563)
* Fixes #1557. Ensures the border child not to be null.

* Improves the PanelView and some bug fixes.

* Implementing rounded corners border.

* Fixes some items not showing on page down/up.
2022-02-06 14:43:38 -08:00
BDisp
239191cde0 Fixes #1434. Regenerating the docs. (#1528)
* Fixes #1434. Regenerating the docs.

* Fixing warnings on docs regeneration and improving.
2021-12-18 05:33:40 -08:00
BDisp
e102a34897 Fixes #1050. ScrollView take to long to scroll enormous content size. 2020-12-24 01:19:34 +00:00
BDisp
a7c2847256 Fixes Console.WindowHeight detection when HeightSize.BufferHeight is set. 2020-11-24 21:55:29 +00:00
BDisp
415cd11e20 Fixes #1020. NetDriver does not deal well with unicode characters yet. 2020-11-23 23:19:39 +00:00
Artyom
bd7610df74 Migrate all controls to C# events 2020-09-23 01:13:52 +03:00
Charlie Kindel
9ef9eb95a3 merge after massive PR merge 2020-06-24 14:02:01 -07:00
Charlie Kindel
2d5a9d0dbf merge with master 2020-06-22 10:11:28 -07:00
Charlie Kindel
a08a411a91 crazy refactoring 2020-06-15 22:52:35 -07:00
Charlie Kindel
e040382315 IDisposable POC 2020-06-14 21:54:15 -07:00
Charlie Kindel
4a4ff7fc7a more dispose 2020-06-13 16:10:48 -07:00
Charlie Kindel
8a3f2a73f6 addresses some non-printable stuff 2020-06-10 18:57:20 -06:00
Charlie Kindel
d91116b5b8 fixed non-printables 2020-06-10 14:52:41 -06:00
Charlie Kindel
f00cdb0258 RadioGroup event fix 2020-06-07 16:00:39 -06:00
Charlie Kindel
dc878b899c enabled better characters 2020-06-07 15:12:25 -06:00
Charlie Kindel
bb452a1c91 double spacing 2020-06-06 17:27:52 -06:00
BDisp
89a4bdeb03 Changed from Terminal.Gui all EventHandler to Action. 2020-06-06 19:02:37 +01:00
Charlie Kindel
7a0c522a20 Upgraded ScrollView + Charmap (#601)
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:

![image](https://user-images.githubusercontent.com/585482/83601742-659ba800-a52e-11ea-9ee9-c888a7db5444.png)

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. 
![](https://i.imgur.com/o5nP5Lo.gif)

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
2020-06-03 13:16:35 -04:00