Newer
Older
SLC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
SLC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with SLC; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#ifndef SCREEN_HH
# define SCREEN_HH_
# include <ncurses.h>
typedef std::stringstream sstream;
void msg_println(const string &s);
void msg_println(int i);
void msg_add(const string &s);
void msg_load(const string &filename);
void msg_save(const string &filename) const;
const string &msg_get(size_t i) const;
size_t msg_size() const;
bool add_char(char c, char *string, ssize_t offset, size_t buf_len);
bool del_char(char *string, ssize_t offset, size_t buf_len);
sstream msg_buffer_;
char *msg_win_buffer_;
char cmd_buffer_[MAX_LINE_SIZE];
char cmd_history_buffer_[MAX_LINE_SIZE];
size_t cmd_buf_off_;
size_t cmd_win_off_;
Screen &operator<< (Screen &, const string &s);
Screen &operator<< (Screen &, int i);
// exec commands
namespace cmd {
void exec(const char *);
void login();
void logout();
void user(const char *);
void pass(const char *);
void help();
}