Aggiustate sciocchezzuole su righe disabilitate array-sheet

Altri files modificati per cause spurie (fmkmk problematici)


git-svn-id: svn://10.65.10.50/trunk@802 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
villa 1994-12-29 14:51:43 +00:00
parent 929a349a3c
commit ecfe1f34a1
20 changed files with 1040 additions and 1000 deletions

View File

@ -1,3 +1,3 @@
#define F_STRING 101 #define F_STRING 101
#define F_DIRECT 102 #define F_DIRECT 102
#define F_CASE 103 #define F_CASE 103

View File

@ -1 +1,35 @@
/* Maschera ricerca per viswin */ /* Maschera ricerca per viswin */
#include "bagn005.h"
PAGE "Cerca testo" -1 -1 55 11
STRING F_STRING 45 70
BEGIN
PROMPT 1 1 "Ricerca: "
END
LIST F_DIRECT
BEGIN
PROMPT 1 2 "Direzione "
ITEM "D|Avanti"
ITEM "U|Indietro"
END
BOOLEAN F_CASE
BEGIN
PROMPT 30 2 "Maiuscolo/Minuscolo"
END
BUTTON DLG_OK 10 2
BEGIN
PROMPT -12 -1 ""
END
BUTTON DLG_CANCEL 10 2
BEGIN
PROMPT -22 -1 ""
END
ENDPAGE
ENDMASK

View File

