NCBI C++ ToolKit
Public Member Functions | Private Member Functions | Private Attributes | List of all members
CPaintSequence Class Reference

Search Toolkit Book for CPaintSequence

#include <gui/widgets/edit/paint_sequence.hpp>

+ Inheritance diagram for CPaintSequence:
+ Collaboration diagram for CPaintSequence:

Public Member Functions

 CPaintSequence ()
 
 CPaintSequence (wxWindow *parent, const string &seq, const vector< int > &seq_len, const vector< vector< pair< TSeqPos, TSeqPos > > > &feat_ranges, const vector< pair< string, objects::CSeqFeatData::ESubtype > > &feat_types, const vector< objects::CBioseq_Handle::EVectorStrand > &feat_strand, const vector< int > &feat_frames, const vector< CRef< objects::CGenetic_code > > &genetic_code, const vector< bool > &feat_partial5, const string &allowed_char_set, const vector< string > &real_prot, const vector< bool > &read_only, const unordered_map< int, vector< vector< pair< TSeqPos, TSeqPos > > > > &prot_feat_ranges, const int start=0, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize)
 
virtual ~CPaintSequence ()
 
void InitPanel ()
 
void OnMouseClick (wxMouseEvent &evt)
 
void OnKeyDown (wxKeyEvent &event)
 
void OnChar (wxKeyEvent &event)
 
void OnMouseDrag (wxMouseEvent &evt)
 
void OnMouseDown (wxMouseEvent &evt)
 
void OnCopy (wxCommandEvent &event)
 
void OnCut (wxCommandEvent &event)
 
void OnPaste (wxCommandEvent &event)
 
string GetSeq ()
 
int GetLength ()
 
void SetPos (int pos)
 
void SetRange (int pos1, int pos2)
 
void Search (const string &val)
 
vector< int > & GetSeqLen ()
 
vector< bool > & GetReadOnly ()
 
void UpdateData ()
 
void EnableTranslation (bool enable)
 
void EnableTranslation1 (bool enable)
 
void EnableTranslation2 (bool enable)
 
void EnableRevTranslation (bool enable)
 
void EnableRevTranslation1 (bool enable)
 
void EnableRevTranslation2 (bool enable)
 
void EnableComplement (bool enable)
 
void EnableFeatures (bool enable)
 
void EnableOnTheFly (bool enable)
 
void EnableMismatch (bool enable)
 
bool IsClipboard ()
 
bool IsSelection ()
 
pair< int, intGetSelection ()
 
virtual void OnPaint (wxPaintEvent &event)
 Painting. More...
 
virtual void OnEraseBackground (wxEraseEvent &event)
 
virtual wxCoord OnGetRowHeight (size_t row) const
 
virtual void OnUpdate ()
 Notification for the derived class that moment is good for doing its update and drawing stuff. More...
 
void OnResize (wxSizeEvent &)
 
void UpdateFeatures (const vector< vector< pair< TSeqPos, TSeqPos > > > &feat_ranges, const vector< pair< string, objects::CSeqFeatData::ESubtype > > &feat_types, const vector< objects::CBioseq_Handle::EVectorStrand > &feat_strand, const vector< int > &feat_frames, const vector< CRef< objects::CGenetic_code > > &genetic_code, const vector< bool > &feat_partial5, const vector< string > &real_prot, const unordered_map< int, vector< vector< pair< TSeqPos, TSeqPos > > > > &prot_feat_ranges)
 
void SetClean (bool clean)
 
bool GetClean ()
 
stringGetFindString (bool is_nuc, bool is_revcomp, const string &choice)
 
set< int > & SetHighlights ()
 
TSeqPos GetFeatureStart (int i, int j)
 
TSeqPos GetFeatureStop (int i, int j)
 
TSeqPos GetProtFeatureStart (int i, int k, int j)
 
TSeqPos GetProtFeatureStop (int i, int k, int j)
 

Private Member Functions

void NormalizeCursorColRows ()
 
void InsertChar (int uc)
 
void DeleteChar ()
 
void ScrollWithCursor ()
 
void SeqPosToColRow ()
 
void ColRowToSeqPos ()
 
unsigned int PosToSegment ()
 
void ClearScreen (wxGraphicsContext *gc)
 
void CalculateFontWidthAndHeight (wxGraphicsContext *gc)
 
int CalculateNumCols ()
 
void DrawTextLine (const string &substr, int &y_label, int row, wxGraphicsContext *gc, size_t &seq_pos)
 
void DrawTextCell (const wxString &substr, int col, int row, unsigned int seq_pos, int x, int &y, const vector< unsigned int > &feats_in_row, const map< unsigned int, vector< unsigned int > > &feats_with_exons, wxGraphicsContext *gc) const
 
void DrawCursor (int col, int row, int x, int &y, wxGraphicsContext *gc) const
 
void DrawTranslation (int x, int &y, unsigned int seq_pos, wxGraphicsContext *gc) const
 
void DrawOffsetTranslation (int x, int y, unsigned int seq_pos, int offset, const string &prot, wxGraphicsContext *gc) const
 
void DrawComplement (int x, int &y, unsigned int seq_pos, wxGraphicsContext *gc) const
 
const wxPen * GetColorForFeature (objects::CSeqFeatData::ESubtype subtype) const
 
void DrawFeatures (int row, unsigned int seq_pos, int x, int &y, int y_base, const vector< unsigned int > &feats_in_row, const map< unsigned int, vector< unsigned int > > &feats_with_exons, wxGraphicsContext *gc) const
 
void DrawFeatureLabels (int row, int x, int &y, const vector< unsigned int > &feats_in_row, const map< unsigned int, vector< unsigned int > > &feats_with_exons, wxGraphicsContext *gc) const
 
int LeftMarginWidth ()
 
void DrawLineNumber (unsigned int seq_pos, int x, int &y, wxGraphicsContext *gc) const
 
void DrawOnTheFly (int x, int &y, int y_base, unsigned int seq_pos, int i, const map< unsigned int, vector< unsigned int > > &feats_with_exons, wxGraphicsContext *gc) const
 
char TranslateOnTheFly (unsigned int seq_pos, int i, const vector< unsigned int > &ranges, const vector< string > &translation, bool &left, bool &right) const
 
void DrawMismatch (int x, int &y, int y_base, unsigned int seq_pos, int i, const map< unsigned int, vector< unsigned int > > &feats_with_exons, wxGraphicsContext *gc) const
 
bool MouseToSeqPos (wxPoint p, int &row, int &y_row)
 
void DrawTripletMismatch (int x, int y, int y_base, int i, wxGraphicsContext *gc) const
 
void DrawComplementLabel (int row, int x, int &y, wxGraphicsContext *gc) const
 
void DrawOnTheFlyLabel (int x, int &y, bool is_exon_present, wxGraphicsContext *gc) const
 
void DrawTranslationLabels (int row, int x, int &y, wxGraphicsContext *gc) const
 
void DrawMismatchLabel (int x, int &y, bool is_exon_present, wxGraphicsContext *gc) const
 
void TranslateCDS ()
 
void MouseToFeature (wxPoint p, int row, int y0)
 
void AdjustFeatureRange (int origin, int offset)
 
void AdjustProtFeatRange (int origin, int offset, int i)
 
void AdjustFeatStartStop (int origin, int offset, int &start, int &stop)
 
int FindRowByCoord (int y, int &y_row)
 
int TopMarginHeight ()
 
void DrawLabelCell (unsigned int pos, int x, int &y, int row, const vector< unsigned int > &feats_in_row, const map< unsigned int, vector< unsigned int > > &feats_with_exons, wxGraphicsContext *gc) const
 
vector< unsigned intGetFeaturesInRow (int row) const
 
void GetFeatWholeRange ()
 
vector< unsigned intIsExonPresent (int i, int row) const
 
map< unsigned int, vector< unsigned int > > GetFeatsWithExons (int row, const vector< unsigned int > &feats_in_row) const
 
void RefreshWithScroll ()
 
string CutSelection ()
 
void SetStartPos (void)
 

Private Attributes

string m_Seq
 
string m_Prot
 
string m_Prot1
 
string m_Prot2
 
string m_Complement
 
string m_RevProt
 
string m_RevProt1
 
string m_RevProt2
 
vector< intm_SeqLen
 
vector< vector< pair< TSeqPos, TSeqPos > > > m_FeatRanges
 
unordered_map< int, vector< vector< pair< TSeqPos, TSeqPos > > > > m_ProtFeatRanges
 
vector< pair< string, objects::CSeqFeatData::ESubtype > > m_FeatTypes
 
vector< intm_FeatFrames
 
vector< CRef< objects::CGenetic_code > > m_GeneticCode
 
vector< boolm_Feat5Partial
 
vector< pair< TSeqPos, TSeqPos > > m_FeatWholeRange
 
vector< vector< TSeqPos > > m_FeatLengthBefore
 
vector< TSeqPosm_FeatTotalLength
 
vector< stringm_Translated
 
vector< objects::CBioseq_Handle::EVectorStrand > m_FeatStrand
 
wxFont m_Font
 
int m_FontHeight
 
int m_FontWidth
 
int m_NumRows
 
int m_NumCols
 
int m_CursorCol
 
int m_CursorRow
 
int m_LastRowLength
 
int m_CursorSeq
 
bool m_EnableTranslation
 
bool m_EnableTranslation1
 
bool m_EnableTranslation2
 
bool m_EnableComplement
 
bool m_EnableFeatures
 
bool m_ContinueFeatures
 
bool m_EnableOnTheFly
 
bool m_EnableMismatch
 
bool m_EnableRevTranslation
 
bool m_EnableRevTranslation1
 
bool m_EnableRevTranslation2
 
string m_AllowedCharSet
 
vector< stringm_RealProt
 
