NCBI C++ ToolKit
|
Search Toolkit Book for CPaintSequence
#include <gui/widgets/edit/paint_sequence.hpp>
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, int > | GetSelection () |
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 () |
string * | GetFindString (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 int > | GetFeaturesInRow (int row) const |
void | GetFeatWholeRange () |
vector< unsigned int > | IsExonPresent (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) |
Definition at line 62 of file paint_sequence.hpp.
|
inline |
Definition at line 67 of file paint_sequence.hpp.
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 |
Definition at line 144 of file paint_sequence.cpp.
|
private |
Definition at line 1868 of file paint_sequence.cpp.
References m_Seq, max(), offset, and origin.
Referenced by AdjustFeatureRange(), and AdjustProtFeatRange().
Definition at line 1833 of file paint_sequence.cpp.
References AdjustFeatStartStop(), AdjustProtFeatRange(), GetFeatWholeRange(), i, m_FeatRanges, offset, origin, and TranslateCDS().
Referenced by CutSelection(), DeleteChar(), InsertChar(), and OnPaste().
Definition at line 1851 of file paint_sequence.cpp.
References AdjustFeatStartStop(), i, m_ProtFeatRanges, offset, and origin.
Referenced by AdjustFeatureRange().
|
private |
Definition at line 1000 of file paint_sequence.cpp.
References m_FontHeight, m_FontWidth, and m_Seq.
Referenced by InitPanel().
|
private |
Definition at line 1022 of file paint_sequence.cpp.
References chars_per_group, int, LeftMarginWidth(), m_FontWidth, and space_between_groups.
Referenced by InitPanel(), OnPaint(), and SetStartPos().
|
private |
Definition at line 988 of file paint_sequence.cpp.
Referenced by OnPaint().
|
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().
|
private |
Definition at line 1574 of file paint_sequence.cpp.
References _, AdjustFeatureRange(), i, m_CursorSeq, m_DragMax, m_DragMin, m_Parent, m_read_only, m_Seq, m_SeqLen, PosToSegment(), result, ScrollWithCursor(), SeqPosToColRow(), SetClean(), CEditSequence::ShowReadOnlyWarning(), swap(), and UpdateData().
Referenced by DeleteChar(), and OnCut().
|
private |
Definition at line 369 of file paint_sequence.cpp.
References _, AdjustFeatureRange(), CutSelection(), m_CursorSeq, m_Parent, m_read_only, m_Seq, m_SeqLen, PosToSegment(), result, SetClean(), CEditSequence::ShowReadOnlyWarning(), and UpdateData().
Referenced by OnKeyDown().
|
private |
Definition at line 1336 of file paint_sequence.cpp.
References m_Complement, m_EnableComplement, and m_FontHeight.
Referenced by DrawTextCell().
|
private |
Definition at line 1415 of file paint_sequence.cpp.
References _, m_EnableComplement, and m_FontHeight.
Referenced by DrawLabelCell(), and OnMouseClick().
|
private |
Definition at line 1143 of file paint_sequence.cpp.
References m_CursorCol, m_CursorRow, m_FontWidth, and row.
Referenced by DrawTextCell().
|
private |
Definition at line 1371 of file paint_sequence.cpp.
References DrawMismatchLabel(), DrawOnTheFlyLabel(), CSeqFeatData::eSubtype_cdregion, i, label, m_EnableFeatures, m_FeatTypes, m_Font, and m_FontHeight.
Referenced by DrawLabelCell(), and MouseToFeature().
|
private |
Definition at line 1481 of file paint_sequence.cpp.
References DrawMismatch(), DrawOnTheFly(), f, first(), GetColorForFeature(), i, m_ContinueFeatures, m_EnableFeatures, m_FeatRanges, m_FeatStrand, m_FeatTypes, m_FeatWholeRange, m_FontHeight, m_FontWidth, and space_between_groups.
Referenced by DrawTextCell().
|
private |
Definition at line 1066 of file paint_sequence.cpp.
References DrawComplementLabel(), DrawFeatureLabels(), DrawLineNumber(), DrawTranslationLabels(), m_FontHeight, and row.
Referenced by DrawTextLine(), MouseToFeature(), and OnGetRowHeight().
|
private |
Definition at line 1357 of file paint_sequence.cpp.
References label, m_Font, and m_FontHeight.
Referenced by DrawLabelCell().
|
private |
Definition at line 1298 of file paint_sequence.cpp.
References DrawTripletMismatch(), CSeqFeatData::eSubtype_cdregion, f, i, m_EnableMismatch, m_FeatTypes, m_Font, m_FontHeight, m_FontWidth, m_RealProt, m_Translated, prot, and TranslateOnTheFly().
Referenced by DrawFeatures().
|
private |
Definition at line 1328 of file paint_sequence.cpp.
References m_EnableMismatch, and m_FontHeight.
Referenced by DrawFeatureLabels(), MouseToFeature(), and OnMouseClick().
|
private |
Definition at line 1193 of file paint_sequence.cpp.
Referenced by DrawTranslation().
|
private |
Definition at line 1272 of file paint_sequence.cpp.
References DrawTripletMismatch(), CSeqFeatData::eSubtype_cdregion, f, i, m_EnableOnTheFly, m_FeatTypes, m_Font, m_FontHeight, m_FontWidth, m_Translated, prot, and TranslateOnTheFly().
Referenced by DrawFeatures().
|
private |
Definition at line 1427 of file paint_sequence.cpp.
References _, m_EnableOnTheFly, m_Font, and m_FontHeight.
Referenced by DrawFeatureLabels(), MouseToFeature(), and OnMouseClick().
|
private |
Definition at line 1077 of file paint_sequence.cpp.
References chars_per_group, DrawComplement(), DrawCursor(), DrawFeatures(), DrawTranslation(), set< Key, Compare >::end(), set< Key, Compare >::find(), label, m_DragMax, m_DragMin, m_Font, m_FontHeight, m_FontWidth, m_highlights, m_Seq, m_ShowTripletTranslation, row, and swap().
Referenced by DrawTextLine().
|
private |
Definition at line 1036 of file paint_sequence.cpp.
References chars_per_group, DrawLabelCell(), DrawTextCell(), GetFeatsWithExons(), GetFeaturesInRow(), i, LeftMarginWidth(), m_ContinueFeatures, m_FontWidth, m_NumCols, row, and space_between_groups.
Referenced by OnPaint().
|
private |
Definition at line 1153 of file paint_sequence.cpp.
References DrawOffsetTranslation(), m_EnableRevTranslation, m_EnableRevTranslation1, m_EnableRevTranslation2, m_EnableTranslation, m_EnableTranslation1, m_EnableTranslation2, m_FontHeight, m_Prot, m_Prot1, m_Prot2, m_RevProt, m_RevProt1, m_RevProt2, m_Seq, and offset.
Referenced by DrawTextCell().
|
private |
Definition at line 1441 of file paint_sequence.cpp.
References _, m_EnableRevTranslation, m_EnableRevTranslation1, m_EnableRevTranslation2, m_EnableTranslation, m_EnableTranslation1, m_EnableTranslation2, and m_FontHeight.
Referenced by DrawLabelCell(), and OnMouseClick().
|
private |
Definition at line 1262 of file paint_sequence.cpp.
References i, m_FontHeight, and m_ShowTripletMismatch.
Referenced by DrawMismatch(), and DrawOnTheFly().
void CPaintSequence::EnableComplement | ( | bool | enable | ) |
Definition at line 227 of file paint_sequence.cpp.
References m_EnableComplement, and RefreshWithScroll().
Referenced by CEditSequence::OnComplement().
void CPaintSequence::EnableFeatures | ( | bool | enable | ) |
Definition at line 233 of file paint_sequence.cpp.
References m_EnableFeatures, and RefreshWithScroll().
Referenced by CEditSequence::CreateControls(), and CEditSequence::OnFeatures().
void CPaintSequence::EnableMismatch | ( | bool | enable | ) |
Definition at line 247 of file paint_sequence.cpp.
References m_EnableMismatch, m_ShowTripletMismatch, and RefreshWithScroll().
Referenced by CEditSequence::CreateControls(), and CEditSequence::OnMismatch().
void CPaintSequence::EnableOnTheFly | ( | bool | enable | ) |
Definition at line 239 of file paint_sequence.cpp.
References m_EnableOnTheFly, m_ShowTripletMismatch, and RefreshWithScroll().
Referenced by CEditSequence::OnOnTheFly().
void CPaintSequence::EnableRevTranslation | ( | bool | enable | ) |
Definition at line 202 of file paint_sequence.cpp.
References m_EnableRevTranslation, m_ShowTripletTranslation, and RefreshWithScroll().
Referenced by CEditSequence::OnRevTranslate(), CEditSequence::OnRevTranslateAll(), CEditSequence::OnTranslateEverything(), and CEditSequence::OnTranslateNone().
void CPaintSequence::EnableRevTranslation1 | ( | bool | enable | ) |
Definition at line 210 of file paint_sequence.cpp.
References m_EnableRevTranslation1, m_ShowTripletTranslation, and RefreshWithScroll().
Referenced by CEditSequence::OnRevTranslate1(), CEditSequence::OnRevTranslateAll(), CEditSequence::OnTranslateEverything(), and CEditSequence::OnTranslateNone().
void CPaintSequence::EnableRevTranslation2 | ( | bool | enable | ) |
Definition at line 218 of file paint_sequence.cpp.
References m_EnableRevTranslation2, m_ShowTripletTranslation, and RefreshWithScroll().
Referenced by CEditSequence::OnRevTranslate2(), CEditSequence::OnRevTranslateAll(), CEditSequence::OnTranslateEverything(), and CEditSequence::OnTranslateNone().
void CPaintSequence::EnableTranslation | ( | bool | enable | ) |
Definition at line 178 of file paint_sequence.cpp.
References m_EnableTranslation, m_ShowTripletTranslation, and RefreshWithScroll().
Referenced by CEditSequence::OnTranslate(), CEditSequence::OnTranslateAll(), CEditSequence::OnTranslateEverything(), and CEditSequence::OnTranslateNone().
void CPaintSequence::EnableTranslation1 | ( | bool | enable | ) |
Definition at line 186 of file paint_sequence.cpp.
References m_EnableTranslation1, m_ShowTripletTranslation, and RefreshWithScroll().
Referenced by CEditSequence::OnTranslate1(), CEditSequence::OnTranslateAll(), CEditSequence::OnTranslateEverything(), and CEditSequence::OnTranslateNone().
void CPaintSequence::EnableTranslation2 | ( | bool | enable | ) |
Definition at line 194 of file paint_sequence.cpp.
References m_EnableTranslation2, m_ShowTripletTranslation, and RefreshWithScroll().
Referenced by CEditSequence::OnTranslate2(), CEditSequence::OnTranslateAll(), CEditSequence::OnTranslateEverything(), and CEditSequence::OnTranslateNone().
Definition at line 496 of file paint_sequence.cpp.
References OnGetRowHeight(), row, and TopMarginHeight().
Referenced by MouseToSeqPos().
bool CPaintSequence::GetClean | ( | ) |
Definition at line 340 of file paint_sequence.cpp.
References m_Clean.
Referenced by CEditSequence::IsSelectionAndClean(), and CEditSequence::OnClose().
|
private |
Definition at line 1346 of file paint_sequence.cpp.
References CSeqFeatData::eSubtype_cdregion.
Referenced by DrawFeatures().
|
private |
Definition at line 1977 of file paint_sequence.cpp.
References i, IsExonPresent(), and row.
Referenced by DrawTextLine(), MouseToFeature(), OnGetRowHeight(), and OnMouseClick().
Definition at line 1394 of file paint_sequence.cpp.
References i, m_FeatWholeRange, m_NumCols, and row.
Referenced by DrawTextLine(), MouseToFeature(), OnGetRowHeight(), and OnMouseClick().
Definition at line 1819 of file paint_sequence.cpp.
References i, m_FeatRanges, and m_FeatStrand.
Referenced by CEditSequence::AdjustFeatureLocations().
Definition at line 1826 of file paint_sequence.cpp.
References i, m_FeatRanges, and m_FeatStrand.
Referenced by CEditSequence::AdjustFeatureLocations().
|
private |
Definition at line 1930 of file paint_sequence.cpp.
References first(), i, m_FeatLengthBefore, m_FeatRanges, m_FeatTotalLength, m_FeatWholeRange, and max().
Referenced by AdjustFeatureRange(), and UpdateFeatures().
Definition at line 1745 of file paint_sequence.cpp.
References m_Complement, m_Prot, m_Prot1, m_Prot2, m_RevProt, m_RevProt1, m_RevProt2, m_Seq, NULL, and str().
Referenced by CFindEditSequence::FindMatchPositions().
int CPaintSequence::GetLength | ( | void | ) |
Definition at line 1773 of file paint_sequence.cpp.
References m_Seq.
Referenced by CFindEditSequence::FindMatchPositions(), and CEditSequence::OnRange().
Definition at line 123 of file paint_sequence.hpp.
References i, and m_ProtFeatRanges.
Referenced by CEditSequence::AdjustProtFeatureLocations().
Definition at line 124 of file paint_sequence.hpp.
References i, and m_ProtFeatRanges.
Referenced by CEditSequence::AdjustProtFeatureLocations().
|
inline |
Definition at line 88 of file paint_sequence.hpp.
References m_read_only.
Referenced by CEditSequence::OnAccept().
Definition at line 1736 of file paint_sequence.cpp.
References m_DragMax, m_DragMin, and swap().
Referenced by CEditSequence::CreateFeature(), and CEditSequence::CreateRegulatory().
string CPaintSequence::GetSeq | ( | void | ) |
Definition at line 310 of file paint_sequence.cpp.
References m_Seq, and NStr::TruncateSpaces().
Referenced by CEditSequence::OnAccept().
vector< int > & CPaintSequence::GetSeqLen | ( | ) |
Definition at line 315 of file paint_sequence.cpp.
References m_SeqLen.
Referenced by CEditSequence::OnAccept().
void CPaintSequence::InitPanel | ( | ) |
Definition at line 122 of file paint_sequence.cpp.
References CalculateFontWidthAndHeight(), CalculateNumCols(), m_Font, m_NumCols, m_NumRows, and m_Seq.
Referenced by CEditSequence::CEditSequence().
|
private |
Definition at line 345 of file paint_sequence.cpp.
References AdjustFeatureRange(), ColRowToSeqPos(), m_CursorSeq, m_Parent, m_read_only, m_Seq, m_SeqLen, PosToSegment(), SeqPosToColRow(), SetClean(), CEditSequence::ShowReadOnlyWarning(), tolower(), and UpdateData().
Referenced by OnChar().
bool CPaintSequence::IsClipboard | ( | ) |
Definition at line 1700 of file paint_sequence.cpp.
References data, i, m_AllowedCharSet, str(), and NStr::ToLower().
Referenced by CEditSequence::IsClipboard().
Definition at line 1957 of file paint_sequence.cpp.
References i, m_FeatRanges, m_NumCols, and row.
Referenced by GetFeatsWithExons().
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().
|
private |
Definition at line 491 of file paint_sequence.cpp.
References chars_per_group, and m_FontWidth.
Referenced by CalculateNumCols(), DrawTextLine(), and MouseToSeqPos().
Definition at line 533 of file paint_sequence.cpp.
References DrawFeatureLabels(), DrawLabelCell(), DrawMismatchLabel(), DrawOnTheFlyLabel(), map_checker< Container >::end(), CSeqFeatData::eSubtype_cdregion, map_checker< Container >::find(), GetFeatsWithExons(), GetFeaturesInRow(), i, m_CursorSeq, m_EnableFeatures, m_FeatRanges, m_FeatTypes, m_FeatureStart, m_FeatureStop, m_FontHeight, max(), NULL, and row.
Referenced by OnMouseDown().
Definition at line 514 of file paint_sequence.cpp.
References chars_per_group, ColRowToSeqPos(), FindRowByCoord(), LeftMarginWidth(), m_CursorCol, m_CursorRow, m_FontWidth, row, and space_between_groups.
Referenced by OnMouseClick(), OnMouseDown(), and OnMouseDrag().
|
private |
Definition at line 477 of file paint_sequence.cpp.
References m_CursorCol, m_CursorRow, m_LastRowLength, m_NumCols, and m_NumRows.
Referenced by OnChar(), OnKeyDown(), OnMouseClick(), and RefreshWithScroll().
void CPaintSequence::OnChar | ( | wxKeyEvent & | event | ) |
Definition at line 408 of file paint_sequence.cpp.
References InsertChar(), m_AllowedCharSet, NormalizeCursorColRows(), ScrollWithCursor(), and tolower().
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().
void CPaintSequence::OnCut | ( | wxCommandEvent & | event | ) |
Definition at line 1636 of file paint_sequence.cpp.
References CutSelection(), and result.
Referenced by CEditSequence::OnCut().
|
virtual |
Definition at line 970 of file paint_sequence.cpp.
|
virtual |
Definition at line 135 of file paint_sequence.cpp.
References DrawLabelCell(), GetFeatsWithExons(), GetFeaturesInRow(), NULL, r(), and row.
Referenced by FindRowByCoord().
void CPaintSequence::OnKeyDown | ( | wxKeyEvent & | event | ) |
Definition at line 421 of file paint_sequence.cpp.
References abs, DeleteChar(), m_CursorCol, m_CursorRow, m_CursorSeq, m_DragMax, m_DragMin, m_Seq, NormalizeCursorColRows(), ScrollWithCursor(), and SeqPosToColRow().
void CPaintSequence::OnMouseClick | ( | wxMouseEvent & | evt | ) |
Definition at line 588 of file paint_sequence.cpp.
References abs, DrawComplementLabel(), DrawMismatchLabel(), DrawOnTheFlyLabel(), DrawTranslationLabels(), map_checker< Container >::end(), CSeqFeatData::eSubtype_cdregion, map_checker< Container >::find(), GetFeatsWithExons(), GetFeaturesInRow(), i, m_CursorSeq, m_Down, m_DragMax, m_DragMin, m_EnableFeatures, m_EnableMismatch, m_EnableOnTheFly, m_EnableRevTranslation, m_EnableRevTranslation1, m_EnableRevTranslation2, m_EnableTranslation, m_EnableTranslation1, m_EnableTranslation2, m_FeatTypes, m_FeatureStart, m_FeatureStop, m_FontHeight, m_Seq, m_ShowTripletMismatch, m_ShowTripletTranslation, MouseToSeqPos(), NormalizeCursorColRows(), NULL, ScrollWithCursor(), and TranslateCDS().
void CPaintSequence::OnMouseDown | ( | wxMouseEvent & | evt | ) |
Definition at line 787 of file paint_sequence.cpp.
References m_Down, m_DragMax, m_DragMin, MouseToFeature(), MouseToSeqPos(), and row.
void CPaintSequence::OnMouseDrag | ( | wxMouseEvent & | evt | ) |
Definition at line 743 of file paint_sequence.cpp.
References m_CursorSeq, m_Down, m_DragMax, m_DragMin, m_FeatRanges, m_FeatureStart, m_FeatureStop, m_FeatWholeRange, m_Seq, MouseToSeqPos(), row, and SetClean().
|
virtual |
Painting.
Definition at line 882 of file paint_sequence.cpp.
References set< Key, Compare >::begin(), CalculateNumCols(), ClearScreen(), ColRowToSeqPos(), DrawTextLine(), set< Key, Compare >::end(), set< Key, Compare >::find(), m_CursorSeq, m_DragMax, m_DragMin, m_Font, m_highlights, m_LastRowLength, m_NumCols, m_NumRows, m_Seq, m_start, CEditSequence::ReportPos(), CEditSequence::ReportRange(), row, SeqPosToColRow(), SetStartPos(), swap(), and TopMarginHeight().
void CPaintSequence::OnPaste | ( | wxCommandEvent & | event | ) |
Definition at line 1654 of file paint_sequence.cpp.
References AdjustFeatureRange(), data, i, m_AllowedCharSet, m_CursorSeq, m_DragMax, m_DragMin, m_Parent, m_read_only, m_Seq, m_SeqLen, PosToSegment(), ScrollWithCursor(), SeqPosToColRow(), SetClean(), CEditSequence::ShowReadOnlyWarning(), str(), NStr::ToLower(), and UpdateData().
Referenced by CEditSequence::OnPaste().
void CPaintSequence::OnResize | ( | wxSizeEvent & | event | ) |
Definition at line 983 of file paint_sequence.cpp.
|
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.
|
private |
Definition at line 320 of file paint_sequence.cpp.
References i, m_CursorSeq, and m_SeqLen.
Referenced by CutSelection(), DeleteChar(), InsertChar(), and OnPaste().
|
private |
Definition at line 170 of file paint_sequence.cpp.
References NormalizeCursorColRows(), ScrollWithCursor(), and SeqPosToColRow().
Referenced by EnableComplement(), EnableFeatures(), EnableMismatch(), EnableOnTheFly(), EnableRevTranslation(), EnableRevTranslation1(), EnableRevTranslation2(), EnableTranslation(), EnableTranslation1(), and EnableTranslation2().
|
private |
Definition at line 402 of file paint_sequence.cpp.
References m_CursorRow.
Referenced by CutSelection(), OnChar(), OnKeyDown(), OnMouseClick(), OnPaste(), RefreshWithScroll(), Search(), SetPos(), SetRange(), and SetStartPos().
Definition at line 846 of file paint_sequence.cpp.
References NStr::FindNoCase(), m_CursorSeq, m_Seq, NPOS, ScrollWithCursor(), SeqPosToColRow(), and val.
Referenced by CEditSequence::OnGoTo().
|
private |
Definition at line 807 of file paint_sequence.cpp.
References m_CursorCol, m_CursorRow, m_CursorSeq, and m_NumCols.
Referenced by CutSelection(), InsertChar(), OnKeyDown(), OnPaint(), OnPaste(), RefreshWithScroll(), Search(), SetPos(), SetRange(), and SetStartPos().
void CPaintSequence::SetClean | ( | bool | clean | ) |
Definition at line 334 of file paint_sequence.cpp.
References CEditSequence::EnableCommit(), m_Clean, and m_Parent.
Referenced by CutSelection(), DeleteChar(), InsertChar(), CEditSequence::OnAccept(), OnMouseDrag(), and OnPaste().
Definition at line 1778 of file paint_sequence.cpp.
References m_DragMax, m_DragMin, and m_highlights.
Referenced by CFindEditSequence::SetHighlights().
void CPaintSequence::SetPos | ( | int | pos | ) |
Definition at line 820 of file paint_sequence.cpp.
References m_CursorSeq, m_Seq, ScrollWithCursor(), and SeqPosToColRow().
Referenced by CEditSequence::OnGoTo(), CFindEditSequence::OnNext(), and CFindEditSequence::OnPrev().
Definition at line 832 of file paint_sequence.cpp.
References m_CursorSeq, m_DragMax, m_DragMin, m_Seq, ScrollWithCursor(), and SeqPosToColRow().
Referenced by CEditSequence::OnRange().
|
private |
Definition at line 861 of file paint_sequence.cpp.
References CalculateNumCols(), m_CursorSeq, m_NumCols, m_start, CEditSequence::ReportPos(), ScrollWithCursor(), and SeqPosToColRow().
Referenced by OnPaint().
|
inlineprivate |
Definition at line 162 of file paint_sequence.hpp.
Referenced by FindRowByCoord(), and OnPaint().
|
private |
Definition at line 1786 of file paint_sequence.cpp.
References CSeqUtil::e_Iupacna, CSeqFeatData::eSubtype_cdregion, CSeqTranslator::fIs5PrimePartial, flags, CSeqTranslator::fRemoveTrailingX, i, m_Feat5Partial, m_FeatFrames, m_FeatRanges, m_FeatStrand, m_FeatTypes, m_GeneticCode, m_Seq, m_Translated, max(), NULL, CSeqManip::ReverseComplement(), swap(), NStr::ToLower(), and CSeqTranslator::Translate().
Referenced by AdjustFeatureRange(), OnMouseClick(), and UpdateFeatures().
|
private |
Definition at line 1205 of file paint_sequence.cpp.
References i, m_FeatFrames, m_FeatLengthBefore, m_FeatRanges, m_FeatStrand, m_FeatTotalLength, and prot.
Referenced by DrawMismatch(), and DrawOnTheFly().
void CPaintSequence::UpdateData | ( | ) |
Definition at line 255 of file paint_sequence.cpp.
References CSeqManip::Complement(), CSeqUtil::e_Iupacna, CSeqTranslator::fIs5PrimePartial, CSeqTranslator::fRemoveTrailingX, i, m_Complement, m_EnableComplement, m_EnableOnTheFly, m_EnableRevTranslation, m_EnableRevTranslation1, m_EnableRevTranslation2, m_EnableTranslation, m_EnableTranslation1, m_EnableTranslation2, m_FeatStrand, m_Prot, m_Prot1, m_Prot2, m_RevProt, m_RevProt1, m_RevProt2, m_Seq, minus(), plus(), CSeqManip::ReverseComplement(), NStr::ToLower(), and CSeqTranslator::Translate().
Referenced by CutSelection(), DeleteChar(), InsertChar(), CEditSequence::OnComplement(), CEditSequence::OnOnTheFly(), OnPaste(), CEditSequence::OnRevTranslate(), CEditSequence::OnRevTranslate1(), CEditSequence::OnRevTranslate2(), CEditSequence::OnRevTranslateAll(), CEditSequence::OnTranslate(), CEditSequence::OnTranslate1(), CEditSequence::OnTranslate2(), CEditSequence::OnTranslateAll(), CEditSequence::OnTranslateEverything(), and 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 | ||
) |
Definition at line 148 of file paint_sequence.cpp.
References GetFeatWholeRange(), m_Feat5Partial, m_FeatFrames, m_FeatRanges, m_FeatStrand, m_FeatTypes, m_GeneticCode, m_ProtFeatRanges, m_RealProt, TranslateCDS(), and UpdateData().
Referenced by CEditSequence::CreateFeature(), CEditSequence::CreateRegulatory(), and CEditSequence::OnRetranslate().
|
private |
Definition at line 190 of file paint_sequence.hpp.
Referenced by IsClipboard(), OnChar(), and OnPaste().
|
private |
Definition at line 197 of file paint_sequence.hpp.
Referenced by GetClean(), and SetClean().
|
private |
Definition at line 172 of file paint_sequence.hpp.
Referenced by DrawComplement(), GetFindString(), and UpdateData().
|
private |
Definition at line 188 of file paint_sequence.hpp.
Referenced by DrawFeatures(), and DrawTextLine().
|
private |
Definition at line 187 of file paint_sequence.hpp.
Referenced by ColRowToSeqPos(), DrawCursor(), MouseToSeqPos(), NormalizeCursorColRows(), OnKeyDown(), and SeqPosToColRow().
|
private |
Definition at line 187 of file paint_sequence.hpp.
Referenced by ColRowToSeqPos(), DrawCursor(), MouseToSeqPos(), NormalizeCursorColRows(), OnKeyDown(), ScrollWithCursor(), and SeqPosToColRow().
|
private |
Definition at line 187 of file paint_sequence.hpp.
Referenced by ColRowToSeqPos(), CutSelection(), DeleteChar(), InsertChar(), MouseToFeature(), OnKeyDown(), OnMouseClick(), OnMouseDrag(), OnPaint(), OnPaste(), PosToSegment(), Search(), SeqPosToColRow(), SetPos(), SetRange(), and SetStartPos().
|
private |
Definition at line 202 of file paint_sequence.hpp.
Referenced by OnMouseClick(), OnMouseDown(), and OnMouseDrag().
|
private |
Definition at line 193 of file paint_sequence.hpp.
Referenced by CutSelection(), DrawTextCell(), GetSelection(), IsSelection(), OnCopy(), OnKeyDown(), OnMouseClick(), OnMouseDown(), OnMouseDrag(), OnPaint(), OnPaste(), SetHighlights(), and SetRange().
|
private |
Definition at line 193 of file paint_sequence.hpp.
Referenced by CutSelection(), DrawTextCell(), GetSelection(), IsSelection(), OnCopy(), OnKeyDown(), OnMouseClick(), OnMouseDown(), OnMouseDrag(), OnPaint(), OnPaste(), SetHighlights(), and SetRange().
|
private |
Definition at line 188 of file paint_sequence.hpp.
Referenced by DrawComplement(), DrawComplementLabel(), EnableComplement(), and UpdateData().
|
private |
Definition at line 188 of file paint_sequence.hpp.
Referenced by DrawFeatureLabels(), DrawFeatures(), EnableFeatures(), MouseToFeature(), and OnMouseClick().
|
private |
Definition at line 188 of file paint_sequence.hpp.
Referenced by DrawMismatch(), DrawMismatchLabel(), EnableMismatch(), and OnMouseClick().
|
private |
Definition at line 188 of file paint_sequence.hpp.
Referenced by DrawOnTheFly(), DrawOnTheFlyLabel(), EnableOnTheFly(), OnMouseClick(), and UpdateData().
|
private |
Definition at line 189 of file paint_sequence.hpp.
Referenced by DrawTranslation(), DrawTranslationLabels(), EnableRevTranslation(), OnMouseClick(), and UpdateData().
|
private |
Definition at line 189 of file paint_sequence.hpp.
Referenced by DrawTranslation(), DrawTranslationLabels(), EnableRevTranslation1(), OnMouseClick(), and UpdateData().
|
private |
Definition at line 189 of file paint_sequence.hpp.
Referenced by DrawTranslation(), DrawTranslationLabels(), EnableRevTranslation2(), OnMouseClick(), and UpdateData().
|
private |
Definition at line 188 of file paint_sequence.hpp.
Referenced by DrawTranslation(), DrawTranslationLabels(), EnableTranslation(), OnMouseClick(), and UpdateData().
|
private |
Definition at line 188 of file paint_sequence.hpp.
Referenced by DrawTranslation(), DrawTranslationLabels(), EnableTranslation1(), OnMouseClick(), and UpdateData().
|
private |
Definition at line 188 of file paint_sequence.hpp.
Referenced by DrawTranslation(), DrawTranslationLabels(), EnableTranslation2(), OnMouseClick(), and UpdateData().
|
private |
Definition at line 179 of file paint_sequence.hpp.
Referenced by TranslateCDS(), and UpdateFeatures().
|
private |
Definition at line 177 of file paint_sequence.hpp.
Referenced by TranslateCDS(), TranslateOnTheFly(), and UpdateFeatures().
|
private |
Definition at line 181 of file paint_sequence.hpp.
Referenced by GetFeatWholeRange(), and TranslateOnTheFly().
Definition at line 174 of file paint_sequence.hpp.
Referenced by AdjustFeatureRange(), DrawFeatures(), GetFeatureStart(), GetFeatureStop(), GetFeatWholeRange(), IsExonPresent(), MouseToFeature(), OnMouseDrag(), TranslateCDS(), TranslateOnTheFly(), and UpdateFeatures().
|
private |
Definition at line 184 of file paint_sequence.hpp.
Referenced by DrawFeatures(), GetFeatureStart(), GetFeatureStop(), TranslateCDS(), TranslateOnTheFly(), UpdateData(), and UpdateFeatures().
|
private |
Definition at line 182 of file paint_sequence.hpp.
Referenced by GetFeatWholeRange(), and TranslateOnTheFly().
|
private |
Definition at line 176 of file paint_sequence.hpp.
Referenced by DrawFeatureLabels(), DrawFeatures(), DrawMismatch(), DrawOnTheFly(), MouseToFeature(), OnMouseClick(), TranslateCDS(), and UpdateFeatures().
Definition at line 199 of file paint_sequence.hpp.
Referenced by MouseToFeature(), OnMouseClick(), and OnMouseDrag().
Definition at line 199 of file paint_sequence.hpp.
Referenced by MouseToFeature(), OnMouseClick(), and OnMouseDrag().
Definition at line 180 of file paint_sequence.hpp.
Referenced by DrawFeatures(), GetFeaturesInRow(), GetFeatWholeRange(), and OnMouseDrag().
|
private |
Definition at line 185 of file paint_sequence.hpp.
Referenced by DrawFeatureLabels(), DrawLineNumber(), DrawMismatch(), DrawOnTheFly(), DrawOnTheFlyLabel(), DrawTextCell(), InitPanel(), and OnPaint().
|
private |
Definition at line 186 of file paint_sequence.hpp.
Referenced by CalculateFontWidthAndHeight(), DrawComplement(), DrawComplementLabel(), DrawFeatureLabels(), DrawFeatures(), DrawLabelCell(), DrawLineNumber(), DrawMismatch(), DrawMismatchLabel(), DrawOnTheFly(), DrawOnTheFlyLabel(), DrawTextCell(), DrawTranslation(), DrawTranslationLabels(), DrawTripletMismatch(), MouseToFeature(), and OnMouseClick().
|
private |
Definition at line 186 of file paint_sequence.hpp.
Referenced by CalculateFontWidthAndHeight(), CalculateNumCols(), DrawCursor(), DrawFeatures(), DrawMismatch(), DrawOnTheFly(), DrawTextCell(), DrawTextLine(), LeftMarginWidth(), and MouseToSeqPos().
|
private |
Definition at line 178 of file paint_sequence.hpp.
Referenced by TranslateCDS(), and UpdateFeatures().
Definition at line 198 of file paint_sequence.hpp.
Referenced by DrawTextCell(), OnPaint(), and SetHighlights().
|
private |
Definition at line 187 of file paint_sequence.hpp.
Referenced by NormalizeCursorColRows(), and OnPaint().
|
private |
Definition at line 187 of file paint_sequence.hpp.
Referenced by ColRowToSeqPos(), DrawTextLine(), GetFeaturesInRow(), InitPanel(), IsExonPresent(), NormalizeCursorColRows(), OnPaint(), SeqPosToColRow(), and SetStartPos().
|
private |
Definition at line 187 of file paint_sequence.hpp.
Referenced by InitPanel(), NormalizeCursorColRows(), and OnPaint().
|
private |
Definition at line 194 of file paint_sequence.hpp.
Referenced by CutSelection(), DeleteChar(), InsertChar(), OnPaste(), and SetClean().
|
private |
Definition at line 172 of file paint_sequence.hpp.
Referenced by DrawTranslation(), GetFindString(), and UpdateData().
|
private |
Definition at line 172 of file paint_sequence.hpp.
Referenced by DrawTranslation(), GetFindString(), and UpdateData().
|
private |
Definition at line 172 of file paint_sequence.hpp.
Referenced by DrawTranslation(), GetFindString(), and UpdateData().
|
private |
Definition at line 175 of file paint_sequence.hpp.
Referenced by AdjustProtFeatRange(), GetProtFeatureStart(), GetProtFeatureStop(), and UpdateFeatures().
|
private |
Definition at line 200 of file paint_sequence.hpp.
Referenced by CutSelection(), DeleteChar(), GetReadOnly(), InsertChar(), and OnPaste().
|
private |
Definition at line 191 of file paint_sequence.hpp.
Referenced by DrawMismatch(), and UpdateFeatures().
|
private |
Definition at line 172 of file paint_sequence.hpp.
Referenced by DrawTranslation(), GetFindString(), and UpdateData().
|
private |
Definition at line 172 of file paint_sequence.hpp.
Referenced by DrawTranslation(), GetFindString(), and UpdateData().
|
private |
Definition at line 172 of file paint_sequence.hpp.
Referenced by DrawTranslation(), GetFindString(), and UpdateData().
|
private |
Definition at line 172 of file paint_sequence.hpp.
Referenced by AdjustFeatStartStop(), CalculateFontWidthAndHeight(), CutSelection(), DeleteChar(), DrawTextCell(), DrawTranslation(), GetFindString(), GetLength(), GetSeq(), InitPanel(), InsertChar(), OnCopy(), OnKeyDown(), OnMouseClick(), OnMouseDrag(), OnPaint(), OnPaste(), Search(), SetPos(), SetRange(), TranslateCDS(), and UpdateData().
|
private |
Definition at line 173 of file paint_sequence.hpp.
Referenced by CutSelection(), DeleteChar(), GetSeqLen(), InsertChar(), OnPaste(), and PosToSegment().
|
private |
Definition at line 192 of file paint_sequence.hpp.
|
private |
Definition at line 195 of file paint_sequence.hpp.
Referenced by DrawTripletMismatch(), EnableMismatch(), EnableOnTheFly(), and OnMouseClick().
|
private |
Definition at line 196 of file paint_sequence.hpp.
Referenced by DrawTextCell(), EnableRevTranslation(), EnableRevTranslation1(), EnableRevTranslation2(), EnableTranslation(), EnableTranslation1(), EnableTranslation2(), and OnMouseClick().
|
private |
Definition at line 201 of file paint_sequence.hpp.
Referenced by OnPaint(), and SetStartPos().
|
private |
Definition at line 183 of file paint_sequence.hpp.
Referenced by DrawMismatch(), DrawOnTheFly(), and TranslateCDS().