Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/active cell wrapper #27

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Conversation

sjhorn
Copy link

@sjhorn sjhorn commented Dec 29, 2023

Context

For rare situations, you may want to render a different background for the active selection and then paint over that with the selected cell content. This wrapper enables that.

I encountered this when trying to have SwayzeTable look like the original VisiCalc which I am preparing as a demo of this great open source engine.

Approach

Introduced a wrapper similar to the header, body and box wrappers. Needed to position the wrapper to simplify the widget tree without having to implement a customer painter.

Focused on activeRect (Active cell Rectangle) for this wrapper, could be expanded to support selectedRect (Selection Rectangle) but wanted to keep the scope small for a pull request/feature.

victorbotamedi and others added 13 commits May 31, 2022 13:15
* Add initial header drag preview implementation

* Add drag column preview

* Rename inner preview widgets

* REname dropHeaderAtPosition

* Add lines preview

* Change mouse curson when hover a selected header

* Reorder preview clean up

* Fix preview using the latest selection

* Render drag preview independet of selections

* Fix selection tap initiating header drag

* Set header index as a range

* Add is header selected method to selection controller

* Move action dispatch to methods

* Fix preview with frozen panes

* Set drop action to move the selection around

* Add header cancel drag intent

* Move dragging property to its own state class

* Rename reorder preview to header drag and drop

* Blocks a drop action within the header range

* Add header drag state test

* Move header drag and drop actions to its own files

* Add intent docs

* Add drag n drop preview theme

* Add docs

* Fix format

* Add a configuration to swayze scope

* Fix test

* Fix const warning

* Fix typos

* Fix some selections no being dragged properly

* Add a brief doc on why we use basic cursor for drag

* Fix header drag and drop with frozen panes

* Move drag state to its own class

* Add end boundary drop test

* Add header gesture detector tests

* Fix dragging overlaping selections

* Set a single action mock

* Typo

* Move drag and drop style to its own class

* Fix comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants