1994-09-13 16:43:52 +00:00
|
|
|
#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
|
|
|
|
|
1995-10-13 09:23:08 +00:00
|
|
|
// Implementazione di una finestra XVT per la stampa: scrivendoci su tutto l'output
|
|
|
|
// va sulla stampante corrente. Usata direttamente da TPrinter.
|
|
|
|
|
1994-09-13 16:43:52 +00:00
|
|
|
class TPrintwin : public TWindow
|
|
|
|
{
|
1995-10-13 09:23:08 +00:00
|
|
|
bool _aborted; // stampa abortita
|
|
|
|
PRINT_RCD* _printrcd; // record di stampa XVT
|
|
|
|
int _formlen; // indovina
|
|
|
|
int _formwidth; // indovina
|
|
|
|
TArray* _bg; // l'intero background della pagina (vedi TPrintapp)
|
|
|
|
TTextfile& _txt; // il TText da stampare
|
1994-09-13 16:43:52 +00:00
|
|
|
|
1995-10-13 09:23:08 +00:00
|
|
|
TArray _images; // bitmaps da stampare sotto al testo
|
1995-03-22 09:07:04 +00:00
|
|
|
|
1995-10-13 09:23:08 +00:00
|
|
|
// un'orrenda quantita' di dettagli relativi ai font e alle loro dimensioni
|
1994-09-13 16:43:52 +00:00
|
|
|
int _lead, _ascent, _descent;
|
|
|
|
int _hofs, _vofs;
|
1994-11-03 09:03:14 +00:00
|
|
|
int _chary;
|
1994-09-13 16:43:52 +00:00
|
|
|
int _char_size;
|
1995-10-13 09:23:08 +00:00
|
|
|
// tutto ok per stampare
|
1994-11-03 09:03:14 +00:00
|
|
|
bool _inited;
|
1994-09-13 16:43:52 +00:00
|
|
|
|
1995-10-13 09:23:08 +00:00
|
|
|
// pitta lo sfondo della riga j
|
|
|
|
void paint_background(long j);
|
|
|
|
// pitta la riga j
|
|
|
|
void paint_row(long j);
|
|
|
|
// pitta la fetta di finestra che XVT gli lascia pittare per la pagina data
|
|
|
|
// (dipende dal driver, ma di solito pitta l'intera pagina)
|
|
|
|
bool print_band(int page, RCT&);
|
1994-09-13 16:43:52 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
// check if aborted; also returned by do_print
|
|
|
|
bool aborted() const { return _aborted; }
|
|
|
|
|
1995-10-13 09:23:08 +00:00
|
|
|
// starts printing; FALSE if aborted; when possible starts concurrent thread
|
|
|
|
// (not possible in WIN 3.1)
|
1994-09-13 16:43:52 +00:00
|
|
|
bool do_print();
|
|
|
|
|
1995-03-22 09:07:04 +00:00
|
|
|
TPrintwin(TTextfile& txt);
|
1994-09-13 16:43:52 +00:00
|
|
|
virtual ~TPrintwin();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|