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

Search Toolkit Book for CLinearSelHandler

Class CLinearSelHandler represents in GUI a one-dimnesional multi-segment selection. More...

#include <gui/widgets/gl/linear_sel_handler.hpp>

+ Inheritance diagram for CLinearSelHandler:
+ Collaboration diagram for CLinearSelHandler:

Public Types

enum  ERenderingOption { eActiveState , ePassiveState }
 
enum  EColorType { eSelection , ePasssiveSelection , eSymbol }
 
enum  EExtState { eNoExt , eExtRangeStart , eExtRangeEnd }
 
enum  EOpType {
  eNoOp , eAdd , eRemove , eReplace ,
  eChange
}
 
typedef CRangeCollection< TSeqPosTRangeColl
 

Public Member Functions

 CLinearSelHandler (EOrientation orient=eHorz)
 class CLinearSelHandler More...
 
virtual ~CLinearSelHandler ()
 
void SetHost (ISelHandlerHost *host)
 
IGenericHandlerHostGetGenericHost ()
 
void SetOrientation (EOrientation orient)
 
void Render (CGlPane &Pane, ERenderingOption option=eActiveState)
 
void SetColor (EColorType type, const CRgbaColor &color)
 
void SetShowRangeCoords (bool flag)
 
TSeqRange GetSelectionLimits () const
 
const TRangeCollGetSelection () const
 
void SetSelection (const TRangeColl &C, bool bRedraw)
 
void ResetSelection (bool bRedraw)
 
void OnLeftDown (wxMouseEvent &event)
 
void OnLeftDoubleClick (wxMouseEvent &event)
 
void OnLeftUp (wxMouseEvent &event)
 
void OnMotion (wxMouseEvent &event)
 
void OnMouseCaptureLost (wxMouseCaptureLostEvent &evt)
 
IGlEventHandler implementaion
virtual void SetPane (CGlPane *pane)
 
virtual wxEvtHandler * GetEvtHandler ()
 
- Public Member Functions inherited from IGlEventHandler
virtual ~IGlEventHandler ()
 

Protected Member Functions

void x_OnStartSel (const wxPoint &ms_pos, CGUIEvent::EGUIState state)
 Signal handlers. More...
 
void x_OnChangeSelRange (const wxPoint &ms_pos)
 
void x_OnEndSelRange ()
 
void x_OnResetAll ()
 
void x_OnOpChange (CGUIEvent &event)
 
void x_OnSelectCursor (const wxPoint &ms_pos)
 
void x_SetCursor ()
 
EOpType x_GetOpTypeByEvent (CGUIEvent &event) const
 
EOpType x_GetOpTypeByState (CGUIEvent::EGUIState state) const
 helper functions More...
 
TModelUnit x_MouseToSeqPos (const wxPoint &ms_pos)
 
TModelUnit x_ClipPosByRange (TModelUnit Pos)
 
void x_HitTest (const wxPoint &ms_pos, TSeqRange &Range, bool &bHitStart)
 
void x_AddToSelection (const TSeqRange &Range)
 
void x_RemoveFromSelection (const TSeqRange &Range)
 

Private Attributes

EOrientation m_Orientation
 
TRangeColl m_Selection
 
TSeqRange m_CurrRange
 range being modified More...
 
EExtState m_ExtState
 current range extension state More...
 
EOpType m_OpType
 operation type More...
 
bool m_bResizeCursor
 
bool m_ActiveSel
 
bool m_ShowCoordinates
 Flag indicating to show range coordinates during selection. More...
 
ISelHandlerHostm_Host
 
CRgbaColor m_SelColor
 
CRgbaColor m_BorderColor
 
CRgbaColor m_PassiveSelColor
 
CRgbaColor m_SymbolColor
 
CGlTextureFont m_TexFont
 
CGlPanem_Pane
 

Detailed Description

Class CLinearSelHandler represents in GUI a one-dimnesional multi-segment selection.

CLinearSelHandler renders the selection in a given CGlPane and allows to interactively modify the selection.

CLinearSelHandler implements IGlEventHandler what makes it compatible with IGlEventHandler-supproting widgets. CLinearSelHandler provides API for programmatical manipulation of the

Definition at line 73 of file linear_sel_handler.hpp.

Member Typedef Documentation

◆ TRangeColl

Definition at line 79 of file linear_sel_handler.hpp.

Member Enumeration Documentation

◆ EColorType

Enumerator
eSelection 
ePasssiveSelection 
eSymbol 

Definition at line 87 of file linear_sel_handler.hpp.

◆ EExtState

