/* Cfour (C++ Common Console Classes)
* Copyright (C) 2001 Jeffrey Bakker
*
* This program 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; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*
* Author: Jeffrey Bakker
* Filename: cfconsole.h
* File version: 1.1.1
*
* ===========================================================================
*
* Created on: June 26th, 2001
*
* Modified on November 8th, 2001
* - added 3 methods for making CHUI menus
*
* ===========================================================================
*
* Remark:
*
* This is the class defintion for Console, a class which provides methods
* for commonly used screen operations. All the methods in this class are
* static, so there is no need to create a Console object to use them.
*
* They were originally made because system("CLS") and system("PAUSE") would
* only work in DOS. This class provides platform independent console output
* methods for ease of portability.
*
* ===========================================================================
* _______. ..
*/
#ifndef _C4_ONSOLE_H
#define _C4_ONSOLE_H
#define newline (cout << endl)
#define BELL (cout << "\a")
#define TAB (cout << "\t")
#define CR (cout << "\r")
#include <iostream>
#include <string>
#include <vector>
using namespace std;
class CFconsole {
// methods -------------------------------------------------------------------
public:
void static clear();
void static pause();
void static pause_quiet();
void static auto__pause(int scroll);
void static auto__pause_quiet(int scroll);
void static title(string t);
char static ask(string question);
char static make_menu(vector<string> &ops);
char static make_menu(vector<string> &ops, vector<char> &key);
void static draw_a_line(char c, int length);
void static draw_a_file(string filename);
//----------------------------------------------------------------------------
};
#endif // _C4_ONSOLE_H
| w | e | b | c | p | p |
|
| |||||