00001 00002 class CSyntaxHighLight 00003 { 00004 public: 00006 CSyntaxHighLight() 00007 { 00008 set_ansi_syntax_hilighting(); 00009 } 00010 00012 void set_ansi_syntax_hilighting() 00013 { 00014 command_prefix="\033[1;31m"; 00015 command_suffix="\033[0m"; 00016 prompt_prefix="\033[1;34"; 00017 prompt_suffix="\033[0m"; 00018 } 00019 00021 void disable_syntax_hilighting() 00022 { 00023 command_prefix=""; 00024 command_suffix=""; 00025 prompt_prefix=""; 00026 prompt_suffix=""; 00027 } 00028 00030 void set_doxygen_syntax_hilighting() 00031 { 00032 command_prefix="\b "; 00033 command_suffix=""; 00034 prompt_prefix=""; 00035 prompt_suffix=""; 00036 } 00037 00041 const char* get_command_prefix() 00042 { 00043 return command_prefix; 00044 } 00045 00049 const char* get_command_suffix() 00050 { 00051 return command_suffix; 00052 } 00053 00057 const char* get_prompt_prefix() 00058 { 00059 return prompt_prefix; 00060 } 00061 00065 const char* get_prompt_suffix() 00066 { 00067 return prompt_suffix; 00068 } 00069 00070 public: 00072 const char* command_prefix; 00074 const char* command_suffix; 00076 const char* prompt_prefix; 00078 const char* prompt_suffix; 00079 };