NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CHitMatrixPane Class Reference

Search Toolkit Book for CHitMatrixPane

class CHitMatrixPane More...

#include <gui/widgets/hit_matrix/hit_matrix_pane.hpp>

+ Inheritance diagram for CHitMatrixPane:
+ Collaboration diagram for CHitMatrixPane:


struct  SGraphDescr

Public Types

enum  ESequence { eSubject , eQuery }
 identifies one of the two sequences in the pane More...
typedef CHitMatrixGraph::TElemGlyphSet TElemGlyphSet
typedef CLinearSelHandler::TRangeColl TRangeColl
- 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 ,
 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) ()
- Public Types inherited from IMouseZoomHandlerHost
enum  EScaleType { eMin , eCurrent , eMax }

Public Member Functions

 CHitMatrixPane (CHitMatrixWidget *parent)
virtual ~CHitMatrixPane ()
virtual CHitMatrixRendererGetRenderer ()
virtual TVPPoint GetPortSize (void) override
 returns size of the master pane in screen coordinates More...
void SetWidget (CHitMatrixWidget *parent)
virtual void Update (void) override
void SetQueryVisibleRange (const TSeqRange &range)
void SetSubjectVisibleRange (const TSeqRange &range)
const TRangeCollGetRangeSelection (ESequence seq) const
void SetRangeSelection (const TRangeColl &coll, ESequence seq)
void ResetObjectSelection ()
void GetObjectSelection (TConstObjects &objs) const
void SetObjectSelection (const vector< const objects::CSeq_align * > sel_aligns)
CConstRef< objects::CSeq_align_set > GetSelectedHits () const
void ProjectSelectedElems (TRangeColl &coll, ESequence seq) const
IMouseZoomHandlerHost implementation
virtual TModelUnit MZHH_GetScale (EScaleType type) override
 IMouseZoomHandlerHost implementation. More...
virtual void MZHH_SetScale (TModelUnit scale, const TModelPoint &point) override
virtual void MZHH_ZoomRect (const TModelRect &rc) override
virtual void MZHH_ZoomPoint (const TModelPoint &point, TModelUnit factor) override
virtual void MZHH_Scroll (TModelUnit d_x, TModelUnit d_y) override
virtual void MZHH_EndOp () override
virtual TVPUnit MZHH_GetVPPosByY (int y) const override
 converts window coord to Viewport coord More...
ITooltipClient interface implementation
virtual bool TC_NeedTooltip (const wxPoint &) override
 ITooltip Implementation TC_NeedTooltip() and TC_GetTooltip() is everything needed to show toolitps in "active" mode. More...
virtual string TC_GetTooltip (const wxRect &) override
 Returns tooltip string and coordinates for area tootlip associated with. More...
IHitMatrixGraphHost interface implementation
virtual void HMGH_OnChanged (void) override
virtual TVPUnit HMGH_GetVPPosByY (int y) const override
ISelHandlerHost implementation
virtual void SHH_OnChanged () override
 ISelHandlerHost implementation. More...
virtual TModelUnit SHH_GetModelByWindow (int z, EOrientation orient) override
virtual TVPUnit SHH_GetWindowByModel (TModelUnit z, EOrientation orient) override
Graphs management
void OnSize (wxSizeEvent &event)
IVectorGraphicsRenderer implementations
virtual const TVPRectGetViewportRect () const override
virtual void RenderVectorGraphics (int vp_width, int vp_height) override
virtual void UpdateVectorLayout () override
virtual void AddTitle (bool b) override
- Public Member Functions inherited from CGlWidgetPane
 CGlWidgetPane (wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0)
virtual ~CGlWidgetPane ()
void SetPopupMenuDisplayed (bool b)
bool GetPopupMenuDisplayed () const
void DlgOverlayFix ()
void CheckOverlayTimer ()
virtual void GHH_Redraw ()
 redraws the Host and the handler More...
virtual void GHH_SetCursor (const wxCursor &cursor)
 changes the cursor in the hosting window More...
virtual void GHH_CaptureMouse ()
 captures mouse events in the hosting window for D&D More...
virtual void GHH_ReleaseMouse ()
 releases captured mouse More...
virtual wxWindow * TC_GetWindow ()
 Returns pointer to the widget hosting ITooltipClient. More...
virtual wxWindow * TTHH_GetWindow ()
 Return the pointer to the underlying window. More...
virtual bool TTHH_PopupMenuDisplayed ()
 Return true if underlying window is currently displaying a popup menu. More...
void OnEnterWindow (wxMouseEvent &event)
void OnTimer (wxTimerEvent &event)
void OnMouseDown (wxMouseEvent &event)
void OnMouseUp (wxMouseEvent &event)
void OnMotion (wxMouseEvent &event)
void OnMouseWheel (wxMouseEvent &event)
void OnMouseCaptureLost (wxMouseCaptureLostEvent &event)
void OnLeaveWindow (wxMouseEvent &event)
void OnKeyEvent (wxKeyEvent &event)
void OnSetFocus (wxFocusEvent &event)
void OnKillFocus (wxFocusEvent &event)
void OnSize (wxSizeEvent &event)
void OnCmdEvent (wxCommandEvent &event)
void OnTipRemoved (wxCommandEvent &event)
- Public Member Functions inherited from CGLCanvas
 CGLCanvas (wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0)
virtual ~CGLCanvas ()
void OnPaint (wxPaintEvent &event)
void DoNotUpdate ()
void SetClearColor (float r, float g, float b, float a)
- Public Member Functions inherited from IGenericHandlerHost
virtual ~IGenericHandlerHost ()
- Public Member Functions inherited from ITooltipHandlerHost
virtual ~ITooltipHandlerHost ()
- Public Member Functions inherited from IStickyTooltipHandlerHost
 IStickyTooltipHandlerHost ()
virtual ~IStickyTooltipHandlerHost ()
void TTHH_Init ()
 Init calls virtual functions so can't be called from ctor. More...
virtual string TTHH_NeedTooltip (const wxPoint &)
 Return id of the underlying element to dispaly a tooltip, otherwise "". More...
virtual CTooltipInfo TTHH_GetTooltip (const wxRect &)
 Return the contents to be displayed in the tool tip. More...
virtual bool TTHH_ProcessURL (const wxString &)
 Return true if the specified URL has been processed. Used for custom commands. More...
std::vector< TipLocationGetDisplayedTips ()
 Return id and position information for currently displayed tips. More...
void SetServiceLocator (IServiceLocator *s)
 Set service locator so we can find other views and adjust z order. More...
- 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...
- Public Member Functions inherited from IMouseZoomHandlerHost
virtual ~IMouseZoomHandlerHost ()
- Public Member Functions inherited from IHitMatrixGraphHost
virtual ~IHitMatrixGraphHost ()
- Public Member Functions inherited from ISelHandlerHost
virtual ~ISelHandlerHost ()
- Public Member Functions inherited from IVectorGraphicsRenderer
virtual ~IVectorGraphicsRenderer ()

Protected Member Functions

virtual void x_Render (void) override
 CGlWidgetPane overridables. More...
void x_RenderContent (void)
void x_RenderAxisAndGrid (CGlPane &gr_pane)
void x_RenderContainers ()
void x_RenderSelHandler ()
void x_RenderMouseZoomHandler (CGlPane &pane)
void x_RenderSelHandler (bool b_horz, CGlPane &pane, CLinearSelHandler::ERenderingOption option)
void x_AdjsutToMasterPane (CGlPane &pane, bool b_model_x, bool b_model_y)
 adjusts limits and visible rect of the given pane to the master pane More...
virtual int x_GetAreaByVPPos (TVPUnit vp_x, TVPUnit vp_y) override
CHitMatrixWidgetx_GetParent ()
const CHitMatrixWidgetx_GetParent () const
- Protected Member Functions inherited from CGlWidgetPane
virtual int x_GetAreaByWindowPos (const wxPoint &pos)
virtual bool x_GrabFocus ()
bool x_RegisterHandler (IGlEventHandler *handler, int area, CGlPane *pane, int index=-1)
bool x_UnregisterHandler (IGlEventHandler *handler)
void x_SetCurrHandler (SHandlerRec *rec)
bool x_Handlers_handle (wxEvent &event, int area, bool ignore_curr=true)
bool x_DispatchEventToHandler (wxEvent &event, SHandlerRec *rec)
void x_HandleAccels (wxKeyEvent &event)
- Protected Member Functions inherited from CGLCanvas
void x_SetupGLContext ()
void x_CheckGlVersion ()
const wxGLAttributes & x_GetAttribList () const
 Not having all programs share the same window attributes has caused crashing on Linux, so each window will use these attributes (this should be the superset of attributes needed by program windows). More...
- Protected Member Functions inherited from IStickyTooltipHandlerHost
void x_SetCurrentTips (std::vector< TipLocation > &tips)
 Sets information on current tips that can be queried by the user. More...
wxFrame * GetUnderlyingFrame ()
 Return the undering wxFrame parent for a wxWindow object. More...
bool IsFloatingWindow ()
 Return true if the hosting window is ultimately enclosed in a CFloatingFrame class (meaning its in a floating window) More...
void RaiseOverlappingWindows (wxRect r)
 If the tip window is docked in the main window (not a CFloatingFrame) this raises all the CFloatingFrame windows to make sure none of them are overlapped by tooltips. More...
bool IsDragging ()
 Retruns true if Any window is currently being dragged. More...
void InitWindowGroup (int dock_count=0)
 Mac only - create or return window group for this window. More...
- 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

CHitMatrixRenderer m_Renderer
CMouseZoomHandler m_MouseZoomHandler
CLinearSelHandler m_HorzSelHandler
CLinearSelHandler m_VertSelHandler
CTooltipHandler m_TooltipHandler
int m_TooltipArea
- Protected Attributes inherited from CGlWidgetPane
THandlerRecList m_lsHandlerRecs
 list of records for registered handlers More...
 pointer to record for last active handler More...
bool m_PopupMenuDisplayed
 Some handlers may need to know if popup (right click) menu is active. More...
CStopWatch m_EnterTimer
 Windows vista bug screws up opengl after dlgs/popups displayed over window. More...
wxTimer m_GLOverlapFixTimer
 Need associated timer since some popups take a little time to clear. More...
bool m_PseudoSized
 For windows (e.g. tree) that do not want to layout/update for the fake size event. More...
- Protected Attributes inherited from CGLCanvas
bool m_DoNotUpdate
float m_ClearColor [4]
- Protected Attributes inherited from IStickyTooltipHandlerHost
 Needed to find other views. More...
std::vector< TipLocationm_CurrentTips
- Protected Attributes inherited from CEventHandler
TPools m_Pools

Additional Inherited Members

- 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 inherited from CGlWidgetPane
typedef list< SHandlerRecTHandlerRecList
- Static Protected Attributes inherited from CEventHandler
static const SEvtMap sm_EvtMap

Detailed Description

class CHitMatrixPane

Definition at line 69 of file hit_matrix_pane.hpp.

Member Typedef Documentation

◆ TElemGlyphSet

Definition at line 79 of file hit_matrix_pane.hpp.

◆ TRangeColl

Definition at line 80 of file hit_matrix_pane.hpp.

Member Enumeration Documentation

◆ ESequence

identifies one of the two sequences in the pane


Definition at line 83 of file hit_matrix_pane.hpp.

Constructor & Destructor Documentation

◆ CHitMatrixPane()

CHitMatrixPane::CHitMatrixPane ( CHitMatrixWidget parent)

◆ ~CHitMatrixPane()

CHitMatrixPane::~CHitMatrixPane ( )

Definition at line 94 of file hit_matrix_pane.cpp.

References CEventHandler::RemoveListener(), and x_GetParent().

Member Function Documentation

◆ AddTitle()

void CHitMatrixPane::AddTitle ( bool  b)

Implements IVectorGraphicsRenderer.

Definition at line 253 of file hit_matrix_pane.cpp.

◆ GetObjectSelection()

void CHitMatrixPane::GetObjectSelection ( TConstObjects objs) const

◆ GetPortSize()

TVPPoint CHitMatrixPane::GetPortSize ( void  )

returns size of the master pane in screen coordinates

Implements CGlWidgetPane.

Definition at line 102 of file hit_matrix_pane.cpp.

References CHitMatrixRenderer::fMatrixArea, CHitMatrixRenderer::GetRect(), CGlRect< T >::Height(), m_Renderer, and CGlRect< T >::Width().

◆ GetRangeSelection()

const CHitMatrixPane::TRangeColl & CHitMatrixPane::GetRangeSelection ( ESequence  seq) const

◆ GetRenderer()

virtual CHitMatrixRenderer& CHitMatrixPane::GetRenderer ( )

Definition at line 91 of file hit_matrix_pane.hpp.

References m_Renderer.

Referenced by x_RenderContent().

◆ GetSelectedHits()

CConstRef<objects::CSeq_align_set> CHitMatrixPane::GetSelectedHits ( ) const

◆ GetViewportRect()

const TVPRect & CHitMatrixPane::GetViewportRect ( ) const

◆ HMGH_GetVPPosByY()

TVPUnit CHitMatrixPane::HMGH_GetVPPosByY ( int  y) const

Implements IHitMatrixGraphHost.

Definition at line 416 of file hit_matrix_pane.cpp.

◆ HMGH_OnChanged()

void CHitMatrixPane::HMGH_OnChanged ( void  )

◆ MZHH_EndOp()

void CHitMatrixPane::MZHH_EndOp ( )

◆ MZHH_GetScale()

TModelUnit CHitMatrixPane::MZHH_GetScale ( EScaleType  type)

◆ MZHH_GetVPPosByY()

TVPUnit CHitMatrixPane::MZHH_GetVPPosByY ( int  y) const

converts window coord to Viewport coord

Implements IMouseZoomHandlerHost.

Definition at line 401 of file hit_matrix_pane.cpp.

◆ MZHH_Scroll()

void CHitMatrixPane::MZHH_Scroll ( TModelUnit  d_x,
TModelUnit  d_y 

◆ MZHH_SetScale()

void CHitMatrixPane::MZHH_SetScale ( TModelUnit  scale,
const TModelPoint point 

Implements IMouseZoomHandlerHost.

Definition at line 361 of file hit_matrix_pane.cpp.

References CHitMatrixWidget::SetScaleX(), and x_GetParent().

◆ MZHH_ZoomPoint()

void CHitMatrixPane::MZHH_ZoomPoint ( const TModelPoint point,
TModelUnit  factor 

◆ MZHH_ZoomRect()

void CHitMatrixPane::MZHH_ZoomRect ( const TModelRect rc)

◆ OnSize()

void CHitMatrixPane::OnSize ( wxSizeEvent &  event)

◆ ProjectSelectedElems()

void CHitMatrixPane::ProjectSelectedElems ( TRangeColl coll,
ESequence  seq 
) const

◆ RenderVectorGraphics()

void CHitMatrixPane::RenderVectorGraphics ( int  vp_width,
int  vp_height 

◆ ResetObjectSelection()

void CHitMatrixPane::ResetObjectSelection ( )

◆ SetObjectSelection()

void CHitMatrixPane::SetObjectSelection ( const vector< const objects::CSeq_align * >  sel_aligns)

◆ SetQueryVisibleRange()

void CHitMatrixPane::SetQueryVisibleRange ( const TSeqRange range)

◆ SetRangeSelection()

void CHitMatrixPane::SetRangeSelection ( const TRangeColl coll,
ESequence  seq 

◆ SetSubjectVisibleRange()

void CHitMatrixPane::SetSubjectVisibleRange ( const TSeqRange range)

◆ SetWidget()

void CHitMatrixPane::SetWidget ( CHitMatrixWidget parent)

◆ SHH_GetModelByWindow()

TModelUnit CHitMatrixPane::SHH_GetModelByWindow ( int  z,
EOrientation  orient 

◆ SHH_GetWindowByModel()

TVPUnit CHitMatrixPane::SHH_GetWindowByModel ( TModelUnit  z,
EOrientation  orient 

◆ SHH_OnChanged()

void CHitMatrixPane::SHH_OnChanged ( )

◆ TC_GetTooltip()

string CHitMatrixPane::TC_GetTooltip ( const wxRect &  rect)

Returns tooltip string and coordinates for area tootlip associated with.

Client may choose not modify x, y, w, z, in that case tooltip will be associated with current mouse position.

Reimplemented from CGlWidgetPane.

Definition at line 478 of file hit_matrix_pane.cpp.

References CHitMatrixRenderer::GetTooltip(), m_Renderer, and m_TooltipArea.

◆ TC_NeedTooltip()

bool CHitMatrixPane::TC_NeedTooltip ( const wxPoint &  pt)

ITooltip Implementation TC_NeedTooltip() and TC_GetTooltip() is everything needed to show toolitps in "active" mode.

Reimplemented from CGlWidgetPane.

Definition at line 469 of file hit_matrix_pane.cpp.

References m_Renderer, m_TooltipArea, CHitMatrixRenderer::NeedTooltip(), and CGlWidgetPane::x_GetAreaByWindowPos().

◆ Update()

void CHitMatrixPane::Update ( void  )

◆ UpdateVectorLayout()

void CHitMatrixPane::UpdateVectorLayout ( )

Implements IVectorGraphicsRenderer.

Definition at line 249 of file hit_matrix_pane.cpp.

◆ x_AdjsutToMasterPane()

void CHitMatrixPane::x_AdjsutToMasterPane ( CGlPane pane,
bool  b_model_x,
bool  b_model_y 

adjusts limits and visible rect of the given pane to the master pane

◆ x_GetAreaByVPPos()

int CHitMatrixPane::x_GetAreaByVPPos ( TVPUnit  vp_x,
TVPUnit  vp_y 

Reimplemented from CGlWidgetPane.

Definition at line 276 of file hit_matrix_pane.cpp.

References CHitMatrixRenderer::GetAreaByVPPos(), and m_Renderer.

◆ x_GetParent() [1/2]

CHitMatrixWidget* CHitMatrixPane::x_GetParent ( )

◆ x_GetParent() [2/2]

const CHitMatrixWidget* CHitMatrixPane::x_GetParent ( ) const

Definition at line 198 of file hit_matrix_pane.hpp.

◆ x_Render()

void CHitMatrixPane::x_Render ( void  )

CGlWidgetPane overridables.

Reimplemented from CGLCanvas.

Definition at line 147 of file hit_matrix_pane.cpp.

References x_RenderContent().

◆ x_RenderAxisAndGrid()

void CHitMatrixPane::x_RenderAxisAndGrid ( CGlPane gr_pane)

◆ x_RenderContainers()

void CHitMatrixPane::x_RenderContainers ( )

◆ x_RenderContent()

void CHitMatrixPane::x_RenderContent ( void  )

◆ x_RenderMouseZoomHandler()

void CHitMatrixPane::x_RenderMouseZoomHandler ( CGlPane pane)

◆ x_RenderSelHandler() [1/2]

void CHitMatrixPane::x_RenderSelHandler ( )

◆ x_RenderSelHandler() [2/2]

void CHitMatrixPane::x_RenderSelHandler ( bool  b_horz,
CGlPane pane,
CLinearSelHandler::ERenderingOption  option 

Member Data Documentation

◆ m_HorzSelHandler

CLinearSelHandler CHitMatrixPane::m_HorzSelHandler

Definition at line 207 of file hit_matrix_pane.hpp.

Referenced by GetRangeSelection(), SetRangeSelection(), and x_RenderSelHandler().

◆ m_MouseZoomHandler

CMouseZoomHandler CHitMatrixPane::m_MouseZoomHandler

Definition at line 206 of file hit_matrix_pane.hpp.

Referenced by x_RenderMouseZoomHandler().

◆ m_Parent

CHitMatrixWidget* CHitMatrixPane::m_Parent

Definition at line 201 of file hit_matrix_pane.hpp.

◆ m_Renderer

CHitMatrixRenderer CHitMatrixPane::m_Renderer

◆ m_TooltipArea

int CHitMatrixPane::m_TooltipArea

Definition at line 211 of file hit_matrix_pane.hpp.

Referenced by TC_GetTooltip(), and TC_NeedTooltip().

◆ m_TooltipHandler

CTooltipHandler CHitMatrixPane::m_TooltipHandler

Definition at line 209 of file hit_matrix_pane.hpp.

◆ m_VertSelHandler

CLinearSelHandler CHitMatrixPane::m_VertSelHandler

Definition at line 208 of file hit_matrix_pane.hpp.

Referenced by GetRangeSelection(), SetRangeSelection(), and x_RenderSelHandler().

The documentation for this class was generated from the following files:
Modified on Wed Apr 17 13:08:58 2024 by rev. 669887