NCBI C++ ToolKit
|
Search Toolkit Book for CCrossAlnWidget
#include <gui/widgets/aln_crossaln/cross_aln_widget.hpp>
Public Types | |
typedef CRangeCollection< TSeqPos > | 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 | |
CCrossAlnWidget (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL) | |
virtual | ~CCrossAlnWidget () |
virtual CGlPane & | GetPort () |
implement these 2 functions in derived classes More... | |
virtual const CGlPane & | GetPort () const |
void | SetDataSource (ICrossAlnDataSource *ds) |
void | OnChooseSeq (wxCommandEvent &event) |
void | OnColorByScore (wxCommandEvent &event) |
void | OnColorBySegments (wxCommandEvent &event) |
void | Update () |
void | OnSize (wxSizeEvent &event) |
void | OnScrollQ (wxScrollEvent &event) |
void | OnScrollS (wxScrollEvent &event) |
void | OnContextMenu (wxContextMenuEvent &event) |
void | OnZoomAll (wxCommandEvent &event) |
void | OnZoomIn (wxCommandEvent &event) |
void | OnZoomOut (wxCommandEvent &event) |
void | OnZoomToSeq (wxCommandEvent &event) |
void | OnZoomAll_Q (wxCommandEvent &event) |
void | OnZoomIn_Q (wxCommandEvent &event) |
void | OnZoomOut_Q (wxCommandEvent &event) |
void | OnZoomToSeq_Q (wxCommandEvent &event) |
void | OnZoomAll_S (wxCommandEvent &event) |
void | OnZoomIn_S (wxCommandEvent &event) |
void | OnZoomOut_S (wxCommandEvent &event) |
void | OnZoomToSeq_S (wxCommandEvent &event) |
void | OnZoomSelection (wxCommandEvent &event) |
void | OnUpdateZoomSelection (wxUpdateUIEvent &event) |
void | UpdateScrollbars () |
Visible Range API | |
TSeqRange | GetSubjectVisibleRange () const |
void | SetSubjectVisibleRange (const TSeqRange &range) |
TSeqRange | GetQueryVisibleRange () const |
void | SetQueryVisibleRange (const TSeqRange &range) |
Selection API | |
const TRangeColl & | GetSubjectRangeSelection () const |
const TRangeColl & | GetQueryRangeSelection () const |
void | SetSubjectRangeSelection (const TRangeColl &coll) |
void | SetQueryRangeSelection (const TRangeColl &coll) |
void | ResetObjectSelection () |
void | GetObjectSelection (TConstObjects &objs) const |
void | SetObjectSelection (const vector< const objects::CSeq_align * > sel_aligns) |
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) |
Static Public Member Functions inherited from CEventHandler | |
static bool | HandlePostRequest () |
static void | ClearPostQueue () |
erases all events from the queue More... | |
static void | DestroyPostQueue () |
Protected Member Functions | |
virtual void | x_CreateControls () |
creates Pane, Scrollbars and other child widgets, called from Create() More... | |
virtual void | x_CreatePane () |
factory method creating master pane, called form x_CreateControls() More... | |
virtual CGlWidgetPane * | x_GetPane () |
virtual void | x_Update () |
Update handlers. More... | |
virtual void | x_UpdatePane () |
virtual void | x_SetPortLimits () |
updates model limits of the Master CGlPane More... | |
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_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 | |
unique_ptr< CCrossAlnPane > | m_CrossPane |
CGlPane | m_Port |
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 |
Definition at line 84 of file cross_aln_widget.hpp.
Definition at line 90 of file cross_aln_widget.hpp.
static CCrossAlnWidget::CCrossAlnWidget | ( | wxWindow * | parent, |
wxWindowID | id = wxID_ANY , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize , |
||
long | style = wxTAB_TRAVERSAL |
||
) |
Definition at line 126 of file cross_aln_widget.cpp.
|
virtual |
Definition at line 133 of file cross_aln_widget.cpp.
void CCrossAlnWidget::GetObjectSelection | ( | TConstObjects & | objs | ) | const |
Definition at line 555 of file cross_aln_widget.cpp.
References m_CrossPane.
Referenced by CCrossAlignView::GetSelection().
|
virtual |
implement these 2 functions in derived classes
Implements CGlWidgetBase.
Definition at line 182 of file cross_aln_widget.cpp.
References m_Port.
Referenced by CCrossAlignView::GetVisibleRanges(), and CCrossAlignView::OnVisibleRangeChanged().
const CCrossAlnWidget::TRangeColl & CCrossAlnWidget::GetQueryRangeSelection | ( | ) | const |
Definition at line 531 of file cross_aln_widget.cpp.
References m_CrossPane.
Referenced by CCrossAlignView::GetSelection().
TSeqRange CCrossAlnWidget::GetQueryVisibleRange | ( | ) | const |
Definition at line 507 of file cross_aln_widget.cpp.
References CGlPane::GetVisibleRect(), CGlRect< T >::Left(), m_CrossPane, compile_time_bits::range(), and CGlRect< T >::Right().
const CCrossAlnWidget::TRangeColl & CCrossAlnWidget::GetSubjectRangeSelection | ( | ) | const |
Definition at line 524 of file cross_aln_widget.cpp.
References m_CrossPane.
Referenced by CCrossAlignView::GetSelection().
TSeqRange CCrossAlnWidget::GetSubjectVisibleRange | ( | ) | const |
Definition at line 491 of file cross_aln_widget.cpp.
References CGlPane::GetVisibleRect(), CGlRect< T >::Left(), m_CrossPane, compile_time_bits::range(), and CGlRect< T >::Right().
void CCrossAlnWidget::OnChooseSeq | ( | wxCommandEvent & | event | ) |
Definition at line 234 of file cross_aln_widget.cpp.
References IHitSeqId::Equals(), CwxChooseSeqDlg::GetParams(), CRef< C, Locker >::GetPointer(), CwxChooseSeqDlg::GetQueryId(), CwxChooseSeqDlg::GetSubjectId(), m_CrossPane, CwxChooseSeqDlg::SetSeqs(), Update(), and wxT.
void CCrossAlnWidget::OnColorByScore | ( | wxCommandEvent & | event | ) |
Definition at line 281 of file cross_aln_widget.cpp.
void CCrossAlnWidget::OnColorBySegments | ( | wxCommandEvent & | event | ) |
Definition at line 275 of file cross_aln_widget.cpp.
References m_CrossPane.
void CCrossAlnWidget::OnContextMenu | ( | wxContextMenuEvent & | event | ) |
Definition at line 575 of file cross_aln_widget.cpp.
References CUICommandRegistry::CreateMenu(), and CUICommandRegistry::GetInstance().
void CCrossAlnWidget::OnScrollQ | ( | wxScrollEvent & | event | ) |
Definition at line 443 of file cross_aln_widget.cpp.
References m_CrossPane, and UpdateScrollbars().
void CCrossAlnWidget::OnScrollS | ( | wxScrollEvent & | event | ) |
Definition at line 453 of file cross_aln_widget.cpp.
References m_CrossPane, and UpdateScrollbars().
void CCrossAlnWidget::OnSize | ( | wxSizeEvent & | event | ) |
Definition at line 378 of file cross_aln_widget.cpp.
References m_CrossPane, CGlWidgetBase::OnSize(), UpdateScrollbars(), and x_GetPane().
void CCrossAlnWidget::OnUpdateZoomSelection | ( | wxUpdateUIEvent & | event | ) |
Definition at line 210 of file cross_aln_widget.cpp.
References m_CrossPane, and CRangeCollection< Position >::size().
void CCrossAlnWidget::OnZoomAll | ( | wxCommandEvent & | event | ) |
Definition at line 320 of file cross_aln_widget.cpp.
References m_CrossPane.
void CCrossAlnWidget::OnZoomAll_Q | ( | wxCommandEvent & | event | ) |
Definition at line 339 of file cross_aln_widget.cpp.
References m_CrossPane.
void CCrossAlnWidget::OnZoomAll_S | ( | wxCommandEvent & | event | ) |
Definition at line 358 of file cross_aln_widget.cpp.
References m_CrossPane.
void CCrossAlnWidget::OnZoomIn | ( | wxCommandEvent & | event | ) |
Definition at line 326 of file cross_aln_widget.cpp.
References m_CrossPane.
void CCrossAlnWidget::OnZoomIn_Q | ( | wxCommandEvent & | event | ) |
Definition at line 345 of file cross_aln_widget.cpp.
References m_CrossPane.
void CCrossAlnWidget::OnZoomIn_S | ( | wxCommandEvent & | event | ) |
Definition at line 364 of file cross_aln_widget.cpp.
References m_CrossPane.
void CCrossAlnWidget::OnZoomOut | ( | wxCommandEvent & | event | ) |
Definition at line 332 of file cross_aln_widget.cpp.
References m_CrossPane.
void CCrossAlnWidget::OnZoomOut_Q | ( | wxCommandEvent & | event | ) |
Definition at line 351 of file cross_aln_widget.cpp.
References m_CrossPane.
void CCrossAlnWidget::OnZoomOut_S | ( | wxCommandEvent & | event | ) |
Definition at line 370 of file cross_aln_widget.cpp.
References m_CrossPane.
void CCrossAlnWidget::OnZoomSelection | ( | wxCommandEvent & | event | ) |
Definition at line 220 of file cross_aln_widget.cpp.
References CRangeCollection< Position >::GetFrom(), CRangeCollection< Position >::GetToOpen(), m_CrossPane, and CRangeCollection< Position >::size().
void CCrossAlnWidget::OnZoomToSeq | ( | wxCommandEvent & | event | ) |
Definition at line 464 of file cross_aln_widget.cpp.
References m_CrossPane.
void CCrossAlnWidget::OnZoomToSeq_Q | ( | wxCommandEvent & | event | ) |
Definition at line 471 of file cross_aln_widget.cpp.
References m_CrossPane.
void CCrossAlnWidget::OnZoomToSeq_S | ( | wxCommandEvent & | event | ) |
Definition at line 477 of file cross_aln_widget.cpp.
References m_CrossPane.
|
static |
Definition at line 50 of file cross_aln_widget.cpp.
References eCmdChooseSeq, eCmdZoomAllQuery, eCmdZoomAllSubject, eCmdZoomInQuery, eCmdZoomInSubject, eCmdZoomOutQuery, eCmdZoomOutSubject, eCmdZoomSeqQuery, eCmdZoomSeqSubject, and CUICommandRegistry::RegisterCommand().
Referenced by CCrossAlnDemoDlg::Init(), and CCrossAlignViewFactory::RegisterCommands().
void CCrossAlnWidget::ResetObjectSelection | ( | ) |
Definition at line 549 of file cross_aln_widget.cpp.
References m_CrossPane.
void CCrossAlnWidget::SetDataSource | ( | ICrossAlnDataSource * | ds | ) |
Definition at line 483 of file cross_aln_widget.cpp.
References m_CrossPane, and x_Update().
Referenced by CCrossAlnDemoDlg::OnAccClick(), CCrossAlnDemoDlg::OnFileClick(), and CCrossAlignView::x_PostAttachToProject().
Definition at line 561 of file cross_aln_widget.cpp.
References m_CrossPane.
Referenced by CCrossAlignView::x_OnSetSelection().
void CCrossAlnWidget::SetQueryRangeSelection | ( | const TRangeColl & | coll | ) |
Definition at line 543 of file cross_aln_widget.cpp.
References m_CrossPane.
Referenced by CCrossAlignView::x_OnSetSelection().
Definition at line 517 of file cross_aln_widget.cpp.
References m_CrossPane, and compile_time_bits::range().
Referenced by CCrossAlignView::OnVisibleRangeChanged().
void CCrossAlnWidget::SetSubjectRangeSelection | ( | const TRangeColl & | coll | ) |
Definition at line 537 of file cross_aln_widget.cpp.
References m_CrossPane.
Referenced by CCrossAlignView::x_OnSetSelection().
Definition at line 501 of file cross_aln_widget.cpp.
References m_CrossPane, and compile_time_bits::range().
Referenced by CCrossAlignView::OnVisibleRangeChanged().
void CCrossAlnWidget::Update | ( | void | ) |
Definition at line 567 of file cross_aln_widget.cpp.
References m_CrossPane, and UpdateScrollbars().
Referenced by OnChooseSeq().
void CCrossAlnWidget::UpdateScrollbars | ( | ) |
Definition at line 407 of file cross_aln_widget.cpp.
References ID_SCROLLBAR_Q, ID_SCROLLBAR_S, kPageInc, kScrollRange, CGlRect< T >::Left(), m_CrossPane, CNormalizer::RealToInt(), CGlRect< T >::Right(), CNormalizer::SizeToInt(), and CGlRect< T >::Width().
Referenced by OnScrollQ(), OnScrollS(), OnSize(), Update(), x_Update(), and CCrossAlnPane::x_UpdateOnZoom().
|
protectedvirtual |
creates Pane, Scrollbars and other child widgets, called from Create()
Reimplemented from CGlWidgetBase.
Definition at line 138 of file cross_aln_widget.cpp.
References _ASSERT, ID_SCROLLBAR_Q, ID_SCROLLBAR_S, x_CreatePane(), and x_GetPane().
|
protectedvirtual |
factory method creating master pane, called form x_CreateControls()
Implements CGlWidgetBase.
Definition at line 165 of file cross_aln_widget.cpp.
References m_CrossPane.
Referenced by x_CreateControls().
|
protectedvirtual |
Reimplemented from CGlWidgetBase.
Definition at line 171 of file cross_aln_widget.cpp.
References m_CrossPane.
Referenced by OnSize(), and x_CreateControls().
|
protectedvirtual |
updates model limits of the Master CGlPane
Implements CGlWidgetBase.
Definition at line 177 of file cross_aln_widget.cpp.
|
protectedvirtual |
Update handlers.
Reimplemented from CGlWidgetBase.
Definition at line 194 of file cross_aln_widget.cpp.
References m_CrossPane, UpdateScrollbars(), and CGlWidgetBase::x_RedrawControls().
Referenced by SetDataSource().
|
protectedvirtual |
Definition at line 203 of file cross_aln_widget.cpp.
|
protected |
Definition at line 178 of file cross_aln_widget.hpp.
Referenced by GetObjectSelection(), GetQueryRangeSelection(), GetQueryVisibleRange(), GetSubjectRangeSelection(), GetSubjectVisibleRange(), OnChooseSeq(), OnColorBySegments(), OnScrollQ(), OnScrollS(), OnSize(), OnUpdateZoomSelection(), OnZoomAll(), OnZoomAll_Q(), OnZoomAll_S(), OnZoomIn(), OnZoomIn_Q(), OnZoomIn_S(), OnZoomOut(), OnZoomOut_Q(), OnZoomOut_S(), OnZoomSelection(), OnZoomToSeq(), OnZoomToSeq_Q(), OnZoomToSeq_S(), ResetObjectSelection(), SetDataSource(), SetObjectSelection(), SetQueryRangeSelection(), SetQueryVisibleRange(), SetSubjectRangeSelection(), SetSubjectVisibleRange(), Update(), UpdateScrollbars(), x_CreatePane(), x_GetPane(), and x_Update().
|
protected |
Definition at line 179 of file cross_aln_widget.hpp.
Referenced by GetPort().