File README.md added (mode: 100644) (index 0000000..acbc54f) |
|
1 |
|
**libcursedrl**, _2019_ |
|
2 |
|
|
|
3 |
|
_This file last updated on 24 March, 2019_ |
|
4 |
|
|
|
5 |
|
### Brief Description ### |
|
6 |
|
|
|
7 |
|
This is a C++11 library that integrates [GNU Readline library][readline] into |
|
8 |
|
[*libcursed*][libcursed] (provides classes for using |
|
9 |
|
[*curses* library][curses]). |
|
10 |
|
|
|
11 |
|
The library should never pull in any *readline* headers via its headers nor |
|
12 |
|
clients should have to include them in order to use the library. |
|
13 |
|
They uses some very generic names, some of which are macros, all of which can |
|
14 |
|
cause conflicts in completely unrelated code. |
|
15 |
|
|
|
16 |
|
#### Implementation state #### |
|
17 |
|
|
|
18 |
|
It was created for a couple of projects, has minimally necessary functionality |
|
19 |
|
and can change quite a bit in the future. |
|
20 |
|
|
|
21 |
|
#### Throw-in library state #### |
|
22 |
|
|
|
23 |
|
There is no build system and nothing is getting built for the client. To use |
|
24 |
|
it clone the repository (possibly as a submodule) and handle the building with |
|
25 |
|
the build system that's used by the main project. Compile with C++11 enabled |
|
26 |
|
and headers of *libcursed* available under `cursed/` prefix. Obviously link |
|
27 |
|
in *libcursed* and link against `readline`. |
|
28 |
|
|
|
29 |
|
### Prerequisites ### |
|
30 |
|
|
|
31 |
|
* C++11 capable compiler |
|
32 |
|
* [GNU Readline library][readline] |
|
33 |
|
* [*libcursed*][libcursed] |
|
34 |
|
|
|
35 |
|
### Structure ### |
|
36 |
|
|
|
37 |
|
The library doesn't provide a widget, instead it accepts reference to one |
|
38 |
|
created and placed on the screen by the client. It automatically updates and |
|
39 |
|
resizes the screen while handling input. |
|
40 |
|
|
|
41 |
|
### What's available ### |
|
42 |
|
|
|
43 |
|
* Loading/saving history. |
|
44 |
|
* Updating history with input. |
|
45 |
|
* Cancellation on Escape key. |
|
46 |
|
* Completion callback. |
|
47 |
|
* Callback on input change. |
|
48 |
|
|
|
49 |
|
[libcursed]: https://code.reversed.top/user/xaizek/libcursed |
|
50 |
|
[curses]: https://en.wikipedia.org/wiki/Curses_(programming_library) |
|
51 |
|
[readline]: https://tiswww.case.edu/php/chet/readline/rltop.html |