NCBI C++ ToolKit
seq_text_geometry.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef __GUI_WIDGETS_SEQTEXT___SEQ_TEXT_GEOMETRY__HPP
2 #define __GUI_WIDGETS_SEQTEXT___SEQ_TEXT_GEOMETRY__HPP
3 
4 /* $Id: seq_text_geometry.hpp 30100 2014-04-08 10:56:52Z bollin $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Colleen Bollin
30  *
31  * File Description:
32  *
33  */
34 
35 #include <corelib/ncbistl.hpp>
36 
38 #include <gui/opengl/glpane.hpp>
39 
41 
43 #include <util/range_coll.hpp>
45 
46 // for codon rendering
48 #include <objmgr/feat_ci.hpp>
49 
51 
52 ////////////////////////////////////////////////////////////////////////////////
53 /// class ISeqTextGeometry
54 
56 {
57 public:
58  virtual ~ISeqTextGeometry() { }
59 
60  virtual void STG_Redraw() = 0;
61  virtual void STG_OnChanged() = 0;
62  virtual TSeqPos STG_GetSequenceByWindow(int x, int y) = 0;
64  virtual TModelPoint STG_GetModelPointBySequencePos(TSeqPos z, bool *found_in_source) = 0;
65  virtual TSeqPos STG_GetSourcePosBySequencePos (TSeqPos z, bool *found_in_source) = 0;
66  virtual void STG_GetVisibleRange (TSeqPos& seq_start, TSeqPos &seq_stop) = 0;
67  virtual void STG_GetLineInfo(TSeqPos &chars_in_line, TSeqPos &lines_in_pane) = 0;
68  virtual int STG_GetLinesInPane () = 0;
69 
70  virtual objects::CScope& STG_GetScope() = 0;
71  virtual const objects::CSeq_loc* STG_GetDataSourceLoc() = 0;
73  virtual void STG_ReportMouseOverPos(TSeqPos pos) = 0;
74  virtual bool STG_IsPointInRightMargin(int x, int y) = 0;
75  virtual void STG_RenderSelectedFeature(const objects::CSeq_feat& feat, const objects::CSeq_loc& mapped_loc) = 0;
76  virtual void STG_RenderMouseOverFeature(const objects::CSeq_feat& feat) = 0;
77  virtual vector<CConstRef<objects::CSeq_feat> > STG_GetFeaturesAtPosition(TSeqPos pos) = 0;
78  virtual void STG_SetSubtypesForFeature (CSeqTextDefs::TSubtypeVector &subtypes, const objects::CSeq_loc& loc, int subtype, TSeqPos start_offset, TSeqPos stop_offset) = 0;
79  virtual void STG_RenderFeatureExtras(const objects::CMappedFeat& feat) = 0;
80 
81  virtual void STG_SetDefaultCursor() = 0;
82  virtual void STG_SetResizeCursor() = 0;
83 };
84 
85 
86 ////////////////////////////////////////////////////////////////////////////////
87 /// class ISequenceTextGraphHost
88 
90 {
91 public:
95 };
96 
98 
99 #endif // __GUI_WIDGETS_SEQTEXT___SEQ_TEXT_GEOMETRY__HPP
User-defined methods of the data storage class.
vector< int > TSubtypeVector
class ISeqTextGeometry
virtual void STG_SetDefaultCursor()=0
virtual void STG_SetResizeCursor()=0
virtual void STG_RenderFeatureExtras(const objects::CMappedFeat &feat)=0
virtual void STG_ReportMouseOverPos(TSeqPos pos)=0
virtual const objects::CSeq_loc * STG_GetDataSourceLoc()=0
virtual void STG_RenderSelectedFeature(const objects::CSeq_feat &feat, const objects::CSeq_loc &mapped_loc)=0
virtual void STG_GetVisibleRange(TSeqPos &seq_start, TSeqPos &seq_stop)=0
virtual void STG_SetSubtypesForFeature(CSeqTextDefs::TSubtypeVector &subtypes, const objects::CSeq_loc &loc, int subtype, TSeqPos start_offset, TSeqPos stop_offset)=0
virtual void STG_Redraw()=0
virtual bool STG_IsPointInRightMargin(int x, int y)=0
virtual vector< CConstRef< objects::CSeq_feat > > STG_GetFeaturesAtPosition(TSeqPos pos)=0
virtual TModelUnit STG_GetTextHeight()=0
virtual objects::CScope & STG_GetScope()=0
virtual TModelPoint STG_GetModelPointBySourcePos(TSeqPos z)=0
virtual TSeqPos STG_GetSourcePosBySequencePos(TSeqPos z, bool *found_in_source)=0
virtual int STG_GetLinesInPane()=0
virtual void STG_RenderMouseOverFeature(const objects::CSeq_feat &feat)=0
virtual TSeqPos STG_GetSequenceByWindow(int x, int y)=0
virtual void STG_GetLineInfo(TSeqPos &chars_in_line, TSeqPos &lines_in_pane)=0
virtual TModelPoint STG_GetModelPointBySequencePos(TSeqPos z, bool *found_in_source)=0
virtual void STG_OnChanged()=0
class ISequenceTextGraphHost
virtual void STGH_GetMouseOverFeatureSubtypes(CSeqTextDefs::TSubtypeVector &subtypes)=0
virtual void STGH_GetSelectedFeatureSubtypes(CSeqTextDefs::TSubtypeVector &subtypes)=0
unsigned int TSeqPos
Type for sequence locations and lengths.
Definition: ncbimisc.hpp:875
GLdouble TModelUnit
Definition: gltypes.hpp:48
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
The NCBI C++/STL use hints.
Modified on Wed May 29 18:43:29 2024 by modify_doxy.py rev. 669887