int m_ShowTriplet
 
int m_DragMin
 
int m_DragMax
 
CEditSequencem_Parent
 
int m_ShowTripletMismatch
 
int m_ShowTripletTranslation
 
bool m_Clean
 
set< intm_highlights
 
pair< int, intm_FeatureStart
 
pair< int, intm_FeatureStop
 
vector< boolm_read_only
 
int m_start
 
bool m_Down
 

Detailed Description

Definition at line 62 of file paint_sequence.hpp.

Constructor & Destructor Documentation

◆ CPaintSequence() [1/2]

CPaintSequence::CPaintSequence ( )
inline

Definition at line 67 of file paint_sequence.hpp.

◆ CPaintSequence() [2/2]

CPaintSequence::CPaintSequence ( wxWindow *  parent,
const string seq,
const vector< int > &  seq_len,
const vector< vector< pair< TSeqPos, TSeqPos > > > &  feat_ranges,
const vector< pair< string, objects::CSeqFeatData::ESubtype > > &  feat_types,
const vector< objects::CBioseq_Handle::EVectorStrand > &  feat_strand,
const vector< int > &  feat_frames,
const vector< CRef< objects::CGenetic_code > > &  genetic_code,
const vector< bool > &  feat_partial5,
const string allowed_char_set,
const vector< string > &  real_prot,
const vector< bool > &  read_only,
const unordered_map< int, vector< vector< pair< TSeqPos, TSeqPos > > > > &  prot_feat_ranges,
const int  start = 0,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize 
)

◆ ~CPaintSequence()

CPaintSequence::~CPaintSequence ( )
virtual

Definition at line 144 of file paint_sequence.cpp.

Member Function Documentation

◆ AdjustFeatStartStop()

void CPaintSequence::AdjustFeatStartStop ( int  origin,
int  offset,
int start,
int stop 
)
private

Definition at line 1868 of file paint_sequence.cpp.

References m_Seq, max(), offset, and origin.

Referenced by AdjustFeatureRange(), and AdjustProtFeatRange().

◆ AdjustFeatureRange()

void CPaintSequence::AdjustFeatureRange ( int  origin,
int  offset 
)
private

◆ AdjustProtFeatRange()

void CPaintSequence::AdjustProtFeatRange ( int  origin,
int  offset,
int  i 
)
private

Definition at line 1851 of file paint_sequence.cpp.

References AdjustFeatStartStop(), i, m_ProtFeatRanges, offset, and origin.

Referenced by AdjustFeatureRange().

◆ CalculateFontWidthAndHeight()

void CPaintSequence::CalculateFontWidthAndHeight ( wxGraphicsContext *  gc)
private

Definition at line 1000 of file paint_sequence.cpp.

References m_FontHeight, m_FontWidth, and m_Seq.

Referenced by InitPanel().

◆ CalculateNumCols()

int CPaintSequence::CalculateNumCols ( )
private

◆ ClearScreen()

void CPaintSequence::ClearScreen ( wxGraphicsContext *  gc)
private

Definition at line 988 of file paint_sequence.cpp.

Referenced by OnPaint().

◆ ColRowToSeqPos()

void CPaintSequence::ColRowToSeqPos ( )
private

Definition at line 815 of file paint_sequence.cpp.

References m_CursorCol, m_CursorRow, m_CursorSeq, and m_NumCols.

Referenced by InsertChar(), MouseToSeqPos(), and OnPaint().

◆ CutSelection()

string CPaintSequence::CutSelection ( )
private

◆ DeleteChar()

void CPaintSequence::DeleteChar ( )
private

◆ DrawComplement()

void CPaintSequence::DrawComplement ( int  x,
int y,
unsigned int  seq_pos,
wxGraphicsContext *  gc 
) const
private

Definition at line 1336 of file paint_sequence.cpp.

References m_Complement, m_EnableComplement, and m_FontHeight.

Referenced by DrawTextCell().

◆ DrawComplementLabel()

void CPaintSequence::DrawComplementLabel ( int  row,
int  x,
int y,
wxGraphicsContext *  gc 
) const
private

Definition at line 1415 of file paint_sequence.cpp.

References _, m_EnableComplement, and m_FontHeight.

Referenced by DrawLabelCell(), and OnMouseClick().

◆ DrawCursor()

void CPaintSequence::DrawCursor ( int  col,
int  row,
int  x,
int y,
wxGraphicsContext *  gc 
) const
private

Definition at line 1143 of file paint_sequence.cpp.

References m_CursorCol, m_CursorRow, and m_FontWidth.

Referenced by DrawTextCell().

◆ DrawFeatureLabels()

void CPaintSequence::DrawFeatureLabels ( int  row,
int  x,
int y,
const vector< unsigned int > &  feats_in_row,
const map< unsigned int, vector< unsigned int > > &  feats_with_exons,
wxGraphicsContext *  gc 
) const
private

◆ DrawFeatures()

