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

Search Toolkit Book for CAlignmentAssistant

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

+ Inheritance diagram for CAlignmentAssistant:
+ Collaboration diagram for CAlignmentAssistant:

Public Member Functions

 CAlignmentAssistant ()
 Constructors. More...
 
 CAlignmentAssistant (wxWindow *parent, CSeq_entry_Handle seh, ICommandProccessor *processor, CConstRef< CSeq_align > align=CConstRef< CSeq_align >(NULL), wxWindowID id=wxID_ANY, const wxString &caption=_("Alignment Assistant"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(775, 595), long style=wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
 
bool Create (wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &caption=_("Alignment Assistant"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(775, 595), long style=wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
 Creation. More...
 
virtual ~CAlignmentAssistant ()
 Destructor. More...
 
void Init ()
 Initialises member variables. More...
 
void CreateControls ()
 Creates the controls and sizers. More...
 
wxBitmap GetBitmapResource (const wxString &name)
 Retrieves bitmap resources. More...
 
wxIcon GetIconResource (const wxString &name)
 Retrieves icon resources. More...
 
void OnClose (wxCommandEvent &event)
 
void OnGoTo (wxCommandEvent &event)
 
void OnGoToSeq (wxCommandEvent &event)
 
void OnFeatures (wxCommandEvent &event)
 
void OnSubstitute (wxCommandEvent &event)
 
void ReportPos (int pos, const string &label)
 
void ReportRange (int pos1, int pos2, const string &label)
 
void IsSelectionAndClean (wxUpdateUIEvent &event)
 
void IsNucleotide (wxUpdateUIEvent &event)
 
void CreateFeature (wxCommandEvent &event)
 
void OnTarget (wxCommandEvent &event)
 
void OnExportInter (wxCommandEvent &event)
 
void OnExportCont (wxCommandEvent &event)
 
void OnValidate (wxCommandEvent &event)
 
void OnPropagateFeatures (wxCommandEvent &)
 
void OnRemoveSeqFromAlign (wxCommandEvent &)
 
void OnReverseStrand (wxCommandEvent &)
 
void OnAddAlignCDS (wxCommandEvent &)
 
void OnAddAlignRNA (wxCommandEvent &)
 
void OnAddAlignOther (wxCommandEvent &)
 
void TranslateLocations (CRef< CSeq_loc > loc, vector< pair< CRef< CSeq_loc >, CBioseq_Handle > > &locations)
 
void DeleteSelection ()
 
- Public Member Functions inherited from CEventHandler
 CEventHandler ()
 CEventHandler. More...
 
virtual ~CEventHandler ()
 
virtual void AddListener (CEventHandler *listener, int pool_name=ePool_Default)
 Add a listener. More...
 
virtual void RemoveListener (CEventHandler *listener)
 Remove a listener. More...
 
virtual void RemoveAllListeners (void)
 
virtual bool HasListener (CEventHandler *listener, int pool_name=ePool_Default) const
 returns "true" if the given listener belongs to the specified pool More...
 
virtual const TListenersGetListeners (int pool_name=ePool_Default) const
 returns a set of listeners fro the specified pool More...
 
virtual bool OnEvent (CEvent *evt)
 Processes en event. Returns "true" if event has been processed. More...
 
virtual bool Dispatch (CEvent *evt, EDispatch disp_how=eDispatch_Default, int pool_name=ePool_Default)
 Dispatches an event to the listeners (but does not handle it). More...
 
virtual bool Send (CEvent *evt, EDispatch disp_how=eDispatch_Default, int pool_name=ePool_Default)
 Sends an event synchronously. More...
 
virtual bool Send (CEvent *evt, int pool_name)
 
void Post (CRef< CEvent > evt, EDispatch disp_how=eDispatch_Default, int pool_name=ePool_Default)
 Handles an event asynchronously (process and/or dispatch). More...
 

Static Public Member Functions

static bool ShowToolTips ()
 Should we show tooltips? More...
 
- Static Public Member Functions inherited from CEventHandler
static bool HandlePostRequest ()
 
static void ClearPostQueue ()
 erases all events from the queue More...
 
static void DestroyPostQueue ()
 

Private Member Functions

void GetFeatures ()
 
void GetAlignment (CConstRef< CSeq_align > align)
 
bool x_ExecuteCommand (IEditCommand *command)
 
void ReportUnresolvedBioseqs (void)
 
void AdjustBioseq (CBioseq_Handle bsh, int from, int to, CRef< CCmdComposite > cmd)
 
CRef< CSeq_alignAdjustAlign (int from, int to, const vector< int > &offset, CRef< CCmdComposite > cmd)
 
void AdjustFeatureLocations (CBioseq_Handle bsh, int from, int to, CRef< CCmdComposite > cmd)
 
CRef< CSeq_locAdjustLoc (const CSeq_loc &feat_loc, int from, int to, bool &modified, bool &removed)
 
void TrimQualityScores (CBioseq_Handle bsh, int from, int to, CRef< CCmdComposite > command)
 

Private Attributes

CSeq_entry_Handle m_TopSeqEntry
 
CSeq_align_Handle m_Alignment
 
ICommandProccessorm_CmdProcessor
 
CPaintAlignmentm_Panel
 
vector< vector< vector< pair< TSeqPos, TSeqPos > > > > m_FeatRanges
 
vector< vector< pair< string, CSeqFeatData::ESubtype > > > m_FeatTypes
 
vector< vector< CBioseq_Handle::EVectorStrand > > m_FeatStrand
 
wxStaticText * m_Range
 
wxTextCtrl * m_GoTo_TextCtrl
 
wxTextCtrl * m_GoToSeq_TextCtrl
 
bool m_is_nucleotide
 
vector< stringm_Labels
 
wxMenu * m_target_submenu
 

Additional Inherited Members

- Public Types inherited from CEventHandler
enum  EDispatch { eDispatch_SelfOnly , eDispatch_AllHandlers , eDispatch_FirstHandler , eDispatch_Default = eDispatch_AllHandlers }
 enum controlling dispatching strategies More...
 
enum  EPoolName {
  ePool_Default = 0 , ePool_Parent , ePool_Child , ePool_Sibling ,
  ePool_NextAvailable
}
 Identifiers for standard pools. More...
 
typedef vector< CEventHandler * > TListeners
 
typedef map< int, TListenersTPools
 
typedef list< AutoPtr< SPostRequest > > TPostRequests
 
typedef std::map< CEventHandler *, intTHandlerToCount
 
typedef void(* FOnPostCallback) ()
 
- Protected Member Functions inherited from CEventHandler
virtual const SEvtMapGetEventMap () const
 
void x_DeclareDead ()
 Removes itself unavailable for async event delivery. More...
 
void x_AddListenerToPool (CEventHandler *listener, int pool_name)
 
- Protected Attributes inherited from CEventHandler
TPools m_Pools
 
- Static Protected Attributes inherited from CEventHandler
static const SEvtMap sm_EvtMap
 

Detailed Description

Definition at line 99 of file alignment_assistant.hpp.

Constructor & Destructor Documentation

◆ CAlignmentAssistant() [1/2]

static CAlignmentAssistant::CAlignmentAssistant ( )

Constructors.

CAlignmentAssistant event table definition

CAlignmentAssistant constructors

Definition at line 276 of file alignment_assistant.cpp.

References Init().

◆ CAlignmentAssistant() [2/2]

CAlignmentAssistant::CAlignmentAssistant ( wxWindow *  parent,
CSeq_entry_Handle  seh,
ICommandProccessor processor,
CConstRef< CSeq_align align = CConstRef<CSeq_align>(NULL),
wxWindowID  id = wxID_ANY,
const wxString &  caption = _("Alignment Assistant"),
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxSize(775,595),
long  style = wxMINIMIZE_BOX | wxMAXIMIZE_BOX |wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL 
)

◆ ~CAlignmentAssistant()

CAlignmentAssistant::~CAlignmentAssistant ( )
virtual

Destructor.

CAlignmentAssistant destructor

Definition at line 318 of file alignment_assistant.cpp.

Member Function Documentation

◆ AdjustAlign()

CRef< CSeq_align > CAlignmentAssistant::AdjustAlign ( int  from,
int  to,
const vector< int > &  offset,
CRef< CCmdComposite cmd 
)
private

◆ AdjustBioseq()

void CAlignmentAssistant::AdjustBioseq ( CBioseq_Handle  bsh,
int  from,
int  to,
CRef< CCmdComposite cmd 
)
private

◆ AdjustFeatureLocations()

void CAlignmentAssistant::AdjustFeatureLocations ( CBioseq_Handle  bsh,
int  from,
int  to,
CRef< CCmdComposite cmd 
)
private

◆ AdjustLoc()

CRef< CSeq_loc > CAlignmentAssistant::AdjustLoc ( const CSeq_loc feat_loc,
int  from,
int  to,
bool modified,
bool removed 
)
private

◆ Create()

bool CAlignmentAssistant::Create ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxString &  caption = _("Alignment Assistant"),
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxSize(775,595),
long  style = wxMINIMIZE_BOX | wxMAXIMIZE_BOX |wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL 
)

Creation.

Definition at line 294 of file alignment_assistant.cpp.

References CreateControls(), and ncbi::grid::netcache::search::fields::size.

Referenced by CAlignmentAssistant().

◆ CreateControls()

void CAlignmentAssistant::CreateControls ( )

◆ CreateFeature()

void CAlignmentAssistant::CreateFeature ( wxCommandEvent &  event)

◆ DeleteSelection()

void CAlignmentAssistant::DeleteSelection ( )

◆ GetAlignment()

void CAlignmentAssistant::GetAlignment ( CConstRef< CSeq_align align)
private

◆ GetBitmapResource()

wxBitmap CAlignmentAssistant::GetBitmapResource ( const wxString &  name)

Retrieves bitmap resources.

Get bitmap resources

Definition at line 493 of file alignment_assistant.cpp.

◆ GetFeatures()

void CAlignmentAssistant::GetFeatures ( )
private

◆ GetIconResource()

wxIcon CAlignmentAssistant::GetIconResource ( const wxString &  name)

Retrieves icon resources.

Get icon resources

Definition at line 504 of file alignment_assistant.cpp.

◆ Init()

void CAlignmentAssistant::Init ( void  )

Initialises member variables.

Member initialisation

Definition at line 329 of file alignment_assistant.cpp.

References m_GoTo_TextCtrl, m_GoToSeq_TextCtrl, m_Panel, and NULL.

Referenced by CAlignmentAssistant().

◆ IsNucleotide()

void CAlignmentAssistant::IsNucleotide ( wxUpdateUIEvent &  event)

Definition at line 718 of file alignment_assistant.cpp.

References m_is_nucleotide, and m_TopSeqEntry.

◆ IsSelectionAndClean()

void CAlignmentAssistant::IsSelectionAndClean ( wxUpdateUIEvent &  event)

◆ OnAddAlignCDS()

void CAlignmentAssistant::OnAddAlignCDS ( wxCommandEvent &  )

◆ OnAddAlignOther()

void CAlignmentAssistant::OnAddAlignOther ( wxCommandEvent &  )

◆ OnAddAlignRNA()

void CAlignmentAssistant::OnAddAlignRNA ( wxCommandEvent &  )

◆ OnClose()

void CAlignmentAssistant::OnClose ( wxCommandEvent &  event)

Definition at line 512 of file alignment_assistant.cpp.

◆ OnExportCont()

void CAlignmentAssistant::OnExportCont ( wxCommandEvent &  event)

◆ OnExportInter()

void CAlignmentAssistant::OnExportInter ( wxCommandEvent &  event)

◆ OnFeatures()

void CAlignmentAssistant::OnFeatures ( wxCommandEvent &  event)

Definition at line 677 of file alignment_assistant.cpp.

References CPaintAlignment::EnableFeatures(), and m_Panel.

◆ OnGoTo()

void CAlignmentAssistant::OnGoTo ( wxCommandEvent &  event)

Definition at line 537 of file alignment_assistant.cpp.

References m_GoTo_TextCtrl, m_Panel, CPaintAlignment::SetPos(), and val.

◆ OnGoToSeq()

void CAlignmentAssistant::OnGoToSeq ( wxCommandEvent &  event)

◆ OnPropagateFeatures()

void CAlignmentAssistant::OnPropagateFeatures ( wxCommandEvent &  )

◆ OnRemoveSeqFromAlign()

void CAlignmentAssistant::OnRemoveSeqFromAlign ( wxCommandEvent &  )

◆ OnReverseStrand()

void CAlignmentAssistant::OnReverseStrand ( wxCommandEvent &  )

◆ OnSubstitute()

void CAlignmentAssistant::OnSubstitute ( wxCommandEvent &  event)

Definition at line 691 of file alignment_assistant.cpp.

References CPaintAlignment::EnableSubstitute(), and m_Panel.

◆ OnTarget()

void CAlignmentAssistant::OnTarget ( wxCommandEvent &  event)

Definition at line 1622 of file alignment_assistant.cpp.

References i, label, m_Labels, m_Panel, row, and CPaintAlignment::SetTarget().

Referenced by CreateControls().

◆ OnValidate()

void CAlignmentAssistant::OnValidate ( wxCommandEvent &  event)

◆ ReportPos()

void CAlignmentAssistant::ReportPos ( int  pos,
const string label 
)

Definition at line 518 of file alignment_assistant.cpp.

References _, NStr::IntToString(), label, and ToWxString().

Referenced by CPaintAlignment::OnPaint().

◆ ReportRange()

void CAlignmentAssistant::ReportRange ( int  pos1,
int  pos2,
const string label 
)

Definition at line 524 of file alignment_assistant.cpp.

References _, NStr::IntToString(), label, m_Range, and ToWxString().

Referenced by CPaintAlignment::OnPaint().

◆ ReportUnresolvedBioseqs()

void CAlignmentAssistant::ReportUnresolvedBioseqs ( void  )
private

◆ ShowToolTips()

bool CAlignmentAssistant::ShowToolTips ( )
static

Should we show tooltips?

Should we show tooltips?

Definition at line 484 of file alignment_assistant.cpp.

◆ TranslateLocations()

void CAlignmentAssistant::TranslateLocations ( CRef< CSeq_loc loc,
vector< pair< CRef< CSeq_loc >, CBioseq_Handle > > &  locations 
)

◆ TrimQualityScores()

void CAlignmentAssistant::TrimQualityScores ( CBioseq_Handle  bsh,
int  from,
int  to,
CRef< CCmdComposite command 
)
private

◆ x_ExecuteCommand()

bool CAlignmentAssistant::x_ExecuteCommand ( IEditCommand command)
private

Member Data Documentation

◆ m_Alignment

CSeq_align_Handle CAlignmentAssistant::m_Alignment
private

◆ m_CmdProcessor

ICommandProccessor* CAlignmentAssistant::m_CmdProcessor
private

Definition at line 167 of file alignment_assistant.hpp.

Referenced by x_ExecuteCommand().

◆ m_FeatRanges

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

◆ m_FeatStrand

vector<vector<CBioseq_Handle::EVectorStrand> > CAlignmentAssistant::m_FeatStrand
private

◆ m_FeatTypes

vector<vector<pair<string,CSeqFeatData::ESubtype> > > CAlignmentAssistant::m_FeatTypes
private

◆ m_GoTo_TextCtrl

wxTextCtrl* CAlignmentAssistant::m_GoTo_TextCtrl
private

Definition at line 175 of file alignment_assistant.hpp.

Referenced by CreateControls(), Init(), and OnGoTo().

◆ m_GoToSeq_TextCtrl

wxTextCtrl* CAlignmentAssistant::m_GoToSeq_TextCtrl
private

Definition at line 176 of file alignment_assistant.hpp.

Referenced by CreateControls(), Init(), and OnGoToSeq().

◆ m_is_nucleotide

bool CAlignmentAssistant::m_is_nucleotide
private

Definition at line 177 of file alignment_assistant.hpp.

Referenced by GetFeatures(), IsNucleotide(), and IsSelectionAndClean().

◆ m_Labels

vector<string> CAlignmentAssistant::m_Labels
private

◆ m_Panel

CPaintAlignment* CAlignmentAssistant::m_Panel
private

◆ m_Range

wxStaticText* CAlignmentAssistant::m_Range
private

Definition at line 174 of file alignment_assistant.hpp.

Referenced by CreateControls(), and ReportRange().

◆ m_target_submenu

wxMenu* CAlignmentAssistant::m_target_submenu
private

Definition at line 179 of file alignment_assistant.hpp.

Referenced by CreateControls(), and OnRemoveSeqFromAlign().

◆ m_TopSeqEntry

CSeq_entry_Handle CAlignmentAssistant::m_TopSeqEntry
private

The documentation for this class was generated from the following files:
Modified on Mon Jun 24 05:21:38 2024 by modify_doxy.py rev. 669887