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
This commit is contained in:
		
							parent
							
								
									89661c31cc
								
							
						
					
					
						commit
						34a22bc6c8
					
				| @ -601,7 +601,7 @@ protected: | |||||||
|   void update_toolbar(); // Aggiorna dis/abilitazioni dei bottoni
 |   void update_toolbar(); // Aggiorna dis/abilitazioni dei bottoni
 | ||||||
| 
 | 
 | ||||||
| public: | public: | ||||||
|   void on_print(); |   void on_print(bool preview); | ||||||
|   void on_pdf(); |   void on_pdf(); | ||||||
|   bool save_report(); |   bool save_report(); | ||||||
|   bool save_if_needed(); |   bool save_if_needed(); | ||||||
| @ -728,7 +728,7 @@ bool TReport_mask::delete_report() | |||||||
|   return ok; |   return ok; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void TReport_mask::on_print() | void TReport_mask::on_print(bool preview) | ||||||
| { | { | ||||||
|   const TString& app = _report.command_line(); |   const TString& app = _report.command_line(); | ||||||
|   if (app.full() && yesno_box(FR("Si desidera stampare utilizzando '%s'"), (const char*)app)) |   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; |     TReport_book book; | ||||||
| #endif | #endif | ||||||
|     book.add(_report); |     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; |     _is_dirty = true; | ||||||
|     const bool ok = _report.recordset() != NULL; |     const bool ok = _report.recordset() != NULL; | ||||||
|     enable(DLG_PRINT, ok); |     enable(DLG_PRINT, ok); | ||||||
|  |     enable(DLG_PREVIEW, ok); | ||||||
|     enable(DLG_PDF, ok); |     enable(DLG_PDF, ok); | ||||||
|   } |   } | ||||||
| } | } | ||||||
| @ -1101,6 +1105,7 @@ void TReport_mask::update_toolbar() | |||||||
|   enable(DLG_DELREC, full); |   enable(DLG_DELREC, full); | ||||||
|   const bool printok = full && _report.recordset() != NULL; |   const bool printok = full && _report.recordset() != NULL; | ||||||
|   enable(DLG_PRINT, printok); |   enable(DLG_PRINT, printok); | ||||||
|  |   enable(DLG_PREVIEW, printok); | ||||||
|   enable(DLG_PDF, 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: |   case DLG_PRINT: | ||||||
|     if (e == fe_button) |     if (e == fe_button) | ||||||
|     { |     { | ||||||
|       on_print(); |       on_print(false); | ||||||
|  |       return false; | ||||||
|  |     } | ||||||
|  |     break; | ||||||
|  |   case DLG_PREVIEW: | ||||||
|  |     if (e == fe_button) | ||||||
|  |     { | ||||||
|  |       on_print(true); | ||||||
|       return false; |       return false; | ||||||
|     } |     } | ||||||
|     break; |     break; | ||||||
| @ -1309,7 +1321,7 @@ public: | |||||||
| void TReporter_app::print() | void TReporter_app::print() | ||||||
| { | { | ||||||
|   if (_msk != NULL) |   if (_msk != NULL) | ||||||
|     _msk->on_print(); |     _msk->on_print(false); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| bool TReporter_app::create() | bool TReporter_app::create() | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| #include "ba8300.h" | #include "ba8300.h" | ||||||
| 
 | 
 | ||||||
| TOOLBAR "" 0 -1 0 0 | TOOLBAR "" 0 -1 0 1 | ||||||
| 
 | 
 | ||||||
| STRING F_CODICE 256 24 | STRING F_CODICE 256 24 | ||||||
| BEGIN | BEGIN | ||||||
| @ -22,25 +22,25 @@ TOOLBAR "" 0 0 0 2 | |||||||
| BUTTON DLG_NEWREC 10 2 | BUTTON DLG_NEWREC 10 2 | ||||||
| BEGIN | BEGIN | ||||||
|   PROMPT 1 0 "Nuovo" |   PROMPT 1 0 "Nuovo" | ||||||
|   PICTURE BMP_NEWREC |   PICTURE TOOL_NEWREC | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
| BUTTON DLG_FINDREC 10 2 | BUTTON DLG_FINDREC 10 2 | ||||||
| BEGIN | BEGIN | ||||||
|   PROMPT 2 0 "Carica" |   PROMPT 2 0 "Carica" | ||||||
|   PICTURE 166 |   PICTURE TOOL_LENTE | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
| BUTTON DLG_SAVEREC 10 2 | BUTTON DLG_SAVEREC 10 2 | ||||||
| BEGIN | BEGIN | ||||||
|   PROMPT 3 0 "Salva" |   PROMPT 3 0 "Salva" | ||||||
|   PICTURE BMP_SAVEREC |   PICTURE TOOL_SAVEREC | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
| BUTTON DLG_DELREC 10 2 | BUTTON DLG_DELREC 10 2 | ||||||
| BEGIN | BEGIN | ||||||
|   PROMPT 4 0 "Elimina" |   PROMPT 4 0 "Elimina" | ||||||
|   PICTURE BMP_DELREC |   PICTURE TOOL_DELREC | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
| BUTTON DLG_NULL 10 2 | BUTTON DLG_NULL 10 2 | ||||||
| @ -50,43 +50,28 @@ END | |||||||
| BUTTON DLG_SETPRINT 2 2 | BUTTON DLG_SETPRINT 2 2 | ||||||
| BEGIN | BEGIN | ||||||
|   PROMPT 5 0 "Imposta" |   PROMPT 5 0 "Imposta" | ||||||
|   PICTURE BMP_SETPRINT |   PICTURE TOOL_SETPRINT | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
| BUTTON DLG_PRINT 2 2 | BUTTON DLG_PRINT 2 2 | ||||||
| BEGIN | BEGIN | ||||||
|   PROMPT 6 0 "Stampa" |   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 | END | ||||||
| 
 | 
 | ||||||
| BUTTON DLG_PDF 2 2 | BUTTON DLG_PDF 2 2 | ||||||
| BEGIN | BEGIN | ||||||
|   PROMPT 7 0 "PDF" |   PROMPT 8 0 "PDF" | ||||||
|   PICTURE BMP_PDF |   PICTURE TOOL_PDF | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
| BUTTON DLG_NULL 2 2 | #include <helpbar.h> | ||||||
| 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 |  | ||||||
| 
 | 
 | ||||||
| ENDPAGE | ENDPAGE | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -229,10 +229,17 @@ BEGIN | |||||||
|   PROMPT -24 -1 "" |   PROMPT -24 -1 "" | ||||||
| END | 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 | BUTTON DLG_FINDREC 10 2 | ||||||
| BEGIN | BEGIN | ||||||
|   PROMPT -34, 9 "" |   PROMPT -34, 9 "Campo" | ||||||
|   PICTURE 166 |   PICTURE TOOL_LENTE | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
| BUTTON DLG_CANCEL 10 2 | BUTTON DLG_CANCEL 10 2 | ||||||
|  | |||||||
| @ -203,6 +203,13 @@ BEGIN | |||||||
|   PROMPT -23 -1 "" |   PROMPT -23 -1 "" | ||||||
| END | 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 | BUTTON DLG_CANCEL 10 2 | ||||||
| BEGIN | BEGIN | ||||||
|   PROMPT -33 -1 "" |   PROMPT -33 -1 "" | ||||||
|  | |||||||
| @ -1,11 +1,11 @@ | |||||||
| #include "ba8300.h" | #include "ba8300.h" | ||||||
| 
 | 
 | ||||||
| PAGE "Report" -1 -1 60 18 | PAGE "Report" -1 -1 66 18 | ||||||
| 
 | 
 | ||||||
| RADIO F_ORIENTATION 1 24 | RADIO F_ORIENTATION 1 24 | ||||||
| BEGIN | BEGIN | ||||||
|   PROMPT 1 0 "@bOrientamento della carta" |   PROMPT 1 0 "@bOrientamento della carta" | ||||||
|   ITEM "0|Impostazioni Stampante" |   ITEM "0|Come da stampante" | ||||||
|   ITEM "1|Ritratto (Verticale)" |   ITEM "1|Ritratto (Verticale)" | ||||||
|   ITEM "2|Paesaggio (Orizzontale)" |   ITEM "2|Paesaggio (Orizzontale)" | ||||||
| END | END | ||||||
| @ -22,7 +22,7 @@ END | |||||||
| 
 | 
 | ||||||
| BOOLEAN F_FONT_AUTO | BOOLEAN F_FONT_AUTO | ||||||
| BEGIN | 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 FALSE ENABLE,F_FONT_SELECT|ENABLE,F_DY|ENABLE,F_DX | ||||||
|   MESSAGE TRUE DISABLE,F_FONT_SELECT|DISABLE,F_DY|DISABLE,F_DX |   MESSAGE TRUE DISABLE,F_FONT_SELECT|DISABLE,F_DY|DISABLE,F_DX | ||||||
| END | END | ||||||
| @ -81,12 +81,12 @@ ENDPAGE | |||||||
| 
 | 
 | ||||||
| PAGE "Avanzate" -1 -1 60 16 | PAGE "Avanzate" -1 -1 60 16 | ||||||
| 
 | 
 | ||||||
| MEMO F_PRESCRIPT 58 10 | MEMO F_PRESCRIPT -1 10 | ||||||
| BEGIN | BEGIN | ||||||
|   PROMPT 1 0 "Script iniziale" |   PROMPT 1 0 "Script iniziale" | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
| MEMO F_POSTSCRIPT 58 4 | MEMO F_POSTSCRIPT -1 4 | ||||||
| BEGIN | BEGIN | ||||||
|   PROMPT 1 10 "Script finale" |   PROMPT 1 10 "Script finale" | ||||||
| END | END | ||||||
| @ -110,6 +110,13 @@ BEGIN | |||||||
|   PROMPT -13 -1 "" |   PROMPT -13 -1 "" | ||||||
| END | 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 | BUTTON DLG_CANCEL 10 2 | ||||||
| BEGIN | BEGIN | ||||||
|   PROMPT -33 -1 "" |   PROMPT -33 -1 "" | ||||||
|  | |||||||
| @ -1,10 +1,10 @@ | |||||||
| #include "ba8300.h" | #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 | BEGIN | ||||||
|   PROMPT 1 0 "@bTipo" |   PROMPT 1 0 "" | ||||||
|   ITEM "H|Raggruppamento" |   ITEM "H|Raggruppamento" | ||||||
|     MESSAGE HIDE,102 |     MESSAGE HIDE,102 | ||||||
|   ITEM "B|Corpo alternativo" |   ITEM "B|Corpo alternativo" | ||||||
| @ -18,12 +18,16 @@ BEGIN | |||||||
|   PROMPT 1 5 "Sezione principale " |   PROMPT 1 5 "Sezione principale " | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
| BUTTON DLG_CANCEL 10 2 | ENDPAGE | ||||||
|  | 
 | ||||||
|  | TOOLBAR "topbar" 0 0 0 2 | ||||||
|  | 
 | ||||||
|  | BUTTON DLG_OK 10 2 | ||||||
| BEGIN | BEGIN | ||||||
|   PROMPT -12 -1 "" |   PROMPT -12 -1 "" | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
| BUTTON DLG_OK 10 2 | BUTTON DLG_CANCEL 10 2 | ||||||
| BEGIN | BEGIN | ||||||
|   PROMPT -22 -1 "" |   PROMPT -22 -1 "" | ||||||
| END | END | ||||||
|  | |||||||
| @ -10,7 +10,7 @@ END | |||||||
| BUTTON F_NEW_QRY 15 2 | BUTTON F_NEW_QRY 15 2 | ||||||
| BEGIN | BEGIN | ||||||
|   PROMPT -25 -11 "Nuovo" |   PROMPT -25 -11 "Nuovo" | ||||||
|   PICTURE BMP_NEWREC |   PICTURE TOOL_NEWREC | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
| BUTTON F_IMPORT_QRY 15 2 | BUTTON F_IMPORT_QRY 15 2 | ||||||
| @ -22,12 +22,34 @@ END | |||||||
| BUTTON F_SHOW_QRY 15 2 | BUTTON F_SHOW_QRY 15 2 | ||||||
| BEGIN | BEGIN | ||||||
|   PROMPT -45 -11 "Elabora" |   PROMPT -45 -11 "Elabora" | ||||||
|   PICTURE BMP_ELABORA |   PICTURE TOOL_ELABORA | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
| BUTTON DLG_CANCEL 15 2 | BUTTON DLG_NULL 2 2 | ||||||
| BEGIN | 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 | END | ||||||
| 
 | 
 | ||||||
| ENDPAGE | ENDPAGE | ||||||
|  | |||||||
| @ -404,18 +404,20 @@ void TReport_base_mask::update() | |||||||
|     const int y = rctfld.top / ROWY + 1; |     const int y = rctfld.top / ROWY + 1; | ||||||
|     RCT& rct = resize_rect(x, y, -3, 2, W_PLAIN, fld.parent());  |     RCT& rct = resize_rect(x, y, -3, 2, W_PLAIN, fld.parent());  | ||||||
|     rct.top =  rctfld.top; rct.bottom = rctfld.bottom; |     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); |       _bgcolor, MASK_DARK_COLOR); | ||||||
| 
 | 
 | ||||||
|     rct.left += 2; rct.right -= 2; |     rct.left += 2; rct.right -= 2; | ||||||
|     rct.top += 2; rct.bottom -= 2; |     rct.top += 2; rct.bottom -= 2; | ||||||
|     xvt_dwin_set_clip(win(), &rct); |     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_font_set_size(fontid, _font.size()); | ||||||
|     xvt_dwin_set_font(fld.parent(), fontid); |     xvt_dwin_set_font(fld.parent(), fontid); | ||||||
|     set_color(_fgcolor, _bgcolor); |     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_PATTERN,     type != 'L' && type != 'I'); | ||||||
|   show(F_RADIUS,      type != 'E' && type != 'L' && type != 'I'); |   show(F_RADIUS,      type != 'E' && type != 'L' && type != 'I'); | ||||||
|   show(F_SHADE_OFFSET,type != 'E' && type != 'L'); |   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_SOURCE,      (is_text || type == 'I') && type != 'T'); | ||||||
|   show(F_SOURCE2,     is_text && 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_CODVAL,      is_currency);  // Codice valuta di riferimento
 | ||||||
|   show(F_LINK,        strchr("DNS", type) != NULL); // Chi puo' essere un link?
 |   show(F_LINK,        strchr("DNS", type) != NULL); // Chi puo' essere un link?
 | ||||||
|   show(F_PRESCRIPT,   is_text); |   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()); |       set_color(rf.fore_color(), rf.back_color()); | ||||||
| 
 | 
 | ||||||
|       TString str = rf.picture(); |       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; |     break; | ||||||
|   default :  |   default :  | ||||||
| @ -1743,7 +1747,7 @@ void TReport_window::draw_field(const TReport_field& rf) | |||||||
|       str << rf.id(); |       str << rf.id(); | ||||||
|     else |     else | ||||||
|       str = rf.field(); |       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; |     break; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user