save_image_dlg_.cpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:4k
- /*
- * ===========================================================================
- * PRODUCTION $Log: save_image_dlg_.cpp,v $
- * PRODUCTION Revision 1000.1 2004/06/01 21:04:27 gouriano
- * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.4
- * PRODUCTION
- * ===========================================================================
- */
- // generated by Fast Light User Interface Designer (fluid) version 1.0105
- /* $Id: save_image_dlg_.cpp,v 1000.1 2004/06/01 21:04:27 gouriano Exp $ */
- #include <ncbi_pch.hpp>
- inline void CSaveImageDlg::cb_Browse_i(Fl_Button*, void*) {
- x_OnBrowse();
- }
- void CSaveImageDlg::cb_Browse(Fl_Button* o, void* v) {
- ((CSaveImageDlg*)(o->parent()->parent()->parent()->user_data()))->cb_Browse_i(o,v);
- }
- inline void CSaveImageDlg::cb_m_CustomSize_i(Fl_Check_Button*, void*) {
- x_OnCustomSize();
- }
- void CSaveImageDlg::cb_m_CustomSize(Fl_Check_Button* o, void* v) {
- ((CSaveImageDlg*)(o->parent()->parent()->parent()->user_data()))->cb_m_CustomSize_i(o,v);
- }
- Fl_Menu_Item CSaveImageDlg::menu_m_Format[] = {
- {"Portable Network Graphics (PNG)", 0, 0, (void*)(m_Png), 0, 0, 0, 14, 56},
- {"JPEG", 0, 0, (void*)(m_Jpeg), 0, 0, 0, 14, 56},
- {0}
- };
- Fl_Menu_Item* CSaveImageDlg::m_Png = CSaveImageDlg::menu_m_Format + 0;
- Fl_Menu_Item* CSaveImageDlg::m_Jpeg = CSaveImageDlg::menu_m_Format + 1;
- inline void CSaveImageDlg::cb_OK_i(Fl_Return_Button*, void*) {
- x_OnOK();
- }
- void CSaveImageDlg::cb_OK(Fl_Return_Button* o, void* v) {
- ((CSaveImageDlg*)(o->parent()->parent()->user_data()))->cb_OK_i(o,v);
- }
- inline void CSaveImageDlg::cb_Cancel_i(Fl_Button*, void*) {
- x_OnCancel();
- }
- void CSaveImageDlg::cb_Cancel(Fl_Button* o, void* v) {
- ((CSaveImageDlg*)(o->parent()->parent()->user_data()))->cb_Cancel_i(o,v);
- }
- Fl_Double_Window* CSaveImageDlg::x_Create(void) {
- Fl_Double_Window* w;
- { Fl_Double_Window* o = new Fl_Double_Window(485, 310, "Save Image");
- w = o;
- o->user_data((void*)(this));
- { Fl_Group* o = new Fl_Group(5, 5, 485, 265);
- { Fl_Group* o = new Fl_Group(5, 15, 475, 75, "Output Location");
- o->box(FL_ENGRAVED_FRAME);
- o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);
- new Fl_Box(45, 50, 30, 25, "File");
- m_Filename = new Fl_File_Input(90, 40, 280, 35);
- { Fl_Button* o = new Fl_Button(375, 50, 75, 25, "Browse...");
- o->callback((Fl_Callback*)cb_Browse);
- }
- o->end();
- }
- { Fl_Group* o = new Fl_Group(5, 95, 475, 120, "Scaling");
- o->box(FL_ENGRAVED_BOX);
- o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);
- { Fl_Group* o = m_CustomSizeGroup = new Fl_Group(15, 142, 455, 65);
- { Fl_Value_Input* o = m_RasterWidth = new Fl_Value_Input(65, 152, 75, 25, "width");
- o->minimum(1);
- o->maximum(100000);
- o->step(1);
- o->value(1);
- }
- { Fl_Value_Input* o = m_RasterHeight = new Fl_Value_Input(210, 152, 75, 25, "height");
- o->minimum(1);
- o->maximum(100000);
- o->step(1);
- o->value(1);
- }
- { Fl_Check_Button* o = new Fl_Check_Button(65, 182, 25, 25, "constrain proportions");
- o->down_box(FL_DOWN_BOX);
- }
- o->end();
- }
- { Fl_Check_Button* o = m_CustomSize = new Fl_Check_Button(34, 119, 25, 25, "Custom size");
- o->down_box(FL_DOWN_BOX);
- o->callback((Fl_Callback*)cb_m_CustomSize);
- }
- o->end();
- }
- o->end();
- }
- { Fl_Group* o = new Fl_Group(5, 219, 475, 55, "Output Format");
- o->box(FL_ENGRAVED_FRAME);
- o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);
- { Fl_Choice* o = m_Format = new Fl_Choice(90, 244, 280, 25);
- o->down_box(FL_BORDER_BOX);
- o->when(3);
- Fl_Group::current()->resizable(o);
- o->menu(menu_m_Format);
- }
- o->end();
- }
- { Fl_Group* o = new Fl_Group(5, 279, 480, 25);
- { Fl_Return_Button* o = new Fl_Return_Button(400, 279, 80, 25, "OK");
- o->callback((Fl_Callback*)cb_OK);
- }
- { Fl_Button* o = new Fl_Button(315, 279, 80, 25, "Cancel");
- o->callback((Fl_Callback*)cb_Cancel);
- }
- { Fl_Group* o = new Fl_Group(10, 279, 300, 25);
- o->end();
- Fl_Group::current()->resizable(o);
- }
- o->end();
- }
- o->end();
- }
- return w;
- }