Commit Graph

96 Commits

Author SHA1 Message Date
Tigger Kindel
7ef51bad85 Remove EnableConsoleScrolling 2023-07-26 08:59:55 -06:00
BDisp
1d2dc40c8a Fixes #2305. Improves the handling of escape sequence. (#2375)
* Changed ansi esc sequence used on exit.

* Changed ansi esc sequence used on exit.

* Improves HeightAsBuffer although currently only works on Windows.

* Fixes #2267. Toplevel.EnsureVisibleBounds throws an exception if border is null.

* Changing comment as requested.

* Fixes indentation.

* Seems not needed for now, maybe some update, comment for now.

* Renamed HeightAsBuffer to EnableConsoleScrolling and made it obsolete.

* Add comment on remarks for EnableConsoleScrolling.

* merged @bdisp's EnableConsoleScrolling PR

* Fixes buffer for Windows Terminal.

* Fixes issue in Windows Terminal on resizing causing some lines not be drawing after exceptions.

* merge #9

* merged #9

* use ESC [ ? 1047

* Tweaks with new esc codes

* Fixed curses driver to not nuke scroll buffer and to resize properly

* merge

* Cleand up netdriver escape codes

* fixed spaces->tabs

* fixed spaces->tabs

* fixed spaces->tabs

* fixed spaces->tabs

* fixed merge issue and  spaces->tabs

* fixed spaces->tabs

* fixed spaces->tabs

* fixed spaces->tabs

* fixed  build error

* removed old comments

* Resolving merge conflicts.

* Ensuring reset the EnableConsoleScrolling.

* Changing from HeightAsBuffer to EnableConsoleScrolling.

* Done requested changes.

* Reformatting.

* Rename to EscSeqReqStatus.

* Removing Console.Out.Flush ();

---------

Co-authored-by: Charlie Kindel <tig@users.noreply.github.com>
Co-authored-by: Tig Kindel <tig@kindel.com>
2023-02-25 15:30:44 -07:00
Thomas Nind
40af5ed98a Adds Snake Scenario (#2353)
* Add empty snake scenario

* Move snake head around

* Snake now has a tail

* Rest of logic implementation

* Ctrl K D layout fixes

* Game gets faster as you collect more apples

* Adjust speed increase rate down

* Use white on black for snake and border and red for apple

* Fix ScenarioTests not Disposing Scenario

* Add disposes and fix to use LineCanvas.GenerateImage

* Fix stack overflow, doh!

---------

Co-authored-by: Tig <tig@users.noreply.github.com>
2023-02-21 11:59:46 +13:00
Tig Kindel
2b26ec7bfb merge fixes 2023-02-07 16:33:22 +09:00
Charlie Kindel
ab7d667217 merge 2022-12-31 06:23:49 -07:00
Charlie Kindel
eb8cb4408d misc changed done before I went on holiday 2022-12-31 06:20:17 -07:00
Tig Kindel
524be85ae3 add OS version info to UI Catalog 2022-12-22 18:37:53 -03:00
tznind
25f9b4e267 Revert accidental changes to UICatalog 2022-11-26 22:56:45 +00:00
tznind
2fba173288 Add ColumnStyle.Visible 2022-11-26 22:55:32 +00:00
Charlie Kindel
de3c02e9bf refactored internal Init() (now called InternnalInit()) to be more clear; updated docs and unit tests 2022-11-05 14:36:41 -06:00
Charlie Kindel
857e123c65 Added @bdisp's suggested tests 2022-11-03 16:47:45 -06:00
Charlie Kindel
bf1ed31281 Refactored UI Catalog and added tons of unit tests 2022-11-03 15:58:15 -06:00
Tig Kindel
5dc2ec7606 Clean up old code 2022-10-29 17:48:32 -06:00
Tig Kindel
f5bb3552e0 Minor clean up of UI Catalog 2022-10-29 17:38:29 -06:00
Charlie Kindel
4ef36560d7 made code clearer 2022-10-21 10:52:41 -06:00
Charlie Kindel
f3e7042077 added constants to MenuBar 2022-10-21 08:47:09 -06:00
Charlie Kindel
d93a247a4d documenting behavior 2022-10-21 08:12:26 -06:00
Tig Kindel
61335e8788 Fixes #1893: Fix URLs to match gui-cs Org (#1900)
* Release v1.3.0

* regen docs

* change nuget publish script to use rohit version

* Release v1.3.1

* Force fix README.md API docs links

* tweak contrib instructions

* more doc fixes

* updated most urls
2022-07-26 12:09:03 -07:00
Tig Kindel
a95e06c15d Fixes #1741. Use gitversion instead of minver (#1746) 2022-05-26 16:36:50 -07:00
Charlie Kindel
82ddc8e3e7 Fixes #1715 - UI Catalog about box version 2022-05-14 09:27:40 +12:00
BDisp
ad2b5a9ba2 Removed AlwaysSetPosition and fix some wide runes issue. 2022-05-13 19:27:04 +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
Thomas Nind
ea7981dc59 Adds Key Binding support. Also refactors Autocomplete and Undo/Redo. (#1556)
* Refactored ProcessKey to use public methods for case logic

* Added KeyBinding class

* Refactored key binding to split key->command from command->implementation

This reduces duplication and simplifies the API

* Finishing key bindings implementation in ListView.

* Adding more unit tests to the ListView.

* Added key bindings to the Button and more features.

* Replaces Action for Func<KeyEvent, bool> on CommandImplementations.

* Allowing commands to have any number of arguments.

* Implementing key bindings on Checkbox view.

* Added test for changing HotKey in Button and made ReplaceKeyBinding protected

* Changed `CommandImplementations` to `Func<KeyEvent, bool>` to better understand current command implementations

* Implementing key bindings in ComboBox.

* Renamed Command keys and fixed ComboBox issues:

- Fixed pressing Esc in ListAndCombos scenario without selecting cause an array out of bounds error
- Changed the Esc key in ComboBox to also collapse the list selection
- Added bool return to public virtual method Expand and Collapse (this is a breaking change)

* Implementing key bindings in DateField.

* Organizing some things.

* Implementing key bindings on TimeField.

* No key bindings on FrameView.

* Added keybinding support to TreeView

* Added mouse support and more features.

* Updating NuGet packages.

* Putting text on the same line.

* Changing function command to Func<bool>.

* Added a read only Position, CursorPosition properties and events.

* Keybindings for GraphView

* Added a stream argument to ApplyEdits to only save the edits.

* Implementing key bindings on the HexView.

* Added MenuOpened event and others bug fixes.

* Fixing typo.

* Unifying constructors initializations.

* Implementing keybindings in the Menu.

* Removing unnecessary variable.

* Implementing keybindings in RadioGroup view.

* Changing Home to TopHome and End to BottomEnd.

* Implementing keybindings in the ScrollView.

* Changing the PageLeft and PageRight keybindings.

* Fixing PageLeft and RightPage.

* Removing CleanUp command.

* Key bindings for TabView

* Keybindings for TableView

* Fixed unit tests for PageDown to correctly assign input focus to the TableView

* Fixes the CalculateLeftColumn method avoiding jump two columns on forward moving.

* Fixes #1525. Gives the same backspace behavior as TextView.

* Changes kill-to-start key to work on Linux too.

* Fixes SelectedStart, SelectedText and some cleaning.

* Implementing keybindings in TextField.

* Updated command names and merged as discussed with @BDisp

- Merged LeftItem and LeftChar to Left (same for Right).
- Also renamed Kill to Cut
- Added ScrollLeft / ScrollRight (and renamed ScrollLineUp to just ScrollUp

* Renamed Command.InsertChar to ToggleOverwriteMode and added Enable/Disable

* Removed 'Mode' suffix from toggle overwrite

* Allows navigation to outside a TextView if IsMdiContainer is true.

* Implementing keybindings in Toplevel.

* Fixing null reference exception.

* Changing to keys instances events instead static.

* Transferring the events to the Toplevel.

* Implementing keybindings in TextView.

* Removing static from the QuitKeyChanged and adding unit test.

* Replacing Added with the Initialized event.

* Ignore control characters and other special keys.

* Changing InvokeKeybindings to return Nullable bool and added two more keys to the Toplevel.

* Implementing keybindings in Autocomplete. I had to derive from View.

* Added keybindings menu item to UICatalog

* Added ClearBinding

* Implementing IAutocomplete, abstract Autocomplete and derived TextViewAutocomplete.

* Implementing keybindings in the TextValidateProvider

* Add keybinding to CellActivationKey.

* Fixing some formats.

* Add ObjectActivationKey to the keybindings.

* Made it much easier to implement abstract base `Autocomplete` in other views by moving methods up out of `TextViewAutocomplete` implementation

* Allowing Autocomplete to popup inside or outside the container.

* Fixes the cursor not being showing if the text length is equal to the view width.

* A unit test to prove the 4df5897.

* Removed unused method `GetCursorPosition` from Autocomplete

* Trimmed down implementation specific methods from IAutocomplete

* Fixed xmldoc comment tag

* Format Autocomplete on multiline and fixes wrap settings.

* Adding keys from a to z to avoid the Key.Space on ToString.

* Fixes the vertical position outside the container.

* Adding more key unit tests.

* Changing comment to upper case and proving that doesn't will breaking nothing.

* Replaces Pos.Bottom to Pos.AnchorEnd.

* Fixes popup on resizing.

* Should only using the Pos.Bottom to position outside the view.

* Fixes #1584

* Fixes https://github.com/migueldeicaza/gui.cs/issues/1584#issuecomment-1027987475

* Fixes some bugs with SelectedItem.

* Command must also return a nullable bool.

* Ensures updating the ComboBox text on leaving the control.

* Only with the nullable bool was possible to make the MoveUp and the MoveDown working.

* Added logging of which scenario failed in test

Co-authored-by: BDisp <bd.bdisp@gmail.com>
2022-02-08 10:40:40 -08:00
BDisp
f013627a24 Fixes #1535. Added IsMouseDisabled prop to Application (#1546) 2021-12-18 05:54:54 -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
f1f86c4288 Fixes #1396. Using the Loaded event instead the Ready event. 2021-07-26 13:12:02 +01:00
BDisp
8d6c2e0aa8 Some changes in the UICatalog and Scenarios. 2021-07-11 00:16:40 +01:00
BDisp
87926a7d3d Prevents output to the terminal on Linux. 2021-05-29 22:10:23 +01:00
Charlie Kindel
8027a407c4 get productversion of terminal.gui not version (#1163) 2021-04-01 10:01:42 -07:00
Charlie Kindel
ca333ceb70 Merge pull request #1066 from BDisp/heightasbuffer-as-true
A provisional solution to the #1065 issue. Setting HeightAsBuffer as true by default.
2021-03-07 17:44:28 -07:00
Charlie Kindel
e48b867e7e Added indication of which driver is in use to status bar 2021-02-15 10:41:15 -07:00
BDisp
eb6e28efd8 Trying fixing #1099. UI Catalog doesn't work on Windows Terminal. 2021-01-25 14:33:19 +00:00
BDisp
1603b680da A provisional solution to the #1065 issue. Setting HeightAsBuffer as true by default. 2021-01-25 13:05:32 +00:00
BDisp
b88dbb672b Added right and left scrolling feature to the ListView. 2021-01-15 01:45:40 +00:00
BDisp
72a4104ee5 Fixes #1041. NetDriver events should stay all together. 2020-12-16 23:35:24 +00:00
BDisp
149561a964 No need to create another MenuBarItem. Added a new constructor to the MenuBarItem allowing a list of MenuItem arrays. 2020-12-04 14:35:35 +00:00
BDisp
eec477a89f Fixes #1028. WindowsDriver does not handle Window docking properly with the -usc argument. 2020-12-02 17:46:20 +00:00
BDisp
6ba5b4e1c1 Fixes #1018. Since childNeedsDisplay is used outside the View class it must to be a property. 2020-11-19 21:45:26 +00:00
BDisp
991f479cb8 Changed the menu Diagnostics and added code for passing an argument -usc for UseSystemConsole. 2020-11-18 19:52:02 +00:00
BDisp
fa0827a4af Fixes #1007. Added a Loaded event in the Toplevel class. 2020-11-15 20:57:08 +00:00
BDisp
6be3aab2ce Changed casing for Shortcut. 2020-10-26 18:56:24 +00:00
BDisp
b1cc2f8035 Implemented ShortCut in the View class within the UICatalog example. 2020-10-26 12:23:11 +00:00
BDisp
01d4b4f55f Added wide improvements on keys managements. 2020-10-26 00:46:51 +00:00
BDisp
21650576eb Recover from rebase. 2020-10-24 01:35:04 +01:00
BDisp
b56edacbac Fixes #225 and maybe #41. Allowing Rune.ColumnWidth greater than one. 2020-10-16 17:08:57 +01:00
Charlie Kindel
b1e28baa2a enables hiding statusbar 2020-09-29 13:07:38 -07:00
Artyom
7da46a8f69 Convert TopLevel.Ready into event 2020-09-23 01:19:31 +03:00