Aggiunto il metodo TForm::mode() che ritorna il modo _background; cambiati
i metodi TForm::print e TForm::read() per settare il modo fincatura e gli offset. Cambiato il metodo TForm::set_mode(): ora inizializza anche la stampante. git-svn-id: svn://10.65.10.50/trunk@2416 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
c68f07cb7c
commit
951af4a11c
@ -3514,7 +3514,6 @@ bool TForm::print(long from, long to)
|
|||||||
|
|
||||||
pr.setheaderhandler(header_handler); // Setta handlers
|
pr.setheaderhandler(header_handler); // Setta handlers
|
||||||
pr.setfooterhandler(footer_handler);
|
pr.setfooterhandler(footer_handler);
|
||||||
pr.set_offset(_y,_x);
|
|
||||||
if (!pr.is_generic())
|
if (!pr.is_generic())
|
||||||
{
|
{
|
||||||
for (pagetype t = odd_page; t <= last_page; t = pagetype(t+1))
|
for (pagetype t = odd_page; t <= last_page; t = pagetype(t+1))
|
||||||
@ -3544,8 +3543,7 @@ bool TForm::print(long from, long to)
|
|||||||
{
|
{
|
||||||
pr.formlen(height(odd_page));
|
pr.formlen(height(odd_page));
|
||||||
}
|
}
|
||||||
const bool old_val = pr.isgraphics();
|
pr.set_offset(_y,_x);
|
||||||
pr.set_graphics(_background_mode == graphics ? TRUE : FALSE); // Set mode for finkatur & graphics
|
|
||||||
pr.set_char_size(_fontsize); // Set font name and size
|
pr.set_char_size(_fontsize); // Set font name and size
|
||||||
pr.set_fontname(_fontname); // according to current form
|
pr.set_fontname(_fontname); // according to current form
|
||||||
const bool was_open = pr.isopen();
|
const bool was_open = pr.isopen();
|
||||||
@ -3592,8 +3590,6 @@ bool TForm::print(long from, long to)
|
|||||||
|
|
||||||
pr.setheaderhandler(NULL);
|
pr.setheaderhandler(NULL);
|
||||||
pr.setfooterhandler(NULL);
|
pr.setfooterhandler(NULL);
|
||||||
pr.set_graphics(old_val); //Reset graphics mode to old value
|
|
||||||
pr.set_offset(0,0); //Reset global offsets of printer
|
|
||||||
|
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
@ -3884,6 +3880,9 @@ void TForm::read(const char* name, const char* code, int lev, const char* desc)
|
|||||||
if (_code.not_empty())
|
if (_code.not_empty())
|
||||||
read_profile(); // read from LF_RFORM file
|
read_profile(); // read from LF_RFORM file
|
||||||
|
|
||||||
|
printer().set_offset(_y,_x);
|
||||||
|
set_mode(_background_mode);
|
||||||
|
|
||||||
main_app().end_wait();
|
main_app().end_wait();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3893,6 +3892,12 @@ void TForm::set_fincatura(const char* s)
|
|||||||
printer().set_fincatura(_fink);
|
printer().set_fincatura(_fink);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TForm::set_mode(bkg_mode b)
|
||||||
|
{
|
||||||
|
_background_mode = b;
|
||||||
|
if (_background_mode == graphics && printer().is_generic()) _background_mode = testo;
|
||||||
|
printer().set_graphics(_background_mode == graphics ? TRUE : FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
TForm::TForm()
|
TForm::TForm()
|
||||||
{
|
{
|
||||||
|
@ -185,8 +185,8 @@ public:
|
|||||||
void set_last_page(bool lp) { _lastpage = lp; }
|
void set_last_page(bool lp) { _lastpage = lp; }
|
||||||
|
|
||||||
// Setta il modo di sfondo (fincatura)
|
// Setta il modo di sfondo (fincatura)
|
||||||
void set_mode(bkg_mode b) {_background_mode = b;}
|
void set_mode(bkg_mode b);
|
||||||
|
bkg_mode mode() { return _background_mode;}
|
||||||
// if code == NULL it's a base form
|
// if code == NULL it's a base form
|
||||||
// otherwise it's integrated by a file definition
|
// otherwise it's integrated by a file definition
|
||||||
TForm();
|
TForm();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user