Aggiunto metodo section che accetta il page_type come una volta: era stato
sostituito da quello che accetta un numero di pagina git-svn-id: svn://10.65.10.50/trunk@2284 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
c064e2eba5
commit
506e99c7d1
@ -2245,20 +2245,26 @@ TForm_item& TForm::find_field(char s, pagetype t, short id) const
|
|||||||
return ps->find_field(id);
|
return ps->find_field(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
TPrint_section& TForm::section(char s, word p)
|
TPrint_section& TForm::section(char s, pagetype pos)
|
||||||
{
|
{
|
||||||
pagetype pos = odd_page;
|
|
||||||
// It was p==0
|
|
||||||
if (p == 3 && exist(s, last_page)) pos = last_page;
|
|
||||||
// It was p==1
|
|
||||||
if (p == 2 && exist(s, first_page)) pos = first_page;
|
|
||||||
// It was pos == odd_page && (p & 0x1) == 0
|
|
||||||
if (p == 1 && exist(s, even_page)) pos = even_page;
|
|
||||||
|
|
||||||
TPrint_section* sec = exist(s, pos, TRUE);
|
TPrint_section* sec = exist(s, pos, TRUE);
|
||||||
return *sec;
|
return *sec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TPrint_section& TForm::section(char s, word pagenum)
|
||||||
|
{
|
||||||
|
pagetype pt = odd_page;
|
||||||
|
if (pagenum == 0 && exist(s, last_page))
|
||||||
|
pt = last_page;
|
||||||
|
if (pagenum == 1 && exist(s, first_page))
|
||||||
|
pt = first_page;
|
||||||
|
if (pt == odd_page && (pagenum & 0x1) == 0 && exist(s, even_page))
|
||||||
|
pt = even_page;
|
||||||
|
|
||||||
|
return section(s, pt);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ===========================================
|
// ===========================================
|
||||||
// TForm
|
// TForm
|
||||||
// ===========================================
|
// ===========================================
|
||||||
|
@ -135,11 +135,13 @@ class TForm : public TObject
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void init(); // inizializza il form
|
void init(); // inizializza il form
|
||||||
void read(const char* form, const char * code = "", int editlevel = 0, const char* desc = ""); // carica il form dal file specificato
|
void read(const char* form, const char* code = "", int editlevel = 0, const char* desc = ""); // carica il form dal file specificato
|
||||||
|
|
||||||
// H = Header, B = Body, F = Footer, R = Relation
|
// H = Header, B = Body, F = Footer, R = Relation
|
||||||
TPrint_section& section(char s = 'B', word page = 1);
|
TPrint_section& section(char s, pagetype pos); // La crea se non esiste
|
||||||
word height(word page = 1); // Height of first page
|
TPrint_section& section(char s, word page = 3); // La crea se non esiste (3 e' una pagina dispari qualsiasi)
|
||||||
|
|
||||||
|
word height(word page = 1); // Height of a page (the first by default)
|
||||||
|
|
||||||
void print_section(ostream& out, char s) const;
|
void print_section(ostream& out, char s) const;
|
||||||
virtual void print_on(ostream& out) const;
|
virtual void print_on(ostream& out) const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user