void CPaintSequence::DrawFeatures ( int  row,
unsigned int  seq_pos,
int  x,
int y,
int  y_base,
const vector< unsigned int > &  feats_in_row,
const map< unsigned int, vector< unsigned int > > &  feats_with_exons,
wxGraphicsContext *  gc 
) const
private

◆ DrawLabelCell()

void CPaintSequence::DrawLabelCell ( unsigned int  pos,
int  x,
int y,
int  row,
const vector< unsigned int > &  feats_in_row,
const map< unsigned int, vector< unsigned int > > &  feats_with_exons,
wxGraphicsContext *  gc 
) const
private

◆ DrawLineNumber()

void CPaintSequence::DrawLineNumber ( unsigned int  seq_pos,
int  x,
int y,
wxGraphicsContext *  gc 
) const
private

Definition at line 1357 of file paint_sequence.cpp.

References label, m_Font, and m_FontHeight.

Referenced by DrawLabelCell().

◆ DrawMismatch()

void CPaintSequence::DrawMismatch ( int  x,
int y,
int  y_base,
unsigned int  seq_pos,
int  i,
const map< unsigned int, vector< unsigned int > > &  feats_with_exons,
wxGraphicsContext *  gc 
) const
private

◆ DrawMismatchLabel()

void CPaintSequence::DrawMismatchLabel ( int  x,
int y,
bool  is_exon_present,
wxGraphicsContext *  gc 
) const
private

Definition at line 1328 of file paint_sequence.cpp.

References m_EnableMismatch, and m_FontHeight.

Referenced by DrawFeatureLabels(), MouseToFeature(), and OnMouseClick().

◆ DrawOffsetTranslation()

void CPaintSequence::DrawOffsetTranslation ( int  x,
int  y,
unsigned int  seq_pos,
int  offset,
const string prot,
wxGraphicsContext *  gc 
) const
private

Definition at line 1193 of file paint_sequence.cpp.

References offset, and prot.

Referenced by DrawTranslation().

◆ DrawOnTheFly()

void CPaintSequence::DrawOnTheFly ( int  x,
int y,
int  y_base,
unsigned int  seq_pos,
int  i,
const map< unsigned int, vector< unsigned int > > &  feats_with_exons,
wxGraphicsContext *  gc 
) const
private

◆ DrawOnTheFlyLabel()

void CPaintSequence::DrawOnTheFlyLabel ( int  x,
int y,
bool  is_exon_present,
wxGraphicsContext *  gc 
) const
private

Definition at line 1427 of file paint_sequence.cpp.

References _, m_EnableOnTheFly, m_Font, and m_FontHeight.

Referenced by DrawFeatureLabels(), MouseToFeature(), and OnMouseClick().

◆ DrawTextCell()

void CPaintSequence::DrawTextCell ( const wxString &  substr,
int  col,
int  row,
unsigned int  seq_pos,
int  x,
int y,
const vector< unsigned int > &  feats_in_row,
const map< unsigned int, vector< unsigned int > > &  feats_with_exons,
wxGraphicsContext *  gc 
) const
private

◆ DrawTextLine()

void CPaintSequence::DrawTextLine ( const string substr,
int y_label,
int  row,
wxGraphicsContext *  gc,
size_t &  seq_pos 
)
private

◆ DrawTranslation()

void CPaintSequence::DrawTranslation ( int  x,
int y,
unsigned int  seq_pos,
wxGraphicsContext *  gc 
) const
private

◆ DrawTranslationLabels()

void CPaintSequence::DrawTranslationLabels ( int  row,
int  x,
int y,
wxGraphicsContext *  gc 
) const
private

◆ DrawTripletMismatch()

void CPaintSequence::DrawTripletMismatch ( int  x,
int  y,
int  y_base,
int  i,
wxGraphicsContext *  gc 
) const
private

Definition at line 1262 of file paint_sequence.cpp.

References i, m_FontHeight, and m_ShowTripletMismatch.

Referenced by DrawMismatch(), and DrawOnTheFly().

◆ EnableComplement()

void CPaintSequence::EnableComplement ( bool  enable)

Definition at line 227 of file paint_sequence.cpp.

References m_EnableComplement, and RefreshWithScroll().

Referenced by CEditSequence::OnComplement().

◆ EnableFeatures()

void CPaintSequence::EnableFeatures ( bool  enable)

◆ EnableMismatch()

void CPaintSequence::EnableMismatch ( bool  enable)

◆ EnableOnTheFly()

void CPaintSequence::EnableOnTheFly ( bool  enable)

◆ EnableRevTranslation()

void CPaintSequence::EnableRevTranslation ( bool  enable)

◆ EnableRevTranslation1()

void CPaintSequence::EnableRevTranslation1 ( bool  enable)

◆ EnableRevTranslation2()

void CPaintSequence::EnableRevTranslation2 ( bool  enable)

◆ EnableTranslation()

void CPaintSequence::EnableTranslation ( bool  enable)

