array.cpp Corretto commento sul metodo TBit_array:copy

form.cpp     Aggiunta gestione del rapporto tra i caratteri in god-mode
isam.cpp     Corretto metodo dump quando riceve un file non valido
maskfld.cpp  Modificato metodo on_key degli TOperable per i tasti funzione
msksheet.cpp Corrtto metodo on_key per gestire meglio il cambio pagina
sheet.cpp    Corretto aggiornamento della colonna dei checks
xvtility.cpp


git-svn-id: svn://10.65.10.50/trunk@3175 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1996-07-10 07:28:26 +00:00
parent 93d31cbd5f
commit 41b7692b62
7 changed files with 69 additions and 51 deletions

View File

@ -544,11 +544,11 @@ TBit_array::TBit_array(long size) : _bit(NULL), _size(0)
// @doc EXTERNAL
// @mfunc Copia nell'array l'elemento passato come parametro
// @mfunc Copia l'array passato come parametro
void TBit_array::copy(
const TBit_array& ba) // @parm Oggetto da copiare nell'array
const TBit_array& ba) // @parm Array da copiare
// @comm Sostituisce all'elemento corrente dell'array l'elemento passato come parametro.
// @comm Copia il contenuto dell'array passato come parametro.
{
if (_bit)
{

View File

@ -2386,6 +2386,21 @@ void TPrint_section::repos_fields(const char* name, int size)
xvt_print_start_thread (wpr, (long)&prm);
xvt_print_close();
if (ps.form().edit_level() > 1)
{
TMask rm("Rapporto tra i caratteri", 1, 30, 4);
rm.add_number(DLG_USER, 0, "Rapporto ", 1, 1, 8, "", 4);
rm.add_button(DLG_OK, 0, "Conferma", -12, -1, 10, 2);
rm.add_button(DLG_CANCEL, 0, "Annulla", -22, -1, 10, 2);
real ratio = prm.ratio;
rm.set(DLG_USER, ratio);
if (rm.run() == K_ENTER)
{
ratio = rm.get_real(DLG_USER);
prm.ratio = (double)ratio;
}
}
const char sechar[4] = { 'B', 'F', 'G', 'H' };
for (int sn = 0; sn < 4 ; sn++)
{

View File

@ -516,7 +516,7 @@ public:
virtual ~TExtrectype() {}
};
TExtrectype::TExtrectype(const TTrec& r) : TRectype(6)
TExtrectype::TExtrectype(const TTrec& r) : TRectype(r.num())
{
delete _rec;
@ -909,7 +909,8 @@ int TBaseisamfile::readat(TRecnotype nrec, word lockop)
NOT_OPEN();
curr().setdirty();
_lasterr=DB_go(_isamfile->fhnd,nrec);
if (_lasterr != NOERR) _lasterr = get_error(_lasterr);
if (_lasterr != NOERR)
_lasterr = get_error(_lasterr);
else
memcpy(curr().string(),DB_getrecord(_isamfile->fhnd),DB_reclen(_isamfile->fhnd));
_recno = _isamfile->RecNo = DB_recno(_isamfile->fhnd);
@ -2293,15 +2294,16 @@ int TSystemisamfile::dump(
{
FILE* f = fopen(to, "w");
int err = ferror(f);
if (withdeleted) nkey = 0;
if (f == NULL)
{
clearerr(f);
setstatus(err);
return err;
setstatus(2);
return 2;
}
if (withdeleted) nkey = 0;
int err = ferror(f);
open();
TString s(512);
bool fixedlen = (fs == '\0');

View File

@ -486,33 +486,13 @@ bool TMask_field::on_hit()
}
// Certified 90%
// Certified 100%
bool TMask_field::on_key(KEY key)
{
switch(key)
{
case K_F11:
{
TString msg(80);
msg = "State utilizzando il campo ";
msg << dlg() << " della maschera " << mask().source_file();
if (field() != NULL)
msg << "\ncorrispondente al campo su record " << *field();
message_box(msg);
}
break;
case K_F2:
// reset();
set("");
set_dirty();
break;
default:
#ifdef DBG
if (key > K_CTRL)
error_box("Tasto ignorato %d", key);
if (key > K_CTRL)
return error_box("Tasto ignorato %d", key);
#endif
break;
}
return TRUE;
}
@ -703,18 +683,24 @@ void TOperable_field::enable(bool on)
bool TOperable_field::on_key(
KEY key) // @parm Tasto notificato
{
if (key == K_CTRL + K_TAB)
{
mask().notify_focus_field(dlg());
return TRUE;
}
if (key == K_ENTER)
{
const bool ok = handler(K_ENTER);
return ok;
switch(key)
{
case K_F11:
{
TString msg(80);
msg = "State utilizzando il campo ";
msg << dlg() << " della maschera " << mask().source_file();
if (field() != NULL)
msg << "\ncorrispondente al campo su record " << *field();
message_box(msg);
}
break;
case K_CTRL + K_TAB:
mask().notify_focus_field(dlg());
return handler(key);
default:
return handler(key);
}
return TMask_field::on_key(key);
}
@ -2765,7 +2751,7 @@ bool TEdit_field::on_key(KEY key)
{
case K_CTRL+K_TAB:
set_focusdirty(FALSE);
break;
break;
case K_TAB:
if (vf >= 0 && (vf == AUTOEXIT_FUNC || vf == NUMCALC_FUNC || vf == STRCALC_FUNC))
set_focusdirty(); // Forza validate
@ -2857,6 +2843,9 @@ bool TEdit_field::on_key(KEY key)
}
}
break;
case K_F2:
set("");
break;
case K_F9:
if (check_enabled())
{
@ -2894,7 +2883,7 @@ bool TEdit_field::on_key(KEY key)
}
else
if (_browse == NULL && has_button())
handler(K_F9);
return handler(K_F9);
break;
case K_CTRL+K_SPACE:
set_dirty(TRUE);

View File

@ -206,13 +206,14 @@ public:
// @cmember Ritorna il valore della variabile active
bool active() const
{ return _active; }
// @cmember Ritorna se e' possibile lasciare il focus dallo spreadsheet (TRUE se e' possibile)
bool test_focus_change();
// @cmember Setta il membro <p _notify> on il valore <p n>
void set_notify(SPREADSHEET_NOTIFY n)
{ _notify = n; }
// @cmember Costruttore
TSpreadsheet(WINDOW parent, short dlg, short x, short y, short dx, short dy, const char* maskname, int maskno, const char* head, TSheet_field* owner);
// @cmember Distruttore
@ -738,6 +739,12 @@ bool TSpreadsheet::off_cell_handler(XI_OBJ *cell)
mask2str(_cur_rec); // Update sheet row
}
return ok;
}
bool TSpreadsheet::test_focus_change()
{
bool ok = xi_move_focus(get_interface()) ? TRUE : FALSE;
return ok;
}
// Certified 75%
@ -1844,7 +1851,7 @@ bool TSheet_field::on_key(KEY k)
if (focusdirty())
{
TSpreadsheet* s = (TSpreadsheet*)_ctl;
if (!s->off_cell_handler())
if (!s->test_focus_change())
return FALSE;
}
else

View File

@ -396,7 +396,7 @@ void TSheet_control::check(
_checked.set(tot); // Forza le dimensioni del bit array
_checked.set(); // Setta tutti i bit
// Elimina bit in eccesso alla fine dell'array
// Elimina i bit in eccesso alla fine dell'array
for (long i = _checked.items()-1; i > tot; i--)
_checked.reset(i);
@ -410,13 +410,15 @@ void TSheet_control::check(
else
_checked.reset();
// Aggiorna tutta la prima colonna
XI_OBJ* column = xi_get_obj(_obj, FIRST_FIELD+1000);
xi_cell_request(column);
}
else
{
if (!_disabled[n])
_checked.set(n, on);
_checked.set(n, on);
// Aggiorna la riga
XI_OBJ cell; XI_MAKE_CELL(&cell, _obj, rec2row(n), 1);
xi_cell_request(&cell);
}

View File

@ -193,7 +193,10 @@ BOOL deny_another_instance()
BOOL allow_another_instance()
{
#ifdef __NOMUNGE__
return FALSE;
#endif
if ( npHookLoadModule )
return TRUE;