Commit Graph

61 Commits

Author SHA1 Message Date
BDisp
ee119ffaac Forces button to redraw before invoke Clicked event. 2022-05-03 01:21:27 +01:00
BDisp
a82ac45843 Fixes AutoSize, Window Tile and added option to Border for fill or not. 2022-04-30 01:12:21 +01:00
BDisp
4281030361 Changed Button Text property to use override instead of new. (#1622)
* Changed Button Text property to use override instead of new.

* Fixing HotKey behavior.
2022-03-04 18:05:27 -08: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
d84ab39ec3 Allows ListView trigger the Enter and Leave events. (#1508)
* Allows ListView trigger the Enter and Leave events.

* Added unit test for Enter and Leave events to all views.
2021-11-13 07:46:49 -08:00
BDisp
52f48b2044 Fixes #1384. Added a VisibleChanged event on the View class. (#1385)
* Fixes #1384. Added a VisibleChanged event on the View class.

* Getting the last char.

* Fixes #871. Added Enable property to Responder and added Disabled color for all ColorSchemes.

* Added GetNormalColor method to the View being more readable.

* Fixes the contentBottomRightCorner Enable and Visible.

* Fixes #643. Added AddItemAt and RemoveItem to StatusBar and fixed more bugs.

* Typo fixes.

* Fixes #1387. Allowing the UnitTests project to test internal keywords.

* Fixes #1389. Added a unidirectional feature to the Marquee styles to the ProgressBar.

* Fixes #1394. Added ReflectedType to check for overridden.

* Fixes #1396. Using the Loaded event instead the Ready event.

* Fixes #1402. Only WindowsDriver supports horizontal scroll. (#1403)

* Fixes #1402. Only WindowsDriver supports horizontal scroll.

* Fixes ProcessContinuousButtonPressedAsync on all drivers.

* Fixed internal unit test.

* Fixing warning.

* Fixing Editor scenario error.

* Fixes double and triple click on a touchpad.

* Ensuring reset the counting.

* Allowing touchpad double and triple click with one finger on CursesDriver.

* Allowing touchpad double and triple click with one finger on WindowsDriver.

* Fixes #1414. Fixed multi toplevels and mdi container issues.

* Improving EnsureVisibleBounds and PositionToplevel.

* Added mouseGrabView to the ResetState method.

* Changing namespace.

* Allowing file type on the SaveDialog.

* Fixes SaveDialogs writing the extension twice.
2021-08-11 02:56:30 -07:00
BDisp
3c9a4e51c6 Button text should be centered by default. 2021-07-15 18:47:13 +01:00
BDisp
17496ac59e Fixes #1193. A non auto size default Button now preserves his width and thus the text alignment now work. (#1194)
* Fixes #1193. A  non auto size default Button now preserves his width and thus the text alignment now work.

* Fixing the Width and Height checks of the Dim class with AutoSize dependence.

* Toplevel can't be used on Pos/Dim but only his subviews. Was not caught before because the LayoutSubviews  method never gone so deep before.

* Fixed the error that is triggered when the Pos/Dim is the current Application.Top.

* Fixing the breaking APIs SetWidth and SetHeight.

* Fixing from the breaking APIs SetWidth and SetHeight.
2021-04-14 08:30:03 -07:00
BDisp
e784765094 Fixes #1179. TextView does not copy to the clipboard on deleting. (#1180)
* Fixes #1133. Flaw in LayoutSubviews/TopologicalSort.

* Toplevel can't be used on Pos/Dim but only his subviews. Was not caught before because the LayoutSubviews  method never gone so deep before.

* Fixed the error that is triggered when the Pos/Dim is the current Application.Top.

* Application.Top is the only exception in the TopologicalSort method check.

* Fixes #1179. TextView does not copy to the clipboard on deleting.

* Added Button DoubleClick and fixed WordForward/WordBackward issues.

* Prevents a negative height.

* Fixes the enter key line feed.

* Fixes #1187. Prevents WordBackward throwing an exception if point is greater than the text length.

* Fixes #1189. Prevents negative index.

* Fixes #1193. A  non auto size default Button now preserves his width and thus the text alignment now work.

* Fixing the Width and Height checks of the Dim class with AutoSize dependence.

* Fixes #1197. Prevents width negative value if added directly to the Application.Top

* Fixes #1199. Normalize views constructors and did some typo fixing.

* Fixing the Application.Top Pos/Dim settings.

* Always uses inverted color for selected text to avoid same colors.

* Prevents throw an exception if the clipboard content is null.

* Added Find and Replace (next/previous). Replace All and Select All. A non modal dialog box.

* Keeps tracking the selected replaced text.

* Fixes #1202. CheckBox now deals with a functional '_' underscore hotkey.

* The selected text should be maintained when losing focus.

* Fixes an extra line on page down.

* Fixes the WordBackward if it text has more than one whitespaces or when has only one digit or letter.

* Fixes WordForward/WordBackward on text with more than one whitespace or with only one digit or letter.

* Forgot to replace the hacking.

* Added unit tests for the TextField view. Fixed some more bugs.

* Redraw should only show the selected text if it is focused.

* Fixes cursor position on double click and ensures the setting of the selected text.

* Added match whole word checking.

* Added missing parameters documentation.

* Ensures the SelectedLength property to be always with positive value.

* Fixes the WordBackward when at the end of the text has a character between two whitespace.

* Added unit tests to the TextView, Used property and fixed some more bugs.

* Fixed Used to only show if it has focus.

* Fixed ReplaceAll and prevents Debug.Assert from showing.
2021-04-13 13:37:13 -07:00
Gilles Freart
9b617a07f0 Adjusting cursor size ... working under WindowsDriver 2021-01-27 21:51:07 +01:00
BDisp
9d721e94f6 Ensures clipping always respecting the anchoring if it's the case. Adding SetWidth and SetHeight methods to the View class. 2020-12-26 23:57:13 +00:00
BDisp
4bbe50c506 Fixes #990. Pos and Dim only can be properly used when all the views are totally initialized. 2020-11-04 16:45:35 +00:00
BDisp
4fb0c93861 Fixes #968. Button Dim handler and a Dim unit test. Added a ToString to DimCombine. 2020-10-22 01:20:50 +01:00
BDisp
d1b99b7c9a Invert the condition. 2020-10-21 17:00:28 +01:00
BDisp
ab690d3e0a Fixes #965. Broken buttons 2020-10-21 17:00:14 +01:00
BDisp
be840f31cc Changing Dim.DimCombine class as public. 2020-10-20 21:11:11 +01:00
BDisp
bb67b5ad07 Removed unnecessary code. 2020-10-20 20:49:29 +01:00
BDisp
9e9de9c121 Changed to CursorPosition and improving Button LayoutStyle.Computed. 2020-10-20 20:28:15 +01:00
BDisp
4073019554 Fixes #959. PositionCursor with hotkeys. 2020-10-19 04:12:21 +01:00
Artyom
6aef632633 Button.Clicked as a C# event 2020-09-23 01:01:53 +03:00
BDisp
fda4e21341 Making SetFocus (View) private. 2020-07-28 18:42:10 +01:00
BDisp
d17e3d5ef7 Fixes #822. Moves the cursor position to the first rune if no hotkey is specified. 2020-07-24 13:44:20 +01:00
BDisp
c5f6e89abf Fixes #806. Button now support clicks. 2020-07-18 01:19:49 +01:00
BDisp
edac4b3d19 Fixes #701. HotKeys fixed. 2020-07-15 17:31:07 +01:00
BDisp
22883acd2d Fixes #759. Button mouse activates on double and triple click. 2020-07-13 00:35:20 +01:00
Charlie Kindel
f41acdf6ba removed View.Clicked 2020-06-23 07:33:12 -07:00
Charlie Kindel
120991ec5b ready for pr 2020-06-18 01:29:25 -07:00
Charlie Kindel
49bfe6a6c2 progress...rabbit hole 2020-06-17 08:50:38 -07:00
Charlie Kindel
a08a411a91 crazy refactoring 2020-06-15 22:52:35 -07:00
Charlie Kindel
1f4b9289b1 Merge pull request #669 from tig/non_printable
Addresses non-printable chars in Drivers
2020-06-15 12:29:18 -07:00
Charlie Kindel
7395656afe merge 2020-06-14 09:19:07 -07:00
Charlie Kindel
f4b9d313d8 tweaked scenario tests; minor bug fixes 2020-06-12 09:05:17 -06:00
Charlie Kindel
8a3f2a73f6 addresses some non-printable stuff 2020-06-10 18:57:20 -06:00
Charlie Kindel
e5855731d1 non printable chars 2020-06-10 13:56:53 -06:00
Charlie Kindel
d5dd29dbda fixed #504 and updated tests 2020-06-09 14:51:02 -06:00
BDisp
e5b777845d Removed System.Net.Sockets. 2020-06-08 23:45:31 +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
BDisp
b884ea4ce3 Changed as suggest. 2020-06-08 22:05:33 +01:00
BDisp
43c958842e Resolves Button Text Alignment with Unicode chars. 2020-06-08 01:50:33 +01:00
Charlie Kindel
46e5fdac84 updated relnotes, regenerated ddocs, inheritdoc tool now runs only on RELEASE builds 2020-06-06 23:34:01 -06:00
Charlie Kindel
aedacd17a4 updated button scenario and tweaked button.cs 2020-06-06 17:15:22 -06:00
BDisp
db4fe3bc0f Added Text Alignment to the Button view. 2020-06-06 17:40:03 +01:00
Charlie Kindel
90b19a5e04 POC 2020-06-04 12:43:19 -06:00
Charlie Kindel
e87b56cd77 updated api docs; implemented inheritdoc; may break deploy 2020-06-03 18:18:19 -06:00
Charlie Kindel
8e58434e72 fixed frame drawing, buttons, dialogs, messageboxes and more 2020-05-31 19:48:21 -06:00
Charlie Kindel
d035fb1116 fixed clipping once and for all 2020-05-31 00:34:35 -06:00
Charlie Kindel
1024f073b2 Fixing many clipping issues (#580)
* almost got clip rect working

* fixes many bugs related to clipping incl #399

* Merge tweaks.
2020-05-29 17:41:49 -06:00
Charlie Kindel
585f249b1c Updated and fixed XML documentation 2020-05-23 00:24:14 -06:00
Charlie Kindel
a5a1ecbd8e Fixes All Warnings (#450)
* Revert "Drop NuGet restore"

This reverts commit 5c7a0d05f0.

* Revert "Revert "Drop NuGet restore""

This reverts commit 2dc5fce865.

* terminal.sln

* there. That wasn't so hard

* fixed some cases where <inheritdoc/> should have been used

* fixed some cases where <inheritdoc/> should have been used
2020-05-20 13:26:56 -04:00
BDisp
501e43557c Ensures that the cursor is inside the button, even if all the text is in lower case. (#363) 2020-04-14 09:33:46 -04:00