Commit Graph

981 Commits

Author SHA1 Message Date
Charlie Kindel
ceafb2db41 disabled word wrap on single line labels 2020-06-10 02:36:01 -06:00
Charlie Kindel
912c926f60 implemented word wrap for labels; fixed messagebox 2020-06-10 02:13:44 -06:00
Charlie Kindel
7d13f8a543 Merge pull request #663 from tig/statusbar_vline
Adds vline to statusbar
2020-06-09 23:15:18 -06:00
Charlie Kindel
523acccb00 fixed mouse test bug 2020-06-09 21:22:40 -06:00
Ross Ferguson
c468d139e5 ComboBox. Fix crash 2020-06-10 03:45:44 +01:00
Ross Ferguson
d7de041275 Merge branch 'master' of https://github.com/migueldeicaza/gui.cs into combobox_fixes 2020-06-10 03:43:18 +01:00
BDisp
3b793fc8d1 ScrollView enhancements. 2020-06-09 21:35:28 +01:00
Charlie Kindel
bfcbd3cb0d switched Window to FrameView 2020-06-09 12:04:54 -06:00
BDisp
48240b6b62 Fixed some layout and alignment issues in the Button. 2020-06-09 13:01:03 +01:00
Charlie Kindel
290a693097 back out change to generic scenario 2020-06-08 20:32:03 -06:00
Ross Ferguson
4279924624 Merge branch 'master' of https://github.com/migueldeicaza/gui.cs into combobox_fixes 2020-06-09 03:17:43 +01:00
Charlie Kindel
51f698d595 fixed 2020-06-08 20:15:48 -06:00
BDisp
86423c52a2 Keep the master's. 2020-06-08 23:52:21 +01:00
BDisp
15e38550c5 Fixed a layout bug that preventing the redrawing on Pos and Dim changes. Now the TextAlignment is working well. I move them to the view for a generic uses to others views. 2020-06-08 23:39:31 +01:00
Ross Ferguson
6f94a776fd ComboBox: Refactor. Resize Width working 2020-06-08 10:05:16 +01:00
Ross Ferguson
4a3e1d0959 ComboBox. Adopt ListView interface pattern 2020-06-08 10:01:10 +01:00
Ross Ferguson
89e2790a1c ComboBox supports Dim.Fill() Dim.Percent() 2020-06-08 10:01:10 +01:00
Charlie Kindel
1b8abd1421 RadioGroup event fix 2020-06-08 08:46:20 +01:00
Charlie Kindel
157255bc1b enabled better characters 2020-06-08 08:46:17 +01:00
Charlie Kindel
199e3aa113 double spacing 2020-06-08 08:46:04 +01:00
BDisp
43c958842e Resolves Button Text Alignment with Unicode chars. 2020-06-08 01:50:33 +01: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
f888d4de25 Merge branch 'master' into charmap_improvements 2020-06-07 10:03:24 -06:00
Charlie Kindel
1b5549bc07 tweaked api docs; adjusted enum name to match LayoutStyle 2020-06-07 00:09:07 -06:00
Charlie Kindel
dc4636a458 implemented menu checked and test scenario in UI Catalog 2020-06-06 22:46:46 -06:00
Charlie Kindel
19a717ee38 poc 2020-06-06 19:28:31 -06:00
Charlie Kindel
bb452a1c91 double spacing 2020-06-06 17:27:52 -06:00
Charlie Kindel
ffb17a7614 backed out charmap changes 2020-06-06 17:22:48 -06:00
Charlie Kindel
aedacd17a4 updated button scenario and tweaked button.cs 2020-06-06 17:15:22 -06:00
BDisp
6eeb3149b9 Change some Action and Class names. 2020-06-06 23:01:35 +01:00
Charlie Kindel
05a1944913 layout 2020-06-06 14:24:37 -06:00
Charlie Kindel
8feab947fd POC 2020-06-06 13:58:02 -06:00
BDisp
89a4bdeb03 Changed from Terminal.Gui all EventHandler to Action. 2020-06-06 19:02:37 +01:00
BDisp
db4fe3bc0f Added Text Alignment to the Button view. 2020-06-06 17:40:03 +01:00
Charlie Kindel
03104495a5 Merge pull request #628 from BDisp/date-time-field
Nicely done. Added DateTimeEventArgs and improved data and time validation.
2020-06-06 10:25:31 -06:00
Charlie Kindel
6b9645bdde compile warning 2020-06-06 09:51:16 -06:00
BDisp
d32c631dfd Changed from DateTime to TimeSpan. Changed from EventHandler to Action. 2020-06-06 15:35:07 +01:00
BDisp
f75a511057 Added DateTimeEventArgs and improved data and time validation. 2020-06-06 00:31:28 +01:00
Charlie Kindel
da5bfd46f2 feature complete 2020-06-04 23:09:14 -06:00
Charlie Kindel
5f67da9c54 progress demo bug 2020-06-04 17:15:26 -06:00
Charlie Kindel
17163a76a9 initial implementation 2020-06-04 17:09:32 -06:00
Charlie Kindel
90b19a5e04 POC 2020-06-04 12:43:19 -06:00
Ross Ferguson
4d2ddcf45f ComboBox. Support parameterless constructor. Update scenario demo 2020-06-04 10:11:46 +01:00
Charlie Kindel
e87b56cd77 updated api docs; implemented inheritdoc; may break deploy 2020-06-03 18:18:19 -06: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
Charlie Kindel
857bdcbe24 fixes crashing bug on exit 2020-06-03 10:18:13 -06:00
Charlie Kindel
918ee5d06f merged sysconsole 2020-06-02 23:53:34 -06:00
Charlie Kindel
2e1132f484 merged upstream master 2020-06-02 23:50:40 -06:00
Charlie Kindel
f89fc03a0c merged onlayoutcomplete PR 2020-06-02 10:13:50 -06:00