From 76925a865205a2f63e27c1471cef37b69e14eb7d Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 2 Feb 1998 13:42:43 +0000 Subject: [PATCH] cg2100c.uml Allargata ricerca sui cambi giornalieri cg2100s.uml Corretta posizione del residuo rata cg3600.cpp Adattata la visualizzazione mastrini all XI_R4 Ora col tasto ENTER si possono espandere le riga di mastrino Errore MI6287 cg3700.cpp Corretta gestione date di stampa. Errori 6285 e 6286 git-svn-id: svn://10.65.10.50/trunk@6081 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- cg/cg2100.cpp | 2 +- cg/cg2100c.uml | 2 +- cg/cg2100s.uml | 2 +- cg/cg3600.cpp | 44 ++++++++++++++++++++++++++++---------------- cg/cg3700.cpp | 16 ++++++++-------- 5 files changed, 39 insertions(+), 27 deletions(-) diff --git a/cg/cg2100.cpp b/cg/cg2100.cpp index 552f0a99d..7ef2cc2e7 100755 --- a/cg/cg2100.cpp +++ b/cg/cg2100.cpp @@ -1,9 +1,9 @@ #include +#include #include #include #include #include -#include #include #include "cgpagame.h" diff --git a/cg/cg2100c.uml b/cg/cg2100c.uml index 4dfb3c265..3e9a3722e 100755 --- a/cg/cg2100c.uml +++ b/cg/cg2100c.uml @@ -429,7 +429,7 @@ BEGIN DISPLAY "Cod" CODTAB[1,3] DISPLAY "Data@10" D0 DISPLAY "Cambio@18" R10 - DISPLAY "Valuta@50" 104@->S0 + DISPLAY "Valuta@60" 104@->S0 OUTPUT SK_DATACAMBIO D0 OUTPUT SK_CAMBIO R10 GROUP 3 diff --git a/cg/cg2100s.uml b/cg/cg2100s.uml index 14941667d..7c6df3550 100755 --- a/cg/cg2100s.uml +++ b/cg/cg2100s.uml @@ -90,7 +90,7 @@ END NUMBER S_RESIDUORATA 18 BEGIN - PROMPT 48 5 "Residuo rata " + PROMPT 46 5 "Residuo rata " PICTURE "." FLAGS "DRV" END diff --git a/cg/cg3600.cpp b/cg/cg3600.cpp index 1f45e10f6..595b717df 100755 --- a/cg/cg3600.cpp +++ b/cg/cg3600.cpp @@ -1,3 +1,5 @@ +#include + #include #include #include @@ -1180,7 +1182,7 @@ TGrid_control::TGrid_control( } // Calcola rettangolo massimo per lo sheet - XI_RCT rct; coord2rct(parent, x, y, dx, dy, rct); + RCT rct; coord2rct(parent, x, y, dx, dy, rct); rct.right -= 2*XI_FU_MULTIPLE; // toglie scroll-bar // Controlla se ci sono troppe colonne fisse @@ -1200,7 +1202,11 @@ TGrid_control::TGrid_control( listdef->app_data = (long)this; XI_LIST_DEF* l = listdef->v.list; +#ifdef XI_R4 + l->min_heading_height = xi_button_calc_height_font(xi_get_system_font()) * lines_in_header; +#else l->min_heading_height = xi_button_calc_height_font_id(xvt_default_font()) * lines_in_header; +#endif l->sizable_columns = TRUE; l->movable_columns = TRUE; l->fixed_columns = fixed_columns; @@ -1243,7 +1249,7 @@ TGrid_control::TGrid_control( cd->wrap_text = _type[i] != 'R'; } - RCT rd; xi_get_def_rect(listdef, &rd); + RCT rd; xi_get_def_rect(listdef, (XinRect*)&rd); if ((rd.right - rd.left) > (rct.right - rct.left)) l->width = rct.right - rct.left; @@ -1258,7 +1264,7 @@ TGrid_control::TGrid_control( XI_OBJ** column = xi_get_member_list(_obj, &num); for (i = 0; i < num; i++) { - RCT rct; xi_get_rect(column[i], &rct); + RCT rct; xi_get_rect(column[i], (XinRect*)&rct); _default_width[i] = rct.right - rct.left; } } @@ -1526,11 +1532,13 @@ bool TGrid_control::event_handler(XI_OBJ* itf, XI_EVENT *xiev) { const long rec = row2rec(xiev->v.select.xi_obj->v.row_data.row); if (try_to_select(rec)) - { + { if (xiev->v.select.column == 0) - { - _cur_rec = rec; // Assegno subito il record corrente - _grid->on_record_button(rec); + { +#ifndef XI_R4 + _cur_rec = rec; // Assegno subito il record corrente + _grid->on_record_button(rec); +#endif } else { @@ -1683,7 +1691,7 @@ void TGrid_control::set_columns_order(TToken_string* order) if (col) { xi_move_column(col, index); - RCT rct; xi_get_rect(col, &rct); + RCT rct; xi_get_rect(col, (XinRect*)&rct); if (_default_width[index] != rct.right - rct.left) xi_column_set_pixel_width(col, _default_width[index]-offset); } @@ -1763,7 +1771,7 @@ void TGrid_control::save_columns_order() const head.insert("n", acapo+1); } order.add(head); - RCT rct; xi_get_rect(column[i], &rct); + RCT rct; xi_get_rect(column[i], (XinRect*)&rct); order << ',' << rct.right - rct.left; } config.set("Browse", order, NULL, TRUE, id()); @@ -1885,7 +1893,7 @@ bool TGrid_field::parse_item(TScanner& scanner) bool TGrid_field::handler(XI_EVENT* xiev) -{ +{ return FALSE; } @@ -2142,11 +2150,11 @@ protected: // TGrid_field virtual void cell_request(long rec, short id, TGrid_cell& cell); virtual void on_grid_button(); virtual bool on_resize_column(short id, int new_size); - virtual void on_dbl_cell(long rec, short id); void update_mask() const; public: + virtual void on_dbl_cell(long rec, short id); virtual void on_record_button(long rec); virtual long items() const { return _mastrino.items(); } @@ -2336,7 +2344,7 @@ void TMastrini_grid::on_dbl_cell(long rec, short id) else _mastrino.collapse(rec); update(); -} +} void TMastrini_grid::on_grid_button() { @@ -2406,7 +2414,7 @@ void TMastrini_grid::on_grid_button() void TMastrini_grid::on_record_button(long rec) { - begin_wait(); + TWait_cursor hourglass; const TRectype& testata = _mastrino.testata(rec); TString text; @@ -2426,8 +2434,6 @@ void TMastrini_grid::on_record_button(long rec) if (yesno_box("Si desidera aggiornare il mastrino?")) reread(); } - - end_wait(); } // Posso ridimensionare solo le descrizioni, le altre devono rimanere fisse per @@ -2523,7 +2529,7 @@ protected: // TMask virtual TMask_field* parse_field(TScanner& sc); virtual bool on_key(KEY k); virtual void handler(WINDOW win, EVENT* ep); - + static bool link_handler(TMask_field& f, KEY k); public: @@ -2590,6 +2596,12 @@ bool TGrid_mask::on_key(KEY k) break; case K_LEND: rec = _grid->items()-1; + break; + case K_ENTER: + case K_CTRL+'+': + case K_CTRL+'-': + if (focus_field().dlg() == _grid->dlg()) + _grid->on_dbl_cell(rec, DLG_USER); break; default: break; diff --git a/cg/cg3700.cpp b/cg/cg3700.cpp index be8cbed1f..bb1965517 100755 --- a/cg/cg3700.cpp +++ b/cg/cg3700.cpp @@ -180,16 +180,16 @@ bool TLista_fatture::filter_func2(const TRelation *r) } bool TLista_fatture::date_handler(TMask_field& f, KEY key) -{ - if (key == K_TAB && f.mask().is_running()) +{ + if (key == K_ENTER && f.empty()) { - if (f.get().empty()) - if (f.dlg() == FLD_DATE_FROM) - return f.error_box("La data di inizio e' obbligatoria."); - else - return f.error_box("La data di fine e' obbligatoria."); + if (f.dlg() == FLD_DATE_FROM) + return f.error_box("La data di inizio e' obbligatoria."); + else + return f.error_box("La data di fine e' obbligatoria."); } - if (f.to_check(key)) + + if ((key == K_TAB && f.focusdirty()) || key == K_ENTER) { TMask& m = f.mask(); TDate da(m.get_date(FLD_DATE_FROM));