Calendari & ...

Almanac.h

//----------------------------------------------------------------------
//   Project ................: pdfAlmanac.bpr
//   Version ................: 1.2.0
//   Author .................: G.Ciaccio
//   Email ..................: ciacciogi@infinito.it
//   Created ................: 22-11-2003
//   Development Tool .......: C++ Builder 6.0
//   Environment ............: Windows 98
//   Copyright ..............: 2002-2003
//----------------------------------------------------------------------
//   DISCLAIMER:
//   This software is provided 'as-is', without any express or
//   implied warranty.  In no event will the author be held liable
//   for any damages arising from the use of this software.
//----------------------------------------------------------------------
//   PURPOSE:
//   pdfAlmanac.exe produce different calendars in PDF format for any year
//   in the range 1583-2299
//----------------------------------------------------------------------
#ifndef AlmanacH
#define AlmanacH
//---------------------------------------------------------------------------
#include "names.h"
#include <Dialogs.hpp>
#include "Graphics.hpp"
#include "clibpdf\cpdflib.h"  //ClibPDF library by www.fastio.com
//---------------------------------------------------------------------------
struct dayinfo{
int mese;       //month number (1-12)
int mday;       //day number   (1-31)
int wday;       //week number  (1-7 , monday=1)
char chday;     //first character of the week day name (L M M G V S D)
char chmoon;    //lunation character ('>' '<')
int festflag;   //festflag !=0 if the day is an holiday
//festflag:  0=working day   1=sunday   2=fixed holiday  3=easter monday
char nameday[24];  //name joined to the day (first name or holiday name)
};
//---------------------------------------------------------------------------
class Almanac{
public:
int ngold;         //gold number
int epatta;        //age of the moon at 1 January
int anno;          //calendar year
int nday;          //year days (365 or 366)
int firstday;      //first day of the year (Monday=1,Tuesday=2,...,Sunday=7)
int psqday;        //easter day number starting at 1 January
int psqgauss;      //easter day number starting at 1 March
int mese;          //month number (January=1,February=2,...,December=12)
static int xfont;
static int xcalendartype;
static int xdaynames;
static int xmarkedfestivity;
static int xbannercolor;
static int xlanguage;
static int bold;          //0=No 1=Yes
static int autostart;     //0=No 1=Yes
static int language;      //0=Italian Help  1=English Help
int bstile;               //1 for leap year, 0 otherwise
static TColor mesecolor;  //month name color
static TColor bandcolor;  //banner color
TSaveDialog *psavedlg;
dayinfo xday[367];         //structure for calendar data
Almanac(int year);
~Almanac(){};
void reset(int anno);
int infoyear(int anno);
bool isleapyear(int anno);
void showparam();
int maxwname(CPDFdoc *pdf,int day1,int day2);
void loadnames(int bstile,int psqday);
void setweekdaynames(int bstile);
void setmesi(int bstile);
void setgiorni(int bstile);
void setweekchar(int bstile,int wday1gen);
void setfixedholidays(int bstile);
void setmoon(int anno,int bstile);
void setafterpsq(int psq);
int gauss(int anno,int bstile);
static int gauss(int anno);
void gopdfalmanac();
void gopdfalmanac(AnsiString astrdir);
void goboxpdfalmanac();
void goboxpdfalmanac(AnsiString astrdir);
void makepdfpage(CPDFdoc *pdf,int jmese);
void makeboxpdfpage(CPDFdoc *pdf,int jmese);
void pdfsetfont(CPDFdoc *pdf,int fontsize);
float mmtotpoint(float mm);
};
//---------------------------------------------------------------------------
#endif



Per quanto si sia fatto il possibile non si puo' garantire che il prodotto (intendendo per tale qualunque file incluso nel pacchetto di installazione e non soltanto il file eseguibile) sia esente da errori e quindi si demanda agli utenti il compito di trovare conferma per altra via sia dei risultati ottenuti con l'uso del programma che di qualunque indicazione rilevabile dai file annessi al prodotto rigettando questo e qualunque altro tipo di responsabilita' per qualsiasi tipo di danno correlabile con l'uso del prodotto. Chi non accetta la sopracitata clausola di esclusione di responsabilita' non deve usare il prodotto.