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

Ability to clear a container #1

Open
tristil opened this issue Jan 4, 2016 · 0 comments
Open

Ability to clear a container #1

tristil opened this issue Jan 4, 2016 · 0 comments

Comments

@tristil
Copy link

tristil commented Jan 4, 2016

Hi, thanks for this library!

I'm porting some Curses-based code over from Ruby to use termbox-crystal, here. I know this is still early days for this library but I thought it might be useful to share some of the higher-level functions I'm implementing in my code, in case you want to implement something like them.

For example, here is some code I've written to in effect let a container clear its contents. I'm not recommending the actual code, which is convoluted, but the idea of a method to replace all the cells of a container with blank characters:

https://github.com/tristil/minder-ui/blob/master/src/minder/frame.cr#L70

A cleaner implementation for what I've done here would be based on a matrix of positions stored on the container. This Go library uses buffers of cell positions this way.

Anyway, hope this kind of thing is useful. I know that the interface for the high-level aspects of this library still has to be fleshed out, but it works well enough now for me to build my app.

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

1 participant