◆ EnableTranslation1()

void CPaintSequence::EnableTranslation1 ( bool  enable)

◆ EnableTranslation2()

void CPaintSequence::EnableTranslation2 ( bool  enable)

◆ FindRowByCoord()

int CPaintSequence::FindRowByCoord ( int  y,
int y_row 
)
private

Definition at line 496 of file paint_sequence.cpp.

References OnGetRowHeight(), and TopMarginHeight().

Referenced by MouseToSeqPos().

◆ GetClean()

bool CPaintSequence::GetClean ( )

Definition at line 340 of file paint_sequence.cpp.

References m_Clean.

Referenced by CEditSequence::IsSelectionAndClean(), and CEditSequence::OnClose().

◆ GetColorForFeature()

const wxPen * CPaintSequence::GetColorForFeature ( objects::CSeqFeatData::ESubtype  subtype) const
private

Definition at line 1346 of file paint_sequence.cpp.

References CSeqFeatData::eSubtype_cdregion.

Referenced by DrawFeatures().

◆ GetFeatsWithExons()

map< unsigned int, vector< unsigned int > > CPaintSequence::GetFeatsWithExons ( int  row,
const vector< unsigned int > &  feats_in_row 
) const
private

Definition at line 1977 of file paint_sequence.cpp.

References i, and IsExonPresent().

Referenced by DrawTextLine(), MouseToFeature(), OnGetRowHeight(), and OnMouseClick().

◆ GetFeaturesInRow()

vector< unsigned int > CPaintSequence::GetFeaturesInRow ( int  row) const
private

Definition at line 1394 of file paint_sequence.cpp.

References i, m_FeatWholeRange, and m_NumCols.

Referenced by DrawTextLine(), MouseToFeature(), OnGetRowHeight(), and OnMouseClick().

◆ GetFeatureStart()

TSeqPos CPaintSequence::GetFeatureStart ( int  i,
int  j 
)

Definition at line 1819 of file paint_sequence.cpp.

References i, m_FeatRanges, and m_FeatStrand.

Referenced by CEditSequence::AdjustFeatureLocations().

◆ GetFeatureStop()

TSeqPos CPaintSequence::GetFeatureStop ( int  i,
int  j 
)

Definition at line 1826 of file paint_sequence.cpp.

References i, m_FeatRanges, and m_FeatStrand.

Referenced by CEditSequence::AdjustFeatureLocations().

◆ GetFeatWholeRange()

void CPaintSequence::GetFeatWholeRange ( )
private

◆ GetFindString()

string * CPaintSequence::GetFindString ( bool  is_nuc,
bool  is_revcomp,
const string choice 
)

◆ GetLength()

int CPaintSequence::GetLength ( void  )

Definition at line 1773 of file paint_sequence.cpp.

References m_Seq.

Referenced by CFindEditSequence::FindMatchPositions(), and CEditSequence::OnRange().

◆ GetProtFeatureStart()

TSeqPos CPaintSequence::GetProtFeatureStart ( int  i,
int  k,
int  j 
)
inline

Definition at line 123 of file paint_sequence.hpp.

References i, and m_ProtFeatRanges.

Referenced by CEditSequence::AdjustProtFeatureLocations().

◆ GetProtFeatureStop()

TSeqPos CPaintSequence::GetProtFeatureStop ( int  i,
int  k,
int  j 
)
inline

Definition at line 124 of file paint_sequence.hpp.

References i, and m_ProtFeatRanges.

Referenced by CEditSequence::AdjustProtFeatureLocations().

◆ GetReadOnly()

vector<bool>& CPaintSequence::GetReadOnly ( )
inline

Definition at line 88 of file paint_sequence.hpp.

References m_read_only.

Referenced by CEditSequence::OnAccept().

◆ GetSelection()

pair< int, int > CPaintSequence::GetSelection ( void  )

Definition at line 1736 of file paint_sequence.cpp.

References m_DragMax, m_DragMin, and swap().

Referenced by CEditSequence::CreateFeature(), and CEditSequence::CreateRegulatory().

◆ GetSeq()

string CPaintSequence::GetSeq ( void  )

Definition at line 310 of file paint_sequence.cpp.

References m_Seq, and NStr::TruncateSpaces().

Referenced by CEditSequence::OnAccept().

◆ GetSeqLen()

vector< int > & CPaintSequence::GetSeqLen ( )

Definition at line 315 of file paint_sequence.cpp.

References m_SeqLen.

Referenced by CEditSequence::OnAccept().

◆ InitPanel()

void CPaintSequence::InitPanel ( )

◆ InsertChar()

void CPaintSequence::InsertChar ( int  uc)
private

◆ IsClipboard()

bool CPaintSequence::IsClipboard ( )

Definition at line 1700 of file paint_sequence.cpp.

References i, m_AllowedCharSet, str(), and NStr::ToLower().

Referenced by CEditSequence::IsClipboard().

◆ IsExonPresent()

