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

Search Toolkit Book for CSeqTextWidget

class CSeqTextWidget More...

#include <gui/widgets/seq_text/seq_text_widget.hpp>

+ Inheritance diagram for CSeqTextWidget:
+ Collaboration diagram for CSeqTextWidget:

Public Types

typedef list< CConstRef< objects::CSeq_id > > TIdRefList
 
typedef CSeqTextPane::TRangeColl 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, TListenersTPools
 
typedef list< AutoPtr< SPostRequest > > TPostRequests
 
typedef std::map< CEventHandler *, intTHandlerToCount
 
typedef void(* FOnPostCallback) ()
 

Public Member Functions

 CSeqTextWidget (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0)
 class CSeqTextWidget More...
 
virtual ~CSeqTextWidget ()
 
virtual CSeqTextDataSourceGetDS ()
 
void AdjustModelForSequenceAndWindowSize ()
 
void ReportMouseOverPos (TSeqPos pos)
 
virtual void SetDataSource (CSeqTextDataSource &ds)
 
virtual CGlPaneGetPort ()
 implement these 2 functions in derived classes More...
 
virtual const CGlPaneGetPort () const
 implement these 2 functions in derived classes More...
 
virtual void SetScaleX (TModelUnit scale_x, const TModelPoint &point)
 
void Configure (wxCommandEvent &event)
 
void OnShowPopup ()
 
void ScrollToSourcePosition (TSeqPos pos, bool notify=true)
 
void ScrollToSequencePosition (TSeqPos pos, bool notify=true)
 
void ScrollToPosition (TSeqPos pos, bool notify=true)
 
void ScrollToText (const string &fragment, TSeqPos start_search)
 
int GetPortScrollValue ()
 
void UpdateLastSourcePos ()
 
void ChooseCaseFeature (objects::CSeqFeatData::ESubtype subtype)
 
int GetCaseFeatureSubtype ()
 
void SetFontSize (int font_size)
 
int GetFontSize ()
 
void ShowFeaturesInLowerCase (bool do_lower)
 
bool GetShowFeaturesInLowerCase ()
 
void SetHost (ISeqTextWidgetHost *pHost)
 
void ChangeConfig ()
 
const TRangeCollGetSelection () const
 
void SetRangeSelection (const TRangeColl &segs)
 
void ResetObjectSelection ()
 
void SelectObject (const CObject *obj)
 
CSeqTextPaneGetPane ()
 
- 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 &reg_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 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 IRegSettings
virtual ~IRegSettings ()
 

Protected Member Functions

int x_GetVScrollMax ()
 
TSeqPos x_GetScrollValueForSourcePos (TSeqPos source_pos)
 
virtual void x_UpdateScrollbars ()
 
virtual void x_OnScrollY (int pos)
 
virtual void x_OnScrollX (int pos)
 
void x_MakePortMatchScrollValue (int pos)
 
TSeqPos x_GetSourcePosForPortScrollValue ()
 
void x_SetScrollPosition (int scroll_pos)
 
void OnScrollToSelection (wxCommandEvent &event)
 
void OnCopySelection (wxCommandEvent &event)
 
void OnClearSelection (wxCommandEvent &event)
 
void OnHasSelection (wxUpdateUIEvent &event)
 
void OnDisableCommands (wxUpdateUIEvent &event)
 
void OnUpdateSettings (wxUpdateUIEvent &event)
 
void DeSelectObject (const CObject *obj)
 
objects::CSeq_loc * GetVisibleRange ()
 
virtual void x_CreatePane ()
 factory method creating master pane, called form x_CreateControls() More...
 
virtual CGlWidgetPanex_GetPane ()
 
virtual void x_SetPortLimits ()
 updates model limits of the Master CGlPane More...
 
virtual void x_Update ()
 Update handlers. More...
 
virtual void x_UpdatePane ()
 
- 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_CreateControls (void)
 creates Pane, Scrollbars and other child widgets, called from Create() 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_ShowDecoratedPopupMenu (wxMenu *menu)
 
