📄 hit_matrix_widget.hpp
字号:
/* * =========================================================================== * PRODUCTION $Log: hit_matrix_widget.hpp,v $ * PRODUCTION Revision 1000.2 2004/04/12 18:16:52 gouriano * PRODUCTION PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.5 * PRODUCTION * =========================================================================== */#ifndef GUI_WIDGETS_HIT_MATRIX___HIT_MATRIX_WIDGET__HPP#define GUI_WIDGETS_HIT_MATRIX___HIT_MATRIX_WIDGET__HPP/* $Id: hit_matrix_widget.hpp,v 1000.2 2004/04/12 18:16:52 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: Andrey Yazhuk * * File Description: * */#include <corelib/ncbiobj.hpp>#include <gui/opengl/glcanvas2d.hpp>#include <gui/opengl/gldlist.hpp>#include <gui/opengl/glviewport.hpp>#include <gui/utils/command.hpp>#include <objects/seqloc/Seq_loc.hpp>#include <gui/widgets/gl/glpane_widget.hpp>#include <gui/widgets/hit_matrix/hit_matrix_pane.hpp>#include <gui/widgets/hit_matrix/hit_matrix_ds.hpp>#include <FL/Fl_Group.H>#include <FL/Fl_Scrollbar.H>BEGIN_NCBI_SCOPEclass CHitMatrixDataSource;/// Definitions for Hit Matrix Widget commands///enum EHitMatrixCommands { eCmdSetEqualScale = eBaseCmdLast + 200, eCmdChooseSeq, eCmdColorByScore,};/////////////////////////////////////////////////////////////////////////////////// class CHitMatrixWidgetclass NCBI_GUIWIDGETS_HIT_MATRIX_EXPORT CHitMatrixWidget : public CGlPaneWidget{public: typedef list<CConstRef<CSeq_id> > TIdRefList; CHitMatrixWidget(int x, int y, int w, int h, const char* label = NULL); virtual ~CHitMatrixWidget(); virtual void SetDataSource(CHitMatrixDataSource* p_ds); virtual CHitMatrixDataSource* GetDS(void); virtual const CGlPane& GetPort(void) const; virtual void OnSetScaleX(TModelUnit scale_x, const TModelPoint& point); /// @name Command handlers /// @{ void OnZoomSelection(void); void OnZoomToHits(void); void OnZoomToSelectedHitElems(void); void OnSetEqualScale(void); void OnChooseSeq(void); void OnColorByScore(void); /// @} virtual void OnShowPopup(void); CConstRef<CSeq_align_set> GetSelectedHits(void) const; CRef<CSeq_loc> GetSubjectSelection(void) const; CRef<CSeq_loc> GetQuerySelection(void) const; DECLARE_CMD_MAP();protected: // CGlPaneWidget overridables virtual void x_CreatePane(void); virtual CGlPaneWidgetChild* x_GetPane(void); virtual void x_SetPortLimits(void); virtual void x_ZoomToHits(void); virtual void x_UpdateScrollbars(void); virtual void x_OnScrollX(void); virtual void x_OnScrollY(void); virtual void x_Update(); virtual void x_UpdatePane();protected: CHitMatrixDataSource *m_pDataSource; CHitMatrixPane *m_pMatrixPane; int m_ScoreIndex; /// index of the score used for hit coloring};END_NCBI_SCOPE#endif // GUI_WIDGETS_HIT_MATRIX___HIT_MATRIX_WIDGET__HPP/* * =========================================================================== * $Log: hit_matrix_widget.hpp,v $ * Revision 1000.2 2004/04/12 18:16:52 gouriano * PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.5 * * Revision 1.5 2004/02/12 21:06:16 yazhuk * Added new Zoom functions; implemented OnShowPopup() * * Revision 1.4 2003/12/10 16:59:46 yazhuk * Added argument specifying ref. point to OnSetScaleX() * * Revision 1.3 2003/12/05 17:33:48 yazhuk * Added support for "Choose Sequences..." and "Color by Score" commands * * Revision 1.2 2003/12/01 17:03:13 yazhuk * Eliminated IHitMatrixParent inheritance, changed GetDS() function. * * Revision 1.1 2003/11/17 21:00:14 yazhuk * Initial revision * * =========================================================================== */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -