Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | pmbaty | 1 | /* |
2 | * This file is part of the DXX-Rebirth project <https://www.dxx-rebirth.com/>. |
||
3 | * It is copyright by its individual contributors, as recorded in the |
||
4 | * project's Git history. See COPYING.txt at the top level for license |
||
5 | * terms and a link to the Git history. |
||
6 | * |
||
7 | * Based on an early version of SDL_Console |
||
8 | * Written By: Garrett Banuk <mongoose@mongeese.org> |
||
9 | * Code Cleanup and heavily extended by: Clemens Wacha <reflex-2000@gmx.net> |
||
10 | * Ported to use native Descent interfaces by: Bradley Bell <btb@icculus.org> |
||
11 | * |
||
12 | * This is free, just be sure to give us credit when using it |
||
13 | * in any of your programs. |
||
14 | * |
||
15 | */ |
||
16 | /* |
||
17 | * |
||
18 | * Command-line interface for the console |
||
19 | * |
||
20 | */ |
||
21 | |||
22 | #pragma once |
||
23 | |||
24 | #include <cstdint> |
||
25 | |||
26 | enum class CLI_insert_type : uint8_t |
||
27 | { |
||
28 | insert, |
||
29 | overwrite, |
||
30 | }; |
||
31 | |||
32 | // Insert or Overwrite characters? |
||
33 | void cli_toggle_overwrite_mode(); |
||
34 | |||
35 | void cli_init(void); |
||
36 | /* executes the command typed in at the console (called if you press ENTER)*/ |
||
37 | void cli_execute(); |
||
38 | /* Gets called when TAB was pressed */ |
||
39 | void cli_autocomplete(void); |
||
40 | /* draws the commandline the user is typing in to the screen. called by update? */ |
||
41 | unsigned cli_draw(unsigned y, unsigned line_spacing); |
||
42 | /* Gets called if you press the LEFT key (move cursor left) */ |
||
43 | void cli_cursor_left(void); |
||
44 | /* Gets called if you press the RIGHT key (move cursor right) */ |
||
45 | void cli_cursor_right(void); |
||
46 | /* Gets called if you press the HOME key (move cursor to the beginning of the line */ |
||
47 | void cli_cursor_home(void); |
||
48 | /* Gets called if you press the END key (move cursor to the end of the line*/ |
||
49 | void cli_cursor_end(void); |
||
50 | /* Called if you press DELETE (deletes character under the cursor) */ |
||
51 | void cli_cursor_del(void); |
||
52 | /* Called if you press BACKSPACE (deletes character left of cursor) */ |
||
53 | void cli_cursor_backspace(void); |
||
54 | /* Called if you type in a character (add the char to the command) */ |
||
55 | void cli_add_character(char character); |
||
56 | /* Called if you press Ctrl-C (deletes the commandline) */ |
||
57 | void cli_clear(void); |
||
58 | /* Called if you press UP key (switches through recent typed in commands */ |
||
59 | void cli_history_prev(void); |
||
60 | /* Called if you press DOWN key (switches through recent typed in commands */ |
||
61 | void cli_history_next(void); |