Enumerator
eNoExt 
eExtRangeStart 
eExtRangeEnd 

Definition at line 93 of file linear_sel_handler.hpp.

◆ EOpType

Enumerator
eNoOp 
eAdd 
eRemove 
eReplace 
eChange 

Definition at line 98 of file linear_sel_handler.hpp.

◆ ERenderingOption

Enumerator
eActiveState 
ePassiveState 

Definition at line 81 of file linear_sel_handler.hpp.

Constructor & Destructor Documentation

◆ CLinearSelHandler()

CLinearSelHandler::CLinearSelHandler ( EOrientation  orient = eHorz)

class CLinearSelHandler

Definition at line 58 of file linear_sel_handler.cpp.

◆ ~CLinearSelHandler()

CLinearSelHandler::~CLinearSelHandler ( )
virtual

Definition at line 75 of file linear_sel_handler.cpp.

Member Function Documentation

◆ GetEvtHandler()

wxEvtHandler * CLinearSelHandler::GetEvtHandler ( )
virtual

Implements IGlEventHandler.

Definition at line 86 of file linear_sel_handler.cpp.

◆ GetGenericHost()

IGenericHandlerHost * CLinearSelHandler::GetGenericHost ( )

Definition at line 98 of file linear_sel_handler.cpp.

References m_Host.

Referenced by x_OnChangeSelRange(), x_OnEndSelRange(), x_OnStartSel(), and x_SetCursor().

◆ GetSelection()

const CLinearSelHandler::TRangeColl & CLinearSelHandler::GetSelection ( void  ) const

◆ GetSelectionLimits()

TSeqRange CLinearSelHandler::GetSelectionLimits ( ) const

◆ OnLeftDoubleClick()

void CLinearSelHandler::OnLeftDoubleClick ( wxMouseEvent &  event)

Definition at line 197 of file linear_sel_handler.cpp.

References x_OnResetAll().

◆ OnLeftDown()

void CLinearSelHandler::OnLeftDown ( wxMouseEvent &  event)

◆ OnLeftUp()

void CLinearSelHandler::OnLeftUp ( wxMouseEvent &  event)

◆ OnMotion()

void CLinearSelHandler::OnMotion ( wxMouseEvent &  event)

Definition at line 224 of file linear_sel_handler.cpp.

References eNoOp, m_OpType, x_OnChangeSelRange(), and x_OnSelectCursor().

◆ OnMouseCaptureLost()

void CLinearSelHandler::OnMouseCaptureLost ( wxMouseCaptureLostEvent &  evt)

Definition at line 759 of file linear_sel_handler.cpp.

◆ Render()

void CLinearSelHandler::Render ( CGlPane Pane,
ERenderingOption  option = eActiveState 
)

◆ ResetSelection()

void CLinearSelHandler::ResetSelection ( bool  bRedraw)

◆ SetColor()

void CLinearSelHandler::SetColor ( EColorType  type,
const CRgbaColor color 
)

◆ SetHost()

void CLinearSelHandler::SetHost ( ISelHandlerHost host)

Definition at line 92 of file linear_sel_handler.cpp.

References m_Host.

Referenced by CSeqGraphicPane::CSeqGraphicPane().

◆ SetOrientation()

void CLinearSelHandler::SetOrientation ( EOrientation  orient)

Definition at line 104 of file linear_sel_handler.cpp.

References m_Orientation.

Referenced by CSeqGraphicPane::CSeqGraphicPane().

◆ SetPane()

void CLinearSelHandler::SetPane ( CGlPane pane)
virtual

Reimplemented from IGlEventHandler.

Definition at line 80 of file linear_sel_handler.cpp.

References m_Pane.

◆ SetSelection()

void CLinearSelHandler::SetSelection ( const TRangeColl C,
bool  bRedraw 
)

◆ SetShowRangeCoords()

void CLinearSelHandler::SetShowRangeCoords ( bool  flag)

Definition at line 158 of file linear_sel_handler.cpp.

References m_ShowCoordinates.

◆ x_AddToSelection()

void CLinearSelHandler::x_AddToSelection ( const TSeqRange Range)
protected

◆ x_ClipPosByRange()

TModelUnit CLinearSelHandler::x_ClipPosByRange ( TModelUnit  Pos)
protected

◆ x_GetOpTypeByEvent()

EOpType CLinearSelHandler::x_GetOpTypeByEvent ( CGUIEvent event) const
protected

◆ x_GetOpTypeByState()

CLinearSelHandler::EOpType CLinearSelHandler::x_GetOpTypeByState ( CGUIEvent::EGUIState  state) const
protected

helper functions

Definition at line 401 of file linear_sel_handler.cpp.

References eAdd, eNoOp, eRemove, eReplace, CGUIEvent::eSelectExtState, CGUIEvent::eSelectIncState, and CGUIEvent::eSelectState.

Referenced by x_OnStartSel().

◆ x_HitTest()

void CLinearSelHandler::x_HitTest ( const wxPoint &  ms_pos,
TSeqRange Range,
bool bHitStart 
)
protected

◆ x_MouseToSeqPos()

TModelUnit CLinearSelHandler::x_MouseToSeqPos ( const wxPoint &  ms_pos)
protected

◆ x_OnChangeSelRange()

void CLinearSelHandler::x_OnChangeSelRange ( const wxPoint &  ms_pos)
protected

◆ x_OnEndSelRange()

void CLinearSelHandler::x_OnEndSelRange ( )
protected

◆ x_OnOpChange()

void CLinearSelHandler::x_OnOpChange ( CGUIEvent event)
protected

◆ x_OnResetAll()

void CLinearSelHandler::x_OnResetAll ( )
protected

◆ x_OnSelectCursor()

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

◆ x_OnStartSel()

void CLinearSelHandler::x_OnStartSel ( const wxPoint &  ms_pos,
CGUIEvent::EGUIState  state 
)
protected

◆ x_RemoveFromSelection()

void CLinearSelHandler::x_RemoveFromSelection ( const TSeqRange Range)
protected

◆ x_SetCursor()

void CLinearSelHandler::x_SetCursor ( )
protected

Member Data Documentation

◆ m_ActiveSel

bool CLinearSelHandler::m_ActiveSel
private

Definition at line 170 of file linear_sel_handler.hpp.

Referenced by OnLeftDown(), and OnLeftUp().

◆ m_BorderColor

CRgbaColor CLinearSelHandler::m_BorderColor
private

Definition at line 177 of file linear_sel_handler.hpp.

Referenced by Render().

◆ m_bResizeCursor

bool CLinearSelHandler::m_bResizeCursor
private

Definition at line 169 of file linear_sel_handler.hpp.

Referenced by x_OnSelectCursor(), and x_SetCursor().

◆ m_CurrRange

TSeqRange CLinearSelHandler::m_CurrRange
private

range being modified

Definition at line 165 of file linear_sel_handler.hpp.

Referenced by Render(), x_OnChangeSelRange(), x_OnEndSelRange(), and x_OnStartSel().

◆ m_ExtState

EExtState CLinearSelHandler::m_ExtState
private

current range extension state

Definition at line 167 of file linear_sel_handler.hpp.

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

◆ m_Host

ISelHandlerHost* CLinearSelHandler::m_Host
private

◆ m_OpType

EOpType CLinearSelHandler::m_OpType
private

operation type

Definition at line 168 of file linear_sel_handler.hpp.

Referenced by OnMotion(), Render(), x_OnEndSelRange(), x_OnResetAll(), x_OnSelectCursor(), and x_OnStartSel().

◆ m_Orientation

EOrientation CLinearSelHandler::m_Orientation
private

◆ m_Pane

CGlPane* CLinearSelHandler::m_Pane
private

Definition at line 182 of file linear_sel_handler.hpp.

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

◆ m_PassiveSelColor

CRgbaColor CLinearSelHandler::m_PassiveSelColor
private

Definition at line 178 of file linear_sel_handler.hpp.

Referenced by Render(), and SetColor().

◆ m_SelColor

CRgbaColor CLinearSelHandler::m_SelColor
private

Definition at line 176 of file linear_sel_handler.hpp.

Referenced by Render(), and SetColor().

◆ m_Selection

TRangeColl CLinearSelHandler::m_Selection
private

◆ m_ShowCoordinates

bool CLinearSelHandler::m_ShowCoordinates
private

Flag indicating to show range coordinates during selection.

Definition at line 172 of file linear_sel_handler.hpp.

Referenced by Render(), and SetShowRangeCoords().

◆ m_SymbolColor

CRgbaColor CLinearSelHandler::m_SymbolColor
private

Definition at line 179 of file linear_sel_handler.hpp.

Referenced by Render(), and SetColor().

◆ m_TexFont

CGlTextureFont CLinearSelHandler::m_TexFont
private

Definition at line 181 of file linear_sel_handler.hpp.

Referenced by Render().


The documentation for this class was generated from the following files:
Modified on Wed Jun 19 16:59:50 2024 by modify_doxy.py rev. 669887