Flu_Label.cpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:2k
- /*
- * ===========================================================================
- * PRODUCTION $Log: Flu_Label.cpp,v $
- * PRODUCTION Revision 1000.1 2004/06/01 21:05:51 gouriano
- * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.2
- * PRODUCTION
- * ===========================================================================
- */
- /*
- * These files were imported into NCBI's CVS directly from FLU version 2.9.1.
- * Modifications to the source are listed below.
- *
- * ==========================================================================
- * $Log: Flu_Label.cpp,v $
- * Revision 1000.1 2004/06/01 21:05:51 gouriano
- * PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.2
- *
- * Revision 1.2 2004/05/21 22:27:51 gorelenk
- * Added PCH ncbi_pch.hpp
- *
- * Revision 1.1 2004/03/11 13:51:39 dicuccio
- * Imported FLU version 2.9.1. Altered export specifiers to match NCBI layout.
- * Altered include paths to match NCBI toolkit layout.
- *
- * ==========================================================================
- */
- // $Id: Flu_Label.cpp,v 1000.1 2004/06/01 21:05:51 gouriano Exp $
- /***************************************************************
- * FLU - FLTK Utility Widgets
- * Copyright (C) 2002 Ohio Supercomputer Center, Ohio State University
- *
- * This file and its content is protected by a software license.
- * You should have received a copy of this license with this file.
- * If not, please contact the Ohio Supercomputer Center immediately:
- * Attn: Jason Bryan Re: FLU 1224 Kinnear Rd, Columbus, Ohio 43212
- *
- ***************************************************************/
- #include <ncbi_pch.hpp>
- #include <gui/widgets/FLU/Flu_Label.h>
- Flu_Label :: Flu_Label( int x, int y, int w, int h, const char* l )
- : Fl_Box( x, y, w, h, 0 )
- {
- align( FL_ALIGN_LEFT | FL_ALIGN_INSIDE );
- _label = NULL;
- label( l );
- //box( FL_FLAT_BOX );
- box( FL_NO_BOX );
- }
- Flu_Label :: ~Flu_Label()
- {
- if( _label )
- delete[] _label;
- }
- void Flu_Label :: label( const char* l )
- {
- if( _label )
- delete[] _label;
- if( l == NULL )
- {
- _label = new char[1];
- _label[0] = ' ';
- }
- else
- {
- _label = new char[strlen(l)+1];
- strcpy( _label, l );
- }
- Fl_Box::label( _label );
- redraw();
- }