Commit Graph

923 Commits

Author SHA1 Message Date
Charlie Kindel
8feab947fd POC 2020-06-06 13:58:02 -06: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
21f7086ea3 Merge pull request #630 from tig/move_pos_init_to_constructor
move the pos init to constructor
2020-06-06 10:17:47 -06:00
Charlie Kindel
6b9645bdde compile warning 2020-06-06 09:51:16 -06:00
Charlie Kindel
6cac4e5d46 move the pos init to constructor 2020-06-06 09:35:01 -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
Andrew Arnott
ba0fb43156 Add .NET Framework ref assemblies to enable linux build (#625)
Fixes #421
2020-06-05 10:54:43 -04:00
Charlie Kindel
ec6f896258 Merge pull request #620 from tig/computed_layout_allviews
Adds new Scenario for testing all Views - Adds parameterless constructors to all Views
2020-06-04 23:21:43 -06:00
Charlie Kindel
df2c5c4a26 Merge pull request #622 from tig/remove_inheritdoc_tool
Removing SauceControl.InheritDoc nuget from the build
2020-06-04 23:20:38 -06:00
Charlie Kindel
5f5e78a17b Merge branch 'remove_inheritdoc_tool' into computed_layout_allviews 2020-06-04 23:15:51 -06:00
Charlie Kindel
5ee8c6b979 removing SauceControl.InheritDoc nuget from the build; will add it to the docx generation scripts 2020-06-04 23:11:44 -06: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
de1ab511d4 Merge branch 'master' into computed_layout_allviews 2020-06-04 12:43:40 -06:00
Charlie Kindel
90b19a5e04 POC 2020-06-04 12:43:19 -06:00
BDisp
05dd50afda Fixed null exception on tabbing. (#615) 2020-06-04 13:48:46 -04:00
Charlie Kindel
f6670e1931 Merge pull request #609 from BDisp/ensure-tabbing
Fixes #503 Tab stop working.
2020-06-04 09:14:53 -06:00
Charlie Kindel
254b7799a6 Merge pull request #607 from fergusonr/combobox_fixes
ComboBox. Support parameterless constructor. Update scenario demo
2020-06-04 08:43:27 -06:00
BDisp
f123da4206 Fixes #503 Tab stop working. 2020-06-04 13:54:53 +01:00
Charlie Kindel
7d6cefa5dd updated api docs; implemented inheritdoc; may break deploy 2020-06-04 13:54:42 +01:00
BDisp
e8305ae04c Changed to GetToplevelSubviews and removed unnecessary parameter from FocusNearestView. 2020-06-04 13:51:41 +01:00
BDisp
068b19d0b4 Fixes #503 Tab stop working. 2020-06-04 13:51:01 +01:00
Ross Ferguson
b71d72f51d Merge branch 'combobox_fixes' of https://github.com/fergusonr/gui.cs into combobox_fixes 2020-06-04 10:12:34 +01:00
Ross Ferguson
4d2ddcf45f ComboBox. Support parameterless constructor. Update scenario demo 2020-06-04 10:11:46 +01:00
Charlie Kindel
d6205e49e4 Merge pull request #611 from tig/bounds_comments
Another doc update
2020-06-03 21:24:36 -06:00
Charlie Kindel
1c6223ed85 regen docs 2020-06-03 20:40:20 -06:00
Charlie Kindel
7fdc7e6fb7 Merge pull request #608 from tig/bounds_comments
Updated API docs - automated
2020-06-03 19:56:24 -06:00
Charlie Kindel
d980d70d60 Merge branch 'master' into bounds_comments 2020-06-03 18:22:55 -06:00
Charlie Kindel
1d91b0d112 Merge branch 'master' of tig:migueldeicaza/gui.cs 2020-06-03 18:22:41 -06:00
Charlie Kindel
0756917ee6 Merge pull request #596 from BDisp/menu-improvements
Improvements the mouse and keys of the MenuBar.
2020-06-03 18:22:12 -06:00
Charlie Kindel
e87b56cd77 updated api docs; implemented inheritdoc; may break deploy 2020-06-03 18:18:19 -06:00
BDisp
afae8b8f85 Requested changes made. 2020-06-03 23:21:44 +01:00
Charlie Kindel
05a8171e24 Merge branch 'master' of tig:migueldeicaza/gui.cs 2020-06-03 14:54:26 -06:00
Charlie Kindel
6631a0f266 Merge pull request #605 from BDisp/toplevel-repaint
Fixes #604 Toplevel repaint.
2020-06-03 14:53:57 -06:00
BDisp
020d43f8c5 Added a comment as suggested. 2020-06-03 21:50:27 +01:00
Charlie Kindel
46cde0cb16 Merge branch 'master' of tig:migueldeicaza/gui.cs 2020-06-03 13:20:17 -06:00
Charlie Kindel
cb04a81ae0 Merge pull request #606 from BDisp/textview-features
Added some features to TextView like mouse wheeling and Ctrl+End/Home to navigate to the end and begin of the text.
2020-06-03 13:19:47 -06:00
BDisp
ca036453b3 Added some features to TextView like mouse welling and Ctrl+End/Home to navigate to the end and begin of the text. 2020-06-03 19:21:29 +01:00
Ross Ferguson
f1af54db52 ComboBox. Support parameterless constructor. Update scenario demo 2020-06-03 19:18:11 +01:00
BDisp
767eeec8cb Fixes #604 Toplevel repaint. 2020-06-03 19:10:00 +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
Charlie Kindel
cfb76b1abb Merge branch 'master' of tig:migueldeicaza/gui.cs 2020-06-03 10:37:40 -06:00
Charlie Kindel
78b0517599 Merge pull request #595 from BDisp/mouse-tasks
Added mouse tasks to the idle handlers. Fixed keyModifiers.
2020-06-03 10:37:17 -06:00
Charlie Kindel
fae3285371 Merge pull request #603 from tig/application_shutdown_crash
Fixes UI Catalog shutdown crash
2020-06-03 10:31:04 -06:00
Charlie Kindel
eaf254b4f4 Merge branch 'master' of tig:migueldeicaza/gui.cs 2020-06-03 10:22:40 -06:00
Charlie Kindel
cdae703610 Merge pull request #593 from BDisp/hexview-enter
Changed Tab key to Enter key as per the tenets. Closes #589
2020-06-03 10:21:03 -06:00
Charlie Kindel
857bdcbe24 fixes crashing bug on exit 2020-06-03 10:18:13 -06:00
Charlie Kindel
1040ec64a4 Merge branch 'master' of tig:migueldeicaza/gui.cs 2020-06-03 10:10:19 -06:00