Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 30, 2011, 10:39:33 AM (13 years ago)
Author:
landauf
Message:

removed onlyLastLineChanged() callback from ShellListener, since it's not possible to print a line of output word by word anymore, instead only whole lines are printed.

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  
    391391    }
    392392
    393     //! Called if only the last output-line has changed
    394     void IOConsole::onlyLastLineChanged()
    395     {
    396         // Save cursor position and move it to the beginning of the first output line
    397         this->cout_ << "\033[s\033[1A\033[1G";
    398         // Erase the line
    399         this->cout_ << "\033[K";
    400         // Reprint the last output line
    401         this->printOutputLine(this->shell_->getNewestLineIterator()->first, this->shell_->getNewestLineIterator()->second);
    402         // Restore cursor
    403         this->cout_ << "\033[u";
    404         this->cout_.flush();
    405     }
    406 
    407393    //! Called if a new output-line was added
    408394    void IOConsole::lineAdded()
  • code/branches/output/src/libraries/core/command/IOConsolePOSIX.h

    r7401 r8797  
    6666        // Methods from ShellListener
    6767        void linesChanged();
    68         void onlyLastLineChanged();
    6968        void lineAdded();
    7069        void inputChanged();
  • code/branches/output/src/libraries/core/command/IOConsoleWindows.cc

    r8795 r8797  
    388388    }
    389389
    390     //! Called if only the last output-line has changed
    391     void IOConsole::onlyLastLineChanged()
    392     {
    393         int newLineHeight = 1 + this->shell_->getNewestLineIterator()->first.size() / this->terminalWidth_;
    394         // Compute the number of new lines needed
    395         int newLines = newLineHeight - this->lastOutputLineHeight_;
    396         this->lastOutputLineHeight_ = newLineHeight;
    397         // Scroll console if necessary
    398         if (newLines > 0) // newLines < 0 is assumed impossible
    399             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 
    404390    //! Called if a new output line was added
    405391    void IOConsole::lineAdded()
  • code/branches/output/src/libraries/core/command/IOConsoleWindows.h

    r8729 r8797  
    6868        // Methods from ShellListener
    6969        void linesChanged();
    70         void onlyLastLineChanged();
    7170        void lineAdded();
    7271        void inputChanged();
  • code/branches/output/src/libraries/core/command/Shell.h

    r8795 r8797  
    6666        private:
    6767            virtual void linesChanged() {}          ///< Called if all output-lines have changed
    68             virtual void onlyLastLineChanged() {}   ///< Called if only the last output-line has changed
    6968            virtual void lineAdded() {}             ///< Called if a new line was added to the output
    7069            virtual void inputChanged() {}          ///< Called if the input has changed
Note: See TracChangeset for help on using the changeset viewer.