print_dlg_.cpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:4k
源码类别:

生物技术

开发平台:

C/C++

  1. /*
  2.  * ===========================================================================
  3.  * PRODUCTION $Log: print_dlg_.cpp,v $
  4.  * PRODUCTION Revision 1000.1  2004/06/01 21:04:09  gouriano
  5.  * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.7
  6.  * PRODUCTION
  7.  * ===========================================================================
  8.  */
  9. // generated by Fast Light User Interface Designer (fluid) version 1.0105
  10. /* $Id: print_dlg_.cpp,v 1000.1 2004/06/01 21:04:09 gouriano Exp $ */
  11. #include <ncbi_pch.hpp>
  12. inline void CPrintDlg::cb_m_LocationPrint_i(Fl_Round_Button*, void*) {
  13.   x_OnSelectPrint();
  14. }
  15. void CPrintDlg::cb_m_LocationPrint(Fl_Round_Button* o, void* v) {
  16.   ((CPrintDlg*)(o->parent()->parent()->user_data()))->cb_m_LocationPrint_i(o,v);
  17. }
  18. inline void CPrintDlg::cb_m_LocationFile_i(Fl_Round_Button*, void*) {
  19.   x_OnSelectFile();
  20. }
  21. void CPrintDlg::cb_m_LocationFile(Fl_Round_Button* o, void* v) {
  22.   ((CPrintDlg*)(o->parent()->parent()->user_data()))->cb_m_LocationFile_i(o,v);
  23. }
  24. inline void CPrintDlg::cb_Browse_i(Fl_Button*, void*) {
  25.   x_OnBrowse();
  26. }
  27. void CPrintDlg::cb_Browse(Fl_Button* o, void* v) {
  28.   ((CPrintDlg*)(o->parent()->parent()->user_data()))->cb_Browse_i(o,v);
  29. }
  30. Fl_Menu_Item CPrintDlg::menu_m_Format[] = {
  31.  {"Portable Document Format (PDF)", 0,  0, (void*)(m_Pdf), 0, 0, 0, 12, 56},
  32.  {"Postscript", 0,  0, (void*)(m_Postscript), 1, 0, 0, 12, 56},
  33.  {"Scalable Vector Graphic (SVG)", 0,  0, (void*)(m_Svg), 1, 0, 0, 12, 56},
  34.  {0}
  35. };
  36. Fl_Menu_Item* CPrintDlg::m_Pdf = CPrintDlg::menu_m_Format + 0;
  37. Fl_Menu_Item* CPrintDlg::m_Postscript = CPrintDlg::menu_m_Format + 1;
  38. Fl_Menu_Item* CPrintDlg::m_Svg = CPrintDlg::menu_m_Format + 2;
  39. inline void CPrintDlg::cb_OK_i(Fl_Return_Button*, void*) {
  40.   x_OnOK();
  41. }
  42. void CPrintDlg::cb_OK(Fl_Return_Button* o, void* v) {
  43.   ((CPrintDlg*)(o->parent()->parent()->user_data()))->cb_OK_i(o,v);
  44. }
  45. inline void CPrintDlg::cb_Cancel_i(Fl_Button*, void*) {
  46.   x_OnCancel();
  47. }
  48. void CPrintDlg::cb_Cancel(Fl_Button* o, void* v) {
  49.   ((CPrintDlg*)(o->parent()->parent()->user_data()))->cb_Cancel_i(o,v);
  50. }
  51. inline void CPrintDlg::cb_Options_i(Fl_Button*, void*) {
  52.   x_OnOptions();
  53. }
  54. void CPrintDlg::cb_Options(Fl_Button* o, void* v) {
  55.   ((CPrintDlg*)(o->parent()->parent()->user_data()))->cb_Options_i(o,v);
  56. }
  57. Fl_Double_Window* CPrintDlg::x_Create(void) {
  58.   Fl_Double_Window* w;
  59.   { Fl_Double_Window* o = new Fl_Double_Window(465, 216, "Print");
  60.     w = o;
  61.     o->user_data((void*)(this));
  62.     { Fl_Group* o = new Fl_Group(5, 10, 455, 105, "Output Location");
  63.       o->box(FL_ENGRAVED_FRAME);
  64.       o->labelsize(12);
  65.       o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);
  66.       { Fl_Round_Button* o = m_LocationPrint = new Fl_Round_Button(20, 40, 65, 25, "Printer");
  67.         o->type(102);
  68.         o->down_box(FL_ROUND_DOWN_BOX);
  69.         o->labelsize(12);
  70.         o->callback((Fl_Callback*)cb_m_LocationPrint);
  71.       }
  72.       { Fl_Round_Button* o = m_LocationFile = new Fl_Round_Button(20, 80, 65, 25, "File");
  73.         o->type(102);
  74.         o->down_box(FL_ROUND_DOWN_BOX);
  75.         o->value(1);
  76.         o->labelsize(12);
  77.         o->callback((Fl_Callback*)cb_m_LocationFile);
  78.       }
  79.       { Fl_File_Input* o = m_Filename = new Fl_File_Input(90, 70, 280, 35);
  80.         o->labelsize(12);
  81.       }
  82.       { Fl_Button* o = new Fl_Button(375, 80, 75, 25, "Browse...");
  83.         o->labelsize(12);
  84.         o->callback((Fl_Callback*)cb_Browse);
  85.       }
  86.       o->end();
  87.     }
  88.     { Fl_Group* o = new Fl_Group(5, 120, 455, 60, "Output Format");
  89.       o->box(FL_ENGRAVED_FRAME);
  90.       o->labelsize(12);
  91.       o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);
  92.       { Fl_Choice* o = m_Format = new Fl_Choice(90, 145, 280, 25);
  93.         o->down_box(FL_BORDER_BOX);
  94.         o->labelsize(12);
  95.         o->when(3);
  96.         Fl_Group::current()->resizable(o);
  97.         o->menu(menu_m_Format);
  98.       }
  99.       o->end();
  100.     }
  101.     { Fl_Group* o = Buttons = new Fl_Group(5, 185, 455, 25);
  102.       o->labelsize(12);
  103.       { Fl_Return_Button* o = new Fl_Return_Button(295, 185, 80, 25, "OK");
  104.         o->callback((Fl_Callback*)cb_OK);
  105.       }
  106.       { Fl_Button* o = new Fl_Button(380, 185, 80, 25, "Cancel");
  107.         o->callback((Fl_Callback*)cb_Cancel);
  108.       }
  109.       { Fl_Button* o = new Fl_Button(5, 185, 80, 25, "Options");
  110.         o->callback((Fl_Callback*)cb_Options);
  111.       }
  112.       { Fl_Group* o = new Fl_Group(85, 185, 210, 25);
  113.         o->end();
  114.         Fl_Group::current()->resizable(o);
  115.       }
  116.       o->end();
  117.     }
  118.     o->end();
  119.   }
  120.   return w;
  121. }