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

Go to the SVN repository for this file.

1 #ifndef GUI_WIDGETS_ALN_TABLE__ANNOT_COMPARE__HPP
2 #define GUI_WIDGETS_ALN_TABLE__ANNOT_COMPARE__HPP
3 
4 /* $Id: annot_compare.hpp 46019 2021-01-21 13:38:32Z grichenk $
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: Mike DiCuccio
30  *
31  * File Description:
32  *
33  */
34 
35 #include <corelib/ncbiobj.hpp>
36 #include <gui/utils/command.hpp>
39 
40 #include <gui/objutils/objects.hpp>
42 
43 #include <objmgr/scope.hpp>
44 
46 #include <wx/timer.h>
47 
48 
50 
51 class CAnnotCompareModel;
52 
53 ///////////////////////////////////////////////////////////////////////////////
54 /// CAnnotCompareWidget
56  : public CwxTableListCtrl
57 {
58 public:
59  typedef list< CConstRef<objects::CSeq_loc> > TLocations;
61 
62  enum EEventType {
63  eEvent_SelectionChanged
64  };
65  typedef CEvent TEvent;
66 
67  /// the columns we plan to show
68  enum EColumns {
76 
80 
81  eMaxCol /// must be last!
82  };
83 
85 
87  wxWindow* parent,
88  wxWindowID id = wxID_ANY,
89  const wxPoint& pos = wxDefaultPosition,
90  const wxSize& size = wxDefaultSize,
91  long style = wxLC_REPORT | wxLC_VIRTUAL
92  );
93 
94  virtual ~CAnnotCompareWidget();
95 
96  // void SaveSettings(CRegistryWriteView& view) const;
97  // void LoadSettings(CRegistryReadView& view);
98 
99  //void SelectionChanged(const ISelectionModel::CSMNotice& msg);
100  //void GetSelection(TConstObjects& objs) const;
101 
102  /// retrieve a list of the selected locations
103  typedef list< CConstRef<objects::CSeq_loc> > TLocs;
104  void GetSelectedLocations(TLocs& locs) const;
105 
106  void SetDataSource(CAnnotCompareDS& ds);
107  CAnnotCompareDS& GetDataSource();
108 
109  void Update();
110  void UpdateModel();
111 // bool PerformAction(CAnyType& source, TSignal signal);
112 
113  /// @name ITimerListener interface
114  /// @{
115  void OnTimeout(int timer_id);
116  /// @}
117 
118  /// @name Event handlers
119  /// @{
120 
121  void OnFilter();
122  void OnTextReport();
123 
124  /// @}
125 
126 protected:
127  // DECLARE_EVENT_MAP();
128 
129  /// the table's model
131 
132  /// dialog for text report
133  //unique_ptr<CTextReportDlg> m_TextDlg;
134 
135  string m_LabelStr;
136 
137  /// timer for progress updates
138  wxTimer m_Timer;
139 
140  /// handle row double-click events
141  void x_OnDoubleClick();
142 
143  /// event handler for data source update events
144  void x_OnDataSourceUpdated(CEvent*);
145 
146 private:
147  /// prohibited
150 
151  void x_OnRowSelect(CEvent* evt);
152 };
153 
154 
156 
157 #endif // GUI_WIDGETS_ALN_TABLE__ANNOT_COMPARE__HPP
CAnnotCompareDS.
CAnnotCompareWidget.
EColumns
the columns we plan to show
void x_OnRowSelect(CEvent *evt)
CAnnotCompareWidget(const CAnnotCompareWidget &)
prohibited
CAnnotCompareDS::SRow TDSRow
wxTimer m_Timer
timer for progress updates
CRef< CAnnotCompareDS > m_Model
the table's model
list< CConstRef< objects::CSeq_loc > > TLocs
retrieve a list of the selected locations
string m_LabelStr
dialog for text report
list< CConstRef< objects::CSeq_loc > > TLocations
CAnnotCompareWidget & operator=(const CAnnotCompareWidget &)
CEvent - generic event implementation TODO TODO - Attachments.
Definition: event.hpp:86
CwxTableListCtrl - generic wxListCtrl-based Table Control.
GUI command routing and handling framework.
#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_GUIWIDGETS_ALNTABLE_EXPORT
Definition: gui_export.h:522
const struct ncbi::grid::netcache::search::fields::SIZE size
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
static static static wxID_ANY
Modified on Sat May 25 14:15:33 2024 by modify_doxy.py rev. 669887