view_graphic_.cpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:4k
- /*
- * ===========================================================================
- * PRODUCTION $Log: view_graphic_.cpp,v $
- * PRODUCTION Revision 1000.5 2004/06/01 20:59:48 gouriano
- * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.40
- * PRODUCTION
- * ===========================================================================
- */
- // generated by Fast Light User Interface Designer (fluid) version 1.0105
- /* $Id: view_graphic_.cpp,v 1000.5 2004/06/01 20:59:48 gouriano Exp $ */
- #include <ncbi_pch.hpp>
- inline void CViewGraphic::cb_Graphical_i(Fl_Window*, void*) {
- OnExit();
- }
- void CViewGraphic::cb_Graphical(Fl_Window* o, void* v) {
- ((CViewGraphic*)(o->user_data()))->cb_Graphical_i(o,v);
- }
- inline void CViewGraphic::cb_Print_i(Fl_Menu_*, void*) {
- OnPrint();
- }
- void CViewGraphic::cb_Print(Fl_Menu_* o, void* v) {
- ((CViewGraphic*)(o->parent()->user_data()))->cb_Print_i(o,v);
- }
- inline void CViewGraphic::cb_Zoom_i(Fl_Menu_*, void*) {
- x_OnZoomToSequence();
- }
- void CViewGraphic::cb_Zoom(Fl_Menu_* o, void* v) {
- ((CViewGraphic*)(o->parent()->user_data()))->cb_Zoom_i(o,v);
- }
- inline void CViewGraphic::cb_Fit_i(Fl_Menu_*, void*) {
- x_OnFitToWindow();
- }
- void CViewGraphic::cb_Fit(Fl_Menu_* o, void* v) {
- ((CViewGraphic*)(o->parent()->user_data()))->cb_Fit_i(o,v);
- }
- inline void CViewGraphic::cb_Preferences_i(Fl_Menu_*, void*) {
- x_OnPreferences();
- }
- void CViewGraphic::cb_Preferences(Fl_Menu_* o, void* v) {
- ((CViewGraphic*)(o->parent()->user_data()))->cb_Preferences_i(o,v);
- }
- Fl_Menu_Item CViewGraphic::menu_m_MenuBar[] = {
- {"&File", 0, 0, 0, 64, 0, 0, 14, 56},
- {"&Print", 0, (Fl_Callback*)CViewGraphic::cb_Print, 0, 0, 0, 0, 14, 56},
- {0},
- {"&Tools", 0, 0, 0, 64, 0, 0, 14, 56},
- {0},
- {"&View", 0, 0, 0, 64, 0, 0, 14, 56},
- {"Zoom to Sequence", 0, (Fl_Callback*)CViewGraphic::cb_Zoom, 0, 0, 0, 0, 14, 56},
- {"Fit &Sequence to Window", 0, (Fl_Callback*)CViewGraphic::cb_Fit, 0, 0, 0, 0, 14, 56},
- {"Preferences ...", 0, (Fl_Callback*)CViewGraphic::cb_Preferences, 0, 0, 0, 0, 14, 56},
- {"Active Views", 0, 0, 0, 64, 0, 0, 14, 56},
- {0},
- {"New View", 0, 0, 0, 64, 0, 0, 14, 56},
- {0},
- {0},
- {"&Help", 0, 0, 0, 64, 0, 0, 14, 56},
- {"&Index", 0, 0, 0, 128, 0, 0, 14, 56},
- {"&About", 0, 0, 0, 0, 0, 0, 14, 56},
- {0},
- {0}
- };
- inline void CViewGraphic::cb_m_SeqWidget_i(CSeqGraphicWidget*, void*) {
- x_PanelCallback();
- }
- void CViewGraphic::cb_m_SeqWidget(CSeqGraphicWidget* o, void* v) {
- ((CViewGraphic*)(o->parent()->user_data()))->cb_m_SeqWidget_i(o,v);
- }
- Fl_Window* CViewGraphic::x_CreateWindow() {
- Fl_Window* w;
- { Fl_Window* o = new Fl_Window(800, 620, "Graphical View");
- w = o;
- o->box(FL_FLAT_BOX);
- o->color(FL_BACKGROUND_COLOR);
- o->selection_color(FL_BACKGROUND_COLOR);
- o->labeltype(FL_NO_LABEL);
- o->labelfont(0);
- o->labelsize(14);
- o->labelcolor(FL_BLACK);
- o->callback((Fl_Callback*)cb_Graphical, (void*)(this));
- o->align(FL_ALIGN_TOP);
- o->when(FL_WHEN_RELEASE);
- { Fl_Menu_Bar* o = m_MenuBar = new Fl_Menu_Bar(0, 0, 800, 25);
- o->box(FL_FLAT_BOX);
- o->menu(menu_m_MenuBar);
- }
- { CMenuBar* o = m_ToolBar = new CMenuBar(0, 25, 800, 25);
- o->box(FL_NO_BOX);
- o->color(FL_BACKGROUND_COLOR);
- o->selection_color(FL_SELECTION_COLOR);
- o->labeltype(FL_NORMAL_LABEL);
- o->labelfont(0);
- o->labelsize(14);
- o->labelcolor(FL_BLACK);
- o->align(FL_ALIGN_CENTER);
- o->when(FL_WHEN_RELEASE_ALWAYS);
- }
- { CSeqGraphicWidget* o = m_SeqWidget = new CSeqGraphicWidget(0, 50, 800, 570);
- o->box(FL_NO_BOX);
- o->color(FL_BACKGROUND_COLOR);
- o->selection_color(FL_BACKGROUND_COLOR);
- o->labeltype(FL_NORMAL_LABEL);
- o->labelfont(0);
- o->labelsize(14);
- o->labelcolor(FL_BLACK);
- o->callback((Fl_Callback*)cb_m_SeqWidget);
- o->align(FL_ALIGN_CENTER);
- o->when(FL_WHEN_RELEASE);
- Fl_Group::current()->resizable(o);
- }
- o->end();
- }
- return w;
- }