Virtual U.org
Get Personal Training on VU Today
    
Top shadow
 
 register/help
User Name:

Password:

Oprtmen6.cpp Source File
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

Oprtmen6.cpp

Go to the documentation of this file.
00001 //Filename    : OPRTMENU1.CPP
00002 //Description : Printing Menu Class Implementation
00003 //Owner           : Kevin(ho)
00004 
00005 #include <OPRINT.H>
00006 #include <OVGALOCK.H>
00007 #include <OPRTMENU.H>
00008 #include <OWORLDMT.H>
00009 #include <OSYS.H>
00010 #include <OBOX.H>
00011 #include <OVGA.H>
00012 #include <OFONT.H>
00013 #include <OGAMESTR.H>
00014 #include <OMOUSE.H>
00015 #include <OMOUSE2.H>
00016 #include <OIFACE.H>
00017 #include <OINFO.H>
00018 #include <OPSCHOOL.H>
00019 #include <OSCHLRES.H>
00020 #include <OPEERSCH.H>
00021 #include <ODEPT.H>
00022 #include <ODATE.H>
00023 
00024 enum {                                            // screen coordinates
00025     REPORT_X1 = ZOOM_X1+15,
00026     REPORT_Y1 = ZOOM_Y1+25,
00027     REPORT_X2 = ZOOM_X2-15,
00028     REPORT_Y2 = ZOOM_Y2-55
00029 };
00030 
00031 enum {
00032     PRINT_OPT1=1,
00033     PRINT_OPT2=2,
00034     PRINT_OPT3=3,
00035     PRINT_OPT4=4,
00036 };
00037 
00038 static int filename_count=0;
00039 static String fn;
00040 
00041 void PrintMenu::printing6() {
00042   box.tell("Now printing. \nPlease wait...");
00043   sys.no_true_output_flag=1;
00044   box.close();
00045   sys.no_true_output_flag=0;
00046 
00050   if(print_view_mode==MODE_SCORE_REPORT) {
00051     enum {
00052       MODE_OVERALL=0,
00053       MODE_RANK=1,
00054       MODE_OUTPUTS=2,
00055       MODE_GENERAL_INSTITUTIONAL_PERFORMANCE=3,
00056       MODE_ATTITUDES_TOWARD_THE_INSTITUTION=4,
00057       MODE_FINANCE=5,
00058       MODE_MANAGEMENT=6,
00059       MODE_ADMISSION=7, 
00060     };
00061         {
00062       MouseDispCount mdc;
00063       print.start_print(sys.main_hwnd,sys.app_hinstance);
00064       print.open_page();
00065 
00066       print.dfont(10,false,false,0);
00067 
00068       print.put_text("Insitution : ",30,4);
00069                                                   //Player Institution
00070       print.put_text(player_school.school_name,44,4);
00071       print.put_text("President : ",30,5);
00072       String str;
00073       str =  player_school.player_first_name;
00074       str += " ";
00075       str += player_school.player_last_name;
00076       print.put_text(str.str_buf,44,5);           //President
00077       print.put_text("Date : ",99,5);
00078       // print.put_text(date.date_str(info.game_date),107,5);                   //date
00079       print.put_text(info.date_str_julian(info.game_date), 107,5 );
00080 
00081       if(player_school.scenario_id>0) {
00082         print.dfont(10,false,false,700);
00083         print.put_text(scn_name[player_school.scenario_id-1],50,6);
00084       }
00085 
00086       if(print_option==1) {
00087         /*                              int deptRecno = department_array.selected_recno;
00088                 Department* cur_dept_ptr = department_array[deptRecno];
00089                 String str1;
00090                 str1 ="Department : ";
00091                 str1 +=cur_dept_ptr->name();
00092                 str1 +="                                                                                                                              ";
00093                 print.dfont(12,false,false,0);
00094                 print.put_text("________________________________________________________________________________________________________________________________________________________________________________________________",20,6);
00095                 print.dfont(12,false,true,0);
00096                 print.put_text(str1.str_buf,20,7);
00097         */
00098         print.dfont(18,false,false,700);
00099         print.put_text("Virtual U Score Report",24,1);
00100         print.dfont(10,false,false,0);
00101 
00102         user_interface.backgd_flag=0;
00103         sys.no_true_output_flag=1;
00104         sys.view_mode=MODE_SCORE_REPORT;
00105         player_school.score_report_deinit();
00106         player_school.score_report(INFO_REPAINT);
00107         //First page printing
00108         //*********************start printing********************
00109 
00110         //this will print the bmp in the center of the paper and 1/7 down the page
00111         print.put_vga_back_center("prn001.bmp",
00112           ZOOM_X2-ZOOM_X1,ZOOM_Y2-ZOOM_Y1-80,
00113           0.2,ZOOM_X1,ZOOM_Y1
00114         /*upper left cor. of bitmap*/
00115           );
00116         // ##### begin Gilbert 28/04/2001 ######?/
00117         // save memory
00118         player_school.score_report_deinit();
00119         // ##### end Gilbert 28/04/2001 ######?/
00120         sys.no_true_output_flag=0;
00121         user_interface.backgd_flag=1;
00122       }
00123 
00124       if(print_option==2) {
00125         /*                              int deptRecno = department_array.selected_recno;
00126                 Department* cur_dept_ptr = department_array[deptRecno];
00127                 String str1;
00128                 str1 ="Department : ";
00129                 str1 +=cur_dept_ptr->name();
00130                 str1 +="                                                                                                                              ";
00131                 print.dfont(12,false,false,0);
00132                 print.put_text("________________________________________________________________________________________________________________________________________________________________________________________________",20,6);
00133                 print.dfont(12,false,true,0);
00134                 print.put_text(str1.str_buf,20,7);
00135         */
00136         print.dfont(18,false,false,700);
00137         print.put_text("Virtual U Score Report (Detail)",17,1);
00138         print.dfont(10,false,false,0);
00139 
00140         user_interface.backgd_flag=0;
00141         sys.no_true_output_flag=1;
00142 
00143         sys.view_mode=MODE_SCORE_REPORT;
00144         int report_type_backup=player_school.current_score_report_type;
00145 
00146         player_school.current_score_report_type=MODE_OVERALL;
00147         player_school.score_report_deinit();
00148         player_school.score_report(INFO_REPAINT);
00149         print.put_vga_back_center("prn001.bmp",
00150           ZOOM_X2-ZOOM_X1,ZOOM_Y2-ZOOM_Y1-80,
00151           0.17,ZOOM_X1,ZOOM_Y1
00152           );
00153 
00154         print.dfont(12,false,true,0);
00155         print.put_text("Overall",25,9);
00156 
00157         player_school.current_score_report_type=MODE_OUTPUTS;
00158         player_school.score_report_deinit();
00159         player_school.score_report(INFO_REPAINT);
00160         print.put_vga_back_center("prn002.bmp",
00161           ZOOM_X2-ZOOM_X1,ZOOM_Y2-ZOOM_Y1-80,
00162           0.4,ZOOM_X1,ZOOM_Y1
00163           );
00164 
00165         print.dfont(12,false,true,0);
00166         print.put_text("Output",25,23);
00167 
00168         player_school.current_score_report_type=MODE_GENERAL_INSTITUTIONAL_PERFORMANCE;
00169         player_school.score_report_deinit();
00170         player_school.score_report(INFO_REPAINT);
00171         print.put_vga_back_center("prn003.bmp",
00172           ZOOM_X2-ZOOM_X1,ZOOM_Y2-ZOOM_Y1-80,
00173           0.65,ZOOM_X1,ZOOM_Y1
00174           );
00175 
00176         print.dfont(12,false,true,0);
00177         print.put_text("Performance Indicators",25,37);
00178 
00179         print.end_page();
00180         print.open_page();
00181 
00182         player_school.current_score_report_type=MODE_ATTITUDES_TOWARD_THE_INSTITUTION;
00183         player_school.score_report_deinit();
00184         player_school.score_report(INFO_REPAINT);
00185         print.put_vga_back_center("prn004.bmp",
00186           ZOOM_X2-ZOOM_X1,ZOOM_Y2-ZOOM_Y1-80,
00187           0.05,ZOOM_X1,ZOOM_Y1
00188           );
00189 
00190         print.dfont(12,false,true,0);
00191         print.put_text("Attitudes toward the institution",25,2);
00192 
00193         player_school.current_score_report_type=MODE_FINANCE;
00194         player_school.score_report_deinit();
00195         player_school.score_report(INFO_REPAINT);
00196         print.put_vga_back_center("prn005.bmp",
00197           ZOOM_X2-ZOOM_X1,ZOOM_Y2-ZOOM_Y1-80,
00198           0.3,ZOOM_X1,ZOOM_Y1
00199           );
00200 
00201         print.dfont(12,false,true,0);
00202         print.put_text("Financial Indicators",25,17);
00203 
00204         print.dfont(9,false,false,0);
00205         print.put_text("________________________________________________________________________________________________________________________________",15,48);
00206         print.put_text("Rank",35,47);
00207         print.put_text("University",45,47);
00208         print.put_text("Current trustee evaluation",90,47);
00209 
00210         for(int i=0;i<school_res.peer_school_count;i++) {
00211           int idx = school_res.peer_school_rank[i];
00212 
00213           PeerSchool *ps = &(school_res.peer_school_array[idx]);
00214           print.put_text(m.format(i+1,4),35,49+i);
00215           print.put_text(ps->name,45,49+i);
00216           print.put_text(m.format((int)ps->game_score,4),100,49+i);
00217         }
00218 
00219         print.dfont(12,false,true,0);
00220         print.put_text("Rank",25,34);
00221 
00222         player_school.current_score_report_type=report_type_backup;
00223         // ##### begin Gilbert 28/04/2001 ######?/
00224         // save memory
00225         player_school.score_report_deinit();
00226         // ##### end Gilbert 28/04/2001 ######?/
00227         sys.no_true_output_flag=0;
00228         user_interface.backgd_flag=1;
00229         // #### begin Gilbert 24/04/2001 #####//
00230         // repaint after MouseDispCount mdc
00231         // player_school.score_report(INFO_REPAINT);
00232         // #### end Gilbert 24/04/2001 #####//
00233       }
00234 
00235       print.end_page();
00236       print.endprint(sys.main_hwnd);
00237     }
00238   }
00240 
00241 }

Generated on Fri Aug 23 01:38:13 2002 for VirtualU by doxygen1.2.17