⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ialign_row.hpp

📁 ncbi源码
💻 HPP
字号:
/* * =========================================================================== * PRODUCTION $Log: ialign_row.hpp,v $ * PRODUCTION Revision 1000.3  2004/04/12 18:16:09  gouriano * PRODUCTION PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.12 * PRODUCTION * =========================================================================== */#ifndef __GUI_WIDGETS_ALNMULTI___IALIGN_ROW__HPP#define __GUI_WIDGETS_ALNMULTI___IALIGN_ROW__HPP/*  $Id: ialign_row.hpp,v 1000.3 2004/04/12 18:16:09 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/glpane.hpp>#include <gui/utils/gui_event.hpp>#include <gui/opengl/glbitmapfont.hpp>#include <gui/widgets/gl/html_active_area.hpp>#include <gui/widgets/aln_multiple/row_display_style.hpp>BEGIN_NCBI_SCOPEclass IAlignRowHost;/////////////////////////////////////////////////////////////////////////////////// Interface  IAlignRow - abstracts row rendering in Multiple Alignment/// Widget.////// IAlignRow represents an object that can render alignment row as a set/// of cells corresponding to enumerated columns. No asumptions are made about/// data-structure used for alignment representation, concrete classes implementing/// the interface are responsible for providing means for accessing data. class IAlignRow{public:    typedef vector<CHTMLActiveArea>    TAreaVector;    ///  Column identifier    enum EColumnType    {        eInvalid = -1,        eDescr,        eIcons,        eStart,        eAlignment,        eEnd,        eSeqEnd    };    /// Row state.    enum EState {        fNone           = 0,            fItemSelected   = 0x01,         fItemFocused    = 0x02,                 fItemHidden     = 0x08,                fWidgetFocused  = 0x40000000, /// it isn'e exactly a row state;        // this flag is added dynamicaly to control row rendering                 fFocused = fItemFocused | fWidgetFocused,        fSelectedActive = fItemSelected | fWidgetFocused,        fSelectedFocused = fFocused | fItemSelected    };    enum    EGraphCacheCmd  {        eInvalidate,        eDelete    };    virtual ~IAlignRow()    {};        virtual void    SetHost(IAlignRowHost* pHost) = 0;    virtual void    SetDisplayStyle(const CRowDisplayStyle* style) = 0;    virtual const CRowDisplayStyle*    GetDisplayStyle() = 0;    /// Returns index of row in IAlnMultiDataSource.    virtual int GetRowNum() const = 0;      /// Returns height of the row in pixels.    virtual int GetHeightPixels() const = 0;            /// Renders a row cell corresponding to column specified by "col_type". "Pane"    /// represents port corresponding to the cell; model space is Elems x Pixels.    virtual void    RenderColumn(EColumnType  col_type, CGlPane& pane, int state) = 0;     virtual int     handle(CGUIEvent& event, EColumnType  col_type, CGlPane& pane) = 0;    virtual string  GetTooltip(EColumnType col_type, CGlPane& pane) = 0;    virtual void    GraphicsCacheCmd(EGraphCacheCmd cmd)    {};    virtual void    GetHTMLActiveAreas(EColumnType col_type, CGlPane& pane, TAreaVector& areas) = 0;};/// IAlignRowHost represents a context in which IAlignRow lives. ///class IAlignRowHost{public:    /// provides mouse coords in OpenGL viewport coord system    virtual TVPPoint    ARH_GetVPMousePos() = 0;        /// notifies a host about changes the row    virtual void        ARH_OnRowChanged(IAlignRow* p_row) = 0;    };END_NCBI_SCOPE/* * =========================================================================== * $Log: ialign_row.hpp,v $ * Revision 1000.3  2004/04/12 18:16:09  gouriano * PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.12 * * Revision 1.12  2004/04/06 19:06:38  yazhuk * Added "EColumnType col_type" argument to GetHTMLActiveAreas() * * Revision 1.11  2004/04/06 15:33:14  yazhuk * Added eInvalid to EColumnType * * Revision 1.10  2004/04/06 13:29:59  dicuccio * CHanged TAreaVector to use CHTMLActiveArea directly * * Revision 1.9  2004/03/29 19:01:26  yazhuk * Added GetHTMLActiveAreas() * * Revision 1.8  2004/03/17 20:08:46  yazhuk * Replaced #include <..fltk_utils.hpp> with <..gui_event.hpp> * * Revision 1.7  2004/02/17 15:20:15  yazhuk * Added GraphicsCacheCmd() * * Revision 1.6  2003/12/29 23:19:56  yazhuk * Added GetTooltip() * * Revision 1.5  2003/12/22 16:28:37  yazhuk * Rearranged state flags * * Revision 1.4  2003/12/18 21:08:46  yazhuk * Added display styles support, row state flags * * Revision 1.3  2003/12/01 16:42:23  yazhuk * Refactored event handling - introduced CGUIEvent * * Revision 1.2  2003/11/03 16:48:26  yazhuk * Added IAlignRowHost class * * Revision 1.1  2003/10/29 23:29:38  yazhuk * Initial revision * * =========================================================================== */#endif  // __GUI_WIDGETS_ALNMULTI___IALIGN_ROW__HPP

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -