From 34a22bc6c8f264557989af4a34d478ee8c0ed081 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 6 Mar 2009 12:12:02 +0000 Subject: [PATCH] Patch level : 10.0 252 Files correlati : ba8.exe ba8300?.msk Ricompilazione Demo : [ ] Commento : Rimodernate tutte le maschere dell'editor di report git-svn-id: svn://10.65.10.50/trunk@18435 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ba/ba8300.cpp | 22 +++++++++++++++++----- ba/ba8300a.uml | 47 ++++++++++++++++------------------------------- ba/ba8300b.uml | 11 +++++++++-- ba/ba8300c.uml | 7 +++++++ ba/ba8300d.uml | 17 ++++++++++++----- ba/ba8300e.uml | 14 +++++++++----- ba/ba8300f.uml | 30 ++++++++++++++++++++++++++---- ba/ba8301.cpp | 18 +++++++++++------- 8 files changed, 107 insertions(+), 59 deletions(-) diff --git a/ba/ba8300.cpp b/ba/ba8300.cpp index cd62edfae..77f54759d 100755 --- a/ba/ba8300.cpp +++ b/ba/ba8300.cpp @@ -601,7 +601,7 @@ protected: void update_toolbar(); // Aggiorna dis/abilitazioni dei bottoni public: - void on_print(); + void on_print(bool preview); void on_pdf(); bool save_report(); bool save_if_needed(); @@ -728,7 +728,7 @@ bool TReport_mask::delete_report() return ok; } -void TReport_mask::on_print() +void TReport_mask::on_print(bool preview) { const TString& app = _report.command_line(); if (app.full() && yesno_box(FR("Si desidera stampare utilizzando '%s'"), (const char*)app)) @@ -746,7 +746,10 @@ void TReport_mask::on_print() TReport_book book; #endif book.add(_report); - book.print_or_preview(); + if (preview) + book.preview(); + else + book.print(); } } @@ -1080,6 +1083,7 @@ void TReport_mask::report_query() _is_dirty = true; const bool ok = _report.recordset() != NULL; enable(DLG_PRINT, ok); + enable(DLG_PREVIEW, ok); enable(DLG_PDF, ok); } } @@ -1101,6 +1105,7 @@ void TReport_mask::update_toolbar() enable(DLG_DELREC, full); const bool printok = full && _report.recordset() != NULL; enable(DLG_PRINT, printok); + enable(DLG_PREVIEW, printok); enable(DLG_PDF, printok); } @@ -1156,7 +1161,14 @@ bool TReport_mask::on_field_event(TOperable_field& o, TField_event e, long jolly case DLG_PRINT: if (e == fe_button) { - on_print(); + on_print(false); + return false; + } + break; + case DLG_PREVIEW: + if (e == fe_button) + { + on_print(true); return false; } break; @@ -1309,7 +1321,7 @@ public: void TReporter_app::print() { if (_msk != NULL) - _msk->on_print(); + _msk->on_print(false); } bool TReporter_app::create() diff --git a/ba/ba8300a.uml b/ba/ba8300a.uml index c2f04109d..3ebc4bfc3 100755 --- a/ba/ba8300a.uml +++ b/ba/ba8300a.uml @@ -1,6 +1,6 @@ #include "ba8300.h" -TOOLBAR "" 0 -1 0 0 +TOOLBAR "" 0 -1 0 1 STRING F_CODICE 256 24 BEGIN @@ -22,25 +22,25 @@ TOOLBAR "" 0 0 0 2 BUTTON DLG_NEWREC 10 2 BEGIN PROMPT 1 0 "Nuovo" - PICTURE BMP_NEWREC + PICTURE TOOL_NEWREC END BUTTON DLG_FINDREC 10 2 BEGIN PROMPT 2 0 "Carica" - PICTURE 166 + PICTURE TOOL_LENTE END BUTTON DLG_SAVEREC 10 2 BEGIN PROMPT 3 0 "Salva" - PICTURE BMP_SAVEREC + PICTURE TOOL_SAVEREC END BUTTON DLG_DELREC 10 2 BEGIN PROMPT 4 0 "Elimina" - PICTURE BMP_DELREC + PICTURE TOOL_DELREC END BUTTON DLG_NULL 10 2 @@ -50,43 +50,28 @@ END BUTTON DLG_SETPRINT 2 2 BEGIN PROMPT 5 0 "Imposta" - PICTURE BMP_SETPRINT + PICTURE TOOL_SETPRINT END BUTTON DLG_PRINT 2 2 BEGIN PROMPT 6 0 "Stampa" - PICTURE BMP_PRINT + PICTURE TOOL_PRINT +END + +BUTTON DLG_PREVIEW 2 2 +BEGIN + PROMPT 7 0 "Anteprima" + PICTURE TOOL_PREVIEW END BUTTON DLG_PDF 2 2 BEGIN - PROMPT 7 0 "PDF" - PICTURE BMP_PDF + PROMPT 8 0 "PDF" + PICTURE TOOL_PDF END -BUTTON DLG_NULL 2 2 -BEGIN -END - -BUTTON DLG_INFO 2 2 -BEGIN - PROMPT 8 0 "Informazioni" - MESSAGE EXIT,K_F2 - PICTURE 162 -END - -BUTTON DLG_HELP 2 2 -BEGIN - PROMPT 9 0 "Help" - MESSAGE EXIT,K_F1 - PICTURE 163 -END - -BUTTON DLG_QUIT 2 2 -BEGIN - PROMPT 10 0 "" -END +#include ENDPAGE diff --git a/ba/ba8300b.uml b/ba/ba8300b.uml index 6005d8dbd..f1961403f 100755 --- a/ba/ba8300b.uml +++ b/ba/ba8300b.uml @@ -229,10 +229,17 @@ BEGIN PROMPT -24 -1 "" END +BUTTON DLG_BAR 10 2 +BEGIN + PROMPT -24 -1 "Font" + PICTURE TOOL_FONT + MESSAGE K_SPACE,F_FONT_SELECT +END + BUTTON DLG_FINDREC 10 2 BEGIN - PROMPT -34, 9 "" - PICTURE 166 + PROMPT -34, 9 "Campo" + PICTURE TOOL_LENTE END BUTTON DLG_CANCEL 10 2 diff --git a/ba/ba8300c.uml b/ba/ba8300c.uml index f8b89c4cc..88a75bc3f 100755 --- a/ba/ba8300c.uml +++ b/ba/ba8300c.uml @@ -203,6 +203,13 @@ BEGIN PROMPT -23 -1 "" END +BUTTON DLG_BAR 10 2 +BEGIN + PROMPT -23 -1 "Font" + PICTURE TOOL_FONT + MESSAGE K_SPACE,F_FONT_SELECT +END + BUTTON DLG_CANCEL 10 2 BEGIN PROMPT -33 -1 "" diff --git a/ba/ba8300d.uml b/ba/ba8300d.uml index 3b32aaf95..354b3261e 100755 --- a/ba/ba8300d.uml +++ b/ba/ba8300d.uml @@ -1,11 +1,11 @@ #include "ba8300.h" -PAGE "Report" -1 -1 60 18 +PAGE "Report" -1 -1 66 18 RADIO F_ORIENTATION 1 24 BEGIN PROMPT 1 0 "@bOrientamento della carta" - ITEM "0|Impostazioni Stampante" + ITEM "0|Come da stampante" ITEM "1|Ritratto (Verticale)" ITEM "2|Paesaggio (Orizzontale)" END @@ -22,7 +22,7 @@ END BOOLEAN F_FONT_AUTO BEGIN - PROMPT 26 3 "Seleziona font corrente della stampante" + PROMPT 26 3 "Seleziona font della stampante" MESSAGE FALSE ENABLE,F_FONT_SELECT|ENABLE,F_DY|ENABLE,F_DX MESSAGE TRUE DISABLE,F_FONT_SELECT|DISABLE,F_DY|DISABLE,F_DX END @@ -81,12 +81,12 @@ ENDPAGE PAGE "Avanzate" -1 -1 60 16 -MEMO F_PRESCRIPT 58 10 +MEMO F_PRESCRIPT -1 10 BEGIN PROMPT 1 0 "Script iniziale" END -MEMO F_POSTSCRIPT 58 4 +MEMO F_POSTSCRIPT -1 4 BEGIN PROMPT 1 10 "Script finale" END @@ -110,6 +110,13 @@ BEGIN PROMPT -13 -1 "" END +BUTTON DLG_BAR 10 2 +BEGIN + PROMPT -23 -1 "Font" + PICTURE TOOL_FONT + MESSAGE K_SPACE,F_FONT_SELECT +END + BUTTON DLG_CANCEL 10 2 BEGIN PROMPT -33 -1 "" diff --git a/ba/ba8300e.uml b/ba/ba8300e.uml index de5547304..34a54cbea 100755 --- a/ba/ba8300e.uml +++ b/ba/ba8300e.uml @@ -1,10 +1,10 @@ #include "ba8300.h" -PAGE "Nuova Sezione" -1 -1 38 7 +PAGE "Nuova Sezione" -1 -1 38 4 -RADIOBUTTON 101 1 35 +RADIOBUTTON 101 1 -1 BEGIN - PROMPT 1 0 "@bTipo" + PROMPT 1 0 "" ITEM "H|Raggruppamento" MESSAGE HIDE,102 ITEM "B|Corpo alternativo" @@ -18,12 +18,16 @@ BEGIN PROMPT 1 5 "Sezione principale " END -BUTTON DLG_CANCEL 10 2 +ENDPAGE + +TOOLBAR "topbar" 0 0 0 2 + +BUTTON DLG_OK 10 2 BEGIN PROMPT -12 -1 "" END -BUTTON DLG_OK 10 2 +BUTTON DLG_CANCEL 10 2 BEGIN PROMPT -22 -1 "" END diff --git a/ba/ba8300f.uml b/ba/ba8300f.uml index db51cb431..7c6973638 100755 --- a/ba/ba8300f.uml +++ b/ba/ba8300f.uml @@ -10,7 +10,7 @@ END BUTTON F_NEW_QRY 15 2 BEGIN PROMPT -25 -11 "Nuovo" - PICTURE BMP_NEWREC + PICTURE TOOL_NEWREC END BUTTON F_IMPORT_QRY 15 2 @@ -22,12 +22,34 @@ END BUTTON F_SHOW_QRY 15 2 BEGIN PROMPT -45 -11 "Elabora" - PICTURE BMP_ELABORA + PICTURE TOOL_ELABORA END -BUTTON DLG_CANCEL 15 2 +BUTTON DLG_NULL 2 2 BEGIN - PROMPT -55 -11 "Annulla" + PROMPT -1 1 "" + PICTURE 0 +END + +BUTTON DLG_INFO 2 2 +BEGIN + PROMPT 9 1 "Info" + MESSAGE EXIT,K_F2 + PICTURE TOOL_INFO +END + +BUTTON DLG_HELP 2 2 +BEGIN + PROMPT 10 1 "Help" + MESSAGE EXIT,K_F1 + PICTURE TOOL_HELP +END + +BUTTON DLG_CANCEL 2 2 +BEGIN + PROMPT 11 1 "Annulla" + MESSAGE EXIT,K_ESC + PICTURE 102 END ENDPAGE diff --git a/ba/ba8301.cpp b/ba/ba8301.cpp index 2f8d3df80..09609afb2 100755 --- a/ba/ba8301.cpp +++ b/ba/ba8301.cpp @@ -404,18 +404,20 @@ void TReport_base_mask::update() const int y = rctfld.top / ROWY + 1; RCT& rct = resize_rect(x, y, -3, 2, W_PLAIN, fld.parent()); rct.top = rctfld.top; rct.bottom = rctfld.bottom; - xi_draw_3d_rect((XinWindow)fld.parent(), (XinRect*)&rct, TRUE, 2, MASK_LIGHT_COLOR, + xi_draw_3d_rect((XinWindow)fld.parent(), (XI_RCT*)&rct, TRUE, 2, MASK_LIGHT_COLOR, _bgcolor, MASK_DARK_COLOR); rct.left += 2; rct.right -= 2; rct.top += 2; rct.bottom -= 2; xvt_dwin_set_clip(win(), &rct); - XVT_FNTID fontid = _font.get_xvt_font(*this); + XVT_FNTID fontid = xvt_font_create(); + xvt_font_copy(fontid, _font.get_xvt_font(*this), XVT_FA_ALL); xvt_font_set_size(fontid, _font.size()); xvt_dwin_set_font(fld.parent(), fontid); set_color(_fgcolor, _bgcolor); - advanced_draw_text_line(*this, _font.name(), rct, _halign, _valign); + advanced_draw_text_line(fld.parent(), _font.name(), rct, _halign, _valign); + xvt_font_destroy(fontid); } } @@ -586,10 +588,12 @@ void TReport_field_mask::vedo_non_vedo() show(F_PATTERN, type != 'L' && type != 'I'); show(F_RADIUS, type != 'E' && type != 'L' && type != 'I'); show(F_SHADE_OFFSET,type != 'E' && type != 'L'); - show(F_FONT_SELECT, is_text); + show(F_FONT_SELECT, is_text); // Bottone font + show(F_PRFONT_SELECT, is_text); // Bottone font stampante + enable(DLG_BAR, is_text); // Bottone font sulla toolbar show(F_SOURCE, (is_text || type == 'I') && type != 'T'); show(F_SOURCE2, is_text && type != 'T'); - show(DLG_FINDREC, is_text && type != 'T'); + enable(DLG_FINDREC, is_text && type != 'T'); show(F_CODVAL, is_currency); // Codice valuta di riferimento show(F_LINK, strchr("DNS", type) != NULL); // Chi puo' essere un link? show(F_PRESCRIPT, is_text); @@ -1709,7 +1713,7 @@ void TReport_window::draw_field(const TReport_field& rf) set_color(rf.fore_color(), rf.back_color()); TString str = rf.picture(); - advanced_draw_text_line(*this, str, r, rf.horizontal_alignment(), rf.vertical_alignment()); + advanced_draw_text_line(win(), str, r, rf.horizontal_alignment(), rf.vertical_alignment()); } break; default : @@ -1743,7 +1747,7 @@ void TReport_window::draw_field(const TReport_field& rf) str << rf.id(); else str = rf.field(); - advanced_draw_text_line(*this, str, r, rf.horizontal_alignment(), rf.vertical_alignment()); + advanced_draw_text_line(win(), str, r, rf.horizontal_alignment(), rf.vertical_alignment()); break; }