📄 ipolicy.hpp
字号:
/* * =========================================================================== * PRODUCTION $Log: ipolicy.hpp,v $ * PRODUCTION Revision 1000.2 2004/06/01 19:52:46 gouriano * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.8 * PRODUCTION * =========================================================================== */#ifndef GUI_WIDGETS_GL___IPOLICY__HPP#define GUI_WIDGETS_GL___IPOLICY__HPP/* $Id: ipolicy.hpp,v 1000.2 2004/06/01 19:52:46 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: * IPolicy -- the basic interface for rendering policies in Feature Panel */#include <corelib/ncbistd.hpp>#include <objmgr/bioseq_handle.hpp>#include <gui/opengl/glpane.hpp>#include <gui/objutils/utils.hpp>#include <gui/objutils/label.hpp>#include <gui/widgets/seq_graphic/seqgraphic_conf.hpp>#include <gui/widgets/gl/html_active_area.hpp>BEGIN_NCBI_SCOPE//// class IPolicy defines the abstract interface required of rendering // LayoutObjects constructed in the FeaturePanel//class IPolicy : public CObject{public: typedef vector<CHTMLActiveArea> TAreaVector; enum EObj_IterMode { eDrawObjectLines, eDrawObjectQuads, eDrawObjectLabel, eDrawObjectGrid, eCalcObjectRows, eGetHTMLAreas, eObjectHitTest }; // virtual destructor virtual ~IPolicy(void) { } // returns height for the given CLayoutObject (for layout) virtual TModelUnit GetRowHeight(CGlPane& pane, const CLayoutObject* obj, bool selected) const = 0; // process the CLayoutObject virtual bool ProcessObject(CGlPane& pane, const CLayoutObject* obj, TModelUnit row, EObj_IterMode mode, bool selected) const = 0; // get title (tooltip) for CLayoutObject virtual void GetTitle(const CLayoutObject* obj, string* title, CLabel::ELabelType type) const = 0; // initialization methods virtual void SetHandle(const objects::CBioseq_Handle& handle) = 0; virtual void SetConfig(CSeqGraphicConfig* config) = 0; // this is called before doing any hit testing virtual void SetHitPoint(TModelPoint click) = 0; // this is called before querying for HTML active areas virtual void SetActiveArea(TAreaVector* p_area) = 0;};END_NCBI_SCOPE/* * =========================================================================== * $Log: ipolicy.hpp,v $ * Revision 1000.2 2004/06/01 19:52:46 gouriano * PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.8 * * Revision 1.8 2004/05/14 15:57:09 lebedev * Optional argument to specify the type of title/tooltip added * * Revision 1.7 2004/05/03 12:47:08 dicuccio * Added #include for gui/gui.hpp. gui/utils ->gui/objutils where needed. * * Revision 1.6 2004/04/16 14:33:22 dicuccio * Pass config as raw pointer, not CRef<> * * Revision 1.5 2004/04/06 13:29:30 dicuccio * Changed type of TAreaVector to use CHMTLActiveArea directly * * Revision 1.4 2004/03/31 16:07:51 lebedev * eGetHTMLAreas added * * Revision 1.3 2004/03/23 12:35:49 lebedev * Get rid of fixed size rows in IRenderable panels * * Revision 1.2 2004/01/16 13:53:17 lebedev * Method for retrieving tooltips added * * Revision 1.1 2003/12/16 18:53:05 lebedev * Initial revision * * =========================================================================== */#endif // GUI_WIDGETS_GL___IPOLICY__HPP
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -