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

Integral functions for areas #107

Open
mengstr opened this issue May 10, 2016 · 5 comments
Open

Integral functions for areas #107

mengstr opened this issue May 10, 2016 · 5 comments

Comments

@mengstr
Copy link

mengstr commented May 10, 2016

This is just a friendly suggestion...

I know there is the "views" package that does a lot of nice things, but some common things maybe could be included directly in the main package.

Like FillArea(x,y,w,h) and possibly also ScrollAreaUp(x,y,w,h)...

Those are things that I almost always have use for in my console-gui applications.

@gdamore
Copy link
Owner

gdamore commented May 19, 2016

FillArea is certainly reasonable. I'm less sure about ScrollArea -- I imagine we could scroll but you'd have to fill the newly "exposed" area.

Really, yes, you want "views" here. :-) But the filling functionality could be used by views.

@gdamore
Copy link
Owner

gdamore commented May 20, 2016

I'm thinking about this... the API for filling and drawing isn't 100% obvious to me. Same for scrolling. We have to have the bounding box (presumably physical coordinate based), but also then attributes and perhaps a fill character.

Conceivably we could also have a border style.

@mengstr
Copy link
Author

mengstr commented May 21, 2016

I guess that 99% of all usage cases would to fill with space characters with a background color - i.e just clear part of the screen for printing/drawing something new.

The borders would be static, and could/should be drawn separately at the initialization of all the other static elements on the screen. It seems a bit overkill to redraw borders (which is a bunch of differect characters) everytime you clear the info inside the "window".

@gdamore
Copy link
Owner

gdamore commented Dec 3, 2023

I'm probably going to go ahead and do this now. Only 7 years later lol.

@mengstr
Copy link
Author

mengstr commented Dec 4, 2023

Nice! I guess netter late than never - although I thought the opposite in highschool where I usually rather skipped an entire class rather than coming in like 10 minutes late :)

I must admit that it was quite a while since I wrote a GUI console app, I usually just do plain scrolling text without any cursor control nowadays. But maybe it's time to start making my apps a bit more slick again.

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

No branches or pull requests

2 participants