- 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

CRef< CSeqTextDataSourcem_DataSource
 
unique_ptr< CSeqTextPanem_SequencePane
 
TSeqPos m_PopupMenuSourcePos
 
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
 

Private Attributes

ISeqTextWidgetHostm_pHost
 
TSeqPos m_LastSourcePos
 

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 ()
 
- Static Protected Attributes inherited from CEventHandler
static const SEvtMap sm_EvtMap
 

Detailed Description

class CSeqTextWidget

Definition at line 86 of file seq_text_widget.hpp.

Member Typedef Documentation

◆ TIdRefList

typedef list<CConstRef<objects::CSeq_id> > CSeqTextWidget::TIdRefList

Definition at line 89 of file seq_text_widget.hpp.

◆ TRangeColl

Definition at line 90 of file seq_text_widget.hpp.

Constructor & Destructor Documentation

◆ CSeqTextWidget()

CSeqTextWidget::CSeqTextWidget ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = 0 
)

◆ ~CSeqTextWidget()

CSeqTextWidget::~CSeqTextWidget ( )
virtual

Definition at line 81 of file seq_text_widget.cpp.

Member Function Documentation

◆ AdjustModelForSequenceAndWindowSize()

void CSeqTextWidget::AdjustModelForSequenceAndWindowSize ( )

◆ ChangeConfig()

void CSeqTextWidget::ChangeConfig ( )

Definition at line 549 of file seq_text_widget.cpp.

References m_pHost, NULL, and ISeqTextWidgetHost::STWH_ChangeConfig().

◆ ChooseCaseFeature()

void CSeqTextWidget::ChooseCaseFeature ( objects::CSeqFeatData::ESubtype  subtype)

Definition at line 518 of file seq_text_widget.cpp.

References m_SequencePane.

Referenced by CSeqTextPanel::OnFeatureTypeSelected().

◆ Configure()

void CSeqTextWidget::Configure ( wxCommandEvent &  event)

Definition at line 512 of file seq_text_widget.cpp.

References m_SequencePane.

◆ DeSelectObject()

void CSeqTextWidget::DeSelectObject ( const CObject obj)
protected

Definition at line 473 of file seq_text_widget.cpp.

References m_SequencePane.

◆ GetCaseFeatureSubtype()

int CSeqTextWidget::GetCaseFeatureSubtype ( )

Definition at line 524 of file seq_text_widget.cpp.

References m_SequencePane.

Referenced by CSeqTextPanel::CreateControls().

◆ GetDS()

CSeqTextDataSource * CSeqTextWidget::GetDS ( void  )
virtual

◆ GetFontSize()

int CSeqTextWidget::GetFontSize ( )

Definition at line 537 of file seq_text_widget.cpp.

References m_SequencePane.

◆ GetPane()

CSeqTextPane& CSeqTextWidget::GetPane ( )
inline

◆ GetPort() [1/2]

CGlPane & CSeqTextWidget::GetPort ( )
virtual

implement these 2 functions in derived classes

Implements CGlWidgetBase.

Definition at line 183 of file seq_text_widget.cpp.

References m_Port.

Referenced by CSeqTextPane::Layout(), CSeqTextPane::x_AdjustBottomRuler(), CSeqTextPane::x_RenderContent(), and CSeqTextPane::x_RenderLeftRuler().

◆ GetPort() [2/2]

const CGlPane & CSeqTextWidget::GetPort ( ) const
virtual

implement these 2 functions in derived classes

Implements CGlWidgetBase.

Definition at line 189 of file seq_text_widget.cpp.

References m_Port.

◆ GetPortScrollValue()

int CSeqTextWidget::GetPortScrollValue ( )

◆ GetSelection()

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

◆ GetShowFeaturesInLowerCase()

bool CSeqTextWidget::GetShowFeaturesInLowerCase ( )

Definition at line 567 of file seq_text_widget.cpp.

