SetEvtHandlerEnabled(
false);
100 if( wxEvtHandler::ProcessEvent( event ) ){
104 # if( wxMAJOR_VERSION == 2 && wxMINOR_VERSION < 9 ) 121 if( GetEventHashTable().HandleEvent( event,
this) ){
125 # if( wxMAJOR_VERSION == 2 && wxMINOR_VERSION < 9 ) 131 returnwxEvtHandler::TryAfter( event );
171 if(!ws)
return false;
362 LOG_POST(
Info<<
"CProjectView::GetSelection() is deprecated, override this " 363 "function in the derived class");
409}
NCBI_CATCH(
"CProjectView::SetSelection()");
417 _TRACE(
typeid(
this).name() <<
" - x_OnSetSelection() is not implemented.");
427list<TSeqRange>& visible_ranges,
429 string&
label)
const 450 catch(std::exception& e){
451 ERR_POST(
Error<<
"CProjectView::GetReflectionInfo(): exception caught "<< e.what());
495dlg.TransferDataToWindow();
497 if(dlg.ShowModal() != wxID_OK)
500dlg.TransferDataFromWindow();
526}
NCBI_CATCH(
"CProjectView::BroadcastVisibleRange()");
561wxMenu* menu =
event.GetMenu();
564vector<wxEvtHandler*> handlers;
568 for(
size_tpos = 0; pos < menu->GetMenuItemCount(); pos++ ){
569wxMenuItem* pos_item = menu->FindItemByPosition( pos );
572pos_item->IsSeparator()
573&& pos_item->GetItemLabel().Cmp(
wxT(
"VRBroadcast") ) == 0
578 wxT(
"&Broadcast Visible Range..."),
579 wxT(
"Broadcast Visible Range")
582menu->InsertCheckItem(
585 wxT(
"&Accept Visible Range Change"),
586 wxT(
"Accept Visible Range Change")
616 returncmd_reg.
CreateMenu(kPrjViewContextMenu);
622vector<wxEvtHandler*>& handlers,
623 const string& ext_point_id,
655vector<wxEvtHandler*>& handlers,
662 if( sel_objects.empty() ){
666 static stringid(
"scoped_objects::cmd_contributor");
User-defined methods of the data storage class.
void ResetRadioButtons(bool show)
void SetByDefault(bool value)
void SetBroadcastFlag(int value)
int GetBroadcastFlag() const
CEvent - generic event implementation TODO TODO - Attachments.
CUndoManager & GetUndoManager()
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)
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 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 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
void OnVRCAllowedChanged()
class CRgbaColor provides a simple abstraction for managing colors.
CSelectionEvent CSelectionEvent is used for broadcasting selection between views.
void GetAllObjects(TConstObjects &objs) const
void GetRangeSelectionAsLocs(TConstObjects &objs) const
CUICommandRegistry is a centralized registry where all application commands should be registered.
wxMenu * CreateMenu(const SwxMenuItemRec *items)
create a menu from a static definition (see WX_*_MENU macros)
virtual void Undo(wxWindow *window=0)
virtual void Redo(wxWindow *window=0)
@ eWidgetSelectionChanged
a view has been destroyed
@ eWidgetRangeChanged
notification from child to parent that the visible range has changed
static bool IsAutoBroadcast()
void SetVisibleRangePolicy(EBasicPolicy policy)
static EBasicPolicy GetDefaultVisibleRangePolicy()
list< CConstRef< objects::CSeq_loc > > TLocations
const TLocations & GetLocations() const
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.
GUI command routing and handling framework.
@ eCmdVisibleRangeBroadcast
@ eCmdVisibleRangeChangeAllow
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
void Error(CExceptionArgs_Base &args)
#define NCBI_CATCH(message)
Catch CExceptions as well This macro is deprecated - use *_X or *_XX variant instead of it.
void Info(CExceptionArgs_Base &args)
CIRef< T > GetServiceByType()
retrieves a typed reference to a service, the name of C++ type is used as the name of the service.
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.
vector< CConstRef< CObject > > TConstObjects
#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
TRange GetTotalRange(void) const
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,.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static const char label[]
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 WX_DEFINE_MENU(name)
New macros for defining menus for use with CUICommandRegistry.
#define WX_MENU_SEPARATOR_L(label)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4