51 lines
1.1 KiB
C++
Executable File
51 lines
1.1 KiB
C++
Executable File
#ifndef __PRINTWIN_H
|
|
#define __PRINTWIN_H
|
|
|
|
#ifndef __WINDOW_H
|
|
#include <window.h>
|
|
#endif
|
|
|
|
#ifndef __ARRAY_H
|
|
#include <array.h>
|
|
#endif
|
|
|
|
#ifndef __TEXT_H
|
|
#include <text.h>
|
|
#endif
|
|
|
|
class TPrintwin : public TWindow
|
|
{
|
|
|
|
bool _aborted;
|
|
bool _isbackground;
|
|
PRINT_RCD* _printrcd;
|
|
int _formlen;
|
|
int _formwidth;
|
|
TArray* _bg;
|
|
TTextfile& _txt;
|
|
|
|
int _lead, _ascent, _descent;
|
|
int _hofs, _vofs;
|
|
int _charx, _chary;
|
|
int _char_size;
|
|
|
|
void paint_background(long j);
|
|
void paint_row(long j);
|
|
bool print_band(int, RCT&);
|
|
|
|
public:
|
|
|
|
// check if aborted; also returned by do_print
|
|
bool aborted() { return _aborted; }
|
|
// inhibits background printing
|
|
void print_background(bool b) { _isbackground = b; }
|
|
// starts printing; FALSE if aborted
|
|
bool do_print();
|
|
|
|
TPrintwin(PRINT_RCD* pr, TTextfile& txt, int chsize = 12);
|
|
virtual ~TPrintwin();
|
|
};
|
|
|
|
|
|
#endif
|