Commit Graph
59 Commits
Author SHA1 Message Date
Nathan Sobo e0fdc7d0aa Eliminate PaintContext 2023-09-11 09:00:59 -06:00
Nathan Sobo a24d94cfda Eliminate LayoutContext 2023-09-11 08:47:00 -06:00
Nathan Sobo ebf8b32811 Checkpoint 2023-09-08 16:25:10 -06:00
Nathan Sobo d375f7992d Merge branch 'main' into divs 2023-08-22 16:35:56 -06:00
Mikayla e5eed29c72 Add components example
Re-arrange generics on mouse event handler
Add TypeTag struct for dynamically tagged components
2023-08-15 03:06:43 -07:00
Nathan Sobo 0bf607cd2d WIP 2023-08-10 10:26:48 -06:00
Nathan Sobo 1b03c5d69c Pass PaintContext to Element::paint
I want to use this on another branch, but it's a sweeping change,
so this prepares the ground for it. This can always be reverted if
it doesn't work out.
2023-07-25 17:32:31 -06:00
Mikayla Maki 6ffa6afd20 fmt 2023-06-28 16:35:57 -07:00
Mikayla Maki e0d618862c Add click out handler
Make all context menus on button click toggles instead of re-shows
2023-06-28 16:23:07 -07:00
Nathan Sobo ba50b35de6 wip 2023-05-13 14:34:09 -06:00
Antonio Scandurra 7f345f8bf5 Separate Window::build_scene into layout and paint 2023-05-03 12:18:16 +02:00
Nathan SoboandMax Brunsfeld fe492eacbf Refine naming of element-related types and traits
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-04-21 13:06:37 -06:00
03619dfa55 Rename Drawable::boxed to into_element and make containers generic
Multi-element are now generic over any drawable child, which can be converted
into an element.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-04-21 12:43:19 -06:00
Nathan Sobo a25f962185 WIP 2023-04-12 12:13:35 -06:00
Nathan Sobo 868301bedb WIP 2023-04-12 10:07:17 -06:00
Nathan Sobo e115baa60c WIP 2023-04-11 18:21:56 -06:00
Nathan Sobo 3de8fe0f87 WIP 2023-04-10 17:27:47 -06:00
Nathan Sobo 6638407ff9 WIP: Everything shredded 2023-04-10 16:10:32 -06:00
Nathan Sobo 2615a11f7c Don't export platform::* from gpui
I'd like to avoid cluttering the top-level namespace with all the platform-
specific types.
2023-04-07 11:45:53 -06:00
Julia ad1947fa50 Add in-window on-move-out mouse handler concept 2023-01-19 12:34:13 -05:00
K Simmons f5795ffc6f roll back mouse position in mouse_state struct in favor of using the dragged element position 2022-10-24 23:32:01 -07:00
K Simmons cfde3e348c Add pane splitting by dragged item. Works, but the overlay doesn't clear quite right 2022-10-24 23:31:58 -07:00
K Simmons 70e2951e35 add mouse region handler bool for adding the handler above the child 2022-10-24 23:30:35 -07:00
JuliaandKay Simmons b9f9819637 Handle tab drag end on pane items to insert after active item
Co-Authored-By: Kay Simmons <kay@zed.dev>
2022-10-24 23:30:35 -07:00
Nathan Sobo 12eab6551f Remove dispatch_event from Element trait 2022-10-16 13:08:25 -06:00
Nathan Sobo 6e53deb1b2 Refine mouse event naming 2022-10-16 11:18:58 -06:00
Nathan SoboandMax Brunsfeld bc03592912 Only invalidate parent view on click/hover if we read that state when rendering
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-10-14 18:09:15 -06:00
Antonio ScandurraandNathan Sobo 45d118f96f Decide whether to clip to visible bounds on a per-element basis
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-10-11 17:05:13 +02:00
Mikayla Maki ab7f7b3754 Added on_scroll to mouse_event_handler and fixed the uniform list scroll implementation 2022-09-21 22:23:07 -07:00
K SimmonsandMikayla Maki 6b26965074 Permanent fix to repeat MouseRegion Tag failure in Workspace
Polish tab bar buttons

Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-11 15:34:10 -07:00
K SimmonsandMikayla Maki 69ecbb644d DOCK WORKING!
Update editor element to use mouse regions instead of dispatch event for mouse events
Fix bug in presenter where mouse region handlers were stored on click and called instead of more up to date handlers from subsequent renders
Changed MouseRegion to require discriminants in all cases
Add scroll wheel event to MouseRegion
Polished a bunch of dock inconsistencies

Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-11 15:32:20 -07:00
K Simmons 042ece00b1 Drag and drop tabs working. all known bugs fixed 2022-08-25 11:14:24 -07:00
K Simmons e44536344a Removed EventHandler from workspace in favor of mouse event handler 2022-08-22 16:49:14 -07:00
K Simmons 3fb4e6356c Rework presenter dispatch_event to allow isolated propogation of individual MouseRegionEvent types Co-Authored-By: mikayla@zed.dev 2022-08-22 16:16:39 -07:00
K Simmons 133c194f4a wip tab drag and drop 2022-08-22 16:16:39 -07:00
K Simmons a650c146f1 more event wip 2022-08-22 16:16:39 -07:00
ForLoveOfCatsandMikayla 8ba2f77148 One big cleanup pass of clippy lints
Co-authored-by: Mikayla <mikayla@zed.dev>
2022-08-10 16:51:01 -07:00
Antonio Scandurra 7b009c8bbe Merge branch 'main' into ime-support-2 2022-07-22 16:03:38 +02:00
Antonio Scandurra 97ce3998ec Position IME input according to where the selection is rendered 2022-07-21 17:35:40 +02:00
K Simmons 225055ed5d Address some issues where panes don't get focused properly, make the focused pane more obvious, and prevent splitting of the pane with no items 2022-07-20 18:52:32 -07:00
K Simmons deeefed7eb Change mouse_event_handler to use HandlerSet 2022-07-18 10:08:14 -07:00
K Simmons 8add81350e Rework presenter and MouseRegion to use Handler hashmap rather than individual fields 2022-07-17 23:19:32 -07:00
Mikayla Maki b2fa511acd GPUI change proposals 2022-07-06 17:52:20 -07:00
Antonio Scandurra a26af194e7 Use visible bounds to determine hit bounds for cursor/mouse regions 2022-06-08 10:17:22 +02:00
Antonio Scandurra 982de971fa Introduce a new Tooltip element and a with_tooltip helper 2022-06-01 09:55:25 +02:00
Antonio Scandurra e7ab61d125 Dismiss context menu when (right-)mousing down outside of it 2022-05-28 08:51:46 +02:00
Nathan Sobo 44c8ee5709 Add mouse down out handlers
These will fire whenever the left/right mouse button is pressed down outside a specific region. I'll use these to cancel the context menu in the next commit.
2022-05-27 12:56:44 -06:00
Nathan Sobo c3baf2748f Block hovering behind overlays 2022-05-27 11:54:51 -06:00
Antonio Scandurra 1d7fc12229 Add right-click support to MouseEventHandler 2022-05-27 10:47:54 +02:00
Nathan Sobo aedfd74d30 Use the hit bounds when painting mouse regions 2022-05-26 20:05:20 -06:00