Skip to content

fakecore/TerminalCommandPrintf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TerminalCommandPrintf

又快又好用的命令行交互工具,支持上内容输出,下命令交互形式.

说明

下载

git clone https://github.com/planetPocket/TerminalCommandPrintf

terminalCommandDemo.gif

终端页面组成

/*
 * output example
 * output panel layout
 * -----------------------
 * title
 * -----------------------
 * Content Area
 * -----------------------
 * Function List
 * -----------------------
 * <0 1 2...N>
 * prev (h) next(l)
 */

使用教程

#include "command_printf.h"
void DemoCallback(int funcNo){
    printf("funcNo:%d called\n");
}

int main()
{
    CommandPrintf cp;
    cp.addCommand(1,"Hello World");
    cp.addCommand(2,"keep World");
    cp.setFunctionCallback([&](int funcNo){
        DemoCallback(funcNo);
        cp.pushContentArea("echo: funcNo:%d\n");
    });
    cp.execAsync();
    return 0;
}

TODO

  • 命令行功能解析
  • 支持写文件
  • 性能优化
  • 命令解析支持
  • 终端涂色
  • Content Area 支持回滚显示

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published