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

📄 row_display_style.hpp

📁 ncbi源码
💻 HPP
字号:
/* * =========================================================================== * PRODUCTION $Log: row_display_style.hpp,v $ * PRODUCTION Revision 1000.0  2004/04/12 18:23:29  gouriano * PRODUCTION PRODUCTION: IMPORTED [CATCHUP_003] Dev-tree R1.4 * PRODUCTION * =========================================================================== */#ifndef __GUI_WIDGETS_ALNMULTI___ROW_DISPLAY_STYLE__HPP#define __GUI_WIDGETS_ALNMULTI___ROW_DISPLAY_STYLE__HPP/*  $Id: row_display_style.hpp,v 1000.0 2004/04/12 18:23:29 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/glcolor.hpp>#include <gui/opengl/glbitmapfont.hpp>BEGIN_NCBI_SCOPE/////////////////////////////////////////////////////////////////////////////////// CWidgetDisplayStyle is a collection of display properties common for all/// rows in the CAlnMultiWidget.class  NCBI_GUIWIDGETS_ALNMULTIPLE_EXPORT  CWidgetDisplayStyle{public:    CWidgetDisplayStyle(void);    virtual ~CWidgetDisplayStyle(void) {};public:    CGlBitmapFont  m_TextFont; /// text font (description, positions etc.)    CGlBitmapFont  m_SeqFont; /// sequence font    CGlColor    m_TextColor; /// text color    CGlColor    m_SelTextColor; /// selected text color    CGlColor    m_SelBackColor; /// background for selected    CGlColor    m_SelBackFocusedColor; /// background for selected and focused rows        CGlColor    m_FrameColor;};/////////////////////////////////////////////////////////////////////////////////// CRowDisplayStyle is a base class representing a display style for IAlignRow.////// CRowDisplayStyle plays a role of Proxy providing functions for accessing /// display properties actually stored in a widget. class  NCBI_GUIWIDGETS_ALNMULTIPLE_EXPORT  CRowDisplayStyle{public:    CRowDisplayStyle();    virtual ~CRowDisplayStyle(void);        virtual void    SetWidgetStyle(const CWidgetDisplayStyle* style);    /// @name Proxy methods    /// provide access to the Widget display style properties    /// @{    virtual const CGlBitmapFont&  GetTextFont(void) const;    virtual const CGlBitmapFont&  GetSeqFont(void) const;    virtual const CGlColor&   GetTextColor(void) const;    virtual const CGlColor&   GetSelTextColor(void) const;    virtual const CGlColor&   GetSelBackColor(void) const;    virtual const CGlColor&   GetSelBackFocusedColor(void) const;    virtual const CGlColor&   GetFrameColor(void) const;    /// @}protected:    const CWidgetDisplayStyle*  m_pWidgetStyle;  /// pointer to Widget's style  };/////////////////////////////////////////////////////////////////////////////////// CRowStyleCatalog is a collection of CRowDisplayStyle-s assigned to rows /// in alignment. /// By default all rows have the same style but can be customized by...class  NCBI_GUIWIDGETS_ALNMULTIPLE_EXPORT  CRowStyleCatalog{public:    typedef int TNumrow;    CRowStyleCatalog();    ~CRowStyleCatalog();    void    SetWidgetStyle(const CWidgetDisplayStyle* style);        void    SetDefaultStyle(CRowDisplayStyle* style);    void    SetRowStyle(TNumrow row, CRowDisplayStyle* style);    void    SetRowTypeStyle(int type, CRowDisplayStyle* style);    const CRowDisplayStyle*   GetStyleForRow(TNumrow row) const;        const CRowDisplayStyle*   GetStyleForRow(TNumrow row, int type) const;        void    ClearCustomStyles();protected:    typedef map<TNumrow, CRowDisplayStyle*> TRowToStyle;    typedef map<int, CRowDisplayStyle*> TTypeToStyle;    const CWidgetDisplayStyle*  m_pWidgetStyle;    CRowDisplayStyle*           m_pDefStyle;        TRowToStyle     m_RowToStyle; /// overriden styles for rows    TTypeToStyle    m_TypeToStyle; /// overriden styles for row types};END_NCBI_SCOPE/* * =========================================================================== * $Log: row_display_style.hpp,v $ * Revision 1000.0  2004/04/12 18:23:29  gouriano * PRODUCTION: IMPORTED [CATCHUP_003] Dev-tree R1.4 * * Revision 1.4  2004/04/02 16:24:20  yazhuk * Added Frame color to display styles * * Revision 1.3  2003/12/22 16:28:12  yazhuk * Implemented binding display styles to row number and ow types * * Revision 1.2  2003/12/22 16:10:48  johnson * made CWidgetDisplayStyle polymorphic * * Revision 1.1  2003/12/18 20:55:39  yazhuk * Initial revision * * =========================================================================== */#endif  // __GUI_WIDGETS_ALNMULTI___ROW_DISPLAY_STYLE__HPP

⌨️ 快捷键说明

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