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

Go to the SVN repository for this file.

1 /* $Id: open_view_dlg.cpp 47598 2023-10-30 19:16:39Z asztalos $
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:
27  *
28  * File Description:
29  *
30  */
31 
32 #include <ncbi_pch.hpp>
33 
35 
38 
40 
43 
46 
47 #include <wx/sizer.h>
48 #include <wx/button.h>
49 #include <wx/bitmap.h>
50 #include <wx/icon.h>
51 #include <wx/checkbox.h>
52 #include <wx/valgen.h>
53 
54 
56 
57 
58 ///////////////////////////////////////////////////////////////////////////////
59 /// CToolManagerItem
61  public CObject,
63 {
64 public:
65  CViewFactoryItem(IProjectViewFactory& factory, bool showDefault = false)
66  : m_Factory(&factory), m_ShowDefault(showDefault)
67  {
68  }
69 
70  virtual const IUIObject& GetDescriptor() const
71  {
72  return m_Factory->GetViewTypeDescriptor();
73  }
74 
75  virtual string GetCategory()
76  {
77  return m_Factory->GetViewTypeDescriptor().GetCategory();
78  }
79 
80  virtual bool ShowDefault() const { return m_ShowDefault; }
81 
82 
85 };
86 
87 ///////////////////////////////////////////////////////////////////////////////
88 /// COpenViewDlg
89 
90 IMPLEMENT_DYNAMIC_CLASS( COpenViewDlg, CDialog )
91 
92 BEGIN_EVENT_TABLE( COpenViewDlg, CDialog )
93 ////@begin COpenViewDlg event table entries
94  EVT_INIT_DIALOG( COpenViewDlg::OnInitDialog )
95 
96  EVT_BUTTON( wxID_BACKWARD, COpenViewDlg::OnBackwardClick )
97 
98  EVT_BUTTON( wxID_FORWARD, COpenViewDlg::OnForwardClick )
99 
100 ////@end COpenViewDlg event table entries
101 
103  EVT_LISTBOX_DCLICK(wxID_ANY, COpenViewDlg::OnViewSelected)
104  EVT_LIST_ITEM_ACTIVATED(wxID_ANY, COpenViewDlg::OnListItemActivate)
105  EVT_MENU( wxID_SELECTALL, COpenViewDlg::OnSelectAll )
107 
108 
110 {
111  Init();
112 }
113 
114 
115 COpenViewDlg::COpenViewDlg( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
116 {
117  Init();
118  Create(parent, id, caption, pos, size, style);
119 }
120 
121 
122 bool COpenViewDlg::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
123 {
124 ////@begin COpenViewDlg creation
125  SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
126  CDialog::Create( parent, id, caption, pos, size, style );
127 
128  CreateControls();
129  if( GetSizer() ){
130  GetSizer()->SetSizeHints(this);
131  }
132  Centre();
133 ////@end COpenViewDlg creation
134 
137 
138  return true;
139 }
140 
142 {
143 ////@begin COpenViewDlg destruction
144 ////@end COpenViewDlg destruction
145 }
146 
147 
149 {
150 ////@begin COpenViewDlg member initialisation
151  m_Panel = NULL;
152  m_BackBtn = NULL;
153  m_NextBtn = NULL;
154 ////@end COpenViewDlg member initialisation
155 
156  m_ItemPanel = NULL;
158  m_CurrPanel = NULL;
159  m_CompatibleOnly = false;
160 
162 }
163 
164 
166 {
167 ////@begin COpenViewDlg content construction
168  // Generated by DialogBlocks, 01/07/2009 13:07:46 (unregistered)
169 
170  COpenViewDlg* itemCDialog1 = this;
171 
172  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
173  itemCDialog1->SetSizer(itemBoxSizer2);
174 
175  m_Panel = new wxPanel( itemCDialog1, ID_OPENVIEWPANEL, wxDefaultPosition, wxSize(400, 300), wxNO_BORDER|wxFULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL );
176  itemBoxSizer2->Add(m_Panel, 1, wxGROW, 5);
177 
178  wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxVERTICAL);
179  m_Panel->SetSizer(itemBoxSizer4);
180 
181  wxStaticLine* itemStaticLine5 = new wxStaticLine( itemCDialog1, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
182  itemBoxSizer2->Add(itemStaticLine5, 0, wxGROW|wxALL, 5);
183 
184  wxBoxSizer* itemBoxSizer6 = new wxBoxSizer(wxHORIZONTAL);
185  itemBoxSizer2->Add(itemBoxSizer6, 0, wxGROW|wxLEFT|wxRIGHT, 5);
186 
187  wxHyperlinkCtrl* itemHyperlinkCtrl7 = new wxHyperlinkCtrl( itemCDialog1, ID_HELPLINK, _("Help"), wxT("https://www.ncbi.nlm.nih.gov/tools/gbench/"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
188  itemHyperlinkCtrl7->SetForegroundColour(wxColour(192, 192, 192));
189  itemBoxSizer6->Add(itemHyperlinkCtrl7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
190 
191  itemBoxSizer6->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
192 
193  wxBoxSizer* itemBoxSizer9 = new wxBoxSizer(wxHORIZONTAL);
194  itemBoxSizer6->Add(itemBoxSizer9, 0, wxALIGN_CENTER_VERTICAL, 5);
195 
196  m_BackBtn = new wxButton( itemCDialog1, wxID_BACKWARD, _("< &Back"), wxDefaultPosition, wxDefaultSize, 0 );
197  itemBoxSizer9->Add(m_BackBtn, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxBOTTOM, 5);
198 
199  // in wxCocoa, we get a little button overlap here without the spacer. I believe
200  // this is a bug, but we need to pad for now. The variable is added
201  // to create a syntax error if this is overwritten by DialogBlocks
202  bool spacer_code_included = true;
203 #ifdef __WXOSX_COCOA__
204  itemBoxSizer9->AddSpacer(6);
205 #endif
206 
207  m_NextBtn = new wxButton( itemCDialog1, wxID_FORWARD, _("&Next >"), wxDefaultPosition, wxDefaultSize, 0 );
208  m_NextBtn->SetDefault();
209  itemBoxSizer9->Add(m_NextBtn, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5);
210 
211  wxButton* itemButton12 = new wxButton( itemCDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
212  itemBoxSizer6->Add(itemButton12, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
213 
214 ////@end COpenViewDlg content construction
215 
216  if (!spacer_code_included) {
217  // If spacer_code_included is not defined, it has been overwritten
218  // so you must add the following code after m_BackBtn is added and
219  // before m_NextBtn is added. We need this since that section of code
220  // can be overridden by DialogBlocks.
221  /*
222  // in wxCocoa, we get a little button overlap here without the spacer. I believe
223  // this is a bug, but we need to pad for now. The variable is added
224  // to create a syntax error if this is overwritten by DialogBlocks
225  bool spacer_code included = true;
226 #ifdef __WXOSX_COCOA__
227  itemBoxSizer9->AddSpacer(6);
228 #endif
229  */
230  }
231 
232  m_ViewListPanel = new wxPanel( m_Panel, wxID_ANY, wxDefaultPosition, wxSize(400, 300) );
233  wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxVERTICAL);
234  m_ViewListPanel->SetSizer(itemBoxSizer13);
235 
237  m_ItemPanel->SetItemTypeLabel("view");
239  CMapControl::SProperties& props = map_control->GetProperties();
240  props.m_SingleColumn = true;
241  itemBoxSizer13->Add(m_ItemPanel, 1, wxGROW, 5);
242 
243  wxCheckBox* onlyCheckBox = new wxCheckBox( m_ViewListPanel, ID_ONLY, wxT("Show only compatible views"), wxDefaultPosition, wxDefaultSize, 0 );
244  onlyCheckBox->SetValue(m_CompatibleOnly);
245  itemBoxSizer13->Add(onlyCheckBox, 0, wxALIGN_LEFT|wxALL, 5);
246  onlyCheckBox->SetValidator( wxGenericValidator(& m_CompatibleOnly) );
247 
249  x_UpdateButtons();
250 }
251 
252 
254 {
255  m_Factories = factories;
256  for( size_t i =0; i < m_Factories.size(); i++ ){
257  IOpenViewManager* manager = m_Factories[i]->GetOpenViewManager();
258  if( manager ){
259  manager->InitUI();
260  manager->SetParentWindow( m_Panel );
261 
262  if( !m_RegPath.empty() ){
263  IRegSettings* rgs = dynamic_cast<IRegSettings*>( manager );
264  if( rgs ){
265  string sub_section = m_Factories[i]->GetViewTypeDescriptor().GetLabel();
266  rgs->SetRegistryPath( m_RegPath + "." + sub_section );
267  }
268  }
269  }
270  }
271 
272  m_CompatibleFactories.clear();
273  m_CompatibleEmpty = true;
274 
276 }
277 
279 {
280  m_InputObjects = input_objects;
281 
282  if (m_InputObjects.size() == 1) {
283  CIRef<IGuiObjectInfo> gui_info(CreateObjectInterface<IGuiObjectInfo>(m_InputObjects[0], NULL));
284  if (!gui_info)
285  return;
286  m_InputCategory = gui_info->GetViewCategory();
287  }
288 
289  // Enable Default view functionality
291 
292 }
293 
295 {
297  CViewFactoryItem* fc_item = dynamic_cast<CViewFactoryItem*>(item.GetPointer());
298  if( fc_item != NULL ){
299  return fc_item->m_Factory;
300  } else {
301  return TFactoryRef();
302  }
303 }
304 
305 
306 void COpenViewDlg::OnInitDialog( wxInitDialogEvent& event )
307 {
308  //x_UpdateViewPanel();
309  wxDialog::OnInitDialog(event);
310 
311 }
312 
313 
314 void COpenViewDlg::OnOnlyClick( wxCommandEvent& event )
315 {
316  m_ViewListPanel->TransferDataFromWindow();
317 
319 }
320 
321 
322 void COpenViewDlg::OnBackwardClick( wxCommandEvent& event )
323 {
325 }
326 
327 
328 void COpenViewDlg::OnForwardClick( wxCommandEvent& event )
329 {
331  // this is the first step
332  OnViewSelected( event );
333  } else {
335  }
336 }
337 
338 void COpenViewDlg::OnViewSelected( wxCommandEvent& event )
339 {
340  TFactoryRef factory = GetSelectedFactory();
341  if( factory.IsNull() ){
342  //! should be replaced by NcbiMessageBox
343  wxMessageBox(
344  wxT("Please select a view to be opened."),
345  wxT("Open View"), wxOK | wxICON_EXCLAMATION, this
346  );
347 
348  return;
349  }
350 
351  m_CurrFactory = factory;
352 
353  IOpenViewManager* manager = factory->GetOpenViewManager();
354  if( !manager ){
355  manager = m_DefaultManager.GetPointer();
357  }
358  m_CurrManager = manager;
359 
360  m_CurrManager->SetInputObjects( m_InputObjects );
362 }
363 
364 
365 void COpenViewDlg::OnListItemActivate( wxListEvent &event )
366 {
368 }
369 
370 void COpenViewDlg::OnSelectAll( wxCommandEvent &anEvt )
371 {
372  anEvt.Skip();
373 }
374 
375 void COpenViewDlg::SetRegistryPath(const string& path)
376 {
377  m_RegPath = path; // store for later use
378  m_ItemPanel->SetRegistryPath( path + ".ItemsPanel" );
379  m_DefaultManager->SetRegistryPath( path + ".DefaultManager" );
380 
381  /// set Registry paths for all Managers
382  /// each Manager will get a section located under the dialog's section
383  for( size_t i =0; i < m_Factories.size(); i++ ){
384  IOpenViewManager* manager = m_Factories[i]->GetOpenViewManager();
385  if( manager ){
386  IRegSettings* rgs = dynamic_cast<IRegSettings*>( manager );
387  if( rgs ){
388  string sub_section = m_Factories[i]->GetViewTypeDescriptor().GetLabel();
389  rgs->SetRegistryPath( m_RegPath + "." + sub_section );
390  }
391  }
392  }
393 }
394 
395 void COpenViewDlg::EndModal( int ret_code )
396 {
397  SaveSettings();
398 
399  for (size_t i =0; i < m_Factories.size(); i++) {
400  IOpenViewManager* manager = m_Factories[i]->GetOpenViewManager();
401  if( manager ){
402  manager->CleanUI();
403  }
404  }
405 
408 
409  wxDialog::EndModal( ret_code );
410 }
411 
412 
413 static const char* kOnlyCompatibleTag = "OnlyCompatible";
414 static const char* kSelOptionTag = "SelectedOption";
415 static const char* kDefaultItem = "DefaultView.";
416 
418 {
419  if( !m_RegPath.empty() ){
420  // save Items Panel
423 
424  // remember the selected option
425  if( m_CurrFactory ){
426  string mgr_label = m_CurrFactory->GetViewTypeDescriptor().GetLabel();
427  view.Set(kSelOptionTag, mgr_label);
428  }
429 
430  // save Managers' settigns
432 
433  for( size_t i =0; i < m_Factories.size(); i++ ){
434  const IRegSettings* rgs =
435  dynamic_cast<const IRegSettings*>(m_Factories[i].GetPointer())
436  ;
437  if( rgs ){
438  rgs->SaveSettings();
439  }
440  }
441 
442  if (!m_InputCategory.empty()) {
443  string defaultItem = m_ItemPanel->m_MapWidget->GetDefaultItem();
444  view.Set(kDefaultItem + m_InputCategory, defaultItem);
445  }
446  }
447 }
448 
450 {
451  if( !m_RegPath.empty() ){
452  // load Items panel settings
455 
456  // load the default option
457  string sel_mgr_label = view.GetString(kSelOptionTag, "empty");
458 
459  // load Managers' settigns and find the selected manager
461 
462  for (size_t i =0; i < m_Factories.size(); i++) {
463  IRegSettings* rgs = dynamic_cast<IRegSettings*>(m_Factories[i].GetPointer());
464  if( rgs ){
465  rgs->LoadSettings();
466  }
467  // check whether this is the selected manager
468  string mgr_label = m_Factories[i]->GetViewTypeDescriptor().GetLabel();
469  if( mgr_label == sel_mgr_label ){
471 
472  IOpenViewManager* manager = m_CurrFactory->GetOpenViewManager();
473  if( !manager ){
474  manager = m_DefaultManager.GetPointer();
476  }
477 
478  m_CurrManager = manager; // found the selected manager
479  }
480  }
481 
482  if (!m_InputCategory.empty()) {
483  string defaultItem = view.GetString(kDefaultItem + m_InputCategory);
484  m_ItemPanel->m_MapWidget->SetDefaultItem(defaultItem);
485  }
486 
487  m_ViewListPanel->TransferDataToWindow();
488 
490  }
491 }
492 
494 {
495  if (objects.size() != 1)
496  return "";
497 
498  CIRef<IGuiObjectInfo> gui_info(CreateObjectInterface<IGuiObjectInfo>(objects[0], NULL));
499  if (!gui_info)
500  return "";
501 
502  string inputCategory = gui_info->GetViewCategory();
503 
504  return CGuiRegistry::GetInstance().GetString(reg_path + "." + kDefaultItem + inputCategory);
505 }
506 
508 {
509  return true;
510 }
511 
512 
513 wxBitmap COpenViewDlg::GetBitmapResource( const wxString& name )
514 {
515  // Bitmap retrieval
516 ////@begin COpenViewDlg bitmap retrieval
517  wxUnusedVar(name);
518  return wxNullBitmap;
519 ////@end COpenViewDlg bitmap retrieval
520 }
521 
522 
523 wxIcon COpenViewDlg::GetIconResource( const wxString& name )
524 {
525  // Icon retrieval
526 ////@begin COpenViewDlg icon retrieval
527  wxUnusedVar(name);
528  return wxNullIcon;
529 ////@end COpenViewDlg icon retrieval
530 }
531 
533 {
534  TFactories* factories = NULL;
535  if( m_CompatibleOnly ){
536  if( m_CompatibleEmpty ){
537  // build a list of compatible factories
539  for( size_t i = 0; i < m_Factories.size(); i++ ){
540  TFactoryRef& factory_ref = m_Factories[i];
541  int test = factory_ref->TestInputObjects( m_InputObjects );
542  if( test & good_mask ){
543  m_CompatibleFactories.push_back( factory_ref );
544  }
545  }
546  m_CompatibleEmpty = false; // do this only once
547  }
548  factories = &m_CompatibleFactories;
549  } else {
550  factories = &m_Factories;
551  }
552 
553  // create map items
554  typedef CIRef<IItemWithDescription> TItemRef;
555  vector<TItemRef> items;
556  for( size_t i = 0; i < factories->size(); i++ ){
557  bool showDefault = false;
558 
559  TFactoryRef& factory_ref = (*factories)[i];
560 
561  if (m_InputObjects.size() == 1) {
562  int test = factory_ref->TestInputObjects( m_InputObjects );
564  showDefault = true;
565  }
566 
567  TItemRef item( new CViewFactoryItem( *factory_ref, showDefault ) );
568  items.push_back( item );
569  }
570 
571  // reset panel
572  m_ItemPanel->SetItems( items );
573 }
574 
575 
576 void COpenViewDlg::x_SetCurrentPanel( wxPanel* panel, const wxString& caption )
577 {
578  if (panel == m_CurrPanel) {
579  return;
580  }
581 
582  if (m_CurrPanel) {
583  m_CurrPanel->Hide();
584  m_CurrPanel = NULL;
585  SetTitle( wxT("") );
586  }
587  if (panel) {
588  if (panel->GetContainingSizer() != m_Panel->GetSizer()) {
589  m_Panel->GetSizer()->Add(panel, 1, wxEXPAND | wxALL, 5);
590  }
591  m_CurrPanel = panel;
592  SetTitle(caption);
593 
594  m_CurrPanel->Show();
595  m_Panel->Layout();
596  m_CurrPanel->SetFocus();
597  }
598  Layout();
599 }
600 
601 
603 {
604  if( m_CurrManager->DoTransition( action ) ){
605 
606  if( m_CurrManager->IsCompletedState() ){
607  try {
608  // we are done.
609  m_OutputObjects = m_CurrManager->GetOutputObjects();
610  m_OutputIndices = m_CurrManager->GetOutputIndices();
611 
612  EndModal( wxID_OK );
613 
614  } catch( CException& ex ){
615  EndModal( wxID_CANCEL );
616 
617  //!should be replaced by NcbiMessageBox
618  wxMessageBox(
619  wxT("Particular kind of this input object is not supported:\n")
620  + ToWxString( ex.GetMsg() ),
621  wxT("Open View"), wxOK | wxICON_EXCLAMATION
622  );
623  }
624 
625  } else {
626  wxPanel* new_panel = m_CurrManager->GetCurrentPanel();
627 
628  if( new_panel == NULL ){
629  // pre-initial state
631 
632  } else {
633  wxString title = SYMBOL_COPENVIEWDLG_TITLE;
634  title += wxT(" - ");
635 
636  if( m_CurrFactory.NotNull() ){
637  title += ToWxString(m_CurrFactory->GetViewTypeDescriptor().GetLabel());
638  }
639 
640  x_SetCurrentPanel( new_panel, title );
641  }
642  }
643  }
644 
645  x_UpdateButtons();
646 }
647 
649 {
650  bool can_back = false;
651  bool can_next = true;
652  bool final = false;
653 
654  if( m_CurrManager ){
655  can_back = m_CurrManager->CanDo( IOpenViewManager::eBack );
656  can_next = m_CurrManager->CanDo( IOpenViewManager::eNext );
657  final = m_CurrManager->AtFinalStep();
658  }
659 
660  m_BackBtn->Show( can_back );
661  m_NextBtn->Show( can_next );
662  m_NextBtn->SetLabel( final? wxT("Finish") : wxT("Next >") );
663 
664  Layout();
665 }
666 
668 
669 
670 
EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX, CAdjustFeaturesForGaps::OnKnownUnknownSelected) EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX1
CDialog.
Definition: dialog.hpp:47
virtual void SaveSettings() const
Definition: dialog.cpp:67
string m_RegPath
Definition: dialog.hpp:70
virtual CMapControl * GetMapControl()
void SetInputCategory(const string &category)
string GetDefaultItem() const
void SetDefaultItem(const string &label)
static CGuiRegistry & GetInstance()
access the application-wide singleton
Definition: registry.cpp:400
string GetString(const string &key, const string &default_val=kEmptyStr) const
Definition: registry.cpp:148
CItemSelectionPanel.
CMapControl owns all its items.
Definition: map_control.hpp:67
SProperties & GetProperties()
CObject –.
Definition: ncbiobj.hpp:180
CIRef< IProjectViewFactory > TFactoryRef
TConstScopedObjects m_InputObjects
The original input objects that serve as input arguments for object converter.
wxPanel * m_Panel
void OnInitDialog(wxInitDialogEvent &event)
static string GetDefaultFactoryLabel(const string &reg_path, TConstScopedObjects &objects)
vector< TFactoryRef > TFactories
wxButton * m_BackBtn
wxBitmap GetBitmapResource(const wxString &name)
virtual void EndModal(int ret_code)
void x_SetCurrentPanel(wxPanel *panel, const wxString &caption=_("Open View"))
wxButton * m_NextBtn
static bool ShowToolTips()
void OnBackwardClick(wxCommandEvent &event)
CItemSelectionPanel * m_ItemPanel
void OnOnlyClick(wxCommandEvent &event)
string m_InputCategory
wxPanel * m_ViewListPanel
virtual void SetRegistryPath(const string &path)
void SetInputObjects(const TConstScopedObjects &input_objects)
wxIcon GetIconResource(const wxString &name)
TConstScopedObjects m_OutputObjects
The output objects after view-specific object conversion and possible object aggregation.
wxPanel * m_CurrPanel
TFactories m_CompatibleFactories
void x_DoTransition(IOpenViewManager::EAction action)
TFactoryRef GetSelectedFactory()
virtual void x_LoadSettings(const CRegistryReadView &view)
override these functions in derived classes
void x_UpdateViewPanel()
void OnForwardClick(wxCommandEvent &event)
CRef< COpenViewManager > m_DefaultManager
TManagerRef m_CurrManager
void SetFactories(TFactories &factories)
TFactories m_Factories
void OnViewSelected(wxCommandEvent &event)
void CreateControls()
void x_UpdateButtons()
void OnListItemActivate(wxListEvent &event)
void OnSelectAll(wxCommandEvent &anEvt)
virtual void x_SaveSettings(CRegistryWriteView view) const
vector< int > m_OutputIndices
COpenViewDlg()
COpenViewDlg.
TFactoryRef m_CurrFactory
bool Create(wxWindow *parent, wxWindowID id=ID_COPENVIEWDLG, const wxString &caption=_("Open View"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxTAB_TRAVERSAL)
virtual void CleanUI()
clean UI objects associated with the Manager
virtual void SetParentWindow(wxWindow *parent)
void SetProjectViewFactory(IProjectViewFactory *factory)
virtual void SaveSettings() const
virtual void InitUI()
initialize the Manager before using in UI (set it to Initial state)
virtual void SetRegistryPath(const string &path)
class CRegistryReadView provides a nested hierarchical view at a particular key.
Definition: reg_view.hpp:58
bool GetBool(const string &key, bool default_val=false) const
Definition: reg_view.cpp:241
string GetString(const string &key, const string &default_val=kEmptyStr) const
Definition: reg_view.cpp:246
void Set(const string &key, int val)
access a named key at this level, with no recursion
Definition: reg_view.cpp:533
CToolManagerItem.
CViewFactoryItem(IProjectViewFactory &factory, bool showDefault=false)
virtual string GetCategory()
CIRef< IProjectViewFactory > m_Factory
virtual const IUIObject & GetDescriptor() const
virtual bool ShowDefault() const
IOpenViewManager - interface dealing with a series of open view operations.
virtual void CleanUI()=0
clean UI objects associated with the Manager
virtual void InitUI()=0
initialize the Manager before using in UI (set it to Initial state)
virtual void SetParentWindow(wxWindow *parent)=0
IProjectViewFactory.
IRegSettings An interface for objects that save / restore settings using CGuiRegistry.
virtual void SaveSettings() const =0
virtual void LoadSettings()=0
virtual void SetRegistryPath(const string &path)=0
IUIObject - object that provides basic properties often required in a UI object.
Definition: ui_object.hpp:63
#define _(proto)
Definition: ct_nlmzip_i.h:78
#define test(a, b, c, d, e)
Definition: numeric.c:170
static void Init(void)
Definition: cursor6.c:76
#define NULL
Definition: ncbistd.hpp:225
const string & GetMsg(void) const
Get message string.
Definition: ncbiexpt.cpp:461
void SetItemTypeLabel(const string &label)
virtual void SetRegistryPath(const string &path)
virtual void SaveSettings() const
void SetItems(vector< TItemRef > &items)
CGroupMapWidget * m_MapWidget
vector< SConstScopedObject > TConstScopedObjects
Definition: objects.hpp:65
bool NotNull(void) const THROWS_NONE
Check if pointer is not null – same effect as NotEmpty().
Definition: ncbiobj.hpp:744
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
Definition: ncbiobj.hpp:998
bool IsNull(void) const THROWS_NONE
Check if pointer is null – same effect as Empty().
Definition: ncbiobj.hpp:735
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
END_EVENT_TABLE()
int i
#define wxT(x)
Definition: muParser.cpp:41
const struct ncbi::grid::netcache::search::fields::SIZE size
static const char * kOnlyCompatibleTag
static const char * kDefaultItem
static const char * kSelOptionTag
#define SYMBOL_COPENVIEWDLG_TITLE
#define ID_ONLY
static static static wxID_ANY
ViewerWindowBase::OnEditMenu ViewerWindowBase::OnJustification EVT_MENU(MID_SHOW_GEOM_VLTNS, ViewerWindowBase::OnShowGeomVltns) EVT_MENU(MID_FIND_PATTERN
static void SetTitle(CRef< CSeq_entry > entry, string title)
wxString ToWxString(const string &s)
Definition: wx_utils.hpp:173
Modified on Fri Sep 20 14:58:32 2024 by modify_doxy.py rev. 669887