anuvindbhat / chatter

A multithreaded chat program written in C using POSIX sockets
MIT License
1 stars 0 forks source link

Dynamic resizing #6

Open anuvindbhat opened 5 years ago

anuvindbhat commented 5 years ago

Redrawing of the UI can be made dynamic by using wgetch() instead of wgetstr() to read input character-by-character and then checking for KEY_RESIZE to call the redraw_ui() function. However, this would require finding the relevant special characters (some of which wgetstr() already handles, like backspace) and then handling them appropriately. Another benefit of doing this is that we get greater flexibility than what wgetstr() provides when handling special characters (KEY_LEFT can be handled like in modern editors). The list of special characters can be found at ncurses special characters.