Commit Graph

61 Commits

Author SHA1 Message Date
Oliver 65faf5cfc7 Added a style function for form element colours. 2024-11-02 16:24:10 +01:00
cuibuwei 943ecd8ba4 chore: remove repetitive word
Signed-off-by: cuibuwei <cuibuwei@gmail.com>
2024-04-13 19:54:14 +08:00
Oliver c9421b4bd9 Enabled bracketed pasting. 2024-02-04 16:11:39 +01:00
Oliver b11bfc7683 Reconciled Form.focusedElement with actual focus. Fixes #922 2023-11-26 13:35:32 +01:00
Kian-Meng Ang 5d85e6a030 Fix typos
Found via `codespell -H -S .git -L rightt,wth,bu`
2023-11-02 13:24:14 +08:00
Oliver caea67a4ef Implemented string parser and migrated all widgets but TextView. 2023-08-22 23:16:59 +03:00
Oliver 84f9c0ff9d Clicking on a form outside a form item will focus it. Fixes #793 2023-03-20 10:52:35 +01:00
Oliver 47b3275db4 Form elements can now also be disabled. Resolves #192 2023-03-20 07:26:01 +01:00
Oliver 7dfff1ce78 Don't focus text views in forms. Fixes #797 2023-02-08 22:13:50 +01:00
Oliver c5b1a7d818 Finished Image implementation. 2022-12-26 21:55:31 +01:00
Oliver ccce554c38 Using tcell.Style for buttons, allowing us to control it better. Resolves #704 2022-12-17 19:20:43 +01:00
Oliver 3f246bda86 Text views can also become part of forms. 2022-12-11 00:46:02 +01:00
Oliver ed3ea789e9 Text area can now be added to forms. See #594 2022-11-15 15:33:49 +01:00
Oliver cecb44578c Setting focus is now based on a "mouse down" event instead of a "click" event. 2022-09-02 17:49:12 +02:00
Oliver 1b3174ee3d Added callback functions for focus and blur events. 2021-11-08 17:05:49 +01:00
Oliver 175cc7d7ce Button.SetBlurFunc() should have been named Button.SetExitFunc(). 2021-11-08 16:35:21 +01:00
Oliver 807e706f86 Forms cannot rely purely on a rect check for mouse clicks as drop-downs may extend beyond it. Fixes #602 2021-05-31 12:46:47 +02:00
Oliver 2003bc0698 Removed an unnecessary call to Focus() in Form. Fixes #612 2021-05-31 11:53:39 +02:00
Oliver 675ed5b96b Removed Focusable interface. 2020-11-17 19:33:25 +01:00
Oliver e4d167311d Upgraded to latest tcell version. Results in a minor incompatibility in the Table class. 2020-10-18 14:15:57 +02:00
Oliver deb54e1422 Keyboard events are now propagated down the hierarchy, allowing users to intercept them. Closes #421 2020-08-18 12:05:43 +02:00
Oliver e352ec0156 Fixed mouse/keyboard input issues with input fields and forms. Fixes #363 2020-04-14 15:03:31 +02:00
Oliver 9af6826328 Added/fixed comments, some structural changes/bugfixes for mouse support. Table, TextView, and TreeView still open. Closes #363 2020-03-27 18:41:44 +01:00
rivo 160d8fda1d
Merge pull request #363 from millerlogic/mouse-support
Mouse support
2020-03-26 19:28:51 +01:00
Chris Miller 8abbf770ec Change mouse handler func 2020-02-14 02:09:09 +00:00
Chris Miller 9598ca2519 New mouse design
capture bool not finalized
2020-01-24 20:40:34 +00:00
Oliver c5f3e4f883 Added GetFocusedItemIndex() to Form. Resolves #293 2019-12-31 11:06:47 +01:00
Oliver 9c225ecd57 Added GetFormItemCount() to Form. Resolves #298 2019-11-27 19:18:27 +01:00
Chris Miller 96875c75b9 Added mouse handling 2019-11-04 05:34:46 +00:00
Oliver f8bc69b903 Every redraw of a Form re-evaluates the focus index. Fixes #144 2019-08-29 18:12:55 +02:00
Mike Schinkel c2c3679add Fix initialization bug in AddDropDown(), issue #290. 2019-06-03 20:40:09 -04:00
Oliver 384f577a62 Added SetFocus() to Form which changes the focus to a specific form element. Resolves #286 2019-06-02 21:31:59 +02:00
Oliver f16ba37c6a Added functions to remove all buttons from forms and from modals. Resolves #259 2019-05-14 16:48:29 +02:00
Oliver 8d5eba0c2f Replaced runewidth.StringWidth() with my own implementation. Fixes #236 2019-03-19 12:13:40 +01:00
Oliver 5991278513 If a Form has no focusable elements, it keeps the focus itself. Fixes #198 2018-12-03 18:28:59 +01:00
Oliver a677b985cc Allowing the use of arrow keys in modal buttons, too. Resolves #167 2018-09-26 11:35:00 +02:00
Oliver 21f50f5bc4 Fixed the docs of FormItem. Fixes #153 2018-08-07 09:25:40 +02:00
Oliver c33dd0cf8e Added form item removal functions and more ways to find items. Resolves #137 2018-07-17 20:18:39 +02:00
Oliver f855bee020 Separated form item "done" function from "finished" function. Resolves #39 2018-04-19 21:34:03 +02:00
Oliver 5bd22542e5 For Form.GetFormItemByLabel() to work, we must not modify the label text. Fixes #94, fixes #99 2018-04-09 21:07:03 +02:00
Oliver cc84c982fc Added GetFormItemByLabel(). Resolves #94 2018-04-07 12:58:52 +02:00
Oliver 258c9d1f8e Forms will attempt to keep focused form items within available area. Fixes #79 2018-03-15 17:54:17 +01:00
Oliver 2a83b20ce3 Improved documentation. 2018-01-24 21:48:53 +01:00
Oliver 7c086b1113 Updated Form documentation. 2018-01-19 08:37:01 +01:00
Oliver 4db30f9ed4 "FieldLength" is now "FieldWidth" everywhere for clarity and consistency. Sorry for this breaking change. It is better in the long run. 2018-01-17 21:17:59 +01:00
Oliver 258f212e5e Added color tag functionality to all strings. Resolves #25 2018-01-17 17:13:36 +01:00
Oliver aa25839cfa Introduced horizontal item alignment in forms. Resolves #33 2018-01-16 20:45:54 +01:00
Oliver c105638ec3 Form now has a Clear() function. Resolves #32 2018-01-15 10:04:03 +01:00
Oliver 38d663c267 In Form, changed GetElement() to GetFormItem() for consistency reasons. 2018-01-13 13:07:05 +01:00
Oliver d6ce974e6d Added masking to InputField, password field to form. Resolves #7, resolves #8. 2018-01-11 16:13:01 +01:00