Maskfld : Gestione automatica del bottone Stampa
Printer : Aggiunto const alla setdate Relation: Spostati due metodi dei cursori nella loro parte di file git-svn-id: svn://10.65.10.50/trunk@271 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
7147bd2803
commit
437810f41a
@ -1,4 +1,4 @@
|
|||||||
// $Id: maskfld.cpp,v 1.19 1994-09-16 16:59:05 guy Exp $
|
// $Id: maskfld.cpp,v 1.20 1994-09-20 12:24:49 guy Exp $
|
||||||
#include <xvt.h>
|
#include <xvt.h>
|
||||||
|
|
||||||
#include <applicat.h>
|
#include <applicat.h>
|
||||||
@ -2134,6 +2134,12 @@ void TButton_field::create(WINDOW parent)
|
|||||||
_virtual_key = 'E';
|
_virtual_key = 'E';
|
||||||
_exit_key = K_DEL;
|
_exit_key = K_DEL;
|
||||||
break;
|
break;
|
||||||
|
case DLG_PRINT:
|
||||||
|
if (_prompt.empty())
|
||||||
|
_prompt = "Stampa";
|
||||||
|
_virtual_key = 'S';
|
||||||
|
_exit_key = K_ENTER;
|
||||||
|
break;
|
||||||
case DLG_QUIT:
|
case DLG_QUIT:
|
||||||
if (_prompt.empty())
|
if (_prompt.empty())
|
||||||
_prompt = "Fine";
|
_prompt = "Fine";
|
||||||
|
@ -258,7 +258,7 @@ public:
|
|||||||
bool formfeed ();
|
bool formfeed ();
|
||||||
bool print (TPrintrow& rowtoprint);
|
bool print (TPrintrow& rowtoprint);
|
||||||
bool isopen() { return _isopen; }
|
bool isopen() { return _isopen; }
|
||||||
void setdate(TDate& d) { _date = d; }
|
void setdate(const TDate& d) { _date = d; }
|
||||||
TPrtype printtype() { return _printertype; }
|
TPrtype printtype() { return _printertype; }
|
||||||
void set_printtype(TPrtype dest) { _printertype=dest; }
|
void set_printtype(TPrtype dest) { _printertype=dest; }
|
||||||
void set_printerfile(const char * ffile) { _printerfile=ffile; }
|
void set_printerfile(const char * ffile) { _printerfile=ffile; }
|
||||||
|
@ -181,47 +181,9 @@ char *real::string (int len, int dec, char pad) const
|
|||||||
else
|
else
|
||||||
deltrz (__tmp_real.ptr (), __tmp_real.ptr ());
|
deltrz (__tmp_real.ptr (), __tmp_real.ptr ());
|
||||||
|
|
||||||
// if (len == 0)
|
|
||||||
dtoa (__string, __tmp_real.ptr ());
|
dtoa (__string, __tmp_real.ptr ());
|
||||||
/*
|
|
||||||
* else
|
|
||||||
* {
|
|
||||||
* char f[16];
|
|
||||||
* if (dec == UNDEFINED) sprintf(f, "%%%dt", len);
|
|
||||||
* else
|
|
||||||
* sprintf(f, "%%%d.%dt", len, dec);
|
|
||||||
* dsprintf(__string, f, __tmp_real.ptr());
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* if (dec <= 0 || dec == UNDEFINED) // Toglie una eventuale parte decimale .00
|
|
||||||
* {
|
|
||||||
* if (dot)
|
|
||||||
* {
|
|
||||||
* for (const char* z = dot + 1; *z; z++)
|
|
||||||
* if (*z != '0') break;
|
|
||||||
* if (!*z) *dot = '\0';
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
*/
|
|
||||||
int lun = strlen (__string);
|
int lun = strlen (__string);
|
||||||
|
|
||||||
/*
|
|
||||||
* char* dot = strchr(__string, '.');
|
|
||||||
*
|
|
||||||
* int d = dot ? strlen(dot+1) : 0; // Decimals already there
|
|
||||||
*
|
|
||||||
* if (d < dec)
|
|
||||||
* {
|
|
||||||
* if (dot == NULL) __string[lun++] = '.');
|
|
||||||
* for (;d < dec; d++) __string[lun++] = '0';
|
|
||||||
* __string[lun] = '\0';
|
|
||||||
* } else
|
|
||||||
* if (dec >= 0 && d > dec)
|
|
||||||
* {
|
|
||||||
* *(dot+dec+(dec>0)) = '\0';
|
|
||||||
* lun = strlen(__string);
|
|
||||||
* }
|
|
||||||
*/
|
|
||||||
if (lun < len)
|
if (lun < len)
|
||||||
{
|
{
|
||||||
const int delta = len - lun;
|
const int delta = len - lun;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// $Id: relation.cpp,v 1.7 1994-09-07 17:00:16 guy Exp $
|
// $Id: relation.cpp,v 1.8 1994-09-20 12:24:54 guy Exp $
|
||||||
// relation.cpp
|
// relation.cpp
|
||||||
// fv 12/8/93
|
// fv 12/8/93
|
||||||
// relation class for isam files
|
// relation class for isam files
|
||||||
@ -1144,6 +1144,19 @@ TRecnotype TCursor::items()
|
|||||||
return _totrec;
|
return _totrec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool TCursor::next_match(int lognum, const char* fl, int nk)
|
||||||
|
{
|
||||||
|
if (lognum == 0 || lognum == file()->num())
|
||||||
|
{++(*this); return file()->good(); }
|
||||||
|
else return _if->next_match(lognum, fl, nk);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TCursor::is_first_match(int ln)
|
||||||
|
{
|
||||||
|
return (ln == 0 || ln == file()->num()) ?
|
||||||
|
(_pos == 0 && file()->good()) : (_if->is_first_match(ln));
|
||||||
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// TFieldRef
|
// TFieldRef
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
@ -1166,8 +1179,7 @@ int name2log(const char* name)
|
|||||||
log = TTable::name2log(name);
|
log = TTable::name2log(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (log == 0)
|
CHECKS(log != 0, "Non e' un file ne' una tabella: ", name);
|
||||||
fatal_box("'%s' non e' un file o una tabella", name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return log;
|
return log;
|
||||||
@ -1311,18 +1323,5 @@ int TFieldref::len(TRectype &rec) const
|
|||||||
return len - _from;
|
return len - _from;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TCursor::next_match(int lognum, const char* fl, int nk)
|
|
||||||
{
|
|
||||||
if (lognum == 0 || lognum == file()->num())
|
|
||||||
{++(*this); return file()->good(); }
|
|
||||||
else return _if->next_match(lognum, fl, nk);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool TCursor::is_first_match(int ln)
|
|
||||||
{
|
|
||||||
return (ln == 0 || ln == file()->num()) ?
|
|
||||||
(_pos == 0 && file()->good()) : (_if->is_first_match(ln));
|
|
||||||
}
|
|
||||||
|
|
||||||
// *** EOF relation.cpp
|
// *** EOF relation.cpp
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user