font_demo_ui_.cpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:3k
- /*
- * ===========================================================================
- * PRODUCTION $Log: font_demo_ui_.cpp,v $
- * PRODUCTION Revision 1000.1 2004/06/01 20:52:08 gouriano
- * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.2
- * PRODUCTION
- * ===========================================================================
- */
- // generated by Fast Light User Interface Designer (fluid) version 1.0105
- /* $Id: font_demo_ui_.cpp,v 1000.1 2004/06/01 20:52:08 gouriano Exp $ */
- #include <ncbi_pch.hpp>
- inline void CFontDemoUI::cb__i(Fl_Double_Window*, void*) {
- x_OnFileExit();
- }
- void CFontDemoUI::cb_(Fl_Double_Window* o, void* v) {
- ((CFontDemoUI*)(o->user_data()))->cb__i(o,v);
- }
- inline void CFontDemoUI::cb_m_Face_i(Fl_Choice*, void*) {
- x_SetFont();
- }
- void CFontDemoUI::cb_m_Face(Fl_Choice* o, void* v) {
- ((CFontDemoUI*)(o->parent()->parent()->user_data()))->cb_m_Face_i(o,v);
- }
- Fl_Menu_Item CFontDemoUI::menu_m_Face[] = {
- {"Courier", 0, 0, (void*)(0), 4, 0, 0, 14, 56},
- {"Fixed", 0, 0, (void*)(1), 4, 0, 0, 14, 56},
- {"Helvetica", 0, 0, (void*)(2), 4, 0, 0, 14, 56},
- {"Lucida", 0, 0, (void*)(3), 4, 0, 0, 14, 56},
- {"Times", 0, 0, (void*)(4), 4, 0, 0, 14, 56},
- {0}
- };
- inline void CFontDemoUI::cb_m_Size_i(Fl_Choice*, void*) {
- x_SetFont();
- }
- void CFontDemoUI::cb_m_Size(Fl_Choice* o, void* v) {
- ((CFontDemoUI*)(o->parent()->parent()->user_data()))->cb_m_Size_i(o,v);
- }
- Fl_Menu_Item CFontDemoUI::menu_m_Size[] = {
- {"8", 0, 0, (void*)(8), 4, 0, 0, 14, 56},
- {"10", 0, 0, (void*)(10), 4, 0, 0, 14, 56},
- {"12", 0, 0, (void*)(12), 4, 0, 0, 14, 56},
- {"14", 0, 0, (void*)(14), 4, 0, 0, 14, 56},
- {"18", 0, 0, (void*)(18), 4, 0, 0, 14, 56},
- {"24", 0, 0, (void*)(24), 4, 0, 0, 14, 56},
- {0}
- };
- Fl_Double_Window* CFontDemoUI::x_CreateWindow() {
- Fl_Double_Window* w;
- { Fl_Double_Window* o = new Fl_Double_Window(530, 520);
- w = o;
- o->callback((Fl_Callback*)cb_, (void*)(this));
- { Fl_Group* o = new Fl_Group(0, 0, 530, 25);
- { Fl_Choice* o = m_Face = new Fl_Choice(150, 0, 120, 25, "Font ");
- o->down_box(FL_BORDER_BOX);
- o->callback((Fl_Callback*)cb_m_Face);
- o->menu(menu_m_Face);
- }
- { Fl_Choice* o = m_Size = new Fl_Choice(275, 0, 50, 25, "Size ");
- o->down_box(FL_BORDER_BOX);
- o->callback((Fl_Callback*)cb_m_Size);
- o->align(FL_ALIGN_RIGHT);
- o->menu(menu_m_Size);
- }
- o->end();
- }
- { Fl_Group* o = new Fl_Group(0, 25, 530, 495);
- o->box(FL_DOWN_FRAME);
- { CFontWindow* o = m_Canvas = new CFontWindow(2, 27, 526, 491);
- 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->align(FL_ALIGN_CENTER);
- o->when(FL_WHEN_RELEASE);
- Fl_Group::current()->resizable(o);
- }
- o->end();
- Fl_Group::current()->resizable(o);
- }
- o->end();
- }
- return w;
- }