text_scroll.hh 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. #ifndef TEXT_SCROLL_WIN
  9. #define TEXT_SCROLL_WIN
  10. #include "window/window.hh"
  11. #include "font/font.hh"
  12. class i4_graphical_style_class;
  13. class i4_text_scroll_window_class : public i4_parent_window_class
  14. {
  15. i4_color fore,back;
  16. i4_char *term_out, *draw_start;
  17. w32 term_size, used_size;
  18. sw32 dx, dy, tdx, tdy;
  19. sw32 term_height; // in characters
  20. w32 line_height;
  21. i4_bool need_clear;
  22. i4_graphical_style_class *style;
  23. public:
  24. char *name() { return "text_scroll_window"; }
  25. void resize(w16 new_width, w16 new_height);
  26. i4_text_scroll_window_class(i4_graphical_style_class *style,
  27. i4_color text_foreground,
  28. i4_color text_background,
  29. w16 width, w16 height); // in pixels
  30. void clear();
  31. void skip_first_line();
  32. void output_char(const i4_char &ch);
  33. void output_string(char *string);
  34. void printf(char *fmt, ...);
  35. void parent_draw(i4_draw_context_class &context);
  36. virtual i4_bool need_redraw();
  37. };
  38. #endif