view.hpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:4k
- /*
- * ===========================================================================
- * PRODUCTION $Log: view.hpp,v $
- * PRODUCTION Revision 1000.1 2004/04/12 18:16:16 gouriano
- * PRODUCTION PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.5
- * PRODUCTION
- * ===========================================================================
- */
- #ifndef GUI_WIDGETS_ALN_TEXTALN___VIEW__HPP
- #define GUI_WIDGETS_ALN_TEXTALN___VIEW__HPP
- /* $Id: view.hpp,v 1000.1 2004/04/12 18:16:16 gouriano Exp $
- * ===========================================================================
- *
- * PUBLIC DOMAIN NOTICE
- * National Center for Biotechnology Information
- *
- * This software/database is a "United States Government Work" under the
- * terms of the United States Copyright Act. It was written as part of
- * the author's official duties as a United States Government employee and
- * thus cannot be copyrighted. This software/database is freely available
- * to the public for use. The National Library of Medicine and the U.S.
- * Government have not placed any restriction on its use or reproduction.
- *
- * Although all reasonable efforts have been taken to ensure the accuracy
- * and reliability of the software and data, the NLM and the U.S.
- * Government do not and cannot warrant the performance or results that
- * may be obtained by using this software or data. The NLM and the U.S.
- * Government disclaim all warranties, express or implied, including
- * warranties of performance, merchantability or fitness for any particular
- * purpose.
- *
- * Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- * Authors: Vlad Lebedev
- *
- * File Description:
- * Text alignment view widget
- *
- */
- #include <corelib/ncbistd.hpp>
- #include <gui/gui.hpp>
- #include <FL/Fl_Group.H>
- #include <FL/Fl_Scrollbar.H>
- BEGIN_NCBI_SCOPE
- class CTextAlnPanel;
- class CAlignDataSource;
- class NCBI_GUIWIDGETS_ALNTEXTALN_EXPORT CTextAlnView : public Fl_Group
- {
- public:
- CTextAlnView(int x, int y, int w, int h, const char* label = NULL);
- virtual ~CTextAlnView();
- void SetDataSource(CAlignDataSource* ds);
- enum EDisplayElement {
- eBackground,
- eGrid,
- eNumbers,
- eSelection,
- eSequence,
- eMismatch
- };
- enum EFeatureDisplay {
- eOff,
- eBase,
- eAll
- };
- typedef int TFeatureDisplay; // EFeatureDisplay
- void SetFeatureDisplay(EFeatureDisplay disp);
- void SetColor(EDisplayElement elem, Fl_Color color);
- Fl_Color GetColor(EDisplayElement elem) const;
- void ShowSequenceAsDots(bool show_dots );
- void SelectAll (bool flag );
- void SetAnchor (size_t idx);
- void UnsetAnchor(void);
- //void ShowLongSequenceInfo (bool show_info );
- //void AllowAlignmentEdit (bool allow_edit);
-
- private:
- friend void s_CTextAlnView_ScrollCB(Fl_Widget*, void*);
- friend class CTextAlnPanel;
- void x_ScrollCB();
- Fl_Scrollbar* m_ScrollX;
- Fl_Scrollbar* m_ScrollY;
-
- CTextAlnPanel* m_TextAlnPanel;
- };
- END_NCBI_SCOPE
- /*
- * ===========================================================================
- * $Log: view.hpp,v $
- * Revision 1000.1 2004/04/12 18:16:16 gouriano
- * PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.5
- *
- * Revision 1.5 2004/03/11 17:22:22 dicuccio
- * Deprecated TIndex / TDimension / TPosition / TColor. Corrected constructor to
- * take a default null const char* label param.
- *
- * Revision 1.4 2003/09/24 18:20:22 dicuccio
- * Use generic data source
- *
- * Revision 1.3 2003/09/16 14:37:13 dicuccio
- * Cleaned up and clarified export specifiers - added a new specifier for each
- * library
- *
- * Revision 1.2 2003/09/12 12:59:36 dicuccio
- * Changed export specifiers to be specific for the alignment widget library
- *
- * Revision 1.1 2003/03/27 17:02:29 lebedev
- * Text Alignment Widget: Initial revision
- *
- * ===========================================================================
- */
- #endif /* GUI_WIDGETS_ALN_TEXTALN___VIEW__HPP */