Patch level : 2.2 84
Files correlati : ci0.exe Ricompilazione Demo : [ ] Commento : Modulo contabilità industriale : finiti ritocchi al disegno etc Si dia inizio alle danze git-svn-id: svn://10.65.10.50/trunk@13008 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
dfd332e024
commit
d87aed9b33
129
ci/ci0400.cpp
129
ci/ci0400.cpp
@ -22,71 +22,70 @@
|
||||
|
||||
void TImmissioneDocumenti_app::init_tabs()
|
||||
{
|
||||
TImmissioneDocumenti_mask & m = mask();
|
||||
TToken_string pagenames;
|
||||
const short id = F_AL01;
|
||||
int item = 0;
|
||||
int items = 0;
|
||||
|
||||
_filters.destroy();
|
||||
m.filters().destroy();
|
||||
m.ordered().reset();
|
||||
|
||||
pagenames = "";
|
||||
|
||||
TConfig configfile("ci0400.ini");
|
||||
configfile.set_paragraph("Main");
|
||||
|
||||
while (configfile.exist("Descr",item))
|
||||
while (configfile.exist("Descr",items))
|
||||
{
|
||||
pagenames.add(configfile.get("Descr","Main",item));
|
||||
_filters.add(configfile.get("Filter","Main",item));
|
||||
_mask->activate_almanac(id + item, item, TDate(TODAY));
|
||||
_mask->almanac(item).set_padding(0);
|
||||
item++;
|
||||
pagenames.add(configfile.get("Descr","Main",items));
|
||||
m.filters().add(configfile.get("Filter","Main",items));
|
||||
m.activate_almanac(id + items, items, TDate(TODAY));
|
||||
items++;
|
||||
}
|
||||
|
||||
if (item>0)
|
||||
if (items > 0)
|
||||
{
|
||||
_mask->set_caption(pagenames);
|
||||
_mask->disable_page(item);
|
||||
m.set_caption(pagenames);
|
||||
m.disable_page(items);
|
||||
}
|
||||
}
|
||||
|
||||
void TImmissioneDocumenti_app::init_flags()
|
||||
{
|
||||
int filters;
|
||||
int items;
|
||||
TImmissioneDocumenti_mask & m = mask();
|
||||
const int items = m.filters().items();
|
||||
TDate currdate;
|
||||
TDate currstart;
|
||||
TString filter;
|
||||
|
||||
filters = _filters.items();
|
||||
_ordered.reset();
|
||||
m.ordered().reset();
|
||||
|
||||
for(int i=0;i<filters;i++)
|
||||
for(int i = 0; i < items; i++)
|
||||
{
|
||||
filter = "";
|
||||
filter << "(ANNO==\"" << _year << "\")";
|
||||
filter << "&&";
|
||||
filter << "(CODNUM==\"" << _filters.row(i) << "\")";
|
||||
TString filter;
|
||||
|
||||
TCodice_numerazione c(_filters.row(i));
|
||||
filter << "(ANNO==\"" << _year << "\")" << "&&" << "(CODNUM==\"" << m.filters().row(i) << "\")";
|
||||
|
||||
TRelation relation(LF_DOC);
|
||||
TSorted_cursor cursor(&relation, "DATADOC", filter);
|
||||
|
||||
TCodice_numerazione c(m.filters().row(i));
|
||||
|
||||
if (!c.dont_test_datadoc())
|
||||
_ordered.set(i);
|
||||
m.ordered().set(i);
|
||||
|
||||
TRelation relation(LF_DOC);
|
||||
TSorted_cursor cursor(&relation, "DATADOC", filter);
|
||||
const int items = cursor.items();
|
||||
|
||||
items = cursor.items();
|
||||
|
||||
if (_flags.items()>i)
|
||||
((TBit_array&)_flags[i]).reset();
|
||||
if (m.flags().items()>i)
|
||||
((TBit_array&) m.flags()[i]).reset();
|
||||
else
|
||||
_flags.add(new TBit_array(366),i);
|
||||
m.flags().add(new TBit_array(366),i);
|
||||
|
||||
for (cursor=0;cursor.pos()<items;++cursor)
|
||||
{
|
||||
currdate = relation.lfile().get_date(DOC_DATADOC);
|
||||
((TBit_array&)_flags[i]).set(currdate-_newyearsday, 1);
|
||||
}
|
||||
TBit_array & fl = (TBit_array&) m.flags()[i];
|
||||
TDate caput_anni(1, 1, _year);
|
||||
for (cursor = 0; cursor.pos() < items; ++cursor)
|
||||
fl.set(relation.lfile().get_date(DOC_DATADOC) - caput_anni, 1);
|
||||
caput_anni += fl.last_one();
|
||||
m.almanac(i).set_insert_date(m.ordered()[i] ? caput_anni : botime);
|
||||
}
|
||||
}
|
||||
|
||||
@ -111,17 +110,7 @@ bool TImmissioneDocumenti_app::destroy()
|
||||
|
||||
void TImmissioneDocumenti_app::main_loop()
|
||||
{
|
||||
while (_mask->run() == K_ENTER)
|
||||
{
|
||||
TDate selday = _mask->last_selected_day();
|
||||
int currpage = _mask->last_selected_page();
|
||||
TDate last_datadoc(1, 1, selday.year());
|
||||
|
||||
last_datadoc += ((TBit_array&)_flags[currpage]).last_one();
|
||||
|
||||
const bool can_insert = (selday >= last_datadoc) || !ordered(currpage);
|
||||
_mask->open_inner_sheet(selday,_filters.row(currpage), can_insert);
|
||||
}
|
||||
while (_mask->run() != K_QUIT);
|
||||
}
|
||||
|
||||
// Chiamate dalla maschera
|
||||
@ -129,16 +118,14 @@ void TImmissioneDocumenti_app::main_loop()
|
||||
void TImmissioneDocumenti_app::change_year(int newyear, bool init_flg)
|
||||
{
|
||||
_year = newyear;
|
||||
_newyearsday.set_day(1);
|
||||
_newyearsday.set_month(1);
|
||||
_newyearsday.set_year(_year);
|
||||
|
||||
if (init_flg) init_flags();
|
||||
if (init_flg)
|
||||
init_flags();
|
||||
}
|
||||
|
||||
bool TImmissioneDocumenti_app::has_documents(int currpage, TDate& day)
|
||||
{
|
||||
return (((TBit_array&)_flags[currpage])[day-_newyearsday]);
|
||||
const TDate caput_anni(1, 1, _year);
|
||||
return (((TBit_array&) _mask->flags()[currpage])[day - caput_anni]);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
@ -147,14 +134,15 @@ bool TImmissioneDocumenti_app::has_documents(int currpage, TDate& day)
|
||||
|
||||
// Routines Proprietarie
|
||||
|
||||
void TImmissioneDocumenti_mask::open_inner_sheet(TDate date, TString doctype, bool can_insert)
|
||||
void TImmissioneDocumenti_mask::open_day_mask(TDate date)
|
||||
{
|
||||
int exitval;
|
||||
|
||||
if (!date.ok())
|
||||
date = curr_almanac().selected_date();
|
||||
const int currpage = curr_page();
|
||||
|
||||
const TString & doctype = filters().row(currpage);
|
||||
TString filter;
|
||||
filter << "(ANSI(DATADOC)==\"" << date.string(ANSI) << "\")";
|
||||
filter << "&&";
|
||||
filter << "(CODNUM==\"" << doctype << "\")";
|
||||
filter << "(ANSI(DATADOC)==\"" << date.string(ANSI) << "\")" << "&&" << "(CODNUM==\"" << doctype << "\")";
|
||||
|
||||
TRelation relation(LF_DOC);
|
||||
relation.add(LF_CLIFO, "TIPOCF==TIPOCF|CODCF==CODCF");
|
||||
@ -165,9 +153,9 @@ void TImmissioneDocumenti_mask::open_inner_sheet(TDate date, TString doctype, bo
|
||||
"ANNO|CODNUM|TIPODOC|NUMDOCRIF|STATO|DATADOCRIF|NDOC|20->RAGSOC",
|
||||
TR("Selezione documenti"),
|
||||
HR("Anno|Num.|Tipo|Docum.Rif.|Stato|Data@10|Documento|Ragione Sociale@50"),
|
||||
can_insert ? 0x02|0x04 : 0x04);
|
||||
almanac().can_insert(date) ? 0x02|0x04 : 0x04);
|
||||
|
||||
exitval = sheet.run();
|
||||
KEY exitval = sheet.run();
|
||||
|
||||
switch(exitval)
|
||||
{
|
||||
@ -185,9 +173,26 @@ void TImmissioneDocumenti_mask::open_inner_sheet(TDate date, TString doctype, bo
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (ordered()[currpage])
|
||||
{
|
||||
TDate caput_anni(1, 1, date.year());
|
||||
TBit_array & fl = (TBit_array&) flags()[currpage];
|
||||
|
||||
filter.cut(0);
|
||||
filter << "(ANNO==\"" << date.year() << "\")" << "&&" << "(CODNUM==\"" << filters().row(currpage) << "\")";
|
||||
|
||||
cursor.setfilter(filter);
|
||||
|
||||
const int items = cursor.items();
|
||||
|
||||
for (cursor = 0; cursor.pos() < items; ++cursor)
|
||||
fl.set(relation.lfile().get_date(DOC_DATADOC) - caput_anni, 1);
|
||||
caput_anni += fl.last_one();
|
||||
almanac(currpage).set_insert_date(caput_anni);
|
||||
}
|
||||
}
|
||||
|
||||
void TImmissioneDocumenti_mask::call_ve0(int exitval, TRelation& relation, TDate& date, TString& doctype)
|
||||
void TImmissioneDocumenti_mask::call_ve0(int exitval, TRelation& relation, TDate& date, const TString& doctype)
|
||||
{
|
||||
TFilename tempfile;
|
||||
tempfile.tempdir();
|
||||
@ -215,7 +220,7 @@ void TImmissioneDocumenti_mask::call_ve0(int exitval, TRelation& relation, TDate
|
||||
}
|
||||
|
||||
configfile.set("PROVV", "D", "33");
|
||||
configfile.set("ANNO", last_selected_day().year(), "33");
|
||||
configfile.set("ANNO", date.year(), "33");
|
||||
configfile.set("CODNUM", doctype, "33");
|
||||
}
|
||||
|
||||
|
22
ci/ci0400.h
22
ci/ci0400.h
@ -7,20 +7,30 @@
|
||||
|
||||
class TImmissioneDocumenti_mask : public TAlmanac_mask
|
||||
{
|
||||
TString_array _filters; // filtri tipodoc per ogni tab
|
||||
TArray _flags; // array di TBit_array. Ognuno di essi è lungo 366 e rappresenta i flag di presenza documenti per ogni giorno dell'anno. Ogni page della maschera ha bisogno di un bitarray diverso
|
||||
TBit_array _ordered;
|
||||
|
||||
protected:
|
||||
|
||||
public:
|
||||
// ereditato da TAlmanac_mask
|
||||
virtual bool is_date_void(int currpage, TDate& cdate);
|
||||
virtual void change_year(int newyear);
|
||||
const TString_array & filters() const { return _filters;}
|
||||
const TArray & flags() const { return _flags;}
|
||||
const TBit_array & ordered() const { return _ordered;}
|
||||
TString_array & filters() { return _filters;}
|
||||
TArray & flags() { return _flags;}
|
||||
TBit_array & ordered() { return _ordered;}
|
||||
|
||||
public:
|
||||
// apertura del foglio interno di gestione dei documenti
|
||||
void open_inner_sheet(TDate date, TString doctype, bool can_insert);
|
||||
virtual void open_day_mask(TDate date);
|
||||
|
||||
private:
|
||||
// chiamata del programma ve0
|
||||
void call_ve0(int exitval, TRelation& relation, TDate& date, TString& doctype);
|
||||
void call_ve0(int exitval, TRelation& relation, TDate& date, const TString& doctype);
|
||||
|
||||
public:
|
||||
// Costruttore
|
||||
@ -35,14 +45,8 @@ public:
|
||||
|
||||
class TImmissioneDocumenti_app: public TSkeleton_application
|
||||
{
|
||||
private:
|
||||
TImmissioneDocumenti_mask* _mask;
|
||||
|
||||
TString_array _filters; // filtri tipodoc per ogni tab
|
||||
TArray _flags; // array di TBit_array. Ognuno di essi è lungo 366 e rappresenta i flag di presenza documenti per ogni giorno dell'anno. Ogni page della maschera ha bisogno di un bitarray diverso
|
||||
TBit_array _ordered;
|
||||
|
||||
TDate _newyearsday; // capodanno dell'anno corrente, per uso interno
|
||||
int _year; // anno corrente
|
||||
|
||||
private:
|
||||
@ -57,9 +61,9 @@ protected:
|
||||
public:
|
||||
bool has_documents(int currpage, TDate& day); // passata come funzione alla maschera
|
||||
void change_year(int newyear, bool init_flg = true); // passata come funzione alla maschera
|
||||
TImmissioneDocumenti_mask & mask() const {return *_mask; }
|
||||
|
||||
public:
|
||||
bool ordered(byte p) { return _ordered[p]; }
|
||||
TImmissioneDocumenti_app() { change_year(TDate(TODAY).year(), false); }
|
||||
virtual ~TImmissioneDocumenti_app() {}
|
||||
};
|
||||
|
132
ci/cilib.cpp
132
ci/cilib.cpp
@ -25,48 +25,53 @@ TMask_field* TAlmanac_mask::parse_field(TScanner& scanner)
|
||||
|
||||
bool TAlmanac_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
{
|
||||
byte page = curr_page();
|
||||
if (page >=0 && page < 16)
|
||||
switch (o.dlg())
|
||||
{
|
||||
TAlmanac_field & al = curr_almanac();
|
||||
|
||||
switch (o.dlg())
|
||||
case F_PREVMONTH:
|
||||
if (e == fe_button)
|
||||
{
|
||||
case F_PREVMONTH:
|
||||
{
|
||||
const int year = al.selected_year();
|
||||
al.move_selected_month(-1);
|
||||
this->set(F_CHANGEMONTH, al.selected_month());
|
||||
if (year != al.selected_year())
|
||||
{
|
||||
set(F_CHANGEYEAR, al.selected_year());
|
||||
set_year(al.selected_year());
|
||||
}
|
||||
}
|
||||
break;
|
||||
case F_CHANGEMONTH:
|
||||
al.set_selected_month(get_int(F_CHANGEMONTH));
|
||||
break;
|
||||
case F_NEXTMONTH:
|
||||
{
|
||||
const int year = al.selected_year();
|
||||
TAlmanac_field & al = curr_almanac();
|
||||
const int year = al.selected_year();
|
||||
|
||||
al.move_selected_month(1);
|
||||
set(F_CHANGEMONTH, al.selected_month());
|
||||
if (year != al.selected_year())
|
||||
{
|
||||
set(F_CHANGEYEAR, al.selected_year());
|
||||
set_year(al.selected_year());
|
||||
}
|
||||
al.move_selected_month(-1);
|
||||
set(F_CHANGEMONTH, al.selected_month());
|
||||
if (year != al.selected_year())
|
||||
{
|
||||
set(F_CHANGEYEAR, al.selected_year());
|
||||
set_year(al.selected_year());
|
||||
}
|
||||
break;
|
||||
case F_CHANGEYEAR:
|
||||
}
|
||||
break;
|
||||
case F_CHANGEMONTH:
|
||||
if (e == fe_modify)
|
||||
{
|
||||
TAlmanac_field & al = curr_almanac();
|
||||
|
||||
al.set_selected_month(get_int(F_CHANGEMONTH));
|
||||
}
|
||||
break;
|
||||
case F_NEXTMONTH:
|
||||
if (e == fe_button)
|
||||
{
|
||||
TAlmanac_field & al = curr_almanac();
|
||||
const int year = al.selected_year();
|
||||
|
||||
al.move_selected_month(1);
|
||||
set(F_CHANGEMONTH, al.selected_month());
|
||||
if (year != al.selected_year())
|
||||
{
|
||||
set(F_CHANGEYEAR, al.selected_year());
|
||||
set_year(al.selected_year());
|
||||
}
|
||||
}
|
||||
break;
|
||||
case F_CHANGEYEAR:
|
||||
if (e == fe_modify)
|
||||
set_year(get_int(F_CHANGEYEAR));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -75,14 +80,23 @@ void TAlmanac_mask::activate_almanac(const short id, int page, TDate& sdate)
|
||||
{
|
||||
_almanacs[page] = id2pos(id);
|
||||
almanac(page).set_selected_date(sdate);
|
||||
if (page > _lastpage)
|
||||
_lastpage = page;
|
||||
set(F_CHANGEMONTH, sdate.month());
|
||||
if (page>_activepages)
|
||||
_activepages = page;
|
||||
}
|
||||
|
||||
void TAlmanac_mask::set_year(int newyear)
|
||||
{
|
||||
for(byte p = 0; p < _activepages; p++)
|
||||
TAlmanac_field & TAlmanac_mask::almanac(byte page) const
|
||||
{
|
||||
if (page > _lastpage)
|
||||
page = curr_page();
|
||||
if (page > _lastpage)
|
||||
page = 0;
|
||||
return (TAlmanac_field &) fld(_almanacs[page]);
|
||||
}
|
||||
|
||||
void TAlmanac_mask::set_year(int newyear)
|
||||
{
|
||||
for(byte p = 0; p <= _lastpage; p++)
|
||||
almanac(p).set_selected_year(newyear);
|
||||
change_year(newyear);
|
||||
}
|
||||
@ -98,7 +112,7 @@ void TAlmanac_mask::activate_almanac(const short id, int page, TDate& sdate)
|
||||
}
|
||||
|
||||
TAlmanac_mask::TAlmanac_mask(const char * name)
|
||||
: TAutomask(), _activepages(0), _lastselectedday(TODAY), _lastselectedpage(1)
|
||||
: TAutomask(), _lastpage(0)
|
||||
{
|
||||
read_mask(name, 0, -1);
|
||||
set_handlers();
|
||||
@ -157,7 +171,6 @@ void TAlmanac_field::set_selected_year(int nyear)
|
||||
win().force_update();
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TAlmanac_window
|
||||
///////////////////////////////////////////////////////////
|
||||
@ -187,9 +200,9 @@ void TAlmanac_window::update()
|
||||
pad = o.padding();
|
||||
row = 3;
|
||||
|
||||
set_font("Verdana", XVT_FS_BOLD);
|
||||
set_font("", XVT_FS_BOLD);
|
||||
set_color(NORMAL_COLOR, NORMAL_BACK_COLOR);
|
||||
fh = 2 + xvt_dwin_get_font_size_mapped(win());
|
||||
fh = CHARY;
|
||||
|
||||
if (o.show_month_name())
|
||||
{
|
||||
@ -213,13 +226,17 @@ void TAlmanac_window::update()
|
||||
{
|
||||
if ((++cdate).wday()==1) row++;
|
||||
|
||||
if (o.is_date_void(cpage, cdate))
|
||||
col_b=NORMAL_BACK_COLOR;
|
||||
else
|
||||
col_b=REQUIRED_BACK_COLOR;
|
||||
|
||||
col_b = NORMAL_BACK_COLOR;
|
||||
col_f=NORMAL_COLOR;
|
||||
|
||||
if (o.is_date_void(cpage, cdate))
|
||||
{
|
||||
if (!o.can_insert(cdate))
|
||||
col_b = DISABLED_BACK_COLOR;
|
||||
}
|
||||
else
|
||||
col_b = FOCUS_BACK_COLOR;
|
||||
|
||||
set_pen(col_f);
|
||||
set_brush(col_b);
|
||||
|
||||
@ -234,6 +251,12 @@ void TAlmanac_window::update()
|
||||
rcttd.right = rct_l + rct_w - pad;
|
||||
|
||||
xvt_dwin_draw_rect(win(), &rcttd);
|
||||
if (cdate.is_holiday())
|
||||
{
|
||||
set_brush(o.can_insert(cdate) ? DISABLED_BACK_COLOR : NORMAL_COLOR, PAT_FDIAG);
|
||||
xvt_dwin_draw_rect(win(), &rcttd);
|
||||
}
|
||||
|
||||
|
||||
if (o.is_selected(cdate.day()))
|
||||
{
|
||||
@ -242,7 +265,7 @@ void TAlmanac_window::update()
|
||||
xvt_dwin_draw_rect(win(), &rcttd);
|
||||
}
|
||||
|
||||
xvt_dwin_draw_text(win(), rct_l + pad + 2, fh + rct_t + pad + 2, str, -1);
|
||||
xvt_dwin_draw_text(win(), rct_l + pad + 2, fh + rct_t + pad, str, -1);
|
||||
}
|
||||
while (!cdate.is_end_month());
|
||||
}
|
||||
@ -270,7 +293,7 @@ bool TAlmanac_window::on_key(KEY key)
|
||||
o.move_selected_day(+7);
|
||||
break;
|
||||
case K_ENTER:
|
||||
((TAlmanac_mask&)o.mask()).exit_mask();
|
||||
((TAlmanac_mask&)o.mask()).open_day_mask();
|
||||
break;
|
||||
default:
|
||||
return TField_window::on_key(key);
|
||||
@ -311,7 +334,8 @@ void TAlmanac_window::handler(WINDOW win, EVENT* ep)
|
||||
|
||||
delta = 7*pnt_r + pnt_c - (7*(3+cdate.week()-fdate.week()) + cdate.wday());
|
||||
o.move_selected_day(delta);
|
||||
if (ep->type==E_MOUSE_DBL) ((TAlmanac_mask&)o.mask()).exit_mask();
|
||||
if (ep->type==E_MOUSE_DBL)
|
||||
((TAlmanac_mask&)o.mask()).open_day_mask();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
28
ci/cilib.h
28
ci/cilib.h
@ -23,16 +23,15 @@ class TAlmanac_field : public TWindowed_field
|
||||
// @author:(INTERNAL) Brugno
|
||||
|
||||
// @access Protected Member
|
||||
protected:
|
||||
// @cmember:(INTERNAL) Parametro di visualizzazione: Separazione tra le celle del calenbdario
|
||||
int _padding;
|
||||
// @cmember:(INTERNAL) Parametro di visualizzazione: flag di visulizzazione del nome del mese
|
||||
bool _showmonthname;
|
||||
|
||||
// @access Protected Member
|
||||
protected:
|
||||
// @cmember:(INTERNAL) Variabile interna: Data correntemente selezionato nel calendario
|
||||
TDate _selecteddate;
|
||||
TDate _dateinsert;
|
||||
|
||||
// @access Protected Member
|
||||
protected:
|
||||
@ -79,11 +78,14 @@ public:
|
||||
// @access Public Member
|
||||
public:
|
||||
bool is_date_void(int currpage, TDate& cdate);
|
||||
// @cmember Gestione selezione: Setta la prima data dell'anno con l'inserimento attivo
|
||||
void set_insert_date(TDate & d) { _dateinsert = d; }
|
||||
bool can_insert(TDate &d) const { return d >= _dateinsert; }
|
||||
|
||||
// @access Public Member
|
||||
public:
|
||||
// @cmember Costruttore
|
||||
TAlmanac_field(TMask* m) : TWindowed_field(m),_showmonthname(true), _selecteddate(TODAY), _padding(2) { }
|
||||
TAlmanac_field(TMask* m) : TWindowed_field(m),_showmonthname(true), _selecteddate(TODAY), _dateinsert(botime), _padding(2) { }
|
||||
// @cmember Distruttore
|
||||
virtual ~TAlmanac_field() { }
|
||||
};
|
||||
@ -136,11 +138,7 @@ class TAlmanac_mask : public TAutomask
|
||||
// @cmember:(INTERNAL) Puntatori ai campi calendario
|
||||
short _almanacs[MAX_PAGES];
|
||||
// @cmember:(INTERNAL) Numero di pagine attive
|
||||
int _activepages;
|
||||
// @cmember:(INTERNAL) Giorno selezionato prima dell'uscita della maschera
|
||||
TDate _lastselectedday;
|
||||
// @cmember:(INTERNAL) Pagina selezionata prima dell'uscita della maschera
|
||||
int _lastselectedpage;
|
||||
byte _lastpage;
|
||||
|
||||
|
||||
// @access Protected Member
|
||||
@ -151,29 +149,25 @@ protected:
|
||||
// @access Public Member
|
||||
public:
|
||||
// shortcut per l'accesso all'almanacco della pagina corrente
|
||||
TAlmanac_field & almanac(byte page) const { return (TAlmanac_field &) fld(_almanacs[page]);}
|
||||
TAlmanac_field & almanac(byte page = -1) const ;
|
||||
// shortcut per l'accesso all'almanacco della pagina corrente
|
||||
TAlmanac_field & curr_almanac() const { return almanac(curr_page());}
|
||||
TAlmanac_field & curr_almanac() const { return almanac();}
|
||||
// override da TAutomask
|
||||
virtual TMask_field* parse_field(TScanner& scanner);
|
||||
// @cmember Gestione calendari: Attiva l'almanacco sulla pagina specificata per la data specificata
|
||||
void activate_almanac(short id, int page, TDate& sdate);
|
||||
// @cmember Gestione calendari: disanilta le pagine non attive
|
||||
void disable_pages() { disable_page(_activepages + 1); }
|
||||
void disable_pages() { disable_page(_lastpage + 1); }
|
||||
// @cmember Gestione calendari: Cambia l'anno su tutti i calendari
|
||||
void set_year(int newyear);
|
||||
// @cmember Gestione calendari: Ritorna il giorno selezionato nella pagina corrente
|
||||
const TDate& selected_day() const { return curr_almanac().selected_date(); }
|
||||
// @cmember Gestione calendari: Ritorna l'ultimo giorno selezionato
|
||||
const TDate& last_selected_day() const { return _lastselectedday; }
|
||||
// @cmember Gestione calendari: Ritorna l'ultima pagina selezionato
|
||||
const int last_selected_page() const { return _lastselectedpage; }
|
||||
// @cmember Gestione eventi calendario: Controlla la presenza di documenti nella data attiva
|
||||
virtual bool is_date_void(int currpage, TDate& cdate);
|
||||
// @cmember Gestione eventi calendario: Controlla la presenza di documenti nella data attiva
|
||||
virtual void change_year(int newyear);
|
||||
// @cmember Gestione selezione: Setta l'ultima selezione ed esce dalla maschera
|
||||
void exit_mask() { _lastselectedday = selected_day(); _lastselectedpage = curr_page(); stop_run(K_ENTER); }
|
||||
// @cmember Chiama la maschera o lo sheet legato al gioro selezionato
|
||||
virtual void open_day_mask(TDate date = botime) { }
|
||||
|
||||
// @cmember Costruttore
|
||||
TAlmanac_mask(const char * name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user