vector< unsigned int > CPaintSequence::IsExonPresent ( int  i,
int  row 
) const
private

Definition at line 1957 of file paint_sequence.cpp.

References i, m_FeatRanges, and m_NumCols.

Referenced by GetFeatsWithExons().

◆ IsSelection()

bool CPaintSequence::IsSelection ( )

Definition at line 1728 of file paint_sequence.cpp.

References m_DragMax, and m_DragMin.

Referenced by CEditSequence::IsSelection(), and CEditSequence::IsSelectionAndClean().

◆ LeftMarginWidth()

int CPaintSequence::LeftMarginWidth ( )
private

Definition at line 491 of file paint_sequence.cpp.

References chars_per_group, and m_FontWidth.

Referenced by CalculateNumCols(), DrawTextLine(), and MouseToSeqPos().

◆ MouseToFeature()

void CPaintSequence::MouseToFeature ( wxPoint  p,
int  row,
int  y0 
)
private

◆ MouseToSeqPos()

bool CPaintSequence::MouseToSeqPos ( wxPoint  p,
int row,
int y_row 
)
private

◆ NormalizeCursorColRows()

void CPaintSequence::NormalizeCursorColRows ( )
private

◆ OnChar()

void CPaintSequence::OnChar ( wxKeyEvent &  event)

◆ OnCopy()

void CPaintSequence::OnCopy ( wxCommandEvent &  event)

Definition at line 1557 of file paint_sequence.cpp.

References m_DragMax, m_DragMin, m_Seq, and swap().

Referenced by CEditSequence::OnCopy().

◆ OnCut()

void CPaintSequence::OnCut ( wxCommandEvent &  event)

Definition at line 1636 of file paint_sequence.cpp.

References CutSelection(), and result.

Referenced by CEditSequence::OnCut().

◆ OnEraseBackground()

void CPaintSequence::OnEraseBackground ( wxEraseEvent &  event)
virtual

Definition at line 970 of file paint_sequence.cpp.

◆ OnGetRowHeight()

wxCoord CPaintSequence::OnGetRowHeight ( size_t  row) const
virtual

Definition at line 135 of file paint_sequence.cpp.

References DrawLabelCell(), GetFeatsWithExons(), GetFeaturesInRow(), NULL, and r().

Referenced by FindRowByCoord().

◆ OnKeyDown()

void CPaintSequence::OnKeyDown ( wxKeyEvent &  event)

◆ OnMouseClick()

void CPaintSequence::OnMouseClick ( wxMouseEvent &  evt)

◆ OnMouseDown()

void CPaintSequence::OnMouseDown ( wxMouseEvent &  evt)

Definition at line 787 of file paint_sequence.cpp.

References m_Down, m_DragMax, m_DragMin, MouseToFeature(), and MouseToSeqPos().

◆ OnMouseDrag()

void CPaintSequence::OnMouseDrag ( wxMouseEvent &  evt)

◆ OnPaint()

void CPaintSequence::OnPaint ( wxPaintEvent &  event)
virtual

◆ OnPaste()

void CPaintSequence::OnPaste ( wxCommandEvent &  event)

◆ OnResize()

void CPaintSequence::OnResize ( wxSizeEvent &  event)

Definition at line 983 of file paint_sequence.cpp.

◆ OnUpdate()

void CPaintSequence::OnUpdate ( )
virtual

Notification for the derived class that moment is good for doing its update and drawing stuff.

Definition at line 978 of file paint_sequence.cpp.

◆ PosToSegment()

unsigned int CPaintSequence::PosToSegment ( )
private

Definition at line 320 of file paint_sequence.cpp.

References i, m_CursorSeq, and m_SeqLen.

Referenced by CutSelection(), DeleteChar(), InsertChar(), and OnPaste().

◆ RefreshWithScroll()

void CPaintSequence::RefreshWithScroll ( )
private

◆ ScrollWithCursor()

void CPaintSequence::ScrollWithCursor ( )
private

◆ Search()

void CPaintSequence::Search ( const string val)

◆ SeqPosToColRow()

void CPaintSequence::SeqPosToColRow ( )
private

◆ SetClean()

void CPaintSequence::SetClean ( bool  clean)

◆ SetHighlights()

set< int > & CPaintSequence::SetHighlights ( void  )

Definition at line 1778 of file paint_sequence.cpp.

References m_DragMax, m_DragMin, and m_highlights.

Referenced by CFindEditSequence::SetHighlights().

◆ SetPos()

void CPaintSequence::SetPos ( int  pos)

◆ SetRange()

void CPaintSequence::SetRange ( int  pos1,
int  pos2 
)

◆ SetStartPos()

void CPaintSequence::SetStartPos ( void  )
private

◆ TopMarginHeight()

int CPaintSequence::TopMarginHeight ( )
inlineprivate

Definition at line 162 of file paint_sequence.hpp.

Referenced by FindRowByCoord(), and OnPaint().

◆ TranslateCDS()

