NCBI C++ ToolKit
|
Search Toolkit Book for CHitMatrixWidget
class CHitMatrixWidget More...
#include <gui/widgets/hit_matrix/hit_matrix_widget.hpp>
Public Types | |
typedef list< CConstRef< objects::CSeq_id > > | TIdRefList |
typedef CHitMatrixPane::TRangeColl | TRangeColl |
Public Types inherited from CGlWidgetBase | |
enum | { ID_GLCHILDPANE = wxID_HIGHEST + 200 , ID_VSCROPLLBAR , ID_HSCROPLLBAR } |
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, TListeners > | TPools |
typedef list< AutoPtr< SPostRequest > > | TPostRequests |
typedef std::map< CEventHandler *, int > | THandlerToCount |
typedef void(* | FOnPostCallback) () |
Public Member Functions | |
CHitMatrixWidget (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL) | |
virtual | ~CHitMatrixWidget () |
virtual CGlPane & | GetPort () |
implement these 2 functions in derived classes More... | |
virtual const CGlPane & | GetPort () const |
virtual void | SetDataSource (IHitMatrixDataSource *p_ds) |
virtual IHitMatrixDataSource * | GetDS () |
virtual void | SetScaleX (TModelUnit scale_x, const TModelPoint &point) |
virtual CHitMatrixRenderer & | GetRenderer () |
const TRangeColl & | GetSubjectRangeSelection () const |
const TRangeColl & | GetQueryRangeSelection () const |
void | SetSubjectRangeSelection (const TRangeColl &segs) |
void | SetQueryRangeSelection (const TRangeColl &segs) |
void | SetQueryVisibleRange (const TSeqRange &range) |
void | SetSubjectVisibleRange (const TSeqRange &range) |
void | ResetObjectSelection () |
void | GetObjectSelection (TConstObjects &objs) const |
void | SetObjectSelection (const vector< const objects::CSeq_align * > sel_aligns) |
Command and Event handlers | |
void | OnContextMenu (wxContextMenuEvent &event) |
void | OnZoomSelection (wxCommandEvent &event) |
void | OnUpdateZoomSelection (wxUpdateUIEvent &event) |
void | OnZoomToHits (wxCommandEvent &event) |
void | OnZoomToSelectedHitElems (wxCommandEvent &event) |
void | OnUpdateZoomToSelectedHitElems (wxUpdateUIEvent &event) |
void | OnSetEqualScale (wxCommandEvent &event) |
void | OnChooseSeq (wxCommandEvent &event) |
void | OnColorByScore (wxCommandEvent &event) |
void | OnDisableColoring (wxCommandEvent &event) |
void | OnUpdateDisableColoring (wxUpdateUIEvent &event) |
void | OnSetupGraphs (wxCommandEvent &event) |
void | OnResetSelection (wxCommandEvent &event) |
void | OnSavePdf (wxCommandEvent &) |
void | OnEnableSavePdfCmdUpdate (wxUpdateUIEvent &event) |
Public Member Functions inherited from CGlWidgetBase | |
CGlWidgetBase (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxT("panel")) | |
class CGlWidgetBase More... | |
virtual | ~CGlWidgetBase () |
virtual void | Create () |
creates controls and performs basic initialization More... | |
virtual void | ZoomRect (const TModelRect &rc) |
virtual void | ZoomPoint (const TModelPoint &point, TModelUnit factor, CGlPane::EZoomOptions=CGlPane::fZoomXY) |
virtual void | Scroll (TModelUnit d_x, TModelUnit d_y) |
virtual void | NotifyVisibleRangeChanged () |
void | OnAllEvents (CViewEvent::TEventObject evt) |
virtual void | SetRegistryPath (const string ®_path) |
virtual void | LoadSettings () |
virtual void | SaveSettings () const |
void | OnSize (wxSizeEvent &event) |
void | OnScroll (wxScrollEvent &event) |
void | OnZoomIn (wxCommandEvent &event) |
void | OnZoomInX (wxCommandEvent &event) |
void | OnZoomInY (wxCommandEvent &event) |
void | OnZoomInMouse (wxCommandEvent &event) |
void | OnZoomOut (wxCommandEvent &event) |
void | OnZoomOutX (wxCommandEvent &event) |
void | OnZoomOutY (wxCommandEvent &event) |
void | OnZoomOutMouse (wxCommandEvent &event) |
void | OnZoomAll (wxCommandEvent &event) |
void | OnZoomAllX (wxCommandEvent &event) |
void | OnZoomAllY (wxCommandEvent &event) |
void | OnEnableCmdUpdate (wxUpdateUIEvent &event) |
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 TListeners * | GetListeners (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... | |
Public Member Functions inherited from IRegSettings | |
virtual | ~IRegSettings () |
Static Public Member Functions | |
static void | RegisterCommands (CUICommandRegistry &cmd_reg, wxFileArtProvider &provider) |
class CHitMatrixWidget More... | |
Static Public Member Functions inherited from CEventHandler | |
static bool | HandlePostRequest () |
static void | ClearPostQueue () |
erases all events from the queue More... | |
static void | DestroyPostQueue () |
Protected Types | |
typedef map< string, CRef< SHitColoringParams > > | TScoreToParamsMap |
Protected Member Functions | |
virtual void | x_CreatePane () |
factory method creating master pane, called form x_CreateControls() More... | |
virtual CGlWidgetPane * | x_GetPane () |
virtual void | x_SetPortLimits () |
updates model limits of the Master CGlPane More... | |
virtual void | x_ZoomToHits () |
virtual void | x_Update () |
Update handlers. More... | |
virtual void | x_UpdatePane () |
virtual void | x_ClearScoreToParamsMap () |
Protected Member Functions inherited from CGlWidgetBase | |
virtual bool | DoPopupMenu (wxMenu *menu, int x, int y) |
Override to record when (blocking) popup menu is active. More... | |
virtual void | x_CreateControls (void) |
creates Pane, Scrollbars and other child widgets, called from Create() More... | |
virtual void | x_RedrawControls (void) |
virtual void | x_SaveStates () |
virtual void | x_ZoomIn (int options) |
Zoom functions. More... | |
virtual void | x_ZoomOut (int options) |
virtual void | x_ZoomAll (int options) |
virtual void | x_UpdateOnZoom () |
virtual void | x_UpdateOnHScroll () |
virtual void | x_UpdateOnVScroll () |
virtual void | x_UpdateScrollbars () |
virtual void | x_OnScrollX (int pos) |
virtual void | x_OnScrollY (int pos) |
virtual void | x_ShowDecoratedPopupMenu (wxMenu *menu) |
Protected Member Functions inherited from CEventHandler | |
virtual const SEvtMap * | GetEventMap () const |
void | x_DeclareDead () |
Removes itself unavailable for async event delivery. More... | |
void | x_AddListenerToPool (CEventHandler *listener, int pool_name) |
Protected Attributes | |
CGlPane | m_Port |
CIRef< IHitMatrixDataSource > | m_DataSource |
unique_ptr< CHitMatrixPane > | m_MatrixPane |
TScoreToParamsMap | m_ScoreToParams |
Protected Attributes inherited from CGlWidgetBase | |
string | m_RegPath |
path to the widget's settings in GUI Registry More... | |
TModelPoint | m_PopupPoint |
Protected Attributes inherited from CEventHandler | |
TPools | m_Pools |
Additional Inherited Members | |
Static Protected Attributes inherited from CEventHandler | |
static const SEvtMap | sm_EvtMap |
class CHitMatrixWidget
Definition at line 73 of file hit_matrix_widget.hpp.
typedef list<CConstRef<objects::CSeq_id> > CHitMatrixWidget::TIdRefList |
Definition at line 78 of file hit_matrix_widget.hpp.
Definition at line 79 of file hit_matrix_widget.hpp.
|
protected |
Definition at line 154 of file hit_matrix_widget.hpp.
CHitMatrixWidget::CHitMatrixWidget | ( | wxWindow * | parent, |
wxWindowID | id = wxID_ANY , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize , |
||
long | style = wxTAB_TRAVERSAL |
||
) |
Definition at line 84 of file hit_matrix_widget.cpp.
References CGlPane::EnableZoom(), CGlPane::eOriginBottom, CGlPane::eOriginLeft, CGlPane::fAdjustAll, m_Port, CGlPane::SetAdjustmentPolicy(), CGlPane::SetMinScaleX(), and CGlPane::SetOriginType().
|
virtual |
Definition at line 97 of file hit_matrix_widget.cpp.
References x_ClearScoreToParamsMap().
|
virtual |
Definition at line 192 of file hit_matrix_widget.cpp.
References m_DataSource.
Referenced by OnEnableSavePdfCmdUpdate(), OnSavePdf(), CHitMatrixPane::Update(), and x_SetPortLimits().
void CHitMatrixWidget::GetObjectSelection | ( | TConstObjects & | objs | ) | const |
Definition at line 551 of file hit_matrix_widget.cpp.
References m_MatrixPane.
Referenced by CDotMatrixView::GetSelection().
|
virtual |
implement these 2 functions in derived classes
Implements CGlWidgetBase.
Definition at line 164 of file hit_matrix_widget.cpp.
References m_Port.
Referenced by CHitMatrixPane::GetViewportRect(), CDotMatrixView::GetVisibleRanges(), CHitMatrixPane::MZHH_GetScale(), CDotMatrixView::OnVisibleRangeChanged(), CHitMatrixPane::SetQueryVisibleRange(), and CHitMatrixPane::SetSubjectVisibleRange().
const CHitMatrixWidget::TRangeColl & CHitMatrixWidget::GetQueryRangeSelection | ( | ) | const |
Definition at line 527 of file hit_matrix_widget.cpp.
References CHitMatrixPane::eQuery, and m_MatrixPane.
Referenced by CDotMatrixView::GetSelection().
|
virtual |
Definition at line 186 of file hit_matrix_widget.cpp.
References m_MatrixPane.
Referenced by OnSetupGraphs(), OnUpdateDisableColoring(), OnUpdateZoomToSelectedHitElems(), and OnZoomToSelectedHitElems().
const CHitMatrixWidget::TRangeColl & CHitMatrixWidget::GetSubjectRangeSelection | ( | ) | const |
Definition at line 520 of file hit_matrix_widget.cpp.
References CHitMatrixPane::eSubject, and m_MatrixPane.
Referenced by CDotMatrixView::GetSelection().
void CHitMatrixWidget::OnChooseSeq | ( | wxCommandEvent & | event | ) |
Definition at line 292 of file hit_matrix_widget.cpp.
References IHitSeqId::Equals(), CwxChooseSeqDlg::GetParams(), CRef< C, Locker >::GetPointer(), CwxChooseSeqDlg::GetQueryId(), CwxChooseSeqDlg::GetSubjectId(), m_DataSource, m_MatrixPane, CwxChooseSeqDlg::SetSeqs(), wxT, and x_Update().
void CHitMatrixWidget::OnColorByScore | ( | wxCommandEvent & | event | ) |
Definition at line 337 of file hit_matrix_widget.cpp.
References CRef< C, Locker >::GetPointer(), CwxScoreDlg::GetSelectedName(), ITERATE, kColorByScore, kGradSteps, kMsgNoScores, m_DataSource, m_MatrixPane, SHitColoringParams::m_MaxGrad, SHitColoringParams::m_MinGrad, SHitColoringParams::m_ScoreName, m_ScoreToParams, SHitColoringParams::m_Steps, names, NON_CONST_ITERATE, NULL, compile_time_bits::range(), CwxScoreDlg::SetItems(), SHitColoringParams::SetValueRange(), map_checker< Container >::size(), and CGlWidgetBase::x_RedrawControls().
static void CHitMatrixWidget::OnContextMenu | ( | wxContextMenuEvent & | event | ) |
Definition at line 498 of file hit_matrix_widget.cpp.
References CUICommandRegistry::CreateMenu(), eHorz, eVert, and CUICommandRegistry::GetInstance().
void CHitMatrixWidget::OnDisableColoring | ( | wxCommandEvent & | event | ) |
Definition at line 390 of file hit_matrix_widget.cpp.
References CRef< C, Locker >::GetPointer(), m_DataSource, m_MatrixPane, NULL, and CGlWidgetBase::x_RedrawControls().
void CHitMatrixWidget::OnEnableSavePdfCmdUpdate | ( | wxUpdateUIEvent & | event | ) |
Definition at line 636 of file hit_matrix_widget.cpp.
References GetDS().
void CHitMatrixWidget::OnResetSelection | ( | wxCommandEvent & | event | ) |
Definition at line 449 of file hit_matrix_widget.cpp.
References ctll::empty(), SetQueryRangeSelection(), and SetSubjectRangeSelection().
void CHitMatrixWidget::OnSavePdf | ( | wxCommandEvent & | ) |
Definition at line 621 of file hit_matrix_widget.cpp.
References file_name, GetDS(), IHitMatrixDataSource::GetLabel(), IHitMatrixDataSource::GetQueryId(), IHitMatrixDataSource::GetSubjectId(), and m_MatrixPane.
void CHitMatrixWidget::OnSetEqualScale | ( | wxCommandEvent & | event | ) |
Definition at line 284 of file hit_matrix_widget.cpp.
References CGlPane::GetScaleX(), CGlPane::GetScaleY(), m_Port, min(), CGlPane::SetScale(), and CGlWidgetBase::x_UpdateOnZoom().
void CHitMatrixWidget::OnSetupGraphs | ( | wxCommandEvent & | event | ) |
Definition at line 399 of file hit_matrix_widget.cpp.
References CHitMatrixRenderer::eQuery, CHitMatrixRenderer::eSubject, CwxHistogramDlg::GetGraphColor(), CHitMatrixRenderer::GetGraphs(), CHitMatrixRenderer::GetGraphTypes(), GetRenderer(), CwxHistogramDlg::GetSelected(), i, CHitMatrixRenderer::Layout(), m_DataSource, m_Port, CHitMatrixRenderer::SetGraphColor(), CHitMatrixRenderer::SetGraphs(), CwxHistogramDlg::SetItems(), and CGlWidgetBase::x_RedrawControls().
void CHitMatrixWidget::OnUpdateDisableColoring | ( | wxUpdateUIEvent & | event | ) |
Definition at line 457 of file hit_matrix_widget.cpp.
References GetRenderer(), CHitMatrixRenderer::GetScoreName(), and m_MatrixPane.
void CHitMatrixWidget::OnUpdateZoomSelection | ( | wxUpdateUIEvent & | event | ) |
Definition at line 231 of file hit_matrix_widget.cpp.
References CHitMatrixPane::eQuery, CHitMatrixPane::eSubject, m_MatrixPane, and CRangeCollection< Position >::size().
void CHitMatrixWidget::OnUpdateZoomToSelectedHitElems | ( | wxUpdateUIEvent & | event | ) |
Definition at line 258 of file hit_matrix_widget.cpp.
References GetRenderer(), CHitMatrixRenderer::GetSelectedHitElemsRect(), and CGlRect< T >::IsEmpty().
void CHitMatrixWidget::OnZoomSelection | ( | wxCommandEvent & | event | ) |
Definition at line 207 of file hit_matrix_widget.cpp.
References CHitMatrixPane::eQuery, CHitMatrixPane::eSubject, CRangeCollection< Position >::GetFrom(), CRangeCollection< Position >::GetToOpen(), CGlPane::GetVisibleRect(), m_DataSource, m_MatrixPane, m_Port, CGlRect< T >::SetHorz(), CGlRect< T >::SetVert(), CRangeCollection< Position >::size(), CGlWidgetBase::x_UpdateOnZoom(), and CGlPane::ZoomRect().
void CHitMatrixWidget::OnZoomToHits | ( | wxCommandEvent & | event | ) |
Definition at line 198 of file hit_matrix_widget.cpp.
References m_DataSource, CGlWidgetBase::x_UpdateOnZoom(), and x_ZoomToHits().
void CHitMatrixWidget::OnZoomToSelectedHitElems | ( | wxCommandEvent & | event | ) |
Definition at line 242 of file hit_matrix_widget.cpp.
References GetRenderer(), CHitMatrixRenderer::GetSelectedHitElemsRect(), CGlRect< T >::Height(), CGlRect< T >::Inflate(), CGlRect< T >::IsEmpty(), m_Port, CGlRect< T >::Width(), CGlWidgetBase::x_UpdateOnZoom(), and CGlPane::ZoomRect().
|
static |
class CHitMatrixWidget
register custom commands
Definition at line 68 of file hit_matrix_widget.cpp.
References eCmdChooseSeq, eCmdColorByScore, eCmdDisableColoring, eCmdSetupGraphs, and CUICommandRegistry::RegisterCommand().
Referenced by CDotMatrixViewFactory::RegisterCommands().
void CHitMatrixWidget::ResetObjectSelection | ( | ) |
Definition at line 545 of file hit_matrix_widget.cpp.
References m_MatrixPane.
|
virtual |
Definition at line 176 of file hit_matrix_widget.cpp.
References m_DataSource, and x_Update().
Referenced by CHitMatrixDemoDlg::OnAccClick(), CHitMatrixDemoDlg::OnFileClick(), and CDotMatrixView::x_InitWidget().
Definition at line 557 of file hit_matrix_widget.cpp.
References m_MatrixPane.
Referenced by CDotMatrixView::x_OnSetSelection().
void CHitMatrixWidget::SetQueryRangeSelection | ( | const TRangeColl & | segs | ) |
Definition at line 539 of file hit_matrix_widget.cpp.
References CHitMatrixPane::eQuery, and m_MatrixPane.
Referenced by OnResetSelection(), and CDotMatrixView::x_OnSetSelection().
Definition at line 563 of file hit_matrix_widget.cpp.
References m_MatrixPane, and compile_time_bits::range().
Referenced by CDotMatrixView::OnVisibleRangeChanged().
|
virtual |
Definition at line 598 of file hit_matrix_widget.cpp.
References CGlPane::GetScaleX(), CGlPane::GetScaleY(), m_Port, CGlPane::SetScaleRefPoint(), and CGlWidgetBase::x_UpdateOnZoom().
Referenced by CHitMatrixPane::MZHH_SetScale().
void CHitMatrixWidget::SetSubjectRangeSelection | ( | const TRangeColl & | segs | ) |
Definition at line 533 of file hit_matrix_widget.cpp.
References CHitMatrixPane::eSubject, and m_MatrixPane.
Referenced by OnResetSelection(), and CDotMatrixView::x_OnSetSelection().
Definition at line 569 of file hit_matrix_widget.cpp.
References m_MatrixPane, and compile_time_bits::range().
Referenced by CDotMatrixView::OnVisibleRangeChanged().
|
protectedvirtual |
Definition at line 610 of file hit_matrix_widget.cpp.
References map_checker< Container >::clear(), and m_ScoreToParams.
Referenced by ~CHitMatrixWidget().
|
protectedvirtual |
factory method creating master pane, called form x_CreateControls()
Implements CGlWidgetBase.
Definition at line 126 of file hit_matrix_widget.cpp.
|
protectedvirtual |
Reimplemented from CGlWidgetBase.
Definition at line 132 of file hit_matrix_widget.cpp.
References m_MatrixPane.
|
protectedvirtual |
updates model limits of the Master CGlPane
Implements CGlWidgetBase.
Definition at line 138 of file hit_matrix_widget.cpp.
References CBioseq_Handle::GetBioseqLength(), GetDS(), CRange_Base::GetFrom(), IHitMatrixDataSource::GetQueryHandle(), IHitMatrixDataSource::GetQueryHitsRange(), IHitMatrixDataSource::GetSubjectHandle(), IHitMatrixDataSource::GetSubjectHitsRange(), COpenRange< Position >::GetToOpen(), m_Port, CGlRect< T >::SetHorz(), CGlPane::SetModelLimitsRect(), and CGlRect< T >::SetVert().
Referenced by x_Update().
|
protectedvirtual |
Update handlers.
Reimplemented from CGlWidgetBase.
Definition at line 575 of file hit_matrix_widget.cpp.
References m_DataSource, m_Port, CGlWidgetBase::x_RedrawControls(), x_SetPortLimits(), x_UpdatePane(), CGlWidgetBase::x_UpdateScrollbars(), x_ZoomToHits(), and CGlPane::ZoomAll().
Referenced by OnChooseSeq(), and SetDataSource().
|
protectedvirtual |
Definition at line 591 of file hit_matrix_widget.cpp.
References m_MatrixPane.
Referenced by x_Update().
|
protectedvirtual |
Definition at line 265 of file hit_matrix_widget.cpp.
References COpenRange< Position >::Empty(), CRange_Base::GetFrom(), CGlPane::GetModelLimitsRect(), COpenRange< Position >::GetToOpen(), m_DataSource, m_Port, CGlRect< T >::SetHorz(), CGlRect< T >::SetVert(), and CGlPane::ZoomRect().
Referenced by OnZoomToHits(), and x_Update().
|
protected |
Definition at line 151 of file hit_matrix_widget.hpp.
Referenced by GetDS(), OnChooseSeq(), OnColorByScore(), OnDisableColoring(), OnSetupGraphs(), OnZoomSelection(), OnZoomToHits(), SetDataSource(), x_Update(), and x_ZoomToHits().
|
protected |
Definition at line 152 of file hit_matrix_widget.hpp.
Referenced by GetObjectSelection(), GetQueryRangeSelection(), GetRenderer(), GetSubjectRangeSelection(), OnChooseSeq(), OnColorByScore(), OnDisableColoring(), OnSavePdf(), OnUpdateDisableColoring(), OnUpdateZoomSelection(), OnZoomSelection(), ResetObjectSelection(), SetObjectSelection(), SetQueryRangeSelection(), SetQueryVisibleRange(), SetSubjectRangeSelection(), SetSubjectVisibleRange(), x_GetPane(), and x_UpdatePane().
|
protected |
Definition at line 149 of file hit_matrix_widget.hpp.
Referenced by CHitMatrixWidget(), GetPort(), OnSetEqualScale(), OnSetupGraphs(), OnZoomSelection(), OnZoomToSelectedHitElems(), SetScaleX(), x_SetPortLimits(), x_Update(), and x_ZoomToHits().
|
protected |
Definition at line 155 of file hit_matrix_widget.hpp.
Referenced by OnColorByScore(), and x_ClearScoreToParamsMap().