Patch level : 10.0 1008

Files correlati     : db0.exe
Ricompilazione Demo : [ ]
Commento            :
Corretta libreria sheet per sistemare controlli in immissione distinta base


git-svn-id: svn://10.65.10.50/branches/R_10_00@22145 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2011-05-23 09:41:12 +00:00
parent 213cb02697
commit d3d6dfb730
3 changed files with 47 additions and 22 deletions

View File

@ -1,26 +1,32 @@
#ifndef __ALLEG_H #ifndef __ALLEG_H
#define __ALLEG_H #define __ALLEG_H
#define ALL_ANNO "ANNO" #define DEFFLD(fldname) const char* const ALL_##fldname = #fldname;
#define ALL_CODATT "CODATT"
#define ALL_TIPOCF "TIPOCF"
#define ALL_CODCF "CODCF"
#define ALL_IMMESSO "IMMESSO"
#define ALL_PROG101102 "PROG101102"
#define ALL_IMPESC "IMPESC" // Key 1 = ANNO+CODATT+PROGR
#define ALL_IVAESC "IVAESC" DEFFLD(ANNO)
#define ALL_NIESC "NIESC" DEFFLD(CODATT)
#define ALL_E8ESC "E8ESC" DEFFLD(PROGR)
#define ALL_NDOCESC "NDOCESC"
#define ALL_NALLESC "NALLESC"
#define ALL_IMPESP "IMPESP" // Key 2 = TIPOCF+CODCF+OCFPI+PROGR
#define ALL_IVAESP "IVAESP" DEFFLD(TIPOCF)
#define ALL_NIESP "NIESP" DEFFLD(CODCF)
#define ALL_E8ESP "E8ESP" DEFFLD(OCFPI)
#define ALL_NDOCESP "NDOCESP"
#define ALL_NALLESP "NALLESP" // Key 3 = NUMREG
DEFFLD(NUMREG) // Can be null
// Flags
DEFFLD(IGNORA)
// Content fields
DEFFLD(DATAREG)
DEFFLD(CORRISP)
DEFFLD(IMPOSTA)
DEFFLD(TIPIMP)
DEFFLD(TIPOPE)
#undef DEFFLD
#endif #endif

View File

@ -67,6 +67,18 @@ short low_get_focus_id(WINDOW win)
return obj->cid; return obj->cid;
} }
void low_set_focus_id(WINDOW win, short id)
{
XI_OBJ * itf = xi_get_itf((XinWindow)win);
if (id > 0)
{
// TO BE IMPLEMENTED
}
else
xi_set_focus(itf);
}
KEY TControl::xiev_to_key(const XI_EVENT* xiev) KEY TControl::xiev_to_key(const XI_EVENT* xiev)
{ {

View File

@ -2589,7 +2589,7 @@ bool TSpreadsheet::error_box(const char* msg)
TMask& m = owner().mask(); TMask& m = owner().mask();
m.set_focus_field(owner().dlg()); m.set_focus_field(owner().dlg());
set_focus_cell(r, c); set_focus_cell(min(r, items()-1), c);
xvt_win_set_caret_visible(parent(), true); xvt_win_set_caret_visible(parent(), true);
_check_enabled = true; _check_enabled = true;
return false; return false;
@ -3284,14 +3284,21 @@ void TSheet_field::row2mask(int n, TToken_string& r, int mode)
if (mode > 0) if (mode > 0)
{ {
WINDOW last_parent = NULL_WIN;
FOR_EACH_MASK_FIELD(m, i, f) FOR_EACH_MASK_FIELD(m, i, f)
{ {
const short id = f->dlg(); const short id = f->dlg();
if (id >= FIRST_FIELD && if (id >= FIRST_FIELD && (f->active() || f->ghost()) &&
!f->is_kind_of(CLASS_BUTTON_FIELD) && !f->is_kind_of(CLASS_BUTTON_TOOL) && !f->is_kind_of(CLASS_BUTTON_FIELD) && !f->is_kind_of(CLASS_BUTTON_TOOL))
(f->active() || f->ghost()))
{ {
WINDOW current_parent = f->parent();
if (current_parent != last_parent)
{
// Assegna il focus all'interfaccia per evitare effetti indesiderati durante i messaggi
low_set_focus_id(f->parent(), -1);
}
if (f->has_check() && (mode & 0x1)) if (f->has_check() && (mode & 0x1))
f->check(STARTING_CHECK); f->check(STARTING_CHECK);
f->set_dirty(false); f->set_dirty(false);