/[svn]/linuxsampler/trunk/src/shell/TerminalPrinter.h
ViewVC logotype

Contents of /linuxsampler/trunk/src/shell/TerminalPrinter.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2528 - (show annotations) (download) (as text)
Mon Mar 3 12:02:40 2014 UTC (10 years, 1 month ago) by schoenebeck
File MIME type: text/x-c++hdr
File size: 836 byte(s)
* LSCP shell: in case of multiple possibilities or non-terminal symbols,
  show them right to the current command line immediately while typing
  (no double tab required for this feature, as it would be the case in
  other shells)
* LSCP shell: fixed sluggish behavior when doing tab auto complete
* LSCP shell: fixed conflicting behavior between keyboard input and
  LSCP server evaluation result, that caused an inconsistent screen
  output (keybord input is now never printed directly on screen, only
  the result returned from LSCP server)

1 /*
2 * LSCP Shell
3 *
4 * Copyright (c) 2014 Christian Schoenebeck
5 *
6 * This program is part of LinuxSampler and released under the same terms.
7 */
8
9 #ifndef TERMINALPRINTER_H
10 #define TERMINALPRINTER_H
11
12 #include <string>
13
14 /**
15 * Simple helper class that remembers the amount of lines advanced on the
16 * terminal (since this object was constructed) by printing out text to the
17 * terminal with this class. This way the content been printed on the terminal
18 * can completely be erased afterwards once necessary.
19 */
20 class TerminalPrinter {
21 public:
22 TerminalPrinter();
23 virtual ~TerminalPrinter();
24 int linesAdvanced() const;
25 TerminalPrinter& operator<< (const std::string s);
26 protected:
27 void printChar(char c);
28 private:
29 int m_lines;
30 int m_col;
31 int m_screenWidth; // in characters
32 };
33
34 #endif // TERMINALPRINTER_H

  ViewVC Help
Powered by ViewVC