@ -1,67 +1,67 @@
#ifndef __CFVEN_H #ifndef __CFVEN_H
#define __CFVEN_H #define __CFVEN_H
#define CFV_TIPOCF "TIPOCF" #define CFV_TIPOCF "TIPOCF"
#define CFV_CODCF "CODCF" #define CFV_CODCF "CODCF"
#define CFV_CODINDDOC "CODINDDOC" #define CFV_CODINDDOC "CODINDDOC"
#define CFV_CODNOTE "CODNOTE" #define CFV_CODNOTE "CODNOTE"
#define CFV_CODLEG "CODLEG" #define CFV_CODLEG "CODLEG"
#define CFV_CODCATC "CODCATC" #define CFV_CODCATC "CODCATC"
#define CFV_CODZONA "CODZONA" #define CFV_CODZONA "CODZONA"
#define CFV_CODAG "CODAG" #define CFV_CODAG "CODAG"
#define CFV_PROVV "PROVV" #define CFV_PROVV "PROVV"
#define CFV_LIQPAG "LIQPAG" #define CFV_LIQPAG "LIQPAG"
#define CFV_CODPRCF "CODPRCF" #define CFV_CODPRCF "CODPRCF"
#define CFV_CODINDSP "CODINDSP" #define CFV_CODINDSP "CODINDSP"
#define CFV_CODNOTESP1 "CODNOTESP1" #define CFV_CODNOTESP1 "CODNOTESP1"
#define CFV_CODNOTESP2 "CODNOTESP2" #define CFV_CODNOTESP2 "CODNOTESP2"
#define CFV_CODSPMEZZO "CODSPMEZZO" #define CFV_CODSPMEZZO "CODSPMEZZO"
#define CFV_CODPORTO "CODPORTO" #define CFV_CODPORTO "CODPORTO"
#define CFV_CODVETT1 "CODVETT1" #define CFV_CODVETT1 "CODVETT1"
#define CFV_CODVETT2 "CODVETT2" #define CFV_CODVETT2 "CODVETT2"
#define CFV_CODVETT3 "CODVETT3" #define CFV_CODVETT3 "CODVETT3"
#define CFV_RAGGDOC "RAGGDOC" #define CFV_RAGGDOC "RAGGDOC"
#define CFV_NCOPIE "NCOPIE" #define CFV_NCOPIE "NCOPIE"
#define CFV_CODCFASS "CODCFASS" #define CFV_CODCFASS "CODCFASS"
#define CFV_ASSFIS "ASSFIS" #define CFV_ASSFIS "ASSFIS"
#define CFV_FATTSOSP "FATTSOSP" #define CFV_FATTSOSP "FATTSOSP"
#define CFV_VSNRPROT "VSNRPROT" #define CFV_VSNRPROT "VSNRPROT"
#define CFV_VSDATAREG "VSDATAREG" #define CFV_VSDATAREG "VSDATAREG"
#define CFV_NSNPROT "NSNPROT" #define CFV_NSNPROT "NSNPROT"
#define CFV_NSDATAREG "NSDATAREG" #define CFV_NSDATAREG "NSDATAREG"
#define CFV_ADDBNS1500 "ADDBNS1500" #define CFV_ADDBNS1500 "ADDBNS1500"
#define CFV_CATFIN "CATFIN" #define CFV_CATFIN "CATFIN"
#define CFV_CODABIPR "CODABIPR" #define CFV_CODABIPR "CODABIPR"
#define CFV_CODCABPR "CODCABPR" #define CFV_CODCABPR "CODCABPR"
#define CFV_CODINDEFF "CODINDEFF" #define CFV_CODINDEFF "CODINDEFF"
#define CFV_EMEFFRICH "EMEFFRICH" #define CFV_EMEFFRICH "EMEFFRICH"
#define CFV_IMPMINEFF "IMPMINEFF" #define CFV_IMPMINEFF "IMPMINEFF"
#define CFV_NONACCEFF "NONACCEFF" #define CFV_NONACCEFF "NONACCEFF"
#define CFV_NONSCADEFF "NONSCADEFF" #define CFV_NONSCADEFF "NONSCADEFF"
#define CFV_ADDBOLLIRB "ADDBOLLIRB" #define CFV_ADDBOLLIRB "ADDBOLLIRB"
#define CFV_ADDBOLLITR "ADDBOLLITR" #define CFV_ADDBOLLITR "ADDBOLLITR"
#define CFV_ADDSPINC "ADDSPINC" #define CFV_ADDSPINC "ADDSPINC"
#define CFV_IVARID "IVARID" #define CFV_IVARID "IVARID"
#define CFV_CATVEN "CATVEN" #define CFV_CATVEN "CATVEN"
#define CFV_GESTCONTR "GESTCONTR" #define CFV_GESTCONTR "GESTCONTR"
#define CFV_CODLIST "CODLIST" #define CFV_CODLIST "CODLIST"
#define CFV_CODSCINC "CODSCINC" #define CFV_CODSCINC "CODSCINC"
#define CFV_SCONTOCL "SCONTOCL" #define CFV_SCONTOCL "SCONTOCL"
#define CFV_CODMAG "CODMAG" #define CFV_CODMAG "CODMAG"
#define CFV_CODSP1 "CODSP1" #define CFV_CODSP1 "CODSP1"
#define CFV_CODSP2 "CODSP2" #define CFV_CODSP2 "CODSP2"
#define CFV_CODSP3 "CODSP3" #define CFV_CODSP3 "CODSP3"
#define CFV_CODSP4 "CODSP4" #define CFV_CODSP4 "CODSP4"
#define CFV_PROFSOLL "PROFSOLL" #define CFV_PROFSOLL "PROFSOLL"
#define CFV_MAXSOLL "MAXSOLL" #define CFV_MAXSOLL "MAXSOLL"
#define CFV_DATAESC "DATAESC" #define CFV_DATAESC "DATAESC"
#define CFV_DATASOLL "DATASOLL" #define CFV_DATASOLL "DATASOLL"
#define CFV_SCONTOR "SCONTOR" #define CFV_SCONTOR "SCONTOR"
#define CFV_TITOLO "TITOLO" #define CFV_TITOLO "TITOLO"
#define CFV_RAGGOR "RAGGOR" #define CFV_RAGGOR "RAGGOR"
#define CFV_MINORD "MINORD" #define CFV_MINORD "MINORD"
#define CFV_MAXORD "MAXORD" #define CFV_MAXORD "MAXORD"
#define CFV_PREVORD "PREVORD" #define CFV_PREVORD "PREVORD"
#define CFV_TIPOEVORD "TIPOEVORD" #define CFV_TIPOEVORD "TIPOEVORD"
#endif #endif

View File

@ -6,7 +6,7 @@
#define LisGest 4 #define LisGest 4
#define OptLab 5 #define OptLab 5
#define FatScar 6 #define FatScar 6
#define EsInCor 7 #define EsInCor 7
#define ScDisFat 8 #define ScDisFat 8
#define DisRegMov 9 #define DisRegMov 9
#define MovRB 10 #define MovRB 10
@ -22,20 +22,20 @@
#define RegScadNeg 20 #define RegScadNeg 20
#define ChkGiacNeg 21 #define ChkGiacNeg 21
#define CodCespStrut 22 #define CodCespStrut 22
#define PrPagScCli 23 #define PrPagScCli 23
#define JOURNALING 24 #define JOURNALING 24
#define RiepArt 25 #define RiepArt 25
#define ShiftQAlt 26 #define ShiftQAlt 26
#define NoQtaInRBF 27 #define NoQtaInRBF 27
#define RifOrdine 28 #define RifOrdine 28
#define AutoNumOr 29 #define AutoNumOr 29
#define ContCess 30 #define ContCess 30
#define CODEAN13 31 #define CODEAN13 31
#define CHIMAGEST 32 #define CHIMAGEST 32
#define VISGIACFAT 33 #define VISGIACFAT 33
#define SCCLIFND 34 #define SCCLIFND 34
#define DPARTAUT 35 #define DPARTAUT 35
#define SPEEDBOL 36 #define SPEEDBOL 36
/* @END */ /* @END */

