Changeset 6417 for code/trunk/src/libraries/core/Shell.h
- Timestamp:
- Dec 25, 2009, 10:23:58 PM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/core/Shell.h
r6105 r6417 65 65 { 66 66 public: 67 Shell(const std::string& consoleName, bool bScrollable, bool bPrependOutputLevel = false); 67 enum LineType 68 { 69 None = OutputLevel::None, 70 Warning = OutputLevel::Warning, 71 Error = OutputLevel::Error, 72 Info = OutputLevel::Info, 73 Debug = OutputLevel::Debug, 74 Verbose = OutputLevel::Verbose, 75 Ultra = OutputLevel::Ultra, 76 Input, 77 Command, 78 Hint 79 }; 80 81 Shell(const std::string& consoleName, bool bScrollable); 68 82 ~Shell(); 69 83 … … 82 96 { return this->inputBuffer_->getCursorPosition(); } 83 97 84 inline std::stringgetInput() const98 inline const std::string& getInput() const 85 99 { return this->inputBuffer_->get(); } 86 100 87 std::list<std::string>::const_iterator getNewestLineIterator() const; 88 std::list<std::string>::const_iterator getEndIterator() const; 101 typedef std::list<std::pair<std::string, LineType> > LineList; 102 LineList::const_iterator getNewestLineIterator() const; 103 LineList::const_iterator getEndIterator() const; 89 104 90 void addOutput Line(const std::string& line, int level = 0);105 void addOutput(const std::string& text, LineType type = None); 91 106 void clearOutput(); 92 107 … … 103 118 104 119 void addToHistory(const std::string& command); 105 std::stringgetFromHistory() const;120 const std::string& getFromHistory() const; 106 121 void clearInput(); 107 122 // OutputListener … … 139 154 std::stringstream outputBuffer_; 140 155 bool bFinishedLastLine_; 141 std::list<std::string>outputLines_;142 std::list<std::string>::const_iteratorscrollIterator_;156 LineList outputLines_; 157 LineList::const_iterator scrollIterator_; 143 158 unsigned int scrollPosition_; 144 159 unsigned int historyPosition_; 145 ConfigFileType commandHistoryConfigFileType_;146 160 147 161 std::string promptPrefix_; 148 162 const std::string consoleName_; 149 const bool bPrependOutputLevel_;150 163 const bool bScrollable_; 151 164
Note: See TracChangeset
for help on using the changeset viewer.