guy fb30854f4c Corretta gestione messaggi
git-svn-id: svn://10.65.10.50/trunk@769 c028cbd2-c16b-5b4b-a496-9718f37d4682
1994-12-15 18:06:43 +00:00

81 lines
1.5 KiB
C++
Executable File

#ifndef __FORM_H
#define __FORM_H
#ifndef __PRINTER_H
#include <printer.h>
#endif
#ifndef __RELATION_H
class TRelation;
class TCursor;
#endif
#ifndef __SCANNER_H
#include <scanner.h>
#endif
class TForm;
class TForm_item;
class TPrint_section : public TArray
{
TString16 _name; // Nome della sezione di stampa
int _height; // Altezza della sezione
TForm* _form; // Form cui appartiene alla sezione
TArray _item; // Lista dei campi da stampare
protected:
virtual void print_on(ostream& out) const;
TForm_item* parse_item(TScanner& scanner);
public:
TPrintrow& row(int num);
TForm* form() const { return _form; }
TForm_item& item(int n) const { return (TForm_item&)_item[n]; }
int items() const { return _item.items(); }
bool update();
bool parse(TScanner& scanner);
bool edit(int mode);
TPrint_section(const char* name = "", TForm* form = NULL);
void init(const char* name, TForm* form);
};
class TForm : public TObject
{
TFilename _name;
TRelation* _relation;
TCursor* _cursor;
TPrint_section _head;
TPrint_section _body;
TPrint_section _foot;
protected:
virtual void print_on(ostream& out) const;
bool parse_use(TScanner&);
bool parse_join(TScanner&);
bool set_header();
bool set_footer();
public:
bool print(long from = 0L, long to = -1L);
TRelation* relation() const { return _relation; }
TCursor* cursor() const { return _cursor; }
bool edit(int mode, int section = 1);
TForm(const char* form);
~TForm();
};
#endif