NCBI C++ ToolKit
dot_matrix_view.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef GUI_PKG_ALIGNMENT___DOT_MATRIX_VIEW__HPP
2 #define GUI_PKG_ALIGNMENT___DOT_MATRIX_VIEW__HPP
3 
4 /* $Id: dot_matrix_view.hpp 36326 2016-09-13 20:07:17Z katargir $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Andrey Yazhuk
30  *
31  * File Description:
32  *
33  *
34  */
35 
38 
40 
41 
43 
44 /** @addtogroup GUI_PKG_ALIGNMENT
45  *
46  * @{
47  */
48 
49 class CHitMatrixWidget;
50 
51 ///////////////////////////////////////////////////////////////////////////////
52 /// CDotMatrixView
54 {
55  friend class CDotMatrixViewFactory;
56 
57 public:
58  typedef vector< CConstRef<objects::CSeq_align> > TAlignVector;
59 
60 
61 public:
63 
64  /// @name IWMClient interface implementation
65  /// @{
66  virtual wxWindow* GetWindow();
67  /// @}
68 
69  /// @name IView interface implementation
70  /// @{
71  virtual const CViewTypeDescriptor& GetTypeDescriptor() const;
72  virtual void CreateViewWindow(wxWindow* parent);
73  virtual void DestroyViewWindow();
74  /// @}
75 
76  /// @name IProjectView implementation
77  /// @{
78  //virtual bool InitView(TConstScopedObjects& objects, const objects::CUser_object* params);
79  virtual void OnProjectChanged( CProjectViewEvent& evt );
80  /// @}
81 
82  /// @name ISelectionClient Implementation
83  /// @{
84  void GetSelection(CSelectionEvent& evt) const;
85  void GetSelection(TConstScopedObjects& objs) const;
86  /// @}
87 
88  /// @name CProjectViewBase overridables
89  /// @{
90  virtual void GetVisibleRanges(CVisibleRange& vrange) const;
91  /// @}
92 
93  /// @name IVisibleRangeClient interface implementation
94  /// @{
95  virtual void OnVisibleRangeChanged (const CVisibleRange& vrange,
97  /// @}
98 
99 protected:
100  virtual void x_CreateMenuBarMenu();
101 
102  virtual const CObject* x_GetOrigObject() const;
103 
104  /// @name CProjectView internal overridables
105  /// @{
106  virtual objects::CScope* x_PreAttachToProject( TConstScopedObjects& objects );
107  virtual void x_PostAttachToProject();
108 
109  virtual void x_OnSetSelection( CSelectionEvent& evt );
110  /// @}
111 
112  //void x_InitMenuResources();
113  void x_InitWidget();
114 
115 private:
117 
119 
121 
123 };
124 
125 
126 ///////////////////////////////////////////////////////////////////////////////
127 /// CDotMatrixViewFactory
129  : public CObject
130  , public IExtension
131  , public IProjectViewFactory
132 {
133 public:
135 
136  /// @name IExtension interface implementation
137  /// @{
138  virtual string GetExtensionIdentifier() const;
139  virtual string GetExtensionLabel() const;
140  /// @}
141 
142  /// @name IProjectViewFactory interface implementation
143  /// @{
144  virtual IView* CreateInstance() const;
145  virtual IView* CreateInstanceByFingerprint( const TFingerprint& fingerprint ) const;
146 
147  virtual void RegisterIconAliases( wxFileArtProvider& provider );
148  virtual void RegisterCommands( CUICommandRegistry& cmd_reg, wxFileArtProvider& provider );
149 
150  virtual const CProjectViewTypeDescriptor& GetProjectViewTypeDescriptor() const;
151  virtual IOpenViewManager* GetOpenViewManager() { return m_ViewManager; }
152 
153  virtual int TestInputObjects( TConstScopedObjects& objects );
154  virtual vector<int> CombineInputObjects(const TConstScopedObjects& objects);
155  /// @}
156 private:
158 };
159 
160 
161 /* @} */
162 
164 
165 #endif // GUI_PKG_ALIGNMENT___DOT_MATRIX_VIEW__HPP
CDotMatrixViewFactory.
CDotMatrixView.
class CHitMatrixWidget
CObject –.
Definition: ncbiobj.hpp:180
virtual void OnProjectChanged()
virtual void x_CreateMenuBarMenu()
initializes m_MenuBarMenu; override in derived classes
virtual void DestroyViewWindow()=0
destroy Window corresponding to the view
virtual const CViewTypeDescriptor & GetTypeDescriptor() const =0
return an object providing meta information about thei view type
virtual void CreateViewWindow(wxWindow *parent)=0
create Window corresponding to the view
virtual wxWindow * GetWindow()=0
returns a pointer to the wxWindow representing the client
virtual const CObject * x_GetOrigObject() const
CProjectViewEvent.
Definition: document.hpp:62
CProjectViewTypeDescriptor - holds description of a project view type.
CProjectView.
virtual void OnVisibleRangeChanged(const CVisibleRange &, IVisibleRangeClient *)
virtual void x_PostAttachToProject()
virtual void GetSelection(TConstScopedObjects &buf) const
shall return data objects representing selected things, return one data object for every selected thi...
virtual objects::CScope * x_PreAttachToProject(TConstScopedObjects &objects)
virtual void x_OnSetSelection(CSelectionEvent &evt)
override in derived classes in order to handle selection broadcast
virtual void GetVisibleRanges(CVisibleRange &vrange) const
populate a visible range event for broadcasting
CSelectionEvent CSelectionEvent is used for broadcasting selection between views.
Definition: obj_event.hpp:68
CUICommandRegistry is a centralized registry where all application commands should be registered.
Definition: ui_command.hpp:146
CViewTypeDescriptor - holds description of a view type.
Definition: view.hpp:98
IExtension IExtension interface represents an abstract pluggable component.
Definition: extension.hpp:57
IOpenViewManager - interface dealing with a series of open view operations.
IProjectViewFactory.
IView - represents a standard visual part of Workbench UI.
Definition: view.hpp:73
IVisibleRangeClient - represents an object that wants notifications about visible range changes.
CFingerprint identifies an instance of IWMClient and is used for labeling layout positions.
Definition: wm_client.hpp:58
TAlignVector m_Aligns
CIRef< IHitMatrixDataSource > m_DataSource
CRef< COpenViewManager > m_ViewManager
CHitMatrixWidget * m_AlnWidget
virtual IOpenViewManager * GetOpenViewManager()
vector< CConstRef< objects::CSeq_align > > TAlignVector
static CProjectViewTypeDescriptor m_TypeDescr
vector< SConstScopedObject > TConstScopedObjects
Definition: objects.hpp:65
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define NCBI_GUIVIEW_ALIGN_EXPORT
Definition: gui_export.h:544
const CharType(& source)[N]
Definition: pointer.h:1149
Modified on Tue Jul 16 13:24:14 2024 by modify_doxy.py rev. 669887