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

生物技术

开发平台:

C/C++

  1. /*
  2.  * ===========================================================================
  3.  * PRODUCTION $Log: print_options_dlg_.cpp,v $
  4.  * PRODUCTION Revision 1000.1  2004/06/01 21:04:19  gouriano
  5.  * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.4
  6.  * PRODUCTION
  7.  * ===========================================================================
  8.  */
  9. // generated by Fast Light User Interface Designer (fluid) version 1.0105
  10. /* $Id: print_options_dlg_.cpp,v 1000.1 2004/06/01 21:04:19 gouriano Exp $ */
  11. #include <ncbi_pch.hpp>
  12. inline void CPrintOptionsDlg::cb_m_Letter_i(Fl_Menu_*, Fl_Menu_Item* v) {
  13.   x_OnSelectPaper(v);
  14. }
  15. void CPrintOptionsDlg::cb_m_Letter(Fl_Menu_* o, Fl_Menu_Item* v) {
  16.   ((CPrintOptionsDlg*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_m_Letter_i(o,v);
  17. }
  18. inline void CPrintOptionsDlg::cb_m_Legal_i(Fl_Menu_*, Fl_Menu_Item* v) {
  19.   x_OnSelectPaper(v);
  20. }
  21. void CPrintOptionsDlg::cb_m_Legal(Fl_Menu_* o, Fl_Menu_Item* v) {
  22.   ((CPrintOptionsDlg*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_m_Legal_i(o,v);
  23. }
  24. inline void CPrintOptionsDlg::cb_m_Ledger_i(Fl_Menu_*, Fl_Menu_Item* v) {
  25.   x_OnSelectPaper(v);
  26. }
  27. void CPrintOptionsDlg::cb_m_Ledger(Fl_Menu_* o, Fl_Menu_Item* v) {
  28.   ((CPrintOptionsDlg*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_m_Ledger_i(o,v);
  29. }
  30. inline void CPrintOptionsDlg::cb_m_A4_i(Fl_Menu_*, Fl_Menu_Item* v) {
  31.   x_OnSelectPaper(v);
  32. }
  33. void CPrintOptionsDlg::cb_m_A4(Fl_Menu_* o, Fl_Menu_Item* v) {
  34.   ((CPrintOptionsDlg*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_m_A4_i(o,v);
  35. }
  36. inline void CPrintOptionsDlg::cb_m_A3_i(Fl_Menu_*, Fl_Menu_Item* v) {
  37.   x_OnSelectPaper(v);
  38. }
  39. void CPrintOptionsDlg::cb_m_A3(Fl_Menu_* o, Fl_Menu_Item* v) {
  40.   ((CPrintOptionsDlg*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_m_A3_i(o,v);
  41. }
  42. inline void CPrintOptionsDlg::cb_m_A2_i(Fl_Menu_*, Fl_Menu_Item* v) {
  43.   x_OnSelectPaper(v);
  44. }
  45. void CPrintOptionsDlg::cb_m_A2(Fl_Menu_* o, Fl_Menu_Item* v) {
  46.   ((CPrintOptionsDlg*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_m_A2_i(o,v);
  47. }
  48. inline void CPrintOptionsDlg::cb_m_A1_i(Fl_Menu_*, Fl_Menu_Item* v) {
  49.   x_OnSelectPaper(v);
  50. }
  51. void CPrintOptionsDlg::cb_m_A1(Fl_Menu_* o, Fl_Menu_Item* v) {
  52.   ((CPrintOptionsDlg*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_m_A1_i(o,v);
  53. }
  54. inline void CPrintOptionsDlg::cb_m_A0_i(Fl_Menu_*, Fl_Menu_Item* v) {
  55.   x_OnSelectPaper(v);
  56. }
  57. void CPrintOptionsDlg::cb_m_A0(Fl_Menu_* o, Fl_Menu_Item* v) {
  58.   ((CPrintOptionsDlg*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_m_A0_i(o,v);
  59. }
  60. Fl_Menu_Item CPrintOptionsDlg::menu_m_PaperSize[] = {
  61.  {"Letter", 0,  (Fl_Callback*)CPrintOptionsDlg::cb_m_Letter, (void*)(m_Letter), 0, 0, 0, 12, 56},
  62.  {"Legal", 0,  (Fl_Callback*)CPrintOptionsDlg::cb_m_Legal, (void*)(m_Legal), 0, 0, 0, 12, 56},
  63.  {"Ledger", 0,  (Fl_Callback*)CPrintOptionsDlg::cb_m_Ledger, (void*)(m_Ledger), 0, 0, 0, 12, 56},
  64.  {"A4", 0,  (Fl_Callback*)CPrintOptionsDlg::cb_m_A4, (void*)(m_A4), 0, 0, 0, 12, 56},
  65.  {"A3", 0,  (Fl_Callback*)CPrintOptionsDlg::cb_m_A3, (void*)(m_A3), 0, 0, 0, 12, 56},
  66.  {"A2", 0,  (Fl_Callback*)CPrintOptionsDlg::cb_m_A2, (void*)(m_A2), 0, 0, 0, 12, 56},
  67.  {"A1", 0,  (Fl_Callback*)CPrintOptionsDlg::cb_m_A1, (void*)(m_A1), 0, 0, 0, 12, 56},
  68.  {"A0", 0,  (Fl_Callback*)CPrintOptionsDlg::cb_m_A0, (void*)(m_A0), 0, 0, 0, 12, 56},
  69.  {0}
  70. };
  71. Fl_Menu_Item* CPrintOptionsDlg::m_Letter = CPrintOptionsDlg::menu_m_PaperSize + 0;
  72. Fl_Menu_Item* CPrintOptionsDlg::m_Legal = CPrintOptionsDlg::menu_m_PaperSize + 1;
  73. Fl_Menu_Item* CPrintOptionsDlg::m_Ledger = CPrintOptionsDlg::menu_m_PaperSize + 2;
  74. Fl_Menu_Item* CPrintOptionsDlg::m_A4 = CPrintOptionsDlg::menu_m_PaperSize + 3;
  75. Fl_Menu_Item* CPrintOptionsDlg::m_A3 = CPrintOptionsDlg::menu_m_PaperSize + 4;
  76. Fl_Menu_Item* CPrintOptionsDlg::m_A2 = CPrintOptionsDlg::menu_m_PaperSize + 5;
  77. Fl_Menu_Item* CPrintOptionsDlg::m_A1 = CPrintOptionsDlg::menu_m_PaperSize + 6;
  78. Fl_Menu_Item* CPrintOptionsDlg::m_A0 = CPrintOptionsDlg::menu_m_PaperSize + 7;
  79. inline void CPrintOptionsDlg::cb_OK_i(Fl_Return_Button*, void*) {
  80.   x_OnOK();
  81. }
  82. void CPrintOptionsDlg::cb_OK(Fl_Return_Button* o, void* v) {
  83.   ((CPrintOptionsDlg*)(o->parent()->parent()->user_data()))->cb_OK_i(o,v);
  84. }
  85. inline void CPrintOptionsDlg::cb_Cancel_i(Fl_Button*, void*) {
  86.   x_OnCancel();
  87. }
  88. void CPrintOptionsDlg::cb_Cancel(Fl_Button* o, void* v) {
  89.   ((CPrintOptionsDlg*)(o->parent()->parent()->user_data()))->cb_Cancel_i(o,v);
  90. }
  91. Fl_Double_Window* CPrintOptionsDlg::x_Create(void) {
  92.   Fl_Double_Window* w;
  93.   { Fl_Double_Window* o = new Fl_Double_Window(510, 350, "Print Options");
  94.     w = o;
  95.     o->user_data((void*)(this));
  96.     { Fl_Tabs* o = new Fl_Tabs(5, 10, 500, 305);
  97.       o->box(FL_UP_BOX);
  98.       o->labelsize(12);
  99.       o->align(FL_ALIGN_CENTER);
  100.       { Fl_Group* o = new Fl_Group(5, 35, 500, 280, "Page");
  101.         o->labelsize(12);
  102.         { Fl_Group* o = new Fl_Group(15, 45, 480, 80, "Orientation");
  103.           o->box(FL_ENGRAVED_FRAME);
  104.           o->labelsize(12);
  105.           o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);
  106.           { Fl_Round_Button* o = m_Portrait = new Fl_Round_Button(45, 75, 67, 25, "Portrait");
  107.             o->type(102);
  108.             o->down_box(FL_ROUND_DOWN_BOX);
  109.             o->labelsize(12);
  110.           }
  111.           { Fl_Round_Button* o = m_Landscape = new Fl_Round_Button(230, 75, 97, 25, "Landscape");
  112.             o->type(102);
  113.             o->down_box(FL_ROUND_DOWN_BOX);
  114.             o->value(1);
  115.             o->labelsize(12);
  116.           }
  117.           { Fl_Box* o = new Fl_Box(120, 60, 40, 55);
  118.             o->box(FL_BORDER_FRAME);
  119.             o->color(FL_FOREGROUND_COLOR);
  120.             o->labelsize(12);
  121.           }
  122.           { Fl_Box* o = new Fl_Box(335, 67, 55, 40);
  123.             o->box(FL_BORDER_FRAME);
  124.             o->color(FL_FOREGROUND_COLOR);
  125.             o->labelsize(12);
  126.           }
  127.           o->end();
  128.         }
  129.         { Fl_Group* o = new Fl_Group(15, 130, 480, 65, "Scaling");
  130.           o->box(FL_ENGRAVED_BOX);
  131.           o->labelsize(12);
  132.           o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);
  133.           { Fl_Counter* o = m_PagesWide = new Fl_Counter(40, 154, 75, 25);
  134.             o->type(1);
  135.             o->labelsize(12);
  136.             o->minimum(1);
  137.             o->maximum(100);
  138.             o->step(1);
  139.             o->value(1);
  140.             o->textsize(12);
  141.           }
  142.           { Fl_Box* o = new Fl_Box(115, 154, 115, 25, "page(s) wide by");
  143.             o->labelsize(12);
  144.             o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
  145.           }
  146.           { Fl_Counter* o = m_PagesTall = new Fl_Counter(230, 154, 75, 25);
  147.             o->type(1);
  148.             o->labelsize(12);
  149.             o->minimum(1);
  150.             o->maximum(100);
  151.             o->step(1);
  152.             o->value(1);
  153.             o->textsize(12);
  154.           }
  155.           { Fl_Box* o = new Fl_Box(305, 154, 30, 25, "tall");
  156.             o->labelsize(12);
  157.             o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
  158.           }
  159.           o->end();
  160.         }
  161.         { Fl_Group* o = new Fl_Group(15, 200, 480, 55, "Paper");
  162.           o->box(FL_ENGRAVED_BOX);
  163.           o->labelsize(12);
  164.           o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);
  165.           { Fl_Choice* o = m_PaperSize = new Fl_Choice(40, 220, 145, 25);
  166.             o->down_box(FL_BORDER_BOX);
  167.             o->labelsize(12);
  168.             o->menu(menu_m_PaperSize);
  169.           }
  170.           { Fl_Output* o = m_PaperSizeDisplay = new Fl_Output(200, 220, 173, 25);
  171.             o->box(FL_NO_BOX);
  172.             o->color(FL_BACKGROUND_COLOR);
  173.             o->labelsize(12);
  174.             o->textsize(12);
  175.             o->textcolor(40);
  176.           }
  177.           o->end();
  178.         }
  179.         { Fl_Check_Button* o = m_PrintPageNumbers = new Fl_Check_Button(40, 265, 145, 25, "print page numbers");
  180.           o->down_box(FL_DOWN_BOX);
  181.           o->value(1);
  182.           o->labelsize(12);
  183.         }
  184.         o->end();
  185.       }
  186.       { Fl_Group* o = new Fl_Group(5, 35, 500, 280, "Margins");
  187.         o->labelsize(12);
  188.         o->hide();
  189.         { Fl_Box* o = new Fl_Box(110, 95, 105, 135, "Page");
  190.           o->box(FL_BORDER_FRAME);
  191.           o->color(FL_FOREGROUND_COLOR);
  192.           o->labelsize(12);
  193.           o->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
  194.         }
  195.         { Fl_Counter* o = m_HeaderOffset = new Fl_Counter(220, 65, 60, 25, "Header");
  196.           o->type(1);
  197.           o->labelsize(12);
  198.           o->minimum(0);
  199.           o->maximum(100);
  200.           o->step(0.05);
  201.           o->align(FL_ALIGN_TOP);
  202.         }
  203.         { Fl_Counter* o = m_MarginTop = new Fl_Counter(135, 65, 60, 25, "Top");
  204.           o->type(1);
  205.           o->labelsize(12);
  206.           o->minimum(0);
  207.           o->maximum(100);
  208.           o->step(0.05);
  209.           o->align(FL_ALIGN_TOP);
  210.         }
  211.         { Fl_Counter* o = m_MarginBottom = new Fl_Counter(135, 235, 58, 25, "Bottom");
  212.           o->type(1);
  213.           o->labelsize(12);
  214.           o->minimum(0);
  215.           o->maximum(100);
  216.           o->step(0.05);
  217.         }
  218.         { Fl_Counter* o = m_MarginLeft = new Fl_Counter(45, 150, 60, 25, "Left");
  219.           o->type(1);
  220.           o->labelsize(12);
  221.           o->minimum(0);
  222.           o->maximum(100);
  223.           o->step(0.05);
  224.           o->align(FL_ALIGN_LEFT);
  225.         }
  226.         { Fl_Counter* o = m_MarginRight = new Fl_Counter(220, 155, 60, 25, "Right");
  227.           o->type(1);
  228.           o->labelsize(12);
  229.           o->minimum(0);
  230.           o->maximum(100);
  231.           o->step(0.05);
  232.           o->align(FL_ALIGN_RIGHT);
  233.         }
  234.         { Fl_Counter* o = m_FooterOffset = new Fl_Counter(220, 235, 60, 25, "Footer");
  235.           o->type(1);
  236.           o->labelsize(12);
  237.           o->minimum(0);
  238.           o->maximum(100);
  239.           o->step(0.05);
  240.         }
  241.         o->end();
  242.       }
  243.       { Fl_Group* o = new Fl_Group(5, 35, 500, 280, "Header/Footer");
  244.         o->labelsize(12);
  245.         o->hide();
  246.         { Fl_Input* o = m_Title = new Fl_Input(20, 65, 470, 25, "Title");
  247.           o->labelsize(12);
  248.           o->align(FL_ALIGN_TOP_LEFT);
  249.         }
  250.         { Fl_Text_Editor* o = m_Header = new Fl_Text_Editor(20, 115, 470, 80, "Header");
  251.           o->box(FL_DOWN_BOX);
  252.           o->labelsize(12);
  253.           o->textsize(12);
  254.           o->align(FL_ALIGN_TOP_LEFT);
  255.         }
  256.         { Fl_Text_Editor* o = m_Footer = new Fl_Text_Editor(20, 220, 470, 80, "Footer");
  257.           o->box(FL_DOWN_BOX);
  258.           o->labelsize(12);
  259.           o->textsize(12);
  260.           o->align(FL_ALIGN_TOP_LEFT);
  261.         }
  262.         o->end();
  263.       }
  264.       o->end();
  265.     }
  266.     { Fl_Group* o = new Fl_Group(5, 320, 500, 25);
  267.       o->labelsize(12);
  268.       { Fl_Return_Button* o = new Fl_Return_Button(425, 320, 80, 25, "OK");
  269.         o->labelsize(12);
  270.         o->callback((Fl_Callback*)cb_OK);
  271.       }
  272.       { Fl_Button* o = new Fl_Button(340, 320, 80, 25, "Cancel");
  273.         o->labelsize(12);
  274.         o->callback((Fl_Callback*)cb_Cancel);
  275.       }
  276.       { Fl_Group* o = new Fl_Group(15, 320, 325, 25);
  277.         o->labelsize(12);
  278.         o->end();
  279.         Fl_Group::current()->resizable(o);
  280.       }
  281.       o->end();
  282.     }
  283.     o->end();
  284.   }
  285.   return w;
  286. }