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

Go to the SVN repository for this file.

1 /* $Id: project_view_impl.cpp 40879 2018-04-25 20:05:11Z 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, Andrey Yazhuk
27  *
28  * File Description:
29  * CProjectView -- abstract base class for GBENCH views
30  */
31 
32 #include <ncbi_pch.hpp>
33 
36 
38 
41 
43 
47 
48 #include <gui/objutils/utils.hpp>
49 
51 #include <gui/objutils/label.hpp>
52 
53 #include <objmgr/util/sequence.hpp>
54 
55 #include <gui/utils/command.hpp>
56 
59 
62 
63 #include <wx/window.h>
64 #include <wx/menu.h>
65 #include <wx/msgdlg.h>
66 
69 
70 BEGIN_EVENT_TABLE(CProjectViewEvtHandler, wxEvtHandler)
76 
79  CProjectViewEvtHandler::OnBroadcastVisibleRange
80  )
81 
82  EVT_MENU(wxID_UNDO, CProjectViewEvtHandler::OnEditUndo)
83  EVT_MENU(wxID_REDO, CProjectViewEvtHandler::OnEditRedo)
84  EVT_UPDATE_UI(wxID_UNDO, CProjectViewEvtHandler::OnUpdateEditUndo)
85  EVT_UPDATE_UI(wxID_REDO, CProjectViewEvtHandler::OnUpdateEditRedo)
87 
89  : m_View( view )
90 {
91  SetEvtHandlerEnabled( false );
92 }
93 
95 {
96  // in wx2.9 event propagation schema has been changed,
97  // there is for-loop rather than ProcessEvent() calls chain.
98  // So we just disable this handler and let other stuff be done.
99 
100  if( wxEvtHandler::ProcessEvent( event ) ){
101  return true;
102  }
103 
104 # if( wxMAJOR_VERSION == 2 && wxMINOR_VERSION < 9 )
105 
106  return TryAfter( event );
107 
108 # else
109 
110  return false;
111 
112 # endif
113 }
114 
115 bool CProjectViewEvtHandler::TryAfter( wxEvent& event )
116 {
117  // In wx2.9 we should call TryHereOnly() however as far as
118  // we have no dynamic events it is safe to use just handler
119  // table processing
120 
121  if( GetEventHashTable().HandleEvent( event, this ) ){
122  return true;
123  }
124 
125 # if( wxMAJOR_VERSION == 2 && wxMINOR_VERSION < 9 )
126 
127  return false;
128 
129 # else
130 
131  return wxEvtHandler::TryAfter( event );
132 
133 # endif
134 }
135 
136 
137 /////////////////////////////////////////////////////////////////////////////
138 /// CProjectView implementation
139 
147 
148 
149 
150 
151 CProjectView::CProjectView() : m_VisibleRangeService()
152 {
153 }
154 
155 
157 {
158  _ASSERT( ! x_HasProject());
159 }
160 
161 
162 bool CProjectView::InitView( TConstScopedObjects& objects, const objects::CUser_object* )
163 {
164  CScope* scope = x_PreAttachToProject( objects );
165 
166  if( scope ){
168  _ASSERT(srv);
169 
170  CRef<CGBWorkspace> ws = srv->GetGBWorkspace();
171  if (!ws) return false;
172 
173  CGBDocument* doc = dynamic_cast<CGBDocument*>(ws->GetProjectFromScope(*scope));
174  _ASSERT(doc);
175 
176  if( doc ){
177  x_AttachToProject( *doc );
178 
179  try {
181  return true;
182 
183  } catch( CException& ){
185 
186  throw;
187  }
188 
189  }
190  }
191 
192  // cannot represent the data
194 
195  return false;
196 }
197 
199 {
200  return NULL;
201 }
202 
204 {
205 }
206 
208 {
210 
211  if (srv) {
212  CRef<CGBWorkspace> ws = srv->GetGBWorkspace();
213  if (!ws) return 0;
214 
215  CGBDocument* doc = dynamic_cast<CGBDocument*>(ws->GetProjectFromId(m_ProjectId));
216  _ASSERT(doc);
217 
218  if (doc) {
219  return &doc->GetUndoManager();
220  }
221  }
222  return 0;
223 }
224 
225 
227  {
229  if (um) {
230  um->Undo();
231  }
232  }
233 
235  {
237  if (um) {
238  um->Redo();
239  }
240  }
241 
243  {
245  if (um) {
246  return um->CanUndo();
247  }
248  return false;
249  }
250 
252  {
254  if (um) {
255  return um->CanRedo();
256  }
257  return false;
258  }
259 
261 {
262  return new CProjectViewEvtHandler( this );
263 }
264 
266 {
267  if( workbench ){
270 
273 
274  CProjectViewBase::SetWorkbench( workbench );
275 
276  GetWindow()->PushEventHandler( x_CreateEventHandler() );
277 
278  } else {
279  if (m_Workbench) {
282  }
283 
284  GetWindow()->PopEventHandler( true );
285 
287  }
288 }
289 
290 
292 {
294 }
295 
296 
298 {
299  _ASSERT(evt);
300 
301 
302  if( evt->GetID() == CViewEvent::eWidgetRangeChanged ){
305 
307 
308  } else {
310  }
311  }
312 }
313 
315 {
316  _ASSERT(evt);
317 
318  if( evt->GetID() == CViewEvent::eWidgetItemActivated ){
320  menu_srv->AddPendingCommand(eCmdOpenViewDefault);
321  }
322 }
323 
324 // this method should be overriden in derived classes to update UI
326 {
327 }
328 
329 
331 {
332  _ASSERT(evt);
333 
335  return;
336  }
337 
338  if (m_SelectionService)
340 
342 }
343 
344 
345 // this method should be overriden in derived classes to update UI
347 {
348 
349 }
350 
351 
353 {
354  m_SelectionService = service;
355 }
356 
357 
358 // uses GetSelection(CSelectionEvent& evt) to obtain Range and Object Selection
359 // an then repackages it to the given TConstScopedObjects container
361 {
362  LOG_POST(Info << "CProjectView::GetSelection() is deprecated, override this "
363  "function in the derived class");
364  CRef<CScope> scope = GetScope();
365  if(scope) {
366  CSelectionEvent evt(*scope); // kind of HACK
367  GetSelection(evt);
368 
369  TConstObjects sel_objs;
370  evt.GetRangeSelectionAsLocs(sel_objs);
371  evt.GetAllObjects(sel_objs);
372 
373  ITERATE(TConstObjects, it, sel_objs) {
374  objs.push_back(SConstScopedObject(*it, scope));
375  }
376  }
377 }
378 
379 
381 {
382  // override this
383 }
384 
385 
386 // this is the default implementation that may be overridden in derived classes
388 {
389  CProjectView* nc_this = const_cast<CProjectView*>(this);
390 
391  if( nc_this->GetWindow() && x_HasProject() ){
392  CScope* scope = GetScope().GetPointer();
393  const CObject* obj = x_GetOrigObject();
394 
395  _ASSERT(obj && scope);
396 
397  objs.push_back(SConstScopedObject(obj, scope));
398  }
399 }
400 
401 /// handles selection broadcast received from Selection Service
402 /// this function acts as a shell, it controlls state and catches exceptions.
403 /// all real work is performed by x_OnSetSelection() that shall be
404 /// implemented in derived classes
406 {
407  try {
408  x_OnSetSelection(evt);
409  } NCBI_CATCH("CProjectView::SetSelection()");
410 }
411 
412 
413 /// override this function in derived classes
415 {
416  // override this
417  _TRACE(typeid(this).name() << " - x_OnSetSelection() is not implemented.");
418 }
419 
420 
421 /// Populate a visible range event prior to broadcasting
423 {
424 }
425 
427  list<TSeqRange>& visible_ranges,
428  CRgbaColor& color,
429  string& label) const
430 {
431  CScope* scope = x_GetScope();
432  if (scope) {
433  /// retrieve visible ranges
434  /// we want the total range for each location
435 
436  CVisibleRange vrange(*scope);
437  GetVisibleRanges(vrange);
438 
440  try {
441  const CSeq_loc& loc = **iter;
442  CScope* scope = GetScope().GetPointer();
443 
444  const CSeq_id& this_id = sequence::GetId(loc, scope);
445 
446  if (CSeqUtils::Match(this_id, id, scope)){
447  visible_ranges.push_back(loc.GetTotalRange());
448  }
449  }
450  catch (std::exception& e){
451  ERR_POST(Error << "CProjectView::GetReflectionInfo(): exception caught " << e.what());
452  }
453  }
454  }
455 
456  /// retrieve a color for this view
457  const CRgbaColor* c = GetColor();
458  if( c ){
459  color = *c;
460  } else {
461  color = CRgbaColor(0.0f, 0.0f, 0.0f, 1.0f);
462  }
463 
464  /// format a label as well
465  string s = GetLabel(eId) + ": ";
466  s += GetLabel( eTypeAndContent );
467  label.swap( s );
468 }
469 
470 
472 {
473  if (!m_SelectionService)
474  return;
475 
476  CScope* scope = GetScope();
477  if (scope) {
478  CSelectionEvent sel_evt(*scope);
479  GetSelection(sel_evt);
480  m_SelectionService->Broadcast(sel_evt, this);
481  }
482 }
483 
484 void CProjectView::OnBroadcastVisibleRange(wxCommandEvent& event)
485 {
487 
488  if (event.GetId() == eCmdVisibleRangeBroadcast) {
490 
491  // SetData();
492  dlg.SetByDefault(true);
493  dlg.ResetRadioButtons(false);
494  dlg.SetBroadcastFlag(policy);
495  dlg.TransferDataToWindow();
496 
497  if (dlg.ShowModal() != wxID_OK)
498  return;
499 
500  dlg.TransferDataFromWindow();
501 
502  int ret = dlg.GetBroadcastFlag();
503  if (ret >= 0)
504  policy = (CVisibleRange::EBasicPolicy)ret;
505  }
506  else {
507  policy = (CVisibleRange::EBasicPolicy)(event.GetId() - eCmdVisibleRangeBroadcast - 1);
508  }
509 
510  BroadcastVisibleRange(policy);
511 }
512 
514 {
515  if (!m_VisibleRangeService) return;
516 
517  try {
518  CVisibleRange vrange(*x_GetScope());
519 
520  GetVisibleRanges(vrange);
521 
522  vrange.SetVisibleRangePolicy(policy);
523 
525 
526  } NCBI_CATCH("CProjectView::BroadcastVisibleRange()");
527 }
528 
529 
531 {
532  CPopupMenuEvent* popup_event = dynamic_cast<CPopupMenuEvent*>( event );
533  bool ok = popup_event && popup_event->GetID() == CPopupMenuEvent::eDecorate;
534 
535  _ASSERT(ok);
536 
537  if( ok ){
538  x_OnDecoratePopupMenu( *popup_event );
539  }
540 }
541 
542 
543 // event handler function - forwards call to the virtial function
545 {
546  CPopupMenuEvent* popup_event = dynamic_cast<CPopupMenuEvent*>(event);
547  bool ok = popup_event && popup_event->GetID() == CPopupMenuEvent::eShow;
548 
549  _ASSERT(ok);
550 
551  if( ok ){
553  }
554 }
555 
556 
557 // default implementation simply injects deleagate menus
558 // override in derived classes if needed
560 {
561  wxMenu* menu = event.GetMenu();
562 
563  // add pluggable commands
564  vector<wxEvtHandler*> handlers;
566  sAddScopedObjectCommands( *menu, handlers, *this, cmd_reg );
567 
568  for( size_t pos = 0; pos < menu->GetMenuItemCount(); pos++ ){
569  wxMenuItem* pos_item = menu->FindItemByPosition( pos );
570 
571  if(
572  pos_item->IsSeparator()
573  && pos_item->GetItemLabel().Cmp( wxT("VRBroadcast") ) == 0
574  ){
575  menu->Insert(
576  ++pos,
578  wxT("&Broadcast Visible Range..."),
579  wxT("Broadcast Visible Range")
580  );
581 
582  menu->InsertCheckItem(
583  ++pos,
585  wxT("&Accept Visible Range Change"),
586  wxT("Accept Visible Range Change")
587  );
588 
589  break;
590  }
591  }
592 }
593 
594 
596 {
597  // if this assertion fails then the derived class has a problem
598  _ASSERT(false); // override in derived classes
599 }
600 
601 
602 WX_DEFINE_MENU(kPrjViewContextMenu)
603  WX_MENU_SEPARATOR_L("Top Actions")
604  WX_MENU_SEPARATOR_L("Zoom")
605  WX_MENU_SEPARATOR_L("Actions")
606  WX_MENU_SEPARATOR_L("Edit")
607  WX_MENU_SEPARATOR_L("Settings")
608 WX_END_MENU()
609 
610 
611 wxMenu* CProjectView::x_CreateContextMenuBackbone()
612 {
613  _ASSERT(m_Workbench);
614 
615  CUICommandRegistry& cmd_reg = m_Workbench->GetUICommandRegistry();
616  return cmd_reg.CreateMenu(kPrjViewContextMenu);
617 }
618 
619 
621  wxMenu& menu,
622  vector<wxEvtHandler*>& handlers,
623  const string& ext_point_id,
625  CUICommandRegistry& cmd_reg
626 ){
627  AddCommandsForScopedObjects( menu, handlers, ext_point_id, objects, &cmd_reg );
628  /*
629  if( ! objects.empty() ) {
630  // get contributed menus
631  vector< CIRef<IObjectCmdContributor> > contributors;
632  GetExtensionAsInterface(ext_point_id, contributors);
633 
634  // Merge contributed menus into the main Menu
635  for( size_t i = 0; i < contributors.size(); i++ ) {
636  IObjectCmdContributor& obj = *contributors[i];
637 
638  IObjectCmdContributor::TContribution contrib = obj.GetMenu(objects);
639  wxMenu* obj_menu = contrib.first;
640  if(obj_menu) {
641  Merge(menu, *obj_menu);
642  delete obj_menu;
643  }
644  wxEvtHandler* handler = contrib.second;
645  if(handler) {
646  handlers.push_back(handler);
647  }
648  }
649  }
650  */
651 }
652 
654  wxMenu& menu,
655  vector<wxEvtHandler*>& handlers,
656  ISelectionClient& obj_provider,
657  CUICommandRegistry& cmd_reg
658 ){
659  TConstScopedObjects sel_objects;
660  obj_provider.GetSelection( sel_objects );
661 
662  if( sel_objects.empty() ){
663  obj_provider.GetMainObject( sel_objects );
664  }
665 
666  static string id( "scoped_objects::cmd_contributor" );
667 
668  sAddScopedObjectCommands( menu, handlers, id, sel_objects, cmd_reg );
669 }
670 
671 
User-defined methods of the data storage class.
EVT_UPDATE_UI(eCmdAlnShowMethodsDlg, CAlnMultiWidget::OnUpdateShowMethodDlg) EVT_UPDATE_UI(eCmdMethodProperties
CEvent - generic event implementation TODO TODO - Attachments.
Definition: event.hpp:86
CGBDocument.
Definition: document.hpp:113
CUndoManager & GetUndoManager()
Definition: document.hpp:158
CObject –.
Definition: ncbiobj.hpp:180
CPopupMenuEvent - an event that is sent when a popup menu needs to be shown.
Definition: popup_event.hpp:54
CProjectService - a service providing API for operations with Workspaces and Projects.
CProjectViewBase - default implementation of IProjectView, the base class for CProjectView and CProje...
virtual void x_ReportInvalidInputData(TConstScopedObjects &objects)
use this function to report incompatible data in InitView()
virtual const CRgbaColor * GetColor() const
returns a color associated with the client, n/a if NULL
virtual CRef< objects::CScope > GetScope() const
virtual void SetWorkbench(IWorkbench *workbench)
IView implementation.
virtual string GetLabel(ELabelType type) const
returns name of the plug-in created this view (view class name)
virtual objects::CScope * x_GetScope() const
virtual void x_AttachToProject(CGBDocument &doc)
ISelectionService * m_SelectionService
virtual wxWindow * GetWindow()=0
returns a pointer to the wxWindow representing the client
virtual bool x_HasProject() const
virtual void x_DetachFromProject()
virtual const CObject * x_GetOrigObject() const
CProjectViewEvtHandler - wxEvtHandler that is attached to view window.
virtual bool TryAfter(wxEvent &event)
virtual bool ProcessEvent(wxEvent &event)
void OnEnableCmdUpdate(wxUpdateUIEvent &event)
void OnBroadcastSelection(wxCommandEvent &)
void OnVRCAllowedChanged(wxCommandEvent &)
void OnUpdateVRCAllowedChanged(wxUpdateUIEvent &event)
CProjectView.
virtual bool CanUndo()
virtual void SetSelection(CSelectionEvent &evt)
handles selection broadcast received from Selection Service this function acts as a shell,...
void OnDecoratePopupMenu(CEvent *event)
void SetVisibleRangeChangeAllowed(bool flag)
virtual void GetMainObject(TConstScopedObjects &buf) const
Adds the main data objects represented by the client to "objects".
void OnShowPopupMenu(CEvent *event)
virtual CUndoManager * x_GetUndoManager()
gets undo manager
virtual ~CProjectView(void)
bool IsVisibleRangeChangeAllowed()
virtual void x_PostAttachToProject()
void x_OnWidgetSelChanged(CEvent *event)
void BroadcastVisibleRange(CVisibleRange::EBasicPolicy bp)
fire a non-recursive visible range changed event
virtual void GetSelection(TConstScopedObjects &buf) const
shall return data objects representing selected things, return one data object for every selected thi...
IVisibleRangeService * m_VisibleRangeService
virtual void OnUndo()
virtual wxEvtHandler * x_CreateEventHandler()
creates vew event handler for using in window event propagation hierarchy
void x_OnWidgetItemActivated(CEvent *event)
virtual void x_OnDecoratePopupMenu(CPopupMenuEvent &event)
virtual void SetSelectionService(ISelectionService *service)
virtual void OnRedo()
virtual bool CanRedo()
virtual void OnWidgetSelChanged()
virtual objects::CScope * x_PreAttachToProject(TConstScopedObjects &objects)
virtual void OnWidgetRangeChanged()
virtual void BroadcastSelection()
virtual void x_OnShowPopupMenu()
void x_OnWidgetRangeChanged(CEvent *event)
private, non-virtual event handlers.
void OnBroadcastVisibleRange(wxCommandEvent &event)
virtual void x_OnSetSelection(CSelectionEvent &evt)
override in derived classes in order to handle selection broadcast
virtual void SetWorkbench(IWorkbench *workbench)
IView implementation.
void GetReflectionInfo(const objects::CSeq_id &id, list< TSeqRange > &visible_ranges, CRgbaColor &color, string &label) const
Retrieve all information relevant to showing view reflection - that is, displaying the location of si...
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...
virtual void GetVisibleRanges(CVisibleRange &vrange) const
populate a visible range event for broadcasting
CRef –.
Definition: ncbiobj.hpp:618
class CRgbaColor provides a simple abstraction for managing colors.
Definition: rgba_color.hpp:58
CScope –.
Definition: scope.hpp:92
CSelectionEvent CSelectionEvent is used for broadcasting selection between views.
Definition: obj_event.hpp:68
void GetAllObjects(TConstObjects &objs) const
Definition: obj_event.cpp:314
void GetRangeSelectionAsLocs(TConstObjects &objs) const
Definition: obj_event.cpp:145
CUICommandRegistry is a centralized registry where all application commands should be registered.
Definition: ui_command.hpp:146
wxMenu * CreateMenu(const SwxMenuItemRec *items)
create a menu from a static definition (see WX_*_MENU macros)
Definition: ui_command.cpp:349
virtual void Undo(wxWindow *window=0)
virtual bool CanUndo()
virtual void Redo(wxWindow *window=0)
virtual bool CanRedo()
@ eWidgetSelectionChanged
a view has been destroyed
Definition: view_event.hpp:55
@ eWidgetItemActivated
Definition: view_event.hpp:65
@ eWidgetRangeChanged
notification from child to parent that the visible range has changed
Definition: view_event.hpp:58
static bool IsAutoBroadcast()
void SetVisibleRangePolicy(EBasicPolicy policy)
static EBasicPolicy GetDefaultVisibleRangePolicy()
list< CConstRef< objects::CSeq_loc > > TLocations
const TLocations & GetLocations() const
IMenuService - Menu Service.
ISelectionClient - represents an object that support a notion of selection.
virtual void GetMainObject(TConstScopedObjects &objects) const =0
Adds the main data objects represented by the client to "objects".
virtual void GetSelection(TConstScopedObjects &objects) const =0
shall return data objects representing selected things, return one data object for every selected thi...
ISelectionService - an interface.
virtual void OnSelectionChanged(ISelectionClient *source)=0
notifies Service and its observers about changes in selection
virtual void Broadcast(CSelectionEvent &evt, ISelectionClient *source)=0
request broadcasting of the given event, Broadcast() notifies observers about changes in selection (d...
IVisibleRangeService - an interface.
virtual void AttachClient(IVisibleRangeClient *client)=0
virtual void DetachClient(IVisibleRangeClient *client)=0
virtual void BroadcastVisibleRange(const CVisibleRange &vrange, IVisibleRangeClient *source)=0
IWorkbench is the central interface in the application framework.
Definition: workbench.hpp:113
GUI command routing and handling framework.
@ eCmdVisibleRangeBroadcast
Definition: commands.hpp:55
@ eCmdOpenViewDefault
Definition: commands.hpp:106
@ eCmdVisibleRangeChangeAllow
Definition: commands.hpp:54
@ eCmdBroadcastSel
Definition: commands.hpp:52
@ eCmdBroadcastSelRange
Definition: commands.hpp:53
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:815
#define NULL
Definition: ncbistd.hpp:225
#define _TRACE(message)
Definition: ncbidbg.hpp:122
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
Definition: ncbidiag.hpp:186
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
Definition: ncbidiag.hpp:226
void Error(CExceptionArgs_Base &args)
Definition: ncbiexpt.hpp:1197
#define NCBI_CATCH(message)
Catch CExceptions as well This macro is deprecated - use *_X or *_XX variant instead of it.
Definition: ncbiexpt.hpp:580
void Info(CExceptionArgs_Base &args)
Definition: ncbiexpt.hpp:1185
CIRef< T > GetServiceByType()
retrieves a typed reference to a service, the name of C++ type is used as the name of the service.
Definition: service.hpp:91
virtual CUICommandRegistry & GetUICommandRegistry()=0
returns an instance of Command Registry associated with the Workbench
static bool Match(const objects::CSeq_id &id1, const objects::CSeq_id &id2, objects::CScope *scope=NULL)
check to see if two seq-ids are identical.
const TEventID GetID(void) const
Inline Implementation.
Definition: event.hpp:164
vector< CConstRef< CObject > > TConstObjects
Definition: objects.hpp:64
#define ON_EVENT(type, id, handler)
#define END_EVENT_MAP()
Ends definition of Command Map.
#define BEGIN_EVENT_MAP(thisClass, baseClass)
Begins definition of Command Map for CEventHandler-derived class.
vector< SConstScopedObject > TConstScopedObjects
Definition: objects.hpp:65
TRange GetTotalRange(void) const
Definition: Seq_loc.hpp:913
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
Definition: ncbiobj.hpp:998
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
static const char label[]
n background color
END_EVENT_TABLE()
#define wxT(x)
Definition: muParser.cpp:41
void AddCommandsForScopedObjects(wxMenu &aMenu, vector< wxEvtHandler * > &handlers, const string &anExtPointId, TConstScopedObjects &objects, CUICommandRegistry *aCmdReg=NULL)
Helper function for adding commands provided by contributors to the menu.
USING_SCOPE(ncbi::objects)
EVT_MENU_RANGE(eCmdVisibleRangeBroadcast, eCmdVisibleRangeBroadcast+CVisibleRange::eBasic_Ignore, CProjectViewEvtHandler::OnBroadcastVisibleRange) CProjectViewEvtHandler
void sAddScopedObjectCommands(wxMenu &menu, vector< wxEvtHandler * > &handlers, const string &ext_point_id, TConstScopedObjects &objects, CUICommandRegistry &cmd_reg)
Helper function for adding commands provided by contributors to the menu.
ViewerWindowBase::OnEditMenu ViewerWindowBase::OnJustification EVT_MENU(MID_SHOW_GEOM_VLTNS, ViewerWindowBase::OnShowGeomVltns) EVT_MENU(MID_FIND_PATTERN
#define _ASSERT
#define WX_DEFINE_MENU(name)
New macros for defining menus for use with CUICommandRegistry.
Definition: ui_command.hpp:266
#define WX_END_MENU()
Definition: ui_command.hpp:294
#define WX_MENU_SEPARATOR_L(label)
Definition: ui_command.hpp:285
Modified on Mon Jul 22 05:03:37 2024 by modify_doxy.py rev. 669887