NCBI C++ ToolKit
view_feattable.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: view_feattable.cpp 31826 2014-11-18 21:27:54Z katargir $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: Mike DiCuccio
27  *
28  * File Description:
29  *
30  */
31 
32 #include <ncbi_pch.hpp>
33 
35 
39 
40 #include <gui/objutils/utils.hpp>
41 #include <gui/objutils/label.hpp>
43 
44 #include <corelib/ncbistre.hpp>
45 
46 #include <serial/typeinfo.hpp>
47 
48 #include <gui/types.hpp>
49 
53 
55 #include <objmgr/util/sequence.hpp>
56 
57 #include <wx/menu.h>
58 #include <wx/sizer.h>
59 #include <wx/statusbr.h>
60 
61 
64 
65 
67  "Feature Table View", // type name
68  "feature_table_view", // icon alias TODO
69  "Show tabular information about features",
70  "The Feature Table View provides a tabular break-down of features for the sequence",
71  "FEAT_TABLE_VIEW", // help ID
72  "Sequence", // category
73  false, // not a singleton
74  "Seq-loc",
76 );
77 
78 /*
79  info.AddApplicableUserType(CGUIUserType::sm_Tp_Annotation, CGUIUserType::sm_SbTp_Features);
80  info.AddApplicableUserType(CGUIUserType::sm_Tp_Feature);
81  info.AddApplicableUserType(CGUIUserType::sm_Tp_Location);
82  info.AddApplicableUserType(CGUIUserType::sm_Tp_Sequence);
83  info.AddApplicableUserType(CGUIUserType::sm_Tp_Sequence_ID);
84  info.AddApplicableUserType(CGUIUserType::sm_Tp_Sequence_Set);
85  info.AddApplicableUserType(CGUIUserType::sm_Tp_EntrezGeneRecord, "");
86  // command info
87  CPluginCommand& args = info.SetViewCommand(CPluginCommand::eCommand_new_view);
88  args.AddArgument("loc", "Location to display",
89  CSeq_loc::GetTypeInfo());
90 
91  CPluginArg& arg =
92  args.AddOptionalArgument("annot", "Limit to Annotation",
93  CSeq_annot::GetTypeInfo());
94  arg.SetHidden(true);
95 */
96 
98  eCmdFind = 13000,
102  //eCmdSettings,
104 };
105 
106 /*
107 static
108 DEFINE_MENU(ViewMenu)
109  SUBMENU("&View")
110  SUBMENU(VIEW_UI_NAME)
111  MENU_ITEM(eCmdFind, "Find...")
112  MENU_ITEM(eCmdSelectActiveColumns, "Select Active Columns")
113  MENU_ITEM(eCmdVisibleRangeChange, "Visible Range Change...")
114  MENU_ITEM(eCmdFilter, "Filter...")
115  MENU_ITEM(eCmdExportToCSV, "Export as Spreadsheet")
116  //MENU_SEPARATOR()
117  //MENU_ITEM(eCmdSettings, "Settings...")
118  END_SUBMENU()
119  END_SUBMENU()
120 END_MENU()
121 
122 
123 static
124 DEFINE_MENU(PopupMenu)
125  MENU_ITEM(eCmdFind, "Find...")
126  MENU_ITEM(eCmdSelectActiveColumns, "Select Active Columns")
127  MENU_ITEM(eCmdVisibleRangeChange, "Visible Range Change...")
128  MENU_ITEM(eCmdFilter, "Filter...")
129  MENU_ITEM(eCmdExportToCSV, "Export as Spreadsheet")
130  //MENU_SEPARATOR()
131  //MENU_ITEM(eCmdSettings, "Settings...")
132 END_MENU()
133 */
134 
135 ///////////////////////////////////////////////////////////////////////////////
136 /// CSelFeatHandle
138 {
139 public:
140  CSelFeatHandle( const CFeatTableDS::SFeatureRow& feat_row ) : m_FeatRow( feat_row ) {}
142 
143 protected:
145 };
146 
147 
148 ///////////////////////////////////////////////////////////////////////////////
149 /// CFeatTableView
151  : m_Panel()
152  , m_StatusBar()
153  , m_FTblWidget()
154  , m_DataSource( new CFeatTableDS() )
155 {
156 }
157 
159 {
160  _ASSERT(m_Panel);
161  return m_Panel;
162 }
163 
165 {
166  static bool initialized = false;
167 
168  // this code should execute only once
169  if( ! initialized ){
170  // register commands
171  //CUICommandRegistry& cmd_reg = m_Workbench->GetUICommandRegistry();
172  //cmd_reg->RegisterCommand( ... );
173 
174  // register icons
175  //wxFileArtProvider& provider = m_Workbench->GetFileArtProvider();
176  //provider.RegisterFileAlias( ... );
177 
178  initialized = true;
179  }
180 }
181 
183 {
185 
186  //CUICommandRegistry& cmd_reg = m_Workbench->GetUICommandRegistry();
187 
188  //m_MenuBarMenu.reset( new wxMenu() );
189 
190  /* TODO commands
191  wxMenu* view_menu = new wxMenu();
192  wxMenu* dm_menu = new wxMenu();
193 
194  cmd_reg->AppendMenuItem(*dm_menu, eCmdChooseSeq);
195  cmd_reg->AppendMenuItem(*dm_menu, eCmdColorByScore);
196 
197  view_menu->Append(wxID_ANY, wxT("Dot Matrix"), dm_menu);
198  m_MenuBarMenu->Append(wxID_ANY, wxT("&View"), view_menu);
199 
200  // create menu
201  m_RootItem.reset(CreateMenuItems(ViewMenu));
202 
203  // init view icon
204  CRef<CResourceManager> mgr = CResourceManager::GetInstance();
205  m_Icon = mgr->GetImage(VIEW_ICON_ALIAS);
206  */
207 }
208 
209 
210 // override function to suppress Navigation toolbar
211 void CFeatTableView::GetCompatibleToolBars(vector<string>& names)
212 {
214 }
215 
216 
217 void CFeatTableView::CreateViewWindow(wxWindow* parent)
218 {
219  _ASSERT( !m_FTblWidget );
220 
221  m_Panel = new wxPanel( parent );
222 
223  // main sizer
224  wxBoxSizer* main_sizer = new wxBoxSizer( wxVERTICAL );
225  m_Panel->SetSizer( main_sizer );
226 
229 
230  m_DataSource->AddListener(this);
231 
234 
235  main_sizer->Add( m_FTblWidget, 1, wxEXPAND );
236 
237  // wxStatusBar
238  m_StatusBar = new wxStatusBar( m_Panel );
239  main_sizer->Add( m_StatusBar, 0, wxEXPAND );
240 
241  //m_Panel->PushEventHandler( new CCommandTransferHandler( m_AlnWidget ) );
242  m_Panel->PushEventHandler( new CCommandToFocusHandler( m_Panel ) );
243 }
244 
245 
247 {
248  if( GetWindow() ){
249  m_Panel->PopEventHandler( true );
250 
252 
254 
255  GetWindow()->Destroy();
256  m_Panel = NULL;
257  m_FTblWidget = NULL;
258  m_StatusBar = NULL;
259  }
260 }
261 
262 
264 {
265  /// restore our table's settings
269 }
270 
271 
273 {
274  /// save our table's settings
278 }
279 
280 
282 {
284 }
285 
287 {
288  if( objects.size() != 1 ){
289  return NULL;
290  }
291 
292  const CObject* object = objects[0].object.GetPointer();
293  CScope* scope = objects[0].scope.GetPointer();
294 
295  for(;;){
296  const CSeq_annot* annot = dynamic_cast<const CSeq_annot*>(object);
297  if( annot ){
298  //! We can fetch CSeq_annot_Handle here.
299  m_OrigObject.Reset( annot );
300  break;
301  }
302 
303  const CSeq_id* seq_id = dynamic_cast<const CSeq_id*>(object);
304  if( seq_id ){
306  loc->SetId( *seq_id );
307 
308  m_OrigObject.Reset( loc );
309  break;
310  }
311 
312  const CSeq_loc* seq_loc = dynamic_cast<const CSeq_loc*>(object);
313  if( seq_loc ){
314  m_OrigObject.Reset( seq_loc );
315  break;
316  }
317 
318  break;
319  }
320 
321  m_Scope.Reset( scope );
322 
323  return m_OrigObject.IsNull() ? NULL : scope;
324 }
325 
327 {
328  if( x_HasProject() ){
330 
331  //m_Sel = CSeqUtils::GetAnnotSelector( CSeq_annot::TData::e_Ftable );
332  //m_DataSource->SetSelector( m_Sel );
333 
334  // LoadSettings();
335  }
336 
338 }
339 
340 
341 
342 
343 bool CFeatTableView::InitView(TConstScopedObjects& objects, const objects::CUser_object* params)
344 {
345  x_MergeObjects( objects );
346 
347  return CProjectView::InitView( objects, params );
348 }
349 
351 {
352  if( evt.GetSubtype() & CProjectViewEvent::eData ){
354  }
355 }
356 
357 
359 {
360  x_Update();
362 }
363 
364 
366 {
367  return m_OrigObject.GetPointer();
368 }
369 
370 
371 /*
372 BEGIN_EVENT_MAP(CFeatTableView, CView)
373  ON_COMMAND(eCmdFilter, &CFeatTableView::OnFilter)
374  ON_COMMAND(eCmdExportToCSV, &CFeatTableView::OnExportToCSV)
375  //ON_COMMAND(eCmdSettings, &CFeatTableView::OnSettings)
376  ON_MESSAGE(CEvent, CViewEvent::eWidgetSelectionChanged, &CFeatTableView::x_OnWidgetSelChanged)
377 END_EVENT_MAP()
378 */
379 
381  ON_MESSAGE(CFeatTableEvent, CFeatTableEvent::eStatusChange, &CFeatTableView::x_OnFeatTableEvent)
383 
384 // handles incoming selection broadcast (overriding CView virtual function)
385 void CFeatTableView::x_OnSetSelection( CSelectionEvent& evt )
386 {
387  //m_StatusBar->SetMessage( "No features." );
388 
389  if( evt.HasObjectSelection() ){ // set Object Selection
390  m_FTblWidget->ClearSelection();
391 
392  TConstObjects sel_objs;
393  evt.GetAllObjects( sel_objs );
394 
395  CScope& scope = *m_DataSource->GetScope();
396 
397  ITERATE( TConstObjects, it_obj, sel_objs ){
398  const CObject& obj = **it_obj;
399 
400  CObjectIndex::TResults results;
401  m_ObjectIndex.GetMatches( obj, scope, results );
402 
403  ITERATE( CObjectIndex::TResults, it_r, results ){
404  const CSelFeatHandle* fh = (const CSelFeatHandle*)(*it_r);
405  m_FTblWidget->SelectDataRow( fh->GetFeatureRow().row_idx );
406  }
407  }
408 
409  //m_FTblWidget->ScrollSelectionToVisible();
410 
411  x_UpdateStatusMessage(); // prepare our status bar message
412  }
413 }
414 
416 {
419 }
420 
421 
423 {
424  /* !!!
425  if( vrange.Clamp( const_cast<CSeq_loc&>(*m_OrigLoc) ) ){
426  x_SetVisibleRange( *m_OrigLoc );
427  }
428  */
429 }
430 
432 {
433  //CProjectView::OnWidgetRangeChanged();
435 }
436 
438 {
440 }
441 
443 {
444  if(m_FTblWidget && x_HasProject()) {
445  m_StatusBar->SetStatusText( wxT("Searching for features...") );
446 
447  m_FTblWidget->Update();
448 
449  // prepare our status bar message
450  //x_UpdateStatusMessage();
451  }
452 }
453 
454 
456 {
457  // prepare our status bar message
458  string status_msg;
459 
460  int total_feats = m_DataSource->GetNumRows();
461  status_msg = NStr::IntToString( total_feats ) + " feature";
462  if( total_feats != 1 ){
463  status_msg += "s";
464  }
465 
466  int visible_feats = m_FTblWidget->GetNumRowsVisible();
467  if( visible_feats != total_feats ){
468  status_msg += ", " + NStr::IntToString( visible_feats );
469  status_msg += " filtered";
470  }
471 
472  int sel_num = m_FTblWidget->GetSelectedItemCount();
473  if( sel_num > 0 ){
474  status_msg += ", " + NStr::IntToString(sel_num);
475  status_msg += " selected";
476  }
477 
478  m_StatusBar->SetStatusText( ToWxString( status_msg ) );
479 }
480 
482 {
484 }
485 
487 {
488  if( m_FTblWidget && x_HasProject() ){
489  CScope* scope = x_GetScope();
490 
491  // add Object selections
492  TConstObjects sel_objs;
493  m_FTblWidget->GetSelection( sel_objs );
494 
495  ITERATE( TConstObjects, it, sel_objs ){
496  objs.push_back( SConstScopedObject(**it, *scope) );
497  }
498  }
499 }
500 
501 
503 {
504  if (x_HasProject()) {
505  // Object Selection
506  TConstObjects sel_objs;
507  m_FTblWidget->GetSelection( sel_objs );
508  evt.AddObjectSelection( sel_objs );
509  }
510 }
511 
512 
513 //rebuild index that is used for selection handling
514 
516 {
517  if( m_DataSource ) {
518  CScope& scope = *m_DataSource->GetScope();
519  m_ObjectIndex.Clear( &scope );
520 
521  for( int row = 0; row < m_DataSource->GetNumRows(); ++row ){
522  const CFeatTableDS::SFeatureRow& sfeat = m_DataSource -> GetFeatureRow( row );
523  const CSeq_feat& feat = m_DataSource -> GetFeature( row );
524  m_ObjectIndex.Add( new CSelFeatHandle( sfeat ), feat );
525  }
526  }
527 }
528 
530 {
531  //TSeqRange range = m_FTblWidget->GetSelectionVisibleRange();
532 
533  /* !TBD
534  CRef<CSeq_loc> loc( new CSeq_loc() );
535  loc->SetInt().SetFrom( range.GetFrom() );
536  loc->SetInt().SetTo( range.GetTo() );
537  loc->SetId( * m_OrigLoc -> GetId() );
538  vrange.AddLocation( *loc );
539  */
540 }
541 
542 
543 void CFeatTableView::SetRegistryPath(const string& reg_path)
544 {
545  m_RegPath = reg_path;
546 }
547 
548 
549 /*
550 void CFeatTableView::OnSettings()
551 {
552  CFeatTablePreferenceDialog dlg;
553  dlg.CenterOnActive();
554 
555  CFeatTableWidget::EVisibleRangeMethod method;
556 
557  // set dialog with current setting - Default is Scroll To
558  method = m_FTblWidget->GetVisibleRangeMethod();
559  if( method == CFeatTableWidget::eEntirelyContained ){
560  dlg.SetEntirelyContained();
561  } else if( method == CFeatTableWidget::eIntersection ){
562  dlg.SetIntersection();
563  } else {
564  dlg.SetScrollTo();
565  }
566 
567  if( dlg.ShowModal() ){
568  // visible range method
569  if (dlg.EntirelyContainedMethod()) {
570  method = CFeatTableWidget::eEntirelyContained;
571  } else if (dlg.ScrollToMethod()) {
572  method = CFeatTableWidget::eScrollTo;
573  } else if (dlg.IntersectionMethod()) {
574  method = CFeatTableWidget::eIntersection;
575  }
576 
577  m_FTblWidget->SetVisibleRangeMethod( method );
578 
579  //? m_DataSource->SetSelector(m_Sel);
580  }
581 }
582 */
583 
584 ///////////////////////////////////////////////////////////////////////////////
585 /// CFeatTableViewFactory
587 {
588  static string sid("feature_table_view_factory");
589  return sid;
590 }
591 
593 {
594  static string slabel("Feature Table View Factory");
595  return slabel;
596 }
597 
598 
600 {
601  string alias = GetViewTypeDescriptor().GetIconAlias();
602  provider.RegisterFileAlias(
603  ToWxString(alias), wxT("feature_table_view.png")
604  );
605 }
606 
607 
609 {
611 }
612 
613 
615 {
616  return new CFeatTableView();
617 }
618 
619 
621 {
622  return NULL;
623 }
624 
625 bool CFeatTableViewFactory::IsCompatibleWith( const CObject& object, objects::CScope& )
626 {
627  const type_info& type = typeid(object);
628 
629  if( typeid(CSeq_loc) == type ) return true;
630  if( typeid(CSeq_id) == type ) return true;
631 
632  if( typeid(CSeq_annot) == type ){
633  const CSeq_annot& annot = dynamic_cast<const CSeq_annot&>(object);
634  return annot.IsFtable();
635  }
636 
637  return false;
638 }
639 
640 
642 {
643  bool found_good = false;
644  bool found_bad = false;
645  for( size_t i = 0; i < objects.size(); i++ ){
646  if( IsCompatibleWith( *objects[i].object, *objects[i].scope ) ){
647  found_good = true;
648  } else {
649  found_bad = true;
650  }
651  }
652 
653  if( found_good ){
654  return fCanShowSeparated | (found_bad ? fCanShowSome : fCanShowAll);
655  }
656  return 0; // can show nothing
657 }
658 
659 
661 {
662  if( objects.size() < 2 ){
663  return true;
664  }
665  // verify that all the objects has the same seq-id
667  TRanges ranges;
668  ITERATE( TConstScopedObjects, iter, objects ){
669  const CSeq_loc* loc = dynamic_cast<const CSeq_loc*> (iter->object.GetPointer());
670  if (loc) {
671  CScope* scope = const_cast<CScope*>(iter->scope.GetPointer());
672  CSeq_id_Handle idh = sequence::GetIdHandle(*loc, scope);
673  TSeqRange range = loc->GetTotalRange();
674  ranges[idh] += range;
675  }
676  }
677  if (ranges.size() == 1) {
678  CRef<objects::CScope> scope = objects[0].scope;
679  CRef<CSeq_loc> loc(new CSeq_loc);
680  TRanges::iterator iter = ranges.begin();
681  loc->SetInt().SetFrom(iter->second.GetFrom());
682  loc->SetInt().SetTo (iter->second.GetTo());
683  loc->SetId(*iter->first.GetSeqId());
684 
685  objects.clear();
686  objects.push_back(
687  SConstScopedObject(loc.GetObject(), scope.GetObject())
688  );
689  return true;
690  } else {
691  return false;
692  }
693 }
694 
695 
IView - represents a standard visual part of Workbench UI.
Definition: view.hpp:72
CEvent - generic event implementation TODO TODO - Attachments.
Definition: event.hpp:85
virtual objects::CScope * x_GetScope() const
virtual void RegisterIconAliases(wxFileArtProvider &provider)
called by the framework to give Factory a chance to register images used by view
virtual int GetNumRows() const
Returns the number of rows in the model.
TReadView GetReadView(const string &section, const string &delim=CGuiRegistry::kDecimalDot) const
get a read-only view at a particular level.
Definition: registry.cpp:1155
CSelectionEvent CSelectionEvent is used for broadcasting selection between views. ...
Definition: obj_event.hpp:67
bool AddObjectSelection(const CObject &obj)
Definition: obj_event.cpp:189
bool IsFtable(void) const
Definition: Seq_annot.cpp:177
static CGuiRegistry & GetInstance()
access the application-wide singleton
Definition: registry.cpp:1124
const CFeatTableDS::SFeatureRow & m_FeatRow
EEventSubtype GetSubtype() const
Definition: document.hpp:93
void x_InitMenuResources()
void Add(ISelObjectHandle *obj_handle, CObject &obj)
CSelFeatHandle.
virtual void x_CreateMenuBarMenu()
initializes m_MenuBarMenu; override in derived classes
wxString ToWxString(const char *s)
Definition: wx_utils.hpp:156
void x_PostAttachToProject()
vector< TRangeWithFuzz > TRanges
Definition: Seq_loc.cpp:4211
NCBI C++ stream class wrappers for triggering between "new" and "old" C++ stream libraries.
virtual void SetRegistryPath(const string &reg_path)
virtual void x_UpdateStatusMessage()
virtual void DestroyViewWindow()
destroy Window corresponding to the view
#define END_EVENT_MAP()
Ends definition of Command Map.
int GetNumRowsVisible() const
virtual void x_RebuildObjectIndex()
wxStatusBar * m_StatusBar
static vector< CConstRef< CObject > > objs
CProjectViewTypeDescriptor - holds description of a project view type.
virtual void x_UpdateContentLabel()
void x_OnFeatTableEvent(CEvent *)
virtual void RegisterFileAlias(const wxArtID &anId, const wxArtClient &aClient, const wxSize &aSize, const wxString &aName, long aType=wxBITMAP_TYPE_ANY, int anIndex=-1)
TRange GetTotalRange(void) const
Definition: Seq_loc.hpp:888
virtual void OnWidgetRangeChanged()
#define NULL
Definition: ncbistd.hpp:225
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:1300
vector< CConstRef< CObject > > TConstObjects
Definition: objects.hpp:101
EFeatTableCommands
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:872
USING_SCOPE(objects)
int i
CRef< objects::CScope > m_Scope
virtual void RemoveListener(CEventHandler *listener)
Remove a listener.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
Definition: ncbistr.hpp:4719
void SetDataSource(CFeatTableDS *ds)
access the data source in a typesafe manner
Definition: feat_table.cpp:93
virtual string GetExtensionLabel() const
returns a displayable label for this extension ( please capitalize the key words - "My Extension" ) ...
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:101
virtual void SaveSettings() const
void Init(const CSerialObject &obj, objects::CScope &scope, const objects::SAnnotSelector *sel=0)
virtual void OnProjectChanged()
CViewTypeDescriptor - holds description of a view type.
Definition: view.hpp:96
virtual wxWindow * GetWindow()
returns a pointer to the wxWindow representing the client
virtual void GetVisibleRanges(CVisibleRange &vrange) const
populate a visible range event for broadcasting
const CFeatTableDS::SFeatureRow & GetFeatureRow() const
CProjectView.
virtual bool x_MergeObjects(TConstScopedObjects &objects)
CFeatTableView.
CFeatTableWidget.
Definition: feat_table.hpp:61
virtual const CViewTypeDescriptor & GetTypeDescriptor() const
return an object providing meta information about thei view type
bool IsNull(void) const THROWS_NONE
Check if pointer is null – same effect as Empty().
Definition: ncbiobj.hpp:1262
virtual const CObject * x_GetOrigObject() const
const CharType(& source)[N]
Definition: pointer.h:1107
our actual features
Definition: map.hpp:337
whole sequence
Definition: Seq_loc_.hpp:100
virtual void LoadSettings()
void SetVisibleRange(const objects::CSeq_loc &loc)
set the visible range for the widget.
Definition: feat_table.cpp:133
TReadWriteView GetReadWriteView(const string &section, const string &delim=CGuiRegistry::kDecimalDot)
get a read-write view at a particular level.
Definition: registry.cpp:1200
CSeq_id_Handle GetIdHandle(const CSeq_loc &loc, CScope *scope)
CFeatTableWidget * m_FTblWidget
virtual void OnWidgetSelChanged()
CFingerprint identifies an instance of IWMClient and is used for labeling layout positions.
Definition: wm_client.hpp:57
CRef< CFeatTableDS > m_DataSource
virtual IView * CreateInstance() const
creates a view instance
vector< SConstScopedObject > TConstScopedObjects
Definition: objects.hpp:103
void SaveTableSettings(const CwxTableListCtrl &table, CGuiRegistry::TReadWriteView view)
CwxTableListCtrl Helper functions.
Definition: table_utils.cpp:67
CScope –.
Definition: scope.hpp:90
void SetInt(TInt &v)
Definition: Seq_loc.hpp:958
virtual void x_Update()
virtual IView * CreateInstanceByFingerprint(const TFingerprint &fingerprint) const
if fingerprint is recognized - creates and returns a new instance
void Clear(objects::CScope *scope)
CObject –.
Definition: ncbiobj.hpp:180
void LoadTableSettings(CwxTableListCtrl &table, const CGuiRegistry::TReadView &view, bool byName=false)
Restote saved Table state from CGuiRegistry.
#define ON_MESSAGE(type, id, handler)
virtual int TestInputObjects(TConstScopedObjects &objects)
tests input objects (probably using object conversion, or not) and returns a combination of ETestResu...
virtual void OnWidgetSelChanged()
#define wxT(x)
Definition: muParser.cpp:41
virtual bool InitView(TConstScopedObjects &objects, const objects::CUser_object *params)
initialize view with data, inside this function the view must call CProjectService::AttachView to con...
CRef< objects::CScope > GetScope() const
virtual void GetSelection(CSelectionEvent &evt) const
get selection for broadcasting
CProjectViewEvent.
Definition: document.hpp:59
virtual const CViewTypeDescriptor & GetViewTypeDescriptor() const
returns a Descriptor for the View Type supported by the Factory
CSelFeatHandle(const CFeatTableDS::SFeatureRow &feat_row)
virtual bool IsCompatibleWith(const CObject &object, objects::CScope &scope)
#define _ASSERT
CFeatTableView()
CFeatTableView.
CProjectViewTypeDescriptor s_FeatTableViewTypeDescr("Feature Table View","feature_table_view","Show tabular information about features","The Feature Table View provides a tabular break-down of features for the sequence","FEAT_TABLE_VIEW","Sequence", false,"Seq-loc", eSimilarObjectsAccepted)
virtual void GetCompatibleToolBars(vector< string > &names)
returns the names of toolbars compatible with this class (toolbars that are relevant and useful in th...
namespace ncbi::objects::
Definition: Seq_feat.hpp:55
TObjectType * GetPointer(void) const THROWS_NONE
Get pointer,.
Definition: ncbiobj.hpp:1498
TObjectType & GetObject(void)
Get object.
Definition: ncbiobj.hpp:950
virtual void CreateViewWindow(wxWindow *parent)
create Window corresponding to the view
virtual void OnVisibleRangeChanged(const CVisibleRange &vrange, IVisibleRangeClient *source)
#define BEGIN_EVENT_MAP(thisClass, baseClass)
Begins definition of Command Map for CEventHandler-derived class.
CFeatTableDS Data source for Feature Table widget.
virtual bool InitView(TConstScopedObjects &objects, const objects::CUser_object *params)
initialize view with data, inside this function the view must call CProjectService::AttachView to con...
CObjectIndex m_ObjectIndex
virtual void AddListener(CEventHandler *listener, int pool_name=ePool_Default)
Add a listener.
Definition: set.hpp:44
virtual bool x_HasProject() const
void GetSelection(TConstObjects &objs) const
Get the selected objects.
Definition: feat_table.cpp:160
void SetId(CSeq_id &id)
set the 'id' field in all parts of this location
Definition: Seq_loc.cpp:3455
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:98
CConstRef< CSerialObject > m_OrigObject
original data object passed to the view
objects::CScope * x_PreAttachToProject(TConstScopedObjects &objects)
IVisibleRangeClient - represents an object that wants notifications about visible range changes...
virtual const string & GetIconAlias() const
Definition: ui_object.cpp:119
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:746
virtual string GetExtensionIdentifier() const
CFeatTableViewFactory.
virtual const CProjectViewTypeDescriptor & GetProjectViewTypeDescriptor() const
returns a Descriptor for the View Type supported by the Factory
virtual void x_SetVisibleRange(const objects::CSeq_loc &loc)
Modified on Thu Aug 27 15:31:32 2015 by modify_doxy.py rev. 426318