CAlnMultiWidget Class Reference

Search Toolkit Book for CAlnMultiWidget

#include <alnmulti_widget.hpp>

Inheritance diagram for CAlnMultiWidget:

Inheritance graph
[legend]
Collaboration diagram for CAlnMultiWidget:

Collaboration graph
[legend]
List of all members.

Detailed Description

class CAlnMultiWidget

CAlnMultiWidget is a reusable component for visual presntations of multiple alignments. CAlnMultiWidget works as Mediator to organize interaction of its internal components and to support communication with external components. Data Source is an external component that serves as a source of alignment data. CAlnMultiWidget builds a visual Model object around provided Data Source and uses CAlnMultiPane component to represent this model. CAlnMultiWidget provides API for external components allowing for executing commands and retrieving state information such as selections.

Definition at line 89 of file alnmulti_widget.hpp.

Public Types

typedef CAlnMultiModel::TNumrow TNumrow
typedef int TLine
typedef list< objects::CSeq_loc * > TPSeqLocList
typedef CRangeCollection<
TSeqPos
TRangeColl
typedef vector< CConstRef<
objects::CSeq_id > > 
TRSeqIdVector

Public Member Functions

 CAlnMultiWidget (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=_T("panel"))
virtual ~CAlnMultiWidget ()
virtual void SetDataSource (IAlnMultiDataSource *p_ds)
virtual void CreateWidget (CAlnMultiModel *model)
 performs initialization, creates Model and Controls.
virtual CAlnMultiModelGetModel ()
virtual const CAlnMultiModelGetModel () const
virtual void SetStyleCatalog (const CRowStyleCatalog *catalog)
virtual const CWidgetDisplayStyleGetDisplayStyle () const
virtual void SetVisible (const vector< TNumrow > &rows, bool b_visible, bool b_invert_others=false)
 makes specified rows visible/hidden, other rows aren't affected
virtual void Select (const vector< TNumrow > &rows, bool b_select, bool b_invert_others=false)
virtual IAlnMultiDataSourceGetDataSource ()
void OnContextMenu (wxContextMenuEvent &event)
virtual void UpdateSortOrder ()
virtual void UpdateOnScoringChanged ()
void Print (const string &filename)
 Scroll callbacks.
void UpdateView ()
CGlWidgetBase virtual functions
virtual CGlPaneGetPort ()
 implement these 2 functions in derived classes
virtual const CGlPaneGetPort () const
 implement these 2 functions in derived classes
virtual void x_SetPortLimits (void)
 updates model limits of the Master CGlPane
virtual CGlWidgetPanex_GetPane ()
virtual void LoadSettings ()
virtual void SaveSettings () const
IAlnMultiRenderContext implementation
virtual bool IsRendererFocused ()
 overriding base class implementation
IAlnMultiPaneParent implementation
virtual const IAlnMultiDataSourceGetDataSource () const
virtual TNumrow GetRowNumByLine (TLine line) const
virtual int GetLineByRowNum (TNumrow Row) const
 return -1 if "row" does not exist or is not visible
virtual void OnChildResize ()
virtual void SetScaleX (TModelUnit scale_x, const TModelPoint &point)
virtual void ZoomRect (const TModelRect &rc)
virtual void ZoomPoint (const TModelPoint &point, TModelUnit factor)
virtual void Scroll (TModelUnit d_x, TModelUnit d_y)
virtual void OnRowChanged (IAlignRow *p_row)
virtual void OnColumnsChanged ()
CUIDataSource::IListener implementation
virtual void OnDSChanged (CDataChangeNotifier::CUpdate &update)
CAlnMultiModel::IListener implementation
virtual void OnScoringProgress (float progress, const string &msg)
virtual void OnScoringFinished ()
Command Handlers
void OnZoomSequence (wxCommandEvent &event)
void OnZoomSelection (wxCommandEvent &event)
void OnUpdateZoomSelection (wxUpdateUIEvent &event)
void OnMakeSelectedRowMaster (wxCommandEvent &event)
void OnUpdateMakeSelectedRowMaster (wxUpdateUIEvent &event)
void OnUnsetMaster (wxCommandEvent &event)
void OnUpdateUnsetMaster (wxUpdateUIEvent &event)
void OnMakeConsensusRowMaster (wxCommandEvent &event)
void OnUpdateMakeConsensusRowMaster (wxUpdateUIEvent &event)
void OnResetSelection (wxCommandEvent &event)
void OnMarkSelected (wxCommandEvent &event)
void OnUnMarkSelected (wxCommandEvent &event)
 mark selected regions of selected rows
void OnUpdateMarkSelected (wxUpdateUIEvent &event)
 unmark selected regions of selected rows
void OnUnMarkAll (wxCommandEvent &event)
void OnHideSelected (wxCommandEvent &event)
void OnShowOnlySelected (wxCommandEvent &event)
 hide selected rows
void OnShowAll (wxCommandEvent &event)
 hide rows that are not selected
void OnMoveSelectedUp (wxCommandEvent &event)
 show all hidden rows
void OnSettings (wxCommandEvent &event)
void OnUpdateSettings (wxUpdateUIEvent &event)
Command handler for Scoring methods management
void OnShowMethodDlg (wxCommandEvent &event)
void OnUpdateShowMethodDlg (wxUpdateUIEvent &event)
void OnDisableScoring (wxCommandEvent &event)
void OnUpdateDisableScoring (wxUpdateUIEvent &event)
void OnMethodProperties (wxCommandEvent &event)
void OnUpdateMethodProperties (wxUpdateUIEvent &event)
void OnScoringMethod (wxCommandEvent &event)
void OnUpdateScoringMethod (wxUpdateUIEvent &event)
void OnSetAsDefaultMethod (wxCommandEvent &event)
Selection handling
void GetSelectedIds (TRSeqIdVector &ids) const
void SetSelectedIds (const TRSeqIdVector &ids, objects::CScope &scope)
void GetSelectedRows (vector< TNumrow > &rows)
const TRangeCollGetSelection (void) const
void SetSelection (const TRangeColl &coll)
void GetMarks (TPSeqLocList &ls_locs) const