void CPaintSequence::TranslateCDS ( )
private

◆ TranslateOnTheFly()

char CPaintSequence::TranslateOnTheFly ( unsigned int  seq_pos,
int  i,
const vector< unsigned int > &  ranges,
const vector< string > &  translation,
bool left,
bool right 
) const
private

◆ UpdateData()

void CPaintSequence::UpdateData ( )

◆ UpdateFeatures()

void CPaintSequence::UpdateFeatures ( const vector< vector< pair< TSeqPos, TSeqPos > > > &  feat_ranges,
const vector< pair< string, objects::CSeqFeatData::ESubtype > > &  feat_types,
const vector< objects::CBioseq_Handle::EVectorStrand > &  feat_strand,
const vector< int > &  feat_frames,
const vector< CRef< objects::CGenetic_code > > &  genetic_code,
const vector< bool > &  feat_partial5,
const vector< string > &  real_prot,
const unordered_map< int, vector< vector< pair< TSeqPos, TSeqPos > > > > &  prot_feat_ranges 
)

Member Data Documentation

◆ m_AllowedCharSet

string CPaintSequence::m_AllowedCharSet
private

Definition at line 190 of file paint_sequence.hpp.

Referenced by IsClipboard(), OnChar(), and OnPaste().

◆ m_Clean

bool CPaintSequence::m_Clean
private

Definition at line 197 of file paint_sequence.hpp.

Referenced by GetClean(), and SetClean().

◆ m_Complement

string CPaintSequence::m_Complement
private

Definition at line 172 of file paint_sequence.hpp.

Referenced by DrawComplement(), GetFindString(), and UpdateData().

◆ m_ContinueFeatures

bool CPaintSequence::m_ContinueFeatures
private

Definition at line 188 of file paint_sequence.hpp.

Referenced by DrawFeatures(), and DrawTextLine().

◆ m_CursorCol

int CPaintSequence::m_CursorCol
private

◆ m_CursorRow

int CPaintSequence::m_CursorRow
private

◆ m_CursorSeq

int CPaintSequence::m_CursorSeq
private

◆ m_Down

bool CPaintSequence::m_Down
private

Definition at line 202 of file paint_sequence.hpp.

Referenced by OnMouseClick(), OnMouseDown(), and OnMouseDrag().

◆ m_DragMax

int CPaintSequence::m_DragMax
private

◆ m_DragMin

int CPaintSequence::m_DragMin
private

◆ m_EnableComplement

bool CPaintSequence::m_EnableComplement
private

◆ m_EnableFeatures

bool CPaintSequence::m_EnableFeatures
private

◆ m_EnableMismatch

bool CPaintSequence::m_EnableMismatch
private

Definition at line 188 of file paint_sequence.hpp.

Referenced by DrawMismatch(), DrawMismatchLabel(), EnableMismatch(), and OnMouseClick().

◆ m_EnableOnTheFly

bool CPaintSequence::m_EnableOnTheFly
private

◆ m_EnableRevTranslation

bool CPaintSequence::m_EnableRevTranslation
private

◆ m_EnableRevTranslation1

bool CPaintSequence::m_EnableRevTranslation1
private

◆ m_EnableRevTranslation2

bool CPaintSequence::m_EnableRevTranslation2
private

◆ m_EnableTranslation

bool CPaintSequence::m_EnableTranslation
private

◆ m_EnableTranslation1

bool CPaintSequence::m_EnableTranslation1
private

◆ m_EnableTranslation2

bool CPaintSequence::m_EnableTranslation2
private

◆ m_Feat5Partial

vector<bool> CPaintSequence::m_Feat5Partial
private

Definition at line 179 of file paint_sequence.hpp.

Referenced by TranslateCDS(), and UpdateFeatures().

◆ m_FeatFrames

vector<int> CPaintSequence::m_FeatFrames
private

Definition at line 177 of file paint_sequence.hpp.

Referenced by TranslateCDS(), TranslateOnTheFly(), and UpdateFeatures().

◆ m_FeatLengthBefore

vector< vector<TSeqPos> > CPaintSequence::m_FeatLengthBefore
private

Definition at line 181 of file paint_sequence.hpp.

Referenced by GetFeatWholeRange(), and TranslateOnTheFly().

◆ m_FeatRanges

vector<vector<pair<TSeqPos,TSeqPos> > > CPaintSequence::m_FeatRanges
private

◆ m_FeatStrand

vector<objects::CBioseq_Handle::EVectorStrand> CPaintSequence::m_FeatStrand
private

◆ m_FeatTotalLength

vector<TSeqPos> CPaintSequence::m_FeatTotalLength
private

Definition at line 182 of file paint_sequence.hpp.

Referenced by GetFeatWholeRange(), and TranslateOnTheFly().

◆ m_FeatTypes

vector<pair<string,objects::CSeqFeatData::ESubtype> > CPaintSequence::m_FeatTypes
private

◆ m_FeatureStart

