2021-12-10 11:09:03 +01:00
|
|
|
#ifndef UI_H
|
|
|
|
#define UI_H
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
#include "project.h"
|
|
|
|
|
2021-12-14 14:39:20 +01:00
|
|
|
const int num_commands=12;
|
2021-12-10 11:09:03 +01:00
|
|
|
extern std::string command_names[num_commands];
|
|
|
|
extern std::vector<std::string> autocomplete_names;
|
|
|
|
char **tt_name_completion(const char* text, int start, int end);
|
|
|
|
char *tt_name_generator(const char *text, int state);
|
|
|
|
void init_autocomplete(ProjectList *proj_list);
|
|
|
|
std::string space_to_underscore(std::string);
|
2021-12-10 13:22:46 +01:00
|
|
|
std::string underscore_to_space(std::string);
|
|
|
|
|
|
|
|
void parse_input(std::string input, ProjectList *proj_list);
|
|
|
|
|
|
|
|
// command definitions
|
|
|
|
void command_ls(std::string input, ProjectList *proj_list);
|
|
|
|
void command_start(std::string input, ProjectList *proj_list);
|
2021-12-10 15:58:27 +01:00
|
|
|
void command_np(std::string name, ProjectList *proj_list);
|
2021-12-13 10:22:49 +01:00
|
|
|
void command_nt(std::string input, ProjectList *proj_list);
|
2021-12-13 15:04:18 +01:00
|
|
|
void command_rm(std::string input, ProjectList *proj_list);
|
2021-12-13 10:22:49 +01:00
|
|
|
void command_sp(std::string name, ProjectList *proj_list);
|
2021-12-13 11:28:51 +01:00
|
|
|
void command_st(std::string input, ProjectList *proj_list);
|
|
|
|
void command_nt(std::string input, ProjectList *proj_list);
|
2021-12-13 15:44:24 +01:00
|
|
|
void command_re(std::string input, std::string new_name, ProjectList *proj_lits);
|
2021-12-13 22:05:04 +01:00
|
|
|
void command_at(std::string input, int wtime, ProjectList *proj_list);
|
|
|
|
void command_rt(std::string input, int wtime, ProjectList *proj_list);
|
2021-12-14 14:39:20 +01:00
|
|
|
void command_report(std::string date_str, ProjectList *proj_list);
|
|
|
|
void command_save(ProjectList *proj_list);
|
2021-12-10 11:09:03 +01:00
|
|
|
#endif
|