Static Public Member Functions

static void RegisterCommands (CUICommandRegistry &cmd_reg, wxFileArtProvider &provider)
 class CAlnMultiWidget

Protected Types

typedef map< int, string > TCmdToName

Protected Member Functions

void x_CreatePane (void)
 factory method creating master pane, called form x_CreateControls()
virtual CAlnMultiModelx_CreateModel ()
 factory method creating and initializing a default model
virtual void x_AdjustVisible (bool b_reset)
virtual void x_RedrawControls (void)
virtual void x_UpdateStyleColumns ()
void x_ZoomToRange (TSeqPos from, TSeqPos to)
void x_MakeVisibleHorz (TSeqPos pos)
void x_MakeVisibleHorz (TSeqPos from, TSeqPos to)
virtual wxMenu * x_CreatePopupMenu ()
virtual string x_GetCurrentMethodName () const
virtual void x_SetScoringMethod (const string &method_name, bool save)
virtual void x_CreateScoringMethodsMenu (wxMenu &color_menu)
virtual string * x_GetDefMethodName ()
virtual string x_GetScoringMRUListName ()
Update handlers
Functions in this group are called by the widget when something changes. Each functions performs minimal set of operations needed to keep widget up-to-date.

virtual void x_UpdateOnDataChanged (bool b_reset=true)
 Update handlers.
virtual void x_UpdateOnRowHChanged (void)
virtual void x_UpdateOnSwitchMaster (TNumrow NewMasterRow)
virtual void x_UpdateOnZoom (void)
virtual void x_UpdateOnStylesChanged (void)
virtual void x_OnResize (void)

Protected Attributes

IAlnMultiDataSourcem_DataSource
CAlnMultiModelm_Model
 source of alignment data
CAlnMultiPanem_AlignPane
 representation of alignment data
TCmdToName m_CmdToName
 widget rendering data and handling events


Member Typedef Documentation

typedef map<int, string> CAlnMultiWidget::TCmdToName [protected]
 

Definition at line 288 of file alnmulti_widget.hpp.

typedef int CAlnMultiWidget::TLine
 

Definition at line 98 of file alnmulti_widget.hpp.

typedef CAlnMultiModel::TNumrow CAlnMultiWidget::TNumrow
 

Reimplemented from IAlnMultiPaneParent.

Definition at line 97 of file alnmulti_widget.hpp.

typedef list<objects::CSeq_loc*> CAlnMultiWidget::TPSeqLocList
 

Definition at line 99 of file alnmulti_widget.hpp.

typedef CRangeCollection<TSeqPos> CAlnMultiWidget::TRangeColl
 

Definition at line 100 of file alnmulti_widget.hpp.

typedef vector<CConstRef<objects::CSeq_id> > CAlnMultiWidget::TRSeqIdVector
 

Definition at line 101 of file alnmulti_widget.hpp.


Constructor & Destructor Documentation

CAlnMultiWidget::CAlnMultiWidget wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = 0,
const wxString &  name = _T("panel")
 

Definition at line 96 of file alnmulti_widget.cpp.

CAlnMultiWidget::~CAlnMultiWidget  )  [virtual]
 

Definition at line 136 of file alnmulti_widget.cpp.

References m_AlignPane, m_Model, CEventHandler::RemoveListener(), and CAlnMultiModel::SetListener().


Member Function Documentation

void CAlnMultiWidget::CreateWidget CAlnMultiModel model  )  [virtual]
 

performs initialization, creates Model and Controls.

Call Create() right after constructing CAlnMultiWidget; assumes ownership of the model. If model == NULL, creates a default model

Definition at line 110 of file alnmulti_widget.cpp.

References _ASSERT, CAlnMultiPane::GetAlignVPHeight(), CAlnMultiPane::GetAlignVPWidth(), GetPort(), m_AlignPane, m_Model, CAlnMultiModel::SetListener(), CAlnMultiModel::SetPortLimits(), CGlRect< T >::SetSize(), CGlPane::SetViewport(), CGlWidgetBase::x_CreateControls(), and x_CreateModel().

Referenced by CAlignMultipleDemoDlg::CreateControls(), and CMultiAlignView::CreateViewWindow().

const IAlnMultiDataSource * CAlnMultiWidget::GetDataSource  )  const [virtual]
 

Implements IAlnMultiPaneParent.

Definition at line 196 of file alnmulti_widget.cpp.

References m_DataSource.

CAlnMultiWidget::OnUpdateMethodProperties CAlnMultiWidget::OnUpdateScoringMethod IAlnMultiDataSource * CAlnMultiWidget::GetDataSource  )  [virtual]
 

Implements IAlnMultiPaneParent.

Definition at line 190 of file alnmulti_widget.cpp.

Referenced by GetMarks(), GetSelectedIds(), GetSelectedRows(), OnMakeConsensusRowMaster(), OnUpdateShowMethodDlg(), x_UpdateOnDataChanged(), and x_UpdateOnSwitchMaster().

const CWidgetDisplayStyle * CAlnMultiWidget::GetDisplayStyle  )  const [virtual]
 

Definition at line 242 of file alnmulti_widget.cpp.

References CAlnMultiModel::GetDisplayStyle(), and m_Model.

Referenced by CMultiAlignView::CreateViewWindow(), and OnZoomSequence().

int CAlnMultiWidget::GetLineByRowNum TNumrow  Row  )  const [virtual]
 

return -1 if "row" does not exist or is not visible

Definition at line 329 of file alnmulti_widget.cpp.

References CAlnMultiModel::GetLineByRowNum(), and m_Model.