References m_SequencePane.

◆ GetVisibleRange()

CSeq_loc * CSeqTextWidget::GetVisibleRange ( void  )
protected

◆ OnClearSelection()

void CSeqTextWidget::OnClearSelection ( wxCommandEvent &  event)
protected

◆ OnCopySelection()

void CSeqTextWidget::OnCopySelection ( wxCommandEvent &  event)
protected

Definition at line 433 of file seq_text_widget.cpp.

References _ASSERT, m_DataSource, and m_SequencePane.

◆ OnDisableCommands()

void CSeqTextWidget::OnDisableCommands ( wxUpdateUIEvent &  event)
protected

Definition at line 454 of file seq_text_widget.cpp.

◆ OnHasSelection()

void CSeqTextWidget::OnHasSelection ( wxUpdateUIEvent &  event)
protected

Definition at line 449 of file seq_text_widget.cpp.

References ctll::empty(), GetSelection(), and m_DataSource.

◆ OnScrollToSelection()

void CSeqTextWidget::OnScrollToSelection ( wxCommandEvent &  event)
protected

◆ OnShowPopup()

void CSeqTextWidget::OnShowPopup ( )

◆ OnUpdateSettings()

static void CSeqTextWidget::OnUpdateSettings ( wxUpdateUIEvent &  event)
protected

Definition at line 135 of file seq_text_widget.cpp.

◆ ReportMouseOverPos()

void CSeqTextWidget::ReportMouseOverPos ( TSeqPos  pos)

◆ ResetObjectSelection()

void CSeqTextWidget::ResetObjectSelection ( void  )

Definition at line 485 of file seq_text_widget.cpp.

References m_SequencePane.

Referenced by CSeqTextView::x_OnSetSelection().

◆ ScrollToPosition()

void CSeqTextWidget::ScrollToPosition ( TSeqPos  pos,
bool  notify = true 
)

◆ ScrollToSequencePosition()

void CSeqTextWidget::ScrollToSequencePosition ( TSeqPos  pos,
bool  notify = true 
)

◆ ScrollToSourcePosition()

void CSeqTextWidget::ScrollToSourcePosition ( TSeqPos  pos,
bool  notify = true 
)

◆ ScrollToText()

void CSeqTextWidget::ScrollToText ( const string fragment,
TSeqPos  start_search 
)

◆ SelectObject()

void CSeqTextWidget::SelectObject ( const CObject obj)

Definition at line 479 of file seq_text_widget.cpp.

References m_SequencePane.

Referenced by CSeqTextView::x_OnSetSelection().

◆ SetDataSource()

void CSeqTextWidget::SetDataSource ( CSeqTextDataSource ds)
virtual

◆ SetFontSize()

void CSeqTextWidget::SetFontSize ( int  font_size)

Definition at line 530 of file seq_text_widget.cpp.

References AdjustModelForSequenceAndWindowSize(), and m_SequencePane.

Referenced by CSeqTextPane::Configure().

◆ SetHost()

void CSeqTextWidget::SetHost ( ISeqTextWidgetHost pHost)

Definition at line 543 of file seq_text_widget.cpp.

References m_pHost.

Referenced by CSeqTextPanel::CreateControls().

◆ SetRangeSelection()

void CSeqTextWidget::SetRangeSelection ( const TRangeColl segs)

Definition at line 467 of file seq_text_widget.cpp.

References m_SequencePane.

Referenced by ScrollToText(), and CSeqTextView::x_OnSetSelection().

◆ SetScaleX()

void CSeqTextWidget::SetScaleX ( TModelUnit  scale_x,
const TModelPoint point 
)
virtual

Definition at line 195 of file seq_text_widget.cpp.

◆ ShowFeaturesInLowerCase()

void CSeqTextWidget::ShowFeaturesInLowerCase ( bool  do_lower)

Definition at line 558 of file seq_text_widget.cpp.

References m_SequencePane.

