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

support scrolling on a per-ncplane basis #323

Closed
dankamongmen opened this issue Feb 5, 2020 · 3 comments
Closed

support scrolling on a per-ncplane basis #323

dankamongmen opened this issue Feb 5, 2020 · 3 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Milestone

Comments

@dankamongmen
Copy link
Owner

Output to an ncplane ought be able to scroll. This will be pretty much necessary, for instance, to support spawning an external process and rendering the output to a plane.

The scrolling model will be that everything moves up one line when either:

  • a newline is emitted on the bottom row, at any column, or
  • any character is emitted on the bottom row, at the last column, or
  • a wide character is emitted on the bottom row, at the penultimate column

When scrolling is enabled on a plane, its rectangular framebuffer is replaced with an array of array of cells, and an integer identifying which one is the topmost line at this moment. Perhaps we ought just always use this structure, and when scrolling is disabled, the integer will always be 0? I see no reason not to, hrmm.

Actually, we can still just use a rectangle for a single allocation, and the integer will just be scaled by the row length. Yessssssss, that's the right way to do it.

Rendering and output will both need to be updated to use this new integer.

@dankamongmen dankamongmen self-assigned this Feb 5, 2020
@dankamongmen dankamongmen added documentation Improvements or additions to documentation enhancement New feature or request labels Feb 5, 2020
@dankamongmen dankamongmen added this to the 1.3.0 milestone Feb 18, 2020
@dankamongmen dankamongmen modified the milestones: 1.3.0, 1.4.0 Mar 22, 2020
@dankamongmen
Copy link
Owner Author

This is going to be pretty much necessary for proper implementation of #320, so moving it up to 1.3.0.

@dankamongmen dankamongmen modified the milestones: 1.4.0, 1.3.0 Apr 5, 2020
dankamongmen added a commit that referenced this issue Apr 6, 2020
@dankamongmen
Copy link
Owner Author

I added ncplane_set_scrolling(ncplane*, bool). Updated header, added C++ wrapper, updated README.md, updated notcurses_ncplane.3, added Python wrapper. Now need to implement it.

dankamongmen added a commit that referenced this issue Apr 6, 2020
dankamongmen added a commit that referenced this issue Apr 6, 2020
dankamongmen added a commit that referenced this issue Apr 6, 2020
dankamongmen added a commit that referenced this issue Apr 6, 2020
dankamongmen added a commit that referenced this issue Apr 6, 2020
dankamongmen added a commit that referenced this issue Apr 6, 2020
dankamongmen added a commit that referenced this issue Apr 6, 2020
@dankamongmen
Copy link
Owner Author

We now move to the next line when scrolling is enabled. Still need to implement scrolling on the last row, but this ought be enough to implement #320. Making a new bug on the latter problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant