source: abuse/trunk/src/include/console.hpp @ 39

Last change on this file since 39 was 39, checked in by Sam Hocevar, 15 years ago
  • Fix almost 2,000 warnings by using proper "const" keywords where needed.
File size: 1.1 KB
Line 
1#ifndef __CONSOLE_HPP_
2#define __CONSOLE_HPP_
3#include "jwindow.hpp"
4
5class console
6{
7  protected :
8  int lastx,lasty,w,h,cx,cy;
9  JCFont *fnt;
10  char *screen;
11  jwindow *con_win;
12  window_manager *wm;
13  char *name;
14  public :
15
16  console(window_manager *WM, JCFont *font, int width, int height, char const *Name);
17  int showing() { return con_win!=NULL; }
18  void show();
19  void hide();
20  void redraw();
21  void put_char(char ch);
22  void do_cr();
23  int screen_w() { return w*fnt->width(); }
24  int screen_h() { return h*fnt->height(); }
25  int wx() { return con_win->x1(); }
26  int wy() { return con_win->y1(); }
27  void draw_cursor();
28  void put_string(char const *st);
29  void draw_char(int x, int y, char ch);
30  void toggle() { if (con_win) hide(); else show(); }
31  void print_f(char const *format, ...);
32  ~console();
33} ;
34
35class shell_term : public console
36{
37  char shcmd[300];
38  public :
39  shell_term(window_manager *WM, JCFont *font, int width, int height, char const *Name);
40  virtual ~shell_term() {};
41  int handle_event(event &ev, window_manager *wm);
42  virtual void prompt();
43  virtual void execute(char const *st);
44} ;
45
46#endif
Note: See TracBrowser for help on using the repository browser.