void CAlnMultiWidget::GetMarks TPSeqLocList ls_locs  )  const
 

Definition at line 783 of file alnmulti_widget.cpp.

References GetDataSource(), CAlnMultiPane::GetMarks(), IAlnMultiDataSource::GetSeqId(), ITERATE, m_AlignPane, and CSeq_loc_Base::SetPacked_int().

const CAlnMultiModel * CAlnMultiWidget::GetModel  )  const [virtual]
 

Definition at line 315 of file alnmulti_widget.cpp.

References m_Model.

CAlnMultiModel * CAlnMultiWidget::GetModel  )  [virtual]
 

Definition at line 309 of file alnmulti_widget.cpp.

References m_Model.

Referenced by GetSelectedIds(), and GetSelectedRows().

const CGlPane & CAlnMultiWidget::GetPort  )  const [virtual]
 

implement these 2 functions in derived classes

Implements CGlWidgetBase.

Definition at line 278 of file alnmulti_widget.cpp.

References CAlnMultiModel::GetAlignPort(), and m_Model.

CGlPane & CAlnMultiWidget::GetPort  )  [virtual]
 

implement these 2 functions in derived classes

Implements CGlWidgetBase.

Definition at line 272 of file alnmulti_widget.cpp.

References CAlnMultiModel::GetAlignPort(), and m_Model.

Referenced by CreateWidget(), OnZoomSequence(), Scroll(), SetScaleX(), x_AdjustVisible(), x_MakeVisibleHorz(), x_OnResize(), x_UpdateOnSwitchMaster(), x_ZoomToRange(), and ZoomPoint().

CAlnMultiWidget::TNumrow CAlnMultiWidget::GetRowNumByLine TLine  line  )  const [virtual]
 

Implements IAlnMultiPaneParent.

Definition at line 321 of file alnmulti_widget.cpp.

References CAlnMultiModel::GetRowByLine(), IAlignRow::GetRowNum(), and m_Model.

Referenced by GetSelectedIds(), GetSelectedRows(), and OnMakeSelectedRowMaster().

void CAlnMultiWidget::GetSelectedIds TRSeqIdVector ids  )  const
 

Definition at line 566 of file alnmulti_widget.cpp.

References _ASSERT, GetDataSource(), GetModel(), GetRowNumByLine(), IAlnMultiDataSource::GetSeqId(), ITERATE, and CSelListModelImpl< Item >::SLM_GetSelectedIndices().

void CAlnMultiWidget::GetSelectedRows vector< TNumrow > &  rows  ) 
 

Definition at line 583 of file alnmulti_widget.cpp.

References GetDataSource(), GetModel(), GetRowNumByLine(), ITERATE, and CSelListModelImpl< Item >::SLM_GetSelectedIndices().

Referenced by CMultiAlignView::GetSelection().

const CAlnMultiWidget::TRangeColl & CAlnMultiWidget::GetSelection void   )  const
 

Definition at line 622 of file alnmulti_widget.cpp.

References CAlnMultiPane::GetSelection(), and m_AlignPane.

Referenced by CMultiAlignView::x_GetSeqRangeSelection().

bool CAlnMultiWidget::IsRendererFocused  )  [virtual]
 

overriding base class implementation

Definition at line 434 of file alnmulti_widget.cpp.

References m_AlignPane.

void CAlnMultiWidget::LoadSettings  )  [virtual]
 

Reimplemented from CGlWidgetBase.

Definition at line 248 of file alnmulti_widget.cpp.

References CAlnMultiModel::GetDisplayStyle(), CGuiRegistry::GetInstance(), CGuiRegistry::GetReadView(), CWidgetDisplayStyle::LoadSettings(), m_Model, CGlWidgetBase::m_RegPath, and x_UpdateOnStylesChanged().

Referenced by CMultiAlignView::LoadSettings().

void CAlnMultiWidget::OnChildResize  )  [virtual]
 

Implements IAlnMultiPaneParent.

Definition at line 335 of file alnmulti_widget.cpp.

References x_OnResize().

void CAlnMultiWidget::OnColumnsChanged  )  [virtual]
 

Implements IAlnMultiPaneParent.

Definition at line 394 of file alnmulti_widget.cpp.

References SaveSettings(), and x_UpdateStyleColumns().

void CAlnMultiWidget::OnContextMenu wxContextMenuEvent &  event  ) 
 

Definition at line 375 of file alnmulti_widget.cpp.

References eHorz, eVert, m_AlignPane, CGlWidgetBase::m_PopupPoint, CGlPoint< T >::m_X, CGlPoint< T >::m_Y, CAlnMultiPane::SHH_GetModelByWindow(), x_CreatePopupMenu(), and CGlWidgetBase::x_ShowDecoratedPopupMenu().

void CAlnMultiWidget::OnDisableScoring wxCommandEvent &  event  ) 
 

Definition at line 1110 of file alnmulti_widget.cpp.

References x_SetScoringMethod().

void CAlnMultiWidget::OnDSChanged CDataChangeNotifier::CUpdate update  )  [virtual]
 

Implements CDataChangeNotifier::IListener.

Definition at line 401 of file alnmulti_widget.cpp.

References _ASSERT, CDataChangeNotifier::eChanged, eDialog_Ok, CDataChangeNotifier::eError, eIcon_Stop, CDataChangeNotifier::eProgressReport, eWrap, CDataChangeNotifier::CUpdate::GetMessage(), CDataChangeNotifier::CUpdate::GetProgressNorm(), CDataChangeNotifier::CUpdate::GetType(), CAlnMultiPane::HideProgressPanel(), m_AlignPane, m_DataSource, NcbiMessageBox(), SetDataSource(), and CAlnMultiPane::ShowProgressPanel().

Referenced by CMultiAlignView::OnDSChanged().

void CAlnMultiWidget::OnHideSelected wxCommandEvent &  event  ) 
 