View File

@ -16,7 +16,7 @@
class TField_array : public TArray class TField_array : public TArray
{ {
public: public:
// @FPUB // @FPUB
TField& operator[] (int index) const { return (TField&)TArray::operator[](index); } // Operatore [] ritorna il campo di posto index. TField& operator[] (int index) const { return (TField&)TArray::operator[](index); } // Operatore [] ritorna il campo di posto index.

View File

@ -1,115 +1,115 @@
#ifndef __FORM_H #ifndef __FORM_H
#define __FORM_H #define __FORM_H
#ifndef __PRINTER_H #ifndef __PRINTER_H
#include <printer.h> #include <printer.h>
#endif #endif
#ifndef __SCANNER_H #ifndef __SCANNER_H
#include <scanner.h> #include <scanner.h>
#endif #endif
#ifndef __MASK_H #ifndef __MASK_H
class TMask; class TMask;
#endif #endif
#ifndef __RELATION_H #ifndef __RELATION_H
class TRelation; class TRelation;
class TCursor; class TCursor;
#endif #endif
enum pagetype { odd_page, even_page, first_page, last_page }; enum pagetype { odd_page, even_page, first_page, last_page };
class TForm; class TForm;
class TForm_item; class TForm_item;
class TPrint_section : public TArray class TPrint_section : public TArray
{ {
static TMask* _msk; static TMask* _msk;
word _height; // Altezza della sezione word _height; // Altezza della sezione
TForm* _form; // Form cui appartiene alla sezione TForm* _form; // Form cui appartiene alla sezione
TArray _item; // Lista dei campi da stampare TArray _item; // Lista dei campi da stampare
const TPrint_section& copy(const TPrint_section& ps); const TPrint_section& copy(const TPrint_section& ps);
protected: protected:
virtual void print_on(ostream& out) const; virtual void print_on(ostream& out) const;
TForm_item* parse_item(const TString& key); TForm_item* parse_item(const TString& key);
TForm_item* parse_item(TScanner& scanner); TForm_item* parse_item(TScanner& scanner);
public: public:
TPrintrow& row(int num); TPrintrow& row(int num);
TForm* form() const { return _form; } TForm* form() const { return _form; }
TForm_item& field(int n) const { return (TForm_item&)_item[n]; } TForm_item& field(int n) const { return (TForm_item&)_item[n]; }
word fields() const { return _item.items(); } word fields() const { return _item.items(); }
word height() const { return _height; } word height() const { return _height; }
virtual bool ok() const { return height() > 0 || fields() > 0; } virtual bool ok() const { return height() > 0 || fields() > 0; }
void reset(); void reset();
bool update(); bool update();
bool parse(TScanner& scanner); bool parse(TScanner& scanner);
bool edit(const char* title); bool edit(const char* title);
const TPrint_section& operator=(const TPrint_section& ps) { return copy(ps); } const TPrint_section& operator=(const TPrint_section& ps) { return copy(ps); }
TPrint_section(TForm* parent); TPrint_section(TForm* parent);
TPrint_section(const TPrint_section& ps) { copy(ps); } TPrint_section(const TPrint_section& ps) { copy(ps); }
virtual ~TPrint_section(); virtual ~TPrint_section();
}; };
class TForm : public TObject class TForm : public TObject
{ {
friend class TForm_editor; friend class TForm_editor;
TFilename _name; // Profile name TFilename _name; // Profile name
TRelation* _relation; // Can be NULL TRelation* _relation; // Can be NULL
TCursor* _cursor; // Can be NULL TCursor* _cursor; // Can be NULL
TArray _head; // Headers TArray _head; // Headers
TArray _body; // Bodies TArray _body; // Bodies
TArray _foot; // Footers TArray _foot; // Footers
bool _lastpage; // I am about to print the last page bool _lastpage; // I am about to print the last page
TPrint_section* exist(char s, pagetype t, bool create = FALSE); // Can be NULL TPrint_section* exist(char s, pagetype t, bool create = FALSE); // Can be NULL
static void header_handler(TPrinter& p); static void header_handler(TPrinter& p);
static void footer_handler(TPrinter& p); static void footer_handler(TPrinter& p);
protected: protected:
// 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 = 'B', word page = 1);
word height(); // Height of first page word height(); // Height of first page
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;
bool edit_relation(); bool edit_relation();
bool parse_use(TScanner&); bool parse_use(TScanner&);
bool parse_join(TScanner&); bool parse_join(TScanner&);
word page(const TPrinter& p) const; word page(const TPrinter& p) const;
virtual long records() const; virtual long records() const;
virtual word set_header(word p, bool u); virtual word set_header(word p, bool u);
virtual word set_body(word p, bool u); virtual word set_body(word p, bool u);
virtual word set_footer(word p, bool u); virtual word set_footer(word p, bool u);
public: public:
bool print(long from = 0L, long to = -1L); bool print(long from = 0L, long to = -1L);
const TFilename& name() const { return _name; } const TFilename& name() const { return _name; }
TRelation* relation() const { return _relation; } TRelation* relation() const { return _relation; }
TCursor* cursor() const { return _cursor; } TCursor* cursor() const { return _cursor; }
TForm(const char* form); TForm(const char* form);
virtual ~TForm(); virtual ~TForm();
}; };
#endif #endif

View File

@ -1,20 +1,20 @@
#ifndef __INDSP_H #ifndef __INDSP_H
#define __INDSP_H #define __INDSP_H
#define IND_TIPOCF "TIPOCF" #define IND_TIPOCF "TIPOCF"
#define IND_CODCF "CODCF" #define IND_CODCF "CODCF"
#define IND_CODIND "CODIND" #define IND_CODIND "CODIND"
#define IND_RAGSOC "RAGSOC" #define IND_RAGSOC "RAGSOC"
#define IND_INDIR "INDIR" #define IND_INDIR "INDIR"
#define IND_CIV "CIV" #define IND_CIV "CIV"
#define IND_LOCALITA "LOCALITA" #define IND_LOCALITA "LOCALITA"
#define IND_CAP "CAP" #define IND_CAP "CAP"
#define IND_STATO "STATO" #define IND_STATO "STATO"
#define IND_COM "COM" #define IND_COM "COM"
#define IND_PTEL "PTEL" #define IND_PTEL "PTEL"
#define IND_TEL "TEL" #define IND_TEL "TEL"
#define IND_PFAX "PFAX" #define IND_PFAX "PFAX"
#define IND_FAX "FAX" #define IND_FAX "FAX"
#define IND_IVARID "IVARID" #define IND_IVARID "IVARID"
#endif #endif

View File

@ -1,69 +1,69 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdtypes.h> #include <stdtypes.h>
#include <strings.h> #include <strings.h>
#include <scanner.h> #include <scanner.h>
#include <isam.h> #include <isam.h>
#include <tabutil.h> #include <tabutil.h>
int main(int argc,char** argv) int main(int argc,char** argv)
{ {
init_global_vars(); init_global_vars();
if (argc > 2) if (argc > 2)
{ {
argv++; argv++;
TScanner dfile(*argv); TScanner dfile(*argv);
TLocalisamfile* of; TLocalisamfile* of;
TString s(dfile.line()); TString s(dfile.line());
TToken_string w(s); TToken_string w(s);
const char* work = w.get(); const char* work = w.get();
const int nf = atoi(work); const int nf = atoi(work);
const TString nt(work); const TString nt(work);
const int reclen = w.get_int(); const int reclen = w.get_int();
if (nf) of = new TLocalisamfile(nf); if (nf) of = new TLocalisamfile(nf);
else of = new TTable(nt); else of = new TTable(nt);
TToken_string d(40, ','); TToken_string d(40, ',');
while (*(work = dfile.line())) while (*(work = dfile.line()))
d.add(work); d.add(work);
argv++; argv++;
TScanner ifile(*argv); TScanner ifile(*argv);
TString name, just(3), ws(256); TString name, just(3), ws(256);
while (*(work = ifile.line())) while (*(work = ifile.line()))
{ {
s = work; s = work;
s.left_just(reclen); s.left_just(reclen);
d.restart(); d.restart();
of->zero(); of->zero();
w = d.get(); w = d.get();
while (w.not_empty()) while (w.not_empty())
{ {
const int st = w.get_int(); const int st = w.get_int();
const int len = w.get_int(); const int len = w.get_int();
name = w.get(); name = w.get();
if (name != "-") if (name != "-")
{ {
ws = s.mid(st, len); ws = s.mid(st, len);
just = w.get(); just = w.get();
if (just == "Z") ws.right_just(len, '0'); if (just == "Z") ws.right_just(len, '0');
else else
if (just == "R") ws.right_just(len); if (just == "R") ws.right_just(len);
else else
if (just == "L") ws.left_just(len); if (just == "L") ws.left_just(len);
of->put(name, ws); of->put(name, ws);
} }
w = d.get(); w = d.get();
} }
of->write(); of->write();
if (of->bad()) of->rewrite(); if (of->bad()) of->rewrite();
} }
delete of; delete of;
} }
free_global_vars(); free_global_vars();
} }

View File

@ -1,79 +1,79 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdtypes.h> #include <stdtypes.h>
#include <strings.h> #include <strings.h>
#include <scanner.h> #include <scanner.h>
#include <isam.h> #include <isam.h>
#include <tabutil.h> #include <tabutil.h>
#include <utility.h> #include <utility.h>
int main(int argc,char** argv) int main(int argc,char** argv)
{ {
init_global_vars(); init_global_vars();
if (argc > 2) if (argc > 2)
{ {
argv++; argv++;
TScanner dfile(*argv); TScanner dfile(*argv);
TLocalisamfile* of; TLocalisamfile* of;
TString s(dfile.line()); TString s(dfile.line());
TToken_string w(s); TToken_string w(s);
const char* work = w.get(); const char* work = w.get();
const int nf = atoi(work); const int nf = atoi(work);
const TString nt(work); const TString nt(work);
const int reclen = w.get_int(); const int reclen = w.get_int();
if (nf) of = new TLocalisamfile(nf); if (nf) of = new TLocalisamfile(nf);
else of = new TTable(nt); else of = new TTable(nt);
TToken_string d(40, ','); TToken_string d(40, ',');
while (*(work = dfile.line())) while (*(work = dfile.line()))
d.add(work); d.add(work);
argv++; argv++;
TScanner ifile(*argv); TScanner ifile(*argv);
TString name, ws(256), depcom(10); TString name, ws(256), depcom(10);
int ncodi = 2, ncodd = 2; int ncodi = 2, ncodd = 2;
while (*(work = ifile.line())) while (*(work = ifile.line()))
{ {
s = work; s = work;
s.left_just(reclen); s.left_just(reclen);
d.restart(); d.restart();
w = d.get(); w = d.get();
int st = w.get_int(); int st = w.get_int();
int len = w.get_int(); int len = w.get_int();
name = w.get(); name = w.get();
ws = s.mid(st, len); ws = s.mid(st, len);
if (ws != depcom) if (ws != depcom)
{ {
if (depcom.not_empty()) of->rewrite(); if (depcom.not_empty()) of->rewrite();
ncodi = 2; ncodi = 2;
ncodd = 2; ncodd = 2;
of->zero(); of->zero();
of->put(name, ws); of->put(name, ws);
of->read(); of->read();
if (of->good()) depcom = ws; if (of->good()) depcom = ws;
else depcom = ""; else depcom = "";
} }
w = d.get(); w = d.get();
st = w.get_int(); st = w.get_int();
len = w.get_int(); len = w.get_int();
name = s.mid(st, len); name = s.mid(st, len);
w = d.get(); w = d.get();
st = w.get_int(); st = w.get_int();
len = w.get_int(); len = w.get_int();
ws = s.mid(st, len); ws = s.mid(st, len);
if (name == "UI") if (name == "UI")
name = format("UFFIVA%1d", ncodi++); name = format("UFFIVA%1d", ncodi++);
else else
name = format("UFFIIDD%1d", ncodd++); name = format("UFFIIDD%1d", ncodd++);
of->put(name, ws); of->put(name, ws);
} }
if (depcom.not_empty()) of->rewrite(); if (depcom.not_empty()) of->rewrite();
delete of; delete of;
} }
free_global_vars(); free_global_vars();
} }

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,7 @@
class MyApp : public TPrintapp class MyApp : public TPrintapp
{ {
int counter; int counter;
public: public:
virtual void preprocess_page(); virtual void preprocess_page();
virtual bool create(); virtual bool create();
@ -15,34 +15,34 @@ public:
void MyApp::preprocess_page() void MyApp::preprocess_page()
{ {
reset_row(1); reset_row(1);
set_row(1,"%d: Ragsoc: @10S", ++counter, FLD(LF_ANAG,"RAGSOC")); set_row(1,"%d: Ragsoc: @10S", ++counter, FLD(LF_ANAG,"RAGSOC"));
} }
bool MyApp::create() bool MyApp::create()
{ {
TPrintapp::create(); TPrintapp::create();
disable_sorting_menu(); disable_sorting_menu();
disable_selection_menu(); disable_selection_menu();
return TRUE; return TRUE;
} }
main(int argc, char* argv[]) main(int argc, char* argv[])
{ {
MyApp app; MyApp app;
int dummy; int dummy;
cout << "process is: " << getpid(); cout << "process is: " << getpid();
fscanf(stdin,"%d",&dummy); fscanf(stdin,"%d",&dummy);
TRelation tr_giu(LF_ANAG); TRelation tr_giu(LF_ANAG);
TCursor ttr(&tr_giu); TCursor ttr(&tr_giu);
app.cursor(&ttr); app.cursor(&ttr);
app.set_config_file("pr2.stp"); app.set_config_file("pr2.stp");
app.set_row(2,"-------- riga statica con codanagr: @pn --------", app.set_row(2,"-------- riga statica con codanagr: @pn --------",
FLD(LF_ANAG,"CODANAGR","@@@@@@@@@")); FLD(LF_ANAG,"CODANAGR","@@@@@@@@@"));
app.run(argc, argv, "Trial Print Application"); app.run(argc, argv, "Trial Print Application");
} }

View File

@ -203,7 +203,7 @@ void TSheet::handler(WINDOW win, EVENT* ep)
select(nuo); select(nuo);
if (ep->type == E_MOUSE_DBL) if (ep->type == E_MOUSE_DBL)
dispatch_e_char(win, K_ENTER); dispatch_e_char(win, K_ENTER);
else if (_checkable && _check_enabled && vec == nuo) else if (_checkable && _check_enabled && !_disabled[nuo] && vec == nuo)
{ {
_checked.not(nuo); _checked.not(nuo);
force_update(); force_update();
@ -456,30 +456,29 @@ bool TSheet::update_row(long n)
const char* s; const char* s;
int x = 0; int x = 0;
const bool chk = _checked[n] && !_disabled[n];
bool changed = FALSE;
if (chk)
{
changed = TRUE;
set_color(MASK_BACK_COLOR, COLOR_LTGRAY);
}
else if (_disabled[n])
{
set_color(COLOR_GRAY, COLOR_LTGRAY);
changed = TRUE;
}
for (int j = 0; (s = t.get()) != NULL; x += _size[j++]+1) for (int j = 0; (s = t.get()) != NULL; x += _size[j++]+1)
{ {
int x1 = x; int x1 = x;
bool changed = FALSE;
if (n >= 0) if (n >= 0)
{ {
if (_checkable && j == 0) if (_checkable && j == 0)
{ {
const bool c = _checked[n]; s = chk ? "X" : " ";
s = c ? "X" : " ";
if (c)
{
changed = TRUE;
set_color(COLOR_RED, COLOR_LTGRAY);
}
} }
const bool c = _disabled[n];
if (c)
{
set_color(COLOR_GRAY, COLOR_LTGRAY);
changed = TRUE;
}
switch (_type[j]) switch (_type[j])
{ {
case 'R': case 'R':
@ -496,9 +495,9 @@ bool TSheet::update_row(long n)
x1 += (_size[j]-strlen(s)) >> 1; // Centra le testate x1 += (_size[j]-strlen(s)) >> 1; // Centra le testate
stringat(x1, y, s); stringat(x1, y, s);
if (changed)
set_color(COLOR_BLACK, COLOR_LTGRAY);
} }
if (changed)
set_color(COLOR_BLACK, COLOR_LTGRAY);
return TRUE; return TRUE;
} }
@ -604,6 +603,13 @@ TArray_sheet::TArray_sheet(short x, short y, short dx, short dy,
: TSheet(x, y, dx, dy, caption, head, buttons, 0L, parent) : TSheet(x, y, dx, dy, caption, head, buttons, 0L, parent)
{} {}
bool TArray_sheet::destroy(int i)
{
uncheck(-1);
enable(-1);
return _data.destroy(i, TRUE);
}
void TArray_sheet::page_build(long first, byte num) void TArray_sheet::page_build(long first, byte num)
{ {
for (byte i = 0; i < num; i++) for (byte i = 0; i < num; i++)

View File

@ -120,7 +120,7 @@ public:
long add(TToken_string* s); long add(TToken_string* s);
long insert(const TToken_string& s, long n); long insert(const TToken_string& s, long n);
virtual TToken_string& row(long s = -1) { return (s < 0) ? data(selected()) : data(s); } virtual TToken_string& row(long s = -1) { return (s < 0) ? data(selected()) : data(s); }
bool destroy(int i = -1) { uncheck(-1); return _data.destroy(i, TRUE); } bool destroy(int i = -1);
}; };

View File

@ -5,17 +5,17 @@
#include <object.h> #include <object.h>
#endif #endif
/* /*
@(SH) Header @(SH) Header
@(C#) PUBBLICHE @(C#) PUBBLICHE
@(C$) PRIVATE @(C$) PRIVATE
@(VG#) PUBBLICHE @(VG#) PUBBLICHE
@(VG$) PRIVATE @(VG$) PRIVATE
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
*/ */
// @C // @C
// Classe TSort_field : public TObject // Classe TSort_field : public TObject
@ -24,12 +24,12 @@
class TSort_field : public TObject class TSort_field : public TObject
{ {
protected: protected:
// @DPROT // @DPROT
int pos; int pos;
int len; int len;
char ad; char ad;
public: public:
// @FPUB // @FPUB
virtual const char* class_name() const pure; virtual const char* class_name() const pure;
virtual void print_on(ostream& out) const pure; virtual void print_on(ostream& out) const pure;
virtual void read_from(istream&) {}; virtual void read_from(istream&) {};
@ -37,10 +37,10 @@ public:
virtual bool ok() const pure; virtual bool ok() const pure;
TSort_field(int pos = -1, int len = 0, char ad = 'a'); TSort_field(int pos = -1, int len = 0, char ad = 'a');
set(int pos, int len, char ad); // Setta posizione lunghezza e verso set(int pos, int len, char ad); // Setta posizione lunghezza e verso
int position() { return f_pos; } // Ritorna prima posizione del campo int position() { return f_pos; } // Ritorna prima posizione del campo
int lenght() { return f_len; } // Ritorna lunghezza del campo e tipo int lenght() { return f_len; } // Ritorna lunghezza del campo e tipo
char direction() { return ad; } // Ritorna verso dell'ordinamento char direction() { return ad; } // Ritorna verso dell'ordinamento
}; };
#endif // __SORTFLD_H #endif // __SORTFLD_H

View File

@ -5,11 +5,11 @@ TStack::TStack(int size) : TArray(size), _sp(0)
void TStack::push(const TObject& o) void TStack::push(const TObject& o)
{ {
add(o, _sp++); add(o, _sp++);
} }
TObject& TStack::pop() TObject& TStack::pop()
{ {
CHECK(count() > 0, "Stack underflow!"); CHECK(count() > 0, "Stack underflow!");
return (*this)[--_sp]; return (*this)[--_sp];
} }

View File

@ -11,16 +11,16 @@
class TStack : private TArray class TStack : private TArray
{ {
// @DPRIV // @DPRIV
int _sp; // Puntatore alla cima dello stack int _sp; // Puntatore alla cima dello stack
public: public:
// @FPUB // @FPUB
TStack(int size); // Chiama il costruttore di TArray(size) TStack(int size); // Chiama il costruttore di TArray(size)
int count() const { return _sp; } // Ritorna il puntatore allo stack int count() const { return _sp; } // Ritorna il puntatore allo stack
void push(const TObject&); // Aggiunge un oggetto sullo stack void push(const TObject&); // Aggiunge un oggetto sullo stack
TObject& pop(); // Ritorna il primo oggetto sulla cima dello stack TObject& pop(); // Ritorna il primo oggetto sulla cima dello stack
}; };
#endif #endif

View File

@ -7,14 +7,14 @@
class TSystem_cursor : public TCursor class TSystem_cursor : public TCursor
{ {
virtual TRecnotype buildcursor(TRecnotype rp); virtual TRecnotype buildcursor(TRecnotype rp);
public: public:
void mark_deleted(bool deleted = FALSE); void mark_deleted(bool deleted = FALSE);
void recall() { mark_deleted(FALSE);} void recall() { mark_deleted(FALSE);}
TSystem_cursor(TRelation* f, const char* filter = "", int key = 1, TRectype* from = NULL, TRectype* to = NULL) : TCursor(f, filter, key, from, to) {} TSystem_cursor(TRelation* f, const char* filter = "", int key = 1, TRectype* from = NULL, TRectype* to = NULL) : TCursor(f, filter, key, from, to) {}
virtual ~TSystem_cursor() {} virtual ~TSystem_cursor() {}
}; };
#endif #endif

View File

@ -2,9 +2,9 @@
#define __SYSFLD_H #define __SYSFLD_H
/* @M */ /* @M */
#define RFLD_SYS_DATE "_DAL" #define RFLD_SYS_DATE "_DAL"
#define RFLD_SYS_FIRST "_FLNK" #define RFLD_SYS_FIRST "_FLNK"
#define RFLD_SYS_LAST "_LLNK" #define RFLD_SYS_LAST "_LLNK"
/* @END */ /* @END */
#endif // __SYSFLD_H #endif // __SYSFLD_H

View File

@ -1,4 +1,4 @@
// $Id: value.h,v 1.1.1.1 1994-08-12 10:52:08 alex Exp $ // $Id: value.h,v 1.2 1994-12-29 14:51:40 villa Exp $
// language types for Simulation and SimulationManager // language types for Simulation and SimulationManager
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
@ -18,7 +18,7 @@
enum basetype enum basetype
{ {
UNDEFINED, VOID, INT, LONG, CHAR, DOUBLE, STRING UNDEFINED, VOID, INT, LONG, CHAR, DOUBLE, STRING
}; };
class Value class Value
{ {
@ -41,19 +41,19 @@ public:
Value(char c) { sprintf(_buf,"%c",c); _type = CHAR; } Value(char c) { sprintf(_buf,"%c",c); _type = CHAR; }
Value(double d) { sprintf(_buf,"%lf",d); _type = DOUBLE; } Value(double d) { sprintf(_buf,"%lf",d); _type = DOUBLE; }
Value(Value& vl){ strcpy(_buf,vl._buf); v = vl.v; _s = vl._s; Value(Value& vl){ strcpy(_buf,vl._buf); v = vl.v; _s = vl._s;
_type = vl._type; } _type = vl._type; }
enum basetype type() { return _type; } enum basetype type() { return _type; }
operator int() { sscanf(_type == STRING ? _s : _buf,"%d",&(v.i)); operator int() { sscanf(_type == STRING ? _s : _buf,"%d",&(v.i));
return v.i; } return v.i; }
operator double() { sscanf(_type == STRING ? _s : _buf,"%lf",&(v.d)); operator double() { sscanf(_type == STRING ? _s : _buf,"%lf",&(v.d));
return v.d; } return v.d; }
operator char*() { return _type == STRING ? _s : _buf; } operator char*() { return _type == STRING ? _s : _buf; }
operator long() { sscanf(_type == STRING ? _s : _buf,"%ld",&(v.l)); operator long() { sscanf(_type == STRING ? _s : _buf,"%ld",&(v.l));
return v.l; } return v.l; }
operator char() { sscanf(_type == STRING ? _s : _buf,"%c",&(v.c)); operator char() { sscanf(_type == STRING ? _s : _buf,"%c",&(v.c));
return v.c; } return v.c; }
Value& operator=(const Value& val); Value& operator=(const Value& val);
}; };

View File

@ -1967,23 +1967,23 @@ void TViswin::find_next()
} }
TViswin ::TViswin (const char *fname, TViswin::TViswin(const char *fname,
const char *title, const char *title,
bool editbutton, bool editbutton,
bool printbutton, bool printbutton,
bool linkbutton, bool linkbutton,
int x, int y, int x, int y,
int height, int width, int height, int width,
bool rulers, bool rulers,
WINDOW parent, WINDOW parent,
TBrowsefile_field* brwfld): TBrowsefile_field* brwfld):
_filename (fname), _txt (fname, BUFFERSIZE), _islink (linkbutton), _isedit (editbutton), _filename (fname), _txt (fname, BUFFERSIZE), _islink (linkbutton), _isedit (editbutton),
_isprint (printbutton), _isbar (FALSE), _istimer (FALSE), _iscross (FALSE), _isprint (printbutton), _isbar (FALSE), _istimer (FALSE), _iscross (FALSE),
_isselection (FALSE), _sel_displayed (FALSE), _cross_displayed (FALSE), _isselection (FALSE), _sel_displayed (FALSE), _cross_displayed (FALSE),
_link_displayed (FALSE), _point_displayed (FALSE), _selecting (FALSE), _link_displayed (FALSE), _point_displayed (FALSE), _selecting (FALSE),
_scrolling (FALSE), _selflag (FALSE), _need_update (TRUE), _need_scroll (none), _scrolling (FALSE), _selflag (FALSE), _need_update (TRUE), _need_scroll (none),
_multiple (FALSE), _rulers(rulers), _txt_to_find(64), _multiple (FALSE), _rulers(rulers), _txt_to_find(64),
_frozen (FALSE), _brwfld(brwfld), _link_button(-1), _down_dir(TRUE) _frozen (FALSE), _brwfld(brwfld), _link_button(-1), _down_dir(TRUE)
{ {
if (title == NULL) if (title == NULL)
title = (fname ? fname : "Anteprima di stampa"); title = (fname ? fname : "Anteprima di stampa");
@ -2070,7 +2070,7 @@ TViswin ::TViswin (const char *fname,
_curbut = 0; _curbut = 0;
if (_isopen) if (_isopen)
_wtimer = set_timer (win (), 150l); _wtimer = set_timer(win(), 150l);
_point.set (0, 0); _point.set (0, 0);
autoscroll (FALSE); autoscroll (FALSE);