◆ UpdateLastSourcePos()

void CSeqTextWidget::UpdateLastSourcePos ( )

◆ x_CreatePane()

void CSeqTextWidget::x_CreatePane ( )
protectedvirtual

factory method creating master pane, called form x_CreateControls()

Implements CGlWidgetBase.

Definition at line 140 of file seq_text_widget.cpp.

References m_SequencePane.

Referenced by SetDataSource().

◆ x_GetPane()

CGlWidgetPane * CSeqTextWidget::x_GetPane ( )
protectedvirtual

Reimplemented from CGlWidgetBase.

Definition at line 146 of file seq_text_widget.cpp.

References m_SequencePane.

◆ x_GetScrollValueForSourcePos()

TSeqPos CSeqTextWidget::x_GetScrollValueForSourcePos ( TSeqPos  source_pos)
protected

◆ x_GetSourcePosForPortScrollValue()

TSeqPos CSeqTextWidget::x_GetSourcePosForPortScrollValue ( )
protected

Definition at line 298 of file seq_text_widget.cpp.

References GetPortScrollValue(), and m_SequencePane.

Referenced by UpdateLastSourcePos(), and x_OnScrollY().

◆ x_GetVScrollMax()

int CSeqTextWidget::x_GetVScrollMax ( )
protected

Definition at line 231 of file seq_text_widget.cpp.

References m_SequencePane.

Referenced by x_SetScrollPosition(), and x_UpdateScrollbars().

◆ x_MakePortMatchScrollValue()

void CSeqTextWidget::x_MakePortMatchScrollValue ( int  pos)
protected

◆ x_OnScrollX()

void CSeqTextWidget::x_OnScrollX ( int  pos)
protectedvirtual

Reimplemented from CGlWidgetBase.

Definition at line 333 of file seq_text_widget.cpp.

◆ x_OnScrollY()

void CSeqTextWidget::x_OnScrollY ( int  pos)
protectedvirtual

◆ x_SetPortLimits()

void CSeqTextWidget::x_SetPortLimits ( )
protectedvirtual

◆ x_SetScrollPosition()

void CSeqTextWidget::x_SetScrollPosition ( int  scroll_pos)
protected

◆ x_Update()

void CSeqTextWidget::x_Update ( )
protectedvirtual

Update handlers.

Reimplemented from CGlWidgetBase.

Definition at line 167 of file seq_text_widget.cpp.

References CGlWidgetBase::x_RedrawControls(), x_SetPortLimits(), x_UpdatePane(), and x_UpdateScrollbars().

Referenced by SetDataSource().

◆ x_UpdatePane()

void CSeqTextWidget::x_UpdatePane ( )
protectedvirtual

Definition at line 177 of file seq_text_widget.cpp.

References m_SequencePane.

Referenced by x_Update().

◆ x_UpdateScrollbars()

void CSeqTextWidget::x_UpdateScrollbars ( )
protectedvirtual

Member Data Documentation

◆ m_DataSource

CRef<CSeqTextDataSource> CSeqTextWidget::m_DataSource
protected

◆ m_LastSourcePos

TSeqPos CSeqTextWidget::m_LastSourcePos
private

◆ m_pHost

ISeqTextWidgetHost* CSeqTextWidget::m_pHost
private

Definition at line 184 of file seq_text_widget.hpp.

Referenced by ChangeConfig(), ReportMouseOverPos(), and SetHost().

◆ m_PopupMenuSourcePos

TSeqPos CSeqTextWidget::m_PopupMenuSourcePos
protected

Definition at line 180 of file seq_text_widget.hpp.

Referenced by ReportMouseOverPos().

◆ m_Port

CGlPane CSeqTextWidget::m_Port
protected

◆ m_SequencePane

unique_ptr<CSeqTextPane> CSeqTextWidget::m_SequencePane
protected

The documentation for this class was generated from the following files:
Modified on Sat Apr 13 11:43:48 2024 by modify_doxy.py rev. 669887