Changeset 8797 for code/branches/output/src/libraries
- Timestamp:
- Jul 30, 2011, 10:39:33 AM (13 years ago)
- Location:
- code/branches/output/src/libraries/core/command
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/output/src/libraries/core/command/IOConsolePOSIX.cc
r8795 r8797 391 391 } 392 392 393 //! Called if only the last output-line has changed394 void IOConsole::onlyLastLineChanged()395 {396 // Save cursor position and move it to the beginning of the first output line397 this->cout_ << "\033[s\033[1A\033[1G";398 // Erase the line399 this->cout_ << "\033[K";400 // Reprint the last output line401 this->printOutputLine(this->shell_->getNewestLineIterator()->first, this->shell_->getNewestLineIterator()->second);402 // Restore cursor403 this->cout_ << "\033[u";404 this->cout_.flush();405 }406 407 393 //! Called if a new output-line was added 408 394 void IOConsole::lineAdded() -
code/branches/output/src/libraries/core/command/IOConsolePOSIX.h
r7401 r8797 66 66 // Methods from ShellListener 67 67 void linesChanged(); 68 void onlyLastLineChanged();69 68 void lineAdded(); 70 69 void inputChanged(); -
code/branches/output/src/libraries/core/command/IOConsoleWindows.cc
r8795 r8797 388 388 } 389 389 390 //! Called if only the last output-line has changed391 void IOConsole::onlyLastLineChanged()392 {393 int newLineHeight = 1 + this->shell_->getNewestLineIterator()->first.size() / this->terminalWidth_;394 // Compute the number of new lines needed395 int newLines = newLineHeight - this->lastOutputLineHeight_;396 this->lastOutputLineHeight_ = newLineHeight;397 // Scroll console if necessary398 if (newLines > 0) // newLines < 0 is assumed impossible399 this->createNewOutputLines(newLines);400 Shell::LineList::const_iterator it = this->shell_->getNewestLineIterator();401 this->printOutputLine(it->first, it->second, makeCOORD(0, this->inputLineRow_ - newLineHeight));402 }403 404 390 //! Called if a new output line was added 405 391 void IOConsole::lineAdded() -
code/branches/output/src/libraries/core/command/IOConsoleWindows.h
r8729 r8797 68 68 // Methods from ShellListener 69 69 void linesChanged(); 70 void onlyLastLineChanged();71 70 void lineAdded(); 72 71 void inputChanged(); -
code/branches/output/src/libraries/core/command/Shell.h
r8795 r8797 66 66 private: 67 67 virtual void linesChanged() {} ///< Called if all output-lines have changed 68 virtual void onlyLastLineChanged() {} ///< Called if only the last output-line has changed69 68 virtual void lineAdded() {} ///< Called if a new line was added to the output 70 69 virtual void inputChanged() {} ///< Called if the input has changed
Note: See TracChangeset
for help on using the changeset viewer.