-
Notifications
You must be signed in to change notification settings - Fork 151
Question: Willing to Accept More Curses-Like Features? #51
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
Comments
@qbradq as long as they are in their separate namespace, why not? Those would be great additions to the library and still preserve the minimalism as you say. My only concern would be their compatibility with sheer number of terminals and of course with windows 10 cmd too. But as long as calling those methods does nothing on non supported terms, we're doing fine. eg calling Also since I'm not so experienced with using ncurses lib yet, I can make you a collaborator of this repo too so you can test out code much faster. |
I'll give you a warning up front: I haven't coded in C++ in 20 years and I'm only just getting back into things. Can you help me understand what you mean by a separate namespace? Do you mean a separate wrapping namespace like rang_implementation or a separate client-facing namespace like rang? Also I can test things just fine in my fork. Don't worry about that :) |
@qbradq it's much simpler. There is a |
I would be interested in helping with this also. I was looking initially at starting with the @qbradq have you started working on this at all? |
I would love these features too - ready to help if there's any need |
@lefticus I am working on it now. I've been buried at work for the past several days but I finally got that issue resolved. Plus I've got some time off coming :) Thank you both for offering to help. Feel free to work on what you like. I am starting with positional output. Perhaps one of you could start on the input portion? I was thinking we'd probably want to separate the input handling into a separate header file to keep the compile-time overhead down for those that don't need or want input handling. Thoughts @agauniyal ? |
@qbradq is compile time overhead large enough for this change? As far as I know most people use build systems(or are moving to use one) and most of the project isn't recompiled each time a new change is introduced. Another point is the ease of use this lib provides, just drop the header file and use it. Plus the work this lib does wouldn't be spread across 100s of files that's for sure. So I would say let's keep it in a single file for some time and test this out 😄 . I'm still open to further feedback though. EDIT - I've also edited your top comment to track this issue features, hope you don't mind 😄 . |
@agauniyal Input handling could get pretty large. There's a lot of variance between terminals that we could run into. And for some use cases like a terminal-only game terminal output can be spread out all over the place. However I do agree that it's better to wait until a problem presents itself before trying to solve it. |
@qbradq if the situation demands, I won't disagree to splitting up input methods into |
I realize now that the test program for some of the conditional output will require user interactivity. So I'm going to work on the input side of things first. |
@AxelStrem maybe you can help with 'hide cursor' and 'clear screen' issue since they seem to be well supported in vt100(linux and win >=10) machines but I've no idea with win < 10 versions of cmd. I've linked info in this comment under features - #51 (comment) |
@agauniyal @AxelStrem For windows < 10 see Windows Console Functions. Use FillConsoleOutputAttribute() and FillConsoleOutputCharacter() to clear the screen. |
@agauniyal What do you think of this interface?
Input for Key objects from non-tty's would be disabled. |
@qbradq this looks good to me but again I'm not so experienced with such code. I do have a few ques -
Sorry to bug you with lot of ques, I'll need to update the wiki as well so I'm trying to get a prespective about the additions 😄 . |
Please let me know if you'd like to see the PR in progress or would rather wait for the squash. |
@qbradq Otherwise everything looks good and I also saw some of the work you did in your branch which looks promising. I would like to see a PR in progress so that we could transfer some of the discussion about input features there and keep this thread for overall discussion about all the features. |
@qbradq you'll be glad to know that terminfo parser has finally landed in |
😃 I am glad that I found this library and this issue because I am currently developing games on terminals for research. My games need features below and I have written some simple functions to fulfill it: I am wondering if the last two methods can be added to this library since it seems to fall outside of RANG's scope. Thanks in advance! |
@chuyangliu yes they can be added to the library! There is an undergoing work with terminfo parser which will bring methods like |
@agauniyal Thanks a lot. I am looking forward to it! |
There is a community of people who still develop applications with the ncurses library. Most of these applications do not require the full feature set of ncurses, only require a few basic features. Would you be willing to accept pull requests for the below feature set or do you feel they fall outside the scope of Rang?
FEATURES -
Hide cursor
Clear the screen
cout << "\033[2J\033[1;1H";
but needs testing till atleast win7.Discover Terminal Dimensions
Position Cursor
Get buffered input
Get unbuffered input
Reset Terminal - would be probably a combination of above methods.
Other links -
The text was updated successfully, but these errors were encountered: