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

Search Toolkit Book for CAlignMarkHandler

CAlignMarkHandler manages handling and editing of marks on alignments. More...

#include <gui/widgets/aln_multiple/align_mark_handler.hpp>

+ Inheritance diagram for CAlignMarkHandler:
+ Collaboration diagram for CAlignMarkHandler:


struct  SMarkDelta
 helper class representing range being edited More...

Public Types

typedef IAlnExplorer::TNumrow TNumrow
typedef IAlignMarkHandlerHost::TRangeColl TRangeColl
typedef IAlignMarkHandlerHost::TSelListModel TSelListModel
typedef map< TNumrow, TRangeCollTRowToMarkMap

Public Member Functions

 CAlignMarkHandler ()
void SetHost (IAlignMarkHandlerHost *pHost)
IGenericHandlerHostGetGenericHost ()
virtual void SetPane (CGlPane *pane)
virtual wxEvtHandler * GetEvtHandler ()
void Render (CGlPane &Pane)
Operations with Mark (don't automaticaly update display)
void MarkRowSeq (TNumrow row, const TRangeColl &C, bool set)
 mark/unmark a collection of intervals in seq. coordinates More...
void MarkRow (TNumrow row, const TRangeColl &C, bool set)
 mark/unmark a collection of intervals in alignment coordinates More...
void UnMarkAll (TNumrow row)
const TRangeCollGetMark (TNumrow row) const
void MarkSelectedRows (const TRangeColl &C, bool set)
void UnMarkAll ()
void UnMarkSelected ()
const TRowToMarkMapGetMarks () const
wxWidgets event handling
void OnLeftDown (wxMouseEvent &event)
void OnLeftUp (wxMouseEvent &event)
void OnMotion (wxMouseEvent &event)
void OnMouseCaptureLost (wxMouseCaptureLostEvent &evt)
void OnKeyDown (wxKeyEvent &event)
void OnKeyUp (wxKeyEvent &event)
- Public Member Functions inherited from IGlEventHandler
virtual ~IGlEventHandler ()

Protected Types

enum  EState { eIdle , eReady , eResize }
typedef map< TNumrow, SMarkDeltaTRowToDeltaMap

Protected Member Functions

bool x_MarkState ()
void x_OnStartSel (const wxPoint &ms_pos)
 Signal handlers. More...
void x_OnChangeSelRange (const wxPoint &ms_pos)
void x_OnEndSelRange (EState new_state, const wxPoint &ms_pos)
void x_OnResetAll ()
Helper functions
TModelUnit x_MouseToSeqPos (const wxPoint &ms_pos)
 helper functions More...
TSeqPos x_ClipPosByRange (TSeqPos Pos)
bool x_HitRangeBorder (const wxPoint &ms_pos) const
void x_InitDeltaMap (const wxPoint &ms_pos)
void x_HitTest (TNumrow Row, const TRangeColl &C, int X, TSeqRange &Range, bool &bHitStart) const
bool x_HitSelectedLine (const wxPoint &ms_pos)
void x_UpdateDelta (TSeqRange &R, SMarkDelta::EExtState &State, TSeqPos Pos)
void x_UpdateSelection (TSeqPos NewPos)
void x_UpdateMarks ()
 applies changes in SMarkDelta to mark collection More...
void x_UpdateState (bool b_key, const wxPoint &ms_pos)
TSeqRange x_AlnRangeFromSeqRange (const IAlnMultiDataSource *pAlnDS, TNumrow row, const TSeqRange &seq_r)
void x_OnSelectCursor (const wxPoint &ms_pos)
const IAlignMarkHandlerHostx_GetHost () const
IAlignMarkHandlerHostx_GetHost ()

Protected Attributes

TRowToMarkMap m_mpRowToMark
TRowToDeltaMap m_mpRowToDelta
 Marks. More...
 Ranges being edited. More...
bool m_bHitResizable
EState m_State
wxStockCursor m_CursorId
 operation type More...
TSeqPos m_PrevPos
CRgbaColor m_FillColor
CRgbaColor m_FrameColor
int m_DragArea

Detailed Description

CAlignMarkHandler manages handling and editing of marks on alignments.

It holds a collection of marks corresponding to sequences of the alignment and processes events in order to provide interactive editing of marks. CAlignMarkHandler renders marks in the provided CGlPane instance (which needs to be properly setup). Each mark is represented as collection of intervals stored in CRangeCollection container.

Definition at line 98 of file align_mark_handler.hpp.

Member Typedef Documentation

◆ TNumrow

Definition at line 104 of file align_mark_handler.hpp.

◆ TRangeColl

Definition at line 106 of file align_mark_handler.hpp.

◆ TRowToDeltaMap

Definition at line 206 of file align_mark_handler.hpp.

◆ TRowToMarkMap

Definition at line 109 of file align_mark_handler.hpp.

◆ TSelListModel

Definition at line 107 of file align_mark_handler.hpp.

Member Enumeration Documentation

◆ EState

enum CAlignMarkHandler::EState

Definition at line 149 of file align_mark_handler.hpp.

Constructor & Destructor Documentation

◆ CAlignMarkHandler()

CAlignMarkHandler::CAlignMarkHandler ( )

Definition at line 57 of file align_mark_handler.cpp.

Member Function Documentation

◆ GetEvtHandler()

wxEvtHandler * CAlignMarkHandler::GetEvtHandler ( )

Implements IGlEventHandler.

Definition at line 90 of file align_mark_handler.cpp.

◆ GetGenericHost()

IGenericHandlerHost * CAlignMarkHandler::GetGenericHost ( )

◆ GetMark()

const CAlignMarkHandler::TRangeColl * CAlignMarkHandler::GetMark ( TNumrow  row) const

◆ GetMarks()

const CAlignMarkHandler::TRowToMarkMap & CAlignMarkHandler::GetMarks ( ) const

Definition at line 189 of file align_mark_handler.cpp.

References m_mpRowToMark.

Referenced by CAlnMultiPane::GetMarks().

◆ MarkRow()

void CAlignMarkHandler::MarkRow ( TNumrow  row,
const TRangeColl C,
bool  set 

◆ MarkRowSeq()

void CAlignMarkHandler::MarkRowSeq ( TNumrow  row,
const TRangeColl C,
bool  set 

◆ MarkSelectedRows()

void CAlignMarkHandler::MarkSelectedRows ( const TRangeColl C,
bool  set 

◆ OnKeyDown()

void CAlignMarkHandler::OnKeyDown ( wxKeyEvent &  event)

◆ OnKeyUp()

void CAlignMarkHandler::OnKeyUp ( wxKeyEvent &  event)

◆ OnLeftDown()

void CAlignMarkHandler::OnLeftDown ( wxMouseEvent &  event)

Definition at line 204 of file align_mark_handler.cpp.

References x_MarkState(), x_OnSelectCursor(), and x_OnStartSel().

◆ OnLeftUp()

void CAlignMarkHandler::OnLeftUp ( wxMouseEvent &  event)

Definition at line 233 of file align_mark_handler.cpp.

References eIdle, eReady, eResize, m_State, x_MarkState(), and x_OnEndSelRange().

◆ OnMotion()

void CAlignMarkHandler::OnMotion ( wxMouseEvent &  event)

◆ OnMouseCaptureLost()

void CAlignMarkHandler::OnMouseCaptureLost ( wxMouseCaptureLostEvent &  evt)

◆ Render()

void CAlignMarkHandler::Render ( CGlPane Pane)

◆ SetHost()

void CAlignMarkHandler::SetHost ( IAlignMarkHandlerHost pHost)

Definition at line 72 of file align_mark_handler.cpp.

References m_Host.

◆ SetPane()

void CAlignMarkHandler::SetPane ( CGlPane pane)

Reimplemented from IGlEventHandler.

Definition at line 84 of file align_mark_handler.cpp.

References m_Pane.

◆ UnMarkAll() [1/2]

void CAlignMarkHandler::UnMarkAll ( )

Definition at line 168 of file align_mark_handler.cpp.

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

◆ UnMarkAll() [2/2]

void CAlignMarkHandler::UnMarkAll ( TNumrow  row)

Definition at line 140 of file align_mark_handler.cpp.

References map_checker< Container >::erase(), and m_mpRowToMark.

Referenced by CAlnMultiPane::UnMarkAll().

◆ UnMarkSelected()

void CAlignMarkHandler::UnMarkSelected ( )

◆ x_AlnRangeFromSeqRange()

TSeqRange CAlignMarkHandler::x_AlnRangeFromSeqRange ( const IAlnMultiDataSource pAlnDS,
TNumrow  row,
const TSeqRange seq_r 

◆ x_ClipPosByRange()

TSeqPos CAlignMarkHandler::x_ClipPosByRange ( TSeqPos  Pos)

◆ x_GetHost() [1/2]

IAlignMarkHandlerHost* CAlignMarkHandler::x_GetHost ( )

Definition at line 202 of file align_mark_handler.hpp.

References m_Host.

◆ x_GetHost() [2/2]

const IAlignMarkHandlerHost* CAlignMarkHandler::x_GetHost ( ) const

◆ x_HitRangeBorder()

bool CAlignMarkHandler::x_HitRangeBorder ( const wxPoint &  ms_pos) const

◆ x_HitSelectedLine()

bool CAlignMarkHandler::x_HitSelectedLine ( const wxPoint &  ms_pos)

◆ x_HitTest()

void CAlignMarkHandler::x_HitTest ( TNumrow  Row,
const TRangeColl C,
int  X,
TSeqRange Range,
bool bHitStart 
) const

◆ x_InitDeltaMap()

void CAlignMarkHandler::x_InitDeltaMap ( const wxPoint &  ms_pos)

◆ x_MarkState()

bool CAlignMarkHandler::x_MarkState ( )

Definition at line 198 of file align_mark_handler.cpp.

Referenced by OnKeyDown(), OnKeyUp(), OnLeftDown(), OnLeftUp(), and OnMotion().

◆ x_MouseToSeqPos()

TModelUnit CAlignMarkHandler::x_MouseToSeqPos ( const wxPoint &  ms_pos)

helper functions

Definition at line 388 of file align_mark_handler.cpp.

References _ASSERT, m_Host, m_Pane, and IAlignMarkHandlerHost::MHH_GetSeqPosByX().

Referenced by x_InitDeltaMap(), and x_OnChangeSelRange().

◆ x_OnChangeSelRange()

void CAlignMarkHandler::x_OnChangeSelRange ( const wxPoint &  ms_pos)

◆ x_OnEndSelRange()

void CAlignMarkHandler::x_OnEndSelRange ( EState  new_state,
const wxPoint &  ms_pos 

◆ x_OnResetAll()

void CAlignMarkHandler::x_OnResetAll ( )

◆ x_OnSelectCursor()

void CAlignMarkHandler::x_OnSelectCursor ( const wxPoint &  ms_pos)

◆ x_OnStartSel()

void CAlignMarkHandler::x_OnStartSel ( const wxPoint &  ms_pos)

◆ x_UpdateDelta()

void CAlignMarkHandler::x_UpdateDelta ( TSeqRange R,
SMarkDelta::EExtState State,
TSeqPos  Pos 

◆ x_UpdateMarks()

void CAlignMarkHandler::x_UpdateMarks ( )

◆ x_UpdateSelection()

void CAlignMarkHandler::x_UpdateSelection ( TSeqPos  NewPos)

◆ x_UpdateState()

void CAlignMarkHandler::x_UpdateState ( bool  b_key,
const wxPoint &  ms_pos 

Member Data Documentation

◆ m_bHitResizable

bool CAlignMarkHandler::m_bHitResizable

Definition at line 214 of file align_mark_handler.hpp.

◆ m_CursorId

wxStockCursor CAlignMarkHandler::m_CursorId

operation type

Definition at line 217 of file align_mark_handler.hpp.

Referenced by x_OnSelectCursor().

◆ m_DragArea

int CAlignMarkHandler::m_DragArea

Definition at line 222 of file align_mark_handler.hpp.

Referenced by x_HitTest().

◆ m_FillColor

CRgbaColor CAlignMarkHandler::m_FillColor

Definition at line 220 of file align_mark_handler.hpp.

Referenced by Render().

◆ m_FrameColor

CRgbaColor CAlignMarkHandler::m_FrameColor

Definition at line 221 of file align_mark_handler.hpp.

Referenced by Render().

◆ m_Host

IAlignMarkHandlerHost* CAlignMarkHandler::m_Host

Ranges being edited.

Definition at line 211 of file align_mark_handler.hpp.

Referenced by GetGenericHost(), SetHost(), x_GetHost(), and x_MouseToSeqPos().

◆ m_mpRowToDelta

TRowToDeltaMap CAlignMarkHandler::m_mpRowToDelta


Definition at line 209 of file align_mark_handler.hpp.

Referenced by Render(), x_InitDeltaMap(), x_OnResetAll(), x_UpdateMarks(), and x_UpdateSelection().

◆ m_mpRowToMark

TRowToMarkMap CAlignMarkHandler::m_mpRowToMark

◆ m_Pane

CGlPane* CAlignMarkHandler::m_Pane

Definition at line 212 of file align_mark_handler.hpp.

Referenced by SetPane(), x_ClipPosByRange(), x_HitTest(), and x_MouseToSeqPos().

◆ m_PrevPos

TSeqPos CAlignMarkHandler::m_PrevPos

Definition at line 218 of file align_mark_handler.hpp.

Referenced by x_OnChangeSelRange(), x_OnResetAll(), and x_OnStartSel().

◆ m_State

EState CAlignMarkHandler::m_State

The documentation for this class was generated from the following files:
Modified on Tue Feb 27 05:50:01 2024 by rev. 669887