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:

Classes

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...
 
IAlignMarkHandlerHostm_Host
 Ranges being edited. More...
 
CGlPanem_Pane
 
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
protected
Enumerator
eIdle 
eReady 
eResize 

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 ( )
virtual

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)
virtual

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(), m_mpRowToMark, and row.

Referenced by CAlnMultiPane::UnMarkAll().

◆ UnMarkSelected()

void CAlignMarkHandler::UnMarkSelected ( )

◆ x_AlnRangeFromSeqRange()

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

◆ x_ClipPosByRange()

TSeqPos CAlignMarkHandler::x_ClipPosByRange ( TSeqPos  Pos)
protected

◆ x_GetHost() [1/2]

IAlignMarkHandlerHost* CAlignMarkHandler::x_GetHost ( )
inlineprotected

Definition at line 202 of file align_mark_handler.hpp.

References m_Host.

◆ x_GetHost() [2/2]

const IAlignMarkHandlerHost* CAlignMarkHandler::x_GetHost ( ) const
inlineprotected

◆ x_HitRangeBorder()

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

◆ x_HitSelectedLine()

bool CAlignMarkHandler::x_HitSelectedLine ( const wxPoint &  ms_pos)
protected

◆ x_HitTest()

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

◆ x_InitDeltaMap()

void CAlignMarkHandler::x_InitDeltaMap ( const wxPoint &  ms_pos)
protected

◆ x_MarkState()

bool CAlignMarkHandler::x_MarkState ( )
protected

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)
protected

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)
protected

◆ x_OnEndSelRange()

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

◆ x_OnResetAll()

void CAlignMarkHandler::x_OnResetAll ( )
protected

◆ x_OnSelectCursor()

void CAlignMarkHandler::x_OnSelectCursor ( const wxPoint &  ms_pos)
protected

◆ x_OnStartSel()

void CAlignMarkHandler::x_OnStartSel ( const wxPoint &  ms_pos)
protected

◆ x_UpdateDelta()

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

◆ x_UpdateMarks()

void CAlignMarkHandler::x_UpdateMarks ( )
protected

◆ x_UpdateSelection()

void CAlignMarkHandler::x_UpdateSelection ( TSeqPos  NewPos)
protected

◆ x_UpdateState()

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

Member Data Documentation

◆ m_bHitResizable

bool CAlignMarkHandler::m_bHitResizable
protected

Definition at line 214 of file align_mark_handler.hpp.

◆ m_CursorId

wxStockCursor CAlignMarkHandler::m_CursorId
protected

operation type

Definition at line 217 of file align_mark_handler.hpp.

Referenced by x_OnSelectCursor().

◆ m_DragArea

int CAlignMarkHandler::m_DragArea
protected

Definition at line 222 of file align_mark_handler.hpp.

Referenced by x_HitTest().

◆ m_FillColor

CRgbaColor CAlignMarkHandler::m_FillColor
protected

Definition at line 220 of file align_mark_handler.hpp.

Referenced by Render().

◆ m_FrameColor

CRgbaColor CAlignMarkHandler::m_FrameColor
protected

Definition at line 221 of file align_mark_handler.hpp.

Referenced by Render().

◆ m_Host

IAlignMarkHandlerHost* CAlignMarkHandler::m_Host
protected

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
protected

Marks.

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
protected

◆ m_Pane

CGlPane* CAlignMarkHandler::m_Pane
protected

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
protected

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
protected

The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:58:11 2024 by modify_doxy.py rev. 669887