Sam Atkins
4b29702fee
LibGUI: Add gutter indicators to TextEditor :^)
...
HackStudio's Editor has displayed indicators in its gutter for a long
time, but each required manual code to paint them in the right place
and respond to click events. All indicators on a line would be painted
in the same location. If any other applications wanted to have gutter
indicators, they would also need to manually implement the same code.
This commit adds an API to GUI::TextEditor so it deals with these
indicators. It makes sure that multiple indicators on the same line
each have their own area to paint in, and provides a callback for when
one is clicked.
- `register_gutter_indicator()` should be called early on. It returns a
`GutterIndicatorID` that is then used by the other methods.
Indicators on a line are painted from right to left, in the order
they were registered.
- `add_gutter_indicator()` and `remove_gutter_indicator()` add the
indicator to the given line.
- `clear_gutter_indicators()` removes a given indicator from every line.
- The `on_gutter_click` callback is called whenever the user clicks on
the gutter, but *not* on an indicator.
2023-03-31 12:09:40 +02:00
..
2023-03-15 14:55:49 +01:00
2023-03-06 23:46:35 +01:00
2023-03-03 15:23:47 +01:00
2023-02-07 10:43:15 +00:00
2023-03-03 15:23:47 +01:00
2023-03-16 09:58:42 +01:00
2023-02-19 01:09:09 +01:00
2023-01-08 23:01:16 +01:00
2022-12-30 17:16:29 +01:00
2023-01-27 20:33:18 +00:00
2023-02-10 05:12:06 +03:30
2023-03-04 00:29:38 +01:00
2023-02-21 00:54:04 +01:00
2023-02-21 00:54:04 +01:00
2023-02-21 00:54:04 +01:00
2023-02-21 00:54:04 +01:00
2022-12-28 22:32:21 -05:00
2023-02-21 00:54:04 +01:00
2023-03-16 00:02:08 +01:00
2023-03-05 20:21:57 +01:00
2023-03-04 00:29:38 +01:00
2023-02-28 14:39:32 +01:00
2023-01-26 20:24:37 +00:00
2023-02-18 16:56:56 +00:00
2023-02-18 16:56:56 +00:00
2023-02-19 01:09:09 +01:00
2023-02-19 01:09:09 +01:00
2023-03-04 00:29:38 +01:00
2023-02-21 00:54:04 +01:00
2023-03-04 00:29:38 +01:00
2023-02-13 00:45:09 +00:00
2023-03-04 00:29:38 +01:00
2023-03-03 15:38:59 +01:00
2023-02-19 01:35:29 +01:00
2023-02-13 00:45:09 +00:00
2023-03-21 19:03:21 +00:00
2022-11-19 11:04:11 +01:00
2023-03-16 09:58:42 +01:00
2022-12-06 08:54:33 +01:00
2023-03-16 09:58:42 +01:00
2022-12-09 00:25:30 +01:00
2022-12-30 17:16:29 +01:00
2022-12-30 17:16:29 +01:00
2023-03-16 09:58:42 +01:00
2022-12-06 08:54:33 +01:00
2022-12-06 08:54:33 +01:00
2023-03-06 23:46:35 +01:00
2023-03-03 15:23:47 +01:00
2023-03-21 19:03:21 +00:00
2023-01-09 09:45:26 +01:00
2022-11-19 11:04:11 +01:00
2022-12-07 11:48:27 +01:00
2023-02-13 00:50:07 +00:00
2023-02-13 00:50:07 +00:00
2023-02-13 00:50:07 +00:00
2023-03-21 10:06:41 +01:00
2023-03-21 10:06:41 +01:00
2022-11-19 16:04:42 +01:00
2022-11-16 17:23:56 +00:00
2023-02-08 18:50:43 +00:00
2022-12-06 08:54:33 +01:00
2023-03-06 23:46:35 +01:00
2022-12-06 08:54:33 +01:00
2023-03-05 20:21:57 +01:00
2022-12-06 08:54:33 +01:00
2023-02-21 00:54:04 +01:00
2023-02-21 00:54:04 +01:00
2023-03-24 10:58:43 +00:00
2023-03-24 10:58:43 +00:00
2023-03-21 19:03:21 +00:00
2023-02-25 20:51:49 +01:00
2023-02-02 04:05:42 -07:00
2023-03-24 10:58:43 +00:00
2023-03-06 23:46:35 +01:00
2023-03-22 22:33:19 +00:00
2022-12-06 08:54:33 +01:00
2022-12-06 08:54:33 +01:00
2023-02-07 17:01:55 +01:00
2023-02-21 00:54:04 +01:00
2023-02-19 01:09:09 +01:00
2023-02-17 16:25:57 +00:00
2022-12-07 11:48:27 +01:00
2023-03-15 14:55:49 +01:00
2022-11-27 18:28:43 -07:00
2023-03-04 00:29:38 +01:00
2022-12-26 09:27:19 +01:00
2023-03-16 09:58:42 +01:00
2022-12-06 08:54:33 +01:00
2023-01-03 15:25:02 +01:00
2023-02-21 00:54:04 +01:00
2023-02-21 00:54:04 +01:00
2023-03-04 00:29:38 +01:00
2023-02-02 13:15:03 +01:00
2023-03-21 22:39:25 +01:00
2023-03-21 22:39:25 +01:00
2023-02-25 20:51:49 +01:00
2022-12-08 17:20:51 +01:00
2022-11-29 15:39:13 +00:00
2023-01-11 10:24:51 +01:00
2023-01-11 10:24:51 +01:00
2023-03-15 14:55:49 +01:00
2022-11-27 18:28:43 -07:00
2023-02-25 20:51:49 +01:00
2023-02-04 18:46:39 -07:00
2022-12-06 08:54:33 +01:00
2023-02-13 00:50:07 +00:00
2022-12-06 08:54:33 +01:00
2023-03-16 09:58:42 +01:00
2023-02-25 20:49:41 -07:00
2023-02-18 16:56:56 +00:00
2023-02-18 16:56:56 +00:00
2023-02-23 12:41:47 +00:00
2022-12-06 08:54:33 +01:00
2022-12-07 11:48:27 +01:00
2022-12-07 11:48:27 +01:00
2023-03-26 21:55:21 +01:00
2023-03-26 21:55:21 +01:00
2022-12-06 08:54:33 +01:00
2023-03-06 23:46:35 +01:00
2023-03-26 21:55:21 +01:00
2023-03-26 21:55:21 +01:00
2023-03-04 00:29:38 +01:00
2022-12-06 08:54:33 +01:00
2023-03-09 15:51:00 +00:00
2023-02-10 05:12:06 +03:30
2022-12-06 08:54:33 +01:00
2022-12-06 08:54:33 +01:00
2022-12-07 11:48:27 +01:00
2022-12-07 11:48:27 +01:00
2023-01-26 20:24:37 +00:00
2023-01-27 20:33:18 +00:00
2023-03-15 07:52:08 +00:00
2023-02-21 00:54:04 +01:00
2023-02-17 16:25:57 +00:00
2023-01-01 09:38:07 +00:00
2023-01-26 20:24:37 +00:00
2022-12-06 08:54:33 +01:00
2023-03-24 10:58:43 +00:00
2023-02-19 01:09:09 +01:00
2023-03-24 22:06:38 +00:00
2023-03-24 22:06:38 +00:00
2023-02-25 20:51:49 +01:00
2023-02-25 20:51:49 +01:00
2023-03-16 09:58:42 +01:00
2023-02-17 16:25:57 +00:00
2023-03-04 00:29:38 +01:00
2023-03-03 15:23:47 +01:00
2023-03-06 23:46:35 +01:00
2022-12-10 11:49:24 +00:00
2023-02-21 00:54:04 +01:00
2023-02-21 00:54:04 +01:00
2023-02-21 00:54:04 +01:00
2022-12-28 22:32:21 -05:00
2022-12-26 09:27:19 +01:00
2023-03-01 10:55:20 +01:00
2023-03-01 10:55:20 +01:00
2023-02-25 20:51:49 +01:00
2023-03-16 09:58:42 +01:00
2022-12-06 08:54:33 +01:00
2022-12-06 08:54:33 +01:00
2023-03-24 10:33:22 +01:00
2023-02-17 16:25:57 +00:00
2022-12-06 08:54:33 +01:00
2022-12-06 08:54:33 +01:00
2023-01-26 20:24:37 +00:00
2022-12-07 11:48:27 +01:00
2022-12-07 11:48:27 +01:00
2023-03-16 09:58:42 +01:00
2023-03-06 23:46:35 +01:00
2022-12-06 08:54:33 +01:00
2023-03-16 09:58:42 +01:00
2023-03-16 09:58:42 +01:00
2023-02-16 10:47:22 +00:00
2023-02-16 10:47:22 +00:00
2023-03-15 14:55:49 +01:00
2023-03-06 23:46:35 +01:00
2023-03-31 12:09:40 +02:00
2023-03-31 12:09:40 +02:00
2022-12-06 08:54:33 +01:00
2023-02-28 13:23:55 +01:00
2023-03-06 23:46:35 +01:00
2023-03-06 23:46:35 +01:00
2023-02-18 16:56:56 +00:00
2023-03-04 00:29:38 +01:00
2023-02-21 00:54:04 +01:00
2023-02-02 14:49:54 +01:00
2023-02-02 13:15:03 +01:00
2023-03-16 08:05:58 +01:00
2023-03-06 23:46:35 +01:00
2023-01-26 09:57:14 -05:00
2023-03-06 23:46:35 +01:00
2023-03-06 23:46:35 +01:00
2023-03-24 10:33:22 +01:00
2023-02-17 16:25:57 +00:00
2023-02-13 00:50:07 +00:00
2023-02-21 00:54:04 +01:00
2022-12-06 08:54:33 +01:00
2023-01-27 20:33:18 +00:00
2023-03-16 09:58:42 +01:00
2023-03-16 09:58:42 +01:00
2023-03-25 21:42:53 +01:00
2023-03-25 21:42:53 +01:00
2022-11-19 16:04:42 +01:00