Correzione MI3381. Tolti i metodi get_mode() e mode() di TForm; al loro
posto vi e' ora get_fink_mode() e set_fink_mode() per settare il tipo di fincatura sulla stampante. git-svn-id: svn://10.65.10.50/trunk@4722 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
ac65216e6a
commit
94eb35ae2b
@ -4891,8 +4891,8 @@ void TForm::init()
|
||||
_fpx= 0;
|
||||
_arrange= TRUE;
|
||||
set_fincatura("+++++++++-|");
|
||||
set_fink_mode(TRUE);
|
||||
_dirty= FALSE;
|
||||
_background_mode = printer().isgraphics() ? graphics : testo;
|
||||
_msg_add_enabled = TRUE;
|
||||
}
|
||||
|
||||
@ -4994,7 +4994,7 @@ void TForm::read(
|
||||
pr.set_offset(_y,_x);
|
||||
pr.set_char_size(_fontsize);
|
||||
pr.set_fontname(_fontname);
|
||||
set_mode(_background_mode);
|
||||
set_fink_mode(TRUE);
|
||||
|
||||
main_app().end_wait();
|
||||
}
|
||||
@ -5067,13 +5067,15 @@ void TForm::set_fincatura(const char* s)
|
||||
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);
|
||||
void TForm::set_fink_mode(bool f)
|
||||
{
|
||||
printer().set_fink_mode(f);
|
||||
}
|
||||
|
||||
bool TForm::get_fink_mode()
|
||||
{
|
||||
return printer().get_fink_mode();
|
||||
}
|
||||
|
||||
// @cmember Indica se ignorare il prossimo skip del ciclo sul file
|
||||
void TForm::match_result(int file,int val)
|
||||
|
142
include/form.h
142
include/form.h
@ -20,10 +20,6 @@ class TRectype;
|
||||
|
||||
#ifndef __RELATION_H
|
||||
#include <relation.h>
|
||||
/*class TRelation;
|
||||
class TRelation_description;
|
||||
class TCursor;
|
||||
class TSorted_cursor;*/
|
||||
#endif
|
||||
|
||||
#ifndef __ASSOC_H
|
||||
@ -45,12 +41,6 @@ enum pagetype {
|
||||
|
||||
// @doc INTERNAL
|
||||
|
||||
// @enum bkg_mode | Tipo di background presente nella stampa
|
||||
enum bkg_mode {
|
||||
none, // @emem Nessuno sfondo
|
||||
testo, // @emem Sfondo di tipo testo
|
||||
graphics } ; // @emem Sfondo grafico
|
||||
|
||||
pagetype char2page(char);
|
||||
|
||||
class TForm;
|
||||
@ -82,9 +72,6 @@ class TForm : public TObject
|
||||
|
||||
// @access:(INTERNAL) Private Member
|
||||
|
||||
// @cmember:(INTERNAL) Tipo di sfondo da applicare alla stampa (vedi <t bkg_mode>)
|
||||
bkg_mode _background_mode;
|
||||
|
||||
// @cmember:(INTERNAL) Nome del profilo di stampa
|
||||
TString _name;
|
||||
// @cmember:(INTERNAL) Codice del profilo di stampa
|
||||
@ -261,13 +248,13 @@ public:
|
||||
bool print(long from = 0L, long to = -1L);
|
||||
|
||||
// @cmember Memorizza il risultato dell'ultimo match (val==-1: resetta) su <p file>
|
||||
void match_result(int file=0, int val=-1);
|
||||
void match_result(int file=0, int val=-1);
|
||||
// @cmember Indica se l'ultimo next_match su <p file> è stato fruttuoso
|
||||
bool last_match_result(int file=0);
|
||||
bool last_match_result(int file=0);
|
||||
// @cmember Indica se è già stato fatto un next_match su <p file>
|
||||
bool next_match_done(int file=0);
|
||||
bool next_match_done(int file=0);
|
||||
// @cmember Indica se è già stato fatto un next_match su <p file>
|
||||
int matches_done(int file=0);
|
||||
int matches_done(int file=0);
|
||||
|
||||
// @cmember Ritorna l'altezza della pagina <p page> la prima di default
|
||||
word height(word page = 3);
|
||||
@ -368,20 +355,19 @@ public:
|
||||
|
||||
// @cmember Setta lil numero di pagina iniziale
|
||||
void set_from_page(word p)
|
||||
{_frompage=p;}
|
||||
{_frompage=p;}
|
||||
// @cmember Setta lil numero di pagina finale
|
||||
void set_to_page(word p)
|
||||
{_topage=p;}
|
||||
{_topage=p;}
|
||||
|
||||
// @cmember Setta l'inizio di stampa dell'ultima pagina
|
||||
void set_last_page(bool lp)
|
||||
{ _lastpage = lp; }
|
||||
|
||||
// @cmember Setta il modo di sfondo (fincatura)
|
||||
void set_mode(bkg_mode b);
|
||||
void set_fink_mode(bool f);
|
||||
// @cmember Ritorna il modo di sfondo (fincatura)
|
||||
bkg_mode mode()
|
||||
{ return _background_mode;}
|
||||
bool get_fink_mode();
|
||||
|
||||
// @cmember Costruttore
|
||||
TForm();
|
||||
@ -573,7 +559,7 @@ public:
|
||||
TForm_subsection * subsection_above() const ;
|
||||
|
||||
// @cmember ricompone le espressioni di FILE GROUP delle sottosezioni contenute
|
||||
void set_subs_cond(int file,const char *newcond,const char * oldcond);
|
||||
void set_subs_cond(int file,const char *newcond,const char * oldcond);
|
||||
// @cmember Valuta l'espressione passata risolvendo le variabili
|
||||
TExpression & eval_expr(TExpression & e, int def_file=0);
|
||||
|
||||
@ -656,7 +642,7 @@ public:
|
||||
// @cmember Annulla (setta a -1) l'offset delle colonne se COLUMNWISE
|
||||
void reset_tabs();
|
||||
|
||||
// @cmember Operatore di assegnamento
|
||||
// @cmember Operatore di assegnamento
|
||||
const TPrint_section& operator=(const TPrint_section& ps)
|
||||
{ return copy(ps); }
|
||||
// @cmember Costruttore
|
||||
@ -751,7 +737,7 @@ protected:
|
||||
|
||||
// @cmember manda il messaggio a tutti i campi appartenenti al gruppo inidcato
|
||||
// (funzione ricorsiva chiamata da <mf TForm_item::do_message>)
|
||||
void send_message_to_group(const char * cmd,byte id,const TPrint_section & section, const TPrint_section *starting_section) ;
|
||||
void send_message_to_group(const char * cmd,byte id,const TPrint_section & section, const TPrint_section *starting_section) ;
|
||||
|
||||
// @access Public Member
|
||||
public:
|
||||
@ -975,91 +961,91 @@ public:
|
||||
|
||||
class TForm_subsection : public TForm_item
|
||||
{
|
||||
TPrint_section _ssec; // sezione di stampa contenente il "corpo" della sottosezione
|
||||
TString _name;
|
||||
TPrint_section _ssec; // sezione di stampa contenente il "corpo" della sottosezione
|
||||
TString _name;
|
||||
|
||||
bool _bigskip; // indicatore di bigskip sui raggruppamenti (salta di gruppo in gruppo)
|
||||
int _file_id; // ID del file su cui iterare in stampa se previsto
|
||||
bool _bigskip; // indicatore di bigskip sui raggruppamenti (salta di gruppo in gruppo)
|
||||
int _file_id; // ID del file su cui iterare in stampa se previsto
|
||||
TExpression * _condexpr; // espressione condizionale per la valutazione della sottosezione
|
||||
// o per individuare il raggruppamento nel file
|
||||
// o per individuare il raggruppamento nel file
|
||||
protected:
|
||||
virtual void print_on(ostream& out) const;
|
||||
TForm_subsection * upper_conditional() const ;
|
||||
virtual void print_on(ostream& out) const;
|
||||
TForm_subsection * upper_conditional() const ;
|
||||
public:
|
||||
virtual TObject* dup() const;
|
||||
virtual bool parse(TScanner& s);
|
||||
virtual bool update();
|
||||
virtual bool edit(TMask& m);
|
||||
virtual TObject* dup() const;
|
||||
virtual bool parse(TScanner& s);
|
||||
virtual bool update();
|
||||
virtual bool edit(TMask& m);
|
||||
|
||||
virtual const char* class_name() const { return "SEZIONE"; }
|
||||
virtual const char* class_name() const { return "SEZIONE"; }
|
||||
|
||||
TPrint_section& subsection() { return _ssec; }
|
||||
TPrint_section& subsection() { return _ssec; }
|
||||
|
||||
|
||||
// @cmember Ritorna se la sezione è da stampare a inizio di pagina nuova
|
||||
bool atnewpage() {return _flag.newpage;}
|
||||
// virtual void show(bool on = TRUE);
|
||||
// virtual void enable(bool on = TRUE);
|
||||
void hide() { show(FALSE); }
|
||||
void disable() { enable(FALSE); }
|
||||
bool atnewpage() {return _flag.newpage;}
|
||||
// virtual void show(bool on = TRUE);
|
||||
// virtual void enable(bool on = TRUE);
|
||||
void hide() { show(FALSE); }
|
||||
void disable() { enable(FALSE); }
|
||||
|
||||
// @cmember Ritorna il nome della sezione
|
||||
void name(const char* s) { _name = s; _desc << "Sottosezione " << s; }
|
||||
const char* name() const { return _name; }
|
||||
void name(const char* s) { _name = s; _desc << "Sottosezione " << s; }
|
||||
const char* name() const { return _name; }
|
||||
// @cmember Aggiorna e stampa tutti i campi della sezione e delle sezioni contenute
|
||||
bool set_body(bool showfields=TRUE);
|
||||
bool set_body(bool showfields=TRUE);
|
||||
// @cmember restituisce la condizione della sottosezione
|
||||
const char * condition();
|
||||
const char * condition();
|
||||
// @cmember restituisce il numero del file associato alla sottosezione
|
||||
int fileid();
|
||||
int fileid();
|
||||
// @cmember imposta la condizione della sottosezione
|
||||
void setcondition(const char * cond,TTypeexp type=_numexpr);
|
||||
void setcondition(const char * cond,TTypeexp type=_numexpr);
|
||||
// @cmember Costruttore
|
||||
TForm_subsection(TPrint_section* above_section, const char* name = "");
|
||||
virtual ~TForm_subsection();
|
||||
TForm_subsection(TPrint_section* above_section, const char* name = "");
|
||||
virtual ~TForm_subsection();
|
||||
};
|
||||
|
||||
class TForm_string : public TForm_item
|
||||
{
|
||||
TString _str, _picture;
|
||||
TArray _field;
|
||||
TToken_string _memo;
|
||||
TString _str, _picture;
|
||||
TArray _field;
|
||||
TToken_string _memo;
|
||||
|
||||
protected:
|
||||
virtual const char* class_name() const { return "STRINGA"; }
|
||||
virtual void print_body(ostream& out) const;
|
||||
virtual const char* class_name() const { return "STRINGA"; }
|
||||
virtual void print_body(ostream& out) const;
|
||||
|
||||
virtual void print_on(TMask& m);
|
||||
virtual void read_from(const TMask& m);
|
||||
virtual void print_on(TMask& m);
|
||||
virtual void read_from(const TMask& m);
|
||||
|
||||
virtual bool read_from(const TRectype& rform);
|
||||
virtual void print_on(TRectype& rform);
|
||||
virtual bool read_from(const TRectype& rform);
|
||||
virtual void print_on(TRectype& rform);
|
||||
|
||||
virtual void print_on(TToken_string& row);
|
||||
virtual void print_on(TToken_string& row);
|
||||
|
||||
virtual bool parse_item(TScanner&);
|
||||
virtual bool read();
|
||||
virtual bool update();
|
||||
virtual const char* example() const;
|
||||
virtual void apply_format(TString & s, const TString & p) const;
|
||||
virtual bool parse_item(TScanner&);
|
||||
virtual bool read();
|
||||
virtual bool update();
|
||||
virtual const char* example() const;
|
||||
virtual void apply_format(TString & s, const TString & p) const;
|
||||
|
||||
virtual TToken_string& memo_info() { return _memo; }
|
||||
virtual TToken_string& memo_info() { return _memo; }
|
||||
|
||||
virtual const char* get() const;
|
||||
bool set(const char*);
|
||||
virtual const char* get() const;
|
||||
bool set(const char*);
|
||||
|
||||
TFieldref& field(int i) const { return (TFieldref&)_field[i]; }
|
||||
TFieldref& field(int i) const { return (TFieldref&)_field[i]; }
|
||||
|
||||
public:
|
||||
virtual TObject* dup() const;
|
||||
virtual const int fields() { return _field.items();}
|
||||
virtual const TString& picture() const { return _picture; }
|
||||
virtual void set_picture(const char* p) { _picture = p; }
|
||||
virtual void put_paragraph(const char* s);
|
||||
virtual TObject* dup() const;
|
||||
virtual const int fields() { return _field.items();}
|
||||
virtual const TString& picture() const { return _picture; }
|
||||
virtual void set_picture(const char* p) { _picture = p; }
|
||||
virtual void put_paragraph(const char* s);
|
||||
|
||||
virtual bool edit(TMask& m);
|
||||
TForm_string(TPrint_section* section);
|
||||
virtual ~TForm_string() {}
|
||||
virtual bool edit(TMask& m);
|
||||
TForm_string(TPrint_section* section);
|
||||
virtual ~TForm_string() {}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user