pair<int,int> CPaintSequence::m_FeatureStart
private

Definition at line 199 of file paint_sequence.hpp.

Referenced by MouseToFeature(), OnMouseClick(), and OnMouseDrag().

◆ m_FeatureStop

pair<int,int> CPaintSequence::m_FeatureStop
private

Definition at line 199 of file paint_sequence.hpp.

Referenced by MouseToFeature(), OnMouseClick(), and OnMouseDrag().

◆ m_FeatWholeRange

vector<pair<TSeqPos,TSeqPos> > CPaintSequence::m_FeatWholeRange
private

Definition at line 180 of file paint_sequence.hpp.

Referenced by DrawFeatures(), GetFeaturesInRow(), GetFeatWholeRange(), and OnMouseDrag().

◆ m_Font

wxFont CPaintSequence::m_Font
private

◆ m_FontHeight

int CPaintSequence::m_FontHeight
private

◆ m_FontWidth

int CPaintSequence::m_FontWidth
private

◆ m_GeneticCode

vector< CRef<objects::CGenetic_code> > CPaintSequence::m_GeneticCode
private

Definition at line 178 of file paint_sequence.hpp.

Referenced by TranslateCDS(), and UpdateFeatures().

◆ m_highlights

set<int> CPaintSequence::m_highlights
private

Definition at line 198 of file paint_sequence.hpp.

Referenced by DrawTextCell(), OnPaint(), and SetHighlights().

◆ m_LastRowLength

int CPaintSequence::m_LastRowLength
private

Definition at line 187 of file paint_sequence.hpp.

Referenced by NormalizeCursorColRows(), and OnPaint().

◆ m_NumCols

int CPaintSequence::m_NumCols
private

◆ m_NumRows

int CPaintSequence::m_NumRows
private

Definition at line 187 of file paint_sequence.hpp.

Referenced by InitPanel(), NormalizeCursorColRows(), and OnPaint().

◆ m_Parent

CEditSequence* CPaintSequence::m_Parent
private

Definition at line 194 of file paint_sequence.hpp.

Referenced by CutSelection(), DeleteChar(), InsertChar(), OnPaste(), and SetClean().

◆ m_Prot

string CPaintSequence::m_Prot
private

Definition at line 172 of file paint_sequence.hpp.

Referenced by DrawTranslation(), GetFindString(), and UpdateData().

◆ m_Prot1

string CPaintSequence::m_Prot1
private

Definition at line 172 of file paint_sequence.hpp.

Referenced by DrawTranslation(), GetFindString(), and UpdateData().

◆ m_Prot2

string CPaintSequence::m_Prot2
private

Definition at line 172 of file paint_sequence.hpp.

Referenced by DrawTranslation(), GetFindString(), and UpdateData().

◆ m_ProtFeatRanges

unordered_map<int, vector<vector<pair<TSeqPos,TSeqPos> > > > CPaintSequence::m_ProtFeatRanges
private

◆ m_read_only

vector<bool> CPaintSequence::m_read_only
private

Definition at line 200 of file paint_sequence.hpp.

Referenced by CutSelection(), DeleteChar(), GetReadOnly(), InsertChar(), and OnPaste().

◆ m_RealProt

vector<string> CPaintSequence::m_RealProt
private

Definition at line 191 of file paint_sequence.hpp.

Referenced by DrawMismatch(), and UpdateFeatures().

◆ m_RevProt

string CPaintSequence::m_RevProt
private

Definition at line 172 of file paint_sequence.hpp.

Referenced by DrawTranslation(), GetFindString(), and UpdateData().

◆ m_RevProt1

string CPaintSequence::m_RevProt1
private

Definition at line 172 of file paint_sequence.hpp.

Referenced by DrawTranslation(), GetFindString(), and UpdateData().

◆ m_RevProt2

string CPaintSequence::m_RevProt2
private

Definition at line 172 of file paint_sequence.hpp.

Referenced by DrawTranslation(), GetFindString(), and UpdateData().

◆ m_Seq

string CPaintSequence::m_Seq
private

◆ m_SeqLen

vector<int> CPaintSequence::m_SeqLen
private

◆ m_ShowTriplet

int CPaintSequence::m_ShowTriplet
private

Definition at line 192 of file paint_sequence.hpp.

◆ m_ShowTripletMismatch

int CPaintSequence::m_ShowTripletMismatch
private

◆ m_ShowTripletTranslation

int CPaintSequence::m_ShowTripletTranslation
private

◆ m_start

int CPaintSequence::m_start
private

Definition at line 201 of file paint_sequence.hpp.

Referenced by OnPaint(), and SetStartPos().

◆ m_Translated

vector<string> CPaintSequence::m_Translated
private

Definition at line 183 of file paint_sequence.hpp.

Referenced by DrawMismatch(), DrawOnTheFly(), and TranslateCDS().


The documentation for this class was generated from the following files:
Modified on Sat Feb 24 07:47:56 2024 by modify_doxy.py rev. 669887