box pager_rep::pages_make_page (pagelet pg) { box sb= pages_format (pg); box lb= move_box (ip, sb, 0, 0); int nr= N(pages) + 1 + page_offset; SI left= (nr&1)==0? even: odd; env->write (PAGE_NR, as_string (nr)); env->write (PAGE_THE_PAGE, style[PAGE_THE_PAGE]); tree page_t= env->exec (compound (PAGE_THE_PAGE)); bool empty= N (pg->ins) == 0; box header= make_header (empty); box footer= make_footer (empty); brush bgc = make_background (empty); adjust_margins (empty); return page_box (ip, lb, page_t, nr, bgc, width, height, left, top + dtop, top + dtop + text_height, header, footer, head_sep, foot_sep); }
void Faktura::drukuj() { /* * First creats a new file on a disk space. * Next formats starting tekst and adds it to file. * Next print customer and items to file. * Nest print final text. */ parametry->set_printed(true); string nazwa_pliku_str = "faktura" + parametry->get_nr_faktury(); const char * cons_plik = nazwa_pliku_str.c_str(); ofstream plik_wynikowy(cons_plik); plik_wynikowy<<parametry->print_to_string(); plik_wynikowy<<osoba->print_to_string(); plik_wynikowy<<pozycje->print_to_string(); plik_wynikowy<<make_footer(); cout<<"Faktura wydrukowana, jest juz w Twoim folderze!"<<endl; cout<<"(Nazwa pliku: "<<cons_plik<<")"<<"\n"<<"\n"; }