Definition at line 670 of file alnmulti_widget.cpp.

References CAlnMultiModel::GetSelectedRows(), m_Model, SetVisible(), and CSelListModelImpl< Item >::SLM_SelectAll().

void CAlnMultiWidget::OnMakeConsensusRowMaster wxCommandEvent &  event  ) 
 

Definition at line 531 of file alnmulti_widget.cpp.

References IAlnMultiDataSource::GetConsensusRow(), GetDataSource(), and x_UpdateOnSwitchMaster().

void CAlnMultiWidget::OnMakeSelectedRowMaster wxCommandEvent &  event  ) 
 

Definition at line 505 of file alnmulti_widget.cpp.

References eDialog_Modal, eDialog_Ok, eIcon_Exclamation, GetRowNumByLine(), m_Model, NcbiMessageBox(), CSelListModelImpl< Item >::SLM_GetSelectedCount(), CSelListModelImpl< Item >::SLM_GetSelectedIndices(), and x_UpdateOnSwitchMaster().

void CAlnMultiWidget::OnMarkSelected wxCommandEvent &  event  ) 
 

Definition at line 634 of file alnmulti_widget.cpp.

References CAlnMultiPane::GetSelection(), m_AlignPane, and CAlnMultiPane::MarkSelectedRows().

void CAlnMultiWidget::OnMethodProperties wxCommandEvent &  event  ) 
 

Definition at line 1083 of file alnmulti_widget.cpp.

References _T, CAlnMultiModel::GetCurrentMethod(), m_Model, UpdateOnScoringChanged(), and CAlnMultiModel::UpdateOnScoringChanged().

void CAlnMultiWidget::OnMoveSelectedUp wxCommandEvent &  event  ) 
 

show all hidden rows

Definition at line 699 of file alnmulti_widget.cpp.

References CAlnMultiModel::GetSelectedRows(), m_Model, CAlnMultiModel::SetRowOrder(), and x_RedrawControls().

void CAlnMultiWidget::OnResetSelection wxCommandEvent &  event  ) 
 

Definition at line 560 of file alnmulti_widget.cpp.

References m_AlignPane, and CAlnMultiPane::ResetSelection().

void CAlnMultiWidget::OnRowChanged IAlignRow p_row  )  [virtual]
 

Implements IAlnMultiPaneParent.

Definition at line 369 of file alnmulti_widget.cpp.

References x_UpdateOnRowHChanged().

void CAlnMultiWidget::OnScoringFinished  )  [virtual]
 

Implements CScoreCache::IListener.

Definition at line 427 of file alnmulti_widget.cpp.

References CAlnMultiPane::HideProgressPanel(), and m_AlignPane.

void CAlnMultiWidget::OnScoringMethod wxCommandEvent &  event  ) 
 

Definition at line 1186 of file alnmulti_widget.cpp.

References map_checker< Container >::clear(), m_CmdToName, and x_SetScoringMethod().

void CAlnMultiWidget::OnScoringProgress float  progress,
const string &  msg
[virtual]
 

Implements CScoreCache::IListener.

Definition at line 421 of file alnmulti_widget.cpp.

References m_AlignPane, and CAlnMultiPane::ShowProgressPanel().

void CAlnMultiWidget::OnSetAsDefaultMethod wxCommandEvent &  event  ) 
 

Definition at line 1207 of file alnmulti_widget.cpp.

References _ASSERT, SaveSettings(), x_GetCurrentMethodName(), and x_GetDefMethodName().

void CAlnMultiWidget::OnSettings wxCommandEvent &  event  ) 
 

Definition at line 732 of file alnmulti_widget.cpp.

References CAlnMultiRenderer::GetColumn(), CAlnMultiRenderer::GetColumnsCount(), CAlnMultiModel::GetDisplayStyle(), CAlnMultiPane::GetRenderer(), m_AlignPane, CWidgetDisplayStyle::m_Columns, m_Model, and x_UpdateStyleColumns().

void CAlnMultiWidget::OnShowAll wxCommandEvent &  event  ) 
 

hide rows that are not selected

Definition at line 689 of file alnmulti_widget.cpp.

References m_Model, CAlnMultiModel::ShowAll(), x_AdjustVisible(), x_RedrawControls(), and CGlWidgetBase::x_UpdateScrollbars().

void CAlnMultiWidget::OnShowMethodDlg wxCommandEvent &  event  ) 
 

Definition at line 1052 of file alnmulti_widget.cpp.

References _ASSERT, CScoringMethodsDlg::Create(), IAlnExplorer::fInvalid, IAlnMultiDataSource::GetAlignType(), CScoringMethodsDlg::GetSelectedMethod(), m_DataSource, CScoringMethodsDlg::Setup(), ToStdString(), x_GetCurrentMethodName(), and x_SetScoringMethod().

void CAlnMultiWidget::OnShowOnlySelected wxCommandEvent &  event  ) 
 

hide selected rows

Definition at line 680 of file alnmulti_widget.cpp.

References CAlnMultiModel::GetSelectedRows(), m_Model, and SetVisible().

void CAlnMultiWidget::OnUnMarkAll wxCommandEvent &  event  ) 
 

Definition at line 662 of file alnmulti_widget.cpp.

References m_AlignPane, and CAlnMultiPane::UnMarkAll().

void CAlnMultiWidget::OnUnMarkSelected wxCommandEvent &  event  ) 
 

mark selected regions of selected rows

Definition at line 643 of file alnmulti_widget.cpp.

References CAlnMultiPane::GetSelection(), m_AlignPane, and CAlnMultiPane::MarkSelectedRows().

void CAlnMultiWidget::OnUnsetMaster wxCommandEvent &  event  ) 
 

Definition at line 547 of file alnmulti_widget.cpp.

References x_UpdateOnSwitchMaster().

void CAlnMultiWidget::OnUpdateDisableScoring wxUpdateUIEvent &  event  ) 
 

