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 rendering to a subregion of the terminal #293
Comments
It would be awesome if this could be combined with #310 (at least in concept) so that we could run one notcurses program within an ncplane of another. |
So the geometry vs margin question....which of the following do we want the user to be able to specify?
|
I'm thinking maybe minimum size + minimum margin are sufficient for now? Maybe even just minimum margin? So that would be:
It could also be, if we want to support something other than just centering:
And then if we wanted a minimum size:
The actual size, assuming
(since otherwise it can't be displayed) will be:
Yeah, so 4 margins + 2 minima seem sufficient. If we're allowing a minimum size to be specified, we ought enforce it in |
I think maybe we want maximum absolute and minimum margin...? |
I've added |
I've added a |
Just ran through a full demo with a right and bottom border. Everything looks great! Need to test with left and top, and also need to test with a resize. |
Either a top or a left border gives us problems on numerous demos. We're not done yet :). |
Is it just me, or is the centering off on the intro scene above (written with |
yep:
|
Fixed up the corruption we were seeing. Everything works now, except we're not drawing the last line when we have a top margin. This should be done soon. |
We're also not drawing the righmost column when we have a left margin. |
While documenting #77, the video question gave me pause. it would be pretty neat to run a (small, heh) video in the terminal below your prompt ala
lsix
but with video. now, imagine, you can't have this going while you've got your next program running attached to the term, but it can run until then without blowing away the screen, right?well if there's nothing else running, there's no threat of scrolling, in which case we're actually just rendering to a subregion of the terminal. and i think that's the way to get this effect. allow the toplevel
notcurses
object to be restricted to a subregion (whether this ought be defined by a static geometry or a static margin is an open question). the subregion will be expressed in a fashion that allows it to be symbolically offset from the current cursor position (which we must be able to retrieve, but can be done much more portably than acquiring screen content).this isn't high priority by any means, but something to think about.
The text was updated successfully, but these errors were encountered: