cursor.h

来自「由一个古老的BASIC解释器改进而成, 保留了ANSI C固有的艺术美感.」· C头文件 代码 · 共 52 行

H
52
字号
// cursor.h

#ifndef CURSOR_H_
#define CURSOR_H_

#include <string>

void initconsole ();
void quitconsole ();

size_t getwidth ();

void cursorvisible ();
void cursorinvisible ();
void showcursor ();
void hidecursor ();

void cls ();

//void locate (int row, int col);
void gotoxy (int x, int y);
void movecharforward ();
void movecharback ();
void movecharforward (size_t n);
void movecharback (size_t n);
void movecharup ();
void movechardown ();
void movecharup (size_t n);
void movechardown (size_t n);
void savecursorpos ();
void restorecursorpos ();

void textcolor (int color);
void textbackground (int color);
std::string inkey ();
std::string getkey ();

#ifdef __WIN32__

void clean_input ();

#else

inline void clean_input () { }

#endif

#endif

// Fin de cursor.h

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?