Definition at line 1116 of file alnmulti_widget.cpp.

References CAlnMultiModel::GetCurrentMethod(), and m_Model.

void CAlnMultiWidget::OnUpdateMakeConsensusRowMaster wxUpdateUIEvent &  event  ) 
 

Definition at line 540 of file alnmulti_widget.cpp.

References CAlnMultiModel::CanChangeMasterRow(), and m_Model.

void CAlnMultiWidget::OnUpdateMakeSelectedRowMaster wxUpdateUIEvent &  event  ) 
 

Definition at line 525 of file alnmulti_widget.cpp.

References CAlnMultiModel::CanChangeMasterRow(), and m_Model.

void CAlnMultiWidget::OnUpdateMarkSelected wxUpdateUIEvent &  event  ) 
 

unmark selected regions of selected rows

Definition at line 652 of file alnmulti_widget.cpp.

References CAlnMultiPane::GetSelection(), m_AlignPane, m_Model, CRangeCollection< Position >::size(), and CSelListModelImpl< Item >::SLM_GetSelectedCount().

void CAlnMultiWidget::OnUpdateMethodProperties wxUpdateUIEvent &  event  ) 
 

Definition at line 1099 of file alnmulti_widget.cpp.

References CAlnMultiModel::GetCurrentMethod(), IUIToolWithGUI::HasPropertiesPanel(), and m_Model.

void CAlnMultiWidget::OnUpdateScoringMethod wxUpdateUIEvent &  event  ) 
 

Definition at line 1196 of file alnmulti_widget.cpp.

References m_CmdToName, and x_GetCurrentMethodName().

void CAlnMultiWidget::OnUpdateSettings wxUpdateUIEvent &  event  ) 
 

Definition at line 761 of file alnmulti_widget.cpp.

void CAlnMultiWidget::OnUpdateShowMethodDlg wxUpdateUIEvent &  event  ) 
 

Definition at line 1072 of file alnmulti_widget.cpp.

References IAlnExplorer::fInvalid, IAlnMultiDataSource::GetAlignType(), GetDataSource(), and m_DataSource.

void CAlnMultiWidget::OnUpdateUnsetMaster wxUpdateUIEvent &  event  ) 
 

Definition at line 553 of file alnmulti_widget.cpp.

References CAlnMultiModel::CanChangeMasterRow(), CAlnMultiModel::GetMasterRow(), and m_Model.

void CAlnMultiWidget::OnUpdateZoomSelection wxUpdateUIEvent &  event  ) 
 

Definition at line 461 of file alnmulti_widget.cpp.

References CAlnMultiPane::GetSelectionLimits(), m_AlignPane, and COpenRange< Position >::NotEmpty().

void CAlnMultiWidget::OnZoomSelection wxCommandEvent &  event  ) 
 

Definition at line 451 of file alnmulti_widget.cpp.

References COpenRange< Position >::GetFrom(), CAlnMultiPane::GetSelectionLimits(), COpenRange< Position >::GetTo(), m_AlignPane, COpenRange< Position >::NotEmpty(), and x_ZoomToRange().

void CAlnMultiWidget::OnZoomSequence wxCommandEvent &  event  ) 
 

Definition at line 443 of file alnmulti_widget.cpp.

References IGlFont::eMetric_MaxCharWidth, GetDisplayStyle(), CGlBitmapFont::GetMetric(), GetPort(), CWidgetDisplayStyle::m_SeqFont, CGlPane::SetScale(), and x_UpdateOnZoom().

void CAlnMultiWidget::Print const string &  filename  ) 
 

Scroll callbacks.

Definition at line 1275 of file alnmulti_widget.cpp.

void CAlnMultiWidget::RegisterCommands CUICommandRegistry cmd_reg,
wxFileArtProvider provider
[static]
 

class CAlnMultiWidget

Definition at line 69 of file alnmulti_widget.cpp.

References eCmdHideSelected, eCmdMarkSelected, eCmdMoveSelectedUp, eCmdRebuildAlignment, eCmdSetSelMaster, eCmdShowAll, eCmdShowOnlySelected, eCmdUnMarkAll, eCmdUnMarkSelected, eCmdUnsetMaster, CUICommandRegistry::RegisterCommand(), and WidgetsData_RegisterCommands().

Referenced by CAlignMultipleDemoDlg::CreateControls(), and CMultiAlignViewFactory::RegisterCommands().

void CAlnMultiWidget::SaveSettings  )  const [virtual]
 

Reimplemented from CGlWidgetBase.

Definition at line 260 of file alnmulti_widget.cpp.

References IAlnMultiDataSource::GetAlignType(), CAlnMultiModel::GetDisplayStyle(), CGuiRegistry::GetInstance(), CGuiRegistry::GetReadWriteView(), m_DataSource, m_Model, CGlWidgetBase::m_RegPath, and CWidgetDisplayStyle::SaveSettings().

Referenced by OnColumnsChanged(), OnSetAsDefaultMethod(), CMultiAlignView::SaveSettings(), and x_SetScoringMethod().

void CAlnMultiWidget::Scroll TModelUnit  d_x,
TModelUnit  d_y
[virtual]
 

Implements IAlnMultiPaneParent.

Definition at line 362 of file alnmulti_widget.cpp.

References GetPort(), CGlPane::Scroll(), and x_UpdateOnZoom().

void CAlnMultiWidget::Select const vector< TNumrow > &  rows,
bool  b_select,
bool  b_invert_others = false
[virtual]
 

Definition at line 214 of file alnmulti_widget.cpp.

References CAlnMultiModel::GetLineByRowNum(), m_Model, CSelListModelImpl< Item >::SLM_SelectItems(), and x_RedrawControls().

void CAlnMultiWidget::SetDataSource IAlnMultiDataSource p_ds  )  [virtual]
 

Definition at line 290 of file alnmulti_widget.cpp.

References _ASSERT, CAlnMultiModel::GetDefaultMethod(), IAlnMultiDataSource::IsEmpty(), m_DataSource, m_Model, CAlnMultiModel::SetDataSource(), and x_SetScoringMethod().

Referenced by CAlignMultipleDemoDlg::CreateControls(), OnDSChanged(), CAlignMultipleDemoDlg::OnFileClick(), CMultiAlignView::OnProjectChanged(), and CAlignMultipleDemoDlg::OnRebuild().

void CAlnMultiWidget::SetScaleX TModelUnit  scale_x,
const TModelPoint point
[virtual]
 

Implements IAlnMultiPaneParent.

Definition at line 341 of file alnmulti_widget.cpp.

References GetPort(), CGlPane::SetScaleRefPoint(), and x_UpdateOnZoom().

void CAlnMultiWidget::SetSelectedIds const TRSeqIdVector ids,
objects::CScope &  scope
 

void CAlnMultiWidget::SetSelection const TRangeColl coll  ) 
 

Definition at line 628 of file alnmulti_widget.cpp.

References m_AlignPane, and CAlnMultiPane::SetSelection().

Referenced by CMultiAlignView::x_OnSetSelection().

void CAlnMultiWidget::SetStyleCatalog const CRowStyleCatalog catalog  )  [virtual]
 

Definition at line 235 of file alnmulti_widget.cpp.

References _ASSERT, m_Model, and CAlnMultiModel::SetStyleCatalog().

Referenced by CAlignMultipleDemoDlg::CreateControls(), and CMultiAlignView::CreateViewWindow().

void CAlnMultiWidget::SetVisible const vector< TNumrow > &  rows,
bool  b_visible,
bool  b_invert_others = false
[virtual]
 

makes specified rows visible/hidden, other rows aren't affected

Definition at line 203 of file alnmulti_widget.cpp.

References m_Model, CAlnMultiModel::SetVisible(), x_AdjustVisible(), x_RedrawControls(), and CGlWidgetBase::x_UpdateScrollbars().

Referenced by OnHideSelected(), and OnShowOnlySelected().

void CAlnMultiWidget::UpdateOnScoringChanged  )  [virtual]
 

Definition at line 776 of file alnmulti_widget.cpp.

References m_AlignPane, CAlnMultiPane::Update(), and x_RedrawControls().

Referenced by OnMethodProperties(), and x_SetScoringMethod().

void CAlnMultiWidget::UpdateSortOrder  )  [virtual]
 

Definition at line 767 of file alnmulti_widget.cpp.

References m_AlignPane, m_Model, CAlnMultiPane::UpdateHeaderSortState(), CAlnMultiModel::UpdateSortOrder(), and x_RedrawControls().

void CAlnMultiWidget::UpdateView  ) 
 

Definition at line 806 of file alnmulti_widget.cpp.

References m_AlignPane, CAlnMultiPane::Update(), and x_UpdateOnStylesChanged().

void CAlnMultiWidget::x_AdjustVisible bool  b_reset  )  [protected, virtual]
 

Definition at line 927 of file alnmulti_widget.cpp.

References CGlPane::AdjustToLimits(), CAlnMultiPane::GetAlignVPHeight(), CGlPane::GetModelLimitsRect(), GetPort(), CGlPane::GetVisibleRect(), m_AlignPane, CGlRect< T >::SetBottom(), CGlRect< T >::SetTop(), CGlPane::SetVisibleRect(), and CGlRect< T >::Top().

Referenced by OnShowAll(), SetVisible(), x_OnResize(), x_UpdateOnDataChanged(), x_UpdateOnRowHChanged(), and x_UpdateOnSwitchMaster().

CAlnMultiModel * CAlnMultiWidget::x_CreateModel  )  [protected, virtual]
 

factory method creating and initializing a default model

Definition at line 130 of file alnmulti_widget.cpp.

Referenced by CreateWidget().

void CAlnMultiWidget::x_CreatePane void   )  [protected, virtual]
 

factory method creating master pane, called form x_CreateControls()

Implements CGlWidgetBase.

Definition at line 813 of file alnmulti_widget.cpp.

References m_AlignPane, m_Model, CAlnMultiPane::SetContext(), CAlnMultiPane::SetWidget(), and CSelListModelImpl< Item >::SLM_AddSLView().

static wxMenu * CAlnMultiWidget::x_CreatePopupMenu  )  [protected, virtual]
 

add Scoring Methods menu

Definition at line 1320 of file alnmulti_widget.cpp.

References _T, CUICommandRegistry::CreateMenu(), FindSubItem(), IAlnExplorer::fInvalid, CUIToolRegistry::GetInstance(), CUICommandRegistry::GetInstance(), CUIToolRegistry::GetMRUToolNames(), and CUIToolRegistry::MRUListExists().

Referenced by OnContextMenu().

void CAlnMultiWidget::x_CreateScoringMethodsMenu wxMenu &  color_menu  )  [protected, virtual]
 

Definition at line 1389 of file alnmulti_widget.cpp.

References _ASSERT, CreateMenu(), CAlnMultiModel::GetCurrentMethod(), CMenuItem::GetLabel(), IUIToolWithGUI::GetMenu(), m_Model, and ToWxString().

string CAlnMultiWidget::x_GetCurrentMethodName  )  const [protected, virtual]
 

Definition at line 1124 of file alnmulti_widget.cpp.

References _ASSERT, CAlnMultiModel::GetCurrentMethod(), IUITool::GetName(), and m_Model.

Referenced by OnSetAsDefaultMethod(), OnShowMethodDlg(), OnUpdateScoringMethod(), and x_SetScoringMethod().

string * CAlnMultiWidget::x_GetDefMethodName  )  [protected, virtual]
 

Definition at line 1221 of file alnmulti_widget.cpp.

References _ASSERT, IAlnExplorer::fDNA, IAlnExplorer::fProtein, IAlnMultiDataSource::GetAlignType(), CAlnMultiModel::GetDisplayStyle(), m_DataSource, CWidgetDisplayStyle::m_DefDNAMethod, CWidgetDisplayStyle::m_DefProteinMethod, and m_Model.

Referenced by OnSetAsDefaultMethod().

CGlWidgetPane * CAlnMultiWidget::x_GetPane  )  [virtual]
 

Reimplemented from CGlWidgetBase.

Definition at line 284 of file alnmulti_widget.cpp.

References m_AlignPane.

string CAlnMultiWidget::x_GetScoringMRUListName  )  [protected, virtual]
 

Definition at line 1240 of file alnmulti_widget.cpp.

References IScoringMethod::GetAlignmentTagByType(), IAlnMultiDataSource::GetAlignType(), and m_DataSource.

Referenced by x_SetScoringMethod().

void CAlnMultiWidget::x_MakeVisibleHorz TSeqPos  from,
TSeqPos  to
[protected]
 

Definition at line 485 of file alnmulti_widget.cpp.

References GetPort(), CGlPane::GetVisibleRect(), CGlRect< T >::Left(), CGlRect< T >::Right(), CGlPane::Scroll(), and x_UpdateOnZoom().

void CAlnMultiWidget::x_MakeVisibleHorz TSeqPos  pos  )  [protected]
 

Definition at line 479 of file alnmulti_widget.cpp.

void CAlnMultiWidget::x_OnResize void   )  [protected, virtual]
 

Definition at line 881 of file alnmulti_widget.cpp.

References CAlnMultiPane::GetAlignVPHeight(), CAlnMultiPane::GetAlignVPWidth(), GetPort(), m_AlignPane, CGlRect< T >::SetSize(), CGlPane::SetViewport(), x_AdjustVisible(), and CGlWidgetBase::x_UpdateScrollbars().

Referenced by OnChildResize().

void CAlnMultiWidget::x_RedrawControls void   )  [protected, virtual]
 

Reimplemented from CGlWidgetBase.

Definition at line 894 of file alnmulti_widget.cpp.

References m_AlignPane.

Referenced by OnMoveSelectedUp(), OnShowAll(), Select(), SetVisible(), UpdateOnScoringChanged(), UpdateSortOrder(), x_UpdateOnRowHChanged(), x_UpdateOnSwitchMaster(), and x_UpdateOnZoom().

virtual void CAlnMultiWidget::x_SetPortLimits void   )  [inline, virtual]
 

updates model limits of the Master CGlPane

Implements CGlWidgetBase.

Definition at line 117 of file alnmulti_widget.hpp.

void CAlnMultiWidget::x_SetScoringMethod const string &  method_name,
bool  save
[protected, virtual]
 

Definition at line 1137 of file alnmulti_widget.cpp.

References _ASSERT, CAlnMultiModel::AddScoringMethod(), CUIToolRegistry::AddToolToMRU(), CUIToolRegistry::CreateMRUList(), CUIToolRegistry::CreateToolInstance(), eDialog_Ok, eIcon_Exclamation, CUIToolRegistry::GetInstance(), CRef< Interface, Locker >::GetPointer(), m_Model, CUIToolRegistry::MRUListExists(), NcbiMessageBox(), CAlnMultiModel::ResetCurrentMethod(), SaveSettings(), CAlnMultiModel::SetCurrentMethod(), CAlnMultiModel::SetDefaultMethod(), UpdateOnScoringChanged(), x_GetCurrentMethodName(), and x_GetScoringMRUListName().

Referenced by OnDisableScoring(), OnScoringMethod(), OnShowMethodDlg(), and SetDataSource().

void CAlnMultiWidget::x_UpdateOnDataChanged bool  b_reset = true  )  [protected, virtual]
 

Update handlers.

Definition at line 902 of file alnmulti_widget.cpp.

References GetDataSource(), IAlnMultiDataSource::GetNumRows(), CAlnMultiModel::GetRow(), IAlnMultiDataSource::IsEmpty(), m_AlignPane, m_Model, IAlignRow::SetHost(), and x_AdjustVisible().

void CAlnMultiWidget::x_UpdateOnRowHChanged void   )  [protected, virtual]
 

Definition at line 944 of file alnmulti_widget.cpp.

References m_Model, CAlnMultiModel::UpdateOnRowHChanged(), x_AdjustVisible(), x_RedrawControls(), and CGlWidgetBase::x_UpdateScrollbars().

Referenced by OnRowChanged(), and x_UpdateOnStylesChanged().

void CAlnMultiWidget::x_UpdateOnStylesChanged void   )  [protected, virtual]
 

Definition at line 1035 of file alnmulti_widget.cpp.

References color, CWidgetDisplayStyle::eBack, CWidgetDisplayStyle::GetColor(), CAlnMultiModel::GetDisplayStyle(), CAlnMultiPane::GetRenderer(), m_AlignPane, m_Model, CAlnMultiPane::SetBackColor(), CAlnMultiRenderer::SetColumnsByStyle(), CAlnMultiModel::UpdateOnStyleChanged(), and x_UpdateOnRowHChanged().

Referenced by LoadSettings(), and UpdateView().

void CAlnMultiWidget::x_UpdateOnSwitchMaster TNumrow  NewMasterRow  )  [protected, virtual]
 

Definition at line 958 of file alnmulti_widget.cpp.

References CGlRect< T >::Bottom(), CRangeCollection< Position >::CombineWith(), CEventHandler::eDispatch_Default, IAlnExplorer::eLeft, CAlnMultiPane::eLinearSelChanged, CEventHandler::ePool_Parent, IAlnExplorer::eRight, IAlnMultiDataSource::GetAlnPosFromSeqPos(), IAlnMultiDataSource::GetAnchor(), GetDataSource(), GetPort(), CAlnMultiPane::GetSelection(), IAlnMultiDataSource::GetSeqPosFromAlnPos(), CGlPane::GetVisibleRect(), ITERATE, CGlRect< T >::Left(), m_AlignPane, m_Model, CGlRect< T >::Right(), CEventHandler::Send(), CAlnMultiModel::SetMasterRow(), CAlnMultiPane::SetSelection(), CGlPane::SetVisibleRect(), CGlRect< T >::Top(), CAlnMultiPane::Update(), x_AdjustVisible(), x_RedrawControls(), and CGlWidgetBase::x_UpdateScrollbars().

Referenced by OnMakeConsensusRowMaster(), OnMakeSelectedRowMaster(), and OnUnsetMaster().

void CAlnMultiWidget::x_UpdateOnZoom void   )  [protected, virtual]
 

Reimplemented from CGlWidgetBase.

Definition at line 1027 of file alnmulti_widget.cpp.

References m_AlignPane, CAlnMultiPane::Update(), x_RedrawControls(), and CGlWidgetBase::x_UpdateScrollbars().

Referenced by OnZoomSequence(), Scroll(), SetScaleX(), x_MakeVisibleHorz(), and x_ZoomToRange().

void CAlnMultiWidget::x_UpdateStyleColumns  )  [protected, virtual]
 

Definition at line 713 of file alnmulti_widget.cpp.

References CAlnMultiRenderer::GetColumn(), CAlnMultiRenderer::GetColumnsCount(), CAlnMultiModel::GetDisplayStyle(), CAlnMultiPane::GetRenderer(), m_AlignPane, CWidgetDisplayStyle::m_Columns, and m_Model.

Referenced by OnColumnsChanged(), and OnSettings().

void CAlnMultiWidget::x_ZoomToRange TSeqPos  from,
TSeqPos  to
[protected]
 

Definition at line 468 of file alnmulti_widget.cpp.

References GetPort(), CGlPane::GetVisibleRect(), CGlRect< T >::SetLeft(), CGlRect< T >::SetRight(), x_UpdateOnZoom(), and CGlPane::ZoomRect().

Referenced by OnZoomSelection(), and ZoomRect().

void CAlnMultiWidget::ZoomPoint const TModelPoint point,
TModelUnit  factor
[virtual]
 

Implements IAlnMultiPaneParent.

Definition at line 356 of file alnmulti_widget.cpp.

References GetPort(), and CGlPane::ZoomPoint().

void CAlnMultiWidget::ZoomRect const TModelRect rc  )  [virtual]
 

Implements IAlnMultiPaneParent.

Definition at line 348 of file alnmulti_widget.cpp.

References CGlRect< T >::Left(), CGlRect< T >::Right(), and x_ZoomToRange().


Member Data Documentation

CAlnMultiPane* CAlnMultiWidget::m_AlignPane [protected]
 

representation of alignment data

Definition at line 294 of file alnmulti_widget.hpp.

Referenced by CreateWidget(), GetMarks(), GetSelection(), IsRendererFocused(), OnContextMenu(), OnDSChanged(), OnMarkSelected(), OnResetSelection(), OnScoringFinished(), OnScoringProgress(), OnSettings(), OnUnMarkAll(), OnUnMarkSelected(), OnUpdateMarkSelected(), OnUpdateZoomSelection(), OnZoomSelection(), SetSelection(), UpdateOnScoringChanged(), UpdateSortOrder(), UpdateView(), x_AdjustVisible(), x_CreatePane(), x_GetPane(), x_OnResize(), x_RedrawControls(), x_UpdateOnDataChanged(), x_UpdateOnStylesChanged(), x_UpdateOnSwitchMaster(), x_UpdateOnZoom(), x_UpdateStyleColumns(), and ~CAlnMultiWidget().

TCmdToName CAlnMultiWidget::m_CmdToName [protected]
 

widget rendering data and handling events

Definition at line 296 of file alnmulti_widget.hpp.

Referenced by OnScoringMethod(), and OnUpdateScoringMethod().

IAlnMultiDataSource* CAlnMultiWidget::m_DataSource [protected]
 

Definition at line 290 of file alnmulti_widget.hpp.

Referenced by GetDataSource(), OnDSChanged(), OnShowMethodDlg(), OnUpdateShowMethodDlg(), SaveSettings(), SetDataSource(), x_GetDefMethodName(), and x_GetScoringMRUListName().

CAlnMultiModel* CAlnMultiWidget::m_Model [protected]
 

source of alignment data

Definition at line 292 of file alnmulti_widget.hpp.

Referenced by CreateWidget(), GetDisplayStyle(), GetLineByRowNum(), GetModel(), GetPort(), GetRowNumByLine(), LoadSettings(), OnHideSelected(), OnMakeSelectedRowMaster(), OnMethodProperties(), OnMoveSelectedUp(), OnSettings(), OnShowAll(), OnShowOnlySelected(), OnUpdateDisableScoring(), OnUpdateMakeConsensusRowMaster(), OnUpdateMakeSelectedRowMaster(), OnUpdateMarkSelected(), OnUpdateMethodProperties(), OnUpdateUnsetMaster(), SaveSettings(), Select(), SetDataSource(), SetStyleCatalog(), SetVisible(), UpdateSortOrder(), x_CreatePane(), x_CreateScoringMethodsMenu(), x_GetCurrentMethodName(), x_GetDefMethodName(), x_SetScoringMethod(), x_UpdateOnDataChanged(), x_UpdateOnRowHChanged(), x_UpdateOnStylesChanged(), x_UpdateOnSwitchMaster(), x_UpdateStyleColumns(), and ~CAlnMultiWidget().


The documentation for this class was generated from the following files:
Generated on Mon Dec 7 09:56:50 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Mon Dec 07 16:22:26 2009 by modify_doxy.py rev. 173732