score_dlg_.cpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:2k
- /*
- * ===========================================================================
- * PRODUCTION $Log: score_dlg_.cpp,v $
- * PRODUCTION Revision 1000.1 2004/06/01 21:11:15 gouriano
- * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.2
- * PRODUCTION
- * ===========================================================================
- */
- // generated by Fast Light User Interface Designer (fluid) version 1.0105
- /* $Id: score_dlg_.cpp,v 1000.1 2004/06/01 21:11:15 gouriano Exp $ */
- #include <ncbi_pch.hpp>
- inline void CScoreDlg::cb_Cancel_i(Fl_Button*, void*) {
- x_OnCancel();
- }
- void CScoreDlg::cb_Cancel(Fl_Button* o, void* v) {
- ((CScoreDlg*)(o->parent()->user_data()))->cb_Cancel_i(o,v);
- }
- inline void CScoreDlg::cb_Ok_i(Fl_Return_Button*, void*) {
- x_OnOK();
- }
- void CScoreDlg::cb_Ok(Fl_Return_Button* o, void* v) {
- ((CScoreDlg*)(o->parent()->user_data()))->cb_Ok_i(o,v);
- }
- Fl_Double_Window* CScoreDlg::x_CreateWindow() {
- Fl_Double_Window* w;
- { Fl_Double_Window* o = new Fl_Double_Window(314, 193);
- w = o;
- o->user_data((void*)(this));
- { Fl_Button* o = new Fl_Button(210, 50, 90, 25, "Cancel");
- o->labelsize(12);
- o->callback((Fl_Callback*)cb_Cancel);
- }
- { Fl_Return_Button* o = new Fl_Return_Button(210, 15, 90, 25, "Ok");
- o->labelsize(12);
- o->callback((Fl_Callback*)cb_Ok);
- }
- { CBrowser* o = m_List = new CBrowser(10, 15, 190, 165);
- o->type(2);
- o->box(FL_NO_BOX);
- o->color(FL_BACKGROUND2_COLOR);
- o->selection_color(FL_SELECTION_COLOR);
- o->labeltype(FL_NORMAL_LABEL);
- o->labelfont(0);
- o->labelsize(12);
- o->labelcolor(FL_BLACK);
- o->textsize(12);
- o->align(FL_ALIGN_BOTTOM);
- o->when(FL_WHEN_RELEASE_ALWAYS);
- }
- o->end();
- }
- return w;
- }
- void CScoreDlg::SetItems(const vector<string>& items, int curr) {
- _ASSERT(m_List);
- int size = items.size();
- for( int i = 0; i < size; i++ ) {
- m_List->insert(size, items[i].c_str());
- }
- m_List->select(curr + 1);
- }
- int CScoreDlg::GetSelectedIndex() {
- return m_SelectedIndex;
- }