source: golgotha/src/i4/gui/text_scroll.hh @ 608

Last change on this file since 608 was 80, checked in by Sam Hocevar, 15 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
File size: 1.5 KB
Line 
1/********************************************************************** <BR>
2  This file is part of Crack dot Com's free source code release of
3  Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
4  information about compiling & licensing issues visit this URL</a>
5  <PRE> If that doesn't help, contact Jonathan Clark at
6  golgotha_source@usa.net (Subject should have "GOLG" in it)
7***********************************************************************/
8
9#ifndef TEXT_SCROLL_WIN
10#define TEXT_SCROLL_WIN
11
12#include "window/window.hh"
13#include "font/font.hh"
14class i4_graphical_style_class;
15
16class i4_text_scroll_window_class : public i4_parent_window_class
17{
18  i4_color fore,back;
19  i4_char *term_out, *draw_start;
20  w32 term_size, used_size;
21  sw32 dx, dy, tdx, tdy;
22
23  sw32 term_height;    // in characters
24  w32 line_height;
25  i4_bool need_clear;
26  i4_graphical_style_class *style;
27
28public:
29  char *name() { return "text_scroll_window"; }
30
31  void resize(w16 new_width, w16 new_height);
32
33  i4_text_scroll_window_class(i4_graphical_style_class *style,
34                              i4_color text_foreground,
35                              i4_color text_background,
36                              w16 width, w16 height);               // in pixels
37
38  void clear();
39  void skip_first_line();
40
41  void output_char(const i4_char &ch);
42  void output_string(char *string);
43  void printf(char *fmt, ...);
44
45  void parent_draw(i4_draw_context_class &context);
46
47  virtual i4_bool need_redraw();
48
49};
50
51
52
53#endif
Note: See TracBrowser for help on using the repository browser.