config.h Aggiunto const al metodo TConfig::name()
controls.cpp Abbassati legermente i checkbox mask.cpp Corretto controllo sulle maschere multipagina non a tutto schermo maskfld.cpp Corretto passaggio al campo successivo doppo un tasto F9 msksheet.cpp Corretta gestione del messaggio di inizializzazione in modo da cercare di andare sempre sulla prima riga progind.cpp Corretto calcolo della percentuale (arrotondato e non troncato) relapp.h Reso pubblico il metoto TRelation_application::lnflag() const git-svn-id: svn://10.65.10.50/trunk@3573 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
cff0f60580
commit
f9b938f706
@ -133,7 +133,7 @@ public:
|
||||
const TAssoc_array& list_variables(const char* section = NULL);
|
||||
|
||||
// @cmember Ritorna il nome del file di configurazione
|
||||
const TFilename & name() { return _file; }
|
||||
const TFilename& name() const { return _file; }
|
||||
|
||||
// @cmember Costruttore (il paragrafo iniziale e' il modulo corrente
|
||||
// salvo diversa indicazione)
|
||||
|
@ -1253,7 +1253,7 @@ void TButton_control::create(WINDOW win, short cid,
|
||||
if (wc == WC_CHECKBOX || wc == WC_RADIOBUTTON)
|
||||
{
|
||||
RCT& r = _obj->v.btn->rct;
|
||||
r.top++; r.bottom++;
|
||||
r.top++; r.bottom-=2;
|
||||
r.right += XI_FU_MULTIPLE / 2;
|
||||
}
|
||||
|
||||
@ -1443,7 +1443,7 @@ void TPushbutton_control::update()
|
||||
|
||||
if (_underscore >= 0)
|
||||
{
|
||||
TString cap = _caption;
|
||||
TString80 cap = _caption;
|
||||
cap[_underscore] = '_';
|
||||
xvt_dwin_draw_text(win, x, y, (char*)(const char*)cap, _underscore+1);
|
||||
}
|
||||
|
@ -778,15 +778,18 @@ WINDOW TMask::read_page(
|
||||
if (!orecchie && !toolbar) // Controlla se la maschera ha piu' di una pagina
|
||||
{
|
||||
const streampos pos = scanner.tellg(); // Memorizza posizione dello scanner
|
||||
TString l(scanner.line());
|
||||
while (l != "ENDMASK" && l.not_empty())
|
||||
while (TRUE)
|
||||
{
|
||||
if (l == "PA") // Ho trovato un'altra pagina!
|
||||
const TString& l = scanner.line();
|
||||
|
||||
if (l.empty() || l == "ENDMASK") // Fine maschera
|
||||
break;
|
||||
|
||||
if (l.compare("PA", 2, TRUE) == 0) // Ho trovato un'altra pagina!
|
||||
{
|
||||
orecchie = TRUE; // Quindi devo metterci le orecchie
|
||||
break;
|
||||
}
|
||||
l = scanner.line();
|
||||
}
|
||||
scanner.seekg(pos); // Ripristina posizione dello scanner
|
||||
}
|
||||
|
@ -990,7 +990,7 @@ void TButton_field::create(WINDOW parent)
|
||||
if (_ctl_data._prompt.empty())
|
||||
_ctl_data._prompt = "~Conferma";
|
||||
_virtual_key = 'C';
|
||||
_exit_key = K_ENTER;
|
||||
_exit_key = K_ENTER;
|
||||
if (_ctl_data._bmp_up == 0)
|
||||
_ctl_data._bmp_up = BMP_OK;
|
||||
break;
|
||||
@ -1250,10 +1250,9 @@ bool TEditable_field::test_key_complete(bool normal) const
|
||||
bool complete = TRUE;
|
||||
for (TEditable_field* e = m.get_key_field(k, TRUE); e; e = m.get_key_field(k, FALSE))
|
||||
{
|
||||
e->set_dirty(FALSE);
|
||||
if ((e->class_id() != CLASS_LIST_FIELD) &&
|
||||
(e->class_id() != CLASS_BOOLEAN_FIELD))
|
||||
complete &= (e->required());
|
||||
e->set_focusdirty(FALSE);
|
||||
if (e->is_edit())
|
||||
complete &= e->required();
|
||||
}
|
||||
if (normal && !complete)
|
||||
m.set_test_field(dlg());
|
||||
@ -2871,13 +2870,12 @@ bool TEdit_field::on_key(KEY key)
|
||||
{
|
||||
set_focusdirty(FALSE); // Evita doppia esecuzione handlers!
|
||||
if (m.query_mode() && in_key(0))
|
||||
{
|
||||
test_key_complete();
|
||||
}
|
||||
// else
|
||||
// {
|
||||
send_key(K_TAB, 0); // Passa al campo successivo
|
||||
// }
|
||||
if (m.is_running())
|
||||
{
|
||||
set_focusdirty(FALSE);
|
||||
send_key(K_TAB, 0); // Passa al campo successivo
|
||||
}
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
|
@ -1537,7 +1537,7 @@ void TSpreadsheet::enable_column(
|
||||
else attr &= ~XI_ATR_ENABLED;
|
||||
|
||||
xi_set_attrib(column, attr); // Set new attributes
|
||||
update(-1);
|
||||
// update(-1); // Guy: Meno andi e rivieni
|
||||
}
|
||||
}
|
||||
|
||||
@ -1963,9 +1963,13 @@ TMask& TSheet_field::sheet_mask() const
|
||||
|
||||
bool TSheet_field::on_hit()
|
||||
{
|
||||
if (!mask().is_running())
|
||||
if (!mask().is_running()) // Inizializzazione maschera
|
||||
{
|
||||
force_update();
|
||||
|
||||
mask().notify_focus_field(dlg()); // Fa' credere alla maschera che ha il focus ...
|
||||
select(0); // ... cosi' la set_focus_cell funziona bene
|
||||
|
||||
set_dirty(FALSE);
|
||||
}
|
||||
return TRUE;
|
||||
@ -1987,8 +1991,6 @@ bool TSheet_field::on_key(KEY k)
|
||||
if (!s->test_focus_change())
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
select(0);
|
||||
}
|
||||
|
||||
if (k == K_ROWEDIT && items() > 0)
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include <math.h>
|
||||
|
||||
#include <defmask.h>
|
||||
#include <progind.h>
|
||||
#include <controls.h>
|
||||
@ -122,7 +124,7 @@ void TIndwin::update_bar()
|
||||
b.left = b.right; b.right = r.right;
|
||||
xi_draw_3d_rect(w, &b, TRUE, 2, 0, 0, 0);
|
||||
|
||||
char n[8]; sprintf(n, "%d%%", int(100*prc));
|
||||
char n[8]; sprintf(n, "%d%%", (int)floor(prc * 100.0 + 0.5));
|
||||
xvt_dwin_draw_text(w, r.left+r.right/2-CHARX, (r.bottom+r.top+CHARY)/2-3, n, -1);
|
||||
|
||||
check_stop();
|
||||
|
@ -120,9 +120,6 @@ protected:
|
||||
bool modify_mode();
|
||||
// @cmember Legge i campi chiave della maschera e setta il cursore relativo
|
||||
void setkey();
|
||||
// @cmember Ritorna se e' stato chiamato col messaggio di link
|
||||
bool lnflag() const
|
||||
{ return _lnflag;}
|
||||
// @cmember Indica se la futura <mf TRelation_application::get_mask> ritornera' una maschera diversa
|
||||
// dalla corrente.
|
||||
// <nl>La richiesta della maschera da utilizzare per ogni fase di lavoro
|
||||
@ -200,6 +197,9 @@ public:
|
||||
bool find(byte key = 0);
|
||||
// @cmember Costruisce il membro <md TRelation_application::_fixed>
|
||||
void set_link(TMask & m, const char * keyexpr);
|
||||
// @cmember Ritorna se e' stato chiamato col messaggio di link
|
||||
bool lnflag() const
|
||||
{ return _lnflag;}
|
||||
|
||||
// @cmember Costruttore
|
||||
TRelation_application();
|
||||
|
Loading…
x
Reference in New Issue
Block a user