1 /* 2 Vimpc 3 Copyright (C) 2010 Nathan Sweetman 4 5 This program is free software: you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation, either version 3 of the License, or 8 (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program. If not, see <http://www.gnu.org/licenses/>. 17 18 console.hpp - window to display debug information on a console like screen 19 */ 20 21 #ifndef __UI__CONSOLE 22 #define __UI__CONSOLE 23 24 #include <string> 25 26 #include "buffers.hpp" 27 #include "window/scrollwindow.hpp" 28 29 //! \todo seperate console from console window 30 namespace Ui 31 { 32 // 33 class ConsoleWindow : public Ui::ScrollWindow 34 { 35 public: 36 ConsoleWindow(Main::Settings const & settings, Ui::Screen & screen, 37 std::string name, Console & console); 38 ~ConsoleWindow(); 39 40 public: 41 void Clear(); 42 void PerformAutoScroll(Console::BufferType string); 43 Current() const44 uint32_t Current() const { return ScrollLine(); } 45 46 protected: WindowBuffer() const47 Main::WindowBuffer const & WindowBuffer() const { return console_; } 48 49 private: 50 Console & console_; 51 }; 52 } 53 54 #endif 55 /* vim: set sw=3 ts=3: */ 56